diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..46103db --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/plugin-preview.iml b/.idea/plugin-preview.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/plugin-preview.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ui/decoder-pro-audio-player.js b/ui/decoder-pro-audio-player.js new file mode 100644 index 0000000..58461b5 --- /dev/null +++ b/ui/decoder-pro-audio-player.js @@ -0,0 +1 @@ +!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(require("path"),require("fs"),require("crypto")):"function"==typeof define&&define.amd?define(["path","fs","crypto"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).path,e.fs,e.crypto$1)}(this,function(e,r,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var Sr=n(e),Pr=n(r),Ar=n(t);function o(e,r){return e(r={exports:{}},r.exports),r.exports}var i=o(function(x){var y;(y=void 0!==(y=void 0!==y?y:{})?y:{}).locateFile=function(e){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:e};var r,m,U,B,W,z,i,I=Object.assign({},y),L="./this.program",N="object"==typeof window,c="function"==typeof importScripts,H="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,e="",q=(H?(e=c?Sr.default.dirname(e)+"/":__dirname+"/",z=()=>{W||(B=Pr.default,W=Sr.default)},r=function(e,r){return z(),e=W.normalize(e),B.readFileSync(e,r?void 0:"utf8")},U=e=>{e=r(e,!0);return e=e.buffer?e:new Uint8Array(e)},m=(e,t,n)=>{z(),e=W.normalize(e),B.readFile(e,function(e,r){e?n(e):t(r.buffer)})},1{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},c&&(U=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),m=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)}),y.print||console.log.bind(console)),a=y.printErr||console.warn.bind(console),V=(Object.assign(y,I),y.arguments&&y.arguments,y.thisProgram&&(L=y.thisProgram),y.quit&&y.quit,y.wasmBinary&&(i=y.wasmBinary),y.noExitRuntime,"object"!=typeof WebAssembly&&v("no native wasm support detected"),!1);function G(e,r){e||v(r)}var X,d,f,u,J,l,p,K,Z,Q,Y="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function s(e,r,t){for(var n=r+t,o=r;e[o]&&!(n<=o);)++o;if(16>10,56320|1023&a))):i+=String.fromCharCode((31&u)<<6|s)):i+=String.fromCharCode(u)}return i}function ee(e,r){return e?s(f,e,r):""}function re(e,r,t,n){if(!(0>6,r[t++]=128|63&a}else if(a<=65535){if(i<=t+2)break;r[t++]=224|a>>12,r[t++]=128|a>>6&63,r[t++]=128|63&a}else{if(i<=t+3)break;r[t++]=240|a>>18,r[t++]=128|a>>12&63,r[t++]=128|a>>6&63,r[t++]=128|63&a}}return r[t]=0,t-o}function te(e){for(var r=0,t=0;t>2]=e},this.get_type=function(){return p[this.ptr+4>>2]},this.set_destructor=function(e){p[this.ptr+8>>2]=e},this.get_destructor=function(){return p[this.ptr+8>>2]},this.set_refcount=function(e){l[this.ptr>>2]=e},this.set_caught=function(e){d[this.ptr+12>>0]=e=e?1:0},this.get_caught=function(){return 0!=d[this.ptr+12>>0]},this.set_rethrown=function(e){d[this.ptr+13>>0]=e=e?1:0},this.get_rethrown=function(){return 0!=d[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=l[this.ptr>>2];l[this.ptr>>2]=e+1},this.release_ref=function(){var e=l[this.ptr>>2];return l[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){p[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return p[this.ptr+16>>2]},this.get_exception_ptr=function(){if(_r(this.get_type()))return p[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}ue(h="decoder-pro-audio.wasm")||(I=h,h=y.locateFile?y.locateFile(I,e):e+I);var b={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;0<=n;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=b.isAbs(e),t="/"===e.substr(-1);return(e=(e=b.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||r?e:".")&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var e=b.splitPath(e),r=e[0],e=e[1];return r||e?r+(e=e&&e.substr(0,e.length-1)):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=b.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments,0);return b.normalize(e.join("/"))},join2:(e,r)=>b.normalize(e+"/"+r)},E={resolve:function(){for(var e="",r=!1,t=arguments.length-1;-1<=t&&!r;t--){var n=0<=t?arguments[t]:k.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=b.isAbs(n)}return(r?"/":"")+b.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/")||"."},relative:(e,r)=>{function t(e){for(var r=0;r>>0),0!=t&&(r=Math.max(r,256)),t=e.contents,e.contents=new Uint8Array(r),0=e.node.usedBytes)return 0;var s=Math.min(e.node.usedBytes-o,n);if(8!!e),!1),n=k.root,o="/",i=0;i{for(var r,t;;){if(k.isRoot(e))return t=e.mount.mountpoint,r?"/"!==t[t.length-1]?t+"/"+r:t+r:t;r=r?e.name+"/"+r:e.name,e=e.parent}},hashName:(e,r)=>{for(var t=0,n=0;n>>0)%k.nameTable.length},hashAddNode:e=>{var r=k.hashName(e.parent.id,e.name);e.name_next=k.nameTable[r],k.nameTable[r]=e},hashRemoveNode:e=>{var r=k.hashName(e.parent.id,e.name);if(k.nameTable[r]===e)k.nameTable[r]=e.name_next;else for(var t=k.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode:(e,r)=>{var t=k.mayLookup(e);if(t)throw new k.ErrnoError(t,e);for(var t=k.hashName(e.id,r),n=k.nameTable[t];n;n=n.name_next){var o=n.name;if(n.parent.id===e.id&&o===r)return n}return k.lookup(e,r)},createNode:(e,r,t,n)=>{e=new k.FSNode(e,r,t,n);return k.hashAddNode(e),e},destroyNode:e=>{k.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var r=k.flagModes[e];if(void 0===r)throw new Error("Unknown file open mode: "+e);return r},flagsToPermissionString:e=>{var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>k.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup:e=>{return k.nodePermissions(e,"x")||(e.node_ops.lookup?0:2)},mayCreate:(e,r)=>{try{return k.lookupNode(e,r),20}catch(e){}return k.nodePermissions(e,"wx")},mayDelete:(e,r,t)=>{var n;try{n=k.lookupNode(e,r)}catch(e){return e.errno}r=k.nodePermissions(e,"wx");if(r)return r;if(t){if(!k.isDir(n.mode))return 54;if(k.isRoot(n)||k.getPath(n)===k.cwd())return 10}else if(k.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?k.isLink(e.mode)?32:k.isDir(e.mode)&&("r"!==k.flagsToPermissionString(r)||512&r)?31:k.nodePermissions(e,k.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd:function(){for(var e=0k.streams[e],createStream:(e,r,t)=>{k.FSStream||(k.FSStream=function(){this.shared={}},k.FSStream.prototype={},Object.defineProperties(k.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new k.FSStream,e);r=k.nextfd(r,t);return e.fd=r,k.streams[r]=e},closeStream:e=>{k.streams[e]=null},chrdev_stream_ops:{open:e=>{var r=k.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new k.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice:(e,r)=>{k.devices[e]={stream_ops:r}},getDevice:e=>k.devices[e],getMounts:e=>{for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs:(r,t)=>{"function"==typeof r&&(t=r,r=!1),k.syncFSRequests++,1=n.length&&i(null)}n.forEach(e=>{if(!e.type.syncfs)return s(null);e.type.syncfs(e,r,s)})},mount:(e,r,t)=>{var n,o="/"===t,i=!t;if(o&&k.root)throw new k.ErrnoError(10);if(!o&&!i){i=k.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,k.isMountpoint(n))throw new k.ErrnoError(10);if(!k.isDir(n.mode))throw new k.ErrnoError(54)}i={type:e,opts:r,mountpoint:t,mounts:[]},r=e.mount(i);return(r.mount=i).root=r,o?k.root=r:n&&(n.mounted=i,n.mount&&n.mount.mounts.push(i)),r},unmount:e=>{e=k.lookupPath(e,{follow_mount:!1});if(!k.isMountpoint(e.node))throw new k.ErrnoError(28);var e=e.node,r=e.mounted,n=k.getMounts(r),r=(Object.keys(k.nameTable).forEach(e=>{for(var r=k.nameTable[e];r;){var t=r.name_next;n.includes(r.mount)&&k.destroyNode(r),r=t}}),e.mounted=null,e.mount.mounts.indexOf(r));e.mount.mounts.splice(r,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod:(e,r,t)=>{var n=k.lookupPath(e,{parent:!0}).node,e=b.basename(e);if(!e||"."===e||".."===e)throw new k.ErrnoError(28);var o=k.mayCreate(n,e);if(o)throw new k.ErrnoError(o);if(n.node_ops.mknod)return n.node_ops.mknod(n,e,r,t);throw new k.ErrnoError(63)},create:(e,r)=>k.mknod(e,r=(r=void 0!==r?r:438)&4095|32768,0),mkdir:(e,r)=>k.mknod(e,r=(r=void 0!==r?r:511)&1023|16384,0),mkdirTree:(e,r)=>{for(var t=e.split("/"),n="",o=0;o(void 0===t&&(t=r,r=438),k.mknod(e,r|=8192,t)),symlink:(e,r)=>{if(!E.resolve(e))throw new k.ErrnoError(44);var t=k.lookupPath(r,{parent:!0}).node;if(!t)throw new k.ErrnoError(44);var r=b.basename(r),n=k.mayCreate(t,r);if(n)throw new k.ErrnoError(n);if(t.node_ops.symlink)return t.node_ops.symlink(t,r,e);throw new k.ErrnoError(63)},rename:(e,r)=>{var t=b.dirname(e),n=b.dirname(r),o=b.basename(e),i=b.basename(r),s=k.lookupPath(e,{parent:!0}).node,a=k.lookupPath(r,{parent:!0}).node;if(!s||!a)throw new k.ErrnoError(44);if(s.mount!==a.mount)throw new k.ErrnoError(75);var u,l=k.lookupNode(s,o);if("."!==E.relative(e,n).charAt(0))throw new k.ErrnoError(28);if("."!==E.relative(r,t).charAt(0))throw new k.ErrnoError(55);try{u=k.lookupNode(a,i)}catch(e){}if(l!==u){n=k.isDir(l.mode),r=k.mayDelete(s,o,n);if(r)throw new k.ErrnoError(r);if(r=u?k.mayDelete(a,i,n):k.mayCreate(a,i))throw new k.ErrnoError(r);if(!s.node_ops.rename)throw new k.ErrnoError(63);if(k.isMountpoint(l)||u&&k.isMountpoint(u))throw new k.ErrnoError(10);if(a!==s&&(r=k.nodePermissions(s,"w")))throw new k.ErrnoError(r);k.hashRemoveNode(l);try{s.node_ops.rename(l,a,i)}catch(e){throw e}finally{k.hashAddNode(l)}}},rmdir:e=>{var r=k.lookupPath(e,{parent:!0}).node,e=b.basename(e),t=k.lookupNode(r,e),n=k.mayDelete(r,e,!0);if(n)throw new k.ErrnoError(n);if(!r.node_ops.rmdir)throw new k.ErrnoError(63);if(k.isMountpoint(t))throw new k.ErrnoError(10);r.node_ops.rmdir(r,e),k.destroyNode(t)},readdir:e=>{e=k.lookupPath(e,{follow:!0}).node;if(e.node_ops.readdir)return e.node_ops.readdir(e);throw new k.ErrnoError(54)},unlink:e=>{var r=k.lookupPath(e,{parent:!0}).node;if(!r)throw new k.ErrnoError(44);var e=b.basename(e),t=k.lookupNode(r,e),n=k.mayDelete(r,e,!1);if(n)throw new k.ErrnoError(n);if(!r.node_ops.unlink)throw new k.ErrnoError(63);if(k.isMountpoint(t))throw new k.ErrnoError(10);r.node_ops.unlink(r,e),k.destroyNode(t)},readlink:e=>{e=k.lookupPath(e).node;if(!e)throw new k.ErrnoError(44);if(e.node_ops.readlink)return E.resolve(k.getPath(e.parent),e.node_ops.readlink(e));throw new k.ErrnoError(28)},stat:(e,r)=>{e=k.lookupPath(e,{follow:!r}).node;if(!e)throw new k.ErrnoError(44);if(e.node_ops.getattr)return e.node_ops.getattr(e);throw new k.ErrnoError(63)},lstat:e=>k.stat(e,!0),chmod:(e,r,t)=>{t="string"==typeof e?k.lookupPath(e,{follow:!t}).node:e;if(!t.node_ops.setattr)throw new k.ErrnoError(63);t.node_ops.setattr(t,{mode:4095&r|-4096&t.mode,timestamp:Date.now()})},lchmod:(e,r)=>{k.chmod(e,r,!0)},fchmod:(e,r)=>{e=k.getStream(e);if(!e)throw new k.ErrnoError(8);k.chmod(e.node,r)},chown:(e,r,t,n)=>{n="string"==typeof e?k.lookupPath(e,{follow:!n}).node:e;if(!n.node_ops.setattr)throw new k.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown:(e,r,t)=>{k.chown(e,r,t,!0)},fchown:(e,r,t)=>{e=k.getStream(e);if(!e)throw new k.ErrnoError(8);k.chown(e.node,r,t)},truncate:(e,r)=>{if(r<0)throw new k.ErrnoError(28);e="string"==typeof e?k.lookupPath(e,{follow:!0}).node:e;if(!e.node_ops.setattr)throw new k.ErrnoError(63);if(k.isDir(e.mode))throw new k.ErrnoError(31);if(!k.isFile(e.mode))throw new k.ErrnoError(28);var t=k.nodePermissions(e,"w");if(t)throw new k.ErrnoError(t);e.node_ops.setattr(e,{size:r,timestamp:Date.now()})},ftruncate:(e,r)=>{e=k.getStream(e);if(!e)throw new k.ErrnoError(8);if(0==(2097155&e.flags))throw new k.ErrnoError(28);k.truncate(e.node,r)},utime:(e,r,t)=>{e=k.lookupPath(e,{follow:!0}).node;e.node_ops.setattr(e,{timestamp:Math.max(r,t)})},open:(e,r,t)=>{if(""===e)throw new k.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?k.modeStringToFlags(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=b.normalize(e);try{n=k.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var o=!1;if(64&r)if(n){if(128&r)throw new k.ErrnoError(20)}else n=k.mknod(e,t,0),o=!0;if(!n)throw new k.ErrnoError(44);if(k.isChrdev(n.mode)&&(r&=-513),65536&r&&!k.isDir(n.mode))throw new k.ErrnoError(54);if(!o){t=k.mayOpen(n,r);if(t)throw new k.ErrnoError(t)}512&r&&!o&&k.truncate(n,0),r&=-131713;t=k.createStream({node:n,path:k.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return t.stream_ops.open&&t.stream_ops.open(t),!y.logReadFiles||1&r||(k.readFiles||(k.readFiles={}),e in k.readFiles||(k.readFiles[e]=1)),t},close:e=>{if(k.isClosed(e))throw new k.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{k.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,r,t)=>{if(k.isClosed(e))throw new k.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new k.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new k.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read:(e,r,t,n,o)=>{if(n<0||o<0)throw new k.ErrnoError(28);if(k.isClosed(e))throw new k.ErrnoError(8);if(1==(2097155&e.flags))throw new k.ErrnoError(8);if(k.isDir(e.node.mode))throw new k.ErrnoError(31);if(!e.stream_ops.read)throw new k.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new k.ErrnoError(70)}else o=e.position;r=e.stream_ops.read(e,r,t,n,o);return i||(e.position+=r),r},write:(e,r,t,n,o,i)=>{if(n<0||o<0)throw new k.ErrnoError(28);if(k.isClosed(e))throw new k.ErrnoError(8);if(0==(2097155&e.flags))throw new k.ErrnoError(8);if(k.isDir(e.node.mode))throw new k.ErrnoError(31);if(!e.stream_ops.write)throw new k.ErrnoError(28);e.seekable&&1024&e.flags&&k.llseek(e,0,2);var s=void 0!==o;if(s){if(!e.seekable)throw new k.ErrnoError(70)}else o=e.position;r=e.stream_ops.write(e,r,t,n,o,i);return s||(e.position+=r),r},allocate:(e,r,t)=>{if(k.isClosed(e))throw new k.ErrnoError(8);if(r<0||t<=0)throw new k.ErrnoError(28);if(0==(2097155&e.flags))throw new k.ErrnoError(8);if(!k.isFile(e.node.mode)&&!k.isDir(e.node.mode))throw new k.ErrnoError(43);if(!e.stream_ops.allocate)throw new k.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap:(e,r,t,n,o)=>{if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new k.ErrnoError(2);if(1==(2097155&e.flags))throw new k.ErrnoError(2);if(e.stream_ops.mmap)return e.stream_ops.mmap(e,r,t,n,o);throw new k.ErrnoError(43)},msync:(e,r,t,n,o)=>e&&e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl:(e,r,t)=>{if(e.stream_ops.ioctl)return e.stream_ops.ioctl(e,r,t);throw new k.ErrnoError(59)},readFile:function(e){let r=1k.currentPath,chdir:e=>{e=k.lookupPath(e,{follow:!0});if(null===e.node)throw new k.ErrnoError(44);if(!k.isDir(e.node.mode))throw new k.ErrnoError(54);var r=k.nodePermissions(e.node,"x");if(r)throw new k.ErrnoError(r);k.currentPath=e.path},createDefaultDirectories:()=>{k.mkdir("/tmp"),k.mkdir("/home"),k.mkdir("/home/web_user")},createDefaultDevices:()=>{k.mkdir("/dev"),k.registerDevice(k.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),k.mkdev("/dev/null",k.makedev(1,3)),o.register(k.makedev(5,0),o.default_tty_ops),o.register(k.makedev(6,0),o.default_tty1_ops),k.mkdev("/dev/tty",k.makedev(5,0)),k.mkdev("/dev/tty1",k.makedev(6,0));var e=function(){var e;if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=new Uint8Array(1),()=>(crypto.getRandomValues(e),e[0]);if(H)try{var r=Ar.default;return()=>r.randomBytes(1)[0]}catch(e){}return()=>v("randomDevice")}();k.createDevice("/dev","random",e),k.createDevice("/dev","urandom",e),k.mkdir("/dev/shm"),k.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{k.mkdir("/proc");var r=k.mkdir("/proc/self");k.mkdir("/proc/self/fd"),k.mount({mount:()=>{var e=k.createNode(r,"fd",16895,73);return e.node_ops={lookup:(e,r)=>{var t=k.getStream(+r);if(!t)throw new k.ErrnoError(8);r={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>t.path}};return r.parent=r}},e}},{},"/proc/self/fd")},createStandardStreams:()=>{y.stdin?k.createDevice("/dev","stdin",y.stdin):k.symlink("/dev/tty","/dev/stdin"),y.stdout?k.createDevice("/dev","stdout",null,y.stdout):k.symlink("/dev/tty","/dev/stdout"),y.stderr?k.createDevice("/dev","stderr",null,y.stderr):k.symlink("/dev/tty1","/dev/stderr"),k.open("/dev/stdin",0),k.open("/dev/stdout",1),k.open("/dev/stderr",1)},ensureErrnoError:()=>{k.ErrnoError||(k.ErrnoError=function(e,r){this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},k.ErrnoError.prototype=new Error,k.ErrnoError.prototype.constructor=k.ErrnoError,[44].forEach(e=>{k.genericErrors[e]=new k.ErrnoError(e),k.genericErrors[e].stack=""}))},staticInit:()=>{k.ensureErrnoError(),k.nameTable=new Array(4096),k.mount(_,{},"/"),k.createDefaultDirectories(),k.createDefaultDevices(),k.createSpecialDirectories(),k.filesystems={MEMFS:_}},init:(e,r,t)=>{k.init.initialized=!0,k.ensureErrnoError(),y.stdin=e||y.stdin,y.stdout=r||y.stdout,y.stderr=t||y.stderr,k.createStandardStreams()},quit:()=>{k.init.initialized=!1;for(var e=0;e{var t=0;return e&&(t|=365),r&&(t|=146),t},findObject:(e,r)=>{e=k.analyzePath(e,r);return e.exists?e.object:null},analyzePath:(e,r)=>{try{e=(n=k.lookupPath(e,{follow:!r})).path}catch(e){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=k.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=b.basename(e),n=k.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(e){t.error=e.errno}return t},createPath:(e,r,t,n)=>{e="string"==typeof e?e:k.getPath(e);for(var o=r.split("/").reverse();o.length;){var i=o.pop();if(i){var s=b.join2(e,i);try{k.mkdir(s)}catch(e){}e=s}}return s},createFile:(e,r,t,n,o)=>{e=b.join2("string"==typeof e?e:k.getPath(e),r),r=k.getMode(n,o);return k.create(e,r)},createDataFile:(e,r,t,n,o,i)=>{var s=r,r=(e&&(e="string"==typeof e?e:k.getPath(e),s=r?b.join2(e,r):e),k.getMode(n,o)),e=k.create(s,r);if(t){if("string"==typeof t){for(var a=new Array(t.length),u=0,l=t.length;u{var e=b.join2("string"==typeof e?e:k.getPath(e),r),r=k.getMode(!!u,!!s),t=(k.createDevice.major||(k.createDevice.major=64),k.makedev(k.createDevice.major++,0));return k.registerDevice(t,{open:e=>{e.seekable=!1},close:e=>{s&&s.buffer&&s.buffer.length&&s(10)},read:(e,r,t,n,o)=>{for(var i,s=0,a=0;a{for(var i=0;i{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!r)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=pe(r(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new k.ErrnoError(29)}},createLazyFile:(e,r,s,t,n)=>{function o(){this.lengthKnown=!1,this.chunks=[]}if(o.prototype.get=function(e){var r;if(!(e>this.length-1||e<0))return r=e%this.chunkSize,e=e/this.chunkSize|0,this.getter(e)[r]},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",s,!1),e.send(null),!(200<=e.status&&e.status<300||304===e.status))throw new Error("Couldn't load "+s+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),t=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,e=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,o=1048576,i=(t||(o=n),this);i.setDataGetter(e=>{var r=e*o,t=(e+1)*o-1,t=Math.min(t,n-1);if(void 0===i.chunks[e]&&(i.chunks[e]=((e,r)=>{if(r=i.length)return 0;var s=Math.min(i.length-o,n);if(i.slice)for(var a=0;a{var r=a.stream_ops[e];u[e]=function(){return k.forceLoadFile(a),r.apply(null,arguments)}}),u.read=(e,r,t,n,o)=>(k.forceLoadFile(a),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{k.forceLoadFile(a);var i=he(r);if(i)return l(e,d,i,r,t),{ptr:i,allocated:!0};throw new k.ErrnoError(48)},a.stream_ops=u,a},createPreloadedFile:(t,n,e,o,i,s,a,u,l,c)=>{var r,d,f,p=n?E.resolve(b.join2(t,n)):t;function h(e){function r(e){c&&c(),u||k.createDataFile(t,n,e,o,i,l),s&&s(),ae()}Browser.handledByPreloadPlugin(e,p,r,()=>{a&&a(),ae()})||r(e)}se(),"string"==typeof e?(d=a,f="al "+(r=e),m(r,e=>{G(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),h(new Uint8Array(e)),f&&ae()},e=>{if(!d)throw'Loading data file "'+r+'" failed.';d()}),f&&se()):h(e)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(s,a,u)=>{a=a||(()=>{}),u=u||(()=>{});var e=k.indexedDB();try{var l=e.open(k.DB_NAME(),k.DB_VERSION)}catch(s){return u(s)}l.onupgradeneeded=()=>{q("creating db"),l.result.createObjectStore(k.DB_STORE_NAME)},l.onsuccess=()=>{var e=l.result.transaction([k.DB_STORE_NAME],"readwrite"),r=e.objectStore(k.DB_STORE_NAME),t=0,n=0,o=s.length;function i(){(0==n?a:u)()}s.forEach(e=>{e=r.put(k.analyzePath(e).object.contents,e);e.onsuccess=()=>{++t+n==o&&i()},e.onerror=()=>{t+ ++n==o&&i()}}),e.onerror=u},l.onerror=u},loadFilesFromDB:(a,u,l)=>{u=u||(()=>{}),l=l||(()=>{});var e=k.indexedDB();try{var c=e.open(k.DB_NAME(),k.DB_VERSION)}catch(a){return l(a)}c.onupgradeneeded=l,c.onsuccess=()=>{var e=c.result;try{var r=e.transaction([k.DB_STORE_NAME],"readonly")}catch(e){return void l(e)}var t=r.objectStore(k.DB_STORE_NAME),n=0,o=0,i=a.length;function s(){(0==o?u:l)()}a.forEach(e=>{var r=t.get(e);r.onsuccess=()=>{k.analyzePath(e).exists&&k.unlink(e),k.createDataFile(b.dirname(e),b.basename(e),r.result,!0,!0,!0),++n+o==i&&s()},r.onerror=()=>{n+ ++o==i&&s()}}),r.onerror=l},c.onerror=l}},S={DEFAULT_POLLMASK:5,calculateAt:function(e,r,t){if(b.isAbs(r))return r;var n;if(-100===e)n=k.cwd();else{e=k.getStream(e);if(!e)throw new k.ErrnoError(8);n=e.path}if(0!=r.length)return b.join2(n,r);if(t)return n;throw new k.ErrnoError(44)},doStat:function(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&b.normalize(r)!==b.normalize(k.getPath(e.node)))return-54;throw e}return l[t>>2]=n.dev,l[t+4>>2]=0,l[t+8>>2]=n.ino,l[t+12>>2]=n.mode,l[t+16>>2]=n.nlink,l[t+20>>2]=n.uid,l[t+24>>2]=n.gid,l[t+28>>2]=n.rdev,l[t+32>>2]=0,w=[n.size>>>0,(g=n.size,1<=+Math.abs(g)?0>>0:~~+Math.ceil((g-(~~g>>>0))/4294967296)>>>0:0)],l[t+40>>2]=w[0],l[t+44>>2]=w[1],l[t+48>>2]=4096,l[t+52>>2]=n.blocks,w=[Math.floor(n.atime.getTime()/1e3)>>>0,(g=Math.floor(n.atime.getTime()/1e3),1<=+Math.abs(g)?0>>0:~~+Math.ceil((g-(~~g>>>0))/4294967296)>>>0:0)],l[t+56>>2]=w[0],l[t+60>>2]=w[1],l[t+64>>2]=0,w=[Math.floor(n.mtime.getTime()/1e3)>>>0,(g=Math.floor(n.mtime.getTime()/1e3),1<=+Math.abs(g)?0>>0:~~+Math.ceil((g-(~~g>>>0))/4294967296)>>>0:0)],l[t+72>>2]=w[0],l[t+76>>2]=w[1],l[t+80>>2]=0,w=[Math.floor(n.ctime.getTime()/1e3)>>>0,(g=Math.floor(n.ctime.getTime()/1e3),1<=+Math.abs(g)?0>>0:~~+Math.ceil((g-(~~g>>>0))/4294967296)>>>0:0)],l[t+88>>2]=w[0],l[t+92>>2]=w[1],l[t+96>>2]=0,w=[n.ino>>>0,(g=n.ino,1<=+Math.abs(g)?0>>0:~~+Math.ceil((g-(~~g>>>0))/4294967296)>>>0:0)],l[t+104>>2]=w[0],l[t+108>>2]=w[1],0},doMsync:function(e,r,t,n,o){e=f.slice(e,e+t);k.msync(r,e,o,t,n)},varargs:void 0,get:function(){return S.varargs+=4,l[S.varargs-4>>2]},getStr:function(e){return ee(e)},getStreamFromFD:function(e){e=k.getStream(e);if(e)return e;throw new k.ErrnoError(8)}};function me(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var ye=void 0;function P(e){for(var r="",t=e;f[t];)r+=ye[f[t++]];return r}var A={},T={},ge={};function we(e){if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=r&&r<=57?"_"+e:e}function ve(e,r){return e=we(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(r)}function be(e,r){var t=ve(r,function(e){this.name=r,this.message=e;e=new Error(e).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},t}var D=void 0;function F(e){throw new D(e)}var Ee=void 0;function _e(e){throw new Ee(e)}function ke(n,r,o){function t(e){var r=o(e);r.length!==n.length&&_e("Mismatched type converter count");for(var t=0;t{T.hasOwnProperty(e)?i[r]=T[e]:(s.push(e),A.hasOwnProperty(e)||(A[e]=[]),A[e].push(()=>{i[r]=T[e],++a===s.length&&t(i)}))}),0===s.length&&t(i)}function C(e,r,t){t=2e()))}function Se(e){F(e.$$.ptrType.registeredClass.name+" instance already deleted")}var Pe=!1;function Ae(e){}function Te(e){--e.count.value,0===e.count.value&&((e=e).smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr))}var De={};var Fe=[];function Ce(){for(;Fe.length;){var e=Fe.pop();e.$$.deleteScheduled=!1,e.delete()}}var Me=void 0;var $e={};function Re(e,r){return r.ptrType&&r.ptr||_e("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!=!!r.smartPtr&&_e("Both smartPtrType and smartPtr must be specified"),r.count={value:1},Oe(Object.create(e,{$$:{value:r}}))}function Oe(e){return"undefined"==typeof FinalizationRegistry?(Oe=e=>e,e):(Pe=new FinalizationRegistry(e=>{Te(e.$$)}),Ae=e=>Pe.unregister(e),(Oe=e=>{var r=e.$$;return r.smartPtr&&Pe.register(e,{$$:r},e),e})(e))}function M(){}function je(e,r,t){var n;void 0===e[r].overloadTable&&(n=e[r],e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||F("Function '"+t+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[r].overloadTable+")!"),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n)}function xe(e,r,t,n,o,i,s,a){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=s,this.downcast=a,this.pureVirtualFunctions=[]}function Ue(e,r,t){for(;r!==t;)r.upcast||F("Expected null or instance of "+t.name+", got an instance of "+r.name),e=r.upcast(e),r=r.baseClass;return e}function Be(e,r){if(null===r)return this.isReference&&F("null is not a valid "+this.name),0;r.$$||F('Cannot pass "'+er(r)+'" as a '+this.name),r.$$.ptr||F("Cannot pass deleted object as a pointer of type "+this.name);var t=r.$$.ptrType.registeredClass;return Ue(r.$$.ptr,t,this.registeredClass)}function We(e,r){if(null===r)return this.isReference&&F("null is not a valid "+this.name),this.isSmartPointer?(n=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,n),n):0;r.$$||F('Cannot pass "'+er(r)+'" as a '+this.name),r.$$.ptr||F("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&r.$$.ptrType.isConst&&F("Cannot convert argument of type "+(r.$$.smartPtrType||r.$$.ptrType).name+" to parameter type "+this.name);var t,n,o=r.$$.ptrType.registeredClass;if(n=Ue(r.$$.ptr,o,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&F("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?n=r.$$.smartPtr:F("Cannot convert argument of type "+(r.$$.smartPtrType||r.$$.ptrType).name+" to parameter type "+this.name);break;case 1:n=r.$$.smartPtr;break;case 2:r.$$.smartPtrType===this?n=r.$$.smartPtr:(t=r.clone(),n=this.rawShare(n,Ye.toHandle(function(){t.delete()})),null!==e&&e.push(this.rawDestructor,n));break;default:F("Unsupporting sharing policy")}return n}function ze(e,r){if(null===r)return this.isReference&&F("null is not a valid "+this.name),0;r.$$||F('Cannot pass "'+er(r)+'" as a '+this.name),r.$$.ptr||F("Cannot pass deleted object as a pointer of type "+this.name),r.$$.ptrType.isConst&&F("Cannot convert argument of type "+r.$$.ptrType.name+" to parameter type "+this.name);var t=r.$$.ptrType.registeredClass;return Ue(r.$$.ptr,t,this.registeredClass)}function Ie(e){return this.fromWireType(l[e>>2])}function $(e,r,t,n,o,i,s,a,u,l,c){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=s,this.rawGetPointee=a,this.rawConstructor=u,this.rawShare=l,this.rawDestructor=c,o||void 0!==r.baseClass?this.toWireType=We:(this.toWireType=n?Be:ze,this.destructorFunction=null)}var Le=[];function Ne(e){var r=Le[e];return r||(e>=Le.length&&(Le.length=e+1),Le[e]=r=Q.get(e)),r}function R(e,r){var o,i,s,t=(e=P(e)).includes("j")?(o=e,i=r,s=[],function(){return s.length=0,Object.assign(s,arguments),r=i,t=s,(e=o).includes("j")?(n=r,e=y["dynCall_"+e],t&&t.length?e.apply(null,[n].concat(t)):e.call(null,n)):Ne(r).apply(null,t);var e,r,t,n}):Ne(r);return"function"!=typeof t&&F("unknown function pointer with signature "+e+": "+r),t}var He=void 0;function qe(e){var e=wr(e),r=P(e);return j(e),r}function Ve(e,r){var t=[],n={};throw r.forEach(function e(r){n[r]||T[r]||(ge[r]?ge[r].forEach(e):(t.push(r),n[r]=!0))}),new He(e+": "+t.map(qe).join([", "]))}function Ge(e,r){for(var t=[],n=0;n>2]);return t}function Xe(e){for(;e.length;){var r=e.pop();e.pop()(r)}}function Je(e,r){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var t=ve(e.name||"unknownFunctionName",function(){}),t=(t.prototype=e.prototype,new t),e=e.apply(t,r);return e instanceof Object?e:t}function Ke(e,r,t,n,o){var i=r.length;i<2&&F("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var t=null!==r[1]&&null!==t,s=!1,a=1;a(e||F("Cannot use deleted val. handle = "+e),O[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var r=Ze.length?Ze.pop():O.length;return O[r]={refcount:1,value:e},r}}};function er(e){if(null===e)return"null";var r=typeof e;return"object"==r||"array"==r||"function"==r?e.toString():""+e}var rr="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function tr(e,r){for(var t,n=e>>1,o=n+r/2;!(o<=n)&&J[n];)++n;if(32<(t=n<<1)-e&&rr)return rr.decode(f.subarray(e,t));for(var i="",s=0;!(r/2<=s);++s){var a=u[e+2*s>>1];if(0==a)break;i+=String.fromCharCode(a)}return i}function nr(e,r,t){if((t=void 0===t?2147483647:t)<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,i=0;i>1]=s,r+=2}return u[r>>1]=0,r-n}function or(e){return 2*e.length}function ir(e,r){for(var t=0,n="";!(r/4<=t);){var o,i=l[e+4*t>>2];if(0==i)break;++t,65536<=i?(o=i-65536,n+=String.fromCharCode(55296|o>>10,56320|1023&o)):n+=String.fromCharCode(i)}return n}function sr(e,r,t){if((t=void 0===t?2147483647:t)<4)return 0;for(var n=r,o=n+t-4,i=0;i>2]=s,(r+=4)+4>o)break}return l[r>>2]=0,r-n}function ar(e){for(var r=0,t=0;t>1]=2,0;case 16:case 8:default:return-28;case 9:return l[gr()>>2]=28,-1}}catch(e){if(void 0!==k&&e instanceof k.ErrnoError)return-e.errno;throw e}},w:function(e,r,t,n){S.varargs=n;try{r=S.getStr(r),r=S.calculateAt(e,r);var o=n?S.get():0;return k.open(r,t,o).fd}catch(e){if(void 0!==k&&e instanceof k.ErrnoError)return-e.errno;throw e}},u:function(e,r,t,n,o){},E:function(e,t,n,o,i){var s=me(n);C(e,{name:t=P(t),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?o:i},argPackAdvance:8,readValueFromPointer:function(e){var r;if(1===n)r=d;else if(2===n)r=u;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+t);r=l}return this.fromWireType(r[e>>s])},destructorFunction:null})},t:function(u,e,r,l,t,c,n,d,o,f,p,i,h){p=P(p),c=R(t,c),d=d&&R(n,d),f=f&&R(o,f),h=R(i,h);var s,m=we(p);t=m,n=function(){Ve("Cannot construct "+p+" due to unbound types",[l])},y.hasOwnProperty(t)?(F("Cannot register public name '"+t+"' twice"),je(y,t,t),y.hasOwnProperty(s)&&F("Cannot register multiple overloads of a function with the same number of arguments ("+s+")!"),y[t].overloadTable[s]=n):y[t]=n,ke([u,e,r],l?[l]:[],function(e){e=e[0],e=l?(s=e.registeredClass).instancePrototype:M.prototype;var r,t,n=ve(m,function(){if(Object.getPrototypeOf(this)!==o)throw new D("Use 'new' to construct "+p);if(void 0===i.constructor_body)throw new D(p+" has no accessible constructor");var e=i.constructor_body[arguments.length];if(void 0===e)throw new D("Tried to invoke ctor of "+p+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(i.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)}),o=Object.create(e,{constructor:{value:n}}),i=(n.prototype=o,new xe(p,n,o,h,s,c,d,f)),e=new $(p,i,!0,!1,!1),s=new $(p+"*",i,!1,!1,!1),a=new $(p+" const*",i,!1,!0,!1);return De[u]={pointerType:s,constPointerType:a},r=m,n=n,y.hasOwnProperty(r)||_e("Replacing nonexistant public symbol"),y[r].overloadTable,y[r]=n,y[r].argCount=t,[e,s,a]})},r:function(e,n,r,t,o,i){G(0{Ve("Cannot construct "+r.name+" due to unbound types",s)},ke([],s,function(e){return e.splice(1,0,null),r.registeredClass.constructor_body[n-1]=Ke(t,e,null,o,i),[]}),[]})},f:function(e,i,s,r,t,a,u,l){var c=Ge(s,r);i=P(i),a=R(t,a),ke([],[e],function(r){var t=(r=r[0]).name+"."+i;function e(){Ve("Cannot call "+t+" due to unbound types",c)}i.startsWith("@@")&&(i=Symbol[i.substring(2)]),l&&r.registeredClass.pureVirtualFunctions.push(i);var n=r.registeredClass.instancePrototype,o=n[i];return void 0===o||void 0===o.overloadTable&&o.className!==r.name&&o.argCount===s-2?(e.argCount=s-2,e.className=r.name,n[i]=e):(je(n,i,t),n[i].overloadTable[s-2]=e),ke([],c,function(e){e=Ke(t,e,r,a,u);return void 0===n[i].overloadTable?(e.argCount=s-2,n[i]=e):n[i].overloadTable[s-2]=e,[]}),[]})},D:function(e,r){C(e,{name:r=P(r),fromWireType:function(e){var r=Ye.toValue(e);return Qe(e),r},toWireType:function(e,r){return Ye.toHandle(r)},argPackAdvance:8,readValueFromPointer:Ie,destructorFunction:null})},n:function(e,r,t){t=me(t);C(e,{name:r=P(r),fromWireType:function(e){return e},toWireType:function(e,r){return r},argPackAdvance:8,readValueFromPointer:function(e,r){switch(r){case 2:return function(e){return this.fromWireType(K[e>>2])};case 3:return function(e){return this.fromWireType(Z[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}(r,t),destructorFunction:null})},c:function(e,r,t,n,o){r=P(r);var i,s=me(t),a=e=>e,t=(0===n&&(i=32-8*t,a=e=>e<>>i),r.includes("unsigned"));C(e,{name:r,fromWireType:a,toWireType:t?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:function(e,r,t){switch(r){case 0:return t?function(e){return d[e]}:function(e){return f[e]};case 1:return t?function(e){return u[e>>1]}:function(e){return J[e>>1]};case 2:return t?function(e){return l[e>>2]}:function(e){return p[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}(r,s,0!==n),destructorFunction:null})},b:function(e,r,t){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=p,t=r[e>>=2],r=r[e+1];return new n(X,r,t)}C(e,{name:t=P(t),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},m:function(e,r){var l="std::string"===(r=P(r));C(e,{name:r,fromWireType:function(e){var r,t=p[e>>2],n=e+4;if(l)for(var o=n,i=0;i<=t;++i){var s,a=n+i;i!=t&&0!=f[a]||(s=ee(o,a-o),void 0===r?r=s:r=r+String.fromCharCode(0)+s,o=a+1)}else{for(var u=new Array(t),i=0;i>2]=t,l&&n)re(r,f,i,t+1);else if(n)for(var s=0;sJ,d=1):4===u&&(l=ir,i=sr,s=ar,c=()=>p,d=2),C(e,{name:o,fromWireType:function(e){for(var r,t=p[e>>2],n=c(),o=e+4,i=0;i<=t;++i){var s,a=e+4+i*u;i!=t&&0!=n[a>>d]||(s=l(o,a-o),void 0===r?r=s:r=r+String.fromCharCode(0)+s,o=a+u)}return j(e),r},toWireType:function(e,r){"string"!=typeof r&&F("Cannot pass non-string to C++ string type "+o);var t=s(r),n=br(4+t+u);return p[n>>2]=t>>d,i(r,n+4,t+u),null!==e&&e.push(j,n),n},argPackAdvance:8,readValueFromPointer:Ie,destructorFunction:function(e){j(e)}})},o:function(e,r){C(e,{isVoid:!0,name:r=P(r),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,r){}})},h:function(){return Date.now()},d:function(e,r,t,n){(e=lr[e])(r=Ye.toValue(r),t=void 0===(r=ur[e=t])?P(e):r,null,n)},j:Qe,e:function(e,r){var t=function(e,r){for(var t,n,o=new Array(e),i=0;i>2],void 0===(n=T[t])&&F("parameter "+i+" has unknown type "+qe(t)),n);return o}(e,r),r=t[0],n=r.name+"_$"+t.slice(1).map(function(e){return e.name}).join("_")+"$",o=cr[n];if(void 0!==o)return o;for(var i=["retType"],s=[r],a="",u=0;u>2]=t,e),o=t,i=0;i>0]=n.charCodeAt(i);d[o>>0]=0,u+=e.length+1}),0},z:function(e,r){var t=fr(),n=(p[e>>2]=t.length,0);return t.forEach(function(e){n+=e.length+1}),p[r>>2]=n,0},l:function(e){try{var r=S.getStreamFromFD(e);return k.close(r),0}catch(e){if(void 0!==k&&e instanceof k.ErrnoError)return e.errno;throw e}},x:function(e,r){try{var t=S.getStreamFromFD(e),n=t.tty?2:k.isDir(t.mode)?3:k.isLink(t.mode)?7:4;return d[r>>0]=n,0}catch(e){if(void 0!==k&&e instanceof k.ErrnoError)return e.errno;throw e}},B:function(e,r,t,n){try{var o=function(e,r,t){for(var n=0,o=0;o>2],s=p[r+4>>2],i=(r+=8,k.read(e,d,i,s,void 0));if(i<0)return-1;if(n+=i,i>2]=o,0}catch(e){if(void 0!==k&&e instanceof k.ErrnoError)return e.errno;throw e}},s:function(e,r,t,n,o){try{var i=t+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*t:NaN;if(isNaN(i))return 61;var s=S.getStreamFromFD(e);return k.llseek(s,i,n),w=[s.position>>>0,(g=s.position,1<=+Math.abs(g)?0>>0:~~+Math.ceil((g-(~~g>>>0))/4294967296)>>>0:0)],l[o>>2]=w[0],l[o+4>>2]=w[1],s.getdents&&0===i&&0===n&&(s.getdents=null),0}catch(e){if(void 0!==k&&e instanceof k.ErrnoError)return e.errno;throw e}},k:function(e,r,t,n){try{var o=function(e,r,t){for(var n=0,o=0;o>2],s=p[r+4>>2],i=(r+=8,k.write(e,d,i,s,void 0));if(i<0)return-1;n+=i}return n}(S.getStreamFromFD(e),r,t);return p[n>>2]=o,0}catch(e){if(void 0!==k&&e instanceof k.ErrnoError)return e.errno;throw e}},g:function(e){}},j=(!function(){var r={a:yr};function t(e,r){var e=e.exports;y.asm=e,e=y.asm.F.buffer,X=e,y.HEAP8=d=new Int8Array(e),y.HEAP16=u=new Int16Array(e),y.HEAP32=l=new Int32Array(e),y.HEAPU8=f=new Uint8Array(e),y.HEAPU16=J=new Uint16Array(e),y.HEAPU32=p=new Uint32Array(e),y.HEAPF32=K=new Float32Array(e),y.HEAPF64=Z=new Float64Array(e),Q=y.asm.I,e=y.asm.G,oe.unshift(e),ae()}function n(e){t(e.instance)}function o(e){return function(){if(!i&&(N||c)){if("function"==typeof fetch&&!le(h))return fetch(h,{credentials:"same-origin"}).then(function(e){if(e.ok)return e.arrayBuffer();throw"failed to load wasm binary file at '"+h+"'"}).catch(function(){return ce(h)});if(m)return new Promise(function(r,e){m(h,function(e){r(new Uint8Array(e))},e)})}return Promise.resolve().then(function(){return ce(h)})}().then(function(e){return WebAssembly.instantiate(e,r)}).then(function(e){return e}).then(e,function(e){a("failed to asynchronously prepare wasm: "+e),v(e)})}if(se(),y.instantiateWasm)try{return y.instantiateWasm(r,t)}catch(r){return a("Module.instantiateWasm callback failed with error: "+r)}i||"function"!=typeof WebAssembly.instantiateStreaming||ue(h)||le(h)||H||"function"!=typeof fetch?o(n):fetch(h,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,r).then(n,function(e){return a("wasm streaming compile failed: "+e),a("falling back to ArrayBuffer instantiation"),o(n)})})}(),y.___wasm_call_ctors=function(){return(y.___wasm_call_ctors=y.asm.G).apply(null,arguments)},y._free=function(){return(j=y._free=y.asm.H).apply(null,arguments)}),gr=y.___errno_location=function(){return(gr=y.___errno_location=y.asm.J).apply(null,arguments)},wr=y.___getTypeName=function(){return(wr=y.___getTypeName=y.asm.K).apply(null,arguments)};y.___embind_register_native_and_builtin_types=function(){return(y.___embind_register_native_and_builtin_types=y.asm.L).apply(null,arguments)};var vr,br=y._malloc=function(){return(br=y._malloc=y.asm.M).apply(null,arguments)},Er=y._emscripten_builtin_memalign=function(){return(Er=y._emscripten_builtin_memalign=y.asm.N).apply(null,arguments)},_r=y.___cxa_is_pointer_type=function(){return(_r=y.___cxa_is_pointer_type=y.asm.O).apply(null,arguments)};function kr(){function e(){if(!vr&&(vr=!0,y.calledRun=!0,!V)){if(y.noFSInit||k.init.initialized||k.init(),k.ignorePermissions=!1,de(oe),y.onRuntimeInitialized&&y.onRuntimeInitialized(),y.postRun)for("function"==typeof y.postRun&&(y.postRun=[y.postRun]);y.postRun.length;)e=y.postRun.shift(),ie.unshift(e);var e;de(ie)}}if(!(0>4===k&&e[1]===u}function A(){return(performance&&"function"==typeof performance.now?performance:Date).now()}o(function(e){var s,r,a,t,n;s="undefined"!=typeof window&&void 0!==window.document?window.document:{},r=e.exports,a=function(){for(var e,r=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],t=0,n=r.length,o={};t{this.reject=e,this.resolve=e=>{delete this.lastReadPromise,delete this.resolve,delete this.need,r(e)},this.demand(t,!0)||null==(e=this.pull)||e.call(this,t)})},new(a=(a=s=void 0)||Promise)(function(t,r){function n(e){try{i(u.next(e))}catch(e){r(e)}}function o(e){try{i(u.throw(e))}catch(e){r(e)}}function i(e){var r;e.done?t(e.value):((r=e.value)instanceof a?r:new a(function(e){e(r)})).then(n,o)}i((u=u.apply(e,s||[])).next())});var e,s,a,u}readU32(){return this.read(c)}readU16(){return this.read(d)}readU8(){return this.read(f)}close(){var e;this.g&&this.g.return(),this.buffer&&this.buffer.subarray(0,0),null!=(e=this.reject)&&e.call(this,new Error("EOF")),delete this.lastReadPromise}flush(){if(this.buffer&&this.need){let e=null;const n=this.buffer.subarray(this.consumed);let r=0;var t=e=>n.length<(r=e);if("number"==typeof this.need){if(t(this.need))return;e=n.subarray(0,r)}else if(this.need===c){if(t(4))return;e=n[0]<<24|n[1]<<16|n[2]<<8|n[3]}else if(this.need===d){if(t(2))return;e=n[0]<<8|n[1]}else if(this.need===f){if(t(1))return;e=n[0]}else if("buffer"in this.need){if("byteOffset"in this.need){if(t(this.need.byteLength-this.need.byteOffset))return;new Uint8Array(this.need.buffer,this.need.byteOffset).set(n.subarray(0,r)),e=this.need}else if(this.g)return void this.g.throw(new Error("Unsupported type"))}else{if(t(this.need.byteLength))return;new Uint8Array(this.need).set(n.subarray(0,r)),e=this.need}return this.consumed+=r,this.g?this.demand(this.g.next(e).value,!0):this.resolve&&this.resolve(e),e}}write(e){if(e instanceof Uint8Array?this.malloc(e.length).set(e):"buffer"in e?this.malloc(e.byteLength).set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):this.malloc(e.byteLength).set(new Uint8Array(e)),!this.g&&!this.resolve)return new Promise(e=>this.pull=e);this.flush()}writeU32(e){this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){this.malloc(2).set([e>>8&255,255&e]),this.flush()}writeU8(e){this.malloc(1)[0]=e,this.flush()}malloc(e){if(this.buffer){var r=this.buffer.length,t=r+e;if(t<=this.buffer.buffer.byteLength-this.buffer.byteOffset)this.buffer=new Uint8Array(this.buffer.buffer,this.buffer.byteOffset,t);else{const e=new Uint8Array(t);e.set(this.buffer),this.buffer=e}return this.buffer.subarray(r,t)}return this.buffer=new Uint8Array(e),this.buffer}}T.U32=c,T.U16=d,T.U8=f;class D{constructor(i){this.log=function(e){if(i._opt.debug&&i._opt.debugLevel==s){for(var r=i._opt.debugUuid?`[${i._opt.debugUuid}]`:"",t=arguments.length,n=new Array(1{var e=function(){{var t=g;let r="";if("object"==typeof t)try{r=JSON.stringify(t),r=JSON.parse(r)}catch(e){r=t}else r=t;return r}}();return{debug:e.debug,debugLevel:e.debugLevel,sampleRate:0,audioBufferSize:1024,videoBuffer:e.videoBuffer}},h={isDestroyed:!1,_opt:e(),init:function(){h.debug.log("audio worker","init and opt is",h._opt),h.stopId=setInterval(()=>{var e=(new Date).getTime(),e=e-(r=r||e);100h._opt.videoBuffer)){h.delay<0&&h.debug.warn("audio worker",`loop() do not decode and delay is ${h.delay}, bufferList is `+t.length);break}t.shift(),h.doDecode(e)}else-1!==h.delay&&h.debug.log("audio worker","loop() bufferList is empty and reset delay"),h.resetAllDelay()}r=(new Date).getTime()},10)},doDecode:function(e){e.decoder.decode(e.payload,e.ts,e.isIFrame,e.cts)},getDelay:function(e){return e?(h.preDelayTimestamp&&h.preDelayTimestamp>e?1e3 timestamp is ${e} more than ${h.preDelayTimestamp-e}ms`):h.firstTimestamp?e&&(r=Date.now()-h.startTimestamp,t=e-h.firstTimestamp,h.delay=t<=r?r-t:t-r):(h.firstTimestamp=e,h.startTimestamp=Date.now(),h.delay=-1),h.preDelayTimestamp=e,h.delay):-1;var r,t},resetAllDelay:function(){h.firstTimestamp=null,h.startTimestamp=null,h.delay=-1,h.preDelayTimestamp=null},close:function(){h.debug.log("audio worker","close"),h.isDestroyed=!0,h.stopId&&(clearInterval(h.stopId),h.stopId=null),m&&(m.clear&&m.clear(),m=null),s=null,h._opt=e(),t=[],l=[],n(),a=null,i&&(i.close(1e3,"Client disconnecting"),i=null),h.resetAllDelay(),c=!1,d=[],f=0,p=0,postMessage({cmd:"closeEnd"})},fetchStream:function(e,r){h.debug.log("audio worker","fetchStream, url is "+e,"options:",JSON.stringify(r)),s=function(t){let n=0,o=A();return e=>{var r;"[object Number]"===Object.prototype.toString.call(e)&&(n+=e,1e3<=(r=(e=A())-o)&&(t(n/r*1e3),o=e,n=0))}}(e=>{postMessage({cmd:v,type:"streamRate",value:e})}),2===r.protocol?(a=new T(h.demuxFlv()),fetch(e,{signal:o.signal}).then(e=>{if(!(e.ok&&200<=e.status&&e.status<=299))return h.debug.warn("audio worker",`fetch response status is ${e.status} and ok is ${e.ok} and emit error and next abort()`),n(),void postMessage({cmd:v,type:_,value:`fetch response status is ${e.status} and ok is `+e.ok});if(postMessage({cmd:v,type:E}),"undefined"!=typeof WritableStream)e.body.pipeTo(new WritableStream({write:e=>{s(e.byteLength),a.write(e)},close:()=>{a=null,n(),postMessage({cmd:v,type:b,value:y})},abort:e=>{a=null,e.name!==S&&(n(),postMessage({cmd:v,type:_,value:e.toString()}))}}));else{const r=e.body.getReader(),t=()=>{r.read().then(e=>{var{done:e,value:r}=e;if(e)return a=null,n(),void postMessage({cmd:v,type:b,value:y});s(r.byteLength),a.write(r),t()}).catch(e=>{a=null,e.name!==S&&(n(),postMessage({cmd:v,type:_,value:e.toString()}))})};t()}}).catch(e=>{e.name!==S&&(n(),postMessage({cmd:v,type:_,value:e.toString()}),a=null)})):1===r.protocol&&(r.isFlv&&(a=new T(h.demuxFlv())),(i=new WebSocket(e)).binaryType="arraybuffer",i.onopen=()=>{h.debug.log("audio worker","fetchStream, WebsocketStream socket open"),postMessage({cmd:v,type:E}),postMessage({cmd:v,type:"websocketOpen"})},i.onclose=e=>{h.debug.log("audio worker","fetchStream, WebsocketStream socket close and code is "+e.code),1006===e.code&&h.debug.warn("audio worker","fetchStream, WebsocketStream socket close abnormally and code is "+e.code),a=null,postMessage({cmd:v,type:b,value:"websocket"})},i.onerror=e=>{h.debug.error("audio worker","fetchStream, WebsocketStream socket error",e),a=null,postMessage({cmd:v,type:"websocketError",value:e.isTrusted?"websocket user aborted":"websocket error"})},i.onmessage=e=>{s(e.data.byteLength),r.isFlv?a.write(e.data):h.demuxM7s(e.data)})},demuxFlv:function*(){yield 9;const e=new ArrayBuffer(4),r=new Uint8Array(e),t=new Uint32Array(e);for(;;){r[3]=0;const e=yield 15,i=e[4];r[0]=e[7],r[1]=e[6],r[2]=e[5];var n=t[0],o=(r[0]=e[10],r[1]=e[9],r[2]=e[8],r[3]=e[11],t[0]),n=(yield n).slice();8===i&&h.decode(n,{type:1,ts:o})}},decode:function(e,r){postMessage({cmd:v,type:"streamAbps",value:e.byteLength}),h.pushBuffer(e,r.ts)},setCodecAudio:function(e){var r=e[0]>>4;if(P(e)||7==r||8==r){h.debug.log("audio worker","setCodecAudio: init audio codec, codeId is "+r);e=r===k?e.slice(2):e.slice(1);m.setCodec(r,h._opt.sampleRate,e),c=!0;{const e=Number("1")||1;setTimeout(()=>{h.close(),postMessage({cmd:"workerEnd"})},60*e*60*1e3)}}else h.debug.warn("audio worker","setCodecAudio: hasInitAudioCodec is false, codecId is ",r)},pushBuffer:function(e,r){P(e)?h.decodeAudio(e,r):t.push({ts:r,payload:e,decoder:{decode:h.decodeAudio},isIFrame:!1})},decodeAudio:function(e,r){var t=e[0]>>4;c?m.decode(t===k?e.slice(2):e.slice(1),r):h.setCodecAudio(e)},demuxM7s:function(e){const r=new DataView(e),t=r.getUint32(1,!1);1===r.getUint8(0)&&h.decode(new Uint8Array(e,5),{type:1,ts:t})},audioInfo:function(e,r,t){postMessage({cmd:"audioCode",code:e}),postMessage({cmd:"initAudio",sampleRate:r,channels:t}),p=t},pcmData:function(o,i,s){if(h.isDestroyed)h.debug.log("audio worker","pcmData, decoder is destroyed and return");else{let r=i,t=[],e=0,n=h._opt.audioBufferSize;for(let e=0;e<2;e++){var a=u.HEAPU32[(o>>2)+e]>>2;t[e]=u.HEAPF32.subarray(a,a+r)}if(f){if(!(r>=(i=n-f)))return f+=r,l[0]=Float32Array.of(...l[0],...t[0]),void(2==p&&(l[1]=Float32Array.of(...l[1],...t[1])));d[0]=Float32Array.of(...l[0],...t[0].subarray(0,i)),2==p&&(d[1]=Float32Array.of(...l[1],...t[1].subarray(0,i))),postMessage({cmd:w,buffer:d,delay:h.delay,ts:s},d.map(e=>e.buffer)),e=i,r-=i}for(f=r;f>=n;f-=n)d[0]=t[0].slice(e,e+=n),2==p&&(d[1]=t[1].slice(e-n,e)),postMessage({cmd:w,buffer:d,delay:h.delay,ts:s},d.map(e=>e.buffer));f&&(l[0]=t[0].slice(e),2==p&&(l[1]=t[1].slice(e)))}},sendWebsocketMessage:function(e){i?1===i.readyState?i.send(e):h.debug.error("audio worker","socket is not open"):h.debug.error("audio worker","socket is null")},timeEnd:function(){}},m=(h.debug=new D(h),null);u.AudioDecoder&&(m=new u.AudioDecoder(h)),postMessage({cmd:"init"}),self.onmessage=function(e){var r=e.data;switch(r.cmd){case"init":try{h._opt=Object.assign(h._opt,JSON.parse(r.opt))}catch(e){}h.init();break;case"fetchStream":h.fetchStream(r.url,JSON.parse(r.opt));break;case"close":h.close();break;case"updateConfig":h.debug.log("audio worker","updateConfig",r.key,r.value),h._opt[r.key]=r.value;break;case"sendWsMessage":h.sendWebsocketMessage(r.message)}}}Date.now||(Date.now=function(){return(new Date).getTime()}),i.postRun=function(){p(i)}}); diff --git a/ui/decoder-pro-audio.js b/ui/decoder-pro-audio.js index 52317d6..219a36d 100644 --- a/ui/decoder-pro-audio.js +++ b/ui/decoder-pro-audio.js @@ -1 +1 @@ -!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,t=(e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-audio.js",document.baseURI).href,async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,i,s;(s=t).ready=new Promise(((e,t)=>{r=e,i=t})),(s=void 0!==s?s:{}).locateFile=function(e){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:e};var n,a,o,l=Object.assign({},s),d="./this.program",h="object"==typeof window,u="function"==typeof importScripts,f="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,c="";function p(e){return s.locateFile?s.locateFile(e,c):c+e}if(f){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-audio.js",document.baseURI).href),_=m("fs"),g=m("path");c=u?g.dirname(c)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-audio.js",document.baseURI).href)),n=(e,t)=>(e=J(e)?new URL(e):g.normalize(e),_.readFileSync(e,t?void 0:"utf8")),o=e=>{var t=n(e,!0);return t.buffer||(t=new Uint8Array(t)),t},a=function(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=J(e)?new URL(e):g.normalize(e),_.readFile(e,i?void 0:"utf8",((e,s)=>{e?r(e):t(i?s.buffer:s)}))},!s.thisProgram&&process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),s.inspect=()=>"[Emscripten Module object]"}else(h||u)&&(u?c=self.location.href:"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),e&&(c=e),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",n=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},u&&(o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),a=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)});var y,b,v=s.print||console.log.bind(console),w=s.printErr||console.error.bind(console);Object.assign(s,l),l=null,s.arguments&&s.arguments,s.thisProgram&&(d=s.thisProgram),s.quit&&s.quit,s.wasmBinary&&(y=s.wasmBinary),s.noExitRuntime,"object"!=typeof WebAssembly&&j("no native wasm support detected");var S,E,U,x,A,B,C,T,k=!1;function F(e,t){e||j(t)}function I(){var e=b.buffer;s.HEAP8=S=new Int8Array(e),s.HEAP16=U=new Int16Array(e),s.HEAPU8=E=new Uint8Array(e),s.HEAPU16=x=new Uint16Array(e),s.HEAP32=A=new Int32Array(e),s.HEAPU32=B=new Uint32Array(e),s.HEAPF32=C=new Float32Array(e),s.HEAPF64=T=new Float64Array(e)}var D=[],P=[],L=[];function z(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)N(s.preRun.shift());se(D)}function R(){s.noFSInit||Te.init.initialized||Te.init(),Te.ignorePermissions=!1,se(P)}function M(){if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)G(s.postRun.shift());se(L)}function N(e){D.unshift(e)}function O(e){P.unshift(e)}function G(e){L.unshift(e)}var $=0,H=null;function V(e){$++,s.monitorRunDependencies&&s.monitorRunDependencies($)}function W(e){if($--,s.monitorRunDependencies&&s.monitorRunDependencies($),0==$&&H){var t=H;H=null,t()}}function j(e){s.onAbort&&s.onAbort(e),w(e="Aborted("+e+")"),k=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}var Y,q,K,X="data:application/octet-stream;base64,";function Z(e){return e.startsWith(X)}function J(e){return e.startsWith("file://")}function Q(e){if(e==Y&&y)return new Uint8Array(y);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!y&&(h||u)){if("function"==typeof fetch&&!J(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(a)return new Promise(((t,r)=>{a(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),j(e)}))}function re(e,t,r,i){return e||"function"!=typeof WebAssembly.instantiateStreaming||Z(t)||J(t)||f||"function"!=typeof fetch?te(t,r,i):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(i,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),te(t,r,i)}))))}function ie(){var e={a:ti};function t(e,t){return ri=e.exports,b=ri.D,I(),Dt=ri.G,O(ri.E),W(),ri}if(V(),s.instantiateWasm)try{return s.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return re(y,Y,e,(function(e){t(e.instance)})).catch(i),{}}s.locateFile?Z(Y="decoder-pro-audio.wasm")||(Y=p(Y)):Y=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-audio.js",document.baseURI).href).href;var se=e=>{for(;e.length>0;)e.shift()(s)};function ne(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){B[this.ptr+4>>2]=e},this.get_type=function(){return B[this.ptr+4>>2]},this.set_destructor=function(e){B[this.ptr+8>>2]=e},this.get_destructor=function(){return B[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,S[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=S[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,S[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=S[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){B[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return B[this.ptr+16>>2]},this.get_exception_ptr=function(){if(li(this.get_type()))return B[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var ae=(e,t,r)=>{throw new ne(e).init(t,r),e},oe=e=>(A[si()>>2]=e,e),le={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,i=e.length-1;i>=0;i--){var s=e[i];"."===s?e.splice(i,1):".."===s?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=le.isAbs(e),r="/"===e.substr(-1);return(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=le.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=le.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return le.normalize(e.join("/"))},join2:(e,t)=>le.normalize(e+"/"+t)},de=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(f)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}j("initRandomDevice")},he=e=>(he=de())(e),ue={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:Te.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=le.isAbs(i)}return(t?"/":"")+(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=ue.resolve(e).substr(1),t=ue.resolve(t).substr(1);for(var i=r(e.split("/")),s=r(t.split("/")),n=Math.min(i.length,s.length),a=n,o=0;o{for(var i=t+r,s=t;e[s]&&!(s>=i);)++s;if(s-t>16&&e.buffer&&fe)return fe.decode(e.subarray(t,s));for(var n="";t>10,56320|1023&d)}}else n+=String.fromCharCode((31&a)<<6|o)}else n+=String.fromCharCode(a)}return n},pe=[],me=e=>{for(var t=0,r=0;r=55296&&i<=57343?(t+=4,++r):t+=3}return t},_e=(e,t,r,i)=>{if(!(i>0))return 0;for(var s=r,n=r+i-1,a=0;a=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),o<=127){if(r>=n)break;t[r++]=o}else if(o<=2047){if(r+1>=n)break;t[r++]=192|o>>6,t[r++]=128|63&o}else if(o<=65535){if(r+2>=n)break;t[r++]=224|o>>12,t[r++]=128|o>>6&63,t[r++]=128|63&o}else{if(r+3>=n)break;t[r++]=240|o>>18,t[r++]=128|o>>12&63,t[r++]=128|o>>6&63,t[r++]=128|63&o}}return t[r]=0,r-s};function ge(e,t,r){var i=r>0?r:me(e)+1,s=new Array(i),n=_e(e,s,0,s.length);return t&&(s.length=n),s}var ye=()=>{if(!pe.length){var e=null;if(f){var t=Buffer.alloc(256),r=0,i=process.stdin.fd;try{r=_.readSync(i,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ge(e,!0)}return pe.shift()},be={ttys:[],init(){},shutdown(){},register(e,t){be.ttys[e]={input:[],output:[],ops:t},Te.registerDevice(e,be.stream_ops)},stream_ops:{open(e){var t=be.ttys[e.node.rdev];if(!t)throw new Te.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,i,s){if(!e.tty||!e.tty.ops.get_char)throw new Te.ErrnoError(60);for(var n=0,a=0;aye(),put_char(e,t){null===t||10===t?(v(ce(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(v(ce(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(ce(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(ce(e.output,0)),e.output=[])}}},ve=e=>{j()},we={ops_table:null,mount:e=>we.createNode(null,"/",16895,0),createNode(e,t,r,i){if(Te.isBlkdev(r)||Te.isFIFO(r))throw new Te.ErrnoError(63);we.ops_table||(we.ops_table={dir:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,lookup:we.node_ops.lookup,mknod:we.node_ops.mknod,rename:we.node_ops.rename,unlink:we.node_ops.unlink,rmdir:we.node_ops.rmdir,readdir:we.node_ops.readdir,symlink:we.node_ops.symlink},stream:{llseek:we.stream_ops.llseek}},file:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:{llseek:we.stream_ops.llseek,read:we.stream_ops.read,write:we.stream_ops.write,allocate:we.stream_ops.allocate,mmap:we.stream_ops.mmap,msync:we.stream_ops.msync}},link:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,readlink:we.node_ops.readlink},stream:{}},chrdev:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:Te.chrdev_stream_ops}});var s=Te.createNode(e,t,r,i);return Te.isDir(s.mode)?(s.node_ops=we.ops_table.dir.node,s.stream_ops=we.ops_table.dir.stream,s.contents={}):Te.isFile(s.mode)?(s.node_ops=we.ops_table.file.node,s.stream_ops=we.ops_table.file.stream,s.usedBytes=0,s.contents=null):Te.isLink(s.mode)?(s.node_ops=we.ops_table.link.node,s.stream_ops=we.ops_table.link.stream):Te.isChrdev(s.mode)&&(s.node_ops=we.ops_table.chrdev.node,s.stream_ops=we.ops_table.chrdev.stream),s.timestamp=Date.now(),e&&(e.contents[t]=s,e.timestamp=s.timestamp),s},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Te.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Te.isDir(e.mode)?t.size=4096:Te.isFile(e.mode)?t.size=e.usedBytes:Te.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&we.resizeFileStorage(e,t.size)},lookup(e,t){throw Te.genericErrors[44]},mknod:(e,t,r,i)=>we.createNode(e,t,r,i),rename(e,t,r){if(Te.isDir(e.mode)){var i;try{i=Te.lookupNode(t,r)}catch(e){}if(i)for(var s in i.contents)throw new Te.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Te.lookupNode(e,t);for(var i in r.contents)throw new Te.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var i=we.createNode(e,t,41471,0);return i.link=r,i},readlink(e){if(!Te.isLink(e.mode))throw new Te.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,i,s){var n=e.node.contents;if(s>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-s,i);if(a>8&&n.subarray)t.set(n.subarray(s,s+a),r);else for(var o=0;o0||r+t(we.stream_ops.write(e,t,0,i,r,!1),0)}},Se=(e,t,r,i)=>{var s=i?"":`al ${e}`;a(e,(r=>{F(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),s&&W()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),s&&V()},Ee=(e,t,r,i,s,n)=>Te.createDataFile(e,t,r,i,s,n),Ue=s.preloadPlugins||[],xe=(e,t,r,i)=>{"undefined"!=typeof Browser&&Browser.init();var s=!1;return Ue.forEach((n=>{s||n.canHandle(t)&&(n.handle(e,t,r,i),s=!0)})),s},Ae=(e,t,r,i,s,n,a,o,l,d)=>{var h=t?ue.resolve(le.join2(e,t)):e;function u(r){function u(r){d&&d(),o||Ee(e,t,r,i,s,l),n&&n(),W()}xe(r,h,u,(()=>{a&&a(),W()}))||u(r)}V(),"string"==typeof r?Se(r,(e=>u(e)),a):u(r)},Be=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Ce=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Te={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=ue.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new Te.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),i=Te.root,s="/",n=0;n40)throw new Te.ErrnoError(32)}}return{path:s,node:i}},getPath(e){for(var t;;){if(Te.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,i=0;i>>0)%Te.nameTable.length},hashAddNode(e){var t=Te.hashName(e.parent.id,e.name);e.name_next=Te.nameTable[t],Te.nameTable[t]=e},hashRemoveNode(e){var t=Te.hashName(e.parent.id,e.name);if(Te.nameTable[t]===e)Te.nameTable[t]=e.name_next;else for(var r=Te.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Te.mayLookup(e);if(r)throw new Te.ErrnoError(r,e);for(var i=Te.hashName(e.id,t),s=Te.nameTable[i];s;s=s.name_next){var n=s.name;if(s.parent.id===e.id&&n===t)return s}return Te.lookup(e,t)},createNode(e,t,r,i){var s=new Te.FSNode(e,t,r,i);return Te.hashAddNode(s),s},destroyNode(e){Te.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Te.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=Te.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return Te.lookupNode(e,t),20}catch(e){}return Te.nodePermissions(e,"wx")},mayDelete(e,t,r){var i;try{i=Te.lookupNode(e,t)}catch(e){return e.errno}var s=Te.nodePermissions(e,"wx");if(s)return s;if(r){if(!Te.isDir(i.mode))return 54;if(Te.isRoot(i)||Te.getPath(i)===Te.cwd())return 10}else if(Te.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?Te.isLink(e.mode)?32:Te.isDir(e.mode)&&("r"!==Te.flagsToPermissionString(t)||512&t)?31:Te.nodePermissions(e,Te.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Te.MAX_OPEN_FDS;e++)if(!Te.streams[e])return e;throw new Te.ErrnoError(33)},getStreamChecked(e){var t=Te.getStream(e);if(!t)throw new Te.ErrnoError(8);return t},getStream:e=>Te.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Te.FSStream||(Te.FSStream=function(){this.shared={}},Te.FSStream.prototype={},Object.defineProperties(Te.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Te.FSStream,e),-1==t&&(t=Te.nextfd()),e.fd=t,Te.streams[t]=e,e},closeStream(e){Te.streams[e]=null},chrdev_stream_ops:{open(e){var t=Te.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Te.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Te.devices[e]={stream_ops:t}},getDevice:e=>Te.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Te.syncFSRequests++,Te.syncFSRequests>1&&w(`warning: ${Te.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Te.getMounts(Te.root.mount),i=0;function s(e){return Te.syncFSRequests--,t(e)}function n(e){if(e)return n.errored?void 0:(n.errored=!0,s(e));++i>=r.length&&s(null)}r.forEach((t=>{if(!t.type.syncfs)return n(null);t.type.syncfs(t,e,n)}))},mount(e,t,r){var i,s="/"===r,n=!r;if(s&&Te.root)throw new Te.ErrnoError(10);if(!s&&!n){var a=Te.lookupPath(r,{follow_mount:!1});if(r=a.path,i=a.node,Te.isMountpoint(i))throw new Te.ErrnoError(10);if(!Te.isDir(i.mode))throw new Te.ErrnoError(54)}var o={type:e,opts:t,mountpoint:r,mounts:[]},l=e.mount(o);return l.mount=o,o.root=l,s?Te.root=l:i&&(i.mounted=o,i.mount&&i.mount.mounts.push(o)),l},unmount(e){var t=Te.lookupPath(e,{follow_mount:!1});if(!Te.isMountpoint(t.node))throw new Te.ErrnoError(28);var r=t.node,i=r.mounted,s=Te.getMounts(i);Object.keys(Te.nameTable).forEach((e=>{for(var t=Te.nameTable[e];t;){var r=t.name_next;s.includes(t.mount)&&Te.destroyNode(t),t=r}})),r.mounted=null;var n=r.mount.mounts.indexOf(i);r.mount.mounts.splice(n,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var i=Te.lookupPath(e,{parent:!0}).node,s=le.basename(e);if(!s||"."===s||".."===s)throw new Te.ErrnoError(28);var n=Te.mayCreate(i,s);if(n)throw new Te.ErrnoError(n);if(!i.node_ops.mknod)throw new Te.ErrnoError(63);return i.node_ops.mknod(i,s,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Te.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Te.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),i="",s=0;s(void 0===r&&(r=t,t=438),t|=8192,Te.mknod(e,t,r)),symlink(e,t){if(!ue.resolve(e))throw new Te.ErrnoError(44);var r=Te.lookupPath(t,{parent:!0}).node;if(!r)throw new Te.ErrnoError(44);var i=le.basename(t),s=Te.mayCreate(r,i);if(s)throw new Te.ErrnoError(s);if(!r.node_ops.symlink)throw new Te.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename(e,t){var r,i,s=le.dirname(e),n=le.dirname(t),a=le.basename(e),o=le.basename(t);if(r=Te.lookupPath(e,{parent:!0}).node,i=Te.lookupPath(t,{parent:!0}).node,!r||!i)throw new Te.ErrnoError(44);if(r.mount!==i.mount)throw new Te.ErrnoError(75);var l,d=Te.lookupNode(r,a),h=ue.relative(e,n);if("."!==h.charAt(0))throw new Te.ErrnoError(28);if("."!==(h=ue.relative(t,s)).charAt(0))throw new Te.ErrnoError(55);try{l=Te.lookupNode(i,o)}catch(e){}if(d!==l){var u=Te.isDir(d.mode),f=Te.mayDelete(r,a,u);if(f)throw new Te.ErrnoError(f);if(f=l?Te.mayDelete(i,o,u):Te.mayCreate(i,o))throw new Te.ErrnoError(f);if(!r.node_ops.rename)throw new Te.ErrnoError(63);if(Te.isMountpoint(d)||l&&Te.isMountpoint(l))throw new Te.ErrnoError(10);if(i!==r&&(f=Te.nodePermissions(r,"w")))throw new Te.ErrnoError(f);Te.hashRemoveNode(d);try{r.node_ops.rename(d,i,o)}catch(e){throw e}finally{Te.hashAddNode(d)}}},rmdir(e){var t=Te.lookupPath(e,{parent:!0}).node,r=le.basename(e),i=Te.lookupNode(t,r),s=Te.mayDelete(t,r,!0);if(s)throw new Te.ErrnoError(s);if(!t.node_ops.rmdir)throw new Te.ErrnoError(63);if(Te.isMountpoint(i))throw new Te.ErrnoError(10);t.node_ops.rmdir(t,r),Te.destroyNode(i)},readdir(e){var t=Te.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Te.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Te.lookupPath(e,{parent:!0}).node;if(!t)throw new Te.ErrnoError(44);var r=le.basename(e),i=Te.lookupNode(t,r),s=Te.mayDelete(t,r,!1);if(s)throw new Te.ErrnoError(s);if(!t.node_ops.unlink)throw new Te.ErrnoError(63);if(Te.isMountpoint(i))throw new Te.ErrnoError(10);t.node_ops.unlink(t,r),Te.destroyNode(i)},readlink(e){var t=Te.lookupPath(e).node;if(!t)throw new Te.ErrnoError(44);if(!t.node_ops.readlink)throw new Te.ErrnoError(28);return ue.resolve(Te.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Te.lookupPath(e,{follow:!t}).node;if(!r)throw new Te.ErrnoError(44);if(!r.node_ops.getattr)throw new Te.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Te.stat(e,!0),chmod(e,t,r){var i;if(!(i="string"==typeof e?Te.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod(e,t){Te.chmod(e,t,!0)},fchmod(e,t){var r=Te.getStreamChecked(e);Te.chmod(r.node,t)},chown(e,t,r,i){var s;if(!(s="string"==typeof e?Te.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);s.node_ops.setattr(s,{timestamp:Date.now()})},lchown(e,t,r){Te.chown(e,t,r,!0)},fchown(e,t,r){var i=Te.getStreamChecked(e);Te.chown(i.node,t,r)},truncate(e,t){if(t<0)throw new Te.ErrnoError(28);var r;if(!(r="string"==typeof e?Te.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);if(Te.isDir(r.mode))throw new Te.ErrnoError(31);if(!Te.isFile(r.mode))throw new Te.ErrnoError(28);var i=Te.nodePermissions(r,"w");if(i)throw new Te.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Te.getStreamChecked(e);if(0==(2097155&r.flags))throw new Te.ErrnoError(28);Te.truncate(r.node,t)},utime(e,t,r){var i=Te.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Te.ErrnoError(44);var i;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Be(t):t)?4095&r|32768:0,"object"==typeof e)i=e;else{e=le.normalize(e);try{i=Te.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var n=!1;if(64&t)if(i){if(128&t)throw new Te.ErrnoError(20)}else i=Te.mknod(e,r,0),n=!0;if(!i)throw new Te.ErrnoError(44);if(Te.isChrdev(i.mode)&&(t&=-513),65536&t&&!Te.isDir(i.mode))throw new Te.ErrnoError(54);if(!n){var a=Te.mayOpen(i,t);if(a)throw new Te.ErrnoError(a)}512&t&&!n&&Te.truncate(i,0),t&=-131713;var o=Te.createStream({node:i,path:Te.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return o.stream_ops.open&&o.stream_ops.open(o),!s.logReadFiles||1&t||(Te.readFiles||(Te.readFiles={}),e in Te.readFiles||(Te.readFiles[e]=1)),o},close(e){if(Te.isClosed(e))throw new Te.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Te.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Te.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Te.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,i,s){if(i<0||s<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(1==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.read)throw new Te.ErrnoError(28);var n=void 0!==s;if(n){if(!e.seekable)throw new Te.ErrnoError(70)}else s=e.position;var a=e.stream_ops.read(e,t,r,i,s);return n||(e.position+=a),a},write(e,t,r,i,s,n){if(i<0||s<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(0==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.write)throw new Te.ErrnoError(28);e.seekable&&1024&e.flags&&Te.llseek(e,0,2);var a=void 0!==s;if(a){if(!e.seekable)throw new Te.ErrnoError(70)}else s=e.position;var o=e.stream_ops.write(e,t,r,i,s,n);return a||(e.position+=o),o},allocate(e,t,r){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(t<0||r<=0)throw new Te.ErrnoError(28);if(0==(2097155&e.flags))throw new Te.ErrnoError(8);if(!Te.isFile(e.node.mode)&&!Te.isDir(e.node.mode))throw new Te.ErrnoError(43);if(!e.stream_ops.allocate)throw new Te.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,i,s){if(0!=(2&i)&&0==(2&s)&&2!=(2097155&e.flags))throw new Te.ErrnoError(2);if(1==(2097155&e.flags))throw new Te.ErrnoError(2);if(!e.stream_ops.mmap)throw new Te.ErrnoError(43);return e.stream_ops.mmap(e,t,r,i,s)},msync:(e,t,r,i,s)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,s):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Te.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,i=Te.open(e,t.flags),s=Te.stat(e).size,n=new Uint8Array(s);return Te.read(i,n,0,s,0),"utf8"===t.encoding?r=ce(n,0):"binary"===t.encoding&&(r=n),Te.close(i),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var i=Te.open(e,r.flags,r.mode);if("string"==typeof t){var s=new Uint8Array(me(t)+1),n=_e(t,s,0,s.length);Te.write(i,s,0,n,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Te.write(i,t,0,t.byteLength,void 0,r.canOwn)}Te.close(i)},cwd:()=>Te.currentPath,chdir(e){var t=Te.lookupPath(e,{follow:!0});if(null===t.node)throw new Te.ErrnoError(44);if(!Te.isDir(t.node.mode))throw new Te.ErrnoError(54);var r=Te.nodePermissions(t.node,"x");if(r)throw new Te.ErrnoError(r);Te.currentPath=t.path},createDefaultDirectories(){Te.mkdir("/tmp"),Te.mkdir("/home"),Te.mkdir("/home/web_user")},createDefaultDevices(){Te.mkdir("/dev"),Te.registerDevice(Te.makedev(1,3),{read:()=>0,write:(e,t,r,i,s)=>i}),Te.mkdev("/dev/null",Te.makedev(1,3)),be.register(Te.makedev(5,0),be.default_tty_ops),be.register(Te.makedev(6,0),be.default_tty1_ops),Te.mkdev("/dev/tty",Te.makedev(5,0)),Te.mkdev("/dev/tty1",Te.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=he(e).byteLength),e[--t]);Te.createDevice("/dev","random",r),Te.createDevice("/dev","urandom",r),Te.mkdir("/dev/shm"),Te.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Te.mkdir("/proc");var e=Te.mkdir("/proc/self");Te.mkdir("/proc/self/fd"),Te.mount({mount(){var t=Te.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,i=Te.getStreamChecked(r),s={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return s.parent=s,s}},t}},{},"/proc/self/fd")},createStandardStreams(){s.stdin?Te.createDevice("/dev","stdin",s.stdin):Te.symlink("/dev/tty","/dev/stdin"),s.stdout?Te.createDevice("/dev","stdout",null,s.stdout):Te.symlink("/dev/tty","/dev/stdout"),s.stderr?Te.createDevice("/dev","stderr",null,s.stderr):Te.symlink("/dev/tty1","/dev/stderr"),Te.open("/dev/stdin",0),Te.open("/dev/stdout",1),Te.open("/dev/stderr",1)},ensureErrnoError(){Te.ErrnoError||(Te.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Te.ErrnoError.prototype=new Error,Te.ErrnoError.prototype.constructor=Te.ErrnoError,[44].forEach((e=>{Te.genericErrors[e]=new Te.ErrnoError(e),Te.genericErrors[e].stack=""})))},staticInit(){Te.ensureErrnoError(),Te.nameTable=new Array(4096),Te.mount(we,{},"/"),Te.createDefaultDirectories(),Te.createDefaultDevices(),Te.createSpecialDirectories(),Te.filesystems={MEMFS:we}},init(e,t,r){Te.init.initialized=!0,Te.ensureErrnoError(),s.stdin=e||s.stdin,s.stdout=t||s.stdout,s.stderr=r||s.stderr,Te.createStandardStreams()},quit(){Te.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},n.prototype.setDataGetter=function(e){this.getter=e},n.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),s=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,n=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;s||(a=i);var o=this;o.setDataGetter((e=>{var t=e*a,s=(e+1)*a-1;if(s=Math.min(s,i-1),void 0===o.chunks[e]&&(o.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var s=new XMLHttpRequest;if(s.open("GET",r,!1),i!==a&&s.setRequestHeader("Range","bytes="+e+"-"+t),s.responseType="arraybuffer",s.overrideMimeType&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.send(null),!(s.status>=200&&s.status<300||304===s.status))throw new Error("Couldn't load "+r+". Status: "+s.status);return void 0!==s.response?new Uint8Array(s.response||[]):ge(s.responseText||"",!0)})(t,s)),void 0===o.chunks[e])throw new Error("doXHR failed!");return o.chunks[e]})),!n&&i||(a=i=1,i=this.getter(0).length,a=i,v("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!u)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new n;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var o={isDevice:!1,contents:a}}else o={isDevice:!1,url:r};var l=Te.createFile(e,t,o,i,s);o.contents?l.contents=o.contents:o.url&&(l.contents=null,l.url=o.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var d={};function h(e,t,r,i,s){var n=e.node.contents;if(s>=n.length)return 0;var a=Math.min(n.length-s,i);if(n.slice)for(var o=0;o{var t=l.stream_ops[e];d[e]=function(){return Te.forceLoadFile(l),t.apply(null,arguments)}})),d.read=(e,t,r,i,s)=>(Te.forceLoadFile(l),h(e,t,r,i,s)),d.mmap=(e,t,r,i,s)=>{Te.forceLoadFile(l);var n=ve();if(!n)throw new Te.ErrnoError(48);return h(e,S,n,t,r),{ptr:n,allocated:!0}},l.stream_ops=d,l}},ke=(e,t)=>e?ce(E,e,t):"",Fe={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(le.isAbs(t))return t;var i;if(i=-100===e?Te.cwd():Fe.getStreamFromFD(e).path,0==t.length){if(!r)throw new Te.ErrnoError(44);return i}return le.join2(i,t)},doStat(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&le.normalize(t)!==le.normalize(Te.getPath(e.node)))return-54;throw e}A[r>>2]=i.dev,A[r+4>>2]=i.mode,B[r+8>>2]=i.nlink,A[r+12>>2]=i.uid,A[r+16>>2]=i.gid,A[r+20>>2]=i.rdev,K=[i.size>>>0,(q=i.size,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+24>>2]=K[0],A[r+28>>2]=K[1],A[r+32>>2]=4096,A[r+36>>2]=i.blocks;var s=i.atime.getTime(),n=i.mtime.getTime(),a=i.ctime.getTime();return K=[Math.floor(s/1e3)>>>0,(q=Math.floor(s/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+40>>2]=K[0],A[r+44>>2]=K[1],B[r+48>>2]=s%1e3*1e3,K=[Math.floor(n/1e3)>>>0,(q=Math.floor(n/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+56>>2]=K[0],A[r+60>>2]=K[1],B[r+64>>2]=n%1e3*1e3,K=[Math.floor(a/1e3)>>>0,(q=Math.floor(a/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+72>>2]=K[0],A[r+76>>2]=K[1],B[r+80>>2]=a%1e3*1e3,K=[i.ino>>>0,(q=i.ino,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+88>>2]=K[0],A[r+92>>2]=K[1],0},doMsync(e,t,r,i,s){if(!Te.isFile(t.node.mode))throw new Te.ErrnoError(43);if(2&i)return 0;var n=E.slice(e,e+r);Te.msync(t,n,s,r,i)},varargs:void 0,get(){var e=A[+Fe.varargs>>2];return Fe.varargs+=4,e},getp:()=>Fe.get(),getStr:e=>ke(e),getStreamFromFD:e=>Te.getStreamChecked(e)};function Ie(e,t,r){Fe.varargs=r;try{var i=Fe.getStreamFromFD(e);switch(t){case 0:if((s=Fe.get())<0)return-28;for(;Te.streams[s];)s++;return Te.createStream(i,s).fd;case 1:case 2:case 6:case 7:return 0;case 3:return i.flags;case 4:var s=Fe.get();return i.flags|=s,0;case 5:return s=Fe.getp(),U[s+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return oe(28),-1}}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}}function De(e,t,r,i){Fe.varargs=i;try{t=Fe.getStr(t),t=Fe.calculateAt(e,t);var s=i?Fe.get():0;return Te.open(t,r,s).fd}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}}var Pe,Le,ze,Re=(e,t,r,i,s)=>{},Me=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Pe=e},Ne=e=>{for(var t="",r=e;E[r];)t+=Pe[E[r++]];return t},Oe={},Ge={},$e={},He=e=>{throw new Le(e)},Ve=e=>{throw new ze(e)},We=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Ve("Mismatched type converter count");for(var s=0;s{Ge.hasOwnProperty(e)?s[t]=Ge[e]:(n.push(e),Oe.hasOwnProperty(e)||(Oe[e]=[]),Oe[e].push((()=>{s[t]=Ge[e],++a===n.length&&i(s)})))})),0===n.length&&i(s)};function je(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i=t.name;if(e||He(`type "${i}" must have a positive integer typeid pointer`),Ge.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;He(`Cannot register type '${i}' twice`)}if(Ge[e]=t,delete $e[e],Oe.hasOwnProperty(e)){var s=Oe[e];delete Oe[e],s.forEach((e=>e()))}}function Ye(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return je(e,t,r)}var qe,Ke=8,Xe=(e,t,r,i)=>{Ye(e,{name:t=Ne(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:Ke,readValueFromPointer:function(e){return this.fromWireType(E[e])},destructorFunction:null})},Ze=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Je=e=>{He(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},it=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=it(e,t,r.baseClass);return null===i?null:r.downcast(i)},st={},nt=()=>Object.keys(ut).length,at=()=>{var e=[];for(var t in ut)ut.hasOwnProperty(t)&&e.push(ut[t]);return e},ot=[],lt=()=>{for(;ot.length;){var e=ot.pop();e.$$.deleteScheduled=!1,e.delete()}},dt=e=>{qe=e,ot.length&&qe&&qe(lt)},ht=()=>{s.getInheritedInstanceCount=nt,s.getLiveInheritedInstances=at,s.flushPendingDeletes=lt,s.setDelayFunction=dt},ut={},ft=(e,t)=>{for(void 0===t&&He("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ct=(e,t)=>(t=ft(e,t),ut[t]),pt=(e,t)=>(t.ptrType&&t.ptr||Ve("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ve("Both smartPtrType and smartPtr must be specified"),t.count={value:1},_t(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ct(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function s(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var n,a=this.registeredClass.getActualType(t),o=st[a];if(!o)return s.call(this);n=this.isConst?o.constPointerType:o.pointerType;var l=it(t,this.registeredClass,n.registeredClass);return null===l?s.call(this):this.isSmartPointer?pt(n.registeredClass.instancePrototype,{ptrType:n,ptr:l,smartPtrType:this,smartPtr:e}):pt(n.registeredClass.instancePrototype,{ptrType:n,ptr:l})}var _t=e=>"undefined"==typeof FinalizationRegistry?(_t=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),_t=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),_t(e)),gt=()=>{Object.assign(yt.prototype,{isAliasOf(e){if(!(this instanceof yt))return!1;if(!(e instanceof yt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)s=i.upcast(s),i=i.baseClass;return t===i&&r===s},clone(){if(this.$$.ptr||Je(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=_t(Object.create(Object.getPrototypeOf(this),{$$:{value:Ze(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),ot.push(this),1===ot.length&&qe&&qe(lt),this.$$.deleteScheduled=!0,this}})};function yt(){}var bt=48,vt=57,wt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=bt&&t<=vt?`_${e}`:e};function St(e,t){return{[e=wt(e)]:function(){return t.apply(this,arguments)}}[e]}var Et=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||He(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}},Ut=(e,t,r)=>{s.hasOwnProperty(e)?((void 0===r||void 0!==s[e].overloadTable&&void 0!==s[e].overloadTable[r])&&He(`Cannot register public name '${e}' twice`),Et(s,e,e),s.hasOwnProperty(r)&&He(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),s[e].overloadTable[r]=t):(s[e]=t,void 0!==r&&(s[e].numArguments=r))};function xt(e,t,r,i,s,n,a,o){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=s,this.getActualType=n,this.upcast=a,this.downcast=o,this.pureVirtualFunctions=[]}var At=(e,t,r)=>{for(;t!==r;)t.upcast||He(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Bt(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${or(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Ct(e,t){var r;if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||He(`Cannot pass "${or(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=At(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&He("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var s=t.clone();r=this.rawShare(r,sr.toHandle((()=>s.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:He("Unsupporting sharing policy")}return r}function Tt(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${or(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function kt(e){return this.fromWireType(B[e>>2])}var Ft=()=>{Object.assign(It.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Ke,readValueFromPointer:kt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function It(e,t,r,i,s,n,a,o,l,d,h){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=s,this.pointeeType=n,this.sharingPolicy=a,this.rawGetPointee=o,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=h,s||void 0!==t.baseClass?this.toWireType=Ct:i?(this.toWireType=Bt,this.destructorFunction=null):(this.toWireType=Tt,this.destructorFunction=null)}var Dt,Pt,Lt=(e,t,r)=>{s.hasOwnProperty(e)||Ve("Replacing nonexistant public symbol"),void 0!==s[e].overloadTable&&void 0!==r?s[e].overloadTable[r]=t:(s[e]=t,s[e].argCount=r)},zt=(e,t,r)=>{var i=s["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)},Rt=[],Mt=e=>{var t=Rt[e];return t||(e>=Rt.length&&(Rt.length=e+1),Rt[e]=t=Dt.get(e)),t},Nt=(e,t,r)=>e.includes("j")?zt(e,t,r):Mt(t).apply(null,r),Ot=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Nt(e,t,r)}},Gt=(e,t)=>{var r=(e=Ne(e)).includes("j")?Ot(e,t):Mt(t);return"function"!=typeof r&&He(`unknown function pointer with signature ${e}: ${t}`),r},$t=(e,t)=>{var r=St(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Ht=e=>{var t=ni(e),r=Ne(t);return ii(t),r},Vt=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||Ge[t]||($e[t]?$e[t].forEach(e):(r.push(t),i[t]=!0))})),new Pt(`${e}: `+r.map(Ht).join([", "]))},Wt=(e,t,r,i,s,n,a,o,l,d,h,u,f)=>{h=Ne(h),n=Gt(s,n),o&&(o=Gt(a,o)),d&&(d=Gt(l,d)),f=Gt(u,f);var c=wt(h);Ut(c,(function(){Vt(`Cannot construct ${h} due to unbound types`,[i])})),We([e,t,r],i?[i]:[],(function(t){var r,s;t=t[0],s=i?(r=t.registeredClass).instancePrototype:yt.prototype;var a=St(c,(function(){if(Object.getPrototypeOf(this)!==l)throw new Le("Use 'new' to construct "+h);if(void 0===u.constructor_body)throw new Le(h+" has no accessible constructor");var e=u.constructor_body[arguments.length];if(void 0===e)throw new Le(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(u.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(s,{constructor:{value:a}});a.prototype=l;var u=new xt(h,a,l,f,r,n,o,d);u.baseClass&&(void 0===u.baseClass.__derivedClasses&&(u.baseClass.__derivedClasses=[]),u.baseClass.__derivedClasses.push(u));var p=new It(h,u,!0,!1,!1),m=new It(h+"*",u,!1,!1,!1),_=new It(h+" const*",u,!1,!0,!1);return st[e]={pointerType:m,constPointerType:_},Lt(c,a),[p,m,_]}))},jt=(e,t)=>{for(var r=[],i=0;i>2]);return r},Yt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function qt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=St(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,s=e.apply(i,t);return s instanceof Object?s:i}function Kt(e,t,r,i,s,n){var a=t.length;a<2&&He("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==t[1]&&null!==r,l=!1,d=1;d0?", ":"")+f),c+=(h||n?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",l)c+="runDestructors(destructors);\n";else for(d=o?1:2;d{var a=jt(t,r);s=Gt(i,s),We([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Le(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Vt(`Cannot construct ${e.name} due to unbound types`,a)},We([],a,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Kt(r,i,null,s,n),[]))),[]}))},Zt=(e,t,r,i,s,n,a,o,l)=>{var d=jt(r,i);t=Ne(t),n=Gt(s,n),We([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function s(){Vt(`Cannot call ${i} due to unbound types`,d)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),o&&e.registeredClass.pureVirtualFunctions.push(t);var h=e.registeredClass.instancePrototype,u=h[t];return void 0===u||void 0===u.overloadTable&&u.className!==e.name&&u.argCount===r-2?(s.argCount=r-2,s.className=e.name,h[t]=s):(Et(h,t,i),h[t].overloadTable[r-2]=s),We([],d,(function(s){var o=Kt(i,s,e,n,a,l);return void 0===h[t].overloadTable?(o.argCount=r-2,h[t]=o):h[t].overloadTable[r-2]=o,[]})),[]}))};function Jt(){Object.assign(Qt.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Qt(){this.allocated=[void 0],this.freelist=[]}var er=new Qt,tr=e=>{e>=er.reserved&&0==--er.get(e).refcount&&er.free(e)},rr=()=>{for(var e=0,t=er.reserved;t{er.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),er.reserved=er.allocated.length,s.count_emval_handles=rr},sr={toValue:e=>(e||He("Cannot use deleted val. handle = "+e),er.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return er.allocate({refcount:1,value:e})}}};function nr(e){return this.fromWireType(A[e>>2])}var ar=(e,t)=>{Ye(e,{name:t=Ne(t),fromWireType:e=>{var t=sr.toValue(e);return tr(e),t},toWireType:(e,t)=>sr.toHandle(t),argPackAdvance:Ke,readValueFromPointer:nr,destructorFunction:null})},or=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},lr=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(C[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},dr=(e,t,r)=>{Ye(e,{name:t=Ne(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Ke,readValueFromPointer:lr(t,r),destructorFunction:null})},hr=(e,t,r)=>{switch(t){case 1:return r?e=>S[e>>0]:e=>E[e>>0];case 2:return r?e=>U[e>>1]:e=>x[e>>1];case 4:return r?e=>A[e>>2]:e=>B[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},ur=(e,t,r,i,s)=>{t=Ne(t);var n=e=>e;if(0===i){var a=32-8*r;n=e=>e<>>a}var o=t.includes("unsigned");Ye(e,{name:t,fromWireType:n,toWireType:o?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Ke,readValueFromPointer:hr(t,r,0!==i),destructorFunction:null})},fr=(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function s(e){var t=B[e>>2],r=B[e+4>>2];return new i(S.buffer,r,t)}Ye(e,{name:r=Ne(r),fromWireType:s,argPackAdvance:Ke,readValueFromPointer:s},{ignoreDuplicateRegistrations:!0})},cr=(e,t,r)=>_e(e,E,t,r),pr=(e,t)=>{var r="std::string"===(t=Ne(t));Ye(e,{name:t,fromWireType(e){var t,i=B[e>>2],s=e+4;if(r)for(var n=s,a=0;a<=i;++a){var o=s+a;if(a==i||0==E[o]){var l=ke(n,o-n);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),n=o+1}}else{var d=new Array(i);for(a=0;a>2]=i,r&&s)cr(t,a,i+1);else if(s)for(var o=0;o255&&(ii(a),He("String has UTF-16 code units that do not fit in 8 bits")),E[a+o]=l}else for(o=0;o{for(var r=e,i=r>>1,s=i+t/2;!(i>=s)&&x[i];)++i;if((r=i<<1)-e>32&&mr)return mr.decode(E.subarray(e,r));for(var n="",a=0;!(a>=t/2);++a){var o=U[e+2*a>>1];if(0==o)break;n+=String.fromCharCode(o)}return n},gr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,s=(r-=2)<2*e.length?r/2:e.length,n=0;n>1]=a,t+=2}return U[t>>1]=0,t-i},yr=e=>2*e.length,br=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var s=A[e+4*r>>2];if(0==s)break;if(++r,s>=65536){var n=s-65536;i+=String.fromCharCode(55296|n>>10,56320|1023&n)}else i+=String.fromCharCode(s)}return i},vr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,s=i+r-4,n=0;n=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++n)),A[t>>2]=a,(t+=4)+4>s)break}return A[t>>2]=0,t-i},wr=e=>{for(var t=0,r=0;r=55296&&i<=57343&&++r,t+=4}return t},Sr=(e,t,r)=>{var i,s,n,a,o;r=Ne(r),2===t?(i=_r,s=gr,a=yr,n=()=>x,o=1):4===t&&(i=br,s=vr,a=wr,n=()=>B,o=2),Ye(e,{name:r,fromWireType:e=>{for(var r,s=B[e>>2],a=n(),l=e+4,d=0;d<=s;++d){var h=e+4+d*t;if(d==s||0==a[h>>o]){var u=i(l,h-l);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),l=h+t}}return ii(e),r},toWireType:(e,i)=>{"string"!=typeof i&&He(`Cannot pass non-string to C++ string type ${r}`);var n=a(i),l=oi(4+n+t);return B[l>>2]=n>>o,s(i,l+4,n+t),null!==e&&e.push(ii,l),l},argPackAdvance:Ke,readValueFromPointer:nr,destructorFunction(e){ii(e)}})},Er=(e,t)=>{Ye(e,{isVoid:!0,name:t=Ne(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Ur={},xr=e=>{var t=Ur[e];return void 0===t?Ne(e):t},Ar=[],Br=(e,t,r,i)=>{(e=Ar[e])(t=sr.toValue(t),r=xr(r),null,i)},Cr=e=>{var t=Ar.length;return Ar.push(e),t},Tr=(e,t)=>{var r=Ge[e];return void 0===r&&He(t+" has unknown type "+Ht(e)),r},kr=(e,t)=>{for(var r=new Array(e),i=0;i>2],"parameter "+i);return r},Fr={},Ir=(e,t)=>{var r=kr(e,t),i=r[0],s=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",n=Fr[s];if(void 0!==n)return n;for(var a=["retType"],o=[i],l="",d=0;dt+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Pr=()=>{j("")},Lr=()=>Date.now(),zr=(e,t,r)=>E.copyWithin(e,t,t+r),Rr=e=>{j("OOM")},Mr=e=>{E.length,Rr()},Nr={},Or=()=>d||"./this.program",Gr=()=>{if(!Gr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Or()};for(var t in Nr)void 0===Nr[t]?delete e[t]:e[t]=Nr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Gr.strings=r}return Gr.strings},$r=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);S[t>>0]=0},Hr=(e,t)=>{var r=0;return Gr().forEach(((i,s)=>{var n=t+r;B[e+4*s>>2]=n,$r(i,n),r+=i.length+1})),0},Vr=(e,t)=>{var r=Gr();B[e>>2]=r.length;var i=0;return r.forEach((e=>i+=e.length+1)),B[t>>2]=i,0};function Wr(e){try{var t=Fe.getStreamFromFD(e);return Te.close(t),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}function jr(e,t){try{var r=Fe.getStreamFromFD(e),i=r.tty?2:Te.isDir(r.mode)?3:Te.isLink(r.mode)?7:4;return S[t>>0]=i,U[t+2>>1]=0,K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[t+8>>2]=K[0],A[t+12>>2]=K[1],K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[t+16>>2]=K[0],A[t+20>>2]=K[1],0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var Yr=(e,t,r,i)=>{for(var s=0,n=0;n>2],o=B[t+4>>2];t+=8;var l=Te.read(e,S,a,o,i);if(l<0)return-1;if(s+=l,l>2]=n,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}function Kr(e,t,r,i,s){var n=Dr(t,r);try{if(isNaN(n))return 61;var a=Fe.getStreamFromFD(e);return Te.llseek(a,n,i),K=[a.position>>>0,(q=a.position,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[s>>2]=K[0],A[s+4>>2]=K[1],a.getdents&&0===n&&0===i&&(a.getdents=null),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var Xr=(e,t,r,i)=>{for(var s=0,n=0;n>2],o=B[t+4>>2];t+=8;var l=Te.write(e,S,a,o,i);if(l<0)return-1;s+=l,void 0!==i&&(i+=l)}return s};function Zr(e,t,r,i){try{var s=Fe.getStreamFromFD(e),n=Xr(s,t,r);return B[i>>2]=n,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var Jr=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Te.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Qr=365,ei=146;Object.defineProperties(Jr.prototype,{read:{get:function(){return(this.mode&Qr)===Qr},set:function(e){e?this.mode|=Qr:this.mode&=~Qr}},write:{get:function(){return(this.mode&ei)===ei},set:function(e){e?this.mode|=ei:this.mode&=~ei}},isFolder:{get:function(){return Te.isDir(this.mode)}},isDevice:{get:function(){return Te.isChrdev(this.mode)}}}),Te.FSNode=Jr,Te.createPreloadedFile=Ae,Te.staticInit(),Me(),Le=s.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},ze=s.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},gt(),ht(),Ft(),Pt=s.UnboundTypeError=$t(Error,"UnboundTypeError"),Jt(),ir();var ti={p:ae,B:Ie,v:De,t:Re,n:Xe,r:Wt,q:Xt,f:Zt,C:ar,m:dr,c:ur,b:fr,l:pr,h:Sr,o:Er,d:Br,i:tr,e:Ir,a:Pr,g:Lr,z:zr,u:Mr,x:Hr,y:Vr,k:Wr,w:jr,A:qr,s:Kr,j:Zr},ri=ie(),ii=e=>(ii=ri.F)(e),si=()=>(si=ri.H)(),ni=e=>(ni=ri.I)(e);s.__embind_initialize_bindings=()=>(s.__embind_initialize_bindings=ri.J)();var ai,oi=e=>(oi=ri.K)(e),li=e=>(li=ri.M)(e);function di(){function e(){ai||(ai=!0,s.calledRun=!0,k||(R(),r(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),M()))}$>0||(z(),$>0||(s.setStatus?(s.setStatus("Running..."),setTimeout((function(){setTimeout((function(){s.setStatus("")}),1),e()}),1)):e()))}if(s.dynCall_viiijj=(e,t,r,i,n,a,o,l)=>(s.dynCall_viiijj=ri.N)(e,t,r,i,n,a,o,l),s.dynCall_jij=(e,t,r,i)=>(s.dynCall_jij=ri.O)(e,t,r,i),s.dynCall_jii=(e,t,r)=>(s.dynCall_jii=ri.P)(e,t,r),s.dynCall_jiji=(e,t,r,i,n)=>(s.dynCall_jiji=ri.Q)(e,t,r,i,n),H=function e(){ai||di(),ai||(H=e)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return di(),t.ready}),r=1e-6,s="undefined"!=typeof Float32Array?Float32Array:Array;function n(){var e=new s(16);return s!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function a(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var o,l=function(e,t,r,i,s,n,a){var o=1/(t-r),l=1/(i-s),d=1/(n-a);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*d,e[11]=0,e[12]=(t+r)*o,e[13]=(s+i)*l,e[14]=(a+n)*d,e[15]=1,e};function d(e,t,r){var i=new s(3);return i[0]=e,i[1]=t,i[2]=r,i}o=new s(3),s!=Float32Array&&(o[0]=0,o[1]=0,o[2]=0);var h=(e,t)=>{t&&e.pixelStorei(e.UNPACK_ALIGNMENT,1);const i=function(){const t=m(e.VERTEX_SHADER,"\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n "),r=m(e.FRAGMENT_SHADER,"\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),i=e.createProgram();if(e.attachShader(i,t),e.attachShader(i,r),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))return console.log("Unable to initialize the shader program: "+e.getProgramInfoLog(i)),null;return i}();let s={program:i,attribLocations:{vertexPosition:e.getAttribLocation(i,"aVertexPosition"),texturePosition:e.getAttribLocation(i,"aTexturePosition")},uniformLocations:{projectionMatrix:e.getUniformLocation(i,"uProjectionMatrix"),modelMatrix:e.getUniformLocation(i,"uModelMatrix"),viewMatrix:e.getUniformLocation(i,"uViewMatrix"),rgbatexture:e.getUniformLocation(i,"rgbaTexture"),ytexture:e.getUniformLocation(i,"yTexture"),utexture:e.getUniformLocation(i,"uTexture"),vtexture:e.getUniformLocation(i,"vTexture"),isyuv:e.getUniformLocation(i,"isyuv")}},o=function(){const t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e.STATIC_DRAW);var r=[];r=r.concat([0,1],[1,1],[1,0],[0,0]);const i=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,new Float32Array(r),e.STATIC_DRAW);const s=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,s);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{position:t,texPosition:i,indices:s}}(),h=p(),u=p(),f=p(),c=p();function p(){let t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function m(t,r){const i=e.createShader(t);return e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)?i:(console.log("An error occurred compiling the shaders: "+e.getShaderInfoLog(i)),e.deleteShader(i),null)}function _(t,i){e.viewport(0,0,t,i),e.clearColor(0,0,0,0),e.clearDepth(1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT);const h=n();l(h,-1,1,-1,1,.1,100);const p=n();a(p);const m=n();!function(e,t,i,s){var n,o,l,d,h,u,f,c,p,m,_=t[0],g=t[1],y=t[2],b=s[0],v=s[1],w=s[2],S=i[0],E=i[1],U=i[2];Math.abs(_-S)>1,(1&r)<<7|i<<3])}function ot(e){return lt(e)&&e[1]===qe}function lt(e){return e[0]>>4===Ce}nt((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},r=e.exports,i=function(){for(var e,r=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,s=r.length,n={};i{if(s=i,"[object Number]"!==Object.prototype.toString.call(s))return;var s;t+=i;const n=ft(),a=n-r;a>=1e3&&(e(t/a*1e3),r=n,t=0)}}(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();function pt(e){let t=e.subarray(1,4),r="avc1.";for(let e=0;e<3;e++){let i=t[e].toString(16);i.length<2&&(i="0"+i),r+=i}return{codec:r,description:e}}function mt(e){return null==e}function _t(e){return!mt(e)}function gt(e){return"function"==typeof e}function yt(e){let t=null,r=31&e[0];return r!==Ie&&r!==De||(t=Ae),t||(r=(126&e[0])>>1,r!==Me&&r!==Ne&&r!==Oe||(t=Be)),t}function bt(){return"undefined"!=typeof WritableStream}function vt(e){e.close()}function wt(e,t){t&&(e=e.filter((e=>e.type&&e.type===t)));let r=e[0],i=null,s=1;if(e.length>0){let t=e[1];t&&t.ts-r.ts>1e5&&(r=t,s=2)}if(r)for(let n=s;n=1e3){e[n-1].ts-r.ts<1e3&&(i=n+1)}}}return i}function St(e){return e.ok&&e.status>=200&&e.status<=299}function Et(){return function(e){let t="";if("object"==typeof e)try{t=JSON.stringify(e),t=JSON.parse(t)}catch(r){t=e}else t=e;return t}(S)}function Ut(e){return e[0]>>4===Ke&&e[1]===qe}function xt(e){return!0===e||"true"===e}function At(e){return!0!==e&&"true"!==e}var Bt=function(e,t,r,i){return new(r||(r=Promise))((function(s,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function o(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,o)}l((i=i.apply(e,t||[])).next())}))};const Ct=Symbol(32),Tt=Symbol(16),kt=Symbol(8);class Ft{constructor(e){this.g=e,this.consumed=0,e&&(this.need=e.next().value)}setG(e){this.g=e,this.demand(e.next().value,!0)}consume(){this.buffer&&this.consumed&&(this.buffer.copyWithin(0,this.consumed),this.buffer=this.buffer.subarray(0,this.buffer.length-this.consumed),this.consumed=0)}demand(e,t){return t&&this.consume(),this.need=e,this.flush()}read(e){return Bt(this,void 0,void 0,(function*(){return this.lastReadPromise&&(yield this.lastReadPromise),this.lastReadPromise=new Promise(((t,r)=>{var i;this.reject=r,this.resolve=e=>{delete this.lastReadPromise,delete this.resolve,delete this.need,t(e)};this.demand(e,!0)||null===(i=this.pull)||void 0===i||i.call(this,e)}))}))}readU32(){return this.read(Ct)}readU16(){return this.read(Tt)}readU8(){return this.read(kt)}close(){var e;this.g&&this.g.return(),this.buffer&&this.buffer.subarray(0,0),null===(e=this.reject)||void 0===e||e.call(this,new Error("EOF")),delete this.lastReadPromise}flush(){if(!this.buffer||!this.need)return;let e=null;const t=this.buffer.subarray(this.consumed);let r=0;const i=e=>t.length<(r=e);if("number"==typeof this.need){if(i(this.need))return;e=t.subarray(0,r)}else if(this.need===Ct){if(i(4))return;e=t[0]<<24|t[1]<<16|t[2]<<8|t[3]}else if(this.need===Tt){if(i(2))return;e=t[0]<<8|t[1]}else if(this.need===kt){if(i(1))return;e=t[0]}else if("buffer"in this.need){if("byteOffset"in this.need){if(i(this.need.byteLength-this.need.byteOffset))return;new Uint8Array(this.need.buffer,this.need.byteOffset).set(t.subarray(0,r)),e=this.need}else if(this.g)return void this.g.throw(new Error("Unsupported type"))}else{if(i(this.need.byteLength))return;new Uint8Array(this.need).set(t.subarray(0,r)),e=this.need}return this.consumed+=r,this.g?this.demand(this.g.next(e).value,!0):this.resolve&&this.resolve(e),e}write(e){if(e instanceof Uint8Array?this.malloc(e.length).set(e):"buffer"in e?this.malloc(e.byteLength).set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):this.malloc(e.byteLength).set(new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this.pull=e));this.flush()}writeU32(e){this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){this.malloc(2).set([e>>8&255,255&e]),this.flush()}writeU8(e){this.malloc(1)[0]=e,this.flush()}malloc(e){if(this.buffer){const t=this.buffer.length,r=t+e;if(r<=this.buffer.buffer.byteLength-this.buffer.byteOffset)this.buffer=new Uint8Array(this.buffer.buffer,this.buffer.byteOffset,r);else{const e=new Uint8Array(r);e.set(this.buffer),this.buffer=e}return this.buffer.subarray(t,r)}return this.buffer=new Uint8Array(e),this.buffer}}Ft.U32=Ct,Ft.U16=Tt,Ft.U8=kt;class It{constructor(e){this.log=function(t){if(e._opt.debug&&e._opt.debugLevel==y){const n=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s1?r-1:0),s=1;s1?i-1:0),n=1;n32&&console.error("ExpGolomb: readBits() bits exceeded max 32bits!"),e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let r=e-this._current_word_bits_left;this._fillCurrentWord();let i=Math.min(r,this._current_word_bits_left),s=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,t=t<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}class Pt{static _ebsp2rbsp(e){let t=e,r=t.byteLength,i=new Uint8Array(r),s=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(i[s]=t[e],s++);return new Uint8Array(i.buffer,0,s)}static parseSPS(e){let t=Pt._ebsp2rbsp(e),r=new Dt(t);r.readByte();let i=r.readByte();r.readByte();let s=r.readByte();r.readUEG();let n=Pt.getProfileString(i),a=Pt.getLevelString(s),o=1,l=420,d=[0,420,422,444],h=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(o=r.readUEG(),3===o&&r.readBits(1),o<=3&&(l=d[o]),h=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool())){let e=3!==o?8:12;for(let t=0;t0&&e<16?(v=t[e-1],w=i[e-1]):255===e&&(v=r.readByte()<<8|r.readByte(),w=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){let e=r.readBits(32),t=r.readBits(32);E=r.readBool(),U=t,x=2*e,S=U/x}}let A=1;1===v&&1===w||(A=v/w);let B=0,C=0;if(0===o)B=1,C=2-m;else{B=3===o?1:2,C=(1===o?2:1)*(2-m)}let T=16*(c+1),k=16*(p+1)*(2-m);T-=(_+g)*B,k-=(y+b)*C;let F=Math.ceil(T*A);return r.destroy(),r=null,{profile_string:n,level_string:a,bit_depth:h,ref_frames:f,chroma_format:l,chroma_format_string:Pt.getChromaFormatString(l),frame_rate:{fixed:E,fps:S,fps_den:x,fps_num:U},sar_ratio:{width:v,height:w},codec_size:{width:T,height:k},present_size:{width:F,height:k}}}static parseSPS$2(e){let t=e.subarray(1,4),r="avc1.";for(let e=0;e<3;e++){let i=t[e].toString(16);i.length<2&&(i="0"+i),r+=i}let i=Pt._ebsp2rbsp(e),s=new Dt(i);s.readByte();let n=s.readByte();s.readByte();let a=s.readByte();s.readUEG();let o=Pt.getProfileString(n),l=Pt.getLevelString(a),d=1,h=420,u=[0,420,422,444],f=8,c=8;if((100===n||110===n||122===n||244===n||44===n||83===n||86===n||118===n||128===n||138===n||144===n)&&(d=s.readUEG(),3===d&&s.readBits(1),d<=3&&(h=u[d]),f=s.readUEG()+8,c=s.readUEG()+8,s.readBits(1),s.readBool())){let e=3!==d?8:12;for(let t=0;t0&&e<16?(E=t[e-1],U=r[e-1]):255===e&&(E=s.readByte()<<8|s.readByte(),U=s.readByte()<<8|s.readByte())}if(s.readBool()&&s.readBool(),s.readBool()&&(s.readBits(4),s.readBool()&&s.readBits(24)),s.readBool()&&(s.readUEG(),s.readUEG()),s.readBool()){let e=s.readBits(32),t=s.readBits(32);A=s.readBool(),B=t,C=2*e,x=B/C}}let T=1;1===E&&1===U||(T=E/U);let k=0,F=0;if(0===d)k=1,F=2-y;else{k=3===d?1:2,F=(1===d?2:1)*(2-y)}let I=16*(_+1),D=16*(g+1)*(2-y);I-=(b+v)*k,D-=(w+S)*F;let P=Math.ceil(I*T);return s.destroy(),s=null,{codec_mimetype:r,profile_idc:n,level_idc:a,profile_string:o,level_string:l,chroma_format_idc:d,bit_depth:f,bit_depth_luma:f,bit_depth_chroma:c,ref_frames:m,chroma_format:h,chroma_format_string:Pt.getChromaFormatString(h),frame_rate:{fixed:A,fps:x,fps_den:C,fps_num:B},sar_ratio:{width:E,height:U},codec_size:{width:I,height:D},present_size:{width:P,height:D}}}static _skipScalingList(e,t){let r=8,i=8,s=0;for(let n=0;n=this.buflen)return this.iserro=!0,0;this.iserro=!1,r=this.bufoff+e>8?8-this.bufoff:e,t<<=r,t+=this.buffer[this.bufpos]>>8-this.bufoff-r&255>>8-r,this.bufoff+=r,e-=r,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,r=this.bufoff,i=this.read(e);return this.bufpos=t,this.bufoff=r,i}read_golomb(){let e;for(e=0;0===this.read(1)&&!this.iserro;e++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(r,0),i.set(t.sps,4),t.sps=i}if(t.pps){const e=t.pps.byteLength,r=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(r,0),i.set(t.pps,4),t.pps=i}return t}function Rt(e){let{sps:t,pps:r}=e;const i=[23,0,0,0,0,1,66,0,30,255];i[0]=23,i[6]=t[1],i[7]=t[2],i[8]=t[3],i[10]=225,i[11]=t.byteLength>>8&255,i[12]=255&t.byteLength,i.push(...t,1,r.byteLength>>8&255,255&r.byteLength,...r);return new Uint8Array(i)}function Mt(e,t){let r=[];r[0]=t?23:39,r[1]=1,r[2]=0,r[3]=0,r[4]=0,r[5]=e.byteLength>>24&255,r[6]=e.byteLength>>16&255,r[7]=e.byteLength>>8&255,r[8]=255&e.byteLength;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function Nt(e,t){let r=[];r[0]=t?23:39,r[1]=1,r[2]=0,r[3]=0,r[4]=0;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function Ot(e){return 31&e[0]}function Gt(e){return e===Le}function $t(e){return!function(e){return e===Ie||e===De}(e)&&!Gt(e)}function Ht(e){return e===Pe}function Vt(e){if(0===e.length)return!1;const t=Ot(e[0]);for(let r=1;r{let t=e,r=t.byteLength,i=new Uint8Array(r),s=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(i[s]=t[e],s++);return new Uint8Array(i.buffer,0,s)},jt=e=>{switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}};function Yt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function qt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e.length<4)return;const r=e.length,i=[];let s,n=0;for(;n+t>>=8),n+=t,s){if(n+s>r)break;i.push(e.subarray(n,n+s)),n+=s}return i}function Kt(e){const t=e.byteLength,r=new Uint8Array(4);r[0]=t>>>24&255,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t;const i=new Uint8Array(t+4);return i.set(r,0),i.set(e,4),i}function Xt(e,t){let r=null;return t?e.length>=28&&(r=1+(3&e[26])):e.length>=12&&(r=1+(3&e[9])),r}function Zt(e){let t={width:0,height:0,profile:0,level:0};e=e.slice(5);do{let r={};if(e.length<23){console.warn("parseHEVCDecoderConfigurationRecord$2",`arrayBuffer.length ${e.length} < 23`);break}if(r.configurationVersion=e[0],1!=r.configurationVersion)break;r.general_profile_space=e[1]>>6&3,r.general_tier_flag=e[1]>>5&1,r.general_profile_idc=31&e[1],r.general_profile_compatibility_flags=e[2]<<24|e[3]<<16|e[4]<<8|e[5],r.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],r.general_constraint_indicator_flags=r.general_constraint_indicator_flags<<16|e[10]<<8|e[11],r.general_level_idc=e[12],r.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],r.parallelismType=3&e[15],r.chromaFormat=3&e[16],r.bitDepthLumaMinus8=7&e[17],r.bitDepthChromaMinus8=7&e[18],r.avgFrameRate=e[19]<<8|e[20],r.constantFrameRate=e[21]>>6&3,r.numTemporalLayers=e[21]>>3&7,r.temporalIdNested=e[21]>>2&1,r.lengthSizeMinusOne=3&e[21];let i=e[22],s=e.slice(23);for(let e=0;e0)for(let t=r;t<8;t++)e.read(2);i.sub_layer_profile_space=[],i.sub_layer_tier_flag=[],i.sub_layer_profile_idc=[],i.sub_layer_profile_compatibility_flag=[],i.sub_layer_progressive_source_flag=[],i.sub_layer_interlaced_source_flag=[],i.sub_layer_non_packed_constraint_flag=[],i.sub_layer_frame_only_constraint_flag=[],i.sub_layer_level_idc=[];for(let t=0;t{let t=Wt(e),r=new Dt(t);return r.readByte(),r.readByte(),r.readBits(4),r.readBits(2),r.readBits(6),{num_temporal_layers:r.readBits(3)+1,temporal_id_nested:r.readBool()}})(t),a=(e=>{let t=Wt(e),r=new Dt(t);r.readByte(),r.readByte();let i=0,s=0,n=0,a=0;r.readBits(4);let o=r.readBits(3);r.readBool();let l=r.readBits(2),d=r.readBool(),h=r.readBits(5),u=r.readByte(),f=r.readByte(),c=r.readByte(),p=r.readByte(),m=r.readByte(),_=r.readByte(),g=r.readByte(),y=r.readByte(),b=r.readByte(),v=r.readByte(),w=r.readByte(),S=[],E=[];for(let e=0;e0)for(let e=o;e<8;e++)r.readBits(2);for(let e=0;e1&&r.readSEG();for(let e=0;e0&&e<16?(P=t[e-1],L=i[e-1]):255===e&&(P=r.readBits(16),L=r.readBits(16))}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(3),r.readBool(),r.readBool()&&(r.readByte(),r.readByte(),r.readByte())),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool(),r.readBool(),r.readBool(),I=r.readBool(),I&&(i+=r.readUEG(),s+=r.readUEG(),n+=r.readUEG(),a+=r.readUEG()),r.readBool()&&(R=r.readBits(32),M=r.readBits(32),r.readBool()&&(r.readUEG(),r.readBool()))){let e=!1,t=!1,i=!1;e=r.readBool(),t=r.readBool(),(e||t)&&(i=r.readBool(),i&&(r.readByte(),r.readBits(5),r.readBool(),r.readBits(5)),r.readBits(4),r.readBits(4),i&&r.readBits(4),r.readBits(5),r.readBits(5),r.readBits(5));for(let s=0;s<=o;s++){let s=r.readBool();z=s;let n=!1,a=1;s||(n=r.readBool());let o=!1;if(n?r.readSEG():o=r.readBool(),o||(cpbcnt=r.readUEG()+1),e)for(let e=0;e{let t=Wt(e),r=new Dt(t);r.readByte(),r.readByte(),r.readUEG(),r.readUEG(),r.readBool(),r.readBool(),r.readBits(3),r.readBool(),r.readBool(),r.readUEG(),r.readUEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool()&&r.readUEG(),r.readSEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool(),r.readBool();let i=r.readBool(),s=r.readBool(),n=1;return s&&i?n=0:s?n=3:i&&(n=2),{parallelismType:n}})(r);s=Object.assign(s,n,a,o);let l=23+(5+t.byteLength)+(5+i.byteLength)+(5+r.byteLength),d=new Uint8Array(l);d[0]=1,d[1]=(3&s.general_profile_space)<<6|(s.general_tier_flag?1:0)<<5|31&s.general_profile_idc,d[2]=s.general_profile_compatibility_flags_1||0,d[3]=s.general_profile_compatibility_flags_2||0,d[4]=s.general_profile_compatibility_flags_3||0,d[5]=s.general_profile_compatibility_flags_4||0,d[6]=s.general_constraint_indicator_flags_1||0,d[7]=s.general_constraint_indicator_flags_2||0,d[8]=s.general_constraint_indicator_flags_3||0,d[9]=s.general_constraint_indicator_flags_4||0,d[10]=s.general_constraint_indicator_flags_5||0,d[11]=s.general_constraint_indicator_flags_6||0,d[12]=60,d[13]=240|(3840&s.min_spatial_segmentation_idc)>>8,d[14]=255&s.min_spatial_segmentation_idc,d[15]=252|3&s.parallelismType,d[16]=252|3&s.chroma_format_idc,d[17]=248|7&s.bit_depth_luma_minus8,d[18]=248|7&s.bit_depth_chroma_minus8,d[19]=0,d[20]=0,d[21]=(3&s.constant_frame_rate)<<6|(7&s.num_temporal_layers)<<3|(s.temporal_id_nested?1:0)<<2|3,d[22]=3,d[23]=128|Me,d[24]=0,d[25]=1,d[26]=(65280&t.byteLength)>>8,d[27]=(255&t.byteLength)>>0,d.set(t,28),d[23+(5+t.byteLength)+0]=128|Ne,d[23+(5+t.byteLength)+1]=0,d[23+(5+t.byteLength)+2]=1,d[23+(5+t.byteLength)+3]=(65280&i.byteLength)>>8,d[23+(5+t.byteLength)+4]=(255&i.byteLength)>>0,d.set(i,23+(5+t.byteLength)+5),d[23+(5+t.byteLength+5+i.byteLength)+0]=128|Oe,d[23+(5+t.byteLength+5+i.byteLength)+1]=0,d[23+(5+t.byteLength+5+i.byteLength)+2]=1,d[23+(5+t.byteLength+5+i.byteLength)+3]=(65280&r.byteLength)>>8,d[23+(5+t.byteLength+5+i.byteLength)+4]=(255&r.byteLength)>>0,d.set(r,23+(5+t.byteLength+5+i.byteLength)+5);const h=[28,0,0,0,0],u=new Uint8Array(h.length+d.byteLength);return u.set(h,0),u.set(d,h.length),u}function er(e,t){let r=[];r[0]=t?28:44,r[1]=1,r[2]=0,r[3]=0,r[4]=0,r[5]=e.byteLength>>24&255,r[6]=e.byteLength>>16&255,r[7]=e.byteLength>>8&255,r[8]=255&e.byteLength;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function tr(e,t){let r=[];r[0]=t?28:44,r[1]=1,r[2]=0,r[3]=0,r[4]=0;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function rr(e){return(126&e[0])>>1}function ir(e){return e===Ge}function sr(e){return!function(e){return e>=32&&e<=40}(e)}function nr(e){return e>=16&&e<=21}function ar(e){if(0===e.length)return!1;const t=rr(e[0]);for(let r=1;r255)return!1;return!0}function dr(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!lr(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(or(e.length)&&lr(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function hr(e){return new Uint8Array(e)}function ur(e,t,r,i,s){null==i&&null==s||(e=e.slice?e.slice(i,s):Array.prototype.slice.call(e,i,s)),t.set(e,r)}var fr,cr={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&i<224?(t.push(String.fromCharCode((31&i)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&i)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},pr=(fr="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+fr[15&i])}return t.join("")}}),mr={16:10,24:12,32:14},_r=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],gr=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],yr=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],br=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],vr=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],wr=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],Sr=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Er=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],Ur=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],xr=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Ar=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Br=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Cr=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],Tr=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],kr=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Fr(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=n[t],this._Kd[e-r][t%4]=n[t];for(var a,o=0,l=s;l>16&255]<<24^gr[a>>8&255]<<16^gr[255&a]<<8^gr[a>>24&255]^_r[o]<<24,o+=1,8!=s)for(t=1;t>8&255]<<8^gr[a>>16&255]<<16^gr[a>>24&255]<<24;for(t=s/2+1;t>2,h=l%4,this._Ke[d][h]=n[t],this._Kd[e-d][h]=n[t++],l++}for(var d=1;d>24&255]^Cr[a>>16&255]^Tr[a>>8&255]^kr[255&a]},Ir.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],i=Fr(e),s=0;s<4;s++)i[s]^=this._Ke[0][s];for(var n=1;n>24&255]^vr[i[(s+1)%4]>>16&255]^wr[i[(s+2)%4]>>8&255]^Sr[255&i[(s+3)%4]]^this._Ke[n][s];i=r.slice()}var a,o=hr(16);for(s=0;s<4;s++)a=this._Ke[t][s],o[4*s]=255&(gr[i[s]>>24&255]^a>>24),o[4*s+1]=255&(gr[i[(s+1)%4]>>16&255]^a>>16),o[4*s+2]=255&(gr[i[(s+2)%4]>>8&255]^a>>8),o[4*s+3]=255&(gr[255&i[(s+3)%4]]^a);return o},Ir.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],i=Fr(e),s=0;s<4;s++)i[s]^=this._Kd[0][s];for(var n=1;n>24&255]^Ur[i[(s+3)%4]>>16&255]^xr[i[(s+2)%4]>>8&255]^Ar[255&i[(s+1)%4]]^this._Kd[n][s];i=r.slice()}var a,o=hr(16);for(s=0;s<4;s++)a=this._Kd[t][s],o[4*s]=255&(yr[i[s]>>24&255]^a>>24),o[4*s+1]=255&(yr[i[(s+3)%4]>>16&255]^a>>16),o[4*s+2]=255&(yr[i[(s+2)%4]>>8&255]^a>>8),o[4*s+3]=255&(yr[255&i[(s+1)%4]]^a);return o};var Dr=function(e){if(!(this instanceof Dr))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Ir(e)};Dr.prototype.encrypt=function(e){if((e=dr(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=hr(e.length),r=hr(16),i=0;iNumber.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},Rr.prototype.setBytes=function(e){if(16!=(e=dr(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},Rr.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var Mr=function(e,t){if(!(this instanceof Mr))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof Rr||(t=new Rr(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Ir(e)};Mr.prototype.encrypt=function(e){for(var t=dr(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,i=0;i3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const s=e.byteLength;let n=5;for(;ns)break;let o=e[n+4],l=!1;if(i?(o=o>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,l=1===o||5===o),l){const i=e.slice(n+4+2,n+4+a);let s=new Nr.ModeOfOperation.ctr(t,new Nr.Counter(r));const o=s.decrypt(i);s=null,e.set(o,n+4+2)}n=n+4+a}return e}function $r(e,t,r){if(e.byteLength<=30)return e;const i=e.slice(32);let s=new Nr.ModeOfOperation.ctr(t,new Nr.Counter(r));const n=s.decrypt(i);return s=null,e.set(n,32),e}var Hr=nt((function(e,t){var r,s,n,a=(r=new Date,s=4,n={setLogLevel:function(e){s=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=s&&console.debug("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=s&&console.info("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=s&&console.warn("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){4>=s&&console.error("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)}},n);a.getDurationString=function(e,t){var r;function i(e,t){for(var r=(""+e).split(".");r[0].length0){for(var r="",i=0;i0&&(r+=","),r+="["+a.getDurationString(e.start(i))+","+a.getDurationString(e.end(i))+"]";return r}return"(empty)"},t.Log=a;var o=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};o.prototype.getPosition=function(){return this.position},o.prototype.getEndPosition=function(){return this.buffer.byteLength},o.prototype.getLength=function(){return this.buffer.byteLength},o.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0},o.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},o.prototype.readAnyInt=function(e,t){var r=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:r=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16,r|=this.dataview.getUint8(this.position+1)<<8,r|=this.dataview.getUint8(this.position+2);break;case 4:r=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32,r|=this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,r}throw"Not enough bytes in buffer"},o.prototype.readUint8=function(){return this.readAnyInt(1,!1)},o.prototype.readUint16=function(){return this.readAnyInt(2,!1)},o.prototype.readUint24=function(){return this.readAnyInt(3,!1)},o.prototype.readUint32=function(){return this.readAnyInt(4,!1)},o.prototype.readUint64=function(){return this.readAnyInt(8,!1)},o.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",r=0;rthis._byteLength&&(this._byteLength=t);else{for(r<1&&(r=1);t>r;)r*=2;var i=new ArrayBuffer(r),s=new Uint8Array(this._buffer);new Uint8Array(i,0,s.length).set(s),this.buffer=i,this._byteLength=t}}},l.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),r=new Uint8Array(this._buffer,0,t.length);t.set(r),this.buffer=e}},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),l.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},l.prototype.isEof=function(){return this.position>=this._byteLength},l.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Int32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var r=new Int16Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Uint32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var r=new Uint16Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var r=new Float64Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Float32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},l.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},l.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,l.memcpy=function(e,t,r,i,s){var n=new Uint8Array(e,t,s),a=new Uint8Array(r,i,s);n.set(a)},l.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},l.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},l.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=0;rs;i--,s++){var n=t[s];t[s]=t[i],t[i]=n}return e},l.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],r=0;r>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},l.prototype.adjustUint32=function(e,t){var r=this.position;this.seek(e),this.writeUint32(t),this.seek(r)},l.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var r=new Int32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r},l.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var r=new Int16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=2*e,r},l.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r},l.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=2*e,r},l.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var r=new Float64Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=8*e,r},l.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var r=new Float32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r};var h=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(h.prototype=new l(new ArrayBuffer,0,l.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e),0),r.set(new Uint8Array(t),e.byteLength),r.buffer},h.prototype.reduceBuffer=function(e,t,r){var i;return(i=new Uint8Array(r)).set(new Uint8Array(e,t,r)),i.buffer.fileStart=e.fileStart+t,i.buffer.usedBytes=0,i.buffer},h.prototype.insertBuffer=function(e){for(var t=!0,r=0;ri.byteLength){this.buffers.splice(r,1),r--;continue}a.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=i.fileStart||(e=this.reduceBuffer(e,0,i.fileStart-e.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(r,0,e),0===r&&(this.buffer=e);t=!1;break}if(e.fileStart0)){t=!1;break}e=this.reduceBuffer(e,s,n)}}t&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===r&&(this.buffer=e))},h.prototype.logBufferLevel=function(e){var t,r,i,s,n,o=[],l="";for(i=0,s=0,t=0;t0&&(l+=n.end-1+"]");var d=e?a.info:a.debug;0===this.buffers.length?d("MultiBufferStream","No more buffer in memory"):d("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+i+"/"+s+" bytes), continuous ranges: "+l)},h.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0}return!1}return!1},h.prototype.findPosition=function(e,t,r){var i,s=null,n=-1;for(i=!0===e?0:this.bufferIndex;i=t?(a.debug("MultiBufferStream","Found position in existing buffer #"+n),n):-1},h.prototype.findEndContiguousBuf=function(e){var t,r,i,s=void 0!==e?e:this.bufferIndex;if(r=this.buffers[s],this.buffers.length>s+1)for(t=s+1;t>3;return 31===i&&r.data.length>=2&&(i=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),i}return null},r.DecoderConfigDescriptor=function(e){r.Descriptor.call(this,4,e)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.upStream=0!=(this.streamType>>1&1),this.streamType=this.streamType>>>2,this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e)},r.DecoderSpecificInfo=function(e){r.Descriptor.call(this,5,e)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(e){r.Descriptor.call(this,6,e)},r.SLConfigDescriptor.prototype=new r.Descriptor,this};t.MPEG4DescriptorParser=u;var f={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){f.FullBox.prototype=new f.Box,f.ContainerBox.prototype=new f.Box,f.SampleEntry.prototype=new f.Box,f.TrackGroupTypeBox.prototype=new f.FullBox,f.BASIC_BOXES.forEach((function(e){f.createBoxCtor(e)})),f.FULL_BOXES.forEach((function(e){f.createFullBoxCtor(e)})),f.CONTAINER_BOXES.forEach((function(e){f.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,r){this.type=e,this.size=t,this.uuid=r},FullBox:function(e,t,r){f.Box.call(this,e,t,r),this.flags=0,this.version=0},ContainerBox:function(e,t,r){f.Box.call(this,e,t,r),this.boxes=[]},SampleEntry:function(e,t,r,i){f.ContainerBox.call(this,e,t),this.hdr_size=r,this.start=i},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){f.FullBox.call(this,e,t)},createBoxCtor:function(e,t){f.boxCodes.push(e),f[e+"Box"]=function(t){f.Box.call(this,e,t)},f[e+"Box"].prototype=new f.Box,t&&(f[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){f[e+"Box"]=function(t){f.FullBox.call(this,e,t)},f[e+"Box"].prototype=new f.FullBox,f[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,r=0;rr?(a.error("BoxParser","Box of type '"+h+"' has a size "+d+" greater than its container size "+r),{code:f.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:o}):0!==d&&o+d>e.getEndPosition()?(e.seek(o),a.info("BoxParser","Not enough data in stream to parse the entire '"+h+"' box"),{code:f.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:o}):t?{code:f.OK,type:h,size:d,hdr_size:l,start:o}:(f[h+"Box"]?i=new f[h+"Box"](d):"uuid"!==h?(a.warn("BoxParser","Unknown box type: '"+h+"'"),(i=new f.Box(h,d)).has_unparsed_data=!0):f.UUIDBoxes[n]?i=new f.UUIDBoxes[n](d):(a.warn("BoxParser","Unknown uuid type: '"+n+"'"),(i=new f.Box(h,d)).uuid=n,i.has_unparsed_data=!0),i.hdr_size=l,i.start=o,i.write===f.Box.prototype.write&&"mdat"!==i.type&&(a.info("BoxParser","'"+u+"' box writing not yet implemented, keeping unparsed data in memory for later write"),i.parseDataAndRewind(e)),i.parse(e),(s=e.getPosition()-(i.start+i.size))<0?(a.warn("BoxParser","Parsing of box '"+u+"' did not read the entire indicated box data size (missing "+-s+" bytes), seeking forward"),e.seek(i.start+i.size)):s>0&&(a.error("BoxParser","Parsing of box '"+u+"' read "+s+" more bytes than the indicated box data size, seeking backwards"),0!==i.size&&e.seek(i.start+i.size)),{code:f.OK,box:i,size:i.size})},f.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size)},f.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},f.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size},f.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},f.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},f.ContainerBox.prototype.parse=function(e){for(var t,r;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96)},f.SAMPLE_ENTRY_TYPE_VISUAL="Visual",f.SAMPLE_ENTRY_TYPE_AUDIO="Audio",f.SAMPLE_ENTRY_TYPE_HINT="Hint",f.SAMPLE_ENTRY_TYPE_METADATA="Metadata",f.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",f.SAMPLE_ENTRY_TYPE_SYSTEM="System",f.SAMPLE_ENTRY_TYPE_TEXT="Text",f.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},f.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},f.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size},f.SampleEntry.prototype.parseFooter=function(e){f.ContainerBox.prototype.parse.call(this,e)},f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_HINT),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_METADATA),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SUBTITLE),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SYSTEM),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_TEXT),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,(function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)})),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,(function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)})),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_TEXT,"enct"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_METADATA,"encm"),f.createBoxCtor("a1lx",(function(e){var t=16*(1+(1&(1&e.readUint8())));this.layer_size=[];for(var r=0;r<3;r++)this.layer_size[r]=16==t?e.readUint16():e.readUint32()})),f.createBoxCtor("a1op",(function(e){this.op_index=e.readUint8()})),f.createFullBoxCtor("auxC",(function(e){this.aux_type=e.readCString();var t=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=e.readUint8Array(t)})),f.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)a.error("av1C marker problem");else if(this.version=127&t,1===this.version)if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void a.error("av1C reserved_2 parsing problem");var r=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(r)}else a.error("av1C reserved_1 parsing problem");else a.error("av1C version "+this.version+" not supported")})),f.createBoxCtor("avcC",(function(e){var t,r;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(r))})),f.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),f.createFullBoxCtor("ccst",(function(e){var t=e.readUint8();this.all_ref_pics_intra=128==(128&t),this.intra_pred_used=64==(64&t),this.max_ref_per_pic=(63&t)>>2,e.readUint24()})),f.createBoxCtor("cdef",(function(e){var t;for(this.channel_count=e.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],t=0;t=32768&&this.component_type_urls.push(e.readCString())}})),f.createFullBoxCtor("co64",(function(e){var t,r;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4))})),f.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),f.createFullBoxCtor("cslg",(function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())})),f.createFullBoxCtor("ctts",(function(e){var t,r;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|i>>5&7})),f.createBoxCtor("dec3",(function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var r=0;r>6,i.bsid=s>>1&31,i.bsmod=(1&s)<<4|n>>4&15,i.acmod=n>>1&7,i.lfeon=1&n,i.num_dep_sub=a>>1&15,i.num_dep_sub>0&&(i.chan_loc=(1&a)<<8|e.readUint8())}})),f.createFullBoxCtor("dfLa",(function(e){var t=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var i=e.readUint8(),s=Math.min(127&i,r.length-1);if(s?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(r[s]),128&i)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),f.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),f.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),f.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),f.createBoxCtor("dOps",(function(e){if(this.Version=e.readUint8(),this.OutputChannelCount=e.readUint8(),this.PreSkip=e.readUint16(),this.InputSampleRate=e.readUint32(),this.OutputGain=e.readInt16(),this.ChannelMappingFamily=e.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=e.readUint8(),this.CoupledCount=e.readUint8(),this.ChannelMapping=[];for(var t=0;t=4;)this.compatible_brands[r]=e.readString(4),t-=4,r++})),f.createFullBoxCtor("hdlr",(function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))})),f.createBoxCtor("hvcC",(function(e){var t,r,i,s;this.configurationVersion=e.readUint8(),s=e.readUint8(),this.general_profile_space=s>>6,this.general_tier_flag=(32&s)>>5,this.general_profile_idc=31&s,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),s=e.readUint8(),this.constantFrameRate=s>>6,this.numTemporalLayers=(13&s)>>3,this.temporalIdNested=(4&s)>>2,this.lengthSizeMinusOne=3&s,this.nalu_arrays=[];var n=e.readUint8();for(t=0;t>7,a.nalu_type=63&s;var o=e.readUint16();for(r=0;r>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var r=0;if(this.version<2)r=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";r=e.readUint32()}for(var i=0;i>7,this.axis=1&t})),f.createFullBoxCtor("infe",(function(e){if(0!==this.version&&1!==this.version||(this.item_ID=e.readUint16(),this.item_protection_index=e.readUint16(),this.item_name=e.readCString(),this.content_type=e.readCString(),this.content_encoding=e.readCString()),1===this.version)return this.extension_type=e.readString(4),a.warn("BoxParser","Cannot parse extension type"),void e.seek(this.start+this.size);this.version>=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()))})),f.createFullBoxCtor("ipma",(function(e){var t,r;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?a.property_index=(127&n)<<8|e.readUint8():a.property_index=127&n}}})),f.createFullBoxCtor("iref",(function(e){var t,r;for(this.references=[];e.getPosition()>7,i.assignment_type=127&s,i.assignment_type){case 0:i.grouping_type=e.readString(4);break;case 1:i.grouping_type=e.readString(4),i.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:i.sub_track_id=e.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type")}}})),f.createBoxCtor("lsel",(function(e){this.layer_id=e.readUint16()})),f.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),c.prototype.toString=function(){return"("+this.x+","+this.y+")"},f.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]=new c(e.readUint16(),e.readUint16()),this.display_primaries[1]=new c(e.readUint16(),e.readUint16()),this.display_primaries[2]=new c(e.readUint16(),e.readUint16()),this.white_point=new c(e.readUint16(),e.readUint16()),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),f.createFullBoxCtor("mdhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()})),f.createFullBoxCtor("mehd",(function(e){1&this.flags&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()})),f.createFullBoxCtor("meta",(function(e){this.boxes=[],f.ContainerBox.prototype.parse.call(this,e)})),f.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),f.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),f.createFullBoxCtor("mskC",(function(e){this.bits_per_pixel=e.readUint8()})),f.createFullBoxCtor("mvhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()})),f.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),f.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),f.createFullBoxCtor("padb",(function(e){var t=e.readUint32();this.padbits=[];for(var r=0;r0){var t=e.readUint32();this.kid=[];for(var r=0;r0&&(this.data=e.readUint8Array(i))})),f.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),f.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),f.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),f.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),f.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),f.createFullBoxCtor("saio",(function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var r=e.readUint8(),i=0;i>7,this.num_leading_samples=127&t})),f.createSampleGroupCtor("rash",(function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=f.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))})),f.createSampleGroupCtor("stsa",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),f.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),f.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),f.createSampleGroupCtor("tsas",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),f.createSampleGroupCtor("tscl",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),f.createSampleGroupCtor("vipr",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),f.createFullBoxCtor("sbgp",(function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),r=0;r>6,this.sample_depends_on[i]=t>>4&3,this.sample_is_depended_on[i]=t>>2&3,this.sample_has_redundancy[i]=3&t})),f.createFullBoxCtor("senc"),f.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),r=0;r>31&1,i.referenced_size=2147483647&s,i.subsegment_duration=e.readUint32(),s=e.readUint32(),i.starts_with_SAP=s>>31&1,i.SAP_type=s>>28&7,i.SAP_delta_time=268435455&s}})),f.SingleItemTypeReferenceBox=function(e,t,r,i){f.Box.call(this,e,t),this.hdr_size=r,this.start=i},f.SingleItemTypeReferenceBox.prototype=new f.Box,f.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[t+1]=15&i}else if(8===this.field_size)for(t=0;t0)for(r=0;r>4&15,this.default_skip_byte_block=15&t}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=f.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))})),f.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),f.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&f.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&f.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&f.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&f.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&f.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),f.createFullBoxCtor("tfra",(function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var r=e.readUint32(),i=0;i>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()})),f.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),f.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),f.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),f.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),f.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),f.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},f.createTrackGroupCtor("msrc"),f.TrackReferenceTypeBox=function(e,t,r,i){f.Box.call(this,e,t),this.hdr_size=r,this.start=i},f.TrackReferenceTypeBox.prototype=new f.Box,f.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},f.trefBox.prototype.parse=function(e){for(var t,r;e.getPosition()t&&this.flags&f.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&f.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=e.readUint32(),this.row_align_size=e.readUint32(),this.tile_align_size=e.readUint32(),this.num_tile_cols_minus_one=e.readUint32(),this.num_tile_rows_minus_one=e.readUint32()}})),f.createFullBoxCtor("url ",(function(e){1!==this.flags&&(this.location=e.readCString())})),f.createFullBoxCtor("urn ",(function(e){this.name=e.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=e.readCString())})),f.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")})),f.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=f.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),f.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),f.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=f.parseHex16(e)})),f.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize))})),f.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),f.createFullBoxCtor("vvcC",(function(e){var t,r,i={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){this.held_bits=e.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(e){this.held_bits=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=this.held_bits>>this.num_held_bits-e&(1<1){for(i.stream_read_1_bytes(e),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var a=i.extract_bits(1);this.ptl_sublayer_present_mask|=a<1;++r)i.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<>=1;t+=f.decimalToHex(i,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var s=!1,n="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||s)&&(n="."+f.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+n,s=!0);t+=n}return t},f.vvc1SampleEntry.prototype.getCodec=f.vvi1SampleEntry.prototype.getCodec=function(){var e,t=f.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var r="";if(this.vvcC.general_constraint_info){var i,s=[],n=0;for(n|=this.vvcC.ptl_frame_only_constraint<<7,n|=this.vvcC.ptl_multilayer_enabled<<6,e=0;e>2&63,s.push(n),n&&(i=e),n=this.vvcC.general_constraint_info[e]>>2&3;if(void 0===i)r=".CA";else{r=".C";var a="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",o=0,l=0;for(e=0;e<=i;++e)for(o=o<<8|s[e],l+=8;l>=5;){r+=a[o>>l-5&31],o&=(1<<(l-=5))-1}l&&(r+=a[31&(o<<=5-l)])}}t+=r}return t},f.mp4aSampleEntry.prototype.getCodec=function(){var e=f.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),r=this.esds.esd.getAudioConfig();return e+"."+f.decimalToHex(t)+(r?"."+r:"")}return e},f.stxtSampleEntry.prototype.getCodec=function(){var e=f.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},f.vp08SampleEntry.prototype.getCodec=f.vp09SampleEntry.prototype.getCodec=function(){var e=f.SampleEntry.prototype.getCodec.call(this),t=this.vpcC.level;0==t&&(t="00");var r=this.vpcC.bitDepth;return 8==r&&(r="08"),e+".0"+this.vpcC.profile+"."+t+"."+r},f.av01SampleEntry.prototype.getCodec=function(){var e,t=f.SampleEntry.prototype.getCodec.call(this),r=this.av1C.seq_level_idx_0;return r<10&&(r="0"+r),2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+r+(this.av1C.seq_tier_0?"H":"M")+"."+e},f.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>d?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>d&&e.writeUint64(this.size)},f.FullBox.prototype.writeHeader=function(e){this.size+=4,f.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},f.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))},f.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1t?1:0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(e),1===this.version?e.writeUint64(this.baseMediaDecodeTime):e.writeUint32(this.baseMediaDecodeTime)},f.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&f.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&f.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&f.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&f.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&f.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&f.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&f.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&f.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&f.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&f.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags)},f.tkhdBox.prototype.write=function(e){this.version=0,this.size=80,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.track_id),e.writeUint32(0),e.writeUint32(this.duration),e.writeUint32(0),e.writeUint32(0),e.writeInt16(this.layer),e.writeInt16(this.alternate_group),e.writeInt16(this.volume<<8),e.writeUint16(0),e.writeInt32Array(this.matrix),e.writeUint32(this.width),e.writeUint32(this.height)},f.trexBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20,this.writeHeader(e),e.writeUint32(this.track_id),e.writeUint32(this.default_sample_description_index),e.writeUint32(this.default_sample_duration),e.writeUint32(this.default_sample_size),e.writeUint32(this.default_sample_flags)},f.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&f.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&f.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&f.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&f.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&f.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&f.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&f.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&f.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var t=0;t-1||e[r]instanceof f.Box||t[r]instanceof f.Box||void 0===e[r]||void 0===t[r]||"function"==typeof e[r]||"function"==typeof t[r]||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||"data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r||f.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1||e[r]===t[r]))return!1;return!0},f.boxEqual=function(e,t){if(!f.boxEqualFields(e,t))return!1;for(var r=0;r1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1)},g.prototype.setExtractionOptions=function(e,t,r){var i=this.getTrackById(e);if(i){var s={};this.extractedTracks.push(s),s.id=e,s.user=t,s.trak=i,i.nextSample=0,s.nb_samples=1e3,s.samples=[],r&&r.nbSamples&&(s.nb_samples=r.nbSamples)}},g.prototype.unsetExtractionOptions=function(e){for(var t=-1,r=0;r-1&&this.extractedTracks.splice(t,1)},g.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}if(this.saveParsePosition&&this.saveParsePosition(),(e=f.parseOneBox(this.stream,false)).code===f.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var r;switch(r="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),r){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[r]&&a.warn("ISOFile","Duplicate Box of type: "+r+", overriding previous occurrence"),this[r]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},g.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(a.warn("ISOFile","Not ready to start parsing"),!1))},g.prototype.appendBuffer=function(e,t){var r;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},g.prototype.getInfo=function(){var e,t,r,i,s,n,a={},o=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(a.hasMoov=!0,a.duration=this.moov.mvhd.duration,a.timescale=this.moov.mvhd.timescale,a.isFragmented=null!=this.moov.mvex,a.isFragmented&&this.moov.mvex.mehd&&(a.fragment_duration=this.moov.mvex.mehd.fragment_duration),a.isProgressive=this.isProgressive,a.hasIOD=null!=this.moov.iods,a.brands=[],a.brands.push(this.ftyp.major_brand),a.brands=a.brands.concat(this.ftyp.compatible_brands),a.created=new Date(o+1e3*this.moov.mvhd.creation_time),a.modified=new Date(o+1e3*this.moov.mvhd.modification_time),a.tracks=[],a.audioTracks=[],a.videoTracks=[],a.subtitleTracks=[],a.metadataTracks=[],a.hintTracks=[],a.otherTracks=[],e=0;e0?a.mime+='video/mp4; codecs="':a.audioTracks&&a.audioTracks.length>0?a.mime+='audio/mp4; codecs="':a.mime+='application/mp4; codecs="',e=0;e=r.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+i.id+" for samples ["+Math.max(0,r.nextSample-i.nb_samples)+","+(r.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(i.id,i.user,i.segmentStream.buffer,r.nextSample,e||r.nextSample>=r.samples.length),i.segmentStream=null,i!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t=r.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+n.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(n.id,n.user,n.samples),n.samples=[],n!==this.extractedTracks[t]))break}}}},g.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},g.prototype.getBoxes=function(e,t){var r=[];return g._sweep.call(this,e,r,t),r},g._sweep=function(e,t,r){for(var i in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&r)return;g._sweep.call(this.boxes[i],e,t,r)}},g.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},g.prototype.getTrackSample=function(e,t){var r=this.getTrackById(e);return this.getSample(r,t)},g.prototype.releaseUsedSamples=function(e,t){var r=0,i=this.getTrackById(e);i.lastValidSample||(i.lastValidSample=0);for(var s=i.lastValidSample;se*s.timescale){d=i-1;break}t&&s.is_sync&&(l=i)}for(t&&(d=l),e=r.samples[d].cts,r.nextSample=d;r.samples[d].alreadyRead===r.samples[d].size&&r.samples[d+1];)d++;return n=r.samples[d].offset+r.samples[d].alreadyRead,a.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+a.getDurationString(e,o)+" and offset: "+n),{offset:n,time:e/o}},g.prototype.getTrackDuration=function(e){var t;return e.samples?((t=e.samples[e.samples.length-1]).cts+t.duration)/t.timescale:1/0},g.prototype.seek=function(e,t){var r,i,s,n=this.moov,o={offset:1/0,time:1/0};if(this.moov){for(s=0;sthis.getTrackDuration(r)||((i=this.seekTrack(e,t,r)).offset-1){a=l;break}switch(a){case"Visual":if(s.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),n.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24),t.avcDecoderConfigRecord){var u=new f.avcCBox;u.parse(new o(t.avcDecoderConfigRecord)),n.addBox(u)}else if(t.hevcDecoderConfigRecord){var c=new f.hvcCBox;c.parse(new o(t.hevcDecoderConfigRecord)),n.addBox(c)}break;case"Audio":s.add("smhd").set("balance",t.balance||0),n.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":s.add("hmhd");break;case"Subtitle":if(s.add("sthd"),"stpp"===t.type)n.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");break;default:s.add("nmhd")}t.description&&n.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){n.addBox(e)})),s.add("dinf").add("dref").addEntry((new f["url Box"]).set("flags",1));var p=s.add("stbl");return p.add("stsd").addEntry(n),p.add("stts").set("sample_counts",[]).set("sample_deltas",[]),p.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),p.add("stco").set("chunk_offsets",[]),p.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(r),t.id}},f.Box.prototype.computeSize=function(e){var t=e||new l;t.endianness=l.BIG_ENDIAN,this.write(t)},g.prototype.addSample=function(e,t,r){var i=r||{},s={},n=this.getTrackById(e);if(null!==n){s.number=n.samples.length,s.track_id=n.tkhd.track_id,s.timescale=n.mdia.mdhd.timescale,s.description_index=i.sample_description_index?i.sample_description_index-1:0,s.description=n.mdia.minf.stbl.stsd.entries[s.description_index],s.data=t,s.size=t.byteLength,s.alreadyRead=s.size,s.duration=i.duration||1,s.cts=i.cts||0,s.dts=i.dts||0,s.is_sync=i.is_sync||!1,s.is_leading=i.is_leading||0,s.depends_on=i.depends_on||0,s.is_depended_on=i.is_depended_on||0,s.has_redundancy=i.has_redundancy||0,s.degradation_priority=i.degradation_priority||0,s.offset=0,s.subsamples=i.subsamples,n.samples.push(s),n.samples_size+=s.size,n.samples_duration+=s.duration,void 0===n.first_dts&&(n.first_dts=i.dts),this.processSamples();var a=this.createSingleSampleMoof(s);return this.addBox(a),a.computeSize(),a.trafs[0].truns[0].data_offset=a.size+8,this.add("mdat").data=new Uint8Array(t),s}},g.prototype.createSingleSampleMoof=function(e){var t=0;t=e.is_sync?1<<25:65536;var r=new f.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var i=r.add("traf"),s=this.getTrackById(e.track_id);return i.add("tfhd").set("track_id",e.track_id).set("flags",f.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add("tfdt").set("baseMediaDecodeTime",e.dts-(s.first_dts||0)),i.add("trun").set("flags",f.TRUN_FLAGS_DATA_OFFSET|f.TRUN_FLAGS_DURATION|f.TRUN_FLAGS_SIZE|f.TRUN_FLAGS_FLAGS|f.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[t]).set("sample_composition_time_offset",[e.cts-e.dts]),r},g.prototype.lastMoofIndex=0,g.prototype.samplesDataSize=0,g.prototype.resetTables=function(){var e,t,r,i,s,n;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=s[a].grouping_type+"/0",(o=new d(s[a].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=o))}else for(a=0;a=2&&(l=i[a].grouping_type+"/0",o=new d(i[a].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=o))},g.setSampleGroupProperties=function(e,t,r,i){var s,n;for(s in t.sample_groups=[],i){var a;if(t.sample_groups[s]={},t.sample_groups[s].grouping_type=i[s].grouping_type,t.sample_groups[s].grouping_type_parameter=i[s].grouping_type_parameter,r>=i[s].last_sample_in_run&&(i[s].last_sample_in_run<0&&(i[s].last_sample_in_run=0),i[s].entry_index++,i[s].entry_index<=i[s].sbgp.entries.length-1&&(i[s].last_sample_in_run+=i[s].sbgp.entries[i[s].entry_index].sample_count)),i[s].entry_index<=i[s].sbgp.entries.length-1?t.sample_groups[s].group_description_index=i[s].sbgp.entries[i[s].entry_index].group_description_index:t.sample_groups[s].group_description_index=-1,0!==t.sample_groups[s].group_description_index)a=i[s].fragment_description?i[s].fragment_description:i[s].description,t.sample_groups[s].group_description_index>0?(n=t.sample_groups[s].group_description_index>65535?(t.sample_groups[s].group_description_index>>16)-1:t.sample_groups[s].group_description_index-1,a&&n>=0&&(t.sample_groups[s].description=a.entries[n])):a&&a.version>=2&&a.default_group_description_index>0&&(t.sample_groups[s].description=a.entries[a.default_group_description_index-1])}},g.process_sdtp=function(e,t,r){t&&(e?(t.is_leading=e.is_leading[r],t.depends_on=e.sample_depends_on[r],t.is_depended_on=e.sample_is_depended_on[r],t.has_redundancy=e.sample_has_redundancy[r]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))},g.prototype.buildSampleLists=function(){var e,t;for(e=0;eb&&(v++,b<0&&(b=0),b+=n.sample_counts[v]),t>0?(e.samples[t-1].duration=n.sample_deltas[v],e.samples_duration+=e.samples[t-1].duration,A.dts=e.samples[t-1].dts+e.samples[t-1].duration):A.dts=0,a?(t>=w&&(S++,w<0&&(w=0),w+=a.sample_counts[S]),A.cts=e.samples[t].dts+a.sample_offsets[S]):A.cts=A.dts,o?(t==o.sample_numbers[E]-1?(A.is_sync=!0,E++):(A.is_sync=!1,A.degradation_priority=0),d&&d.entries[U].sample_delta+x==t+1&&(A.subsamples=d.entries[U].subsamples,x+=d.entries[U].sample_delta,U++)):A.is_sync=!0,g.process_sdtp(e.mdia.minf.stbl.sdtp,A,A.number),A.degradation_priority=f?f.priority[t]:0,d&&d.entries[U].sample_delta+x==t&&(A.subsamples=d.entries[U].subsamples,x+=d.entries[U].sample_delta),(h.length>0||u.length>0)&&g.setSampleGroupProperties(e,A,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}},g.prototype.updateSampleLists=function(){var e,t,r,i,s,n,a,o,l,d,h,u,c,p,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&g.initSampleGroups(u,h,h.sbgps,u.mdia.minf.stbl.sgpds,h.sgpds),t=0;t0?p.dts=u.samples[u.samples.length-2].dts+u.samples[u.samples.length-2].duration:(h.tfdt?p.dts=h.tfdt.baseMediaDecodeTime:p.dts=0,u.first_traf_merged=!0),p.cts=p.dts,_.flags&f.TRUN_FLAGS_CTS_OFFSET&&(p.cts=p.dts+_.sample_composition_time_offset[r]),m=a,_.flags&f.TRUN_FLAGS_FLAGS?m=_.sample_flags[r]:0===r&&_.flags&f.TRUN_FLAGS_FIRST_FLAG&&(m=_.first_sample_flags),p.is_sync=!(m>>16&1),p.is_leading=m>>26&3,p.depends_on=m>>24&3,p.is_depended_on=m>>22&3,p.has_redundancy=m>>20&3,p.degradation_priority=65535&m;var y=!!(h.tfhd.flags&f.TFHD_FLAG_BASE_DATA_OFFSET),b=!!(h.tfhd.flags&f.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),v=!!(_.flags&f.TRUN_FLAGS_DATA_OFFSET),w=0;w=y?h.tfhd.base_data_offset:b||0===t?d.start:o,p.offset=0===t&&0===r?v?w+_.data_offset:w:o,o=p.offset+p.size,(h.sbgps.length>0||h.sgpds.length>0||u.mdia.minf.stbl.sbgps.length>0||u.mdia.minf.stbl.sgpds.length>0)&&g.setSampleGroupProperties(u,p,p.number_in_traf,h.sample_groups_info)}}if(h.subs){u.has_fragment_subsamples=!0;var S=h.first_sample_index;for(t=0;t-1))return null;var n=(r=this.stream.buffers[s]).byteLength-(i.offset+i.alreadyRead-r.fileStart);if(i.size-i.alreadyRead<=n)return a.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-r.fileStart)+" read size: "+(i.size-i.alreadyRead)+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,r,i.offset+i.alreadyRead-r.fileStart,i.size-i.alreadyRead),r.usedBytes+=i.size-i.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead=i.size,i;if(0===n)return null;a.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-r.fileStart)+" read size: "+n+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,r,i.offset+i.alreadyRead-r.fileStart,n),i.alreadyRead+=n,r.usedBytes+=n,this.stream.logBufferLevel()}},g.prototype.releaseSample=function(e,t){var r=e.samples[t];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},g.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},g.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec()}return t},g.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(r.protection=n.ipro.protections[n.iinf.item_infos[e].protection_index-1]),n.iinf.item_infos[e].item_type?r.type=n.iinf.item_infos[e].item_type:r.type="mime",r.content_type=n.iinf.item_infos[e].content_type,r.content_encoding=n.iinf.item_infos[e].content_encoding;if(n.grpl)for(e=0;e0&&f.property_index-1-1))return null;var o=(t=this.stream.buffers[n]).byteLength-(s.offset+s.alreadyRead-t.fileStart);if(!(s.length-s.alreadyRead<=o))return a.debug("ISOFile","Getting item #"+e+" extent #"+i+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-t.fileStart)+" read size: "+o+" full extent size: "+s.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,t,s.offset+s.alreadyRead-t.fileStart,o),s.alreadyRead+=o,r.alreadyRead+=o,t.usedBytes+=o,this.stream.logBufferLevel(),null;a.debug("ISOFile","Getting item #"+e+" extent #"+i+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-t.fileStart)+" read size: "+(s.length-s.alreadyRead)+" full extent size: "+s.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,t,s.offset+s.alreadyRead-t.fileStart,s.length-s.alreadyRead),t.usedBytes+=s.length-s.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=s.length-s.alreadyRead,s.alreadyRead=s.length}}return r.alreadyRead===r.size?r:null},g.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var r=0;r0?this.moov.traks[e].samples[0].duration:0),t.push(i)}return t},f.Box.prototype.printHeader=function(e){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},f.FullBox.prototype.printHeader=function(e){this.size+=4,f.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},f.Box.prototype.print=function(e){this.printHeader(e)},f.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)},f.tkhdBox.prototype.print=function(e){f.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)};var y={createFile:function(e,t){var r=void 0===e||e,i=new g(t);return i.discardMdatData=!r,i}};t.createFile=y.createFile}));function Vr(e){return e.reduce(((e,t)=>256*e+t))}function Wr(e){const t=[101,103,119,99],r=e.length-28,i=e.slice(r,r+t.length);return t.every(((e,t)=>e===i[t]))}Hr.Log,Hr.MP4BoxStream,Hr.DataStream,Hr.MultiBufferStream,Hr.MPEG4DescriptorParser,Hr.BoxParser,Hr.XMLSubtitlein4Parser,Hr.Textin4Parser,Hr.ISOFile,Hr.createFile;class jr{constructor(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=new Uint8Array([30,158,90,33,244,57,83,165,2,70,35,87,215,231,226,108]),this.t=this.n.slice().reverse()}destroy(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=null,this.t=null}transport(e){if(!this.s&&this.l>50)return e;if(this.l++,this.d)return e;const t=new Uint8Array(e);if(this.A){if(!(this.c~e))}(e.slice(r+32,r+32+t))]}return null}(t,this.t);if(!r)return e;const i=function(e){try{if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiate)throw null;{const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(!(e instanceof WebAssembly.Module&&new WebAssembly.Instance(e)instanceof WebAssembly.Instance))throw null}}catch(e){return new Error("video_error_4")}let t;try{t={env:{__handle_stack_overflow:()=>e(new Error("video_error_1")),memory:new WebAssembly.Memory({initial:256,maximum:256})}}}catch(e){return new Error("video_error_5")}return t}(e);if(i instanceof Error)return console.error(i.message),this.d=!0,e;this.A=!0,this.u=r[1],Wr(t)&&this.c++,WebAssembly.instantiate(r[2],i).then((e=>{if("function"!=typeof(t=e.instance.exports).parse||"object"!=typeof t.memory)return this.d=!0,void console.error("video_error_3");var t;this.s=e.instance.exports,this.a=new Uint8Array(this.s.memory.buffer)})).catch((e=>{this.d=!0,console.error("video_error_6")}))}return e}}const Yr=16,qr=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Kr=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Xr(e){const t=[];for(let r=0,i=e.length;r1===(e=e.toString(16)).length?"0"+e:e)).join("")}function Jr(e){const t=[];for(let r=0,i=e.length;r>>6),t.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)t.push(224|i>>>12),t.push(128|i>>>6&63),t.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw t.push(i),new Error("input is not supported");r++,t.push(240|i>>>18&28),t.push(128|i>>>12&63),t.push(128|i>>>6&63),t.push(128|63&i)}}return t}function Qr(e){const t=[];for(let r=0,i=e.length;r=240&&e[r]<=247?(t.push(String.fromCodePoint(((7&e[r])<<18)+((63&e[r+1])<<12)+((63&e[r+2])<<6)+(63&e[r+3]))),r+=3):e[r]>=224&&e[r]<=239?(t.push(String.fromCodePoint(((15&e[r])<<12)+((63&e[r+1])<<6)+(63&e[r+2]))),r+=2):e[r]>=192&&e[r]<=223?(t.push(String.fromCodePoint(((31&e[r])<<6)+(63&e[r+1]))),r++):t.push(String.fromCodePoint(e[r]));return t.join("")}function ei(e,t){const r=31&t;return e<>>32-r}function ti(e){return(255&qr[e>>>24&255])<<24|(255&qr[e>>>16&255])<<16|(255&qr[e>>>8&255])<<8|255&qr[255&e]}function ri(e){return e^ei(e,2)^ei(e,10)^ei(e,18)^ei(e,24)}function ii(e){return e^ei(e,13)^ei(e,23)}function si(e,t,r){const i=new Array(4),s=new Array(4);for(let t=0;t<4;t++)s[0]=255&e[4*t],s[1]=255&e[4*t+1],s[2]=255&e[4*t+2],s[3]=255&e[4*t+3],i[t]=s[0]<<24|s[1]<<16|s[2]<<8|s[3];for(let e,t=0;t<32;t+=4)e=i[1]^i[2]^i[3]^r[t+0],i[0]^=ri(ti(e)),e=i[2]^i[3]^i[0]^r[t+1],i[1]^=ri(ti(e)),e=i[3]^i[0]^i[1]^r[t+2],i[2]^=ri(ti(e)),e=i[0]^i[1]^i[2]^r[t+3],i[3]^=ri(ti(e));for(let e=0;e<16;e+=4)t[e]=i[3-e/4]>>>24&255,t[e+1]=i[3-e/4]>>>16&255,t[e+2]=i[3-e/4]>>>8&255,t[e+3]=255&i[3-e/4]}function ni(e,t,r){const i=new Array(4),s=new Array(4);for(let t=0;t<4;t++)s[0]=255&e[0+4*t],s[1]=255&e[1+4*t],s[2]=255&e[2+4*t],s[3]=255&e[3+4*t],i[t]=s[0]<<24|s[1]<<16|s[2]<<8|s[3];i[0]^=2746333894,i[1]^=1453994832,i[2]^=1736282519,i[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=i[1]^i[2]^i[3]^Kr[r+0],t[r+0]=i[0]^=ii(ti(e)),e=i[2]^i[3]^i[0]^Kr[r+1],t[r+1]=i[1]^=ii(ti(e)),e=i[3]^i[0]^i[1]^Kr[r+2],t[r+2]=i[2]^=ii(ti(e)),e=i[0]^i[1]^i[2]^Kr[r+3],t[r+3]=i[3]^=ii(ti(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function ai(e,t,r){let{padding:i="pkcs#7",mode:s,iv:n=[],output:a="string"}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("cbc"===s&&("string"==typeof n&&(n=Xr(n)),16!==n.length))throw new Error("iv is invalid");if("string"==typeof t&&(t=Xr(t)),16!==t.length)throw new Error("key is invalid");if(e="string"==typeof e?0!==r?Jr(e):Xr(e):[...e],("pkcs#5"===i||"pkcs#7"===i)&&0!==r){const t=Yr-e.length%Yr;for(let r=0;r=Yr;){const t=e.slice(u,u+16),i=new Array(16);if("cbc"===s)for(let e=0;e2&&void 0!==arguments[2]&&arguments[2];const i=e.byteLength;let s=5;for(;si)break;let a=e[s+4],o=!1;if(r?(a=a>>>1&63,o=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(a)):(a&=31,o=1===a||5===a),o){const r=ai(e.slice(s+4+2,s+4+n),t,0,{padding:"none",output:"array"});e.set(r,s+4+2)}s=s+4+n}return e}const di={init:0,findFirstStartCode:1,findSecondStartCode:2};class hi extends class{on(e,t,r){const i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:r}),this}once(e,t,r){const i=this;function s(){i.off(e,s);for(var n=arguments.length,a=new Array(n),o=0;o1?r-1:0),s=1;s{delete r[e]})),void delete this.e;const i=r[e],s=[];if(i&&t)for(let e=0,r=i.length;e=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(!(!1&this.tempBuffer[this.parsedOffset+1])){this.versionLayer=this.tempBuffer[this.parsedOffset+1],this.state=di.findFirstStartCode,this.fisrtStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==di.findFirstStartCode){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(this.tempBuffer[this.parsedOffset+1]==this.versionLayer){this.state=di.findSecondStartCode,this.secondStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==di.findSecondStartCode){let e=this.tempBuffer.slice(this.fisrtStartCodeOffset,this.secondStartCodeOffset);this.emit("data",e,t),this.tempBuffer=this.tempBuffer.slice(this.secondStartCodeOffset),this.fisrtStartCodeOffset=0,this.parsedOffset=2,this.state=di.findFirstStartCode}}}}function ui(e,t,r){for(let i=2;i3&&void 0!==arguments[3]&&arguments[3];const s=e.byteLength;let n=5;for(;ns)break;let o=e[n+4],l=!1;if(i?(o=o>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,l=1===o||5===o),l){const i=ui(e.slice(n+4,n+4+a),t,r);e.set(i,n+4)}n=n+4+a}return e}Date.now||(Date.now=function(){return(new Date).getTime()}),t().then((e=>{!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[],s=[],n={},a=new AbortController,o=null,l=null,d=null,y=null,b=null,S=null,Ge=!1,je=!1,qe=!!xt(r),Ke=!1,nt=null,ft=null,Bt=null,Ct=[],Tt=null,kt=null,Dt=0,Pt=0,Lt=null,Wt=null,jt=0,Yt=0,Jt=!1,or=!1,lr=!1,dr=null,hr=null,ur=null,fr=!1,cr=()=>{const e=Et();return{debug:e.debug,debugLevel:e.debugLevel,debugUuid:e.debugUuid,useOffscreen:e.useOffscreen,useWCS:e.useWCS,useMSE:e.useMSE,videoBuffer:e.videoBuffer,videoBufferDelay:e.videoBufferDelay,openWebglAlignment:e.openWebglAlignment,playType:e.playType,hasAudio:e.hasAudio,hasVideo:e.hasVideo,playbackRate:1,playbackForwardMaxRateDecodeIFrame:e.playbackForwardMaxRateDecodeIFrame,playbackIsCacheBeforeDecodeForFpsRender:e.playbackConfig.isCacheBeforeDecodeForFpsRender,sampleRate:0,networkDelay:e.networkDelay,visibility:!0,useSIMD:e.useSIMD,isRecording:!1,recordType:e.recordType,isNakedFlow:e.isNakedFlow,checkFirstIFrame:e.checkFirstIFrame,audioBufferSize:1024,isM7sCrypto:e.isM7sCrypto,m7sCryptoAudio:e.m7sCryptoAudio,cryptoKey:e.cryptoKey,cryptoIV:e.cryptoIV,isSm4Crypto:e.isSm4Crypto,sm4CryptoKey:e.sm4CryptoKey,isXorCrypto:e.isXorCrypto,isHls265:!1,isFlv:e.isFlv,isFmp4:e.isFmp4,isMpeg4:e.isMpeg4,isFmp4Private:e.isFmp4Private,isEmitSEI:e.isEmitSEI,isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isDropSameTimestampGop:e.isDropSameTimestampGop,mseDecodeAudio:e.mseDecodeAudio,nakedFlowH265DemuxUseNew:e.nakedFlowH265DemuxUseNew}};"VideoEncoder"in self&&(n={hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:new VideoDecoder({output:function(e){if(n.isEmitInfo||(yr.debug.log("worker","Webcodecs Video Decoder initSize"),postMessage({cmd:U,w:e.codedWidth,h:e.codedHeight}),n.isEmitInfo=!0,n.offscreenCanvas=new OffscreenCanvas(e.codedWidth,e.codedHeight),n.offscreenCanvasCtx=n.offscreenCanvas.getContext("2d")),gt(e.createImageBitmap))e.createImageBitmap().then((t=>{n.offscreenCanvasCtx.drawImage(t,0,0,e.codedWidth,e.codedHeight);let r=n.offscreenCanvas.transferToImageBitmap();postMessage({cmd:x,buffer:r,delay:yr.delay,ts:0},[r]),vt(e)}));else{n.offscreenCanvasCtx.drawImage(e,0,0,e.codedWidth,e.codedHeight);let t=n.offscreenCanvas.transferToImageBitmap();postMessage({cmd:x,buffer:t,delay:yr.delay,ts:0},[t]),vt(e)}},error:function(e){yr.debug.error("worker","VideoDecoder error",e)}}),decode:function(e,t,r){const i=e[0]>>4==1;if(n.hasInit){const r=new EncodedVideoChunk({data:e.slice(5),timestamp:t,type:i?Ve:We});n.decoder.decode(r)}else if(i&&0===e[1]){const t=15&e[0];postMessage({cmd:F,code:t});const r=pt(e.slice(5));yr._opt.recordType===g&&postMessage({cmd:I,buffer:e,codecId:t},[e.buffer]),n.decoder.configure(r),n.hasInit=!0}},reset(){n.hasInit=!1,n.isEmitInfo=!1,n.offscreenCanvas=null,n.offscreenCanvasCtx=null}});let pr=function(){if(fr=!0,yr.fetchStatus!==Je||At(yr._opt.isChrome)){if(a)try{a.abort(),a=null}catch(e){yr.debug.log("worker","abort catch",e)}}else a=null,yr.debug.log("worker",`abort() and not abortController.abort() _status is ${yr.fetchStatus} and _isChrome is ${yr._opt.isChrome}`)},mr={init(){mr.lastBuf=null,mr.vps=null,mr.sps=null,mr.pps=null,mr.streamType=null,mr.localDts=0,mr.isSendSeqHeader=!1},destroy(){mr.lastBuf=null,mr.vps=null,mr.sps=null,mr.pps=null,mr.streamType=null,mr.localDts=0,mr.isSendSeqHeader=!1},dispatch(e){const t=new Uint8Array(e);mr.extractNALu$2(t)},getNaluDts(){let e=mr.localDts;return mr.localDts=mr.localDts+40,e},getNaluAudioDts(){const e=yr._opt.sampleRate,t=yr._opt.audioBufferSize;return mr.localDts+parseInt(t/e*1e3)},extractNALu(e){let t,r,i=0,s=e.byteLength,n=0,a=[];for(;i1)for(let e=0;e{const t=Ot(e);t===De||t===Ie?mr.handleVideoH264Nalu(e):$t(t)&&i.push(e)})),1===i.length)mr.handleVideoH264Nalu(i[0]);else if(Vt(i)){const e=Ot(i[0]),t=Ht(e);mr.handleVideoH264NaluList(i,t,e)}else i.forEach((e=>{mr.handleVideoH264Nalu(e)}))}else if(mr.streamType===Be)if(yr._opt.nakedFlowH265DemuxUseNew){const t=mr.handleAddNaluStartCode(e),r=mr.extractNALu(t);if(0===r.length)return void yr.debug.warn("worker","handleVideoNalu","h265 naluList.length === 0");const i=[];if(r.forEach((e=>{const t=rr(e);t===Oe||t===Ne||t===Me?mr.handleVideoH265Nalu(e):sr(t)&&i.push(e)})),1===i.length)mr.handleVideoH265Nalu(i[0]);else if(ar(i)){const e=rr(i[0]),t=nr(e);mr.handleVideoH265NaluList(i,t,e)}else i.forEach((e=>{this.handleVideoH265Nalu(e)}))}else rr(e)===Oe?mr.extractH265PPS(e):mr.handleVideoH265Nalu(e)},extractH264PPS(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{Gt(Ot(e))?mr.extractH264SEI(e):mr.handleVideoH264Nalu(e)}))},extractH265PPS(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{ir(rr(e))?mr.extractH265SEI(e):mr.handleVideoH265Nalu(e)}))},extractH264SEI(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{mr.handleVideoH264Nalu(e)}))},extractH265SEI(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{mr.handleVideoH265Nalu(e)}))},handleAddNaluStartCode(e){const t=[0,0,0,1],r=new Uint8Array(e.length+t.length);return r.set(t),r.set(e,t.length),r},handleVideoH264Nalu(e){const t=Ot(e);switch(t){case Ie:mr.sps=e;break;case De:mr.pps=e}if(mr.isSendSeqHeader){if(mr.sps&&mr.pps){const e=Rt({sps:mr.sps,pps:mr.pps}),t=mr.getNaluDts();yr.decode(e,{type:Q,ts:t,isIFrame:!0,cts:0}),mr.sps=null,mr.pps=null}if($t(t)){const r=Ht(t),i=mr.getNaluDts(),s=Mt(e,r);mr.doDecode(s,{type:Q,ts:i,isIFrame:r,cts:0})}else yr.debug.warn("work",`handleVideoH264Nalu Avc Seq Head is ${t}`)}else if(mr.sps&&mr.pps){mr.isSendSeqHeader=!0;const e=Rt({sps:mr.sps,pps:mr.pps});yr.decode(e,{type:Q,ts:0,isIFrame:!0,cts:0}),mr.sps=null,mr.pps=null}},handleVideoH264NaluList(e,t,r){if(mr.isSendSeqHeader){const i=mr.getNaluDts(),s=Nt(e.reduce(((e,t)=>{const r=Kt(e),i=Kt(t),s=new Uint8Array(r.byteLength+i.byteLength);return s.set(r,0),s.set(i,r.byteLength),s})),t);mr.doDecode(s,{type:Q,ts:i,isIFrame:t,cts:0}),yr.debug.log("worker",`handleVideoH264NaluList list size is ${e.length} package length is ${s.byteLength} isIFrame is ${t},nalu type is ${r}, dts is ${i}`)}else yr.debug.warn("worker","handleVideoH264NaluList isSendSeqHeader is false")},handleVideoH265Nalu(e){const t=rr(e);switch(t){case Me:mr.vps=e;break;case Ne:mr.sps=e;break;case Oe:mr.pps=e}if(mr.isSendSeqHeader){if(mr.vps&&mr.sps&&mr.pps){const e=Qt({vps:mr.vps,sps:mr.sps,pps:mr.pps}),t=mr.getNaluDts();yr.decode(e,{type:Q,ts:t,isIFrame:!0,cts:0}),mr.vps=null,mr.sps=null,mr.pps=null}if(sr(t)){const r=nr(t),i=mr.getNaluDts(),s=er(e,r);mr.doDecode(s,{type:Q,ts:i,isIFrame:r,cts:0})}else yr.debug.warn("work",`handleVideoH265Nalu HevcSeqHead is ${t}`)}else if(mr.vps&&mr.sps&&mr.pps){mr.isSendSeqHeader=!0;const e=Qt({vps:mr.vps,sps:mr.sps,pps:mr.pps});yr.decode(e,{type:Q,ts:0,isIFrame:!0,cts:0}),mr.vps=null,mr.sps=null,mr.pps=null}},handleVideoH265NaluList(e,t,r){if(mr.isSendSeqHeader){const i=mr.getNaluDts(),s=tr(e.reduce(((e,t)=>{const r=Kt(e),i=Kt(t),s=new Uint8Array(r.byteLength+i.byteLength);return s.set(r,0),s.set(i,r.byteLength),s})),t);mr.doDecode(s,{type:Q,ts:i,isIFrame:t,cts:0}),yr.debug.log("worker",`handleVideoH265NaluList list size is ${e.length} package length is ${s.byteLength} isIFrame is ${t},nalu type is ${r}, dts is ${i}`)}else yr.debug.warn("worker","handleVideoH265NaluList isSendSeqHeader is false")},doDecode(e,t){yr.calcNetworkDelay(t.ts),t.isIFrame&&yr.calcIframeIntervalTimestamp(t.ts),postMessage({cmd:z,type:me,value:e.byteLength}),postMessage({cmd:z,type:_e,value:t.ts}),yr.decode(e,t)}},_r={LOG_NAME:"worker fmp4Demuxer",mp4Box:Hr.createFile(),offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){_r.mp4Box.onReady=_r.onReady,_r.mp4Box.onError=_r.onError,_r.mp4Box.onSamples=_r.onSamples},initTransportDescarmber(){_r.transportDescarmber=new jr},_getSeqHeader(e){const t=_r.mp4Box.getTrackById(e.id);for(const e of t.mdia.minf.stbl.stsd.entries)if(e.avcC||e.hvcC){const t=new Hr.DataStream(void 0,0,Hr.DataStream.BIG_ENDIAN);let r=[];e.avcC?(e.avcC.write(t),r=[23,0,0,0,0]):(_r.isHevc=!0,dr=!0,e.hvcC.write(t),r=[28,0,0,0,0]);const i=new Uint8Array(t.buffer,8),s=new Uint8Array(r.length+i.length);return s.set(r,0),s.set(i,r.length),s}return null},onReady(e){yr.debug.log(_r.LOG_NAME,"onReady()",e);const t=e.videoTracks[0],r=e.audioTracks[0];if(t){_r.videoTrackId=t.id;const e=_r._getSeqHeader(t);e&&(yr.debug.log(_r.LOG_NAME,"seqHeader"),yr.decodeVideo(e,0,!0,0)),_r.mp4Box.setExtractionOptions(t.id)}if(r&&yr._opt.hasAudio){_r.audioTrackId=r.id;const e=r.audio||{},t=dt.indexOf(e.sample_rate),i=r.codec.replace("mp4a.40.","");_r.mp4Box.setExtractionOptions(r.id);const s=at({profile:parseInt(i,10),sampleRate:t,channel:e.channel_count});yr.debug.log(_r.LOG_NAME,"aacADTSHeader"),yr.decodeAudio(s,0)}_r.mp4Box.start()},onError(e){yr.debug.error(_r.LOG_NAME,"mp4Box onError",e)},onSamples(e,t,r){if(e===_r.videoTrackId)for(const e of r){const t=e.data,r=e.is_sync,i=1e3*e.cts/e.timescale;e.duration,e.timescale,r&&yr.calcIframeIntervalTimestamp(i);let s=null;s=_r.isHevc?tr(t,r):Nt(t,r),postMessage({cmd:z,type:me,value:s.byteLength}),postMessage({cmd:z,type:_e,value:i}),yr.decode(s,{type:Q,ts:i,isIFrame:r,cts:0})}else if(e===_r.audioTrackId){if(yr._opt.hasAudio)for(const e of r){const t=e.data,r=1e3*e.cts/e.timescale;e.duration,e.timescale;const i=new Uint8Array(t.byteLength+2);i.set([175,1],0),i.set(t,2),postMessage({cmd:z,type:pe,value:i.byteLength}),yr.decode(i,{type:J,ts:r,isIFrame:!1,cts:0})}}else yr.debug.warn(_r.LOG_NAME,"onSamples() trackId error",e)},dispatch(e){let t=e;"string"!=typeof e?"object"==typeof e?(_r.transportDescarmber&&(t=_r.transportDescarmber.transport(t)),t.buffer.fileStart=_r.offset,_r.offset+=t.byteLength,_r.mp4Box.appendBuffer(t.buffer)):yr.debug.warn(_r.LOG_NAME,"dispatch()","data is not object",e):yr.debug.warn(_r.LOG_NAME,"dispatch()","data is string",e)},destroy(){_r.mp4Box&&(_r.mp4Box.flush(),_r.mp4Box=null),_r.transportDescarmber&&(_r.transportDescarmber.destroy(),_r.transportDescarmber=null),_r.offset=0,_r.videoTrackId=null,_r.audioTrackId=null,_r.isHevc=!1}},gr={LOG_NAME:"worker mpeg4Demuxer",lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:"init",hasInitVideoCodec:!1,localDts:0,dispatch(e){const t=new Uint8Array(e);gr.extractNALu(t)},destroy(){gr.lastBuffer=new Uint8Array(0),gr.parsedOffset=0,gr.firstStartCodeOffset=0,gr.secondStartCodeOffset=0,gr.state="init",gr.hasInitVideoCodec=!1,gr.localDts=0},extractNALu(e){if(!e||e.byteLength<1)return void yr.debug.warn(gr.LOG_NAME,"extractNALu() buffer error",e);const t=new Uint8Array(gr.lastBuffer.length+e.length);for(t.set(gr.lastBuffer,0),t.set(new Uint8Array(e),gr.lastBuffer.length),gr.lastBuffer=t;;){if("init"===gr.state){let e=!1;for(;gr.lastBuffer.length-gr.parsedOffset>=4;)if(0===gr.lastBuffer[gr.parsedOffset])if(0===gr.lastBuffer[gr.parsedOffset+1])if(1===gr.lastBuffer[gr.parsedOffset+2]){if(182===gr.lastBuffer[gr.parsedOffset+3]){gr.state="findFirstStartCode",gr.firstStartCodeOffset=gr.parsedOffset,gr.parsedOffset+=4,e=!0;break}gr.parsedOffset++}else gr.parsedOffset++;else gr.parsedOffset++;else gr.parsedOffset++;if(e)continue;break}if("findFirstStartCode"===gr.state){let e=!1;for(;gr.lastBuffer.length-gr.parsedOffset>=4;)if(0===gr.lastBuffer[gr.parsedOffset])if(0===gr.lastBuffer[gr.parsedOffset+1])if(1===gr.lastBuffer[gr.parsedOffset+2]){if(182===gr.lastBuffer[gr.parsedOffset+3]){gr.state="findSecondStartCode",gr.secondStartCodeOffset=gr.parsedOffset,gr.parsedOffset+=4,e=!0;break}gr.parsedOffset++}else gr.parsedOffset++;else gr.parsedOffset++;else gr.parsedOffset++;if(e)continue;break}if("findSecondStartCode"===gr.state){if(!(gr.lastBuffer.length-gr.parsedOffset>0))break;{let e,t,r=192&gr.lastBuffer[gr.parsedOffset];e=0==r?gr.secondStartCodeOffset-14:gr.secondStartCodeOffset;let i=0==(192&gr.lastBuffer[gr.firstStartCodeOffset+4]);if(i){if(gr.firstStartCodeOffset-14<0)return void yr.debug.warn(gr.LOG_NAME,"firstStartCodeOffset -14 is",gr.firstStartCodeOffset-14);gr.hasInitVideoCodec||(gr.hasInitVideoCodec=!0,yr.debug.log(gr.LOG_NAME,"setCodec"),vr.setCodec(xe,"")),t=gr.lastBuffer.subarray(gr.firstStartCodeOffset-14,e)}else t=gr.lastBuffer.subarray(gr.firstStartCodeOffset,e);let s=gr.getNaluDts();gr.hasInitVideoCodec?(postMessage({cmd:z,type:me,value:t.byteLength}),postMessage({cmd:z,type:_e,value:s}),vr.decode(t,i?1:0,s)):yr.debug.warn(gr.LOG_NAME,"has not init video codec"),gr.lastBuffer=gr.lastBuffer.subarray(e),gr.firstStartCodeOffset=0==r?14:0,gr.parsedOffset=gr.firstStartCodeOffset+4,gr.state="findFirstStartCode"}}}},getNaluDts(){let e=gr.localDts;return gr.localDts=gr.localDts+40,e}},yr={isPlayer:!0,isPlayback:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:Ze,_opt:cr(),mp3Demuxer:null,startStreamRateAndStatsInterval:function(){yr.stopStreamRateAndStatsInterval(),d=setInterval((()=>{l&&l(0);const e=JSON.stringify({demuxBufferDelay:yr.getVideoBufferLength(),audioDemuxBufferDelay:yr.getAudioBufferLength(),flvBufferByteLength:yr.getFlvBufferLength(),netBuf:yr.networkDelay||0,pushLatestDelay:yr.pushLatestDelay||0,isStreamTsMoreThanLocal:Ke});postMessage({cmd:z,type:ye,value:e})}),1e3)},stopStreamRateAndStatsInterval:function(){d&&(clearInterval(d),d=null)},useOffscreen:function(){return yr._opt.useOffscreen&&"undefined"!=typeof OffscreenCanvas},getDelay:function(e,t){if(!e||yr._opt.hasVideo&&!qe)return-1;if(t===J)return yr.delay;if(yr.preDelayTimestamp&&yr.preDelayTimestamp>e)return yr.preDelayTimestamp-e>1e3&&yr.debug.warn("worker",`getDelay() and preDelayTimestamp is ${yr.preDelayTimestamp} > timestamp is ${e} more than ${yr.preDelayTimestamp-e}ms and return ${yr.delay}`),yr.preDelayTimestamp=e,yr.delay;if(yr.firstTimestamp){if(e){const t=Date.now()-yr.startTimestamp,r=e-yr.firstTimestamp;t>=r?(Ke=!1,yr.delay=t-r):(Ke=!0,yr.delay=r-t)}}else yr.firstTimestamp=e,yr.startTimestamp=Date.now(),yr.delay=-1;return yr.preDelayTimestamp=e,yr.delay},getDelayNotUpdateDelay:function(e,t){if(!e||yr._opt.hasVideo&&!qe)return-1;if(t===J)return yr.pushLatestDelay;if(yr.preDelayTimestamp&&yr.preDelayTimestamp-e>1e3)return yr.debug.warn("worker",`getDelayNotUpdateDelay() and preDelayTimestamp is ${yr.preDelayTimestamp} > timestamp is ${e} more than ${yr.preDelayTimestamp-e}ms and return -1`),-1;if(yr.firstTimestamp){let t=-1;if(e){const r=Date.now()-yr.startTimestamp,i=e-yr.firstTimestamp;r>=i?(Ke=!1,t=r-i):(Ke=!0,t=i-r)}return t}return-1},resetDelay:function(){yr.firstTimestamp=null,yr.startTimestamp=null,yr.delay=-1,yr.dropping=!1},resetAllDelay:function(){yr.resetDelay(),yr.preDelayTimestamp=null},doDecode:function(e){yr._opt.isEmitSEI&&e.type===Q&&yr.isWorkerFetch&&yr.findSei(e.payload,e.ts),yr._opt.useWCS&&yr.useOffscreen()&&e.type===Q&&n.decode?n.decode(e.payload,e.ts,e.cts):e.decoder.decode(e.payload,e.ts,e.isIFrame,e.cts)},decodeNext(e){if(0===i.length)return;const t=e.ts,s=i[0],n=e.type===Q&&Ut(e.payload);if(At(r))n&&(yr.debug.log("worker",`decode data type is ${e.type} and\n ts is ${t} next data type is ${s.type} ts is ${s.ts}\n isVideoSqeHeader is ${n}`),i.shift(),yr.doDecode(s));else{const r=s.ts-t,a=s.type===J&&e.type===Q;(r<=20||a||n)&&(yr.debug.log("worker",`decode data type is ${e.type} and\n ts is ${t} next data type is ${s.type} ts is ${s.ts}\n diff is ${r} and isVideoAndNextAudio is ${a} and isVideoSqeHeader is ${n}`),i.shift(),yr.doDecode(s))}},init:function(){yr.debug.log("worker","init and opt is",JSON.stringify(yr._opt));const e=yr._opt.playType===m,t=yr._opt.playType===_;if(mr.init(),yr.isPlayer=e,yr.isPlayback=t,yr.isPlaybackCacheBeforeDecodeForFpsRender())yr.debug.log("worker","playback and playbackIsCacheBeforeDecodeForFpsRender is true");else{const t=()=>{let t=null;if(i.length){if(yr.isPushDropping)return void yr.debug.warn("worker",`loop() isPushDropping is true and bufferList length is ${i.length}`);if(yr.dropping){for(t=i.shift(),yr.debug.warn("worker",`loop() dropBuffer is dropping and isIFrame ${t.isIFrame} and delay is ${yr.delay} and bufferlist is ${i.length}`);!t.isIFrame&&i.length;)t=i.shift();const e=yr.getDelayNotUpdateDelay(t.ts,t.type);t.isIFrame&&e<=yr.getNotDroppingDelayTs()&&(yr.debug.log("worker","loop() is dropping = false, is iFrame"),yr.dropping=!1,yr.doDecode(t),yr.decodeNext(t))}else if(yr.isPlayback||yr.isPlayUseMSE())for(;i.length;)t=i.shift(),yr.doDecode(t);else if(t=i[0],-1===yr.getDelay(t.ts,t.type))yr.debug.log("worker","loop() common dumex delay is -1 ,data.ts is",t.ts),i.shift(),yr.doDecode(t),yr.decodeNext(t);else if(yr.delay>yr._opt.videoBuffer+yr._opt.videoBufferDelay&&e)yr.hasIframeInBufferList()?(yr.debug.log("worker",`delay is ${yr.delay}, set dropping is true`),yr.resetAllDelay(),yr.dropping=!0,postMessage({cmd:M})):(i.shift(),yr.doDecode(t),yr.decodeNext(t));else for(;i.length;){if(t=i[0],!(yr.getDelay(t.ts,t.type)>yr._opt.videoBuffer)){yr.delay<0&&yr.debug.warn("worker",`loop() do not decode and delay is ${yr.delay}, bufferList is ${i.length}`);break}i.shift(),yr.doDecode(t)}}else-1!==yr.delay&&yr.debug.log("worker","loop() bufferList is empty and reset delay"),yr.resetAllDelay()};yr.stopId=setInterval((()=>{let e=(new Date).getTime();nt||(nt=e);const r=e-nt;r>100&&yr.debug.warn("worker",`loop demux diff time is ${r}`),t(),nt=(new Date).getTime()}),20)}At(yr._opt.checkFirstIFrame)&&(qe=!0)},playbackCacheLoop:function(){yr.stopId&&(clearInterval(yr.stopId),yr.stopId=null);const e=()=>{let e=null;i.length&&(e=i.shift(),yr.doDecode(e))};e();const t=Math.ceil(1e3/(yr.streamFps*yr._opt.playbackRate));yr.debug.log("worker",`playbackCacheLoop fragDuration is ${t}, streamFps is ${yr.streamFps}, streamAudioFps is ${yr.streamAudioFps} ,streamVideoFps is ${yr.streamVideoFps} playbackRate is ${yr._opt.playbackRate}`),yr.stopId=setInterval(e,t)},close:function(){if(yr.debug.log("worker","close"),yr.isDestroyed=!0,pr(),!o||1!==o.readyState&&2!==o.readyState?o&&yr.debug.log("worker",`close() and socket.readyState is ${o.readyState}`):(fr=!0,o.close(1e3,"Client disconnecting")),o=null,yr.stopStreamRateAndStatsInterval(),yr.stopId&&(clearInterval(yr.stopId),yr.stopId=null),yr.mp3Demuxer&&(yr.mp3Demuxer.destroy(),yr.mp3Demuxer=null),yr.writableStream&&At(yr.writableStream.locked)&&yr.writableStream.close().catch((e=>{yr.debug.log("worker","close() and writableStream.close() error",e)})),yr.writableStream=null,br)try{br.clear&&br.clear(),br=null}catch(e){yr.debug.warn("worker","close() and audioDecoder.clear error",e)}if(vr)try{vr.clear&&vr.clear(),vr=null}catch(e){yr.debug.warn("worker","close() and videoDecoder.clear error",e)}l=null,nt=null,Ke=!1,n&&(n.reset&&n.reset(),n=null),yr.firstTimestamp=null,yr.startTimestamp=null,yr.networkDelay=0,yr.streamFps=null,yr.streamAudioFps=null,yr.streamVideoFps=null,yr.delay=-1,yr.pushLatestDelay=-1,yr.preDelayTimestamp=null,yr.dropping=!1,yr.isPushDropping=!1,yr.isPlayer=!0,yr.isPlayback=!1,yr.isWorkerFetch=!1,yr._opt=cr(),yr.webglObj&&(yr.webglObj.destroy(),yr.offscreenCanvas.removeEventListener("webglcontextlost",yr.onOffscreenCanvasWebglContextLost),yr.offscreenCanvas.removeEventListener("webglcontextrestored",yr.onOffscreenCanvasWebglContextRestored),yr.offscreenCanvas=null,yr.offscreenCanvasGL=null,yr.offscreenCanvasCtx=null),i=[],s=[],y=null,b=null,S=null,Ge=!1,je=!1,qe=!1,Jt=!1,or=!1,lr=!1,dr=null,hr=null,Ct=[],Dt=0,Pt=0,ft=null,Bt=null,Lt=null,Wt=null,ur=null,jt=0,Yt=0,Tt=null,kt=null,yr.fetchStatus=Ze,mr.destroy(),_r.destroy(),gr.destroy(),postMessage({cmd:V})},pushBuffer:function(e,t){if(t.type===J&&ot(e)){if(yr.debug.log("worker",`pushBuffer audio ts is ${t.ts}, isAacCodecPacket is true`),yr._opt.isRecordTypeFlv){const t=new Uint8Array(e);postMessage({cmd:q,buffer:t},[t.buffer])}yr.decodeAudio(e,t.ts)}else if(t.type===Q&&t.isIFrame&&Ut(e)){if(yr.debug.log("worker",`pushBuffer video ts is ${t.ts}, isVideoSequenceHeader is true`),yr._opt.isRecordTypeFlv){const t=new Uint8Array(e);postMessage({cmd:K,buffer:t},[t.buffer])}yr.decodeVideo(e,t.ts,t.isIFrame,t.cts)}else{if(yr._opt.isRecording)if(yr._opt.isRecordTypeFlv){const r=new Uint8Array(e);postMessage({cmd:X,type:t.type,buffer:r,ts:t.ts},[r.buffer])}else if(yr._opt.recordType===g)if(t.type===Q){const r=new Uint8Array(e).slice(5);postMessage({cmd:D,buffer:r,isIFrame:t.isIFrame,ts:t.ts,cts:t.cts},[r.buffer])}else if(t.type===J&&yr._opt.isWasmMp4){const r=new Uint8Array(e),i=lt(r)?r.slice(2):r.slice(1);postMessage({cmd:T,buffer:i,ts:t.ts},[i.buffer])}if(yr.isPlayer&&jt>0&&Wt>0&&t.type===Q){const e=t.ts-Wt,r=jt+jt/2;e>r&&yr.debug.log("worker",`pushBuffer video\n ts is ${t.ts}, preTimestamp is ${Wt},\n diff is ${e} and preTimestampDuration is ${jt} and maxDiff is ${r}\n maybe trigger black screen or flower screen\n `)}if(yr.isPlayer&&Wt>0&&t.type===Q&&t.tsv&&(yr.debug.warn("worker",`pushBuffer,\n preTimestamp is ${Wt}, options.ts is ${t.ts},\n diff is ${Wt-t.ts} more than 3600000,\n and resetAllDelay`),yr.resetAllDelay()),yr.isPlayer&&t.ts<=Wt&&Wt>0&&t.type===Q&&(yr.debug.warn("worker",`pushBuffer,\n options.ts is ${t.ts} less than (or equal) preTimestamp is ${Wt} and\n payloadBufferSize is ${e.byteLength} and prevPayloadBufferSize is ${Yt}`),yr._opt.isDropSameTimestampGop&&qe)){const e=yr.hasIframeInBufferList(),t=At(yr.isPushDropping);return yr.debug.log("worker",`pushBuffer, isDropSameTimestampGop is true and\n hasIframe is ${e} and isNotPushDropping is ${t} and next dropBuffer`),void(e&&t?yr.dropBuffer$2():(yr.clearBuffer(!0),xt(yr._opt.checkFirstIFrame)&&xt(r)&&postMessage({cmd:Z})))}if(yr.isPlayer&&qe){const e=yr._opt.videoBuffer+yr._opt.videoBufferDelay,r=yr.getDelayNotUpdateDelay(t.ts,t.type);yr.pushLatestDelay=r,r>e&&yr.delay0&&yr.hasIframeInBufferList()&&!1===yr.isPushDropping&&(yr.debug.log("worker",`pushBuffer(), pushLatestDelay is ${r} more than ${e} and decoder.delay is ${yr.delay} and has iIframe and next decoder.dropBuffer$2()`),yr.dropBuffer$2())}if(yr.isPlayer&&t.type===Q&&(Wt>0&&(jt=t.ts-Wt),Yt=e.byteLength,Wt=t.ts),t.type===J?i.push({ts:t.ts,payload:e,decoder:{decode:yr.decodeAudio},type:J,isIFrame:!1}):t.type===Q&&i.push({ts:t.ts,cts:t.cts,payload:e,decoder:{decode:yr.decodeVideo},type:Q,isIFrame:t.isIFrame}),yr.isPlaybackCacheBeforeDecodeForFpsRender()&&(mt(yr.streamVideoFps)||mt(yr.streamAudioFps))){let e=yr.streamVideoFps,t=yr.streamAudioFps;if(mt(yr.streamVideoFps)&&(e=wt(i,Q),e&&(yr.streamVideoFps=e,postMessage({cmd:O,value:yr.streamVideoFps}),yr.streamFps=t?e+t:e,At(yr._opt.hasAudio)&&(yr.debug.log("worker","playbackCacheBeforeDecodeForFpsRender, _opt.hasAudio is false and set streamAudioFps is 0"),yr.streamAudioFps=0),yr.playbackCacheLoop())),mt(yr.streamAudioFps)&&(t=wt(i,J),t&&(yr.streamAudioFps=t,yr.streamFps=e?e+t:t,yr.playbackCacheLoop())),mt(yr.streamVideoFps)&&mt(yr.streamAudioFps)){const r=i.map((e=>({type:e.type,ts:e.ts})));yr.debug.log("worker",`playbackCacheBeforeDecodeForFpsRender, calc streamAudioFps is ${t}, streamVideoFps is ${e}, bufferListLength is ${i.length}, and ts list is ${JSON.stringify(r)}`)}const r=yr.getAudioBufferLength()>0,s=r?60:40;i.length>=s&&(yr.debug.warn("worker",`playbackCacheBeforeDecodeForFpsRender, bufferListLength is ${i.length} more than ${s}, and hasAudio is ${r} an set streamFps is 25`),yr.streamVideoFps=25,postMessage({cmd:O,value:yr.streamVideoFps}),r?(yr.streamAudioFps=25,yr.streamFps=yr.streamVideoFps+yr.streamAudioFps):yr.streamFps=yr.streamVideoFps,yr.playbackCacheLoop())}}},getVideoBufferLength(){let e=0;return i.forEach((t=>{t.type===Q&&(e+=1)})),e},hasIframeInBufferList:()=>i.some((e=>e.type===Q&&e.isIFrame)),isAllIframeInBufferList(){const e=yr.getVideoBufferLength();let t=0;return i.forEach((e=>{e.type===Q&&e.isIFrame&&(t+=1)})),e===t},getNotDroppingDelayTs:()=>yr._opt.videoBuffer+yr._opt.videoBufferDelay/2,getAudioBufferLength(){let e=0;return i.forEach((t=>{t.type===J&&(e+=1)})),e},getFlvBufferLength(){let e=0;return y&&y.buffer&&(e=y.buffer.byteLength),yr._opt.isNakedFlow&&mr.lastBuf&&(e=mr.lastBuf.byteLength),e},fetchStream:function(e,t){yr.debug.log("worker","fetchStream, url is "+e,"options:",JSON.stringify(t)),yr.isWorkerFetch=!0,t.isFlv?yr._opt.isFlv=!0:t.isFmp4?yr._opt.isFmp4=!0:t.isMpeg4?yr._opt.isMpeg4=!0:t.isNakedFlow&&(yr._opt.isNakedFlow=!0),l=ct((e=>{postMessage({cmd:z,type:ce,value:e})})),yr.startStreamRateAndStatsInterval(),t.isFmp4&&(_r.listenMp4Box(),yr._opt.isFmp4Private&&_r.initTransportDescarmber()),t.protocol===f?(y=new Ft(yr.demuxFlv()),fetch(e,{signal:a.signal}).then((e=>{if(xt(fr))return yr.debug.log("worker","request abort and run res.body.cancel()"),yr.fetchStatus=Ze,void e.body.cancel();if(!St(e))return yr.debug.warn("worker",`fetch response status is ${e.status} and ok is ${e.ok} and emit error and next abort()`),pr(),void postMessage({cmd:z,type:we.fetchError,value:`fetch response status is ${e.status} and ok is ${e.ok}`});if(postMessage({cmd:z,type:ge}),bt())yr.writableStream=new WritableStream({write:e=>a&&a.signal&&a.signal.aborted?(yr.debug.log("worker","writableStream write() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=Qe)):xt(fr)?(yr.debug.log("worker","writableStream write() and requestAbort is true so return"),void(yr.fetchStatus=Qe)):(yr.fetchStatus=Je,l(e.byteLength),void(t.isFlv?y.write(e):t.isFmp4?yr.demuxFmp4(e):t.isMpeg4&&yr.demuxMpeg4(e))),close:()=>{yr.fetchStatus=Qe,y=null,pr(),postMessage({cmd:z,type:fe,value:c})},abort:e=>{if(a&&a.signal&&a.signal.aborted)return yr.debug.log("worker","writableStream abort() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=Qe);y=null,e.name!==Ye&&(pr(),postMessage({cmd:z,type:we.fetchError,value:e.toString()}))}}),e.body.pipeTo(yr.writableStream);else{const r=e.body.getReader(),i=()=>{r.read().then((e=>{let{done:r,value:s}=e;return r?(yr.fetchStatus=Qe,y=null,pr(),void postMessage({cmd:z,type:fe,value:c})):a&&a.signal&&a.signal.aborted?(yr.debug.log("worker","fetchNext().then() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=Qe)):xt(fr)?(yr.debug.log("worker","fetchNext().then() and requestAbort is true so return"),void(yr.fetchStatus=Qe)):(yr.fetchStatus=Je,l(s.byteLength),t.isFlv?y.write(s):t.isFmp4?yr.demuxFmp4(s):t.isMpeg4&&yr.demuxMpeg4(s),void i())})).catch((e=>{if(a&&a.signal&&a.signal.aborted)return yr.debug.log("worker","fetchNext().catch() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=Qe);y=null,e.name!==Ye&&(pr(),postMessage({cmd:z,type:we.fetchError,value:e.toString()}))}))};i()}})).catch((e=>{a&&a.signal&&a.signal.aborted?yr.debug.log("worker","fetch().catch() and abortController.signal.aborted is true so return"):e.name!==Ye&&(pr(),postMessage({cmd:z,type:we.fetchError,value:e.toString()}),y=null)}))):t.protocol===u&&(t.isFlv&&(y=new Ft(yr.demuxFlv())),o=new WebSocket(e),o.binaryType="arraybuffer",o.onopen=()=>{yr.debug.log("worker","fetchStream, WebsocketStream socket open"),postMessage({cmd:z,type:ge}),postMessage({cmd:z,type:ve})},o.onclose=e=>{yr.debug.log("worker",`fetchStream, WebsocketStream socket close and code is ${e.code}`),1006===e.code&&yr.debug.error("worker",`fetchStream, WebsocketStream socket close abnormally and code is ${e.code}`),xt(fr)?yr.debug.log("worker","fetchStream, WebsocketStream socket close and requestAbort is true so return"):(y=null,postMessage({cmd:z,type:fe,value:p}))},o.onerror=e=>{yr.debug.error("worker","fetchStream, WebsocketStream socket error",e),y=null,postMessage({cmd:z,type:we.websocketError,value:e.isTrusted?"websocket user aborted":"websocket error"})},o.onmessage=e=>{l(e.data.byteLength),t.isFlv?y.write(e.data):t.isFmp4?yr.demuxFmp4(e.data):t.isMpeg4?yr.demuxMpeg4(e.data):yr._opt.isNakedFlow?yr.demuxNakedFlow(e.data):yr.demuxM7s(e.data)})},demuxFlv:function*(){yield 9;const e=new ArrayBuffer(4),t=new Uint8Array(e),r=new Uint32Array(e);for(;;){t[3]=0;const e=yield 15,i=e[4];t[0]=e[7],t[1]=e[6],t[2]=e[5];const s=r[0];t[0]=e[10],t[1]=e[9],t[2]=e[8],t[3]=e[11];let n=r[0];const a=(yield s).slice();switch(i){case ee:if(a.byteLength>0){let e=a;xt(yr._opt.m7sCryptoAudio)&&(e=yr.cryptoPayloadAudio(a)),yr.decode(e,{type:J,ts:n})}else yr.debug.warn("worker",`demuxFlv() type is audio and payload.byteLength is ${a.byteLength} and return`);break;case te:if(a.byteLength>=6){const e=a[0];if(yr._isEnhancedH265Header(e))yr._decodeEnhancedH265Video(a,n);else{a[0];const e=a[0]>>4===Xe;if(e&&Ut(a)&&null===dr){const e=15&a[0];dr=e===Ue,hr=Xt(a,dr),yr.debug.log("worker",`demuxFlv() isVideoSequenceHeader is true and isHevc is ${dr} and nalUnitSize is ${hr}`)}e&&yr.calcIframeIntervalTimestamp(n),yr.isPlayer&&yr.calcNetworkDelay(n),r[0]=a[4],r[1]=a[3],r[2]=a[2],r[3]=0;let t=r[0],i=yr.cryptoPayload(a,e);yr.decode(i,{type:Q,ts:n,isIFrame:e,cts:t})}}else yr.debug.warn("worker",`demuxFlv() type is video and payload.byteLength is ${a.byteLength} and return`);break;case re:postMessage({cmd:Y,buffer:a},[a.buffer]);break;default:yr.debug.log("worker",`demuxFlv() type is ${i}`)}}},decode:function(e,t){t.type===J?yr._opt.hasAudio&&(postMessage({cmd:z,type:pe,value:e.byteLength}),yr.isPlayer?yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts}):yr.isPlayback&&(yr.isPlaybackCacheBeforeDecodeForFpsRender(),yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts}))):t.type===Q&&yr._opt.hasVideo&&(postMessage({cmd:z,type:me,value:e.byteLength}),postMessage({cmd:z,type:_e,value:t.ts}),yr.isPlayer?yr.pushBuffer(e,{type:t.type,ts:t.ts,isIFrame:t.isIFrame,cts:t.cts}):yr.isPlayback&&(yr.isPlaybackOnlyDecodeIFrame()?t.isIFrame&&yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts,isIFrame:t.isIFrame}):(yr.isPlaybackCacheBeforeDecodeForFpsRender(),yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts,isIFrame:t.isIFrame}))))},cryptoPayload:function(e,t){let r=e;return yr._opt.isM7sCrypto?yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?r=Gr(e,yr._opt.cryptoKey,yr._opt.cryptoIV,dr):yr.debug.error("worker",`isM7sCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`):yr._opt.isSm4Crypto?yr._opt.sm4CryptoKey&&t?r=li(e,yr._opt.sm4CryptoKey):yr._opt.sm4CryptoKey||yr.debug.error("worker","isSm4Crypto opt.sm4CryptoKey is null"):yr._opt.isXorCrypto&&(yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?r=ci(e,yr._opt.cryptoKey,yr._opt.cryptoIV,dr):yr.debug.error("worker",`isXorCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`)),r},cryptoPayloadAudio:function(e){let t=e;return yr._opt.isM7sCrypto&&(yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?e[0]>>4===Ce&&(t=$r(e,yr._opt.cryptoKey,yr._opt.cryptoIV)):yr.debug.error("worker",`isM7sCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`)),t},setCodecAudio:function(e,t){const r=e[0]>>4,i=e[0]>>1&1;if(ur=r===Ce?i?16:8:0===i?8:16,br&&br.setCodec)if(ot(e)||r===Te||r===ke||r===Fe){yr.debug.log("worker",`setCodecAudio: init audio codec, codeId is ${r}`);const i=r===Ce?e.slice(2):new Uint8Array(0);br.setCodec(r,yr._opt.sampleRate,i),postMessage({cmd:k,buffer:i},[i.buffer]),je=!0,r!==Ce&&(r===Fe?(yr.mp3Demuxer||(yr.mp3Demuxer=new hi(yr),yr.mp3Demuxer.on("data",((e,t)=>{br.decode(e,t)}))),yr.mp3Demuxer.dispatch(e.slice(1),t)):br.decode(e.slice(1),t));{const e=Number("1")||1;setTimeout((()=>{yr.debug.error("worker","jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),yr.close(),postMessage({cmd:N})}),60*e*60*1e3)}}else yr.debug.warn("worker","setCodecAudio: hasInitAudioCodec is false, codecId is ",r);else yr.debug.error("worker","setCodecAudio: audioDecoder or audioDecoder.setCodec is null")},decodeAudio:function(e,t){if(yr.isDestroyed)yr.debug.log("worker","decodeAudio, decoder is destroyed and return");else if(xt(r)&&xt(yr._opt.mseDecodeAudio))postMessage({cmd:L,payload:e,ts:t,cts:t},[e.buffer]);else{const r=e[0]>>4;je?r===Fe?yr.mp3Demuxer.dispatch(e.slice(1),t):br.decode(r===Ce?e.slice(2):e.slice(1),t):yr.setCodecAudio(e,t)}},setCodecVideo:function(e){const t=15&e[0];if(vr&&vr.setCodec)if(Ut(e))if(t===Ee||t===Ue){yr.debug.log("worker",`setCodecVideo: init video codec , codecId is ${t}`);const r=e.slice(5);if(t===Ee&&yr._opt.useSIMD){const e=zt(r);if(e.codecWidth>w||e.codecHeight>w)return postMessage({cmd:H}),void yr.debug.warn("worker",`setCodecVideo: SIMD H264 decode video width is too large, width is ${e.codecWidth}, height is ${e.codecHeight}`)}Ge=!0,vr.setCodec(t,r),yr._opt.recordType===g&&postMessage({cmd:I,buffer:e,codecId:t},[e.buffer])}else yr.debug.warn("worker",`setCodecVideo: hasInitVideoCodec is false, codecId is ${t} is not H264 or H265`);else yr.debug.warn("worker",`decodeVideo: hasInitVideoCodec is false, codecId is ${t} and frameType is ${e[0]>>4} and packetType is ${e[1]}`);else yr.debug.error("worker","setCodecVideo: videoDecoder or videoDecoder.setCodec is null")},decodeVideo:function(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(yr.isDestroyed)yr.debug.log("worker","decodeVideo, decoder is destroyed and return");else if(xt(r))postMessage({cmd:P,payload:e,isIFrame:i,ts:t,cts:s,delay:yr.delay},[e.buffer]);else if(Ge)if(!qe&&i&&(qe=!0),qe){if(i&&Ut(e)){const t=15&e[0];let r={};t===Ee?r=zt(e.slice(5)):t===Ue&&(r=Zt(e)),r.codecWidth&&r.codecHeight&&b&&S&&(r.codecWidth!==b||r.codecHeight!==S)&&(yr.debug.warn("worker",`\n decodeVideo: video width or height is changed,\n old width is ${b}, old height is ${S},\n new width is ${r.codecWidth}, new height is ${r.codecHeight},\n and emit change event`),or=!0,postMessage({cmd:G}))}if(or)return void yr.debug.warn("worker","decodeVideo: video width or height is changed, and return");if(lr)return void yr.debug.warn("worker","decodeVideo: simd decode error, and return");if(Ut(e))return void yr.debug.warn("worker","decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void yr.debug.warn("worker",`decodeVideo and payload is too small , payload length is ${e.byteLength}`);const r=e.slice(5);vr.decode(r,i?1:0,t)}else yr.debug.log("worker","decodeVideo first frame is not iFrame");else yr.setCodecVideo(e)},clearBuffer:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];yr.debug.log("worker",`clearBuffer,bufferList length is ${i.length}, need clear is ${e}`),e&&(i=[]),yr.isPlayer&&(yr.resetAllDelay(),xt(yr._opt.checkFirstIFrame)&&(yr.dropping=!0,postMessage({cmd:M}))),xt(yr._opt.checkFirstIFrame)&&At(r)&&(qe=!1)},dropBuffer$2:function(){if(i.length>0){let e=i.findIndex((e=>xt(e.isIFrame)&&e.type===Q));if(yr.isAllIframeInBufferList())for(let t=0;t=yr.getNotDroppingDelayTs()){yr.debug.log("worker",`dropBuffer$2() isAllIframeInBufferList() is true, and index is ${t} and tempDelay is ${s} and notDroppingDelayTs is ${yr.getNotDroppingDelayTs()}`),e=t;break}}if(e>=0){yr.isPushDropping=!0,postMessage({cmd:M});const t=i.length;i=i.slice(e);const r=i.shift();yr.resetAllDelay(),yr.getDelay(r.ts,r.type),yr.doDecode(r),yr.isPushDropping=!1,yr.debug.log("worker",`dropBuffer$2() iFrameIndex is ${e},and old bufferList length is ${t} ,new bufferList is ${i.length} and new delay is ${yr.delay} `)}else yr.isPushDropping=!1}0===i.length&&(yr.isPushDropping=!1)},demuxM7s:function(e){const t=new DataView(e),r=t.getUint32(1,!1),i=t.getUint8(0),s=new ArrayBuffer(4),n=new Uint32Array(s);switch(i){case J:yr.decode(new Uint8Array(e,5),{type:J,ts:r});break;case Q:if(t.byteLength>=11){const i=new Uint8Array(e,5),s=i[0];if(yr._isEnhancedH265Header(s))yr._decodeEnhancedH265Video(i,r);else{const e=t.getUint8(5)>>4==1;if(e&&(yr.calcIframeIntervalTimestamp(r),Ut(i)&&null===dr)){const e=15&i[0];dr=e===Ue}yr.isPlayer&&yr.calcNetworkDelay(r),n[0]=i[4],n[1]=i[3],n[2]=i[2],n[3]=0;let s=n[0],a=yr.cryptoPayload(i,e);yr.decode(a,{type:Q,ts:r,isIFrame:e,cts:s})}}else yr.debug.warn("worker",`demuxM7s() type is video and arrayBuffer length is ${e.byteLength} and return`)}},demuxNakedFlow:function(e){mr.dispatch(e)},demuxFmp4:function(e){const t=new Uint8Array(e);_r.dispatch(t)},demuxMpeg4:function(e){gr.dispatch(e)},_decodeEnhancedH265Video:function(e,t){const r=e[0],i=48&r,s=15&r,n=e.slice(1,5),a=new ArrayBuffer(4),o=new Uint32Array(a),l="a"==String.fromCharCode(n[0]);if(dr=At(l),s===tt){if(i===st){const r=e.slice(5);if(l);else{const i=new Uint8Array(5+r.length);i.set([28,0,0,0,0],0),i.set(r,5),hr=Xt(e,dr),yr.debug.log("worker",`demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is ${dr} and nalUnitSize is ${hr}`),yr.decode(i,{type:Q,ts:t,isIFrame:!0,cts:0})}}}else if(s===rt){let r=e,s=0;const n=i===st;n&&yr.calcIframeIntervalTimestamp(t),l||(o[0]=e[4],o[1]=e[3],o[2]=e[2],o[3]=0,s=o[0],r=tr(e.slice(8),n),r=yr.cryptoPayload(r,n),yr.decode(r,{type:Q,ts:t,isIFrame:n,cts:s}))}else if(s===it){const r=i===st;r&&yr.calcIframeIntervalTimestamp(t);let s=tr(e.slice(5),r);s=yr.cryptoPayload(s,r),yr.decode(s,{type:Q,ts:t,isIFrame:r,cts:0})}},_isEnhancedH265Header:function(e){return(e&et)===et},findSei:function(e,t){let r=4;_t(hr)&&(r=hr),qt(e.slice(5),r).forEach((e=>{const r=dr?e[0]>>>1&63:31&e[0];(dr&&(r===He||r===$e)||At(dr)&&r===Le)&&postMessage({cmd:j,buffer:e,ts:t},[e.buffer])}))},flvHasUnitTypeIDR(e,t){const r=qt(e.slice(5));let i=!1;return r.forEach((e=>{const r=t?e[0]>>>1&63:31&e[0];(t&&(r===ze||r===Re)||At(t)&&r===Pe)&&(i=!0)})),i},calcNetworkDelay:function(e){if(!(qe&&e>0))return;null===ft?(ft=e,Bt=ht()):et?r-t:0;yr.networkDelay=i,i>yr._opt.networkDelay&&yr._opt.playType===m&&(yr.debug.warn("worker",`calcNetworkDelay now dts:${e}, start dts is ${ft} vs start is ${t},local diff is ${r} ,delay is ${i}`),postMessage({cmd:z,type:be,value:i}))},calcIframeIntervalTimestamp:function(e){null===Lt?Lt=e:Lt=yr._opt.playbackForwardMaxRateDecodeIFrame},isPlayUseMSE:function(){return yr.isPlayer&&yr._opt.useMSE&&xt(r)},playbackUpdatePlaybackRate:function(){yr.clearBuffer(!0)},onOffscreenCanvasWebglContextLost:function(e){yr.debug.error("worker","handleOffscreenCanvasWebglContextLost and next try to create webgl"),e.preventDefault(),Jt=!0,yr.webglObj.destroy(),yr.webglObj=null,yr.offscreenCanvasGL=null,setTimeout((()=>{yr.offscreenCanvasGL=yr.offscreenCanvas.getContext("webgl"),yr.offscreenCanvasGL&&yr.offscreenCanvasGL.getContextAttributes().stencil?(yr.webglObj=h(yr.offscreenCanvasGL,yr._opt.openWebglAlignment),Jt=!1):yr.debug.error("worker","handleOffscreenCanvasWebglContextLost, stencil is false")}),500)},onOffscreenCanvasWebglContextRestored:function(e){yr.debug.log("worker","handleOffscreenCanvasWebglContextRestored"),e.preventDefault()},videoInfo:function(e,t,r){postMessage({cmd:F,code:e}),postMessage({cmd:U,w:t,h:r}),b=t,S=r,yr.useOffscreen()&&(yr.offscreenCanvas=new OffscreenCanvas(t,r),yr.offscreenCanvasGL=yr.offscreenCanvas.getContext("webgl"),yr.webglObj=h(yr.offscreenCanvasGL,yr._opt.openWebglAlignment),yr.offscreenCanvas.addEventListener("webglcontextlost",yr.onOffscreenCanvasWebglContextLost,!1),yr.offscreenCanvas.addEventListener("webglcontextrestored",yr.onOffscreenCanvasWebglContextRestored,!1))},audioInfo:function(e,t,r){postMessage({cmd:C,code:e}),postMessage({cmd:B,sampleRate:t,channels:r,depth:ur}),Pt=r},yuvData:function(t,r){if(yr.isDestroyed)return void yr.debug.log("worker","yuvData, decoder is destroyed and return");const i=b*S*3/2;let s=e.HEAPU8.subarray(t,t+i),n=new Uint8Array(s);if(Tt=null,yr.useOffscreen())try{if(Jt)return;yr.webglObj.renderYUV(b,S,n);let e=yr.offscreenCanvas.transferToImageBitmap();postMessage({cmd:x,buffer:e,delay:yr.delay,ts:r},[e])}catch(e){yr.debug.error("worker","yuvData, transferToImageBitmap error is",e)}else postMessage({cmd:x,output:n,delay:yr.delay,ts:r},[n.buffer])},pcmData:function(e,r,i){if(yr.isDestroyed)return void yr.debug.log("worker","pcmData, decoder is destroyed and return");let n=r,a=[],o=0,l=yr._opt.audioBufferSize;for(let r=0;r<2;r++){let i=t.HEAPU32[(e>>2)+r]>>2;a[r]=t.HEAPF32.subarray(i,i+n)}if(Dt){if(!(n>=(r=l-Dt)))return Dt+=n,s[0]=Float32Array.of(...s[0],...a[0]),void(2==Pt&&(s[1]=Float32Array.of(...s[1],...a[1])));Ct[0]=Float32Array.of(...s[0],...a[0].subarray(0,r)),2==Pt&&(Ct[1]=Float32Array.of(...s[1],...a[1].subarray(0,r))),postMessage({cmd:A,buffer:Ct,ts:i},Ct.map((e=>e.buffer))),o=r,n-=r}for(Dt=n;Dt>=l;Dt-=l)Ct[0]=a[0].slice(o,o+=l),2==Pt&&(Ct[1]=a[1].slice(o-l,o)),postMessage({cmd:A,buffer:Ct,ts:i},Ct.map((e=>e.buffer)));Dt&&(s[0]=a[0].slice(o),2==Pt&&(s[1]=a[1].slice(o)))},errorInfo:function(e){null===Tt&&(Tt=ht());const t=ht(),r=ut(kt>0?2*kt:5e3,1e3,5e3),i=t-Tt;i>r&&(yr.debug.warn("worker",`errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is ${kt} and diff is ${i} and maxDiff is ${r}\n and replay`),lr=!0,postMessage({cmd:$}))},sendWebsocketMessage:function(e){o?o.readyState===Se?o.send(e):yr.debug.error("worker","socket is not open"):yr.debug.error("worker","socket is null")},timeEnd:function(){yr.debug.error("worker","jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),yr.close(),postMessage({cmd:N})},postStreamToMain(e,t){postMessage({cmd:W,type:t,buffer:e},[e.buffer])}};yr.debug=new It(yr);let br=null;t.AudioDecoder&&(br=new t.AudioDecoder(yr));let vr=null;e.VideoDecoder&&(vr=new e.VideoDecoder(yr)),postMessage({cmd:E}),self.onmessage=function(e){let t=e.data;switch(t.cmd){case ie:try{yr._opt=Object.assign(yr._opt,JSON.parse(t.opt))}catch(e){}yr.init();break;case se:yr.pushBuffer(t.buffer,t.options);break;case ne:yr.decodeAudio(t.buffer,t.ts);break;case ae:yr.decodeVideo(t.buffer,t.ts,t.isIFrame);break;case de:yr.clearBuffer(t.needClear);break;case he:yr.fetchStream(t.url,JSON.parse(t.opt));break;case oe:yr.close();break;case le:yr.debug.log("worker","updateConfig",t.key,t.value),yr._opt[t.key]=t.value,"playbackRate"===t.key&&(yr.playbackUpdatePlaybackRate(),yr.isPlaybackCacheBeforeDecodeForFpsRender()&&yr.playbackCacheLoop());break;case ue:yr.sendWebsocketMessage(t.message)}}}(e,e)}))})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).crypto$1)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r,n=t(e),s=(r="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-audio.js",document.baseURI).href,async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,n,i;(i=e).ready=new Promise(((e,r)=>{t=e,n=r})),(i=void 0!==i?i:{}).locateFile=function(e,t){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:t+e};var s,o,a,c=Object.assign({},i),u="./this.program",l="object"==typeof window,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";function p(e){return i.locateFile?i.locateFile(e,f):f+e}if(h){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-audio.js",document.baseURI).href),v=m("fs"),y=m("path");f=d?y.dirname(f)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-audio.js",document.baseURI).href)),s=(e,t)=>(e=Z(e)?new URL(e):y.normalize(e),v.readFileSync(e,t?void 0:"utf8")),a=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},o=function(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=Z(e)?new URL(e):y.normalize(e),v.readFile(e,n?void 0:"utf8",((e,i)=>{e?r(e):t(n?i.buffer:i)}))},!i.thisProgram&&process.argv.length>1&&(u=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),i.inspect=()=>"[Emscripten Module object]"}else(l||d)&&(d?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),r&&(f=r),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var _,g,b=i.print||console.log.bind(console),w=i.printErr||console.error.bind(console);Object.assign(i,c),c=null,i.arguments&&i.arguments,i.thisProgram&&(u=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(_=i.wasmBinary),"object"!=typeof WebAssembly&&q("no native wasm support detected");var S,I,A,E,k,C,x,T,B=!1;function D(e,t){e||q(t)}function M(){var e=g.buffer;i.HEAP8=S=new Int8Array(e),i.HEAP16=A=new Int16Array(e),i.HEAPU8=I=new Uint8Array(e),i.HEAPU16=E=new Uint16Array(e),i.HEAP32=k=new Int32Array(e),i.HEAPU32=C=new Uint32Array(e),i.HEAPF32=x=new Float32Array(e),i.HEAPF64=T=new Float64Array(e)}var U=[],P=[],F=[];function R(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)z(i.preRun.shift());ie(U)}function L(){i.noFSInit||Te.init.initialized||Te.init(),Te.ignorePermissions=!1,ie(P)}function O(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)H(i.postRun.shift());ie(F)}function z(e){U.unshift(e)}function N(e){P.unshift(e)}function H(e){F.unshift(e)}var V=0,j=null;function W(e){V++,i.monitorRunDependencies&&i.monitorRunDependencies(V)}function G(e){if(V--,i.monitorRunDependencies&&i.monitorRunDependencies(V),0==V&&j){var t=j;j=null,t()}}function q(e){i.onAbort&&i.onAbort(e),w(e="Aborted("+e+")"),B=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var $,Y,K,X="data:application/octet-stream;base64,",J=e=>e.startsWith(X),Z=e=>e.startsWith("file://");function Q(e){if(e==$&&_)return new Uint8Array(_);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!_&&(l||d)){if("function"==typeof fetch&&!Z(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(o)return new Promise(((t,r)=>{o(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),q(e)}))}function re(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||J(t)||Z(t)||h||"function"!=typeof fetch?te(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),te(t,r,n)}))))}function ne(){var e={a:fn};function t(e,t){return pn=e.exports,g=pn.G,M(),Ut=pn.J,N(pn.H),G(),pn}if(W(),i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return re(_,$,e,(function(e){t(e.instance)})).catch(n),{}}i.locateFile?J($="decoder-pro-audio.wasm")||($=p($)):$=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-audio.js",document.baseURI).href).href;var ie=e=>{for(;e.length>0;)e.shift()(i)};function se(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,S[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=S[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,S[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=S[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(gn(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var oe=(e,t,r)=>{throw new se(e).init(t,r),e},ae=e=>(k[vn()>>2]=e,e),ce={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=ce.isAbs(e),r="/"===e.substr(-1);return(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ce.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ce.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ce.normalize(e.join("/"))},join2:(e,t)=>ce.normalize(e+"/"+t)},ue=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(h)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}q("initRandomDevice")},le=e=>(le=ue())(e),de={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Te.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=ce.isAbs(n)}return(t?"/":"")+(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=de.resolve(e).substr(1),t=de.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),s=Math.min(n.length,i.length),o=s,a=0;a{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&he)return he.decode(e.subarray(t,i));for(var s="";t>10,56320|1023&u)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s},pe=[],me=e=>{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},ve=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,s=r+n-1,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i};function ye(e,t,r){var n=r>0?r:me(e)+1,i=new Array(n),s=ve(e,i,0,i.length);return t&&(i.length=s),i}var _e=()=>{if(!pe.length){var e=null;if(h){var t=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=v.readSync(n,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ye(e,!0)}return pe.shift()},ge={ttys:[],init(){},shutdown(){},register(e,t){ge.ttys[e]={input:[],output:[],ops:t},Te.registerDevice(e,ge.stream_ops)},stream_ops:{open(e){var t=ge.ttys[e.node.rdev];if(!t)throw new Te.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new Te.ErrnoError(60);for(var s=0,o=0;o_e(),put_char(e,t){null===t||10===t?(b(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(fe(e.output,0)),e.output=[])}}},be=e=>{q()},we={ops_table:null,mount:e=>we.createNode(null,"/",16895,0),createNode(e,t,r,n){if(Te.isBlkdev(r)||Te.isFIFO(r))throw new Te.ErrnoError(63);we.ops_table||(we.ops_table={dir:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,lookup:we.node_ops.lookup,mknod:we.node_ops.mknod,rename:we.node_ops.rename,unlink:we.node_ops.unlink,rmdir:we.node_ops.rmdir,readdir:we.node_ops.readdir,symlink:we.node_ops.symlink},stream:{llseek:we.stream_ops.llseek}},file:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:{llseek:we.stream_ops.llseek,read:we.stream_ops.read,write:we.stream_ops.write,allocate:we.stream_ops.allocate,mmap:we.stream_ops.mmap,msync:we.stream_ops.msync}},link:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,readlink:we.node_ops.readlink},stream:{}},chrdev:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:Te.chrdev_stream_ops}});var i=Te.createNode(e,t,r,n);return Te.isDir(i.mode)?(i.node_ops=we.ops_table.dir.node,i.stream_ops=we.ops_table.dir.stream,i.contents={}):Te.isFile(i.mode)?(i.node_ops=we.ops_table.file.node,i.stream_ops=we.ops_table.file.stream,i.usedBytes=0,i.contents=null):Te.isLink(i.mode)?(i.node_ops=we.ops_table.link.node,i.stream_ops=we.ops_table.link.stream):Te.isChrdev(i.mode)&&(i.node_ops=we.ops_table.chrdev.node,i.stream_ops=we.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Te.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Te.isDir(e.mode)?t.size=4096:Te.isFile(e.mode)?t.size=e.usedBytes:Te.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&we.resizeFileStorage(e,t.size)},lookup(e,t){throw Te.genericErrors[44]},mknod:(e,t,r,n)=>we.createNode(e,t,r,n),rename(e,t,r){if(Te.isDir(e.mode)){var n;try{n=Te.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new Te.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Te.lookupNode(e,t);for(var n in r.contents)throw new Te.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=we.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!Te.isLink(e.mode))throw new Te.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,i){var s=e.node.contents;if(i>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-i,n);if(o>8&&s.subarray)t.set(s.subarray(i,i+o),r);else for(var a=0;a0||r+t(we.stream_ops.write(e,t,0,n,r,!1),0)}},Se=(e,t,r,n)=>{var i=n?"":`al ${e}`;o(e,(r=>{D(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),i&&G()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&W()},Ie=(e,t,r,n,i,s)=>{Te.createDataFile(e,t,r,n,i,s)},Ae=i.preloadPlugins||[],Ee=(e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return Ae.forEach((s=>{i||s.canHandle(t)&&(s.handle(e,t,r,n),i=!0)})),i},ke=(e,t,r,n,i,s,o,a,c,u)=>{var l=t?de.resolve(ce.join2(e,t)):e;function d(r){function d(r){u&&u(),a||Ie(e,t,r,n,i,c),s&&s(),G()}Ee(r,l,d,(()=>{o&&o(),G()}))||d(r)}W(),"string"==typeof r?Se(r,(e=>d(e)),o):d(r)},Ce=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},xe=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Te={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=de.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new Te.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=Te.root,i="/",s=0;s40)throw new Te.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(Te.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n>>0)%Te.nameTable.length},hashAddNode(e){var t=Te.hashName(e.parent.id,e.name);e.name_next=Te.nameTable[t],Te.nameTable[t]=e},hashRemoveNode(e){var t=Te.hashName(e.parent.id,e.name);if(Te.nameTable[t]===e)Te.nameTable[t]=e.name_next;else for(var r=Te.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Te.mayLookup(e);if(r)throw new Te.ErrnoError(r,e);for(var n=Te.hashName(e.id,t),i=Te.nameTable[n];i;i=i.name_next){var s=i.name;if(i.parent.id===e.id&&s===t)return i}return Te.lookup(e,t)},createNode(e,t,r,n){var i=new Te.FSNode(e,t,r,n);return Te.hashAddNode(i),i},destroyNode(e){Te.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Te.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=Te.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return Te.lookupNode(e,t),20}catch(e){}return Te.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=Te.lookupNode(e,t)}catch(e){return e.errno}var i=Te.nodePermissions(e,"wx");if(i)return i;if(r){if(!Te.isDir(n.mode))return 54;if(Te.isRoot(n)||Te.getPath(n)===Te.cwd())return 10}else if(Te.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?Te.isLink(e.mode)?32:Te.isDir(e.mode)&&("r"!==Te.flagsToPermissionString(t)||512&t)?31:Te.nodePermissions(e,Te.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Te.MAX_OPEN_FDS;e++)if(!Te.streams[e])return e;throw new Te.ErrnoError(33)},getStreamChecked(e){var t=Te.getStream(e);if(!t)throw new Te.ErrnoError(8);return t},getStream:e=>Te.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Te.FSStream||(Te.FSStream=function(){this.shared={}},Te.FSStream.prototype={},Object.defineProperties(Te.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Te.FSStream,e),-1==t&&(t=Te.nextfd()),e.fd=t,Te.streams[t]=e,e},closeStream(e){Te.streams[e]=null},chrdev_stream_ops:{open(e){var t=Te.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Te.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Te.devices[e]={stream_ops:t}},getDevice:e=>Te.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Te.syncFSRequests++,Te.syncFSRequests>1&&w(`warning: ${Te.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Te.getMounts(Te.root.mount),n=0;function i(e){return Te.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var n,i="/"===r,s=!r;if(i&&Te.root)throw new Te.ErrnoError(10);if(!i&&!s){var o=Te.lookupPath(r,{follow_mount:!1});if(r=o.path,n=o.node,Te.isMountpoint(n))throw new Te.ErrnoError(10);if(!Te.isDir(n.mode))throw new Te.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(a);return c.mount=a,a.root=c,i?Te.root=c:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),c},unmount(e){var t=Te.lookupPath(e,{follow_mount:!1});if(!Te.isMountpoint(t.node))throw new Te.ErrnoError(28);var r=t.node,n=r.mounted,i=Te.getMounts(n);Object.keys(Te.nameTable).forEach((e=>{for(var t=Te.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&Te.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(n);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=Te.lookupPath(e,{parent:!0}).node,i=ce.basename(e);if(!i||"."===i||".."===i)throw new Te.ErrnoError(28);var s=Te.mayCreate(n,i);if(s)throw new Te.ErrnoError(s);if(!n.node_ops.mknod)throw new Te.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Te.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Te.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",i=0;i(void 0===r&&(r=t,t=438),t|=8192,Te.mknod(e,t,r)),symlink(e,t){if(!de.resolve(e))throw new Te.ErrnoError(44);var r=Te.lookupPath(t,{parent:!0}).node;if(!r)throw new Te.ErrnoError(44);var n=ce.basename(t),i=Te.mayCreate(r,n);if(i)throw new Te.ErrnoError(i);if(!r.node_ops.symlink)throw new Te.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=ce.dirname(e),s=ce.dirname(t),o=ce.basename(e),a=ce.basename(t);if(r=Te.lookupPath(e,{parent:!0}).node,n=Te.lookupPath(t,{parent:!0}).node,!r||!n)throw new Te.ErrnoError(44);if(r.mount!==n.mount)throw new Te.ErrnoError(75);var c,u=Te.lookupNode(r,o),l=de.relative(e,s);if("."!==l.charAt(0))throw new Te.ErrnoError(28);if("."!==(l=de.relative(t,i)).charAt(0))throw new Te.ErrnoError(55);try{c=Te.lookupNode(n,a)}catch(e){}if(u!==c){var d=Te.isDir(u.mode),h=Te.mayDelete(r,o,d);if(h)throw new Te.ErrnoError(h);if(h=c?Te.mayDelete(n,a,d):Te.mayCreate(n,a))throw new Te.ErrnoError(h);if(!r.node_ops.rename)throw new Te.ErrnoError(63);if(Te.isMountpoint(u)||c&&Te.isMountpoint(c))throw new Te.ErrnoError(10);if(n!==r&&(h=Te.nodePermissions(r,"w")))throw new Te.ErrnoError(h);Te.hashRemoveNode(u);try{r.node_ops.rename(u,n,a)}catch(e){throw e}finally{Te.hashAddNode(u)}}},rmdir(e){var t=Te.lookupPath(e,{parent:!0}).node,r=ce.basename(e),n=Te.lookupNode(t,r),i=Te.mayDelete(t,r,!0);if(i)throw new Te.ErrnoError(i);if(!t.node_ops.rmdir)throw new Te.ErrnoError(63);if(Te.isMountpoint(n))throw new Te.ErrnoError(10);t.node_ops.rmdir(t,r),Te.destroyNode(n)},readdir(e){var t=Te.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Te.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Te.lookupPath(e,{parent:!0}).node;if(!t)throw new Te.ErrnoError(44);var r=ce.basename(e),n=Te.lookupNode(t,r),i=Te.mayDelete(t,r,!1);if(i)throw new Te.ErrnoError(i);if(!t.node_ops.unlink)throw new Te.ErrnoError(63);if(Te.isMountpoint(n))throw new Te.ErrnoError(10);t.node_ops.unlink(t,r),Te.destroyNode(n)},readlink(e){var t=Te.lookupPath(e).node;if(!t)throw new Te.ErrnoError(44);if(!t.node_ops.readlink)throw new Te.ErrnoError(28);return de.resolve(Te.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Te.lookupPath(e,{follow:!t}).node;if(!r)throw new Te.ErrnoError(44);if(!r.node_ops.getattr)throw new Te.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Te.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?Te.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){Te.chmod(e,t,!0)},fchmod(e,t){var r=Te.getStreamChecked(e);Te.chmod(r.node,t)},chown(e,t,r,n){var i;if(!(i="string"==typeof e?Te.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){Te.chown(e,t,r,!0)},fchown(e,t,r){var n=Te.getStreamChecked(e);Te.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new Te.ErrnoError(28);var r;if(!(r="string"==typeof e?Te.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);if(Te.isDir(r.mode))throw new Te.ErrnoError(31);if(!Te.isFile(r.mode))throw new Te.ErrnoError(28);var n=Te.nodePermissions(r,"w");if(n)throw new Te.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Te.getStreamChecked(e);if(0==(2097155&r.flags))throw new Te.ErrnoError(28);Te.truncate(r.node,t)},utime(e,t,r){var n=Te.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Te.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Ce(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=ce.normalize(e);try{n=Te.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(n){if(128&t)throw new Te.ErrnoError(20)}else n=Te.mknod(e,r,0),s=!0;if(!n)throw new Te.ErrnoError(44);if(Te.isChrdev(n.mode)&&(t&=-513),65536&t&&!Te.isDir(n.mode))throw new Te.ErrnoError(54);if(!s){var o=Te.mayOpen(n,t);if(o)throw new Te.ErrnoError(o)}512&t&&!s&&Te.truncate(n,0),t&=-131713;var a=Te.createStream({node:n,path:Te.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!i.logReadFiles||1&t||(Te.readFiles||(Te.readFiles={}),e in Te.readFiles||(Te.readFiles[e]=1)),a},close(e){if(Te.isClosed(e))throw new Te.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Te.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Te.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Te.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,i){if(n<0||i<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(1==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.read)throw new Te.ErrnoError(28);var s=void 0!==i;if(s){if(!e.seekable)throw new Te.ErrnoError(70)}else i=e.position;var o=e.stream_ops.read(e,t,r,n,i);return s||(e.position+=o),o},write(e,t,r,n,i,s){if(n<0||i<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(0==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.write)throw new Te.ErrnoError(28);e.seekable&&1024&e.flags&&Te.llseek(e,0,2);var o=void 0!==i;if(o){if(!e.seekable)throw new Te.ErrnoError(70)}else i=e.position;var a=e.stream_ops.write(e,t,r,n,i,s);return o||(e.position+=a),a},allocate(e,t,r){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(t<0||r<=0)throw new Te.ErrnoError(28);if(0==(2097155&e.flags))throw new Te.ErrnoError(8);if(!Te.isFile(e.node.mode)&&!Te.isDir(e.node.mode))throw new Te.ErrnoError(43);if(!e.stream_ops.allocate)throw new Te.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new Te.ErrnoError(2);if(1==(2097155&e.flags))throw new Te.ErrnoError(2);if(!e.stream_ops.mmap)throw new Te.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Te.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=Te.open(e,t.flags),i=Te.stat(e).size,s=new Uint8Array(i);return Te.read(n,s,0,i,0),"utf8"===t.encoding?r=fe(s,0):"binary"===t.encoding&&(r=s),Te.close(n),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var n=Te.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(me(t)+1),s=ve(t,i,0,i.length);Te.write(n,i,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Te.write(n,t,0,t.byteLength,void 0,r.canOwn)}Te.close(n)},cwd:()=>Te.currentPath,chdir(e){var t=Te.lookupPath(e,{follow:!0});if(null===t.node)throw new Te.ErrnoError(44);if(!Te.isDir(t.node.mode))throw new Te.ErrnoError(54);var r=Te.nodePermissions(t.node,"x");if(r)throw new Te.ErrnoError(r);Te.currentPath=t.path},createDefaultDirectories(){Te.mkdir("/tmp"),Te.mkdir("/home"),Te.mkdir("/home/web_user")},createDefaultDevices(){Te.mkdir("/dev"),Te.registerDevice(Te.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),Te.mkdev("/dev/null",Te.makedev(1,3)),ge.register(Te.makedev(5,0),ge.default_tty_ops),ge.register(Te.makedev(6,0),ge.default_tty1_ops),Te.mkdev("/dev/tty",Te.makedev(5,0)),Te.mkdev("/dev/tty1",Te.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=le(e).byteLength),e[--t]);Te.createDevice("/dev","random",r),Te.createDevice("/dev","urandom",r),Te.mkdir("/dev/shm"),Te.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Te.mkdir("/proc");var e=Te.mkdir("/proc/self");Te.mkdir("/proc/self/fd"),Te.mount({mount(){var t=Te.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=Te.getStreamChecked(r),i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?Te.createDevice("/dev","stdin",i.stdin):Te.symlink("/dev/tty","/dev/stdin"),i.stdout?Te.createDevice("/dev","stdout",null,i.stdout):Te.symlink("/dev/tty","/dev/stdout"),i.stderr?Te.createDevice("/dev","stderr",null,i.stderr):Te.symlink("/dev/tty1","/dev/stderr"),Te.open("/dev/stdin",0),Te.open("/dev/stdout",1),Te.open("/dev/stderr",1)},ensureErrnoError(){Te.ErrnoError||(Te.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Te.ErrnoError.prototype=new Error,Te.ErrnoError.prototype.constructor=Te.ErrnoError,[44].forEach((e=>{Te.genericErrors[e]=new Te.ErrnoError(e),Te.genericErrors[e].stack=""})))},staticInit(){Te.ensureErrnoError(),Te.nameTable=new Array(4096),Te.mount(we,{},"/"),Te.createDefaultDirectories(),Te.createDefaultDevices(),Te.createSpecialDirectories(),Te.filesystems={MEMFS:we}},init(e,t,r){Te.init.initialized=!0,Te.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,Te.createStandardStreams()},quit(){Te.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;i||(o=n);var a=this;a.setDataGetter((e=>{var t=e*o,i=(e+1)*o-1;if(i=Math.min(i,n-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",r,!1),n!==o&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+r+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):ye(i.responseText||"",!0)})(t,i)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&n||(o=n=1,n=this.getter(0).length,o=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!d)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var c=Te.createFile(e,t,a,n,i);a.contents?c.contents=a.contents:a.url&&(c.contents=null,c.url=a.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,t,r,n,i){var s=e.node.contents;if(i>=s.length)return 0;var o=Math.min(s.length-i,n);if(s.slice)for(var a=0;a{var t=c.stream_ops[e];u[e]=function(){return Te.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,i)=>(Te.forceLoadFile(c),l(e,t,r,n,i)),u.mmap=(e,t,r,n,i)=>{Te.forceLoadFile(c);var s=be();if(!s)throw new Te.ErrnoError(48);return l(e,S,s,t,r),{ptr:s,allocated:!0}},c.stream_ops=u,c}},Be=(e,t)=>e?fe(I,e,t):"",De={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(ce.isAbs(t))return t;var n;if(n=-100===e?Te.cwd():De.getStreamFromFD(e).path,0==t.length){if(!r)throw new Te.ErrnoError(44);return n}return ce.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ce.normalize(t)!==ce.normalize(Te.getPath(e.node)))return-54;throw e}k[r>>2]=n.dev,k[r+4>>2]=n.mode,C[r+8>>2]=n.nlink,k[r+12>>2]=n.uid,k[r+16>>2]=n.gid,k[r+20>>2]=n.rdev,K=[n.size>>>0,(Y=n.size,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[r+24>>2]=K[0],k[r+28>>2]=K[1],k[r+32>>2]=4096,k[r+36>>2]=n.blocks;var i=n.atime.getTime(),s=n.mtime.getTime(),o=n.ctime.getTime();return K=[Math.floor(i/1e3)>>>0,(Y=Math.floor(i/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[r+40>>2]=K[0],k[r+44>>2]=K[1],C[r+48>>2]=i%1e3*1e3,K=[Math.floor(s/1e3)>>>0,(Y=Math.floor(s/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[r+56>>2]=K[0],k[r+60>>2]=K[1],C[r+64>>2]=s%1e3*1e3,K=[Math.floor(o/1e3)>>>0,(Y=Math.floor(o/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[r+72>>2]=K[0],k[r+76>>2]=K[1],C[r+80>>2]=o%1e3*1e3,K=[n.ino>>>0,(Y=n.ino,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[r+88>>2]=K[0],k[r+92>>2]=K[1],0},doMsync(e,t,r,n,i){if(!Te.isFile(t.node.mode))throw new Te.ErrnoError(43);if(2&n)return 0;var s=I.slice(e,e+r);Te.msync(t,s,i,r,n)},varargs:void 0,get(){var e=k[+De.varargs>>2];return De.varargs+=4,e},getp:()=>De.get(),getStr:e=>Be(e),getStreamFromFD:e=>Te.getStreamChecked(e)};function Me(e,t,r){De.varargs=r;try{var n=De.getStreamFromFD(e);switch(t){case 0:if((i=De.get())<0)return-28;for(;Te.streams[i];)i++;return Te.createStream(n,i).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var i=De.get();return n.flags|=i,0;case 5:return i=De.getp(),A[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ae(28),-1}}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ue(e,t,r,n){De.varargs=n;try{t=De.getStr(t),t=De.calculateAt(e,t);var i=n?De.get():0;return Te.open(t,r,i).fd}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}}var Pe,Fe,Re,Le=(e,t,r,n,i)=>{},Oe=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Pe=e},ze=e=>{for(var t="",r=e;I[r];)t+=Pe[I[r++]];return t},Ne={},He={},Ve={},je=e=>{throw new Fe(e)},We=e=>{throw new Re(e)},Ge=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&We("Mismatched type converter count");for(var i=0;i{He.hasOwnProperty(e)?i[t]=He[e]:(s.push(e),Ne.hasOwnProperty(e)||(Ne[e]=[]),Ne[e].push((()=>{i[t]=He[e],++o===s.length&&n(i)})))})),0===s.length&&n(i)};function qe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=t.name;if(e||je(`type "${n}" must have a positive integer typeid pointer`),He.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;je(`Cannot register type '${n}' twice`)}if(He[e]=t,delete Ve[e],Ne.hasOwnProperty(e)){var i=Ne[e];delete Ne[e],i.forEach((e=>e()))}}function $e(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return qe(e,t,r)}var Ye,Ke=8,Xe=(e,t,r,n)=>{$e(e,{name:t=ze(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:Ke,readValueFromPointer:function(e){return this.fromWireType(I[e])},destructorFunction:null})},Je=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Ze=e=>{je(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},nt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=nt(e,t,r.baseClass);return null===n?null:r.downcast(n)},it={},st=()=>Object.keys(dt).length,ot=()=>{var e=[];for(var t in dt)dt.hasOwnProperty(t)&&e.push(dt[t]);return e},at=[],ct=()=>{for(;at.length;){var e=at.pop();e.$$.deleteScheduled=!1,e.delete()}},ut=e=>{Ye=e,at.length&&Ye&&Ye(ct)},lt=()=>{i.getInheritedInstanceCount=st,i.getLiveInheritedInstances=ot,i.flushPendingDeletes=ct,i.setDelayFunction=ut},dt={},ht=(e,t)=>{for(void 0===t&&je("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=ht(e,t),dt[t]),pt=(e,t)=>(t.ptrType&&t.ptr||We("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&We("Both smartPtrType and smartPtr must be specified"),t.count={value:1},vt(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=it[o];if(!a)return i.call(this);s=this.isConst?a.constPointerType:a.pointerType;var c=nt(t,this.registeredClass,s.registeredClass);return null===c?i.call(this):this.isSmartPointer?pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c,smartPtrType:this,smartPtr:e}):pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c})}var vt=e=>"undefined"==typeof FinalizationRegistry?(vt=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),vt=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),vt(e)),yt=()=>{Object.assign(_t.prototype,{isAliasOf(e){if(!(this instanceof _t))return!1;if(!(e instanceof _t))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i},clone(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:Je(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&je("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&je("Object already scheduled for deletion"),at.push(this),1===at.length&&Ye&&Ye(ct),this.$$.deleteScheduled=!0,this}})};function _t(){}var gt=(e,t)=>Object.defineProperty(t,"name",{value:e}),bt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||je(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},wt=(e,t,r)=>{i.hasOwnProperty(e)?((void 0===r||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[r])&&je(`Cannot register public name '${e}' twice`),bt(i,e,e),i.hasOwnProperty(r)&&je(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),i[e].overloadTable[r]=t):(i[e]=t,void 0!==r&&(i[e].numArguments=r))},St=48,It=57,At=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=St&&t<=It?`_${e}`:e};function Et(e,t,r,n,i,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}var kt=(e,t,r)=>{for(;t!==r;)t.upcast||je(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Ct(e,t){if(null===t)return this.isReference&&je(`null is not a valid ${this.name}`),0;t.$$||je(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||je(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return kt(t.$$.ptr,r,this.registeredClass)}function xt(e,t){var r;if(null===t)return this.isReference&&je(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||je(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||je(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&je(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=kt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&je("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:je(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,sr.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:je("Unsupporting sharing policy")}return r}function Tt(e,t){if(null===t)return this.isReference&&je(`null is not a valid ${this.name}`),0;t.$$||je(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||je(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&je(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return kt(t.$$.ptr,r,this.registeredClass)}function Bt(e){return this.fromWireType(C[e>>2])}var Dt=()=>{Object.assign(Mt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Ke,readValueFromPointer:Bt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Mt(e,t,r,n,i,s,o,a,c,u,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=xt:n?(this.toWireType=Ct,this.destructorFunction=null):(this.toWireType=Tt,this.destructorFunction=null)}var Ut,Pt,Ft=(e,t,r)=>{i.hasOwnProperty(e)||We("Replacing nonexistant public symbol"),void 0!==i[e].overloadTable&&void 0!==r?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)},Rt=(e,t,r)=>{var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)},Lt=[],Ot=e=>{var t=Lt[e];return t||(e>=Lt.length&&(Lt.length=e+1),Lt[e]=t=Ut.get(e)),t},zt=(e,t,r)=>e.includes("j")?Rt(e,t,r):Ot(t).apply(null,r),Nt=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),zt(e,t,r)}},Ht=(e,t)=>{var r=(e=ze(e)).includes("j")?Nt(e,t):Ot(t);return"function"!=typeof r&&je(`unknown function pointer with signature ${e}: ${t}`),r},Vt=(e,t)=>{var r=gt(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},jt=e=>{var t=yn(e),r=ze(t);return mn(t),r},Wt=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||He[t]||(Ve[t]?Ve[t].forEach(e):(r.push(t),n[t]=!0))})),new Pt(`${e}: `+r.map(jt).join([", "]))},Gt=(e,t,r,n,i,s,o,a,c,u,l,d,h)=>{l=ze(l),s=Ht(i,s),a&&(a=Ht(o,a)),u&&(u=Ht(c,u)),h=Ht(d,h);var f=At(l);wt(f,(function(){Wt(`Cannot construct ${l} due to unbound types`,[n])})),Ge([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:_t.prototype;var o=gt(l,(function(){if(Object.getPrototypeOf(this)!==c)throw new Fe("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Fe(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Fe(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new Et(l,o,c,h,r,s,a,u);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new Mt(l,d,!0,!1,!1),m=new Mt(l+"*",d,!1,!1,!1),v=new Mt(l+" const*",d,!1,!0,!1);return it[e]={pointerType:m,constPointerType:v},Ft(f,o),[p,m,v]}))},qt=(e,t)=>{for(var r=[],n=0;n>2]);return r},$t=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Yt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=gt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function Kt(e,t,r,n,i,s){var o=t.length;o<2&&je("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,c=!1,u=1;u0?", ":"")+h),f+=(l||s?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",c)f+="runDestructors(destructors);\n";else for(u=a?1:2;u{var o=qt(t,r);i=Ht(n,i),Ge([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Fe(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Wt(`Cannot construct ${e.name} due to unbound types`,o)},Ge([],o,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Kt(r,n,null,i,s),[]))),[]}))},Jt=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},Zt=(e,t,r,n,i,s,o,a,c)=>{var u=qt(r,n);t=ze(t),t=Jt(t),s=Ht(i,s),Ge([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){Wt(`Cannot call ${n} due to unbound types`,u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,d=l[t];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===r-2?(i.argCount=r-2,i.className=e.name,l[t]=i):(bt(l,t,n),l[t].overloadTable[r-2]=i),Ge([],u,(function(i){var a=Kt(n,i,e,s,o,c);return void 0===l[t].overloadTable?(a.argCount=r-2,l[t]=a):l[t].overloadTable[r-2]=a,[]})),[]}))};function Qt(){Object.assign(er.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function er(){this.allocated=[void 0],this.freelist=[]}var tr=new er,rr=e=>{e>=tr.reserved&&0==--tr.get(e).refcount&&tr.free(e)},nr=()=>{for(var e=0,t=tr.reserved;t{tr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),tr.reserved=tr.allocated.length,i.count_emval_handles=nr},sr={toValue:e=>(e||je("Cannot use deleted val. handle = "+e),tr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return tr.allocate({refcount:1,value:e})}}};function or(e){return this.fromWireType(k[e>>2])}var ar=(e,t)=>{$e(e,{name:t=ze(t),fromWireType:e=>{var t=sr.toValue(e);return rr(e),t},toWireType:(e,t)=>sr.toHandle(t),argPackAdvance:Ke,readValueFromPointer:or,destructorFunction:null})},cr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},ur=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(x[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},lr=(e,t,r)=>{$e(e,{name:t=ze(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Ke,readValueFromPointer:ur(t,r),destructorFunction:null})},dr=(e,t,r)=>{switch(t){case 1:return r?e=>S[e>>0]:e=>I[e>>0];case 2:return r?e=>A[e>>1]:e=>E[e>>1];case 4:return r?e=>k[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},hr=(e,t,r,n,i)=>{t=ze(t);var s=e=>e;if(0===n){var o=32-8*r;s=e=>e<>>o}var a=t.includes("unsigned");$e(e,{name:t,fromWireType:s,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Ke,readValueFromPointer:dr(t,r,0!==n),destructorFunction:null})},fr=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=C[e>>2],r=C[e+4>>2];return new n(S.buffer,r,t)}$e(e,{name:r=ze(r),fromWireType:i,argPackAdvance:Ke,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},pr=(e,t,r)=>ve(e,I,t,r),mr=(e,t)=>{var r="std::string"===(t=ze(t));$e(e,{name:t,fromWireType(e){var t,n=C[e>>2],i=e+4;if(r)for(var s=i,o=0;o<=n;++o){var a=i+o;if(o==n||0==I[a]){var c=Be(s,a-s);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),s=a+1}}else{var u=new Array(n);for(o=0;o>2]=n,r&&i)pr(t,o,n+1);else if(i)for(var a=0;a255&&(mn(o),je("String has UTF-16 code units that do not fit in 8 bits")),I[o+a]=c}else for(a=0;a{for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&E[n];)++n;if((r=n<<1)-e>32&&vr)return vr.decode(I.subarray(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=A[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s},_r=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return A[t>>1]=0,t-n},gr=e=>2*e.length,br=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=k[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var s=i-65536;n+=String.fromCharCode(55296|s>>10,56320|1023&s)}else n+=String.fromCharCode(i)}return n},wr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,s=0;s=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s)),k[t>>2]=o,(t+=4)+4>i)break}return k[t>>2]=0,t-n},Sr=e=>{for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t},Ir=(e,t,r)=>{var n,i,s,o,a;r=ze(r),2===t?(n=yr,i=_r,o=gr,s=()=>E,a=1):4===t&&(n=br,i=wr,o=Sr,s=()=>C,a=2),$e(e,{name:r,fromWireType:e=>{for(var r,i=C[e>>2],o=s(),c=e+4,u=0;u<=i;++u){var l=e+4+u*t;if(u==i||0==o[l>>a]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return mn(e),r},toWireType:(e,n)=>{"string"!=typeof n&&je(`Cannot pass non-string to C++ string type ${r}`);var s=o(n),c=_n(4+s+t);return C[c>>2]=s>>a,i(n,c+4,s+t),null!==e&&e.push(mn,c),c},argPackAdvance:Ke,readValueFromPointer:or,destructorFunction(e){mn(e)}})},Ar=(e,t)=>{$e(e,{isVoid:!0,name:t=ze(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Er={},kr=e=>{var t=Er[e];return void 0===t?ze(e):t},Cr=[],xr=(e,t,r,n,i)=>(e=Cr[e])(t=sr.toValue(t),t[r=kr(r)],n,i),Tr=e=>{var t=Cr.length;return Cr.push(e),t},Br=(e,t)=>{var r=He[e];return void 0===r&&je(t+" has unknown type "+jt(e)),r},Dr=(e,t)=>{for(var r=new Array(e),n=0;n>2],"parameter "+n);return r},Mr=(e,t,r)=>{var n=[],i=e.toWireType(n,r);return n.length&&(C[t>>2]=sr.toHandle(n)),i},Ur=(e,t,r)=>{var n=Dr(e,t),i=n.shift();e--;var s="return function (obj, func, destructorsRef, args) {\n",o=0,a=[];0===r&&a.push("obj");for(var c=["retType"],u=[i],l=0;le.name)).join(", ")}) => ${i.name}>`;return Tr(gt(h,d))},Pr=e=>{var t=sr.toValue(e);$t(t),rr(e)},Fr=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Rr=e=>e%4==0&&(e%100!=0||e%400==0),Lr=[0,31,60,91,121,152,182,213,244,274,305,335],Or=[0,31,59,90,120,151,181,212,243,273,304,334],zr=e=>(Rr(e.getFullYear())?Lr:Or)[e.getMonth()]+e.getDate()-1;function Nr(e,t,r){var n=Fr(e,t),i=new Date(1e3*n);k[r>>2]=i.getSeconds(),k[r+4>>2]=i.getMinutes(),k[r+8>>2]=i.getHours(),k[r+12>>2]=i.getDate(),k[r+16>>2]=i.getMonth(),k[r+20>>2]=i.getFullYear()-1900,k[r+24>>2]=i.getDay();var s=0|zr(i);k[r+28>>2]=s,k[r+36>>2]=-60*i.getTimezoneOffset();var o=new Date(i.getFullYear(),0,1),a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),c=o.getTimezoneOffset(),u=0|(a!=c&&i.getTimezoneOffset()==Math.min(c,a));k[r+32>>2]=u}var Hr=e=>{var t=me(e)+1,r=_n(t);return r&&pr(e,r,t),r},Vr=(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),s=new Date(n,6,1),o=i.getTimezoneOffset(),a=s.getTimezoneOffset(),c=Math.max(o,a);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[e>>2]=60*c,k[t>>2]=Number(o!=a);var l=u(i),d=u(s),h=Hr(l),f=Hr(d);a>2]=h,C[r+4>>2]=f):(C[r>>2]=f,C[r+4>>2]=h)},jr=()=>{q("")},Wr=()=>Date.now(),Gr=(e,t,r)=>I.copyWithin(e,t,t+r),qr=()=>134217728,$r=e=>{var t=(e-g.buffer.byteLength+65535)/65536;try{return g.grow(t),M(),1}catch(e){}},Yr=e=>{var t=I.length;e>>>=0;var r=qr();if(e>r)return!1;for(var n,i,s=1;s<=4;s*=2){var o=t*(1+.2/s);o=Math.min(o,e+100663296);var a=Math.min(r,(n=Math.max(e,o))+((i=65536)-n%i)%i);if($r(a))return!0}return!1},Kr={},Xr=()=>u||"./this.program",Jr=()=>{if(!Jr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Xr()};for(var t in Kr)void 0===Kr[t]?delete e[t]:e[t]=Kr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Jr.strings=r}return Jr.strings},Zr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);S[t>>0]=0},Qr=(e,t)=>{var r=0;return Jr().forEach(((n,i)=>{var s=t+r;C[e+4*i>>2]=s,Zr(n,s),r+=n.length+1})),0},en=(e,t)=>{var r=Jr();C[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),C[t>>2]=n,0};function tn(e){try{var t=De.getStreamFromFD(e);return Te.close(t),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}function rn(e,t){try{var r=De.getStreamFromFD(e),n=r.tty?2:Te.isDir(r.mode)?3:Te.isLink(r.mode)?7:4;return S[t>>0]=n,A[t+2>>1]=0,K=[0,(Y=0,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[t+8>>2]=K[0],k[t+12>>2]=K[1],K=[0,(Y=0,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[t+16>>2]=K[0],k[t+20>>2]=K[1],0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var nn=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=Te.read(e,S,o,a,n);if(c<0)return-1;if(i+=c,c>2]=s,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}function on(e,t,r,n,i){var s=Fr(t,r);try{if(isNaN(s))return 61;var o=De.getStreamFromFD(e);return Te.llseek(o,s,n),K=[o.position>>>0,(Y=o.position,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[i>>2]=K[0],k[i+4>>2]=K[1],o.getdents&&0===s&&0===n&&(o.getdents=null),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var an=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=Te.write(e,S,o,a,n);if(c<0)return-1;i+=c,void 0!==n&&(n+=c)}return i};function cn(e,t,r,n){try{var i=De.getStreamFromFD(e),s=an(i,t,r);return C[n>>2]=s,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var un=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Te.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},ln=365,dn=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&ln)===ln},set:function(e){e?this.mode|=ln:this.mode&=~ln}},write:{get:function(){return(this.mode&dn)===dn},set:function(e){e?this.mode|=dn:this.mode&=~dn}},isFolder:{get:function(){return Te.isDir(this.mode)}},isDevice:{get:function(){return Te.isChrdev(this.mode)}}}),Te.FSNode=un,Te.createPreloadedFile=ke,Te.staticInit(),Oe(),Fe=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Re=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},yt(),lt(),Dt(),Pt=i.UnboundTypeError=Vt(Error,"UnboundTypeError"),Qt(),ir();var hn,fn={o:oe,C:Me,u:Ue,r:Le,E:Xe,F:Gt,A:Xt,i:Zt,D:ar,l:lr,c:hr,b:fr,m:mr,j:Ir,n:Ar,f:xr,h:rr,e:Ur,d:Pr,p:Nr,t:Vr,a:jr,g:Wr,y:Gr,s:Yr,w:Qr,x:en,k:tn,v:rn,B:sn,q:on,z:cn},pn=ne(),mn=e=>(mn=pn.I)(e),vn=()=>(vn=pn.K)(),yn=e=>(yn=pn.L)(e),_n=e=>(_n=pn.M)(e),gn=e=>(gn=pn.O)(e);function bn(){function e(){hn||(hn=!0,i.calledRun=!0,B||(L(),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),O()))}V>0||(R(),V>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_viiijj=(e,t,r,n,s,o,a,c)=>(i.dynCall_viiijj=pn.P)(e,t,r,n,s,o,a,c),i.dynCall_jij=(e,t,r,n)=>(i.dynCall_jij=pn.Q)(e,t,r,n),i.dynCall_jii=(e,t,r)=>(i.dynCall_jii=pn.R)(e,t,r),i.dynCall_jiji=(e,t,r,n,s)=>(i.dynCall_jiji=pn.S)(e,t,r,n,s),j=function e(){hn||bn(),hn||(j=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return bn(),e.ready});function o(){var e=["16AXaHkq","19610jNvOjM","1000205fjplCI","undefined","max","3386845unNFFf","abs","1185114YhPBLj","863212LaSErd","441OZOEMj","random","13303701zgXJyF","2107384iXnIhB","hypot"];return(o=function(){return e})()}function a(e,t){var r=o();return(a=function(e,t){return r[e-=264]})(e,t)}var c=a;!function(e,t){for(var r=a,n=e();;)try{if(935649===parseInt(r(272))/1+-parseInt(r(271))/2*(parseInt(r(265))/3)+parseInt(r(268))/4+-parseInt(r(275))/5+-parseInt(r(277))/6+-parseInt(r(264))/7*(-parseInt(r(270))/8)+parseInt(r(267))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(o);var u=1e-6,l=typeof Float32Array!==c(273)?Float32Array:Array,d=Math[c(266)];var h=Math.PI/180;Math[c(269)]||(Math[c(269)]=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var f=Object.freeze({__proto__:null,EPSILON:u,get ARRAY_TYPE(){return l},RANDOM:d,setMatrixArrayType:function(e){l=e},toRadian:function(e){return e*h},equals:function(e,t){var r=c;return Math[r(276)](e-t)<=u*Math[r(274)](1,Math[r(276)](e),Math[r(276)](t))}});function p(){var e=y,t=new(f[e(317)])(16);return f[e(317)]!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function m(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function v(e,t,r){var n=t[0],i=t[1],s=t[2],o=t[3],a=t[4],c=t[5],u=t[6],l=t[7],d=t[8],h=t[9],f=t[10],p=t[11],m=t[12],v=t[13],y=t[14],_=t[15],g=r[0],b=r[1],w=r[2],S=r[3];return e[0]=g*n+b*a+w*d+S*m,e[1]=g*i+b*c+w*h+S*v,e[2]=g*s+b*u+w*f+S*y,e[3]=g*o+b*l+w*p+S*_,g=r[4],b=r[5],w=r[6],S=r[7],e[4]=g*n+b*a+w*d+S*m,e[5]=g*i+b*c+w*h+S*v,e[6]=g*s+b*u+w*f+S*y,e[7]=g*o+b*l+w*p+S*_,g=r[8],b=r[9],w=r[10],S=r[11],e[8]=g*n+b*a+w*d+S*m,e[9]=g*i+b*c+w*h+S*v,e[10]=g*s+b*u+w*f+S*y,e[11]=g*o+b*l+w*p+S*_,g=r[12],b=r[13],w=r[14],S=r[15],e[12]=g*n+b*a+w*d+S*m,e[13]=g*i+b*c+w*h+S*v,e[14]=g*s+b*u+w*f+S*y,e[15]=g*o+b*l+w*p+S*_,e}function y(e,t){var r=b();return(y=function(e,t){return r[e-=301]})(e,t)}function _(e,t,r){var n=t[0],i=t[1],s=t[2],o=t[3],a=n+n,c=i+i,u=s+s,l=n*a,d=n*c,h=n*u,f=i*c,p=i*u,m=s*u,v=o*a,y=o*c,_=o*u;return e[0]=1-(f+m),e[1]=d+_,e[2]=h-y,e[3]=0,e[4]=d-_,e[5]=1-(l+m),e[6]=p+v,e[7]=0,e[8]=h+y,e[9]=p-v,e[10]=1-(l+f),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function g(e,t){var r=y,n=t[0],i=t[1],s=t[2],o=t[4],a=t[5],c=t[6],u=t[8],l=t[9],d=t[10];return e[0]=Math[r(307)](n,i,s),e[1]=Math[r(307)](o,a,c),e[2]=Math.hypot(u,l,d),e}function b(){var e=["7tXYssu","252848MMARmO","ARRAY_TYPE","max","10329fSHPQE","9612SDxsxr","2608oqhGGz","leftDegrees","sqrt","downDegrees","upDegrees","mat4(","8050WhNRSU","abs","tan","819642YjzecG","hypot","3BNnXcl","sin","419640ionpTP","276652oLRAYS","EPSILON","cos","878666mGTiRV"];return(b=function(){return e})()}function w(e,t,r,n,i){var s,o=1/Math[y(305)](t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(s=1/(n-i),e[10]=(i+n)*s,e[14]=2*i*n*s):(e[10]=-1,e[14]=-2*n),e}!function(e,t){for(var r=y,n=e();;)try{if(260510===-parseInt(r(316))/1+-parseInt(r(314))/2+parseInt(r(308))/3*(parseInt(r(311))/4)+-parseInt(r(310))/5+parseInt(r(306))/6*(-parseInt(r(315))/7)+parseInt(r(321))/8*(parseInt(r(320))/9)+-parseInt(r(303))/10*(-parseInt(r(319))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(b);var S=w;function I(e,t,r,n,i,s,o){var a=1/(t-r),c=1/(n-i),u=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*a,e[13]=(i+n)*c,e[14]=(o+s)*u,e[15]=1,e}var A=I;function E(e,t,r,n){var i,s,o,a,c,l,d,h,p,v,_=y,g=t[0],b=t[1],w=t[2],S=n[0],I=n[1],A=n[2],E=r[0],k=r[1],C=r[2];return Math.abs(g-E)0?(r[0]=2*(a*o+d*n+c*s-u*i)/h,r[1]=2*(c*o+d*i+u*n-a*s)/h,r[2]=2*(u*o+d*s+a*i-c*n)/h):(r[0]=2*(a*o+d*n+c*s-u*i),r[1]=2*(c*o+d*i+u*n-a*s),r[2]=2*(u*o+d*s+a*i-c*n)),_(e,t,r),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:g,getRotation:function(e,t){var r=y,n=new(f[r(317)])(3);g(n,t);var i=1/n[0],s=1/n[1],o=1/n[2],a=t[0]*i,c=t[1]*s,u=t[2]*o,l=t[4]*i,d=t[5]*s,h=t[6]*o,p=t[8]*i,m=t[9]*s,v=t[10]*o,_=a+d+v,b=0;return _>0?(b=2*Math[r(323)](_+1),e[3]=.25*b,e[0]=(h-m)/b,e[1]=(p-u)/b,e[2]=(c-l)/b):a>d&&a>v?(b=2*Math.sqrt(1+a-d-v),e[3]=(h-m)/b,e[0]=.25*b,e[1]=(c+l)/b,e[2]=(p+u)/b):d>v?(b=2*Math[r(323)](1+d-a-v),e[3]=(p-u)/b,e[0]=(c+l)/b,e[1]=.25*b,e[2]=(h+m)/b):(b=2*Math[r(323)](1+v-a-d),e[3]=(c-l)/b,e[0]=(p+u)/b,e[1]=(h+m)/b,e[2]=.25*b),e},fromRotationTranslationScale:function(e,t,r,n){var i=t[0],s=t[1],o=t[2],a=t[3],c=i+i,u=s+s,l=o+o,d=i*c,h=i*u,f=i*l,p=s*u,m=s*l,v=o*l,y=a*c,_=a*u,g=a*l,b=n[0],w=n[1],S=n[2];return e[0]=(1-(p+v))*b,e[1]=(h+g)*b,e[2]=(f-_)*b,e[3]=0,e[4]=(h-g)*w,e[5]=(1-(d+v))*w,e[6]=(m+y)*w,e[7]=0,e[8]=(f+_)*S,e[9]=(m-y)*S,e[10]=(1-(d+p))*S,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e},fromRotationTranslationScaleOrigin:function(e,t,r,n,i){var s=t[0],o=t[1],a=t[2],c=t[3],u=s+s,l=o+o,d=a+a,h=s*u,f=s*l,p=s*d,m=o*l,v=o*d,y=a*d,_=c*u,g=c*l,b=c*d,w=n[0],S=n[1],I=n[2],A=i[0],E=i[1],k=i[2],C=(1-(m+y))*w,x=(f+b)*w,T=(p-g)*w,B=(f-b)*S,D=(1-(h+y))*S,M=(v+_)*S,U=(p+g)*I,P=(v-_)*I,F=(1-(h+m))*I;return e[0]=C,e[1]=x,e[2]=T,e[3]=0,e[4]=B,e[5]=D,e[6]=M,e[7]=0,e[8]=U,e[9]=P,e[10]=F,e[11]=0,e[12]=r[0]+A-(C*A+B*E+U*k),e[13]=r[1]+E-(x*A+D*E+P*k),e[14]=r[2]+k-(T*A+M*E+F*k),e[15]=1,e},fromQuat:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=r+r,a=n+n,c=i+i,u=r*o,l=n*o,d=n*a,h=i*o,f=i*a,p=i*c,m=s*o,v=s*a,y=s*c;return e[0]=1-d-p,e[1]=l+y,e[2]=h-v,e[3]=0,e[4]=l-y,e[5]=1-u-p,e[6]=f+m,e[7]=0,e[8]=h+v,e[9]=f-m,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},frustum:function(e,t,r,n,i,s,o){var a=1/(r-t),c=1/(i-n),u=1/(s-o);return e[0]=2*s*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*s*c,e[6]=0,e[7]=0,e[8]=(r+t)*a,e[9]=(i+n)*c,e[10]=(o+s)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*s*2*u,e[15]=0,e},perspectiveNO:w,perspective:S,perspectiveZO:function(e,t,r,n,i){var s,o=1/Math.tan(t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(s=1/(n-i),e[10]=i*s,e[14]=i*n*s):(e[10]=-1,e[14]=-n),e},perspectiveFromFieldOfView:function(e,t,r,n){var i=y,s=Math.tan(t[i(301)]*Math.PI/180),o=Math[i(305)](t[i(324)]*Math.PI/180),a=Math[i(305)](t[i(322)]*Math.PI/180),c=Math[i(305)](t.rightDegrees*Math.PI/180),u=2/(a+c),l=2/(s+o);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-(a-c)*u*.5,e[9]=(s-o)*l*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e},orthoNO:I,ortho:A,orthoZO:function(e,t,r,n,i,s,o){var a=1/(t-r),c=1/(n-i),u=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=u,e[11]=0,e[12]=(t+r)*a,e[13]=(i+n)*c,e[14]=s*u,e[15]=1,e},lookAt:E,targetTo:function(e,t,r,n){var i=y,s=t[0],o=t[1],a=t[2],c=n[0],u=n[1],l=n[2],d=s-r[0],h=o-r[1],f=a-r[2],p=d*d+h*h+f*f;p>0&&(d*=p=1/Math[i(323)](p),h*=p,f*=p);var m=u*f-l*h,v=l*d-c*f,_=c*h-u*d;return(p=m*m+v*v+_*_)>0&&(m*=p=1/Math[i(323)](p),v*=p,_*=p),e[0]=m,e[1]=v,e[2]=_,e[3]=0,e[4]=h*_-f*v,e[5]=f*m-d*_,e[6]=d*v-h*m,e[7]=0,e[8]=d,e[9]=h,e[10]=f,e[11]=0,e[12]=s,e[13]=o,e[14]=a,e[15]=1,e},str:function(e){return y(302)+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math[y(307)](e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},subtract:k,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var r=y,n=e[0],i=e[1],s=e[2],o=e[3],a=e[4],c=e[5],l=e[6],d=e[7],h=e[8],p=e[9],m=e[10],v=e[11],_=e[12],g=e[13],b=e[14],w=e[15],S=t[0],I=t[1],A=t[2],E=t[3],k=t[4],C=t[5],x=t[6],T=t[7],B=t[8],D=t[9],M=t[10],U=t[11],P=t[12],F=t[13],R=t[14],L=t[15];return Math[r(304)](n-S)<=f[r(312)]*Math[r(318)](1,Math[r(304)](n),Math[r(304)](S))&&Math[r(304)](i-I)<=f[r(312)]*Math.max(1,Math.abs(i),Math[r(304)](I))&&Math[r(304)](s-A)<=u*Math[r(318)](1,Math[r(304)](s),Math.abs(A))&&Math.abs(o-E)<=f[r(312)]*Math[r(318)](1,Math[r(304)](o),Math.abs(E))&&Math[r(304)](a-k)<=u*Math[r(318)](1,Math[r(304)](a),Math[r(304)](k))&&Math[r(304)](c-C)<=u*Math.max(1,Math[r(304)](c),Math.abs(C))&&Math[r(304)](l-x)<=f[r(312)]*Math[r(318)](1,Math.abs(l),Math[r(304)](x))&&Math[r(304)](d-T)<=f[r(312)]*Math.max(1,Math.abs(d),Math.abs(T))&&Math[r(304)](h-B)<=f[r(312)]*Math[r(318)](1,Math[r(304)](h),Math[r(304)](B))&&Math.abs(p-D)<=f[r(312)]*Math[r(318)](1,Math[r(304)](p),Math[r(304)](D))&&Math.abs(m-M)<=f[r(312)]*Math[r(318)](1,Math[r(304)](m),Math[r(304)](M))&&Math.abs(v-U)<=f[r(312)]*Math[r(318)](1,Math[r(304)](v),Math.abs(U))&&Math[r(304)](_-P)<=u*Math[r(318)](1,Math[r(304)](_),Math[r(304)](P))&&Math[r(304)](g-F)<=f[r(312)]*Math[r(318)](1,Math[r(304)](g),Math[r(304)](F))&&Math[r(304)](b-R)<=f[r(312)]*Math[r(318)](1,Math[r(304)](b),Math.abs(R))&&Math[r(304)](w-L)<=u*Math[r(318)](1,Math[r(304)](w),Math[r(304)](L))},mul:C,sub:x});function B(e,t){var r=G();return(B=function(e,t){return r[e-=420]})(e,t)}function D(){var e=B,t=new l(3);return f[e(431)]!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function M(e){var t=e[0],r=e[1],n=e[2];return Math.hypot(t,r,n)}function U(e,t,r){var n=new(f[B(431)])(3);return n[0]=e,n[1]=t,n[2]=r,n}function P(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function F(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function R(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function L(e,t){var r=B,n=t[0]-e[0],i=t[1]-e[1],s=t[2]-e[2];return Math[r(427)](n,i,s)}function O(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}function z(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function N(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}!function(e,t){for(var r=B,n=e();;)try{if(351357===-parseInt(r(432))/1+-parseInt(r(441))/2+-parseInt(r(430))/3+parseInt(r(437))/4+parseInt(r(434))/5+parseInt(r(425))/6+parseInt(r(442))/7)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(G);var H=P,V=F,j=R,W=L;function G(){var e=["length","763595xSNbSQ","RANDOM","sqrt","2509812QtZgNR","abs","min","cos","1344562OEugpW","3175403SNdfTc","acos","floor","EPSILON","max","round","3701748fuofga","ceil","hypot","sin","vec3(","1171656nuiKsx","ARRAY_TYPE","436569epguSu"];return(G=function(){return e})()}var q,$=O,Y=M,K=z,X=(q=D(),function(e,t,r,n,i,s){var o,a,c=B;for(!t&&(t=3),!r&&(r=0),a=n?Math[c(439)](n*t+r,e[c(433)]):e[c(433)],o=r;o0&&(s=1/Math.sqrt(s)),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e},dot:N,cross:function(e,t,r){var n=t[0],i=t[1],s=t[2],o=r[0],a=r[1],c=r[2];return e[0]=i*c-s*a,e[1]=s*o-n*c,e[2]=n*a-i*o,e},lerp:function(e,t,r,n){var i=t[0],s=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=s+n*(r[1]-s),e[2]=o+n*(r[2]-o),e},hermite:function(e,t,r,n,i,s){var o=s*s,a=o*(2*s-3)+1,c=o*(s-2)+s,u=o*(s-1),l=o*(3-2*s);return e[0]=t[0]*a+r[0]*c+n[0]*u+i[0]*l,e[1]=t[1]*a+r[1]*c+n[1]*u+i[1]*l,e[2]=t[2]*a+r[2]*c+n[2]*u+i[2]*l,e},bezier:function(e,t,r,n,i,s){var o=1-s,a=o*o,c=s*s,u=a*o,l=3*s*a,d=3*c*o,h=c*s;return e[0]=t[0]*u+r[0]*l+n[0]*d+i[0]*h,e[1]=t[1]*u+r[1]*l+n[1]*d+i[1]*h,e[2]=t[2]*u+r[2]*l+n[2]*d+i[2]*h,e},random:function(e,t){var r=B;t=t||1;var n=2*f[r(435)]()*Math.PI,i=2*f[r(435)]()-1,s=Math[r(436)](1-i*i)*t;return e[0]=Math.cos(n)*s,e[1]=Math[r(428)](n)*s,e[2]=i*t,e},transformMat4:function(e,t,r){var n=t[0],i=t[1],s=t[2],o=r[3]*n+r[7]*i+r[11]*s+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*s+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*s+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*s+r[14])/o,e},transformMat3:function(e,t,r){var n=t[0],i=t[1],s=t[2];return e[0]=n*r[0]+i*r[3]+s*r[6],e[1]=n*r[1]+i*r[4]+s*r[7],e[2]=n*r[2]+i*r[5]+s*r[8],e},transformQuat:function(e,t,r){var n=r[0],i=r[1],s=r[2],o=r[3],a=t[0],c=t[1],u=t[2],l=i*u-s*c,d=s*a-n*u,h=n*c-i*a,f=i*h-s*d,p=s*l-n*h,m=n*d-i*l,v=2*o;return l*=v,d*=v,h*=v,f*=2,p*=2,m*=2,e[0]=a+l+f,e[1]=c+d+p,e[2]=u+h+m,e},rotateX:function(e,t,r,n){var i=B,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[0],o[1]=s[1]*Math[i(440)](n)-s[2]*Math[i(428)](n),o[2]=s[1]*Math.sin(n)+s[2]*Math[i(440)](n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateY:function(e,t,r,n){var i=B,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[2]*Math.sin(n)+s[0]*Math[i(440)](n),o[1]=s[1],o[2]=s[2]*Math[i(440)](n)-s[0]*Math.sin(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateZ:function(e,t,r,n){var i=B,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[0]*Math[i(440)](n)-s[1]*Math.sin(n),o[1]=s[0]*Math[i(428)](n)+s[1]*Math[i(440)](n),o[2]=s[2],e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},angle:function(e,t){var r=B,n=e[0],i=e[1],s=e[2],o=t[0],a=t[1],c=t[2],u=Math.sqrt(n*n+i*i+s*s)*Math[r(436)](o*o+a*a+c*c),l=u&&N(e,t)/u;return Math[r(420)](Math[r(439)](Math[r(423)](l,-1),1))},zero:function(e){return e[0]=0,e[1]=0,e[2]=0,e},str:function(e){return B(429)+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},equals:function(e,t){var r=B,n=e[0],i=e[1],s=e[2],o=t[0],a=t[1],c=t[2];return Math[r(438)](n-o)<=f[r(422)]*Math[r(423)](1,Math[r(438)](n),Math[r(438)](o))&&Math[r(438)](i-a)<=f[r(422)]*Math.max(1,Math[r(438)](i),Math.abs(a))&&Math.abs(s-c)<=f[r(422)]*Math.max(1,Math.abs(s),Math[r(438)](c))},sub:H,mul:V,div:j,dist:W,sqrDist:$,len:Y,sqrLen:K,forEach:X});function Z(e,t){var r=Q();return(Z=function(e,t){return r[e-=240]})(e,t)}function Q(){var e=["1775915oQucHI","3JiSAvD","7611120ffmuOi","109448VTOXkl","4096014lcBcWk","796790RKCtBl","7WZbPZE","2643622EZaIEb","9690312XzbSoZ"];return(Q=function(){return e})()}!function(e,t){for(var r=Z,n=e();;)try{if(687778===parseInt(r(245))/1+-parseInt(r(247))/2*(-parseInt(r(241))/3)+-parseInt(r(243))/4+-parseInt(r(240))/5+-parseInt(r(244))/6+parseInt(r(246))/7*(-parseInt(r(248))/8)+parseInt(r(242))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Q),function(e,t){const r=te,n=e();for(;;)try{if(575396===-parseInt(r(427))/1+-parseInt(r(417))/2+-parseInt(r(486))/3*(-parseInt(r(459))/4)+parseInt(r(463))/5+parseInt(r(475))/6*(-parseInt(r(464))/7)+-parseInt(r(480))/8*(-parseInt(r(435))/9)+parseInt(r(436))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(re);var ee=(e,t)=>{const r=te,n=r(397);t&&e.pixelStorei(e[r(448)],1);const i=function(){const t=r,i=h(e[t(477)],"\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n "),s=h(e[t(468)],n),o=e[t(415)]();return e[t(430)](o,i),e.attachShader(o,s),e[t(413)](o),e[t(401)](o,e[t(395)])?o:(console[t(484)](t(443)+e.getProgramInfoLog(o)),null)}();let s={program:i,attribLocations:{vertexPosition:e[r(457)](i,r(429)),texturePosition:e[r(457)](i,"aTexturePosition")},uniformLocations:{projectionMatrix:e[r(447)](i,r(423)),modelMatrix:e[r(447)](i,r(405)),viewMatrix:e[r(447)](i,r(424)),rgbatexture:e[r(447)](i,r(476)),ytexture:e[r(447)](i,r(460)),utexture:e[r(447)](i,r(446)),vtexture:e[r(447)](i,r(407)),isyuv:e[r(447)](i,"isyuv")}},o=function(){const t=r,n=e[t(432)]();e.bindBuffer(e[t(398)],n);e.bufferData(e[t(398)],new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e.STATIC_DRAW);var i=[];i=i[t(481)]([0,1],[1,1],[1,0],[0,0]);const s=e[t(432)]();e[t(396)](e.ARRAY_BUFFER,s),e.bufferData(e[t(398)],new Float32Array(i),e.STATIC_DRAW);const o=e[t(432)]();e[t(396)](e[t(467)],o);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e[t(472)]),{position:n,texPosition:s,indices:o}}(),a=d(),c=d(),u=d(),l=d();function d(){const t=r;let n=e[t(439)]();return e.bindTexture(e[t(402)],n),e[t(462)](e[t(402)],e.TEXTURE_MAG_FILTER,e.LINEAR),e[t(462)](e[t(402)],e[t(466)],e.LINEAR),e[t(462)](e.TEXTURE_2D,e[t(408)],e[t(485)]),e[t(462)](e[t(402)],e.TEXTURE_WRAP_T,e[t(485)]),n}function h(t,n){const i=r,s=e.createShader(t);return e[i(420)](s,n),e[i(465)](s),e[i(482)](s,e[i(454)])?s:(console[i(484)](i(449)+e.getShaderInfoLog(s)),e[i(406)](s),null)}function f(t,n){const i=r;e.viewport(0,0,t,n),e[i(422)](0,0,0,0),e[i(440)](1),e[i(416)](e[i(433)]),e.depthFunc(e[i(414)]),e.clear(e[i(452)]|e[i(442)]);const a=T[i(453)]();A(a,-1,1,-1,1,.1,100);const d=T[i(453)]();m(d);const h=p();E(h,J[i(425)](0,0,0),U(0,0,-1),J[i(425)](0,1,0));{const t=3,r=e.FLOAT,n=!1,a=0,c=0;e[i(396)](e[i(398)],o[i(404)]),e[i(471)](s[i(438)][i(445)],t,r,n,a,c),e[i(441)](s[i(438)][i(445)])}{const t=2,r=e[i(451)],n=!1,a=0,c=0;e.bindBuffer(e[i(398)],o[i(418)]),e[i(471)](s[i(438)][i(444)],t,r,n,a,c),e[i(441)](s.attribLocations[i(444)])}e.activeTexture(e[i(419)]+3),e[i(458)](e[i(402)],c),e[i(455)](e.TEXTURE0+4),e[i(458)](e[i(402)],u),e[i(455)](e.TEXTURE0+5),e.bindTexture(e[i(402)],l),e[i(396)](e[i(467)],o[i(426)]),e[i(403)](s[i(479)]),e[i(399)](s.uniformLocations.projectionMatrix,!1,a),e[i(399)](s[i(473)][i(456)],!1,d),e.uniformMatrix4fv(s[i(473)][i(470)],!1,h),e[i(411)](s.uniformLocations[i(428)],2),e.uniform1i(s.uniformLocations[i(421)],3),e[i(411)](s[i(473)][i(400)],4),e.uniform1i(s[i(473)].vtexture,5),e[i(411)](s[i(473)].isyuv,1);{const t=6,r=e[i(469)],n=0;e[i(450)](e[i(412)],t,r,n)}}return{render:function(t,n,i,s,o){const a=r;e.activeTexture(e[a(419)]),e[a(458)](e[a(402)],c),e[a(478)](e[a(402)],0,e[a(434)],t,n,0,e[a(434)],e[a(437)],i),e.activeTexture(e[a(410)]),e[a(458)](e[a(402)],u),e[a(478)](e[a(402)],0,e[a(434)],t/2,n/2,0,e.LUMINANCE,e[a(437)],s),e[a(455)](e[a(474)]),e[a(458)](e[a(402)],l),e.texImage2D(e[a(402)],0,e[a(434)],t/2,n/2,0,e[a(434)],e.UNSIGNED_BYTE,o),f(t,n)},renderYUV:function(t,n,i){const s=r;let o=i[s(483)](0,t*n),a=i[s(483)](t*n,t*n*5/4),d=i[s(483)](t*n*5/4,t*n*3/2);e[s(455)](e.TEXTURE0),e[s(458)](e[s(402)],c),e[s(478)](e[s(402)],0,e[s(434)],t,n,0,e[s(434)],e[s(437)],o),e.activeTexture(e.TEXTURE1),e[s(458)](e[s(402)],u),e[s(478)](e[s(402)],0,e[s(434)],t/2,n/2,0,e[s(434)],e[s(437)],a),e[s(455)](e[s(474)]),e.bindTexture(e.TEXTURE_2D,l),e[s(478)](e.TEXTURE_2D,0,e[s(434)],t/2,n/2,0,e[s(434)],e[s(437)],d),f(t,n)},destroy:function(){const t=r;e[t(409)](s[t(479)]),e[t(431)](o[t(404)]),e[t(431)](o[t(418)]),e[t(431)](o[t(426)]),e[t(461)](a),e[t(461)](c),e.deleteTexture(u),e[t(461)](l),s=null,o=null,a=null,c=null,u=null,l=null}}};function te(e,t){const r=re();return(te=function(e,t){return r[e-=395]})(e,t)}function re(){const e=["attachShader","deleteBuffer","createBuffer","DEPTH_TEST","LUMINANCE","9KofpId","3945970lDIcWa","UNSIGNED_BYTE","attribLocations","createTexture","clearDepth","enableVertexAttribArray","DEPTH_BUFFER_BIT","Unable to initialize the shader program: ","texturePosition","vertexPosition","uTexture","getUniformLocation","UNPACK_ALIGNMENT","An error occurred compiling the shaders: ","drawElements","FLOAT","COLOR_BUFFER_BIT","create","COMPILE_STATUS","activeTexture","modelMatrix","getAttribLocation","bindTexture","54988brzruh","yTexture","deleteTexture","texParameteri","4567195BfGHmX","219590kARYsi","compileShader","TEXTURE_MIN_FILTER","ELEMENT_ARRAY_BUFFER","FRAGMENT_SHADER","UNSIGNED_SHORT","viewMatrix","vertexAttribPointer","STATIC_DRAW","uniformLocations","TEXTURE2","186pSDFYB","rgbaTexture","VERTEX_SHADER","texImage2D","program","8032872xJMYcy","concat","getShaderParameter","slice","log","CLAMP_TO_EDGE","93SVuhwX","LINK_STATUS","bindBuffer","\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n ","ARRAY_BUFFER","uniformMatrix4fv","utexture","getProgramParameter","TEXTURE_2D","useProgram","position","uModelMatrix","deleteShader","vTexture","TEXTURE_WRAP_S","deleteProgram","TEXTURE1","uniform1i","TRIANGLES","linkProgram","LEQUAL","createProgram","enable","204288gykLja","texPosition","TEXTURE0","shaderSource","ytexture","clearColor","uProjectionMatrix","uViewMatrix","fromValues","indices","1088292PaHNyt","rgbatexture","aVertexPosition"];return(re=function(){return e})()}const ne=Re;!function(e,t){const r=Re,n=e();for(;;)try{if(405565===parseInt(r(551))/1+-parseInt(r(343))/2+parseInt(r(574))/3+-parseInt(r(445))/4*(parseInt(r(565))/5)+parseInt(r(293))/6+parseInt(r(505))/7*(-parseInt(r(463))/8)+-parseInt(r(704))/9*(parseInt(r(719))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);const ie={websocket:1,fetch:2,hls:3,webrtc:4,webTransport:5,aliyunRtc:6,ts:7};ne(646),ne(499),ne(405),ne(429);const se={fetch:"fetch",hls:ne(499),websocket:ne(646),webrtc:ne(405),webTransport:ne(447),worker:ne(282),aliyunRtc:ne(429),mp4:ne(451)},oe={player:ne(295),playerAudio:"playerAudio",playbackTF:ne(591),talk:"talk",playVod:ne(459)},ae={mp4:ne(451),webm:"webm",flv:ne(592),mov:ne(577)},ce={flv:"flv",m7s:ne(464),hls:ne(499),webrtc:ne(405),webTransport:ne(447),nakedFlow:ne(597),fmp4:ne(274),mpeg4:ne(291),aliyunRtc:ne(429),ts:"ts",g711:"g711",pcm:ne(257)};ne(573),ne(558),ne(637),ne(269),ne(510),ne(472),ne(700),ne(524);const ue={mse:ne(318),wcs:ne(567),offscreen:ne(500),wasm:ne(661),simd:"simd",mt:"mt",webrtc:ne(405),hls:ne(499),aliyunRtc:ne(429)},le=(ne(610),"video"),de={debug:ne(297),warn:ne(421)},he={click:"click",mouseDownAndUp:ne(575)},fe={normal:"normal",simple:ne(454)},pe={normal:ne(287),small:"small"},me=ne(660),ve="20251201",ye=36e5,_e=4080,ge=12;ne(430),ne(714),ne(697);const be={playIsNotPauseOrUrlIsNull:ne(371),webglAlignmentError:"Webgl 渲染失败",webglContextLostError:ne(404),mediaSourceH265NotSupport:"不支持硬解码H265",mseSourceBufferFull:ne(723),mediaSourceAppendBufferError:ne(460),mseSourceBufferError:ne(466),mseAddSourceBufferError:ne(460),mseWorkerAddSourceBufferError:ne(460),mediaSourceDecoderConfigurationError:ne(460),mediaSourceTsIsMaxDiff:"流异常",mseWidthOrHeightChange:ne(709),mediaSourceAudioG711NotSupport:ne(456),mediaSourceAudioInitTimeout:ne(268),mediaSourceAudioNoDataTimeout:ne(294),mediaSourceUseCanvasRenderPlayFailed:ne(406),mediaSourceBufferedIsZeroError:ne(709),webcodecsH265NotSupport:ne(457),webcodecsUnsupportedConfigurationError:ne(460),webcodecsDecodeConfigureError:ne(460),webcodecsDecodeError:ne(466),webcodecsAudioInitTimeout:"初始化音频解码器失败",webcodecsAudioNoDataTimeout:ne(294),wcsWidthOrHeightChange:ne(466),wasmDecodeError:ne(466),simdDecodeError:ne(466),wasmWidthOrHeightChange:ne(709),wasmUseVideoRenderError:ne(693),videoElementPlayingFailed:"video自动渲染失败",simdH264DecodeVideoWidthIsTooLarge:"不支持该分辨率的视频",networkDelayTimeout:ne(305),fetchError:"请求失败",streamEnd:ne(621),websocket1006Error:ne(455),websocketError:ne(614),webrtcError:ne(614),hlsError:ne(614),decoderWorkerInitError:"初始化worker失败",decoderWorkerWasmError:ne(468),videoElementPlayingFailedForWebrtc:"video自动渲染失败",videoInfoError:ne(542),webrtcStreamH265:ne(389),delayTimeout:ne(686),loadingTimeout:ne(644),loadingTimeoutRetryEnd:ne(644),delayTimeoutRetryEnd:"播放超时重播失败",flvDemuxBufferSizeTooLarge:ne(335),audioChannelError:"音频通道错误",aliyunRtcError:ne(614),mseWaitVideoCanplayTimeout:ne(709),initDecoderWorkerTimeout:ne(477)},we={playType:oe.player,videoBuffer:1e3,videoBufferDelay:1e3,networkDelay:1e4,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isFmp4:!1,isWebrtc:!1,isWebrtcForZLM:!1,isWebrtcForSRS:!1,webrtcForSRSBySDK:!1,isWebrtcForOthers:!1,isNakedFlow:!1,isMpeg4:!1,isAliyunRtc:!1,isTs:!1,debug:!1,debugLevel:de[ne(421)],debugUuid:"",isMulti:!0,multiIndex:-1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,pageVisibilityHiddenTimeout:300,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,heartTimeoutReplayUseLastFrameShow:!0,replayUseLastFrameShow:!0,replayShowLoadingIcon:!1,supportDblclickFullscreen:!1,showBandwidth:!1,showPerformance:!1,mseCorrectTimeDuration:20,mseCorrectAudioTimeDuration:20,keepScreenOn:!0,isNotMute:!1,muted:!0,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1,ptz:!1,quality:!1,zoom:!1,close:!1,scale:!1,performance:!1,logSave:!1,aiFace:!1,aiObject:!1,aiOcclusion:!1,fullscreenFn:null,fullscreenExitFn:null,screenshotFn:null,playFn:null,pauseFn:null,recordFn:null,recordStopFn:null},extendOperateBtns:[],contextmenuBtns:[],watermarkConfig:{},controlAutoHide:!1,controlAutoHideDelayTime:5,hasControl:!1,controlSize:pe[ne(287)],loadingIcon:!0,loadingIconStyle:{},loadingText:"",background:"",poster:"",backgroundLoadingShow:!0,loadingBackground:"",loadingBackgroundWidth:0,loadingBackgroundHeight:0,decoder:ne(261),decoderOld:ne(247),decoderAudio:ne(407),decoderHard:ne(495),decoderHardNotWasm:ne(418),wasmMp4RecorderDecoder:ne(431),decoderWASM:"",isDecoderUseCDN:!1,url:"",rotate:0,mirrorRotate:ne(365),aspectRatio:ne(387),playbackConfig:{playList:[],fps:"",autoCalcFps:!0,showControl:!0,controlType:fe[ne(287)],duration:0,startTime:"",showRateBtn:!1,rateConfig:[],showPrecision:"",showPrecisionBtn:!0,isCacheBeforeDecodeForFpsRender:!1,uiUsePlaybackPause:!1,isPlaybackPauseClearCache:!0,isUseFpsRender:!1,isUseLocalCalculateTime:!1,localOneFrameTimestamp:40,supportWheel:!1,useWCS:!1,useMSE:!1,useSIMD:!0},qualityConfig:[],defaultStreamQuality:"",scaleConfig:["拉伸","缩放","正常"],forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:ie[ne(612)],demuxType:ce[ne(592)],useWasm:!1,useOldWasm:!1,useMSE:!1,useWCS:!1,useSIMD:!0,isFFmpegSIMD:!1,useMThreading:!1,preferredHardDecode:!1,wcsUseVideoRender:!0,wcsUseWebgl2Render:!1,wasmUseVideoRender:!0,mseUseCanvasRender:!1,hlsUseCanvasRender:!1,webrtcUseCanvasRender:!1,useOffscreen:!1,useWebGPU:!1,useWebCanvas:!1,mseDecodeErrorReplay:!0,wcsDecodeErrorReplay:!0,wasmDecodeErrorReplay:!0,simdDecodeErrorReplay:!0,simdDecodeErrorReplayType:ue[ne(661)],autoWasm:!0,decoderErrorAutoWasm:!1,hardDecodingNotSupportAutoWasm:!0,webglAlignmentErrorReplay:!0,webglContextLostErrorReplay:!0,openWebglAlignment:!1,syncAudioAndVideo:!0,syncAudioAndVideoDiff:400,playbackDelayTime:1e3,playbackFps:25,playVodFps:25,playbackForwardMaxRateDecodeIFrame:4,playbackCurrentTimeMove:!0,useVideoRender:!0,useCanvasRender:!1,videoRenderType:"",networkDelayTimeoutReplay:!1,recordType:ae[ne(451)],checkFirstIFrame:!0,nakedFlowFps:25,audioEngine:null,isShowRecordingUI:!0,isShowZoomingUI:!0,useFaceDetector:!1,useObjectDetector:!1,useImageDetector:!1,useOcclusionDetector:!1,ptzPositionConfig:{},ptzShowType:"vertical",ptzClickType:he[ne(528)],ptzStopEmitDelay:.3,ptzZoomShow:!1,ptzApertureShow:!1,ptzFocusShow:!1,ptzMoreArrowShow:!1,ptzCruiseShow:!1,ptzFogShow:!1,ptzWiperShow:!1,ptzSupportDraggable:!1,weiXinInAndroidAudioBufferSize:4800,isCryptoAudio:!1,isM7sCrypto:!1,isSm4Crypto:!1,isSm4CryptoH265V2:!1,isXorCrypto:!1,sm4CryptoKey:"",m7sCryptoKey:"",xorCryptoKey:"",cryptoKey:"",cryptoIV:"",cryptoKeyUrl:"",listenWindowResizeAuoResize:!0,orientationChangeResize:!1,useWebFullScreen:!1,ptsMaxDiff:3600,aiFaceDetectLevel:2,aiFaceDetectWidth:240,aiFaceDetectEmitBase64:!1,aiFaceDetectShowRect:!0,aiFaceDetectInterval:1e3,aiFaceDetectRectConfig:{},aiObjectDetectLevel:2,aiObjectDetectWidth:240,aiObjectDetectShowRect:!0,aiObjectDetectInterval:1e3,aiObjectDetectRectConfig:{},aiObjectDetectTarget:"",aiOcclusionDetectInterval:1e3,aiImageDetectDrop:!1,aiImageDetectActive:!1,videoRenderSupportScale:!0,mediaSourceTsIsMaxDiffReplay:!0,controlHtml:"",isH265:!1,isWebrtcH265:!1,supportLockScreenPlayAudio:!0,supportHls265:!0,hls265ForceFixLargeGap:!0,isEmitSEI:!1,pauseAndNextPlayUseLastFrameShow:!1,demuxUseWorker:!0,playFailedAndReplay:!0,showMessageConfig:be,videoElementPlayingFailedReplay:!0,mp4RecordUseWasm:!0,mseAutoCleanupSourceBuffer:!0,mseAutoCleanupMaxBackwardDuration:30,mseAutoCleanupMinBackwardDuration:10,widthOrHeightChangeReplay:!0,simdH264DecodeVideoWidthIsTooLargeReplay:!0,mediaSourceAudioG711NotSupportReplay:!0,mediaSourceAudioInitTimeoutReplay:!0,mediaSourceAudioNoDataTimeoutReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplayType:le,webcodecsAudioInitTimeoutReplay:!0,webcodecsAudioNoDataTimeoutReplay:!0,widthOrHeightChangeReplayDelayTime:0,ghostWatermarkConfig:{on:5,off:5,content:"",fontSize:12,color:ne(366),opacity:.15,speed:.2},dynamicWatermarkConfig:{content:"",speed:.2,fontSize:12,color:ne(366),opacity:.15},isDropSameTimestampGop:!1,mseDecodeAudio:!0,wcsDecodeAudio:!0,nakedFlowH265DemuxUseNew:!0,nakedFlowDemuxUseNew:!0,extendDomConfig:{html:"",showBeforePlay:!1,showAfterLoading:!0},disableContextmenu:!1,mseDecoderUseWorker:!0,openMemoryLog:!1,mainThreadFetchUseWorker:!0,playFailedAndPausedShowPlayBtn:!0,mseCorrectionTimestamp:!0,flvDemuxBufferSizeTooLargeReplay:!1,flvDemuxBufferSizeTooLargeEmitFailed:!1,flvDemuxBufferSizeMaxLarge:1048576,isCheckInView:!1,hiddenControl:!1,androidMobileFullscreenRotate:!0,disableModule:{ptz:!1,record:!1,zoom:!1,watermark:!1,playback:!1},recordWebMSupportSeek:!1,wasmPlayAudioUseVideoRender:!1,mseWaitVideoCanplayTimeout:6,mseWaitVideoCanplayAutoWasm:!0,zoomMaxScale:5,zoomSupportGestureInMobile:!1,zoomSupportGestureInMobileSpeed:.2,drawingRectColor:ne(496),drawingRectLineWidth:1,drawingRectEndRemoveDom:!0,videoSEISyncPtsDiff:.2,initShowPlayBtn:!1,playbackCheckStreamEnd:!0,autoUseSystemFullScreen:!0,playVodConfig:{showRateBtn:!1,rateConfig:[],useWCS:!1,useMSE:!0,useSIMD:!0,startTime:null},playVodForwardMaxRateDecodeIFrame:8,playVodEndedAndAutoReplay:!1,playVodEndedAndShowPlayBtn:!0,hotKeyVolumeStep:.05,hotKeySeekStep:5,websocketOpenTimeout:8,i18n:{},screenshotUseHighQuality:!1,requestAnimationFrameMaxDiff:800,isUseFileProtocol:!1};ne(386),ne(497),ne(546),ne(450),ne(685),ne(691),ne(730),ne(659),ne(259),ne(534),ne(437),ne(572),ne(393),ne(512),ne(403),ne(285),ne(323),ne(556),ne(522);const Se={init:"init",initVideo:ne(338),render:ne(385),playAudio:ne(587),initAudio:"initAudio",kBps:ne(374),decode:"decode",audioCode:ne(490),audioNalu:ne(583),audioAACSequenceHeader:"audioAACSequenceHeader",videoCode:ne(319),videoCodec:ne(568),videoNalu:ne(283),videoPayload:ne(706),audioPayload:ne(425),wasmError:"wasmError",workerFetch:"workerFetch",iframeIntervalTs:ne(657),isDropping:ne(641),workerEnd:"workerEnd",networkDelay:ne(717),playbackStreamVideoFps:ne(695),wasmWidthOrHeightChange:ne(446),simdDecodeError:ne(718),simdH264DecodeVideoWidthIsTooLarge:ne(322),websocketOpen:ne(537),websocketStringMsg:ne(654),closeEnd:ne(608),tempStream:ne(703),videoSEI:"videoSEI",flvScriptData:ne(707),aacSequenceHeader:ne(411),videoSequenceHeader:"videoSequenceHeader",flvBufferData:"flvBufferData",checkFirstIFrame:ne(260),mseHandle:"mseHandle",mseFirstRenderTime:ne(394),mseError:ne(645),notSupportNewWasm:ne(622),failedToAsynchronouslyPrepareWasm:ne(604)};ne(279);const Ie={audio:1,video:2},Ae={audio:8,video:9,scriptData:18},Ee={init:ne(544),decode:ne(443),audioDecode:"audioDecode",videoDecode:"videoDecode",initAudioCodec:ne(438),initVideoCodec:ne(276),close:ne(263),updateConfig:"updateConfig",resetDecode:ne(360),clearBuffer:ne(330),resetAudioDecode:"resetAudioDecode",resetVideoDecode:"resetVideoDecode",fetchStream:ne(633),sendWsMessage:ne(688),mseUpdateVideoTimestamp:ne(242),playbackIsPause:ne(311)};ne(612),ne(249),ne(428),ne(539),ne(620),ne(526),ne(648),ne(544),ne(564),ne(249),ne(428),ne(462),ne(555),ne(537),ne(654),ne(544);const ke={fullscreen:ne(419),fullScreenByStart:ne(720),webFullscreen:ne(658),decoderWorkerInit:ne(725),play:ne(655),playing:ne(662),pause:"pause",mute:ne(296),load:ne(606),loading:ne(384),zooming:"zooming",drawingRect:ne(569),drawingRectInfo:ne(342),videoInfo:ne(726),timeUpdate:ne(679),audioInfo:ne(378),log:ne(281),error:"error",kBps:"kBps",timeout:ne(323),delayTimeout:ne(581),delayTimeoutRetryEnd:ne(383),loadingTimeout:ne(556),loadingTimeoutRetryEnd:ne(380),stats:ne(681),performance:ne(665),videoSmooth:ne(292),faceDetectActive:ne(432),objectDetectActive:"objectDetectActive",occlusionDetectActive:ne(410),imageDetectActive:ne(471),record:ne(692),recording:ne(593),recordingTimestamp:ne(241),recordStart:"recordStart",recordEnd:ne(290),recordCreateError:ne(701),recordBlob:ne(306),recordCancel:ne(675),buffer:"buffer",videoFrame:"videoFrame",videoSEI:ne(513),videoSEISyncPts:"videoSEISyncPts",start:ne(521),metadata:ne(576),resize:ne(595),volumechange:"volumechange",volume:ne(433),destroy:ne(249),beforeDestroy:"beforeDestroy",streamEnd:"streamEnd",streamRate:ne(309),streamAbps:ne(663),streamVbps:ne(639),streamDts:ne(624),streamSuccess:ne(628),streamMessage:ne(682),streamError:ne(357),streamStats:"streamStats",streamEndInner:"streamEndInner",mseSourceOpen:ne(324),mseSourceClose:ne(382),mseSourceended:ne(514),mseSourceStartStreaming:ne(538),mseSourceEndStreaming:ne(548),mseSourceBufferError:ne(372),mseAddSourceBufferError:ne(244),mseWorkerAddSourceBufferError:ne(354),mseSourceBufferBusy:ne(332),mseSourceBufferFull:ne(696),videoWaiting:"videoWaiting",videoTimeUpdate:ne(255),videoSyncAudio:"videoSyncAudio",playToRenderTimes:"playToRenderTimes",playbackTime:"playbackTime",playbackTimestamp:ne(420),playbackTimeScroll:ne(596),playbackPrecision:"playbackPrecision",playbackShowPrecisionChange:ne(618),playbackJustTime:ne(337),playbackStats:ne(489),playbackSeek:ne(494),playbackPause:ne(713),playbackPauseOrResume:ne(435),playbackRateChange:ne(580),playbackPreRateChange:"playbackPreRateChange",playbackEndInner:ne(333),playbackEnd:ne(264),playVodStats:"playVodStats",playVodPause:ne(671),playVodPauseOrResume:ne(617),playVodRateChange:ne(631),playVodTime:ne(408),playVodTimeCache:ne(535),playVodSeek:ne(511),playVodSeekEnd:ne(501),playVodVideoSeekingByMse:ne(278),playVodVideoSeekedByMse:ne(346),playVodCanplay:"playVodCanplay",playVodWaiting:"playVodWaiting",playVodEndedAndReplay:ne(523),playVodEnded:"playVodEnded",ptz:ne(246),streamQualityChange:"streamQualityChange",visibilityChange:ne(467),netBuf:ne(642),close:ne(263),networkDelayTimeout:ne(475),togglePerformancePanel:"togglePerformancePanel",viewResizeChange:ne(252),flvDemuxBufferSizeTooLarge:ne(336),talkGetUserMediaSuccess:"talkGetUserMediaSuccess",talkGetUserMediaFail:"talkGetUserMediaFail",talkGetUserMediaTimeout:ne(600),talkStreamStart:ne(571),talkStreamOpen:ne(239),talkStreamClose:ne(711),talkStreamError:ne(367),talkStreamInactive:ne(402),talkStreamMsg:ne(469),webrtcDisconnect:ne(299),webrtcFailed:"webrtcFailed",webrtcClosed:ne(351),webrtcChecking:ne(683),webrtcConnected:ne(271),webrtcCompleted:ne(298),webrtcOnConnectionStateChange:ne(470),webrtcOnIceConnectionStateChange:ne(584),crashLog:ne(401),focus:ne(598),blur:ne(345),inView:ne(275),visibilityHiddenTimeout:ne(461),websocketOpen:ne(537),websocketClose:"websocketClose",websocketError:ne(462),websocketStringMsg:ne(654),aiObjectDetectorInfo:ne(288),aiFaceDetectorInfo:ne(635),aiOcclusionDetectResult:"aiOcclusionDetectResult",aiImageDetectResult:ne(396),playFailedAndPaused:ne(673),audioResumeState:ne(674),webrtcStreamH265:"webrtcStreamH265",flvMetaData:ne(484),talkFailedAndStop:ne(361),removeLoadingBgImage:ne(664),memoryLog:ne(540),downloadMemoryLog:ne(601),pressureObserverCpu:"pressureObserverCpu",currentPts:ne(416),online:ne(560),offline:"offline",networkState:"networkState",clickInitPlayer:ne(248)};ne(606),ne(726),ne(378),ne(374),ne(380),ne(358),ne(658),ne(529),ne(296),ne(681),ne(665),ne(272),ne(701),ne(290),ne(306),ne(675),ne(599),ne(494),ne(435),ne(580),ne(617),ne(631),ne(408),ne(511),ne(501),ne(640),ne(449),ne(598),ne(467),ne(537),ne(654),ne(475),ne(288),ne(635),ne(327),ne(615),ne(674),ne(513),ne(253),ne(470),ne(669),ne(433),ne(342),ne(248),ne(711),ne(402),ne(600),ne(361),ne(606),ne(679),ne(352),ne(521),ne(556),ne(380),ne(581),ne(383),ne(655),ne(296),ne(681),ne(599),ne(401),ne(537),ne(555),ne(673),ne(674);const Ce={talkStreamError:ke[ne(367)],talkStreamClose:ke.talkStreamClose},xe={playError:ne(557),fetchError:ne(620),fetchErrorWorker:ne(677),websocketError:ne(462),websocketOpenTimeout:"websocketOpenTimeout",webcodecsH265NotSupport:"webcodecsH265NotSupport",webcodecsDecodeError:ne(666),webcodecsUnsupportedConfigurationError:ne(488),webcodecsDecodeConfigureError:"webcodecsDecodeConfigureError",webcodecsAudioInitTimeout:ne(708),webcodecsAudioNoDataTimeout:ne(280),mediaSourceH265NotSupport:ne(638),mediaSourceAudioG711NotSupport:ne(710),mediaSourceAudioInitTimeout:ne(339),mediaSourceAudioNoDataTimeout:ne(722),mediaSourceDecoderConfigurationError:ne(653),mediaSourceFull:ke.mseSourceBufferFull,mseSourceBufferError:ke.mseSourceBufferError,mseAddSourceBufferError:ke[ne(244)],mseWorkerAddSourceBufferError:ke[ne(354)],mediaSourceAppendBufferError:ne(541),mediaSourceTsIsMaxDiff:"mediaSourceTsIsMaxDiff",mediaSourceUseCanvasRenderPlayFailed:ne(356),mediaSourceBufferedIsZeroError:ne(509),wasmDecodeError:ne(329),wasmUseVideoRenderError:ne(588),simdH264DecodeVideoWidthIsTooLarge:ne(322),simdDecodeError:ne(718),hlsError:"hlsError",webrtcError:ne(400),webrtcClosed:ke[ne(351)],webrtcIceCandidateError:ne(626),webglAlignmentError:"webglAlignmentError",wasmWidthOrHeightChange:ne(446),mseWidthOrHeightChange:ne(245),wcsWidthOrHeightChange:"wcsWidthOrHeightChange",widthOrHeightChange:ne(613),tallWebsocketClosedByError:ne(409),flvDemuxBufferSizeTooLarge:ke[ne(336)],audioChannelError:ne(643),webglContextLostError:"webglContextLostError",videoElementPlayingFailed:ne(304),videoElementPlayingFailedForWebrtc:ne(347),decoderWorkerInitError:"decoderWorkerInitError",decoderWorkerWasmError:ne(694),videoInfoError:ne(391),streamEnd:ke[ne(615)],websocket1006Error:ne(397),delayTimeout:ke[ne(581)],loadingTimeout:ke[ne(556)],networkDelayTimeout:ke[ne(475)],fullscreenError:ne(519),aliyunRtcError:ne(702),mseWaitVideoCanplayTimeout:ne(507),initDecoderWorkerTimeout:ne(503),notSupportNewWasm:"notSupportNewWasm",failedToAsynchronouslyPrepareWasm:ne(604),playVodMp4Error:ne(258),mp4Error:ne(668),...Ce},Te={notConnect:ne(553),open:"open",close:ne(263),error:ne(352)},Be={connecting:0,open:1,closing:2,closed:3};ne(562),ne(550),ne(672),ne(434),ne(331),ne(672),ne(331),ne(325),ne(656),ne(510);const De={h264:7,h265:12,mpeg4:99},Me={h264:"H264(AVC)",h265:"H265(HEVC)"},Ue={AAC:10,ALAW:7,MULAW:8,MP3:2,OPUS:13,G711A:7,G711U:8};ne(376),ne(676),ne(493),ne(486),ne(376),ne(392);const Pe={sps:7,pps:8,iFrame:5,kUnspecified:0,kSliceNonIDR:1,kSliceDPA:2,kSliceDPB:3,kSliceDPC:4,kSliceIDR:5,kSliceSEI:6,kSliceSPS:7,kSlicePPS:8,kSliceAUD:9,kEndOfSequence:10,kEndOfStream:11,kFiller:12,kSPSExt:13,kReserved0:14},Fe={pFrame:1,kSliceBLA_W_LP:16,kSliceBLA_W_RADL:17,kSliceBLA_N_LP:18,iFrame:19,kSliceIDR_W_RADL:19,nLp:20,kSliceIDR_N_LP:20,craNut:21,kSliceCRA_NUT:21,kSliceRSV_IRAP_VCL22:22,kSliceRSV_IRAP_VCL23:23,vps:32,kSliceVPS:32,sps:33,kSliceSPS:33,pps:34,kSlicePPS:34,kSliceAUD:35,sei:39,prefixSei:39,suffixSei:40};function Re(e,t){const r=Ge();return(Re=function(e,t){return r[e-=239]})(e,t)}ne(277),ne(328),ne(262),ne(500),ne(318),ne(499),ne(405);const Le={key:ne(579),delta:ne(240)},Oe={avc:ne(532),hev:'video/mp4; codecs="hev1.1.6.L123.b0"',hev2:ne(690),hev3:ne(559),hev4:'video/mp4;codecs="hev1.3.E.L120.90"',hev5:'video/mp4;codecs="hev1.4.10.L120.90"'},ze={ended:ne(566),open:"open",closed:ne(453)};ne(578),ne(350),ne(552),ne(561),ne(712),ne(256),ne(363),ne(520),ne(578),ne(350),ne(552),ne(504),ne(582),ne(341),ne(424),ne(699),ne(498),ne(307),ne(422),ne(582),ne(341),ne(424),ne(650),ne(390),ne(254),ne(321),ne(625),ne(670),ne(423),ne(594),ne(729),ne(705),ne(478),ne(373);ne(303),ne(257),ne(623);ne(627),ne(270);const Ne={sourceClose:"sourceclose",sourceOpen:ne(517),sourceended:ne(369),startstreaming:ne(716),endstreaming:ne(413),qualitychange:ne(266)};ne(415),ne(570),ne(355),ne(301),ne(508);const He={h264:ne(427),h265:ne(289),av1:"av1"};ne(516),ne(370),ne(439),ne(381),ne(651),ne(426);const Ve={abortError:ne(452),abortError2:ne(491),abort:ne(491)};ne(662),ne(689);const je={sequenceHeader:0,nalu:1},We=1;ne(284),ne(334),ne(273),ne(527),ne(547);ne(441),ne(359),ne(340),ne(263),ne(352),ne(515);ne(417);function Ge(){const e=["videoSEI","mseSourceended","message","A key frame is required after configure() or flush()","sourceopen","container","fullscreenError","5min","start","heartTimeout","playVodEndedAndReplay","AliyunRtc","loadeddata","fetchClose","tcp","click","pause","inbound-rtp","active",'video/mp4; codecs="avc1.64002A"',"script","isNakedFlow","playVodTimeCache","3-1","websocketOpen","mseSourceStartStreaming","buffer","memoryLog","mediaSourceAppendBufferError","解析视频分辨率失败","遮挡物检查","init","transport","isM7sCrypto","udp","mseSourceEndStreaming","multiMouseover","full","787555SkvKWU","tenMin","notConnect","MEDIA_ERR_NETWORK","websocketClose","loadingTimeout","playIsNotPauseOrUrlIsNull","M7S",'video/mp4;codecs="hev1.2.4.L120.90"',"online","one-hour","buffering","遮挡物检查激活","sendMessage","6690ZLyuoY","ended","wcs","videoCodec","drawingRect","timeupdate","talkStreamStart","isAliyunRtc","FLV","818226YQoyES","mouseDownAndUp","metadata","mov","oneHour","key","playbackRateChange","delayTimeout","right","audioNalu","webrtcOnIceConnectionStateChange","no-audio-track","self","playAudio","wasmUseVideoRenderError","remote-outbound-rtp","3-4","playbackTF","flv","recording","cruiseStart","resize","playbackTimeScroll","nakedFlow","focus","playToRenderTimes","talkGetUserMediaTimeout","downloadMemoryLog","multiDrop","remove-buffer","failedToAsynchronouslyPrepareWasm","webrtc-failed","load","local-candidate","closeEnd","stream-parsed","canvas","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","fetch","widthOrHeightChange","请求失败","streamEnd","人脸识别","playVodPauseOrResume","playbackShowPrecisionChange","suspend","fetchError","请求结束","notSupportNewWasm","opus","streamDts","zoomNarrow","webrtcIceCandidateError","image/png","streamSuccess","durationchange","性能面板激活","playVodRateChange","peer-connection","fetchStream","video decoder initialization failed","aiFaceDetectorInfo","性能面板","HLS","mediaSourceH265NotSupport","streamVbps","streamQualityChange","isDropping","netBuf","audioChannelError","加载超时重播失败","mseError","websocket","connecting","fetchSuccess","wcsDecodeError","leftUp","Decoder error","MEDIA_ERR_ABORTED","mediaSourceDecoderConfigurationError","websocketStringMsg","play","H265(HEVC)","iframeIntervalTs","webFullscreen","isFlv","JessibucaPro","wasm","playing","streamAbps","removeLoadingBgImage","performance","webcodecsDecodeError","seeked","mp4Error","networkState","apertureFar","playVodPause","download","playFailedAndPaused","audioResumeState","recordCancel","ALAW(g711a)","fetchErrorWorker","物品识别","timeUpdate","video","stats","streamMessage","webrtcChecking","canplaythrough","widthOrHeightChangeReplayDelayTime","播放超时重播失败","操作盘激活","sendWsMessage","paused",'video/mp4;codecs="hev1.1.6.L120.90"',"controlSize","record","video自动渲染失败","decoderWorkerWasmError","playbackStreamVideoFps","mseSourceBufferFull","jbprovm","outbound-rtp","left-up","WebTransport","recordCreateError","aliyunRtcError","tempStream","1956789worzYo","fogOpen","videoPayload","flvScriptData","webcodecsAudioInitTimeout","流异常","mediaSourceAudioG711NotSupport","talkStreamClose","ten-min","playbackPause","jbprov","media-source","startstreaming","networkDelay","simdDecodeError","10DmfWAd","fullScreenByStart","switch-url-failed","mediaSourceAudioNoDataTimeout","缓冲区已满","switch-url-success","decoderWorkerInit","videoInfo","webrtc-completed","multiSelected","cruiseStop","multiIndex","talkStreamOpen","delta","recordingTimestamp","mseUpdateVideoTimestamp","1-1","mseAddSourceBufferError","mseWidthOrHeightChange","ptz","decoder-pro-old.js","clickInitPlayer","destroy","load-complete","0000000000","viewResizeChange","videoSEISyncPts","stop","videoTimeUpdate","five-min","pcm","playVodMp4Error","isFmp4","checkFirstIFrame","decoder-pro.js","webgl2","close","playbackEnd","canplay","qualitychange","loadstart","初始化音频解码器失败","FMP4","image/jpeg","webrtcConnected","recordStart","jtt","fmp4","inView","initVideoCodec","webcodecs","playVodVideoSeekingByMse","Invalid NAL unit size","webcodecsAudioNoDataTimeout","log","worker","videoNalu","empty","videoRenderSupportScale","4-1","normal","aiObjectDetectorInfo","hevc","recordEnd","mpeg4","videoSmooth","2294652QzKUXN","等待音频数据超时","player","mute","debug","webrtcCompleted","webrtcDisconnect","speed","stalled","load-response-headers","g711a","videoElementPlayingFailed","网络超时重播失败","recordBlob","left-down","seeking","streamRate","停止录制","playbackIsPause","idle","track","hls-level-loaded","multiMousemove","退出全屏","receiver","mse","videoCode","readystatechange","zoomExpand","simdH264DecodeVideoWidthIsTooLarge","timeout","mseSourceOpen","H264(AVC)","电子放大","aiOcclusionDetectResult","webgl","wasmDecodeError","clearBuffer","blob","mseSourceBufferBusy","playbackEndInner","rtp","FLV待解封装buffer过大","flvDemuxBufferSizeTooLarge","playbackJustTime","initVideo","mediaSourceAudioInitTimeout","open","down","drawingRectInfo","940974fblSUX","sei-in-time","blur","playVodVideoSeekedByMse","videoElementPlayingFailedForWebrtc","window","volumechange","halfHour","webrtcClosed","error","webrtc-disconnected","mseWorkerAddSourceBufferError","ratechange","mediaSourceUseCanvasRenderPlayFailed","streamError","fullscreen","playback","resetDecode","talkFailedAndStop","sourcebuffer-created","30min","ulaw","none","white","talkStreamError","certificate","sourceended","Cannot call 'decode' on a closed codec","播放地址不能为空","mseSourceBufferError","wiperClose","kBps","物品识别激活","AAC","global","audioInfo","multiMouseout","loadingTimeoutRetryEnd","Decoding error","mseSourceClose","delayTimeoutRetryEnd","loading","render","playType","default","complete","webrtc不支持H265","rightDown","videoInfoError","MULAW","isTs","mseFirstRenderTime","subtitle-segments","aiImageDetectResult","websocket1006Error","multiDragenter","MEDIA_ERR_SRC_NOT_SUPPORTED","webrtcError","crashLog","talkStreamInactive","watermarkConfig","webgl 上下文丢失","webrtc","MediaSource解码使用canvas渲染失败","decoder-pro-audio.js","playVodTime","tallWebsocketClosedByError","occlusionDetectActive","aacSequenceHeader","remote-candidate","endstreaming","subtitle-playlist","waiting","currentPts","worklet","decoder-pro-hard-not-wasm.js","fullscreen$2","playbackTimestamp","warn","right-down","focusNear","left","audioPayload","HEVC decoding is not supported","avc","destroyEnd","aliyunRtc","/crypto/","jessibuca-pro-mp4-recorder-decoder.js","faceDetectActive","volume","base64","playbackPauseOrResume","multiFullscreen","isWebrtc","initAudioCodec","Decoder failure","flv-script-data","stream","emptied","decode","demuxed-track","388UVwfVS","wasmWidthOrHeightChange","webTransport","webrtc-closed","zooming","pauseAndNextPlayUseLastFrameShow","mp4","The user aborted a request","closed","simple","流异常结束","硬解码不支持G711a/u音频格式","不支持硬解码H265","sender","playVod","初始化解码器失败","visibilityHiddenTimeout","websocketError","3720ACGrgG","m7s","csrc","解码失败","visibilityChange","wasm解码失败","talkStreamMsg","webrtcOnConnectionStateChange","imageDetectActive","Webrtc","ws1006","multiMouseup","networkDelayTimeout","object","初始化解码worker超时","wiperOpen","MEDIA_ERR_DECODE","人脸识别激活","alaw","created","mseDecodeError","flvMetaData","sei","MP3","#000","webcodecsUnsupportedConfigurationError","playbackStats","audioCode","AbortError","#343434","MULAW(g711u)","playbackSeek","decoder-pro-hard.js","red","isMulti","right-up","hls","offscreen","playVodSeekEnd","FSimd","initDecoderWorkerTimeout","fiveMin","3304RVHqGW","Simd","mseWaitVideoCanplayTimeout","loadedmetadata","mediaSourceBufferedIsZeroError","MPEG4","playVodSeek","ghostWatermarkConfig"];return(Ge=function(){return e})()}ne(303),ne(334),ne(251),ne(417),ne(417),ne(533),ne(531),ne(492),ne(487),ne(436),ne(728),ne(549),ne(379),ne(474),ne(315),ne(398),ne(602),ne(536),ne(286),ne(243),ne(590),ne(518),ne(680);const qe=1;ne(612),ne(395),ne(314),ne(444),ne(440),ne(300),ne(250),ne(302),ne(485),ne(344),ne(585),ne(603),ne(362),ne(721),ne(724),ne(414),ne(609);const $e={idle:ne(312),connecting:ne(647),buffering:ne(562),error:"error",complete:"complete"};ne(652),ne(554),ne(479),ne(399),ne(634);const Ye={video:1,audio:2},Ke=128,Xe={PACKET_TYPE_SEQ_START:0,PACKET_TYPE_FRAMES:1,PACKET_TYPE_SEQ_END:2,PACKET_TYPE_FRAMESX:3,PACKET_TYPE_METADATA:4},Je={FT_KEY:16,FT_INTER:32};ne(368),ne(465),ne(530),ne(607),ne(698),ne(632),ne(317),ne(412),ne(589),ne(458),ne(313),ne(545),ne(715),ne(473),ne(483),ne(649),ne(357),ne(364),ne(481),ne(727),ne(353),ne(605),ne(448),ne(482),ne(384);const Ze=typeof window===ne(476)&&window[ne(348)]===window?window:"object"==typeof self&&self[ne(586)]===self?self:typeof global===ne(476)&&global[ne(377)]===global?global:void 0;ne(265),ne(684),ne(388),ne(629),ne(442),ne(566),ne(525),ne(508),ne(267),ne(529),ne(655),ne(662),ne(355),ne(667),ne(308),ne(301),ne(619),ne(570),ne(349),ne(415),ne(320),ne(352),ne(316),ne(310),ne(687),ne(326),ne(636),ne(630),ne(616),ne(480),ne(678),ne(375),ne(543),ne(563),ne(506),ne(502),ne(611);var Qe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function et(e,t){return e(t={exports:{}},t.exports),t.exports}var tt=Object.freeze({__proto__:null,commonjsGlobal:Qe,commonjsRequire:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},unwrapExports:function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e},createCommonjsModule:et,getCjsExportFromNamespace:function(e){return e&&e.default||e}}),rt=it;function nt(){var e=["10FOiYFS","bind","requestFullscreen","exports","change","undefined","1HZWuDT","mozFullScreenElement","addEventListener","exit","msFullscreenEnabled","documentElement","isEnabled","webkitCurrentFullScreenElement","1763469xfumAn","defineProperties","isFullscreen","screenfull","137020zkMovp","1529cMEojH","mozfullscreenchange","object","MSFullscreenError","1086784JuIlCk","fullscreenEnabled","then","2169250HoUswU","webkitFullscreenEnabled","catch","webkitfullscreenchange","createCommonjsModule","16sKljuF","mozCancelFullScreen","webkitRequestFullscreen","MSFullscreenChange","fullscreenElement","1956312YHzOvq","fullscreenchange","fullscreenerror","5720265dZUqZm","mozRequestFullScreen","webkitfullscreenerror","length","exitFullscreen","webkitRequestFullScreen","msFullscreenElement","document","error","313243Mwqqss","msExitFullscreen","off"];return(nt=function(){return e})()}function it(e,t){var r=nt();return(it=function(e,t){return r[e-=316]})(e,t)}!function(e,t){for(var r=it,n=e();;)try{if(609843===parseInt(r(361))/1*(-parseInt(r(330))/2)+-parseInt(r(318))/3+parseInt(r(327))/4+parseInt(r(355))/5*(parseInt(r(340))/6)+parseInt(r(352))/7*(parseInt(r(335))/8)+-parseInt(r(343))/9+-parseInt(r(322))/10*(-parseInt(r(323))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(nt),tt[rt(334)]((function(e){var t,r,n,i,s,o;t=it,r=typeof window!==t(360)&&typeof window.document!==t(360)?window[t(350)]:{},n=t(325)!==t(360)&&e[t(358)],i=function(){for(var e,n=t,i=[[n(357),n(347),n(339),n(328),n(341),n(342)],[n(337),"webkitExitFullscreen","webkitFullscreenElement",n(331),n(333),n(345)],[n(348),"webkitCancelFullScreen",n(317),"webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],[n(344),n(336),n(362),"mozFullScreenEnabled",n(324),"mozfullscreenerror"],["msRequestFullscreen",n(353),n(349),n(365),n(338),n(326)]],s=0,o=i[n(346)],a={};s32&&console[t(107)]("ExpGolomb: readBits() bits exceeded max 32bits!"),e<=this[t(131)]){let r=this[t(130)]>>>32-e;return this[t(130)]<<=e,this._current_word_bits_left-=e,r}let r=this._current_word_bits_left?this._current_word:0;r>>>=32-this[t(131)];let n=e-this._current_word_bits_left;this._fillCurrentWord();let i=Math.min(n,this._current_word_bits_left),s=this[t(130)]>>>32-i;return this[t(130)]<<=i,this[t(131)]-=i,r=r<>>t))return this[e(130)]<<=t,this._current_word_bits_left-=t,t;return this[e(129)](),t+this[e(122)]()}[st(114)](){const e=st;let t=this[e(122)]();return this[e(127)](t+1)-1}[st(126)](){let e=this[st(114)]();return 1&e?e+1>>>1:-1*(e>>>1)}}function at(){const e=["getUint32","5234580GDuTFE","23727OsmGKG","_total_bytes","2137uDyddV","destroy","readUEG","byteLength","_buffer_index","readBool","2810505zhTclV","372bWgXMK","28GhGRkn","397210VrKWsK","_skipLeadingZero","ExpGolomb: _fillCurrentWord() but no bytes available","_buffer","min","readSEG","readBits","3345888KDajRR","_fillCurrentWord","_current_word","_current_word_bits_left","20YeacYO","readByte","275ZCDAIM","127878OFxkcf","error"];return(at=function(){return e})()}function ct(e,t){const r=at();return(ct=function(e,t){return r[e-=105]})(e,t)}const ut=gt;!function(e,t){const r=gt,n=e();for(;;)try{if(624671===-parseInt(r(239))/1*(parseInt(r(190))/2)+parseInt(r(228))/3*(parseInt(r(215))/4)+-parseInt(r(224))/5+parseInt(r(229))/6+parseInt(r(241))/7+parseInt(r(219))/8*(parseInt(r(234))/9)+parseInt(r(221))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(vt);const lt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1],dt=lt,ht=lt;function ft(e){let{profile:t,sampleRate:r,channel:n}=e;return new Uint8Array([175,0,t<<3|(14&r)>>1,(1&r)<<7|n<<3])}function pt(e){const t=gt;return mt(e)&&e[1]===je[t(184)]}function mt(e){const t=gt;return e[0]>>4===Ue[t(199)]}function vt(){const e=["audio_object_type","findNextSyncwordOffset","log","aacEncoderConfigurationRecord","hasIncompleteData","readByte","audioMuxVersionA is Not Supported","channels","error","current_syncword_offset_","more than 2 numProgram Not Supported","allStreamsSameTimeFraming zero is Not Supported","warn","sequenceHeader","more than 2 numLayer Not Supported","byteLength","sbr","Could not found ADTS syncword until payload end","sampling_index","42GgCtxv","indexOf","firefox","set","Flv: AAC invalid sampling frequency index!","bufoff","chan_config","eof_flag_","StreamMuxConfig Missing","AAC","slice","navigator","sampling_freq_index","unshift","buffer","object_type","look","userAgent","data_","readBool","sampling_frequency","data","channel_config","frameLengthType = ","sample_rate","4SOXXXT","length","mp4a.40.","getIncompleteData","32jIJEOr","channel: ","7476480ZXlexZ","readNextAACFrame","android","2955555YNIcWq","readBits","read","mp4a.40.2","53943SxITDQ","250428wgNacP","buflen","getLATMValue","read_golomb","iserro","1526643ERHiYY","destroy","bufpos","other_data_present","subarray","55743xkMmWI","has_last_incomplete_data","6303570GydiOq"];return(vt=function(){return e})()}const yt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];function _t(e){const t=gt;let r=new Uint8Array(e),n=null,i=0,s=0,o=0,a=null;if(i=s=r[0]>>>3,o=(7&r[0])<<1|r[1]>>>7,o<0||o>=yt[t(216)])return void console[t(250)](t(194));let c=yt[o],u=(120&r[1])>>>3;if(u<0||u>=8)return void console[t(244)]("Flv: AAC invalid channel configuration");5===i&&(a=(7&r[1])<<1|r[2]>>>7,r[2]);let l=Ze[t(201)][t(207)].toLowerCase();return-1!==l[t(191)](t(192))?o>=6?(i=5,n=new Array(4),a=o-3):(i=2,n=new Array(2),a=o):-1!==l[t(191)](t(223))?(i=2,n=new Array(2),a=o):(i=5,a=o,n=new Array(4),o>=6?a=o-3:1===u&&(i=2,n=new Array(2),a=o)),n[0]=i<<3,n[0]|=(15&o)>>>1,n[1]=(15&o)<<7,n[1]|=(15&u)<<3,5===i&&(n[1]|=(15&a)>>>1,n[2]=(1&a)<<7,n[2]|=8,n[3]=0),{audioType:"aac",config:n,sampleRate:c,channelCount:u,objectType:i,codec:"mp4a.40."+i,originalCodec:t(217)+s}}ut(206),ut(232);function gt(e,t){const r=vt();return(gt=function(e,t){return r[e-=180]})(e,t)}class bt{constructor(e){const t=ut;this[t(208)]=e,this.eof_flag_=!1,this[t(180)]=this[t(243)](0),this[t(197)]&&console.error(t(188))}[ut(243)](e){const t=ut;let r=e,n=this[t(208)];for(;;){if(r+7>=n.byteLength)return this[t(197)]=!0,n[t(186)];if(4095===(n[r+0]<<8|n[r+1])>>>4)return r;r++}}readNextAACFrame(){const e=ut;let t=this.data_,r=null;for(;null==r&&!this[e(197)];){let n=this[e(180)],i=(8&t[n+1])>>>3,s=(6&t[n+1])>>>1,o=1&t[n+1],a=(192&t[n+2])>>>6,c=(60&t[n+2])>>>2,u=(1&t[n+2])<<2|(192&t[n+3])>>>6,l=(3&t[n+3])<<11|t[n+4]<<3|(224&t[n+5])>>>5;if(t[n+6],n+l>this[e(208)][e(186)]){this[e(197)]=!0,this[e(240)]=!0;break}let d=1===o?7:9,h=l-d;n+=d;let f=this[e(243)](n+h);if(this[e(180)]=f,0!==i&&1!==i||0!==s)continue;let p=t.subarray(n,n+h);r={},r[e(242)]=a+1,r[e(202)]=c,r[e(210)]=dt[c],r[e(212)]=u,r[e(211)]=p}return r}[ut(246)](){return this[ut(240)]}[ut(218)](){const e=ut;return this[e(240)]?this[e(208)].subarray(this[e(180)]):null}}class wt{constructor(e){const t=ut;this[t(208)]=e,this[t(197)]=!1,this[t(180)]=this[t(243)](0),this[t(197)]&&console[t(250)](t(188))}[ut(243)](e){const t=ut;let r=e,n=this[t(208)];for(;;){if(r+1>=n[t(186)])return this[t(197)]=!0,n[t(186)];if(695===(n[r+0]<<3|n[r+1]>>>5))return r;r++}}[ut(231)](e){const t=ut;let r=e.readBits(2),n=0;for(let i=0;i<=r;i++)n<<=8,n|=e[t(247)]();return n}[ut(222)](e){const t=ut;let r=this[t(208)],n=null;for(;null==n&&!this.eof_flag_;){let i=this[t(180)],s=(31&r[i+1])<<8|r[i+2];if(i+3+s>=this[t(208)][t(186)]){this[t(197)]=!0,this[t(240)]=!0;break}let o=new ot(r[t(238)](i+3,i+3+s)),a=null;if(o.readBool()){if(null==e){console[t(183)](t(198)),this[t(180)]=this[t(243)](i+3+s),o.destroy();continue}a=e}else{let e=o.readBool();if(e&&o.readBool()){console[t(250)](t(248)),o[t(235)]();break}if(e&&this[t(231)](o),!o[t(209)]()){console.error(t(182)),o.destroy();break}if(0!==o[t(225)](6)){console[t(250)]("more than 2 numSubFrames Not Supported"),o.destroy();break}if(0!==o.readBits(4)){console[t(250)](t(181)),o.destroy();break}if(0!==o.readBits(3)){console[t(250)](t(185)),o[t(235)]();break}let r=e?this.getLATMValue(o):0,n=o[t(225)](5);r-=5;let i=o[t(225)](4);r-=4;let s=o[t(225)](4);r-=4,o[t(225)](3),r-=3,r>0&&o[t(225)](r);let c=o[t(225)](3);if(0!==c){console[t(250)](t(213)+c+". Only frameLengthType = 0 Supported"),o[t(235)]();break}o[t(247)]();let u=o[t(209)]();if(u)if(e)this.getLATMValue(o);else{let e=0;for(;;){e<<=8;let r=o[t(209)]();if(e+=o[t(247)](),!r)break}console[t(244)](e)}o[t(209)]()&&o[t(247)](),a={},a[t(242)]=n,a[t(202)]=i,a[t(210)]=dt[a[t(202)]],a.channel_config=s,a[t(237)]=u}let c=0;for(;;){let e=o.readByte();if(c+=e,255!==e)break}let u=new Uint8Array(c);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:0;return(e[r]<<24>>>0)+(e[r+1]<<16)+(e[r+2]<<8)+(e[r+3]||0)}function At(e){const t=St;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e[t(293)]<4)return[];const n=e[t(293)],i=[];let s,o=0;for(;o+r>>=8),o+=r,s){if(o+s>n)break;i[t(300)](e[t(309)](o,o+s)),o+=s}return i}function Et(e){const t=St;let r=arguments[t(293)]>1&&void 0!==arguments[1]&&arguments[1];const n=e[t(293)];let i=r?2:1,s=0,o=0,a="";for(;255===e[i];)s+=255,i++;for(s+=e[i++];255===e[i];)o+=255,i++;if(o+=e[i++],5===s&&n>i+16)for(let r=0;r<16;r++)a+=e[i][t(294)](16),i++;return{payload:e[t(309)](i),type:s,size:o,uuid:a}}function kt(e){const t=St,r=e[t(302)],n=new Uint8Array(4);n[0]=r>>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r;const i=new Uint8Array(r+4);return i[t(306)](n,0),i[t(306)](e,4),i}function Ct(){const e=["subarray","2865136fVjtwX","length","toString","buffer","4844682TCETLj","2209LHYZzS","398CJGHaM","5341790YApxAT","push","8191266dXLgyx","byteLength","1857KotvEV","7556ZifQdQ","shift","set","4648973Aswrli","setUint32"];return(Ct=function(){return e})()}function xt(e,t){const r=St;let n=null;return t?e.length>=28&&(n=1+(3&e[26])):e[r(293)]>=12&&(n=1+(3&e[9])),n}!function(e,t){const r=St,n=e();for(;;)try{if(828046===-parseInt(r(297))/1*(-parseInt(r(298))/2)+parseInt(r(303))/3*(parseInt(r(304))/4)+parseInt(r(299))/5+-parseInt(r(301))/6+-parseInt(r(307))/7+-parseInt(r(310))/8+parseInt(r(296))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ct);const Tt=Ot;function Bt(){const e=Ot;return(new Date)[e(551)]()}function Dt(e,t,r){const n=Ot;return Math[n(289)](Math.min(e,Math[n(289)](t,r)),Math[n(292)](t,r))}function Mt(){const e=Ot;return performance&&typeof performance[e(584)]===e(332)?performance.now():Date[e(584)]()}function Ut(e){let t=0,r=Mt();return n=>{if(!function(e){const t=Tt;return"[object Number]"===Object[t(572)].toString[t(459)](e)}(n))return;t+=n;const i=Mt(),s=i-r;s>=1e3&&(e(t/s*1e3),r=i,t=0)}}!function(e,t){const r=Ot,n=e();for(;;)try{if(985664===-parseInt(r(423))/1+parseInt(r(366))/2+-parseInt(r(407))/3+-parseInt(r(449))/4+parseInt(r(360))/5*(-parseInt(r(552))/6)+parseInt(r(298))/7*(parseInt(r(610))/8)+parseInt(r(548))/9*(parseInt(r(391))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Lt),(()=>{const e=Ot;try{if(typeof WebAssembly===e(297)&&typeof WebAssembly[e(476)]===e(332)){const t=new(WebAssembly[e(587)])(Uint8Array.of(0,97,115,109,1,0,0,0));if(t instanceof WebAssembly[e(587)])return new(WebAssembly[e(475)])(t)instanceof WebAssembly.Instance}}catch(e){}})();const Pt=Tt(589),Ft=Tt(441),Rt=Pt===Tt(571);Tt(486),Tt(614);function Lt(){const e=["apply","Edge","drawImage","absolute","noteOn","setUint32","wcsDecodeAudio","rect","sps","div","getDate","numberOfFrames","15dJXDiC","charAt","kSliceBLA_W_RADL","documentElement","px Arial","URL","353896lpwerE","fullscreenElement","substring","repeat","test","MouseEvents","scrollLeft","illegal icc","revokeObjectURL","close","memory","performance","getMonth","pps","fmt ","h265","safari","getSeconds","application/vnd.apple.mpegurl","visibility","hev4","WAVE",'video/mp4; codecs="',"random","setUint16","130TSTtGv","connect","atob","keys","clientX","pageY","height","VideoFrame","requestVideoFrameCallback","ManagedMediaSource","initEvent","-webkit-text-size-adjust","#000","toLowerCase","canPlayType","canvas","4946121yDVUiu","kSliceRSV_IRAP_VCL22","video","width","target","mousemove","audioWorklet","high","px 宋体","0 KB/s","mimeTypes","rgba(0,0,0,0)","fillStyle","format","iFrame","top","443089dApimo","QihooBrowser","click","hostname","getFullYear","element","origin","createObjectURL","getContext","start","search","contain","display","setInt16","getMinutes","toDataURL","appendChild","webgl",'"1-2-2025"',"green","set","canConstructInDedicatedWorker","stringify","pointer-events: none !important; display: block !important","clientY","getElementById","7177020bIKdct","webkitGetUserMedia","experimental-webgl","mediaDevices","webm","restore","getUserMedia",";base64","subarray","data","call","children","image/png","protocol","body","hour","QHBrowser","not compiled with thread support","getAttribute","-webkit-tap-highlight-color","EB/s","fillText","QQBrowser","If you want to help, upload a sample of this file to","borderColor","{y}-{m}-{d} {h}:{i}:{s}","Instance","instantiate","userAgent","hev5","addModule","360SE","AAC","resume","forEach","100%","[object DOMException]",'"2025-2-1"',"createBufferSource","createElement","application/vnd.chromium.remoting-viewer","Anonymous","event","wow64","nLp","-webkit-user-select","hev1.1.6.L120.90","fontSize","imageSmoothingQuality","paused","indexOf","AudioData","clearRect","overflow","script","VideoDecoder","Safari","substr","100","xxxx","hash","assign","mseDecodeAudio","user-select","touchstart","string","port","host","attachShadow","chrome","shadowRoot","srcElement","left","readAsArrayBuffer","zIndex","touches","application/360softmgrplugin","VideoEncoder.isConfigSupported is not a function","hev","font","onload","isFullscreen","MediaStreamTrackGenerator","Bytes","push","result","pageX","dataset","objectFit","round","hidden","360","href","content","getPropertyValue","[object Exception]","text","slice","demuxUseWorker","2557854UCKbUt","isEnabled","image","getTime","1396644DKMoUm","putImageData","transferControlToOffscreen","kSliceRSV_IRAP_VCL23","green yuv","match","join","length","setUint8","filter","setHours","right","trim","opera","replace","numberOfChannels","MB/s","data:","edge",'"delaytime"',"prototype","isTypeSupported","[object Error]","hev2","getDay","xxxxxxxxxxxx4xxx","setInt8","removeAttribute","charCodeAt","parse","firefox","useWCS","now","msGetUserMedia","webgl2","Module","VideoEncoder is not supported",'"production"',"hev3","MediaStream","textAlign","-ms-user-select","insertBefore","application/javascript","Edg","document","win64","bottom","createBuffer","mousedown","GB/s","true","removeChild","avc1.","then","download","-webkit-touch-callout","open","31672wvYvUv","save","toFixed","MediaSource","1738339200000","html","quality","fromCharCode","none","TB/s","navigator","PressureObserver","createTextNode","KB/s","scrollTop","solid","endsWith","text/javascript","copyright","lineWidth","log","VideoEncoder.isConfigSupported() result is not supported","undefined","-moz-user-select","WebGLRenderingContext","floor","ALAW","max","fontFamily","color","min","Worker","onerror","useMSE","msFullscreenElement","object","3003sUZkrI","AudioDecoder","kSliceBLA_W_LP","container","opacity","file","backgroundColor","playbackRate","line","status","img","split","getParameter","win32","ended","strokeRect","not compiled with thread support, using thread emulation","360EE","toString","Firefox","moz-webgl","setAttribute","isConfigSupported","touchmove","data-","error","version","type","style","localhost","imageSmoothingEnabled","dispatchEvent","kSliceBLA_N_LP","src","function","getUint8","pow","failed to asynchronously prepare wasm","createImageBitmap","block","hasAudio","location","MULAW","byteLength","map","copyToChannel","ActiveXObject","readyState","pathname","ZB/s"];return(Lt=function(){return e})()}function Ot(e,t){const r=Lt();return(Ot=function(e,t){return r[e-=280]})(e,t)}function zt(e){return null==e}function Nt(e){return!zt(e)}function Ht(e){return e&&"function"==typeof e}function Vt(e){const t=Tt;let r=null,n=31&e[0];return(n===Pe[t(356)]||n===Pe[t(379)])&&(r=Me.h264),!r&&(n=(126&e[0])>>1,(n===Fe.vps||n===Fe[t(356)]||n===Fe[t(379)])&&(r=Me[t(381)])),r}function jt(){return"undefined"!=typeof WritableStream}function Wt(e){e[Tt(375)]()}function Gt(e,t){const r=Tt;t&&(e=e[r(561)]((e=>e[r(325)]&&e[r(325)]===t)));let n=e[0],i=null,s=1;if(e.length>0){let t=e[1];t&&t.ts-n.ts>1e5&&(n=t,s=2)}if(n)for(let o=s;o=1e3){e[o-1].ts-n.ts<1e3&&(i=o+1)}}}return i}function qt(e){const t=Tt;return e.ok&&e[t(307)]>=200&&e[t(307)]<=299}function $t(){return function(e){const t=Tt;let r="";if("object"==typeof e)try{r=JSON[t(445)](e),r=JSON[t(581)](r)}catch(t){r=e}else r=e;return r}(we)}function Yt(e){return e[0]>>4===We&&e[1]===je.sequenceHeader}function Kt(e){return!0===e||"true"===e}function Xt(e){return!0!==e&&e!==Tt(603)}function Jt(){const e=Tt;return!!(Ze[e(293)]&&Ze[e(613)]&&e(444)in Ze[e(613)]&&!0===Ze.MediaSource[e(444)])}function Zt(e,t){const r=Tt,n=At(e[r(546)](5));let i=!1;return n.forEach((e=>{const n=r,s=t?e[0]>>>1&63:31&e[0];(t&&(s===Fe[n(300)]||s===Fe[n(362)]||s===Fe[n(330)]||s===Fe[n(421)]||n(493),n(408),s===Fe[n(555)])||Xt(t)&&s===Pe[n(421)])&&(i=!0)})),i}function Qt(){return Xt(Rt)}function er(e){return e>60*(Number("1")||1)*60*1e3&&Qt()}function tr(e,t){const r=nr();return(tr=function(e,t){return r[e-=237]})(e,t)}const rr=tr;function nr(){const e=["flush","length","consumed","resolve","readU16","__awaiter","15uFPiOF","throw","byteOffset","call","233303xcKQUs","value","writeU16","1307250CMyvVr","next","895815abzeEu","U32","close","demand","42QVsoQR","reject","byteLength","1FIUdtI","malloc","578652KtDQON","lastReadPromise","14110107CAxNPh","U16","copyWithin","2339794VCOafu","set","need","consume","subarray","apply","return","48ZAklHJ","3169360eMsqjM","read","writeU8","buffer","number","write"];return(nr=function(){return e})()}!function(e,t){const r=tr,n=e();for(;;)try{if(709928===-parseInt(r(274))/1*(-parseInt(r(238))/2)+parseInt(r(265))/3+parseInt(r(276))/4*(parseInt(r(258))/5)+-parseInt(r(271))/6*(-parseInt(r(262))/7)+-parseInt(r(245))/8*(parseInt(r(267))/9)+parseInt(r(246))/10+-parseInt(r(278))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(nr);var ir=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){const o=tr;function a(e){try{u(n.next(e))}catch(e){s(e)}}function c(e){const t=tr;try{u(n[t(259)](e))}catch(e){s(e)}}function u(e){const t=tr;var n;e.done?i(e.value):(n=e[t(263)],n instanceof r?n:new r((function(e){e(n)}))).then(a,c)}u((n=n[o(243)](e,t||[]))[o(266)]())}))};const sr=Symbol(32),or=Symbol(16),ar=Symbol(8);class cr{constructor(e){const t=rr;this.g=e,this[t(254)]=0,e&&(this[t(240)]=e[t(266)]()[t(263)])}setG(e){const t=rr;this.g=e,this[t(270)](e.next()[t(263)],!0)}[rr(241)](){const e=rr;this[e(249)]&&this.consumed&&(this.buffer[e(237)](0,this.consumed),this[e(249)]=this.buffer[e(242)](0,this[e(249)].length-this[e(254)]),this.consumed=0)}[rr(270)](e,t){const r=rr;return t&&this[r(241)](),this[r(240)]=e,this[r(252)]()}[rr(247)](e){return ir(this,void 0,void 0,(function*(){const t=tr;return this.lastReadPromise&&(yield this[t(277)]),this[t(277)]=new Promise(((r,n)=>{const i=t;var s;this[i(272)]=n,this[i(255)]=e=>{const t=i;delete this[t(277)],delete this[t(255)],delete this[t(240)],r(e)};this.demand(e,!0)||null===(s=this.pull)||void 0===s||s[i(261)](this,e)}))}))}readU32(){return this.read(sr)}[rr(256)](){return this.read(or)}readU8(){return this[rr(247)](ar)}[rr(269)](){const e=rr;var t;this.g&&this.g[e(244)](),this[e(249)]&&this.buffer[e(242)](0,0),null===(t=this[e(272)])||void 0===t||t[e(261)](this,new Error("EOF")),delete this.lastReadPromise}[rr(252)](){const e=rr;if(!this[e(249)]||!this[e(240)])return;let t=null;const r=this.buffer.subarray(this[e(254)]);let n=0;const i=t=>r[e(253)]<(n=t);if(typeof this[e(240)]===e(250)){if(i(this.need))return;t=r[e(242)](0,n)}else if(this.need===sr){if(i(4))return;t=r[0]<<24|r[1]<<16|r[2]<<8|r[3]}else if(this[e(240)]===or){if(i(2))return;t=r[0]<<8|r[1]}else if(this[e(240)]===ar){if(i(1))return;t=r[0]}else if(e(249)in this.need){if("byteOffset"in this.need){if(i(this[e(240)][e(273)]-this[e(240)].byteOffset))return;new Uint8Array(this[e(240)][e(249)],this[e(240)][e(260)]).set(r[e(242)](0,n)),t=this[e(240)]}else if(this.g)return void this.g[e(259)](new Error("Unsupported type"))}else{if(i(this.need.byteLength))return;new Uint8Array(this.need)[e(239)](r[e(242)](0,n)),t=this.need}return this.consumed+=n,this.g?this.demand(this.g[e(266)](t)[e(263)],!0):this[e(255)]&&this[e(255)](t),t}[rr(251)](e){const t=rr;if(e instanceof Uint8Array?this[t(275)](e[t(253)])[t(239)](e):"buffer"in e?this[t(275)](e[t(273)]).set(new Uint8Array(e[t(249)],e.byteOffset,e[t(273)])):this[t(275)](e[t(273)])[t(239)](new Uint8Array(e)),!this.g&&!this[t(255)])return new Promise((e=>this.pull=e));this[t(252)]()}writeU32(e){const t=rr;this[t(275)](4)[t(239)]([e>>24&255,e>>16&255,e>>8&255,255&e]),this[t(252)]()}[rr(264)](e){const t=rr;this[t(275)](2).set([e>>8&255,255&e]),this[t(252)]()}[rr(248)](e){const t=rr;this[t(275)](1)[0]=e,this[t(252)]()}malloc(e){const t=rr;if(this[t(249)]){const r=this.buffer[t(253)],n=r+e;if(n<=this.buffer[t(249)][t(273)]-this[t(249)].byteOffset)this[t(249)]=new Uint8Array(this[t(249)][t(249)],this[t(249)][t(260)],n);else{const e=new Uint8Array(n);e[t(239)](this[t(249)]),this[t(249)]=e}return this[t(249)][t(242)](r,n)}return this[t(249)]=new Uint8Array(e),this[t(249)]}}function ur(){const e=["_opt","5BrlHqi","debugLevel","error","6810152ePYekh","length","[❗❗❗][","2402yVcZKn","44552120NJIAKB","7sOIOUk","171MJDMql","warn","14275184dGflSc","debug","[❌❌❌][","10179726LsXaRI","JbPro","debugUuid","[✅✅✅][","1087443NjpjDw","log","3488652gIzzKV"];return(ur=function(){return e})()}function lr(e,t){const r=ur();return(lr=function(e,t){return r[e-=214]})(e,t)}cr[rr(268)]=sr,cr[rr(279)]=or,cr.U8=ar,function(e,t){const r=lr,n=e();for(;;)try{if(958863===-parseInt(r(216))/1*(-parseInt(r(235))/2)+-parseInt(r(225))/3+parseInt(r(232))/4+-parseInt(r(229))/5*(-parseInt(r(221))/6)+parseInt(r(215))/7*(parseInt(r(218))/8)+parseInt(r(227))/9+-parseInt(r(214))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ur);class dr{constructor(e){const t=lr;this[t(226)]=function(r){const n=t;if(e[n(228)].debugLevel==de[n(219)]){const t=e._opt[n(223)]?"["+e._opt.debugUuid+"]":"";for(var i=arguments[n(233)],s=new Array(i>1?i-1:0),o=1;o1?i-1:0),o=1;o1?s-1:0),a=1;a=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(190)],0,s)}static[hr(211)](e){const t=hr;let r=pr[t(198)](e),n=new ot(r);n[t(203)]();let i=n[t(203)]();n[t(203)]();let s=n[t(203)]();n[t(192)]();let o=pr.getProfileString(i),a=pr[t(205)](s),c=1,u=420,l=[0,420,422,444],d=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(c=n[t(192)](),3===c&&n[t(209)](1),c<=3&&(u=l[c]),d=n[t(192)]()+8,n[t(192)](),n[t(209)](1),n[t(186)]())){let e=3!==c?8:12;for(let r=0;r0&&e<16?(w=r[e-1],S=i[e-1]):255===e&&(w=n.readByte()<<8|n.readByte(),S=n[t(203)]()<<8|n[t(203)]())}if(n[t(186)]()&&n[t(186)](),n[t(186)]()&&(n[t(209)](4),n[t(186)]()&&n.readBits(24)),n[t(186)]()&&(n[t(192)](),n[t(192)]()),n.readBool()){let e=n[t(209)](32),r=n[t(209)](32);A=n[t(186)](),E=r,k=2*e,I=E/k}}let C=1;(1!==w||1!==S)&&(C=w/S);let x=0,T=0;if(0===c)x=1,T=2-v;else{x=3===c?1:2,T=(1===c?2:1)*(2-v)}let B=16*(p+1),D=16*(m+1)*(2-v);B-=(y+_)*x,D-=(g+b)*T;let M=Math[t(213)](B*C);return n[t(185)](),n=null,{profile_string:o,level_string:a,bit_depth:d,ref_frames:f,chroma_format:u,chroma_format_string:pr[t(194)](u),frame_rate:{fixed:A,fps:I,fps_den:k,fps_num:E},sar_ratio:{width:w,height:S},codec_size:{width:B,height:D},present_size:{width:M,height:D}}}static[hr(199)](e){const t=hr;let r=e.subarray(1,4),n="avc1.";for(let e=0;e<3;e++){let i=r[e][t(196)](16);i.length<2&&(i="0"+i),n+=i}let i=pr[t(198)](e),s=new ot(i);s[t(203)]();let o=s[t(203)]();s[t(203)]();let a=s.readByte();s[t(192)]();let c=pr[t(188)](o),u=pr.getLevelString(a),l=1,d=420,h=[0,420,422,444],f=8,p=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(l=s[t(192)](),3===l&&s[t(209)](1),l<=3&&(d=h[l]),f=s[t(192)]()+8,p=s[t(192)]()+8,s[t(209)](1),s[t(186)]())){let e=3!==l?8:12;for(let r=0;r0&&e<16?(A=r[e-1],E=n[e-1]):255===e&&(A=s[t(203)]()<<8|s[t(203)](),E=s[t(203)]()<<8|s.readByte())}if(s.readBool()&&s[t(186)](),s[t(186)]()&&(s[t(209)](4),s[t(186)]()&&s.readBits(24)),s[t(186)]()&&(s[t(192)](),s[t(192)]()),s[t(186)]()){let e=s.readBits(32),r=s[t(209)](32);C=s[t(186)](),x=r,T=2*e,k=x/T}}let B=1;(1!==A||1!==E)&&(B=A/E);let D=0,M=0;if(0===l)D=1,M=2-g;else{D=3===l?1:2,M=(1===l?2:1)*(2-g)}let U=16*(y+1),P=16*(_+1)*(2-g);U-=(b+w)*D,P-=(S+I)*M;let F=Math[t(213)](U*B);return s[t(185)](),s=null,{codec_mimetype:n,profile_idc:o,level_idc:a,profile_string:c,level_string:u,chroma_format_idc:l,bit_depth:f,bit_depth_luma:f,bit_depth_chroma:p,ref_frames:v,chroma_format:d,chroma_format_string:pr.getChromaFormatString(d),frame_rate:{fixed:C,fps:k,fps_den:T,fps_num:x},sar_ratio:{width:A,height:E},codec_size:{width:U,height:P},present_size:{width:F,height:P}}}static[hr(204)](e,t){const r=hr;let n=8,i=8,s=0;for(let o=0;o=this.buflen)return this[t(241)]=!0,0;this.iserro=!1,n=this[t(249)]+e>8?8-this[t(249)]:e,r<<=n,r+=this[t(236)][this[t(238)]]>>8-this[t(249)]-n&255>>8-n,this.bufoff+=n,e-=n,8==this[t(249)]&&(this.bufpos++,this[t(249)]=0)}return r}[vr(251)](e){const t=vr;let r=this[t(238)],n=this[t(249)],i=this[t(250)](e);return this[t(238)]=r,this[t(249)]=n,i}[vr(243)](){const e=vr;let t;for(t=0;0===this[e(250)](1)&&!this[e(241)];t++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i[t(532)](n,0),i[t(532)](r[t(497)],4),r[t(497)]=i}if(r[t(528)]){const e=r[t(528)][t(506)],n=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i[t(532)](n,0),i.set(r.pps,4),r[t(528)]=i}return r}function Er(e){const t=Pr;let{sps:r,pps:n}=e;const i=[23,0,0,0,0,1,66,0,30,255];i[0]=23,i[6]=r[1],i[7]=r[2],i[8]=r[3],i[10]=225,i[11]=r[t(506)]>>8&255,i[12]=255&r[t(506)],i.push(...r,1,n.byteLength>>8&255,255&n[t(506)],...n);return new Uint8Array(i)}function kr(e){const t=Pr;let{sps:r,pps:n}=e,i=8+r.byteLength+1+2+n[t(506)],s=!1;const o=pr.parseSPS$2(r);66!==r[3]&&77!==r[3]&&88!==r[3]&&(s=!0,i+=4);let a=new Uint8Array(i);a[0]=1,a[1]=r[1],a[2]=r[2],a[3]=r[3],a[4]=255,a[5]=225;let c=r[t(506)];a[6]=c>>>8,a[7]=255&c;let u=8;a.set(r,8),u+=c,a[u]=1;let l=n[t(506)];a[u+1]=l>>>8,a[u+2]=255&l,a[t(532)](n,u+3),u+=3+l,s&&(a[u]=252|o.chroma_format_idc,a[u+1]=248|o[t(498)]-8,a[u+2]=248|o[t(514)]-8,a[u+3]=0,u+=4);const d=[23,0,0,0,0],h=new Uint8Array(d[t(485)]+a[t(506)]);return h[t(532)](d,0),h[t(532)](a,d[t(485)]),h}function Cr(e,t){const r=Pr;let n=[];n[0]=t?23:39,n[1]=1,n[2]=0,n[3]=0,n[4]=0,n[5]=e.byteLength>>24&255,n[6]=e.byteLength>>16&255,n[7]=e[r(506)]>>8&255,n[8]=255&e[r(506)];const i=new Uint8Array(n[r(485)]+e.byteLength);return i.set(n,0),i[r(532)](e,n[r(485)]),i}function xr(e,t){const r=Pr;let n=[];n[0]=t?23:39,n[1]=1,n[2]=0,n[3]=0,n[4]=0;const i=new Uint8Array(n.length+e[r(506)]);return i[r(532)](n,0),i[r(532)](e,n[r(485)]),i}function Tr(e){return 31&e[0]}function Br(e){return e===Pe[Pr(477)]}function Dr(e){return!(t=e,t===Pe.sps||t===Pe[Pr(528)]||Br(e));var t}function Mr(e){return e===Pe[Pr(488)]}function Ur(e){const t=Pr;if(0===e.length)return!1;const r=Tr(e[0]);for(let n=1;n=n[t(506)])return this[t(478)]=!0,n[t(506)];let e=n[r+0]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],i=n[r+0]<<16|n[r+1]<<8|n[r+2];if(1===e||1===i)return r;r++}}[Ir(526)](){const e=Ir;let t=this[e(536)],r=null;for(;null==r&&!this[e(478)];){let n=this.currentStartcodeOffset;n+=1===(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])?4:3;let i=31&t[n],s=(128&t[n])>>>7,o=this[e(541)](n);this[e(495)]=o,i>=Pe[e(517)]||0===s&&(r={type:i,data:t[e(482)](n,o)})}return r}}class Rr{constructor(e){const t=Ir;let r=e.data[t(506)];this[t(469)]=e[t(469)],this[t(536)]=new Uint8Array(4+r),new DataView(this.data[t(493)]).setUint32(0,r),this.data[t(532)](e.data,4)}}function Lr(){const e=["read","timescale","skipScalingList","readBits","buffer","skipBits","currentStartcodeOffset","profile","sps","bit_depth_luma","265850FNFmRx","ceil","nb_sps","Invalid AVCDecoderConfigurationRecord, lack of data!","codecWidth","fixed","parseSPS","byteLength","frameRate","Invalid AVCDecoderConfigurationRecord: No PPS'","present_size","avc_ref_frames","fps_num","Strange NaluLengthSizeMinusOne: ","3719874OzWiTz","bit_depth_chroma","977268rAiWqG","push","kReserved0","7871773eaQBjk","setInt16","error","avc1.","codec_size","1lWZRkK","level_string"," Strange AVCDecoderConfigurationRecord: SPS Count = ","readNextNaluPayload","readUEG","pps","getUint8","presentHeight","3019722nhhtox","set","level","h264","videoType","data","width","presentWidth","Invalid AVCDecoderConfigurationRecord: No SPS","Invalid AVCDecoderConfigurationRecord version !== 1 || avcProfile === 0","findNextStartCodeOffset","height","readBool","2682VLtPYW","skipUEG","bitDepth","codecHeight","fps_den","sarRatio","getUint16","chromaFormat","frame_rate","type","sar_ratio","5CyqqAB","compat","read_golomb","profile_string","refSampleDuration","nalu","kSliceSEI","eofFlag","bit_depth","Could not find H264 startcode until payload end!","12012888zoNfnw","subarray","readUByte","toString","length","11060460OLoNgs","codec","iFrame"];return(Lr=function(){return e})()}const Or=Nr;function zr(){const e=["70lpLrKo","GetUE","6ksdwCR","1550159yYtroa","m_zeros","GetBit","m_bits","length","2180660nCzcOW","297480dtlHfa","m_data","23080OEtfSl","m_len","12661xtInAJ","40VNjJvu","1509851OJKrdG","m_byte","1566750HbfFTt","GetSE","358461OtnjVX","GetBYTE","m_idx"];return(zr=function(){return e})()}function Nr(e,t){const r=zr();return(Nr=function(e,t){return r[e-=187]})(e,t)}!function(e,t){const r=Nr,n=e();for(;;)try{if(795432===-parseInt(r(189))/1+-parseInt(r(203))/2*(parseInt(r(188))/3)+parseInt(r(194))/4+-parseInt(r(208))/5*(-parseInt(r(195))/6)+parseInt(r(201))/7+-parseInt(r(200))/8*(parseInt(r(205))/9)+-parseInt(r(197))/10*(-parseInt(r(199))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(zr);class Hr{constructor(e){const t=Nr;this.m_idx=null,this.m_data=e,this.m_len=e[t(193)],this[t(207)]=0,this[t(192)]=0,this[t(202)]=0,this[t(190)]=0}[Or(206)](){const e=Or;if(this[e(207)]>=this[e(198)])return 0;let t=this[e(196)][this[e(207)]++];return 0==t?(this[e(190)]++,this.m_idx>this[e(192)]&1}GetWord(e){const t=Or;let r=0;for(;e>0;)r<<=1,r|=this[t(191)](),e--;return r}[Or(187)](){const e=Or;let t=0;for(;this[e(207)]>1;return!(1&e)&&(t=-t),t}}const Vr=Gr;function jr(){const e=["13440Dzfjos","10043340HCGBZm","3421240ePisAn","GetUE","957dcrHaO","270420AMQdty","24MwJKzN","warn","buffer","170CpNjdo","2299GUZklX","SPSParser chroma_format_idc > 3","parseSPS","GetWord","_ebsp2rbsp","12157782KSGnwr","SPSParser sps_max_sub_layers_minus1 > 6","1272006QJovXi","11897rOXsFl","byteLength"];return(jr=function(){return e})()}!function(e,t){const r=Gr,n=e();for(;;)try{if(950273===parseInt(r(463))/1*(parseInt(r(474))/2)+-parseInt(r(469))/3*(-parseInt(r(465))/4)+parseInt(r(467))/5+parseInt(r(466))/6+parseInt(r(460))/7+parseInt(r(471))/8*(parseInt(r(462))/9)+-parseInt(r(470))/10*(parseInt(r(475))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(jr);class Wr{static _ebsp2rbsp(e){const t=Gr;let r=e,n=r[t(464)],i=new Uint8Array(n),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(473)],0,s)}static[Vr(477)](e){const t=Vr;let r=Wr[t(459)](e);const n=new Hr(r);let i="",s="",o="",a="";n[t(478)](4);let c=n[t(478)](3);if(c>6)return console[t(472)](t(461)),!1;n.GetWord(1),n[t(478)](2),n[t(478)](1),i=n[t(478)](5),n[t(478)](32),n[t(478)](1),n[t(478)](1),n[t(478)](1),n[t(478)](1),n[t(478)](44),s=n[t(478)](8);let u=[],l=[];for(let e=0;e0)for(let e=c;e<8;e++)n[t(478)](2);for(let e=0;e15)return console[t(472)]("SPSParser sps_seq_parameter_set_id > 15",d),!1;let h=n.GetUE();return h>3?(console[t(472)](t(476),h),!1):(3==h&&n[t(478)](1),o=n[t(468)](),a=n[t(468)](),n[t(478)](1)&&(n[t(468)](),n[t(468)](),n.GetUE(),n[t(468)]()),n[t(468)]()!=n[t(468)]()?(console.warn("SPSParser bit_depth_luma_minus8 != bit_depth_chroma_minus8"),!1):{profile_string:i,level_string:s,bit_depth:"",ref_frames:"",chroma_format:"",chroma_format_string:"",frame_rate:{fixed:"",fps:"",fps_den:"",fps_num:""},sar_ratio:{width:"",height:""},codec_size:{width:o,height:a},present_size:{width:"",height:a}})}}function Gr(e,t){const r=jr();return(Gr=function(e,t){return r[e-=459]})(e,t)}function qr(e,t){const r=Kr();return(qr=function(e,t){return r[e-=336]})(e,t)}!function(e,t){const r=qr,n=e();for(;;)try{if(945061===parseInt(r(356))/1+-parseInt(r(357))/2*(parseInt(r(342))/3)+-parseInt(r(338))/4+parseInt(r(360))/5+-parseInt(r(339))/6*(-parseInt(r(347))/7)+parseInt(r(343))/8+parseInt(r(358))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Kr);const $r=e=>{const t=qr;let r=e,n=r[t(355)],i=new Uint8Array(n),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(340)],0,s)},Yr=e=>{const t=qr;switch(e){case 0:return t(352);case 1:return t(344);case 2:return t(353);case 3:return t(354);default:return t(351)}};function Kr(){const e=["4:4:4","byteLength","325492aJyzzI","2WKCkAj","3862044TOCBwu",".1.L","1029200zQxhZA","hvc1.","readBits","readSEG","readUEG","4313972jaiPCM","834qIFEvP","buffer","destroy","2142825dlnmws","7111144vxtYsL","4:2:0","readBool","min","44744gzuumy",".B0","readByte","push","Unknown","4:0:0","4:2:2"];return(Kr=function(){return e})()}const Xr=Jr;function Jr(e,t){const r=Qr();return(Jr=function(e,t){return r[e-=482]})(e,t)}!function(e,t){const r=Jr,n=e();for(;;)try{if(752196===parseInt(r(495))/1+parseInt(r(506))/2*(parseInt(r(494))/3)+parseInt(r(516))/4*(-parseInt(r(483))/5)+-parseInt(r(507))/6*(parseInt(r(512))/7)+parseInt(r(492))/8+parseInt(r(517))/9*(parseInt(r(510))/10)+parseInt(r(489))/11*(-parseInt(r(508))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Qr);class Zr{static[Xr(488)](e){let t=e,r=t[Xr(496)],n=new Uint8Array(r),i=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(n[i]=t[e],i++);return new Uint8Array(n.buffer,0,i)}static[Xr(501)](e){const t=Xr;let r=Zr[t(488)](e),n=new ot(r);return n[t(500)](),n[t(500)](),n[t(491)](4),n.readBits(2),n[t(491)](6),{num_temporal_layers:n[t(491)](3)+1,temporal_id_nested:n.readBool()}}static[Xr(503)](e){const t=Xr;let r=Zr[t(488)](e),n=new ot(r);n[t(500)](),n[t(500)]();let i=0,s=0,o=0,a=0;n[t(491)](4);let c=n.readBits(3);n[t(498)]();let u=n[t(491)](2),l=n[t(498)](),d=n[t(491)](5),h=n[t(500)](),f=n[t(500)](),p=n[t(500)](),m=n.readByte(),v=n.readByte(),y=n[t(500)](),_=n[t(500)](),g=n.readByte(),b=n[t(500)](),w=n[t(500)](),S=n[t(500)](),I=[],A=[];for(let e=0;e0)for(let e=c;e<8;e++)n.readBits(2);for(let e=0;e1&&n[t(509)]();for(let e=0;e0&&e<=16?(F=r[e-1],R=i[e-1]):255===e&&(F=n[t(491)](16),R=n[t(491)](16))}if(n[t(498)]()&&n[t(498)](),n.readBool()){n[t(491)](3),n[t(498)](),n[t(498)]()&&(n[t(500)](),n[t(500)](),n[t(500)]())}if(n.readBool()&&(n[t(504)](),n[t(504)]()),n[t(498)](),n[t(498)](),n.readBool(),U=n[t(498)](),U&&(n.readUEG(),n[t(504)](),n.readUEG(),n[t(504)]()),n[t(498)]()){if(O=n[t(491)](32),z=n[t(491)](32),n[t(498)]()&&n[t(504)](),n.readBool()){let e=!1,r=!1,i=!1;e=n[t(498)](),r=n[t(498)](),(e||r)&&(i=n[t(498)](),i&&(n[t(500)](),n[t(491)](5),n.readBool(),n[t(491)](5)),n.readBits(4),n.readBits(4),i&&n[t(491)](4),n[t(491)](5),n[t(491)](5),n[t(491)](5));for(let s=0;s<=c;s++){let s=n[t(498)]();L=s;let o=!0,a=1;!s&&(o=n.readBool());let c=!1;if(o?n.readUEG():c=n[t(498)](),!c&&(a=n.readUEG()+1),e){for(let e=0;e>6&3,n[t(365)]=e[1]>>5&1,n.general_profile_idc=31&e[1],n[t(381)]=e[2]<<24|e[3]<<16|e[4]<<8|e[5],n.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],n.general_constraint_indicator_flags=n[t(384)]<<16|e[10]<<8|e[11],n[t(419)]=e[12],n[t(414)]=(15&e[13])<<8|e[14],n[t(466)]=3&e[15],n.chromaFormat=3&e[16],n[t(467)]=7&e[17],n[t(456)]=7&e[18],n[t(418)]=e[19]<<8|e[20],n.constantFrameRate=e[21]>>6&3,n[t(360)]=e[21]>>3&7,n[t(342)]=e[21]>>2&1,n[t(473)]=3&e[21];let i=e[22],s=e[t(461)](23);for(let e=0;e0)for(let t=r;t<8;t++)e.read(2);i[n(396)]=[],i[n(328)]=[],i[n(421)]=[],i[n(434)]=[],i[n(404)]=[],i[n(353)]=[],i.sub_layer_non_packed_constraint_flag=[],i[n(463)]=[],i[n(388)]=[];for(let t=0;t{const t=qr;let r=$r(e),n=new ot(r);return n[t(349)](),n.readByte(),n[t(362)](4),n[t(362)](2),n[t(362)](6),{num_temporal_layers:n[t(362)](3)+1,temporal_id_nested:n[t(345)]()}})(r),a=(e=>{const t=qr;let r=$r(e),n=new ot(r);n[t(349)](),n[t(349)]();let i=0,s=0,o=0,a=0;n[t(362)](4);let c=n.readBits(3);n.readBool();let u=n.readBits(2),l=n[t(345)](),d=n[t(362)](5),h=n[t(349)](),f=n[t(349)](),p=n[t(349)](),m=n[t(349)](),v=n.readByte(),y=n[t(349)](),_=n[t(349)](),g=n[t(349)](),b=n[t(349)](),w=n[t(349)](),S=n.readByte(),I=[],A=[];for(let e=0;e0)for(let e=c;e<8;e++)n[t(362)](2);for(let e=0;e1&&n[t(336)]();for(let e=0;e0&&e<16?(F=r[e-1],R=i[e-1]):255===e&&(F=n[t(362)](16),R=n[t(362)](16))}if(n.readBool()&&n[t(345)](),n[t(345)]()&&(n[t(362)](3),n[t(345)](),n[t(345)]()&&(n.readByte(),n.readByte(),n.readByte())),n[t(345)]()&&(n[t(337)](),n[t(337)]()),n[t(345)](),n[t(345)](),n.readBool(),U=n.readBool(),U&&(i+=n[t(337)](),s+=n[t(337)](),o+=n[t(337)](),a+=n[t(337)]()),n[t(345)]()&&(O=n[t(362)](32),z=n[t(362)](32),n[t(345)]()&&(n[t(337)](),n[t(345)]()))){let e=!1,r=!1,i=!1;e=n.readBool(),r=n[t(345)](),(e||r)&&(i=n[t(345)](),i&&(n[t(349)](),n[t(362)](5),n[t(345)](),n[t(362)](5)),n[t(362)](4),n[t(362)](4),i&&n[t(362)](4),n[t(362)](5),n[t(362)](5),n[t(362)](5));for(let s=0;s<=c;s++){let s=n.readBool();L=s;let o=!1,a=1;!s&&(o=n[t(345)]());let c=!1;if(o?n.readSEG():c=n[t(345)](),!c&&(cpbcnt=n[t(337)]()+1),e)for(let e=0;e{const t=qr;let r=$r(e),n=new ot(r);n[t(349)](),n[t(349)](),n.readUEG(),n.readUEG(),n[t(345)](),n.readBool(),n[t(362)](3),n[t(345)](),n[t(345)](),n[t(337)](),n[t(337)](),n[t(336)](),n.readBool(),n.readBool(),n.readBool()&&n[t(337)](),n.readSEG(),n[t(336)](),n[t(345)](),n.readBool(),n.readBool(),n[t(345)]();let i=n.readBool(),s=n.readBool(),o=1;return s&&i?o=0:s?o=3:i&&(o=2),{parallelismType:o}})(n);s=Object[t(470)](s,o,a,c);let u=23+(5+r[t(420)])+(5+i[t(420)])+(5+n[t(420)]),l=new Uint8Array(u);l[0]=1,l[1]=(3&s[t(464)])<<6|(s[t(365)]?1:0)<<5|31&s[t(348)],l[2]=s[t(376)]||0,l[3]=s[t(347)]||0,l[4]=s[t(385)]||0,l[5]=s[t(426)]||0,l[6]=s[t(445)]||0,l[7]=s[t(452)]||0,l[8]=s.general_constraint_indicator_flags_3||0,l[9]=s[t(331)]||0,l[10]=s[t(339)]||0,l[11]=s.general_constraint_indicator_flags_6||0,l[12]=60,l[13]=240|(3840&s[t(414)])>>8,l[14]=255&s.min_spatial_segmentation_idc,l[15]=252|3&s.parallelismType,l[16]=252|3&s[t(400)],l[17]=248|7&s.bit_depth_luma_minus8,l[18]=248|7&s[t(435)],l[19]=0,l[20]=0,l[21]=(3&s[t(366)])<<6|(7&s[t(341)])<<3|(s.temporal_id_nested?1:0)<<2|3,l[22]=3,l[23]=128|Fe.vps,l[24]=0,l[25]=1,l[26]=(65280&r[t(420)])>>8,l[27]=(255&r[t(420)])>>0,l[t(447)](r,28),l[23+(5+r[t(420)])+0]=128|Fe.sps,l[23+(5+r[t(420)])+1]=0,l[23+(5+r.byteLength)+2]=1,l[23+(5+r[t(420)])+3]=(65280&i[t(420)])>>8,l[23+(5+r[t(420)])+4]=(255&i.byteLength)>>0,l[t(447)](i,23+(5+r[t(420)])+5),l[23+(5+r[t(420)]+5+i[t(420)])+0]=128|Fe[t(336)],l[23+(5+r[t(420)]+5+i[t(420)])+1]=0,l[23+(5+r[t(420)]+5+i[t(420)])+2]=1,l[23+(5+r[t(420)]+5+i[t(420)])+3]=(65280&n[t(420)])>>8,l[23+(5+r[t(420)]+5+i.byteLength)+4]=(255&n.byteLength)>>0,l[t(447)](n,23+(5+r[t(420)]+5+i[t(420)])+5);const d=[28,0,0,0,0],h=new Uint8Array(d.length+l[t(420)]);return h[t(447)](d,0),h.set(l,d[t(393)]),h}function on(e,t){const r=fn;let n=[];n[0]=t?28:44,n[1]=1,n[2]=0,n[3]=0,n[4]=0,n[5]=e.byteLength>>24&255,n[6]=e.byteLength>>16&255,n[7]=e[r(420)]>>8&255,n[8]=255&e[r(420)];const i=new Uint8Array(n[r(393)]+e[r(420)]);return i[r(447)](n,0),i.set(e,n.length),i}function an(e,t){const r=fn;let n=[];n[0]=t?28:44,n[1]=1,n[2]=0,n[3]=0,n[4]=0;const i=new Uint8Array(n[r(393)]+e[r(420)]);return i[r(447)](n,0),i[r(447)](e,n[r(393)]),i}function cn(e){return(126&e[0])>>1}function un(e){return e===Fe.sei}function ln(e){return!((t=e)>=32&&t<=40);var t}function dn(e){return e>=16&&e<=21}function hn(e){const t=fn;if(0===e[t(393)])return!1;const r=cn(e[0]);for(let n=1;n=n[t(420)])return this[t(471)]=!0,n[t(420)];let e=n[r+0]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],i=n[r+0]<<16|n[r+1]<<8|n[r+2];if(1===e||1===i)return r;r++}}readNextNaluPayload(){const e=en;let t=this[e(397)],r=null;for(;null==r&&!this[e(471)];){let n=this[e(349)];n+=1===(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])?4:3;let i=t[n]>>1&63,s=(128&t[n])>>>7,o=this[e(458)](n);this.currentStartcodeOffset=o,0===s&&(r={type:i,data:t[e(472)](n,o)})}return r}}class vn{constructor(e){const t=en;let r=e.data[t(420)];this[t(465)]=e.type,this[t(397)]=new Uint8Array(4+r),new DataView(this[t(397)][t(446)])[t(352)](0,r),this[t(397)].set(e[t(397)],4)}}var yn=Pn;!function(e,t){for(var r=Pn,n=e();;)try{if(333079===-parseInt(r(460))/1+parseInt(r(492))/2+-parseInt(r(486))/3*(-parseInt(r(491))/4)+-parseInt(r(456))/5*(-parseInt(r(540))/6)+parseInt(r(529))/7+-parseInt(r(528))/8*(-parseInt(r(441))/9)+-parseInt(r(470))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Un);var _n,gn=yn(504),bn=yn(527),wn=/^(?:text|application)\/xml/i,Sn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,In=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,An=/^\s*$/,En={},kn={},Cn="",xn={type:yn(541),beforeSend:Tn,success:Tn,error:Tn,complete:Tn,context:null,xhr:function(){return new(window[yn(457)])},accepts:{json:gn,xml:yn(473),html:bn,text:yn(531),"*":"*/"[yn(485)]("*")},crossDomain:!1,timeout:0,username:null,password:null,processData:!0,promise:Tn,contentType:"application/x-www-form-urlencoded; charset=UTF-8"};function Tn(){}var Bn=function(e,t){var r=yn;typeof e===r(444)&&(t=e,e=void 0);var n=Nn({},t=t||{});for(var i in xn)void 0===n[i]&&(n[i]=xn[i]);try{var s={},o=new Promise((function(e,t){var n=r;s.resolve=e,s[n(499)]=t}));o.resolve=s[r(535)],o[r(499)]=s[r(499)],n[r(455)]=o}catch(e){n[r(455)]={resolve:Tn,reject:Tn}}var a=In[r(449)](window[r(497)].href[r(506)]())||[];n[r(517)]=((e||n.url||window.location[r(479)])+"")[r(476)](/#.*$/,"")[r(476)](/^\/\//,a[1]+"//");var c=n[r(517)];!n[r(443)]&&(n[r(443)]=/^([\w-]+:)?\/\/([^\/]+)/[r(493)](n[r(517)])&&RegExp.$2!==window[r(497)][r(479)]);var u=n[r(505)];if(u===r(467)){if(!/=\?/[r(493)](n.url)){var l=(n.jsonp||r(513))+"=?";n.url=Ln(n[r(517)],l)}return function(e){var t,r=yn,n=e.jsonpCallback||r(467)+jn(),i=window[r(537)][r(514)]("script"),s={abort:function(){n in window&&(window[n]=Tn)}},o=window[r(537)].getElementsByTagName(r(446))[0]||window.document[r(496)];function a(n){var i=r;window[i(468)](t),s[i(501)](),Fn(n[i(463)],s,n[i(463)],e),c()}function c(){var e=r;i[e(440)]?i.clearAttributes():i[e(530)]=i[e(518)]=i[e(494)]=null,i[e(503)]&&i[e(503)].removeChild(i),i=null,delete window[n]}return i.onerror=function(e){a(e)},window[n]=function(n){window[r(468)](t),Dn(n,s,e),c()},On(e),i.src=e[r(517)].replace(/=\?/,"="+n),i.src=Ln(i[r(475)],"_="+(new Date)[r(520)]()),i[r(525)]=!0,e.scriptCharset&&(i[r(502)]=e.scriptCharset),o[r(510)](i,o[r(498)]),e.timeout>0&&(t=window[r(466)]((function(){var t=r;s[t(501)](),Fn(t(462),s,t(462),e),c()}),e[r(462)])),e[r(455)][r(501)]=function(){s[r(501)]()},e.promise[r(523)]=s,e[r(455)]}(n)}On(n);var d=n[r(483)][u]||n[r(483)]["*"],h={};/^([\w-]+:)\/\//[r(493)](n[r(517)])?RegExp.$1:window.location[r(471)];var f,p=xn[r(523)]();!n[r(443)]&&!h[r(488)]&&(h["X-Requested-With"]=r(457)),n[r(442)]&&(En[c]&&(h[r(453)]=En[c]),kn[c]&&(h[r(450)]=kn[c])),d&&(h[r(484)]=d,d[r(489)](",")>-1&&(d=d[r(451)](",",2)[0]),p.overrideMimeType&&p[r(507)](d));var m=!/^(?:GET|HEAD)$/.test(n[r(463)][r(454)]());if((n[r(495)]&&m&&!1!==n[r(459)]||t.contentType)&&(h["Content-Type"]=n[r(459)]),!1===n[r(521)]&&!m){var v=/([?&])_=[^&]*/;n[r(517)]=v[r(493)](c)?c[r(476)](v,r(511)+jn()):c+(/\?/[r(493)](c)?"&":"?")+"_="+jn()}n[r(509)]=Nn(h,n[r(509)]||{}),p.onreadystatechange=function(){var e,t,i=r;if(4===p[i(437)]){clearTimeout(f);var s,o=!1;if(p[i(515)]>=200&&p[i(515)]<300||304===p[i(515)]){if(Cn=p[i(477)](),n.ifModified){var a=Rn(i(447));a&&(En[c]=a),(a=Rn("etag"))&&(kn[c]=a)}u=u||(e=p.getResponseHeader("content-type"),t=yn,e&&(e===bn?t(472):e===gn?t(490):wn.test(e)&&t(500))||t(516)),s=p[i(482)];try{u===i(500)?s=p[i(508)]:u===i(490)&&(s=An[i(493)](s)?null:JSON.parse(s))}catch(e){o=e}o?Fn(o,"parseerror",p,n):Dn(s,p,n)}else Fn(null,"error",p,n)}};var y=!("async"in n)||n[r(525)];if(p[r(480)](n[r(463)],n.url,y,n[r(536)],n.password),n[r(474)])for(var _ in n[r(474)])p[_]=n[r(474)][_];for(var _ in n.mimeType&&p[r(507)]&&p.overrideMimeType(n.mimeType),n[r(509)])void 0!==n[r(509)][_]&&p[r(524)](_,n[r(509)][_]+"");return!1===function(e,t){var r=yn,n=t[r(458)];if(!1===t[r(512)][r(534)](n,e,t))return!1}(p,n)?(p[r(501)](),!1):(n[r(462)]>0&&(f=window[r(466)]((function(){var e=r;p[e(518)]=Tn,p[e(501)](),Fn(null,"timeout",p,n)}),n[r(462)])),p[r(532)](n.data?n[r(495)]:null),n[r(455)].abort=function(){p[r(501)]()},n[r(455)])};function Dn(e,t,r){var n=yn,i=r.context,s=n(526);r[n(526)].call(i,e,s,t),r.promise[n(535)](e,s,t),Mn(s,t,r)}function Mn(e,t,r){var n=yn,i=r[n(458)];r[n(464)].call(i,t,e)}function Un(){var e=["slice","processData","clearAttributes","198uGsvYO","ifModified","crossDomain","object","post","head","Last-Modified","[object Array]","exec","If-None-Match","split","get","If-Modified-Since","toUpperCase","promise","35ZlZOvf","XMLHttpRequest","context","contentType","542686ReIeoX","name","timeout","type","complete","ajaxSetup","setTimeout","jsonp","clearTimeout","function","7737660IwmmEQ","protocol","html","application/xml, text/xml","xhrFields","src","replace","getAllResponseHeaders","prototype","href","open","push","responseText","accepts","Accept","concat","871728QkQsQM","error","X-Requested-With","indexOf","json","8StdHbP","1269318sqxQxC","test","onerror","data","documentElement","location","firstChild","reject","xml","abort","charset","parentNode","application/json, text/javascript","dataType","toLowerCase","overrideMimeType","responseXML","headers","insertBefore","$1_=","beforeSend","callback","createElement","status","text","url","onreadystatechange","join","getTime","cache","toString","xhr","setRequestHeader","async","success","text/html","31496lxBVzs","196910gtBoZw","onload","text/plain","send","length","call","resolve","username","document","hasOwnProperty","add","273408pREEUk","GET","readyState"];return(Un=function(){return e})()}function Pn(e,t){var r=Un();return(Pn=function(e,t){return r[e-=437]})(e,t)}function Fn(e,t,r,n){var i=yn,s=n[i(458)];n[i(487)].call(s,r,t,e),n[i(455)][i(499)](r,t,e),Mn(t,r,n)}function Rn(e){var t,r=yn;if(!_n){for(_n={};t=Sn.exec(Cn);)_n[t[1][r(506)]()]=t[2];t=_n[e[r(506)]()]}return null===t?null:t}function Ln(e,t){return(e+"&"+t)[yn(476)](/[&?]{1,2}/,"?")}function On(e){var t,r,n,i,s=yn;Hn(e)&&!(e[s(495)]instanceof FormData)&&e[s(439)]&&(e.data=(t=e[s(495)],(i=[])[(n=yn)(539)]=function(e,t){this[n(481)](encodeURIComponent(e)+"="+encodeURIComponent(t))},zn(i,t,r),i[n(519)]("&")[n(476)]("%20","+"))),e[s(495)]&&(!e.type||"GET"===e[s(463)].toUpperCase())&&(e[s(517)]=Ln(e.url,e.data))}function zn(e,t,r,n){var i,s,o=yn,a=(i=t,s=yn,Object[s(478)][s(522)][s(534)](i)===s(448));for(var c in t){var u=t[c];n&&(c=r?n:n+"["+(a?"":c)+"]"),!n&&a?e.add(u[o(461)],u.value):(r?a(u):Hn(u))?zn(e,u,r,c):e[o(539)](c,u)}}function Nn(e){for(var t=yn,r=Array[t(478)][t(438)],n=r.call(arguments,1),i=0,s=n[t(533)];i255)return!1;return!0}function $n(e,t){var r=Ai;if(e[r(233)]&&e[r(219)]===r(188))return t&&(e=e.slice?e[r(248)]():Array[r(244)][r(248)][r(239)](e)),e;if(Array.isArray(e)){if(!qn(e))throw new Error(r(234)+e);return new Uint8Array(e)}if(Gn(e.length)&&qn(e))return new Uint8Array(e);throw new Error(r(209))}function Yn(e){return new Uint8Array(e)}function Kn(e,t,r,n,i){var s=Ai;(null!=n||null!=i)&&(e=e.slice?e[s(248)](n,i):Array[s(244)].slice[s(239)](e,n,i)),t.set(e,r)}!function(e,t){for(var r=Ai,n=e();;)try{if(982869===parseInt(r(245))/1*(-parseInt(r(243))/2)+parseInt(r(201))/3+parseInt(r(251))/4*(-parseInt(r(236))/5)+-parseInt(r(189))/6*(-parseInt(r(212))/7)+parseInt(r(240))/8+parseInt(r(215))/9+-parseInt(r(224))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ki);var Xn,Jn,Zn={toBytes:function(e){var t=Ai,r=[],n=0;for(e=encodeURI(e);n191&&i<224?(r[t(196)](String[t(207)]((31&i)<<6|63&e[n+1])),n+=2):(r.push(String[t(207)]((15&i)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return r[t(250)]("")}},Qn=(Jn=(Xn=Ai)(197),{toBytes:function(e){for(var t=Ai,r=[],n=0;n>4]+Jn[15&i])}return r[t(250)]("")}}),ei={16:10,24:12,32:14},ti=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],ri=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],ni=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],ii=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],si=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],oi=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],ai=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],ci=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],ui=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],li=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],di=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],hi=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],fi=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],pi=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],mi=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function vi(e){for(var t=Ai,r=[],n=0;n>2,this._Ke[n][r%4]=o[r],this[e(228)][t-n][r%4]=o[r];for(var a,c=0,u=s;u>16&255]<<24^ri[a>>8&255]<<16^ri[255&a]<<8^ri[a>>24&255]^ti[c]<<24,c+=1,8!=s)for(r=1;r>8&255]<<8^ri[a>>16&255]<<16^ri[a>>24&255]<<24;for(r=s/2+1;r>2,d=u%4,this[e(218)][l][d]=o[r],this[e(228)][t-l][d]=o[r++],u++}for(var l=1;l>24&255]^fi[a>>16&255]^pi[a>>8&255]^mi[255&a]},yi.prototype[Wn(252)]=function(e){var t=Wn;if(16!=e[t(194)])throw new Error(t(203));for(var r=this[t(218)].length-1,n=[0,0,0,0],i=vi(e),s=0;s<4;s++)i[s]^=this._Ke[0][s];for(var o=1;o>24&255]^si[i[(s+1)%4]>>16&255]^oi[i[(s+2)%4]>>8&255]^ai[255&i[(s+3)%4]]^this._Ke[o][s];i=n[t(248)]()}var a,c=Yn(16);for(s=0;s<4;s++)a=this[t(218)][r][s],c[4*s]=255&(ri[i[s]>>24&255]^a>>24),c[4*s+1]=255&(ri[i[(s+1)%4]>>16&255]^a>>16),c[4*s+2]=255&(ri[i[(s+2)%4]>>8&255]^a>>8),c[4*s+3]=255&(ri[255&i[(s+3)%4]]^a);return c},yi[Wn(244)][Wn(193)]=function(e){var t=Wn;if(16!=e[t(194)])throw new Error(t(241));for(var r=this[t(228)][t(194)]-1,n=[0,0,0,0],i=vi(e),s=0;s<4;s++)i[s]^=this[t(228)][0][s];for(var o=1;o>24&255]^ui[i[(s+3)%4]>>16&255]^li[i[(s+2)%4]>>8&255]^di[255&i[(s+1)%4]]^this[t(228)][o][s];i=n.slice()}var a,c=Yn(16);for(s=0;s<4;s++)a=this[t(228)][r][s],c[4*s]=255&(ni[i[s]>>24&255]^a>>24),c[4*s+1]=255&(ni[i[(s+3)%4]>>16&255]^a>>16),c[4*s+2]=255&(ni[i[(s+2)%4]>>8&255]^a>>8),c[4*s+3]=255&(ni[255&i[(s+1)%4]]^a);return c};var _i=function(e){var t=Wn;if(!(this instanceof _i))throw Error(t(238));this[t(229)]=t(205),this[t(219)]=t(199),this._aes=new yi(e)};_i[Wn(244)][Wn(252)]=function(e){var t=Wn;if((e=$n(e))[t(194)]%16!=0)throw new Error(t(247));for(var r=Yn(e[t(194)]),n=Yn(16),i=0;iNumber[t(211)])throw new Error(t(222));for(var r=15;r>=0;--r)this[t(206)][r]=e%256,e=parseInt(e/256)},Si[Wn(244)][Wn(195)]=function(e){var t=Wn;if(16!=(e=$n(e,!0)).length)throw new Error(t(227));this[t(206)]=e},Si[Wn(244)][Wn(220)]=function(){for(var e=Wn,t=15;t>=0;t--){if(255!==this[e(206)][t]){this._counter[t]++;break}this[e(206)][t]=0}};var Ii=function(e,t){var r=Wn;if(!(this instanceof Ii))throw Error("AES must be instanitated with `new`");this.description=r(249),this[r(219)]="ctr",!(t instanceof Si)&&(t=new Si(t)),this._counter=t,this[r(213)]=null,this._remainingCounterIndex=16,this._aes=new yi(e)};function Ai(e,t){var r=ki();return(Ai=function(e,t){return r[e-=186]})(e,t)}Ii[Wn(244)].encrypt=function(e){for(var t=Wn,r=$n(e,!0),n=0;n16)throw new Error(t(198));for(var n=e[t(194)]-r,i=0;i>>2]>>>24-a%4*8&255;r[s+a>>>2]|=c<<24-(s+a)%4*8}else for(var u=0;u>>2]=n[u>>>2];return this[t(501)]+=o,this},clamp:function(){var t=i,r=this[t(449)],n=this.sigBytes;r[n>>>2]&=4294967295<<32-n%4*8,r[t(455)]=e.ceil(n/4)},clone:function(){var e=i,t=u[e(468)][e(474)](this);return t[e(449)]=this[e(449)][e(506)](0),t},random:function(e){for(var t=i,r=[],n=0;n>>2]>>>24-o%4*8&255;s.push((a>>>4).toString(16)),s.push((15&a)[t(493)](16))}return s[t(505)]("")},parse:function(e){for(var t=i,r=e[t(455)],n=[],s=0;s>>3]|=parseInt(e[t(487)](s,2),16)<<24-s%8*4;return new(l[t(470)])(n,r/2)}},f=d[i(481)]={stringify:function(e){for(var t=i,r=e.words,n=e[t(501)],s=[],o=0;o>>2]>>>24-o%4*8&255;s[t(492)](String[t(498)](a))}return s[t(505)]("")},parse:function(e){for(var t=i,r=e[t(455)],n=[],s=0;s>>2]|=(255&e[t(456)](s))<<24-s%4*8;return new(l[t(470)])(n,r)}},p=d.Utf8={stringify:function(e){var t=i;try{return decodeURIComponent(escape(f[t(482)](e)))}catch(e){throw new Error(t(451))}},parse:function(e){return f[i(467)](unescape(encodeURIComponent(e)))}},m=c[i(472)]=u.extend({reset:function(){var e=i;this[e(500)]=new(l[e(470)]),this[e(478)]=0},_append:function(e){var t=i;typeof e==t(475)&&(e=p.parse(e)),this[t(500)].concat(e),this[t(478)]+=e[t(501)]},_process:function(t){var r,n=i,s=this[n(500)],o=s.words,a=s.sigBytes,c=this[n(502)],u=a/(4*c),d=(u=t?e[n(450)](u):e.max((0|u)-this._minBufferSize,0))*c,h=e[n(463)](4*d,a);if(d){for(var f=0;f>>2]|=e[o]<<24-o%4*8;n[r(308)](this,s,i)}else n[r(301)](this,arguments)};i[t(303)]=r}}(),e[t(317)][t(311)]},"object"===(i=Pi)(297)?e[i(318)]=n(Bi):"undefined"===i(298)&&(void 0)[i(319)]?(void 0)([i(309)],n):n(r[i(306)])}));function Ri(e,t){var r=Li();return(Ri=function(e,t){return r[e-=211]})(e,t)}!function(e,t){for(var r=Ri,n=e();;)try{if(578008===parseInt(r(227))/1*(-parseInt(r(220))/2)+-parseInt(r(234))/3*(parseInt(r(213))/4)+-parseInt(r(224))/5+-parseInt(r(231))/6+-parseInt(r(222))/7+parseInt(r(233))/8+parseInt(r(216))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Li);et((function(e,t){var r,n,i;r=Qe,n=function(e){var t=Ri;return function(){var t=Ri,r=e,n=r[t(226)][t(219)],i=r.enc;function s(e){return e<<8&4278255360|e>>>8&16711935}i.Utf16=i.Utf16BE={stringify:function(e){for(var r=t,n=e.words,i=e[r(214)],s=[],o=0;o>>2]>>>16-o%4*8&65535;s.push(String[r(228)](a))}return s[r(215)]("")},parse:function(e){for(var r=t,i=e[r(225)],s=[],o=0;o>>1]|=e[r(218)](o)<<16-o%2*16;return n[r(223)](s,2*i)}},i.Utf16LE={stringify:function(e){for(var r=t,n=e[r(232)],i=e[r(214)],o=[],a=0;a>>2]>>>16-a%4*8&65535);o[r(211)](String[r(228)](c))}return o[r(215)]("")},parse:function(e){for(var r=t,i=e.length,o=[],a=0;a>>1]|=s(e[r(218)](a)<<16-a%2*16);return n[r(223)](o,2*i)}}}(),e.enc[t(229)]},(i=Ri)(230)==i(230)?e.exports=n(Bi):"undefined"===i(212)&&(void 0).amd?(void 0)([i(217)],n):n(r[i(221)])}));function Li(){var e=["sigBytes","join","27902934clmApD","./core","charCodeAt","WordArray","2soZDfn","CryptoJS","1522752pmYhtw","create","3364615DkLWyJ","length","lib","997471BvUaOg","fromCharCode","Utf16","object","2647014BVCJCO","words","6483640vnZevo","18EbSCyr","push","function","669116QloQcF"];return(Li=function(){return e})()}var Oi=Ni;function zi(){var e=["407496QvYnCp","_reverseMap","_map","length","469840RqOtHO","16JvsPgn","commonjsGlobal","enc","15iHfRkc","join","indexOf","createCommonjsModule","Base64","charAt","./core","object","push","WordArray","exports","charCodeAt","80199LRRVXx","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","300324GRONis","function","sigBytes","CryptoJS","828ldNNCi","624968lAtDXv","4250610IyifAW"];return(zi=function(){return e})()}function Ni(e,t){var r=zi();return(Ni=function(e,t){return r[e-=197]})(e,t)}!function(e,t){for(var r=Ni,n=e();;)try{if(108164===parseInt(r(207))/1+parseInt(r(216))/2+parseInt(r(213))/3*(parseInt(r(221))/4)+-parseInt(r(224))/5*(-parseInt(r(209))/6)+parseInt(r(220))/7+parseInt(r(214))/8+-parseInt(r(215))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(zi);tt[Oi(198)]((function(e,t){var r,n,i,s=Oi;r=tt[s(222)],n=function(e){var t,r,n,i=s;return t=Ni,n=(r=e).lib[t(204)],r[t(223)][t(199)]={stringify:function(e){var r=t,n=e.words,i=e[r(211)],s=this._map;e.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,u=0;u<4&&a+.75*u>>6*(3-u)&63));var l=s[r(200)](64);if(l)for(;o[r(219)]%4;)o[r(203)](l);return o[r(225)]("")},parse:function(e){var r=t,i=e[r(219)],s=this[r(218)],o=this[r(217)];if(!o){o=this._reverseMap=[];for(var a=0;a>>6-c%4*2;o[a>>>2]|=u<<24-a%4*8,a++}return n.create(o,a)}(e,i,o)},_map:t(208)},e.enc[i(199)]},(i=Ni)(202)==i(202)?e[i(205)]=n(Bi):"undefined"===i(210)&&(void 0).amd?(void 0)([i(201)],n):n(r[i(212)])}));var Hi=ji;function Vi(){var e=["7224zhxIeY","clamp","words","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_","commonjsGlobal","_reverseMap","6014560ORXtdR","22228877qyWxlW","object","394028HKlMWJ","exports","charAt","57tFZiLL","push","_safe_map","59096elWRHG","enc","5ltPxUo","Base64url","459kWpRwL","function","createCommonjsModule","indexOf","lib","2411946hyjaoj","4160674WTxCSU","length","CryptoJS","2uhGoEN","charCodeAt","_map","WordArray"];return(Vi=function(){return e})()}!function(e,t){for(var r=ji,n=e();;)try{if(382101===parseInt(r(325))/1*(parseInt(r(338))/2)+parseInt(r(341))/3*(parseInt(r(329))/4)+-parseInt(r(314))/5*(-parseInt(r(321))/6)+parseInt(r(322))/7+-parseInt(r(312))/8*(-parseInt(r(316))/9)+parseInt(r(335))/10+-parseInt(r(336))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Vi);tt[Hi(318)]((function(e,t){var r,n,i,s=Hi;r=tt[s(333)],n=function(e){var t,r,n,i=s;return n=(r=e)[(t=ji)(320)][t(328)],r[t(313)][t(315)]={stringify:function(e,r){var n=t;void 0===r&&(r=!0);var i=e[n(331)],s=e.sigBytes,o=r?this[n(311)]:this[n(327)];e[n(330)]();for(var a=[],c=0;c>>2]>>>24-c%4*8&255)<<16|(i[c+1>>>2]>>>24-(c+1)%4*8&255)<<8|i[c+2>>>2]>>>24-(c+2)%4*8&255,l=0;l<4&&c+.75*l>>6*(3-l)&63));var d=o[n(340)](64);if(d)for(;a[n(323)]%4;)a[n(342)](d);return a.join("")},parse:function(e,r){var i=t;void 0===r&&(r=!0);var s=e[i(323)],o=r?this[i(311)]:this[i(327)],a=this[i(334)];if(!a){a=this._reverseMap=[];for(var c=0;c>>6-c%4*2;o[a>>>2]|=u<<24-a%4*8,a++}return n.create(o,a)}(e,s,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:t(332)},e[i(313)][i(315)]},(i=ji)(337)==i(337)?e[i(339)]=n(Bi):"undefined"===i(317)&&(void 0).amd?(void 0)(["./core"],n):n(r[i(324)])}));function ji(e,t){var r=Vi();return(ji=function(e,t){return r[e-=311]})(e,t)}function Wi(e,t){var r=Gi();return(Wi=function(e,t){return r[e-=159]})(e,t)}!function(e,t){for(var r=Wi,n=e();;)try{if(669903===parseInt(r(181))/1*(parseInt(r(160))/2)+-parseInt(r(187))/3*(-parseInt(r(189))/4)+parseInt(r(176))/5+-parseInt(r(164))/6+parseInt(r(183))/7+-parseInt(r(171))/8*(parseInt(r(162))/9)+-parseInt(r(184))/10*(parseInt(r(179))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Gi);et((function(e,t){var r,n,i,s=Wi;r=tt[s(190)],n=function(e){var t=s;return function(t){var r=Wi,n=e,i=n[r(182)],s=i[r(185)],o=i[r(191)],a=n.algo,c=[];!function(){for(var e=r,n=0;n<64;n++)c[n]=4294967296*t[e(169)](t[e(159)](n+1))|0}();var u=a[r(161)]=o[r(163)]({_doReset:function(){this[r(188)]=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=r,i=0;i<16;i++){var s=t+i,o=e[s];e[s]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a=this[n(188)][n(174)],u=e[t+0],p=e[t+1],m=e[t+2],v=e[t+3],y=e[t+4],_=e[t+5],g=e[t+6],b=e[t+7],w=e[t+8],S=e[t+9],I=e[t+10],A=e[t+11],E=e[t+12],k=e[t+13],C=e[t+14],x=e[t+15],T=a[0],B=a[1],D=a[2],M=a[3];T=l(T,B,D,M,u,7,c[0]),M=l(M,T,B,D,p,12,c[1]),D=l(D,M,T,B,m,17,c[2]),B=l(B,D,M,T,v,22,c[3]),T=l(T,B,D,M,y,7,c[4]),M=l(M,T,B,D,_,12,c[5]),D=l(D,M,T,B,g,17,c[6]),B=l(B,D,M,T,b,22,c[7]),T=l(T,B,D,M,w,7,c[8]),M=l(M,T,B,D,S,12,c[9]),D=l(D,M,T,B,I,17,c[10]),B=l(B,D,M,T,A,22,c[11]),T=l(T,B,D,M,E,7,c[12]),M=l(M,T,B,D,k,12,c[13]),D=l(D,M,T,B,C,17,c[14]),T=d(T,B=l(B,D,M,T,x,22,c[15]),D,M,p,5,c[16]),M=d(M,T,B,D,g,9,c[17]),D=d(D,M,T,B,A,14,c[18]),B=d(B,D,M,T,u,20,c[19]),T=d(T,B,D,M,_,5,c[20]),M=d(M,T,B,D,I,9,c[21]),D=d(D,M,T,B,x,14,c[22]),B=d(B,D,M,T,y,20,c[23]),T=d(T,B,D,M,S,5,c[24]),M=d(M,T,B,D,C,9,c[25]),D=d(D,M,T,B,v,14,c[26]),B=d(B,D,M,T,w,20,c[27]),T=d(T,B,D,M,k,5,c[28]),M=d(M,T,B,D,m,9,c[29]),D=d(D,M,T,B,b,14,c[30]),T=h(T,B=d(B,D,M,T,E,20,c[31]),D,M,_,4,c[32]),M=h(M,T,B,D,w,11,c[33]),D=h(D,M,T,B,A,16,c[34]),B=h(B,D,M,T,C,23,c[35]),T=h(T,B,D,M,p,4,c[36]),M=h(M,T,B,D,y,11,c[37]),D=h(D,M,T,B,b,16,c[38]),B=h(B,D,M,T,I,23,c[39]),T=h(T,B,D,M,k,4,c[40]),M=h(M,T,B,D,u,11,c[41]),D=h(D,M,T,B,v,16,c[42]),B=h(B,D,M,T,g,23,c[43]),T=h(T,B,D,M,S,4,c[44]),M=h(M,T,B,D,E,11,c[45]),D=h(D,M,T,B,x,16,c[46]),T=f(T,B=h(B,D,M,T,m,23,c[47]),D,M,u,6,c[48]),M=f(M,T,B,D,b,10,c[49]),D=f(D,M,T,B,C,15,c[50]),B=f(B,D,M,T,_,21,c[51]),T=f(T,B,D,M,E,6,c[52]),M=f(M,T,B,D,v,10,c[53]),D=f(D,M,T,B,I,15,c[54]),B=f(B,D,M,T,p,21,c[55]),T=f(T,B,D,M,w,6,c[56]),M=f(M,T,B,D,x,10,c[57]),D=f(D,M,T,B,g,15,c[58]),B=f(B,D,M,T,k,21,c[59]),T=f(T,B,D,M,y,6,c[60]),M=f(M,T,B,D,A,10,c[61]),D=f(D,M,T,B,m,15,c[62]),B=f(B,D,M,T,S,21,c[63]),a[0]=a[0]+T|0,a[1]=a[1]+B|0,a[2]=a[2]+D|0,a[3]=a[3]+M|0},_doFinalize:function(){var e=r,n=this._data,i=n[e(174)],s=8*this[e(170)],o=8*n[e(186)];i[o>>>5]|=128<<24-o%32;var a=t[e(165)](s/4294967296),c=s;i[15+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(o+64>>>9<<4)]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),n[e(186)]=4*(i.length+1),this[e(166)]();for(var u=this[e(188)],l=u.words,d=0;d<4;d++){var h=l[d];l[d]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return u},clone:function(){var e=r,t=o[e(177)][e(168)](this);return t[e(188)]=this[e(188)].clone(),t}});function l(e,t,r,n,i,s,o){var a=e+(t&r|~t&n)+i+o;return(a<>>32-s)+t}function d(e,t,r,n,i,s,o){var a=e+(t&n|r&~n)+i+o;return(a<>>32-s)+t}function h(e,t,r,n,i,s,o){var a=e+(t^r^n)+i+o;return(a<>>32-s)+t}function f(e,t,r,n,i,s,o){var a=e+(r^(t|~n))+i+o;return(a<>>32-s)+t}n[r(161)]=o[r(178)](u),n.HmacMD5=o[r(173)](u)}(Math),e[t(161)]},"object"===(i=Wi)(167)?e.exports=n(Bi):"undefined"===i(180)&&(void 0)[i(175)]?(void 0)(["./core"],n):n(r[i(172)])}));function Gi(){var e=["11748kwdKTR","function","82AALUfu","lib","7537656stCAQR","7050JUGkAz","WordArray","sigBytes","93IhLSky","_hash","86300odqBNu","commonjsGlobal","Hasher","sin","13574xmDBPJ","MD5","980163UvCXWA","extend","3078072VlOGbc","floor","_process","object","call","abs","_nDataBytes","96HmvwZF","CryptoJS","_createHmacHelper","words","amd","4702860YzZYey","clone","_createHelper"];return(Gi=function(){return e})()}var qi=$i;function $i(e,t){var r=Yi();return($i=function(e,t){return r[e-=250]})(e,t)}!function(e,t){for(var r=$i,n=e();;)try{if(461046===-parseInt(r(269))/1+-parseInt(r(279))/2*(-parseInt(r(273))/3)+-parseInt(r(272))/4+-parseInt(r(283))/5*(parseInt(r(285))/6)+parseInt(r(274))/7*(parseInt(r(275))/8)+-parseInt(r(276))/9*(-parseInt(r(254))/10)+parseInt(r(267))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Yi);tt[qi(268)]((function(e,t){var r,n,i,s=qi;r=tt[s(257)],n=function(e){var t,r,n,i,o,a,c,u,l=s;return n=(r=e)[(t=$i)(265)],i=n[t(252)],o=n[t(266)],a=r[t(270)],c=[],u=a.SHA1=o[t(259)]({_doReset:function(){var e=t;this[e(255)]=new(i[e(263)])([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,r){for(var n=t,i=this[n(255)][n(281)],s=i[0],o=i[1],a=i[2],u=i[3],l=i[4],d=0;d<80;d++){if(d<16)c[d]=0|e[r+d];else{var h=c[d-3]^c[d-8]^c[d-14]^c[d-16];c[d]=h<<1|h>>>31}var f=(s<<5|s>>>27)+l+c[d];f+=d<20?1518500249+(o&a|~o&u):d<40?1859775393+(o^a^u):d<60?(o&a|o&u|a&u)-1894007588:(o^a^u)-899497514,l=u,u=a,a=o<<30|o>>>2,o=s,s=f}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+a|0,i[3]=i[3]+u|0,i[4]=i[4]+l|0},_doFinalize:function(){var e=t,r=this[e(256)],n=r[e(281)],i=8*this._nDataBytes,s=8*r.sigBytes;return n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=Math.floor(i/4294967296),n[15+(s+64>>>9<<4)]=i,r[e(271)]=4*n[e(251)],this[e(253)](),this[e(255)]},clone:function(){var e=t,r=o.clone[e(258)](this);return r[e(255)]=this[e(255)][e(260)](),r}}),r[t(284)]=o[t(280)](u),r[t(262)]=o[t(277)](u),e[l(284)]},(i=$i)(250)==i(250)?e[i(282)]=n(Bi):"undefined"===i(278)&&(void 0)[i(264)]?(void 0)([i(261)],n):n(r.CryptoJS)}));function Yi(){var e=["function","22822VXGyBf","_createHelper","words","exports","5265mdqIOS","SHA1","3750uCauyI","object","length","WordArray","_process","180rGmXZB","_hash","_data","commonjsGlobal","call","extend","clone","./core","HmacSHA1","init","amd","lib","Hasher","2122527IaKuHf","createCommonjsModule","419978gsDUIr","algo","sigBytes","1364716XaNCvN","147wrZXCp","1251467VwBYCG","16ZrOqOg","385335PGKeBy","_createHmacHelper"];return(Yi=function(){return e})()}var Ki=Xi;function Xi(e,t){var r=Ji();return(Xi=function(e,t){return r[e-=417]})(e,t)}function Ji(){var e=["_data","CryptoJS","SHA256","algo","12HWBnhn","lib","127192girmpm","758724AAPlGC","amd","2869880lAkZxd","object","31711713vcVezY","_nDataBytes","extend","_hash","words","_process","10dmCdqp","function","4pYdZfv","HmacSHA256","commonjsGlobal","521104frfYTE","sigBytes","pow","7634826vekYXf","clone","call","length","14CKUaoR","Hasher","7581712jOmcJq","createCommonjsModule"];return(Ji=function(){return e})()}!function(e,t){for(var r=Xi,n=e();;)try{if(499067===-parseInt(r(443))/1+parseInt(r(427))/2*(parseInt(r(425))/3)+-parseInt(r(440))/4*(parseInt(r(430))/5)+parseInt(r(428))/6*(parseInt(r(417))/7)+-parseInt(r(419))/8+-parseInt(r(446))/9+-parseInt(r(438))/10*(-parseInt(r(432))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ji);tt[Ki(420)]((function(e,t){var r,n,i,s=Ki;r=tt[s(442)],n=function(e){var t=s;return function(t){var r=Xi,n=e,i=n[r(426)],s=i.WordArray,o=i[r(418)],a=n[r(424)],c=[],u=[];!function(){var e=r;function n(e){for(var r=t.sqrt(e),n=2;n<=r;n++)if(!(e%n))return!1;return!0}function i(e){return 4294967296*(e-(0|e))|0}for(var s=2,o=0;o<64;)n(s)&&(o<8&&(c[o]=i(t[e(445)](s,.5))),u[o]=i(t.pow(s,1/3)),o++),s++}();var l=[],d=a[r(423)]=o[r(434)]({_doReset:function(){this[r(435)]=new s.init(c.slice(0))},_doProcessBlock:function(e,t){for(var n=this[r(435)].words,i=n[0],s=n[1],o=n[2],a=n[3],c=n[4],d=n[5],h=n[6],f=n[7],p=0;p<64;p++){if(p<16)l[p]=0|e[t+p];else{var m=l[p-15],v=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,y=l[p-2],_=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;l[p]=v+l[p-7]+_+l[p-16]}var g=i&s^i&o^s&o,b=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),w=f+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&d^~c&h)+u[p]+l[p];f=h,h=d,d=c,c=a+w|0,a=o,o=s,s=i,i=w+(b+g)|0}n[0]=n[0]+i|0,n[1]=n[1]+s|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+c|0,n[5]=n[5]+d|0,n[6]=n[6]+h|0,n[7]=n[7]+f|0},_doFinalize:function(){var e=r,n=this[e(421)],i=n[e(436)],s=8*this[e(433)],o=8*n.sigBytes;return i[o>>>5]|=128<<24-o%32,i[14+(o+64>>>9<<4)]=t.floor(s/4294967296),i[15+(o+64>>>9<<4)]=s,n[e(444)]=4*i[e(449)],this[e(437)](),this[e(435)]},clone:function(){var e=r,t=o.clone[e(448)](this);return t[e(435)]=this._hash[e(447)](),t}});n[r(423)]=o._createHelper(d),n[r(441)]=o._createHmacHelper(d)}(Math),e[t(423)]},(i=Xi)(431)==i(431)?e.exports=n(Bi):"undefined"===i(439)&&(void 0)[i(429)]?(void 0)(["./core"],n):n(r[i(422)])}));var Zi=Qi;function Qi(e,t){var r=es();return(Qi=function(e,t){return r[e-=155]})(e,t)}!function(e,t){for(var r=Qi,n=e();;)try{if(919852===-parseInt(r(164))/1+parseInt(r(155))/2+parseInt(r(182))/3+-parseInt(r(166))/4*(parseInt(r(174))/5)+-parseInt(r(163))/6*(-parseInt(r(168))/7)+parseInt(r(183))/8+-parseInt(r(180))/9*(-parseInt(r(175))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(es);tt[Zi(158)]((function(e,t){var r,n,i,s=Zi;r=tt[s(159)],n=function(e){var t,r,n,i,o,a,c=s;return n=(r=e)[(t=Qi)(178)][t(162)],i=r[t(156)],o=i[t(171)],a=i.SHA224=o[t(173)]({_doReset:function(){var e=t;this[e(165)]=new(n[e(179)])([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=t,r=o[e(160)].call(this);return r[e(177)]-=4,r}}),r[t(161)]=o[t(184)](a),r[t(167)]=o[t(176)](a),e[c(161)]},(i=Qi)(170)==i(170)?e[i(181)]=n(Bi):n(r[i(157)])}));function es(){var e=["SHA224","WordArray","1380XdEfWe","1744738IFYhTh","_hash","34392qAvHLw","HmacSHA224","1113UlyMsI","amd","object","SHA256","./sha256","extend","820MHekaI","109660tqNprm","_createHmacHelper","sigBytes","lib","init","612DAAzRP","exports","4105014SsSzSu","3628848lRvlPK","_createHelper","2940920oKOAdb","algo","CryptoJS","createCommonjsModule","commonjsGlobal","_doFinalize"];return(es=function(){return e})()}var ts=ns;function rs(){var e=["279174hwTRDU","CryptoJS","create","HmacSHA512","extend","toX32","356685QBjErr","exports","844363pwcxRU","6383817KdNnHi","commonjsGlobal","_hash","createCommonjsModule","algo","SHA512","_createHmacHelper","high","call","3066828AtHnZc","Word","216ICXJNh","clone","1012smclVV","sigBytes","Hasher","floor","./core","./x64-core","WordArray","2299836GmXpfS","low","22870SarWIb","_data","function","init","lib","_process","object"];return(rs=function(){return e})()}function ns(e,t){var r=rs();return(ns=function(e,t){return r[e-=402]})(e,t)}!function(e,t){for(var r=ns,n=e();;)try{if(774783===parseInt(r(430))/1+parseInt(r(413))/2+parseInt(r(422))/3+-parseInt(r(406))/4*(parseInt(r(415))/5)+parseInt(r(402))/6+parseInt(r(428))/7*(-parseInt(r(404))/8)+parseInt(r(431))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(rs);tt[ts(434)]((function(e,t){var r,n,i,s=ts;r=tt[s(432)],n=function(e){var t=s;return function(){var t=ns,r=e,n=r[t(419)][t(408)],i=r.x64,s=i[t(403)],o=i[t(412)],a=r[t(435)];function c(){var e=t;return s[e(424)].apply(s,arguments)}var u=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=c()}();var d=a.SHA512=n[t(426)]({_doReset:function(){var e=t;this._hash=new(o[e(418)])([new(s[e(418)])(1779033703,4089235720),new(s[e(418)])(3144134277,2227873595),new s.init(1013904242,4271175723),new(s[e(418)])(2773480762,1595750129),new(s[e(418)])(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new(s[e(418)])(1541459225,327033209)])},_doProcessBlock:function(e,r){for(var n=t,i=this[n(433)].words,s=i[0],o=i[1],a=i[2],c=i[3],d=i[4],h=i[5],f=i[6],p=i[7],m=s[n(438)],v=s[n(414)],y=o.high,_=o[n(414)],g=a.high,b=a[n(414)],w=c[n(438)],S=c[n(414)],I=d.high,A=d[n(414)],E=h[n(438)],k=h[n(414)],C=f[n(438)],x=f[n(414)],T=p.high,B=p.low,D=m,M=v,U=y,P=_,F=g,R=b,L=w,O=S,z=I,N=A,H=E,V=k,j=C,W=x,G=T,q=B,$=0;$<80;$++){var Y,K,X=l[$];if($<16)K=X[n(438)]=0|e[r+2*$],Y=X.low=0|e[r+2*$+1];else{var J=l[$-15],Z=J[n(438)],Q=J.low,ee=(Z>>>1|Q<<31)^(Z>>>8|Q<<24)^Z>>>7,te=(Q>>>1|Z<<31)^(Q>>>8|Z<<24)^(Q>>>7|Z<<25),re=l[$-2],ne=re[n(438)],ie=re[n(414)],se=(ne>>>19|ie<<13)^(ne<<3|ie>>>29)^ne>>>6,oe=(ie>>>19|ne<<13)^(ie<<3|ne>>>29)^(ie>>>6|ne<<26),ae=l[$-7],ce=ae[n(438)],ue=ae[n(414)],le=l[$-16],de=le[n(438)],he=le.low;K=(K=(K=ee+ce+((Y=te+ue)>>>0>>0?1:0))+se+((Y+=oe)>>>0>>0?1:0))+de+((Y+=he)>>>0>>0?1:0),X[n(438)]=K,X.low=Y}var fe,pe=z&H^~z&j,me=N&V^~N&W,ve=D&U^D&F^U&F,ye=M&P^M&R^P&R,_e=(D>>>28|M<<4)^(D<<30|M>>>2)^(D<<25|M>>>7),ge=(M>>>28|D<<4)^(M<<30|D>>>2)^(M<<25|D>>>7),be=(z>>>14|N<<18)^(z>>>18|N<<14)^(z<<23|N>>>9),we=(N>>>14|z<<18)^(N>>>18|z<<14)^(N<<23|z>>>9),Se=u[$],Ie=Se[n(438)],Ae=Se.low,Ee=G+be+((fe=q+we)>>>0>>0?1:0),ke=ge+ye;G=j,q=W,j=H,W=V,H=z,V=N,z=L+(Ee=(Ee=(Ee=Ee+pe+((fe+=me)>>>0>>0?1:0))+Ie+((fe+=Ae)>>>0>>0?1:0))+K+((fe+=Y)>>>0>>0?1:0))+((N=O+fe|0)>>>0>>0?1:0)|0,L=F,O=R,F=U,R=P,U=D,P=M,D=Ee+(_e+ve+(ke>>>0>>0?1:0))+((M=fe+ke|0)>>>0>>0?1:0)|0}v=s.low=v+M,s[n(438)]=m+D+(v>>>0>>0?1:0),_=o[n(414)]=_+P,o[n(438)]=y+U+(_>>>0

>>0?1:0),b=a.low=b+R,a[n(438)]=g+F+(b>>>0>>0?1:0),S=c[n(414)]=S+O,c[n(438)]=w+L+(S>>>0>>0?1:0),A=d[n(414)]=A+N,d[n(438)]=I+z+(A>>>0>>0?1:0),k=h[n(414)]=k+V,h[n(438)]=E+H+(k>>>0>>0?1:0),x=f[n(414)]=x+W,f[n(438)]=C+j+(x>>>0>>0?1:0),B=p[n(414)]=B+q,p[n(438)]=T+G+(B>>>0>>0?1:0)},_doFinalize:function(){var e=t,r=this[e(416)],n=r.words,i=8*this._nDataBytes,s=8*r.sigBytes;return n[s>>>5]|=128<<24-s%32,n[30+(s+128>>>10<<5)]=Math[e(409)](i/4294967296),n[31+(s+128>>>10<<5)]=i,r[e(407)]=4*n.length,this[e(420)](),this[e(433)][e(427)]()},clone:function(){var e=t,r=n[e(405)][e(439)](this);return r[e(433)]=this[e(433)][e(405)](),r},blockSize:32});r.SHA512=n._createHelper(d),r[t(425)]=n[t(437)](d)}(),e[t(436)]},(i=ns)(421)==i(421)?e[i(429)]=n(Bi):"undefined"===i(417)&&(void 0).amd?(void 0)([i(410),i(411)],n):n(r[i(423)])}));var is=os;function ss(){var e=["SHA512","21664112wLqhhO","4xUudEC","2406159INHBHX","604074LfOJhd","exports","WordArray","_createHelper","amd","13614874yqpfoX","commonjsGlobal","createCommonjsModule","x64","3724950EMMVnI","object","_hash","./core","SHA384","5951505AQLgeo","_createHmacHelper","init","4713774sObHaw","Word","extend","sigBytes"];return(ss=function(){return e})()}function os(e,t){var r=ss();return(os=function(e,t){return r[e-=405]})(e,t)}!function(e,t){for(var r=os,n=e();;)try{if(979722===-parseInt(r(406))/1+-parseInt(r(415))/2+-parseInt(r(405))/3+parseInt(r(429))/4*(-parseInt(r(420))/5)+parseInt(r(423))/6+parseInt(r(411))/7+parseInt(r(428))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ss);tt[is(413)]((function(e,t){var r,n,i,s=is;r=tt[s(412)],n=function(e){var t,r,n,i,o,a,c,u,l=s;return n=(r=e)[(t=os)(414)],i=n[t(424)],o=n[t(408)],a=r.algo,c=a[t(427)],u=a[t(419)]=c[t(425)]({_doReset:function(){var e=t;this[e(417)]=new(o[e(422)])([new(i[e(422)])(3418070365,3238371032),new(i[e(422)])(1654270250,914150663),new i.init(2438529370,812702999),new(i[e(422)])(355462360,4144912697),new(i[e(422)])(1731405415,4290775857),new(i[e(422)])(2394180231,1750603025),new(i[e(422)])(3675008525,1694076839),new i.init(1203062813,3204075428)])},_doFinalize:function(){var e=t,r=c._doFinalize.call(this);return r[e(426)]-=16,r}}),r[t(419)]=c[t(409)](u),r.HmacSHA384=c[t(421)](u),e[l(419)]},(i=os)(416)==i(416)?e[i(407)]=n(Bi):n(r.CryptoJS)}));var as=cs;function cs(e,t){var r=us();return(cs=function(e,t){return r[e-=358]})(e,t)}!function(e,t){for(var r=cs,n=e();;)try{if(207690===parseInt(r(376))/1*(-parseInt(r(382))/2)+parseInt(r(388))/3*(-parseInt(r(395))/4)+parseInt(r(364))/5*(-parseInt(r(361))/6)+-parseInt(r(383))/7+parseInt(r(378))/8*(-parseInt(r(387))/9)+-parseInt(r(401))/10+parseInt(r(372))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(us);tt[as(397)]((function(e,t){var r,n,i;r=Qe,n=function(e){var t=cs;return function(t){var r=cs,n=e,i=n[r(385)],s=i[r(392)],o=i.Hasher,a=n[r(393)][r(367)],c=n[r(375)],u=[],l=[],d=[];!function(){for(var e=r,t=1,n=0,i=0;i<24;i++){u[t+5*n]=(i+1)*(i+2)/2%64;var s=(2*t+3*n)%5;t=n%5,n=s}for(t=0;t<5;t++)for(n=0;n<5;n++)l[t+5*n]=n+(2*t+3*n)%5*5;for(var o=1,c=0;c<24;c++){for(var h=0,f=0,p=0;p<7;p++){if(1&o){var m=(1<>>24)|4278255360&(a<<24|a>>>8),c=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),(B=i[o])[n(374)]^=c,B[n(373)]^=a}for(var f=0;f<24;f++){for(var p=0;p<5;p++){for(var m=0,v=0,y=0;y<5;y++)m^=(B=i[p+5*y])[n(374)],v^=B[n(373)];var _=h[p];_[n(374)]=m,_[n(373)]=v}for(p=0;p<5;p++){var g=h[(p+4)%5],b=h[(p+1)%5],w=b[n(374)],S=b.low;for(m=g[n(374)]^(w<<1|S>>>31),v=g[n(373)]^(S<<1|w>>>31),y=0;y<5;y++)(B=i[p+5*y])[n(374)]^=m,B[n(373)]^=v}for(var I=1;I<25;I++){var A=(B=i[I])[n(374)],E=B[n(373)],k=u[I];k<32?(m=A<>>32-k,v=E<>>32-k):(m=E<>>64-k,v=A<>>64-k);var C=h[l[I]];C.high=m,C[n(373)]=v}var x=h[0],T=i[0];for(x[n(374)]=T[n(374)],x[n(373)]=T.low,p=0;p<5;p++)for(y=0;y<5;y++){var B=i[I=p+5*y],D=h[I],M=h[(p+1)%5+5*y],U=h[(p+2)%5+5*y];B[n(374)]=D.high^~M[n(374)]&U[n(374)],B[n(373)]=D[n(373)]^~M[n(373)]&U[n(373)]}B=i[0];var P=d[f];B[n(374)]^=P.high,B.low^=P[n(373)]}},_doFinalize:function(){var e=r,n=this[e(390)],i=n.words;this[e(370)];var o=8*n[e(400)],a=32*this.blockSize;i[o>>>5]|=1<<24-o%32,i[(t[e(377)]((o+1)/a)*a>>>5)-1]|=128,n[e(400)]=4*i[e(371)],this[e(368)]();for(var c=this._state,u=this[e(360)][e(366)]/8,l=u/8,d=[],h=0;h>>24)|4278255360&(p<<24|p>>>8),m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),d[e(403)](m),d.push(p)}return new(s[e(365)])(d,u)},clone:function(){for(var e=r,t=o[e(363)][e(384)](this),n=t[e(386)]=this[e(386)][e(358)](0),i=0;i<25;i++)n[i]=n[i][e(363)]();return t}});n.SHA3=o[r(362)](f),n[r(394)]=o[r(389)](f)}(Math),e[t(369)]},(i=cs)(380)==i(380)?e[i(402)]=n(Bi):"undefined"===i(379)&&(void 0)[i(399)]?(void 0)([i(396),i(381)],n):n(r[i(359)])}));function us(){var e=["1359LTEFXL","18YjAdan","_createHmacHelper","_data","create","WordArray","x64","HmacSHA3","206924gamrCh","./core","createCommonjsModule","extend","amd","sigBytes","2191100GlRjZp","exports","push","slice","CryptoJS","cfg","6LMeRrJ","_createHelper","clone","101605vNtLmk","init","outputLength","Word","_process","SHA3","_nDataBytes","length","18223150xaYrPE","low","high","algo","197KGjVsB","ceil","16024KZfIGS","function","object","./x64-core","1900BrzhLu","2866780NdUIac","call","lib","_state"];return(us=function(){return e})()}function ls(e,t){var r=ds();return(ls=function(e,t){return r[e-=248]})(e,t)}!function(e,t){for(var r=ls,n=e();;)try{if(428198===-parseInt(r(254))/1+-parseInt(r(276))/2*(-parseInt(r(257))/3)+parseInt(r(260))/4*(parseInt(r(249))/5)+-parseInt(r(280))/6+-parseInt(r(250))/7+-parseInt(r(255))/8+parseInt(r(273))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ds);et((function(e,t){var r,n,i,s=ls;r=tt[s(252)],n=function(e){var t=s;return function(t){var r=ls,n=e,i=n[r(268)],s=i[r(277)],o=i[r(248)],a=n[r(270)],c=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=s.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=s.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=s[r(265)]([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=s[r(265)]([0,1518500249,1859775393,2400959708,2840853838]),f=s[r(265)]([1352829926,1548603684,1836072691,2053994217,0]),p=a[r(259)]=o[r(261)]({_doReset:function(){this._hash=s.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=r,i=0;i<16;i++){var s=t+i,o=e[s];e[s]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a,p,w,S,I,A,E,k,C,x,T,B=this[n(266)][n(262)],D=h.words,M=f[n(262)],U=c[n(262)],P=u[n(262)],F=l[n(262)],R=d[n(262)];for(A=a=B[0],E=p=B[1],k=w=B[2],C=S=B[3],x=I=B[4],i=0;i<80;i+=1)T=a+e[t+U[i]]|0,T+=i<16?m(p,w,S)+D[0]:i<32?v(p,w,S)+D[1]:i<48?y(p,w,S)+D[2]:i<64?_(p,w,S)+D[3]:g(p,w,S)+D[4],T=(T=b(T|=0,F[i]))+I|0,a=I,I=S,S=b(w,10),w=p,p=T,T=A+e[t+P[i]]|0,T+=i<16?g(E,k,C)+M[0]:i<32?_(E,k,C)+M[1]:i<48?y(E,k,C)+M[2]:i<64?v(E,k,C)+M[3]:m(E,k,C)+M[4],T=(T=b(T|=0,R[i]))+x|0,A=x,x=C,C=b(k,10),k=E,E=T;T=B[1]+w+C|0,B[1]=B[2]+S+x|0,B[2]=B[3]+I+A|0,B[3]=B[4]+a+E|0,B[4]=B[0]+p+k|0,B[0]=T},_doFinalize:function(){var e=r,t=this[e(264)],n=t[e(262)],i=8*this[e(253)],s=8*t[e(278)];n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t[e(278)]=4*(n[e(263)]+1),this._process();for(var o=this._hash,a=o[e(262)],c=0;c<5;c++){var u=a[c];a[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return o},clone:function(){var e=r,t=o[e(272)].call(this);return t[e(266)]=this[e(266)][e(272)](),t}});function m(e,t,r){return e^t^r}function v(e,t,r){return e&t|~e&r}function y(e,t,r){return(e|~t)^r}function _(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}n[r(259)]=o[r(274)](p),n[r(258)]=o[r(256)](p)}(),e[t(259)]},"object"===(i=ls)(279)?e[i(267)]=n(Bi):"undefined"===i(269)&&(void 0)[i(271)]?(void 0)([i(251)],n):n(r[i(275)])}));function ds(){var e=["_nDataBytes","152177FOyiGT","1834784JnCcvF","_createHmacHelper","16401vYWBmG","HmacRIPEMD160","RIPEMD160","120xNYBdR","extend","words","length","_data","create","_hash","exports","lib","function","algo","amd","clone","10738953pVcJOs","_createHelper","CryptoJS","294SRiCdj","WordArray","sigBytes","object","4533852SSuHig","Hasher","4915WPCSSu","3226937NifimH","./core","commonjsGlobal"];return(ds=function(){return e})()}!function(e,t){for(var r=hs,n=e();;)try{if(933251===-parseInt(r(419))/1+-parseInt(r(432))/2+-parseInt(r(416))/3*(parseInt(r(439))/4)+-parseInt(r(443))/5*(parseInt(r(418))/6)+parseInt(r(425))/7*(parseInt(r(422))/8)+parseInt(r(433))/9+parseInt(r(431))/10*(parseInt(r(428))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fs);et((function(e,t){var r,n,i;r=tt[hs(445)],n=function(e){var t,r,n,i;n=(r=e)[(t=hs)(436)][t(421)],i=r[t(430)][t(412)],r[t(434)][t(444)]=n[t(441)]({init:function(e,r){var n=t;e=this[n(438)]=new(e[n(414)]),"string"==typeof r&&(r=i.parse(r));var s=e.blockSize,o=4*s;r[n(427)]>o&&(r=e[n(423)](r)),r.clamp();for(var a=this[n(415)]=r.clone(),c=this[n(424)]=r.clone(),u=a[n(437)],l=c[n(437)],d=0;d>>2];e[t(466)]-=r}};s[n(436)]=h[n(418)]({cfg:h[n(449)][n(418)]({mode:m,padding:v}),reset:function(){var e,t=n;h[t(433)].call(this);var r=this[t(449)],i=r.iv,s=r[t(490)];this._xformMode==this[t(472)]?e=s[t(463)]:(e=s[t(492)],this[t(499)]=1),this._mode&&this[t(439)][t(498)]==e?this._mode.init(this,i&&i.words):(this[t(439)]=e.call(s,this,i&&i[t(489)]),this[t(439)].__creator=e)},_doProcessBlock:function(e,t){this[n(439)].processBlock(e,t)},_doFinalize:function(){var e,t=n,r=this[t(449)][t(488)];return this[t(453)]==this[t(472)]?(r[t(440)](this[t(477)],this[t(447)]),e=this[t(412)](!!t(456))):(e=this[t(412)](!!t(456)),r[t(471)](e)),e},blockSize:4});var y=s[n(414)]=o[n(418)]({init:function(e){this[n(457)](e)},toString:function(e){return(e||this.formatter).stringify(this)}}),_=(i.format={})[n(458)]={stringify:function(e){var t=n,r=e.ciphertext,i=e[t(429)];return(i?a[t(455)]([1398893684,1701076831])[t(460)](i)[t(460)](r):r).toString(l)},parse:function(e){var t,r=n,i=l.parse(e),s=i.words;return 1398893684==s[0]&&1701076831==s[1]&&(t=a[r(455)](s[r(421)](2,4)),s[r(483)](0,4),i[r(466)]-=16),y.create({ciphertext:i,salt:t})}},g=s.SerializableCipher=o[n(418)]({cfg:o[n(418)]({format:_}),encrypt:function(e,t,r,i){var s=n;i=this[s(449)].extend(i);var o=e.createEncryptor(r,i),a=o[s(443)](t),c=o[s(449)];return y[s(455)]({ciphertext:a,key:r,iv:c.iv,algorithm:e,mode:c.mode,padding:c[s(488)],blockSize:e[s(447)],formatter:i[s(491)]})},decrypt:function(e,t,r,i){var s=n;return i=this[s(449)].extend(i),t=this._parse(t,i[s(491)]),e[s(492)](r,i)[s(443)](t[s(459)])},_parse:function(e,t){return"string"==typeof e?t[n(462)](e,this):e}}),b=(i[n(473)]={})[n(458)]={execute:function(e,t,r,i,s){var o=n;if(!i&&(i=a[o(452)](8)),s)c=d[o(455)]({keySize:t+r,hasher:s})[o(434)](e,i);else var c=d[o(455)]({keySize:t+r})[o(434)](e,i);var u=a[o(455)](c[o(489)][o(421)](t),4*r);return c.sigBytes=4*t,y.create({key:c,iv:u,salt:i})}},w=s.PasswordBasedCipher=g[n(418)]({cfg:g[n(449)][n(418)]({kdf:b}),encrypt:function(e,t,r,i){var s=n,o=(i=this[s(449)][s(418)](i)).kdf[s(486)](r,e[s(484)],e[s(496)],i[s(429)],i.hasher);i.iv=o.iv;var a=g[s(480)].call(this,e,t,o[s(435)],i);return a[s(457)](o),a},decrypt:function(e,t,r,i){var s=n;i=this.cfg[s(418)](i),t=this._parse(t,i[s(491)]);var o=i[s(473)][s(486)](r,e[s(484)],e.ivSize,t[s(429)],i[s(424)]);return i.iv=o.iv,g[s(464)][s(450)](this,e,t,o[s(435)],i)}})}()},(i=bs)(479)==i(479)?e[i(467)]=n(Bi):"undefined"===i(451)&&(void 0).amd?(void 0)([i(448),i(417)],n):n(r[i(432)])}));var Ss=As;function Is(){var e=["blockSize","491964IeTfQh","CFB","2073NKqYKD","function","exports","_cipher","10aylGdB","_iv","1830744tkMnee","slice","5FCkLXW","620937sAmqWa","CryptoJS","240174herKtC","_prevBlock","object","65176IWFqTz","34SrvooP","commonjsGlobal","mode","extend","amd","154QqXiuR","1068724XDBlVj","Encryptor","./core","lib","encryptBlock","call","createCommonjsModule"];return(Is=function(){return e})()}!function(e,t){for(var r=As,n=e();;)try{if(248099===parseInt(r(149))/1+-parseInt(r(135))/2*(parseInt(r(120))/3)+parseInt(r(141))/4*(-parseInt(r(128))/5)+parseInt(r(126))/6+-parseInt(r(140))/7*(parseInt(r(134))/8)+-parseInt(r(129))/9*(parseInt(r(124))/10)+-parseInt(r(131))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Is);tt[Ss(147)]((function(e,t){var r,n,i,s=Ss;r=tt[s(136)],n=function(e){var t=s;return e[t(137)][t(150)]=function(){var r=t,n=e[r(144)].BlockCipherMode[r(138)]();function i(e,t,n,i){var s,o=r,a=this[o(125)];a?(s=a[o(127)](0),this[o(125)]=void 0):s=this[o(132)],i[o(145)](s,0);for(var c=0;c>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var s=n[r(236)]=n[r(226)]({processBlock:function(e,t){var n,s=r,o=this[s(221)],a=o.blockSize,c=this[s(220)],u=this[s(242)];c&&(u=this[s(242)]=c.slice(0),this[s(220)]=void 0),0===((n=u)[0]=i(n[0]))&&(n[1]=i(n[1]));var l=u.slice(0);o[s(241)](l,0);for(var d=0;d>>2]|=o<<24-a%4*8,e[n(146)]+=o},unpad:function(e){var r=t,n=255&e[r(131)][e[r(146)]-1>>>2];e[r(146)]-=n}},e[t(137)][t(141)]},"object"===(i=Rs)(151)?e[i(144)]=n(Bi):"undefined"===i(138)&&(void 0)[i(142)]?(void 0)(["./core",i(143)],n):n(r[i(133)])}));function Ls(){var e=["1003464oXfSOn","words","42KXZtdt","CryptoJS","12786TcWAro","8cFBnoF","380566nykGvJ","pad","function","5528061vjnDfd","5033LXLdSU","Ansix923","amd","./cipher-core","exports","clamp","sigBytes","createCommonjsModule","1030qqTXQZ","AnsiX923","66099tHwHeK","object","2568185CJzGPM","345768ZLkmOj"];return(Ls=function(){return e})()}function Os(){var e=["sigBytes","function","pad","words","4440100QiRuZo","Iso10126","lib","130078SyIegt","object","15112ygKWDm","1119920zbcMLw","./core","createCommonjsModule","12SuVWXx","42510dCaekp","16516917UdTNIx","521420rxRtGe","840lJtvcj","./cipher-core","commonjsGlobal","WordArray","concat"];return(Os=function(){return e})()}var zs=Ns;function Ns(e,t){var r=Os();return(Ns=function(e,t){return r[e-=229]})(e,t)}!function(e,t){for(var r=Ns,n=e();;)try{if(682180===parseInt(r(248))/1+-parseInt(r(235))/2*(parseInt(r(232))/3)+-parseInt(r(229))/4+parseInt(r(245))/5+-parseInt(r(233))/6*(parseInt(r(236))/7)+parseInt(r(250))/8+parseInt(r(234))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Os);tt[zs(231)]((function(e,t){var r,n,i,s=zs;r=tt[s(238)],n=function(e){var t=s;return e[t(243)][t(246)]={pad:function(r,n){var i=t,s=4*n,o=s-r[i(241)]%s;r.concat(e[i(247)][i(239)].random(o-1))[i(240)](e[i(247)].WordArray.create([o<<24],1))},unpad:function(e){var r=t,n=255&e[r(244)][e[r(241)]-1>>>2];e.sigBytes-=n}},e[t(243)][t(246)]},(i=Ns)(249)==i(249)?e.exports=n(Bi):"undefined"===i(242)&&(void 0).amd?(void 0)([i(230),i(237)],n):n(r.CryptoJS)}));function Hs(e,t){var r=Vs();return(Hs=function(e,t){return r[e-=437]})(e,t)}function Vs(){var e=["Iso97971","./cipher-core","1143762HbhVnc","concat","4GwzWTz","function","963gldOJJ","CryptoJS","21079ChdKuh","WordArray","exports","1970925yDrzED","705510SNBaCB","1748033bCADUM","lib","sigBytes","1331187rKgBJI","pad","object","16416jscawR","ZeroPadding","2DImQfK"];return(Vs=function(){return e})()}!function(e,t){for(var r=Hs,n=e();;)try{if(227476===parseInt(r(449))/1*(-parseInt(r(440))/2)+parseInt(r(457))/3+-parseInt(r(445))/4*(-parseInt(r(452))/5)+-parseInt(r(443))/6+-parseInt(r(454))/7+parseInt(r(438))/8*(-parseInt(r(447))/9)+parseInt(r(453))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Vs);et((function(e,t){var r,n,i;r=Qe,n=function(e){var t=Hs;return e.pad[t(441)]={pad:function(r,n){var i=t;r[i(444)](e[i(455)][i(450)].create([2147483648],1)),e[i(458)][i(439)][i(458)](r,n)},unpad:function(r){var n=t;e.pad[n(439)].unpad(r),r[n(456)]--}},e[t(458)][t(441)]},(i=Hs)(437)==i(437)?e[i(451)]=n(Bi):"undefined"===i(446)&&(void 0).amd?(void 0)(["./core",i(442)],n):n(r[i(448)])}));function js(){var e=["7201232AMBXdD","9tqOWUj","exports","words","ZeroPadding","13808856nbLXoR","80elczjH","sigBytes","function","object","11FHyrcu","1061460iKOfvX","./cipher-core","createCommonjsModule","192543PuPEQG","107CqbURV","727170TzLqPS","13066HPNdss","./core","5OcxClD","632352IjVmoV"];return(js=function(){return e})()}var Ws=Gs;function Gs(e,t){var r=js();return(Gs=function(e,t){return r[e-=192]})(e,t)}!function(e,t){for(var r=Gs,n=e();;)try{if(651682===parseInt(r(193))/1*(-parseInt(r(195))/2)+-parseInt(r(192))/3*(-parseInt(r(205))/4)+-parseInt(r(197))/5*(-parseInt(r(194))/6)+parseInt(r(198))/7+parseInt(r(199))/8+-parseInt(r(200))/9*(-parseInt(r(210))/10)+parseInt(r(209))/11*(-parseInt(r(204))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(js);tt[Ws(212)]((function(e,t){var r,n,i;r=Qe,n=function(e){var t=Gs;return e.pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=Gs,r=e[t(202)],n=e[t(206)]-1;for(n=e[t(206)]-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){e[t(206)]=n+1;break}}},e.pad[t(203)]},(i=Gs)(208)==i(208)?e[i(201)]=n(Bi):"undefined"===i(207)&&(void 0).amd?(void 0)([i(196),i(211)],n):n(r.CryptoJS)}));var qs=$s;function $s(e,t){var r=Ys();return($s=function(e,t){return r[e-=389]})(e,t)}function Ys(){var e=["12WrIRyz","25713iWwJWv","2214696BGuDVS","1657305tAkpJd","256974ogPNIT","./core","./cipher-core","NoPadding","amd","pad","createCommonjsModule","1590ryJQpl","466683fEYBUc","222132pRtxmt","commonjsGlobal","object","62uNXEXC","function","2505CXGnNR"];return(Ys=function(){return e})()}!function(e,t){for(var r=$s,n=e();;)try{if(246355===-parseInt(r(407))/1+parseInt(r(400))/2*(parseInt(r(402))/3)+-parseInt(r(397))/4+-parseInt(r(406))/5+-parseInt(r(403))/6*(-parseInt(r(396))/7)+parseInt(r(405))/8+-parseInt(r(404))/9*(-parseInt(r(395))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ys);tt[qs(394)]((function(e,t){var r,n,i,s=qs;r=tt[s(398)],n=function(e){var t=s;return e[t(393)][t(391)]={pad:function(){},unpad:function(){}},e[t(393)].NoPadding},"object"===(i=$s)(399)?e.exports=n(Bi):"undefined"===i(401)&&(void 0)[i(392)]?(void 0)([i(389),i(390)],n):n(r.CryptoJS)}));function Ks(){var e=["213072YaSYeO","CipherParams","7154600bQGgkc","./core","28845fvOXDE","CryptoJS","createCommonjsModule","format","36007CVZXff","2961570CCPSNv","exports","parse","create","250kwgOuP","lib","Hex","390sgooCA","2oABICe","toString","97979mpZUKE","2066754Kiqvjp","enc","amd","ciphertext","object"];return(Ks=function(){return e})()}var Xs=Js;function Js(e,t){var r=Ks();return(Js=function(e,t){return r[e-=192]})(e,t)}!function(e,t){for(var r=Js,n=e();;)try{if(532048===-parseInt(r(207))/1*(-parseInt(r(216))/2)+-parseInt(r(194))/3+parseInt(r(199))/4+-parseInt(r(208))/5+-parseInt(r(215))/6*(-parseInt(r(193))/7)+parseInt(r(201))/8+-parseInt(r(203))/9*(parseInt(r(212))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ks);tt[Xs(205)]((function(e,t){var r,n,i;r=Qe,n=function(e){var t,r,n,i,s=Js;return n=(r=e)[(t=Js)(213)][t(200)],i=r[t(195)][t(214)],r[t(206)][t(214)]={stringify:function(e){var r=t;return e[r(197)][r(192)](i)},parse:function(e){var r=t,s=i[r(210)](e);return n[r(211)]({ciphertext:s})}},e[s(206)][s(214)]},(i=Js)(198)==i(198)?e[i(209)]=n(Bi):n(r[i(204)])}));var Zs=eo;function Qs(){var e=["object","4yaQaEE","exports","6CIqvGp","7237816EkGhYR","AES","5959500wHEqtL","219232qykbHw","_keySchedule","9suhvsJ","./evpkdf","algo","1586439jtWYzU","_doCryptBlock","638395pmvsCu","amd","4zMazJX","extend","commonjsGlobal","BlockCipher","words","_createHelper","137778zFNJer","7NIciYO","_keyPriorReset","createCommonjsModule","_nRounds","sigBytes","22hSpndL","6563940ClzHit","_invKeySchedule","./md5","_key"];return(Qs=function(){return e})()}!function(e,t){for(var r=eo,n=e();;)try{if(676499===-parseInt(r(273))/1*(-parseInt(r(252))/2)+-parseInt(r(263))/3*(parseInt(r(267))/4)+parseInt(r(265))/5*(parseInt(r(254))/6)+parseInt(r(274))/7*(-parseInt(r(255))/8)+-parseInt(r(260))/9*(-parseInt(r(257))/10)+parseInt(r(279))/11*(parseInt(r(280))/12)+parseInt(r(258))/13)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Qs);tt[Zs(276)]((function(e,t){var r,n,i,s=Zs;r=tt[s(269)],n=function(e){var t=s;return function(){var t=eo,r=e,n=r.lib[t(270)],i=r[t(262)],s=[],o=[],a=[],c=[],u=[],l=[],d=[],h=[],f=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var i=n^n<<1^n<<2^n<<3^n<<4;i=i>>>8^255&i^99,s[r]=i,o[i]=r;var m=e[r],v=e[m],y=e[v],_=257*e[i]^16843008*i;a[r]=_<<24|_>>>8,c[r]=_<<16|_>>>16,u[r]=_<<8|_>>>24,l[r]=_,_=16843009*y^65537*v^257*m^16843008*r,d[i]=_<<24|_>>>8,h[i]=_<<16|_>>>16,f[i]=_<<8|_>>>24,p[i]=_,r?(r=m^e[e[e[y^m]]],n^=e[e[n]]):r=n=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],v=i[t(256)]=n[t(268)]({_doReset:function(){var e=t;if(!this[e(277)]||this[e(275)]!==this[e(250)]){for(var r=this[e(275)]=this[e(250)],n=r[e(271)],i=r[e(278)]/4,o=4*((this[e(277)]=i+6)+1),a=this[e(259)]=[],c=0;c6&&c%i==4&&(v=s[v>>>24]<<24|s[v>>>16&255]<<16|s[v>>>8&255]<<8|s[255&v]):(v=s[(v=v<<8|v>>>24)>>>24]<<24|s[v>>>16&255]<<16|s[v>>>8&255]<<8|s[255&v],v^=m[c/i|0]<<24),a[c]=a[c-i]^v);for(var u=this[e(248)]=[],l=0;l>>24]]^h[s[v>>>16&255]]^f[s[v>>>8&255]]^p[s[255&v]]}}},encryptBlock:function(e,r){var n=t;this[n(264)](e,r,this[n(259)],a,c,u,l,s)},decryptBlock:function(e,r){var n=t,i=e[r+1];e[r+1]=e[r+3],e[r+3]=i,this._doCryptBlock(e,r,this[n(248)],d,h,f,p,o),i=e[r+1],e[r+1]=e[r+3],e[r+3]=i},_doCryptBlock:function(e,r,n,i,s,o,a,c){for(var u=this[t(277)],l=e[r]^n[0],d=e[r+1]^n[1],h=e[r+2]^n[2],f=e[r+3]^n[3],p=4,m=1;m>>24]^s[d>>>16&255]^o[h>>>8&255]^a[255&f]^n[p++],y=i[d>>>24]^s[h>>>16&255]^o[f>>>8&255]^a[255&l]^n[p++],_=i[h>>>24]^s[f>>>16&255]^o[l>>>8&255]^a[255&d]^n[p++],g=i[f>>>24]^s[l>>>16&255]^o[d>>>8&255]^a[255&h]^n[p++];l=v,d=y,h=_,f=g}v=(c[l>>>24]<<24|c[d>>>16&255]<<16|c[h>>>8&255]<<8|c[255&f])^n[p++],y=(c[d>>>24]<<24|c[h>>>16&255]<<16|c[f>>>8&255]<<8|c[255&l])^n[p++],_=(c[h>>>24]<<24|c[f>>>16&255]<<16|c[l>>>8&255]<<8|c[255&d])^n[p++],g=(c[f>>>24]<<24|c[l>>>16&255]<<16|c[d>>>8&255]<<8|c[255&h])^n[p++],e[r]=v,e[r+1]=y,e[r+2]=_,e[r+3]=g},keySize:8});r[t(256)]=n[t(272)](v)}(),e[t(256)]},(i=eo)(251)==i(251)?e[i(253)]=n(Bi):n(r.CryptoJS)}));function eo(e,t){var r=Qs();return(eo=function(e,t){return r[e-=248]})(e,t)}function to(e,t){var r=ro();return(to=function(e,t){return r[e-=239]})(e,t)}function ro(){var e=["88227pQigFL","encryptBlock","./core","2292276DGCEGE","3275865TuNfdz","_createHelper","call","4957698uWfPoz","amd","lib","_subKeys","length","createEncryptor","17377261OrLtls","slice","356572dCvaEr","function","264BYnqZv","./evpkdf","_doCryptBlock","_des1","object","words","10fwPfCa","6rZXpPR","_des2","CryptoJS","_lBlock","_des3","./cipher-core","_key","extend","BlockCipher","create","Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.","_rBlock","commonjsGlobal","WordArray","exports","_invSubKeys","TripleDES","algo","402916UdIsZf","DES","1fSGZTC"];return(ro=function(){return e})()}!function(e,t){for(var r=to,n=e();;)try{if(474070===-parseInt(r(243))/1*(-parseInt(r(241))/2)+-parseInt(r(268))/3*(-parseInt(r(259))/4)+-parseInt(r(248))/5+-parseInt(r(251))/6+-parseInt(r(247))/7+-parseInt(r(261))/8*(-parseInt(r(244))/9)+-parseInt(r(267))/10*(-parseInt(r(257))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ro);et((function(e,t){var r,n,i;r=tt[to(280)],n=function(e){return function(){var t=to,r=e,n=r[t(253)],i=n[t(281)],s=n[t(276)],o=r[t(240)],a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o[t(242)]=s[t(275)]({_doReset:function(){for(var e=t,r=this[e(274)][e(266)],n=[],i=0;i<56;i++){var s=a[i]-1;n[i]=r[s>>>5]>>>31-s%32&1}for(var o=this[e(254)]=[],l=0;l<16;l++){var d=o[l]=[],h=u[l];for(i=0;i<24;i++)d[i/6|0]|=n[(c[i]-1+h)%28]<<31-i%6,d[4+(i/6|0)]|=n[28+(c[i+24]-1+h)%28]<<31-i%6;for(d[0]=d[0]<<1|d[0]>>>31,i=1;i<7;i++)d[i]=d[i]>>>4*(i-1)+3;d[7]=d[7]<<5|d[7]>>>27}var f=this[e(283)]=[];for(i=0;i<16;i++)f[i]=o[15-i]},encryptBlock:function(e,r){var n=t;this[n(263)](e,r,this[n(254)])},decryptBlock:function(e,r){this[t(263)](e,r,this._invSubKeys)},_doCryptBlock:function(e,r,n){var i=t;this._lBlock=e[r],this[i(279)]=e[r+1],f[i(250)](this,4,252645135),f[i(250)](this,16,65535),p[i(250)](this,2,858993459),p[i(250)](this,8,16711935),f.call(this,1,1431655765);for(var s=0;s<16;s++){for(var o=n[s],a=this[i(271)],c=this[i(279)],u=0,h=0;h<8;h++)u|=l[h][((c^o[h])&d[h])>>>0];this[i(271)]=c,this[i(279)]=a^u}var m=this[i(271)];this[i(271)]=this[i(279)],this[i(279)]=m,f[i(250)](this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),f[i(250)](this,16,65535),f.call(this,4,252645135),e[r]=this[i(271)],e[r+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(e,r){var n=(this[t(271)]>>>e^this._rBlock)&r;this._rBlock^=n,this._lBlock^=n<>>e^this._lBlock)&r;this[n(271)]^=i,this[n(279)]^=i<>>2]>>>24-c%4*8&255;a=(a+s[o]+u)%256;var l=s[o];s[o]=s[a],s[a]=l}this._i=this._j=0},_doProcessBlock:function(e,r){var n=t;e[r]^=o[n(117)](this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var s=e[t];e[t]=e[r],e[r]=s,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}r.RC4=n[t(141)](s);var a=i[t(131)]=s[t(146)]({cfg:s[t(137)].extend({drop:192}),_doReset:function(){var e=t;s[e(134)][e(117)](this);for(var r=this[e(137)][e(119)];r>0;r--)o[e(117)](this)}});r[t(131)]=n._createHelper(a)}(),e[t(135)]},(i=io)(144)==i(144)?e[i(142)]=n(Bi):"undefined"===i(123)&&(void 0)[i(136)]?(void 0)(["./core","./enc-base64",i(138),i(140),i(118)],n):n(r.CryptoJS)}));var so=ao;function oo(){var e=["3866MYvHeI","call","cfg","./core","2479041jftnpi","1836205nGZRLN","createCommonjsModule","217004ASHjev","19078920ybPZAy","_createHelper","object","_key","2013496MzGfbG","18jHoUsx","function","lib","4702218geBhOl","commonjsGlobal","21ifNoIx","words","amd","./evpkdf","Rabbit","106bAjUZz","CryptoJS"];return(oo=function(){return e})()}function ao(e,t){var r=oo();return(ao=function(e,t){return r[e-=117]})(e,t)}!function(e,t){for(var r=ao,n=e();;)try{if(394170===parseInt(r(137))/1*(-parseInt(r(135))/2)+parseInt(r(125))/3*(parseInt(r(119))/4)+parseInt(r(117))/5+parseInt(r(128))/6+-parseInt(r(130))/7*(-parseInt(r(124))/8)+parseInt(r(141))/9+-parseInt(r(120))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(oo);tt[so(118)]((function(e,t){var r,n,i,s=so;r=tt[s(129)],n=function(e){var t=s;return function(){var t=ao,r=e,n=r[t(127)].StreamCipher,i=r.algo,s=[],o=[],a=[],c=i.Rabbit=n.extend({_doReset:function(){for(var e=t,r=this[e(123)][e(131)],n=this[e(139)].iv,i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8);var s=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],o=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];for(this._b=0,i=0;i<4;i++)u[e(138)](this);for(i=0;i<8;i++)o[i]^=s[i+4&7];if(n){var a=n[e(131)],c=a[0],l=a[1],d=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=d>>>16|4294901760&h,p=h<<16|65535&d;for(o[0]^=d,o[1]^=f,o[2]^=h,o[3]^=p,o[4]^=d,o[5]^=f,o[6]^=h,o[7]^=p,i=0;i<4;i++)u[e(138)](this)}},_doProcessBlock:function(e,r){var n=t,i=this._X;u[n(138)](this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var o=0;o<4;o++)s[o]=16711935&(s[o]<<8|s[o]>>>24)|4278255360&(s[o]<<24|s[o]>>>8),e[r+o]^=s[o]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}r[t(134)]=n[t(121)](c)}(),e[t(134)]},(i=ao)(122)==i(122)?e.exports=n(Bi):"undefined"===i(126)&&(void 0)[i(132)]?(void 0)([i(140),"./enc-base64","./md5",i(133),"./cipher-core"],n):n(r[i(136)])}));var co=uo;function uo(e,t){var r=lo();return(uo=function(e,t){return r[e-=205]})(e,t)}function lo(){var e=["object","lib","amd","4SeycuU","./core","548859ILSYQK","./md5","createCommonjsModule","RabbitLegacy","function","2153504BXxrcu","commonjsGlobal","5iRxdXO","_createHelper","137360qdiQoB","CryptoJS","206662aqAuqv","./enc-base64","words","1248772tdmKKC","2196063hjlvYY","./evpkdf","StreamCipher","768234nOlLIt","./cipher-core","call","_key"];return(lo=function(){return e})()}!function(e,t){for(var r=uo,n=e();;)try{if(141903===-parseInt(r(207))/1+parseInt(r(205))/2+parseInt(r(223))/3*(-parseInt(r(221))/4)+parseInt(r(230))/5*(parseInt(r(214))/6)+-parseInt(r(210))/7+parseInt(r(228))/8+parseInt(r(211))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(lo);tt[co(225)]((function(e,t){var r,n,i,s=co;r=tt[s(229)],n=function(e){var t=s;return function(){var t=uo,r=e,n=r[t(219)][t(213)],i=r.algo,s=[],o=[],a=[],c=i[t(226)]=n.extend({_doReset:function(){var e=t,r=this[e(217)][e(209)],n=this.cfg.iv,i=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],s=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];this._b=0;for(var o=0;o<4;o++)u.call(this);for(o=0;o<8;o++)s[o]^=i[o+4&7];if(n){var a=n[e(209)],c=a[0],l=a[1],d=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=d>>>16|4294901760&h,p=h<<16|65535&d;for(s[0]^=d,s[1]^=f,s[2]^=h,s[3]^=p,s[4]^=d,s[5]^=f,s[6]^=h,s[7]^=p,o=0;o<4;o++)u[e(216)](this)}},_doProcessBlock:function(e,r){var n=t,i=this._X;u[n(216)](this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var o=0;o<4;o++)s[o]=16711935&(s[o]<<8|s[o]>>>24)|4278255360&(s[o]<<24|s[o]>>>8),e[r+o]^=s[o]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}r.RabbitLegacy=n[t(231)](c)}(),e[t(226)]},(i=uo)(218)==i(218)?e.exports=n(Bi):"undefined"===i(227)&&(void 0)[i(220)]?(void 0)([i(222),i(208),i(224),i(212),i(215)],n):n(r[i(206)])}));const ho=po;function fo(){const e=["_createHelper","21508OIQxwY","_key","Blowfish","exports","3890wwSyzq","object","996ShELUe","22EuRLCF","114zFMZQn","lib","algo","./cipher-core","32fZIoEg","./core","sigBytes","7672272rDAcwR","createCommonjsModule","420427vLbBYd","words","right","595287COhyzs","892910OeRdbA","39HswvUY","pbox","./evpkdf","function","left","3942HNbFgo","sbox","./enc-base64"];return(fo=function(){return e})()}function po(e,t){const r=fo();return(po=function(e,t){return r[e-=312]})(e,t)}!function(e,t){const r=po,n=e();for(;;)try{if(167480===parseInt(r(338))/1*(parseInt(r(326))/2)+-parseInt(r(321))/3*(-parseInt(r(330))/4)+parseInt(r(334))/5*(parseInt(r(336))/6)+-parseInt(r(316))/7+-parseInt(r(342))/8*(-parseInt(r(319))/9)+parseInt(r(320))/10*(parseInt(r(337))/11)+-parseInt(r(314))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fo);tt[ho(315)]((function(e,t){!function(t,r,n){const i=po;"object"===i(335)?e[i(333)]=r(Bi):"undefined"===i(324)&&(void 0).amd?(void 0)([i(312),i(328),"./md5",i(323),i(341)],r):r(t.CryptoJS)}(Qe,(function(e){return function(){const t=po;var r=e,n=r[t(339)].BlockCipher,i=r[t(340)];const s=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function u(e,r){const n=t;let i=r>>24&255,s=r>>16&255,o=r>>8&255,a=255&r,c=e[n(327)][0][i]+e[n(327)][1][s];return c^=e[n(327)][2][o],c+=e.sbox[3][a],c}function l(e,r,n){const i=t;let o,a=r,c=n;for(let t=0;t=n&&(s=0);let c=0,u=0,d=0;for(let t=0;t<18;t+=2)d=l(e,c,u),c=d[i(325)],u=d[i(318)],e[i(322)][t]=c,e[i(322)][t+1]=u;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)d=l(e,c,u),c=d[i(325)],u=d[i(318)],e[i(327)][t][r]=c,e.sbox[t][r+1]=u}(c,n,i)}},encryptBlock:function(e,r){const n=t;var i=l(c,e[r],e[r+1]);e[r]=i[n(325)],e[r+1]=i[n(318)]},decryptBlock:function(e,r){const n=t;var i=function(e,r,n){const i=t;let s,o=r,a=n;for(let t=17;t>1;--t)o^=e[i(322)][t],a=u(e,o)^a,s=o,o=a,a=s;return s=o,o=a,a=s,a^=e[i(322)][1],o^=e[i(322)][0],{left:o,right:a}}(c,e[r],e[r+1]);e[r]=i[n(325)],e[r+1]=i.right},blockSize:2,keySize:4,ivSize:2});r.Blowfish=n[t(329)](d)}(),e.Blowfish}))}));var mo=yo;function vo(){var e=["./sha256","852sevyJv","./ripemd160","./cipher-core","./format-hex","./enc-base64","1040557oJZoVk","./rabbit","./mode-ecb","createCommonjsModule","22mvdYcB","./sha384","commonjsGlobal","./aes","424bbDwOh","6MhOjmu","./rabbit-legacy","6593755WoinVF","./sha1","CryptoJS","./evpkdf","163971lJpXxj","./mode-cfb","./sha3","2158820kJKkFL","./sha512","object","12618881HdMODp","./hmac","./pad-iso97971","./pbkdf2","./pad-zeropadding","./lib-typedarrays","./mode-ofb","./pad-ansix923","./blowfish","./mode-ctr-gladman","13707yXTdkO","./mode-ctr","./pad-iso10126","./pad-nopadding","82610uciYbe"];return(vo=function(){return e})()}function yo(e,t){var r=vo();return(yo=function(e,t){return r[e-=322]})(e,t)}function _o(e,t){const r=So();return(_o=function(e,t){return r[e-=268]})(e,t)}function go(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function bo(e,t,r){const n=_o;let i=arguments[n(281)]>3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const s=e[n(275)];let o=5;for(;os)break;let c=e[o+4],u=!1;if(i?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(290)](c)):(c&=31,u=1===c||5===c),u){const i=e[n(284)](o+4+2,o+4+a);let s=new(Ei[n(280)][n(291)])(t,new(Ei[n(270)])(r));const c=s[n(279)](i);s=null,e[n(286)](c,o+4+2)}o=o+4+a}return e}function wo(e,t,r){const n=_o;if(e.byteLength<=30)return e;const i=e[n(284)](32);let s=new(Ei[n(280)][n(291)])(t,new(Ei[n(270)])(r));const o=s[n(279)](i);return s=null,e.set(o,32),e}function So(){const e=["7Keodru","decrypt","ModeOfOperation","length","catch","17036sxoXeC","slice","toString","set","20736zNnLyU","2912510bDjVxw","1292802RMGJgc","includes","ctr","637839SzgPza","25ZoxOmC","Counter","4869mCJTXQ","20799460sLmEPA","109NSwzHd","453560lCwiPm","byteLength","get","WordArray"];return(So=function(){return e})()}!function(e,t){for(var r=yo,n=e();;)try{if(796771===parseInt(r(334))/1*(parseInt(r(345))/2)+-parseInt(r(330))/3*(parseInt(r(336))/4)+parseInt(r(352))/5*(-parseInt(r(350))/6)+-parseInt(r(341))/7+-parseInt(r(349))/8*(-parseInt(r(356))/9)+parseInt(r(359))/10+parseInt(r(362))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(vo),tt[mo(344)]((function(e,t){var r,n;r=tt[mo(347)],(n=yo)(361)==n(361)?e.exports=Bi:r[n(354)]=r.CryptoJS})),function(e,t){const r=_o,n=e();for(;;)try{if(713271===parseInt(r(273))/1*(parseInt(r(283))/2)+-parseInt(r(268))/3+parseInt(r(274))/4*(-parseInt(r(269))/5)+-parseInt(r(289))/6*(parseInt(r(278))/7)+parseInt(r(287))/8*(-parseInt(r(271))/9)+parseInt(r(288))/10+parseInt(r(272))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(So);var Io=Eo;!function(e,t){for(var r=Eo,n=e();;)try{if(109832===parseInt(r(324))/1*(-parseInt(r(857))/2)+parseInt(r(627))/3+-parseInt(r(573))/4*(parseInt(r(718))/5)+parseInt(r(875))/6*(parseInt(r(1028))/7)+parseInt(r(336))/8+parseInt(r(217))/9+-parseInt(r(181))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ko);var Ao=tt[Io(572)]((function(e,t){var r,n,s=Io,o=(r=new Date,n=4,{setLogLevel:function(e){var t=Eo;n=e==this.debug?1:e==this[t(950)]?2:e==this[t(239)]?3:(this[t(186)],4)},debug:function(e,t){var i=Eo;void 0===console[i(680)]&&(console.debug=console.log),1>=n&&console[i(680)]("["+o[i(975)](new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){var i=Eo;2>=n&&console[i(950)]("["+o[i(975)](new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){var i=Eo;3>=n&&console[i(239)]("["+o[i(975)](new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){4>=n&&console[Eo(186)]("["+o.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)}});o[s(975)]=function(e,t){var r,n=s;function i(e,t){for(var r=Eo,n=(""+e).split(".");n[0][r(226)]0){for(var n="",i=0;i0&&(n+=","),n+="["+o.getDurationString(e[t(426)](i))+","+o[t(975)](e.end(i))+"]";return n}return t(858)},s(790)!==s(1268)&&(t.Log=o);var a=function(e){var t=s;if(!(e instanceof ArrayBuffer))throw t(292);this[t(535)]=e,this[t(819)]=new DataView(e),this[t(916)]=0};a[s(1256)].getPosition=function(){return this[s(916)]},a.prototype[s(174)]=function(){var e=s;return this[e(535)][e(424)]},a[s(1256)][s(502)]=function(){var e=s;return this.buffer[e(424)]},a.prototype.seek=function(e){var t=s,r=Math[t(483)](0,Math[t(1390)](this[t(535)][t(424)],e));return this[t(916)]=isNaN(r)||!isFinite(r)?0:r,!0},a[s(1256)][s(676)]=function(){var e=s;return this[e(724)]()>=this[e(174)]()},a[s(1256)].readAnyInt=function(e,t){var r=s,n=0;if(this[r(916)]+e<=this[r(535)][r(424)]){switch(e){case 1:n=t?this[r(819)][r(438)](this[r(916)]):this[r(819)][r(775)](this[r(916)]);break;case 2:n=t?this[r(819)][r(1137)](this[r(916)]):this[r(819)][r(1264)](this.position);break;case 3:if(t)throw r(671);n=this[r(819)].getUint8(this[r(916)])<<16,n|=this[r(819)][r(775)](this[r(916)]+1)<<8,n|=this[r(819)][r(775)](this[r(916)]+2);break;case 4:n=t?this[r(819)].getInt32(this.position):this.dataview[r(1246)](this[r(916)]);break;case 8:if(t)throw r(1203);n=this.dataview[r(1246)](this[r(916)])<<32,n|=this[r(819)][r(1246)](this[r(916)]+4);break;default:throw r(209)+e}return this[r(916)]+=e,n}throw"Not enough bytes in buffer"},a[s(1256)][s(931)]=function(){return this[s(243)](1,!1)},a[s(1256)].readUint16=function(){return this[s(243)](2,!1)},a[s(1256)][s(631)]=function(){return this.readAnyInt(3,!1)},a[s(1256)][s(860)]=function(){return this[s(243)](4,!1)},a[s(1256)][s(1069)]=function(){return this[s(243)](8,!1)},a[s(1256)][s(462)]=function(e){var t=s;if(this.position+e<=this[t(535)][t(424)]){for(var r="",n=0;nthis[t(750)]&&(this._byteLength=r);else{for(n<1&&(n=1);r>n;)n*=2;var i=new ArrayBuffer(n),o=new Uint8Array(this[t(782)]);new Uint8Array(i,0,o.length)[t(1300)](o),this[t(535)]=i,this[t(750)]=r}}},c[s(1256)][s(865)]=function(){var e=s;if(this[e(750)]!=this._buffer.byteLength){var t=new ArrayBuffer(this[e(750)]),r=new Uint8Array(t),n=new Uint8Array(this[e(782)],0,r[e(226)]);r[e(1300)](n),this.buffer=t}},c[s(482)]=!1,c[s(1162)]=!0,c[s(1256)][s(750)]=0,Object[s(409)](c.prototype,"byteLength",{get:function(){var e=s;return this[e(750)]-this[e(496)]}}),Object[s(409)](c.prototype,s(535),{get:function(){var e=s;return this[e(865)](),this[e(782)]},set:function(e){var t=s;this._buffer=e,this[t(1318)]=new DataView(this[t(782)],this._byteOffset),this[t(750)]=this[t(782)][t(424)]}}),Object[s(409)](c[s(1256)],s(340),{get:function(){return this[s(496)]},set:function(e){var t=s;this[t(496)]=e,this[t(1318)]=new DataView(this[t(782)],this[t(496)]),this[t(750)]=this[t(782)][t(424)]}}),Object[s(409)](c.prototype,s(216),{get:function(){return this[s(1318)]},set:function(e){var t=s;this[t(496)]=e[t(340)],this[t(782)]=e[t(535)],this[t(1318)]=new DataView(this[t(782)],this._byteOffset),this[t(750)]=this[t(496)]+e.byteLength}}),c[s(1256)][s(740)]=function(e){var t=s,r=Math[t(483)](0,Math[t(1390)](this[t(424)],e));this[t(916)]=isNaN(r)||!isFinite(r)?0:r},c.prototype[s(1025)]=function(){var e=s;return this[e(916)]>=this[e(750)]},c[s(1256)][s(1284)]=function(e){var t=s;this[t(1029)](1*e);var r=new Uint8Array(this._buffer,this[t(340)]+this[t(916)],e);return this[t(916)]+=1*e,r},c[s(1256)][s(688)]=function(e,t){var r=s;e=null==e?this[r(424)]-this.position/4:e;var n=new Int32Array(e);return c[r(751)](n.buffer,0,this[r(535)],this[r(340)]+this[r(916)],e*n[r(1298)]),c[r(490)](n,null==t?this[r(321)]:t),this[r(916)]+=n.byteLength,n},c[s(1256)][s(683)]=function(e,t){var r=s;e=null==e?this[r(424)]-this[r(916)]/2:e;var n=new Int16Array(e);return c[r(751)](n.buffer,0,this[r(535)],this[r(340)]+this[r(916)],e*n[r(1298)]),c[r(490)](n,null==t?this[r(321)]:t),this[r(916)]+=n[r(424)],n},c[s(1256)][s(351)]=function(e){var t=s;e=null==e?this[t(424)]-this[t(916)]:e;var r=new Int8Array(e);return c.memcpy(r[t(535)],0,this.buffer,this[t(340)]+this.position,e*r.BYTES_PER_ELEMENT),this[t(916)]+=r[t(424)],r},c.prototype[s(1392)]=function(e,t){var r=s;e=null==e?this.byteLength-this[r(916)]/4:e;var n=new Uint32Array(e);return c[r(751)](n.buffer,0,this[r(535)],this.byteOffset+this.position,e*n[r(1298)]),c[r(490)](n,null==t?this[r(321)]:t),this[r(916)]+=n[r(424)],n},c[s(1256)][s(248)]=function(e,t){var r=s;e=null==e?this.byteLength-this[r(916)]/2:e;var n=new Uint16Array(e);return c.memcpy(n[r(535)],0,this.buffer,this.byteOffset+this[r(916)],e*n[r(1298)]),c[r(490)](n,null==t?this[r(321)]:t),this[r(916)]+=n[r(424)],n},c.prototype[s(289)]=function(e){var t=s;e=null==e?this.byteLength-this[t(916)]:e;var r=new Uint8Array(e);return c[t(751)](r[t(535)],0,this[t(535)],this.byteOffset+this[t(916)],e*r.BYTES_PER_ELEMENT),this[t(916)]+=r[t(424)],r},c[s(1256)][s(1186)]=function(e,t){var r=s;e=null==e?this[r(424)]-this[r(916)]/8:e;var n=new Float64Array(e);return c.memcpy(n[r(535)],0,this.buffer,this[r(340)]+this.position,e*n.BYTES_PER_ELEMENT),c.arrayToNative(n,null==t?this[r(321)]:t),this[r(916)]+=n[r(424)],n},c[s(1256)].readFloat32Array=function(e,t){var r=s;e=null==e?this[r(424)]-this[r(916)]/4:e;var n=new Float32Array(e);return c[r(751)](n.buffer,0,this[r(535)],this.byteOffset+this.position,e*n.BYTES_PER_ELEMENT),c[r(490)](n,null==t?this[r(321)]:t),this[r(916)]+=n.byteLength,n},c.prototype.readInt32=function(e){var t=s,r=this._dataView.getInt32(this[t(916)],null==e?this.endianness:e);return this[t(916)]+=4,r},c[s(1256)][s(1111)]=function(e){var t=s,r=this[t(1318)][t(1137)](this[t(916)],null==e?this.endianness:e);return this[t(916)]+=2,r},c.prototype[s(1055)]=function(){var e=s,t=this[e(1318)].getInt8(this[e(916)]);return this.position+=1,t},c[s(1256)].readUint32=function(e){var t=s,r=this[t(1318)][t(1246)](this.position,null==e?this.endianness:e);return this[t(916)]+=4,r},c.prototype[s(549)]=function(e){var t=s,r=this[t(1318)][t(1264)](this.position,null==e?this[t(321)]:e);return this.position+=2,r},c.prototype[s(931)]=function(){var e=s,t=this[e(1318)][e(775)](this.position);return this[e(916)]+=1,t},c[s(1256)][s(1311)]=function(e){var t=s,r=this[t(1318)][t(541)](this[t(916)],null==e?this.endianness:e);return this[t(916)]+=4,r},c[s(1256)][s(192)]=function(e){var t=s,r=this._dataView.getFloat64(this[t(916)],null==e?this[t(321)]:e);return this.position+=8,r},c.endianness=new Int8Array(new Int16Array([1])[s(535)])[0]>0,c[s(751)]=function(e,t,r,n,i){var o=s,a=new Uint8Array(e,t,i),c=new Uint8Array(r,n,i);a[o(1300)](c)},c[s(490)]=function(e,t){var r=s;return t==this[r(321)]?e:this[r(938)](e)},c[s(1283)]=function(e,t){var r=s;return this[r(321)]==t?e:this[r(938)](e)},c[s(938)]=function(e){for(var t=s,r=new Uint8Array(e[t(535)],e[t(340)],e.byteLength),n=0;no;i--,o++){var a=r[o];r[o]=r[i],r[i]=a}return e},c.prototype[s(1173)]=0,String[s(668)]=function(e){for(var t=s,r=[],n=0;n>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},c[s(1256)][s(414)]=function(e,t){var r=s,n=this.position;this[r(740)](e),this.writeUint32(t),this[r(740)](n)},c[s(1256)][s(1159)]=function(e,t){var r=s;this[r(1029)](4*e);var n=new Int32Array(this[r(782)],this[r(340)]+this[r(916)],e);return c[r(490)](n,null==t?this[r(321)]:t),this[r(916)]+=4*e,n},c.prototype[s(431)]=function(e,t){var r=s;this[r(1029)](2*e);var n=new Int16Array(this[r(782)],this[r(340)]+this[r(916)],e);return c[r(490)](n,null==t?this[r(321)]:t),this[r(916)]+=2*e,n},c[s(1256)][s(1200)]=function(e){var t=s;this[t(1029)](1*e);var r=new Int8Array(this._buffer,this[t(340)]+this[t(916)],e);return this[t(916)]+=1*e,r},c[s(1256)][s(845)]=function(e,t){var r=s;this[r(1029)](4*e);var n=new Uint32Array(this._buffer,this[r(340)]+this[r(916)],e);return c[r(490)](n,null==t?this[r(321)]:t),this.position+=4*e,n},c.prototype[s(533)]=function(e,t){var r=s;this._realloc(2*e);var n=new Uint16Array(this[r(782)],this.byteOffset+this.position,e);return c[r(490)](n,null==t?this.endianness:t),this[r(916)]+=2*e,n},c[s(1256)][s(850)]=function(e,t){var r=s;this[r(1029)](8*e);var n=new Float64Array(this[r(782)],this[r(340)]+this[r(916)],e);return c.arrayToNative(n,null==t?this[r(321)]:t),this[r(916)]+=8*e,n},c[s(1256)][s(262)]=function(e,t){var r=s;this[r(1029)](4*e);var n=new Float32Array(this[r(782)],this[r(340)]+this.position,e);return c.arrayToNative(n,null==t?this[r(321)]:t),this.position+=4*e,n};var l=function(e){var t=s;this[t(1281)]=[],this[t(168)]=-1,e&&(this[t(928)](e),this.bufferIndex=0)};l[s(1256)]=new c(new ArrayBuffer,0,c.BIG_ENDIAN),l[s(1256)][s(883)]=function(){var e,t=s;return this[t(168)]>-1||(this[t(1281)][t(226)]>0?0===(e=this.buffers[0])[t(761)]?(this[t(535)]=e,this.bufferIndex=0,o[t(680)](t(1243),t(1237)),!0):(this[t(489)](),!1):(this[t(489)](),!1))},ArrayBuffer[s(480)]=function(e,t){var r=s;o[r(680)](r(219),"Trying to create a new buffer of size: "+(e[r(424)]+t[r(424)]));var n=new Uint8Array(e[r(424)]+t[r(424)]);return n[r(1300)](new Uint8Array(e),0),n[r(1300)](new Uint8Array(t),e.byteLength),n[r(535)]},l[s(1256)][s(1275)]=function(e,t,r){var n,i=s;return(n=new Uint8Array(r)).set(new Uint8Array(e,t,r)),n[i(535)].fileStart=e[i(761)]+t,n[i(535)].usedBytes=0,n[i(535)]},l[s(1256)].insertBuffer=function(e){for(var t=s,r=!0,n=0;ni[t(424)]){this.buffers.splice(n,1),n--;continue}}else e.fileStart+e.byteLength<=i.fileStart||(e=this[t(1275)](e,0,i[t(761)]-e.fileStart)),o[t(680)](t(1243),t(937)+e.fileStart+t(449)+e[t(424)]+")"),this.buffers.splice(n,0,e),0===n&&(this[t(535)]=e);r=!1;break}if(e.fileStart0)){r=!1;break}e=this[t(1275)](e,a,c)}}r&&(o[t(680)](t(1243),t(937)+e[t(761)]+t(449)+e[t(424)]+")"),this[t(1281)][t(824)](e),0===n&&(this[t(535)]=e))},l[s(1256)].logBufferLevel=function(e){var t,r,n,i,a,c=s,u=[],l="";for(n=0,i=0,t=0;t0&&(l+=a[c(659)]-1+"]");var d=e?o[c(950)]:o.debug;0===this[c(1281)].length?d(c(1243),"No more buffer in memory"):d("MultiBufferStream",""+this[c(1281)].length+c(1024)+n+"/"+i+" bytes), continuous ranges: "+l)},l[s(1256)][s(494)]=function(){var e,t,r=s;for(e=0;e"+this[t(535)][t(424)]+")"),!0}return!1}return!1},l[s(1256)].findPosition=function(e,t,r){var n,i=s,a=null,c=-1;for(n=!0===e?0:this[i(168)];n=t?(o[i(680)](i(1243),i(546)+c),c):-1:-1},l.prototype[s(433)]=function(e){var t,r,n,i=s,o=void 0!==e?e:this[i(168)];if(r=this.buffers[o],this[i(1281)][i(226)]>o+1)for(t=o+1;t>3;return 31===s&&i[r(715)][r(226)]>=2&&(s=32+((7&i[r(715)][0])<<3)+((224&i[r(715)][1])>>5)),s}return null},n[e(1189)]=function(t){var r=e;n[r(851)][r(1092)](this,4,t)},n[e(1189)][e(1256)]=new(n[e(851)]),n.DecoderConfigDescriptor.prototype.parse=function(t){var r=e;this[r(374)]=t.readUint8(),this[r(467)]=t[r(931)](),this[r(799)]=0!=(this[r(467)]>>1&1),this[r(467)]=this[r(467)]>>>2,this[r(856)]=t[r(631)](),this[r(817)]=t[r(860)](),this[r(1161)]=t[r(860)](),this[r(1030)]-=13,this.parseRemainingDescriptors(t)},n[e(537)]=function(t){var r=e;n[r(851)][r(1092)](this,5,t)},n[e(537)][e(1256)]=new(n[e(851)]),n.SLConfigDescriptor=function(t){var r=e;n.Descriptor[r(1092)](this,6,t)},n[e(690)].prototype=new(n[e(851)]),this};"object"!==s(1268)&&(t[s(988)]=d);var h={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:[s(1289),s(663),s(1202),"skip","meco",s(187)],FULL_BOXES:["hmhd",s(412),s(1131),"xml ",s(368),s(269),"mere"],CONTAINER_BOXES:[["moov",[s(333),s(370)]],[s(333)],[s(500)],[s(1127)],[s(952)],[s(475)],[s(566),[s(454),s(560)]],[s(553),["trex"]],[s(237),[s(1181)]],["traf",[s(1033),"sgpd",s(560)]],[s(388)],[s(893)],[s(759)],[s(678),[s(514)]],[s(823)],[s(864)],["hinf"],[s(187)],[s(554)],["sinf"],["rinf"],[s(943)],[s(809)],[s(771),[s(380)]],["iprp",[s(607)]],[s(1048)],[s(233)],[s(331)],["etyp",[s(781)]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){var e=s;h.FullBox.prototype=new(h[e(170)]),h[e(935)][e(1256)]=new(h[e(170)]),h[e(530)][e(1256)]=new(h[e(170)]),h[e(1135)][e(1256)]=new h.FullBox,h[e(479)][e(1286)]((function(t){h[e(702)](t)})),h[e(1285)][e(1286)]((function(t){h[e(164)](t)})),h[e(1036)].forEach((function(t){h[e(204)](t[0],null,t[1])}))},Box:function(e,t,r){var n=s;this.type=e,this[n(1030)]=t,this[n(992)]=r},FullBox:function(e,t,r){var n=s;h.Box[n(1092)](this,e,t,r),this.flags=0,this[n(1188)]=0},ContainerBox:function(e,t,r){var n=s;h.Box[n(1092)](this,e,t,r),this[n(258)]=[]},SampleEntry:function(e,t,r,n){var i=s;h[i(935)].call(this,e,t),this.hdr_size=r,this[i(426)]=n},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){h[s(941)].call(this,e,t)},createBoxCtor:function(e,t){var r=s;h[r(1265)][r(824)](e),h[e+r(170)]=function(t){var n=r;h[n(170)][n(1092)](this,e,t)},h[e+r(170)][r(1256)]=new(h[r(170)]),t&&(h[e+r(170)][r(1256)][r(279)]=t)},createFullBoxCtor:function(e,t){var r=s;h[e+r(170)]=function(t){h[r(941)].call(this,e,t)},h[e+r(170)].prototype=new(h[r(941)]),h[e+"Box"][r(1256)][r(279)]=function(e){var n=r;this[n(1166)](e),t&&t[n(1092)](this,e)}},addSubBoxArrays:function(e){if(e){this[s(913)]=e;for(var t=e.length,r=0;rr?{code:h[c(1101)],type:f,size:d,hdr_size:l,start:u}:0!==d&&u+d>e[c(174)]()?(e[c(740)](u),{code:h[c(1101)],type:f,size:d,hdr_size:l,start:u}):t?{code:h.OK,type:f,size:d,hdr_size:l,start:u}:(h[f+"Box"]?n=new(h[f+c(170)])(d):f!==c(992)?(n=new(h[c(170)])(f,d))[c(1260)]=!0:h[c(704)][a]?n=new(h[c(704)][a])(d):((n=new h.Box(f,d))[c(992)]=a,n[c(1260)]=!0),n[c(994)]=l,n.start=u,n[c(743)]===h[c(170)][c(1256)].write&&n[c(1147)]!==c(1289)&&n[c(657)](e),n[c(279)](e),(i=e[c(724)]()-(n.start+n.size))<0?e[c(740)](n[c(426)]+n[c(1030)]):i>0&&0!==n[c(1030)]&&e[c(740)](n.start+n.size),{code:h.OK,box:n,size:n[c(1030)]})},h.Box.prototype[s(279)]=function(e){var t=s;"mdat"!=this[t(1147)]?this[t(715)]=e[t(289)](this[t(1030)]-this[t(994)]):0===this[t(1030)]?e[t(740)](e[t(174)]()):e[t(740)](this[t(426)]+this[t(1030)])},h[s(170)][s(1256)][s(657)]=function(e){var t=s;this[t(715)]=e[t(289)](this[t(1030)]-this[t(994)]),e[t(916)]-=this[t(1030)]-this[t(994)]},h[s(941)][s(1256)][s(657)]=function(e){var t=s;this.parseFullHeader(e),this[t(715)]=e[t(289)](this[t(1030)]-this[t(994)]),this[t(994)]-=4,e[t(916)]-=this[t(1030)]-this[t(994)]},h[s(941)].prototype[s(1166)]=function(e){var t=s;this[t(1188)]=e[t(931)](),this[t(909)]=e[t(631)](),this[t(994)]+=4},h[s(941)][s(1256)][s(279)]=function(e){var t=s;this[t(1166)](e),this[t(715)]=e.readUint8Array(this.size-this[t(994)])},h[s(935)][s(1256)][s(279)]=function(e){for(var t,r,n=s;e[n(724)]()>10&31,r[1]=this[t(1119)]>>5&31,r[2]=31&this[t(1119)],this[t(1249)]=String[t(829)](r[0]+96,r[1]+96,r[2]+96)},h[s(733)]="Visual",h[s(241)]=s(697),h[s(236)]=s(366),h.SAMPLE_ENTRY_TYPE_METADATA="Metadata",h[s(930)]=s(397),h[s(158)]=s(457),h[s(948)]=s(323),h[s(530)][s(1256)][s(990)]=function(e){var t=s;e[t(289)](6),this[t(345)]=e[t(549)](),this[t(994)]+=8},h[s(530)][s(1256)][s(279)]=function(e){var t=s;this[t(990)](e),this[t(715)]=e[t(289)](this[t(1030)]-this[t(994)])},h.SampleEntry[s(1256)].parseDataAndRewind=function(e){var t=s;this[t(990)](e),this.data=e[t(289)](this[t(1030)]-this.hdr_size),this[t(994)]-=8,e[t(916)]-=this[t(1030)]-this.hdr_size},h.SampleEntry[s(1256)][s(327)]=function(e){var t=s;h[t(935)][t(1256)][t(279)].call(this,e)},h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_HINT),h[s(348)](h.SAMPLE_ENTRY_TYPE_METADATA),h[s(348)](h.SAMPLE_ENTRY_TYPE_SUBTITLE),h.createMediaSampleEntryCtor(h[s(158)]),h[s(348)](h[s(948)]),h.createMediaSampleEntryCtor(h[s(733)],(function(e){var t,r=s;this[r(990)](e),e[r(549)](),e[r(549)](),e[r(1392)](3),this[r(538)]=e[r(549)](),this.height=e[r(549)](),this[r(1190)]=e[r(860)](),this[r(517)]=e.readUint32(),e.readUint32(),this[r(1003)]=e.readUint16(),t=Math[r(1390)](31,e[r(931)]()),this[r(523)]=e[r(462)](t),t<31&&e[r(462)](31-t),this[r(441)]=e[r(549)](),e.readUint16(),this[r(327)](e)})),h[s(348)](h[s(241)],(function(e){var t=s;this[t(990)](e),e[t(1392)](2),this.channel_count=e[t(549)](),this[t(1274)]=e[t(549)](),e[t(549)](),e[t(549)](),this[t(1071)]=e[t(860)]()/65536,this[t(327)](e)})),h[s(1107)](h[s(733)],s(624)),h[s(1107)](h[s(733)],s(491)),h.createSampleEntryCtor(h[s(733)],s(787)),h[s(1107)](h[s(733)],s(214)),h[s(1107)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(1004)),h.createSampleEntryCtor(h[s(733)],s(228)),h[s(1107)](h.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,s(885)),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,s(556)),h[s(1107)](h[s(733)],s(428)),h[s(1107)](h[s(733)],"dvh1"),h[s(1107)](h[s(733)],s(601)),h.createSampleEntryCtor(h[s(733)],s(832)),h[s(1107)](h[s(733)],s(542)),h.createSampleEntryCtor(h[s(733)],s(765)),h[s(1107)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(1059)),h.createSampleEntryCtor(h[s(733)],"vp08"),h[s(1107)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(1365)),h[s(1107)](h[s(733)],s(1217)),h[s(1107)](h[s(733)],s(402)),h[s(1107)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(1255)),h[s(1107)](h[s(733)],s(282)),h[s(1107)](h.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),h[s(1107)](h[s(241)],s(610)),h.createSampleEntryCtor(h[s(241)],s(175)),h[s(1107)](h[s(241)],s(425)),h[s(1107)](h[s(241)],"Opus"),h[s(1107)](h[s(241)],s(1155)),h[s(1107)](h.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),h[s(1107)](h[s(241)],"mhm1"),h.createSampleEntryCtor(h[s(241)],s(350)),h[s(1342)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(1297)),h[s(1342)](h[s(241)],s(669)),h.createEncryptedSampleEntryCtor(h[s(930)],"encu"),h[s(1342)](h[s(158)],s(939)),h[s(1342)](h[s(948)],s(1151)),h[s(1342)](h.SAMPLE_ENTRY_TYPE_METADATA,"encm"),h.createBoxCtor(s(1374),(function(e){var t=s,r=16*(1+(1&(1&e[t(931)]())));this[t(590)]=[];for(var n=0;n<3;n++)this[t(590)][n]=16==r?e.readUint16():e[t(860)]()})),h.createBoxCtor(s(1085),(function(e){var t=s;this[t(840)]=e[t(931)]()})),h.createFullBoxCtor(s(1364),(function(e){var t=s;this[t(464)]=e[t(993)]();var r=this[t(1030)]-this.hdr_size-(this[t(464)].length+1);this[t(1149)]=e.readUint8Array(r)})),h[s(702)](s(1253),(function(e){var t=s,r=e.readUint8();if(!(r>>7&!1)&&(this.version=127&r,1===this.version&&(r=e[t(931)](),this[t(1023)]=r>>5&7,this.seq_level_idx_0=31&r,r=e[t(931)](),this[t(403)]=r>>7&1,this[t(641)]=r>>6&1,this[t(1070)]=r>>5&1,this[t(460)]=r>>4&1,this[t(1244)]=r>>3&1,this.chroma_subsampling_y=r>>2&1,this.chroma_sample_position=3&r,r=e[t(931)](),this[t(1316)]=r>>5&7,0===this.reserved_1))){if(this[t(1299)]=r>>4&1,1===this[t(1299)])this[t(603)]=15&r;else if(this[t(244)]=15&r,0!==this[t(244)])return;var n=this.size-this[t(994)]-4;this.configOBUs=e[t(289)](n)}})),h.createBoxCtor(s(600),(function(e){var t,r,n=s;for(this[n(1102)]=e.readUint8(),this[n(803)]=e.readUint8(),this[n(263)]=e[n(931)](),this.AVCLevelIndication=e[n(931)](),this[n(1360)]=3&e[n(931)](),this.nb_SPS_nalus=31&e[n(931)](),r=this.size-this[n(994)]-6,this.SPS=[],t=0;t0&&(this[n(308)]=e[n(289)](r))})),h.createBoxCtor(s(773),(function(e){var t=s;this.bufferSizeDB=e[t(860)](),this[t(817)]=e[t(860)](),this.avgBitrate=e[t(860)]()})),h[s(164)]("ccst",(function(e){var t=s,r=e[t(931)]();this.all_ref_pics_intra=128==(128&r),this[t(319)]=64==(64&r),this[t(1377)]=(63&r)>>2,e[t(631)]()})),h[s(702)](s(1247),(function(e){var t,r=s;for(this.channel_count=e[r(549)](),this[r(776)]=[],this.channel_types=[],this[r(1221)]=[],t=0;t=32768&&this[t(1097)].push(e.readCString())}})),h[s(164)](s(1356),(function(e){var t,r,n=s;if(t=e[n(860)](),this.chunk_offsets=[],0===this[n(1188)])for(r=0;r>7}else this.colour_type===t(924)?this.ICC_profile=e.readUint8Array(this[t(1030)]-4):this[t(575)]===t(942)&&(this.ICC_profile=e[t(289)](this.size-4))})),h[s(164)](s(584),(function(e){var t=s;this.parseLanguage(e),this[t(161)]=e[t(993)]()})),h.createFullBoxCtor(s(901),(function(e){var t=s;0===this[t(1188)]&&(this[t(717)]=e[t(618)](),this[t(497)]=e[t(618)](),this[t(1293)]=e[t(618)](),this.compositionStartTime=e[t(618)](),this.compositionEndTime=e[t(618)]())})),h.createFullBoxCtor("ctts",(function(e){var t,r,n=s;if(t=e[n(860)](),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this[t(1228)]=r>>1&31,this.bsmod=(1&r)<<2|n>>6&3,this[t(1084)]=n>>3&7,this.lfeon=n>>2&1,this[t(1371)]=3&n|i>>5&7})),h[s(702)](s(1250),(function(e){var t=s,r=e[t(549)]();this.data_rate=r>>3,this[t(408)]=7&r,this[t(967)]=[];for(var n=0;n>6,i.bsid=o>>1&31,i.bsmod=(1&o)<<4|a>>4&15,i[t(1084)]=a>>1&7,i[t(160)]=1&a,i[t(1294)]=c>>1&15,i.num_dep_sub>0&&(i[t(944)]=(1&c)<<8|e.readUint8())}})),h[s(164)]("dfLa",(function(e){var t=s,r=[],n=[t(1235),"PADDING",t(1332),t(1083),t(581),t(660),t(972),t(927)];for(this[t(1166)](e);;){var i=e[t(931)](),o=Math[t(1390)](127&i,n[t(226)]-1);if(o?e[t(289)](e[t(631)]()):(e[t(289)](13),this[t(1071)]=e[t(860)]()>>12,e[t(289)](20)),r[t(824)](n[o]),128&i)break}this[t(987)]=r.length+" ("+r[t(178)](", ")+")"})),h[s(702)]("dimm",(function(e){this[s(1018)]=e.readUint64()})),h[s(702)](s(619),(function(e){this.time=e.readUint32()})),h.createBoxCtor("dmed",(function(e){var t=s;this.bytessent=e[t(1069)]()})),h[s(702)](s(561),(function(e){var t=s;if(this.Version=e[t(931)](),this.OutputChannelCount=e.readUint8(),this[t(1013)]=e[t(549)](),this[t(1322)]=e[t(860)](),this.OutputGain=e[t(1111)](),this[t(1158)]=e.readUint8(),0!==this.ChannelMappingFamily){this[t(625)]=e[t(931)](),this[t(238)]=e.readUint8(),this[t(842)]=[];for(var r=0;r=4;)this[t(1384)][n]=e[t(462)](4),r-=4,n++})),h[s(164)](s(1163),(function(e){var t=s;0===this[t(1188)]&&(e.readUint32(),this[t(953)]=e[t(462)](4),e[t(1392)](3),this.name=e.readString(this[t(1030)]-this[t(994)]-20),"\0"===this[t(982)][this[t(982)][t(226)]-1]&&(this[t(982)]=this.name[t(559)](0,-1)))})),h[s(702)](s(250),(function(e){var t,r,n,i,o=s;this.configurationVersion=e.readUint8(),i=e[o(931)](),this[o(785)]=i>>6,this[o(867)]=(32&i)>>5,this[o(983)]=31&i,this.general_profile_compatibility=e[o(860)](),this[o(1110)]=e.readUint8Array(6),this[o(448)]=e[o(931)](),this[o(674)]=4095&e[o(549)](),this[o(577)]=3&e[o(931)](),this[o(614)]=3&e[o(931)](),this[o(1075)]=7&e[o(931)](),this[o(770)]=7&e.readUint8(),this[o(629)]=e[o(549)](),i=e[o(931)](),this[o(699)]=i>>6,this[o(484)]=(13&i)>>3,this[o(406)]=(4&i)>>2,this[o(1360)]=3&i,this.nalu_arrays=[];var a=e[o(931)]();for(t=0;t>7,c[o(604)]=63&i;var u=e[o(549)]();for(r=0;r>4&15,this[r(194)]=15&t,t=e[r(931)](),this.base_offset_size=t>>4&15,1===this[r(1188)]||2===this[r(1188)]?this[r(232)]=15&t:this[r(232)]=0,this.items=[];var n=0;if(this[r(1188)]<2)n=e[r(549)]();else{if(2!==this[r(1188)])throw r(634);n=e.readUint32()}for(var i=0;i>7,this.axis=1&r})),h[s(164)]("infe",(function(e){var t=s;if((0===this[t(1188)]||1===this[t(1188)])&&(this.item_ID=e[t(549)](),this[t(843)]=e[t(549)](),this[t(377)]=e[t(993)](),this[t(1313)]=e.readCString(),this[t(371)]=e[t(993)]()),1===this[t(1188)])return this[t(1272)]=e[t(462)](4),void e[t(740)](this[t(426)]+this[t(1030)]);this[t(1188)]>=2&&(2===this[t(1188)]?this.item_ID=e[t(549)]():3===this[t(1188)]&&(this.item_ID=e.readUint32()),this[t(843)]=e.readUint16(),this[t(267)]=e[t(462)](4),this[t(377)]=e[t(993)](),"mime"===this[t(267)]?(this.content_type=e[t(993)](),this.content_encoding=e[t(993)]()):this[t(267)]===t(682)&&(this[t(745)]=e[t(993)]()))})),h[s(164)](s(607),(function(e){var t,r,n=s;for(entry_count=e[n(860)](),this.associations=[],t=0;t>7==1,1&this.flags?c[n(966)]=(127&a)<<8|e[n(931)]():c[n(966)]=127&a}}})),h[s(164)](s(759),(function(e){var t,r,n=s;for(this.references=[];e[n(724)]()>7,i.assignment_type=127&o,i[t(758)]){case 0:i[t(672)]=e.readString(4);break;case 1:i[t(672)]=e[t(462)](4),i.grouping_type_parameter=e[t(860)]();break;case 2:case 3:break;case 4:i[t(162)]=e[t(860)]()}}})),h[s(702)](s(1333),(function(e){var t=s;this[t(1079)]=e[t(549)]()})),h.createBoxCtor(s(1108),(function(e){var t=s;this[t(159)]=e[t(860)](),this[t(1037)]=e.readUint32()})),f[s(1256)][s(737)]=function(){return"("+this.x+","+this.y+")"},h[s(702)]("mdcv",(function(e){var t=s;this[t(296)]=[],this[t(296)][0]=new f(e[t(549)](),e.readUint16()),this[t(296)][1]=new f(e.readUint16(),e[t(549)]()),this[t(296)][2]=new f(e[t(549)](),e[t(549)]()),this[t(910)]=new f(e[t(549)](),e.readUint16()),this[t(1201)]=e.readUint32(),this.min_display_mastering_luminance=e[t(860)]()})),h[s(164)](s(870),(function(e){var t=s;1==this[t(1188)]?(this[t(1273)]=e[t(1069)](),this.modification_time=e.readUint64(),this[t(1076)]=e[t(860)](),this.duration=e.readUint64()):(this[t(1273)]=e[t(860)](),this[t(543)]=e.readUint32(),this[t(1076)]=e[t(860)](),this.duration=e[t(860)]()),this[t(1039)](e),e.readUint16()})),h[s(164)](s(177),(function(e){var t=s;1&this.flags&&(this[t(1188)]=1),1==this[t(1188)]?this[t(1109)]=e[t(1069)]():this[t(1109)]=e[t(860)]()})),h[s(164)](s(655),(function(e){var t=s;this.boxes=[],h[t(935)][t(1256)].parse[t(1092)](this,e)})),h[s(164)](s(911),(function(e){var t=s;this[t(176)]=e[t(860)]()})),h[s(164)]("mfro",(function(e){var t=s;this[t(1171)]=e[t(860)]()})),h[s(164)](s(1225),(function(e){var t=s;this[t(290)]=e[t(931)]()})),h[s(164)](s(578),(function(e){var t=s;1==this[t(1188)]?(this[t(1273)]=e[t(1069)](),this.modification_time=e[t(1069)](),this.timescale=e[t(860)](),this[t(812)]=e[t(1069)]()):(this[t(1273)]=e[t(860)](),this[t(543)]=e[t(860)](),this[t(1076)]=e.readUint32(),this[t(812)]=e[t(860)]()),this.rate=e[t(860)](),this.volume=e[t(549)]()>>8,e.readUint16(),e.readUint32Array(2),this[t(1315)]=e[t(1392)](9),e[t(1392)](6),this[t(1234)]=e[t(860)]()})),h[s(702)]("npck",(function(e){this[s(1020)]=e.readUint32()})),h[s(702)](s(1254),(function(e){var t=s;this[t(1020)]=e[t(1069)]()})),h[s(164)](s(609),(function(e){var t=s,r=e[t(860)]();this[t(443)]=[];for(var n=0;n0){var r=e[t(860)]();this.kid=[];for(var n=0;n0&&(this.data=e[t(289)](i))})),h[s(164)](s(558),(function(e){var t=s;this[t(538)]=e.readUint32(),this[t(700)]=e.readUint32()})),h.createFullBoxCtor(s(890),(function(e){var t=s;this.width=e[t(860)](),this[t(700)]=e[t(860)]()})),h[s(164)](s(942),(function(e){var t=s;this[t(538)]=e[t(860)](),this[t(700)]=e[t(860)]()})),h[s(204)](s(643),null,[s(558),s(942),"enof"]),h.createBoxCtor("rtp ",(function(e){var t=s;this[t(430)]=e[t(462)](4),this[t(300)]=e[t(462)](this.size-this[t(994)]-4)})),h[s(164)](s(453),(function(e){var t=s;1&this[t(909)]&&(this[t(215)]=e[t(860)](),this.aux_info_type_parameter=e.readUint32());var r=e[t(860)]();this[t(1094)]=[];for(var n=0;n>7,this[t(806)]=r>>6&1,this[t(725)]&&(this[t(812)]=e[t(860)]()),this[t(806)]&&(this[t(1078)]=e[t(931)](),this[t(179)]=e[t(549)](),this[t(629)]=e[t(549)]()),this.dependency=[];for(var n=e[t(931)](),i=0;i>7,this[t(868)]=127&r})),h[s(861)]("rash",(function(e){var t=s;if(this[t(872)]=e.readUint16(),this[t(218)]!==2+(1===this[t(872)]?2:6*this[t(872)])+9)this[t(715)]=e[t(289)](this[t(218)]-2);else{if(1===this[t(872)])this.target_rate_share=e[t(549)]();else{this.target_rate_share=[],this[t(1362)]=[];for(var r=0;r>4,this[t(1118)]=15&r,this[t(277)]=e.readUint8(),this[t(986)]=e.readUint8(),this[t(520)]=h[t(363)](e),this.constant_IV_size=0,this[t(318)]=0,1===this[t(277)]&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this[t(318)]=e[t(289)](this[t(1212)]))})),h[s(861)](s(1213),(function(e){})),h.createSampleGroupCtor(s(1005),(function(e){var t=s,r=e[t(931)]();this[t(329)]=63&r})),h[s(861)](s(472),(function(e){var t=e[s(931)]();this.level_independently_decodable=t>>7})),h[s(861)](s(958),(function(e){})),h.createSampleGroupCtor(s(605),(function(e){})),h[s(861)]("vipr",(function(e){})),h[s(164)]("sbgp",(function(e){var t=s;this.grouping_type=e.readString(4),1===this[t(1188)]?this[t(816)]=e[t(860)]():this.grouping_type_parameter=0,this[t(307)]=[];for(var r=e.readUint32(),n=0;n>6,this[r(315)][i]=t>>4&3,this[r(1358)][i]=t>>2&3,this[r(1251)][i]=3&t})),h[s(164)](s(253)),h[s(164)]("sgpd",(function(e){var t=s;this[t(672)]=e.readString(4),o[t(680)](t(723),t(421)+this[t(672)]),1===this[t(1188)]?this[t(757)]=e.readUint32():this.default_length=0,this[t(1188)]>=2&&(this.default_group_description_index=e[t(860)]()),this[t(307)]=[];for(var r=e[t(860)](),n=0;n>31&1,i.referenced_size=2147483647&o,i[t(722)]=e[t(860)](),o=e.readUint32(),i[t(628)]=o>>31&1,i[t(568)]=o>>28&7,i.SAP_delta_time=268435455&o}})),h.SingleItemTypeReferenceBox=function(e,t,r,n){var i=s;h[i(170)][i(1092)](this,e,t),this.hdr_size=r,this[i(426)]=n},h[s(1082)][s(1256)]=new h.Box,h[s(1082)][s(1256)][s(279)]=function(e){var t=s;this.from_item_ID=e[t(549)]();var r=e[t(549)]();this[t(1363)]=[];for(var n=0;n>4&15,this.sample_sizes[t+1]=15&i}else if(8===this[n(874)])for(t=0;t0)for(r=0;r>4&15,this[t(594)]=15&r}this.default_isProtected=e[t(931)](),this[t(701)]=e[t(931)](),this[t(360)]=h.parseHex16(e),1===this[t(673)]&&0===this[t(701)]&&(this[t(314)]=e[t(931)](),this[t(434)]=e.readUint8Array(this.default_constant_IV_size))})),h[s(164)](s(230),(function(e){var t=s;1==this[t(1188)]?this.baseMediaDecodeTime=e[t(1069)]():this[t(849)]=e[t(860)]()})),h[s(164)](s(172),(function(e){var t=s,r=0;this[t(664)]=e[t(860)](),this.size-this.hdr_size>r&&this.flags&h[t(1184)]?(this.base_data_offset=e[t(1069)](),r+=8):this.base_data_offset=0,this[t(1030)]-this[t(994)]>r&&this[t(909)]&h[t(738)]?(this[t(1240)]=e.readUint32(),r+=4):this[t(1240)]=0,this[t(1030)]-this[t(994)]>r&&this[t(909)]&h[t(213)]?(this[t(592)]=e[t(860)](),r+=4):this[t(592)]=0,this.size-this[t(994)]>r&&this[t(909)]&h[t(1198)]?(this[t(654)]=e.readUint32(),r+=4):this[t(654)]=0,this[t(1030)]-this[t(994)]>r&&this[t(909)]&h[t(339)]?(this[t(766)]=e.readUint32(),r+=4):this[t(766)]=0})),h[s(164)](s(514),(function(e){var t=s;this.track_ID=e[t(860)](),e[t(631)]();var r=e[t(931)]();this[t(304)]=r>>4&3,this[t(1175)]=r>>2&3,this[t(808)]=3&r,this.entries=[];for(var n=e.readUint32(),i=0;i>8,e[t(549)](),this[t(1315)]=e[t(688)](9),this[t(538)]=e.readUint32(),this[t(700)]=e.readUint32()})),h[s(702)](s(312),(function(e){this.time=e.readUint32()})),h[s(702)](s(1218),(function(e){var t=s;this[t(260)]=e[t(860)]()})),h[s(702)]("totl",(function(e){this[s(1018)]=e.readUint32()})),h.createBoxCtor(s(831),(function(e){var t=s;this.bytessent=e[t(860)]()})),h.createBoxCtor("tpyl",(function(e){var t=s;this[t(1018)]=e[t(1069)]()})),h[s(1135)][s(1256)][s(279)]=function(e){var t=s;this[t(1166)](e),this[t(891)]=e[t(860)]()},h[s(1350)](s(1267)),h.TrackReferenceTypeBox=function(e,t,r,n){var i=s;h[i(170)].call(this,e,t),this[i(994)]=r,this[i(426)]=n},h[s(1239)].prototype=new(h[s(170)]),h.TrackReferenceTypeBox[s(1256)].parse=function(e){var t=s;this[t(1206)]=e[t(1392)]((this[t(1030)]-this.hdr_size)/4)},h.trefBox[s(1256)][s(279)]=function(e){for(var t,r,n=s;e[n(724)]()r&&this[t(909)]&h[t(1180)]?(this.data_offset=e[t(618)](),r+=4):this[t(298)]=0,this[t(1030)]-this[t(994)]>r&&this[t(909)]&h.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e[t(860)](),r+=4):this[t(963)]=0,this.sample_duration=[],this[t(365)]=[],this.sample_flags=[],this.sample_composition_time_offset=[],this[t(1030)]-this[t(994)]>r)for(var n=0;n>7&1,this[r(382)]=n>>6&1,this[r(383)]=n>>5&1,this.block_reversed=n>>4&1,this[r(291)]=n>>3&1,this[r(623)]=e[r(860)](),this[r(157)]=e.readUint32(),this.tile_align_size=e[r(860)](),this[r(936)]=e[r(860)](),this.num_tile_rows_minus_one=e.readUint32()}})),h[s(164)](s(714),(function(e){var t=s;1!==this[t(909)]&&(this[t(746)]=e[t(993)]())})),h[s(164)]("urn ",(function(e){var t=s;this.name=e[t(993)](),this.size-this.hdr_size-this.name[t(226)]-1>0&&(this[t(746)]=e[t(993)]())})),h[s(1031)](s(165),!0,!1,(function(e){var t=s;this[t(1074)]=e[t(462)](this[t(1030)]-this[t(994)]).replace(/&/g,t(1261))[t(534)](//g,t(1359))[t(534)](/"/g,""")[t(534)](/'/g,"'")})),h[s(1031)](s(1125),!0,!1,(function(e){var t=s;this.system_id=h[t(363)](e);var r=e[t(860)]();r>0&&(this[t(715)]=e[t(289)](r))})),h.createUUIDBox(s(526),!0,!1),h[s(1031)](s(1223),!0,!1,(function(e){var t=s;this[t(1022)]=e[t(631)](),this.default_IV_size=e[t(931)](),this[t(360)]=h[t(363)](e)})),h[s(1031)](s(356),!0,!1,(function(e){var t=s;this[t(896)]=e[t(931)](),this[t(307)]=[];for(var r=0;r>4,this[r(617)]=t>>1&7,this[r(335)]=1&t,this[r(1164)]=e.readUint8(),this[r(524)]=e.readUint8(),this[r(804)]=e.readUint8(),this[r(398)]=e[r(549)](),this[r(920)]=e[r(289)](this.codecIntializationDataSize)):(this.profile=e.readUint8(),this[r(793)]=e[r(931)](),t=e[r(931)](),this[r(854)]=t>>4&15,this[r(364)]=15&t,t=e[r(931)](),this[r(617)]=t>>4&15,this[r(1379)]=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e[r(549)](),this[r(920)]=e.readUint8Array(this[r(398)]))})),h[s(702)](s(423),(function(e){var t=s;this[t(346)]=e[t(462)](this[t(1030)]-this[t(994)])})),h[s(164)](s(284),(function(e){var t,r,n=s,i={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){var t=Eo;this[t(495)]=e[t(931)](),this[t(1038)]=8},stream_read_2_bytes:function(e){this[Eo(495)]=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=Eo,r=this[t(495)]>>this[t(1038)]-e&(1<1){for(i[n(995)](e),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var c=i.extract_bits(1);this[n(945)]|=c<1;++r)i[n(826)](1);for(this.sublayer_level_idc=[],r=this[n(756)]-2;r>=0;--r)this[n(945)]&1<>=1;r+=h[t(649)](i,0),r+=".",0===this.hvcC[t(867)]?r+="L":r+="H",r+=this[t(250)][t(448)];var o=!1,a="";for(e=5;e>=0;e--)(this[t(250)][t(1110)][e]||o)&&(a="."+h[t(649)](this[t(250)][t(1110)][e],0)+a,o=!0);r+=a}return r},h[s(796)][s(1256)][s(1041)]=h[s(1209)][s(1256)][s(1041)]=function(){var e,t=s,r=h[t(530)][t(1256)][t(1041)][t(1092)](this);if(this[t(284)]){r+="."+this[t(284)][t(983)],this.vvcC[t(867)]?r+=".H":r+=".L",r+=this[t(284)][t(448)];var n="";if(this[t(284)][t(1302)]){var i,o=[],a=0;for(a|=this.vvcC[t(392)]<<7,a|=this[t(284)].ptl_multilayer_enabled<<6,e=0;e>2&63,o[t(824)](a),a&&(i=e),a=this.vvcC[t(1302)][e]>>2&3;if(void 0===i)n=".CA";else{n=".C";var c="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",u=0,l=0;for(e=0;e<=i;++e)for(u=u<<8|o[e],l+=8;l>=5;){n+=c[u>>l-5&31],u&=(1<<(l-=5))-1}l&&(n+=c[31&(u<<=5-l)])}}r+=n}return r},h[s(727)][s(1256)][s(1041)]=function(){var e=s,t=h[e(530)][e(1256)][e(1041)].call(this);if(this.esds&&this[e(729)][e(565)]){var r=this[e(729)][e(565)][e(184)](),n=this.esds[e(565)][e(940)]();return t+"."+h[e(649)](r)+(n?"."+n:"")}return t},h[s(1361)].prototype[s(1041)]=function(){var e=s,t=h[e(530)][e(1256)][e(1041)].call(this);return this[e(1129)]?t+"."+this[e(1129)]:t},h[s(774)][s(1256)][s(1041)]=h[s(297)][s(1256)][s(1041)]=function(){var e=s,t=h[e(530)].prototype[e(1041)][e(1092)](this),r=this.vpcC[e(793)];0==r&&(r="00");var n=this[e(652)][e(854)];return 8==n&&(n="08"),t+".0"+this[e(652)][e(1352)]+"."+r+"."+n},h[s(1248)][s(1256)][s(1041)]=function(){var e,t=s,r=h[t(530)].prototype[t(1041)].call(this),n=this.av1C[t(580)];return n<10&&(n="0"+n),2===this[t(1253)][t(1023)]&&1===this.av1C.high_bitdepth?e=1===this[t(1253)][t(1070)]?"12":"10":this[t(1253)][t(1023)]<=2&&(e=1===this[t(1253)][t(641)]?"10":"08"),r+"."+this.av1C[t(1023)]+"."+n+(this[t(1253)][t(403)]?"H":"M")+"."+e},h[s(170)][s(1256)][s(848)]=function(e,t){var r=s;this.size+=8,this[r(1030)]>u&&(this[r(1030)]+=8),"uuid"===this[r(1147)]&&(this[r(1030)]+=16),o[r(680)]("BoxWriter",r(223)+this[r(1147)]+r(1051)+this[r(1030)]+r(951)+e[r(724)]()+(t||"")),this[r(1030)]>u?e[r(1062)](1):(this[r(719)]=e[r(724)](),e.writeUint32(this.size)),e[r(687)](this[r(1147)],null,4),"uuid"===this.type&&e.writeUint8Array(this[r(992)]),this.size>u&&e[r(1178)](this[r(1030)])},h[s(941)][s(1256)][s(848)]=function(e){var t=s;this[t(1030)]+=4,h[t(170)].prototype[t(848)].call(this,e,t(522)+this[t(1188)]+t(1262)+this[t(909)]),e[t(1177)](this[t(1188)]),e.writeUint24(this[t(909)])},h[s(170)][s(1256)][s(743)]=function(e){var t=s;"mdat"===this[t(1147)]?this[t(715)]&&(this[t(1030)]=this[t(715)][t(226)],this[t(848)](e),e[t(1386)](this[t(715)])):(this[t(1030)]=this[t(715)]?this[t(715)][t(226)]:0,this[t(848)](e),this[t(715)]&&e.writeUint8Array(this[t(715)]))},h[s(935)][s(1256)][s(743)]=function(e){var t=s;this[t(1030)]=0,this[t(848)](e);for(var r=0;r=2&&e.writeUint32(this[n(1240)]),e[n(1062)](this[n(307)][n(226)]),t=0;t0)for(t=0;t+1r?1:0,this[t(909)]=0,this.size=4,1===this[t(1188)]&&(this.size+=4),this.writeHeader(e),1===this[t(1188)]?e[t(1178)](this[t(849)]):e.writeUint32(this[t(849)])},h.tfhdBox[s(1256)].write=function(e){var t=s;this.version=0,this[t(1030)]=4,this[t(909)]&h.TFHD_FLAG_BASE_DATA_OFFSET&&(this[t(1030)]+=8),this[t(909)]&h[t(738)]&&(this[t(1030)]+=4),this[t(909)]&h[t(213)]&&(this[t(1030)]+=4),this[t(909)]&h[t(1198)]&&(this.size+=4),this[t(909)]&h[t(339)]&&(this[t(1030)]+=4),this[t(848)](e),e[t(1062)](this.track_id),this[t(909)]&h.TFHD_FLAG_BASE_DATA_OFFSET&&e[t(1178)](this[t(1148)]),this[t(909)]&h[t(738)]&&e[t(1062)](this[t(1240)]),this.flags&h[t(213)]&&e[t(1062)](this.default_sample_duration),this.flags&h[t(1198)]&&e[t(1062)](this[t(654)]),this.flags&h[t(339)]&&e[t(1062)](this[t(766)])},h[s(615)][s(1256)][s(743)]=function(e){var t=s;this[t(1188)]=0,this[t(1030)]=80,this[t(848)](e),e[t(1062)](this[t(1273)]),e[t(1062)](this[t(543)]),e[t(1062)](this[t(664)]),e[t(1062)](0),e[t(1062)](this[t(812)]),e[t(1062)](0),e.writeUint32(0),e[t(905)](this[t(984)]),e[t(905)](this[t(728)]),e[t(905)](this[t(193)]<<8),e.writeUint16(0),e.writeInt32Array(this[t(1315)]),e[t(1062)](this[t(538)]),e[t(1062)](this.height)},h.trexBox[s(1256)][s(743)]=function(e){var t=s;this[t(1188)]=0,this.flags=0,this.size=20,this[t(848)](e),e[t(1062)](this[t(664)]),e[t(1062)](this[t(1240)]),e.writeUint32(this.default_sample_duration),e.writeUint32(this.default_sample_size),e.writeUint32(this.default_sample_flags)},h[s(658)][s(1256)][s(743)]=function(e){var t=s;this[t(1188)]=0,this.size=4,this[t(909)]&h[t(1180)]&&(this[t(1030)]+=4),this[t(909)]&h[t(1150)]&&(this[t(1030)]+=4),this.flags&h[t(473)]&&(this[t(1030)]+=4*this.sample_duration[t(226)]),this.flags&h[t(720)]&&(this[t(1030)]+=4*this.sample_size[t(226)]),this[t(909)]&h.TRUN_FLAGS_FLAGS&&(this[t(1030)]+=4*this[t(1142)][t(226)]),this[t(909)]&h[t(661)]&&(this[t(1030)]+=4*this[t(800)][t(226)]),this[t(848)](e),e[t(1062)](this[t(381)]),this[t(909)]&h[t(1180)]&&(this[t(735)]=e[t(724)](),e[t(1330)](this[t(298)])),this.flags&h.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this[t(963)]);for(var r=0;r-1||e[r]instanceof h[n(170)]||t[r]instanceof h.Box||void 0===e[r]||typeof t[r]===n(1268)||typeof e[r]===n(1136)||typeof t[r]===n(1136)||e[n(913)]&&e[n(913)][n(342)](r.slice(0,4))>-1||t[n(913)]&&t[n(913)][n(342)](r.slice(0,4))>-1||"data"===r||r===n(426)||r===n(1030)||r===n(1273)||r===n(543)||h[n(742)].indexOf(r)>-1||e[r]===t[r]))return!1;return!0},h.boxEqual=function(e,t){var r=s;if(!h[r(650)](e,t))return!1;for(var n=0;n=t?e:new Array(t-e.length+1)[n(178)](r)+e}function o(e){var t=Eo,r=Math.floor(e/3600),n=Math[t(1380)]((e-3600*r)/60),s=Math[t(1380)](e-3600*r-60*n),o=Math[t(1380)](1e3*(e-3600*r-60*n-s));return i(r,2)+":"+i(n,2)+":"+i(s,2)+"."+i(o,3)}for(var a=this[n(512)](r),c="",u=0;u1)for(t=1;t-1&&this[t(311)].splice(r,1)},_[s(1256)][s(1344)]=function(e,t,r){var n=s,i=this[n(1270)](e);if(i){var o={};this[n(847)][n(824)](o),o.id=e,o[n(367)]=t,o[n(333)]=i,i[n(1348)]=0,o[n(405)]=1e3,o[n(429)]=[],r&&r.nbSamples&&(o[n(405)]=r.nbSamples)}},_[s(1256)][s(1324)]=function(e){for(var t=s,r=-1,n=0;n-1&&this[t(847)][t(1258)](r,1)},_[s(1256)][s(279)]=function(){var e,t,r=s;if(!this[r(1357)]||this[r(1357)]())for(;;){if(this[r(283)]&&this.hasIncompleteMdat()){if(this[r(1156)]())continue;return}if(this[r(1368)]&&this[r(1368)](),(e=h.parseOneBox(this[r(1128)],false)).code===h[r(1101)]){if(this[r(1323)]){if(this[r(1323)](e))continue;return}return}var n;switch(n="uuid"!==(t=e[r(726)]).type?t.type:t[r(992)],this[r(258)][r(824)](t),n){case r(1289):this[r(1325)][r(824)](t);break;case r(237):this[r(731)].push(t);break;case"moov":this.moovStartFound=!0,0===this[r(1325)][r(226)]&&(this.isProgressive=!0);default:this[n],this[n]=t}this.updateUsedBytes&&this[r(981)](t,e)}},_[s(1256)][s(1211)]=function(e){var t=s;if(null==e)throw t(1034);if(void 0===e[t(761)])throw t(837);return 0===e[t(424)]?(this[t(1128)][t(489)](),!1):(e.usedBytes=0,this[t(1128)][t(928)](e),this[t(1128)][t(489)](),!!this[t(1128)][t(883)]())},_[s(1256)][s(1208)]=function(e,t){var r,n=s;if(this[n(1211)](e))return this.parse(),this[n(763)]&&!this.moovStartSent&&(this.moovStartSent=!0,this[n(444)]&&this[n(444)]()),this[n(1060)]?(!this[n(1016)]&&(this[n(1066)](),this.sampleListBuilt=!0),this[n(485)](),this[n(442)]&&!this.readySent&&(this[n(1080)]=!0,this[n(442)](this[n(325)]())),this[n(234)](t),this.nextSeekPosition?(r=this[n(249)],this.nextSeekPosition=void 0):r=this[n(355)],this[n(1128)].getEndFilePositionAfter&&(r=this[n(1128)][n(713)](r))):r=this[n(355)]?this[n(355)]:0,this[n(1295)]&&this[n(274)]&&!this[n(898)]&&(this[n(274)](this[n(1295)]),this[n(898)]=!0),this[n(655)]&&(this[n(662)]&&!this[n(1222)]&&(this[n(662)](),this[n(1222)]=!0),this[n(552)]&&this[n(552)](this.onItem)),this[n(1128)][n(494)]&&(this.stream.logBufferLevel(),this[n(1128)].cleanBuffers(),this[n(1128)][n(489)](!0)),r},_[s(1256)][s(325)]=function(){var e,t,r,n,i,o,a=s,c={},u=new Date("1904-01-01T00:00:00Z")[a(1056)]();if(this[a(1060)])for(c[a(1157)]=!0,c[a(812)]=this[a(1060)].mvhd[a(812)],c[a(1076)]=this[a(1060)][a(578)].timescale,c[a(173)]=null!=this[a(1060)][a(553)],c.isFragmented&&this[a(1060)][a(553)][a(177)]&&(c.fragment_duration=this[a(1060)][a(553)][a(177)][a(1109)]),c.isProgressive=this.isProgressive,c[a(557)]=null!=this.moov.iods,c.brands=[],c.brands[a(824)](this[a(709)][a(1339)]),c[a(509)]=c[a(509)][a(480)](this[a(709)][a(1384)]),c[a(487)]=new Date(u+1e3*this[a(1060)][a(578)][a(1273)]),c[a(711)]=new Date(u+1e3*this[a(1060)][a(578)][a(543)]),c[a(741)]=[],c[a(637)]=[],c[a(914)]=[],c[a(825)]=[],c[a(907)]=[],c.hintTracks=[],c[a(156)]=[],e=0;e0?c[a(271)]+=a(947):c[a(637)]&&c.audioTracks[a(226)]>0?c.mime+=a(200):c[a(271)]+=a(677),e=0;e=r[n(429)].length)&&(this[n(169)]&&this[n(169)](i.id,i[n(367)],i[n(1182)][n(535)],r[n(1348)],e||r[n(1348)]>=r[n(429)][n(226)]),i[n(1182)]=null,i!==this.fragmentedTracks[t]))break}}if(null!==this[n(1219)])for(t=0;t=r.samples[n(226)])&&(o.debug("ISOFile","Sending samples on track #"+c.id+n(705)+r[n(1348)]),this[n(1219)]&&this.onSamples(c.id,c[n(367)],c.samples),c[n(429)]=[],c!==this[n(847)][t]))break}}}},_.prototype[s(1395)]=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},_[s(1256)][s(1090)]=function(e,t){var r=[];return _._sweep[s(1092)](this,e,r,t),r},_._sweep=function(e,t,r){var n=s;for(var i in this[n(1147)]&&this[n(1147)]==e&&t[n(824)](this),this[n(258)]){if(t[n(226)]&&r)return;_[n(445)][n(1092)](this[n(258)][i],e,t,r)}},_[s(1256)].getTrackSamplesInfo=function(e){var t=s,r=this[t(1270)](e);return r?r[t(429)]:void 0},_[s(1256)][s(418)]=function(e,t){var r=s,n=this.getTrackById(e);return this[r(698)](n,t)},_[s(1256)][s(968)]=function(e,t,r){var n=s,i=this[n(1270)](e);i[n(393)]||(i[n(393)]=0);for(var o=i.lastValidSample;oe*i[a(1076)]){u=n-1;break}t&&i.is_sync&&(c=n)}for(t&&(u=c),e=r[a(429)][u][a(644)],r[a(1348)]=u;r[a(429)][u].alreadyRead===r.samples[u].size&&r[a(429)][u+1];)u++;return{offset:r.samples[u][a(1094)]+r[a(429)][u][a(1026)],time:e/o}},_.prototype[s(564)]=function(e){var t,r=s;return e[r(429)]?((t=e.samples[e.samples[r(226)]-1])[r(644)]+t[r(812)])/t[r(1076)]:1/0},_[s(1256)][s(740)]=function(e,t){var r,n,i,o=s,a=this.moov,c={offset:1/0,time:1/0};if(this[o(1060)]){for(i=0;ithis[o(564)](r)||((n=this[o(839)](e,t,r))[o(1094)]-1){u=l;break}switch(u){case t(894):if(o[t(1383)](t(880))[t(1300)](t(1087),0)[t(1300)](t(208),[0,0,0]),c[t(1300)]("width",r[t(538)])[t(1300)]("height",r[t(700)])[t(1300)](t(1190),72<<16)[t(1300)](t(517),72<<16)[t(1300)](t(1003),1)[t(1300)](t(523),r.type+t(794)).set(t(441),24),r.avcDecoderConfigRecord){var p=new(h[t(1140)]);p[t(279)](new a(r[t(691)])),c.addBox(p)}else if(r[t(1191)]){var m=new(h[t(245)]);m[t(279)](new a(r[t(1191)])),c.addBox(m)}break;case"Audio":o[t(1383)]("smhd")[t(1300)]("balance",r[t(989)]||0),c[t(1300)]("channel_count",r[t(1040)]||2).set(t(1274),r[t(1274)]||16)[t(1300)]("samplerate",r[t(1071)]||65536);break;case t(366):o[t(1383)](t(1290));break;case"Subtitle":if(o[t(1383)](t(199)),r[t(1147)]===t(1232))c.set(t(1341),r[t(1341)]||"nonamespace").set(t(358),r[t(358)]||"")[t(1300)]("auxiliary_mime_types",r[t(613)]||"");break;case t(844):o[t(1383)](t(412));break;case t(457):o.add(t(412));break;default:o[t(1383)](t(412))}r[t(417)]&&c[t(1242)](r[t(417)]),r[t(679)]&&r[t(679)][t(1286)]((function(e){c[t(1242)](e)})),o[t(1383)](t(475))[t(1383)]("dref")[t(1105)]((new(h[t(1220)]))[t(1300)](t(909),1));var v=o[t(1383)](t(566));return v.add(t(640)).addEntry(c),v[t(1383)](t(633))[t(1300)](t(513),[])[t(1300)](t(293),[]),v[t(1383)](t(328)).set(t(407),[])[t(1300)](t(780),[]).set(t(459),[]),v.add(t(1067))[t(1300)](t(1132),[]),v[t(1383)](t(1172))[t(1300)](t(1193),[]),this[t(1060)].mvex[t(1383)]("trex")[t(1300)]("track_id",r.id)[t(1300)]("default_sample_description_index",r.default_sample_description_index||1)[t(1300)](t(592),r.default_sample_duration||0).set(t(654),r[t(654)]||0)[t(1300)](t(766),r[t(766)]||0),this[t(387)](n),r.id}},h[s(170)].prototype.computeSize=function(e){var t=s,r=e||new c;r[t(321)]=c.BIG_ENDIAN,this[t(743)](r)},_[s(1256)][s(899)]=function(e,t,r){var n=s,i=r||{},o={},a=this.getTrackById(e);if(null!==a){o.number=a[n(429)][n(226)],o[n(664)]=a.tkhd[n(664)],o.timescale=a[n(1127)][n(870)][n(1076)],o[n(884)]=i[n(459)]?i[n(459)]-1:0,o[n(417)]=a.mdia[n(952)][n(566)].stsd[n(307)][o[n(884)]],o.data=t,o.size=t[n(424)],o[n(1026)]=o[n(1030)],o[n(812)]=i.duration||1,o[n(644)]=i.cts||0,o.dts=i[n(347)]||0,o[n(954)]=i[n(954)]||!1,o.is_leading=i[n(1100)]||0,o[n(1210)]=i[n(1210)]||0,o[n(1205)]=i[n(1205)]||0,o[n(807)]=i[n(807)]||0,o[n(1054)]=i[n(1054)]||0,o[n(1094)]=0,o[n(1035)]=i[n(1035)],a.samples.push(o),a[n(767)]+=o.size,a.samples_duration+=o[n(812)],void 0===a[n(853)]&&(a[n(853)]=i[n(347)]),this.processSamples();var c=this.createSingleSampleMoof(o);return this[n(1242)](c),c.computeSize(),c[n(1049)][0][n(895)][0][n(298)]=c[n(1030)]+8,this[n(1383)](n(1289))[n(715)]=new Uint8Array(t),o}},_[s(1256)].createSingleSampleMoof=function(e){var t=s,r=0;r=e[t(954)]?1<<25:65536;var n=new(h[t(1245)]);n.add(t(911))[t(1300)](t(176),this[t(810)]),this.nextMoofNumber++;var i=n[t(1383)](t(1181)),o=this.getTrackById(e.track_id);return i[t(1383)]("tfhd")[t(1300)]("track_id",e[t(664)])[t(1300)](t(909),h.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i[t(1383)](t(230)).set(t(849),e[t(347)]-(o.first_dts||0)),i[t(1383)](t(1033))[t(1300)]("flags",h.TRUN_FLAGS_DATA_OFFSET|h[t(473)]|h[t(720)]|h[t(1063)]|h.TRUN_FLAGS_CTS_OFFSET)[t(1300)](t(298),0)[t(1300)](t(963),0)[t(1300)](t(381),1)[t(1300)](t(1388),[e.duration])[t(1300)](t(365),[e[t(1030)]])[t(1300)](t(1142),[r]).set(t(800),[e[t(644)]-e[t(347)]]),n},_.prototype[s(969)]=0,_[s(1256)][s(390)]=0,_.prototype.resetTables=function(){var e,t,r,n,i,o,a=s;for(this[a(1134)]=this.moov[a(578)][a(812)],this[a(1060)][a(578)][a(812)]=0,e=0;e=2&&(u=i[a][l(672)]+"/0",(c=new d(i[a].grouping_type,0)).is_fragment=!0,!t.sample_groups_info[u]&&(t[l(1007)][u]=c))}else for(a=0;a=2&&(u=n[a][l(672)]+"/0",c=new d(n[a][l(672)],0),!e.sample_groups_info[u]&&(e[l(1007)][u]=c))},_[s(337)]=function(e,t,r,n){var i,o,a=s;for(i in t[a(1117)]=[],n){var c;if(t[a(1117)][i]={},t[a(1117)][i].grouping_type=n[i][a(672)],t[a(1117)][i].grouping_type_parameter=n[i][a(816)],r>=n[i][a(1106)]&&(n[i][a(1106)]<0&&(n[i][a(1106)]=0),n[i][a(488)]++,n[i][a(488)]<=n[i][a(560)].entries[a(226)]-1&&(n[i][a(1106)]+=n[i].sbgp[a(307)][n[i][a(488)]][a(381)])),n[i][a(488)]<=n[i][a(560)][a(307)][a(226)]-1?t.sample_groups[i][a(551)]=n[i][a(560)].entries[n[i][a(488)]][a(551)]:t[a(1117)][i].group_description_index=-1,0!==t[a(1117)][i][a(551)])c=n[i].fragment_description?n[i][a(666)]:n[i][a(417)],t.sample_groups[i].group_description_index>0?(o=t[a(1117)][i][a(551)]>65535?(t[a(1117)][i][a(551)]>>16)-1:t[a(1117)][i][a(551)]-1,c&&o>=0&&(t[a(1117)][i][a(417)]=c[a(307)][o])):c&&c.version>=2&&c[a(917)]>0&&(t.sample_groups[i][a(417)]=c[a(307)][c[a(917)]-1])}},_[s(730)]=function(e,t,r){var n=s;t&&(e?(t[n(1100)]=e[n(1100)][r],t[n(1210)]=e[n(315)][r],t.is_depended_on=e[n(1358)][r],t[n(807)]=e[n(1251)][r]):(t.is_leading=0,t.depends_on=0,t[n(1205)]=0,t[n(807)]=0))},_[s(1256)][s(1066)]=function(){var e,t,r=s;for(e=0;eb&&(w++,b<0&&(b=0),b+=o.sample_counts[w]),t>0?(e[C(429)][t-1][C(812)]=o.sample_deltas[w],e[C(1196)]+=e[C(429)][t-1].duration,x[C(347)]=e[C(429)][t-1].dts+e.samples[t-1][C(812)]):x[C(347)]=0,a?(t>=S&&(I++,S<0&&(S=0),S+=a.sample_counts[I]),x[C(644)]=e[C(429)][t][C(347)]+a[C(1197)][I]):x[C(644)]=x[C(347)],c?(t==c[C(747)][A]-1?(x[C(954)]=!0,A++):(x[C(954)]=!1,x[C(1054)]=0),l&&l[C(307)][E][C(1053)]+k==t+1&&(x[C(1035)]=l[C(307)][E][C(1035)],k+=l[C(307)][E].sample_delta,E++)):x.is_sync=!0,_[C(730)](e.mdia[C(952)][C(566)][C(1192)],x,x[C(1072)]),f?x[C(1054)]=f.priority[t]:x.degradation_priority=0,l&&l[C(307)][E][C(1053)]+k==t&&(x[C(1035)]=l[C(307)][E][C(1035)],k+=l[C(307)][E][C(1053)]),(d[C(226)]>0||h[C(226)]>0)&&_[C(337)](e,x,t,e[C(1007)])}t>0&&(e[C(429)][t-1][C(812)]=Math[C(483)](e[C(1127)][C(870)].duration-e[C(429)][t-1][C(347)],0),e.samples_duration+=e.samples[t-1][C(812)])}},_[s(1256)][s(485)]=function(){var e,t,r,n,i,o,a,c,u,l,d,f,p,m,v,y=s;if(void 0!==this[y(1060)])for(;this[y(969)]0&&_[y(310)](f,d,d[y(1227)],f[y(1127)][y(952)][y(566)][y(748)],d[y(748)]),t=0;t0?m[y(347)]=f[y(429)][f[y(429)][y(226)]-2][y(347)]+f[y(429)][f[y(429)][y(226)]-2][y(812)]:(d[y(230)]?m.dts=d[y(230)].baseMediaDecodeTime:m.dts=0,f[y(1305)]=!0),m[y(644)]=m[y(347)],g[y(909)]&h[y(661)]&&(m[y(644)]=m[y(347)]+g.sample_composition_time_offset[r]),v=a,g.flags&h[y(1063)]?v=g[y(1142)][r]:0===r&&g.flags&h[y(1150)]&&(v=g.first_sample_flags),m[y(954)]=!(v>>16&1),m[y(1100)]=v>>26&3,m.depends_on=v>>24&3,m[y(1205)]=v>>22&3,m.has_redundancy=v>>20&3,m[y(1054)]=65535&v;var b=!!(d[y(172)][y(909)]&h[y(1184)]),w=!!(d[y(172)].flags&h[y(268)]),S=!!(g[y(909)]&h[y(1180)]),I=0;I=b?d[y(172)][y(1148)]:w?l[y(426)]:0===t?l.start:c,m[y(1094)]=0===t&&0===r?S?I+g[y(298)]:I:c,c=m.offset+m[y(1030)],(d.sbgps[y(226)]>0||d[y(748)][y(226)]>0||f[y(1127)][y(952)][y(566)][y(1227)][y(226)]>0||f.mdia[y(952)][y(566)][y(748)][y(226)]>0)&&_[y(337)](f,m,m[y(1367)],d.sample_groups_info)}}if(d[y(1045)]){f[y(955)]=!0;var A=d.first_sample_index;for(t=0;t-1))return null;var u=(r=this.stream[n(1281)][a])[n(424)]-(i[n(1094)]+i[n(1026)]-r[n(761)]);if(i.size-i[n(1026)]<=u)return o[n(680)](n(1141),n(1154)+t+n(586)+i[n(1026)]+" offset: "+(i[n(1094)]+i[n(1026)]-r[n(761)])+n(477)+(i[n(1030)]-i.alreadyRead)+n(385)+i.size+")"),c[n(751)](i.data.buffer,i[n(1026)],r,i.offset+i[n(1026)]-r[n(761)],i.size-i[n(1026)]),r[n(1046)]+=i.size-i[n(1026)],this[n(1128)][n(489)](),i.alreadyRead=i[n(1030)],i;if(0===u)return null;o[n(680)](n(1141),"Getting sample #"+t+" partial data (alreadyRead: "+i[n(1026)]+" offset: "+(i[n(1094)]+i.alreadyRead-r[n(761)])+n(477)+u+n(385)+i[n(1030)]+")"),c[n(751)](i[n(715)][n(535)],i[n(1026)],r,i[n(1094)]+i[n(1026)]-r.fileStart,u),i[n(1026)]+=u,r[n(1046)]+=u,this[n(1128)][n(489)]()}},_.prototype[s(789)]=function(e,t){var r=s,n=e[r(429)][t];return n[r(715)]?(this[r(390)]-=n[r(1030)],n[r(715)]=null,n.description=null,delete n.degradation_priority,delete n[r(1210)],delete n[r(884)],delete n.has_redundancy,delete n[r(1205)],delete n.is_leading,delete n[r(954)],delete n[r(646)],delete n[r(1367)],delete n[r(1076)],delete n[r(644)],delete n[r(347)],delete n[r(1094)],delete n.size,delete n.track_id,delete n[r(812)],n.alreadyRead=0,n[r(1030)]):0},_[s(1256)][s(1304)]=function(){return this[s(390)]},_[s(1256)][s(1291)]=function(){var e=s;const t=this[e(1128)][e(1281)]||[];let r=0;return t[e(1286)]((e=>{const t=e.byteLength;r+=t})),r},_[s(1256)][s(1269)]=function(){var e,t=s,r="";for(e=0;e0&&(r+=","),r+=this.moov[t(866)][e][t(1127)][t(952)][t(566)][t(640)][t(307)][0][t(1041)]()}return r},_.prototype[s(280)]=function(e){var t,r=s;if(!this[r(1060)]||!this[r(1060)][r(553)])return null;for(t=0;t0&&(r[n(185)]=a[n(269)].protections[a[n(518)][n(651)][e][n(805)]-1]),a.iinf[n(651)][e][n(267)]?r[n(1147)]=a.iinf[n(651)][e].item_type:r.type="mime",r[n(1313)]=a[n(518)][n(651)][e][n(1313)],r[n(371)]=a[n(518)][n(651)][e].content_encoding;if(a[n(233)])for(e=0;e0&&f[n(966)]-1-1))return null;var l=(t=this.stream.buffers[u]).byteLength-(a[n(1094)]+a[n(1026)]-t[n(761)]);if(!(a[n(226)]-a[n(1026)]<=l))return o[n(680)](n(1141),"Getting item #"+e+n(221)+i+n(1138)+a[n(1026)]+n(753)+(a[n(1094)]+a[n(1026)]-t[n(761)])+n(477)+l+" full extent size: "+a[n(226)]+" full item size: "+r.size+")"),c[n(751)](r.data[n(535)],r[n(1026)],t,a[n(1094)]+a[n(1026)]-t[n(761)],l),a.alreadyRead+=l,r[n(1026)]+=l,t.usedBytes+=l,this[n(1128)][n(489)](),null;o[n(680)]("ISOFile","Getting item #"+e+n(221)+i+n(586)+a[n(1026)]+" offset: "+(a[n(1094)]+a[n(1026)]-t[n(761)])+n(477)+(a[n(226)]-a.alreadyRead)+" full extent size: "+a[n(226)]+n(458)+r[n(1030)]+")"),c[n(751)](r[n(715)].buffer,r.alreadyRead,t,a[n(1094)]+a[n(1026)]-t[n(761)],a[n(226)]-a[n(1026)]),t[n(1046)]+=a[n(226)]-a[n(1026)],this[n(1128)][n(489)](),r.alreadyRead+=a[n(226)]-a[n(1026)],a.alreadyRead=a[n(226)]}}return r[n(1026)]===r[n(1030)]?r:null},_.prototype[s(576)]=function(e){var t=s,r=this.items[e];if(r.data){this.itemsDataSize-=r.size,r[t(715)]=null,r[t(1026)]=0;for(var n=0;n0?this[i(1060)][i(866)][e][i(429)][0][i(812)]:0),t[i(824)](n)}return t},_[s(1256)][s(778)]=function(){var e=s,t={};return t.moov=this[e(1060)],this.moov&&this.moov.traks&&this[e(1060)][e(866)][e(226)]>1&&(t[e(582)]=this[e(1060)][e(866)][0][e(429)][e(226)],t.moovVideoNum=this[e(1060)][e(866)][1][e(429)].length),t},h[s(170)][s(1256)][s(768)]=function(e){var t=s;this[t(1030)]+=8,this[t(1030)]>u&&(this[t(1030)]+=8),"uuid"===this[t(1147)]&&(this[t(1030)]+=16),e[t(470)](e[t(544)]+"size:"+this[t(1030)]),e[t(470)](e[t(544)]+t(571)+this.type)},h[s(941)].prototype[s(768)]=function(e){var t=s;this[t(1030)]+=4,h[t(170)][t(1256)][t(768)][t(1092)](this,e),e[t(470)](e.indent+t(902)+this[t(1188)]),e[t(470)](e.indent+t(563)+this[t(909)])},h[s(170)][s(1256)][s(1115)]=function(e){this[s(768)](e)},h[s(935)][s(1256)].print=function(e){var t=s;this[t(768)](e);for(var r=0;r>8)),e[t(470)](e[t(544)]+t(389)+this[t(1315)][t(178)](", ")),e.log(e.indent+"next_track_id: "+this[t(1234)])},h[s(615)][s(1256)][s(1115)]=function(e){var t=s;h[t(941)][t(1256)][t(768)][t(1092)](this,e),e[t(470)](e[t(544)]+t(1019)+this[t(1273)]),e[t(470)](e[t(544)]+"modification_time: "+this[t(543)]),e[t(470)](e[t(544)]+t(1047)+this[t(664)]),e[t(470)](e[t(544)]+t(695)+this.duration),e[t(470)](e[t(544)]+t(1112)+(this[t(193)]>>8)),e[t(470)](e[t(544)]+t(389)+this.matrix.join(", ")),e[t(470)](e[t(544)]+t(681)+this[t(984)]),e[t(470)](e[t(544)]+"alternate_group: "+this[t(728)]),e.log(e[t(544)]+t(1327)+this[t(538)]),e[t(470)](e.indent+"height: "+this[t(700)])};var g={};g[s(665)]=function(e,t){var r=s,n=void 0===e||e,i=new _(t);return i[r(1001)]=!n,i},"object"!==s(1268)&&(t[s(665)]=g[s(665)])}));function Eo(e,t){var r=ko();return(Eo=function(e,t){return r[e-=155]})(e,t)}function ko(){var e=["isHint","avll","getDurationString","stsh","parseUUID","getPrimaryItem","Not enough data in stream to parse the type and size of the box","writeFloat64Array","updateUsedBytes","name","general_profile_idc","layer","num_leading_samples_known","Per_Sample_IV_Size","numMetadataBlocks","MPEG4DescriptorParser","balance","parseHeader","decode","uuid","readCString","hdr_size","stream_read_1_bytes","writeUCS2String","stereo_indication_type","nalu","string","ssix","discardMdatData","writeUint16Array","frame_count","av01","sync","rtpmap_string","sample_groups_info","traf_number","bits_per_channels","trex","parseOneBox","component_bit_depth_minus_one","PreSkip","tenc","default_sample_info_size","sampleListBuilt","bad_pixel_row","bytessent","creation_time: ","packetssent","getItem","default_AlgorithmID","seq_profile"," stored buffer(s) (","isEof","alreadyRead","nbSamples","7eIxedc","_realloc","size","createUUIDBox","kinds","trun","Buffer must be defined and non empty","subsamples","CONTAINER_BOXES","bytes","num_held_bits","parseLanguage","channel_count","getCodec","OCR_ES_ID","nb_SPS_nalus","PPS","subs","usedBytes","track_id: ","ipco","trafs","attribute_list"," of size: ","chunk_index","sample_delta","degradation_priority","readInt8","getTime","minimum_bitrate","cmin","vvcN","moov","avc4SampleEntry","writeUint32","TRUN_FLAGS_FLAGS","<","elngBox","buildSampleLists","stco","urn Box","readUint64","twelve_bit","samplerate","number","avc2SampleEntry","LiveServerManifest","bit_depth_luma_minus8","timescale","writeFloat32Array","accurateStatisticsFlag","layer_id","readySent","codec_specific_parameters","SingleItemTypeReferenceBox","SEEKTABLE","acmod","a1op","media_time","graphicsmode","switch_group","writeInitializationSegment","getBoxes","chunk_run_index","call","media_rate_integer","offset","irot","getMetaHandler","component_type_urls","addSubBoxArrays","item_count","is_leading","ERR_NOT_ENOUGH_DATA","configurationVersion","setUint16","entry_count","addEntry","last_sample_in_run","createSampleEntryCtor","maxr","fragment_duration","general_constraint_indicator","readInt16","volume: ","u16stringbe","int32be","print","writeInt32Array","sample_groups","skip_byte_block","language","float64le","parseFromString","Log","setFloat32","dac3","d08a4f1810f34a82b6c832d8aba183d3","base_offset_size","mdia","stream","mime_format","writeFloat32","iods","chunk_offsets","payt","initial_duration","TrackGroupTypeBox","function","getInt16"," partial data (alreadyRead: ","saiz","avcCBox","ISOFile","sample_flags","skew_factor","is_fragment","primaryGChromaticity_y","group_id","type","base_data_offset","aux_subtype","TRUN_FLAGS_FIRST_FLAG","enct","UUIDs","ctts","Getting sample #","mha1","processIncompleteMdat","hasMoov","ChannelMappingFamily","mapInt32Array","XMLSubtitlein4Parser","avgBitrate","LITTLE_ENDIAN","hdlr","colourPrimaries","sampleEntryCodes","parseFullHeader","general_sub_profile_idc","metadata","stppSampleEntry","component_little_endian","_size","stsz","failurePosition","codec","length_size_of_trun_num","unpack","writeUint8","writeUint64","int16","TRUN_FLAGS_DATA_OFFSET","traf","segmentStream","], [","TFHD_FLAG_BASE_DATA_OFFSET","getSampleSize","readFloat64Array","parseConfig","version","DecoderConfigDescriptor","horizresolution","hevcDecoderConfigRecord","sdtp","sample_sizes","quat_y","track_height","samples_duration","sample_offsets","TFHD_FLAG_SAMPLE_SIZE","levels","mapInt8Array","max_display_mastering_luminance","free","No method for reading signed 64 bits values","SAP_delta_time","is_depended_on","track_ids","extended_language","appendBuffer","vvi1SampleEntry","depends_on","checkBuffer","constant_IV_size","stsa","shift","num_bad_cols","isMetadata","avs3","tmin","onSamples","url Box","channel_associations","itemListBuilt","8974dbce7be74c5184f97148f9882554","mvhdBox","mskC","altr","sbgps","bsid","scif","stream_read_2_bytes","first_sample_index","stpp","Removing buffer #","next_track_id","STREAMINFO","createObjectURL","Stream ready for parsing","smhd","TrackReferenceTypeBox","default_sample_description_index","pos_x","addBox","MultiBufferStream","chroma_subsampling_x","moofBox","getUint32","cdef","av01SampleEntry","languageString","dec3","sample_has_redundancy","dynamicSize","av1C","nump","mjp2","prototype","imir","splice","slid","has_unparsed_data","&"," f=","priority","getUint16","boxCodes","bad_rows","msrc","undefined","getCodecs","getTrackById","stscBox","extension_type","creation_time","samplesize","reduceBuffer","movie_timescale","item_id","scheme_type","udes","system_id","buffers","clli","nativeToEndian","mapUint8Array","FULL_BOXES","forEach","kid","uint32le","mdat","hmhd","getStreamBufferSize","createEntityToGroupCtor","greatestDecodeToDisplayDelta","num_dep_sub","sidx","nalu_arrays","encv","BYTES_PER_ELEMENT","initial_presentation_delay_present","set","vvnC","general_constraint_info","sbtt","getAllocatedSampleDataSize","first_traf_merged","hev1SampleEntry","transfer_characteristics","discard_priority","test","lang","readFloat32","iprp","content_type","getHeight","matrix","reserved_1","mdatBox","_dataView","DataStream.save: Can't create object URL.","ref_to","writeInt8Array","InputSampleRate","processIncompleteBox","unsetExtractionOptions","mdats","encode","width: ","code","ES_ID","writeInt32","document","APPLICATION","lsel","findPosition","elst","movie_duration","hSpacing","first_offset","major_brand","init","namespace","createEncryptedSampleEntryCtor","moovStartSent","setExtractionOptions","ES_Descriptor","Found box of type '","vertOffN","nextSample","whitePointChromaticity_x","createTrackGroupCtor","hdlrBox","profile","favc","isSubtitle","setFloat64","co64","restoreParsePosition","sample_is_depended_on",">","lengthSizeMinusOne","stxtSampleEntry","available_bitrate","references","auxC","vp09","num_bytes_constraint_info","number_in_traf","saveParsePosition","cttsBox","bg_color_rgba","bit_rate_code","BoxWriter","sample_number","a1lx","kindBox","ols_idx","max_ref_per_pic","subSeqDirectionFlag","transferFunction","floor","parseRemainingDescriptors","items","add","compatible_brands","ipmas","writeUint8Array","range_size","sample_duration","stdp","min","audio","readUint32Array","ftypBox","component_index","getBox","setUint8","otherTracks","row_align_size","SAMPLE_ENTRY_TYPE_SYSTEM","period","lfeon","notice","sub_track_id","source","createFullBoxCtor","a5d40b30e81411ddba2f0800200c9a66","crypt_byte_block","referenced_size","bufferIndex","onSegment","Box","seekLists","tfhd","isFragmented","getEndPosition","ac-4","sequence_number","mehd","join","avgBitRate","colr","1132480LDlgXE","Generating initialization segment","block_size","getOTI","protection","error","strk","cleanApertureWidthD","SampleGroupEntry","writeCString","offset_size","readFloat64","volume","length_size","metx","stssBox","DIFF_BOXES_PROP_NAMES","VisualSampleEntry","sthd",'audio/mp4; codecs="',"MP4Box","itemsDataSize","ASCII","createContainerBoxCtor","data_format","presentation_time_delta","ranges","opcolor","readInt method not implemented for size: ","modification_time: ","int16be","stri","TFHD_FLAG_SAMPLE_DUR","avc4","aux_info_type","dataView","28512nAeEUJ","description_length","ArrayBuffer","lastBoxStartPosition"," extent #","equal","Writing box "," of size ","quat_z","length","extent_index","dav1","writeType","tfdt","SAMPLE_ENTRY_TYPE_METADATA","index_size","grpl","processSamples","pitm","SAMPLE_ENTRY_TYPE_HINT","moof","CoupledCount","warn","single_view_allowed","SAMPLE_ENTRY_TYPE_AUDIO"," with new size ","readAnyInt","reserved_2","hvcCBox","[row: ",", column: ","readUint16Array","nextSeekPosition","hvcC","num_bad_rows","aebr","senc","tag","reference_type","moovBox","vide","boxes","tags","time","mdhdBox","mapFloat32Array","profile_compatibility","writeUint16","Not enough bytes in buffer","shadowed_sample_numbers","item_type","TFHD_FLAG_DEFAULT_BASE_IS_MOOF","ipro","video","mime","dependsOn_ES_ID","initial_delay","onSidx","Exporting on track #","scheme_version","isProtected","MP4BoxStream","parse","getTrexById"," on track #","mjpg","hasIncompleteMdat","vvcC","entity_ids","whitePointChromaticity_y","stvi","u16stringle","readUint8Array","bits_per_pixel","pad_unknown","Needs an array buffer","sample_deltas","destroy","Position ","display_primaries","vp09SampleEntry","data_offset","rap ","sdptext","quat_x","fiel","save","length_size_of_traf_num","_dynamicSize","setNextSeekPositionFromSample","entries","ext","mett","initSampleGroups","fragmentedTracks","tmax","cleanApertureHeightD","default_constant_IV_size","sample_depends_on","Descriptor ","config","constant_IV","intra_pred_used","avss","endianness","tsyn","Text","3062UcfCWf","getInfo","scnm","parseFooter","stsc","NAL_unit_type","Textin4Parser","j2kH","style_record","trak","Not enough bytes left in the parent box to parse a new box","videoFullRangeFlag","1438408nytSnm","setSampleGroupProperties","setAttribute","TFHD_FLAG_SAMPLE_FLAGS","byteOffset","pmax","indexOf","setUint32","iso4","data_reference_index","text","dts","createMediaSampleEntryCtor","ispe","mhm2","readInt8Array","hasItem","primaryBChromaticity_y","isAudio","nextParsePosition","d4807ef2ca3946958e5426cb9e46a79f","emsg","schema_location","trun_number","default_KID","uncC","documentString","parseHex16","colorSpace","sample_size","Hint","user","bxml","Creating media fragment on track #","pssh","content_encoding","construction_method","uint32","oti","stereo_scheme","clap","item_name","iaug","getDescriptorName","kind","sample_count","block_pad_lsb","block_little_endian","resources"," full size: ","stszBox","buildTrakSampleLists","vttc","matrix: ","samplesDataSize","principal_point_x","ptl_frame_only_constraint","lastValidSample","used","payl","sample_rate","Subtitle","codecIntializationDataSize","removeUsedSamples","entity_groups","completeness","j2ki","seq_tier_0","extent_length","nb_samples","temporalIdNested","first_chunk","num_ind_sub","defineProperty","iloc","item_ID","nmhd","alst","adjustUint32","writeUint24","' and size ","description","getTrackSample","frma","hintTracks","Found Sample Groups of type ","substring","vttC","byteLength","ec-3","start"," --\x3e ","lhe1","samples","descriptionformat","mapInt16Array","stshBox","findEndContiguousBuf","default_constant_IV","parsingMdat","schemeURI","writeInt8","getInt8","pos_y","image_height","depth","onReady","padbits","onMoovStart","_sweep","presentation_time","onError","general_level_idc"," - Length: ","writeFooter","essential","dref","saio","sgpd","media_duration","seekPoints","System"," full item size: ","sample_description_index","monochrome","bad_columns","readString","addUsedBytes","aux_type","pos_z",'"; profiles="',"streamType","roll_distance","fieldCount","log","sample_info_size","tele","TRUN_FLAGS_DURATION","sgpdBox","dinf","correction_applied"," read size: ","max_picture_width","BASIC_BOXES","concat","first_output_sample","BIG_ENDIAN","max","numTemporalLayers","updateSampleLists","writeInt16Array","created","entry_index","logBufferLevel","arrayToNative","avc2","sent","sublayer_level_idc","cleanBuffers","held_bits","_byteOffset","leastDecodeToDisplayDelta","Found ","boxEqual","edts","stop","getLength","discardable","vertOffD","createFragment","resetTables","stsg","num_total_samples","brands","URL","reference_ID","parseSample","sample_counts","tfra","Error reading base offset size","dependency","vertresolution","iinf","SPS","KID","subtitles"," v=","compressorname","transferCharacteristics","properties","a2394f525a9b4f14a2446c427c648df4","scheme_id_uri","sampleProcessingStarted","num_channels","SampleEntry","absolute_time","sbpm","mapUint16Array","replace","buffer","Track created with MP4Box.js","DecoderSpecificInfo","width","rate","sidxBox","getFloat32","vvi1","modification_time","indent","ster","Found position in existing buffer #","elng","target","readUint16","appendChild","group_description_index","processItems","mvex","strd","maxFALL","hvt1","hasIOD","clef","slice","sbgp","dOps","Found 'mdat' end in buffered data","flags:","getTrackDuration","esd","stbl","parseOneDescriptor","SAP_type","extents","Cannot seek: moov not received!","type:","createCommonjsModule","172gqDFAy","tkhd","colour_type","releaseItem","parallelismType","mvhd","message_data","seq_level_idx_0","VORBIS_COMMENT","moovAudioNum","num_entities_in_group","cprt","avg_frame_rate"," data (alreadyRead: ","Error reading extent index","flush","media_rate_fraction","layer_size","displayFlags","default_sample_duration","addTrack","default_skip_byte_block","TKHD_FLAG_IN_PREVIEW","cmpd","luminanceMin","sttsBox","u16string","avcC","dvhe","scheme_uri","initial_presentation_delay_minus_one","nalu_type","tscl",", size ","ipma","prft","padb","ac-3","fscod","TKHD_FLAG_IN_MOVIE","auxiliary_mime_types","chroma_format_idc","tkhdBox","stz2","chromaSubsampling","readInt32","dmax","step_count","DataStream","avc3SampleEntry","pixel_size","avc1","StreamCount","constant_frame_rate","77520qbntbv","starts_with_SAP","avgFrameRate","uint8","readUint24","component_format","stts","version of iloc box not supported","ptl_present_flag","padding_flag","audioTracks","drep","prol","stsd","high_bitdepth","Error accessing position in the MultiBufferStream","tapt","cts","subsegments","moof_number","click","_self","decimalToHex","boxEqualFields","item_infos","vpcC","vSpacing","default_sample_size","meta","tsel","parseDataAndRewind","trunBox","end","CUESHEET","TRUN_FLAGS_CTS_OFFSET","flattenItemInfo","idat","track_id","createFile","fragment_description","track_width","fromCharCodeUint8","enca","compositionStartTime","No method for reading signed 24 bits values","grouping_type","default_isProtected","min_spatial_segmentation_idc","sync_sample_numbers","isEos",'application/mp4; codecs="',"mfra","description_boxes","debug","layer: ","uri ","readInt16Array","wvtt","stxt","base_offset","writeString","readInt32Array","from_item_ID","SLConfigDescriptor","avcDecoderConfigRecord","findDescriptor","aux_info_type_parameter","nb_PPS_nalus","duration: ","brst","Audio","getSample","constantFrameRate","height","default_Per_Sample_IV_Size","createBoxCtor","bad_pixel_column","UUIDBoxes"," for sample ","getWidth","track_ID","associations","ftyp","Adjusting box ","modified","absolute_duration","getEndFilePositionAfter","url ","data","subSequenceIdentifier","compositionToDTSShift","19930wNshJH","sizePosition","TRUN_FLAGS_SIZE","TFHD_FLAG_DUR_EMPTY","subsegment_duration","BoxParser","getPosition","durationFlag","box","mp4aSampleEntry","alternate_group","esds","process_sdtp","moofs","component_align_size","SAMPLE_ENTRY_TYPE_VISUAL","trep","data_offset_position","SmDm","toString","TFHD_FLAG_SAMPLE_DESC","ref_track_id","seek","tracks","DIFF_PRIMITIVE_ARRAY_PROP_NAMES","write","apply","item_uri_type","location","sample_numbers","sgpds","createSingleSampleMoof","_byteLength","memcpy","setInt16"," offset: ","mvif","afbr","num_sublayers","default_length","assignment_type","iref","hvc1SampleEntry","fileStart","float32le","moovStartFound","rapAlignement","vvs1","default_sample_flags","samples_size","printHeader","AVCLevelIndication","bit_depth_chroma_minus8","udta","OutputChannelCount","btrt","vp08SampleEntry","getUint8","channel_indexes","avc1SampleEntry","getPerformanceInfo","isFragmentationInitialized","samples_per_chunk","tyco","_buffer","getText","num_output_samples","general_profile_space","tfdtBox","avc3","SingleItemTypeReferenceBoxLarge","releaseSample","object","float32be","int16le","level"," Compressor","href","vvc1SampleEntry","descs","unsetSegmentOptions","upStream","sample_composition_time_offset","charCodeAt","und","AVCProfileIndication","matrixCoefficients","protection_index","avgRateFlag","has_redundancy","length_size_of_sample_num","trgr","nextMoofNumber"," sample #","duration","minor_version","readInt64","principal_point_y","grouping_type_parameter","maxBitrate","6d1d9b0542d544e680e2141daff757b2","dataview","ptl_num_sub_profiles","setAllUsedBytes","num_bad_pixels","meco","push","subtitleTracks","extract_bits","pdin","earliest_presentation_time","fromCharCode","vertical_justification","tpay","vvc1","prgr","AudioSampleEntry","getChannelCount","Allocating item #","Buffer must have a fileStart property","styp","seekTrack","op_index","itemId","ChannelMapping","item_protection_index","Metadata","mapUint32Array","props","extractedTracks","writeHeader","baseMediaDecodeTime","mapFloat64Array","Descriptor","image_width","first_dts","bitDepth","elstBox","bufferSize","18wvfwSQ","(empty)","stss","readUint32","createSampleGroupCtor","maxCLL","createElement","hnti","_trimAlloc","traks","general_tier_flag","num_leading_samples"," (total: ","mdhd","isProgressive","operation_point_count","prdi","field_size","1279362bcbXjQ","moof_offset","event_duration","sinf","segment_duration","vmhd","Not enough bytes left in the parent box to parse a UUID box","readUint","initialized","description_index","hev1","ntp_timestamp","setSegmentOptions","body","cmex","enof","track_group_id","writeUint32Array","tref","Visual","truns","fragment_count","dobr","sidxSent","addSample","getSampleRate","cslg","version:","component_count","primaryRChromaticity_x","writeInt16","reserved","metadataTracks","extent_offset","flags","white_point","mfhd","Concatenating buffer for box parsing (length: ","subBoxNames","videoTracks","setInt32","position","default_group_description_index","value","writeFloat64","codecIntializationData","cleanApertureHeightN","focal_length_x","pixi","rICC","fobr","pow","RESERVED","insertBuffer","primaryGChromaticity_x","SAMPLE_ENTRY_TYPE_SUBTITLE","readUint8","layerNumber","trexs","isVideo","ContainerBox","num_tile_cols_minus_one","Appending new buffer (fileStart: ","flipArrayEndianness","encs","getAudioConfig","FullBox","prof","schi","chan_loc","ptl_sublayer_present_mask","component_types",'video/mp4; codecs="',"SAMPLE_ENTRY_TYPE_TEXT","mergeNextBuffer","info"," at position ","minf","handler","is_sync","has_fragment_subsamples","writeStruct","bit_depth_minus8","tsas","primaryRChromaticity_y","float64be","nclx","pasp","first_sample_flags","focal_length_y","bad_pixels","property_index","ind_subs","releaseUsedSamples","lastMoofIndex","cleanApertureWidthN","albc","PICTURE"];return(ko=function(){return e})()}function Co(e,t){const r=Do();return(Co=function(e,t){return r[e-=192]})(e,t)}Ao[Io(1122)],Ao[Io(278)],Ao[Io(621)],Ao[Io(1243)],Ao.MPEG4DescriptorParser,Ao.BoxParser,Ao.XMLSubtitlein4Parser,Ao[Io(330)],Ao[Io(1141)],Ao[Io(665)];const xo=Co;function To(e){return e[Co(230)](((e,t)=>256*e+t))}function Bo(e){const t=Co,r=[101,103,119,99],n=e[t(224)]-28,i=e[t(202)](n,n+r[t(224)]);return r[t(233)](((e,t)=>e===i[t]))}!function(e,t){const r=Co,n=e();for(;;)try{if(222746===parseInt(r(193))/1+-parseInt(r(203))/2+-parseInt(r(225))/3*(parseInt(r(229))/4)+parseInt(r(208))/5*(parseInt(r(210))/6)+-parseInt(r(223))/7*(-parseInt(r(214))/8)+parseInt(r(218))/9*(-parseInt(r(212))/10)+parseInt(r(213))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Do);xo(209),xo(226);function Do(){const e=["length","419535AfbgUT","transport","debugWarn","instance","12lTwfYH","reduce","TAG_NAME","parse","every","catch","reverse","not support wasm","383529pouLBa","init","buffer","TransportDescrambler","function","Memory","memory","byteLength","set","slice","564220OCjdNe","exports","wasm not supported","debuglog","player","170YXMIMB","destroy","41754saNobk","map","14360ORxlAv","292127XGZrat","2279032GjraCk","object","then","Module","45AXjiNG","Instance","init error","instantiate","debugLog","7lqRIoR"];return(Do=function(){return e})()}function Mo(){const e=Uo;for(var t=arguments[e(391)],r=new Array(t),n=0;n{const n=e,s=new i((0|t[n(381)])+(0|r.byteLength));return s[n(394)](t,0),s[n(394)](r,0|t[n(381)]),s}),new i)}function Uo(e,t){const r=Po();return(Uo=function(e,t){return r[e-=381]})(e,t)}function Po(){const e=["replace","5675424NeHzeO","hexStringToUint8Array: invalid hexString length, must be even and bexString length is: ","toString","byteLength","2469411yfYCRR","substr","padStart","reduce","5204ZWLkhB","34779602elRqpz","constructor","8ZrAMWk","10urcqEw","length","120EVcfMU","1205gIgpOK","set","7272477BRZXKy","437003JfyAnO","error","90926TMyChd"];return(Po=function(){return e})()}!function(e,t){const r=Uo,n=e();for(;;)try{if(587114===parseInt(r(398))/1*(-parseInt(r(389))/2)+-parseInt(r(382))/3+-parseInt(r(386))/4*(parseInt(r(393))/5)+-parseInt(r(400))/6+-parseInt(r(396))/7*(parseInt(r(392))/8)+parseInt(r(395))/9*(parseInt(r(390))/10)+parseInt(r(387))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Po),function(e,t){const r=Jo,n=e();for(;;)try{if(343540===parseInt(r(136))/1+-parseInt(r(124))/2*(parseInt(r(117))/3)+parseInt(r(107))/4*(parseInt(r(128))/5)+parseInt(r(125))/6+-parseInt(r(132))/7+parseInt(r(116))/8+-parseInt(r(108))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Xo);const Fo=16,Ro=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Lo=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Oo(e){const t=Jo,r=[];for(let n=0,i=e[t(115)];n{const r=t;return 1===(e=e[r(110)](16))[r(115)]?"0"+e:e})).join("")}function No(e){const t=Jo,r=[];for(let n=0,i=e[t(115)];n>>6),r[t(119)](128|63&i);else if(i<=55295||i>=57344&&i<=65535)r[t(119)](224|i>>>12),r[t(119)](128|i>>>6&63),r[t(119)](128|63&i);else{if(!(i>=65536&&i<=1114111))throw r[t(119)](i),new Error(t(123));n++,r[t(119)](240|i>>>18&28),r[t(119)](128|i>>>12&63),r[t(119)](128|i>>>6&63),r[t(119)](128|63&i)}}return r}function Ho(e){const t=Jo,r=[];for(let n=0,i=e[t(115)];n=240&&e[n]<=247?(r[t(119)](String[t(130)](((7&e[n])<<18)+((63&e[n+1])<<12)+((63&e[n+2])<<6)+(63&e[n+3]))),n+=3):e[n]>=224&&e[n]<=239?(r[t(119)](String[t(130)](((15&e[n])<<12)+((63&e[n+1])<<6)+(63&e[n+2]))),n+=2):e[n]>=192&&e[n]<=223?(r[t(119)](String[t(130)](((31&e[n])<<6)+(63&e[n+1]))),n++):r.push(String[t(130)](e[n]));return r[t(122)]("")}function Vo(e,t){const r=31&t;return e<>>32-r}function jo(e){return(255&Ro[e>>>24&255])<<24|(255&Ro[e>>>16&255])<<16|(255&Ro[e>>>8&255])<<8|255&Ro[255&e]}function Wo(e){return e^Vo(e,2)^Vo(e,10)^Vo(e,18)^Vo(e,24)}function Go(e){return e^Vo(e,13)^Vo(e,23)}function qo(e,t,r){const n=new Array(4),i=new Array(4);for(let t=0;t<4;t++)i[0]=255&e[4*t],i[1]=255&e[4*t+1],i[2]=255&e[4*t+2],i[3]=255&e[4*t+3],n[t]=i[0]<<24|i[1]<<16|i[2]<<8|i[3];for(let e,t=0;t<32;t+=4)e=n[1]^n[2]^n[3]^r[t+0],n[0]^=Wo(jo(e)),e=n[2]^n[3]^n[0]^r[t+1],n[1]^=Wo(jo(e)),e=n[3]^n[0]^n[1]^r[t+2],n[2]^=Wo(jo(e)),e=n[0]^n[1]^n[2]^r[t+3],n[3]^=Wo(jo(e));for(let e=0;e<16;e+=4)t[e]=n[3-e/4]>>>24&255,t[e+1]=n[3-e/4]>>>16&255,t[e+2]=n[3-e/4]>>>8&255,t[e+3]=255&n[3-e/4]}function $o(e,t,r){const n=new Array(4),i=new Array(4);for(let t=0;t<4;t++)i[0]=255&e[0+4*t],i[1]=255&e[1+4*t],i[2]=255&e[2+4*t],i[3]=255&e[3+4*t],n[t]=i[0]<<24|i[1]<<16|i[2]<<8|i[3];n[0]^=2746333894,n[1]^=1453994832,n[2]^=1736282519,n[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=n[1]^n[2]^n[3]^Lo[r+0],t[r+0]=n[0]^=Go(jo(e)),e=n[2]^n[3]^n[0]^Lo[r+1],t[r+1]=n[1]^=Go(jo(e)),e=n[3]^n[0]^n[1]^Lo[r+2],t[r+2]=n[2]^=Go(jo(e)),e=n[0]^n[1]^n[2]^Lo[r+3],t[r+3]=n[3]^=Go(jo(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function Yo(e,t,r){const n=Jo;let{padding:i=n(121),mode:s,iv:o=[],output:a=n(127)}=arguments[n(115)]>3&&void 0!==arguments[3]?arguments[3]:{};if("cbc"===s&&("string"==typeof o&&(o=Oo(o)),16!==o[n(115)]))throw new Error(n(131));if("string"==typeof t&&(t=Oo(t)),16!==t[n(115)])throw new Error(n(114));if(e=typeof e===n(127)?0!==r?No(e):Oo(e):[...e],("pkcs#5"===i||i===n(121))&&0!==r){const t=Fo-e[n(115)]%Fo;for(let r=0;r=Fo;){const t=e[n(118)](h,h+16),i=new Array(16);if(s===n(135))for(let e=0;e2&&void 0!==arguments[2]&&arguments[2],i=arguments[r(115)]>3&&void 0!==arguments[3]&&arguments[3];const s=e[r(133)];let o=new Uint8Array(e[r(118)](0,5)),a=5;for(;as){const t=new Uint8Array(o[r(115)]+e[r(115)]-a);t[r(137)](o,0),t[r(137)](e[r(118)](a),o.length),o=t;break}let l=e[a+4],d=!1,h=2;if(n?(i&&(h=3),l=l>>>1&63,d=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][r(113)](l)):(l&=31,d=1===l||5===l),d){const n=Yo(e.slice(a+4+h,a+4+u),t,0,{padding:"none",output:r(120)});let i=n[n[r(115)]-1];if(i>0&&i<16){let e=!0;for(let t=1;t<=i;t++)if(n[n[r(115)]-t]!==i){e=!1;break}e&&n[r(139)](n[r(115)]-i,i)}const s=new Uint8Array(h);s[r(137)](e.slice(a+4,a+4+h),0);const c=kt(Mo(s,new Uint8Array(n))),l=new Uint8Array(o.length+c[r(115)]);l[r(137)](o,0),l.set(c,o[r(115)]),o=l}else{const t=e[r(118)](a+4,a+4+u),n=new Uint8Array(o.length+4+t[r(115)]);n[r(137)](o,0),n[r(137)](c,o[r(115)]),n[r(137)](t,o[r(115)]+4),o=n}a=a+4+u}return o}const Qo=ea;function ea(e,t){const r=ta();return(ea=function(e,t){return r[e-=256]})(e,t)}function ta(){const e=["26HDzXXo","14468FZuJrK","push","emit","12GKTrgf","3868891Pldvix","240252IauODc","keys","201KpIxhf","26760XfiCzY","apply","length","301dYeMuX","forEach","4239BDHHjx","401730ThvGYd","off","5ywPxEE","435132Iiswan","33GtLJYv"];return(ta=function(){return e})()}!function(e,t){const r=ea,n=e();for(;;)try{if(125385===parseInt(r(270))/1*(parseInt(r(256))/2)+parseInt(r(264))/3*(-parseInt(r(257))/4)+-parseInt(r(273))/5*(-parseInt(r(262))/6)+-parseInt(r(268))/7*(-parseInt(r(265))/8)+-parseInt(r(274))/9+-parseInt(r(271))/10*(parseInt(r(275))/11)+-parseInt(r(260))/12*(-parseInt(r(261))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ta);class ra{on(e,t,r){const n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this}once(e,t,r){const n=this;function i(){const s=ea;n[s(272)](e,i);for(var o=arguments[s(267)],a=new Array(o),c=0;c1?n-1:0),s=1;s{delete n[e]})),void delete this.e;const i=n[e],s=[];if(i&&t)for(let e=0,n=i.length;e=2&&!this[r(172)];)if(255==this[r(175)][this[r(155)]]){if(!(!1&this.tempBuffer[this[r(155)]+1])){this[r(173)]=this[r(175)][this[r(155)]+1],this[r(168)]=sa[r(151)],this[r(157)]=this[r(155)],this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this[r(155)]++;if(e)continue;break}if(this[r(168)]==sa[r(151)]){let e=!1;for(;this[r(175)][r(149)]-this[r(155)]>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(this.tempBuffer[this[r(155)]+1]==this.versionLayer){this[r(168)]=sa.findSecondStartCode,this[r(162)]=this[r(155)],this[r(155)]+=2,e=!0;break}this.parsedOffset++}else this[r(155)]++;if(e)continue;break}if(this[r(168)]==sa[r(169)]){let e=this[r(175)][r(166)](this.fisrtStartCodeOffset,this[r(162)]);this[r(153)](r(171),e,t),this[r(175)]=this[r(175)].slice(this[r(162)]),this.fisrtStartCodeOffset=0,this[r(155)]=2,this[r(168)]=sa.findFirstStartCode}}}}function ca(e,t){const r=ua();return(ca=function(e,t){return r[e-=455]})(e,t)}function ua(){const e=["1089098pBpYKa","875eFbFSj","length","16228ZOgIQX","byteLength","1227480zWNNbA","includes","355iGBFHY","6993590qtWPoL","set","slice","16440apsTgo","11owWkho","1388907nrScSo","3nYZGTP","141165WpxqLq"];return(ua=function(){return e})()}function la(e,t,r){const n=ca;for(let i=2;i3&&void 0!==arguments[3]&&arguments[3];const s=e[n(456)];let o=5;for(;os)break;let c=e[o+4],u=!1;if(i?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(458)](c)):(c&=31,u=1===c||5===c),u){const i=la(e[n(462)](o+4,o+4+a),t,r);e.set(i,o+4)}o=o+4+a}return e}function fa(e,t,r){const n=ca;if(e[n(456)]<=30)return e;const i=la(e[n(462)](30),t,r);return e[n(461)](i,30),e}function pa(e,t){var r=va();return(pa=function(e,t){return r[e-=102]})(e,t)}function ma(){for(var e=pa,t=arguments[e(102)],r=new Array(t),n=0;nt+r[e(110)]),0));let s=0;return r[e(109)]((t=>{i[e(103)](t,s),s+=t.byteLength})),i}function va(){var e=["1193180HxvVHN","562852KGYxzT","reduce","length","set","49uHfPxv","247506ekSfbZ","89664rqtNRj","659230swqYiH","446688QghRPp","forEach","byteLength","1248944uBCgrN","filter"];return(va=function(){return e})()}!function(e,t){const r=ca,n=e();for(;;)try{if(276890===parseInt(r(467))/1+parseInt(r(468))/2*(-parseInt(r(466))/3)+-parseInt(r(455))/4*(-parseInt(r(459))/5)+-parseInt(r(457))/6+parseInt(r(469))/7*(-parseInt(r(463))/8)+parseInt(r(465))/9+-parseInt(r(460))/10*(-parseInt(r(464))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ua),function(e,t){for(var r=pa,n=e();;)try{if(373222===-parseInt(r(105))/1+-parseInt(r(107))/2+parseInt(r(106))/3+parseInt(r(114))/4+-parseInt(r(113))/5+-parseInt(r(108))/6+parseInt(r(104))/7*(parseInt(r(111))/8))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(va);const ya=ga;function _a(){const e=["proxy","16940ZDyUau","6gpTxib","destroy","67555uBhhgh","forEach","9749341HkJcdf","17220GbEOLI","302hGvMHD","master","isArray","removeEventListener","10944gYDFZM","904VgQEOW","destroys","bind","addEventListener","185522gxlvqa","debugLog","14439XcbUrq","28PVqEgj","push","9893900UexxYw"];return(_a=function(){return e})()}function ga(e,t){const r=_a();return(ga=function(e,t){return r[e-=371]})(e,t)}!function(e,t){const r=ga,n=e();for(;;)try{if(852553===parseInt(r(388))/1+-parseInt(r(379))/2*(-parseInt(r(390))/3)+parseInt(r(391))/4*(-parseInt(r(375))/5)+parseInt(r(373))/6*(parseInt(r(377))/7)+parseInt(r(384))/8*(-parseInt(r(383))/9)+parseInt(r(393))/10+parseInt(r(372))/11*(-parseInt(r(378))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(_a);class ba{constructor(e){const t=ga;this.destroys=[],this.proxy=this[t(371)][t(386)](this),this[t(380)]=e}[ya(371)](e,t,r){const n=ya;let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array[n(381)](t))return t.map((t=>this[n(371)](e,t,r,i)));e[n(387)](t,r,i);const s=()=>{const s=n;Ht(e[s(382)])&&e[s(382)](t,r,i)};return this.destroys[n(392)](s),s}[ya(374)](){const e=ya;this[e(380)][e(389)]("Events",e(374)),this[e(385)][e(376)]((e=>e())),this[e(385)]=[]}}const wa=Aa;function Sa(){const e=["presentWidth","mp4a","init","constants","byteLength","call","STSZ","stsd","isLeading","moof","HDLR_VIDEO","hasOwnProperty","generateInitSegment","esds","length","STTS","mfhd","duration","ftyp","mdhd","hvc1","traf","11AXxWYl","audioSampleRate","tfdt","hasRedundancy","codecWidth","hdlr",".mp3","mp3","stbl","mdia","isNonSync","stsc","2918349CNMtBE","audioType","28YlejvO","1927065WADHOX","stts","mvex","type","66325KQFUBJ","mvhd","stco","SMHD","dref","moov","config","channelCount","hvcC","VMHD","mdat","trak","minf","STSD_PREFIX","tkhd","dependsOn","trun","dinf","trex","5810536TmVAtr","concat","types","size","audio","72806csePlj","8898280shXSGb","timescale","flags","codecHeight","set","avc1","tfhd","STSC","charCodeAt","DREF","sdtp","7BEvgUm","4424514heUkVu","HDLR_AUDIO","vmhd","box","isDependedOn","avcc"];return(Sa=function(){return e})()}!function(e,t){const r=Aa,n=e();for(;;)try{if(398714===-parseInt(r(176))/1*(parseInt(r(219))/2)+parseInt(r(191))/3+parseInt(r(190))/4*(-parseInt(r(195))/5)+parseInt(r(232))/6*(parseInt(r(231))/7)+parseInt(r(214))/8+-parseInt(r(188))/9+-parseInt(r(220))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Sa);class Ia{static[wa(156)](){const e=wa;Ia[e(216)]={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(let t in Ia[e(216)])Ia[e(216)][e(165)](t)&&(Ia[e(216)][t]=[t[e(228)](0),t[e(228)](1),t[e(228)](2),t[e(228)](3)]);let t=Ia[e(157)]={};t.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),t[e(208)]=new Uint8Array([0,0,0,0,0,0,0,1]),t[e(169)]=new Uint8Array([0,0,0,0,0,0,0,0]),t[e(227)]=t.STCO=t[e(169)],t[e(160)]=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t[e(164)]=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),t.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),t[e(229)]=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),t[e(198)]=new Uint8Array([0,0,0,0,0,0,0,0]),t[e(204)]=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static[wa(151)](e){const t=wa;let r=8,n=null,i=Array.prototype.slice[t(159)](arguments,1),s=i[t(168)];for(let e=0;e>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r,n[t(224)](e,4);let o=8;for(let e=0;e>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static[wa(206)](e){const t=wa;return Ia[t(151)](Ia[t(216)][t(206)],Ia.tkhd(e),Ia[t(185)](e))}static[wa(209)](e){const t=wa;let r=e.id,n=e[t(171)],i=e[t(154)],s=e.presentHeight;return Ia.box(Ia[t(216)][t(209)],new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,255&i,0,0,s>>>8&255,255&s,0,0]))}static[wa(185)](e){const t=wa;return Ia.box(Ia[t(216)][t(185)],Ia[t(173)](e),Ia[t(181)](e),Ia[t(207)](e))}static[wa(173)](e){const t=wa;let r=e[t(221)],n=e.duration;return Ia[t(151)](Ia[t(216)][t(173)],new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]))}static[wa(181)](e){const t=wa;let r=null;return r=e.type===t(218)?Ia[t(157)][t(233)]:Ia[t(157)][t(164)],Ia[t(151)](Ia.types[t(181)],r)}static[wa(207)](e){const t=wa;let r=null;return r=e[t(194)]===t(218)?Ia.box(Ia[t(216)].smhd,Ia[t(157)][t(198)]):Ia[t(151)](Ia[t(216)][t(234)],Ia[t(157)][t(204)]),Ia[t(151)](Ia[t(216)][t(207)],r,Ia[t(212)](),Ia[t(184)](e))}static[wa(212)](){const e=wa;return Ia[e(151)](Ia.types[e(212)],Ia[e(151)](Ia[e(216)][e(199)],Ia.constants.DREF))}static[wa(184)](e){const t=wa;return Ia.box(Ia[t(216)][t(184)],Ia[t(161)](e),Ia[t(151)](Ia[t(216)][t(192)],Ia.constants[t(169)]),Ia.box(Ia[t(216)][t(187)],Ia[t(157)][t(227)]),Ia[t(151)](Ia.types.stsz,Ia.constants[t(160)]),Ia[t(151)](Ia[t(216)][t(197)],Ia.constants.STCO))}static[wa(161)](e){const t=wa;return e[t(194)]===t(218)?e[t(189)]===t(183)?Ia[t(151)](Ia[t(216)][t(161)],Ia.constants[t(208)],Ia[t(183)](e)):Ia.box(Ia[t(216)][t(161)],Ia[t(157)][t(208)],Ia[t(155)](e)):"avc"===e.videoType?Ia[t(151)](Ia.types[t(161)],Ia[t(157)].STSD_PREFIX,Ia.avc1(e)):Ia[t(151)](Ia.types[t(161)],Ia.constants.STSD_PREFIX,Ia[t(174)](e))}static[wa(183)](e){const t=wa;let r=e[t(202)],n=e[t(177)],i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return Ia[t(151)](Ia[t(216)][t(182)],i)}static[wa(155)](e){const t=wa;let r=e.channelCount,n=e[t(177)],i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return Ia[t(151)](Ia[t(216)][t(155)],i,Ia[t(167)](e))}static[wa(167)](e){const t=wa;let r=e[t(201)]||[],n=r.length,i=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n])[t(215)](r)[t(215)]([6,1,2]));return Ia[t(151)](Ia[t(216)][t(167)],i)}static[wa(225)](e){const t=wa;let r=e[t(153)];const n=e[t(180)],i=e[t(223)];let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Ia[t(151)](Ia[t(216)].avc1,s,Ia[t(151)](Ia[t(216)].avcC,r))}static[wa(174)](e){const t=wa;let r=e[t(153)];const n=e[t(180)],i=e[t(223)];let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Ia[t(151)](Ia[t(216)][t(174)],s,Ia[t(151)](Ia[t(216)][t(203)],r))}static mvex(e){const t=wa;return Ia[t(151)](Ia.types[t(193)],Ia[t(213)](e))}static trex(e){const t=wa;let r=e.id,n=new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Ia[t(151)](Ia[t(216)][t(213)],n)}static moof(e,t){const r=wa;return Ia[r(151)](Ia[r(216)][r(163)],Ia[r(170)](e.sequenceNumber),Ia.traf(e,t))}static[wa(170)](e){const t=wa;let r=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return Ia[t(151)](Ia[t(216)][t(170)],r)}static traf(e,t){const r=wa;let n=e.id,i=Ia[r(151)](Ia[r(216)][r(226)],new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),s=Ia[r(151)](Ia[r(216)][r(178)],new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),o=Ia.sdtp(e),a=Ia.trun(e,o[r(158)]+16+16+8+16+8+8);return Ia[r(151)](Ia[r(216)][r(175)],i,s,a,o)}static[wa(230)](e){const t=wa;let r=new Uint8Array(5),n=e[t(222)];return r[4]=n[t(162)]<<6|n[t(210)]<<4|n.isDependedOn<<2|n.hasRedundancy,Ia.box(Ia.types[t(230)],r)}static[wa(211)](e,t){const r=wa;let n=new Uint8Array(28);t+=36,n[r(224)]([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let i=e[r(171)],s=e[r(217)],o=e[r(222)],a=e.cts;return n[r(224)]([i>>>24&255,i>>>16&255,i>>>8&255,255&i,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o[r(162)]<<2|o[r(210)],o[r(152)]<<6|o[r(179)]<<4|o[r(186)],0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12),Ia.box(Ia[r(216)][r(211)],n)}static[wa(205)](e){const t=wa;return Ia[t(151)](Ia[t(216)][t(205)],e)}}function Aa(e,t){const r=Sa();return(Aa=function(e,t){return r[e-=151]})(e,t)}Ia[wa(156)]();var Ea=ka;function ka(e,t){var r=xa();return(ka=function(e,t){return r[e-=375]})(e,t)}!function(e,t){for(var r=ka,n=e();;)try{if(440365===parseInt(r(377))/1*(-parseInt(r(389))/2)+parseInt(r(380))/3*(parseInt(r(378))/4)+-parseInt(r(382))/5+parseInt(r(385))/6*(-parseInt(r(390))/7)+parseInt(r(386))/8+-parseInt(r(388))/9+parseInt(r(379))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(xa);var Ca=tt[Ea(383)]((function(e){var t=Ea;e[t(376)]=function(e,t,r){return t in e?Object[ka(384)](e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports[t(375)]=!0,e[t(376)][t(387)]=e.exports}));function xa(){var e=["4799022fpAFKm","2715856KmIVxX","default","6235677EKMnmF","21374cJkVDb","7mkDkJm","__esModule","exports","7JCTiaZ","377984eASNcp","20183290xPKGfw","3eoCAug","unwrapExports","2222215SvnMTa","createCommonjsModule","defineProperty"];return(xa=function(){return e})()}function Ta(e,t){const r=La();return(Ta=function(e,t){return r[e-=134]})(e,t)}tt[Ea(381)](Ca),function(e,t){const r=Ta,n=e();for(;;)try{if(894991===parseInt(r(142))/1*(-parseInt(r(139))/2)+-parseInt(r(152))/3+-parseInt(r(151))/4+-parseInt(r(137))/5+parseInt(r(143))/6*(-parseInt(r(145))/7)+-parseInt(r(149))/8+parseInt(r(144))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(La);const Ba=[44100,48e3,32e3,0],Da=[22050,24e3,16e3,0],Ma=[11025,12e3,8e3,0],Ua=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],Pa=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],Fa=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1];function Ra(e){const t=Ta;if(e[t(146)]<4)return void console[t(150)](t(135));let r=new Uint8Array(e.buffer),n=null;if(255!==r[0])return void console[t(150)](t(134));let i=r[1]>>>3&3,s=(6&r[1])>>1,o=(240&r[2])>>>4,a=(12&r[2])>>>2,c=3!==(r[3]>>>6&3)?2:1,u=0,l=0,d=t(141);switch(i){case 0:u=Ma[a];break;case 2:u=Da[a];break;case 3:u=Ba[a]}switch(s){case 1:o=e[i]&&t=6?(i=5,r=new Array(4),a=s-3):(i=2,r=new Array(2),a=s):-1!==c.indexOf("android")?(i=2,r=new Array(2),a=s):(i=5,a=s,r=new Array(4),s>=6?a=s-3:1===o&&(i=2,r=new Array(2),a=s)),r[0]=i<<3,r[0]|=(15&s)>>>1,r[1]=(15&s)<<7,r[1]|=(15&o)<<3,5===i&&(r[1]|=(15&a)>>>1,r[2]=(1&a)<<7,r[2]|=8,r[3]=0),this[t(489)]=r,this[t(508)]=Ga[s],this[t(497)]=s,this[t(500)]=o,this[t(527)]=i,this[t(482)]=n,this[t(518)]="mp4a.40."+i,this[t(493)]="mp4a.40."+n}}const Ya=Ka;function Ka(e,t){const r=Xa();return(Ka=function(e,t){return r[e-=221]})(e,t)}function Xa(){const e=["skipEG","skipUEG","readUByte","index","length","895325OpssWJ","609irhlsH","264121xdeUVo","readBits","1201708ThqZmE","readUEG","6zkpUSk","getBits","skipLZ","readUInt","136EHLrQi","readEG","1242lRcNZO","data","6531NoHCuG","skipBits","readBoolean","9900btecVS","readUShort","byteLength","1228446hykFhN","bitsAvailable","bitLength","3388luYLgl"];return(Xa=function(){return e})()}!function(e,t){const r=Ka,n=e();for(;;)try{if(200983===parseInt(r(230))/1+-parseInt(r(240))/2*(parseInt(r(229))/3)+-parseInt(r(232))/4+parseInt(r(228))/5*(parseInt(r(234))/6)+-parseInt(r(242))/7*(-parseInt(r(238))/8)+-parseInt(r(248))/9+-parseInt(r(245))/10*(-parseInt(r(222))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Xa);class Ja{constructor(e){const t=Ka;this[t(241)]=e,this[t(226)]=0,this.bitLength=8*e[t(247)]}get[Ya(249)](){const e=Ya;return this.bitLength-this[e(226)]}[Ya(243)](e){const t=Ya;if(this[t(249)]1&&void 0!==arguments[1])||arguments[1];return this.getBits(e,this.index,t)}[Ya(235)](e,t){const r=Ya;let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this[r(249)]>>i,o=8-i;if(o>=e)return n&&(this[r(226)]+=e),s>>o-e;{n&&(this[r(226)]+=o);const i=e-o;return s<>>1:-1*(e>>>1)}[Ya(244)](){return 1===this.readBits(1)}[Ya(225)](){const e=Ya;let t=arguments[e(227)]>0&&void 0!==arguments[0]?arguments[0]:1;return this[e(231)](8*t)}[Ya(246)](){return this.readBits(16)}[Ya(237)](){return this[Ya(231)](32)}}function Za(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}!function(e,t){for(var r=lc,n=e();;)try{if(977458===-parseInt(r(395))/1*(-parseInt(r(397))/2)+parseInt(r(390))/3+-parseInt(r(396))/4*(-parseInt(r(398))/5)+parseInt(r(402))/6*(parseInt(r(393))/7)+parseInt(r(400))/8*(-parseInt(r(401))/9)+-parseInt(r(392))/10+-parseInt(r(405))/11*(parseInt(r(388))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(nc);const Qa=new Array(214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72),ec=new Array(2746333894,1453994832,1736282519,2993693404),tc=new Array(462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257);function rc(e,t,r,n,i){var s=lc,o=i;o=t+i>e[s(406)]&&n+i<=r[s(406)]?e[s(406)]-t:n+i>r[s(406)]&&t+i<=e[s(406)]?r.length-n:t+i<=e[s(406)]&&n+i<=r[s(406)]?i:r[s(406)]>24&255,e>>16&255,e>>8&255,255&e)}function sc(e,t){var r=lc;return t+3>>19)^(n<<23|n>>>9)}function cc(e,t){var r=new Array(36);r[0]=sc(t,0),r[1]=sc(t,4),r[2]=sc(t,8),r[3]=sc(t,12);for(var n=0;n<32;n++)r[n+4]=r[n]^uc(r[n+1]^r[n+2]^r[n+3]^e[n]);var i=new Array(4);for(n=35;n>=32;n--)i[35-n]=r[n];return function(e){for(var t=lc,r=new Array(4*e[t(406)]),n=0;n>>30)^(n<<10|n>>>22)^(n<<18|n>>>14)^(n<<24|n>>>8)}function lc(e,t){var r=nc();return(lc=function(e,t){return r[e-=385]})(e,t)}function dc(e,t,r){var n=lc;if(null==e||null==e||e[n(406)]%16!=0)return console[n(386)](n(385)),null;if(null==r||null==r||r.length<=0)return console[n(386)]("cipher is error!"),null;if(null==t||null==t||t[n(406)]%16!=0)return console[n(386)](n(394)),null;for(var i=oc(e),s=Math[n(387)](r[n(406)]/16),o=new Array(r.length),a=t[n(389)](),c=0;c3&&void 0!==arguments[3]&&arguments[3],s=arguments[n(406)]>4&&void 0!==arguments[4]&&arguments[4];t=new Uint8Array(t),r=new Uint8Array(r);const o=e[n(399)];let a=5;for(;ao)break;let u=e[a+4],l=!1,d=2;if(i?(s&&(d=3),u=u>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(391)](u)):(u&=31,l=1===u||5===u),l){const i=dc(t,r,e[n(389)](a+4+d,a+4+c));e.set(i,a+4+d)}a=a+4+c}return e}const fc=pc;function pc(e,t){const r=mc();return(pc=function(e,t){return r[e-=497]})(e,t)}function mc(){const e=["videoBufferDelay","mseDecoder.mediaSourceAppendBufferError is true","openWebglAlignment","audioMimeType","mediaSourceH265NotSupport","last_pcr_","timescale_","HEAPF32","streamEndInner","h264","isDestroyed","pushBuffer video and isIFrame is ","8981847Qzpnje","stopStreamRateAndStatsInterval","doPlaybackCacheLoop() and isPlaybackOnlyDecodeIFrame is true and isIFrame is true, and ts is","_decodeEnhancedH265Video","AAC: AudioObjectType changed from ","fps","pid","12clFfaF","avc","detectVideoMetadataChange","clearSlices","avcc","pushBuffer","addEventListener"," ts is ","isStateClosed","headers","_doDecodeAudio","MP3: SamplingFrequencyIndex changed from ","parseSection","common_pids","decodeVideo\n local dts is < 0 , ts is ","level","decodeVideo() and decoder is destroyed","fetch","streamSuccess","decodeVideo, decoder is destroyed and return","audioTracks","Opus: Channel count changed from ","parsePAT: table_id ","onSamples() trackId error",'fetchNext().then() and value "',", preTs is ","renderYUV","isPlayVod","lastBuf","concat","Jb pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng","parseAC3Payload","isMpeg4","audioAACSequenceHeader","handleVideoH265Frames","fetchErrorWorker","avcC","parsePES: packet_start_code_prefix should be 1 but with value ","getStreamBufferLength","DataStream","getDelay() and preDelayTimestamp is ","isTrusted","kMetadata","calcNetworkDelay","writableStream abort() and e.name is AbortError so return"," and ignore","webglObj","\n decodeVideo dts is less than(or equal) prev dts ,\n dts is ","prevAudioDts","_initSourceBuffer","video_init_segment_dispatched_","details","isDropSameTimestampGop","Audio: Audio Codecs changed from ","hasAudio","Not Supported Opus channel count.","entries","mpeg4","LOG_NAME","pendingUnits","AC3: Bit Stream Identification changed from ","audio_track_","length","parseG711Payload","pes_slice_queues_","getBuildTime","setCodecVideo","fetchStream, WebsocketStream on error and requestAbort is true so return","probe","profile_string","readNextNaluPayload"," and isVideoSqeHeader is ","audioCode","Webcodecs Video Decoder initSize","isPause","ac3","setCodec","loop() isPushDropping is true and bufferList length is ","sampleRate","setCodecAudio: hasInitAudioCodec is false, codecId is ","_initSourceBuffer() appendBuffer mseDecoder.mediaSource.addSourceBuffer()","asynchronous_klv_pids","chromaFormat","sort","prevPayloadBufferSize","isWasmMp4","preDelayTimestamp","onOffscreenCanvasWebglContextRestored","ts_packet_size",",\n diff is ","decodeVideo has not init , isIframe is ","mediaSourceAppendBufferError","hasAudioInit","addSourceBuffer","_clearAudioSourceBufferCheckTimeout","videoMeta","mimeType","fetchStream, WebsocketStream socket close and code is ","videoPayload","pcr_pid","sendWebsocketMessage","getNearestTimestampMilliseconds","scriptData","ended","Generated first AVCDecoderConfigurationRecord for mimeType: ","websocket","supportMSEDecodeHevc","_initAudioSourceBuffer and mseDecoder.isStateOpen is ",", syncOffset = ","parseChunks"," and firstRenderTime is ","floor","pushBuffer, isDropSameTimestampGop is true and\n hasIframe is ","audioSampleRate","21348864wKjjxa","low_frequency_effects_channel_on","pushBuffer() and isIFrame is ","getContext","audio_object_type","MP3","updating","VideoEncoder","wcsDecodeAudio","removeUsedSamples","mseCorrectTimeDuration","ms and fragDuration is ","isAudioInitInfo","worker","fetchError",",\n and prevPayloadBufferSize is ","_onMediaSourceSourceOpen","loas_aac","isEmitInfo","toString","demuxFlv() type is video and payload.byteLength is ","cryptoKey","demuxFlv","correctSamplePts","loop() common dumex delay is -1 ,data.ts is","kMPEG2Audio","ec-3","handleVideoH264Nalu","codedHeight","current_pmt_pid_","section_slice_queues_","config","H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment","isPlaybackOnlyDecodeIFrame","fetch().catch() and e.name is AbortError so return","websocket error","clearBuffer,bufferList length is ","_checkTsIsMaxDiff","mediaSourceAppendBufferFull","protocol","removeEventListener","nakedFlowDemuxUseNew","meta","profile"," and prevTs is ","pat_","sourceOpen","is_sync","AbortError","isDecodeFirstIIframe","readNextAACFrame","frame_rate","startTimestamp","sourceClose","width is ","calcPlaybackStreamFps","fps_num","flvScriptData"," and tempDelay is ","sourceended","clearPlaybackCacheLoop","dts","decode data type is "," ,\n and now ts is ","kSliceSPS","close","hasIframeInBufferList","stop"," less than (or equal) preTs is ","AAC: Detected pts overlapped, ","readUByte","original_codec_mimetype","sarDen","audioSourceBufferCheckTimeout","fetchNext().then() and abortController.signal.aborted is true so return","mseDecoder.mediaSourceAppendBufferFull is true","fetchStream, WebsocketStream socket close abnormally and code is ","codecWidth","types","isfms","handleVideoH264NaluList","endOfStream() has pending eos","cryptoIV","isInitSegmentDispatched","cryptoPayload","audio_init_segment_dispatched_"," and emit replay","name","parseVideo265Header","isPlayUseMSEAndDecoderInWorker"," is not corresponded to PAT!"," and new delay is ","pendingRemoveRanges","Opus","setCodecVideo: hasInitVideoCodec is false, codecId is ","present_size","mseWorkerAddSourceBufferError","G711A","readUEG","mseCorrectAudioTimeDuration","cts","delay","audioSampleRateIndex","pes_private_data_pids","updatePlaybackIsPause, isPause is ","parsePMT","decodeAudio first frame is not iFrame","setCodecVideo: videoDecoder or videoDecoder.setCodec is null","parseSPS$2"," and bufferList length is ","original_object_type","JbPro Worker Version is ","setCodecAudio: init audio codec, codeId is "," next data type is ",", stream_id=","videoNalu","write","pmt_","simdDecodeError","Synchronous KLV Metadata: pid=","init and forHardDecode is ","mseAutoCleanupSourceBuffer","dispatchAudioInitSegment","len","cancel","isWorkerFetch","isPlaybackPause",", diff is ","pushBuffer,\n preTimestamp is ","mseDecoder.audioSourceBuffer.appendBuffer()","extractNALu$2","ID3 ","decode","readyState","extractNALu","reduce","assign","forEach","streamEnd","workerFetch","worker mpeg4Demuxer","error","eventListenList",", bufferList is ","has_video_","simdH264DecodeVideoWidthIsTooLarge","smpte2038_pids","workerEnd","seqHeader","abort success",",\n and mseCorrectTimeDuration is ","websocketStringMsg","Malformed PES: PES_packet_length < 3 + PES_header_data_length","useWCS","bit_stream_mode","payload","nakedFlowFps","isCacheBeforeDecodeForFpsRender","websocketOpenTimeout","setCodecAudio"," and mseDecoder.isAvc === null is ","socket is null","sequenceNumber","stringify","frameRate"," package length is ","_initAudioSourceBuffer","parsePES","handleAddNaluStartCode",",nalu type is ","drawImage",", height is ","firstStartCodeOffset","getDelayNotUpdateDelay() and preDelayTimestamp is ","eac3",", height: ","Asynchronous KLV Metadata: pid=","_doDecodeVideo","webglcontextlost","demuxTs","clearBuffer",", dts=","hasPendingEos","fetchNext().catch() and e.name is AbortError so return","streamVideoFps","useSIMD","sendWsMessage","findIndex","handleVideoH265NaluList","getDelay","\n decodeVideo: video width or height is changed,\n old width is ","VideoDecoder configure error","ac-3","_doRemoveRanges","preventDefault","streamAbps","program_pmt_pid","isSendSeqHeader",";codecs=","playbackIsPause","tsPacketSize","mseError","playbackForwardMaxRateDecodeIFrame","audio_last_sample_pts_"," to ","demuxFlv() isVideoSequenceHeader is true and isHevc is ","updateend","mseDecoder.mediaSourceBufferError is true","decodeVideo","updatePlaybackIsPause",", pid: ","playback and playbackIsCacheBeforeDecodeForFpsRender is true","suffixSei","videoDecode","mdia","websocket user aborted","push","kSCTE35","AC3: Sampling Frequency changed from ",", options.ts is ","send","shift","vcl","decodeVideo dts is equal to prev dts and payload size is equal to prev payload size so drop this frame","playbackConfig","code","mediaSourceAddSourceBufferError","playbackStreamVideoFps","AudioDecoder","writableStream close()","tempStream","TAG_NAME","object_type","decodeVideo first frame is not iFrame","firstAudioTime","parse","audioSequenceNumber","isFirefox","sampling_freq_index","MP3: AudioObjectType changed from ","render","kSliceCRA_NUT","pushBuffer audio ts is ","isPlayback","extractNALu$3"," null","firstTimestamp","fetch response status is ",",local diff is ","byteLength","cacheTrack","sampling_frequency","calcNetworkDelay, dts is ","sourceBuffer","validatedFailed, please contact the author to get the correct license","audioBufferSize","sarRatio","getState","prevAudioTs","codec","firstRenderTime","delay is ","useMSE"," and isNotPushDropping is ","VideoDecoder error: ","debugLevel","25648UhVXOA",", and ts is ","channel_count","aac_last_incomplete_data_","mediaSourceTsIsMaxDiff","fps_den","decodeAudio() and decoder is destroyed","_resetInIt"," ms","program_pmt_map_","clear","width: ","mdat","sample_rate","isXorCrypto cryptoKey.length is ","demuxNakedFlow","isRecording","offscreenCanvas","onOffscreenCanvasWebglContextLost","emitSectionSlices","elementary_stream_priority_indicator","has_audio_","mp3Demuxer","pps","PACKET_TYPE_FRAMES",", not 0x47","mseDecoder.mediaSourceAddSourceBufferError is true","videoBuffer","handlePESSlice",",\n new width is "," create uint8Array error :","writableStream pipeTo() and e is"," isIFrame is ","isDropping","handle","locked","isIFrame","stbl","size","streamDts","AAC: Unknown pts","detectAudioMetadataChange","PACKET_TYPE_FRAMESX",'video/mp2t; codecs="',"isM7sCrypto","_getSeqHeader","pendingAudioSegments","isPlaybackCacheBeforeDecodeForFpsRender","onmessage:","videoInfo","aac","isAllIframeInBufferList","videoTracks",", streamFps is ","fileStart","audioSourceBuffer","107826GnbQri","some","debugLog","decoder","G711U","demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is ","worker wcsDecoder","stream_type","isFmp4","isAvc","_doAppendSegments() audioSourceBuffer is null and need init audio source buffer","Video: Present resolution width changed from ","dispatchVideoInitSegment","mediaSource audio sourceBuffer error","worker MediaSource"," and preTsDuration is ","hvcC","mp4Box onError","_isEnhancedH265Header","findSecondStartCode","parsePAT","abs","samples","subarray","mseFirstRenderTime","video","pid_stream_type","onMediaSourceSourceOpen() sourceBuffer is null and next init","audioTrackId","decodeVideo: video width or height is changed, and return","demuxM7s() type is video and arrayBuffer length is ","getDelayNotUpdateDelay","removeSourceBuffer() audioSourceBuffer","videoSEI","endOfStream","writableStream write() and requestAbort is true so return","codec_mimetype","data"," and payload size is ","dropBuffer$2() iFrameIndex is ","timed_id3_pids","handlePESSlice: packet_start_code_prefix should be 1 but with value ","dropping"," and ok is ","audioPayload","parseOpusPayload"," and bufferlist is ",'" string so return',"appendAudioBuffer() player is destroyed","fromCharCode","kSlicePPS","getAudioSourceBufferUpdating","emitPESSlices"," and maxDiff is ","opus","\n diff is ","mediaSource is end","setInterval()","notConnect","replace","pushLatestDelay","updateConfig","opt","debugError","pendingSegments","syncOffset","_bindMediaSourceEvents","videoCodec","parsedOffset","log","videoMimeType","audioSourceNoDataCheckTimeout","streamVideoType is null","findFirstStartCode","sendWebsocketMessage, message is","refSampleDuration",",\n and emit change event","removeSourceBuffer() sourceBuffer error","parseADTSAACPayload","slice","kSliceNonIDR","scte_35_pids","cryptoPayloadAudio","worker fmp4Demuxer","ms and return ","sync_offset","5267355xofIin","streamFps","SMPTE 2038 Metadata: pid=","bit_stream_identification","isFlv","isStateEnded","video_metadata_","networkDelayTimeout","decodeVideo: simd decode error, and return","isPlayUseMSE","audio","presentHeight"," and isIFrame is ","s and status is ","errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is ",", need clear is ","parseAsynchronousKLVMetadataPayload","slices","value","streamRate","init","mediaSourceAudioNoDataTimeout","flags","fetchStream, WebsocketStream socket close and requestAbort is true so return","_initSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()","kH265","start","mediaSource",",\n and emit change event","mediaSource is not attached to video or mediaSource is closed","setCodecVideo: SIMD H264 decode video width is too large, width is ","chroma_format","_needCleanupSourceBuffer","isCryptoAudio","channel_config","parseSMPTE2038MetadataPayload","parseLOASAACPayload","kLOASAAC","mseHandle","\n decodeVideo: video width or height is changed,\n old width is ","open","needClear","onclose","duration","state","adts_aac"," ,\n and now ts is ","ms and return -1","aborted","descriptor","createFile","removeSourceBuffer() sourceBuffer"," > ","_clearAudioNoDataCheckTimeout","socketStatus","fetchStatus",",\n new width is ","decodeNext","appendAudioBuffer"," and prev ts is ","lastBuffer","debug",", old height is ","videoCode"," and has iFrame, set dropping is true","mseAutoCleanupMinBackwardDuration","useOffscreen","vps","ts is ","currentTime","wasmWidthOrHeightChange","nearest_pts"," and return"," , message is ","onError","isFirstDispatch and tsPacketSize = ","Generated first AudioSpecificConfig for mimeType: ","$video","FT_KEY","type","Client disconnecting","AAC","doPlaybackCacheLoop","fetchStream, url is ","AC3: BitStream Mode changed from ",", isVideoSequenceHeader is true","playbackIsCacheBeforeDecodeForFpsRender","pcmData, decoder is destroyed and return","\n and replay","_doAppendSegments","getNaluDts","playbackCacheLoop","writableStream"," and update next dts increase 5ms","loop() bufferList is empty and reset delay","2007630CEBjsH","initVideo","nakedFlowH265DemuxUseNew","originalCodec","closed","mp4","_opt","dispatchPESPrivateDataDescriptor","stencil","kSliceSEI","isPlayer","string","loop() dropBuffer is dropping and isIFrame ","sarNum","getSourceBufferUpdating","decodeVideo and webcodecs configure is","fetchStream, WebsocketStream on error and isDestroyed is true, so return","sar_ratio","cacheAudioTrack",",\n firstRenderTime is ","options:","expected: ","playbackCacheBeforeDecodeForFpsRender, calc streamVideoFps is ","_remainingPacketData","prevTs","discontinuity_indicator","isSm4Crypto","handleVideoFrames","h265","streamVideoType","playbackTF","onReady","worker nakedFlow"," and prev dts is ","playbackCacheBeforeDecodeForFpsRender, bufferListLength is ","parsePESPrivateDataPayload","firstAudioTime is ","iFrame","units","buffer","kH264","secondStartCodeOffset","dropBuffer$2","from","mediaSource video sourceBuffer error","abortSourceBuffer() abort audioSourceBuffer","isTs","mediaSourceAudioInitTimeout","getHandle","arraybuffer","decodeAudio\n local dts is < 0 , ts is ","emitError","getIncompleteData","setCodecAudio: mp3 is not support for old version","offset","video_track_","codecHeight","body",", pts="," ,new bufferList is ","onSamples","protocols","firstRenderTime is ","setExtractionOptions","read","98HTPMul","extractH264SEI","onerror","websocket Open Timeout form ","mp4Box","expected_length","set","isVideoInited","streamVbps"," so drop this frame","cmd"," and forOldVersion is ","TAG","ceil","10767JhExly","parseSCTE35",'" is string so return',"payload_unit_start_indicator","_initPmt","abort","indexOf","audioDecode","kSliceVPS","startPlaybackCacheLoop","debugUuid","options","checkStreamEnd","getNotDroppingDelayTs","kSliceIDR_N_LP","mseSourceBufferError mseDecoder.sourceBuffer","debugWarn","handleVideoH265Nalu","handleOffscreenCanvasWebglContextLost, stencil is false","handleVideoH264NaluList list size is ","handleVideoH264Frames","localDts","Video: Coded Resolution changed from "," and next dropBuffer","mseWidthOrHeightChange","mediaSourceBufferError","videoSequenceHeader","appendBuffer","kSliceIDR","hasIncompleteData","minf","kSliceIDR_W_RADL","sps","resetDelay","binaryType","abortSourceBuffer","handleVideoNalu","g711u","extractH265SEI","demuxFlv() type is audio and payload.byteLength is ","mseSourceBufferError","video_metadata_changed_","aacADTSHeader","prevTimestamp","yuvData, transferToImageBitmap error is","isKeyframe","kADTSAAC",", isAacCodecPacket is true","dispatch","transferToImageBitmap","_doAppendSegments() sourceBuffer is null and wait init and return","yuvData, isVideoFirstIFrame is false and return","dispatchVideoMediaSegment"," and\n payloadBufferSize is ","loop() is dropping = false, is iFrame","fetch().catch() and e is "," , payload is ","pendingAudioRemoveRanges","decodeAudio and has already initialized and payload is aac codec packet so drop this frame","handleOffscreenCanvasWebglContextLost and next try to create webgl","onMediaSourceSourceOpen() audioSourceBuffer is null and next init","channel_mode"," _opt.sampleRate is ","_decodeAudioConfigurationRecord audio codec is not support , codecId is "," vs start is ","streamType"," > timestamp is ","pushBuffer(), pushLatestDelay is ","isRecordTypeFlv","\n isVideoSqeHeader is ","total_length","hasInitVideoCodec","kMPEG1Audio","resetAllDelay","parsePPS"," and mseCorrectTimeDuration is ","yuvData, decoder is destroyed and return"," ,\n and diff is ","file_position","codedWidth","getUint32","reset","hvcc","complete","loop() do not decode and delay is "," and,\n options.ts is ","_preDoDecode","fetchStream, WebsocketStream socket error","hasInit","flush","ms and diffFps is ","isXorCrypto","code is "," ,delay is ","_stopCheckWsOpenTimeout","warn","then","dispatchAudioVideoMediaSegment"," cacheTrack dts is ","fetchStream, WebsocketStream socket open","status","signal"," and delay is ","mediaSourceAudioG711NotSupport","kEAC3","delta","handleNALu","sampling_rate","aacSequenceHeader","fetchStream","parseMP3Payload","endOfStream()","synchronous_klv_pids","generateInitSegment"," and emit error and next abort()","sequenceHeader","VANC","Timed ID3 Metadata: pid=","media_info_","networkDelay","supportVideoFrameCallbackHandle","bit_depth","HEAPU8","prevDts","VideoDecoder","isNakedFlow","handleVideoH265NaluList list size is ","getTime","message","mediaSourceFull","playType","isStateOpen","end","audioMeta","AC3: Channel Mode changed from ","videoTrackId","kAC3","autoCalcFps","stream_id"," and isVideoAndNextAudio is ","readBits","ref_frames","visibility","idle","removeSourceBuffer","websocketFirstMessage","map","match","audio_metadata_"," more than ","isWidthOrHeightChanged","stopId","playbackCacheLoop sync frame duration is ","mseAutoCleanupMaxBackwardDuration","_hasPendingSegments","mseDecoder.sourceBuffer.appendBuffer()","timescale",", new height is "," ant auto wasm decode","fetch done","demuxFlv() type is "," and\n ts is ","doDecode","checkFirstIFrame","decodeAudio","current_program_","_hasPendingRemoveRanges","offscreenCanvasGL","audioNalu","playbackRate","_doCleanUpSourceBuffer","duration_","decodeVideo and payload is video sequence header so drop this frame","Parsed first PAT: ","isEmitSEI","audioCodec"," or cryptoIV.length is ","first_parse_",'video/mp4; codecs="',"key","network_pid","parseH264Payload","AAC: Channel configuration changed from ","dispatchAudioMediaSegment","VideoDecoder configure has not init , isIframe is ","demuxFmp4","prefixSei"," and diff is ","delete","sampling_index"," is not H264 or H265","isM7sCrypto cryptoKey.length is ","HEAPU32","random_access_indicator","webglcontextrestored","BIG_ENDIAN","worker TsLoaderV2","dispatch naluArray length is 0","AAC: SamplingFrequencyIndex changed from ","decodeVideo and payload is too small , payload length is ","buffered","calcIframeIntervalTimestamp","mseDecodeAudio","demuxMpeg4","sm4CryptoKey","channelCount","h265 naluList.length === 0","ms, PES pts: ","isHevc","moof","getTrackById","close() and writableStream.close() error","isAAC","MediaSource","width","onmessage","MULAW","hasVideo","isSm4CryptoH265V2","decodeDiffTimestamp","streamAudioFps","min","remove","mp3","codec_size"," and has iIframe and next decoder.dropBuffer$2()","writableStream abort() and e is ","events","playbackUpdatePlaybackRate","parseEAC3Payload","player","initAudio"," is not corresponded to PMT!","loas_previous_frame","catch","kPESPrivateData","abort catch","height","playAudio","isPushDropping","destroy"," and is Trial Version[试用版本]","_decodeConfigurationRecord","offscreenCanvasCtx","presentWidth","url","g711a"];return(mc=function(){return e})()}!function(e,t){const r=pc,n=e();for(;;)try{if(937716===-parseInt(r(779))/1*(-parseInt(r(765))/2)+parseInt(r(519))/3*(parseInt(r(1045))/4)+parseInt(r(605))/5+parseInt(r(700))/6+parseInt(r(1038))/7+parseInt(r(1425))/8+-parseInt(r(1159))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(mc),Date.now||(Date.now=function(){const e=pc;return(new Date)[e(906)]()}),console[fc(588)](fc(1270)+Ft+':"2.1.3"'+fc(1020));var vc=yc;function yc(e,t){var r=_c();return(yc=function(e,t){return r[e-=456]})(e,t)}function _c(){var e=["631186knYZvd","JbPro[❌❌❌][wasm]:","2BqwtVL","990150wFLZDf","26109CbFsZs","then","2602810Hmqwip","1683696onpbvp","935iKAWEI","catch","toString","5475792KsRdYc","5530JlEATp","9208onybfe","JbPro[❌❌❌][audio wasm]:","warn"];return(_c=function(){return e})()}!function(e,t){for(var r=yc,n=e();;)try{if(805803===parseInt(r(458))/1*(-parseInt(r(460))/2)+-parseInt(r(461))/3+-parseInt(r(471))/4*(parseInt(r(466))/5)+parseInt(r(465))/6+-parseInt(r(464))/7+parseInt(r(469))/8+parseInt(r(462))/9*(parseInt(r(470))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(_c),s({printErr:function(e){var t=yc;(function(e){const t=Tt;return!(!e||-1===e[t(499)](t(466))&&-1===e[t(499)](t(373))&&-1===e.indexOf(t(472))&&-1===e.indexOf("Reserved SBR extensions is not implemented"))})(e)||console.warn(t(456),e)}})[vc(463)]((e=>{!function(){const e=fc;let t=arguments[e(1107)]>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[e(1107)]>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[e(1107)]>2&&void 0!==arguments[2]&&arguments[2],i=arguments[e(1107)]>3&&void 0!==arguments[3]&&arguments[3],s=[],o=[],a=null,c=null,u=null,l=null,d=null,h=null,f=!1,p=null,m=null,v=!1,y=!1,_=!!Kt(n),g=0,b=0,w=!1,S=null,I=null,A=null,E=[],k=null,C=null,x=0,T=0,B=null,D=null,M=0,U=0,P=null,F=!1,R=!1,L=!1,O=null,z=null,N=!1,H=!0,V=0,j=0,W=null,G=null,q=null,$=()=>{const t=e,r=$t();return{debug:r[t(666)],debugLevel:r[t(1424)],debugUuid:r[t(789)],useOffscreen:r.useOffscreen,useWCS:r[t(1312)],useMSE:r[t(1421)],videoBuffer:r[t(1452)],videoBufferDelay:r.videoBufferDelay,openWebglAlignment:r.openWebglAlignment,playType:r[t(909)],hasAudio:r[t(1099)],hasVideo:r[t(996)],playbackRate:1,playVodRate:1,playbackFps:r[t(1383)][t(1043)],playbackDefaultFps:r.playbackFps,playbackAutoCalcFps:r[t(1383)][t(916)],playbackForwardMaxRateDecodeIFrame:r[t(1361)],playbackIsCacheBeforeDecodeForFpsRender:r[t(1383)][t(1316)],sampleRate:0,networkDelay:r[t(898)],visibility:!0,useSIMD:r[t(1344)],isRecording:!1,recordType:r.recordType,isNakedFlow:r.isNakedFlow,checkFirstIFrame:r.checkFirstIFrame,audioBufferSize:1024,isM7sCrypto:r[t(507)],isCryptoAudio:r[t(638)],cryptoKey:r[t(1180)],cryptoIV:r[t(1241)],isSm4Crypto:r.isSm4Crypto,isSm4CryptoH265V2:r[t(997)],sm4CryptoKey:r.sm4CryptoKey,isXorCrypto:r[t(870)],isHls265:!1,isFlv:r.isFlv,isFmp4:r[t(527)],isMpeg4:r[t(1077)],isTs:r.isTs,isEmitSEI:r[t(953)],isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isFirefox:!1,isDropSameTimestampGop:r[t(1097)],mseDecodeAudio:r[t(981)],wcsDecodeAudio:r[t(1167)],nakedFlowH265DemuxUseNew:r[t(702)],mseDecoderUseWorker:r.mseDecoderUseWorker,mseAutoCleanupSourceBuffer:r[t(1280)],mseAutoCleanupMaxBackwardDuration:r[t(932)],mseAutoCleanupMinBackwardDuration:r[t(670)],mseCorrectTimeDuration:r.mseCorrectTimeDuration,mseCorrectAudioTimeDuration:r[t(1258)],nakedFlowDemuxUseNew:r[t(1200)],nakedFlowFps:r[t(1315)],supportMSEDecodeHevc:!1,checkStreamEnd:!0,websocketOpenTimeout:r.websocketOpenTimeout}};e(1166)in self&&(a={TAG_NAME:e(525),hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:null,init(){const t=e;a[t(522)]=new VideoDecoder({output:function(e){const r=t;if(Ht(e.createImageBitmap))e.createImageBitmap()[r(875)]((t=>{const n=r;a[n(1022)][n(1329)](t,0,0,e[n(858)],e[n(1187)]);let i=a[n(1442)][n(828)]();postMessage({cmd:Se[n(1399)],buffer:i,delay:te[n(1260)],ts:0},[i]),Wt(e)}));else{a[r(1022)][r(1329)](e,0,0,e[r(858)],e[r(1187)]);let t=a[r(1442)][r(828)]();postMessage({cmd:Se[r(1399)],buffer:t,delay:te[r(1260)],ts:0},[t]),Wt(e)}},error:function(e){const r=t;te[r(582)](r(1172),r(1423),e,e[r(1178)]())}}),te[t(521)](a[t(1390)],t(625))},destroy(){const t=e;a[t(860)](),a[t(522)]&&a[t(522)][t(649)]!==t(704)&&(a[t(522)][t(1224)](),a[t(522)]=null),te.debugLog(a[t(1390)],"destroy")},decode:function(t,r,n){const i=e,s=t[0]>>4==1;if(a.hasInit){const e=new EncodedVideoChunk({data:t.slice(5),timestamp:r,type:s?Le[i(958)]:Le[i(884)]});try{a[i(522)][i(1291)](e)}catch(e){}}else if(s&&t[1]===je[i(894)]){const e=15&t[0];postMessage({cmd:Se[i(668)],code:e});const r=new Uint8Array(t);postMessage({cmd:Se[i(586)],buffer:r,codecId:e},[r[i(739)]]);let n=null,s=null;const o=t[i(598)](5);if(e===De[i(1035)]?(s=Ar(o),n={codec:s.codec,description:o}):e===De[i(728)]&&(s=rn(o),n={codec:s[i(1418)],description:o}),!n||n&&!n[i(1418)]||s&&0===s[i(1236)]&&0===s[i(756)])return void te.debugWarn(a[i(1390)],i(715),JSON.stringify(n));s&&s.codecWidth&&s[i(756)]&&(n[i(1187)]=s[i(756)],n[i(858)]=s.codecWidth),!a.isEmitInfo&&(te[i(521)]("worker",i(1118)),postMessage({cmd:Se[i(701)],w:s[i(1236)],h:s[i(756)]}),a[i(1177)]=!0,a[i(1442)]=new OffscreenCanvas(s.codecWidth,s[i(756)]),a.offscreenCanvasCtx=a[i(1442)].getContext("2d")),te._opt.recordType,i(705);try{a[i(522)].configure(n),a[i(867)]=!0}catch(e){te.debugError(i(1172),i(1350),e[i(1384)],e,e[i(1178)]()),e[i(1178)]()}}else te[i(795)](i(1172),i(963)+s+i(835)+t[1]+i(774))},reset(){const t=e;a[t(867)]=!1,a[t(1177)]=!1,a[t(1442)]=null,a[t(1022)]=null}});let Y=function(){const t=e;if(N=!0,c)try{c[t(784)](),c=null,te[t(521)](t(1172),t(1308))}catch(e){c=null,te[t(521)](t(1172),t(1015),e)}},K={TAG_NAME:e(732),init(){const t=e;K.lastBuf=null,K[t(672)]=null,K.sps=null,K[t(1448)]=null,K[t(844)]=null,K[t(800)]=0,K[t(1104)]={},K[t(1356)]=!1,te[t(521)](K.TAG_NAME,t(625))},destroy(){const t=e;K[t(1073)]=null,K[t(672)]=null,K[t(811)]=null,K[t(1448)]=null,K.streamType=null,K.localDts=0,K[t(1104)]={},K[t(1356)]=!1,te[t(521)](K[t(1390)],t(1019))},dispatch(t){const r=e,n=new Uint8Array(t);if(te[r(706)][r(1200)]){const e=K[r(1403)](n);if(0===e.length)return void te[r(521)](K[r(1390)],r(976));K[r(727)](e)}else K[r(1289)](n)},getNaluDts(){const t=e,r=te._opt[t(1315)];let n=K[t(800)];return K[t(800)]=K.localDts+parseInt(1e3/r,10),n},getNaluAudioDts(){const t=e,r=te[t(706)].sampleRate,n=te[t(706)][t(1414)];return K[t(800)]+parseInt(n/r*1e3)},extractNALu(t){const r=e;let n,i,s=0,o=t[r(1408)],a=0,c=[];for(;s1)for(let e=0;e{const t=r,n=Tr(e);n===Pe[t(1448)]||n===Pe[t(811)]?K[t(1186)](e):Dr(n)&&i[t(1375)](e)})),1===i[r(1107)])K.handleVideoH264Nalu(i[0]);else if(Ur(i)){const e=Tr(i[0]),t=Mr(e);K[r(1239)](i,t,e)}else i.forEach((e=>{K.handleVideoH264Nalu(e)}))}else if(K[r(844)]===Me.h265)if(te[r(706)].nakedFlowH265DemuxUseNew){const e=K[r(1327)](t),n=K.extractNALu(e);if(0===n[r(1107)])return void te[r(795)]("worker",r(815),r(985));const i=[];if(n[r(1296)]((e=>{const t=r,n=cn(e);n===Fe.pps||n===Fe.sps||n===Fe.vps?K[t(796)](e):ln(n)&&i[t(1375)](e)})),1===i.length)K[r(796)](i[0]);else if(hn(i)){const e=cn(i[0]),t=dn(e);K[r(1347)](i,t,e)}else i[r(1296)]((e=>{K[r(796)](e)}))}else cn(t)===Fe[r(1448)]?K.extractH265PPS(t):K[r(796)](t)},extractH264PPS(t){const r=e,n=K[r(1327)](t);K[r(1293)](n)[r(1296)]((e=>{const t=r;Br(Tr(e))?K[t(766)](e):K.handleVideoH264Nalu(e)}))},extractH265PPS(t){const r=e,n=K.handleAddNaluStartCode(t);K[r(1293)](n)[r(1296)]((e=>{const t=r;un(cn(e))?K[t(817)](e):K.handleVideoH265Nalu(e)}))},extractH264SEI(t){const r=e,n=K[r(1327)](t);K[r(1293)](n).forEach((e=>{K[r(1186)](e)}))},extractH265SEI(t){const r=e,n=K.handleAddNaluStartCode(t);K[r(1293)](n)[r(1296)]((e=>{K.handleVideoH265Nalu(e)}))},handleAddNaluStartCode(t){const r=e,n=[0,0,0,1],i=new Uint8Array(t[r(1107)]+n[r(1107)]);return i.set(n),i[r(771)](t,n.length),i},handleVideoH264Nalu(t){const r=e,n=Tr(t);switch(n){case Pe[r(811)]:K[r(811)]=t;break;case Pe[r(1448)]:K[r(1448)]=t}if(K[r(1356)]){if(K[r(811)]&&K[r(1448)]){const e=Er({sps:K[r(811)],pps:K[r(1448)]}),t=K.localDts;te[r(1291)](e,{type:Ie[r(544)],ts:t,isIFrame:!0,cts:0}),K[r(811)]=null,K[r(1448)]=null}if(Dr(n)){const e=Mr(n),i=K[r(695)](),s=Cr(t,e);K[r(941)](s,{type:Ie[r(544)],ts:i,isIFrame:e,cts:0})}}else if(K[r(811)]&&K[r(1448)]){K[r(1356)]=!0;const e=Er({sps:K[r(811)],pps:K.pps});te[r(1291)](e,{type:Ie[r(544)],ts:0,isIFrame:!0,cts:0}),K[r(811)]=null,K[r(1448)]=null}},handleVideoH264NaluList(t,r,n){const i=e;if(K[i(1356)]){const e=K[i(695)](),s=xr(t[i(1294)](((e,t)=>{const r=i,n=kt(e),s=kt(t),o=new Uint8Array(n.byteLength+s[r(1408)]);return o[r(771)](n,0),o[r(771)](s,n[r(1408)]),o})),r);K[i(941)](s,{type:Ie[i(544)],ts:e,isIFrame:r,cts:0}),te.debugLog(i(1172),i(798)+t[i(1107)]+i(1324)+s.byteLength+i(1457)+r+i(1328)+n+", dts is "+e)}},handleVideoH265Nalu(t){const r=e,n=cn(t);switch(n){case Fe.vps:K[r(672)]=t;break;case Fe.sps:K.sps=t;break;case Fe[r(1448)]:K.pps=t}if(K[r(1356)]){if(K[r(672)]&&K.sps&&K.pps){const e=sn({vps:K[r(672)],sps:K[r(811)],pps:K[r(1448)]}),t=K[r(800)];te[r(1291)](e,{type:Ie[r(544)],ts:t,isIFrame:!0,cts:0}),K.vps=null,K.sps=null,K[r(1448)]=null}if(ln(n)){const e=dn(n),i=K.getNaluDts(),s=on(t,e);K[r(941)](s,{type:Ie[r(544)],ts:i,isIFrame:e,cts:0})}}else if(K[r(672)]&&K[r(811)]&&K[r(1448)]){K[r(1356)]=!0;const e=sn({vps:K[r(672)],sps:K[r(811)],pps:K.pps});te[r(1291)](e,{type:Ie[r(544)],ts:0,isIFrame:!0,cts:0}),K[r(672)]=null,K.sps=null,K[r(1448)]=null}},handleVideoH265NaluList(t,r,n){const i=e;if(K[i(1356)]){const e=K[i(695)](),s=an(t[i(1294)](((e,t)=>{const r=i,n=kt(e),s=kt(t),o=new Uint8Array(n.byteLength+s[r(1408)]);return o.set(n,0),o.set(s,n[r(1408)]),o})),r);K.doDecode(s,{type:Ie.video,ts:e,isIFrame:r,cts:0}),te[i(521)](i(1172),i(905)+t[i(1107)]+i(1324)+s[i(1408)]+i(1457)+r+i(1328)+n+", dts is "+e)}},doDecode(t,r){const n=e;te[n(1088)](r.ts),r[n(499)]&&te[n(980)](r.ts),te[n(1291)](t,r)},handleVideoFrames(t){const r=e;if(!K[r(729)])for(let e of t)if(K.streamVideoType=Vt(e),K.streamVideoType)break;K[r(729)]?K.streamVideoType===Me[r(1035)]?K[r(799)](t):K[r(729)]===Me[r(728)]&&K[r(1079)](t):te[r(795)](r(1172),"handleVideoFrames",r(591))},handleVideoH264Frames(t){const r=e;let n=[],i=[],s=!1,o=!1;K[r(1104)][r(738)]&&(n=K[r(1104)].units,o=K[r(1104)][r(1381)],s=K.pendingUnits[r(737)],K.pendingUnits={});let a={};for(let e of t){if(e[r(1408)]<4)continue;const t=Tr(e);let c=!1,u=t===Pe[r(807)];(t===Pe[r(599)]||t===Pe[r(807)])&&(a=K.parseVideo264Header(e),c=!0),n[r(1107)]&&o&&(a[r(1238)]||!c)&&(i[r(1375)]({units:n,isIFrame:s}),n=[],s=!1,o=!1),n[r(1375)](e),s=s||u,o=o||c}n[r(1107)]&&(K.pendingUnits={units:n,vcl:o,iFrame:s}),i[r(1296)]((e=>{const t=r,n=e.units,i=e.isIFrame;let s=null,o=null;if(n[t(1296)]((e=>{const r=t,n=31&e[0];switch(n){case Pe[r(1448)]:K[r(1448)]=e;break;case Pe.sps:K[r(811)]=e;break;case Pe[r(709)]:o=e}if(Dr(n)){const t=kt(e);if(s){const e=new Uint8Array(s.byteLength+t[r(1408)]);e[r(771)](s,0),e[r(771)](t,s[r(1408)]),s=e}else s=t}})),!K[t(1356)]&&K[t(811)]&&K[t(1448)]){K.isSendSeqHeader=!0;const e=kr({sps:K[t(811)],pps:K[t(1448)]});te[t(1291)](e,{type:Ie[t(544)],ts:0,isIFrame:!0,cts:0}),K[t(811)]=null,K[t(1448)]=null}if(K[t(1356)]){if(K[t(811)]&&K[t(1448)]){const e=kr({sps:K[t(811)],pps:K[t(1448)]}),r=K[t(800)];te[t(1291)](e,{type:Ie.video,ts:r,isIFrame:!0,cts:0}),K[t(811)]=null,K[t(1448)]=null}if(s){const e=K[t(695)](),r=xr(s,i);if(te[t(706)][t(953)]&&o){const r=Et(o,!1);postMessage({cmd:Se[t(552)],buffer:r.payload,ts:e},[r[t(1314)][t(739)]])}K[t(941)](r,{type:Ie[t(544)],ts:e,isIFrame:i,cts:0})}}}))},handleVideoH265Frames(t){const r=e;let n=[],i=[],s=!1,o=!1;K.pendingUnits[r(738)]&&(n=K[r(1104)].units,o=K[r(1104)][r(1381)],s=K[r(1104)][r(737)],K[r(1104)]={});let a={};for(let e of t){if(e.byteLength<4)continue;const t=cn(e);let c=!1,u=dn(t);ln(t)&&(a=K[r(1247)](e),c=!0),n[r(1107)]&&o&&(a[r(1238)]||!c)&&(i[r(1375)]({units:n,isIFrame:s}),n=[],s=!1,o=!1),n[r(1375)](e),s=s||u,o=o||c}n[r(1107)]&&(K[r(1104)]={units:n,vcl:o,iFrame:s}),i[r(1296)]((e=>{const t=r,n=e[t(738)],i=e.isIFrame;let s=null,o=null;if(n[t(1296)]((e=>{const r=t,n=e[0]>>>1&63;switch(n){case Fe[r(1448)]:K[r(1448)]=e;break;case Fe[r(811)]:K.sps=e;break;case Fe[r(672)]:K[r(672)]=e;break;case Fe[r(1371)]:case Fe[r(965)]:o=e}if(ln(n)){const t=kt(e);if(s){const e=new Uint8Array(s[r(1408)]+t[r(1408)]);e.set(s,0),e[r(771)](t,s.byteLength),s=e}else s=t}})),!K.isSendSeqHeader&&K[t(811)]&&K[t(1448)]&&K.vps){K[t(1356)]=!0;const e=sn({sps:K[t(811)],pps:K[t(1448)],vps:K.vps});te[t(1291)](e,{type:Ie[t(544)],ts:0,isIFrame:!0,cts:0}),K[t(811)]=null,K.pps=null,K.vps=null}if(K[t(1356)]){if(K.sps&&K[t(1448)]&&K[t(672)]){const e=sn({sps:K.sps,pps:K[t(1448)],vps:K[t(672)]}),r=K.localDts;te[t(1291)](e,{type:Ie[t(544)],ts:r,isIFrame:!0,cts:0}),K[t(811)]=null,K[t(1448)]=null,K[t(672)]=null}if(s){const e=K[t(695)](),r=an(s,i);if(te._opt.isEmitSEI&&o){const r=Et(o,!0);postMessage({cmd:Se[t(552)],buffer:r[t(1314)],ts:e},[r[t(1314)].buffer])}K[t(941)](r,{type:Ie.video,ts:e,isIFrame:i,cts:0})}}}))},handleVideoH265Frames_1(t){t[e(1296)]((e=>{K.handleVideoNalu(e)}))},parseVideo264Header(t){const r=e,n=new Ja(t);return n[r(1229)](),{isfms:0===n[r(1257)](),sType:n[r(1257)]()}},parseVideo265Header(t){const r=e,n=new Ja(t);return n[r(1229)](),{nalType:n[r(919)](6),isfms:0===n.readBits(1),sType:n[r(919)](3)}}},X={LOG_NAME:e(602),mp4Box:null,offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){const t=e;X[t(769)]=Ao[t(655)](),X[t(769)][t(731)]=X.onReady,X[t(769)].onError=X[t(679)],X.mp4Box[t(760)]=X[t(760)],te[t(521)](X[t(1103)],t(625))},destroy(){const t=e;X[t(769)]&&(X.mp4Box[t(1226)](),X[t(769)][t(868)](),X[t(769)].destroy(),X[t(769)]=null),X[t(754)]=0,X[t(914)]=null,X.audioTrackId=null,X[t(987)]=!1,te.debugLog(X[t(1103)],"destroy")},_getSeqHeader(t){const r=e,n=X.mp4Box[r(989)](t.id);for(const e of n[r(1373)][r(809)][r(500)].stsd[r(1101)])if(e[r(1081)]||e[r(535)]){const t=new(Ao[r(1084)])(void 0,0,Ao[r(1084)][r(974)]);let n=[];e[r(1081)]?(e[r(1081)][r(1275)](t),n=[23,0,0,0,0]):(X[r(987)]=!0,te.isHevc=!0,e[r(535)][r(1275)](t),n=[28,0,0,0,0]);const i=new Uint8Array(t[r(739)],8),s=new Uint8Array(n[r(1107)]+i[r(1107)]);return s[r(771)](n,0),s[r(771)](i,n[r(1107)]),s}return null},onReady(t){const r=e;te.debugLog(X[r(1103)],"onReady()");const n=t[r(515)][0],i=t[r(1065)][0];if(n){X[r(914)]=n.id;const e=X[r(508)](n);e&&(te[r(521)](X[r(1103)],r(1307)),te[r(1367)](e,0,!0,0)),X.mp4Box[r(763)](n.id)}if(i&&te[r(706)].hasAudio){X[r(547)]=i.id;const e=i[r(615)]||{},t=ht[r(785)](e[r(1438)]),n=i[r(1418)][r(578)]("mp4a.40.","");X[r(769)][r(763)](i.id);const s=ft({profile:parseInt(n,10),sampleRate:t,channel:e.channel_count});te[r(521)](X.LOG_NAME,r(821)),te[r(943)](s,0)}X[r(769)][r(631)]()},onError(t){const r=e;te[r(582)](X.LOG_NAME,r(536),t)},onSamples(t,r,n){const i=e;if(t===X.videoTrackId){for(const e of n){const t=e[i(556)],r=e[i(1206)],n=1e3*e[i(1259)]/e[i(935)];e.duration,e[i(935)],r&&te[i(980)](n);let s=null;s=X.isHevc?an(t,r):xr(t,r),te.decode(s,{type:Ie.video,ts:n,isIFrame:r,cts:0})}X[i(769)][i(1168)](t)}else if(t===X[i(547)]){if(te[i(706)][i(1099)]){for(const e of n){const t=e[i(556)],r=1e3*e.cts/e[i(935)];e[i(648)],e[i(935)];const n=new Uint8Array(t[i(1408)]+2);n[i(771)]([175,1],0),n[i(771)](t,2),te[i(1291)](n,{type:Ie[i(615)],ts:r,isIFrame:!1,cts:0})}X[i(769)][i(1168)](t)}}else te[i(795)](X.LOG_NAME,i(1068),t)},dispatch(t){const r=e;let n=new Uint8Array(t);n.buffer[r(517)]=X[r(754)],X[r(754)]+=n[r(1408)],X[r(769)][r(806)](n[r(739)])}},J={LOG_NAME:e(1299),lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:e(625),hasInitVideoCodec:!1,localDts:0,dispatch(t){const r=e,n=new Uint8Array(t);J[r(1293)](n)},destroy(){const t=e;J.lastBuffer=new Uint8Array(0),J.parsedOffset=0,J[t(1331)]=0,J.secondStartCodeOffset=0,J[t(649)]=t(625),J.hasInitVideoCodec=!1,J[t(800)]=0,te[t(521)](J[t(1103)],t(1019))},extractNALu(t){const r=e;if(!t||t[r(1408)]<1)return void te[r(795)](J[r(1103)],"extractNALu() buffer error",t);const n=new Uint8Array(J[r(665)].length+t[r(1107)]);for(n[r(771)](J[r(665)],0),n[r(771)](new Uint8Array(t),J[r(665)][r(1107)]),J.lastBuffer=n;;){if(J[r(649)]===r(625)){let e=!1;for(;J.lastBuffer[r(1107)]-J.parsedOffset>=4;)if(0===J[r(665)][J[r(587)]])if(0===J[r(665)][J[r(587)]+1])if(1===J.lastBuffer[J[r(587)]+2]){if(182===J[r(665)][J[r(587)]+3]){J.state=r(592),J.firstStartCodeOffset=J[r(587)],J[r(587)]+=4,e=!0;break}J.parsedOffset++}else J[r(587)]++;else J[r(587)]++;else J.parsedOffset++;if(e)continue;break}if("findFirstStartCode"===J[r(649)]){let e=!1;for(;J.lastBuffer[r(1107)]-J[r(587)]>=4;)if(0===J[r(665)][J[r(587)]])if(0===J.lastBuffer[J.parsedOffset+1])if(1===J.lastBuffer[J[r(587)]+2]){if(182===J[r(665)][J[r(587)]+3]){J[r(649)]=r(538),J.secondStartCodeOffset=J[r(587)],J.parsedOffset+=4,e=!0;break}J[r(587)]++}else J[r(587)]++;else J[r(587)]++;else J.parsedOffset++;if(e)continue;break}if("findSecondStartCode"===J[r(649)]){if(!(J[r(665)][r(1107)]-J.parsedOffset>0))break;{let e,t=192&J[r(665)][J[r(587)]];e=0==t?J[r(741)]-14:J[r(741)];let n,i=0==(192&J[r(665)][J[r(1331)]+4]);if(i){if(J[r(1331)]-14<0)return void te[r(795)](J[r(1103)],"firstStartCodeOffset -14 is",J[r(1331)]-14);!J[r(850)]&&(J.hasInitVideoCodec=!0,te.debugLog(J[r(1103)],r(1121)),ne.setCodec(De[r(1102)],"",te[r(1110)]())),n=J[r(665)].subarray(J[r(1331)]-14,e)}else n=J[r(665)].subarray(J[r(1331)],e);let s=J[r(695)]();J[r(850)]?(postMessage({cmd:Se.workerFetch,type:ke[r(773)],value:n[r(1408)]}),postMessage({cmd:Se.workerFetch,type:ke[r(502)],value:s}),g=s,ne.decode(n,i?1:0,s)):te[r(795)](J.LOG_NAME,"has not init video codec"),J.lastBuffer=J.lastBuffer[r(542)](e),J.firstStartCodeOffset=0==t?14:0,J[r(587)]=J.firstStartCodeOffset+4,J[r(649)]="findFirstStartCode"}}}},getNaluDts(){const t=e;let r=J[t(800)];return J[t(800)]=J[t(800)]+40,r}},Z={TAG_NAME:e(975),first_parse_:!0,tsPacketSize:0,syncOffset:0,pmt_:null,config_:null,media_info_:new qa,timescale_:90,duration_:0,pat_:{version_number:0,network_pid:0,program_map_pid:{}},current_program_:null,current_pmt_pid_:-1,program_pmt_map_:{},pes_slice_queues_:{},section_slice_queues_:{},video_metadata_:{vps:null,sps:null,pps:null,details:null},audio_metadata_:{codec:null,audio_object_type:null,sampling_freq_index:null,sampling_frequency:null,channel_config:null},last_pcr_:null,audio_last_sample_pts_:void 0,aac_last_incomplete_data_:null,has_video_:!1,has_audio_:!1,video_init_segment_dispatched_:!1,audio_init_segment_dispatched_:!1,video_metadata_changed_:!1,audio_metadata_changed_:!1,loas_previous_frame:null,video_track_:{type:"video",id:1,sequenceNumber:0,samples:[],length:0},audio_track_:{type:"audio",id:2,sequenceNumber:0,samples:[],length:0},_remainingPacketData:null,init(){},destroy(){const t=e;Z[t(897)]=null,Z.pes_slice_queues_=null,Z.section_slice_queues_=null,Z[t(611)]=null,Z[t(927)]=null,Z[t(1428)]=null,Z[t(755)]=null,Z.audio_track_=null,Z._remainingPacketData=null,te[t(521)](Z[t(1390)],"destroy")},probe(t){const r=e;let n=new Uint8Array(t),i=-1,s=188;if(n[r(1408)]<=3*s)return{needMoreData:!0};for(;-1===i;){let e=Math[r(1e3)](1e3,n[r(1408)]-3*s);for(let t=0;t=4&&(i-=4),{match:!0,consumed:0,ts_packet_size:s,sync_offset:i})},_initPmt:()=>({program_number:0,version_number:0,pcr_pid:0,pid_stream_type:{},common_pids:{h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0,g711a:void 0,g711u:void 0},pes_private_data_pids:{},timed_id3_pids:{},synchronous_klv_pids:{},asynchronous_klv_pids:{},scte_35_pids:{},smpte2038_pids:{}}),dispatch(t){const r=e;Z._remainingPacketData&&(t=ma(Z[r(723)],t),Z[r(723)]=null);let n=t.buffer;const i=Z[r(1154)](n);i?Z._remainingPacketData=t[r(542)](i):t[r(1107)]>>6;e[1];let o=(31&e[1])<<8|e[2],a=(48&e[3])>>>4,c=15&e[3],u=!(!Z[r(1276)]||Z[r(1276)][r(1144)]!==o),l={},d=4;if(2==a||3==a){let t=e[4];if(t>0&&(u||3==a)&&(l[r(725)]=(128&e[5])>>>7,l[r(972)]=(64&e[5])>>>6,l[r(1445)]=(32&e[5])>>>5,(16&e[5])>>>4)){let t=300*(e[6]<<25|e[7]<<17|e[8]<<9|e[9]<<1|e[10]>>>7)+((1&e[10])<<8|e[11]);Z[r(1031)]=t}if(2==a||5+t===188){n+=188,204===Z[r(1359)]&&(n+=16);continue}d=5+t}if(1==a||3==a)if(0===o||o===Z[r(1188)]||null!=Z[r(1276)]&&Z.pmt_[r(545)][o]===Na[r(1376)]){let e=188-d;Z.handleSectionSlice(t,n+d,e,{pid:o,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l[r(972)]})}else if(null!=Z[r(1276)]&&null!=Z[r(1276)][r(545)][o]){let e=188-d,i=Z[r(1276)][r(545)][o];(o===Z[r(1276)][r(1058)][r(1035)]||o===Z.pmt_.common_pids.h265||o===Z[r(1276)].common_pids.adts_aac||o===Z[r(1276)][r(1058)].loas_aac||o===Z[r(1276)][r(1058)][r(1120)]||o===Z[r(1276)][r(1058)][r(1333)]||o===Z[r(1276)][r(1058)][r(573)]||o===Z[r(1276)].common_pids[r(1002)]||o===Z[r(1276)][r(1058)][r(1025)]||o===Z[r(1276)][r(1058)].g711u||!0===Z[r(1276)][r(1262)][o]||!0===Z[r(1276)].timed_id3_pids[o]||!0===Z[r(1276)][r(891)][o]||!0===Z[r(1276)][r(1126)][o])&&Z[r(1453)](t,n+d,e,{pid:o,stream_type:i,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l[r(972)]})}n+=188,204===Z[r(1359)]&&(n+=16)}return Z[r(876)](),n},handleSectionSlice(t,r,n,i){const s=e;let o=new Uint8Array(t,r,n),a=Z[s(1189)][i.pid];if(i.payload_unit_start_indicator){let e=o[0];if(null!=a&&0!==a[s(849)]){let o=new Uint8Array(t,r+1,Math[s(1e3)](n,e));a[s(622)][s(1375)](o),a.total_length+=o[s(1408)],a[s(849)]===a[s(770)]?Z[s(1444)](a,i):Z[s(1048)](a,i)}for(let c=1+e;c=a.expected_length&&Z[s(1048)](a,i),c+=u.byteLength}}else if(null!=a&&0!==a[s(849)]){let e=new Uint8Array(t,r,Math.min(n,a.expected_length-a.total_length));a[s(622)][s(1375)](e),a[s(849)]+=e[s(1408)],a[s(849)]===a[s(770)]?Z[s(1444)](a,i):a[s(849)]>=a[s(770)]&&Z[s(1048)](a,i)}},handlePESSlice(t,r,n,i){const s=e;let o=new Uint8Array(t,r,n),a=o[0]<<16|o[1]<<8|o[2];o[3];let c=o[4]<<8|o[5];if(i[s(782)]){if(1!==a)return void te[s(795)](Z[s(1390)],s(560)+a);let e=Z[s(1109)][i[s(1044)]];e&&(0===e[s(770)]||e[s(770)]===e[s(849)]?Z[s(571)](e,i):Z[s(1048)](e,i)),Z[s(1109)][i[s(1044)]]=new Va,Z.pes_slice_queues_[i[s(1044)]][s(972)]=i.random_access_indicator}if(null==Z[s(1109)][i.pid])return;let u=Z[s(1109)][i[s(1044)]];u[s(622)][s(1375)](o),i[s(782)]&&(u[s(770)]=0===c?0:c+6),u[s(849)]+=o[s(1408)],u[s(770)]>0&&u[s(770)]===u[s(849)]?Z[s(571)](u,i):u[s(770)]>0&&u.expected_length>>6,c=n[8];(2===a||3===a)&&(e=536870912*(14&n[9])+4194304*(255&n[10])+16384*(254&n[11])+128*(255&n[12])+(254&n[13])/2,i=3===a?536870912*(14&n[14])+4194304*(255&n[15])+16384*(254&n[16])+128*(255&n[17])+(254&n[18])/2:e);let u,l=9+c;if(0!==o){if(o<3+c)return void te[r(795)](Z[r(1390)],r(1311));u=o-3-c}else u=n[r(1408)]-l;let d=n[r(542)](l,l+u);switch(t[r(526)]){case Na[r(851)]:case Na.kMPEG2Audio:Z[r(889)](d,e);break;case Na[r(1014)]:Z[r(1276)][r(1058)][r(573)]===t.pid?Z[r(564)](d,e):Z[r(1276)].common_pids[r(1120)]===t[r(1044)]?Z.parseAC3Payload(d,e):Z.pmt_[r(1058)].eac3===t[r(1044)]?Z.parseEAC3Payload(d,e):Z[r(1276)][r(1126)][t.pid]?Z[r(621)](d,t[r(1044)],s):Z.pmt_[r(1305)][t[r(1044)]]?Z[r(640)](d,e,i,t.pid,s):Z[r(735)](d,e,i,t[r(1044)],s);break;case Na[r(825)]:Z[r(597)](d,e);break;case Na[r(642)]:Z[r(641)](d,e);break;case Na[r(915)]:Z[r(1076)](d,e);break;case Na.kEAC3:Z[r(1008)](d,e);break;case Na[r(1087)]:Z[r(1276)][r(559)][t[r(1044)]]?Z.parseTimedID3MetadataPayload(d,e,i,t[r(1044)],s):Z.pmt_[r(891)][t.pid]&&Z.parseSynchronousKLVMetadataPayload(d,e,i,t[r(1044)],s);break;case Na.kH264:Z[r(960)](d,e,i,t[r(972)]);break;case Na[r(630)]:Z.parseH265Payload(d,e,i,t[r(972)]);break;case Na[r(1256)]:Z[r(1108)](d,e,!0);break;case Na.G711U:Z[r(1108)](d,e,!1);break;default:te[r(521)](Z[r(1390)],"Unsupported stream. type: "+t[r(526)]+r(1369)+t[r(1044)])}}else if((188===s||191===s||240===s||241===s||255===s||242===s||248===s)&&t[r(526)]===Na.kPESPrivateData){let e,i=6;e=0!==o?o:n[r(1408)]-i;let a=n[r(542)](i,i+e);Z[r(735)](a,void 0,void 0,t[r(1044)],s)}}else te[r(582)](Z[r(1390)],r(1082)+i)},parsePAT(t){const r=e;let n=t[0];if(0!==n)return void Log.e(Z.TAG,r(1067)+n+r(1249));let i=(15&t[1])<<8|t[2];t[3],t[4];let s=(62&t[5])>>>1,o=1&t[5],a=t[6];t[7];let c=null;if(1===o&&0===a)c={version_number:0,network_pid:0,program_pmt_pid:{}},c.version_number=s;else if(c=Z.pat_,null==c)return;let u=i-5-4,l=-1,d=-1;for(let e=8;e<8+u;e+=4){let n=t[e]<<8|t[e+1],i=(31&t[e+2])<<8|t[e+3];0===n?c[r(959)]=i:(c[r(1355)][n]=i,-1===l&&(l=n),-1===d&&(d=i))}1===o&&0===a&&(null==Z[r(1204)]&&te[r(521)](Z[r(1390)],r(952)+JSON.stringify(c)),Z.pat_=c,Z.current_program_=l,Z.current_pmt_pid_=d)},parsePMT(t){const r=e;let n=t[0];if(2!==n)return void te.debugError(Z.TAG_NAME,"parsePMT: table_id "+n+r(1011));let i,s=(15&t[1])<<8|t[2],o=t[3]<<8|t[4],a=(62&t[5])>>>1,c=1&t[5],u=t[6];if(t[7],1===c&&0===u)i=Z[r(783)](),i.program_number=o,i.version_number=a,Z[r(1434)][o]=i;else if(i=Z[r(1434)][o],null==i)return;i[r(1144)]=(31&t[8])<<8|t[9];let l=(15&t[10])<<8|t[11],d=12+l,h=s-9-l-4;for(let e=d;e0){for(let n=e+5;n0)for(let n=e+5;n1&&(te[n(795)](Z.TAG_NAME,n(1228)+(n(721)+e+n(986)+s+"ms")),s=e)}}let o,a=new bt(t),c=null,u=s;for(;null!=(c=a.readNextAACFrame());){i=1024/c.sampling_frequency*1e3;const e={codec:n(513),data:c};0==Z[n(1244)]?(Z[n(927)]={codec:"aac",audio_object_type:c[n(1163)],sampling_freq_index:c.sampling_freq_index,sampling_frequency:c[n(1410)],channel_config:c[n(639)]},Z[n(1281)](e)):Z[n(504)](e)&&(Z[n(962)](),Z[n(1281)](e)),o=u;let t=Math.floor(u);const r=new Uint8Array(c.data.length+2);r[n(771)]([175,1],0),r[n(771)](c[n(556)],2);let s={payload:r,length:r.byteLength,pts:t,dts:t,type:Ie.audio};Z.audio_track_[n(541)][n(1375)](s),Z[n(1106)][n(1107)]+=r[n(1408)],u+=i}a[n(808)]()&&(Z[n(1428)]=a.getIncompleteData()),o&&(Z.audio_last_sample_pts_=o)},parseLOASAACPayload(t,r){const n=e;if(Z[n(1303)]&&!Z[n(1095)])return;if(Z.aac_last_incomplete_data_){let e=new Uint8Array(t[n(1408)]+Z[n(1428)][n(1408)]);e[n(771)](Z[n(1428)],0),e[n(771)](t,Z[n(1428)][n(1408)]),t=e}let i,s;if(null!=r&&(s=r/Z[n(1032)]),Z[n(927)][n(1418)]===n(513)){if(null==r&&null!=Z.audio_last_sample_pts_)i=1024/Z[n(927)][n(1410)]*1e3,s=Z[n(1362)]+i;else if(null==r)return void te[n(795)](Z[n(1390)],"AAC: Unknown pts");if(Z[n(1428)]&&Z.audio_last_sample_pts_){i=1024/Z[n(927)][n(1410)]*1e3;let e=Z[n(1362)]+i;Math[n(540)](e-s)>1&&(te[n(795)](Z[n(777)],"AAC: Detected pts overlapped, "+(n(721)+e+n(986)+s)+"ms"),s=e)}}let o,a=new wt(t),c=null,u=s;for(;null!=(c=a[n(1209)](zt(Z[n(1012)])?void 0:Z[n(1012)]));){Z.loas_previous_frame=c,i=1024/c.sampling_frequency*1e3;const e={codec:"aac",data:c};0==Z[n(1244)]?(Z[n(927)]={codec:"aac",audio_object_type:c[n(1163)],sampling_freq_index:c[n(1397)],sampling_frequency:c[n(1410)],channel_config:c[n(639)]},Z.dispatchAudioInitSegment(e)):Z[n(504)](e)&&(Z[n(962)](),Z[n(1281)](e)),o=u;let t=Math[n(1156)](u);const r=new Uint8Array(c.data[n(1107)]+2);r.set([175,1],0),r.set(c[n(556)],2);let s={payload:r,length:r[n(1408)],pts:t,dts:t,type:Ie.audio};Z.audio_track_.samples.push(s),Z[n(1106)][n(1107)]+=r[n(1408)],u+=i}a[n(808)]()&&(Z[n(1428)]=a[n(752)]()),o&&(Z[n(1362)]=o)},parseAC3Payload(e,t){},parseEAC3Payload(e,t){},parseOpusPayload(e,t){},parseMP3Payload(t,r){const n=e;if(Z[n(1303)]&&!Z[n(1095)])return;let i=[44100,48e3,32e3,0],s=[22050,24e3,16e3,0],o=[11025,12e3,8e3,0],a=t[1]>>>3&3,c=(6&t[1])>>1,u=(t[2],(12&t[2])>>>2),l=3!=(t[3]>>>6&3)?2:1,d=0,h=34;switch(n(1002),a){case 0:d=o[u];break;case 2:d=s[u];break;case 3:d=i[u]}switch(c){case 1:h=34;break;case 2:h=33,n(1107);break;case 3:h=32}const f={};f.object_type=h,f[n(1438)]=d,f[n(1427)]=l,f[n(556)]=t;const p={codec:n(1002),data:f};0==Z[n(1244)]?(Z[n(927)]={codec:"mp3",object_type:h,sample_rate:d,channel_count:l},Z[n(1281)](p)):Z[n(504)](p)&&(Z.dispatchAudioMediaSegment(),Z[n(1281)](p));const m=new Uint8Array(t[n(1107)]+1);m.set([32],0),m[n(771)](t,1);let v={payload:m,length:m.byteLength,pts:r/Z[n(1032)],dts:r/Z[n(1032)],type:Ie[n(615)]};Z[n(1106)][n(541)].push(v),Z[n(1106)][n(1107)]+=m[n(1408)]},parseG711Payload(t,r,n){const i=e;if(Z[i(1303)]&&!Z[i(1095)])return;const s={};s[i(1438)]=8e3,s[i(1427)]=1;const o={codec:i(n?1025:816)};0==Z[i(1244)]?(Z[i(927)]={codec:o[i(1418)],sample_rate:s[i(1438)],channel_count:s[i(1427)]},Z.dispatchAudioInitSegment(o)):Z.detectAudioMetadataChange(o)&&(Z[i(962)](),Z[i(1281)](o));const a=new Uint8Array(t.length+1),c=n?[114]:[130];a[i(771)](c,0),a[i(771)](t,1);let u={payload:a,length:a[i(1408)],pts:r/Z[i(1032)],dts:r/Z.timescale_,type:Ie.audio};Z.audio_track_[i(541)][i(1375)](u),Z.audio_track_.length+=a[i(1408)]},detectAudioMetadataChange(t){const r=e;if(t[r(1418)]!==Z.audio_metadata_[r(1418)])return te[r(521)](Z[r(1390)],r(1098)+(Z.audio_metadata_[r(1418)]+r(1363)+t[r(1418)])),!0;if(t.codec===r(513)&&Z[r(927)][r(1418)]===r(513)){const e=t.data;if(e.audio_object_type!==Z[r(927)][r(1163)])return te[r(521)](Z.TAG_NAME,r(1042)+(Z[r(927)].audio_object_type+" to ")+e[r(1163)]),!0;if(e[r(1397)]!==Z[r(927)][r(1397)])return te.debugLog(Z[r(1390)],r(977)+(Z[r(927)].sampling_freq_index+r(1363)+e[r(1397)])),!0;if(e[r(639)]!==Z[r(927)][r(639)])return te[r(521)](Z[r(1390)],r(961)+(Z[r(927)][r(639)]+r(1363)+e[r(639)])),!0}else if(t[r(1418)]===r(1351)&&"ac-3"===Z[r(927)].codec){const e=t[r(556)];if(e[r(1410)]!==Z.audio_metadata_[r(1410)])return te[r(521)](Z[r(1390)],r(1377)+(Z.audio_metadata_[r(1410)]+r(1363)+e.sampling_frequency)),!0;if(e[r(608)]!==Z[r(927)][r(608)])return te[r(521)](Z[r(1390)],r(1105)+(Z.audio_metadata_[r(608)]+r(1363)+e[r(608)])),!0;if(e[r(1313)]!==Z[r(927)][r(1313)])return te[r(521)](Z[r(1390)],r(689)+(Z.audio_metadata_[r(1313)]+r(1363)+e.bit_stream_mode)),!0;if(e[r(840)]!==Z[r(927)].channel_mode)return te[r(521)](Z[r(1390)],r(913)+(Z[r(927)][r(840)]+r(1363)+e[r(840)])),!0;if(e.low_frequency_effects_channel_on!==Z[r(927)][r(1160)])return te[r(521)](Z.TAG_NAME,"AC3: Low Frequency Effects Channel On changed from "+(Z[r(927)].low_frequency_effects_channel_on+r(1363)+e[r(1160)])),!0}else if(t.codec===r(573)&&Z[r(927)][r(1418)]===r(573)){const e=t[r(1201)];if(e.sample_rate!==Z[r(927)][r(1438)])return te.debugLog(Z[r(1390)],"Opus: SamplingFrequencyIndex changed from "+Z[r(927)][r(1438)]+" to "+e.sample_rate),!0;if(e[r(1427)]!==Z.audio_metadata_.channel_count)return te[r(521)](Z[r(1390)],r(1066)+(Z.audio_metadata_.channel_count+r(1363)+e[r(1427)])),!0}else if(t[r(1418)]===r(1002)&&Z.audio_metadata_[r(1418)]===r(1002)){const e=t[r(556)];if(e[r(1391)]!==Z[r(927)][r(1391)])return te.debugLog(Z.TAG_NAME,r(1398)+(Z.audio_metadata_[r(1391)]+r(1363)+e.object_type)),!0;if(e[r(1438)]!==Z.audio_metadata_[r(1438)])return te[r(521)](Z.TAG_NAME,r(1056)+(Z[r(927)][r(1438)]+r(1363)+e[r(1438)])),!0;if(e.channel_count!==Z[r(927)][r(1427)])return te[r(521)](Z[r(1390)],"MP3: Channel count changed from "+(Z[r(927)].channel_count+r(1363)+e[r(1427)])),!0}return!1},dispatchAudioInitSegment(t){const r=e;let n={};if(n[r(684)]=r(615),n.id=Z[r(1106)].id,n[r(935)]=1e3,n[r(648)]=Z[r(950)],"aac"===Z[r(927)][r(1418)]){let e=t[r(1418)]===r(513)?t[r(556)]:null,i=new $a(e);n[r(1158)]=i[r(886)],n[r(1261)]=i[r(968)],n[r(984)]=i[r(1427)],n[r(1418)]=i[r(555)],n[r(703)]=i[r(1230)],n[r(1190)]=i.config,n[r(594)]=1024/n[r(1158)]*n[r(935)],r(686);const s=ft({profile:te[r(706)][r(981)]?i[r(1391)]:i[r(1269)],sampleRate:n[r(1261)],channel:n.channelCount});te[r(943)](s,0)}else Z.audio_metadata_.codec===r(1351)||Z[r(927)].codec===r(1185)||Z[r(927)].codec===r(573)||("mp3"===Z[r(927)][r(1418)]?(n[r(1158)]=Z[r(927)].sample_rate,n[r(984)]=Z.audio_metadata_[r(1427)],n.codec="mp3",n[r(703)]=r(1002),n.config=void 0,r(1164)):Z[r(927)][r(1418)]===r(1025)?(n.audioSampleRate=Z[r(927)][r(1438)],n[r(984)]=Z[r(927)][r(1427)],n[r(1418)]=r(1025),n.originalCodec="g711a",n[r(1190)]=void 0,r(1256)):Z[r(927)][r(1418)]===r(816)&&(n[r(1158)]=Z.audio_metadata_[r(1438)],n[r(984)]=Z.audio_metadata_.channel_count,n[r(1418)]=r(816),n.originalCodec=r(816),n.config=void 0,r(523)));0==Z[r(1244)]&&te[r(521)](Z[r(1390)],r(681)+n[r(1418)]),Z[r(1244)]=!0,Z[r(820)]=!1},dispatchPESPrivateDataDescriptor(t,r,n){const i=e;let s={};s[i(1044)]=t,s.stream_type=r,s[i(654)]=n},parsePESPrivateDataPayload(t,r,n,i,s){const o=e;let a=new Wa;if(a[o(1044)]=i,a[o(917)]=s,a[o(1282)]=t.byteLength,a[o(556)]=t,null!=r){let e=Math[o(1156)](r/Z[o(1032)]);a.pts=e}else a[o(676)]=Z[o(1146)]();if(null!=n){let e=Math[o(1156)](n/Z[o(1032)]);a[o(1220)]=e}},parseTimedID3MetadataPayload(t,r,n,i,s){const o=e;te[o(521)](Z[o(1390)],o(896)+i+o(758)+r+o(1340)+n+o(1273)+s)},parseSynchronousKLVMetadataPayload(t,r,n,i,s){const o=e;te[o(521)](Z[o(1390)],o(1278)+i+o(758)+r+", dts="+n+", stream_id="+s)},parseAsynchronousKLVMetadataPayload(t,r,n){const i=e;te.debugLog(Z[i(1390)],i(1335)+r+", stream_id="+n)},parseSMPTE2038MetadataPayload(t,r,n,i,s){const o=e;te[o(521)](Z[o(1390)],o(607)+i+o(758)+r+o(1340)+n+o(1273)+s)},getNearestTimestampMilliseconds(){const t=e;return null!=Z.audio_last_sample_pts_?Math.floor(Z[t(1362)]):null!=Z[t(1031)]?Math[t(1156)](Z[t(1031)]/300/Z[t(1032)]):void 0},_preDoDecode(){const t=e,r=Z[t(755)],n=Z[t(1106)];let i=r[t(541)];Z[t(1182)](r),Z[t(1182)](n),n[t(541)][t(1107)]>0&&(i=r.samples[t(1074)](n[t(541)]),i=i[t(1128)](((e,r)=>{const n=t;return e[n(1220)]-r[n(1220)]}))),i[t(1296)]((e=>{const r=t,n=new Uint8Array(e[r(1314)]);delete e[r(1314)],e.type===Ie[r(544)]?Z[r(1336)]({...e,payload:n}):e[r(684)]===Ie[r(615)]&&Z[r(1055)]({...e,payload:n})})),r[t(541)]=[],r[t(1107)]=0,n[t(541)]=[],n[t(1107)]=0},_doDecodeVideo(t){const r=e,n=new Uint8Array(t[r(1314)]);let i=null;i=t[r(987)]?an(n,t.isIFrame):xr(n,t.isIFrame),t[r(499)]&&te[r(980)](t[r(1220)]);const s=te[r(1243)](i,t[r(499)]);te[r(1291)](s,{type:Ie.video,ts:t[r(1220)],isIFrame:t[r(499)],cts:t.cts})},_doDecodeAudio(t){const r=e,n=new Uint8Array(t[r(1314)]),i=te[r(601)](n);te[r(1291)](i,{type:Ie[r(615)],ts:t[r(1220)],isIFrame:!1,cts:0})},correctSamplePts(t){const r=e;let n=arguments[r(1107)]>1&&void 0!==arguments[1]?arguments[1]:5;const i=t[r(541)]||[];for(let e=0;e=s[r(1220)]&&(te[r(795)](Z[r(1390)],"correctSamplePts dts, dts: "+t[r(1220)]+", next dts: "+s[r(1220)]+r(698)),s[r(1220)]=t.dts+n)}}},Q=null;Jt()&&(Q={TAG_NAME:e(533),_resetInIt(){const t=e;Q[t(528)]=null,Q[t(991)]=null,Q[t(512)]={},Q[t(1140)]={},Q[t(912)]={},Q[t(1412)]=null,Q[t(518)]=null,Q[t(867)]=!1,Q[t(1137)]=!1,Q.isAudioInitInfo=!1,Q[t(589)]="",Q[t(1029)]="",Q[t(1409)]={},Q[t(718)]={},Q.timeInit=!1,Q[t(1321)]=0,Q[t(1395)]=0,Q[t(1419)]=null,Q[t(1393)]=null,Q.mediaSourceAppendBufferFull=!1,Q.mediaSourceAppendBufferError=!1,Q[t(1385)]=!1,Q[t(804)]=!1,Q.mediaSourceError=!1,Q[t(822)]=null,Q[t(998)]=null,Q[t(902)]=null,Q[t(1093)]=null,Q[t(1129)]=0,Q[t(929)]=!1,Q[t(724)]=null,Q.prevAudioTs=null,Q[t(1301)]=[],Q.pendingRemoveRanges=[],Q[t(583)]=[],Q[t(836)]=[],Q.pendingAudioSegments=[],Q[t(899)]=null,Q[t(1232)]=null,Q[t(590)]=null,Q[t(1341)]=!1,Q.$video={currentTime:0,readyState:0}},init(){const t=e;Q[t(1006)]=new ba,Q[t(1432)](),Q[t(632)]=new(self[t(992)]),Q[t(1208)]=!!Xt(te._opt.checkFirstIFrame),Q[t(585)](),te[t(521)](Q[t(1390)],"init")},destroy(){const t=e;Q.stop(),Q[t(1139)](),Q.eventListenList&&Q[t(1301)].length&&(Q[t(1301)][t(1296)]((e=>e())),Q[t(1301)]=[]),Q[t(1432)](),Q[t(632)]=null,te.debugLog(Q.TAG_NAME,"destroy")},getState(){const t=e;return Q[t(632)]&&Q[t(632)].readyState},isStateOpen(){const t=e;return Q[t(1416)]()===ze[t(645)]},isStateClosed(){const t=e;return Q[t(1416)]()===ze[t(704)]},isStateEnded(){const t=e;return Q.getState()===ze[t(1148)]},_bindMediaSourceEvents(){const t=e,{proxy:r}=Q[t(1006)],n=r(Q[t(632)],Ne[t(1205)],(()=>{const e=t;te[e(521)](Q[e(1390)],"sourceOpen"),Q[e(1175)]()})),i=r(Q[t(632)],Ne[t(1212)],(()=>{const e=t;te[e(521)](Q.TAG_NAME,e(1212))})),s=r(Q.mediaSource,Ne[t(1218)],(()=>{const e=t;te[e(521)](Q[e(1390)],e(1218))}));Q[t(1301)][t(1375)](n,i,s)},_onMediaSourceSourceOpen(){const t=e;!Q[t(1412)]&&(te[t(521)](Q.TAG_NAME,t(546)),Q[t(1094)]()),!Q[t(518)]&&(te[t(521)](Q[t(1390)],t(839)),Q[t(1325)]()),Q[t(933)]()&&Q[t(694)]()},decodeVideo(t,r,n,i){const s=e;if(te[s(1036)])te[s(795)](Q.TAG_NAME,s(1061));else if(Xt(Q.hasInit))if(n&&t[1]===je[s(894)]){const e=15&t[0];if(e===De[s(728)]&&Xt(te[s(706)][s(1151)]))return void Q[s(751)](xe[s(1030)]);Q[s(512)][s(1418)]=e,postMessage({cmd:Se[s(668)],code:e});const i=new Uint8Array(t);postMessage({cmd:Se[s(586)],buffer:i,codecId:e},[i[s(739)]]),Q[s(867)]=Q[s(1021)](t,r,n,e)}else te[s(795)](Q.TAG_NAME,s(1135)+n+" , payload is "+t[1]+s(774));else if(!Q[s(1208)]&&n&&(Q[s(1208)]=!0),Q[s(1208)]){if(n&&0===t[1]){const e=15&t[0];let r={};e===De.h264?r=Ar(t[s(598)](5)):e===De[s(728)]&&(r=tn(t));const n=Q[s(512)];n&&n[s(993)]&&n[s(1016)]&&r&&r.codecWidth&&r[s(756)]&&(r[s(1236)]!==n[s(993)]||r.codecHeight!==n[s(1016)])&&(te[s(795)](Q[s(1390)],s(644)+n[s(993)]+s(667)+n[s(1016)]+s(661)+r.codecWidth+", new height is "+r[s(756)]+s(595)),Q[s(929)]=!0,Q[s(751)](xe[s(803)],s(1436)+n.width+"->"+r[s(1236)]+s(1334)+n[s(1016)]+"->"+r[s(756)]))}if(Q[s(929)])return void te[s(795)](Q[s(1390)],s(548));if(Yt(t))return void te[s(521)](Q.TAG_NAME,s(951));if(t[s(1408)]0&&tye},_decodeConfigurationRecord(t,r,n,i){const s=e;let o=t[s(598)](5),a={};if(i===De[s(1035)]?a=Ar(o):i===De[s(728)]&&(a=rn(o)),Q.videoInfo[s(993)]=a[s(1236)],Q[s(512)][s(1016)]=a[s(756)],0===a[s(1236)]&&0===a[s(756)])return te.debugWarn(Q[s(1390)],"_decodeConfigurationRecord error",JSON[s(1322)](a)),Q.emitError(xe.mediaSourceDecoderConfigurationError,s(1213)+(0===a.codecWidth)+" and height is "+a[s(756)]),!1;const c={id:Ye.video,type:s(544),timescale:1e3,duration:0,avcc:o,codecWidth:a[s(1236)],codecHeight:a[s(756)],videoType:a.videoType},u=Ia[s(892)](c);return Q.isAvc=i===De[s(1035)],a.codec?Q[s(589)]=s(957)+a.codec+'"':Q.videoMimeType=Q.isAvc?Oe[s(1046)]:Oe.hev,postMessage({cmd:Se.initVideo,w:a.codecWidth,h:a[s(756)]}),Q[s(1094)](),Q.appendBuffer(u[s(739)]),Q[s(1321)]=0,Q[s(1409)]={},Q.timeInit=!1,!0},_decodeAudioConfigurationRecord(t,r){const n=e,i=t[0]>>4&15,s=t[0]>>1&1,o=i===Ue[n(1164)],a=i===Ue.AAC;if(Xt(a||o))return te[n(795)](Q[n(1390)],n(842)+i+n(937)),Q[n(751)](xe[n(882)]),!1;const c={id:Ye.audio,type:n(615),timescale:1e3};let u={};if(pt(t)){if(u=_t(t.slice(2)),!u)return!1;c.audioSampleRate=u[n(1123)],c[n(984)]=u[n(984)],c.config=u[n(1190)],c.refSampleDuration=1024/c.audioSampleRate*c[n(935)]}else{if(!o)return!1;if(u=Ra(t[n(598)](1)),!u)return!1;c.audioSampleRate=u[n(1123)],c[n(984)]=u[n(984)],c[n(594)]=1152/c[n(1158)]*c[n(935)]}c[n(1418)]=u.codec,c[n(648)]=0;let l=n(705),d=u[n(1418)],h=null;o&&Xt(te[n(706)][n(1396)])?(l="mpeg",d="",h=new Uint8Array):h=Ia[n(892)](c);let f=c[n(684)]+"/"+l;return d&&d.length>0&&(f+=n(1357)+d),Xt(Q[n(1171)])&&(z=i===Ue[n(686)]?s?16:8:0===s?8:16,postMessage({cmd:Se[n(1117)],code:i}),postMessage({cmd:Se[n(1010)],sampleRate:c[n(1158)],channels:c[n(984)],depth:z}),Q[n(1171)]=!0),Q[n(1029)]=f,Q[n(991)]=a,Q[n(1325)](),Q[n(663)](h.buffer),!0},_initSourceBuffer(){const t=e,{proxy:r}=Q[t(1006)];if(null===Q[t(1412)]&&null!==Q[t(632)]&&Q[t(910)]()&&Q[t(589)]){try{te[t(521)](Q[t(1390)],t(629),Q[t(589)]),Q[t(1412)]=Q.mediaSource[t(1138)](Q[t(589)])}catch(e){return te[t(582)](Q.TAG_NAME,t(1125),e[t(1384)],e[t(1178)](),e),Q[t(751)](xe[t(1255)],e[t(1384)]),void(Q[t(1385)]=!0)}if(Q[t(1412)]){const e=r(Q[t(1412)],t(1300),(e=>{const r=t;Q[r(804)]=!0,te.debugError(Q[r(1390)],r(794),e),Q[r(751)](xe[r(819)],r(744))})),n=r(Q[t(1412)],"updateend",(()=>{const e=t;Q[e(945)]()?Q._doRemoveRanges():Q[e(933)]()?Q[e(694)]():Q.hasPendingEos&&(te.debugLog(Q.TAG_NAME,"videoSourceBuffer updateend and hasPendingEos is true, next endOfStream()"),Q.endOfStream())}));Q[t(1301)][t(1375)](e,n)}}else te[t(521)](Q.TAG_NAME,"_initSourceBuffer and mseDecoder.isStateOpen is "+Q[t(910)]()+t(1319)+(null===Q[t(528)]))},_initAudioSourceBuffer(){const t=e,{proxy:r}=Q[t(1006)];if(null===Q[t(518)]&&null!==Q[t(632)]&&Q[t(910)]()&&Q[t(1029)]){try{te[t(521)](Q[t(1390)],"_initAudioSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()",Q[t(1029)]),Q._clearAudioSourceBufferCheckTimeout(),Q[t(518)]=Q.mediaSource.addSourceBuffer(Q.audioMimeType)}catch(e){return te.debugError(Q[t(1390)],"_initAudioSourceBuffer() addSourceBuffer mseDecoder.mediaSource.addSourceBuffer()",e[t(1384)],e[t(1178)](),e),Q[t(751)](xe[t(1255)],e[t(1384)]),void(Q[t(1385)]=!0)}if(Q[t(518)]){const e=r(Q[t(518)],t(1300),(e=>{const r=t;Q.mediaSourceBufferError=!0,te[r(582)](Q[r(1390)],"mseSourceBufferError mseDecoder.audioSourceBuffer",e),Q[r(751)](xe[r(819)],r(532))})),n=r(Q.audioSourceBuffer,t(1365),(()=>{const e=t;Q[e(945)]()?Q[e(1352)]():Q[e(933)]()?Q._doAppendSegments():Q[e(1341)]&&(te[e(521)](Q[e(1390)],"audioSourceBuffer updateend and hasPendingEos is true, next endOfStream()"),Q.endOfStream())}));Q[t(1301)].push(e,n),null===Q.audioSourceNoDataCheckTimeout&&(Q[t(590)]=setTimeout((()=>{const e=t;Q[e(658)](),Q[e(751)](xe[e(626)])}),1e3))}}else te[t(521)](Q[t(1390)],t(1152)+Q[t(910)]()+" and mseDecoder.audioMimeType is "+Q[t(1029)])},_decodeVideo(t,r,n,i,s){const o=e;let a=t[o(598)](5),c=a[o(1408)];if(0===c)return void te.debugWarn(Q[o(1390)],"_decodeVideo payload bytes is 0 and return");let u=(new Date)[o(906)](),l=!1;!Q.prevTimestamp&&(Q[o(822)]=u,l=!0);const d=u-Q[o(822)];if(Q[o(998)]=d,d>1e3&&!l&&te.isPlayer&&te.debugLog(Q[o(1390)],"_decodeVideo now time is "+u+" and prev time is "+Q.prevTimestamp+", diff time is "+d+o(1433)),Q.cacheTrack.id&&r>=Q[o(1409)][o(1220)]){let e=8+Q[o(1409)][o(501)],t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[o(771)](Ia[o(1237)][o(1437)],4),t[o(771)](Q[o(1409)][o(556)],8),Q.cacheTrack[o(648)]=r-Q[o(1409)][o(1220)];let n=Ia[o(988)](Q[o(1409)],Q[o(1409)][o(1220)]);Q[o(1409)]={};let i=new Uint8Array(n[o(1408)]+t[o(1408)]);i[o(771)](n,0),i.set(t,n.byteLength),Q[o(806)](i[o(739)])}else te[o(521)](Q[o(1390)],"timeInit set false , cacheTrack = {} now dts is "+r+o(1426)+s+o(877)+(Q[o(1409)]&&Q[o(1409)].dts)),Q.timeInit=!1,Q.cacheTrack={};!Q[o(1409)]&&(Q.cacheTrack={}),Q[o(1409)].id=Ye[o(544)],Q[o(1409)][o(1321)]=++Q[o(1321)],Q[o(1409)][o(501)]=c,Q.cacheTrack[o(1220)]=r,Q[o(1409)][o(1259)]=i,Q[o(1409)][o(824)]=n,Q[o(1409)].data=a,Q.cacheTrack.flags={isLeading:0,dependsOn:n?2:1,isDependedOn:n?1:0,hasRedundancy:0,isNonSync:n?0:1},Q[o(822)]=(new Date)[o(906)]()},_decodeAudio(t,r,n){const i=e;let s=Q.isAAC?t.slice(2):t[i(598)](1),o=s[i(1408)];if(Q[i(718)].id&&r>=Q[i(718)].dts){let e=8+Q[i(718)][i(501)],t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[i(771)](Ia[i(1237)][i(1437)],4),t[i(771)](Q[i(718)][i(556)],8),Q[i(718)][i(648)]=r-Q[i(718)][i(1220)];let n=Ia[i(988)](Q[i(718)],Q[i(718)][i(1220)]);Q[i(718)]={};let s=new Uint8Array(n[i(1408)]+t[i(1408)]);s[i(771)](n,0),s[i(771)](t,n[i(1408)]),Q[i(663)](s[i(739)])}else Q[i(718)]={};!Q[i(718)]&&(Q.cacheAudioTrack={}),Q.cacheAudioTrack.id=Ye[i(615)],Q.cacheAudioTrack[i(1321)]=++Q[i(1395)],Q[i(718)][i(501)]=o,Q[i(718)][i(1220)]=r,Q[i(718)][i(1259)]=0,Q[i(718)][i(556)]=s,Q[i(718)][i(627)]={isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}},appendBuffer(t){const r=e;te.isDestroyed?te[r(795)](Q[r(1390)],"appendBuffer() player is destroyed"):Q[r(1385)]?te[r(795)](Q[r(1390)],r(1451)):Q[r(1197)]?te[r(795)](Q[r(1390)],r(1234)):Q[r(1136)]?te[r(795)](Q[r(1390)],r(1027)):Q[r(804)]?te[r(795)](Q.TAG_NAME,r(1366)):(Q[r(583)][r(1375)](t),Q[r(1412)]&&(te._opt[r(1280)]&&Q[r(637)]()&&Q[r(949)](),Xt(Q[r(714)]())&&Q[r(910)]()&&Xt(Q[r(945)]()))?Q[r(694)]():Q.isStateClosed()?(Q[r(804)]=!0,Q[r(751)](xe[r(819)],r(634))):Q[r(610)]()&&(Q[r(804)]=!0,Q.emitError(xe[r(819)],r(575))))},appendAudioBuffer(t){const r=e;te[r(1036)]?te[r(795)](Q[r(1390)],r(567)):Q[r(1385)]?te[r(795)](Q[r(1390)],r(1451)):Q.mediaSourceAppendBufferFull?te.debugWarn(Q[r(1390)],"mseDecoder.mediaSourceAppendBufferFull is true"):Q[r(1136)]?te[r(795)](Q[r(1390)],r(1027)):Q[r(804)]?te[r(795)](Q[r(1390)],r(1366)):(Q.pendingAudioSegments[r(1375)](t),Q.audioSourceBuffer&&(te[r(706)].mseAutoCleanupSourceBuffer&&Q[r(637)]()&&Q[r(949)](),Xt(Q[r(570)]())&&Q[r(910)]()&&Xt(Q[r(945)]()))?Q[r(694)]():Q.isStateClosed()?(Q[r(804)]=!0,Q[r(751)](xe.mseSourceBufferError,"mediaSource is not attached to video or mediaSource is closed")):Q.isStateEnded()&&(Q[r(804)]=!0,Q[r(751)](xe.mseSourceBufferError,r(575))))},getSourceBufferUpdating(){const t=e;return Q[t(1412)]&&Q[t(1412)][t(1165)]},getAudioSourceBufferUpdating(){const t=e;return Q[t(518)]&&Q[t(518)][t(1165)]},stop(){const t=e;Q[t(814)](),Q.removeSourceBuffer(),Q[t(553)]()},clearUpAllSourceBuffer(){const t=e;if(Q[t(1412)]){const e=Q[t(1412)][t(979)];for(let r=0;r0||Q[t(509)][t(1107)]>0},getPendingSegmentsLength(){const t=e;return Q[t(583)][t(1107)]},_doAppendSegments(){const t=e;if(Q[t(1053)]()||Q.isStateEnded())te[t(521)](Q[t(1390)],"_doAppendSegments() mediaSource is closed or ended and return");else if(null!==Q[t(1412)]){if(Q.needInitAudio()&&null===Q.audioSourceBuffer)return te[t(521)](Q[t(1390)],t(529)),void(null===Q[t(1232)]&&(Q[t(1232)]=setTimeout((()=>{const e=t;Q._clearAudioSourceBufferCheckTimeout(),Q[e(751)](xe[e(747)])}),1e3)));if(Xt(Q[t(714)]())&&Q[t(583)][t(1107)]>0){const e=Q[t(583)][t(1380)]();try{Q.sourceBuffer[t(806)](e)}catch(e){te[t(582)](Q.TAG_NAME,t(934),e.code,e),22===e[t(1384)]?(Q[t(1226)](),Q.mediaSourceAppendBufferFull=!0,Q[t(751)](xe[t(908)],t(871)+e[t(1384)]+t(678)+e.message)):11===e[t(1384)]?(Q[t(1226)](),Q[t(1136)]=!0,Q[t(751)](xe.mediaSourceAppendBufferError,t(871)+e[t(1384)]+t(678)+e[t(907)])):(Q[t(1226)](),Q[t(804)]=!0,Q[t(751)](xe[t(819)],t(871)+e.code+t(678)+e.message))}}if(Xt(Q[t(570)]())&&Q.pendingAudioSegments[t(1107)]>0){const e=Q[t(509)][t(1380)]();try{Q[t(518)][t(806)](e)}catch(e){te[t(582)](Q[t(1390)],t(1288),e[t(1384)],e),22===e[t(1384)]?(Q[t(1226)](),Q[t(1197)]=!0,Q.emitError(xe[t(908)],t(871)+e[t(1384)]+t(678)+e[t(907)])):11===e.code?(Q[t(1226)](),Q[t(1136)]=!0,Q[t(751)](xe[t(1136)],t(871)+e[t(1384)]+t(678)+e.message)):(Q[t(1226)](),Q[t(804)]=!0,Q[t(751)](xe[t(819)],e.code,t(871)+e[t(1384)]+" , message is "+e[t(907)]))}}}else te[t(521)](Q[t(1390)],t(829))},_doCleanUpSourceBuffer(){const t=e,r=Q[t(682)][t(674)];if(Q[t(1412)]){const e=Q[t(1412)][t(979)];let n=!1;for(let i=0;i=te._opt[t(932)]){n=!0;let e=r-te[t(706)][t(670)];Q[t(1251)].push({start:s,end:e})}}else o=te._opt.mseAutoCleanupMaxBackwardDuration){n=!0;let e=r-te._opt[t(670)];Q[t(836)][t(1375)]({start:s,end:e})}}else o0||Q[t(836)][t(1107)]>0},needInitAudio(){const t=e;return te[t(706)].hasAudio&&te[t(706)][t(981)]},_doRemoveRanges(){const t=e;if(Q[t(1412)]&&Xt(Q[t(714)]())){let e=Q[t(1251)];for(;e.length&&Xt(Q[t(714)]());){let r=e[t(1380)]();try{Q[t(1412)][t(1001)](r[t(631)],r[t(911)])}catch(e){te.debugWarn(Q[t(1390)],"_doRemoveRanges() sourceBuffer error",e,e[t(1178)]())}}}if(Q[t(518)]&&Xt(Q[t(570)]())){let e=Q.pendingAudioRemoveRanges;for(;e[t(1107)]&&Xt(Q.getAudioSourceBufferUpdating());){let r=e.shift();try{Q[t(518)][t(1001)](r.start,r[t(911)])}catch(e){te[t(795)](Q[t(1390)],"_doRemoveRanges() audioSourceBuffer error",e,e.toString())}}}},_getPlaybackRate(){},_needCleanupSourceBuffer(){const t=e;if(Xt(te[t(706)][t(1280)]))return!1;const r=Q[t(682)][t(674)];if(Q.sourceBuffer){let e=Q.sourceBuffer[t(979)];if(e.length>=1&&r-e[t(631)](0)>=te[t(706)][t(932)])return!0}if(Q[t(518)]){let e=Q[t(518)].buffered;if(e[t(1107)]>=1&&r-e[t(631)](0)>=te._opt.mseAutoCleanupMaxBackwardDuration)return!0}return!1},_clearAudioSourceBufferCheckTimeout(){const t=e;Q[t(1232)]&&(clearTimeout(Q[t(1232)]),Q[t(1232)]=null)},_clearAudioNoDataCheckTimeout(){const t=e;Q.audioSourceNoDataCheckTimeout&&(clearTimeout(Q[t(590)]),Q[t(590)]=null)},getHandle(){const t=e;return Q[t(632)][t(497)]},emitError(t){const r=e;let n=arguments[r(1107)]>1&&void 0!==arguments[1]?arguments[1]:"";postMessage({cmd:Se[r(1360)],value:t,msg:n})}});let te={isPlayer:!0,isHevc:null,isPlayVod:!1,isPlayback:!1,isPlaybackPause:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:$e[e(922)],_opt:$(),mp3Demuxer:null,delay:-1,pushLatestDelay:-1,firstTimestamp:null,startTimestamp:null,preDelayTimestamp:null,stopId:null,streamFps:null,streamAudioFps:null,streamVideoFps:null,writableStream:null,networkDelay:0,webglObj:null,socketStatus:Te[e(577)],startStreamRateAndStatsInterval:function(){const t=e;te[t(1039)](),d=setInterval((()=>{const e=t;l&&l(0);const r=JSON[e(1322)]({demuxBufferDelay:te.getVideoBufferLength(),audioDemuxBufferDelay:te.getAudioBufferLength(),streamBufferByteLength:te[e(1083)](),netBuf:te[e(898)]||0,pushLatestDelay:te[e(579)]||0,latestDelay:te[e(1260)],isStreamTsMoreThanLocal:w,wasmDecodeDelay:g-b});postMessage({cmd:Se[e(1298)],type:ke.streamStats,value:r}),Qt()&&(null===W&&(W=Bt()),er(Bt()-W)&&te[e(1224)]())}),1e3)},stopStreamRateAndStatsInterval:function(){d&&(clearInterval(d),d=null)},_startCheckWsOpenTimeout:function(){const t=e;te[t(873)](),G=setTimeout((()=>{const e=t;if(te[e(659)]===Te.notConnect){const t=e(768)+te[e(706)][e(1317)]+e(618)+te[e(659)];te.debugError(e(1172),t),postMessage({cmd:Se[e(1298)],type:xe[e(1317)],value:se[e(1150)],msg:t})}}),1e3*te[t(706)][t(1317)])},_stopCheckWsOpenTimeout:function(){G&&(clearTimeout(G),G=null)},useOffscreen:function(){const t=e;return te[t(706)][t(671)]&&"undefined"!=typeof OffscreenCanvas},getDelay:function(t,r){const n=e;if(!t||te[n(706)][n(996)]&&!_)return-1;if(r===Ie.audio)return te.delay;if(te[n(1131)]&&te[n(1131)]>t)return te[n(1131)]-t>1e3&&te.debugWarn(n(1172),n(1085)+te[n(1131)]+n(845)+t+" more than "+(te[n(1131)]-t)+n(603)+te.delay),te[n(1131)]=t,te.delay;if(te[n(1405)]){if(t){const e=Date.now()-te[n(1211)],r=t-te.firstTimestamp;e>=r?(w=!1,te[n(1260)]=e-r):(w=!0,te[n(1260)]=r-e)}}else te[n(1405)]=t,te.startTimestamp=Date.now(),te.delay=-1;return te[n(1131)]=t,te.delay},getDelayNotUpdateDelay:function(t,r){const n=e;if(!t||te[n(706)].hasVideo&&!_)return-1;if(r===Ie[n(615)])return te[n(579)];if(te[n(1131)]&&te[n(1131)]-t>1e3)return te[n(795)](n(1172),n(1332)+te[n(1131)]+n(845)+t+n(928)+(te[n(1131)]-t)+n(652)),-1;if(te[n(1405)]){let e=-1;if(t){const r=Date.now()-te[n(1211)],i=t-te[n(1405)];r>=i?(w=!1,e=r-i):(w=!0,e=i-r)}return e}return-1},resetDelay:function(){const t=e;te[t(1405)]=null,te[t(1211)]=null,te[t(1260)]=-1,te.dropping=!1},resetAllDelay:function(){const t=e;te[t(812)](),te[t(1131)]=null},doDecode:function(t){const r=e;te[r(706)][r(953)]&&t.type===Ie[r(544)]&&te[r(1284)]&&te.findSei(t[r(1314)],t.ts),te[r(1248)]()?t[r(684)]===Ie[r(615)]?te._opt.mseDecodeAudio?Q.decodeAudio(t[r(1314)],t.ts):t[r(522)].decode(t[r(1314)],t.ts):t.type===Ie[r(544)]&&Q[r(1367)](t.payload,t.ts,t[r(499)],t[r(1259)]):te[r(706)][r(1312)]&&te[r(671)]()&&t[r(684)]===Ie[r(544)]&&a[r(1291)]?a[r(1291)](t[r(1314)],t.ts,t[r(1259)]):t.decoder[r(1291)](t[r(1314)],t.ts,t[r(499)],t[r(1259)])},decodeNext(t){const r=e;if(0===s[r(1107)])return;const i=t.ts,o=s[0],a=t[r(684)]===Ie.video&&Yt(t[r(1314)]);if(Xt(n))a&&(te.debugLog(r(1172),"decode data type is "+t.type+r(940)+i+r(1272)+o[r(684)]+" ts is "+o.ts+r(848)+a),s[r(1380)](),te[r(941)](o));else{const e=o.ts-i,n=o.type===Ie.audio&&t[r(684)]===Ie.video;(e<=20||n||a)&&(te[r(521)](r(1172),r(1221)+t[r(684)]+r(940)+i+r(1272)+o[r(684)]+r(1052)+o.ts+r(574)+e+r(918)+n+r(1116)+a),s[r(1380)](),te[r(941)](o))}},init:function(){const t=e;te[t(521)](t(1172),t(1279)+n+t(776)+i+" and opt is",JSON[t(1322)](te[t(706)]));const r=te[t(706)][t(909)]===oe[t(1009)],o=te[t(706)].playType===oe[t(730)],c=te[t(706)][t(909)]===oe.playVod;if(te[t(706)][t(904)]&&K[t(625)](),te[t(710)]=r,te.isPlayback=o,te[t(1072)]=c,te.isPlayUseMSEAndDecoderInWorker()&&Q&&Q[t(625)](),a&&te[t(706)][t(1312)]&&te[t(671)]()&&a[t(625)](),Xt(te[t(510)]())){te[t(521)](t(1172),t(576));const e=()=>{const e=t,n=te[e(706)][e(1452)]+te[e(706)].videoBufferDelay;let i=null;if(s[e(1107)]){if(te[e(1018)])return void te.debugWarn("worker",e(1122)+s[e(1107)]);if(te[e(561)]){for(i=s.shift(),te[e(795)]("worker",e(712)+i.isIFrame+e(881)+te.delay+e(565)+s[e(1107)]);!i.isIFrame&&s[e(1107)];)i=s[e(1380)]();const t=te[e(550)](i.ts,i[e(684)]);i[e(499)]&&t<=te[e(792)]()&&(te.debugLog(e(1172),e(833)),te[e(561)]=!1,te[e(941)](i),te.decodeNext(i))}else if(te.isPlayback||te.isPlayUseMSE()||0===te._opt[e(1452)])for(;s[e(1107)];)i=s.shift(),te[e(941)](i);else if(i=s[0],-1===te.getDelay(i.ts,i[e(684)]))te.debugLog(e(1172),e(1183),i.ts),s[e(1380)](),te[e(941)](i),te.decodeNext(i);else if(te.delay>n&&r)te[e(1225)]()?(te.debugLog(e(1172),e(1420)+te[e(1260)]+" > maxDelay "+n+e(669)),te[e(852)](),te[e(561)]=!0,postMessage({cmd:Se[e(1458)]})):(s[e(1380)](),te[e(941)](i),te[e(662)](i));else for(;s[e(1107)];){if(i=s[0],!(te[e(1348)](i.ts,i[e(684)])>te[e(706)][e(1452)])){te[e(1260)]<0&&te[e(795)](e(1172),e(863)+te[e(1260)]+e(1302)+s.length);break}s.shift(),te[e(941)](i)}}else-1!==te[e(1260)]&&te.debugLog(e(1172),e(699)),te[e(852)]()};te[t(930)]=setInterval((()=>{const r=t;let n=(new Date)[r(906)]();!S&&(S=n);const i=n-S;i>100&&te[r(795)](r(1172),"loop demux diff time is "+i),e(),S=(new Date)[r(906)]()}),20)}else te.debugLog("worker",t(1370));if(Xt(te[t(706)][t(942)])&&(_=!0),te.isPlayUseMSEAndDecoderInWorker()&&Q){const e=Q[t(748)]();e&&postMessage({cmd:Se[t(643)],mseHandle:e},[e])}},playbackCacheLoop:function(){const t=e;te[t(1219)]();for(let e=0;e{const e=t,n=(new Date)[e(906)]();!q&&(q=n);for(let t=0;t1&&s[e(1107)]>0&&te.debugWarn(e(1172),e(931)+i+e(1170)+r+e(869)+o+e(1268)+s[e(1107)]),q=n}),r)},doPlaybackCacheLoop:function(){const t=e;let r=null;if(s.length)if(r=s[t(1380)](),r.type===Ie.video){te[t(1192)]()?r[t(499)]&&(te.debugLog(t(1172),t(1040),r.ts),te[t(941)](r)):te[t(941)](r);let e=s[0];for(;e&&e.type===Ie[t(615)];)s[t(1380)](),te[t(1192)]()||te[t(941)](e),e=s[0]}else if(r[t(684)]===Ie[t(615)]){te[t(1192)]()||te.doDecode(r);let e=s[0];for(;e;){if(r=s[t(1380)](),r.type===Ie[t(544)]){te[t(1192)]()?r[t(499)]&&(te[t(521)](t(1172),t(1040),r.ts),te[t(941)](r)):te[t(941)](r),e=null;break}r[t(684)]===Ie.audio&&(te[t(1192)]()||te[t(941)](r),e=s[0])}}},clearPlaybackCacheLoop:function(){const t=e;te[t(930)]&&(clearInterval(te[t(930)]),te.stopId=null),q=null},startPlaybackCacheLoop:function(){te[e(696)]()},close:function(){const t=e;if(te[t(521)](t(1172),t(1224)),te[t(1036)]=!0,Y(),!u||1!==u[t(1292)]&&2!==u.readyState?u&&te[t(521)]("worker","close() and socket.readyState is "+u[t(1292)]):(N=!0,u.close(1e3,t(685))),u&&(u.onopen=null,u.onmessage=null,u.onclose=null,u[t(767)]=null,te[t(659)]=Te[t(577)]),u=null,te.stopStreamRateAndStatsInterval(),te[t(873)](),te[t(1219)](),te.stopId&&(clearInterval(te[t(930)]),te[t(930)]=null),te[t(1447)]&&(te[t(1447)][t(1019)](),te[t(1447)]=null),te[t(697)]&&(Ht(te[t(697)].close)&&Xt(te[t(697)][t(498)])?te.writableStream[t(1224)]()[t(1013)]((e=>{const r=t;te[r(521)](r(1172),r(990),e[r(1178)](),e)})).finally((()=>{te[t(697)]=null})):te[t(697)]=null),re)try{Ht(re[t(1435)])&&re[t(1435)](),Ht(re.delete)&&re[t(967)](),re=null}catch(e){te.debugLog(t(1172),"close() and audioDecoder.clear error: "+e[t(1178)]()+t(1090))}if(ne)try{Ht(ne[t(1435)])&&ne[t(1435)](),Ht(ne[t(967)])&&ne[t(967)](),ne=null}catch(e){te.debugLog(t(1172),"close() and videoDecoder.clear error: "+e.toString()+t(1090))}l=null,S=null,w=!1,g=0,b=0,a&&(a[t(1019)]&&a.destroy(),a=null),Q&&(Q[t(1019)](),Q=null),te.firstTimestamp=null,te[t(1211)]=null,te[t(898)]=0,te.streamFps=null,te[t(999)]=null,te[t(1343)]=null,te[t(1260)]=-1,te[t(579)]=-1,te.preDelayTimestamp=null,te[t(561)]=!1,te[t(1018)]=!1,te[t(710)]=!0,te.isPlayback=!1,te[t(1285)]=!1,te[t(1072)]=!1,te[t(1284)]=!1,te.isHevc=null,te[t(706)]=$(),te[t(1091)]&&(te[t(1091)][t(1019)](),te.offscreenCanvas.removeEventListener(t(1337),te[t(1443)]),te[t(1442)][t(1199)](t(973),te.onOffscreenCanvasWebglContextRestored),te[t(1442)]=null,te[t(946)]=null,te[t(1022)]=null),s=[],o=[],h&&(h[t(1224)](),h=null),p=null,m=null,v=!1,y=!1,_=!1,F=!1,R=!1,L=!1,O=null,E=[],x=0,T=0,I=null,A=null,B=null,D=null,z=null,M=0,U=0,P=null,k=null,C=null,te[t(660)]=$e[t(922)],H=!0,K[t(1019)](),X[t(1019)](),J.destroy(),Z[t(1019)](),te.debug=null,te[t(706)]={},postMessage({cmd:Se.closeEnd})},pushBuffer:function(t,r){const i=e;if(r[i(684)]===Ie[i(615)]&&pt(t)){if(te[i(521)](i(1172),i(1401)+r.ts+i(826)),te[i(706)].isRecordTypeFlv){const e=new Uint8Array(t);postMessage({cmd:Se[i(887)],buffer:e},[e[i(739)]])}te[i(943)](t,r.ts)}else if(r[i(684)]===Ie[i(544)]&&r[i(499)]&&Yt(t)){if(te.debugLog("worker","pushBuffer video ts is "+r.ts+i(690)),te._opt[i(847)]){const e=new Uint8Array(t);postMessage({cmd:Se[i(805)],buffer:e},[e[i(739)]])}te[i(1367)](t,r.ts,r.isIFrame,r[i(1259)])}else{if(te[i(706)][i(1441)])if(te[i(706)][i(847)]){const e=new Uint8Array(t);postMessage({cmd:Se.flvBufferData,type:r[i(684)],buffer:e,ts:r.ts},[e[i(739)]])}else if(te[i(706)].recordType===ae.mp4)if(r[i(684)]===Ie.video){const e=new Uint8Array(t)[i(598)](5);postMessage({cmd:Se[i(1274)],buffer:e,isIFrame:r[i(499)],ts:r.ts,cts:r[i(1259)]},[e[i(739)]])}else if(r[i(684)]===Ie[i(615)]&&te[i(706)][i(1130)]){const e=new Uint8Array(t),n=mt(e)?e[i(598)](2):e[i(598)](1);postMessage({cmd:Se[i(947)],buffer:n,ts:r.ts},[n[i(739)]])}if(te[i(710)]){if(r.type===Ie.video){if(M>0){const e=r.ts-D,t=2*M;e>=t&&te[i(521)](i(1172),i(1037)+r[i(499)]+" and\n ts is "+r.ts+i(1070)+D+i(1134)+e+i(534)+M+i(572)+t+"\n maybe trigger black screen or flower screen\n ")}if(null!==D&&D>=r.ts&&(te[i(795)](i(1172),i(1161)+r[i(499)]+i(864)+r.ts+i(1227)+D+i(832)+t[i(1408)]+" and prevPayloadBufferSize is "+U),D-r.ts>ye&&(te.debugWarn("worker",i(1287)+D+i(1378)+r.ts+i(1134)+(D-r.ts)+i(928)+ye+",\n and resetAllDelay"),te[i(852)](),D=null,M=0),te[i(706)][i(1097)]&&Xt(r[i(499)])&&_)){const e=te[i(1225)](),t=Xt(te.isPushDropping);return te[i(521)](i(1172),i(1157)+e+i(1422)+t+i(802)),void(e&&t?te.dropBuffer$2():(te[i(1339)](!0),Kt(te._opt.checkFirstIFrame)&&Kt(n)&&(te[i(1248)]()?Q[i(1208)]=!1:postMessage({cmd:Se[i(942)]}))))}D>0&&(M=r.ts-D),U=t[i(1408)],D=r.ts}if(_){const e=te._opt[i(1452)]+te[i(706)][i(1026)],t=te[i(550)](r.ts,r.type);te.pushLatestDelay=t,te[i(1260)]>0&&t>e&&te[i(1260)]({type:e[t(684)],ts:e.ts})));te[t(521)](t(1172),t(722)+e+", bufferListLength is "+s[t(1107)]+", and ts list is "+JSON.stringify(r));const n=100;s[t(1107)]>=n&&(te[t(795)](t(1172),t(734)+s.length+t(928)+n+", and set streamFps is 25"),te[t(1343)]=25,postMessage({cmd:Se[t(1386)],value:te[t(1343)]}),te.streamFps=te[t(1343)],te[t(696)]())}}},getVideoBufferLength(){const t=e;let r=0;return s[t(1296)]((e=>{const n=t;e[n(684)]===Ie[n(544)]&&(r+=1)})),r},hasIframeInBufferList(){const t=e;return s[t(520)]((e=>{const r=t;return e.type===Ie[r(544)]&&e[r(499)]}))},isAllIframeInBufferList(){const t=e,r=te.getVideoBufferLength();let n=0;return s[t(1296)]((e=>{const r=t;e[r(684)]===Ie.video&&e[r(499)]&&(n+=1)})),r===n},getNotDroppingDelayTs(){const t=e;return te[t(706)][t(1452)]+te[t(706)][t(1026)]/2},getAudioBufferLength(){const t=e;let r=0;return s[t(1296)]((e=>{e[t(684)]===Ie.audio&&(r+=1)})),r},getStreamBufferLength(){const t=e;let r=0;return h&&h[t(739)]&&(r=h[t(739)][t(1408)]),te[t(706)][t(904)]?K[t(1073)]&&(r=K[t(1073)][t(1408)]):te[t(706)][t(746)]?Z[t(723)]&&(r=Z[t(723)][t(1408)]):te[t(706)][t(527)]&&X.mp4Box&&(r=X[t(769)].getStreamBufferSize()),r},fetchStream:function(t){const r=e;let n=arguments[r(1107)]>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[r(1107)]>2&&void 0!==arguments[2]?arguments[2]:[];if(te[r(521)](r(1172),r(688)+t,r(720),JSON.stringify(n)),te.isWorkerFetch=!0,n.isFlv?te[r(706)].isFlv=!0:n[r(527)]?te[r(706)][r(527)]=!0:n[r(1077)]?te[r(706)][r(1077)]=!0:n[r(904)]?te._opt[r(904)]=!0:n[r(746)]&&(te[r(706)][r(746)]=!0),l=Ut((e=>{const t=r;postMessage({cmd:Se[t(1298)],type:ke[t(624)],value:e})})),te[r(625)](),te.startStreamRateAndStatsInterval(),n.isFmp4&&X.listenMp4Box(),n[r(1198)]===ie[r(1062)]){n[r(609)]&&(h=new cr(te[r(1181)]())),c=new AbortController;const e=Object.assign({signal:c[r(880)]},{headers:n[r(790)]&&n[r(790)][r(1054)]||{}});fetch(t,e)[r(875)]((e=>{const t=r;if(Kt(N))return te[t(521)](t(1172),"request abort and run res.body.cancel()"),te[t(660)]=$e[t(922)],void e[t(757)][t(1283)]();if(!qt(e))return te.debugWarn(t(1172),t(1406)+e.status+t(562)+e.ok+t(893)),Y(),void postMessage({cmd:Se[t(1298)],type:xe[t(1173)],value:t(1406)+e[t(879)]+" and ok is "+e.ok});if(postMessage({cmd:Se.workerFetch,type:ke[t(1063)]}),jt())te.writableStream=new WritableStream({write:e=>{const r=t;return c&&c[r(880)]&&c[r(880)][r(653)]?(te[r(521)](r(1172),"writableStream write() and abortController.signal.aborted is true so return"),void(te.fetchStatus=$e[r(862)])):Kt(N)?(te[r(521)](r(1172),r(554)),te[r(660)]=$e[r(862)],void Y()):void(typeof e!==r(711)?(te[r(660)]=$e.buffering,l(e[r(1408)]),n[r(609)]?h[r(1275)](e):n[r(527)]?te[r(964)](e):n[r(1077)]?te[r(982)](e):n[r(746)]?te[r(1338)](e):n[r(904)]&&te[r(1440)](e)):te.debugWarn("worker",'writableStream write() and value is "'+e+r(566)))},close:()=>{const e=t;te[e(521)]("worker",e(1388)),te.fetchStatus=$e[e(862)],Y(),te[e(706)].checkStreamEnd?(h&&(h[e(1224)](),h=null),postMessage({cmd:Se[e(1298)],type:ke[e(1297)],value:se[e(1062)],msg:e(938)})):postMessage({cmd:Se.workerFetch,type:ke[e(1034)]})},abort:e=>{const r=t;if(c&&c.signal&&c[r(880)][r(653)])return te[r(521)](r(1172),"writableStream abort() and abortController.signal.aborted is true so return"),void(te[r(660)]=$e.complete);h&&(h[r(1224)](),h=null),e[r(1246)]!==Ve[r(784)]?(te[r(521)](r(1172),r(1005)+e[r(1178)]()),Y(),postMessage({cmd:Se[r(1298)],type:xe[r(1080)],value:e[r(1178)]()})):te.debugLog(r(1172),r(1089))}}),e[t(757)].pipeTo(te[t(697)])[t(1013)]((e=>{const r=t;e[r(1246)]!==r(1207)&&te[r(521)](r(1172),r(1456),e.name,e[r(1178)]())}));else{const r=e.body.getReader(),i=()=>{const e=t;r[e(764)]().then((t=>{const r=e;let{done:s,value:o}=t;return s?(te[r(521)](r(1172),"fetchNext().then() and done is true"),te[r(660)]=$e[r(862)],Y(),void(te[r(706)][r(791)]?(h&&(h[r(1224)](),h=null),postMessage({cmd:Se[r(1298)],type:ke[r(1297)],value:se[r(1062)],msg:r(938)})):postMessage({cmd:Se[r(1298)],type:ke[r(1034)]}))):c&&c[r(880)]&&c.signal[r(653)]?(te[r(521)](r(1172),r(1233)),void(te.fetchStatus=$e[r(862)])):Kt(N)?(te[r(521)](r(1172),"fetchNext().then() and requestAbort is true so return"),te.fetchStatus=$e.complete,void Y()):void("string"!=typeof o?(te[r(660)]=$e.buffering,l(o[r(1408)]),n[r(609)]?h[r(1275)](o):n[r(527)]?te[r(964)](o):n[r(1077)]?te[r(982)](o):n[r(746)]?te[r(1338)](o):n[r(904)]&&te[r(1440)](o),i()):te[r(795)]("worker",r(1069)+o+r(781)))}))[e(1013)]((t=>{const r=e;if(c&&c[r(880)]&&c[r(880)][r(653)])return te.debugLog(r(1172),"fetchNext().catch() and abortController.signal.aborted is true so return"),void(te[r(660)]=$e[r(862)]);h&&(h[r(1224)](),h=null),t[r(1246)]!==Ve[r(784)]?(te[r(521)]("worker","fetchNext().catch() and e is "+t[r(1178)]()),Y(),postMessage({cmd:Se[r(1298)],type:xe[r(1080)],value:t.toString()})):te[r(521)]("worker",r(1342))}))};i()}}))[r(1013)]((e=>{const t=r;c&&c[t(880)]&&c.signal[t(653)]?te.debugLog(t(1172),"fetch().catch() and abortController.signal.aborted is true so return"):e.name!==Ve[t(784)]?(te[t(521)]("worker",t(834)+e[t(1178)]()),Y(),postMessage({cmd:Se.workerFetch,type:xe[t(1173)],value:e[t(1178)]()}),h&&(h[t(1224)](),h=null)):te.debugLog(t(1172),t(1193))}))}else n[r(1198)]===ie[r(1150)]&&(n[r(609)]&&(h=new cr(te.demuxFlv())),u=new WebSocket(t,i),u[r(813)]=r(749),u.onopen=()=>{const e=r;te[e(521)](e(1172),e(878)),te[e(659)]=Te[e(645)],te._stopCheckWsOpenTimeout(),postMessage({cmd:Se[e(1298)],type:ke[e(1063)]}),postMessage({cmd:Se[e(1298)],type:ke.websocketOpen}),n[e(790)]&&n.options[e(924)]&&te[e(1145)](n[e(790)][e(924)])},u[r(647)]=e=>{const t=r;if(te[t(1036)])return void te.debugLog(t(1172),"fetchStream, WebsocketStream socket close and code is "+e[t(1384)]+" and isDestroyed is true, so return");if(f)return void te[t(521)](t(1172),t(1142)+e.code+" but isSocketError is true , so return");if(te[t(521)](t(1172),"fetchStream, WebsocketStream socket close and code is "+e[t(1384)]),Kt(N))return void te[t(521)](t(1172),t(628));let n=!1;1006===e[t(1384)]&&(te[t(582)]("worker",t(1235)+e[t(1384)]),n=!0),te.socketStatus=Te[t(1224)],te[t(706)].checkStreamEnd||n?(h&&(h.close(),h=null),postMessage({cmd:Se[t(1298)],type:ke.streamEnd,value:se[t(1150)],msg:e[t(1384)]})):postMessage({cmd:Se[t(1298)],type:ke[t(1034)]})},u[r(767)]=e=>{const t=r;te.debugError(t(1172),t(866),e,e[t(1178)]()),f=!0,te[t(659)]=Te[t(1300)],h&&(h[t(1224)](),h=null),te[t(1036)]?te[t(521)](t(1172),t(716)):Kt(N)?te.debugLog(t(1172),t(1112)):postMessage({cmd:Se[t(1298)],type:xe.websocketError,value:e[t(1086)]?t(1374):t(1194)})},u[r(994)]=e=>{const t=r;"string"!=typeof e[t(556)]?(l(e.data.byteLength),n[t(609)]?h[t(1275)](e[t(556)]):n.isFmp4?te[t(964)](e[t(556)]):n[t(1077)]?te[t(982)](e[t(556)]):te[t(706)][t(904)]?te[t(1440)](e[t(556)]):te[t(706)][t(746)]?te[t(1338)](e.data):te.demuxM7s(e.data)):postMessage({cmd:Se[t(1310)],value:e[t(556)]})})},demuxFlv:function*(){const t=e;yield 9;const r=new ArrayBuffer(4),n=new Uint8Array(r),i=new Uint32Array(r);for(;;){n[3]=0;const e=yield 15,r=e[4];n[0]=e[7],n[1]=e[6],n[2]=e[5];const s=i[0];n[0]=e[10],n[1]=e[9],n[2]=e[8],n[3]=e[11];let o=i[0];const a=(yield s).slice();switch(r){case Ae[t(615)]:if(a[t(1408)]>0){const e=te[t(601)](a);te[t(1291)](e,{type:Ie[t(615)],ts:o})}else te[t(795)](t(1172),t(818)+a.byteLength+t(677));break;case Ae.video:if(a[t(1408)]>=6){const e=a[0];if(te._isEnhancedH265Header(e))te[t(1041)](a,o);else{const e=15&a[0];let r=a[0]>>4===qe;const n=e===De.h265;if(t(1035),Xt(r)&&Kt(Zt(a,n))&&(te[t(521)](t(1172),"demux() isIFrame is false and unit type is IDR and update to true"),r=!0),r&&Yt(a)&&null===te[t(987)]){const e=15&a[0];te[t(987)]=e===De[t(728)],O=xt(a,te[t(987)]),te[t(521)](t(1172),t(1364)+te[t(987)]+" and nalUnitSize is "+O)}r&&te[t(980)](o),te[t(710)]&&te.calcNetworkDelay(o),i[0]=a[4],i[1]=a[3],i[2]=a[2],i[3]=0;let s=i[0],c=te[t(1243)](a,r);te[t(1291)](c,{type:Ie.video,ts:o,isIFrame:r,cts:s})}}else te[t(795)](t(1172),t(1179)+a[t(1408)]+t(677));break;case Ae[t(1147)]:postMessage({cmd:Se[t(1216)],buffer:a},[a.buffer]);break;default:te[t(521)]("worker",t(939)+r)}}},decode:function(t,r){const n=e;r[n(684)]===Ie[n(615)]?te[n(706)][n(1099)]&&(postMessage({cmd:Se[n(1298)],type:ke[n(1354)],value:t[n(1408)]}),te[n(710)]?te[n(1050)](t,{type:r.type,ts:r.ts,cts:r.cts}):te[n(1402)]&&(te.isPlaybackOnlyDecodeIFrame()||(te[n(510)]()?te[n(1050)](t,{type:r[n(684)],ts:r.ts,cts:r.cts}):te[n(1050)](t,{type:r[n(684)],ts:r.ts,cts:r[n(1259)]})))):r[n(684)]===Ie[n(544)]&&te[n(706)][n(996)]&&(postMessage({cmd:Se.workerFetch,type:ke[n(773)],value:t[n(1408)]}),postMessage({cmd:Se[n(1298)],type:ke[n(502)],value:r.ts}),te[n(710)]?te.pushBuffer(t,{type:r.type,ts:r.ts,isIFrame:r.isIFrame,cts:r[n(1259)]}):te[n(1402)]&&(te[n(510)]()?te[n(1050)](t,{type:r[n(684)],ts:r.ts,cts:r[n(1259)],isIFrame:r.isIFrame}):te[n(1192)]()?r[n(499)]&&te[n(1050)](t,{type:r[n(684)],ts:r.ts,cts:r.cts,isIFrame:r[n(499)]}):te[n(1050)](t,{type:r[n(684)],ts:r.ts,cts:r[n(1259)],isIFrame:r[n(499)]})))},cryptoPayload:function(t,r){const n=e;let i=t;return te[n(706)][n(507)]?te[n(706)][n(1241)]&&te[n(706)].cryptoIV[n(1408)]>0&&te[n(706)][n(1180)]&&te[n(706)][n(1180)][n(1408)]>0?i=bo(t,te[n(706)][n(1180)],te[n(706)].cryptoIV,te[n(987)]):te[n(582)](n(1172),"isM7sCrypto cryptoKey.length is "+(te[n(706)].cryptoKey&&te._opt[n(1180)][n(1408)])+n(955)+(te[n(706)].cryptoIV&&te[n(706)].cryptoIV[n(1408)])+n(1404)):te[n(706)][n(726)]?te[n(706)][n(983)]?i=te[n(706)][n(1241)]&&te[n(706)][n(1241)].byteLength>0&&te[n(706)][n(1180)]&&te._opt[n(1180)][n(1408)]>0?hc(t,te._opt.cryptoKey,te._opt.cryptoIV,te.isHevc,te[n(706)][n(997)]):Zo(t,te[n(706)][n(983)],te.isHevc,te[n(706)][n(997)]):!te[n(706)][n(983)]&&te.debugError("worker","isSm4Crypto opt.sm4CryptoKey is null"):te[n(706)][n(870)]&&(te[n(706)].cryptoIV&&te._opt.cryptoIV.byteLength>0&&te._opt[n(1180)]&&te[n(706)].cryptoKey[n(1408)]>0?i=ha(t,te[n(706)][n(1180)],te._opt[n(1241)],te.isHevc):te[n(582)](n(1172),n(1439)+(te._opt.cryptoKey&&te._opt.cryptoKey.byteLength)+" or cryptoIV.length is "+(te[n(706)].cryptoIV&&te._opt.cryptoIV[n(1408)])+n(1404))),i},cryptoPayloadAudio:function(t){const r=e;if(Xt(te[r(706)].isCryptoAudio))return t;let n=t;return te[r(706)][r(507)]?te[r(706)][r(1241)]&&te[r(706)][r(1241)][r(1408)]>0&&te[r(706)][r(1180)]&&te[r(706)][r(1180)][r(1408)]>0?t[0]>>4===Ue[r(686)]&&(n=wo(t,te._opt[r(1180)],te[r(706)][r(1241)])):te[r(582)]("worker",r(970)+(te._opt[r(1180)]&&te[r(706)][r(1180)][r(1408)])+" or cryptoIV.length is "+(te._opt[r(1241)]&&te[r(706)][r(1241)][r(1408)])+r(1404)):te[r(706)][r(870)]&&(te[r(706)][r(1241)]&&te[r(706)].cryptoIV[r(1408)]>0&&te._opt[r(1180)]&&te[r(706)][r(1180)][r(1408)]>0?t[0]>>4===Ue[r(686)]&&(n=fa(t,te[r(706)][r(1180)],te[r(706)][r(1241)])):te[r(582)](r(1172),r(1439)+(te[r(706)][r(1180)]&&te[r(706)].cryptoKey[r(1408)])+" or cryptoIV.length is "+(te._opt[r(1241)]&&te[r(706)].cryptoIV[r(1408)])+r(1404))),n},setCodecAudio:function(t,r){const n=e,s=t[0]>>4,o=t[0]>>1&1;if(z=s===Ue.AAC?o?16:8:0===o?8:16,re&&re[n(1121)]||!Xt(i))if(pt(t)||s===Ue.ALAW||s===Ue[n(995)]||s===Ue[n(1164)]){te[n(521)]("worker",n(1271)+s+n(841)+te[n(706)].sampleRate);const e=s===Ue.AAC?t[n(598)](2):new Uint8Array(0);if(i){if(s===Ue[n(1164)])return void te[n(582)]("worker",n(753));re[n(1438)]=te[n(706)][n(1123)],re[n(1291)](t,r)}else re[n(1121)](s,te[n(706)].sampleRate,e,te[n(1110)]());if(s===Ue[n(686)]&&postMessage({cmd:Se[n(1078)],buffer:e},[e[n(739)]]),y=!0,s!==Ue[n(686)]&&(s===Ue[n(1164)]?(!te[n(1447)]&&(te[n(1447)]=new aa(te),te[n(1447)].on(n(556),((e,t)=>{re[n(1291)](e,t)}))),te[n(1447)][n(827)](t[n(598)](1),r)):re.decode(t[n(598)](1),r)),Qt()){const e=Number("1")||1;setTimeout((()=>{const e=n;te[e(582)]("worker",e(1075)),te.close(),postMessage({cmd:Se[e(1306)]})}),60*e*60*1e3)}}else te[n(795)](n(1172),n(1124),s);else te[n(582)](n(1172),"setCodecAudio: audioDecoder or audioDecoder.setCodec is null")},decodeAudio:function(t,r){const s=e;if(te[s(1036)])te[s(521)]("worker","decodeAudio, decoder is destroyed and return");else if(te.isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio())Q.decodeAudio(t,r);else if(Kt(n)&&Kt(te[s(706)].mseDecodeAudio))postMessage({cmd:Se[s(563)],payload:t,ts:r,cts:r},[t[s(739)]]);else{const e=t[0]>>4;if(y){if(pt(t))return void te[s(521)](s(1172),s(837));i?re[s(1291)](t,r):e===Ue[s(1164)]?te[s(1447)][s(827)](t[s(598)](1),r):re[s(1291)](e===Ue[s(686)]?t.slice(2):t[s(598)](1),r)}else te[s(1318)](t,r)}},setCodecVideo:function(t,r){const n=e,s=15&t[0];if(ne&&ne[n(1121)]||!Xt(i))if(Yt(t))if(s===De[n(1035)]||s===De.h265){te[n(521)]("worker","setCodecVideo: init video codec , codecId is "+s);const e=t.slice(5);if(s===De.h264&&te[n(706)][n(1344)]){const t=Ar(e);if(t.codecWidth>_e||t.codecHeight>_e)return postMessage({cmd:Se[n(1304)],value:n(1436)+t.codecWidth+n(657)+_e+n(1334)+t[n(756)]+n(657)+_e}),void te[n(795)](n(1172),n(635)+t.codecWidth+n(1330)+t[n(756)])}const r=new Uint8Array(t);v=!0,i?ne[n(1291)](t,0):ne.setCodec(s,e,te[n(1110)]()),postMessage({cmd:Se[n(668)],code:s}),postMessage({cmd:Se.videoCodec,buffer:r,codecId:s},[r[n(739)]])}else te[n(795)](n(1172),n(1253)+s+n(969));else te.debugWarn(n(1172),"decodeVideo: hasInitVideoCodec is false, codecId is "+s+n(617)+r+" and packetType is "+t[1]);else te.debugError(n(1172),n(1266))},decodeVideo:function(t,r,s){const o=e;let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(te[o(1036)])te[o(521)](o(1172),o(1064));else if(te[o(1248)]())Q.decodeVideo(t,r,s,a);else if(Kt(n))postMessage({cmd:Se[o(1143)],payload:t,isIFrame:s,ts:r,cts:a,delay:te[o(1260)]},[t[o(739)]]);else if(v)if(!_&&s&&(_=!0),_){if(s&&Yt(t)){const e=15&t[0];let r={};e===De[o(1035)]?r=Ar(t[o(598)](5)):e===De[o(728)]&&(r=tn(t)),r.codecWidth&&r[o(756)]&&p&&m&&(r[o(1236)]!==p||r[o(756)]!==m)&&(te.debugWarn(o(1172),o(1349)+p+o(667)+m+o(1454)+r.codecWidth+o(936)+r[o(756)]+o(633)),R=!0,postMessage({cmd:Se[o(675)],value:o(1436)+p+"->"+r.codecWidth+", height: "+m+"->"+r[o(756)]}))}if(R)return void te.debugWarn("worker",o(548));if(L)return void te[o(795)](o(1172),o(613));if(Yt(t))return void te.debugLog("worker","decodeVideo and payload is video sequence header so drop this frame");if(t[o(1408)]0&&void 0!==arguments[0]&&arguments[0];te[t(521)]("worker",t(1195)+s[t(1107)]+t(620)+r),r&&(s=[]),te.isPlayer&&(te[t(852)](),Kt(te[t(706)].checkFirstIFrame)&&(te[t(561)]=!0,postMessage({cmd:Se.isDropping}))),Kt(te._opt[t(942)])&&Xt(n)&&(_=!1)},dropBuffer$2:function(){const t=e;if(s[t(1107)]>0){let e=s[t(1346)]((e=>{const r=t;return Kt(e[r(499)])&&e[r(684)]===Ie[r(544)]}));if(te[t(514)]())for(let r=0;r=te[t(792)]()){te.debugLog(t(1172),"dropBuffer$2() isAllIframeInBufferList() is true, and index is "+r+t(1217)+i+" and notDroppingDelayTs is "+te.getNotDroppingDelayTs()),e=r;break}}if(e>=0){te.isPushDropping=!0,postMessage({cmd:Se.isDropping});const r=s[t(1107)];s=s[t(598)](e);const n=s[t(1380)]();te[t(852)](),te.getDelay(n.ts,n[t(684)]),te.doDecode(n),te[t(1018)]=!1,te[t(521)](t(1172),t(558)+e+",and old bufferList length is "+r+t(759)+s[t(1107)]+t(1250)+te[t(1260)]+" ")}else te[t(1018)]=!1}0===s[t(1107)]&&(te[t(1018)]=!1)},demuxM7s:function(t){const r=e,n=new DataView(t),i=n[r(859)](1,!1),s=n.getUint8(0),o=new ArrayBuffer(4),a=new Uint32Array(o);switch(s){case Ie[r(615)]:const e=te[r(601)](new Uint8Array(t,5));te[r(1291)](e,{type:Ie[r(615)],ts:i});break;case Ie[r(544)]:if(n.byteLength>=11){const e=new Uint8Array(t,5),s=e[0];if(te[r(537)](s))te._decodeEnhancedH265Video(e,i);else{const t=n.getUint8(5)>>4==1;if(t&&(te[r(980)](i),Yt(e)&&null===te[r(987)])){const t=15&e[0];te[r(987)]=t===De[r(728)]}te[r(710)]&&te[r(1088)](i),a[0]=e[4],a[1]=e[3],a[2]=e[2],a[3]=0;let s=a[0],o=te.cryptoPayload(e,t);te[r(1291)](o,{type:Ie[r(544)],ts:i,isIFrame:t,cts:s})}}else te[r(795)](r(1172),r(549)+t[r(1408)]+r(677))}},demuxNakedFlow:function(t){K[e(827)](t)},demuxFmp4:function(e){X.dispatch(e)},demuxMpeg4:function(e){J.dispatch(e)},demuxTs:function(t){Z[e(827)](t)},_decodeEnhancedH265Video:function(t,r){const n=e,i=t[0],s=48&i,o=15&i,a=t.slice(1,5),c=new ArrayBuffer(4),u=new Uint32Array(c),l="a"==String[n(568)](a[0]);if(te[n(987)]=Xt(l),o===Xe.PACKET_TYPE_SEQ_START){if(s===Je[n(683)]){const e=t.slice(5);if(l);else{const i=new Uint8Array(5+e[n(1107)]);i[n(771)]([28,0,0,0,0],0),i[n(771)](e,5),O=xt(t,te[n(987)]),te[n(521)](n(1172),n(524)+te[n(987)]+" and nalUnitSize is "+O),te[n(1291)](i,{type:Ie[n(544)],ts:r,isIFrame:!0,cts:0})}}}else if(o===Xe[n(1449)]){let e=t,i=0;const o=s===Je[n(683)];o&&te.calcIframeIntervalTimestamp(r),l||(u[0]=t[4],u[1]=t[3],u[2]=t[2],u[3]=0,i=u[0],e=an(t[n(598)](8),o),e=te[n(1243)](e,o),te[n(1291)](e,{type:Ie[n(544)],ts:r,isIFrame:o,cts:i}))}else if(o===Xe[n(505)]){const e=s===Je[n(683)];e&&te[n(980)](r);let i=an(t.slice(5),e);i=te[n(1243)](i,e),te[n(1291)](i,{type:Ie[n(544)],ts:r,isIFrame:e,cts:0})}},_isEnhancedH265Header:function(e){return(e&Ke)===Ke},findSei:function(t,r){const n=e;let i=4;Nt(O)&&(i=O),At(t.slice(5),i)[n(1296)]((e=>{const t=n,i=te[t(987)]?e[0]>>>1&63:31&e[0],s=te[t(987)]&&(i===Fe[t(1371)]||i===Fe[t(965)]),o=Xt(te[t(987)])&&i===Pe[t(709)];if(s||o){const n=Et(e,te[t(987)]);postMessage({cmd:Se[t(552)],buffer:n.payload,ts:r},[n.payload[t(739)]])}}))},calcNetworkDelay:function(t){const r=e;if(!(_&&t>0))return;null===I?(I=t,A=Bt()):tn?i-n:0;if(te[r(898)]=s,s>te[r(706)][r(898)]&&te[r(706)].playType===oe[r(1009)]){let e=!1;null===P&&(e=!0,P=Bt());const o=Bt();(o-P>=1e3||e)&&(te[r(795)]("worker","calcNetworkDelay now dts:"+t+", start dts is "+I+r(843)+n+r(1407)+i+r(872)+s),postMessage({cmd:Se.workerFetch,type:ke[r(612)],value:s}),P=o)}},calcIframeIntervalTimestamp:function(e){null===B?B=e:B=te[t(706)][t(1361)]&&!(te[t(706)][t(1421)]&&te[t(706)][t(981)])},isPlayUseMSE:function(){const t=e;return te[t(710)]&&te[t(706)][t(1421)]&&Kt(n)},isPlayUseMSEAndDecoderInWorker:function(){const t=e;return te[t(614)]()&&te[t(706)].mseDecoderUseWorker},isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio:function(){const t=e;return te[t(1248)]()&&te[t(706)][t(981)]},playbackUpdatePlaybackRate:function(){},onOffscreenCanvasWebglContextLost:function(t){const r=e;te[r(582)]("worker",r(838)),t.preventDefault(),F=!0,te[r(1091)][r(1019)](),te[r(1091)]=null,te[r(946)]=null,setTimeout((()=>{const e=r;te.offscreenCanvasGL=te[e(1442)][e(1162)]("webgl"),te.offscreenCanvasGL&&te[e(946)].getContextAttributes()[e(708)]?(te[e(1091)]=ee(te[e(946)],te._opt[e(1028)]),F=!1):te[e(582)](e(1172),e(797))}),500)},onOffscreenCanvasWebglContextRestored:function(t){const r=e;te[r(521)](r(1172),"handleOffscreenCanvasWebglContextRestored"),t[r(1353)]()},videoInfo:function(t,r,n){const i=e;postMessage({cmd:Se.videoCode,code:t}),postMessage({cmd:Se[i(701)],w:r,h:n}),p=r,m=n,te[i(671)]()&&(te.offscreenCanvas=new OffscreenCanvas(r,n),te.offscreenCanvasGL=te[i(1442)][i(1162)]("webgl"),te[i(1091)]=ee(te[i(946)],te._opt[i(1028)]),te[i(1442)][i(1051)](i(1337),te[i(1443)],!1),te[i(1442)][i(1051)](i(973),te.onOffscreenCanvasWebglContextRestored,!1))},audioInfo:function(t,r,n){const i=e;postMessage({cmd:Se.audioCode,code:t}),postMessage({cmd:Se[i(1010)],sampleRate:r,channels:n,depth:z}),T=n},yuvData:function(r,n){const i=e;if(te[i(1036)])return void te[i(521)](i(1172),i(855));if(Xt(_))return void te[i(521)](i(1172),i(830));const s=p*m*3/2;try{let e=t.HEAPU8[i(542)](r,r+s),o=new Uint8Array(e);if(k=null,b=n,te[i(671)]())try{if(F)return;te.webglObj[i(1071)](p,m,o);let e=te[i(1442)][i(828)]();postMessage({cmd:Se[i(1399)],buffer:e,delay:te[i(1260)],ts:n},[e])}catch(e){te[i(582)](i(1172),i(823),e,e.toString())}else postMessage({cmd:Se[i(1399)],output:o,delay:te.delay,ts:n},[o.buffer])}catch(e){te[i(795)]("worker","yuvData ts "+n+i(1455),e,e.toString())}},pcmData:function(t,n,i){const s=e;if(te.isDestroyed)return void te[s(521)](s(1172),s(692));let a=n,c=[],u=0;try{let e=te[s(706)][s(1414)];for(let e=0;e<2;e++){let n=r.HEAPU32[(t>>2)+e]>>2;c[e]=r[s(1033)][s(542)](n,n+a)}if(x){if(!(a>=(n=e-x)))return x+=a,o[0]=Float32Array.of(...o[0],...c[0]),void(2==T&&(o[1]=Float32Array.of(...o[1],...c[1])));E[0]=Float32Array.of(...o[0],...c[0].subarray(0,n)),2==T&&(E[1]=Float32Array.of(...o[1],...c[1][s(542)](0,n))),postMessage({cmd:Se[s(1017)],buffer:E,ts:i},E[s(925)]((e=>e[s(739)]))),u=n,a-=n}for(x=a;x>=e;x-=e)E[0]=c[0][s(598)](u,u+=e),2==T&&(E[1]=c[1][s(598)](u-e,u)),postMessage({cmd:Se[s(1017)],buffer:E,ts:i},E.map((e=>e.buffer)));x&&(o[0]=c[0].slice(u),2==T&&(o[1]=c[1][s(598)](u))),c=[]}catch(e){te.debugWarn(s(1172),"pcmData ts "+i+s(1455),e,e[s(1178)]())}},errorInfo:function(t){const r=e;null===k&&(k=Bt());const n=Bt(),i=Dt(C>0?2*C:5e3,1e3,5e3),s=n-k;s>i&&(te[r(795)]("worker",r(619)+C+r(966)+s+r(572)+i+r(693)),L=!0,postMessage({cmd:Se[r(1277)]}))},sendWebsocketMessage:function(t){const r=e;u?u[r(1292)]===Be[r(645)]?(te[r(521)](r(1172),r(593),t),u[r(1379)](t)):te[r(582)](r(1172),"socket is not open and state is",u.readyState):te.debugError("worker",r(1320))},timeEnd(){const t=e;te[t(582)]("worker",t(1075)),te[t(1224)](),postMessage({cmd:Se[t(1306)]})},postStreamToMain(t,r){const n=e;postMessage({cmd:Se[n(1389)],type:r,buffer:t},[t[n(739)]])},updatePlaybackIsPause(t){const r=e;te.debugLog(r(1172),r(1263)+t),te.isPlaybackPause=t,Kt(t)?te[r(1219)]():te[r(788)]()},getBuildTime:()=>me+"-"+ve,validatedFailed(){const t=e;te[t(582)]("worker",t(1413))},debugLog(t){const r=e;if(te[r(706)].debug&&te[r(666)]){for(var n=arguments[r(1107)],i=new Array(n>1?n-1:0),s=1;s1?n-1:0),s=1;s1?n-1:0),s=1;s>2,p=t,m=r,postMessage({cmd:Se[n(701)],w:t,h:r}),te.useOffscreen()&&(te[n(1442)]=new OffscreenCanvas(t,r),te.offscreenCanvasGL=te[n(1442)][n(1162)]("webgl"),te[n(1091)]=ee(te[n(946)],te[n(706)][n(1028)]),te[n(1442)][n(1051)](n(1337),te[n(1443)],!1),te.offscreenCanvas[n(1051)]("webglcontextrestored",te[n(1132)],!1))},initAudioPlanar:function(e,t){T=e,postMessage({cmd:Se.initAudio,sampleRate:t,channels:e,depth:z})},playAudioPlanar:function(t,n,i){const s=e;if(te[s(1036)])return void te[s(521)](s(1172),s(692));let a=n,c=[],u=0,l=te[s(706)][s(1414)];for(let e=0;e<2;e++){let n=r[s(971)][(t>>2)+e]>>2;c[e]=r[s(1033)].subarray(n,n+a)}if(x){if(!(a>=(n=l-x)))return x+=a,o[0]=Float32Array.of(...o[0],...c[0]),void(2==T&&(o[1]=Float32Array.of(...o[1],...c[1])));E[0]=Float32Array.of(...o[0],...c[0][s(542)](0,n)),2==T&&(E[1]=Float32Array.of(...o[1],...c[1].subarray(0,n))),postMessage({cmd:Se[s(1017)],buffer:E,ts:i},E[s(925)]((e=>e[s(739)]))),u=n,a-=n}for(x=a;x>=l;x-=l)E[0]=c[0][s(598)](u,u+=l),2==T&&(E[1]=c[1].slice(u-l,u)),postMessage({cmd:Se[s(1017)],buffer:E,ts:i},E.map((e=>e.buffer)));x&&(o[0]=c[0][s(598)](u),2==T&&(o[1]=c[1][s(598)](u))),c=[]},draw:function(r,n,i,s){const o=e;if(te.isDestroyed)return void te[o(521)](o(1172),"draw, decoder is destroyed and return");const a=t[o(901)][o(542)](n,n+V),c=t[o(901)][o(542)](i,i+j),u=t[o(901)][o(542)](s,s+j),l=new Uint8Array(V+j+j);if(l[o(771)](a),l[o(771)](c,V),l[o(771)](u,V+j),k=null,b=r,te[o(671)]())try{if(F)return;te[o(1091)].renderYUV(p,m,l);let e=te[o(1442)][o(828)]();postMessage({cmd:Se[o(1399)],buffer:e,delay:te[o(1260)],ts:r},[e])}catch(e){te[o(582)]("worker",o(823),e,e.toString())}else postMessage({cmd:Se.render,output:l,delay:te.delay,ts:r},[l[o(739)]])}}));let re=null;r[e(1387)]&&(re=new(r[e(1387)])(te));let ne=null;t[e(903)]&&(ne=new(t[e(903)])(te)),postMessage({cmd:Se[e(625)]}),self.onmessage=function(t){const r=e;let n=t[r(556)];switch(n[r(775)]){case Ee.init:try{te[r(706)]=Object[r(1295)](te[r(706)],JSON[r(1394)](n[r(581)]))}catch(e){}te.debugLog("worker",r(511)+Ee[r(625)],n[r(581)]);break;case Ee[r(1291)]:te[r(1050)](n[r(739)],n.options);break;case Ee[r(786)]:te.decodeAudio(n[r(739)],n.ts);break;case Ee[r(1372)]:te[r(1367)](n.buffer,n.ts,n[r(499)]);break;case Ee[r(1339)]:te[r(1339)](n[r(646)]);break;case Ee[r(888)]:te.fetchStream(n[r(1024)],JSON[r(1394)](n[r(581)]),n[r(761)]);break;case Ee[r(1224)]:te[r(521)](r(1172),r(511)+Ee.close,JSON.stringify(n[r(790)])),n[r(790)]&&Xt(n[r(790)][r(772)])&&(H=n[r(790)][r(772)]),te.close();break;case Ee[r(580)]:te.debugLog(r(1172),r(511)+Ee[r(580)],n[r(958)],n[r(623)]),te._opt[n[r(958)]]=n[r(623)],n[r(958)]===r(948)&&(te[r(1007)](),te[r(510)]()&&Xt(te[r(1285)]));break;case Ee[r(1345)]:te[r(1145)](n[r(907)]);break;case Ee.mseUpdateVideoTimestamp:Q[r(682)].currentTime=Number(n[r(907)]);break;case Ee[r(1358)]:te[r(1368)](n[r(1119)])}}}(e,e)}))[vc(467)]((e=>{var t=vc;console[t(457)](t(459),e,e[t(468)]())}))})); diff --git a/ui/decoder-pro-audio.wasm b/ui/decoder-pro-audio.wasm index df2f3bc..32da11f 100755 Binary files a/ui/decoder-pro-audio.wasm and b/ui/decoder-pro-audio.wasm differ diff --git a/ui/decoder-pro-f-simd-mt-worker.js b/ui/decoder-pro-f-simd-mt-worker.js new file mode 100644 index 0000000..881f050 --- /dev/null +++ b/ui/decoder-pro-f-simd-mt-worker.js @@ -0,0 +1,16 @@ + +var Module = (() => { + var _scriptDir = import.meta.url; + + return ( +async function(moduleArg = {}) { + +var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var Module=typeof Module!="undefined"?Module:{};Module["locateFile"]=function(url,scriptDirectory){if(url=="decoder-pro-f-simd-mt-worker.wasm"){if(typeof JESSIBUCA_PRO_F_SIMD_MT_WORKER_WASM_URL!="undefined"&&JESSIBUCA_PRO_F_SIMD_MT_WORKER_WASM_URL!=""){return JESSIBUCA_PRO_F_SIMD_MT_WORKER_WASM_URL}else{return scriptDirectory+url}}else if(url=="decoder-pro-f-simd-mt-worker.worker.js"){if(typeof JESSIBUCA_PRO_F_SIMD_MT_WORKER_JS_URL!="undefined"&&JESSIBUCA_PRO_F_SIMD_MT_WORKER_JS_URL!=""){return JESSIBUCA_PRO_F_SIMD_MT_WORKER_JS_URL}else{return scriptDirectory+url}}else{return scriptDirectory+url}};var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var ENVIRONMENT_IS_PTHREAD=Module["ENVIRONMENT_IS_PTHREAD"]||false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_NODE){const{createRequire:createRequire}=await import("module");var require=createRequire(import.meta.url);var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=require("url").fileURLToPath(new URL("./",import.meta.url))}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror,binary=true)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,binary?undefined:"utf8",(err,data)=>{if(err)onerror(err);else onload(binary?data.buffer:data)})};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow};Module["inspect"]=()=>"[Emscripten Module object]";let nodeWorkerThreads;try{nodeWorkerThreads=require("worker_threads")}catch(e){console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?');throw e}global.Worker=nodeWorkerThreads.Worker}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}if(!ENVIRONMENT_IS_NODE){read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}if(ENVIRONMENT_IS_NODE){if(typeof performance=="undefined"){global.performance=require("perf_hooks").performance}}var defaultPrint=console.log.bind(console);var defaultPrintErr=console.error.bind(console);if(ENVIRONMENT_IS_NODE){defaultPrint=(...args)=>fs.writeSync(1,args.join(" ")+"\n");defaultPrintErr=(...args)=>fs.writeSync(2,args.join(" ")+"\n")}var out=Module["print"]||defaultPrint;var err=Module["printErr"]||defaultPrintErr;Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var wasmModule;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||536870912;if(ENVIRONMENT_IS_PTHREAD){wasmMemory=Module["wasmMemory"]}else{if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":INITIAL_MEMORY/65536,"shared":true});if(!(wasmMemory.buffer instanceof SharedArrayBuffer)){err("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag");if(ENVIRONMENT_IS_NODE){err("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)")}throw Error("bad memory")}}}updateMemoryViews();INITIAL_MEMORY=wasmMemory.buffer.byteLength;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(ENVIRONMENT_IS_PTHREAD)return;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function postRun(){if(ENVIRONMENT_IS_PTHREAD)return;if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";var isDataURI=filename=>filename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");var wasmBinaryFile;if(Module["locateFile"]){wasmBinaryFile="decoder-pro-f-simd-mt-worker.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}}else{wasmBinaryFile=new URL("decoder-pro-f-simd-mt-worker.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(binaryFile)){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{if(!response["ok"]){throw"failed to load wasm binary file at '"+binaryFile+"'"}return response["arrayBuffer"]()}).catch(()=>getBinarySync(binaryFile))}else if(readAsync){return new Promise((resolve,reject)=>{readAsync(binaryFile,response=>resolve(new Uint8Array(response)),reject)})}}return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;registerTLSInit(wasmExports["_"]);wasmTable=wasmExports["Y"];addOnInit(wasmExports["U"]);wasmModule=module;removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"],result["module"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var tempDouble;var tempI64;function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}var terminateWorker=worker=>{worker.terminate();worker.onmessage=e=>{}};var killThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];delete PThread.pthreads[pthread_ptr];terminateWorker(worker);__emscripten_thread_free_data(pthread_ptr);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0};var cancelThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];worker.postMessage({"cmd":"cancel"})};var cleanupThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];PThread.returnWorkerToPool(worker)};var spawnThread=threadParams=>{var worker=PThread.getNewWorker();if(!worker){return 6}PThread.runningWorkers.push(worker);PThread.pthreads[threadParams.pthread_ptr]=worker;worker.pthread_ptr=threadParams.pthread_ptr;var msg={"cmd":"run","start_routine":threadParams.startRoutine,"arg":threadParams.arg,"pthread_ptr":threadParams.pthread_ptr};if(ENVIRONMENT_IS_NODE){worker.unref()}worker.postMessage(msg,threadParams.transferList);return 0};var runtimeKeepaliveCounter=0;var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"))},join2:(l,r)=>PATH.normalize(l+"/"+r)};var initRandomFill=()=>{if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){return view=>(view.set(crypto.getRandomValues(new Uint8Array(view.byteLength))),view)}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");var randomFillSync=crypto_module["randomFillSync"];if(randomFillSync){return view=>crypto_module["randomFillSync"](view)}var randomBytes=crypto_module["randomBytes"];return view=>(view.set(randomBytes(view.byteLength)),view)}catch(e){}}abort("initRandomDevice")};var randomFill=view=>(randomFill=initRandomFill())(view);var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.buffer instanceof SharedArrayBuffer?heapOrArray.slice(idx,endPtr):heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var FS_stdin_getChar_buffer=[];var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;var fd=process.stdin.fd;try{bytesRead=fs.readSync(fd,buf)}catch(e){if(e.toString().includes("EOF"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}FS_stdin_getChar_buffer=intArrayFromString(result,true)}return FS_stdin_getChar_buffer.shift()};var TTY={ttys:[],init(){},shutdown(){},register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close(stream){stream.tty.ops.fsync(stream.tty)},fsync(stream){stream.tty.ops.fsync(stream.tty)},read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}},ioctl_tcgets(tty){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(tty,optional_actions,data){return 0},ioctl_tiocgwinsz(tty){return[24,80]}},default_tty1_ops:{put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var mmapAlloc=size=>{abort()};var MEMFS={ops_table:null,mount(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup(parent,name){throw FS.genericErrors[44]},mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{var dep=!noRunDep?getUniqueRunDependency(`al ${url}`):"";readAsync(url,arrayBuffer=>{assert(arrayBuffer,`Loading data file "${url}" failed (no arrayBuffer).`);onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw`Loading data file "${url}" failed.`}});if(dep)addRunDependency(dep)};var FS_createDataFile=(parent,name,fileData,canRead,canWrite,canOwn)=>{FS.createDataFile(parent,name,fileData,canRead,canWrite,canOwn)};var preloadPlugins=Module["preloadPlugins"]||[];var FS_handledByPreloadPlugin=(byteArray,fullname,finish,onerror)=>{if(typeof Browser!="undefined")Browser.init();var handled=false;preloadPlugins.forEach(plugin=>{if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,onerror);handled=true}});return handled};var FS_createPreloadedFile=(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(`cp ${fullname}`);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS_createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(FS_handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}};var FS_modeStringToFlags=str=>{var flagModes={"r":0,"r+":2,"w":512|64|1,"w+":512|64|2,"a":1024|64|1,"a+":1024|64|2};var flags=flagModes[str];if(typeof flags=="undefined"){throw new Error(`Unknown file open mode: ${str}`)}return flags};var FS_getMode=(canRead,canWrite)=>{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(path,opts={}){path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?`${mount}/${path}`:mount+path}path=path?`${node.name}/${path}`:node.name;node=node.parent}},hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode(node){FS.hashRemoveNode(node)},isRoot(node){return node===node.parent},isMountpoint(node){return!!node.mounted},isFile(mode){return(mode&61440)===32768},isDir(mode){return(mode&61440)===16384},isLink(mode){return(mode&61440)===40960},isChrdev(mode){return(mode&61440)===8192},isBlkdev(mode){return(mode&61440)===24576},isFIFO(mode){return(mode&61440)===4096},isSocket(mode){return(mode&49152)===49152},flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions(node,perms){if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup(dir){var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd(){for(var fd=0;fd<=FS.MAX_OPEN_FDS;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStreamChecked(fd){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}return stream},getStream:fd=>FS.streams[fd],createStream(stream,fd=-1){if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get(){return this.node},set(val){this.node=val}},isRead:{get(){return(this.flags&2097155)!==1}},isWrite:{get(){return(this.flags&2097155)!==0}},isAppend:{get(){return this.flags&1024}},flags:{get(){return this.shared.flags},set(val){this.shared.flags=val}},position:{get(){return this.shared.position},set(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);if(fd==-1){fd=FS.nextfd()}stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream(fd){FS.streams[fd]=null},chrdev_stream_ops:{open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek(){throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`)}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup(parent,name){return parent.node_ops.lookup(parent,name)},mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var i=0;i0,ioctl(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile(path,opts={}){opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error(`Invalid encoding type "${opts.encoding}"`)}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile(path,data,opts={}){opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var randomBuffer=new Uint8Array(1024),randomLeft=0;var randomByte=()=>{if(randomLeft===0){randomLeft=randomFill(randomBuffer).byteLength}return randomBuffer[--randomLeft]};FS.createDevice("/dev","random",randomByte);FS.createDevice("/dev","urandom",randomByte);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount(){var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup(parent,name){var fd=+name;var stream=FS.getStreamChecked(fd);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams(){if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},ensureErrnoError(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.name="ErrnoError";this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS}},init(input,output,error){FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit(){FS.init.initialized=false;for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node}};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=stat.mode;HEAPU32[buf+8>>2]=stat.nlink;HEAP32[buf+12>>2]=stat.uid;HEAP32[buf+16>>2]=stat.gid;HEAP32[buf+20>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+24>>2]=tempI64[0],HEAP32[buf+28>>2]=tempI64[1];HEAP32[buf+32>>2]=4096;HEAP32[buf+36>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAPU32[buf+48>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>2]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>2]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>2]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];return 0},doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get(){var ret=HEAP32[+SYSCALLS.varargs>>2];SYSCALLS.varargs+=4;return ret},getp(){return SYSCALLS.get()},getStr(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD(fd){var stream=FS.getStreamChecked(fd);return stream}};var withStackSave=f=>{var stack=stackSave();var ret=f();stackRestore(stack);return ret};var convertI32PairToI53Checked=(lo,hi)=>hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;var proxyToMainThread=function(index,sync){var numCallArgs=arguments.length-2;var outerArgs=arguments;return withStackSave(()=>{var serializedNumCallArgs=numCallArgs;var args=stackAlloc(serializedNumCallArgs*8);var b=args>>3;for(var i=0;i{EXITSTATUS=status;if(ENVIRONMENT_IS_PTHREAD){exitOnMainThread(status);throw"unwind"}_proc_exit(status)};var _exit=exitJS;var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var PThread={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){if(ENVIRONMENT_IS_PTHREAD){PThread.initWorker()}else{PThread.initMainThread()}},initMainThread(){var pthreadPoolSize=4;while(pthreadPoolSize--){PThread.allocateUnusedWorker()}addOnPreRun(()=>{addRunDependency("loading-workers");PThread.loadWasmModuleToAllWorkers(()=>removeRunDependency("loading-workers"))})},initWorker(){noExitRuntime=false},setExitStatus:status=>{EXITSTATUS=status},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var worker of PThread.runningWorkers){terminateWorker(worker)}for(var worker of PThread.unusedWorkers){terminateWorker(worker)}PThread.unusedWorkers=[];PThread.runningWorkers=[];PThread.pthreads=[]},returnWorkerToPool:worker=>{var pthread_ptr=worker.pthread_ptr;delete PThread.pthreads[pthread_ptr];PThread.unusedWorkers.push(worker);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0;__emscripten_thread_free_data(pthread_ptr)},receiveObjectTransfer(data){},threadInitTLS(){PThread.tlsInitFunctions.forEach(f=>f())},loadWasmModuleToWorker:worker=>new Promise(onFinishedLoading=>{worker.onmessage=e=>{var d=e["data"];var cmd=d["cmd"];if(d["targetThread"]&&d["targetThread"]!=_pthread_self()){var targetWorker=PThread.pthreads[d["targetThread"]];if(targetWorker){targetWorker.postMessage(d,d["transferList"])}else{err(`Internal error! Worker sent a message "${cmd}" to target pthread ${d["targetThread"]}, but that thread no longer exists!`)}return}if(cmd==="checkMailbox"){checkMailbox()}else if(cmd==="spawnThread"){spawnThread(d)}else if(cmd==="cleanupThread"){cleanupThread(d["thread"])}else if(cmd==="killThread"){killThread(d["thread"])}else if(cmd==="cancelThread"){cancelThread(d["thread"])}else if(cmd==="loaded"){worker.loaded=true;if(ENVIRONMENT_IS_NODE&&!worker.pthread_ptr){worker.unref()}onFinishedLoading(worker)}else if(cmd==="alert"){alert(`Thread ${d["threadId"]}: ${d["text"]}`)}else if(d.target==="setimmediate"){worker.postMessage(d)}else if(cmd==="callHandler"){Module[d["handler"]](...d["args"])}else if(cmd){err(`worker sent an unknown command ${cmd}`)}};worker.onerror=e=>{var message="worker sent an error!";err(`${message} ${e.filename}:${e.lineno}: ${e.message}`);throw e};if(ENVIRONMENT_IS_NODE){worker.on("message",data=>worker.onmessage({data:data}));worker.on("error",e=>worker.onerror(e))}var handlers=[];var knownHandlers=["onExit","onAbort","print","printErr"];for(var handler of knownHandlers){if(Module.hasOwnProperty(handler)){handlers.push(handler)}}worker.postMessage({"cmd":"load","handlers":handlers,"urlOrBlob":Module["mainScriptUrlOrBlob"],"wasmMemory":wasmMemory,"wasmModule":wasmModule})}),loadWasmModuleToAllWorkers(onMaybeReady){if(ENVIRONMENT_IS_PTHREAD){return onMaybeReady()}let pthreadPoolReady=Promise.all(PThread.unusedWorkers.map(PThread.loadWasmModuleToWorker));pthreadPoolReady.then(onMaybeReady)},allocateUnusedWorker(){var worker;if(!Module["locateFile"]){worker=new Worker(new URL("decoder-pro-f-simd-mt-worker.worker.js",import.meta.url),{type:"module"})}else{var pthreadMainJs=locateFile("decoder-pro-f-simd-mt-worker.worker.js");worker=new Worker(pthreadMainJs,{type:"module"})}PThread.unusedWorkers.push(worker)},getNewWorker(){if(PThread.unusedWorkers.length==0){PThread.allocateUnusedWorker();PThread.loadWasmModuleToWorker(PThread.unusedWorkers[0])}return PThread.unusedWorkers.pop()}};Module["PThread"]=PThread;var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var establishStackSpace=()=>{var pthread_ptr=_pthread_self();var stackHigh=HEAPU32[pthread_ptr+52>>2];var stackSize=HEAPU32[pthread_ptr+56>>2];var stackLow=stackHigh-stackSize;_emscripten_stack_set_limits(stackHigh,stackLow);stackRestore(stackHigh)};Module["establishStackSpace"]=establishStackSpace;function exitOnMainThread(returnCode){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(1,0,returnCode);_exit(returnCode)}var wasmTableMirror=[];var wasmTable;var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};var invokeEntryPoint=(ptr,arg)=>{var result=getWasmTableEntry(ptr)(arg);function finish(result){if(keepRuntimeAlive()){PThread.setExitStatus(result)}else{__emscripten_thread_exit(result)}}finish(result)};Module["invokeEntryPoint"]=invokeEntryPoint;var noExitRuntime=Module["noExitRuntime"]||true;var registerTLSInit=tlsInitFunc=>{PThread.tlsInitFunctions.push(tlsInitFunc)};var ___assert_fail=(condition,filename,line,func)=>{abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])};function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;var ___cxa_throw=(ptr,type,destructor)=>{var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw exceptionLast};var ___emscripten_init_main_thread_js=tb=>{__emscripten_thread_init(tb,!ENVIRONMENT_IS_WORKER,1,!ENVIRONMENT_IS_WEB,16777216,false);PThread.threadInitTLS()};var ___emscripten_thread_cleanup=thread=>{if(!ENVIRONMENT_IS_PTHREAD)cleanupThread(thread);else postMessage({"cmd":"cleanupThread","thread":thread})};function pthreadCreateProxied(pthread_ptr,attr,startRoutine,arg){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(2,1,pthread_ptr,attr,startRoutine,arg);return ___pthread_create_js(pthread_ptr,attr,startRoutine,arg)}var ___pthread_create_js=(pthread_ptr,attr,startRoutine,arg)=>{if(typeof SharedArrayBuffer=="undefined"){err("Current environment does not support SharedArrayBuffer, pthreads are not available!");return 6}var transferList=[];var error=0;if(ENVIRONMENT_IS_PTHREAD&&(transferList.length===0||error)){return pthreadCreateProxied(pthread_ptr,attr,startRoutine,arg)}if(error)return error;var threadParams={startRoutine:startRoutine,pthread_ptr:pthread_ptr,arg:arg,transferList:transferList};if(ENVIRONMENT_IS_PTHREAD){threadParams.cmd="spawnThread";postMessage(threadParams,transferList);return 0}return spawnThread(threadParams)};var setErrNo=value=>{HEAP32[___errno_location()>>2]=value;return value};function ___syscall_fcntl64(fd,cmd,varargs){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(3,1,fd,cmd,varargs);SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}while(FS.streams[arg]){arg++}var newStream;newStream=FS.createStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 5:{var arg=SYSCALLS.getp();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(4,1,dirfd,path,flags,varargs);SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;var throwInternalError=message=>{throw new InternalError(message)};var whenDependentTypesAreResolved=(myTypes,dependentTypes,getTypeConverters)=>{myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i{if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(()=>{typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}};function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type "${name}" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":function(pointer){return this["fromWireType"](HEAPU8[pointer])},destructorFunction:null})};var shallowCopyInternalPointer=o=>({count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType});var throwInstanceAlreadyDeleted=obj=>{function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")};var finalizationRegistry=false;var detachFinalizer=handle=>{};var runDestructor=$$=>{if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}};var releaseClassHandle=$$=>{$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}};var downcastPointer=(ptr,ptrClass,desiredClass)=>{if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)};var registeredPointers={};var getInheritedInstanceCount=()=>Object.keys(registeredInstances).length;var getLiveInheritedInstances=()=>{var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv};var deletionQueue=[];var flushPendingDeletes=()=>{while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}};var delayFunction;var setDelayFunction=fn=>{delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}};var init_embind=()=>{Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction};var registeredInstances={};var getBasestPointer=(class_,ptr)=>{if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr};var getInheritedInstance=(class_,ptr)=>{ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]};var makeClassHandle=(prototype,record)=>{if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))};function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}var attachFinalizer=handle=>{if("undefined"===typeof FinalizationRegistry){attachFinalizer=handle=>handle;return handle}finalizationRegistry=new FinalizationRegistry(info=>{releaseClassHandle(info.$$)});attachFinalizer=handle=>{var $$=handle.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$:$$};finalizationRegistry.register(handle,info,handle)}return handle};detachFinalizer=handle=>finalizationRegistry.unregister(handle);return attachFinalizer(handle)};var init_ClassHandle=()=>{Object.assign(ClassHandle.prototype,{"isAliasOf"(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;other.$$=other.$$;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right},"clone"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}},"delete"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}},"isDeleted"(){return!this.$$.ptr},"deleteLater"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}})};function ClassHandle(){}var createNamedFunction=(name,body)=>Object.defineProperty(body,"name",{value:name});var ensureOverloadTable=(proto,methodName,humanName)=>{if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError(`Function '${humanName}' called with an invalid number of arguments (${arguments.length}) - expects one of (${proto[methodName].overloadTable})!`)}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}};var exposePublicSymbol=(name,value,numArguments)=>{if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError(`Cannot register public name '${name}' twice`)}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError(`Cannot register multiple overloads of a function with the same number of arguments (${numArguments})!`)}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}};var char_0=48;var char_9=57;var makeLegalFunctionName=name=>{if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return`_${name}`}return name};function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}var upcastPointer=(ptr,ptrClass,desiredClass)=>{while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError(`Expected null or instance of ${desiredClass.name}, got an instance of ${ptrClass.name}`)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr};function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(()=>clonedHandle["delete"]()));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function readPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}var init_RegisteredPointer=()=>{Object.assign(RegisteredPointer.prototype,{getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr},destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":readPointer,"deleteObject"(handle){if(handle!==null){handle["delete"]()}},"fromWireType":RegisteredPointer_fromWireType})};function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}var replacePublicSymbol=(name,value,numArguments)=>{if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}};var dynCallLegacy=(sig,ptr,args)=>{var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)};var dynCall=(sig,ptr,args)=>{if(sig.includes("j")){return dynCallLegacy(sig,ptr,args)}var rtn=getWasmTableEntry(ptr).apply(null,args);return rtn};var getDynCaller=(sig,ptr)=>{var argCache=[];return function(){argCache.length=0;Object.assign(argCache,arguments);return dynCall(sig,ptr,argCache)}};var embind__requireFunction=(signature,rawFunction)=>{signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes("j")){return getDynCaller(signature,rawFunction)}return getWasmTableEntry(rawFunction)}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError(`unknown function pointer with signature ${signature}: ${rawFunction}`)}return fp};var extendError=(baseErrorType,errorName)=>{var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return`${this.name}: ${this.message}`}};return errorClass};var UnboundTypeError;var getTypeName=type=>{var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv};var throwUnboundTypeError=(message,types)=>{var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(`${message}: `+unboundTypes.map(getTypeName).join([", "]))};var __embind_register_class=(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor)=>{name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError(`Cannot construct ${name} due to unbound types`,[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(name,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError("Use 'new' to construct "+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+" has no accessible constructor")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError(`Tried to invoke ctor of ${name} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(registeredClass.constructor_body).toString()}) parameters instead!`)}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);if(registeredClass.baseClass){if(registeredClass.baseClass.__derivedClasses===undefined){registeredClass.baseClass.__derivedClasses=[]}registeredClass.baseClass.__derivedClasses.push(registeredClass)}var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})};var heap32VectorToArray=(count,firstElement)=>{var array=[];for(var i=0;i>2])}return array};var runDestructors=destructors=>{while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}};function newFunc(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError(`new_ called with constructor type ${typeof constructor} which is not a function`)}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc,isAsync){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i0?", ":"")+argsListWired}invokerFnBody+=(returns||isAsync?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i{var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=`constructor ${classType.name}`;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError(`Cannot register multiple constructors with identical number of parameters (${argCount-1}) for class '${classType.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`)}classType.registeredClass.constructor_body[argCount-1]=()=>{throwUnboundTypeError(`Cannot construct ${classType.name} due to unbound types`,rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,argTypes=>{argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})};var getFunctionName=signature=>{signature=signature.trim();const argsIndex=signature.indexOf("(");if(argsIndex!==-1){return signature.substr(0,argsIndex)}else{return signature}};var __embind_register_class_function=(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual,isAsync)=>{var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);methodName=getFunctionName(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=`${classType.name}.${methodName}`;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError(`Cannot call ${humanName} due to unbound types`,rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context,isAsync);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module["count_emval_handles"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":(destructors,value)=>Emval.toHandle(value),"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})};var embindRepr=v=>{if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":value=>value,"toWireType":(destructors,value)=>value,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.slice(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,"fromWireType":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":(destructors,value)=>{if(!(typeof value=="string")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":()=>undefined,"toWireType":(destructors,o)=>undefined})};var maybeExit=()=>{if(!keepRuntimeAlive()){try{if(ENVIRONMENT_IS_PTHREAD)__emscripten_thread_exit(EXITSTATUS);else _exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var __emscripten_thread_mailbox_await=pthread_ptr=>{if(typeof Atomics.waitAsync==="function"){var wait=Atomics.waitAsync(HEAP32,pthread_ptr>>2,pthread_ptr);wait.value.then(checkMailbox);var waitingAsync=pthread_ptr+128;Atomics.store(HEAP32,waitingAsync>>2,1)}};Module["__emscripten_thread_mailbox_await"]=__emscripten_thread_mailbox_await;var checkMailbox=()=>{var pthread_ptr=_pthread_self();if(pthread_ptr){__emscripten_thread_mailbox_await(pthread_ptr);callUserCallback(__emscripten_check_mailbox)}};Module["checkMailbox"]=checkMailbox;var __emscripten_notify_mailbox_postmessage=(targetThreadId,currThreadId,mainThreadId)=>{if(targetThreadId==currThreadId){setTimeout(()=>checkMailbox())}else if(ENVIRONMENT_IS_PTHREAD){postMessage({"targetThread":targetThreadId,"cmd":"checkMailbox"})}else{var worker=PThread.pthreads[targetThreadId];if(!worker){return}worker.postMessage({"cmd":"checkMailbox"})}};var proxiedJSCallArgs=[];var __emscripten_receive_on_main_thread_js=(index,callingThread,numCallArgs,args)=>{proxiedJSCallArgs.length=numCallArgs;var b=args>>3;for(var i=0;i{if(ENVIRONMENT_IS_NODE){PThread.pthreads[thread].ref()}};var emval_symbols={};var getStringOrSymbol=address=>{var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}return symbol};var emval_methodCallers=[];var __emval_call_method=(caller,objHandle,methodName,destructorsRef,args)=>{caller=emval_methodCallers[caller];objHandle=Emval.toValue(objHandle);methodName=getStringOrSymbol(methodName);return caller(objHandle,objHandle[methodName],destructorsRef,args)};var emval_addMethodCaller=caller=>{var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id};var requireRegisteredType=(rawType,humanName)=>{var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl};var emval_lookupTypes=(argCount,argTypes)=>{var a=new Array(argCount);for(var i=0;i>2],"parameter "+i)}return a};var reflectConstruct=Reflect.construct;var emval_returnValue=(returnType,destructorsRef,handle)=>{var destructors=[];var result=returnType["toWireType"](destructors,handle);if(destructors.length){HEAPU32[destructorsRef>>2]=Emval.toHandle(destructors)}return result};var __emval_get_method_caller=(argCount,argTypes,kind)=>{var types=emval_lookupTypes(argCount,argTypes);var retType=types.shift();argCount--;var functionBody=`return function (obj, func, destructorsRef, args) {\n`;var offset=0;var argsList=[];if(kind===0){argsList.push("obj")}var params=["retType"];var args=[retType];for(var i=0;it.name).join(", ")}) => ${retType.name}>`;return emval_addMethodCaller(createNamedFunction(functionName,invokerFunction))};var __emval_run_destructors=handle=>{var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle)};var isLeapYear=year=>year%4===0&&(year%100!==0||year%400===0);var MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];var ydayFromDate=date=>{var leap=isLeapYear(date.getFullYear());var monthDaysCumulative=leap?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday};function __localtime_js(time_low,time_high,tmPtr){var time=convertI32PairToI53Checked(time_low,time_high);var date=new Date(time*1e3);HEAP32[tmPtr>>2]=date.getSeconds();HEAP32[tmPtr+4>>2]=date.getMinutes();HEAP32[tmPtr+8>>2]=date.getHours();HEAP32[tmPtr+12>>2]=date.getDate();HEAP32[tmPtr+16>>2]=date.getMonth();HEAP32[tmPtr+20>>2]=date.getFullYear()-1900;HEAP32[tmPtr+24>>2]=date.getDay();var yday=ydayFromDate(date)|0;HEAP32[tmPtr+28>>2]=yday;HEAP32[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;HEAP32[tmPtr+32>>2]=dst}var stringToNewUTF8=str=>{var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8(str,ret,size);return ret};var __tzset_js=(timezone,daylight,tzname)=>{var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=stringToNewUTF8(winterName);var summerNamePtr=stringToNewUTF8(summerName);if(summerOffset>2]=winterNamePtr;HEAPU32[tzname+4>>2]=summerNamePtr}else{HEAPU32[tzname>>2]=summerNamePtr;HEAPU32[tzname+4>>2]=winterNamePtr}};var _abort=()=>{abort("")};var warnOnce=text=>{if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;if(ENVIRONMENT_IS_NODE)text="warning: "+text;err(text)}};var _emscripten_check_blocking_allowed=()=>{};var _emscripten_date_now=()=>Date.now();var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};var _emscripten_exit_with_live_runtime=()=>{runtimeKeepalivePush();throw"unwind"};var getHeapMax=()=>HEAPU8.length;var _emscripten_get_heap_max=()=>getHeapMax();var _emscripten_get_now;_emscripten_get_now=()=>performance.timeOrigin+performance.now();var _emscripten_num_logical_cores=()=>{if(ENVIRONMENT_IS_NODE)return require("os").cpus().length;return navigator["hardwareConcurrency"]};var abortOnCannotGrowMemory=requestedSize=>{abort("OOM")};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;abortOnCannotGrowMemory(requestedSize)};var ENV={};var getExecutableName=()=>thisProgram||"./this.program";var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings};var stringToAscii=(str,buffer)=>{for(var i=0;i>0]=str.charCodeAt(i)}HEAP8[buffer>>0]=0};var _environ_get=function(__environ,environ_buf){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(5,1,__environ,environ_buf);var bufSize=0;getEnvStrings().forEach((string,i)=>{var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;stringToAscii(string,ptr);bufSize+=string.length+1});return 0};var _environ_sizes_get=function(penviron_count,penviron_buf_size){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(6,1,penviron_count,penviron_buf_size);var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(string=>bufSize+=string.length+1);HEAPU32[penviron_buf_size>>2]=bufSize;return 0};function _fd_close(fd){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(7,1,fd);try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_fdstat_get(fd,pbuf){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(8,1,fd,pbuf);try{var rightsBase=0;var rightsInheriting=0;var flags=0;{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4}HEAP8[pbuf>>0]=type;HEAP16[pbuf+2>>1]=flags;tempI64=[rightsBase>>>0,(tempDouble=rightsBase,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[pbuf+8>>2]=tempI64[0],HEAP32[pbuf+12>>2]=tempI64[1];tempI64=[rightsInheriting>>>0,(tempDouble=rightsInheriting,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[pbuf+16>>2]=tempI64[0],HEAP32[pbuf+20>>2]=tempI64[1];return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doReadv=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(10,1,fd,offset_low,offset_high,whence,newOffset);var offset=convertI32PairToI53Checked(offset_low,offset_high);try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doWritev=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret};function _fd_write(fd,iov,iovcnt,pnum){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(11,1,fd,iov,iovcnt,pnum);try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}PThread.init();var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.createPreloadedFile=FS_createPreloadedFile;FS.staticInit();embind_init_charCodes();BindingError=Module["BindingError"]=class BindingError extends Error{constructor(message){super(message);this.name="BindingError"}};InternalError=Module["InternalError"]=class InternalError extends Error{constructor(message){super(message);this.name="InternalError"}};init_ClassHandle();init_embind();init_RegisteredPointer();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");handleAllocatorInit();init_emval();var proxiedFunctionTable=[_proc_exit,exitOnMainThread,pthreadCreateProxied,___syscall_fcntl64,___syscall_openat,_environ_get,_environ_sizes_get,_fd_close,_fd_fdstat_get,_fd_read,_fd_seek,_fd_write];var wasmImports={g:___assert_fail,s:___cxa_throw,H:___emscripten_init_main_thread_js,m:___emscripten_thread_cleanup,C:___pthread_create_js,Q:___syscall_fcntl64,E:___syscall_openat,v:__embind_register_bigint,S:__embind_register_bool,P:__embind_register_class,G:__embind_register_class_constructor,k:__embind_register_class_function,R:__embind_register_emval,p:__embind_register_float,d:__embind_register_integer,c:__embind_register_memory_view,q:__embind_register_std_string,l:__embind_register_std_wstring,T:__embind_register_void,y:__emscripten_notify_mailbox_postmessage,D:__emscripten_receive_on_main_thread_js,F:__emscripten_thread_mailbox_await,M:__emscripten_thread_set_strongref,j:__emval_call_method,r:__emval_decref,i:__emval_get_method_caller,h:__emval_run_destructors,t:__localtime_js,x:__tzset_js,b:_abort,n:_emscripten_check_blocking_allowed,f:_emscripten_date_now,L:_emscripten_exit_with_live_runtime,z:_emscripten_get_heap_max,e:_emscripten_get_now,A:_emscripten_num_logical_cores,w:_emscripten_resize_heap,J:_environ_get,K:_environ_sizes_get,B:_exit,o:_fd_close,I:_fd_fdstat_get,O:_fd_read,u:_fd_seek,N:_fd_write,a:wasmMemory||Module["wasmMemory"]};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["U"])();var _free=a0=>(_free=wasmExports["V"])(a0);var _malloc=a0=>(_malloc=wasmExports["W"])(a0);var _pthread_self=Module["_pthread_self"]=()=>(_pthread_self=Module["_pthread_self"]=wasmExports["X"])();var ___errno_location=()=>(___errno_location=wasmExports["Z"])();var __emscripten_tls_init=Module["__emscripten_tls_init"]=()=>(__emscripten_tls_init=Module["__emscripten_tls_init"]=wasmExports["_"])();var ___getTypeName=a0=>(___getTypeName=wasmExports["$"])(a0);var __embind_initialize_bindings=Module["__embind_initialize_bindings"]=()=>(__embind_initialize_bindings=Module["__embind_initialize_bindings"]=wasmExports["aa"])();var __emscripten_thread_init=Module["__emscripten_thread_init"]=(a0,a1,a2,a3,a4,a5)=>(__emscripten_thread_init=Module["__emscripten_thread_init"]=wasmExports["ba"])(a0,a1,a2,a3,a4,a5);var __emscripten_thread_crashed=Module["__emscripten_thread_crashed"]=()=>(__emscripten_thread_crashed=Module["__emscripten_thread_crashed"]=wasmExports["ca"])();var _emscripten_main_thread_process_queued_calls=()=>(_emscripten_main_thread_process_queued_calls=wasmExports["emscripten_main_thread_process_queued_calls"])();var _emscripten_main_runtime_thread_id=()=>(_emscripten_main_runtime_thread_id=wasmExports["emscripten_main_runtime_thread_id"])();var __emscripten_run_on_main_thread_js=(a0,a1,a2,a3)=>(__emscripten_run_on_main_thread_js=wasmExports["da"])(a0,a1,a2,a3);var __emscripten_thread_free_data=a0=>(__emscripten_thread_free_data=wasmExports["ea"])(a0);var __emscripten_thread_exit=Module["__emscripten_thread_exit"]=a0=>(__emscripten_thread_exit=Module["__emscripten_thread_exit"]=wasmExports["fa"])(a0);var __emscripten_check_mailbox=()=>(__emscripten_check_mailbox=wasmExports["ga"])();var setTempRet0=a0=>(setTempRet0=wasmExports["ha"])(a0);var _emscripten_stack_set_limits=(a0,a1)=>(_emscripten_stack_set_limits=wasmExports["ia"])(a0,a1);var stackSave=()=>(stackSave=wasmExports["ja"])();var stackRestore=a0=>(stackRestore=wasmExports["ka"])(a0);var stackAlloc=a0=>(stackAlloc=wasmExports["la"])(a0);var ___cxa_increment_exception_refcount=a0=>(___cxa_increment_exception_refcount=wasmExports["__cxa_increment_exception_refcount"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports["ma"])(a0);var dynCall_jiji=Module["dynCall_jiji"]=(a0,a1,a2,a3,a4)=>(dynCall_jiji=Module["dynCall_jiji"]=wasmExports["na"])(a0,a1,a2,a3,a4);var _ff_h264_cabac_tables=Module["_ff_h264_cabac_tables"]=61436;Module["wasmMemory"]=wasmMemory;Module["keepRuntimeAlive"]=keepRuntimeAlive;Module["ExitStatus"]=ExitStatus;Module["PThread"]=PThread;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}if(ENVIRONMENT_IS_PTHREAD){readyPromiseResolve(Module);initRuntime();startWorker(Module);return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); + + + return moduleArg.ready +} +); +})(); +; +export default Module; \ No newline at end of file diff --git a/ui/decoder-pro-f-simd-mt-worker.wasm b/ui/decoder-pro-f-simd-mt-worker.wasm new file mode 100755 index 0000000..53db874 Binary files /dev/null and b/ui/decoder-pro-f-simd-mt-worker.wasm differ diff --git a/ui/decoder-pro-f-simd-mt-worker.worker.js b/ui/decoder-pro-f-simd-mt-worker.worker.js new file mode 100644 index 0000000..0475032 --- /dev/null +++ b/ui/decoder-pro-f-simd-mt-worker.worker.js @@ -0,0 +1 @@ +"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:f=>(0,eval)(fs.readFileSync(f,"utf8")+"//# sourceURL="+f),postMessage:msg=>parentPort.postMessage(msg),performance:global.performance||{now:Date.now}})}var initializedJS=false;function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+"\n");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var module=Module["wasmModule"];Module["wasmModule"]=null;var instance=new WebAssembly.Instance(module,info);return receiveInstance(instance)};self.onunhandledrejection=e=>{throw e.reason||e};function handleMessage(e){try{if(e.data.cmd==="load"){let messageQueue=[];self.onmessage=e=>messageQueue.push(e);self.startWorker=instance=>{Module=instance;postMessage({"cmd":"loaded"});for(let msg of messageQueue){handleMessage(msg)}self.onmessage=handleMessage};Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=(...args)=>{postMessage({cmd:"callHandler",handler:handler,args:args})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;(e.data.urlOrBlob?import(e.data.urlOrBlob):import("./decoder-pro-f-simd-mt-worker.js")).then(exports=>exports.default(Module))}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["__emscripten_thread_mailbox_await"](e.data.pthread_ptr);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){Module["__embind_initialize_bindings"]();initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){throw ex}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="checkMailbox"){if(initializedJS){Module["checkMailbox"]()}}else if(e.data.cmd){err(`worker.js received unknown command ${e.data.cmd}`);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}}self.onmessage=handleMessage; diff --git a/ui/decoder-pro-f-simd-mt.js b/ui/decoder-pro-f-simd-mt.js new file mode 100644 index 0000000..c120961 --- /dev/null +++ b/ui/decoder-pro-f-simd-mt.js @@ -0,0 +1 @@ +!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,r=(e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd-mt.js",document.baseURI).href,async function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,n,o;(o=r).ready=new Promise(((e,r)=>{t=e,n=r})),(o=void 0!==o?o:{}).locateFile=function(e,r){return"decoder-pro-f-simd-mt-worker.wasm"==e?"undefined"!=typeof JESSIBUCA_PRO_F_SIMD_MT_WORKER_WASM_URL&&""!=JESSIBUCA_PRO_F_SIMD_MT_WORKER_WASM_URL?JESSIBUCA_PRO_F_SIMD_MT_WORKER_WASM_URL:r+e:"decoder-pro-f-simd-mt-worker.worker.js"==e&&"undefined"!=typeof JESSIBUCA_PRO_F_SIMD_MT_WORKER_JS_URL&&""!=JESSIBUCA_PRO_F_SIMD_MT_WORKER_JS_URL?JESSIBUCA_PRO_F_SIMD_MT_WORKER_JS_URL:r+e};var a,i,s,l=Object.assign({},o),d="./this.program",u=(e,r)=>{throw r},c="object"==typeof window,f="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,p=o.ENVIRONMENT_IS_PTHREAD||!1,m="";function g(e){return o.locateFile?o.locateFile(e,m):m+e}if(h){const{createRequire:e}=await import("module");var v=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd-mt.js",document.baseURI).href),y=v("fs"),w=v("path");let r;m=f?w.dirname(m)+"/":v("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd-mt.js",document.baseURI).href)),a=(e,r)=>(e=ae(e)?new URL(e):w.normalize(e),y.readFileSync(e,r?void 0:"utf8")),s=e=>{var r=a(e,!0);return r.buffer||(r=new Uint8Array(r)),r},i=function(e,r,t){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=ae(e)?new URL(e):w.normalize(e),y.readFile(e,n?void 0:"utf8",((e,o)=>{e?t(e):r(n?o.buffer:o)}))},!o.thisProgram&&process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),u=(e,r)=>{throw process.exitCode=e,r},o.inspect=()=>"[Emscripten Module object]";try{r=v("worker_threads")}catch(e){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),e}global.Worker=r.Worker}else(c||f)&&(f?m=self.location.href:"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),e&&(m=e),m=0!==m.indexOf("blob:")?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",h||(a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},f&&(s=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)}));h&&"undefined"==typeof performance&&(global.performance=v("perf_hooks").performance);var _=console.log.bind(console),b=console.error.bind(console);h&&(_=function(){for(var e=arguments.length,r=new Array(e),t=0;te.startsWith(ne),ae=e=>e.startsWith("file://");function ie(e){if(e==ee&&E)return new Uint8Array(E);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}function se(e){if(!E&&(c||f)){if("function"==typeof fetch&&!ae(e))return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>ie(e)));if(i)return new Promise(((r,t)=>{i(e,(e=>r(new Uint8Array(e))),t)}))}return Promise.resolve().then((()=>ie(e)))}function le(e,r,t){return se(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{C(`failed to asynchronously prepare wasm: ${e}`),K(e)}))}function de(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||oe(r)||ae(r)||h||"function"!=typeof fetch?le(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return C(`wasm streaming compile failed: ${e}`),C("falling back to ArrayBuffer instantiation"),le(r,t,n)}))))}function ue(){var e={a:oo};function r(e,r){return ao=e.exports,ar(ao._),er=ao.Y,q(ao.U),S=r,Z(),ao}if(Q(),o.instantiateWasm)try{return o.instantiateWasm(e,r)}catch(e){C(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return de(E,ee,e,(function(e){r(e.instance,e.module)})).catch(n),{}}function ce(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}o.locateFile?oe(ee="decoder-pro-f-simd-mt-worker.wasm")||(ee=g(ee)):ee=new URL("decoder-pro-f-simd-mt-worker.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd-mt.js",document.baseURI).href).href;var fe=e=>{e.terminate(),e.onmessage=e=>{}},he=e=>{var r=Je.pthreads[e];delete Je.pthreads[e],fe(r),mo(e),Je.runningWorkers.splice(Je.runningWorkers.indexOf(r),1),r.pthread_ptr=0},pe=e=>{Je.pthreads[e].postMessage({cmd:"cancel"})},me=e=>{var r=Je.pthreads[e];Je.returnWorkerToPool(r)},ge=e=>{var r=Je.getNewWorker();if(!r)return 6;Je.runningWorkers.push(r),Je.pthreads[e.pthread_ptr]=r,r.pthread_ptr=e.pthread_ptr;var t={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return h&&r.unref(),r.postMessage(t,e.transferList),0},ve=0,ye=()=>or||ve>0,we={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=we.isAbs(e),t="/"===e.substr(-1);return(e=we.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=we.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=we.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return we.normalize(e.join("/"))},join2:(e,r)=>we.normalize(e+"/"+r)},_e=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>(e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e);if(h)try{var e=v("crypto");if(e.randomFillSync)return r=>e.randomFillSync(r);var r=e.randomBytes;return e=>(e.set(r(e.byteLength)),e)}catch(e){}K("initRandomDevice")},be=e=>(be=_e())(e),Ee={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:Le.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=we.isAbs(n)}return(r?"/":"")+(e=we.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=Ee.resolve(e).substr(1),r=Ee.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&ke)return ke.decode(e.buffer instanceof SharedArrayBuffer?e.slice(r,o):e.subarray(r,o));for(var a="";r>10,56320|1023&d)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Ae=[],Ce=e=>{for(var r=0,t=0;t=55296&&n<=57343?(r+=4,++t):r+=3}return r},Pe=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function Te(e,r,t){var n=t>0?t:Ce(e)+1,o=new Array(n),a=Pe(e,o,0,o.length);return r&&(o.length=a),o}var Ie=()=>{if(!Ae.length){var e=null;if(h){var r=Buffer.alloc(256),t=0,n=process.stdin.fd;try{t=y.readSync(n,r)}catch(e){if(!e.toString().includes("EOF"))throw e;t=0}e=t>0?r.slice(0,t).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;Ae=Te(e,!0)}return Ae.shift()},Fe={ttys:[],init(){},shutdown(){},register(e,r){Fe.ttys[e]={input:[],output:[],ops:r},Le.registerDevice(e,Fe.stream_ops)},stream_ops:{open(e){var r=Fe.ttys[e.node.rdev];if(!r)throw new Le.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Le.ErrnoError(60);for(var a=0,i=0;iIe(),put_char(e,r){null===r||10===r?(A(Se(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(A(Se(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(C(Se(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(C(Se(e.output,0)),e.output=[])}}},De=e=>{K()},$e={ops_table:null,mount:e=>$e.createNode(null,"/",16895,0),createNode(e,r,t,n){if(Le.isBlkdev(t)||Le.isFIFO(t))throw new Le.ErrnoError(63);$e.ops_table||($e.ops_table={dir:{node:{getattr:$e.node_ops.getattr,setattr:$e.node_ops.setattr,lookup:$e.node_ops.lookup,mknod:$e.node_ops.mknod,rename:$e.node_ops.rename,unlink:$e.node_ops.unlink,rmdir:$e.node_ops.rmdir,readdir:$e.node_ops.readdir,symlink:$e.node_ops.symlink},stream:{llseek:$e.stream_ops.llseek}},file:{node:{getattr:$e.node_ops.getattr,setattr:$e.node_ops.setattr},stream:{llseek:$e.stream_ops.llseek,read:$e.stream_ops.read,write:$e.stream_ops.write,allocate:$e.stream_ops.allocate,mmap:$e.stream_ops.mmap,msync:$e.stream_ops.msync}},link:{node:{getattr:$e.node_ops.getattr,setattr:$e.node_ops.setattr,readlink:$e.node_ops.readlink},stream:{}},chrdev:{node:{getattr:$e.node_ops.getattr,setattr:$e.node_ops.setattr},stream:Le.chrdev_stream_ops}});var o=Le.createNode(e,r,t,n);return Le.isDir(o.mode)?(o.node_ops=$e.ops_table.dir.node,o.stream_ops=$e.ops_table.dir.stream,o.contents={}):Le.isFile(o.mode)?(o.node_ops=$e.ops_table.file.node,o.stream_ops=$e.ops_table.file.stream,o.usedBytes=0,o.contents=null):Le.isLink(o.mode)?(o.node_ops=$e.ops_table.link.node,o.stream_ops=$e.ops_table.link.stream):Le.isChrdev(o.mode)&&(o.node_ops=$e.ops_table.chrdev.node,o.stream_ops=$e.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=Le.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,Le.isDir(e.mode)?r.size=4096:Le.isFile(e.mode)?r.size=e.usedBytes:Le.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&$e.resizeFileStorage(e,r.size)},lookup(e,r){throw Le.genericErrors[44]},mknod:(e,r,t,n)=>$e.createNode(e,r,t,n),rename(e,r,t){if(Le.isDir(e.mode)){var n;try{n=Le.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new Le.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=Le.lookupNode(e,r);for(var n in t.contents)throw new Le.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=$e.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!Le.isLink(e.mode))throw new Le.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s0||t+r($e.stream_ops.write(e,r,0,n,t,!1),0)}},Me=(e,r,t,n)=>{var o=n?"":`al ${e}`;i(e,(t=>{U(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&Z()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&Q()},Re=(e,r,t,n,o,a)=>{Le.createDataFile(e,r,t,n,o,a)},Be=o.preloadPlugins||[],Oe=(e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return Be.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o},Ue=(e,r,t,n,o,a,i,s,l,d)=>{var u=r?Ee.resolve(we.join2(e,r)):e;function c(t){function c(t){d&&d(),s||Re(e,r,t,n,o,l),a&&a(),Z()}Oe(t,u,c,(()=>{i&&i(),Z()}))||c(t)}Q(),"string"==typeof t?Me(t,(e=>c(e)),i):c(t)},xe=e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r},We=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},Le={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=Ee.resolve(e)))return{path:"",node:null};if(r=Object.assign({follow_mount:!0,recurse_count:0},r),r.recurse_count>8)throw new Le.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=Le.root,o="/",a=0;a40)throw new Le.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(Le.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n>>0)%Le.nameTable.length},hashAddNode(e){var r=Le.hashName(e.parent.id,e.name);e.name_next=Le.nameTable[r],Le.nameTable[r]=e},hashRemoveNode(e){var r=Le.hashName(e.parent.id,e.name);if(Le.nameTable[r]===e)Le.nameTable[r]=e.name_next;else for(var t=Le.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=Le.mayLookup(e);if(t)throw new Le.ErrnoError(t,e);for(var n=Le.hashName(e.id,r),o=Le.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return Le.lookup(e,r)},createNode(e,r,t,n){var o=new Le.FSNode(e,r,t,n);return Le.hashAddNode(o),o},destroyNode(e){Le.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>Le.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){var r=Le.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{return Le.lookupNode(e,r),20}catch(e){}return Le.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=Le.lookupNode(e,r)}catch(e){return e.errno}var o=Le.nodePermissions(e,"wx");if(o)return o;if(t){if(!Le.isDir(n.mode))return 54;if(Le.isRoot(n)||Le.getPath(n)===Le.cwd())return 10}else if(Le.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?Le.isLink(e.mode)?32:Le.isDir(e.mode)&&("r"!==Le.flagsToPermissionString(r)||512&r)?31:Le.nodePermissions(e,Le.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Le.MAX_OPEN_FDS;e++)if(!Le.streams[e])return e;throw new Le.ErrnoError(33)},getStreamChecked(e){var r=Le.getStream(e);if(!r)throw new Le.ErrnoError(8);return r},getStream:e=>Le.streams[e],createStream(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Le.FSStream||(Le.FSStream=function(){this.shared={}},Le.FSStream.prototype={},Object.defineProperties(Le.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Le.FSStream,e),-1==r&&(r=Le.nextfd()),e.fd=r,Le.streams[r]=e,e},closeStream(e){Le.streams[e]=null},chrdev_stream_ops:{open(e){var r=Le.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Le.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){Le.devices[e]={stream_ops:r}},getDevice:e=>Le.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),Le.syncFSRequests++,Le.syncFSRequests>1&&C(`warning: ${Le.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=Le.getMounts(Le.root.mount),n=0;function o(e){return Le.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&Le.root)throw new Le.ErrnoError(10);if(!o&&!a){var i=Le.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,Le.isMountpoint(n))throw new Le.ErrnoError(10);if(!Le.isDir(n.mode))throw new Le.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?Le.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=Le.lookupPath(e,{follow_mount:!1});if(!Le.isMountpoint(r.node))throw new Le.ErrnoError(28);var t=r.node,n=t.mounted,o=Le.getMounts(n);Object.keys(Le.nameTable).forEach((e=>{for(var r=Le.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&Le.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=Le.lookupPath(e,{parent:!0}).node,o=we.basename(e);if(!o||"."===o||".."===o)throw new Le.ErrnoError(28);var a=Le.mayCreate(n,o);if(a)throw new Le.ErrnoError(a);if(!n.node_ops.mknod)throw new Le.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Le.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Le.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o(void 0===t&&(t=r,r=438),r|=8192,Le.mknod(e,r,t)),symlink(e,r){if(!Ee.resolve(e))throw new Le.ErrnoError(44);var t=Le.lookupPath(r,{parent:!0}).node;if(!t)throw new Le.ErrnoError(44);var n=we.basename(r),o=Le.mayCreate(t,n);if(o)throw new Le.ErrnoError(o);if(!t.node_ops.symlink)throw new Le.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=we.dirname(e),a=we.dirname(r),i=we.basename(e),s=we.basename(r);if(t=Le.lookupPath(e,{parent:!0}).node,n=Le.lookupPath(r,{parent:!0}).node,!t||!n)throw new Le.ErrnoError(44);if(t.mount!==n.mount)throw new Le.ErrnoError(75);var l,d=Le.lookupNode(t,i),u=Ee.relative(e,a);if("."!==u.charAt(0))throw new Le.ErrnoError(28);if("."!==(u=Ee.relative(r,o)).charAt(0))throw new Le.ErrnoError(55);try{l=Le.lookupNode(n,s)}catch(e){}if(d!==l){var c=Le.isDir(d.mode),f=Le.mayDelete(t,i,c);if(f)throw new Le.ErrnoError(f);if(f=l?Le.mayDelete(n,s,c):Le.mayCreate(n,s))throw new Le.ErrnoError(f);if(!t.node_ops.rename)throw new Le.ErrnoError(63);if(Le.isMountpoint(d)||l&&Le.isMountpoint(l))throw new Le.ErrnoError(10);if(n!==t&&(f=Le.nodePermissions(t,"w")))throw new Le.ErrnoError(f);Le.hashRemoveNode(d);try{t.node_ops.rename(d,n,s)}catch(e){throw e}finally{Le.hashAddNode(d)}}},rmdir(e){var r=Le.lookupPath(e,{parent:!0}).node,t=we.basename(e),n=Le.lookupNode(r,t),o=Le.mayDelete(r,t,!0);if(o)throw new Le.ErrnoError(o);if(!r.node_ops.rmdir)throw new Le.ErrnoError(63);if(Le.isMountpoint(n))throw new Le.ErrnoError(10);r.node_ops.rmdir(r,t),Le.destroyNode(n)},readdir(e){var r=Le.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new Le.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=Le.lookupPath(e,{parent:!0}).node;if(!r)throw new Le.ErrnoError(44);var t=we.basename(e),n=Le.lookupNode(r,t),o=Le.mayDelete(r,t,!1);if(o)throw new Le.ErrnoError(o);if(!r.node_ops.unlink)throw new Le.ErrnoError(63);if(Le.isMountpoint(n))throw new Le.ErrnoError(10);r.node_ops.unlink(r,t),Le.destroyNode(n)},readlink(e){var r=Le.lookupPath(e).node;if(!r)throw new Le.ErrnoError(44);if(!r.node_ops.readlink)throw new Le.ErrnoError(28);return Ee.resolve(Le.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=Le.lookupPath(e,{follow:!r}).node;if(!t)throw new Le.ErrnoError(44);if(!t.node_ops.getattr)throw new Le.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>Le.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?Le.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new Le.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){Le.chmod(e,r,!0)},fchmod(e,r){var t=Le.getStreamChecked(e);Le.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?Le.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Le.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){Le.chown(e,r,t,!0)},fchown(e,r,t){var n=Le.getStreamChecked(e);Le.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new Le.ErrnoError(28);var t;if(!(t="string"==typeof e?Le.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Le.ErrnoError(63);if(Le.isDir(t.mode))throw new Le.ErrnoError(31);if(!Le.isFile(t.mode))throw new Le.ErrnoError(28);var n=Le.nodePermissions(t,"w");if(n)throw new Le.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=Le.getStreamChecked(e);if(0==(2097155&t.flags))throw new Le.ErrnoError(28);Le.truncate(t.node,r)},utime(e,r,t){var n=Le.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new Le.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?xe(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=we.normalize(e);try{n=Le.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(n){if(128&r)throw new Le.ErrnoError(20)}else n=Le.mknod(e,t,0),a=!0;if(!n)throw new Le.ErrnoError(44);if(Le.isChrdev(n.mode)&&(r&=-513),65536&r&&!Le.isDir(n.mode))throw new Le.ErrnoError(54);if(!a){var i=Le.mayOpen(n,r);if(i)throw new Le.ErrnoError(i)}512&r&&!a&&Le.truncate(n,0),r&=-131713;var s=Le.createStream({node:n,path:Le.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&r||(Le.readFiles||(Le.readFiles={}),e in Le.readFiles||(Le.readFiles[e]=1)),s},close(e){if(Le.isClosed(e))throw new Le.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Le.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(Le.isClosed(e))throw new Le.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Le.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Le.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new Le.ErrnoError(28);if(Le.isClosed(e))throw new Le.ErrnoError(8);if(1==(2097155&e.flags))throw new Le.ErrnoError(8);if(Le.isDir(e.node.mode))throw new Le.ErrnoError(31);if(!e.stream_ops.read)throw new Le.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new Le.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new Le.ErrnoError(28);if(Le.isClosed(e))throw new Le.ErrnoError(8);if(0==(2097155&e.flags))throw new Le.ErrnoError(8);if(Le.isDir(e.node.mode))throw new Le.ErrnoError(31);if(!e.stream_ops.write)throw new Le.ErrnoError(28);e.seekable&&1024&e.flags&&Le.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new Le.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(Le.isClosed(e))throw new Le.ErrnoError(8);if(r<0||t<=0)throw new Le.ErrnoError(28);if(0==(2097155&e.flags))throw new Le.ErrnoError(8);if(!Le.isFile(e.node.mode)&&!Le.isDir(e.node.mode))throw new Le.ErrnoError(43);if(!e.stream_ops.allocate)throw new Le.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new Le.ErrnoError(2);if(1==(2097155&e.flags))throw new Le.ErrnoError(2);if(!e.stream_ops.mmap)throw new Le.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new Le.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=Le.open(e,r.flags),o=Le.stat(e).size,a=new Uint8Array(o);return Le.read(n,a,0,o,0),"utf8"===r.encoding?t=Se(a,0):"binary"===r.encoding&&(t=a),Le.close(n),t},writeFile(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.flags=t.flags||577;var n=Le.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(Ce(r)+1),a=Pe(r,o,0,o.length);Le.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Le.write(n,r,0,r.byteLength,void 0,t.canOwn)}Le.close(n)},cwd:()=>Le.currentPath,chdir(e){var r=Le.lookupPath(e,{follow:!0});if(null===r.node)throw new Le.ErrnoError(44);if(!Le.isDir(r.node.mode))throw new Le.ErrnoError(54);var t=Le.nodePermissions(r.node,"x");if(t)throw new Le.ErrnoError(t);Le.currentPath=r.path},createDefaultDirectories(){Le.mkdir("/tmp"),Le.mkdir("/home"),Le.mkdir("/home/web_user")},createDefaultDevices(){Le.mkdir("/dev"),Le.registerDevice(Le.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),Le.mkdev("/dev/null",Le.makedev(1,3)),Fe.register(Le.makedev(5,0),Fe.default_tty_ops),Fe.register(Le.makedev(6,0),Fe.default_tty1_ops),Le.mkdev("/dev/tty",Le.makedev(5,0)),Le.mkdev("/dev/tty1",Le.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=be(e).byteLength),e[--r]);Le.createDevice("/dev","random",t),Le.createDevice("/dev","urandom",t),Le.mkdir("/dev/shm"),Le.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Le.mkdir("/proc");var e=Le.mkdir("/proc/self");Le.mkdir("/proc/self/fd"),Le.mount({mount(){var r=Le.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=Le.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){o.stdin?Le.createDevice("/dev","stdin",o.stdin):Le.symlink("/dev/tty","/dev/stdin"),o.stdout?Le.createDevice("/dev","stdout",null,o.stdout):Le.symlink("/dev/tty","/dev/stdout"),o.stderr?Le.createDevice("/dev","stderr",null,o.stderr):Le.symlink("/dev/tty1","/dev/stderr"),Le.open("/dev/stdin",0),Le.open("/dev/stdout",1),Le.open("/dev/stderr",1)},ensureErrnoError(){Le.ErrnoError||(Le.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Le.ErrnoError.prototype=new Error,Le.ErrnoError.prototype.constructor=Le.ErrnoError,[44].forEach((e=>{Le.genericErrors[e]=new Le.ErrnoError(e),Le.genericErrors[e].stack=""})))},staticInit(){Le.ensureErrnoError(),Le.nameTable=new Array(4096),Le.mount($e,{},"/"),Le.createDefaultDirectories(),Le.createDefaultDevices(),Le.createSpecialDirectories(),Le.filesystems={MEMFS:$e}},init(e,r,t){Le.init.initialized=!0,Le.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=r||o.stdout,o.stderr=t||o.stderr,Le.createStandardStreams()},quit(){Le.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Te(o.responseText||"",!0)})(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,A("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!f)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:t};var l=Le.createFile(e,r,s,n,o);s.contents?l.contents=s.contents:s.url&&(l.contents=null,l.url=s.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var d={};function u(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s{var r=l.stream_ops[e];d[e]=function(){return Le.forceLoadFile(l),r.apply(null,arguments)}})),d.read=(e,r,t,n,o)=>(Le.forceLoadFile(l),u(e,r,t,n,o)),d.mmap=(e,r,t,n,o)=>{Le.forceLoadFile(l);var a=De();if(!a)throw new Le.ErrnoError(48);return u(e,T,a,r,t),{ptr:a,allocated:!0}},l.stream_ops=d,l}},je=(e,r)=>e?Se(I,e,r):"",Ve={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(we.isAbs(r))return r;var n;if(n=-100===e?Le.cwd():Ve.getStreamFromFD(e).path,0==r.length){if(!t)throw new Le.ErrnoError(44);return n}return we.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&we.normalize(r)!==we.normalize(Le.getPath(e.node)))return-54;throw e}$[t>>2]=n.dev,$[t+4>>2]=n.mode,M[t+8>>2]=n.nlink,$[t+12>>2]=n.uid,$[t+16>>2]=n.gid,$[t+20>>2]=n.rdev,te=[n.size>>>0,(re=n.size,+Math.abs(re)>=1?re>0?+Math.floor(re/4294967296)>>>0:~~+Math.ceil((re-+(~~re>>>0))/4294967296)>>>0:0)],$[t+24>>2]=te[0],$[t+28>>2]=te[1],$[t+32>>2]=4096,$[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return te=[Math.floor(o/1e3)>>>0,(re=Math.floor(o/1e3),+Math.abs(re)>=1?re>0?+Math.floor(re/4294967296)>>>0:~~+Math.ceil((re-+(~~re>>>0))/4294967296)>>>0:0)],$[t+40>>2]=te[0],$[t+44>>2]=te[1],M[t+48>>2]=o%1e3*1e3,te=[Math.floor(a/1e3)>>>0,(re=Math.floor(a/1e3),+Math.abs(re)>=1?re>0?+Math.floor(re/4294967296)>>>0:~~+Math.ceil((re-+(~~re>>>0))/4294967296)>>>0:0)],$[t+56>>2]=te[0],$[t+60>>2]=te[1],M[t+64>>2]=a%1e3*1e3,te=[Math.floor(i/1e3)>>>0,(re=Math.floor(i/1e3),+Math.abs(re)>=1?re>0?+Math.floor(re/4294967296)>>>0:~~+Math.ceil((re-+(~~re>>>0))/4294967296)>>>0:0)],$[t+72>>2]=te[0],$[t+76>>2]=te[1],M[t+80>>2]=i%1e3*1e3,te=[n.ino>>>0,(re=n.ino,+Math.abs(re)>=1?re>0?+Math.floor(re/4294967296)>>>0:~~+Math.ceil((re-+(~~re>>>0))/4294967296)>>>0:0)],$[t+88>>2]=te[0],$[t+92>>2]=te[1],0},doMsync(e,r,t,n,o){if(!Le.isFile(r.node.mode))throw new Le.ErrnoError(43);if(2&n)return 0;var a=I.slice(e,e+t);Le.msync(r,a,o,t,n)},varargs:void 0,get(){var e=$[+Ve.varargs>>2];return Ve.varargs+=4,e},getp:()=>Ve.get(),getStr:e=>je(e),getStreamFromFD:e=>Le.getStreamChecked(e)},ze=e=>{var r=wo(),t=e();return _o(r),t},Ne=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN,He=function(e,r){var t=arguments.length-2,n=arguments;return ze((()=>{for(var o=t,a=bo(8*o),i=a>>3,s=0;s{if(P=e,p)throw Ke(e),"unwind";Ge(e)},Xe=qe,Ye=e=>{if(e instanceof ce||"unwind"==e)return P;u(1,e)},Je={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){p?Je.initWorker():Je.initMainThread()},initMainThread(){for(var e=4;e--;)Je.allocateUnusedWorker();G((()=>{Q(),Je.loadWasmModuleToAllWorkers((()=>Z()))}))},initWorker(){or=!1},setExitStatus:e=>{P=e},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of Je.runningWorkers)fe(e);for(var e of Je.unusedWorkers)fe(e);Je.unusedWorkers=[],Je.runningWorkers=[],Je.pthreads=[]},returnWorkerToPool:e=>{var r=e.pthread_ptr;delete Je.pthreads[r],Je.unusedWorkers.push(e),Je.runningWorkers.splice(Je.runningWorkers.indexOf(e),1),e.pthread_ptr=0,mo(r)},receiveObjectTransfer(e){},threadInitTLS(){Je.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((r=>{e.onmessage=t=>{var n=t.data,a=n.cmd;if(n.targetThread&&n.targetThread!=lo()){var i=Je.pthreads[n.targetThread];i?i.postMessage(n,n.transferList):C(`Internal error! Worker sent a message "${a}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else"checkMailbox"===a?ln():"spawnThread"===a?ge(n):"cleanupThread"===a?me(n.thread):"killThread"===a?he(n.thread):"cancelThread"===a?pe(n.thread):"loaded"===a?(e.loaded=!0,h&&!e.pthread_ptr&&e.unref(),r(e)):"alert"===a?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?e.postMessage(n):"callHandler"===a?o[n.handler](...n.args):a&&C(`worker sent an unknown command ${a}`)},e.onerror=e=>{throw C(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e},h&&(e.on("message",(r=>e.onmessage({data:r}))),e.on("error",(r=>e.onerror(r))));var t=[];for(var n of["onExit","onAbort","print","printErr"])o.hasOwnProperty(n)&&t.push(n);e.postMessage({cmd:"load",handlers:t,urlOrBlob:o.mainScriptUrlOrBlob,wasmMemory:k,wasmModule:S})})),loadWasmModuleToAllWorkers(e){if(p)return e();Promise.all(Je.unusedWorkers.map(Je.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker(){var e;if(o.locateFile){var r=g("decoder-pro-f-simd-mt-worker.worker.js");e=new Worker(r,{type:"module"})}else e=new Worker(new URL("decoder-pro-f-simd-mt-worker.worker.js","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd-mt.js",document.baseURI).href),{type:"module"});Je.unusedWorkers.push(e)},getNewWorker:()=>(0==Je.unusedWorkers.length&&(Je.allocateUnusedWorker(),Je.loadWasmModuleToWorker(Je.unusedWorkers[0])),Je.unusedWorkers.pop())};o.PThread=Je;var Qe=e=>{for(;e.length>0;)e.shift()(o)},Ze=()=>{var e=lo(),r=M[e+52>>2],t=M[e+56>>2];yo(r,r-t),_o(r)};function Ke(e){if(p)return He(1,0,e);Xe(e)}o.establishStackSpace=Ze;var er,rr=[],tr=e=>{var r=rr[e];return r||(e>=rr.length&&(rr.length=e+1),rr[e]=r=er.get(e)),r},nr=(e,r)=>{!function(e){ye()?Je.setExitStatus(e):go(e)}(tr(e)(r))};o.invokeEntryPoint=nr;var or=o.noExitRuntime||!0,ar=e=>{Je.tlsInitFunctions.push(e)},ir=(e,r,t,n)=>{K(`Assertion failed: ${je(e)}, at: `+[r?je(r):"unknown filename",t,n?je(n):"unknown function"])};function sr(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){M[this.ptr+4>>2]=e},this.get_type=function(){return M[this.ptr+4>>2]},this.set_destructor=function(e){M[this.ptr+8>>2]=e},this.get_destructor=function(){return M[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,T[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=T[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,T[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=T[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){M[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return M[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Eo(this.get_type()))return M[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var lr=(e,r,t)=>{throw new sr(e).init(r,t),e},dr=e=>{fo(e,!f,1,!c,16777216,!1),Je.threadInitTLS()},ur=e=>{p?postMessage({cmd:"cleanupThread",thread:e}):me(e)};function cr(e,r,t,n){return p?He(2,1,e,r,t,n):fr(e,r,t,n)}var fr=(e,r,t,n)=>{if("undefined"==typeof SharedArrayBuffer)return C("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[];if(p&&0===o.length)return cr(e,r,t,n);var a={startRoutine:t,pthread_ptr:e,arg:n,transferList:o};return p?(a.cmd="spawnThread",postMessage(a,o),0):ge(a)},hr=e=>($[uo()>>2]=e,e);function pr(e,r,t){if(p)return He(3,1,e,r,t);Ve.varargs=t;try{var n=Ve.getStreamFromFD(e);switch(r){case 0:if((o=Ve.get())<0)return-28;for(;Le.streams[o];)o++;return Le.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=Ve.get();return n.flags|=o,0;case 5:return o=Ve.getp(),F[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return hr(28),-1}}catch(e){if(void 0===Le||"ErrnoError"!==e.name)throw e;return-e.errno}}function mr(e,r,t,n){if(p)return He(4,1,e,r,t,n);Ve.varargs=n;try{r=Ve.getStr(r),r=Ve.calculateAt(e,r);var o=n?Ve.get():0;return Le.open(r,t,o).fd}catch(e){if(void 0===Le||"ErrnoError"!==e.name)throw e;return-e.errno}}var gr,vr,yr,wr=(e,r,t,n,o)=>{},_r=()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);gr=e},br=e=>{for(var r="",t=e;I[t];)r+=gr[I[t++]];return r},Er={},kr={},Sr={},Ar=e=>{throw new vr(e)},Cr=e=>{throw new yr(e)},Pr=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Cr("Mismatched type converter count");for(var o=0;o{kr.hasOwnProperty(e)?o[r]=kr[e]:(a.push(e),Er.hasOwnProperty(e)||(Er[e]=[]),Er[e].push((()=>{o[r]=kr[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)};function Tr(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=r.name;if(e||Ar(`type "${n}" must have a positive integer typeid pointer`),kr.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Ar(`Cannot register type '${n}' twice`)}if(kr[e]=r,delete Sr[e],Er.hasOwnProperty(e)){var o=Er[e];delete Er[e],o.forEach((e=>e()))}}function Ir(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Tr(e,r,t)}var Fr,Dr=8,$r=(e,r,t,n)=>{Ir(e,{name:r=br(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:Dr,readValueFromPointer:function(e){return this.fromWireType(I[e])},destructorFunction:null})},Mr=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Rr=e=>{Ar(e.$$.ptrType.registeredClass.name+" instance already deleted")},Br=!1,Or=e=>{},Ur=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},xr=e=>{e.count.value-=1,0===e.count.value&&Ur(e)},Wr=(e,r,t)=>{if(r===t)return e;if(void 0===t.baseClass)return null;var n=Wr(e,r,t.baseClass);return null===n?null:t.downcast(n)},Lr={},jr=()=>Object.keys(qr).length,Vr=()=>{var e=[];for(var r in qr)qr.hasOwnProperty(r)&&e.push(qr[r]);return e},zr=[],Nr=()=>{for(;zr.length;){var e=zr.pop();e.$$.deleteScheduled=!1,e.delete()}},Hr=e=>{Fr=e,zr.length&&Fr&&Fr(Nr)},Gr=()=>{o.getInheritedInstanceCount=jr,o.getLiveInheritedInstances=Vr,o.flushPendingDeletes=Nr,o.setDelayFunction=Hr},qr={},Xr=(e,r)=>{for(void 0===r&&Ar("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r},Yr=(e,r)=>(r=Xr(e,r),qr[r]),Jr=(e,r)=>(r.ptrType&&r.ptr||Cr("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!=!!r.smartPtr&&Cr("Both smartPtrType and smartPtr must be specified"),r.count={value:1},Zr(Object.create(e,{$$:{value:r}})));function Qr(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=Yr(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?Jr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):Jr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=Lr[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var l=Wr(r,this.registeredClass,a.registeredClass);return null===l?o.call(this):this.isSmartPointer?Jr(a.registeredClass.instancePrototype,{ptrType:a,ptr:l,smartPtrType:this,smartPtr:e}):Jr(a.registeredClass.instancePrototype,{ptrType:a,ptr:l})}var Zr=e=>"undefined"==typeof FinalizationRegistry?(Zr=e=>e,e):(Br=new FinalizationRegistry((e=>{xr(e.$$)})),Zr=e=>{var r=e.$$;if(r.smartPtr){var t={$$:r};Br.register(e,t,e)}return e},Or=e=>Br.unregister(e),Zr(e)),Kr=()=>{Object.assign(et.prototype,{isAliasOf(e){if(!(this instanceof et))return!1;if(!(e instanceof et))return!1;var r=this.$$.ptrType.registeredClass,t=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o},clone(){if(this.$$.ptr||Rr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Zr(Object.create(Object.getPrototypeOf(this),{$$:{value:Mr(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Rr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ar("Object already scheduled for deletion"),Or(this),xr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Rr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ar("Object already scheduled for deletion"),zr.push(this),1===zr.length&&Fr&&Fr(Nr),this.$$.deleteScheduled=!0,this}})};function et(){}var rt=(e,r)=>Object.defineProperty(r,"name",{value:e}),tt=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Ar(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},nt=(e,r,t)=>{o.hasOwnProperty(e)?((void 0===t||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[t])&&Ar(`Cannot register public name '${e}' twice`),tt(o,e,e),o.hasOwnProperty(t)&&Ar(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[e].overloadTable[t]=r):(o[e]=r,void 0!==t&&(o[e].numArguments=t))},ot=48,at=57,it=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=ot&&r<=at?`_${e}`:e};function st(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var lt=(e,r,t)=>{for(;r!==t;)r.upcast||Ar(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e};function dt(e,r){if(null===r)return this.isReference&&Ar(`null is not a valid ${this.name}`),0;r.$$||Ar(`Cannot pass "${jt(r)}" as a ${this.name}`),r.$$.ptr||Ar(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass;return lt(r.$$.ptr,t,this.registeredClass)}function ut(e,r){var t;if(null===r)return this.isReference&&Ar(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r.$$||Ar(`Cannot pass "${jt(r)}" as a ${this.name}`),r.$$.ptr||Ar(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&Ar(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=lt(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&Ar("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:Ar(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,xt.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:Ar("Unsupporting sharing policy")}return t}function ct(e,r){if(null===r)return this.isReference&&Ar(`null is not a valid ${this.name}`),0;r.$$||Ar(`Cannot pass "${jt(r)}" as a ${this.name}`),r.$$.ptr||Ar(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&Ar(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass;return lt(r.$$.ptr,t,this.registeredClass)}function ft(e){return this.fromWireType(M[e>>2])}var ht=()=>{Object.assign(pt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Dr,readValueFromPointer:ft,deleteObject(e){null!==e&&e.delete()},fromWireType:Qr})};function pt(e,r,t,n,o,a,i,s,l,d,u){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=u,o||void 0!==r.baseClass?this.toWireType=ut:n?(this.toWireType=dt,this.destructorFunction=null):(this.toWireType=ct,this.destructorFunction=null)}var mt,gt=(e,r,t)=>{o.hasOwnProperty(e)||Cr("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==t?o[e].overloadTable[t]=r:(o[e]=r,o[e].argCount=t)},vt=(e,r,t)=>{var n=o["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)},yt=(e,r,t)=>e.includes("j")?vt(e,r,t):tr(r).apply(null,t),wt=(e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),yt(e,r,t)}},_t=(e,r)=>{var t=(e=br(e)).includes("j")?wt(e,r):tr(r);return"function"!=typeof t&&Ar(`unknown function pointer with signature ${e}: ${r}`),t},bt=(e,r)=>{var t=rt(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t},Et=e=>{var r=co(e),t=br(r);return io(r),t},kt=(e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||kr[r]||(Sr[r]?Sr[r].forEach(e):(t.push(r),n[r]=!0))})),new mt(`${e}: `+t.map(Et).join([", "]))},St=(e,r,t,n,o,a,i,s,l,d,u,c,f)=>{u=br(u),a=_t(o,a),s&&(s=_t(i,s)),d&&(d=_t(l,d)),f=_t(c,f);var h=it(u);nt(h,(function(){kt(`Cannot construct ${u} due to unbound types`,[n])})),Pr([e,r,t],n?[n]:[],(function(r){var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:et.prototype;var i=rt(u,(function(){if(Object.getPrototypeOf(this)!==l)throw new vr("Use 'new' to construct "+u);if(void 0===c.constructor_body)throw new vr(u+" has no accessible constructor");var e=c.constructor_body[arguments.length];if(void 0===e)throw new vr(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(c.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(o,{constructor:{value:i}});i.prototype=l;var c=new st(u,i,l,f,t,a,s,d);c.baseClass&&(void 0===c.baseClass.__derivedClasses&&(c.baseClass.__derivedClasses=[]),c.baseClass.__derivedClasses.push(c));var p=new pt(u,c,!0,!1,!1),m=new pt(u+"*",c,!1,!1,!1),g=new pt(u+" const*",c,!1,!0,!1);return Lr[e]={pointerType:m,constPointerType:g},gt(h,i),[p,m,g]}))},At=(e,r)=>{for(var t=[],n=0;n>2]);return t},Ct=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function Pt(e,r){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var t=rt(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}function Tt(e,r,t,n,o,a){var i=r.length;i<2&&Ar("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&null!==t,l=!1,d=1;d0?", ":"")+f),h+=(u||a?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",l)h+="runDestructors(destructors);\n";else for(d=s?1:2;d{var i=At(r,t);o=_t(n,o),Pr([],[e],(function(e){var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new vr(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[r-1]=()=>{kt(`Cannot construct ${e.name} due to unbound types`,i)},Pr([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=Tt(t,n,null,o,a),[]))),[]}))},Ft=e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?e.substr(0,r):e},Dt=(e,r,t,n,o,a,i,s,l)=>{var d=At(t,n);r=br(r),r=Ft(r),a=_t(o,a),Pr([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`;function o(){kt(`Cannot call ${n} due to unbound types`,d)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var u=e.registeredClass.instancePrototype,c=u[r];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===t-2?(o.argCount=t-2,o.className=e.name,u[r]=o):(tt(u,r,n),u[r].overloadTable[t-2]=o),Pr([],d,(function(o){var s=Tt(n,o,e,a,i,l);return void 0===u[r].overloadTable?(s.argCount=t-2,u[r]=s):u[r].overloadTable[t-2]=s,[]})),[]}))};function $t(){Object.assign(Mt.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Mt(){this.allocated=[void 0],this.freelist=[]}var Rt=new Mt,Bt=e=>{e>=Rt.reserved&&0==--Rt.get(e).refcount&&Rt.free(e)},Ot=()=>{for(var e=0,r=Rt.reserved;r{Rt.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Rt.reserved=Rt.allocated.length,o.count_emval_handles=Ot},xt={toValue:e=>(e||Ar("Cannot use deleted val. handle = "+e),Rt.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Rt.allocate({refcount:1,value:e})}}};function Wt(e){return this.fromWireType($[e>>2])}var Lt=(e,r)=>{Ir(e,{name:r=br(r),fromWireType:e=>{var r=xt.toValue(e);return Bt(e),r},toWireType:(e,r)=>xt.toHandle(r),argPackAdvance:Dr,readValueFromPointer:Wt,destructorFunction:null})},jt=e=>{if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e},Vt=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(R[e>>2])};case 8:return function(e){return this.fromWireType(B[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},zt=(e,r,t)=>{Ir(e,{name:r=br(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:Dr,readValueFromPointer:Vt(r,t),destructorFunction:null})},Nt=(e,r,t)=>{switch(r){case 1:return t?e=>T[e>>0]:e=>I[e>>0];case 2:return t?e=>F[e>>1]:e=>D[e>>1];case 4:return t?e=>$[e>>2]:e=>M[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Ht=(e,r,t,n,o)=>{r=br(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<>>i}var s=r.includes("unsigned");Ir(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:Dr,readValueFromPointer:Nt(r,t,0!==n),destructorFunction:null})},Gt=(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=M[e>>2],t=M[e+4>>2];return new n(T.buffer,t,r)}Ir(e,{name:t=br(t),fromWireType:o,argPackAdvance:Dr,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},qt=(e,r,t)=>Pe(e,I,r,t),Xt=(e,r)=>{var t="std::string"===(r=br(r));Ir(e,{name:r,fromWireType(e){var r,n=M[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==I[s]){var l=je(a,s-a);void 0===r?r=l:(r+=String.fromCharCode(0),r+=l),a=s+1}}else{var d=new Array(n);for(i=0;i>2]=n,t&&o)qt(r,i,n+1);else if(o)for(var s=0;s255&&(io(i),Ar("String has UTF-16 code units that do not fit in 8 bits")),I[i+s]=l}else for(s=0;s{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&D[n];)++n;if((t=n<<1)-e>32&&Yt)return Yt.decode(I.slice(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=F[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Qt=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a>1]=i,r+=2}return F[r>>1]=0,r-n},Zt=e=>2*e.length,Kt=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=$[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},en=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),$[r>>2]=i,(r+=4)+4>o)break}return $[r>>2]=0,r-n},rn=e=>{for(var r=0,t=0;t=55296&&n<=57343&&++t,r+=4}return r},tn=(e,r,t)=>{var n,o,a,i,s;t=br(t),2===r?(n=Jt,o=Qt,i=Zt,a=()=>D,s=1):4===r&&(n=Kt,o=en,i=rn,a=()=>M,s=2),Ir(e,{name:t,fromWireType:e=>{for(var t,o=M[e>>2],i=a(),l=e+4,d=0;d<=o;++d){var u=e+4+d*r;if(d==o||0==i[u>>s]){var c=n(l,u-l);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),l=u+r}}return io(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Ar(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),l=so(4+a+r);return M[l>>2]=a>>s,o(n,l+4,a+r),null!==e&&e.push(io,l),l},argPackAdvance:Dr,readValueFromPointer:Wt,destructorFunction(e){io(e)}})},nn=(e,r)=>{Ir(e,{isVoid:!0,name:r=br(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},on=()=>{if(!ye())try{p?go(P):Xe(P)}catch(e){Ye(e)}},an=e=>{if(!O)try{e(),on()}catch(e){Ye(e)}},sn=e=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync($,e>>2,e).value.then(ln);var r=e+128;Atomics.store($,r>>2,1)}};o.__emscripten_thread_mailbox_await=sn;var ln=()=>{var e=lo();e&&(sn(e),an(vo))};o.checkMailbox=ln;var dn=(e,r,t)=>{if(e==r)setTimeout((()=>ln()));else if(p)postMessage({targetThread:e,cmd:"checkMailbox"});else{var n=Je.pthreads[e];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},un=[],cn=(e,r,t,n)=>{un.length=t;for(var o=n>>3,a=0;a{h&&Je.pthreads[e].ref()},hn={},pn=e=>{var r=hn[e];return void 0===r?br(e):r},mn=[],gn=(e,r,t,n,o)=>(e=mn[e])(r=xt.toValue(r),r[t=pn(t)],n,o),vn=e=>{var r=mn.length;return mn.push(e),r},yn=(e,r)=>{var t=kr[e];return void 0===t&&Ar(r+" has unknown type "+Et(e)),t},wn=(e,r)=>{for(var t=new Array(e),n=0;n>2],"parameter "+n);return t},_n=(e,r,t)=>{var n=[],o=e.toWireType(n,t);return n.length&&(M[r>>2]=xt.toHandle(n)),o},bn=(e,r,t)=>{var n=wn(e,r),o=n.shift();e--;var a="return function (obj, func, destructorsRef, args) {\n",i=0,s=[];0===t&&s.push("obj");for(var l=["retType"],d=[o],u=0;ue.name)).join(", ")}) => ${o.name}>`;return vn(rt(f,c))},En=e=>{var r=xt.toValue(e);Ct(r),Bt(e)},kn=e=>e%4==0&&(e%100!=0||e%400==0),Sn=[0,31,60,91,121,152,182,213,244,274,305,335],An=[0,31,59,90,120,151,181,212,243,273,304,334],Cn=e=>(kn(e.getFullYear())?Sn:An)[e.getMonth()]+e.getDate()-1;function Pn(e,r,t){var n=Ne(e,r),o=new Date(1e3*n);$[t>>2]=o.getSeconds(),$[t+4>>2]=o.getMinutes(),$[t+8>>2]=o.getHours(),$[t+12>>2]=o.getDate(),$[t+16>>2]=o.getMonth(),$[t+20>>2]=o.getFullYear()-1900,$[t+24>>2]=o.getDay();var a=0|Cn(o);$[t+28>>2]=a,$[t+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),s=new Date(o.getFullYear(),6,1).getTimezoneOffset(),l=i.getTimezoneOffset(),d=0|(s!=l&&o.getTimezoneOffset()==Math.min(l,s));$[t+32>>2]=d}var Tn,In=e=>{var r=Ce(e)+1,t=so(r);return t&&qt(e,t,r),t},Fn=(e,r,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),l=Math.max(i,s);function d(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}M[e>>2]=60*l,$[r>>2]=Number(i!=s);var u=d(o),c=d(a),f=In(u),h=In(c);s>2]=f,M[t+4>>2]=h):(M[t>>2]=h,M[t+4>>2]=f)},Dn=()=>{K("")},$n=()=>{},Mn=()=>Date.now(),Rn=()=>{ve+=1},Bn=()=>{throw Rn(),"unwind"},On=()=>I.length,Un=()=>On();Tn=()=>performance.timeOrigin+performance.now();var xn=()=>h?v("os").cpus().length:navigator.hardwareConcurrency,Wn=e=>{K("OOM")},Ln=e=>{I.length,Wn()},jn={},Vn=()=>d||"./this.program",zn=()=>{if(!zn.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Vn()};for(var r in jn)void 0===jn[r]?delete e[r]:e[r]=jn[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);zn.strings=t}return zn.strings},Nn=(e,r)=>{for(var t=0;t>0]=e.charCodeAt(t);T[r>>0]=0},Hn=function(e,r){if(p)return He(5,1,e,r);var t=0;return zn().forEach(((n,o)=>{var a=r+t;M[e+4*o>>2]=a,Nn(n,a),t+=n.length+1})),0},Gn=function(e,r){if(p)return He(6,1,e,r);var t=zn();M[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),M[r>>2]=n,0};function qn(e){if(p)return He(7,1,e);try{var r=Ve.getStreamFromFD(e);return Le.close(r),0}catch(e){if(void 0===Le||"ErrnoError"!==e.name)throw e;return e.errno}}function Xn(e,r){if(p)return He(8,1,e,r);try{var t=Ve.getStreamFromFD(e),n=t.tty?2:Le.isDir(t.mode)?3:Le.isLink(t.mode)?7:4;return T[r>>0]=n,F[r+2>>1]=0,te=[0,(re=0,+Math.abs(re)>=1?re>0?+Math.floor(re/4294967296)>>>0:~~+Math.ceil((re-+(~~re>>>0))/4294967296)>>>0:0)],$[r+8>>2]=te[0],$[r+12>>2]=te[1],te=[0,(re=0,+Math.abs(re)>=1?re>0?+Math.floor(re/4294967296)>>>0:~~+Math.ceil((re-+(~~re>>>0))/4294967296)>>>0:0)],$[r+16>>2]=te[0],$[r+20>>2]=te[1],0}catch(e){if(void 0===Le||"ErrnoError"!==e.name)throw e;return e.errno}}var Yn=(e,r,t,n)=>{for(var o=0,a=0;a>2],s=M[r+4>>2];r+=8;var l=Le.read(e,T,i,s,n);if(l<0)return-1;if(o+=l,l>2]=a,0}catch(e){if(void 0===Le||"ErrnoError"!==e.name)throw e;return e.errno}}function Qn(e,r,t,n,o){if(p)return He(10,1,e,r,t,n,o);var a=Ne(r,t);try{if(isNaN(a))return 61;var i=Ve.getStreamFromFD(e);return Le.llseek(i,a,n),te=[i.position>>>0,(re=i.position,+Math.abs(re)>=1?re>0?+Math.floor(re/4294967296)>>>0:~~+Math.ceil((re-+(~~re>>>0))/4294967296)>>>0:0)],$[o>>2]=te[0],$[o+4>>2]=te[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===Le||"ErrnoError"!==e.name)throw e;return e.errno}}var Zn=(e,r,t,n)=>{for(var o=0,a=0;a>2],s=M[r+4>>2];r+=8;var l=Le.write(e,T,i,s,n);if(l<0)return-1;o+=l,void 0!==n&&(n+=l)}return o};function Kn(e,r,t,n){if(p)return He(11,1,e,r,t,n);try{var o=Ve.getStreamFromFD(e),a=Zn(o,r,t);return M[n>>2]=a,0}catch(e){if(void 0===Le||"ErrnoError"!==e.name)throw e;return e.errno}}Je.init();var eo=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Le.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},ro=365,to=146;Object.defineProperties(eo.prototype,{read:{get:function(){return(this.mode&ro)===ro},set:function(e){e?this.mode|=ro:this.mode&=~ro}},write:{get:function(){return(this.mode&to)===to},set:function(e){e?this.mode|=to:this.mode&=~to}},isFolder:{get:function(){return Le.isDir(this.mode)}},isDevice:{get:function(){return Le.isChrdev(this.mode)}}}),Le.FSNode=eo,Le.createPreloadedFile=Ue,Le.staticInit(),_r(),vr=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},yr=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Kr(),Gr(),ht(),mt=o.UnboundTypeError=bt(Error,"UnboundTypeError"),$t(),Ut();var no=[Ge,Ke,cr,pr,mr,Hn,Gn,qn,Xn,Jn,Qn,Kn],oo={g:ir,s:lr,H:dr,m:ur,C:fr,Q:pr,E:mr,v:wr,S:$r,P:St,G:It,k:Dt,R:Lt,p:zt,d:Ht,c:Gt,q:Xt,l:tn,T:nn,y:dn,D:cn,F:sn,M:fn,j:gn,r:Bt,i:bn,h:En,t:Pn,x:Fn,b:Dn,n:$n,f:Mn,L:Bn,z:Un,e:Tn,A:xn,w:Ln,J:Hn,K:Gn,B:Xe,o:qn,I:Xn,O:Jn,u:Qn,N:Kn,a:k||o.wasmMemory},ao=ue(),io=e=>(io=ao.V)(e),so=e=>(so=ao.W)(e),lo=o._pthread_self=()=>(lo=o._pthread_self=ao.X)(),uo=()=>(uo=ao.Z)();o.__emscripten_tls_init=()=>(o.__emscripten_tls_init=ao._)();var co=e=>(co=ao.$)(e);o.__embind_initialize_bindings=()=>(o.__embind_initialize_bindings=ao.aa)();var fo=o.__emscripten_thread_init=(e,r,t,n,a,i)=>(fo=o.__emscripten_thread_init=ao.ba)(e,r,t,n,a,i);o.__emscripten_thread_crashed=()=>(o.__emscripten_thread_crashed=ao.ca)();var ho,po=(e,r,t,n)=>(po=ao.da)(e,r,t,n),mo=e=>(mo=ao.ea)(e),go=o.__emscripten_thread_exit=e=>(go=o.__emscripten_thread_exit=ao.fa)(e),vo=()=>(vo=ao.ga)(),yo=(e,r)=>(yo=ao.ia)(e,r),wo=()=>(wo=ao.ja)(),_o=e=>(_o=ao.ka)(e),bo=e=>(bo=ao.la)(e),Eo=e=>(Eo=ao.ma)(e);function ko(){if(!(Y>0)){if(p)return t(o),N(),void startWorker(o);z(),Y>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e())}function e(){ho||(ho=!0,o.calledRun=!0,O||(N(),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),H()))}}if(o.dynCall_jiji=(e,r,t,n,a)=>(o.dynCall_jiji=ao.na)(e,r,t,n,a),o._ff_h264_cabac_tables=61436,o.wasmMemory=k,o.keepRuntimeAlive=ye,o.ExitStatus=ce,o.PThread=Je,J=function e(){ho||ko(),ho||(J=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return ko(),r.ready}),t=(()=>{var e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd-mt.js",document.baseURI).href;return async function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,n,o;(o=r).ready=new Promise(((e,r)=>{t=e,n=r})),(o=void 0!==o?o:{}).locateFile=function(e,r){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:r+e};var a,i,s,l=Object.assign({},o),d="./this.program",u="object"==typeof window,c="function"==typeof importScripts,f="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";function p(e){return o.locateFile?o.locateFile(e,h):h+e}if(f){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd-mt.js",document.baseURI).href),g=m("fs"),v=m("path");h=c?v.dirname(h)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd-mt.js",document.baseURI).href)),a=(e,r)=>(e=Z(e)?new URL(e):v.normalize(e),g.readFileSync(e,r?void 0:"utf8")),s=e=>{var r=a(e,!0);return r.buffer||(r=new Uint8Array(r)),r},i=function(e,r,t){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=Z(e)?new URL(e):v.normalize(e),g.readFile(e,n?void 0:"utf8",((e,o)=>{e?t(e):r(n?o.buffer:o)}))},!o.thisProgram&&process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),o.inspect=()=>"[Emscripten Module object]"}else(u||c)&&(c?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),e&&(h=e),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},c&&(s=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)});var y,w,_=o.print||console.log.bind(console),b=o.printErr||console.error.bind(console);Object.assign(o,l),l=null,o.arguments&&o.arguments,o.thisProgram&&(d=o.thisProgram),o.quit&&o.quit,o.wasmBinary&&(y=o.wasmBinary),"object"!=typeof WebAssembly&&G("no native wasm support detected");var E,k,S,A,C,P,T,I,F=!1;function D(e,r){e||G(r)}function $(){var e=w.buffer;o.HEAP8=E=new Int8Array(e),o.HEAP16=S=new Int16Array(e),o.HEAPU8=k=new Uint8Array(e),o.HEAPU16=A=new Uint16Array(e),o.HEAP32=C=new Int32Array(e),o.HEAPU32=P=new Uint32Array(e),o.HEAPF32=T=new Float32Array(e),o.HEAPF64=I=new Float64Array(e)}var M=[],R=[],B=[];function O(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)W(o.preRun.shift());oe(M)}function U(){o.noFSInit||Ie.init.initialized||Ie.init(),Ie.ignorePermissions=!1,oe(R)}function x(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)j(o.postRun.shift());oe(B)}function W(e){M.unshift(e)}function L(e){R.unshift(e)}function j(e){B.unshift(e)}var V=0,z=null;function N(e){V++,o.monitorRunDependencies&&o.monitorRunDependencies(V)}function H(e){if(V--,o.monitorRunDependencies&&o.monitorRunDependencies(V),0==V&&z){var r=z;z=null,r()}}function G(e){o.onAbort&&o.onAbort(e),b(e="Aborted("+e+")"),F=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw n(r),r}var q,X,Y,J="data:application/octet-stream;base64,",Q=e=>e.startsWith(J),Z=e=>e.startsWith("file://");function K(e){if(e==q&&y)return new Uint8Array(y);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!y&&(u||c)){if("function"==typeof fetch&&!Z(e))return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>K(e)));if(i)return new Promise(((r,t)=>{i(e,(e=>r(new Uint8Array(e))),t)}))}return Promise.resolve().then((()=>K(e)))}function re(e,r,t){return ee(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{b(`failed to asynchronously prepare wasm: ${e}`),G(e)}))}function te(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||Q(r)||Z(r)||f||"function"!=typeof fetch?re(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return b(`wasm streaming compile failed: ${e}`),b("falling back to ArrayBuffer instantiation"),re(r,t,n)}))))}function ne(){var e={a:hn};function r(e,r){return pn=e.exports,w=pn.G,$(),Mr=pn.J,L(pn.H),H(),pn}if(N(),o.instantiateWasm)try{return o.instantiateWasm(e,r)}catch(e){b(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return te(y,q,e,(function(e){r(e.instance)})).catch(n),{}}o.locateFile?Q(q="decoder-pro-audio.wasm")||(q=p(q)):q=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd-mt.js",document.baseURI).href).href;var oe=e=>{for(;e.length>0;)e.shift()(o)};function ae(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){P[this.ptr+4>>2]=e},this.get_type=function(){return P[this.ptr+4>>2]},this.set_destructor=function(e){P[this.ptr+8>>2]=e},this.get_destructor=function(){return P[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,E[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=E[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,E[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=E[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){P[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return P[this.ptr+16>>2]},this.get_exception_ptr=function(){if(wn(this.get_type()))return P[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}o.noExitRuntime;var ie=(e,r,t)=>{throw new ae(e).init(r,t),e},se=e=>(C[gn()>>2]=e,e),le={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=le.isAbs(e),t="/"===e.substr(-1);return(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=le.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=le.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return le.normalize(e.join("/"))},join2:(e,r)=>le.normalize(e+"/"+r)},de=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(f)try{var e=m("crypto");if(e.randomFillSync)return r=>e.randomFillSync(r);var r=e.randomBytes;return e=>(e.set(r(e.byteLength)),e)}catch(e){}G("initRandomDevice")},ue=e=>(ue=de())(e),ce={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:Ie.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=le.isAbs(n)}return(r?"/":"")+(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=ce.resolve(e).substr(1),r=ce.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&fe)return fe.decode(e.subarray(r,o));for(var a="";r>10,56320|1023&d)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},pe=[],me=e=>{for(var r=0,t=0;t=55296&&n<=57343?(r+=4,++t):r+=3}return r},ge=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i);if(s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function ve(e,r,t){var n=t>0?t:me(e)+1,o=new Array(n),a=ge(e,o,0,o.length);return r&&(o.length=a),o}var ye=()=>{if(!pe.length){var e=null;if(f){var r=Buffer.alloc(256),t=0,n=process.stdin.fd;try{t=g.readSync(n,r)}catch(e){if(!e.toString().includes("EOF"))throw e;t=0}e=t>0?r.slice(0,t).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ve(e,!0)}return pe.shift()},we={ttys:[],init(){},shutdown(){},register(e,r){we.ttys[e]={input:[],output:[],ops:r},Ie.registerDevice(e,we.stream_ops)},stream_ops:{open(e){var r=we.ttys[e.node.rdev];if(!r)throw new Ie.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Ie.ErrnoError(60);for(var a=0,i=0;iye(),put_char(e,r){null===r||10===r?(_(he(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(_(he(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(b(he(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(b(he(e.output,0)),e.output=[])}}},_e=e=>{G()},be={ops_table:null,mount:e=>be.createNode(null,"/",16895,0),createNode(e,r,t,n){if(Ie.isBlkdev(t)||Ie.isFIFO(t))throw new Ie.ErrnoError(63);be.ops_table||(be.ops_table={dir:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,lookup:be.node_ops.lookup,mknod:be.node_ops.mknod,rename:be.node_ops.rename,unlink:be.node_ops.unlink,rmdir:be.node_ops.rmdir,readdir:be.node_ops.readdir,symlink:be.node_ops.symlink},stream:{llseek:be.stream_ops.llseek}},file:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:{llseek:be.stream_ops.llseek,read:be.stream_ops.read,write:be.stream_ops.write,allocate:be.stream_ops.allocate,mmap:be.stream_ops.mmap,msync:be.stream_ops.msync}},link:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,readlink:be.node_ops.readlink},stream:{}},chrdev:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:Ie.chrdev_stream_ops}});var o=Ie.createNode(e,r,t,n);return Ie.isDir(o.mode)?(o.node_ops=be.ops_table.dir.node,o.stream_ops=be.ops_table.dir.stream,o.contents={}):Ie.isFile(o.mode)?(o.node_ops=be.ops_table.file.node,o.stream_ops=be.ops_table.file.stream,o.usedBytes=0,o.contents=null):Ie.isLink(o.mode)?(o.node_ops=be.ops_table.link.node,o.stream_ops=be.ops_table.link.stream):Ie.isChrdev(o.mode)&&(o.node_ops=be.ops_table.chrdev.node,o.stream_ops=be.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=Ie.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,Ie.isDir(e.mode)?r.size=4096:Ie.isFile(e.mode)?r.size=e.usedBytes:Ie.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&be.resizeFileStorage(e,r.size)},lookup(e,r){throw Ie.genericErrors[44]},mknod:(e,r,t,n)=>be.createNode(e,r,t,n),rename(e,r,t){if(Ie.isDir(e.mode)){var n;try{n=Ie.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new Ie.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=Ie.lookupNode(e,r);for(var n in t.contents)throw new Ie.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=be.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!Ie.isLink(e.mode))throw new Ie.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s0||t+r(be.stream_ops.write(e,r,0,n,t,!1),0)}},Ee=(e,r,t,n)=>{var o=n?"":`al ${e}`;i(e,(t=>{D(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&H()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&N()},ke=(e,r,t,n,o,a)=>{Ie.createDataFile(e,r,t,n,o,a)},Se=o.preloadPlugins||[],Ae=(e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return Se.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o},Ce=(e,r,t,n,o,a,i,s,l,d)=>{var u=r?ce.resolve(le.join2(e,r)):e;function c(t){function c(t){d&&d(),s||ke(e,r,t,n,o,l),a&&a(),H()}Ae(t,u,c,(()=>{i&&i(),H()}))||c(t)}N(),"string"==typeof t?Ee(t,(e=>c(e)),i):c(t)},Pe=e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r},Te=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},Ie={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=ce.resolve(e)))return{path:"",node:null};if(r=Object.assign({follow_mount:!0,recurse_count:0},r),r.recurse_count>8)throw new Ie.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=Ie.root,o="/",a=0;a40)throw new Ie.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(Ie.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n>>0)%Ie.nameTable.length},hashAddNode(e){var r=Ie.hashName(e.parent.id,e.name);e.name_next=Ie.nameTable[r],Ie.nameTable[r]=e},hashRemoveNode(e){var r=Ie.hashName(e.parent.id,e.name);if(Ie.nameTable[r]===e)Ie.nameTable[r]=e.name_next;else for(var t=Ie.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=Ie.mayLookup(e);if(t)throw new Ie.ErrnoError(t,e);for(var n=Ie.hashName(e.id,r),o=Ie.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return Ie.lookup(e,r)},createNode(e,r,t,n){var o=new Ie.FSNode(e,r,t,n);return Ie.hashAddNode(o),o},destroyNode(e){Ie.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>Ie.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){var r=Ie.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{Ie.lookupNode(e,r);return 20}catch(e){}return Ie.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=Ie.lookupNode(e,r)}catch(e){return e.errno}var o=Ie.nodePermissions(e,"wx");if(o)return o;if(t){if(!Ie.isDir(n.mode))return 54;if(Ie.isRoot(n)||Ie.getPath(n)===Ie.cwd())return 10}else if(Ie.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?Ie.isLink(e.mode)?32:Ie.isDir(e.mode)&&("r"!==Ie.flagsToPermissionString(r)||512&r)?31:Ie.nodePermissions(e,Ie.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Ie.MAX_OPEN_FDS;e++)if(!Ie.streams[e])return e;throw new Ie.ErrnoError(33)},getStreamChecked(e){var r=Ie.getStream(e);if(!r)throw new Ie.ErrnoError(8);return r},getStream:e=>Ie.streams[e],createStream(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Ie.FSStream||(Ie.FSStream=function(){this.shared={}},Ie.FSStream.prototype={},Object.defineProperties(Ie.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Ie.FSStream,e),-1==r&&(r=Ie.nextfd()),e.fd=r,Ie.streams[r]=e,e},closeStream(e){Ie.streams[e]=null},chrdev_stream_ops:{open(e){var r=Ie.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Ie.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){Ie.devices[e]={stream_ops:r}},getDevice:e=>Ie.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),Ie.syncFSRequests++,Ie.syncFSRequests>1&&b(`warning: ${Ie.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=Ie.getMounts(Ie.root.mount),n=0;function o(e){return Ie.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&Ie.root)throw new Ie.ErrnoError(10);if(!o&&!a){var i=Ie.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,Ie.isMountpoint(n))throw new Ie.ErrnoError(10);if(!Ie.isDir(n.mode))throw new Ie.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?Ie.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=Ie.lookupPath(e,{follow_mount:!1});if(!Ie.isMountpoint(r.node))throw new Ie.ErrnoError(28);var t=r.node,n=t.mounted,o=Ie.getMounts(n);Object.keys(Ie.nameTable).forEach((e=>{for(var r=Ie.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&Ie.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=Ie.lookupPath(e,{parent:!0}).node,o=le.basename(e);if(!o||"."===o||".."===o)throw new Ie.ErrnoError(28);var a=Ie.mayCreate(n,o);if(a)throw new Ie.ErrnoError(a);if(!n.node_ops.mknod)throw new Ie.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Ie.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Ie.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o(void 0===t&&(t=r,r=438),r|=8192,Ie.mknod(e,r,t)),symlink(e,r){if(!ce.resolve(e))throw new Ie.ErrnoError(44);var t=Ie.lookupPath(r,{parent:!0}).node;if(!t)throw new Ie.ErrnoError(44);var n=le.basename(r),o=Ie.mayCreate(t,n);if(o)throw new Ie.ErrnoError(o);if(!t.node_ops.symlink)throw new Ie.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=le.dirname(e),a=le.dirname(r),i=le.basename(e),s=le.basename(r);if(t=Ie.lookupPath(e,{parent:!0}).node,n=Ie.lookupPath(r,{parent:!0}).node,!t||!n)throw new Ie.ErrnoError(44);if(t.mount!==n.mount)throw new Ie.ErrnoError(75);var l,d=Ie.lookupNode(t,i),u=ce.relative(e,a);if("."!==u.charAt(0))throw new Ie.ErrnoError(28);if("."!==(u=ce.relative(r,o)).charAt(0))throw new Ie.ErrnoError(55);try{l=Ie.lookupNode(n,s)}catch(e){}if(d!==l){var c=Ie.isDir(d.mode),f=Ie.mayDelete(t,i,c);if(f)throw new Ie.ErrnoError(f);if(f=l?Ie.mayDelete(n,s,c):Ie.mayCreate(n,s))throw new Ie.ErrnoError(f);if(!t.node_ops.rename)throw new Ie.ErrnoError(63);if(Ie.isMountpoint(d)||l&&Ie.isMountpoint(l))throw new Ie.ErrnoError(10);if(n!==t&&(f=Ie.nodePermissions(t,"w")))throw new Ie.ErrnoError(f);Ie.hashRemoveNode(d);try{t.node_ops.rename(d,n,s)}catch(e){throw e}finally{Ie.hashAddNode(d)}}},rmdir(e){var r=Ie.lookupPath(e,{parent:!0}).node,t=le.basename(e),n=Ie.lookupNode(r,t),o=Ie.mayDelete(r,t,!0);if(o)throw new Ie.ErrnoError(o);if(!r.node_ops.rmdir)throw new Ie.ErrnoError(63);if(Ie.isMountpoint(n))throw new Ie.ErrnoError(10);r.node_ops.rmdir(r,t),Ie.destroyNode(n)},readdir(e){var r=Ie.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new Ie.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=Ie.lookupPath(e,{parent:!0}).node;if(!r)throw new Ie.ErrnoError(44);var t=le.basename(e),n=Ie.lookupNode(r,t),o=Ie.mayDelete(r,t,!1);if(o)throw new Ie.ErrnoError(o);if(!r.node_ops.unlink)throw new Ie.ErrnoError(63);if(Ie.isMountpoint(n))throw new Ie.ErrnoError(10);r.node_ops.unlink(r,t),Ie.destroyNode(n)},readlink(e){var r=Ie.lookupPath(e).node;if(!r)throw new Ie.ErrnoError(44);if(!r.node_ops.readlink)throw new Ie.ErrnoError(28);return ce.resolve(Ie.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=Ie.lookupPath(e,{follow:!r}).node;if(!t)throw new Ie.ErrnoError(44);if(!t.node_ops.getattr)throw new Ie.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>Ie.stat(e,!0),chmod(e,r,t){var n;"string"==typeof e?n=Ie.lookupPath(e,{follow:!t}).node:n=e;if(!n.node_ops.setattr)throw new Ie.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){Ie.chmod(e,r,!0)},fchmod(e,r){var t=Ie.getStreamChecked(e);Ie.chmod(t.node,r)},chown(e,r,t,n){var o;"string"==typeof e?o=Ie.lookupPath(e,{follow:!n}).node:o=e;if(!o.node_ops.setattr)throw new Ie.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){Ie.chown(e,r,t,!0)},fchown(e,r,t){var n=Ie.getStreamChecked(e);Ie.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new Ie.ErrnoError(28);var t;"string"==typeof e?t=Ie.lookupPath(e,{follow:!0}).node:t=e;if(!t.node_ops.setattr)throw new Ie.ErrnoError(63);if(Ie.isDir(t.mode))throw new Ie.ErrnoError(31);if(!Ie.isFile(t.mode))throw new Ie.ErrnoError(28);var n=Ie.nodePermissions(t,"w");if(n)throw new Ie.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=Ie.getStreamChecked(e);if(0==(2097155&t.flags))throw new Ie.ErrnoError(28);Ie.truncate(t.node,r)},utime(e,r,t){var n=Ie.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new Ie.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?Pe(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=le.normalize(e);try{n=Ie.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(n){if(128&r)throw new Ie.ErrnoError(20)}else n=Ie.mknod(e,t,0),a=!0;if(!n)throw new Ie.ErrnoError(44);if(Ie.isChrdev(n.mode)&&(r&=-513),65536&r&&!Ie.isDir(n.mode))throw new Ie.ErrnoError(54);if(!a){var i=Ie.mayOpen(n,r);if(i)throw new Ie.ErrnoError(i)}512&r&&!a&&Ie.truncate(n,0),r&=-131713;var s=Ie.createStream({node:n,path:Ie.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&r||(Ie.readFiles||(Ie.readFiles={}),e in Ie.readFiles||(Ie.readFiles[e]=1)),s},close(e){if(Ie.isClosed(e))throw new Ie.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Ie.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(Ie.isClosed(e))throw new Ie.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ie.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Ie.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new Ie.ErrnoError(28);if(Ie.isClosed(e))throw new Ie.ErrnoError(8);if(1==(2097155&e.flags))throw new Ie.ErrnoError(8);if(Ie.isDir(e.node.mode))throw new Ie.ErrnoError(31);if(!e.stream_ops.read)throw new Ie.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new Ie.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new Ie.ErrnoError(28);if(Ie.isClosed(e))throw new Ie.ErrnoError(8);if(0==(2097155&e.flags))throw new Ie.ErrnoError(8);if(Ie.isDir(e.node.mode))throw new Ie.ErrnoError(31);if(!e.stream_ops.write)throw new Ie.ErrnoError(28);e.seekable&&1024&e.flags&&Ie.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new Ie.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(Ie.isClosed(e))throw new Ie.ErrnoError(8);if(r<0||t<=0)throw new Ie.ErrnoError(28);if(0==(2097155&e.flags))throw new Ie.ErrnoError(8);if(!Ie.isFile(e.node.mode)&&!Ie.isDir(e.node.mode))throw new Ie.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ie.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new Ie.ErrnoError(2);if(1==(2097155&e.flags))throw new Ie.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ie.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new Ie.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=Ie.open(e,r.flags),o=Ie.stat(e).size,a=new Uint8Array(o);return Ie.read(n,a,0,o,0),"utf8"===r.encoding?t=he(a,0):"binary"===r.encoding&&(t=a),Ie.close(n),t},writeFile(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.flags=t.flags||577;var n=Ie.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(me(r)+1),a=ge(r,o,0,o.length);Ie.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Ie.write(n,r,0,r.byteLength,void 0,t.canOwn)}Ie.close(n)},cwd:()=>Ie.currentPath,chdir(e){var r=Ie.lookupPath(e,{follow:!0});if(null===r.node)throw new Ie.ErrnoError(44);if(!Ie.isDir(r.node.mode))throw new Ie.ErrnoError(54);var t=Ie.nodePermissions(r.node,"x");if(t)throw new Ie.ErrnoError(t);Ie.currentPath=r.path},createDefaultDirectories(){Ie.mkdir("/tmp"),Ie.mkdir("/home"),Ie.mkdir("/home/web_user")},createDefaultDevices(){Ie.mkdir("/dev"),Ie.registerDevice(Ie.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),Ie.mkdev("/dev/null",Ie.makedev(1,3)),we.register(Ie.makedev(5,0),we.default_tty_ops),we.register(Ie.makedev(6,0),we.default_tty1_ops),Ie.mkdev("/dev/tty",Ie.makedev(5,0)),Ie.mkdev("/dev/tty1",Ie.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=ue(e).byteLength),e[--r]);Ie.createDevice("/dev","random",t),Ie.createDevice("/dev","urandom",t),Ie.mkdir("/dev/shm"),Ie.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Ie.mkdir("/proc");var e=Ie.mkdir("/proc/self");Ie.mkdir("/proc/self/fd"),Ie.mount({mount(){var r=Ie.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=Ie.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){o.stdin?Ie.createDevice("/dev","stdin",o.stdin):Ie.symlink("/dev/tty","/dev/stdin"),o.stdout?Ie.createDevice("/dev","stdout",null,o.stdout):Ie.symlink("/dev/tty","/dev/stdout"),o.stderr?Ie.createDevice("/dev","stderr",null,o.stderr):Ie.symlink("/dev/tty1","/dev/stderr"),Ie.open("/dev/stdin",0),Ie.open("/dev/stdout",1),Ie.open("/dev/stderr",1)},ensureErrnoError(){Ie.ErrnoError||(Ie.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Ie.ErrnoError.prototype=new Error,Ie.ErrnoError.prototype.constructor=Ie.ErrnoError,[44].forEach((e=>{Ie.genericErrors[e]=new Ie.ErrnoError(e),Ie.genericErrors[e].stack=""})))},staticInit(){Ie.ensureErrnoError(),Ie.nameTable=new Array(4096),Ie.mount(be,{},"/"),Ie.createDefaultDirectories(),Ie.createDefaultDevices(),Ie.createSpecialDirectories(),Ie.filesystems={MEMFS:be}},init(e,r,t){Ie.init.initialized=!0,Ie.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=r||o.stdout,o.stderr=t||o.stderr,Ie.createStandardStreams()},quit(){Ie.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):ve(o.responseText||"",!0)})(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,_("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!c)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:t};var l=Ie.createFile(e,r,s,n,o);s.contents?l.contents=s.contents:s.url&&(l.contents=null,l.url=s.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var d={};function u(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s{var r=l.stream_ops[e];d[e]=function(){return Ie.forceLoadFile(l),r.apply(null,arguments)}})),d.read=(e,r,t,n,o)=>(Ie.forceLoadFile(l),u(e,r,t,n,o)),d.mmap=(e,r,t,n,o)=>{Ie.forceLoadFile(l);var a=_e();if(!a)throw new Ie.ErrnoError(48);return u(e,E,a,r,t),{ptr:a,allocated:!0}},l.stream_ops=d,l}},Fe=(e,r)=>e?he(k,e,r):"",De={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(le.isAbs(r))return r;var n;-100===e?n=Ie.cwd():n=De.getStreamFromFD(e).path;if(0==r.length){if(!t)throw new Ie.ErrnoError(44);return n}return le.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&le.normalize(r)!==le.normalize(Ie.getPath(e.node)))return-54;throw e}C[t>>2]=n.dev,C[t+4>>2]=n.mode,P[t+8>>2]=n.nlink,C[t+12>>2]=n.uid,C[t+16>>2]=n.gid,C[t+20>>2]=n.rdev,Y=[n.size>>>0,(X=n.size,+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],C[t+24>>2]=Y[0],C[t+28>>2]=Y[1],C[t+32>>2]=4096,C[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return Y=[Math.floor(o/1e3)>>>0,(X=Math.floor(o/1e3),+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],C[t+40>>2]=Y[0],C[t+44>>2]=Y[1],P[t+48>>2]=o%1e3*1e3,Y=[Math.floor(a/1e3)>>>0,(X=Math.floor(a/1e3),+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],C[t+56>>2]=Y[0],C[t+60>>2]=Y[1],P[t+64>>2]=a%1e3*1e3,Y=[Math.floor(i/1e3)>>>0,(X=Math.floor(i/1e3),+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],C[t+72>>2]=Y[0],C[t+76>>2]=Y[1],P[t+80>>2]=i%1e3*1e3,Y=[n.ino>>>0,(X=n.ino,+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],C[t+88>>2]=Y[0],C[t+92>>2]=Y[1],0},doMsync(e,r,t,n,o){if(!Ie.isFile(r.node.mode))throw new Ie.ErrnoError(43);if(2&n)return 0;var a=k.slice(e,e+t);Ie.msync(r,a,o,t,n)},varargs:void 0,get(){var e=C[+De.varargs>>2];return De.varargs+=4,e},getp:()=>De.get(),getStr:e=>Fe(e),getStreamFromFD:e=>Ie.getStreamChecked(e)};function $e(e,r,t){De.varargs=t;try{var n=De.getStreamFromFD(e);switch(r){case 0:if((o=De.get())<0)return-28;for(;Ie.streams[o];)o++;return Ie.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=De.get();return n.flags|=o,0;case 5:o=De.getp();return S[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return se(28),-1}}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return-e.errno}}function Me(e,r,t,n){De.varargs=n;try{r=De.getStr(r),r=De.calculateAt(e,r);var o=n?De.get():0;return Ie.open(r,t,o).fd}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return-e.errno}}var Re,Be,Oe,Ue=(e,r,t,n,o)=>{},xe=()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);Re=e},We=e=>{for(var r="",t=e;k[t];)r+=Re[k[t++]];return r},Le={},je={},Ve={},ze=e=>{throw new Be(e)},Ne=e=>{throw new Oe(e)},He=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Ne("Mismatched type converter count");for(var o=0;o{je.hasOwnProperty(e)?o[r]=je[e]:(a.push(e),Le.hasOwnProperty(e)||(Le[e]=[]),Le[e].push((()=>{o[r]=je[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)};function Ge(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=r.name;if(e||ze(`type "${n}" must have a positive integer typeid pointer`),je.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;ze(`Cannot register type '${n}' twice`)}if(je[e]=r,delete Ve[e],Le.hasOwnProperty(e)){var o=Le[e];delete Le[e],o.forEach((e=>e()))}}function qe(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ge(e,r,t)}var Xe,Ye=8,Je=(e,r,t,n)=>{qe(e,{name:r=We(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:Ye,readValueFromPointer:function(e){return this.fromWireType(k[e])},destructorFunction:null})},Qe=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Ze=e=>{ze(e.$$.ptrType.registeredClass.name+" instance already deleted")},Ke=!1,er=e=>{},rr=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},tr=e=>{e.count.value-=1,0===e.count.value&&rr(e)},nr=(e,r,t)=>{if(r===t)return e;if(void 0===t.baseClass)return null;var n=nr(e,r,t.baseClass);return null===n?null:t.downcast(n)},or={},ar=()=>Object.keys(cr).length,ir=()=>{var e=[];for(var r in cr)cr.hasOwnProperty(r)&&e.push(cr[r]);return e},sr=[],lr=()=>{for(;sr.length;){var e=sr.pop();e.$$.deleteScheduled=!1,e.delete()}},dr=e=>{Xe=e,sr.length&&Xe&&Xe(lr)},ur=()=>{o.getInheritedInstanceCount=ar,o.getLiveInheritedInstances=ir,o.flushPendingDeletes=lr,o.setDelayFunction=dr},cr={},fr=(e,r)=>{for(void 0===r&&ze("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r},hr=(e,r)=>(r=fr(e,r),cr[r]),pr=(e,r)=>(r.ptrType&&r.ptr||Ne("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!==!!r.smartPtr&&Ne("Both smartPtrType and smartPtr must be specified"),r.count={value:1},gr(Object.create(e,{$$:{value:r}})));function mr(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=hr(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?pr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):pr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=or[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var l=nr(r,this.registeredClass,a.registeredClass);return null===l?o.call(this):this.isSmartPointer?pr(a.registeredClass.instancePrototype,{ptrType:a,ptr:l,smartPtrType:this,smartPtr:e}):pr(a.registeredClass.instancePrototype,{ptrType:a,ptr:l})}var gr=e=>"undefined"==typeof FinalizationRegistry?(gr=e=>e,e):(Ke=new FinalizationRegistry((e=>{tr(e.$$)})),gr=e=>{var r=e.$$;if(!!r.smartPtr){var t={$$:r};Ke.register(e,t,e)}return e},er=e=>Ke.unregister(e),gr(e)),vr=()=>{Object.assign(yr.prototype,{isAliasOf(e){if(!(this instanceof yr))return!1;if(!(e instanceof yr))return!1;var r=this.$$.ptrType.registeredClass,t=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o},clone(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=gr(Object.create(Object.getPrototypeOf(this),{$$:{value:Qe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ze("Object already scheduled for deletion"),er(this),tr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ze("Object already scheduled for deletion"),sr.push(this),1===sr.length&&Xe&&Xe(lr),this.$$.deleteScheduled=!0,this}})};function yr(){}var wr=(e,r)=>Object.defineProperty(r,"name",{value:e}),_r=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||ze(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},br=(e,r,t)=>{o.hasOwnProperty(e)?((void 0===t||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[t])&&ze(`Cannot register public name '${e}' twice`),_r(o,e,e),o.hasOwnProperty(t)&&ze(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[e].overloadTable[t]=r):(o[e]=r,void 0!==t&&(o[e].numArguments=t))},Er=48,kr=57,Sr=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=Er&&r<=kr?`_${e}`:e};function Ar(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var Cr=(e,r,t)=>{for(;r!==t;)r.upcast||ze(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e};function Pr(e,r){if(null===r)return this.isReference&&ze(`null is not a valid ${this.name}`),0;r.$$||ze(`Cannot pass "${lt(r)}" as a ${this.name}`),r.$$.ptr||ze(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass;return Cr(r.$$.ptr,t,this.registeredClass)}function Tr(e,r){var t;if(null===r)return this.isReference&&ze(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r.$$||ze(`Cannot pass "${lt(r)}" as a ${this.name}`),r.$$.ptr||ze(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&ze(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=Cr(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&ze("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:ze(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,at.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:ze("Unsupporting sharing policy")}return t}function Ir(e,r){if(null===r)return this.isReference&&ze(`null is not a valid ${this.name}`),0;r.$$||ze(`Cannot pass "${lt(r)}" as a ${this.name}`),r.$$.ptr||ze(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&ze(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass;return Cr(r.$$.ptr,t,this.registeredClass)}function Fr(e){return this.fromWireType(P[e>>2])}var Dr=()=>{Object.assign($r.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Ye,readValueFromPointer:Fr,deleteObject(e){null!==e&&e.delete()},fromWireType:mr})};function $r(e,r,t,n,o,a,i,s,l,d,u){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=u,o||void 0!==r.baseClass?this.toWireType=Tr:n?(this.toWireType=Pr,this.destructorFunction=null):(this.toWireType=Ir,this.destructorFunction=null)}var Mr,Rr,Br=(e,r,t)=>{o.hasOwnProperty(e)||Ne("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==t?o[e].overloadTable[t]=r:(o[e]=r,o[e].argCount=t)},Or=(e,r,t)=>{var n=o["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)},Ur=[],xr=e=>{var r=Ur[e];return r||(e>=Ur.length&&(Ur.length=e+1),Ur[e]=r=Mr.get(e)),r},Wr=(e,r,t)=>e.includes("j")?Or(e,r,t):xr(r).apply(null,t),Lr=(e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),Wr(e,r,t)}},jr=(e,r)=>{var t=(e=We(e)).includes("j")?Lr(e,r):xr(r);return"function"!=typeof t&&ze(`unknown function pointer with signature ${e}: ${r}`),t},Vr=(e,r)=>{var t=wr(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t},zr=e=>{var r=vn(e),t=We(r);return mn(r),t},Nr=(e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||je[r]||(Ve[r]?Ve[r].forEach(e):(t.push(r),n[r]=!0))})),new Rr(`${e}: `+t.map(zr).join([", "]))},Hr=(e,r,t,n,o,a,i,s,l,d,u,c,f)=>{u=We(u),a=jr(o,a),s&&(s=jr(i,s)),d&&(d=jr(l,d)),f=jr(c,f);var h=Sr(u);br(h,(function(){Nr(`Cannot construct ${u} due to unbound types`,[n])})),He([e,r,t],n?[n]:[],(function(r){var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:yr.prototype;var i=wr(u,(function(){if(Object.getPrototypeOf(this)!==l)throw new Be("Use 'new' to construct "+u);if(void 0===c.constructor_body)throw new Be(u+" has no accessible constructor");var e=c.constructor_body[arguments.length];if(void 0===e)throw new Be(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(c.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(o,{constructor:{value:i}});i.prototype=l;var c=new Ar(u,i,l,f,t,a,s,d);c.baseClass&&(void 0===c.baseClass.__derivedClasses&&(c.baseClass.__derivedClasses=[]),c.baseClass.__derivedClasses.push(c));var p=new $r(u,c,!0,!1,!1),m=new $r(u+"*",c,!1,!1,!1),g=new $r(u+" const*",c,!1,!0,!1);return or[e]={pointerType:m,constPointerType:g},Br(h,i),[p,m,g]}))},Gr=(e,r)=>{for(var t=[],n=0;n>2]);return t},qr=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function Xr(e,r){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var t=wr(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}function Yr(e,r,t,n,o,a){var i=r.length;i<2&&ze("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&null!==t,l=!1,d=1;d0?", ":"")+f),h+=(u||a?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",l)h+="runDestructors(destructors);\n";else for(d=s?1:2;d{var i=Gr(r,t);o=jr(n,o),He([],[e],(function(e){var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new Be(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[r-1]=()=>{Nr(`Cannot construct ${e.name} due to unbound types`,i)},He([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=Yr(t,n,null,o,a),[]))),[]}))},Qr=e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?e.substr(0,r):e},Zr=(e,r,t,n,o,a,i,s,l)=>{var d=Gr(t,n);r=We(r),r=Qr(r),a=jr(o,a),He([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`;function o(){Nr(`Cannot call ${n} due to unbound types`,d)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var u=e.registeredClass.instancePrototype,c=u[r];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===t-2?(o.argCount=t-2,o.className=e.name,u[r]=o):(_r(u,r,n),u[r].overloadTable[t-2]=o),He([],d,(function(o){var s=Yr(n,o,e,a,i,l);return void 0===u[r].overloadTable?(s.argCount=t-2,u[r]=s):u[r].overloadTable[t-2]=s,[]})),[]}))};function Kr(){Object.assign(et.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function et(){this.allocated=[void 0],this.freelist=[]}var rt=new et,tt=e=>{e>=rt.reserved&&0==--rt.get(e).refcount&&rt.free(e)},nt=()=>{for(var e=0,r=rt.reserved;r{rt.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),rt.reserved=rt.allocated.length,o.count_emval_handles=nt},at={toValue:e=>(e||ze("Cannot use deleted val. handle = "+e),rt.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return rt.allocate({refcount:1,value:e})}}};function it(e){return this.fromWireType(C[e>>2])}var st=(e,r)=>{qe(e,{name:r=We(r),fromWireType:e=>{var r=at.toValue(e);return tt(e),r},toWireType:(e,r)=>at.toHandle(r),argPackAdvance:Ye,readValueFromPointer:it,destructorFunction:null})},lt=e=>{if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e},dt=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(T[e>>2])};case 8:return function(e){return this.fromWireType(I[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},ut=(e,r,t)=>{qe(e,{name:r=We(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:Ye,readValueFromPointer:dt(r,t),destructorFunction:null})},ct=(e,r,t)=>{switch(r){case 1:return t?e=>E[e>>0]:e=>k[e>>0];case 2:return t?e=>S[e>>1]:e=>A[e>>1];case 4:return t?e=>C[e>>2]:e=>P[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},ft=(e,r,t,n,o)=>{r=We(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<>>i}var s=r.includes("unsigned");qe(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:Ye,readValueFromPointer:ct(r,t,0!==n),destructorFunction:null})},ht=(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=P[e>>2],t=P[e+4>>2];return new n(E.buffer,t,r)}qe(e,{name:t=We(t),fromWireType:o,argPackAdvance:Ye,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},pt=(e,r,t)=>ge(e,k,r,t),mt=(e,r)=>{var t="std::string"===(r=We(r));qe(e,{name:r,fromWireType(e){var r,n=P[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==k[s]){var l=Fe(a,s-a);void 0===r?r=l:(r+=String.fromCharCode(0),r+=l),a=s+1}}else{var d=new Array(n);for(i=0;i>2]=n,t&&o)pt(r,i,n+1);else if(o)for(var s=0;s255&&(mn(i),ze("String has UTF-16 code units that do not fit in 8 bits")),k[i+s]=l}else for(s=0;s{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&A[n];)++n;if((t=n<<1)-e>32&>)return gt.decode(k.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=S[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},yt=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a>1]=i,r+=2}return S[r>>1]=0,r-n},wt=e=>2*e.length,_t=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=C[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},bt=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a=55296&&i<=57343)i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a);if(C[r>>2]=i,(r+=4)+4>o)break}return C[r>>2]=0,r-n},Et=e=>{for(var r=0,t=0;t=55296&&n<=57343&&++t,r+=4}return r},kt=(e,r,t)=>{var n,o,a,i,s;t=We(t),2===r?(n=vt,o=yt,i=wt,a=()=>A,s=1):4===r&&(n=_t,o=bt,i=Et,a=()=>P,s=2),qe(e,{name:t,fromWireType:e=>{for(var t,o=P[e>>2],i=a(),l=e+4,d=0;d<=o;++d){var u=e+4+d*r;if(d==o||0==i[u>>s]){var c=n(l,u-l);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),l=u+r}}return mn(e),t},toWireType:(e,n)=>{"string"!=typeof n&&ze(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),l=yn(4+a+r);return P[l>>2]=a>>s,o(n,l+4,a+r),null!==e&&e.push(mn,l),l},argPackAdvance:Ye,readValueFromPointer:it,destructorFunction(e){mn(e)}})},St=(e,r)=>{qe(e,{isVoid:!0,name:r=We(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},At={},Ct=e=>{var r=At[e];return void 0===r?We(e):r},Pt=[],Tt=(e,r,t,n,o)=>(e=Pt[e])(r=at.toValue(r),r[t=Ct(t)],n,o),It=e=>{var r=Pt.length;return Pt.push(e),r},Ft=(e,r)=>{var t=je[e];return void 0===t&&ze(r+" has unknown type "+zr(e)),t},Dt=(e,r)=>{for(var t=new Array(e),n=0;n>2],"parameter "+n);return t},$t=(e,r,t)=>{var n=[],o=e.toWireType(n,t);return n.length&&(P[r>>2]=at.toHandle(n)),o},Mt=(e,r,t)=>{var n=Dt(e,r),o=n.shift();e--;var a="return function (obj, func, destructorsRef, args) {\n",i=0,s=[];0===t&&s.push("obj");for(var l=["retType"],d=[o],u=0;ue.name)).join(", ")}) => ${o.name}>`;return It(wr(f,c))},Rt=e=>{var r=at.toValue(e);qr(r),tt(e)},Bt=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN,Ot=e=>e%4==0&&(e%100!=0||e%400==0),Ut=[0,31,60,91,121,152,182,213,244,274,305,335],xt=[0,31,59,90,120,151,181,212,243,273,304,334],Wt=e=>(Ot(e.getFullYear())?Ut:xt)[e.getMonth()]+e.getDate()-1;function Lt(e,r,t){var n=Bt(e,r),o=new Date(1e3*n);C[t>>2]=o.getSeconds(),C[t+4>>2]=o.getMinutes(),C[t+8>>2]=o.getHours(),C[t+12>>2]=o.getDate(),C[t+16>>2]=o.getMonth(),C[t+20>>2]=o.getFullYear()-1900,C[t+24>>2]=o.getDay();var a=0|Wt(o);C[t+28>>2]=a,C[t+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),s=new Date(o.getFullYear(),6,1).getTimezoneOffset(),l=i.getTimezoneOffset(),d=0|(s!=l&&o.getTimezoneOffset()==Math.min(l,s));C[t+32>>2]=d}var jt=e=>{var r=me(e)+1,t=yn(r);return t&&pt(e,t,r),t},Vt=(e,r,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),l=Math.max(i,s);function d(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}P[e>>2]=60*l,C[r>>2]=Number(i!=s);var u=d(o),c=d(a),f=jt(u),h=jt(c);s>2]=f,P[t+4>>2]=h):(P[t>>2]=h,P[t+4>>2]=f)},zt=()=>{G("")},Nt=()=>Date.now(),Ht=(e,r,t)=>k.copyWithin(e,r,r+t),Gt=()=>134217728,qt=e=>{var r=(e-w.buffer.byteLength+65535)/65536;try{return w.grow(r),$(),1}catch(e){}},Xt=e=>{var r=k.length;e>>>=0;var t=Gt();if(e>t)return!1;for(var n,o,a=1;a<=4;a*=2){var i=r*(1+.2/a);i=Math.min(i,e+100663296);var s=Math.min(t,(n=Math.max(e,i))+((o=65536)-n%o)%o);if(qt(s))return!0}return!1},Yt={},Jt=()=>d||"./this.program",Qt=()=>{if(!Qt.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Jt()};for(var r in Yt)void 0===Yt[r]?delete e[r]:e[r]=Yt[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);Qt.strings=t}return Qt.strings},Zt=(e,r)=>{for(var t=0;t>0]=e.charCodeAt(t);E[r>>0]=0},Kt=(e,r)=>{var t=0;return Qt().forEach(((n,o)=>{var a=r+t;P[e+4*o>>2]=a,Zt(n,a),t+=n.length+1})),0},en=(e,r)=>{var t=Qt();P[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),P[r>>2]=n,0};function rn(e){try{var r=De.getStreamFromFD(e);return Ie.close(r),0}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return e.errno}}function tn(e,r){try{var t=De.getStreamFromFD(e),n=t.tty?2:Ie.isDir(t.mode)?3:Ie.isLink(t.mode)?7:4;return E[r>>0]=n,S[r+2>>1]=0,Y=[0,(X=0,+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],C[r+8>>2]=Y[0],C[r+12>>2]=Y[1],Y=[0,(X=0,+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],C[r+16>>2]=Y[0],C[r+20>>2]=Y[1],0}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return e.errno}}var nn=(e,r,t,n)=>{for(var o=0,a=0;a>2],s=P[r+4>>2];r+=8;var l=Ie.read(e,E,i,s,n);if(l<0)return-1;if(o+=l,l>2]=a,0}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return e.errno}}function an(e,r,t,n,o){var a=Bt(r,t);try{if(isNaN(a))return 61;var i=De.getStreamFromFD(e);return Ie.llseek(i,a,n),Y=[i.position>>>0,(X=i.position,+Math.abs(X)>=1?X>0?+Math.floor(X/4294967296)>>>0:~~+Math.ceil((X-+(~~X>>>0))/4294967296)>>>0:0)],C[o>>2]=Y[0],C[o+4>>2]=Y[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return e.errno}}var sn=(e,r,t,n)=>{for(var o=0,a=0;a>2],s=P[r+4>>2];r+=8;var l=Ie.write(e,E,i,s,n);if(l<0)return-1;o+=l,void 0!==n&&(n+=l)}return o};function ln(e,r,t,n){try{var o=De.getStreamFromFD(e),a=sn(o,r,t);return P[n>>2]=a,0}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return e.errno}}var dn=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ie.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},un=365,cn=146;Object.defineProperties(dn.prototype,{read:{get:function(){return(this.mode&un)===un},set:function(e){e?this.mode|=un:this.mode&=~un}},write:{get:function(){return(this.mode&cn)===cn},set:function(e){e?this.mode|=cn:this.mode&=~cn}},isFolder:{get:function(){return Ie.isDir(this.mode)}},isDevice:{get:function(){return Ie.isChrdev(this.mode)}}}),Ie.FSNode=dn,Ie.createPreloadedFile=Ce,Ie.staticInit(),xe(),Be=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Oe=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},vr(),ur(),Dr(),Rr=o.UnboundTypeError=Vr(Error,"UnboundTypeError"),Kr(),ot();var fn,hn={o:ie,C:$e,u:Me,r:Ue,E:Je,F:Hr,A:Jr,i:Zr,D:st,l:ut,c:ft,b:ht,m:mt,j:kt,n:St,f:Tt,h:tt,e:Mt,d:Rt,p:Lt,t:Vt,a:zt,g:Nt,y:Ht,s:Xt,w:Kt,x:en,k:rn,v:tn,B:on,q:an,z:ln},pn=ne(),mn=e=>(mn=pn.I)(e),gn=()=>(gn=pn.K)(),vn=e=>(vn=pn.L)(e),yn=e=>(yn=pn.M)(e),wn=e=>(wn=pn.O)(e);function _n(){function e(){fn||(fn=!0,o.calledRun=!0,F||(U(),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),x()))}V>0||(O(),V>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.dynCall_viiijj=(e,r,t,n,a,i,s,l)=>(o.dynCall_viiijj=pn.P)(e,r,t,n,a,i,s,l),o.dynCall_jij=(e,r,t,n)=>(o.dynCall_jij=pn.Q)(e,r,t,n),o.dynCall_jii=(e,r,t)=>(o.dynCall_jii=pn.R)(e,r,t),o.dynCall_jiji=(e,r,t,n,a)=>(o.dynCall_jiji=pn.S)(e,r,t,n,a),z=function e(){fn||_n(),fn||(z=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return _n(),r.ready}})();const n=h;!function(e,r){const t=h,n=e();for(;;)try{if(382985===parseInt(t(439))/1+parseInt(t(624))/2+-parseInt(t(361))/3+parseInt(t(493))/4*(-parseInt(t(581))/5)+parseInt(t(495))/6*(-parseInt(t(222))/7)+-parseInt(t(544))/8*(parseInt(t(507))/9)+parseInt(t(562))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(P);const o={websocket:1,fetch:2,hls:3,webrtc:4,webTransport:5,aliyunRtc:6,ts:7};n(618),n(258),n(599),n(521),n(258),n(618),n(607),n(420),n(391),n(521),n(351);const a={player:n(596),playerAudio:n(509),playbackTF:"playbackTF",talk:"talk",playVod:"playVod"},i={mp4:n(351),webm:"webm",flv:"flv",mov:n(503)},s={flv:n(294),m7s:"m7s",hls:n(599),webrtc:"webrtc",webTransport:"webTransport",nakedFlow:n(363),fmp4:"fmp4",mpeg4:n(451),aliyunRtc:"aliyunRtc",ts:"ts",g711:"g711",pcm:n(654)};n(593),n(637),n(669),n(586),n(667),n(579),n(282);const l={mse:"mse",wcs:"wcs",offscreen:n(541),wasm:n(332),simd:"simd",mt:"mt",webrtc:n(607),hls:n(599),aliyunRtc:n(521)},d=(n(482),"video"),u={debug:"debug",warn:n(510)},c="click",f=(n(692),{normal:n(402),simple:"simple"});function h(e,r){const t=P();return(h=function(e,r){return t[e-=220]})(e,r)}const p={normal:n(402),small:"small"},m=n(473),g=n(648),v=4080;n(381),n(400);const y={playIsNotPauseOrUrlIsNull:n(620),webglAlignmentError:n(565),webglContextLostError:"webgl 上下文丢失",mediaSourceH265NotSupport:"不支持硬解码H265",mseSourceBufferFull:n(446),mediaSourceAppendBufferError:n(223),mseSourceBufferError:n(442),mseAddSourceBufferError:n(223),mseWorkerAddSourceBufferError:n(223),mediaSourceDecoderConfigurationError:n(223),mediaSourceTsIsMaxDiff:n(595),mseWidthOrHeightChange:"流异常",mediaSourceAudioG711NotSupport:n(309),mediaSourceAudioInitTimeout:n(517),mediaSourceAudioNoDataTimeout:"等待音频数据超时",mediaSourceUseCanvasRenderPlayFailed:"MediaSource解码使用canvas渲染失败",mediaSourceBufferedIsZeroError:"流异常",webcodecsH265NotSupport:n(348),webcodecsUnsupportedConfigurationError:"初始化解码器失败",webcodecsDecodeConfigureError:n(223),webcodecsDecodeError:n(442),webcodecsAudioInitTimeout:n(517),webcodecsAudioNoDataTimeout:"等待音频数据超时",wcsWidthOrHeightChange:n(442),wasmDecodeError:n(442),simdDecodeError:n(442),wasmWidthOrHeightChange:n(595),wasmUseVideoRenderError:n(628),videoElementPlayingFailed:"video自动渲染失败",simdH264DecodeVideoWidthIsTooLarge:"不支持该分辨率的视频",networkDelayTimeout:n(392),fetchError:n(674),streamEnd:n(409),websocket1006Error:n(642),websocketError:n(674),webrtcError:n(674),hlsError:n(674),decoderWorkerInitError:n(585),decoderWorkerWasmError:n(353),videoElementPlayingFailedForWebrtc:"video自动渲染失败",videoInfoError:n(598),webrtcStreamH265:"webrtc不支持H265",delayTimeout:"播放超时重播失败",loadingTimeout:n(229),loadingTimeoutRetryEnd:"加载超时重播失败",delayTimeoutRetryEnd:n(499),flvDemuxBufferSizeTooLarge:n(529),audioChannelError:n(485),aliyunRtcError:"请求失败",mseWaitVideoCanplayTimeout:"流异常",initDecoderWorkerTimeout:n(516)};n(596),n(510),n(402),n(324),n(350),n(373),n(477),n(402),n(258),n(294),n(332),n(355);n(486),n(362),n(377),n(380),n(571),n(250),n(660),n(573),n(365),n(631),n(622),n(435),n(339),n(557),n(242),n(559),n(396),n(440),n(452),n(685),n(699),n(553),n(437),n(269),n(318);const w={init:n(627),initVideo:n(315),render:"render",playAudio:n(623),initAudio:n(673),kBps:n(483),decode:"decode",audioCode:"audioCode",audioNalu:"audioNalu",audioAACSequenceHeader:n(449),videoCode:n(384),videoCodec:n(497),videoNalu:n(272),videoPayload:n(548),audioPayload:n(412),wasmError:n(251),workerFetch:n(556),iframeIntervalTs:n(429),isDropping:n(580),workerEnd:n(345),networkDelay:n(255),playbackStreamVideoFps:n(605),wasmWidthOrHeightChange:n(236),simdDecodeError:n(372),simdH264DecodeVideoWidthIsTooLarge:n(484),websocketOpen:n(603),websocketStringMsg:n(271),closeEnd:"closeEnd",tempStream:n(655),videoSEI:n(359),flvScriptData:"flvScriptData",aacSequenceHeader:n(589),videoSequenceHeader:n(349),flvBufferData:n(465),checkFirstIFrame:n(668),mseHandle:n(280),mseFirstRenderTime:"mseFirstRenderTime",mseError:"mseError",notSupportNewWasm:n(678),failedToAsynchronouslyPrepareWasm:n(458)};n(558),n(627),n(651),n(690),n(646),n(621),n(316),n(395),n(633),n(582),n(432),n(281),n(258),n(317),n(426),n(578),n(290),n(378),n(335),n(627),n(258),n(426),n(578),n(427),n(603),n(627);const _={fullscreen:n(288),fullScreenByStart:n(434),webFullscreen:n(398),decoderWorkerInit:n(480),play:n(512),playing:n(264),pause:"pause",mute:n(634),load:n(489),loading:n(691),zooming:"zooming",drawingRect:"drawingRect",drawingRectInfo:n(615),videoInfo:"videoInfo",timeUpdate:n(561),audioInfo:n(459),log:n(422),error:n(360),kBps:n(483),timeout:"timeout",delayTimeout:n(276),delayTimeoutRetryEnd:n(662),loadingTimeout:"loadingTimeout",loadingTimeoutRetryEnd:n(490),stats:n(564),performance:n(470),videoSmooth:n(383),faceDetectActive:n(243),objectDetectActive:n(413),occlusionDetectActive:n(606),imageDetectActive:n(644),record:n(325),recording:n(352),recordingTimestamp:n(629),recordStart:n(638),recordEnd:n(700),recordCreateError:"recordCreateError",recordBlob:n(602),recordCancel:n(245),buffer:n(578),videoFrame:n(455),videoSEI:n(359),videoSEISyncPts:n(656),start:n(441),metadata:n(296),resize:n(253),volumechange:n(265),volume:n(639),destroy:n(317),beforeDestroy:n(645),streamEnd:"streamEnd",streamRate:n(407),streamAbps:n(666),streamVbps:n(286),streamDts:n(333),streamSuccess:n(703),streamMessage:n(330),streamError:n(652),streamStats:"streamStats",streamEndInner:"streamEndInner",mseSourceOpen:n(300),mseSourceClose:"mseSourceClose",mseSourceended:n(225),mseSourceStartStreaming:n(505),mseSourceEndStreaming:"mseSourceEndStreaming",mseSourceBufferError:n(549),mseAddSourceBufferError:n(277),mseWorkerAddSourceBufferError:n(535),mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:n(291),videoWaiting:n(601),videoTimeUpdate:n(588),videoSyncAudio:"videoSyncAudio",playToRenderTimes:n(293),playbackTime:"playbackTime",playbackTimestamp:"playbackTimestamp",playbackTimeScroll:n(649),playbackPrecision:"playbackPrecision",playbackShowPrecisionChange:n(313),playbackJustTime:n(374),playbackStats:n(671),playbackSeek:n(320),playbackPause:n(301),playbackPauseOrResume:"playbackPauseOrResume",playbackRateChange:"playbackRateChange",playbackPreRateChange:"playbackPreRateChange",playbackEndInner:n(444),playbackEnd:n(569),playVodStats:n(641),playVodPause:n(295),playVodPauseOrResume:n(583),playVodRateChange:"playVodRateChange",playVodTime:n(697),playVodTimeCache:n(577),playVodSeek:n(358),playVodSeekEnd:n(538),playVodVideoSeekingByMse:n(369),playVodVideoSeekedByMse:n(340),playVodCanplay:n(337),playVodWaiting:n(647),playVodEndedAndReplay:n(574),playVodEnded:"playVodEnded",ptz:n(492),streamQualityChange:"streamQualityChange",visibilityChange:n(572),netBuf:n(227),close:"close",networkDelayTimeout:"networkDelayTimeout",togglePerformancePanel:"togglePerformancePanel",viewResizeChange:n(513),flvDemuxBufferSizeTooLarge:n(405),talkGetUserMediaSuccess:"talkGetUserMediaSuccess",talkGetUserMediaFail:n(226),talkGetUserMediaTimeout:n(321),talkStreamStart:n(357),talkStreamOpen:n(344),talkStreamClose:n(311),talkStreamError:n(404),talkStreamInactive:n(235),talkStreamMsg:n(246),webrtcDisconnect:n(341),webrtcFailed:n(304),webrtcClosed:n(302),webrtcChecking:n(498),webrtcConnected:n(417),webrtcCompleted:"webrtcCompleted",webrtcOnConnectionStateChange:n(336),webrtcOnIceConnectionStateChange:n(431),crashLog:"crashLog",focus:n(448),blur:n(287),inView:"inView",visibilityHiddenTimeout:n(488),websocketOpen:"websocketOpen",websocketClose:n(427),websocketError:n(468),websocketStringMsg:n(271),aiObjectDetectorInfo:"aiObjectDetectorInfo",aiFaceDetectorInfo:n(527),aiOcclusionDetectResult:n(683),aiImageDetectResult:n(268),playFailedAndPaused:n(390),audioResumeState:"audioResumeState",webrtcStreamH265:n(542),flvMetaData:n(331),talkFailedAndStop:n(501),removeLoadingBgImage:"removeLoadingBgImage",memoryLog:"memoryLog",downloadMemoryLog:n(676),pressureObserverCpu:n(338),currentPts:n(285),online:"online",offline:n(464),networkState:"networkState",clickInitPlayer:"clickInitPlayer"};n(489),n(561),n(239),n(459),n(360),n(483),n(441),n(269),n(490),n(276),n(662),n(531),n(398),n(512),n(416),n(634),n(564),n(470),n(629),n(638),n(680),n(602),n(671),n(567),n(403),n(423),n(653),n(313),n(569),n(436),n(329),n(697),n(358),n(538),n(492),n(279),n(237),n(570),n(448),n(287),n(488),n(572),n(603),n(427),n(271),n(527),n(683),n(268),n(292),n(359),n(331),n(336),n(431),n(274),n(639),n(615),n(592),n(311),n(404),n(235),n(321),n(246),n(489),n(561),n(459),n(360),n(441),n(504),n(269),n(662),n(512),n(416),n(634),n(564),n(293),n(570),n(603),n(390),n(292);n(404),n(311);n(284),n(290),n(472),n(468),n(476),n(371),n(537),n(275),n(228),n(399),n(594),n(430),n(408),n(462),n(386),n(549),n(535),n(584),n(702),n(372),n(496),n(302),n(236),n(545),n(696),n(672),n(591),n(547),n(254),n(532),n(298),n(463),n(511),n(643),n(269),n(500),n(502),n(283),n(364),n(458),n(367),n(389),n(621),n(360),n(261),n(540),n(326),n(419),n(326),n(419),n(694);const b={h264:7,h265:12,mpeg4:99};n(694),n(312);const E={AAC:10,ALAW:7,MULAW:8,MP3:2,OPUS:13,G711A:7,G711U:8};n(382),n(418),n(661),n(471),n(608),n(520),n(661);const k=14;n(701),n(397),n(522),n(260),n(599),n(482),n(415),n(566),n(356),n(328),n(508),n(609),n(248),n(453),n(270),n(376),n(555),n(635),n(519),n(534),n(278),n(270),n(323),n(224),n(347),n(650),n(560),n(664),n(587),n(682),n(347),n(597),n(523),n(543),n(526),n(267),n(612),n(308),n(514),n(506),n(387),n(686),n(610),n(695);n(670),n(654),n(289);n(539),n(230),n(425),n(524),n(479),n(665),n(698),n(657),n(663),n(626),n(393),n(616);const S={h264:n(220),h265:n(233),av1:"av1"};n(551),n(379),n(249),n(467),n(688),n(401),n(536),n(411),n(691),n(264),n(317);const A={sequenceHeader:0,nalu:1},C={keyFrame:1,interFrame:2};n(518),n(368),n(487),n(693);n(305),n(238),n(453),n(621),n(360),n(428);n(241),n(299);function P(){const e=["wasmError","mp3","resize","videoElementPlayingFailed","networkDelay","Unsupported audio format","multiMousedown","fetch","multiMouseover","mse","buffering","remote-inbound-rtp","container","playing","volumechange","sei-in-time","fiStop","aiImageDetectResult","loadingTimeout","halfHour","websocketStringMsg","videoNalu","multiDragstart","networkState","webcodecsUnsupportedConfigurationError","delayTimeout","mseAddSourceBufferError","oneHour","streamQualityChange","mseHandle","fetchStream","AliyunRtc","aliyunRtcError","playIsNotPauseOrUrlIsNull","currentPts","streamVbps","blur","fullscreen$2","opus","fetchError","mseSourceBufferFull","audioResumeState","playToRenderTimes","flv","playVodPause","metadata","multiMousemove","decoderWorkerInitError","script","mseSourceOpen","playbackPause","webrtcClosed","multiFullscreen","webrtcFailed","stream","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C(wasm%E5%86%85%E9%83%A8%E4%BC%9A%E6%9A%82%E5%81%9C%E8%A7%A3%E7%A0%81)%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","3-1","zoomNarrow","硬解码不支持G711a/u音频格式","audio packet","talkStreamClose","H265(HEVC)","playbackShowPrecisionChange","certificate","initVideo","updateConfig","destroy","heartTimeout","no-audio-track","playbackSeek","talkGetUserMediaTimeout","人脸识别","tenMin","decoder-pro-audio.js","record","download","停止录制",'video/mp4;codecs="hev1.2.4.L120.90"',"playVodRateChange","streamMessage","flvMetaData","wasm","streamDts","complete","fetchSuccess","webrtcOnConnectionStateChange","playVodCanplay","pressureObserverCpu","isWebrtc","playVodVideoSeekedByMse","webrtcDisconnect","load-complete","1-1","talkStreamOpen","workerEnd","性能面板激活","down","不支持硬解码H265","videoSequenceHeader","jessibuca-pro-mp4-recorder-decoder.js","mp4","recording","wasm解码失败","操作盘激活","red",'video/mp4;codecs="hev1.1.6.L120.90"',"talkStreamStart","playVodSeek","videoSEI","error","1946277XhJVjN","playbackForwardMaxRateDecodeIFrame","nakedFlow","mseWaitVideoCanplayTimeout","isFmp4","load-retry","playVodMp4Error","jtt","playVodVideoSeekingByMse","webrtc-disconnected","webcodecsH265NotSupport","simdDecodeError","none","playbackJustTime","buffereos","one-hour","supportHls265","fetchClose","Cannot call 'decode' on a closed codec","pauseAndNextPlayUseLastFrameShow","/crypto/","ALAW(g711a)","videoSmooth","videoCode","video","mediaSourceDecoderConfigurationError","focusFar","emptied","mp4Error","playFailedAndPaused","worker","网络超时重播失败","progress","MEDIA_ERR_ABORTED","resetDecode","isAliyunRtc","webgl","webFullscreen","webcodecsAudioInitTimeout","jbprov","HEVC decoding is not supported","normal","playbackPauseOrResume","talkStreamError","flvDemuxBufferSizeTooLarge","0000000000","streamRate","mediaSourceAudioInitTimeout","请求结束","#FFCC00","AbortError","audioPayload","objectDetectActive","ws1006","key","pause","webrtcConnected","MULAW(g711u)","blob","webTransport","MEDIA_ERR_SRC_NOT_SUPPORTED","log","playbackPreRateChange","multiDblSelected","image/webp","destroyEnd","websocketClose","message","iframeIntervalTs","mediaSourceAudioG711NotSupport","webrtcOnIceConnectionStateChange","resetVideoDecode","电子放大","fullScreenByStart","isHls","playVodEnded","videoRenderSupportScale","sourcebuffer-created","401183TxpFUu","isTs","start","解码失败","hls-level-loaded","playbackEndInner","multiDragleave","缓冲区已满","stream-parsed","focus","audioAACSequenceHeader","multiMouseup","mpeg4","ghostWatermarkConfig","open","csrc","videoFrame","canplaythrough","NotAllowedError","failedToAsynchronouslyPrepareWasm","audioInfo","load-start","subtitle-segments","mediaSourceAudioNoDataTimeout","decoderWorkerWasmError","offline","flvBufferData","peer-connection","Decoding error","websocketError","play() failed because the user didn't interact with the document first","performance","AAC","fetchErrorWorker","JessibucaPro","保存日志","outbound-rtp","websocketOpenTimeout","default","webrtc-completed","sourceended","decoderWorkerInit","idle","canvas","kBps","simdH264DecodeVideoWidthIsTooLarge","音频通道错误","playType","tcp","visibilityHiddenTimeout","load","loadingTimeoutRetryEnd","object","ptz","678344llnrod","stalled","18xxoBdU","webrtcError","videoCodec","webrtcChecking","播放超时重播失败","networkDelayTimeout","talkFailedAndStop","fullscreenError","mov","timeout","mseSourceStartStreaming","apertureNear","4478589wuIdZb",'video/mp4;codecs="hev1.3.E.L120.90"',"playerAudio","warn","streamEnd","play","viewResizeChange","apertureFar","receiver","初始化解码worker超时","初始化音频解码器失败","rtp","five-min","MULAW","aliyunRtc","webgpu","leftDown","sourceopen","物品识别","stop","aiFaceDetectorInfo","multiDrop","FLV待解封装buffer过大","hls-manifest-loaded","fullscreen","videoElementPlayingFailedForWebrtc","webrtc-connected","30min","mseWorkerAddSourceBufferError","The user aborted a request","webcodecsDecodeError","playVodSeekEnd","image/png","full","offscreen","webrtcStreamH265","rightUp","8kaslPz","mseWidthOrHeightChange","transport","webglContextLostError","videoPayload","mseSourceBufferError","local-candidate","A key frame is required after configure() or flush()","sei","defaultStreamQuality","remove-buffer","half-hour","workerFetch","isWebrtcForZLM","Invalid NAL unit size","isWebrtcForOthers","left-up","timeUpdate","15056520UifOBO","data-channel","stats","Webgl 渲染失败",'video/mp4; codecs="avc1.64002A"',"playbackTimestamp","load-response-headers","playbackEnd","crashLog","replayUseLastFrameShow","visibilityChange","multiIndex","playVodEndedAndReplay","#000","multiSelected","playVodTimeCache","buffer","WebTransport","isDropping","5cEKmBj","resetAudioDecode","playVodPauseOrResume","mediaSourceAppendBufferError","初始化worker失败","FMP4","left-down","videoTimeUpdate","aacSequenceHeader","readystatechange","audioChannelError","clickInitPlayer","FLV","mediaSourceH265NotSupport","流异常","player","leftUp","解析视频分辨率失败","hls","wcsDecodeError","videoWaiting","recordBlob","websocketOpen","mseDecodeError","playbackStreamVideoFps","occlusionDetectActive","webrtc","ALAW",'video/mp4;codecs="hev1.4.10.L120.90"',"cruiseStop","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","zoomExpand","MEDIA_ERR_DECODE","sender","drawingRectInfo","loadedmetadata","global","websocket","ttfb","播放地址不能为空","close","isNakedFlow","playAudio","10556HFDnqv","3-4","ratechange","init","video自动渲染失败","recordingTimestamp","g711a","isMpeg4","memory access out of bounds","clearBuffer","mute","ten-min","遮挡物检查激活","M7S","recordStart","volume","退出全屏","playVodStats","流异常结束","websocket1006Error","imageDetectActive","beforeDestroy","initAudioCodec","playVodWaiting","20251201","playbackTimeScroll","left","decode","streamError","playbackRateChange","pcm","tempStream","videoSEISyncPts","canplay","created","人脸识别激活","controlSize","MP3","delayTimeoutRetryEnd","waiting","right-up","endstreaming","streamAbps","MPEG4","checkFirstIFrame","HLS","g711u","playbackStats","widthOrHeightChange","initAudio","请求失败","Wasm","downloadMemoryLog","4-1","notSupportNewWasm","物品识别激活","recordCreateError","decoder-pro-audio-player.js","right-down","aiOcclusionDetectResult","inbound-rtp","dynamicWatermarkConfig","cruiseStart","MEDIA_ERR_NETWORK","Decoder error","switch-url-failed","videoDecode","loading","mouseDownAndUp","udp","H264(AVC)","fogClose","wcsWidthOrHeightChange","playVodTime","qualitychange","watermarkConfig","recordEnd","webcodecs","wasmDecodeError","streamSuccess","avc","关闭电子放大","497378lAQMgR","初始化解码器失败","fiveMin","mseSourceended","talkGetUserMediaFail","netBuf","webcodecsDecodeConfigureError","加载超时重播失败","image/jpeg","window","seeked","hevc","loadeddata","talkStreamInactive","wasmWidthOrHeightChange","zooming","playback","videoInfo","switch-url-success","worklet","isWebrtcForSRS","faceDetectActive","suspend","recordCancel","talkStreamMsg","track","ended","Unsupported configuration","widthOrHeightChangeReplayDelayTime"];return(P=function(){return e})()}n(630),n(487),n(406),n(241),n(410),n(575),n(303),n(424),n(576),n(259),n(450),n(257),n(297),n(273),n(445),n(528),n(307),n(677),n(343),n(625),n(263),n(385),n(509),n(510),n(258),n(294),n(681),n(461),n(530),n(443),n(619),n(366),n(460),n(342),n(568),n(552),n(266),n(319),n(554),n(375),n(438),n(689),n(240),n(447),n(360),n(481),n(261),n(334),n(394),n(687),n(613),n(421),n(310),n(256),n(469),n(457),n(632),n(314),n(454),n(563),n(684),n(550),n(475),n(466),n(515),n(262),n(614),n(305),n(247),n(546),n(414),n(604),n(600),n(652),n(252),n(533),n(478),n(370),n(658),n(691),typeof window===n(491)&&window[n(231)]===window?window:typeof self===n(491)&&self.self===self?self:typeof global===n(491)&&global[n(617)]===global&&global,n(657),n(456),n(334),n(388),n(248),n(360),n(234),n(616),n(512),n(264),n(393),n(626),n(232),n(494),n(244),n(265),n(663),n(590),n(360),n(640),n(327),n(354),n(433),n(221),n(346),n(322),n(659),n(525),n(679),n(636),n(474);const T={wasm:n(675),simd:"Simd",fSimd:"FSimd"};n(611),n(306);var I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var F=Object.freeze({__proto__:null,commonjsGlobal:I,commonjsRequire:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},unwrapExports:function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e},createCommonjsModule:function(e,r){return e(r={exports:{}},r.exports),r.exports},getCjsExportFromNamespace:function(e){return e&&e.default||e}});function D(){var e=["removeEventListener","document","5144kbCDyT","webkitfullscreenerror","fullscreenEnabled","msFullscreenEnabled","9621PwcqoU","MSFullscreenError","1991460ppmXBr","addEventListener","createCommonjsModule","587069rZrxcL","screenfull","catch","webkitRequestFullScreen","mozfullscreenerror","object","msExitFullscreen","2484981oPmOTe","error","280wmMfRC","documentElement","exitFullscreen","isEnabled","72780dIrtCH","defineProperties","length","fullscreenchange","off","mozFullScreenEnabled","msFullscreenElement","webkitCurrentFullScreenElement","mozRequestFullScreen","change","6EyhXrI","webkitCancelFullScreen","request","mozFullScreenElement","exit","6172940YzWmiD","11MYOVMa","3221029ZocZcu","webkitExitFullscreen","then","MSFullscreenChange","webkitFullscreenEnabled","msRequestFullscreen","webkitfullscreenchange","mozfullscreenchange","exports","undefined","fullscreenerror","bind","webkitRequestFullscreen"];return(D=function(){return e})()}function $(e,r){var t=D();return($=function(e,r){return t[e-=167]})(e,r)}var M=$;!function(e,r){for(var t=$,n=e();;)try{if(580066===parseInt(t(201))/1+parseInt(t(198))/2+-parseInt(t(208))/3+parseInt(t(214))/4*(-parseInt(t(210))/5)+parseInt(t(170))/6*(-parseInt(t(177))/7)+-parseInt(t(192))/8*(-parseInt(t(196))/9)+parseInt(t(175))/10*(parseInt(t(176))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(D),F[M(200)]((function(e){var r,t,n,o,a,i;r=$,t="undefined"!=typeof window&&typeof window.document!==r(186)?window[r(191)]:{},n="undefined"!==r(206)&&e[r(185)],o=function(){for(var e,n=r,o=[["requestFullscreen","exitFullscreen","fullscreenElement",n(194),"fullscreenchange","fullscreenerror"],[n(189),n(178),"webkitFullscreenElement",n(181),n(183),n(193)],[n(204),n(171),n(167),"webkitCancelFullScreen",n(183),n(193)],[n(168),"mozCancelFullScreen",n(173),n(219),n(184),n(205)],[n(182),n(207),n(220),n(195),n(180),n(197)]],a=0,i=o[n(216)],s={};a32&&console[r(275)](r(271)),e<=this[r(270)]){let t=this[r(277)]>>>32-e;return this[r(277)]<<=e,this[r(270)]-=e,t}let t=this[r(270)]?this[r(277)]:0;t>>>=32-this[r(270)];let n=e-this[r(270)];this[r(265)]();let o=Math.min(n,this[r(270)]),a=this._current_word>>>32-o;return this._current_word<<=o,this[r(270)]-=o,t=t<>>r))return this[e(277)]<<=r,this[e(270)]-=r,r;return this[e(265)](),r+this._skipLeadingZero()}[R(278)](){const e=R;let r=this[e(258)]();return this[e(255)](r+1)-1}[R(253)](){let e=this[R(278)]();return 1&e?e+1>>>1:-1*(e>>>1)}}function U(e,r){const t=B();return(U=function(e,r){return t[e-=249]})(e,r)}const x=L;!function(e,r){const t=L,n=e();for(;;)try{if(759781===-parseInt(t(337))/1*(-parseInt(t(336))/2)+parseInt(t(328))/3*(parseInt(t(345))/4)+parseInt(t(308))/5*(parseInt(t(335))/6)+parseInt(t(310))/7*(parseInt(t(311))/8)+-parseInt(t(332))/9+-parseInt(t(307))/10+-parseInt(t(353))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(V);const W=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1];function L(e,r){const t=V();return(L=function(e,r){return t[e-=291]})(e,r)}function j(e){const r=L;return e[0]>>4===E.AAC&&e[1]===A[r(349)]}function V(){const e=["60bogttL","bufoff","buflen","audioMuxVersionA is Not Supported","9875187iYkHel","readByte","sampling_index","6HWQKmQ","6750cFQuhb","431OQfbuq","more than 2 numSubFrames Not Supported","audio_object_type","set","eof_flag_","subarray","more than 2 numProgram Not Supported","StreamMuxConfig Missing","42068uOyALi","navigator","allStreamsSameTimeFraming zero is Not Supported","mp4a.40.","sequenceHeader","profile: ","Flv: AAC invalid sampling frequency index!","android","12340724mEXHeB","aac","channel_config","indexOf","firefox","Invalid sampling index: ","readBool","sample_rate","toLowerCase","readBits","error","unshift","length","readNextAACFrame","data","bufpos","byteLength","chan_config","has_last_incomplete_data","more than 2 numLayer Not Supported","data_","sampling_freq_index","sampleRate: ","Could not found ADTS syncword until payload end","4371400EQsumi","6206245NeFVXQ","iserro","137263xZXQvh","208ixDQiX","sampling_frequency","current_syncword_offset_","log","slice","userAgent","channel: ","destroy","other_data_present","Flv: AAC invalid channel configuration","hasIncompleteData","object_type","read","findNextSyncwordOffset","channels","sbr","getLATMValue"];return(V=function(){return e})()}x(324),x(296),x(321);x(324),x(327);function z(e,r){const t=N();return(z=function(e,r){return t[e-=177]})(e,r)}function N(){const e=["set","8765184fBdSwO","shift","12753081xQIGSX","setUint32","push","byteLength","15YzCoco","subarray","10ocCssU","length","toString","997636EIFwPb","5785104lqUdxg","1219852ltCkZl","3PZxqUM","635752lrPXtV","7229957TxyfwN"];return(N=function(){return e})()}!function(e,r){const t=z,n=e();for(;;)try{if(604726===-parseInt(t(193))/1+parseInt(t(177))/2*(parseInt(t(178))/3)+parseInt(t(179))/4*(parseInt(t(188))/5)+-parseInt(t(194))/6+-parseInt(t(180))/7+parseInt(t(182))/8+-parseInt(t(184))/9*(-parseInt(t(190))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(N);const H=Y;function G(){const e=Y;return(new Date)[e(789)]()}!function(e,r){const t=Y,n=e();for(;;)try{if(180492===-parseInt(t(514))/1*(parseInt(t(776))/2)+parseInt(t(652))/3*(-parseInt(t(793))/4)+parseInt(t(729))/5+-parseInt(t(669))/6+-parseInt(t(752))/7*(parseInt(t(670))/8)+parseInt(t(802))/9+-parseInt(t(768))/10*(-parseInt(t(728))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(J),(()=>{const e=Y;try{if(typeof WebAssembly===e(473)&&typeof WebAssembly[e(587)]===e(796)){const r=new(WebAssembly[e(474)])(Uint8Array.of(0,97,115,109,1,0,0,0));if(r instanceof WebAssembly[e(474)])return new WebAssembly.Instance(r)instanceof WebAssembly[e(623)]}}catch(e){}})();const q=H(490);H(711),H(683),H(749),H(490);const X=q===H(579);function Y(e,r){const t=J();return(Y=function(e,r){return t[e-=466]})(e,r)}function J(){const e=["setHours",'"12-31-2024"',"kSliceRSV_IRAP_VCL22","shadowRoot","webkit-3d","mouseup","demuxUseWorker","kSliceRSV_IRAP_VCL23","0 KB/s","Edge","assign","toDataURL","h265","stringify","keys","innerHTML","fullscreenElement","iFrame","replace","avc1.","image","sampleRate","revokeObjectURL","user-select","QHBrowser","random","display","application/hwepass2001.installepass2001","lineWidth",'"2.1.3"',"indexOf","-moz-user-select","h264","application/vnd.chromium.remoting-viewer","zIndex","hev2","line","-ms-user-select","srcElement","copyToChannel","dispatchEvent","imageSmoothingQuality","error","clientX","application/360softmgrplugin","createObjectURL","42526zettza","1158275BdAFZL","kSliceBLA_W_RADL","wcsDecodeAudio","createTextNode","solid","transferControlToOffscreen","html","result","right","string","apply","WebGLRenderingContext","f32-planar","setUint8","MediaStream","VideoDecoder","pageY","byteLength","getAttribute","100",'"development"',"setUint16","-webkit-touch-callout","77lzFNla","fillText","protocol","borderColor","div","useMSE","pow","https:","log","URL","webm","hour","document","repeat","left","crossOrigin","820btiaOy","isTypeSupported","xxxx","data","charAt","addModule","src","[object Number]","178GdGJez","content","style","map","-webkit-tap-highlight-color","360","parse","split","slice","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","hev5","rect","chrome","getTime","ManagedMediaSource","ALAW","body","167448fqpqVQ","click","mousedown","function","attachShadow","target","readyState","initEvent","strokeRect","498960GxmPAR","borderWidth","getUint8","imageSmoothingEnabled","9999999","call","subarray","href","RIFF","format","mousemove","object","Module","MouseEvents","createBuffer","getPropertyValue","wow32","localhost","round","mimeTypes","supported","isEnabled","floor","opera","fromCharCode","pointer-events: none !important; display: block !important","MediaSource","block",'"production"',"hev1.1.6.L120.90","font","-webkit-user-select","touchmove","[object Exception]","bottom","angle","save","toUpperCase",'video/mp4; codecs="',"hev4","length","download","charCodeAt","isConfigSupported","restore","drawImage","touches","second","VideoFrame","hev3","top","fontFamily","474AjnVIo",";base64","useOffscreen","px Arial","craNut","data:","sps","-webkit-text-size-adjust","ActiveXObject","filter","toFixed","[object DOMException]","audioWorklet","documentElement","buffer","toString","touchstart","overflow","green","keyFrame","opacity","fontSize","readAsArrayBuffer","test","scrollLeft","QQBrowser","VideoEncoder.isConfigSupported() result is not supported","AudioDecoder","backgroundColor","0 Bytes","userAgent","application/mozilla-npqihooquicklogin","numberOfChannels","close","getSeconds","application/vnd.apple.mpegurl","endsWith","visibility","safari","getDay","width","appendChild","setInt16","scrollTop","createElement","WebGL2RenderingContext","Anonymous","Worker","application/asx","GB/s","getFullYear","borderStyle","[object Error]","getMinutes","setInt32","hostname","MB/s","mozGetUserMedia","requestVideoFrameCallback","now","true","height","navigator","webkitGetUserMedia","Reserved SBR extensions is not implemented",'"delaytime"',"element","not compiled with thread support, using thread emulation","canConstructInDedicatedWorker","match","edge","msFullscreenElement","set","instantiate","text/javascript","copyright","nLp","hev","playbackRate","removeAttribute","file","AudioData","performance","PressureObserver","KB/s","createEvent","MULAW","color","getElementById","gpu","setAttribute","dataset","max","green yuv","join","none","image/png","pathname","experimental-webgl","setUint32","createImageBitmap","objectFit","360SE","setInt8","hidden","port","hash","onload","fillStyle","Instance","putImageData","absolute","min","failed to asynchronously prepare wasm","strokeStyle","status","connect","origin","paused","location","moz-webgl","noteOn","kSliceBLA_N_LP","img","If you want to help, upload a sample of this file to","destination","webgl2","substr","undefined","trim","substring","video","getDate","search","data-","container","Chrome","getUserMedia","3xPQEQi","removeChild","event","numberOfFrames","firefox","canvas","memory","onerror","atob","text","toLowerCase","type","TB/s","ended","quality","forEach","NaN","1943880qSwecS","11336TAqfxW","high","isFullscreen","pps","Opera","getContext","host","touchend","sequenceHeader","100%","webgl","px 宋体"];return(J=function(){return e})()}function Q(e){return e&&typeof e===H(796)}function Z(e){const r=H;return e[0]>>4===C[r(533)]&&e[1]===A[r(678)]}function K(e){return!0!==e&&e!==H(574)}function ee(e,r){const t=ne();return(ee=function(e,r){return t[e-=493]})(e,r)}const re=ee;!function(e,r){const t=ee,n=e();for(;;)try{if(687159===parseInt(t(507))/1+-parseInt(t(501))/2+-parseInt(t(499))/3*(-parseInt(t(504))/4)+parseInt(t(508))/5+-parseInt(t(498))/6*(-parseInt(t(500))/7)+-parseInt(t(503))/8*(-parseInt(t(495))/9)+parseInt(t(494))/10*(-parseInt(t(502))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ne);class te{on(e,r,t){const n=ee,o=this.e||(this.e={});return(o[e]||(o[e]=[]))[n(509)]({fn:r,ctx:t}),this}[re(505)](e,r,t){const n=this;function o(){const a=ee;n[a(493)](e,o);for(var i=arguments[a(506)],s=new Array(i),l=0;l1?n-1:0),a=1;a{delete n[e]})),void delete this.e;const o=n[e],a=[];if(o&&r)for(let e=0,n=o[t(506)];e=2&&!this[t(276)];)if(255==this[t(259)][this.parsedOffset]){if(!(!1&this[t(259)][this[t(256)]+1])){this.versionLayer=this[t(259)][this[t(256)]+1],this[t(260)]=se[t(262)],this[t(249)]=this[t(256)],this.parsedOffset+=2,e=!0;break}this[t(256)]++}else this[t(256)]++;if(e)continue;break}if(this[t(260)]==se[t(262)]){let e=!1;for(;this[t(259)].length-this[t(256)]>=2&&!this.isDestroyed;)if(255==this[t(259)][this[t(256)]]){if(this[t(259)][this.parsedOffset+1]==this.versionLayer){this[t(260)]=se[t(271)],this.secondStartCodeOffset=this.parsedOffset,this[t(256)]+=2,e=!0;break}this[t(256)]++}else this[t(256)]++;if(e)continue;break}if(this[t(260)]==se[t(271)]){let e=this.tempBuffer[t(264)](this[t(249)],this.secondStartCodeOffset);this[t(257)](t(275),e,r),this[t(259)]=this[t(259)][t(264)](this[t(267)]),this[t(249)]=0,this[t(256)]=2,this.state=se.findFirstStartCode}}}}const de=fe;function ue(){const e=["9544688PhQnVm","toFixed","4:4:4","4:2:0","High","40633630bSnvGP","Unknown","Baseline","getChromaFormatString","readBits","6dsxZBP","4:2:2","getLevelString","_skipScalingList","readBool","parseSPS$2","9czMYSP","avc1.","Extended","5554HOrxGH","destroy","subarray","readByte","2996919SpcLFe","High10","getProfileString","readSEG","123641Mxxakk","263Hjwmul","Main","parseSPS","_ebsp2rbsp","5617850NcHAEH","3003732UAdimP","High444","readUEG"];return(ue=function(){return e})()}!function(e,r){const t=fe,n=e();for(;;)try{if(744815===parseInt(t(418))/1*(parseInt(t(445))/2)+-parseInt(t(449))/3+-parseInt(t(423))/4+-parseInt(t(422))/5+-parseInt(t(436))/6*(-parseInt(t(417))/7)+-parseInt(t(426))/8+parseInt(t(442))/9*(parseInt(t(431))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ue);class ce{static _ebsp2rbsp(e){let r=e,t=r.byteLength,n=new Uint8Array(t),o=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(n[o]=r[e],o++);return new Uint8Array(n.buffer,0,o)}static[de(420)](e){const r=de;let t=ce[r(421)](e),n=new O(t);n.readByte();let o=n[r(448)]();n.readByte();let a=n[r(448)]();n[r(425)]();let i=ce.getProfileString(o),s=ce[r(438)](a),l=1,d=420,u=[0,420,422,444],c=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(l=n[r(425)](),3===l&&n[r(435)](1),l<=3&&(d=u[l]),c=n[r(425)]()+8,n[r(425)](),n[r(435)](1),n.readBool())){let e=3!==l?8:12;for(let t=0;t0&&e<16?(b=t[e-1],E=o[e-1]):255===e&&(b=n[r(448)]()<<8|n[r(448)](),E=n[r(448)]()<<8|n[r(448)]())}if(n.readBool()&&n[r(440)](),n[r(440)]()&&(n[r(435)](4),n[r(440)]()&&n[r(435)](24)),n[r(440)]()&&(n[r(425)](),n.readUEG()),n[r(440)]()){let e=n.readBits(32),t=n.readBits(32);S=n[r(440)](),A=t,C=2*e,k=A/C}}let P=1;(1!==b||1!==E)&&(P=b/E);let T=0,I=0;if(0===l)T=1,I=2-g;else{T=3===l?1:2,I=(1===l?2:1)*(2-g)}let F=16*(p+1),D=16*(m+1)*(2-g);F-=(v+y)*T,D-=(w+_)*I;let $=Math.ceil(F*P);return n[r(446)](),n=null,{profile_string:i,level_string:s,bit_depth:c,ref_frames:h,chroma_format:d,chroma_format_string:ce[r(434)](d),frame_rate:{fixed:S,fps:k,fps_den:C,fps_num:A},sar_ratio:{width:b,height:E},codec_size:{width:F,height:D},present_size:{width:$,height:D}}}static[de(441)](e){const r=de;let t=e[r(447)](1,4),n=r(443);for(let e=0;e<3;e++){let r=t[e].toString(16);r.length<2&&(r="0"+r),n+=r}let o=ce[r(421)](e),a=new O(o);a[r(448)]();let i=a.readByte();a[r(448)]();let s=a[r(448)]();a.readUEG();let l=ce.getProfileString(i),d=ce[r(438)](s),u=1,c=420,f=[0,420,422,444],h=8,p=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(u=a.readUEG(),3===u&&a[r(435)](1),u<=3&&(c=f[u]),h=a[r(425)]()+8,p=a[r(425)]()+8,a[r(435)](1),a[r(440)]())){let e=3!==u?8:12;for(let t=0;t0&&e<16?(S=t[e-1],A=n[e-1]):255===e&&(S=a[r(448)]()<<8|a[r(448)](),A=a[r(448)]()<<8|a[r(448)]())}if(a[r(440)]()&&a[r(440)](),a[r(440)]()&&(a[r(435)](4),a[r(440)]()&&a.readBits(24)),a[r(440)]()&&(a[r(425)](),a.readUEG()),a[r(440)]()){let e=a[r(435)](32),t=a.readBits(32);P=a[r(440)](),T=t,I=2*e,C=T/I}}let F=1;(1!==S||1!==A)&&(F=S/A);let D=0,$=0;if(0===u)D=1,$=2-w;else{D=3===u?1:2,$=(1===u?2:1)*(2-w)}let M=16*(v+1),R=16*(y+1)*(2-w);M-=(_+b)*D,R-=(E+k)*$;let B=Math.ceil(M*F);return a[r(446)](),a=null,{codec_mimetype:n,profile_idc:i,level_idc:s,profile_string:l,level_string:d,chroma_format_idc:u,bit_depth:h,bit_depth_luma:h,bit_depth_chroma:p,ref_frames:g,chroma_format:c,chroma_format_string:ce[r(434)](c),frame_rate:{fixed:P,fps:C,fps_den:I,fps_num:T},sar_ratio:{width:S,height:A},codec_size:{width:M,height:R},present_size:{width:B,height:R}}}static _skipScalingList(e,r){const t=de;let n=8,o=8,a=0;for(let i=0;i=this[r(353)])return this[r(347)]=!0,0;this[r(347)]=!1,n=this[r(351)]+e>8?8-this[r(351)]:e,t<<=n,t+=this.buffer[this[r(350)]]>>8-this.bufoff-n&255>>8-n,this.bufoff+=n,e-=n,8==this[r(351)]&&(this[r(350)]++,this[r(351)]=0)}return t}[pe(336)](e){const r=pe;let t=this.bufpos,n=this[r(351)],o=this[r(337)](e);return this.bufpos=t,this.bufoff=n,o}read_golomb(){const e=pe;let r;for(r=0;0===this.read(1)&&!this[e(347)];r++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),o=new Uint8Array(e+4);o[r(475)](n,0),o[r(475)](t[r(428)],4),t.sps=o}if(t[r(407)]){const e=t[r(407)][r(440)],n=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),o=new Uint8Array(e+4);o[r(475)](n,0),o[r(475)](t[r(407)],4),t.pps=o}return t}!function(e,r){const t=be,n=e();for(;;)try{if(899499===-parseInt(t(450))/1+parseInt(t(443))/2+-parseInt(t(415))/3+parseInt(t(416))/4*(parseInt(t(472))/5)+parseInt(t(463))/6*(-parseInt(t(457))/7)+-parseInt(t(481))/8*(parseInt(t(422))/9)+-parseInt(t(423))/10*(-parseInt(t(453))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ee);_e(429),_e(417);const Se=Ce;function Ae(){const e=["m_zeros","40DJueBg","40iOAJgv","32xhuXMF","m_len","GetBit","length","541792sSoocl","2081310oTxdkO","GetWord","GetSE","80406iZknGP","m_data","GetBYTE","m_bits","970587DgUqNO","m_idx","GetUE","5736199biydeT","6KYuLtu","760592Icmqnz","m_byte","2935713dIqxZy"];return(Ae=function(){return e})()}function Ce(e,r){const t=Ae();return(Ce=function(e,r){return t[e-=128]})(e,r)}!function(e,r){const t=Ce,n=e();for(;;)try{if(470019===-parseInt(t(150))/1+-parseInt(t(132))/2*(parseInt(t(141))/3)+-parseInt(t(137))/4+-parseInt(t(138))/5+-parseInt(t(149))/6*(-parseInt(t(148))/7)+parseInt(t(133))/8*(parseInt(t(145))/9)+parseInt(t(131))/10*(parseInt(t(129))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ae);Se(143),Se(135),Se(139),Se(147),Se(140);const Pe=Te;function Te(e,r){const t=Ie();return(Te=function(e,r){return t[e-=148]})(e,r)}!function(e,r){const t=Te,n=e();for(;;)try{if(854748===parseInt(t(151))/1+-parseInt(t(163))/2+parseInt(t(153))/3+-parseInt(t(154))/4*(parseInt(t(148))/5)+-parseInt(t(165))/6+-parseInt(t(155))/7*(parseInt(t(162))/8)+-parseInt(t(157))/9*(-parseInt(t(158))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ie);Pe(150);function Ie(){const e=["519208ycexmx","1270986GqfmdA","SPSParser chroma_format_idc > 3","3668646FZWfBC","5IQkmZU","SPSParser bit_depth_luma_minus8 != bit_depth_chroma_minus8","_ebsp2rbsp","107112MwbiiI","buffer","2120925MDPlXt","3810228YsYYRc","7PcVHPW","GetWord","20745477sXWBNk","10fRsYLi","warn","GetUE","byteLength"];return(Ie=function(){return e})()}function Fe(e,r){const t=De();return(Fe=function(e,r){return t[e-=180]})(e,r)}function De(){const e=["readBool","25myvvFD","min","hvc1.","readSEG","buffer","6FcmGuR","readUEG","310948ckwjMe","194407gBUPtJ","readByte","Unknown","984450nwFpws","40WOUTMm","2371688tsyGqb","4:4:4","59166uyYFGA","4:2:0","7sBtTBo","readBits","784068kGZOYG","626544PacRlr","push",".1.L"];return(De=function(){return e})()}!function(e,r){const t=Fe,n=e();for(;;)try{if(235351===-parseInt(t(199))/1+-parseInt(t(196))/2*(parseInt(t(182))/3)+-parseInt(t(198))/4*(-parseInt(t(191))/5)+parseInt(t(186))/6*(-parseInt(t(184))/7)+-parseInt(t(203))/8*(-parseInt(t(187))/9)+parseInt(t(202))/10+-parseInt(t(180))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(De);const $e=Me;function Me(e,r){const t=Be();return(Me=function(e,r){return t[e-=145]})(e,r)}!function(e,r){const t=Me,n=e();for(;;)try{if(769020===parseInt(t(161))/1*(parseInt(t(179))/2)+-parseInt(t(158))/3+parseInt(t(157))/4+-parseInt(t(164))/5+-parseInt(t(175))/6+-parseInt(t(176))/7*(-parseInt(t(177))/8)+-parseInt(t(169))/9*(parseInt(t(150))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Be);class Re{static[$e(170)](e){const r=$e;let t=e,n=t[r(149)],o=new Uint8Array(n),a=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(o[a]=t[e],a++);return new Uint8Array(o[r(155)],0,a)}static parseVPS(e){const r=$e;let t=Re[r(170)](e),n=new O(t);return n.readByte(),n[r(171)](),n[r(167)](4),n[r(167)](2),n[r(167)](6),{num_temporal_layers:n[r(167)](3)+1,temporal_id_nested:n[r(174)]()}}static parseSPS(e){const r=$e;let t=Re[r(170)](e),n=new O(t);n[r(171)](),n[r(171)]();let o=0,a=0,i=0,s=0;n.readBits(4);let l=n[r(167)](3);n.readBool();let d=n[r(167)](2),u=n.readBool(),c=n.readBits(5),f=n[r(171)](),h=n.readByte(),p=n[r(171)](),m=n[r(171)](),g=n[r(171)](),v=n.readByte(),y=n[r(171)](),w=n[r(171)](),_=n[r(171)](),b=n[r(171)](),E=n.readByte(),k=[],S=[];for(let e=0;e0)for(let e=l;e<8;e++)n.readBits(2);for(let e=0;e1&&n.readSEG();for(let e=0;e0&&e<=16?(B=t[e-1],U=o[e-1]):255===e&&(B=n[r(167)](16),U=n[r(167)](16))}if(n.readBool()&&n[r(174)](),n[r(174)]()){n[r(167)](3),n.readBool(),n[r(174)]()&&(n[r(171)](),n[r(171)](),n.readByte())}if(n[r(174)]()&&(n[r(147)](),n.readUEG()),n[r(174)](),n[r(174)](),n[r(174)](),M=n[r(174)](),M&&(n.readUEG(),n[r(147)](),n.readUEG(),n.readUEG()),n.readBool()){if(W=n.readBits(32),L=n.readBits(32),n[r(174)]()&&n[r(147)](),n[r(174)]()){let e=!1,t=!1,o=!1;e=n[r(174)](),t=n.readBool(),(e||t)&&(o=n.readBool(),o&&(n[r(171)](),n.readBits(5),n[r(174)](),n.readBits(5)),n[r(167)](4),n[r(167)](4),o&&n[r(167)](4),n[r(167)](5),n[r(167)](5),n[r(167)](5));for(let a=0;a<=l;a++){let a=n[r(174)]();x=a;let i=!0,s=1;!a&&(i=n.readBool());let l=!1;if(i?n.readUEG():l=n[r(174)](),!l&&(s=n[r(147)]()+1),e){for(let e=0;e0)for(let r=t;r<8;r++)e[n(347)](2);o[n(381)]=[],o[n(433)]=[],o.sub_layer_profile_idc=[],o.sub_layer_profile_compatibility_flag=[],o[n(333)]=[],o.sub_layer_interlaced_source_flag=[],o[n(303)]=[],o[n(337)]=[],o.sub_layer_level_idc=[];for(let r=0;r ","setCodecAudio","audioRemain","wasmWidthOrHeightChange","AAC","wasmDecodeErrorStartTime",",\n new width is ","5136fcBxBG","ModuleAudio","data","h264","_opt","decodeAudio","setCodecVideo: SIMD H264 decode video width is too large, width is ","yuvData, isVideoFirstIFrame is false and return","TAG_NAME","yuvData ts ","45IsnTpd","h265"," and packetType is ",", height is ","tempAudioBuffer"," and maxDiff is ","setCodec","audioInfo","MP3","initAudio","MULAW","audioCode","1440520VJOZCe","setCodecVideo: hasInitVideoCodec is false, codecId is ","worker","codecWidth","newDecodedVideoFrameTimestamp","sampleRate","decodeVideo first frame is not iFrame","timeEnd","HEAPF32","audioDecoder","audioChannels",", height: ","validatedFailed, please contact the author to get the correct license","34770WVchEh","toString","4837iQZkqc","codecHeight","videoDecoder","853243vUwxxf","videoWidth","decodeAudio, decoder is destroyed and return","pcmData"," _opt.sampleRate is ","mp3Demuxer","notSupportNewWasm","clear","ALAW","emit","delete","useSIMD","_reset","decodeVideo","HEAPU32","ModuleVideo","getBuildTime","13lYxfFb","setCodecAudio: init audio codec, codeId is ","audioOutputArray",", new height is "," and diff is ","videoCode","dispatch","simdDecodeError",",\n and emit change event","2375AKgJHM","byteLength","50TBxlQl","\n decodeVideo: video width or height is changed,\n old width is ","setCodecVideo: init video codec , codecId is ","_handleModuleAudioError"," and isIFrame is ","setCodecVideo","playAudio","decodeVideo: hasInitVideoCodec is false, codecId is ","HEAPU8","audio wasm error:","initVideo","audioDepth","iframeIntervalTimestamp"];return(Ve=function(){return e})()}!function(e,r){const t=je,n=e();for(;;)try{if(896520===-parseInt(t(168))/1+-parseInt(t(163))/2*(-parseInt(t(225))/3)+parseInt(t(256))/4*(-parseInt(t(194))/5)+parseInt(t(219))/6*(-parseInt(t(165))/7)+-parseInt(t(150))/8*(-parseInt(t(138))/9)+-parseInt(t(196))/10*(-parseInt(t(228))/11)+-parseInt(t(243))/12*(-parseInt(t(185))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ve);class ze extends te{constructor(e){const r=je;let t=arguments[r(220)]>1&&void 0!==arguments[1]?arguments[1]:{};super(),this[r(240)]=e,this[r(132)]=t,this[r(136)]=r(232),this[r(180)](),this[r(244)]=t.audioBufferSize||1024,this[r(155)]=t.sampleRate||44100,this.ModuleAudio=null,this[r(183)]=null,this[r(167)]=null,this.audioDecoder=null,this.isVideoFirstIFrame=!!K(e[r(132)].checkFirstIFrame),this[r(246)]()}[Le(216)](){const e=Le;if(this[e(230)](),this[e(159)]){try{Q(this[e(159)][e(175)])&&this[e(159)][e(175)](),Q(this[e(159)][e(178)])&&this[e(159)].delete()}catch(e){}this[e(159)]=null}if(this[e(167)]){try{Q(this[e(167)][e(175)])&&this[e(167)][e(175)](),Q(this[e(167)][e(178)])&&this[e(167)][e(178)]()}catch(e){}this[e(167)]=null}this.mp3Demuxer&&(this[e(173)][e(216)](),this[e(173)]=null),this[e(180)](),this[e(240)].debugLog(this[e(136)],e(216))}[Le(246)](){}[Le(199)](e){const r=Le;(function(e){const r=H;return!(!e||-1===e[r(712)]("not compiled with thread support")&&-1===e[r(712)]("illegal icc")&&-1===e[r(712)](r(638))&&-1===e[r(712)](r(578)))})(e)||this[r(240)].debugError(this.TAG_NAME,r(205),e)}[Le(245)](e){const r=Le;(function(e){const r=H;return!(!e||-1===e.indexOf(r(581)))})(e)||(this[r(240)][r(231)](this.TAG_NAME,"video wasm error:",e),K(function(e){const r=H;let t=!0;return e&&-1!==e.indexOf(r(627))&&(t=!1),t}(e))&&this.emit(w[r(174)],e))}_reset(){const e=Le;this.audioDecoder=null,this[e(167)]=null,this[e(244)]=null,this.videoWidth=0,this[e(209)]=0,this[e(160)]=0,this[e(207)]=0,this[e(224)]=!1,this[e(211)]=!1,this.mp3Demuxer=null,this[e(234)]=!1,this[e(242)]=!1,this.isSimdDecodeError=!1,this[e(218)]=0,this[e(254)]=null,this[e(154)]=0,this.audioRemain=0,this[e(208)]=0,this[e(187)]=[],this[e(142)]=[]}[Le(201)](e,r){const t=Le,n=15&e[0],o=this.player;if(K(this[t(167)]&&Q(this.videoDecoder.setCodec)))o.debugError(this.TAG_NAME,"setCodecVideo, videoDecoder is not exist or setCodec is not a function");else if(Z(e))if(n===b[t(259)]||n===b[t(139)]){o[t(229)](this[t(136)],t(198)+n);const r=e[t(239)](5);if(n===b[t(259)]&&o._opt[t(179)]){const e=ke(r);if(e[t(153)]>v||e[t(166)]>v)return this[t(177)](w.simdH264DecodeVideoWidthIsTooLarge,"width: "+e[t(153)]+" > "+v+t(161)+e[t(166)]+t(249)+v),void o[t(235)](this[t(136)],t(134)+e.codecWidth+t(141)+e[t(166)])}const a=new Uint8Array(e);this[t(211)]=!0,this[t(167)][t(144)](n,r,this.getBuildTime()),this.emit(w[t(190)],{code:n}),this.emit(w[t(227)],{buffer:a,codecId:n})}else o[t(235)](this.TAG_NAME,t(151)+n+t(213));else o[t(235)](this.TAG_NAME,t(203)+n+t(200)+r+t(140)+e[1])}[Le(250)](e,r){const t=Le,n=e[0]>>4,o=e[0]>>1&1;if(n===E.AAC?this.audioDepth=o?16:8:this[t(207)]=0===o?8:16,K(this[t(159)]&&Q(this[t(159)][t(144)])))return void this[t(240)][t(231)](this[t(136)],"setCodecAudio, audioDecoder is not exist or setCodec is not a function");const a=this.player;if(j(e)||n===E[t(176)]||n===E[t(148)]||n===E.MP3){this[t(240)][t(229)](this.TAG_NAME,t(186)+n+t(172)+this[t(155)]);const o=n===E[t(253)]?e.slice(2):new Uint8Array(0);if(this[t(159)].setCodec(n,this.sampleRate,o,this[t(184)]()),n===E.AAC&&this[t(177)](w.audioAACSequenceHeader,{buffer:o}),this[t(224)]=!0,n!==E[t(253)]&&(n===E.MP3?(!this[t(173)]&&(this[t(173)]=new le(this),this[t(173)].on(t(258),((e,r)=>{const n=t;this.audioDecoder[n(214)](e,r)}))),this[t(173)][t(191)](e.slice(1),r)):this[t(159)].decode(e[t(239)](1),r)),K(X)){const e=Number("1")||1;setTimeout((()=>{const e=t;this[e(240)].debugError(this[e(136)],"Jb pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),this[e(216)](),this[e(177)](w[e(241)])}),60*e*60*1e3)}}else a[t(235)](this[t(136)],t(223),n)}[Le(133)](e,r){const t=Le;if(this[t(240)][t(217)]())return void this.player.debugLog(this.TAG_NAME,t(170));const n=e[0]>>4;if(this.hasInitAudioCodec){if(j(e))return void this[t(240)].debugLog(this.TAG_NAME,"decodeAudio and has already initialized and payload is aac codec packet so drop this frame");n===E[t(146)]?this[t(173)][t(191)](e.slice(1),r):this[t(159)][t(214)](n===E.AAC?e.slice(2):e[t(239)](1),r)}else this[t(250)](e,r)}[Le(181)](e,r,t){const n=Le;if(n(220),this[n(240)].isDestroyed())this[n(240)][n(229)](this.TAG_NAME,n(237));else if(this[n(211)])if(!this.isVideoFirstIFrame&&t&&(this[n(234)]=!0),this.isVideoFirstIFrame){if(t&&Z(e)){const r=15&e[0];let t={};if(r===b[n(259)]){t=ke(e[n(239)](5))}else r===b.h265&&(t=function(e){const r=Ue;let t={codecWidth:0,codecHeight:0,videoType:S.h265};t[r(305)]=0,t[r(399)]=0,t[r(431)]=0,t.level=0,e=e[r(296)](5);do{let n={};if(e[r(377)]<23){console[r(373)](r(361),r(357)+e[r(377)]+r(304));break}if(n[r(329)]=e[0],1!=n[r(329)])break;n.general_profile_space=e[1]>>6&3,n[r(417)]=e[1]>>5&1,n[r(406)]=31&e[1],n[r(371)]=e[2]<<24|e[3]<<16|e[4]<<8|e[5],n[r(332)]=e[6]<<24|e[7]<<16|e[8]<<8|e[9],n.general_constraint_indicator_flags=n[r(332)]<<16|e[10]<<8|e[11],n[r(407)]=e[12],n.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],n[r(359)]=3&e[15],n[r(405)]=3&e[16],n[r(413)]=7&e[17],n[r(400)]=7&e[18],n[r(343)]=e[19]<<8|e[20],n[r(311)]=e[21]>>6&3,n[r(393)]=e[21]>>3&7,n[r(367)]=e[21]>>2&1,n[r(302)]=3&e[21];let o=e[22],a=e[r(296)](23);for(let e=0;e"+t[n(153)]+", height: "+this.videoHeight+"->"+t[n(166)]))}if(this[n(242)])return void this[n(240)][n(235)](this[n(136)],n(215));if(this[n(233)])return void this.player[n(235)](this[n(136)],"decodeVideo: simd decode error, and return");if(Z(e))return void this[n(240)][n(229)](this[n(136)],"decodeVideo and payload is video sequence header so drop this frame");if(e[n(195)]<12)return void this.player[n(235)](this[n(136)],n(247)+e.byteLength);this[n(218)]=r;const o=e.slice(5);this[n(167)][n(214)](o,t?1:0,r)}else this[n(240)].debugLog(this.TAG_NAME,n(156));else this.setCodecVideo(e,t)}[Le(236)](e,r,t){const n=Le;this[n(177)](w[n(190)],{code:e}),this[n(177)](w[n(206)],{w:r,h:t}),this[n(169)]=r,this[n(209)]=t}[Le(145)](e,r,t){const n=Le;this.emit(w[n(149)],{code:e}),this.emit(w[n(147)],{sampleRate:r,channels:t,depth:this[n(207)]}),this[n(160)]=t}[Le(221)](e,r){const t=Le;if(this.player[t(217)]())return void this[t(240)][t(229)](this[t(136)],t(226));if(K(this.isVideoFirstIFrame))return void this[t(240)][t(229)](this[t(136)],t(135));const n=this[t(169)]*this[t(209)]*3/2;try{let o=this[t(183)][t(204)].subarray(e,e+n),a=new Uint8Array(o);this[t(254)]=null,this[t(154)]=r,this[t(177)](w[t(212)],{output:a,ts:r})}catch(e){this[t(240)][t(235)](this[t(136)],t(137)+r+" create uint8Array error :",e,e[t(164)]())}}[Le(171)](e,r,t){const n=Le;if(this[n(240)][n(217)]())return void this[n(240)][n(229)](this.TAG_NAME,"pcmData, decoder is destroyed and return");let o=r,a=[],i=0;try{let s=this.audioBufferSize;for(let r=0;r<2;r++){let t=this[n(257)][n(182)][(e>>2)+r]>>2;a[r]=this[n(257)][n(158)][n(248)](t,t+o)}if(this[n(251)]){if(!(o>=(r=s-this.audioRemain)))return this[n(251)]+=o,this.tempAudioBuffer[0]=Float32Array.of(...this[n(142)][0],...a[0]),void(2==this[n(160)]&&(this.tempAudioBuffer[1]=Float32Array.of(...this[n(142)][1],...a[1])));this[n(187)][0]=Float32Array.of(...this[n(142)][0],...a[0][n(248)](0,r)),2==this[n(160)]&&(this[n(187)][1]=Float32Array.of(...this[n(142)][1],...a[1][n(248)](0,r))),this[n(177)](w[n(202)],{buffer:this[n(187)],ts:t}),i=r,o-=r}for(this[n(251)]=o;this[n(251)]>=s;this.audioRemain-=s)this[n(187)][0]=a[0][n(239)](i,i+=s),2==this[n(160)]&&(this.audioOutputArray[1]=a[1][n(239)](i-s,i)),this.emit(w[n(202)],{buffer:this[n(187)],ts:t});this[n(251)]&&(this.tempAudioBuffer[0]=a[0][n(239)](i),2==this.audioChannels&&(this[n(142)][1]=a[1][n(239)](i))),a=[]}catch(e){this[n(240)][n(235)](n(152),"pcmData ts "+t+" create uint8Array error :",e,e[n(164)]())}}errorInfo(e){const r=Le;null===this[r(254)]&&(this[r(254)]=G());const t=G(),n=function(e,r,t){const n=Y;return Math[n(606)](Math[n(626)](e,Math[n(606)](r,t)),Math[n(626)](r,t))}(this.iframeIntervalTimestamp>0?2*this[r(208)]:5e3,1e3,5e3),o=t-this[r(254)];o>n&&(this[r(240)].debugWarn(this[r(136)],r(222)+this[r(208)]+r(189)+o+r(143)+n+"\n and replay"),this.isSimdDecodeError=!0,this.emit(w[r(192)]))}[Le(184)](){return m+"-"+g}[Le(157)](){const e=Le;this[e(240)].debugError(this[e(136)],e(210)),this[e(216)](),this[e(177)](w[e(241)])}validatedFailed(){const e=Le;this[e(240)][e(231)](this.TAG_NAME,e(162))}}const Ne=He;function He(e,r){const t=Ge();return(He=function(e,r){return t[e-=312]})(e,r)}function Ge(){const e=["642952NklTtD","49vPBUbq","13974348VvbYqV","MtFSimdDecoder","VideoDecoder","4655034nQFOHD","454025XcIHVy","73459gohVFH","debugLog","20juONJs","ModuleVideo","JessibucaProMtFSimdDecoder","toString","521556lPtfmR","_handleModuleVideoError","8KHyktY","fSimd","TAG_NAME","debugError","emit","player","mtType","6JuwVoP","bind","then","_handleModuleAudioError","init","videoDecoder","init wasm error","push","1391946BFSDsx","5wiVESz"];return(Ge=function(){return e})()}!function(e,r){const t=He,n=e();for(;;)try{if(310726===parseInt(t(336))/1*(-parseInt(t(319))/2)+-parseInt(t(327))/3+-parseInt(t(329))/4*(parseInt(t(328))/5)+parseInt(t(342))/6*(-parseInt(t(330))/7)+parseInt(t(312))/8*(parseInt(t(334))/9)+-parseInt(t(338))/10*(-parseInt(t(335))/11)+parseInt(t(331))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);class qe extends ze{constructor(e){const r=He;super(e),this.TAG_NAME=r(332),this[r(318)]=T[r(313)]}[Ne(323)](){const e=Ne,n=[];n[e(326)](t({printErr:this[e(322)][e(320)](this)}),r({printErr:this[e(343)][e(320)](this)})),Promise.all(n)[e(321)]((r=>{const t=e;let[n,o]=r;this.ModuleAudio=n,this[t(339)]=o,o[t(333)]&&(this[t(324)]=new(o[t(333)])(this)),n.AudioDecoder&&(this.audioDecoder=new n.AudioDecoder(this)),this[t(316)](w.init),this[t(317)][t(337)](this[t(314)],"init")})).catch((r=>{const t=e;this[t(317)][t(315)](this[t(314)],t(325),r,r[t(341)]())}))}}window[Ne(340)]=qe})); diff --git a/ui/decoder-pro-f-simd.js b/ui/decoder-pro-f-simd.js new file mode 100644 index 0000000..93095e5 --- /dev/null +++ b/ui/decoder-pro-f-simd.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).crypto$1)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r,n=t(e),s=(r="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd.js",document.baseURI).href,async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,n,i;(i=e).ready=new Promise(((e,r)=>{t=e,n=r})),(i=void 0!==i?i:{}).locateFile=function(e,t){return"decoder-pro-f-simd.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_F_SIMD_WASM_URL&&""!=JESSIBUCA_PRO_F_SIMD_WASM_URL?JESSIBUCA_PRO_F_SIMD_WASM_URL:t+e};var s,o,a,c=Object.assign({},i),u="./this.program",l="object"==typeof window,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";function p(e){return i.locateFile?i.locateFile(e,f):f+e}if(h){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd.js",document.baseURI).href),v=m("fs"),y=m("path");f=d?y.dirname(f)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd.js",document.baseURI).href)),s=(e,t)=>(e=Z(e)?new URL(e):y.normalize(e),v.readFileSync(e,t?void 0:"utf8")),a=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},o=function(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=Z(e)?new URL(e):y.normalize(e),v.readFile(e,n?void 0:"utf8",((e,i)=>{e?r(e):t(n?i.buffer:i)}))},!i.thisProgram&&process.argv.length>1&&(u=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),i.inspect=()=>"[Emscripten Module object]"}else(l||d)&&(d?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),r&&(f=r),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var g,_,w=i.print||console.log.bind(console),b=i.printErr||console.error.bind(console);Object.assign(i,c),c=null,i.arguments&&i.arguments,i.thisProgram&&(u=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(g=i.wasmBinary),"object"!=typeof WebAssembly&&G("no native wasm support detected");var S,E,I,k,A,C,T,x,D=!1;function P(e,t){e||G(t)}function B(){var e=_.buffer;i.HEAP8=S=new Int8Array(e),i.HEAP16=I=new Int16Array(e),i.HEAPU8=E=new Uint8Array(e),i.HEAPU16=k=new Uint16Array(e),i.HEAP32=A=new Int32Array(e),i.HEAPU32=C=new Uint32Array(e),i.HEAPF32=T=new Float32Array(e),i.HEAPF64=x=new Float64Array(e)}var M=[],F=[],U=[];function R(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)z(i.preRun.shift());ie(M)}function L(){i.noFSInit||xe.init.initialized||xe.init(),xe.ignorePermissions=!1,ie(F)}function O(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)H(i.postRun.shift());ie(U)}function z(e){M.unshift(e)}function N(e){F.unshift(e)}function H(e){U.unshift(e)}var j=0,V=null;function W(e){j++,i.monitorRunDependencies&&i.monitorRunDependencies(j)}function $(e){if(j--,i.monitorRunDependencies&&i.monitorRunDependencies(j),0==j&&V){var t=V;V=null,t()}}function G(e){i.onAbort&&i.onAbort(e),b(e="Aborted("+e+")"),D=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var q,Y,K,X="data:application/octet-stream;base64,",J=e=>e.startsWith(X),Z=e=>e.startsWith("file://");function Q(e){if(e==q&&g)return new Uint8Array(g);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!g&&(l||d)){if("function"==typeof fetch&&!Z(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(o)return new Promise(((t,r)=>{o(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{b(`failed to asynchronously prepare wasm: ${e}`),G(e)}))}function re(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||J(t)||Z(t)||h||"function"!=typeof fetch?te(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return b(`wasm streaming compile failed: ${e}`),b("falling back to ArrayBuffer instantiation"),te(t,r,n)}))))}function ne(){var e={a:fn};function t(e,t){return pn=e.exports,_=pn.G,B(),Mt=pn.K,N(pn.H),$(),pn}if(W(),i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){b(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return re(g,q,e,(function(e){t(e.instance)})).catch(n),{}}i.locateFile?J(q="decoder-pro-f-simd.wasm")||(q=p(q)):q=new URL("decoder-pro-f-simd.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd.js",document.baseURI).href).href;var ie=e=>{for(;e.length>0;)e.shift()(i)};function se(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,S[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=S[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,S[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=S[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(_n(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var oe=(e,t,r)=>{throw new se(e).init(t,r),e},ae=e=>(A[yn()>>2]=e,e),ce={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=ce.isAbs(e),r="/"===e.substr(-1);return(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ce.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ce.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ce.normalize(e.join("/"))},join2:(e,t)=>ce.normalize(e+"/"+t)},ue=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(h)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}G("initRandomDevice")},le=e=>(le=ue())(e),de={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:xe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=ce.isAbs(n)}return(t?"/":"")+(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=de.resolve(e).substr(1),t=de.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),s=Math.min(n.length,i.length),o=s,a=0;a{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&he)return he.decode(e.subarray(t,i));for(var s="";t>10,56320|1023&u)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s},pe=[],me=e=>{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},ve=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,s=r+n-1,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i};function ye(e,t,r){var n=r>0?r:me(e)+1,i=new Array(n),s=ve(e,i,0,i.length);return t&&(i.length=s),i}var ge=()=>{if(!pe.length){var e=null;if(h){var t=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=v.readSync(n,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ye(e,!0)}return pe.shift()},_e={ttys:[],init(){},shutdown(){},register(e,t){_e.ttys[e]={input:[],output:[],ops:t},xe.registerDevice(e,_e.stream_ops)},stream_ops:{open(e){var t=_e.ttys[e.node.rdev];if(!t)throw new xe.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new xe.ErrnoError(60);for(var s=0,o=0;oge(),put_char(e,t){null===t||10===t?(w(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(b(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(fe(e.output,0)),e.output=[])}}},we=e=>{G()},be={ops_table:null,mount:e=>be.createNode(null,"/",16895,0),createNode(e,t,r,n){if(xe.isBlkdev(r)||xe.isFIFO(r))throw new xe.ErrnoError(63);be.ops_table||(be.ops_table={dir:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,lookup:be.node_ops.lookup,mknod:be.node_ops.mknod,rename:be.node_ops.rename,unlink:be.node_ops.unlink,rmdir:be.node_ops.rmdir,readdir:be.node_ops.readdir,symlink:be.node_ops.symlink},stream:{llseek:be.stream_ops.llseek}},file:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:{llseek:be.stream_ops.llseek,read:be.stream_ops.read,write:be.stream_ops.write,allocate:be.stream_ops.allocate,mmap:be.stream_ops.mmap,msync:be.stream_ops.msync}},link:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,readlink:be.node_ops.readlink},stream:{}},chrdev:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:xe.chrdev_stream_ops}});var i=xe.createNode(e,t,r,n);return xe.isDir(i.mode)?(i.node_ops=be.ops_table.dir.node,i.stream_ops=be.ops_table.dir.stream,i.contents={}):xe.isFile(i.mode)?(i.node_ops=be.ops_table.file.node,i.stream_ops=be.ops_table.file.stream,i.usedBytes=0,i.contents=null):xe.isLink(i.mode)?(i.node_ops=be.ops_table.link.node,i.stream_ops=be.ops_table.link.stream):xe.isChrdev(i.mode)&&(i.node_ops=be.ops_table.chrdev.node,i.stream_ops=be.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=xe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,xe.isDir(e.mode)?t.size=4096:xe.isFile(e.mode)?t.size=e.usedBytes:xe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&be.resizeFileStorage(e,t.size)},lookup(e,t){throw xe.genericErrors[44]},mknod:(e,t,r,n)=>be.createNode(e,t,r,n),rename(e,t,r){if(xe.isDir(e.mode)){var n;try{n=xe.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new xe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=xe.lookupNode(e,t);for(var n in r.contents)throw new xe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=be.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!xe.isLink(e.mode))throw new xe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,i){var s=e.node.contents;if(i>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-i,n);if(o>8&&s.subarray)t.set(s.subarray(i,i+o),r);else for(var a=0;a0||r+t(be.stream_ops.write(e,t,0,n,r,!1),0)}},Se=(e,t,r,n)=>{var i=n?"":`al ${e}`;o(e,(r=>{P(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),i&&$()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&W()},Ee=(e,t,r,n,i,s)=>{xe.createDataFile(e,t,r,n,i,s)},Ie=i.preloadPlugins||[],ke=(e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return Ie.forEach((s=>{i||s.canHandle(t)&&(s.handle(e,t,r,n),i=!0)})),i},Ae=(e,t,r,n,i,s,o,a,c,u)=>{var l=t?de.resolve(ce.join2(e,t)):e;function d(r){function d(r){u&&u(),a||Ee(e,t,r,n,i,c),s&&s(),$()}ke(r,l,d,(()=>{o&&o(),$()}))||d(r)}W(),"string"==typeof r?Se(r,(e=>d(e)),o):d(r)},Ce=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Te=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},xe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=de.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new xe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=xe.root,i="/",s=0;s40)throw new xe.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(xe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n>>0)%xe.nameTable.length},hashAddNode(e){var t=xe.hashName(e.parent.id,e.name);e.name_next=xe.nameTable[t],xe.nameTable[t]=e},hashRemoveNode(e){var t=xe.hashName(e.parent.id,e.name);if(xe.nameTable[t]===e)xe.nameTable[t]=e.name_next;else for(var r=xe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=xe.mayLookup(e);if(r)throw new xe.ErrnoError(r,e);for(var n=xe.hashName(e.id,t),i=xe.nameTable[n];i;i=i.name_next){var s=i.name;if(i.parent.id===e.id&&s===t)return i}return xe.lookup(e,t)},createNode(e,t,r,n){var i=new xe.FSNode(e,t,r,n);return xe.hashAddNode(i),i},destroyNode(e){xe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>xe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=xe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return xe.lookupNode(e,t),20}catch(e){}return xe.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=xe.lookupNode(e,t)}catch(e){return e.errno}var i=xe.nodePermissions(e,"wx");if(i)return i;if(r){if(!xe.isDir(n.mode))return 54;if(xe.isRoot(n)||xe.getPath(n)===xe.cwd())return 10}else if(xe.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?xe.isLink(e.mode)?32:xe.isDir(e.mode)&&("r"!==xe.flagsToPermissionString(t)||512&t)?31:xe.nodePermissions(e,xe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=xe.MAX_OPEN_FDS;e++)if(!xe.streams[e])return e;throw new xe.ErrnoError(33)},getStreamChecked(e){var t=xe.getStream(e);if(!t)throw new xe.ErrnoError(8);return t},getStream:e=>xe.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return xe.FSStream||(xe.FSStream=function(){this.shared={}},xe.FSStream.prototype={},Object.defineProperties(xe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new xe.FSStream,e),-1==t&&(t=xe.nextfd()),e.fd=t,xe.streams[t]=e,e},closeStream(e){xe.streams[e]=null},chrdev_stream_ops:{open(e){var t=xe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new xe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){xe.devices[e]={stream_ops:t}},getDevice:e=>xe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),xe.syncFSRequests++,xe.syncFSRequests>1&&b(`warning: ${xe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=xe.getMounts(xe.root.mount),n=0;function i(e){return xe.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var n,i="/"===r,s=!r;if(i&&xe.root)throw new xe.ErrnoError(10);if(!i&&!s){var o=xe.lookupPath(r,{follow_mount:!1});if(r=o.path,n=o.node,xe.isMountpoint(n))throw new xe.ErrnoError(10);if(!xe.isDir(n.mode))throw new xe.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(a);return c.mount=a,a.root=c,i?xe.root=c:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),c},unmount(e){var t=xe.lookupPath(e,{follow_mount:!1});if(!xe.isMountpoint(t.node))throw new xe.ErrnoError(28);var r=t.node,n=r.mounted,i=xe.getMounts(n);Object.keys(xe.nameTable).forEach((e=>{for(var t=xe.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&xe.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(n);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=xe.lookupPath(e,{parent:!0}).node,i=ce.basename(e);if(!i||"."===i||".."===i)throw new xe.ErrnoError(28);var s=xe.mayCreate(n,i);if(s)throw new xe.ErrnoError(s);if(!n.node_ops.mknod)throw new xe.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,xe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,xe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",i=0;i(void 0===r&&(r=t,t=438),t|=8192,xe.mknod(e,t,r)),symlink(e,t){if(!de.resolve(e))throw new xe.ErrnoError(44);var r=xe.lookupPath(t,{parent:!0}).node;if(!r)throw new xe.ErrnoError(44);var n=ce.basename(t),i=xe.mayCreate(r,n);if(i)throw new xe.ErrnoError(i);if(!r.node_ops.symlink)throw new xe.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=ce.dirname(e),s=ce.dirname(t),o=ce.basename(e),a=ce.basename(t);if(r=xe.lookupPath(e,{parent:!0}).node,n=xe.lookupPath(t,{parent:!0}).node,!r||!n)throw new xe.ErrnoError(44);if(r.mount!==n.mount)throw new xe.ErrnoError(75);var c,u=xe.lookupNode(r,o),l=de.relative(e,s);if("."!==l.charAt(0))throw new xe.ErrnoError(28);if("."!==(l=de.relative(t,i)).charAt(0))throw new xe.ErrnoError(55);try{c=xe.lookupNode(n,a)}catch(e){}if(u!==c){var d=xe.isDir(u.mode),h=xe.mayDelete(r,o,d);if(h)throw new xe.ErrnoError(h);if(h=c?xe.mayDelete(n,a,d):xe.mayCreate(n,a))throw new xe.ErrnoError(h);if(!r.node_ops.rename)throw new xe.ErrnoError(63);if(xe.isMountpoint(u)||c&&xe.isMountpoint(c))throw new xe.ErrnoError(10);if(n!==r&&(h=xe.nodePermissions(r,"w")))throw new xe.ErrnoError(h);xe.hashRemoveNode(u);try{r.node_ops.rename(u,n,a)}catch(e){throw e}finally{xe.hashAddNode(u)}}},rmdir(e){var t=xe.lookupPath(e,{parent:!0}).node,r=ce.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!0);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.rmdir)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.rmdir(t,r),xe.destroyNode(n)},readdir(e){var t=xe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new xe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=xe.lookupPath(e,{parent:!0}).node;if(!t)throw new xe.ErrnoError(44);var r=ce.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!1);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.unlink)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.unlink(t,r),xe.destroyNode(n)},readlink(e){var t=xe.lookupPath(e).node;if(!t)throw new xe.ErrnoError(44);if(!t.node_ops.readlink)throw new xe.ErrnoError(28);return de.resolve(xe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=xe.lookupPath(e,{follow:!t}).node;if(!r)throw new xe.ErrnoError(44);if(!r.node_ops.getattr)throw new xe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>xe.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?xe.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new xe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){xe.chmod(e,t,!0)},fchmod(e,t){var r=xe.getStreamChecked(e);xe.chmod(r.node,t)},chown(e,t,r,n){var i;if(!(i="string"==typeof e?xe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new xe.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){xe.chown(e,t,r,!0)},fchown(e,t,r){var n=xe.getStreamChecked(e);xe.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new xe.ErrnoError(28);var r;if(!(r="string"==typeof e?xe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new xe.ErrnoError(63);if(xe.isDir(r.mode))throw new xe.ErrnoError(31);if(!xe.isFile(r.mode))throw new xe.ErrnoError(28);var n=xe.nodePermissions(r,"w");if(n)throw new xe.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=xe.getStreamChecked(e);if(0==(2097155&r.flags))throw new xe.ErrnoError(28);xe.truncate(r.node,t)},utime(e,t,r){var n=xe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new xe.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Ce(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=ce.normalize(e);try{n=xe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(n){if(128&t)throw new xe.ErrnoError(20)}else n=xe.mknod(e,r,0),s=!0;if(!n)throw new xe.ErrnoError(44);if(xe.isChrdev(n.mode)&&(t&=-513),65536&t&&!xe.isDir(n.mode))throw new xe.ErrnoError(54);if(!s){var o=xe.mayOpen(n,t);if(o)throw new xe.ErrnoError(o)}512&t&&!s&&xe.truncate(n,0),t&=-131713;var a=xe.createStream({node:n,path:xe.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!i.logReadFiles||1&t||(xe.readFiles||(xe.readFiles={}),e in xe.readFiles||(xe.readFiles[e]=1)),a},close(e){if(xe.isClosed(e))throw new xe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{xe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new xe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new xe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,i){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(1==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.read)throw new xe.ErrnoError(28);var s=void 0!==i;if(s){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var o=e.stream_ops.read(e,t,r,n,i);return s||(e.position+=o),o},write(e,t,r,n,i,s){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.write)throw new xe.ErrnoError(28);e.seekable&&1024&e.flags&&xe.llseek(e,0,2);var o=void 0!==i;if(o){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var a=e.stream_ops.write(e,t,r,n,i,s);return o||(e.position+=a),a},allocate(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(t<0||r<=0)throw new xe.ErrnoError(28);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(!xe.isFile(e.node.mode)&&!xe.isDir(e.node.mode))throw new xe.ErrnoError(43);if(!e.stream_ops.allocate)throw new xe.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new xe.ErrnoError(2);if(1==(2097155&e.flags))throw new xe.ErrnoError(2);if(!e.stream_ops.mmap)throw new xe.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new xe.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=xe.open(e,t.flags),i=xe.stat(e).size,s=new Uint8Array(i);return xe.read(n,s,0,i,0),"utf8"===t.encoding?r=fe(s,0):"binary"===t.encoding&&(r=s),xe.close(n),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var n=xe.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(me(t)+1),s=ve(t,i,0,i.length);xe.write(n,i,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");xe.write(n,t,0,t.byteLength,void 0,r.canOwn)}xe.close(n)},cwd:()=>xe.currentPath,chdir(e){var t=xe.lookupPath(e,{follow:!0});if(null===t.node)throw new xe.ErrnoError(44);if(!xe.isDir(t.node.mode))throw new xe.ErrnoError(54);var r=xe.nodePermissions(t.node,"x");if(r)throw new xe.ErrnoError(r);xe.currentPath=t.path},createDefaultDirectories(){xe.mkdir("/tmp"),xe.mkdir("/home"),xe.mkdir("/home/web_user")},createDefaultDevices(){xe.mkdir("/dev"),xe.registerDevice(xe.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),xe.mkdev("/dev/null",xe.makedev(1,3)),_e.register(xe.makedev(5,0),_e.default_tty_ops),_e.register(xe.makedev(6,0),_e.default_tty1_ops),xe.mkdev("/dev/tty",xe.makedev(5,0)),xe.mkdev("/dev/tty1",xe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=le(e).byteLength),e[--t]);xe.createDevice("/dev","random",r),xe.createDevice("/dev","urandom",r),xe.mkdir("/dev/shm"),xe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){xe.mkdir("/proc");var e=xe.mkdir("/proc/self");xe.mkdir("/proc/self/fd"),xe.mount({mount(){var t=xe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=xe.getStreamChecked(r),i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?xe.createDevice("/dev","stdin",i.stdin):xe.symlink("/dev/tty","/dev/stdin"),i.stdout?xe.createDevice("/dev","stdout",null,i.stdout):xe.symlink("/dev/tty","/dev/stdout"),i.stderr?xe.createDevice("/dev","stderr",null,i.stderr):xe.symlink("/dev/tty1","/dev/stderr"),xe.open("/dev/stdin",0),xe.open("/dev/stdout",1),xe.open("/dev/stderr",1)},ensureErrnoError(){xe.ErrnoError||(xe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},xe.ErrnoError.prototype=new Error,xe.ErrnoError.prototype.constructor=xe.ErrnoError,[44].forEach((e=>{xe.genericErrors[e]=new xe.ErrnoError(e),xe.genericErrors[e].stack=""})))},staticInit(){xe.ensureErrnoError(),xe.nameTable=new Array(4096),xe.mount(be,{},"/"),xe.createDefaultDirectories(),xe.createDefaultDevices(),xe.createSpecialDirectories(),xe.filesystems={MEMFS:be}},init(e,t,r){xe.init.initialized=!0,xe.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,xe.createStandardStreams()},quit(){xe.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;i||(o=n);var a=this;a.setDataGetter((e=>{var t=e*o,i=(e+1)*o-1;if(i=Math.min(i,n-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",r,!1),n!==o&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+r+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):ye(i.responseText||"",!0)})(t,i)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&n||(o=n=1,n=this.getter(0).length,o=n,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!d)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var c=xe.createFile(e,t,a,n,i);a.contents?c.contents=a.contents:a.url&&(c.contents=null,c.url=a.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,t,r,n,i){var s=e.node.contents;if(i>=s.length)return 0;var o=Math.min(s.length-i,n);if(s.slice)for(var a=0;a{var t=c.stream_ops[e];u[e]=function(){return xe.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,i)=>(xe.forceLoadFile(c),l(e,t,r,n,i)),u.mmap=(e,t,r,n,i)=>{xe.forceLoadFile(c);var s=we();if(!s)throw new xe.ErrnoError(48);return l(e,S,s,t,r),{ptr:s,allocated:!0}},c.stream_ops=u,c}},De=(e,t)=>e?fe(E,e,t):"",Pe={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(ce.isAbs(t))return t;var n;if(n=-100===e?xe.cwd():Pe.getStreamFromFD(e).path,0==t.length){if(!r)throw new xe.ErrnoError(44);return n}return ce.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ce.normalize(t)!==ce.normalize(xe.getPath(e.node)))return-54;throw e}A[r>>2]=n.dev,A[r+4>>2]=n.mode,C[r+8>>2]=n.nlink,A[r+12>>2]=n.uid,A[r+16>>2]=n.gid,A[r+20>>2]=n.rdev,K=[n.size>>>0,(Y=n.size,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[r+24>>2]=K[0],A[r+28>>2]=K[1],A[r+32>>2]=4096,A[r+36>>2]=n.blocks;var i=n.atime.getTime(),s=n.mtime.getTime(),o=n.ctime.getTime();return K=[Math.floor(i/1e3)>>>0,(Y=Math.floor(i/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[r+40>>2]=K[0],A[r+44>>2]=K[1],C[r+48>>2]=i%1e3*1e3,K=[Math.floor(s/1e3)>>>0,(Y=Math.floor(s/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[r+56>>2]=K[0],A[r+60>>2]=K[1],C[r+64>>2]=s%1e3*1e3,K=[Math.floor(o/1e3)>>>0,(Y=Math.floor(o/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[r+72>>2]=K[0],A[r+76>>2]=K[1],C[r+80>>2]=o%1e3*1e3,K=[n.ino>>>0,(Y=n.ino,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[r+88>>2]=K[0],A[r+92>>2]=K[1],0},doMsync(e,t,r,n,i){if(!xe.isFile(t.node.mode))throw new xe.ErrnoError(43);if(2&n)return 0;var s=E.slice(e,e+r);xe.msync(t,s,i,r,n)},varargs:void 0,get(){var e=A[+Pe.varargs>>2];return Pe.varargs+=4,e},getp:()=>Pe.get(),getStr:e=>De(e),getStreamFromFD:e=>xe.getStreamChecked(e)};function Be(e,t,r){Pe.varargs=r;try{var n=Pe.getStreamFromFD(e);switch(t){case 0:if((i=Pe.get())<0)return-28;for(;xe.streams[i];)i++;return xe.createStream(n,i).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var i=Pe.get();return n.flags|=i,0;case 5:return i=Pe.getp(),I[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ae(28),-1}}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Me(e,t,r,n){Pe.varargs=n;try{t=Pe.getStr(t),t=Pe.calculateAt(e,t);var i=n?Pe.get():0;return xe.open(t,r,i).fd}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return-e.errno}}var Fe,Ue,Re,Le=(e,t,r,n,i)=>{},Oe=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Fe=e},ze=e=>{for(var t="",r=e;E[r];)t+=Fe[E[r++]];return t},Ne={},He={},je={},Ve=e=>{throw new Ue(e)},We=e=>{throw new Re(e)},$e=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&We("Mismatched type converter count");for(var i=0;i{He.hasOwnProperty(e)?i[t]=He[e]:(s.push(e),Ne.hasOwnProperty(e)||(Ne[e]=[]),Ne[e].push((()=>{i[t]=He[e],++o===s.length&&n(i)})))})),0===s.length&&n(i)};function Ge(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=t.name;if(e||Ve(`type "${n}" must have a positive integer typeid pointer`),He.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Ve(`Cannot register type '${n}' twice`)}if(He[e]=t,delete je[e],Ne.hasOwnProperty(e)){var i=Ne[e];delete Ne[e],i.forEach((e=>e()))}}function qe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ge(e,t,r)}var Ye,Ke=8,Xe=(e,t,r,n)=>{qe(e,{name:t=ze(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:Ke,readValueFromPointer:function(e){return this.fromWireType(E[e])},destructorFunction:null})},Je=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Ze=e=>{Ve(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},nt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=nt(e,t,r.baseClass);return null===n?null:r.downcast(n)},it={},st=()=>Object.keys(dt).length,ot=()=>{var e=[];for(var t in dt)dt.hasOwnProperty(t)&&e.push(dt[t]);return e},at=[],ct=()=>{for(;at.length;){var e=at.pop();e.$$.deleteScheduled=!1,e.delete()}},ut=e=>{Ye=e,at.length&&Ye&&Ye(ct)},lt=()=>{i.getInheritedInstanceCount=st,i.getLiveInheritedInstances=ot,i.flushPendingDeletes=ct,i.setDelayFunction=ut},dt={},ht=(e,t)=>{for(void 0===t&&Ve("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=ht(e,t),dt[t]),pt=(e,t)=>(t.ptrType&&t.ptr||We("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&We("Both smartPtrType and smartPtr must be specified"),t.count={value:1},vt(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=it[o];if(!a)return i.call(this);s=this.isConst?a.constPointerType:a.pointerType;var c=nt(t,this.registeredClass,s.registeredClass);return null===c?i.call(this):this.isSmartPointer?pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c,smartPtrType:this,smartPtr:e}):pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c})}var vt=e=>"undefined"==typeof FinalizationRegistry?(vt=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),vt=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),vt(e)),yt=()=>{Object.assign(gt.prototype,{isAliasOf(e){if(!(this instanceof gt))return!1;if(!(e instanceof gt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i},clone(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:Je(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ve("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ve("Object already scheduled for deletion"),at.push(this),1===at.length&&Ye&&Ye(ct),this.$$.deleteScheduled=!0,this}})};function gt(){}var _t=(e,t)=>Object.defineProperty(t,"name",{value:e}),wt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Ve(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},bt=(e,t,r)=>{i.hasOwnProperty(e)?((void 0===r||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[r])&&Ve(`Cannot register public name '${e}' twice`),wt(i,e,e),i.hasOwnProperty(r)&&Ve(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),i[e].overloadTable[r]=t):(i[e]=t,void 0!==r&&(i[e].numArguments=r))},St=48,Et=57,It=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=St&&t<=Et?`_${e}`:e};function kt(e,t,r,n,i,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}var At=(e,t,r)=>{for(;t!==r;)t.upcast||Ve(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Ct(e,t){if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Tt(e,t){var r;if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Ve(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=At(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Ve("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Ve(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,sr.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:Ve("Unsupporting sharing policy")}return r}function xt(e,t){if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Ve(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Dt(e){return this.fromWireType(C[e>>2])}var Pt=()=>{Object.assign(Bt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Ke,readValueFromPointer:Dt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Bt(e,t,r,n,i,s,o,a,c,u,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=Tt:n?(this.toWireType=Ct,this.destructorFunction=null):(this.toWireType=xt,this.destructorFunction=null)}var Mt,Ft,Ut=(e,t,r)=>{i.hasOwnProperty(e)||We("Replacing nonexistant public symbol"),void 0!==i[e].overloadTable&&void 0!==r?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)},Rt=(e,t,r)=>{var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)},Lt=[],Ot=e=>{var t=Lt[e];return t||(e>=Lt.length&&(Lt.length=e+1),Lt[e]=t=Mt.get(e)),t},zt=(e,t,r)=>e.includes("j")?Rt(e,t,r):Ot(t).apply(null,r),Nt=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),zt(e,t,r)}},Ht=(e,t)=>{var r=(e=ze(e)).includes("j")?Nt(e,t):Ot(t);return"function"!=typeof r&&Ve(`unknown function pointer with signature ${e}: ${t}`),r},jt=(e,t)=>{var r=_t(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Vt=e=>{var t=gn(e),r=ze(t);return mn(t),r},Wt=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||He[t]||(je[t]?je[t].forEach(e):(r.push(t),n[t]=!0))})),new Ft(`${e}: `+r.map(Vt).join([", "]))},$t=(e,t,r,n,i,s,o,a,c,u,l,d,h)=>{l=ze(l),s=Ht(i,s),a&&(a=Ht(o,a)),u&&(u=Ht(c,u)),h=Ht(d,h);var f=It(l);bt(f,(function(){Wt(`Cannot construct ${l} due to unbound types`,[n])})),$e([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:gt.prototype;var o=_t(l,(function(){if(Object.getPrototypeOf(this)!==c)throw new Ue("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Ue(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Ue(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new kt(l,o,c,h,r,s,a,u);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new Bt(l,d,!0,!1,!1),m=new Bt(l+"*",d,!1,!1,!1),v=new Bt(l+" const*",d,!1,!0,!1);return it[e]={pointerType:m,constPointerType:v},Ut(f,o),[p,m,v]}))},Gt=(e,t)=>{for(var r=[],n=0;n>2]);return r},qt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Yt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=_t(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function Kt(e,t,r,n,i,s){var o=t.length;o<2&&Ve("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,c=!1,u=1;u0?", ":"")+h),f+=(l||s?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",c)f+="runDestructors(destructors);\n";else for(u=a?1:2;u{var o=Gt(t,r);i=Ht(n,i),$e([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Ue(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Wt(`Cannot construct ${e.name} due to unbound types`,o)},$e([],o,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Kt(r,n,null,i,s),[]))),[]}))},Jt=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},Zt=(e,t,r,n,i,s,o,a,c)=>{var u=Gt(r,n);t=ze(t),t=Jt(t),s=Ht(i,s),$e([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){Wt(`Cannot call ${n} due to unbound types`,u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,d=l[t];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===r-2?(i.argCount=r-2,i.className=e.name,l[t]=i):(wt(l,t,n),l[t].overloadTable[r-2]=i),$e([],u,(function(i){var a=Kt(n,i,e,s,o,c);return void 0===l[t].overloadTable?(a.argCount=r-2,l[t]=a):l[t].overloadTable[r-2]=a,[]})),[]}))};function Qt(){Object.assign(er.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function er(){this.allocated=[void 0],this.freelist=[]}var tr=new er,rr=e=>{e>=tr.reserved&&0==--tr.get(e).refcount&&tr.free(e)},nr=()=>{for(var e=0,t=tr.reserved;t{tr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),tr.reserved=tr.allocated.length,i.count_emval_handles=nr},sr={toValue:e=>(e||Ve("Cannot use deleted val. handle = "+e),tr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return tr.allocate({refcount:1,value:e})}}};function or(e){return this.fromWireType(A[e>>2])}var ar=(e,t)=>{qe(e,{name:t=ze(t),fromWireType:e=>{var t=sr.toValue(e);return rr(e),t},toWireType:(e,t)=>sr.toHandle(t),argPackAdvance:Ke,readValueFromPointer:or,destructorFunction:null})},cr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},ur=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(T[e>>2])};case 8:return function(e){return this.fromWireType(x[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},lr=(e,t,r)=>{qe(e,{name:t=ze(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Ke,readValueFromPointer:ur(t,r),destructorFunction:null})},dr=(e,t,r)=>{switch(t){case 1:return r?e=>S[e>>0]:e=>E[e>>0];case 2:return r?e=>I[e>>1]:e=>k[e>>1];case 4:return r?e=>A[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},hr=(e,t,r,n,i)=>{t=ze(t);var s=e=>e;if(0===n){var o=32-8*r;s=e=>e<>>o}var a=t.includes("unsigned");qe(e,{name:t,fromWireType:s,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Ke,readValueFromPointer:dr(t,r,0!==n),destructorFunction:null})},fr=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=C[e>>2],r=C[e+4>>2];return new n(S.buffer,r,t)}qe(e,{name:r=ze(r),fromWireType:i,argPackAdvance:Ke,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},pr=(e,t,r)=>ve(e,E,t,r),mr=(e,t)=>{var r="std::string"===(t=ze(t));qe(e,{name:t,fromWireType(e){var t,n=C[e>>2],i=e+4;if(r)for(var s=i,o=0;o<=n;++o){var a=i+o;if(o==n||0==E[a]){var c=De(s,a-s);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),s=a+1}}else{var u=new Array(n);for(o=0;o>2]=n,r&&i)pr(t,o,n+1);else if(i)for(var a=0;a255&&(mn(o),Ve("String has UTF-16 code units that do not fit in 8 bits")),E[o+a]=c}else for(a=0;a{for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&k[n];)++n;if((r=n<<1)-e>32&&vr)return vr.decode(E.subarray(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=I[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s},gr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return I[t>>1]=0,t-n},_r=e=>2*e.length,wr=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=A[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var s=i-65536;n+=String.fromCharCode(55296|s>>10,56320|1023&s)}else n+=String.fromCharCode(i)}return n},br=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,s=0;s=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s)),A[t>>2]=o,(t+=4)+4>i)break}return A[t>>2]=0,t-n},Sr=e=>{for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t},Er=(e,t,r)=>{var n,i,s,o,a;r=ze(r),2===t?(n=yr,i=gr,o=_r,s=()=>k,a=1):4===t&&(n=wr,i=br,o=Sr,s=()=>C,a=2),qe(e,{name:r,fromWireType:e=>{for(var r,i=C[e>>2],o=s(),c=e+4,u=0;u<=i;++u){var l=e+4+u*t;if(u==i||0==o[l>>a]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return mn(e),r},toWireType:(e,n)=>{"string"!=typeof n&&Ve(`Cannot pass non-string to C++ string type ${r}`);var s=o(n),c=vn(4+s+t);return C[c>>2]=s>>a,i(n,c+4,s+t),null!==e&&e.push(mn,c),c},argPackAdvance:Ke,readValueFromPointer:or,destructorFunction(e){mn(e)}})},Ir=(e,t)=>{qe(e,{isVoid:!0,name:t=ze(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},kr={},Ar=e=>{var t=kr[e];return void 0===t?ze(e):t},Cr=[],Tr=(e,t,r,n,i)=>(e=Cr[e])(t=sr.toValue(t),t[r=Ar(r)],n,i),xr=e=>{var t=Cr.length;return Cr.push(e),t},Dr=(e,t)=>{var r=He[e];return void 0===r&&Ve(t+" has unknown type "+Vt(e)),r},Pr=(e,t)=>{for(var r=new Array(e),n=0;n>2],"parameter "+n);return r},Br=(e,t,r)=>{var n=[],i=e.toWireType(n,r);return n.length&&(C[t>>2]=sr.toHandle(n)),i},Mr=(e,t,r)=>{var n=Pr(e,t),i=n.shift();e--;var s="return function (obj, func, destructorsRef, args) {\n",o=0,a=[];0===r&&a.push("obj");for(var c=["retType"],u=[i],l=0;le.name)).join(", ")}) => ${i.name}>`;return xr(_t(h,d))},Fr=e=>{var t=sr.toValue(e);qt(t),rr(e)},Ur=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Rr=e=>e%4==0&&(e%100!=0||e%400==0),Lr=[0,31,60,91,121,152,182,213,244,274,305,335],Or=[0,31,59,90,120,151,181,212,243,273,304,334],zr=e=>(Rr(e.getFullYear())?Lr:Or)[e.getMonth()]+e.getDate()-1;function Nr(e,t,r){var n=Ur(e,t),i=new Date(1e3*n);A[r>>2]=i.getSeconds(),A[r+4>>2]=i.getMinutes(),A[r+8>>2]=i.getHours(),A[r+12>>2]=i.getDate(),A[r+16>>2]=i.getMonth(),A[r+20>>2]=i.getFullYear()-1900,A[r+24>>2]=i.getDay();var s=0|zr(i);A[r+28>>2]=s,A[r+36>>2]=-60*i.getTimezoneOffset();var o=new Date(i.getFullYear(),0,1),a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),c=o.getTimezoneOffset(),u=0|(a!=c&&i.getTimezoneOffset()==Math.min(c,a));A[r+32>>2]=u}var Hr=e=>{var t=me(e)+1,r=vn(t);return r&&pr(e,r,t),r},jr=(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),s=new Date(n,6,1),o=i.getTimezoneOffset(),a=s.getTimezoneOffset(),c=Math.max(o,a);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[e>>2]=60*c,A[t>>2]=Number(o!=a);var l=u(i),d=u(s),h=Hr(l),f=Hr(d);a>2]=h,C[r+4>>2]=f):(C[r>>2]=f,C[r+4>>2]=h)},Vr=()=>{G("")},Wr=()=>Date.now(),$r=(e,t,r)=>E.copyWithin(e,t,t+r),Gr=()=>536870912,qr=e=>{var t=(e-_.buffer.byteLength+65535)/65536;try{return _.grow(t),B(),1}catch(e){}},Yr=e=>{var t=E.length;e>>>=0;var r=Gr();if(e>r)return!1;for(var n,i,s=1;s<=4;s*=2){var o=t*(1+.2/s);o=Math.min(o,e+100663296);var a=Math.min(r,(n=Math.max(e,o))+((i=65536)-n%i)%i);if(qr(a))return!0}return!1},Kr={},Xr=()=>u||"./this.program",Jr=()=>{if(!Jr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Xr()};for(var t in Kr)void 0===Kr[t]?delete e[t]:e[t]=Kr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Jr.strings=r}return Jr.strings},Zr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);S[t>>0]=0},Qr=(e,t)=>{var r=0;return Jr().forEach(((n,i)=>{var s=t+r;C[e+4*i>>2]=s,Zr(n,s),r+=n.length+1})),0},en=(e,t)=>{var r=Jr();C[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),C[t>>2]=n,0};function tn(e){try{var t=Pe.getStreamFromFD(e);return xe.close(t),0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}function rn(e,t){try{var r=Pe.getStreamFromFD(e),n=r.tty?2:xe.isDir(r.mode)?3:xe.isLink(r.mode)?7:4;return S[t>>0]=n,I[t+2>>1]=0,K=[0,(Y=0,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[t+8>>2]=K[0],A[t+12>>2]=K[1],K=[0,(Y=0,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[t+16>>2]=K[0],A[t+20>>2]=K[1],0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var nn=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=xe.read(e,S,o,a,n);if(c<0)return-1;if(i+=c,c>2]=s,0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}function on(e,t,r,n,i){var s=Ur(t,r);try{if(isNaN(s))return 61;var o=Pe.getStreamFromFD(e);return xe.llseek(o,s,n),K=[o.position>>>0,(Y=o.position,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[i>>2]=K[0],A[i+4>>2]=K[1],o.getdents&&0===s&&0===n&&(o.getdents=null),0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var an=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=xe.write(e,S,o,a,n);if(c<0)return-1;i+=c,void 0!==n&&(n+=c)}return i};function cn(e,t,r,n){try{var i=Pe.getStreamFromFD(e),s=an(i,t,r);return C[n>>2]=s,0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var un=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=xe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},ln=365,dn=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&ln)===ln},set:function(e){e?this.mode|=ln:this.mode&=~ln}},write:{get:function(){return(this.mode&dn)===dn},set:function(e){e?this.mode|=dn:this.mode&=~dn}},isFolder:{get:function(){return xe.isDir(this.mode)}},isDevice:{get:function(){return xe.isChrdev(this.mode)}}}),xe.FSNode=un,xe.createPreloadedFile=Ae,xe.staticInit(),Oe(),Ue=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Re=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},yt(),lt(),Pt(),Ft=i.UnboundTypeError=jt(Error,"UnboundTypeError"),Qt(),ir();var hn,fn={o:oe,C:Be,u:Me,r:Le,E:Xe,F:$t,A:Xt,i:Zt,D:ar,l:lr,c:hr,b:fr,m:mr,j:Er,n:Ir,f:Tr,h:rr,e:Mr,d:Fr,p:Nr,t:jr,a:Vr,g:Wr,y:$r,s:Yr,w:Qr,x:en,k:tn,v:rn,B:sn,q:on,z:cn},pn=ne(),mn=e=>(mn=pn.I)(e),vn=e=>(vn=pn.J)(e),yn=()=>(yn=pn.L)(),gn=e=>(gn=pn.M)(e),_n=e=>(_n=pn.O)(e);function wn(){function e(){hn||(hn=!0,i.calledRun=!0,D||(L(),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),O()))}j>0||(R(),j>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_jiji=(e,t,r,n,s)=>(i.dynCall_jiji=pn.P)(e,t,r,n,s),i._ff_h264_cabac_tables=60124,V=function e(){hn||wn(),hn||(V=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return wn(),e.ready}),o=(()=>{var e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd.js",document.baseURI).href;return async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,n,i;(i=t).ready=new Promise(((e,t)=>{r=e,n=t})),(i=void 0!==i?i:{}).locateFile=function(e,t){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:t+e};var s,o,a,c=Object.assign({},i),u="./this.program",l="object"==typeof window,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";function p(e){return i.locateFile?i.locateFile(e,f):f+e}if(h){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd.js",document.baseURI).href),v=m("fs"),y=m("path");f=d?y.dirname(f)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd.js",document.baseURI).href)),s=(e,t)=>(e=Z(e)?new URL(e):y.normalize(e),v.readFileSync(e,t?void 0:"utf8")),a=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},o=function(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=Z(e)?new URL(e):y.normalize(e),v.readFile(e,n?void 0:"utf8",((e,i)=>{e?r(e):t(n?i.buffer:i)}))},!i.thisProgram&&process.argv.length>1&&(u=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),i.inspect=()=>"[Emscripten Module object]"}else(l||d)&&(d?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var g,_,w=i.print||console.log.bind(console),b=i.printErr||console.error.bind(console);Object.assign(i,c),c=null,i.arguments&&i.arguments,i.thisProgram&&(u=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(g=i.wasmBinary),"object"!=typeof WebAssembly&&G("no native wasm support detected");var S,E,I,k,A,C,T,x,D=!1;function P(e,t){e||G(t)}function B(){var e=_.buffer;i.HEAP8=S=new Int8Array(e),i.HEAP16=I=new Int16Array(e),i.HEAPU8=E=new Uint8Array(e),i.HEAPU16=k=new Uint16Array(e),i.HEAP32=A=new Int32Array(e),i.HEAPU32=C=new Uint32Array(e),i.HEAPF32=T=new Float32Array(e),i.HEAPF64=x=new Float64Array(e)}var M=[],F=[],U=[];function R(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)z(i.preRun.shift());ie(M)}function L(){i.noFSInit||xe.init.initialized||xe.init(),xe.ignorePermissions=!1,ie(F)}function O(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)H(i.postRun.shift());ie(U)}function z(e){M.unshift(e)}function N(e){F.unshift(e)}function H(e){U.unshift(e)}var j=0,V=null;function W(e){j++,i.monitorRunDependencies&&i.monitorRunDependencies(j)}function $(e){if(j--,i.monitorRunDependencies&&i.monitorRunDependencies(j),0==j&&V){var t=V;V=null,t()}}function G(e){i.onAbort&&i.onAbort(e),b(e="Aborted("+e+")"),D=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var q,Y,K,X="data:application/octet-stream;base64,",J=e=>e.startsWith(X),Z=e=>e.startsWith("file://");function Q(e){if(e==q&&g)return new Uint8Array(g);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!g&&(l||d)){if("function"==typeof fetch&&!Z(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(o)return new Promise(((t,r)=>{o(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{b(`failed to asynchronously prepare wasm: ${e}`),G(e)}))}function re(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||J(t)||Z(t)||h||"function"!=typeof fetch?te(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return b(`wasm streaming compile failed: ${e}`),b("falling back to ArrayBuffer instantiation"),te(t,r,n)}))))}function ne(){var e={a:fn};function t(e,t){return pn=e.exports,_=pn.G,B(),Mt=pn.J,N(pn.H),$(),pn}if(W(),i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){b(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return re(g,q,e,(function(e){t(e.instance)})).catch(n),{}}i.locateFile?J(q="decoder-pro-audio.wasm")||(q=p(q)):q=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-f-simd.js",document.baseURI).href).href;var ie=e=>{for(;e.length>0;)e.shift()(i)};function se(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,S[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=S[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,S[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=S[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(_n(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var oe=(e,t,r)=>{throw new se(e).init(t,r),e},ae=e=>(A[vn()>>2]=e,e),ce={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=ce.isAbs(e),r="/"===e.substr(-1);return(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ce.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ce.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ce.normalize(e.join("/"))},join2:(e,t)=>ce.normalize(e+"/"+t)},ue=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(h)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}G("initRandomDevice")},le=e=>(le=ue())(e),de={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:xe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=ce.isAbs(n)}return(t?"/":"")+(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=de.resolve(e).substr(1),t=de.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),s=Math.min(n.length,i.length),o=s,a=0;a{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&he)return he.decode(e.subarray(t,i));for(var s="";t>10,56320|1023&u)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s},pe=[],me=e=>{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},ve=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,s=r+n-1,o=0;o=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o);if(a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i};function ye(e,t,r){var n=r>0?r:me(e)+1,i=new Array(n),s=ve(e,i,0,i.length);return t&&(i.length=s),i}var ge=()=>{if(!pe.length){var e=null;if(h){var t=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=v.readSync(n,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ye(e,!0)}return pe.shift()},_e={ttys:[],init(){},shutdown(){},register(e,t){_e.ttys[e]={input:[],output:[],ops:t},xe.registerDevice(e,_e.stream_ops)},stream_ops:{open(e){var t=_e.ttys[e.node.rdev];if(!t)throw new xe.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new xe.ErrnoError(60);for(var s=0,o=0;oge(),put_char(e,t){null===t||10===t?(w(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(b(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(fe(e.output,0)),e.output=[])}}},we=e=>{G()},be={ops_table:null,mount:e=>be.createNode(null,"/",16895,0),createNode(e,t,r,n){if(xe.isBlkdev(r)||xe.isFIFO(r))throw new xe.ErrnoError(63);be.ops_table||(be.ops_table={dir:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,lookup:be.node_ops.lookup,mknod:be.node_ops.mknod,rename:be.node_ops.rename,unlink:be.node_ops.unlink,rmdir:be.node_ops.rmdir,readdir:be.node_ops.readdir,symlink:be.node_ops.symlink},stream:{llseek:be.stream_ops.llseek}},file:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:{llseek:be.stream_ops.llseek,read:be.stream_ops.read,write:be.stream_ops.write,allocate:be.stream_ops.allocate,mmap:be.stream_ops.mmap,msync:be.stream_ops.msync}},link:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr,readlink:be.node_ops.readlink},stream:{}},chrdev:{node:{getattr:be.node_ops.getattr,setattr:be.node_ops.setattr},stream:xe.chrdev_stream_ops}});var i=xe.createNode(e,t,r,n);return xe.isDir(i.mode)?(i.node_ops=be.ops_table.dir.node,i.stream_ops=be.ops_table.dir.stream,i.contents={}):xe.isFile(i.mode)?(i.node_ops=be.ops_table.file.node,i.stream_ops=be.ops_table.file.stream,i.usedBytes=0,i.contents=null):xe.isLink(i.mode)?(i.node_ops=be.ops_table.link.node,i.stream_ops=be.ops_table.link.stream):xe.isChrdev(i.mode)&&(i.node_ops=be.ops_table.chrdev.node,i.stream_ops=be.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=xe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,xe.isDir(e.mode)?t.size=4096:xe.isFile(e.mode)?t.size=e.usedBytes:xe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&be.resizeFileStorage(e,t.size)},lookup(e,t){throw xe.genericErrors[44]},mknod:(e,t,r,n)=>be.createNode(e,t,r,n),rename(e,t,r){if(xe.isDir(e.mode)){var n;try{n=xe.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new xe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=xe.lookupNode(e,t);for(var n in r.contents)throw new xe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=be.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!xe.isLink(e.mode))throw new xe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,i){var s=e.node.contents;if(i>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-i,n);if(o>8&&s.subarray)t.set(s.subarray(i,i+o),r);else for(var a=0;a0||r+t(be.stream_ops.write(e,t,0,n,r,!1),0)}},Se=(e,t,r,n)=>{var i=n?"":`al ${e}`;o(e,(r=>{P(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),i&&$()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&W()},Ee=(e,t,r,n,i,s)=>{xe.createDataFile(e,t,r,n,i,s)},Ie=i.preloadPlugins||[],ke=(e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return Ie.forEach((s=>{i||s.canHandle(t)&&(s.handle(e,t,r,n),i=!0)})),i},Ae=(e,t,r,n,i,s,o,a,c,u)=>{var l=t?de.resolve(ce.join2(e,t)):e;function d(r){function d(r){u&&u(),a||Ee(e,t,r,n,i,c),s&&s(),$()}ke(r,l,d,(()=>{o&&o(),$()}))||d(r)}W(),"string"==typeof r?Se(r,(e=>d(e)),o):d(r)},Ce=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Te=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},xe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=de.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new xe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=xe.root,i="/",s=0;s40)throw new xe.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(xe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n>>0)%xe.nameTable.length},hashAddNode(e){var t=xe.hashName(e.parent.id,e.name);e.name_next=xe.nameTable[t],xe.nameTable[t]=e},hashRemoveNode(e){var t=xe.hashName(e.parent.id,e.name);if(xe.nameTable[t]===e)xe.nameTable[t]=e.name_next;else for(var r=xe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=xe.mayLookup(e);if(r)throw new xe.ErrnoError(r,e);for(var n=xe.hashName(e.id,t),i=xe.nameTable[n];i;i=i.name_next){var s=i.name;if(i.parent.id===e.id&&s===t)return i}return xe.lookup(e,t)},createNode(e,t,r,n){var i=new xe.FSNode(e,t,r,n);return xe.hashAddNode(i),i},destroyNode(e){xe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>xe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=xe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{xe.lookupNode(e,t);return 20}catch(e){}return xe.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=xe.lookupNode(e,t)}catch(e){return e.errno}var i=xe.nodePermissions(e,"wx");if(i)return i;if(r){if(!xe.isDir(n.mode))return 54;if(xe.isRoot(n)||xe.getPath(n)===xe.cwd())return 10}else if(xe.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?xe.isLink(e.mode)?32:xe.isDir(e.mode)&&("r"!==xe.flagsToPermissionString(t)||512&t)?31:xe.nodePermissions(e,xe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=xe.MAX_OPEN_FDS;e++)if(!xe.streams[e])return e;throw new xe.ErrnoError(33)},getStreamChecked(e){var t=xe.getStream(e);if(!t)throw new xe.ErrnoError(8);return t},getStream:e=>xe.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return xe.FSStream||(xe.FSStream=function(){this.shared={}},xe.FSStream.prototype={},Object.defineProperties(xe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new xe.FSStream,e),-1==t&&(t=xe.nextfd()),e.fd=t,xe.streams[t]=e,e},closeStream(e){xe.streams[e]=null},chrdev_stream_ops:{open(e){var t=xe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new xe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){xe.devices[e]={stream_ops:t}},getDevice:e=>xe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),xe.syncFSRequests++,xe.syncFSRequests>1&&b(`warning: ${xe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=xe.getMounts(xe.root.mount),n=0;function i(e){return xe.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var n,i="/"===r,s=!r;if(i&&xe.root)throw new xe.ErrnoError(10);if(!i&&!s){var o=xe.lookupPath(r,{follow_mount:!1});if(r=o.path,n=o.node,xe.isMountpoint(n))throw new xe.ErrnoError(10);if(!xe.isDir(n.mode))throw new xe.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(a);return c.mount=a,a.root=c,i?xe.root=c:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),c},unmount(e){var t=xe.lookupPath(e,{follow_mount:!1});if(!xe.isMountpoint(t.node))throw new xe.ErrnoError(28);var r=t.node,n=r.mounted,i=xe.getMounts(n);Object.keys(xe.nameTable).forEach((e=>{for(var t=xe.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&xe.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(n);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=xe.lookupPath(e,{parent:!0}).node,i=ce.basename(e);if(!i||"."===i||".."===i)throw new xe.ErrnoError(28);var s=xe.mayCreate(n,i);if(s)throw new xe.ErrnoError(s);if(!n.node_ops.mknod)throw new xe.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,xe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,xe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",i=0;i(void 0===r&&(r=t,t=438),t|=8192,xe.mknod(e,t,r)),symlink(e,t){if(!de.resolve(e))throw new xe.ErrnoError(44);var r=xe.lookupPath(t,{parent:!0}).node;if(!r)throw new xe.ErrnoError(44);var n=ce.basename(t),i=xe.mayCreate(r,n);if(i)throw new xe.ErrnoError(i);if(!r.node_ops.symlink)throw new xe.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=ce.dirname(e),s=ce.dirname(t),o=ce.basename(e),a=ce.basename(t);if(r=xe.lookupPath(e,{parent:!0}).node,n=xe.lookupPath(t,{parent:!0}).node,!r||!n)throw new xe.ErrnoError(44);if(r.mount!==n.mount)throw new xe.ErrnoError(75);var c,u=xe.lookupNode(r,o),l=de.relative(e,s);if("."!==l.charAt(0))throw new xe.ErrnoError(28);if("."!==(l=de.relative(t,i)).charAt(0))throw new xe.ErrnoError(55);try{c=xe.lookupNode(n,a)}catch(e){}if(u!==c){var d=xe.isDir(u.mode),h=xe.mayDelete(r,o,d);if(h)throw new xe.ErrnoError(h);if(h=c?xe.mayDelete(n,a,d):xe.mayCreate(n,a))throw new xe.ErrnoError(h);if(!r.node_ops.rename)throw new xe.ErrnoError(63);if(xe.isMountpoint(u)||c&&xe.isMountpoint(c))throw new xe.ErrnoError(10);if(n!==r&&(h=xe.nodePermissions(r,"w")))throw new xe.ErrnoError(h);xe.hashRemoveNode(u);try{r.node_ops.rename(u,n,a)}catch(e){throw e}finally{xe.hashAddNode(u)}}},rmdir(e){var t=xe.lookupPath(e,{parent:!0}).node,r=ce.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!0);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.rmdir)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.rmdir(t,r),xe.destroyNode(n)},readdir(e){var t=xe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new xe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=xe.lookupPath(e,{parent:!0}).node;if(!t)throw new xe.ErrnoError(44);var r=ce.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!1);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.unlink)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.unlink(t,r),xe.destroyNode(n)},readlink(e){var t=xe.lookupPath(e).node;if(!t)throw new xe.ErrnoError(44);if(!t.node_ops.readlink)throw new xe.ErrnoError(28);return de.resolve(xe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=xe.lookupPath(e,{follow:!t}).node;if(!r)throw new xe.ErrnoError(44);if(!r.node_ops.getattr)throw new xe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>xe.stat(e,!0),chmod(e,t,r){var n;"string"==typeof e?n=xe.lookupPath(e,{follow:!r}).node:n=e;if(!n.node_ops.setattr)throw new xe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){xe.chmod(e,t,!0)},fchmod(e,t){var r=xe.getStreamChecked(e);xe.chmod(r.node,t)},chown(e,t,r,n){var i;"string"==typeof e?i=xe.lookupPath(e,{follow:!n}).node:i=e;if(!i.node_ops.setattr)throw new xe.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){xe.chown(e,t,r,!0)},fchown(e,t,r){var n=xe.getStreamChecked(e);xe.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new xe.ErrnoError(28);var r;"string"==typeof e?r=xe.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new xe.ErrnoError(63);if(xe.isDir(r.mode))throw new xe.ErrnoError(31);if(!xe.isFile(r.mode))throw new xe.ErrnoError(28);var n=xe.nodePermissions(r,"w");if(n)throw new xe.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=xe.getStreamChecked(e);if(0==(2097155&r.flags))throw new xe.ErrnoError(28);xe.truncate(r.node,t)},utime(e,t,r){var n=xe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new xe.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Ce(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=ce.normalize(e);try{n=xe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(n){if(128&t)throw new xe.ErrnoError(20)}else n=xe.mknod(e,r,0),s=!0;if(!n)throw new xe.ErrnoError(44);if(xe.isChrdev(n.mode)&&(t&=-513),65536&t&&!xe.isDir(n.mode))throw new xe.ErrnoError(54);if(!s){var o=xe.mayOpen(n,t);if(o)throw new xe.ErrnoError(o)}512&t&&!s&&xe.truncate(n,0),t&=-131713;var a=xe.createStream({node:n,path:xe.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!i.logReadFiles||1&t||(xe.readFiles||(xe.readFiles={}),e in xe.readFiles||(xe.readFiles[e]=1)),a},close(e){if(xe.isClosed(e))throw new xe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{xe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new xe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new xe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,i){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(1==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.read)throw new xe.ErrnoError(28);var s=void 0!==i;if(s){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var o=e.stream_ops.read(e,t,r,n,i);return s||(e.position+=o),o},write(e,t,r,n,i,s){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.write)throw new xe.ErrnoError(28);e.seekable&&1024&e.flags&&xe.llseek(e,0,2);var o=void 0!==i;if(o){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var a=e.stream_ops.write(e,t,r,n,i,s);return o||(e.position+=a),a},allocate(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(t<0||r<=0)throw new xe.ErrnoError(28);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(!xe.isFile(e.node.mode)&&!xe.isDir(e.node.mode))throw new xe.ErrnoError(43);if(!e.stream_ops.allocate)throw new xe.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new xe.ErrnoError(2);if(1==(2097155&e.flags))throw new xe.ErrnoError(2);if(!e.stream_ops.mmap)throw new xe.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new xe.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=xe.open(e,t.flags),i=xe.stat(e).size,s=new Uint8Array(i);return xe.read(n,s,0,i,0),"utf8"===t.encoding?r=fe(s,0):"binary"===t.encoding&&(r=s),xe.close(n),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var n=xe.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(me(t)+1),s=ve(t,i,0,i.length);xe.write(n,i,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");xe.write(n,t,0,t.byteLength,void 0,r.canOwn)}xe.close(n)},cwd:()=>xe.currentPath,chdir(e){var t=xe.lookupPath(e,{follow:!0});if(null===t.node)throw new xe.ErrnoError(44);if(!xe.isDir(t.node.mode))throw new xe.ErrnoError(54);var r=xe.nodePermissions(t.node,"x");if(r)throw new xe.ErrnoError(r);xe.currentPath=t.path},createDefaultDirectories(){xe.mkdir("/tmp"),xe.mkdir("/home"),xe.mkdir("/home/web_user")},createDefaultDevices(){xe.mkdir("/dev"),xe.registerDevice(xe.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),xe.mkdev("/dev/null",xe.makedev(1,3)),_e.register(xe.makedev(5,0),_e.default_tty_ops),_e.register(xe.makedev(6,0),_e.default_tty1_ops),xe.mkdev("/dev/tty",xe.makedev(5,0)),xe.mkdev("/dev/tty1",xe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=le(e).byteLength),e[--t]);xe.createDevice("/dev","random",r),xe.createDevice("/dev","urandom",r),xe.mkdir("/dev/shm"),xe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){xe.mkdir("/proc");var e=xe.mkdir("/proc/self");xe.mkdir("/proc/self/fd"),xe.mount({mount(){var t=xe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=xe.getStreamChecked(r),i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?xe.createDevice("/dev","stdin",i.stdin):xe.symlink("/dev/tty","/dev/stdin"),i.stdout?xe.createDevice("/dev","stdout",null,i.stdout):xe.symlink("/dev/tty","/dev/stdout"),i.stderr?xe.createDevice("/dev","stderr",null,i.stderr):xe.symlink("/dev/tty1","/dev/stderr"),xe.open("/dev/stdin",0),xe.open("/dev/stdout",1),xe.open("/dev/stderr",1)},ensureErrnoError(){xe.ErrnoError||(xe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},xe.ErrnoError.prototype=new Error,xe.ErrnoError.prototype.constructor=xe.ErrnoError,[44].forEach((e=>{xe.genericErrors[e]=new xe.ErrnoError(e),xe.genericErrors[e].stack=""})))},staticInit(){xe.ensureErrnoError(),xe.nameTable=new Array(4096),xe.mount(be,{},"/"),xe.createDefaultDirectories(),xe.createDefaultDevices(),xe.createSpecialDirectories(),xe.filesystems={MEMFS:be}},init(e,t,r){xe.init.initialized=!0,xe.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,xe.createStandardStreams()},quit(){xe.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;i||(o=n);var a=this;a.setDataGetter((e=>{var t=e*o,i=(e+1)*o-1;if(i=Math.min(i,n-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",r,!1),n!==o&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+r+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):ye(i.responseText||"",!0)})(t,i)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&n||(o=n=1,n=this.getter(0).length,o=n,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!d)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var c=xe.createFile(e,t,a,n,i);a.contents?c.contents=a.contents:a.url&&(c.contents=null,c.url=a.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,t,r,n,i){var s=e.node.contents;if(i>=s.length)return 0;var o=Math.min(s.length-i,n);if(s.slice)for(var a=0;a{var t=c.stream_ops[e];u[e]=function(){return xe.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,i)=>(xe.forceLoadFile(c),l(e,t,r,n,i)),u.mmap=(e,t,r,n,i)=>{xe.forceLoadFile(c);var s=we();if(!s)throw new xe.ErrnoError(48);return l(e,S,s,t,r),{ptr:s,allocated:!0}},c.stream_ops=u,c}},De=(e,t)=>e?fe(E,e,t):"",Pe={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(ce.isAbs(t))return t;var n;-100===e?n=xe.cwd():n=Pe.getStreamFromFD(e).path;if(0==t.length){if(!r)throw new xe.ErrnoError(44);return n}return ce.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ce.normalize(t)!==ce.normalize(xe.getPath(e.node)))return-54;throw e}A[r>>2]=n.dev,A[r+4>>2]=n.mode,C[r+8>>2]=n.nlink,A[r+12>>2]=n.uid,A[r+16>>2]=n.gid,A[r+20>>2]=n.rdev,K=[n.size>>>0,(Y=n.size,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[r+24>>2]=K[0],A[r+28>>2]=K[1],A[r+32>>2]=4096,A[r+36>>2]=n.blocks;var i=n.atime.getTime(),s=n.mtime.getTime(),o=n.ctime.getTime();return K=[Math.floor(i/1e3)>>>0,(Y=Math.floor(i/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[r+40>>2]=K[0],A[r+44>>2]=K[1],C[r+48>>2]=i%1e3*1e3,K=[Math.floor(s/1e3)>>>0,(Y=Math.floor(s/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[r+56>>2]=K[0],A[r+60>>2]=K[1],C[r+64>>2]=s%1e3*1e3,K=[Math.floor(o/1e3)>>>0,(Y=Math.floor(o/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[r+72>>2]=K[0],A[r+76>>2]=K[1],C[r+80>>2]=o%1e3*1e3,K=[n.ino>>>0,(Y=n.ino,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[r+88>>2]=K[0],A[r+92>>2]=K[1],0},doMsync(e,t,r,n,i){if(!xe.isFile(t.node.mode))throw new xe.ErrnoError(43);if(2&n)return 0;var s=E.slice(e,e+r);xe.msync(t,s,i,r,n)},varargs:void 0,get(){var e=A[+Pe.varargs>>2];return Pe.varargs+=4,e},getp:()=>Pe.get(),getStr:e=>De(e),getStreamFromFD:e=>xe.getStreamChecked(e)};function Be(e,t,r){Pe.varargs=r;try{var n=Pe.getStreamFromFD(e);switch(t){case 0:if((i=Pe.get())<0)return-28;for(;xe.streams[i];)i++;return xe.createStream(n,i).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var i=Pe.get();return n.flags|=i,0;case 5:i=Pe.getp();return I[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ae(28),-1}}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Me(e,t,r,n){Pe.varargs=n;try{t=Pe.getStr(t),t=Pe.calculateAt(e,t);var i=n?Pe.get():0;return xe.open(t,r,i).fd}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return-e.errno}}var Fe,Ue,Re,Le=(e,t,r,n,i)=>{},Oe=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Fe=e},ze=e=>{for(var t="",r=e;E[r];)t+=Fe[E[r++]];return t},Ne={},He={},je={},Ve=e=>{throw new Ue(e)},We=e=>{throw new Re(e)},$e=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&We("Mismatched type converter count");for(var i=0;i{He.hasOwnProperty(e)?i[t]=He[e]:(s.push(e),Ne.hasOwnProperty(e)||(Ne[e]=[]),Ne[e].push((()=>{i[t]=He[e],++o===s.length&&n(i)})))})),0===s.length&&n(i)};function Ge(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=t.name;if(e||Ve(`type "${n}" must have a positive integer typeid pointer`),He.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Ve(`Cannot register type '${n}' twice`)}if(He[e]=t,delete je[e],Ne.hasOwnProperty(e)){var i=Ne[e];delete Ne[e],i.forEach((e=>e()))}}function qe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ge(e,t,r)}var Ye,Ke=8,Xe=(e,t,r,n)=>{qe(e,{name:t=ze(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:Ke,readValueFromPointer:function(e){return this.fromWireType(E[e])},destructorFunction:null})},Je=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Ze=e=>{Ve(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},nt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=nt(e,t,r.baseClass);return null===n?null:r.downcast(n)},it={},st=()=>Object.keys(dt).length,ot=()=>{var e=[];for(var t in dt)dt.hasOwnProperty(t)&&e.push(dt[t]);return e},at=[],ct=()=>{for(;at.length;){var e=at.pop();e.$$.deleteScheduled=!1,e.delete()}},ut=e=>{Ye=e,at.length&&Ye&&Ye(ct)},lt=()=>{i.getInheritedInstanceCount=st,i.getLiveInheritedInstances=ot,i.flushPendingDeletes=ct,i.setDelayFunction=ut},dt={},ht=(e,t)=>{for(void 0===t&&Ve("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=ht(e,t),dt[t]),pt=(e,t)=>(t.ptrType&&t.ptr||We("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&We("Both smartPtrType and smartPtr must be specified"),t.count={value:1},vt(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=it[o];if(!a)return i.call(this);s=this.isConst?a.constPointerType:a.pointerType;var c=nt(t,this.registeredClass,s.registeredClass);return null===c?i.call(this):this.isSmartPointer?pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c,smartPtrType:this,smartPtr:e}):pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c})}var vt=e=>"undefined"==typeof FinalizationRegistry?(vt=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),vt=e=>{var t=e.$$;if(!!t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),vt(e)),yt=()=>{Object.assign(gt.prototype,{isAliasOf(e){if(!(this instanceof gt))return!1;if(!(e instanceof gt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i},clone(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:Je(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ve("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ve("Object already scheduled for deletion"),at.push(this),1===at.length&&Ye&&Ye(ct),this.$$.deleteScheduled=!0,this}})};function gt(){}var _t=(e,t)=>Object.defineProperty(t,"name",{value:e}),wt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Ve(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},bt=(e,t,r)=>{i.hasOwnProperty(e)?((void 0===r||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[r])&&Ve(`Cannot register public name '${e}' twice`),wt(i,e,e),i.hasOwnProperty(r)&&Ve(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),i[e].overloadTable[r]=t):(i[e]=t,void 0!==r&&(i[e].numArguments=r))},St=48,Et=57,It=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=St&&t<=Et?`_${e}`:e};function kt(e,t,r,n,i,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}var At=(e,t,r)=>{for(;t!==r;)t.upcast||Ve(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Ct(e,t){if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Tt(e,t){var r;if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Ve(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=At(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Ve("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Ve(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,sr.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:Ve("Unsupporting sharing policy")}return r}function xt(e,t){if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Ve(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Dt(e){return this.fromWireType(C[e>>2])}var Pt=()=>{Object.assign(Bt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Ke,readValueFromPointer:Dt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Bt(e,t,r,n,i,s,o,a,c,u,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=Tt:n?(this.toWireType=Ct,this.destructorFunction=null):(this.toWireType=xt,this.destructorFunction=null)}var Mt,Ft,Ut=(e,t,r)=>{i.hasOwnProperty(e)||We("Replacing nonexistant public symbol"),void 0!==i[e].overloadTable&&void 0!==r?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)},Rt=(e,t,r)=>{var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)},Lt=[],Ot=e=>{var t=Lt[e];return t||(e>=Lt.length&&(Lt.length=e+1),Lt[e]=t=Mt.get(e)),t},zt=(e,t,r)=>e.includes("j")?Rt(e,t,r):Ot(t).apply(null,r),Nt=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),zt(e,t,r)}},Ht=(e,t)=>{var r=(e=ze(e)).includes("j")?Nt(e,t):Ot(t);return"function"!=typeof r&&Ve(`unknown function pointer with signature ${e}: ${t}`),r},jt=(e,t)=>{var r=_t(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Vt=e=>{var t=yn(e),r=ze(t);return mn(t),r},Wt=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||He[t]||(je[t]?je[t].forEach(e):(r.push(t),n[t]=!0))})),new Ft(`${e}: `+r.map(Vt).join([", "]))},$t=(e,t,r,n,i,s,o,a,c,u,l,d,h)=>{l=ze(l),s=Ht(i,s),a&&(a=Ht(o,a)),u&&(u=Ht(c,u)),h=Ht(d,h);var f=It(l);bt(f,(function(){Wt(`Cannot construct ${l} due to unbound types`,[n])})),$e([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:gt.prototype;var o=_t(l,(function(){if(Object.getPrototypeOf(this)!==c)throw new Ue("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Ue(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Ue(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new kt(l,o,c,h,r,s,a,u);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new Bt(l,d,!0,!1,!1),m=new Bt(l+"*",d,!1,!1,!1),v=new Bt(l+" const*",d,!1,!0,!1);return it[e]={pointerType:m,constPointerType:v},Ut(f,o),[p,m,v]}))},Gt=(e,t)=>{for(var r=[],n=0;n>2]);return r},qt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Yt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=_t(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function Kt(e,t,r,n,i,s){var o=t.length;o<2&&Ve("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,c=!1,u=1;u0?", ":"")+h),f+=(l||s?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",c)f+="runDestructors(destructors);\n";else for(u=a?1:2;u{var o=Gt(t,r);i=Ht(n,i),$e([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Ue(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Wt(`Cannot construct ${e.name} due to unbound types`,o)},$e([],o,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Kt(r,n,null,i,s),[]))),[]}))},Jt=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},Zt=(e,t,r,n,i,s,o,a,c)=>{var u=Gt(r,n);t=ze(t),t=Jt(t),s=Ht(i,s),$e([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){Wt(`Cannot call ${n} due to unbound types`,u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,d=l[t];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===r-2?(i.argCount=r-2,i.className=e.name,l[t]=i):(wt(l,t,n),l[t].overloadTable[r-2]=i),$e([],u,(function(i){var a=Kt(n,i,e,s,o,c);return void 0===l[t].overloadTable?(a.argCount=r-2,l[t]=a):l[t].overloadTable[r-2]=a,[]})),[]}))};function Qt(){Object.assign(er.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function er(){this.allocated=[void 0],this.freelist=[]}var tr=new er,rr=e=>{e>=tr.reserved&&0==--tr.get(e).refcount&&tr.free(e)},nr=()=>{for(var e=0,t=tr.reserved;t{tr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),tr.reserved=tr.allocated.length,i.count_emval_handles=nr},sr={toValue:e=>(e||Ve("Cannot use deleted val. handle = "+e),tr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return tr.allocate({refcount:1,value:e})}}};function or(e){return this.fromWireType(A[e>>2])}var ar=(e,t)=>{qe(e,{name:t=ze(t),fromWireType:e=>{var t=sr.toValue(e);return rr(e),t},toWireType:(e,t)=>sr.toHandle(t),argPackAdvance:Ke,readValueFromPointer:or,destructorFunction:null})},cr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},ur=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(T[e>>2])};case 8:return function(e){return this.fromWireType(x[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},lr=(e,t,r)=>{qe(e,{name:t=ze(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Ke,readValueFromPointer:ur(t,r),destructorFunction:null})},dr=(e,t,r)=>{switch(t){case 1:return r?e=>S[e>>0]:e=>E[e>>0];case 2:return r?e=>I[e>>1]:e=>k[e>>1];case 4:return r?e=>A[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},hr=(e,t,r,n,i)=>{t=ze(t);var s=e=>e;if(0===n){var o=32-8*r;s=e=>e<>>o}var a=t.includes("unsigned");qe(e,{name:t,fromWireType:s,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Ke,readValueFromPointer:dr(t,r,0!==n),destructorFunction:null})},fr=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=C[e>>2],r=C[e+4>>2];return new n(S.buffer,r,t)}qe(e,{name:r=ze(r),fromWireType:i,argPackAdvance:Ke,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},pr=(e,t,r)=>ve(e,E,t,r),mr=(e,t)=>{var r="std::string"===(t=ze(t));qe(e,{name:t,fromWireType(e){var t,n=C[e>>2],i=e+4;if(r)for(var s=i,o=0;o<=n;++o){var a=i+o;if(o==n||0==E[a]){var c=De(s,a-s);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),s=a+1}}else{var u=new Array(n);for(o=0;o>2]=n,r&&i)pr(t,o,n+1);else if(i)for(var a=0;a255&&(mn(o),Ve("String has UTF-16 code units that do not fit in 8 bits")),E[o+a]=c}else for(a=0;a{for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&k[n];)++n;if((r=n<<1)-e>32&&vr)return vr.decode(E.subarray(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=I[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s},gr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return I[t>>1]=0,t-n},_r=e=>2*e.length,wr=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=A[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var s=i-65536;n+=String.fromCharCode(55296|s>>10,56320|1023&s)}else n+=String.fromCharCode(i)}return n},br=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,s=0;s=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s);if(A[t>>2]=o,(t+=4)+4>i)break}return A[t>>2]=0,t-n},Sr=e=>{for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t},Er=(e,t,r)=>{var n,i,s,o,a;r=ze(r),2===t?(n=yr,i=gr,o=_r,s=()=>k,a=1):4===t&&(n=wr,i=br,o=Sr,s=()=>C,a=2),qe(e,{name:r,fromWireType:e=>{for(var r,i=C[e>>2],o=s(),c=e+4,u=0;u<=i;++u){var l=e+4+u*t;if(u==i||0==o[l>>a]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return mn(e),r},toWireType:(e,n)=>{"string"!=typeof n&&Ve(`Cannot pass non-string to C++ string type ${r}`);var s=o(n),c=gn(4+s+t);return C[c>>2]=s>>a,i(n,c+4,s+t),null!==e&&e.push(mn,c),c},argPackAdvance:Ke,readValueFromPointer:or,destructorFunction(e){mn(e)}})},Ir=(e,t)=>{qe(e,{isVoid:!0,name:t=ze(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},kr={},Ar=e=>{var t=kr[e];return void 0===t?ze(e):t},Cr=[],Tr=(e,t,r,n,i)=>(e=Cr[e])(t=sr.toValue(t),t[r=Ar(r)],n,i),xr=e=>{var t=Cr.length;return Cr.push(e),t},Dr=(e,t)=>{var r=He[e];return void 0===r&&Ve(t+" has unknown type "+Vt(e)),r},Pr=(e,t)=>{for(var r=new Array(e),n=0;n>2],"parameter "+n);return r},Br=(e,t,r)=>{var n=[],i=e.toWireType(n,r);return n.length&&(C[t>>2]=sr.toHandle(n)),i},Mr=(e,t,r)=>{var n=Pr(e,t),i=n.shift();e--;var s="return function (obj, func, destructorsRef, args) {\n",o=0,a=[];0===r&&a.push("obj");for(var c=["retType"],u=[i],l=0;le.name)).join(", ")}) => ${i.name}>`;return xr(_t(h,d))},Fr=e=>{var t=sr.toValue(e);qt(t),rr(e)},Ur=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Rr=e=>e%4==0&&(e%100!=0||e%400==0),Lr=[0,31,60,91,121,152,182,213,244,274,305,335],Or=[0,31,59,90,120,151,181,212,243,273,304,334],zr=e=>(Rr(e.getFullYear())?Lr:Or)[e.getMonth()]+e.getDate()-1;function Nr(e,t,r){var n=Ur(e,t),i=new Date(1e3*n);A[r>>2]=i.getSeconds(),A[r+4>>2]=i.getMinutes(),A[r+8>>2]=i.getHours(),A[r+12>>2]=i.getDate(),A[r+16>>2]=i.getMonth(),A[r+20>>2]=i.getFullYear()-1900,A[r+24>>2]=i.getDay();var s=0|zr(i);A[r+28>>2]=s,A[r+36>>2]=-60*i.getTimezoneOffset();var o=new Date(i.getFullYear(),0,1),a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),c=o.getTimezoneOffset(),u=0|(a!=c&&i.getTimezoneOffset()==Math.min(c,a));A[r+32>>2]=u}var Hr=e=>{var t=me(e)+1,r=gn(t);return r&&pr(e,r,t),r},jr=(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),s=new Date(n,6,1),o=i.getTimezoneOffset(),a=s.getTimezoneOffset(),c=Math.max(o,a);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[e>>2]=60*c,A[t>>2]=Number(o!=a);var l=u(i),d=u(s),h=Hr(l),f=Hr(d);a>2]=h,C[r+4>>2]=f):(C[r>>2]=f,C[r+4>>2]=h)},Vr=()=>{G("")},Wr=()=>Date.now(),$r=(e,t,r)=>E.copyWithin(e,t,t+r),Gr=()=>134217728,qr=e=>{var t=(e-_.buffer.byteLength+65535)/65536;try{return _.grow(t),B(),1}catch(e){}},Yr=e=>{var t=E.length;e>>>=0;var r=Gr();if(e>r)return!1;for(var n,i,s=1;s<=4;s*=2){var o=t*(1+.2/s);o=Math.min(o,e+100663296);var a=Math.min(r,(n=Math.max(e,o))+((i=65536)-n%i)%i);if(qr(a))return!0}return!1},Kr={},Xr=()=>u||"./this.program",Jr=()=>{if(!Jr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Xr()};for(var t in Kr)void 0===Kr[t]?delete e[t]:e[t]=Kr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Jr.strings=r}return Jr.strings},Zr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);S[t>>0]=0},Qr=(e,t)=>{var r=0;return Jr().forEach(((n,i)=>{var s=t+r;C[e+4*i>>2]=s,Zr(n,s),r+=n.length+1})),0},en=(e,t)=>{var r=Jr();C[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),C[t>>2]=n,0};function tn(e){try{var t=Pe.getStreamFromFD(e);return xe.close(t),0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}function rn(e,t){try{var r=Pe.getStreamFromFD(e),n=r.tty?2:xe.isDir(r.mode)?3:xe.isLink(r.mode)?7:4;return S[t>>0]=n,I[t+2>>1]=0,K=[0,(Y=0,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[t+8>>2]=K[0],A[t+12>>2]=K[1],K=[0,(Y=0,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[t+16>>2]=K[0],A[t+20>>2]=K[1],0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var nn=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=xe.read(e,S,o,a,n);if(c<0)return-1;if(i+=c,c>2]=s,0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}function on(e,t,r,n,i){var s=Ur(t,r);try{if(isNaN(s))return 61;var o=Pe.getStreamFromFD(e);return xe.llseek(o,s,n),K=[o.position>>>0,(Y=o.position,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],A[i>>2]=K[0],A[i+4>>2]=K[1],o.getdents&&0===s&&0===n&&(o.getdents=null),0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var an=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=xe.write(e,S,o,a,n);if(c<0)return-1;i+=c,void 0!==n&&(n+=c)}return i};function cn(e,t,r,n){try{var i=Pe.getStreamFromFD(e),s=an(i,t,r);return C[n>>2]=s,0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var un=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=xe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},ln=365,dn=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&ln)===ln},set:function(e){e?this.mode|=ln:this.mode&=~ln}},write:{get:function(){return(this.mode&dn)===dn},set:function(e){e?this.mode|=dn:this.mode&=~dn}},isFolder:{get:function(){return xe.isDir(this.mode)}},isDevice:{get:function(){return xe.isChrdev(this.mode)}}}),xe.FSNode=un,xe.createPreloadedFile=Ae,xe.staticInit(),Oe(),Ue=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Re=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},yt(),lt(),Pt(),Ft=i.UnboundTypeError=jt(Error,"UnboundTypeError"),Qt(),ir();var hn,fn={o:oe,C:Be,u:Me,r:Le,E:Xe,F:$t,A:Xt,i:Zt,D:ar,l:lr,c:hr,b:fr,m:mr,j:Er,n:Ir,f:Tr,h:rr,e:Mr,d:Fr,p:Nr,t:jr,a:Vr,g:Wr,y:$r,s:Yr,w:Qr,x:en,k:tn,v:rn,B:sn,q:on,z:cn},pn=ne(),mn=e=>(mn=pn.I)(e),vn=()=>(vn=pn.K)(),yn=e=>(yn=pn.L)(e),gn=e=>(gn=pn.M)(e),_n=e=>(_n=pn.O)(e);function wn(){function e(){hn||(hn=!0,i.calledRun=!0,D||(L(),r(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),O()))}j>0||(R(),j>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_viiijj=(e,t,r,n,s,o,a,c)=>(i.dynCall_viiijj=pn.P)(e,t,r,n,s,o,a,c),i.dynCall_jij=(e,t,r,n)=>(i.dynCall_jij=pn.Q)(e,t,r,n),i.dynCall_jii=(e,t,r)=>(i.dynCall_jii=pn.R)(e,t,r),i.dynCall_jiji=(e,t,r,n,s)=>(i.dynCall_jiji=pn.S)(e,t,r,n,s),V=function e(){hn||wn(),hn||(V=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return wn(),t.ready}})();function a(){var e=["3243823dwGvWW","1497352vkmgSQ","609012FbQpnO","abs","sqrt","undefined","1044449uSSQwa","25eVQISC","150TRlXXA","hypot","2zRYUIC","10623postwD","2099629rdMaBF","1048WsIVit","921924SXbjSv","max","length"];return(a=function(){return e})()}var c=d;!function(e,t){for(var r=d,n=e();;)try{if(555680===-parseInt(r(108))/1*(-parseInt(r(112))/2)+-parseInt(r(113))/3*(parseInt(r(115))/4)+parseInt(r(109))/5*(-parseInt(r(116))/6)+parseInt(r(114))/7+parseInt(r(103))/8+parseInt(r(104))/9*(parseInt(r(110))/10)+-parseInt(r(119))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(a);var u=1e-6,l=typeof Float32Array!==c(107)?Float32Array:Array;function d(e,t){var r=a();return(d=function(e,t){return r[e-=103]})(e,t)}var h=Math.random;var f=Math.PI/180;Math.hypot||(Math[c(111)]=function(){for(var e=c,t=0,r=arguments[e(118)];r--;)t+=arguments[r]*arguments[r];return Math[e(106)](t)});var p=Object.freeze({__proto__:null,EPSILON:u,get ARRAY_TYPE(){return l},RANDOM:h,setMatrixArrayType:function(e){l=e},toRadian:function(e){return e*f},equals:function(e,t){var r=c;return Math.abs(e-t)<=u*Math[r(117)](1,Math[r(105)](e),Math[r(105)](t))}});function m(){var e=new l(16);return l!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function v(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function y(e,t,r){var n=t[0],i=t[1],s=t[2],o=t[3],a=t[4],c=t[5],u=t[6],l=t[7],d=t[8],h=t[9],f=t[10],p=t[11],m=t[12],v=t[13],y=t[14],g=t[15],_=r[0],w=r[1],b=r[2],S=r[3];return e[0]=_*n+w*a+b*d+S*m,e[1]=_*i+w*c+b*h+S*v,e[2]=_*s+w*u+b*f+S*y,e[3]=_*o+w*l+b*p+S*g,_=r[4],w=r[5],b=r[6],S=r[7],e[4]=_*n+w*a+b*d+S*m,e[5]=_*i+w*c+b*h+S*v,e[6]=_*s+w*u+b*f+S*y,e[7]=_*o+w*l+b*p+S*g,_=r[8],w=r[9],b=r[10],S=r[11],e[8]=_*n+w*a+b*d+S*m,e[9]=_*i+w*c+b*h+S*v,e[10]=_*s+w*u+b*f+S*y,e[11]=_*o+w*l+b*p+S*g,_=r[12],w=r[13],b=r[14],S=r[15],e[12]=_*n+w*a+b*d+S*m,e[13]=_*i+w*c+b*h+S*v,e[14]=_*s+w*u+b*f+S*y,e[15]=_*o+w*l+b*p+S*g,e}function g(){var e=["30325427UQeXtM","20LBvVkF","leftDegrees","168468VaIlEe","6839352kZodDz","8845190IxcXVC","sqrt","6973001KYVdWY","max","1975vpjxaq","EPSILON","cos","sin","abs","14562kJFDSb","hypot","224463xFJTDE","tan","rightDegrees","mat4(","16SMVxld","16uOxlWG","ARRAY_TYPE"];return(g=function(){return e})()}function _(e,t){var r=g();return(_=function(e,t){return r[e-=157]})(e,t)}function w(e,t,r){var n=t[0],i=t[1],s=t[2],o=t[3],a=n+n,c=i+i,u=s+s,l=n*a,d=n*c,h=n*u,f=i*c,p=i*u,m=s*u,v=o*a,y=o*c,g=o*u;return e[0]=1-(f+m),e[1]=d+g,e[2]=h-y,e[3]=0,e[4]=d-g,e[5]=1-(l+m),e[6]=p+v,e[7]=0,e[8]=h+y,e[9]=p-v,e[10]=1-(l+f),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function b(e,t){var r=_,n=t[0],i=t[1],s=t[2],o=t[4],a=t[5],c=t[6],u=t[8],l=t[9],d=t[10];return e[0]=Math.hypot(n,i,s),e[1]=Math[r(161)](o,a,c),e[2]=Math[r(161)](u,l,d),e}function S(e,t,r,n,i){var s,o=1/Math[_(163)](t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(s=1/(n-i),e[10]=(i+n)*s,e[14]=2*i*n*s):(e[10]=-1,e[14]=-2*n),e}!function(e,t){for(var r=_,n=e();;)try{if(806927===-parseInt(r(167))/1*(-parseInt(r(172))/2)+-parseInt(r(162))/3*(parseInt(r(170))/4)+-parseInt(r(178))/5*(-parseInt(r(160))/6)+parseInt(r(176))/7+parseInt(r(166))/8*(parseInt(r(173))/9)+-parseInt(r(174))/10+-parseInt(r(169))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(g);var E=S;function I(e,t,r,n,i,s,o){var a=1/(t-r),c=1/(n-i),u=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*a,e[13]=(i+n)*c,e[14]=(o+s)*u,e[15]=1,e}var k=I;function A(e,t,r,n){var i,s,o,a,c,u,l,d,h,f,m=_,y=t[0],g=t[1],w=t[2],b=n[0],S=n[1],E=n[2],I=r[0],k=r[1],A=r[2];return Math.abs(y-I)0?(r[0]=2*(a*o+l*n+c*s-u*i)/d,r[1]=2*(c*o+l*i+u*n-a*s)/d,r[2]=2*(u*o+l*s+a*i-c*n)/d):(r[0]=2*(a*o+l*n+c*s-u*i),r[1]=2*(c*o+l*i+u*n-a*s),r[2]=2*(u*o+l*s+a*i-c*n)),w(e,t,r),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:b,getRotation:function(e,t){var r=_,n=new(p[r(168)])(3);b(n,t);var i=1/n[0],s=1/n[1],o=1/n[2],a=t[0]*i,c=t[1]*s,u=t[2]*o,l=t[4]*i,d=t[5]*s,h=t[6]*o,f=t[8]*i,m=t[9]*s,v=t[10]*o,y=a+d+v,g=0;return y>0?(g=2*Math.sqrt(y+1),e[3]=.25*g,e[0]=(h-m)/g,e[1]=(f-u)/g,e[2]=(c-l)/g):a>d&&a>v?(g=2*Math[r(175)](1+a-d-v),e[3]=(h-m)/g,e[0]=.25*g,e[1]=(c+l)/g,e[2]=(f+u)/g):d>v?(g=2*Math.sqrt(1+d-a-v),e[3]=(f-u)/g,e[0]=(c+l)/g,e[1]=.25*g,e[2]=(h+m)/g):(g=2*Math[r(175)](1+v-a-d),e[3]=(c-l)/g,e[0]=(f+u)/g,e[1]=(h+m)/g,e[2]=.25*g),e},fromRotationTranslationScale:function(e,t,r,n){var i=t[0],s=t[1],o=t[2],a=t[3],c=i+i,u=s+s,l=o+o,d=i*c,h=i*u,f=i*l,p=s*u,m=s*l,v=o*l,y=a*c,g=a*u,_=a*l,w=n[0],b=n[1],S=n[2];return e[0]=(1-(p+v))*w,e[1]=(h+_)*w,e[2]=(f-g)*w,e[3]=0,e[4]=(h-_)*b,e[5]=(1-(d+v))*b,e[6]=(m+y)*b,e[7]=0,e[8]=(f+g)*S,e[9]=(m-y)*S,e[10]=(1-(d+p))*S,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e},fromRotationTranslationScaleOrigin:function(e,t,r,n,i){var s=t[0],o=t[1],a=t[2],c=t[3],u=s+s,l=o+o,d=a+a,h=s*u,f=s*l,p=s*d,m=o*l,v=o*d,y=a*d,g=c*u,_=c*l,w=c*d,b=n[0],S=n[1],E=n[2],I=i[0],k=i[1],A=i[2],C=(1-(m+y))*b,T=(f+w)*b,x=(p-_)*b,D=(f-w)*S,P=(1-(h+y))*S,B=(v+g)*S,M=(p+_)*E,F=(v-g)*E,U=(1-(h+m))*E;return e[0]=C,e[1]=T,e[2]=x,e[3]=0,e[4]=D,e[5]=P,e[6]=B,e[7]=0,e[8]=M,e[9]=F,e[10]=U,e[11]=0,e[12]=r[0]+I-(C*I+D*k+M*A),e[13]=r[1]+k-(T*I+P*k+F*A),e[14]=r[2]+A-(x*I+B*k+U*A),e[15]=1,e},fromQuat:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=r+r,a=n+n,c=i+i,u=r*o,l=n*o,d=n*a,h=i*o,f=i*a,p=i*c,m=s*o,v=s*a,y=s*c;return e[0]=1-d-p,e[1]=l+y,e[2]=h-v,e[3]=0,e[4]=l-y,e[5]=1-u-p,e[6]=f+m,e[7]=0,e[8]=h+v,e[9]=f-m,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},frustum:function(e,t,r,n,i,s,o){var a=1/(r-t),c=1/(i-n),u=1/(s-o);return e[0]=2*s*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*s*c,e[6]=0,e[7]=0,e[8]=(r+t)*a,e[9]=(i+n)*c,e[10]=(o+s)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*s*2*u,e[15]=0,e},perspectiveNO:S,perspective:E,perspectiveZO:function(e,t,r,n,i){var s,o=1/Math[_(163)](t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(s=1/(n-i),e[10]=i*s,e[14]=i*n*s):(e[10]=-1,e[14]=-n),e},perspectiveFromFieldOfView:function(e,t,r,n){var i=_,s=Math[i(163)](t.upDegrees*Math.PI/180),o=Math[i(163)](t.downDegrees*Math.PI/180),a=Math[i(163)](t[i(171)]*Math.PI/180),c=Math.tan(t[i(164)]*Math.PI/180),u=2/(a+c),l=2/(s+o);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-(a-c)*u*.5,e[9]=(s-o)*l*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e},orthoNO:I,ortho:k,orthoZO:function(e,t,r,n,i,s,o){var a=1/(t-r),c=1/(n-i),u=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=u,e[11]=0,e[12]=(t+r)*a,e[13]=(i+n)*c,e[14]=s*u,e[15]=1,e},lookAt:A,targetTo:function(e,t,r,n){var i=_,s=t[0],o=t[1],a=t[2],c=n[0],u=n[1],l=n[2],d=s-r[0],h=o-r[1],f=a-r[2],p=d*d+h*h+f*f;p>0&&(d*=p=1/Math[i(175)](p),h*=p,f*=p);var m=u*f-l*h,v=l*d-c*f,y=c*h-u*d;return(p=m*m+v*v+y*y)>0&&(m*=p=1/Math.sqrt(p),v*=p,y*=p),e[0]=m,e[1]=v,e[2]=y,e[3]=0,e[4]=h*y-f*v,e[5]=f*m-d*y,e[6]=d*v-h*m,e[7]=0,e[8]=d,e[9]=h,e[10]=f,e[11]=0,e[12]=s,e[13]=o,e[14]=a,e[15]=1,e},str:function(e){return _(165)+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math[_(161)](e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},subtract:C,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var r=_,n=e[0],i=e[1],s=e[2],o=e[3],a=e[4],c=e[5],l=e[6],d=e[7],h=e[8],f=e[9],m=e[10],v=e[11],y=e[12],g=e[13],w=e[14],b=e[15],S=t[0],E=t[1],I=t[2],k=t[3],A=t[4],C=t[5],T=t[6],x=t[7],D=t[8],P=t[9],B=t[10],M=t[11],F=t[12],U=t[13],R=t[14],L=t[15];return Math[r(159)](n-S)<=u*Math[r(177)](1,Math.abs(n),Math[r(159)](S))&&Math[r(159)](i-E)<=p[r(179)]*Math[r(177)](1,Math[r(159)](i),Math.abs(E))&&Math[r(159)](s-I)<=p[r(179)]*Math[r(177)](1,Math.abs(s),Math[r(159)](I))&&Math[r(159)](o-k)<=p[r(179)]*Math[r(177)](1,Math.abs(o),Math.abs(k))&&Math[r(159)](a-A)<=p[r(179)]*Math[r(177)](1,Math[r(159)](a),Math[r(159)](A))&&Math.abs(c-C)<=u*Math[r(177)](1,Math[r(159)](c),Math[r(159)](C))&&Math.abs(l-T)<=p[r(179)]*Math[r(177)](1,Math[r(159)](l),Math[r(159)](T))&&Math[r(159)](d-x)<=p[r(179)]*Math[r(177)](1,Math.abs(d),Math[r(159)](x))&&Math.abs(h-D)<=p[r(179)]*Math[r(177)](1,Math[r(159)](h),Math[r(159)](D))&&Math[r(159)](f-P)<=p[r(179)]*Math[r(177)](1,Math[r(159)](f),Math[r(159)](P))&&Math[r(159)](m-B)<=u*Math[r(177)](1,Math.abs(m),Math[r(159)](B))&&Math[r(159)](v-M)<=p[r(179)]*Math[r(177)](1,Math[r(159)](v),Math.abs(M))&&Math[r(159)](y-F)<=p[r(179)]*Math.max(1,Math[r(159)](y),Math[r(159)](F))&&Math[r(159)](g-U)<=p[r(179)]*Math[r(177)](1,Math.abs(g),Math[r(159)](U))&&Math.abs(w-R)<=p[r(179)]*Math.max(1,Math.abs(w),Math[r(159)](R))&&Math.abs(b-L)<=p[r(179)]*Math[r(177)](1,Math[r(159)](b),Math.abs(L))},mul:D,sub:P});function M(e,t,r){var n=new(p[U(282)])(3);return n[0]=e,n[1]=t,n[2]=r,n}function F(){var e=["ceil","3104013RKGsiP","30pJvIgq","floor","abs","min","26710644wSlxnt","acos","vec3(","64479bkaoHj","hypot","701966aVgDyP","round","cos","34515EdhOmc","3790kjSWGo","sqrt","max","2tDGcCD","188IowCqm","1745875vZRmnX","ARRAY_TYPE","EPSILON","sin","2743853yvpuJF","8oFyrkP"];return(F=function(){return e})()}function U(e,t){var r=F();return(U=function(e,t){return r[e-=269]})(e,t)}function R(e,t){var r=L();return(R=function(e,t){return r[e-=375]})(e,t)}function L(){var e=["2572568jonRSm","5aMssGB","2903088fhtMpG","197284tsulrK","702940iVoAXZ","2664564BznrwY","4877201UksbUo","205344uyRADx","1216eXdetu"];return(L=function(){return e})()}function O(e,t){const r=N();return(O=function(e,t){return r[e-=195]})(e,t)}!function(e,t){for(var r=U,n=e();;)try{if(895502===-parseInt(r(279))/1*(parseInt(r(272))/2)+parseInt(r(270))/3*(-parseInt(r(280))/4)+-parseInt(r(281))/5*(parseInt(r(289))/6)+parseInt(r(285))/7*(parseInt(r(286))/8)+parseInt(r(275))/9*(parseInt(r(276))/10)+parseInt(r(288))/11+parseInt(r(293))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(F),x=new(p[(T=U)(282)])(3),p[T(282)]!=Float32Array&&(x[0]=0,x[1]=0,x[2]=0),function(e,t){for(var r=R,n=e();;)try{if(562171===parseInt(r(383))/1+-parseInt(r(375))/2+-parseInt(r(382))/3+-parseInt(r(380))/4*(parseInt(r(381))/5)+-parseInt(r(376))/6+-parseInt(r(377))/7+-parseInt(r(379))/8*(-parseInt(r(378))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(L),function(e,t){const r=O,n=e();for(;;)try{if(975743===parseInt(r(202))/1*(-parseInt(r(280))/2)+parseInt(r(230))/3*(parseInt(r(222))/4)+-parseInt(r(209))/5*(parseInt(r(240))/6)+-parseInt(r(293))/7*(-parseInt(r(198))/8)+parseInt(r(281))/9*(-parseInt(r(264))/10)+-parseInt(r(225))/11*(parseInt(r(238))/12)+parseInt(r(214))/13)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(N);var z=(e,t)=>{const r=O,n=r(295),i=r(249);t&&e[r(253)](e[r(270)],1);const s=function(){const t=r,s=f(e[t(206)],n),o=f(e[t(200)],i),a=e[t(199)]();return e[t(263)](a,s),e[t(263)](a,o),e[t(205)](a),e[t(286)](a,e[t(273)])?a:(console[t(261)](t(237)+e[t(255)](a)),null)}();let o={program:s,attribLocations:{vertexPosition:e[r(216)](s,"aVertexPosition"),texturePosition:e.getAttribLocation(s,r(275))},uniformLocations:{projectionMatrix:e[r(210)](s,r(284)),modelMatrix:e[r(210)](s,r(292)),viewMatrix:e[r(210)](s,"uViewMatrix"),rgbatexture:e.getUniformLocation(s,r(227)),ytexture:e.getUniformLocation(s,"yTexture"),utexture:e[r(210)](s,r(246)),vtexture:e[r(210)](s,r(213)),isyuv:e[r(210)](s,"isyuv")}},a=function(){const t=r,n=e[t(256)]();e.bindBuffer(e[t(245)],n);e[t(229)](e.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e[t(201)]);var i=[];i=i.concat([0,1],[1,1],[1,0],[0,0]);const s=e[t(256)]();e[t(276)](e[t(245)],s),e.bufferData(e[t(245)],new Float32Array(i),e[t(201)]);const o=e[t(256)]();e[t(276)](e[t(258)],o);return e[t(229)](e[t(258)],new Uint16Array([0,1,2,0,2,3]),e[t(201)]),{position:n,texPosition:s,indices:o}}(),c=h(),u=h(),l=h(),d=h();function h(){const t=r;let n=e[t(235)]();return e.bindTexture(e[t(274)],n),e[t(239)](e[t(274)],e[t(195)],e[t(220)]),e[t(239)](e.TEXTURE_2D,e[t(228)],e[t(220)]),e[t(239)](e[t(274)],e.TEXTURE_WRAP_S,e[t(278)]),e[t(239)](e.TEXTURE_2D,e[t(218)],e[t(278)]),n}function f(t,n){const i=r,s=e.createShader(t);return e[i(297)](s,n),e[i(251)](s),e[i(212)](s,e.COMPILE_STATUS)?s:(console.log(i(287)+e[i(269)](s)),e.deleteShader(s),null)}function p(t,n){const i=r;e[i(196)](0,0,t,n),e[i(219)](0,0,0,0),e.clearDepth(1),e[i(288)](e[i(226)]),e[i(250)](e[i(283)]),e[i(231)](e[i(233)]|e[i(268)]);const s=B[i(277)]();B[i(272)](s,-1,1,-1,1,.1,100);const c=B[i(277)]();B[i(248)](c);const h=m();A(h,M(0,0,0),M(0,0,-1),M(0,1,0));{const t=3,r=e[i(296)],n=!1,s=0,c=0;e[i(276)](e[i(245)],a[i(203)]),e[i(241)](o[i(262)].vertexPosition,t,r,n,s,c),e.enableVertexAttribArray(o[i(262)][i(221)])}{const t=2,r=e[i(296)],n=!1,s=0,c=0;e[i(276)](e[i(245)],a[i(236)]),e[i(241)](o[i(262)][i(223)],t,r,n,s,c),e[i(211)](o[i(262)].texturePosition)}e[i(252)](e[i(207)]+3),e[i(244)](e[i(274)],u),e[i(252)](e[i(207)]+4),e[i(244)](e[i(274)],l),e[i(252)](e[i(207)]+5),e.bindTexture(e[i(274)],d),e[i(276)](e[i(258)],a[i(257)]),e[i(279)](o[i(285)]),e[i(265)](o[i(266)][i(208)],!1,s),e.uniformMatrix4fv(o[i(266)][i(254)],!1,c),e[i(265)](o[i(266)][i(217)],!1,h),e.uniform1i(o[i(266)][i(260)],2),e[i(232)](o.uniformLocations[i(271)],3),e.uniform1i(o.uniformLocations[i(282)],4),e[i(232)](o[i(266)][i(234)],5),e[i(232)](o[i(266)][i(290)],1);{const t=6,r=e[i(291)],n=0;e[i(215)](e[i(294)],t,r,n)}}return{render:function(t,n,i,s,o){const a=r;e[a(252)](e.TEXTURE0),e[a(244)](e[a(274)],u),e[a(243)](e.TEXTURE_2D,0,e[a(267)],t,n,0,e.LUMINANCE,e[a(224)],i),e[a(252)](e[a(289)]),e[a(244)](e[a(274)],l),e.texImage2D(e[a(274)],0,e[a(267)],t/2,n/2,0,e[a(267)],e[a(224)],s),e[a(252)](e[a(204)]),e[a(244)](e[a(274)],d),e[a(243)](e[a(274)],0,e[a(267)],t/2,n/2,0,e[a(267)],e.UNSIGNED_BYTE,o),p(t,n)},renderYUV:function(t,n,i){const s=r;let o=i[s(197)](0,t*n),a=i[s(197)](t*n,t*n*5/4),c=i[s(197)](t*n*5/4,t*n*3/2);e[s(252)](e.TEXTURE0),e[s(244)](e[s(274)],u),e[s(243)](e.TEXTURE_2D,0,e[s(267)],t,n,0,e[s(267)],e[s(224)],o),e[s(252)](e.TEXTURE1),e[s(244)](e[s(274)],l),e[s(243)](e.TEXTURE_2D,0,e[s(267)],t/2,n/2,0,e[s(267)],e.UNSIGNED_BYTE,a),e.activeTexture(e[s(204)]),e.bindTexture(e[s(274)],d),e[s(243)](e[s(274)],0,e[s(267)],t/2,n/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,c),p(t,n)},destroy:function(){const t=r;e[t(247)](o[t(285)]),e.deleteBuffer(a.position),e[t(242)](a[t(236)]),e[t(242)](a[t(257)]),e.deleteTexture(c),e[t(259)](u),e[t(259)](l),e.deleteTexture(d),o=null,a=null,c=null,u=null,l=null,d=null}}};function N(){const e=["STATIC_DRAW","389IOOFXO","position","TEXTURE2","linkProgram","VERTEX_SHADER","TEXTURE0","projectionMatrix","115EuUreq","getUniformLocation","enableVertexAttribArray","getShaderParameter","vTexture","70311397NREaDQ","drawElements","getAttribLocation","viewMatrix","TEXTURE_WRAP_T","clearColor","LINEAR","vertexPosition","3240820CTahPg","texturePosition","UNSIGNED_BYTE","22oUINPB","DEPTH_TEST","rgbaTexture","TEXTURE_MIN_FILTER","bufferData","3IVxcxX","clear","uniform1i","COLOR_BUFFER_BIT","vtexture","createTexture","texPosition","Unable to initialize the shader program: ","3316332DdcfKn","texParameteri","500286zoyKNc","vertexAttribPointer","deleteBuffer","texImage2D","bindTexture","ARRAY_BUFFER","uTexture","deleteProgram","identity","\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n ","depthFunc","compileShader","activeTexture","pixelStorei","modelMatrix","getProgramInfoLog","createBuffer","indices","ELEMENT_ARRAY_BUFFER","deleteTexture","rgbatexture","log","attribLocations","attachShader","125610VSsQSH","uniformMatrix4fv","uniformLocations","LUMINANCE","DEPTH_BUFFER_BIT","getShaderInfoLog","UNPACK_ALIGNMENT","ytexture","ortho","LINK_STATUS","TEXTURE_2D","aTexturePosition","bindBuffer","create","CLAMP_TO_EDGE","useProgram","9124GzAaEn","1368RnZFCW","utexture","LEQUAL","uProjectionMatrix","program","getProgramParameter","An error occurred compiling the shaders: ","enable","TEXTURE1","isyuv","UNSIGNED_SHORT","uModelMatrix","5768PzHQaU","TRIANGLES","\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n ","FLOAT","shaderSource","TEXTURE_MAG_FILTER","viewport","slice","8848jMYusg","createProgram","FRAGMENT_SHADER"];return(N=function(){return e})()}const H=Pe;!function(e,t){const r=Pe,n=e();for(;;)try{if(818960===-parseInt(r(379))/1*(parseInt(r(644))/2)+-parseInt(r(617))/3*(parseInt(r(764))/4)+-parseInt(r(785))/5*(-parseInt(r(672))/6)+parseInt(r(736))/7+parseInt(r(769))/8*(-parseInt(r(791))/9)+parseInt(r(391))/10*(parseInt(r(751))/11)+parseInt(r(597))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(q);const j={websocket:1,fetch:2,hls:3,webrtc:4,webTransport:5,aliyunRtc:6,ts:7};H(613),H(709),H(559),H(350);const V={fetch:"fetch",hls:H(559),websocket:"websocket",webrtc:H(320),webTransport:"webTransport",worker:H(483),aliyunRtc:"aliyunRtc",mp4:H(353)},W={player:"player",playerAudio:H(739),playbackTF:H(568),talk:"talk",playVod:H(603)},$={mp4:H(353),webm:H(489),flv:H(674),mov:"mov"},G={flv:H(674),m7s:"m7s",hls:H(559),webrtc:"webrtc",webTransport:H(350),nakedFlow:"nakedFlow",fmp4:H(515),mpeg4:"mpeg4",aliyunRtc:H(464),ts:"ts",g711:H(495),pcm:H(400)};function q(){const e=["multiDblSelected","fetchClose","candidate-pair","mseUpdateVideoTimestamp","isMulti","netBuf","videoSEISyncPts","9725280KVoAoQ","缓冲区已满","open","notSupportNewWasm","talkStreamInactive","Simd","playVod","flvMetaData","ratechange","mseSourceClose","initAudio","websocket1006Error","outbound-rtp","初始化音频解码器失败","canvas","MEDIA_ERR_DECODE","websocket","#343434","sendMessage","replayUseLastFrameShow","3339yJbsKN","playbackSeek","audioCode","video自动渲染失败","networkDelay","render","global","kBps","halfHour","normal","webrtcClosed","MEDIA_ERR_NETWORK","streamStats","close","multiDragstart","sourceended","websocketStringMsg","switch-url-failed","buffer","不支持硬解码H265","media-source","stalled","talkGetUserMediaTimeout","zooming","wiperClose","videoRenderSupportScale","rightUp","273242Wwzrdr","player","playVodPauseOrResume","waiting","fiveMin","apertureFar","webgpu","recording","message","networkDelayTimeout","sourceclose","webcodecsAudioInitTimeout","red","playVodMp4Error","stats","transport","playing","loadingTimeout","jtt","white","crashLog","mseSourceOpen","speed","decoderWorkerWasmError","streamEndInner","aacSequenceHeader","audioInfo","downloadMemoryLog","150yMmgRf","加载超时重播失败","flv","multiSelected","fetchErrorWorker","decoderWorkerInitError","buffereos","right-down","paused","webrtc-disconnected","multiMousemove","video","qualitychange","wasmError","电子放大","mseWidthOrHeightChange","occlusionDetectActive","removeLoadingBgImage","load-complete","receiver","MULAW(g711u)","inView","videoElementPlayingFailedForWebrtc","iframeIntervalTs","multiDragenter","imageDetectActive","aiFaceDetectorInfo","mseSourceStartStreaming","mediaSourceUseCanvasRenderPlayFailed","streamAbps","focusNear","0000000000",'video/mp4;codecs="hev1.2.4.L120.90"',"MediaSource解码使用canvas渲染失败","20251201","webgl 上下文丢失","multiMouseover","fetch","性能面板","init","streamRate","multiDrop","wiperOpen","timeupdate","talkFailedAndStop","webcodecsDecodeConfigureError","解码失败","mouseDownAndUp","videoDecode","load","isFmp4","A key frame is required after configure() or flush()","fetchSuccess","playVodTimeCache","recordCancel","complete","人脸识别","videoCodec","webrtcOnIceConnectionStateChange","websocketOpen","decoder-pro-hard.js","window","playVodCanplay","dynamicWatermarkConfig","6904170tsjvVu","mediaSourceDecoderConfigurationError",'video/mp4;codecs="hev1.1.6.L120.90"',"playerAudio","jessibuca-pro-mp4-recorder-decoder.js","Decoder failure","playVodEndedAndReplay","track","g711u","/crypto/","解析视频分辨率失败","recordBlob","ended","streamEnd","mseDecodeError","11gIQbgO","decoderWorkerInit","aiObjectDetectorInfo","playVodTime","websocketError","container","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C(wasm%E5%86%85%E9%83%A8%E4%BC%9A%E6%9A%82%E5%81%9C%E8%A7%A3%E7%A0%81)%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","loadingTimeoutRetryEnd","性能面板激活","mseSourceBufferError","初始化解码器失败","aiOcclusionDetectResult","硬解码不支持G711a/u音频格式","1236sufQKy","播放超时重播失败","resetDecode","isAliyunRtc","playbackPreRateChange","12381560btbYal","mseWorkerAddSourceBufferError","playbackPause","sei-in-time","videoNalu","JessibucaPro","talkStreamError","opus","fiStop","buffering","ghostWatermarkConfig","videoPayload","mseSourceBufferFull","togglePerformancePanel","pause","g711a","231640HrloMK","full","clickInitPlayer","decoder-pro-audio.js","ten-min","mseSourceEndStreaming","9RLkhLW","FMP4","videoWaiting","object","webrtcError","multiDragleave","webcodecsH265NotSupport","simple","webFullscreen","webrtc","ulaw","webrtcStreamH265","visibilityChange","worklet","flvBufferData","videoElementPlayingFailed","emptied","流异常","resetVideoDecode","destroy","audioAACSequenceHeader","start","操作盘","FLV待解封装buffer过大","sourcebuffer-created","请求结束","playToRenderTimes","left-down","none","hevc","websocketOpenTimeout","workerEnd","webrtc不支持H265","videoSyncAudio","leftUp","delta","delayTimeoutRetryEnd","fogOpen","fetchError","webTransport","videoSEI","MPEG4","mp4","videoTimeUpdate","Cannot call 'decode' on a closed codec","created",'video/mp4;codecs="hev1.4.10.L120.90"',"blob","isWebrtcForSRS","flvDemuxBufferSizeTooLarge","cruiseStart","five-min","simdDecodeError","csrc","image/jpeg","人脸识别激活","audioNalu","webrtc-failed","aliyunRtcError","wasmWidthOrHeightChange","blur","操作盘激活","oneHour","error","isMpeg4","AAC","talkStreamOpen","no-audio-track","11DFgVdZ","playVodSeekEnd","mediaSourceAudioNoDataTimeout","recordStart","请求失败","stream","tallWebsocketClosedByError","log","right","fullscreen","hls-manifest-loaded","关闭电子放大","12584530DWuEDT",'video/mp4; codecs="avc1.64002A"',"decoder-pro.js","webrtcDisconnect","initVideoCodec","3-1","playVodWaiting","sendWsMessage","rightDown","pcm","playVodRateChange","初始化解码worker超时","script","playVodPause","webglContextLostError","metadata-parsed","volumechange","物品识别","MULAW","hlsError","apertureNear","active","loadedmetadata","isHls","isDropping","inbound-rtp","playbackShowPrecisionChange","av1","mute","download","playbackTimestamp","ALAW(g711a)","mseSourceended","controlSize","multiIndex","1-1","wcsDecodeError","videoInfo","subtitle-segments","recordCreateError","ttfb","4-1","streamVbps","talkStreamClose","currentPts","decode","click","online","webglAlignmentError","AbortError",'video/mp4;codecs="hev1.3.E.L120.90"',"empty","Webgl 渲染失败","Decoder error","playbackEnd","Wasm","switch-url-success","suspend","wcsWidthOrHeightChange","playbackTimeScroll","talkGetUserMediaFail","clearBuffer","playbackJustTime","网络超时重播失败","fetchStream","play","wcs","focus","multiFullscreen","image/png","canplaythrough","one-hour","playIsNotPauseOrUrlIsNull","aliyunRtc","tenMin","videoSequenceHeader","videoSmooth","down","wasm","timeout","audioResumeState","streamSuccess","volume","playbackTime","remote-candidate","webgl","webrtc-checking","isFlv","closeEnd","resize","simdH264DecodeVideoWidthIsTooLarge","isWebrtc","worker","Unsupported configuration","playVodEnded","flv-script-data","multiMousedown","sei","webm","load-response-headers","wasm解码失败","mp4Error","ceil","connecting","g711","退出全屏","playVodVideoSeekedByMse","record","remove-buffer","offline","remote-outbound-rtp","recordEnd","videoCode","stream-parsed","playbackStreamVideoFps","webrtcConnected","memory access out of bounds","focusFar","等待音频数据超时","warn","pauseAndNextPlayUseLastFrameShow","webrtcOnConnectionStateChange","保存日志","5min","fmp4","leftDown","Invalid NAL unit size","MP3","hls-level-loaded","isWebrtcForOthers","decoder-pro-audio-player.js","sender","音频通道错误","playFailedAndPaused","defaultStreamQuality","遮挡物检查","stop","HEVC decoding is not supported","left-up","audioChannelError","notConnect","playbackIsPause","peer-connection","videoInfoError","avc","H265(HEVC)","playVodSeek","mediaSourceH265NotSupport","progress","objectDetectActive","performance","jbprov","offscreen","certificate","decoder-pro-old.js","playbackRateChange","3-4","mse","ptz","load-retry","webrtc-closed","webrtcIceCandidateError","tcp","mediaSourceAudioInitTimeout","default","multiMouseout","talkStreamMsg","webrtcChecking","hls","H264(AVC)","MEDIA_ERR_ABORTED","canplay","aiImageDetectResult","FSimd","audioDecode","timeUpdate","simd","playbackTF","播放地址不能为空","codec","ws1006","rtp","playVodStats","fullScreenByStart","streamQualityChange","networkState","left","playbackEndInner","tempStream","loading","delayTimeout","memoryLog","video decoder initialization failed","websocketClose","failedToAsynchronouslyPrepareWasm","playbackStats","streamMessage","supportHls265","debug"];return(q=function(){return e})()}H(792),H(352);const Y={mse:H(548),wcs:H(457),offscreen:"offscreen",wasm:"wasm",simd:H(567),mt:"mt",webrtc:H(320),hls:H(559),aliyunRtc:H(464)},K={canvas:H(611),video:H(683)},X={debug:H(589),warn:H(510)},J={click:H(437),mouseDownAndUp:H(719)},Z={normal:H(626),simple:H(798)},Q={normal:H(626),small:"small"},ee=H(774),te=H(706),re=36e5,ne=4080,ie=12;H(745),H(542);const se={playIsNotPauseOrUrlIsNull:H(569),webglAlignmentError:H(443),webglContextLostError:H(707),mediaSourceH265NotSupport:H(636),mseSourceBufferFull:H(598),mediaSourceAppendBufferError:H(761),mseSourceBufferError:H(718),mseAddSourceBufferError:H(761),mseWorkerAddSourceBufferError:H(761),mediaSourceDecoderConfigurationError:H(761),mediaSourceTsIsMaxDiff:H(328),mseWidthOrHeightChange:H(328),mediaSourceAudioG711NotSupport:H(763),mediaSourceAudioInitTimeout:H(610),mediaSourceAudioNoDataTimeout:H(509),mediaSourceUseCanvasRenderPlayFailed:H(705),mediaSourceBufferedIsZeroError:H(328),webcodecsH265NotSupport:H(636),webcodecsUnsupportedConfigurationError:H(761),webcodecsDecodeConfigureError:H(761),webcodecsDecodeError:H(718),webcodecsAudioInitTimeout:"初始化音频解码器失败",webcodecsAudioNoDataTimeout:H(509),wcsWidthOrHeightChange:H(718),wasmDecodeError:H(718),simdDecodeError:H(718),wasmWidthOrHeightChange:H(328),wasmUseVideoRenderError:H(620),videoElementPlayingFailed:"video自动渲染失败",simdH264DecodeVideoWidthIsTooLarge:"不支持该分辨率的视频",networkDelayTimeout:H(454),fetchError:"请求失败",streamEnd:H(336),websocket1006Error:"流异常结束",websocketError:H(383),webrtcError:H(383),hlsError:H(383),decoderWorkerInitError:"初始化worker失败",decoderWorkerWasmError:H(491),videoElementPlayingFailedForWebrtc:H(620),videoInfoError:H(746),webrtcStreamH265:H(343),delayTimeout:H(765),loadingTimeout:H(673),loadingTimeoutRetryEnd:"加载超时重播失败",delayTimeoutRetryEnd:H(765),flvDemuxBufferSizeTooLarge:H(334),audioChannelError:H(523),aliyunRtcError:H(383),mseWaitVideoCanplayTimeout:H(328),initDecoderWorkerTimeout:H(402)},oe={playType:W[H(645)],videoBuffer:1e3,videoBufferDelay:1e3,networkDelay:1e4,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isFmp4:!1,isWebrtc:!1,isWebrtcForZLM:!1,isWebrtcForSRS:!1,webrtcForSRSBySDK:!1,isWebrtcForOthers:!1,isNakedFlow:!1,isMpeg4:!1,isAliyunRtc:!1,isTs:!1,debug:!1,debugLevel:X[H(510)],debugUuid:"",isMulti:!0,multiIndex:-1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,pageVisibilityHiddenTimeout:300,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,heartTimeoutReplayUseLastFrameShow:!0,replayUseLastFrameShow:!0,replayShowLoadingIcon:!1,supportDblclickFullscreen:!1,showBandwidth:!1,showPerformance:!1,mseCorrectTimeDuration:20,mseCorrectAudioTimeDuration:20,keepScreenOn:!0,isNotMute:!1,muted:!0,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1,ptz:!1,quality:!1,zoom:!1,close:!1,scale:!1,performance:!1,logSave:!1,aiFace:!1,aiObject:!1,aiOcclusion:!1,fullscreenFn:null,fullscreenExitFn:null,screenshotFn:null,playFn:null,pauseFn:null,recordFn:null,recordStopFn:null},extendOperateBtns:[],contextmenuBtns:[],watermarkConfig:{},controlAutoHide:!1,controlAutoHideDelayTime:5,hasControl:!1,controlSize:Q[H(626)],loadingIcon:!0,loadingIconStyle:{},loadingText:"",background:"",poster:"",backgroundLoadingShow:!0,loadingBackground:"",loadingBackgroundWidth:0,loadingBackgroundHeight:0,decoder:H(393),decoderOld:H(545),decoderAudio:H(788),decoderHard:H(732),decoderHardNotWasm:"decoder-pro-hard-not-wasm.js",wasmMp4RecorderDecoder:H(740),decoderWASM:"",isDecoderUseCDN:!1,url:"",rotate:0,mirrorRotate:H(339),aspectRatio:H(555),playbackConfig:{playList:[],fps:"",autoCalcFps:!0,showControl:!0,controlType:Z.normal,duration:0,startTime:"",showRateBtn:!1,rateConfig:[],showPrecision:"",showPrecisionBtn:!0,isCacheBeforeDecodeForFpsRender:!1,uiUsePlaybackPause:!1,isPlaybackPauseClearCache:!0,isUseFpsRender:!1,isUseLocalCalculateTime:!1,localOneFrameTimestamp:40,supportWheel:!1,useWCS:!1,useMSE:!1,useSIMD:!0},qualityConfig:[],defaultStreamQuality:"",scaleConfig:["拉伸","缩放","正常"],forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:j[H(709)],demuxType:G[H(674)],useWasm:!1,useOldWasm:!1,useMSE:!1,useWCS:!1,useSIMD:!0,isFFmpegSIMD:!1,useMThreading:!1,preferredHardDecode:!1,wcsUseVideoRender:!0,wcsUseWebgl2Render:!1,wasmUseVideoRender:!0,mseUseCanvasRender:!1,hlsUseCanvasRender:!1,webrtcUseCanvasRender:!1,useOffscreen:!1,useWebGPU:!1,useWebCanvas:!1,mseDecodeErrorReplay:!0,wcsDecodeErrorReplay:!0,wasmDecodeErrorReplay:!0,simdDecodeErrorReplay:!0,simdDecodeErrorReplayType:Y[H(469)],autoWasm:!0,decoderErrorAutoWasm:!1,hardDecodingNotSupportAutoWasm:!0,webglAlignmentErrorReplay:!0,webglContextLostErrorReplay:!0,openWebglAlignment:!1,syncAudioAndVideo:!0,syncAudioAndVideoDiff:400,playbackDelayTime:1e3,playbackFps:25,playVodFps:25,playbackForwardMaxRateDecodeIFrame:4,playbackCurrentTimeMove:!0,useVideoRender:!0,useCanvasRender:!1,videoRenderType:"",networkDelayTimeoutReplay:!1,recordType:$[H(353)],checkFirstIFrame:!0,nakedFlowFps:25,audioEngine:null,isShowRecordingUI:!0,isShowZoomingUI:!0,useFaceDetector:!1,useObjectDetector:!1,useImageDetector:!1,useOcclusionDetector:!1,ptzPositionConfig:{},ptzShowType:"vertical",ptzClickType:J[H(437)],ptzStopEmitDelay:.3,ptzZoomShow:!1,ptzApertureShow:!1,ptzFocusShow:!1,ptzMoreArrowShow:!1,ptzCruiseShow:!1,ptzFogShow:!1,ptzWiperShow:!1,ptzSupportDraggable:!1,weiXinInAndroidAudioBufferSize:4800,isCryptoAudio:!1,isM7sCrypto:!1,isSm4Crypto:!1,isSm4CryptoH265V2:!1,isXorCrypto:!1,sm4CryptoKey:"",m7sCryptoKey:"",xorCryptoKey:"",cryptoKey:"",cryptoIV:"",cryptoKeyUrl:"",listenWindowResizeAuoResize:!0,orientationChangeResize:!1,useWebFullScreen:!1,ptsMaxDiff:3600,aiFaceDetectLevel:2,aiFaceDetectWidth:240,aiFaceDetectEmitBase64:!1,aiFaceDetectShowRect:!0,aiFaceDetectInterval:1e3,aiFaceDetectRectConfig:{},aiObjectDetectLevel:2,aiObjectDetectWidth:240,aiObjectDetectShowRect:!0,aiObjectDetectInterval:1e3,aiObjectDetectRectConfig:{},aiObjectDetectTarget:"",aiOcclusionDetectInterval:1e3,aiImageDetectDrop:!1,aiImageDetectActive:!1,videoRenderSupportScale:!0,mediaSourceTsIsMaxDiffReplay:!0,controlHtml:"",isH265:!1,isWebrtcH265:!1,supportLockScreenPlayAudio:!0,supportHls265:!0,hls265ForceFixLargeGap:!0,isEmitSEI:!1,pauseAndNextPlayUseLastFrameShow:!1,demuxUseWorker:!0,playFailedAndReplay:!0,showMessageConfig:se,videoElementPlayingFailedReplay:!0,mp4RecordUseWasm:!0,mseAutoCleanupSourceBuffer:!0,mseAutoCleanupMaxBackwardDuration:30,mseAutoCleanupMinBackwardDuration:10,widthOrHeightChangeReplay:!0,simdH264DecodeVideoWidthIsTooLargeReplay:!0,mediaSourceAudioG711NotSupportReplay:!0,mediaSourceAudioInitTimeoutReplay:!0,mediaSourceAudioNoDataTimeoutReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplayType:K[H(683)],webcodecsAudioInitTimeoutReplay:!0,webcodecsAudioNoDataTimeoutReplay:!0,widthOrHeightChangeReplayDelayTime:0,ghostWatermarkConfig:{on:5,off:5,content:"",fontSize:12,color:H(663),opacity:.15,speed:.2},dynamicWatermarkConfig:{content:"",speed:.2,fontSize:12,color:H(663),opacity:.15},isDropSameTimestampGop:!1,mseDecodeAudio:!0,wcsDecodeAudio:!0,nakedFlowH265DemuxUseNew:!0,nakedFlowDemuxUseNew:!0,extendDomConfig:{html:"",showBeforePlay:!1,showAfterLoading:!0},disableContextmenu:!1,mseDecoderUseWorker:!0,openMemoryLog:!1,mainThreadFetchUseWorker:!0,playFailedAndPausedShowPlayBtn:!0,mseCorrectionTimestamp:!0,flvDemuxBufferSizeTooLargeReplay:!1,flvDemuxBufferSizeTooLargeEmitFailed:!1,flvDemuxBufferSizeMaxLarge:1048576,isCheckInView:!1,hiddenControl:!1,androidMobileFullscreenRotate:!0,disableModule:{ptz:!1,record:!1,zoom:!1,watermark:!1,playback:!1},recordWebMSupportSeek:!1,wasmPlayAudioUseVideoRender:!1,mseWaitVideoCanplayTimeout:6,mseWaitVideoCanplayAutoWasm:!0,zoomMaxScale:5,zoomSupportGestureInMobile:!1,zoomSupportGestureInMobileSpeed:.2,drawingRectColor:H(656),drawingRectLineWidth:1,drawingRectEndRemoveDom:!0,videoSEISyncPtsDiff:.2,initShowPlayBtn:!1,playbackCheckStreamEnd:!0,autoUseSystemFullScreen:!0,playVodConfig:{showRateBtn:!1,rateConfig:[],useWCS:!1,useMSE:!0,useSIMD:!0,startTime:null},playVodForwardMaxRateDecodeIFrame:8,playVodEndedAndAutoReplay:!1,playVodEndedAndShowPlayBtn:!0,hotKeyVolumeStep:.05,hotKeySeekStep:5,websocketOpenTimeout:8,i18n:{},screenshotUseHighQuality:!1,requestAnimationFrameMaxDiff:800,isUseFileProtocol:!1};H(594),H(588),H(511),H(616),H(424),H(425),H(478),H(722),H(375),H(414),H(482),H(359),H(520),H(767),H(779),H(735),H(525),H(642),H(470),H(661);const ae={init:H(711),initVideo:"initVideo",render:H(622),playAudio:"playAudio",initAudio:H(607),kBps:H(624),decode:H(436),audioCode:H(619),audioNalu:H(367),audioAACSequenceHeader:H(331),videoCode:H(503),videoCodec:H(729),videoNalu:H(773),videoPayload:H(780),audioPayload:"audioPayload",wasmError:H(685),workerFetch:"workerFetch",iframeIntervalTs:H(695),isDropping:H(415),workerEnd:H(342),networkDelay:H(621),playbackStreamVideoFps:H(505),wasmWidthOrHeightChange:H(370),simdDecodeError:H(363),simdH264DecodeVideoWidthIsTooLarge:H(481),websocketOpen:"websocketOpen",websocketStringMsg:"websocketStringMsg",closeEnd:H(479),tempStream:H(579),videoSEI:"videoSEI",flvScriptData:"flvScriptData",aacSequenceHeader:H(669),videoSequenceHeader:H(466),flvBufferData:H(325),checkFirstIFrame:"checkFirstIFrame",mseHandle:"mseHandle",mseFirstRenderTime:"mseFirstRenderTime",mseError:"mseError",notSupportNewWasm:H(600),failedToAsynchronouslyPrepareWasm:H(585)};H(517);const ce={audio:1,video:2},ue={audio:8,video:9,scriptData:18},le={init:H(711),decode:"decode",audioDecode:H(565),videoDecode:H(720),initAudioCodec:"initAudioCodec",initVideoCodec:H(395),close:H(630),updateConfig:"updateConfig",resetDecode:H(766),clearBuffer:H(452),resetAudioDecode:"resetAudioDecode",resetVideoDecode:H(329),fetchStream:H(455),sendWsMessage:H(398),mseUpdateVideoTimestamp:H(593),playbackIsPause:H(532)};H(709),H(330),H(635),H(676),H(591),H(724),H(711),H(709),H(615),H(330),H(635),H(755),H(584),H(711);const de={fullscreen:"fullscreen$2",fullScreenByStart:H(574),webFullscreen:"webFullscreen",decoderWorkerInit:H(752),play:H(456),playing:H(660),pause:H(783),mute:"mute",load:H(721),loading:H(580),zooming:H(640),drawingRect:"drawingRect",drawingRectInfo:"drawingRectInfo",videoInfo:H(428),timeUpdate:H(566),audioInfo:H(670),log:H(386),error:"error",kBps:H(624),timeout:H(470),delayTimeout:"delayTimeout",delayTimeoutRetryEnd:H(347),loadingTimeout:H(661),loadingTimeoutRetryEnd:H(758),stats:"stats",performance:"performance",videoSmooth:H(467),faceDetectActive:"faceDetectActive",objectDetectActive:H(540),occlusionDetectActive:H(688),imageDetectActive:H(697),record:H(498),recording:H(651),recordingTimestamp:"recordingTimestamp",recordStart:H(382),recordEnd:H(502),recordCreateError:H(430),recordBlob:H(747),recordCancel:H(726),buffer:"buffer",videoFrame:"videoFrame",videoSEI:H(351),videoSEISyncPts:H(596),start:H(332),metadata:"metadata",resize:H(480),volumechange:"volumechange",volume:H(473),destroy:H(330),beforeDestroy:"beforeDestroy",streamEnd:H(749),streamRate:H(712),streamAbps:H(701),streamVbps:H(433),streamDts:"streamDts",streamSuccess:H(472),streamMessage:H(587),streamError:"streamError",streamStats:H(629),streamEndInner:H(668),mseSourceOpen:H(665),mseSourceClose:H(606),mseSourceended:H(423),mseSourceStartStreaming:H(699),mseSourceEndStreaming:H(790),mseSourceBufferError:H(760),mseAddSourceBufferError:"mseAddSourceBufferError",mseWorkerAddSourceBufferError:H(770),mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:H(781),videoWaiting:H(793),videoTimeUpdate:H(354),videoSyncAudio:H(344),playToRenderTimes:H(337),playbackTime:H(474),playbackTimestamp:H(421),playbackTimeScroll:H(450),playbackPrecision:"playbackPrecision",playbackShowPrecisionChange:H(417),playbackJustTime:H(453),playbackStats:H(586),playbackSeek:H(618),playbackPause:H(771),playbackPauseOrResume:"playbackPauseOrResume",playbackRateChange:H(546),playbackPreRateChange:H(768),playbackEndInner:H(578),playbackEnd:H(445),playVodStats:H(573),playVodPause:H(404),playVodPauseOrResume:"playVodPauseOrResume",playVodRateChange:H(401),playVodTime:H(754),playVodTimeCache:H(725),playVodSeek:"playVodSeek",playVodSeekEnd:H(380),playVodVideoSeekingByMse:"playVodVideoSeekingByMse",playVodVideoSeekedByMse:H(497),playVodCanplay:H(734),playVodWaiting:H(397),playVodEndedAndReplay:H(742),playVodEnded:H(485),ptz:H(549),streamQualityChange:H(575),visibilityChange:"visibilityChange",netBuf:H(595),close:H(630),networkDelayTimeout:"networkDelayTimeout",togglePerformancePanel:H(782),viewResizeChange:"viewResizeChange",flvDemuxBufferSizeTooLarge:H(360),talkGetUserMediaSuccess:"talkGetUserMediaSuccess",talkGetUserMediaFail:H(451),talkGetUserMediaTimeout:H(639),talkStreamStart:"talkStreamStart",talkStreamOpen:H(377),talkStreamClose:H(434),talkStreamError:"talkStreamError",talkStreamInactive:H(601),talkStreamMsg:H(557),webrtcDisconnect:H(394),webrtcFailed:"webrtcFailed",webrtcClosed:H(627),webrtcChecking:H(558),webrtcConnected:H(506),webrtcCompleted:"webrtcCompleted",webrtcOnConnectionStateChange:H(512),webrtcOnIceConnectionStateChange:H(730),crashLog:H(664),focus:H(458),blur:H(371),inView:H(693),visibilityHiddenTimeout:"visibilityHiddenTimeout",websocketOpen:H(731),websocketClose:H(584),websocketError:H(755),websocketStringMsg:H(633),aiObjectDetectorInfo:H(753),aiFaceDetectorInfo:"aiFaceDetectorInfo",aiOcclusionDetectResult:"aiOcclusionDetectResult",aiImageDetectResult:H(563),playFailedAndPaused:"playFailedAndPaused",audioResumeState:H(471),webrtcStreamH265:H(322),flvMetaData:"flvMetaData",talkFailedAndStop:H(716),removeLoadingBgImage:H(689),memoryLog:H(582),downloadMemoryLog:H(671),pressureObserverCpu:"pressureObserverCpu",currentPts:H(435),online:H(438),offline:H(500),networkState:H(576),clickInitPlayer:"clickInitPlayer"};H(721),H(566),H(428),H(670),H(374),H(624),H(332),H(661),H(758),H(581),H(388),H(799),H(456),H(783),H(419),H(658),H(541),H(382),H(430),H(726),H(337),H(618),H(586),H(421),H(546),H(417),H(445),H(485),H(646),H(401),H(754),H(537),H(380),H(549),H(640),H(664),H(458),H(371),H(323),H(653),H(753),H(698),H(762),H(563),H(524),H(749),H(471),H(351),H(604),H(512),H(730),H(435),H(467),H(576),H(473),H(787),H(434),H(775),H(639),H(716),H(557),H(721),H(566),H(374),H(624),H(470),H(661),H(758),H(581),H(456),H(419),H(658),H(337),H(664),H(731),H(584),H(524),H(471);const he={talkStreamError:de[H(775)],talkStreamClose:de[H(434)]},fe={playError:H(463),fetchError:H(349),fetchErrorWorker:"fetchErrorWorker",websocketError:H(755),websocketOpenTimeout:H(341),webcodecsH265NotSupport:H(797),webcodecsDecodeError:"webcodecsDecodeError",webcodecsUnsupportedConfigurationError:"webcodecsUnsupportedConfigurationError",webcodecsDecodeConfigureError:H(717),webcodecsAudioInitTimeout:H(655),webcodecsAudioNoDataTimeout:"webcodecsAudioNoDataTimeout",mediaSourceH265NotSupport:H(538),mediaSourceAudioG711NotSupport:"mediaSourceAudioG711NotSupport",mediaSourceAudioInitTimeout:H(554),mediaSourceAudioNoDataTimeout:H(381),mediaSourceDecoderConfigurationError:H(737),mediaSourceFull:de[H(781)],mseSourceBufferError:de.mseSourceBufferError,mseAddSourceBufferError:de.mseAddSourceBufferError,mseWorkerAddSourceBufferError:de[H(770)],mediaSourceAppendBufferError:"mediaSourceAppendBufferError",mediaSourceTsIsMaxDiff:"mediaSourceTsIsMaxDiff",mediaSourceUseCanvasRenderPlayFailed:H(700),mediaSourceBufferedIsZeroError:"mediaSourceBufferedIsZeroError",wasmDecodeError:"wasmDecodeError",wasmUseVideoRenderError:"wasmUseVideoRenderError",simdH264DecodeVideoWidthIsTooLarge:H(481),simdDecodeError:"simdDecodeError",hlsError:H(410),webrtcError:H(795),webrtcClosed:de[H(627)],webrtcIceCandidateError:H(552),webglAlignmentError:H(439),wasmWidthOrHeightChange:H(370),mseWidthOrHeightChange:H(687),wcsWidthOrHeightChange:H(449),widthOrHeightChange:"widthOrHeightChange",tallWebsocketClosedByError:H(385),flvDemuxBufferSizeTooLarge:de[H(360)],audioChannelError:H(530),webglContextLostError:H(405),videoElementPlayingFailed:H(326),videoElementPlayingFailedForWebrtc:H(694),decoderWorkerInitError:H(677),decoderWorkerWasmError:H(667),videoInfoError:H(534),streamEnd:de[H(749)],websocket1006Error:H(608),delayTimeout:de[H(581)],loadingTimeout:de.loadingTimeout,networkDelayTimeout:de[H(653)],fullscreenError:"fullscreenError",aliyunRtcError:H(369),mseWaitVideoCanplayTimeout:"mseWaitVideoCanplayTimeout",initDecoderWorkerTimeout:"initDecoderWorkerTimeout",notSupportNewWasm:H(600),failedToAsynchronouslyPrepareWasm:H(585),playVodMp4Error:H(657),mp4Error:H(492),...he},pe={notConnect:H(531),open:H(599),close:H(630),error:H(374)},me={connecting:0,open:1,closing:2,closed:3};H(442),H(778),H(786),H(420),H(358),H(420),H(358),H(560),H(536),H(352);const ve={h264:7,h265:12,mpeg4:99},ye={h264:H(560),h265:H(536)},ge={AAC:10,ALAW:7,MULAW:8,MP3:2,OPUS:13,G711A:7,G711U:8};H(376),H(422),H(692),H(518),H(376),H(409),H(518);const _e={sps:7,pps:8,iFrame:5,kUnspecified:0,kSliceNonIDR:1,kSliceDPA:2,kSliceDPB:3,kSliceDPC:4,kSliceIDR:5,kSliceSEI:6,kSliceSPS:7,kSlicePPS:8,kSliceAUD:9,kEndOfSequence:10,kEndOfStream:11,kFiller:12,kSPSExt:13,kReserved0:14},we={pFrame:1,kSliceBLA_W_LP:16,kSliceBLA_W_RADL:17,kSliceBLA_N_LP:18,iFrame:19,kSliceIDR_W_RADL:19,nLp:20,kSliceIDR_N_LP:20,craNut:21,kSliceCRA_NUT:21,kSliceRSV_IRAP_VCL22:22,kSliceRSV_IRAP_VCL23:23,vps:32,kSliceVPS:32,sps:33,kSliceSPS:33,pps:34,kSlicePPS:34,kSliceAUD:35,sei:39,prefixSei:39,suffixSei:40};H(476),H(650),H(543),H(548),H(320),H(611);const be={key:"key",delta:H(346)},Se={avc:H(392),hev:'video/mp4; codecs="hev1.1.6.L123.b0"',hev2:H(738),hev3:H(704),hev4:H(441),hev5:H(357)},Ee={ended:H(748),open:"open",closed:"closed"};Math[H(493)](40),H(373),H(625),H(648),H(462),H(789),H(362),H(514),H(625),H(465),H(387),H(468),H(577),H(529),H(338),H(679),H(387),H(468),H(577),H(345),H(516),H(643),H(399),H(527),H(777),H(649),H(411),H(508),H(702),H(361),H(348),H(714),H(641);H(744),H(776);H(460),H(365);const Ie={sourceClose:H(654),sourceOpen:"sourceopen",sourceended:H(632),startstreaming:"startstreaming",endstreaming:"endstreaming",qualitychange:H(684)};H(562),H(647),H(715),H(605),H(638),H(539),H(413);const ke={h264:H(535),h265:H(340),av1:H(418)};H(723),H(355),H(484),H(741),H(444),H(528);const Ae={abortError:"The user aborted a request",abortError2:H(440),abort:H(440)};H(580),H(660),H(680),H(330);const Ce={sequenceHeader:0,nalu:1},Te=1;H(442),H(572),H(662),H(553);H(384),H(630),H(374),H(652);H(324),H(403);H(784),H(572),H(553),H(703),H(324),H(412),H(614),H(459),H(590),H(675),H(708),H(556),H(487),H(682),H(631),H(696),H(796),H(713),H(396),H(432),H(426),H(547),H(756),H(683);const xe={keyFrame:1,interFrame:2};H(739),H(510),H(709),H(521),H(429),H(389),H(519),H(486),H(406),H(431),H(550),H(666),H(690),H(490),H(488),H(772),H(378),H(499),H(678),H(335),H(634),H(447),H(504),H(374);const De={idle:"idle",connecting:H(494),buffering:H(778),error:H(374),complete:H(727)};function Pe(e,t){const r=q();return(Pe=function(e,t){return r[e-=320]})(e,t)}H(561),H(628),H(612),H(583),H(507);const Be={video:1,audio:2},Me=128,Fe={PACKET_TYPE_SEQ_START:0,PACKET_TYPE_FRAMES:1,PACKET_TYPE_SEQ_END:2,PACKET_TYPE_FRAMESX:3,PACKET_TYPE_METADATA:4},Ue={FT_KEY:16,FT_INTER:32};H(592),H(544),H(570),H(364),H(416),H(609),H(533),H(691),H(475),H(501),H(522),H(743),H(659),H(637),H(571),H(750),H(427),H(321),H(776),H(477),H(681),H(368),H(551),H(356);const Re=typeof window===H(794)&&window[H(733)]===window?window:typeof self===H(794)&&self.self===self?self:"object"==typeof global&&global[H(623)]===global?global:void 0;H(562),H(461),H(727),H(327),H(374),H(413),H(783),H(456),H(660),H(539),H(605),H(638),H(448),H(407),H(647),H(374),H(496),H(333),H(372),H(686),H(390),H(710),H(759),H(728),H(366),H(408),H(526),H(513),H(446),H(602),H(564),H(757);var Le="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Oe(e,t){return e(t={exports:{}},t.exports),t.exports}var ze=Object.freeze({__proto__:null,commonjsGlobal:Le,commonjsRequire:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},unwrapExports:function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e},createCommonjsModule:Oe,getCjsExportFromNamespace:function(e){return e&&e.default||e}});function Ne(){var e=["then","isEnabled","exit","length","webkitRequestFullscreen","exitFullscreen","194268wgodBb","4552430fXxiNn","webkitfullscreenchange","MSFullscreenError","1218244DRbsVP","bind","catch","off","webkitRequestFullScreen","change","addEventListener","14476077ZRTEAY","defineProperties","object","fullscreenElement","MSFullscreenChange","5773564tuImps","mozfullscreenchange","msFullscreenElement","createCommonjsModule","mozCancelFullScreen","documentElement","webkitCurrentFullScreenElement","1zfNHlA","webkitFullscreenElement","mozfullscreenerror","webkitCancelFullScreen","undefined","5394LtfQEP","mozRequestFullScreen","request","fullscreenEnabled","isFullscreen","msFullscreenEnabled","msExitFullscreen","document","screenfull","mozFullScreenElement","exports","requestFullscreen","removeEventListener","msRequestFullscreen","6830928ALCMpJ","1393UmjBGl","fullscreenchange","fullscreenerror","webkitExitFullscreen","webkitfullscreenerror"];return(Ne=function(){return e})()}var He=je;function je(e,t){var r=Ne();return(je=function(e,t){return r[e-=253]})(e,t)}function Ve(){const e=["byteLength","_fillCurrentWord","subarray","getUint32","22qDlqRs","ExpGolomb: readBits() bits exceeded max 32bits!","min","3986276jVKmkE","4sxvGlr","2721528nxOAdH","readBool","2872872VtHZox","599865YbVwGn","_current_word","2uUCsST","readUEG","readSEG","_buffer_index","4212280Luipvu","8pmNAPg","readByte","_total_bytes","readBits","_buffer","set","269978ZnGEHJ","30oBEYkI","buffer","_skipLeadingZero","512755OsNhxR","_current_word_bits_left"];return(Ve=function(){return e})()}!function(e,t){for(var r=je,n=e();;)try{if(792515===parseInt(r(305))/1*(-parseInt(r(286))/2)+-parseInt(r(282))/3+parseInt(r(298))/4+-parseInt(r(283))/5+parseInt(r(256))/6*(parseInt(r(271))/7)+-parseInt(r(270))/8+parseInt(r(293))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ne),ze[He(301)]((function(e){var t,r,n,i,s,o;t=je,r=typeof window!==t(255)&&typeof window[t(263)]!==t(255)?window[t(263)]:{},n=t(295)!==t(255)&&e[t(266)],i=function(){for(var e,n=t,i=[[n(267),n(281),"fullscreenElement",n(259),"fullscreenchange",n(273)],[n(280),n(274),n(306),"webkitFullscreenEnabled",n(284),n(275)],[n(290),n(254),n(304),n(254),"webkitfullscreenchange",n(275)],[n(257),n(302),n(265),"mozFullScreenEnabled",n(299),n(253)],[n(269),n(262),n(300),n(261),n(297),n(285)]],s=0,o=i[n(279)],a={};s32&&console.error(t(407)),e<=this[t(401)]){let r=this[t(384)]>>>32-e;return this[t(384)]<<=e,this[t(401)]-=e,r}let r=this._current_word_bits_left?this._current_word:0;r>>>=32-this[t(401)];let n=e-this[t(401)];this[t(403)]();let i=Math[t(408)](n,this[t(401)]),s=this._current_word>>>32-i;return this[t(384)]<<=i,this[t(401)]-=i,r=r<>>t))return this[e(384)]<<=t,this[e(401)]-=t,t;return this[e(403)](),t+this[e(399)]()}[We(386)](){const e=We;let t=this[e(399)]();return this[e(393)](t+1)-1}[We(387)](){let e=this[We(386)]();return 1&e?e+1>>>1:-1*(e>>>1)}}function qe(e,t){const r=tt();return(qe=function(e,t){return r[e-=207]})(e,t)}const Ye=qe;!function(e,t){const r=qe,n=e();for(;;)try{if(791374===parseInt(r(251))/1*(parseInt(r(223))/2)+parseInt(r(224))/3*(parseInt(r(256))/4)+-parseInt(r(230))/5*(parseInt(r(208))/6)+parseInt(r(207))/7*(parseInt(r(275))/8)+parseInt(r(235))/9+-parseInt(r(252))/10+parseInt(r(248))/11*(parseInt(r(271))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(tt);const Ke=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1],Xe=Ke,Je=Ke;function Ze(e){let{profile:t,sampleRate:r,channel:n}=e;return new Uint8Array([175,0,t<<3|(14&r)>>1,(1&r)<<7|n<<3])}function Qe(e){const t=qe;return et(e)&&e[1]===Ce[t(253)]}function et(e){const t=qe;return e[0]>>4===ge[t(211)]}function tt(){const e=["toLowerCase","warn","audioMuxVersionA is Not Supported","readByte","buffer","has_last_incomplete_data","more than 2 numProgram Not Supported","mp4a.40.","unshift","userAgent","3852728oqpaum","sample_rate","bufpos","88589rzXzhn","11246420TwRBDL","sequenceHeader","error","aac","2726208BsHugy","more than 2 numLayer Not Supported","chan_config","readNextAACFrame","eof_flag_","read","indexOf","object_type","getLATMValue","bufoff","byteLength","Flv: AAC invalid channel configuration","firefox","findNextSyncwordOffset","destroy","12MCgAhC","sampling_index","Invalid sampling index: ","readBool","1363848lpfrbb",". Only frameLengthType = 0 Supported","buflen","slice","iserro","subarray","14xCvCYS","248034aFuTCL","more than 2 numSubFrames Not Supported","Could not found ADTS syncword until payload end","AAC","current_syncword_offset_","android","data_","sampling_freq_index","set","allStreamsSameTimeFraming zero is Not Supported","aacEncoderConfigurationRecord","readBits","length","look","hasIncompleteData","4EXAcYl","6NULxic","other_data_present","push","sampling_frequency","channel_config","data","145BWKsNv","sbr","audio_object_type","log","channel: ","7950195ifisnF","sampleRate: ","navigator"];return(tt=function(){return e})()}const rt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];function nt(e){const t=qe;let r=new Uint8Array(e),n=null,i=0,s=0,o=0,a=null;if(i=s=r[0]>>>3,o=(7&r[0])<<1|r[1]>>>7,o<0||o>=rt[t(220)])return void console[t(254)]("Flv: AAC invalid sampling frequency index!");let c=rt[o],u=(120&r[1])>>>3;if(u<0||u>=8)return void console[t(233)](t(267));5===i&&(a=(7&r[1])<<1|r[2]>>>7,r[2]);let l=Re[t(237)][t(247)][t(238)]();return-1!==l[t(262)](t(268))?o>=6?(i=5,n=new Array(4),a=o-3):(i=2,n=new Array(2),a=o):-1!==l[t(262)](t(213))?(i=2,n=new Array(2),a=o):(i=5,a=o,n=new Array(4),o>=6?a=o-3:1===u&&(i=2,n=new Array(2),a=o)),n[0]=i<<3,n[0]|=(15&o)>>>1,n[1]=(15&o)<<7,n[1]|=(15&u)<<3,5===i&&(n[1]|=(15&a)>>>1,n[2]=(1&a)<<7,n[2]|=8,n[3]=0),{audioType:t(255),config:n,sampleRate:c,channelCount:u,objectType:i,codec:t(245)+i,originalCodec:t(245)+s}}Ye(261),Ye(221);class it{constructor(e){const t=Ye;this.data_=e,this.eof_flag_=!1,this[t(212)]=this[t(269)](0),this.eof_flag_&&console.error(t(210))}[Ye(269)](e){const t=Ye;let r=e,n=this[t(214)];for(;;){if(r+7>=n[t(266)])return this.eof_flag_=!0,n.byteLength;if(4095===(n[r+0]<<8|n[r+1])>>>4)return r;r++}}readNextAACFrame(){const e=Ye;let t=this.data_,r=null;for(;null==r&&!this[e(260)];){let n=this.current_syncword_offset_,i=(8&t[n+1])>>>3,s=(6&t[n+1])>>>1,o=1&t[n+1],a=(192&t[n+2])>>>6,c=(60&t[n+2])>>>2,u=(1&t[n+2])<<2|(192&t[n+3])>>>6,l=(3&t[n+3])<<11|t[n+4]<<3|(224&t[n+5])>>>5;if(t[n+6],n+l>this.data_[e(266)]){this[e(260)]=!0,this[e(243)]=!0;break}let d=1===o?7:9,h=l-d;n+=d;let f=this.findNextSyncwordOffset(n+h);if(this[e(212)]=f,0!==i&&1!==i||0!==s)continue;let p=t[e(280)](n,n+h);r={},r[e(232)]=a+1,r[e(215)]=c,r[e(227)]=Xe[c],r.channel_config=u,r[e(229)]=p}return r}[Ye(222)](){return this[Ye(243)]}getIncompleteData(){const e=Ye;return this[e(243)]?this.data_[e(280)](this.current_syncword_offset_):null}}class st{constructor(e){const t=Ye;this[t(214)]=e,this.eof_flag_=!1,this[t(212)]=this[t(269)](0),this[t(260)]&&console.error(t(210))}[Ye(269)](e){const t=Ye;let r=e,n=this[t(214)];for(;;){if(r+1>=n[t(266)])return this.eof_flag_=!0,n.byteLength;if(695===(n[r+0]<<3|n[r+1]>>>5))return r;r++}}[Ye(264)](e){const t=Ye;let r=e[t(219)](2),n=0;for(let i=0;i<=r;i++)n<<=8,n|=e[t(241)]();return n}[Ye(259)](e){const t=Ye;let r=this[t(214)],n=null;for(;null==n&&!this[t(260)];){let i=this[t(212)],s=(31&r[i+1])<<8|r[i+2];if(i+3+s>=this[t(214)][t(266)]){this[t(260)]=!0,this[t(243)]=!0;break}let o=new Ge(r[t(280)](i+3,i+3+s)),a=null;if(o[t(274)]()){if(null==e){console[t(239)]("StreamMuxConfig Missing"),this[t(212)]=this[t(269)](i+3+s),o.destroy();continue}a=e}else{let e=o[t(274)]();if(e&&o[t(274)]()){console[t(254)](t(240)),o[t(270)]();break}if(e&&this.getLATMValue(o),!o[t(274)]()){console[t(254)](t(217)),o[t(270)]();break}if(0!==o[t(219)](6)){console[t(254)](t(209)),o[t(270)]();break}if(0!==o[t(219)](4)){console[t(254)](t(244)),o[t(270)]();break}if(0!==o.readBits(3)){console[t(254)](t(257)),o[t(270)]();break}let r=e?this[t(264)](o):0,n=o[t(219)](5);r-=5;let i=o.readBits(4);r-=4;let s=o[t(219)](4);r-=4,o[t(219)](3),r-=3,r>0&&o[t(219)](r);let c=o[t(219)](3);if(0!==c){console[t(254)]("frameLengthType = "+c+t(276)),o[t(270)]();break}o[t(241)]();let u=o[t(274)]();if(u)if(e)this[t(264)](o);else{let e=0;for(;;){e<<=8;let r=o[t(274)]();if(e+=o[t(241)](),!r)break}console.log(e)}o[t(274)]()&&o.readByte(),a={},a[t(232)]=n,a[t(215)]=i,a[t(227)]=Xe[a[t(215)]],a[t(228)]=s,a[t(225)]=u}let c=0;for(;;){let e=o[t(241)]();if(c+=e,255!==e)break}let u=new Uint8Array(c);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:0;return(e[r]<<24>>>0)+(e[r+1]<<16)+(e[r+2]<<8)+(e[r+3]||0)}function at(e){const t=lt;let r=arguments[t(408)]>1&&void 0!==arguments[1]?arguments[1]:4;if(e[t(408)]<4)return[];const n=e[t(408)],i=[];let s,o=0;for(;o+r>>=8),o+=r,s){if(o+s>n)break;i[t(396)](e[t(407)](o,o+s)),o+=s}return i}function ct(e){const t=lt;let r=arguments[t(408)]>1&&void 0!==arguments[1]&&arguments[1];const n=e.length;let i=r?2:1,s=0,o=0,a="";for(;255===e[i];)s+=255,i++;for(s+=e[i++];255===e[i];)o+=255,i++;if(o+=e[i++],5===s&&n>i+16)for(let r=0;r<16;r++)a+=e[i][t(389)](16),i++;return{payload:e[t(407)](i),type:s,size:o,uuid:a}}function ut(e){const t=lt,r=e[t(394)],n=new Uint8Array(4);n[0]=r>>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r;const i=new Uint8Array(r+4);return i[t(404)](n,0),i[t(404)](e,4),i}function lt(e,t){const r=ht();return(lt=function(e,t){return r[e-=388]})(e,t)}function dt(e,t){const r=lt;let n=null;return t?e.length>=28&&(n=1+(3&e[26])):e[r(408)]>=12&&(n=1+(3&e[9])),n}function ht(){const e=["1660TgbkkF","set","260223nqLMIW","636252LSvtYU","subarray","length","2177127KfZMEq","12TfHbHj","toString","5LHlOtE","setUint32","buffer","2306409TVMshJ","byteLength","3738312ZncTHB","push","32506tqNNED","16efRzPk","29kiitfg","shift","15829THqodu","273XofwtN"];return(ht=function(){return e})()}!function(e,t){const r=lt,n=e();for(;;)try{if(430514===-parseInt(r(399))/1*(parseInt(r(397))/2)+-parseInt(r(405))/3*(parseInt(r(388))/4)+parseInt(r(390))/5*(parseInt(r(395))/6)+-parseInt(r(393))/7+-parseInt(r(398))/8*(parseInt(r(409))/9)+parseInt(r(403))/10*(parseInt(r(401))/11)+parseInt(r(406))/12*(parseInt(r(402))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ht);const ft=Pt;function pt(){const e=Pt;return(new Date)[e(210)]()}function mt(e,t,r){const n=Pt;return Math.max(Math[n(200)](e,Math[n(245)](t,r)),Math[n(200)](t,r))}function vt(){const e=Pt;return performance&&typeof performance[e(301)]===e(427)?performance[e(301)]():Date[e(301)]()}function yt(e){let t=0,r=vt();return n=>{if(!function(e){const t=ft;return Object[t(338)].toString[t(201)](e)===t(415)}(n))return;t+=n;const i=vt(),s=i-r;s>=1e3&&(e(t/s*1e3),r=i,t=0)}}!function(e,t){const r=Pt,n=e();for(;;)try{if(892439===-parseInt(r(318))/1+-parseInt(r(258))/2*(parseInt(r(490))/3)+parseInt(r(458))/4+-parseInt(r(347))/5+-parseInt(r(471))/6*(parseInt(r(436))/7)+-parseInt(r(367))/8*(parseInt(r(209))/9)+parseInt(r(356))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(St),(()=>{const e=Pt;try{if(typeof WebAssembly===e(430)&&"function"==typeof WebAssembly[e(315)]){const t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(t instanceof WebAssembly[e(497)])return new WebAssembly.Instance(t)instanceof WebAssembly[e(455)]}}catch(e){}})();const gt=ft(223),_t=ft(473),wt=ft(391);ft(223);const bt=gt===ft(294);ft(304);function St(){const e=["setUint32","webkit-3d","fontSize","pageY","width","chrome","memory","GB/s","destination","canvas","createImageBitmap","toUpperCase","copyright","requestVideoFrameCallback","indexOf","[object DOMException]","none","true","stringify","[object Number]","byteLength","-o-user-select","Reserved SBR extensions is not implemented","hidden","revokeObjectURL","pathname","user-select","innerHTML","createBuffer","rect","insertBefore","function","set","color","object","KB/s","AudioData","event","document","quality","14DLSAsp","script","atob","click","mousedown","px 宋体","sampleRate","sequenceHeader","experimental-webgl","font","craNut","repeat",'video/mp4; codecs="',"Chrome","getUint8","application/asx","edge","map","playbackRate","Instance","save","touchstart","3492928Sjzcnd","filter","match","lineWidth","content","mouseup","borderStyle","ActiveXObject","status","MediaStreamTrackGenerator","px Arial","apply","strokeStyle","38712MQRKpT","9999999",'"2.1.3"',"angle","hev1.1.6.L120.90","clientX","application/mozilla-npqihooquicklogin","firefox","appendChild","If you want to help, upload a sample of this file to","format","top","paused","webkitFullscreenElement","AAC","hev","RIFF","toString","objectFit","4689789yBHISN","ZB/s","location","touches","high","validate","createElement","Module","WebGLRenderingContext","solid","backgroundColor","getAttribute","clearRect","imageSmoothingQuality","xxxx","fromCharCode","YB/s","borderWidth","application/vnd.chromium.remoting-viewer","setUint16","readAsArrayBuffer","log","Edg","fullscreenElement","replace","MouseEvents","100%","toFixed","clientY","string","mozGetUserMedia","Opera","fmt ","slice","src","div","pageX","scrollLeft","getParameter","webm","Firefox","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","setHours","VideoFrame","data-","min","call","image/png","hasAudio","setInt16","safari","win64","getElementById","getUserMedia","9iYmPjH","getTime","bottom","performance","kSliceBLA_W_RADL","wow32","WAVE","file","URL","MULAW","green yuv","avc1.","style","readyState",'"production"',"userAgent","addModule","onload","open","360SE","undefined","application/hwepass2001.installepass2001","TB/s","getHours","ManagedMediaSource","iFrame","demuxUseWorker","protocol","canConstructInDedicatedWorker","borderColor","getContext","hev5","createTextNode","left","moz-webgl","webgl2","max","createObjectURL","position","zIndex","test","audioWorklet","version","VideoDecoder","{y}-{m}-{d} {h}:{i}:{s}","mediaDevices","vps","useOffscreen","MediaStream","2SBPxRk","floor","-webkit-user-select","sps","opacity","h265","EB/s","illegal icc","360EE","100","gpu","getPropertyValue","text","application/javascript","green","substring","VideoEncoder.isConfigSupported() result is not supported","download","close","VideoEncoder is not supported","msGetUserMedia","application/360softmgrplugin","contain","Safari","getMinutes","drawImage","data","height","kSliceBLA_N_LP","getDate","wow64","ALAW","restore","dispatchEvent","element","setInt32",'"delaytime"',"Worker","join","dataset","img","canPlayType","srcElement","now","touchmove","pointer-events: none !important; display: block !important",'"2025-2-1"',"win32","PressureObserver","href","length","toLowerCase","onerror","opera","right","pow","charCodeAt","instantiate","localhost","attachShadow","1517198IIbZle","forEach","useWCS","PB/s","QQBrowser","-webkit-text-size-adjust","supported","absolute","isConfigSupported","split","nLp","keys","mimeTypes","Edge","hostname","toDataURL","fillStyle","AudioDecoder","host","webgl","prototype","substr","QihooBrowser","imageSmoothingEnabled",";base64","f32-planar","search","hev3","hash","7642245ddldoo","wcsDecodeAudio","image","getFullYear","getMonth","application/vnd.apple.mpegurl","hev2","strokeRect","error","58484920bHduZR","setAttribute","assign","isTypeSupported","charAt","second","noteOn","-moz-user-select","setUint8","trim","Anonymous","9659768Vhpnsg","rgba(0,0,0,0)","line","subarray","crossOrigin","round","MediaSource","random","removeChild","body","isFullscreen","text/javascript","fillText","initEvent","setInt8","createBufferSource","shadowRoot","scrollTop","hour","overflow","documentElement","WebGL2RenderingContext","navigator","pps",'"12-31-2024"',"kSliceRSV_IRAP_VCL22","numberOfFrames","container","type"];return(St=function(){return e})()}function Et(e){return null==e}function It(e){return!Et(e)}function kt(e){return e&&typeof e===ft(427)}function At(e){const t=ft;let r=null,n=31&e[0];return(n===_e[t(261)]||n===_e[t(390)])&&(r=ye.h264),!r&&(n=(126&e[0])>>1,(n===we[t(255)]||n===we[t(261)]||n===we[t(390)])&&(r=ye[t(263)])),r}function Ct(){return typeof WritableStream!==ft(229)}function Tt(e){e[ft(276)]()}function xt(e,t){const r=ft;t&&(e=e[r(459)]((e=>e[r(395)]&&e[r(395)]===t)));let n=e[0],i=null,s=1;if(e[r(308)]>0){let t=e[1];t&&t.ts-n.ts>1e5&&(n=t,s=2)}if(n)for(let o=s;o=1e3){e[o-1].ts-n.ts<1e3&&(i=o+1)}}}return i}function Dt(e){const t=ft;return e.ok&&e[t(466)]>=200&&e[t(466)]<=299}function Pt(e,t){const r=St();return(Pt=function(e,t){return r[e-=177]})(e,t)}function Bt(){return function(e){const t=ft;let r="";if(typeof e===t(430))try{r=JSON[t(414)](e),r=JSON.parse(r)}catch(t){r=e}else r=e;return r}(oe)}function Mt(e){const t=ft;return e[0]>>4===Te&&e[1]===Ce[t(443)]}function Ft(e){return!0===e||e===ft(413)}function Ut(e){return!0!==e&&e!==ft(413)}function Rt(){const e=ft;return!!(Re[e(295)]&&Re[e(373)]&&e(237)in Re.MediaSource&&!0===Re.MediaSource.canConstructInDedicatedWorker)}function Lt(e,t){const r=ft,n=at(e[r(188)](5));let i=!1;return n.forEach((e=>{const n=r,s=t?e[0]>>>1&63:31&e[0];(t&&(s===we.kSliceBLA_W_LP||s===we[n(213)]||s===we[n(286)]||s===we[n(234)]||s===we[n(328)]||n(446),n(392),s===we.kSliceRSV_IRAP_VCL23)||Ut(t)&&s===_e.iFrame)&&(i=!0)})),i}function Ot(){return Ut(bt)}function zt(e){return e>60*(Number("1")||1)*60*1e3&&Ot()}const Nt=Ht;function Ht(e,t){const r=Vt();return(Ht=function(e,t){return r[e-=133]})(e,t)}!function(e,t){const r=Ht,n=e();for(;;)try{if(503460===parseInt(r(159))/1*(-parseInt(r(150))/2)+-parseInt(r(160))/3+parseInt(r(152))/4*(parseInt(r(168))/5)+parseInt(r(170))/6+parseInt(r(171))/7+-parseInt(r(154))/8+parseInt(r(142))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Vt);var jt=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){const o=Ht;function a(e){const t=Ht;try{u(n[t(164)](e))}catch(e){s(e)}}function c(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){const t=Ht;var n;e.done?i(e.value):(n=e[t(147)],n instanceof r?n:new r((function(e){e(n)})))[t(148)](a,c)}u((n=n.apply(e,t||[]))[o(164)]())}))};function Vt(){const e=["need","value","then","writeU16","4XwIdjN","lastReadPromise","76uxNSCA","flush","3921568eUfNzR","malloc","return","demand","byteOffset","14081KOYqaK","3012789xnWWSX","resolve","close","byteLength","next","setG","consumed","readU8","153995wenmoD","buffer","3229020QmGoKw","1223446YSiNWZ","throw","readU32","pull","read","writeU32","set","U16","subarray","consume","6551568abIxpX","Unsupported type","length","reject"];return(Vt=function(){return e})()}const Wt=Symbol(32),$t=Symbol(16),Gt=Symbol(8);class qt{constructor(e){const t=Ht;this.g=e,this[t(166)]=0,e&&(this[t(146)]=e.next()[t(147)])}[Nt(165)](e){const t=Nt;this.g=e,this.demand(e[t(164)]()[t(147)],!0)}[Nt(141)](){const e=Nt;this[e(169)]&&this[e(166)]&&(this.buffer.copyWithin(0,this[e(166)]),this[e(169)]=this[e(169)].subarray(0,this.buffer.length-this[e(166)]),this[e(166)]=0)}[Nt(157)](e,t){const r=Nt;return t&&this[r(141)](),this.need=e,this[r(153)]()}[Nt(136)](e){return jt(this,void 0,void 0,(function*(){const t=Ht;return this[t(151)]&&(yield this[t(151)]),this.lastReadPromise=new Promise(((r,n)=>{const i=t;var s;this[i(145)]=n,this[i(161)]=e=>{const t=i;delete this[t(151)],delete this[t(161)],delete this[t(146)],r(e)};this[i(157)](e,!0)||null===(s=this[i(135)])||void 0===s||s.call(this,e)}))}))}[Nt(134)](){return this[Nt(136)](Wt)}readU16(){return this[Nt(136)]($t)}[Nt(167)](){return this[Nt(136)](Gt)}[Nt(162)](){const e=Nt;var t;this.g&&this.g[e(156)](),this[e(169)]&&this[e(169)][e(140)](0,0),null===(t=this.reject)||void 0===t||t.call(this,new Error("EOF")),delete this.lastReadPromise}[Nt(153)](){const e=Nt;if(!this[e(169)]||!this[e(146)])return;let t=null;const r=this[e(169)][e(140)](this[e(166)]);let n=0;const i=t=>r[e(144)]<(n=t);if("number"==typeof this[e(146)]){if(i(this.need))return;t=r.subarray(0,n)}else if(this.need===Wt){if(i(4))return;t=r[0]<<24|r[1]<<16|r[2]<<8|r[3]}else if(this[e(146)]===$t){if(i(2))return;t=r[0]<<8|r[1]}else if(this[e(146)]===Gt){if(i(1))return;t=r[0]}else if(e(169)in this[e(146)]){if(e(158)in this[e(146)]){if(i(this[e(146)][e(163)]-this[e(146)][e(158)]))return;new Uint8Array(this[e(146)][e(169)],this.need[e(158)]).set(r.subarray(0,n)),t=this[e(146)]}else if(this.g)return void this.g[e(133)](new Error(e(143)))}else{if(i(this.need[e(163)]))return;new Uint8Array(this[e(146)])[e(138)](r[e(140)](0,n)),t=this[e(146)]}return this[e(166)]+=n,this.g?this.demand(this.g.next(t)[e(147)],!0):this[e(161)]&&this[e(161)](t),t}write(e){const t=Nt;if(e instanceof Uint8Array?this.malloc(e[t(144)]).set(e):t(169)in e?this[t(155)](e.byteLength).set(new Uint8Array(e[t(169)],e.byteOffset,e.byteLength)):this[t(155)](e[t(163)])[t(138)](new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this.pull=e));this.flush()}[Nt(137)](e){this[Nt(155)](4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}[Nt(149)](e){const t=Nt;this[t(155)](2).set([e>>8&255,255&e]),this[t(153)]()}writeU8(e){const t=Nt;this.malloc(1)[0]=e,this[t(153)]()}malloc(e){const t=Nt;if(this.buffer){const r=this[t(169)].length,n=r+e;if(n<=this[t(169)][t(169)].byteLength-this[t(169)][t(158)])this[t(169)]=new Uint8Array(this[t(169)][t(169)],this[t(169)].byteOffset,n);else{const e=new Uint8Array(n);e[t(138)](this[t(169)]),this.buffer=e}return this[t(169)][t(140)](r,n)}return this[t(169)]=new Uint8Array(e),this.buffer}}function Yt(){const e=["_opt","[❗❗❗][","325782bqBBEm","debug","[❌❌❌][","15786bVdPYv","JbPro","error","length","1225468UtWDJf","108935OQHHLJ","112aBmaks","9038270eXhJGz","1253IZkCWu","47178ibHnZd","[✅✅✅][","440799BMJcjj","debugUuid","debugLevel","5deCgnc","log"];return(Yt=function(){return e})()}function Kt(e,t){const r=Yt();return(Kt=function(e,t){return r[e-=331]})(e,t)}qt.U32=Wt,qt[Nt(139)]=$t,qt.U8=Gt,function(e,t){const r=Kt,n=e();for(;;)try{if(254012===-parseInt(r(336))/1+parseInt(r(349))/2+parseInt(r(342))/3+parseInt(r(335))/4*(-parseInt(r(345))/5)+-parseInt(r(331))/6*(parseInt(r(339))/7)+parseInt(r(337))/8*(-parseInt(r(340))/9)+parseInt(r(338))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Yt);class Xt{constructor(e){const t=Kt;this[t(346)]=function(r){const n=t;if(e._opt[n(344)]==X[n(350)]){const t=e._opt.debugUuid?"["+e._opt[n(343)]+"]":"";for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o1?i-1:0),o=1;o1?s-1:0),a=1;a=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(448)],0,s)}static[Jt(447)](e){const t=Jt;let r=Zt[t(420)](e),n=new Ge(r);n.readByte();let i=n[t(426)]();n[t(426)]();let s=n.readByte();n[t(435)]();let o=Zt[t(449)](i),a=Zt[t(438)](s),c=1,u=420,l=[0,420,422,444],d=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(c=n[t(435)](),3===c&&n[t(452)](1),c<=3&&(u=l[c]),d=n[t(435)]()+8,n.readUEG(),n[t(452)](1),n[t(428)]())){let e=3!==c?8:12;for(let r=0;r0&&e<16?(b=r[e-1],S=i[e-1]):255===e&&(b=n[t(426)]()<<8|n.readByte(),S=n.readByte()<<8|n.readByte())}if(n[t(428)]()&&n.readBool(),n.readBool()&&(n[t(452)](4),n[t(428)]()&&n.readBits(24)),n[t(428)]()&&(n.readUEG(),n[t(435)]()),n[t(428)]()){let e=n.readBits(32),r=n.readBits(32);I=n[t(428)](),k=r,A=2*e,E=k/A}}let C=1;(1!==b||1!==S)&&(C=b/S);let T=0,x=0;if(0===c)T=1,x=2-v;else{T=3===c?1:2,x=(1===c?2:1)*(2-v)}let D=16*(p+1),P=16*(m+1)*(2-v);D-=(y+g)*T,P-=(_+w)*x;let B=Math[t(454)](D*C);return n.destroy(),n=null,{profile_string:o,level_string:a,bit_depth:d,ref_frames:f,chroma_format:u,chroma_format_string:Zt[t(423)](u),frame_rate:{fixed:I,fps:E,fps_den:A,fps_num:k},sar_ratio:{width:b,height:S},codec_size:{width:D,height:P},present_size:{width:B,height:P}}}static[Jt(434)](e){const t=Jt;let r=e[t(431)](1,4),n=t(451);for(let e=0;e<3;e++){let i=r[e][t(441)](16);i.length<2&&(i="0"+i),n+=i}let i=Zt[t(420)](e),s=new Ge(i);s[t(426)]();let o=s[t(426)]();s.readByte();let a=s[t(426)]();s[t(435)]();let c=Zt[t(449)](o),u=Zt.getLevelString(a),l=1,d=420,h=[0,420,422,444],f=8,p=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(l=s.readUEG(),3===l&&s[t(452)](1),l<=3&&(d=h[l]),f=s[t(435)]()+8,p=s[t(435)]()+8,s[t(452)](1),s.readBool())){let e=3!==l?8:12;for(let r=0;r0&&e<16?(I=r[e-1],k=n[e-1]):255===e&&(I=s[t(426)]()<<8|s[t(426)](),k=s.readByte()<<8|s[t(426)]())}if(s[t(428)]()&&s[t(428)](),s[t(428)]()&&(s[t(452)](4),s[t(428)]()&&s.readBits(24)),s[t(428)]()&&(s[t(435)](),s.readUEG()),s[t(428)]()){let e=s[t(452)](32),r=s[t(452)](32);C=s[t(428)](),T=r,x=2*e,A=T/x}}let D=1;(1!==I||1!==k)&&(D=I/k);let P=0,B=0;if(0===l)P=1,B=2-_;else{P=3===l?1:2,B=(1===l?2:1)*(2-_)}let M=16*(y+1),F=16*(g+1)*(2-_);M-=(w+b)*P,F-=(S+E)*B;let U=Math.ceil(M*D);return s[t(437)](),s=null,{codec_mimetype:n,profile_idc:o,level_idc:a,profile_string:c,level_string:u,chroma_format_idc:l,bit_depth:f,bit_depth_luma:f,bit_depth_chroma:p,ref_frames:v,chroma_format:d,chroma_format_string:Zt[t(423)](d),frame_rate:{fixed:C,fps:A,fps_den:x,fps_num:T},sar_ratio:{width:I,height:k},codec_size:{width:M,height:F},present_size:{width:U,height:F}}}static _skipScalingList(e,t){const r=Jt;let n=8,i=8,s=0;for(let o=0;o=this.buflen)return this[t(117)]=!0,0;this[t(117)]=!1,n=this[t(124)]+e>8?8-this[t(124)]:e,r<<=n,r+=this[t(121)][this.bufpos]>>8-this.bufoff-n&255>>8-n,this[t(124)]+=n,e-=n,8==this.bufoff&&(this[t(113)]++,this[t(124)]=0)}return r}look(e){const t=nr;let r=this[t(113)],n=this[t(124)],i=this.read(e);return this.bufpos=r,this[t(124)]=n,i}[tr(120)](){const e=tr;let t;for(t=0;0===this[e(128)](1)&&!this[e(117)];t++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(n,0),i.set(r[t(378)],4),r[t(378)]=i}if(r[t(371)]){const e=r.pps[t(367)],n=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i[t(386)](n,0),i.set(r[t(371)],4),r[t(371)]=i}return r}function hr(e){const t=ur;let{sps:r,pps:n}=e;const i=[23,0,0,0,0,1,66,0,30,255];i[0]=23,i[6]=r[1],i[7]=r[2],i[8]=r[3],i[10]=225,i[11]=r[t(367)]>>8&255,i[12]=255&r.byteLength,i[t(370)](...r,1,n.byteLength>>8&255,255&n[t(367)],...n);return new Uint8Array(i)}function fr(e){const t=ur;let{sps:r,pps:n}=e,i=8+r[t(367)]+1+2+n.byteLength,s=!1;const o=Zt.parseSPS$2(r);66!==r[3]&&77!==r[3]&&88!==r[3]&&(s=!0,i+=4);let a=new Uint8Array(i);a[0]=1,a[1]=r[1],a[2]=r[2],a[3]=r[3],a[4]=255,a[5]=225;let c=r[t(367)];a[6]=c>>>8,a[7]=255&c;let u=8;a[t(386)](r,8),u+=c,a[u]=1;let l=n[t(367)];a[u+1]=l>>>8,a[u+2]=255&l,a.set(n,u+3),u+=3+l,s&&(a[u]=252|o[t(372)],a[u+1]=248|o[t(380)]-8,a[u+2]=248|o[t(373)]-8,a[u+3]=0,u+=4);const d=[23,0,0,0,0],h=new Uint8Array(d[t(348)]+a[t(367)]);return h[t(386)](d,0),h[t(386)](a,d[t(348)]),h}function pr(e,t){const r=ur;let n=[];n[0]=t?23:39,n[1]=1,n[2]=0,n[3]=0,n[4]=0,n[5]=e[r(367)]>>24&255,n[6]=e[r(367)]>>16&255,n[7]=e[r(367)]>>8&255,n[8]=255&e[r(367)];const i=new Uint8Array(n[r(348)]+e[r(367)]);return i[r(386)](n,0),i[r(386)](e,n.length),i}function mr(e,t){const r=ur;let n=[];n[0]=t?23:39,n[1]=1,n[2]=0,n[3]=0,n[4]=0;const i=new Uint8Array(n.length+e[r(367)]);return i.set(n,0),i[r(386)](e,n.length),i}function vr(e){return 31&e[0]}function yr(e){return e===_e[ur(408)]}function gr(e){return!(t=e,t===_e[ur(378)]||t===_e.pps||yr(e));var t}function _r(e){return e===_e[ur(387)]}function wr(e){const t=ur;if(0===e.length)return!1;const r=vr(e[0]);for(let n=1;n=n[t(367)])return this.eofFlag=!0,n[t(367)];let e=n[r+0]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],i=n[r+0]<<16|n[r+1]<<8|n[r+2];if(1===e||1===i)return r;r++}}[cr(349)](){const e=cr;let t=this.data,r=null;for(;null==r&&!this[e(341)];){let n=this.currentStartcodeOffset;n+=1===(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])?4:3;let i=31&t[n],s=(128&t[n])>>>7,o=this[e(363)](n);this[e(410)]=o,i>=_e[e(336)]||0===s&&(r={type:i,data:t[e(404)](n,o)})}return r}}class Sr{constructor(e){const t=cr;let r=e.data[t(367)];this[t(399)]=e[t(399)],this[t(383)]=new Uint8Array(4+r),new DataView(this[t(383)][t(334)]).setUint32(0,r),this[t(383)][t(386)](e[t(383)],4)}}const Er=kr;function Ir(){const e=["m_data","2775414TImLuE","GetBit","3832fjUDER","m_bits","38854ZSNblT","m_zeros","GetWord","7983oOqlIZ","m_idx","m_byte","GetUE","length","21XGhTVb","5pksIUZ","2099097wZXvzb","GetBYTE","324002Maayxq","2143556iTuUMY","m_len","977400ODRHQo"];return(Ir=function(){return e})()}function kr(e,t){const r=Ir();return(kr=function(e,t){return r[e-=332]})(e,t)}!function(e,t){const r=kr,n=e();for(;;)try{if(284017===parseInt(r(335))/1+-parseInt(r(344))/2*(-parseInt(r(352))/3)+-parseInt(r(336))/4+-parseInt(r(332))/5*(parseInt(r(340))/6)+parseInt(r(333))/7+parseInt(r(342))/8*(parseInt(r(347))/9)+parseInt(r(338))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ir);class Ar{constructor(e){const t=kr;this[t(348)]=null,this.m_data=e,this[t(337)]=e[t(351)],this[t(348)]=0,this[t(343)]=0,this[t(349)]=0,this[t(345)]=0}[Er(334)](){const e=Er;if(this.m_idx>=this[e(337)])return 0;let t=this[e(339)][this[e(348)]++];return 0==t?(this[e(345)]++,this[e(348)]>this[e(343)]&1}[Er(346)](e){const t=Er;let r=0;for(;e>0;)r<<=1,r|=this[t(341)](),e--;return r}GetUE(){const e=Er;let t=0;for(;this[e(348)]>1;return!(1&e)&&(t=-t),t}}function Cr(e,t){const r=Dr();return(Cr=function(e,t){return r[e-=260]})(e,t)}const Tr=Cr;!function(e,t){const r=Cr,n=e();for(;;)try{if(691061===-parseInt(r(274))/1*(-parseInt(r(264))/2)+parseInt(r(262))/3+-parseInt(r(267))/4+parseInt(r(263))/5+-parseInt(r(270))/6*(parseInt(r(268))/7)+-parseInt(r(269))/8+-parseInt(r(260))/9*(-parseInt(r(265))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Dr);class xr{static _ebsp2rbsp(e){const t=Cr;let r=e,n=r.byteLength,i=new Uint8Array(n),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(272)],0,s)}static[Tr(275)](e){const t=Tr;let r=xr[t(261)](e);const n=new Ar(r);let i="",s="",o="",a="";n[t(271)](4);let c=n[t(271)](3);if(c>6)return console[t(273)]("SPSParser sps_max_sub_layers_minus1 > 6"),!1;n[t(271)](1),n[t(271)](2),n[t(271)](1),i=n[t(271)](5),n[t(271)](32),n.GetWord(1),n[t(271)](1),n[t(271)](1),n.GetWord(1),n[t(271)](44),s=n[t(271)](8);let u=[],l=[];for(let e=0;e0)for(let e=c;e<8;e++)n[t(271)](2);for(let e=0;e15)return console[t(273)]("SPSParser sps_seq_parameter_set_id > 15",d),!1;let h=n[t(276)]();return h>3?(console[t(273)]("SPSParser chroma_format_idc > 3",h),!1):(3==h&&n[t(271)](1),o=n.GetUE(),a=n[t(276)](),n[t(271)](1)&&(n[t(276)](),n[t(276)](),n[t(276)](),n[t(276)]()),n[t(276)]()!=n.GetUE()?(console[t(273)](t(266)),!1):{profile_string:i,level_string:s,bit_depth:"",ref_frames:"",chroma_format:"",chroma_format_string:"",frame_rate:{fixed:"",fps:"",fps_den:"",fps_num:""},sar_ratio:{width:"",height:""},codec_size:{width:o,height:a},present_size:{width:"",height:a}})}}function Dr(){const e=["64tvKkpl","parseSPS","GetUE","427590RPuJFQ","_ebsp2rbsp","104061qUWwKP","1565785uTHLTj","11516SzDmfO","230QQlieJ","SPSParser bit_depth_luma_minus8 != bit_depth_chroma_minus8","781076omBnhF","14nnbXwL","6476736jdptPr","339492wDAyxa","GetWord","buffer","warn"];return(Dr=function(){return e})()}!function(e,t){const r=Mr,n=e();for(;;)try{if(827886===-parseInt(r(282))/1+parseInt(r(281))/2+-parseInt(r(278))/3*(-parseInt(r(261))/4)+-parseInt(r(273))/5+-parseInt(r(260))/6+-parseInt(r(274))/7+parseInt(r(259))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Fr);const Pr=e=>{const t=Mr;let r=e,n=r[t(270)],i=new Uint8Array(n),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(263)],0,s)},Br=e=>{const t=Mr;switch(e){case 0:return t(262);case 1:return t(268);case 2:return t(283);case 3:return t(265);default:return"Unknown"}};function Mr(e,t){const r=Fr();return(Mr=function(e,t){return r[e-=259]})(e,t)}function Fr(){const e=["9415536haCRgH","12ctHFXU","4:0:0","buffer","toFixed","4:4:4","readBits","readSEG","4:2:0","readUEG","byteLength",".B0","readByte","3475420VUgoOr","9164001yYOEkY","min",".1.L","readBool","1127595XiyarW","destroy","push","1094658WZdadX","1499400aCUQmm","4:2:2","33806760jIxtDv"];return(Fr=function(){return e})()}const Ur=Lr;function Rr(){const e=["parseVPS","parsePPS","60VsWipL","63mOrcHo","push","966245NInRXI","byteLength","min","getProfileString","getChromaFormatString","804040vfFBUW","hvc1.","readUEG","destroy","4:2:0","2011658ObyjuF","4:2:2","Unknown",".B0",".1.L","6mqrOZx","toFixed","parseSPS","Rext","buffer","_ebsp2rbsp","8572560OnMcis","843116wLQKAL","getLevelString","MainSP","4:4:4","readByte","4:0:0","readSEG","readBool","35qUXybB","10iTkLnn","910977vkQGVC","165171BTiIBA","readBits"];return(Rr=function(){return e})()}function Lr(e,t){const r=Rr();return(Lr=function(e,t){return r[e-=195]})(e,t)}!function(e,t){const r=Lr,n=e();for(;;)try{if(789986===parseInt(r(199))/1+parseInt(r(197))/2*(parseInt(r(198))/3)+parseInt(r(228))/4*(-parseInt(r(196))/5)+-parseInt(r(221))/6*(parseInt(r(206))/7)+parseInt(r(227))/8+-parseInt(r(204))/9*(-parseInt(r(211))/10)+parseInt(r(216))/11*(-parseInt(r(203))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Rr);class Or{static[Ur(226)](e){const t=Ur;let r=e,n=r[t(207)],i=new Uint8Array(n),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(225)],0,s)}static[Ur(201)](e){const t=Ur;let r=Or[t(226)](e),n=new Ge(r);return n[t(232)](),n[t(232)](),n[t(200)](4),n[t(200)](2),n[t(200)](6),{num_temporal_layers:n[t(200)](3)+1,temporal_id_nested:n[t(195)]()}}static[Ur(223)](e){const t=Ur;let r=Or[t(226)](e),n=new Ge(r);n[t(232)](),n.readByte();let i=0,s=0,o=0,a=0;n[t(200)](4);let c=n.readBits(3);n[t(195)]();let u=n[t(200)](2),l=n[t(195)](),d=n[t(200)](5),h=n[t(232)](),f=n[t(232)](),p=n[t(232)](),m=n.readByte(),v=n.readByte(),y=n[t(232)](),g=n.readByte(),_=n.readByte(),w=n[t(232)](),b=n[t(232)](),S=n[t(232)](),E=[],I=[];for(let e=0;e0)for(let e=c;e<8;e++)n[t(200)](2);for(let e=0;e1&&n.readSEG();for(let e=0;e0&&e<=16?(U=r[e-1],R=i[e-1]):255===e&&(U=n.readBits(16),R=n.readBits(16))}if(n.readBool()&&n.readBool(),n.readBool()){n[t(200)](3),n.readBool(),n[t(195)]()&&(n[t(232)](),n.readByte(),n[t(232)]())}if(n.readBool()&&(n[t(213)](),n[t(213)]()),n[t(195)](),n[t(195)](),n[t(195)](),M=n.readBool(),M&&(n[t(213)](),n.readUEG(),n[t(213)](),n[t(213)]()),n[t(195)]()){if(O=n[t(200)](32),z=n.readBits(32),n[t(195)]()&&n[t(213)](),n[t(195)]()){let e=!1,r=!1,i=!1;e=n.readBool(),r=n.readBool(),(e||r)&&(i=n[t(195)](),i&&(n[t(232)](),n[t(200)](5),n[t(195)](),n[t(200)](5)),n[t(200)](4),n[t(200)](4),i&&n[t(200)](4),n[t(200)](5),n[t(200)](5),n.readBits(5));for(let s=0;s<=c;s++){let s=n[t(195)]();L=s;let o=!0,a=1;!s&&(o=n[t(195)]());let c=!1;if(o?n.readUEG():c=n[t(195)](),!c&&(a=n[t(213)]()+1),e){for(let e=0;e>6&3,n[t(349)]=e[1]>>5&1,n.general_profile_idc=31&e[1],n.general_profile_compatibility_flags=e[2]<<24|e[3]<<16|e[4]<<8|e[5],n[t(430)]=e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[t(430)]=n[t(430)]<<16|e[10]<<8|e[11],n[t(450)]=e[12],n.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],n[t(352)]=3&e[15],n[t(452)]=3&e[16],n[t(367)]=7&e[17],n[t(394)]=7&e[18],n[t(370)]=e[19]<<8|e[20],n[t(421)]=e[21]>>6&3,n[t(383)]=e[21]>>3&7,n[t(360)]=e[21]>>2&1,n[t(456)]=3&e[21];let i=e[22],s=e[t(385)](23);for(let e=0;e0)for(let t=r;t<8;t++)e[n(461)](2);i[n(386)]=[],i[n(426)]=[],i[n(368)]=[],i.sub_layer_profile_compatibility_flag=[],i.sub_layer_progressive_source_flag=[],i[n(395)]=[],i[n(378)]=[],i.sub_layer_frame_only_constraint_flag=[],i[n(384)]=[];for(let t=0;t{const t=Mr;let r=Pr(e),n=new Ge(r);return n[t(272)](),n[t(272)](),n[t(266)](4),n[t(266)](2),n.readBits(6),{num_temporal_layers:n[t(266)](3)+1,temporal_id_nested:n.readBool()}})(r),a=(e=>{const t=Mr;let r=Pr(e),n=new Ge(r);n[t(272)](),n[t(272)]();let i=0,s=0,o=0,a=0;n[t(266)](4);let c=n[t(266)](3);n[t(277)]();let u=n[t(266)](2),l=n[t(277)](),d=n.readBits(5),h=n.readByte(),f=n[t(272)](),p=n.readByte(),m=n[t(272)](),v=n[t(272)](),y=n[t(272)](),g=n[t(272)](),_=n[t(272)](),w=n[t(272)](),b=n[t(272)](),S=n[t(272)](),E=[],I=[];for(let e=0;e0)for(let e=c;e<8;e++)n[t(266)](2);for(let e=0;e1&&n[t(267)]();for(let e=0;e0&&e<16?(U=r[e-1],R=i[e-1]):255===e&&(U=n.readBits(16),R=n[t(266)](16))}if(n[t(277)]()&&n[t(277)](),n[t(277)]()&&(n[t(266)](3),n[t(277)](),n.readBool()&&(n[t(272)](),n[t(272)](),n[t(272)]())),n.readBool()&&(n[t(269)](),n.readUEG()),n.readBool(),n[t(277)](),n[t(277)](),M=n.readBool(),M&&(i+=n[t(269)](),s+=n[t(269)](),o+=n[t(269)](),a+=n[t(269)]()),n.readBool()&&(O=n[t(266)](32),z=n.readBits(32),n[t(277)]()&&(n.readUEG(),n[t(277)]()))){let e=!1,r=!1,i=!1;e=n[t(277)](),r=n.readBool(),(e||r)&&(i=n[t(277)](),i&&(n[t(272)](),n.readBits(5),n[t(277)](),n.readBits(5)),n[t(266)](4),n[t(266)](4),i&&n[t(266)](4),n[t(266)](5),n[t(266)](5),n[t(266)](5));for(let s=0;s<=c;s++){let s=n.readBool();L=s;let o=!1,a=1;!s&&(o=n[t(277)]());let c=!1;if(o?n[t(267)]():c=n[t(277)](),!c&&(cpbcnt=n.readUEG()+1),e)for(let e=0;e{const t=Mr;let r=Pr(e),n=new Ge(r);n[t(272)](),n[t(272)](),n[t(269)](),n[t(269)](),n.readBool(),n[t(277)](),n[t(266)](3),n[t(277)](),n[t(277)](),n[t(269)](),n.readUEG(),n[t(267)](),n[t(277)](),n[t(277)](),n[t(277)]()&&n[t(269)](),n[t(267)](),n[t(267)](),n[t(277)](),n.readBool(),n[t(277)](),n.readBool();let i=n[t(277)](),s=n.readBool(),o=1;return s&&i?o=0:s?o=3:i&&(o=2),{parallelismType:o}})(n);s=Object.assign(s,o,a,c);let u=23+(5+r.byteLength)+(5+i[t(427)])+(5+n.byteLength),l=new Uint8Array(u);l[0]=1,l[1]=(3&s[t(423)])<<6|(s[t(349)]?1:0)<<5|31&s[t(447)],l[2]=s[t(391)]||0,l[3]=s.general_profile_compatibility_flags_2||0,l[4]=s.general_profile_compatibility_flags_3||0,l[5]=s.general_profile_compatibility_flags_4||0,l[6]=s[t(417)]||0,l[7]=s[t(374)]||0,l[8]=s[t(398)]||0,l[9]=s[t(451)]||0,l[10]=s.general_constraint_indicator_flags_5||0,l[11]=s.general_constraint_indicator_flags_6||0,l[12]=60,l[13]=240|(3840&s[t(354)])>>8,l[14]=255&s[t(354)],l[15]=252|3&s.parallelismType,l[16]=252|3&s[t(425)],l[17]=248|7&s[t(365)],l[18]=248|7&s.bit_depth_chroma_minus8,l[19]=0,l[20]=0,l[21]=(3&s.constant_frame_rate)<<6|(7&s[t(388)])<<3|(s[t(363)]?1:0)<<2|3,l[22]=3,l[23]=128|we.vps,l[24]=0,l[25]=1,l[26]=(65280&r[t(427)])>>8,l[27]=(255&r[t(427)])>>0,l[t(413)](r,28),l[23+(5+r.byteLength)+0]=128|we.sps,l[23+(5+r[t(427)])+1]=0,l[23+(5+r[t(427)])+2]=1,l[23+(5+r[t(427)])+3]=(65280&i[t(427)])>>8,l[23+(5+r[t(427)])+4]=(255&i[t(427)])>>0,l.set(i,23+(5+r[t(427)])+5),l[23+(5+r.byteLength+5+i[t(427)])+0]=128|we.pps,l[23+(5+r[t(427)]+5+i[t(427)])+1]=0,l[23+(5+r.byteLength+5+i.byteLength)+2]=1,l[23+(5+r[t(427)]+5+i[t(427)])+3]=(65280&n[t(427)])>>8,l[23+(5+r[t(427)]+5+i[t(427)])+4]=(255&n.byteLength)>>0,l[t(413)](n,23+(5+r.byteLength+5+i[t(427)])+5);const d=[28,0,0,0,0],h=new Uint8Array(d[t(416)]+l[t(427)]);return h[t(413)](d,0),h.set(l,d[t(416)]),h}function Wr(e,t){const r=Zr;let n=[];n[0]=t?28:44,n[1]=1,n[2]=0,n[3]=0,n[4]=0,n[5]=e[r(427)]>>24&255,n[6]=e[r(427)]>>16&255,n[7]=e[r(427)]>>8&255,n[8]=255&e.byteLength;const i=new Uint8Array(n[r(416)]+e.byteLength);return i[r(413)](n,0),i.set(e,n[r(416)]),i}function $r(e,t){const r=Zr;let n=[];n[0]=t?28:44,n[1]=1,n[2]=0,n[3]=0,n[4]=0;const i=new Uint8Array(n[r(416)]+e.byteLength);return i[r(413)](n,0),i[r(413)](e,n.length),i}function Gr(e){return(126&e[0])>>1}function qr(e){return e===we.sei}function Yr(){const e=["hev1.1.6.L93.B0","readUByte","parseHEVCDecoderVPSAndSPSAndPPS and pps tag is ","conf_win_left_offset","codec","conf_win_right_offset","bitDepth","data","read_golomb","psps","fps_num","bit_depth","general_tier_flag","sps_video_parameter_set_id","separate_colour_plane_flag","parallelismType","chromaFormatIdc","min_spatial_segmentation_idc","general_progressive_source_flag","sps_seq_parameter_set_id","48niUOPN","level_idc","codec_mimetype","temporalIdNested","max","type","temporal_id_nested","codecHeight","bit_depth_luma_minus8","generalProfileSpace","bitDepthLumaMinus8","sub_layer_profile_idc","7hAlRbV","avgFrameRate","configurationVersion","warn","sar_ratio","general_constraint_indicator_flags_2","chroma_format","present_size","parseHEVCDecoderConfigurationRecord$2","sub_layer_non_packed_constraint_flag","setUint32","86265kpjSBJ","conf_win_top_offset","generalConstraintIndicatorFlags","numTemporalLayers","sub_layer_level_idc","slice","sub_layer_profile_space","conf_win_bottom_offset","num_temporal_layers","findNextStartCodeOffset","43756BWctJY","general_profile_compatibility_flags_1","push","height","bitDepthChromaMinus8","sub_layer_interlaced_source_flag","94188FNTJvM","fps_den","general_constraint_indicator_flags_3","158642UrkaxF","sub_layer_profile_present_flag","readUEG","vps","generalLevelIdc","4115259AWRKBN","generalProfileIdc","conformance_window_flag","subarray","getUint16","Invalid HEVCDecoderConfigurationRecord, Strange NaluLengthSizeMinusOne: ","profile","codecWidth","sub_layer_frame_only_constraint_flag","set","pps","sub_layer_level_present_flag","length","general_constraint_indicator_flags_1","general_interlaced_source_flag","frame_rate","codec_size","constantFrameRate","width","general_profile_space","parseHEVCDecoderVPSAndSPSAndPPS and vpsTag is ","chroma_format_idc","sub_layer_tier_flag","byteLength","buffer","readNextNaluPayload","general_constraint_indicator_flags","general_non_packed_constraint_flag",", hevcProfile is ","currentStartcodeOffset","profile_space","presentHeight","getUint8","error","sps","14BJEyEA","parseSPS","h265","838888bZMDza","598qrOYYX","fixed","Could not find H265 startcode until payload end!","pic_height_in_luma_samples","general_profile_idc"," < 22","162ibwPAZ","general_level_idc","general_constraint_indicator_flags_4","chromaFormat","113572QQPqyo","readBits"," < 23","lengthSizeMinusOne","profile_compatibility_flags","Invalid HEVCDecoderConfigurationRecord, lack of data! ","pic_width_in_luma_samples","level","read","arrayBuffer.length ","frameRate","hvcc","480WkCMAF","eofFlag","from","profile_idc","generalTierFlag","presentWidth"];return(Yr=function(){return e})()}function Kr(e){return!((t=e)>=32&&t<=40);var t}function Xr(e){return e>=16&&e<=21}function Jr(e){const t=Zr;if(0===e[t(416)])return!1;const r=Gr(e[0]);for(let n=1;n=n[t(427)])return this[t(466)]=!0,n.byteLength;let e=n[r+0]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],i=n[r+0]<<16|n[r+1]<<8|n[r+2];if(1===e||1===i)return r;r++}}[zr(429)](){const e=zr;let t=this[e(344)],r=null;for(;null==r&&!this.eofFlag;){let n=this.currentStartcodeOffset;n+=1===(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])?4:3;let i=t[n]>>1&63,s=(128&t[n])>>>7,o=this[e(389)](n);this.currentStartcodeOffset=o,0===s&&(r={type:i,data:t.subarray(n,o)})}return r}}class en{constructor(e){const t=zr;let r=e.data[t(427)];this[t(362)]=e[t(362)],this[t(344)]=new Uint8Array(4+r),new DataView(this[t(344)].buffer)[t(379)](0,r),this.data.set(e.data,4)}}var tn=In;!function(e,t){for(var r=In,n=e();;)try{if(817944===-parseInt(r(492))/1+-parseInt(r(497))/2+-parseInt(r(466))/3*(parseInt(r(437))/4)+-parseInt(r(505))/5*(parseInt(r(458))/6)+-parseInt(r(428))/7*(-parseInt(r(457))/8)+-parseInt(r(461))/9+parseInt(r(426))/10*(parseInt(r(453))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(An);var rn,nn=tn(417),sn=tn(491),on=/^(?:text|application)\/xml/i,an=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,cn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,un=/^\s*$/,ln={},dn={},hn="",fn={type:tn(463),beforeSend:pn,success:pn,error:pn,complete:pn,context:null,xhr:function(){return new window.XMLHttpRequest},accepts:{json:nn,xml:"application/xml, text/xml",html:sn,text:"text/plain","*":"*/"[tn(446)]("*")},crossDomain:!1,timeout:0,username:null,password:null,processData:!0,promise:pn,contentType:tn(516)};function pn(){}var mn=function(e,t){var r=tn;typeof e===r(512)&&(t=e,e=void 0);var n=En({},t=t||{});for(var i in fn)void 0===n[i]&&(n[i]=fn[i]);try{var s={},o=new Promise((function(e,t){var n=r;s[n(499)]=e,s[n(508)]=t}));o[r(499)]=s[r(499)],o[r(508)]=s[r(508)],n[r(479)]=o}catch(e){n.promise={resolve:pn,reject:pn}}var a=cn[r(482)](window[r(514)][r(493)].toLowerCase())||[];n[r(465)]=((e||n[r(465)]||window[r(514)][r(493)])+"")[r(433)](/#.*$/,"")[r(433)](/^\/\//,a[1]+"//");var c=n.url;!n.crossDomain&&(n[r(454)]=/^([\w-]+:)?\/\/([^\/]+)/[r(448)](n[r(465)])&&RegExp.$2!==window[r(514)][r(493)]);var u=n[r(447)];if(u===r(502)){if(!/=\?/[r(448)](n.url)){var l=(n[r(502)]||r(459))+"=?";n[r(465)]=wn(n[r(465)],l)}return function(e){var t,r=tn,n=e[r(449)]||"jsonp"+Tn(),i=window[r(469)][r(418)]("script"),s={abort:function(){n in window&&(window[n]=pn)}},o=window[r(469)][r(506)](r(455))[0]||window.document.documentElement;function a(n){var i=r;window[i(429)](t),s[i(427)](),gn(n.type,s,n[i(474)],e),c()}function c(){var e=r;i[e(439)]?i[e(439)]():i.onload=i[e(509)]=i[e(472)]=null,i[e(477)]&&i[e(477)][e(496)](i),i=null,delete window[n]}return i[r(472)]=function(e){a(e)},window[n]=function(n){window[r(429)](t),vn(n,s,e),c()},bn(e),i[r(481)]=e[r(465)][r(433)](/=\?/,"="+n),i[r(481)]=wn(i[r(481)],"_="+(new Date)[r(425)]()),i[r(436)]=!0,e[r(476)]&&(i[r(483)]=e[r(476)]),o[r(495)](i,o[r(489)]),e.timeout>0&&(t=window[r(511)]((function(){var t=r;s[t(427)](),gn(t(467),s,t(467),e),c()}),e[r(467)])),e[r(479)].abort=function(){s[r(427)]()},e[r(479)][r(442)]=s,e.promise}(n)}bn(n);var d=n[r(441)][u]||n[r(441)]["*"],h={};/^([\w-]+:)\/\//[r(448)](n[r(465)])?RegExp.$1:window.location[r(504)];var f,p=fn[r(442)]();!n.crossDomain&&!h[r(518)]&&(h["X-Requested-With"]=r(510)),n.ifModified&&(ln[c]&&(h[r(515)]=ln[c]),dn[c]&&(h[r(450)]=dn[c])),d&&(h.Accept=d,d[r(488)](",")>-1&&(d=d[r(464)](",",2)[0]),p[r(486)]&&p[r(486)](d));var m=!/^(?:GET|HEAD)$/.test(n[r(474)][r(419)]());if((n[r(513)]&&m&&!1!==n.contentType||t[r(490)])&&(h[r(420)]=n.contentType),!1===n[r(434)]&&!m){var v=/([?&])_=[^&]*/;n[r(465)]=v.test(c)?c[r(433)](v,"$1_="+Tn()):c+(/\?/[r(448)](c)?"&":"?")+"_="+Tn()}n[r(423)]=En(h,n.headers||{}),p[r(509)]=function(){var e,t,i=r;if(4===p[i(431)]){clearTimeout(f);var s,o=!1;if(p[i(422)]>=200&&p.status<300||304===p.status){if(hn=p[i(432)](),n[i(500)]){var a=_n("Last-Modified");a&&(ln[c]=a),(a=_n("etag"))&&(dn[c]=a)}u=u||(e=p[i(452)](i(485)),t=tn,e&&(e===sn?t(421):e===nn?"json":on.test(e)&&"xml")||t(462)),s=p[i(430)];try{u===i(519)?s=p[i(478)]:u===i(416)&&(s=un[i(448)](s)?null:JSON[i(471)](s))}catch(e){o=e}o?gn(o,"parseerror",p,n):vn(s,p,n)}else gn(null,"error",p,n)}};var y=!("async"in n)||n.async;if(p.open(n[r(474)],n[r(465)],y,n.username,n.password),n[r(473)])for(var g in n[r(473)])p[g]=n[r(473)][g];for(var g in n.mimeType&&p[r(486)]&&p[r(486)](n[r(424)]),n[r(423)])void 0!==n[r(423)][g]&&p.setRequestHeader(g,n[r(423)][g]+"");return!1===function(e,t){var r=tn,n=t[r(468)];if(!1===t[r(435)][r(451)](n,e,t))return!1}(p,n)?(p[r(427)](),!1):(n[r(467)]>0&&(f=window[r(511)]((function(){var e=r;p[e(509)]=pn,p[e(427)](),gn(null,e(467),p,n)}),n.timeout)),p[r(443)](n.data?n[r(513)]:null),n[r(479)][r(427)]=function(){p[r(427)]()},n[r(479)])};function vn(e,t,r){var n=tn,i=r[n(468)],s=n(460);r[n(460)][n(451)](i,e,s,t),r.promise[n(499)](e,s,t),yn(s,t,r)}function yn(e,t,r){var n=tn,i=r[n(468)];r[n(444)].call(i,t,e)}function gn(e,t,r,n){var i=tn,s=n[i(468)];n.error[i(451)](s,r,t,e),n.promise[i(508)](r,t,e),yn(t,r,n)}function _n(e){var t,r=tn;if(!rn){for(rn={};t=an[r(482)](hn);)rn[t[1][r(517)]()]=t[2];t=rn[e.toLowerCase()]}return null===t?null:t}function wn(e,t){return(e+"&"+t)[tn(433)](/[&?]{1,2}/,"?")}function bn(e){var t,r,n,i,s=tn;kn(e)&&!(e[s(513)]instanceof FormData)&&e.processData&&(e[s(513)]=(t=e[s(513)],(i=[])[(n=tn)(440)]=function(e,t){this.push(encodeURIComponent(e)+"="+encodeURIComponent(t))},Sn(i,t,r),i[n(445)]("&")[n(433)](n(438),"+"))),e[s(513)]&&(!e[s(474)]||e[s(474)].toUpperCase()===s(463))&&(e.url=wn(e[s(465)],e[s(513)]))}function Sn(e,t,r,n){var i,s,o=tn,a=(i=t,s=tn,Object[s(487)].toString.call(i)===s(503));for(var c in t){var u=t[c];n&&(c=r?n:n+"["+(a?"":c)+"]"),!n&&a?e[o(440)](u[o(507)],u[o(480)]):(r?a(u):kn(u))?Sn(e,u,r,c):e[o(440)](c,u)}}function En(e){for(var t=tn,r=Array[t(487)][t(475)],n=r[t(451)](arguments,1),i=0,s=n.length;i255)return!1;return!0}function Mn(e,t){var r=xn;if(e[r(136)]&&e[r(152)]===r(156))return t&&(e=e[r(139)]?e[r(139)]():Array[r(157)][r(139)][r(159)](e)),e;if(Array[r(140)](e)){if(!Bn(e))throw new Error(r(144)+e);return new Uint8Array(e)}if(Pn(e[r(129)])&&Bn(e))return new Uint8Array(e);throw new Error(r(153))}function Fn(e){return new Uint8Array(e)}function Un(){var e=["PKCS#7 padding byte out of range","setValue","ecb","cbc","222080eJdyAp","join","_prepare","decrypt","_shiftRegister","ofb","PKCS#7 invalid length","invalid ciphertext size (must be 16 bytes)","cfb","2752080vvIJWR","length","0123456789abcdef","encrypt","Counter","509256JWzDgN","Cipher Feedback","defineProperty","buffer","_lastPrecipherIndex","ctr","slice","isArray","set","AES must be instanitated with `new`","2045260tlPYnA","Array contains invalid value: ","key","fromCharCode","_remainingCounter","4621680vPnaQU","_aes","8nkIWrm","1125732zijshH","name","unsupported array-like object","substr","_Ke","Uint8Array","prototype","2181mFzEaL","call","invalid counter bytes size (must be 16 bytes)","PKCS#7 invalid padding byte","_lastCipherblock","invalid plaintext size (must be multiple of 16 bytes)","_remainingCounterIndex","invalid initialation vector size (must be 16 size)","_lastPrecipher","push","_counter","integer value out of safe range","segmentSize","invalid initialation vector size (must be 16 bytes)","5036wWoRab","number","_Kd","Cipher Block Chaining","setBytes","increment","description","Counter must be instanitated with `new`"];return(Un=function(){return e})()}function Rn(e,t,r,n,i){var s=xn;(null!=n||null!=i)&&(e=e[s(139)]?e[s(139)](n,i):Array[s(157)].slice[s(159)](e,n,i)),t[s(141)](e,r)}!function(e,t){for(var r=xn,n=e();;)try{if(711073===parseInt(r(151))/1+parseInt(r(184))/2+-parseInt(r(158))/3*(-parseInt(r(172))/4)+-parseInt(r(128))/5+-parseInt(r(133))/6+-parseInt(r(143))/7*(parseInt(r(150))/8)+-parseInt(r(148))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Un);var Ln,On,zn={toBytes:function(e){var t=xn,r=[],n=0;for(e=encodeURI(e);n191&&i<224?(r[t(167)](String.fromCharCode((31&i)<<6|63&e[n+1])),n+=2):(r[t(167)](String[t(146)]((15&i)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return r[t(185)]("")}},Nn=(On=(Ln=xn)(130),{toBytes:function(e){for(var t=xn,r=[],n=0;n>4]+On[15&i])}return r[t(185)]("")}}),Hn={16:10,24:12,32:14},jn=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],Vn=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],Wn=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],$n=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],Gn=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],qn=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],Yn=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Kn=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],Xn=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],Jn=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Zn=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Qn=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],ei=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],ti=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],ri=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function ni(e){for(var t=[],r=0;r>2,this._Ke[n][r%4]=o[r],this._Kd[t-n][r%4]=o[r];for(var a,c=0,u=s;u>16&255]<<24^Vn[a>>8&255]<<16^Vn[255&a]<<8^Vn[a>>24&255]^jn[c]<<24,c+=1,8!=s)for(r=1;r>8&255]<<8^Vn[a>>16&255]<<16^Vn[a>>24&255]<<24;for(r=s/2+1;r>2,d=u%4,this[e(155)][l][d]=o[r],this._Kd[t-l][d]=o[r++],u++}for(var l=1;l>24&255]^ei[a>>16&255]^ti[a>>8&255]^ri[255&a]},ii[Dn(157)][Dn(131)]=function(e){var t=Dn;if(16!=e[t(129)])throw new Error("invalid plaintext size (must be 16 bytes)");for(var r=this[t(155)][t(129)]-1,n=[0,0,0,0],i=ni(e),s=0;s<4;s++)i[s]^=this[t(155)][0][s];for(var o=1;o>24&255]^Gn[i[(s+1)%4]>>16&255]^qn[i[(s+2)%4]>>8&255]^Yn[255&i[(s+3)%4]]^this._Ke[o][s];i=n[t(139)]()}var a,c=Fn(16);for(s=0;s<4;s++)a=this[t(155)][r][s],c[4*s]=255&(Vn[i[s]>>24&255]^a>>24),c[4*s+1]=255&(Vn[i[(s+1)%4]>>16&255]^a>>16),c[4*s+2]=255&(Vn[i[(s+2)%4]>>8&255]^a>>8),c[4*s+3]=255&(Vn[255&i[(s+3)%4]]^a);return c},ii[Dn(157)].decrypt=function(e){var t=Dn;if(16!=e[t(129)])throw new Error(t(191));for(var r=this._Kd[t(129)]-1,n=[0,0,0,0],i=ni(e),s=0;s<4;s++)i[s]^=this[t(174)][0][s];for(var o=1;o>24&255]^Xn[i[(s+3)%4]>>16&255]^Jn[i[(s+2)%4]>>8&255]^Zn[255&i[(s+1)%4]]^this[t(174)][o][s];i=n[t(139)]()}var a,c=Fn(16);for(s=0;s<4;s++)a=this[t(174)][r][s],c[4*s]=255&(Wn[i[s]>>24&255]^a>>24),c[4*s+1]=255&(Wn[i[(s+3)%4]>>16&255]^a>>16),c[4*s+2]=255&(Wn[i[(s+2)%4]>>8&255]^a>>8),c[4*s+3]=255&(Wn[255&i[(s+1)%4]]^a);return c};var si=function(e){var t=Dn;if(!(this instanceof si))throw Error("AES must be instanitated with `new`");this[t(178)]="Electronic Code Block",this[t(152)]=t(182),this[t(149)]=new ii(e)};si[Dn(157)][Dn(131)]=function(e){var t=Dn;if((e=Mn(e))[t(129)]%16!=0)throw new Error(t(163));for(var r=Fn(e[t(129)]),n=Fn(16),i=0;iNumber.MAX_SAFE_INTEGER)throw new Error(t(169));for(var r=15;r>=0;--r)this[t(168)][r]=e%256,e=parseInt(e/256)},ui.prototype[Dn(176)]=function(e){var t=Dn;if(16!=(e=Mn(e,!0))[t(129)])throw new Error(t(160));this[t(168)]=e},ui[Dn(157)][Dn(177)]=function(){for(var e=Dn,t=15;t>=0;t--){if(255!==this._counter[t]){this[e(168)][t]++;break}this._counter[t]=0}};var li=function(e,t){var r=Dn;if(!(this instanceof li))throw Error("AES must be instanitated with `new`");this[r(178)]=r(132),this.name=r(138),!(t instanceof ui)&&(t=new ui(t)),this._counter=t,this[r(147)]=null,this[r(164)]=16,this._aes=new ii(e)};li.prototype[Dn(131)]=function(e){for(var t=Dn,r=Mn(e,!0),n=0;n16)throw new Error(t(180));for(var n=e.length-r,i=0;i>>2]>>>24-a%4*8&255;r[s+a>>>2]|=c<<24-(s+a)%4*8}else for(var u=0;u>>2]=n[u>>>2];return this[t(474)]+=o,this},clamp:function(){var t=i,r=this.words,n=this[t(474)];r[n>>>2]&=4294967295<<32-n%4*8,r[t(456)]=e[t(479)](n/4)},clone:function(){var e=i,t=u[e(489)][e(471)](this);return t.words=this.words[e(504)](0),t},random:function(e){for(var t=i,r=[],n=0;n>>2]>>>24-o%4*8&255;s[t(522)]((a>>>4)[t(521)](16)),s[t(522)]((15&a).toString(16))}return s[t(523)]("")},parse:function(e){for(var t=i,r=e[t(456)],n=[],s=0;s>>3]|=parseInt(e[t(519)](s,2),16)<<24-s%8*4;return new(l[t(466)])(n,r/2)}},f=d[i(468)]={stringify:function(e){for(var t=i,r=e.words,n=e[t(474)],s=[],o=0;o>>2]>>>24-o%4*8&255;s[t(522)](String[t(509)](a))}return s[t(523)]("")},parse:function(e){for(var t=i,r=e[t(456)],n=[],s=0;s>>2]|=(255&e[t(511)](s))<<24-s%4*8;return new l.init(n,r)}},p=d[i(469)]={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f[i(512)](unescape(encodeURIComponent(e)))}},m=c[i(502)]=u[i(459)]({reset:function(){var e=i;this[e(484)]=new(l[e(466)]),this[e(515)]=0},_append:function(e){var t=i;typeof e==t(458)&&(e=p[t(512)](e)),this[t(484)][t(470)](e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=i,s=this[n(484)],o=s[n(524)],a=s.sigBytes,c=this[n(518)],u=a/(4*c),d=(u=t?e[n(479)](u):e[n(454)]((0|u)-this._minBufferSize,0))*c,h=e.min(4*d,a);if(d){for(var f=0;f>>2]|=e[o]<<24-o%4*8;n[r(394)](this,s,i)}else n[r(409)](this,arguments)};i.prototype=r}}(),e[t(412)].WordArray},"object"===(i=_i)(398)?e.exports=n(mi):"undefined"===i(402)&&(void 0)[i(393)]?(void 0)([i(392)],n):n(r.CryptoJS)}));function _i(e,t){var r=wi();return(_i=function(e,t){return r[e-=390]})(e,t)}function wi(){var e=["138BCfAft","byteLength","function","byteOffset","init","3ZXEigO","253kOTtjz","21gGVEfh","371058KgCXfV","apply","446296wdoWnq","302790WkQWgD","lib","undefined","1084UBxHyW","buffer","./core","amd","call","676965QxkOyS","1467639Ltlwhv","WordArray","object","2578560tDpVyC"];return(wi=function(){return e})()}var bi=Si;function Si(e,t){var r=Ei();return(Si=function(e,t){return r[e-=498]})(e,t)}!function(e,t){for(var r=Si,n=e();;)try{if(660378===-parseInt(r(505))/1*(parseInt(r(506))/2)+-parseInt(r(514))/3*(-parseInt(r(504))/4)+parseInt(r(526))/5*(parseInt(r(519))/6)+-parseInt(r(502))/7+parseInt(r(516))/8+parseInt(r(508))/9*(-parseInt(r(518))/10)+parseInt(r(515))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ei);ze[bi(507)]((function(e,t){var r,n,i,s=bi;r=ze[s(499)],n=function(e){var t=s;return function(){var t=Si,r=e,n=r[t(513)][t(521)],i=r.enc;function s(e){return e<<8&4278255360|e>>>8&16711935}i.Utf16=i[t(517)]={stringify:function(e){for(var r=t,n=e.words,i=e[r(511)],s=[],o=0;o>>2]>>>16-o%4*8&65535;s[r(520)](String.fromCharCode(a))}return s[r(525)]("")},parse:function(e){for(var r=e[t(500)],i=[],s=0;s>>1]|=e.charCodeAt(s)<<16-s%2*16;return n.create(i,2*r)}},i[t(523)]={stringify:function(e){for(var r=t,n=e[r(501)],i=e[r(511)],o=[],a=0;a>>2]>>>16-a%4*8&65535);o[r(520)](String.fromCharCode(c))}return o[r(525)]("")},parse:function(e){for(var r=t,i=e.length,o=[],a=0;a>>1]|=s(e.charCodeAt(a)<<16-a%2*16);return n[r(524)](o,2*i)}}}(),e[t(503)].Utf16},(i=Si)(512)==i(512)?e[i(498)]=n(mi):n(r[i(510)])}));function Ei(){var e=["CryptoJS","sigBytes","object","lib","2527674emNjYN","18039131JIcVXZ","3990464qUJygF","Utf16BE","20HKclOS","3728436RkGMWQ","push","WordArray","amd","Utf16LE","create","join","5vfLcjI","exports","commonjsGlobal","length","words","8026116uNknfw","enc","4XiNJxs","1eslCDp","1173626lwpvMw","createCommonjsModule","5440113BhBshe","./core"];return(Ei=function(){return e})()}var Ii=ki;function ki(e,t){var r=Ai();return(ki=function(e,t){return r[e-=415]})(e,t)}!function(e,t){for(var r=ki,n=e();;)try{if(356244===parseInt(r(423))/1*(-parseInt(r(442))/2)+parseInt(r(439))/3*(parseInt(r(415))/4)+-parseInt(r(424))/5*(-parseInt(r(431))/6)+-parseInt(r(434))/7*(parseInt(r(416))/8)+-parseInt(r(428))/9*(parseInt(r(433))/10)+parseInt(r(421))/11*(-parseInt(r(430))/12)+parseInt(r(425))/13)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ai);ze[Ii(419)]((function(e,t){var r,n;e[ki(429)]=(r=mi,n=ki,function(){var e=ki,t=r,n=t[e(417)][e(437)];function i(e,t,r){for(var i=[],s=0,o=0;o>>6-o%4*2;i[s>>>2]|=a<<24-s%4*8,s++}return n.create(i,s)}t.enc[e(444)]={stringify:function(t){var r=e,n=t[r(422)],i=t.sigBytes,s=this[r(438)];t[r(427)]();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,u=0;u<4&&a+.75*u>>6*(3-u)&63));var l=s[r(418)](64);if(l)for(;o.length%4;)o[r(432)](l);return o[r(441)]("")},parse:function(t){var r=e,n=t[r(426)],s=this[r(438)],o=this[r(445)];if(!o){o=this._reverseMap=[];for(var a=0;a>>2]>>>24-c%4*8&255)<<16|(i[c+1>>>2]>>>24-(c+1)%4*8&255)<<8|i[c+2>>>2]>>>24-(c+2)%4*8&255,l=0;l<4&&c+.75*l>>6*(3-l)&63));var d=o[n(476)](64);if(d)for(;a[n(484)]%4;)a.push(d);return a[n(455)]("")},parse:function(e,r){var i=t;void 0===r&&(r=!0);var s=e.length,o=r?this[i(463)]:this[i(467)],a=this[i(471)];if(!a){a=this[i(471)]=[];for(var c=0;c>>6-c%4*2;o[a>>>2]|=u<<24-a%4*8,a++}return n[s(466)](o,a)}(e,s,a)},_map:t(465),_safe_map:t(485)},e[i(482)][i(469)]},(i=Ti)(459)==i(459)?e[i(483)]=n(mi):"undefined"===i(458)&&(void 0)[i(470)]?(void 0)([i(475)],n):n(r[i(478)])}));function Di(e,t){var r=Bi();return(Di=function(e,t){return r[e-=482]})(e,t)}var Pi=Di;function Bi(){var e=["WordArray","sigBytes","algo","4242600xMzFhu","HmacMD5","_createHmacHelper","48RfCWuI","_hash","extend","CryptoJS","_nDataBytes","5403876gUFpHb","words","sin","length","2rxNNDB","10295130yDqRyJ","floor","_data","MD5","init","_createHelper","540776nEgwkr","Hasher","createCommonjsModule","amd","10591626CBrURB","5FsjahN","475134PDQKur","call","abs","object","2173759gRgYmJ","function","./core"];return(Bi=function(){return e})()}!function(e,t){for(var r=Di,n=e();;)try{if(936616===parseInt(r(514))/1*(parseInt(r(492))/2)+-parseInt(r(510))/3+parseInt(r(486))/4+-parseInt(r(491))/5*(-parseInt(r(490))/6)+-parseInt(r(496))/7*(-parseInt(r(505))/8)+-parseInt(r(502))/9+-parseInt(r(515))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Bi);ze[Pi(488)]((function(e,t){var r,n,i;r=Le,n=function(e){var t=Di;return function(t){var r=Di,n=e,i=n.lib,s=i[r(499)],o=i[r(487)],a=n[r(501)],c=[];!function(){for(var e=r,n=0;n<64;n++)c[n]=4294967296*t[e(494)](t[e(512)](n+1))|0}();var u=a.MD5=o[r(507)]({_doReset:function(){var e=r;this[e(506)]=new(s[e(484)])([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=r,i=0;i<16;i++){var s=t+i,o=e[s];e[s]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a=this[n(506)][n(511)],u=e[t+0],p=e[t+1],m=e[t+2],v=e[t+3],y=e[t+4],g=e[t+5],_=e[t+6],w=e[t+7],b=e[t+8],S=e[t+9],E=e[t+10],I=e[t+11],k=e[t+12],A=e[t+13],C=e[t+14],T=e[t+15],x=a[0],D=a[1],P=a[2],B=a[3];x=l(x,D,P,B,u,7,c[0]),B=l(B,x,D,P,p,12,c[1]),P=l(P,B,x,D,m,17,c[2]),D=l(D,P,B,x,v,22,c[3]),x=l(x,D,P,B,y,7,c[4]),B=l(B,x,D,P,g,12,c[5]),P=l(P,B,x,D,_,17,c[6]),D=l(D,P,B,x,w,22,c[7]),x=l(x,D,P,B,b,7,c[8]),B=l(B,x,D,P,S,12,c[9]),P=l(P,B,x,D,E,17,c[10]),D=l(D,P,B,x,I,22,c[11]),x=l(x,D,P,B,k,7,c[12]),B=l(B,x,D,P,A,12,c[13]),P=l(P,B,x,D,C,17,c[14]),x=d(x,D=l(D,P,B,x,T,22,c[15]),P,B,p,5,c[16]),B=d(B,x,D,P,_,9,c[17]),P=d(P,B,x,D,I,14,c[18]),D=d(D,P,B,x,u,20,c[19]),x=d(x,D,P,B,g,5,c[20]),B=d(B,x,D,P,E,9,c[21]),P=d(P,B,x,D,T,14,c[22]),D=d(D,P,B,x,y,20,c[23]),x=d(x,D,P,B,S,5,c[24]),B=d(B,x,D,P,C,9,c[25]),P=d(P,B,x,D,v,14,c[26]),D=d(D,P,B,x,b,20,c[27]),x=d(x,D,P,B,A,5,c[28]),B=d(B,x,D,P,m,9,c[29]),P=d(P,B,x,D,w,14,c[30]),x=h(x,D=d(D,P,B,x,k,20,c[31]),P,B,g,4,c[32]),B=h(B,x,D,P,b,11,c[33]),P=h(P,B,x,D,I,16,c[34]),D=h(D,P,B,x,C,23,c[35]),x=h(x,D,P,B,p,4,c[36]),B=h(B,x,D,P,y,11,c[37]),P=h(P,B,x,D,w,16,c[38]),D=h(D,P,B,x,E,23,c[39]),x=h(x,D,P,B,A,4,c[40]),B=h(B,x,D,P,u,11,c[41]),P=h(P,B,x,D,v,16,c[42]),D=h(D,P,B,x,_,23,c[43]),x=h(x,D,P,B,S,4,c[44]),B=h(B,x,D,P,k,11,c[45]),P=h(P,B,x,D,T,16,c[46]),x=f(x,D=h(D,P,B,x,m,23,c[47]),P,B,u,6,c[48]),B=f(B,x,D,P,w,10,c[49]),P=f(P,B,x,D,C,15,c[50]),D=f(D,P,B,x,g,21,c[51]),x=f(x,D,P,B,k,6,c[52]),B=f(B,x,D,P,v,10,c[53]),P=f(P,B,x,D,E,15,c[54]),D=f(D,P,B,x,p,21,c[55]),x=f(x,D,P,B,b,6,c[56]),B=f(B,x,D,P,T,10,c[57]),P=f(P,B,x,D,_,15,c[58]),D=f(D,P,B,x,A,21,c[59]),x=f(x,D,P,B,y,6,c[60]),B=f(B,x,D,P,I,10,c[61]),P=f(P,B,x,D,m,15,c[62]),D=f(D,P,B,x,S,21,c[63]),a[0]=a[0]+x|0,a[1]=a[1]+D|0,a[2]=a[2]+P|0,a[3]=a[3]+B|0},_doFinalize:function(){var e=r,n=this[e(482)],i=n[e(511)],s=8*this[e(509)],o=8*n[e(500)];i[o>>>5]|=128<<24-o%32;var a=t[e(516)](s/4294967296),c=s;i[15+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(o+64>>>9<<4)]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),n[e(500)]=4*(i[e(513)]+1),this._process();for(var u=this._hash,l=u[e(511)],d=0;d<4;d++){var h=l[d];l[d]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return u},clone:function(){var e=r,t=o.clone[e(493)](this);return t._hash=this[e(506)].clone(),t}});function l(e,t,r,n,i,s,o){var a=e+(t&r|~t&n)+i+o;return(a<>>32-s)+t}function d(e,t,r,n,i,s,o){var a=e+(t&n|r&~n)+i+o;return(a<>>32-s)+t}function h(e,t,r,n,i,s,o){var a=e+(t^r^n)+i+o;return(a<>>32-s)+t}function f(e,t,r,n,i,s,o){var a=e+(r^(t|~n))+i+o;return(a<>>32-s)+t}n.MD5=o[r(485)](u),n[r(503)]=o[r(504)](u)}(Math),e[t(483)]},"object"===(i=Di)(495)?e.exports=n(mi):"undefined"===i(497)&&(void 0)[i(489)]?(void 0)([i(498)],n):n(r[i(508)])}));var Mi=Fi;function Fi(e,t){var r=Ui();return(Fi=function(e,t){return r[e-=310]})(e,t)}function Ui(){var e=["createCommonjsModule","object","floor","3582744ivjYNk","_process","4818936KlUAlg","SHA1","commonjsGlobal","words","exports","254SSDIpO","_createHmacHelper","_hash","HmacSHA1","_nDataBytes","WordArray","init","5471uicyxJ","10576uYhwfZ","algo","7qUxwbl","12UKqcGz","Hasher","958940PcPXOf","sigBytes","840717bCKQyJ","2679170NcqnSm","1137EkHRNm","clone","_createHelper"];return(Ui=function(){return e})()}!function(e,t){for(var r=Fi,n=e();;)try{if(527484===-parseInt(r(332))/1*(-parseInt(r(325))/2)+-parseInt(r(312))/3*(parseInt(r(333))/4)+parseInt(r(338))/5*(parseInt(r(336))/6)+-parseInt(r(335))/7*(-parseInt(r(320))/8)+-parseInt(r(310))/9+parseInt(r(311))/10+-parseInt(r(318))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ui);ze[Mi(315)]((function(e,t){var r,n,i;r=ze[Mi(322)],n=function(e){return t=Fi,n=(r=e).lib,i=n[t(330)],s=n[t(337)],o=r[t(334)],a=[],c=o[t(321)]=s.extend({_doReset:function(){var e=t;this[e(327)]=new(i[e(331)])([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,r){for(var n=t,i=this[n(327)][n(323)],s=i[0],o=i[1],c=i[2],u=i[3],l=i[4],d=0;d<80;d++){if(d<16)a[d]=0|e[r+d];else{var h=a[d-3]^a[d-8]^a[d-14]^a[d-16];a[d]=h<<1|h>>>31}var f=(s<<5|s>>>27)+l+a[d];f+=d<20?1518500249+(o&c|~o&u):d<40?1859775393+(o^c^u):d<60?(o&c|o&u|c&u)-1894007588:(o^c^u)-899497514,l=u,u=c,c=o<<30|o>>>2,o=s,s=f}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+c|0,i[3]=i[3]+u|0,i[4]=i[4]+l|0},_doFinalize:function(){var e=t,r=this._data,n=r.words,i=8*this[e(329)],s=8*r[e(339)];return n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=Math[e(317)](i/4294967296),n[15+(s+64>>>9<<4)]=i,r.sigBytes=4*n.length,this[e(319)](),this[e(327)]},clone:function(){var e=t,r=s[e(313)].call(this);return r[e(327)]=this._hash[e(313)](),r}}),r[t(321)]=s[t(314)](c),r[t(328)]=s[t(326)](c),e.SHA1;var t,r,n,i,s,o,a,c},"object"===(i=Fi)(316)?e[i(324)]=n(mi):n(r.CryptoJS)}));var Ri=Oi;function Li(){var e=["28VkxXGa","58xwALYs","pow","_process","_nDataBytes","sqrt","2870273PVJrvp","amd","call","33757QXgeTK","1218321vFlJRb","HmacSHA256","952788DqbwWv","_createHelper","createCommonjsModule","SHA256","object","_data","96615rQSIIE","clone","words","floor","_createHmacHelper","Hasher","extend","1079118uBEVbr","slice","length","init","algo","7446608LzHWNu","_hash","./core","CryptoJS"];return(Li=function(){return e})()}!function(e,t){for(var r=Oi,n=e();;)try{if(494799===-parseInt(r(174))/1*(parseInt(r(166))/2)+-parseInt(r(177))/3+-parseInt(r(165))/4*(-parseInt(r(183))/5)+parseInt(r(190))/6+parseInt(r(171))/7+parseInt(r(161))/8+parseInt(r(175))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Li);ze[Ri(179)]((function(e,t){var r,n,i;r=Le,n=function(e){var t=Oi;return function(t){var r=Oi,n=e,i=n.lib,s=i.WordArray,o=i[r(188)],a=n[r(160)],c=[],u=[];!function(){var e=r;function n(e){for(var r=t[Oi(170)](e),n=2;n<=r;n++)if(!(e%n))return!1;return!0}function i(e){return 4294967296*(e-(0|e))|0}for(var s=2,o=0;o<64;)n(s)&&(o<8&&(c[o]=i(t[e(167)](s,.5))),u[o]=i(t.pow(s,1/3)),o++),s++}();var l=[],d=a.SHA256=o[r(189)]({_doReset:function(){var e=r;this[e(162)]=new(s[e(159)])(c[e(191)](0))},_doProcessBlock:function(e,t){for(var n=r,i=this[n(162)][n(185)],s=i[0],o=i[1],a=i[2],c=i[3],d=i[4],h=i[5],f=i[6],p=i[7],m=0;m<64;m++){if(m<16)l[m]=0|e[t+m];else{var v=l[m-15],y=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3,g=l[m-2],_=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;l[m]=y+l[m-7]+_+l[m-16]}var w=s&o^s&a^o&a,b=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),S=p+((d<<26|d>>>6)^(d<<21|d>>>11)^(d<<7|d>>>25))+(d&h^~d&f)+u[m]+l[m];p=f,f=h,h=d,d=c+S|0,c=a,a=o,o=s,s=S+(b+w)|0}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+a|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0,i[5]=i[5]+h|0,i[6]=i[6]+f|0,i[7]=i[7]+p|0},_doFinalize:function(){var e=r,n=this[e(182)],i=n[e(185)],s=8*this[e(169)],o=8*n.sigBytes;return i[o>>>5]|=128<<24-o%32,i[14+(o+64>>>9<<4)]=t[e(186)](s/4294967296),i[15+(o+64>>>9<<4)]=s,n.sigBytes=4*i[e(192)],this[e(168)](),this._hash},clone:function(){var e=r,t=o[e(184)][e(173)](this);return t[e(162)]=this._hash[e(184)](),t}});n[r(180)]=o[r(178)](d),n[r(176)]=o[r(187)](d)}(Math),e[t(180)]},(i=Oi)(181)==i(181)?e.exports=n(mi):n(r[i(164)])}));function Oi(e,t){var r=Li();return(Oi=function(e,t){return r[e-=159]})(e,t)}var zi=Hi;function Ni(){var e=["_doFinalize","85xTlBUg","call","./core","4367dBeWqh","lib","13796llLFnE","function","425604fecrsM","1952diNzhJ","967698ypLoNZ","7230liQCVy","algo","HmacSHA224","createCommonjsModule","8ljHJsG","1617980ZXnyew","1492008NaPAHW","SHA256","152vuModx","amd","_createHmacHelper","_hash","object","init"];return(Ni=function(){return e})()}function Hi(e,t){var r=Ni();return(Hi=function(e,t){return r[e-=475]})(e,t)}!function(e,t){for(var r=Hi,n=e();;)try{if(131920===parseInt(r(476))/1*(-parseInt(r(491))/2)+parseInt(r(490))/3+-parseInt(r(488))/4*(parseInt(r(483))/5)+parseInt(r(499))/6+-parseInt(r(498))/7+-parseInt(r(497))/8*(parseInt(r(492))/9)+-parseInt(r(493))/10*(-parseInt(r(486))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ni);ze[zi(496)]((function(e,t){var r,n,i;r=Le,n=function(e){return n=(r=e)[(t=Hi)(487)].WordArray,i=r[t(494)],s=i[t(475)],o=i.SHA224=s.extend({_doReset:function(){var e=t;this[e(479)]=new(n[e(481)])([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=t,r=s[e(482)][e(484)](this);return r.sigBytes-=4,r}}),r.SHA224=s._createHelper(o),r[t(495)]=s[t(478)](o),e.SHA224;var t,r,n,i,s,o},"object"===(i=Hi)(480)?e.exports=n(mi):"undefined"===i(489)&&(void 0)[i(477)]?(void 0)([i(485),"./sha256"],n):n(r.CryptoJS)}));var ji=Vi;function Vi(e,t){var r=Wi();return(Vi=function(e,t){return r[e-=166]})(e,t)}!function(e,t){for(var r=Vi,n=e();;)try{if(699224===-parseInt(r(184))/1+-parseInt(r(178))/2*(-parseInt(r(190))/3)+parseInt(r(188))/4+parseInt(r(192))/5*(-parseInt(r(196))/6)+parseInt(r(197))/7+-parseInt(r(193))/8+parseInt(r(169))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Wi);ze[ji(203)]((function(e,t){var r,n,i;r=Le,n=function(e){return function(){var t=Vi,r=e,n=r[t(195)][t(199)],i=r[t(189)],s=i[t(204)],o=i[t(205)],a=r[t(167)];function c(){var e=t;return s[e(187)][e(171)](s,arguments)}var u=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=c()}();var d=a[t(206)]=n[t(174)]({_doReset:function(){var e=t;this._hash=new(o[e(180)])([new(s[e(180)])(1779033703,4089235720),new(s[e(180)])(3144134277,2227873595),new(s[e(180)])(1013904242,4271175723),new s.init(2773480762,1595750129),new(s[e(180)])(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new(s[e(180)])(1541459225,327033209)])},_doProcessBlock:function(e,r){for(var n=t,i=this._hash[n(183)],s=i[0],o=i[1],a=i[2],c=i[3],d=i[4],h=i[5],f=i[6],p=i[7],m=s.high,v=s[n(177)],y=o.high,g=o[n(177)],_=a.high,w=a[n(177)],b=c[n(166)],S=c[n(177)],E=d[n(166)],I=d[n(177)],k=h[n(166)],A=h[n(177)],C=f[n(166)],T=f[n(177)],x=p[n(166)],D=p[n(177)],P=m,B=v,M=y,F=g,U=_,R=w,L=b,O=S,z=E,N=I,H=k,j=A,V=C,W=T,$=x,G=D,q=0;q<80;q++){var Y,K,X=l[q];if(q<16)K=X[n(166)]=0|e[r+2*q],Y=X[n(177)]=0|e[r+2*q+1];else{var J=l[q-15],Z=J[n(166)],Q=J.low,ee=(Z>>>1|Q<<31)^(Z>>>8|Q<<24)^Z>>>7,te=(Q>>>1|Z<<31)^(Q>>>8|Z<<24)^(Q>>>7|Z<<25),re=l[q-2],ne=re.high,ie=re[n(177)],se=(ne>>>19|ie<<13)^(ne<<3|ie>>>29)^ne>>>6,oe=(ie>>>19|ne<<13)^(ie<<3|ne>>>29)^(ie>>>6|ne<<26),ae=l[q-7],ce=ae[n(166)],ue=ae[n(177)],le=l[q-16],de=le[n(166)],he=le[n(177)];K=(K=(K=ee+ce+((Y=te+ue)>>>0>>0?1:0))+se+((Y+=oe)>>>0>>0?1:0))+de+((Y+=he)>>>0>>0?1:0),X[n(166)]=K,X[n(177)]=Y}var fe,pe=z&H^~z&V,me=N&j^~N&W,ve=P&M^P&U^M&U,ye=B&F^B&R^F&R,ge=(P>>>28|B<<4)^(P<<30|B>>>2)^(P<<25|B>>>7),_e=(B>>>28|P<<4)^(B<<30|P>>>2)^(B<<25|P>>>7),we=(z>>>14|N<<18)^(z>>>18|N<<14)^(z<<23|N>>>9),be=(N>>>14|z<<18)^(N>>>18|z<<14)^(N<<23|z>>>9),Se=u[q],Ee=Se[n(166)],Ie=Se[n(177)],ke=$+we+((fe=G+be)>>>0>>0?1:0),Ae=_e+ye;$=V,G=W,V=H,W=j,H=z,j=N,z=L+(ke=(ke=(ke=ke+pe+((fe+=me)>>>0>>0?1:0))+Ee+((fe+=Ie)>>>0>>0?1:0))+K+((fe+=Y)>>>0>>0?1:0))+((N=O+fe|0)>>>0>>0?1:0)|0,L=U,O=R,U=M,R=F,M=P,F=B,P=ke+(ge+ve+(Ae>>>0<_e>>>0?1:0))+((B=fe+Ae|0)>>>0>>0?1:0)|0}v=s[n(177)]=v+B,s[n(166)]=m+P+(v>>>0>>0?1:0),g=o.low=g+F,o[n(166)]=y+M+(g>>>0>>0?1:0),w=a.low=w+R,a[n(166)]=_+U+(w>>>0>>0?1:0),S=c[n(177)]=S+O,c.high=b+L+(S>>>0>>0?1:0),I=d.low=I+N,d[n(166)]=E+z+(I>>>0>>0?1:0),A=h[n(177)]=A+j,h[n(166)]=k+H+(A>>>0>>0?1:0),T=f[n(177)]=T+W,f[n(166)]=C+V+(T>>>0>>0?1:0),D=p[n(177)]=D+G,p[n(166)]=x+$+(D>>>0>>0?1:0)},_doFinalize:function(){var e=t,r=this._data,n=r[e(183)],i=8*this[e(172)],s=8*r.sigBytes;return n[s>>>5]|=128<<24-s%32,n[30+(s+128>>>10<<5)]=Math[e(201)](i/4294967296),n[31+(s+128>>>10<<5)]=i,r[e(176)]=4*n[e(181)],this[e(186)](),this._hash[e(194)]()},clone:function(){var e=t,r=n[e(179)][e(185)](this);return r[e(200)]=this[e(200)][e(179)](),r},blockSize:32});r[t(206)]=n[t(168)](d),r[t(175)]=n._createHmacHelper(d)}(),e.SHA512},(i=Vi)(182)==i(182)?e[i(170)]=n(mi):n(r[i(191)])}));function Wi(){var e=["clone","init","length","object","words","530279VkGynT","call","_process","create","2794580nKvlAV","x64","3RMRLdX","CryptoJS","14390mGxKdf","7020168ICWQKb","toX32","lib","2190QbjzxW","4930947sENohi","amd","Hasher","_hash","floor","./x64-core","createCommonjsModule","Word","WordArray","SHA512","high","algo","_createHelper","13478751hXTLva","exports","apply","_nDataBytes","./core","extend","HmacSHA512","sigBytes","low","513578qDXmEG"];return(Wi=function(){return e})()}var $i=qi;!function(e,t){for(var r=qi,n=e();;)try{if(330139===parseInt(r(130))/1+-parseInt(r(127))/2+parseInt(r(116))/3*(parseInt(r(117))/4)+parseInt(r(126))/5+parseInt(r(109))/6*(-parseInt(r(114))/7)+-parseInt(r(118))/8+parseInt(r(119))/9*(parseInt(r(123))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Gi);ze[$i(120)]((function(e,t){var r,n,i,s=$i;r=ze[s(111)],n=function(e){var t,r,n,i,o,a,c,u,l=s;return n=(r=e)[(t=qi)(115)],i=n[t(128)],o=n[t(135)],a=r.algo,c=a[t(122)],u=a[t(108)]=c[t(132)]({_doReset:function(){var e=t;this[e(110)]=new o.init([new i.init(3418070365,3238371032),new i.init(1654270250,914150663),new(i[e(133)])(2438529370,812702999),new(i[e(133)])(355462360,4144912697),new(i[e(133)])(1731405415,4290775857),new(i[e(133)])(2394180231,1750603025),new(i[e(133)])(3675008525,1694076839),new(i[e(133)])(1203062813,3204075428)])},_doFinalize:function(){var e=t,r=c._doFinalize[e(121)](this);return r.sigBytes-=16,r}}),r.SHA384=c[t(113)](u),r.HmacSHA384=c[t(124)](u),e[l(108)]},"object"===(i=qi)(125)?e[i(112)]=n(mi):n(r.CryptoJS)}));function Gi(){var e=["375471jBBIoV","createCommonjsModule","call","SHA512","110qMUNng","_createHmacHelper","object","1796685xvlGXy","596670VpVUdg","Word","./x64-core","36960bELHtO","./core","extend","init","amd","WordArray","./sha512","SHA384","2526qkttQk","_hash","commonjsGlobal","exports","_createHelper","553RXdiKo","x64","3zmVtAB","1783196LgSjpa","5114176GeBanY"];return(Gi=function(){return e})()}function qi(e,t){var r=Gi();return(qi=function(e,t){return r[e-=108]})(e,t)}var Yi=Ki;function Ki(e,t){var r=Xi();return(Ki=function(e,t){return r[e-=289]})(e,t)}!function(e,t){for(var r=Ki,n=e();;)try{if(367093===parseInt(r(327))/1+-parseInt(r(300))/2+parseInt(r(307))/3*(-parseInt(r(304))/4)+parseInt(r(290))/5*(-parseInt(r(306))/6)+parseInt(r(330))/7*(parseInt(r(313))/8)+parseInt(r(321))/9*(-parseInt(r(324))/10)+parseInt(r(298))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Xi);ze[Yi(323)]((function(e,t){var r,n,i;r=Le,n=function(e){var t=Ki;return function(t){var r=Ki,n=e,i=n[r(302)],s=i[r(329)],o=i[r(312)],a=n[r(310)][r(320)],c=n[r(319)],u=[],l=[],d=[];!function(){for(var e=1,t=0,r=0;r<24;r++){u[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,s=0;s<24;s++){for(var o=0,c=0,h=0;h<7;h++){if(1&i){var f=(1<>>24)|4278255360&(a<<24|a>>>8),c=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),(D=i[o])[n(305)]^=c,D[n(315)]^=a}for(var f=0;f<24;f++){for(var p=0;p<5;p++){for(var m=0,v=0,y=0;y<5;y++)m^=(D=i[p+5*y])[n(305)],v^=D[n(315)];var g=h[p];g.high=m,g[n(315)]=v}for(p=0;p<5;p++){var _=h[(p+4)%5],w=h[(p+1)%5],b=w[n(305)],S=w.low;for(m=_.high^(b<<1|S>>>31),v=_[n(315)]^(S<<1|b>>>31),y=0;y<5;y++)(D=i[p+5*y])[n(305)]^=m,D[n(315)]^=v}for(var E=1;E<25;E++){var I=(D=i[E])[n(305)],k=D[n(315)],A=u[E];A<32?(m=I<>>32-A,v=k<>>32-A):(m=k<>>64-A,v=I<>>64-A);var C=h[l[E]];C[n(305)]=m,C[n(315)]=v}var T=h[0],x=i[0];for(T[n(305)]=x[n(305)],T[n(315)]=x[n(315)],p=0;p<5;p++)for(y=0;y<5;y++){var D=i[E=p+5*y],P=h[E],B=h[(p+1)%5+5*y],M=h[(p+2)%5+5*y];D[n(305)]=P.high^~B.high&M[n(305)],D.low=P.low^~B[n(315)]&M[n(315)]}D=i[0];var F=d[f];D[n(305)]^=F.high,D[n(315)]^=F.low}},_doFinalize:function(){var e=r,n=this[e(299)],i=n.words;this[e(297)];var o=8*n[e(294)],a=32*this[e(295)];i[o>>>5]|=1<<24-o%32,i[(t[e(303)]((o+1)/a)*a>>>5)-1]|=128,n[e(294)]=4*i[e(309)],this._process();for(var c=this._state,u=this[e(301)][e(293)]/8,l=u/8,d=[],h=0;h>>24)|4278255360&(p<<24|p>>>8),m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),d.push(m),d[e(322)](p)}return new s.init(d,u)},clone:function(){for(var e=r,t=o.clone[e(296)](this),n=t[e(291)]=this[e(291)][e(308)](0),i=0;i<25;i++)n[i]=n[i][e(292)]();return t}});n[r(332)]=o[r(333)](f),n[r(317)]=o._createHmacHelper(f)}(Math),e[t(332)]},"object"===(i=Ki)(326)?e[i(328)]=n(mi):"undefined"===i(311)&&(void 0)[i(318)]?(void 0)(["./core",i(289)],n):n(r[i(314)])}));function Xi(){var e=["algo","Word","7425YdVRpJ","push","createCommonjsModule","4180Jrxrrz","create","object","159678BkHwZy","exports","WordArray","7SLqHbd","extend","SHA3","_createHelper","./x64-core","1810uQzDbf","_state","clone","outputLength","sigBytes","blockSize","call","_nDataBytes","18418202MSfkiy","_data","1406906swlTvd","cfg","lib","ceil","2039188gSThgj","high","7464SGhQIi","3IDptHN","slice","length","x64","function","Hasher","4331688fALzIr","CryptoJS","low","init","HmacSHA3","amd"];return(Xi=function(){return e})()}function Ji(){var e=["HmacRIPEMD160","_nDataBytes","162664TlpZNj","extend","949610rcqrxe","4065990lIbGMT","8662482YUtnEJ","words","5GjSGyN","call","2319786uXruVF","commonjsGlobal","exports","lib","create","object","length","sigBytes","_createHmacHelper","455rhSDkL","385zhERLz","_hash","3562360CCnRpo","clone","CryptoJS","189884xeoObd","amd","WordArray","RIPEMD160","1yZkRTH","_process","_data"];return(Ji=function(){return e})()}function Zi(e,t){var r=Ji();return(Zi=function(e,t){return r[e-=221]})(e,t)}!function(e,t){for(var r=Zi,n=e();;)try{if(860171===parseInt(r(231))/1*(parseInt(r(227))/2)+parseInt(r(239))/3+-parseInt(r(224))/4+-parseInt(r(242))/5*(parseInt(r(240))/6)+-parseInt(r(221))/7*(parseInt(r(236))/8)+-parseInt(r(244))/9+-parseInt(r(238))/10*(-parseInt(r(222))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ji);Oe((function(e,t){var r,n,i,s=Zi;r=ze[s(245)],n=function(e){var t=s;return function(t){var r=Zi,n=e,i=n[r(247)],s=i[r(229)],o=i.Hasher,a=n.algo,c=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=s[r(248)]([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=s[r(248)]([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=s[r(248)]([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=s[r(248)]([0,1518500249,1859775393,2400959708,2840853838]),f=s.create([1352829926,1548603684,1836072691,2053994217,0]),p=a[r(230)]=o[r(237)]({_doReset:function(){this[r(223)]=s.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=r,i=0;i<16;i++){var s=t+i,o=e[s];e[s]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a,p,b,S,E,I,k,A,C,T,x,D=this[n(223)][n(241)],P=h[n(241)],B=f[n(241)],M=c[n(241)],F=u[n(241)],U=l[n(241)],R=d[n(241)];for(I=a=D[0],k=p=D[1],A=b=D[2],C=S=D[3],T=E=D[4],i=0;i<80;i+=1)x=a+e[t+M[i]]|0,x+=i<16?m(p,b,S)+P[0]:i<32?v(p,b,S)+P[1]:i<48?y(p,b,S)+P[2]:i<64?g(p,b,S)+P[3]:_(p,b,S)+P[4],x=(x=w(x|=0,U[i]))+E|0,a=E,E=S,S=w(b,10),b=p,p=x,x=I+e[t+F[i]]|0,x+=i<16?_(k,A,C)+B[0]:i<32?g(k,A,C)+B[1]:i<48?y(k,A,C)+B[2]:i<64?v(k,A,C)+B[3]:m(k,A,C)+B[4],x=(x=w(x|=0,R[i]))+T|0,I=T,T=C,C=w(A,10),A=k,k=x;x=D[1]+b+C|0,D[1]=D[2]+S+T|0,D[2]=D[3]+E+I|0,D[3]=D[4]+a+k|0,D[4]=D[0]+p+A|0,D[0]=x},_doFinalize:function(){var e=r,t=this[e(233)],n=t[e(241)],i=8*this[e(235)],s=8*t[e(251)];n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t[e(251)]=4*(n[e(250)]+1),this[e(232)]();for(var o=this[e(223)],a=o.words,c=0;c<5;c++){var u=a[c];a[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return o},clone:function(){var e=r,t=o[e(225)][e(243)](this);return t[e(223)]=this._hash[e(225)](),t}});function m(e,t,r){return e^t^r}function v(e,t,r){return e&t|~e&r}function y(e,t,r){return(e|~t)^r}function g(e,t,r){return e&r|t&~r}function _(e,t,r){return e^(t|~r)}function w(e,t){return e<>>32-t}n[r(230)]=o._createHelper(p),n[r(234)]=o[r(252)](p)}(),e[t(230)]},(i=Zi)(249)==i(249)?e[i(246)]=n(mi):n(r[i(226)])}));function Qi(){var e=["object","HMAC","2607640joRldT","19041gyLJiL","reset","_iKey","blockSize","7857296BLeVLm","clone","init","amd","18951988VFeuCd","10WiqxMc","exports","extend","4900RRNATY","./core","16209HCnnXY","function","update","words","finalize","Utf8","commonjsGlobal","159475dADocw","_hasher","sigBytes","6zGEwLo","836inLxVC","_oKey","parse","string","11328849gyISte"];return(Qi=function(){return e})()}!function(e,t){for(var r=es,n=e();;)try{if(846503===-parseInt(r(424))/1*(parseInt(r(445))/2)+parseInt(r(436))/3*(parseInt(r(428))/4)+-parseInt(r(435))/5*(-parseInt(r(427))/6)+parseInt(r(432))/7+-parseInt(r(440))/8+parseInt(r(450))/9*(parseInt(r(448))/10)+-parseInt(r(444))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Qi);Oe((function(e,t){var r,n,i;r=ze[es(423)],n=function(e){var t,r,n,i;t=es,n=(r=e).lib.Base,i=r.enc[t(422)],r.algo[t(434)]=n[t(447)]({init:function(e,r){var n=t;e=this[n(425)]=new(e[n(442)]),typeof r==n(431)&&(r=i[n(430)](r));var s=e[n(439)],o=4*s;r.sigBytes>o&&(r=e[n(421)](r)),r.clamp();for(var a=this[n(429)]=r[n(441)](),c=this._iKey=r.clone(),u=a[n(420)],l=c[n(420)],d=0;d>>2];e.sigBytes-=r}};s[n(349)]=h.extend({cfg:h[n(340)][n(374)]({mode:m,padding:v}),reset:function(){var e,t=n;h.reset[t(310)](this);var r=this[t(340)],i=r.iv,s=r[t(347)];this._xformMode==this[t(368)]?e=s[t(303)]:(e=s[t(307)],this[t(353)]=1),this[t(304)]&&this[t(304)][t(335)]==e?this[t(304)].init(this,i&&i.words):(this[t(304)]=e.call(s,this,i&&i[t(361)]),this[t(304)][t(335)]=e)},_doProcessBlock:function(e,t){var r=n;this[r(304)][r(301)](e,t)},_doFinalize:function(){var e,t=n,r=this[t(340)][t(344)];return this._xformMode==this[t(368)]?(r[t(305)](this[t(309)],this[t(354)]),e=this[t(366)](!!t(348))):(e=this[t(366)](!!t(348)),r[t(358)](e)),e},blockSize:4});var y=s[n(321)]=o[n(374)]({init:function(e){this[n(352)](e)},toString:function(e){var t=n;return(e||this[t(342)])[t(359)](this)}}),g=(i[n(357)]={})[n(329)]={stringify:function(e){var t=n,r=e[t(318)],i=e[t(331)];return(i?a[t(376)]([1398893684,1701076831])[t(356)](i)[t(356)](r):r)[t(341)](l)},parse:function(e){var t,r=n,i=l[r(369)](e),s=i[r(361)];return 1398893684==s[0]&&1701076831==s[1]&&(t=a[r(376)](s.slice(2,4)),s[r(373)](0,4),i[r(379)]-=16),y[r(376)]({ciphertext:i,salt:t})}},_=s[n(337)]=o[n(374)]({cfg:o[n(374)]({format:g}),encrypt:function(e,t,r,i){var s=n;i=this[s(340)].extend(i);var o=e[s(303)](r,i),a=o[s(345)](t),c=o[s(340)];return y[s(376)]({ciphertext:a,key:r,iv:c.iv,algorithm:e,mode:c[s(347)],padding:c.padding,blockSize:e.blockSize,formatter:i.format})},decrypt:function(e,t,r,i){var s=n;return i=this.cfg[s(374)](i),t=this._parse(t,i[s(357)]),e.createDecryptor(r,i)[s(345)](t[s(318)])},_parse:function(e,t){var r=n;return typeof e==r(332)?t[r(369)](e,this):e}}),w=(i.kdf={}).OpenSSL={execute:function(e,t,r,i,s){var o=n;if(!i&&(i=a[o(320)](8)),s)c=d[o(376)]({keySize:t+r,hasher:s})[o(375)](e,i);else var c=d[o(376)]({keySize:t+r})[o(375)](e,i);var u=a[o(376)](c[o(361)][o(314)](t),4*r);return c[o(379)]=4*t,y[o(376)]({key:c,iv:u,salt:i})}},b=s.PasswordBasedCipher=_[n(374)]({cfg:_.cfg[n(374)]({kdf:w}),encrypt:function(e,t,r,i){var s=n,o=(i=this[s(340)].extend(i)).kdf[s(322)](r,e.keySize,e[s(367)],i[s(331)],i[s(362)]);i.iv=o.iv;var a=_[s(372)][s(310)](this,e,t,o.key,i);return a[s(352)](o),a},decrypt:function(e,t,r,i){var s=n;i=this[s(340)][s(374)](i),t=this[s(313)](t,i[s(357)]);var o=i[s(311)][s(322)](r,e[s(364)],e.ivSize,t.salt,i[s(362)]);return i.iv=o.iv,_[s(380)].call(this,e,t,o.key,i)}})}()},(i=cs)(338)==i(338)?e[i(302)]=n(mi):"undefined"===i(378)&&(void 0)[i(370)]?(void 0)(["./core","./evpkdf"],n):n(r.CryptoJS)}));var us=ds;function ls(){var e=["blockSize","_iv","call","encryptBlock","mode","object","BlockCipherMode","3173238nGqAIm","exports","_cipher","function","./core","Decryptor","CryptoJS","CFB","6LUCbXE","119IafZQe","./cipher-core","661401gpmAGq","1200425uWzyFM","371344Wjnajl","481510dospjq","Encryptor","14PiCpuW","slice","extend","amd","createCommonjsModule","_prevBlock","16520Rofkwp","commonjsGlobal","586756KqqrPK"];return(ls=function(){return e})()}!function(e,t){for(var r=ds,n=e();;)try{if(444220===-parseInt(r(287))/1*(-parseInt(r(293))/2)+parseInt(r(311))/3*(-parseInt(r(295))/4)+parseInt(r(315))/5+-parseInt(r(303))/6+parseInt(r(312))/7*(parseInt(r(284))/8)+parseInt(r(314))/9+parseInt(r(285))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ls);ze[us(291)]((function(e,t){var r,n,i,s=us;r=ze[s(294)],n=function(e){var t=s;return e[t(300)][t(310)]=function(){var r=t,n=e.lib[r(302)][r(289)]();function i(e,t,n,i){var s,o=r,a=this[o(297)];a?(s=a[o(288)](0),this[o(297)]=void 0):s=this[o(292)],i[o(299)](s,0);for(var c=0;c>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var s=n[r(484)]=n[r(507)]({processBlock:function(e,t){var n,s=r,o=this._cipher,a=o.blockSize,c=this[s(492)],u=this._counter;c&&(u=this[s(504)]=c[s(502)](0),this[s(492)]=void 0),0===((n=u)[0]=i(n[0]))&&(n[1]=i(n[1]));var l=u.slice(0);o[s(501)](l,0);for(var d=0;d>>2]|=s<<24-o%4*8,e.sigBytes+=s},unpad:function(e){var r=t,n=255&e[r(169)][e[r(173)]-1>>>2];e[r(173)]-=n}},e.pad[t(180)]},(i=Is)(167)==i(167)?e[i(166)]=n(mi):n(r.CryptoJS)}));function Is(e,t){var r=Es();return(Is=function(e,t){return r[e-=165]})(e,t)}var ks=As;function As(e,t){var r=Cs();return(As=function(e,t){return r[e-=149]})(e,t)}function Cs(){var e=["8OmwJwj","concat","879RLdFQC","2875407SZJghO","WordArray","amd","1130fvSvkE","lib","./cipher-core","1011318JtOKBI","Iso10126","17452sHhuXf","./core","sigBytes","create","pad","13475691fvEcgK","11DVgyOE","commonjsGlobal","random","10412297sgldAI","exports","object","586zFWTuc","createCommonjsModule","8535810myQfGB"];return(Cs=function(){return e})()}!function(e,t){for(var r=As,n=e();;)try{if(801984===-parseInt(r(174))/1*(parseInt(r(169))/2)+-parseInt(r(149))/3+-parseInt(r(157))/4*(-parseInt(r(152))/5)+parseInt(r(155))/6+parseInt(r(166))/7*(-parseInt(r(172))/8)+parseInt(r(162))/9+-parseInt(r(171))/10*(-parseInt(r(163))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Cs);ze[ks(170)]((function(e,t){var r,n,i,s=ks;r=ze[s(164)],n=function(e){var t=s;return e[t(161)][t(156)]={pad:function(r,n){var i=t,s=4*n,o=s-r[i(159)]%s;r[i(173)](e[i(153)].WordArray[i(165)](o-1)).concat(e.lib[i(150)][i(160)]([o<<24],1))},unpad:function(e){var r=t,n=255&e.words[e[r(159)]-1>>>2];e[r(159)]-=n}},e[t(161)][t(156)]},"object"===(i=As)(168)?e[i(167)]=n(mi):n(r.CryptoJS)}));var Ts=xs;function xs(e,t){var r=Ds();return(xs=function(e,t){return r[e-=309]})(e,t)}function Ds(){var e=["ZeroPadding","Iso97971","function","exports","2849329bZzOgL","./cipher-core","562463chbbMG","345NkiHMc","sigBytes","createCommonjsModule","1253124yAADlt","commonjsGlobal","32xCoEWS","61956NwImeo","unpad","./core","2XCcorb","object","pad","concat","15243GJEAJD","create","44034gaFDJV","amd","6361650JmUTyB","lib"];return(Ds=function(){return e})()}!function(e,t){for(var r=xs,n=e();;)try{if(394306===parseInt(r(320))/1+-parseInt(r(330))/2*(parseInt(r(334))/3)+parseInt(r(327))/4+parseInt(r(321))/5*(-parseInt(r(310))/6)+parseInt(r(318))/7+parseInt(r(326))/8*(parseInt(r(324))/9)+-parseInt(r(312))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ds);ze[Ts(323)]((function(e,t){var r,n,i,s=Ts;r=ze[s(325)],n=function(e){var t=s;return e.pad[t(315)]={pad:function(r,n){var i=t;r[i(333)](e[i(313)].WordArray[i(309)]([2147483648],1)),e.pad[i(314)].pad(r,n)},unpad:function(r){var n=t;e.pad.ZeroPadding[n(328)](r),r[n(322)]--}},e[t(332)][t(315)]},"object"===(i=xs)(331)?e[i(317)]=n(mi):"undefined"===i(316)&&(void 0)[i(311)]?(void 0)([i(329),i(319)],n):n(r.CryptoJS)}));function Ps(e,t){var r=Ms();return(Ps=function(e,t){return r[e-=452]})(e,t)}var Bs=Ps;function Ms(){var e=["194128TasjFo","420UhGkpM","359172hzvdzP","1428UPZoCx","words","1497376GtcYRf","clamp","sigBytes","60EifiMD","CryptoJS","2qwKwig","createCommonjsModule","4431kEzFYl","./core","ZeroPadding","object","function","10960xwjAGY","amd","exports","177LNJBrE","676715obLQVs","1791wRFnpu"];return(Ms=function(){return e})()}!function(e,t){for(var r=Ps,n=e();;)try{if(173692===-parseInt(r(462))/1*(parseInt(r(472))/2)+-parseInt(r(459))/3*(parseInt(r(465))/4)+-parseInt(r(460))/5+-parseInt(r(463))/6*(parseInt(r(474))/7)+parseInt(r(467))/8+-parseInt(r(461))/9*(-parseInt(r(456))/10)+parseInt(r(464))/11*(parseInt(r(470))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ms);ze[Bs(473)]((function(e,t){var r,n,i;r=Le,n=function(e){var t=Ps;return e.pad.ZeroPadding={pad:function(e,t){var r=Ps,n=4*t;e[r(468)](),e.sigBytes+=n-(e[r(469)]%n||n)},unpad:function(e){var t=Ps,r=e[t(466)],n=e[t(469)]-1;for(n=e[t(469)]-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},e.pad[t(453)]},(i=Ps)(454)==i(454)?e[i(458)]=n(mi):"undefined"===i(455)&&(void 0)[i(457)]?(void 0)([i(452),"./cipher-core"],n):n(r[i(471)])}));function Fs(){var e=["45320zxbNoe","24987aIiyZQ","NoPadding","./cipher-core","23095HrWrEB","54SbCary","10444PSjJrJ","3176oNomJH","pad","23155011lZBfXN","379731vXfqJs","function","./core","68GPqTwf","object","CryptoJS","738pkCvtX","1764320osJNCY","amd","exports"];return(Fs=function(){return e})()}!function(e,t){for(var r=Us,n=e();;)try{if(556512===parseInt(r(202))/1+-parseInt(r(209))/2+-parseInt(r(193))/3*(-parseInt(r(205))/4)+parseInt(r(196))/5*(-parseInt(r(208))/6)+-parseInt(r(198))/7*(parseInt(r(199))/8)+-parseInt(r(197))/9*(parseInt(r(192))/10)+parseInt(r(201))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Fs);Oe((function(e,t){var r,n,i;r=Le,n=function(e){var t=Us;return e[t(200)][t(194)]={pad:function(){},unpad:function(){}},e[t(200)][t(194)]},"object"===(i=Us)(206)?e[i(191)]=n(mi):"undefined"===i(203)&&(void 0)[i(190)]?(void 0)([i(204),i(195)],n):n(r[i(207)])}));function Us(e,t){var r=Fs();return(Us=function(e,t){return r[e-=190]})(e,t)}var Rs=Ls;function Ls(e,t){var r=Os();return(Ls=function(e,t){return r[e-=383]})(e,t)}!function(e,t){for(var r=Ls,n=e();;)try{if(219190===parseInt(r(406))/1*(parseInt(r(401))/2)+parseInt(r(386))/3+parseInt(r(404))/4+-parseInt(r(384))/5+parseInt(r(402))/6*(parseInt(r(405))/7)+parseInt(r(400))/8+-parseInt(r(391))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Os);ze[Rs(399)]((function(e,t){var r,n,i,s=Rs;r=ze[s(393)],n=function(e){var t,r,n,i,o=s;return n=(r=e)[(t=Ls)(397)][t(389)],i=r.enc[t(390)],r.format[t(390)]={stringify:function(e){var r=t;return e[r(407)][r(396)](i)},parse:function(e){var r=t,s=i[r(392)](e);return n[r(385)]({ciphertext:s})}},e.format[o(390)]},"object"===(i=Ls)(395)?e[i(383)]=n(mi):"undefined"===i(398)&&(void 0)[i(403)]?(void 0)([i(388),i(387)],n):n(r[i(394)])}));function Os(){var e=["function","createCommonjsModule","1333064owCHbW","5926joMcSK","1434kyHijy","amd","1183560tbKZVm","3472BlRsqZ","59iyGxoY","ciphertext","exports","1066685anJHMd","create","652449QduxzQ","./cipher-core","./core","CipherParams","Hex","4867560MtqaIO","parse","commonjsGlobal","CryptoJS","object","toString","lib"];return(Os=function(){return e})()}function zs(){var e=["324MhvMrN","./cipher-core","amd","AES","_keyPriorReset","42132rYcjKM","./md5","1975765gBJpVR","22pxKTaO","202964fxLaAO","1709064vyHGQl","56aEsJRk","27GrOgYj","_invKeySchedule","commonjsGlobal","3312tvnTEz","algo","BlockCipher","55COpxPm","198679mMeVgj","_nRounds","_keySchedule","lib","_createHelper","sigBytes","object","_key","10DaJtZO","_doCryptBlock","words","function","10152fasEgB"];return(zs=function(){return e})()}function Ns(e,t){var r=zs();return(Ns=function(e,t){return r[e-=117]})(e,t)}!function(e,t){for(var r=Ns,n=e();;)try{if(408986===parseInt(r(136))/1*(parseInt(r(145))/2)+-parseInt(r(142))/3+parseInt(r(146))/4*(-parseInt(r(123))/5)+-parseInt(r(120))/6*(parseInt(r(148))/7)+parseInt(r(147))/8*(parseInt(r(117))/9)+-parseInt(r(132))/10*(parseInt(r(144))/11)+-parseInt(r(137))/12*(-parseInt(r(124))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(zs);Oe((function(e,t){var r,n,i,s=Ns;r=ze[s(119)],n=function(e){var t=s;return function(){var t=Ns,r=e,n=r[t(127)][t(122)],i=r[t(121)],s=[],o=[],a=[],c=[],u=[],l=[],d=[],h=[],f=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var i=n^n<<1^n<<2^n<<3^n<<4;i=i>>>8^255&i^99,s[r]=i,o[i]=r;var m=e[r],v=e[m],y=e[v],g=257*e[i]^16843008*i;a[r]=g<<24|g>>>8,c[r]=g<<16|g>>>16,u[r]=g<<8|g>>>24,l[r]=g,g=16843009*y^65537*v^257*m^16843008*r,d[i]=g<<24|g>>>8,h[i]=g<<16|g>>>16,f[i]=g<<8|g>>>24,p[i]=g,r?(r=m^e[e[e[y^m]]],n^=e[e[n]]):r=n=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],v=i[t(140)]=n.extend({_doReset:function(){var e=t;if(!this[e(125)]||this[e(141)]!==this._key){for(var r=this._keyPriorReset=this[e(131)],n=r[e(134)],i=r[e(129)]/4,o=4*((this[e(125)]=i+6)+1),a=this[e(126)]=[],c=0;c6&&c%i==4&&(v=s[v>>>24]<<24|s[v>>>16&255]<<16|s[v>>>8&255]<<8|s[255&v]):(v=s[(v=v<<8|v>>>24)>>>24]<<24|s[v>>>16&255]<<16|s[v>>>8&255]<<8|s[255&v],v^=m[c/i|0]<<24),a[c]=a[c-i]^v);for(var u=this[e(118)]=[],l=0;l>>24]]^h[s[v>>>16&255]]^f[s[v>>>8&255]]^p[s[255&v]]}}},encryptBlock:function(e,r){var n=t;this[n(133)](e,r,this[n(126)],a,c,u,l,s)},decryptBlock:function(e,r){var n=t,i=e[r+1];e[r+1]=e[r+3],e[r+3]=i,this[n(133)](e,r,this[n(118)],d,h,f,p,o),i=e[r+1],e[r+1]=e[r+3],e[r+3]=i},_doCryptBlock:function(e,t,r,n,i,s,o,a){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],d=e[t+2]^r[2],h=e[t+3]^r[3],f=4,p=1;p>>24]^i[l>>>16&255]^s[d>>>8&255]^o[255&h]^r[f++],v=n[l>>>24]^i[d>>>16&255]^s[h>>>8&255]^o[255&u]^r[f++],y=n[d>>>24]^i[h>>>16&255]^s[u>>>8&255]^o[255&l]^r[f++],g=n[h>>>24]^i[u>>>16&255]^s[l>>>8&255]^o[255&d]^r[f++];u=m,l=v,d=y,h=g}m=(a[u>>>24]<<24|a[l>>>16&255]<<16|a[d>>>8&255]<<8|a[255&h])^r[f++],v=(a[l>>>24]<<24|a[d>>>16&255]<<16|a[h>>>8&255]<<8|a[255&u])^r[f++],y=(a[d>>>24]<<24|a[h>>>16&255]<<16|a[u>>>8&255]<<8|a[255&l])^r[f++],g=(a[h>>>24]<<24|a[u>>>16&255]<<16|a[l>>>8&255]<<8|a[255&d])^r[f++],e[t]=m,e[t+1]=v,e[t+2]=y,e[t+3]=g},keySize:8});r[t(140)]=n[t(128)](v)}(),e[t(140)]},"object"===(i=Ns)(130)?e.exports=n(mi):"undefined"===i(135)&&(void 0)[i(139)]?(void 0)(["./core","./enc-base64",i(143),"./evpkdf",i(138)],n):n(r.CryptoJS)}));var Hs=Vs;function js(){var e=["slice","create","algo","4677uHQGjJ","./core","./evpkdf","extend","_des3","length","799818NjhzcF","19192860qrpQei","18074QNjbVX","words","createEncryptor","lib","TripleDES","_invSubKeys","_createHelper","2170176wOAlgI","_key","./enc-base64","decryptBlock","2737512KnmTtl","function","_doCryptBlock","_lBlock","980xAJQBf","createCommonjsModule","WordArray","object","BlockCipher","_des1","1955745gQEdPf","_rBlock","_subKeys","Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.","2456POcgoc","call","encryptBlock","DES","_des2"];return(js=function(){return e})()}function Vs(e,t){var r=js();return(Vs=function(e,t){return r[e-=130]})(e,t)}!function(e,t){for(var r=Vs,n=e();;)try{if(701303===parseInt(r(153))/1+parseInt(r(170))/2*(parseInt(r(147))/3)+parseInt(r(162))/4+parseInt(r(135))/5+-parseInt(r(166))/6+parseInt(r(155))/7*(parseInt(r(139))/8)+-parseInt(r(154))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(js);ze[Hs(130)]((function(e,t){var r,n,i;r=Le,n=function(e){var t=Vs;return function(){var t=Vs,r=e,n=r[t(158)],i=n[t(131)],s=n[t(133)],o=r[t(146)],a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o[t(142)]=s.extend({_doReset:function(){for(var e=t,r=this[e(163)][e(156)],n=[],i=0;i<56;i++){var s=a[i]-1;n[i]=r[s>>>5]>>>31-s%32&1}for(var o=this[e(137)]=[],l=0;l<16;l++){var d=o[l]=[],h=u[l];for(i=0;i<24;i++)d[i/6|0]|=n[(c[i]-1+h)%28]<<31-i%6,d[4+(i/6|0)]|=n[28+(c[i+24]-1+h)%28]<<31-i%6;for(d[0]=d[0]<<1|d[0]>>>31,i=1;i<7;i++)d[i]=d[i]>>>4*(i-1)+3;d[7]=d[7]<<5|d[7]>>>27}var f=this._invSubKeys=[];for(i=0;i<16;i++)f[i]=o[15-i]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,r){var n=t;this[n(168)](e,r,this[n(160)])},_doCryptBlock:function(e,r,n){var i=t;this[i(169)]=e[r],this[i(136)]=e[r+1],f.call(this,4,252645135),f[i(140)](this,16,65535),p[i(140)](this,2,858993459),p[i(140)](this,8,16711935),f[i(140)](this,1,1431655765);for(var s=0;s<16;s++){for(var o=n[s],a=this[i(169)],c=this[i(136)],u=0,h=0;h<8;h++)u|=l[h][((c^o[h])&d[h])>>>0];this[i(169)]=c,this._rBlock=a^u}var m=this._lBlock;this[i(169)]=this[i(136)],this._rBlock=m,f.call(this,1,1431655765),p.call(this,8,16711935),p[i(140)](this,2,858993459),f[i(140)](this,16,65535),f.call(this,4,252645135),e[r]=this[i(169)],e[r+1]=this[i(136)]},keySize:2,ivSize:2,blockSize:2});function f(e,r){var n=t,i=(this[n(169)]>>>e^this._rBlock)&r;this[n(136)]^=i,this[n(169)]^=i<>>e^this[n(169)])&r;this[n(169)]^=i,this[n(136)]^=i<>>2]>>>24-c%4*8&255;a=(a+s[o]+u)%256;var l=s[o];s[o]=s[a],s[a]=l}this._i=this._j=0},_doProcessBlock:function(e,r){var n=t;e[r]^=o[n(250)](this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var s=e[t];e[t]=e[r],e[r]=s,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}r[t(254)]=n[t(244)](s);var a=i[t(253)]=s[t(261)]({cfg:s.cfg.extend({drop:192}),_doReset:function(){var e=t;s._doReset[e(250)](this);for(var r=this.cfg[e(248)];r>0;r--)o[e(250)](this)}});r[t(253)]=n[t(244)](a)}(),e[t(254)]},(i=$s)(262)==i(262)?e.exports=n(mi):n(r.CryptoJS)}));var qs=Ks;function Ys(){var e=["_key","./md5","11564368RmYmdg","commonjsGlobal","createCommonjsModule","words","lib","extend","algo","amd","./enc-base64","143501OzrWOP","exports","10iCizUY","./evpkdf","function","CryptoJS","1655094RhinhJ","./core","2014860oJdEqr","call","./cipher-core","4410860zxcrzR","163122mCUYSY","_createHelper","Rabbit","object","2099988drTzGq"];return(Ys=function(){return e})()}function Ks(e,t){var r=Ys();return(Ks=function(e,t){return r[e-=209]})(e,t)}!function(e,t){for(var r=Ks,n=e();;)try{if(614041===parseInt(r(213))/1*(parseInt(r(215))/2)+parseInt(r(229))/3+-parseInt(r(221))/4+parseInt(r(224))/5+parseInt(r(225))/6+parseInt(r(219))/7+-parseInt(r(232))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ys);ze[qs(234)]((function(e,t){var r,n,i,s=qs;r=ze[s(233)],n=function(e){var t=s;return function(){var t=Ks,r=e,n=r[t(236)].StreamCipher,i=r[t(210)],s=[],o=[],a=[],c=i[t(227)]=n[t(209)]({_doReset:function(){for(var e=t,r=this[e(230)][e(235)],n=this.cfg.iv,i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8);var s=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],o=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];for(this._b=0,i=0;i<4;i++)u[e(222)](this);for(i=0;i<8;i++)o[i]^=s[i+4&7];if(n){var a=n[e(235)],c=a[0],l=a[1],d=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=d>>>16|4294901760&h,p=h<<16|65535&d;for(o[0]^=d,o[1]^=f,o[2]^=h,o[3]^=p,o[4]^=d,o[5]^=f,o[6]^=h,o[7]^=p,i=0;i<4;i++)u[e(222)](this)}},_doProcessBlock:function(e,r){var n=t,i=this._X;u[n(222)](this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var o=0;o<4;o++)s[o]=16711935&(s[o]<<8|s[o]>>>24)|4278255360&(s[o]<<24|s[o]>>>8),e[r+o]^=s[o]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}r[t(227)]=n[t(226)](c)}(),e[t(227)]},(i=Ks)(228)==i(228)?e[i(214)]=n(mi):"undefined"===i(217)&&(void 0)[i(211)]?(void 0)([i(220),i(212),i(231),i(216),i(223)],n):n(r[i(218)])}));var Xs=Zs;function Js(){var e=["call","lib","10849940nCdlER","./enc-base64","493624zXkhCt","8RsKwOh","476cOkxTj","./md5","CryptoJS","words","exports","./cipher-core","24TMSZdk","cfg","_createHelper","./evpkdf","createCommonjsModule","72yTChmt","function","StreamCipher","commonjsGlobal","17592542INZYUm","4252VrYIfC","67638iGMlKh","algo","object","2436378HnRJPD","RabbitLegacy","_key","785Tpwdzt","11637010AbIEPc"];return(Js=function(){return e})()}function Zs(e,t){var r=Js();return(Zs=function(e,t){return r[e-=345]})(e,t)}!function(e,t){for(var r=Zs,n=e();;)try{if(908771===parseInt(r(365))/1*(parseInt(r(349))/2)+parseInt(r(369))/3*(parseInt(r(348))/4)+-parseInt(r(372))/5*(parseInt(r(366))/6)+parseInt(r(373))/7+parseInt(r(347))/8*(parseInt(r(360))/9)+parseInt(r(345))/10+parseInt(r(364))/11*(-parseInt(r(355))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Js);ze[Xs(359)]((function(e,t){var r,n,i,s=Xs;r=ze[s(363)],n=function(e){var t=s;return function(){var t=Zs,r=e,n=r[t(375)][t(362)],i=r[t(367)],s=[],o=[],a=[],c=i[t(370)]=n.extend({_doReset:function(){var e=t,r=this[e(371)].words,n=this[e(356)].iv,i=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],s=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];this._b=0;for(var o=0;o<4;o++)u[e(374)](this);for(o=0;o<8;o++)s[o]^=i[o+4&7];if(n){var a=n[e(352)],c=a[0],l=a[1],d=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=d>>>16|4294901760&h,p=h<<16|65535&d;for(s[0]^=d,s[1]^=f,s[2]^=h,s[3]^=p,s[4]^=d,s[5]^=f,s[6]^=h,s[7]^=p,o=0;o<4;o++)u[e(374)](this)}},_doProcessBlock:function(e,r){var n=t,i=this._X;u[n(374)](this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var o=0;o<4;o++)s[o]=16711935&(s[o]<<8|s[o]>>>24)|4278255360&(s[o]<<24|s[o]>>>8),e[r+o]^=s[o]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}r[t(370)]=n[t(357)](c)}(),e[t(370)]},(i=Zs)(368)==i(368)?e[i(353)]=n(mi):"undefined"===i(361)&&(void 0).amd?(void 0)(["./core",i(346),i(350),i(358),i(354)],n):n(r[i(351)])}));const Qs=eo;function eo(e,t){const r=to();return(eo=function(e,t){return r[e-=276]})(e,t)}!function(e,t){const r=eo,n=e();for(;;)try{if(764246===parseInt(r(296))/1*(parseInt(r(293))/2)+parseInt(r(288))/3*(parseInt(r(294))/4)+-parseInt(r(297))/5*(-parseInt(r(292))/6)+parseInt(r(299))/7+-parseInt(r(282))/8*(-parseInt(r(298))/9)+-parseInt(r(302))/10*(-parseInt(r(283))/11)+parseInt(r(306))/12*(-parseInt(r(281))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(to);ze[Qs(308)]((function(e,t){const r=Qs;!function(t,r,n){const i=eo;i(291)==i(291)?e[i(307)]=r(mi):r(t[i(285)])}(ze[r(301)],(function(e){const t=r;return function(){const t=eo;var r=e,n=r[t(284)][t(304)],i=r[t(286)];const s=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function u(e,r){const n=t;let i=r>>24&255,s=r>>16&255,o=r>>8&255,a=255&r,c=e[n(289)][0][i]+e[n(289)][1][s];return c^=e[n(289)][2][o],c+=e[n(289)][3][a],c}function l(e,r,n){const i=t;let o,a=r,c=n;for(let t=0;t=n&&(s=0);let c=0,u=0,d=0;for(let t=0;t<18;t+=2)d=l(e,c,u),c=d.left,u=d[i(305)],e[i(279)][t]=c,e[i(279)][t+1]=u;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)d=l(e,c,u),c=d[i(287)],u=d[i(305)],e[i(289)][t][r]=c,e[i(289)][t][r+1]=u}(c,n,i)}},encryptBlock:function(e,r){const n=t;var i=l(c,e[r],e[r+1]);e[r]=i[n(287)],e[r+1]=i.right},decryptBlock:function(e,r){const n=t;var i=function(e,r,n){const i=t;let s,o=r,a=n;for(let t=17;t>1;--t)o^=e[i(279)][t],a=u(e,o)^a,s=o,o=a,a=s;return s=o,o=a,a=s,a^=e.pbox[1],o^=e[i(279)][0],{left:o,right:a}}(c,e[r],e[r+1]);e[r]=i.left,e[r+1]=i[n(305)]},blockSize:2,keySize:4,ivSize:2});r[t(277)]=n._createHelper(d)}(),e[t(277)]}))}));function to(){const e=["9224JqEfQx","11NVEdrP","lib","CryptoJS","algo","left","2217VjTlqW","sbox","./cipher-core","object","894wHpmPh","2797228Vicsoy","4812HkUqfN","_keyPriorReset","1ZEuDSv","23645iuSmjR","7893JkEvJi","7134043umtAoZ","amd","commonjsGlobal","4784960RIfJrZ","./core","BlockCipher","right","768IlZPpe","exports","createCommonjsModule","_key","Blowfish","words","pbox","./evpkdf","962169apMwrC"];return(to=function(){return e})()}var ro=no;function no(e,t){var r=io();return(no=function(e,t){return r[e-=183]})(e,t)}function io(){var e=["281519AgsmNN","exports","./md5","849380bMpCIh","1686064lYxahh","./x64-core","./sha3","CryptoJS","./hmac","commonjsGlobal","object","./pad-nopadding","./sha384","amd","./aes","./format-hex","./tripledes","1807696XXIgkf","./sha256","./cipher-core","./lib-typedarrays","./pad-ansix923","290FnobeD","./ripemd160","createCommonjsModule","./mode-ecb","9006IBUJOk","./sha512","./pad-zeropadding","157WhKcCW","./evpkdf","./sha1","./core","6DKxyof","./mode-ofb","./enc-base64","./rabbit","18dzooQH","./rc4","./mode-ctr","./enc-utf16","./pad-iso97971","./rabbit-legacy","./mode-ctr-gladman","735HmNGFe","./blowfish","./pbkdf2","208JjRpDX"];return(io=function(){return e})()}function so(e,t){const r=oo();return(so=function(e,t){return r[e-=489]})(e,t)}function oo(){const e=["slice","487532Xbjutw","WordArray","decrypt","get","ctr","Counter","1547wdbPSz","catch","20365499boHpiS","byteLength","16037091mCFuHZ","set","lib","create","922RnJMlw","20Qzxllo","10jOiLTj","1793231pQToMT","includes","80NBaEcg","8403FqNBEY","5140056sjhxeV","length"];return(oo=function(){return e})()}function ao(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function co(e,t,r){const n=so;let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const s=e[n(509)];let o=5;for(;os)break;let c=e[o+4],u=!1;if(i?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(494)](c)):(c&=31,u=1===c||5===c),u){const i=e[n(499)](o+4+2,o+4+a);let s=new(di.ModeOfOperation[n(504)])(t,new(di[n(505)])(r));const c=s.decrypt(i);s=null,e.set(c,o+4+2)}o=o+4+a}return e}function uo(e,t,r){const n=so;if(e[n(509)]<=30)return e;const i=e.slice(32);let s=new(di.ModeOfOperation[n(504)])(t,new(di[n(505)])(r));const o=s[n(502)](i);return s=null,e[n(511)](o,32),e}!function(e,t){for(var r=no,n=e();;)try{if(163962===-parseInt(r(202))/1*(parseInt(r(195))/2)+parseInt(r(199))/3+parseInt(r(220))/4*(parseInt(r(217))/5)+-parseInt(r(206))/6*(parseInt(r(221))/7)+parseInt(r(225))/8+-parseInt(r(210))/9*(-parseInt(r(224))/10)+-parseInt(r(190))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(io),ze[ro(197)]((function(e,t){var r,n;r=ze[ro(230)],(n=no)(183)==n(183)?e[n(222)]=mi:r.CryptoJS=r[n(228)]})),function(e,t){const r=so,n=e();for(;;)try{if(920170===-parseInt(r(493))/1+-parseInt(r(490))/2*(parseInt(r(496))/3)+-parseInt(r(500))/4*(parseInt(r(491))/5)+parseInt(r(497))/6+-parseInt(r(506))/7*(-parseInt(r(495))/8)+parseInt(r(510))/9+-parseInt(r(492))/10*(-parseInt(r(508))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(oo);var lo=fo;!function(e,t){for(var r=fo,n=e();;)try{if(633567===-parseInt(r(1478))/1*(-parseInt(r(1482))/2)+parseInt(r(1075))/3*(parseInt(r(868))/4)+parseInt(r(1463))/5*(parseInt(r(612))/6)+parseInt(r(602))/7+-parseInt(r(487))/8*(-parseInt(r(593))/9)+parseInt(r(1031))/10*(parseInt(r(1496))/11)+-parseInt(r(723))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(po);var ho=Oe((function(e,t){var r,n,s=fo,o=(r=new Date,n=4,{setLogLevel:function(e){var t=fo;n=e==this[t(370)]?1:e==this[t(966)]?2:e==this[t(978)]?3:(this[t(1029)],4)},debug:function(e,t){var i=fo;void 0===console[i(370)]&&(console[i(370)]=console[i(695)]),1>=n&&console.debug("["+o[i(1323)](new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){var r=fo;this.debug(e[r(1164)])},info:function(e,t){var i=fo;2>=n&&console[i(966)]("["+o[i(1323)](new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=n&&console[fo(978)]("["+o.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){var i=fo;4>=n&&console[i(1029)]("["+o[i(1323)](new Date-r,1e3)+"]","["+e+"]",t)}});o[s(1323)]=function(e,t){var r,n=s;function i(e,t){for(var r=fo,n=(""+e).split(".");n[0].length0){for(var n="",i=0;i0&&(n+=","),n+="["+o[t(1323)](e.start(i))+","+o[t(1323)](e.end(i))+"]";return n}return t(1393)},s(1147)!==s(799)&&(t[s(557)]=o);var a=function(e){var t=s;if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this[t(916)]=e,this.dataview=new DataView(e),this[t(1541)]=0};a[s(1472)][s(1267)]=function(){return this[s(1541)]},a[s(1472)].getEndPosition=function(){var e=s;return this.buffer[e(1314)]},a[s(1472)][s(1519)]=function(){var e=s;return this[e(916)][e(1314)]},a[s(1472)][s(1317)]=function(e){var t=s,r=Math[t(1477)](0,Math[t(768)](this[t(916)][t(1314)],e));return this[t(1541)]=isNaN(r)||!isFinite(r)?0:r,!0},a.prototype[s(1550)]=function(){return this[s(1267)]()>=this.getEndPosition()},a[s(1472)].readAnyInt=function(e,t){var r=s,n=0;if(this.position+e<=this[r(916)][r(1314)]){switch(e){case 1:n=t?this.dataview[r(697)](this[r(1541)]):this[r(457)].getUint8(this[r(1541)]);break;case 2:n=t?this[r(457)][r(441)](this.position):this[r(457)][r(1017)](this[r(1541)]);break;case 3:if(t)throw"No method for reading signed 24 bits values";n=this[r(457)][r(1083)](this[r(1541)])<<16,n|=this[r(457)][r(1083)](this.position+1)<<8,n|=this[r(457)][r(1083)](this[r(1541)]+2);break;case 4:n=t?this[r(457)][r(1111)](this[r(1541)]):this[r(457)].getUint32(this[r(1541)]);break;case 8:if(t)throw r(1288);n=this[r(457)][r(1273)](this[r(1541)])<<32,n|=this.dataview[r(1273)](this[r(1541)]+4);break;default:throw r(909)+e}return this.position+=e,n}throw r(561)},a[s(1472)][s(1430)]=function(){return this[s(1151)](1,!1)},a[s(1472)].readUint16=function(){return this[s(1151)](2,!1)},a[s(1472)].readUint24=function(){return this.readAnyInt(3,!1)},a[s(1472)].readUint32=function(){return this[s(1151)](4,!1)},a.prototype[s(1515)]=function(){return this[s(1151)](8,!1)},a[s(1472)].readString=function(e){var t=s;if(this[t(1541)]+e<=this[t(916)][t(1314)]){for(var r="",n=0;nthis[t(875)]&&(this[t(875)]=r);else{for(n<1&&(n=1);r>n;)n*=2;var i=new ArrayBuffer(n),o=new Uint8Array(this._buffer);new Uint8Array(i,0,o[t(836)])[t(440)](o),this[t(916)]=i,this[t(875)]=r}}},c[s(1472)][s(1536)]=function(){var e=s;if(this[e(875)]!=this[e(1553)][e(1314)]){var t=new ArrayBuffer(this._byteLength),r=new Uint8Array(t),n=new Uint8Array(this[e(1553)],0,r[e(836)]);r.set(n),this[e(916)]=t}},c[s(818)]=!1,c[s(1040)]=!0,c[s(1472)][s(875)]=0,Object.defineProperty(c.prototype,s(1314),{get:function(){var e=s;return this._byteLength-this[e(1356)]}}),Object[s(1087)](c[s(1472)],s(916),{get:function(){var e=s;return this[e(1536)](),this[e(1553)]},set:function(e){var t=s;this[t(1553)]=e,this[t(815)]=new DataView(this._buffer,this[t(1356)]),this[t(875)]=this._buffer[t(1314)]}}),Object[s(1087)](c.prototype,s(1222),{get:function(){return this._byteOffset},set:function(e){var t=s;this[t(1356)]=e,this._dataView=new DataView(this._buffer,this[t(1356)]),this[t(875)]=this[t(1553)][t(1314)]}}),Object[s(1087)](c[s(1472)],s(694),{get:function(){return this._dataView},set:function(e){var t=s;this._byteOffset=e.byteOffset,this[t(1553)]=e.buffer,this._dataView=new DataView(this[t(1553)],this[t(1356)]),this._byteLength=this[t(1356)]+e[t(1314)]}}),c[s(1472)][s(1317)]=function(e){var t=s,r=Math.max(0,Math[t(768)](this[t(1314)],e));this[t(1541)]=isNaN(r)||!isFinite(r)?0:r},c[s(1472)].isEof=function(){var e=s;return this[e(1541)]>=this[e(875)]},c[s(1472)].mapUint8Array=function(e){var t=s;this[t(628)](1*e);var r=new Uint8Array(this._buffer,this[t(1222)]+this.position,e);return this[t(1541)]+=1*e,r},c[s(1472)][s(1279)]=function(e,t){var r=s;e=null==e?this[r(1314)]-this.position/4:e;var n=new Int32Array(e);return c[r(1007)](n[r(916)],0,this[r(916)],this.byteOffset+this[r(1541)],e*n[r(1145)]),c[r(588)](n,null==t?this[r(1514)]:t),this[r(1541)]+=n[r(1314)],n},c[s(1472)][s(879)]=function(e,t){var r=s;e=null==e?this[r(1314)]-this[r(1541)]/2:e;var n=new Int16Array(e);return c.memcpy(n[r(916)],0,this[r(916)],this.byteOffset+this.position,e*n[r(1145)]),c.arrayToNative(n,null==t?this.endianness:t),this[r(1541)]+=n[r(1314)],n},c[s(1472)][s(945)]=function(e){var t=s;e=null==e?this[t(1314)]-this[t(1541)]:e;var r=new Int8Array(e);return c[t(1007)](r.buffer,0,this[t(916)],this[t(1222)]+this.position,e*r[t(1145)]),this[t(1541)]+=r[t(1314)],r},c[s(1472)][s(977)]=function(e,t){var r=s;e=null==e?this[r(1314)]-this[r(1541)]/4:e;var n=new Uint32Array(e);return c[r(1007)](n[r(916)],0,this[r(916)],this[r(1222)]+this.position,e*n.BYTES_PER_ELEMENT),c[r(588)](n,null==t?this[r(1514)]:t),this[r(1541)]+=n[r(1314)],n},c.prototype.readUint16Array=function(e,t){var r=s;e=null==e?this[r(1314)]-this.position/2:e;var n=new Uint16Array(e);return c[r(1007)](n[r(916)],0,this[r(916)],this.byteOffset+this.position,e*n[r(1145)]),c.arrayToNative(n,null==t?this[r(1514)]:t),this[r(1541)]+=n.byteLength,n},c[s(1472)][s(1439)]=function(e){var t=s;e=null==e?this[t(1314)]-this.position:e;var r=new Uint8Array(e);return c[t(1007)](r[t(916)],0,this[t(916)],this[t(1222)]+this.position,e*r[t(1145)]),this[t(1541)]+=r[t(1314)],r},c[s(1472)][s(691)]=function(e,t){var r=s;e=null==e?this[r(1314)]-this[r(1541)]/8:e;var n=new Float64Array(e);return c[r(1007)](n.buffer,0,this[r(916)],this[r(1222)]+this.position,e*n[r(1145)]),c[r(588)](n,null==t?this[r(1514)]:t),this[r(1541)]+=n[r(1314)],n},c[s(1472)][s(1431)]=function(e,t){var r=s;e=null==e?this[r(1314)]-this[r(1541)]/4:e;var n=new Float32Array(e);return c[r(1007)](n.buffer,0,this[r(916)],this.byteOffset+this[r(1541)],e*n[r(1145)]),c[r(588)](n,null==t?this[r(1514)]:t),this[r(1541)]+=n.byteLength,n},c[s(1472)].readInt32=function(e){var t=s,r=this[t(815)].getInt32(this[t(1541)],null==e?this.endianness:e);return this[t(1541)]+=4,r},c[s(1472)][s(959)]=function(e){var t=s,r=this[t(815)].getInt16(this[t(1541)],null==e?this[t(1514)]:e);return this[t(1541)]+=2,r},c.prototype[s(1249)]=function(){var e=s,t=this[e(815)][e(697)](this[e(1541)]);return this[e(1541)]+=1,t},c[s(1472)][s(871)]=function(e){var t=s,r=this[t(815)][t(1273)](this[t(1541)],null==e?this[t(1514)]:e);return this[t(1541)]+=4,r},c[s(1472)].readUint16=function(e){var t=s,r=this[t(815)][t(1017)](this[t(1541)],null==e?this[t(1514)]:e);return this.position+=2,r},c[s(1472)][s(1430)]=function(){var e=s,t=this[e(815)][e(1083)](this.position);return this[e(1541)]+=1,t},c.prototype[s(758)]=function(e){var t=s,r=this[t(815)][t(1119)](this[t(1541)],null==e?this.endianness:e);return this[t(1541)]+=4,r},c[s(1472)][s(1071)]=function(e){var t=s,r=this._dataView[t(523)](this.position,null==e?this[t(1514)]:e);return this[t(1541)]+=8,r},c[s(1514)]=new Int8Array(new Int16Array([1]).buffer)[0]>0,c.memcpy=function(e,t,r,n,i){var o=s,a=new Uint8Array(e,t,i),c=new Uint8Array(r,n,i);a[o(440)](c)},c[s(588)]=function(e,t){var r=s;return t==this[r(1514)]?e:this[r(1281)](e)},c.nativeToEndian=function(e,t){var r=s;return this[r(1514)]==t?e:this[r(1281)](e)},c[s(1281)]=function(e){for(var t=s,r=new Uint8Array(e[t(916)],e.byteOffset,e[t(1314)]),n=0;no;i--,o++){var a=r[o];r[o]=r[i],r[i]=a}return e},c[s(1472)][s(412)]=0,String.fromCharCodeUint8=function(e){for(var t=s,r=[],n=0;n>16),this.writeUint8((65280&e)>>8),this[t(573)](255&e)},c[s(1472)].adjustUint32=function(e,t){var r=s,n=this.position;this[r(1317)](e),this[r(795)](t),this[r(1317)](n)},c[s(1472)][s(1169)]=function(e,t){var r=s;this[r(628)](4*e);var n=new Int32Array(this._buffer,this[r(1222)]+this.position,e);return c[r(588)](n,null==t?this[r(1514)]:t),this[r(1541)]+=4*e,n},c[s(1472)][s(1354)]=function(e,t){var r=s;this._realloc(2*e);var n=new Int16Array(this[r(1553)],this[r(1222)]+this.position,e);return c.arrayToNative(n,null==t?this[r(1514)]:t),this[r(1541)]+=2*e,n},c[s(1472)][s(780)]=function(e){var t=s;this[t(628)](1*e);var r=new Int8Array(this[t(1553)],this.byteOffset+this[t(1541)],e);return this[t(1541)]+=1*e,r},c[s(1472)].mapUint32Array=function(e,t){var r=s;this._realloc(4*e);var n=new Uint32Array(this[r(1553)],this[r(1222)]+this[r(1541)],e);return c[r(588)](n,null==t?this[r(1514)]:t),this[r(1541)]+=4*e,n},c.prototype[s(1326)]=function(e,t){var r=s;this[r(628)](2*e);var n=new Uint16Array(this[r(1553)],this.byteOffset+this.position,e);return c[r(588)](n,null==t?this[r(1514)]:t),this[r(1541)]+=2*e,n},c[s(1472)][s(1146)]=function(e,t){var r=s;this._realloc(8*e);var n=new Float64Array(this[r(1553)],this.byteOffset+this.position,e);return c[r(588)](n,null==t?this[r(1514)]:t),this[r(1541)]+=8*e,n},c.prototype[s(1447)]=function(e,t){var r=s;this[r(628)](4*e);var n=new Float32Array(this[r(1553)],this[r(1222)]+this[r(1541)],e);return c[r(588)](n,null==t?this[r(1514)]:t),this[r(1541)]+=4*e,n};var l=function(e){var t=s;this[t(1419)]=[],this[t(885)]=-1,e&&(this.insertBuffer(e),this[t(885)]=0)};l[s(1472)]=new c(new ArrayBuffer,0,c[s(818)]),l[s(1472)].initialized=function(){var e,t=s;return this[t(885)]>-1||(this[t(1419)][t(836)]>0?0===(e=this[t(1419)][0])[t(1065)]?(this[t(916)]=e,this[t(885)]=0,o[t(370)](t(805),t(1137)),!0):(this.logBufferLevel(),!1):(this.logBufferLevel(),!1))},ArrayBuffer[s(533)]=function(e,t){var r=s;o[r(370)](r(1280),r(1312)+(e[r(1314)]+t[r(1314)]));var n=new Uint8Array(e[r(1314)]+t.byteLength);return n[r(440)](new Uint8Array(e),0),n[r(440)](new Uint8Array(t),e[r(1314)]),n[r(916)]},l[s(1472)][s(1474)]=function(e,t,r){var n,i=s;return(n=new Uint8Array(r))[i(440)](new Uint8Array(e,t,r)),n[i(916)][i(1065)]=e[i(1065)]+t,n[i(916)].usedBytes=0,n.buffer},l[s(1472)][s(1420)]=function(e){for(var t=s,r=!0,n=0;ni[t(1314)]){this[t(1419)][t(1450)](n,1),n--;continue}}else e[t(1065)]+e[t(1314)]<=i[t(1065)]||(e=this[t(1474)](e,0,i[t(1065)]-e[t(1065)])),o[t(370)](t(805),t(1309)+e[t(1065)]+" - Length: "+e[t(1314)]+")"),this[t(1419)][t(1450)](n,0,e),0===n&&(this[t(916)]=e);r=!1;break}if(e[t(1065)]0)){r=!1;break}e=this[t(1474)](e,a,c)}}r&&(o[t(370)](t(805),t(1309)+e.fileStart+t(1510)+e[t(1314)]+")"),this[t(1419)][t(532)](e),0===n&&(this[t(916)]=e))},l.prototype[s(679)]=function(e){var t,r,n,i,a,c=s,u=[],l="";for(n=0,i=0,t=0;t0&&(l+=a[c(1502)]-1+"]");var d=e?o.info:o[c(370)];0===this[c(1419)][c(836)]?d(c(805),c(1383)):d(c(805),""+this[c(1419)][c(836)]+c(826)+n+"/"+i+c(866)+l)},l.prototype[s(461)]=function(){var e,t,r=s;for(e=0;e"+this[t(916)][t(1314)]+")"),!0}return!1}return!1},l[s(1472)][s(1112)]=function(e,t,r){var n,i=s,a=null,c=-1;for(n=!0===e?0:this[i(885)];n=t?(o[i(370)](i(805),i(956)+c),c):-1:-1},l.prototype[s(1064)]=function(e){var t,r,n,i=s,o=void 0!==e?e:this[i(885)];if(r=this[i(1419)][o],this[i(1419)][i(836)]>o+1)for(t=o+1;t>3;return 31===s&&i[r(1507)][r(836)]>=2&&(s=32+((7&i[r(1507)][0])<<3)+((224&i.data[1])>>5)),s}return null},n.DecoderConfigDescriptor=function(t){var r=e;n[r(375)][r(1509)](this,4,t)},n[e(1471)].prototype=new(n[e(375)]),n.DecoderConfigDescriptor[e(1472)][e(1067)]=function(t){var r=e;this[r(1286)]=t.readUint8(),this[r(900)]=t[r(1430)](),this.upStream=0!=(this.streamType>>1&1),this[r(900)]=this[r(900)]>>>2,this.bufferSize=t[r(825)](),this[r(872)]=t[r(871)](),this[r(698)]=t[r(871)](),this.size-=13,this[r(610)](t)},n[e(804)]=function(t){var r=e;n[r(375)][r(1509)](this,5,t)},n[e(804)][e(1472)]=new(n[e(375)]),n.SLConfigDescriptor=function(t){n[e(375)].call(this,6,t)},n[e(629)][e(1472)]=new(n[e(375)]),this};t[s(1336)]=d;var h={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:[s(980),s(1464),s(942),s(1258),s(1560),s(950)],FULL_BOXES:[s(615),s(578),"iods",s(405),s(1013),s(1353),s(452)],CONTAINER_BOXES:[["moov",[s(1132),"pssh"]],["trak"],[s(1224)],[s(1460)],[s(1283)],[s(925)],[s(1152),[s(1233),"sbgp"]],[s(1333),[s(1443)]],[s(539),[s(737)]],[s(737),["trun","sgpd",s(1445)]],[s(1423)],[s(1384)],["iref"],[s(1051),["tfra"]],[s(1560)],[s(769)],[s(1042)],[s(950)],[s(1005)],[s(873)],[s(809)],[s(897)],[s(1405)],["udta",[s(1085)]],["iprp",[s(1465)]],[s(882)],[s(522)],[s(373)],[s(944),["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){var e=s;h[e(1378)].prototype=new h.Box,h[e(430)][e(1472)]=new(h[e(707)]),h[e(946)][e(1472)]=new(h[e(707)]),h[e(1271)].prototype=new(h[e(1378)]),h.BASIC_BOXES[e(1124)]((function(t){h[e(1053)](t)})),h[e(1063)][e(1124)]((function(t){h[e(1160)](t)})),h[e(1391)][e(1124)]((function(t){h[e(1320)](t[0],null,t[1])}))},Box:function(e,t,r){var n=s;this.type=e,this[n(1501)]=t,this[n(1318)]=r},FullBox:function(e,t,r){var n=s;h[n(707)][n(1509)](this,e,t,r),this[n(328)]=0,this[n(728)]=0},ContainerBox:function(e,t,r){var n=s;h[n(707)][n(1509)](this,e,t,r),this[n(1360)]=[]},SampleEntry:function(e,t,r,n){var i=s;h[i(430)][i(1509)](this,e,t),this[i(907)]=r,this.start=n},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){var r=s;h[r(1378)][r(1509)](this,e,t)},createBoxCtor:function(e,t){var r=s;h[r(683)][r(532)](e),h[e+r(707)]=function(t){var n=r;h[n(707)][n(1509)](this,e,t)},h[e+r(707)][r(1472)]=new(h[r(707)]),t&&(h[e+r(707)][r(1472)][r(1067)]=t)},createFullBoxCtor:function(e,t){var r=s;h[e+r(707)]=function(t){var n=r;h.FullBox[n(1509)](this,e,t)},h[e+r(707)][r(1472)]=new(h[r(1378)]),h[e+r(707)][r(1472)].parse=function(e){var n=r;this[n(1381)](e),t&&t[n(1509)](this,e)}},addSubBoxArrays:function(e){if(e){this[s(842)]=e;for(var t=e.length,r=0;rr?{code:h.ERR_NOT_ENOUGH_DATA,type:f,size:d,hdr_size:l,start:u}:0!==d&&u+d>e[c(1480)]()?(e[c(1317)](u),{code:h[c(342)],type:f,size:d,hdr_size:l,start:u}):t?{code:h.OK,type:f,size:d,hdr_size:l,start:u}:(h[f+"Box"]?n=new(h[f+c(707)])(d):"uuid"!==f?(n=new(h[c(707)])(f,d))[c(518)]=!0:h[c(947)][a]?n=new(h[c(947)][a])(d):((n=new(h[c(707)])(f,d)).uuid=a,n[c(518)]=!0),n[c(907)]=l,n.start=u,n[c(531)]===h[c(707)][c(1472)][c(531)]&&"mdat"!==n.type&&n.parseDataAndRewind(e),n[c(1067)](e),(i=e[c(1267)]()-(n[c(886)]+n.size))<0?e.seek(n[c(886)]+n[c(1501)]):i>0&&0!==n[c(1501)]&&e[c(1317)](n[c(886)]+n[c(1501)]),{code:h.OK,box:n,size:n[c(1501)]})},h[s(707)].prototype[s(1067)]=function(e){var t=s;this[t(1305)]!=t(980)?this[t(1507)]=e[t(1439)](this[t(1501)]-this[t(907)]):0===this[t(1501)]?e[t(1317)](e.getEndPosition()):e.seek(this[t(886)]+this[t(1501)])},h.Box.prototype[s(411)]=function(e){var t=s;this[t(1507)]=e[t(1439)](this[t(1501)]-this[t(907)]),e[t(1541)]-=this[t(1501)]-this[t(907)]},h[s(1378)].prototype[s(411)]=function(e){var t=s;this[t(1381)](e),this[t(1507)]=e.readUint8Array(this[t(1501)]-this[t(907)]),this[t(907)]-=4,e[t(1541)]-=this[t(1501)]-this[t(907)]},h[s(1378)][s(1472)].parseFullHeader=function(e){var t=s;this[t(728)]=e.readUint8(),this[t(328)]=e.readUint24(),this.hdr_size+=4},h.FullBox[s(1472)][s(1067)]=function(e){var t=s;this[t(1381)](e),this[t(1507)]=e[t(1439)](this[t(1501)]-this[t(907)])},h.ContainerBox[s(1472)][s(1067)]=function(e){for(var t,r,n=s;e[n(1267)]()>10&31,r[1]=this[t(1122)]>>5&31,r[2]=31&this.language,this[t(1414)]=String[t(693)](r[0]+96,r[1]+96,r[2]+96)},h[s(852)]=s(473),h.SAMPLE_ENTRY_TYPE_AUDIO=s(444),h[s(762)]="Hint",h[s(1200)]=s(817),h[s(1417)]="Subtitle",h[s(1413)]="System",h.SAMPLE_ENTRY_TYPE_TEXT=s(803),h[s(946)][s(1472)][s(675)]=function(e){var t=s;e[t(1439)](6),this[t(466)]=e.readUint16(),this.hdr_size+=8},h.SampleEntry[s(1472)].parse=function(e){var t=s;this.parseHeader(e),this.data=e[t(1439)](this.size-this.hdr_size)},h.SampleEntry.prototype[s(411)]=function(e){var t=s;this[t(675)](e),this[t(1507)]=e[t(1439)](this[t(1501)]-this[t(907)]),this[t(907)]-=8,e[t(1541)]-=this.size-this[t(907)]},h.SampleEntry.prototype.parseFooter=function(e){var t=s;h[t(430)][t(1472)][t(1067)][t(1509)](this,e)},h[s(941)](h[s(762)]),h[s(941)](h[s(1200)]),h[s(941)](h[s(1417)]),h[s(941)](h.SAMPLE_ENTRY_TYPE_SYSTEM),h[s(941)](h[s(656)]),h.createMediaSampleEntryCtor(h[s(852)],(function(e){var t,r=s;this[r(675)](e),e.readUint16(),e.readUint16(),e[r(977)](3),this[r(340)]=e[r(1142)](),this.height=e[r(1142)](),this[r(1021)]=e.readUint32(),this[r(802)]=e[r(871)](),e[r(871)](),this[r(485)]=e[r(1142)](),t=Math.min(31,e[r(1430)]()),this[r(732)]=e.readString(t),t<31&&e[r(604)](31-t),this.depth=e[r(1142)](),e[r(1142)](),this[r(407)](e)})),h[s(941)](h[s(542)],(function(e){var t=s;this.parseHeader(e),e[t(977)](2),this[t(643)]=e[t(1142)](),this[t(521)]=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)})),h[s(546)](h[s(852)],s(399)),h[s(546)](h[s(852)],s(585)),h.createSampleEntryCtor(h[s(852)],s(439)),h.createSampleEntryCtor(h[s(852)],s(1216)),h[s(546)](h[s(852)],s(1175)),h[s(546)](h[s(852)],s(1379)),h[s(546)](h.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,s(606)),h[s(546)](h.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),h[s(546)](h[s(852)],s(395)),h[s(546)](h[s(852)],"dvh1"),h.createSampleEntryCtor(h[s(852)],s(1043)),h[s(546)](h.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),h[s(546)](h[s(852)],"vvi1"),h[s(546)](h[s(852)],s(830)),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),h[s(546)](h[s(852)],s(1403)),h.createSampleEntryCtor(h[s(852)],s(1426)),h.createSampleEntryCtor(h[s(852)],s(1109)),h[s(546)](h[s(852)],"j2ki"),h.createSampleEntryCtor(h[s(852)],s(1319)),h.createSampleEntryCtor(h[s(852)],s(1012)),h[s(546)](h[s(852)],s(983)),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,s(1365)),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,s(1167)),h[s(546)](h[s(542)],"ac-4"),h[s(546)](h.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),h[s(546)](h[s(542)],"Opus"),h[s(546)](h[s(542)],"mha1"),h[s(546)](h.SAMPLE_ENTRY_TYPE_AUDIO,s(1332)),h[s(546)](h.SAMPLE_ENTRY_TYPE_AUDIO,s(1543)),h.createSampleEntryCtor(h[s(542)],s(905)),h.createEncryptedSampleEntryCtor(h[s(852)],s(1176)),h.createEncryptedSampleEntryCtor(h[s(542)],s(642)),h[s(951)](h[s(1417)],"encu"),h[s(951)](h.SAMPLE_ENTRY_TYPE_SYSTEM,s(554)),h.createEncryptedSampleEntryCtor(h[s(656)],s(646)),h[s(951)](h[s(1200)],"encm"),h[s(1053)]("a1lx",(function(e){var t=s,r=16*(1+(1&(1&e[t(1430)]())));this.layer_size=[];for(var n=0;n<3;n++)this[t(757)][n]=16==r?e[t(1142)]():e[t(871)]()})),h[s(1053)](s(620),(function(e){var t=s;this.op_index=e[t(1430)]()})),h[s(1160)](s(1449),(function(e){var t=s;this[t(911)]=e[t(816)]();var r=this.size-this.hdr_size-(this[t(911)][t(836)]+1);this[t(1529)]=e[t(1439)](r)})),h[s(1053)](s(366),(function(e){var t=s,r=e.readUint8();if(!(r>>7&!1)&&(this.version=127&r,1===this[t(728)]&&(r=e[t(1430)](),this[t(863)]=r>>5&7,this[t(724)]=31&r,r=e[t(1430)](),this[t(1266)]=r>>7&1,this[t(1229)]=r>>6&1,this[t(1342)]=r>>5&1,this.monochrome=r>>4&1,this.chroma_subsampling_x=r>>3&1,this[t(1246)]=r>>2&1,this[t(420)]=3&r,r=e.readUint8(),this[t(736)]=r>>5&7,0===this[t(736)]))){if(this[t(1196)]=r>>4&1,1===this[t(1196)])this[t(1203)]=15&r;else if(this[t(403)]=15&r,0!==this[t(403)])return;var n=this[t(1501)]-this[t(907)]-4;this[t(1551)]=e.readUint8Array(n)}})),h[s(1053)]("avcC",(function(e){var t,r,n=s;for(this[n(493)]=e[n(1430)](),this[n(958)]=e[n(1430)](),this[n(613)]=e[n(1430)](),this.AVCLevelIndication=e[n(1430)](),this[n(1410)]=3&e.readUint8(),this[n(848)]=31&e[n(1430)](),r=this[n(1501)]-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e[n(1439)](r))})),h[s(1053)](s(1046),(function(e){var t=s;this[t(1387)]=e[t(871)](),this.maxBitrate=e.readUint32(),this[t(698)]=e[t(871)]()})),h[s(1160)]("ccst",(function(e){var t=s,r=e.readUint8();this[t(779)]=128==(128&r),this[t(787)]=64==(64&r),this[t(671)]=(63&r)>>2,e[t(825)]()})),h[s(1053)]("cdef",(function(e){var t,r=s;for(this[r(643)]=e[r(1142)](),this[r(1444)]=[],this[r(410)]=[],this[r(545)]=[],t=0;t=32768&&this[t(1562)][t(532)](e[t(816)]())}})),h.createFullBoxCtor("co64",(function(e){var t,r,n=s;if(t=e[n(871)](),this.chunk_offsets=[],0===this[n(728)])for(r=0;r>7}else this[t(472)]===t(1081)?this[t(1024)]=e[t(1439)](this[t(1501)]-4):"prof"===this[t(472)]&&(this.ICC_profile=e.readUint8Array(this.size-4))})),h.createFullBoxCtor("cprt",(function(e){var t=s;this[t(748)](e),this.notice=e[t(816)]()})),h[s(1160)](s(1363),(function(e){var t=s;0===this[t(728)]&&(this.compositionToDTSShift=e.readInt32(),this[t(1086)]=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this[t(451)]=e[t(1545)](),this[t(365)]=e.readInt32())})),h[s(1160)]("ctts",(function(e){var t,r,n=s;if(t=e.readUint32(),this.sample_counts=[],this[n(480)]=[],0===this[n(728)])for(r=0;r>6,this.bsid=r>>1&31,this.bsmod=(1&r)<<2|n>>6&3,this[t(681)]=n>>3&7,this[t(792)]=n>>2&1,this[t(618)]=3&n|i>>5&7})),h[s(1053)](s(1438),(function(e){var t=s,r=e[t(1142)]();this[t(1411)]=r>>3,this[t(1100)]=7&r,this[t(558)]=[];for(var n=0;n>6,i[t(413)]=o>>1&31,i[t(425)]=(1&o)<<4|a>>4&15,i[t(681)]=a>>1&7,i[t(792)]=1&a,i.num_dep_sub=c>>1&15,i.num_dep_sub>0&&(i[t(344)]=(1&c)<<8|e[t(1430)]())}})),h[s(1160)](s(1500),(function(e){var t=s,r=[],n=[t(1126),t(356),t(1555),t(1348),t(744),t(833),"PICTURE",t(510)];for(this[t(1381)](e);;){var i=e[t(1430)](),o=Math.min(127&i,n[t(836)]-1);if(o?e[t(1439)](e[t(825)]()):(e[t(1439)](13),this[t(1521)]=e[t(871)]()>>12,e[t(1439)](20)),r[t(532)](n[o]),128&i)break}this[t(800)]=r[t(836)]+" ("+r[t(1212)](", ")+")"})),h[s(1053)](s(564),(function(e){var t=s;this[t(710)]=e[t(1515)]()})),h[s(1053)](s(904),(function(e){var t=s;this[t(943)]=e[t(871)]()})),h[s(1053)](s(810),(function(e){var t=s;this.bytessent=e[t(1515)]()})),h[s(1053)](s(1095),(function(e){var t=s;if(this[t(1469)]=e[t(1430)](),this[t(526)]=e[t(1430)](),this[t(1188)]=e[t(1142)](),this[t(808)]=e[t(871)](),this[t(915)]=e.readInt16(),this[t(563)]=e[t(1430)](),0!==this.ChannelMappingFamily){this[t(368)]=e[t(1430)](),this[t(1400)]=e[t(1430)](),this.ChannelMapping=[];for(var r=0;r=4;)this[t(650)][n]=e.readString(4),r-=4,n++})),h[s(1160)](s(336),(function(e){var t=s;0===this[t(728)]&&(e.readUint32(),this.handler=e[t(604)](4),e[t(977)](3),this[t(856)]=e[t(604)](this.size-this[t(907)]-20),"\0"===this[t(856)][this[t(856)][t(836)]-1]&&(this[t(856)]=this[t(856)][t(1392)](0,-1)))})),h[s(1053)]("hvcC",(function(e){var t,r,n,i,o=s;this[o(493)]=e[o(1430)](),i=e[o(1430)](),this.general_profile_space=i>>6,this[o(584)]=(32&i)>>5,this.general_profile_idc=31&i,this[o(811)]=e[o(871)](),this.general_constraint_indicator=e[o(1439)](6),this[o(424)]=e[o(1430)](),this.min_spatial_segmentation_idc=4095&e.readUint16(),this[o(1331)]=3&e[o(1430)](),this[o(1552)]=3&e.readUint8(),this[o(1058)]=7&e[o(1430)](),this[o(509)]=7&e[o(1430)](),this[o(898)]=e[o(1142)](),i=e.readUint8(),this[o(968)]=i>>6,this.numTemporalLayers=(13&i)>>3,this[o(464)]=(4&i)>>2,this[o(1410)]=3&i,this[o(1306)]=[];var a=e[o(1430)]();for(t=0;t>7,c.nalu_type=63&i;var u=e[o(1142)]();for(r=0;r>4&15,this[r(524)]=15&t,t=e[r(1430)](),this.base_offset_size=t>>4&15,1===this[r(728)]||2===this.version?this[r(1429)]=15&t:this[r(1429)]=0,this[r(719)]=[];var n=0;if(this.version<2)n=e[r(1142)]();else{if(2!==this[r(728)])throw"version of iloc box not supported";n=e[r(871)]()}for(var i=0;i>7,this[t(889)]=1&r})),h[s(1160)](s(878),(function(e){var t=s;if((0===this[t(728)]||1===this[t(728)])&&(this[t(651)]=e[t(1142)](),this[t(437)]=e[t(1142)](),this[t(482)]=e[t(816)](),this[t(715)]=e[t(816)](),this[t(649)]=e[t(816)]()),1===this[t(728)])return this[t(515)]=e[t(604)](4),void e[t(1317)](this[t(886)]+this[t(1501)]);this[t(728)]>=2&&(2===this[t(728)]?this[t(651)]=e[t(1142)]():3===this.version&&(this[t(651)]=e[t(871)]()),this[t(437)]=e.readUint16(),this.item_type=e[t(604)](4),this[t(482)]=e[t(816)](),this.item_type===t(1092)?(this[t(715)]=e[t(816)](),this[t(649)]=e[t(816)]()):this.item_type===t(468)&&(this[t(1409)]=e[t(816)]()))})),h[s(1160)](s(1465),(function(e){var t,r,n=s;for(entry_count=e[n(871)](),this[n(1263)]=[],t=0;t>7==1,1&this[n(328)]?c[n(386)]=(127&a)<<8|e[n(1430)]():c[n(386)]=127&a}}})),h[s(1160)](s(847),(function(e){var t,r,n=s;for(this.references=[];e[n(1267)]()>7,i[t(434)]=127&o,i[t(434)]){case 0:i[t(575)]=e[t(604)](4);break;case 1:i[t(575)]=e[t(604)](4),i[t(1209)]=e[t(871)]();break;case 2:case 3:break;case 4:i[t(713)]=e.readUint32()}}})),h.createBoxCtor("lsel",(function(e){var t=s;this.layer_id=e[t(1142)]()})),h[s(1053)](s(529),(function(e){var t=s;this.period=e[t(871)](),this[t(559)]=e[t(871)]()})),f[s(1472)].toString=function(){return"("+this.x+","+this.y+")"},h[s(1053)]("mdcv",(function(e){var t=s;this.display_primaries=[],this[t(745)][0]=new f(e[t(1142)](),e[t(1142)]()),this[t(745)][1]=new f(e[t(1142)](),e.readUint16()),this[t(745)][2]=new f(e.readUint16(),e[t(1142)]()),this[t(1422)]=new f(e.readUint16(),e[t(1142)]()),this[t(1072)]=e[t(871)](),this[t(445)]=e[t(871)]()})),h[s(1160)]("mdhd",(function(e){var t=s;1==this.version?(this[t(672)]=e[t(1515)](),this[t(1025)]=e[t(1515)](),this[t(377)]=e[t(871)](),this[t(703)]=e.readUint64()):(this[t(672)]=e[t(871)](),this[t(1025)]=e[t(871)](),this[t(377)]=e[t(871)](),this[t(703)]=e[t(871)]()),this[t(748)](e),e[t(1142)]()})),h.createFullBoxCtor(s(436),(function(e){var t=s;1&this.flags&&(this[t(728)]=1),1==this[t(728)]?this[t(1141)]=e[t(1515)]():this[t(1141)]=e[t(871)]()})),h[s(1160)]("meta",(function(e){var t=s;this[t(1360)]=[],h[t(430)][t(1472)][t(1067)][t(1509)](this,e)})),h.createFullBoxCtor(s(647),(function(e){var t=s;this[t(1358)]=e[t(871)]()})),h[s(1160)]("mfro",(function(e){var t=s;this._size=e[t(871)]()})),h[s(1160)](s(380),(function(e){this[s(1245)]=e.readUint8()})),h[s(1160)](s(1009),(function(e){var t=s;1==this[t(728)]?(this.creation_time=e[t(1515)](),this[t(1025)]=e[t(1515)](),this[t(377)]=e[t(871)](),this[t(703)]=e[t(1515)]()):(this.creation_time=e.readUint32(),this[t(1025)]=e[t(871)](),this[t(377)]=e.readUint32(),this[t(703)]=e[t(871)]()),this[t(645)]=e[t(871)](),this.volume=e.readUint16()>>8,e[t(1142)](),e[t(977)](2),this[t(1357)]=e[t(977)](9),e.readUint32Array(6),this[t(1066)]=e[t(871)]()})),h[s(1053)](s(902),(function(e){var t=s;this[t(777)]=e[t(871)]()})),h[s(1053)](s(1322),(function(e){var t=s;this[t(777)]=e[t(1515)]()})),h[s(1160)](s(782),(function(e){var t=s,r=e[t(871)]();this[t(733)]=[];for(var n=0;n0){var r=e[t(871)]();this[t(1389)]=[];for(var n=0;n0&&(this.data=e.readUint8Array(i))})),h[s(1160)](s(511),(function(e){var t=s;this[t(340)]=e[t(871)](),this.height=e[t(871)]()})),h[s(1160)]("enof",(function(e){var t=s;this[t(340)]=e[t(871)](),this.height=e[t(871)]()})),h.createFullBoxCtor(s(1256),(function(e){var t=s;this[t(340)]=e[t(871)](),this.height=e[t(871)]()})),h[s(1320)](s(1313),null,[s(511),s(1256),"enof"]),h[s(1053)](s(513),(function(e){var t=s;this[t(763)]=e.readString(4),this.sdptext=e[t(604)](this[t(1501)]-this[t(907)]-4)})),h[s(1160)]("saio",(function(e){var t=s;1&this.flags&&(this[t(914)]=e[t(871)](),this[t(1003)]=e[t(871)]());var r=e[t(871)]();this[t(1062)]=[];for(var n=0;n>7,this[t(699)]=r>>6&1,this[t(939)]&&(this[t(703)]=e[t(871)]()),this.avgRateFlag&&(this.accurateStatisticsFlag=e[t(1430)](),this[t(1220)]=e[t(1142)](),this.avgFrameRate=e.readUint16()),this[t(1129)]=[];for(var n=e[t(1430)](),i=0;i>7,this[t(669)]=127&r})),h[s(1270)](s(1455),(function(e){var t=s;if(this.operation_point_count=e[t(1142)](),this[t(1503)]!==2+(1===this[t(1080)]?2:6*this.operation_point_count)+9)this[t(1507)]=e.readUint8Array(this[t(1503)]-2);else{if(1===this.operation_point_count)this[t(570)]=e[t(1142)]();else{this[t(570)]=[],this[t(1244)]=[];for(var r=0;r>4,this[t(534)]=15&r,this.isProtected=e[t(1430)](),this[t(438)]=e[t(1430)](),this[t(625)]=h.parseHex16(e),this[t(1217)]=0,this[t(1328)]=0,1===this.isProtected&&0===this[t(438)]&&(this[t(1217)]=e.readUint8(),this[t(1328)]=e[t(1439)](this[t(1217)]))})),h[s(1270)]("stsa",(function(e){})),h.createSampleGroupCtor(s(1161),(function(e){var t=e[s(1430)]();this.NAL_unit_type=63&t})),h[s(1270)]("tele",(function(e){var t=s,r=e[t(1430)]();this[t(1557)]=r>>7})),h.createSampleGroupCtor(s(544),(function(e){})),h[s(1270)](s(908),(function(e){})),h[s(1270)](s(502),(function(e){})),h[s(1160)](s(1445),(function(e){var t=s;this[t(575)]=e[t(604)](4),1===this.version?this.grouping_type_parameter=e[t(871)]():this.grouping_type_parameter=0,this[t(1049)]=[];for(var r=e[t(871)](),n=0;n>6,this[r(767)][i]=t>>4&3,this.sample_is_depended_on[i]=t>>2&3,this[r(350)][i]=3&t})),h[s(1160)]("senc"),h[s(1160)](s(1233),(function(e){var t=s;this[t(575)]=e.readString(4),o[t(370)]("BoxParser",t(335)+this[t(575)]),1===this[t(728)]?this[t(931)]=e[t(871)]():this[t(931)]=0,this[t(728)]>=2&&(this[t(1082)]=e[t(871)]()),this.entries=[];for(var r=e[t(871)](),n=0;n>31&1,i[t(1255)]=2147483647&o,i[t(1556)]=e[t(871)](),o=e[t(871)](),i.starts_with_SAP=o>>31&1,i.SAP_type=o>>28&7,i[t(1107)]=268435455&o}})),h.SingleItemTypeReferenceBox=function(e,t,r,n){var i=s;h[i(707)][i(1509)](this,e,t),this[i(907)]=r,this[i(886)]=n},h[s(822)][s(1472)]=new h.Box,h[s(822)][s(1472)][s(1067)]=function(e){var t=s;this.from_item_ID=e[t(1142)]();var r=e[t(1142)]();this[t(608)]=[];for(var n=0;n>4&15,this[n(738)][t+1]=15&i}else if(8===this.field_size)for(t=0;t0)for(r=0;r>4&15,this[t(674)]=15&r}this[t(450)]=e[t(1430)](),this[t(667)]=e.readUint8(),this[t(821)]=h[t(1511)](e),1===this[t(450)]&&0===this[t(667)]&&(this.default_constant_IV_size=e[t(1430)](),this.default_constant_IV=e.readUint8Array(this[t(486)]))})),h[s(1160)]("tfdt",(function(e){var t=s;1==this[t(728)]?this.baseMediaDecodeTime=e[t(1515)]():this[t(668)]=e[t(871)]()})),h[s(1160)]("tfhd",(function(e){var t=s,r=0;this[t(504)]=e[t(871)](),this[t(1501)]-this[t(907)]>r&&this.flags&h.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e[t(1515)](),r+=8):this[t(1052)]=0,this.size-this.hdr_size>r&&this[t(328)]&h[t(525)]?(this[t(627)]=e[t(871)](),r+=4):this[t(627)]=0,this[t(1501)]-this.hdr_size>r&&this[t(328)]&h[t(1178)]?(this[t(708)]=e[t(871)](),r+=4):this[t(708)]=0,this.size-this[t(907)]>r&&this[t(328)]&h[t(347)]?(this.default_sample_size=e[t(871)](),r+=4):this[t(893)]=0,this[t(1501)]-this[t(907)]>r&&this[t(328)]&h[t(1386)]?(this[t(1542)]=e[t(871)](),r+=4):this[t(1542)]=0})),h[s(1160)]("tfra",(function(e){var t=s;this[t(1259)]=e[t(871)](),e.readUint24();var r=e[t(1430)]();this.length_size_of_traf_num=r>>4&3,this.length_size_of_trun_num=r>>2&3,this[t(1517)]=3&r,this[t(1049)]=[];for(var n=e[t(871)](),i=0;i>8,e[t(1142)](),this[t(1357)]=e.readInt32Array(9),this[t(340)]=e[t(871)](),this[t(961)]=e[t(871)]()})),h[s(1053)](s(1103),(function(e){var t=s;this[t(943)]=e[t(871)]()})),h[s(1053)]("tmin",(function(e){var t=s;this[t(943)]=e[t(871)]()})),h[s(1053)]("totl",(function(e){var t=s;this.bytessent=e[t(871)]()})),h[s(1053)](s(1453),(function(e){this[s(710)]=e.readUint32()})),h[s(1053)](s(772),(function(e){var t=s;this[t(710)]=e[t(1515)]()})),h[s(1271)][s(1472)].parse=function(e){var t=s;this[t(1381)](e),this.track_group_id=e[t(871)]()},h[s(572)](s(965)),h[s(1110)]=function(e,t,r,n){var i=s;h.Box[i(1509)](this,e,t),this[i(907)]=r,this[i(886)]=n},h[s(1110)][s(1472)]=new(h[s(707)]),h.TrackReferenceTypeBox[s(1472)].parse=function(e){var t=s;this.track_ids=e.readUint32Array((this[t(1501)]-this[t(907)])/4)},h[s(1184)].prototype[s(1067)]=function(e){for(var t,r,n=s;e[n(1267)]()r&&this[t(328)]&h[t(1329)]?(this[t(1535)]=e.readInt32(),r+=4):this[t(1535)]=0,this[t(1501)]-this[t(907)]>r&&this[t(328)]&h.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),r+=4):this.first_sample_flags=0,this[t(614)]=[],this[t(567)]=[],this[t(535)]=[],this[t(926)]=[],this.size-this[t(907)]>r)for(var n=0;n>7&1,this.block_pad_lsb=n>>6&1,this[r(1344)]=n>>5&1,this.block_reversed=n>>4&1,this[r(1157)]=n>>3&1,this[r(1561)]=e[r(871)](),this.row_align_size=e.readUint32(),this[r(948)]=e[r(871)](),this.num_tile_cols_minus_one=e[r(871)](),this[r(361)]=e[r(871)]()}})),h.createFullBoxCtor("url ",(function(e){var t=s;1!==this[t(328)]&&(this[t(448)]=e.readCString())})),h[s(1160)](s(1340),(function(e){var t=s;this[t(856)]=e[t(816)](),this.size-this.hdr_size-this[t(856)][t(836)]-1>0&&(this[t(448)]=e[t(816)]())})),h[s(530)](s(357),!0,!1,(function(e){var t=s;this.LiveServerManifest=e.readString(this[t(1501)]-this.hdr_size)[t(1484)](/&/g,t(827)).replace(//g,t(1299)).replace(/"/g,t(678))[t(1484)](/'/g,t(725))})),h[s(530)]("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){var t=s;this[t(1114)]=h[t(1511)](e);var r=e.readUint32();r>0&&(this[t(1507)]=e[t(1439)](r))})),h[s(530)](s(1261),!0,!1),h[s(530)](s(1523),!0,!1,(function(e){var t=s;this[t(940)]=e.readUint24(),this[t(664)]=e[t(1430)](),this[t(821)]=h.parseHex16(e)})),h.createUUIDBox(s(1133),!0,!1,(function(e){var t=s;this[t(924)]=e[t(1430)](),this[t(1049)]=[];for(var r=0;r>4,this.chromaSubsampling=t>>1&7,this[r(903)]=1&t,this[r(1505)]=e[r(1430)](),this.transferCharacteristics=e[r(1430)](),this[r(957)]=e[r(1430)](),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e[r(1439)](this[r(1213)])):(this.profile=e.readUint8(),this[r(1268)]=e[r(1430)](),t=e.readUint8(),this[r(912)]=t>>4&15,this[r(587)]=15&t,t=e[r(1430)](),this.chromaSubsampling=t>>4&15,this[r(751)]=t>>1&7,this[r(903)]=1&t,this[r(1213)]=e[r(1142)](),this[r(933)]=e[r(1439)](this[r(1213)]))})),h[s(1053)](s(641),(function(e){var t=s;this[t(1084)]=e[t(604)](this[t(1501)]-this[t(907)])})),h.createFullBoxCtor(s(759),(function(e){var t,r,n=s,i={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){var t=fo;this[t(1117)]=e.readUint8(),this[t(985)]=8},stream_read_2_bytes:function(e){var t=fo;this[t(1117)]=e[t(1142)](),this[t(985)]=16},extract_bits:function(e){var t=fo,r=this.held_bits>>this.num_held_bits-e&(1<1){for(i.stream_read_1_bytes(e),this[n(505)]=0,r=this[n(731)]-2;r>=0;--r){var c=i.extract_bits(1);this[n(505)]|=c<1;++r)i.extract_bits(1);for(this.sublayer_level_idc=[],r=this[n(731)]-2;r>=0;--r)this[n(505)]&1<>=1;r+=h.decimalToHex(i,0),r+=".",0===this[t(1235)].general_tier_flag?r+="L":r+="H",r+=this[t(1235)][t(424)];var o=!1,a="";for(e=5;e>=0;e--)(this[t(1235)][t(849)][e]||o)&&(a="."+h[t(1006)](this.hvcC[t(849)][e],0)+a,o=!0);r+=a}return r},h[s(696)].prototype[s(632)]=h[s(477)][s(1472)][s(632)]=function(){var e,t=s,r=h[t(946)][t(1472)][t(632)][t(1509)](this);if(this[t(759)]){r+="."+this.vvcC.general_profile_idc,this[t(759)][t(584)]?r+=".H":r+=".L",r+=this[t(759)][t(424)];var n="";if(this[t(759)][t(850)]){var i,o=[],a=0;for(a|=this.vvcC[t(568)]<<7,a|=this.vvcC[t(337)]<<6,e=0;e>2&63,o[t(532)](a),a&&(i=e),a=this[t(759)][t(850)][e]>>2&3;if(void 0===i)n=".CA";else{n=".C";var c="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",u=0,l=0;for(e=0;e<=i;++e)for(u=u<<8|o[e],l+=8;l>=5;){n+=c[u>>l-5&31],u&=(1<<(l-=5))-1}l&&(n+=c[31&(u<<=5-l)])}}r+=n}return r},h[s(901)].prototype.getCodec=function(){var e=s,t=h[e(946)][e(1472)].getCodec[e(1509)](this);if(this.esds&&this[e(639)][e(586)]){var r=this.esds[e(586)].getOTI(),n=this.esds[e(586)].getAudioConfig();return t+"."+h[e(1006)](r)+(n?"."+n:"")}return t},h.stxtSampleEntry.prototype[s(632)]=function(){var e=s,t=h[e(946)][e(1472)].getCodec.call(this);return this[e(1534)]?t+"."+this[e(1534)]:t},h[s(740)].prototype[s(632)]=h.vp09SampleEntry.prototype[s(632)]=function(){var e=s,t=h.SampleEntry.prototype[e(632)][e(1509)](this),r=this[e(1479)][e(1268)];0==r&&(r="00");var n=this[e(1479)][e(912)];return 8==n&&(n="08"),t+".0"+this.vpcC[e(419)]+"."+r+"."+n},h.av01SampleEntry.prototype[s(632)]=function(){var e,t=s,r=h.SampleEntry[t(1472)].getCodec[t(1509)](this),n=this.av1C[t(724)];return n<10&&(n="0"+n),2===this.av1C[t(863)]&&1===this[t(366)][t(1229)]?e=1===this[t(366)][t(1342)]?"12":"10":this[t(366)].seq_profile<=2&&(e=1===this[t(366)][t(1229)]?"10":"08"),r+"."+this.av1C[t(863)]+"."+n+(this[t(366)][t(1266)]?"H":"M")+"."+e},h.Box.prototype[s(1206)]=function(e,t){var r=s;this[r(1501)]+=8,this[r(1501)]>u&&(this[r(1501)]+=8),"uuid"===this.type&&(this[r(1501)]+=16),o[r(370)](r(1026),r(1530)+this[r(1305)]+r(503)+this[r(1501)]+r(589)+e[r(1267)]()+(t||"")),this[r(1501)]>u?e[r(795)](1):(this[r(1120)]=e.getPosition(),e[r(795)](this[r(1501)])),e[r(1074)](this.type,null,4),this[r(1305)]===r(1318)&&e.writeUint8Array(this.uuid),this[r(1501)]>u&&e[r(1497)](this.size)},h[s(1378)][s(1472)][s(1206)]=function(e){var t=s;this[t(1501)]+=4,h.Box[t(1472)].writeHeader.call(this,e,t(1499)+this[t(728)]+t(829)+this[t(328)]),e[t(573)](this.version),e.writeUint24(this[t(328)])},h.Box[s(1472)][s(531)]=function(e){var t=s;"mdat"===this.type?this[t(1507)]&&(this[t(1501)]=this.data[t(836)],this[t(1206)](e),e[t(1399)](this[t(1507)])):(this[t(1501)]=this[t(1507)]?this[t(1507)][t(836)]:0,this[t(1206)](e),this[t(1507)]&&e[t(1399)](this[t(1507)]))},h[s(430)].prototype[s(531)]=function(e){var t=s;this[t(1501)]=0,this[t(1206)](e);for(var r=0;r=2&&e.writeUint32(this[n(627)]),e[n(795)](this[n(1049)].length),t=0;t0)for(t=0;t+1r?1:0,this[t(328)]=0,this[t(1501)]=4,1===this.version&&(this[t(1501)]+=4),this[t(1206)](e),1===this[t(728)]?e[t(1497)](this.baseMediaDecodeTime):e[t(795)](this[t(668)])},h[s(657)].prototype[s(531)]=function(e){var t=s;this.version=0,this.size=4,this[t(328)]&h[t(600)]&&(this[t(1501)]+=8),this[t(328)]&h[t(525)]&&(this[t(1501)]+=4),this[t(328)]&h[t(1178)]&&(this.size+=4),this.flags&h.TFHD_FLAG_SAMPLE_SIZE&&(this[t(1501)]+=4),this.flags&h[t(1386)]&&(this[t(1501)]+=4),this[t(1206)](e),e.writeUint32(this[t(504)]),this[t(328)]&h[t(600)]&&e[t(1497)](this[t(1052)]),this[t(328)]&h[t(525)]&&e.writeUint32(this[t(627)]),this.flags&h[t(1178)]&&e[t(795)](this[t(708)]),this[t(328)]&h.TFHD_FLAG_SAMPLE_SIZE&&e[t(795)](this[t(893)]),this.flags&h[t(1386)]&&e[t(795)](this[t(1542)])},h.tkhdBox.prototype[s(531)]=function(e){var t=s;this[t(728)]=0,this[t(1501)]=80,this[t(1206)](e),e[t(795)](this.creation_time),e[t(795)](this[t(1025)]),e[t(795)](this[t(504)]),e.writeUint32(0),e[t(795)](this[t(703)]),e.writeUint32(0),e.writeUint32(0),e[t(422)](this[t(555)]),e[t(422)](this.alternate_group),e[t(422)](this.volume<<8),e[t(1136)](0),e.writeInt32Array(this.matrix),e[t(795)](this[t(340)]),e.writeUint32(this[t(961)])},h.trexBox.prototype.write=function(e){var t=s;this.version=0,this[t(328)]=0,this.size=20,this.writeHeader(e),e[t(795)](this[t(504)]),e[t(795)](this[t(627)]),e[t(795)](this[t(708)]),e.writeUint32(this[t(893)]),e[t(795)](this.default_sample_flags)},h[s(1376)][s(1472)][s(531)]=function(e){var t=s;this.version=0,this[t(1501)]=4,this[t(328)]&h[t(1329)]&&(this[t(1501)]+=4),this[t(328)]&h[t(1045)]&&(this.size+=4),this[t(328)]&h[t(990)]&&(this[t(1501)]+=4*this[t(614)].length),this[t(328)]&h[t(355)]&&(this[t(1501)]+=4*this[t(567)][t(836)]),this[t(328)]&h[t(1027)]&&(this[t(1501)]+=4*this[t(535)][t(836)]),this[t(328)]&h[t(688)]&&(this[t(1501)]+=4*this[t(926)].length),this.writeHeader(e),e[t(795)](this.sample_count),this[t(328)]&h.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e[t(1267)](),e[t(1232)](this[t(1535)])),this[t(328)]&h[t(1045)]&&e[t(795)](this[t(471)]);for(var r=0;r-1||e[r]instanceof h[n(707)]||t[r]instanceof h[n(707)]||typeof e[r]===n(799)||typeof t[r]===n(799)||"function"==typeof e[r]||typeof t[r]===n(1325)||e[n(842)]&&e[n(842)].indexOf(r[n(1392)](0,4))>-1||t[n(842)]&&t[n(842)][n(1495)](r.slice(0,4))>-1||"data"===r||r===n(886)||"size"===r||r===n(672)||r===n(1025)||h[n(1278)][n(1495)](r)>-1||e[r]===t[r]))return!1;return!0},h[s(1179)]=function(e,t){var r=s;if(!h[r(1533)](e,t))return!1;for(var n=0;n=t?e:new Array(t-e[n(836)]+1)[n(1212)](r)+e}function o(e){var t=fo,r=Math.floor(e/3600),n=Math[t(1337)]((e-3600*r)/60),s=Math.floor(e-3600*r-60*n),o=Math[t(1337)](1e3*(e-3600*r-60*n-s));return i(r,2)+":"+i(n,2)+":"+i(s,2)+"."+i(o,3)}for(var a=this[n(1293)](r),c="",u=0;u1)for(t=1;t-1&&this[t(565)][t(1450)](r,1)},g.prototype.setExtractionOptions=function(e,t,r){var n=s,i=this[n(1406)](e);if(i){var o={};this[n(1019)][n(532)](o),o.id=e,o[n(972)]=t,o[n(1132)]=i,i.nextSample=0,o[n(743)]=1e3,o[n(381)]=[],r&&r.nbSamples&&(o[n(743)]=r[n(854)])}},g[s(1472)][s(712)]=function(e){for(var t=s,r=-1,n=0;n-1&&this.extractedTracks[t(1450)](r,1)},g[s(1472)][s(1067)]=function(){var e,t,r=s;if(!this.restoreParsePosition||this[r(784)]())for(;;){if(this.hasIncompleteMdat&&this[r(1228)]()){if(this[r(1539)]())continue;return}if(this[r(1548)]&&this[r(1548)](),(e=h[r(1187)](this.stream,false))[r(1128)]===h[r(342)]){if(this[r(790)]){if(this[r(790)](e))continue;return}return}var n;switch(n=(t=e[r(362)]).type!==r(1318)?t[r(1305)]:t[r(1318)],this[r(1360)][r(532)](t),n){case r(980):this[r(330)][r(532)](t);break;case"moof":this[r(1481)].push(t);break;case r(1382):this.moovStartFound=!0,0===this[r(330)][r(836)]&&(this[r(331)]=!0);default:this[n],this[n]=t}this[r(1076)]&&this[r(1076)](t,e)}},g[s(1472)][s(1248)]=function(e){var t=s;if(null==e)throw"Buffer must be defined and non empty";if(void 0===e[t(1065)])throw"Buffer must have a fileStart property";return 0===e[t(1314)]?(this.stream[t(679)](),!1):(e.usedBytes=0,this[t(1162)].insertBuffer(e),this[t(1162)][t(679)](),!!this[t(1162)][t(1330)]())},g[s(1472)][s(806)]=function(e,t){var r,n=s;if(this[n(1248)](e))return this[n(1067)](),this[n(429)]&&!this[n(654)]&&(this[n(654)]=!0,this[n(1195)]&&this[n(1195)]()),this.moov?(!this[n(861)]&&(this[n(1461)](),this[n(861)]=!0),this.updateSampleLists(),this.onReady&&!this[n(1138)]&&(this.readySent=!0,this[n(1437)](this.getInfo())),this[n(814)](t),this[n(1544)]?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this[n(739)],this[n(1162)][n(844)]&&(r=this[n(1162)].getEndFilePositionAfter(r))):r=this[n(739)]?this.nextParsePosition:0,this.sidx&&this[n(1287)]&&!this[n(1140)]&&(this[n(1287)](this[n(562)]),this[n(1140)]=!0),this[n(660)]&&(this[n(358)]&&!this[n(689)]&&(this[n(358)](),this[n(689)]=!0),this[n(459)]&&this[n(459)](this[n(1022)])),this[n(1162)][n(461)]&&(this[n(1162)].logBufferLevel(),this[n(1162)].cleanBuffers(),this[n(1162)][n(679)](!0)),r},g.prototype[s(1467)]=function(){var e,t,r,n,i,o,a=s,c={},u=new Date(a(385))[a(1362)]();if(this[a(1382)])for(c[a(1226)]=!0,c[a(703)]=this[a(1382)].mvhd[a(703)],c[a(377)]=this[a(1382)].mvhd[a(377)],c[a(1050)]=null!=this.moov.mvex,c[a(1050)]&&this[a(1382)][a(1333)][a(436)]&&(c[a(1141)]=this.moov.mvex[a(436)][a(1141)]),c.isProgressive=this[a(331)],c[a(644)]=null!=this[a(1382)][a(1241)],c[a(541)]=[],c[a(541)][a(532)](this.ftyp[a(716)]),c.brands=c[a(541)][a(533)](this.ftyp[a(650)]),c[a(549)]=new Date(u+1e3*this.moov[a(1009)].creation_time),c[a(1466)]=new Date(u+1e3*this[a(1382)][a(1009)][a(1025)]),c[a(953)]=[],c[a(1202)]=[],c[a(788)]=[],c[a(1462)]=[],c[a(846)]=[],c[a(1078)]=[],c[a(949)]=[],e=0;e0?c.mime+=a(1166):c[a(1202)]&&c[a(1202)][a(836)]>0?c[a(1092)]+=a(326):c[a(1092)]+='application/mp4; codecs="',e=0;e=r.samples[n(836)])&&(this[n(789)]&&this[n(789)](i.id,i[n(972)],i[n(470)].buffer,r[n(636)],e||r[n(636)]>=r.samples.length),i.segmentStream=null,i!==this.fragmentedTracks[t]))break}}if(null!==this[n(1253)])for(t=0;t=r[n(381)].length)&&(o[n(370)]("ISOFile",n(1488)+c.id+n(1408)+r[n(636)]),this[n(1253)]&&this[n(1253)](c.id,c[n(972)],c[n(381)]),c[n(381)]=[],c!==this.extractedTracks[t]))break}}}},g[s(1472)][s(1487)]=function(e){var t=this[s(992)](e,!0);return t.length?t[0]:null},g[s(1472)][s(992)]=function(e,t){var r=s,n=[];return g[r(1207)][r(1509)](this,e,n,t),n},g[s(1207)]=function(e,t,r){var n=s;for(var i in this[n(1305)]&&this[n(1305)]==e&&t[n(532)](this),this[n(1360)]){if(t[n(836)]&&r)return;g[n(1207)][n(1509)](this.boxes[i],e,t,r)}},g.prototype[s(1289)]=function(e){var t=s,r=this.getTrackById(e);return r?r[t(381)]:void 0},g[s(1472)].getTrackSample=function(e,t){var r=this[s(1406)](e);return this.getSample(r,t)},g.prototype[s(1274)]=function(e,t,r){var n=s,i=this.getTrackById(e);i[n(1257)]||(i.lastValidSample=0);for(var o=i.lastValidSample;oe*i[a(377)]){u=n-1;break}t&&i[a(1366)]&&(c=n)}for(t&&(u=c),e=r[a(381)][u].cts,r[a(636)]=u;r[a(381)][u][a(501)]===r[a(381)][u][a(1501)]&&r[a(381)][u+1];)u++;return{offset:r[a(381)][u][a(1062)]+r[a(381)][u][a(501)],time:e/o}},g.prototype.getTrackDuration=function(e){var t,r=s;return e[r(381)]?((t=e[r(381)][e[r(381)][r(836)]-1]).cts+t[r(703)])/t[r(377)]:1/0},g[s(1472)].seek=function(e,t){var r,n,i,o=s,a=this.moov,c={offset:1/0,time:1/0};if(this.moov){for(i=0;ithis.getTrackDuration(r)||((n=this[o(876)](e,t,r))[o(1062)]-1){u=l;break}switch(u){case"Visual":if(o[t(415)](t(433)).set(t(519),0)[t(440)]("opcolor",[0,0,0]),c[t(440)](t(340),r[t(340)])[t(440)](t(961),r[t(961)])[t(440)](t(1021),72<<16)[t(440)](t(802),72<<16)[t(440)]("frame_count",1).set(t(732),r[t(1305)]+" Compressor")[t(440)](t(1039),24),r[t(824)]){var p=new(h[t(975)]);p[t(1067)](new a(r.avcDecoderConfigRecord)),c[t(727)](p)}else if(r.hevcDecoderConfigRecord){var m=new h.hvcCBox;m[t(1067)](new a(r[t(404)])),c.addBox(m)}break;case t(444):o[t(415)](t(1485)).set(t(537),r[t(537)]||0),c[t(440)](t(643),r[t(643)]||2)[t(440)]("samplesize",r[t(521)]||16)[t(440)](t(1521),r[t(1521)]||65536);break;case t(596):o[t(415)](t(615));break;case t(662):if(o[t(415)](t(971)),r.type===t(1415))c[t(440)](t(997),r[t(997)]||t(747)).set(t(797),r[t(797)]||"")[t(440)](t(1102),r[t(1102)]||"");break;case t(817):o[t(415)](t(578));break;case t(1059):o.add("nmhd");break;default:o[t(415)](t(578))}r.description&&c[t(727)](r[t(1194)]),r[t(1490)]&&r.description_boxes[t(1124)]((function(e){c[t(727)](e)})),o.add(t(925)).add("dref").addEntry((new(h[t(363)])).set(t(328),1));var v=o[t(415)](t(1152));return v[t(415)](t(1116))[t(1412)](c),v[t(415)](t(1377))[t(440)](t(548),[])[t(440)](t(752),[]),v.add(t(1284))[t(440)](t(1183),[]).set("samples_per_chunk",[]).set(t(920),[]),v.add(t(1247))[t(440)](t(408),[]),v[t(415)](t(991)).set("sample_sizes",[]),this[t(1382)].mvex[t(415)](t(1443))[t(440)](t(504),r.id)[t(440)](t(627),r[t(627)]||1)[t(440)]("default_sample_duration",r[t(708)]||0)[t(440)](t(893),r.default_sample_size||0)[t(440)]("default_sample_flags",r[t(1542)]||0),this[t(409)](n),r.id}},h.Box[s(1472)][s(527)]=function(e){var t=s,r=e||new c;r.endianness=c[t(818)],this.write(r)},g.prototype.addSample=function(e,t,r){var n=s,i=r||{},o={},a=this[n(1406)](e);if(null!==a){o.number=a[n(381)].length,o[n(504)]=a.tkhd[n(504)],o[n(377)]=a[n(1460)][n(1055)][n(377)],o[n(1158)]=i[n(920)]?i[n(920)]-1:0,o[n(1194)]=a.mdia[n(1283)][n(1152)][n(1116)][n(1049)][o[n(1158)]],o[n(1507)]=t,o[n(1501)]=t[n(1314)],o[n(501)]=o[n(1501)],o[n(703)]=i[n(703)]||1,o[n(1149)]=i[n(1149)]||0,o[n(778)]=i[n(778)]||0,o[n(1366)]=i.is_sync||!1,o[n(974)]=i.is_leading||0,o[n(729)]=i[n(729)]||0,o[n(1522)]=i[n(1522)]||0,o.has_redundancy=i[n(1230)]||0,o[n(462)]=i[n(462)]||0,o[n(1062)]=0,o[n(1483)]=i[n(1483)],a[n(381)][n(532)](o),a[n(666)]+=o[n(1501)],a[n(622)]+=o.duration,void 0===a[n(1395)]&&(a[n(1395)]=i[n(778)]),this[n(814)]();var c=this[n(467)](o);return this[n(727)](c),c[n(527)](),c[n(785)][0][n(551)][0].data_offset=c[n(1501)]+8,this[n(415)](n(980))[n(1507)]=new Uint8Array(t),o}},g[s(1472)][s(467)]=function(e){var t=s,r=0;r=e.is_sync?1<<25:65536;var n=new h.moofBox;n[t(415)](t(647))[t(440)](t(1358),this[t(982)]),this.nextMoofNumber++;var i=n.add(t(737)),o=this.getTrackById(e[t(504)]);return i[t(415)](t(1390))[t(440)](t(504),e[t(504)])[t(440)]("flags",h.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add(t(579))[t(440)](t(668),e[t(778)]-(o.first_dts||0)),i.add(t(1294))[t(440)](t(328),h.TRUN_FLAGS_DATA_OFFSET|h.TRUN_FLAGS_DURATION|h[t(355)]|h.TRUN_FLAGS_FLAGS|h[t(688)])[t(440)](t(1535),0).set(t(471),0)[t(440)]("sample_count",1).set("sample_duration",[e[t(703)]])[t(440)](t(567),[e[t(1501)]])[t(440)](t(535),[r])[t(440)](t(926),[e.cts-e[t(778)]]),n},g.prototype.lastMoofIndex=0,g[s(1472)].samplesDataSize=0,g.prototype[s(1018)]=function(){var e,t,r,n,i,o,a=s;for(this[a(1308)]=this.moov[a(1009)][a(703)],this.moov[a(1009)][a(703)]=0,e=0;e=2&&(u=i[a][l(575)]+"/0",(c=new d(i[a].grouping_type,0))[l(750)]=!0,!t.sample_groups_info[u]&&(t[l(1433)][u]=c))}else for(a=0;a=2&&(u=n[a][l(575)]+"/0",c=new d(n[a][l(575)],0),!e.sample_groups_info[u]&&(e.sample_groups_info[u]=c))},g[s(1296)]=function(e,t,r,n){var i,o,a=s;for(i in t[a(414)]=[],n){var c;if(t.sample_groups[i]={},t.sample_groups[i][a(575)]=n[i].grouping_type,t[a(414)][i][a(1209)]=n[i][a(1209)],r>=n[i].last_sample_in_run&&(n[i][a(896)]<0&&(n[i][a(896)]=0),n[i].entry_index++,n[i][a(1554)]<=n[i].sbgp[a(1049)][a(836)]-1&&(n[i][a(896)]+=n[i][a(1445)][a(1049)][n[i][a(1554)]][a(1324)])),n[i][a(1554)]<=n[i][a(1445)][a(1049)][a(836)]-1?t[a(414)][i][a(834)]=n[i][a(1445)].entries[n[i].entry_index][a(834)]:t[a(414)][i][a(834)]=-1,0!==t.sample_groups[i][a(834)])c=n[i][a(1201)]?n[i].fragment_description:n[i][a(1194)],t[a(414)][i][a(834)]>0?(o=t[a(414)][i][a(834)]>65535?(t[a(414)][i][a(834)]>>16)-1:t[a(414)][i][a(834)]-1,c&&o>=0&&(t[a(414)][i].description=c[a(1049)][o])):c&&c[a(728)]>=2&&c.default_group_description_index>0&&(t[a(414)][i][a(1194)]=c.entries[c.default_group_description_index-1])}},g.process_sdtp=function(e,t,r){var n=s;t&&(e?(t[n(974)]=e.is_leading[r],t.depends_on=e[n(767)][r],t[n(1522)]=e[n(1234)][r],t.has_redundancy=e[n(350)][r]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t[n(1230)]=0))},g[s(1472)][s(1461)]=function(){var e,t,r=s;for(e=0;ew&&(b++,w<0&&(w=0),w+=o[C(548)][b]),t>0?(e[C(381)][t-1][C(703)]=o.sample_deltas[b],e.samples_duration+=e[C(381)][t-1][C(703)],T[C(778)]=e[C(381)][t-1][C(778)]+e.samples[t-1][C(703)]):T[C(778)]=0,a?(t>=S&&(E++,S<0&&(S=0),S+=a[C(548)][E]),T.cts=e.samples[t][C(778)]+a[C(480)][E]):T.cts=T[C(778)],c?(t==c[C(1402)][I]-1?(T.is_sync=!0,I++):(T[C(1366)]=!1,T[C(462)]=0),l&&l.entries[k][C(581)]+A==t+1&&(T[C(1483)]=l[C(1049)][k].subsamples,A+=l[C(1049)][k][C(581)],k++)):T[C(1366)]=!0,g[C(1186)](e[C(1460)][C(1283)][C(1152)][C(820)],T,T[C(416)]),f?T[C(462)]=f[C(659)][t]:T.degradation_priority=0,l&&l.entries[k][C(581)]+A==t&&(T.subsamples=l.entries[k].subsamples,A+=l[C(1049)][k].sample_delta),(d[C(836)]>0||h.length>0)&&g[C(1296)](e,T,t,e[C(1433)])}t>0&&(e[C(381)][t-1][C(703)]=Math[C(1477)](e[C(1460)].mdhd[C(703)]-e.samples[t-1].dts,0),e[C(622)]+=e[C(381)][t-1].duration)}},g[s(1472)][s(1295)]=function(){var e,t,r,n,i,o,a,c,u,l,d,f,p,m,v,y=s;if(void 0!==this[y(1382)])for(;this.lastMoofIndex0&&g[y(339)](f,d,d[y(426)],f[y(1460)][y(1283)][y(1152)][y(1346)],d.sgpds),t=0;t0?m[y(778)]=f[y(381)][f[y(381)][y(836)]-2][y(778)]+f[y(381)][f[y(381)][y(836)]-2][y(703)]:(d[y(579)]?m[y(778)]=d[y(579)].baseMediaDecodeTime:m[y(778)]=0,f[y(1359)]=!0),m.cts=m.dts,_[y(328)]&h[y(688)]&&(m[y(1149)]=m.dts+_[y(926)][r]),v=a,_[y(328)]&h.TRUN_FLAGS_FLAGS?v=_.sample_flags[r]:0===r&&_.flags&h.TRUN_FLAGS_FIRST_FLAG&&(v=_.first_sample_flags),m[y(1366)]=!(v>>16&1),m[y(974)]=v>>26&3,m[y(729)]=v>>24&3,m[y(1522)]=v>>22&3,m[y(1230)]=v>>20&3,m[y(462)]=65535&v;var w=!!(d.tfhd[y(328)]&h[y(600)]),b=!!(d[y(1390)][y(328)]&h[y(794)]),S=!!(_[y(328)]&h[y(1329)]),E=0;E=w?d[y(1390)][y(1052)]:b?l[y(886)]:0===t?l.start:c,m[y(1062)]=0===t&&0===r?S?E+_.data_offset:E:c,c=m[y(1062)]+m[y(1501)],(d.sbgps[y(836)]>0||d[y(1346)].length>0||f.mdia.minf[y(1152)][y(426)][y(836)]>0||f[y(1460)][y(1283)][y(1152)][y(1346)].length>0)&&g.setSampleGroupProperties(f,m,m[y(400)],d[y(1433)])}}if(d.subs){f[y(887)]=!0;var I=d[y(1456)];for(t=0;t-1))return null;var u=(r=this[n(1162)][n(1419)][a])[n(1314)]-(i[n(1062)]+i.alreadyRead-r[n(1065)]);if(i[n(1501)]-i[n(501)]<=u)return o[n(370)](n(895),"Getting sample #"+t+n(1037)+i[n(501)]+" offset: "+(i[n(1062)]+i[n(501)]-r[n(1065)])+n(1372)+(i[n(1501)]-i[n(501)])+n(928)+i.size+")"),c[n(1007)](i[n(1507)][n(916)],i[n(501)],r,i[n(1062)]+i[n(501)]-r.fileStart,i[n(1501)]-i[n(501)]),r[n(1416)]+=i[n(1501)]-i.alreadyRead,this[n(1162)][n(679)](),i[n(501)]=i[n(1501)],i;if(0===u)return null;o.debug(n(895),n(690)+t+n(929)+i[n(501)]+n(765)+(i[n(1062)]+i[n(501)]-r[n(1065)])+" read size: "+u+n(928)+i[n(1501)]+")"),c.memcpy(i[n(1507)][n(916)],i[n(501)],r,i.offset+i[n(501)]-r[n(1065)],u),i.alreadyRead+=u,r[n(1416)]+=u,this[n(1162)].logBufferLevel()}},g[s(1472)].releaseSample=function(e,t){var r=s,n=e.samples[t];return n[r(1507)]?(this.samplesDataSize-=n[r(1501)],n[r(1507)]=null,n[r(1194)]=null,delete n[r(462)],delete n.depends_on,delete n.description_index,delete n[r(1230)],delete n[r(1522)],delete n[r(974)],delete n.is_sync,delete n[r(495)],delete n[r(400)],delete n.timescale,delete n.cts,delete n[r(778)],delete n.offset,delete n[r(1501)],delete n[r(504)],delete n[r(703)],n.alreadyRead=0,n.size):0},g[s(1472)][s(517)]=function(){return this[s(735)]},g[s(1472)][s(1290)]=function(){var e=s;const t=this[e(1162)][e(1419)]||[];let r=0;return t[e(1124)]((t=>{const n=t[e(1314)];r+=n})),r},g[s(1472)][s(333)]=function(){var e,t=s,r="";for(e=0;e0&&(r+=","),r+=this[t(1382)][t(857)][e].mdia[t(1283)].stbl[t(1116)][t(1049)][0].getCodec()}return r},g[s(1472)][s(1489)]=function(e){var t,r=s;if(!this[r(1382)]||!this[r(1382)][r(1333)])return null;for(t=0;t0&&(r.protection=a.ipro[n(348)][a[n(919)][n(1197)][e][n(1304)]-1]),a.iinf[n(1197)][e].item_type?r[n(1305)]=a[n(919)][n(1197)][e].item_type:r.type=n(1092),r[n(715)]=a.iinf[n(1197)][e].content_type,r[n(649)]=a[n(919)].item_infos[e][n(649)];if(a[n(522)])for(e=0;e0&&f[n(386)]-1-1))return null;var l=(t=this.stream[n(1419)][u]).byteLength-(a[n(1062)]+a[n(501)]-t[n(1065)]);if(!(a[n(836)]-a.alreadyRead<=l))return o.debug("ISOFile",n(923)+e+n(1227)+i+n(929)+a[n(501)]+" offset: "+(a[n(1062)]+a[n(501)]-t[n(1065)])+" read size: "+l+n(435)+a[n(836)]+" full item size: "+r.size+")"),c[n(1007)](r[n(1507)][n(916)],r[n(501)],t,a[n(1062)]+a[n(501)]-t[n(1065)],l),a.alreadyRead+=l,r[n(501)]+=l,t.usedBytes+=l,this[n(1162)][n(679)](),null;o[n(370)](n(895),n(923)+e+n(1227)+i+n(1037)+a[n(501)]+n(765)+(a[n(1062)]+a[n(501)]-t[n(1065)])+n(1372)+(a[n(836)]-a[n(501)])+n(435)+a[n(836)]+n(1524)+r[n(1501)]+")"),c[n(1007)](r[n(1507)][n(916)],r[n(501)],t,a[n(1062)]+a.alreadyRead-t.fileStart,a[n(836)]-a[n(501)]),t[n(1416)]+=a[n(836)]-a[n(501)],this[n(1162)][n(679)](),r[n(501)]+=a[n(836)]-a[n(501)],a[n(501)]=a[n(836)]}}return r[n(501)]===r[n(1501)]?r:null},g[s(1472)][s(1204)]=function(e){var t=s,r=this[t(719)][e];if(r.data){this.itemsDataSize-=r[t(1501)],r[t(1507)]=null,r[t(501)]=0;for(var n=0;n0?this.moov[i(857)][e][i(381)][0][i(703)]:0),t[i(532)](n)}return t},g[s(1472)][s(566)]=function(){var e=s,t={};return t[e(1382)]=this[e(1382)],this[e(1382)]&&this[e(1382)][e(857)]&&this.moov[e(857)].length>1&&(t[e(369)]=this[e(1382)][e(857)][0].samples[e(836)],t.moovVideoNum=this[e(1382)][e(857)][1].samples[e(836)]),t},h[s(707)][s(1472)][s(760)]=function(e){var t=s;this.size+=8,this[t(1501)]>u&&(this.size+=8),this[t(1305)]===t(1318)&&(this.size+=16),e.log(e.indent+"size:"+this[t(1501)]),e[t(695)](e[t(922)]+t(1210)+this.type)},h[s(1378)][s(1472)][s(760)]=function(e){var t=s;this[t(1501)]+=4,h[t(707)].prototype[t(760)][t(1509)](this,e),e[t(695)](e[t(922)]+t(595)+this[t(728)]),e[t(695)](e.indent+t(730)+this.flags)},h[s(707)].prototype.print=function(e){this[s(760)](e)},h[s(430)].prototype.print=function(e){var t=s;this[t(760)](e);for(var r=0;r>8)),e.log(e.indent+"matrix: "+this[t(1357)][t(1212)](", ")),e[t(695)](e.indent+t(1020)+this[t(1066)])},h.tkhdBox.prototype.print=function(e){var t=s;h[t(1378)][t(1472)][t(760)][t(1509)](this,e),e[t(695)](e[t(922)]+t(367)+this[t(672)]),e[t(695)](e[t(922)]+"modification_time: "+this[t(1025)]),e[t(695)](e[t(922)]+t(580)+this[t(504)]),e[t(695)](e[t(922)]+t(687)+this[t(703)]),e[t(695)](e[t(922)]+t(1239)+(this[t(1104)]>>8)),e[t(695)](e[t(922)]+"matrix: "+this[t(1357)][t(1212)](", ")),e.log(e[t(922)]+"layer: "+this[t(555)]),e[t(695)](e[t(922)]+t(726)+this[t(899)]),e.log(e[t(922)]+"width: "+this[t(340)]),e[t(695)](e.indent+t(1432)+this.height)};var _={};_[s(1373)]=function(e,t){var r=s,n=void 0===e||e,i=new g(t);return i[r(812)]=!n,i},s(1147)!==s(799)&&(t.createFile=_[s(1373)])}));function fo(e,t){var r=po();return(fo=function(e,t){return r[e-=326]})(e,t)}function po(){var e=["description","onMoovStart","initial_presentation_delay_present","item_infos","Allocating item #","download","SAMPLE_ENTRY_TYPE_METADATA","fragment_description","audioTracks","initial_presentation_delay_minus_one","releaseItem","float64le","writeHeader","_sweep","bits_per_channels","grouping_type_parameter","type:","segment_duration","join","codecIntializationDataSize","stri","isAudio","avc4","constant_IV_size","elngBox","DataStream.save: Can't create object URL.","avgBitRate","eqiv","byteOffset","skew_factor","edts","component_bit_depth_minus_one","hasMoov"," extent #","hasIncompleteMdat","high_bitdepth","has_redundancy","subSequenceIdentifier","writeInt32","sgpd","sample_is_depended_on","hvcC","6d1d9b0542d544e680e2141daff757b2","used","findDescriptor","volume: ","parseOneDescriptor","iods","hdlrBox","getPrimaryItem","available_bitrate","bits_per_pixel","chroma_subsampling_y","stco","checkBuffer","readInt8","sample_offset","first_output_sample","stsg","onSamples","presentation_time_delta","referenced_size","prof","lastValidSample","skip","track_ID","udta","a2394f525a9b4f14a2446c427c648df4","addSample","associations","createEntityToGroupCtor","primaryBChromaticity_x","seq_tier_0","getPosition","level","_dynamicSize","createSampleGroupCtor","TrackGroupTypeBox","tyco","getUint32","releaseUsedSamples","maximum_bitrate","props","moof_offset","DIFF_PRIMITIVE_ARRAY_PROP_NAMES","readInt32Array","ArrayBuffer","flipArrayEndianness","getHeight","minf","stsc","setFloat32","oti","onSidx","No method for reading signed 64 bits values","getTrackSamplesInfo","getStreamBufferSize","writeUint24","uint8","parseSample","trun","updateSampleLists","setSampleGroupProperties","padding_flag","SampleGroupEntry",">","attribute_list","Not enough bytes left in the parent box to parse a UUID box","getChannelCount","cmpd","protection_index","type","nalu_arrays","albc","initial_duration","Appending new buffer (fileStart: ","elst","sample_number","Trying to create a new buffer of size: ","tapt","byteLength","stream_read_2_bytes","hasItem","seek","uuid","mjp2","createContainerBoxCtor","vide","nump","getDurationString","sample_count","function","mapUint16Array","tsel","constant_IV","TRUN_FLAGS_DATA_OFFSET","initialized","parallelismType","mha2","mvex","styp","stss","MPEG4DescriptorParser","floor","sampleProcessingStarted","hSpacing","urn ","getSampleRate","twelve_bit","Removing buffer #","block_little_endian","to_item_ID","sgpds","AudioSampleEntry","SEEKTABLE","extended_language","brst","writeFooter","samples_per_chunk","ipro","mapInt16Array","getItem","_byteOffset","matrix","sequence_number","first_traf_merged","boxes","transfer_characteristics","getTime","cslg","hvc1SampleEntry","mp4a","is_sync","createFragment","writeInt8Array","itemId","general_profile_space","track_ids"," read size: ","createFile","chunk_index","item_count","trunBox","stts","FullBox","dav1","Found box of type '","parseFullHeader","moov","No more buffer in memory","tref","trexs","TFHD_FLAG_SAMPLE_FLAGS","bufferSizeDB","stop","kid","tfhd","CONTAINER_BOXES","slice","(empty)","construction_method","first_dts","general_sub_profile_idc","component_align_size","media_rate_integer","writeUint8Array","CoupledCount","displayFlags","sample_numbers","vp08","onError","trgr","getTrackById","fromCharCodeUint8"," for sample ","item_uri_type","lengthSizeMinusOne","data_rate","addEntry","SAMPLE_ENTRY_TYPE_SYSTEM","languageString","stpp","usedBytes","SAMPLE_ENTRY_TYPE_SUBTITLE","tenc","buffers","insertBuffer","moovBox","white_point","vttc","Repositioning parser at buffer position: ","pmax","vp09","colr","TKHD_FLAG_ENABLED","index_size","readUint8","readFloat32Array","height: ","sample_groups_info","ptl_num_sub_profiles","completeness","extent_length","onReady","dec3","readUint8Array","drefBox","stdp","SingleItemTypeReferenceBoxLarge","trex","channel_indexes","sbgp","pasp","mapFloat32Array","float64be","auxC","splice","rate: ","modification_time: ","tpay","co64","rash","first_sample_index","tag","application/xml","Error reading extent index","mdia","buildSampleLists","subtitleTracks","120nFTSZp","idat","ipma","modified","getInfo","hvcCBox","Version","int8","DecoderConfigDescriptor","prototype","initialize","reduceBuffer","fr-FR","pssh","max","78623LrWprm","vpcC","getEndPosition","moofs","10jENjIR","subsamples","replace","smhd","' and size ","getBox","Sending samples on track #","getTrexById","description_boxes","num_output_samples","lastMoofIndex","float32be","num_bad_rows","indexOf","917653aEJftl","writeUint64","maxCLL"," v=","dfLa","size","end","description_length","uint32le","colourPrimaries","payloadID","data","setNextSeekPositionFromSample","call"," - Length: ","parseHex16","correction_applied","opcolor","endianness","readUint64","greatestDecodeToDisplayDelta","length_size_of_sample_num","SAP_type","getLength","component_index","samplerate","is_depended_on","8974dbce7be74c5184f97148f9882554"," full item size: ","quat_y","dac3","pano","readUint16Array","aux_subtype","Writing box ","MP4Box","bg_color_rgba","boxEqualFields","mime_format","data_offset","_trimAlloc","sbtt","fobr","processIncompleteMdat","iaug","position","default_sample_flags","mhm1","nextSeekPosition","readInt32","max_pic_average_light_level","sample_rate","saveParsePosition","scheme_id_uri","isEos","configOBUs","chroma_format_idc","_buffer","entry_index","APPLICATION","subsegment_duration","level_independently_decodable","charCodeAt","schm","meco","pixel_size","component_type_urls",'audio/mp4; codecs="',"test","flags","smhdBox","mdats","isProgressive","extent_offset","getCodecs","levels","Found Sample Groups of type ","hdlr","ptl_multilayer_enabled","Found 'mdat' end in buffered data","initSampleGroups","width","length_size_of_trun_num","ERR_NOT_ENOUGH_DATA","releaseSample","chan_loc","writeInt8","starts_with_SAP","TFHD_FLAG_SAMPLE_SIZE","protections","general_profile_idc","sample_has_redundancy","timescale: ","stxt","entity_ids","minor_version","TRUN_FLAGS_SIZE","PADDING","a5d40b30e81411ddba2f0800200c9a66","flattenItemInfo","nalu_type","num_leading_samples_known","num_tile_rows_minus_one","box","url Box","kindBox","compositionEndTime","av1C","creation_time: ","StreamCount","moovAudioNum","debug","writeType","version of iloc box not supported","j2kH","max_picture_width","Descriptor","entry_count","timescale","stszBox","metadata","mskC","samples","focal_length_y","dobr","num_channels","1904-01-01T00:00:00Z","property_index","Adjusting box ","TKHD_FLAG_IN_PREVIEW","chunk_run_index","emsgBox","sync_sample_numbers",", column: ","luminanceMin","TKHD_FLAG_IN_MOVIE","lhe1","isVideo","kinds","default_crypt_byte_block","avc1","number_in_traf","quat_x","writeStruct","reserved_2","hevcDecoderConfigRecord","xml ","split","parseFooter","chunk_offsets","buildTrakSampleLists","channel_types","parseDataAndRewind","failurePosition","bsid","sample_groups","add","number","subs","addUsedBytes","profile","chroma_sample_position","component_count","writeInt16","createElement","general_level_idc","bsmod","sbgps","primaryGChromaticity_x","rapAlignement","moovStartFound","ContainerBox","stsdBox","writeInitializationSegment","vmhd","assignment_type"," full extent size: ","mehd","item_protection_index","Per_Sample_IV_Size","avc3","set","getInt16","und","stshBox","Audio","min_display_mastering_luminance","setAttribute","getAudioConfig","location","principal_point_x","default_isProtected","compositionStartTime","mere","properties","event_duration","addSubBoxArrays","setSegmentOptions","dataview","num_total_samples","processItems","XMLSubtitlein4Parser","cleanBuffers","degradation_priority","iso4","temporalIdNested","emsg","data_reference_index","createSingleSampleMoof","uri ","nalu","segmentStream","first_sample_flags","colour_type","Visual","document","isFragmentationInitialized","numTemporalLayers","vvi1SampleEntry","extent_index","absolute_time","sample_offsets","iprp","item_name","base_offset","switch_group","frame_count","default_constant_IV_size","257192WNKiAb","step_count","track_width","default_sample_info_size","vertical_justification","extents","configurationVersion","ispe","moof_number"," with new size ","MetadataSampleEntry","bad_columns","trep","vvnC","alreadyRead","vipr"," of size: ","track_id","ptl_sublayer_present_mask","descs","vertOffN","avcC","bit_depth_chroma_minus8","RESERVED","clef","txtC","rtp ","roll_distance","extension_type","video","getAllocatedSampleDataSize","has_unparsed_data","graphicsmode","cmin","samplesize","grpl","getFloat64","length_size","TFHD_FLAG_SAMPLE_DESC","OutputChannelCount","computeSize","stz2","maxr","createUUIDBox","write","push","concat","skip_byte_block","sample_flags","num_bad_cols","balance","whitePointChromaticity_x","moof","rtpmap_string","brands","SAMPLE_ENTRY_TYPE_AUDIO","string","tsas","channel_associations","createSampleEntryCtor","scheme_version","sample_counts","created","seig","truns","aebr","uint32be","encs","layer","isMetadata","Log","ind_subs","bytes","ext","Not enough bytes in buffer","sidx","ChannelMappingFamily","dimm","fragmentedTracks","getPerformanceInfo","sample_size","ptl_frame_only_constraint","mvif","target_rate_share","sgpdBox","createTrackGroupCtor","writeUint8","scheme_uri","grouping_type","bad_pixel_column","vmhdBox","nmhd","tfdt","track_id: ","sample_delta","source","writeUCS2String","general_tier_flag","avc2","esd","colorSpace","arrayToNative"," at position ","metx","destroy","num_bad_pixels","108vetwjF","sbgpBox","version:","Hint","printRanges","max_content_light_level","getSampleSize","TFHD_FLAG_BASE_DATA_OFFSET","accurateStatisticsFlag","6572594wvyXTZ","component_format","readString","setUint16","hev1","wbbr","references","ipmas","parseRemainingDescriptors","ntp_timestamp","159624oATgWs","profile_compatibility","sample_duration","hmhd","revokeObjectURL","ES_Descriptor","bit_rate_code","tags","a1op","mehdBox","samples_duration","presentation_time","reserved","KID","itemsDataSize","default_sample_description_index","_realloc","SLConfigDescriptor","avss","shadowed_sample_numbers","getCodec","cleanApertureWidthD","ctts","cmex","nextSample","ols_idx","ChannelMapping","esds","OCR_ES_ID","vttC","enca","channel_count","hasIOD","rate","enct","mfhd",", size ","content_encoding","compatible_brands","item_ID","_self","mdatBox","moovStartSent","ssix","SAMPLE_ENTRY_TYPE_TEXT","tfhdBox","MP4BoxStream","priority","meta","sent","Subtitle","int16","default_IV_size","irot","samples_size","default_Per_Sample_IV_Size","baseMediaDecodeTime","num_leading_samples","sample_info_size","max_ref_per_pic","creation_time","elng","default_skip_byte_block","parseHeader","box_record","getSample",""","logBufferLevel","getOTI","acmod","quat_z","boxCodes","pixi","addTrack","mapUint32Array","duration: ","TRUN_FLAGS_CTS_OFFSET","itemListBuilt","Getting sample #","readFloat64Array","parseConfig","fromCharCode","dataView","log","vvc1SampleEntry","getInt8","avgBitrate","avgRateFlag","fieldOrdering"," sample #","sublayer_level_idc","duration","layerNumber","dtrt","bad_rows","Box","default_sample_duration","codec_specific_parameters","bytessent","stppSampleEntry","unsetExtractionOptions","sub_track_id","Allocating sample #","content_type","major_brand","edits","stscBox","items","removeUsedSamples","clli","vSpacing","37300296JmxZWd","seq_level_idx_0","'","alternate_group: ","addBox","version","depends_on","flags:","num_sublayers","compressorname","padbits","drep","samplesDataSize","reserved_1","traf","sample_sizes","nextParsePosition","vp08SampleEntry","dependsOn_ES_ID","uint16le","nb_samples","VORBIS_COMMENT","display_primaries","media_duration","nonamespace","parseLanguage","style_record","is_fragment","transferFunction","sample_deltas","stream_read_1_bytes","isHint","ranges","mvhdBox","layer_size","readFloat32","vvcC","printHeader","avll","SAMPLE_ENTRY_TYPE_HINT","descriptionformat","prft"," offset: ","int16le","sample_depends_on","min","hnti","init","mergeNextBuffer","tpyl","essential","apply","full_range_flag","schemeURI","packetssent","dts","all_ref_pics_intra","mapInt8Array","setInt8","padb","bad_pixel_row","restoreParsePosition","trafs","flush","intra_pred_used","videoTracks","onSegment","processIncompleteBox","component_types","lfeon","nclx","TFHD_FLAG_DEFAULT_BASE_IS_MOOF","writeUint32","urn Box","schema_location","iloc","undefined","numMetadataBlocks","constant_frame_rate","vertresolution","Text","DecoderSpecificInfo","MultiBufferStream","appendBuffer","Generating initialization segment","InputSampleRate","rinf","dmed","general_profile_compatibility","discardMdatData","save","processSamples","_dataView","readCString","Metadata","BIG_ENDIAN","adjustUint32","sdtp","default_KID","SingleItemTypeReferenceBox","earliest_presentation_time","avcDecoderConfigRecord","readUint24"," stored buffer(s) (","&","pitm"," f=","vvs1","readInt64","sampleEntryCodes","CUESHEET","group_description_index","sidxBox","length","isSubtitle","stereo_indication_type","readUint"," --\x3e ","cttsBox","subBoxNames","bitrate","getEndFilePositionAfter","altr","metadataTracks","iref","nb_SPS_nalus","general_constraint_indicator","general_constraint_info","setAllUsedBytes","SAMPLE_ENTRY_TYPE_VISUAL","ster","nbSamples","extract_bits","name","traks","toString","minimum_bitrate","luminanceMax","sampleListBuilt","reference_type","seq_profile","cslgBox","horizOffD"," bytes), continuous ranges: ","getDescriptorName","4gklvKp","substring","Adjusting data_offset with new value ","readUint32","maxBitrate","sinf","slid","_byteLength","seekTrack","component_little_endian","infe","readInt16Array","writeFloat32","unpack","ipco","resources","Track created with MP4Box.js","bufferIndex","start","has_fragment_subsamples","bad_pixels","axis","prdi","AVCLevelIndication","writeUint32Array","default_sample_size","float32le","ISOFile","last_sample_in_run","schi","avgFrameRate","alternate_group","streamType","mp4aSampleEntry","npck","videoFullRangeFlag","dmax","mhm2","Exporting on track #","hdr_size","tscl","readInt method not implemented for size: ","equal","aux_type","bitDepth","subsegments","aux_info_type","OutputGain","buffer","PPS","shift","iinf","sample_description_index","URL","indent","Getting item #","fragment_count","dinf","sample_composition_time_offset","max_picture_height"," full size: "," partial data (alreadyRead: ","scif","default_length","avg_frame_rate","codecIntializationData","subtitles","hev1SampleEntry","ptl_present_flag","from_item_ID","mfhdBox","durationFlag","default_AlgorithmID","createMediaSampleEntryCtor","free","time","etyp","readInt8Array","SampleEntry","UUIDBoxes","tile_align_size","otherTracks","strk","createEncryptedSampleEntryCtor","audio","tracks","writeFloat64","seekLists","Found position in existing buffer #","matrixCoefficients","AVCProfileIndication","readInt16","VisualSampleEntry","height","writeInt16Array","mett","pow","msrc","info","int32be","constantFrameRate","pdin","lang","sthd","user","float32","is_leading","avcCBox","block_size","readUint32Array","warn","ASCII","mdat","payt","nextMoofNumber","uncv","uncC","num_held_bits","dynamicSize","sampling_type","initializeSegmentation","leva","TRUN_FLAGS_DURATION","stsz","getBoxes","SmDm","num_entities_in_group","Found ","rap ","namespace","dref","int32","item_id","sdptext","first_offset","aux_info_type_parameter","int32le","strd","decimalToHex","memcpy","entity_groups","mvhd","scheme_type","uint16be","mjpg","bxml","unsetSegmentOptions","primaryBChromaticity_y","data_offset_position","getUint16","resetTables","extractedTracks","next_track_id: ","horizresolution","onItem","encode","ICC_profile","modification_time","BoxWriter","TRUN_FLAGS_FLAGS","TFHD_FLAG_DUR_EMPTY","error","crypt_byte_block","70kpGoCG","mapUint8Array"," of size ","cts_shift","DIFF_BOXES_PROP_NAMES","message_data"," data (alreadyRead: ","offset_size","depth","LITTLE_ENDIAN","payl","hinf","dvhe","setInt16","TRUN_FLAGS_FIRST_FLAG","btrt","ref_track_id","BoxParser","entries","isFragmented","mfra","base_data_offset","createBoxCtor","writeCString","mdhd","handler","uint32","bit_depth_luma_minus8","System","sttsBox","absolute_duration","offset","FULL_BOXES","findEndContiguousBuf","fileStart","next_track_id","parse","lastBoxStartPosition","UUIDs","movie_duration","readFloat64","max_display_mastering_luminance","clap","writeString","2404869OilJoT","updateUsedBytes","whitePointChromaticity_y","hintTracks","traf_number","operation_point_count","rICC","default_group_description_index","getUint8","text","kind","leastDecodeToDisplayDelta","defineProperty","setUint32","discardable","initial_delay","getText","mime","value","SPS","dOps","ftyp","tfdtBox","parsingMdat","getWidth","num_ind_sub","seekPoints","auxiliary_mime_types","tmax","volume","stsh","print","SAP_delta_time","mdhdBox","avs3","TrackReferenceTypeBox","getInt32","findPosition","codec","system_id","prgr","stsd","held_bits","tkhd","getFloat32","sizePosition","co64Box","language","track_height","forEach","scnm","STREAMINFO","[row: ","code","dependency","primaryRChromaticity_x","primaryRChromaticity_y","trak","d4807ef2ca3946958e5426cb9e46a79f","base_offset_size","horizOffN","writeUint16","Stream ready for parsing","readySent","itemToFragmentedTrackFile","sidxSent","fragment_duration","readUint16","sbpm","image_width","BYTES_PER_ELEMENT","mapFloat64Array","object","discard_priority","cts","cleanApertureHeightN","readAnyInt","stbl","parseUUID","wvtt","focal_length_x","media_time","pad_unknown","description_index","documentString","createFullBoxCtor","sync","stream","field_size","msg"," (total: ",'video/mp4; codecs="',"ac-3","fscod","mapInt32Array","ref_to","avc4SampleEntry","movie_timescale","matrix_coefficients","group_id","av01","encv","num_bytes_constraint_info","TFHD_FLAG_SAMPLE_DUR","boxEqual","reference_ID","Textin4Parser","prol","first_chunk","trefBox","createObjectURL","process_sdtp","parseOneBox","PreSkip","ftypBox","media_rate_fraction","writeUint16Array","maxFALL","roll"];return(po=function(){return e})()}ho.Log,ho[lo(658)],ho.DataStream,ho.MultiBufferStream,ho[lo(1336)],ho[lo(1048)],ho[lo(460)],ho[lo(1181)],ho[lo(895)],ho[lo(1373)];const mo=vo;function vo(e,t){const r=_o();return(vo=function(e,t){return r[e-=343]})(e,t)}function yo(e){return e[vo(348)](((e,t)=>256*e+t))}function go(e){const t=vo,r=[101,103,119,99],n=e[t(370)]-28,i=e[t(372)](n,n+r[t(370)]);return r.every(((e,t)=>e===i[t]))}!function(e,t){const r=vo,n=e();for(;;)try{if(398809===-parseInt(r(344))/1*(parseInt(r(366))/2)+-parseInt(r(377))/3*(parseInt(r(367))/4)+-parseInt(r(363))/5*(parseInt(r(343))/6)+-parseInt(r(368))/7+-parseInt(r(346))/8+parseInt(r(364))/9*(parseInt(r(350))/10)+parseInt(r(365))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(_o);mo(371),mo(353);function _o(){const e=["202473yNQigq","set","init error","buffer","object","reverse","message","exports","25554UUsEYU","417glUkYL","init","2916616jyxzlS","catch","reduce","TAG_NAME","2580310SMKCPd","instantiate","function","transport","byteLength","Module","not support wasm","wasm not supported","player","map","stack overflow","debuglog","Memory","445VZlYOq","9AUdnDi","27427180lbjYGF","2488VKiiMa","24AUtRlq","4796960mCzRuO","memory","length","destroy","slice","instance","parse","TransportDescrambler","debugWarn"];return(_o=function(){return e})()}function wo(e,t){const r=bo();return(wo=function(e,t){return r[e-=325]})(e,t)}function bo(){const e=["hexStringToUint8Array: invalid hexString length, must be even and bexString length is: ","toString","1910HoSCSl","4eNfFpk","length","4635VDveWw","234680ZYuwbB","constructor","253TupdcK","replace","3734mrSTnk","reduce","342372fvfLwb","833034MkITJp","byteLength","1120vObLGh","127HxqZAg","set","padStart","substr","1338390txvyMQ","error","8603jocWOF"];return(bo=function(){return e})()}function So(){const e=wo;for(var t=arguments[e(343)],r=new Array(t),n=0;n{const n=e,s=new i((0|t[n(330)])+(0|r.byteLength));return s.set(t,0),s.set(r,0|t[n(330)]),s}),new i)}!function(e,t){const r=wo,n=e();for(;;)try{if(141002===parseInt(r(332))/1*(-parseInt(r(326))/2)+-parseInt(r(329))/3*(parseInt(r(342))/4)+parseInt(r(345))/5+parseInt(r(336))/6+parseInt(r(338))/7*(-parseInt(r(331))/8)+-parseInt(r(344))/9*(parseInt(r(341))/10)+parseInt(r(347))/11*(parseInt(r(328))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(bo),function(e,t){const r=Fo,n=e();for(;;)try{if(783332===-parseInt(r(308))/1+parseInt(r(302))/2*(parseInt(r(306))/3)+parseInt(r(288))/4+-parseInt(r(295))/5*(-parseInt(r(298))/6)+parseInt(r(293))/7+parseInt(r(283))/8*(parseInt(r(300))/9)+-parseInt(r(291))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ao);const Eo=16,Io=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],ko=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Ao(){const e=["map","join","20332720XcFgjc","toString","8083124gCpmMe","set","3574490JZPUbC","array","cbc","6ktaTcw","input is not supported","9ZQFofW","codePointAt","581918iHCygx","fromCodePoint","padding is invalid","substr","9AYfbwD","byteLength","1482758yrRWIe","key is invalid","iv is invalid","string","arrayBuffer.length","length","pkcs#7","error","pkcs#5","2733384iaYhni","push","includes","slice","none","4860728NdpKGB"];return(Ao=function(){return e})()}function Co(e){const t=Fo,r=[];for(let n=0,i=e[t(313)];n1===(e=e[t(292)](16)).length?"0"+e:e))[t(290)]("")}function xo(e){const t=Fo,r=[];for(let n=0,i=e[t(313)];n>>6),r[t(284)](128|63&i);else if(i<=55295||i>=57344&&i<=65535)r[t(284)](224|i>>>12),r[t(284)](128|i>>>6&63),r[t(284)](128|63&i);else{if(!(i>=65536&&i<=1114111))throw r[t(284)](i),new Error(t(299));n++,r.push(240|i>>>18&28),r[t(284)](128|i>>>12&63),r.push(128|i>>>6&63),r[t(284)](128|63&i)}}return r}function Do(e){const t=Fo,r=[];for(let n=0,i=e.length;n=240&&e[n]<=247?(r[t(284)](String[t(303)](((7&e[n])<<18)+((63&e[n+1])<<12)+((63&e[n+2])<<6)+(63&e[n+3]))),n+=3):e[n]>=224&&e[n]<=239?(r[t(284)](String.fromCodePoint(((15&e[n])<<12)+((63&e[n+1])<<6)+(63&e[n+2]))),n+=2):e[n]>=192&&e[n]<=223?(r[t(284)](String.fromCodePoint(((31&e[n])<<6)+(63&e[n+1]))),n++):r.push(String[t(303)](e[n]));return r[t(290)]("")}function Po(e,t){const r=31&t;return e<>>32-r}function Bo(e){return(255&Io[e>>>24&255])<<24|(255&Io[e>>>16&255])<<16|(255&Io[e>>>8&255])<<8|255&Io[255&e]}function Mo(e){return e^Po(e,2)^Po(e,10)^Po(e,18)^Po(e,24)}function Fo(e,t){const r=Ao();return(Fo=function(e,t){return r[e-=280]})(e,t)}function Uo(e){return e^Po(e,13)^Po(e,23)}function Ro(e,t,r){const n=new Array(4),i=new Array(4);for(let t=0;t<4;t++)i[0]=255&e[4*t],i[1]=255&e[4*t+1],i[2]=255&e[4*t+2],i[3]=255&e[4*t+3],n[t]=i[0]<<24|i[1]<<16|i[2]<<8|i[3];for(let e,t=0;t<32;t+=4)e=n[1]^n[2]^n[3]^r[t+0],n[0]^=Mo(Bo(e)),e=n[2]^n[3]^n[0]^r[t+1],n[1]^=Mo(Bo(e)),e=n[3]^n[0]^n[1]^r[t+2],n[2]^=Mo(Bo(e)),e=n[0]^n[1]^n[2]^r[t+3],n[3]^=Mo(Bo(e));for(let e=0;e<16;e+=4)t[e]=n[3-e/4]>>>24&255,t[e+1]=n[3-e/4]>>>16&255,t[e+2]=n[3-e/4]>>>8&255,t[e+3]=255&n[3-e/4]}function Lo(e,t,r){const n=new Array(4),i=new Array(4);for(let t=0;t<4;t++)i[0]=255&e[0+4*t],i[1]=255&e[1+4*t],i[2]=255&e[2+4*t],i[3]=255&e[3+4*t],n[t]=i[0]<<24|i[1]<<16|i[2]<<8|i[3];n[0]^=2746333894,n[1]^=1453994832,n[2]^=1736282519,n[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=n[1]^n[2]^n[3]^ko[r+0],t[r+0]=n[0]^=Uo(Bo(e)),e=n[2]^n[3]^n[0]^ko[r+1],t[r+1]=n[1]^=Uo(Bo(e)),e=n[3]^n[0]^n[1]^ko[r+2],t[r+2]=n[2]^=Uo(Bo(e)),e=n[0]^n[1]^n[2]^ko[r+3],t[r+3]=n[3]^=Uo(Bo(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function Oo(e,t,r){const n=Fo;let{padding:i=n(280),mode:s,iv:o=[],output:a=n(311)}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(s===n(297)&&(typeof o===n(311)&&(o=Co(o)),16!==o.length))throw new Error(n(310));if(typeof t===n(311)&&(t=Co(t)),16!==t.length)throw new Error(n(309));if(e=typeof e===n(311)?0!==r?xo(e):Co(e):[...e],(i===n(282)||i===n(280))&&0!==r){const t=Eo-e.length%Eo;for(let r=0;r=Eo;){const t=e[n(286)](h,h+16),i=new Array(16);if(s===n(297))for(let e=0;e2&&void 0!==arguments[2]&&arguments[2],i=arguments[r(313)]>3&&void 0!==arguments[3]&&arguments[3];const s=e[r(307)];let o=new Uint8Array(e.slice(0,5)),a=5;for(;as){const t=new Uint8Array(o[r(313)]+e[r(313)]-a);t.set(o,0),t[r(294)](e[r(286)](a),o[r(313)]),o=t;break}let l=e[a+4],d=!1,h=2;if(n?(i&&(h=3),l=l>>>1&63,d=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][r(285)](l)):(l&=31,d=1===l||5===l),d){const n=Oo(e[r(286)](a+4+h,a+4+u),t,0,{padding:"none",output:r(296)});let i=n[n[r(313)]-1];if(i>0&&i<16){let e=!0;for(let t=1;t<=i;t++)if(n[n.length-t]!==i){e=!1;break}e&&n.splice(n[r(313)]-i,i)}const s=new Uint8Array(h);s.set(e[r(286)](a+4,a+4+h),0);const c=ut(So(s,new Uint8Array(n))),l=new Uint8Array(o[r(313)]+c.length);l.set(o,0),l[r(294)](c,o.length),o=l}else{const t=e[r(286)](a+4,a+4+u),n=new Uint8Array(o[r(313)]+4+t[r(313)]);n.set(o,0),n[r(294)](c,o[r(313)]),n[r(294)](t,o.length+4),o=n}a=a+4+u}return o}const Ho=Vo;function jo(){const e=["9WVBnxc","keys","length","slice","3073290gYZRGp","56bAVltD","push","ctx","356648JhPocV","forEach","947086OIWwBz","apply","193935EzwIGS","277838ocRUiI","9eyqmog","once","5aAFtTR","549650eNHCMR","4337542gMGnIj","off"];return(jo=function(){return e})()}function Vo(e,t){const r=jo();return(Vo=function(e,t){return r[e-=297]})(e,t)}!function(e,t){const r=Vo,n=e();for(;;)try{if(283672===-parseInt(r(316))/1+-parseInt(r(313))/2+parseInt(r(297))/3*(parseInt(r(311))/4)+parseInt(r(299))/5*(parseInt(r(307))/6)+-parseInt(r(315))/7*(parseInt(r(308))/8)+parseInt(r(303))/9*(parseInt(r(300))/10)+parseInt(r(301))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(jo);class Wo{on(e,t,r){const n=Vo,i=this.e||(this.e={});return(i[e]||(i[e]=[]))[n(309)]({fn:t,ctx:r}),this}[Ho(298)](e,t,r){const n=this;function i(){const s=Vo;n[s(302)](e,i);for(var o=arguments.length,a=new Array(o),c=0;c1?n-1:0),s=1;s{delete n[e]})),void delete this.e;const i=n[e],s=[];if(i&&t)for(let e=0,n=i.length;e=2&&!this[r(250)];)if(255==this[r(253)][this.parsedOffset]){if(!(!1&this.tempBuffer[this[r(228)]+1])){this[r(230)]=this.tempBuffer[this.parsedOffset+1],this[r(251)]=qo[r(254)],this[r(237)]=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this[r(228)]++}else this.parsedOffset++;if(e)continue;break}if(this[r(251)]==qo.findFirstStartCode){let e=!1;for(;this[r(253)][r(236)]-this[r(228)]>=2&&!this[r(250)];)if(255==this.tempBuffer[this[r(228)]]){if(this.tempBuffer[this[r(228)]+1]==this.versionLayer){this[r(251)]=qo[r(235)],this.secondStartCodeOffset=this[r(228)],this[r(228)]+=2,e=!0;break}this[r(228)]++}else this[r(228)]++;if(e)continue;break}if(this.state==qo[r(235)]){let e=this[r(253)][r(245)](this.fisrtStartCodeOffset,this[r(244)]);this[r(227)](r(238),e,t),this[r(253)]=this[r(253)][r(245)](this[r(244)]),this[r(237)]=0,this[r(228)]=2,this[r(251)]=qo.findFirstStartCode}}}}function Ko(){const e=["2521491MjqjlA","emit","parsedOffset","stats","versionLayer","reset","336PSuQeN","dispatch","635209BngYuo","findSecondStartCode","length","fisrtStartCodeOffset","data","player","897884AdwOKo","off","set","init","secondStartCodeOffset","slice","destroy","186112IbrTIa","2608745IwjrSZ","6456084AnLGWj","isDestroyed","state","2108840VnhHDG","tempBuffer","findFirstStartCode"];return(Ko=function(){return e})()}function Xo(e,t,r){const n=ea;for(let i=2;i3&&void 0!==arguments[3]&&arguments[3];const s=e[n(447)];let o=5;for(;os)break;let c=e[o+4],u=!1;if(i?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(438)](c)):(c&=31,u=1===c||5===c),u){const i=Xo(e[n(433)](o+4,o+4+a),t,r);e[n(435)](i,o+4)}o=o+4+a}return e}function Qo(){const e=["10169019JUwcmY","2312084BKjbev","19770JfPSFR","1230741AGclGU","8ZmTbrN","22691060FPCjsk","6waGPZr","byteLength","11SjtdsC","slice","400kBAPvb","set","length","4622630ZONVfR","includes","234709gDKcBB"];return(Qo=function(){return e})()}function ea(e,t){const r=Qo();return(ea=function(e,t){return r[e-=433]})(e,t)}function ta(e,t,r){const n=ea;if(e[n(447)]<=30)return e;const i=Xo(e.slice(30),t,r);return e[n(435)](i,30),e}function ra(){var e=["540KNDSbA","11250679uDedFl","4ElfVvC","set","7zkmGHx","length","filter","forEach","6937983IJrmgK","10mmCAQd","453384ljFXFn","555776xuKrvj","14634cHURih","1289349pvZuXZ","reduce","1046382RlMaPd","byteLength"];return(ra=function(){return e})()}function na(e,t){var r=ra();return(na=function(e,t){return r[e-=287]})(e,t)}function ia(){for(var e=na,t=arguments.length,r=new Array(t),n=0;ne+t.byteLength),0));let s=0;return r[e(288)]((t=>{var r=e;i[r(301)](t,s),s+=t[r(297)]})),i}!function(e,t){const r=ea,n=e();for(;;)try{if(803316===-parseInt(r(439))/1+parseInt(r(434))/2*(-parseInt(r(442))/3)+-parseInt(r(441))/4+-parseInt(r(437))/5*(parseInt(r(446))/6)+parseInt(r(440))/7*(parseInt(r(444))/8)+parseInt(r(443))/9+-parseInt(r(445))/10*(-parseInt(r(448))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Qo),function(e,t){for(var r=na,n=e();;)try{if(442361===-parseInt(r(292))/1+parseInt(r(296))/2+-parseInt(r(294))/3*(-parseInt(r(300))/4)+-parseInt(r(298))/5*(parseInt(r(293))/6)+-parseInt(r(302))/7*(-parseInt(r(291))/8)+-parseInt(r(289))/9*(parseInt(r(290))/10)+parseInt(r(299))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ra);const sa=aa;function oa(){const e=["destroys","501600oVWKfW","addEventListener","72008fexiXB","removeEventListener","228048umfgNI","length","3McwXiz","isArray","77LdyyEo","map","destroy","forEach","10WXHfgV","746566pKChUA","173971kukJVS","3592395sGRrgV","15lXrvHf","288572qVhDud","proxy"];return(oa=function(){return e})()}function aa(e,t){const r=oa();return(aa=function(e,t){return r[e-=320]})(e,t)}!function(e,t){const r=aa,n=e();for(;;)try{if(302573===parseInt(r(336))/1+-parseInt(r(335))/2+parseInt(r(328))/3*(parseInt(r(339))/4)+-parseInt(r(338))/5*(parseInt(r(326))/6)+-parseInt(r(330))/7*(-parseInt(r(324))/8)+-parseInt(r(337))/9*(-parseInt(r(334))/10)+parseInt(r(322))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(oa);class ca{constructor(e){const t=aa;this[t(321)]=[],this[t(320)]=this.proxy.bind(this),this.master=e}[sa(320)](e,t,r){const n=sa;let i=arguments[n(327)]>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array[n(329)](t))return t[n(331)]((t=>this[n(320)](e,t,r,i)));e[n(323)](t,r,i);const s=()=>{kt(e[n(325)])&&e.removeEventListener(t,r,i)};return this[n(321)].push(s),s}[sa(332)](){const e=sa;this.master.debugLog("Events","destroy"),this[e(321)][e(333)]((e=>e())),this[e(321)]=[]}}const ua=da;!function(e,t){const r=da,n=e();for(;;)try{if(719603===-parseInt(r(560))/1*(parseInt(r(484))/2)+-parseInt(r(512))/3*(parseInt(r(568))/4)+parseInt(r(562))/5+-parseInt(r(485))/6*(parseInt(r(507))/7)+-parseInt(r(553))/8+parseInt(r(566))/9+-parseInt(r(500))/10*(-parseInt(r(519))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ha);class la{static[ua(563)](){const e=ua;la[e(516)]={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(let t in la.types)la[e(516)][e(557)](t)&&(la[e(516)][t]=[t[e(545)](0),t.charCodeAt(1),t[e(545)](2),t[e(545)](3)]);let t=la.constants={};t[e(490)]=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),t[e(514)]=new Uint8Array([0,0,0,0,0,0,0,1]),t.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),t[e(486)]=t.STCO=t[e(552)],t[e(547)]=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),t.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),t[e(492)]=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),t[e(506)]=new Uint8Array([0,0,0,0,0,0,0,0]),t[e(531)]=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static[ua(539)](e){const t=ua;let r=8,n=null,i=Array[t(537)][t(488)][t(558)](arguments,1),s=i[t(495)];for(let e=0;e>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r,n[t(522)](e,4);let o=8;for(let e=0;e>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static[ua(494)](e){const t=ua;return la[t(539)](la[t(516)][t(494)],la[t(549)](e),la[t(525)](e))}static tkhd(e){const t=ua;let r=e.id,n=e[t(504)],i=e.presentWidth,s=e.presentHeight;return la.box(la.types[t(549)],new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,255&i,0,0,s>>>8&255,255&s,0,0]))}static[ua(525)](e){const t=ua;return la[t(539)](la[t(516)][t(525)],la.mdhd(e),la.hdlr(e),la.minf(e))}static[ua(550)](e){const t=ua;let r=e[t(554)],n=e[t(504)];return la.box(la.types[t(550)],new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]))}static[ua(517)](e){const t=ua;let r=null;return r=e.type===t(569)?la[t(501)].HDLR_AUDIO:la[t(501)][t(515)],la.box(la[t(516)].hdlr,r)}static[ua(540)](e){const t=ua;let r=null;return r="audio"===e[t(510)]?la[t(539)](la.types[t(521)],la[t(501)][t(506)]):la[t(539)](la[t(516)][t(570)],la[t(501)].VMHD),la.box(la[t(516)][t(540)],r,la.dinf(),la[t(533)](e))}static[ua(513)](){const e=ua;return la[e(539)](la.types[e(513)],la[e(539)](la[e(516)][e(509)],la[e(501)][e(492)]))}static[ua(533)](e){const t=ua;return la[t(539)](la[t(516)][t(533)],la[t(551)](e),la[t(539)](la[t(516)][t(535)],la[t(501)][t(552)]),la[t(539)](la.types.stsc,la[t(501)][t(486)]),la[t(539)](la[t(516)][t(530)],la[t(501)][t(547)]),la[t(539)](la[t(516)][t(538)],la[t(501)][t(520)]))}static[ua(551)](e){const t=ua;return e[t(510)]===t(569)?e.audioType===t(496)?la.box(la[t(516)].stsd,la[t(501)][t(514)],la.mp3(e)):la[t(539)](la[t(516)].stsd,la.constants[t(514)],la.mp4a(e)):"avc"===e.videoType?la[t(539)](la[t(516)].stsd,la[t(501)][t(514)],la.avc1(e)):la[t(539)](la[t(516)].stsd,la[t(501)][t(514)],la.hvc1(e))}static mp3(e){const t=ua;let r=e[t(524)],n=e[t(543)],i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return la[t(539)](la[t(516)][t(559)],i)}static[ua(508)](e){const t=ua;let r=e[t(524)],n=e[t(543)],i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return la[t(539)](la[t(516)][t(508)],i,la[t(502)](e))}static[ua(502)](e){const t=ua;let r=e.config||[],n=r[t(495)],i=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5][t(565)]([n]).concat(r)[t(565)]([6,1,2]));return la[t(539)](la[t(516)][t(502)],i)}static[ua(541)](e){const t=ua;let r=e[t(561)];const n=e.codecWidth,i=e.codecHeight;let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return la.box(la[t(516)].avc1,s,la[t(539)](la.types[t(544)],r))}static hvc1(e){const t=ua;let r=e.avcc;const n=e[t(487)],i=e[t(499)];let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return la[t(539)](la[t(516)][t(518)],s,la[t(539)](la[t(516)][t(556)],r))}static mvex(e){const t=ua;return la.box(la[t(516)][t(528)],la[t(532)](e))}static[ua(532)](e){const t=ua;let r=e.id,n=new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return la.box(la[t(516)][t(532)],n)}static[ua(498)](e,t){const r=ua;return la.box(la.types[r(498)],la[r(497)](e[r(564)]),la.traf(e,t))}static[ua(497)](e){const t=ua;let r=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return la[t(539)](la[t(516)][t(497)],r)}static[ua(503)](e,t){const r=ua;let n=e.id,i=la[r(539)](la[r(516)].tfhd,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),s=la[r(539)](la.types[r(505)],new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),o=la[r(555)](e),a=la[r(526)](e,o[r(527)]+16+16+8+16+8+8);return la.box(la[r(516)].traf,i,s,a,o)}static[ua(555)](e){const t=ua;let r=new Uint8Array(5),n=e[t(511)];return r[4]=n.isLeading<<6|n.dependsOn<<4|n.isDependedOn<<2|n[t(548)],la[t(539)](la[t(516)][t(555)],r)}static trun(e,t){const r=ua;let n=new Uint8Array(28);t+=36,n[r(522)]([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let i=e.duration,s=e[r(523)],o=e.flags,a=e[r(534)];return n.set([i>>>24&255,i>>>16&255,i>>>8&255,255&i,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o[r(546)]<<2|o[r(493)],o[r(529)]<<6|o.hasRedundancy<<4|o[r(489)],0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12),la[r(539)](la[r(516)][r(526)],n)}static[ua(567)](e){const t=ua;return la[t(539)](la[t(516)][t(567)],e)}}function da(e,t){const r=ha();return(da=function(e,t){return r[e-=484]})(e,t)}function ha(){const e=["minf","avc1","mvhd","audioSampleRate","avcC","charCodeAt","isLeading","STSZ","hasRedundancy","tkhd","mdhd","stsd","STTS","136416eJAtax","timescale","sdtp","hvcC","hasOwnProperty","call",".mp3","13GhLnsm","avcc","3847750oUOcri","init","sequenceNumber","concat","7681932MkUJvo","mdat","168812AOLCnC","audio","vmhd","118934PIojjt","636246EHqxlg","STSC","codecWidth","slice","isNonSync","FTYP","moov","DREF","dependsOn","trak","length","mp3","mfhd","moof","codecHeight","1640taDDEh","constants","esds","traf","duration","tfdt","SMHD","7CyyJtd","mp4a","dref","type","flags","51OAKbeS","dinf","STSD_PREFIX","HDLR_VIDEO","types","hdlr","hvc1","47630zwKPkc","STCO","smhd","set","size","channelCount","mdia","trun","byteLength","mvex","isDependedOn","stsz","VMHD","trex","stbl","cts","stts","ftyp","prototype","stco","box"];return(ha=function(){return e})()}la[ua(563)]();var fa=pa;function pa(e,t){var r=ma();return(pa=function(e,t){return r[e-=424]})(e,t)}function ma(){var e=["969761zJCtPy","4136010dHiRez","399837cvgJfq","exports","__esModule","10EhKMRy","4RyEZPx","4MzEwjn","unwrapExports","defineProperty","476057batLeG","10825265NVCXuZ","70vZdEli","104XDvwuE","createCommonjsModule","126864sVCpNt","180aHIYRT","default","963804GAqsPm"];return(ma=function(){return e})()}!function(e,t){for(var r=pa,n=e();;)try{if(889839===parseInt(r(438))/1+-parseInt(r(435))/2*(-parseInt(r(430))/3)+-parseInt(r(434))/4*(-parseInt(r(429))/5)+-parseInt(r(427))/6*(-parseInt(r(440))/7)+parseInt(r(441))/8*(-parseInt(r(424))/9)+parseInt(r(433))/10*(-parseInt(r(439))/11)+-parseInt(r(425))/12*(parseInt(r(428))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ma);var va=ze[fa(442)]((function(e){var t=fa;e[t(431)]=function(e,t,r){return t in e?Object[pa(437)](e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e[t(431)][t(432)]=!0,e[t(431)][t(426)]=e[t(431)]}));function ya(){const e=["mp3","364666xuZJbc","30460JApJZh","428FLqcRH","length","Invalid MP3 packet, first byte != 0xFF ","239850huKhkc","1618554TeRmYj","407duoawr","buffer","659540PyvWsa","data","4926oblsRj","object_type","2504gXZHcJ","1bPsHGz","5391gNGcbG","channel_count","error"];return(ya=function(){return e})()}ze[fa(436)](va),function(e,t){const r=Ia,n=e();for(;;)try{if(142085===parseInt(r(305))/1*(-parseInt(r(291))/2)+parseInt(r(302))/3*(parseInt(r(293))/4)+parseInt(r(296))/5+parseInt(r(297))/6+-parseInt(r(300))/7+-parseInt(r(304))/8*(parseInt(r(306))/9)+-parseInt(r(292))/10*(-parseInt(r(298))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ya);const ga=[44100,48e3,32e3,0],_a=[22050,24e3,16e3,0],wa=[11025,12e3,8e3,0],ba=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],Sa=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],Ea=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1];function Ia(e,t){const r=ya();return(Ia=function(e,t){return r[e-=289]})(e,t)}function ka(e){const t=Ia;if(e[t(294)]<4)return void console[t(289)]("Invalid MP3 packet, header missing!");let r=new Uint8Array(e[t(299)]),n=null;if(255!==r[0])return void console[t(289)](t(295));let i=r[1]>>>3&3,s=(6&r[1])>>1,o=(240&r[2])>>>4,a=(12&r[2])>>>2,c=3!==(r[3]>>>6&3)?2:1,u=0,l=0;switch(i){case 0:u=wa[a];break;case 2:u=_a[a];break;case 3:u=ga[a]}switch(s){case 1:o=e[s]&&t=6?(i=5,r=new Array(4),a=s-3):(i=2,r=new Array(2),a=s):-1!==c.indexOf(t(382))?(i=2,r=new Array(2),a=s):(i=5,a=s,r=new Array(4),s>=6?a=s-3:1===o&&(i=2,r=new Array(2),a=s)),r[0]=i<<3,r[0]|=(15&s)>>>1,r[1]=(15&s)<<7,r[1]|=(15&o)<<3,5===i&&(r[1]|=(15&a)>>>1,r[2]=(1&a)<<7,r[2]|=8,r[3]=0),this.config=r,this[t(405)]=Ma[s],this[t(391)]=s,this[t(418)]=o,this[t(378)]=i,this[t(402)]=n,this[t(379)]="mp4a.40."+i,this[t(383)]=t(376)+n}}const Ra=La;function La(e,t){const r=za();return(La=function(e,t){return r[e-=299]})(e,t)}!function(e,t){const r=La,n=e();for(;;)try{if(955224===parseInt(r(303))/1*(parseInt(r(314))/2)+-parseInt(r(302))/3*(parseInt(r(301))/4)+-parseInt(r(318))/5+parseInt(r(309))/6*(-parseInt(r(300))/7)+-parseInt(r(307))/8+-parseInt(r(315))/9*(-parseInt(r(320))/10)+parseInt(r(308))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(za);class Oa{constructor(e){const t=La;this[t(319)]=e,this[t(305)]=0,this.bitLength=8*e.byteLength}get bitsAvailable(){const e=La;return this[e(299)]-this[e(305)]}[Ra(316)](e){const t=Ra;if(this.bitsAvailable1&&void 0!==arguments[1])||arguments[1];return this[Ra(311)](e,this.index,t)}[Ra(311)](e,t){const r=Ra;let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this.bitsAvailable>>i,o=8-i;if(o>=e)return n&&(this[r(305)]+=e),s>>o-e;{n&&(this.index+=o);const i=e-o;return s<>>1:-1*(e>>>1)}readBoolean(){return 1===this[Ra(312)](1)}[Ra(306)](){let e=arguments[Ra(310)]>0&&void 0!==arguments[0]?arguments[0]:1;return this.readBits(8*e)}readUShort(){return this[Ra(312)](16)}readUInt(){return this[Ra(312)](32)}}function za(){const e=["skipLZ","index","readUByte","1347952sFLXHg","33341759KTJkST","6208122lNfkfx","length","getBits","readBits","skipUEG","139874ibLtRg","38349kbBiSn","skipBits","readUEG","5853805yfsLNx","data","1030vKoHQW","bitLength","7vXqUvn","4596ztxxoM","1098vrBVCU","4wmtpIb"];return(za=function(){return e})()}function Na(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}!function(e,t){for(var r=Za,n=e();;)try{if(801098===-parseInt(r(363))/1*(-parseInt(r(348))/2)+parseInt(r(342))/3*(-parseInt(r(356))/4)+parseInt(r(357))/5*(-parseInt(r(349))/6)+parseInt(r(361))/7+parseInt(r(345))/8*(parseInt(r(344))/9)+parseInt(r(346))/10+-parseInt(r(343))/11*(parseInt(r(355))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ja);const Ha=new Array(214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72),ja=new Array(2746333894,1453994832,1736282519,2993693404),Va=new Array(462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257);function Wa(e,t,r,n,i){var s=Za,o=i;o=t+i>e[s(352)]&&n+i<=r[s(352)]?e[s(352)]-t:n+i>r[s(352)]&&t+i<=e[s(352)]?r[s(352)]-n:t+i<=e[s(352)]&&n+i<=r[s(352)]?i:r[s(352)]>24&255,e>>16&255,e>>8&255,255&e)}function Ga(e,t){var r=Za;return t+3>>19)^(n<<23|n>>>9)}function Ka(e,t){var r=new Array(36);r[0]=Ga(t,0),r[1]=Ga(t,4),r[2]=Ga(t,8),r[3]=Ga(t,12);for(var n=0;n<32;n++)r[n+4]=r[n]^Xa(r[n+1]^r[n+2]^r[n+3]^e[n]);var i=new Array(4);for(n=35;n>=32;n--)i[35-n]=r[n];return function(e){for(var t=Za,r=new Array(4*e[t(352)]),n=0;n>>30)^(n<<10|n>>>22)^(n<<18|n>>>14)^(n<<24|n>>>8)}function Ja(){var e=["5141538tNlnBB","sm4 key is error!","data is error!","length","ceil","iv is error!","96528nPPsKk","2636iAfPsL","5clCoea","min","slice","log","4384471JCoYlz","includes","21173MxWTmi","cipher is error!","900eMvyIC","1947kZcpBk","6532173wMcoIc","8DsDIlA","14403800aMNRfd","byteLength","46DhnuHO"];return(Ja=function(){return e})()}function Za(e,t){var r=Ja();return(Za=function(e,t){return r[e-=342]})(e,t)}function Qa(e,t,r){var n=Za;if(null==e||null==e||e[n(352)]%16!=0)return console[n(360)]("sm4 key is error!"),null;if(null==r||null==r||r[n(352)]<=0)return console.log(n(364)),null;if(null==t||null==t||t[n(352)]%16!=0)return console.log(n(354)),null;for(var i=qa(e),s=Math[n(353)](r[n(352)]/16),o=new Array(r.length),a=t.slice(),c=0;c3&&void 0!==arguments[3]&&arguments[3],s=arguments[n(352)]>4&&void 0!==arguments[4]&&arguments[4];t=new Uint8Array(t),r=new Uint8Array(r);const o=e[n(347)];let a=5;for(;ao)break;let u=e[a+4],l=!1,d=2;if(i?(s&&(d=3),u=u>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(362)](u)):(u&=31,l=1===u||5===u),l){const i=Qa(t,r,e[n(359)](a+4+d,a+4+c));e.set(i,a+4+d)}a=a+4+c}return e}const tc=nc;function rc(){const e=[", new height is ",";codecs=","updating","handleVideoFrames","5361550UfafHw","kSliceSEI","mseDecoder.mediaSourceAppendBufferError is true","streamVbps","audioSampleRateIndex","headers","codec","delta","videoSourceBuffer updateend and hasPendingEos is true, next endOfStream()","updateConfig","startTimestamp","isWorkerFetch","audio","readNextAACFrame","onOffscreenCanvasWebglContextRestored","startStreamRateAndStatsInterval",",\n new width is ","sync_offset","bit_depth","handleSectionSlice","mediaSourceAppendBufferFull","discontinuity_indicator","Audio: Audio Codecs changed from ","ended","fetchStream, WebsocketStream socket open","has_audio_"," and bufferlist is ","isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio","writableStream","sync_byte = "," ant auto wasm decode","hasAudioInit","video_track_","transferToImageBitmap","write","isPlaybackPause","has_video_"," and delay is ","isPlayUseMSE","stopId","render","getDelayNotUpdateDelay","isMpeg4","videoCodec","subarray","streamAudioFps","dropBuffer$2","getStreamBufferLength","301492cpnHuH","mseWidthOrHeightChange","updatePlaybackIsPause","dispatchPESPrivateDataDescriptor","playbackTF","decodeVideo is max diff , ts is ","decodeVideo() and decoder is destroyed","audioMeta"," , payload is "," isIFrame is ","decodeVideo and payload is too small , payload length is ","ac3","handlePESSlice: packet_start_code_prefix should be 1 but with value ","AAC: Unknown pts","TAG_NAME","audioTrackId","onmessage:","_initAudioSourceBuffer","isNakedFlow","aacSequenceHeader","details","extractH264SEI","findSei","mediaSourceBufferError","streamVideoType","Opus","mediaSourceAudioG711NotSupport","kSliceNonIDR","timed_id3_pids","parsedOffset",",\n diff is ","socket is not open and state is","timeInit set false , cacheTrack = {} now dts is ","HEAPU32","decodeAudio first frame is not iFrame","length"," next data type is ","audioSampleRate","complete","meta","decodeVideo dts is equal to prev dts and payload size is equal to prev payload size so drop this frame","hasVideo","refSampleDuration","demuxFlv() isVideoSequenceHeader is true and isHevc is "," and prevPayloadBufferSize is ","AC3: Bit Stream Identification changed from ","AC3: Channel Mode changed from "," _opt.sampleRate is ","isRecordTypeFlv","mseSourceBufferError","firstRenderTime","AAC: SamplingFrequencyIndex changed from ","scriptData","demuxM7s() type is video and arrayBuffer length is ","min","getUint32","delay","level"," is not H264 or H265","offset","onReady","isFirstDispatch and tsPacketSize = ","supportVideoFrameCallbackHandle","_decodeVideo","findSecondStartCode","seqHeader","prevPayloadBufferSize","pushBuffer video and isIFrame is ","useSIMD","removeEventListener","firstRenderTime is ","mediaSourceAudioInitTimeout","cacheTrack","VideoDecoder configure has not init , isIframe is ","doPlaybackCacheLoop() and isPlaybackOnlyDecodeIFrame is true and isIFrame is true, and ts is","expected_length","parsePES: packet_start_code_prefix should be 1 but with value ","endOfStream() error","remove","program_number","AC3: Low Frequency Effects Channel On changed from ","isPlayVod","lastBuf","pushBuffer, isDropSameTimestampGop is true and\n hasIframe is ",",\n firstAudioTime is ","mp3","hev","networkDelay",", height is ",",and old bufferList length is ","request abort and run res.body.cancel()","read","dispatchVideoInitSegment","then","demuxFlv() type is ","current_pmt_pid_","getDelay() and preDelayTimestamp is "," and ignore","mdat","units","PACKET_TYPE_FRAMES","ref_frames","aac","errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is ","pushBuffer,\n preTimestamp is ","decodeVideo first frame is not iFrame","AAC: Detected pts overlapped, ","fetchStream, url is ","decodeAudio and has already initialized and payload is aac codec packet so drop this frame"," and\n ts is ","sampling_index"," and\n payloadBufferSize is ","streamRate","mediaSourceError","pendingAudioRemoveRanges","some","opt","ID3 ",", syncOffset = ","useMSE","vps","demuxMpeg4","samples"," ms","detectVideoMetadataChange","tsPacketSize","decode data type is ","streamType","LOG_NAME","isInitSegmentDispatched","websocket"," > ",", dts=","getAudioBufferLength","hasIncompleteData","object_type","localDts","_clearAudioNoDataCheckTimeout","type","playbackFps","\n decodeVideo dts is less than(or equal) prev dts ,\n dts is ","parseChunks"," and notDroppingDelayTs is ","parseMP3Payload","BIG_ENDIAN","extractNALu() buffer error",", height: ","mseDecoder.audioSourceBuffer.appendBuffer()",", pts=","decodeAudio","h265","sps","playbackCacheLoop sync frame duration is ","FT_KEY","fileStart","_bindMediaSourceEvents","dispatchAudioInitSegment","abortSourceBuffer","getAudioSourceBufferUpdating","originalCodec","calcNetworkDelay, dts is ","idle","g711a","getIncompleteData","_doAppendSegments() audioSourceBuffer is null and need init audio source buffer","isEmitSEI","sort","fetchStream, WebsocketStream on error and isDestroyed is true, so return","kH264","loas_aac","onOffscreenCanvasWebglContextLost","width is "," package length is ","mp4Box onError","isFmp4","endOfStream","pushBuffer(), pushLatestDelay is ","fetchErrorWorker","playType","common_pids","debugWarn"," is not corresponded to PMT!","closeEnd","closed","websocket user aborted","needClear","_doAppendSegments() sourceBuffer is null and wait init and return"," create uint8Array error :","198843RCygdt","vcl","codecWidth","parseSPS","isPause","_decodeAudioConfigurationRecord audio codec is not support , codecId is ","sourceClose","debug","audio_metadata_","audio_init_segment_dispatched_","parseVPS","kSlicePPS",",\n and prevPayloadBufferSize is ","parseSPS$2","decodeVideo and payload is video sequence header so drop this frame","dispatch","VANC","pid","mseUpdateVideoTimestamp","fetch().catch() and abortController.signal.aborted is true so return","open","kEAC3","isPlayback","onSamples","fetch done","videoTracks","_doRemoveRanges() audioSourceBuffer error"," and prevTs is ","mediaSource is end","decodeVideo: video width or height is changed, and return","isFlv","sampling_rate","isTs","clearSlices","sample_rate"," ,\n and now ts is ","streamSuccess","firstTimestamp","getTime"," , message is ","byteLength","data","AbortError","tempStream","needInitAudio","ac-3","isPlayer","isAudioInitInfo","_decodeAudioConfigurationRecord","code is ","fetch().catch() and e.name is AbortError so return","state","_opt","sampling_freq_index","sequenceHeader","videoType","pushBuffer video ts is ","ms and return ","handleOffscreenCanvasWebglContextLost, stencil is false","parseSCTE35"," and ok is ","h264","pid_stream_type","slices","setCodecAudio: audioDecoder or audioDecoder.setCodec is null","audioSourceBuffer updateend and hasPendingEos is true, next endOfStream()",",\n and mseCorrectTimeDuration is ","dropBuffer$2() iFrameIndex is "," and opt is","kMPEG1Audio"," cacheTrack dts is "," and return","initAudio","wcsDecodeAudio","_doDecodeVideo","pushBuffer","cacheAudioTrack",",\n and emit change event","mediaSourceAppendBufferError",",local diff is "," and isVideoAndNextAudio is ","options","onMediaSourceSourceOpen() audioSourceBuffer is null and next init"," and preTsDuration is ","clearBuffer,bufferList length is ","codedWidth","hasIframeInBufferList"," and emit error and next abort()","video","debugError","demuxFlv","handleVideoNalu","payload_unit_start_indicator","MP3","synchronous_klv_pids","sm4CryptoKey","setExtractionOptions","videoSEI","size","23337MNwQXs","Generated first AVCDecoderConfigurationRecord for mimeType: ","decodeVideo has not init , isIframe is ","init"," and payload size is ","VideoDecoder","checkFirstIFrame","prevAudioTs","workerEnd"," ,new bufferList is ","detectAudioMetadataChange"," and forOldVersion is ","setCodecAudio: hasInitAudioCodec is false, codecId is ","codec_mimetype","cryptoKey","offscreenCanvasCtx","webglcontextlost","smpte2038_pids","debugLog","timeInit"," and isIframe is ","websocketOpen","aborted","decodeVideo","parseSection","decodeDiffTimestamp","present_size","streamVideoFps","VideoDecoder configure error","kSliceCRA_NUT","AAC"," less than (or equal) preTs is ","isM7sCrypto","pcmData, decoder is destroyed and return","AAC: AudioObjectType changed from ","cts","mediaSourceTsIsMaxDiff","body"," more than ","video_metadata_changed_","kLOASAAC","close() and writableStream.close() error","offscreenCanvas","appendAudioBuffer"," and has iIframe and next decoder.dropBuffer$2()","getDelay","video_metadata_","toString","sarNum","timescale_","mseAutoCleanupSourceBuffer","dispatchAudioVideoMediaSegment","getHandle","mseCorrectTimeDuration","presentHeight","decoder","concat","audioSequenceNumber","setCodec","sampling_frequency",", bufferList is ","setCodecVideo","parsePES","mp4Box","mseAutoCleanupMinBackwardDuration","adts_aac","sequenceNumber","$video","useOffscreen"," less than bufferStartDts is ","1039087AbleMd","forEach","extractNALu$3","audioCode","hasPendingEos","fetchNext().then() and requestAbort is true so return","playbackCacheBeforeDecodeForFpsRender, calc streamVideoFps is ","message","decodeNext","_hasPendingSegments","addEventListener","arraybuffer","audioSourceBufferCheckTimeout","dts","onError","value","firstStartCodeOffset","version_number",",\n new width is ","send","removeUsedSamples","fromCharCode",", diff is ","ms and return -1","presentWidth","mediaSource","isAAC","mediaSourceFull","map","kSliceIDR","width: ","clearBuffer","extractH265PPS","handleVideoH265Nalu","_preDoDecode","demuxFlv() type is audio and payload.byteLength is ","isCryptoAudio","appendBuffer","stringify","videoCode","current_program_","section_slice_queues_"," is not corresponded to PAT!",", stream_id=","readUEG","parseSynchronousKLVMetadataPayload","nearest_pts","pipeTo"," and prev ts is ","isXorCrypto"," to ","from","player","stream_type","isPlaybackOnlyDecodeIFrame","undefined","isKeyframe","avcc","_initAudioSourceBuffer and mseDecoder.isStateOpen is ","config","_doAppendSegments() mediaSource is closed or ended and return","ALAW","kADTSAAC","_onMediaSourceSourceOpen","worker nakedFlow","fetchStream, WebsocketStream socket close and code is ","options:","listenMp4Box","mpeg","dispatchVideoMediaSegment","handle","MediaSource","total_length","KLVA","_clearAudioSourceBufferCheckTimeout","onerror","playAudio","videoDecode","networkDelayTimeout","mediaSourceH265NotSupport","audioCodec","buffer","refFrames","updateend","_doRemoveRanges() sourceBuffer error","stream_id","SMPTE 2038 Metadata: pid=","Synchronous KLV Metadata: pid=","writableStream abort() and abortController.signal.aborted is true so return","Generated first AudioSpecificConfig for mimeType: ","url","parseAsynchronousKLVMetadataPayload","cryptoPayload","payload","fetchError","initVideo","reduce",",nalu type is ","first_parse_","avcC","isStateOpen","nakedFlowFps","key","len","isVideoInited"," ts is ","mseDecodeAudio","ts_packet_size","demuxNakedFlow","kPESPrivateData","decodeVideo\n local dts is < 0 , ts is ","yuvData, isVideoFirstIFrame is false and return","close() and videoDecoder.clear error: ","handleOffscreenCanvasWebglContextLost and next try to create webgl","readyState","Jb pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng","isHevc"," and next dropBuffer","webglcontextrestored","findFirstStartCode","_stopCheckWsOpenTimeout","playbackConfig","setCodecVideo: videoDecoder or videoDecoder.setCodec is null"," and prev dts is ","_doDecodeAudio","isStateEnded","catch","correctSamplePts","Opus: Channel count changed from ","demuxFlv() type is video and payload.byteLength is ","hvcC","moof","set","streamEndInner","cmd","isEmitInfo","mseDecoderUseWorker","Not Supported Opus channel count.","parseEAC3Payload","mediaSourceDecoderConfigurationError","_decodeVideo payload bytes is 0 and return","removeSourceBuffer() sourceBuffer error"," > maxDelay ","bit_stream_identification","mediaSourceAddSourceBufferError","fetchStream","original_object_type","PACKET_TYPE_FRAMESX",", start dts is ","channel_config",", preTs is ","fetchStatus","emitError","kAC3","fetchStream, WebsocketStream socket close abnormally and code is ","handleVideoH264NaluList list size is ","mseFirstRenderTime","destroy","findIndex","handleVideoH264Frames","handleAddNaluStartCode","mediaSource video sourceBuffer error"," and height is ",", options.ts is ","mp4","Generated first HEVCDecoderConfigurationRecord for mimeType: ","currentTime","sar_ratio","pes_slice_queues_","ts is ","fetchNext().then() and abortController.signal.aborted is true so return","G711A","isTrusted","parseOpusPayload","duration_","fps_num","hasInit","events"," and bufferList length is ","_doRemoveRanges","abort","mseWorkerAddSourceBufferError","pushLatestDelay","level_string","lastBuffer","nakedFlowDemuxUseNew","codecHeight","audio_last_sample_pts_","AudioDecoder","prevTs","pendingRemoveRanges","buffered","isDestroyed","offscreenCanvasGL","abort catch","MP3: AudioObjectType changed from ","pushBuffer() and isIFrame is ","ms and diffFps is ","checkStreamEnd","dropping",", not 0x47","Video: Coded Resolution changed from ",", old height is ","websocketError","Client disconnecting","kMPEG2Audio","videoBufferDelay","channel_mode",", isAacCodecPacket is true","bit_stream_mode","VideoEncoder","program_pmt_pid","onmessage","flvScriptData","pushBuffer audio ts is ","sampleRate","shift","G711U","isM7sCrypto cryptoKey.length is ","readBits","playbackRate","worker mpeg4Demuxer","setCodecAudio","eac3","doDecode","kSCTE35","preDelayTimestamp","parseVideo264Header","abortSourceBuffer() abort audioSourceBuffer","generateInitSegment","streamDts","demuxFmp4","removeSourceBuffer","mp4a.40.","isPlayUseMSEAndDecoderInWorker","slice","hasInitVideoCodec","audioMimeType","_isEnhancedH265Header","timescale","stencil"," and update next dts increase 5ms","10UvSxLe"," > timestamp is ","pat_","is_sync","prevTimestamp","loop() do not decode and delay is ","channelCount","buffering","cryptoPayloadAudio"," null","getNotDroppingDelayTs","mseCorrectAudioTimeDuration","scte_35_pids","sarDen","close","pendingSegments","secondStartCodeOffset","worker fmp4Demuxer","worker","streamStats","resetAllDelay","prevDts","prevAudioDts","isSm4CryptoH265V2","draw, decoder is destroyed and return","loop() is dropping = false, is iFrame","demux() isIFrame is false and unit type is IDR and update to true","ec-3","emitPESSlices","error"," and decoder.delay is ","yuvData, transferToImageBitmap error is","ms, PES pts: ","handlePESSlice","end","JbPro Worker Version is ","width","close() and audioDecoder.clear error: ","signal","videoTrackId","_initSourceBuffer","assign","isSm4Crypto"," and isIFrame is ","string","_decodeVideo now time is ","codedHeight","isFirefox","audioTracks","hasAudio","start","fps","yuvData ts ","mseHandle","chroma_format_string","preventDefault","playback and playbackIsCacheBeforeDecodeForFpsRender is true","extractH265SEI","\n decodeAudio dts is less than(or equal) prev dts ,\n dts is "," and tempDelay is ","parsePPS","dispatch naluArray length is 0","channel_count","sourceended","isDecodeFirstIIframe","streamEnd","fetch response status is "," and has iFrame, set dropping is true"," or cryptoIV.length is ","decode","parsePAT: table_id ","Video: Codec mimeType changed from ","_remainingPacketData","_initAudioSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()","calcNetworkDelay now dts:","stop","onMediaSourceSourceOpen() sourceBuffer is null and next init","debugUuid","DataStream","now","handleVideoH264NaluList","webglObj",",\n and emit change event","audioSourceBuffer",", and set streamFps is 25","frameRate","handleVideoH264Nalu","decodeAudio, decoder is destroyed and return"," and nalUnitSize is ","calcNetworkDelay","videoMimeType","pcmData ts ","playbackCacheBeforeDecodeForFpsRender, bufferListLength is ","mseSourceBufferError mseDecoder.sourceBuffer"," and isDestroyed is true, so return","streamVideoType is null","MP3: SamplingFrequencyIndex changed from ","300088GHKHmt","syncOffset","playbackCacheLoop","1933062YiziYY","delete","audio_object_type","prefixSei","mseDecoder.mediaSourceAddSourceBufferError is true","videoSequenceHeader","writableStream abort() and e.name is AbortError so return","audioSourceNoDataCheckTimeout","mediaSourceAudioNoDataTimeout","kH265","\n isVideoSqeHeader is ","configure","parseVideo265Header","abortSourceBuffer() abort sourceBuffer","pmt_","entries"," and isNotPushDropping is ",", next dts: "," ,\n and diff is ","fetch","clear","createFile","visibility",", diff time is ","decodeAudio\n local dts is < 0 , ts is ","aac_last_incomplete_data_","status","parsePAT","isDropping","playbackForwardMaxRateDecodeIFrame","videoBuffer","sourceOpen","getNaluDts","_doAppendSegments","profile_string","audioBufferSize","\n maybe trigger black screen or flower screen\n ","parse","removeSourceBuffer() sourceBuffer","websocketOpenTimeout","getContext","code","isIFrame","sendWebsocketMessage, message is","H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment","getNearestTimestampMilliseconds","readNextNaluPayload","getBuildTime","eventListenList","getState","floor","isSendSeqHeader","supportMSEDecodeHevc","log","elementary_stream_priority_indicator","Parsed first PMT: "," so drop this frame","addSourceBuffer","getUint8","handleVideoH265NaluList list size is ","TAG","isAvc","loop() bufferList is empty and reset delay","pes_private_data_pids",", and ts is ","replace","mseDecoder.sourceBuffer.appendBuffer()","duration","writableStream abort() and e is ","stopStreamRateAndStatsInterval"," and is Trial Version[试用版本]","fps_den","dispatchAudioMediaSegment","extractNALu$2","low_frequency_effects_channel_on","video_init_segment_dispatched_","h265 naluList.length === 0","mimeType","_decodeEnhancedH265Video","parseAC3Payload","calcIframeIntervalTimestamp"," and prev time is ","suffixSei","videoNalu","doPlaybackCacheLoop","finally","getSourceBufferUpdating","chromaFormat","probe","MULAW","_checkTsIsMaxDiff","pendingAudioSegments","sendWebsocketMessage","isPushDropping","fetchNext().catch() and e is ","stbl","webgl","firstAudioTime","push","demuxTs","sarRatio",", dts is ","ceil","protocol",'fetchNext().then() and value "',"isDropSameTimestampGop","debugLevel","binaryType","_initAudioSourceBuffer() addSourceBuffer mseDecoder.mediaSource.addSourceBuffer()","workerFetch","fetch().catch() and e is ","hvcc","handleNALu"," ,\n and diff is ","useWCS","onopen","dropBuffer$2() isAllIframeInBufferList() is true, and index is ","notConnect","_hasPendingRemoveRanges","mdia"," and emit replay","decodeAudio() and decoder is destroyed","readUByte","isPlaybackCacheBeforeDecodeForFpsRender","getVideoBufferLength","last_pcr_","loas_previous_frame","clearPlaybackCacheLoop","fetchStream, WebsocketStream socket close and requestAbort is true so return","656DIBhGD","pts","s and status is ","_resetInIt","videoPayload","isStateClosed","onclose","fetchNext().catch() and abortController.signal.aborted is true so return",", isVideoSequenceHeader is true","decodeVideo: hasInitVideoCodec is false, codecId is ","HEAPU8","mp3Demuxer","_needCleanupSourceBuffer","loop() common dumex delay is -1 ,data.ts is","_initSourceBuffer and mseDecoder.isStateOpen is ","handleVideoH265Frames","openWebglAlignment","isXorCrypto cryptoKey.length is ","kMetadata","parseADTSAACPayload","mseSourceBufferError mseDecoder.audioSourceBuffer","file_position","AAC: Channel configuration changed from ","_doCleanUpSourceBuffer","onSamples() trackId error","videoInfo","isRecording","height","mediaSource audio sourceBuffer error","appendBuffer() player is destroyed","socketStatus","simdH264DecodeVideoWidthIsTooLarge","flvBufferData","isWidthOrHeightChanged","iFrame","Video: Present resolution width changed from ","pps",'" string so return',"parseG711Payload","audio_track_",'video/mp2t; codecs="',"Parsed first PAT: ","createImageBitmap","network_pid","worker TsLoaderV2","_decodeAudio","pcr_pid","random_access_indicator","streamAbps"," and mseDecoder.audioMimeType is ","codec_size","fetchNext().then() and done is true","name","g711u","mseDecoder.mediaSourceAppendBufferFull is true","program_pmt_map_","opus"," and,\n options.ts is ","audioDecode","keyFrame","isAllIframeInBufferList","playbackIsCacheBeforeDecodeForFpsRender","descriptor","websocketFirstMessage",'video/mp4; codecs="',"PACKET_TYPE_SEQ_START","setCodecVideo: SIMD H264 decode video width is too large, width is ","isfms","HEAPF32","streamFps"," ,delay is ","setCodecVideo: hasInitVideoCodec is false, codecId is ","isSm4Crypto opt.sm4CryptoKey is null","mseAutoCleanupMaxBackwardDuration","pendingUnits","renderYUV","loop() isPushDropping is true and bufferList length is ","parsePMT: table_id ","recordType",", bufferListLength is ","6MhNifO","cryptoIV","playbackIsPause","worker wcsDecoder","extractNALu","avc","mediaSource is not attached to video or mediaSource is closed","getDelayNotUpdateDelay() and preDelayTimestamp is ","parseH264Payload",", and ts list is ","sourceBuffer","abs","simdDecodeError"];return(rc=function(){return e})()}function nc(e,t){const r=rc();return(nc=function(e,t){return r[e-=413]})(e,t)}!function(e,t){const r=nc,n=e();for(;;)try{if(196590===-parseInt(r(710))/1+parseInt(r(922))/2*(parseInt(r(1175))/3)+-parseInt(r(987))/4*(-parseInt(r(613))/5)+parseInt(r(713))/6+parseInt(r(1344))/7+-parseInt(r(842))/8*(-parseInt(r(1274))/9)+-parseInt(r(939))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(rc),Date.now||(Date.now=function(){return(new Date).getTime()}),console.log(tc(648)+wt+":"+_t+tc(783));const ic=sc;function sc(e,t){const r=oc();return(sc=function(e,t){return r[e-=118]})(e,t)}function oc(){const e=["12355ErXWBj","2953899vbzudg","push","JbPro[❌❌❌][audio wasm]:","952579FskJkT","228jGhkiF","warn","6313188tiBPMM","1608BkPRuq","catch","2483352oaQSDD","11378976KbthqN","36490rJcAwm","toString","all"];return(oc=function(){return e})()}!function(e,t){const r=sc,n=e();for(;;)try{if(739688===parseInt(r(130))/1+-parseInt(r(123))/2*(-parseInt(r(131))/3)+parseInt(r(119))/4*(-parseInt(r(126))/5)+-parseInt(r(121))/6+parseInt(r(118))/7+-parseInt(r(122))/8+parseInt(r(127))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(oc);const ac=[];ac[ic(128)](o({printErr:function(e){const t=ic;(function(e){const t=ft;return!(!e||-1===e[t(410)]("not compiled with thread support")&&-1===e[t(410)](t(265))&&-1===e[t(410)](t(480))&&-1===e.indexOf(t(418)))})(e)||console[t(132)](t(129),e)}}),s({printErr:function(e){const t=ic;var r;(r=e)&&-1!==r[ft(410)]("not compiled with thread support, using thread emulation")||(console[t(132)]("JbPro[❌❌❌][video wasm]:",e),Ut(function(e){let t=!0;return e&&-1!==e.indexOf("failed to asynchronously prepare wasm")&&(t=!1),t}(e))&&postMessage({cmd:ae.notSupportNewWasm,value:e}))}})),Promise[ic(125)](ac).then((e=>{const t=e[0];!function(){const e=tc;let t=arguments[e(1022)]>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[e(1022)]>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[e(1022)]>2&&void 0!==arguments[2]&&arguments[2],i=arguments[e(1022)]>3&&void 0!==arguments[3]&&arguments[3],s=[],o=[],a=null,c=null,u=null,l=null,d=null,h=null,f=!1,p=null,m=null,v=!1,y=!1,g=!!Ft(n),_=0,w=0,b=!1,S=null,E=null,I=null,k=[],A=null,C=null,T=0,x=0,D=null,P=null,B=0,M=0,F=null,U=!1,R=!1,L=!1,O=null,N=null,H=!1,G=!0,q=0,Y=0,K=null,X=null,J=null,Z=()=>{const t=e,r=Bt();return{debug:r[t(1182)],debugLevel:r[t(819)],debugUuid:r[t(690)],useOffscreen:r[t(1342)],useWCS:r[t(827)],useMSE:r.useMSE,videoBuffer:r[t(743)],videoBufferDelay:r[t(577)],openWebglAlignment:r[t(858)],playType:r[t(1165)],hasAudio:r[t(662)],hasVideo:r[t(1028)],playbackRate:1,playVodRate:1,playbackFps:r[t(492)][t(664)],playbackDefaultFps:r[t(1126)],playbackAutoCalcFps:r[t(492)].autoCalcFps,playbackForwardMaxRateDecodeIFrame:r[t(742)],playbackIsCacheBeforeDecodeForFpsRender:r.playbackConfig.isCacheBeforeDecodeForFpsRender,sampleRate:0,networkDelay:r[t(1074)],visibility:!0,useSIMD:r[t(1055)],isRecording:!1,recordType:r[t(920)],isNakedFlow:r[t(1005)],checkFirstIFrame:r.checkFirstIFrame,audioBufferSize:1024,isM7sCrypto:r.isM7sCrypto,isCryptoAudio:r.isCryptoAudio,cryptoKey:r[t(1288)],cryptoIV:r[t(923)],isSm4Crypto:r[t(655)],isSm4CryptoH265V2:r[t(636)],sm4CryptoKey:r[t(1270)],isXorCrypto:r[t(420)],isHls265:!1,isFlv:r.isFlv,isFmp4:r[t(1161)],isMpeg4:r.isMpeg4,isTs:r[t(1207)],isEmitSEI:r[t(1152)],isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isFirefox:!1,isDropSameTimestampGop:r[t(818)],mseDecodeAudio:r[t(477)],wcsDecodeAudio:r[t(1248)],nakedFlowH265DemuxUseNew:r.nakedFlowH265DemuxUseNew,mseDecoderUseWorker:r.mseDecoderUseWorker,mseAutoCleanupSourceBuffer:r[t(1324)],mseAutoCleanupMaxBackwardDuration:r.mseAutoCleanupMaxBackwardDuration,mseAutoCleanupMinBackwardDuration:r[t(1338)],mseCorrectTimeDuration:r[t(1327)],mseCorrectAudioTimeDuration:r[t(624)],nakedFlowDemuxUseNew:r[t(556)],nakedFlowFps:r[t(472)],supportMSEDecodeHevc:!1,checkStreamEnd:!0,websocketOpenTimeout:r[t(752)]}};e(581)in self&&(a={TAG_NAME:e(925),hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:null,init(){const t=e;a.decoder=new VideoDecoder({output:function(e){const t=nc;if(kt(e[t(884)]))e[t(884)]().then((r=>{const n=t;a.offscreenCanvasCtx.drawImage(r,0,0,e[n(1260)],e[n(659)]);let i=a[n(1316)][n(972)]();postMessage({cmd:ae[n(979)],buffer:i,delay:Pe.delay,ts:0},[i]),Tt(e)}));else{a.offscreenCanvasCtx.drawImage(e,0,0,e[t(1260)],e.codedHeight);let r=a[t(1316)][t(972)]();postMessage({cmd:ae[t(979)],buffer:r,delay:Pe[t(1043)],ts:0},[r]),Tt(e)}},error:function(e){const t=nc;Pe[t(1264)](t(631),"VideoDecoder error: ",e,e[t(1321)]())}}),Pe[t(1292)](a[t(1001)],"init")},destroy(){const t=e;a.reset(),a[t(1329)]&&a[t(1329)][t(1226)]!==t(1170)&&(a.decoder[t(627)](),a.decoder=null),Pe[t(1292)](a[t(1001)],t(528))},decode:function(t,r,n){const i=e,s=t[0]>>4==1;if(a[i(547)]){const e=new EncodedVideoChunk({data:t[i(606)](5),timestamp:r,type:s?be[i(473)]:be[i(946)]});try{a[i(1329)][i(682)](e)}catch(e){}}else if(s&&t[1]===Ce[i(1229)]){const e=15&t[0];postMessage({cmd:ae[i(1383)],code:e});const r=new Uint8Array(t);postMessage({cmd:ae[i(982)],buffer:r,codecId:e},[r[i(452)]]);let n=null,s=null;const o=t[i(606)](5);if(e===ve[i(1236)]?(s=dr(o),n={codec:s.codec,description:o}):e===ve[i(1137)]&&(s=Hr(o),n={codec:s[i(945)],description:o}),!n||n&&!n.codec||s&&0===s[i(1177)]&&0===s.codecHeight)return void Pe.debugWarn(a[i(1001)],"decodeVideo and webcodecs configure is",JSON[i(1382)](n));s&&s[i(1177)]&&s[i(557)]&&(n[i(659)]=s[i(557)],n[i(1260)]=s[i(1177)]),!a[i(506)]&&(Pe[i(1292)]("worker","Webcodecs Video Decoder initSize"),postMessage({cmd:ae[i(466)],w:s[i(1177)],h:s[i(557)]}),a.isEmitInfo=!0,a.offscreenCanvas=new OffscreenCanvas(s[i(1177)],s.codecHeight),a[i(1289)]=a[i(1316)].getContext("2d")),Pe[i(1227)][i(920)],i(535);try{a[i(1329)][i(724)](n),a[i(547)]=!0}catch(e){Pe[i(1264)](i(631),i(1302),e.code,e,e[i(1321)]()),e[i(1321)]()}}else Pe[i(1167)]("worker",i(1060)+s+i(995)+t[1]+i(769))},reset(){const t=e;a[t(547)]=!1,a.isEmitInfo=!1,a[t(1316)]=null,a[t(1289)]=null}});let Q=function(){const t=e;if(H=!0,c)try{c[t(551)](),c=null,Pe[t(1292)](t(631),"abort success")}catch(e){c=null,Pe[t(1292)](t(631),t(565),e)}},se={TAG_NAME:e(435),init(){const t=e;se.lastBuf=null,se[t(1107)]=null,se[t(1138)]=null,se[t(878)]=null,se[t(1114)]=null,se[t(1123)]=0,se[t(916)]={},se[t(764)]=!1,Pe[t(1292)](se[t(1001)],t(1277))},destroy(){const t=e;se[t(1069)]=null,se[t(1107)]=null,se[t(1138)]=null,se[t(878)]=null,se[t(1114)]=null,se[t(1123)]=0,se[t(916)]={},se[t(764)]=!1,Pe[t(1292)](se[t(1001)],t(528))},dispatch(t){const r=e,n=new Uint8Array(t);if(Pe[r(1227)][r(556)]){const e=se[r(1346)](n);if(0===e[r(1022)])return void Pe[r(1292)](se[r(1001)],r(674));se[r(938)](e)}else se[r(786)](n)},getNaluDts(){const t=e,r=Pe[t(1227)].nakedFlowFps;let n=se[t(1123)];return se[t(1123)]=se.localDts+parseInt(1e3/r,10),n},getNaluAudioDts(){const t=e,r=Pe[t(1227)].sampleRate,n=Pe[t(1227)].audioBufferSize;return se[t(1123)]+parseInt(n/r*1e3)},extractNALu(t){const r=e;let n,i,s=0,o=t[r(1215)],a=0,c=[];for(;s1)for(let e=0;e{const t=r,n=vr(e);n===_e[t(878)]||n===_e[t(1138)]?se[t(699)](e):gr(n)&&i[t(811)](e)})),1===i[r(1022)])se[r(699)](i[0]);else if(wr(i)){const e=vr(i[0]),t=_r(e);se[r(693)](i,t,e)}else i[r(1345)]((e=>{se.handleVideoH264Nalu(e)}))}else if(se.streamType===ye[r(1137)])if(Pe[r(1227)].nakedFlowH265DemuxUseNew){const e=se[r(531)](t),n=se[r(926)](e);if(0===n[r(1022)])return void Pe.debugWarn(r(631),r(1266),r(789));const i=[];if(n[r(1345)]((e=>{const t=r,n=Gr(e);n===we[t(878)]||n===we[t(1138)]||n===we[t(1107)]?se[t(1377)](e):Kr(n)&&i[t(811)](e)})),1===i.length)se.handleVideoH265Nalu(i[0]);else if(Jr(i)){const e=Gr(i[0]),t=Xr(e);se.handleVideoH265NaluList(i,t,e)}else i[r(1345)]((e=>{se[r(1377)](e)}))}else Gr(t)===we.pps?se[r(1376)](t):se[r(1377)](t)},extractH264PPS(t){const r=e,n=se[r(531)](t);se[r(926)](n)[r(1345)]((e=>{const t=r;yr(vr(e))?se[t(1008)](e):se[t(699)](e)}))},extractH265PPS(t){const r=e,n=se.handleAddNaluStartCode(t);se[r(926)](n)[r(1345)]((e=>{const t=r;qr(Gr(e))?se[t(670)](e):se[t(1377)](e)}))},extractH264SEI(t){const r=e,n=se[r(531)](t);se.extractNALu(n)[r(1345)]((e=>{se.handleVideoH264Nalu(e)}))},extractH265SEI(t){const r=e,n=se[r(531)](t);se[r(926)](n)[r(1345)]((e=>{se[r(1377)](e)}))},handleAddNaluStartCode(t){const r=e,n=[0,0,0,1],i=new Uint8Array(t[r(1022)]+n[r(1022)]);return i[r(503)](n),i[r(503)](t,n[r(1022)]),i},handleVideoH264Nalu(t){const r=e,n=vr(t);switch(n){case _e[r(1138)]:se.sps=t;break;case _e.pps:se[r(878)]=t}if(se[r(764)]){if(se[r(1138)]&&se[r(878)]){const e=hr({sps:se.sps,pps:se[r(878)]}),t=se[r(1123)];Pe[r(682)](e,{type:ce.video,ts:t,isIFrame:!0,cts:0}),se[r(1138)]=null,se[r(878)]=null}if(gr(n)){const e=_r(n),i=se.getNaluDts(),s=pr(t,e);se[r(595)](s,{type:ce[r(1263)],ts:i,isIFrame:e,cts:0})}}else if(se[r(1138)]&&se[r(878)]){se[r(764)]=!0;const e=hr({sps:se.sps,pps:se[r(878)]});Pe[r(682)](e,{type:ce[r(1263)],ts:0,isIFrame:!0,cts:0}),se[r(1138)]=null,se[r(878)]=null}},handleVideoH264NaluList(t,r,n){const i=e;if(se[i(764)]){const e=se.getNaluDts(),s=mr(t.reduce(((e,t)=>{const r=i,n=ut(e),s=ut(t),o=new Uint8Array(n[r(1215)]+s[r(1215)]);return o[r(503)](n,0),o[r(503)](s,n.byteLength),o})),r);se[i(595)](s,{type:ce[i(1263)],ts:e,isIFrame:r,cts:0}),Pe.debugLog("worker",i(526)+t[i(1022)]+i(1159)+s.byteLength+i(996)+r+i(468)+n+i(814)+e)}},handleVideoH265Nalu(t){const r=e,n=Gr(t);switch(n){case we[r(1107)]:se.vps=t;break;case we[r(1138)]:se[r(1138)]=t;break;case we[r(878)]:se[r(878)]=t}if(se[r(764)]){if(se[r(1107)]&&se[r(1138)]&&se[r(878)]){const e=Vr({vps:se[r(1107)],sps:se[r(1138)],pps:se[r(878)]}),t=se[r(1123)];Pe.decode(e,{type:ce.video,ts:t,isIFrame:!0,cts:0}),se[r(1107)]=null,se[r(1138)]=null,se[r(878)]=null}if(Kr(n)){const e=Xr(n),i=se.getNaluDts(),s=Wr(t,e);se.doDecode(s,{type:ce[r(1263)],ts:i,isIFrame:e,cts:0})}}else if(se[r(1107)]&&se.sps&&se.pps){se.isSendSeqHeader=!0;const e=Vr({vps:se[r(1107)],sps:se.sps,pps:se[r(878)]});Pe.decode(e,{type:ce[r(1263)],ts:0,isIFrame:!0,cts:0}),se.vps=null,se[r(1138)]=null,se[r(878)]=null}},handleVideoH265NaluList(t,r,n){const i=e;if(se.isSendSeqHeader){const e=se[i(745)](),s=$r(t[i(467)](((e,t)=>{const r=i,n=ut(e),s=ut(t),o=new Uint8Array(n[r(1215)]+s[r(1215)]);return o[r(503)](n,0),o.set(s,n[r(1215)]),o})),r);se.doDecode(s,{type:ce[i(1263)],ts:e,isIFrame:r,cts:0}),Pe.debugLog("worker",i(772)+t[i(1022)]+" package length is "+s.byteLength+i(996)+r+i(468)+n+i(814)+e)}},doDecode(t,r){const n=e;Pe[n(702)](r.ts),r.isIFrame&&Pe[n(793)](r.ts),Pe[n(682)](t,r)},handleVideoFrames(t){const r=e;if(!se.streamVideoType)for(let e of t)if(se[r(1011)]=At(e),se[r(1011)])break;se[r(1011)]?se[r(1011)]===ye[r(1236)]?se[r(530)](t):se[r(1011)]===ye[r(1137)]&&se[r(857)](t):Pe[r(1167)](r(631),r(938),r(708))},handleVideoH264Frames(t){const r=e;let n=[],i=[],s=!1,o=!1;se[r(916)][r(1086)]&&(n=se[r(916)][r(1086)],o=se.pendingUnits.vcl,s=se[r(916)][r(876)],se[r(916)]={});let a={};for(let e of t){if(e[r(1215)]<4)continue;const t=vr(e);let c=!1,u=t===_e[r(1373)];(t===_e[r(1014)]||t===_e.kSliceIDR)&&(a=se[r(598)](e),c=!0),n[r(1022)]&&o&&(a[r(909)]||!c)&&(i[r(811)]({units:n,isIFrame:s}),n=[],s=!1,o=!1),n[r(811)](e),s=s||u,o=o||c}n[r(1022)]&&(se[r(916)]={units:n,vcl:o,iFrame:s}),i[r(1345)]((e=>{const t=r,n=e[t(1086)],i=e[t(755)];let s=null,o=null;if(n[t(1345)]((e=>{const r=t,n=31&e[0];switch(n){case _e[r(878)]:se[r(878)]=e;break;case _e[r(1138)]:se[r(1138)]=e;break;case _e[r(940)]:o=e}if(gr(n)){const t=ut(e);if(s){const e=new Uint8Array(s[r(1215)]+t[r(1215)]);e[r(503)](s,0),e[r(503)](t,s[r(1215)]),s=e}else s=t}})),!se[t(764)]&&se[t(1138)]&&se[t(878)]){se[t(764)]=!0;const e=fr({sps:se[t(1138)],pps:se[t(878)]});Pe[t(682)](e,{type:ce[t(1263)],ts:0,isIFrame:!0,cts:0}),se[t(1138)]=null,se[t(878)]=null}if(se[t(764)]){if(se[t(1138)]&&se[t(878)]){const e=fr({sps:se.sps,pps:se.pps}),r=se[t(1123)];Pe[t(682)](e,{type:ce[t(1263)],ts:r,isIFrame:!0,cts:0}),se.sps=null,se.pps=null}if(s){const e=se[t(745)](),r=mr(s,i);if(Pe[t(1227)].isEmitSEI&&o){const r=ct(o,!1);postMessage({cmd:ae[t(1272)],buffer:r[t(464)],ts:e},[r[t(464)][t(452)]])}se[t(595)](r,{type:ce[t(1263)],ts:e,isIFrame:i,cts:0})}}}))},handleVideoH265Frames(t){const r=e;let n=[],i=[],s=!1,o=!1;se.pendingUnits[r(1086)]&&(n=se[r(916)][r(1086)],o=se[r(916)][r(1176)],s=se[r(916)][r(876)],se.pendingUnits={});let a={};for(let e of t){if(e[r(1215)]<4)continue;const t=Gr(e);let c=!1,u=Xr(t);Kr(t)&&(a=se[r(725)](e),c=!0),n[r(1022)]&&o&&(a[r(909)]||!c)&&(i.push({units:n,isIFrame:s}),n=[],s=!1,o=!1),n.push(e),s=s||u,o=o||c}n.length&&(se[r(916)]={units:n,vcl:o,iFrame:s}),i[r(1345)]((e=>{const t=r,n=e.units,i=e[t(755)];let s=null,o=null;if(n[t(1345)]((e=>{const r=t,n=e[0]>>>1&63;switch(n){case we[r(878)]:se.pps=e;break;case we[r(1138)]:se[r(1138)]=e;break;case we[r(1107)]:se[r(1107)]=e;break;case we[r(795)]:case we[r(716)]:o=e}if(Kr(n)){const t=ut(e);if(s){const e=new Uint8Array(s.byteLength+t[r(1215)]);e[r(503)](s,0),e.set(t,s[r(1215)]),s=e}else s=t}})),!se[t(764)]&&se[t(1138)]&&se[t(878)]&&se.vps){se[t(764)]=!0;const e=Vr({sps:se.sps,pps:se[t(878)],vps:se[t(1107)]});Pe[t(682)](e,{type:ce[t(1263)],ts:0,isIFrame:!0,cts:0}),se[t(1138)]=null,se.pps=null,se.vps=null}if(se[t(764)]){if(se[t(1138)]&&se[t(878)]&&se.vps){const e=Vr({sps:se[t(1138)],pps:se[t(878)],vps:se[t(1107)]}),r=se[t(1123)];Pe[t(682)](e,{type:ce[t(1263)],ts:r,isIFrame:!0,cts:0}),se.sps=null,se.pps=null,se.vps=null}if(s){const e=se[t(745)](),r=$r(s,i);if(Pe._opt[t(1152)]&&o){const r=ct(o,!0);postMessage({cmd:ae.videoSEI,buffer:r.payload,ts:e},[r[t(464)][t(452)]])}se.doDecode(r,{type:ce.video,ts:e,isIFrame:i,cts:0})}}}))},handleVideoH265Frames_1(t){const r=e;t[r(1345)]((e=>{se[r(1266)](e)}))},parseVideo264Header(t){const r=e,n=new Oa(t);return n[r(835)](),{isfms:0===n[r(415)](),sType:n[r(415)]()}},parseVideo265Header(t){const r=e,n=new Oa(t);return n.readUByte(),{nalType:n[r(590)](6),isfms:0===n[r(590)](1),sType:n[r(590)](3)}}},oe={LOG_NAME:e(630),mp4Box:null,offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){const t=e;oe[t(1337)]=ho[t(734)](),oe[t(1337)][t(1047)]=oe[t(1047)],oe[t(1337)].onError=oe[t(1358)],oe[t(1337)][t(1198)]=oe[t(1198)],Pe.debugLog(oe[t(1115)],t(1277))},destroy(){const t=e;oe[t(1337)]&&(oe[t(1337)][t(688)](),oe[t(1337)].flush(),oe[t(1337)][t(528)](),oe[t(1337)]=null),oe.offset=0,oe[t(652)]=null,oe[t(1002)]=null,oe[t(487)]=!1,Pe[t(1292)](oe[t(1115)],t(528))},_getSeqHeader(t){const r=e,n=oe[r(1337)].getTrackById(t.id);for(const e of n[r(832)].minf[r(808)].stsd[r(728)])if(e[r(470)]||e[r(501)]){const t=new(ho[r(691)])(void 0,0,ho[r(691)][r(1131)]);let n=[];e.avcC?(e[r(470)][r(973)](t),n=[23,0,0,0,0]):(oe[r(487)]=!0,Pe[r(487)]=!0,e[r(501)][r(973)](t),n=[28,0,0,0,0]);const i=new Uint8Array(t[r(452)],8),s=new Uint8Array(n.length+i.length);return s[r(503)](n,0),s[r(503)](i,n[r(1022)]),s}return null},onReady(t){const r=e;Pe[r(1292)](oe[r(1115)],"onReady()");const n=t[r(1200)][0],i=t[r(661)][0];if(n){oe[r(652)]=n.id;const e=oe._getSeqHeader(n);e&&(Pe[r(1292)](oe[r(1115)],r(1052)),Pe[r(1297)](e,0,!0,0)),oe.mp4Box[r(1271)](n.id)}if(i&&Pe[r(1227)][r(662)]){oe[r(1002)]=i.id;const e=i.audio||{},t=Je.indexOf(e[r(1209)]),n=i[r(945)][r(778)](r(604),"");oe[r(1337)][r(1271)](i.id);const s=Ze({profile:parseInt(n,10),sampleRate:t,channel:e.channel_count});Pe[r(1292)](oe.LOG_NAME,"aacADTSHeader"),Pe[r(1136)](s,0)}oe[r(1337)][r(663)]()},onError(t){const r=e;Pe[r(1264)](oe.LOG_NAME,r(1160),t)},onSamples(t,r,n){const i=e;if(t===oe[i(652)]){for(const e of n){const t=e[i(1216)],r=e[i(616)],n=1e3*e.cts/e[i(610)];e[i(780)],e[i(610)],r&&Pe[i(793)](n);let s=null;s=oe[i(487)]?$r(t,r):mr(t,r),Pe.decode(s,{type:ce[i(1263)],ts:n,isIFrame:r,cts:0})}oe.mp4Box[i(1364)](t)}else if(t===oe[i(1002)]){if(Pe[i(1227)].hasAudio){for(const e of n){const t=e.data,r=1e3*e[i(1309)]/e[i(610)];e[i(780)],e[i(610)];const n=new Uint8Array(t[i(1215)]+2);n.set([175,1],0),n[i(503)](t,2),Pe.decode(n,{type:ce[i(951)],ts:r,isIFrame:!1,cts:0})}oe[i(1337)][i(1364)](t)}}else Pe.debugWarn(oe.LOG_NAME,i(866),t)},dispatch(t){const r=e;let n=new Uint8Array(t);n[r(452)][r(1141)]=oe[r(1046)],oe.offset+=n[r(1215)],oe.mp4Box[r(1381)](n[r(452)])}},he={LOG_NAME:e(592),lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:e(1277),hasInitVideoCodec:!1,localDts:0,dispatch(t){const r=e,n=new Uint8Array(t);he[r(926)](n)},destroy(){const t=e;he.lastBuffer=new Uint8Array(0),he.parsedOffset=0,he[t(1360)]=0,he[t(629)]=0,he.state="init",he.hasInitVideoCodec=!1,he[t(1123)]=0,Pe[t(1292)](he[t(1115)],t(528))},extractNALu(t){const r=e;if(!t||t[r(1215)]<1)return void Pe[r(1167)](he.LOG_NAME,r(1132),t);const n=new Uint8Array(he[r(555)].length+t.length);for(n.set(he.lastBuffer,0),n[r(503)](new Uint8Array(t),he[r(555)][r(1022)]),he[r(555)]=n;;){if(he[r(1226)]===r(1277)){let e=!1;for(;he[r(555)][r(1022)]-he[r(1016)]>=4;)if(0===he.lastBuffer[he.parsedOffset])if(0===he[r(555)][he[r(1016)]+1])if(1===he[r(555)][he[r(1016)]+2]){if(182===he[r(555)][he[r(1016)]+3]){he[r(1226)]=r(490),he.firstStartCodeOffset=he[r(1016)],he[r(1016)]+=4,e=!0;break}he.parsedOffset++}else he.parsedOffset++;else he[r(1016)]++;else he[r(1016)]++;if(e)continue;break}if("findFirstStartCode"===he[r(1226)]){let e=!1;for(;he.lastBuffer[r(1022)]-he[r(1016)]>=4;)if(0===he.lastBuffer[he[r(1016)]])if(0===he.lastBuffer[he[r(1016)]+1])if(1===he.lastBuffer[he.parsedOffset+2]){if(182===he[r(555)][he[r(1016)]+3]){he[r(1226)]=r(1051),he[r(629)]=he[r(1016)],he[r(1016)]+=4,e=!0;break}he[r(1016)]++}else he.parsedOffset++;else he[r(1016)]++;else he[r(1016)]++;if(e)continue;break}if("findSecondStartCode"===he[r(1226)]){if(!(he[r(555)][r(1022)]-he[r(1016)]>0))break;{let e,t=192&he[r(555)][he.parsedOffset];e=0==t?he.secondStartCodeOffset-14:he[r(629)];let n,i=0==(192&he[r(555)][he[r(1360)]+4]);if(i){if(he[r(1360)]-14<0)return void Pe[r(1167)](he[r(1115)],"firstStartCodeOffset -14 is",he[r(1360)]-14);!he.hasInitVideoCodec&&(he[r(607)]=!0,Pe.debugLog(he.LOG_NAME,r(1332)),Le[r(1332)](ve.mpeg4,"",Pe[r(760)]())),n=he[r(555)][r(983)](he[r(1360)]-14,e)}else n=he[r(555)][r(983)](he[r(1360)],e);let s=he[r(745)]();he[r(607)]?(postMessage({cmd:ae[r(822)],type:de[r(942)],value:n[r(1215)]}),postMessage({cmd:ae.workerFetch,type:de[r(601)],value:s}),_=s,Le[r(682)](n,i?1:0,s)):Pe[r(1167)](he[r(1115)],"has not init video codec"),he.lastBuffer=he[r(555)][r(983)](e),he[r(1360)]=0==t?14:0,he[r(1016)]=he[r(1360)]+4,he[r(1226)]="findFirstStartCode"}}}},getNaluDts(){const t=e;let r=he.localDts;return he[t(1123)]=he.localDts+40,r}},ke={TAG_NAME:e(886),first_parse_:!0,tsPacketSize:0,syncOffset:0,pmt_:null,config_:null,media_info_:new Fa,timescale_:90,duration_:0,pat_:{version_number:0,network_pid:0,program_map_pid:{}},current_program_:null,current_pmt_pid_:-1,program_pmt_map_:{},pes_slice_queues_:{},section_slice_queues_:{},video_metadata_:{vps:null,sps:null,pps:null,details:null},audio_metadata_:{codec:null,audio_object_type:null,sampling_freq_index:null,sampling_frequency:null,channel_config:null},last_pcr_:null,audio_last_sample_pts_:void 0,aac_last_incomplete_data_:null,has_video_:!1,has_audio_:!1,video_init_segment_dispatched_:!1,audio_init_segment_dispatched_:!1,video_metadata_changed_:!1,audio_metadata_changed_:!1,loas_previous_frame:null,video_track_:{type:e(1263),id:1,sequenceNumber:0,samples:[],length:0},audio_track_:{type:e(951),id:2,sequenceNumber:0,samples:[],length:0},_remainingPacketData:null,init(){},destroy(){const t=e;ke.media_info_=null,ke[t(539)]=null,ke.section_slice_queues_=null,ke[t(1320)]=null,ke[t(1183)]=null,ke[t(738)]=null,ke.video_track_=null,ke[t(881)]=null,ke[t(685)]=null,Pe.debugLog(ke.TAG_NAME,t(528))},probe(t){const r=e;let n=new Uint8Array(t),i=-1,s=188;if(n[r(1215)]<=3*s)return{needMoreData:!0};for(;-1===i;){let e=Math[r(1041)](1e3,n[r(1215)]-3*s);for(let t=0;t=4&&(i-=4),{match:!0,consumed:0,ts_packet_size:s,sync_offset:i})},_initPmt:()=>({program_number:0,version_number:0,pcr_pid:0,pid_stream_type:{},common_pids:{h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0,g711a:void 0,g711u:void 0},pes_private_data_pids:{},timed_id3_pids:{},synchronous_klv_pids:{},asynchronous_klv_pids:{},scte_35_pids:{},smpte2038_pids:{}}),dispatch(t){const r=e;ke[r(685)]&&(t=ia(ke._remainingPacketData,t),ke[r(685)]=null);let n=t[r(452)];const i=ke[r(1128)](n);i?ke[r(685)]=t[r(983)](i):t[r(1022)]>>6;e[1];let o=(31&e[1])<<8|e[2],a=(48&e[3])>>>4,c=15&e[3],u=!(!ke[r(727)]||ke[r(727)][r(888)]!==o),l={},d=4;if(2==a||3==a){let t=e[4];if(t>0&&(u||3==a)&&(l[r(960)]=(128&e[5])>>>7,l[r(889)]=(64&e[5])>>>6,l[r(767)]=(32&e[5])>>>5,(16&e[5])>>>4)){let t=300*(e[6]<<25|e[7]<<17|e[8]<<9|e[9]<<1|e[10]>>>7)+((1&e[10])<<8|e[11]);ke[r(838)]=t}if(2==a||5+t===188){n+=188,204===ke.tsPacketSize&&(n+=16);continue}d=5+t}if(1==a||3==a)if(0===o||o===ke.current_pmt_pid_||null!=ke[r(727)]&&ke[r(727)][r(1237)][o]===Ca[r(596)]){let e=188-d;ke[r(958)](t,n+d,e,{pid:o,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l.random_access_indicator})}else if(null!=ke.pmt_&&null!=ke[r(727)][r(1237)][o]){let e=188-d,i=ke[r(727)][r(1237)][o];(o===ke[r(727)][r(1166)][r(1236)]||o===ke[r(727)][r(1166)][r(1137)]||o===ke[r(727)][r(1166)][r(1339)]||o===ke[r(727)][r(1166)][r(1156)]||o===ke[r(727)][r(1166)][r(998)]||o===ke[r(727)][r(1166)][r(594)]||o===ke[r(727)][r(1166)][r(898)]||o===ke.pmt_[r(1166)][r(1072)]||o===ke[r(727)][r(1166)][r(1149)]||o===ke[r(727)][r(1166)][r(895)]||!0===ke[r(727)][r(776)][o]||!0===ke[r(727)].timed_id3_pids[o]||!0===ke[r(727)][r(1269)][o]||!0===ke.pmt_.asynchronous_klv_pids[o])&&ke[r(646)](t,n+d,e,{pid:o,stream_type:i,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l[r(889)]})}n+=188,204===ke[r(1112)]&&(n+=16)}return ke[r(1325)](),n},handleSectionSlice(t,r,n,i){const s=e;let o=new Uint8Array(t,r,n),a=ke.section_slice_queues_[i[s(1192)]];if(i[s(1267)]){let e=o[0];if(null!=a&&0!==a[s(443)]){let o=new Uint8Array(t,r+1,Math[s(1041)](n,e));a.slices[s(811)](o),a[s(443)]+=o[s(1215)],a[s(443)]===a[s(1062)]?ke.emitSectionSlices(a,i):ke.clearSlices(a,i)}for(let c=1+e;c=a[s(1062)]&&ke[s(1208)](a,i),c+=u[s(1215)]}}else if(null!=a&&0!==a[s(443)]){let e=new Uint8Array(t,r,Math.min(n,a[s(1062)]-a[s(443)]));a[s(1238)][s(811)](e),a[s(443)]+=e[s(1215)],a[s(443)]===a.expected_length?ke.emitSectionSlices(a,i):a.total_length>=a.expected_length&&ke[s(1208)](a,i)}},handlePESSlice(t,r,n,i){const s=e;let o=new Uint8Array(t,r,n),a=o[0]<<16|o[1]<<8|o[2];o[3];let c=o[4]<<8|o[5];if(i[s(1267)]){if(1!==a)return void Pe[s(1167)](ke[s(1001)],s(999)+a);let e=ke.pes_slice_queues_[i[s(1192)]];e&&(0===e[s(1062)]||e.expected_length===e[s(443)]?ke[s(641)](e,i):ke.clearSlices(e,i)),ke[s(539)][i[s(1192)]]=new xa,ke.pes_slice_queues_[i[s(1192)]][s(889)]=i[s(889)]}if(null==ke.pes_slice_queues_[i.pid])return;let u=ke[s(539)][i.pid];u[s(1238)].push(o),i.payload_unit_start_indicator&&(u.expected_length=0===c?0:c+6),u[s(443)]+=o.byteLength,u[s(1062)]>0&&u[s(1062)]===u[s(443)]?ke[s(641)](u,i):u[s(1062)]>0&&u[s(1062)]>>6,c=n[8];(2===a||3===a)&&(e=536870912*(14&n[9])+4194304*(255&n[10])+16384*(254&n[11])+128*(255&n[12])+(254&n[13])/2,i=3===a?536870912*(14&n[14])+4194304*(255&n[15])+16384*(254&n[16])+128*(255&n[17])+(254&n[18])/2:e);let u,l=9+c;if(0!==o){if(o<3+c)return void Pe[r(1167)](ke[r(1001)],"Malformed PES: PES_packet_length < 3 + PES_header_data_length");u=o-3-c}else u=n[r(1215)]-l;let d=n[r(983)](l,l+u);switch(t[r(424)]){case Ca[r(1244)]:case Ca[r(576)]:ke[r(1130)](d,e);break;case Ca.kPESPrivateData:ke[r(727)][r(1166)][r(898)]===t[r(1192)]?ke[r(544)](d,e):ke[r(727)].common_pids[r(998)]===t.pid?ke.parseAC3Payload(d,e):ke[r(727)][r(1166)][r(594)]===t[r(1192)]?ke[r(509)](d,e):ke.pmt_.asynchronous_klv_pids[t[r(1192)]]?ke[r(462)](d,t[r(1192)],s):ke[r(727)][r(1291)][t[r(1192)]]?ke.parseSMPTE2038MetadataPayload(d,e,i,t[r(1192)],s):ke.parsePESPrivateDataPayload(d,e,i,t[r(1192)],s);break;case Ca[r(433)]:ke[r(861)](d,e);break;case Ca[r(1314)]:ke.parseLOASAACPayload(d,e);break;case Ca.kAC3:ke[r(792)](d,e);break;case Ca[r(1196)]:ke[r(509)](d,e);break;case Ca[r(860)]:ke[r(727)][r(1015)][t[r(1192)]]?ke.parseTimedID3MetadataPayload(d,e,i,t[r(1192)],s):ke[r(727)].synchronous_klv_pids[t[r(1192)]]&&ke[r(416)](d,e,i,t[r(1192)],s);break;case Ca.kH264:ke[r(930)](d,e,i,t[r(889)]);break;case Ca[r(722)]:ke.parseH265Payload(d,e,i,t[r(889)]);break;case Ca.G711A:ke.parseG711Payload(d,e,!0);break;case Ca[r(588)]:ke[r(880)](d,e,!1);break;default:Pe[r(1292)](ke[r(1001)],"Unsupported stream. type: "+t[r(424)]+", pid: "+t.pid)}}else if((188===s||191===s||240===s||241===s||255===s||242===s||248===s)&&t[r(424)]===Ca[r(480)]){let e,i=6;e=0!==o?o:n.byteLength-i;let a=n[r(983)](i,i+e);ke.parsePESPrivateDataPayload(a,void 0,void 0,t[r(1192)],s)}}else Pe.debugError(ke[r(1001)],r(1063)+i)},parsePAT(t){const r=e;let n=t[0];if(0!==n)return void Log.e(ke[r(773)],r(683)+n+r(413));let i=(15&t[1])<<8|t[2];t[3],t[4];let s=(62&t[5])>>>1,o=1&t[5],a=t[6];t[7];let c=null;if(1===o&&0===a)c={version_number:0,network_pid:0,program_pmt_pid:{}},c[r(1361)]=s;else if(c=ke[r(615)],null==c)return;let u=i-5-4,l=-1,d=-1;for(let e=8;e<8+u;e+=4){let n=t[e]<<8|t[e+1],i=(31&t[e+2])<<8|t[e+3];0===n?c[r(885)]=i:(c[r(582)][n]=i,-1===l&&(l=n),-1===d&&(d=i))}1===o&&0===a&&(null==ke.pat_&&Pe.debugLog(ke.TAG_NAME,r(883)+JSON[r(1382)](c)),ke[r(615)]=c,ke[r(1384)]=l,ke[r(1082)]=d)},parsePMT(t){const r=e;let n=t[0];if(2!==n)return void Pe[r(1264)](ke.TAG_NAME,r(919)+n+r(1168));let i,s=(15&t[1])<<8|t[2],o=t[3]<<8|t[4],a=(62&t[5])>>>1,c=1&t[5],u=t[6];if(t[7],1===c&&0===u)i=ke._initPmt(),i[r(1066)]=o,i[r(1361)]=a,ke[r(897)][o]=i;else if(i=ke.program_pmt_map_[o],null==i)return;i[r(888)]=(31&t[8])<<8|t[9];let l=(15&t[10])<<8|t[11],d=12+l,h=s-9-l-4;for(let e=d;e0){for(let n=e+5;n0)for(let n=e+5;n1&&(Pe[n(1167)](ke[n(1001)],n(1093)+"expected: "+e+"ms, PES pts: "+s+"ms"),s=e)}}let o,a=new it(t),c=null,u=s;for(;null!=(c=a[n(952)]());){i=1024/c[n(1333)]*1e3;const e={codec:n(1089),data:c};0==ke[n(1184)]?(ke.audio_metadata_={codec:"aac",audio_object_type:c[n(715)],sampling_freq_index:c[n(1228)],sampling_frequency:c[n(1333)],channel_config:c[n(520)]},ke[n(1143)](e)):ke[n(1284)](e)&&(ke.dispatchAudioMediaSegment(),ke[n(1143)](e)),o=u;let t=Math[n(763)](u);const r=new Uint8Array(c[n(1216)][n(1022)]+2);r[n(503)]([175,1],0),r[n(503)](c[n(1216)],2);let s={payload:r,length:r[n(1215)],pts:t,dts:t,type:ce[n(951)]};ke.audio_track_.samples.push(s),ke.audio_track_[n(1022)]+=r.byteLength,u+=i}a[n(1121)]()&&(ke[n(738)]=a[n(1150)]()),o&&(ke[n(558)]=o)},parseLOASAACPayload(t,r){const n=e;if(ke[n(975)]&&!ke[n(788)])return;if(ke[n(738)]){let e=new Uint8Array(t[n(1215)]+ke[n(738)][n(1215)]);e[n(503)](ke[n(738)],0),e[n(503)](t,ke[n(738)][n(1215)]),t=e}let i,s;if(null!=r&&(s=r/ke[n(1323)]),ke[n(1183)][n(945)]===n(1089)){if(null==r&&null!=ke[n(558)])i=1024/ke[n(1183)].sampling_frequency*1e3,s=ke[n(558)]+i;else if(null==r)return void Pe[n(1167)](ke[n(1001)],n(1e3));if(ke[n(738)]&&ke[n(558)]){i=1024/ke[n(1183)].sampling_frequency*1e3;let e=ke[n(558)]+i;Math[n(933)](e-s)>1&&(Pe[n(1167)](ke[n(773)],n(1093)+"expected: "+e+n(645)+s+"ms"),s=e)}}let o,a=new st(t),c=null,u=s;for(;null!=(c=a[n(952)](Et(ke.loas_previous_frame)?void 0:ke[n(839)]));){ke.loas_previous_frame=c,i=1024/c[n(1333)]*1e3;const e={codec:"aac",data:c};0==ke[n(1184)]?(ke.audio_metadata_={codec:n(1089),audio_object_type:c[n(715)],sampling_freq_index:c.sampling_freq_index,sampling_frequency:c[n(1333)],channel_config:c[n(520)]},ke.dispatchAudioInitSegment(e)):ke.detectAudioMetadataChange(e)&&(ke.dispatchAudioMediaSegment(),ke.dispatchAudioInitSegment(e)),o=u;let t=Math[n(763)](u);const r=new Uint8Array(c[n(1216)][n(1022)]+2);r[n(503)]([175,1],0),r[n(503)](c[n(1216)],2);let s={payload:r,length:r[n(1215)],pts:t,dts:t,type:ce[n(951)]};ke[n(881)][n(1109)].push(s),ke[n(881)][n(1022)]+=r[n(1215)],u+=i}a[n(1121)]()&&(ke[n(738)]=a.getIncompleteData()),o&&(ke[n(558)]=o)},parseAC3Payload(e,t){},parseEAC3Payload(e,t){},parseOpusPayload(e,t){},parseMP3Payload(t,r){const n=e;if(ke[n(975)]&&!ke[n(788)])return;let i=[44100,48e3,32e3,0],s=[22050,24e3,16e3,0],o=[11025,12e3,8e3,0],a=t[1]>>>3&3,c=(6&t[1])>>1,u=(t[2],(12&t[2])>>>2),l=3!=(t[3]>>>6&3)?2:1,d=0,h=34;switch(n(1072),a){case 0:d=o[u];break;case 2:d=s[u];break;case 3:d=i[u]}switch(c){case 1:h=34;break;case 2:h=33,n(1022);break;case 3:h=32,n(1022)}const f={};f[n(1122)]=h,f[n(1209)]=d,f[n(675)]=l,f[n(1216)]=t;const p={codec:n(1072),data:f};0==ke[n(1184)]?(ke[n(1183)]={codec:n(1072),object_type:h,sample_rate:d,channel_count:l},ke[n(1143)](p)):ke[n(1284)](p)&&(ke[n(785)](),ke[n(1143)](p));const m=new Uint8Array(t[n(1022)]+1);m.set([32],0),m.set(t,1);let v={payload:m,length:m[n(1215)],pts:r/ke[n(1323)],dts:r/ke.timescale_,type:ce[n(951)]};ke[n(881)].samples[n(811)](v),ke[n(881)][n(1022)]+=m[n(1215)]},parseG711Payload(t,r,n){const i=e;if(ke.has_video_&&!ke[i(788)])return;const s={};s[i(1209)]=8e3,s.channel_count=1;const o={codec:i(n?1149:895)};0==ke.audio_init_segment_dispatched_?(ke.audio_metadata_={codec:o[i(945)],sample_rate:s.sample_rate,channel_count:s[i(675)]},ke[i(1143)](o)):ke[i(1284)](o)&&(ke[i(785)](),ke[i(1143)](o));const a=new Uint8Array(t[i(1022)]+1),c=n?[114]:[130];a[i(503)](c,0),a[i(503)](t,1);let u={payload:a,length:a[i(1215)],pts:r/ke[i(1323)],dts:r/ke[i(1323)],type:ce[i(951)]};ke[i(881)][i(1109)][i(811)](u),ke[i(881)][i(1022)]+=a[i(1215)]},detectAudioMetadataChange(t){const r=e;if(t[r(945)]!==ke[r(1183)][r(945)])return Pe[r(1292)](ke[r(1001)],r(961)+(ke[r(1183)][r(945)]+r(421)+t.codec)),!0;if(t[r(945)]===r(1089)&&ke[r(1183)][r(945)]===r(1089)){const e=t[r(1216)];if(e[r(715)]!==ke[r(1183)][r(715)])return Pe.debugLog(ke[r(1001)],r(1308)+(ke[r(1183)][r(715)]+r(421)+e.audio_object_type)),!0;if(e[r(1228)]!==ke.audio_metadata_.sampling_freq_index)return Pe[r(1292)](ke.TAG_NAME,r(1038)+(ke[r(1183)][r(1228)]+r(421)+e.sampling_freq_index)),!0;if(e.channel_config!==ke[r(1183)].channel_config)return Pe[r(1292)](ke.TAG_NAME,r(864)+(ke[r(1183)][r(520)]+r(421)+e.channel_config)),!0}else if(t[r(945)]===r(1220)&&ke[r(1183)][r(945)]===r(1220)){const e=t[r(1216)];if(e[r(1333)]!==ke[r(1183)][r(1333)])return Pe[r(1292)](ke[r(1001)],"AC3: Sampling Frequency changed from "+(ke[r(1183)][r(1333)]+r(421)+e[r(1333)])),!0;if(e[r(514)]!==ke[r(1183)][r(514)])return Pe[r(1292)](ke[r(1001)],r(1032)+(ke.audio_metadata_.bit_stream_identification+r(421)+e[r(514)])),!0;if(e.bit_stream_mode!==ke.audio_metadata_[r(580)])return Pe[r(1292)](ke[r(1001)],"AC3: BitStream Mode changed from "+ke[r(1183)][r(580)]+" to "+e[r(580)]),!0;if(e.channel_mode!==ke[r(1183)][r(578)])return Pe[r(1292)](ke[r(1001)],r(1033)+(ke[r(1183)][r(578)]+r(421)+e[r(578)])),!0;if(e[r(787)]!==ke[r(1183)][r(787)])return Pe.debugLog(ke.TAG_NAME,r(1067)+(ke.audio_metadata_[r(787)]+" to ")+e.low_frequency_effects_channel_on),!0}else if("opus"===t[r(945)]&&ke[r(1183)].codec===r(898)){const e=t[r(1026)];if(e[r(1209)]!==ke[r(1183)].sample_rate)return Pe[r(1292)](ke[r(1001)],"Opus: SamplingFrequencyIndex changed from "+(ke[r(1183)][r(1209)]+r(421)+e[r(1209)])),!0;if(e[r(675)]!==ke[r(1183)].channel_count)return Pe[r(1292)](ke[r(1001)],r(499)+(ke[r(1183)].channel_count+" to ")+e.channel_count),!0}else if(t.codec===r(1072)&&ke.audio_metadata_[r(945)]===r(1072)){const e=t.data;if(e[r(1122)]!==ke[r(1183)].object_type)return Pe[r(1292)](ke[r(1001)],r(566)+(ke[r(1183)][r(1122)]+r(421)+e.object_type)),!0;if(e.sample_rate!==ke.audio_metadata_.sample_rate)return Pe[r(1292)](ke[r(1001)],r(709)+(ke[r(1183)].sample_rate+r(421)+e[r(1209)])),!0;if(e[r(675)]!==ke[r(1183)][r(675)])return Pe.debugLog(ke.TAG_NAME,"MP3: Channel count changed from "+(ke[r(1183)].channel_count+r(421)+e[r(675)])),!0}return!1},dispatchAudioInitSegment(t){const r=e;let n={};if(n.type=r(951),n.id=ke.audio_track_.id,n[r(610)]=1e3,n.duration=ke[r(545)],"aac"===ke[r(1183)][r(945)]){let e="aac"===t[r(945)]?t.data:null,i=new Ua(e);n[r(1024)]=i[r(1206)],n[r(943)]=i[r(1097)],n[r(619)]=i[r(675)],n[r(945)]=i[r(1287)],n[r(1146)]=i.original_codec_mimetype,n.config=i.config,n[r(1029)]=1024/n[r(1024)]*n[r(610)],r(1304);const s=Ze({profile:Pe._opt[r(477)]?i[r(1122)]:i[r(517)],sampleRate:n[r(943)],channel:n[r(619)]});Pe[r(1136)](s,0)}else ke[r(1183)][r(945)]===r(1220)||ke[r(1183)][r(945)]===r(640)||ke[r(1183)][r(945)]===r(898)||("mp3"===ke.audio_metadata_[r(945)]?(n[r(1024)]=ke[r(1183)].sample_rate,n[r(619)]=ke.audio_metadata_[r(675)],n.codec=r(1072),n[r(1146)]=r(1072),n[r(430)]=void 0,r(1268)):"g711a"===ke[r(1183)][r(945)]?(n[r(1024)]=ke[r(1183)][r(1209)],n[r(619)]=ke[r(1183)][r(675)],n[r(945)]=r(1149),n[r(1146)]=r(1149),n[r(430)]=void 0):ke[r(1183)][r(945)]===r(895)&&(n[r(1024)]=ke.audio_metadata_[r(1209)],n[r(619)]=ke[r(1183)][r(675)],n[r(945)]="g711u",n.originalCodec=r(895),n.config=void 0));0==ke[r(1184)]&&Pe[r(1292)](ke[r(1001)],r(460)+n[r(945)]),ke.audio_init_segment_dispatched_=!0,ke[r(1313)]=!1},dispatchPESPrivateDataDescriptor(t,r,n){const i=e;let s={};s.pid=t,s.stream_type=r,s[i(904)]=n},parsePESPrivateDataPayload(t,r,n,i,s){const o=e;let a=new Pa;if(a[o(1192)]=i,a[o(456)]=s,a[o(474)]=t.byteLength,a[o(1216)]=t,null!=r){let e=Math.floor(r/ke.timescale_);a[o(843)]=e}else a[o(417)]=ke[o(758)]();if(null!=n){let e=Math[o(763)](n/ke[o(1323)]);a.dts=e}},parseTimedID3MetadataPayload(t,r,n,i,s){const o=e;Pe[o(1292)](ke[o(1001)],"Timed ID3 Metadata: pid="+i+", pts="+r+o(1119)+n+o(414)+s)},parseSynchronousKLVMetadataPayload(t,r,n,i,s){const o=e;Pe[o(1292)](ke[o(1001)],o(458)+i+o(1135)+r+o(1119)+n+o(414)+s)},parseAsynchronousKLVMetadataPayload(t,r,n){const i=e;Pe[i(1292)](ke[i(1001)],"Asynchronous KLV Metadata: pid="+r+i(414)+n)},parseSMPTE2038MetadataPayload(t,r,n,i,s){const o=e;Pe.debugLog(ke[o(1001)],o(457)+i+", pts="+r+o(1119)+n+o(414)+s)},getNearestTimestampMilliseconds(){const t=e;return null!=ke[t(558)]?Math.floor(ke.audio_last_sample_pts_):null!=ke.last_pcr_?Math.floor(ke[t(838)]/300/ke[t(1323)]):void 0},_preDoDecode(){const t=e,r=ke[t(971)],n=ke[t(881)];let i=r[t(1109)];ke[t(498)](r),ke[t(498)](n),n.samples.length>0&&(i=r[t(1109)][t(1330)](n[t(1109)]),i=i[t(1153)](((e,r)=>{const n=t;return e[n(1357)]-r[n(1357)]}))),i[t(1345)]((e=>{const r=t,n=new Uint8Array(e.payload);delete e[r(464)],e[r(1125)]===ce[r(1263)]?ke[r(1249)]({...e,payload:n}):e[r(1125)]===ce[r(951)]&&ke[r(495)]({...e,payload:n})})),r[t(1109)]=[],r[t(1022)]=0,n[t(1109)]=[],n[t(1022)]=0},_doDecodeVideo(t){const r=e,n=new Uint8Array(t.payload);let i=null;i=t.isHevc?$r(n,t[r(755)]):mr(n,t[r(755)]),t[r(755)]&&Pe[r(793)](t[r(1357)]);const s=Pe[r(463)](i,t[r(755)]);Pe.decode(s,{type:ce[r(1263)],ts:t[r(1357)],isIFrame:t[r(755)],cts:t[r(1309)]})},_doDecodeAudio(t){const r=e,n=new Uint8Array(t[r(464)]),i=Pe[r(621)](n);Pe[r(682)](i,{type:ce[r(951)],ts:t.dts,isIFrame:!1,cts:0})},correctSamplePts(t){const r=e;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;const i=t.samples||[];for(let e=0;e=s[r(1357)]&&(Pe[r(1167)](ke[r(1001)],"correctSamplePts dts, dts: "+t[r(1357)]+r(730)+s[r(1357)]+r(612)),s.dts=t.dts+n)}}},Te=null;Rt()&&(Te={TAG_NAME:"worker MediaSource",_resetInIt(){const t=e;Te.isAvc=null,Te[t(1370)]=null,Te[t(867)]={},Te.videoMeta={},Te[t(994)]={},Te[t(932)]=null,Te.audioSourceBuffer=null,Te[t(547)]=!1,Te[t(970)]=!1,Te.isAudioInitInfo=!1,Te.videoMimeType="",Te[t(608)]="",Te.cacheTrack={},Te.cacheAudioTrack={},Te[t(1293)]=!1,Te[t(1340)]=0,Te[t(1331)]=0,Te.firstRenderTime=null,Te[t(810)]=null,Te.mediaSourceAppendBufferFull=!1,Te.mediaSourceAppendBufferError=!1,Te[t(515)]=!1,Te[t(1010)]=!1,Te[t(1100)]=!1,Te.prevTimestamp=null,Te.decodeDiffTimestamp=null,Te[t(634)]=null,Te.prevAudioDts=null,Te.prevPayloadBufferSize=0,Te[t(875)]=!1,Te.prevTs=null,Te[t(1281)]=null,Te[t(761)]=[],Te[t(561)]=[],Te[t(628)]=[],Te[t(1101)]=[],Te[t(804)]=[],Te[t(1049)]=null,Te[t(1356)]=null,Te[t(720)]=null,Te.hasPendingEos=!1,Te.$video={currentTime:0,readyState:0}},init(){const t=e;Te[t(548)]=new ca,Te[t(845)](),Te.mediaSource=new(self[t(442)]),Te[t(677)]=!!Ut(Pe[t(1227)].checkFirstIFrame),Te[t(1142)](),Pe.debugLog(Te.TAG_NAME,t(1277))},destroy(){const t=e;Te[t(688)](),Te[t(445)](),Te.eventListenList&&Te.eventListenList[t(1022)]&&(Te[t(761)][t(1345)]((e=>e())),Te[t(761)]=[]),Te[t(845)](),Te[t(1369)]=null,Pe[t(1292)](Te[t(1001)],t(528))},getState(){const t=e;return Te[t(1369)]&&Te[t(1369)].readyState},isStateOpen(){const t=e;return Te[t(762)]()===Ee[t(1195)]},isStateClosed(){const t=e;return Te[t(762)]()===Ee[t(1170)]},isStateEnded(){const t=e;return Te[t(762)]()===Ee[t(962)]},_bindMediaSourceEvents(){const t=e,{proxy:r}=Te[t(548)],n=r(Te[t(1369)],Ie[t(744)],(()=>{const e=t;Pe.debugLog(Te[e(1001)],e(744)),Te[e(434)]()})),i=r(Te[t(1369)],Ie[t(1181)],(()=>{const e=t;Pe[e(1292)](Te[e(1001)],e(1181))})),s=r(Te.mediaSource,Ie[t(676)],(()=>{const e=t;Pe.debugLog(Te[e(1001)],e(676))}));Te[t(761)][t(811)](n,i,s)},_onMediaSourceSourceOpen(){const t=e;!Te[t(932)]&&(Pe.debugLog(Te[t(1001)],t(689)),Te[t(653)]()),!Te.audioSourceBuffer&&(Pe[t(1292)](Te.TAG_NAME,t(1257)),Te[t(1004)]()),Te[t(1353)]()&&Te[t(746)]()},decodeVideo(t,r,n,i){const s=e;if(Pe[s(563)])Pe.debugWarn(Te[s(1001)],s(993));else if(Ut(Te.hasInit))if(n&&t[1]===Ce[s(1229)]){const e=15&t[0];if(e===ve.h265&&Ut(Pe[s(1227)][s(765)]))return void Te[s(523)](fe[s(450)]);Te[s(867)][s(945)]=e,postMessage({cmd:ae[s(1383)],code:e});const i=new Uint8Array(t);postMessage({cmd:ae[s(982)],buffer:i,codecId:e},[i[s(452)]]),Te[s(547)]=Te._decodeConfigurationRecord(t,r,n,e)}else Pe.debugWarn(Te.TAG_NAME,s(1276)+n+s(995)+t[1]+s(769));else if(!Te[s(677)]&&n&&(Te[s(677)]=!0),Te[s(677)]){if(n&&0===t[1]){const e=15&t[0];let r={};e===ve[s(1236)]?r=dr(t[s(606)](5)):e===ve[s(1137)]&&(r=Nr(t));const n=Te[s(867)];n&&n.width&&n[s(869)]&&r&&r[s(1177)]&&r[s(557)]&&(r[s(1177)]!==n[s(649)]||r[s(557)]!==n[s(869)])&&(Pe.debugWarn(Te[s(1001)],"\n decodeVideo: video width or height is changed,\n old width is "+n[s(649)]+s(573)+n.height+s(1362)+r.codecWidth+s(935)+r[s(557)]+s(695)),Te[s(875)]=!0,Te.emitError(fe[s(988)],s(1374)+n[s(649)]+"->"+r[s(1177)]+", height: "+n[s(869)]+"->"+r[s(557)]))}if(Te[s(875)])return void Pe[s(1167)](Te.TAG_NAME,s(1204));if(Mt(t))return void Pe[s(1292)](Te[s(1001)],s(1189));if(t.byteLength0&&tre},_decodeConfigurationRecord(t,r,n,i){const s=e;let o=t[s(606)](5),a={};if(i===ve.h264?a=dr(o):i===ve[s(1137)]&&(a=Hr(o)),Te.videoInfo[s(649)]=a[s(1177)],Te[s(867)][s(869)]=a[s(557)],0===a[s(1177)]&&0===a[s(557)])return Pe.debugWarn(Te[s(1001)],"_decodeConfigurationRecord error",JSON.stringify(a)),Te[s(523)](fe[s(510)],s(1158)+(0===a.codecWidth)+s(533)+a[s(557)]),!1;const c={id:Be[s(1263)],type:"video",timescale:1e3,duration:0,avcc:o,codecWidth:a[s(1177)],codecHeight:a[s(557)],videoType:a[s(1230)]},u=la[s(600)](c);Te.isAvc=i===ve[s(1236)];let l=a[s(945)];return Te[s(703)]=l?s(906)+a.codec+'"':Te[s(774)]?Se[s(927)]:Se[s(1073)],postMessage({cmd:ae[s(466)],w:a[s(1177)],h:a[s(557)]}),Te[s(653)](),Te.appendBuffer(u[s(452)]),Te[s(1340)]=0,Te[s(1059)]={},Te[s(1293)]=!1,!0},_decodeAudioConfigurationRecord(t,r){const n=e,i=t[0]>>4&15,s=t[0]>>1&1,o=i===ge[n(1268)],a=i===ge.AAC;if(Ut(a||o))return Pe.debugWarn(Te.TAG_NAME,n(1180)+i+n(969)),Te[n(523)](fe[n(1013)]),!1;const c={id:Be[n(951)],type:n(951),timescale:1e3};let u={};if(Qe(t)){if(u=nt(t[n(606)](2)),!u)return!1;c.audioSampleRate=u[n(586)],c[n(619)]=u[n(619)],c.config=u.config,c[n(1029)]=1024/c[n(1024)]*c[n(610)]}else{if(!o)return!1;if(u=ka(t[n(606)](1)),!u)return!1;c[n(1024)]=u.sampleRate,c[n(619)]=u[n(619)],c[n(1029)]=1152/c[n(1024)]*c[n(610)]}c[n(945)]=u.codec,c[n(780)]=0;let l=n(535),d=u.codec,h=null;o&&Ut(Pe[n(1227)][n(660)])?(l=n(439),d="",h=new Uint8Array):h=la.generateInitSegment(c);let f=c[n(1125)]+"/"+l;return d&&d[n(1022)]>0&&(f+=n(936)+d),Ut(Te.isAudioInitInfo)&&(N=i===ge[n(1304)]?s?16:8:0===s?8:16,postMessage({cmd:ae[n(1347)],code:i}),postMessage({cmd:ae[n(1247)],sampleRate:c[n(1024)],channels:c[n(619)],depth:N}),Te[n(1222)]=!0),Te.audioMimeType=f,Te[n(1370)]=a,Te[n(1004)](),Te[n(1317)](h.buffer),!0},_initSourceBuffer(){const t=e,{proxy:r}=Te[t(548)];if(null===Te[t(932)]&&null!==Te.mediaSource&&Te[t(471)]()&&Te[t(703)]){try{Pe[t(1292)](Te[t(1001)],"_initSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()",Te.videoMimeType),Te[t(932)]=Te.mediaSource[t(770)](Te[t(703)])}catch(e){return Pe[t(1264)](Te.TAG_NAME,"_initSourceBuffer() appendBuffer mseDecoder.mediaSource.addSourceBuffer()",e[t(754)],e.toString(),e),Te[t(523)](fe[t(552)],e.code),void(Te[t(515)]=!0)}if(Te[t(932)]){const e=r(Te[t(932)],t(642),(e=>{const r=t;Te[r(1010)]=!0,Pe.debugError(Te[r(1001)],r(706),e),Te[r(523)](fe.mseSourceBufferError,r(532))})),n=r(Te[t(932)],"updateend",(()=>{const e=t;Te[e(831)]()?Te[e(550)]():Te._hasPendingSegments()?Te[e(746)]():Te[e(1348)]&&(Pe[e(1292)](Te[e(1001)],e(947)),Te[e(1162)]())}));Te[t(761)][t(811)](e,n)}}else Pe[t(1292)](Te.TAG_NAME,t(856)+Te[t(471)]()+" and mseDecoder.isAvc === null is "+(null===Te[t(774)]))},_initAudioSourceBuffer(){const t=e,{proxy:r}=Te[t(548)];if(null===Te.audioSourceBuffer&&null!==Te[t(1369)]&&Te[t(471)]()&&Te[t(608)]){try{Pe[t(1292)](Te[t(1001)],t(686),Te[t(608)]),Te[t(445)](),Te.audioSourceBuffer=Te[t(1369)][t(770)](Te[t(608)])}catch(e){return Pe[t(1264)](Te[t(1001)],t(821),e[t(754)],e.toString(),e),Te[t(523)](fe.mseWorkerAddSourceBufferError,e.code),void(Te.mediaSourceAddSourceBufferError=!0)}if(Te[t(696)]){const e=r(Te[t(696)],t(642),(e=>{const r=t;Te[r(1010)]=!0,Pe[r(1264)](Te.TAG_NAME,r(862),e),Te[r(523)](fe[r(1036)],r(870))})),n=r(Te[t(696)],t(454),(()=>{const e=t;Te[e(831)]()?Te._doRemoveRanges():Te[e(1353)]()?Te[e(746)]():Te[e(1348)]&&(Pe[e(1292)](Te.TAG_NAME,e(1240)),Te[e(1162)]())}));Te[t(761)][t(811)](e,n),null===Te[t(720)]&&(Te[t(720)]=setTimeout((()=>{const e=t;Te[e(1124)](),Te[e(523)](fe[e(721)])}),1e3))}}else Pe[t(1292)](Te[t(1001)],t(429)+Te.isStateOpen()+t(891)+Te.audioMimeType)},_decodeVideo(t,r,n,i,s){const o=e;let a=t[o(606)](5),c=a[o(1215)];if(0===c)return void Pe.debugWarn(Te[o(1001)],o(511));let u=(new Date)[o(1213)](),l=!1;!Te[o(617)]&&(Te[o(617)]=u,l=!0);const d=u-Te[o(617)];if(Te[o(1299)]=d,d>1e3&&!l&&Pe[o(1221)]&&Pe[o(1292)](Te.TAG_NAME,o(658)+u+o(794)+Te.prevTimestamp+o(736)+d+o(1110)),Te[o(1059)].id&&r>=Te.cacheTrack[o(1357)]){let e=8+Te[o(1059)].size,t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[o(503)](la.types[o(1085)],4),t[o(503)](Te[o(1059)][o(1216)],8),Te[o(1059)][o(780)]=r-Te[o(1059)][o(1357)];let n=la.moof(Te.cacheTrack,Te[o(1059)][o(1357)]);Te[o(1059)]={};let i=new Uint8Array(n.byteLength+t[o(1215)]);i[o(503)](n,0),i.set(t,n[o(1215)]),Te[o(1381)](i[o(452)])}else Pe.debugLog(Te.TAG_NAME,o(1019)+r+o(777)+s+o(1245)+(Te[o(1059)]&&Te[o(1059)].dts)),Te[o(1293)]=!1,Te.cacheTrack={};!Te[o(1059)]&&(Te[o(1059)]={}),Te.cacheTrack.id=Be.video,Te[o(1059)][o(1340)]=++Te[o(1340)],Te[o(1059)][o(1273)]=c,Te[o(1059)][o(1357)]=r,Te[o(1059)].cts=i,Te[o(1059)][o(427)]=n,Te[o(1059)][o(1216)]=a,Te[o(1059)].flags={isLeading:0,dependsOn:n?2:1,isDependedOn:n?1:0,hasRedundancy:0,isNonSync:n?0:1},Te[o(617)]=(new Date).getTime()},_decodeAudio(t,r,n){const i=e;let s=Te[i(1370)]?t[i(606)](2):t[i(606)](1),o=s[i(1215)];if(Te[i(1251)].id&&r>=Te[i(1251)][i(1357)]){let e=8+Te[i(1251)][i(1273)],t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[i(503)](la.types[i(1085)],4),t[i(503)](Te[i(1251)][i(1216)],8),Te[i(1251)].duration=r-Te[i(1251)].dts;let n=la[i(502)](Te[i(1251)],Te[i(1251)][i(1357)]);Te[i(1251)]={};let s=new Uint8Array(n.byteLength+t[i(1215)]);s.set(n,0),s.set(t,n[i(1215)]),Te[i(1317)](s.buffer)}else Te[i(1251)]={};!Te[i(1251)]&&(Te[i(1251)]={}),Te.cacheAudioTrack.id=Be[i(951)],Te[i(1251)].sequenceNumber=++Te[i(1331)],Te[i(1251)][i(1273)]=o,Te[i(1251)][i(1357)]=r,Te[i(1251)].cts=0,Te.cacheAudioTrack.data=s,Te[i(1251)].flags={isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}},appendBuffer(t){const r=e;Pe[r(563)]?Pe[r(1167)](Te[r(1001)],r(871)):Te.mediaSourceAddSourceBufferError?Pe.debugWarn(Te.TAG_NAME,r(717)):Te[r(959)]?Pe.debugWarn(Te[r(1001)],r(896)):Te[r(1253)]?Pe[r(1167)](Te[r(1001)],r(941)):Te[r(1010)]?Pe.debugWarn(Te.TAG_NAME,"mseDecoder.mediaSourceBufferError is true"):(Te.pendingSegments[r(811)](t),Te[r(932)]&&(Pe[r(1227)][r(1324)]&&Te._needCleanupSourceBuffer()&&Te[r(865)](),Ut(Te[r(799)]())&&Te[r(471)]()&&Ut(Te[r(831)]()))?Te[r(746)]():Te[r(847)]()?(Te[r(1010)]=!0,Te.emitError(fe[r(1036)],r(928))):Te[r(496)]()&&(Te.mediaSourceBufferError=!0,Te[r(523)](fe[r(1036)],r(1203))))},appendAudioBuffer(t){const r=e;Pe.isDestroyed?Pe.debugWarn(Te.TAG_NAME,"appendAudioBuffer() player is destroyed"):Te[r(515)]?Pe[r(1167)](Te[r(1001)],r(717)):Te.mediaSourceAppendBufferFull?Pe[r(1167)](Te[r(1001)],r(896)):Te[r(1253)]?Pe[r(1167)](Te[r(1001)],r(941)):Te[r(1010)]?Pe[r(1167)](Te.TAG_NAME,"mseDecoder.mediaSourceBufferError is true"):(Te.pendingAudioSegments[r(811)](t),Te.audioSourceBuffer&&(Pe[r(1227)][r(1324)]&&Te[r(854)]()&&Te._doCleanUpSourceBuffer(),Ut(Te.getAudioSourceBufferUpdating())&&Te.isStateOpen()&&Ut(Te[r(831)]()))?Te[r(746)]():Te[r(847)]()?(Te.mediaSourceBufferError=!0,Te[r(523)](fe[r(1036)],r(928))):Te[r(496)]()&&(Te[r(1010)]=!0,Te[r(523)](fe[r(1036)],r(1203))))},getSourceBufferUpdating(){const t=e;return Te[t(932)]&&Te[t(932)][t(937)]},getAudioSourceBufferUpdating(){const t=e;return Te[t(696)]&&Te[t(696)][t(937)]},stop(){const t=e;Te[t(1144)](),Te[t(603)](),Te.endOfStream()},clearUpAllSourceBuffer(){const t=e;if(Te.sourceBuffer){const e=Te[t(932)][t(562)];for(let r=0;r0||Te[t(804)][t(1022)]>0},getPendingSegmentsLength(){const t=e;return Te.pendingSegments[t(1022)]},_doAppendSegments(){const t=e;if(Te[t(847)]()||Te[t(496)]())Pe[t(1292)](Te.TAG_NAME,t(431));else if(null!==Te[t(932)]){if(Te[t(1219)]()&&null===Te[t(696)])return Pe.debugLog(Te.TAG_NAME,t(1151)),void(null===Te[t(1356)]&&(Te[t(1356)]=setTimeout((()=>{const e=t;Te[e(445)](),Te[e(523)](fe[e(1058)])}),1e3)));if(Ut(Te[t(799)]())&&Te[t(628)][t(1022)]>0){const e=Te[t(628)].shift();try{Te.sourceBuffer.appendBuffer(e)}catch(e){Pe[t(1264)](Te[t(1001)],t(779),e[t(754)],e),22===e[t(754)]?(Te.stop(),Te[t(959)]=!0,Te[t(523)](fe[t(1371)],t(1224)+e.code+t(1214)+e[t(1351)])):11===e[t(754)]?(Te[t(688)](),Te.mediaSourceAppendBufferError=!0,Te[t(523)](fe[t(1253)],t(1224)+e[t(754)]+t(1214)+e[t(1351)])):(Te[t(688)](),Te.mediaSourceBufferError=!0,Te[t(523)](fe.mseSourceBufferError,"code is "+e[t(754)]+t(1214)+e[t(1351)]))}}if(Ut(Te.getAudioSourceBufferUpdating())&&Te[t(804)].length>0){const e=Te[t(804)][t(587)]();try{Te[t(696)][t(1381)](e)}catch(e){Pe[t(1264)](Te[t(1001)],t(1134),e[t(754)],e),22===e[t(754)]?(Te[t(688)](),Te[t(959)]=!0,Te[t(523)](fe[t(1371)],t(1224)+e[t(754)]+t(1214)+e[t(1351)])):11===e[t(754)]?(Te.stop(),Te[t(1253)]=!0,Te[t(523)](fe[t(1253)],t(1224)+e.code+t(1214)+e[t(1351)])):(Te[t(688)](),Te[t(1010)]=!0,Te[t(523)](fe[t(1036)],e[t(754)],t(1224)+e[t(754)]+t(1214)+e[t(1351)]))}}}else Pe.debugLog(Te[t(1001)],t(1173))},_doCleanUpSourceBuffer(){const t=e,r=Te[t(1341)].currentTime;if(Te[t(932)]){const e=Te.sourceBuffer[t(562)];let n=!1;for(let i=0;i=Pe._opt.mseAutoCleanupMaxBackwardDuration){n=!0;let e=r-Pe[t(1227)][t(1338)];Te[t(561)][t(811)]({start:s,end:e})}}else o=Pe[t(1227)][t(915)]){n=!0;let e=r-Pe[t(1227)][t(1338)];Te[t(1101)][t(811)]({start:s,end:e})}}else o0||Te[t(1101)][t(1022)]>0},needInitAudio(){const t=e;return Pe[t(1227)][t(662)]&&Pe._opt[t(477)]},_doRemoveRanges(){const t=e;if(Te[t(932)]&&Ut(Te[t(799)]())){let e=Te[t(561)];for(;e[t(1022)]&&Ut(Te[t(799)]());){let r=e[t(587)]();try{Te[t(932)][t(1065)](r[t(663)],r[t(647)])}catch(e){Pe[t(1167)](Te[t(1001)],t(455),e,e[t(1321)]())}}}if(Te[t(696)]&&Ut(Te[t(1145)]())){let e=Te.pendingAudioRemoveRanges;for(;e.length&&Ut(Te[t(1145)]());){let r=e[t(587)]();try{Te[t(696)].remove(r.start,r[t(647)])}catch(e){Pe.debugWarn(Te[t(1001)],t(1201),e,e.toString())}}}},_getPlaybackRate(){},_needCleanupSourceBuffer(){const t=e;if(Ut(Pe[t(1227)][t(1324)]))return!1;const r=Te.$video.currentTime;if(Te[t(932)]){let e=Te.sourceBuffer[t(562)];if(e[t(1022)]>=1&&r-e[t(663)](0)>=Pe[t(1227)].mseAutoCleanupMaxBackwardDuration)return!0}if(Te[t(696)]){let e=Te[t(696)][t(562)];if(e[t(1022)]>=1&&r-e[t(663)](0)>=Pe[t(1227)][t(915)])return!0}return!1},_clearAudioSourceBufferCheckTimeout(){const t=e;Te[t(1356)]&&(clearTimeout(Te[t(1356)]),Te[t(1356)]=null)},_clearAudioNoDataCheckTimeout(){const t=e;Te.audioSourceNoDataCheckTimeout&&(clearTimeout(Te[t(720)]),Te[t(720)]=null)},getHandle(){const t=e;return Te[t(1369)][t(441)]},emitError(t){let r=arguments[e(1022)]>1&&void 0!==arguments[1]?arguments[1]:"";postMessage({cmd:ae.mseError,value:t,msg:r})}});let Pe={isPlayer:!0,isHevc:null,isPlayVod:!1,isPlayback:!1,isPlaybackPause:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:De[e(1148)],_opt:Z(),mp3Demuxer:null,delay:-1,pushLatestDelay:-1,firstTimestamp:null,startTimestamp:null,preDelayTimestamp:null,stopId:null,streamFps:null,streamAudioFps:null,streamVideoFps:null,writableStream:null,networkDelay:0,webglObj:null,socketStatus:pe[e(830)],startStreamRateAndStatsInterval:function(){Pe.stopStreamRateAndStatsInterval(),d=setInterval((()=>{const e=nc;l&&l(0);const t=JSON.stringify({demuxBufferDelay:Pe[e(837)](),audioDemuxBufferDelay:Pe[e(1120)](),streamBufferByteLength:Pe[e(986)](),netBuf:Pe[e(1074)]||0,pushLatestDelay:Pe[e(553)]||0,latestDelay:Pe[e(1043)],isStreamTsMoreThanLocal:b,wasmDecodeDelay:_-w});postMessage({cmd:ae[e(822)],type:de[e(632)],value:t}),Ot()&&(null===K&&(K=pt()),zt(pt()-K)&&Pe[e(627)]())}),1e3)},stopStreamRateAndStatsInterval:function(){d&&(clearInterval(d),d=null)},_startCheckWsOpenTimeout:function(){const t=e;Pe[t(491)](),X=setTimeout((()=>{const e=t;if(Pe[e(872)]===pe[e(830)]){const t="websocket Open Timeout form "+Pe._opt[e(752)]+e(844)+Pe[e(872)];Pe[e(1264)](e(631),t),postMessage({cmd:ae[e(822)],type:fe.websocketOpenTimeout,value:V[e(1117)],msg:t})}}),1e3*Pe._opt[t(752)])},_stopCheckWsOpenTimeout:function(){X&&(clearTimeout(X),X=null)},useOffscreen:function(){const t=e;return Pe._opt[t(1342)]&&typeof OffscreenCanvas!=t(426)},getDelay:function(t,r){const n=e;if(!t||Pe[n(1227)][n(1028)]&&!g)return-1;if(r===ce[n(951)])return Pe[n(1043)];if(Pe.preDelayTimestamp&&Pe[n(597)]>t)return Pe[n(597)]-t>1e3&&Pe[n(1167)](n(631),n(1083)+Pe[n(597)]+n(614)+t+n(1312)+(Pe[n(597)]-t)+n(1232)+Pe[n(1043)]),Pe.preDelayTimestamp=t,Pe[n(1043)];if(Pe[n(1212)]){if(t){const e=Date[n(692)]()-Pe.startTimestamp,r=t-Pe.firstTimestamp;e>=r?(b=!1,Pe[n(1043)]=e-r):(b=!0,Pe[n(1043)]=r-e)}}else Pe[n(1212)]=t,Pe[n(949)]=Date[n(692)](),Pe[n(1043)]=-1;return Pe[n(597)]=t,Pe[n(1043)]},getDelayNotUpdateDelay:function(t,r){const n=e;if(!t||Pe._opt[n(1028)]&&!g)return-1;if(r===ce.audio)return Pe[n(553)];if(Pe.preDelayTimestamp&&Pe[n(597)]-t>1e3)return Pe[n(1167)](n(631),n(929)+Pe[n(597)]+n(614)+t+n(1312)+(Pe[n(597)]-t)+n(1367)),-1;if(Pe.firstTimestamp){let e=-1;if(t){const r=Date.now()-Pe[n(949)],i=t-Pe.firstTimestamp;r>=i?(b=!1,e=r-i):(b=!0,e=i-r)}return e}return-1},resetDelay:function(){const t=e;Pe[t(1212)]=null,Pe[t(949)]=null,Pe[t(1043)]=-1,Pe.dropping=!1},resetAllDelay:function(){Pe.resetDelay(),Pe.preDelayTimestamp=null},doDecode:function(t){const r=e;Pe[r(1227)][r(1152)]&&t[r(1125)]===ce[r(1263)]&&Pe[r(950)]&&Pe[r(1009)](t[r(464)],t.ts),Pe[r(605)]()?t[r(1125)]===ce.audio?Pe[r(1227)].mseDecodeAudio?Te[r(1136)](t[r(464)],t.ts):t.decoder[r(682)](t[r(464)],t.ts):t[r(1125)]===ce[r(1263)]&&Te.decodeVideo(t[r(464)],t.ts,t[r(755)],t[r(1309)]):Pe[r(1227)][r(827)]&&Pe[r(1342)]()&&t[r(1125)]===ce[r(1263)]&&a[r(682)]?a[r(682)](t.payload,t.ts,t[r(1309)]):t[r(1329)][r(682)](t[r(464)],t.ts,t.isIFrame,t[r(1309)])},decodeNext(t){const r=e;if(0===s[r(1022)])return;const i=t.ts,o=s[0],a=t[r(1125)]===ce[r(1263)]&&Mt(t.payload);if(Ut(n))a&&(Pe.debugLog(r(631),r(1113)+t.type+r(1096)+i+r(1023)+o[r(1125)]+r(476)+o.ts+r(723)+a),s[r(587)](),Pe.doDecode(o));else{const e=o.ts-i,n=o[r(1125)]===ce[r(951)]&&t.type===ce[r(1263)];(e<=20||n||a)&&(Pe.debugLog("worker",r(1113)+t[r(1125)]+r(1096)+i+r(1023)+o[r(1125)]+" ts is "+o.ts+"\n diff is "+e+r(1255)+n+" and isVideoSqeHeader is "+a),s.shift(),Pe[r(595)](o))}},init:function(){const t=e;Pe[t(1292)](t(631),"init and forHardDecode is "+n+t(1285)+i+t(1243),JSON.stringify(Pe[t(1227)]));const r=Pe[t(1227)][t(1165)]===W.player,o=Pe[t(1227)][t(1165)]===W[t(991)],c=Pe[t(1227)][t(1165)]===W.playVod;if(Pe[t(1227)][t(1005)]&&se.init(),Pe[t(1221)]=r,Pe[t(1197)]=o,Pe[t(1068)]=c,Pe[t(605)]()&&Te&&Te.init(),a&&Pe[t(1227)][t(827)]&&Pe[t(1342)]()&&a[t(1277)](),Ut(Pe[t(836)]())){Pe[t(1292)](t(631),"setInterval()");const e=()=>{const e=t,n=Pe[e(1227)][e(743)]+Pe._opt[e(577)];let i=null;if(s[e(1022)]){if(Pe[e(806)])return void Pe[e(1167)](e(631),e(918)+s.length);if(Pe[e(570)]){for(i=s[e(587)](),Pe[e(1167)](e(631),"loop() dropBuffer is dropping and isIFrame "+i[e(755)]+e(976)+Pe[e(1043)]+e(965)+s[e(1022)]);!i[e(755)]&&s[e(1022)];)i=s[e(587)]();const t=Pe[e(980)](i.ts,i[e(1125)]);i[e(755)]&&t<=Pe[e(623)]()&&(Pe[e(1292)](e(631),e(638)),Pe[e(570)]=!1,Pe[e(595)](i),Pe[e(1352)](i))}else if(Pe[e(1197)]||Pe[e(977)]()||0===Pe[e(1227)][e(743)])for(;s[e(1022)];)i=s[e(587)](),Pe[e(595)](i);else if(i=s[0],-1===Pe[e(1319)](i.ts,i[e(1125)]))Pe[e(1292)](e(631),e(855),i.ts),s[e(587)](),Pe[e(595)](i),Pe[e(1352)](i);else if(Pe[e(1043)]>n&&r)Pe[e(1261)]()?(Pe[e(1292)]("worker","delay is "+Pe.delay+e(513)+n+e(680)),Pe[e(633)](),Pe[e(570)]=!0,postMessage({cmd:ae[e(741)]})):(s[e(587)](),Pe[e(595)](i),Pe[e(1352)](i));else for(;s[e(1022)];){if(i=s[0],!(Pe[e(1319)](i.ts,i[e(1125)])>Pe[e(1227)].videoBuffer)){Pe[e(1043)]<0&&Pe[e(1167)](e(631),e(618)+Pe[e(1043)]+e(1334)+s[e(1022)]);break}s.shift(),Pe[e(595)](i)}}else-1!==Pe[e(1043)]&&Pe[e(1292)](e(631),e(775)),Pe[e(633)]()};Pe[t(978)]=setInterval((()=>{const r=t;let n=(new Date)[r(1213)]();!S&&(S=n);const i=n-S;i>100&&Pe.debugWarn(r(631),"loop demux diff time is "+i),e(),S=(new Date).getTime()}),20)}else Pe[t(1292)](t(631),t(669));if(Ut(Pe._opt[t(1280)])&&(g=!0),Pe.isPlayUseMSEAndDecoderInWorker()&&Te){const e=Te[t(1326)]();e&&postMessage({cmd:ae[t(666)],mseHandle:e},[e])}},playbackCacheLoop:function(){const t=e;Pe[t(840)]();for(let e=0;e{const e=t,n=(new Date)[e(1213)]();!J&&(J=n);for(let t=0;t1&&s[e(1022)]>0&&Pe[e(1167)](e(631),e(1139)+i+"ms and fragDuration is "+r+e(568)+o+e(549)+s[e(1022)]),J=n}),r)},doPlaybackCacheLoop:function(){const t=e;let r=null;if(s.length)if(r=s[t(587)](),r[t(1125)]===ce[t(1263)]){Pe.isPlaybackOnlyDecodeIFrame()?r[t(755)]&&(Pe[t(1292)](t(631),t(1061),r.ts),Pe[t(595)](r)):Pe[t(595)](r);let e=s[0];for(;e&&e.type===ce[t(951)];)s[t(587)](),Pe[t(425)]()||Pe.doDecode(e),e=s[0]}else if(r[t(1125)]===ce[t(951)]){Pe.isPlaybackOnlyDecodeIFrame()||Pe[t(595)](r);let e=s[0];for(;e;){if(r=s.shift(),r.type===ce.video){Pe.isPlaybackOnlyDecodeIFrame()?r[t(755)]&&(Pe.debugLog("worker",t(1061),r.ts),Pe[t(595)](r)):Pe[t(595)](r),e=null;break}r[t(1125)]===ce[t(951)]&&(Pe[t(425)]()||Pe[t(595)](r),e=s[0])}}},clearPlaybackCacheLoop:function(){const t=e;Pe[t(978)]&&(clearInterval(Pe.stopId),Pe[t(978)]=null),J=null},startPlaybackCacheLoop:function(){Pe[e(712)]()},close:function(){const t=e;if(Pe[t(1292)]("worker",t(627)),Pe[t(563)]=!0,Q(),!u||1!==u.readyState&&2!==u[t(485)]?u&&Pe[t(1292)](t(631),"close() and socket.readyState is "+u.readyState):(H=!0,u.close(1e3,t(575))),u&&(u.onopen=null,u.onmessage=null,u.onclose=null,u.onerror=null,Pe.socketStatus=pe[t(830)]),u=null,Pe[t(782)](),Pe[t(491)](),Pe.clearPlaybackCacheLoop(),Pe[t(978)]&&(clearInterval(Pe[t(978)]),Pe[t(978)]=null),Pe.mp3Demuxer&&(Pe[t(853)][t(528)](),Pe[t(853)]=null),Pe.writableStream&&(kt(Pe[t(967)].close)&&Ut(Pe.writableStream.locked)?Pe[t(967)][t(627)]().catch((e=>{const r=t;Pe[r(1292)]("worker",r(1315),e[r(1321)](),e)}))[t(798)]((()=>{Pe[t(967)]=null})):Pe[t(967)]=null),Re)try{kt(Re.clear)&&Re.clear(),kt(Re.delete)&&Re[t(714)](),Re=null}catch(e){Pe[t(1292)](t(631),t(650)+e[t(1321)]()+t(1084))}if(Le)try{kt(Le[t(733)])&&Le[t(733)](),kt(Le[t(714)])&&Le.delete(),Le=null}catch(e){Pe[t(1292)](t(631),t(483)+e[t(1321)]()+t(1084))}l=null,S=null,b=!1,_=0,w=0,a&&(a.destroy&&a.destroy(),a=null),Te&&(Te[t(528)](),Te=null),Pe[t(1212)]=null,Pe.startTimestamp=null,Pe[t(1074)]=0,Pe[t(911)]=null,Pe[t(984)]=null,Pe[t(1301)]=null,Pe[t(1043)]=-1,Pe.pushLatestDelay=-1,Pe[t(597)]=null,Pe.dropping=!1,Pe[t(806)]=!1,Pe[t(1221)]=!0,Pe[t(1197)]=!1,Pe.isPlaybackPause=!1,Pe[t(1068)]=!1,Pe[t(950)]=!1,Pe[t(487)]=null,Pe[t(1227)]=Z(),Pe[t(694)]&&(Pe[t(694)][t(528)](),Pe.offscreenCanvas[t(1056)](t(1290),Pe[t(1157)]),Pe.offscreenCanvas.removeEventListener("webglcontextrestored",Pe[t(953)]),Pe[t(1316)]=null,Pe[t(564)]=null,Pe[t(1289)]=null),s=[],o=[],h&&(h[t(627)](),h=null),p=null,m=null,v=!1,y=!1,g=!1,U=!1,R=!1,L=!1,O=null,k=[],T=0,x=0,E=null,I=null,D=null,P=null,N=null,B=0,M=0,F=null,A=null,C=null,Pe[t(522)]=De[t(1148)],G=!0,se[t(528)](),oe[t(528)](),he.destroy(),ke[t(528)](),Pe[t(1182)]=null,Pe[t(1227)]={},postMessage({cmd:ae[t(1169)]})},pushBuffer:function(t,r){const i=e;if(r.type===ce[i(951)]&&Qe(t)){if(Pe.debugLog("worker",i(585)+r.ts+i(579)),Pe._opt[i(1035)]){const e=new Uint8Array(t);postMessage({cmd:ae[i(1006)],buffer:e},[e[i(452)]])}Pe[i(1136)](t,r.ts)}else if(r.type===ce[i(1263)]&&r.isIFrame&&Mt(t)){if(Pe[i(1292)]("worker",i(1231)+r.ts+i(850)),Pe[i(1227)][i(1035)]){const e=new Uint8Array(t);postMessage({cmd:ae[i(718)],buffer:e},[e.buffer])}Pe[i(1297)](t,r.ts,r[i(755)],r.cts)}else{if(Pe[i(1227)][i(868)])if(Pe[i(1227)][i(1035)]){const e=new Uint8Array(t);postMessage({cmd:ae[i(874)],type:r[i(1125)],buffer:e,ts:r.ts},[e[i(452)]])}else if(Pe[i(1227)][i(920)]===$[i(535)])if(r[i(1125)]===ce[i(1263)]){const e=new Uint8Array(t).slice(5);postMessage({cmd:ae[i(796)],buffer:e,isIFrame:r[i(755)],ts:r.ts,cts:r.cts},[e[i(452)]])}else if(r.type===ce[i(951)]&&Pe[i(1227)].isWasmMp4){const e=new Uint8Array(t),n=et(e)?e.slice(2):e.slice(1);postMessage({cmd:ae.audioNalu,buffer:n,ts:r.ts},[n.buffer])}if(Pe[i(1221)]){if(r.type===ce[i(1263)]){if(B>0){const e=r.ts-P,t=2*B;e>=t&&Pe[i(1292)](i(631),i(1054)+r.isIFrame+" and\n ts is "+r.ts+i(521)+P+i(1017)+e+i(1258)+B+" and maxDiff is "+t+i(749))}if(null!==P&&P>=r.ts&&(Pe[i(1167)](i(631),i(567)+r[i(755)]+i(899)+r.ts+i(1305)+P+i(1098)+t[i(1215)]+i(1031)+M),P-r.ts>re&&(Pe.debugWarn(i(631),i(1091)+P+i(534)+r.ts+i(1017)+(P-r.ts)+i(1312)+re+",\n and resetAllDelay"),Pe[i(633)](),P=null,B=0),Pe[i(1227)][i(818)]&&Ut(r.isIFrame)&&g)){const e=Pe.hasIframeInBufferList(),t=Ut(Pe[i(806)]);return Pe[i(1292)](i(631),i(1070)+e+i(729)+t+i(488)),void(e&&t?Pe[i(985)]():(Pe[i(1375)](!0),Ft(Pe[i(1227)].checkFirstIFrame)&&Ft(n)&&(Pe[i(605)]()?Te[i(677)]=!1:postMessage({cmd:ae[i(1280)]}))))}P>0&&(B=r.ts-P),M=t[i(1215)],P=r.ts}if(g){const e=Pe[i(1227)][i(743)]+Pe[i(1227)][i(577)],t=Pe[i(980)](r.ts,r[i(1125)]);Pe[i(553)]=t,Pe[i(1043)]>0&&t>e&&Pe.delay({type:e[t(1125)],ts:e.ts})));Pe[t(1292)]("worker",t(1350)+e+t(921)+s[t(1022)]+t(931)+JSON[t(1382)](r));const n=100;s[t(1022)]>=n&&(Pe[t(1167)](t(631),t(705)+s[t(1022)]+" more than "+n+t(697)),Pe[t(1301)]=25,postMessage({cmd:ae.playbackStreamVideoFps,value:Pe[t(1301)]}),Pe[t(911)]=Pe[t(1301)],Pe[t(712)]())}}},getVideoBufferLength(){const t=e;let r=0;return s[t(1345)]((e=>{const n=t;e.type===ce[n(1263)]&&(r+=1)})),r},hasIframeInBufferList(){const t=e;return s[t(1102)]((e=>{const r=t;return e[r(1125)]===ce[r(1263)]&&e[r(755)]}))},isAllIframeInBufferList(){const t=e,r=Pe[t(837)]();let n=0;return s[t(1345)]((e=>{const r=t;e[r(1125)]===ce[r(1263)]&&e.isIFrame&&(n+=1)})),r===n},getNotDroppingDelayTs(){const t=e;return Pe[t(1227)].videoBuffer+Pe[t(1227)].videoBufferDelay/2},getAudioBufferLength(){let e=0;return s.forEach((t=>{const r=nc;t.type===ce[r(951)]&&(e+=1)})),e},getStreamBufferLength(){const t=e;let r=0;return h&&h[t(452)]&&(r=h[t(452)][t(1215)]),Pe[t(1227)][t(1005)]?se[t(1069)]&&(r=se.lastBuf[t(1215)]):Pe[t(1227)].isTs?ke[t(685)]&&(r=ke[t(685)].byteLength):Pe[t(1227)][t(1161)]&&oe[t(1337)]&&(r=oe[t(1337)].getStreamBufferSize()),r},fetchStream:function(t){const r=e;let n=arguments[r(1022)]>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[r(1022)]>2&&void 0!==arguments[2]?arguments[2]:[];if(Pe[r(1292)](r(631),r(1094)+t,r(437),JSON[r(1382)](n)),Pe[r(950)]=!0,n.isFlv?Pe[r(1227)][r(1205)]=!0:n.isFmp4?Pe._opt[r(1161)]=!0:n[r(981)]?Pe[r(1227)].isMpeg4=!0:n[r(1005)]?Pe._opt[r(1005)]=!0:n[r(1207)]&&(Pe[r(1227)][r(1207)]=!0),l=yt((e=>{const t=r;postMessage({cmd:ae[t(822)],type:de[t(1099)],value:e})})),Pe[r(1277)](),Pe[r(954)](),n.isFmp4&&oe[r(438)](),n.protocol===j[r(732)]){n.isFlv&&(h=new qt(Pe.demuxFlv())),c=new AbortController;const e=Object[r(654)]({signal:c.signal},{headers:n.options&&n[r(1256)][r(944)]||{}});fetch(t,e)[r(1080)]((e=>{const t=r;if(Ft(H))return Pe[t(1292)]("worker",t(1077)),Pe.fetchStatus=De[t(1148)],void e[t(1311)].cancel();if(!Dt(e))return Pe[t(1167)](t(631),"fetch response status is "+e.status+t(1235)+e.ok+t(1262)),Q(),void postMessage({cmd:ae.workerFetch,type:fe.fetchError,value:t(679)+e[t(739)]+t(1235)+e.ok});if(postMessage({cmd:ae[t(822)],type:de[t(1211)]}),Ct())Pe[t(967)]=new WritableStream({write:e=>{const r=t;return c&&c[r(651)]&&c[r(651)].aborted?(Pe.debugLog("worker","writableStream write() and abortController.signal.aborted is true so return"),void(Pe[r(522)]=De.complete)):Ft(H)?(Pe[r(1292)](r(631),"writableStream write() and requestAbort is true so return"),Pe[r(522)]=De[r(1025)],void Q()):void(typeof e!==r(657)?(Pe[r(522)]=De[r(620)],l(e[r(1215)]),n.isFlv?h.write(e):n[r(1161)]?Pe[r(602)](e):n[r(981)]?Pe[r(1108)](e):n[r(1207)]?Pe.demuxTs(e):n[r(1005)]&&Pe.demuxNakedFlow(e)):Pe[r(1167)](r(631),'writableStream write() and value is "'+e+r(879)))},close:()=>{const e=t;Pe[e(1292)](e(631),"writableStream close()"),Pe.fetchStatus=De[e(1025)],Q(),Pe[e(1227)][e(569)]?(h&&(h[e(627)](),h=null),postMessage({cmd:ae[e(822)],type:de.streamEnd,value:V.fetch,msg:e(1199)})):postMessage({cmd:ae[e(822)],type:de[e(504)]})},abort:e=>{const r=t;if(c&&c.signal&&c[r(651)].aborted)return Pe[r(1292)](r(631),r(459)),void(Pe[r(522)]=De[r(1025)]);h&&(h[r(627)](),h=null),e[r(894)]!==Ae[r(551)]?(Pe[r(1292)](r(631),r(781)+e.toString()),Q(),postMessage({cmd:ae.workerFetch,type:fe[r(1164)],value:e[r(1321)]()})):Pe[r(1292)]("worker",r(719))}}),e[t(1311)][t(418)](Pe.writableStream).catch((e=>{const r=t;e[r(894)]!==r(1217)&&Pe.debugLog("worker","writableStream pipeTo() and e is",e[r(894)],e[r(1321)]())}));else{const r=e[t(1311)].getReader(),i=()=>{const e=t;r[e(1078)]()[e(1080)]((t=>{const r=e;let{done:s,value:o}=t;return s?(Pe[r(1292)](r(631),r(893)),Pe.fetchStatus=De[r(1025)],Q(),void(Pe[r(1227)][r(569)]?(h&&(h.close(),h=null),postMessage({cmd:ae[r(822)],type:de[r(678)],value:V[r(732)],msg:r(1199)})):postMessage({cmd:ae.workerFetch,type:de[r(504)]}))):c&&c.signal&&c.signal[r(1296)]?(Pe[r(1292)]("worker",r(541)),void(Pe[r(522)]=De[r(1025)])):Ft(H)?(Pe[r(1292)](r(631),r(1349)),Pe[r(522)]=De[r(1025)],void Q()):void(typeof o!==r(657)?(Pe[r(522)]=De[r(620)],l(o.byteLength),n[r(1205)]?h.write(o):n.isFmp4?Pe[r(602)](o):n.isMpeg4?Pe[r(1108)](o):n[r(1207)]?Pe[r(812)](o):n[r(1005)]&&Pe[r(479)](o),i()):Pe.debugWarn(r(631),r(817)+o+'" is string so return'))}))[e(497)]((t=>{const r=e;if(c&&c[r(651)]&&c[r(651)][r(1296)])return Pe[r(1292)](r(631),r(849)),void(Pe[r(522)]=De[r(1025)]);h&&(h[r(627)](),h=null),t[r(894)]!==Ae.abort?(Pe.debugLog(r(631),r(807)+t[r(1321)]()),Q(),postMessage({cmd:ae[r(822)],type:fe.fetchErrorWorker,value:t[r(1321)]()})):Pe[r(1292)]("worker","fetchNext().catch() and e.name is AbortError so return")}))};i()}})).catch((e=>{const t=r;c&&c.signal&&c.signal[t(1296)]?Pe[t(1292)](t(631),t(1194)):e.name!==Ae[t(551)]?(Pe[t(1292)](t(631),t(823)+e[t(1321)]()),Q(),postMessage({cmd:ae.workerFetch,type:fe[t(465)],value:e[t(1321)]()}),h&&(h[t(627)](),h=null)):Pe.debugLog(t(631),t(1225))}))}else n[r(816)]===j.websocket&&(n[r(1205)]&&(h=new qt(Pe[r(1265)]())),u=new WebSocket(t,i),u[r(820)]=r(1355),u[r(828)]=()=>{const e=r;Pe[e(1292)](e(631),e(963)),Pe[e(872)]=pe.open,Pe[e(491)](),postMessage({cmd:ae.workerFetch,type:de[e(1211)]}),postMessage({cmd:ae[e(822)],type:de[e(1295)]}),n.options&&n[e(1256)][e(905)]&&Pe[e(805)](n[e(1256)][e(905)])},u[r(848)]=e=>{const t=r;if(Pe.isDestroyed)return void Pe[t(1292)](t(631),"fetchStream, WebsocketStream socket close and code is "+e[t(754)]+t(707));if(f)return void Pe[t(1292)](t(631),t(436)+e.code+" but isSocketError is true , so return");if(Pe[t(1292)](t(631),"fetchStream, WebsocketStream socket close and code is "+e[t(754)]),Ft(H))return void Pe[t(1292)]("worker",t(841));let n=!1;1006===e[t(754)]&&(Pe[t(1264)](t(631),t(525)+e[t(754)]),n=!0),Pe[t(872)]=pe[t(627)],Pe[t(1227)][t(569)]||n?(h&&(h.close(),h=null),postMessage({cmd:ae[t(822)],type:de[t(678)],value:V[t(1117)],msg:e[t(754)]})):postMessage({cmd:ae[t(822)],type:de[t(504)]})},u[r(446)]=e=>{const t=r;Pe[t(1264)](t(631),"fetchStream, WebsocketStream socket error",e,e[t(1321)]()),f=!0,Pe[t(872)]=pe[t(642)],h&&(h.close(),h=null),Pe[t(563)]?Pe[t(1292)](t(631),t(1154)):Ft(H)?Pe.debugLog("worker","fetchStream, WebsocketStream on error and requestAbort is true so return"):postMessage({cmd:ae[t(822)],type:fe[t(574)],value:e[t(543)]?t(1171):"websocket error"})},u[r(583)]=e=>{const t=r;typeof e[t(1216)]!==t(657)?(l(e[t(1216)][t(1215)]),n.isFlv?h.write(e[t(1216)]):n[t(1161)]?Pe[t(602)](e[t(1216)]):n[t(981)]?Pe.demuxMpeg4(e[t(1216)]):Pe[t(1227)][t(1005)]?Pe[t(479)](e[t(1216)]):Pe._opt[t(1207)]?Pe[t(812)](e[t(1216)]):Pe.demuxM7s(e[t(1216)])):postMessage({cmd:ae.websocketStringMsg,value:e[t(1216)]})})},demuxFlv:function*(){const t=e;yield 9;const r=new ArrayBuffer(4),n=new Uint8Array(r),i=new Uint32Array(r);for(;;){n[3]=0;const e=yield 15,r=e[4];n[0]=e[7],n[1]=e[6],n[2]=e[5];const s=i[0];n[0]=e[10],n[1]=e[9],n[2]=e[8],n[3]=e[11];let o=i[0];const a=(yield s)[t(606)]();switch(r){case ue[t(951)]:if(a[t(1215)]>0){const e=Pe[t(621)](a);Pe[t(682)](e,{type:ce.audio,ts:o})}else Pe[t(1167)]("worker",t(1379)+a.byteLength+t(1246));break;case ue[t(1263)]:if(a[t(1215)]>=6){const e=a[0];if(Pe[t(609)](e))Pe[t(791)](a,o);else{const e=15&a[0];let r=a[0]>>4===xe[t(901)];const n=e===ve[t(1137)];if(t(1236),Ut(r)&&Ft(Lt(a,n))&&(Pe[t(1292)]("worker",t(639)),r=!0),r&&Mt(a)&&null===Pe[t(487)]){const e=15&a[0];Pe[t(487)]=e===ve[t(1137)],O=dt(a,Pe[t(487)]),Pe.debugLog(t(631),t(1030)+Pe[t(487)]+t(701)+O)}r&&Pe[t(793)](o),Pe.isPlayer&&Pe.calcNetworkDelay(o),i[0]=a[4],i[1]=a[3],i[2]=a[2],i[3]=0;let s=i[0],c=Pe[t(463)](a,r);Pe[t(682)](c,{type:ce[t(1263)],ts:o,isIFrame:r,cts:s})}}else Pe.debugWarn(t(631),t(500)+a[t(1215)]+t(1246));break;case ue[t(1039)]:postMessage({cmd:ae[t(584)],buffer:a},[a[t(452)]]);break;default:Pe[t(1292)](t(631),t(1081)+r)}}},decode:function(t,r){const n=e;r[n(1125)]===ce[n(951)]?Pe[n(1227)][n(662)]&&(postMessage({cmd:ae[n(822)],type:de[n(890)],value:t[n(1215)]}),Pe[n(1221)]?Pe[n(1250)](t,{type:r.type,ts:r.ts,cts:r[n(1309)]}):Pe[n(1197)]&&(Pe[n(425)]()||(Pe[n(836)]()?Pe.pushBuffer(t,{type:r[n(1125)],ts:r.ts,cts:r[n(1309)]}):Pe[n(1250)](t,{type:r[n(1125)],ts:r.ts,cts:r[n(1309)]})))):r[n(1125)]===ce[n(1263)]&&Pe[n(1227)].hasVideo&&(postMessage({cmd:ae.workerFetch,type:de[n(942)],value:t.byteLength}),postMessage({cmd:ae[n(822)],type:de[n(601)],value:r.ts}),Pe.isPlayer?Pe[n(1250)](t,{type:r[n(1125)],ts:r.ts,isIFrame:r.isIFrame,cts:r[n(1309)]}):Pe[n(1197)]&&(Pe[n(836)]()?Pe[n(1250)](t,{type:r[n(1125)],ts:r.ts,cts:r[n(1309)],isIFrame:r[n(755)]}):Pe[n(425)]()?r[n(755)]&&Pe[n(1250)](t,{type:r[n(1125)],ts:r.ts,cts:r[n(1309)],isIFrame:r[n(755)]}):Pe[n(1250)](t,{type:r[n(1125)],ts:r.ts,cts:r[n(1309)],isIFrame:r[n(755)]})))},cryptoPayload:function(t,r){const n=e;let i=t;return Pe[n(1227)][n(1306)]?Pe._opt.cryptoIV&&Pe[n(1227)][n(923)][n(1215)]>0&&Pe[n(1227)][n(1288)]&&Pe[n(1227)][n(1288)][n(1215)]>0?i=co(t,Pe[n(1227)].cryptoKey,Pe[n(1227)][n(923)],Pe.isHevc):Pe[n(1264)](n(631),n(589)+(Pe[n(1227)][n(1288)]&&Pe[n(1227)][n(1288)].byteLength)+n(681)+(Pe[n(1227)].cryptoIV&&Pe[n(1227)][n(923)][n(1215)])+n(622)):Pe[n(1227)][n(655)]?Pe._opt.sm4CryptoKey?i=Pe._opt[n(923)]&&Pe[n(1227)][n(923)][n(1215)]>0&&Pe[n(1227)][n(1288)]&&Pe[n(1227)][n(1288)][n(1215)]>0?ec(t,Pe[n(1227)][n(1288)],Pe[n(1227)][n(923)],Pe[n(487)],Pe[n(1227)][n(636)]):No(t,Pe._opt[n(1270)],Pe.isHevc,Pe._opt.isSm4CryptoH265V2):!Pe[n(1227)][n(1270)]&&Pe[n(1264)](n(631),n(914)):Pe[n(1227)][n(420)]&&(Pe._opt[n(923)]&&Pe[n(1227)][n(923)][n(1215)]>0&&Pe[n(1227)].cryptoKey&&Pe[n(1227)].cryptoKey.byteLength>0?i=Zo(t,Pe[n(1227)].cryptoKey,Pe[n(1227)].cryptoIV,Pe.isHevc):Pe[n(1264)](n(631),n(859)+(Pe[n(1227)][n(1288)]&&Pe[n(1227)][n(1288)][n(1215)])+n(681)+(Pe[n(1227)].cryptoIV&&Pe[n(1227)][n(923)][n(1215)])+" null")),i},cryptoPayloadAudio:function(t){const r=e;if(Ut(Pe[r(1227)][r(1380)]))return t;let n=t;return Pe[r(1227)][r(1306)]?Pe[r(1227)][r(923)]&&Pe[r(1227)][r(923)][r(1215)]>0&&Pe._opt[r(1288)]&&Pe[r(1227)][r(1288)][r(1215)]>0?t[0]>>4===ge[r(1304)]&&(n=uo(t,Pe[r(1227)][r(1288)],Pe._opt[r(923)])):Pe.debugError(r(631),r(589)+(Pe[r(1227)][r(1288)]&&Pe._opt[r(1288)][r(1215)])+r(681)+(Pe[r(1227)][r(923)]&&Pe._opt.cryptoIV.byteLength)+r(622)):Pe[r(1227)][r(420)]&&(Pe._opt.cryptoIV&&Pe[r(1227)][r(923)].byteLength>0&&Pe._opt.cryptoKey&&Pe[r(1227)][r(1288)][r(1215)]>0?t[0]>>4===ge.AAC&&(n=ta(t,Pe._opt[r(1288)],Pe[r(1227)].cryptoIV)):Pe[r(1264)]("worker","isXorCrypto cryptoKey.length is "+(Pe[r(1227)][r(1288)]&&Pe[r(1227)][r(1288)].byteLength)+r(681)+(Pe[r(1227)][r(923)]&&Pe[r(1227)][r(923)][r(1215)])+r(622))),n},setCodecAudio:function(t,r){const n=e,s=t[0]>>4,o=t[0]>>1&1;if(N=s===ge[n(1304)]?o?16:8:0===o?8:16,Re&&Re[n(1332)]||!Ut(i))if(Qe(t)||s===ge[n(432)]||s===ge[n(802)]||s===ge[n(1268)]){Pe[n(1292)](n(631),"setCodecAudio: init audio codec, codeId is "+s+n(1034)+Pe[n(1227)].sampleRate);const e=s===ge.AAC?t.slice(2):new Uint8Array(0);if(i){if(s===ge[n(1268)])return void Pe[n(1264)]("worker","setCodecAudio: mp3 is not support for old version");Re.sample_rate=Pe._opt[n(586)],Re[n(682)](t,r)}else Re[n(1332)](s,Pe[n(1227)][n(586)],e,Pe[n(760)]());if(s===ge[n(1304)]&&postMessage({cmd:ae.audioAACSequenceHeader,buffer:e},[e[n(452)]]),y=!0,s!==ge[n(1304)]&&(s===ge.MP3?(!Pe[n(853)]&&(Pe[n(853)]=new Yo(Pe),Pe[n(853)].on(n(1216),((e,t)=>{Re[n(682)](e,t)}))),Pe[n(853)][n(1190)](t.slice(1),r)):Re.decode(t[n(606)](1),r)),Ot()){const e=Number("1")||1;setTimeout((()=>{const e=n;Pe.debugError(e(631),e(486)),Pe[e(627)](),postMessage({cmd:ae[e(1282)]})}),60*e*60*1e3)}}else Pe[n(1167)](n(631),n(1286),s);else Pe[n(1264)](n(631),n(1239))},decodeAudio:function(t,r){const s=e;if(Pe[s(563)])Pe[s(1292)](s(631),s(700));else if(Pe[s(966)]())Te[s(1136)](t,r);else if(Ft(n)&&Ft(Pe[s(1227)][s(477)]))postMessage({cmd:ae.audioPayload,payload:t,ts:r,cts:r},[t[s(452)]]);else{const e=t[0]>>4;if(y){if(Qe(t))return void Pe[s(1292)](s(631),"decodeAudio and has already initialized and payload is aac codec packet so drop this frame");i?Re[s(682)](t,r):e===ge[s(1268)]?Pe[s(853)].dispatch(t[s(606)](1),r):Re[s(682)](e===ge.AAC?t[s(606)](2):t[s(606)](1),r)}else Pe[s(593)](t,r)}},setCodecVideo:function(t,r){const n=e,s=15&t[0];if(Le&&Le[n(1332)]||!Ut(i))if(Mt(t))if(s===ve[n(1236)]||s===ve[n(1137)]){Pe[n(1292)](n(631),"setCodecVideo: init video codec , codecId is "+s);const e=t[n(606)](5);if(s===ve[n(1236)]&&Pe._opt[n(1055)]){const t=dr(e);if(t.codecWidth>ne||t.codecHeight>ne)return postMessage({cmd:ae[n(873)],value:n(1374)+t[n(1177)]+" > "+ne+n(1133)+t.codecHeight+n(1118)+ne}),void Pe[n(1167)](n(631),n(908)+t[n(1177)]+n(1075)+t[n(557)])}const r=new Uint8Array(t);v=!0,i?Le.decode(t,0):Le[n(1332)](s,e,Pe.getBuildTime()),postMessage({cmd:ae[n(1383)],code:s}),postMessage({cmd:ae[n(982)],buffer:r,codecId:s},[r.buffer])}else Pe[n(1167)](n(631),n(913)+s+n(1045));else Pe[n(1167)](n(631),n(851)+s+n(656)+r+" and packetType is "+t[1]);else Pe[n(1264)]("worker",n(493))},decodeVideo:function(t,r,s){const o=e;let a=arguments[o(1022)]>3&&void 0!==arguments[3]?arguments[3]:0;if(Pe[o(563)])Pe[o(1292)](o(631),"decodeVideo, decoder is destroyed and return");else if(Pe[o(605)]())Te[o(1297)](t,r,s,a);else if(Ft(n))postMessage({cmd:ae[o(846)],payload:t,isIFrame:s,ts:r,cts:a,delay:Pe[o(1043)]},[t[o(452)]]);else if(v)if(!g&&s&&(g=!0),g){if(s&&Mt(t)){const e=15&t[0];let r={};e===ve.h264?r=dr(t.slice(5)):e===ve[o(1137)]&&(r=Nr(t)),r[o(1177)]&&r[o(557)]&&p&&m&&(r.codecWidth!==p||r[o(557)]!==m)&&(Pe[o(1167)](o(631),"\n decodeVideo: video width or height is changed,\n old width is "+p+o(573)+m+o(955)+r[o(1177)]+o(935)+r[o(557)]+o(1252)),R=!0,postMessage({cmd:ae.wasmWidthOrHeightChange,value:o(1374)+p+"->"+r[o(1177)]+o(1133)+m+"->"+r[o(557)]}))}if(R)return void Pe[o(1167)](o(631),o(1204));if(L)return void Pe[o(1167)](o(631),"decodeVideo: simd decode error, and return");if(Mt(t))return void Pe[o(1292)]("worker",o(1189));if(t[o(1215)]0&&void 0!==arguments[0]&&arguments[0];Pe[t(1292)]("worker",t(1259)+s[t(1022)]+", need clear is "+r),r&&(s=[]),Pe[t(1221)]&&(Pe.resetAllDelay(),Ft(Pe._opt.checkFirstIFrame)&&(Pe[t(570)]=!0,postMessage({cmd:ae[t(741)]}))),Ft(Pe._opt[t(1280)])&&Ut(n)&&(g=!1)},dropBuffer$2:function(){const t=e;if(s[t(1022)]>0){let e=s[t(529)]((e=>{const r=t;return Ft(e[r(755)])&&e[r(1125)]===ce[r(1263)]}));if(Pe[t(902)]())for(let r=0;r=Pe[t(623)]()){Pe[t(1292)](t(631),t(829)+r+t(672)+i+t(1129)+Pe[t(623)]()),e=r;break}}if(e>=0){Pe[t(806)]=!0,postMessage({cmd:ae[t(741)]});const r=s[t(1022)];s=s[t(606)](e);const n=s[t(587)]();Pe[t(633)](),Pe.getDelay(n.ts,n[t(1125)]),Pe[t(595)](n),Pe[t(806)]=!1,Pe[t(1292)](t(631),t(1242)+e+t(1076)+r+t(1283)+s[t(1022)]+" and new delay is "+Pe.delay+" ")}else Pe[t(806)]=!1}0===s[t(1022)]&&(Pe[t(806)]=!1)},demuxM7s:function(t){const r=e,n=new DataView(t),i=n[r(1042)](1,!1),s=n[r(771)](0),o=new ArrayBuffer(4),a=new Uint32Array(o);switch(s){case ce[r(951)]:const e=Pe[r(621)](new Uint8Array(t,5));Pe[r(682)](e,{type:ce[r(951)],ts:i});break;case ce[r(1263)]:if(n[r(1215)]>=11){const e=new Uint8Array(t,5),s=e[0];if(Pe[r(609)](s))Pe._decodeEnhancedH265Video(e,i);else{const t=n.getUint8(5)>>4==1;if(t&&(Pe[r(793)](i),Mt(e)&&null===Pe[r(487)])){const t=15&e[0];Pe.isHevc=t===ve[r(1137)]}Pe.isPlayer&&Pe[r(702)](i),a[0]=e[4],a[1]=e[3],a[2]=e[2],a[3]=0;let s=a[0],o=Pe[r(463)](e,t);Pe[r(682)](o,{type:ce[r(1263)],ts:i,isIFrame:t,cts:s})}}else Pe.debugWarn(r(631),r(1040)+t.byteLength+r(1246))}},demuxNakedFlow:function(t){se[e(1190)](t)},demuxFmp4:function(e){oe.dispatch(e)},demuxMpeg4:function(t){he[e(1190)](t)},demuxTs:function(e){ke.dispatch(e)},_decodeEnhancedH265Video:function(t,r){const n=e,i=t[0],s=48&i,o=15&i,a=t.slice(1,5),c=new ArrayBuffer(4),u=new Uint32Array(c),l="a"==String[n(1365)](a[0]);if(Pe[n(487)]=Ut(l),o===Fe[n(907)]){if(s===Ue[n(1140)]){const e=t[n(606)](5);if(l);else{const i=new Uint8Array(5+e[n(1022)]);i[n(503)]([28,0,0,0,0],0),i[n(503)](e,5),O=dt(t,Pe[n(487)]),Pe[n(1292)]("worker","demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is "+Pe[n(487)]+" and nalUnitSize is "+O),Pe[n(682)](i,{type:ce[n(1263)],ts:r,isIFrame:!0,cts:0})}}}else if(o===Fe[n(1087)]){let e=t,i=0;const o=s===Ue[n(1140)];o&&Pe[n(793)](r),l||(u[0]=t[4],u[1]=t[3],u[2]=t[2],u[3]=0,i=u[0],e=$r(t.slice(8),o),e=Pe[n(463)](e,o),Pe.decode(e,{type:ce[n(1263)],ts:r,isIFrame:o,cts:i}))}else if(o===Fe[n(518)]){const e=s===Ue[n(1140)];e&&Pe[n(793)](r);let i=$r(t.slice(5),e);i=Pe[n(463)](i,e),Pe[n(682)](i,{type:ce[n(1263)],ts:r,isIFrame:e,cts:0})}},_isEnhancedH265Header:function(e){return(e&Me)===Me},findSei:function(t,r){const n=e;let i=4;It(O)&&(i=O),at(t[n(606)](5),i).forEach((e=>{const t=n,i=Pe.isHevc?e[0]>>>1&63:31&e[0],s=Pe[t(487)]&&(i===we[t(795)]||i===we.prefixSei),o=Ut(Pe[t(487)])&&i===_e[t(940)];if(s||o){const n=ct(e,Pe[t(487)]);postMessage({cmd:ae[t(1272)],buffer:n.payload,ts:r},[n.payload.buffer])}}))},calcNetworkDelay:function(t){const r=e;if(!(g&&t>0))return;null===E?(E=t,I=pt()):tn?i-n:0;if(Pe[r(1074)]=s,s>Pe[r(1227)][r(1074)]&&Pe[r(1227)][r(1165)]===W[r(423)]){let e=!1;null===F&&(e=!0,F=pt());const o=pt();(o-F>=1e3||e)&&(Pe[r(1167)](r(631),r(687)+t+r(519)+E+" vs start is "+n+r(1254)+i+r(912)+s),postMessage({cmd:ae[r(822)],type:de[r(449)],value:s}),F=o)}},calcIframeIntervalTimestamp:function(e){null===D?D=e:D=Pe[t(1227)][t(742)]&&!(Pe[t(1227)][t(1106)]&&Pe[t(1227)][t(477)])},isPlayUseMSE:function(){const t=e;return Pe[t(1221)]&&Pe._opt[t(1106)]&&Ft(n)},isPlayUseMSEAndDecoderInWorker:function(){const t=e;return Pe[t(977)]()&&Pe[t(1227)][t(507)]},isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio:function(){const t=e;return Pe[t(605)]()&&Pe[t(1227)].mseDecodeAudio},playbackUpdatePlaybackRate:function(){},onOffscreenCanvasWebglContextLost:function(t){const r=e;Pe[r(1264)](r(631),r(484)),t[r(668)](),U=!0,Pe[r(694)][r(528)](),Pe[r(694)]=null,Pe[r(564)]=null,setTimeout((()=>{const e=r;Pe.offscreenCanvasGL=Pe[e(1316)][e(753)]("webgl"),Pe[e(564)]&&Pe[e(564)].getContextAttributes()[e(611)]?(Pe[e(694)]=z(Pe[e(564)],Pe[e(1227)][e(858)]),U=!1):Pe[e(1264)]("worker",e(1233))}),500)},onOffscreenCanvasWebglContextRestored:function(t){const r=e;Pe[r(1292)](r(631),"handleOffscreenCanvasWebglContextRestored"),t[r(668)]()},videoInfo:function(t,r,n){const i=e;postMessage({cmd:ae[i(1383)],code:t}),postMessage({cmd:ae[i(466)],w:r,h:n}),p=r,m=n,Pe[i(1342)]()&&(Pe.offscreenCanvas=new OffscreenCanvas(r,n),Pe.offscreenCanvasGL=Pe[i(1316)].getContext(i(809)),Pe[i(694)]=z(Pe[i(564)],Pe[i(1227)][i(858)]),Pe[i(1316)][i(1354)](i(1290),Pe[i(1157)],!1),Pe.offscreenCanvas[i(1354)]("webglcontextrestored",Pe[i(953)],!1))},audioInfo:function(t,r,n){postMessage({cmd:ae[e(1347)],code:t}),postMessage({cmd:ae.initAudio,sampleRate:r,channels:n,depth:N}),x=n},yuvData:function(r,n){const i=e;if(Pe[i(563)])return void Pe[i(1292)](i(631),"yuvData, decoder is destroyed and return");if(Ut(g))return void Pe[i(1292)]("worker",i(482));const s=p*m*3/2;try{let e=t[i(852)][i(983)](r,r+s),o=new Uint8Array(e);if(A=null,w=n,Pe[i(1342)]())try{if(U)return;Pe[i(694)][i(917)](p,m,o);let e=Pe[i(1316)][i(972)]();postMessage({cmd:ae[i(979)],buffer:e,delay:Pe[i(1043)],ts:n},[e])}catch(e){Pe[i(1264)](i(631),i(644),e,e.toString())}else postMessage({cmd:ae[i(979)],output:o,delay:Pe[i(1043)],ts:n},[o.buffer])}catch(e){Pe[i(1167)]("worker",i(665)+n+i(1174),e,e[i(1321)]())}},pcmData:function(t,n,i){const s=e;if(Pe.isDestroyed)return void Pe[s(1292)](s(631),"pcmData, decoder is destroyed and return");let a=n,c=[],u=0;try{let e=Pe[s(1227)][s(748)];for(let e=0;e<2;e++){let n=r[s(1020)][(t>>2)+e]>>2;c[e]=r[s(910)].subarray(n,n+a)}if(T){if(!(a>=(n=e-T)))return T+=a,o[0]=Float32Array.of(...o[0],...c[0]),void(2==x&&(o[1]=Float32Array.of(...o[1],...c[1])));k[0]=Float32Array.of(...o[0],...c[0][s(983)](0,n)),2==x&&(k[1]=Float32Array.of(...o[1],...c[1].subarray(0,n))),postMessage({cmd:ae[s(447)],buffer:k,ts:i},k[s(1372)]((e=>e[s(452)]))),u=n,a-=n}for(T=a;T>=e;T-=e)k[0]=c[0].slice(u,u+=e),2==x&&(k[1]=c[1][s(606)](u-e,u)),postMessage({cmd:ae[s(447)],buffer:k,ts:i},k[s(1372)]((e=>e[s(452)])));T&&(o[0]=c[0].slice(u),2==x&&(o[1]=c[1][s(606)](u))),c=[]}catch(e){Pe[s(1167)](s(631),s(704)+i+s(1174),e,e[s(1321)]())}},errorInfo:function(t){const r=e;null===A&&(A=pt());const n=pt(),i=mt(C>0?2*C:5e3,1e3,5e3),s=n-A;s>i&&(Pe[r(1167)](r(631),r(1090)+C+" and diff is "+s+" and maxDiff is "+i+"\n and replay"),L=!0,postMessage({cmd:ae[r(934)]}))},sendWebsocketMessage:function(t){const r=e;u?u[r(485)]===me[r(1195)]?(Pe[r(1292)](r(631),r(756),t),u[r(1363)](t)):Pe[r(1264)](r(631),r(1018),u[r(485)]):Pe.debugError(r(631),"socket is null")},timeEnd(){const t=e;Pe.debugError(t(631),"Jb pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),Pe[t(627)](),postMessage({cmd:ae[t(1282)]})},postStreamToMain(t,r){const n=e;postMessage({cmd:ae[n(1218)],type:r,buffer:t},[t[n(452)]])},updatePlaybackIsPause(t){const r=e;Pe[r(1292)](r(631),"updatePlaybackIsPause, isPause is "+t),Pe[r(974)]=t,Ft(t)?Pe.clearPlaybackCacheLoop():Pe.startPlaybackCacheLoop()},getBuildTime:()=>ee+"-"+te,validatedFailed(){const t=e;Pe[t(1264)](t(631),"validatedFailed, please contact the author to get the correct license")},debugLog(t){const r=e;if(Pe[r(1227)].debug&&Pe[r(1182)]){for(var n=arguments[r(1022)],i=new Array(n>1?n-1:0),s=1;s1?n-1:0),s=1;s1?n-1:0),s=1;s>2,p=t,m=r,postMessage({cmd:ae.initVideo,w:t,h:r}),Pe[n(1342)]()&&(Pe[n(1316)]=new OffscreenCanvas(t,r),Pe[n(564)]=Pe.offscreenCanvas.getContext(n(809)),Pe[n(694)]=z(Pe[n(564)],Pe[n(1227)][n(858)]),Pe[n(1316)].addEventListener(n(1290),Pe[n(1157)],!1),Pe[n(1316)][n(1354)](n(489),Pe[n(953)],!1))},initAudioPlanar:function(t,r){x=t,postMessage({cmd:ae[e(1247)],sampleRate:r,channels:t,depth:N})},playAudioPlanar:function(t,n,i){const s=e;if(Pe[s(563)])return void Pe[s(1292)](s(631),s(1307));let a=n,c=[],u=0,l=Pe[s(1227)][s(748)];for(let e=0;e<2;e++){let n=r[s(1020)][(t>>2)+e]>>2;c[e]=r.HEAPF32[s(983)](n,n+a)}if(T){if(!(a>=(n=l-T)))return T+=a,o[0]=Float32Array.of(...o[0],...c[0]),void(2==x&&(o[1]=Float32Array.of(...o[1],...c[1])));k[0]=Float32Array.of(...o[0],...c[0].subarray(0,n)),2==x&&(k[1]=Float32Array.of(...o[1],...c[1].subarray(0,n))),postMessage({cmd:ae[s(447)],buffer:k,ts:i},k[s(1372)]((e=>e[s(452)]))),u=n,a-=n}for(T=a;T>=l;T-=l)k[0]=c[0][s(606)](u,u+=l),2==x&&(k[1]=c[1].slice(u-l,u)),postMessage({cmd:ae[s(447)],buffer:k,ts:i},k[s(1372)]((e=>e[s(452)])));T&&(o[0]=c[0][s(606)](u),2==x&&(o[1]=c[1][s(606)](u))),c=[]},draw:function(r,n,i,s){const o=e;if(Pe[o(563)])return void Pe.debugLog("worker",o(637));const a=t[o(852)].subarray(n,n+q),c=t[o(852)][o(983)](i,i+Y),u=t[o(852)][o(983)](s,s+Y),l=new Uint8Array(q+Y+Y);if(l[o(503)](a),l[o(503)](c,q),l[o(503)](u,q+Y),A=null,w=r,Pe[o(1342)]())try{if(U)return;Pe.webglObj[o(917)](p,m,l);let e=Pe[o(1316)][o(972)]();postMessage({cmd:ae[o(979)],buffer:e,delay:Pe[o(1043)],ts:r},[e])}catch(e){Pe.debugError(o(631),o(644),e,e.toString())}else postMessage({cmd:ae[o(979)],output:l,delay:Pe[o(1043)],ts:r},[l[o(452)]])}}));let Re=null;r[e(559)]&&(Re=new r.AudioDecoder(Pe));let Le=null;t[e(1279)]&&(Le=new(t[e(1279)])(Pe)),postMessage({cmd:ae[e(1277)]}),self.onmessage=function(t){const r=e;let n=t.data;switch(n[r(505)]){case le[r(1277)]:try{Pe[r(1227)]=Object[r(654)](Pe[r(1227)],JSON.parse(n.opt))}catch(e){}Pe[r(1292)](r(631),"onmessage:"+le.init,n[r(1103)]);break;case le[r(682)]:Pe[r(1250)](n[r(452)],n[r(1256)]);break;case le[r(900)]:Pe[r(1136)](n.buffer,n.ts);break;case le[r(448)]:Pe[r(1297)](n[r(452)],n.ts,n[r(755)]);break;case le[r(1375)]:Pe.clearBuffer(n[r(1172)]);break;case le[r(516)]:Pe[r(516)](n[r(461)],JSON[r(750)](n[r(1103)]),n.protocols);break;case le[r(627)]:Pe.debugLog("worker",r(1003)+le[r(627)],JSON.stringify(n[r(1256)])),n[r(1256)]&&Ut(n[r(1256)][r(475)])&&(G=n[r(1256)][r(475)]),Pe.close();break;case le.updateConfig:Pe[r(1292)]("worker",r(1003)+le[r(948)],n[r(473)],n[r(1359)]),Pe[r(1227)][n[r(473)]]=n[r(1359)],n.key===r(591)&&(Pe.playbackUpdatePlaybackRate(),Pe[r(836)]()&&Ut(Pe[r(974)]));break;case le.sendWsMessage:Pe.sendWebsocketMessage(n[r(1351)]);break;case le[r(1193)]:Te[r(1341)][r(537)]=Number(n.message);break;case le[r(924)]:Pe[r(989)](n[r(1179)])}}}(e[1],t)}))[ic(120)]((e=>{const t=ic;console[t(132)]("JbPro[❌❌❌][f wasm simd]:",e,e[t(124)]())}))})); diff --git a/ui/decoder-pro-f-simd.wasm b/ui/decoder-pro-f-simd.wasm new file mode 100755 index 0000000..e1c6282 Binary files /dev/null and b/ui/decoder-pro-f-simd.wasm differ diff --git a/ui/decoder-pro-hard-not-wasm.js b/ui/decoder-pro-hard-not-wasm.js new file mode 100644 index 0000000..4d4c6df --- /dev/null +++ b/ui/decoder-pro-hard-not-wasm.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).crypto)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(e);function n(e,t){var r=s();return(n=function(e,t){return r[e-=434]})(e,t)}function s(){var e=["max","length","1489977YNooNK","random","7500297rvpwkb","hypot","2766976RrEXvT","10578627mNoWbt","124870OzszOS","abs","78scksNf","2526198ABUGVn","12158510zgdFgA","1riancW","8nHqmCb"];return(s=function(){return e})()}var a=n;!function(e,t){for(var r=n,i=e();;)try{if(631665===-parseInt(r(438))/1*(parseInt(r(436))/2)+parseInt(r(442))/3+parseInt(r(446))/4+-parseInt(r(448))/5*(parseInt(r(435))/6)+-parseInt(r(444))/7*(-parseInt(r(439))/8)+parseInt(r(447))/9+-parseInt(r(437))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(s);var o=1e-6,c="undefined"!=typeof Float32Array?Float32Array:Array,u=Math[a(443)];var l=Math.PI/180;Math[a(445)]||(Math[a(445)]=function(){for(var e=a,t=0,r=arguments[e(441)];r--;)t+=arguments[r]*arguments[r];return Math.sqrt(t)});var h=Object.freeze({__proto__:null,EPSILON:o,get ARRAY_TYPE(){return c},RANDOM:u,setMatrixArrayType:function(e){c=e},toRadian:function(e){return e*l},equals:function(e,t){var r=a;return Math[r(434)](e-t)<=o*Math[r(440)](1,Math.abs(e),Math[r(434)](t))}});function d(){var e=["tan","573819RtcUpK","5154380nAbbei","upDegrees","5064056PrAMdG","328IaitCq","1383179DruOFR","leftDegrees","27IqcgMq","sin","43647boBScr","rightDegrees","hypot","sqrt","3714Wifjoa","ARRAY_TYPE","1462882lQCNQx","mat4(","max","cos","EPSILON","abs","12030NyWKEV"];return(d=function(){return e})()}function f(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function p(e,t,r){var i=t[0],n=t[1],s=t[2],a=t[3],o=t[4],c=t[5],u=t[6],l=t[7],h=t[8],d=t[9],f=t[10],p=t[11],m=t[12],_=t[13],v=t[14],y=t[15],g=r[0],b=r[1],S=r[2],I=r[3];return e[0]=g*i+b*o+S*h+I*m,e[1]=g*n+b*c+S*d+I*_,e[2]=g*s+b*u+S*f+I*v,e[3]=g*a+b*l+S*p+I*y,g=r[4],b=r[5],S=r[6],I=r[7],e[4]=g*i+b*o+S*h+I*m,e[5]=g*n+b*c+S*d+I*_,e[6]=g*s+b*u+S*f+I*v,e[7]=g*a+b*l+S*p+I*y,g=r[8],b=r[9],S=r[10],I=r[11],e[8]=g*i+b*o+S*h+I*m,e[9]=g*n+b*c+S*d+I*_,e[10]=g*s+b*u+S*f+I*v,e[11]=g*a+b*l+S*p+I*y,g=r[12],b=r[13],S=r[14],I=r[15],e[12]=g*i+b*o+S*h+I*m,e[13]=g*n+b*c+S*d+I*_,e[14]=g*s+b*u+S*f+I*v,e[15]=g*a+b*l+S*p+I*y,e}function m(e,t,r){var i=t[0],n=t[1],s=t[2],a=t[3],o=i+i,c=n+n,u=s+s,l=i*o,h=i*c,d=i*u,f=n*c,p=n*u,m=s*u,_=a*o,v=a*c,y=a*u;return e[0]=1-(f+m),e[1]=h+y,e[2]=d-v,e[3]=0,e[4]=h-y,e[5]=1-(l+m),e[6]=p+_,e[7]=0,e[8]=d+v,e[9]=p-_,e[10]=1-(l+f),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function _(e,t){var r=g,i=t[0],n=t[1],s=t[2],a=t[4],o=t[5],c=t[6],u=t[8],l=t[9],h=t[10];return e[0]=Math[r(294)](i,n,s),e[1]=Math[r(294)](a,o,c),e[2]=Math[r(294)](u,l,h),e}function v(e,t,r,i,n){var s,a=1/Math[g(305)](t/2);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=n&&n!==1/0?(s=1/(i-n),e[10]=(n+i)*s,e[14]=2*n*i*s):(e[10]=-1,e[14]=-2*i),e}!function(e,t){for(var r=g,i=e();;)try{if(858230===-parseInt(r(306))/1+parseInt(r(298))/2+-parseInt(r(292))/3*(-parseInt(r(287))/4)+-parseInt(r(304))/5*(-parseInt(r(296))/6)+parseInt(r(288))/7+-parseInt(r(286))/8+-parseInt(r(290))/9*(parseInt(r(284))/10))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(d);var y=v;function g(e,t){var r=d();return(g=function(e,t){return r[e-=284]})(e,t)}function b(e,t,r,i,n,s,a){var o=1/(t-r),c=1/(i-n),u=1/(s-a);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*o,e[13]=(n+i)*c,e[14]=(a+s)*u,e[15]=1,e}var S=b;function I(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}var w=p,A=I,k=Object.freeze({__proto__:null,create:function(){var e=g,t=new(h[e(297)])(16);return h[e(297)]!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},clone:function(e){var t=new(h[g(297)])(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},fromValues:function(e,t,r,i,n,s,a,o,c,u,l,d,f,p,m,_){var v=new(h[g(297)])(16);return v[0]=e,v[1]=t,v[2]=r,v[3]=i,v[4]=n,v[5]=s,v[6]=a,v[7]=o,v[8]=c,v[9]=u,v[10]=l,v[11]=d,v[12]=f,v[13]=p,v[14]=m,v[15]=_,v},set:function(e,t,r,i,n,s,a,o,c,u,l,h,d,f,p,m,_){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e[4]=s,e[5]=a,e[6]=o,e[7]=c,e[8]=u,e[9]=l,e[10]=h,e[11]=d,e[12]=f,e[13]=p,e[14]=m,e[15]=_,e},identity:f,transpose:function(e,t){if(e===t){var r=t[1],i=t[2],n=t[3],s=t[6],a=t[7],o=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=s,e[11]=t[14],e[12]=n,e[13]=a,e[14]=o}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e},invert:function(e,t){var r=t[0],i=t[1],n=t[2],s=t[3],a=t[4],o=t[5],c=t[6],u=t[7],l=t[8],h=t[9],d=t[10],f=t[11],p=t[12],m=t[13],_=t[14],v=t[15],y=r*o-i*a,g=r*c-n*a,b=r*u-s*a,S=i*c-n*o,I=i*u-s*o,w=n*u-s*c,A=l*m-h*p,k=l*_-d*p,E=l*v-f*p,C=h*_-d*m,x=h*v-f*m,B=d*v-f*_,T=y*B-g*x+b*C+S*E-I*k+w*A;return T?(T=1/T,e[0]=(o*B-c*x+u*C)*T,e[1]=(n*x-i*B-s*C)*T,e[2]=(m*w-_*I+v*S)*T,e[3]=(d*I-h*w-f*S)*T,e[4]=(c*E-a*B-u*k)*T,e[5]=(r*B-n*E+s*k)*T,e[6]=(_*b-p*w-v*g)*T,e[7]=(l*w-d*b+f*g)*T,e[8]=(a*x-o*E+u*A)*T,e[9]=(i*E-r*x-s*A)*T,e[10]=(p*I-m*b+v*y)*T,e[11]=(h*b-l*I-f*y)*T,e[12]=(o*k-a*C-c*A)*T,e[13]=(r*C-i*k+n*A)*T,e[14]=(m*g-p*S-_*y)*T,e[15]=(l*S-h*g+d*y)*T,e):null},adjoint:function(e,t){var r=t[0],i=t[1],n=t[2],s=t[3],a=t[4],o=t[5],c=t[6],u=t[7],l=t[8],h=t[9],d=t[10],f=t[11],p=t[12],m=t[13],_=t[14],v=t[15];return e[0]=o*(d*v-f*_)-h*(c*v-u*_)+m*(c*f-u*d),e[1]=-(i*(d*v-f*_)-h*(n*v-s*_)+m*(n*f-s*d)),e[2]=i*(c*v-u*_)-o*(n*v-s*_)+m*(n*u-s*c),e[3]=-(i*(c*f-u*d)-o*(n*f-s*d)+h*(n*u-s*c)),e[4]=-(a*(d*v-f*_)-l*(c*v-u*_)+p*(c*f-u*d)),e[5]=r*(d*v-f*_)-l*(n*v-s*_)+p*(n*f-s*d),e[6]=-(r*(c*v-u*_)-a*(n*v-s*_)+p*(n*u-s*c)),e[7]=r*(c*f-u*d)-a*(n*f-s*d)+l*(n*u-s*c),e[8]=a*(h*v-f*m)-l*(o*v-u*m)+p*(o*f-u*h),e[9]=-(r*(h*v-f*m)-l*(i*v-s*m)+p*(i*f-s*h)),e[10]=r*(o*v-u*m)-a*(i*v-s*m)+p*(i*u-s*o),e[11]=-(r*(o*f-u*h)-a*(i*f-s*h)+l*(i*u-s*o)),e[12]=-(a*(h*_-d*m)-l*(o*_-c*m)+p*(o*d-c*h)),e[13]=r*(h*_-d*m)-l*(i*_-n*m)+p*(i*d-n*h),e[14]=-(r*(o*_-c*m)-a*(i*_-n*m)+p*(i*c-n*o)),e[15]=r*(o*d-c*h)-a*(i*d-n*h)+l*(i*c-n*o),e},determinant:function(e){var t=e[0],r=e[1],i=e[2],n=e[3],s=e[4],a=e[5],o=e[6],c=e[7],u=e[8],l=e[9],h=e[10],d=e[11],f=e[12],p=e[13],m=e[14],_=e[15];return(t*a-r*s)*(h*_-d*m)-(t*o-i*s)*(l*_-d*p)+(t*c-n*s)*(l*m-h*p)+(r*o-i*a)*(u*_-d*f)-(r*c-n*a)*(u*m-h*f)+(i*c-n*o)*(u*p-l*f)},multiply:p,translate:function(e,t,r){var i,n,s,a,o,c,u,l,h,d,f,p,m=r[0],_=r[1],v=r[2];return t===e?(e[12]=t[0]*m+t[4]*_+t[8]*v+t[12],e[13]=t[1]*m+t[5]*_+t[9]*v+t[13],e[14]=t[2]*m+t[6]*_+t[10]*v+t[14],e[15]=t[3]*m+t[7]*_+t[11]*v+t[15]):(i=t[0],n=t[1],s=t[2],a=t[3],o=t[4],c=t[5],u=t[6],l=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=i,e[1]=n,e[2]=s,e[3]=a,e[4]=o,e[5]=c,e[6]=u,e[7]=l,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=i*m+o*_+h*v+t[12],e[13]=n*m+c*_+d*v+t[13],e[14]=s*m+u*_+f*v+t[14],e[15]=a*m+l*_+p*v+t[15]),e},scale:function(e,t,r){var i=r[0],n=r[1],s=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*s,e[9]=t[9]*s,e[10]=t[10]*s,e[11]=t[11]*s,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},rotate:function(e,t,r,i){var n,s,a,o,c,u,l,d,f,p,m,_,v,y,b,S,I,w,A,k,E,C,x,B,T=g,D=i[0],M=i[1],U=i[2],F=Math[T(294)](D,M,U);return F0?(r[0]=2*(o*a+l*i+c*s-u*n)/d,r[1]=2*(c*a+l*n+u*i-o*s)/d,r[2]=2*(u*a+l*s+o*n-c*i)/d):(r[0]=2*(o*a+l*i+c*s-u*n),r[1]=2*(c*a+l*n+u*i-o*s),r[2]=2*(u*a+l*s+o*n-c*i)),m(e,t,r),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:_,getRotation:function(e,t){var r=g,i=new(h[r(297)])(3);_(i,t);var n=1/i[0],s=1/i[1],a=1/i[2],o=t[0]*n,c=t[1]*s,u=t[2]*a,l=t[4]*n,d=t[5]*s,f=t[6]*a,p=t[8]*n,m=t[9]*s,v=t[10]*a,y=o+d+v,b=0;return y>0?(b=2*Math[r(295)](y+1),e[3]=.25*b,e[0]=(f-m)/b,e[1]=(p-u)/b,e[2]=(c-l)/b):o>d&&o>v?(b=2*Math[r(295)](1+o-d-v),e[3]=(f-m)/b,e[0]=.25*b,e[1]=(c+l)/b,e[2]=(p+u)/b):d>v?(b=2*Math[r(295)](1+d-o-v),e[3]=(p-u)/b,e[0]=(c+l)/b,e[1]=.25*b,e[2]=(f+m)/b):(b=2*Math[r(295)](1+v-o-d),e[3]=(c-l)/b,e[0]=(p+u)/b,e[1]=(f+m)/b,e[2]=.25*b),e},fromRotationTranslationScale:function(e,t,r,i){var n=t[0],s=t[1],a=t[2],o=t[3],c=n+n,u=s+s,l=a+a,h=n*c,d=n*u,f=n*l,p=s*u,m=s*l,_=a*l,v=o*c,y=o*u,g=o*l,b=i[0],S=i[1],I=i[2];return e[0]=(1-(p+_))*b,e[1]=(d+g)*b,e[2]=(f-y)*b,e[3]=0,e[4]=(d-g)*S,e[5]=(1-(h+_))*S,e[6]=(m+v)*S,e[7]=0,e[8]=(f+y)*I,e[9]=(m-v)*I,e[10]=(1-(h+p))*I,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e},fromRotationTranslationScaleOrigin:function(e,t,r,i,n){var s=t[0],a=t[1],o=t[2],c=t[3],u=s+s,l=a+a,h=o+o,d=s*u,f=s*l,p=s*h,m=a*l,_=a*h,v=o*h,y=c*u,g=c*l,b=c*h,S=i[0],I=i[1],w=i[2],A=n[0],k=n[1],E=n[2],C=(1-(m+v))*S,x=(f+b)*S,B=(p-g)*S,T=(f-b)*I,D=(1-(d+v))*I,M=(_+y)*I,U=(p+g)*w,F=(_-y)*w,P=(1-(d+m))*w;return e[0]=C,e[1]=x,e[2]=B,e[3]=0,e[4]=T,e[5]=D,e[6]=M,e[7]=0,e[8]=U,e[9]=F,e[10]=P,e[11]=0,e[12]=r[0]+A-(C*A+T*k+U*E),e[13]=r[1]+k-(x*A+D*k+F*E),e[14]=r[2]+E-(B*A+M*k+P*E),e[15]=1,e},fromQuat:function(e,t){var r=t[0],i=t[1],n=t[2],s=t[3],a=r+r,o=i+i,c=n+n,u=r*a,l=i*a,h=i*o,d=n*a,f=n*o,p=n*c,m=s*a,_=s*o,v=s*c;return e[0]=1-h-p,e[1]=l+v,e[2]=d-_,e[3]=0,e[4]=l-v,e[5]=1-u-p,e[6]=f+m,e[7]=0,e[8]=d+_,e[9]=f-m,e[10]=1-u-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},frustum:function(e,t,r,i,n,s,a){var o=1/(r-t),c=1/(n-i),u=1/(s-a);return e[0]=2*s*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*s*c,e[6]=0,e[7]=0,e[8]=(r+t)*o,e[9]=(n+i)*c,e[10]=(a+s)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*s*2*u,e[15]=0,e},perspectiveNO:v,perspective:y,perspectiveZO:function(e,t,r,i,n){var s,a=1/Math[g(305)](t/2);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=n&&n!==1/0?(s=1/(i-n),e[10]=n*s,e[14]=n*i*s):(e[10]=-1,e[14]=-i),e},perspectiveFromFieldOfView:function(e,t,r,i){var n=g,s=Math[n(305)](t[n(285)]*Math.PI/180),a=Math[n(305)](t.downDegrees*Math.PI/180),o=Math[n(305)](t[n(289)]*Math.PI/180),c=Math.tan(t[n(293)]*Math.PI/180),u=2/(o+c),l=2/(s+a);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-(o-c)*u*.5,e[9]=(s-a)*l*.5,e[10]=i/(r-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*r/(r-i),e[15]=0,e},orthoNO:b,ortho:S,orthoZO:function(e,t,r,i,n,s,a){var o=1/(t-r),c=1/(i-n),u=1/(s-a);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=u,e[11]=0,e[12]=(t+r)*o,e[13]=(n+i)*c,e[14]=s*u,e[15]=1,e},lookAt:function(e,t,r,i){var n,s,a,c,u,l,d,p,m,_,v=g,y=t[0],b=t[1],S=t[2],I=i[0],w=i[1],A=i[2],k=r[0],E=r[1],C=r[2];return Math[v(303)](y-k)0&&(h*=p=1/Math.sqrt(p),d*=p,f*=p);var m=u*f-l*d,_=l*h-c*f,v=c*d-u*h;return(p=m*m+_*_+v*v)>0&&(m*=p=1/Math[n(295)](p),_*=p,v*=p),e[0]=m,e[1]=_,e[2]=v,e[3]=0,e[4]=d*v-f*_,e[5]=f*m-h*v,e[6]=h*_-d*m,e[7]=0,e[8]=h,e[9]=d,e[10]=f,e[11]=0,e[12]=s,e[13]=a,e[14]=o,e[15]=1,e},str:function(e){return g(299)+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math[g(294)](e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},subtract:I,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e[4]=t[4]+r[4]*i,e[5]=t[5]+r[5]*i,e[6]=t[6]+r[6]*i,e[7]=t[7]+r[7]*i,e[8]=t[8]+r[8]*i,e[9]=t[9]+r[9]*i,e[10]=t[10]+r[10]*i,e[11]=t[11]+r[11]*i,e[12]=t[12]+r[12]*i,e[13]=t[13]+r[13]*i,e[14]=t[14]+r[14]*i,e[15]=t[15]+r[15]*i,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var r=g,i=e[0],n=e[1],s=e[2],a=e[3],c=e[4],u=e[5],l=e[6],d=e[7],f=e[8],p=e[9],m=e[10],_=e[11],v=e[12],y=e[13],b=e[14],S=e[15],I=t[0],w=t[1],A=t[2],k=t[3],E=t[4],C=t[5],x=t[6],B=t[7],T=t[8],D=t[9],M=t[10],U=t[11],F=t[12],P=t[13],L=t[14],R=t[15];return Math.abs(i-I)<=h[r(302)]*Math[r(300)](1,Math.abs(i),Math[r(303)](I))&&Math[r(303)](n-w)<=o*Math.max(1,Math[r(303)](n),Math.abs(w))&&Math[r(303)](s-A)<=h[r(302)]*Math[r(300)](1,Math[r(303)](s),Math[r(303)](A))&&Math[r(303)](a-k)<=h[r(302)]*Math[r(300)](1,Math[r(303)](a),Math.abs(k))&&Math.abs(c-E)<=h[r(302)]*Math.max(1,Math[r(303)](c),Math.abs(E))&&Math[r(303)](u-C)<=h[r(302)]*Math[r(300)](1,Math.abs(u),Math[r(303)](C))&&Math.abs(l-x)<=h[r(302)]*Math.max(1,Math.abs(l),Math.abs(x))&&Math[r(303)](d-B)<=h[r(302)]*Math[r(300)](1,Math[r(303)](d),Math[r(303)](B))&&Math[r(303)](f-T)<=h[r(302)]*Math[r(300)](1,Math[r(303)](f),Math[r(303)](T))&&Math.abs(p-D)<=h[r(302)]*Math[r(300)](1,Math[r(303)](p),Math.abs(D))&&Math.abs(m-M)<=o*Math[r(300)](1,Math[r(303)](m),Math[r(303)](M))&&Math.abs(_-U)<=o*Math.max(1,Math[r(303)](_),Math.abs(U))&&Math.abs(v-F)<=h[r(302)]*Math.max(1,Math.abs(v),Math[r(303)](F))&&Math.abs(y-P)<=h[r(302)]*Math[r(300)](1,Math[r(303)](y),Math[r(303)](P))&&Math[r(303)](b-L)<=h[r(302)]*Math[r(300)](1,Math.abs(b),Math[r(303)](L))&&Math[r(303)](S-R)<=h[r(302)]*Math[r(300)](1,Math.abs(S),Math[r(303)](R))},mul:w,sub:A});function E(){var e=new(h[R(115)])(3);return c!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function C(e){var t=R,r=e[0],i=e[1],n=e[2];return Math[t(138)](r,i,n)}function x(e,t,r){var i=new(h[R(115)])(3);return i[0]=e,i[1]=t,i[2]=r,i}function B(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function T(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function D(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function M(e,t){var r=R,i=t[0]-e[0],n=t[1]-e[1],s=t[2]-e[2];return Math[r(138)](i,n,s)}function U(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}function F(e){var t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}function P(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function L(){var e=["hypot","EPSILON","ceil","vec3(","ARRAY_TYPE","87gHRlRh","sin","13147LVmtoP","floor","1306128WyinxJ","round","14lORyeb","cos","94456VFHdGx","2043531JQEZIM","length","sqrt","RANDOM","6991090LHkFVy","max","min","acos","abs","178825bMAvxL","8839050cDcoCL","60uyxHsw","18FOcFnJ"];return(L=function(){return e})()}function R(e,t){var r=L();return(R=function(e,t){return r[e-=112]})(e,t)}!function(e,t){for(var r=R,i=e();;)try{if(502747===-parseInt(r(118))/1*(-parseInt(r(137))/2)+parseInt(r(116))/3*(parseInt(r(124))/4)+-parseInt(r(134))/5*(-parseInt(r(136))/6)+-parseInt(r(122))/7*(parseInt(r(120))/8)+-parseInt(r(125))/9+parseInt(r(129))/10+-parseInt(r(135))/11)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(L);var N,O=B,z=T,H=D,V=M,G=U,W=C,j=F,q=(N=E(),function(e,t,r,i,n,s){var a,o,c=R;for(!t&&(t=3),!r&&(r=0),o=i?Math.min(i*t+r,e[c(126)]):e.length,a=r;a0&&(a=1/Math[r(127)](a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e},dot:P,cross:function(e,t,r){var i=t[0],n=t[1],s=t[2],a=r[0],o=r[1],c=r[2];return e[0]=n*c-s*o,e[1]=s*a-i*c,e[2]=i*o-n*a,e},lerp:function(e,t,r,i){var n=t[0],s=t[1],a=t[2];return e[0]=n+i*(r[0]-n),e[1]=s+i*(r[1]-s),e[2]=a+i*(r[2]-a),e},hermite:function(e,t,r,i,n,s){var a=s*s,o=a*(2*s-3)+1,c=a*(s-2)+s,u=a*(s-1),l=a*(3-2*s);return e[0]=t[0]*o+r[0]*c+i[0]*u+n[0]*l,e[1]=t[1]*o+r[1]*c+i[1]*u+n[1]*l,e[2]=t[2]*o+r[2]*c+i[2]*u+n[2]*l,e},bezier:function(e,t,r,i,n,s){var a=1-s,o=a*a,c=s*s,u=o*a,l=3*s*o,h=3*c*a,d=c*s;return e[0]=t[0]*u+r[0]*l+i[0]*h+n[0]*d,e[1]=t[1]*u+r[1]*l+i[1]*h+n[1]*d,e[2]=t[2]*u+r[2]*l+i[2]*h+n[2]*d,e},random:function(e,t){var r=R;t=t||1;var i=2*h[r(128)]()*Math.PI,n=2*h[r(128)]()-1,s=Math[r(127)](1-n*n)*t;return e[0]=Math[r(123)](i)*s,e[1]=Math[r(117)](i)*s,e[2]=n*t,e},transformMat4:function(e,t,r){var i=t[0],n=t[1],s=t[2],a=r[3]*i+r[7]*n+r[11]*s+r[15];return a=a||1,e[0]=(r[0]*i+r[4]*n+r[8]*s+r[12])/a,e[1]=(r[1]*i+r[5]*n+r[9]*s+r[13])/a,e[2]=(r[2]*i+r[6]*n+r[10]*s+r[14])/a,e},transformMat3:function(e,t,r){var i=t[0],n=t[1],s=t[2];return e[0]=i*r[0]+n*r[3]+s*r[6],e[1]=i*r[1]+n*r[4]+s*r[7],e[2]=i*r[2]+n*r[5]+s*r[8],e},transformQuat:function(e,t,r){var i=r[0],n=r[1],s=r[2],a=r[3],o=t[0],c=t[1],u=t[2],l=n*u-s*c,h=s*o-i*u,d=i*c-n*o,f=n*d-s*h,p=s*l-i*d,m=i*h-n*l,_=2*a;return l*=_,h*=_,d*=_,f*=2,p*=2,m*=2,e[0]=o+l+f,e[1]=c+h+p,e[2]=u+d+m,e},rotateX:function(e,t,r,i){var n=R,s=[],a=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],a[0]=s[0],a[1]=s[1]*Math[n(123)](i)-s[2]*Math[n(117)](i),a[2]=s[1]*Math[n(117)](i)+s[2]*Math[n(123)](i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},rotateY:function(e,t,r,i){var n=R,s=[],a=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],a[0]=s[2]*Math[n(117)](i)+s[0]*Math[n(123)](i),a[1]=s[1],a[2]=s[2]*Math.cos(i)-s[0]*Math[n(117)](i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},rotateZ:function(e,t,r,i){var n=R,s=[],a=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],a[0]=s[0]*Math[n(123)](i)-s[1]*Math[n(117)](i),a[1]=s[0]*Math.sin(i)+s[1]*Math[n(123)](i),a[2]=s[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},angle:function(e,t){var r=R,i=e[0],n=e[1],s=e[2],a=t[0],o=t[1],c=t[2],u=Math.sqrt(i*i+n*n+s*s)*Math[r(127)](a*a+o*o+c*c),l=u&&P(e,t)/u;return Math[r(132)](Math[r(131)](Math[r(130)](l,-1),1))},zero:function(e){return e[0]=0,e[1]=0,e[2]=0,e},str:function(e){return R(114)+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},equals:function(e,t){var r=R,i=e[0],n=e[1],s=e[2],a=t[0],c=t[1],u=t[2];return Math[r(133)](i-a)<=o*Math[r(130)](1,Math.abs(i),Math[r(133)](a))&&Math[r(133)](n-c)<=h[r(112)]*Math[r(130)](1,Math[r(133)](n),Math[r(133)](c))&&Math[r(133)](s-u)<=h[r(112)]*Math[r(130)](1,Math[r(133)](s),Math[r(133)](u))},sub:O,mul:z,div:H,dist:V,sqrDist:G,len:W,sqrLen:j,forEach:q});function Y(e,t){var r=J();return(Y=function(e,t){return r[e-=165]})(e,t)}function J(){var e=["40viVrJu","159733hggbGo","843094UvtJYS","20151wJeJWU","3TdDxJn","1065490whGUGP","5444640jgRqXT","4120lypUkv","6218442LKuThY","441668KDmYTs"];return(J=function(){return e})()}function X(e,t){const r=Q();return(X=function(e,t){return r[e-=219]})(e,t)}!function(e,t){for(var r=Y,i=e();;)try{if(555246===-parseInt(r(166))/1+parseInt(r(173))/2*(parseInt(r(165))/3)+parseInt(r(170))/4+parseInt(r(167))/5+parseInt(r(169))/6+parseInt(r(172))/7*(-parseInt(r(171))/8)+-parseInt(r(174))/9*(parseInt(r(168))/10))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(J),function(e,t){const r=X,i=e();for(;;)try{if(698731===-parseInt(r(242))/1*(-parseInt(r(248))/2)+parseInt(r(311))/3+-parseInt(r(228))/4*(parseInt(r(257))/5)+-parseInt(r(220))/6+-parseInt(r(233))/7+parseInt(r(246))/8*(-parseInt(r(275))/9)+parseInt(r(253))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Q);var Z=(e,t)=>{const r=X,i=r(303),n=r(239);t&&e[r(287)](e[r(310)],1);const s=function(){const t=r,s=p(e[t(286)],i),a=p(e.FRAGMENT_SHADER,n),o=e[t(300)]();return e[t(301)](o,s),e.attachShader(o,a),e[t(273)](o),e[t(283)](o,e[t(241)])?o:(console[t(289)](t(267)+e[t(249)](o)),null)}();let a={program:s,attribLocations:{vertexPosition:e[r(262)](s,"aVertexPosition"),texturePosition:e[r(262)](s,r(244))},uniformLocations:{projectionMatrix:e[r(231)](s,"uProjectionMatrix"),modelMatrix:e[r(231)](s,"uModelMatrix"),viewMatrix:e.getUniformLocation(s,"uViewMatrix"),rgbatexture:e.getUniformLocation(s,r(279)),ytexture:e.getUniformLocation(s,r(263)),utexture:e.getUniformLocation(s,"uTexture"),vtexture:e[r(231)](s,r(297)),isyuv:e[r(231)](s,r(254))}},o=function(){const t=r,i=e[t(292)]();e.bindBuffer(e[t(277)],i);e.bufferData(e[t(277)],new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e.STATIC_DRAW);var n=[];n=n[t(251)]([0,1],[1,1],[1,0],[0,0]);const s=e[t(292)]();e[t(288)](e[t(277)],s),e.bufferData(e[t(277)],new Float32Array(n),e[t(308)]);const a=e[t(292)]();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a);return e.bufferData(e[t(230)],new Uint16Array([0,1,2,0,2,3]),e[t(308)]),{position:i,texPosition:s,indices:a}}(),c=d(),u=d(),l=d(),h=d();function d(){const t=r;let i=e[t(268)]();return e[t(280)](e[t(221)],i),e[t(223)](e[t(221)],e[t(274)],e[t(250)]),e[t(223)](e[t(221)],e[t(255)],e[t(250)]),e[t(223)](e[t(221)],e[t(247)],e[t(237)]),e[t(223)](e[t(221)],e.TEXTURE_WRAP_T,e[t(237)]),i}function p(t,i){const n=r,s=e[n(225)](t);return e[n(243)](s,i),e[n(304)](s),e[n(232)](s,e[n(294)])?s:(console[n(289)](n(295)+e.getShaderInfoLog(s)),e[n(306)](s),null)}function m(t,i){const n=r;e[n(226)](0,0,t,i),e[n(296)](0,0,0,0),e[n(298)](1),e[n(276)](e.DEPTH_TEST),e[n(264)](e[n(281)]),e.clear(e[n(219)]|e[n(238)]);const s=k[n(224)]();k[n(284)](s,-1,1,-1,1,.1,100);const c=k[n(224)]();f(c);const d=k[n(224)]();k[n(302)](d,K[n(269)](0,0,0),K[n(269)](0,0,-1),x(0,1,0));{const t=3,r=e[n(261)],i=!1,s=0,c=0;e[n(288)](e[n(277)],o[n(260)]),e.vertexAttribPointer(a[n(290)].vertexPosition,t,r,i,s,c),e[n(234)](a[n(290)][n(293)])}{const t=2,r=e[n(261)],i=!1,s=0,c=0;e[n(288)](e.ARRAY_BUFFER,o.texPosition),e[n(245)](a[n(290)][n(312)],t,r,i,s,c),e.enableVertexAttribArray(a[n(290)][n(312)])}e.activeTexture(e[n(285)]+3),e[n(280)](e.TEXTURE_2D,u),e[n(307)](e[n(285)]+4),e[n(280)](e[n(221)],l),e.activeTexture(e[n(285)]+5),e[n(280)](e[n(221)],h),e[n(288)](e[n(230)],o.indices),e[n(266)](a[n(291)]),e[n(270)](a.uniformLocations.projectionMatrix,!1,s),e[n(270)](a[n(278)][n(282)],!1,c),e[n(270)](a[n(278)][n(272)],!1,d),e[n(235)](a[n(278)][n(240)],2),e[n(235)](a.uniformLocations[n(258)],3),e[n(235)](a.uniformLocations.utexture,4),e[n(235)](a.uniformLocations[n(227)],5),e[n(235)](a[n(278)].isyuv,1);{const t=6,r=e[n(222)],i=0;e.drawElements(e.TRIANGLES,t,r,i)}}return{render:function(t,i,n,s,a){const o=r;e.activeTexture(e.TEXTURE0),e[o(280)](e.TEXTURE_2D,u),e[o(259)](e[o(221)],0,e[o(252)],t,i,0,e[o(252)],e[o(309)],n),e.activeTexture(e.TEXTURE1),e[o(280)](e[o(221)],l),e[o(259)](e[o(221)],0,e[o(252)],t/2,i/2,0,e[o(252)],e[o(309)],s),e[o(307)](e[o(236)]),e[o(280)](e[o(221)],h),e[o(259)](e[o(221)],0,e[o(252)],t/2,i/2,0,e[o(252)],e.UNSIGNED_BYTE,a),m(t,i)},renderYUV:function(t,i,n){const s=r;let a=n[s(299)](0,t*i),o=n.slice(t*i,t*i*5/4),c=n[s(299)](t*i*5/4,t*i*3/2);e[s(307)](e.TEXTURE0),e[s(280)](e[s(221)],u),e[s(259)](e[s(221)],0,e[s(252)],t,i,0,e[s(252)],e[s(309)],a),e[s(307)](e.TEXTURE1),e[s(280)](e[s(221)],l),e.texImage2D(e.TEXTURE_2D,0,e.LUMINANCE,t/2,i/2,0,e[s(252)],e.UNSIGNED_BYTE,o),e[s(307)](e[s(236)]),e[s(280)](e[s(221)],h),e[s(259)](e[s(221)],0,e.LUMINANCE,t/2,i/2,0,e[s(252)],e.UNSIGNED_BYTE,c),m(t,i)},destroy:function(){const t=r;e[t(229)](a[t(291)]),e[t(265)](o[t(260)]),e[t(265)](o[t(271)]),e.deleteBuffer(o[t(305)]),e[t(256)](c),e.deleteTexture(u),e[t(256)](l),e[t(256)](h),a=null,o=null,c=null,u=null,l=null,h=null}}};function Q(){const e=["TEXTURE_2D","UNSIGNED_SHORT","texParameteri","create","createShader","viewport","vtexture","32cagXtC","deleteProgram","ELEMENT_ARRAY_BUFFER","getUniformLocation","getShaderParameter","1222599gWhyWW","enableVertexAttribArray","uniform1i","TEXTURE2","CLAMP_TO_EDGE","DEPTH_BUFFER_BIT","\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n ","rgbatexture","LINK_STATUS","50FjJMoo","shaderSource","aTexturePosition","vertexAttribPointer","8TWeSID","TEXTURE_WRAP_S","1740xUmctW","getProgramInfoLog","LINEAR","concat","LUMINANCE","22025270VZVKtV","isyuv","TEXTURE_MIN_FILTER","deleteTexture","626660TYaujt","ytexture","texImage2D","position","FLOAT","getAttribLocation","yTexture","depthFunc","deleteBuffer","useProgram","Unable to initialize the shader program: ","createTexture","fromValues","uniformMatrix4fv","texPosition","viewMatrix","linkProgram","TEXTURE_MAG_FILTER","12116241zERLgd","enable","ARRAY_BUFFER","uniformLocations","rgbaTexture","bindTexture","LEQUAL","modelMatrix","getProgramParameter","ortho","TEXTURE0","VERTEX_SHADER","pixelStorei","bindBuffer","log","attribLocations","program","createBuffer","vertexPosition","COMPILE_STATUS","An error occurred compiling the shaders: ","clearColor","vTexture","clearDepth","slice","createProgram","attachShader","lookAt","\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n ","compileShader","indices","deleteShader","activeTexture","STATIC_DRAW","UNSIGNED_BYTE","UNPACK_ALIGNMENT","3593427EmIdLD","texturePosition","COLOR_BUFFER_BIT","1329258zrkrpj"];return(Q=function(){return e})()}const $=He;!function(e,t){const r=He,i=e();for(;;)try{if(475791===parseInt(r(679))/1+-parseInt(r(368))/2+parseInt(r(505))/3*(-parseInt(r(459))/4)+-parseInt(r(702))/5+parseInt(r(320))/6*(parseInt(r(587))/7)+-parseInt(r(634))/8+parseInt(r(479))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(de);const ee={websocket:1,fetch:2,hls:3,webrtc:4,webTransport:5,aliyunRtc:6,ts:7};$(712),$(631);const te={fetch:"fetch",hls:$(741),websocket:$(405),webrtc:$(372),webTransport:$(712),worker:$(788),aliyunRtc:$(631),mp4:$(692)},re={player:"player",playerAudio:"playerAudio",playbackTF:$(568),talk:$(406),playVod:$(762)},ie={mp4:"mp4",webm:"webm",flv:"flv",mov:$(355)},ne={flv:$(747),m7s:"m7s",hls:$(741),webrtc:$(372),webTransport:"webTransport",nakedFlow:"nakedFlow",fmp4:$(604),mpeg4:$(733),aliyunRtc:$(631),ts:"ts",g711:$(494),pcm:$(637)};$(760),$(502),$(518),$(672),$(602),$(325);const se={mse:$(627),wcs:"wcs",offscreen:$(673),wasm:$(670),simd:"simd",mt:"mt",webrtc:$(372),hls:$(741),aliyunRtc:$(631)},ae={canvas:$(731),video:$(460)},oe={debug:$(336),warn:$(519)},ce="click",ue=($(591),{normal:$(415),simple:$(374)}),le={normal:$(415),small:"small"},he=$(503);function de(){const e=["opus","pause","readystatechange","g711","3-4","audioPayload","complete","playVodStats","缓冲区已满","receiver","candidate-pair","M7S","20251201","peer-connection","9XIVmzO","ulaw","faceDetectActive","tenMin","playbackForwardMaxRateDecodeIFrame","avc","mediaSourceBufferedIsZeroError","open","video decoder initialization failed","4-1","webgl2","initVideo","stalled","HLS","warn","fogClose","tcp","ALAW","performance","networkState","MULAW(g711u)","mseDecodeError","websocketClose","webrtcChecking","timeUpdate","streamQualityChange","mseSourceClose","load-start","dynamicWatermarkConfig","delayTimeout","transport","widthOrHeightChangeReplayDelayTime","closed","sourceclose","流异常结束","isM7sCrypto","人脸识别激活","multiMouseover","apertureNear","解码失败","Simd","webgpu","sendMessage","halfHour","webcodecs","play","初始化音频解码器失败","init","操作盘","clickInitPlayer","talkGetUserMediaTimeout","aiFaceDetectorInfo","stream","sendWsMessage","paused","websocketStringMsg","不支持该分辨率的视频","flvDemuxBufferSizeTooLarge","download","mediaSourceAppendBufferError","record","subtitle-segments","wiperOpen","playbackTF",'video/mp4; codecs="avc1.64002A"',"isWebrtcForZLM","MP3","talkStreamError","playVodWaiting","cruiseStart","playbackPause","wasmError","occlusionDetectActive","webrtcDisconnect","webrtcStreamH265","sourcebuffer-created",'video/mp4;codecs="hev1.4.10.L120.90"',"play() failed because the user didn't interact with the document first","initAudio","mseFirstRenderTime","recordBlob","videoInfoError","5271wPjgSM","webcodecsAudioNoDataTimeout","isWebrtcForSRS","decode","mouseDownAndUp","script","track","simdDecodeError","networkDelayTimeout","imageDetectActive","initDecoderWorkerTimeout","left-up","MEDIA_ERR_ABORTED","保存日志","destroy","MPEG4","jbprovm","fmp4","流异常","streamStats","videoSEISyncPts","talkStreamClose","timeout","multiFullscreen","flvScriptData","none","ttfb","flvMetaData","speed","inView","playbackTimestamp","alaw","webcodecsAudioInitTimeout","playVodCanplay","音频通道错误","left","aiObjectDetectorInfo","half-hour","playVodVideoSeekedByMse","playerAudio","mse","jtt",'video/mp4;codecs="hev1.1.6.L120.90"',"初始化解码worker超时","aliyunRtc","default","updateConfig","6771072DMdDvE","multiDragstart","playbackStats","pcm","物品识别激活","no-audio-track","drawingRect","webcodecsDecodeConfigureError","isMpeg4","right-down","playbackTimeScroll","MEDIA_ERR_DECODE","g711u","metadata","rightUp","webcodecsUnsupportedConfigurationError","oneHour","down","mseAddSourceBufferError","left-down","delayTimeoutRetryEnd","videoSEI","recordEnd","streamEndInner","MEDIA_ERR_NETWORK","#FFCC00","subtitle-playlist","visibilityHiddenTimeout","fullscreen","simdH264DecodeVideoWidthIsTooLarge","播放超时重播失败","不支持硬解码H265","MULAW","aiOcclusionDetectResult","5min","resetVideoDecode","wasm","Unsupported configuration","FMP4","offscreen","demuxed-track","playbackEnd","recordCreateError","Decoder error","websocketError","838578JYhFiC","talkGetUserMediaSuccess","sourceopen","playbackJustTime","recordingTimestamp","memory access out of bounds","beforeDestroy","worklet","MEDIA_ERR_SRC_NOT_SUPPORTED","udp","zooming","playing","mseSourceStartStreaming","mp4","ghostWatermarkConfig","stats","videoSequenceHeader","multiSelected","base64","flvBufferData","streamDts","decoder-pro-audio.js","widthOrHeightChange","1094720DAoogS","playbackSeek","loadstart","multiMousemove","性能面板激活","videoInfo","fogOpen","playVodTime","HEVC decoding is not supported","multiDblSelected","webTransport","videoSmooth","sourceended","webglAlignmentError","memoryLog","audioInfo","hlsError","playVodMp4Error","streamAbps","focus","closeEnd","isWebrtcForOthers","start","videoTimeUpdate","playVodEndedAndReplay","playAudio","wiperClose","fetchErrorWorker","硬解码不支持G711a/u音频格式","canvas","suspend","mpeg4","streamVbps","remote-inbound-rtp","load-response-headers","playToRenderTimes","recording","error","talkStreamOpen","hls","0000000000","key","playVodVideoSeekingByMse","mseWaitVideoCanplayTimeout","av1","flv","image/jpeg","webrtcFailed","talkStreamInactive","window","video自动渲染失败","webcodecsH265NotSupport","遮挡物检查","blob","recordCancel","playbackPrecision","A key frame is required after configure() or flush()","fullscreen$2","FLV","checkFirstIFrame","playVod","fiveMin","togglePerformancePanel","mute","visibilityChange","supportHls265","mseHandle","load-complete","playVodRateChange","wasmWidthOrHeightChange","audio packet","hls-manifest-loaded","mseWidthOrHeightChange","audioResumeState","/crypto/","playbackPreRateChange","退出全屏","Decoder failure","webrtc-closed","buffereos","waiting","global","streamError","focusNear","isHls","recordStart","worker","mseUpdateVideoTimestamp","fetchError","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","playbackPauseOrResume","loadingTimeoutRetryEnd","cruiseStop","switch-url-success","videoSyncAudio","5322ZdcGUT","ceil","playback","playVodPause","durationchange","AliyunRtc","startstreaming","buffer","playbackEndInner","volume","crashLog","wasmDecodeError","isFmp4","videoElementPlayingFailed","ws1006","local-candidate","debug","g711a","white","playFailedAndPaused","audioChannelError","streamEnd","notSupportNewWasm","flv-script-data","certificate","initAudioCodec","aliyunRtcError","leftUp","Webgl 渲染失败","fetchClose","isDropping","log","aacSequenceHeader","defaultStreamQuality","3-1","mov","wcsDecodeError","endstreaming","image/png","csrc","mediaSourceAudioInitTimeout","操作盘激活","pauseAndNextPlayUseLastFrameShow","等待音频数据超时","FSimd","人脸识别","talkFailedAndStop","resetAudioDecode","267124hEmlpL","full","webFullscreen","loadeddata","webrtc","online","simple","red","isTs","关闭电子放大","websocketOpenTimeout","rtp","kBps","isWebrtc","talkStreamMsg","webgl","currentPts","playVodSeek","emptied","inbound-rtp","netBuf","viewResizeChange","canplay","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C(wasm%E5%86%85%E9%83%A8%E4%BC%9A%E6%9A%82%E5%81%9C%E8%A7%A3%E7%A0%81)%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","aiImageDetectResult","playIsNotPauseOrUrlIsNull","fiStop","webrtc-completed","MediaSource解码使用canvas渲染失败","H264(AVC)","加载超时重播失败","decoderWorkerInitError","pressureObserverCpu","sender","audioAACSequenceHeader","playVodPauseOrResume","videoPayload","websocket","talk","created","apertureFar","AAC","mseSourceBufferError","mseSourceBufferFull","streamMessage","metadata-parsed","decoder-pro-hard.js","normal","ended","blur","30min","webrtcOnIceConnectionStateChange","object","请求失败","性能面板","mediaSourceH265NotSupport","loading","resize","replayUseLastFrameShow","videoCode","Invalid NAL unit size","stream-parsed","workerFetch","close","idle","qualitychange","初始化解码器失败","seeked","电子放大","playVodTimeCache","loadingTimeout","decoder-pro-old.js","right","webrtcConnected","websocket1006Error","mediaSourceDecoderConfigurationError","ratechange","isMulti","停止录制","mseWorkerAddSourceBufferError","playbackTime","multiIndex","playbackStreamVideoFps","jbprov","ptz","请求结束","fetch","multiMouseup","decoderWorkerInit","multiMouseout","初始化worker失败","466604DtBNmk","video","switch-url-failed","playVodSeekEnd","fullScreenByStart","notConnect","isFlv","webrtc不支持H265","webrtcCompleted","volumechange","decoder-pro.js","networkDelay","playbackShowPrecisionChange","webgl 上下文丢失","resetDecode","audioNalu","websocketOpen","delta","playVodEnded","decoderWorkerWasmError","4663305DsBMOx","loadedmetadata","buffering","talkGetUserMediaFail","load","物品识别","AbortError","empty","failedToAsynchronouslyPrepareWasm","webrtcClosed","seeking","mediaSourceAudioG711NotSupport"];return(de=function(){return e})()}const fe=36e5,pe=4080,me=12;$(776),$(451),$(603);const _e={playIsNotPauseOrUrlIsNull:"播放地址不能为空",webglAlignmentError:$(348),webglContextLostError:$(472),mediaSourceH265NotSupport:$(665),mseSourceBufferFull:$(499),mediaSourceAppendBufferError:$(434),mseSourceBufferError:$(544),mseAddSourceBufferError:"初始化解码器失败",mseWorkerAddSourceBufferError:$(434),mediaSourceDecoderConfigurationError:"初始化解码器失败",mediaSourceTsIsMaxDiff:$(605),mseWidthOrHeightChange:$(605),mediaSourceAudioG711NotSupport:$(730),mediaSourceAudioInitTimeout:$(551),mediaSourceAudioNoDataTimeout:"等待音频数据超时",mediaSourceUseCanvasRenderPlayFailed:$(396),mediaSourceBufferedIsZeroError:$(605),webcodecsH265NotSupport:$(665),webcodecsUnsupportedConfigurationError:$(434),webcodecsDecodeConfigureError:$(434),webcodecsDecodeError:$(544),webcodecsAudioInitTimeout:$(551),webcodecsAudioNoDataTimeout:$(363),wcsWidthOrHeightChange:$(544),wasmDecodeError:$(544),simdDecodeError:"解码失败",wasmWidthOrHeightChange:$(605),wasmUseVideoRenderError:"video自动渲染失败",videoElementPlayingFailed:$(752),simdH264DecodeVideoWidthIsTooLarge:$(561),networkDelayTimeout:"网络超时重播失败",fetchError:$(421),streamEnd:$(453),websocket1006Error:$(539),websocketError:$(421),webrtcError:$(421),hlsError:$(421),decoderWorkerInitError:$(458),decoderWorkerWasmError:"wasm解码失败",videoElementPlayingFailedForWebrtc:"video自动渲染失败",videoInfoError:"解析视频分辨率失败",webrtcStreamH265:$(466),delayTimeout:$(664),loadingTimeout:$(398),loadingTimeoutRetryEnd:$(398),delayTimeoutRetryEnd:$(664),flvDemuxBufferSizeTooLarge:"FLV待解封装buffer过大",audioChannelError:$(621),aliyunRtcError:"请求失败",mseWaitVideoCanplayTimeout:$(605),initDecoderWorkerTimeout:$(630)},ve={playType:re.player,videoBuffer:1e3,videoBufferDelay:1e3,networkDelay:1e4,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isFmp4:!1,isWebrtc:!1,isWebrtcForZLM:!1,isWebrtcForSRS:!1,webrtcForSRSBySDK:!1,isWebrtcForOthers:!1,isNakedFlow:!1,isMpeg4:!1,isAliyunRtc:!1,isTs:!1,debug:!1,debugLevel:oe.warn,debugUuid:"",isMulti:!0,multiIndex:-1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,pageVisibilityHiddenTimeout:300,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,heartTimeoutReplayUseLastFrameShow:!0,replayUseLastFrameShow:!0,replayShowLoadingIcon:!1,supportDblclickFullscreen:!1,showBandwidth:!1,showPerformance:!1,mseCorrectTimeDuration:20,mseCorrectAudioTimeDuration:20,keepScreenOn:!0,isNotMute:!1,muted:!0,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1,ptz:!1,quality:!1,zoom:!1,close:!1,scale:!1,performance:!1,logSave:!1,aiFace:!1,aiObject:!1,aiOcclusion:!1,fullscreenFn:null,fullscreenExitFn:null,screenshotFn:null,playFn:null,pauseFn:null,recordFn:null,recordStopFn:null},extendOperateBtns:[],contextmenuBtns:[],watermarkConfig:{},controlAutoHide:!1,controlAutoHideDelayTime:5,hasControl:!1,controlSize:le[$(415)],loadingIcon:!0,loadingIconStyle:{},loadingText:"",background:"",poster:"",backgroundLoadingShow:!0,loadingBackground:"",loadingBackgroundWidth:0,loadingBackgroundHeight:0,decoder:$(469),decoderOld:$(439),decoderAudio:$(700),decoderHard:$(414),decoderHardNotWasm:"decoder-pro-hard-not-wasm.js",wasmMp4RecorderDecoder:"jessibuca-pro-mp4-recorder-decoder.js",decoderWASM:"",isDecoderUseCDN:!1,url:"",rotate:0,mirrorRotate:$(612),aspectRatio:$(632),playbackConfig:{playList:[],fps:"",autoCalcFps:!0,showControl:!0,controlType:ue[$(415)],duration:0,startTime:"",showRateBtn:!1,rateConfig:[],showPrecision:"",showPrecisionBtn:!0,isCacheBeforeDecodeForFpsRender:!1,uiUsePlaybackPause:!1,isPlaybackPauseClearCache:!0,isUseFpsRender:!1,isUseLocalCalculateTime:!1,localOneFrameTimestamp:40,supportWheel:!1,useWCS:!1,useMSE:!1,useSIMD:!0},qualityConfig:[],defaultStreamQuality:"",scaleConfig:["拉伸","缩放","正常"],forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:ee[$(454)],demuxType:ne.flv,useWasm:!1,useOldWasm:!1,useMSE:!1,useWCS:!1,useSIMD:!0,isFFmpegSIMD:!1,useMThreading:!1,preferredHardDecode:!1,wcsUseVideoRender:!0,wcsUseWebgl2Render:!1,wasmUseVideoRender:!0,mseUseCanvasRender:!1,hlsUseCanvasRender:!1,webrtcUseCanvasRender:!1,useOffscreen:!1,useWebGPU:!1,useWebCanvas:!1,mseDecodeErrorReplay:!0,wcsDecodeErrorReplay:!0,wasmDecodeErrorReplay:!0,simdDecodeErrorReplay:!0,simdDecodeErrorReplayType:se[$(670)],autoWasm:!0,decoderErrorAutoWasm:!1,hardDecodingNotSupportAutoWasm:!0,webglAlignmentErrorReplay:!0,webglContextLostErrorReplay:!0,openWebglAlignment:!1,syncAudioAndVideo:!0,syncAudioAndVideoDiff:400,playbackDelayTime:1e3,playbackFps:25,playVodFps:25,playbackForwardMaxRateDecodeIFrame:4,playbackCurrentTimeMove:!0,useVideoRender:!0,useCanvasRender:!1,videoRenderType:"",networkDelayTimeoutReplay:!1,recordType:ie[$(692)],checkFirstIFrame:!0,nakedFlowFps:25,audioEngine:null,isShowRecordingUI:!0,isShowZoomingUI:!0,useFaceDetector:!1,useObjectDetector:!1,useImageDetector:!1,useOcclusionDetector:!1,ptzPositionConfig:{},ptzShowType:"vertical",ptzClickType:ce,ptzStopEmitDelay:.3,ptzZoomShow:!1,ptzApertureShow:!1,ptzFocusShow:!1,ptzMoreArrowShow:!1,ptzCruiseShow:!1,ptzFogShow:!1,ptzWiperShow:!1,ptzSupportDraggable:!1,weiXinInAndroidAudioBufferSize:4800,isCryptoAudio:!1,isM7sCrypto:!1,isSm4Crypto:!1,isSm4CryptoH265V2:!1,isXorCrypto:!1,sm4CryptoKey:"",m7sCryptoKey:"",xorCryptoKey:"",cryptoKey:"",cryptoIV:"",cryptoKeyUrl:"",listenWindowResizeAuoResize:!0,orientationChangeResize:!1,useWebFullScreen:!1,ptsMaxDiff:3600,aiFaceDetectLevel:2,aiFaceDetectWidth:240,aiFaceDetectEmitBase64:!1,aiFaceDetectShowRect:!0,aiFaceDetectInterval:1e3,aiFaceDetectRectConfig:{},aiObjectDetectLevel:2,aiObjectDetectWidth:240,aiObjectDetectShowRect:!0,aiObjectDetectInterval:1e3,aiObjectDetectRectConfig:{},aiObjectDetectTarget:"",aiOcclusionDetectInterval:1e3,aiImageDetectDrop:!1,aiImageDetectActive:!1,videoRenderSupportScale:!0,mediaSourceTsIsMaxDiffReplay:!0,controlHtml:"",isH265:!1,isWebrtcH265:!1,supportLockScreenPlayAudio:!0,supportHls265:!0,hls265ForceFixLargeGap:!0,isEmitSEI:!1,pauseAndNextPlayUseLastFrameShow:!1,demuxUseWorker:!0,playFailedAndReplay:!0,showMessageConfig:_e,videoElementPlayingFailedReplay:!0,mp4RecordUseWasm:!0,mseAutoCleanupSourceBuffer:!0,mseAutoCleanupMaxBackwardDuration:30,mseAutoCleanupMinBackwardDuration:10,widthOrHeightChangeReplay:!0,simdH264DecodeVideoWidthIsTooLargeReplay:!0,mediaSourceAudioG711NotSupportReplay:!0,mediaSourceAudioInitTimeoutReplay:!0,mediaSourceAudioNoDataTimeoutReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplayType:ae[$(460)],webcodecsAudioInitTimeoutReplay:!0,webcodecsAudioNoDataTimeoutReplay:!0,widthOrHeightChangeReplayDelayTime:0,ghostWatermarkConfig:{on:5,off:5,content:"",fontSize:12,color:$(338),opacity:.15,speed:.2},dynamicWatermarkConfig:{content:"",speed:.2,fontSize:12,color:$(338),opacity:.15},isDropSameTimestampGop:!1,mseDecodeAudio:!0,wcsDecodeAudio:!0,nakedFlowH265DemuxUseNew:!0,nakedFlowDemuxUseNew:!0,extendDomConfig:{html:"",showBeforePlay:!1,showAfterLoading:!0},disableContextmenu:!1,mseDecoderUseWorker:!0,openMemoryLog:!1,mainThreadFetchUseWorker:!0,playFailedAndPausedShowPlayBtn:!0,mseCorrectionTimestamp:!0,flvDemuxBufferSizeTooLargeReplay:!1,flvDemuxBufferSizeTooLargeEmitFailed:!1,flvDemuxBufferSizeMaxLarge:1048576,isCheckInView:!1,hiddenControl:!1,androidMobileFullscreenRotate:!0,disableModule:{ptz:!1,record:!1,zoom:!1,watermark:!1,playback:!1},recordWebMSupportSeek:!1,wasmPlayAudioUseVideoRender:!1,mseWaitVideoCanplayTimeout:6,mseWaitVideoCanplayAutoWasm:!0,zoomMaxScale:5,zoomSupportGestureInMobile:!1,zoomSupportGestureInMobileSpeed:.2,drawingRectColor:$(375),drawingRectLineWidth:1,drawingRectEndRemoveDom:!0,videoSEISyncPtsDiff:.2,initShowPlayBtn:!1,playbackCheckStreamEnd:!0,autoUseSystemFullScreen:!0,playVodConfig:{showRateBtn:!1,rateConfig:[],useWCS:!1,useMSE:!0,useSIMD:!0,startTime:null},playVodForwardMaxRateDecodeIFrame:8,playVodEndedAndAutoReplay:!1,playVodEndedAndShowPlayBtn:!0,hotKeyVolumeStep:.05,hotKeySeekStep:5,websocketOpenTimeout:8,i18n:{},screenshotUseHighQuality:!1,requestAnimationFrameMaxDiff:800,isUseFileProtocol:!1};$(509),$(445),$(540),$(767),$(362),$(426),$(536),$(449),$(465),$(332),$(642),$(786),$(381),$(570),$(589),$(723),$(376),$(693),$(533),$(353),$(609),$(438);const ye={init:$(552),initVideo:$(516),render:"render",playAudio:$(727),initAudio:$(583),kBps:$(380),decode:$(590),audioCode:"audioCode",audioNalu:$(474),audioAACSequenceHeader:$(402),videoCode:$(427),videoCodec:"videoCodec",videoNalu:"videoNalu",videoPayload:$(404),audioPayload:$(496),wasmError:$(576),workerFetch:$(430),iframeIntervalTs:"iframeIntervalTs",isDropping:$(350),workerEnd:"workerEnd",networkDelay:$(470),playbackStreamVideoFps:$(450),wasmWidthOrHeightChange:$(771),simdDecodeError:$(594),simdH264DecodeVideoWidthIsTooLarge:$(663),websocketOpen:$(475),websocketStringMsg:$(560),closeEnd:$(722),tempStream:"tempStream",videoSEI:$(655),flvScriptData:$(611),aacSequenceHeader:$(352),videoSequenceHeader:$(695),flvBufferData:$(698),checkFirstIFrame:$(761),mseHandle:$(768),mseFirstRenderTime:$(584),mseError:"mseError",notSupportNewWasm:$(342),failedToAsynchronouslyPrepareWasm:"failedToAsynchronouslyPrepareWasm"};$(428);const ge={audio:1,video:2},be={audio:8,video:9,scriptData:18},Se={init:"init",decode:$(590),audioDecode:"audioDecode",videoDecode:"videoDecode",initAudioCodec:$(345),initVideoCodec:"initVideoCodec",close:"close",updateConfig:$(633),resetDecode:$(473),clearBuffer:"clearBuffer",resetAudioDecode:$(367),resetVideoDecode:$(669),fetchStream:"fetchStream",sendWsMessage:$(558),mseUpdateVideoTimestamp:$(789),playbackIsPause:"playbackIsPause"};$(454),$(790),$(729),$(349),$(552),$(454),$(547),$(327),$(475),$(560);const Ie={fullscreen:$(759),fullScreenByStart:$(463),webFullscreen:$(370),decoderWorkerInit:$(456),play:"play",playing:"playing",pause:$(492),mute:$(765),load:$(483),loading:$(424),zooming:"zooming",drawingRect:$(640),drawingRectInfo:"drawingRectInfo",videoInfo:$(707),timeUpdate:$(529),audioInfo:$(717),log:$(351),error:$(739),kBps:"kBps",timeout:$(609),delayTimeout:$(534),delayTimeoutRetryEnd:$(654),loadingTimeout:$(438),loadingTimeoutRetryEnd:$(793),stats:"stats",performance:"performance",videoSmooth:$(713),faceDetectActive:$(507),objectDetectActive:"objectDetectActive",occlusionDetectActive:$(577),imageDetectActive:$(596),record:$(565),recording:$(738),recordingTimestamp:$(683),recordStart:"recordStart",recordEnd:$(656),recordCreateError:$(676),recordBlob:"recordBlob",recordCancel:$(756),buffer:$(327),videoFrame:"videoFrame",videoSEI:"videoSEI",videoSEISyncPts:$(607),start:$(724),metadata:$(647),resize:$(425),volumechange:$(468),volume:$(329),destroy:$(601),beforeDestroy:$(685),streamEnd:"streamEnd",streamRate:"streamRate",streamAbps:$(720),streamVbps:$(734),streamDts:$(699),streamSuccess:"streamSuccess",streamMessage:$(412),streamError:$(784),streamStats:$(606),streamEndInner:$(657),mseSourceOpen:"mseSourceOpen",mseSourceClose:$(531),mseSourceended:"mseSourceended",mseSourceStartStreaming:$(691),mseSourceEndStreaming:"mseSourceEndStreaming",mseSourceBufferError:$(410),mseAddSourceBufferError:$(652),mseWorkerAddSourceBufferError:$(447),mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:$(411),videoWaiting:"videoWaiting",videoTimeUpdate:$(725),videoSyncAudio:$(319),playToRenderTimes:$(737),playbackTime:$(448),playbackTimestamp:$(617),playbackTimeScroll:$(644),playbackPrecision:$(757),playbackShowPrecisionChange:$(471),playbackJustTime:$(682),playbackStats:$(636),playbackSeek:$(703),playbackPause:$(575),playbackPauseOrResume:$(792),playbackRateChange:"playbackRateChange",playbackPreRateChange:$(777),playbackEndInner:$(328),playbackEnd:$(675),playVodStats:$(498),playVodPause:$(323),playVodPauseOrResume:$(403),playVodRateChange:$(770),playVodTime:$(709),playVodTimeCache:$(437),playVodSeek:$(385),playVodSeekEnd:$(462),playVodVideoSeekingByMse:$(744),playVodVideoSeekedByMse:$(625),playVodCanplay:$(620),playVodWaiting:$(573),playVodEndedAndReplay:$(726),playVodEnded:"playVodEnded",ptz:$(452),streamQualityChange:$(530),visibilityChange:$(766),netBuf:$(388),close:$(431),networkDelayTimeout:$(595),togglePerformancePanel:$(764),viewResizeChange:$(389),flvDemuxBufferSizeTooLarge:"flvDemuxBufferSizeTooLarge",talkGetUserMediaSuccess:$(680),talkGetUserMediaFail:$(482),talkGetUserMediaTimeout:$(555),talkStreamStart:"talkStreamStart",talkStreamOpen:$(740),talkStreamClose:$(608),talkStreamError:$(572),talkStreamInactive:$(750),talkStreamMsg:$(382),webrtcDisconnect:$(578),webrtcFailed:$(749),webrtcClosed:$(488),webrtcChecking:$(528),webrtcConnected:$(441),webrtcCompleted:$(467),webrtcOnConnectionStateChange:"webrtcOnConnectionStateChange",webrtcOnIceConnectionStateChange:"webrtcOnIceConnectionStateChange",crashLog:$(330),focus:"focus",blur:$(417),inView:$(616),visibilityHiddenTimeout:"visibilityHiddenTimeout",websocketOpen:$(475),websocketClose:$(527),websocketError:$(678),websocketStringMsg:"websocketStringMsg",aiObjectDetectorInfo:$(623),aiFaceDetectorInfo:$(556),aiOcclusionDetectResult:$(667),aiImageDetectResult:$(392),playFailedAndPaused:$(339),audioResumeState:$(775),webrtcStreamH265:$(579),flvMetaData:$(614),talkFailedAndStop:$(366),removeLoadingBgImage:"removeLoadingBgImage",memoryLog:$(716),downloadMemoryLog:"downloadMemoryLog",pressureObserverCpu:$(400),currentPts:$(384),online:$(373),offline:"offline",networkState:$(524),clickInitPlayer:$(554)};$(483),$(529),$(707),$(739),$(380),$(724),$(609),$(438),$(793),$(534),$(654),$(662),$(370),$(550),$(492),$(765),$(694),$(523),$(787),$(656),$(585),$(756),$(737),$(703),$(636),$(617),$(792),$(675),$(477),$(403),$(709),$(385),$(462),$(452),$(530),$(689),$(330),$(721),$(417),$(661),$(766),$(475),$(527),$(560),$(556),$(667),$(339),$(341),$(775),$(655),$(607),$(614),$(419),$(384),$(713),$(329),$(554),$(608),$(572),$(750),$(555),$(382),$(529),$(717),$(739),$(380),$(724),$(609),$(438),$(793),$(534),$(654),$(694),$(737),$(330),$(475),$(527),$(339),$(775);const we={talkStreamError:Ie.talkStreamError,talkStreamClose:Ie[$(608)]},Ae={playError:$(393),fetchError:$(790),fetchErrorWorker:"fetchErrorWorker",websocketError:$(678),websocketOpenTimeout:$(378),webcodecsH265NotSupport:$(753),webcodecsDecodeError:"webcodecsDecodeError",webcodecsUnsupportedConfigurationError:$(649),webcodecsDecodeConfigureError:$(641),webcodecsAudioInitTimeout:$(619),webcodecsAudioNoDataTimeout:$(588),mediaSourceH265NotSupport:$(423),mediaSourceAudioG711NotSupport:$(490),mediaSourceAudioInitTimeout:$(360),mediaSourceAudioNoDataTimeout:"mediaSourceAudioNoDataTimeout",mediaSourceDecoderConfigurationError:$(443),mediaSourceFull:Ie[$(411)],mseSourceBufferError:Ie.mseSourceBufferError,mseAddSourceBufferError:Ie[$(652)],mseWorkerAddSourceBufferError:Ie[$(447)],mediaSourceAppendBufferError:$(564),mediaSourceTsIsMaxDiff:"mediaSourceTsIsMaxDiff",mediaSourceUseCanvasRenderPlayFailed:"mediaSourceUseCanvasRenderPlayFailed",mediaSourceBufferedIsZeroError:$(511),wasmDecodeError:$(331),wasmUseVideoRenderError:"wasmUseVideoRenderError",simdH264DecodeVideoWidthIsTooLarge:$(663),simdDecodeError:"simdDecodeError",hlsError:$(718),webrtcError:"webrtcError",webrtcClosed:Ie.webrtcClosed,webrtcIceCandidateError:"webrtcIceCandidateError",webglAlignmentError:$(715),wasmWidthOrHeightChange:$(771),mseWidthOrHeightChange:$(774),wcsWidthOrHeightChange:"wcsWidthOrHeightChange",widthOrHeightChange:$(701),tallWebsocketClosedByError:"tallWebsocketClosedByError",flvDemuxBufferSizeTooLarge:Ie[$(562)],audioChannelError:$(340),webglContextLostError:"webglContextLostError",videoElementPlayingFailed:$(333),videoElementPlayingFailedForWebrtc:"videoElementPlayingFailedForWebrtc",decoderWorkerInitError:$(399),decoderWorkerWasmError:$(478),videoInfoError:$(586),streamEnd:Ie.streamEnd,websocket1006Error:$(442),delayTimeout:Ie[$(534)],loadingTimeout:Ie[$(438)],networkDelayTimeout:Ie[$(595)],fullscreenError:"fullscreenError",aliyunRtcError:$(346),mseWaitVideoCanplayTimeout:$(745),initDecoderWorkerTimeout:$(597),notSupportNewWasm:$(342),failedToAsynchronouslyPrepareWasm:$(487),playVodMp4Error:$(719),mp4Error:"mp4Error",...we},ke={notConnect:$(464),open:$(512),close:$(431),error:$(739)},Ee={connecting:0,open:1,closing:2,closed:3};$(486),$(369),$(563),$(697),$(755),$(755),$(397);const Ce={h264:7,h265:12,mpeg4:99},xe={h264:$(397),h265:"H265(HEVC)"},Be={AAC:10,ALAW:7,MULAW:8,MP3:2,OPUS:13,G711A:7,G711U:8};$(409),$(525),$(571),$(409),$(522),$(666),$(571);const Te={sps:7,pps:8,iFrame:5,kUnspecified:0,kSliceNonIDR:1,kSliceDPA:2,kSliceDPB:3,kSliceDPC:4,kSliceIDR:5,kSliceSEI:6,kSliceSPS:7,kSlicePPS:8,kSliceAUD:9,kEndOfSequence:10,kEndOfStream:11,kFiller:12,kSPSExt:13,kReserved0:14},De={pFrame:1,kSliceBLA_W_LP:16,kSliceBLA_W_RADL:17,kSliceBLA_N_LP:18,iFrame:19,kSliceIDR_W_RADL:19,nLp:20,kSliceIDR_N_LP:20,craNut:21,kSliceCRA_NUT:21,kSliceRSV_IRAP_VCL22:22,kSliceRSV_IRAP_VCL23:23,vps:32,kSliceVPS:32,sps:33,kSliceSPS:33,pps:34,kSlicePPS:34,kSliceAUD:35,sei:39,prefixSei:39,suffixSei:40};$(549),$(383),$(515),$(546),$(627),$(372);const Me={key:$(743),delta:$(476)},Ue={avc:$(569),hev:'video/mp4; codecs="hev1.1.6.L123.b0"',hev2:$(629),hev3:'video/mp4;codecs="hev1.2.4.L120.90"',hev4:'video/mp4;codecs="hev1.3.E.L120.90"',hev5:$(581)},Fe={ended:"ended",open:"open",closed:$(537)};Math[$(321)](40),$(650),$(548),$(508),$(763),$(624),$(418),$(668),$(650),$(548),$(508),$(763),$(651),$(622),$(598),$(653),$(643),$(440),$(651),$(622),$(347),$(648),$(394),$(408),$(543),$(785),$(574),$(794),$(708),$(520),$(567),$(728);$(337),$(646),$(637),$(491);$(358),$(748);const Pe={sourceClose:$(538),sourceOpen:$(681),sourceended:$(714),startstreaming:$(326),endstreaming:$(357),qualitychange:$(433)};$(390),$(782),$(444),$(517),$(480);const Le={h264:$(510),h265:"hevc",av1:$(746)};$(758),$(671),$(779),$(677),$(710);const Re={abortError:"The user aborted a request",abortError2:$(485),abort:"AbortError"};$(424),$(559),$(601);const Ne={sequenceHeader:0,nalu:1},Oe={keyFrame:1,interFrame:2};$(486),$(379),$(628),$(521),$(688);$(322),$(512),$(431);$(686),$(592);$(337),$(379),$(521),$(742),$(519),$(686),$(686),$(592),$(659),$(610),$(711),$(696),$(542),$(457),$(455),$(705),$(635),$(354),$(514),$(495),$(460);const ze=1;function He(e,t){const r=de();return(He=function(e,t){return r[e-=318]})(e,t)}$(626),$(519),$(747),$(566),$(773),$(674),$(343),$(413),$(613),$(532),$(615),$(769),$(736),$(639),$(781),$(580),$(461),$(318),$(660),$(429),$(739);const Ve={idle:$(432),connecting:"connecting",buffering:$(481),error:$(739),complete:$(497)};$(599),$(658),$(645),$(687),$(513),$(772),$(582),$(684);const Ge={video:1,audio:2},We=128,je={PACKET_TYPE_SEQ_START:0,PACKET_TYPE_FRAMES:1,PACKET_TYPE_SEQ_END:2,PACKET_TYPE_FRAMESX:3,PACKET_TYPE_METADATA:4},qe={FT_KEY:16,FT_INTER:32};$(501),$(344),$(359),$(387),$(335),$(504),$(500),$(735),$(401),$(557),$(593),$(535),$(334),$(526),$(356),$(784),$(506),$(618),$(395),$(780),$(407),$(424),$(690);const Ke=typeof window===$(420)&&window[$(751)]===window?window:"object"==typeof self&&self.self===self?self:typeof global===$(420)&&global[$(783)]===global?global:void 0;$(390),$(497),$(324),$(386),$(416),$(739),$(371),$(480),$(704),$(492),$(550),$(690),$(444),$(435),$(489),$(517),$(732),$(468),$(782),$(493),$(778),$(446),$(553),$(361),$(436),$(377),$(422),$(706),$(365),$(541),$(484),$(638),$(754),$(600),$(545),$(364),$(791),$(391);var Ye="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Je(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Xe(e,t){return e(t={exports:{}},t.exports),t.exports}var Ze=Object.freeze({__proto__:null,commonjsGlobal:Ye,commonjsRequire:Je,unwrapExports:function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e},createCommonjsModule:Xe,getCjsExportFromNamespace:function(e){return e&&e.default||e}});function Qe(e,t){var r=et();return(Qe=function(e,t){return r[e-=110]})(e,t)}var $e=Qe;function et(){var e=["3414248qnrIWN","screenfull","webkitRequestFullscreen","exports","fullscreenEnabled","request","then","webkitfullscreenchange","fullscreenElement","184stdKKa","msRequestFullscreen","object","9lMXtwY","msFullscreenElement","mozfullscreenerror","MSFullscreenChange","msExitFullscreen","mozfullscreenchange","webkitCancelFullScreen","209amwwJF","113730PRPPzI","document","161axjDrJ","exitFullscreen","webkitExitFullscreen","fullscreenchange","msFullscreenEnabled","webkitFullscreenElement","defineProperties","MSFullscreenError","36258UaiqUm","mozRequestFullScreen","webkitFullscreenEnabled","mozFullScreenEnabled","webkitRequestFullScreen","requestFullscreen","22404984TwrbpP","webkitfullscreenerror","fullscreenerror","195996EbFvyo","isFullscreen","mozFullScreenElement","30930JyYnhv","bind","off","catch","length","1jHPvgq","change","960445ICMJLX","isEnabled","undefined","exit","addEventListener"];return(et=function(){return e})()}!function(e,t){for(var r=Qe,i=e();;)try{if(320878===parseInt(r(125))/1*(-parseInt(r(117))/2)+parseInt(r(120))/3*(-parseInt(r(141))/4)+-parseInt(r(127))/5+-parseInt(r(162))/6*(parseInt(r(154))/7)+-parseInt(r(132))/8*(parseInt(r(144))/9)+parseInt(r(152))/10*(-parseInt(r(151))/11)+parseInt(r(114))/12)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(et),Xe((function(e){var t,r,i,n,s,a;t=Qe,r=typeof window!==t(129)&&typeof window[t(153)]!==t(129)?window[t(153)]:{},i=t(143)!==t(129)&&e.exports,n=function(){for(var e,i=t,n=[[i(113),i(155),i(140),i(136),i(157),"fullscreenerror"],[i(134),i(156),i(159),i(110),i(139),i(115)],[i(112),i(150),"webkitCurrentFullScreenElement",i(150),i(139),i(115)],[i(163),"mozCancelFullScreen",i(119),i(111),i(149),i(146)],[i(142),i(148),i(145),i(158),i(147),i(161)]],s=0,a=n[i(124)],o={};s32&&console.error(t(220)),e<=this[t(235)]){let r=this._current_word>>>32-e;return this[t(211)]<<=e,this._current_word_bits_left-=e,r}let r=this._current_word_bits_left?this[t(211)]:0;r>>>=32-this[t(235)];let i=e-this[t(235)];this[t(216)]();let n=Math[t(227)](i,this[t(235)]),s=this[t(211)]>>>32-n;return this._current_word<<=n,this[t(235)]-=n,r=r<>>t))return this[e(211)]<<=t,this[e(235)]-=t,t;return this._fillCurrentWord(),t+this[e(226)]()}readUEG(){const e=tt;let t=this[e(226)]();return this[e(224)](t+1)-1}[tt(225)](){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}function it(){const e=["3285801aGNRhI","24ALpAEf","44nAkXIO","7065149YpGaeB","_buffer_index","16685QJLSTP","_current_word_bits_left","destroy","readByte","6HveHZC","set","_current_word","subarray","100VfyGEd","6459640kLNGiV","getUint32","_fillCurrentWord","_total_bytes","20302DqtQdR","error","ExpGolomb: readBits() bits exceeded max 32bits!","1538220glXaiz","byteLength","2225700PuBUSb","readBits","readSEG","_skipLeadingZero","min","19tiTXqe"];return(it=function(){return e})()}function nt(e,t){const r=it();return(nt=function(e,t){return r[e-=209]})(e,t)}const st=ut;!function(e,t){const r=ut,i=e();for(;;)try{if(591172===-parseInt(r(231))/1*(-parseInt(r(208))/2)+parseInt(r(205))/3*(-parseInt(r(248))/4)+-parseInt(r(241))/5+-parseInt(r(232))/6*(parseInt(r(263))/7)+parseInt(r(207))/8+-parseInt(r(255))/9+-parseInt(r(251))/10*(-parseInt(r(239))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(pt);const at=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1],ot=at,ct=at;function ut(e,t){const r=pt();return(ut=function(e,t){return r[e-=204]})(e,t)}function lt(e){let{profile:t,sampleRate:r,channel:i}=e;return new Uint8Array([175,0,t<<3|(14&r)>>1,(1&r)<<7|i<<3])}function ht(e){return dt(e)&&e[1]===Ne.sequenceHeader}function dt(e){const t=ut;return e[0]>>4===Be[t(246)]}const ft=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];function pt(){const e=["frameLengthType = ","30KVQjDG","navigator","461800CPPgMK","448408DVDQDo","StreamMuxConfig Missing","bufpos","readBits","firefox","eof_flag_","iserro","Invalid sampling index: ","bufoff","sample_rate","more than 2 numLayer Not Supported","mp4a.40.","audio_object_type","current_syncword_offset_","error","allStreamsSameTimeFraming zero is Not Supported","sampling_freq_index","buflen","byteLength","read","set","data","toLowerCase","5jRYFex","6zopxbb","sbr","subarray","destroy","channel_config","userAgent","aac","11RNuKzZ","readBool","647345wJUtMC","getLATMValue","Flv: AAC invalid sampling frequency index!","log","data_","AAC","aacEncoderConfigurationRecord","271332ObnXOW","unshift",". Only frameLengthType = 0 Supported","18610670ZEdkEk","indexOf","android","chan_config","4146507xHAUjA","channels","warn","more than 2 numSubFrames Not Supported","has_last_incomplete_data","findNextSyncwordOffset","object_type","mp4a.40.2","8260826dRbdMP","hasIncompleteData","other_data_present","buffer","readNextAACFrame","length","look","sampling_frequency","read_golomb","ext_object_type","slice","Flv: AAC invalid channel configuration","more than 2 numProgram Not Supported","readByte","sampling_index"];return(pt=function(){return e})()}function mt(e){const t=ut;let r=new Uint8Array(e),i=null,n=0,s=0,a=0,o=null;if(n=s=r[0]>>>3,a=(7&r[0])<<1|r[1]>>>7,a<0||a>=ft[t(268)])return void console[t(222)](t(243));let c=ft[a],u=(120&r[1])>>>3;if(u<0||u>=8)return void console[t(244)](t(274));5===n&&(o=(7&r[1])<<1|r[2]>>>7,r[2]);let l=Ke[t(206)][t(237)][t(230)]();return-1!==l[t(252)](t(212))?a>=6?(n=5,i=new Array(4),o=a-3):(n=2,i=new Array(2),o=a):-1!==l[t(252)](t(253))?(n=2,i=new Array(2),o=a):(n=5,o=a,i=new Array(4),a>=6?o=a-3:1===u&&(n=2,i=new Array(2),o=a)),i[0]=n<<3,i[0]|=(15&a)>>>1,i[1]=(15&a)<<7,i[1]|=(15&u)<<3,5===n&&(i[1]|=(15&o)>>>1,i[2]=(1&o)<<7,i[2]|=8,i[3]=0),{audioType:t(238),config:i,sampleRate:c,channelCount:u,objectType:n,codec:t(219)+n,originalCodec:t(219)+s}}st(227),st(269),st(271);class _t{constructor(e){const t=st;this[t(245)]=e,this[t(213)]=!1,this[t(221)]=this[t(260)](0),this.eof_flag_&&console.error("Could not found ADTS syncword until payload end")}[st(260)](e){const t=st;let r=e,i=this[t(245)];for(;;){if(r+7>=i[t(226)])return this.eof_flag_=!0,i[t(226)];if(4095===(i[r+0]<<8|i[r+1])>>>4)return r;r++}}[st(267)](){const e=st;let t=this[e(245)],r=null;for(;null==r&&!this.eof_flag_;){let i=this.current_syncword_offset_,n=(8&t[i+1])>>>3,s=(6&t[i+1])>>>1,a=1&t[i+1],o=(192&t[i+2])>>>6,c=(60&t[i+2])>>>2,u=(1&t[i+2])<<2|(192&t[i+3])>>>6,l=(3&t[i+3])<<11|t[i+4]<<3|(224&t[i+5])>>>5;if(t[i+6],i+l>this.data_[e(226)]){this[e(213)]=!0,this[e(259)]=!0;break}let h=1===a?7:9,d=l-h;i+=h;let f=this[e(260)](i+d);if(this[e(221)]=f,0!==n&&1!==n||0!==s)continue;let p=t[e(234)](i,i+d);r={},r[e(220)]=o+1,r.sampling_freq_index=c,r[e(270)]=ot[c],r[e(236)]=u,r[e(229)]=p}return r}hasIncompleteData(){return this.has_last_incomplete_data}getIncompleteData(){const e=st;return this[e(259)]?this[e(245)][e(234)](this[e(221)]):null}}class vt{constructor(e){const t=st;this[t(245)]=e,this[t(213)]=!1,this[t(221)]=this.findNextSyncwordOffset(0),this[t(213)]&&console[t(222)]("Could not found ADTS syncword until payload end")}[st(260)](e){const t=st;let r=e,i=this.data_;for(;;){if(r+1>=i[t(226)])return this[t(213)]=!0,i[t(226)];if(695===(i[r+0]<<3|i[r+1]>>>5))return r;r++}}getLATMValue(e){const t=st;let r=e.readBits(2),i=0;for(let n=0;n<=r;n++)i<<=8,i|=e[t(276)]();return i}[st(267)](e){const t=st;let r=this[t(245)],i=null;for(;null==i&&!this[t(213)];){let n=this[t(221)],s=(31&r[n+1])<<8|r[n+2];if(n+3+s>=this[t(245)][t(226)]){this.eof_flag_=!0,this.has_last_incomplete_data=!0;break}let a=new rt(r[t(234)](n+3,n+3+s)),o=null;if(a[t(240)]()){if(null==e){console[t(257)](t(209)),this[t(221)]=this[t(260)](n+3+s),a[t(235)]();continue}o=e}else{let e=a[t(240)]();if(e&&a[t(240)]()){console[t(222)]("audioMuxVersionA is Not Supported"),a[t(235)]();break}if(e&&this.getLATMValue(a),!a[t(240)]()){console[t(222)](t(223)),a.destroy();break}if(0!==a[t(211)](6)){console[t(222)](t(258)),a[t(235)]();break}if(0!==a[t(211)](4)){console[t(222)](t(275)),a.destroy();break}if(0!==a.readBits(3)){console.error(t(218)),a[t(235)]();break}let r=e?this[t(242)](a):0,i=a[t(211)](5);r-=5;let n=a.readBits(4);r-=4;let s=a[t(211)](4);r-=4,a.readBits(3),r-=3,r>0&&a[t(211)](r);let c=a[t(211)](3);if(0!==c){console.error(t(204)+c+t(250)),a.destroy();break}a[t(276)]();let u=a[t(240)]();if(u)if(e)this[t(242)](a);else{let e=0;for(;;){e<<=8;let r=a[t(240)]();if(e+=a[t(276)](),!r)break}console[t(244)](e)}a[t(240)]()&&a.readByte(),o={},o.audio_object_type=i,o[t(224)]=n,o[t(270)]=ot[o[t(224)]],o[t(236)]=s,o.other_data_present=u}let c=0;for(;;){let e=a[t(276)]();if(c+=e,255!==e)break}let u=new Uint8Array(c);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:0;return(e[r]<<24>>>0)+(e[r+1]<<16)+(e[r+2]<<8)+(e[r+3]||0)}function bt(e){const t=St;let r=arguments[t(132)]>1&&void 0!==arguments[1]?arguments[1]:4;if(e[t(132)]<4)return[];const i=e.length,n=[];let s,a=0;for(;a+r>>=8),a+=r,s){if(a+s>i)break;n.push(e.subarray(a,a+s)),a+=s}return n}function St(e,t){const r=yt();return(St=function(e,t){return r[e-=127]})(e,t)}function It(e){const t=St;let r=arguments[t(132)]>1&&void 0!==arguments[1]&&arguments[1];const i=e[t(132)];let n=r?2:1,s=0,a=0,o="";for(;255===e[n];)s+=255,n++;for(s+=e[n++];255===e[n];)a+=255,n++;if(a+=e[n++],5===s&&i>n+16)for(let r=0;r<16;r++)o+=e[n][t(134)](16),n++;return{payload:e[t(133)](n),type:s,size:a,uuid:o}}function wt(e){const t=St,r=e[t(128)],i=new Uint8Array(4);i[0]=r>>>24&255,i[1]=r>>>16&255,i[2]=r>>>8&255,i[3]=255&r;const n=new Uint8Array(r+4);return n.set(i,0),n[t(143)](e,4),n}function At(e,t){const r=St;let i=null;return t?e[r(132)]>=28&&(i=1+(3&e[26])):e[r(132)]>=12&&(i=1+(3&e[9])),i}!function(e,t){const r=St,i=e();for(;;)try{if(178190===-parseInt(r(141))/1*(-parseInt(r(131))/2)+parseInt(r(140))/3+-parseInt(r(130))/4+parseInt(r(137))/5*(-parseInt(r(138))/6)+parseInt(r(136))/7+-parseInt(r(142))/8*(-parseInt(r(144))/9)+parseInt(r(139))/10*(parseInt(r(145))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(yt);const kt=Pt;function Et(){const e=Pt;return(new Date)[e(409)]()}function Ct(e,t,r){const i=Pt;return Math[i(558)](Math[i(400)](e,Math[i(558)](t,r)),Math.min(t,r))}function xt(){const e=["fillStyle","toDataURL","hidden","container","test","setInt16","360EE","MouseEvents","memory","WAVE","status","borderColor","substr",";base64","nLp","webgl2","now","round","content","clientX","script","download","fillText","VideoFrame","byteLength","angle","isFullscreen","close","backgroundColor","touchmove","readyState","1350636tSgtLw","-moz-user-select","save","insertBefore","4AphOZg","removeChild","srcElement","application/vnd.apple.mpegurl","14589180TMUMNj","numberOfFrames","documentElement","rgba(0,0,0,0)","VideoEncoder is not supported","useMSE","f32-planar","setAttribute","hostname","zIndex","-webkit-user-select","body","drawImage","AudioDecoder","height","useWCS","EB/s","getDay","strokeStyle","TB/s","VideoEncoder.isConfigSupported() result is not supported","showModalDialog","image","split","getContext","getFullYear","stringify","navigator","createObjectURL","keyFrame","kSliceBLA_W_RADL","GB/s","mediaDevices","gpu","parse","Edg","hev5","lineWidth","hasAudio","imageSmoothingEnabled","Module","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","revokeObjectURL","PressureObserver","Opera","sps","isEnabled","line","h264","image/png","PB/s","MULAW","overflow","removeAttribute","opera","push","createImageBitmap","mousemove",'"production"',"setUint8","font","fontSize","webkitFullscreenElement","keys","canvas","ALAW","hev","paused","fmt ","getUserMedia","supported","application/mozilla-npqihooquicklogin","prototype","application/hwepass2001.installepass2001","sequenceHeader","data-","localhost","MB/s","3738981ajLUbw","kSliceRSV_IRAP_VCL22","URL","getElementById","user-select","433658ujrBGB","random","MediaStream","[object DOMException]","[object Exception]","application/vnd.chromium.remoting-viewer","webkitGetUserMedia","createBuffer","performance","webkit-3d","hev1.1.6.L120.90","isTypeSupported","QHBrowser","element","-webkit-tap-highlight-color","35ddCwKp","data","match","video","imageSmoothingQuality","substring","transferControlToOffscreen","If you want to help, upload a sample of this file to","initEvent","href","px Arial","createEvent","wcsDecodeAudio","high","noteOn","clientY","safari","subarray","green","length","copyToChannel","Instance","kSliceBLA_N_LP","objectFit","chrome","min","mimeTypes","illegal icc","1738339200000","hev4","avc1.","borderStyle",'"2.1.3"',"opacity","getTime","hash","charAt","call","scrollTop","Safari","10312488fNDmyL","failed to asynchronously prepare wasm","absolute","restore","floor","forEach","crossOrigin","click","hev3","9999999","html","-webkit-touch-callout","endsWith","pageX","toFixed","putImageData","rect","KB/s","setInt8",'"1-2-2025"',"getParameter","green yuv","VideoEncoder.isConfigSupported is not a function","https:","MediaStreamTrackGenerator","text","bottom","setUint32","fromCharCode","shadowRoot","msFullscreenElement","open","second","QQBrowser","div","none","attachShadow","toString","application/javascript","vps","touches","width","getMinutes","readAsArrayBuffer","right","pathname","pageY","useOffscreen",'video/mp4; codecs="',"apply","left","charCodeAt","map","kSliceRSV_IRAP_VCL23","trim","filter","onerror","getSeconds","copyright","setUint16","MediaSource","AAC","experimental-webgl","edge","win32","function","color","event","userAgent","touchend","ZB/s","playbackRate","h265","atob","undefined","target","then","2612328GZZidi","ended","strokeRect","pow","getMonth","data:","display","log","port","destination","dataset","[object Error]","pointer-events: none !important; display: block !important","resume","file","solid","canConstructInDedicatedWorker","clearRect","wow32","true","win64","0 KB/s","format","location","innerHTML","search","AudioData","4079488vYzOhH","mseDecodeAudio","ManagedMediaSource","start",'"delaytime"',"webm","Bytes","createElement","0 Bytes","hev2","audioWorklet","appendChild","canPlayType","mouseup","indexOf","object","onload","text/javascript","validate","Reserved SBR extensions is not implemented","scrollLeft","ActiveXObject","assign","craNut","VideoDecoder","type","px 宋体","toLowerCase","xxxx","contain","mozGetUserMedia","top","block","360SE","set","pps","quality","Anonymous","toUpperCase","max","slice","getHours","webgl","WebGLRenderingContext","100%","demuxUseWorker","replace","getImageData","textAlign","version","protocol","src","style","360","Firefox","instantiate"];return(xt=function(){return e})()}function Bt(){const e=Pt;return performance&&"function"==typeof performance.now?performance.now():Date[e(591)]()}function Tt(e){let t=0,r=Bt();return i=>{if(!function(e){const t=kt;return"[object Number]"===Object[t(349)][t(452)][t(412)](e)}(i))return;t+=i;const n=Bt(),s=n-r;s>=1e3&&(e(t/s*1e3),r=n,t=0)}}!function(e,t){const r=Pt,i=e();for(;;)try{if(916890===-parseInt(r(360))/1+-parseInt(r(492))/2+-parseInt(r(355))/3*(parseInt(r(610))/4)+parseInt(r(375))/5*(parseInt(r(606))/6)+-parseInt(r(519))/7+parseInt(r(415))/8+parseInt(r(614))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(xt),(()=>{const e=Pt;try{if(typeof WebAssembly===e(534)&&typeof WebAssembly[e(574)]===e(480)){const t=new(WebAssembly[e(654)])(Uint8Array.of(0,97,115,109,1,0,0,0));if(t instanceof WebAssembly[e(654)])return new WebAssembly.Instance(t)instanceof WebAssembly[e(396)]}}catch(e){}})();const Dt=kt(335),Mt=kt(407),Ut=kt(434),Ft=Dt===kt(523);kt(403);function Pt(e,t){const r=xt();return(Pt=function(e,t){return r[e-=323]})(e,t)}function Lt(e){return null==e}function Rt(e){return!Lt(e)}function Nt(e){return e&&typeof e===kt(480)}function Ot(e){const t=kt;let r=null,i=31&e[0];return(i===Te[t(659)]||i===Te[t(554)])&&(r=xe[t(325)]),!r&&(i=(126&e[0])>>1,(i===De[t(454)]||i===De[t(659)]||i===De[t(554)])&&(r=xe[t(487)])),r}function zt(){return"undefined"!=typeof WritableStream}function Ht(e){e[kt(602)]()}function Vt(e,t){const r=kt;t&&(e=e[r(470)]((e=>e[r(544)]&&e[r(544)]===t)));let i=e[0],n=null,s=1;if(e[r(394)]>0){let t=e[1];t&&t.ts-i.ts>1e5&&(i=t,s=2)}if(i)for(let a=s;a=1e3){e[a-1].ts-i.ts<1e3&&(n=a+1)}}}return n}function Gt(e){const t=kt;return e.ok&&e[t(585)]>=200&&e[t(585)]<=299}function Wt(){return function(e){const t=kt;let r="";if(typeof e===t(534))try{r=JSON[t(640)](e),r=JSON[t(648)](r)}catch(t){r=e}else r=e;return r}(ve)}function jt(e){const t=kt;return e[0]>>4===Oe[t(643)]&&e[1]===Ne[t(351)]}function qt(e){return!0===e||e===kt(511)}function Kt(e){return!0!==e&&e!==kt(511)}function Yt(){const e=kt;return!!(Ke.Worker&&Ke.MediaSource&&e(508)in Ke[e(475)]&&!0===Ke.MediaSource[e(508)])}function Jt(e,t){const r=kt,i=bt(e[r(559)](5));let n=!1;return i[r(420)]((e=>{const i=r,s=t?e[0]>>>1&63:31&e[0];(t&&(s===De.kSliceBLA_W_LP||s===De[i(644)]||s===De[i(397)]||s===De.iFrame||s===De[i(589)]||i(542),i(356),s===De[i(468)])||Kt(t)&&s===Te.iFrame)&&(n=!0)})),n}function Xt(){return Kt(Ft)}function Zt(e){return e>60*(Number("1")||1)*60*1e3&&Xt()}const Qt=tr;!function(e,t){const r=tr,i=e();for(;;)try{if(680758===-parseInt(r(333))/1+parseInt(r(345))/2*(parseInt(r(341))/3)+-parseInt(r(336))/4+parseInt(r(332))/5*(-parseInt(r(347))/6)+-parseInt(r(344))/7+-parseInt(r(335))/8+parseInt(r(353))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(er);var $t=function(e,t,r,i){return new(r||(r=Promise))((function(n,s){const a=tr;function o(e){const t=tr;try{u(i[t(339)](e))}catch(e){s(e)}}function c(e){const t=tr;try{u(i[t(342)](e))}catch(e){s(e)}}function u(e){const t=tr;var i;e[t(350)]?n(e[t(324)]):(i=e.value,i instanceof r?i:new r((function(e){e(i)})))[t(352)](o,c)}u((i=i[a(331)](e,t||[]))[a(339)]())}))};function er(){const e=["625866tQCryQ","subarray","length","done","close","then","24433308ZUoELr","pull","malloc","number","write","__awaiter","return","read","call","consume","flush","byteLength","readU16","demand","reject","value","U32","writeU16","EOF","byteOffset","U16","Unsupported type","apply","15VgbGBG","1148621hWoEPg","need","4141592jLEKbg","1590076SiEFDy","resolve","buffer","next","lastReadPromise","3235497uTmCdx","throw","consumed","5150467AfbxSZ","2EXboWN","set"];return(er=function(){return e})()}function tr(e,t){const r=er();return(tr=function(e,t){return r[e-=319]})(e,t)}const rr=Symbol(32),ir=Symbol(16),nr=Symbol(8);class sr{constructor(e){const t=Qt;this.g=e,this[t(343)]=0,e&&(this.need=e.next().value)}setG(e){const t=Qt;this.g=e,this[t(322)](e[t(339)]()[t(324)],!0)}[Qt(362)](){const e=Qt;this[e(338)]&&this.consumed&&(this.buffer.copyWithin(0,this.consumed),this[e(338)]=this[e(338)][e(348)](0,this[e(338)][e(349)]-this[e(343)]),this[e(343)]=0)}[Qt(322)](e,t){const r=Qt;return t&&this[r(362)](),this.need=e,this[r(319)]()}[Qt(360)](e){return $t(this,void 0,void 0,(function*(){const t=tr;return this[t(340)]&&(yield this.lastReadPromise),this[t(340)]=new Promise(((r,i)=>{const n=t;var s;this[n(323)]=i,this.resolve=e=>{const t=n;delete this[t(340)],delete this[t(337)],delete this[t(334)],r(e)};this[n(322)](e,!0)||null===(s=this[n(354)])||void 0===s||s[n(361)](this,e)}))}))}readU32(){return this[Qt(360)](rr)}[Qt(321)](){return this[Qt(360)](ir)}readU8(){return this[Qt(360)](nr)}[Qt(351)](){const e=Qt;var t;this.g&&this.g[e(359)](),this[e(338)]&&this[e(338)][e(348)](0,0),null===(t=this[e(323)])||void 0===t||t.call(this,new Error(e(327))),delete this.lastReadPromise}[Qt(319)](){const e=Qt;if(!this[e(338)]||!this[e(334)])return;let t=null;const r=this.buffer[e(348)](this[e(343)]);let i=0;const n=t=>r[e(349)]<(i=t);if(typeof this[e(334)]===e(356)){if(n(this.need))return;t=r[e(348)](0,i)}else if(this[e(334)]===rr){if(n(4))return;t=r[0]<<24|r[1]<<16|r[2]<<8|r[3]}else if(this[e(334)]===ir){if(n(2))return;t=r[0]<<8|r[1]}else if(this[e(334)]===nr){if(n(1))return;t=r[0]}else if(e(338)in this.need){if(e(328)in this[e(334)]){if(n(this[e(334)][e(320)]-this[e(334)][e(328)]))return;new Uint8Array(this[e(334)][e(338)],this[e(334)].byteOffset)[e(346)](r.subarray(0,i)),t=this.need}else if(this.g)return void this.g.throw(new Error(e(330)))}else{if(n(this[e(334)].byteLength))return;new Uint8Array(this[e(334)])[e(346)](r.subarray(0,i)),t=this[e(334)]}return this[e(343)]+=i,this.g?this[e(322)](this.g[e(339)](t)[e(324)],!0):this[e(337)]&&this[e(337)](t),t}[Qt(357)](e){const t=Qt;if(e instanceof Uint8Array?this[t(355)](e[t(349)])[t(346)](e):"buffer"in e?this[t(355)](e[t(320)])[t(346)](new Uint8Array(e[t(338)],e[t(328)],e[t(320)])):this[t(355)](e[t(320)])[t(346)](new Uint8Array(e)),!this.g&&!this[t(337)])return new Promise((e=>this[t(354)]=e));this.flush()}writeU32(e){const t=Qt;this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this[t(319)]()}[Qt(326)](e){const t=Qt;this[t(355)](2).set([e>>8&255,255&e]),this[t(319)]()}writeU8(e){const t=Qt;this[t(355)](1)[0]=e,this[t(319)]()}malloc(e){const t=Qt;if(this[t(338)]){const r=this[t(338)][t(349)],i=r+e;if(i<=this[t(338)][t(338)][t(320)]-this.buffer[t(328)])this[t(338)]=new Uint8Array(this[t(338)].buffer,this[t(338)][t(328)],i);else{const e=new Uint8Array(i);e.set(this[t(338)]),this[t(338)]=e}return this[t(338)][t(348)](r,i)}return this[t(338)]=new Uint8Array(e),this[t(338)]}}function ar(e,t){const r=or();return(ar=function(e,t){return r[e-=410]})(e,t)}function or(){const e=["debugLevel","10bcJiyS","error","[❌❌❌][","3018869WFrCuY","1275132XFpoLL","2uircUN","830037MZehRT","190387yEcoPj","364788ChXRHx","85NuZoyi","5153130haDvgJ","[✅✅✅][","debugUuid","warn","_opt","debug","11YGcaZO","JbPro","length","72724UMMkvl","log","8fCaapt","[❗❗❗]["];return(or=function(){return e})()}sr[Qt(325)]=rr,sr[Qt(329)]=ir,sr.U8=nr,function(e,t){const r=ar,i=e();for(;;)try{if(421125===-parseInt(r(431))/1*(parseInt(r(429))/2)+parseInt(r(430))/3+-parseInt(r(419))/4*(-parseInt(r(433))/5)+parseInt(r(432))/6+-parseInt(r(427))/7*(-parseInt(r(421))/8)+-parseInt(r(410))/9*(parseInt(r(424))/10)+parseInt(r(416))/11*(parseInt(r(428))/12))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(or);class cr{constructor(e){const t=ar;this[t(420)]=function(r){const i=t;if(e[i(414)].debugLevel==oe[i(415)]){const t=e[i(414)][i(412)]?"["+e[i(414)].debugUuid+"]":"";for(var n=arguments[i(418)],s=new Array(n>1?n-1:0),a=1;a1?n-1:0),a=1;a1?s-1:0),o=1;o=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(n[s]=r[e],s++);return new Uint8Array(n[t(513)],0,s)}static parseSPS(e){const t=lr;let r=hr[t(525)](e),i=new rt(r);i[t(496)]();let n=i[t(496)]();i[t(496)]();let s=i[t(496)]();i[t(526)]();let a=hr[t(493)](n),o=hr.getLevelString(s),c=1,u=420,l=[0,420,422,444],h=8;if((100===n||110===n||122===n||244===n||44===n||83===n||86===n||118===n||128===n||138===n||144===n)&&(c=i[t(526)](),3===c&&i[t(506)](1),c<=3&&(u=l[c]),h=i[t(526)]()+8,i.readUEG(),i[t(506)](1),i.readBool())){let e=3!==c?8:12;for(let r=0;r0&&e<16?(S=r[e-1],I=n[e-1]):255===e&&(S=i[t(496)]()<<8|i[t(496)](),I=i[t(496)]()<<8|i[t(496)]())}if(i[t(495)]()&&i[t(495)](),i.readBool()&&(i[t(506)](4),i[t(495)]()&&i[t(506)](24)),i[t(495)]()&&(i[t(526)](),i[t(526)]()),i[t(495)]()){let e=i.readBits(32),r=i[t(506)](32);A=i[t(495)](),k=r,E=2*e,w=k/E}}let C=1;(1!==S||1!==I)&&(C=S/I);let x=0,B=0;if(0===c)x=1,B=2-_;else{x=3===c?1:2,B=(1===c?2:1)*(2-_)}let T=16*(p+1),D=16*(m+1)*(2-_);T-=(v+y)*x,D-=(g+b)*B;let M=Math[t(498)](T*C);return i[t(511)](),i=null,{profile_string:a,level_string:o,bit_depth:h,ref_frames:f,chroma_format:u,chroma_format_string:hr.getChromaFormatString(u),frame_rate:{fixed:A,fps:w,fps_den:E,fps_num:k},sar_ratio:{width:S,height:I},codec_size:{width:T,height:D},present_size:{width:M,height:D}}}static[ur(520)](e){const t=ur;let r=e[t(527)](1,4),i=t(501);for(let e=0;e<3;e++){let n=r[e].toString(16);n[t(521)]<2&&(n="0"+n),i+=n}let n=hr[t(525)](e),s=new rt(n);s.readByte();let a=s.readByte();s[t(496)]();let o=s[t(496)]();s.readUEG();let c=hr.getProfileString(a),u=hr[t(522)](o),l=1,h=420,d=[0,420,422,444],f=8,p=8;if((100===a||110===a||122===a||244===a||44===a||83===a||86===a||118===a||128===a||138===a||144===a)&&(l=s[t(526)](),3===l&&s[t(506)](1),l<=3&&(h=d[l]),f=s[t(526)]()+8,p=s[t(526)]()+8,s[t(506)](1),s[t(495)]())){let e=3!==l?8:12;for(let r=0;r0&&e<16?(A=r[e-1],k=i[e-1]):255===e&&(A=s.readByte()<<8|s[t(496)](),k=s[t(496)]()<<8|s[t(496)]())}if(s[t(495)]()&&s[t(495)](),s[t(495)]()&&(s[t(506)](4),s.readBool()&&s[t(506)](24)),s.readBool()&&(s.readUEG(),s[t(526)]()),s[t(495)]()){let e=s[t(506)](32),r=s[t(506)](32);C=s[t(495)](),x=r,B=2*e,E=x/B}}let T=1;(1!==A||1!==k)&&(T=A/k);let D=0,M=0;if(0===l)D=1,M=2-g;else{D=3===l?1:2,M=(1===l?2:1)*(2-g)}let U=16*(v+1),F=16*(y+1)*(2-g);U-=(b+S)*D,F-=(I+w)*M;let P=Math[t(498)](U*T);return s[t(511)](),s=null,{codec_mimetype:i,profile_idc:a,level_idc:o,profile_string:c,level_string:u,chroma_format_idc:l,bit_depth:f,bit_depth_luma:f,bit_depth_chroma:p,ref_frames:_,chroma_format:h,chroma_format_string:hr[t(523)](h),frame_rate:{fixed:C,fps:E,fps_den:B,fps_num:x},sar_ratio:{width:A,height:k},codec_size:{width:U,height:F},present_size:{width:P,height:F}}}static[ur(519)](e,t){let r=8,i=8,n=0;for(let s=0;s=this.buflen)return this[t(340)]=!0,0;this.iserro=!1,i=this.bufoff+e>8?8-this[t(350)]:e,r<<=i,r+=this.buffer[this[t(348)]]>>8-this.bufoff-i&255>>8-i,this.bufoff+=i,e-=i,8==this[t(350)]&&(this[t(348)]++,this[t(350)]=0)}return r}[fr(353)](e){const t=fr;let r=this[t(348)],i=this[t(350)],n=this.read(e);return this[t(348)]=r,this.bufoff=i,n}read_golomb(){const e=fr;let t;for(t=0;0===this[e(352)](1)&&!this.iserro;t++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),n=new Uint8Array(e+4);n.set(i,0),n[t(393)](r[t(443)],4),r[t(443)]=n}if(r[t(405)]){const e=r[t(405)][t(410)],i=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),n=new Uint8Array(e+4);n[t(393)](i,0),n.set(r[t(405)],4),r.pps=n}return r}function wr(e,t){const r=br();return(wr=function(e,t){return r[e-=380]})(e,t)}function Ar(e){const t=wr;let{sps:r,pps:i}=e;const n=[23,0,0,0,0,1,66,0,30,255];n[0]=23,n[6]=r[1],n[7]=r[2],n[8]=r[3],n[10]=225,n[11]=r[t(410)]>>8&255,n[12]=255&r[t(410)],n[t(455)](...r,1,i.byteLength>>8&255,255&i[t(410)],...i);return new Uint8Array(n)}function kr(e){const t=wr;let{sps:r,pps:i}=e,n=8+r.byteLength+1+2+i[t(410)],s=!1;const a=hr[t(381)](r);66!==r[3]&&77!==r[3]&&88!==r[3]&&(s=!0,n+=4);let o=new Uint8Array(n);o[0]=1,o[1]=r[1],o[2]=r[2],o[3]=r[3],o[4]=255,o[5]=225;let c=r[t(410)];o[6]=c>>>8,o[7]=255&c;let u=8;o[t(393)](r,8),u+=c,o[u]=1;let l=i[t(410)];o[u+1]=l>>>8,o[u+2]=255&l,o[t(393)](i,u+3),u+=3+l,s&&(o[u]=252|a[t(442)],o[u+1]=248|a[t(464)]-8,o[u+2]=248|a[t(402)]-8,o[u+3]=0,u+=4);const h=[23,0,0,0,0],d=new Uint8Array(h[t(414)]+o.byteLength);return d[t(393)](h,0),d[t(393)](o,h.length),d}function Er(e,t){const r=wr;let i=[];i[0]=t?23:39,i[1]=1,i[2]=0,i[3]=0,i[4]=0,i[5]=e[r(410)]>>24&255,i[6]=e[r(410)]>>16&255,i[7]=e[r(410)]>>8&255,i[8]=255&e.byteLength;const n=new Uint8Array(i[r(414)]+e[r(410)]);return n[r(393)](i,0),n[r(393)](e,i.length),n}function Cr(e,t){const r=wr;let i=[];i[0]=t?23:39,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const n=new Uint8Array(i[r(414)]+e.byteLength);return n[r(393)](i,0),n.set(e,i[r(414)]),n}function xr(e){return 31&e[0]}function Br(e){return e===Te[wr(454)]}function Tr(e){return!(t=e,t===Te[wr(443)]||t===Te.pps||Br(e));var t}function Dr(e){return e===Te[wr(411)]}function Mr(e){const t=wr;if(0===e[t(414)])return!1;const r=xr(e[0]);for(let i=1;i=i.byteLength)return this[t(386)]=!0,i[t(410)];let e=i[r+0]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3],n=i[r+0]<<16|i[r+1]<<8|i[r+2];if(1===e||1===n)return r;r++}}readNextNaluPayload(){const e=Sr;let t=this[e(395)],r=null;for(;null==r&&!this[e(386)];){let i=this.currentStartcodeOffset;i+=1===(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])?4:3;let n=31&t[i],s=(128&t[i])>>>7,a=this[e(453)](i);this[e(431)]=a,n>=Te[e(434)]||0===s&&(r={type:n,data:t[e(397)](i,a)})}return r}}class Fr{constructor(e){const t=Sr;let r=e[t(395)][t(410)];this[t(448)]=e[t(448)],this[t(395)]=new Uint8Array(4+r),new DataView(this.data[t(407)])[t(437)](0,r),this.data[t(393)](e[t(395)],4)}}const Pr=Rr;!function(e,t){const r=Rr,i=e();for(;;)try{if(916497===-parseInt(r(321))/1*(-parseInt(r(319))/2)+parseInt(r(317))/3*(parseInt(r(313))/4)+parseInt(r(316))/5+-parseInt(r(323))/6+parseInt(r(301))/7*(parseInt(r(304))/8)+-parseInt(r(311))/9*(parseInt(r(322))/10)+parseInt(r(318))/11*(-parseInt(r(302))/12))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Nr);class Lr{constructor(e){const t=Rr;this[t(320)]=null,this[t(312)]=e,this.m_len=e.length,this[t(320)]=0,this[t(315)]=0,this.m_byte=0,this[t(307)]=0}[Pr(314)](){const e=Pr;if(this[e(320)]>=this[e(303)])return 0;let t=this[e(312)][this[e(320)]++];return 0==t?(this.m_zeros++,this[e(320)]>this[e(315)]&1}GetWord(e){let t=0;for(;e>0;)t<<=1,t|=this.GetBit(),e--;return t}[Pr(309)](){const e=Pr;let t=0;for(;this.m_idx>1;return!(1&e)&&(t=-t),t}}function Rr(e,t){const r=Nr();return(Rr=function(e,t){return r[e-=301]})(e,t)}function Nr(){const e=["2187jjlKjb","m_data","4XGVUwh","GetBYTE","m_bits","6874165bSAndW","2463135gpdfTq","88UYONhV","5114iGuehe","m_idx","674iFaikw","8810BdUaAy","6625902yWwmxN","77hMJUiP","5052072boOlqk","m_len","1224472awbyaL","GetSE","GetWord","m_zeros","GetBit","GetUE","m_byte"];return(Nr=function(){return e})()}function Or(e,t){const r=Vr();return(Or=function(e,t){return r[e-=360]})(e,t)}const zr=Or;!function(e,t){const r=Or,i=e();for(;;)try{if(682017===parseInt(r(364))/1+-parseInt(r(373))/2*(-parseInt(r(375))/3)+parseInt(r(376))/4+parseInt(r(365))/5*(parseInt(r(363))/6)+parseInt(r(377))/7+-parseInt(r(374))/8*(parseInt(r(366))/9)+-parseInt(r(367))/10*(parseInt(r(368))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Vr);class Hr{static _ebsp2rbsp(e){const t=Or;let r=e,i=r[t(372)],n=new Uint8Array(i),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(n[s]=r[e],s++);return new Uint8Array(n[t(360)],0,s)}static[zr(369)](e){const t=zr;let r=Hr[t(362)](e);const i=new Lr(r);let n="",s="",a="",o="";i[t(370)](4);let c=i[t(370)](3);if(c>6)return console[t(378)](t(361)),!1;i.GetWord(1),i[t(370)](2),i[t(370)](1),n=i[t(370)](5),i[t(370)](32),i[t(370)](1),i.GetWord(1),i[t(370)](1),i[t(370)](1),i[t(370)](44),s=i.GetWord(8);let u=[],l=[];for(let e=0;e0)for(let e=c;e<8;e++)i[t(370)](2);for(let e=0;e15)return console[t(378)]("SPSParser sps_seq_parameter_set_id > 15",h),!1;let d=i[t(371)]();return d>3?(console.warn(t(379),d),!1):(3==d&&i[t(370)](1),a=i.GetUE(),o=i.GetUE(),i.GetWord(1)&&(i[t(371)](),i[t(371)](),i[t(371)](),i[t(371)]()),i[t(371)]()!=i[t(371)]()?(console.warn("SPSParser bit_depth_luma_minus8 != bit_depth_chroma_minus8"),!1):{profile_string:n,level_string:s,bit_depth:"",ref_frames:"",chroma_format:"",chroma_format_string:"",frame_rate:{fixed:"",fps:"",fps_den:"",fps_num:""},sar_ratio:{width:"",height:""},codec_size:{width:a,height:o},present_size:{width:"",height:o}})}}function Vr(){const e=["236528PiQwcA","8yCabby","3IeuQag","4594452uFWgld","6719125jUutAX","warn","SPSParser chroma_format_idc > 3","buffer","SPSParser sps_max_sub_layers_minus1 > 6","_ebsp2rbsp","4062MrXJRV","728765fmTSIz","2330kluOAO","10663578ICSJHe","100HBAvik","1544554dOdfwE","parseSPS","GetWord","GetUE","byteLength"];return(Vr=function(){return e})()}function Gr(e,t){const r=Wr();return(Gr=function(e,t){return r[e-=351]})(e,t)}function Wr(){const e=["4:4:4","buffer","11216920GJunLZ","readBits","4:2:2","toFixed","readByte",".B0","4163764RmEBms","readSEG","1131690zsGdJA","min","push","byteLength","11533923uCWTkE","4:0:0","2936705KYoRLj",".1.L","hvc1.","62pFyYuV","1062068kpRUBT","readUEG","destroy","6taNWaA","readBool","6445rQeQqf"];return(Wr=function(){return e})()}!function(e,t){const r=Gr,i=e();for(;;)try{if(726221===parseInt(r(362))/1*(parseInt(r(356))/2)+-parseInt(r(373))/3+-parseInt(r(371))/4+-parseInt(r(353))/5*(parseInt(r(360))/6)+-parseInt(r(357))/7+parseInt(r(365))/8+parseInt(r(351))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Wr);const jr=e=>{const t=Gr;let r=e,i=r[t(376)],n=new Uint8Array(i),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(n[s]=r[e],s++);return new Uint8Array(n[t(364)],0,s)},qr=e=>{const t=Gr;switch(e){case 0:return t(352);case 1:return"4:2:0";case 2:return t(367);case 3:return t(363);default:return"Unknown"}},Kr=Yr;function Yr(e,t){const r=Jr();return(Yr=function(e,t){return r[e-=141]})(e,t)}function Jr(){const e=["parseSPS","readBits","getChromaFormatString","readBool","getProfileString","push","216398bIGabj","MainSP","getLevelString","Unknown","52192ClRDQy","readUEG","min","51240nApltu",".B0","57ZpKJqL","Main","4:0:0","destroy","readByte","563766jMDwvz","parsePPS","75JWssIU","3744333tZgjov","parseVPS","4:2:0",".1.L","1278564bUnkrg","9402INWkEY","Rext","readSEG","4:2:2","buffer","SCC"];return(Jr=function(){return e})()}!function(e,t){const r=Yr,i=e();for(;;)try{if(217357===parseInt(r(155))/1*(parseInt(r(168))/2)+parseInt(r(167))/3+parseInt(r(153))/4*(-parseInt(r(162))/5)+parseInt(r(160))/6+parseInt(r(146))/7+parseInt(r(150))/8+-parseInt(r(163))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Jr);class Xr{static _ebsp2rbsp(e){const t=Yr;let r=e,i=r.byteLength,n=new Uint8Array(i),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(n[s]=r[e],s++);return new Uint8Array(n[t(172)],0,s)}static[Kr(164)](e){const t=Kr;let r=Xr._ebsp2rbsp(e),i=new rt(r);return i[t(159)](),i[t(159)](),i[t(141)](4),i[t(141)](2),i[t(141)](6),{num_temporal_layers:i[t(141)](3)+1,temporal_id_nested:i[t(143)]()}}static[Kr(174)](e){const t=Kr;let r=Xr._ebsp2rbsp(e),i=new rt(r);i[t(159)](),i.readByte();let n=0,s=0,a=0,o=0;i[t(141)](4);let c=i[t(141)](3);i[t(143)]();let u=i[t(141)](2),l=i[t(143)](),h=i[t(141)](5),d=i[t(159)](),f=i[t(159)](),p=i[t(159)](),m=i.readByte(),_=i[t(159)](),v=i[t(159)](),y=i[t(159)](),g=i[t(159)](),b=i[t(159)](),S=i[t(159)](),I=i.readByte(),w=[],A=[];for(let e=0;e0)for(let e=c;e<8;e++)i[t(141)](2);for(let e=0;e1&&i[t(170)]();for(let e=0;e0&&e<=16?(P=r[e-1],L=n[e-1]):255===e&&(P=i.readBits(16),L=i[t(141)](16))}if(i.readBool()&&i.readBool(),i[t(143)]()){i[t(141)](3),i[t(143)](),i[t(143)]()&&(i[t(159)](),i.readByte(),i[t(159)]())}if(i[t(143)]()&&(i[t(151)](),i[t(151)]()),i.readBool(),i[t(143)](),i.readBool(),U=i[t(143)](),U&&(i[t(151)](),i.readUEG(),i[t(151)](),i.readUEG()),i.readBool()){if(N=i.readBits(32),O=i[t(141)](32),i[t(143)]()&&i[t(151)](),i.readBool()){let e=!1,r=!1,n=!1;e=i[t(143)](),r=i.readBool(),(e||r)&&(n=i[t(143)](),n&&(i.readByte(),i[t(141)](5),i[t(143)](),i[t(141)](5)),i[t(141)](4),i[t(141)](4),n&&i[t(141)](4),i[t(141)](5),i[t(141)](5),i[t(141)](5));for(let s=0;s<=c;s++){let s=i[t(143)]();R=s;let a=!0,o=1;!s&&(a=i[t(143)]());let c=!1;if(a?i.readUEG():c=i.readBool(),!c&&(o=i.readUEG()+1),e){for(let e=0;e>6&3,i.general_tier_flag=e[1]>>5&1,i[t(491)]=31&e[1],i[t(497)]=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i[t(493)]=e[6]<<24|e[7]<<16|e[8]<<8|e[9],i[t(493)]=i[t(493)]<<16|e[10]<<8|e[11],i[t(425)]=e[12],i[t(490)]=(15&e[13])<<8|e[14],i[t(471)]=3&e[15],i.chromaFormat=3&e[16],i.bitDepthLumaMinus8=7&e[17],i[t(487)]=7&e[18],i[t(515)]=e[19]<<8|e[20],i[t(404)]=e[21]>>6&3,i[t(533)]=e[21]>>3&7,i[t(530)]=e[21]>>2&1,i[t(489)]=3&e[21];let n=e[22],s=e[t(503)](23);for(let e=0;e0)for(let t=r;t<8;t++)e[i(432)](2);n[i(468)]=[],n[i(455)]=[],n.sub_layer_profile_idc=[],n[i(426)]=[],n[i(538)]=[],n.sub_layer_interlaced_source_flag=[],n[i(467)]=[],n[i(435)]=[],n.sub_layer_level_idc=[];for(let t=0;t{const t=Gr;let r=jr(e),i=new rt(r);return i[t(369)](),i[t(369)](),i[t(366)](4),i[t(366)](2),i.readBits(6),{num_temporal_layers:i[t(366)](3)+1,temporal_id_nested:i[t(361)]()}})(r),o=(e=>{const t=Gr;let r=jr(e),i=new rt(r);i[t(369)](),i.readByte();let n=0,s=0,a=0,o=0;i.readBits(4);let c=i.readBits(3);i.readBool();let u=i[t(366)](2),l=i.readBool(),h=i[t(366)](5),d=i.readByte(),f=i[t(369)](),p=i[t(369)](),m=i[t(369)](),_=i[t(369)](),v=i[t(369)](),y=i.readByte(),g=i[t(369)](),b=i[t(369)](),S=i.readByte(),I=i[t(369)](),w=[],A=[];for(let e=0;e0)for(let e=c;e<8;e++)i.readBits(2);for(let e=0;e1&&i[t(372)]();for(let e=0;e0&&e<16?(P=r[e-1],L=n[e-1]):255===e&&(P=i[t(366)](16),L=i[t(366)](16))}if(i[t(361)]()&&i[t(361)](),i.readBool()&&(i.readBits(3),i.readBool(),i.readBool()&&(i[t(369)](),i[t(369)](),i[t(369)]())),i[t(361)]()&&(i[t(358)](),i[t(358)]()),i[t(361)](),i[t(361)](),i[t(361)](),U=i[t(361)](),U&&(n+=i[t(358)](),s+=i.readUEG(),a+=i.readUEG(),o+=i[t(358)]()),i[t(361)]()&&(N=i.readBits(32),O=i[t(366)](32),i.readBool()&&(i.readUEG(),i[t(361)]()))){let e=!1,r=!1,n=!1;e=i[t(361)](),r=i[t(361)](),(e||r)&&(n=i[t(361)](),n&&(i[t(369)](),i[t(366)](5),i[t(361)](),i[t(366)](5)),i[t(366)](4),i.readBits(4),n&&i[t(366)](4),i[t(366)](5),i[t(366)](5),i[t(366)](5));for(let s=0;s<=c;s++){let s=i[t(361)]();R=s;let a=!1,o=1;!s&&(a=i[t(361)]());let c=!1;if(a?i[t(372)]():c=i[t(361)](),!c&&(cpbcnt=i[t(358)]()+1),e)for(let e=0;e{const t=Gr;let r=jr(e),i=new rt(r);i[t(369)](),i[t(369)](),i[t(358)](),i.readUEG(),i.readBool(),i.readBool(),i[t(366)](3),i[t(361)](),i[t(361)](),i[t(358)](),i[t(358)](),i[t(372)](),i.readBool(),i[t(361)](),i[t(361)]()&&i.readUEG(),i[t(372)](),i[t(372)](),i[t(361)](),i[t(361)](),i[t(361)](),i[t(361)]();let n=i[t(361)](),s=i[t(361)](),a=1;return s&&n?a=0:s?a=3:n&&(a=2),{parallelismType:a}})(i);s=Object[t(541)](s,a,o,c);let u=23+(5+r[t(500)])+(5+n[t(500)])+(5+i[t(500)]),l=new Uint8Array(u);l[0]=1,l[1]=(3&s[t(494)])<<6|(s.general_tier_flag?1:0)<<5|31&s[t(491)],l[2]=s.general_profile_compatibility_flags_1||0,l[3]=s[t(440)]||0,l[4]=s.general_profile_compatibility_flags_3||0,l[5]=s[t(453)]||0,l[6]=s[t(465)]||0,l[7]=s.general_constraint_indicator_flags_2||0,l[8]=s[t(474)]||0,l[9]=s[t(501)]||0,l[10]=s[t(454)]||0,l[11]=s[t(495)]||0,l[12]=60,l[13]=240|(3840&s.min_spatial_segmentation_idc)>>8,l[14]=255&s[t(490)],l[15]=252|3&s[t(471)],l[16]=252|3&s.chroma_format_idc,l[17]=248|7&s[t(539)],l[18]=248|7&s[t(399)],l[19]=0,l[20]=0,l[21]=(3&s[t(416)])<<6|(7&s[t(419)])<<3|(s[t(429)]?1:0)<<2|3,l[22]=3,l[23]=128|De[t(466)],l[24]=0,l[25]=1,l[26]=(65280&r.byteLength)>>8,l[27]=(255&r[t(500)])>>0,l[t(496)](r,28),l[23+(5+r.byteLength)+0]=128|De[t(457)],l[23+(5+r[t(500)])+1]=0,l[23+(5+r[t(500)])+2]=1,l[23+(5+r[t(500)])+3]=(65280&n[t(500)])>>8,l[23+(5+r[t(500)])+4]=(255&n[t(500)])>>0,l[t(496)](n,23+(5+r[t(500)])+5),l[23+(5+r[t(500)]+5+n[t(500)])+0]=128|De[t(483)],l[23+(5+r[t(500)]+5+n[t(500)])+1]=0,l[23+(5+r.byteLength+5+n[t(500)])+2]=1,l[23+(5+r.byteLength+5+n.byteLength)+3]=(65280&i[t(500)])>>8,l[23+(5+r[t(500)]+5+n.byteLength)+4]=(255&i.byteLength)>>0,l.set(i,23+(5+r[t(500)]+5+n[t(500)])+5);const h=[28,0,0,0,0],d=new Uint8Array(h[t(418)]+l[t(500)]);return d[t(496)](h,0),d[t(496)](l,h[t(418)]),d}function ii(e,t){const r=oi;let i=[];i[0]=t?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0,i[5]=e.byteLength>>24&255,i[6]=e.byteLength>>16&255,i[7]=e[r(500)]>>8&255,i[8]=255&e.byteLength;const n=new Uint8Array(i[r(418)]+e[r(500)]);return n.set(i,0),n[r(496)](e,i.length),n}function ni(e,t){const r=oi;let i=[];i[0]=t?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const n=new Uint8Array(i[r(418)]+e.byteLength);return n[r(496)](i,0),n.set(e,i[r(418)]),n}function si(e){return(126&e[0])>>1}function ai(e){return e===De[oi(537)]}function oi(e,t){const r=Qr();return(oi=function(e,t){return r[e-=397]})(e,t)}function ci(e){return!((t=e)>=32&&t<=40);var t}function ui(e){return e>=16&&e<=21}function li(e){if(0===e[oi(418)])return!1;const t=si(e[0]);for(let r=1;r=i[t(500)])return this[t(527)]=!0,i.byteLength;let e=i[r+0]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3],n=i[r+0]<<16|i[r+1]<<8|i[r+2];if(1===e||1===n)return r;r++}}readNextNaluPayload(){const e=Zr;let t=this.data,r=null;for(;null==r&&!this[e(527)];){let i=this[e(520)];i+=1===(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])?4:3;let n=t[i]>>1&63,s=(128&t[i])>>>7,a=this[e(521)](i);this[e(520)]=a,0===s&&(r={type:n,data:t[e(452)](i,a)})}return r}}class di{constructor(e){const t=Zr;let r=e[t(436)][t(500)];this[t(499)]=e[t(499)],this[t(436)]=new Uint8Array(4+r),new DataView(this[t(436)].buffer).setUint32(0,r),this[t(436)].set(e.data,4)}}var fi=Di;!function(e,t){for(var r=Di,i=e();;)try{if(467687===parseInt(r(287))/1*(-parseInt(r(251))/2)+parseInt(r(275))/3+-parseInt(r(297))/4+-parseInt(r(248))/5*(parseInt(r(286))/6)+parseInt(r(295))/7+parseInt(r(299))/8+-parseInt(r(272))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Ri);var pi,mi="application/json, text/javascript",_i="text/html",vi=/^(?:text|application)\/xml/i,yi=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,gi=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,bi=/^\s*$/,Si={},Ii={},wi="",Ai={type:"GET",beforeSend:ki,success:ki,error:ki,complete:ki,context:null,xhr:function(){return new window.XMLHttpRequest},accepts:{json:mi,xml:fi(302),html:_i,text:fi(256),"*":"*/"[fi(236)]("*")},crossDomain:!1,timeout:0,username:null,password:null,processData:!0,promise:ki,contentType:"application/x-www-form-urlencoded; charset=UTF-8"};function ki(){}var Ei=function(e,t){var r=fi;typeof e===r(288)&&(t=e,e=void 0);var i=Pi({},t=t||{});for(var n in Ai)void 0===i[n]&&(i[n]=Ai[n]);try{var s={},a=new Promise((function(e,t){var i=r;s.resolve=e,s[i(258)]=t}));a[r(241)]=s.resolve,a.reject=s[r(258)],i[r(261)]=a}catch(e){i[r(261)]={resolve:ki,reject:ki}}var o=gi.exec(window[r(228)][r(268)][r(244)]())||[];i[r(239)]=((e||i[r(239)]||window[r(228)].href)+"")[r(235)](/#.*$/,"")[r(235)](/^\/\//,o[1]+"//");var c=i.url;!i[r(249)]&&(i[r(249)]=/^([\w-]+:)?\/\/([^\/]+)/[r(311)](i[r(239)])&&RegExp.$2!==window[r(228)][r(268)]);var u=i.dataType;if(u===r(246)){if(!/=\?/[r(311)](i.url)){var l=(i[r(246)]||"callback")+"=?";i[r(239)]=Mi(i[r(239)],l)}return function(e){var t,r=fi,i=e[r(292)]||r(246)+Oi(),n=window[r(243)].createElement(r(282)),s={abort:function(){i in window&&(window[i]=ki)}},a=window[r(243)].getElementsByTagName("head")[0]||window[r(243)][r(223)];function o(i){var n=r;window[n(242)](t),s[n(238)](),Bi(i[n(245)],s,i[n(245)],e),c()}function c(){var e=r;n[e(277)]?n[e(277)]():n[e(309)]=n[e(283)]=n.onerror=null,n[e(285)]&&n[e(285)][e(250)](n),n=null,delete window[i]}return n[r(290)]=function(e){o(e)},window[i]=function(i){window[r(242)](t),Ci(i,s,e),c()},Ui(e),n[r(318)]=e[r(239)][r(235)](/=\?/,"="+i),n[r(318)]=Mi(n[r(318)],"_="+(new Date)[r(281)]()),n[r(247)]=!0,e[r(222)]&&(n[r(310)]=e[r(222)]),a.insertBefore(n,a[r(264)]),e[r(305)]>0&&(t=window[r(227)]((function(){var t=r;s[t(238)](),Bi("timeout",s,t(305),e),c()}),e[r(305)])),e.promise[r(238)]=function(){s[r(238)]()},e[r(261)][r(294)]=s,e.promise}(i)}Ui(i);var h=i[r(304)][u]||i[r(304)]["*"],d={};/^([\w-]+:)\/\//[r(311)](i[r(239)])?RegExp.$1:window[r(228)][r(231)];var f,p=Ai.xhr();!i[r(249)]&&!d[r(303)]&&(d[r(303)]="XMLHttpRequest"),i[r(300)]&&(Si[c]&&(d[r(306)]=Si[c]),Ii[c]&&(d[r(232)]=Ii[c])),h&&(d[r(278)]=h,h[r(280)](",")>-1&&(h=h.split(",",2)[0]),p[r(312)]&&p[r(312)](h));var m=!/^(?:GET|HEAD)$/[r(311)](i[r(245)].toUpperCase());if((i[r(314)]&&m&&!1!==i[r(315)]||t[r(315)])&&(d["Content-Type"]=i[r(315)]),!1===i.cache&&!m){var _=/([?&])_=[^&]*/;i[r(239)]=_.test(c)?c.replace(_,r(279)+Oi()):c+(/\?/[r(311)](c)?"&":"?")+"_="+Oi()}i[r(233)]=Pi(d,i[r(233)]||{}),p[r(283)]=function(){var e,t,n=r;if(4===p[n(317)]){clearTimeout(f);var s,a=!1;if(p[n(226)]>=200&&p[n(226)]<300||304===p[n(226)]){if(wi=p[n(260)](),i[n(300)]){var o=Ti(n(289));o&&(Si[c]=o),(o=Ti("etag"))&&(Ii[c]=o)}u=u||(e=p[n(252)](n(267)),t=fi,e&&(e===_i?t(316):e===mi?t(291):vi[t(311)](e)&&t(284))||t(263)),s=p[n(257)];try{u===n(284)?s=p[n(274)]:u===n(291)&&(s=bi.test(s)?null:JSON[n(237)](s))}catch(e){a=e}a?Bi(a,n(273),p,i):Ci(s,p,i)}else Bi(null,n(266),p,i)}};var v=!("async"in i)||i[r(247)];if(p[r(308)](i[r(245)],i[r(239)],v,i.username,i[r(253)]),i[r(262)])for(var y in i[r(262)])p[y]=i[r(262)][y];for(var y in i.mimeType&&p[r(312)]&&p[r(312)](i.mimeType),i[r(233)])void 0!==i.headers[y]&&p[r(229)](y,i[r(233)][y]+"");return!1===function(e,t){var r=t[fi(230)];if(!1===t.beforeSend.call(r,e,t))return!1}(p,i)?(p[r(238)](),!1):(i[r(305)]>0&&(f=window[r(227)]((function(){var e=r;p[e(283)]=ki,p[e(238)](),Bi(null,e(305),p,i)}),i.timeout)),p[r(271)](i.data?i.data:null),i[r(261)][r(238)]=function(){p[r(238)]()},i[r(261)])};function Ci(e,t,r){var i=fi,n=r[i(230)],s="success";r[i(240)][i(254)](n,e,s,t),r[i(261)][i(241)](e,s,t),xi(s,t,r)}function xi(e,t,r){var i=fi,n=r[i(230)];r.complete[i(254)](n,t,e)}function Bi(e,t,r,i){var n=fi,s=i.context;i.error[n(254)](s,r,t,e),i[n(261)][n(258)](r,t,e),xi(t,r,i)}function Ti(e){var t,r=fi;if(!pi){for(pi={};t=yi[r(269)](wi);)pi[t[1].toLowerCase()]=t[2];t=pi[e[r(244)]()]}return null===t?null:t}function Di(e,t){var r=Ri();return(Di=function(e,t){return r[e-=222]})(e,t)}function Mi(e,t){return(e+"&"+t).replace(/[&?]{1,2}/,"?")}function Ui(e){var t,r,i,n,s=fi;Li(e)&&!(e[s(314)]instanceof FormData)&&e[s(301)]&&(e[s(314)]=(t=e.data,(n=[])[(i=fi)(293)]=function(e,t){this[i(225)](encodeURIComponent(e)+"="+encodeURIComponent(t))},Fi(n,t,r),n.join("&")[i(235)]("%20","+"))),e[s(314)]&&(!e[s(245)]||e[s(245)].toUpperCase()===s(276))&&(e[s(239)]=Mi(e[s(239)],e[s(314)]))}function Fi(e,t,r,i){var n,s,a=fi,o=(n=t,s=fi,"[object Array]"===Object[s(255)][s(307)][s(254)](n));for(var c in t){var u=t[c];i&&(c=r?i:i+"["+(o?"":c)+"]"),!i&&o?e.add(u[a(265)],u[a(224)]):(r?o(u):Li(u))?Fi(e,u,r,c):e[a(293)](c,u)}}function Pi(e){for(var t=fi,r=Array[t(255)][t(270)],i=r.call(arguments,1),n=0,s=i.length;n255)return!1;return!0}function Gi(e,t){var r=qi;if(e[r(221)]&&e.name===r(206))return t&&(e=e.slice?e[r(178)]():Array[r(195)].slice[r(227)](e)),e;if(Array.isArray(e)){if(!Vi(e))throw new Error(r(197)+e);return new Uint8Array(e)}if(Hi(e[r(188)])&&Vi(e))return new Uint8Array(e);throw new Error(r(224))}function Wi(e){return new Uint8Array(e)}function ji(){var e=["invalid plaintext size (must be segmentSize bytes)","3096660czslzv","_remainingCounter","ecb","number","invalid counter bytes size (must be 16 bytes)","AES must be instanitated with `new`","setValue","7774288qpAWYx","_lastCipherblock","711924IaKSwv","slice","Output Feedback","defineProperty","845550VEqkwz","description","ctr","_Ke","Cipher Feedback","_lastPrecipher","invalid initialation vector size (must be 16 size)","length","1519756yTsRSf","18tpWTDY","charCodeAt","key","9omSSYb","invalid plaintext size (must be 16 bytes)","prototype","PKCS#7 padding byte out of range","Array contains invalid value: ","1132920cqSqXB","setBytes","cbc","join","invalid ciphertext size (must be multiple of 16 bytes)","Counter","increment","invalid ciphertext size (must be 16 bytes)","Uint8Array","_remainingCounterIndex","cfb","1912204njSABA","_counter","Counter must be instanitated with `new`","Cipher Block Chaining","invalid key size (must be 16, 24 or 32 bytes)","fromCharCode","_lastPrecipherIndex","_aes","decrypt","_shiftRegister","substr","_prepare","buffer","segmentSize","invalid initialation vector size (must be 16 bytes)","unsupported array-like object","push","invalid ciphertext size (must be segmentSize bytes)","call","Electronic Code Block","name","invalid plaintext size (must be multiple of 16 bytes)","encrypt","_Kd","ofb"];return(ji=function(){return e})()}function qi(e,t){var r=ji();return(qi=function(e,t){return r[e-=176]})(e,t)}function Ki(e,t,r,i,n){var s=qi;(null!=i||null!=n)&&(e=e[s(178)]?e[s(178)](i,n):Array[s(195)][s(178)].call(e,i,n)),t.set(e,r)}!function(e,t){for(var r=qi,i=e();;)try{if(544428===-parseInt(r(177))/1+parseInt(r(209))/2+-parseInt(r(181))/3+parseInt(r(198))/4+parseInt(r(235))/5+parseInt(r(190))/6*(parseInt(r(189))/7)+-parseInt(r(242))/8*(parseInt(r(193))/9))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(ji);var Yi,Ji={toBytes:function(e){var t=qi,r=[],i=0;for(e=encodeURI(e);i191&&n<224?(r[t(225)](String[t(214)]((31&n)<<6|63&e[i+1])),i+=2):(r[t(225)](String[t(214)]((15&n)<<12|(63&e[i+1])<<6|63&e[i+2])),i+=3)}return r[t(201)]("")}},Xi=(Yi="0123456789abcdef",{toBytes:function(e){for(var t=qi,r=[],i=0;i>4]+Yi[15&n])}return r[t(201)]("")}}),Zi={16:10,24:12,32:14},Qi=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],$i=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],en=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],tn=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],rn=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],nn=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],sn=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],an=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],on=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],cn=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],un=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],ln=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],hn=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],dn=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],fn=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function pn(e){for(var t=qi,r=[],i=0;i>2,this[e(184)][i][r%4]=a[r],this[e(232)][t-i][r%4]=a[r];for(var o,c=0,u=s;u>16&255]<<24^$i[o>>8&255]<<16^$i[255&o]<<8^$i[o>>24&255]^Qi[c]<<24,c+=1,8!=s)for(r=1;r>8&255]<<8^$i[o>>16&255]<<16^$i[o>>24&255]<<24;for(r=s/2+1;r>2,h=u%4,this[e(184)][l][h]=a[r],this[e(232)][t-l][h]=a[r++],u++}for(var l=1;l>24&255]^hn[o>>16&255]^dn[o>>8&255]^fn[255&o]},mn.prototype[zi(231)]=function(e){var t=zi;if(16!=e.length)throw new Error(t(194));for(var r=this._Ke[t(188)]-1,i=[0,0,0,0],n=pn(e),s=0;s<4;s++)n[s]^=this._Ke[0][s];for(var a=1;a>24&255]^rn[n[(s+1)%4]>>16&255]^nn[n[(s+2)%4]>>8&255]^sn[255&n[(s+3)%4]]^this._Ke[a][s];n=i[t(178)]()}var o,c=Wi(16);for(s=0;s<4;s++)o=this[t(184)][r][s],c[4*s]=255&($i[n[s]>>24&255]^o>>24),c[4*s+1]=255&($i[n[(s+1)%4]>>16&255]^o>>16),c[4*s+2]=255&($i[n[(s+2)%4]>>8&255]^o>>8),c[4*s+3]=255&($i[255&n[(s+3)%4]]^o);return c},mn[zi(195)].decrypt=function(e){var t=zi;if(16!=e.length)throw new Error(t(205));for(var r=this[t(232)][t(188)]-1,i=[0,0,0,0],n=pn(e),s=0;s<4;s++)n[s]^=this[t(232)][0][s];for(var a=1;a>24&255]^on[n[(s+3)%4]>>16&255]^cn[n[(s+2)%4]>>8&255]^un[255&n[(s+1)%4]]^this[t(232)][a][s];n=i.slice()}var o,c=Wi(16);for(s=0;s<4;s++)o=this._Kd[r][s],c[4*s]=255&(en[n[s]>>24&255]^o>>24),c[4*s+1]=255&(en[n[(s+3)%4]>>16&255]^o>>16),c[4*s+2]=255&(en[n[(s+2)%4]>>8&255]^o>>8),c[4*s+3]=255&(en[255&n[(s+1)%4]]^o);return c};var _n=function(e){var t=zi;if(!(this instanceof _n))throw Error(t(240));this[t(182)]=t(228),this.name=t(237),this[t(216)]=new mn(e)};_n.prototype[zi(231)]=function(e){var t=zi;if((e=Gi(e))[t(188)]%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var r=Wi(e.length),i=Wi(16),n=0;nNumber.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var r=15;r>=0;--r)this[t(210)][r]=e%256,e=parseInt(e/256)},bn[zi(195)][zi(199)]=function(e){var t=zi;if(16!=(e=Gi(e,!0)).length)throw new Error(t(239));this[t(210)]=e},bn[zi(195)][zi(204)]=function(){for(var e=zi,t=15;t>=0;t--){if(255!==this[e(210)][t]){this[e(210)][t]++;break}this._counter[t]=0}};var Sn=function(e,t){var r=zi;if(!(this instanceof Sn))throw Error(r(240));this[r(182)]=r(203),this.name=r(183),!(t instanceof bn)&&(t=new bn(t)),this[r(210)]=t,this[r(236)]=null,this[r(207)]=16,this[r(216)]=new mn(e)};Sn[zi(195)][zi(231)]=function(e){for(var t=zi,r=Gi(e,!0),i=0;i16)throw new Error(t(196));for(var i=e[t(188)]-r,n=0;n>>2]>>>24-o%4*8&255;r[s+o>>>2]|=c<<24-(s+o)%4*8}else for(var u=0;u>>2]=i[u>>>2];return this[t(386)]+=a,this},clamp:function(){var t=n,r=this.words,i=this[t(386)];r[i>>>2]&=4294967295<<32-i%4*8,r[t(389)]=e[t(431)](i/4)},clone:function(){var e=n,t=u[e(426)][e(394)](this);return t[e(407)]=this.words[e(382)](0),t},random:function(e){for(var t=n,r=[],i=0;i>>2]>>>24-a%4*8&255;s[t(436)]((o>>>4)[t(395)](16)),s[t(436)]((15&o).toString(16))}return s[t(411)]("")},parse:function(e){for(var t=n,r=e[t(389)],i=[],s=0;s>>3]|=parseInt(e[t(415)](s,2),16)<<24-s%8*4;return new(l[t(384)])(i,r/2)}},f=h[n(420)]={stringify:function(e){for(var t=n,r=e[t(407)],i=e.sigBytes,s=[],a=0;a>>2]>>>24-a%4*8&255;s[t(436)](String.fromCharCode(o))}return s[t(411)]("")},parse:function(e){for(var t=n,r=e.length,i=[],s=0;s>>2]|=(255&e[t(406)](s))<<24-s%4*8;return new(l[t(384)])(i,r)}},p=h[n(441)]={stringify:function(e){var t=n;try{return decodeURIComponent(escape(f[t(447)](e)))}catch(e){throw new Error(t(419))}},parse:function(e){return f[n(413)](unescape(encodeURIComponent(e)))}},m=c[n(392)]=u[n(385)]({reset:function(){var e=n;this[e(400)]=new(l[e(384)]),this[e(403)]=0},_append:function(e){var t=n;typeof e==t(442)&&(e=p[t(413)](e)),this._data[t(427)](e),this[t(403)]+=e[t(386)]},_process:function(t){var r,i=n,s=this[i(400)],a=s[i(407)],o=s.sigBytes,c=this[i(416)],u=o/(4*c),h=(u=t?e[i(431)](u):e[i(439)]((0|u)-this._minBufferSize,0))*c,d=e[i(428)](4*h,o);if(h){for(var f=0;f>>2]|=e[a]<<24-a%4*8;i.call(this,s,n)}else i[r(494)](this,arguments)};n[t(498)]=r}}(),e[t(503)][t(515)]},(n=Mn)(499)==n(499)?e[n(501)]=i(En):i(r[n(507)])}));var Un=Fn;function Fn(e,t){var r=Pn();return(Fn=function(e,t){return r[e-=340]})(e,t)}!function(e,t){for(var r=Fn,i=e();;)try{if(407095===parseInt(r(367))/1*(-parseInt(r(353))/2)+-parseInt(r(364))/3*(-parseInt(r(372))/4)+-parseInt(r(359))/5*(-parseInt(r(350))/6)+-parseInt(r(347))/7+-parseInt(r(356))/8*(-parseInt(r(341))/9)+parseInt(r(361))/10+parseInt(r(366))/11)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Pn);Ze[Un(365)]((function(e,t){var r,i,n,s=Un;r=Ze[s(348)],i=function(e){var t=s;return function(){var t=Fn,r=e,i=r[t(345)][t(362)],n=r[t(371)];function s(e){return e<<8&4278255360|e>>>8&16711935}n[t(355)]=n[t(358)]={stringify:function(e){for(var r=t,i=e[r(368)],n=e[r(340)],s=[],a=0;a>>2]>>>16-a%4*8&65535;s[r(349)](String.fromCharCode(o))}return s.join("")},parse:function(e){for(var r=t,n=e[r(360)],s=[],a=0;a>>1]|=e[r(344)](a)<<16-a%2*16;return i.create(s,2*n)}},n[t(363)]={stringify:function(e){for(var r=t,i=e[r(368)],n=e[r(340)],a=[],o=0;o>>2]>>>16-o%4*8&65535);a[r(349)](String[r(369)](c))}return a[r(351)]("")},parse:function(e){for(var r=t,n=e[r(360)],a=[],o=0;o>>1]|=s(e[r(344)](o)<<16-o%2*16);return i[r(354)](a,2*n)}}}(),e[t(371)][t(355)]},"object"===(n=Fn)(352)?e[n(342)]=i(En):"undefined"===n(343)&&(void 0)[n(346)]?(void 0)([n(370)],i):i(r[n(357)])}));function Pn(){var e=["enc","278732BllCXP","sigBytes","1377sgUahJ","exports","function","charCodeAt","lib","amd","3793832TAIRBk","commonjsGlobal","push","48LQdUIz","join","object","90FmdyZO","create","Utf16","5696jbrJwo","CryptoJS","Utf16BE","36305CfQdNI","length","2665450VYRnOL","WordArray","Utf16LE","33TRnnGc","createCommonjsModule","4995529cikGlo","15670gThGze","words","fromCharCode","./core"];return(Pn=function(){return e})()}function Ln(){var e=["length","amd","./core","373436CBsFka","WordArray","1076334BqxczH","Base64","indexOf","enc","charCodeAt","2393380VJdiMa","45ArMJaG","12776640eXaeEp","create","2477416oOXBWi","18sJUEHM","35bAAFMJ","91eMjqrt","clamp","sigBytes","object","words","charAt","4030MaelRa","push","exports","5664050PtkgKv","join","createCommonjsModule","CryptoJS","_reverseMap","function","commonjsGlobal"];return(Ln=function(){return e})()}var Rn=Nn;function Nn(e,t){var r=Ln();return(Nn=function(e,t){return r[e-=133]})(e,t)}!function(e,t){for(var r=Nn,i=e();;)try{if(908991===parseInt(r(165))/1*(parseInt(r(138))/2)+-parseInt(r(159))/3*(parseInt(r(151))/4)+-parseInt(r(164))/5*(-parseInt(r(153))/6)+-parseInt(r(141))/7+parseInt(r(162))/8*(parseInt(r(163))/9)+parseInt(r(160))/10+-parseInt(r(158))/11)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Ln);Ze[Rn(143)]((function(e,t){var r,i,n,s=Rn;r=Ze[s(147)],i=function(e){var t,r,i,n=s;return t=Nn,i=(r=e).lib[t(152)],r[t(156)][t(154)]={stringify:function(e){var r=t,i=e[r(136)],n=e[r(134)],s=this._map;e[r(133)]();for(var a=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(i[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|i[o+2>>>2]>>>24-(o+2)%4*8&255,u=0;u<4&&o+.75*u>>6*(3-u)&63));var l=s[r(137)](64);if(l)for(;a[r(148)]%4;)a[r(139)](l);return a[r(142)]("")},parse:function(e){var r=t,n=e.length,s=this._map,a=this[r(145)];if(!a){a=this._reverseMap=[];for(var o=0;o>>6-c%4*2;a[o>>>2]|=u<<24-o%4*8,o++}return i[s(161)](a,o)}(e,n,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e[n(156)].Base64},(n=Nn)(135)==n(135)?e[n(140)]=i(En):"undefined"===n(146)&&(void 0)[n(149)]?(void 0)([n(150)],i):i(r[n(144)])}));function On(){var e=["charAt","_reverseMap","136872bUoGZk","42014IECNZn","enc","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","531KaejEX","942Acamfk","object","_map","amd","3364wxfMfO","./core","length","3027iZlthy","13923270GwYGGP","commonjsGlobal","create","4019076eQMOIL","1hlApDT","clamp","push","lib","3070855lTMJgt","_safe_map","charCodeAt","Base64url","words","WordArray","11UYilHY","2735274KpIXJl","CryptoJS","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_","join"];return(On=function(){return e})()}function zn(e,t){var r=On();return(zn=function(e,t){return r[e-=360]})(e,t)}!function(e,t){for(var r=zn,i=e();;)try{if(707694===parseInt(r(385))/1*(parseInt(r(362))/2)+parseInt(r(380))/3*(parseInt(r(377))/4)+-parseInt(r(389))/5+parseInt(r(373))/6*(-parseInt(r(369))/7)+-parseInt(r(368))/8*(parseInt(r(372))/9)+parseInt(r(381))/10+-parseInt(r(361))/11*(parseInt(r(384))/12))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(On);Xe((function(e,t){var r,i,n,s=zn;r=Ze[s(382)],i=function(e){var t,r,i,n=s;return i=(r=e)[(t=zn)(388)][t(360)],r[t(370)][t(392)]={stringify:function(e,r){var i=t;void 0===r&&(r=!0);var n=e[i(393)],s=e.sigBytes,a=r?this[i(390)]:this[i(375)];e[i(386)]();for(var o=[],c=0;c>>2]>>>24-c%4*8&255)<<16|(n[c+1>>>2]>>>24-(c+1)%4*8&255)<<8|n[c+2>>>2]>>>24-(c+2)%4*8&255,l=0;l<4&&c+.75*l>>6*(3-l)&63));var h=a[i(366)](64);if(h)for(;o[i(379)]%4;)o[i(387)](h);return o[i(365)]("")},parse:function(e,r){var n=t;void 0===r&&(r=!0);var s=e[n(379)],a=r?this[n(390)]:this[n(375)],o=this[n(367)];if(!o){o=this[n(367)]=[];for(var c=0;c>>6-c%4*2;a[o>>>2]|=u<<24-o%4*8,o++}return i[s(383)](a,o)}(e,s,o)},_map:t(371),_safe_map:t(364)},e[n(370)][n(392)]},"object"===(n=zn)(374)?e.exports=i(En):i(r[n(363)])}));var Hn=Gn;function Vn(){var e=["extend","33238420PZGDMH","8kjRcfT","floor","CryptoJS","lib","amd","sigBytes","1171515AOZLBH","Hasher","object","1089074SlypPy","_createHelper","25hCydSG","112784RUJybx","call","638124gjVYdg","init","_nDataBytes","length","755104ViVCxa","8148231vXCGdA","WordArray","algo","createCommonjsModule","_createHmacHelper","_hash","./core","abs","words","clone","MD5","138uIzlTP","function","HmacMD5"];return(Vn=function(){return e})()}!function(e,t){for(var r=Gn,i=e();;)try{if(649180===-parseInt(r(406))/1+parseInt(r(397))/2+-parseInt(r(394))/3+parseInt(r(402))/4*(-parseInt(r(399))/5)+-parseInt(r(418))/6*(parseInt(r(400))/7)+-parseInt(r(423))/8*(parseInt(r(407))/9)+parseInt(r(422))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Vn);Ze[Hn(410)]((function(e,t){var r,i,n;r=Ye,i=function(e){var t=Gn;return function(t){var r=Gn,i=e,n=i[r(426)],s=n[r(408)],a=n[r(395)],o=i[r(409)],c=[];!function(){for(var e=r,i=0;i<64;i++)c[i]=4294967296*t[e(414)](t.sin(i+1))|0}();var u=o[r(417)]=a[r(421)]({_doReset:function(){var e=r;this[e(412)]=new(s[e(403)])([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var i=r,n=0;n<16;n++){var s=t+n,a=e[s];e[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var o=this[i(412)][i(415)],u=e[t+0],p=e[t+1],m=e[t+2],_=e[t+3],v=e[t+4],y=e[t+5],g=e[t+6],b=e[t+7],S=e[t+8],I=e[t+9],w=e[t+10],A=e[t+11],k=e[t+12],E=e[t+13],C=e[t+14],x=e[t+15],B=o[0],T=o[1],D=o[2],M=o[3];B=l(B,T,D,M,u,7,c[0]),M=l(M,B,T,D,p,12,c[1]),D=l(D,M,B,T,m,17,c[2]),T=l(T,D,M,B,_,22,c[3]),B=l(B,T,D,M,v,7,c[4]),M=l(M,B,T,D,y,12,c[5]),D=l(D,M,B,T,g,17,c[6]),T=l(T,D,M,B,b,22,c[7]),B=l(B,T,D,M,S,7,c[8]),M=l(M,B,T,D,I,12,c[9]),D=l(D,M,B,T,w,17,c[10]),T=l(T,D,M,B,A,22,c[11]),B=l(B,T,D,M,k,7,c[12]),M=l(M,B,T,D,E,12,c[13]),D=l(D,M,B,T,C,17,c[14]),B=h(B,T=l(T,D,M,B,x,22,c[15]),D,M,p,5,c[16]),M=h(M,B,T,D,g,9,c[17]),D=h(D,M,B,T,A,14,c[18]),T=h(T,D,M,B,u,20,c[19]),B=h(B,T,D,M,y,5,c[20]),M=h(M,B,T,D,w,9,c[21]),D=h(D,M,B,T,x,14,c[22]),T=h(T,D,M,B,v,20,c[23]),B=h(B,T,D,M,I,5,c[24]),M=h(M,B,T,D,C,9,c[25]),D=h(D,M,B,T,_,14,c[26]),T=h(T,D,M,B,S,20,c[27]),B=h(B,T,D,M,E,5,c[28]),M=h(M,B,T,D,m,9,c[29]),D=h(D,M,B,T,b,14,c[30]),B=d(B,T=h(T,D,M,B,k,20,c[31]),D,M,y,4,c[32]),M=d(M,B,T,D,S,11,c[33]),D=d(D,M,B,T,A,16,c[34]),T=d(T,D,M,B,C,23,c[35]),B=d(B,T,D,M,p,4,c[36]),M=d(M,B,T,D,v,11,c[37]),D=d(D,M,B,T,b,16,c[38]),T=d(T,D,M,B,w,23,c[39]),B=d(B,T,D,M,E,4,c[40]),M=d(M,B,T,D,u,11,c[41]),D=d(D,M,B,T,_,16,c[42]),T=d(T,D,M,B,g,23,c[43]),B=d(B,T,D,M,I,4,c[44]),M=d(M,B,T,D,k,11,c[45]),D=d(D,M,B,T,x,16,c[46]),B=f(B,T=d(T,D,M,B,m,23,c[47]),D,M,u,6,c[48]),M=f(M,B,T,D,b,10,c[49]),D=f(D,M,B,T,C,15,c[50]),T=f(T,D,M,B,y,21,c[51]),B=f(B,T,D,M,k,6,c[52]),M=f(M,B,T,D,_,10,c[53]),D=f(D,M,B,T,w,15,c[54]),T=f(T,D,M,B,p,21,c[55]),B=f(B,T,D,M,S,6,c[56]),M=f(M,B,T,D,x,10,c[57]),D=f(D,M,B,T,g,15,c[58]),T=f(T,D,M,B,E,21,c[59]),B=f(B,T,D,M,v,6,c[60]),M=f(M,B,T,D,A,10,c[61]),D=f(D,M,B,T,m,15,c[62]),T=f(T,D,M,B,I,21,c[63]),o[0]=o[0]+B|0,o[1]=o[1]+T|0,o[2]=o[2]+D|0,o[3]=o[3]+M|0},_doFinalize:function(){var e=r,i=this._data,n=i[e(415)],s=8*this[e(404)],a=8*i[e(393)];n[a>>>5]|=128<<24-a%32;var o=t[e(424)](s/4294967296),c=s;n[15+(a+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(a+64>>>9<<4)]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),i[e(393)]=4*(n[e(405)]+1),this._process();for(var u=this._hash,l=u[e(415)],h=0;h<4;h++){var d=l[h];l[h]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)}return u},clone:function(){var e=r,t=a[e(416)][e(401)](this);return t[e(412)]=this[e(412)][e(416)](),t}});function l(e,t,r,i,n,s,a){var o=e+(t&r|~t&i)+n+a;return(o<>>32-s)+t}function h(e,t,r,i,n,s,a){var o=e+(t&i|r&~i)+n+a;return(o<>>32-s)+t}function d(e,t,r,i,n,s,a){var o=e+(t^r^i)+n+a;return(o<>>32-s)+t}function f(e,t,r,i,n,s,a){var o=e+(r^(t|~i))+n+a;return(o<>>32-s)+t}i.MD5=a[r(398)](u),i[r(420)]=a[r(411)](u)}(Math),e[t(417)]},(n=Gn)(396)==n(396)?e.exports=i(En):"undefined"===n(419)&&(void 0)[n(392)]?(void 0)([n(413)],i):i(r[n(425)])}));function Gn(e,t){var r=Vn();return(Gn=function(e,t){return r[e-=392]})(e,t)}function Wn(e,t){var r=jn();return(Wn=function(e,t){return r[e-=439]})(e,t)}!function(e,t){for(var r=Wn,i=e();;)try{if(783420===parseInt(r(456))/1*(-parseInt(r(454))/2)+-parseInt(r(465))/3+-parseInt(r(449))/4+-parseInt(r(461))/5+parseInt(r(460))/6*(parseInt(r(444))/7)+-parseInt(r(467))/8+parseInt(r(439))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(jn);Xe((function(e,t){var r,i,n,s=Wn;r=Ze[s(443)],i=function(e){var t,r,i,n,a,o,c,u,l=s;return i=(r=e)[(t=Wn)(463)],n=i.WordArray,a=i[t(445)],o=r[t(462)],c=[],u=o[t(452)]=a.extend({_doReset:function(){var e=t;this[e(457)]=new(n[e(447)])([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,r){for(var i=this[t(457)].words,n=i[0],s=i[1],a=i[2],o=i[3],u=i[4],l=0;l<80;l++){if(l<16)c[l]=0|e[r+l];else{var h=c[l-3]^c[l-8]^c[l-14]^c[l-16];c[l]=h<<1|h>>>31}var d=(n<<5|n>>>27)+u+c[l];d+=l<20?1518500249+(s&a|~s&o):l<40?1859775393+(s^a^o):l<60?(s&a|s&o|a&o)-1894007588:(s^a^o)-899497514,u=o,o=a,a=s<<30|s>>>2,s=n,n=d}i[0]=i[0]+n|0,i[1]=i[1]+s|0,i[2]=i[2]+a|0,i[3]=i[3]+o|0,i[4]=i[4]+u|0},_doFinalize:function(){var e=t,r=this[e(466)],i=r[e(458)],n=8*this[e(464)],s=8*r[e(459)];return i[s>>>5]|=128<<24-s%32,i[14+(s+64>>>9<<4)]=Math.floor(n/4294967296),i[15+(s+64>>>9<<4)]=n,r[e(459)]=4*i[e(453)],this._process(),this._hash},clone:function(){var e=t,r=a[e(448)][e(451)](this);return r._hash=this[e(457)][e(448)](),r}}),r[t(452)]=a[t(441)](u),r[t(455)]=a[t(450)](u),e[l(452)]},"object"===(n=Wn)(446)?e[n(468)]=i(En):"undefined"===n(440)&&(void 0).amd?(void 0)(["./core"],i):i(r[n(442)])}));function jn(){var e=["length","34qEfAey","HmacSHA1","2591BYMQCZ","_hash","words","sigBytes","186vzwxio","795140OtcNue","algo","lib","_nDataBytes","2443467ylAxhL","_data","8216784brlhNd","exports","32923899TtAFbb","function","_createHelper","CryptoJS","commonjsGlobal","83503dzLxMk","Hasher","object","init","clone","4799712NhkhvJ","_createHmacHelper","call","SHA1"];return(jn=function(){return e})()}!function(e,t){for(var r=qn,i=e();;)try{if(291290===parseInt(r(415))/1*(-parseInt(r(405))/2)+-parseInt(r(419))/3*(parseInt(r(421))/4)+parseInt(r(397))/5*(-parseInt(r(424))/6)+parseInt(r(402))/7+-parseInt(r(418))/8+-parseInt(r(398))/9*(parseInt(r(403))/10)+parseInt(r(416))/11*(parseInt(r(422))/12))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Kn);Xe((function(e,t){var r,i,n,s=qn;r=Ze[s(423)],i=function(e){var t=s;return function(t){var r=qn,i=e,n=i[r(404)],s=n.WordArray,a=n[r(426)],o=i[r(427)],c=[],u=[];!function(){var e=r;function i(e){for(var r=t[qn(400)](e),i=2;i<=r;i++)if(!(e%i))return!1;return!0}function n(e){return 4294967296*(e-(0|e))|0}for(var s=2,a=0;a<64;)i(s)&&(a<8&&(c[a]=n(t[e(429)](s,.5))),u[a]=n(t[e(429)](s,1/3)),a++),s++}();var l=[],h=o[r(396)]=a.extend({_doReset:function(){var e=r;this[e(420)]=new(s[e(428)])(c[e(414)](0))},_doProcessBlock:function(e,t){for(var i=this[r(420)].words,n=i[0],s=i[1],a=i[2],o=i[3],c=i[4],h=i[5],d=i[6],f=i[7],p=0;p<64;p++){if(p<16)l[p]=0|e[t+p];else{var m=l[p-15],_=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,v=l[p-2],y=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;l[p]=_+l[p-7]+y+l[p-16]}var g=n&s^n&a^s&a,b=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),S=f+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&h^~c&d)+u[p]+l[p];f=d,d=h,h=c,c=o+S|0,o=a,a=s,s=n,n=S+(b+g)|0}i[0]=i[0]+n|0,i[1]=i[1]+s|0,i[2]=i[2]+a|0,i[3]=i[3]+o|0,i[4]=i[4]+c|0,i[5]=i[5]+h|0,i[6]=i[6]+d|0,i[7]=i[7]+f|0},_doFinalize:function(){var e=r,i=this[e(417)],n=i[e(410)],s=8*this._nDataBytes,a=8*i.sigBytes;return n[a>>>5]|=128<<24-a%32,n[14+(a+64>>>9<<4)]=t.floor(s/4294967296),n[15+(a+64>>>9<<4)]=s,i[e(425)]=4*n.length,this._process(),this[e(420)]},clone:function(){var e=r,t=a[e(401)][e(413)](this);return t._hash=this[e(420)][e(401)](),t}});i[r(396)]=a[r(411)](h),i.HmacSHA256=a[r(407)](h)}(Math),e[t(396)]},"object"===(n=qn)(409)?e[n(408)]=i(En):"undefined"===n(399)&&(void 0)[n(412)]?(void 0)([n(406)],i):i(r[n(395)])}));function qn(e,t){var r=Kn();return(qn=function(e,t){return r[e-=395]})(e,t)}function Kn(){var e=["exports","object","words","_createHelper","amd","call","slice","1586JhtKGv","2792735Vzyall","_data","827816ERMuFD","24276VNAaql","_hash","64HPtxSd","60pDAaAk","commonjsGlobal","300sTyMNW","sigBytes","Hasher","algo","init","pow","CryptoJS","SHA256","22555QszSZm","2192553xdZXPv","function","sqrt","clone","1709323utMXkk","10ZPpRio","lib","656ThdnVg","./core","_createHmacHelper"];return(Kn=function(){return e})()}function Yn(e,t){var r=Jn();return(Yn=function(e,t){return r[e-=301]})(e,t)}!function(e,t){for(var r=Yn,i=e();;)try{if(822592===parseInt(r(318))/1+-parseInt(r(303))/2*(parseInt(r(304))/3)+parseInt(r(320))/4+-parseInt(r(305))/5*(-parseInt(r(322))/6)+-parseInt(r(325))/7+parseInt(r(306))/8+parseInt(r(326))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Jn);Xe((function(e,t){var r,i,n,s=Yn;r=Ze[s(319)],i=function(e){var t,r,i,n,a,o,c=s;return i=(r=e)[(t=Yn)(323)][t(311)],n=r[t(308)],a=n[t(316)],o=n[t(315)]=a[t(328)]({_doReset:function(){var e=t;this[e(324)]=new(i[e(307)])([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=t,r=a[e(329)][e(313)](this);return r[e(317)]-=4,r}}),r[t(315)]=a._createHelper(o),r[t(327)]=a._createHmacHelper(o),e[c(315)]},"object"===(n=Yn)(310)?e[n(321)]=i(En):"undefined"===n(302)&&(void 0)[n(309)]?(void 0)([n(301),n(314)],i):i(r[n(312)])}));function Jn(){var e=["sigBytes","184276owpdZu","commonjsGlobal","262776ofOCCF","exports","84XxcPuT","lib","_hash","3674986ESfbDn","2482407kCAAvq","HmacSHA224","extend","_doFinalize","./core","function","2bytSKO","221181Qjecjp","280565PNkDLI","879536PLKDKK","init","algo","amd","object","WordArray","CryptoJS","call","./sha256","SHA224","SHA256"];return(Jn=function(){return e})()}var Xn=Qn;function Zn(){var e=["clone","1738008PagpkK","231063tvomdv","584ZdYoum","object","amd","exports","createCommonjsModule","149441XQVkLH","algo","_hash","init","lib","10227BMyfZj","1111068RKXQHy","low","length","floor","words","2GqwaXr","Hasher","toX32","CryptoJS","_process","high","4uxpMua","SHA512","x64","Word","WordArray","1566630mnbZIv","_nDataBytes","339550ztCBgC","function","apply","sigBytes","HmacSHA512","create"];return(Zn=function(){return e})()}function Qn(e,t){var r=Zn();return(Qn=function(e,t){return r[e-=486]})(e,t)}!function(e,t){for(var r=Qn,i=e();;)try{if(100608===parseInt(r(503))/1*(parseInt(r(514))/2)+parseInt(r(497))/3*(parseInt(r(520))/4)+-parseInt(r(489))/5+parseInt(r(509))/6+parseInt(r(508))/7*(parseInt(r(498))/8)+-parseInt(r(496))/9+-parseInt(r(487))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Zn);Ze[Xn(502)]((function(e,t){var r,i,n;r=Ye,i=function(e){return function(){var t=Qn,r=e,i=r[t(507)][t(515)],n=r[t(522)],s=n[t(523)],a=n[t(486)],o=r[t(504)];function c(){var e=t;return s[e(494)][e(491)](s,arguments)}var u=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=c()}();var h=o[t(521)]=i.extend({_doReset:function(){var e=t;this[e(505)]=new a.init([new s.init(1779033703,4089235720),new(s[e(506)])(3144134277,2227873595),new(s[e(506)])(1013904242,4271175723),new(s[e(506)])(2773480762,1595750129),new(s[e(506)])(1359893119,2917565137),new s.init(2600822924,725511199),new s.init(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(e,r){for(var i=t,n=this[i(505)][i(513)],s=n[0],a=n[1],o=n[2],c=n[3],h=n[4],d=n[5],f=n[6],p=n[7],m=s[i(519)],_=s[i(510)],v=a[i(519)],y=a[i(510)],g=o[i(519)],b=o[i(510)],S=c.high,I=c.low,w=h[i(519)],A=h[i(510)],k=d[i(519)],E=d[i(510)],C=f[i(519)],x=f[i(510)],B=p.high,T=p[i(510)],D=m,M=_,U=v,F=y,P=g,L=b,R=S,N=I,O=w,z=A,H=k,V=E,G=C,W=x,j=B,q=T,K=0;K<80;K++){var Y,J,X=l[K];if(K<16)J=X[i(519)]=0|e[r+2*K],Y=X.low=0|e[r+2*K+1];else{var Z=l[K-15],Q=Z.high,$=Z[i(510)],ee=(Q>>>1|$<<31)^(Q>>>8|$<<24)^Q>>>7,te=($>>>1|Q<<31)^($>>>8|Q<<24)^($>>>7|Q<<25),re=l[K-2],ie=re[i(519)],ne=re[i(510)],se=(ie>>>19|ne<<13)^(ie<<3|ne>>>29)^ie>>>6,ae=(ne>>>19|ie<<13)^(ne<<3|ie>>>29)^(ne>>>6|ie<<26),oe=l[K-7],ce=oe[i(519)],ue=oe.low,le=l[K-16],he=le[i(519)],de=le[i(510)];J=(J=(J=ee+ce+((Y=te+ue)>>>0>>0?1:0))+se+((Y+=ae)>>>0>>0?1:0))+he+((Y+=de)>>>0>>0?1:0),X[i(519)]=J,X[i(510)]=Y}var fe,pe=O&H^~O&G,me=z&V^~z&W,_e=D&U^D&P^U&P,ve=M&F^M&L^F&L,ye=(D>>>28|M<<4)^(D<<30|M>>>2)^(D<<25|M>>>7),ge=(M>>>28|D<<4)^(M<<30|D>>>2)^(M<<25|D>>>7),be=(O>>>14|z<<18)^(O>>>18|z<<14)^(O<<23|z>>>9),Se=(z>>>14|O<<18)^(z>>>18|O<<14)^(z<<23|O>>>9),Ie=u[K],we=Ie[i(519)],Ae=Ie[i(510)],ke=j+be+((fe=q+Se)>>>0>>0?1:0),Ee=ge+ve;j=G,q=W,G=H,W=V,H=O,V=z,O=R+(ke=(ke=(ke=ke+pe+((fe+=me)>>>0>>0?1:0))+we+((fe+=Ae)>>>0>>0?1:0))+J+((fe+=Y)>>>0>>0?1:0))+((z=N+fe|0)>>>0>>0?1:0)|0,R=P,N=L,P=U,L=F,U=D,F=M,D=ke+(ye+_e+(Ee>>>0>>0?1:0))+((M=fe+Ee|0)>>>0>>0?1:0)|0}_=s[i(510)]=_+M,s[i(519)]=m+D+(_>>>0>>0?1:0),y=a[i(510)]=y+F,a.high=v+U+(y>>>0>>0?1:0),b=o.low=b+L,o.high=g+P+(b>>>0>>0?1:0),I=c[i(510)]=I+N,c.high=S+R+(I>>>0>>0?1:0),A=h[i(510)]=A+z,h.high=w+O+(A>>>0>>0?1:0),E=d[i(510)]=E+V,d.high=k+H+(E>>>0>>0?1:0),x=f[i(510)]=x+W,f[i(519)]=C+G+(x>>>0>>0?1:0),T=p[i(510)]=T+q,p[i(519)]=B+j+(T>>>0>>0?1:0)},_doFinalize:function(){var e=t,r=this._data,i=r[e(513)],n=8*this[e(488)],s=8*r.sigBytes;return i[s>>>5]|=128<<24-s%32,i[30+(s+128>>>10<<5)]=Math[e(512)](n/4294967296),i[31+(s+128>>>10<<5)]=n,r[e(492)]=4*i[e(511)],this[e(518)](),this[e(505)][e(516)]()},clone:function(){var e=t,r=i.clone.call(this);return r._hash=this[e(505)][e(495)](),r},blockSize:32});r[t(521)]=i._createHelper(h),r[t(493)]=i._createHmacHelper(h)}(),e.SHA512},"object"===(n=Qn)(499)?e[n(501)]=i(En):"undefined"===n(490)&&(void 0)[n(500)]?(void 0)(["./core","./x64-core"],i):i(r[n(517)])}));var $n=es;function es(e,t){var r=ts();return(es=function(e,t){return r[e-=202]})(e,t)}function ts(){var e=["algo","_createHmacHelper","11SXJpZU","SHA512","33SbnItO","object","amd","107204ezArAi","620188IcGnbU","CryptoJS","_doFinalize","2720165LpGKYJ","./core","_createHelper","x64","752773uxCwZq","SHA384","3756190jDxuPr","_hash","HmacSHA384","14025951SEYoFv","./sha512","2166238vxPTIu","init","18EoqYLK","sigBytes","createCommonjsModule","./x64-core","call","32PSsrYT"];return(ts=function(){return e})()}!function(e,t){for(var r=es,i=e();;)try{if(900235===-parseInt(r(226))/1+parseInt(r(210))/2+-parseInt(r(222))/3*(parseInt(r(225))/4)+parseInt(r(229))/5*(-parseInt(r(212))/6)+-parseInt(r(203))/7*(-parseInt(r(217))/8)+parseInt(r(208))/9+parseInt(r(205))/10*(parseInt(r(220))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(ts);Ze[$n(214)]((function(e,t){var r,i,n;r=Ye,i=function(e){var t,r,i,n,s,a,o,c,u=es;return i=(r=e)[(t=es)(202)],n=i.Word,s=i.WordArray,a=r[t(218)],o=a[t(221)],c=a[t(204)]=o.extend({_doReset:function(){var e=t;this[e(206)]=new(s[e(211)])([new(n[e(211)])(3418070365,3238371032),new(n[e(211)])(1654270250,914150663),new(n[e(211)])(2438529370,812702999),new(n[e(211)])(355462360,4144912697),new(n[e(211)])(1731405415,4290775857),new(n[e(211)])(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var e=t,r=o[e(228)][e(216)](this);return r[e(213)]-=16,r}}),r[t(204)]=o[t(231)](c),r[t(207)]=o[t(219)](c),e[u(204)]},(n=es)(223)==n(223)?e.exports=i(En):i(r[n(227)])}));var rs=ns;function is(){var e=["Hasher","CryptoJS","object","cfg","15QToYDw","909921gSnBHw","sigBytes","createCommonjsModule","slice","low","999786YypIGg","13396446DqFujb","_state","algo","SHA3","3870041MSVwCQ","lib","extend","commonjsGlobal","init","clone","8HTMFHm","high","x64","push","exports","_createHelper","_data","HmacSHA3","blockSize","./x64-core","_process","139903fpyQAY","WordArray","amd","function","1245782nvvWho","outputLength","2450036OQUcMS"];return(is=function(){return e})()}function ns(e,t){var r=is();return(ns=function(e,t){return r[e-=439]})(e,t)}!function(e,t){for(var r=ns,i=e();;)try{if(356452===-parseInt(r(463))/1+parseInt(r(467))/2+-parseInt(r(475))/3+parseInt(r(469))/4+parseInt(r(474))/5*(parseInt(r(441))/6)+parseInt(r(446))/7+-parseInt(r(452))/8*(parseInt(r(442))/9))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(is);Ze[rs(477)]((function(e,t){var r,i,n;r=Ze[rs(449)],i=function(e){return function(t){var r=ns,i=e,n=i[r(447)],s=n[r(464)],a=n[r(470)],o=i[r(454)].Word,c=i[r(444)],u=[],l=[],h=[];!function(){for(var e=1,t=0,r=0;r<24;r++){u[e+5*t]=(r+1)*(r+2)/2%64;var i=(2*e+3*t)%5;e=t%5,t=i}for(e=0;e<5;e++)for(t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var n=1,s=0;s<24;s++){for(var a=0,c=0,d=0;d<7;d++){if(1&n){var f=(1<>>24)|4278255360&(o<<24|o>>>8),c=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),(T=n[a])[i(453)]^=c,T[i(440)]^=o}for(var f=0;f<24;f++){for(var p=0;p<5;p++){for(var m=0,_=0,v=0;v<5;v++)m^=(T=n[p+5*v])[i(453)],_^=T.low;var y=d[p];y[i(453)]=m,y[i(440)]=_}for(p=0;p<5;p++){var g=d[(p+4)%5],b=d[(p+1)%5],S=b.high,I=b[i(440)];for(m=g[i(453)]^(S<<1|I>>>31),_=g[i(440)]^(I<<1|S>>>31),v=0;v<5;v++)(T=n[p+5*v])[i(453)]^=m,T[i(440)]^=_}for(var w=1;w<25;w++){var A=(T=n[w])[i(453)],k=T[i(440)],E=u[w];E<32?(m=A<>>32-E,_=k<>>32-E):(m=k<>>64-E,_=A<>>64-E);var C=d[l[w]];C[i(453)]=m,C[i(440)]=_}var x=d[0],B=n[0];for(x.high=B[i(453)],x[i(440)]=B.low,p=0;p<5;p++)for(v=0;v<5;v++){var T=n[w=p+5*v],D=d[w],M=d[(p+1)%5+5*v],U=d[(p+2)%5+5*v];T[i(453)]=D[i(453)]^~M.high&U[i(453)],T[i(440)]=D[i(440)]^~M[i(440)]&U[i(440)]}T=n[0];var F=h[f];T.high^=F[i(453)],T[i(440)]^=F[i(440)]}},_doFinalize:function(){var e=r,i=this[e(458)],n=i.words;this._nDataBytes;var a=8*i.sigBytes,o=32*this[e(460)];n[a>>>5]|=1<<24-a%32,n[(t.ceil((a+1)/o)*o>>>5)-1]|=128,i[e(476)]=4*n.length,this[e(462)]();for(var c=this[e(443)],u=this[e(473)][e(468)]/8,l=u/8,h=[],d=0;d>>24)|4278255360&(p<<24|p>>>8),m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),h[e(455)](m),h[e(455)](p)}return new s.init(h,u)},clone:function(){for(var e=r,t=a[e(451)].call(this),i=t[e(443)]=this[e(443)][e(439)](0),n=0;n<25;n++)i[n]=i[n].clone();return t}});i.SHA3=a[r(457)](f),i[r(459)]=a._createHmacHelper(f)}(Math),e.SHA3},(n=ns)(472)==n(472)?e[n(456)]=i(En):"undefined"===n(466)&&(void 0)[n(465)]?(void 0)(["./core",n(461)],i):i(r[n(471)])}));function ss(e,t){var r=os();return(ss=function(e,t){return r[e-=222]})(e,t)}var as=ss;!function(e,t){for(var r=ss,i=e();;)try{if(957251===parseInt(r(230))/1*(-parseInt(r(232))/2)+-parseInt(r(246))/3+-parseInt(r(239))/4+-parseInt(r(248))/5+-parseInt(r(238))/6*(parseInt(r(235))/7)+-parseInt(r(222))/8*(-parseInt(r(252))/9)+-parseInt(r(242))/10*(-parseInt(r(243))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(os);Ze[as(247)]((function(e,t){var r,i,n,s=as;r=Ze[s(233)],i=function(e){var t=s;return function(t){var r=ss,i=e,n=i[r(253)],s=n[r(225)],a=n[r(257)],o=i[r(226)],c=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=s.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=s[r(229)]([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),h=s.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=s[r(229)]([0,1518500249,1859775393,2400959708,2840853838]),f=s[r(229)]([1352829926,1548603684,1836072691,2053994217,0]),p=o[r(237)]=a[r(240)]({_doReset:function(){var e=r;this[e(251)]=s[e(229)]([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var i=r,n=0;n<16;n++){var s=t+n,a=e[s];e[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var o,p,S,I,w,A,k,E,C,x,B,T=this[i(251)][i(224)],D=d[i(224)],M=f[i(224)],U=c[i(224)],F=u[i(224)],P=l[i(224)],L=h.words;for(A=o=T[0],k=p=T[1],E=S=T[2],C=I=T[3],x=w=T[4],n=0;n<80;n+=1)B=o+e[t+U[n]]|0,B+=n<16?m(p,S,I)+D[0]:n<32?_(p,S,I)+D[1]:n<48?v(p,S,I)+D[2]:n<64?y(p,S,I)+D[3]:g(p,S,I)+D[4],B=(B=b(B|=0,P[n]))+w|0,o=w,w=I,I=b(S,10),S=p,p=B,B=A+e[t+F[n]]|0,B+=n<16?g(k,E,C)+M[0]:n<32?y(k,E,C)+M[1]:n<48?v(k,E,C)+M[2]:n<64?_(k,E,C)+M[3]:m(k,E,C)+M[4],B=(B=b(B|=0,L[n]))+x|0,A=x,x=C,C=b(E,10),E=k,k=B;B=T[1]+S+C|0,T[1]=T[2]+I+x|0,T[2]=T[3]+w+A|0,T[3]=T[4]+o+k|0,T[4]=T[0]+p+E|0,T[0]=B},_doFinalize:function(){var e=r,t=this[e(250)],i=t[e(224)],n=8*this[e(223)],s=8*t[e(236)];i[s>>>5]|=128<<24-s%32,i[14+(s+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t[e(236)]=4*(i[e(234)]+1),this[e(227)]();for(var a=this[e(251)],o=a[e(224)],c=0;c<5;c++){var u=o[c];o[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var e=r,t=a.clone[e(241)](this);return t[e(251)]=this._hash[e(254)](),t}});function m(e,t,r){return e^t^r}function _(e,t,r){return e&t|~e&r}function v(e,t,r){return(e|~t)^r}function y(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}i[r(237)]=a[r(244)](p),i[r(249)]=a[r(228)](p)}(),e[t(237)]},"object"===(n=ss)(256)?e[n(255)]=i(En):i(r[n(231)])}));function os(){var e=["_createHelper","./core","1244385JVpYfo","createCommonjsModule","5080135xmJuOI","HmacRIPEMD160","_data","_hash","5606019QGyjZU","lib","clone","exports","object","Hasher","16dDdKQW","_nDataBytes","words","WordArray","algo","_process","_createHmacHelper","create","2041PrPkmq","CryptoJS","18haWonM","commonjsGlobal","length","553zayWJu","sigBytes","RIPEMD160","61968ihthDZ","5554492LfhjOu","extend","call","50OMhcKb","7403429ETagcL"];return(os=function(){return e})()}var cs=ls;function us(){var e=["7966iZPDPU","Base","1048YslUML","258784rewutF","createCommonjsModule","object","HMAC","parse","CryptoJS","concat","clone","1977489QhdmSL","extend","1433560txoluG","commonjsGlobal","493258aMuLYd","_oKey","exports","words","algo","finalize","init","reset","_hasher","clamp","update","597044KbKOdd","9ZXHAPS","./core","_iKey","function","string","Utf8","30VfArZj","sigBytes","2208360MLQtKZ"];return(us=function(){return e})()}!function(e,t){for(var r=ls,i=e();;)try{if(344820===parseInt(r(235))/1+-parseInt(r(223))/2+-parseInt(r(211))/3*(parseInt(r(210))/4)+parseInt(r(233))/5+-parseInt(r(219))/6+parseInt(r(220))/7*(-parseInt(r(222))/8)+-parseInt(r(231))/9*(-parseInt(r(217))/10))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(us);Ze[cs(224)]((function(e,t){var r,i,n;r=Ze[cs(234)],i=function(e){var t,r,i,n;t=ls,i=(r=e).lib[t(221)],n=r.enc[t(216)],r[t(239)][t(226)]=i[t(232)]({init:function(e,r){var i=t;e=this._hasher=new(e[i(205)]),typeof r==i(215)&&(r=n[i(227)](r));var s=e.blockSize,a=4*s;r[i(218)]>a&&(r=e[i(240)](r)),r[i(208)]();for(var o=this[i(236)]=r[i(230)](),c=this[i(213)]=r.clone(),u=o.words,l=c[i(238)],h=0;h>>2];e[t(457)]-=r}};s[i(445)]=d[i(428)]({cfg:d.cfg.extend({mode:m,padding:_}),reset:function(){var e,t=i;d[t(381)][t(388)](this);var r=this[t(379)],n=r.iv,s=r[t(437)];this._xformMode==this[t(444)]?e=s[t(451)]:(e=s.createDecryptor,this[t(434)]=1),this[t(442)]&&this[t(442)][t(453)]==e?this[t(442)][t(416)](this,n&&n.words):(this[t(442)]=e.call(s,this,n&&n[t(380)]),this[t(442)][t(453)]=e)},_doProcessBlock:function(e,t){var r=i;this._mode[r(456)](e,t)},_doFinalize:function(){var e,t=i,r=this[t(379)][t(441)];return this._xformMode==this[t(444)]?(r.pad(this[t(415)],this.blockSize),e=this[t(448)](!0)):(e=this[t(448)](!!t(423)),r[t(374)](e)),e},blockSize:4});var v=s[i(375)]=a[i(428)]({init:function(e){this[i(377)](e)},toString:function(e){var t=i;return(e||this[t(418)])[t(382)](this)}}),y=(n[i(407)]={})[i(405)]={stringify:function(e){var t=i,r=e[t(455)],n=e.salt;return(n?o[t(401)]([1398893684,1701076831]).concat(n)[t(397)](r):r)[t(422)](l)},parse:function(e){var t,r=i,n=l.parse(e),s=n[r(380)];return 1398893684==s[0]&&1701076831==s[1]&&(t=o[r(401)](s[r(386)](2,4)),s.splice(0,4),n[r(457)]-=16),v.create({ciphertext:n,salt:t})}},g=s.SerializableCipher=a.extend({cfg:a[i(428)]({format:y}),encrypt:function(e,t,r,n){var s=i;n=this.cfg[s(428)](n);var a=e[s(451)](r,n),o=a[s(411)](t),c=a[s(379)];return v.create({ciphertext:o,key:r,iv:c.iv,algorithm:e,mode:c[s(437)],padding:c[s(441)],blockSize:e[s(433)],formatter:n.format})},decrypt:function(e,t,r,n){var s=i;return n=this.cfg[s(428)](n),t=this[s(410)](t,n.format),e.createDecryptor(r,n)[s(411)](t[s(455)])},_parse:function(e,t){return"string"==typeof e?t[i(385)](e,this):e}}),b=(n[i(420)]={})[i(405)]={execute:function(e,t,r,n,s){var a=i;if(!n&&(n=o[a(421)](8)),s)c=h[a(401)]({keySize:t+r,hasher:s})[a(389)](e,n);else var c=h.create({keySize:t+r})[a(389)](e,n);var u=o.create(c[a(380)][a(386)](t),4*r);return c[a(457)]=4*t,v[a(401)]({key:c,iv:u,salt:n})}},S=s[i(387)]=g[i(428)]({cfg:g[i(379)][i(428)]({kdf:b}),encrypt:function(e,t,r,n){var s=i,a=(n=this[s(379)][s(428)](n))[s(420)][s(458)](r,e[s(427)],e[s(424)],n[s(459)],n[s(384)]);n.iv=a.iv;var o=g[s(404)][s(388)](this,e,t,a.key,n);return o[s(377)](a),o},decrypt:function(e,t,r,n){var s=i;n=this.cfg[s(428)](n),t=this[s(410)](t,n.format);var a=n[s(420)][s(458)](r,e.keySize,e[s(424)],t[s(459)],n.hasher);return n.iv=a.iv,g[s(454)].call(this,e,t,a[s(402)],n)}})}()},"object"===(n=ys)(461)?e[n(391)]=i(En):"undefined"===n(440)&&(void 0)[n(417)]?(void 0)(["./core",n(412)],i):i(r[n(408)])}));var gs=bs;!function(e,t){for(var r=bs,i=e();;)try{if(907636===-parseInt(r(297))/1*(-parseInt(r(301))/2)+parseInt(r(292))/3+parseInt(r(311))/4+-parseInt(r(307))/5*(-parseInt(r(299))/6)+parseInt(r(294))/7+-parseInt(r(284))/8*(-parseInt(r(306))/9)+-parseInt(r(290))/10*(parseInt(r(309))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Ss);Ze[gs(289)]((function(e,t){var r,i,n;r=Ye,i=function(e){var t=bs;return e.mode.CFB=function(){var t=bs,r=e.lib[t(293)][t(300)]();function i(e,r,i,n){var s,a=t,o=this._iv;o?(s=o.slice(0),this[a(288)]=void 0):s=this[a(287)],n[a(291)](s,0);for(var c=0;c>24&255)){var t=e>>16&255,r=e>>8&255,i=255&e;255===t?(t=0,255===r?(r=0,255===i?i=0:++i):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=i}else e+=1<<24;return e}var s=i[r(206)]=i[r(208)]({processBlock:function(e,t){var i,s=r,a=this[s(223)],o=a[s(211)],c=this._iv,u=this._counter;c&&(u=this[s(227)]=c.slice(0),this[s(210)]=void 0),0===((i=u)[0]=n(i[0]))&&(i[1]=n(i[1]));var l=u[s(209)](0);a.encryptBlock(l,0);for(var h=0;h>>2]|=a<<24-o%4*8,e[i(384)]+=a},unpad:function(e){var r=t,i=255&e.words[e[r(384)]-1>>>2];e.sigBytes-=i}},e.pad[t(373)]},"object"===(n=Ms)(383)?e.exports=i(En):"undefined"===n(381)&&(void 0).amd?(void 0)([n(375),"./cipher-core"],i):i(r[n(380)])}));function Fs(){var e=["object","sigBytes","20688sBIJcG","926ZUmufH","502758xTyCzl","4IOlIug","9165942zBewnQ","990616vRFOGw","pad","createCommonjsModule","AnsiX923","Ansix923","words","./core","4491qTYJac","3537hzxxiL","5299994EJRAmk","5751425gfAfmy","CryptoJS","function","170ZuBIph"];return(Fs=function(){return e})()}var Ps=Rs;function Ls(){var e=["58790ojpUua","736236vxYDcD","words","./core","commonjsGlobal","386865lbMPzh","447840WEUnjF","concat","sigBytes","exports","1254123rOltJU","./cipher-core","150UlbedB","131366sAncXS","lib","amd","function","Iso10126","WordArray","object","createCommonjsModule","random","CryptoJS","720636GIcRrO","1qumpKC","pad","create"];return(Ls=function(){return e})()}function Rs(e,t){var r=Ls();return(Rs=function(e,t){return r[e-=349]})(e,t)}!function(e,t){for(var r=Rs,i=e();;)try{if(177126===-parseInt(r(361))/1*(-parseInt(r(350))/2)+parseInt(r(369))/3+parseInt(r(365))/4+parseInt(r(364))/5*(-parseInt(r(349))/6)+-parseInt(r(360))/7+parseInt(r(370))/8+parseInt(r(374))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Ls);Ze[Ps(357)]((function(e,t){var r,i,n,s=Ps;r=Ze[s(368)],i=function(e){var t=s;return e.pad[t(354)]={pad:function(r,i){var n=t,s=4*i,a=s-r.sigBytes%s;r[n(371)](e[n(351)][n(355)][n(358)](a-1)).concat(e[n(351)][n(355)][n(363)]([a<<24],1))},unpad:function(e){var r=t,i=255&e[r(366)][e[r(372)]-1>>>2];e[r(372)]-=i}},e[t(362)][t(354)]},(n=Rs)(356)==n(356)?e[n(373)]=i(En):"undefined"===n(353)&&(void 0)[n(352)]?(void 0)([n(367),n(375)],i):i(r[n(359)])}));var Ns=Os;function Os(e,t){var r=zs();return(Os=function(e,t){return r[e-=407]})(e,t)}!function(e,t){for(var r=Os,i=e();;)try{if(191856===parseInt(r(420))/1*(parseInt(r(410))/2)+-parseInt(r(411))/3*(-parseInt(r(423))/4)+parseInt(r(431))/5+-parseInt(r(427))/6*(parseInt(r(409))/7)+parseInt(r(425))/8*(parseInt(r(407))/9)+parseInt(r(432))/10+-parseInt(r(413))/11)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(zs);Ze[Ns(412)]((function(e,t){var r,i,n;r=Ye,i=function(e){var t=Os;return e[t(418)][t(433)]={pad:function(r,i){var n=t;r[n(430)](e[n(422)][n(419)][n(429)]([2147483648],1)),e[n(418)][n(408)][n(418)](r,i)},unpad:function(r){var i=t;e[i(418)][i(408)][i(416)](r),r[i(424)]--}},e[t(418)][t(433)]},(n=Os)(417)==n(417)?e[n(426)]=i(En):"undefined"===n(421)&&(void 0)[n(414)]?(void 0)(["./core",n(428)],i):i(r[n(415)])}));function zs(){var e=["sigBytes","577096smyASS","exports","36XRixCW","./cipher-core","create","concat","1455715KglkIx","1825600iPbEJJ","Iso97971","9XDJLsI","ZeroPadding","271586piyoXe","78386STPYRy","54AiidfY","createCommonjsModule","5735840FFODep","amd","CryptoJS","unpad","object","pad","WordArray","2DKFqzK","function","lib","71524yIfoza"];return(zs=function(){return e})()}var Hs=Gs;function Vs(){var e=["2792000sdKPpe","ZeroPadding","object","clamp","773412PCppCQ","1357762CCAiyN","words","exports","./cipher-core","CryptoJS","./core","9ktciqk","1471560OEioSF","228584DjHzQO","sigBytes","810205mqAmjd","18qIwJLF","1558944fiouaI","createCommonjsModule","commonjsGlobal","amd","function"];return(Vs=function(){return e})()}!function(e,t){for(var r=Gs,i=e();;)try{if(449517===parseInt(r(117))/1+-parseInt(r(115))/2+-parseInt(r(135))/3*(parseInt(r(128))/4)+parseInt(r(124))/5+-parseInt(r(118))/6*(parseInt(r(129))/7)+parseInt(r(136))/8+parseInt(r(119))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Vs);Ze[Hs(120)]((function(e,t){var r,i,n,s=Hs;r=Ze[s(121)],i=function(e){var t=s;return e.pad[t(125)]={pad:function(e,r){var i=t,n=4*r;e[i(127)](),e[i(116)]+=n-(e[i(116)]%n||n)},unpad:function(e){var r=t,i=e[r(130)],n=e.sigBytes-1;for(n=e[r(116)]-1;n>=0;n--)if(i[n>>>2]>>>24-n%4*8&255){e[r(116)]=n+1;break}}},e.pad[t(125)]},"object"===(n=Gs)(126)?e[n(131)]=i(En):"undefined"===n(123)&&(void 0)[n(122)]?(void 0)([n(134),n(132)],i):i(r[n(133)])}));function Gs(e,t){var r=Vs();return(Gs=function(e,t){return r[e-=115]})(e,t)}var Ws=js;!function(e,t){for(var r=js,i=e();;)try{if(119332===parseInt(r(213))/1*(parseInt(r(204))/2)+-parseInt(r(224))/3*(parseInt(r(216))/4)+-parseInt(r(222))/5*(-parseInt(r(214))/6)+parseInt(r(223))/7+-parseInt(r(219))/8*(parseInt(r(221))/9)+parseInt(r(215))/10*(-parseInt(r(220))/11)+-parseInt(r(218))/12*(parseInt(r(205))/13))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(qs);Ze[Ws(209)]((function(e,t){var r,i,n,s=Ws;r=Ze[s(211)],i=function(e){var t=s;return e[t(202)][t(206)]={pad:function(){},unpad:function(){}},e.pad[t(206)]},"object"===(n=js)(208)?e[n(212)]=i(En):"undefined"===n(203)&&(void 0)[n(207)]?(void 0)([n(210),"./cipher-core"],i):i(r[n(217)])}));function js(e,t){var r=qs();return(js=function(e,t){return r[e-=202]})(e,t)}function qs(){var e=["92557JUKDFP","366006fFYtZT","21470nXCrJN","4UDcmpC","CryptoJS","84VlMNdo","346112vnCwEJ","110kSXsSO","9MZnnDF","5MtTKAQ","1601845FDsUOG","155313KzpLBB","pad","function","4LZlmSB","444067ziBFoe","NoPadding","amd","object","createCommonjsModule","./core","commonjsGlobal","exports"];return(qs=function(){return e})()}function Ks(e,t){var r=Ys();return(Ks=function(e,t){return r[e-=423]})(e,t)}!function(e,t){for(var r=Ks,i=e();;)try{if(419847===-parseInt(r(427))/1*(parseInt(r(444))/2)+-parseInt(r(431))/3+-parseInt(r(428))/4*(-parseInt(r(435))/5)+-parseInt(r(424))/6+parseInt(r(441))/7+parseInt(r(434))/8+parseInt(r(445))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Ys);Xe((function(e,t){var r,i,n;r=Ye,i=function(e){var t,r,i,n,s=Ks;return i=(r=e)[(t=Ks)(442)][t(433)],n=r[t(423)].Hex,r[t(437)].Hex={stringify:function(e){var r=t;return e[r(432)][r(443)](n)},parse:function(e){var r=n[t(425)](e);return i.create({ciphertext:r})}},e[s(437)][s(440)]},"object"===(n=Ks)(438)?e[n(430)]=i(En):"undefined"===n(429)&&(void 0)[n(436)]?(void 0)([n(439),n(426)],i):i(r.CryptoJS)}));function Ys(){var e=["2110329sVzuUJ","ciphertext","CipherParams","5957336XjdeYj","50pHEVMV","amd","format","object","./core","Hex","174062hKhLqW","lib","toString","1164412qiUTkb","2298879fKElyB","enc","866388WOITRf","parse","./cipher-core","1AsHabf","329972XNcWtm","function","exports"];return(Ys=function(){return e})()}function Js(e,t){var r=Xs();return(Js=function(e,t){return r[e-=347]})(e,t)}!function(e,t){for(var r=Js,i=e();;)try{if(473603===parseInt(r(359))/1+parseInt(r(367))/2+-parseInt(r(352))/3*(parseInt(r(370))/4)+-parseInt(r(362))/5+-parseInt(r(375))/6+parseInt(r(347))/7+parseInt(r(360))/8)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Xs);Xe((function(e,t){var r,i,n;r=Ze[Js(356)],i=function(e){return function(){var t=Js,r=e,i=r[t(350)][t(376)],n=r[t(373)],s=[],a=[],o=[],c=[],u=[],l=[],h=[],d=[],f=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,i=0;for(t=0;t<256;t++){var n=i^i<<1^i<<2^i<<3^i<<4;n=n>>>8^255&n^99,s[r]=n,a[n]=r;var m=e[r],_=e[m],v=e[_],y=257*e[n]^16843008*n;o[r]=y<<24|y>>>8,c[r]=y<<16|y>>>16,u[r]=y<<8|y>>>24,l[r]=y,y=16843009*v^65537*_^257*m^16843008*r,h[n]=y<<24|y>>>8,d[n]=y<<16|y>>>16,f[n]=y<<8|y>>>24,p[n]=y,r?(r=m^e[e[e[v^m]]],i^=e[e[i]]):r=i=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],_=n.AES=i[t(365)]({_doReset:function(){var e=t;if(!this[e(354)]||this[e(353)]!==this._key){for(var r=this[e(353)]=this[e(371)],i=r[e(363)],n=r[e(369)]/4,a=4*((this._nRounds=n+6)+1),o=this[e(351)]=[],c=0;c6&&c%n==4&&(_=s[_>>>24]<<24|s[_>>>16&255]<<16|s[_>>>8&255]<<8|s[255&_]):(_=s[(_=_<<8|_>>>24)>>>24]<<24|s[_>>>16&255]<<16|s[_>>>8&255]<<8|s[255&_],_^=m[c/n|0]<<24),o[c]=o[c-n]^_);for(var u=this[e(374)]=[],l=0;l>>24]]^d[s[_>>>16&255]]^f[s[_>>>8&255]]^p[s[255&_]]}}},encryptBlock:function(e,r){this[t(355)](e,r,this._keySchedule,o,c,u,l,s)},decryptBlock:function(e,r){var i=t,n=e[r+1];e[r+1]=e[r+3],e[r+3]=n,this[i(355)](e,r,this[i(374)],h,d,f,p,a),n=e[r+1],e[r+1]=e[r+3],e[r+3]=n},_doCryptBlock:function(e,t,r,i,n,s,a,o){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],h=e[t+2]^r[2],d=e[t+3]^r[3],f=4,p=1;p>>24]^n[l>>>16&255]^s[h>>>8&255]^a[255&d]^r[f++],_=i[l>>>24]^n[h>>>16&255]^s[d>>>8&255]^a[255&u]^r[f++],v=i[h>>>24]^n[d>>>16&255]^s[u>>>8&255]^a[255&l]^r[f++],y=i[d>>>24]^n[u>>>16&255]^s[l>>>8&255]^a[255&h]^r[f++];u=m,l=_,h=v,d=y}m=(o[u>>>24]<<24|o[l>>>16&255]<<16|o[h>>>8&255]<<8|o[255&d])^r[f++],_=(o[l>>>24]<<24|o[h>>>16&255]<<16|o[d>>>8&255]<<8|o[255&u])^r[f++],v=(o[h>>>24]<<24|o[d>>>16&255]<<16|o[u>>>8&255]<<8|o[255&l])^r[f++],y=(o[d>>>24]<<24|o[u>>>16&255]<<16|o[l>>>8&255]<<8|o[255&h])^r[f++],e[t]=m,e[t+1]=_,e[t+2]=v,e[t+3]=y},keySize:8});r.AES=i[t(357)](_)}(),e.AES},(n=Js)(366)==n(366)?e[n(349)]=i(En):"undefined"===n(372)&&(void 0).amd?(void 0)([n(361),n(368),n(348),"./evpkdf",n(358)],i):i(r[n(364)])}));function Xs(){var e=["./md5","exports","lib","_keySchedule","344067OXxOMv","_keyPriorReset","_nRounds","_doCryptBlock","commonjsGlobal","_createHelper","./cipher-core","490021VyXwRY","5435104oIAxXH","./core","3512635WTowpc","words","CryptoJS","extend","object","624044OhCsyR","./enc-base64","sigBytes","8GoMRxI","_key","function","algo","_invKeySchedule","2240574iCsEFd","BlockCipher","2082542umxYnJ"];return(Xs=function(){return e})()}var Zs=$s;function Qs(){var e=["amd","function","_subKeys","1238515aJlorM","./evpkdf","_lBlock","4702243OCpXvc","extend","createCommonjsModule","_doCryptBlock","./enc-base64","CryptoJS","slice","commonjsGlobal","TripleDES","words","decryptBlock","251YVaeTr","_des1","call","24KZEdrb","33257940WXERiF","length","_invSubKeys","DES","6NBfGxV","_rBlock","1886700ZuBcyd","_key","1702004tGQKBL","_des2","Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.","_des3","create","18XtRjYr","WordArray","exports","createEncryptor","11JReVIO","30RJaesw","encryptBlock","2478429XmFELj","./cipher-core"];return(Qs=function(){return e})()}function $s(e,t){var r=Qs();return($s=function(e,t){return r[e-=264]})(e,t)}!function(e,t){for(var r=$s,i=e();;)try{if(512943===-parseInt(r(289))/1*(-parseInt(r(268))/2)+-parseInt(r(297))/3*(-parseInt(r(301))/4)+-parseInt(r(275))/5*(-parseInt(r(306))/6)+parseInt(r(278))/7+parseInt(r(292))/8*(parseInt(r(270))/9)+parseInt(r(299))/10+-parseInt(r(267))/11*(parseInt(r(293))/12))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Qs);Ze[Zs(280)]((function(e,t){var r,i,n=Zs;Ze[n(285)],e[$s(265)]=(r=En,i=n,function(){var e=$s,t=r,i=t.lib,n=i[e(264)],s=i.BlockCipher,a=t.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=a[e(296)]=s[e(279)]({_doReset:function(){for(var t=e,r=this._key.words,i=[],n=0;n<56;n++){var s=o[n]-1;i[n]=r[s>>>5]>>>31-s%32&1}for(var a=this[t(274)]=[],l=0;l<16;l++){var h=a[l]=[],d=u[l];for(n=0;n<24;n++)h[n/6|0]|=i[(c[n]-1+d)%28]<<31-n%6,h[4+(n/6|0)]|=i[28+(c[n+24]-1+d)%28]<<31-n%6;for(h[0]=h[0]<<1|h[0]>>>31,n=1;n<7;n++)h[n]=h[n]>>>4*(n-1)+3;h[7]=h[7]<<5|h[7]>>>27}var f=this[t(295)]=[];for(n=0;n<16;n++)f[n]=a[15-n]},encryptBlock:function(t,r){var i=e;this._doCryptBlock(t,r,this[i(274)])},decryptBlock:function(t,r){var i=e;this[i(281)](t,r,this[i(295)])},_doCryptBlock:function(t,r,i){var n=e;this._lBlock=t[r],this[n(298)]=t[r+1],f[n(291)](this,4,252645135),f[n(291)](this,16,65535),p.call(this,2,858993459),p[n(291)](this,8,16711935),f[n(291)](this,1,1431655765);for(var s=0;s<16;s++){for(var a=i[s],o=this._lBlock,c=this._rBlock,u=0,d=0;d<8;d++)u|=l[d][((c^a[d])&h[d])>>>0];this[n(277)]=c,this[n(298)]=o^u}var m=this[n(277)];this[n(277)]=this._rBlock,this[n(298)]=m,f.call(this,1,1431655765),p.call(this,8,16711935),p[n(291)](this,2,858993459),f[n(291)](this,16,65535),f[n(291)](this,4,252645135),t[r]=this[n(277)],t[r+1]=this[n(298)]},keySize:2,ivSize:2,blockSize:2});function f(t,r){var i=e,n=(this._lBlock>>>t^this._rBlock)&r;this[i(298)]^=n,this[i(277)]^=n<>>t^this[i(277)])&r;this[i(277)]^=n,this[i(298)]^=n<>>2]>>>24-c%4*8&255;o=(o+s[a]+u)%256;var l=s[a];s[a]=s[o],s[o]=l}this._i=this._j=0},_doProcessBlock:function(e,r){var i=t;e[r]^=a[i(296)](this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,r=this._j,i=0,n=0;n<4;n++){r=(r+e[t=(t+1)%256])%256;var s=e[t];e[t]=e[r],e[r]=s,i|=e[(e[t]+e[r])%256]<<24-8*n}return this._i=t,this._j=r,i}r.RC4=i[t(292)](s);var o=n.RC4Drop=s[t(297)]({cfg:s.cfg.extend({drop:192}),_doReset:function(){var e=t;s[e(299)][e(296)](this);for(var r=this[e(277)].drop;r>0;r--)a[e(296)](this)}});r.RC4Drop=i._createHelper(o)}(),e[t(282)]},(n=ta)(303)==n(303)?e[n(295)]=i(En):"undefined"===n(283)&&(void 0)[n(279)]?(void 0)([n(286),n(304),n(290),n(291),n(284)],i):i(r.CryptoJS)}));function ta(e,t){var r=ra();return(ta=function(e,t){return r[e-=275]})(e,t)}function ra(){var e=["call","extend","383653qadmHE","_doReset","StreamCipher","25384xUSylv","createCommonjsModule","object","./enc-base64","2916727pgHQqZ","1910732OUXqjJ","30KOoRUF","cfg","words","amd","2175326okuryQ","algo","RC4","function","./cipher-core","55668QZtZyD","./core","4144903BvUmsq","235NnxRNc","2169RFQgNF","./md5","./evpkdf","_createHelper","3SQsTPO","sigBytes","exports"];return(ra=function(){return e})()}function ia(){var e=["621ILIbNk","extend","1241976ioDhXO","83384HtSSRl","object","1522495kfNrkH","amd","8913RKbQcK","_createHelper","words","StreamCipher","./evpkdf","_key","./enc-base64","116333UmtzOE","./core","954612HSDNxI","154ZEPToF","148087JLIDPf","algo","./md5","CryptoJS","lib","function","commonjsGlobal","call"];return(ia=function(){return e})()}function na(e,t){var r=ia();return(na=function(e,t){return r[e-=492]})(e,t)}!function(e,t){for(var r=na,i=e();;)try{if(199235===parseInt(r(497))/1+parseInt(r(496))/2*(-parseInt(r(512))/3)+-parseInt(r(507))/4+-parseInt(r(510))/5+parseInt(r(495))/6+parseInt(r(493))/7+parseInt(r(508))/8*(parseInt(r(505))/9))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(ia);Xe((function(e,t){var r,i,n;r=Ze[na(503)],i=function(e){return function(){var t=na,r=e,i=r[t(501)][t(515)],n=r[t(498)],s=[],a=[],o=[],c=n.Rabbit=i[t(506)]({_doReset:function(){for(var e=t,r=this[e(517)][e(514)],i=this.cfg.iv,n=0;n<4;n++)r[n]=16711935&(r[n]<<8|r[n]>>>24)|4278255360&(r[n]<<24|r[n]>>>8);var s=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],a=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];for(this._b=0,n=0;n<4;n++)u[e(504)](this);for(n=0;n<8;n++)a[n]^=s[n+4&7];if(i){var o=i[e(514)],c=o[0],l=o[1],h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),d=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=h>>>16|4294901760&d,p=d<<16|65535&h;for(a[0]^=h,a[1]^=f,a[2]^=d,a[3]^=p,a[4]^=h,a[5]^=f,a[6]^=d,a[7]^=p,n=0;n<4;n++)u[e(504)](this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),s[0]=r[0]^r[5]>>>16^r[3]<<16,s[1]=r[2]^r[7]>>>16^r[5]<<16,s[2]=r[4]^r[1]>>>16^r[7]<<16,s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)s[i]=16711935&(s[i]<<8|s[i]>>>24)|4278255360&(s[i]<<24|s[i]>>>8),e[t+i]^=s[i]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)a[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var i=e[r]+t[r],n=65535&i,s=i>>>16,c=((n*n>>>17)+n*s>>>15)+s*s,u=((4294901760&i)*i|0)+((65535&i)*i|0);o[r]=c^u}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}r.Rabbit=i[t(513)](c)}(),e.Rabbit},(n=na)(509)==n(509)?e.exports=i(En):"undefined"===n(502)&&(void 0)[n(511)]?(void 0)([n(494),n(492),n(499),n(516),"./cipher-core"],i):i(r[n(500)])}));var sa=oa;function aa(){var e=["./core","createCommonjsModule","extend","7431NkoLfl","474CNbXOk","amd","767568xZCLJL","words","RabbitLegacy","object","lib","2643830EwwRCh","659789BUrKxa","call","cfg","_key","5883174QalyyM","15962157jmfiBQ","21wSaUcd","StreamCipher","algo","_createHelper","./cipher-core","./enc-base64","3050508ifPNCC","function"];return(aa=function(){return e})()}!function(e,t){for(var r=oa,i=e();;)try{if(503709===-parseInt(r(122))/1+-parseInt(r(140))/2*(parseInt(r(139))/3)+-parseInt(r(134))/4+-parseInt(r(147))/5+parseInt(r(126))/6+-parseInt(r(128))/7*(-parseInt(r(142))/8)+parseInt(r(127))/9)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(aa);Ze[sa(137)]((function(e,t){var r,i,n;r=Ye,i=function(e){var t=oa;return function(){var t=oa,r=e,i=r[t(146)][t(129)],n=r[t(130)],s=[],a=[],o=[],c=n[t(144)]=i[t(138)]({_doReset:function(){var e=t,r=this[e(125)][e(143)],i=this[e(124)].iv,n=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],s=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];this._b=0;for(var a=0;a<4;a++)u[e(123)](this);for(a=0;a<8;a++)s[a]^=n[a+4&7];if(i){var o=i[e(143)],c=o[0],l=o[1],h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),d=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=h>>>16|4294901760&d,p=d<<16|65535&h;for(s[0]^=h,s[1]^=f,s[2]^=d,s[3]^=p,s[4]^=h,s[5]^=f,s[6]^=d,s[7]^=p,a=0;a<4;a++)u.call(this)}},_doProcessBlock:function(e,r){var i=t,n=this._X;u[i(123)](this),s[0]=n[0]^n[5]>>>16^n[3]<<16,s[1]=n[2]^n[7]>>>16^n[5]<<16,s[2]=n[4]^n[1]>>>16^n[7]<<16,s[3]=n[6]^n[3]>>>16^n[1]<<16;for(var a=0;a<4;a++)s[a]=16711935&(s[a]<<8|s[a]>>>24)|4278255360&(s[a]<<24|s[a]>>>8),e[r+a]^=s[a]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)a[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var i=e[r]+t[r],n=65535&i,s=i>>>16,c=((n*n>>>17)+n*s>>>15)+s*s,u=((4294901760&i)*i|0)+((65535&i)*i|0);o[r]=c^u}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}r[t(144)]=i[t(131)](c)}(),e[t(144)]},"object"===(n=oa)(145)?e.exports=i(En):"undefined"===n(135)&&(void 0)[n(141)]?(void 0)([n(136),n(133),"./md5","./evpkdf",n(132)],i):i(r.CryptoJS)}));function oa(e,t){var r=aa();return(oa=function(e,t){return r[e-=122]})(e,t)}const ca=ua;function ua(e,t){const r=la();return(ua=function(e,t){return r[e-=424]})(e,t)}function la(){const e=["_createHelper","./cipher-core","83674IbNLPj","20IbiFqn","exports","./md5","./core","right","_keyPriorReset","18UbfuAt","3381488MGlTjJ","8AXBzIy","5469415hekDEX","sbox","lib","./enc-base64","Blowfish","object","words","1206565fGkZEX","1322661LYKpDS","left","7184292MmBvii","commonjsGlobal","5AvIuhP","_key","algo","pbox","amd","createCommonjsModule","CryptoJS","3389600dfJzgb","BlockCipher","./evpkdf","function"];return(la=function(){return e})()}!function(e,t){const r=ua,i=e();for(;;)try{if(614729===-parseInt(r(439))/1*(parseInt(r(452))/2)+-parseInt(r(435))/3*(-parseInt(r(426))/4)+-parseInt(r(434))/5+parseInt(r(437))/6+-parseInt(r(427))/7+-parseInt(r(446))/8*(parseInt(r(424))/9)+parseInt(r(453))/10*(parseInt(r(425))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(la);Ze[ca(444)]((function(e,t){const r=ca;!function(t,r,i){const n=ua;n(432)==n(432)?e[n(454)]=r(En):"undefined"===n(449)&&(void 0)[n(443)]?(void 0)([n(456),n(430),n(455),n(448),n(451)],r):r(t[n(445)])}(Ze[r(438)],(function(e){const t=r;return function(){const t=ua;var r=e,i=r[t(429)][t(447)],n=r[t(441)];const s=16,a=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],o=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function u(e,r){const i=t;let n=r>>24&255,s=r>>16&255,a=r>>8&255,o=255&r,c=e.sbox[0][n]+e[i(428)][1][s];return c^=e.sbox[2][a],c+=e.sbox[3][o],c}function l(e,r,i){const n=t;let a,o=r,c=i;for(let t=0;t=i&&(s=0);let c=0,u=0,h=0;for(let t=0;t<18;t+=2)h=l(e,c,u),c=h[n(436)],u=h[n(457)],e.pbox[t]=c,e.pbox[t+1]=u;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)h=l(e,c,u),c=h[n(436)],u=h[n(457)],e[n(428)][t][r]=c,e.sbox[t][r+1]=u}(c,i,n)}},encryptBlock:function(e,r){const i=t;var n=l(c,e[r],e[r+1]);e[r]=n[i(436)],e[r+1]=n[i(457)]},decryptBlock:function(e,r){const i=t;var n=function(e,r,i){const n=t;let s,a=r,o=i;for(let t=17;t>1;--t)a^=e[n(442)][t],o=u(e,a)^o,s=a,a=o,o=s;return s=a,a=o,o=s,o^=e[n(442)][1],a^=e[n(442)][0],{left:a,right:o}}(c,e[r],e[r+1]);e[r]=n[i(436)],e[r+1]=n.right},blockSize:2,keySize:4,ivSize:2});r[t(431)]=i[t(450)](h)}(),e[t(431)]}))}));var ha=fa;function da(){var e=["./core","./rabbit-legacy","./mode-ofb","amd","./enc-base64","./md5","./rabbit","./sha256","430312qaepHq","object","77512JqOREb","./cipher-core","./pbkdf2","./lib-typedarrays","./sha3","exports","20575OEspyZ","81jQCNVt","createCommonjsModule","./x64-core","./blowfish","./mode-cfb","./mode-ecb","./pad-iso97971","./rc4","802046mQvvOn","./aes","2030193JkcFqU","1707OWzzww","./tripledes","./sha384","./pad-ansix923","./mode-ctr","274669liRfzk","./pad-nopadding","10XHzETl","./enc-base64url","./sha1","./mode-ctr-gladman","432KcHpWn","./pad-zeropadding","606VRTNTv","function","commonjsGlobal","./sha512"];return(da=function(){return e})()}function fa(e,t){var r=da();return(fa=function(e,t){return r[e-=149]})(e,t)}function pa(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function ma(e,t,r){const i=ya;let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const s=e[i(394)];let a=5;for(;as)break;let c=e[a+4],u=!1;if(n?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][i(387)](c)):(c&=31,u=1===c||5===c),u){const n=e[i(382)](a+4+2,a+4+o);let s=new(In[i(377)][i(385)])(t,new(In[i(378)])(r));const c=s.decrypt(n);s=null,e.set(c,a+4+2)}a=a+4+o}return e}function _a(e,t,r){const i=ya;if(e[i(394)]<=30)return e;const n=e[i(382)](32);let s=new In.ModeOfOperation.ctr(t,new(In[i(378)])(r));const a=s[i(386)](n);return s=null,e[i(388)](a,32),e}function va(){const e=["decrypt","includes","set","length","847282ILiSyW","toString","create","catch","byteLength","lib","WordArray","240578ENoQZq","then","441712PQiNdN","870784pwxHnA","ModeOfOperation","Counter","2380278YopEko","381275XbhKAK","get","slice","506739gDowWj","7SRJLnm","ctr"];return(va=function(){return e})()}function ya(e,t){const r=va();return(ya=function(e,t){return r[e-=373]})(e,t)}!function(e,t){for(var r=fa,i=e();;)try{if(246722===parseInt(r(160))/1+parseInt(r(166))/2*(parseInt(r(155))/3)+parseInt(r(180))/4+parseInt(r(188))/5*(-parseInt(r(168))/6)+-parseInt(r(152))/7+parseInt(r(182))/8*(parseInt(r(189))/9)+parseInt(r(162))/10*(parseInt(r(154))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(da),Ze[ha(190)]((function(e,t){var r,i,n;r=Ze[ha(170)],i=function(e){return e},"object"===(n=fa)(181)?e[n(187)]=En:"undefined"===n(169)&&(void 0)[n(175)]?(void 0)([n(172),n(191),n(185),"./enc-utf16",n(176),n(163),n(177),n(164),n(179),"./sha224",n(171),n(157),n(186),"./ripemd160","./hmac",n(184),"./evpkdf",n(183),n(193),n(159),n(165),n(174),n(149),n(158),"./pad-iso10126",n(150),n(167),n(161),"./format-hex",n(153),n(156),n(151),n(178),n(173),n(192)],i):r.CryptoJS=r.CryptoJS})),function(e,t){const r=ya,i=e();for(;;)try{if(214208===-parseInt(r(373))/1+parseInt(r(390))/2+-parseInt(r(383))/3+-parseInt(r(376))/4+parseInt(r(380))/5+-parseInt(r(379))/6*(-parseInt(r(384))/7)+-parseInt(r(375))/8)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(va);var ga=Ia;!function(e,t){for(var r=Ia,i=e();;)try{if(202200===parseInt(r(856))/1*(-parseInt(r(1306))/2)+-parseInt(r(764))/3+-parseInt(r(538))/4+parseInt(r(460))/5*(-parseInt(r(657))/6)+-parseInt(r(1078))/7+-parseInt(r(177))/8*(-parseInt(r(958))/9)+-parseInt(r(210))/10*(-parseInt(r(1314))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Sa);var ba=Xe((function(e,t){var r,n,s=Ia,a=(r=new Date,n=4,{setLogLevel:function(e){var t=Ia;n=e==this[t(1282)]?1:e==this[t(1362)]?2:e==this.warn?3:(this.error,4)},debug:function(e,t){var i=Ia;void 0===console[i(1282)]&&(console.debug=console[i(1182)]),1>=n&&console[i(1282)]("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){var r=Ia;this.debug(e[r(449)])},info:function(e,t){var i=Ia;2>=n&&console.info("["+a[i(1255)](new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){var i=Ia;3>=n&&console.warn("["+a[i(1255)](new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){var i=Ia;4>=n&&console.error("["+a[i(1255)](new Date-r,1e3)+"]","["+e+"]",t)}});a[s(1255)]=function(e,t){var r,i=s;function n(e,t){for(var r=Ia,i=(""+e)[r(1350)](".");i[0][r(341)]0){for(var i="",n=0;n0&&(i+=","),i+="["+a[t(1255)](e[t(915)](n))+","+a[t(1255)](e[t(777)](n))+"]";return i}return t(608)},s(1329)!==s(822)&&(t[s(971)]=a);var o=function(e){var t=s;if(!(e instanceof ArrayBuffer))throw t(564);this[t(326)]=e,this[t(1011)]=new DataView(e),this[t(595)]=0};o[s(263)][s(232)]=function(){return this[s(595)]},o[s(263)][s(638)]=function(){return this.buffer.byteLength},o[s(263)][s(861)]=function(){return this[s(326)].byteLength},o[s(263)][s(407)]=function(e){var t=s,r=Math[t(1057)](0,Math[t(855)](this[t(326)][t(1034)],e));return this.position=isNaN(r)||!isFinite(r)?0:r,!0},o[s(263)][s(579)]=function(){var e=s;return this[e(232)]()>=this[e(638)]()},o[s(263)][s(1111)]=function(e,t){var r=s,i=0;if(this[r(595)]+e<=this.buffer[r(1034)]){switch(e){case 1:i=t?this[r(1011)][r(627)](this[r(595)]):this[r(1011)][r(1201)](this.position);break;case 2:i=t?this.dataview[r(157)](this[r(595)]):this.dataview.getUint16(this[r(595)]);break;case 3:if(t)throw r(781);i=this[r(1011)][r(1201)](this[r(595)])<<16,i|=this[r(1011)].getUint8(this.position+1)<<8,i|=this.dataview.getUint8(this[r(595)]+2);break;case 4:i=t?this[r(1011)].getInt32(this.position):this[r(1011)][r(200)](this.position);break;case 8:if(t)throw r(256);i=this.dataview[r(200)](this[r(595)])<<32,i|=this[r(1011)][r(200)](this[r(595)]+4);break;default:throw r(472)+e}return this.position+=e,i}throw r(1302)},o[s(263)][s(851)]=function(){return this[s(1111)](1,!1)},o[s(263)].readUint16=function(){return this[s(1111)](2,!1)},o[s(263)].readUint24=function(){return this.readAnyInt(3,!1)},o[s(263)].readUint32=function(){return this.readAnyInt(4,!1)},o[s(263)][s(1244)]=function(){return this[s(1111)](8,!1)},o.prototype[s(438)]=function(e){var t=s;if(this[t(595)]+e<=this.buffer.byteLength){for(var r="",i=0;ithis._byteLength&&(this._byteLength=r);else{for(i<1&&(i=1);r>i;)i*=2;var n=new ArrayBuffer(i),a=new Uint8Array(this[t(1042)]);new Uint8Array(n,0,a.length).set(a),this[t(326)]=n,this._byteLength=r}}},c[s(263)]._trimAlloc=function(){var e=s;if(this[e(218)]!=this[e(1042)].byteLength){var t=new ArrayBuffer(this[e(218)]),r=new Uint8Array(t),i=new Uint8Array(this[e(1042)],0,r.length);r.set(i),this[e(326)]=t}},c.BIG_ENDIAN=!1,c.LITTLE_ENDIAN=!0,c[s(263)][s(218)]=0,Object.defineProperty(c[s(263)],"byteLength",{get:function(){var e=s;return this[e(218)]-this[e(422)]}}),Object[s(126)](c[s(263)],s(326),{get:function(){var e=s;return this[e(1070)](),this[e(1042)]},set:function(e){var t=s;this[t(1042)]=e,this[t(573)]=new DataView(this[t(1042)],this._byteOffset),this[t(218)]=this[t(1042)][t(1034)]}}),Object[s(126)](c[s(263)],s(1029),{get:function(){return this._byteOffset},set:function(e){var t=s;this[t(422)]=e,this[t(573)]=new DataView(this[t(1042)],this._byteOffset),this[t(218)]=this[t(1042)].byteLength}}),Object.defineProperty(c[s(263)],s(420),{get:function(){return this[s(573)]},set:function(e){var t=s;this[t(422)]=e[t(1029)],this[t(1042)]=e.buffer,this[t(573)]=new DataView(this._buffer,this[t(422)]),this[t(218)]=this[t(422)]+e[t(1034)]}}),c[s(263)].seek=function(e){var t=s,r=Math[t(1057)](0,Math.min(this[t(1034)],e));this[t(595)]=isNaN(r)||!isFinite(r)?0:r},c[s(263)].isEof=function(){var e=s;return this[e(595)]>=this[e(218)]},c.prototype[s(750)]=function(e){var t=s;this[t(981)](1*e);var r=new Uint8Array(this[t(1042)],this.byteOffset+this.position,e);return this[t(595)]+=1*e,r},c[s(263)][s(768)]=function(e,t){var r=s;e=null==e?this[r(1034)]-this.position/4:e;var i=new Int32Array(e);return c[r(867)](i[r(326)],0,this[r(326)],this[r(1029)]+this[r(595)],e*i[r(240)]),c.arrayToNative(i,null==t?this[r(233)]:t),this.position+=i[r(1034)],i},c[s(263)][s(1337)]=function(e,t){var r=s;e=null==e?this[r(1034)]-this[r(595)]/2:e;var i=new Int16Array(e);return c[r(867)](i[r(326)],0,this[r(326)],this[r(1029)]+this[r(595)],e*i[r(240)]),c[r(824)](i,null==t?this[r(233)]:t),this.position+=i.byteLength,i},c[s(263)][s(494)]=function(e){var t=s;e=null==e?this.byteLength-this.position:e;var r=new Int8Array(e);return c[t(867)](r[t(326)],0,this[t(326)],this[t(1029)]+this[t(595)],e*r[t(240)]),this[t(595)]+=r.byteLength,r},c[s(263)][s(1178)]=function(e,t){var r=s;e=null==e?this.byteLength-this[r(595)]/4:e;var i=new Uint32Array(e);return c[r(867)](i[r(326)],0,this.buffer,this[r(1029)]+this[r(595)],e*i.BYTES_PER_ELEMENT),c[r(824)](i,null==t?this[r(233)]:t),this[r(595)]+=i[r(1034)],i},c.prototype[s(1107)]=function(e,t){var r=s;e=null==e?this[r(1034)]-this[r(595)]/2:e;var i=new Uint16Array(e);return c.memcpy(i[r(326)],0,this[r(326)],this[r(1029)]+this.position,e*i.BYTES_PER_ELEMENT),c[r(824)](i,null==t?this[r(233)]:t),this[r(595)]+=i[r(1034)],i},c.prototype.readUint8Array=function(e){var t=s;e=null==e?this[t(1034)]-this.position:e;var r=new Uint8Array(e);return c[t(867)](r[t(326)],0,this.buffer,this[t(1029)]+this[t(595)],e*r[t(240)]),this[t(595)]+=r.byteLength,r},c[s(263)].readFloat64Array=function(e,t){var r=s;e=null==e?this[r(1034)]-this[r(595)]/8:e;var i=new Float64Array(e);return c[r(867)](i.buffer,0,this[r(326)],this[r(1029)]+this[r(595)],e*i[r(240)]),c[r(824)](i,null==t?this[r(233)]:t),this[r(595)]+=i.byteLength,i},c[s(263)][s(1295)]=function(e,t){var r=s;e=null==e?this[r(1034)]-this.position/4:e;var i=new Float32Array(e);return c[r(867)](i[r(326)],0,this[r(326)],this[r(1029)]+this.position,e*i[r(240)]),c[r(824)](i,null==t?this[r(233)]:t),this[r(595)]+=i.byteLength,i},c.prototype.readInt32=function(e){var t=s,r=this[t(573)][t(802)](this[t(595)],null==e?this[t(233)]:e);return this[t(595)]+=4,r},c[s(263)][s(333)]=function(e){var t=s,r=this[t(573)][t(157)](this[t(595)],null==e?this[t(233)]:e);return this[t(595)]+=2,r},c[s(263)][s(772)]=function(){var e=s,t=this[e(573)][e(627)](this[e(595)]);return this[e(595)]+=1,t},c[s(263)][s(303)]=function(e){var t=s,r=this[t(573)][t(200)](this[t(595)],null==e?this[t(233)]:e);return this[t(595)]+=4,r},c[s(263)].readUint16=function(e){var t=s,r=this._dataView[t(1316)](this[t(595)],null==e?this[t(233)]:e);return this[t(595)]+=2,r},c[s(263)][s(851)]=function(){var e=s,t=this._dataView[e(1201)](this[e(595)]);return this[e(595)]+=1,t},c[s(263)][s(185)]=function(e){var t=s,r=this[t(573)].getFloat32(this[t(595)],null==e?this[t(233)]:e);return this[t(595)]+=4,r},c[s(263)][s(590)]=function(e){var t=s,r=this[t(573)].getFloat64(this[t(595)],null==e?this[t(233)]:e);return this[t(595)]+=8,r},c[s(233)]=new Int8Array(new Int16Array([1])[s(326)])[0]>0,c[s(867)]=function(e,t,r,i,n){var a=s,o=new Uint8Array(e,t,n),c=new Uint8Array(r,i,n);o[a(1091)](c)},c[s(824)]=function(e,t){var r=s;return t==this[r(233)]?e:this[r(726)](e)},c.nativeToEndian=function(e,t){var r=s;return this[r(233)]==t?e:this[r(726)](e)},c[s(726)]=function(e){for(var t=s,r=new Uint8Array(e[t(326)],e[t(1029)],e[t(1034)]),i=0;ia;n--,a++){var o=r[a];r[a]=r[n],r[n]=o}return e},c.prototype[s(1005)]=0,String.fromCharCodeUint8=function(e){for(var t=s,r=[],i=0;i>16),this.writeUint8((65280&e)>>8),this[t(442)](255&e)},c[s(263)].adjustUint32=function(e,t){var r=s,i=this.position;this[r(407)](e),this[r(1352)](t),this.seek(i)},c[s(263)].mapInt32Array=function(e,t){var r=s;this._realloc(4*e);var i=new Int32Array(this[r(1042)],this[r(1029)]+this[r(595)],e);return c[r(824)](i,null==t?this.endianness:t),this.position+=4*e,i},c[s(263)][s(965)]=function(e,t){var r=s;this[r(981)](2*e);var i=new Int16Array(this._buffer,this[r(1029)]+this.position,e);return c[r(824)](i,null==t?this[r(233)]:t),this.position+=2*e,i},c[s(263)][s(377)]=function(e){var t=s;this[t(981)](1*e);var r=new Int8Array(this[t(1042)],this[t(1029)]+this[t(595)],e);return this[t(595)]+=1*e,r},c.prototype.mapUint32Array=function(e,t){var r=s;this[r(981)](4*e);var i=new Uint32Array(this._buffer,this[r(1029)]+this.position,e);return c.arrayToNative(i,null==t?this[r(233)]:t),this[r(595)]+=4*e,i},c[s(263)][s(966)]=function(e,t){var r=s;this[r(981)](2*e);var i=new Uint16Array(this._buffer,this[r(1029)]+this[r(595)],e);return c[r(824)](i,null==t?this[r(233)]:t),this[r(595)]+=2*e,i},c.prototype[s(1021)]=function(e,t){var r=s;this[r(981)](8*e);var i=new Float64Array(this[r(1042)],this[r(1029)]+this[r(595)],e);return c[r(824)](i,null==t?this.endianness:t),this[r(595)]+=8*e,i},c[s(263)].mapFloat32Array=function(e,t){var r=s;this[r(981)](4*e);var i=new Float32Array(this._buffer,this[r(1029)]+this[r(595)],e);return c[r(824)](i,null==t?this[r(233)]:t),this[r(595)]+=4*e,i};var l=function(e){var t=s;this[t(1120)]=[],this.bufferIndex=-1,e&&(this[t(1151)](e),this[t(1184)]=0)};l[s(263)]=new c(new ArrayBuffer,0,c[s(1044)]),l[s(263)][s(845)]=function(){var e,t=s;return this[t(1184)]>-1||(this[t(1120)].length>0?0===(e=this[t(1120)][0])[t(645)]?(this[t(326)]=e,this[t(1184)]=0,a[t(1282)](t(357),"Stream ready for parsing"),!0):(this[t(1293)](),!1):(this[t(1293)](),!1))},ArrayBuffer.concat=function(e,t){var r=s;a[r(1282)](r(332),r(436)+(e[r(1034)]+t[r(1034)]));var i=new Uint8Array(e.byteLength+t[r(1034)]);return i[r(1091)](new Uint8Array(e),0),i[r(1091)](new Uint8Array(t),e.byteLength),i[r(326)]},l.prototype[s(366)]=function(e,t,r){var i,n=s;return(i=new Uint8Array(r)).set(new Uint8Array(e,t,r)),i[n(326)][n(645)]=e.fileStart+t,i[n(326)][n(229)]=0,i[n(326)]},l[s(263)][s(1151)]=function(e){for(var t=s,r=!0,i=0;in.byteLength){this[t(1120)][t(1009)](i,1),i--;continue}}else e.fileStart+e[t(1034)]<=n.fileStart||(e=this[t(366)](e,0,n[t(645)]-e[t(645)])),a.debug(t(357),t(1221)+e[t(645)]+t(501)+e[t(1034)]+")"),this.buffers[t(1009)](i,0,e),0===i&&(this[t(326)]=e);r=!1;break}if(e[t(645)]0)){r=!1;break}e=this[t(366)](e,o,c)}}r&&(a[t(1282)]("MultiBufferStream",t(1221)+e[t(645)]+t(501)+e[t(1034)]+")"),this[t(1120)][t(484)](e),0===i&&(this.buffer=e))},l.prototype.logBufferLevel=function(e){var t,r,i,n,o,c=s,u=[],l="";for(i=0,n=0,t=0;t0&&(l+=o[c(777)]-1+"]");var h=e?a[c(1362)]:a.debug;0===this[c(1120)][c(341)]?h(c(357),c(147)):h(c(357),""+this[c(1120)][c(341)]+c(1319)+i+"/"+n+c(217)+l)},l[s(263)].cleanBuffers=function(){var e,t,r=s;for(e=0;e"+this.buffer[t(1034)]+")"),!0}return!1}return!1},l[s(263)][s(1045)]=function(e,t,r){var i,n=s,o=null,c=-1;for(i=!0===e?0:this[n(1184)];i=t?(a[n(1282)](n(357),n(1211)+c),c):-1:-1},l[s(263)][s(1109)]=function(e){var t,r,i,n=s,a=void 0!==e?e:this[n(1184)];if(r=this[n(1120)][a],this.buffers.length>a+1)for(t=a+1;t>3;return 31===s&&n[r(758)].length>=2&&(s=32+((7&n[r(758)][0])<<3)+((224&n[r(758)][1])>>5)),s}return null},i[e(387)]=function(t){var r=e;i[r(852)][r(562)](this,4,t)},i[e(387)].prototype=new(i[e(852)]),i[e(387)][e(263)][e(649)]=function(t){var r=e;this.oti=t[r(851)](),this.streamType=t.readUint8(),this[r(1338)]=0!=(this.streamType>>1&1),this[r(743)]=this.streamType>>>2,this[r(865)]=t[r(944)](),this[r(1265)]=t[r(303)](),this.avgBitrate=t[r(303)](),this[r(637)]-=13,this[r(599)](t)},i[e(372)]=function(t){var r=e;i[r(852)][r(562)](this,5,t)},i[e(372)].prototype=new i.Descriptor,i[e(1024)]=function(t){var r=e;i[r(852)][r(562)](this,6,t)},i.SLConfigDescriptor[e(263)]=new i.Descriptor,this};s(1329)!==s(822)&&(t[s(141)]=h);var d={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:[s(765),s(419),s(223),s(375),s(737),s(1015)],FULL_BOXES:[s(433),s(601),s(770),s(255),s(276),s(1230),s(273)],CONTAINER_BOXES:[[s(1272),[s(461),s(340)]],[s(461)],["edts"],[s(602)],[s(184)],[s(513)],["stbl",[s(1180),s(423)]],[s(725),["trex"]],[s(1064),[s(1301)]],[s(1301),[s(571),"sgpd",s(423)]],["vttc"],[s(1210)],["iref"],[s(378),[s(1142)]],[s(737)],["hnti"],[s(215)],[s(1015)],[s(756)],[s(1205)],[s(1285)],[s(398)],[s(285)],["udta",[s(740)]],["iprp",[s(931)]],[s(912)],[s(829)],[s(490)],[s(328),["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){var e=s;d[e(689)][e(263)]=new(d[e(166)]),d[e(311)][e(263)]=new(d[e(166)]),d[e(1051)][e(263)]=new d.Box,d[e(551)][e(263)]=new d.FullBox,d[e(980)][e(677)]((function(t){d[e(171)](t)})),d[e(392)][e(677)]((function(t){d[e(310)](t)})),d[e(773)].forEach((function(e){d.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,r){var i=s;this[i(139)]=e,this[i(637)]=t,this[i(1022)]=r},FullBox:function(e,t,r){var i=s;d[i(166)][i(562)](this,e,t,r),this[i(322)]=0,this[i(1296)]=0},ContainerBox:function(e,t,r){var i=s;d.Box[i(562)](this,e,t,r),this[i(1312)]=[]},SampleEntry:function(e,t,r,i){var n=s;d[n(311)][n(562)](this,e,t),this.hdr_size=r,this[n(915)]=i},SampleGroupEntry:function(e){this[s(462)]=e},TrackGroupTypeBox:function(e,t){d[s(689)].call(this,e,t)},createBoxCtor:function(e,t){var r=s;d[r(704)][r(484)](e),d[e+r(166)]=function(t){var i=r;d[i(166)][i(562)](this,e,t)},d[e+r(166)].prototype=new(d[r(166)]),t&&(d[e+r(166)][r(263)][r(649)]=t)},createFullBoxCtor:function(e,t){var r=s;d[e+r(166)]=function(t){d.FullBox.call(this,e,t)},d[e+r(166)][r(263)]=new(d[r(689)]),d[e+r(166)][r(263)][r(649)]=function(e){var i=r;this[i(1097)](e),t&&t[i(562)](this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,r=0;rr?{code:d.ERR_NOT_ENOUGH_DATA,type:f,size:h,hdr_size:l,start:u}:0!==h&&u+h>e[c(638)]()?(e.seek(u),{code:d[c(1043)],type:f,size:h,hdr_size:l,start:u}):t?{code:d.OK,type:f,size:h,hdr_size:l,start:u}:(d[f+c(166)]?i=new(d[f+c(166)])(h):f!==c(1022)?(i=new(d[c(166)])(f,h))[c(1292)]=!0:d.UUIDBoxes[o]?i=new d.UUIDBoxes[o](h):((i=new(d[c(166)])(f,h))[c(1022)]=o,i.has_unparsed_data=!0),i[c(122)]=l,i.start=u,i[c(321)]===d[c(166)][c(263)][c(321)]&&i[c(139)]!==c(765)&&i[c(523)](e),i[c(649)](e),((n=e[c(232)]()-(i.start+i.size))<0||n>0&&0!==i.size)&&e[c(407)](i[c(915)]+i[c(637)]),{code:d.OK,box:i,size:i[c(637)]})},d[s(166)][s(263)].parse=function(e){var t=s;this[t(139)]!=t(765)?this[t(758)]=e[t(875)](this[t(637)]-this.hdr_size):0===this[t(637)]?e[t(407)](e.getEndPosition()):e.seek(this[t(915)]+this.size)},d.Box[s(263)].parseDataAndRewind=function(e){var t=s;this[t(758)]=e[t(875)](this[t(637)]-this[t(122)]),e[t(595)]-=this.size-this[t(122)]},d[s(689)].prototype.parseDataAndRewind=function(e){var t=s;this[t(1097)](e),this[t(758)]=e[t(875)](this.size-this[t(122)]),this[t(122)]-=4,e[t(595)]-=this[t(637)]-this.hdr_size},d[s(689)][s(263)][s(1097)]=function(e){var t=s;this.version=e[t(851)](),this[t(322)]=e.readUint24(),this.hdr_size+=4},d.FullBox.prototype[s(649)]=function(e){var t=s;this[t(1097)](e),this[t(758)]=e[t(875)](this[t(637)]-this[t(122)])},d[s(311)][s(263)][s(649)]=function(e){for(var t,r,i=s;e.getPosition()>10&31,r[1]=this.language>>5&31,r[2]=31&this[t(1121)],this[t(956)]=String[t(1202)](r[0]+96,r[1]+96,r[2]+96)},d.SAMPLE_ENTRY_TYPE_VISUAL="Visual",d[s(914)]=s(441),d[s(846)]="Hint",d[s(566)]="Metadata",d[s(713)]="Subtitle",d[s(222)]=s(458),d[s(418)]=s(819),d[s(1051)][s(263)][s(308)]=function(e){var t=s;e[t(875)](6),this.data_reference_index=e[t(559)](),this[t(122)]+=8},d.SampleEntry[s(263)][s(649)]=function(e){var t=s;this[t(308)](e),this[t(758)]=e[t(875)](this[t(637)]-this[t(122)])},d[s(1051)][s(263)][s(523)]=function(e){var t=s;this[t(308)](e),this[t(758)]=e.readUint8Array(this[t(637)]-this.hdr_size),this[t(122)]-=8,e[t(595)]-=this.size-this[t(122)]},d[s(1051)].prototype[s(870)]=function(e){var t=s;d.ContainerBox[t(263)][t(649)][t(562)](this,e)},d[s(1305)](d[s(846)]),d[s(1305)](d[s(566)]),d[s(1305)](d[s(713)]),d[s(1305)](d[s(222)]),d.createMediaSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_TEXT),d[s(1305)](d[s(1356)],(function(e){var t,r=s;this.parseHeader(e),e[r(559)](),e.readUint16(),e[r(1178)](3),this[r(933)]=e[r(559)](),this[r(194)]=e[r(559)](),this[r(885)]=e[r(303)](),this[r(181)]=e[r(303)](),e[r(303)](),this.frame_count=e[r(559)](),t=Math[r(855)](31,e[r(851)]()),this[r(698)]=e.readString(t),t<31&&e[r(438)](31-t),this[r(212)]=e[r(559)](),e[r(559)](),this[r(870)](e)})),d[s(1305)](d[s(914)],(function(e){var t=s;this[t(308)](e),e[t(1178)](2),this.channel_count=e[t(559)](),this[t(913)]=e.readUint16(),e.readUint16(),e[t(559)](),this[t(1207)]=e[t(303)]()/65536,this.parseFooter(e)})),d[s(390)](d[s(1356)],s(221)),d[s(390)](d[s(1356)],s(199)),d[s(390)](d[s(1356)],s(1063)),d[s(390)](d[s(1356)],"avc4"),d[s(390)](d.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,s(895)),d[s(390)](d[s(1356)],s(1345)),d[s(390)](d[s(1356)],s(838)),d[s(390)](d[s(1356)],"hvt1"),d[s(390)](d[s(1356)],s(557)),d.createSampleEntryCtor(d[s(1356)],s(787)),d.createSampleEntryCtor(d[s(1356)],s(1165)),d[s(390)](d[s(1356)],s(525)),d[s(390)](d.SAMPLE_ENTRY_TYPE_VISUAL,s(1317)),d.createSampleEntryCtor(d[s(1356)],s(1235)),d[s(390)](d[s(1356)],s(520)),d[s(390)](d.SAMPLE_ENTRY_TYPE_VISUAL,s(368)),d[s(390)](d[s(1356)],s(979)),d.createSampleEntryCtor(d.SAMPLE_ENTRY_TYPE_VISUAL,s(828)),d[s(390)](d[s(1356)],s(582)),d[s(390)](d[s(1356)],"mjp2"),d[s(390)](d.SAMPLE_ENTRY_TYPE_VISUAL,s(1269)),d[s(390)](d.SAMPLE_ENTRY_TYPE_VISUAL,s(970)),d[s(390)](d[s(914)],s(577)),d[s(390)](d[s(914)],s(1146)),d[s(390)](d.SAMPLE_ENTRY_TYPE_AUDIO,s(265)),d.createSampleEntryCtor(d[s(914)],s(1177)),d.createSampleEntryCtor(d[s(914)],s(408)),d[s(390)](d[s(914)],s(858)),d[s(390)](d.SAMPLE_ENTRY_TYPE_AUDIO,s(761)),d[s(390)](d.SAMPLE_ENTRY_TYPE_AUDIO,s(350)),d.createSampleEntryCtor(d[s(914)],"mhm2"),d[s(1191)](d[s(1356)],s(1087)),d[s(1191)](d[s(914)],s(1325)),d[s(1191)](d[s(713)],s(145)),d[s(1191)](d[s(222)],s(1206)),d[s(1191)](d[s(418)],s(932)),d[s(1191)](d.SAMPLE_ENTRY_TYPE_METADATA,s(1164)),d[s(171)](s(385),(function(e){var t=s,r=16*(1+(1&(1&e[t(851)]())));this[t(877)]=[];for(var i=0;i<3;i++)16==r?this.layer_size[i]=e.readUint16():this[t(877)][i]=e[t(303)]()})),d.createBoxCtor("a1op",(function(e){var t=s;this[t(227)]=e[t(851)]()})),d.createFullBoxCtor(s(950),(function(e){var t=s;this[t(1100)]=e.readCString();var r=this.size-this[t(122)]-(this[t(1100)][t(341)]+1);this[t(841)]=e[t(875)](r)})),d[s(171)](s(393),(function(e){var t=s,r=e.readUint8();if(!(r>>7&!1)&&(this[t(1296)]=127&r,1===this[t(1296)]&&(r=e[t(851)](),this.seq_profile=r>>5&7,this[t(295)]=31&r,r=e.readUint8(),this[t(518)]=r>>7&1,this[t(702)]=r>>6&1,this.twelve_bit=r>>5&1,this[t(728)]=r>>4&1,this.chroma_subsampling_x=r>>3&1,this[t(1160)]=r>>2&1,this[t(1193)]=3&r,r=e[t(851)](),this[t(1052)]=r>>5&7,0===this.reserved_1))){if(this[t(813)]=r>>4&1,1===this[t(813)])this.initial_presentation_delay_minus_one=15&r;else if(this.reserved_2=15&r,0!==this.reserved_2)return;var i=this[t(637)]-this[t(122)]-4;this[t(790)]=e[t(875)](i)}})),d[s(171)](s(1283),(function(e){var t,r,i=s;for(this[i(910)]=e[i(851)](),this[i(719)]=e[i(851)](),this[i(382)]=e.readUint8(),this[i(1277)]=e[i(851)](),this[i(693)]=3&e[i(851)](),this[i(888)]=31&e[i(851)](),r=this.size-this[i(122)]-6,this[i(272)]=[],t=0;t0&&(this[i(238)]=e[i(875)](r))})),d[s(171)](s(514),(function(e){var t=s;this[t(515)]=e.readUint32(),this.maxBitrate=e[t(303)](),this[t(213)]=e.readUint32()})),d[s(310)](s(305),(function(e){var t=s,r=e.readUint8();this[t(473)]=128==(128&r),this[t(1006)]=64==(64&r),this[t(530)]=(63&r)>>2,e[t(944)]()})),d[s(171)]("cdef",(function(e){var t,r=s;for(this[r(342)]=e[r(559)](),this[r(630)]=[],this.channel_types=[],this[r(127)]=[],t=0;t=32768&&this.component_type_urls[t(484)](e[t(1268)]())}})),d[s(310)](s(946),(function(e){var t,r,i=s;if(t=e[i(303)](),this[i(140)]=[],0===this[i(1296)])for(r=0;r>7}else(this.colour_type===t(724)||this[t(137)]===t(1357))&&(this[t(1008)]=e.readUint8Array(this[t(637)]-4))})),d[s(310)](s(457),(function(e){var t=s;this[t(832)](e),this[t(1270)]=e[t(1268)]()})),d[s(310)](s(1311),(function(e){var t=s;0===this[t(1296)]&&(this[t(623)]=e[t(1171)](),this[t(1263)]=e[t(1171)](),this[t(242)]=e[t(1171)](),this[t(1243)]=e[t(1171)](),this[t(450)]=e.readInt32())})),d[s(310)](s(621),(function(e){var t,r,i=s;if(t=e[i(303)](),this[i(594)]=[],this.sample_offsets=[],0===this[i(1296)])for(r=0;r>6,this[t(275)]=r>>1&31,this[t(655)]=(1&r)<<2|i>>6&3,this[t(826)]=i>>3&7,this.lfeon=i>>2&1,this[t(1358)]=3&i|n>>5&7})),d[s(171)]("dec3",(function(e){var t=s,r=e.readUint16();this.data_rate=r>>3,this.num_ind_sub=7&r,this[t(1158)]=[];for(var i=0;i>6,n[t(275)]=a>>1&31,n[t(655)]=(1&a)<<4|o>>4&15,n[t(826)]=o>>1&7,n[t(1214)]=1&o,n[t(467)]=c>>1&15,n[t(467)]>0&&(n[t(163)]=(1&c)<<8|e.readUint8())}})),d[s(310)](s(1059),(function(e){var t=s,r=[],i=[t(1066),t(610),t(349),t(892),t(712),t(1348),t(241),t(231)];for(this[t(1097)](e);;){var n=e[t(851)](),a=Math[t(855)](127&n,i[t(341)]-1);if(a?e[t(875)](e[t(944)]()):(e[t(875)](13),this[t(1207)]=e[t(303)]()>>12,e.readUint8Array(20)),r[t(484)](i[a]),128&n)break}this[t(795)]=r[t(341)]+" ("+r[t(868)](", ")+")"})),d[s(171)](s(1012),(function(e){var t=s;this.bytessent=e[t(1244)]()})),d[s(171)](s(150),(function(e){this.time=e.readUint32()})),d[s(171)]("dmed",(function(e){var t=s;this.bytessent=e[t(1244)]()})),d[s(171)](s(700),(function(e){var t=s;if(this[t(1289)]=e[t(851)](),this[t(1181)]=e[t(851)](),this[t(948)]=e[t(559)](),this.InputSampleRate=e[t(303)](),this[t(624)]=e[t(333)](),this.ChannelMappingFamily=e[t(851)](),0!==this[t(1257)]){this[t(380)]=e[t(851)](),this.CoupledCount=e[t(851)](),this.ChannelMapping=[];for(var r=0;r=4;)this[t(151)][i]=e.readString(4),r-=4,i++})),d.createFullBoxCtor(s(628),(function(e){var t=s;0===this[t(1296)]&&(e[t(303)](),this.handler=e[t(438)](4),e[t(1178)](3),this[t(1139)]=e[t(438)](this.size-this[t(122)]-20),"\0"===this.name[this[t(1139)].length-1]&&(this[t(1139)]=this[t(1139)].slice(0,-1)))})),d[s(171)](s(352),(function(e){var t,r,i,n,a=s;this[a(910)]=e[a(851)](),n=e[a(851)](),this[a(881)]=n>>6,this[a(746)]=(32&n)>>5,this[a(1127)]=31&n,this.general_profile_compatibility=e[a(303)](),this[a(388)]=e[a(875)](6),this[a(821)]=e.readUint8(),this[a(616)]=4095&e[a(559)](),this[a(1026)]=3&e[a(851)](),this[a(1001)]=3&e[a(851)](),this[a(911)]=7&e[a(851)](),this[a(619)]=7&e[a(851)](),this.avgFrameRate=e.readUint16(),n=e[a(851)](),this[a(468)]=n>>6,this[a(1236)]=(13&n)>>3,this[a(1004)]=(4&n)>>2,this.lengthSizeMinusOne=3&n,this[a(134)]=[];var o=e[a(851)]();for(t=0;t>7,c[a(361)]=63&n;var u=e[a(559)]();for(r=0;r>4&15,this[r(570)]=15&t,t=e[r(851)](),this.base_offset_size=t>>4&15,1===this[r(1296)]||2===this.version?this[r(985)]=15&t:this[r(985)]=0,this[r(1125)]=[];var i=0;if(this[r(1296)]<2)i=e[r(559)]();else{if(2!==this[r(1296)])throw"version of iloc box not supported";i=e[r(303)]()}for(var n=0;n>7,this[t(903)]=1&r})),d[s(310)](s(924),(function(e){var t=s;if((0===this[t(1296)]||1===this.version)&&(this[t(1261)]=e[t(559)](),this[t(894)]=e[t(559)](),this[t(178)]=e[t(1268)](),this[t(465)]=e[t(1268)](),this[t(1216)]=e[t(1268)]()),1===this[t(1296)])return this[t(561)]=e.readString(4),void e.seek(this.start+this[t(637)]);this.version>=2&&(2===this[t(1296)]?this[t(1261)]=e[t(559)]():3===this[t(1296)]&&(this[t(1261)]=e.readUint32()),this.item_protection_index=e[t(559)](),this[t(1224)]=e[t(438)](4),this.item_name=e[t(1268)](),this[t(1224)]===t(997)?(this.content_type=e.readCString(),this.content_encoding=e[t(1268)]()):"uri "===this[t(1224)]&&(this[t(313)]=e[t(1268)]()))})),d[s(310)](s(931),(function(e){var t,r,i=s;for(entry_count=e[i(303)](),this.associations=[],t=0;t>7==1,1&this[i(322)]?c[i(991)]=(127&o)<<8|e[i(851)]():c[i(991)]=127&o}}})),d.createFullBoxCtor(s(825),(function(e){var t,r,i=s;for(this[i(1132)]=[];e[i(232)]()>7,n[t(443)]=127&a,n[t(443)]){case 0:n[t(462)]=e[t(438)](4);break;case 1:n[t(462)]=e[t(438)](4),n[t(1079)]=e[t(303)]();break;case 2:case 3:break;case 4:n[t(1110)]=e[t(303)]()}}})),d[s(171)](s(1073),(function(e){var t=s;this[t(370)]=e[t(559)]()})),d[s(171)]("maxr",(function(e){var t=s;this.period=e[t(303)](),this[t(992)]=e[t(303)]()})),f[s(263)].toString=function(){return"("+this.x+","+this.y+")"},d[s(171)](s(688),(function(e){var t=s;this[t(575)]=[],this[t(575)][0]=new f(e.readUint16(),e[t(559)]()),this.display_primaries[1]=new f(e[t(559)](),e[t(559)]()),this[t(575)][2]=new f(e[t(559)](),e[t(559)]()),this[t(754)]=new f(e[t(559)](),e[t(559)]()),this[t(427)]=e[t(303)](),this[t(691)]=e[t(303)]()})),d[s(310)](s(741),(function(e){var t=s;1==this[t(1296)]?(this[t(843)]=e[t(1244)](),this[t(131)]=e.readUint64(),this[t(1053)]=e[t(303)](),this.duration=e[t(1244)]()):(this[t(843)]=e.readUint32(),this[t(131)]=e[t(303)](),this[t(1053)]=e.readUint32(),this[t(469)]=e[t(303)]()),this[t(832)](e),e[t(559)]()})),d[s(310)](s(234),(function(e){var t=s;1&this[t(322)]&&(this[t(1296)]=1),1==this[t(1296)]?this[t(1014)]=e[t(1244)]():this[t(1014)]=e.readUint32()})),d.createFullBoxCtor("meta",(function(e){var t=s;this.boxes=[],d[t(311)][t(263)].parse[t(562)](this,e)})),d[s(310)](s(942),(function(e){var t=s;this[t(1225)]=e[t(303)]()})),d.createFullBoxCtor("mfro",(function(e){var t=s;this[t(1245)]=e[t(303)]()})),d[s(310)](s(1094),(function(e){var t=s;this.bits_per_pixel=e[t(851)]()})),d[s(310)](s(1054),(function(e){var t=s;1==this[t(1296)]?(this[t(843)]=e[t(1244)](),this[t(131)]=e[t(1244)](),this[t(1053)]=e[t(303)](),this[t(469)]=e[t(1244)]()):(this.creation_time=e[t(303)](),this[t(131)]=e.readUint32(),this.timescale=e[t(303)](),this[t(469)]=e.readUint32()),this.rate=e.readUint32(),this[t(335)]=e.readUint16()>>8,e[t(559)](),e[t(1178)](2),this[t(379)]=e[t(1178)](9),e[t(1178)](6),this[t(669)]=e[t(303)]()})),d.createBoxCtor("npck",(function(e){var t=s;this.packetssent=e[t(303)]()})),d[s(171)](s(1187),(function(e){var t=s;this.packetssent=e[t(1244)]()})),d[s(310)](s(1143),(function(e){var t=s,r=e[t(303)]();this[t(529)]=[];for(var i=0;i0){var r=e[t(303)]();this[t(673)]=[];for(var i=0;i0&&(this[t(758)]=e.readUint8Array(n))})),d[s(310)](s(949),(function(e){var t=s;this[t(933)]=e.readUint32(),this.height=e[t(303)]()})),d[s(310)]("enof",(function(e){var t=s;this[t(933)]=e[t(303)](),this[t(194)]=e[t(303)]()})),d[s(310)](s(1357),(function(e){var t=s;this[t(933)]=e[t(303)](),this[t(194)]=e[t(303)]()})),d[s(324)](s(364),null,[s(949),s(1357),s(884)]),d[s(171)](s(440),(function(e){var t=s;this[t(1320)]=e[t(438)](4),this[t(197)]=e[t(438)](this[t(637)]-this[t(122)]-4)})),d[s(310)](s(665),(function(e){var t=s;1&this[t(322)]&&(this[t(862)]=e[t(303)](),this[t(128)]=e[t(303)]());var r=e[t(303)]();this[t(1076)]=[];for(var i=0;i>7,this[t(307)]=r>>6&1,this[t(569)]&&(this[t(469)]=e.readUint32()),this[t(307)]&&(this[t(1192)]=e[t(851)](),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this[t(1144)]=[];for(var i=e[t(851)](),n=0;n>7,this[t(1297)]=127&r})),d[s(757)](s(198),(function(e){var t=s;if(this.operation_point_count=e[t(559)](),this[t(785)]!==2+(1===this[t(598)]?2:6*this[t(598)])+9)this[t(758)]=e[t(875)](this[t(785)]-2);else{if(1===this[t(598)])this.target_rate_share=e[t(559)]();else{this[t(271)]=[],this[t(1017)]=[];for(var r=0;r>4,this[t(989)]=15&r,this[t(916)]=e[t(851)](),this[t(1071)]=e[t(851)](),this[t(297)]=d[t(876)](e),this[t(696)]=0,this[t(930)]=0,1===this[t(916)]&&0===this[t(1071)]&&(this[t(696)]=e[t(851)](),this[t(930)]=e[t(875)](this[t(696)]))})),d[s(757)](s(120),(function(e){})),d[s(757)](s(597),(function(e){var t=e[s(851)]();this.NAL_unit_type=63&t})),d[s(757)](s(1082),(function(e){var t=s,r=e[t(851)]();this[t(509)]=r>>7})),d[s(757)]("tsas",(function(e){})),d.createSampleGroupCtor(s(314),(function(e){})),d[s(757)]("vipr",(function(e){})),d[s(310)](s(423),(function(e){var t=s;this[t(462)]=e[t(438)](4),1===this[t(1296)]?this[t(1079)]=e[t(303)]():this[t(1079)]=0,this[t(806)]=[];for(var r=e[t(303)](),i=0;i>6,this[r(937)][n]=t>>4&3,this.sample_is_depended_on[n]=t>>2&3,this[r(1028)][n]=3&t})),d[s(310)](s(320)),d[s(310)]("sgpd",(function(e){var t=s;this[t(462)]=e.readString(4),a[t(1282)](t(1019),"Found Sample Groups of type "+this[t(462)]),1===this[t(1296)]?this[t(1096)]=e[t(303)]():this[t(1096)]=0,this[t(1296)]>=2&&(this[t(1273)]=e[t(303)]()),this[t(806)]=[];for(var r=e[t(303)](),i=0;i>31&1,n[t(338)]=2147483647&a,n.subsegment_duration=e.readUint32(),a=e[t(303)](),n.starts_with_SAP=a>>31&1,n.SAP_type=a>>28&7,n[t(1366)]=268435455&a}})),d[s(820)]=function(e,t,r,i){var n=s;d[n(166)][n(562)](this,e,t),this[n(122)]=r,this.start=i},d[s(820)][s(263)]=new(d[s(166)]),d[s(820)].prototype[s(649)]=function(e){var t=s;this[t(1112)]=e.readUint16();var r=e[t(559)]();this[t(1132)]=[];for(var i=0;i>4&15,this[i(369)][t+1]=15&n}else if(8===this[i(343)])for(t=0;t0)for(r=0;r>4&15,this.default_skip_byte_block=15&r}this[t(421)]=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this[t(1250)]=d[t(876)](e),1===this[t(421)]&&0===this.default_Per_Sample_IV_Size&&(this[t(988)]=e[t(851)](),this[t(788)]=e[t(875)](this[t(988)]))})),d[s(310)](s(969),(function(e){var t=s;1==this[t(1296)]?this[t(208)]=e[t(1244)]():this[t(208)]=e[t(303)]()})),d[s(310)](s(356),(function(e){var t=s,r=0;this[t(1332)]=e[t(303)](),this[t(637)]-this[t(122)]>r&&this[t(322)]&d[t(168)]?(this[t(405)]=e[t(1244)](),r+=8):this[t(405)]=0,this[t(637)]-this[t(122)]>r&&this[t(322)]&d[t(959)]?(this.default_sample_description_index=e[t(303)](),r+=4):this[t(1300)]=0,this[t(637)]-this[t(122)]>r&&this.flags&d[t(661)]?(this[t(1124)]=e.readUint32(),r+=4):this.default_sample_duration=0,this[t(637)]-this.hdr_size>r&&this.flags&d[t(532)]?(this[t(974)]=e[t(303)](),r+=4):this.default_sample_size=0,this[t(637)]-this[t(122)]>r&&this[t(322)]&d.TFHD_FLAG_SAMPLE_FLAGS?(this[t(940)]=e[t(303)](),r+=4):this[t(940)]=0})),d[s(310)]("tfra",(function(e){var t=s;this[t(652)]=e[t(303)](),e.readUint24();var r=e[t(851)]();this[t(901)]=r>>4&3,this.length_size_of_trun_num=r>>2&3,this.length_size_of_sample_num=3&r,this[t(806)]=[];for(var i=e.readUint32(),n=0;n>8,e[t(559)](),this[t(379)]=e[t(768)](9),this[t(933)]=e[t(303)](),this[t(194)]=e[t(303)]()})),d.createBoxCtor("tmax",(function(e){var t=s;this[t(672)]=e[t(303)]()})),d[s(171)](s(615),(function(e){this[s(672)]=e.readUint32()})),d.createBoxCtor(s(396),(function(e){var t=s;this.bytessent=e[t(303)]()})),d.createBoxCtor(s(1291),(function(e){var t=s;this[t(723)]=e[t(303)]()})),d[s(171)]("tpyl",(function(e){var t=s;this[t(723)]=e[t(1244)]()})),d[s(551)][s(263)][s(649)]=function(e){var t=s;this.parseFullHeader(e),this[t(1049)]=e[t(303)]()},d[s(993)](s(995)),d[s(354)]=function(e,t,r,i){var n=s;d[n(166)][n(562)](this,e,t),this[n(122)]=r,this.start=i},d[s(354)][s(263)]=new(d[s(166)]),d[s(354)].prototype[s(649)]=function(e){var t=s;this[t(355)]=e[t(1178)]((this.size-this.hdr_size)/4)},d[s(641)][s(263)][s(649)]=function(e){for(var t,r,i=s;e[i(232)]()r&&this.flags&d[t(161)]?(this[t(470)]=e[t(1171)](),r+=4):this[t(470)]=0,this.size-this[t(122)]>r&&this[t(322)]&d[t(1083)]?(this[t(323)]=e[t(303)](),r+=4):this[t(323)]=0,this[t(823)]=[],this.sample_size=[],this[t(898)]=[],this[t(1023)]=[],this[t(637)]-this[t(122)]>r)for(var i=0;i>7&1,this[r(803)]=i>>6&1,this[r(666)]=i>>5&1,this[r(1339)]=i>>4&1,this[r(1264)]=i>>3&1,this.pixel_size=e[r(303)](),this[r(1298)]=e[r(303)](),this.tile_align_size=e[r(303)](),this.num_tile_cols_minus_one=e[r(303)](),this[r(664)]=e[r(303)]()}})),d[s(310)](s(301),(function(e){var t=s;1!==this[t(322)]&&(this[t(1095)]=e[t(1268)]())})),d[s(310)](s(483),(function(e){var t=s;this.name=e.readCString(),this[t(637)]-this[t(122)]-this[t(1139)][t(341)]-1>0&&(this[t(1095)]=e.readCString())})),d[s(620)](s(973),!0,!1,(function(e){var t=s;this.LiveServerManifest=e[t(438)](this[t(637)]-this[t(122)])[t(298)](/&/g,t(972))[t(298)](//g,t(1013))[t(298)](/"/g,t(748))[t(298)](/'/g,t(1368))})),d[s(620)](s(1234),!0,!1,(function(e){var t=s;this[t(1060)]=d[t(876)](e);var r=e[t(303)]();r>0&&(this[t(758)]=e[t(875)](r))})),d[s(620)](s(1281),!0,!1),d[s(620)]("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){var t=s;this[t(941)]=e.readUint24(),this[t(294)]=e[t(851)](),this.default_KID=d[t(876)](e)})),d.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){var t=s;this[t(260)]=e[t(851)](),this.entries=[];for(var r=0;r>4,this[r(945)]=t>>1&7,this.videoFullRangeFlag=1&t,this[r(600)]=e.readUint8(),this.transferCharacteristics=e[r(851)](),this[r(266)]=e[r(851)](),this[r(296)]=e[r(559)](),this.codecIntializationData=e[r(875)](this[r(296)])):(this[r(1334)]=e.readUint8(),this[r(849)]=e[r(851)](),t=e[r(851)](),this.bitDepth=t>>4&15,this[r(801)]=15&t,t=e.readUint8(),this[r(945)]=t>>4&15,this.transferFunction=t>>1&7,this[r(1145)]=1&t,this[r(296)]=e.readUint16(),this[r(984)]=e[r(875)](this[r(296)]))})),d.createBoxCtor("vttC",(function(e){var t=s;this[t(1116)]=e[t(438)](this[t(637)]-this[t(122)])})),d.createFullBoxCtor(s(1088),(function(e){var t,r,i=s,n={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){var t=Ia;this[t(254)]=e[t(851)](),this[t(864)]=8},stream_read_2_bytes:function(e){var t=Ia;this[t(254)]=e[t(559)](),this[t(864)]=16},extract_bits:function(e){var t=Ia,r=this[t(254)]>>this[t(864)]-e&(1<1){for(n.stream_read_1_bytes(e),this.ptl_sublayer_present_mask=0,r=this[i(414)]-2;r>=0;--r){var c=n[i(464)](1);this[i(1226)]|=c<1;++r)n.extract_bits(1);for(this.sublayer_level_idc=[],r=this[i(414)]-2;r>=0;--r)this[i(1226)]&1<>=1;r+=d[t(1114)](n,0),r+=".",0===this[t(352)].general_tier_flag?r+="L":r+="H",r+=this[t(352)][t(821)];var a=!1,o="";for(e=5;e>=0;e--)(this[t(352)].general_constraint_indicator[e]||a)&&(o="."+d[t(1114)](this[t(352)][t(388)][e],0)+o,a=!0);r+=o}return r},d.vvc1SampleEntry[s(263)].getCodec=d[s(1318)].prototype[s(374)]=function(){var e,t=s,r=d.SampleEntry.prototype[t(374)][t(562)](this);if(this.vvcC){r+="."+this[t(1088)][t(1127)],this[t(1088)].general_tier_flag?r+=".H":r+=".L",r+=this[t(1088)].general_level_idc;var i="";if(this[t(1088)][t(859)]){var n,a=[],o=0;for(o|=this.vvcC.ptl_frame_only_constraint<<7,o|=this[t(1088)].ptl_multilayer_enabled<<6,e=0;e>2&63,a[t(484)](o),o&&(n=e),o=this[t(1088)][t(859)][e]>>2&3;if(void 0===n)i=".CA";else{i=".C";var c="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",u=0,l=0;for(e=0;e<=n;++e)for(u=u<<8|a[e],l+=8;l>=5;){i+=c[u>>l-5&31],u&=(1<<(l-=5))-1}l&&(i+=c[31&(u<<=5-l)])}}r+=i}return r},d[s(1217)][s(263)].getCodec=function(){var e=s,t=d[e(1051)].prototype[e(374)][e(562)](this);if(this[e(527)]&&this.esds[e(1032)]){var r=this[e(527)][e(1032)][e(1355)](),i=this.esds[e(1032)][e(179)]();return t+"."+d[e(1114)](r)+(i?"."+i:"")}return t},d[s(159)][s(263)].getCodec=function(){var e=s,t=d[e(1051)][e(263)].getCodec[e(562)](this);return this[e(482)]?t+"."+this[e(482)]:t},d.vp08SampleEntry[s(263)][s(374)]=d[s(521)][s(263)][s(374)]=function(){var e=s,t=d[e(1051)][e(263)][e(374)][e(562)](this),r=this[e(463)].level;0==r&&(r="00");var i=this[e(463)][e(722)];return 8==i&&(i="08"),t+".0"+this[e(463)][e(1334)]+"."+r+"."+i},d[s(804)][s(263)][s(374)]=function(){var e,t=s,r=d.SampleEntry[t(263)].getCodec[t(562)](this),i=this[t(393)][t(295)];return i<10&&(i="0"+i),2===this.av1C[t(318)]&&1===this[t(393)][t(702)]?e=1===this[t(393)].twelve_bit?"12":"10":this.av1C[t(318)]<=2&&(e=1===this[t(393)][t(702)]?"10":"08"),r+"."+this[t(393)][t(318)]+"."+i+(this[t(393)][t(518)]?"H":"M")+"."+e},d[s(166)][s(263)].writeHeader=function(e,t){var r=s;this[r(637)]+=8,this[r(637)]>u&&(this[r(637)]+=8),this[r(139)]===r(1022)&&(this.size+=16),a[r(1282)](r(1238),r(1310)+this.type+r(720)+this[r(637)]+r(1136)+e.getPosition()+(t||"")),this[r(637)]>u?e[r(1352)](1):(this.sizePosition=e.getPosition(),e[r(1352)](this[r(637)])),e.writeString(this[r(139)],null,4),this[r(139)]===r(1022)&&e[r(1084)](this[r(1022)]),this[r(637)]>u&&e[r(1315)](this[r(637)])},d.FullBox[s(263)][s(588)]=function(e){var t=s;this[t(637)]+=4,d[t(166)][t(263)][t(588)][t(562)](this,e,t(869)+this[t(1296)]+t(922)+this[t(322)]),e[t(442)](this[t(1296)]),e[t(739)](this[t(322)])},d[s(166)][s(263)][s(321)]=function(e){var t=s;"mdat"===this[t(139)]?this.data&&(this[t(637)]=this[t(758)].length,this[t(588)](e),e.writeUint8Array(this[t(758)])):(this[t(637)]=this[t(758)]?this[t(758)][t(341)]:0,this.writeHeader(e),this.data&&e[t(1084)](this[t(758)]))},d.ContainerBox.prototype[s(321)]=function(e){var t=s;this.size=0,this[t(588)](e);for(var r=0;r=2&&e.writeUint32(this.default_sample_description_index),e[i(1352)](this[i(806)][i(341)]),t=0;t0)for(t=0;t+1r?1:0,this.flags=0,this[t(637)]=4,1===this.version&&(this[t(637)]+=4),this[t(588)](e),1===this.version?e[t(1315)](this[t(208)]):e[t(1352)](this[t(208)])},d[s(367)].prototype[s(321)]=function(e){var t=s;this[t(1296)]=0,this[t(637)]=4,this[t(322)]&d.TFHD_FLAG_BASE_DATA_OFFSET&&(this[t(637)]+=8),this[t(322)]&d[t(959)]&&(this[t(637)]+=4),this[t(322)]&d.TFHD_FLAG_SAMPLE_DUR&&(this[t(637)]+=4),this.flags&d[t(532)]&&(this[t(637)]+=4),this.flags&d[t(244)]&&(this[t(637)]+=4),this.writeHeader(e),e[t(1352)](this[t(1332)]),this[t(322)]&d.TFHD_FLAG_BASE_DATA_OFFSET&&e[t(1315)](this[t(405)]),this[t(322)]&d[t(959)]&&e[t(1352)](this[t(1300)]),this[t(322)]&d[t(661)]&&e[t(1352)](this[t(1124)]),this.flags&d[t(532)]&&e[t(1352)](this[t(974)]),this[t(322)]&d[t(244)]&&e[t(1352)](this[t(940)])},d.tkhdBox[s(263)].write=function(e){var t=s;this[t(1296)]=0,this[t(637)]=80,this[t(588)](e),e[t(1352)](this.creation_time),e.writeUint32(this[t(131)]),e[t(1352)](this.track_id),e[t(1352)](0),e.writeUint32(this.duration),e[t(1352)](0),e[t(1352)](0),e[t(679)](this[t(204)]),e[t(679)](this.alternate_group),e[t(679)](this.volume<<8),e.writeUint16(0),e[t(193)](this.matrix),e.writeUint32(this.width),e.writeUint32(this.height)},d[s(480)].prototype[s(321)]=function(e){var t=s;this[t(1296)]=0,this[t(322)]=0,this.size=20,this[t(588)](e),e[t(1352)](this[t(1332)]),e[t(1352)](this.default_sample_description_index),e[t(1352)](this[t(1124)]),e[t(1352)](this[t(974)]),e[t(1352)](this[t(940)])},d[s(1027)].prototype[s(321)]=function(e){var t=s;this.version=0,this.size=4,this.flags&d[t(161)]&&(this[t(637)]+=4),this[t(322)]&d.TRUN_FLAGS_FIRST_FLAG&&(this[t(637)]+=4),this[t(322)]&d.TRUN_FLAGS_DURATION&&(this[t(637)]+=4*this.sample_duration[t(341)]),this.flags&d[t(648)]&&(this[t(637)]+=4*this[t(1262)][t(341)]),this[t(322)]&d[t(900)]&&(this[t(637)]+=4*this[t(898)][t(341)]),this[t(322)]&d.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this[t(1023)][t(341)]),this[t(588)](e),e.writeUint32(this[t(133)]),this[t(322)]&d[t(161)]&&(this[t(994)]=e[t(232)](),e[t(358)](this[t(470)])),this.flags&d[t(1083)]&&e[t(1352)](this[t(323)]);for(var r=0;r-1||e[r]instanceof d[i(166)]||t[r]instanceof d[i(166)]||typeof e[r]===i(822)||typeof t[r]===i(822)||typeof e[r]===i(1212)||"function"==typeof t[r]||e[i(279)]&&e[i(279)][i(1249)](r[i(766)](0,4))>-1||t[i(279)]&&t[i(279)].indexOf(r[i(766)](0,4))>-1||r===i(758)||r===i(915)||r===i(637)||r===i(843)||r===i(131)||d[i(1260)][i(1249)](r)>-1||e[r]===t[r]))return!1;return!0},d[s(1324)]=function(e,t){var r=s;if(!d[r(880)](e,t))return!1;for(var i=0;i=t?e:new Array(t-e.length+1)[i(868)](r)+e}function a(e){var t=Ia,r=Math[t(763)](e/3600),i=Math.floor((e-3600*r)/60),s=Math[t(763)](e-3600*r-60*i),a=Math[t(763)](1e3*(e-3600*r-60*i-s));return n(r,2)+":"+n(i,2)+":"+n(s,2)+"."+n(a,3)}for(var o=this[i(925)](r),c="",u=0;u1)for(t=1;t-1&&this.fragmentedTracks[t(1009)](r,1)},y[s(263)][s(939)]=function(e,t,r){var i=s,n=this[i(847)](e);if(n){var a={};this.extractedTracks.push(a),a.id=e,a[i(257)]=t,a[i(461)]=n,n[i(735)]=0,a[i(692)]=1e3,a[i(175)]=[],r&&r[i(1196)]&&(a[i(692)]=r[i(1196)])}},y.prototype[s(927)]=function(e){for(var t=s,r=-1,i=0;i-1&&this[t(389)][t(1009)](r,1)},y.prototype[s(649)]=function(){var e,t,r=s;if(!this[r(1104)]||this[r(1104)]())for(;;){if(this[r(1152)]&&this[r(1152)]()){if(this.processIncompleteMdat())continue;return}if(this[r(1138)]&&this.saveParsePosition(),(e=d[r(568)](this[r(1090)],false))[r(1242)]===d[r(1043)]){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var i;switch(i="uuid"!==(t=e[r(252)])[r(139)]?t.type:t[r(1022)],this[r(1312)][r(484)](t),i){case r(765):this[r(706)][r(484)](t);break;case r(1064):this[r(792)][r(484)](t);break;case r(1272):this.moovStartFound=!0,0===this[r(706)][r(341)]&&(this.isProgressive=!0);default:this[i],this[i]=t}this[r(1280)]&&this.updateUsedBytes(t,e)}},y.prototype[s(497)]=function(e){var t=s;if(null==e)throw"Buffer must be defined and non empty";if(void 0===e[t(645)])throw t(612);return 0===e[t(1034)]?(this[t(1090)][t(1293)](),!1):(e.usedBytes=0,this[t(1090)][t(1151)](e),this[t(1090)].logBufferLevel(),!!this.stream[t(845)]())},y[s(263)][s(228)]=function(e,t){var r,i=s;if(this[i(497)](e))return this[i(649)](),this[i(1256)]&&!this[i(1133)]&&(this[i(1133)]=!0,this[i(430)]&&this[i(430)]()),this[i(1272)]?(!this.sampleListBuilt&&(this[i(860)](),this[i(411)]=!0),this[i(651)](),this[i(791)]&&!this[i(531)]&&(this[i(531)]=!0,this[i(791)](this[i(964)]())),this[i(581)](t),this[i(1213)]?(r=this[i(1213)],this[i(1213)]=void 0):r=this.nextParsePosition,this[i(1090)][i(207)]&&(r=this[i(1090)].getEndFilePositionAfter(r))):r=this.nextParsePosition?this[i(479)]:0,this[i(1185)]&&this[i(487)]&&!this.sidxSent&&(this[i(487)](this[i(1185)]),this[i(990)]=!0),this[i(1037)]&&(this.flattenItemInfo&&!this[i(1067)]&&(this[i(1228)](),this[i(1067)]=!0),this[i(1215)]&&this.processItems(this.onItem)),this[i(1090)].cleanBuffers&&(this.stream.logBufferLevel(),this[i(1090)][i(512)](),this.stream[i(1293)](!0)),r},y[s(263)][s(964)]=function(){var e,t,r,i,n,a,o=s,c={},u=new Date(o(1313))[o(659)]();if(this[o(1272)])for(c[o(471)]=!0,c[o(469)]=this[o(1272)].mvhd[o(469)],c[o(1053)]=this[o(1272)].mvhd[o(1053)],c[o(136)]=null!=this.moov.mvex,c[o(136)]&&this[o(1272)][o(725)].mehd&&(c[o(1014)]=this[o(1272)][o(725)][o(234)][o(1014)]),c[o(701)]=this[o(701)],c.hasIOD=null!=this[o(1272)].iods,c[o(183)]=[],c[o(183)][o(484)](this[o(784)][o(534)]),c.brands=c[o(183)][o(180)](this[o(784)].compatible_brands),c[o(536)]=new Date(u+1e3*this[o(1272)][o(1054)].creation_time),c[o(563)]=new Date(u+1e3*this[o(1272)].mvhd[o(131)]),c[o(729)]=[],c[o(373)]=[],c[o(353)]=[],c[o(814)]=[],c[o(167)]=[],c[o(550)]=[],c.otherTracks=[],e=0;e0?c[o(997)]+=o(929):c.audioTracks&&c.audioTracks[o(341)]>0?c[o(997)]+=o(1322):c[o(997)]+=o(267),e=0;e=r.samples.length)&&(this.onSegment&&this[i(383)](n.id,n[i(257)],n[i(290)][i(326)],r[i(735)],e||r[i(735)]>=r[i(175)][i(341)]),n.segmentStream=null,n!==this[i(1075)][t]))break}}if(null!==this[i(634)])for(t=0;t=r[i(175)].length)&&(a[i(1282)](i(498),"Sending samples on track #"+c.id+" for sample "+r[i(735)]),this[i(634)]&&this.onSamples(c.id,c.user,c[i(175)]),c[i(175)]=[],c!==this[i(389)][t]))break}}}},y.prototype.getBox=function(e){var t=s,r=this[t(246)](e,!0);return r[t(341)]?r[0]:null},y.prototype.getBoxes=function(e,t){var r=s,i=[];return y[r(793)][r(562)](this,e,i,t),i},y[s(793)]=function(e,t,r){var i=s;for(var n in this[i(139)]&&this[i(139)]==e&&t.push(this),this.boxes){if(t[i(341)]&&r)return;y[i(793)][i(562)](this[i(1312)][n],e,t,r)}},y[s(263)][s(415)]=function(e){var t=s,r=this.getTrackById(e);return r?r[t(175)]:void 0},y.prototype[s(631)]=function(e,t){var r=s,i=this[r(847)](e);return this[r(1077)](i,t)},y[s(263)][s(237)]=function(e,t,r){var i=s,n=this[i(847)](e);n[i(953)]||(n[i(953)]=0);for(var a=n.lastValidSample;ae*n[o(1053)]){u=i-1;break}t&&n[o(1266)]&&(c=i)}for(t&&(u=c),e=r.samples[u][o(270)],r[o(735)]=u;r.samples[u][o(1209)]===r[o(175)][u][o(637)]&&r[o(175)][u+1];)u++;return{offset:r[o(175)][u][o(1076)]+r[o(175)][u][o(1209)],time:e/a}},y[s(263)][s(486)]=function(e){var t,r=s;return e[r(175)]?((t=e[r(175)][e[r(175)][r(341)]-1])[r(270)]+t[r(469)])/t[r(1053)]:1/0},y.prototype[s(407)]=function(e,t){var r,i,n,a=s,o=this[a(1272)],c={offset:1/0,time:1/0};if(this.moov){for(n=0;nthis.getTrackDuration(r)||((i=this.seekTrack(e,t,r)).offset-1){u=l;break}switch(u){case"Visual":if(a[t(1150)](t(1085))[t(1091)]("graphicsmode",0)[t(1091)](t(797),[0,0,0]),c[t(1091)](t(933),r[t(933)])[t(1091)](t(194),r[t(194)])[t(1091)](t(885),72<<16)[t(1091)](t(181),72<<16)[t(1091)](t(262),1)[t(1091)](t(698),r.type+t(839)).set(t(212),24),r[t(1030)]){var p=new(d[t(417)]);p.parse(new o(r[t(1030)])),c[t(1117)](p)}else if(r[t(284)]){var m=new d.hvcCBox;m[t(649)](new o(r.hevcDecoderConfigRecord)),c[t(1117)](m)}break;case"Audio":a[t(1150)](t(239))[t(1091)](t(831),r.balance||0),c[t(1091)]("channel_count",r[t(342)]||2)[t(1091)]("samplesize",r[t(913)]||16)[t(1091)](t(1207),r[t(1207)]||65536);break;case t(1167):a[t(1150)](t(433));break;case"Subtitle":if(a[t(1150)]("sthd"),r[t(139)]===t(174))c[t(1091)](t(362),r[t(362)]||t(1252)).set(t(947),r[t(947)]||"")[t(1091)](t(289),r[t(289)]||"");break;case"Metadata":a.add(t(601));break;case t(458):a.add("nmhd");break;default:a.add(t(601))}r[t(684)]&&c.addBox(r.description),r[t(434)]&&r[t(434)].forEach((function(e){c.addBox(e)})),a[t(1150)](t(513)).add("dref")[t(1118)]((new d["url Box"]).set(t(322),1));var _=a[t(1150)]("stbl");return _[t(1150)](t(554))[t(1118)](c),_[t(1150)](t(646))[t(1091)](t(594),[])[t(1091)](t(312),[]),_.add(t(555))[t(1091)](t(798),[])[t(1091)]("samples_per_chunk",[]).set(t(789),[]),_[t(1150)](t(477))[t(1091)](t(140),[]),_[t(1150)](t(1304)).set(t(369),[]),this.moov.mvex.add("trex")[t(1091)](t(1332),r.id)[t(1091)](t(1300),r.default_sample_description_index||1)[t(1091)]("default_sample_duration",r[t(1124)]||0)[t(1091)]("default_sample_size",r[t(974)]||0)[t(1091)](t(940),r[t(940)]||0),this.buildTrakSampleLists(i),r.id}},d[s(166)][s(263)].computeSize=function(e){var t=s,r=e||new c;r[t(233)]=c[t(1044)],this[t(321)](r)},y[s(263)][s(643)]=function(e,t,r){var i=s,n=r||{},a={},o=this.getTrackById(e);if(null!==o){a[i(1099)]=o.samples[i(341)],a.track_id=o.tkhd[i(1332)],a[i(1053)]=o[i(602)][i(741)][i(1053)],a[i(687)]=n[i(789)]?n.sample_description_index-1:0,a[i(684)]=o[i(602)][i(184)][i(957)][i(554)][i(806)][a[i(687)]],a[i(758)]=t,a[i(637)]=t[i(1034)],a[i(1209)]=a[i(637)],a[i(469)]=n.duration||1,a[i(270)]=n[i(270)]||0,a.dts=n.dts||0,a[i(1266)]=n[i(1266)]||!1,a[i(539)]=n[i(539)]||0,a.depends_on=n[i(1200)]||0,a[i(695)]=n[i(695)]||0,a[i(211)]=n.has_redundancy||0,a.degradation_priority=n[i(1153)]||0,a[i(1076)]=0,a[i(224)]=n[i(224)],o[i(175)][i(484)](a),o[i(412)]+=a[i(637)],o.samples_duration+=a[i(469)],void 0===o[i(917)]&&(o.first_dts=n[i(1218)]),this[i(581)]();var c=this[i(983)](a);return this.addBox(c),c[i(293)](),c[i(817)][0].truns[0][i(470)]=c[i(637)]+8,this.add(i(765)).data=new Uint8Array(t),a}},y[s(263)][s(983)]=function(e){var t=s,r=0;r=e[t(1266)]?1<<25:65536;var i=new(d[t(125)]);i.add(t(942)).set(t(1225),this[t(195)]),this[t(195)]++;var n=i[t(1150)](t(1301)),a=this.getTrackById(e[t(1332)]);return n.add(t(356))[t(1091)](t(1332),e.track_id)[t(1091)]("flags",d[t(830)]),n[t(1150)](t(969))[t(1091)](t(208),e[t(1218)]-(a.first_dts||0)),n[t(1150)](t(571))[t(1091)]("flags",d[t(161)]|d[t(583)]|d[t(648)]|d[t(900)]|d.TRUN_FLAGS_CTS_OFFSET)[t(1091)](t(470),0)[t(1091)](t(323),0)[t(1091)](t(133),1).set("sample_duration",[e[t(469)]])[t(1091)](t(1262),[e[t(637)]])[t(1091)]("sample_flags",[r])[t(1091)](t(1023),[e.cts-e.dts]),i},y.prototype[s(209)]=0,y.prototype[s(1204)]=0,y[s(263)].resetTables=function(){var e,t,r,i,n,a,o=s;for(this.initial_duration=this[o(1272)][o(1054)].duration,this[o(1272)][o(1054)][o(469)]=0,e=0;e=2&&(u=n[o][l(462)]+"/0",(c=new h(n[o].grouping_type,0))[l(123)]=!0,!t.sample_groups_info[u]&&(t[l(547)][u]=c))}else for(o=0;o=2&&(u=i[o][l(462)]+"/0",c=new h(i[o][l(462)],0),!e[l(547)][u]&&(e.sample_groups_info[u]=c))},y[s(632)]=function(e,t,r,i){var n,a,o=s;for(n in t[o(709)]=[],i){var c;if(t[o(709)][n]={},t.sample_groups[n][o(462)]=i[n][o(462)],t[o(709)][n][o(1079)]=i[n].grouping_type_parameter,r>=i[n][o(1219)]&&(i[n][o(1219)]<0&&(i[n][o(1219)]=0),i[n].entry_index++,i[n].entry_index<=i[n][o(423)].entries[o(341)]-1&&(i[n][o(1219)]+=i[n][o(423)][o(806)][i[n][o(1020)]][o(133)])),i[n][o(1020)]<=i[n].sbgp[o(806)].length-1?t[o(709)][n][o(982)]=i[n][o(423)][o(806)][i[n][o(1020)]][o(982)]:t[o(709)][n].group_description_index=-1,0!==t[o(709)][n][o(982)])c=i[n][o(165)]?i[n][o(165)]:i[n].description,t[o(709)][n][o(982)]>0?(a=t.sample_groups[n][o(982)]>65535?(t[o(709)][n].group_description_index>>16)-1:t.sample_groups[n].group_description_index-1,c&&a>=0&&(t[o(709)][n][o(684)]=c[o(806)][a])):c&&c.version>=2&&c.default_group_description_index>0&&(t[o(709)][n][o(684)]=c[o(806)][c[o(1273)]-1])}},y[s(857)]=function(e,t,r){var i=s;t&&(e?(t[i(539)]=e.is_leading[r],t[i(1200)]=e[i(937)][r],t[i(695)]=e[i(699)][r],t.has_redundancy=e[i(1028)][r]):(t[i(539)]=0,t[i(1200)]=0,t.is_depended_on=0,t[i(211)]=0))},y[s(263)].buildSampleLists=function(){var e,t,r=s;for(e=0;eb&&(S++,b<0&&(b=0),b+=a[C(594)][S]),t>0?(e[C(175)][t-1][C(469)]=a[C(312)][S],e[C(749)]+=e[C(175)][t-1][C(469)],x.dts=e[C(175)][t-1][C(1218)]+e[C(175)][t-1].duration):x[C(1218)]=0,o?(t>=I&&(w++,I<0&&(I=0),I+=o[C(594)][w]),x.cts=e[C(175)][t][C(1218)]+o[C(747)][w]):x.cts=x.dts,c?(t==c[C(485)][A]-1?(x[C(1266)]=!0,A++):(x[C(1266)]=!1,x[C(1153)]=0),l&&l[C(806)][k][C(1010)]+E==t+1&&(x.subsamples=l[C(806)][k][C(224)],E+=l.entries[k][C(1010)],k++)):x[C(1266)]=!0,y.process_sdtp(e[C(602)][C(184)][C(957)].sdtp,x,x.number),x[C(1153)]=f?f[C(400)][t]:0,l&&l[C(806)][k][C(1010)]+E==t&&(x[C(224)]=l[C(806)][k].subsamples,E+=l[C(806)][k][C(1010)]),(h[C(341)]>0||d.length>0)&&y[C(632)](e,x,t,e.sample_groups_info)}t>0&&(e[C(175)][t-1].duration=Math[C(1057)](e.mdia.mdhd[C(469)]-e[C(175)][t-1][C(1218)],0),e[C(749)]+=e[C(175)][t-1].duration)}},y.prototype[s(651)]=function(){var e,t,r,i,n,a,o,c,u,l,h,f,p,m,_,v=s;if(void 0!==this[v(1272)])for(;this.lastMoofIndex0&&y[v(907)](f,h,h[v(1129)],f[v(602)][v(184)].stbl.sgpds,h.sgpds),t=0;t0?m[v(1218)]=f[v(175)][f[v(175)][v(341)]-2][v(1218)]+f.samples[f.samples[v(341)]-2][v(469)]:(h.tfdt?m[v(1218)]=h[v(969)][v(208)]:m.dts=0,f[v(1123)]=!0),m.cts=m[v(1218)],g[v(322)]&d[v(978)]&&(m[v(270)]=m[v(1218)]+g[v(1023)][r]),_=o,g[v(322)]&d.TRUN_FLAGS_FLAGS?_=g[v(898)][r]:0===r&&g.flags&d[v(1083)]&&(_=g[v(323)]),m[v(1266)]=!(_>>16&1),m[v(539)]=_>>26&3,m[v(1200)]=_>>24&3,m.is_depended_on=_>>22&3,m[v(211)]=_>>20&3,m.degradation_priority=65535&_;var b=!!(h[v(356)][v(322)]&d[v(168)]),S=!!(h[v(356)].flags&d[v(830)]),I=!!(g[v(322)]&d[v(161)]),w=0;w=b?h.tfhd[v(405)]:S?l[v(915)]:0===t?l.start:c,m[v(1076)]=0===t&&0===r?I?w+g[v(470)]:w:c,c=m[v(1076)]+m[v(637)],(h[v(1129)].length>0||h[v(206)][v(341)]>0||f[v(602)].minf[v(957)][v(1129)].length>0||f[v(602)][v(184)].stbl[v(206)][v(341)]>0)&&y.setSampleGroupProperties(f,m,m.number_in_traf,h.sample_groups_info)}}if(h[v(429)]){f[v(404)]=!0;var A=h.first_sample_index;for(t=0;t-1))return null;var u=(r=this.stream[i(1120)][o]).byteLength-(n[i(1076)]+n[i(1209)]-r.fileStart);if(n.size-n[i(1209)]<=u)return a[i(1282)](i(498),i(1119)+t+" data (alreadyRead: "+n[i(1209)]+i(428)+(n[i(1076)]+n[i(1209)]-r.fileStart)+i(1047)+(n[i(637)]-n[i(1209)])+" full size: "+n[i(637)]+")"),c[i(867)](n[i(758)][i(326)],n[i(1209)],r,n.offset+n[i(1209)]-r[i(645)],n[i(637)]-n[i(1209)]),r[i(229)]+=n[i(637)]-n[i(1209)],this.stream.logBufferLevel(),n[i(1209)]=n[i(637)],n;if(0===u)return null;a[i(1282)](i(498),i(1119)+t+i(286)+n[i(1209)]+" offset: "+(n[i(1076)]+n[i(1209)]-r[i(645)])+i(1047)+u+i(1340)+n[i(637)]+")"),c[i(867)](n[i(758)][i(326)],n[i(1209)],r,n[i(1076)]+n[i(1209)]-r[i(645)],u),n[i(1209)]+=u,r[i(229)]+=u,this[i(1090)][i(1293)]()}},y[s(263)][s(891)]=function(e,t){var r=s,i=e[r(175)][t];return i[r(758)]?(this[r(1204)]-=i.size,i.data=null,i[r(684)]=null,delete i[r(1153)],delete i[r(1200)],delete i[r(687)],delete i[r(211)],delete i[r(695)],delete i[r(539)],delete i.is_sync,delete i.moof_number,delete i[r(365)],delete i[r(1053)],delete i[r(270)],delete i[r(1218)],delete i.offset,delete i[r(637)],delete i.track_id,delete i[r(469)],i.alreadyRead=0,i[r(637)]):0},y[s(263)][s(346)]=function(){return this[s(1204)]},y[s(263)][s(317)]=function(){var e=s;const t=this[e(1090)][e(1120)]||[];let r=0;return t[e(677)]((t=>{const i=t[e(1034)];r+=i})),r},y[s(263)][s(987)]=function(){var e,t=s,r="";for(e=0;e0&&(r+=","),r+=this[t(1272)][t(755)][e].mdia[t(184)][t(957)][t(554)][t(806)][0][t(374)]()}return r},y[s(263)][s(574)]=function(e){var t,r=s;if(!this.moov||!this[r(1272)].mvex)return null;for(t=0;t0&&(r[i(493)]=o[i(1230)].protections[o.iinf[i(899)][e][i(1349)]-1]),o[i(1223)].item_infos[e][i(1224)]?r[i(139)]=o[i(1223)][i(899)][e][i(1224)]:r[i(139)]=i(997),r[i(465)]=o[i(1223)].item_infos[e][i(465)],r.content_encoding=o.iinf[i(899)][e][i(1216)];if(o[i(829)])for(e=0;e0&&f[i(991)]-1-1))return null;var l=(t=this.stream.buffers[u])[i(1034)]-(o[i(1076)]+o[i(1209)]-t[i(645)]);if(!(o.length-o.alreadyRead<=l))return a.debug(i(498),i(402)+e+" extent #"+n+" partial data (alreadyRead: "+o[i(1209)]+i(428)+(o[i(1076)]+o.alreadyRead-t[i(645)])+i(1047)+l+i(810)+o[i(341)]+i(603)+r.size+")"),c[i(867)](r[i(758)].buffer,r.alreadyRead,t,o[i(1076)]+o[i(1209)]-t[i(645)],l),o[i(1209)]+=l,r[i(1209)]+=l,t[i(229)]+=l,this[i(1090)].logBufferLevel(),null;a[i(1282)]("ISOFile",i(402)+e+i(1039)+n+i(667)+o[i(1209)]+i(428)+(o.offset+o[i(1209)]-t[i(645)])+i(1047)+(o.length-o[i(1209)])+i(810)+o.length+i(603)+r[i(637)]+")"),c[i(867)](r[i(758)][i(326)],r[i(1209)],t,o[i(1076)]+o[i(1209)]-t[i(645)],o[i(341)]-o[i(1209)]),t[i(229)]+=o.length-o.alreadyRead,this[i(1090)][i(1293)](),r[i(1209)]+=o[i(341)]-o[i(1209)],o.alreadyRead=o[i(341)]}}return r[i(1209)]===r[i(637)]?r:null},y[s(263)][s(264)]=function(e){var t=s,r=this[t(1125)][e];if(r.data){this[t(1102)]-=r.size,r[t(758)]=null,r[t(1209)]=0;for(var i=0;i0?this[n(1272)].traks[e].samples[0][n(469)]:0),t[n(484)](i)}return t},y.prototype[s(690)]=function(){var e=s,t={};return t[e(1272)]=this[e(1272)],this[e(1272)]&&this[e(1272)].traks&&this[e(1272)].traks[e(341)]>1&&(t[e(908)]=this[e(1272)][e(755)][0][e(175)][e(341)],t.moovVideoNum=this[e(1272)][e(755)][1][e(175)][e(341)]),t},d[s(166)].prototype.printHeader=function(e){var t=s;this.size+=8,this[t(637)]>u&&(this[t(637)]+=8),this[t(139)]===t(1022)&&(this[t(637)]+=16),e[t(1182)](e.indent+t(635)+this.size),e.log(e[t(339)]+t(662)+this[t(139)])},d[s(689)].prototype[s(345)]=function(e){var t=s;this[t(637)]+=4,d[t(166)].prototype[t(345)].call(this,e),e[t(1182)](e[t(339)]+t(840)+this.version),e.log(e[t(339)]+"flags:"+this[t(322)])},d[s(166)][s(263)].print=function(e){this[s(345)](e)},d.ContainerBox[s(263)].print=function(e){var t=s;this.printHeader(e);for(var r=0;r>8)),e[t(1182)](e.indent+t(188)+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this[t(669)])},d[s(348)][s(263)][s(889)]=function(e){var t=s;d[t(689)].prototype[t(345)][t(562)](this,e),e[t(1182)](e[t(339)]+t(783)+this[t(843)]),e[t(1182)](e[t(339)]+t(800)+this.modification_time),e[t(1182)](e[t(339)]+"track_id: "+this.track_id),e[t(1182)](e.indent+t(636)+this[t(469)]),e[t(1182)](e[t(339)]+t(1108)+(this[t(335)]>>8)),e[t(1182)](e[t(339)]+t(188)+this[t(379)][t(868)](", ")),e.log(e[t(339)]+t(592)+this.layer),e.log(e.indent+t(686)+this[t(476)]),e.log(e[t(339)]+"width: "+this[t(933)]),e[t(1182)](e[t(339)]+"height: "+this[t(194)])};var g={};g[s(1179)]=function(e,t){var r=s,i=void 0===e||e,n=new y(t);return n[r(230)]=!i,n},s(1329)!==s(822)&&(t[s(1179)]=g[s(1179)])}));function Sa(){var e=["alreadyRead","tref","Found position in existing buffer #","function","nextSeekPosition","lfeon","processItems","content_encoding","mp4aSampleEntry","dts","last_sample_in_run","absolute_duration","Appending new buffer (fileStart: ","stssBox","iinf","item_type","sequence_number","ptl_sublayer_present_mask","pasp","flattenItemInfo","setAllUsedBytes","ipro","printRanges","stri","sample_info_size","d08a4f1810f34a82b6c832d8aba183d3","vvs1","numTemporalLayers","VisualSampleEntry","BoxWriter","initializeSegmentation","stshBox","unpack","code","compositionStartTime","readUint64","_size","target","mfhdBox","max_content_light_level","indexOf","default_KID","media_rate_fraction","nonamespace","horizOffN","getItem","getDurationString","moovStartFound","ChannelMappingFamily","tkhd","int16","DIFF_PRIMITIVE_ARRAY_PROP_NAMES","item_ID","sample_size","leastDecodeToDisplayDelta","pad_unknown","maxBitrate","is_sync","media_time","readCString","mjpg","notice","metx","moov","default_group_description_index","event_duration","mapFloat32Array","step_count","AVCLevelIndication","truns","findDescriptor","updateUsedBytes","a2394f525a9b4f14a2446c427c648df4","debug","avcC","application/xml","rinf","rate: ","schemeURI","default_crypt_byte_block","Version","kindBox","tpay","has_unparsed_data","logBufferLevel","Found ","readFloat32Array","version","num_leading_samples","row_align_size","processIncompleteMdat","default_sample_description_index","traf","Not enough bytes in buffer","parseUUID","stsz","createMediaSampleEntryCtor","59782OkHTKK","getSampleSize","edits","vertOffN","Writing box ","cslg","boxes","1904-01-01T00:00:00Z","99759GoahBY","writeUint64","getUint16","vvi1","vvi1SampleEntry"," stored buffer(s) (","descriptionformat","chunk_run_index",'audio/mp4; codecs="',"component_bit_depth_minus_one","boxEqual","enca","primaryGChromaticity_x","Position ","seekPoints","object","substring","ispe","track_id","Generating initialization segment","profile","ranges","readInt64","readInt16Array","upStream","block_reversed"," full size: ","getHeight","completeness","writeUint32Array","padding_flag","hvc1","tfdtBox","addSubBoxArrays","CUESHEET","protection_index","split","encode","writeUint32","removeUsedSamples","TKHD_FLAG_IN_MOVIE","getOTI","SAMPLE_ENTRY_TYPE_VISUAL","prof","bit_rate_code","ref_to","stszBox","sidxBox","info"," for sample ","float64","Error reading extent index","SAP_delta_time","[row: ","'","stsa","sampleEntryCodes","hdr_size","is_fragment","vSpacing","moofBox","defineProperty","channel_associations","aux_info_type_parameter","u16string","Removing buffer #","modification_time","decode","sample_count","nalu_arrays","sample_number","isFragmented","colour_type","readUint","type","chunk_offsets","MPEG4DescriptorParser","itemToFragmentedTrackFile","component_little_endian","vertical_justification","encu","message_data","No more buffer in memory","URL","createEntityToGroupCtor","dmax","compatible_brands","stz2","PPS","offset_size","length_size_of_sample_num","float32le","getInt16","channel_types","stxtSampleEntry","SubtitleSampleEntry","TRUN_FLAGS_DATA_OFFSET","brst","chan_loc","hasItem","fragment_description","Box","metadataTracks","TFHD_FLAG_BASE_DATA_OFFSET","vttc","codec","createBoxCtor","quat_y","int8","stpp","samples","num_channels","24jQUoUA","item_name","getAudioConfig","concat","vertresolution","matrix_coefficients","brands","minf","readFloat32","writeFooter","crypt_byte_block","matrix: ","createElement","mergeNextBuffer","switch_group","MP4Box","writeInt32Array","height","nextMoofNumber","int16le","sdptext","rash","avc2","getUint32","int32le","segment_duration","media_rate_integer","layer","nb_PPS_nalus","sgpds","getEndFilePositionAfter","baseMediaDecodeTime","lastMoofIndex","1030tyatpe","has_redundancy","depth","avgBitrate","parseFromString","hinf","component_index"," bytes), continuous ranges: ","_byteLength","Adjusting box ","elngBox","avc1","SAMPLE_ENTRY_TYPE_SYSTEM","free","subsamples","primaryRChromaticity_y","primaryBChromaticity_y","op_index","appendBuffer","usedBytes","discardMdatData","RESERVED","getPosition","endianness","mehd","samples_per_chunk","getBuffer","releaseUsedSamples","ext","smhd","BYTES_PER_ELEMENT","PICTURE","greatestDecodeToDisplayDelta","extent_index","TFHD_FLAG_SAMPLE_FLAGS","toString","getBoxes","minor_version","AudioSampleEntry","rate"," of size ","primaryGChromaticity_y","box","bg_color_rgba","held_bits","xml ","No method for reading signed 64 bits values","user","trexs","save","fragment_count","transfer_characteristics","frame_count","prototype","releaseItem","ac-4","matrixCoefficients",'application/mp4; codecs="',"frma","rap ","cts","target_rate_share","SPS","mere","num_entities_in_group","bsid","bxml","urn Box","pos_y","subBoxNames","prol","mdatBox","trpy","pano","hevcDecoderConfigRecord","trgr"," partial data (alreadyRead: ","sgpdBox","version of iloc box not supported","auxiliary_mime_types","segmentStream","setUint32","bits_per_channels","computeSize","default_IV_size","seq_level_idx_0","codecIntializationDataSize","KID","replace","earliest_presentation_time","ASCII","url ","reference_type","readUint32","test","ccst","setInt32","avgRateFlag","parseHeader","ptl_present_flag","createFullBoxCtor","ContainerBox","sample_deltas","item_uri_type","tscl","slid","cstring","getStreamBufferSize","seq_profile","writeUCS2String","senc","write","flags","first_sample_flags","createContainerBoxCtor","movie_duration","buffer","default_sample_info_size","etyp"," (total: ","getChannelCount","stppSampleEntry","ArrayBuffer","readInt16","uint16","volume","Concatenating buffer for box parsing (length: ","moof_offset","referenced_size","indent","pssh","length","channel_count","field_size","box_record","printHeader","getAllocatedSampleDataSize","angle","tkhdBox","APPLICATION","mhm1","starts_with_SAP","hvcC","videoTracks","TrackReferenceTypeBox","track_ids","tfhd","MultiBufferStream","writeInt32","fromCharCodeUint8","setSegmentOptions","nalu_type","namespace","shift","tapt","number_in_traf","reduceBuffer","tfhdBox","vp08","sample_sizes","layer_id","writeCString","DecoderSpecificInfo","audioTracks","getCodec","skip","sbpm","mapInt8Array","mfra","matrix","StreamCount","ChannelMapping","profile_compatibility","onSegment","stop","a1lx","hdlrBox","DecoderConfigDescriptor","general_constraint_indicator","extractedTracks","createSampleEntryCtor","hev1SampleEntry","FULL_BOXES","av1C","adjustUint32","float32","totl","principal_point_y","schi","writeInitializationSegment","priority","getDescriptorName","Getting item #","ftypBox","has_fragment_subsamples","base_data_offset","scif","seek","Opus","revokeObjectURL","ipmas","sampleListBuilt","samples_size","construction_method","num_sublayers","getTrackSamplesInfo","getPrimaryItem","avcCBox","SAMPLE_ENTRY_TYPE_TEXT","idat","dataView","default_isProtected","_byteOffset","sbgp","setNextSeekPositionFromSample","lang","descs","max_display_mastering_luminance"," offset: ","subs","onMoovStart","num_leading_samples_known","documentString","hmhd","description_boxes","general_sub_profile_idc","Trying to create a new buffer of size: ","maxCLL","readString","focal_length_y","rtp ","Audio","writeUint8","assignment_type","item_id","getWidth","interleave_type","seig","stcoBox","msg","compositionEndTime","sync_sample_numbers","payl","displayFlags","seekLists","maximum_bitrate","payloadID","cprt","System","_dynamicSize","4255XPSZxt","trak","grouping_type","vpcC","extract_bits","content_type","int32","num_dep_sub","constantFrameRate","duration","data_offset","hasMoov","readInt method not implemented for size: ","all_ref_pics_intra","associations","string","alternate_group","stco","createFragment","nextParsePosition","trexBox","luminanceMax","mime_format","urn ","push","sample_numbers","getTrackDuration","onSidx","prft","addUsedBytes","j2kH","isFragmentationInitialized","mdhdBox","protection","readInt8Array","Found box of type '","getMetaHandler","checkBuffer","ISOFile","document","sizePosition"," - Length: ","writeUint16","MP4BoxStream","iloc","properties","roll_distance","sbgpBox","absolute_time","level_independently_decodable","drefBox","resetTables","cleanBuffers","dinf","btrt","bufferSizeDB","base_offset_size","pts","seq_tier_0","traf_number","vvcN","vp09SampleEntry","reference_ID","parseDataAndRewind","LITTLE_ENDIAN","vvc1","attribute_list","esds","parsingMdat","padbits","max_ref_per_pic","readySent","TFHD_FLAG_SAMPLE_SIZE","Cannot seek: moov not received!","major_brand","writeInt16Array","created","TKHD_FLAG_IN_PREVIEW","659828DdfcsI","is_leading","rtpmap_string","sampling_type","CoLL","sampleProcessingStarted","<","pdin","eqiv","sample_groups_info","scheme_type","uint8","hintTracks","TrackGroupTypeBox","sent","to_item_ID","stsd","stsc","SAP_type","lhe1","image_width","readUint16","getText","extension_type","call","modified","Needs an array buffer","vertOffD","SAMPLE_ENTRY_TYPE_METADATA"," --\x3e ","parseOneBox","durationFlag","length_size","trun","schm","_dataView","getTrexById","display_primaries","presentation_time_delta","mp4a","udta","isEos","setInt8","processSamples","j2ki","TRUN_FLAGS_DURATION","kinds","stream_read_2_bytes","stereo_scheme","entity_groups","writeHeader","SingleItemTypeReferenceBoxLarge","readFloat64","uint32le","layer: ","url Box","sample_counts","position","extent_offset","sync","operation_point_count","parseRemainingDescriptors","colourPrimaries","nmhd","mdia"," full item size: ","used","avss","avgFrameRate","max_picture_height","(empty)","tyco","PADDING","float64be","Buffer must have a fileStart property","focal_length_x","emsgBox","tmin","min_spatial_segmentation_idc","value","nalu","bit_depth_chroma_minus8","createUUIDBox","ctts","emsg","compositionToDTSShift","OutputGain","uint32be","SampleGroupEntry","getInt8","hdlr","download","channel_indexes","getTrackSample","setSampleGroupProperties","single_view_allowed","onSamples","size:","duration: ","size","getEndPosition","MetadataSampleEntry"," with new size ","trefBox","pow","addSample","tags","fileStart","stts","drep","TRUN_FLAGS_SIZE","parse","fr-FR","updateSampleLists","track_ID","general_profile_compatibility","writeString","bsmod","und","378KNOiEM","unsetSegmentOptions","getTime","item_count","TFHD_FLAG_SAMPLE_DUR","type:","stsh","num_tile_rows_minus_one","saio","block_little_endian"," data (alreadyRead: ","bad_pixel_column","next_track_id","Error accessing position in the MultiBufferStream","range_size","time","kid","vmhdBox","ster","buildTrakSampleLists","forEach","pmax","writeInt16","prdi","timescale: ","ols_idx","parseOneDescriptor","description","fieldCount","alternate_group: ","description_index","mdcv","FullBox","getPerformanceInfo","min_display_mastering_luminance","nb_samples","lengthSizeMinusOne","mapInt32Array","is_depended_on","constant_IV_size","discardable","compressorname","sample_is_depended_on","dOps","isProgressive","high_bitdepth","mvhdBox","boxCodes","UUIDBoxes","mdats","sample_rate","num_total_samples","sample_groups","horizOffD","isSubtitle","VORBIS_COMMENT","SAMPLE_ENTRY_TYPE_SUBTITLE","dac3","ref_track_id","metadata","tag","createObjectURL","AVCProfileIndication"," of size: ","avc4SampleEntry","bitDepth","bytessent","rICC","mvex","flipArrayEndianness",'"; profiles="',"monochrome","tracks","6d1d9b0542d544e680e2141daff757b2","bad_pixels","component_count","chunk_index","dependsOn_ES_ID","nextSample","mehdBox","meco","altr","writeUint24","kind","mdhd","stsg","streamType","ES_Descriptor","hvc1SampleEntry","general_tier_flag","sample_offsets",""","samples_duration","mapUint8Array","extent_length","num_output_samples","Repositioning parser at buffer position: ","white_point","traks","strd","createSampleGroupCtor","data","isAudio","TFHD_FLAG_DUR_EMPTY","mha2","length_size_of_trun_num","floor","1172184xXeQbX","mdat","slice","num_bad_rows","readInt32Array","fiel","iods","u16stringbe","readInt8","CONTAINER_BOXES","media_duration","isMetadata","moof_number","end","presentation_time","pitm","itemId","No method for reading signed 24 bits values","colour_primaries","creation_time: ","ftyp","description_length","extended_language","dvh1","default_constant_IV","sample_description_index","configOBUs","onReady","moofs","_sweep","writeStruct","numMetadataBlocks","elng","opcolor","first_chunk","iaug","modification_time: ","colorSpace","getInt32","block_pad_lsb","av01SampleEntry","pixi","entries","horizontal_justification","float64le","addTrack"," full extent size: ","handler","stscBox","initial_presentation_delay_present","subtitleTracks","initialize","shadowed_sample_numbers","trafs","Not enough bytes left in the parent box to parse a new box","Text","SingleItemTypeReferenceBox","general_level_idc","undefined","sample_duration","arrayToNative","iref","acmod","isVideo","avs3","grpl","TFHD_FLAG_DEFAULT_BASE_IS_MOOF","balance","parseLanguage","bad_columns","rapAlignement","iprp","mvif","TKHD_FLAG_ENABLED","hev1"," Compressor","version:","aux_subtype","apply","creation_time","first_offset","initialized","SAMPLE_ENTRY_TYPE_HINT","getTrackById","cts_shift","level","' and size ","readUint8","Descriptor","audio","roll","min","1VnmUdU","process_sdtp","mha1","general_constraint_info","buildSampleLists","getLength","aux_info_type","SmDm","num_held_bits","bufferSize","subSequenceIdentifier","memcpy","join"," v=","parseFooter","cmpd","oti","setFloat32","avg_frame_rate","readUint8Array","parseHex16","layer_size","moovBox","principal_point_x","boxEqualFields","general_profile_space","lastBoxStartPosition","isHint","enof","horizresolution","sdp ","nclx","nb_SPS_nalus","print","num_bad_cols","releaseSample","SEEKTABLE","sdtp","item_protection_index","dav1","quat_x","leva","sample_flags","item_infos","TRUN_FLAGS_FLAGS","length_size_of_traf_num","OCR_ES_ID","axis","ptl_multilayer_enabled_flag","cslgBox","Allocating item #","initSampleGroups","moovAudioNum","edts","configurationVersion","bit_depth_luma_minus8","ipco","samplesize","SAMPLE_ENTRY_TYPE_AUDIO","start","isProtected","first_dts","saiz","writeInt8","writeInt8Array","seekTrack"," f=","base_offset","infe","parseSample","data_format","unsetExtractionOptions","style_record",'video/mp4; codecs="',"constant_IV","ipma","enct","width","stsdBox","image_height","scheme_uri","sample_depends_on","DataStream","setExtractionOptions","default_sample_flags","default_AlgorithmID","mfhd","ptl_num_sub_profiles","readUint24","chromaSubsampling","co64","schema_location","PreSkip","clef","auxC","scnm","trex","lastValidSample","fscod","Error reading base offset size","languageString","stbl","541341SiOxyJ","TFHD_FLAG_SAMPLE_DESC","props","iso4","Allocating sample #","group_id","getInfo","mapInt16Array","mapUint16Array","writeUint16Array","quat_z","tfdt","uncv","Log","&","a5d40b30e81411ddba2f0800200c9a66","default_sample_size","hvcCBox","mett","track_width","TRUN_FLAGS_CTS_OFFSET","vp09","BASIC_BOXES","_realloc","group_description_index","createSingleSampleMoof","codecIntializationData","index_size","full_range_flag","getCodecs","default_constant_IV_size","skip_byte_block","sidxSent","property_index","bytes","createTrackGroupCtor","data_offset_position","msrc","wbbr","mime","dobr","cleanApertureWidthD","ssix","chroma_format_idc","extents","fobr","temporalIdNested","failurePosition","intra_pred_used","entry_count","ICC_profile","splice","sample_delta","dataview","dimm",">","fragment_duration","strk","alst","available_bitrate","Exporting on track #","BoxParser","entry_index","mapFloat64Array","uuid","sample_composition_time_offset","SLConfigDescriptor","DataStream.save: Can't create object URL.","parallelismType","trunBox","sample_has_redundancy","byteOffset","avcDecoderConfigRecord","destroy","esd","primaryBChromaticity_x","byteLength","pos_x","num_bytes_constraint_info","meta","stss"," extent #","href","Track created with MP4Box.js","_buffer","ERR_NOT_ENOUGH_DATA","BIG_ENDIAN","findPosition","], ["," read size: ","bit_depth_minus8","track_group_id","sttsBox","SampleEntry","reserved_1","timescale","mvhd","dynamicSize","writeFloat32","max","smhdBox","dfLa","system_id","styp","sublayer_level_idc","avc3","moof","payt","STREAMINFO","itemListBuilt","bad_pixel_row","clli","_trimAlloc","Per_Sample_IV_Size","processIncompleteBox","lsel","avgBitRate","fragmentedTracks","offset","getSample","1912155SlhnOU","grouping_type_parameter","writeFloat64","charCodeAt","tele","TRUN_FLAGS_FIRST_FLAG","writeUint8Array","vmhd","onError","encv","vvcC","setUint8","stream","set","stream_read_1_bytes","correction_applied","mskC","location","default_length","parseFullHeader","subsegment_duration","number","aux_type","sample_offset","itemsDataSize","source","restoreParsePosition","getSampleRate","Adjusting data_offset with new value ","readUint16Array","volume: ","findEndContiguousBuf","sub_track_id","readAnyInt","from_item_ID","tsyn","decimalToHex","luminanceMin","text","addBox","addEntry","Getting sample #","buffers","language","bad_rows","first_traf_merged","default_sample_duration","items","co64Box","general_profile_idc","movie_timescale","sbgps","click","entity_ids","references","moovStartSent","setInt16","component_format"," at position ","setAttribute","saveParsePosition","name","stvi","elst","tfra","padb","dependency","videoFullRangeFlag","ac-3","cmin","num_ind_sub","component_types","add","insertBuffer","hasIncompleteMdat","degradation_priority","num_bad_pixels","writeType","video","scheme_id_uri","ind_subs","vide","chroma_subsampling_y","stdp","trep","Found 'mdat' end in buffered data","encm","dvhe","sthd","Hint","layerNumber","primaryRChromaticity_x","parseConfig","readInt32","UUIDs","data_reference_index","_self","component_align_size","trun_number","ec-3","readUint32Array","createFile","sgpd","OutputChannelCount","log","txtC","bufferIndex","sidx","uncC","nump","colr","flush","initial_delay","createEncryptedSampleEntryCtor","accurateStatisticsFlag","chroma_sample_position","graphicsmode","resources","nbSamples","init","Descriptor ","maxFALL","depends_on","getUint8","fromCharCode","DIFF_BOXES_PROP_NAMES","samplesDataSize","sinf","encs","samplerate","levels"];return(Sa=function(){return e})()}function Ia(e,t){var r=Sa();return(Ia=function(e,t){return r[e-=120]})(e,t)}function wa(e,t){const r=Aa();return(wa=function(e,t){return r[e-=364]})(e,t)}function Aa(){const e=["function","parse","every","map","instantiate","catch","TAG_NAME","Memory","init","2673720DSGfyN","debugLog","7VPIcrH","instance","Module","25149cOEYZa","debugWarn","length","memory","reverse","byteLength","not support wasm","1083584CqTboV","object","stack overflow","slice","1739178pKTwGD","wasm not supported","exports","14187430oDPCwk","14dRRmKZ","40830nvQdxW","player","destroy","459118KcaGfs","124UErwYZ","reduce"];return(Aa=function(){return e})()}function ka(){const e=["240473eSNkmr","95136TFOvGV","constructor","reduce","729000lvrXwq","47512hVYJCL","9420760rRPySm","length","648yFsOGI","substr","toString","padStart","2FAcYHn","byteLength","49KcdtjS","12991451wihkHa","25skuCcf","error","637557BUUYXN","set"];return(ka=function(){return e})()}function Ea(e,t){const r=ka();return(Ea=function(e,t){return r[e-=256]})(e,t)}function Ca(){const e=Ea;for(var t=arguments[e(268)],r=new Array(t),i=0;i{const i=e,s=new n((0|t[i(274)])+(0|r.byteLength));return s[i(260)](t,0),s.set(r,0|t[i(274)]),s}),new n)}ba[ga(971)],ba[ga(503)],ba[ga(938)],ba[ga(357)],ba[ga(141)],ba[ga(1019)],ba.XMLSubtitlein4Parser,ba.Textin4Parser,ba.ISOFile,ba[ga(1179)],function(e,t){const r=wa,i=e();for(;;)try{if(261746===-parseInt(r(370))/1+-parseInt(r(366))/2*(-parseInt(r(387))/3)+-parseInt(r(371))/4*(parseInt(r(367))/5)+-parseInt(r(382))/6+-parseInt(r(384))/7*(-parseInt(r(394))/8)+-parseInt(r(398))/9+parseInt(r(365))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Aa),function(e,t){const r=Ea,i=e();for(;;)try{if(955377===-parseInt(r(261))/1*(parseInt(r(273))/2)+-parseInt(r(259))/3+-parseInt(r(266))/4*(parseInt(r(257))/5)+parseInt(r(265))/6*(parseInt(r(275))/7)+parseInt(r(262))/8*(parseInt(r(269))/9)+parseInt(r(267))/10+-parseInt(r(256))/11)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(ka),function(e,t){const r=Ga,i=e();for(;;)try{if(883901===parseInt(r(218))/1*(parseInt(r(249))/2)+-parseInt(r(231))/3*(parseInt(r(237))/4)+-parseInt(r(246))/5+parseInt(r(244))/6+-parseInt(r(240))/7+-parseInt(r(239))/8*(parseInt(r(219))/9)+parseInt(r(226))/10*(parseInt(r(238))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Wa);const xa=16,Ba=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Ta=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Da(e){const t=Ga,r=[];for(let i=0,n=e.length;i{const r=t;return 1===(e=e.toString(16))[r(243)]?"0"+e:e}))[t(220)]("")}function Ua(e){const t=Ga,r=[];for(let i=0,n=e[t(243)];i>>6),r[t(225)](128|63&n);else if(n<=55295||n>=57344&&n<=65535)r[t(225)](224|n>>>12),r.push(128|n>>>6&63),r[t(225)](128|63&n);else{if(!(n>=65536&&n<=1114111))throw r[t(225)](n),new Error("input is not supported");i++,r[t(225)](240|n>>>18&28),r.push(128|n>>>12&63),r[t(225)](128|n>>>6&63),r[t(225)](128|63&n)}}return r}function Fa(e){const t=Ga,r=[];for(let i=0,n=e[t(243)];i=240&&e[i]<=247?(r[t(225)](String[t(228)](((7&e[i])<<18)+((63&e[i+1])<<12)+((63&e[i+2])<<6)+(63&e[i+3]))),i+=3):e[i]>=224&&e[i]<=239?(r[t(225)](String[t(228)](((15&e[i])<<12)+((63&e[i+1])<<6)+(63&e[i+2]))),i+=2):e[i]>=192&&e[i]<=223?(r[t(225)](String[t(228)](((31&e[i])<<6)+(63&e[i+1]))),i++):r.push(String[t(228)](e[i]));return r[t(220)]("")}function Pa(e,t){const r=31&t;return e<>>32-r}function La(e){return(255&Ba[e>>>24&255])<<24|(255&Ba[e>>>16&255])<<16|(255&Ba[e>>>8&255])<<8|255&Ba[255&e]}function Ra(e){return e^Pa(e,2)^Pa(e,10)^Pa(e,18)^Pa(e,24)}function Na(e){return e^Pa(e,13)^Pa(e,23)}function Oa(e,t,r){const i=new Array(4),n=new Array(4);for(let t=0;t<4;t++)n[0]=255&e[4*t],n[1]=255&e[4*t+1],n[2]=255&e[4*t+2],n[3]=255&e[4*t+3],i[t]=n[0]<<24|n[1]<<16|n[2]<<8|n[3];for(let e,t=0;t<32;t+=4)e=i[1]^i[2]^i[3]^r[t+0],i[0]^=Ra(La(e)),e=i[2]^i[3]^i[0]^r[t+1],i[1]^=Ra(La(e)),e=i[3]^i[0]^i[1]^r[t+2],i[2]^=Ra(La(e)),e=i[0]^i[1]^i[2]^r[t+3],i[3]^=Ra(La(e));for(let e=0;e<16;e+=4)t[e]=i[3-e/4]>>>24&255,t[e+1]=i[3-e/4]>>>16&255,t[e+2]=i[3-e/4]>>>8&255,t[e+3]=255&i[3-e/4]}function za(e,t,r){const i=new Array(4),n=new Array(4);for(let t=0;t<4;t++)n[0]=255&e[0+4*t],n[1]=255&e[1+4*t],n[2]=255&e[2+4*t],n[3]=255&e[3+4*t],i[t]=n[0]<<24|n[1]<<16|n[2]<<8|n[3];i[0]^=2746333894,i[1]^=1453994832,i[2]^=1736282519,i[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=i[1]^i[2]^i[3]^Ta[r+0],t[r+0]=i[0]^=Na(La(e)),e=i[2]^i[3]^i[0]^Ta[r+1],t[r+1]=i[1]^=Na(La(e)),e=i[3]^i[0]^i[1]^Ta[r+2],t[r+2]=i[2]^=Na(La(e)),e=i[0]^i[1]^i[2]^Ta[r+3],t[r+3]=i[3]^=Na(La(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function Ha(e,t,r){const i=Ga;let{padding:n=i(241),mode:s,iv:a=[],output:o=i(245)}=arguments[i(243)]>3&&void 0!==arguments[3]?arguments[3]:{};if(s===i(236)&&(typeof a===i(245)&&(a=Da(a)),16!==a[i(243)]))throw new Error(i(235));if(typeof t===i(245)&&(t=Da(t)),16!==t[i(243)])throw new Error(i(233));if(e=typeof e===i(245)?0!==r?Ua(e):Da(e):[...e],("pkcs#5"===n||n===i(241))&&0!==r){const t=xa-e.length%xa;for(let r=0;r=xa;){const t=e.slice(d,d+16),n=new Array(16);if(s===i(236))for(let e=0;e2&&void 0!==arguments[2]&&arguments[2],n=arguments[r(243)]>3&&void 0!==arguments[3]&&arguments[3];const s=e[r(242)];let a=new Uint8Array(e[r(230)](0,5)),o=5;for(;os){const t=new Uint8Array(a[r(243)]+e[r(243)]-o);t[r(229)](a,0),t[r(229)](e[r(230)](o),a.length),a=t;break}let l=e[o+4],h=!1,d=2;if(i?(n&&(d=3),l=l>>>1&63,h=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][r(217)](l)):(l&=31,h=1===l||5===l),h){const i=Ha(e[r(230)](o+4+d,o+4+u),t,0,{padding:r(247),output:r(222)});let n=i[i[r(243)]-1];if(n>0&&n<16){let e=!0;for(let t=1;t<=n;t++)if(i[i[r(243)]-t]!==n){e=!1;break}e&&i[r(232)](i[r(243)]-n,n)}const s=new Uint8Array(d);s[r(229)](e[r(230)](o+4,o+4+d),0);const c=wt(Ca(s,new Uint8Array(i))),l=new Uint8Array(a[r(243)]+c[r(243)]);l[r(229)](a,0),l[r(229)](c,a[r(243)]),a=l}else{const t=e.slice(o+4,o+4+u),i=new Uint8Array(a[r(243)]+4+t.length);i[r(229)](a,0),i[r(229)](c,a[r(243)]),i[r(229)](t,a.length+4),a=i}o=o+4+u}return a}const qa=Ya;function Ka(){const e=["ctx","once","3434850eotoOm","1410fzUkmq","1864sxVPxE","off","3bRWJmM","211402AyoWel","6920kjCtFL","push","emit","keys","5761WxAosC","length","2097LlvvcY","1625612FGaCjt","forEach","2225010TvnEQt"];return(Ka=function(){return e})()}function Ya(e,t){const r=Ka();return(Ya=function(e,t){return r[e-=180]})(e,t)}!function(e,t){const r=Ya,i=e();for(;;)try{if(300534===parseInt(r(190))/1+-parseInt(r(187))/2*(parseInt(r(189))/3)+-parseInt(r(180))/4+parseInt(r(182))/5+parseInt(r(186))/6*(parseInt(r(195))/7)+-parseInt(r(191))/8*(-parseInt(r(197))/9)+-parseInt(r(185))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Ka);class Ja{on(e,t,r){const i=Ya,n=this.e||(this.e={});return(n[e]||(n[e]=[]))[i(192)]({fn:t,ctx:r}),this}[qa(184)](e,t,r){const i=this;function n(){const s=Ya;i[s(188)](e,n);for(var a=arguments[s(196)],o=new Array(a),c=0;c1?i-1:0),s=1;s{delete i[e]})),void delete this.e;const n=i[e],s=[];if(n&&t)for(let e=0,i=n[r(196)];e=2&&!this[r(140)];)if(255==this[r(124)][this[r(145)]]){if(!(!1&this.tempBuffer[this[r(145)]+1])){this[r(125)]=this[r(124)][this[r(145)]+1],this[r(147)]=Qa[r(143)],this[r(138)]=this[r(145)],this[r(145)]+=2,e=!0;break}this[r(145)]++}else this[r(145)]++;if(e)continue;break}if(this[r(147)]==Qa.findFirstStartCode){let e=!1;for(;this[r(124)].length-this.parsedOffset>=2&&!this[r(140)];)if(255==this[r(124)][this[r(145)]]){if(this[r(124)][this[r(145)]+1]==this[r(125)]){this[r(147)]=Qa.findSecondStartCode,this[r(133)]=this[r(145)],this[r(145)]+=2,e=!0;break}this[r(145)]++}else this[r(145)]++;if(e)continue;break}if(this.state==Qa.findSecondStartCode){let e=this[r(124)][r(137)](this[r(138)],this[r(133)]);this.emit(r(127),e,t),this[r(124)]=this[r(124)][r(137)](this.secondStartCodeOffset),this[r(138)]=0,this[r(145)]=2,this[r(147)]=Qa[r(143)]}}}}function to(e,t){const r=ro();return(to=function(e,t){return r[e-=103]})(e,t)}function ro(){const e=["72tNrXFi","set","3070580iUHNyc","byteLength","3046744UBGlil","376478ZJSboS","11axsZnz","24dcPSja","length","2875070wHXcll","1964727GFdnMc","slice","4aNHHts","2916672oXlZGc","85582sogOjO"];return(ro=function(){return e})()}function io(e,t,r){const i=to;for(let n=2;n3&&void 0!==arguments[3]&&arguments[3];const s=e[i(107)];let a=5;for(;as)break;let c=e[a+4],u=!1;if(n?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(c)):(c&=31,u=1===c||5===c),u){const n=io(e[i(115)](a+4,a+4+o),t,r);e.set(n,a+4)}a=a+4+o}return e}function ao(e,t,r){const i=to;if(e[i(107)]<=30)return e;const n=io(e[i(115)](30),t,r);return e[i(105)](n,30),e}function oo(e,t){var r=uo();return(oo=function(e,t){return r[e-=265]})(e,t)}function co(){for(var e=oo,t=arguments[e(266)],r=new Array(t),i=0;ie+t.byteLength),0));let s=0;return r[e(268)]((t=>{var r=e;n[r(273)](t,s),s+=t[r(265)]})),n}function uo(){var e=["13014bXqvlN","byteLength","length","72iKjiWj","forEach","15hwiGGQ","3085236qQpUOI","2554408mUimEP","12yysKRC","set","5322790VdWyQS","1961360cJipGN","413dWJxCW","filter","reduce","380416hQytMx"];return(uo=function(){return e})()}!function(e,t){const r=to,i=e();for(;;)try{if(607079===-parseInt(r(116))/1*(parseInt(r(109))/2)+parseInt(r(117))/3+parseInt(r(108))/4+-parseInt(r(113))/5+-parseInt(r(104))/6*(parseInt(r(103))/7)+parseInt(r(111))/8*(parseInt(r(114))/9)+-parseInt(r(106))/10*(parseInt(r(110))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(ro),function(e,t){for(var r=oo,i=e();;)try{if(269113===parseInt(r(269))/1*(-parseInt(r(267))/2)+-parseInt(r(272))/3*(parseInt(r(279))/4)+parseInt(r(275))/5+-parseInt(r(280))/6*(-parseInt(r(276))/7)+parseInt(r(271))/8+parseInt(r(270))/9+-parseInt(r(274))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(uo);const lo=ho;function ho(e,t){const r=po();return(ho=function(e,t){return r[e-=324]})(e,t)}!function(e,t){const r=ho,i=e();for(;;)try{if(216244===parseInt(r(325))/1*(-parseInt(r(334))/2)+parseInt(r(343))/3+parseInt(r(339))/4+-parseInt(r(333))/5+parseInt(r(344))/6+-parseInt(r(338))/7+-parseInt(r(329))/8*(-parseInt(r(341))/9))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(po);class fo{constructor(e){const t=ho;this[t(326)]=[],this.proxy=this.proxy.bind(this),this[t(330)]=e}[lo(328)](e,t,r){const i=lo;let n=arguments[i(337)]>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array[i(324)](t))return t[i(327)]((t=>this[i(328)](e,t,r,n)));e[i(342)](t,r,n);const s=()=>{const s=i;Nt(e[s(340)])&&e[s(340)](t,r,n)};return this[i(326)][i(331)](s),s}[lo(336)](){const e=lo;this[e(330)][e(332)](e(335),"destroy"),this[e(326)][e(345)]((e=>e())),this.destroys=[]}}function po(){const e=["destroys","map","proxy","3064ydccIG","master","push","debugLog","803035Zmoatk","238TRABSj","Events","destroy","length","1239644sQTiMt","1376292eJPicf","removeEventListener","90cFTncm","addEventListener","864684LUqYhr","983424WOgIiE","forEach","isArray","2068PyvlgI"];return(po=function(){return e})()}function mo(){const e=["trun","isDependedOn","mdat","dinf","hvc1","isLeading","321544wrycNi","1296567nthjML","trex","1305180CfWcya","presentWidth","box","ftyp","isNonSync","slice","hasOwnProperty","charCodeAt","3qLsRga","STSZ","moof","codecWidth","videoType","set","sequenceNumber","sdtp","stbl","config","smhd","mp4a","byteLength","dependsOn","moov","minf","avcc","VMHD","flags","trak","codecHeight","init","type","STCO","generateInitSegment","1604472udzXpA","STSD_PREFIX","112rOvYyc","hasRedundancy","mvex","audio","concat","tkhd","tfdt","types","avc","size","prototype","length","esds","HDLR_VIDEO","presentHeight","duration","constants","tfhd",".mp3","stsd","FTYP","mp3","4TrEhAD","37877UaBvqH","10104sANQKh","audioSampleRate","STSC","stsz","mdia","4026360UIJZuE","dref","hvcC","mfhd","STTS","SMHD","stco","traf","mdhd","hdlr","channelCount","timescale","avc1"];return(mo=function(){return e})()}const _o=vo;function vo(e,t){const r=mo();return(vo=function(e,t){return r[e-=226]})(e,t)}!function(e,t){const r=vo,i=e();for(;;)try{if(158097===-parseInt(r(254))/1*(-parseInt(r(252))/2)+-parseInt(r(289))/3*(-parseInt(r(278))/4)+parseInt(r(281))/5+parseInt(r(228))/6+parseInt(r(253))/7*(parseInt(r(230))/8)+-parseInt(r(279))/9+-parseInt(r(259))/10)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(mo);class yo{static init(){const e=vo;yo[e(237)]={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(let t in yo.types)yo[e(237)][e(287)](t)&&(yo[e(237)][t]=[t[e(288)](0),t.charCodeAt(1),t[e(288)](2),t[e(288)](3)]);let t=yo[e(246)]={};t.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),t[e(229)]=new Uint8Array([0,0,0,0,0,0,0,1]),t.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),t[e(256)]=t[e(226)]=t[e(263)],t[e(290)]=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t[e(243)]=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),t.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),t.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),t[e(264)]=new Uint8Array([0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static[_o(283)](e){const t=_o;let r=8,i=null,n=Array[t(240)][t(286)].call(arguments,1),s=n.length;for(let e=0;e>>24&255,i[1]=r>>>16&255,i[2]=r>>>8&255,i[3]=255&r,i[t(294)](e,4);let a=8;for(let e=0;e>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static[_o(308)](e){const t=_o;return yo[t(283)](yo[t(237)].trak,yo.tkhd(e),yo[t(258)](e))}static[_o(235)](e){const t=_o;let r=e.id,i=e[t(245)],n=e[t(282)],s=e[t(244)];return yo[t(283)](yo[t(237)].tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>>8&255,255&n,0,0,s>>>8&255,255&s,0,0]))}static[_o(258)](e){const t=_o;return yo[t(283)](yo[t(237)][t(258)],yo[t(267)](e),yo[t(268)](e),yo.minf(e))}static[_o(267)](e){const t=_o;let r=e[t(270)],i=e[t(245)];return yo[t(283)](yo[t(237)].mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static[_o(268)](e){const t=_o;let r=null;return r="audio"===e[t(311)]?yo[t(246)].HDLR_AUDIO:yo[t(246)][t(243)],yo[t(283)](yo[t(237)][t(268)],r)}static[_o(304)](e){const t=_o;let r=null;return r=e[t(311)]===t(233)?yo[t(283)](yo[t(237)][t(299)],yo[t(246)][t(264)]):yo[t(283)](yo[t(237)].vmhd,yo[t(246)][t(306)]),yo[t(283)](yo[t(237)][t(304)],r,yo[t(275)](),yo[t(297)](e))}static[_o(275)](){const e=_o;return yo[e(283)](yo[e(237)][e(275)],yo[e(283)](yo.types[e(260)],yo[e(246)].DREF))}static[_o(297)](e){const t=_o;return yo[t(283)](yo[t(237)][t(297)],yo[t(249)](e),yo[t(283)](yo.types.stts,yo[t(246)][t(263)]),yo[t(283)](yo.types.stsc,yo[t(246)].STSC),yo[t(283)](yo[t(237)][t(257)],yo.constants[t(290)]),yo[t(283)](yo.types[t(265)],yo.constants[t(226)]))}static[_o(249)](e){const t=_o;return e[t(311)]===t(233)?e.audioType===t(251)?yo[t(283)](yo[t(237)].stsd,yo.constants[t(229)],yo[t(251)](e)):yo[t(283)](yo[t(237)][t(249)],yo[t(246)].STSD_PREFIX,yo.mp4a(e)):e[t(293)]===t(238)?yo[t(283)](yo[t(237)][t(249)],yo.constants.STSD_PREFIX,yo.avc1(e)):yo[t(283)](yo.types.stsd,yo[t(246)][t(229)],yo[t(276)](e))}static[_o(251)](e){const t=_o;let r=e.channelCount,i=e[t(255)],n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return yo[t(283)](yo.types[t(248)],n)}static[_o(300)](e){const t=_o;let r=e[t(269)],i=e[t(255)],n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return yo.box(yo[t(237)][t(300)],n,yo[t(242)](e))}static[_o(242)](e){const t=_o;let r=e[t(298)]||[],i=r[t(241)],n=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5][t(234)]([i]).concat(r)[t(234)]([6,1,2]));return yo[t(283)](yo.types[t(242)],n)}static[_o(271)](e){const t=_o;let r=e.avcc;const i=e.codecWidth,n=e[t(309)];let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return yo.box(yo[t(237)][t(271)],s,yo[t(283)](yo[t(237)].avcC,r))}static[_o(276)](e){const t=_o;let r=e[t(305)];const i=e[t(292)],n=e.codecHeight;let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,n>>>8&255,255&n,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return yo.box(yo[t(237)][t(276)],s,yo[t(283)](yo[t(237)][t(261)],r))}static mvex(e){return yo[_o(283)](yo.types.mvex,yo.trex(e))}static[_o(280)](e){const t=_o;let r=e.id,i=new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return yo.box(yo[t(237)].trex,i)}static[_o(291)](e,t){const r=_o;return yo[r(283)](yo[r(237)][r(291)],yo.mfhd(e[r(295)]),yo[r(266)](e,t))}static[_o(262)](e){const t=_o;let r=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return yo.box(yo[t(237)][t(262)],r)}static[_o(266)](e,t){const r=_o;let i=e.id,n=yo[r(283)](yo.types[r(247)],new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),s=yo[r(283)](yo[r(237)][r(236)],new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),a=yo.sdtp(e),o=yo[r(272)](e,a[r(301)]+16+16+8+16+8+8);return yo[r(283)](yo[r(237)][r(266)],n,s,o,a)}static[_o(296)](e){const t=_o;let r=new Uint8Array(5),i=e[t(307)];return r[4]=i[t(277)]<<6|i[t(302)]<<4|i[t(273)]<<2|i[t(231)],yo[t(283)](yo.types.sdtp,r)}static trun(e,t){const r=_o;let i=new Uint8Array(28);t+=36,i[r(294)]([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let n=e.duration,s=e[r(239)],a=e[r(307)],o=e.cts;return i[r(294)]([n>>>24&255,n>>>16&255,n>>>8&255,255&n,s>>>24&255,s>>>16&255,s>>>8&255,255&s,a[r(277)]<<2|a[r(302)],a.isDependedOn<<6|a[r(231)]<<4|a[r(285)],0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o],12),yo[r(283)](yo[r(237)][r(272)],i)}static mdat(e){const t=_o;return yo.box(yo[t(237)][t(274)],e)}}yo[_o(310)]();var go=Io;function bo(){var e=["exports","createCommonjsModule","75736sNtoBN","92187hovwuP","241496RkCToY","3952185vnkuBu","unwrapExports","154dAIqjE","default","31395903flhDyh","226UWEsqS","defineProperty","3509qWAnTw","15rGkklx","5419722ybfAGa","1030iqGwDr","__esModule"];return(bo=function(){return e})()}!function(e,t){for(var r=Io,i=e();;)try{if(720333===parseInt(r(297))/1*(-parseInt(r(295))/2)+parseInt(r(298))/3*(parseInt(r(304))/4)+parseInt(r(307))/5+-parseInt(r(299))/6+-parseInt(r(309))/7*(parseInt(r(306))/8)+parseInt(r(305))/9*(-parseInt(r(300))/10)+parseInt(r(311))/11)break;i.push(i.shift())}catch(e){i.push(i.shift())}}(bo);var So=Ze[go(303)]((function(e){var t=go;e[t(302)]=function(e,t,r){return t in e?Object[Io(296)](e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports[t(301)]=!0,e.exports[t(310)]=e[t(302)]}));function Io(e,t){var r=bo();return(Io=function(e,t){return r[e-=295]})(e,t)}function wo(){const e=["1834344ZIvZyl","2033224uXbzfV","113419aqqsKF","set","error","132QsDRTs","51436brSfBf","6lWDgVo","6216371xiMvBo","Invalid MP3 packet, header missing!","69344CpQUpF","Invalid MP3 packet, first byte != 0xFF ","1163920fUQjlT","data","channel_count","buffer","length","sample_rate","1370kifrTw","9SGWUuS"];return(wo=function(){return e})()}Ze[go(308)](So),function(e,t){const r=Do,i=e();for(;;)try{if(461759===parseInt(r(301))/1+parseInt(r(299))/2+-parseInt(r(304))/3*(parseInt(r(285))/4)+-parseInt(r(291))/5+-parseInt(r(286))/6*(parseInt(r(287))/7)+parseInt(r(300))/8*(parseInt(r(298))/9)+parseInt(r(297))/10*(parseInt(r(289))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(wo);const Ao=[44100,48e3,32e3,0],ko=[22050,24e3,16e3,0],Eo=[11025,12e3,8e3,0],Co=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],xo=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],Bo=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1];function To(e){const t=Do;if(e[t(295)]<4)return void console.error(t(288));let r=new Uint8Array(e[t(294)]),i=null;if(255!==r[0])return void console[t(303)](t(290));let n=r[1]>>>3&3,s=(6&r[1])>>1,a=(240&r[2])>>>4,o=(12&r[2])>>>2,c=3!==(r[3]>>>6&3)?2:1,u=0,l=0;switch(n){case 0:u=Eo[o];break;case 2:u=ko[o];break;case 3:u=Ao[o]}switch(s){case 1:a=e[s]&&t=6?(n=5,r=new Array(4),o=s-3):(n=2,r=new Array(2),o=s):-1!==c[t(288)]("android")?(n=2,r=new Array(2),o=s):(n=5,o=s,r=new Array(4),s>=6?o=s-3:1===a&&(n=2,r=new Array(2),o=s)),r[0]=n<<3,r[0]|=(15&s)>>>1,r[1]=(15&s)<<7,r[1]|=(15&a)<<3,5===n&&(r[1]|=(15&o)>>>1,r[2]=(1&o)<<7,r[2]|=8,r[3]=0),this[t(264)]=r,this.sampling_rate=No[s],this[t(303)]=s,this[t(270)]=a,this[t(279)]=n,this.original_object_type=i,this.codec_mimetype=t(260)+n,this[t(290)]=t(260)+i}}function Vo(e,t){const r=Wo();return(Vo=function(e,t){return r[e-=458]})(e,t)}const Go=Vo;function Wo(){const e=["byteLength","9450231yaBygp","readUInt","bitLength","getBits","length","skipEG","1117670LdkBqD","data","readEG","skipBits","5666800xQVvmV","readBits","2jyWuiM","index","51dnOexZ","708216YOGsbV","231DMYxuM","readUShort","bitsAvailable","readUByte","8TXhtCu","656137jXDYiw","readUEG","skipUEG","skipLZ","189804ElAdXH","readBoolean","7854291FegFEw"];return(Wo=function(){return e})()}!function(e,t){const r=Vo,i=e();for(;;)try{if(703919===parseInt(r(464))/1*(parseInt(r(484))/2)+-parseInt(r(486))/3*(parseInt(r(468))/4)+-parseInt(r(482))/5+parseInt(r(458))/6+parseInt(r(472))/7*(-parseInt(r(463))/8)+parseInt(r(470))/9+-parseInt(r(478))/10*(-parseInt(r(459))/11))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(Wo);class jo{constructor(e){const t=Vo;this[t(479)]=e,this.index=0,this[t(474)]=8*e[t(471)]}get[Go(461)](){const e=Go;return this.bitLength-this[e(485)]}[Go(481)](e){const t=Go;if(this[t(461)]1&&void 0!==arguments[1])||arguments[1];return this[t(475)](e,this[t(485)],r)}getBits(e,t){const r=Go;let i=!(arguments[r(476)]>2&&void 0!==arguments[2])||arguments[2];if(this[r(461)]>>n,a=8-n;if(a>=e)return i&&(this[r(485)]+=e),s>>a-e;{i&&(this[r(485)]+=a);const n=e-a;return s<>>1:-1*(e>>>1)}[Go(469)](){return 1===this[Go(483)](1)}[Go(462)](){const e=Go;let t=arguments[e(476)]>0&&void 0!==arguments[0]?arguments[0]:1;return this[e(483)](8*t)}[Go(460)](){return this[Go(483)](16)}[Go(473)](){return this.readBits(32)}}function qo(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}!function(e,t){for(var r=tc,i=e();;)try{if(490912===-parseInt(r(497))/1+parseInt(r(500))/2*(-parseInt(r(508))/3)+-parseInt(r(498))/4*(-parseInt(r(515))/5)+-parseInt(r(509))/6*(parseInt(r(494))/7)+parseInt(r(513))/8*(parseInt(r(512))/9)+parseInt(r(503))/10*(-parseInt(r(504))/11)+parseInt(r(506))/12)break;i.push(i.shift())}catch(e){i.push(i.shift())}}($o);const Ko=new Array(214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72),Yo=new Array(2746333894,1453994832,1736282519,2993693404),Jo=new Array(462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257);function Xo(e,t,r,i,n){var s=tc,a=n;a=t+n>e[s(507)]&&i+n<=r[s(507)]?e[s(507)]-t:i+n>r[s(507)]&&t+n<=e[s(507)]?r.length-i:t+n<=e.length&&i+n<=r[s(507)]?n:r[s(507)]>24&255,e>>16&255,e>>8&255,255&e)}function Qo(e,t){var r=tc;return t+3>>19)^(i<<23|i>>>9)}function ic(e,t){var r=new Array(36);r[0]=Qo(t,0),r[1]=Qo(t,4),r[2]=Qo(t,8),r[3]=Qo(t,12);for(var i=0;i<32;i++)r[i+4]=r[i]^nc(r[i+1]^r[i+2]^r[i+3]^e[i]);var n=new Array(4);for(i=35;i>=32;i--)n[35-i]=r[i];return function(e){for(var t=tc,r=new Array(4*e.length),i=0;i>>30)^(i<<10|i>>>22)^(i<<18|i>>>14)^(i<<24|i>>>8)}function sc(e,t,r){var i=tc;if(null==e||null==e||e[i(507)]%16!=0)return console[i(505)](i(517)),null;if(null==r||null==r||r.length<=0)return console.log(i(501)),null;if(null==t||null==t||t[i(507)]%16!=0)return console[i(505)](i(495)),null;for(var n=ec(e),s=Math[i(516)](r[i(507)]/16),a=new Array(r.length),o=t.slice(),c=0;c3&&void 0!==arguments[3]&&arguments[3],s=arguments[i(507)]>4&&void 0!==arguments[4]&&arguments[4];t=new Uint8Array(t),r=new Uint8Array(r);const a=e[i(496)];let o=5;for(;oa)break;let u=e[o+4],l=!1,h=2;if(n?(s&&(h=3),u=u>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][i(510)](u)):(u&=31,l=1===u||5===u),l){const n=sc(t,r,e[i(514)](o+4+h,o+4+c));e[i(511)](n,o+4+h)}o=o+4+c}return e}const oc=uc;function cc(){const e=["parsedOffset","size","onopen"," or cryptoIV.length is ","dropBuffer$2","ceil","wasmWidthOrHeightChange","isDropping","onError","calcPlaybackStreamFps","TAG","setCodecVideo: SIMD H264 decode video width is too large, width is ","PACKET_TYPE_FRAMESX","clearBuffer"," and prev ts is ","isEmitInfo","demuxM7s","pushBuffer video ts is ","fetch done","isAAC","mediaSourceDecoderConfigurationError","websocketStringMsg","handlePESSlice","\n diff is ","mediaSource is end","pushBuffer(), pushLatestDelay is ","frameRate","byteLength","flvBufferData","mediaSourceFull","_clearAudioSourceBufferCheckTimeout","fetchStream, WebsocketStream on error and requestAbort is true so return","_doRemoveRanges","binaryType","h265","handleOffscreenCanvasWebglContextLost, stencil is false","pts","pat_","decodeAudio\n local dts is < 0 , ts is "," next data type is ","sequenceHeader","AC3: BitStream Mode changed from ","streamVideoType","writableStream pipeTo() and e is","isPlayer","smpte2038_pids","slices","parseSCTE35","audio_track_","decodeVideo","localDts","_hasPendingSegments"," and\n ts is ","duration","shift","getBuildTime","parseChunks","isXorCrypto","Webcodecs Video Decoder initSize","isPlaybackOnlyDecodeIFrame","parseSMPTE2038MetadataPayload","loop() isPushDropping is true and bufferList length is ","dispatch","width is ","options","clearPlaybackCacheLoop"," null","hasAudio","playback and playbackIsCacheBeforeDecodeForFpsRender is true","getSourceBufferUpdating","playbackForwardMaxRateDecodeIFrame","mseAutoCleanupSourceBuffer","decodeVideo and payload is video sequence header so drop this frame","original_object_type","G711U","isPause","AC3: Low Frequency Effects Channel On changed from ","isPlayback","audio_init_segment_dispatched_"," and has iIframe and next decoder.dropBuffer$2()","decodeVideo first frame is not iFrame","presentHeight","parsePES"," but isSocketError is true , so return","306354LctBeG","dispatchAudioMediaSegment","parseLOASAACPayload","lastBuf"," ,new bufferList is ","decoder","abort catch","sps","endOfStream()","audioCode","setCodecAudio: init audio codec, codeId is ","aborted","audioDecode",'fetchNext().then() and value "',"mediaSourceBufferError","payload","Synchronous KLV Metadata: pid=","_decodeAudioConfigurationRecord audio codec is not support , codecId is "," and ignore","playbackCacheLoop","decodeVideo\n local dts is < 0 , ts is ","mseDecoderUseWorker","setCodecAudio: mp3 is not support for old version","avcc","generateInitSegment","isStateOpen",'video/mp2t; codecs="',"setCodecAudio","_hasPendingRemoveRanges","findSei","indexOf","sort","isDestroyed","playbackConfig","loas_aac","Parsed first PAT: ","stream_type","last_pcr_","parseTimedID3MetadataPayload","MP3","handleVideoH265NaluList list size is ","playbackCacheLoop fragDuration is ","videoSEI","renderYUV","preventDefault","pmt_","doDecode","demuxM7s() type is video and arrayBuffer length is ","suffixSei","worker fmp4Demuxer","handleVideoH265NaluList","\n decodeAudio dts is less than(or equal) prev dts ,\n dts is ","openWebglAlignment","socket is not open and state is","handleOffscreenCanvasWebglContextLost and next try to create webgl","isRecording","getStreamBufferLength","yuvData, isVideoFirstIFrame is false and return","len","offset","startTimestamp","sourceClose","status","mseDecoder.mediaSourceBufferError is true","loop() do not decode and delay is ","videoNalu","expected: ","mediaSourceAppendBufferError","updateConfig","parse"," and mseDecoder.isAvc === null is ","present_size","audio_last_sample_pts_","fetchStream","locked","originalCodec","streamStats","cacheTrack","decodeVideo and payload is too small , payload length is ","updateend","isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio","_preDoDecode","ms and diffFps is ","file_position","createImageBitmap","mseError","aacSequenceHeader","onOffscreenCanvasWebglContextRestored"," and return"," ,delay is ","iframeIntervalTs","string","writableStream abort() and e is ","decodeAudio, decoder is destroyed and return"," and preTsDuration is ","audioTracks","read","Generated first AudioSpecificConfig for mimeType: ","cacheAudioTrack","ec-3","mp4","body","streamFps","avcC","AC3: Channel Mode changed from ","parsePAT: table_id ","loop() dropBuffer is dropping and isIFrame ","then","demuxTs","webglcontextrestored"," > ",",\n and emit change event","kH265","current_program_","3272436eFoZgG","current_pmt_pid_","fetchStatus","length",", preTs is ","useOffscreen","Generated first HEVCDecoderConfigurationRecord for mimeType: ","init and forHardDecode is ",", height: ","handleSectionSlice",", diff is ","LOG_NAME","_checkTsIsMaxDiff","getNaluDts","parseH264Payload","mpeg4","wcsDecodeAudio","prevTs","videoCodec","streamVideoFps","needClear","kLOASAAC","isDropSameTimestampGop","kSliceIDR_N_LP"," and isVideoSqeHeader is ","Audio: Audio Codecs changed from ","_doCleanUpSourceBuffer","websocketOpenTimeout","cryptoIV","playVod","writableStream abort() and e.name is AbortError so return","pushBuffer","protocol","timeInit set false , cacheTrack = {} now dts is ","simdH264DecodeVideoWidthIsTooLarge"," , message is ","mp4Box","hvcC","vps","code is ","playbackCacheBeforeDecodeForFpsRender, calc streamVideoFps is ","mseDecoder.mediaSourceAppendBufferError is true","level_string","onReady()","network_pid","parseOpusPayload"," ,\n and diff is ","networkDelay","minf","SMPTE 2038 Metadata: pid=","cts","expected_length"," and isIFrame is ","key","resetAllDelay","ts is ","Jb pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng","emitPESSlices","details","map"," and ok is ",", height is ","webglcontextlost","has_audio_","_decodeVideo payload bytes is 0 and return","loop() common dumex delay is -1 ,data.ts is","clear","close","video_track_"," cacheTrack dts is ","mseAutoCleanupMaxBackwardDuration","probe","concat","VideoDecoder configure error","match","mediaSource","BIG_ENDIAN","videoInfo","appendBuffer","handleVideoH264Frames","isSm4CryptoH265V2","from","AAC: SamplingFrequencyIndex changed from "," and maxDiff is "," , payload is ","isSendSeqHeader"," and diff is ","demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is ","socket is null","delete","buffering","version_number","Malformed PES: PES_packet_length < 3 + PES_header_data_length","getHandle","fileStart","kSliceSPS","sarRatio","_clearAudioNoDataCheckTimeout","fetch().catch() and e is ",", isAacCodecPacket is true","firstStartCodeOffset -14 is","offscreenCanvasCtx","mseSourceBufferError","kADTSAAC","isAudioInitInfo","bit_stream_mode"," and\n ts is ","ms, PES pts: ","calcNetworkDelay now dts:","firstRenderTime","isXorCrypto cryptoKey.length is ","cryptoKey","playbackTF","kSliceSEI","iFrame","level","parseVPS","channel_config","updatePlaybackIsPause","streamEnd","isWorkerFetch","opus","min","getNotDroppingDelayTs","sendWebsocketMessage","dropping"," isIFrame is ","mseDecodeAudio","stsd","audioSourceNoDataCheckTimeout","pid_stream_type","demuxNakedFlow","parsePMT: table_id ","s and status is ","init",", pts=",", options.ts is ","state","abort success"," to ","close() and audioDecoder.clear error: ","width: ","stopStreamRateAndStatsInterval","catch","onmessage","Generated first AVCDecoderConfigurationRecord for mimeType: ","removeEventListener","findFirstStartCode",", not 0x47","$video","error","fetch().catch() and abortController.signal.aborted is true so return","stencil","parseG711Payload","sampleRate"," and height is ","kSliceVPS"," and is Trial Version[试用版本]","isSm4Crypto","G711A","isAllIframeInBufferList","addSourceBuffer","prevPayloadBufferSize","avc","videoDecode","hasPendingEos","timeInit","sequenceNumber"," and tempDelay is ","websocket error","duration_","fetchStream, WebsocketStream socket close and code is ","ID3 ","nakedFlowFps","signal","mediaSource audio sourceBuffer error","elementary_stream_priority_indicator"," and emit replay",",\n and resetAllDelay","isNakedFlow","timescale_","getNearestTimestampMilliseconds","isPlayUseMSEAndDecoderInWorker","appendAudioBuffer() player is destroyed","pendingAudioSegments","isIFrame","sourceBuffer","workerFetch","FT_KEY","toString","profile_string","audioCodec","moof","subarray","end","audioPayload","set","abort","extractNALu() buffer error","samples","delay","setCodecVideo: hasInitVideoCodec is false, codecId is ","isStateEnded","removeSourceBuffer","PACKET_TYPE_FRAMES","handleVideoH264NaluList list size is ","playbackFps","videoTrackId","isFlv","width","kH264","audio_object_type","offscreenCanvasGL","_decodeVideo","notConnect","isAvc","addEventListener","kMetadata","Asynchronous KLV Metadata: pid=","fetchNext().then() and done is true","cryptoPayload","playbackRate","2107688KZiKwW","firstAudioTime is ","audioSampleRate","workerEnd","audioTrackId","_getSeqHeader","prevAudioDts"," > timestamp is ","videoMimeType",",\n firstRenderTime is ","VideoDecoder","doPlaybackCacheLoop() and isPlaybackOnlyDecodeIFrame is true and isIFrame is true, and ts is","initAudio","fetchNext().catch() and e is ","_remainingPacketData","correctSamplePts","_doRemoveRanges() sourceBuffer error","dispatchVideoInitSegment","getDelayNotUpdateDelay","options:"," and isNotPushDropping is ","detectAudioMetadataChange","onOffscreenCanvasWebglContextLost","dts","sm4CryptoKey","getState","drawImage",", and set streamFps is 25","DataStream","handleVideoH264Nalu","parseAC3Payload","timed_id3_pids","websocketError","flags","codec_mimetype","isHevc","20212ymCOzP","JbPro Worker Version is ","aac_last_incomplete_data_",", bufferListLength is ","handlePESSlice: packet_start_code_prefix should be 1 but with value ","audioSourceBufferCheckTimeout","g711u"," ,\n and now ts is ","streamSuccess","sampling_rate","type","codedHeight","secondStartCodeOffset","profile","mseAutoCleanupMinBackwardDuration","startPlaybackCacheLoop","onMediaSourceSourceOpen() audioSourceBuffer is null and next init","_opt","synchronous_klv_pids","channel_mode","onerror","isPlayUseMSE","media_info_","pcmData ts "," and bufferlist is "," and has iFrame, set dropping is true","kSlicePPS","hasInitVideoCodec","appendAudioBuffer","_doAppendSegments","audioAACSequenceHeader","ac-3","MP3: Channel count changed from ",", next dts: ","setCodec","sourceOpen","prevAudioTs","ms and return -1","has_video_","_initAudioSourceBuffer","value","websocket user aborted","parseVideo264Header","AAC: Unknown pts","mediaSourceH265NotSupport","audioSampleRateIndex","player","fetchNext().catch() and abortController.signal.aborted is true so return","mseSourceBufferError mseDecoder.audioSourceBuffer","endOfStream() has pending eos","offscreenCanvas","_doAppendSegments() sourceBuffer is null and wait init and return","MP3: AudioObjectType changed from "," and next dropBuffer","decodeVideo: video width or height is changed, and return","code","readBits","getAudioSourceBufferUpdating","yuvData, transferToImageBitmap error is","buffered","updatePlaybackIsPause, isPause is ","codec","handleNALu","_initSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()","TAG_NAME","now","close() and videoDecoder.clear error: ",",\n and mseCorrectTimeDuration is ","onMediaSourceSourceOpen() sourceBuffer is null and next init","isFirstDispatch and tsPacketSize = ","appendBuffer() player is destroyed",'" string so return',"payload_unit_start_indicator","decodeVideo is max diff , ts is ",",nalu type is ","emitError","chromaFormat","sync_byte = ","headers","isM7sCrypto","getTime","2660MuAgoZ","bitDepth","_initAudioSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()","isKeyframe","decode","open","calcNetworkDelay","log","getDelay","websocket Open Timeout form ","demuxFlv() type is ","height","isInitSegmentDispatched",", diff time is ",", need clear is ","hasInit","mseCorrectTimeDuration","stopId","getAudioBufferLength"," and firstRenderTime is ","_initSourceBuffer","hev","playbackUpdatePlaybackRate","websocket","_decodeConfigurationRecord error","video_metadata_changed_"," and delay is ","fetchStream, url is ","kAC3","AAC: Detected pts overlapped, ","AudioDecoder","pushLatestDelay","mseDecoder.sourceBuffer.appendBuffer()","parsePES: packet_start_code_prefix should be 1 but with value "," and mseCorrectTimeDuration is ","stringify","worker MediaSource","isVideoInited","arraybuffer","videoType","fetchErrorWorker","delay is ","has not init video codec","hasIframeInBufferList","videoSourceBuffer updateend and hasPendingEos is true, next endOfStream()","54aIhcln","VideoDecoder error: ","socketStatus","endOfStream","adts_aac","streamVbps","nakedFlowH265DemuxUseNew","undefined","abortSourceBuffer() abort sourceBuffer","decodeVideo has not init , isIframe is ","decode data type is ",", dts=","getUint8","handleVideoNalu","onSamples() trackId error","data","push","decodeVideo dts is equal to prev dts and payload size is equal to prev payload size so drop this frame","parsePPS","fps","ms and return ","delta","isFirefox","name","setExtractionOptions","websocketOpen","codecHeight","h264 naluList.length === 0","useWCS","detectVideoMetadataChange","_decodeEnhancedH265Video","handleVideoFrames",", bufferList is ","getIncompleteData","webgl","websocketFirstMessage","debug","prevTimestamp","extractNALu","decodeAudio first frame is not iFrame","readNextAACFrame","program_number","ended","pendingSegments","createFile","closed","decodeDiffTimestamp","sampling_index","kSliceIDR_W_RADL","common_pids","ALAW",", new height is ","fetchStream, WebsocketStream socket close and requestAbort is true so return","extractNALu$3","idle","reduce","decodeVideo: simd decode error, and return","isM7sCrypto cryptoKey.length is ","streamAudioFps","useSIMD","kEAC3","isRecordTypeFlv","cancel","audio","validatedFailed, please contact the author to get the correct license","calcIframeIntervalTimestamp"," and isVideoAndNextAudio is ","isCryptoAudio","Unsupported stream. type: "," and isDestroyed is true, so return","stbl","units","setCodecVideo: videoDecoder or videoDecoder.setCodec is null"," and notDroppingDelayTs is ","cryptoPayloadAudio","playAudio","parseAsynchronousKLVMetadataPayload","MediaSource","audioMeta","complete","414LPWfNh",",local diff is ","fetchStream, WebsocketStream socket error","seqHeader",'video/mp4; codecs="',"checkStreamEnd","chroma_format"," vs start is ","mediaSourceAudioG711NotSupport","mpeg","channel_count","readyState","getDelay() and preDelayTimestamp is ","write","pes_slice_queues_","AbortError","mediaSource is not attached to video or mediaSource is closed","firstStartCodeOffset","fetchNext().catch() and e.name is AbortError so return","firstTimestamp","mseDecoder.audioSourceBuffer.appendBuffer()"," and isIframe is ","isWasmMp4","buffer","readNextNaluPayload","debugLevel","decodeVideo: hasInitVideoCodec is false, codecId is ","yuvData, decoder is destroyed and return","sarDen","fetchStream, WebsocketStream socket close abnormally and code is ","asynchronous_klv_pids","dispatchAudioInitSegment","events","audioSourceBuffer"," and packetType is ","4442050EedivG","frame_rate","videoPayload","demuxFlv","isCacheBeforeDecodeForFpsRender","getReader","pcr_pid","HEAPU32","parseSection","sample_rate","config","isPushDropping","parsePMT","_isEnhancedH265Header","meta","_decodeConfigurationRecord","_initSourceBuffer() appendBuffer mseDecoder.mediaSource.addSourceBuffer()","_resetInIt"," and emit error and next abort()","eac3","getTrackById","AAC","decodeVideo() and decoder is destroyed","hasAudioInit","AAC: AudioObjectType changed from ","decodeNext","nakedFlowDemuxUseNew","kMPEG1Audio","_needCleanupSourceBuffer","ac3","initVideo","syncOffset",",\n and emit change event","preDelayTimestamp","fetch","removeUsedSamples","isTs","H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment","isPlaybackPause","video","VANC","forEach"," ts is ","kPESPrivateData","abortSourceBuffer","onSamples","kSliceNonIDR","isPlayVod","codecWidth","prefixSei","isDecodeFirstIIframe","mdat","getUint32","eventListenList","chroma_format_string",", start dts is ","HEAPF32","demuxMpeg4","cmd","mediaSourceAddSourceBufferError","removeSourceBuffer() audioSourceBuffer","sarNum","_stopCheckWsOpenTimeout",", syncOffset = ","kSCTE35","prevDts",", old height is ","tsPacketSize","HEAPU8","webglObj","readUEG","setInterval()","streamVideoType is null","mseHandle","decodeAudio","getContextAttributes","codedWidth","audio_metadata_","fetch().catch() and e.name is AbortError so return","close() and socket.readyState is ","mseDecoder.mediaSourceAppendBufferFull is true"," and prev time is ","playType","isfms","useMSE"," and prev dts is ","_decodeAudioConfigurationRecord","videoBufferDelay","low_frequency_effects_channel_on","render","audioSequenceNumber","kSliceCRA_NUT","scte_35_pids","readUByte","random_access_indicator","findSecondStartCode","pushBuffer video and isIFrame is "," and prevTs is ","removeSourceBuffer() sourceBuffer error","listenMp4Box",", dts is ","ref_frames","isPlaybackCacheBeforeDecodeForFpsRender","onclose","AC3: Sampling Frequency changed from ","mseWorkerAddSourceBufferError","handleVideoH265Nalu","assign","abortSourceBuffer() abort audioSourceBuffer","tempStream","sendWebsocketMessage, message is","isTrusted","g711a"," create uint8Array error :","message","audioBufferSize","first_parse_","url","h264","mseDecoder.mediaSourceAddSourceBufferError is true","mediaSourceTsIsMaxDiff","timescale","getContext","endOfStream() error","isEmitSEI","mp3Demuxer","discontinuity_indicator","debugError"," is not H264 or H265","sampling_freq_index","parseH265Payload","scriptData","_initPmt","refFrames","pendingUnits",", and ts is ","dispatchVideoMediaSegment","checkFirstIFrame","bit_depth","transferToImageBitmap","debugLog","video_init_segment_dispatched_","onReady","video_metadata_","warn","fromCharCode"," ant auto wasm decode",'" is string so return',"mp3","worker","stop","_decodeVideo now time is ","sync_offset","aacADTSHeader","channelCount","\n and replay","\n isVideoSqeHeader is "," and,\n options.ts is ","demuxFmp4",",\n and prevPayloadBufferSize is ","pushBuffer,\n preTimestamp is ","sampling_frequency","total_length","videoCode","videoMeta","dropBuffer$2() iFrameIndex is ","mediaSourceAppendBufferFull","decodeAudio() and decoder is destroyed","pendingRemoveRanges","hasVideo","handleVideoH265Frames","closeEnd","debugWarn","request abort and run res.body.cancel()"," and opt is"," and bufferList length is ","mseCorrectAudioTimeDuration"," more than ","bit_stream_identification","mimeType","aac","remove","PACKET_TYPE_SEQ_START","pes_private_data_pids","audioNalu","getVideoBufferLength","Opus: SamplingFrequencyIndex changed from ","isStateClosed","kMPEG2Audio","nearest_pts","mseSourceBufferError mseDecoder.sourceBuffer","destroy","playbackIsPause"," less than (or equal) preTs is ","handleAddNaluStartCode","VideoDecoder configure has not init , isIframe is ","floor","dispatchPESPrivateDataDescriptor","setCodecAudio: hasInitAudioCodec is false, codecId is ","\n decodeVideo: video width or height is changed,\n old width is ","videoSequenceHeader","currentTime","types","sendWsMessage","start","section_slice_queues_","mdia","kSliceIDR","pps","recordType","hasIncompleteData","isFmp4","_doRemoveRanges() audioSourceBuffer error","parseEAC3Payload"," and payload size is ","debugUuid","program_pmt_pid","audioMimeType","hvcc","decodeVideo and webcodecs configure is","opt","_doAppendSegments() audioSourceBuffer is null and need init audio source buffer","fetchStream, WebsocketStream on error and isDestroyed is true, so return","updating","calcNetworkDelay, dts is ","streamDts","object_type","20sSfwWB","onmessage:","mediaSource video sourceBuffer error","loas_previous_frame","streamType"," and nalUnitSize is ","writableStream","firstAudioTime","isMpeg4","is_sync","videoBuffer","handleVideoH264NaluList","supportMSEDecodeHevc","11739PnVglD","parsePESPrivateDataPayload"," ,\n and diff is ","pid","clearSlices","isWidthOrHeightChanged","pendingAudioRemoveRanges","removeSourceBuffer() audioSourceBuffer error","abs","slice","codec_size","emitSectionSlices","refSampleDuration","lastBuffer","demuxFlv() type is audio and payload.byteLength is "," and update next dts increase 5ms","parseSynchronousKLVMetadataPayload","KLVA"];return(cc=function(){return e})()}function uc(e,t){const r=cc();return(uc=function(e,t){return r[e-=210]})(e,t)}function lc(e,t){var r=hc();return(lc=function(e,t){return r[e-=146]})(e,t)}function hc(){var e=["61835wVNqlO","40MoDQxr","1930SlZdqz","4252848hWItPH","86534YIxqns","119604BgfIfD","1991EMyyrx","22023xDjjyl","21TMUeyu","104EMRill","184573HoewHP","77174ZULyYx"];return(hc=function(){return e})()}!function(e,t){const r=uc,i=e();for(;;)try{if(902362===-parseInt(r(862))/1+-parseInt(r(1078))/2+parseInt(r(964))/3+parseInt(r(381))/4*(parseInt(r(849))/5)+-parseInt(r(587))/6*(-parseInt(r(462))/7)+-parseInt(r(345))/8+parseInt(r(507))/9*(parseInt(r(622))/10))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(cc),Date[oc(446)]||(Date[oc(446)]=function(){const e=oc;return(new Date)[e(461)]()}),console.log(oc(382)+Ut+":"+Mt+oc(280)),function(e,t){for(var r=lc,i=e();;)try{if(424108===-parseInt(r(148))/1+parseInt(r(149))/2*(parseInt(r(146))/3)+parseInt(r(151))/4*(-parseInt(r(150))/5)+-parseInt(r(153))/6+-parseInt(r(154))/7*(parseInt(r(147))/8)+parseInt(r(157))/9*(-parseInt(r(152))/10)+-parseInt(r(156))/11*(-parseInt(r(155))/12))break;i.push(i.shift())}catch(e){i.push(i.shift())}}(hc),function(){const e=oc;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[e(1081)]>2&&void 0!==arguments[2]&&arguments[2],n=arguments[e(1081)]>3&&void 0!==arguments[3]&&arguments[3],s=[],a=[],o=null,c=null,u=null,l=null,h=null,d=null,f=!1,p=null,m=null,_=!1,v=!1,y=!!qt(i),g=0,b=0,S=!1,I=null,w=null,A=null,k=[],E=null,C=null,x=0,B=0,T=null,D=null,M=0,U=0,F=null,P=!1,L=!1,R=!1,N=null,O=null,z=!1,H=!0,V=0,G=0,W=null,j=null,q=null,K=()=>{const t=e,r=Wt();return{debug:r.debug,debugLevel:r[t(612)],debugUuid:r[t(837)],useOffscreen:r[t(1083)],useWCS:r[t(535)],useMSE:r[t(706)],videoBuffer:r[t(859)],videoBufferDelay:r.videoBufferDelay,openWebglAlignment:r[t(1016)],playType:r.playType,hasAudio:r[t(947)],hasVideo:r[t(791)],playbackRate:1,playVodRate:1,playbackFps:r.playbackConfig[t(526)],playbackDefaultFps:r[t(329)],playbackAutoCalcFps:r[t(997)].autoCalcFps,playbackForwardMaxRateDecodeIFrame:r[t(950)],playbackIsCacheBeforeDecodeForFpsRender:r[t(997)][t(626)],sampleRate:0,networkDelay:r[t(1125)],visibility:!0,useSIMD:r[t(566)],isRecording:!1,recordType:r.recordType,isNakedFlow:r.isNakedFlow,checkFirstIFrame:r[t(759)],audioBufferSize:1024,isM7sCrypto:r.isM7sCrypto,isCryptoAudio:r[t(574)],cryptoKey:r[t(234)],cryptoIV:r.cryptoIV,isSm4Crypto:r[t(281)],isSm4CryptoH265V2:r[t(1158)],sm4CryptoKey:r[t(369)],isXorCrypto:r[t(937)],isHls265:!1,isFlv:r.isFlv,isFmp4:r.isFmp4,isMpeg4:r[t(857)],isTs:r.isTs,isEmitSEI:r[t(746)],isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isFirefox:!1,isDropSameTimestampGop:r[t(1100)],mseDecodeAudio:r[t(250)],wcsDecodeAudio:r[t(1094)],nakedFlowH265DemuxUseNew:r[t(513)],mseDecoderUseWorker:r.mseDecoderUseWorker,mseAutoCleanupSourceBuffer:r[t(951)],mseAutoCleanupMaxBackwardDuration:r[t(1148)],mseAutoCleanupMinBackwardDuration:r.mseAutoCleanupMinBackwardDuration,mseCorrectTimeDuration:r[t(478)],mseCorrectAudioTimeDuration:r[t(798)],nakedFlowDemuxUseNew:r[t(648)],nakedFlowFps:r[t(296)],supportMSEDecodeHevc:!1,checkStreamEnd:!0,websocketOpenTimeout:r[t(1105)]}};"VideoEncoder"in self&&(o={TAG_NAME:"worker wcsDecoder",hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:null,init(){const t=e;o[t(969)]=new VideoDecoder({output:function(e){const r=t;if(Nt(e[r(1048)]))e[r(1048)]().then((t=>{const i=r;o[i(224)].drawImage(t,0,0,e[i(698)],e[i(392)]);let n=o[i(431)][i(761)]();postMessage({cmd:ye[i(711)],buffer:n,delay:se.delay,ts:0},[n]),Ht(e)}));else{o.offscreenCanvasCtx[r(371)](e,0,0,e[r(698)],e[r(392)]);let t=o[r(431)][r(761)]();postMessage({cmd:ye[r(711)],buffer:t,delay:se[r(323)],ts:0},[t]),Ht(e)}},error:function(e){const r=t;se[r(749)](r(771),r(508),e,e[r(312)]())}}),se[t(762)](o[t(445)],t(257))},destroy(){const t=e;o.reset(),o[t(969)]&&o[t(969)].state!==t(552)&&(o.decoder[t(1145)](),o[t(969)]=null),se[t(762)](o.TAG_NAME,t(813))},decode:function(t,r,i){const n=e,s=t[0]>>4==1;if(o.hasInit){const e=new EncodedVideoChunk({data:t[n(871)](5),timestamp:r,type:s?Me[n(1131)]:Me[n(528)]});try{o[n(969)][n(466)](e)}catch(e){}}else if(s&&t[1]===Ne[n(920)]){const e=15&t[0];postMessage({cmd:ye[n(785)],code:e});const r=new Uint8Array(t);postMessage({cmd:ye[n(1096)],buffer:r,codecId:e},[r[n(610)]]);let i=null,s=null;const a=t[n(871)](5);if(e===Ce[n(740)]?(s=Ir(a),i={codec:s.codec,description:a}):e===Ce[n(914)]&&(s=ei(a),i={codec:s[n(442)],description:a}),!i||i&&!i.codec||s&&0===s.codecWidth&&0===s.codecHeight)return void se[n(794)](o[n(445)],n(841),JSON[n(497)](i));s&&s[n(670)]&&s[n(533)]&&(i.codedHeight=s[n(533)],i.codedWidth=s.codecWidth),!o[n(895)]&&(se[n(762)](n(771),n(938)),postMessage({cmd:ye[n(652)],w:s[n(670)],h:s[n(533)]}),o[n(895)]=!0,o.offscreenCanvas=new OffscreenCanvas(s.codecWidth,s[n(533)]),o[n(224)]=o[n(431)][n(744)]("2d")),se[n(398)][n(831)],n(1064);try{o[n(969)].configure(i),o.hasInit=!0}catch(e){se[n(749)](n(771),n(1151),e.code,e,e[n(312)]()),e.toString()}}else se[n(794)]("worker",n(817)+s+n(1162)+t[1]+" so drop this frame")},reset(){const t=e;o.hasInit=!1,o.isEmitInfo=!1,o[t(431)]=null,o[t(224)]=null}});let Y=function(){const t=e;if(z=!0,c)try{c.abort(),c=null,se.debugLog(t(771),t(261))}catch(e){c=null,se[t(762)](t(771),t(970),e)}},J={TAG_NAME:"worker nakedFlow",init(){const t=e;J.lastBuf=null,J[t(1116)]=null,J[t(971)]=null,J[t(830)]=null,J[t(853)]=null,J[t(930)]=0,J[t(756)]={},J[t(1163)]=!1,se[t(762)](J.TAG_NAME,t(257))},destroy(){const t=e;J[t(967)]=null,J[t(1116)]=null,J.sps=null,J[t(830)]=null,J[t(853)]=null,J[t(930)]=0,J[t(756)]={},J[t(1163)]=!1,se[t(762)](J.TAG_NAME,t(813))},dispatch(t){const r=e,i=new Uint8Array(t);if(se[r(398)][r(648)]){const e=J[r(560)](i);if(0===e[r(1081)])return void se[r(762)](J.TAG_NAME,"dispatch naluArray length is 0");J[r(538)](e)}else J.extractNALu$2(i)},getNaluDts(){const t=e,r=se[t(398)][t(296)];let i=J[t(930)];return J.localDts=J[t(930)]+parseInt(1e3/r,10),i},getNaluAudioDts(){const t=e,r=se[t(398)][t(277)],i=se._opt[t(737)];return J[t(930)]+parseInt(i/r*1e3)},extractNALu(t){const r=e;let i,n,s=0,a=t[r(907)],o=0,c=[];for(;s1)for(let e=0;e{const t=r,i=xr(e);i===Te[t(830)]||i===Te[t(971)]?J.handleVideoH264Nalu(e):Tr(i)&&n[t(523)](e)})),1===n.length)J.handleVideoH264Nalu(n[0]);else{if(Mr(n)){const e=xr(n[0]),t=Dr(e);J[r(860)](n,t,e)}else n[r(663)]((e=>{J[r(374)](e)}))}}else if(J[r(853)]===xe[r(914)])if(se[r(398)][r(513)]){const e=J[r(816)](t),i=J[r(545)](e);if(0===i.length)return void se[r(794)](r(771),"handleVideoNalu","h265 naluList.length === 0");const n=[];if(i[r(663)]((e=>{const t=r,i=si(e);i===De.pps||i===De[t(971)]||i===De.vps?J[t(728)](e):ci(i)&&n[t(523)](e)})),1===n[r(1081)])J.handleVideoH265Nalu(n[0]);else{if(li(n)){const e=si(n[0]),t=ui(e);J[r(1014)](n,t,e)}else n[r(663)]((e=>{J[r(728)](e)}))}}else{si(t)===De[r(830)]?J.extractH265PPS(t):J[r(728)](t)}},extractH264PPS(t){const r=e,i=J[r(816)](t);J[r(545)](i)[r(663)]((e=>{Br(xr(e))?J.extractH264SEI(e):J.handleVideoH264Nalu(e)}))},extractH265PPS(t){const r=e,i=J[r(816)](t);J[r(545)](i)[r(663)]((e=>{ai(si(e))?J.extractH265SEI(e):J.handleVideoH265Nalu(e)}))},extractH264SEI(t){const r=e,i=J[r(816)](t);J.extractNALu(i)[r(663)]((e=>{J.handleVideoH264Nalu(e)}))},extractH265SEI(t){const r=e,i=J[r(816)](t);J[r(545)](i)[r(663)]((e=>{J.handleVideoH265Nalu(e)}))},handleAddNaluStartCode(t){const r=e,i=[0,0,0,1],n=new Uint8Array(t[r(1081)]+i[r(1081)]);return n[r(319)](i),n.set(t,i[r(1081)]),n},handleVideoH264Nalu(t){const r=e,i=xr(t);switch(i){case Te[r(971)]:J[r(971)]=t;break;case Te[r(830)]:J[r(830)]=t}if(J.isSendSeqHeader){if(J.sps&&J[r(830)]){const e=Ar({sps:J[r(971)],pps:J[r(830)]}),t=J.localDts;se[r(466)](e,{type:ge[r(661)],ts:t,isIFrame:!0,cts:0}),J.sps=null,J[r(830)]=null}if(Tr(i)){const e=Dr(i),n=J[r(1091)](),s=Er(t,e);J[r(1010)](s,{type:ge[r(661)],ts:n,isIFrame:e,cts:0})}}else if(J[r(971)]&&J[r(830)]){J[r(1163)]=!0;const e=Ar({sps:J[r(971)],pps:J[r(830)]});se.decode(e,{type:ge[r(661)],ts:0,isIFrame:!0,cts:0}),J[r(971)]=null,J.pps=null}},handleVideoH264NaluList(t,r,i){const n=e;if(J[n(1163)]){const e=J.getNaluDts(),s=Cr(t[n(562)](((e,t)=>{const r=n,i=wt(e),s=wt(t),a=new Uint8Array(i[r(907)]+s.byteLength);return a.set(i,0),a[r(319)](s,i[r(907)]),a})),r);J[n(1010)](s,{type:ge[n(661)],ts:e,isIFrame:r,cts:0}),se.debugLog(n(771),n(328)+t.length+" package length is "+s.byteLength+n(249)+r+n(455)+i+n(722)+e)}},handleVideoH265Nalu(t){const r=e,i=si(t);switch(i){case De[r(1116)]:J.vps=t;break;case De[r(971)]:J[r(971)]=t;break;case De[r(830)]:J[r(830)]=t}if(J[r(1163)]){if(J[r(1116)]&&J.sps&&J[r(830)]){const e=ri({vps:J[r(1116)],sps:J[r(971)],pps:J[r(830)]}),t=J[r(930)];se.decode(e,{type:ge.video,ts:t,isIFrame:!0,cts:0}),J[r(1116)]=null,J.sps=null,J[r(830)]=null}if(ci(i)){const e=ui(i),n=J[r(1091)](),s=ii(t,e);J[r(1010)](s,{type:ge[r(661)],ts:n,isIFrame:e,cts:0})}}else if(J.vps&&J[r(971)]&&J[r(830)]){J[r(1163)]=!0;const e=ri({vps:J.vps,sps:J.sps,pps:J.pps});se.decode(e,{type:ge[r(661)],ts:0,isIFrame:!0,cts:0}),J[r(1116)]=null,J[r(971)]=null,J.pps=null}},handleVideoH265NaluList(t,r,i){const n=e;if(J.isSendSeqHeader){const e=J[n(1091)](),s=ni(t.reduce(((e,t)=>{const r=n,i=wt(e),s=wt(t),a=new Uint8Array(i[r(907)]+s[r(907)]);return a[r(319)](i,0),a[r(319)](s,i[r(907)]),a})),r);J[n(1010)](s,{type:ge[n(661)],ts:e,isIFrame:r,cts:0}),se[n(762)](n(771),n(1004)+t[n(1081)]+" package length is "+s[n(907)]+n(249)+r+",nalu type is "+i+n(722)+e)}},doDecode(t,r){const i=e;se[i(468)](r.ts),r[i(308)]&&se.calcIframeIntervalTimestamp(r.ts),se[i(466)](t,r)},handleVideoFrames(t){const r=e;if(!J[r(922)])for(let e of t)if(J[r(922)]=Ot(e),J.streamVideoType)break;J[r(922)]?J[r(922)]===xe[r(740)]?J[r(1157)](t):J[r(922)]===xe.h265&&J[r(792)](t):se[r(794)](r(771),r(538),r(694))},handleVideoH264Frames(t){const r=e;let i=[],n=[],s=!1,a=!1;J[r(756)][r(578)]&&(i=J[r(756)][r(578)],a=J[r(756)].vcl,s=J[r(756)][r(237)],J[r(756)]={});let o={};for(let e of t){if(e[r(907)]<4)continue;const t=xr(e);let c=!1,u=t===Te[r(829)];(t===Te[r(668)]||t===Te[r(829)])&&(o=J[r(423)](e),c=!0),i.length&&a&&(o[r(705)]||!c)&&(n[r(523)]({units:i,isIFrame:s}),i=[],s=!1,a=!1),i.push(e),s=s||u,a=a||c}i[r(1081)]&&(J[r(756)]={units:i,vcl:a,iFrame:s}),n[r(663)]((e=>{const t=r,i=e.units,n=e.isIFrame;let s=null,a=null;if(i[t(663)]((e=>{const r=t,i=31&e[0];switch(i){case Te[r(830)]:J.pps=e;break;case Te[r(971)]:J[r(971)]=e;break;case Te[r(236)]:a=e}if(Tr(i)){const t=wt(e);if(s){const e=new Uint8Array(s[r(907)]+t[r(907)]);e[r(319)](s,0),e[r(319)](t,s.byteLength),s=e}else s=t}})),!J[t(1163)]&&J[t(971)]&&J.pps){J[t(1163)]=!0;const e=kr({sps:J[t(971)],pps:J[t(830)]});se[t(466)](e,{type:ge[t(661)],ts:0,isIFrame:!0,cts:0}),J[t(971)]=null,J[t(830)]=null}if(J[t(1163)]){if(J[t(971)]&&J[t(830)]){const e=kr({sps:J[t(971)],pps:J[t(830)]}),r=J[t(930)];se[t(466)](e,{type:ge[t(661)],ts:r,isIFrame:!0,cts:0}),J[t(971)]=null,J[t(830)]=null}if(s){const e=J.getNaluDts(),r=Cr(s,n);if(se[t(398)].isEmitSEI&&a){const r=It(a,!1);postMessage({cmd:ye.videoSEI,buffer:r[t(979)],ts:e},[r.payload[t(610)]])}J[t(1010)](r,{type:ge[t(661)],ts:e,isIFrame:n,cts:0})}}}))},handleVideoH265Frames(t){const r=e;let i=[],n=[],s=!1,a=!1;J[r(756)][r(578)]&&(i=J.pendingUnits.units,a=J[r(756)].vcl,s=J[r(756)][r(237)],J[r(756)]={});let o={};for(let e of t){if(e.byteLength<4)continue;const t=si(e);let c=!1,u=ui(t);ci(t)&&(o=J.parseVideo265Header(e),c=!0),i[r(1081)]&&a&&(o.isfms||!c)&&(n.push({units:i,isIFrame:s}),i=[],s=!1,a=!1),i[r(523)](e),s=s||u,a=a||c}i[r(1081)]&&(J[r(756)]={units:i,vcl:a,iFrame:s}),n.forEach((e=>{const t=r,i=e[t(578)],n=e[t(308)];let s=null,a=null;if(i[t(663)]((e=>{const r=t,i=e[0]>>>1&63;switch(i){case De[r(830)]:J[r(830)]=e;break;case De[r(971)]:J.sps=e;break;case De[r(1116)]:J.vps=e;break;case De[r(1012)]:case De[r(671)]:a=e}if(ci(i)){const t=wt(e);if(s){const e=new Uint8Array(s[r(907)]+t[r(907)]);e[r(319)](s,0),e[r(319)](t,s[r(907)]),s=e}else s=t}})),!J[t(1163)]&&J[t(971)]&&J[t(830)]&&J[t(1116)]){J.isSendSeqHeader=!0;const e=ri({sps:J[t(971)],pps:J[t(830)],vps:J.vps});se.decode(e,{type:ge[t(661)],ts:0,isIFrame:!0,cts:0}),J.sps=null,J.pps=null,J[t(1116)]=null}if(J.isSendSeqHeader){if(J[t(971)]&&J.pps&&J[t(1116)]){const e=ri({sps:J[t(971)],pps:J[t(830)],vps:J.vps}),r=J[t(930)];se[t(466)](e,{type:ge[t(661)],ts:r,isIFrame:!0,cts:0}),J[t(971)]=null,J[t(830)]=null,J.vps=null}if(s){const e=J[t(1091)](),r=ni(s,n);if(se._opt[t(746)]&&a){const r=It(a,!0);postMessage({cmd:ye.videoSEI,buffer:r[t(979)],ts:e},[r[t(979)][t(610)]])}J.doDecode(r,{type:ge[t(661)],ts:e,isIFrame:n,cts:0})}}}))},handleVideoH265Frames_1(t){const r=e;t[r(663)]((e=>{J[r(520)](e)}))},parseVideo264Header(t){const r=e,i=new jo(t);i[r(715)]();return{isfms:0===i[r(692)](),sType:i.readUEG()}},parseVideo265Header(t){const r=e,i=new jo(t);return i[r(715)](),{nalType:i[r(437)](6),isfms:0===i[r(437)](1),sType:i.readBits(3)}}},X={LOG_NAME:e(1013),mp4Box:null,offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){const t=e;X[t(1114)]=ba[t(551)](),X[t(1114)][t(764)]=X[t(764)],X[t(1114)][t(888)]=X[t(888)],X[t(1114)][t(667)]=X[t(667)],se[t(762)](X[t(1089)],t(257))},destroy(){const t=e;X.mp4Box&&(X.mp4Box.stop(),X[t(1114)].flush(),X[t(1114)][t(813)](),X[t(1114)]=null),X[t(1023)]=0,X[t(330)]=null,X.audioTrackId=null,X.isHevc=!1,se[t(762)](X[t(1089)],"destroy")},_getSeqHeader(t){const r=e,i=X[r(1114)][r(642)](t.id);for(const e of i[r(828)][r(1126)][r(577)][r(251)].entries)if(e[r(1067)]||e[r(1115)]){const t=new ba.DataStream(void 0,0,ba[r(373)][r(1154)]);let i=[];e[r(1067)]?(e.avcC[r(600)](t),i=[23,0,0,0,0]):(X[r(380)]=!0,se[r(380)]=!0,e[r(1115)].write(t),i=[28,0,0,0,0]);const n=new Uint8Array(t[r(610)],8),s=new Uint8Array(i[r(1081)]+n.length);return s.set(i,0),s[r(319)](n,i[r(1081)]),s}return null},onReady(t){const r=e;se[r(762)](X[r(1089)],r(1121));const i=t.videoTracks[0],n=t[r(1059)][0];if(i){X[r(330)]=i.id;const e=X[r(350)](i);e&&(se.debugLog(X[r(1089)],r(590)),se[r(929)](e,0,!0,0)),X.mp4Box[r(531)](i.id)}if(n&&se[r(398)][r(947)]){X.audioTrackId=n.id;const e=n[r(570)]||{},t=ct[r(994)](e.sample_rate),i=n.codec.replace("mp4a.40.","");X[r(1114)][r(531)](n.id);const s=lt({profile:parseInt(i,10),sampleRate:t,channel:e[r(597)]});se.debugLog(X[r(1089)],r(775)),se.decodeAudio(s,0)}X[r(1114)][r(826)]()},onError(e){se.debugError(X.LOG_NAME,"mp4Box onError",e)},onSamples(t,r,i){const n=e;if(t===X.videoTrackId){for(const e of i){const t=e[n(522)],r=e[n(858)],i=1e3*e.cts/e.timescale;e.duration,e[n(743)],r&&se[n(572)](i);let s=null;s=X[n(380)]?ni(t,r):Cr(t,r),se[n(466)](s,{type:ge[n(661)],ts:i,isIFrame:r,cts:0})}X.mp4Box[n(657)](t)}else if(t===X[n(349)]){if(se[n(398)][n(947)]){for(const e of i){const t=e[n(522)],r=1e3*e[n(1128)]/e[n(743)];e.duration,e[n(743)];const i=new Uint8Array(t[n(907)]+2);i.set([175,1],0),i[n(319)](t,2),se[n(466)](i,{type:ge.audio,ts:r,isIFrame:!1,cts:0})}X[n(1114)][n(657)](t)}}else se[n(794)](X[n(1089)],n(521),t)},dispatch(t){const r=e;let i=new Uint8Array(t);i[r(610)][r(217)]=X[r(1023)],X[r(1023)]+=i[r(907)],X[r(1114)].appendBuffer(i[r(610)])}},Q={LOG_NAME:"worker mpeg4Demuxer",lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:e(257),hasInitVideoCodec:!1,localDts:0,dispatch(t){const r=e,i=new Uint8Array(t);Q[r(545)](i)},destroy(){const t=e;Q[t(875)]=new Uint8Array(0),Q[t(880)]=0,Q[t(604)]=0,Q.secondStartCodeOffset=0,Q[t(260)]=t(257),Q.hasInitVideoCodec=!1,Q[t(930)]=0,se[t(762)](Q[t(1089)],t(813))},extractNALu(t){const r=e;if(!t||t[r(907)]<1)return void se.debugWarn(Q.LOG_NAME,r(321),t);const i=new Uint8Array(Q[r(875)].length+t[r(1081)]);for(i[r(319)](Q.lastBuffer,0),i[r(319)](new Uint8Array(t),Q[r(875)][r(1081)]),Q[r(875)]=i;;){if(Q[r(260)]===r(257)){let e=!1;for(;Q.lastBuffer[r(1081)]-Q[r(880)]>=4;)if(0===Q[r(875)][Q[r(880)]])if(0===Q[r(875)][Q.parsedOffset+1])if(1===Q.lastBuffer[Q[r(880)]+2]){if(182===Q.lastBuffer[Q[r(880)]+3]){Q[r(260)]=r(270),Q[r(604)]=Q[r(880)],Q[r(880)]+=4,e=!0;break}Q[r(880)]++}else Q[r(880)]++;else Q[r(880)]++;else Q[r(880)]++;if(e)continue;break}if("findFirstStartCode"===Q[r(260)]){let e=!1;for(;Q[r(875)][r(1081)]-Q[r(880)]>=4;)if(0===Q[r(875)][Q[r(880)]])if(0===Q[r(875)][Q[r(880)]+1])if(1===Q[r(875)][Q[r(880)]+2]){if(182===Q.lastBuffer[Q[r(880)]+3]){Q[r(260)]=r(717),Q[r(393)]=Q.parsedOffset,Q[r(880)]+=4,e=!0;break}Q[r(880)]++}else Q[r(880)]++;else Q[r(880)]++;else Q.parsedOffset++;if(e)continue;break}if(Q[r(260)]===r(717)){if(!(Q[r(875)][r(1081)]-Q.parsedOffset>0))break;{let e,t=192&Q[r(875)][Q[r(880)]];e=0==t?Q.secondStartCodeOffset-14:Q[r(393)];let i,n=0==(192&Q[r(875)][Q[r(604)]+4]);if(n){if(Q[r(604)]-14<0)return void se.debugWarn(Q[r(1089)],r(223),Q[r(604)]-14);!Q[r(408)]&&(Q[r(408)]=!0,se[r(762)](Q.LOG_NAME,r(415)),oe.setCodec(Ce[r(1093)],"",se[r(935)]())),i=Q.lastBuffer[r(316)](Q[r(604)]-14,e)}else i=Q[r(875)][r(316)](Q[r(604)],e);let s=Q[r(1091)]();Q[r(408)]?(postMessage({cmd:ye.workerFetch,type:Ie[r(512)],value:i[r(907)]}),postMessage({cmd:ye[r(310)],type:Ie[r(847)],value:s}),g=s,oe[r(466)](i,n?1:0,s)):se[r(794)](Q[r(1089)],r(504)),Q.lastBuffer=Q.lastBuffer[r(316)](e),0==t?Q.firstStartCodeOffset=14:Q[r(604)]=0,Q[r(880)]=Q[r(604)]+4,Q[r(260)]=r(270)}}}},getNaluDts(){const t=e;let r=Q[t(930)];return Q[t(930)]=Q[t(930)]+40,r}},$={TAG_NAME:"worker TsLoaderV2",first_parse_:!0,tsPacketSize:0,syncOffset:0,pmt_:null,config_:null,media_info_:new zo,timescale_:90,duration_:0,pat_:{version_number:0,network_pid:0,program_map_pid:{}},current_program_:null,current_pmt_pid_:-1,program_pmt_map_:{},pes_slice_queues_:{},section_slice_queues_:{},video_metadata_:{vps:null,sps:null,pps:null,details:null},audio_metadata_:{codec:null,audio_object_type:null,sampling_freq_index:null,sampling_frequency:null,channel_config:null},last_pcr_:null,audio_last_sample_pts_:void 0,aac_last_incomplete_data_:null,has_video_:!1,has_audio_:!1,video_init_segment_dispatched_:!1,audio_init_segment_dispatched_:!1,video_metadata_changed_:!1,audio_metadata_changed_:!1,loas_previous_frame:null,video_track_:{type:"video",id:1,sequenceNumber:0,samples:[],length:0},audio_track_:{type:e(570),id:2,sequenceNumber:0,samples:[],length:0},_remainingPacketData:null,init(){},destroy(){const t=e;$.media_info_=null,$.pes_slice_queues_=null,$.section_slice_queues_=null,$[t(765)]=null,$[t(699)]=null,$[t(383)]=null,$[t(1146)]=null,$[t(928)]=null,$[t(359)]=null,se.debugLog($[t(445)],t(813))},probe(t){const r=e;let i=new Uint8Array(t),n=-1,s=188;if(i[r(907)]<=3*s)return{needMoreData:!0};for(;-1===n;){let e=Math[r(245)](1e3,i[r(907)]-3*s);for(let t=0;t=4&&(n-=4),{match:!0,consumed:0,ts_packet_size:s,sync_offset:n})},_initPmt:()=>({program_number:0,version_number:0,pcr_pid:0,pid_stream_type:{},common_pids:{h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0,g711a:void 0,g711u:void 0},pes_private_data_pids:{},timed_id3_pids:{},synchronous_klv_pids:{},asynchronous_klv_pids:{},scte_35_pids:{},smpte2038_pids:{}}),dispatch(t){const r=e;$._remainingPacketData&&(t=co($[r(359)],t),$[r(359)]=null);let i=t[r(610)];const n=$[r(936)](i);n?$[r(359)]=t[r(316)](n):t[r(1081)]<$[r(689)]&&($._remainingPacketData=t)},parseChunks(t){const r=e;let i=0;if($[r(738)]){$[r(738)]=!1;const e=$[r(1149)](t);e[r(1152)]&&($[r(689)]=e.ts_packet_size,$.syncOffset=e[r(774)]),i=$[r(653)],se[r(762)]($[r(445)],r(450)+$[r(689)]+r(685)+$.syncOffset)}for(;i+$[r(689)]<=t[r(907)];){192===$.tsPacketSize&&(i+=4);const e=new Uint8Array(t,i,188);let n=e[0];if(71!==n){se.debugWarn($[r(445)],r(458)+n+r(271));break}let s=(64&e[1])>>>6;e[1];let a=(31&e[1])<<8|e[2],o=(48&e[3])>>>4,c=15&e[3],u=!(!$[r(1009)]||$[r(1009)][r(628)]!==a),l={},h=4;if(2==o||3==o){let t=e[4];if(t>0&&(u||3==o)){if(l[r(748)]=(128&e[5])>>>7,l[r(716)]=(64&e[5])>>>6,l[r(299)]=(32&e[5])>>>5,(16&e[5])>>>4){let t=300*(e[6]<<25|e[7]<<17|e[8]<<9|e[9]<<1|e[10]>>>7)+((1&e[10])<<8|e[11]);$[r(1001)]=t}}if(2==o||5+t===188){i+=188,204===$.tsPacketSize&&(i+=16);continue}h=5+t}if(1==o||3==o)if(0===a||a===$[r(1079)]||null!=$[r(1009)]&&$[r(1009)][r(253)][a]===Fo[r(686)]){let e=188-h;$[r(1087)](t,i+h,e,{pid:a,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l[r(716)]})}else if(null!=$[r(1009)]&&null!=$[r(1009)].pid_stream_type[a]){let e=188-h,n=$[r(1009)][r(253)][a];(a===$[r(1009)][r(556)][r(740)]||a===$[r(1009)].common_pids.h265||a===$[r(1009)][r(556)][r(511)]||a===$.pmt_[r(556)][r(998)]||a===$[r(1009)][r(556)][r(651)]||a===$.pmt_.common_pids[r(641)]||a===$[r(1009)][r(556)][r(244)]||a===$[r(1009)][r(556)][r(770)]||a===$[r(1009)][r(556)].g711a||a===$[r(1009)][r(556)][r(387)]||!0===$[r(1009)][r(805)][a]||!0===$[r(1009)][r(376)][a]||!0===$[r(1009)][r(399)][a]||!0===$[r(1009)][r(617)][a])&&$[r(902)](t,i+h,e,{pid:a,stream_type:n,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l[r(716)]})}i+=188,204===$[r(689)]&&(i+=16)}return $.dispatchAudioVideoMediaSegment(),i},handleSectionSlice(t,r,i,n){const s=e;let a=new Uint8Array(t,r,i),o=$[s(827)][n[s(865)]];if(n.payload_unit_start_indicator){let e=a[0];if(null!=o&&0!==o[s(784)]){let a=new Uint8Array(t,r+1,Math[s(245)](i,e));o[s(926)][s(523)](a),o.total_length+=a[s(907)],o.total_length===o[s(1129)]?$[s(873)](o,n):$[s(866)](o,n)}for(let c=1+e;c=o.expected_length&&$[s(866)](o,n),c+=u[s(907)]}}else if(null!=o&&0!==o.total_length){let e=new Uint8Array(t,r,Math[s(245)](i,o.expected_length-o[s(784)]));o.slices.push(e),o[s(784)]+=e[s(907)],o[s(784)]===o[s(1129)]?$[s(873)](o,n):o[s(784)]>=o[s(1129)]&&$[s(866)](o,n)}},handlePESSlice(t,r,i,n){const s=e;let a=new Uint8Array(t,r,i),o=a[0]<<16|a[1]<<8|a[2];a[3];let c=a[4]<<8|a[5];if(n[s(453)]){if(1!==o)return void se[s(794)]($.TAG_NAME,s(385)+o);let e=$.pes_slice_queues_[n[s(865)]];e&&(0===e[s(1129)]||e[s(1129)]===e[s(784)]?$.emitPESSlices(e,n):$[s(866)](e,n)),$[s(601)][n[s(865)]]=new Po,$.pes_slice_queues_[n[s(865)]][s(716)]=n.random_access_indicator}if(null==$.pes_slice_queues_[n.pid])return;let u=$[s(601)][n[s(865)]];u.slices.push(a),n[s(453)]&&(u.expected_length=0===c?0:c+6),u[s(784)]+=a[s(907)],u.expected_length>0&&u[s(1129)]===u[s(784)]?$[s(1135)](u,n):u.expected_length>0&&u[s(1129)]>>6,c=i[8];(2===o||3===o)&&(e=536870912*(14&i[9])+4194304*(255&i[10])+16384*(254&i[11])+128*(255&i[12])+(254&i[13])/2,n=3===o?536870912*(14&i[14])+4194304*(255&i[15])+16384*(254&i[16])+128*(255&i[17])+(254&i[18])/2:e);let u,l=9+c;if(0!==a){if(a<3+c)return void se.debugWarn($[r(445)],r(215));u=a-3-c}else u=i[r(907)]-l;let h=i[r(316)](l,l+u);switch(t[r(1e3)]){case Fo[r(649)]:case Fo.kMPEG2Audio:$.parseMP3Payload(h,e);break;case Fo[r(665)]:$[r(1009)][r(556)].opus===t[r(865)]?$[r(1123)](h,e):$[r(1009)][r(556)][r(651)]===t.pid?$.parseAC3Payload(h,e):$[r(1009)][r(556)][r(641)]===t[r(865)]?$[r(835)](h,e):$[r(1009)][r(617)][t[r(865)]]?$[r(583)](h,t.pid,s):$[r(1009)].smpte2038_pids[t.pid]?$[r(940)](h,e,n,t[r(865)],s):$[r(863)](h,e,n,t[r(865)],s);break;case Fo[r(226)]:$.parseADTSAACPayload(h,e);break;case Fo[r(1099)]:$[r(966)](h,e);break;case Fo[r(490)]:$[r(375)](h,e);break;case Fo[r(567)]:$[r(835)](h,e);break;case Fo.kMetadata:$[r(1009)][r(376)][t[r(865)]]?$[r(1002)](h,e,n,t[r(865)],s):$[r(1009)][r(399)][t.pid]&&$[r(878)](h,e,n,t[r(865)],s);break;case Fo[r(333)]:$[r(1092)](h,e,n,t[r(716)]);break;case Fo[r(1076)]:$[r(752)](h,e,n,t[r(716)]);break;case Fo[r(282)]:$.parseG711Payload(h,e,!0);break;case Fo[r(954)]:$[r(276)](h,e,!1);break;default:se[r(762)]($.TAG_NAME,r(575)+t[r(1e3)]+", pid: "+t.pid)}}else if((188===s||191===s||240===s||241===s||255===s||242===s||248===s)&&t[r(1e3)]===Fo.kPESPrivateData){let e,n=6;e=0!==a?a:i.byteLength-n;let o=i[r(316)](n,n+e);$[r(863)](o,void 0,void 0,t[r(865)],s)}}else se[r(749)]($[r(445)],r(495)+n)},parsePAT(t){const r=e;let i=t[0];if(0!==i)return void Log.e($[r(890)],r(1069)+i+" is not corresponded to PAT!");let n=(15&t[1])<<8|t[2];t[3],t[4];let s=(62&t[5])>>>1,a=1&t[5],o=t[6];t[7];let c=null;if(1===a&&0===o)c={version_number:0,network_pid:0,program_pmt_pid:{}},c[r(214)]=s;else if(c=$[r(917)],null==c)return;let u=n-5-4,l=-1,h=-1;for(let e=8;e<8+u;e+=4){let i=t[e]<<8|t[e+1],n=(31&t[e+2])<<8|t[e+3];0===i?c[r(1122)]=n:(c[r(838)][i]=n,-1===l&&(l=i),-1===h&&(h=n))}1===a&&0===o&&(null==$[r(917)]&&se[r(762)]($[r(445)],r(999)+JSON[r(497)](c)),$.pat_=c,$.current_program_=l,$[r(1079)]=h)},parsePMT(t){const r=e;let i=t[0];if(2!==i)return void se[r(749)]($[r(445)],r(255)+i+" is not corresponded to PMT!");let n,s=(15&t[1])<<8|t[2],a=t[3]<<8|t[4],o=(62&t[5])>>>1,c=1&t[5],u=t[6];if(t[7],1===c&&0===u)n=$[r(754)](),n[r(548)]=a,n[r(214)]=o,$.program_pmt_map_[a]=n;else if(n=$.program_pmt_map_[a],null==n)return;n[r(628)]=(31&t[8])<<8|t[9];let l=(15&t[10])<<8|t[11],h=12+l,d=s-9-l-4;for(let e=h;e0){for(let i=e+5;i0)for(let i=e+5;i1&&(se[i(794)]($[i(445)],i(491)+(i(1030)+e+"ms, PES pts: ")+s+"ms"),s=e)}}let a,o=new _t(t),c=null,u=s;for(;null!=(c=o[i(547)]());){n=1024/c.sampling_frequency*1e3;const e={codec:i(802),data:c};0==$[i(958)]?($.audio_metadata_={codec:i(802),audio_object_type:c[i(334)],sampling_freq_index:c.sampling_freq_index,sampling_frequency:c.sampling_frequency,channel_config:c[i(240)]},$[i(618)](e)):$[i(366)](e)&&($[i(965)](),$[i(618)](e)),a=u;let t=Math[i(818)](u);const r=new Uint8Array(c[i(522)][i(1081)]+2);r[i(319)]([175,1],0),r[i(319)](c[i(522)],2);let s={payload:r,length:r[i(907)],pts:t,dts:t,type:ge[i(570)]};$[i(928)][i(322)][i(523)](s),$.audio_track_[i(1081)]+=r[i(907)],u+=n}o.hasIncompleteData()&&($[i(383)]=o[i(540)]()),a&&($.audio_last_sample_pts_=a)},parseLOASAACPayload(t,r){const i=e;if($[i(419)]&&!$[i(763)])return;if($[i(383)]){let e=new Uint8Array(t.byteLength+$[i(383)][i(907)]);e[i(319)]($[i(383)],0),e[i(319)](t,$[i(383)][i(907)]),t=e}let n,s;if(null!=r&&(s=r/$[i(303)]),$[i(699)][i(442)]===i(802)){if(null==r&&null!=$.audio_last_sample_pts_)n=1024/$[i(699)][i(783)]*1e3,s=$[i(1036)]+n;else if(null==r)return void se.debugWarn($.TAG_NAME,i(424));if($[i(383)]&&$[i(1036)]){n=1024/$[i(699)][i(783)]*1e3;let e=$[i(1036)]+n;Math.abs(e-s)>1&&(se.debugWarn($[i(890)],"AAC: Detected pts overlapped, "+(i(1030)+e+i(230)+s)+"ms"),s=e)}}let a,o=new vt(t),c=null,u=s;for(;null!=(c=o[i(547)](Lt($[i(852)])?void 0:$[i(852)]));){$.loas_previous_frame=c,n=1024/c.sampling_frequency*1e3;const e={codec:i(802),data:c};0==$[i(958)]?($[i(699)]={codec:i(802),audio_object_type:c.audio_object_type,sampling_freq_index:c[i(751)],sampling_frequency:c[i(783)],channel_config:c[i(240)]},$[i(618)](e)):$[i(366)](e)&&($[i(965)](),$[i(618)](e)),a=u;let t=Math[i(818)](u);const r=new Uint8Array(c[i(522)][i(1081)]+2);r[i(319)]([175,1],0),r[i(319)](c.data,2);let s={payload:r,length:r[i(907)],pts:t,dts:t,type:ge[i(570)]};$[i(928)][i(322)][i(523)](s),$[i(928)][i(1081)]+=r.byteLength,u+=n}o[i(832)]()&&($[i(383)]=o.getIncompleteData()),a&&($[i(1036)]=a)},parseAC3Payload(e,t){},parseEAC3Payload(e,t){},parseOpusPayload(e,t){},parseMP3Payload(t,r){const i=e;if($.has_video_&&!$[i(763)])return;let n=[44100,48e3,32e3,0],s=[22050,24e3,16e3,0],a=[11025,12e3,8e3,0],o=t[1]>>>3&3,c=(6&t[1])>>1,u=(t[2],(12&t[2])>>>2),l=3!==(t[3]>>>6&3)?2:1,h=0,d=34;switch(i(770),o){case 0:h=a[u];break;case 2:h=s[u];break;case 3:h=n[u]}switch(c){case 1:d=34,i(1081);break;case 2:d=33;break;case 3:d=32,i(1081)}const f={};f[i(848)]=d,f[i(631)]=h,f.channel_count=l,f[i(522)]=t;const p={codec:i(770),data:f};0==$[i(958)]?($[i(699)]={codec:i(770),object_type:d,sample_rate:h,channel_count:l},$[i(618)](p)):$[i(366)](p)&&($[i(965)](),$[i(618)](p));const m=new Uint8Array(t[i(1081)]+1);m[i(319)]([32],0),m[i(319)](t,1);let _={payload:m,length:m[i(907)],pts:r/$[i(303)],dts:r/$.timescale_,type:ge[i(570)]};$[i(928)].samples[i(523)](_),$[i(928)].length+=m[i(907)]},parseG711Payload(t,r,i){const n=e;if($[n(419)]&&!$[n(763)])return;const s={};s[n(631)]=8e3,s[n(597)]=1;const a={codec:n(i?734:387)};0==$[n(958)]?($[n(699)]={codec:a.codec,sample_rate:s[n(631)],channel_count:s[n(597)]},$[n(618)](a)):$[n(366)](a)&&($[n(965)](),$[n(618)](a));const o=new Uint8Array(t[n(1081)]+1),c=i?[114]:[130];o.set(c,0),o[n(319)](t,1);let u={payload:o,length:o[n(907)],pts:r/$[n(303)],dts:r/$[n(303)],type:ge[n(570)]};$[n(928)][n(322)][n(523)](u),$[n(928)][n(1081)]+=o[n(907)]},detectAudioMetadataChange(t){const r=e;if(t[r(442)]!==$[r(699)][r(442)])return se[r(762)]($[r(445)],r(1103)+($[r(699)].codec+" to ")+t[r(442)]),!0;if(t[r(442)]===r(802)&&"aac"===$[r(699)][r(442)]){const e=t[r(522)];if(e[r(334)]!==$[r(699)][r(334)])return se[r(762)]($[r(445)],r(646)+($[r(699)].audio_object_type+" to ")+e[r(334)]),!0;if(e.sampling_freq_index!==$[r(699)].sampling_freq_index)return se.debugLog($[r(445)],r(1160)+($.audio_metadata_[r(751)]+r(262)+e[r(751)])),!0;if(e[r(240)]!==$[r(699)][r(240)])return se[r(762)]($[r(445)],"AAC: Channel configuration changed from "+($[r(699)][r(240)]+r(262)+e.channel_config)),!0}else if("ac-3"===t[r(442)]&&$[r(699)][r(442)]===r(412)){const e=t.data;if(e[r(783)]!==$[r(699)][r(783)])return se[r(762)]($[r(445)],r(726)+($.audio_metadata_[r(783)]+r(262)+e[r(783)])),!0;if(e[r(800)]!==$[r(699)][r(800)])return se[r(762)]($[r(445)],"AC3: Bit Stream Identification changed from "+($[r(699)][r(800)]+r(262)+e[r(800)])),!0;if(e.bit_stream_mode!==$[r(699)][r(228)])return se[r(762)]($.TAG_NAME,r(921)+($[r(699)][r(228)]+r(262)+e[r(228)])),!0;if(e.channel_mode!==$[r(699)][r(400)])return se[r(762)]($[r(445)],r(1068)+($[r(699)][r(400)]+" to ")+e[r(400)]),!0;if(e[r(710)]!==$.audio_metadata_[r(710)])return se.debugLog($[r(445)],r(956)+($[r(699)][r(710)]+r(262)+e[r(710)])),!0}else if(t[r(442)]===r(244)&&$.audio_metadata_[r(442)]===r(244)){const e=t[r(636)];if(e[r(631)]!==$[r(699)][r(631)])return se.debugLog($[r(445)],r(808)+($[r(699)][r(631)]+r(262)+e[r(631)])),!0;if(e[r(597)]!==$.audio_metadata_[r(597)])return se[r(762)]($[r(445)],"Opus: Channel count changed from "+$[r(699)][r(597)]+" to "+e[r(597)]),!0}else if(t[r(442)]===r(770)&&"mp3"===$[r(699)][r(442)]){const e=t[r(522)];if(e.object_type!==$[r(699)][r(848)])return se.debugLog($[r(445)],r(433)+($[r(699)][r(848)]+r(262)+e.object_type)),!0;if(e[r(631)]!==$.audio_metadata_[r(631)])return se[r(762)]($.TAG_NAME,"MP3: SamplingFrequencyIndex changed from "+($[r(699)].sample_rate+r(262)+e[r(631)])),!0;if(e[r(597)]!==$[r(699)][r(597)])return se[r(762)]($.TAG_NAME,r(413)+($[r(699)][r(597)]+" to ")+e[r(597)]),!0}return!1},dispatchAudioInitSegment(t){const r=e;let i={};if(i[r(391)]="audio",i.id=$[r(928)].id,i[r(743)]=1e3,i[r(933)]=$[r(293)],$.audio_metadata_[r(442)]===r(802)){let e=t[r(442)]===r(802)?t[r(522)]:null,n=new Ho(e);i[r(347)]=n[r(390)],i[r(426)]=n[r(554)],i.channelCount=n[r(597)],i.codec=n[r(379)],i.originalCodec=n.original_codec_mimetype,i.config=n.config,i.refSampleDuration=1024/i[r(347)]*i[r(743)],r(643);const s=lt({profile:se[r(398)][r(250)]?n[r(848)]:n[r(953)],sampleRate:i[r(426)],channel:i[r(776)]});se[r(696)](s,0)}else"ac-3"===$[r(699)][r(442)]||$[r(699)][r(442)]===r(1063)||"opus"===$[r(699)][r(442)]||($[r(699)][r(442)]===r(770)?(i.audioSampleRate=$[r(699)][r(631)],i[r(776)]=$[r(699)].channel_count,i.codec=r(770),i[r(1039)]=r(770),i[r(632)]=void 0,r(1003)):$.audio_metadata_.codec===r(734)?(i[r(347)]=$[r(699)][r(631)],i[r(776)]=$[r(699)].channel_count,i[r(442)]=r(734),i[r(1039)]=r(734),i[r(632)]=void 0,r(282)):"g711u"===$[r(699)][r(442)]&&(i[r(347)]=$[r(699)][r(631)],i[r(776)]=$[r(699)][r(597)],i[r(442)]="g711u",i[r(1039)]=r(387),i[r(632)]=void 0,r(954)));0==$[r(958)]&&se[r(762)]($[r(445)],r(1061)+i[r(442)]),$.audio_init_segment_dispatched_=!0,$[r(487)]=!1},dispatchPESPrivateDataDescriptor(t,r,i){const n=e;let s={};s.pid=t,s[n(1e3)]=r,s.descriptor=i},parsePESPrivateDataPayload(t,r,i,n,s){const a=e;let o=new Ro;if(o.pid=n,o.stream_id=s,o[a(1022)]=t.byteLength,o.data=t,null!=r){let e=Math[a(818)](r/$[a(303)]);o[a(916)]=e}else o[a(811)]=$[a(304)]();if(null!=i){let e=Math[a(818)](i/$.timescale_);o[a(368)]=e}},parseTimedID3MetadataPayload(t,r,i,n,s){const a=e;se.debugLog($.TAG_NAME,"Timed ID3 Metadata: pid="+n+a(258)+r+a(518)+i+", stream_id="+s)},parseSynchronousKLVMetadataPayload(t,r,i,n,s){const a=e;se.debugLog($.TAG_NAME,a(980)+n+a(258)+r+a(518)+i+", stream_id="+s)},parseAsynchronousKLVMetadataPayload(t,r,i){const n=e;se[n(762)]($[n(445)],n(341)+r+", stream_id="+i)},parseSMPTE2038MetadataPayload(t,r,i,n,s){const a=e;se[a(762)]($[a(445)],a(1127)+n+a(258)+r+a(518)+i+", stream_id="+s)},getNearestTimestampMilliseconds(){const t=e;if(null!=$.audio_last_sample_pts_)return Math[t(818)]($.audio_last_sample_pts_);if(null!=$[t(1001)]){return Math.floor($.last_pcr_/300/$[t(303)])}},_preDoDecode(){const t=e,r=$[t(1146)],i=$[t(928)];let n=r[t(322)];$.correctSamplePts(r),$[t(360)](i),i.samples[t(1081)]>0&&(n=r.samples[t(1150)](i.samples),n=n[t(995)](((e,r)=>{const i=t;return e[i(368)]-r[i(368)]}))),n[t(663)]((e=>{const r=t,i=new Uint8Array(e.payload);delete e[r(979)],e.type===ge.video?$._doDecodeVideo({...e,payload:i}):e.type===ge[r(570)]&&$._doDecodeAudio({...e,payload:i})})),r[t(322)]=[],r[t(1081)]=0,i.samples=[],i.length=0},_doDecodeVideo(t){const r=e,i=new Uint8Array(t[r(979)]);let n=null;n=t[r(380)]?ni(i,t[r(308)]):Cr(i,t[r(308)]),t[r(308)]&&se[r(572)](t[r(368)]);const s=se[r(343)](n,t.isIFrame);se[r(466)](s,{type:ge[r(661)],ts:t[r(368)],isIFrame:t[r(308)],cts:t.cts})},_doDecodeAudio(t){const r=e,i=new Uint8Array(t[r(979)]),n=se[r(581)](i);se[r(466)](n,{type:ge[r(570)],ts:t[r(368)],isIFrame:!1,cts:0})},correctSamplePts(t){const r=e;let i=arguments[r(1081)]>1&&void 0!==arguments[1]?arguments[1]:5;const n=t[r(322)]||[];for(let e=0;e=s[r(368)]&&(se[r(794)]($[r(445)],"correctSamplePts dts, dts: "+t[r(368)]+r(414)+s[r(368)]+r(877)),s.dts=t[r(368)]+i)}}},ne=null;Yt()&&(ne={TAG_NAME:e(498),_resetInIt(){const t=e;ne[t(338)]=null,ne[t(899)]=null,ne[t(1155)]={},ne[t(786)]={},ne[t(585)]={},ne[t(309)]=null,ne.audioSourceBuffer=null,ne[t(477)]=!1,ne[t(645)]=!1,ne[t(227)]=!1,ne[t(353)]="",ne[t(839)]="",ne[t(1041)]={},ne.cacheAudioTrack={},ne.timeInit=!1,ne[t(290)]=0,ne[t(712)]=0,ne.firstRenderTime=null,ne[t(856)]=null,ne.mediaSourceAppendBufferFull=!1,ne[t(1031)]=!1,ne[t(681)]=!1,ne[t(978)]=!1,ne.mediaSourceError=!1,ne[t(544)]=null,ne[t(553)]=null,ne[t(687)]=null,ne.prevAudioDts=null,ne.prevPayloadBufferSize=0,ne[t(867)]=!1,ne.prevTs=null,ne[t(417)]=null,ne[t(675)]=[],ne[t(790)]=[],ne[t(550)]=[],ne[t(868)]=[],ne[t(307)]=[],ne.supportVideoFrameCallbackHandle=null,ne[t(386)]=null,ne[t(252)]=null,ne.hasPendingEos=!1,ne[t(272)]={currentTime:0,readyState:0}},init(){const t=e;ne.events=new fo,ne[t(639)](),ne[t(1153)]=new(self[t(584)]),ne.isDecodeFirstIIframe=!!Kt(se._opt[t(759)]),ne._bindMediaSourceEvents(),se[t(762)](ne.TAG_NAME,"init")},destroy(){const t=e;ne[t(772)](),ne[t(910)](),ne[t(675)]&&ne[t(675)][t(1081)]&&(ne[t(675)][t(663)]((e=>e())),ne[t(675)]=[]),ne[t(639)](),ne.mediaSource=null,se[t(762)](ne[t(445)],t(813))},getState(){const t=e;return ne[t(1153)]&&ne[t(1153)][t(598)]},isStateOpen(){const t=e;return ne.getState()===Fe[t(467)]},isStateClosed(){const t=e;return ne[t(370)]()===Fe[t(552)]},isStateEnded(){const t=e;return ne[t(370)]()===Fe[t(549)]},_bindMediaSourceEvents(){const t=e,{proxy:r}=ne.events,i=r(ne[t(1153)],Pe.sourceOpen,(()=>{const e=t;se.debugLog(ne.TAG_NAME,e(416)),ne._onMediaSourceSourceOpen()})),n=r(ne[t(1153)],Pe[t(1025)],(()=>{const e=t;se.debugLog(ne[e(445)],"sourceClose")})),s=r(ne[t(1153)],Pe.sourceended,(()=>{const e=t;se[e(762)](ne[e(445)],"sourceended")}));ne[t(675)][t(523)](i,n,s)},_onMediaSourceSourceOpen(){const t=e;!ne[t(309)]&&(se[t(762)](ne.TAG_NAME,t(449)),ne[t(482)]()),!ne[t(620)]&&(se[t(762)](ne[t(445)],t(397)),ne[t(420)]()),ne._hasPendingSegments()&&ne[t(410)]()},decodeVideo(t,r,i,n){const s=e;if(se[s(996)])se.debugWarn(ne[s(445)],s(644));else if(Kt(ne.hasInit))if(i&&t[1]===Ne.sequenceHeader){const e=15&t[0];if(e===Ce[s(914)]&&Kt(se[s(398)][s(861)]))return void ne[s(456)](Ae[s(425)]);ne.videoInfo[s(442)]=e,postMessage({cmd:ye.videoCode,code:e});const n=new Uint8Array(t);postMessage({cmd:ye[s(1096)],buffer:n,codecId:e},[n[s(610)]]),ne[s(477)]=ne[s(637)](t,r,i,e)}else se[s(794)](ne.TAG_NAME,s(516)+i+s(1162)+t[1]+" so drop this frame");else if(!ne[s(672)]&&i&&(ne[s(672)]=!0),ne[s(672)]){if(i&&0===t[1]){const e=15&t[0];let r={};if(e===Ce[s(740)]){r=Ir(t[s(871)](5))}else e===Ce[s(914)]&&(r=$r(t));const i=ne[s(1155)];i&&i[s(332)]&&i[s(473)]&&r&&r[s(670)]&&r[s(533)]&&(r[s(670)]!==i[s(332)]||r[s(533)]!==i.height)&&(se.debugWarn(ne[s(445)],"\n decodeVideo: video width or height is changed,\n old width is "+i[s(332)]+s(688)+i[s(473)]+",\n new width is "+r[s(670)]+s(558)+r[s(533)]+s(654)),ne[s(867)]=!0,ne[s(456)](Ae.mseWidthOrHeightChange,s(264)+i[s(332)]+"->"+r[s(670)]+s(1086)+i[s(473)]+"->"+r.codecHeight))}if(ne[s(867)])return void se[s(794)](ne[s(445)],s(435));if(jt(t))return void se[s(762)](ne.TAG_NAME,s(952));if(t[s(907)]0&&tfe},_decodeConfigurationRecord(t,r,i,n){const s=e;let a=t.slice(5),o={};if(n===Ce[s(740)]?o=Ir(a):n===Ce[s(914)]&&(o=ei(a)),ne[s(1155)][s(332)]=o[s(670)],ne[s(1155)].height=o[s(533)],0===o[s(670)]&&0===o[s(533)])return se[s(794)](ne.TAG_NAME,s(486),JSON[s(497)](o)),ne[s(456)](Ae[s(900)],s(943)+(0===o.codecWidth)+s(278)+o[s(533)]),!1;const c={id:Ge.video,type:s(661),timescale:1e3,duration:0,avcc:a,codecWidth:o[s(670)],codecHeight:o.codecHeight,videoType:o[s(501)]},u=yo.generateInitSegment(c);return ne[s(338)]=n===Ce.h264,o[s(442)]?ne.videoMimeType=s(591)+o.codec+'"':ne[s(353)]=ne[s(338)]?Ue[s(286)]:Ue[s(483)],postMessage({cmd:ye[s(652)],w:o[s(670)],h:o[s(533)]}),ne[s(482)](),ne[s(1156)](u[s(610)]),ne.sequenceNumber=0,ne.cacheTrack={},ne[s(289)]=!1,!0},_decodeAudioConfigurationRecord(t,r){const i=e,n=t[0]>>4&15,s=t[0]>>1&1,a=n===Be[i(1003)],o=n===Be.AAC;if(Kt(o||a))return se[i(794)](ne.TAG_NAME,i(981)+n+i(768)),ne[i(456)](Ae[i(595)]),!1;const c={id:Ge[i(570)],type:i(570),timescale:1e3};let u={};if(ht(t)){if(u=mt(t[i(871)](2)),!u)return!1;c.audioSampleRate=u[i(277)],c[i(776)]=u.channelCount,c.config=u[i(632)],c[i(874)]=1024/c[i(347)]*c[i(743)]}else{if(!a)return!1;if(u=To(t[i(871)](1)),!u)return!1;c[i(347)]=u.sampleRate,c.channelCount=u.channelCount,c[i(874)]=1152/c.audioSampleRate*c.timescale}c[i(442)]=u.codec,c[i(933)]=0;let l="mp4",h=u.codec,d=null;a&&Kt(se[i(398)][i(529)])?(l=i(596),h="",d=new Uint8Array):d=yo[i(988)](c);let f=c[i(391)]+"/"+l;return h&&h.length>0&&(f+=";codecs="+h),Kt(ne[i(227)])&&(O=n===Be[i(643)]?s?16:8:0===s?8:16,postMessage({cmd:ye[i(973)],code:n}),postMessage({cmd:ye.initAudio,sampleRate:c[i(347)],channels:c.channelCount,depth:O}),ne[i(227)]=!0),ne[i(839)]=f,ne[i(899)]=o,ne[i(420)](),ne[i(409)](d[i(610)]),!0},_initSourceBuffer(){const t=e,{proxy:r}=ne.events;if(null===ne[t(309)]&&null!==ne.mediaSource&&ne[t(989)]()&&ne[t(353)]){try{se[t(762)](ne[t(445)],t(444),ne[t(353)]),ne[t(309)]=ne[t(1153)][t(284)](ne.videoMimeType)}catch(e){return se[t(749)](ne.TAG_NAME,t(638),e.code,e[t(312)](),e),ne.emitError(Ae[t(727)],e[t(436)]),void(ne[t(681)]=!0)}if(ne[t(309)]){const e=r(ne[t(309)],t(273),(e=>{const r=t;ne[r(978)]=!0,se[r(749)](ne[r(445)],r(812),e),ne[r(456)](Ae[r(225)],r(851))})),i=r(ne[t(309)],"updateend",(()=>{const e=t;ne[e(992)]()?ne._doRemoveRanges():ne[e(931)]()?ne[e(410)]():ne[e(288)]&&(se.debugLog(ne[e(445)],e(506)),ne[e(510)]())}));ne[t(675)][t(523)](e,i)}}else se[t(762)](ne[t(445)],"_initSourceBuffer and mseDecoder.isStateOpen is "+ne.isStateOpen()+t(1034)+(null===ne[t(338)]))},_initAudioSourceBuffer(){const t=e,{proxy:r}=ne[t(619)];if(null===ne[t(620)]&&null!==ne.mediaSource&&ne[t(989)]()&&ne[t(839)]){try{se[t(762)](ne[t(445)],t(464),ne[t(839)]),ne[t(910)](),ne[t(620)]=ne.mediaSource[t(284)](ne[t(839)])}catch(e){return se[t(749)](ne[t(445)],"_initAudioSourceBuffer() addSourceBuffer mseDecoder.mediaSource.addSourceBuffer()",e[t(436)],e[t(312)](),e),ne[t(456)](Ae[t(727)],e.code),void(ne[t(681)]=!0)}if(ne[t(620)]){const e=r(ne[t(620)],"error",(e=>{const r=t;ne[r(978)]=!0,se[r(749)](ne.TAG_NAME,r(429),e),ne[r(456)](Ae[r(225)],r(298))})),i=r(ne.audioSourceBuffer,t(1043),(()=>{const e=t;ne[e(992)]()?ne._doRemoveRanges():ne[e(931)]()?ne[e(410)]():ne.hasPendingEos&&(se[e(762)](ne.TAG_NAME,"audioSourceBuffer updateend and hasPendingEos is true, next endOfStream()"),ne[e(510)]())}));ne.eventListenList[t(523)](e,i),null===ne.audioSourceNoDataCheckTimeout&&(ne[t(252)]=setTimeout((()=>{const e=t;ne[e(220)](),ne[e(456)](Ae.mediaSourceAudioNoDataTimeout)}),1e3))}}else se.debugLog(ne[t(445)],"_initAudioSourceBuffer and mseDecoder.isStateOpen is "+ne[t(989)]()+" and mseDecoder.audioMimeType is "+ne[t(839)])},_decodeVideo(t,r,i,n,s){const a=e;let o=t[a(871)](5),c=o.byteLength;if(0===c)return void se[a(794)](ne.TAG_NAME,a(1142));let u=(new Date).getTime(),l=!1;!ne[a(544)]&&(ne.prevTimestamp=u,l=!0);const h=u-ne[a(544)];if(ne.decodeDiffTimestamp=h,h>1e3&&!l&&se.isPlayer&&se[a(762)](ne[a(445)],a(773)+u+a(703)+ne[a(544)]+a(475)+h+" ms"),ne.cacheTrack.id&&r>=ne.cacheTrack[a(368)]){let e=8+ne.cacheTrack[a(881)],t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[a(319)](yo[a(824)][a(673)],4),t[a(319)](ne[a(1041)][a(522)],8),ne[a(1041)].duration=r-ne[a(1041)].dts;let i=yo[a(315)](ne.cacheTrack,ne.cacheTrack[a(368)]);ne[a(1041)]={};let n=new Uint8Array(i[a(907)]+t[a(907)]);n[a(319)](i,0),n[a(319)](t,i[a(907)]),ne.appendBuffer(n[a(610)])}else se[a(762)](ne[a(445)],a(1111)+r+a(757)+s+a(1147)+(ne[a(1041)]&&ne[a(1041)][a(368)])),ne[a(289)]=!1,ne[a(1041)]={};!ne[a(1041)]&&(ne[a(1041)]={}),ne[a(1041)].id=Ge[a(661)],ne[a(1041)][a(290)]=++ne[a(290)],ne[a(1041)][a(881)]=c,ne[a(1041)][a(368)]=r,ne[a(1041)][a(1128)]=n,ne[a(1041)][a(465)]=i,ne[a(1041)][a(522)]=o,ne.cacheTrack[a(378)]={isLeading:0,dependsOn:i?2:1,isDependedOn:i?1:0,hasRedundancy:0,isNonSync:i?0:1},ne[a(544)]=(new Date)[a(461)]()},_decodeAudio(t,r,i){const n=e;let s=ne.isAAC?t[n(871)](2):t[n(871)](1),a=s.byteLength;if(ne[n(1062)].id&&r>=ne[n(1062)][n(368)]){let e=8+ne[n(1062)].size,t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[n(319)](yo[n(824)][n(673)],4),t[n(319)](ne[n(1062)].data,8),ne[n(1062)][n(933)]=r-ne.cacheAudioTrack[n(368)];let i=yo.moof(ne[n(1062)],ne[n(1062)].dts);ne[n(1062)]={};let s=new Uint8Array(i.byteLength+t[n(907)]);s[n(319)](i,0),s.set(t,i[n(907)]),ne[n(409)](s[n(610)])}else ne[n(1062)]={};!ne[n(1062)]&&(ne[n(1062)]={}),ne[n(1062)].id=Ge[n(570)],ne[n(1062)][n(290)]=++ne.audioSequenceNumber,ne[n(1062)].size=a,ne[n(1062)].dts=r,ne[n(1062)].cts=0,ne[n(1062)][n(522)]=s,ne.cacheAudioTrack[n(378)]={isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}},appendBuffer(t){const r=e;se[r(996)]?se[r(794)](ne.TAG_NAME,r(451)):ne.mediaSourceAddSourceBufferError?se[r(794)](ne[r(445)],"mseDecoder.mediaSourceAddSourceBufferError is true"):ne[r(788)]?se.debugWarn(ne[r(445)],r(702)):ne[r(1031)]?se.debugWarn(ne[r(445)],r(1119)):ne[r(978)]?se.debugWarn(ne[r(445)],r(1027)):(ne.pendingSegments[r(523)](t),ne.sourceBuffer&&(se._opt.mseAutoCleanupSourceBuffer&&ne[r(650)]()&&ne._doCleanUpSourceBuffer(),Kt(ne[r(949)]())&&ne[r(989)]()&&Kt(ne[r(992)]()))?ne[r(410)]():ne[r(809)]()?(ne.mediaSourceBufferError=!0,ne[r(456)](Ae.mseSourceBufferError,"mediaSource is not attached to video or mediaSource is closed")):ne[r(325)]()&&(ne[r(978)]=!0,ne[r(456)](Ae.mseSourceBufferError,r(904))))},appendAudioBuffer(t){const r=e;se[r(996)]?se.debugWarn(ne[r(445)],r(306)):ne.mediaSourceAddSourceBufferError?se[r(794)](ne[r(445)],r(741)):ne[r(788)]?se.debugWarn(ne.TAG_NAME,r(702)):ne.mediaSourceAppendBufferError?se[r(794)](ne[r(445)],r(1119)):ne[r(978)]?se.debugWarn(ne[r(445)],r(1027)):(ne.pendingAudioSegments[r(523)](t),ne[r(620)]&&(se[r(398)][r(951)]&&ne[r(650)]()&&ne[r(1104)](),Kt(ne[r(438)]())&&ne[r(989)]()&&Kt(ne[r(992)]()))?ne[r(410)]():ne[r(809)]()?(ne[r(978)]=!0,ne[r(456)](Ae[r(225)],r(603))):ne[r(325)]()&&(ne[r(978)]=!0,ne[r(456)](Ae[r(225)],"mediaSource is end")))},getSourceBufferUpdating(){const t=e;return ne[t(309)]&&ne[t(309)][t(845)]},getAudioSourceBufferUpdating(){const t=e;return ne[t(620)]&&ne[t(620)][t(845)]},stop(){ne[e(666)](),ne.removeSourceBuffer(),ne.endOfStream()},clearUpAllSourceBuffer(){const t=e;if(ne[t(309)]){const e=ne[t(309)][t(440)];for(let r=0;r0||ne[t(307)].length>0},getPendingSegmentsLength(){const t=e;return ne[t(550)][t(1081)]},_doAppendSegments(){const t=e;if(ne[t(809)]()||ne.isStateEnded())se[t(762)](ne.TAG_NAME,"_doAppendSegments() mediaSource is closed or ended and return");else if(null!==ne.sourceBuffer){if(ne.needInitAudio()&&null===ne[t(620)])return se[t(762)](ne[t(445)],t(843)),void(null===ne[t(386)]&&(ne[t(386)]=setTimeout((()=>{const e=t;ne[e(910)](),ne[e(456)](Ae.mediaSourceAudioInitTimeout)}),1e3)));if(Kt(ne[t(949)]())&&ne[t(550)][t(1081)]>0){const e=ne[t(550)][t(934)]();try{ne.sourceBuffer[t(1156)](e)}catch(e){se[t(749)](ne.TAG_NAME,t(494),e[t(436)],e),22===e[t(436)]?(ne[t(772)](),ne[t(788)]=!0,ne[t(456)](Ae[t(909)],t(1117)+e[t(436)]+t(1113)+e[t(736)])):11===e[t(436)]?(ne.stop(),ne.mediaSourceAppendBufferError=!0,ne.emitError(Ae.mediaSourceAppendBufferError,t(1117)+e[t(436)]+t(1113)+e[t(736)])):(ne[t(772)](),ne[t(978)]=!0,ne[t(456)](Ae.mseSourceBufferError,t(1117)+e[t(436)]+" , message is "+e[t(736)]))}}if(Kt(ne[t(438)]())&&ne.pendingAudioSegments[t(1081)]>0){const e=ne.pendingAudioSegments[t(934)]();try{ne.audioSourceBuffer[t(1156)](e)}catch(e){se[t(749)](ne.TAG_NAME,t(607),e.code,e),22===e[t(436)]?(ne[t(772)](),ne[t(788)]=!0,ne.emitError(Ae.mediaSourceFull,t(1117)+e[t(436)]+t(1113)+e[t(736)])):11===e.code?(ne[t(772)](),ne.mediaSourceAppendBufferError=!0,ne[t(456)](Ae[t(1031)],t(1117)+e[t(436)]+" , message is "+e.message)):(ne.stop(),ne[t(978)]=!0,ne[t(456)](Ae[t(225)],e.code,"code is "+e.code+t(1113)+e[t(736)]))}}}else se[t(762)](ne[t(445)],t(432))},_doCleanUpSourceBuffer(){const t=e,r=ne[t(272)][t(823)];if(ne.sourceBuffer){const e=ne[t(309)].buffered;let i=!1;for(let n=0;n=se[t(398)][t(1148)]){i=!0;let e=r-se[t(398)][t(395)];ne[t(790)][t(523)]({start:s,end:e})}}else a=se._opt[t(1148)]){i=!0;let e=r-se._opt.mseAutoCleanupMinBackwardDuration;ne.pendingAudioRemoveRanges[t(523)]({start:s,end:e})}}else a0||ne[t(868)][t(1081)]>0},needInitAudio(){const t=e;return se[t(398)][t(947)]&&se[t(398)][t(250)]},_doRemoveRanges(){const t=e;if(ne[t(309)]&&Kt(ne[t(949)]())){let e=ne.pendingRemoveRanges;for(;e.length&&Kt(ne[t(949)]());){let r=e[t(934)]();try{ne.sourceBuffer[t(803)](r[t(826)],r[t(317)])}catch(e){se[t(794)](ne[t(445)],t(361),e,e[t(312)]())}}}if(ne[t(620)]&&Kt(ne.getAudioSourceBufferUpdating())){let e=ne[t(868)];for(;e[t(1081)]&&Kt(ne.getAudioSourceBufferUpdating());){let r=e.shift();try{ne[t(620)][t(803)](r[t(826)],r[t(317)])}catch(e){se[t(794)](ne[t(445)],t(834),e,e[t(312)]())}}}},_getPlaybackRate(){},_needCleanupSourceBuffer(){const t=e;if(Kt(se[t(398)][t(951)]))return!1;const r=ne[t(272)][t(823)];if(ne.sourceBuffer){let e=ne[t(309)][t(440)];if(e.length>=1&&r-e[t(826)](0)>=se[t(398)][t(1148)])return!0}if(ne.audioSourceBuffer){let e=ne.audioSourceBuffer.buffered;if(e.length>=1&&r-e.start(0)>=se._opt[t(1148)])return!0}return!1},_clearAudioSourceBufferCheckTimeout(){const t=e;ne[t(386)]&&(clearTimeout(ne[t(386)]),ne.audioSourceBufferCheckTimeout=null)},_clearAudioNoDataCheckTimeout(){const t=e;ne[t(252)]&&(clearTimeout(ne[t(252)]),ne[t(252)]=null)},getHandle:()=>ne[e(1153)].handle,emitError(t){const r=e;let i=arguments[r(1081)]>1&&void 0!==arguments[1]?arguments[1]:"";postMessage({cmd:ye[r(1049)],value:t,msg:i})}});let se={isPlayer:!0,isHevc:null,isPlayVod:!1,isPlayback:!1,isPlaybackPause:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:Ve[e(561)],_opt:K(),mp3Demuxer:null,delay:-1,pushLatestDelay:-1,firstTimestamp:null,startTimestamp:null,preDelayTimestamp:null,stopId:null,streamFps:null,streamAudioFps:null,streamVideoFps:null,writableStream:null,networkDelay:0,webglObj:null,socketStatus:ke[e(337)],startStreamRateAndStatsInterval:function(){const t=e;se[t(265)](),h=setInterval((()=>{const e=t;l&&l(0);const r=JSON.stringify({demuxBufferDelay:se[e(807)](),audioDemuxBufferDelay:se[e(480)](),streamBufferByteLength:se[e(1020)](),netBuf:se[e(1125)]||0,pushLatestDelay:se[e(493)]||0,latestDelay:se[e(323)],isStreamTsMoreThanLocal:S,wasmDecodeDelay:g-b});if(postMessage({cmd:ye[e(310)],type:Ie[e(1040)],value:r}),Xt()){null===W&&(W=Et());Zt(Et()-W)&&se[e(1145)]()}}),1e3)},stopStreamRateAndStatsInterval:function(){h&&(clearInterval(h),h=null)},_startCheckWsOpenTimeout:function(){const t=e;se[t(684)](),j=setTimeout((()=>{const e=t;if(se[e(509)]===ke[e(337)]){const t=e(471)+se[e(398)].websocketOpenTimeout+e(256)+se[e(509)];se[e(749)](e(771),t),postMessage({cmd:ye[e(310)],type:Ae[e(1105)],value:te.websocket,msg:t})}}),1e3*se._opt[t(1105)])},_stopCheckWsOpenTimeout:function(){j&&(clearTimeout(j),j=null)},useOffscreen:function(){const t=e;return se[t(398)][t(1083)]&&typeof OffscreenCanvas!=t(514)},getDelay:function(t,r){const i=e;if(!t||se[i(398)][i(791)]&&!y)return-1;if(r===ge[i(570)])return se[i(323)];if(se[i(655)]&&se.preDelayTimestamp>t)return se[i(655)]-t>1e3&&se[i(794)](i(771),i(599)+se[i(655)]+i(352)+t+i(799)+(se[i(655)]-t)+i(527)+se[i(323)]),se[i(655)]=t,se[i(323)];if(se[i(606)]){if(t){const e=Date[i(446)]()-se.startTimestamp,r=t-se[i(606)];e>=r?(S=!1,se[i(323)]=e-r):(S=!0,se[i(323)]=r-e)}}else se[i(606)]=t,se[i(1024)]=Date[i(446)](),se[i(323)]=-1;return se[i(655)]=t,se[i(323)]},getDelayNotUpdateDelay:function(t,r){const i=e;if(!t||se._opt[i(791)]&&!y)return-1;if(r===ge.audio)return se.pushLatestDelay;if(se.preDelayTimestamp&&se.preDelayTimestamp-t>1e3)return se[i(794)](i(771),"getDelayNotUpdateDelay() and preDelayTimestamp is "+se[i(655)]+" > timestamp is "+t+" more than "+(se[i(655)]-t)+i(418)),-1;if(se[i(606)]){let e=-1;if(t){const r=Date[i(446)]()-se[i(1024)],n=t-se[i(606)];r>=n?(S=!1,e=r-n):(S=!0,e=n-r)}return e}return-1},resetDelay:function(){const t=e;se.firstTimestamp=null,se[t(1024)]=null,se[t(323)]=-1,se[t(248)]=!1},resetAllDelay:function(){se.resetDelay(),se.preDelayTimestamp=null},doDecode:function(t){const r=e;se[r(398)][r(746)]&&t[r(391)]===ge[r(661)]&&se[r(243)]&&se[r(993)](t[r(979)],t.ts),se.isPlayUseMSEAndDecoderInWorker()?t.type===ge[r(570)]?se._opt[r(250)]?ne[r(696)](t[r(979)],t.ts):t[r(969)][r(466)](t[r(979)],t.ts):t[r(391)]===ge[r(661)]&&ne.decodeVideo(t[r(979)],t.ts,t[r(308)],t[r(1128)]):se._opt[r(535)]&&se.useOffscreen()&&t[r(391)]===ge[r(661)]&&o[r(466)]?o[r(466)](t[r(979)],t.ts,t.cts):t[r(969)][r(466)](t.payload,t.ts,t[r(308)],t[r(1128)])},decodeNext(t){const r=e;if(0===s[r(1081)])return;const n=t.ts,a=s[0],o=t[r(391)]===ge[r(661)]&&jt(t[r(979)]);if(Kt(i))o&&(se[r(762)](r(771),r(517)+t[r(391)]+r(932)+n+r(919)+a[r(391)]+" ts is "+a.ts+r(778)+o),s[r(934)](),se.doDecode(a));else{const e=a.ts-n,i=a.type===ge.audio&&t.type===ge[r(661)];(e<=20||i||o)&&(se[r(762)](r(771),r(517)+t[r(391)]+" and\n ts is "+n+" next data type is "+a[r(391)]+r(664)+a.ts+r(903)+e+r(573)+i+r(1102)+o),s.shift(),se.doDecode(a))}},init:function(){const t=e;se.debugLog("worker",t(1085)+i+" and forOldVersion is "+n+t(796),JSON[t(497)](se[t(398)]));const r=se._opt[t(704)]===re[t(427)],a=se._opt[t(704)]===re[t(235)],c=se[t(398)][t(704)]===re[t(1107)];if(se[t(398)][t(302)]&&J[t(257)](),se.isPlayer=r,se[t(957)]=a,se.isPlayVod=c,se[t(305)]()&&ne&&ne[t(257)](),o&&se[t(398)].useWCS&&se[t(1083)]()&&o.init(),Kt(se[t(724)]())){se.debugLog(t(771),t(693));const e=()=>{const e=t,i=se[e(398)].videoBuffer+se[e(398)][e(709)];let n=null;if(s[e(1081)]){if(se.isPushDropping)return void se[e(794)](e(771),e(941)+s[e(1081)]);if(se[e(248)]){for(n=s[e(934)](),se[e(794)](e(771),e(1070)+n[e(308)]+e(488)+se.delay+e(405)+s[e(1081)]);!n.isIFrame&&s[e(1081)];)n=s[e(934)]();const t=se[e(363)](n.ts,n[e(391)]);n[e(308)]&&t<=se[e(246)]()&&(se[e(762)]("worker","loop() is dropping = false, is iFrame"),se.dropping=!1,se[e(1010)](n),se[e(647)](n))}else if(se[e(957)]||se[e(402)]()||0===se[e(398)][e(859)])for(;s.length;)n=s[e(934)](),se.doDecode(n);else if(n=s[0],-1===se.getDelay(n.ts,n.type))se[e(762)]("worker",e(1143),n.ts),s[e(934)](),se[e(1010)](n),se[e(647)](n);else if(se[e(323)]>i&&r)se[e(505)]()?(se.debugLog(e(771),e(503)+se[e(323)]+" > maxDelay "+i+e(406)),se[e(1132)](),se[e(248)]=!0,postMessage({cmd:ye[e(887)]})):(s.shift(),se.doDecode(n),se.decodeNext(n));else for(;s[e(1081)];){if(n=s[0],!(se[e(470)](n.ts,n.type)>se[e(398)][e(859)])){se.delay<0&&se.debugWarn(e(771),e(1028)+se.delay+e(539)+s[e(1081)]);break}s[e(934)](),se[e(1010)](n)}}else-1!==se[e(323)]&&se[e(762)](e(771),"loop() bufferList is empty and reset delay"),se.resetAllDelay()};se[t(479)]=setInterval((()=>{const r=t;let i=(new Date)[r(461)]();!I&&(I=i);const n=i-I;n>100&&se[r(794)](r(771),"loop demux diff time is "+n),e(),I=(new Date)[r(461)]()}),20)}else se.debugLog(t(771),t(948));if(Kt(se[t(398)][t(759)])&&(y=!0),se[t(305)]()&&ne){const e=ne[t(216)]();e&&postMessage({cmd:ye[t(695)],mseHandle:e},[e])}},playbackCacheLoop:function(){const t=e;se[t(945)]();for(let e=0;e{const e=t,i=(new Date)[e(461)]();!q&&(q=i);for(let t=0;t1&&s[e(1081)]>0&&se.debugWarn(e(771),"playbackCacheLoop sync frame duration is "+n+"ms and fragDuration is "+r+e(1046)+a+e(797)+s[e(1081)]),q=i}),r)},doPlaybackCacheLoop:function(){const t=e;let r=null;if(s[t(1081)])if(r=s.shift(),r[t(391)]===ge[t(661)]){se[t(939)]()?r.isIFrame&&(se[t(762)](t(771),t(356),r.ts),se[t(1010)](r)):se.doDecode(r);let e=s[0];for(;e&&e[t(391)]===ge.audio;)s[t(934)](),se.isPlaybackOnlyDecodeIFrame()||se[t(1010)](e),e=s[0]}else if(r.type===ge[t(570)]){se[t(939)]()||se[t(1010)](r);let e=s[0];for(;e;){if(r=s[t(934)](),r[t(391)]===ge[t(661)]){se.isPlaybackOnlyDecodeIFrame()?r[t(308)]&&(se[t(762)](t(771),t(356),r.ts),se.doDecode(r)):se[t(1010)](r),e=null;break}r[t(391)]===ge[t(570)]&&(se.isPlaybackOnlyDecodeIFrame()||se[t(1010)](r),e=s[0])}}},clearPlaybackCacheLoop:function(){const t=e;se.stopId&&(clearInterval(se[t(479)]),se[t(479)]=null),q=null},startPlaybackCacheLoop:function(){se[e(983)]()},close:function(){const t=e;if(se[t(762)](t(771),"close"),se[t(996)]=!0,Y(),!u||1!==u[t(598)]&&2!==u[t(598)]?u&&se.debugLog(t(771),t(701)+u.readyState):(z=!0,u.close(1e3,"Client disconnecting")),u&&(u[t(882)]=null,u[t(267)]=null,u[t(725)]=null,u.onerror=null,se.socketStatus=ke[t(337)]),u=null,se[t(265)](),se[t(684)](),se[t(945)](),se[t(479)]&&(clearInterval(se[t(479)]),se[t(479)]=null),se[t(747)]&&(se.mp3Demuxer[t(813)](),se[t(747)]=null),se.writableStream&&(Nt(se[t(855)][t(1145)])&&Kt(se[t(855)][t(1038)])?se.writableStream[t(1145)]().catch((e=>{const r=t;se[r(762)]("worker","close() and writableStream.close() error",e[r(312)](),e)})).finally((()=>{se[t(855)]=null})):se[t(855)]=null),ae)try{Nt(ae[t(1144)])&&ae[t(1144)](),Nt(ae[t(212)])&&ae[t(212)](),ae=null}catch(e){se[t(762)]("worker",t(263)+e[t(312)]()+t(982))}if(oe)try{Nt(oe[t(1144)])&&oe.clear(),Nt(oe[t(212)])&&oe[t(212)](),oe=null}catch(e){se[t(762)](t(771),t(447)+e.toString()+t(982))}l=null,I=null,S=!1,g=0,b=0,o&&(o.destroy&&o[t(813)](),o=null),ne&&(ne[t(813)](),ne=null),se[t(606)]=null,se[t(1024)]=null,se.networkDelay=0,se[t(1066)]=null,se[t(565)]=null,se.streamVideoFps=null,se[t(323)]=-1,se[t(493)]=-1,se[t(655)]=null,se[t(248)]=!1,se[t(633)]=!1,se[t(924)]=!0,se[t(957)]=!1,se.isPlaybackPause=!1,se[t(669)]=!1,se.isWorkerFetch=!1,se[t(380)]=null,se._opt=K(),se.webglObj&&(se[t(691)][t(813)](),se[t(431)].removeEventListener("webglcontextlost",se.onOffscreenCanvasWebglContextLost),se[t(431)][t(269)](t(1073),se[t(1051)]),se[t(431)]=null,se[t(335)]=null,se[t(224)]=null),s=[],a=[],d&&(d.close(),d=null),p=null,m=null,_=!1,v=!1,y=!1,P=!1,L=!1,R=!1,N=null,k=[],x=0,B=0,w=null,A=null,T=null,D=null,O=null,M=0,U=0,F=null,E=null,C=null,se.fetchStatus=Ve[t(561)],H=!0,J.destroy(),X[t(813)](),Q[t(813)](),$[t(813)](),se[t(543)]=null,se[t(398)]={},postMessage({cmd:ye[t(793)]})},pushBuffer:function(t,r){const n=e;if(r[n(391)]===ge[n(570)]&&ht(t)){if(se[n(762)](n(771),"pushBuffer audio ts is "+r.ts+n(222)),se[n(398)][n(568)]){const e=new Uint8Array(t);postMessage({cmd:ye[n(1050)],buffer:e},[e.buffer])}se[n(696)](t,r.ts)}else if(r.type===ge[n(661)]&&r[n(308)]&&jt(t)){if(se.debugLog(n(771),n(897)+r.ts+", isVideoSequenceHeader is true"),se._opt.isRecordTypeFlv){const e=new Uint8Array(t);postMessage({cmd:ye[n(822)],buffer:e},[e[n(610)]])}se[n(929)](t,r.ts,r[n(308)],r[n(1128)])}else{if(se[n(398)][n(1019)])if(se._opt[n(568)]){const e=new Uint8Array(t);postMessage({cmd:ye[n(908)],type:r.type,buffer:e,ts:r.ts},[e[n(610)]])}else if(se._opt[n(831)]===ie[n(1064)])if(r[n(391)]===ge.video){const e=new Uint8Array(t)[n(871)](5);postMessage({cmd:ye[n(1029)],buffer:e,isIFrame:r.isIFrame,ts:r.ts,cts:r[n(1128)]},[e[n(610)]])}else if(r.type===ge[n(570)]&&se._opt[n(609)]){const e=new Uint8Array(t),i=dt(e)?e.slice(2):e[n(871)](1);postMessage({cmd:ye[n(806)],buffer:i,ts:r.ts},[i[n(610)]])}if(se[n(924)]){if(r[n(391)]===ge[n(661)]){if(M>0){const e=r.ts-D,t=2*M;e>=t&&se.debugLog(n(771),n(718)+r[n(308)]+n(229)+r.ts+n(1082)+D+",\n diff is "+e+n(1058)+M+n(1161)+t+"\n maybe trigger black screen or flower screen\n ")}if(null!==D&&D>=r.ts&&(se[n(794)](n(771),"pushBuffer() and isIFrame is "+r[n(308)]+n(779)+r.ts+n(815)+D+" and\n payloadBufferSize is "+t[n(907)]+" and prevPayloadBufferSize is "+U),D-r.ts>fe&&(se[n(794)](n(771),n(782)+D+n(259)+r.ts+",\n diff is "+(D-r.ts)+" more than "+fe+n(301)),se.resetAllDelay(),D=null,M=0),se._opt[n(1100)]&&Kt(r[n(308)])&&y)){const e=se[n(505)](),t=Kt(se[n(633)]);return se[n(762)](n(771),"pushBuffer, isDropSameTimestampGop is true and\n hasIframe is "+e+n(365)+t+n(434)),void(e&&t?se[n(884)]():(se[n(893)](!0),qt(se[n(398)].checkFirstIFrame)&&qt(i)&&(se[n(305)]()?ne[n(672)]=!1:postMessage({cmd:ye.checkFirstIFrame}))))}D>0&&(M=r.ts-D),U=t[n(907)],D=r.ts}if(y){const e=se[n(398)][n(859)]+se._opt[n(709)],t=se.getDelayNotUpdateDelay(r.ts,r[n(391)]);se[n(493)]=t,se[n(323)]>0&&t>e&&se[n(323)]({type:e[t(391)],ts:e.ts})));se.debugLog(t(771),t(1118)+e+t(384)+s[t(1081)]+", and ts list is "+JSON[t(497)](r));const i=100;s.length>=i&&(se[t(794)](t(771),"playbackCacheBeforeDecodeForFpsRender, bufferListLength is "+s[t(1081)]+" more than "+i+t(372)),se.streamVideoFps=25,postMessage({cmd:ye.playbackStreamVideoFps,value:se[t(1097)]}),se[t(1066)]=se[t(1097)],se[t(983)]())}}},getVideoBufferLength(){const t=e;let r=0;return s[t(663)]((e=>{e[t(391)]===ge.video&&(r+=1)})),r},hasIframeInBufferList:()=>s.some((e=>{const t=uc;return e[t(391)]===ge[t(661)]&&e.isIFrame})),isAllIframeInBufferList(){const t=e,r=se[t(807)]();let i=0;return s.forEach((e=>{const r=t;e[r(391)]===ge.video&&e[r(308)]&&(i+=1)})),r===i},getNotDroppingDelayTs(){const t=e;return se._opt.videoBuffer+se[t(398)][t(709)]/2},getAudioBufferLength(){let e=0;return s.forEach((t=>{t[uc(391)]===ge.audio&&(e+=1)})),e},getStreamBufferLength(){const t=e;let r=0;return d&&d.buffer&&(r=d[t(610)][t(907)]),se._opt.isNakedFlow?J[t(967)]&&(r=J[t(967)][t(907)]):se[t(398)][t(658)]?$[t(359)]&&(r=$._remainingPacketData[t(907)]):se._opt.isFmp4&&X[t(1114)]&&(r=X.mp4Box.getStreamBufferSize()),r},fetchStream:function(t){const r=e;let i=arguments[r(1081)]>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[r(1081)]>2&&void 0!==arguments[2]?arguments[2]:[];if(se[r(762)](r(771),r(489)+t,r(364),JSON[r(497)](i)),se[r(243)]=!0,i.isFlv?se._opt.isFlv=!0:i[r(833)]?se[r(398)][r(833)]=!0:i[r(857)]?se[r(398)][r(857)]=!0:i[r(302)]?se[r(398)][r(302)]=!0:i[r(658)]&&(se._opt.isTs=!0),l=Tt((e=>{postMessage({cmd:ye[r(310)],type:Ie.streamRate,value:e})})),se[r(257)](),se.startStreamRateAndStatsInterval(),i[r(833)]&&X[r(721)](),i[r(1110)]===ee[r(656)]){i.isFlv&&(d=new sr(se[r(625)]())),c=new AbortController;const e=Object[r(729)]({signal:c[r(297)]},{headers:i[r(944)]&&i[r(944)][r(459)]||{}});fetch(t,e)[r(1071)]((e=>{const t=r;if(qt(z))return se[t(762)]("worker",t(795)),se[t(1080)]=Ve[t(561)],void e.body[t(569)]();if(!Gt(e))return se[t(794)](t(771),"fetch response status is "+e[t(1026)]+t(1138)+e.ok+t(640)),Y(),void postMessage({cmd:ye[t(310)],type:Ae.fetchError,value:"fetch response status is "+e[t(1026)]+t(1138)+e.ok});if(postMessage({cmd:ye[t(310)],type:Ie[t(389)]}),zt())se[t(855)]=new WritableStream({write:e=>{const r=t;return c&&c[r(297)]&&c[r(297)][r(975)]?(se[r(762)](r(771),"writableStream write() and abortController.signal.aborted is true so return"),void(se[r(1080)]=Ve.complete)):qt(z)?(se.debugLog("worker","writableStream write() and requestAbort is true so return"),se[r(1080)]=Ve.complete,void Y()):void(typeof e!==r(1055)?(se.fetchStatus=Ve[r(213)],l(e[r(907)]),i[r(331)]?d.write(e):i[r(833)]?se.demuxFmp4(e):i.isMpeg4?se[r(679)](e):i[r(658)]?se[r(1072)](e):i[r(302)]&&se[r(254)](e)):se.debugWarn(r(771),'writableStream write() and value is "'+e+r(452)))},close:()=>{const e=t;se[e(762)](e(771),"writableStream close()"),se[e(1080)]=Ve[e(586)],Y(),se[e(398)].checkStreamEnd?(d&&(d[e(1145)](),d=null),postMessage({cmd:ye[e(310)],type:Ie.streamEnd,value:te[e(656)],msg:e(898)})):postMessage({cmd:ye[e(310)],type:Ie.streamEndInner})},abort:e=>{const r=t;if(c&&c[r(297)]&&c[r(297)][r(975)])return se[r(762)](r(771),"writableStream abort() and abortController.signal.aborted is true so return"),void(se[r(1080)]=Ve[r(586)]);d&&(d[r(1145)](),d=null),e[r(530)]!==Re.abort?(se[r(762)](r(771),r(1056)+e[r(312)]()),Y(),postMessage({cmd:ye[r(310)],type:Ae[r(502)],value:e.toString()})):se.debugLog(r(771),r(1108))}}),e[t(1065)].pipeTo(se[t(855)])[t(266)]((e=>{const r=t;e[r(530)]!==r(602)&&se[r(762)](r(771),r(923),e.name,e[r(312)]())}));else{const r=e[t(1065)][t(627)](),n=()=>{const e=t;r[e(1060)]().then((t=>{const r=e;let{done:s,value:a}=t;return s?(se[r(762)]("worker",r(342)),se[r(1080)]=Ve[r(586)],Y(),void(se[r(398)][r(592)]?(d&&(d[r(1145)](),d=null),postMessage({cmd:ye[r(310)],type:Ie[r(242)],value:te[r(656)],msg:r(898)})):postMessage({cmd:ye[r(310)],type:Ie.streamEndInner}))):c&&c[r(297)]&&c[r(297)][r(975)]?(se.debugLog(r(771),"fetchNext().then() and abortController.signal.aborted is true so return"),void(se.fetchStatus=Ve[r(586)])):qt(z)?(se[r(762)](r(771),"fetchNext().then() and requestAbort is true so return"),se.fetchStatus=Ve.complete,void Y()):void(typeof a!==r(1055)?(se[r(1080)]=Ve[r(213)],l(a.byteLength),i[r(331)]?d[r(600)](a):i.isFmp4?se[r(780)](a):i[r(857)]?se[r(679)](a):i[r(658)]?se[r(1072)](a):i[r(302)]&&se[r(254)](a),n()):se[r(794)]("worker",r(977)+a+r(769)))}))[e(266)]((t=>{const r=e;if(c&&c[r(297)]&&c.signal[r(975)])return se[r(762)](r(771),r(428)),void(se.fetchStatus=Ve[r(586)]);d&&(d[r(1145)](),d=null),t[r(530)]!==Re[r(320)]?(se[r(762)]("worker",r(358)+t[r(312)]()),Y(),postMessage({cmd:ye[r(310)],type:Ae[r(502)],value:t[r(312)]()})):se[r(762)](r(771),r(605))}))};n()}}))[r(266)]((e=>{const t=r;c&&c.signal&&c[t(297)][t(975)]?se[t(762)](t(771),t(274)):e[t(530)]!==Re[t(320)]?(se.debugLog("worker",t(221)+e[t(312)]()),Y(),postMessage({cmd:ye[t(310)],type:Ae.fetchError,value:e[t(312)]()}),d&&(d[t(1145)](),d=null)):se[t(762)](t(771),t(700))}))}else i[r(1110)]===ee.websocket&&(i.isFlv&&(d=new sr(se[r(625)]())),u=new WebSocket(t,n),u[r(913)]=r(500),u.onopen=()=>{const e=r;se[e(762)](e(771),"fetchStream, WebsocketStream socket open"),se.socketStatus=ke.open,se._stopCheckWsOpenTimeout(),postMessage({cmd:ye[e(310)],type:Ie[e(389)]}),postMessage({cmd:ye[e(310)],type:Ie[e(532)]}),i[e(944)]&&i[e(944)][e(542)]&&se[e(247)](i[e(944)][e(542)])},u[r(725)]=e=>{const t=r;if(se[t(996)])return void se[t(762)]("worker",t(294)+e[t(436)]+t(576));if(f)return void se[t(762)](t(771),"fetchStream, WebsocketStream socket close and code is "+e.code+t(963));if(se.debugLog(t(771),t(294)+e.code),qt(z))return void se[t(762)](t(771),t(559));let i=!1;1006===e[t(436)]&&(se[t(749)]("worker",t(616)+e[t(436)]),i=!0),se[t(509)]=ke[t(1145)],se[t(398)][t(592)]||i?(d&&(d[t(1145)](),d=null),postMessage({cmd:ye.workerFetch,type:Ie.streamEnd,value:te[t(485)],msg:e[t(436)]})):postMessage({cmd:ye[t(310)],type:Ie.streamEndInner})},u[r(401)]=e=>{const t=r;se[t(749)](t(771),t(589),e,e[t(312)]()),f=!0,se[t(509)]=ke[t(273)],d&&(d[t(1145)](),d=null),se[t(996)]?se[t(762)](t(771),t(844)):qt(z)?se[t(762)](t(771),t(911)):postMessage({cmd:ye.workerFetch,type:Ae[t(377)],value:e[t(733)]?t(422):t(292)})},u[r(267)]=e=>{const t=r;typeof e.data!==t(1055)?(l(e[t(522)][t(907)]),i.isFlv?d[t(600)](e[t(522)]):i[t(833)]?se.demuxFmp4(e[t(522)]):i[t(857)]?se[t(679)](e[t(522)]):se[t(398)][t(302)]?se[t(254)](e.data):se[t(398)][t(658)]?se[t(1072)](e[t(522)]):se[t(896)](e[t(522)])):postMessage({cmd:ye[t(901)],value:e[t(522)]})})},demuxFlv:function*(){const t=e;yield 9;const r=new ArrayBuffer(4),i=new Uint8Array(r),n=new Uint32Array(r);for(;;){i[3]=0;const e=yield 15,r=e[4];i[0]=e[7],i[1]=e[6],i[2]=e[5];const s=n[0];i[0]=e[10],i[1]=e[9],i[2]=e[8],i[3]=e[11];let a=n[0];const o=(yield s)[t(871)]();switch(r){case be[t(570)]:if(o.byteLength>0){const e=se[t(581)](o);se[t(466)](e,{type:ge[t(570)],ts:a})}else se[t(794)](t(771),t(876)+o.byteLength+t(1052));break;case be[t(661)]:if(o[t(907)]>=6){const e=o[0];if(se[t(635)](e))se[t(537)](o,a);else{const e=15&o[0];let r=o[0]>>4===ze;const i=e===Ce.h265;if(t(740),Kt(r)&&qt(Jt(o,i))&&(se[t(762)](t(771),"demux() isIFrame is false and unit type is IDR and update to true"),r=!0),r&&jt(o)&&null===se[t(380)]){const e=15&o[0];se[t(380)]=e===Ce[t(914)],N=At(o,se[t(380)]),se.debugLog(t(771),"demuxFlv() isVideoSequenceHeader is true and isHevc is "+se[t(380)]+t(854)+N)}r&&se.calcIframeIntervalTimestamp(a),se[t(924)]&&se[t(468)](a),n[0]=o[4],n[1]=o[3],n[2]=o[2],n[3]=0;let s=n[0],c=se.cryptoPayload(o,r);se[t(466)](c,{type:ge[t(661)],ts:a,isIFrame:r,cts:s})}}else se[t(794)]("worker","demuxFlv() type is video and payload.byteLength is "+o[t(907)]+t(1052));break;case be[t(753)]:postMessage({cmd:ye.flvScriptData,buffer:o},[o[t(610)]]);break;default:se[t(762)](t(771),t(472)+r)}}},decode:function(t,r){const i=e;r[i(391)]===ge[i(570)]?se._opt.hasAudio&&(postMessage({cmd:ye[i(310)],type:Ie.streamAbps,value:t[i(907)]}),se[i(924)]?se[i(1109)](t,{type:r.type,ts:r.ts,cts:r[i(1128)]}):se[i(957)]&&(se.isPlaybackOnlyDecodeIFrame()||(se[i(724)]()?se.pushBuffer(t,{type:r[i(391)],ts:r.ts,cts:r[i(1128)]}):se[i(1109)](t,{type:r.type,ts:r.ts,cts:r[i(1128)]})))):r.type===ge[i(661)]&&se[i(398)][i(791)]&&(postMessage({cmd:ye[i(310)],type:Ie.streamVbps,value:t[i(907)]}),postMessage({cmd:ye[i(310)],type:Ie[i(847)],value:r.ts}),se.isPlayer?se.pushBuffer(t,{type:r.type,ts:r.ts,isIFrame:r[i(308)],cts:r.cts}):se[i(957)]&&(se.isPlaybackCacheBeforeDecodeForFpsRender()?se.pushBuffer(t,{type:r[i(391)],ts:r.ts,cts:r.cts,isIFrame:r.isIFrame}):se[i(939)]()?r[i(308)]&&se[i(1109)](t,{type:r.type,ts:r.ts,cts:r[i(1128)],isIFrame:r[i(308)]}):se[i(1109)](t,{type:r.type,ts:r.ts,cts:r[i(1128)],isIFrame:r[i(308)]})))},cryptoPayload:function(t,r){const i=e;let n=t;return se[i(398)][i(460)]?se[i(398)][i(1106)]&&se[i(398)][i(1106)][i(907)]>0&&se[i(398)][i(234)]&&se[i(398)][i(234)][i(907)]>0?n=ma(t,se[i(398)][i(234)],se[i(398)][i(1106)],se.isHevc):se[i(749)](i(771),"isM7sCrypto cryptoKey.length is "+(se[i(398)][i(234)]&&se[i(398)][i(234)][i(907)])+" or cryptoIV.length is "+(se._opt[i(1106)]&&se[i(398)][i(1106)][i(907)])+i(946)):se._opt.isSm4Crypto?se[i(398)][i(369)]?n=se._opt.cryptoIV&&se._opt[i(1106)].byteLength>0&&se[i(398)].cryptoKey&&se[i(398)].cryptoKey[i(907)]>0?ac(t,se._opt[i(234)],se[i(398)][i(1106)],se[i(380)],se[i(398)][i(1158)]):ja(t,se[i(398)][i(369)],se[i(380)],se[i(398)].isSm4CryptoH265V2):!se[i(398)].sm4CryptoKey&&se[i(749)]("worker","isSm4Crypto opt.sm4CryptoKey is null"):se._opt[i(937)]&&(se[i(398)][i(1106)]&&se[i(398)].cryptoIV[i(907)]>0&&se[i(398)][i(234)]&&se._opt[i(234)].byteLength>0?n=so(t,se[i(398)][i(234)],se[i(398)].cryptoIV,se[i(380)]):se[i(749)](i(771),i(233)+(se._opt.cryptoKey&&se[i(398)].cryptoKey[i(907)])+i(883)+(se._opt[i(1106)]&&se[i(398)][i(1106)][i(907)])+i(946))),n},cryptoPayloadAudio:function(t){const r=e;if(Kt(se._opt[r(574)]))return t;let i=t;if(se[r(398)].isM7sCrypto)if(se[r(398)][r(1106)]&&se._opt[r(1106)].byteLength>0&&se[r(398)][r(234)]&&se._opt[r(234)].byteLength>0){t[0]>>4===Be.AAC&&(i=_a(t,se[r(398)][r(234)],se._opt[r(1106)]))}else se[r(749)](r(771),r(564)+(se._opt.cryptoKey&&se[r(398)][r(234)].byteLength)+" or cryptoIV.length is "+(se[r(398)][r(1106)]&&se._opt[r(1106)][r(907)])+r(946));else if(se[r(398)][r(937)])if(se[r(398)].cryptoIV&&se._opt[r(1106)].byteLength>0&&se[r(398)][r(234)]&&se[r(398)][r(234)][r(907)]>0){t[0]>>4===Be[r(643)]&&(i=ao(t,se[r(398)][r(234)],se._opt.cryptoIV))}else se.debugError(r(771),r(233)+(se[r(398)][r(234)]&&se[r(398)][r(234)][r(907)])+r(883)+(se[r(398)].cryptoIV&&se._opt[r(1106)].byteLength)+" null");return i},setCodecAudio:function(t,r){const i=e,s=t[0]>>4,a=t[0]>>1&1;if(O=s===Be[i(643)]?a?16:8:0===a?8:16,ae&&ae[i(415)]||!Kt(n))if(ht(t)||s===Be[i(557)]||s===Be.MULAW||s===Be.MP3){se[i(762)]("worker",i(974)+s+" _opt.sampleRate is "+se[i(398)].sampleRate);const e=s===Be.AAC?t.slice(2):new Uint8Array(0);if(n){if(s===Be[i(1003)])return void se[i(749)](i(771),i(986));ae[i(631)]=se[i(398)][i(277)],ae.decode(t,r)}else ae[i(415)](s,se[i(398)][i(277)],e,se[i(935)]());if(s===Be[i(643)]&&postMessage({cmd:ye[i(411)],buffer:e},[e[i(610)]]),v=!0,s!==Be.AAC&&(s===Be.MP3?(!se[i(747)]&&(se[i(747)]=new eo(se),se[i(747)].on(i(522),((e,t)=>{ae[i(466)](e,t)}))),se[i(747)][i(942)](t[i(871)](1),r)):ae.decode(t[i(871)](1),r)),Xt()){const e=Number("1")||1;setTimeout((()=>{const e=i;se.debugError("worker",e(1134)),se[e(1145)](),postMessage({cmd:ye[e(348)]})}),60*e*60*1e3)}}else se[i(794)]("worker",i(820),s);else se[i(749)](i(771),"setCodecAudio: audioDecoder or audioDecoder.setCodec is null")},decodeAudio:function(t,r){const s=e;if(se[s(996)])se.debugLog("worker",s(1057));else if(se[s(1044)]())ne[s(696)](t,r);else if(qt(i)&&qt(se[s(398)][s(250)]))postMessage({cmd:ye[s(318)],payload:t,ts:r,cts:r},[t[s(610)]]);else{const e=t[0]>>4;if(v){if(ht(t))return void se[s(762)](s(771),"decodeAudio and has already initialized and payload is aac codec packet so drop this frame");n?ae[s(466)](t,r):e===Be[s(1003)]?se[s(747)][s(942)](t[s(871)](1),r):ae[s(466)](e===Be.AAC?t[s(871)](2):t[s(871)](1),r)}else se[s(991)](t,r)}},setCodecVideo:function(t,r){const i=e,s=15&t[0];if(oe&&oe[i(415)]||!Kt(n))if(jt(t))if(s===Ce[i(740)]||s===Ce.h265){se[i(762)](i(771),"setCodecVideo: init video codec , codecId is "+s);const e=t.slice(5);if(s===Ce[i(740)]&&se[i(398)][i(566)]){const t=Ir(e);if(t[i(670)]>pe||t[i(533)]>pe)return postMessage({cmd:ye[i(1112)],value:"width: "+t.codecWidth+i(1074)+pe+i(1086)+t[i(533)]+" > "+pe}),void se[i(794)](i(771),i(891)+t[i(670)]+i(1139)+t.codecHeight)}const r=new Uint8Array(t);_=!0,n?oe.decode(t,0):oe.setCodec(s,e,se[i(935)]()),postMessage({cmd:ye[i(785)],code:s}),postMessage({cmd:ye[i(1096)],buffer:r,codecId:s},[r[i(610)]])}else se.debugWarn("worker",i(324)+s+i(750));else se[i(794)](i(771),i(613)+s+i(1130)+r+i(621)+t[1]);else se[i(749)](i(771),i(579))},decodeVideo:function(t,r,s){const a=e;let o=arguments[a(1081)]>3&&void 0!==arguments[3]?arguments[3]:0;if(se.isDestroyed)se[a(762)](a(771),"decodeVideo, decoder is destroyed and return");else if(se[a(305)]())ne[a(929)](t,r,s,o);else if(qt(i))postMessage({cmd:ye[a(624)],payload:t,isIFrame:s,ts:r,cts:o,delay:se[a(323)]},[t[a(610)]]);else if(_)if(!y&&s&&(y=!0),y){if(s&&jt(t)){const e=15&t[0];let r={};if(e===Ce.h264){r=Ir(t[a(871)](5))}else e===Ce[a(914)]&&(r=$r(t));r[a(670)]&&r[a(533)]&&p&&m&&(r[a(670)]!==p||r.codecHeight!==m)&&(se[a(794)](a(771),a(821)+p+a(688)+m+",\n new width is "+r.codecWidth+a(558)+r.codecHeight+a(1075)),L=!0,postMessage({cmd:ye[a(886)],value:a(264)+p+"->"+r[a(670)]+a(1086)+m+"->"+r[a(533)]}))}if(L)return void se[a(794)](a(771),a(435));if(R)return void se[a(794)](a(771),a(563));if(jt(t))return void se[a(762)](a(771),a(952));if(t[a(907)]0&&void 0!==arguments[0]&&arguments[0];se.debugLog(t(771),"clearBuffer,bufferList length is "+s[t(1081)]+t(476)+r),r&&(s=[]),se.isPlayer&&(se[t(1132)](),qt(se[t(398)][t(759)])&&(se[t(248)]=!0,postMessage({cmd:ye.isDropping}))),qt(se[t(398)].checkFirstIFrame)&&Kt(i)&&(y=!1)},dropBuffer$2:function(){const t=e;if(s.length>0){let e=s.findIndex((e=>{const t=uc;return qt(e[t(308)])&&e[t(391)]===ge[t(661)]}));if(se[t(283)]())for(let r=0;r=se[t(246)]()){se[t(762)]("worker","dropBuffer$2() isAllIframeInBufferList() is true, and index is "+r+t(291)+n+t(580)+se[t(246)]()),e=r;break}}if(e>=0){se.isPushDropping=!0,postMessage({cmd:ye[t(887)]});const r=s[t(1081)];s=s.slice(e);const i=s[t(934)]();se[t(1132)](),se[t(470)](i.ts,i.type),se[t(1010)](i),se[t(633)]=!1,se[t(762)](t(771),t(787)+e+",and old bufferList length is "+r+t(968)+s.length+" and new delay is "+se[t(323)]+" ")}else se[t(633)]=!1}0===s[t(1081)]&&(se[t(633)]=!1)},demuxM7s:function(t){const r=e,i=new DataView(t),n=i[r(674)](1,!1),s=i[r(519)](0),a=new ArrayBuffer(4),o=new Uint32Array(a);switch(s){case ge[r(570)]:const e=se.cryptoPayloadAudio(new Uint8Array(t,5));se.decode(e,{type:ge[r(570)],ts:n});break;case ge[r(661)]:if(i.byteLength>=11){const e=new Uint8Array(t,5),s=e[0];if(se[r(635)](s))se[r(537)](e,n);else{const t=i.getUint8(5)>>4==1;if(t&&(se.calcIframeIntervalTimestamp(n),jt(e)&&null===se[r(380)])){const t=15&e[0];se.isHevc=t===Ce.h265}se[r(924)]&&se[r(468)](n),o[0]=e[4],o[1]=e[3],o[2]=e[2],o[3]=0;let s=o[0],a=se[r(343)](e,t);se[r(466)](a,{type:ge[r(661)],ts:n,isIFrame:t,cts:s})}}else se[r(794)](r(771),r(1011)+t.byteLength+r(1052))}},demuxNakedFlow:function(e){J.dispatch(e)},demuxFmp4:function(t){X[e(942)](t)},demuxMpeg4:function(e){Q.dispatch(e)},demuxTs:function(t){$[e(942)](t)},_decodeEnhancedH265Video:function(t,r){const i=e,n=t[0],s=48&n,a=15&n,o=t[i(871)](1,5),c=new ArrayBuffer(4),u=new Uint32Array(c),l="a"==String[i(767)](o[0]);if(se[i(380)]=Kt(l),a===je[i(804)]){if(s===qe[i(311)]){const e=t.slice(5);if(l);else{const n=new Uint8Array(5+e.length);n[i(319)]([28,0,0,0,0],0),n[i(319)](e,5),N=At(t,se.isHevc),se[i(762)](i(771),i(210)+se.isHevc+i(854)+N),se[i(466)](n,{type:ge[i(661)],ts:r,isIFrame:!0,cts:0})}}}else if(a===je[i(327)]){let e=t,n=0;const a=s===qe[i(311)];if(a&&se[i(572)](r),l);else{u[0]=t[4],u[1]=t[3],u[2]=t[2],u[3]=0,n=u[0];e=ni(t.slice(8),a),e=se[i(343)](e,a),se[i(466)](e,{type:ge[i(661)],ts:r,isIFrame:a,cts:n})}}else if(a===je[i(892)]){const e=s===qe[i(311)];e&&se[i(572)](r);let n=ni(t[i(871)](5),e);n=se[i(343)](n,e),se[i(466)](n,{type:ge.video,ts:r,isIFrame:e,cts:0})}},_isEnhancedH265Header:function(e){return(e&We)===We},findSei:function(t,r){const i=e;let n=4;Rt(N)&&(n=N);bt(t[i(871)](5),n).forEach((e=>{const t=i,n=se[t(380)]?e[0]>>>1&63:31&e[0],s=se[t(380)]&&(n===De[t(1012)]||n===De.prefixSei),a=Kt(se.isHevc)&&n===Te[t(236)];if(s||a){const i=It(e,se.isHevc);postMessage({cmd:ye[t(1006)],buffer:i.payload,ts:r},[i[t(979)][t(610)]])}}))},calcNetworkDelay:function(t){const r=e;if(!(y&&t>0))return;null===w?(w=t,A=Et()):ti?n-i:0;if(se.networkDelay=s,s>se[r(398)][r(1125)]&&se[r(398)].playType===re[r(427)]){let e=!1;null===F&&(e=!0,F=Et());const a=Et();(a-F>=1e3||e)&&(se.debugWarn(r(771),r(231)+t+r(677)+w+r(594)+i+r(588)+n+r(1053)+s),postMessage({cmd:ye[r(310)],type:Ie.networkDelayTimeout,value:s}),F=a)}},calcIframeIntervalTimestamp:function(t){null===T?T=t:T=se[t(398)][t(950)]&&!(se[t(398)][t(706)]&&se._opt.mseDecodeAudio)},isPlayUseMSE:function(){const t=e;return se[t(924)]&&se[t(398)][t(706)]&&qt(i)},isPlayUseMSEAndDecoderInWorker:function(){const t=e;return se[t(402)]()&&se._opt[t(985)]},isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio:function(){const t=e;return se[t(305)]()&&se[t(398)][t(250)]},playbackUpdatePlaybackRate:function(){},onOffscreenCanvasWebglContextLost:function(t){const r=e;se[r(749)](r(771),r(1018)),t[r(1008)](),P=!0,se[r(691)][r(813)](),se[r(691)]=null,se[r(335)]=null,setTimeout((()=>{const e=r;se.offscreenCanvasGL=se[e(431)][e(744)](e(541)),se[e(335)]&&se[e(335)][e(697)]()[e(275)]?(se[e(691)]=Z(se[e(335)],se._opt[e(1016)]),P=!1):se.debugError(e(771),e(915))}),500)},onOffscreenCanvasWebglContextRestored:function(t){const r=e;se[r(762)](r(771),"handleOffscreenCanvasWebglContextRestored"),t.preventDefault()},videoInfo:function(t,r,i){const n=e;postMessage({cmd:ye.videoCode,code:t}),postMessage({cmd:ye.initVideo,w:r,h:i}),p=r,m=i,se[n(1083)]()&&(se[n(431)]=new OffscreenCanvas(r,i),se[n(335)]=se.offscreenCanvas[n(744)](n(541)),se[n(691)]=Z(se[n(335)],se[n(398)][n(1016)]),se[n(431)].addEventListener("webglcontextlost",se[n(367)],!1),se[n(431)][n(339)]("webglcontextrestored",se.onOffscreenCanvasWebglContextRestored,!1))},audioInfo:function(t,r,i){postMessage({cmd:ye[e(973)],code:t}),postMessage({cmd:ye.initAudio,sampleRate:r,channels:i,depth:O}),B=i},yuvData:function(r,i){const n=e;if(se.isDestroyed)return void se[n(762)](n(771),n(614));if(Kt(y))return void se.debugLog(n(771),n(1021));const s=p*m*3/2;try{let e=t[n(690)][n(316)](r,r+s),a=new Uint8Array(e);if(E=null,b=i,se.useOffscreen())try{if(P)return;se[n(691)][n(1007)](p,m,a);let e=se[n(431)][n(761)]();postMessage({cmd:ye.render,buffer:e,delay:se[n(323)],ts:i},[e])}catch(e){se[n(749)](n(771),n(439),e,e[n(312)]())}else postMessage({cmd:ye.render,output:a,delay:se.delay,ts:i},[a[n(610)]])}catch(e){se[n(794)](n(771),"yuvData ts "+i+n(735),e,e[n(312)]())}},pcmData:function(t,i,n){const s=e;if(se[s(996)])return void se[s(762)](s(771),"pcmData, decoder is destroyed and return");let o=i,c=[],u=0;try{let e=se[s(398)][s(737)];for(let e=0;e<2;e++){let i=r[s(629)][(t>>2)+e]>>2;c[e]=r[s(678)].subarray(i,i+o)}if(x){if(!(o>=(i=e-x)))return x+=o,a[0]=Float32Array.of(...a[0],...c[0]),void(2==B&&(a[1]=Float32Array.of(...a[1],...c[1])));k[0]=Float32Array.of(...a[0],...c[0][s(316)](0,i)),2==B&&(k[1]=Float32Array.of(...a[1],...c[1][s(316)](0,i))),postMessage({cmd:ye[s(582)],buffer:k,ts:n},k[s(1137)]((e=>e[s(610)]))),u=i,o-=i}for(x=o;x>=e;x-=e)k[0]=c[0][s(871)](u,u+=e),2==B&&(k[1]=c[1].slice(u-e,u)),postMessage({cmd:ye[s(582)],buffer:k,ts:n},k.map((e=>e[s(610)])));x&&(a[0]=c[0][s(871)](u),2==B&&(a[1]=c[1].slice(u))),c=[]}catch(e){se[s(794)](s(771),s(404)+n+" create uint8Array error :",e,e[s(312)]())}},errorInfo:function(t){const r=e;null===E&&(E=Et());const i=Et(),n=Ct(C>0?2*C:5e3,1e3,5e3),s=i-E;s>n&&(se[r(794)](r(771),"errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is "+C+r(1164)+s+r(1161)+n+r(777)),R=!0,postMessage({cmd:ye.simdDecodeError}))},sendWebsocketMessage:function(t){const r=e;u?u[r(598)]===Ee[r(467)]?(se[r(762)](r(771),r(732),t),u.send(t)):se[r(749)](r(771),r(1017),u[r(598)]):se[r(749)](r(771),r(211))},timeEnd(){const t=e;se[t(749)](t(771),t(1134)),se[t(1145)](),postMessage({cmd:ye.workerEnd})},postStreamToMain(t,r){const i=e;postMessage({cmd:ye[i(731)],type:r,buffer:t},[t[i(610)]])},updatePlaybackIsPause(t){const r=e;se.debugLog("worker",r(441)+t),se.isPlaybackPause=t,qt(t)?se[r(945)]():se[r(396)]()},getBuildTime:()=>"JessibucaPro-"+he,validatedFailed(){const t=e;se[t(749)](t(771),t(571))},debugLog(t){const r=e;if(se[r(398)][r(543)]&&se[r(543)]){for(var i=arguments[r(1081)],n=new Array(i>1?i-1:0),s=1;s1?i-1:0),s=1;s1?i-1:0),s=1;s>2,p=t,m=r,postMessage({cmd:ye[i(652)],w:t,h:r}),se[i(1083)]()&&(se[i(431)]=new OffscreenCanvas(t,r),se.offscreenCanvasGL=se[i(431)][i(744)](i(541)),se.webglObj=Z(se[i(335)],se[i(398)][i(1016)]),se[i(431)].addEventListener(i(1140),se[i(367)],!1),se[i(431)].addEventListener(i(1073),se.onOffscreenCanvasWebglContextRestored,!1))},initAudioPlanar:function(t,r){B=t,postMessage({cmd:ye[e(357)],sampleRate:r,channels:t,depth:O})},playAudioPlanar:function(t,i,n){const s=e;if(se[s(996)])return void se[s(762)](s(771),"pcmData, decoder is destroyed and return");let o=i,c=[],u=0,l=se[s(398)][s(737)];for(let e=0;e<2;e++){let i=r[s(629)][(t>>2)+e]>>2;c[e]=r[s(678)][s(316)](i,i+o)}if(x){if(!(o>=(i=l-x)))return x+=o,a[0]=Float32Array.of(...a[0],...c[0]),void(2==B&&(a[1]=Float32Array.of(...a[1],...c[1])));k[0]=Float32Array.of(...a[0],...c[0][s(316)](0,i)),2==B&&(k[1]=Float32Array.of(...a[1],...c[1].subarray(0,i))),postMessage({cmd:ye[s(582)],buffer:k,ts:n},k[s(1137)]((e=>e.buffer))),u=i,o-=i}for(x=o;x>=l;x-=l)k[0]=c[0][s(871)](u,u+=l),2==B&&(k[1]=c[1][s(871)](u-l,u)),postMessage({cmd:ye[s(582)],buffer:k,ts:n},k[s(1137)]((e=>e[s(610)])));x&&(a[0]=c[0][s(871)](u),2==B&&(a[1]=c[1][s(871)](u))),c=[]},draw:function(r,i,n,s){const a=e;if(se[a(996)])return void se[a(762)]("worker","draw, decoder is destroyed and return");const o=t[a(690)][a(316)](i,i+V),c=t[a(690)][a(316)](n,n+G),u=t[a(690)][a(316)](s,s+G),l=new Uint8Array(V+G+G);if(l.set(o),l.set(c,V),l[a(319)](u,V+G),E=null,b=r,se[a(1083)]())try{if(P)return;se.webglObj.renderYUV(p,m,l);let e=se[a(431)][a(761)]();postMessage({cmd:ye.render,buffer:e,delay:se[a(323)],ts:r},[e])}catch(e){se[a(749)](a(771),"yuvData, transferToImageBitmap error is",e,e[a(312)]())}else postMessage({cmd:ye.render,output:l,delay:se.delay,ts:r},[l[a(610)]])}}));let ae=null;r[e(492)]&&(ae=new(r[e(492)])(se));let oe=null;t[e(355)]&&(oe=new(t[e(355)])(se)),postMessage({cmd:ye[e(257)]}),self[e(267)]=function(t){const r=e;let i=t[r(522)];switch(i[r(680)]){case Se[r(257)]:try{se[r(398)]=Object.assign(se._opt,JSON[r(1033)](i[r(842)]))}catch(e){}se[r(762)](r(771),r(850)+Se.init,i[r(842)]);break;case Se[r(466)]:se[r(1109)](i[r(610)],i[r(944)]);break;case Se[r(976)]:se[r(696)](i[r(610)],i.ts);break;case Se[r(287)]:se[r(929)](i.buffer,i.ts,i[r(308)]);break;case Se[r(893)]:se.clearBuffer(i[r(1098)]);break;case Se.fetchStream:se[r(1037)](i[r(739)],JSON[r(1033)](i.opt),i.protocols);break;case Se[r(1145)]:se[r(762)](r(771),r(850)+Se[r(1145)],JSON[r(497)](i[r(944)])),i[r(944)]&&Kt(i.options[r(499)])&&(H=i.options.isVideoInited),se[r(1145)]();break;case Se.updateConfig:se[r(762)]("worker",r(850)+Se[r(1032)],i[r(1131)],i.value),se[r(398)][i[r(1131)]]=i[r(421)],i[r(1131)]===r(344)&&(se[r(484)](),se[r(724)]()&&Kt(se[r(660)]));break;case Se[r(825)]:se.sendWebsocketMessage(i.message);break;case Se.mseUpdateVideoTimestamp:ne[r(272)][r(823)]=Number(i[r(736)]);break;case Se[r(814)]:se[r(241)](i[r(955)])}}}({},{},!0)})); diff --git a/ui/decoder-pro-hard.js b/ui/decoder-pro-hard.js index 8003f31..1dd6773 100644 --- a/ui/decoder-pro-hard.js +++ b/ui/decoder-pro-hard.js @@ -1 +1 @@ -!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,t=(e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-hard.js",document.baseURI).href,async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,i,s;(s=t).ready=new Promise(((e,t)=>{r=e,i=t})),(s=void 0!==s?s:{}).locateFile=function(e){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:e};var n,a,o,l=Object.assign({},s),d="./this.program",h="object"==typeof window,u="function"==typeof importScripts,f="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,c="";function p(e){return s.locateFile?s.locateFile(e,c):c+e}if(f){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-hard.js",document.baseURI).href),_=m("fs"),g=m("path");c=u?g.dirname(c)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-hard.js",document.baseURI).href)),n=(e,t)=>(e=J(e)?new URL(e):g.normalize(e),_.readFileSync(e,t?void 0:"utf8")),o=e=>{var t=n(e,!0);return t.buffer||(t=new Uint8Array(t)),t},a=function(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=J(e)?new URL(e):g.normalize(e),_.readFile(e,i?void 0:"utf8",((e,s)=>{e?r(e):t(i?s.buffer:s)}))},!s.thisProgram&&process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),s.inspect=()=>"[Emscripten Module object]"}else(h||u)&&(u?c=self.location.href:"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),e&&(c=e),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",n=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},u&&(o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),a=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)});var y,b,v=s.print||console.log.bind(console),w=s.printErr||console.error.bind(console);Object.assign(s,l),l=null,s.arguments&&s.arguments,s.thisProgram&&(d=s.thisProgram),s.quit&&s.quit,s.wasmBinary&&(y=s.wasmBinary),s.noExitRuntime,"object"!=typeof WebAssembly&&j("no native wasm support detected");var S,E,U,x,A,B,C,T,k=!1;function F(e,t){e||j(t)}function I(){var e=b.buffer;s.HEAP8=S=new Int8Array(e),s.HEAP16=U=new Int16Array(e),s.HEAPU8=E=new Uint8Array(e),s.HEAPU16=x=new Uint16Array(e),s.HEAP32=A=new Int32Array(e),s.HEAPU32=B=new Uint32Array(e),s.HEAPF32=C=new Float32Array(e),s.HEAPF64=T=new Float64Array(e)}var D=[],P=[],L=[];function z(){if(s.preRun)for("function"==typeof s.preRun&&(s.preRun=[s.preRun]);s.preRun.length;)N(s.preRun.shift());se(D)}function R(){s.noFSInit||Te.init.initialized||Te.init(),Te.ignorePermissions=!1,se(P)}function M(){if(s.postRun)for("function"==typeof s.postRun&&(s.postRun=[s.postRun]);s.postRun.length;)G(s.postRun.shift());se(L)}function N(e){D.unshift(e)}function O(e){P.unshift(e)}function G(e){L.unshift(e)}var $=0,H=null;function V(e){$++,s.monitorRunDependencies&&s.monitorRunDependencies($)}function W(e){if($--,s.monitorRunDependencies&&s.monitorRunDependencies($),0==$&&H){var t=H;H=null,t()}}function j(e){s.onAbort&&s.onAbort(e),w(e="Aborted("+e+")"),k=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}var Y,q,K,X="data:application/octet-stream;base64,";function Z(e){return e.startsWith(X)}function J(e){return e.startsWith("file://")}function Q(e){if(e==Y&&y)return new Uint8Array(y);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!y&&(h||u)){if("function"==typeof fetch&&!J(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(a)return new Promise(((t,r)=>{a(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),j(e)}))}function re(e,t,r,i){return e||"function"!=typeof WebAssembly.instantiateStreaming||Z(t)||J(t)||f||"function"!=typeof fetch?te(t,r,i):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(i,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),te(t,r,i)}))))}function ie(){var e={a:ti};function t(e,t){return ri=e.exports,b=ri.D,I(),Dt=ri.G,O(ri.E),W(),ri}if(V(),s.instantiateWasm)try{return s.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return re(y,Y,e,(function(e){t(e.instance)})).catch(i),{}}s.locateFile?Z(Y="decoder-pro-audio.wasm")||(Y=p(Y)):Y=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-hard.js",document.baseURI).href).href;var se=e=>{for(;e.length>0;)e.shift()(s)};function ne(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){B[this.ptr+4>>2]=e},this.get_type=function(){return B[this.ptr+4>>2]},this.set_destructor=function(e){B[this.ptr+8>>2]=e},this.get_destructor=function(){return B[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,S[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=S[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,S[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=S[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){B[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return B[this.ptr+16>>2]},this.get_exception_ptr=function(){if(li(this.get_type()))return B[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var ae=(e,t,r)=>{throw new ne(e).init(t,r),e},oe=e=>(A[si()>>2]=e,e),le={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,i=e.length-1;i>=0;i--){var s=e[i];"."===s?e.splice(i,1):".."===s?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=le.isAbs(e),r="/"===e.substr(-1);return(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=le.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=le.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return le.normalize(e.join("/"))},join2:(e,t)=>le.normalize(e+"/"+t)},de=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(f)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}j("initRandomDevice")},he=e=>(he=de())(e),ue={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:Te.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=le.isAbs(i)}return(t?"/":"")+(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=ue.resolve(e).substr(1),t=ue.resolve(t).substr(1);for(var i=r(e.split("/")),s=r(t.split("/")),n=Math.min(i.length,s.length),a=n,o=0;o{for(var i=t+r,s=t;e[s]&&!(s>=i);)++s;if(s-t>16&&e.buffer&&fe)return fe.decode(e.subarray(t,s));for(var n="";t>10,56320|1023&d)}}else n+=String.fromCharCode((31&a)<<6|o)}else n+=String.fromCharCode(a)}return n},pe=[],me=e=>{for(var t=0,r=0;r=55296&&i<=57343?(t+=4,++r):t+=3}return t},_e=(e,t,r,i)=>{if(!(i>0))return 0;for(var s=r,n=r+i-1,a=0;a=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),o<=127){if(r>=n)break;t[r++]=o}else if(o<=2047){if(r+1>=n)break;t[r++]=192|o>>6,t[r++]=128|63&o}else if(o<=65535){if(r+2>=n)break;t[r++]=224|o>>12,t[r++]=128|o>>6&63,t[r++]=128|63&o}else{if(r+3>=n)break;t[r++]=240|o>>18,t[r++]=128|o>>12&63,t[r++]=128|o>>6&63,t[r++]=128|63&o}}return t[r]=0,r-s};function ge(e,t,r){var i=r>0?r:me(e)+1,s=new Array(i),n=_e(e,s,0,s.length);return t&&(s.length=n),s}var ye=()=>{if(!pe.length){var e=null;if(f){var t=Buffer.alloc(256),r=0,i=process.stdin.fd;try{r=_.readSync(i,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ge(e,!0)}return pe.shift()},be={ttys:[],init(){},shutdown(){},register(e,t){be.ttys[e]={input:[],output:[],ops:t},Te.registerDevice(e,be.stream_ops)},stream_ops:{open(e){var t=be.ttys[e.node.rdev];if(!t)throw new Te.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,i,s){if(!e.tty||!e.tty.ops.get_char)throw new Te.ErrnoError(60);for(var n=0,a=0;aye(),put_char(e,t){null===t||10===t?(v(ce(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(v(ce(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(ce(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(ce(e.output,0)),e.output=[])}}},ve=e=>{j()},we={ops_table:null,mount:e=>we.createNode(null,"/",16895,0),createNode(e,t,r,i){if(Te.isBlkdev(r)||Te.isFIFO(r))throw new Te.ErrnoError(63);we.ops_table||(we.ops_table={dir:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,lookup:we.node_ops.lookup,mknod:we.node_ops.mknod,rename:we.node_ops.rename,unlink:we.node_ops.unlink,rmdir:we.node_ops.rmdir,readdir:we.node_ops.readdir,symlink:we.node_ops.symlink},stream:{llseek:we.stream_ops.llseek}},file:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:{llseek:we.stream_ops.llseek,read:we.stream_ops.read,write:we.stream_ops.write,allocate:we.stream_ops.allocate,mmap:we.stream_ops.mmap,msync:we.stream_ops.msync}},link:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,readlink:we.node_ops.readlink},stream:{}},chrdev:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:Te.chrdev_stream_ops}});var s=Te.createNode(e,t,r,i);return Te.isDir(s.mode)?(s.node_ops=we.ops_table.dir.node,s.stream_ops=we.ops_table.dir.stream,s.contents={}):Te.isFile(s.mode)?(s.node_ops=we.ops_table.file.node,s.stream_ops=we.ops_table.file.stream,s.usedBytes=0,s.contents=null):Te.isLink(s.mode)?(s.node_ops=we.ops_table.link.node,s.stream_ops=we.ops_table.link.stream):Te.isChrdev(s.mode)&&(s.node_ops=we.ops_table.chrdev.node,s.stream_ops=we.ops_table.chrdev.stream),s.timestamp=Date.now(),e&&(e.contents[t]=s,e.timestamp=s.timestamp),s},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Te.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Te.isDir(e.mode)?t.size=4096:Te.isFile(e.mode)?t.size=e.usedBytes:Te.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&we.resizeFileStorage(e,t.size)},lookup(e,t){throw Te.genericErrors[44]},mknod:(e,t,r,i)=>we.createNode(e,t,r,i),rename(e,t,r){if(Te.isDir(e.mode)){var i;try{i=Te.lookupNode(t,r)}catch(e){}if(i)for(var s in i.contents)throw new Te.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Te.lookupNode(e,t);for(var i in r.contents)throw new Te.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var i=we.createNode(e,t,41471,0);return i.link=r,i},readlink(e){if(!Te.isLink(e.mode))throw new Te.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,i,s){var n=e.node.contents;if(s>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-s,i);if(a>8&&n.subarray)t.set(n.subarray(s,s+a),r);else for(var o=0;o0||r+t(we.stream_ops.write(e,t,0,i,r,!1),0)}},Se=(e,t,r,i)=>{var s=i?"":`al ${e}`;a(e,(r=>{F(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),s&&W()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),s&&V()},Ee=(e,t,r,i,s,n)=>Te.createDataFile(e,t,r,i,s,n),Ue=s.preloadPlugins||[],xe=(e,t,r,i)=>{"undefined"!=typeof Browser&&Browser.init();var s=!1;return Ue.forEach((n=>{s||n.canHandle(t)&&(n.handle(e,t,r,i),s=!0)})),s},Ae=(e,t,r,i,s,n,a,o,l,d)=>{var h=t?ue.resolve(le.join2(e,t)):e;function u(r){function u(r){d&&d(),o||Ee(e,t,r,i,s,l),n&&n(),W()}xe(r,h,u,(()=>{a&&a(),W()}))||u(r)}V(),"string"==typeof r?Se(r,(e=>u(e)),a):u(r)},Be=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Ce=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Te={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=ue.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new Te.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),i=Te.root,s="/",n=0;n40)throw new Te.ErrnoError(32)}}return{path:s,node:i}},getPath(e){for(var t;;){if(Te.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,i=0;i>>0)%Te.nameTable.length},hashAddNode(e){var t=Te.hashName(e.parent.id,e.name);e.name_next=Te.nameTable[t],Te.nameTable[t]=e},hashRemoveNode(e){var t=Te.hashName(e.parent.id,e.name);if(Te.nameTable[t]===e)Te.nameTable[t]=e.name_next;else for(var r=Te.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Te.mayLookup(e);if(r)throw new Te.ErrnoError(r,e);for(var i=Te.hashName(e.id,t),s=Te.nameTable[i];s;s=s.name_next){var n=s.name;if(s.parent.id===e.id&&n===t)return s}return Te.lookup(e,t)},createNode(e,t,r,i){var s=new Te.FSNode(e,t,r,i);return Te.hashAddNode(s),s},destroyNode(e){Te.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Te.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=Te.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return Te.lookupNode(e,t),20}catch(e){}return Te.nodePermissions(e,"wx")},mayDelete(e,t,r){var i;try{i=Te.lookupNode(e,t)}catch(e){return e.errno}var s=Te.nodePermissions(e,"wx");if(s)return s;if(r){if(!Te.isDir(i.mode))return 54;if(Te.isRoot(i)||Te.getPath(i)===Te.cwd())return 10}else if(Te.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?Te.isLink(e.mode)?32:Te.isDir(e.mode)&&("r"!==Te.flagsToPermissionString(t)||512&t)?31:Te.nodePermissions(e,Te.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Te.MAX_OPEN_FDS;e++)if(!Te.streams[e])return e;throw new Te.ErrnoError(33)},getStreamChecked(e){var t=Te.getStream(e);if(!t)throw new Te.ErrnoError(8);return t},getStream:e=>Te.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Te.FSStream||(Te.FSStream=function(){this.shared={}},Te.FSStream.prototype={},Object.defineProperties(Te.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Te.FSStream,e),-1==t&&(t=Te.nextfd()),e.fd=t,Te.streams[t]=e,e},closeStream(e){Te.streams[e]=null},chrdev_stream_ops:{open(e){var t=Te.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Te.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Te.devices[e]={stream_ops:t}},getDevice:e=>Te.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Te.syncFSRequests++,Te.syncFSRequests>1&&w(`warning: ${Te.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Te.getMounts(Te.root.mount),i=0;function s(e){return Te.syncFSRequests--,t(e)}function n(e){if(e)return n.errored?void 0:(n.errored=!0,s(e));++i>=r.length&&s(null)}r.forEach((t=>{if(!t.type.syncfs)return n(null);t.type.syncfs(t,e,n)}))},mount(e,t,r){var i,s="/"===r,n=!r;if(s&&Te.root)throw new Te.ErrnoError(10);if(!s&&!n){var a=Te.lookupPath(r,{follow_mount:!1});if(r=a.path,i=a.node,Te.isMountpoint(i))throw new Te.ErrnoError(10);if(!Te.isDir(i.mode))throw new Te.ErrnoError(54)}var o={type:e,opts:t,mountpoint:r,mounts:[]},l=e.mount(o);return l.mount=o,o.root=l,s?Te.root=l:i&&(i.mounted=o,i.mount&&i.mount.mounts.push(o)),l},unmount(e){var t=Te.lookupPath(e,{follow_mount:!1});if(!Te.isMountpoint(t.node))throw new Te.ErrnoError(28);var r=t.node,i=r.mounted,s=Te.getMounts(i);Object.keys(Te.nameTable).forEach((e=>{for(var t=Te.nameTable[e];t;){var r=t.name_next;s.includes(t.mount)&&Te.destroyNode(t),t=r}})),r.mounted=null;var n=r.mount.mounts.indexOf(i);r.mount.mounts.splice(n,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var i=Te.lookupPath(e,{parent:!0}).node,s=le.basename(e);if(!s||"."===s||".."===s)throw new Te.ErrnoError(28);var n=Te.mayCreate(i,s);if(n)throw new Te.ErrnoError(n);if(!i.node_ops.mknod)throw new Te.ErrnoError(63);return i.node_ops.mknod(i,s,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Te.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Te.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),i="",s=0;s(void 0===r&&(r=t,t=438),t|=8192,Te.mknod(e,t,r)),symlink(e,t){if(!ue.resolve(e))throw new Te.ErrnoError(44);var r=Te.lookupPath(t,{parent:!0}).node;if(!r)throw new Te.ErrnoError(44);var i=le.basename(t),s=Te.mayCreate(r,i);if(s)throw new Te.ErrnoError(s);if(!r.node_ops.symlink)throw new Te.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename(e,t){var r,i,s=le.dirname(e),n=le.dirname(t),a=le.basename(e),o=le.basename(t);if(r=Te.lookupPath(e,{parent:!0}).node,i=Te.lookupPath(t,{parent:!0}).node,!r||!i)throw new Te.ErrnoError(44);if(r.mount!==i.mount)throw new Te.ErrnoError(75);var l,d=Te.lookupNode(r,a),h=ue.relative(e,n);if("."!==h.charAt(0))throw new Te.ErrnoError(28);if("."!==(h=ue.relative(t,s)).charAt(0))throw new Te.ErrnoError(55);try{l=Te.lookupNode(i,o)}catch(e){}if(d!==l){var u=Te.isDir(d.mode),f=Te.mayDelete(r,a,u);if(f)throw new Te.ErrnoError(f);if(f=l?Te.mayDelete(i,o,u):Te.mayCreate(i,o))throw new Te.ErrnoError(f);if(!r.node_ops.rename)throw new Te.ErrnoError(63);if(Te.isMountpoint(d)||l&&Te.isMountpoint(l))throw new Te.ErrnoError(10);if(i!==r&&(f=Te.nodePermissions(r,"w")))throw new Te.ErrnoError(f);Te.hashRemoveNode(d);try{r.node_ops.rename(d,i,o)}catch(e){throw e}finally{Te.hashAddNode(d)}}},rmdir(e){var t=Te.lookupPath(e,{parent:!0}).node,r=le.basename(e),i=Te.lookupNode(t,r),s=Te.mayDelete(t,r,!0);if(s)throw new Te.ErrnoError(s);if(!t.node_ops.rmdir)throw new Te.ErrnoError(63);if(Te.isMountpoint(i))throw new Te.ErrnoError(10);t.node_ops.rmdir(t,r),Te.destroyNode(i)},readdir(e){var t=Te.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Te.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Te.lookupPath(e,{parent:!0}).node;if(!t)throw new Te.ErrnoError(44);var r=le.basename(e),i=Te.lookupNode(t,r),s=Te.mayDelete(t,r,!1);if(s)throw new Te.ErrnoError(s);if(!t.node_ops.unlink)throw new Te.ErrnoError(63);if(Te.isMountpoint(i))throw new Te.ErrnoError(10);t.node_ops.unlink(t,r),Te.destroyNode(i)},readlink(e){var t=Te.lookupPath(e).node;if(!t)throw new Te.ErrnoError(44);if(!t.node_ops.readlink)throw new Te.ErrnoError(28);return ue.resolve(Te.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Te.lookupPath(e,{follow:!t}).node;if(!r)throw new Te.ErrnoError(44);if(!r.node_ops.getattr)throw new Te.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Te.stat(e,!0),chmod(e,t,r){var i;if(!(i="string"==typeof e?Te.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod(e,t){Te.chmod(e,t,!0)},fchmod(e,t){var r=Te.getStreamChecked(e);Te.chmod(r.node,t)},chown(e,t,r,i){var s;if(!(s="string"==typeof e?Te.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);s.node_ops.setattr(s,{timestamp:Date.now()})},lchown(e,t,r){Te.chown(e,t,r,!0)},fchown(e,t,r){var i=Te.getStreamChecked(e);Te.chown(i.node,t,r)},truncate(e,t){if(t<0)throw new Te.ErrnoError(28);var r;if(!(r="string"==typeof e?Te.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);if(Te.isDir(r.mode))throw new Te.ErrnoError(31);if(!Te.isFile(r.mode))throw new Te.ErrnoError(28);var i=Te.nodePermissions(r,"w");if(i)throw new Te.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Te.getStreamChecked(e);if(0==(2097155&r.flags))throw new Te.ErrnoError(28);Te.truncate(r.node,t)},utime(e,t,r){var i=Te.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Te.ErrnoError(44);var i;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Be(t):t)?4095&r|32768:0,"object"==typeof e)i=e;else{e=le.normalize(e);try{i=Te.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var n=!1;if(64&t)if(i){if(128&t)throw new Te.ErrnoError(20)}else i=Te.mknod(e,r,0),n=!0;if(!i)throw new Te.ErrnoError(44);if(Te.isChrdev(i.mode)&&(t&=-513),65536&t&&!Te.isDir(i.mode))throw new Te.ErrnoError(54);if(!n){var a=Te.mayOpen(i,t);if(a)throw new Te.ErrnoError(a)}512&t&&!n&&Te.truncate(i,0),t&=-131713;var o=Te.createStream({node:i,path:Te.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return o.stream_ops.open&&o.stream_ops.open(o),!s.logReadFiles||1&t||(Te.readFiles||(Te.readFiles={}),e in Te.readFiles||(Te.readFiles[e]=1)),o},close(e){if(Te.isClosed(e))throw new Te.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Te.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Te.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Te.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,i,s){if(i<0||s<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(1==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.read)throw new Te.ErrnoError(28);var n=void 0!==s;if(n){if(!e.seekable)throw new Te.ErrnoError(70)}else s=e.position;var a=e.stream_ops.read(e,t,r,i,s);return n||(e.position+=a),a},write(e,t,r,i,s,n){if(i<0||s<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(0==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.write)throw new Te.ErrnoError(28);e.seekable&&1024&e.flags&&Te.llseek(e,0,2);var a=void 0!==s;if(a){if(!e.seekable)throw new Te.ErrnoError(70)}else s=e.position;var o=e.stream_ops.write(e,t,r,i,s,n);return a||(e.position+=o),o},allocate(e,t,r){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(t<0||r<=0)throw new Te.ErrnoError(28);if(0==(2097155&e.flags))throw new Te.ErrnoError(8);if(!Te.isFile(e.node.mode)&&!Te.isDir(e.node.mode))throw new Te.ErrnoError(43);if(!e.stream_ops.allocate)throw new Te.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,i,s){if(0!=(2&i)&&0==(2&s)&&2!=(2097155&e.flags))throw new Te.ErrnoError(2);if(1==(2097155&e.flags))throw new Te.ErrnoError(2);if(!e.stream_ops.mmap)throw new Te.ErrnoError(43);return e.stream_ops.mmap(e,t,r,i,s)},msync:(e,t,r,i,s)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,s):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Te.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,i=Te.open(e,t.flags),s=Te.stat(e).size,n=new Uint8Array(s);return Te.read(i,n,0,s,0),"utf8"===t.encoding?r=ce(n,0):"binary"===t.encoding&&(r=n),Te.close(i),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var i=Te.open(e,r.flags,r.mode);if("string"==typeof t){var s=new Uint8Array(me(t)+1),n=_e(t,s,0,s.length);Te.write(i,s,0,n,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Te.write(i,t,0,t.byteLength,void 0,r.canOwn)}Te.close(i)},cwd:()=>Te.currentPath,chdir(e){var t=Te.lookupPath(e,{follow:!0});if(null===t.node)throw new Te.ErrnoError(44);if(!Te.isDir(t.node.mode))throw new Te.ErrnoError(54);var r=Te.nodePermissions(t.node,"x");if(r)throw new Te.ErrnoError(r);Te.currentPath=t.path},createDefaultDirectories(){Te.mkdir("/tmp"),Te.mkdir("/home"),Te.mkdir("/home/web_user")},createDefaultDevices(){Te.mkdir("/dev"),Te.registerDevice(Te.makedev(1,3),{read:()=>0,write:(e,t,r,i,s)=>i}),Te.mkdev("/dev/null",Te.makedev(1,3)),be.register(Te.makedev(5,0),be.default_tty_ops),be.register(Te.makedev(6,0),be.default_tty1_ops),Te.mkdev("/dev/tty",Te.makedev(5,0)),Te.mkdev("/dev/tty1",Te.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=he(e).byteLength),e[--t]);Te.createDevice("/dev","random",r),Te.createDevice("/dev","urandom",r),Te.mkdir("/dev/shm"),Te.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Te.mkdir("/proc");var e=Te.mkdir("/proc/self");Te.mkdir("/proc/self/fd"),Te.mount({mount(){var t=Te.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,i=Te.getStreamChecked(r),s={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return s.parent=s,s}},t}},{},"/proc/self/fd")},createStandardStreams(){s.stdin?Te.createDevice("/dev","stdin",s.stdin):Te.symlink("/dev/tty","/dev/stdin"),s.stdout?Te.createDevice("/dev","stdout",null,s.stdout):Te.symlink("/dev/tty","/dev/stdout"),s.stderr?Te.createDevice("/dev","stderr",null,s.stderr):Te.symlink("/dev/tty1","/dev/stderr"),Te.open("/dev/stdin",0),Te.open("/dev/stdout",1),Te.open("/dev/stderr",1)},ensureErrnoError(){Te.ErrnoError||(Te.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Te.ErrnoError.prototype=new Error,Te.ErrnoError.prototype.constructor=Te.ErrnoError,[44].forEach((e=>{Te.genericErrors[e]=new Te.ErrnoError(e),Te.genericErrors[e].stack=""})))},staticInit(){Te.ensureErrnoError(),Te.nameTable=new Array(4096),Te.mount(we,{},"/"),Te.createDefaultDirectories(),Te.createDefaultDevices(),Te.createSpecialDirectories(),Te.filesystems={MEMFS:we}},init(e,t,r){Te.init.initialized=!0,Te.ensureErrnoError(),s.stdin=e||s.stdin,s.stdout=t||s.stdout,s.stderr=r||s.stderr,Te.createStandardStreams()},quit(){Te.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},n.prototype.setDataGetter=function(e){this.getter=e},n.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),s=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,n=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;s||(a=i);var o=this;o.setDataGetter((e=>{var t=e*a,s=(e+1)*a-1;if(s=Math.min(s,i-1),void 0===o.chunks[e]&&(o.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var s=new XMLHttpRequest;if(s.open("GET",r,!1),i!==a&&s.setRequestHeader("Range","bytes="+e+"-"+t),s.responseType="arraybuffer",s.overrideMimeType&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.send(null),!(s.status>=200&&s.status<300||304===s.status))throw new Error("Couldn't load "+r+". Status: "+s.status);return void 0!==s.response?new Uint8Array(s.response||[]):ge(s.responseText||"",!0)})(t,s)),void 0===o.chunks[e])throw new Error("doXHR failed!");return o.chunks[e]})),!n&&i||(a=i=1,i=this.getter(0).length,a=i,v("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!u)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new n;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var o={isDevice:!1,contents:a}}else o={isDevice:!1,url:r};var l=Te.createFile(e,t,o,i,s);o.contents?l.contents=o.contents:o.url&&(l.contents=null,l.url=o.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var d={};function h(e,t,r,i,s){var n=e.node.contents;if(s>=n.length)return 0;var a=Math.min(n.length-s,i);if(n.slice)for(var o=0;o{var t=l.stream_ops[e];d[e]=function(){return Te.forceLoadFile(l),t.apply(null,arguments)}})),d.read=(e,t,r,i,s)=>(Te.forceLoadFile(l),h(e,t,r,i,s)),d.mmap=(e,t,r,i,s)=>{Te.forceLoadFile(l);var n=ve();if(!n)throw new Te.ErrnoError(48);return h(e,S,n,t,r),{ptr:n,allocated:!0}},l.stream_ops=d,l}},ke=(e,t)=>e?ce(E,e,t):"",Fe={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(le.isAbs(t))return t;var i;if(i=-100===e?Te.cwd():Fe.getStreamFromFD(e).path,0==t.length){if(!r)throw new Te.ErrnoError(44);return i}return le.join2(i,t)},doStat(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&le.normalize(t)!==le.normalize(Te.getPath(e.node)))return-54;throw e}A[r>>2]=i.dev,A[r+4>>2]=i.mode,B[r+8>>2]=i.nlink,A[r+12>>2]=i.uid,A[r+16>>2]=i.gid,A[r+20>>2]=i.rdev,K=[i.size>>>0,(q=i.size,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+24>>2]=K[0],A[r+28>>2]=K[1],A[r+32>>2]=4096,A[r+36>>2]=i.blocks;var s=i.atime.getTime(),n=i.mtime.getTime(),a=i.ctime.getTime();return K=[Math.floor(s/1e3)>>>0,(q=Math.floor(s/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+40>>2]=K[0],A[r+44>>2]=K[1],B[r+48>>2]=s%1e3*1e3,K=[Math.floor(n/1e3)>>>0,(q=Math.floor(n/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+56>>2]=K[0],A[r+60>>2]=K[1],B[r+64>>2]=n%1e3*1e3,K=[Math.floor(a/1e3)>>>0,(q=Math.floor(a/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+72>>2]=K[0],A[r+76>>2]=K[1],B[r+80>>2]=a%1e3*1e3,K=[i.ino>>>0,(q=i.ino,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+88>>2]=K[0],A[r+92>>2]=K[1],0},doMsync(e,t,r,i,s){if(!Te.isFile(t.node.mode))throw new Te.ErrnoError(43);if(2&i)return 0;var n=E.slice(e,e+r);Te.msync(t,n,s,r,i)},varargs:void 0,get(){var e=A[+Fe.varargs>>2];return Fe.varargs+=4,e},getp:()=>Fe.get(),getStr:e=>ke(e),getStreamFromFD:e=>Te.getStreamChecked(e)};function Ie(e,t,r){Fe.varargs=r;try{var i=Fe.getStreamFromFD(e);switch(t){case 0:if((s=Fe.get())<0)return-28;for(;Te.streams[s];)s++;return Te.createStream(i,s).fd;case 1:case 2:case 6:case 7:return 0;case 3:return i.flags;case 4:var s=Fe.get();return i.flags|=s,0;case 5:return s=Fe.getp(),U[s+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return oe(28),-1}}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}}function De(e,t,r,i){Fe.varargs=i;try{t=Fe.getStr(t),t=Fe.calculateAt(e,t);var s=i?Fe.get():0;return Te.open(t,r,s).fd}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}}var Pe,Le,ze,Re=(e,t,r,i,s)=>{},Me=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Pe=e},Ne=e=>{for(var t="",r=e;E[r];)t+=Pe[E[r++]];return t},Oe={},Ge={},$e={},He=e=>{throw new Le(e)},Ve=e=>{throw new ze(e)},We=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Ve("Mismatched type converter count");for(var s=0;s{Ge.hasOwnProperty(e)?s[t]=Ge[e]:(n.push(e),Oe.hasOwnProperty(e)||(Oe[e]=[]),Oe[e].push((()=>{s[t]=Ge[e],++a===n.length&&i(s)})))})),0===n.length&&i(s)};function je(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i=t.name;if(e||He(`type "${i}" must have a positive integer typeid pointer`),Ge.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;He(`Cannot register type '${i}' twice`)}if(Ge[e]=t,delete $e[e],Oe.hasOwnProperty(e)){var s=Oe[e];delete Oe[e],s.forEach((e=>e()))}}function Ye(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return je(e,t,r)}var qe,Ke=8,Xe=(e,t,r,i)=>{Ye(e,{name:t=Ne(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:Ke,readValueFromPointer:function(e){return this.fromWireType(E[e])},destructorFunction:null})},Ze=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Je=e=>{He(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},it=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=it(e,t,r.baseClass);return null===i?null:r.downcast(i)},st={},nt=()=>Object.keys(ut).length,at=()=>{var e=[];for(var t in ut)ut.hasOwnProperty(t)&&e.push(ut[t]);return e},ot=[],lt=()=>{for(;ot.length;){var e=ot.pop();e.$$.deleteScheduled=!1,e.delete()}},dt=e=>{qe=e,ot.length&&qe&&qe(lt)},ht=()=>{s.getInheritedInstanceCount=nt,s.getLiveInheritedInstances=at,s.flushPendingDeletes=lt,s.setDelayFunction=dt},ut={},ft=(e,t)=>{for(void 0===t&&He("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ct=(e,t)=>(t=ft(e,t),ut[t]),pt=(e,t)=>(t.ptrType&&t.ptr||Ve("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ve("Both smartPtrType and smartPtr must be specified"),t.count={value:1},_t(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ct(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function s(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var n,a=this.registeredClass.getActualType(t),o=st[a];if(!o)return s.call(this);n=this.isConst?o.constPointerType:o.pointerType;var l=it(t,this.registeredClass,n.registeredClass);return null===l?s.call(this):this.isSmartPointer?pt(n.registeredClass.instancePrototype,{ptrType:n,ptr:l,smartPtrType:this,smartPtr:e}):pt(n.registeredClass.instancePrototype,{ptrType:n,ptr:l})}var _t=e=>"undefined"==typeof FinalizationRegistry?(_t=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),_t=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),_t(e)),gt=()=>{Object.assign(yt.prototype,{isAliasOf(e){if(!(this instanceof yt))return!1;if(!(e instanceof yt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)s=i.upcast(s),i=i.baseClass;return t===i&&r===s},clone(){if(this.$$.ptr||Je(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=_t(Object.create(Object.getPrototypeOf(this),{$$:{value:Ze(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),ot.push(this),1===ot.length&&qe&&qe(lt),this.$$.deleteScheduled=!0,this}})};function yt(){}var bt=48,vt=57,wt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=bt&&t<=vt?`_${e}`:e};function St(e,t){return{[e=wt(e)]:function(){return t.apply(this,arguments)}}[e]}var Et=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||He(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}},Ut=(e,t,r)=>{s.hasOwnProperty(e)?((void 0===r||void 0!==s[e].overloadTable&&void 0!==s[e].overloadTable[r])&&He(`Cannot register public name '${e}' twice`),Et(s,e,e),s.hasOwnProperty(r)&&He(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),s[e].overloadTable[r]=t):(s[e]=t,void 0!==r&&(s[e].numArguments=r))};function xt(e,t,r,i,s,n,a,o){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=s,this.getActualType=n,this.upcast=a,this.downcast=o,this.pureVirtualFunctions=[]}var At=(e,t,r)=>{for(;t!==r;)t.upcast||He(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Bt(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${or(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Ct(e,t){var r;if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||He(`Cannot pass "${or(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=At(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&He("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var s=t.clone();r=this.rawShare(r,sr.toHandle((()=>s.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:He("Unsupporting sharing policy")}return r}function Tt(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${or(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function kt(e){return this.fromWireType(B[e>>2])}var Ft=()=>{Object.assign(It.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Ke,readValueFromPointer:kt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function It(e,t,r,i,s,n,a,o,l,d,h){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=s,this.pointeeType=n,this.sharingPolicy=a,this.rawGetPointee=o,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=h,s||void 0!==t.baseClass?this.toWireType=Ct:i?(this.toWireType=Bt,this.destructorFunction=null):(this.toWireType=Tt,this.destructorFunction=null)}var Dt,Pt,Lt=(e,t,r)=>{s.hasOwnProperty(e)||Ve("Replacing nonexistant public symbol"),void 0!==s[e].overloadTable&&void 0!==r?s[e].overloadTable[r]=t:(s[e]=t,s[e].argCount=r)},zt=(e,t,r)=>{var i=s["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)},Rt=[],Mt=e=>{var t=Rt[e];return t||(e>=Rt.length&&(Rt.length=e+1),Rt[e]=t=Dt.get(e)),t},Nt=(e,t,r)=>e.includes("j")?zt(e,t,r):Mt(t).apply(null,r),Ot=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Nt(e,t,r)}},Gt=(e,t)=>{var r=(e=Ne(e)).includes("j")?Ot(e,t):Mt(t);return"function"!=typeof r&&He(`unknown function pointer with signature ${e}: ${t}`),r},$t=(e,t)=>{var r=St(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Ht=e=>{var t=ni(e),r=Ne(t);return ii(t),r},Vt=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||Ge[t]||($e[t]?$e[t].forEach(e):(r.push(t),i[t]=!0))})),new Pt(`${e}: `+r.map(Ht).join([", "]))},Wt=(e,t,r,i,s,n,a,o,l,d,h,u,f)=>{h=Ne(h),n=Gt(s,n),o&&(o=Gt(a,o)),d&&(d=Gt(l,d)),f=Gt(u,f);var c=wt(h);Ut(c,(function(){Vt(`Cannot construct ${h} due to unbound types`,[i])})),We([e,t,r],i?[i]:[],(function(t){var r,s;t=t[0],s=i?(r=t.registeredClass).instancePrototype:yt.prototype;var a=St(c,(function(){if(Object.getPrototypeOf(this)!==l)throw new Le("Use 'new' to construct "+h);if(void 0===u.constructor_body)throw new Le(h+" has no accessible constructor");var e=u.constructor_body[arguments.length];if(void 0===e)throw new Le(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(u.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(s,{constructor:{value:a}});a.prototype=l;var u=new xt(h,a,l,f,r,n,o,d);u.baseClass&&(void 0===u.baseClass.__derivedClasses&&(u.baseClass.__derivedClasses=[]),u.baseClass.__derivedClasses.push(u));var p=new It(h,u,!0,!1,!1),m=new It(h+"*",u,!1,!1,!1),_=new It(h+" const*",u,!1,!0,!1);return st[e]={pointerType:m,constPointerType:_},Lt(c,a),[p,m,_]}))},jt=(e,t)=>{for(var r=[],i=0;i>2]);return r},Yt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function qt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=St(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,s=e.apply(i,t);return s instanceof Object?s:i}function Kt(e,t,r,i,s,n){var a=t.length;a<2&&He("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==t[1]&&null!==r,l=!1,d=1;d0?", ":"")+f),c+=(h||n?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",l)c+="runDestructors(destructors);\n";else for(d=o?1:2;d{var a=jt(t,r);s=Gt(i,s),We([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Le(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Vt(`Cannot construct ${e.name} due to unbound types`,a)},We([],a,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Kt(r,i,null,s,n),[]))),[]}))},Zt=(e,t,r,i,s,n,a,o,l)=>{var d=jt(r,i);t=Ne(t),n=Gt(s,n),We([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function s(){Vt(`Cannot call ${i} due to unbound types`,d)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),o&&e.registeredClass.pureVirtualFunctions.push(t);var h=e.registeredClass.instancePrototype,u=h[t];return void 0===u||void 0===u.overloadTable&&u.className!==e.name&&u.argCount===r-2?(s.argCount=r-2,s.className=e.name,h[t]=s):(Et(h,t,i),h[t].overloadTable[r-2]=s),We([],d,(function(s){var o=Kt(i,s,e,n,a,l);return void 0===h[t].overloadTable?(o.argCount=r-2,h[t]=o):h[t].overloadTable[r-2]=o,[]})),[]}))};function Jt(){Object.assign(Qt.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Qt(){this.allocated=[void 0],this.freelist=[]}var er=new Qt,tr=e=>{e>=er.reserved&&0==--er.get(e).refcount&&er.free(e)},rr=()=>{for(var e=0,t=er.reserved;t{er.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),er.reserved=er.allocated.length,s.count_emval_handles=rr},sr={toValue:e=>(e||He("Cannot use deleted val. handle = "+e),er.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return er.allocate({refcount:1,value:e})}}};function nr(e){return this.fromWireType(A[e>>2])}var ar=(e,t)=>{Ye(e,{name:t=Ne(t),fromWireType:e=>{var t=sr.toValue(e);return tr(e),t},toWireType:(e,t)=>sr.toHandle(t),argPackAdvance:Ke,readValueFromPointer:nr,destructorFunction:null})},or=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},lr=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(C[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},dr=(e,t,r)=>{Ye(e,{name:t=Ne(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Ke,readValueFromPointer:lr(t,r),destructorFunction:null})},hr=(e,t,r)=>{switch(t){case 1:return r?e=>S[e>>0]:e=>E[e>>0];case 2:return r?e=>U[e>>1]:e=>x[e>>1];case 4:return r?e=>A[e>>2]:e=>B[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},ur=(e,t,r,i,s)=>{t=Ne(t);var n=e=>e;if(0===i){var a=32-8*r;n=e=>e<>>a}var o=t.includes("unsigned");Ye(e,{name:t,fromWireType:n,toWireType:o?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Ke,readValueFromPointer:hr(t,r,0!==i),destructorFunction:null})},fr=(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function s(e){var t=B[e>>2],r=B[e+4>>2];return new i(S.buffer,r,t)}Ye(e,{name:r=Ne(r),fromWireType:s,argPackAdvance:Ke,readValueFromPointer:s},{ignoreDuplicateRegistrations:!0})},cr=(e,t,r)=>_e(e,E,t,r),pr=(e,t)=>{var r="std::string"===(t=Ne(t));Ye(e,{name:t,fromWireType(e){var t,i=B[e>>2],s=e+4;if(r)for(var n=s,a=0;a<=i;++a){var o=s+a;if(a==i||0==E[o]){var l=ke(n,o-n);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),n=o+1}}else{var d=new Array(i);for(a=0;a>2]=i,r&&s)cr(t,a,i+1);else if(s)for(var o=0;o255&&(ii(a),He("String has UTF-16 code units that do not fit in 8 bits")),E[a+o]=l}else for(o=0;o{for(var r=e,i=r>>1,s=i+t/2;!(i>=s)&&x[i];)++i;if((r=i<<1)-e>32&&mr)return mr.decode(E.subarray(e,r));for(var n="",a=0;!(a>=t/2);++a){var o=U[e+2*a>>1];if(0==o)break;n+=String.fromCharCode(o)}return n},gr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,s=(r-=2)<2*e.length?r/2:e.length,n=0;n>1]=a,t+=2}return U[t>>1]=0,t-i},yr=e=>2*e.length,br=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var s=A[e+4*r>>2];if(0==s)break;if(++r,s>=65536){var n=s-65536;i+=String.fromCharCode(55296|n>>10,56320|1023&n)}else i+=String.fromCharCode(s)}return i},vr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,s=i+r-4,n=0;n=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++n)),A[t>>2]=a,(t+=4)+4>s)break}return A[t>>2]=0,t-i},wr=e=>{for(var t=0,r=0;r=55296&&i<=57343&&++r,t+=4}return t},Sr=(e,t,r)=>{var i,s,n,a,o;r=Ne(r),2===t?(i=_r,s=gr,a=yr,n=()=>x,o=1):4===t&&(i=br,s=vr,a=wr,n=()=>B,o=2),Ye(e,{name:r,fromWireType:e=>{for(var r,s=B[e>>2],a=n(),l=e+4,d=0;d<=s;++d){var h=e+4+d*t;if(d==s||0==a[h>>o]){var u=i(l,h-l);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),l=h+t}}return ii(e),r},toWireType:(e,i)=>{"string"!=typeof i&&He(`Cannot pass non-string to C++ string type ${r}`);var n=a(i),l=oi(4+n+t);return B[l>>2]=n>>o,s(i,l+4,n+t),null!==e&&e.push(ii,l),l},argPackAdvance:Ke,readValueFromPointer:nr,destructorFunction(e){ii(e)}})},Er=(e,t)=>{Ye(e,{isVoid:!0,name:t=Ne(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Ur={},xr=e=>{var t=Ur[e];return void 0===t?Ne(e):t},Ar=[],Br=(e,t,r,i)=>{(e=Ar[e])(t=sr.toValue(t),r=xr(r),null,i)},Cr=e=>{var t=Ar.length;return Ar.push(e),t},Tr=(e,t)=>{var r=Ge[e];return void 0===r&&He(t+" has unknown type "+Ht(e)),r},kr=(e,t)=>{for(var r=new Array(e),i=0;i>2],"parameter "+i);return r},Fr={},Ir=(e,t)=>{var r=kr(e,t),i=r[0],s=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",n=Fr[s];if(void 0!==n)return n;for(var a=["retType"],o=[i],l="",d=0;dt+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Pr=()=>{j("")},Lr=()=>Date.now(),zr=(e,t,r)=>E.copyWithin(e,t,t+r),Rr=e=>{j("OOM")},Mr=e=>{E.length,Rr()},Nr={},Or=()=>d||"./this.program",Gr=()=>{if(!Gr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Or()};for(var t in Nr)void 0===Nr[t]?delete e[t]:e[t]=Nr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Gr.strings=r}return Gr.strings},$r=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);S[t>>0]=0},Hr=(e,t)=>{var r=0;return Gr().forEach(((i,s)=>{var n=t+r;B[e+4*s>>2]=n,$r(i,n),r+=i.length+1})),0},Vr=(e,t)=>{var r=Gr();B[e>>2]=r.length;var i=0;return r.forEach((e=>i+=e.length+1)),B[t>>2]=i,0};function Wr(e){try{var t=Fe.getStreamFromFD(e);return Te.close(t),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}function jr(e,t){try{var r=Fe.getStreamFromFD(e),i=r.tty?2:Te.isDir(r.mode)?3:Te.isLink(r.mode)?7:4;return S[t>>0]=i,U[t+2>>1]=0,K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[t+8>>2]=K[0],A[t+12>>2]=K[1],K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[t+16>>2]=K[0],A[t+20>>2]=K[1],0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var Yr=(e,t,r,i)=>{for(var s=0,n=0;n>2],o=B[t+4>>2];t+=8;var l=Te.read(e,S,a,o,i);if(l<0)return-1;if(s+=l,l>2]=n,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}function Kr(e,t,r,i,s){var n=Dr(t,r);try{if(isNaN(n))return 61;var a=Fe.getStreamFromFD(e);return Te.llseek(a,n,i),K=[a.position>>>0,(q=a.position,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[s>>2]=K[0],A[s+4>>2]=K[1],a.getdents&&0===n&&0===i&&(a.getdents=null),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var Xr=(e,t,r,i)=>{for(var s=0,n=0;n>2],o=B[t+4>>2];t+=8;var l=Te.write(e,S,a,o,i);if(l<0)return-1;s+=l,void 0!==i&&(i+=l)}return s};function Zr(e,t,r,i){try{var s=Fe.getStreamFromFD(e),n=Xr(s,t,r);return B[i>>2]=n,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var Jr=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Te.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Qr=365,ei=146;Object.defineProperties(Jr.prototype,{read:{get:function(){return(this.mode&Qr)===Qr},set:function(e){e?this.mode|=Qr:this.mode&=~Qr}},write:{get:function(){return(this.mode&ei)===ei},set:function(e){e?this.mode|=ei:this.mode&=~ei}},isFolder:{get:function(){return Te.isDir(this.mode)}},isDevice:{get:function(){return Te.isChrdev(this.mode)}}}),Te.FSNode=Jr,Te.createPreloadedFile=Ae,Te.staticInit(),Me(),Le=s.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},ze=s.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},gt(),ht(),Ft(),Pt=s.UnboundTypeError=$t(Error,"UnboundTypeError"),Jt(),ir();var ti={p:ae,B:Ie,v:De,t:Re,n:Xe,r:Wt,q:Xt,f:Zt,C:ar,m:dr,c:ur,b:fr,l:pr,h:Sr,o:Er,d:Br,i:tr,e:Ir,a:Pr,g:Lr,z:zr,u:Mr,x:Hr,y:Vr,k:Wr,w:jr,A:qr,s:Kr,j:Zr},ri=ie(),ii=e=>(ii=ri.F)(e),si=()=>(si=ri.H)(),ni=e=>(ni=ri.I)(e);s.__embind_initialize_bindings=()=>(s.__embind_initialize_bindings=ri.J)();var ai,oi=e=>(oi=ri.K)(e),li=e=>(li=ri.M)(e);function di(){function e(){ai||(ai=!0,s.calledRun=!0,k||(R(),r(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),M()))}$>0||(z(),$>0||(s.setStatus?(s.setStatus("Running..."),setTimeout((function(){setTimeout((function(){s.setStatus("")}),1),e()}),1)):e()))}if(s.dynCall_viiijj=(e,t,r,i,n,a,o,l)=>(s.dynCall_viiijj=ri.N)(e,t,r,i,n,a,o,l),s.dynCall_jij=(e,t,r,i)=>(s.dynCall_jij=ri.O)(e,t,r,i),s.dynCall_jii=(e,t,r)=>(s.dynCall_jii=ri.P)(e,t,r),s.dynCall_jiji=(e,t,r,i,n)=>(s.dynCall_jiji=ri.Q)(e,t,r,i,n),H=function e(){ai||di(),ai||(H=e)},s.preInit)for("function"==typeof s.preInit&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return di(),t.ready}),r=1e-6,s="undefined"!=typeof Float32Array?Float32Array:Array;function n(){var e=new s(16);return s!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function a(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var o,l=function(e,t,r,i,s,n,a){var o=1/(t-r),l=1/(i-s),d=1/(n-a);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*d,e[11]=0,e[12]=(t+r)*o,e[13]=(s+i)*l,e[14]=(a+n)*d,e[15]=1,e};function d(e,t,r){var i=new s(3);return i[0]=e,i[1]=t,i[2]=r,i}o=new s(3),s!=Float32Array&&(o[0]=0,o[1]=0,o[2]=0);var h=(e,t)=>{t&&e.pixelStorei(e.UNPACK_ALIGNMENT,1);const i=function(){const t=m(e.VERTEX_SHADER,"\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n "),r=m(e.FRAGMENT_SHADER,"\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),i=e.createProgram();if(e.attachShader(i,t),e.attachShader(i,r),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))return console.log("Unable to initialize the shader program: "+e.getProgramInfoLog(i)),null;return i}();let s={program:i,attribLocations:{vertexPosition:e.getAttribLocation(i,"aVertexPosition"),texturePosition:e.getAttribLocation(i,"aTexturePosition")},uniformLocations:{projectionMatrix:e.getUniformLocation(i,"uProjectionMatrix"),modelMatrix:e.getUniformLocation(i,"uModelMatrix"),viewMatrix:e.getUniformLocation(i,"uViewMatrix"),rgbatexture:e.getUniformLocation(i,"rgbaTexture"),ytexture:e.getUniformLocation(i,"yTexture"),utexture:e.getUniformLocation(i,"uTexture"),vtexture:e.getUniformLocation(i,"vTexture"),isyuv:e.getUniformLocation(i,"isyuv")}},o=function(){const t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e.STATIC_DRAW);var r=[];r=r.concat([0,1],[1,1],[1,0],[0,0]);const i=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,new Float32Array(r),e.STATIC_DRAW);const s=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,s);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{position:t,texPosition:i,indices:s}}(),h=p(),u=p(),f=p(),c=p();function p(){let t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function m(t,r){const i=e.createShader(t);return e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)?i:(console.log("An error occurred compiling the shaders: "+e.getShaderInfoLog(i)),e.deleteShader(i),null)}function _(t,i){e.viewport(0,0,t,i),e.clearColor(0,0,0,0),e.clearDepth(1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT);const h=n();l(h,-1,1,-1,1,.1,100);const p=n();a(p);const m=n();!function(e,t,i,s){var n,o,l,d,h,u,f,c,p,m,_=t[0],g=t[1],y=t[2],b=s[0],v=s[1],w=s[2],S=i[0],E=i[1],U=i[2];Math.abs(_-S)>1,(1&r)<<7|i<<3])}function ot(e){return lt(e)&&e[1]===qe}function lt(e){return e[0]>>4===Ce}nt((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},r=e.exports,i=function(){for(var e,r=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,s=r.length,n={};i{if(s=i,"[object Number]"!==Object.prototype.toString.call(s))return;var s;t+=i;const n=ft(),a=n-r;a>=1e3&&(e(t/a*1e3),r=n,t=0)}}(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();function pt(e){let t=e.subarray(1,4),r="avc1.";for(let e=0;e<3;e++){let i=t[e].toString(16);i.length<2&&(i="0"+i),r+=i}return{codec:r,description:e}}function mt(e){return null==e}function _t(e){return!mt(e)}function gt(e){return"function"==typeof e}function yt(e){let t=null,r=31&e[0];return r!==Ie&&r!==De||(t=Ae),t||(r=(126&e[0])>>1,r!==Me&&r!==Ne&&r!==Oe||(t=Be)),t}function bt(){return"undefined"!=typeof WritableStream}function vt(e){e.close()}function wt(e,t){t&&(e=e.filter((e=>e.type&&e.type===t)));let r=e[0],i=null,s=1;if(e.length>0){let t=e[1];t&&t.ts-r.ts>1e5&&(r=t,s=2)}if(r)for(let n=s;n=1e3){e[n-1].ts-r.ts<1e3&&(i=n+1)}}}return i}function St(e){return e.ok&&e.status>=200&&e.status<=299}function Et(){return function(e){let t="";if("object"==typeof e)try{t=JSON.stringify(e),t=JSON.parse(t)}catch(r){t=e}else t=e;return t}(S)}function Ut(e){return e[0]>>4===Ke&&e[1]===qe}function xt(e){return!0===e||"true"===e}function At(e){return!0!==e&&"true"!==e}var Bt=function(e,t,r,i){return new(r||(r=Promise))((function(s,n){function a(e){try{l(i.next(e))}catch(e){n(e)}}function o(e){try{l(i.throw(e))}catch(e){n(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,o)}l((i=i.apply(e,t||[])).next())}))};const Ct=Symbol(32),Tt=Symbol(16),kt=Symbol(8);class Ft{constructor(e){this.g=e,this.consumed=0,e&&(this.need=e.next().value)}setG(e){this.g=e,this.demand(e.next().value,!0)}consume(){this.buffer&&this.consumed&&(this.buffer.copyWithin(0,this.consumed),this.buffer=this.buffer.subarray(0,this.buffer.length-this.consumed),this.consumed=0)}demand(e,t){return t&&this.consume(),this.need=e,this.flush()}read(e){return Bt(this,void 0,void 0,(function*(){return this.lastReadPromise&&(yield this.lastReadPromise),this.lastReadPromise=new Promise(((t,r)=>{var i;this.reject=r,this.resolve=e=>{delete this.lastReadPromise,delete this.resolve,delete this.need,t(e)};this.demand(e,!0)||null===(i=this.pull)||void 0===i||i.call(this,e)}))}))}readU32(){return this.read(Ct)}readU16(){return this.read(Tt)}readU8(){return this.read(kt)}close(){var e;this.g&&this.g.return(),this.buffer&&this.buffer.subarray(0,0),null===(e=this.reject)||void 0===e||e.call(this,new Error("EOF")),delete this.lastReadPromise}flush(){if(!this.buffer||!this.need)return;let e=null;const t=this.buffer.subarray(this.consumed);let r=0;const i=e=>t.length<(r=e);if("number"==typeof this.need){if(i(this.need))return;e=t.subarray(0,r)}else if(this.need===Ct){if(i(4))return;e=t[0]<<24|t[1]<<16|t[2]<<8|t[3]}else if(this.need===Tt){if(i(2))return;e=t[0]<<8|t[1]}else if(this.need===kt){if(i(1))return;e=t[0]}else if("buffer"in this.need){if("byteOffset"in this.need){if(i(this.need.byteLength-this.need.byteOffset))return;new Uint8Array(this.need.buffer,this.need.byteOffset).set(t.subarray(0,r)),e=this.need}else if(this.g)return void this.g.throw(new Error("Unsupported type"))}else{if(i(this.need.byteLength))return;new Uint8Array(this.need).set(t.subarray(0,r)),e=this.need}return this.consumed+=r,this.g?this.demand(this.g.next(e).value,!0):this.resolve&&this.resolve(e),e}write(e){if(e instanceof Uint8Array?this.malloc(e.length).set(e):"buffer"in e?this.malloc(e.byteLength).set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):this.malloc(e.byteLength).set(new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this.pull=e));this.flush()}writeU32(e){this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){this.malloc(2).set([e>>8&255,255&e]),this.flush()}writeU8(e){this.malloc(1)[0]=e,this.flush()}malloc(e){if(this.buffer){const t=this.buffer.length,r=t+e;if(r<=this.buffer.buffer.byteLength-this.buffer.byteOffset)this.buffer=new Uint8Array(this.buffer.buffer,this.buffer.byteOffset,r);else{const e=new Uint8Array(r);e.set(this.buffer),this.buffer=e}return this.buffer.subarray(t,r)}return this.buffer=new Uint8Array(e),this.buffer}}Ft.U32=Ct,Ft.U16=Tt,Ft.U8=kt;class It{constructor(e){this.log=function(t){if(e._opt.debug&&e._opt.debugLevel==y){const n=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s1?r-1:0),s=1;s1?i-1:0),n=1;n32&&console.error("ExpGolomb: readBits() bits exceeded max 32bits!"),e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let r=e-this._current_word_bits_left;this._fillCurrentWord();let i=Math.min(r,this._current_word_bits_left),s=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,t=t<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}class Pt{static _ebsp2rbsp(e){let t=e,r=t.byteLength,i=new Uint8Array(r),s=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(i[s]=t[e],s++);return new Uint8Array(i.buffer,0,s)}static parseSPS(e){let t=Pt._ebsp2rbsp(e),r=new Dt(t);r.readByte();let i=r.readByte();r.readByte();let s=r.readByte();r.readUEG();let n=Pt.getProfileString(i),a=Pt.getLevelString(s),o=1,l=420,d=[0,420,422,444],h=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(o=r.readUEG(),3===o&&r.readBits(1),o<=3&&(l=d[o]),h=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool())){let e=3!==o?8:12;for(let t=0;t0&&e<16?(v=t[e-1],w=i[e-1]):255===e&&(v=r.readByte()<<8|r.readByte(),w=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){let e=r.readBits(32),t=r.readBits(32);E=r.readBool(),U=t,x=2*e,S=U/x}}let A=1;1===v&&1===w||(A=v/w);let B=0,C=0;if(0===o)B=1,C=2-m;else{B=3===o?1:2,C=(1===o?2:1)*(2-m)}let T=16*(c+1),k=16*(p+1)*(2-m);T-=(_+g)*B,k-=(y+b)*C;let F=Math.ceil(T*A);return r.destroy(),r=null,{profile_string:n,level_string:a,bit_depth:h,ref_frames:f,chroma_format:l,chroma_format_string:Pt.getChromaFormatString(l),frame_rate:{fixed:E,fps:S,fps_den:x,fps_num:U},sar_ratio:{width:v,height:w},codec_size:{width:T,height:k},present_size:{width:F,height:k}}}static parseSPS$2(e){let t=e.subarray(1,4),r="avc1.";for(let e=0;e<3;e++){let i=t[e].toString(16);i.length<2&&(i="0"+i),r+=i}let i=Pt._ebsp2rbsp(e),s=new Dt(i);s.readByte();let n=s.readByte();s.readByte();let a=s.readByte();s.readUEG();let o=Pt.getProfileString(n),l=Pt.getLevelString(a),d=1,h=420,u=[0,420,422,444],f=8,c=8;if((100===n||110===n||122===n||244===n||44===n||83===n||86===n||118===n||128===n||138===n||144===n)&&(d=s.readUEG(),3===d&&s.readBits(1),d<=3&&(h=u[d]),f=s.readUEG()+8,c=s.readUEG()+8,s.readBits(1),s.readBool())){let e=3!==d?8:12;for(let t=0;t0&&e<16?(E=t[e-1],U=r[e-1]):255===e&&(E=s.readByte()<<8|s.readByte(),U=s.readByte()<<8|s.readByte())}if(s.readBool()&&s.readBool(),s.readBool()&&(s.readBits(4),s.readBool()&&s.readBits(24)),s.readBool()&&(s.readUEG(),s.readUEG()),s.readBool()){let e=s.readBits(32),t=s.readBits(32);A=s.readBool(),B=t,C=2*e,x=B/C}}let T=1;1===E&&1===U||(T=E/U);let k=0,F=0;if(0===d)k=1,F=2-y;else{k=3===d?1:2,F=(1===d?2:1)*(2-y)}let I=16*(_+1),D=16*(g+1)*(2-y);I-=(b+v)*k,D-=(w+S)*F;let P=Math.ceil(I*T);return s.destroy(),s=null,{codec_mimetype:r,profile_idc:n,level_idc:a,profile_string:o,level_string:l,chroma_format_idc:d,bit_depth:f,bit_depth_luma:f,bit_depth_chroma:c,ref_frames:m,chroma_format:h,chroma_format_string:Pt.getChromaFormatString(h),frame_rate:{fixed:A,fps:x,fps_den:C,fps_num:B},sar_ratio:{width:E,height:U},codec_size:{width:I,height:D},present_size:{width:P,height:D}}}static _skipScalingList(e,t){let r=8,i=8,s=0;for(let n=0;n=this.buflen)return this.iserro=!0,0;this.iserro=!1,r=this.bufoff+e>8?8-this.bufoff:e,t<<=r,t+=this.buffer[this.bufpos]>>8-this.bufoff-r&255>>8-r,this.bufoff+=r,e-=r,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,r=this.bufoff,i=this.read(e);return this.bufpos=t,this.bufoff=r,i}read_golomb(){let e;for(e=0;0===this.read(1)&&!this.iserro;e++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(r,0),i.set(t.sps,4),t.sps=i}if(t.pps){const e=t.pps.byteLength,r=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(r,0),i.set(t.pps,4),t.pps=i}return t}function Rt(e){let{sps:t,pps:r}=e;const i=[23,0,0,0,0,1,66,0,30,255];i[0]=23,i[6]=t[1],i[7]=t[2],i[8]=t[3],i[10]=225,i[11]=t.byteLength>>8&255,i[12]=255&t.byteLength,i.push(...t,1,r.byteLength>>8&255,255&r.byteLength,...r);return new Uint8Array(i)}function Mt(e,t){let r=[];r[0]=t?23:39,r[1]=1,r[2]=0,r[3]=0,r[4]=0,r[5]=e.byteLength>>24&255,r[6]=e.byteLength>>16&255,r[7]=e.byteLength>>8&255,r[8]=255&e.byteLength;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function Nt(e,t){let r=[];r[0]=t?23:39,r[1]=1,r[2]=0,r[3]=0,r[4]=0;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function Ot(e){return 31&e[0]}function Gt(e){return e===Le}function $t(e){return!function(e){return e===Ie||e===De}(e)&&!Gt(e)}function Ht(e){return e===Pe}function Vt(e){if(0===e.length)return!1;const t=Ot(e[0]);for(let r=1;r{let t=e,r=t.byteLength,i=new Uint8Array(r),s=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(i[s]=t[e],s++);return new Uint8Array(i.buffer,0,s)},jt=e=>{switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}};function Yt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function qt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e.length<4)return;const r=e.length,i=[];let s,n=0;for(;n+t>>=8),n+=t,s){if(n+s>r)break;i.push(e.subarray(n,n+s)),n+=s}return i}function Kt(e){const t=e.byteLength,r=new Uint8Array(4);r[0]=t>>>24&255,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t;const i=new Uint8Array(t+4);return i.set(r,0),i.set(e,4),i}function Xt(e,t){let r=null;return t?e.length>=28&&(r=1+(3&e[26])):e.length>=12&&(r=1+(3&e[9])),r}function Zt(e){let t={width:0,height:0,profile:0,level:0};e=e.slice(5);do{let r={};if(e.length<23){console.warn("parseHEVCDecoderConfigurationRecord$2",`arrayBuffer.length ${e.length} < 23`);break}if(r.configurationVersion=e[0],1!=r.configurationVersion)break;r.general_profile_space=e[1]>>6&3,r.general_tier_flag=e[1]>>5&1,r.general_profile_idc=31&e[1],r.general_profile_compatibility_flags=e[2]<<24|e[3]<<16|e[4]<<8|e[5],r.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],r.general_constraint_indicator_flags=r.general_constraint_indicator_flags<<16|e[10]<<8|e[11],r.general_level_idc=e[12],r.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],r.parallelismType=3&e[15],r.chromaFormat=3&e[16],r.bitDepthLumaMinus8=7&e[17],r.bitDepthChromaMinus8=7&e[18],r.avgFrameRate=e[19]<<8|e[20],r.constantFrameRate=e[21]>>6&3,r.numTemporalLayers=e[21]>>3&7,r.temporalIdNested=e[21]>>2&1,r.lengthSizeMinusOne=3&e[21];let i=e[22],s=e.slice(23);for(let e=0;e0)for(let t=r;t<8;t++)e.read(2);i.sub_layer_profile_space=[],i.sub_layer_tier_flag=[],i.sub_layer_profile_idc=[],i.sub_layer_profile_compatibility_flag=[],i.sub_layer_progressive_source_flag=[],i.sub_layer_interlaced_source_flag=[],i.sub_layer_non_packed_constraint_flag=[],i.sub_layer_frame_only_constraint_flag=[],i.sub_layer_level_idc=[];for(let t=0;t{let t=Wt(e),r=new Dt(t);return r.readByte(),r.readByte(),r.readBits(4),r.readBits(2),r.readBits(6),{num_temporal_layers:r.readBits(3)+1,temporal_id_nested:r.readBool()}})(t),a=(e=>{let t=Wt(e),r=new Dt(t);r.readByte(),r.readByte();let i=0,s=0,n=0,a=0;r.readBits(4);let o=r.readBits(3);r.readBool();let l=r.readBits(2),d=r.readBool(),h=r.readBits(5),u=r.readByte(),f=r.readByte(),c=r.readByte(),p=r.readByte(),m=r.readByte(),_=r.readByte(),g=r.readByte(),y=r.readByte(),b=r.readByte(),v=r.readByte(),w=r.readByte(),S=[],E=[];for(let e=0;e0)for(let e=o;e<8;e++)r.readBits(2);for(let e=0;e1&&r.readSEG();for(let e=0;e0&&e<16?(P=t[e-1],L=i[e-1]):255===e&&(P=r.readBits(16),L=r.readBits(16))}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(3),r.readBool(),r.readBool()&&(r.readByte(),r.readByte(),r.readByte())),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool(),r.readBool(),r.readBool(),I=r.readBool(),I&&(i+=r.readUEG(),s+=r.readUEG(),n+=r.readUEG(),a+=r.readUEG()),r.readBool()&&(R=r.readBits(32),M=r.readBits(32),r.readBool()&&(r.readUEG(),r.readBool()))){let e=!1,t=!1,i=!1;e=r.readBool(),t=r.readBool(),(e||t)&&(i=r.readBool(),i&&(r.readByte(),r.readBits(5),r.readBool(),r.readBits(5)),r.readBits(4),r.readBits(4),i&&r.readBits(4),r.readBits(5),r.readBits(5),r.readBits(5));for(let s=0;s<=o;s++){let s=r.readBool();z=s;let n=!1,a=1;s||(n=r.readBool());let o=!1;if(n?r.readSEG():o=r.readBool(),o||(cpbcnt=r.readUEG()+1),e)for(let e=0;e{let t=Wt(e),r=new Dt(t);r.readByte(),r.readByte(),r.readUEG(),r.readUEG(),r.readBool(),r.readBool(),r.readBits(3),r.readBool(),r.readBool(),r.readUEG(),r.readUEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool()&&r.readUEG(),r.readSEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool(),r.readBool();let i=r.readBool(),s=r.readBool(),n=1;return s&&i?n=0:s?n=3:i&&(n=2),{parallelismType:n}})(r);s=Object.assign(s,n,a,o);let l=23+(5+t.byteLength)+(5+i.byteLength)+(5+r.byteLength),d=new Uint8Array(l);d[0]=1,d[1]=(3&s.general_profile_space)<<6|(s.general_tier_flag?1:0)<<5|31&s.general_profile_idc,d[2]=s.general_profile_compatibility_flags_1||0,d[3]=s.general_profile_compatibility_flags_2||0,d[4]=s.general_profile_compatibility_flags_3||0,d[5]=s.general_profile_compatibility_flags_4||0,d[6]=s.general_constraint_indicator_flags_1||0,d[7]=s.general_constraint_indicator_flags_2||0,d[8]=s.general_constraint_indicator_flags_3||0,d[9]=s.general_constraint_indicator_flags_4||0,d[10]=s.general_constraint_indicator_flags_5||0,d[11]=s.general_constraint_indicator_flags_6||0,d[12]=60,d[13]=240|(3840&s.min_spatial_segmentation_idc)>>8,d[14]=255&s.min_spatial_segmentation_idc,d[15]=252|3&s.parallelismType,d[16]=252|3&s.chroma_format_idc,d[17]=248|7&s.bit_depth_luma_minus8,d[18]=248|7&s.bit_depth_chroma_minus8,d[19]=0,d[20]=0,d[21]=(3&s.constant_frame_rate)<<6|(7&s.num_temporal_layers)<<3|(s.temporal_id_nested?1:0)<<2|3,d[22]=3,d[23]=128|Me,d[24]=0,d[25]=1,d[26]=(65280&t.byteLength)>>8,d[27]=(255&t.byteLength)>>0,d.set(t,28),d[23+(5+t.byteLength)+0]=128|Ne,d[23+(5+t.byteLength)+1]=0,d[23+(5+t.byteLength)+2]=1,d[23+(5+t.byteLength)+3]=(65280&i.byteLength)>>8,d[23+(5+t.byteLength)+4]=(255&i.byteLength)>>0,d.set(i,23+(5+t.byteLength)+5),d[23+(5+t.byteLength+5+i.byteLength)+0]=128|Oe,d[23+(5+t.byteLength+5+i.byteLength)+1]=0,d[23+(5+t.byteLength+5+i.byteLength)+2]=1,d[23+(5+t.byteLength+5+i.byteLength)+3]=(65280&r.byteLength)>>8,d[23+(5+t.byteLength+5+i.byteLength)+4]=(255&r.byteLength)>>0,d.set(r,23+(5+t.byteLength+5+i.byteLength)+5);const h=[28,0,0,0,0],u=new Uint8Array(h.length+d.byteLength);return u.set(h,0),u.set(d,h.length),u}function er(e,t){let r=[];r[0]=t?28:44,r[1]=1,r[2]=0,r[3]=0,r[4]=0,r[5]=e.byteLength>>24&255,r[6]=e.byteLength>>16&255,r[7]=e.byteLength>>8&255,r[8]=255&e.byteLength;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function tr(e,t){let r=[];r[0]=t?28:44,r[1]=1,r[2]=0,r[3]=0,r[4]=0;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function rr(e){return(126&e[0])>>1}function ir(e){return e===Ge}function sr(e){return!function(e){return e>=32&&e<=40}(e)}function nr(e){return e>=16&&e<=21}function ar(e){if(0===e.length)return!1;const t=rr(e[0]);for(let r=1;r255)return!1;return!0}function dr(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!lr(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(or(e.length)&&lr(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function hr(e){return new Uint8Array(e)}function ur(e,t,r,i,s){null==i&&null==s||(e=e.slice?e.slice(i,s):Array.prototype.slice.call(e,i,s)),t.set(e,r)}var fr,cr={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&i<224?(t.push(String.fromCharCode((31&i)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&i)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},pr=(fr="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+fr[15&i])}return t.join("")}}),mr={16:10,24:12,32:14},_r=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],gr=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],yr=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],br=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],vr=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],wr=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],Sr=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Er=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],Ur=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],xr=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Ar=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Br=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Cr=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],Tr=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],kr=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Fr(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=n[t],this._Kd[e-r][t%4]=n[t];for(var a,o=0,l=s;l>16&255]<<24^gr[a>>8&255]<<16^gr[255&a]<<8^gr[a>>24&255]^_r[o]<<24,o+=1,8!=s)for(t=1;t>8&255]<<8^gr[a>>16&255]<<16^gr[a>>24&255]<<24;for(t=s/2+1;t>2,h=l%4,this._Ke[d][h]=n[t],this._Kd[e-d][h]=n[t++],l++}for(var d=1;d>24&255]^Cr[a>>16&255]^Tr[a>>8&255]^kr[255&a]},Ir.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],i=Fr(e),s=0;s<4;s++)i[s]^=this._Ke[0][s];for(var n=1;n>24&255]^vr[i[(s+1)%4]>>16&255]^wr[i[(s+2)%4]>>8&255]^Sr[255&i[(s+3)%4]]^this._Ke[n][s];i=r.slice()}var a,o=hr(16);for(s=0;s<4;s++)a=this._Ke[t][s],o[4*s]=255&(gr[i[s]>>24&255]^a>>24),o[4*s+1]=255&(gr[i[(s+1)%4]>>16&255]^a>>16),o[4*s+2]=255&(gr[i[(s+2)%4]>>8&255]^a>>8),o[4*s+3]=255&(gr[255&i[(s+3)%4]]^a);return o},Ir.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],i=Fr(e),s=0;s<4;s++)i[s]^=this._Kd[0][s];for(var n=1;n>24&255]^Ur[i[(s+3)%4]>>16&255]^xr[i[(s+2)%4]>>8&255]^Ar[255&i[(s+1)%4]]^this._Kd[n][s];i=r.slice()}var a,o=hr(16);for(s=0;s<4;s++)a=this._Kd[t][s],o[4*s]=255&(yr[i[s]>>24&255]^a>>24),o[4*s+1]=255&(yr[i[(s+3)%4]>>16&255]^a>>16),o[4*s+2]=255&(yr[i[(s+2)%4]>>8&255]^a>>8),o[4*s+3]=255&(yr[255&i[(s+1)%4]]^a);return o};var Dr=function(e){if(!(this instanceof Dr))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Ir(e)};Dr.prototype.encrypt=function(e){if((e=dr(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=hr(e.length),r=hr(16),i=0;iNumber.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},Rr.prototype.setBytes=function(e){if(16!=(e=dr(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},Rr.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var Mr=function(e,t){if(!(this instanceof Mr))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof Rr||(t=new Rr(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Ir(e)};Mr.prototype.encrypt=function(e){for(var t=dr(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,i=0;i3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const s=e.byteLength;let n=5;for(;ns)break;let o=e[n+4],l=!1;if(i?(o=o>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,l=1===o||5===o),l){const i=e.slice(n+4+2,n+4+a);let s=new Nr.ModeOfOperation.ctr(t,new Nr.Counter(r));const o=s.decrypt(i);s=null,e.set(o,n+4+2)}n=n+4+a}return e}function $r(e,t,r){if(e.byteLength<=30)return e;const i=e.slice(32);let s=new Nr.ModeOfOperation.ctr(t,new Nr.Counter(r));const n=s.decrypt(i);return s=null,e.set(n,32),e}var Hr=nt((function(e,t){var r,s,n,a=(r=new Date,s=4,n={setLogLevel:function(e){s=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=s&&console.debug("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=s&&console.info("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=s&&console.warn("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){4>=s&&console.error("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)}},n);a.getDurationString=function(e,t){var r;function i(e,t){for(var r=(""+e).split(".");r[0].length0){for(var r="",i=0;i0&&(r+=","),r+="["+a.getDurationString(e.start(i))+","+a.getDurationString(e.end(i))+"]";return r}return"(empty)"},t.Log=a;var o=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};o.prototype.getPosition=function(){return this.position},o.prototype.getEndPosition=function(){return this.buffer.byteLength},o.prototype.getLength=function(){return this.buffer.byteLength},o.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0},o.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},o.prototype.readAnyInt=function(e,t){var r=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:r=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16,r|=this.dataview.getUint8(this.position+1)<<8,r|=this.dataview.getUint8(this.position+2);break;case 4:r=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32,r|=this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,r}throw"Not enough bytes in buffer"},o.prototype.readUint8=function(){return this.readAnyInt(1,!1)},o.prototype.readUint16=function(){return this.readAnyInt(2,!1)},o.prototype.readUint24=function(){return this.readAnyInt(3,!1)},o.prototype.readUint32=function(){return this.readAnyInt(4,!1)},o.prototype.readUint64=function(){return this.readAnyInt(8,!1)},o.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",r=0;rthis._byteLength&&(this._byteLength=t);else{for(r<1&&(r=1);t>r;)r*=2;var i=new ArrayBuffer(r),s=new Uint8Array(this._buffer);new Uint8Array(i,0,s.length).set(s),this.buffer=i,this._byteLength=t}}},l.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),r=new Uint8Array(this._buffer,0,t.length);t.set(r),this.buffer=e}},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),l.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},l.prototype.isEof=function(){return this.position>=this._byteLength},l.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Int32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var r=new Int16Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Uint32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var r=new Uint16Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var r=new Float64Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Float32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},l.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},l.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,l.memcpy=function(e,t,r,i,s){var n=new Uint8Array(e,t,s),a=new Uint8Array(r,i,s);n.set(a)},l.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},l.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},l.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=0;rs;i--,s++){var n=t[s];t[s]=t[i],t[i]=n}return e},l.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],r=0;r>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},l.prototype.adjustUint32=function(e,t){var r=this.position;this.seek(e),this.writeUint32(t),this.seek(r)},l.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var r=new Int32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r},l.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var r=new Int16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=2*e,r},l.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r},l.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=2*e,r},l.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var r=new Float64Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=8*e,r},l.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var r=new Float32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r};var h=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(h.prototype=new l(new ArrayBuffer,0,l.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e),0),r.set(new Uint8Array(t),e.byteLength),r.buffer},h.prototype.reduceBuffer=function(e,t,r){var i;return(i=new Uint8Array(r)).set(new Uint8Array(e,t,r)),i.buffer.fileStart=e.fileStart+t,i.buffer.usedBytes=0,i.buffer},h.prototype.insertBuffer=function(e){for(var t=!0,r=0;ri.byteLength){this.buffers.splice(r,1),r--;continue}a.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=i.fileStart||(e=this.reduceBuffer(e,0,i.fileStart-e.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(r,0,e),0===r&&(this.buffer=e);t=!1;break}if(e.fileStart0)){t=!1;break}e=this.reduceBuffer(e,s,n)}}t&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===r&&(this.buffer=e))},h.prototype.logBufferLevel=function(e){var t,r,i,s,n,o=[],l="";for(i=0,s=0,t=0;t0&&(l+=n.end-1+"]");var d=e?a.info:a.debug;0===this.buffers.length?d("MultiBufferStream","No more buffer in memory"):d("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+i+"/"+s+" bytes), continuous ranges: "+l)},h.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0}return!1}return!1},h.prototype.findPosition=function(e,t,r){var i,s=null,n=-1;for(i=!0===e?0:this.bufferIndex;i=t?(a.debug("MultiBufferStream","Found position in existing buffer #"+n),n):-1},h.prototype.findEndContiguousBuf=function(e){var t,r,i,s=void 0!==e?e:this.bufferIndex;if(r=this.buffers[s],this.buffers.length>s+1)for(t=s+1;t>3;return 31===i&&r.data.length>=2&&(i=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),i}return null},r.DecoderConfigDescriptor=function(e){r.Descriptor.call(this,4,e)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.upStream=0!=(this.streamType>>1&1),this.streamType=this.streamType>>>2,this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e)},r.DecoderSpecificInfo=function(e){r.Descriptor.call(this,5,e)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(e){r.Descriptor.call(this,6,e)},r.SLConfigDescriptor.prototype=new r.Descriptor,this};t.MPEG4DescriptorParser=u;var f={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){f.FullBox.prototype=new f.Box,f.ContainerBox.prototype=new f.Box,f.SampleEntry.prototype=new f.Box,f.TrackGroupTypeBox.prototype=new f.FullBox,f.BASIC_BOXES.forEach((function(e){f.createBoxCtor(e)})),f.FULL_BOXES.forEach((function(e){f.createFullBoxCtor(e)})),f.CONTAINER_BOXES.forEach((function(e){f.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,r){this.type=e,this.size=t,this.uuid=r},FullBox:function(e,t,r){f.Box.call(this,e,t,r),this.flags=0,this.version=0},ContainerBox:function(e,t,r){f.Box.call(this,e,t,r),this.boxes=[]},SampleEntry:function(e,t,r,i){f.ContainerBox.call(this,e,t),this.hdr_size=r,this.start=i},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){f.FullBox.call(this,e,t)},createBoxCtor:function(e,t){f.boxCodes.push(e),f[e+"Box"]=function(t){f.Box.call(this,e,t)},f[e+"Box"].prototype=new f.Box,t&&(f[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){f[e+"Box"]=function(t){f.FullBox.call(this,e,t)},f[e+"Box"].prototype=new f.FullBox,f[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,r=0;rr?(a.error("BoxParser","Box of type '"+h+"' has a size "+d+" greater than its container size "+r),{code:f.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:o}):0!==d&&o+d>e.getEndPosition()?(e.seek(o),a.info("BoxParser","Not enough data in stream to parse the entire '"+h+"' box"),{code:f.ERR_NOT_ENOUGH_DATA,type:h,size:d,hdr_size:l,start:o}):t?{code:f.OK,type:h,size:d,hdr_size:l,start:o}:(f[h+"Box"]?i=new f[h+"Box"](d):"uuid"!==h?(a.warn("BoxParser","Unknown box type: '"+h+"'"),(i=new f.Box(h,d)).has_unparsed_data=!0):f.UUIDBoxes[n]?i=new f.UUIDBoxes[n](d):(a.warn("BoxParser","Unknown uuid type: '"+n+"'"),(i=new f.Box(h,d)).uuid=n,i.has_unparsed_data=!0),i.hdr_size=l,i.start=o,i.write===f.Box.prototype.write&&"mdat"!==i.type&&(a.info("BoxParser","'"+u+"' box writing not yet implemented, keeping unparsed data in memory for later write"),i.parseDataAndRewind(e)),i.parse(e),(s=e.getPosition()-(i.start+i.size))<0?(a.warn("BoxParser","Parsing of box '"+u+"' did not read the entire indicated box data size (missing "+-s+" bytes), seeking forward"),e.seek(i.start+i.size)):s>0&&(a.error("BoxParser","Parsing of box '"+u+"' read "+s+" more bytes than the indicated box data size, seeking backwards"),0!==i.size&&e.seek(i.start+i.size)),{code:f.OK,box:i,size:i.size})},f.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size)},f.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},f.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size},f.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},f.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},f.ContainerBox.prototype.parse=function(e){for(var t,r;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96)},f.SAMPLE_ENTRY_TYPE_VISUAL="Visual",f.SAMPLE_ENTRY_TYPE_AUDIO="Audio",f.SAMPLE_ENTRY_TYPE_HINT="Hint",f.SAMPLE_ENTRY_TYPE_METADATA="Metadata",f.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",f.SAMPLE_ENTRY_TYPE_SYSTEM="System",f.SAMPLE_ENTRY_TYPE_TEXT="Text",f.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},f.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},f.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size},f.SampleEntry.prototype.parseFooter=function(e){f.ContainerBox.prototype.parse.call(this,e)},f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_HINT),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_METADATA),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SUBTITLE),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SYSTEM),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_TEXT),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,(function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)})),f.createMediaSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,(function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)})),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_TEXT,"enct"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_METADATA,"encm"),f.createBoxCtor("a1lx",(function(e){var t=16*(1+(1&(1&e.readUint8())));this.layer_size=[];for(var r=0;r<3;r++)this.layer_size[r]=16==t?e.readUint16():e.readUint32()})),f.createBoxCtor("a1op",(function(e){this.op_index=e.readUint8()})),f.createFullBoxCtor("auxC",(function(e){this.aux_type=e.readCString();var t=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=e.readUint8Array(t)})),f.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)a.error("av1C marker problem");else if(this.version=127&t,1===this.version)if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void a.error("av1C reserved_2 parsing problem");var r=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(r)}else a.error("av1C reserved_1 parsing problem");else a.error("av1C version "+this.version+" not supported")})),f.createBoxCtor("avcC",(function(e){var t,r;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(r))})),f.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),f.createFullBoxCtor("ccst",(function(e){var t=e.readUint8();this.all_ref_pics_intra=128==(128&t),this.intra_pred_used=64==(64&t),this.max_ref_per_pic=(63&t)>>2,e.readUint24()})),f.createBoxCtor("cdef",(function(e){var t;for(this.channel_count=e.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],t=0;t=32768&&this.component_type_urls.push(e.readCString())}})),f.createFullBoxCtor("co64",(function(e){var t,r;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4))})),f.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),f.createFullBoxCtor("cslg",(function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())})),f.createFullBoxCtor("ctts",(function(e){var t,r;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|i>>5&7})),f.createBoxCtor("dec3",(function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var r=0;r>6,i.bsid=s>>1&31,i.bsmod=(1&s)<<4|n>>4&15,i.acmod=n>>1&7,i.lfeon=1&n,i.num_dep_sub=a>>1&15,i.num_dep_sub>0&&(i.chan_loc=(1&a)<<8|e.readUint8())}})),f.createFullBoxCtor("dfLa",(function(e){var t=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var i=e.readUint8(),s=Math.min(127&i,r.length-1);if(s?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(r[s]),128&i)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),f.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),f.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),f.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),f.createBoxCtor("dOps",(function(e){if(this.Version=e.readUint8(),this.OutputChannelCount=e.readUint8(),this.PreSkip=e.readUint16(),this.InputSampleRate=e.readUint32(),this.OutputGain=e.readInt16(),this.ChannelMappingFamily=e.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=e.readUint8(),this.CoupledCount=e.readUint8(),this.ChannelMapping=[];for(var t=0;t=4;)this.compatible_brands[r]=e.readString(4),t-=4,r++})),f.createFullBoxCtor("hdlr",(function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))})),f.createBoxCtor("hvcC",(function(e){var t,r,i,s;this.configurationVersion=e.readUint8(),s=e.readUint8(),this.general_profile_space=s>>6,this.general_tier_flag=(32&s)>>5,this.general_profile_idc=31&s,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),s=e.readUint8(),this.constantFrameRate=s>>6,this.numTemporalLayers=(13&s)>>3,this.temporalIdNested=(4&s)>>2,this.lengthSizeMinusOne=3&s,this.nalu_arrays=[];var n=e.readUint8();for(t=0;t>7,a.nalu_type=63&s;var o=e.readUint16();for(r=0;r>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var r=0;if(this.version<2)r=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";r=e.readUint32()}for(var i=0;i>7,this.axis=1&t})),f.createFullBoxCtor("infe",(function(e){if(0!==this.version&&1!==this.version||(this.item_ID=e.readUint16(),this.item_protection_index=e.readUint16(),this.item_name=e.readCString(),this.content_type=e.readCString(),this.content_encoding=e.readCString()),1===this.version)return this.extension_type=e.readString(4),a.warn("BoxParser","Cannot parse extension type"),void e.seek(this.start+this.size);this.version>=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()))})),f.createFullBoxCtor("ipma",(function(e){var t,r;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?a.property_index=(127&n)<<8|e.readUint8():a.property_index=127&n}}})),f.createFullBoxCtor("iref",(function(e){var t,r;for(this.references=[];e.getPosition()>7,i.assignment_type=127&s,i.assignment_type){case 0:i.grouping_type=e.readString(4);break;case 1:i.grouping_type=e.readString(4),i.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:i.sub_track_id=e.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type")}}})),f.createBoxCtor("lsel",(function(e){this.layer_id=e.readUint16()})),f.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),c.prototype.toString=function(){return"("+this.x+","+this.y+")"},f.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]=new c(e.readUint16(),e.readUint16()),this.display_primaries[1]=new c(e.readUint16(),e.readUint16()),this.display_primaries[2]=new c(e.readUint16(),e.readUint16()),this.white_point=new c(e.readUint16(),e.readUint16()),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),f.createFullBoxCtor("mdhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()})),f.createFullBoxCtor("mehd",(function(e){1&this.flags&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()})),f.createFullBoxCtor("meta",(function(e){this.boxes=[],f.ContainerBox.prototype.parse.call(this,e)})),f.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),f.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),f.createFullBoxCtor("mskC",(function(e){this.bits_per_pixel=e.readUint8()})),f.createFullBoxCtor("mvhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()})),f.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),f.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),f.createFullBoxCtor("padb",(function(e){var t=e.readUint32();this.padbits=[];for(var r=0;r0){var t=e.readUint32();this.kid=[];for(var r=0;r0&&(this.data=e.readUint8Array(i))})),f.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),f.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),f.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),f.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),f.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),f.createFullBoxCtor("saio",(function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var r=e.readUint8(),i=0;i>7,this.num_leading_samples=127&t})),f.createSampleGroupCtor("rash",(function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=f.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))})),f.createSampleGroupCtor("stsa",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),f.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),f.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),f.createSampleGroupCtor("tsas",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),f.createSampleGroupCtor("tscl",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),f.createSampleGroupCtor("vipr",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),f.createFullBoxCtor("sbgp",(function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),r=0;r>6,this.sample_depends_on[i]=t>>4&3,this.sample_is_depended_on[i]=t>>2&3,this.sample_has_redundancy[i]=3&t})),f.createFullBoxCtor("senc"),f.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),r=0;r>31&1,i.referenced_size=2147483647&s,i.subsegment_duration=e.readUint32(),s=e.readUint32(),i.starts_with_SAP=s>>31&1,i.SAP_type=s>>28&7,i.SAP_delta_time=268435455&s}})),f.SingleItemTypeReferenceBox=function(e,t,r,i){f.Box.call(this,e,t),this.hdr_size=r,this.start=i},f.SingleItemTypeReferenceBox.prototype=new f.Box,f.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[t+1]=15&i}else if(8===this.field_size)for(t=0;t0)for(r=0;r>4&15,this.default_skip_byte_block=15&t}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=f.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))})),f.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),f.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&f.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&f.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&f.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&f.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&f.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),f.createFullBoxCtor("tfra",(function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var r=e.readUint32(),i=0;i>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()})),f.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),f.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),f.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),f.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),f.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),f.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},f.createTrackGroupCtor("msrc"),f.TrackReferenceTypeBox=function(e,t,r,i){f.Box.call(this,e,t),this.hdr_size=r,this.start=i},f.TrackReferenceTypeBox.prototype=new f.Box,f.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},f.trefBox.prototype.parse=function(e){for(var t,r;e.getPosition()t&&this.flags&f.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&f.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=e.readUint32(),this.row_align_size=e.readUint32(),this.tile_align_size=e.readUint32(),this.num_tile_cols_minus_one=e.readUint32(),this.num_tile_rows_minus_one=e.readUint32()}})),f.createFullBoxCtor("url ",(function(e){1!==this.flags&&(this.location=e.readCString())})),f.createFullBoxCtor("urn ",(function(e){this.name=e.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=e.readCString())})),f.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")})),f.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=f.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),f.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),f.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=f.parseHex16(e)})),f.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize))})),f.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),f.createFullBoxCtor("vvcC",(function(e){var t,r,i={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){this.held_bits=e.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(e){this.held_bits=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=this.held_bits>>this.num_held_bits-e&(1<1){for(i.stream_read_1_bytes(e),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var a=i.extract_bits(1);this.ptl_sublayer_present_mask|=a<1;++r)i.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<>=1;t+=f.decimalToHex(i,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var s=!1,n="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||s)&&(n="."+f.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+n,s=!0);t+=n}return t},f.vvc1SampleEntry.prototype.getCodec=f.vvi1SampleEntry.prototype.getCodec=function(){var e,t=f.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var r="";if(this.vvcC.general_constraint_info){var i,s=[],n=0;for(n|=this.vvcC.ptl_frame_only_constraint<<7,n|=this.vvcC.ptl_multilayer_enabled<<6,e=0;e>2&63,s.push(n),n&&(i=e),n=this.vvcC.general_constraint_info[e]>>2&3;if(void 0===i)r=".CA";else{r=".C";var a="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",o=0,l=0;for(e=0;e<=i;++e)for(o=o<<8|s[e],l+=8;l>=5;){r+=a[o>>l-5&31],o&=(1<<(l-=5))-1}l&&(r+=a[31&(o<<=5-l)])}}t+=r}return t},f.mp4aSampleEntry.prototype.getCodec=function(){var e=f.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),r=this.esds.esd.getAudioConfig();return e+"."+f.decimalToHex(t)+(r?"."+r:"")}return e},f.stxtSampleEntry.prototype.getCodec=function(){var e=f.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},f.vp08SampleEntry.prototype.getCodec=f.vp09SampleEntry.prototype.getCodec=function(){var e=f.SampleEntry.prototype.getCodec.call(this),t=this.vpcC.level;0==t&&(t="00");var r=this.vpcC.bitDepth;return 8==r&&(r="08"),e+".0"+this.vpcC.profile+"."+t+"."+r},f.av01SampleEntry.prototype.getCodec=function(){var e,t=f.SampleEntry.prototype.getCodec.call(this),r=this.av1C.seq_level_idx_0;return r<10&&(r="0"+r),2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+r+(this.av1C.seq_tier_0?"H":"M")+"."+e},f.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>d?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>d&&e.writeUint64(this.size)},f.FullBox.prototype.writeHeader=function(e){this.size+=4,f.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},f.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))},f.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1t?1:0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(e),1===this.version?e.writeUint64(this.baseMediaDecodeTime):e.writeUint32(this.baseMediaDecodeTime)},f.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&f.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&f.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&f.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&f.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&f.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&f.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&f.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&f.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&f.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&f.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags)},f.tkhdBox.prototype.write=function(e){this.version=0,this.size=80,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.track_id),e.writeUint32(0),e.writeUint32(this.duration),e.writeUint32(0),e.writeUint32(0),e.writeInt16(this.layer),e.writeInt16(this.alternate_group),e.writeInt16(this.volume<<8),e.writeUint16(0),e.writeInt32Array(this.matrix),e.writeUint32(this.width),e.writeUint32(this.height)},f.trexBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20,this.writeHeader(e),e.writeUint32(this.track_id),e.writeUint32(this.default_sample_description_index),e.writeUint32(this.default_sample_duration),e.writeUint32(this.default_sample_size),e.writeUint32(this.default_sample_flags)},f.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&f.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&f.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&f.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&f.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&f.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&f.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&f.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&f.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var t=0;t-1||e[r]instanceof f.Box||t[r]instanceof f.Box||void 0===e[r]||void 0===t[r]||"function"==typeof e[r]||"function"==typeof t[r]||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||"data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r||f.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1||e[r]===t[r]))return!1;return!0},f.boxEqual=function(e,t){if(!f.boxEqualFields(e,t))return!1;for(var r=0;r1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1)},g.prototype.setExtractionOptions=function(e,t,r){var i=this.getTrackById(e);if(i){var s={};this.extractedTracks.push(s),s.id=e,s.user=t,s.trak=i,i.nextSample=0,s.nb_samples=1e3,s.samples=[],r&&r.nbSamples&&(s.nb_samples=r.nbSamples)}},g.prototype.unsetExtractionOptions=function(e){for(var t=-1,r=0;r-1&&this.extractedTracks.splice(t,1)},g.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}if(this.saveParsePosition&&this.saveParsePosition(),(e=f.parseOneBox(this.stream,false)).code===f.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var r;switch(r="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),r){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[r]&&a.warn("ISOFile","Duplicate Box of type: "+r+", overriding previous occurrence"),this[r]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},g.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(a.warn("ISOFile","Not ready to start parsing"),!1))},g.prototype.appendBuffer=function(e,t){var r;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},g.prototype.getInfo=function(){var e,t,r,i,s,n,a={},o=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(a.hasMoov=!0,a.duration=this.moov.mvhd.duration,a.timescale=this.moov.mvhd.timescale,a.isFragmented=null!=this.moov.mvex,a.isFragmented&&this.moov.mvex.mehd&&(a.fragment_duration=this.moov.mvex.mehd.fragment_duration),a.isProgressive=this.isProgressive,a.hasIOD=null!=this.moov.iods,a.brands=[],a.brands.push(this.ftyp.major_brand),a.brands=a.brands.concat(this.ftyp.compatible_brands),a.created=new Date(o+1e3*this.moov.mvhd.creation_time),a.modified=new Date(o+1e3*this.moov.mvhd.modification_time),a.tracks=[],a.audioTracks=[],a.videoTracks=[],a.subtitleTracks=[],a.metadataTracks=[],a.hintTracks=[],a.otherTracks=[],e=0;e0?a.mime+='video/mp4; codecs="':a.audioTracks&&a.audioTracks.length>0?a.mime+='audio/mp4; codecs="':a.mime+='application/mp4; codecs="',e=0;e=r.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+i.id+" for samples ["+Math.max(0,r.nextSample-i.nb_samples)+","+(r.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(i.id,i.user,i.segmentStream.buffer,r.nextSample,e||r.nextSample>=r.samples.length),i.segmentStream=null,i!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t=r.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+n.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(n.id,n.user,n.samples),n.samples=[],n!==this.extractedTracks[t]))break}}}},g.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},g.prototype.getBoxes=function(e,t){var r=[];return g._sweep.call(this,e,r,t),r},g._sweep=function(e,t,r){for(var i in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&r)return;g._sweep.call(this.boxes[i],e,t,r)}},g.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},g.prototype.getTrackSample=function(e,t){var r=this.getTrackById(e);return this.getSample(r,t)},g.prototype.releaseUsedSamples=function(e,t){var r=0,i=this.getTrackById(e);i.lastValidSample||(i.lastValidSample=0);for(var s=i.lastValidSample;se*s.timescale){d=i-1;break}t&&s.is_sync&&(l=i)}for(t&&(d=l),e=r.samples[d].cts,r.nextSample=d;r.samples[d].alreadyRead===r.samples[d].size&&r.samples[d+1];)d++;return n=r.samples[d].offset+r.samples[d].alreadyRead,a.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+a.getDurationString(e,o)+" and offset: "+n),{offset:n,time:e/o}},g.prototype.getTrackDuration=function(e){var t;return e.samples?((t=e.samples[e.samples.length-1]).cts+t.duration)/t.timescale:1/0},g.prototype.seek=function(e,t){var r,i,s,n=this.moov,o={offset:1/0,time:1/0};if(this.moov){for(s=0;sthis.getTrackDuration(r)||((i=this.seekTrack(e,t,r)).offset-1){a=l;break}switch(a){case"Visual":if(s.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),n.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24),t.avcDecoderConfigRecord){var u=new f.avcCBox;u.parse(new o(t.avcDecoderConfigRecord)),n.addBox(u)}else if(t.hevcDecoderConfigRecord){var c=new f.hvcCBox;c.parse(new o(t.hevcDecoderConfigRecord)),n.addBox(c)}break;case"Audio":s.add("smhd").set("balance",t.balance||0),n.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":s.add("hmhd");break;case"Subtitle":if(s.add("sthd"),"stpp"===t.type)n.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");break;default:s.add("nmhd")}t.description&&n.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){n.addBox(e)})),s.add("dinf").add("dref").addEntry((new f["url Box"]).set("flags",1));var p=s.add("stbl");return p.add("stsd").addEntry(n),p.add("stts").set("sample_counts",[]).set("sample_deltas",[]),p.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),p.add("stco").set("chunk_offsets",[]),p.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(r),t.id}},f.Box.prototype.computeSize=function(e){var t=e||new l;t.endianness=l.BIG_ENDIAN,this.write(t)},g.prototype.addSample=function(e,t,r){var i=r||{},s={},n=this.getTrackById(e);if(null!==n){s.number=n.samples.length,s.track_id=n.tkhd.track_id,s.timescale=n.mdia.mdhd.timescale,s.description_index=i.sample_description_index?i.sample_description_index-1:0,s.description=n.mdia.minf.stbl.stsd.entries[s.description_index],s.data=t,s.size=t.byteLength,s.alreadyRead=s.size,s.duration=i.duration||1,s.cts=i.cts||0,s.dts=i.dts||0,s.is_sync=i.is_sync||!1,s.is_leading=i.is_leading||0,s.depends_on=i.depends_on||0,s.is_depended_on=i.is_depended_on||0,s.has_redundancy=i.has_redundancy||0,s.degradation_priority=i.degradation_priority||0,s.offset=0,s.subsamples=i.subsamples,n.samples.push(s),n.samples_size+=s.size,n.samples_duration+=s.duration,void 0===n.first_dts&&(n.first_dts=i.dts),this.processSamples();var a=this.createSingleSampleMoof(s);return this.addBox(a),a.computeSize(),a.trafs[0].truns[0].data_offset=a.size+8,this.add("mdat").data=new Uint8Array(t),s}},g.prototype.createSingleSampleMoof=function(e){var t=0;t=e.is_sync?1<<25:65536;var r=new f.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var i=r.add("traf"),s=this.getTrackById(e.track_id);return i.add("tfhd").set("track_id",e.track_id).set("flags",f.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add("tfdt").set("baseMediaDecodeTime",e.dts-(s.first_dts||0)),i.add("trun").set("flags",f.TRUN_FLAGS_DATA_OFFSET|f.TRUN_FLAGS_DURATION|f.TRUN_FLAGS_SIZE|f.TRUN_FLAGS_FLAGS|f.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[t]).set("sample_composition_time_offset",[e.cts-e.dts]),r},g.prototype.lastMoofIndex=0,g.prototype.samplesDataSize=0,g.prototype.resetTables=function(){var e,t,r,i,s,n;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=s[a].grouping_type+"/0",(o=new d(s[a].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=o))}else for(a=0;a=2&&(l=i[a].grouping_type+"/0",o=new d(i[a].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=o))},g.setSampleGroupProperties=function(e,t,r,i){var s,n;for(s in t.sample_groups=[],i){var a;if(t.sample_groups[s]={},t.sample_groups[s].grouping_type=i[s].grouping_type,t.sample_groups[s].grouping_type_parameter=i[s].grouping_type_parameter,r>=i[s].last_sample_in_run&&(i[s].last_sample_in_run<0&&(i[s].last_sample_in_run=0),i[s].entry_index++,i[s].entry_index<=i[s].sbgp.entries.length-1&&(i[s].last_sample_in_run+=i[s].sbgp.entries[i[s].entry_index].sample_count)),i[s].entry_index<=i[s].sbgp.entries.length-1?t.sample_groups[s].group_description_index=i[s].sbgp.entries[i[s].entry_index].group_description_index:t.sample_groups[s].group_description_index=-1,0!==t.sample_groups[s].group_description_index)a=i[s].fragment_description?i[s].fragment_description:i[s].description,t.sample_groups[s].group_description_index>0?(n=t.sample_groups[s].group_description_index>65535?(t.sample_groups[s].group_description_index>>16)-1:t.sample_groups[s].group_description_index-1,a&&n>=0&&(t.sample_groups[s].description=a.entries[n])):a&&a.version>=2&&a.default_group_description_index>0&&(t.sample_groups[s].description=a.entries[a.default_group_description_index-1])}},g.process_sdtp=function(e,t,r){t&&(e?(t.is_leading=e.is_leading[r],t.depends_on=e.sample_depends_on[r],t.is_depended_on=e.sample_is_depended_on[r],t.has_redundancy=e.sample_has_redundancy[r]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))},g.prototype.buildSampleLists=function(){var e,t;for(e=0;eb&&(v++,b<0&&(b=0),b+=n.sample_counts[v]),t>0?(e.samples[t-1].duration=n.sample_deltas[v],e.samples_duration+=e.samples[t-1].duration,A.dts=e.samples[t-1].dts+e.samples[t-1].duration):A.dts=0,a?(t>=w&&(S++,w<0&&(w=0),w+=a.sample_counts[S]),A.cts=e.samples[t].dts+a.sample_offsets[S]):A.cts=A.dts,o?(t==o.sample_numbers[E]-1?(A.is_sync=!0,E++):(A.is_sync=!1,A.degradation_priority=0),d&&d.entries[U].sample_delta+x==t+1&&(A.subsamples=d.entries[U].subsamples,x+=d.entries[U].sample_delta,U++)):A.is_sync=!0,g.process_sdtp(e.mdia.minf.stbl.sdtp,A,A.number),A.degradation_priority=f?f.priority[t]:0,d&&d.entries[U].sample_delta+x==t&&(A.subsamples=d.entries[U].subsamples,x+=d.entries[U].sample_delta),(h.length>0||u.length>0)&&g.setSampleGroupProperties(e,A,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}},g.prototype.updateSampleLists=function(){var e,t,r,i,s,n,a,o,l,d,h,u,c,p,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&g.initSampleGroups(u,h,h.sbgps,u.mdia.minf.stbl.sgpds,h.sgpds),t=0;t0?p.dts=u.samples[u.samples.length-2].dts+u.samples[u.samples.length-2].duration:(h.tfdt?p.dts=h.tfdt.baseMediaDecodeTime:p.dts=0,u.first_traf_merged=!0),p.cts=p.dts,_.flags&f.TRUN_FLAGS_CTS_OFFSET&&(p.cts=p.dts+_.sample_composition_time_offset[r]),m=a,_.flags&f.TRUN_FLAGS_FLAGS?m=_.sample_flags[r]:0===r&&_.flags&f.TRUN_FLAGS_FIRST_FLAG&&(m=_.first_sample_flags),p.is_sync=!(m>>16&1),p.is_leading=m>>26&3,p.depends_on=m>>24&3,p.is_depended_on=m>>22&3,p.has_redundancy=m>>20&3,p.degradation_priority=65535&m;var y=!!(h.tfhd.flags&f.TFHD_FLAG_BASE_DATA_OFFSET),b=!!(h.tfhd.flags&f.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),v=!!(_.flags&f.TRUN_FLAGS_DATA_OFFSET),w=0;w=y?h.tfhd.base_data_offset:b||0===t?d.start:o,p.offset=0===t&&0===r?v?w+_.data_offset:w:o,o=p.offset+p.size,(h.sbgps.length>0||h.sgpds.length>0||u.mdia.minf.stbl.sbgps.length>0||u.mdia.minf.stbl.sgpds.length>0)&&g.setSampleGroupProperties(u,p,p.number_in_traf,h.sample_groups_info)}}if(h.subs){u.has_fragment_subsamples=!0;var S=h.first_sample_index;for(t=0;t-1))return null;var n=(r=this.stream.buffers[s]).byteLength-(i.offset+i.alreadyRead-r.fileStart);if(i.size-i.alreadyRead<=n)return a.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-r.fileStart)+" read size: "+(i.size-i.alreadyRead)+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,r,i.offset+i.alreadyRead-r.fileStart,i.size-i.alreadyRead),r.usedBytes+=i.size-i.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead=i.size,i;if(0===n)return null;a.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-r.fileStart)+" read size: "+n+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,r,i.offset+i.alreadyRead-r.fileStart,n),i.alreadyRead+=n,r.usedBytes+=n,this.stream.logBufferLevel()}},g.prototype.releaseSample=function(e,t){var r=e.samples[t];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},g.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},g.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec()}return t},g.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(r.protection=n.ipro.protections[n.iinf.item_infos[e].protection_index-1]),n.iinf.item_infos[e].item_type?r.type=n.iinf.item_infos[e].item_type:r.type="mime",r.content_type=n.iinf.item_infos[e].content_type,r.content_encoding=n.iinf.item_infos[e].content_encoding;if(n.grpl)for(e=0;e0&&f.property_index-1-1))return null;var o=(t=this.stream.buffers[n]).byteLength-(s.offset+s.alreadyRead-t.fileStart);if(!(s.length-s.alreadyRead<=o))return a.debug("ISOFile","Getting item #"+e+" extent #"+i+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-t.fileStart)+" read size: "+o+" full extent size: "+s.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,t,s.offset+s.alreadyRead-t.fileStart,o),s.alreadyRead+=o,r.alreadyRead+=o,t.usedBytes+=o,this.stream.logBufferLevel(),null;a.debug("ISOFile","Getting item #"+e+" extent #"+i+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-t.fileStart)+" read size: "+(s.length-s.alreadyRead)+" full extent size: "+s.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,t,s.offset+s.alreadyRead-t.fileStart,s.length-s.alreadyRead),t.usedBytes+=s.length-s.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=s.length-s.alreadyRead,s.alreadyRead=s.length}}return r.alreadyRead===r.size?r:null},g.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var r=0;r0?this.moov.traks[e].samples[0].duration:0),t.push(i)}return t},f.Box.prototype.printHeader=function(e){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},f.FullBox.prototype.printHeader=function(e){this.size+=4,f.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},f.Box.prototype.print=function(e){this.printHeader(e)},f.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)},f.tkhdBox.prototype.print=function(e){f.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)};var y={createFile:function(e,t){var r=void 0===e||e,i=new g(t);return i.discardMdatData=!r,i}};t.createFile=y.createFile}));function Vr(e){return e.reduce(((e,t)=>256*e+t))}function Wr(e){const t=[101,103,119,99],r=e.length-28,i=e.slice(r,r+t.length);return t.every(((e,t)=>e===i[t]))}Hr.Log,Hr.MP4BoxStream,Hr.DataStream,Hr.MultiBufferStream,Hr.MPEG4DescriptorParser,Hr.BoxParser,Hr.XMLSubtitlein4Parser,Hr.Textin4Parser,Hr.ISOFile,Hr.createFile;class jr{constructor(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=new Uint8Array([30,158,90,33,244,57,83,165,2,70,35,87,215,231,226,108]),this.t=this.n.slice().reverse()}destroy(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=null,this.t=null}transport(e){if(!this.s&&this.l>50)return e;if(this.l++,this.d)return e;const t=new Uint8Array(e);if(this.A){if(!(this.c~e))}(e.slice(r+32,r+32+t))]}return null}(t,this.t);if(!r)return e;const i=function(e){try{if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiate)throw null;{const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(!(e instanceof WebAssembly.Module&&new WebAssembly.Instance(e)instanceof WebAssembly.Instance))throw null}}catch(e){return new Error("video_error_4")}let t;try{t={env:{__handle_stack_overflow:()=>e(new Error("video_error_1")),memory:new WebAssembly.Memory({initial:256,maximum:256})}}}catch(e){return new Error("video_error_5")}return t}(e);if(i instanceof Error)return console.error(i.message),this.d=!0,e;this.A=!0,this.u=r[1],Wr(t)&&this.c++,WebAssembly.instantiate(r[2],i).then((e=>{if("function"!=typeof(t=e.instance.exports).parse||"object"!=typeof t.memory)return this.d=!0,void console.error("video_error_3");var t;this.s=e.instance.exports,this.a=new Uint8Array(this.s.memory.buffer)})).catch((e=>{this.d=!0,console.error("video_error_6")}))}return e}}const Yr=16,qr=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Kr=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Xr(e){const t=[];for(let r=0,i=e.length;r1===(e=e.toString(16)).length?"0"+e:e)).join("")}function Jr(e){const t=[];for(let r=0,i=e.length;r>>6),t.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)t.push(224|i>>>12),t.push(128|i>>>6&63),t.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw t.push(i),new Error("input is not supported");r++,t.push(240|i>>>18&28),t.push(128|i>>>12&63),t.push(128|i>>>6&63),t.push(128|63&i)}}return t}function Qr(e){const t=[];for(let r=0,i=e.length;r=240&&e[r]<=247?(t.push(String.fromCodePoint(((7&e[r])<<18)+((63&e[r+1])<<12)+((63&e[r+2])<<6)+(63&e[r+3]))),r+=3):e[r]>=224&&e[r]<=239?(t.push(String.fromCodePoint(((15&e[r])<<12)+((63&e[r+1])<<6)+(63&e[r+2]))),r+=2):e[r]>=192&&e[r]<=223?(t.push(String.fromCodePoint(((31&e[r])<<6)+(63&e[r+1]))),r++):t.push(String.fromCodePoint(e[r]));return t.join("")}function ei(e,t){const r=31&t;return e<>>32-r}function ti(e){return(255&qr[e>>>24&255])<<24|(255&qr[e>>>16&255])<<16|(255&qr[e>>>8&255])<<8|255&qr[255&e]}function ri(e){return e^ei(e,2)^ei(e,10)^ei(e,18)^ei(e,24)}function ii(e){return e^ei(e,13)^ei(e,23)}function si(e,t,r){const i=new Array(4),s=new Array(4);for(let t=0;t<4;t++)s[0]=255&e[4*t],s[1]=255&e[4*t+1],s[2]=255&e[4*t+2],s[3]=255&e[4*t+3],i[t]=s[0]<<24|s[1]<<16|s[2]<<8|s[3];for(let e,t=0;t<32;t+=4)e=i[1]^i[2]^i[3]^r[t+0],i[0]^=ri(ti(e)),e=i[2]^i[3]^i[0]^r[t+1],i[1]^=ri(ti(e)),e=i[3]^i[0]^i[1]^r[t+2],i[2]^=ri(ti(e)),e=i[0]^i[1]^i[2]^r[t+3],i[3]^=ri(ti(e));for(let e=0;e<16;e+=4)t[e]=i[3-e/4]>>>24&255,t[e+1]=i[3-e/4]>>>16&255,t[e+2]=i[3-e/4]>>>8&255,t[e+3]=255&i[3-e/4]}function ni(e,t,r){const i=new Array(4),s=new Array(4);for(let t=0;t<4;t++)s[0]=255&e[0+4*t],s[1]=255&e[1+4*t],s[2]=255&e[2+4*t],s[3]=255&e[3+4*t],i[t]=s[0]<<24|s[1]<<16|s[2]<<8|s[3];i[0]^=2746333894,i[1]^=1453994832,i[2]^=1736282519,i[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=i[1]^i[2]^i[3]^Kr[r+0],t[r+0]=i[0]^=ii(ti(e)),e=i[2]^i[3]^i[0]^Kr[r+1],t[r+1]=i[1]^=ii(ti(e)),e=i[3]^i[0]^i[1]^Kr[r+2],t[r+2]=i[2]^=ii(ti(e)),e=i[0]^i[1]^i[2]^Kr[r+3],t[r+3]=i[3]^=ii(ti(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function ai(e,t,r){let{padding:i="pkcs#7",mode:s,iv:n=[],output:a="string"}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("cbc"===s&&("string"==typeof n&&(n=Xr(n)),16!==n.length))throw new Error("iv is invalid");if("string"==typeof t&&(t=Xr(t)),16!==t.length)throw new Error("key is invalid");if(e="string"==typeof e?0!==r?Jr(e):Xr(e):[...e],("pkcs#5"===i||"pkcs#7"===i)&&0!==r){const t=Yr-e.length%Yr;for(let r=0;r=Yr;){const t=e.slice(u,u+16),i=new Array(16);if("cbc"===s)for(let e=0;e2&&void 0!==arguments[2]&&arguments[2];const i=e.byteLength;let s=5;for(;si)break;let a=e[s+4],o=!1;if(r?(a=a>>>1&63,o=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(a)):(a&=31,o=1===a||5===a),o){const r=ai(e.slice(s+4+2,s+4+n),t,0,{padding:"none",output:"array"});e.set(r,s+4+2)}s=s+4+n}return e}const di={init:0,findFirstStartCode:1,findSecondStartCode:2};class hi extends class{on(e,t,r){const i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:r}),this}once(e,t,r){const i=this;function s(){i.off(e,s);for(var n=arguments.length,a=new Array(n),o=0;o1?r-1:0),s=1;s{delete r[e]})),void delete this.e;const i=r[e],s=[];if(i&&t)for(let e=0,r=i.length;e=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(!(!1&this.tempBuffer[this.parsedOffset+1])){this.versionLayer=this.tempBuffer[this.parsedOffset+1],this.state=di.findFirstStartCode,this.fisrtStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==di.findFirstStartCode){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(this.tempBuffer[this.parsedOffset+1]==this.versionLayer){this.state=di.findSecondStartCode,this.secondStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==di.findSecondStartCode){let e=this.tempBuffer.slice(this.fisrtStartCodeOffset,this.secondStartCodeOffset);this.emit("data",e,t),this.tempBuffer=this.tempBuffer.slice(this.secondStartCodeOffset),this.fisrtStartCodeOffset=0,this.parsedOffset=2,this.state=di.findFirstStartCode}}}}function ui(e,t,r){for(let i=2;i3&&void 0!==arguments[3]&&arguments[3];const s=e.byteLength;let n=5;for(;ns)break;let o=e[n+4],l=!1;if(i?(o=o>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,l=1===o||5===o),l){const i=ui(e.slice(n+4,n+4+a),t,r);e.set(i,n+4)}n=n+4+a}return e}Date.now||(Date.now=function(){return(new Date).getTime()}),t().then((e=>{!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[],s=[],n={},a=new AbortController,o=null,l=null,d=null,y=null,b=null,S=null,Ge=!1,je=!1,qe=!!xt(r),Ke=!1,nt=null,ft=null,Bt=null,Ct=[],Tt=null,kt=null,Dt=0,Pt=0,Lt=null,Wt=null,jt=0,Yt=0,Jt=!1,or=!1,lr=!1,dr=null,hr=null,ur=null,fr=!1,cr=()=>{const e=Et();return{debug:e.debug,debugLevel:e.debugLevel,debugUuid:e.debugUuid,useOffscreen:e.useOffscreen,useWCS:e.useWCS,useMSE:e.useMSE,videoBuffer:e.videoBuffer,videoBufferDelay:e.videoBufferDelay,openWebglAlignment:e.openWebglAlignment,playType:e.playType,hasAudio:e.hasAudio,hasVideo:e.hasVideo,playbackRate:1,playbackForwardMaxRateDecodeIFrame:e.playbackForwardMaxRateDecodeIFrame,playbackIsCacheBeforeDecodeForFpsRender:e.playbackConfig.isCacheBeforeDecodeForFpsRender,sampleRate:0,networkDelay:e.networkDelay,visibility:!0,useSIMD:e.useSIMD,isRecording:!1,recordType:e.recordType,isNakedFlow:e.isNakedFlow,checkFirstIFrame:e.checkFirstIFrame,audioBufferSize:1024,isM7sCrypto:e.isM7sCrypto,m7sCryptoAudio:e.m7sCryptoAudio,cryptoKey:e.cryptoKey,cryptoIV:e.cryptoIV,isSm4Crypto:e.isSm4Crypto,sm4CryptoKey:e.sm4CryptoKey,isXorCrypto:e.isXorCrypto,isHls265:!1,isFlv:e.isFlv,isFmp4:e.isFmp4,isMpeg4:e.isMpeg4,isFmp4Private:e.isFmp4Private,isEmitSEI:e.isEmitSEI,isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isDropSameTimestampGop:e.isDropSameTimestampGop,mseDecodeAudio:e.mseDecodeAudio,nakedFlowH265DemuxUseNew:e.nakedFlowH265DemuxUseNew}};"VideoEncoder"in self&&(n={hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:new VideoDecoder({output:function(e){if(n.isEmitInfo||(yr.debug.log("worker","Webcodecs Video Decoder initSize"),postMessage({cmd:U,w:e.codedWidth,h:e.codedHeight}),n.isEmitInfo=!0,n.offscreenCanvas=new OffscreenCanvas(e.codedWidth,e.codedHeight),n.offscreenCanvasCtx=n.offscreenCanvas.getContext("2d")),gt(e.createImageBitmap))e.createImageBitmap().then((t=>{n.offscreenCanvasCtx.drawImage(t,0,0,e.codedWidth,e.codedHeight);let r=n.offscreenCanvas.transferToImageBitmap();postMessage({cmd:x,buffer:r,delay:yr.delay,ts:0},[r]),vt(e)}));else{n.offscreenCanvasCtx.drawImage(e,0,0,e.codedWidth,e.codedHeight);let t=n.offscreenCanvas.transferToImageBitmap();postMessage({cmd:x,buffer:t,delay:yr.delay,ts:0},[t]),vt(e)}},error:function(e){yr.debug.error("worker","VideoDecoder error",e)}}),decode:function(e,t,r){const i=e[0]>>4==1;if(n.hasInit){const r=new EncodedVideoChunk({data:e.slice(5),timestamp:t,type:i?Ve:We});n.decoder.decode(r)}else if(i&&0===e[1]){const t=15&e[0];postMessage({cmd:F,code:t});const r=pt(e.slice(5));yr._opt.recordType===g&&postMessage({cmd:I,buffer:e,codecId:t},[e.buffer]),n.decoder.configure(r),n.hasInit=!0}},reset(){n.hasInit=!1,n.isEmitInfo=!1,n.offscreenCanvas=null,n.offscreenCanvasCtx=null}});let pr=function(){if(fr=!0,yr.fetchStatus!==Je||At(yr._opt.isChrome)){if(a)try{a.abort(),a=null}catch(e){yr.debug.log("worker","abort catch",e)}}else a=null,yr.debug.log("worker",`abort() and not abortController.abort() _status is ${yr.fetchStatus} and _isChrome is ${yr._opt.isChrome}`)},mr={init(){mr.lastBuf=null,mr.vps=null,mr.sps=null,mr.pps=null,mr.streamType=null,mr.localDts=0,mr.isSendSeqHeader=!1},destroy(){mr.lastBuf=null,mr.vps=null,mr.sps=null,mr.pps=null,mr.streamType=null,mr.localDts=0,mr.isSendSeqHeader=!1},dispatch(e){const t=new Uint8Array(e);mr.extractNALu$2(t)},getNaluDts(){let e=mr.localDts;return mr.localDts=mr.localDts+40,e},getNaluAudioDts(){const e=yr._opt.sampleRate,t=yr._opt.audioBufferSize;return mr.localDts+parseInt(t/e*1e3)},extractNALu(e){let t,r,i=0,s=e.byteLength,n=0,a=[];for(;i1)for(let e=0;e{const t=Ot(e);t===De||t===Ie?mr.handleVideoH264Nalu(e):$t(t)&&i.push(e)})),1===i.length)mr.handleVideoH264Nalu(i[0]);else if(Vt(i)){const e=Ot(i[0]),t=Ht(e);mr.handleVideoH264NaluList(i,t,e)}else i.forEach((e=>{mr.handleVideoH264Nalu(e)}))}else if(mr.streamType===Be)if(yr._opt.nakedFlowH265DemuxUseNew){const t=mr.handleAddNaluStartCode(e),r=mr.extractNALu(t);if(0===r.length)return void yr.debug.warn("worker","handleVideoNalu","h265 naluList.length === 0");const i=[];if(r.forEach((e=>{const t=rr(e);t===Oe||t===Ne||t===Me?mr.handleVideoH265Nalu(e):sr(t)&&i.push(e)})),1===i.length)mr.handleVideoH265Nalu(i[0]);else if(ar(i)){const e=rr(i[0]),t=nr(e);mr.handleVideoH265NaluList(i,t,e)}else i.forEach((e=>{this.handleVideoH265Nalu(e)}))}else rr(e)===Oe?mr.extractH265PPS(e):mr.handleVideoH265Nalu(e)},extractH264PPS(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{Gt(Ot(e))?mr.extractH264SEI(e):mr.handleVideoH264Nalu(e)}))},extractH265PPS(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{ir(rr(e))?mr.extractH265SEI(e):mr.handleVideoH265Nalu(e)}))},extractH264SEI(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{mr.handleVideoH264Nalu(e)}))},extractH265SEI(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{mr.handleVideoH265Nalu(e)}))},handleAddNaluStartCode(e){const t=[0,0,0,1],r=new Uint8Array(e.length+t.length);return r.set(t),r.set(e,t.length),r},handleVideoH264Nalu(e){const t=Ot(e);switch(t){case Ie:mr.sps=e;break;case De:mr.pps=e}if(mr.isSendSeqHeader){if(mr.sps&&mr.pps){const e=Rt({sps:mr.sps,pps:mr.pps}),t=mr.getNaluDts();yr.decode(e,{type:Q,ts:t,isIFrame:!0,cts:0}),mr.sps=null,mr.pps=null}if($t(t)){const r=Ht(t),i=mr.getNaluDts(),s=Mt(e,r);mr.doDecode(s,{type:Q,ts:i,isIFrame:r,cts:0})}else yr.debug.warn("work",`handleVideoH264Nalu Avc Seq Head is ${t}`)}else if(mr.sps&&mr.pps){mr.isSendSeqHeader=!0;const e=Rt({sps:mr.sps,pps:mr.pps});yr.decode(e,{type:Q,ts:0,isIFrame:!0,cts:0}),mr.sps=null,mr.pps=null}},handleVideoH264NaluList(e,t,r){if(mr.isSendSeqHeader){const i=mr.getNaluDts(),s=Nt(e.reduce(((e,t)=>{const r=Kt(e),i=Kt(t),s=new Uint8Array(r.byteLength+i.byteLength);return s.set(r,0),s.set(i,r.byteLength),s})),t);mr.doDecode(s,{type:Q,ts:i,isIFrame:t,cts:0}),yr.debug.log("worker",`handleVideoH264NaluList list size is ${e.length} package length is ${s.byteLength} isIFrame is ${t},nalu type is ${r}, dts is ${i}`)}else yr.debug.warn("worker","handleVideoH264NaluList isSendSeqHeader is false")},handleVideoH265Nalu(e){const t=rr(e);switch(t){case Me:mr.vps=e;break;case Ne:mr.sps=e;break;case Oe:mr.pps=e}if(mr.isSendSeqHeader){if(mr.vps&&mr.sps&&mr.pps){const e=Qt({vps:mr.vps,sps:mr.sps,pps:mr.pps}),t=mr.getNaluDts();yr.decode(e,{type:Q,ts:t,isIFrame:!0,cts:0}),mr.vps=null,mr.sps=null,mr.pps=null}if(sr(t)){const r=nr(t),i=mr.getNaluDts(),s=er(e,r);mr.doDecode(s,{type:Q,ts:i,isIFrame:r,cts:0})}else yr.debug.warn("work",`handleVideoH265Nalu HevcSeqHead is ${t}`)}else if(mr.vps&&mr.sps&&mr.pps){mr.isSendSeqHeader=!0;const e=Qt({vps:mr.vps,sps:mr.sps,pps:mr.pps});yr.decode(e,{type:Q,ts:0,isIFrame:!0,cts:0}),mr.vps=null,mr.sps=null,mr.pps=null}},handleVideoH265NaluList(e,t,r){if(mr.isSendSeqHeader){const i=mr.getNaluDts(),s=tr(e.reduce(((e,t)=>{const r=Kt(e),i=Kt(t),s=new Uint8Array(r.byteLength+i.byteLength);return s.set(r,0),s.set(i,r.byteLength),s})),t);mr.doDecode(s,{type:Q,ts:i,isIFrame:t,cts:0}),yr.debug.log("worker",`handleVideoH265NaluList list size is ${e.length} package length is ${s.byteLength} isIFrame is ${t},nalu type is ${r}, dts is ${i}`)}else yr.debug.warn("worker","handleVideoH265NaluList isSendSeqHeader is false")},doDecode(e,t){yr.calcNetworkDelay(t.ts),t.isIFrame&&yr.calcIframeIntervalTimestamp(t.ts),postMessage({cmd:z,type:me,value:e.byteLength}),postMessage({cmd:z,type:_e,value:t.ts}),yr.decode(e,t)}},_r={LOG_NAME:"worker fmp4Demuxer",mp4Box:Hr.createFile(),offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){_r.mp4Box.onReady=_r.onReady,_r.mp4Box.onError=_r.onError,_r.mp4Box.onSamples=_r.onSamples},initTransportDescarmber(){_r.transportDescarmber=new jr},_getSeqHeader(e){const t=_r.mp4Box.getTrackById(e.id);for(const e of t.mdia.minf.stbl.stsd.entries)if(e.avcC||e.hvcC){const t=new Hr.DataStream(void 0,0,Hr.DataStream.BIG_ENDIAN);let r=[];e.avcC?(e.avcC.write(t),r=[23,0,0,0,0]):(_r.isHevc=!0,dr=!0,e.hvcC.write(t),r=[28,0,0,0,0]);const i=new Uint8Array(t.buffer,8),s=new Uint8Array(r.length+i.length);return s.set(r,0),s.set(i,r.length),s}return null},onReady(e){yr.debug.log(_r.LOG_NAME,"onReady()",e);const t=e.videoTracks[0],r=e.audioTracks[0];if(t){_r.videoTrackId=t.id;const e=_r._getSeqHeader(t);e&&(yr.debug.log(_r.LOG_NAME,"seqHeader"),yr.decodeVideo(e,0,!0,0)),_r.mp4Box.setExtractionOptions(t.id)}if(r&&yr._opt.hasAudio){_r.audioTrackId=r.id;const e=r.audio||{},t=dt.indexOf(e.sample_rate),i=r.codec.replace("mp4a.40.","");_r.mp4Box.setExtractionOptions(r.id);const s=at({profile:parseInt(i,10),sampleRate:t,channel:e.channel_count});yr.debug.log(_r.LOG_NAME,"aacADTSHeader"),yr.decodeAudio(s,0)}_r.mp4Box.start()},onError(e){yr.debug.error(_r.LOG_NAME,"mp4Box onError",e)},onSamples(e,t,r){if(e===_r.videoTrackId)for(const e of r){const t=e.data,r=e.is_sync,i=1e3*e.cts/e.timescale;e.duration,e.timescale,r&&yr.calcIframeIntervalTimestamp(i);let s=null;s=_r.isHevc?tr(t,r):Nt(t,r),postMessage({cmd:z,type:me,value:s.byteLength}),postMessage({cmd:z,type:_e,value:i}),yr.decode(s,{type:Q,ts:i,isIFrame:r,cts:0})}else if(e===_r.audioTrackId){if(yr._opt.hasAudio)for(const e of r){const t=e.data,r=1e3*e.cts/e.timescale;e.duration,e.timescale;const i=new Uint8Array(t.byteLength+2);i.set([175,1],0),i.set(t,2),postMessage({cmd:z,type:pe,value:i.byteLength}),yr.decode(i,{type:J,ts:r,isIFrame:!1,cts:0})}}else yr.debug.warn(_r.LOG_NAME,"onSamples() trackId error",e)},dispatch(e){let t=e;"string"!=typeof e?"object"==typeof e?(_r.transportDescarmber&&(t=_r.transportDescarmber.transport(t)),t.buffer.fileStart=_r.offset,_r.offset+=t.byteLength,_r.mp4Box.appendBuffer(t.buffer)):yr.debug.warn(_r.LOG_NAME,"dispatch()","data is not object",e):yr.debug.warn(_r.LOG_NAME,"dispatch()","data is string",e)},destroy(){_r.mp4Box&&(_r.mp4Box.flush(),_r.mp4Box=null),_r.transportDescarmber&&(_r.transportDescarmber.destroy(),_r.transportDescarmber=null),_r.offset=0,_r.videoTrackId=null,_r.audioTrackId=null,_r.isHevc=!1}},gr={LOG_NAME:"worker mpeg4Demuxer",lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:"init",hasInitVideoCodec:!1,localDts:0,dispatch(e){const t=new Uint8Array(e);gr.extractNALu(t)},destroy(){gr.lastBuffer=new Uint8Array(0),gr.parsedOffset=0,gr.firstStartCodeOffset=0,gr.secondStartCodeOffset=0,gr.state="init",gr.hasInitVideoCodec=!1,gr.localDts=0},extractNALu(e){if(!e||e.byteLength<1)return void yr.debug.warn(gr.LOG_NAME,"extractNALu() buffer error",e);const t=new Uint8Array(gr.lastBuffer.length+e.length);for(t.set(gr.lastBuffer,0),t.set(new Uint8Array(e),gr.lastBuffer.length),gr.lastBuffer=t;;){if("init"===gr.state){let e=!1;for(;gr.lastBuffer.length-gr.parsedOffset>=4;)if(0===gr.lastBuffer[gr.parsedOffset])if(0===gr.lastBuffer[gr.parsedOffset+1])if(1===gr.lastBuffer[gr.parsedOffset+2]){if(182===gr.lastBuffer[gr.parsedOffset+3]){gr.state="findFirstStartCode",gr.firstStartCodeOffset=gr.parsedOffset,gr.parsedOffset+=4,e=!0;break}gr.parsedOffset++}else gr.parsedOffset++;else gr.parsedOffset++;else gr.parsedOffset++;if(e)continue;break}if("findFirstStartCode"===gr.state){let e=!1;for(;gr.lastBuffer.length-gr.parsedOffset>=4;)if(0===gr.lastBuffer[gr.parsedOffset])if(0===gr.lastBuffer[gr.parsedOffset+1])if(1===gr.lastBuffer[gr.parsedOffset+2]){if(182===gr.lastBuffer[gr.parsedOffset+3]){gr.state="findSecondStartCode",gr.secondStartCodeOffset=gr.parsedOffset,gr.parsedOffset+=4,e=!0;break}gr.parsedOffset++}else gr.parsedOffset++;else gr.parsedOffset++;else gr.parsedOffset++;if(e)continue;break}if("findSecondStartCode"===gr.state){if(!(gr.lastBuffer.length-gr.parsedOffset>0))break;{let e,t,r=192&gr.lastBuffer[gr.parsedOffset];e=0==r?gr.secondStartCodeOffset-14:gr.secondStartCodeOffset;let i=0==(192&gr.lastBuffer[gr.firstStartCodeOffset+4]);if(i){if(gr.firstStartCodeOffset-14<0)return void yr.debug.warn(gr.LOG_NAME,"firstStartCodeOffset -14 is",gr.firstStartCodeOffset-14);gr.hasInitVideoCodec||(gr.hasInitVideoCodec=!0,yr.debug.log(gr.LOG_NAME,"setCodec"),vr.setCodec(xe,"")),t=gr.lastBuffer.subarray(gr.firstStartCodeOffset-14,e)}else t=gr.lastBuffer.subarray(gr.firstStartCodeOffset,e);let s=gr.getNaluDts();gr.hasInitVideoCodec?(postMessage({cmd:z,type:me,value:t.byteLength}),postMessage({cmd:z,type:_e,value:s}),vr.decode(t,i?1:0,s)):yr.debug.warn(gr.LOG_NAME,"has not init video codec"),gr.lastBuffer=gr.lastBuffer.subarray(e),gr.firstStartCodeOffset=0==r?14:0,gr.parsedOffset=gr.firstStartCodeOffset+4,gr.state="findFirstStartCode"}}}},getNaluDts(){let e=gr.localDts;return gr.localDts=gr.localDts+40,e}},yr={isPlayer:!0,isPlayback:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:Ze,_opt:cr(),mp3Demuxer:null,startStreamRateAndStatsInterval:function(){yr.stopStreamRateAndStatsInterval(),d=setInterval((()=>{l&&l(0);const e=JSON.stringify({demuxBufferDelay:yr.getVideoBufferLength(),audioDemuxBufferDelay:yr.getAudioBufferLength(),flvBufferByteLength:yr.getFlvBufferLength(),netBuf:yr.networkDelay||0,pushLatestDelay:yr.pushLatestDelay||0,isStreamTsMoreThanLocal:Ke});postMessage({cmd:z,type:ye,value:e})}),1e3)},stopStreamRateAndStatsInterval:function(){d&&(clearInterval(d),d=null)},useOffscreen:function(){return yr._opt.useOffscreen&&"undefined"!=typeof OffscreenCanvas},getDelay:function(e,t){if(!e||yr._opt.hasVideo&&!qe)return-1;if(t===J)return yr.delay;if(yr.preDelayTimestamp&&yr.preDelayTimestamp>e)return yr.preDelayTimestamp-e>1e3&&yr.debug.warn("worker",`getDelay() and preDelayTimestamp is ${yr.preDelayTimestamp} > timestamp is ${e} more than ${yr.preDelayTimestamp-e}ms and return ${yr.delay}`),yr.preDelayTimestamp=e,yr.delay;if(yr.firstTimestamp){if(e){const t=Date.now()-yr.startTimestamp,r=e-yr.firstTimestamp;t>=r?(Ke=!1,yr.delay=t-r):(Ke=!0,yr.delay=r-t)}}else yr.firstTimestamp=e,yr.startTimestamp=Date.now(),yr.delay=-1;return yr.preDelayTimestamp=e,yr.delay},getDelayNotUpdateDelay:function(e,t){if(!e||yr._opt.hasVideo&&!qe)return-1;if(t===J)return yr.pushLatestDelay;if(yr.preDelayTimestamp&&yr.preDelayTimestamp-e>1e3)return yr.debug.warn("worker",`getDelayNotUpdateDelay() and preDelayTimestamp is ${yr.preDelayTimestamp} > timestamp is ${e} more than ${yr.preDelayTimestamp-e}ms and return -1`),-1;if(yr.firstTimestamp){let t=-1;if(e){const r=Date.now()-yr.startTimestamp,i=e-yr.firstTimestamp;r>=i?(Ke=!1,t=r-i):(Ke=!0,t=i-r)}return t}return-1},resetDelay:function(){yr.firstTimestamp=null,yr.startTimestamp=null,yr.delay=-1,yr.dropping=!1},resetAllDelay:function(){yr.resetDelay(),yr.preDelayTimestamp=null},doDecode:function(e){yr._opt.isEmitSEI&&e.type===Q&&yr.isWorkerFetch&&yr.findSei(e.payload,e.ts),yr._opt.useWCS&&yr.useOffscreen()&&e.type===Q&&n.decode?n.decode(e.payload,e.ts,e.cts):e.decoder.decode(e.payload,e.ts,e.isIFrame,e.cts)},decodeNext(e){if(0===i.length)return;const t=e.ts,s=i[0],n=e.type===Q&&Ut(e.payload);if(At(r))n&&(yr.debug.log("worker",`decode data type is ${e.type} and\n ts is ${t} next data type is ${s.type} ts is ${s.ts}\n isVideoSqeHeader is ${n}`),i.shift(),yr.doDecode(s));else{const r=s.ts-t,a=s.type===J&&e.type===Q;(r<=20||a||n)&&(yr.debug.log("worker",`decode data type is ${e.type} and\n ts is ${t} next data type is ${s.type} ts is ${s.ts}\n diff is ${r} and isVideoAndNextAudio is ${a} and isVideoSqeHeader is ${n}`),i.shift(),yr.doDecode(s))}},init:function(){yr.debug.log("worker","init and opt is",JSON.stringify(yr._opt));const e=yr._opt.playType===m,t=yr._opt.playType===_;if(mr.init(),yr.isPlayer=e,yr.isPlayback=t,yr.isPlaybackCacheBeforeDecodeForFpsRender())yr.debug.log("worker","playback and playbackIsCacheBeforeDecodeForFpsRender is true");else{const t=()=>{let t=null;if(i.length){if(yr.isPushDropping)return void yr.debug.warn("worker",`loop() isPushDropping is true and bufferList length is ${i.length}`);if(yr.dropping){for(t=i.shift(),yr.debug.warn("worker",`loop() dropBuffer is dropping and isIFrame ${t.isIFrame} and delay is ${yr.delay} and bufferlist is ${i.length}`);!t.isIFrame&&i.length;)t=i.shift();const e=yr.getDelayNotUpdateDelay(t.ts,t.type);t.isIFrame&&e<=yr.getNotDroppingDelayTs()&&(yr.debug.log("worker","loop() is dropping = false, is iFrame"),yr.dropping=!1,yr.doDecode(t),yr.decodeNext(t))}else if(yr.isPlayback||yr.isPlayUseMSE())for(;i.length;)t=i.shift(),yr.doDecode(t);else if(t=i[0],-1===yr.getDelay(t.ts,t.type))yr.debug.log("worker","loop() common dumex delay is -1 ,data.ts is",t.ts),i.shift(),yr.doDecode(t),yr.decodeNext(t);else if(yr.delay>yr._opt.videoBuffer+yr._opt.videoBufferDelay&&e)yr.hasIframeInBufferList()?(yr.debug.log("worker",`delay is ${yr.delay}, set dropping is true`),yr.resetAllDelay(),yr.dropping=!0,postMessage({cmd:M})):(i.shift(),yr.doDecode(t),yr.decodeNext(t));else for(;i.length;){if(t=i[0],!(yr.getDelay(t.ts,t.type)>yr._opt.videoBuffer)){yr.delay<0&&yr.debug.warn("worker",`loop() do not decode and delay is ${yr.delay}, bufferList is ${i.length}`);break}i.shift(),yr.doDecode(t)}}else-1!==yr.delay&&yr.debug.log("worker","loop() bufferList is empty and reset delay"),yr.resetAllDelay()};yr.stopId=setInterval((()=>{let e=(new Date).getTime();nt||(nt=e);const r=e-nt;r>100&&yr.debug.warn("worker",`loop demux diff time is ${r}`),t(),nt=(new Date).getTime()}),20)}At(yr._opt.checkFirstIFrame)&&(qe=!0)},playbackCacheLoop:function(){yr.stopId&&(clearInterval(yr.stopId),yr.stopId=null);const e=()=>{let e=null;i.length&&(e=i.shift(),yr.doDecode(e))};e();const t=Math.ceil(1e3/(yr.streamFps*yr._opt.playbackRate));yr.debug.log("worker",`playbackCacheLoop fragDuration is ${t}, streamFps is ${yr.streamFps}, streamAudioFps is ${yr.streamAudioFps} ,streamVideoFps is ${yr.streamVideoFps} playbackRate is ${yr._opt.playbackRate}`),yr.stopId=setInterval(e,t)},close:function(){if(yr.debug.log("worker","close"),yr.isDestroyed=!0,pr(),!o||1!==o.readyState&&2!==o.readyState?o&&yr.debug.log("worker",`close() and socket.readyState is ${o.readyState}`):(fr=!0,o.close(1e3,"Client disconnecting")),o=null,yr.stopStreamRateAndStatsInterval(),yr.stopId&&(clearInterval(yr.stopId),yr.stopId=null),yr.mp3Demuxer&&(yr.mp3Demuxer.destroy(),yr.mp3Demuxer=null),yr.writableStream&&At(yr.writableStream.locked)&&yr.writableStream.close().catch((e=>{yr.debug.log("worker","close() and writableStream.close() error",e)})),yr.writableStream=null,br)try{br.clear&&br.clear(),br=null}catch(e){yr.debug.warn("worker","close() and audioDecoder.clear error",e)}if(vr)try{vr.clear&&vr.clear(),vr=null}catch(e){yr.debug.warn("worker","close() and videoDecoder.clear error",e)}l=null,nt=null,Ke=!1,n&&(n.reset&&n.reset(),n=null),yr.firstTimestamp=null,yr.startTimestamp=null,yr.networkDelay=0,yr.streamFps=null,yr.streamAudioFps=null,yr.streamVideoFps=null,yr.delay=-1,yr.pushLatestDelay=-1,yr.preDelayTimestamp=null,yr.dropping=!1,yr.isPushDropping=!1,yr.isPlayer=!0,yr.isPlayback=!1,yr.isWorkerFetch=!1,yr._opt=cr(),yr.webglObj&&(yr.webglObj.destroy(),yr.offscreenCanvas.removeEventListener("webglcontextlost",yr.onOffscreenCanvasWebglContextLost),yr.offscreenCanvas.removeEventListener("webglcontextrestored",yr.onOffscreenCanvasWebglContextRestored),yr.offscreenCanvas=null,yr.offscreenCanvasGL=null,yr.offscreenCanvasCtx=null),i=[],s=[],y=null,b=null,S=null,Ge=!1,je=!1,qe=!1,Jt=!1,or=!1,lr=!1,dr=null,hr=null,Ct=[],Dt=0,Pt=0,ft=null,Bt=null,Lt=null,Wt=null,ur=null,jt=0,Yt=0,Tt=null,kt=null,yr.fetchStatus=Ze,mr.destroy(),_r.destroy(),gr.destroy(),postMessage({cmd:V})},pushBuffer:function(e,t){if(t.type===J&&ot(e)){if(yr.debug.log("worker",`pushBuffer audio ts is ${t.ts}, isAacCodecPacket is true`),yr._opt.isRecordTypeFlv){const t=new Uint8Array(e);postMessage({cmd:q,buffer:t},[t.buffer])}yr.decodeAudio(e,t.ts)}else if(t.type===Q&&t.isIFrame&&Ut(e)){if(yr.debug.log("worker",`pushBuffer video ts is ${t.ts}, isVideoSequenceHeader is true`),yr._opt.isRecordTypeFlv){const t=new Uint8Array(e);postMessage({cmd:K,buffer:t},[t.buffer])}yr.decodeVideo(e,t.ts,t.isIFrame,t.cts)}else{if(yr._opt.isRecording)if(yr._opt.isRecordTypeFlv){const r=new Uint8Array(e);postMessage({cmd:X,type:t.type,buffer:r,ts:t.ts},[r.buffer])}else if(yr._opt.recordType===g)if(t.type===Q){const r=new Uint8Array(e).slice(5);postMessage({cmd:D,buffer:r,isIFrame:t.isIFrame,ts:t.ts,cts:t.cts},[r.buffer])}else if(t.type===J&&yr._opt.isWasmMp4){const r=new Uint8Array(e),i=lt(r)?r.slice(2):r.slice(1);postMessage({cmd:T,buffer:i,ts:t.ts},[i.buffer])}if(yr.isPlayer&&jt>0&&Wt>0&&t.type===Q){const e=t.ts-Wt,r=jt+jt/2;e>r&&yr.debug.log("worker",`pushBuffer video\n ts is ${t.ts}, preTimestamp is ${Wt},\n diff is ${e} and preTimestampDuration is ${jt} and maxDiff is ${r}\n maybe trigger black screen or flower screen\n `)}if(yr.isPlayer&&Wt>0&&t.type===Q&&t.tsv&&(yr.debug.warn("worker",`pushBuffer,\n preTimestamp is ${Wt}, options.ts is ${t.ts},\n diff is ${Wt-t.ts} more than 3600000,\n and resetAllDelay`),yr.resetAllDelay()),yr.isPlayer&&t.ts<=Wt&&Wt>0&&t.type===Q&&(yr.debug.warn("worker",`pushBuffer,\n options.ts is ${t.ts} less than (or equal) preTimestamp is ${Wt} and\n payloadBufferSize is ${e.byteLength} and prevPayloadBufferSize is ${Yt}`),yr._opt.isDropSameTimestampGop&&qe)){const e=yr.hasIframeInBufferList(),t=At(yr.isPushDropping);return yr.debug.log("worker",`pushBuffer, isDropSameTimestampGop is true and\n hasIframe is ${e} and isNotPushDropping is ${t} and next dropBuffer`),void(e&&t?yr.dropBuffer$2():(yr.clearBuffer(!0),xt(yr._opt.checkFirstIFrame)&&xt(r)&&postMessage({cmd:Z})))}if(yr.isPlayer&&qe){const e=yr._opt.videoBuffer+yr._opt.videoBufferDelay,r=yr.getDelayNotUpdateDelay(t.ts,t.type);yr.pushLatestDelay=r,r>e&&yr.delay0&&yr.hasIframeInBufferList()&&!1===yr.isPushDropping&&(yr.debug.log("worker",`pushBuffer(), pushLatestDelay is ${r} more than ${e} and decoder.delay is ${yr.delay} and has iIframe and next decoder.dropBuffer$2()`),yr.dropBuffer$2())}if(yr.isPlayer&&t.type===Q&&(Wt>0&&(jt=t.ts-Wt),Yt=e.byteLength,Wt=t.ts),t.type===J?i.push({ts:t.ts,payload:e,decoder:{decode:yr.decodeAudio},type:J,isIFrame:!1}):t.type===Q&&i.push({ts:t.ts,cts:t.cts,payload:e,decoder:{decode:yr.decodeVideo},type:Q,isIFrame:t.isIFrame}),yr.isPlaybackCacheBeforeDecodeForFpsRender()&&(mt(yr.streamVideoFps)||mt(yr.streamAudioFps))){let e=yr.streamVideoFps,t=yr.streamAudioFps;if(mt(yr.streamVideoFps)&&(e=wt(i,Q),e&&(yr.streamVideoFps=e,postMessage({cmd:O,value:yr.streamVideoFps}),yr.streamFps=t?e+t:e,At(yr._opt.hasAudio)&&(yr.debug.log("worker","playbackCacheBeforeDecodeForFpsRender, _opt.hasAudio is false and set streamAudioFps is 0"),yr.streamAudioFps=0),yr.playbackCacheLoop())),mt(yr.streamAudioFps)&&(t=wt(i,J),t&&(yr.streamAudioFps=t,yr.streamFps=e?e+t:t,yr.playbackCacheLoop())),mt(yr.streamVideoFps)&&mt(yr.streamAudioFps)){const r=i.map((e=>({type:e.type,ts:e.ts})));yr.debug.log("worker",`playbackCacheBeforeDecodeForFpsRender, calc streamAudioFps is ${t}, streamVideoFps is ${e}, bufferListLength is ${i.length}, and ts list is ${JSON.stringify(r)}`)}const r=yr.getAudioBufferLength()>0,s=r?60:40;i.length>=s&&(yr.debug.warn("worker",`playbackCacheBeforeDecodeForFpsRender, bufferListLength is ${i.length} more than ${s}, and hasAudio is ${r} an set streamFps is 25`),yr.streamVideoFps=25,postMessage({cmd:O,value:yr.streamVideoFps}),r?(yr.streamAudioFps=25,yr.streamFps=yr.streamVideoFps+yr.streamAudioFps):yr.streamFps=yr.streamVideoFps,yr.playbackCacheLoop())}}},getVideoBufferLength(){let e=0;return i.forEach((t=>{t.type===Q&&(e+=1)})),e},hasIframeInBufferList:()=>i.some((e=>e.type===Q&&e.isIFrame)),isAllIframeInBufferList(){const e=yr.getVideoBufferLength();let t=0;return i.forEach((e=>{e.type===Q&&e.isIFrame&&(t+=1)})),e===t},getNotDroppingDelayTs:()=>yr._opt.videoBuffer+yr._opt.videoBufferDelay/2,getAudioBufferLength(){let e=0;return i.forEach((t=>{t.type===J&&(e+=1)})),e},getFlvBufferLength(){let e=0;return y&&y.buffer&&(e=y.buffer.byteLength),yr._opt.isNakedFlow&&mr.lastBuf&&(e=mr.lastBuf.byteLength),e},fetchStream:function(e,t){yr.debug.log("worker","fetchStream, url is "+e,"options:",JSON.stringify(t)),yr.isWorkerFetch=!0,t.isFlv?yr._opt.isFlv=!0:t.isFmp4?yr._opt.isFmp4=!0:t.isMpeg4?yr._opt.isMpeg4=!0:t.isNakedFlow&&(yr._opt.isNakedFlow=!0),l=ct((e=>{postMessage({cmd:z,type:ce,value:e})})),yr.startStreamRateAndStatsInterval(),t.isFmp4&&(_r.listenMp4Box(),yr._opt.isFmp4Private&&_r.initTransportDescarmber()),t.protocol===f?(y=new Ft(yr.demuxFlv()),fetch(e,{signal:a.signal}).then((e=>{if(xt(fr))return yr.debug.log("worker","request abort and run res.body.cancel()"),yr.fetchStatus=Ze,void e.body.cancel();if(!St(e))return yr.debug.warn("worker",`fetch response status is ${e.status} and ok is ${e.ok} and emit error and next abort()`),pr(),void postMessage({cmd:z,type:we.fetchError,value:`fetch response status is ${e.status} and ok is ${e.ok}`});if(postMessage({cmd:z,type:ge}),bt())yr.writableStream=new WritableStream({write:e=>a&&a.signal&&a.signal.aborted?(yr.debug.log("worker","writableStream write() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=Qe)):xt(fr)?(yr.debug.log("worker","writableStream write() and requestAbort is true so return"),void(yr.fetchStatus=Qe)):(yr.fetchStatus=Je,l(e.byteLength),void(t.isFlv?y.write(e):t.isFmp4?yr.demuxFmp4(e):t.isMpeg4&&yr.demuxMpeg4(e))),close:()=>{yr.fetchStatus=Qe,y=null,pr(),postMessage({cmd:z,type:fe,value:c})},abort:e=>{if(a&&a.signal&&a.signal.aborted)return yr.debug.log("worker","writableStream abort() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=Qe);y=null,e.name!==Ye&&(pr(),postMessage({cmd:z,type:we.fetchError,value:e.toString()}))}}),e.body.pipeTo(yr.writableStream);else{const r=e.body.getReader(),i=()=>{r.read().then((e=>{let{done:r,value:s}=e;return r?(yr.fetchStatus=Qe,y=null,pr(),void postMessage({cmd:z,type:fe,value:c})):a&&a.signal&&a.signal.aborted?(yr.debug.log("worker","fetchNext().then() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=Qe)):xt(fr)?(yr.debug.log("worker","fetchNext().then() and requestAbort is true so return"),void(yr.fetchStatus=Qe)):(yr.fetchStatus=Je,l(s.byteLength),t.isFlv?y.write(s):t.isFmp4?yr.demuxFmp4(s):t.isMpeg4&&yr.demuxMpeg4(s),void i())})).catch((e=>{if(a&&a.signal&&a.signal.aborted)return yr.debug.log("worker","fetchNext().catch() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=Qe);y=null,e.name!==Ye&&(pr(),postMessage({cmd:z,type:we.fetchError,value:e.toString()}))}))};i()}})).catch((e=>{a&&a.signal&&a.signal.aborted?yr.debug.log("worker","fetch().catch() and abortController.signal.aborted is true so return"):e.name!==Ye&&(pr(),postMessage({cmd:z,type:we.fetchError,value:e.toString()}),y=null)}))):t.protocol===u&&(t.isFlv&&(y=new Ft(yr.demuxFlv())),o=new WebSocket(e),o.binaryType="arraybuffer",o.onopen=()=>{yr.debug.log("worker","fetchStream, WebsocketStream socket open"),postMessage({cmd:z,type:ge}),postMessage({cmd:z,type:ve})},o.onclose=e=>{yr.debug.log("worker",`fetchStream, WebsocketStream socket close and code is ${e.code}`),1006===e.code&&yr.debug.error("worker",`fetchStream, WebsocketStream socket close abnormally and code is ${e.code}`),xt(fr)?yr.debug.log("worker","fetchStream, WebsocketStream socket close and requestAbort is true so return"):(y=null,postMessage({cmd:z,type:fe,value:p}))},o.onerror=e=>{yr.debug.error("worker","fetchStream, WebsocketStream socket error",e),y=null,postMessage({cmd:z,type:we.websocketError,value:e.isTrusted?"websocket user aborted":"websocket error"})},o.onmessage=e=>{l(e.data.byteLength),t.isFlv?y.write(e.data):t.isFmp4?yr.demuxFmp4(e.data):t.isMpeg4?yr.demuxMpeg4(e.data):yr._opt.isNakedFlow?yr.demuxNakedFlow(e.data):yr.demuxM7s(e.data)})},demuxFlv:function*(){yield 9;const e=new ArrayBuffer(4),t=new Uint8Array(e),r=new Uint32Array(e);for(;;){t[3]=0;const e=yield 15,i=e[4];t[0]=e[7],t[1]=e[6],t[2]=e[5];const s=r[0];t[0]=e[10],t[1]=e[9],t[2]=e[8],t[3]=e[11];let n=r[0];const a=(yield s).slice();switch(i){case ee:if(a.byteLength>0){let e=a;xt(yr._opt.m7sCryptoAudio)&&(e=yr.cryptoPayloadAudio(a)),yr.decode(e,{type:J,ts:n})}else yr.debug.warn("worker",`demuxFlv() type is audio and payload.byteLength is ${a.byteLength} and return`);break;case te:if(a.byteLength>=6){const e=a[0];if(yr._isEnhancedH265Header(e))yr._decodeEnhancedH265Video(a,n);else{a[0];const e=a[0]>>4===Xe;if(e&&Ut(a)&&null===dr){const e=15&a[0];dr=e===Ue,hr=Xt(a,dr),yr.debug.log("worker",`demuxFlv() isVideoSequenceHeader is true and isHevc is ${dr} and nalUnitSize is ${hr}`)}e&&yr.calcIframeIntervalTimestamp(n),yr.isPlayer&&yr.calcNetworkDelay(n),r[0]=a[4],r[1]=a[3],r[2]=a[2],r[3]=0;let t=r[0],i=yr.cryptoPayload(a,e);yr.decode(i,{type:Q,ts:n,isIFrame:e,cts:t})}}else yr.debug.warn("worker",`demuxFlv() type is video and payload.byteLength is ${a.byteLength} and return`);break;case re:postMessage({cmd:Y,buffer:a},[a.buffer]);break;default:yr.debug.log("worker",`demuxFlv() type is ${i}`)}}},decode:function(e,t){t.type===J?yr._opt.hasAudio&&(postMessage({cmd:z,type:pe,value:e.byteLength}),yr.isPlayer?yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts}):yr.isPlayback&&(yr.isPlaybackCacheBeforeDecodeForFpsRender(),yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts}))):t.type===Q&&yr._opt.hasVideo&&(postMessage({cmd:z,type:me,value:e.byteLength}),postMessage({cmd:z,type:_e,value:t.ts}),yr.isPlayer?yr.pushBuffer(e,{type:t.type,ts:t.ts,isIFrame:t.isIFrame,cts:t.cts}):yr.isPlayback&&(yr.isPlaybackOnlyDecodeIFrame()?t.isIFrame&&yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts,isIFrame:t.isIFrame}):(yr.isPlaybackCacheBeforeDecodeForFpsRender(),yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts,isIFrame:t.isIFrame}))))},cryptoPayload:function(e,t){let r=e;return yr._opt.isM7sCrypto?yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?r=Gr(e,yr._opt.cryptoKey,yr._opt.cryptoIV,dr):yr.debug.error("worker",`isM7sCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`):yr._opt.isSm4Crypto?yr._opt.sm4CryptoKey&&t?r=li(e,yr._opt.sm4CryptoKey):yr._opt.sm4CryptoKey||yr.debug.error("worker","isSm4Crypto opt.sm4CryptoKey is null"):yr._opt.isXorCrypto&&(yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?r=ci(e,yr._opt.cryptoKey,yr._opt.cryptoIV,dr):yr.debug.error("worker",`isXorCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`)),r},cryptoPayloadAudio:function(e){let t=e;return yr._opt.isM7sCrypto&&(yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?e[0]>>4===Ce&&(t=$r(e,yr._opt.cryptoKey,yr._opt.cryptoIV)):yr.debug.error("worker",`isM7sCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`)),t},setCodecAudio:function(e,t){const r=e[0]>>4,i=e[0]>>1&1;if(ur=r===Ce?i?16:8:0===i?8:16,br&&br.setCodec)if(ot(e)||r===Te||r===ke||r===Fe){yr.debug.log("worker",`setCodecAudio: init audio codec, codeId is ${r}`);const i=r===Ce?e.slice(2):new Uint8Array(0);br.setCodec(r,yr._opt.sampleRate,i),postMessage({cmd:k,buffer:i},[i.buffer]),je=!0,r!==Ce&&(r===Fe?(yr.mp3Demuxer||(yr.mp3Demuxer=new hi(yr),yr.mp3Demuxer.on("data",((e,t)=>{br.decode(e,t)}))),yr.mp3Demuxer.dispatch(e.slice(1),t)):br.decode(e.slice(1),t));{const e=Number("1")||1;setTimeout((()=>{yr.debug.error("worker","jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),yr.close(),postMessage({cmd:N})}),60*e*60*1e3)}}else yr.debug.warn("worker","setCodecAudio: hasInitAudioCodec is false, codecId is ",r);else yr.debug.error("worker","setCodecAudio: audioDecoder or audioDecoder.setCodec is null")},decodeAudio:function(e,t){if(yr.isDestroyed)yr.debug.log("worker","decodeAudio, decoder is destroyed and return");else if(xt(r)&&xt(yr._opt.mseDecodeAudio))postMessage({cmd:L,payload:e,ts:t,cts:t},[e.buffer]);else{const r=e[0]>>4;je?r===Fe?yr.mp3Demuxer.dispatch(e.slice(1),t):br.decode(r===Ce?e.slice(2):e.slice(1),t):yr.setCodecAudio(e,t)}},setCodecVideo:function(e){const t=15&e[0];if(vr&&vr.setCodec)if(Ut(e))if(t===Ee||t===Ue){yr.debug.log("worker",`setCodecVideo: init video codec , codecId is ${t}`);const r=e.slice(5);if(t===Ee&&yr._opt.useSIMD){const e=zt(r);if(e.codecWidth>w||e.codecHeight>w)return postMessage({cmd:H}),void yr.debug.warn("worker",`setCodecVideo: SIMD H264 decode video width is too large, width is ${e.codecWidth}, height is ${e.codecHeight}`)}Ge=!0,vr.setCodec(t,r),yr._opt.recordType===g&&postMessage({cmd:I,buffer:e,codecId:t},[e.buffer])}else yr.debug.warn("worker",`setCodecVideo: hasInitVideoCodec is false, codecId is ${t} is not H264 or H265`);else yr.debug.warn("worker",`decodeVideo: hasInitVideoCodec is false, codecId is ${t} and frameType is ${e[0]>>4} and packetType is ${e[1]}`);else yr.debug.error("worker","setCodecVideo: videoDecoder or videoDecoder.setCodec is null")},decodeVideo:function(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(yr.isDestroyed)yr.debug.log("worker","decodeVideo, decoder is destroyed and return");else if(xt(r))postMessage({cmd:P,payload:e,isIFrame:i,ts:t,cts:s,delay:yr.delay},[e.buffer]);else if(Ge)if(!qe&&i&&(qe=!0),qe){if(i&&Ut(e)){const t=15&e[0];let r={};t===Ee?r=zt(e.slice(5)):t===Ue&&(r=Zt(e)),r.codecWidth&&r.codecHeight&&b&&S&&(r.codecWidth!==b||r.codecHeight!==S)&&(yr.debug.warn("worker",`\n decodeVideo: video width or height is changed,\n old width is ${b}, old height is ${S},\n new width is ${r.codecWidth}, new height is ${r.codecHeight},\n and emit change event`),or=!0,postMessage({cmd:G}))}if(or)return void yr.debug.warn("worker","decodeVideo: video width or height is changed, and return");if(lr)return void yr.debug.warn("worker","decodeVideo: simd decode error, and return");if(Ut(e))return void yr.debug.warn("worker","decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void yr.debug.warn("worker",`decodeVideo and payload is too small , payload length is ${e.byteLength}`);const r=e.slice(5);vr.decode(r,i?1:0,t)}else yr.debug.log("worker","decodeVideo first frame is not iFrame");else yr.setCodecVideo(e)},clearBuffer:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];yr.debug.log("worker",`clearBuffer,bufferList length is ${i.length}, need clear is ${e}`),e&&(i=[]),yr.isPlayer&&(yr.resetAllDelay(),xt(yr._opt.checkFirstIFrame)&&(yr.dropping=!0,postMessage({cmd:M}))),xt(yr._opt.checkFirstIFrame)&&At(r)&&(qe=!1)},dropBuffer$2:function(){if(i.length>0){let e=i.findIndex((e=>xt(e.isIFrame)&&e.type===Q));if(yr.isAllIframeInBufferList())for(let t=0;t=yr.getNotDroppingDelayTs()){yr.debug.log("worker",`dropBuffer$2() isAllIframeInBufferList() is true, and index is ${t} and tempDelay is ${s} and notDroppingDelayTs is ${yr.getNotDroppingDelayTs()}`),e=t;break}}if(e>=0){yr.isPushDropping=!0,postMessage({cmd:M});const t=i.length;i=i.slice(e);const r=i.shift();yr.resetAllDelay(),yr.getDelay(r.ts,r.type),yr.doDecode(r),yr.isPushDropping=!1,yr.debug.log("worker",`dropBuffer$2() iFrameIndex is ${e},and old bufferList length is ${t} ,new bufferList is ${i.length} and new delay is ${yr.delay} `)}else yr.isPushDropping=!1}0===i.length&&(yr.isPushDropping=!1)},demuxM7s:function(e){const t=new DataView(e),r=t.getUint32(1,!1),i=t.getUint8(0),s=new ArrayBuffer(4),n=new Uint32Array(s);switch(i){case J:yr.decode(new Uint8Array(e,5),{type:J,ts:r});break;case Q:if(t.byteLength>=11){const i=new Uint8Array(e,5),s=i[0];if(yr._isEnhancedH265Header(s))yr._decodeEnhancedH265Video(i,r);else{const e=t.getUint8(5)>>4==1;if(e&&(yr.calcIframeIntervalTimestamp(r),Ut(i)&&null===dr)){const e=15&i[0];dr=e===Ue}yr.isPlayer&&yr.calcNetworkDelay(r),n[0]=i[4],n[1]=i[3],n[2]=i[2],n[3]=0;let s=n[0],a=yr.cryptoPayload(i,e);yr.decode(a,{type:Q,ts:r,isIFrame:e,cts:s})}}else yr.debug.warn("worker",`demuxM7s() type is video and arrayBuffer length is ${e.byteLength} and return`)}},demuxNakedFlow:function(e){mr.dispatch(e)},demuxFmp4:function(e){const t=new Uint8Array(e);_r.dispatch(t)},demuxMpeg4:function(e){gr.dispatch(e)},_decodeEnhancedH265Video:function(e,t){const r=e[0],i=48&r,s=15&r,n=e.slice(1,5),a=new ArrayBuffer(4),o=new Uint32Array(a),l="a"==String.fromCharCode(n[0]);if(dr=At(l),s===tt){if(i===st){const r=e.slice(5);if(l);else{const i=new Uint8Array(5+r.length);i.set([28,0,0,0,0],0),i.set(r,5),hr=Xt(e,dr),yr.debug.log("worker",`demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is ${dr} and nalUnitSize is ${hr}`),yr.decode(i,{type:Q,ts:t,isIFrame:!0,cts:0})}}}else if(s===rt){let r=e,s=0;const n=i===st;n&&yr.calcIframeIntervalTimestamp(t),l||(o[0]=e[4],o[1]=e[3],o[2]=e[2],o[3]=0,s=o[0],r=tr(e.slice(8),n),r=yr.cryptoPayload(r,n),yr.decode(r,{type:Q,ts:t,isIFrame:n,cts:s}))}else if(s===it){const r=i===st;r&&yr.calcIframeIntervalTimestamp(t);let s=tr(e.slice(5),r);s=yr.cryptoPayload(s,r),yr.decode(s,{type:Q,ts:t,isIFrame:r,cts:0})}},_isEnhancedH265Header:function(e){return(e&et)===et},findSei:function(e,t){let r=4;_t(hr)&&(r=hr),qt(e.slice(5),r).forEach((e=>{const r=dr?e[0]>>>1&63:31&e[0];(dr&&(r===He||r===$e)||At(dr)&&r===Le)&&postMessage({cmd:j,buffer:e,ts:t},[e.buffer])}))},flvHasUnitTypeIDR(e,t){const r=qt(e.slice(5));let i=!1;return r.forEach((e=>{const r=t?e[0]>>>1&63:31&e[0];(t&&(r===ze||r===Re)||At(t)&&r===Pe)&&(i=!0)})),i},calcNetworkDelay:function(e){if(!(qe&&e>0))return;null===ft?(ft=e,Bt=ht()):et?r-t:0;yr.networkDelay=i,i>yr._opt.networkDelay&&yr._opt.playType===m&&(yr.debug.warn("worker",`calcNetworkDelay now dts:${e}, start dts is ${ft} vs start is ${t},local diff is ${r} ,delay is ${i}`),postMessage({cmd:z,type:be,value:i}))},calcIframeIntervalTimestamp:function(e){null===Lt?Lt=e:Lt=yr._opt.playbackForwardMaxRateDecodeIFrame},isPlayUseMSE:function(){return yr.isPlayer&&yr._opt.useMSE&&xt(r)},playbackUpdatePlaybackRate:function(){yr.clearBuffer(!0)},onOffscreenCanvasWebglContextLost:function(e){yr.debug.error("worker","handleOffscreenCanvasWebglContextLost and next try to create webgl"),e.preventDefault(),Jt=!0,yr.webglObj.destroy(),yr.webglObj=null,yr.offscreenCanvasGL=null,setTimeout((()=>{yr.offscreenCanvasGL=yr.offscreenCanvas.getContext("webgl"),yr.offscreenCanvasGL&&yr.offscreenCanvasGL.getContextAttributes().stencil?(yr.webglObj=h(yr.offscreenCanvasGL,yr._opt.openWebglAlignment),Jt=!1):yr.debug.error("worker","handleOffscreenCanvasWebglContextLost, stencil is false")}),500)},onOffscreenCanvasWebglContextRestored:function(e){yr.debug.log("worker","handleOffscreenCanvasWebglContextRestored"),e.preventDefault()},videoInfo:function(e,t,r){postMessage({cmd:F,code:e}),postMessage({cmd:U,w:t,h:r}),b=t,S=r,yr.useOffscreen()&&(yr.offscreenCanvas=new OffscreenCanvas(t,r),yr.offscreenCanvasGL=yr.offscreenCanvas.getContext("webgl"),yr.webglObj=h(yr.offscreenCanvasGL,yr._opt.openWebglAlignment),yr.offscreenCanvas.addEventListener("webglcontextlost",yr.onOffscreenCanvasWebglContextLost,!1),yr.offscreenCanvas.addEventListener("webglcontextrestored",yr.onOffscreenCanvasWebglContextRestored,!1))},audioInfo:function(e,t,r){postMessage({cmd:C,code:e}),postMessage({cmd:B,sampleRate:t,channels:r,depth:ur}),Pt=r},yuvData:function(t,r){if(yr.isDestroyed)return void yr.debug.log("worker","yuvData, decoder is destroyed and return");const i=b*S*3/2;let s=e.HEAPU8.subarray(t,t+i),n=new Uint8Array(s);if(Tt=null,yr.useOffscreen())try{if(Jt)return;yr.webglObj.renderYUV(b,S,n);let e=yr.offscreenCanvas.transferToImageBitmap();postMessage({cmd:x,buffer:e,delay:yr.delay,ts:r},[e])}catch(e){yr.debug.error("worker","yuvData, transferToImageBitmap error is",e)}else postMessage({cmd:x,output:n,delay:yr.delay,ts:r},[n.buffer])},pcmData:function(e,r,i){if(yr.isDestroyed)return void yr.debug.log("worker","pcmData, decoder is destroyed and return");let n=r,a=[],o=0,l=yr._opt.audioBufferSize;for(let r=0;r<2;r++){let i=t.HEAPU32[(e>>2)+r]>>2;a[r]=t.HEAPF32.subarray(i,i+n)}if(Dt){if(!(n>=(r=l-Dt)))return Dt+=n,s[0]=Float32Array.of(...s[0],...a[0]),void(2==Pt&&(s[1]=Float32Array.of(...s[1],...a[1])));Ct[0]=Float32Array.of(...s[0],...a[0].subarray(0,r)),2==Pt&&(Ct[1]=Float32Array.of(...s[1],...a[1].subarray(0,r))),postMessage({cmd:A,buffer:Ct,ts:i},Ct.map((e=>e.buffer))),o=r,n-=r}for(Dt=n;Dt>=l;Dt-=l)Ct[0]=a[0].slice(o,o+=l),2==Pt&&(Ct[1]=a[1].slice(o-l,o)),postMessage({cmd:A,buffer:Ct,ts:i},Ct.map((e=>e.buffer)));Dt&&(s[0]=a[0].slice(o),2==Pt&&(s[1]=a[1].slice(o)))},errorInfo:function(e){null===Tt&&(Tt=ht());const t=ht(),r=ut(kt>0?2*kt:5e3,1e3,5e3),i=t-Tt;i>r&&(yr.debug.warn("worker",`errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is ${kt} and diff is ${i} and maxDiff is ${r}\n and replay`),lr=!0,postMessage({cmd:$}))},sendWebsocketMessage:function(e){o?o.readyState===Se?o.send(e):yr.debug.error("worker","socket is not open"):yr.debug.error("worker","socket is null")},timeEnd:function(){yr.debug.error("worker","jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),yr.close(),postMessage({cmd:N})},postStreamToMain(e,t){postMessage({cmd:W,type:t,buffer:e},[e.buffer])}};yr.debug=new It(yr);let br=null;t.AudioDecoder&&(br=new t.AudioDecoder(yr));let vr=null;e.VideoDecoder&&(vr=new e.VideoDecoder(yr)),postMessage({cmd:E}),self.onmessage=function(e){let t=e.data;switch(t.cmd){case ie:try{yr._opt=Object.assign(yr._opt,JSON.parse(t.opt))}catch(e){}yr.init();break;case se:yr.pushBuffer(t.buffer,t.options);break;case ne:yr.decodeAudio(t.buffer,t.ts);break;case ae:yr.decodeVideo(t.buffer,t.ts,t.isIFrame);break;case de:yr.clearBuffer(t.needClear);break;case he:yr.fetchStream(t.url,JSON.parse(t.opt));break;case oe:yr.close();break;case le:yr.debug.log("worker","updateConfig",t.key,t.value),yr._opt[t.key]=t.value,"playbackRate"===t.key&&(yr.playbackUpdatePlaybackRate(),yr.isPlaybackCacheBeforeDecodeForFpsRender()&&yr.playbackCacheLoop());break;case ue:yr.sendWebsocketMessage(t.message)}}}(e,e,!0)}))})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).crypto$1)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r,n=t(e),s=(r="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-hard.js",document.baseURI).href,async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,n,i;(i=e).ready=new Promise(((e,r)=>{t=e,n=r})),(i=void 0!==i?i:{}).locateFile=function(e,t){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:t+e};var s,o,a,c=Object.assign({},i),u="./this.program",l="object"==typeof window,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";function p(e){return i.locateFile?i.locateFile(e,f):f+e}if(h){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-hard.js",document.baseURI).href),v=m("fs"),y=m("path");f=d?y.dirname(f)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-hard.js",document.baseURI).href)),s=(e,t)=>(e=Z(e)?new URL(e):y.normalize(e),v.readFileSync(e,t?void 0:"utf8")),a=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},o=function(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=Z(e)?new URL(e):y.normalize(e),v.readFile(e,n?void 0:"utf8",((e,i)=>{e?r(e):t(n?i.buffer:i)}))},!i.thisProgram&&process.argv.length>1&&(u=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),i.inspect=()=>"[Emscripten Module object]"}else(l||d)&&(d?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),r&&(f=r),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var _,g,b=i.print||console.log.bind(console),w=i.printErr||console.error.bind(console);Object.assign(i,c),c=null,i.arguments&&i.arguments,i.thisProgram&&(u=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(_=i.wasmBinary),"object"!=typeof WebAssembly&&q("no native wasm support detected");var S,I,A,E,k,C,x,T,B=!1;function D(e,t){e||q(t)}function M(){var e=g.buffer;i.HEAP8=S=new Int8Array(e),i.HEAP16=A=new Int16Array(e),i.HEAPU8=I=new Uint8Array(e),i.HEAPU16=E=new Uint16Array(e),i.HEAP32=k=new Int32Array(e),i.HEAPU32=C=new Uint32Array(e),i.HEAPF32=x=new Float32Array(e),i.HEAPF64=T=new Float64Array(e)}var P=[],U=[],F=[];function R(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)z(i.preRun.shift());ie(P)}function L(){i.noFSInit||Te.init.initialized||Te.init(),Te.ignorePermissions=!1,ie(U)}function O(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)H(i.postRun.shift());ie(F)}function z(e){P.unshift(e)}function N(e){U.unshift(e)}function H(e){F.unshift(e)}var V=0,W=null;function j(e){V++,i.monitorRunDependencies&&i.monitorRunDependencies(V)}function G(e){if(V--,i.monitorRunDependencies&&i.monitorRunDependencies(V),0==V&&W){var t=W;W=null,t()}}function q(e){i.onAbort&&i.onAbort(e),w(e="Aborted("+e+")"),B=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var $,Y,K,J="data:application/octet-stream;base64,",X=e=>e.startsWith(J),Z=e=>e.startsWith("file://");function Q(e){if(e==$&&_)return new Uint8Array(_);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!_&&(l||d)){if("function"==typeof fetch&&!Z(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(o)return new Promise(((t,r)=>{o(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),q(e)}))}function re(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||X(t)||Z(t)||h||"function"!=typeof fetch?te(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),te(t,r,n)}))))}function ne(){var e={a:fn};function t(e,t){return pn=e.exports,g=pn.G,M(),Pt=pn.J,N(pn.H),G(),pn}if(j(),i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return re(_,$,e,(function(e){t(e.instance)})).catch(n),{}}i.locateFile?X($="decoder-pro-audio.wasm")||($=p($)):$=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-hard.js",document.baseURI).href).href;var ie=e=>{for(;e.length>0;)e.shift()(i)};function se(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,S[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=S[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,S[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=S[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(gn(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var oe=(e,t,r)=>{throw new se(e).init(t,r),e},ae=e=>(k[vn()>>2]=e,e),ce={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=ce.isAbs(e),r="/"===e.substr(-1);return(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ce.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ce.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ce.normalize(e.join("/"))},join2:(e,t)=>ce.normalize(e+"/"+t)},ue=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(h)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}q("initRandomDevice")},le=e=>(le=ue())(e),de={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Te.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=ce.isAbs(n)}return(t?"/":"")+(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=de.resolve(e).substr(1),t=de.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),s=Math.min(n.length,i.length),o=s,a=0;a{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&he)return he.decode(e.subarray(t,i));for(var s="";t>10,56320|1023&u)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s},pe=[],me=e=>{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},ve=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,s=r+n-1,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i};function ye(e,t,r){var n=r>0?r:me(e)+1,i=new Array(n),s=ve(e,i,0,i.length);return t&&(i.length=s),i}var _e=()=>{if(!pe.length){var e=null;if(h){var t=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=v.readSync(n,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ye(e,!0)}return pe.shift()},ge={ttys:[],init(){},shutdown(){},register(e,t){ge.ttys[e]={input:[],output:[],ops:t},Te.registerDevice(e,ge.stream_ops)},stream_ops:{open(e){var t=ge.ttys[e.node.rdev];if(!t)throw new Te.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new Te.ErrnoError(60);for(var s=0,o=0;o_e(),put_char(e,t){null===t||10===t?(b(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(fe(e.output,0)),e.output=[])}}},be=e=>{q()},we={ops_table:null,mount:e=>we.createNode(null,"/",16895,0),createNode(e,t,r,n){if(Te.isBlkdev(r)||Te.isFIFO(r))throw new Te.ErrnoError(63);we.ops_table||(we.ops_table={dir:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,lookup:we.node_ops.lookup,mknod:we.node_ops.mknod,rename:we.node_ops.rename,unlink:we.node_ops.unlink,rmdir:we.node_ops.rmdir,readdir:we.node_ops.readdir,symlink:we.node_ops.symlink},stream:{llseek:we.stream_ops.llseek}},file:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:{llseek:we.stream_ops.llseek,read:we.stream_ops.read,write:we.stream_ops.write,allocate:we.stream_ops.allocate,mmap:we.stream_ops.mmap,msync:we.stream_ops.msync}},link:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,readlink:we.node_ops.readlink},stream:{}},chrdev:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:Te.chrdev_stream_ops}});var i=Te.createNode(e,t,r,n);return Te.isDir(i.mode)?(i.node_ops=we.ops_table.dir.node,i.stream_ops=we.ops_table.dir.stream,i.contents={}):Te.isFile(i.mode)?(i.node_ops=we.ops_table.file.node,i.stream_ops=we.ops_table.file.stream,i.usedBytes=0,i.contents=null):Te.isLink(i.mode)?(i.node_ops=we.ops_table.link.node,i.stream_ops=we.ops_table.link.stream):Te.isChrdev(i.mode)&&(i.node_ops=we.ops_table.chrdev.node,i.stream_ops=we.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Te.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Te.isDir(e.mode)?t.size=4096:Te.isFile(e.mode)?t.size=e.usedBytes:Te.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&we.resizeFileStorage(e,t.size)},lookup(e,t){throw Te.genericErrors[44]},mknod:(e,t,r,n)=>we.createNode(e,t,r,n),rename(e,t,r){if(Te.isDir(e.mode)){var n;try{n=Te.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new Te.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Te.lookupNode(e,t);for(var n in r.contents)throw new Te.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=we.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!Te.isLink(e.mode))throw new Te.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,i){var s=e.node.contents;if(i>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-i,n);if(o>8&&s.subarray)t.set(s.subarray(i,i+o),r);else for(var a=0;a0||r+t(we.stream_ops.write(e,t,0,n,r,!1),0)}},Se=(e,t,r,n)=>{var i=n?"":`al ${e}`;o(e,(r=>{D(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),i&&G()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&j()},Ie=(e,t,r,n,i,s)=>{Te.createDataFile(e,t,r,n,i,s)},Ae=i.preloadPlugins||[],Ee=(e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return Ae.forEach((s=>{i||s.canHandle(t)&&(s.handle(e,t,r,n),i=!0)})),i},ke=(e,t,r,n,i,s,o,a,c,u)=>{var l=t?de.resolve(ce.join2(e,t)):e;function d(r){function d(r){u&&u(),a||Ie(e,t,r,n,i,c),s&&s(),G()}Ee(r,l,d,(()=>{o&&o(),G()}))||d(r)}j(),"string"==typeof r?Se(r,(e=>d(e)),o):d(r)},Ce=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},xe=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Te={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=de.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new Te.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=Te.root,i="/",s=0;s40)throw new Te.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(Te.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n>>0)%Te.nameTable.length},hashAddNode(e){var t=Te.hashName(e.parent.id,e.name);e.name_next=Te.nameTable[t],Te.nameTable[t]=e},hashRemoveNode(e){var t=Te.hashName(e.parent.id,e.name);if(Te.nameTable[t]===e)Te.nameTable[t]=e.name_next;else for(var r=Te.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Te.mayLookup(e);if(r)throw new Te.ErrnoError(r,e);for(var n=Te.hashName(e.id,t),i=Te.nameTable[n];i;i=i.name_next){var s=i.name;if(i.parent.id===e.id&&s===t)return i}return Te.lookup(e,t)},createNode(e,t,r,n){var i=new Te.FSNode(e,t,r,n);return Te.hashAddNode(i),i},destroyNode(e){Te.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Te.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=Te.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return Te.lookupNode(e,t),20}catch(e){}return Te.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=Te.lookupNode(e,t)}catch(e){return e.errno}var i=Te.nodePermissions(e,"wx");if(i)return i;if(r){if(!Te.isDir(n.mode))return 54;if(Te.isRoot(n)||Te.getPath(n)===Te.cwd())return 10}else if(Te.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?Te.isLink(e.mode)?32:Te.isDir(e.mode)&&("r"!==Te.flagsToPermissionString(t)||512&t)?31:Te.nodePermissions(e,Te.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Te.MAX_OPEN_FDS;e++)if(!Te.streams[e])return e;throw new Te.ErrnoError(33)},getStreamChecked(e){var t=Te.getStream(e);if(!t)throw new Te.ErrnoError(8);return t},getStream:e=>Te.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Te.FSStream||(Te.FSStream=function(){this.shared={}},Te.FSStream.prototype={},Object.defineProperties(Te.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Te.FSStream,e),-1==t&&(t=Te.nextfd()),e.fd=t,Te.streams[t]=e,e},closeStream(e){Te.streams[e]=null},chrdev_stream_ops:{open(e){var t=Te.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Te.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Te.devices[e]={stream_ops:t}},getDevice:e=>Te.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Te.syncFSRequests++,Te.syncFSRequests>1&&w(`warning: ${Te.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Te.getMounts(Te.root.mount),n=0;function i(e){return Te.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var n,i="/"===r,s=!r;if(i&&Te.root)throw new Te.ErrnoError(10);if(!i&&!s){var o=Te.lookupPath(r,{follow_mount:!1});if(r=o.path,n=o.node,Te.isMountpoint(n))throw new Te.ErrnoError(10);if(!Te.isDir(n.mode))throw new Te.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(a);return c.mount=a,a.root=c,i?Te.root=c:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),c},unmount(e){var t=Te.lookupPath(e,{follow_mount:!1});if(!Te.isMountpoint(t.node))throw new Te.ErrnoError(28);var r=t.node,n=r.mounted,i=Te.getMounts(n);Object.keys(Te.nameTable).forEach((e=>{for(var t=Te.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&Te.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(n);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=Te.lookupPath(e,{parent:!0}).node,i=ce.basename(e);if(!i||"."===i||".."===i)throw new Te.ErrnoError(28);var s=Te.mayCreate(n,i);if(s)throw new Te.ErrnoError(s);if(!n.node_ops.mknod)throw new Te.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Te.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Te.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",i=0;i(void 0===r&&(r=t,t=438),t|=8192,Te.mknod(e,t,r)),symlink(e,t){if(!de.resolve(e))throw new Te.ErrnoError(44);var r=Te.lookupPath(t,{parent:!0}).node;if(!r)throw new Te.ErrnoError(44);var n=ce.basename(t),i=Te.mayCreate(r,n);if(i)throw new Te.ErrnoError(i);if(!r.node_ops.symlink)throw new Te.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=ce.dirname(e),s=ce.dirname(t),o=ce.basename(e),a=ce.basename(t);if(r=Te.lookupPath(e,{parent:!0}).node,n=Te.lookupPath(t,{parent:!0}).node,!r||!n)throw new Te.ErrnoError(44);if(r.mount!==n.mount)throw new Te.ErrnoError(75);var c,u=Te.lookupNode(r,o),l=de.relative(e,s);if("."!==l.charAt(0))throw new Te.ErrnoError(28);if("."!==(l=de.relative(t,i)).charAt(0))throw new Te.ErrnoError(55);try{c=Te.lookupNode(n,a)}catch(e){}if(u!==c){var d=Te.isDir(u.mode),h=Te.mayDelete(r,o,d);if(h)throw new Te.ErrnoError(h);if(h=c?Te.mayDelete(n,a,d):Te.mayCreate(n,a))throw new Te.ErrnoError(h);if(!r.node_ops.rename)throw new Te.ErrnoError(63);if(Te.isMountpoint(u)||c&&Te.isMountpoint(c))throw new Te.ErrnoError(10);if(n!==r&&(h=Te.nodePermissions(r,"w")))throw new Te.ErrnoError(h);Te.hashRemoveNode(u);try{r.node_ops.rename(u,n,a)}catch(e){throw e}finally{Te.hashAddNode(u)}}},rmdir(e){var t=Te.lookupPath(e,{parent:!0}).node,r=ce.basename(e),n=Te.lookupNode(t,r),i=Te.mayDelete(t,r,!0);if(i)throw new Te.ErrnoError(i);if(!t.node_ops.rmdir)throw new Te.ErrnoError(63);if(Te.isMountpoint(n))throw new Te.ErrnoError(10);t.node_ops.rmdir(t,r),Te.destroyNode(n)},readdir(e){var t=Te.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Te.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Te.lookupPath(e,{parent:!0}).node;if(!t)throw new Te.ErrnoError(44);var r=ce.basename(e),n=Te.lookupNode(t,r),i=Te.mayDelete(t,r,!1);if(i)throw new Te.ErrnoError(i);if(!t.node_ops.unlink)throw new Te.ErrnoError(63);if(Te.isMountpoint(n))throw new Te.ErrnoError(10);t.node_ops.unlink(t,r),Te.destroyNode(n)},readlink(e){var t=Te.lookupPath(e).node;if(!t)throw new Te.ErrnoError(44);if(!t.node_ops.readlink)throw new Te.ErrnoError(28);return de.resolve(Te.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Te.lookupPath(e,{follow:!t}).node;if(!r)throw new Te.ErrnoError(44);if(!r.node_ops.getattr)throw new Te.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Te.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?Te.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){Te.chmod(e,t,!0)},fchmod(e,t){var r=Te.getStreamChecked(e);Te.chmod(r.node,t)},chown(e,t,r,n){var i;if(!(i="string"==typeof e?Te.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){Te.chown(e,t,r,!0)},fchown(e,t,r){var n=Te.getStreamChecked(e);Te.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new Te.ErrnoError(28);var r;if(!(r="string"==typeof e?Te.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);if(Te.isDir(r.mode))throw new Te.ErrnoError(31);if(!Te.isFile(r.mode))throw new Te.ErrnoError(28);var n=Te.nodePermissions(r,"w");if(n)throw new Te.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Te.getStreamChecked(e);if(0==(2097155&r.flags))throw new Te.ErrnoError(28);Te.truncate(r.node,t)},utime(e,t,r){var n=Te.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Te.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Ce(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=ce.normalize(e);try{n=Te.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(n){if(128&t)throw new Te.ErrnoError(20)}else n=Te.mknod(e,r,0),s=!0;if(!n)throw new Te.ErrnoError(44);if(Te.isChrdev(n.mode)&&(t&=-513),65536&t&&!Te.isDir(n.mode))throw new Te.ErrnoError(54);if(!s){var o=Te.mayOpen(n,t);if(o)throw new Te.ErrnoError(o)}512&t&&!s&&Te.truncate(n,0),t&=-131713;var a=Te.createStream({node:n,path:Te.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!i.logReadFiles||1&t||(Te.readFiles||(Te.readFiles={}),e in Te.readFiles||(Te.readFiles[e]=1)),a},close(e){if(Te.isClosed(e))throw new Te.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Te.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Te.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Te.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,i){if(n<0||i<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(1==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.read)throw new Te.ErrnoError(28);var s=void 0!==i;if(s){if(!e.seekable)throw new Te.ErrnoError(70)}else i=e.position;var o=e.stream_ops.read(e,t,r,n,i);return s||(e.position+=o),o},write(e,t,r,n,i,s){if(n<0||i<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(0==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.write)throw new Te.ErrnoError(28);e.seekable&&1024&e.flags&&Te.llseek(e,0,2);var o=void 0!==i;if(o){if(!e.seekable)throw new Te.ErrnoError(70)}else i=e.position;var a=e.stream_ops.write(e,t,r,n,i,s);return o||(e.position+=a),a},allocate(e,t,r){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(t<0||r<=0)throw new Te.ErrnoError(28);if(0==(2097155&e.flags))throw new Te.ErrnoError(8);if(!Te.isFile(e.node.mode)&&!Te.isDir(e.node.mode))throw new Te.ErrnoError(43);if(!e.stream_ops.allocate)throw new Te.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new Te.ErrnoError(2);if(1==(2097155&e.flags))throw new Te.ErrnoError(2);if(!e.stream_ops.mmap)throw new Te.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Te.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=Te.open(e,t.flags),i=Te.stat(e).size,s=new Uint8Array(i);return Te.read(n,s,0,i,0),"utf8"===t.encoding?r=fe(s,0):"binary"===t.encoding&&(r=s),Te.close(n),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var n=Te.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(me(t)+1),s=ve(t,i,0,i.length);Te.write(n,i,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Te.write(n,t,0,t.byteLength,void 0,r.canOwn)}Te.close(n)},cwd:()=>Te.currentPath,chdir(e){var t=Te.lookupPath(e,{follow:!0});if(null===t.node)throw new Te.ErrnoError(44);if(!Te.isDir(t.node.mode))throw new Te.ErrnoError(54);var r=Te.nodePermissions(t.node,"x");if(r)throw new Te.ErrnoError(r);Te.currentPath=t.path},createDefaultDirectories(){Te.mkdir("/tmp"),Te.mkdir("/home"),Te.mkdir("/home/web_user")},createDefaultDevices(){Te.mkdir("/dev"),Te.registerDevice(Te.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),Te.mkdev("/dev/null",Te.makedev(1,3)),ge.register(Te.makedev(5,0),ge.default_tty_ops),ge.register(Te.makedev(6,0),ge.default_tty1_ops),Te.mkdev("/dev/tty",Te.makedev(5,0)),Te.mkdev("/dev/tty1",Te.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=le(e).byteLength),e[--t]);Te.createDevice("/dev","random",r),Te.createDevice("/dev","urandom",r),Te.mkdir("/dev/shm"),Te.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Te.mkdir("/proc");var e=Te.mkdir("/proc/self");Te.mkdir("/proc/self/fd"),Te.mount({mount(){var t=Te.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=Te.getStreamChecked(r),i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?Te.createDevice("/dev","stdin",i.stdin):Te.symlink("/dev/tty","/dev/stdin"),i.stdout?Te.createDevice("/dev","stdout",null,i.stdout):Te.symlink("/dev/tty","/dev/stdout"),i.stderr?Te.createDevice("/dev","stderr",null,i.stderr):Te.symlink("/dev/tty1","/dev/stderr"),Te.open("/dev/stdin",0),Te.open("/dev/stdout",1),Te.open("/dev/stderr",1)},ensureErrnoError(){Te.ErrnoError||(Te.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Te.ErrnoError.prototype=new Error,Te.ErrnoError.prototype.constructor=Te.ErrnoError,[44].forEach((e=>{Te.genericErrors[e]=new Te.ErrnoError(e),Te.genericErrors[e].stack=""})))},staticInit(){Te.ensureErrnoError(),Te.nameTable=new Array(4096),Te.mount(we,{},"/"),Te.createDefaultDirectories(),Te.createDefaultDevices(),Te.createSpecialDirectories(),Te.filesystems={MEMFS:we}},init(e,t,r){Te.init.initialized=!0,Te.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,Te.createStandardStreams()},quit(){Te.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;i||(o=n);var a=this;a.setDataGetter((e=>{var t=e*o,i=(e+1)*o-1;if(i=Math.min(i,n-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",r,!1),n!==o&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+r+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):ye(i.responseText||"",!0)})(t,i)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&n||(o=n=1,n=this.getter(0).length,o=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!d)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var c=Te.createFile(e,t,a,n,i);a.contents?c.contents=a.contents:a.url&&(c.contents=null,c.url=a.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,t,r,n,i){var s=e.node.contents;if(i>=s.length)return 0;var o=Math.min(s.length-i,n);if(s.slice)for(var a=0;a{var t=c.stream_ops[e];u[e]=function(){return Te.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,i)=>(Te.forceLoadFile(c),l(e,t,r,n,i)),u.mmap=(e,t,r,n,i)=>{Te.forceLoadFile(c);var s=be();if(!s)throw new Te.ErrnoError(48);return l(e,S,s,t,r),{ptr:s,allocated:!0}},c.stream_ops=u,c}},Be=(e,t)=>e?fe(I,e,t):"",De={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(ce.isAbs(t))return t;var n;if(n=-100===e?Te.cwd():De.getStreamFromFD(e).path,0==t.length){if(!r)throw new Te.ErrnoError(44);return n}return ce.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ce.normalize(t)!==ce.normalize(Te.getPath(e.node)))return-54;throw e}k[r>>2]=n.dev,k[r+4>>2]=n.mode,C[r+8>>2]=n.nlink,k[r+12>>2]=n.uid,k[r+16>>2]=n.gid,k[r+20>>2]=n.rdev,K=[n.size>>>0,(Y=n.size,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[r+24>>2]=K[0],k[r+28>>2]=K[1],k[r+32>>2]=4096,k[r+36>>2]=n.blocks;var i=n.atime.getTime(),s=n.mtime.getTime(),o=n.ctime.getTime();return K=[Math.floor(i/1e3)>>>0,(Y=Math.floor(i/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[r+40>>2]=K[0],k[r+44>>2]=K[1],C[r+48>>2]=i%1e3*1e3,K=[Math.floor(s/1e3)>>>0,(Y=Math.floor(s/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[r+56>>2]=K[0],k[r+60>>2]=K[1],C[r+64>>2]=s%1e3*1e3,K=[Math.floor(o/1e3)>>>0,(Y=Math.floor(o/1e3),+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[r+72>>2]=K[0],k[r+76>>2]=K[1],C[r+80>>2]=o%1e3*1e3,K=[n.ino>>>0,(Y=n.ino,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[r+88>>2]=K[0],k[r+92>>2]=K[1],0},doMsync(e,t,r,n,i){if(!Te.isFile(t.node.mode))throw new Te.ErrnoError(43);if(2&n)return 0;var s=I.slice(e,e+r);Te.msync(t,s,i,r,n)},varargs:void 0,get(){var e=k[+De.varargs>>2];return De.varargs+=4,e},getp:()=>De.get(),getStr:e=>Be(e),getStreamFromFD:e=>Te.getStreamChecked(e)};function Me(e,t,r){De.varargs=r;try{var n=De.getStreamFromFD(e);switch(t){case 0:if((i=De.get())<0)return-28;for(;Te.streams[i];)i++;return Te.createStream(n,i).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var i=De.get();return n.flags|=i,0;case 5:return i=De.getp(),A[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ae(28),-1}}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}}function Pe(e,t,r,n){De.varargs=n;try{t=De.getStr(t),t=De.calculateAt(e,t);var i=n?De.get():0;return Te.open(t,r,i).fd}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}}var Ue,Fe,Re,Le=(e,t,r,n,i)=>{},Oe=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ue=e},ze=e=>{for(var t="",r=e;I[r];)t+=Ue[I[r++]];return t},Ne={},He={},Ve={},We=e=>{throw new Fe(e)},je=e=>{throw new Re(e)},Ge=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&je("Mismatched type converter count");for(var i=0;i{He.hasOwnProperty(e)?i[t]=He[e]:(s.push(e),Ne.hasOwnProperty(e)||(Ne[e]=[]),Ne[e].push((()=>{i[t]=He[e],++o===s.length&&n(i)})))})),0===s.length&&n(i)};function qe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=t.name;if(e||We(`type "${n}" must have a positive integer typeid pointer`),He.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;We(`Cannot register type '${n}' twice`)}if(He[e]=t,delete Ve[e],Ne.hasOwnProperty(e)){var i=Ne[e];delete Ne[e],i.forEach((e=>e()))}}function $e(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return qe(e,t,r)}var Ye,Ke=8,Je=(e,t,r,n)=>{$e(e,{name:t=ze(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:Ke,readValueFromPointer:function(e){return this.fromWireType(I[e])},destructorFunction:null})},Xe=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Ze=e=>{We(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},nt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=nt(e,t,r.baseClass);return null===n?null:r.downcast(n)},it={},st=()=>Object.keys(dt).length,ot=()=>{var e=[];for(var t in dt)dt.hasOwnProperty(t)&&e.push(dt[t]);return e},at=[],ct=()=>{for(;at.length;){var e=at.pop();e.$$.deleteScheduled=!1,e.delete()}},ut=e=>{Ye=e,at.length&&Ye&&Ye(ct)},lt=()=>{i.getInheritedInstanceCount=st,i.getLiveInheritedInstances=ot,i.flushPendingDeletes=ct,i.setDelayFunction=ut},dt={},ht=(e,t)=>{for(void 0===t&&We("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=ht(e,t),dt[t]),pt=(e,t)=>(t.ptrType&&t.ptr||je("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&je("Both smartPtrType and smartPtr must be specified"),t.count={value:1},vt(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=it[o];if(!a)return i.call(this);s=this.isConst?a.constPointerType:a.pointerType;var c=nt(t,this.registeredClass,s.registeredClass);return null===c?i.call(this):this.isSmartPointer?pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c,smartPtrType:this,smartPtr:e}):pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c})}var vt=e=>"undefined"==typeof FinalizationRegistry?(vt=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),vt=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),vt(e)),yt=()=>{Object.assign(_t.prototype,{isAliasOf(e){if(!(this instanceof _t))return!1;if(!(e instanceof _t))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i},clone(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:Xe(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&We("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&We("Object already scheduled for deletion"),at.push(this),1===at.length&&Ye&&Ye(ct),this.$$.deleteScheduled=!0,this}})};function _t(){}var gt=(e,t)=>Object.defineProperty(t,"name",{value:e}),bt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||We(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},wt=(e,t,r)=>{i.hasOwnProperty(e)?((void 0===r||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[r])&&We(`Cannot register public name '${e}' twice`),bt(i,e,e),i.hasOwnProperty(r)&&We(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),i[e].overloadTable[r]=t):(i[e]=t,void 0!==r&&(i[e].numArguments=r))},St=48,It=57,At=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=St&&t<=It?`_${e}`:e};function Et(e,t,r,n,i,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}var kt=(e,t,r)=>{for(;t!==r;)t.upcast||We(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Ct(e,t){if(null===t)return this.isReference&&We(`null is not a valid ${this.name}`),0;t.$$||We(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||We(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return kt(t.$$.ptr,r,this.registeredClass)}function xt(e,t){var r;if(null===t)return this.isReference&&We(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||We(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||We(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&We(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=kt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&We("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:We(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,sr.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:We("Unsupporting sharing policy")}return r}function Tt(e,t){if(null===t)return this.isReference&&We(`null is not a valid ${this.name}`),0;t.$$||We(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||We(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&We(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return kt(t.$$.ptr,r,this.registeredClass)}function Bt(e){return this.fromWireType(C[e>>2])}var Dt=()=>{Object.assign(Mt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Ke,readValueFromPointer:Bt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Mt(e,t,r,n,i,s,o,a,c,u,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=xt:n?(this.toWireType=Ct,this.destructorFunction=null):(this.toWireType=Tt,this.destructorFunction=null)}var Pt,Ut,Ft=(e,t,r)=>{i.hasOwnProperty(e)||je("Replacing nonexistant public symbol"),void 0!==i[e].overloadTable&&void 0!==r?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)},Rt=(e,t,r)=>{var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)},Lt=[],Ot=e=>{var t=Lt[e];return t||(e>=Lt.length&&(Lt.length=e+1),Lt[e]=t=Pt.get(e)),t},zt=(e,t,r)=>e.includes("j")?Rt(e,t,r):Ot(t).apply(null,r),Nt=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),zt(e,t,r)}},Ht=(e,t)=>{var r=(e=ze(e)).includes("j")?Nt(e,t):Ot(t);return"function"!=typeof r&&We(`unknown function pointer with signature ${e}: ${t}`),r},Vt=(e,t)=>{var r=gt(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Wt=e=>{var t=yn(e),r=ze(t);return mn(t),r},jt=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||He[t]||(Ve[t]?Ve[t].forEach(e):(r.push(t),n[t]=!0))})),new Ut(`${e}: `+r.map(Wt).join([", "]))},Gt=(e,t,r,n,i,s,o,a,c,u,l,d,h)=>{l=ze(l),s=Ht(i,s),a&&(a=Ht(o,a)),u&&(u=Ht(c,u)),h=Ht(d,h);var f=At(l);wt(f,(function(){jt(`Cannot construct ${l} due to unbound types`,[n])})),Ge([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:_t.prototype;var o=gt(l,(function(){if(Object.getPrototypeOf(this)!==c)throw new Fe("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Fe(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Fe(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new Et(l,o,c,h,r,s,a,u);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new Mt(l,d,!0,!1,!1),m=new Mt(l+"*",d,!1,!1,!1),v=new Mt(l+" const*",d,!1,!0,!1);return it[e]={pointerType:m,constPointerType:v},Ft(f,o),[p,m,v]}))},qt=(e,t)=>{for(var r=[],n=0;n>2]);return r},$t=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Yt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=gt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function Kt(e,t,r,n,i,s){var o=t.length;o<2&&We("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,c=!1,u=1;u0?", ":"")+h),f+=(l||s?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",c)f+="runDestructors(destructors);\n";else for(u=a?1:2;u{var o=qt(t,r);i=Ht(n,i),Ge([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Fe(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{jt(`Cannot construct ${e.name} due to unbound types`,o)},Ge([],o,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Kt(r,n,null,i,s),[]))),[]}))},Xt=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},Zt=(e,t,r,n,i,s,o,a,c)=>{var u=qt(r,n);t=ze(t),t=Xt(t),s=Ht(i,s),Ge([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){jt(`Cannot call ${n} due to unbound types`,u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,d=l[t];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===r-2?(i.argCount=r-2,i.className=e.name,l[t]=i):(bt(l,t,n),l[t].overloadTable[r-2]=i),Ge([],u,(function(i){var a=Kt(n,i,e,s,o,c);return void 0===l[t].overloadTable?(a.argCount=r-2,l[t]=a):l[t].overloadTable[r-2]=a,[]})),[]}))};function Qt(){Object.assign(er.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function er(){this.allocated=[void 0],this.freelist=[]}var tr=new er,rr=e=>{e>=tr.reserved&&0==--tr.get(e).refcount&&tr.free(e)},nr=()=>{for(var e=0,t=tr.reserved;t{tr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),tr.reserved=tr.allocated.length,i.count_emval_handles=nr},sr={toValue:e=>(e||We("Cannot use deleted val. handle = "+e),tr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return tr.allocate({refcount:1,value:e})}}};function or(e){return this.fromWireType(k[e>>2])}var ar=(e,t)=>{$e(e,{name:t=ze(t),fromWireType:e=>{var t=sr.toValue(e);return rr(e),t},toWireType:(e,t)=>sr.toHandle(t),argPackAdvance:Ke,readValueFromPointer:or,destructorFunction:null})},cr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},ur=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(x[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},lr=(e,t,r)=>{$e(e,{name:t=ze(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Ke,readValueFromPointer:ur(t,r),destructorFunction:null})},dr=(e,t,r)=>{switch(t){case 1:return r?e=>S[e>>0]:e=>I[e>>0];case 2:return r?e=>A[e>>1]:e=>E[e>>1];case 4:return r?e=>k[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},hr=(e,t,r,n,i)=>{t=ze(t);var s=e=>e;if(0===n){var o=32-8*r;s=e=>e<>>o}var a=t.includes("unsigned");$e(e,{name:t,fromWireType:s,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Ke,readValueFromPointer:dr(t,r,0!==n),destructorFunction:null})},fr=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=C[e>>2],r=C[e+4>>2];return new n(S.buffer,r,t)}$e(e,{name:r=ze(r),fromWireType:i,argPackAdvance:Ke,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},pr=(e,t,r)=>ve(e,I,t,r),mr=(e,t)=>{var r="std::string"===(t=ze(t));$e(e,{name:t,fromWireType(e){var t,n=C[e>>2],i=e+4;if(r)for(var s=i,o=0;o<=n;++o){var a=i+o;if(o==n||0==I[a]){var c=Be(s,a-s);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),s=a+1}}else{var u=new Array(n);for(o=0;o>2]=n,r&&i)pr(t,o,n+1);else if(i)for(var a=0;a255&&(mn(o),We("String has UTF-16 code units that do not fit in 8 bits")),I[o+a]=c}else for(a=0;a{for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&E[n];)++n;if((r=n<<1)-e>32&&vr)return vr.decode(I.subarray(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=A[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s},_r=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return A[t>>1]=0,t-n},gr=e=>2*e.length,br=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=k[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var s=i-65536;n+=String.fromCharCode(55296|s>>10,56320|1023&s)}else n+=String.fromCharCode(i)}return n},wr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,s=0;s=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s)),k[t>>2]=o,(t+=4)+4>i)break}return k[t>>2]=0,t-n},Sr=e=>{for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t},Ir=(e,t,r)=>{var n,i,s,o,a;r=ze(r),2===t?(n=yr,i=_r,o=gr,s=()=>E,a=1):4===t&&(n=br,i=wr,o=Sr,s=()=>C,a=2),$e(e,{name:r,fromWireType:e=>{for(var r,i=C[e>>2],o=s(),c=e+4,u=0;u<=i;++u){var l=e+4+u*t;if(u==i||0==o[l>>a]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return mn(e),r},toWireType:(e,n)=>{"string"!=typeof n&&We(`Cannot pass non-string to C++ string type ${r}`);var s=o(n),c=_n(4+s+t);return C[c>>2]=s>>a,i(n,c+4,s+t),null!==e&&e.push(mn,c),c},argPackAdvance:Ke,readValueFromPointer:or,destructorFunction(e){mn(e)}})},Ar=(e,t)=>{$e(e,{isVoid:!0,name:t=ze(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Er={},kr=e=>{var t=Er[e];return void 0===t?ze(e):t},Cr=[],xr=(e,t,r,n,i)=>(e=Cr[e])(t=sr.toValue(t),t[r=kr(r)],n,i),Tr=e=>{var t=Cr.length;return Cr.push(e),t},Br=(e,t)=>{var r=He[e];return void 0===r&&We(t+" has unknown type "+Wt(e)),r},Dr=(e,t)=>{for(var r=new Array(e),n=0;n>2],"parameter "+n);return r},Mr=(e,t,r)=>{var n=[],i=e.toWireType(n,r);return n.length&&(C[t>>2]=sr.toHandle(n)),i},Pr=(e,t,r)=>{var n=Dr(e,t),i=n.shift();e--;var s="return function (obj, func, destructorsRef, args) {\n",o=0,a=[];0===r&&a.push("obj");for(var c=["retType"],u=[i],l=0;le.name)).join(", ")}) => ${i.name}>`;return Tr(gt(h,d))},Ur=e=>{var t=sr.toValue(e);$t(t),rr(e)},Fr=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Rr=e=>e%4==0&&(e%100!=0||e%400==0),Lr=[0,31,60,91,121,152,182,213,244,274,305,335],Or=[0,31,59,90,120,151,181,212,243,273,304,334],zr=e=>(Rr(e.getFullYear())?Lr:Or)[e.getMonth()]+e.getDate()-1;function Nr(e,t,r){var n=Fr(e,t),i=new Date(1e3*n);k[r>>2]=i.getSeconds(),k[r+4>>2]=i.getMinutes(),k[r+8>>2]=i.getHours(),k[r+12>>2]=i.getDate(),k[r+16>>2]=i.getMonth(),k[r+20>>2]=i.getFullYear()-1900,k[r+24>>2]=i.getDay();var s=0|zr(i);k[r+28>>2]=s,k[r+36>>2]=-60*i.getTimezoneOffset();var o=new Date(i.getFullYear(),0,1),a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),c=o.getTimezoneOffset(),u=0|(a!=c&&i.getTimezoneOffset()==Math.min(c,a));k[r+32>>2]=u}var Hr=e=>{var t=me(e)+1,r=_n(t);return r&&pr(e,r,t),r},Vr=(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),s=new Date(n,6,1),o=i.getTimezoneOffset(),a=s.getTimezoneOffset(),c=Math.max(o,a);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[e>>2]=60*c,k[t>>2]=Number(o!=a);var l=u(i),d=u(s),h=Hr(l),f=Hr(d);a>2]=h,C[r+4>>2]=f):(C[r>>2]=f,C[r+4>>2]=h)},Wr=()=>{q("")},jr=()=>Date.now(),Gr=(e,t,r)=>I.copyWithin(e,t,t+r),qr=()=>134217728,$r=e=>{var t=(e-g.buffer.byteLength+65535)/65536;try{return g.grow(t),M(),1}catch(e){}},Yr=e=>{var t=I.length;e>>>=0;var r=qr();if(e>r)return!1;for(var n,i,s=1;s<=4;s*=2){var o=t*(1+.2/s);o=Math.min(o,e+100663296);var a=Math.min(r,(n=Math.max(e,o))+((i=65536)-n%i)%i);if($r(a))return!0}return!1},Kr={},Jr=()=>u||"./this.program",Xr=()=>{if(!Xr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Jr()};for(var t in Kr)void 0===Kr[t]?delete e[t]:e[t]=Kr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Xr.strings=r}return Xr.strings},Zr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);S[t>>0]=0},Qr=(e,t)=>{var r=0;return Xr().forEach(((n,i)=>{var s=t+r;C[e+4*i>>2]=s,Zr(n,s),r+=n.length+1})),0},en=(e,t)=>{var r=Xr();C[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),C[t>>2]=n,0};function tn(e){try{var t=De.getStreamFromFD(e);return Te.close(t),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}function rn(e,t){try{var r=De.getStreamFromFD(e),n=r.tty?2:Te.isDir(r.mode)?3:Te.isLink(r.mode)?7:4;return S[t>>0]=n,A[t+2>>1]=0,K=[0,(Y=0,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[t+8>>2]=K[0],k[t+12>>2]=K[1],K=[0,(Y=0,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[t+16>>2]=K[0],k[t+20>>2]=K[1],0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var nn=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=Te.read(e,S,o,a,n);if(c<0)return-1;if(i+=c,c>2]=s,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}function on(e,t,r,n,i){var s=Fr(t,r);try{if(isNaN(s))return 61;var o=De.getStreamFromFD(e);return Te.llseek(o,s,n),K=[o.position>>>0,(Y=o.position,+Math.abs(Y)>=1?Y>0?+Math.floor(Y/4294967296)>>>0:~~+Math.ceil((Y-+(~~Y>>>0))/4294967296)>>>0:0)],k[i>>2]=K[0],k[i+4>>2]=K[1],o.getdents&&0===s&&0===n&&(o.getdents=null),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var an=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=Te.write(e,S,o,a,n);if(c<0)return-1;i+=c,void 0!==n&&(n+=c)}return i};function cn(e,t,r,n){try{var i=De.getStreamFromFD(e),s=an(i,t,r);return C[n>>2]=s,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var un=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Te.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},ln=365,dn=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&ln)===ln},set:function(e){e?this.mode|=ln:this.mode&=~ln}},write:{get:function(){return(this.mode&dn)===dn},set:function(e){e?this.mode|=dn:this.mode&=~dn}},isFolder:{get:function(){return Te.isDir(this.mode)}},isDevice:{get:function(){return Te.isChrdev(this.mode)}}}),Te.FSNode=un,Te.createPreloadedFile=ke,Te.staticInit(),Oe(),Fe=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Re=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},yt(),lt(),Dt(),Ut=i.UnboundTypeError=Vt(Error,"UnboundTypeError"),Qt(),ir();var hn,fn={o:oe,C:Me,u:Pe,r:Le,E:Je,F:Gt,A:Jt,i:Zt,D:ar,l:lr,c:hr,b:fr,m:mr,j:Ir,n:Ar,f:xr,h:rr,e:Pr,d:Ur,p:Nr,t:Vr,a:Wr,g:jr,y:Gr,s:Yr,w:Qr,x:en,k:tn,v:rn,B:sn,q:on,z:cn},pn=ne(),mn=e=>(mn=pn.I)(e),vn=()=>(vn=pn.K)(),yn=e=>(yn=pn.L)(e),_n=e=>(_n=pn.M)(e),gn=e=>(gn=pn.O)(e);function bn(){function e(){hn||(hn=!0,i.calledRun=!0,B||(L(),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),O()))}V>0||(R(),V>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_viiijj=(e,t,r,n,s,o,a,c)=>(i.dynCall_viiijj=pn.P)(e,t,r,n,s,o,a,c),i.dynCall_jij=(e,t,r,n)=>(i.dynCall_jij=pn.Q)(e,t,r,n),i.dynCall_jii=(e,t,r)=>(i.dynCall_jii=pn.R)(e,t,r),i.dynCall_jiji=(e,t,r,n,s)=>(i.dynCall_jiji=pn.S)(e,t,r,n,s),W=function e(){hn||bn(),hn||(W=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return bn(),e.ready});function o(e,t){var r=h();return(o=function(e,t){return r[e-=127]})(e,t)}var a=o;!function(e,t){for(var r=o,n=e();;)try{if(289662===-parseInt(r(143))/1*(parseInt(r(140))/2)+-parseInt(r(129))/3+-parseInt(r(139))/4+parseInt(r(132))/5+parseInt(r(130))/6*(-parseInt(r(136))/7)+parseInt(r(133))/8*(parseInt(r(141))/9)+parseInt(r(135))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(h);var c=1e-6,u=typeof Float32Array!==a(137)?Float32Array:Array,l=Math[a(131)];var d=Math.PI/180;function h(){var e=["length","144732mPWxik","3152166PBGpKR","random","2563485EcsIRl","16WfjEEm","sqrt","7914220VdeTVS","7xYutup","undefined","abs","571652DoUWbk","959194uINXsu","817461shmAEy","max","1WPaJCc","hypot"];return(h=function(){return e})()}Math.hypot||(Math[a(127)]=function(){for(var e=a,t=0,r=arguments[e(128)];r--;)t+=arguments[r]*arguments[r];return Math[e(134)](t)});var f=Object.freeze({__proto__:null,EPSILON:c,get ARRAY_TYPE(){return u},RANDOM:l,setMatrixArrayType:function(e){u=e},toRadian:function(e){return e*d},equals:function(e,t){var r=a;return Math.abs(e-t)<=c*Math[r(142)](1,Math[r(138)](e),Math[r(138)](t))}});function p(){var e=new(f[A(422)])(16);return u!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function m(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function v(e,t,r){var n=t[0],i=t[1],s=t[2],o=t[3],a=t[4],c=t[5],u=t[6],l=t[7],d=t[8],h=t[9],f=t[10],p=t[11],m=t[12],v=t[13],y=t[14],_=t[15],g=r[0],b=r[1],w=r[2],S=r[3];return e[0]=g*n+b*a+w*d+S*m,e[1]=g*i+b*c+w*h+S*v,e[2]=g*s+b*u+w*f+S*y,e[3]=g*o+b*l+w*p+S*_,g=r[4],b=r[5],w=r[6],S=r[7],e[4]=g*n+b*a+w*d+S*m,e[5]=g*i+b*c+w*h+S*v,e[6]=g*s+b*u+w*f+S*y,e[7]=g*o+b*l+w*p+S*_,g=r[8],b=r[9],w=r[10],S=r[11],e[8]=g*n+b*a+w*d+S*m,e[9]=g*i+b*c+w*h+S*v,e[10]=g*s+b*u+w*f+S*y,e[11]=g*o+b*l+w*p+S*_,g=r[12],b=r[13],w=r[14],S=r[15],e[12]=g*n+b*a+w*d+S*m,e[13]=g*i+b*c+w*h+S*v,e[14]=g*s+b*u+w*f+S*y,e[15]=g*o+b*l+w*p+S*_,e}function y(e,t,r){var n=t[0],i=t[1],s=t[2],o=t[3],a=n+n,c=i+i,u=s+s,l=n*a,d=n*c,h=n*u,f=i*c,p=i*u,m=s*u,v=o*a,y=o*c,_=o*u;return e[0]=1-(f+m),e[1]=d+_,e[2]=h-y,e[3]=0,e[4]=d-_,e[5]=1-(l+m),e[6]=p+v,e[7]=0,e[8]=h+y,e[9]=p-v,e[10]=1-(l+f),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function _(e,t){var r=A,n=t[0],i=t[1],s=t[2],o=t[4],a=t[5],c=t[6],u=t[8],l=t[9],d=t[10];return e[0]=Math[r(413)](n,i,s),e[1]=Math.hypot(o,a,c),e[2]=Math.hypot(u,l,d),e}function g(e,t,r,n,i){var s,o=1/Math[A(417)](t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(s=1/(n-i),e[10]=(i+n)*s,e[14]=2*i*n*s):(e[10]=-1,e[14]=-2*n),e}!function(e,t){for(var r=A,n=e();;)try{if(398705===-parseInt(r(414))/1+-parseInt(r(412))/2*(parseInt(r(408))/3)+parseInt(r(419))/4*(parseInt(r(410))/5)+parseInt(r(405))/6+parseInt(r(416))/7+parseInt(r(403))/8*(parseInt(r(409))/9)+-parseInt(r(418))/10*(-parseInt(r(402))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(w);var b=g;function w(){var e=["1464099NnwEEx","tan","3820RQqQEg","26484aurRSf","mat4(","leftDegrees","ARRAY_TYPE","max","abs","sqrt","2376PSbRnm","16kMAlqv","cos","1532316TnBEHM","downDegrees","EPSILON","3kiyvMK","827181UYYsyp","305lGzvhF","sin","1363610IJIRIU","hypot","54244JZWFWk","upDegrees"];return(w=function(){return e})()}function S(e,t,r,n,i,s,o){var a=1/(t-r),c=1/(n-i),u=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*a,e[13]=(i+n)*c,e[14]=(o+s)*u,e[15]=1,e}var I=S;function A(e,t){var r=w();return(A=function(e,t){return r[e-=401]})(e,t)}function E(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}var k=v,C=E,x=Object.freeze({__proto__:null,create:p,clone:function(e){var t=new(f[A(422)])(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},fromValues:function(e,t,r,n,i,s,o,a,c,u,l,d,h,p,m,v){var y=new(f[A(422)])(16);return y[0]=e,y[1]=t,y[2]=r,y[3]=n,y[4]=i,y[5]=s,y[6]=o,y[7]=a,y[8]=c,y[9]=u,y[10]=l,y[11]=d,y[12]=h,y[13]=p,y[14]=m,y[15]=v,y},set:function(e,t,r,n,i,s,o,a,c,u,l,d,h,f,p,m,v){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=s,e[5]=o,e[6]=a,e[7]=c,e[8]=u,e[9]=l,e[10]=d,e[11]=h,e[12]=f,e[13]=p,e[14]=m,e[15]=v,e},identity:m,transpose:function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],s=t[6],o=t[7],a=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=s,e[11]=t[14],e[12]=i,e[13]=o,e[14]=a}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e},invert:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],l=t[8],d=t[9],h=t[10],f=t[11],p=t[12],m=t[13],v=t[14],y=t[15],_=r*a-n*o,g=r*c-i*o,b=r*u-s*o,w=n*c-i*a,S=n*u-s*a,I=i*u-s*c,A=l*m-d*p,E=l*v-h*p,k=l*y-f*p,C=d*v-h*m,x=d*y-f*m,T=h*y-f*v,B=_*T-g*x+b*C+w*k-S*E+I*A;return B?(B=1/B,e[0]=(a*T-c*x+u*C)*B,e[1]=(i*x-n*T-s*C)*B,e[2]=(m*I-v*S+y*w)*B,e[3]=(h*S-d*I-f*w)*B,e[4]=(c*k-o*T-u*E)*B,e[5]=(r*T-i*k+s*E)*B,e[6]=(v*b-p*I-y*g)*B,e[7]=(l*I-h*b+f*g)*B,e[8]=(o*x-a*k+u*A)*B,e[9]=(n*k-r*x-s*A)*B,e[10]=(p*S-m*b+y*_)*B,e[11]=(d*b-l*S-f*_)*B,e[12]=(a*E-o*C-c*A)*B,e[13]=(r*C-n*E+i*A)*B,e[14]=(m*g-p*w-v*_)*B,e[15]=(l*w-d*g+h*_)*B,e):null},adjoint:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],l=t[8],d=t[9],h=t[10],f=t[11],p=t[12],m=t[13],v=t[14],y=t[15];return e[0]=a*(h*y-f*v)-d*(c*y-u*v)+m*(c*f-u*h),e[1]=-(n*(h*y-f*v)-d*(i*y-s*v)+m*(i*f-s*h)),e[2]=n*(c*y-u*v)-a*(i*y-s*v)+m*(i*u-s*c),e[3]=-(n*(c*f-u*h)-a*(i*f-s*h)+d*(i*u-s*c)),e[4]=-(o*(h*y-f*v)-l*(c*y-u*v)+p*(c*f-u*h)),e[5]=r*(h*y-f*v)-l*(i*y-s*v)+p*(i*f-s*h),e[6]=-(r*(c*y-u*v)-o*(i*y-s*v)+p*(i*u-s*c)),e[7]=r*(c*f-u*h)-o*(i*f-s*h)+l*(i*u-s*c),e[8]=o*(d*y-f*m)-l*(a*y-u*m)+p*(a*f-u*d),e[9]=-(r*(d*y-f*m)-l*(n*y-s*m)+p*(n*f-s*d)),e[10]=r*(a*y-u*m)-o*(n*y-s*m)+p*(n*u-s*a),e[11]=-(r*(a*f-u*d)-o*(n*f-s*d)+l*(n*u-s*a)),e[12]=-(o*(d*v-h*m)-l*(a*v-c*m)+p*(a*h-c*d)),e[13]=r*(d*v-h*m)-l*(n*v-i*m)+p*(n*h-i*d),e[14]=-(r*(a*v-c*m)-o*(n*v-i*m)+p*(n*c-i*a)),e[15]=r*(a*h-c*d)-o*(n*h-i*d)+l*(n*c-i*a),e},determinant:function(e){var t=e[0],r=e[1],n=e[2],i=e[3],s=e[4],o=e[5],a=e[6],c=e[7],u=e[8],l=e[9],d=e[10],h=e[11],f=e[12],p=e[13],m=e[14],v=e[15];return(t*o-r*s)*(d*v-h*m)-(t*a-n*s)*(l*v-h*p)+(t*c-i*s)*(l*m-d*p)+(r*a-n*o)*(u*v-h*f)-(r*c-i*o)*(u*m-d*f)+(n*c-i*a)*(u*p-l*f)},multiply:v,translate:function(e,t,r){var n,i,s,o,a,c,u,l,d,h,f,p,m=r[0],v=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*v+t[8]*y+t[12],e[13]=t[1]*m+t[5]*v+t[9]*y+t[13],e[14]=t[2]*m+t[6]*v+t[10]*y+t[14],e[15]=t[3]*m+t[7]*v+t[11]*y+t[15]):(n=t[0],i=t[1],s=t[2],o=t[3],a=t[4],c=t[5],u=t[6],l=t[7],d=t[8],h=t[9],f=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=s,e[3]=o,e[4]=a,e[5]=c,e[6]=u,e[7]=l,e[8]=d,e[9]=h,e[10]=f,e[11]=p,e[12]=n*m+a*v+d*y+t[12],e[13]=i*m+c*v+h*y+t[13],e[14]=s*m+u*v+f*y+t[14],e[15]=o*m+l*v+p*y+t[15]),e},scale:function(e,t,r){var n=r[0],i=r[1],s=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*s,e[9]=t[9]*s,e[10]=t[10]*s,e[11]=t[11]*s,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},rotate:function(e,t,r,n){var i,s,o,a,c,u,l,d,h,p,m,v,y,_,g,b,w,S,I,E,k,C,x,T,B=A,D=n[0],M=n[1],P=n[2],U=Math[B(413)](D,M,P);return U0?(r[0]=2*(a*o+l*n+c*s-u*i)/d,r[1]=2*(c*o+l*i+u*n-a*s)/d,r[2]=2*(u*o+l*s+a*i-c*n)/d):(r[0]=2*(a*o+l*n+c*s-u*i),r[1]=2*(c*o+l*i+u*n-a*s),r[2]=2*(u*o+l*s+a*i-c*n)),y(e,t,r),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:_,getRotation:function(e,t){var r=A,n=new(f[r(422)])(3);_(n,t);var i=1/n[0],s=1/n[1],o=1/n[2],a=t[0]*i,c=t[1]*s,u=t[2]*o,l=t[4]*i,d=t[5]*s,h=t[6]*o,p=t[8]*i,m=t[9]*s,v=t[10]*o,y=a+d+v,g=0;return y>0?(g=2*Math.sqrt(y+1),e[3]=.25*g,e[0]=(h-m)/g,e[1]=(p-u)/g,e[2]=(c-l)/g):a>d&&a>v?(g=2*Math[r(401)](1+a-d-v),e[3]=(h-m)/g,e[0]=.25*g,e[1]=(c+l)/g,e[2]=(p+u)/g):d>v?(g=2*Math[r(401)](1+d-a-v),e[3]=(p-u)/g,e[0]=(c+l)/g,e[1]=.25*g,e[2]=(h+m)/g):(g=2*Math[r(401)](1+v-a-d),e[3]=(c-l)/g,e[0]=(p+u)/g,e[1]=(h+m)/g,e[2]=.25*g),e},fromRotationTranslationScale:function(e,t,r,n){var i=t[0],s=t[1],o=t[2],a=t[3],c=i+i,u=s+s,l=o+o,d=i*c,h=i*u,f=i*l,p=s*u,m=s*l,v=o*l,y=a*c,_=a*u,g=a*l,b=n[0],w=n[1],S=n[2];return e[0]=(1-(p+v))*b,e[1]=(h+g)*b,e[2]=(f-_)*b,e[3]=0,e[4]=(h-g)*w,e[5]=(1-(d+v))*w,e[6]=(m+y)*w,e[7]=0,e[8]=(f+_)*S,e[9]=(m-y)*S,e[10]=(1-(d+p))*S,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e},fromRotationTranslationScaleOrigin:function(e,t,r,n,i){var s=t[0],o=t[1],a=t[2],c=t[3],u=s+s,l=o+o,d=a+a,h=s*u,f=s*l,p=s*d,m=o*l,v=o*d,y=a*d,_=c*u,g=c*l,b=c*d,w=n[0],S=n[1],I=n[2],A=i[0],E=i[1],k=i[2],C=(1-(m+y))*w,x=(f+b)*w,T=(p-g)*w,B=(f-b)*S,D=(1-(h+y))*S,M=(v+_)*S,P=(p+g)*I,U=(v-_)*I,F=(1-(h+m))*I;return e[0]=C,e[1]=x,e[2]=T,e[3]=0,e[4]=B,e[5]=D,e[6]=M,e[7]=0,e[8]=P,e[9]=U,e[10]=F,e[11]=0,e[12]=r[0]+A-(C*A+B*E+P*k),e[13]=r[1]+E-(x*A+D*E+U*k),e[14]=r[2]+k-(T*A+M*E+F*k),e[15]=1,e},fromQuat:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=r+r,a=n+n,c=i+i,u=r*o,l=n*o,d=n*a,h=i*o,f=i*a,p=i*c,m=s*o,v=s*a,y=s*c;return e[0]=1-d-p,e[1]=l+y,e[2]=h-v,e[3]=0,e[4]=l-y,e[5]=1-u-p,e[6]=f+m,e[7]=0,e[8]=h+v,e[9]=f-m,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},frustum:function(e,t,r,n,i,s,o){var a=1/(r-t),c=1/(i-n),u=1/(s-o);return e[0]=2*s*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*s*c,e[6]=0,e[7]=0,e[8]=(r+t)*a,e[9]=(i+n)*c,e[10]=(o+s)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*s*2*u,e[15]=0,e},perspectiveNO:g,perspective:b,perspectiveZO:function(e,t,r,n,i){var s,o=1/Math[A(417)](t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(s=1/(n-i),e[10]=i*s,e[14]=i*n*s):(e[10]=-1,e[14]=-n),e},perspectiveFromFieldOfView:function(e,t,r,n){var i=A,s=Math.tan(t[i(415)]*Math.PI/180),o=Math[i(417)](t[i(406)]*Math.PI/180),a=Math[i(417)](t[i(421)]*Math.PI/180),c=Math[i(417)](t.rightDegrees*Math.PI/180),u=2/(a+c),l=2/(s+o);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-(a-c)*u*.5,e[9]=(s-o)*l*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e},orthoNO:S,ortho:I,orthoZO:function(e,t,r,n,i,s,o){var a=1/(t-r),c=1/(n-i),u=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=u,e[11]=0,e[12]=(t+r)*a,e[13]=(i+n)*c,e[14]=s*u,e[15]=1,e},lookAt:function(e,t,r,n){var i,s,o,a,u,l,d,h,p,v,y=A,_=t[0],g=t[1],b=t[2],w=n[0],S=n[1],I=n[2],E=r[0],k=r[1],C=r[2];return Math.abs(_-E)0&&(d*=p=1/Math[i(401)](p),h*=p,f*=p);var m=u*f-l*h,v=l*d-c*f,y=c*h-u*d;return(p=m*m+v*v+y*y)>0&&(m*=p=1/Math[i(401)](p),v*=p,y*=p),e[0]=m,e[1]=v,e[2]=y,e[3]=0,e[4]=h*y-f*v,e[5]=f*m-d*y,e[6]=d*v-h*m,e[7]=0,e[8]=d,e[9]=h,e[10]=f,e[11]=0,e[12]=s,e[13]=o,e[14]=a,e[15]=1,e},str:function(e){return A(420)+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},subtract:E,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var r=A,n=e[0],i=e[1],s=e[2],o=e[3],a=e[4],u=e[5],l=e[6],d=e[7],h=e[8],p=e[9],m=e[10],v=e[11],y=e[12],_=e[13],g=e[14],b=e[15],w=t[0],S=t[1],I=t[2],E=t[3],k=t[4],C=t[5],x=t[6],T=t[7],B=t[8],D=t[9],M=t[10],P=t[11],U=t[12],F=t[13],R=t[14],L=t[15];return Math.abs(n-w)<=f[r(407)]*Math[r(423)](1,Math[r(424)](n),Math.abs(w))&&Math[r(424)](i-S)<=f[r(407)]*Math[r(423)](1,Math.abs(i),Math[r(424)](S))&&Math[r(424)](s-I)<=c*Math[r(423)](1,Math[r(424)](s),Math[r(424)](I))&&Math.abs(o-E)<=c*Math[r(423)](1,Math.abs(o),Math[r(424)](E))&&Math.abs(a-k)<=c*Math.max(1,Math.abs(a),Math[r(424)](k))&&Math[r(424)](u-C)<=f[r(407)]*Math[r(423)](1,Math[r(424)](u),Math.abs(C))&&Math[r(424)](l-x)<=c*Math[r(423)](1,Math[r(424)](l),Math[r(424)](x))&&Math[r(424)](d-T)<=f[r(407)]*Math.max(1,Math[r(424)](d),Math[r(424)](T))&&Math[r(424)](h-B)<=f[r(407)]*Math.max(1,Math.abs(h),Math[r(424)](B))&&Math.abs(p-D)<=f[r(407)]*Math[r(423)](1,Math[r(424)](p),Math[r(424)](D))&&Math[r(424)](m-M)<=c*Math[r(423)](1,Math[r(424)](m),Math.abs(M))&&Math[r(424)](v-P)<=f[r(407)]*Math[r(423)](1,Math[r(424)](v),Math.abs(P))&&Math[r(424)](y-U)<=f[r(407)]*Math[r(423)](1,Math[r(424)](y),Math[r(424)](U))&&Math[r(424)](_-F)<=f[r(407)]*Math[r(423)](1,Math[r(424)](_),Math[r(424)](F))&&Math[r(424)](g-R)<=f[r(407)]*Math[r(423)](1,Math[r(424)](g),Math[r(424)](R))&&Math[r(424)](b-L)<=f[r(407)]*Math.max(1,Math.abs(b),Math.abs(L))},mul:k,sub:C});function T(){var e=z,t=new(f[e(258)])(3);return f[e(258)]!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function B(e){var t=z,r=e[0],n=e[1],i=e[2];return Math[t(245)](r,n,i)}function D(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function M(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function P(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function U(e,t){var r=z,n=t[0]-e[0],i=t[1]-e[1],s=t[2]-e[2];return Math[r(245)](n,i,s)}function F(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}function R(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function L(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function O(){var e=["121WtMMss","70sFlDNy","min","abs","round","27053ugXSTz","EPSILON","ceil","vec3(","hypot","10191168Etdbwh","8070310GoqTaw","sin","acos","1015770qGISHh","cos","9zymdEu","sqrt","1525112jORBcC","134WZjZyC","275355PyDRop","length","ARRAY_TYPE","floor","RANDOM","77tHwvAv","3531036ITLpSi","max"];return(O=function(){return e})()}function z(e,t){var r=O();return(z=function(e,t){return r[e-=231]})(e,t)}!function(e,t){for(var r=z,n=e();;)try{if(959480===-parseInt(r(241))/1*(-parseInt(r(255))/2)+-parseInt(r(252))/3*(-parseInt(r(254))/4)+parseInt(r(247))/5+parseInt(r(250))/6*(-parseInt(r(233))/7)+parseInt(r(246))/8+-parseInt(r(256))/9*(-parseInt(r(237))/10)+-parseInt(r(236))/11*(parseInt(r(234))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(O);var N,H=D,V=M,W=P,j=U,G=F,q=B,$=R,Y=(N=T(),function(e,t,r,n,i,s){var o,a,c=z;for(!t&&(t=3),!r&&(r=0),a=n?Math[c(238)](n*t+r,e[c(257)]):e[c(257)],o=r;o0&&(s=1/Math.sqrt(s)),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e},dot:L,cross:function(e,t,r){var n=t[0],i=t[1],s=t[2],o=r[0],a=r[1],c=r[2];return e[0]=i*c-s*a,e[1]=s*o-n*c,e[2]=n*a-i*o,e},lerp:function(e,t,r,n){var i=t[0],s=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=s+n*(r[1]-s),e[2]=o+n*(r[2]-o),e},hermite:function(e,t,r,n,i,s){var o=s*s,a=o*(2*s-3)+1,c=o*(s-2)+s,u=o*(s-1),l=o*(3-2*s);return e[0]=t[0]*a+r[0]*c+n[0]*u+i[0]*l,e[1]=t[1]*a+r[1]*c+n[1]*u+i[1]*l,e[2]=t[2]*a+r[2]*c+n[2]*u+i[2]*l,e},bezier:function(e,t,r,n,i,s){var o=1-s,a=o*o,c=s*s,u=a*o,l=3*s*a,d=3*c*o,h=c*s;return e[0]=t[0]*u+r[0]*l+n[0]*d+i[0]*h,e[1]=t[1]*u+r[1]*l+n[1]*d+i[1]*h,e[2]=t[2]*u+r[2]*l+n[2]*d+i[2]*h,e},random:function(e,t){var r=z;t=t||1;var n=2*f[r(232)]()*Math.PI,i=2*f[r(232)]()-1,s=Math[r(253)](1-i*i)*t;return e[0]=Math[r(251)](n)*s,e[1]=Math[r(248)](n)*s,e[2]=i*t,e},transformMat4:function(e,t,r){var n=t[0],i=t[1],s=t[2],o=r[3]*n+r[7]*i+r[11]*s+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*s+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*s+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*s+r[14])/o,e},transformMat3:function(e,t,r){var n=t[0],i=t[1],s=t[2];return e[0]=n*r[0]+i*r[3]+s*r[6],e[1]=n*r[1]+i*r[4]+s*r[7],e[2]=n*r[2]+i*r[5]+s*r[8],e},transformQuat:function(e,t,r){var n=r[0],i=r[1],s=r[2],o=r[3],a=t[0],c=t[1],u=t[2],l=i*u-s*c,d=s*a-n*u,h=n*c-i*a,f=i*h-s*d,p=s*l-n*h,m=n*d-i*l,v=2*o;return l*=v,d*=v,h*=v,f*=2,p*=2,m*=2,e[0]=a+l+f,e[1]=c+d+p,e[2]=u+h+m,e},rotateX:function(e,t,r,n){var i=z,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[0],o[1]=s[1]*Math[i(251)](n)-s[2]*Math[i(248)](n),o[2]=s[1]*Math.sin(n)+s[2]*Math[i(251)](n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateY:function(e,t,r,n){var i=z,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[2]*Math[i(248)](n)+s[0]*Math[i(251)](n),o[1]=s[1],o[2]=s[2]*Math[i(251)](n)-s[0]*Math[i(248)](n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateZ:function(e,t,r,n){var i=z,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[0]*Math[i(251)](n)-s[1]*Math[i(248)](n),o[1]=s[0]*Math[i(248)](n)+s[1]*Math[i(251)](n),o[2]=s[2],e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},angle:function(e,t){var r=z,n=e[0],i=e[1],s=e[2],o=t[0],a=t[1],c=t[2],u=Math[r(253)](n*n+i*i+s*s)*Math[r(253)](o*o+a*a+c*c),l=u&&L(e,t)/u;return Math[r(249)](Math.min(Math[r(235)](l,-1),1))},zero:function(e){return e[0]=0,e[1]=0,e[2]=0,e},str:function(e){return z(244)+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},equals:function(e,t){var r=z,n=e[0],i=e[1],s=e[2],o=t[0],a=t[1],u=t[2];return Math[r(239)](n-o)<=c*Math[r(235)](1,Math[r(239)](n),Math.abs(o))&&Math[r(239)](i-a)<=c*Math[r(235)](1,Math[r(239)](i),Math[r(239)](a))&&Math[r(239)](s-u)<=f[r(242)]*Math[r(235)](1,Math[r(239)](s),Math.abs(u))},sub:H,mul:V,div:W,dist:j,sqrDist:G,len:q,sqrLen:$,forEach:Y});function J(e,t){var r=X();return(J=function(e,t){return r[e-=213]})(e,t)}function X(){var e=["2laTiRH","377275OgnWHn","1675422BwWSBp","11370uIMlyJ","12782bRPTKr","13017939jcwKcO","193008FdatGF","1419306yAvGYl","3141OWCpxR","664tTyDWr","16pVUZKv"];return(X=function(){return e})()}function Z(e,t){const r=ee();return(Z=function(e,t){return r[e-=400]})(e,t)}!function(e,t){for(var r=J,n=e();;)try{if(334115===-parseInt(r(213))/1*(parseInt(r(219))/2)+parseInt(r(220))/3+-parseInt(r(223))/4*(parseInt(r(214))/5)+-parseInt(r(215))/6+-parseInt(r(217))/7*(parseInt(r(222))/8)+parseInt(r(221))/9*(-parseInt(r(216))/10)+parseInt(r(218))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(X),function(e,t){const r=Z,n=e();for(;;)try{if(983263===parseInt(r(490))/1*(-parseInt(r(489))/2)+-parseInt(r(458))/3+parseInt(r(424))/4*(-parseInt(r(448))/5)+-parseInt(r(464))/6*(parseInt(r(428))/7)+parseInt(r(483))/8+-parseInt(r(478))/9*(parseInt(r(421))/10)+-parseInt(r(403))/11*(-parseInt(r(427))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ee);var Q=(e,t)=>{const r=Z,n=r(470);t&&e.pixelStorei(e[r(462)],1);const i=function(){const t=r,i=h(e.VERTEX_SHADER,"\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n "),s=h(e.FRAGMENT_SHADER,n),o=e.createProgram();return e[t(402)](o,i),e.attachShader(o,s),e[t(466)](o),e[t(420)](o,e[t(411)])?o:(console[t(435)](t(430)+e[t(444)](o)),null)}();let s={program:i,attribLocations:{vertexPosition:e[r(476)](i,"aVertexPosition"),texturePosition:e[r(476)](i,"aTexturePosition")},uniformLocations:{projectionMatrix:e.getUniformLocation(i,r(440)),modelMatrix:e[r(480)](i,r(407)),viewMatrix:e[r(480)](i,r(461)),rgbatexture:e[r(480)](i,r(415)),ytexture:e[r(480)](i,r(468)),utexture:e[r(480)](i,"uTexture"),vtexture:e[r(480)](i,r(484)),isyuv:e[r(480)](i,r(472))}},o=function(){const t=r,n=e[t(454)]();e[t(488)](e[t(456)],n);e[t(465)](e.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e[t(401)]);var i=[];i=i.concat([0,1],[1,1],[1,0],[0,0]);const s=e[t(454)]();e[t(488)](e[t(456)],s),e[t(465)](e[t(456)],new Float32Array(i),e[t(401)]);const o=e[t(454)]();e.bindBuffer(e[t(452)],o);return e[t(465)](e[t(452)],new Uint16Array([0,1,2,0,2,3]),e[t(401)]),{position:n,texPosition:s,indices:o}}(),a=d(),c=d(),u=d(),l=d();function d(){const t=r;let n=e.createTexture();return e[t(408)](e.TEXTURE_2D,n),e[t(443)](e[t(477)],e.TEXTURE_MAG_FILTER,e.LINEAR),e[t(443)](e[t(477)],e[t(439)],e[t(406)]),e[t(443)](e[t(477)],e[t(410)],e[t(487)]),e[t(443)](e[t(477)],e[t(404)],e[t(487)]),n}function h(t,n){const i=r,s=e[i(431)](t);return e[i(442)](s,n),e.compileShader(s),e[i(479)](s,e[i(471)])?s:(console[i(435)](i(445)+e.getShaderInfoLog(s)),e[i(422)](s),null)}function f(t,n){const i=r;e[i(436)](0,0,t,n),e.clearColor(0,0,0,0),e[i(405)](1),e[i(446)](e[i(469)]),e[i(441)](e.LEQUAL),e.clear(e[i(467)]|e[i(413)]);const a=p();x[i(412)](a,-1,1,-1,1,.1,100);const d=x[i(417)]();m(d);const h=p();x[i(459)](h,K[i(426)](0,0,0),K[i(426)](0,0,-1),K[i(426)](0,1,0));{const t=3,r=e[i(434)],n=!1,a=0,c=0;e[i(488)](e[i(456)],o[i(473)]),e[i(450)](s[i(449)][i(463)],t,r,n,a,c),e[i(437)](s[i(449)][i(463)])}{const t=2,r=e[i(434)],n=!1,a=0,c=0;e[i(488)](e[i(456)],o[i(400)]),e[i(450)](s.attribLocations[i(481)],t,r,n,a,c),e[i(437)](s.attribLocations.texturePosition)}e[i(451)](e[i(482)]+3),e[i(408)](e[i(477)],c),e[i(451)](e[i(482)]+4),e.bindTexture(e[i(477)],u),e.activeTexture(e.TEXTURE0+5),e.bindTexture(e[i(477)],l),e[i(488)](e.ELEMENT_ARRAY_BUFFER,o.indices),e.useProgram(s[i(460)]),e[i(485)](s[i(409)].projectionMatrix,!1,a),e.uniformMatrix4fv(s[i(409)][i(419)],!1,d),e[i(485)](s.uniformLocations.viewMatrix,!1,h),e[i(432)](s.uniformLocations[i(453)],2),e.uniform1i(s[i(409)][i(475)],3),e[i(432)](s[i(409)][i(447)],4),e[i(432)](s[i(409)][i(457)],5),e.uniform1i(s[i(409)].isyuv,1);{const t=6,r=e.UNSIGNED_SHORT,n=0;e[i(438)](e[i(455)],t,r,n)}}return{render:function(t,n,i,s,o){const a=r;e[a(451)](e.TEXTURE0),e[a(408)](e[a(477)],c),e.texImage2D(e[a(477)],0,e[a(423)],t,n,0,e[a(423)],e[a(429)],i),e[a(451)](e[a(416)]),e.bindTexture(e[a(477)],u),e[a(414)](e[a(477)],0,e[a(423)],t/2,n/2,0,e[a(423)],e[a(429)],s),e.activeTexture(e[a(425)]),e[a(408)](e.TEXTURE_2D,l),e[a(414)](e[a(477)],0,e[a(423)],t/2,n/2,0,e.LUMINANCE,e[a(429)],o),f(t,n)},renderYUV:function(t,n,i){const s=r;let o=i[s(418)](0,t*n),a=i.slice(t*n,t*n*5/4),d=i[s(418)](t*n*5/4,t*n*3/2);e[s(451)](e[s(482)]),e[s(408)](e.TEXTURE_2D,c),e[s(414)](e[s(477)],0,e[s(423)],t,n,0,e[s(423)],e[s(429)],o),e[s(451)](e[s(416)]),e.bindTexture(e[s(477)],u),e[s(414)](e.TEXTURE_2D,0,e[s(423)],t/2,n/2,0,e[s(423)],e[s(429)],a),e.activeTexture(e[s(425)]),e[s(408)](e[s(477)],l),e[s(414)](e.TEXTURE_2D,0,e[s(423)],t/2,n/2,0,e[s(423)],e.UNSIGNED_BYTE,d),f(t,n)},destroy:function(){const t=r;e[t(474)](s[t(460)]),e[t(486)](o[t(473)]),e.deleteBuffer(o[t(400)]),e[t(486)](o.indices),e[t(433)](a),e[t(433)](c),e[t(433)](u),e[t(433)](l),s=null,o=null,a=null,c=null,u=null,l=null}}};function ee(){const e=["depthFunc","shaderSource","texParameteri","getProgramInfoLog","An error occurred compiling the shaders: ","enable","utexture","133690rZzkgy","attribLocations","vertexAttribPointer","activeTexture","ELEMENT_ARRAY_BUFFER","rgbatexture","createBuffer","TRIANGLES","ARRAY_BUFFER","vtexture","1238100uhzvkX","lookAt","program","uViewMatrix","UNPACK_ALIGNMENT","vertexPosition","5295480DvrPEi","bufferData","linkProgram","COLOR_BUFFER_BIT","yTexture","DEPTH_TEST","\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n ","COMPILE_STATUS","isyuv","position","deleteProgram","ytexture","getAttribLocation","TEXTURE_2D","2004165yWOcpl","getShaderParameter","getUniformLocation","texturePosition","TEXTURE0","13771408yORaZP","vTexture","uniformMatrix4fv","deleteBuffer","CLAMP_TO_EDGE","bindBuffer","43118YCJIls","81jfOxEh","texPosition","STATIC_DRAW","attachShader","1221LKRVfS","TEXTURE_WRAP_T","clearDepth","LINEAR","uModelMatrix","bindTexture","uniformLocations","TEXTURE_WRAP_S","LINK_STATUS","ortho","DEPTH_BUFFER_BIT","texImage2D","rgbaTexture","TEXTURE1","create","slice","modelMatrix","getProgramParameter","50slfBJi","deleteShader","LUMINANCE","40siFqct","TEXTURE2","fromValues","398292zUlErx","7BjoohI","UNSIGNED_BYTE","Unable to initialize the shader program: ","createShader","uniform1i","deleteTexture","FLOAT","log","viewport","enableVertexAttribArray","drawElements","TEXTURE_MIN_FILTER","uProjectionMatrix"];return(ee=function(){return e})()}const te=ve;!function(e,t){const r=ve,n=e();for(;;)try{if(669642===-parseInt(r(722))/1+-parseInt(r(545))/2*(-parseInt(r(503))/3)+-parseInt(r(567))/4*(parseInt(r(619))/5)+-parseInt(r(682))/6*(-parseInt(r(385))/7)+parseInt(r(638))/8*(parseInt(r(754))/9)+-parseInt(r(287))/10+parseInt(r(419))/11*(-parseInt(r(713))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Me);const re={websocket:1,fetch:2,hls:3,webrtc:4,webTransport:5,aliyunRtc:6,ts:7};te(698),te(730),te(523),te(336);const ne={fetch:te(698),hls:"hls",websocket:"websocket",webrtc:"webrtc",webTransport:"webTransport",worker:te(671),aliyunRtc:"aliyunRtc",mp4:"mp4"},ie={player:"player",playerAudio:te(708),playbackTF:te(578),talk:te(302),playVod:"playVod"},se={mp4:te(278),webm:te(383),flv:te(452),mov:"mov"},oe={flv:te(452),m7s:te(612),hls:te(576),webrtc:te(730),webTransport:"webTransport",nakedFlow:te(608),fmp4:te(635),mpeg4:"mpeg4",aliyunRtc:te(336),ts:"ts",g711:"g711",pcm:te(585)};te(416),te(442),te(654),te(377),te(456),te(350);const ae={mse:"mse",wcs:"wcs",offscreen:te(436),wasm:"wasm",simd:te(693),mt:"mt",webrtc:te(730),hls:te(576),aliyunRtc:te(336)},ce=(te(668),"video"),ue={debug:"debug",warn:te(342)},le={normal:te(276),simple:te(534)},de={normal:te(276),small:te(397)},he=te(319),fe="20251201",pe=36e5,me=4080;function ve(e,t){const r=Me();return(ve=function(e,t){return r[e-=263]})(e,t)}const ye=12;te(445),te(632),te(346);const _e={playIsNotPauseOrUrlIsNull:te(634),webglAlignmentError:"Webgl 渲染失败",webglContextLostError:te(271),mediaSourceH265NotSupport:te(418),mseSourceBufferFull:te(759),mediaSourceAppendBufferError:te(695),mseSourceBufferError:te(547),mseAddSourceBufferError:te(695),mseWorkerAddSourceBufferError:"初始化解码器失败",mediaSourceDecoderConfigurationError:te(695),mediaSourceTsIsMaxDiff:te(753),mseWidthOrHeightChange:te(753),mediaSourceAudioG711NotSupport:te(678),mediaSourceAudioInitTimeout:te(384),mediaSourceAudioNoDataTimeout:te(289),mediaSourceUseCanvasRenderPlayFailed:"MediaSource解码使用canvas渲染失败",mediaSourceBufferedIsZeroError:te(753),webcodecsH265NotSupport:te(418),webcodecsUnsupportedConfigurationError:te(695),webcodecsDecodeConfigureError:te(695),webcodecsDecodeError:"解码失败",webcodecsAudioInitTimeout:te(384),webcodecsAudioNoDataTimeout:te(289),wcsWidthOrHeightChange:te(547),wasmDecodeError:"解码失败",simdDecodeError:"解码失败",wasmWidthOrHeightChange:"流异常",wasmUseVideoRenderError:te(733),videoElementPlayingFailed:"video自动渲染失败",simdH264DecodeVideoWidthIsTooLarge:"不支持该分辨率的视频",networkDelayTimeout:te(366),fetchError:te(509),streamEnd:te(264),websocket1006Error:"流异常结束",websocketError:te(509),webrtcError:te(509),hlsError:te(509),decoderWorkerInitError:te(536),decoderWorkerWasmError:te(652),videoElementPlayingFailedForWebrtc:"video自动渲染失败",videoInfoError:"解析视频分辨率失败",webrtcStreamH265:te(457),delayTimeout:te(552),loadingTimeout:te(311),loadingTimeoutRetryEnd:"加载超时重播失败",delayTimeoutRetryEnd:"播放超时重播失败",flvDemuxBufferSizeTooLarge:"FLV待解封装buffer过大",audioChannelError:"音频通道错误",aliyunRtcError:te(509),mseWaitVideoCanplayTimeout:te(753),initDecoderWorkerTimeout:te(663)},ge={playType:ie[te(441)],videoBuffer:1e3,videoBufferDelay:1e3,networkDelay:1e4,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isFmp4:!1,isWebrtc:!1,isWebrtcForZLM:!1,isWebrtcForSRS:!1,webrtcForSRSBySDK:!1,isWebrtcForOthers:!1,isNakedFlow:!1,isMpeg4:!1,isAliyunRtc:!1,isTs:!1,debug:!1,debugLevel:ue[te(342)],debugUuid:"",isMulti:!0,multiIndex:-1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,pageVisibilityHiddenTimeout:300,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,heartTimeoutReplayUseLastFrameShow:!0,replayUseLastFrameShow:!0,replayShowLoadingIcon:!1,supportDblclickFullscreen:!1,showBandwidth:!1,showPerformance:!1,mseCorrectTimeDuration:20,mseCorrectAudioTimeDuration:20,keepScreenOn:!0,isNotMute:!1,muted:!0,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1,ptz:!1,quality:!1,zoom:!1,close:!1,scale:!1,performance:!1,logSave:!1,aiFace:!1,aiObject:!1,aiOcclusion:!1,fullscreenFn:null,fullscreenExitFn:null,screenshotFn:null,playFn:null,pauseFn:null,recordFn:null,recordStopFn:null},extendOperateBtns:[],contextmenuBtns:[],watermarkConfig:{},controlAutoHide:!1,controlAutoHideDelayTime:5,hasControl:!1,controlSize:de.normal,loadingIcon:!0,loadingIconStyle:{},loadingText:"",background:"",poster:"",backgroundLoadingShow:!0,loadingBackground:"",loadingBackgroundWidth:0,loadingBackgroundHeight:0,decoder:te(449),decoderOld:te(604),decoderAudio:te(375),decoderHard:te(626),decoderHardNotWasm:"decoder-pro-hard-not-wasm.js",wasmMp4RecorderDecoder:te(712),decoderWASM:"",isDecoderUseCDN:!1,url:"",rotate:0,mirrorRotate:"none",aspectRatio:te(498),playbackConfig:{playList:[],fps:"",autoCalcFps:!0,showControl:!0,controlType:le[te(276)],duration:0,startTime:"",showRateBtn:!1,rateConfig:[],showPrecision:"",showPrecisionBtn:!0,isCacheBeforeDecodeForFpsRender:!1,uiUsePlaybackPause:!1,isPlaybackPauseClearCache:!0,isUseFpsRender:!1,isUseLocalCalculateTime:!1,localOneFrameTimestamp:40,supportWheel:!1,useWCS:!1,useMSE:!1,useSIMD:!0},qualityConfig:[],defaultStreamQuality:"",scaleConfig:["拉伸","缩放","正常"],forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:re[te(698)],demuxType:oe[te(452)],useWasm:!1,useOldWasm:!1,useMSE:!1,useWCS:!1,useSIMD:!0,isFFmpegSIMD:!1,useMThreading:!1,preferredHardDecode:!1,wcsUseVideoRender:!0,wcsUseWebgl2Render:!1,wasmUseVideoRender:!0,mseUseCanvasRender:!1,hlsUseCanvasRender:!1,webrtcUseCanvasRender:!1,useOffscreen:!1,useWebGPU:!1,useWebCanvas:!1,mseDecodeErrorReplay:!0,wcsDecodeErrorReplay:!0,wasmDecodeErrorReplay:!0,simdDecodeErrorReplay:!0,simdDecodeErrorReplayType:ae[te(631)],autoWasm:!0,decoderErrorAutoWasm:!1,hardDecodingNotSupportAutoWasm:!0,webglAlignmentErrorReplay:!0,webglContextLostErrorReplay:!0,openWebglAlignment:!1,syncAudioAndVideo:!0,syncAudioAndVideoDiff:400,playbackDelayTime:1e3,playbackFps:25,playVodFps:25,playbackForwardMaxRateDecodeIFrame:4,playbackCurrentTimeMove:!0,useVideoRender:!0,useCanvasRender:!1,videoRenderType:"",networkDelayTimeoutReplay:!1,recordType:se[te(278)],checkFirstIFrame:!0,nakedFlowFps:25,audioEngine:null,isShowRecordingUI:!0,isShowZoomingUI:!0,useFaceDetector:!1,useObjectDetector:!1,useImageDetector:!1,useOcclusionDetector:!1,ptzPositionConfig:{},ptzShowType:te(531),ptzClickType:{click:"click",mouseDownAndUp:"mouseDownAndUp"}[te(766)],ptzStopEmitDelay:.3,ptzZoomShow:!1,ptzApertureShow:!1,ptzFocusShow:!1,ptzMoreArrowShow:!1,ptzCruiseShow:!1,ptzFogShow:!1,ptzWiperShow:!1,ptzSupportDraggable:!1,weiXinInAndroidAudioBufferSize:4800,isCryptoAudio:!1,isM7sCrypto:!1,isSm4Crypto:!1,isSm4CryptoH265V2:!1,isXorCrypto:!1,sm4CryptoKey:"",m7sCryptoKey:"",xorCryptoKey:"",cryptoKey:"",cryptoIV:"",cryptoKeyUrl:"",listenWindowResizeAuoResize:!0,orientationChangeResize:!1,useWebFullScreen:!1,ptsMaxDiff:3600,aiFaceDetectLevel:2,aiFaceDetectWidth:240,aiFaceDetectEmitBase64:!1,aiFaceDetectShowRect:!0,aiFaceDetectInterval:1e3,aiFaceDetectRectConfig:{},aiObjectDetectLevel:2,aiObjectDetectWidth:240,aiObjectDetectShowRect:!0,aiObjectDetectInterval:1e3,aiObjectDetectRectConfig:{},aiObjectDetectTarget:"",aiOcclusionDetectInterval:1e3,aiImageDetectDrop:!1,aiImageDetectActive:!1,videoRenderSupportScale:!0,mediaSourceTsIsMaxDiffReplay:!0,controlHtml:"",isH265:!1,isWebrtcH265:!1,supportLockScreenPlayAudio:!0,supportHls265:!0,hls265ForceFixLargeGap:!0,isEmitSEI:!1,pauseAndNextPlayUseLastFrameShow:!1,demuxUseWorker:!0,playFailedAndReplay:!0,showMessageConfig:_e,videoElementPlayingFailedReplay:!0,mp4RecordUseWasm:!0,mseAutoCleanupSourceBuffer:!0,mseAutoCleanupMaxBackwardDuration:30,mseAutoCleanupMinBackwardDuration:10,widthOrHeightChangeReplay:!0,simdH264DecodeVideoWidthIsTooLargeReplay:!0,mediaSourceAudioG711NotSupportReplay:!0,mediaSourceAudioInitTimeoutReplay:!0,mediaSourceAudioNoDataTimeoutReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplayType:ce,webcodecsAudioInitTimeoutReplay:!0,webcodecsAudioNoDataTimeoutReplay:!0,widthOrHeightChangeReplayDelayTime:0,ghostWatermarkConfig:{on:5,off:5,content:"",fontSize:12,color:"white",opacity:.15,speed:.2},dynamicWatermarkConfig:{content:"",speed:.2,fontSize:12,color:"white",opacity:.15},isDropSameTimestampGop:!1,mseDecodeAudio:!0,wcsDecodeAudio:!0,nakedFlowH265DemuxUseNew:!0,nakedFlowDemuxUseNew:!0,extendDomConfig:{html:"",showBeforePlay:!1,showAfterLoading:!0},disableContextmenu:!1,mseDecoderUseWorker:!0,openMemoryLog:!1,mainThreadFetchUseWorker:!0,playFailedAndPausedShowPlayBtn:!0,mseCorrectionTimestamp:!0,flvDemuxBufferSizeTooLargeReplay:!1,flvDemuxBufferSizeTooLargeEmitFailed:!1,flvDemuxBufferSizeMaxLarge:1048576,isCheckInView:!1,hiddenControl:!1,androidMobileFullscreenRotate:!0,disableModule:{ptz:!1,record:!1,zoom:!1,watermark:!1,playback:!1},recordWebMSupportSeek:!1,wasmPlayAudioUseVideoRender:!1,mseWaitVideoCanplayTimeout:6,mseWaitVideoCanplayAutoWasm:!0,zoomMaxScale:5,zoomSupportGestureInMobile:!1,zoomSupportGestureInMobileSpeed:.2,drawingRectColor:te(464),drawingRectLineWidth:1,drawingRectEndRemoveDom:!0,videoSEISyncPtsDiff:.2,initShowPlayBtn:!1,playbackCheckStreamEnd:!0,autoUseSystemFullScreen:!0,playVodConfig:{showRateBtn:!1,rateConfig:[],useWCS:!1,useMSE:!0,useSIMD:!0,startTime:null},playVodForwardMaxRateDecodeIFrame:8,playVodEndedAndAutoReplay:!1,playVodEndedAndShowPlayBtn:!0,hotKeyVolumeStep:.05,hotKeySeekStep:5,websocketOpenTimeout:8,i18n:{},screenshotUseHighQuality:!1,requestAnimationFrameMaxDiff:800,isUseFileProtocol:!1};te(570),te(437),te(402),te(692),te(649),te(520),te(374),te(424),te(592),te(549),te(335),te(748),te(577),te(535),te(596),te(704),te(691),te(633),te(338),te(368),te(600),te(593),te(732),te(392),te(723),te(431),te(435);const be={init:te(365),initVideo:te(724),render:te(486),playAudio:te(390),initAudio:te(406),kBps:te(700),decode:te(533),audioCode:te(372),audioNalu:"audioNalu",audioAACSequenceHeader:"audioAACSequenceHeader",videoCode:te(331),videoCodec:te(408),videoNalu:te(760),videoPayload:te(359),audioPayload:te(313),wasmError:"wasmError",workerFetch:te(294),iframeIntervalTs:te(653),isDropping:"isDropping",workerEnd:"workerEnd",networkDelay:te(396),playbackStreamVideoFps:te(478),wasmWidthOrHeightChange:te(460),simdDecodeError:te(301),simdH264DecodeVideoWidthIsTooLarge:te(410),websocketOpen:"websocketOpen",websocketStringMsg:te(425),closeEnd:te(326),tempStream:te(347),videoSEI:"videoSEI",flvScriptData:te(394),aacSequenceHeader:te(272),videoSequenceHeader:te(598),flvBufferData:te(674),checkFirstIFrame:te(337),mseHandle:te(641),mseFirstRenderTime:te(324),mseError:te(386),notSupportNewWasm:"notSupportNewWasm",failedToAsynchronouslyPrepareWasm:"failedToAsynchronouslyPrepareWasm"},we={audio:1,video:2},Se={audio:8,video:9,scriptData:18},Ie={init:te(365),decode:"decode",audioDecode:"audioDecode",videoDecode:te(613),initAudioCodec:te(656),initVideoCodec:te(279),close:te(345),updateConfig:te(749),resetDecode:te(407),clearBuffer:te(559),resetAudioDecode:te(565),resetVideoDecode:te(356),fetchStream:te(574),sendWsMessage:te(610),mseUpdateVideoTimestamp:te(309),playbackIsPause:te(740)};te(698),te(696),te(666),te(364),te(717),te(363),te(617),te(698),te(499),te(696),te(364),te(360),te(295),te(425),te(365);const Ae={fullscreen:te(382),fullScreenByStart:te(417),webFullscreen:te(546),decoderWorkerInit:te(524),play:te(699),playing:"playing",pause:te(615),mute:te(414),load:te(680),loading:te(767),zooming:te(455),drawingRect:"drawingRect",drawingRectInfo:"drawingRectInfo",videoInfo:te(458),timeUpdate:te(540),audioInfo:te(275),log:te(467),error:te(518),kBps:"kBps",timeout:te(431),delayTimeout:"delayTimeout",delayTimeoutRetryEnd:te(285),loadingTimeout:te(511),loadingTimeoutRetryEnd:te(703),stats:te(679),performance:te(642),videoSmooth:te(422),faceDetectActive:te(683),objectDetectActive:"objectDetectActive",occlusionDetectActive:te(746),imageDetectActive:"imageDetectActive",record:te(621),recording:te(330),recordingTimestamp:"recordingTimestamp",recordStart:te(284),recordEnd:"recordEnd",recordCreateError:te(673),recordBlob:te(530),recordCancel:te(609),buffer:te(364),videoFrame:te(581),videoSEI:te(427),videoSEISyncPts:te(434),start:te(605),metadata:te(282),resize:te(305),volumechange:te(389),volume:te(496),destroy:te(696),beforeDestroy:"beforeDestroy",streamEnd:te(761),streamRate:"streamRate",streamAbps:te(298),streamVbps:te(443),streamDts:te(494),streamSuccess:te(461),streamMessage:te(677),streamError:"streamError",streamStats:"streamStats",streamEndInner:te(620),mseSourceOpen:te(270),mseSourceClose:te(413),mseSourceended:te(614),mseSourceStartStreaming:te(637),mseSourceEndStreaming:te(706),mseSourceBufferError:te(358),mseAddSourceBufferError:te(647),mseWorkerAddSourceBufferError:te(381),mseSourceBufferBusy:te(584),mseSourceBufferFull:te(322),videoWaiting:te(571),videoTimeUpdate:te(685),videoSyncAudio:te(367),playToRenderTimes:"playToRenderTimes",playbackTime:te(628),playbackTimestamp:te(718),playbackTimeScroll:te(299),playbackPrecision:te(349),playbackShowPrecisionChange:te(630),playbackJustTime:te(352),playbackStats:te(573),playbackSeek:te(293),playbackPause:"playbackPause",playbackPauseOrResume:te(513),playbackRateChange:te(714),playbackPreRateChange:"playbackPreRateChange",playbackEndInner:te(721),playbackEnd:te(348),playVodStats:"playVodStats",playVodPause:te(741),playVodPauseOrResume:te(329),playVodRateChange:te(662),playVodTime:te(731),playVodTimeCache:te(603),playVodSeek:te(362),playVodSeekEnd:te(751),playVodVideoSeekingByMse:te(575),playVodVideoSeekedByMse:te(579),playVodCanplay:"playVodCanplay",playVodWaiting:te(665),playVodEndedAndReplay:te(716),playVodEnded:te(687),ptz:te(475),streamQualityChange:"streamQualityChange",visibilityChange:te(670),netBuf:te(745),close:te(345),networkDelayTimeout:te(447),togglePerformancePanel:te(747),viewResizeChange:te(421),flvDemuxBufferSizeTooLarge:te(459),talkGetUserMediaSuccess:"talkGetUserMediaSuccess",talkGetUserMediaFail:te(277),talkGetUserMediaTimeout:te(660),talkStreamStart:te(373),talkStreamOpen:te(401),talkStreamClose:te(739),talkStreamError:te(332),talkStreamInactive:te(512),talkStreamMsg:te(465),webrtcDisconnect:te(321),webrtcFailed:te(527),webrtcClosed:te(444),webrtcChecking:te(487),webrtcConnected:te(370),webrtcCompleted:"webrtcCompleted",webrtcOnConnectionStateChange:te(544),webrtcOnIceConnectionStateChange:te(451),crashLog:te(369),focus:te(316),blur:te(477),inView:te(590),visibilityHiddenTimeout:te(508),websocketOpen:te(295),websocketClose:te(360),websocketError:te(423),websocketStringMsg:"websocketStringMsg",aiObjectDetectorInfo:te(629),aiFaceDetectorInfo:te(764),aiOcclusionDetectResult:te(280),aiImageDetectResult:te(607),playFailedAndPaused:te(622),audioResumeState:te(709),webrtcStreamH265:te(474),flvMetaData:te(405),talkFailedAndStop:"talkFailedAndStop",removeLoadingBgImage:te(705),memoryLog:te(517),downloadMemoryLog:te(650),pressureObserverCpu:te(334),currentPts:te(429),online:te(488),offline:te(318),networkState:te(479),clickInitPlayer:"clickInitPlayer"};te(680),te(540),te(458),te(275),te(518),te(700),te(605),te(431),te(511),te(703),te(542),te(285),te(440),te(546),te(699),te(615),te(414),te(679),te(642),te(473),te(284),te(553),te(530),te(609),te(293),te(573),te(718),te(513),te(484),te(714),te(348),te(329),te(662),te(751),te(475),te(669),te(369),te(477),te(508),te(670),te(295),te(425),te(447),te(629),te(764),te(607),te(761),te(434),te(405),te(451),te(479),te(273),te(636),te(512),te(660),te(750),te(465),te(680),te(540),te(518),te(700),te(605),te(431),te(511),te(703),te(542),te(699),te(615),te(679),te(667),te(369),te(295),te(360),te(622),te(709);const Ee={talkStreamError:Ae.talkStreamError,talkStreamClose:Ae[te(739)]},ke={playError:te(623),fetchError:te(717),fetchErrorWorker:te(363),websocketError:te(423),websocketOpenTimeout:"websocketOpenTimeout",webcodecsH265NotSupport:"webcodecsH265NotSupport",webcodecsDecodeError:te(539),webcodecsUnsupportedConfigurationError:te(300),webcodecsDecodeConfigureError:te(483),webcodecsAudioInitTimeout:"webcodecsAudioInitTimeout",webcodecsAudioNoDataTimeout:"webcodecsAudioNoDataTimeout",mediaSourceH265NotSupport:te(495),mediaSourceAudioG711NotSupport:te(354),mediaSourceAudioInitTimeout:te(376),mediaSourceAudioNoDataTimeout:te(640),mediaSourceDecoderConfigurationError:te(684),mediaSourceFull:Ae[te(322)],mseSourceBufferError:Ae.mseSourceBufferError,mseAddSourceBufferError:Ae[te(647)],mseWorkerAddSourceBufferError:Ae[te(381)],mediaSourceAppendBufferError:te(426),mediaSourceTsIsMaxDiff:te(707),mediaSourceUseCanvasRenderPlayFailed:te(420),mediaSourceBufferedIsZeroError:"mediaSourceBufferedIsZeroError",wasmDecodeError:te(500),wasmUseVideoRenderError:te(599),simdH264DecodeVideoWidthIsTooLarge:"simdH264DecodeVideoWidthIsTooLarge",simdDecodeError:"simdDecodeError",hlsError:te(719),webrtcError:"webrtcError",webrtcClosed:Ae[te(444)],webrtcIceCandidateError:"webrtcIceCandidateError",webglAlignmentError:te(339),wasmWidthOrHeightChange:te(460),mseWidthOrHeightChange:"mseWidthOrHeightChange",wcsWidthOrHeightChange:te(481),widthOrHeightChange:te(286),tallWebsocketClosedByError:te(727),flvDemuxBufferSizeTooLarge:Ae.flvDemuxBufferSizeTooLarge,audioChannelError:"audioChannelError",webglContextLostError:te(588),videoElementPlayingFailed:te(657),videoElementPlayingFailedForWebrtc:te(327),decoderWorkerInitError:te(752),decoderWorkerWasmError:te(310),videoInfoError:"videoInfoError",streamEnd:Ae[te(761)],websocket1006Error:"websocket1006Error",delayTimeout:Ae[te(542)],loadingTimeout:Ae[te(511)],networkDelayTimeout:Ae.networkDelayTimeout,fullscreenError:"fullscreenError",aliyunRtcError:te(661),mseWaitVideoCanplayTimeout:"mseWaitVideoCanplayTimeout",initDecoderWorkerTimeout:te(694),notSupportNewWasm:te(526),failedToAsynchronouslyPrepareWasm:te(690),playVodMp4Error:te(404),mp4Error:te(711),...Ee},Ce={notConnect:te(686),open:"open",close:te(345),error:te(518)},xe={connecting:0,open:1,closing:2,closed:3};te(379),te(328),te(563),te(646),te(563),te(463),te(297),te(377);const Te={h264:7,h265:12,mpeg4:99},Be={h264:te(463),h265:"H265(HEVC)"},De={AAC:10,ALAW:7,MULAW:8,MP3:2,OPUS:13,G711A:7,G711U:8};function Me(){const e=["start","left-up","aiImageDetectResult","nakedFlow","recordCancel","sendWsMessage","loadedmetadata","m7s","videoDecode","mseSourceended","pause","g711a","fetchSuccess","hls-level-loaded","65035lqPJxp","streamEndInner","record","playFailedAndPaused","playIsNotPauseOrUrlIsNull","webrtc-failed","webrtc-disconnected","decoder-pro-hard.js","AbortError","playbackTime","aiObjectDetectorInfo","playbackShowPrecisionChange","wasm","jbprov","isWebrtcForOthers","播放地址不能为空","fmp4","clickInitPlayer","mseSourceStartStreaming","24hqAtIe","webcodecs","mediaSourceAudioNoDataTimeout","mseHandle","performance","down","Decoder failure","multiDragenter","download","mseAddSourceBufferError","sourceopen","supportHls265","downloadMemoryLog","window","wasm解码失败","iframeIntervalTs","FMP4","0000000000","initAudioCodec","videoElementPlayingFailed","ended","ttfb","talkGetUserMediaTimeout","aliyunRtcError","playVodRateChange","初始化解码worker超时","peer-connection","playVodWaiting","destroyEnd","playToRenderTimes","canvas","streamQualityChange","visibilityChange","worker","stalled","recordCreateError","flvBufferData","fogClose","物品识别","streamMessage","硬解码不支持G711a/u音频格式","stats","load","人脸识别激活","30zUpLkm","faceDetectActive","mediaSourceDecoderConfigurationError","videoTimeUpdate","notConnect","playVodEnded","connecting","fiveMin","failedToAsynchronouslyPrepareWasm","isWebrtcForSRS","isM7sCrypto","simd","initDecoderWorkerTimeout","初始化解码器失败","destroy","人脸识别","fetch","play","kBps","subtitle-segments","loadeddata","loadingTimeoutRetryEnd","isWebrtcForZLM","removeLoadingBgImage","mseSourceEndStreaming","mediaSourceTsIsMaxDiff","playerAudio","audioResumeState","right","mp4Error","jessibuca-pro-mp4-recorder-decoder.js","7044NFHFsy","playbackRateChange","buffereos","playVodEndedAndReplay","fetchError","playbackTimestamp","hlsError","操作盘","playbackEndInner","223302nqzSzS","videoRenderSupportScale","initVideo","object","image/jpeg","tallWebsocketClosedByError","ALAW","active","webrtc","playVodTime","watermarkConfig","video自动渲染失败","multiMousedown","subtitle-playlist","apertureNear","multiSelected","decoder-pro-audio-player.js","talkStreamClose","playbackIsPause","playVodPause","half-hour","30min","endstreaming","netBuf","occlusionDetectActive","togglePerformancePanel","isFmp4","updateConfig","talkFailedAndStop","playVodSeekEnd","decoderWorkerInitError","流异常","3803994GhvwWG","remote-outbound-rtp","关闭电子放大","waiting","sourcebuffer-created","缓冲区已满","videoNalu","streamEnd","timeupdate","保存日志","aiFaceDetectorInfo","退出全屏","click","loading","The user aborted a request","请求结束","multiDrop","Wasm","complete",'video/mp4; codecs="avc1.64002A"',"ratechange","mseSourceOpen","webgl 上下文丢失","aacSequenceHeader","drawingRectInfo","wiperOpen","audioInfo","normal","talkGetUserMediaFail","mp4","initVideoCodec","aiOcclusionDetectResult","outbound-rtp","metadata","webgl2","recordStart","delayTimeoutRetryEnd","widthOrHeightChange","2500600LfiWPq","certificate","等待音频数据超时","message","hls-manifest-loaded","rightDown","playbackSeek","workerFetch","websocketOpen","apertureFar","H265(HEVC)","streamAbps","playbackTimeScroll","webcodecsUnsupportedConfigurationError","simdDecodeError","talk","remote-candidate","wcsDecodeError","resize","demuxed-track","suspend","script","mseUpdateVideoTimestamp","decoderWorkerWasmError","加载超时重播失败","created","audioPayload","AAC","playback","focus",'video/mp4;codecs="hev1.2.4.L120.90"',"offline","JessibucaPro","sourceended","webrtcDisconnect","mseSourceBufferFull","multiMouseout","mseFirstRenderTime","3-1","closeEnd","videoElementPlayingFailedForWebrtc","base64","playVodPauseOrResume","recording","videoCode","talkStreamError","buffering","pressureObserverCpu","isFlv","aliyunRtc","checkFirstIFrame","isAliyunRtc","webglAlignmentError","left","switch-url-failed","warn","play() failed because the user didn't interact with the document first","操作盘激活","close","jbprovm","tempStream","playbackEnd","playbackPrecision","WebTransport","right-down","playbackJustTime","遮挡物检查激活","mediaSourceAudioG711NotSupport","five-min","resetVideoDecode","电子放大","mseSourceBufferError","videoPayload","websocketClose","empty","playVodSeek","fetchErrorWorker","buffer","init","网络超时重播失败","videoSyncAudio","isTs","crashLog","webrtcConnected","oneHour","audioCode","talkStreamStart","replayUseLastFrameShow","decoder-pro-audio.js","mediaSourceAudioInitTimeout","MPEG4","10min","full","MEDIA_ERR_ABORTED","mseWorkerAddSourceBufferError","fullscreen$2","webm","初始化音频解码器失败","119602TWHelQ","mseError","metadata-parsed","inbound-rtp","volumechange","playAudio","focusFar","defaultStreamQuality","flv-script-data","flvScriptData","load-response-headers","networkDelay","small","remove-buffer","tenMin","sourceclose","talkStreamOpen","isMulti","fogOpen","playVodMp4Error","flvMetaData","initAudio","resetDecode","videoCodec","closed","simdH264DecodeVideoWidthIsTooLarge","durationchange","zoomExpand","mseSourceClose","mute","mp3","FLV","fullScreenByStart","不支持硬解码H265","7777wlyatP","mediaSourceUseCanvasRenderPlayFailed","viewResizeChange","videoSmooth","websocketError","widthOrHeightChangeReplayDelayTime","websocketStringMsg","mediaSourceAppendBufferError","videoSEI","ws1006","currentPts","MULAW(g711u)","timeout","rightUp","停止录制","videoSEISyncPts","heartTimeout","offscreen","playbackForwardMaxRateDecodeIFrame","load-retry","Simd","fullscreen","player","HLS","streamVbps","webrtcClosed","/crypto/","switch-url-success","networkDelayTimeout","stream-parsed","decoder-pro.js","FSimd","webrtcOnIceConnectionStateChange","flv","multiDragstart","webgl","zooming","Webrtc","webrtc不支持H265","videoInfo","flvDemuxBufferSizeTooLarge","wasmWidthOrHeightChange","streamSuccess","halfHour","H264(AVC)","red","talkStreamMsg","MP3","log","speed","video decoder initialization failed","worklet","opus","streamError","recordingTimestamp","webrtcStreamH265","ptz","track","blur","playbackStreamVideoFps","networkState","g711u","wcsWidthOrHeightChange","media-source","webcodecsDecodeConfigureError","playbackPreRateChange","csrc","render","webrtcChecking","online","canplay","3-4","no-audio-track","rtp","hevc","streamDts","mediaSourceH265NotSupport","volume","遮挡物检查","default","sendMessage","wasmDecodeError","progress","remote-inbound-rtp","3gYAcWZ","MEDIA_ERR_NETWORK","container","Unsupported audio format","idle","visibilityHiddenTimeout","请求失败","video","loadingTimeout","talkStreamInactive","playbackPauseOrResume","Decoder error","webgpu","cruiseStart","memoryLog","error","webrtc-completed","pauseAndNextPlayUseLastFrameShow","seeked","multiMousemove","webTransport","decoderWorkerInit","left-down","notSupportNewWasm","webrtcFailed",'video/mp4; codecs="hev1.1.6.L123.b0"',"sender","recordBlob","vertical",'video/mp4;codecs="hev1.1.6.L120.90"',"decode","simple","isHls","初始化worker失败",'video/mp4;codecs="hev1.3.E.L120.90"',"codec","webcodecsDecodeError","timeUpdate","transport","delayTimeout","alaw","webrtcOnConnectionStateChange","903436bUnURo","webFullscreen","解码失败","udp","multiIndex","startstreaming","wiperClose","播放超时重播失败","recordEnd","self","ten-min","Decoding error","stream","right-up","clearBuffer","paused","canplaythrough","memory access out of bounds","blob","local-candidate","resetAudioDecode","webrtc-connected","76qXHoRT","ALAW(g711a)","candidate-pair","playType","videoWaiting","open","playbackStats","fetchStream","playVodVideoSeekingByMse","hls","isMpeg4","playbackTF","playVodVideoSeekedByMse","5min","videoFrame","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","tcp","mseSourceBufferBusy","pcm","jtt","readystatechange","webglContextLostError","playing","inView","multiDblSelected","controlSize","dynamicWatermarkConfig","audio packet","multiMouseover","isWebrtc","one-hour","videoSequenceHeader","wasmUseVideoRenderError","ghostWatermarkConfig","mseDecodeError","#000","playVodTimeCache","decoder-pro-old.js"];return(Me=function(){return e})()}te(314),te(568),te(430),te(466),te(728),te(466);const Pe={sps:7,pps:8,iFrame:5,kUnspecified:0,kSliceNonIDR:1,kSliceDPA:2,kSliceDPB:3,kSliceDPC:4,kSliceIDR:5,kSliceSEI:6,kSliceSPS:7,kSlicePPS:8,kSliceAUD:9,kEndOfSequence:10,kEndOfStream:11,kFiller:12,kSPSExt:13,kReserved0:14},Ue={pFrame:1,kSliceBLA_W_LP:16,kSliceBLA_W_RADL:17,kSliceBLA_N_LP:18,iFrame:19,kSliceIDR_W_RADL:19,nLp:20,kSliceIDR_N_LP:20,craNut:21,kSliceCRA_NUT:21,kSliceRSV_IRAP_VCL22:22,kSliceRSV_IRAP_VCL23:23,vps:32,kSliceVPS:32,sps:33,kSliceSPS:33,pps:34,kSlicePPS:34,kSliceAUD:35,sei:39,prefixSei:39,suffixSei:40};te(639),te(454),te(283),te(515),te(436);const Fe={key:"key",delta:"delta"},Re={avc:te(268),hev:te(528),hev2:te(532),hev3:te(317),hev4:te(537),hev5:'video/mp4;codecs="hev1.4.10.L120.90"'},Le={ended:te(658),open:te(572),closed:te(409)};te(371),te(462),te(689),te(597),te(742),te(555),te(355),te(743),te(378),te(580),te(371),te(462),te(399),te(689),te(710),te(643),te(340),te(606),te(558),te(525),te(351),te(710),te(340),te(432),te(292),te(412),te(296),te(736),te(391),te(516),te(403),te(675),te(274),te(551);te(616),te(480),te(585);te(726);const Oe={sourceClose:te(400),sourceOpen:te(648),sourceended:te(320),startstreaming:te(550),endstreaming:te(744),qualitychange:"qualitychange"};te(489),te(757),te(762),te(269),te(611);const ze={h264:"avc",h265:te(493),av1:"av1"};te(644),te(556),te(514);const Ne={abortError:te(263),abortError2:te(627),abort:te(627)};te(767),te(589),te(560),te(696);const He={sequenceHeader:0,nalu:1},Ve={keyFrame:1,interFrame:2};te(361),te(586),te(583),te(548);te(557),te(315),te(572),te(345),te(518),te(290);te(470),te(308);te(492),te(583),te(655),te(342),te(470),te(308),te(729),te(602),te(591),te(737),te(595),te(323),te(734),te(522),te(453),te(645),te(265),te(325),te(490),te(505),te(510);const We={keyFrame:1,interFrame:2};te(708),te(698),te(738),te(701),te(291),te(618),te(306),te(393),te(387),te(659),te(438),te(468),te(395),te(491),te(398),te(715),te(758),te(341),te(446),te(735),te(448);const je={idle:te(507),connecting:te(688),buffering:te(333),error:"error",complete:te(267)};te(380),te(504),te(469),te(594),te(506),te(343),te(562);const Ge={video:1,audio:2},qe=128,$e={PACKET_TYPE_SEQ_START:0,PACKET_TYPE_FRAMES:1,PACKET_TYPE_SEQ_END:2,PACKET_TYPE_FRAMESX:3,PACKET_TYPE_METADATA:4},Ye={FT_KEY:16,FT_INTER:32};te(569),te(288),te(538),te(485),te(388),te(564),te(281),te(664),te(303),te(502),te(755),te(529),te(557),te(476),te(541),te(482),te(428),te(601),te(304),te(472),te(543),te(415),te(471),te(566),te(519),te(625),te(624),te(312),te(767),te(589);const Ke=typeof window===te(725)&&window[te(651)]===window?window:typeof self===te(725)&&self[te(554)]===self?self:typeof global===te(725)&&global.global===global?global:void 0;te(561),te(267),te(411),te(658),te(702),te(611),te(615),te(589),te(501),te(269),te(521),te(672),te(307),te(762),te(389),te(757),te(587),te(518),te(765),te(433),te(720),te(344),te(357),te(756),te(697),te(681),te(676),te(497),te(353),te(763),te(266),te(439),te(450),te(582);var Je="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Xe(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function Ze(e,t){return e(t={exports:{}},t.exports),t.exports}var Qe=Object.freeze({__proto__:null,commonjsGlobal:Je,commonjsRequire:Xe,unwrapExports:function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e},createCommonjsModule:Ze,getCjsExportFromNamespace:function(e){return e&&e.default||e}});function et(){var e=["405lvkARH","isFullscreen","webkitfullscreenchange","then","mozRequestFullScreen","msFullscreenEnabled","22296mbEWxa","webkitCancelFullScreen","documentElement","mozfullscreenerror","4svNzsp","7450JDFVlv","createCommonjsModule","exports","length","object","msExitFullscreen","webkitFullscreenEnabled","mozFullScreenElement","webkitfullscreenerror","document","webkitRequestFullscreen","mozfullscreenchange","defineProperties","mozFullScreenEnabled","addEventListener","screenfull","webkitRequestFullScreen","catch","75020qwLzPR","msFullscreenElement","9Spzveo","923670lTTCMr","mozCancelFullScreen","77263XLXrNB","removeEventListener","MSFullscreenError","webkitExitFullscreen","off","bind","exitFullscreen","undefined","2388000tcjySK","fullscreenchange","error","fullscreenElement","request","fullscreenerror","isEnabled","requestFullscreen","change","fullscreenEnabled","190057wqYzHR"];return(et=function(){return e})()}var tt=rt;function rt(e,t){var r=et();return(rt=function(e,t){return r[e-=209]})(e,t)}!function(e,t){for(var r=rt,n=e();;)try{if(214685===parseInt(r(261))/1*(parseInt(r(237))/2)+parseInt(r(258))/3*(-parseInt(r(256))/4)+-parseInt(r(259))/5+-parseInt(r(233))/6+-parseInt(r(226))/7+parseInt(r(216))/8+parseInt(r(227))/9*(parseInt(r(238))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(et),Qe[tt(239)]((function(e){var t,r,n,i,s,o;t=rt,r=typeof window!==t(215)&&typeof window[t(247)]!==t(215)?window[t(247)]:{},n="undefined"!==t(242)&&e[t(240)],i=function(){for(var e,n=t,i=[[n(223),n(214),n(219),n(225),n(217),n(221)],[n(248),n(211),"webkitFullscreenElement",n(244),n(229),n(246)],[n(254),"webkitCancelFullScreen","webkitCurrentFullScreenElement",n(234),n(229),"webkitfullscreenerror"],[n(231),n(260),n(245),n(251),n(249),n(236)],["msRequestFullscreen",n(243),n(257),n(232),"MSFullscreenChange",n(210)]],s=0,o=i.length,a={};s32&&console[t(348)](t(356)),e<=this[t(346)]){let r=this._current_word>>>32-e;return this[t(336)]<<=e,this[t(346)]-=e,r}let r=this._current_word_bits_left?this[t(336)]:0;r>>>=32-this[t(346)];let n=e-this[t(346)];this[t(338)]();let i=Math[t(341)](n,this[t(346)]),s=this[t(336)]>>>32-i;return this[t(336)]<<=i,this._current_word_bits_left-=i,r=r<>>t))return this[e(336)]<<=t,this[e(346)]-=t,t;return this._fillCurrentWord(),t+this._skipLeadingZero()}[nt(332)](){let e=this[nt(345)]();return this.readBits(e+1)-1}[nt(331)](){let e=this[nt(332)]();return 1&e?e+1>>>1:-1*(e>>>1)}}function ot(){const e=["readBool","_buffer_index","min","370704NLlfsc","_buffer","byteLength","_skipLeadingZero","_current_word_bits_left","1192674IaxOSa","error","_total_bytes","destroy","2673732MsmNxI","readBits","buffer","19534698deZIvr","1891516KhDdZG","ExpGolomb: readBits() bits exceeded max 32bits!","ExpGolomb: _fillCurrentWord() but no bytes available","5SViAZC","readByte","set","readSEG","readUEG","_total_bits","8RoBTrX","1005999LwUyvr","_current_word","2718023zByBmQ","_fillCurrentWord"];return(ot=function(){return e})()}const at=yt;!function(e,t){const r=yt,n=e();for(;;)try{if(666046===parseInt(r(240))/1+parseInt(r(281))/2*(-parseInt(r(252))/3)+-parseInt(r(262))/4+parseInt(r(260))/5+-parseInt(r(294))/6*(parseInt(r(266))/7)+parseInt(r(314))/8*(parseInt(r(307))/9)+parseInt(r(309))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(pt);const ct=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1],ut=ct,lt=ct;function dt(e){let{profile:t,sampleRate:r,channel:n}=e;return new Uint8Array([175,0,t<<3|(14&r)>>1,(1&r)<<7|n<<3])}function ht(e){const t=yt;return ft(e)&&e[1]===He[t(264)]}function ft(e){const t=yt;return e[0]>>4===De[t(273)]}function pt(){const e=["android","navigator","2ChtErG","destroy","unshift","data","more than 2 numProgram Not Supported","data_","log","read_golomb","look","sampleRate: ","read","bufpos","error","12mClwhm","channels","object_type","readBits","Flv: AAC invalid channel configuration","eof_flag_","sampling_index","length","other_data_present","Flv: AAC invalid sampling frequency index!","readByte","byteLength","getIncompleteData","585423MKzDfl","has_last_incomplete_data","16231630ZHEiQw","sampling_frequency","slice","iserro","push","16PduJbT","audioMuxVersionA is Not Supported","Could not found ADTS syncword until payload end","53331gIHJtd","mp4a.40.2","getLATMValue","aac","readBool",". Only frameLengthType = 0 Supported","buffer","more than 2 numSubFrames Not Supported","Invalid sampling index: ","firefox","set","more than 2 numLayer Not Supported","437259oucUwM","indexOf","readNextAACFrame","chan_config","mp4a.40.","sample_rate","profile: ","channel_config","26430gIDOTX","aacEncoderConfigurationRecord","1278212SrutVZ","findNextSyncwordOffset","sequenceHeader","subarray","2381827boxZPn","warn","bufoff","sbr","sampling_freq_index","buflen","audio_object_type","AAC","current_syncword_offset_","userAgent","hasIncompleteData","frameLengthType = ","toLowerCase"];return(pt=function(){return e})()}const mt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];function vt(e){const t=yt;let r=new Uint8Array(e),n=null,i=0,s=0,o=0,a=null;if(i=s=r[0]>>>3,o=(7&r[0])<<1|r[1]>>>7,o<0||o>=mt.length)return void console.error(t(303));let c=mt[o],u=(120&r[1])>>>3;if(u<0||u>=8)return void console[t(287)](t(298));5===i&&(a=(7&r[1])<<1|r[2]>>>7,r[2]);let l=Ke[t(280)][t(275)][t(278)]();return-1!==l[t(253)](t(249))?o>=6?(i=5,n=new Array(4),a=o-3):(i=2,n=new Array(2),a=o):-1!==l[t(253)](t(279))?(i=2,n=new Array(2),a=o):(i=5,a=o,n=new Array(4),o>=6?a=o-3:1===u&&(i=2,n=new Array(2),a=o)),n[0]=i<<3,n[0]|=(15&o)>>>1,n[1]=(15&o)<<7,n[1]|=(15&u)<<3,5===i&&(n[1]|=(15&a)>>>1,n[2]=(1&a)<<7,n[2]|=8,n[3]=0),{audioType:t(243),config:n,sampleRate:c,channelCount:u,objectType:i,codec:t(256)+i,originalCodec:"mp4a.40."+s}}at(291),at(289),at(288);function yt(e,t){const r=pt();return(yt=function(e,t){return r[e-=239]})(e,t)}class _t{constructor(e){const t=at;this.data_=e,this[t(299)]=!1,this[t(274)]=this[t(263)](0),this[t(299)]&&console[t(293)](t(239))}[at(263)](e){const t=at;let r=e,n=this[t(286)];for(;;){if(r+7>=n[t(305)])return this[t(299)]=!0,n[t(305)];if(4095===(n[r+0]<<8|n[r+1])>>>4)return r;r++}}[at(254)](){const e=at;let t=this.data_,r=null;for(;null==r&&!this[e(299)];){let n=this[e(274)],i=(8&t[n+1])>>>3,s=(6&t[n+1])>>>1,o=1&t[n+1],a=(192&t[n+2])>>>6,c=(60&t[n+2])>>>2,u=(1&t[n+2])<<2|(192&t[n+3])>>>6,l=(3&t[n+3])<<11|t[n+4]<<3|(224&t[n+5])>>>5;if(t[n+6],n+l>this[e(286)][e(305)]){this[e(299)]=!0,this[e(308)]=!0;break}let d=1===o?7:9,h=l-d;n+=d;let f=this[e(263)](n+h);if(this[e(274)]=f,0!==i&&1!==i||0!==s)continue;let p=t[e(265)](n,n+h);r={},r[e(272)]=a+1,r[e(270)]=c,r.sampling_frequency=ut[c],r[e(259)]=u,r.data=p}return r}[at(276)](){return this[at(308)]}[at(306)](){const e=at;return this[e(308)]?this.data_[e(265)](this[e(274)]):null}}class gt{constructor(e){const t=at;this.data_=e,this.eof_flag_=!1,this.current_syncword_offset_=this[t(263)](0),this[t(299)]&&console.error("Could not found ADTS syncword until payload end")}[at(263)](e){const t=at;let r=e,n=this[t(286)];for(;;){if(r+1>=n[t(305)])return this[t(299)]=!0,n[t(305)];if(695===(n[r+0]<<3|n[r+1]>>>5))return r;r++}}[at(242)](e){const t=at;let r=e[t(297)](2),n=0;for(let i=0;i<=r;i++)n<<=8,n|=e[t(304)]();return n}[at(254)](e){const t=at;let r=this[t(286)],n=null;for(;null==n&&!this[t(299)];){let i=this[t(274)],s=(31&r[i+1])<<8|r[i+2];if(i+3+s>=this[t(286)][t(305)]){this[t(299)]=!0,this.has_last_incomplete_data=!0;break}let o=new st(r.subarray(i+3,i+3+s)),a=null;if(o[t(244)]()){if(null==e){console[t(267)]("StreamMuxConfig Missing"),this[t(274)]=this[t(263)](i+3+s),o.destroy();continue}a=e}else{let e=o.readBool();if(e&&o[t(244)]()){console[t(293)](t(315)),o.destroy();break}if(e&&this.getLATMValue(o),!o.readBool()){console[t(293)]("allStreamsSameTimeFraming zero is Not Supported"),o[t(282)]();break}if(0!==o.readBits(6)){console[t(293)](t(247)),o[t(282)]();break}if(0!==o[t(297)](4)){console.error(t(285)),o.destroy();break}if(0!==o[t(297)](3)){console[t(293)](t(251)),o[t(282)]();break}let r=e?this[t(242)](o):0,n=o.readBits(5);r-=5;let i=o.readBits(4);r-=4;let s=o[t(297)](4);r-=4,o[t(297)](3),r-=3,r>0&&o.readBits(r);let c=o[t(297)](3);if(0!==c){console.error(t(277)+c+t(245)),o[t(282)]();break}o.readByte();let u=o[t(244)]();if(u)if(e)this[t(242)](o);else{let e=0;for(;;){e<<=8;let r=o[t(244)]();if(e+=o[t(304)](),!r)break}console.log(e)}o.readBool()&&o[t(304)](),a={},a[t(272)]=n,a[t(270)]=i,a[t(310)]=ut[a[t(270)]],a[t(259)]=s,a.other_data_present=u}let c=0;for(;;){let e=o[t(304)]();if(c+=e,255!==e)break}let u=new Uint8Array(c);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function wt(){const e=["setUint32","3835989bFmaGJ","length","subarray","byteLength","push","2183366HEtqkQ","161hnCwvD","1107612umSjNu","22YfvghB","48ViJCoQ","set","6248210FmTedB","1416458XlDWGZ","buffer","188724xLNerQ","40790UUUeIW","712CSeSRW"];return(wt=function(){return e})()}function St(e,t){const r=wt();return(St=function(e,t){return r[e-=416]})(e,t)}function It(e){const t=St;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e[t(423)]<4)return[];const n=e[t(423)],i=[];let s,o=0;for(;o+r>>=8),o+=r,s){if(o+s>n)break;i[t(426)](e[t(424)](o,o+s)),o+=s}return i}function At(e){const t=St;let r=arguments[t(423)]>1&&void 0!==arguments[1]&&arguments[1];const n=e[t(423)];let i=r?2:1,s=0,o=0,a="";for(;255===e[i];)s+=255,i++;for(s+=e[i++];255===e[i];)o+=255,i++;if(o+=e[i++],5===s&&n>i+16)for(let t=0;t<16;t++)a+=e[i].toString(16),i++;return{payload:e[t(424)](i),type:s,size:o,uuid:a}}function Et(e){const t=St,r=e[t(425)],n=new Uint8Array(4);n[0]=r>>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r;const i=new Uint8Array(r+4);return i[t(432)](n,0),i.set(e,4),i}function kt(e,t){let r=null;return t?e[St(423)]>=28&&(r=1+(3&e[26])):e.length>=12&&(r=1+(3&e[9])),r}!function(e,t){const r=St,n=e();for(;;)try{if(766372===-parseInt(r(416))/1+parseInt(r(427))/2+parseInt(r(422))/3+parseInt(r(420))/4*(-parseInt(r(419))/5)+-parseInt(r(418))/6*(parseInt(r(428))/7)+parseInt(r(431))/8*(parseInt(r(429))/9)+parseInt(r(433))/10*(parseInt(r(430))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(wt);const Ct=qt;function xt(){const e=qt;return(new Date)[e(563)]()}function Tt(){const e=["getTime","getContext","WebGLRenderingContext","substring","-webkit-user-select",'"1-2-2025"',"VideoDecoder","createObjectURL","top","AudioData","forEach","scrollTop","content","clearRect","document","onload","join","lineWidth","MULAW","imageSmoothingQuality","PressureObserver","clientX","getParameter","createTextNode","kSliceRSV_IRAP_VCL22","split","failed to asynchronously prepare wasm","Firefox","fmt ","-webkit-touch-callout","2320220epjaqj","opera","playbackRate","gpu","VideoEncoder.isConfigSupported is not a function","clientY","createElement","mimeTypes","insertBefore",'"production"',"onerror","-moz-user-select","numberOfChannels","readyState","100%","4ifcstZ","position","hev4","-o-user-select","https:","high","image/png","win64","getHours","NaN","charCodeAt","illegal icc",'"2.1.3"',"getImageData","download","backgroundColor","safari","style","opacity","max","fromCharCode","resume","pathname","result","RIFF","fontSize","right","canConstructInDedicatedWorker","VideoEncoder is not supported","search","instantiate",'"delaytime"',"apply","filter","performance","avc1.","attachShadow","true","xxxxxxxxxxxx4xxx","ManagedMediaSource","MediaSource","version","WebGL2RenderingContext","xxxx","URL","restore","slice","location","fillStyle","string","body","zIndex","indexOf","parse","webkitFullscreenElement","VideoFrame","isTypeSupported","application/vnd.apple.mpegurl","ended","round","setInt16","Module","setHours","12881550ckTYZr","initEvent","useMSE","validate","1504HaWCTT","getDay","wow32","-ms-user-select","green yuv","createImageBitmap","origin","hasAudio","requestVideoFrameCallback","8WEwimy","revokeObjectURL","left","paused","min","mousemove","stringify","color","display","connect","html","target","pps","open","test","type","div","data","rect","bottom","pointer-events: none !important; display: block !important","objectFit","width","audioWorklet","mseDecodeAudio","then","hev1.1.6.L120.90","height","sequenceHeader","strokeRect","sps","children","webm","toUpperCase","none","absolute","AAC","9999999","ActiveXObject","trim","second","hostname","getUint8","setUint8","QihooBrowser","byteLength","dataset","1738339200000","userAgent","appendChild","mediaDevices",'"development"',"scrollLeft","innerHTML","fillText","set","QQBrowser","addModule","msGetUserMedia","getSeconds","object","Instance","user-select","15030PFhZXq","assign","visibility","atob","host","charAt","touchstart","touches","close","canvas","-webkit-tap-highlight-color","random","status","transferControlToOffscreen",";base64","[object DOMException]","application/asx","kSliceBLA_W_LP","push","isConfigSupported","match","PB/s","pow","MediaStreamTrackGenerator","href","GB/s","experimental-webgl","setAttribute","data:","element","YB/s","f32-planar","Worker","VideoEncoder.isConfigSupported() result is not supported","application/javascript","keyFrame","Reserved SBR extensions is not implemented","166714VpKMnw","76795VVxgeK","0 KB/s","borderStyle","keys","createBuffer","KB/s","mousedown","green","demuxUseWorker","nLp","image","error","numberOfFrames","call","angle","srcElement","now","subarray","start",'"2025-2-1"',"setInt8","not compiled with thread support, using thread emulation","data-","function","isEnabled","hev","buffer","win32","getMinutes","application/vnd.chromium.remoting-viewer","hev5","getUserMedia","touchend","undefined","repeat","toLowerCase","length","save","showModalDialog","memory","ZB/s","moz-webgl","QHBrowser","overflow","hev2","useOffscreen","port","Bytes","{y}-{m}-{d} {h}:{i}:{s}","click","documentElement","AudioDecoder","360EE","iFrame","removeChild","toDataURL","getDate","navigator","drawImage","456816zBqVHn","px Arial","prototype","webkit-3d","imageSmoothingEnabled","src","rgba(0,0,0,0)","replace","message","toString","Chrome","pageY","mouseup","h264","chrome","100","log","hev3","[object Number]","#000","application/360softmgrplugin","getElementById","endsWith","copyright","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","ALAW","setUint32","textAlign","borderWidth","getFullYear","WAVE","removeAttribute","360","text","canPlayType","strokeStyle","protocol","script","pageX","Edg","kSliceBLA_W_RADL","setUint16","webgl","toFixed","application/hwepass2001.installepass2001","kSliceBLA_N_LP","application/mozilla-npqihooquicklogin","wcsDecodeAudio","substr","hidden","kSliceRSV_IRAP_VCL23","getPropertyValue","firefox","setInt32","format","-webkit-text-size-adjust","touchmove","font","245202QFLzZR","[object Error]","quality","noteOn","getAttribute","floor"];return(Tt=function(){return e})()}function Bt(e,t,r){const n=qt;return Math[n(627)](Math[n(688)](e,Math.max(t,r)),Math[n(688)](t,r))}function Dt(){const e=qt;return performance&&typeof performance[e(456)]===e(463)?performance[e(456)]():Date[e(456)]()}function Mt(e){let t=0,r=Dt();return n=>{if(!function(e){const t=Ct;return Object[t(501)][t(508)][t(453)](e)===t(517)}(n))return;t+=n;const i=Dt(),s=i-r;s>=1e3&&(e(t/s*1e3),r=i,t=0)}}!function(e,t){const r=qt,n=e();for(;;)try{if(167184===-parseInt(r(439))/1*(parseInt(r(608))/2)+-parseInt(r(499))/3+-parseInt(r(684))/4*(parseInt(r(440))/5)+parseInt(r(557))/6+-parseInt(r(593))/7+-parseInt(r(675))/8*(parseInt(r(747))/9)+parseInt(r(671))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Tt),(()=>{const e=qt;try{if("object"==typeof WebAssembly&&typeof WebAssembly[e(638)]===e(463)){const t=new(WebAssembly[e(669)])(Uint8Array.of(0,97,115,109,1,0,0,0));if(t instanceof WebAssembly[e(669)])return new(WebAssembly[e(745)])(t)instanceof WebAssembly[e(745)]}}catch(e){}})();const Pt=Ct(602),Ut=Ct(620),Ft=Ct(568);Ct(735),Ct(602);const Rt=Pt===Ct(639);Ct(459),Ct(731);function Lt(e){return null==e}function Ot(e){return!Lt(e)}function zt(e){return e&&"function"==typeof e}function Nt(e){const t=Ct;let r=null,n=31&e[0];return(n===Pe[t(714)]||n===Pe[t(696)])&&(r=Be[t(512)]),!r&&(n=(126&e[0])>>1,(n===Ue.vps||n===Ue[t(714)]||n===Ue[t(696)])&&(r=Be.h265)),r}function Ht(){return typeof WritableStream!==Ct(473)}function Vt(e){e[Ct(755)]()}function Wt(e,t){const r=Ct;t&&(e=e[r(641)]((e=>e.type&&e[r(699)]===t)));let n=e[0],i=null,s=1;if(e[r(476)]>0){let t=e[1];t&&t.ts-n.ts>1e5&&(n=t,s=2)}if(n)for(let o=s;o=1e3){e[o-1].ts-n.ts<1e3&&(i=o+1)}}}return i}function jt(e){const t=Ct;return e.ok&&e[t(759)]>=200&&e.status<=299}function Gt(){return function(e){const t=Ct;let r="";if(typeof e===t(744))try{r=JSON.stringify(e),r=JSON[t(661)](r)}catch(t){r=e}else r=e;return r}(ge)}function qt(e,t){const r=Tt();return(qt=function(e,t){return r[e-=418]})(e,t)}function $t(e){const t=Ct;return e[0]>>4===Ve[t(437)]&&e[1]===He[t(712)]}function Yt(e){return!0===e||e===Ct(645)}function Kt(e){return!0!==e&&e!==Ct(645)}function Jt(){const e=Ct;return!!(Ke[e(434)]&&Ke[e(648)]&&e(635)in Ke[e(648)]&&!0===Ke[e(648)].canConstructInDedicatedWorker)}function Xt(e,t){const r=Ct,n=It(e[r(654)](5));let i=!1;return n[r(573)]((e=>{const n=r,s=t?e[0]>>>1&63:31&e[0];(t&&(s===Ue[n(419)]||s===Ue[n(539)]||s===Ue[n(544)]||s===Ue.iFrame||n(449),n(587),s===Ue[n(549)])||Kt(t)&&s===Pe[n(493)])&&(i=!0)})),i}function Zt(){return Kt(Rt)}function Qt(e){return e>60*(Number("1")||1)*60*1e3&&Zt()}const er=ar;!function(e,t){const r=ar,n=e();for(;;)try{if(350003===parseInt(r(302))/1+parseInt(r(303))/2*(-parseInt(r(323))/3)+-parseInt(r(336))/4+parseInt(r(301))/5*(-parseInt(r(311))/6)+-parseInt(r(341))/7*(parseInt(r(305))/8)+parseInt(r(304))/9+parseInt(r(331))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(or);var tr=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){const o=ar;function a(e){const t=ar;try{u(n[t(333)](e))}catch(e){s(e)}}function c(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){const t=ar;var n;e.done?i(e[t(317)]):(n=e[t(317)],n instanceof r?n:new r((function(e){e(n)})))[t(306)](a,c)}u((n=n[o(342)](e,t||[]))[o(333)]())}))};const rr=Symbol(32),nr=Symbol(16),ir=Symbol(8);class sr{constructor(e){const t=er;this.g=e,this.consumed=0,e&&(this.need=e.next()[t(317)])}[er(329)](e){const t=er;this.g=e,this[t(339)](e.next()[t(317)],!0)}[er(325)](){const e=er;this.buffer&&this[e(310)]&&(this[e(335)].copyWithin(0,this[e(310)]),this.buffer=this.buffer[e(344)](0,this[e(335)][e(327)]-this[e(310)]),this[e(310)]=0)}[er(339)](e,t){const r=er;return t&&this[r(325)](),this[r(314)]=e,this[r(337)]()}[er(332)](e){return tr(this,void 0,void 0,(function*(){const t=ar;return this[t(334)]&&(yield this[t(334)]),this[t(334)]=new Promise(((r,n)=>{const i=t;var s;this[i(340)]=n,this[i(309)]=e=>{const t=i;delete this[t(334)],delete this[t(309)],delete this[t(314)],r(e)};this.demand(e,!0)||null===(s=this[i(328)])||void 0===s||s[i(312)](this,e)}))}))}[er(345)](){return this[er(332)](rr)}[er(320)](){return this[er(332)](nr)}[er(315)](){return this.read(ir)}[er(321)](){const e=er;var t;this.g&&this.g[e(343)](),this[e(335)]&&this.buffer[e(344)](0,0),null===(t=this[e(340)])||void 0===t||t[e(312)](this,new Error("EOF")),delete this[e(334)]}[er(337)](){const e=er;if(!this[e(335)]||!this[e(314)])return;let t=null;const r=this[e(335)][e(344)](this[e(310)]);let n=0;const i=t=>r[e(327)]<(n=t);if("number"==typeof this[e(314)]){if(i(this[e(314)]))return;t=r[e(344)](0,n)}else if(this.need===rr){if(i(4))return;t=r[0]<<24|r[1]<<16|r[2]<<8|r[3]}else if(this.need===nr){if(i(2))return;t=r[0]<<8|r[1]}else if(this[e(314)]===ir){if(i(1))return;t=r[0]}else if(e(335)in this[e(314)]){if("byteOffset"in this.need){if(i(this.need[e(318)]-this[e(314)][e(307)]))return;new Uint8Array(this[e(314)][e(335)],this.need[e(307)])[e(319)](r.subarray(0,n)),t=this.need}else if(this.g)return void this.g.throw(new Error(e(338)))}else{if(i(this.need[e(318)]))return;new Uint8Array(this[e(314)])[e(319)](r[e(344)](0,n)),t=this[e(314)]}return this[e(310)]+=n,this.g?this[e(339)](this.g[e(333)](t)[e(317)],!0):this[e(309)]&&this[e(309)](t),t}[er(324)](e){const t=er;if(e instanceof Uint8Array?this[t(313)](e[t(327)])[t(319)](e):t(335)in e?this[t(313)](e.byteLength)[t(319)](new Uint8Array(e[t(335)],e[t(307)],e.byteLength)):this[t(313)](e.byteLength)[t(319)](new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this[t(328)]=e));this[t(337)]()}[er(322)](e){const t=er;this[t(313)](4)[t(319)]([e>>24&255,e>>16&255,e>>8&255,255&e]),this[t(337)]()}[er(330)](e){const t=er;this[t(313)](2).set([e>>8&255,255&e]),this[t(337)]()}[er(326)](e){const t=er;this.malloc(1)[0]=e,this[t(337)]()}[er(313)](e){const t=er;if(this[t(335)]){const r=this[t(335)][t(327)],n=r+e;if(n<=this.buffer[t(335)][t(318)]-this[t(335)][t(307)])this[t(335)]=new Uint8Array(this.buffer[t(335)],this[t(335)].byteOffset,n);else{const e=new Uint8Array(n);e[t(319)](this.buffer),this.buffer=e}return this[t(335)][t(344)](r,n)}return this.buffer=new Uint8Array(e),this[t(335)]}}function or(){const e=["next","lastReadPromise","buffer","1064096uIzsAo","flush","Unsupported type","demand","reject","78141XAznHD","apply","return","subarray","readU32","U32","35mDZZen","652551QwxCoO","14joRnPH","650556ixKgaT","344LLyqNM","then","byteOffset","__awaiter","resolve","consumed","191808bSHOth","call","malloc","need","readU8","U16","value","byteLength","set","readU16","close","writeU32","85881TOpdiw","write","consume","writeU8","length","pull","setG","writeU16","7953660rtPGuN","read"];return(or=function(){return e})()}function ar(e,t){const r=or();return(ar=function(e,t){return r[e-=300]})(e,t)}function cr(e,t){const r=ur();return(cr=function(e,t){return r[e-=102]})(e,t)}function ur(){const e=["310345NkAeqO","[❗❗❗][","[❌❌❌][","JbPro","debugLevel","debug","log","error","1091715yvymds","warn","length","713320jyVIrI","_opt","28280jIzSpd","77126Owxhko","debugUuid","5620416OLVeuO","30yjdnaD","524572TzqnrQ"];return(ur=function(){return e})()}sr[er(300)]=rr,sr[er(316)]=nr,sr.U8=ir,function(e,t){const r=cr,n=e();for(;;)try{if(203782===-parseInt(r(116))/1+parseInt(r(120))/2+parseInt(r(110))/3+-parseInt(r(115))/4+parseInt(r(113))/5+-parseInt(r(119))/6*(-parseInt(r(102))/7)+-parseInt(r(118))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ur);class lr{constructor(e){const t=cr;this[t(108)]=function(r){const n=t;if(e[n(114)][n(106)]==ue[n(107)]){const t=e[n(114)][n(117)]?"["+e[n(114)][n(117)]+"]":"";for(var i=arguments[n(112)],s=new Array(i>1?i-1:0),o=1;o1?i-1:0),o=1;o1?s-1:0),a=1;a=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(526)],0,s)}static[dr(510)](e){const t=dr;let r=fr._ebsp2rbsp(e),n=new st(r);n.readByte();let i=n.readByte();n[t(530)]();let s=n[t(530)]();n[t(521)]();let o=fr[t(501)](i),a=fr.getLevelString(s),c=1,u=420,l=[0,420,422,444],d=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(c=n[t(521)](),3===c&&n.readBits(1),c<=3&&(u=l[c]),d=n[t(521)]()+8,n[t(521)](),n[t(513)](1),n[t(511)]())){let e=3!==c?8:12;for(let r=0;r0&&e<16?(w=r[e-1],S=i[e-1]):255===e&&(w=n.readByte()<<8|n[t(530)](),S=n[t(530)]()<<8|n[t(530)]())}if(n[t(511)]()&&n[t(511)](),n[t(511)]()&&(n.readBits(4),n[t(511)]()&&n.readBits(24)),n[t(511)]()&&(n.readUEG(),n[t(521)]()),n[t(511)]()){let e=n[t(513)](32),r=n[t(513)](32);A=n.readBool(),E=r,k=2*e,I=E/k}}let C=1;(1!==w||1!==S)&&(C=w/S);let x=0,T=0;if(0===c)x=1,T=2-v;else{x=3===c?1:2,T=(1===c?2:1)*(2-v)}let B=16*(p+1),D=16*(m+1)*(2-v);B-=(y+_)*x,D-=(g+b)*T;let M=Math[t(528)](B*C);return n[t(518)](),n=null,{profile_string:o,level_string:a,bit_depth:d,ref_frames:f,chroma_format:u,chroma_format_string:fr[t(517)](u),frame_rate:{fixed:A,fps:I,fps_den:k,fps_num:E},sar_ratio:{width:w,height:S},codec_size:{width:B,height:D},present_size:{width:M,height:D}}}static[dr(527)](e){const t=dr;let r=e[t(523)](1,4),n="avc1.";for(let e=0;e<3;e++){let t=r[e].toString(16);t.length<2&&(t="0"+t),n+=t}let i=fr._ebsp2rbsp(e),s=new st(i);s[t(530)]();let o=s[t(530)]();s[t(530)]();let a=s.readByte();s.readUEG();let c=fr[t(501)](o),u=fr.getLevelString(a),l=1,d=420,h=[0,420,422,444],f=8,p=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(l=s[t(521)](),3===l&&s.readBits(1),l<=3&&(d=h[l]),f=s[t(521)]()+8,p=s[t(521)]()+8,s[t(513)](1),s.readBool())){let e=3!==l?8:12;for(let r=0;r0&&e<16?(A=r[e-1],E=n[e-1]):255===e&&(A=s.readByte()<<8|s[t(530)](),E=s[t(530)]()<<8|s[t(530)]())}if(s[t(511)]()&&s.readBool(),s[t(511)]()&&(s[t(513)](4),s.readBool()&&s[t(513)](24)),s[t(511)]()&&(s[t(521)](),s.readUEG()),s[t(511)]()){let e=s[t(513)](32),r=s[t(513)](32);C=s[t(511)](),x=r,T=2*e,k=x/T}}let B=1;(1!==A||1!==E)&&(B=A/E);let D=0,M=0;if(0===l)D=1,M=2-g;else{D=3===l?1:2,M=(1===l?2:1)*(2-g)}let P=16*(y+1),U=16*(_+1)*(2-g);P-=(b+w)*D,U-=(S+I)*M;let F=Math.ceil(P*B);return s.destroy(),s=null,{codec_mimetype:n,profile_idc:o,level_idc:a,profile_string:c,level_string:u,chroma_format_idc:l,bit_depth:f,bit_depth_luma:f,bit_depth_chroma:p,ref_frames:v,chroma_format:d,chroma_format_string:fr.getChromaFormatString(d),frame_rate:{fixed:C,fps:k,fps_den:T,fps_num:x},sar_ratio:{width:A,height:E},codec_size:{width:P,height:U},present_size:{width:F,height:U}}}static[dr(516)](e,t){const r=dr;let n=8,i=8,s=0;for(let o=0;o=this[t(230)])return this.iserro=!0,0;this[t(237)]=!1,n=this[t(240)]+e>8?8-this[t(240)]:e,r<<=n,r+=this[t(242)][this[t(246)]]>>8-this[t(240)]-n&255>>8-n,this[t(240)]+=n,e-=n,8==this[t(240)]&&(this.bufpos++,this.bufoff=0)}return r}[mr(235)](e){const t=mr;let r=this[t(246)],n=this.bufoff,i=this[t(243)](e);return this.bufpos=r,this[t(240)]=n,i}[mr(245)](){const e=mr;let t;for(t=0;0===this[e(243)](1)&&!this[e(237)];t++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i[t(274)](n,0),i[t(274)](r[t(252)],4),r.sps=i}if(r[t(281)]){const e=r[t(281)][t(247)],n=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(n,0),i.set(r[t(281)],4),r[t(281)]=i}return r}function Ar(){const e=["currentStartcodeOffset","profile_string","codecWidth","bit_depth","sarRatio","toString","width","present_size","level","compat","950wuuCgS","readNextNaluPayload","fps_den","avc_ref_frames","121374DkYhqJ","findNextStartCodeOffset","Could not find H264 startcode until payload end!","read_golomb","fixed","Strange AVCDecoderConfigurationRecord: PPS Count = ","7593866XpOXeK","presentHeight","13746jvfXTq","iFrame","kReserved0","nb_sps","error","setInt16","eofFlag","type","subarray","3cyCODY","sar_ratio","chroma_format","3775068TGbRzr","605deRkSt","buffer","Strange NaluLengthSizeMinusOne: ","read","590008ReJykT","skipUEG","parseSPS$2","frameRate","level_string","kSliceSEI","78292ufMpRM","push","byteLength","videoType","bitDepth","height","frame_rate","sps","shift","chromaFormat","timescale","61855nuAyOH"," Strange AVCDecoderConfigurationRecord: SPS Count = ","avcc","codec","skipBits","chroma_format_idc","length","getUint16","readBool","nalu","codec_size","profile","Invalid AVCDecoderConfigurationRecord: No SPS","avc1.","presentWidth","codecHeight","getUint8","kSliceNonIDR","set","data","readBits","Invalid AVCDecoderConfigurationRecord version !== 1 || avcProfile === 0","skipScalingList","readUByte","setUint32","pps","readUEG"];return(Ar=function(){return e})()}function Er(e,t){const r=Ar();return(Er=function(e,t){return r[e-=245]})(e,t)}function kr(e){const t=Er;let{sps:r,pps:n}=e;const i=[23,0,0,0,0,1,66,0,30,255];i[0]=23,i[6]=r[1],i[7]=r[2],i[8]=r[3],i[10]=225,i[11]=r[t(247)]>>8&255,i[12]=255&r[t(247)],i[t(246)](...r,1,n.byteLength>>8&255,255&n[t(247)],...n);return new Uint8Array(i)}function Cr(e){const t=Er;let{sps:r,pps:n}=e,i=8+r[t(247)]+1+2+n[t(247)],s=!1;const o=fr[t(324)](r);66!==r[3]&&77!==r[3]&&88!==r[3]&&(s=!0,i+=4);let a=new Uint8Array(i);a[0]=1,a[1]=r[1],a[2]=r[2],a[3]=r[3],a[4]=255,a[5]=225;let c=r[t(247)];a[6]=c>>>8,a[7]=255&c;let u=8;a[t(274)](r,8),u+=c,a[u]=1;let l=n[t(247)];a[u+1]=l>>>8,a[u+2]=255&l,a[t(274)](n,u+3),u+=3+l,s&&(a[u]=252|o[t(261)],a[u+1]=248|o.bit_depth_luma-8,a[u+2]=248|o.bit_depth_chroma-8,a[u+3]=0,u+=4);const d=[23,0,0,0,0],h=new Uint8Array(d[t(262)]+a[t(247)]);return h.set(d,0),h[t(274)](a,d.length),h}function xr(e,t){const r=Er;let n=[];n[0]=t?23:39,n[1]=1,n[2]=0,n[3]=0,n[4]=0,n[5]=e[r(247)]>>24&255,n[6]=e[r(247)]>>16&255,n[7]=e[r(247)]>>8&255,n[8]=255&e[r(247)];const i=new Uint8Array(n[r(262)]+e[r(247)]);return i.set(n,0),i.set(e,n[r(262)]),i}function Tr(e,t){const r=Er;let n=[];n[0]=t?23:39,n[1]=1,n[2]=0,n[3]=0,n[4]=0;const i=new Uint8Array(n[r(262)]+e[r(247)]);return i[r(274)](n,0),i[r(274)](e,n.length),i}function Br(e){return 31&e[0]}function Dr(e){return e===Pe[Er(327)]}function Mr(e){return!(t=e,t===Pe.sps||t===Pe[Er(281)]||Dr(e));var t}function Pr(e){return e===Pe[Er(306)]}function Ur(e){const t=Er;if(0===e[t(262)])return!1;const r=Br(e[0]);for(let n=1;n=n.byteLength)return this[t(311)]=!0,n[t(247)];let e=n[r+0]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],i=n[r+0]<<16|n[r+1]<<8|n[r+2];if(1===e||1===i)return r;r++}}[Sr(294)](){const e=Sr;let t=this.data,r=null;for(;null==r&&!this[e(311)];){let n=this[e(283)];n+=1===(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])?4:3;let i=31&t[n],s=(128&t[n])>>>7,o=this.findNextStartCodeOffset(n);this[e(283)]=o,i>=Pe[e(307)]||0===s&&(r={type:i,data:t[e(313)](n,o)})}return r}}class Rr{constructor(e){const t=Sr;let r=e[t(275)][t(247)];this[t(312)]=e.type,this[t(275)]=new Uint8Array(4+r),new DataView(this[t(275)][t(319)])[t(280)](0,r),this[t(275)][t(274)](e[t(275)],4)}}function Lr(){const e=["8844NjsygT","m_bits","GetWord","GetBit","m_idx","GetBYTE","1166520dHVzfC","666560ycybaO","32484WXdKRS","m_len","m_zeros","3490hnqmQV","8oXdKeB","121621NsPMXw","m_byte","4562383gCJIfs","6dSmXrX","6vOWXlu","length","m_data","3560184dqjhbq","GetSE","GetUE"];return(Lr=function(){return e})()}function Or(e,t){const r=Lr();return(Or=function(e,t){return r[e-=484]})(e,t)}const zr=Or;!function(e,t){const r=Or,n=e();for(;;)try{if(465820===-parseInt(r(491))/1*(-parseInt(r(490))/2)+-parseInt(r(495))/3*(-parseInt(r(486))/4)+parseInt(r(485))/5+parseInt(r(494))/6*(parseInt(r(493))/7)+-parseInt(r(484))/8+-parseInt(r(498))/9+parseInt(r(489))/10*(-parseInt(r(501))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Lr);zr(506),zr(504),zr(500),zr(499);const Nr=Vr;function Hr(){const e=["1656985ZvFVGJ","_ebsp2rbsp","5898784Ayzkng","SPSParser chroma_format_idc > 3","buffer","GetWord","1927720YHtFyD","warn","2781186NHrdRu","129XepOio","84009bCInTu","8614qWvpOO","GetUE","SPSParser sps_seq_parameter_set_id > 15","byteLength","3626707EtTosa"];return(Hr=function(){return e})()}function Vr(e,t){const r=Hr();return(Vr=function(e,t){return r[e-=138]})(e,t)}!function(e,t){const r=Vr,n=e();for(;;)try{if(358845===-parseInt(r(145))/1*(parseInt(r(147))/2)+-parseInt(r(146))/3+parseInt(r(142))/4+-parseInt(r(152))/5+-parseInt(r(144))/6+parseInt(r(151))/7+parseInt(r(138))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Hr);Nr(153);!function(e,t){const r=Gr,n=e();for(;;)try{if(655118===-parseInt(r(385))/1*(-parseInt(r(398))/2)+-parseInt(r(375))/3+-parseInt(r(395))/4*(-parseInt(r(393))/5)+parseInt(r(386))/6+-parseInt(r(379))/7+-parseInt(r(387))/8+parseInt(r(396))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(qr);const Wr=e=>{const t=Gr;let r=e,n=r[t(391)],i=new Uint8Array(n),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(388)],0,s)},jr=e=>{const t=Gr;switch(e){case 0:return t(377);case 1:return t(399);case 2:return t(397);case 3:return t(383);default:return t(374)}};function Gr(e,t){const r=qr();return(Gr=function(e,t){return r[e-=374]})(e,t)}function qr(){const e=["hvc1.","byteLength","readBits","815mzEawW","readUEG","10436jdkrNJ","9090567pHobHQ","4:2:2","73586bbbPvW","4:2:0","destroy","Unknown","6876COVwAS",".B0","4:0:0","readBool","6014652DDEFuX","toFixed","min","readSEG","4:4:4","readByte","3wJZOdU","7341648czvBuc","10021368nQsPXL","buffer","push"];return(qr=function(){return e})()}function $r(e,t){const r=Kr();return($r=function(e,t){return r[e-=370]})(e,t)}const Yr=$r;function Kr(){const e=["2524705yLUsJO","getLevelString","4:2:0","parseSPS","_ebsp2rbsp","4:4:4","2563176wbQVZC","175175vaHAPx","min","readBool","1161777HiClbK","Main10","81690QusoSh","readSEG","4zovdsS","destroy","170154gpQtLJ","getChromaFormatString","readUEG",".B0","MainSP","getProfileString","buffer","1936224GZaYZD","147jQkzNs","parsePPS","Main","SCC","4:2:2","readByte","push","toFixed","parseVPS","Rext","readBits","byteLength","hvc1.","Unknown"];return(Kr=function(){return e})()}!function(e,t){const r=$r,n=e();for(;;)try{if(373202===parseInt(r(370))/1+-parseInt(r(375))/2+-parseInt(r(373))/3+-parseInt(r(377))/4*(parseInt(r(401))/5)+-parseInt(r(379))/6*(-parseInt(r(387))/7)+parseInt(r(407))/8+parseInt(r(386))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Kr);class Jr{static[Yr(405)](e){const t=Yr;let r=e,n=r[t(398)],i=new Uint8Array(n),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(385)],0,s)}static[Yr(395)](e){const t=Yr;let r=Jr[t(405)](e),n=new st(r);return n.readByte(),n.readByte(),n[t(397)](4),n[t(397)](2),n[t(397)](6),{num_temporal_layers:n[t(397)](3)+1,temporal_id_nested:n.readBool()}}static[Yr(404)](e){const t=Yr;let r=Jr._ebsp2rbsp(e),n=new st(r);n[t(392)](),n[t(392)]();let i=0,s=0,o=0,a=0;n[t(397)](4);let c=n[t(397)](3);n[t(372)]();let u=n[t(397)](2),l=n[t(372)](),d=n[t(397)](5),h=n[t(392)](),f=n[t(392)](),p=n[t(392)](),m=n.readByte(),v=n[t(392)](),y=n[t(392)](),_=n[t(392)](),g=n[t(392)](),b=n.readByte(),w=n[t(392)](),S=n[t(392)](),I=[],A=[];for(let e=0;e0)for(let e=c;e<8;e++)n.readBits(2);for(let e=0;e1&&n.readSEG();for(let e=0;e0&&e<=16?(F=r[e-1],R=i[e-1]):255===e&&(F=n.readBits(16),R=n[t(397)](16))}if(n.readBool()&&n[t(372)](),n[t(372)]()){n.readBits(3),n.readBool(),n[t(372)]()&&(n.readByte(),n[t(392)](),n.readByte())}if(n.readBool()&&(n.readUEG(),n[t(381)]()),n[t(372)](),n[t(372)](),n[t(372)](),P=n.readBool(),P&&(n[t(381)](),n[t(381)](),n[t(381)](),n.readUEG()),n[t(372)]()){if(O=n[t(397)](32),z=n[t(397)](32),n.readBool()&&n.readUEG(),n.readBool()){let e=!1,r=!1,i=!1;e=n[t(372)](),r=n[t(372)](),(e||r)&&(i=n[t(372)](),i&&(n.readByte(),n[t(397)](5),n.readBool(),n[t(397)](5)),n[t(397)](4),n[t(397)](4),i&&n[t(397)](4),n.readBits(5),n[t(397)](5),n[t(397)](5));for(let s=0;s<=c;s++){let s=n.readBool();L=s;let o=!0,a=1;!s&&(o=n[t(372)]());let c=!1;if(o?n.readUEG():c=n[t(372)](),!c&&(a=n[t(381)]()+1),e){for(let e=0;e>6&3,n.general_tier_flag=e[1]>>5&1,n.general_profile_idc=31&e[1],n[t(558)]=e[2]<<24|e[3]<<16|e[4]<<8|e[5],n[t(623)]=e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[t(623)]=n[t(623)]<<16|e[10]<<8|e[11],n.general_level_idc=e[12],n[t(574)]=(15&e[13])<<8|e[14],n.parallelismType=3&e[15],n[t(587)]=3&e[16],n.bitDepthLumaMinus8=7&e[17],n[t(622)]=7&e[18],n.avgFrameRate=e[19]<<8|e[20],n.constantFrameRate=e[21]>>6&3,n[t(544)]=e[21]>>3&7,n[t(512)]=e[21]>>2&1,n.lengthSizeMinusOne=3&e[21];let i=e[22],s=e.slice(23);for(let e=0;e0)for(let t=r;t<8;t++)e[n(605)](2);i[n(493)]=[],i[n(618)]=[],i[n(607)]=[],i[n(576)]=[],i[n(525)]=[],i[n(551)]=[],i.sub_layer_non_packed_constraint_flag=[],i[n(602)]=[],i.sub_layer_level_idc=[];for(let t=0;t{const t=Gr;let r=Wr(e),n=new st(r);return n.readByte(),n[t(384)](),n[t(392)](4),n.readBits(2),n[t(392)](6),{num_temporal_layers:n.readBits(3)+1,temporal_id_nested:n[t(378)]()}})(r),a=(e=>{const t=Gr;let r=Wr(e),n=new st(r);n.readByte(),n.readByte();let i=0,s=0,o=0,a=0;n[t(392)](4);let c=n[t(392)](3);n[t(378)]();let u=n[t(392)](2),l=n.readBool(),d=n[t(392)](5),h=n.readByte(),f=n[t(384)](),p=n[t(384)](),m=n[t(384)](),v=n[t(384)](),y=n[t(384)](),_=n.readByte(),g=n[t(384)](),b=n[t(384)](),w=n[t(384)](),S=n[t(384)](),I=[],A=[];for(let e=0;e0)for(let e=c;e<8;e++)n.readBits(2);for(let e=0;e1&&n[t(382)]();for(let e=0;e0&&e<16?(F=r[e-1],R=i[e-1]):255===e&&(F=n[t(392)](16),R=n.readBits(16))}if(n.readBool()&&n.readBool(),n[t(378)]()&&(n.readBits(3),n.readBool(),n[t(378)]()&&(n[t(384)](),n[t(384)](),n.readByte())),n.readBool()&&(n[t(394)](),n[t(394)]()),n.readBool(),n[t(378)](),n.readBool(),P=n[t(378)](),P&&(i+=n.readUEG(),s+=n[t(394)](),o+=n[t(394)](),a+=n[t(394)]()),n[t(378)]()&&(O=n[t(392)](32),z=n[t(392)](32),n.readBool()&&(n.readUEG(),n.readBool()))){let e=!1,r=!1,i=!1;e=n[t(378)](),r=n[t(378)](),(e||r)&&(i=n[t(378)](),i&&(n[t(384)](),n.readBits(5),n[t(378)](),n[t(392)](5)),n[t(392)](4),n.readBits(4),i&&n[t(392)](4),n[t(392)](5),n.readBits(5),n[t(392)](5));for(let s=0;s<=c;s++){let s=n[t(378)]();L=s;let o=!1,a=1;!s&&(o=n[t(378)]());let c=!1;if(o?n.readSEG():c=n[t(378)](),!c&&(cpbcnt=n[t(394)]()+1),e)for(let e=0;e{const t=Gr;let r=Wr(e),n=new st(r);n[t(384)](),n[t(384)](),n[t(394)](),n.readUEG(),n[t(378)](),n.readBool(),n[t(392)](3),n[t(378)](),n[t(378)](),n.readUEG(),n.readUEG(),n.readSEG(),n.readBool(),n[t(378)](),n.readBool()&&n[t(394)](),n.readSEG(),n[t(382)](),n[t(378)](),n[t(378)](),n.readBool(),n[t(378)]();let i=n[t(378)](),s=n[t(378)](),o=1;return s&&i?o=0:s?o=3:i&&(o=2),{parallelismType:o}})(n);s=Object[t(495)](s,o,a,c);let u=23+(5+r.byteLength)+(5+i[t(553)])+(5+n.byteLength),l=new Uint8Array(u);l[0]=1,l[1]=(3&s[t(550)])<<6|(s.general_tier_flag?1:0)<<5|31&s[t(545)],l[2]=s[t(583)]||0,l[3]=s[t(594)]||0,l[4]=s[t(560)]||0,l[5]=s[t(523)]||0,l[6]=s[t(526)]||0,l[7]=s.general_constraint_indicator_flags_2||0,l[8]=s.general_constraint_indicator_flags_3||0,l[9]=s[t(614)]||0,l[10]=s[t(549)]||0,l[11]=s[t(584)]||0,l[12]=60,l[13]=240|(3840&s[t(574)])>>8,l[14]=255&s[t(574)],l[15]=252|3&s[t(627)],l[16]=252|3&s[t(603)],l[17]=248|7&s[t(546)],l[18]=248|7&s[t(521)],l[19]=0,l[20]=0,l[21]=(3&s[t(520)])<<6|(7&s[t(609)])<<3|(s[t(595)]?1:0)<<2|3,l[22]=3,l[23]=128|Ue[t(529)],l[24]=0,l[25]=1,l[26]=(65280&r[t(553)])>>8,l[27]=(255&r.byteLength)>>0,l[t(588)](r,28),l[23+(5+r[t(553)])+0]=128|Ue.sps,l[23+(5+r.byteLength)+1]=0,l[23+(5+r[t(553)])+2]=1,l[23+(5+r[t(553)])+3]=(65280&i[t(553)])>>8,l[23+(5+r[t(553)])+4]=(255&i.byteLength)>>0,l[t(588)](i,23+(5+r[t(553)])+5),l[23+(5+r.byteLength+5+i[t(553)])+0]=128|Ue[t(562)],l[23+(5+r.byteLength+5+i[t(553)])+1]=0,l[23+(5+r.byteLength+5+i[t(553)])+2]=1,l[23+(5+r[t(553)]+5+i[t(553)])+3]=(65280&n[t(553)])>>8,l[23+(5+r.byteLength+5+i.byteLength)+4]=(255&n.byteLength)>>0,l[t(588)](n,23+(5+r.byteLength+5+i[t(553)])+5);const d=[28,0,0,0,0],h=new Uint8Array(d[t(561)]+l[t(553)]);return h[t(588)](d,0),h[t(588)](l,d[t(561)]),h}function rn(e,t){const r=an;let n=[];n[0]=t?28:44,n[1]=1,n[2]=0,n[3]=0,n[4]=0,n[5]=e[r(553)]>>24&255,n[6]=e[r(553)]>>16&255,n[7]=e[r(553)]>>8&255,n[8]=255&e.byteLength;const i=new Uint8Array(n[r(561)]+e.byteLength);return i.set(n,0),i[r(588)](e,n[r(561)]),i}function nn(e,t){const r=an;let n=[];n[0]=t?28:44,n[1]=1,n[2]=0,n[3]=0,n[4]=0;const i=new Uint8Array(n[r(561)]+e[r(553)]);return i[r(588)](n,0),i[r(588)](e,n[r(561)]),i}function sn(e){return(126&e[0])>>1}function on(e){return e===Ue[an(567)]}function an(e,t){const r=hn();return(an=function(e,t){return r[e-=489]})(e,t)}function cn(e){return!((t=e)>=32&&t<=40);var t}function un(e){return e>=16&&e<=21}function ln(e){const t=an;if(0===e[t(561)])return!1;const r=sn(e[0]);for(let n=1;n=n.byteLength)return this.eofFlag=!0,n[t(553)];let e=n[r+0]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],i=n[r+0]<<16|n[r+1]<<8|n[r+2];if(1===e||1===i)return r;r++}}[Xr(608)](){const e=Xr;let t=this[e(538)],r=null;for(;null==r&&!this[e(575)];){let n=this[e(510)];n+=1===(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])?4:3;let i=t[n]>>1&63,s=(128&t[n])>>>7,o=this.findNextStartCodeOffset(n);this[e(510)]=o,0===s&&(r={type:i,data:t[e(547)](n,o)})}return r}}function hn(){const e=["fps_num","look","profile_compatibility_flags","conf_win_left_offset","1080621xFAsHS","conf_win_top_offset","general_interlaced_source_flag","conf_win_bottom_offset","frame_rate","Invalid HEVCDecoderConfigurationRecord, lack of data! ","generalLevelIdc","frameRate","configurationVersion","currentStartcodeOffset","present_size","temporalIdNested","120nqNciV","getUint16","6PjjCOT","506055Noanax","bitDepth","2322NzNeTw","general_frame_only_constraint_flag","constant_frame_rate","bit_depth_chroma_minus8","2596iwEWFA","general_profile_compatibility_flags_4","parseHEVCDecoderVPSAndSPSAndPPS and vpsTag is ","sub_layer_progressive_source_flag","general_constraint_indicator_flags_1","readBits","chroma_format","vps","readUByte","sps_max_sub_layers_minus1","psps","542gzOYkl","sps_temporal_id_nesting_flag","profile_idc","codecHeight","generalProfileIdc","data","sub_layer_level_idc","buffer","findNextStartCodeOffset","profile_tier_level","arrayBuffer.length ","numTemporalLayers","general_profile_idc","bit_depth_luma_minus8","subarray","general_progressive_source_flag","general_constraint_indicator_flags_5","general_profile_space","sub_layer_interlaced_source_flag","conf_win_right_offset","byteLength","level_idc","from","profile_space","readUEG","general_profile_compatibility_flags","generalTierFlag","general_profile_compatibility_flags_3","length","pps","hvcc","read_golomb","max","Could not find H265 startcode until payload end!","sei","slice","pic_height_in_luma_samples","3361463uYIcrT","2052OUTBgB","sarRatio","separate_colour_plane_flag","min_spatial_segmentation_idc","eofFlag","sub_layer_profile_compatibility_flag","generalProfileCompatibilityFlags","level_string","getUint8","fixed","conformance_window_flag","h265","general_profile_compatibility_flags_1","general_constraint_indicator_flags_6","sps_seq_parameter_set_id","general_non_packed_constraint_flag","chromaFormat","set","parseSPS","codec_size","sub_layer_level_present_flag","height","18280764QucCSI","general_profile_compatibility_flags_2","temporal_id_nested","timescale","sps_video_parameter_set_id","sps","warn","push","fps_den","sub_layer_frame_only_constraint_flag","chroma_format_idc","bit_depth","read","763340SABMtw","sub_layer_profile_idc","readNextNaluPayload","num_temporal_layers","type","sub_layer_profile_present_flag","width","bitDepthLumaMinus8","general_constraint_indicator_flags_4","error","level"," < 23","sub_layer_tier_flag","presentHeight","sar_ratio","64UFNnFR","bitDepthChromaMinus8","general_constraint_indicator_flags","generalConstraintIndicatorFlags","profile_string","Invalid HEVCDecoderConfigurationRecord,version is ","parallelismType","codecWidth","profile","refSampleDuration","presentWidth","general_level_idc","setInt16","parseHEVCDecoderConfigurationRecord$3","pic_width_in_luma_samples","sub_layer_profile_space"," < 22","assign","parseHEVCDecoderVPSAndSPSAndPPS and sps tag is "];return(hn=function(){return e})()}class fn{constructor(e){const t=Xr;let r=e[t(538)][t(553)];this[t(610)]=e[t(610)],this[t(538)]=new Uint8Array(4+r),new DataView(this[t(538)][t(540)]).setUint32(0,r),this[t(538)][t(588)](e[t(538)],4)}}var pn=Rn;!function(e,t){for(var r=Rn,n=e();;)try{if(933238===-parseInt(r(551))/1+-parseInt(r(480))/2*(-parseInt(r(543))/3)+parseInt(r(449))/4+-parseInt(r(470))/5+parseInt(r(539))/6*(parseInt(r(495))/7)+parseInt(r(455))/8+-parseInt(r(530))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Pn);var mn,vn=pn(460),yn=pn(457),_n=/^(?:text|application)\/xml/i,gn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,bn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,wn=/^\s*$/,Sn={},In={},An="",En={type:pn(451),beforeSend:kn,success:kn,error:kn,complete:kn,context:null,xhr:function(){return new(window[pn(482)])},accepts:{json:vn,xml:pn(467),html:yn,text:pn(532),"*":"*/"[pn(508)]("*")},crossDomain:!1,timeout:0,username:null,password:null,processData:!0,promise:kn,contentType:pn(502)};function kn(){}var Cn=function(e,t){var r=pn;typeof e===r(515)&&(t=e,e=void 0);var n=Ln({},t=t||{});for(var i in En)void 0===n[i]&&(n[i]=En[i]);try{var s={},o=new Promise((function(e,t){s[r(505)]=e,s.reject=t}));o[r(505)]=s[r(505)],o[r(484)]=s[r(484)],n.promise=o}catch(e){n[r(464)]={resolve:kn,reject:kn}}var a=bn[r(461)](window.location[r(538)][r(523)]())||[];n.url=((e||n.url||window.location[r(538)])+"")[r(520)](/#.*$/,"")[r(520)](/^\/\//,a[1]+"//");var c=n.url;!n.crossDomain&&(n[r(485)]=/^([\w-]+:)?\/\/([^\/]+)/.test(n.url)&&RegExp.$2!==window[r(492)][r(538)]);var u=n.dataType;if(u===r(504)){if(!/=\?/[r(525)](n.url)){var l=(n.jsonp||"callback")+"=?";n[r(487)]=Mn(n[r(487)],l)}return function(e){var t,r=pn,n=e.jsonpCallback||r(504)+Nn(),i=window[r(477)].createElement(r(549)),s={abort:function(){n in window&&(window[n]=kn)}},o=window[r(477)][r(535)]("head")[0]||window.document[r(524)];function a(n){var i=r;window[i(529)](t),s.abort(),Bn(n[i(531)],s,n[i(531)],e),c()}function c(){var e=r;i[e(507)]?i[e(507)]():i[e(534)]=i.onreadystatechange=i[e(536)]=null,i[e(488)]&&i[e(488)][e(450)](i),i=null,delete window[n]}return i[r(536)]=function(e){a(e)},window[n]=function(n){window[r(529)](t),xn(n,s,e),c()},Un(e),i[r(522)]=e[r(487)].replace(/=\?/,"="+n),i[r(522)]=Mn(i[r(522)],"_="+(new Date)[r(510)]()),i[r(454)]=!0,e[r(499)]&&(i[r(481)]=e.scriptCharset),o[r(503)](i,o[r(497)]),e[r(516)]>0&&(t=window[r(452)]((function(){var t=r;s[t(519)](),Bn(t(516),s,t(516),e),c()}),e[r(516)])),e[r(464)][r(519)]=function(){s[r(519)]()},e[r(464)][r(498)]=s,e.promise}(n)}Un(n);var d=n[r(453)][u]||n[r(453)]["*"],h={};/^([\w-]+:)\/\//[r(525)](n[r(487)])?RegExp.$1:window[r(492)][r(550)];var f,p=En[r(498)]();!n[r(485)]&&!h["X-Requested-With"]&&(h[r(546)]="XMLHttpRequest"),n[r(466)]&&(Sn[c]&&(h[r(474)]=Sn[c]),In[c]&&(h[r(472)]=In[c])),d&&(h[r(544)]=d,d[r(501)](",")>-1&&(d=d[r(513)](",",2)[0]),p[r(459)]&&p[r(459)](d));var m=!/^(?:GET|HEAD)$/[r(525)](n[r(531)][r(545)]());if((n[r(514)]&&m&&!1!==n.contentType||t[r(456)])&&(h["Content-Type"]=n[r(456)]),!1===n[r(528)]&&!m){var v=/([?&])_=[^&]*/;n[r(487)]=v[r(525)](c)?c[r(520)](v,r(458)+Nn()):c+(/\?/[r(525)](c)?"&":"?")+"_="+Nn()}n.headers=Ln(h,n[r(471)]||{}),p[r(448)]=function(){var e,t,i=r;if(4===p[i(518)]){clearTimeout(f);var s,o=!1;if(p[i(490)]>=200&&p.status<300||304===p[i(490)]){if(An=p.getAllResponseHeaders(),n.ifModified){var a=Dn("Last-Modified");a&&(Sn[c]=a),(a=Dn(i(548)))&&(In[c]=a)}u=u||(e=p[i(483)](i(509)),t=pn,e&&(e===yn?t(494):e===vn?t(465):_n.test(e)&&t(541))||t(478)),s=p[i(479)];try{u===i(541)?s=p[i(468)]:"json"===u&&(s=wn[i(525)](s)?null:JSON[i(493)](s))}catch(e){o=e}o?Bn(o,i(527),p,n):xn(s,p,n)}else Bn(null,"error",p,n)}};var y=!("async"in n)||n[r(454)];if(p[r(469)](n[r(531)],n[r(487)],y,n.username,n.password),n.xhrFields)for(var _ in n[r(496)])p[_]=n[r(496)][_];for(var _ in n[r(537)]&&p[r(459)]&&p[r(459)](n[r(537)]),n[r(471)])void 0!==n.headers[_]&&p[r(512)](_,n[r(471)][_]+"");return!1===function(e,t){var r=pn,n=t[r(462)];if(!1===t[r(517)].call(n,e,t))return!1}(p,n)?(p[r(519)](),!1):(n[r(516)]>0&&(f=window.setTimeout((function(){p[r(448)]=kn,p.abort(),Bn(null,"timeout",p,n)}),n[r(516)])),p.send(n[r(514)]?n.data:null),n[r(464)].abort=function(){p[r(519)]()},n[r(464)])};function xn(e,t,r){var n=pn,i=r.context,s=n(473);r[n(473)][n(476)](i,e,s,t),r[n(464)][n(505)](e,s,t),Tn(s,t,r)}function Tn(e,t,r){var n=pn,i=r[n(462)];r.complete[n(476)](i,t,e)}function Bn(e,t,r,n){var i=pn,s=n[i(462)];n[i(540)][i(476)](s,r,t,e),n[i(464)][i(484)](r,t,e),Tn(t,r,n)}function Dn(e){var t,r=pn;if(!mn){for(mn={};t=gn.exec(An);)mn[t[1][r(523)]()]=t[2];t=mn[e[r(523)]()]}return null===t?null:t}function Mn(e,t){return(e+"&"+t)[pn(520)](/[&?]{1,2}/,"?")}function Pn(){var e=["readyState","abort","replace","name","src","toLowerCase","documentElement","test","POST","parseerror","cache","clearTimeout","11756097xsXYcY","type","text/plain","post","onload","getElementsByTagName","onerror","mimeType","href","42tVcZhx","error","xml","add","33krmagC","Accept","toUpperCase","X-Requested-With","join","etag","script","protocol","1454219rppawV","onreadystatechange","944488tEpqcs","removeChild","GET","setTimeout","accepts","async","14318016enZDaJ","contentType","text/html","$1_=","overrideMimeType","application/json, text/javascript","exec","context","[object Array]","promise","json","ifModified","application/xml, text/xml","responseXML","open","4836800cZGkUd","headers","If-None-Match","success","If-Modified-Since","function","call","document","text","responseText","243158FvgtSs","charset","XMLHttpRequest","getResponseHeader","reject","crossDomain","getJSON","url","parentNode","push","status","slice","location","parse","html","1297807tTfNwY","xhrFields","firstChild","xhr","scriptCharset","length","indexOf","application/x-www-form-urlencoded; charset=UTF-8","insertBefore","jsonp","resolve","prototype","clearAttributes","concat","content-type","getTime","hasOwnProperty","setRequestHeader","split","data","object","timeout","beforeSend"];return(Pn=function(){return e})()}function Un(e){var t,r,n,i,s=pn;On(e)&&!(e[s(514)]instanceof FormData)&&e.processData&&(e.data=(t=e[s(514)],n=pn,(i=[]).add=function(e,t){this[Rn(489)](encodeURIComponent(e)+"="+encodeURIComponent(t))},Fn(i,t,r),i[n(547)]("&")[n(520)]("%20","+"))),e[s(514)]&&(!e.type||e.type[s(545)]()===s(451))&&(e[s(487)]=Mn(e[s(487)],e[s(514)]))}function Fn(e,t,r,n){var i,s,o=pn,a=(i=t,s=pn,Object.prototype.toString[s(476)](i)===s(463));for(var c in t){var u=t[c];n&&(c=r?n:n+"["+(a?"":c)+"]"),!n&&a?e.add(u[o(521)],u.value):(r?a(u):On(u))?Fn(e,u,r,c):e[o(542)](c,u)}}function Rn(e,t){var r=Pn();return(Rn=function(e,t){return r[e-=448]})(e,t)}function Ln(e){for(var t=pn,r=Array[t(506)][t(491)],n=r.call(arguments,1),i=0,s=n[t(500)];i255)return!1;return!0}function Gn(e,t){var r=Wn;if(e[r(440)]&&e.name===r(442))return t&&(e=e[r(492)]?e[r(492)]():Array[r(445)][r(492)][r(473)](e)),e;if(Array[r(457)](e)){if(!jn(e))throw new Error(r(487)+e);return new Uint8Array(e)}if(Vn(e[r(458)])&&jn(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function qn(e){return new Uint8Array(e)}function $n(e,t,r,n,i){var s=Wn;(null!=n||null!=i)&&(e=e[s(492)]?e[s(492)](n,i):Array.prototype[s(492)][s(473)](e,n,i)),t[s(455)](e,r)}function Yn(){var e=["invalid key size (must be 16, 24 or 32 bytes)","invalid ciphertext size (must be segmentSize bytes)","invalid ciphertext size (must be multiple of 16 bytes)","fromCharCode","_remainingCounterIndex","1520217sFkCYe","_lastPrecipher","description","integer value out of safe range","ecb","Array contains invalid value: ","3435138vfgtUm","substr","5043144PHPnSr","3mGoMJU","slice","_lastCipherblock","setValue","Cipher Feedback","invalid plaintext size (must be 16 bytes)","_Kd","1013533cwmpuf","setBytes","charCodeAt","buffer","name","Uint8Array","segmentSize","_remainingCounter","prototype","_shiftRegister","1317484ysdPoH","invalid plaintext size (must be multiple of 16 bytes)","invalid initialation vector size (must be 16 bytes)","_lastPrecipherIndex","invalid counter bytes size (must be 16 bytes)","10HovZnA","number","1356900hNFzzT","set","encrypt","isArray","length","AES must be instanitated with `new`","invalid counter value (must be an integer)","push","_aes","Counter must be instanitated with `new`","Electronic Code Block","join","_Ke","Counter","cbc","2851698YDrjfl","_prepare","key","PKCS#7 invalid length","call","decrypt","PKCS#7 invalid padding byte","_counter"];return(Yn=function(){return e})()}!function(e,t){for(var r=Wn,n=e();;)try{if(695664===parseInt(r(437))/1+-parseInt(r(447))/2+parseInt(r(491))/3*(parseInt(r(454))/4)+parseInt(r(452))/5*(-parseInt(r(469))/6)+parseInt(r(488))/7+parseInt(r(490))/8+-parseInt(r(482))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Yn);var Kn,Jn={toBytes:function(e){var t=Wn,r=[],n=0;for(e=encodeURI(e);n191&&i<224?(r[t(461)](String.fromCharCode((31&i)<<6|63&e[n+1])),n+=2):(r[t(461)](String[t(480)]((15&i)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return r[t(465)]("")}},Xn=(Kn="0123456789abcdef",{toBytes:function(e){for(var t=Wn,r=[],n=0;n>4]+Kn[15&i])}return r[t(465)]("")}}),Zn={16:10,24:12,32:14},Qn=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],ei=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],ti=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],ri=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],ni=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],ii=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],si=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],oi=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],ai=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],ci=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],ui=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],li=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],di=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],hi=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],fi=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function pi(e){for(var t=Wn,r=[],n=0;n>2,this[e(466)][n][r%4]=o[r],this[e(436)][t-n][r%4]=o[r];for(var a,c=0,u=s;u>16&255]<<24^ei[a>>8&255]<<16^ei[255&a]<<8^ei[a>>24&255]^Qn[c]<<24,c+=1,8!=s)for(r=1;r>8&255]<<8^ei[a>>16&255]<<16^ei[a>>24&255]<<24;for(r=s/2+1;r>2,d=u%4,this[e(466)][l][d]=o[r],this[e(436)][t-l][d]=o[r++],u++}for(var l=1;l>24&255]^di[a>>16&255]^hi[a>>8&255]^fi[255&a]},mi[Hn(445)][Hn(456)]=function(e){var t=Hn;if(16!=e[t(458)])throw new Error(t(435));for(var r=this[t(466)][t(458)]-1,n=[0,0,0,0],i=pi(e),s=0;s<4;s++)i[s]^=this[t(466)][0][s];for(var o=1;o>24&255]^ni[i[(s+1)%4]>>16&255]^ii[i[(s+2)%4]>>8&255]^si[255&i[(s+3)%4]]^this[t(466)][o][s];i=n[t(492)]()}var a,c=qn(16);for(s=0;s<4;s++)a=this._Ke[r][s],c[4*s]=255&(ei[i[s]>>24&255]^a>>24),c[4*s+1]=255&(ei[i[(s+1)%4]>>16&255]^a>>16),c[4*s+2]=255&(ei[i[(s+2)%4]>>8&255]^a>>8),c[4*s+3]=255&(ei[255&i[(s+3)%4]]^a);return c},mi[Hn(445)].decrypt=function(e){var t=Hn;if(16!=e[t(458)])throw new Error("invalid ciphertext size (must be 16 bytes)");for(var r=this._Kd[t(458)]-1,n=[0,0,0,0],i=pi(e),s=0;s<4;s++)i[s]^=this._Kd[0][s];for(var o=1;o>24&255]^ai[i[(s+3)%4]>>16&255]^ci[i[(s+2)%4]>>8&255]^ui[255&i[(s+1)%4]]^this[t(436)][o][s];i=n.slice()}var a,c=qn(16);for(s=0;s<4;s++)a=this[t(436)][r][s],c[4*s]=255&(ti[i[s]>>24&255]^a>>24),c[4*s+1]=255&(ti[i[(s+3)%4]>>16&255]^a>>16),c[4*s+2]=255&(ti[i[(s+2)%4]>>8&255]^a>>8),c[4*s+3]=255&(ti[255&i[(s+1)%4]]^a);return c};var vi=function(e){var t=Hn;if(!(this instanceof vi))throw Error("AES must be instanitated with `new`");this.description=t(464),this[t(441)]=t(486),this[t(462)]=new mi(e)};vi[Hn(445)][Hn(456)]=function(e){var t=Hn;if((e=Gn(e))[t(458)]%16!=0)throw new Error(t(448));for(var r=qn(e.length),n=qn(16),i=0;iNumber.MAX_SAFE_INTEGER)throw new Error(t(485));for(var r=15;r>=0;--r)this[t(476)][r]=e%256,e=parseInt(e/256)},bi[Hn(445)][Hn(438)]=function(e){var t=Hn;if(16!=(e=Gn(e,!0))[t(458)])throw new Error(t(451));this[t(476)]=e},bi[Hn(445)].increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var wi=function(e,t){var r=Hn;if(!(this instanceof wi))throw Error(r(459));this[r(484)]=r(467),this[r(441)]="ctr",!(t instanceof bi)&&(t=new bi(t)),this[r(476)]=t,this._remainingCounter=null,this[r(481)]=16,this._aes=new mi(e)};wi[Hn(445)][Hn(456)]=function(e){for(var t=Hn,r=Gn(e,!0),n=0;n16)throw new Error("PKCS#7 padding byte out of range");for(var n=e.length-r,i=0;i>>2]>>>24-a%4*8&255;r[s+a>>>2]|=c<<24-(s+a)%4*8}else for(var u=0;u>>2]=n[u>>>2];return this.sigBytes+=o,this},clamp:function(){var t=i,r=this[t(245)],n=this[t(229)];r[n>>>2]&=4294967295<<32-n%4*8,r.length=e[t(231)](n/4)},clone:function(){var e=i,t=u.clone[e(237)](this);return t[e(245)]=this[e(245)][e(265)](0),t},random:function(e){for(var t=i,r=[],n=0;n>>2]>>>24-o%4*8&255;s[t(239)]((a>>>4).toString(16)),s.push((15&a)[t(230)](16))}return s[t(222)]("")},parse:function(e){for(var t=i,r=e[t(243)],n=[],s=0;s>>3]|=parseInt(e[t(244)](s,2),16)<<24-s%8*4;return new(l[t(216)])(n,r/2)}},f=d[i(215)]={stringify:function(e){for(var t=i,r=e[t(245)],n=e.sigBytes,s=[],o=0;o>>2]>>>24-o%4*8&255;s.push(String[t(259)](a))}return s[t(222)]("")},parse:function(e){for(var t=i,r=e[t(243)],n=[],s=0;s>>2]|=(255&e[t(235)](s))<<24-s%4*8;return new(l[t(216)])(n,r)}},p=d[i(277)]={stringify:function(e){var t=i;try{return decodeURIComponent(escape(f[t(242)](e)))}catch(e){throw new Error(t(228))}},parse:function(e){return f[i(248)](unescape(encodeURIComponent(e)))}},m=c[i(233)]=u.extend({reset:function(){var e=i;this[e(257)]=new(l[e(216)]),this[e(223)]=0},_append:function(e){var t=i;typeof e==t(280)&&(e=p[t(248)](e)),this._data.concat(e),this[t(223)]+=e[t(229)]},_process:function(t){var r,n=i,s=this[n(257)],o=s.words,a=s[n(229)],c=this[n(251)],u=a/(4*c),d=(u=t?e[n(231)](u):e[n(232)]((0|u)-this[n(274)],0))*c,h=e[n(276)](4*d,a);if(d){for(var f=0;f>>2]|=e[o]<<24-o%4*8;n[r(220)](this,s,i)}else n.apply(this,arguments)};i[t(202)]=r}}(),e[t(203)].WordArray},"object"===(i=Bi)(218)?e[i(199)]=n(Ai):"undefined"===i(196)&&(void 0)[i(221)]?(void 0)([i(210)],n):n(r[i(222)])}));function Mi(){var e=["fromCharCode","words","65BZuCtG","enc","Utf16LE","141ooCsaS","11498769TaoAtQ","create","923160TJOomH","2033832zsArPE","67962goovFq","createCommonjsModule","join","exports","function","Utf16BE","9356BHcvvq","Utf16","1332140UBduhH","object","amd","WordArray","charCodeAt","commonjsGlobal","length","push","434038OCVXJA","CryptoJS","sigBytes"];return(Mi=function(){return e})()}var Pi=Ui;!function(e,t){for(var r=Ui,n=e();;)try{if(337200===-parseInt(r(310))/1+-parseInt(r(331))/2+parseInt(r(318))/3*(-parseInt(r(329))/4)+parseInt(r(315))/5*(parseInt(r(323))/6)+-parseInt(r(321))/7+parseInt(r(322))/8+parseInt(r(319))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Mi);Qe[Pi(324)]((function(e,t){var r,n,i,s=Pi;r=Qe[s(336)],n=function(e){var t=s;return function(){var t=Ui,r=e,n=r.lib[t(334)],i=r.enc;function s(e){return e<<8&4278255360|e>>>8&16711935}i.Utf16=i[t(328)]={stringify:function(e){for(var r=t,n=e[r(314)],i=e[r(312)],s=[],o=0;o>>2]>>>16-o%4*8&65535;s[r(338)](String[r(313)](a))}return s[r(325)]("")},parse:function(e){for(var r=t,i=e[r(337)],s=[],o=0;o>>1]|=e[r(335)](o)<<16-o%2*16;return n.create(s,2*i)}},i[t(317)]={stringify:function(e){for(var r=t,n=e[r(314)],i=e.sigBytes,o=[],a=0;a>>2]>>>16-a%4*8&65535);o[r(338)](String[r(313)](c))}return o[r(325)]("")},parse:function(e){for(var r=t,i=e.length,o=[],a=0;a>>1]|=s(e[r(335)](a)<<16-a%2*16);return n[r(320)](o,2*i)}}}(),e[t(316)][t(330)]},"object"===(i=Ui)(332)?e[i(326)]=n(Ai):"undefined"===i(327)&&(void 0)[i(333)]?(void 0)(["./core"],n):n(r[i(311)])}));function Ui(e,t){var r=Mi();return(Ui=function(e,t){return r[e-=310]})(e,t)}var Fi=Li;function Ri(){var e=["charCodeAt","create","length","function","CryptoJS","sigBytes","push","2829729ptVpJK","4025420pAwnxO","_map","8719068iHLDgz","enc","5qBuDzy","commonjsGlobal","amd","indexOf","Base64","893416wtlbsa","clamp","8999837EmCOmJ","3qWWToQ","323265CBctaw","words","charAt","4vkJjEC","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","object","13824ABxFeP","_reverseMap","createCommonjsModule","20hYLMSw","./core"];return(Ri=function(){return e})()}function Li(e,t){var r=Ri();return(Li=function(e,t){return r[e-=481]})(e,t)}!function(e,t){for(var r=Li,n=e();;)try{if(952269===-parseInt(r(488))/1*(-parseInt(r(491))/2)+parseInt(r(487))/3*(parseInt(r(507))/4)+-parseInt(r(511))/5*(-parseInt(r(509))/6)+-parseInt(r(506))/7+-parseInt(r(484))/8+-parseInt(r(494))/9+parseInt(r(497))/10*(-parseInt(r(486))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ri);Qe[Fi(496)]((function(e,t){var r,n,i,s=Fi;r=Qe[s(512)],n=function(e){var t,r,n,i=s;return t=Li,n=(r=e).lib.WordArray,r[t(510)][t(483)]={stringify:function(e){var r=t,n=e[r(489)],i=e[r(504)],s=this[r(508)];e[r(485)]();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,u=0;u<4&&a+.75*u>>6*(3-u)&63));var l=s[r(490)](64);if(l)for(;o[r(501)]%4;)o[r(505)](l);return o.join("")},parse:function(e){var r=t,i=e[r(501)],s=this._map,o=this[r(495)];if(!o){o=this[r(495)]=[];for(var a=0;a>>6-c%4*2;o[a>>>2]|=u<<24-a%4*8,a++}return n[s(500)](o,a)}(e,i,o)},_map:t(492)},e.enc[i(483)]},(i=Li)(493)==i(493)?e.exports=n(Ai):"undefined"===i(502)&&(void 0)[i(481)]?(void 0)([i(498)],n):n(r[i(503)])}));var Oi=Ni;function zi(){var e=["commonjsGlobal","charCodeAt","charAt","exports","_map","createCommonjsModule","indexOf","30376588dIKhUm","./core","2284820UWZNVV","18UujLyO","Base64url","object","116oSjFvC","3844575lAJmlm","push","13777PojWTi","join","function","sigBytes","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_","12vTxrDb","words","3189456BXLnWD","length","enc","_reverseMap","CryptoJS","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","66gyTCrT","3789660OpPCwI","lib","_safe_map","29320INLaNG"];return(zi=function(){return e})()}function Ni(e,t){var r=zi();return(Ni=function(e,t){return r[e-=116]})(e,t)}!function(e,t){for(var r=Ni,n=e();;)try{if(588326===-parseInt(r(132))/1*(-parseInt(r(129))/2)+-parseInt(r(145))/3*(parseInt(r(149))/4)+parseInt(r(146))/5+-parseInt(r(137))/6*(-parseInt(r(130))/7)+parseInt(r(139))/8+-parseInt(r(126))/9*(-parseInt(r(125))/10)+-parseInt(r(123))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(zi);Qe[Oi(121)]((function(e,t){var r,n,i,s=Oi;r=Qe[s(116)],n=function(e){var t,r,n,i=s;return n=(r=e)[(t=Ni)(147)].WordArray,r.enc[t(127)]={stringify:function(e,r){var n=t;void 0===r&&(r=!0);var i=e[n(138)],s=e[n(135)],o=r?this[n(148)]:this[n(120)];e.clamp();for(var a=[],c=0;c>>2]>>>24-c%4*8&255)<<16|(i[c+1>>>2]>>>24-(c+1)%4*8&255)<<8|i[c+2>>>2]>>>24-(c+2)%4*8&255,l=0;l<4&&c+.75*l>>6*(3-l)&63));var d=o.charAt(64);if(d)for(;a.length%4;)a.push(d);return a[n(133)]("")},parse:function(e,r){var i=t;void 0===r&&(r=!0);var s=e[i(140)],o=r?this._safe_map:this[i(120)],a=this[i(142)];if(!a){a=this[i(142)]=[];for(var c=0;c>>6-c%4*2;o[a>>>2]|=u<<24-a%4*8,a++}return n.create(o,a)}(e,s,a)},_map:t(144),_safe_map:t(136)},e[i(141)][i(127)]},(i=Ni)(128)==i(128)?e[i(119)]=n(Ai):"undefined"===i(134)&&(void 0).amd?(void 0)([i(124)],n):n(r[i(143)])}));var Hi=Wi;function Vi(){var e=["function","object","exports","6765pNTqOY","5650SbnTLA","1024704BJgQrF","createCommonjsModule","MD5","_createHelper","WordArray","6QgyAZL","commonjsGlobal","144BWmWdF","76997feUrOx","_data","call","_hash","76lxsPEo","sin","init","clone","amd","169971bWpnWT","sigBytes","136143IwRDyq","./core","_nDataBytes","floor","lib","algo","words","3591XMdhIT","46870HsxYFM","_process","length"];return(Vi=function(){return e})()}function Wi(e,t){var r=Vi();return(Wi=function(e,t){return r[e-=141]})(e,t)}!function(e,t){for(var r=Wi,n=e();;)try{if(106656===-parseInt(r(169))/1+-parseInt(r(166))/2*(-parseInt(r(143))/3)+-parseInt(r(173))/4*(-parseInt(r(153))/5)+parseInt(r(161))/6+parseInt(r(145))/7+-parseInt(r(168))/8*(parseInt(r(152))/9)+-parseInt(r(160))/10*(parseInt(r(159))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Vi);Qe[Hi(162)]((function(e,t){var r,n,i,s=Hi;r=Qe[s(167)],n=function(e){var t=s;return function(t){var r=Wi,n=e,i=n[r(149)],s=i[r(165)],o=i.Hasher,a=n[r(150)],c=[];!function(){for(var e=r,n=0;n<64;n++)c[n]=4294967296*t.abs(t[e(174)](n+1))|0}();var u=a.MD5=o.extend({_doReset:function(){var e=r;this[e(172)]=new(s[e(175)])([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=r,i=0;i<16;i++){var s=t+i,o=e[s];e[s]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a=this[n(172)][n(151)],u=e[t+0],p=e[t+1],m=e[t+2],v=e[t+3],y=e[t+4],_=e[t+5],g=e[t+6],b=e[t+7],w=e[t+8],S=e[t+9],I=e[t+10],A=e[t+11],E=e[t+12],k=e[t+13],C=e[t+14],x=e[t+15],T=a[0],B=a[1],D=a[2],M=a[3];T=l(T,B,D,M,u,7,c[0]),M=l(M,T,B,D,p,12,c[1]),D=l(D,M,T,B,m,17,c[2]),B=l(B,D,M,T,v,22,c[3]),T=l(T,B,D,M,y,7,c[4]),M=l(M,T,B,D,_,12,c[5]),D=l(D,M,T,B,g,17,c[6]),B=l(B,D,M,T,b,22,c[7]),T=l(T,B,D,M,w,7,c[8]),M=l(M,T,B,D,S,12,c[9]),D=l(D,M,T,B,I,17,c[10]),B=l(B,D,M,T,A,22,c[11]),T=l(T,B,D,M,E,7,c[12]),M=l(M,T,B,D,k,12,c[13]),D=l(D,M,T,B,C,17,c[14]),T=d(T,B=l(B,D,M,T,x,22,c[15]),D,M,p,5,c[16]),M=d(M,T,B,D,g,9,c[17]),D=d(D,M,T,B,A,14,c[18]),B=d(B,D,M,T,u,20,c[19]),T=d(T,B,D,M,_,5,c[20]),M=d(M,T,B,D,I,9,c[21]),D=d(D,M,T,B,x,14,c[22]),B=d(B,D,M,T,y,20,c[23]),T=d(T,B,D,M,S,5,c[24]),M=d(M,T,B,D,C,9,c[25]),D=d(D,M,T,B,v,14,c[26]),B=d(B,D,M,T,w,20,c[27]),T=d(T,B,D,M,k,5,c[28]),M=d(M,T,B,D,m,9,c[29]),D=d(D,M,T,B,b,14,c[30]),T=h(T,B=d(B,D,M,T,E,20,c[31]),D,M,_,4,c[32]),M=h(M,T,B,D,w,11,c[33]),D=h(D,M,T,B,A,16,c[34]),B=h(B,D,M,T,C,23,c[35]),T=h(T,B,D,M,p,4,c[36]),M=h(M,T,B,D,y,11,c[37]),D=h(D,M,T,B,b,16,c[38]),B=h(B,D,M,T,I,23,c[39]),T=h(T,B,D,M,k,4,c[40]),M=h(M,T,B,D,u,11,c[41]),D=h(D,M,T,B,v,16,c[42]),B=h(B,D,M,T,g,23,c[43]),T=h(T,B,D,M,S,4,c[44]),M=h(M,T,B,D,E,11,c[45]),D=h(D,M,T,B,x,16,c[46]),T=f(T,B=h(B,D,M,T,m,23,c[47]),D,M,u,6,c[48]),M=f(M,T,B,D,b,10,c[49]),D=f(D,M,T,B,C,15,c[50]),B=f(B,D,M,T,_,21,c[51]),T=f(T,B,D,M,E,6,c[52]),M=f(M,T,B,D,v,10,c[53]),D=f(D,M,T,B,I,15,c[54]),B=f(B,D,M,T,p,21,c[55]),T=f(T,B,D,M,w,6,c[56]),M=f(M,T,B,D,x,10,c[57]),D=f(D,M,T,B,g,15,c[58]),B=f(B,D,M,T,k,21,c[59]),T=f(T,B,D,M,y,6,c[60]),M=f(M,T,B,D,A,10,c[61]),D=f(D,M,T,B,m,15,c[62]),B=f(B,D,M,T,S,21,c[63]),a[0]=a[0]+T|0,a[1]=a[1]+B|0,a[2]=a[2]+D|0,a[3]=a[3]+M|0},_doFinalize:function(){var e=r,n=this[e(170)],i=n.words,s=8*this[e(147)],o=8*n[e(144)];i[o>>>5]|=128<<24-o%32;var a=t[e(148)](s/4294967296),c=s;i[15+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(o+64>>>9<<4)]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),n[e(144)]=4*(i[e(155)]+1),this[e(154)]();for(var u=this[e(172)],l=u[e(151)],d=0;d<4;d++){var h=l[d];l[d]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return u},clone:function(){var e=r,t=o[e(141)][e(171)](this);return t[e(172)]=this._hash.clone(),t}});function l(e,t,r,n,i,s,o){var a=e+(t&r|~t&n)+i+o;return(a<>>32-s)+t}function d(e,t,r,n,i,s,o){var a=e+(t&n|r&~n)+i+o;return(a<>>32-s)+t}function h(e,t,r,n,i,s,o){var a=e+(t^r^n)+i+o;return(a<>>32-s)+t}function f(e,t,r,n,i,s,o){var a=e+(r^(t|~n))+i+o;return(a<>>32-s)+t}n[r(163)]=o[r(164)](u),n.HmacMD5=o._createHmacHelper(u)}(Math),e[t(163)]},"object"===(i=Wi)(157)?e[i(158)]=n(Ai):"undefined"===i(156)&&(void 0)[i(142)]?(void 0)([i(146)],n):n(r.CryptoJS)}));var ji=Gi;function Gi(e,t){var r=qi();return(Gi=function(e,t){return r[e-=360]})(e,t)}function qi(){var e=["object","4849536HsohsP","15404oqwdja","amd","CryptoJS","6696TGMJrx","floor","HmacSHA1","WordArray","13541OmASnv","commonjsGlobal","length","155468iPayEW","SHA1","algo","7trAxZl","./core","extend","call","_hash","8470060klqmzE","Hasher","exports","function","words","1329lAXmpC","8BwFOgQ","_process","createCommonjsModule","12094370yTAPkU","9VGAFNr","sigBytes","_nDataBytes","2616698PETbVo","lib","_createHmacHelper","clone"];return(qi=function(){return e})()}!function(e,t){for(var r=Gi,n=e();;)try{if(905774===-parseInt(r(370))/1*(parseInt(r(367))/2)+-parseInt(r(380))/3*(parseInt(r(394))/4)+parseInt(r(375))/5+-parseInt(r(393))/6+-parseInt(r(388))/7*(-parseInt(r(381))/8)+-parseInt(r(385))/9*(-parseInt(r(384))/10)+parseInt(r(364))/11*(parseInt(r(360))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(qi);Qe[ji(383)]((function(e,t){var r,n,i,s=ji;r=Qe[s(365)],n=function(e){var t,r,n,i,o,a,c,u,l=s;return n=(r=e)[(t=Gi)(389)],i=n[t(363)],o=n[t(376)],a=r[t(369)],c=[],u=a[t(368)]=o[t(372)]({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,r){for(var n=t,i=this._hash[n(379)],s=i[0],o=i[1],a=i[2],u=i[3],l=i[4],d=0;d<80;d++){if(d<16)c[d]=0|e[r+d];else{var h=c[d-3]^c[d-8]^c[d-14]^c[d-16];c[d]=h<<1|h>>>31}var f=(s<<5|s>>>27)+l+c[d];f+=d<20?1518500249+(o&a|~o&u):d<40?1859775393+(o^a^u):d<60?(o&a|o&u|a&u)-1894007588:(o^a^u)-899497514,l=u,u=a,a=o<<30|o>>>2,o=s,s=f}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+a|0,i[3]=i[3]+u|0,i[4]=i[4]+l|0},_doFinalize:function(){var e=t,r=this._data,n=r[e(379)],i=8*this[e(387)],s=8*r.sigBytes;return n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=Math[e(361)](i/4294967296),n[15+(s+64>>>9<<4)]=i,r[e(386)]=4*n[e(366)],this[e(382)](),this[e(374)]},clone:function(){var e=t,r=o.clone[e(373)](this);return r[e(374)]=this[e(374)][e(391)](),r}}),r.SHA1=o._createHelper(u),r[t(362)]=o[t(390)](u),e[l(368)]},(i=Gi)(392)==i(392)?e[i(377)]=n(Ai):"undefined"===i(378)&&(void 0)[i(395)]?(void 0)([i(371)],n):n(r[i(396)])}));var $i=Yi;function Yi(e,t){var r=Ki();return(Yi=function(e,t){return r[e-=344]})(e,t)}function Ki(){var e=["506584VybaZp","_hash","5681745zcYEwm","4361706UwylAL","Hasher","568KpmptG","pow","length","clone","_data","object","exports","init","call","6ETcDLX","./core","sigBytes","extend","slice","commonjsGlobal","28799vmsBNd","createCommonjsModule","floor","amd","_nDataBytes","168804uYqPmp","WordArray","10kAeMlH","words","_createHelper","14107269SiuvEX","HmacSHA256","function","20jUTlyt","lib","SHA256","53473oaHAYW","algo"];return(Ki=function(){return e})()}!function(e,t){for(var r=Yi,n=e();;)try{if(603717===parseInt(r(359))/1*(-parseInt(r(372))/2)+parseInt(r(353))/3*(-parseInt(r(377))/4)+-parseInt(r(379))/5+-parseInt(r(364))/6+parseInt(r(375))/7*(parseInt(r(344))/8)+parseInt(r(380))/9*(parseInt(r(366))/10)+parseInt(r(369))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ki);Qe[$i(360)]((function(e,t){var r,n,i,s=$i;r=Qe[s(358)],n=function(e){var t=s;return function(t){var r=Yi,n=e,i=n[r(373)],s=i[r(365)],o=i[r(381)],a=n[r(376)],c=[],u=[];!function(){var e=r;function n(e){for(var r=t.sqrt(e),n=2;n<=r;n++)if(!(e%n))return!1;return!0}function i(e){return 4294967296*(e-(0|e))|0}for(var s=2,o=0;o<64;)n(s)&&(o<8&&(c[o]=i(t.pow(s,.5))),u[o]=i(t[e(345)](s,1/3)),o++),s++}();var l=[],d=a[r(374)]=o[r(356)]({_doReset:function(){var e=r;this[e(378)]=new(s[e(351)])(c[e(357)](0))},_doProcessBlock:function(e,t){for(var n=r,i=this[n(378)][n(367)],s=i[0],o=i[1],a=i[2],c=i[3],d=i[4],h=i[5],f=i[6],p=i[7],m=0;m<64;m++){if(m<16)l[m]=0|e[t+m];else{var v=l[m-15],y=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3,_=l[m-2],g=(_<<15|_>>>17)^(_<<13|_>>>19)^_>>>10;l[m]=y+l[m-7]+g+l[m-16]}var b=s&o^s&a^o&a,w=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),S=p+((d<<26|d>>>6)^(d<<21|d>>>11)^(d<<7|d>>>25))+(d&h^~d&f)+u[m]+l[m];p=f,f=h,h=d,d=c+S|0,c=a,a=o,o=s,s=S+(w+b)|0}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+a|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0,i[5]=i[5]+h|0,i[6]=i[6]+f|0,i[7]=i[7]+p|0},_doFinalize:function(){var e=r,n=this[e(348)],i=n[e(367)],s=8*this[e(363)],o=8*n[e(355)];return i[o>>>5]|=128<<24-o%32,i[14+(o+64>>>9<<4)]=t[e(361)](s/4294967296),i[15+(o+64>>>9<<4)]=s,n.sigBytes=4*i[e(346)],this._process(),this._hash},clone:function(){var e=r,t=o[e(347)][e(352)](this);return t[e(378)]=this[e(378)][e(347)](),t}});n[r(374)]=o[r(368)](d),n[r(370)]=o._createHmacHelper(d)}(Math),e[t(374)]},(i=Yi)(349)==i(349)?e[i(350)]=n(Ai):"undefined"===i(371)&&(void 0)[i(362)]?(void 0)([i(354)],n):n(r.CryptoJS)}));function Ji(e,t){var r=Xi();return(Ji=function(e,t){return r[e-=128]})(e,t)}function Xi(){var e=["sigBytes","713438cDKZDh","315726yqvUcH","extend","object","WordArray","228GXkHRv","./core","3466300SkIjhB","9946832axfRxZ","95graGPI","8927432tzeSDf","1GGAGkQ","HmacSHA224","349582jfoPRd","function","lib","SHA224","_hash","_doFinalize","amd","./sha256","commonjsGlobal","init","359454TPgAje","36aIYYxL","CryptoJS","9iccjkl"];return(Xi=function(){return e})()}!function(e,t){for(var r=Ji,n=e();;)try{if(974275===-parseInt(r(144))/1*(parseInt(r(146))/2)+parseInt(r(134))/3*(-parseInt(r(129))/4)+parseInt(r(142))/5*(parseInt(r(128))/6)+parseInt(r(141))/7+parseInt(r(143))/8*(parseInt(r(131))/9)+-parseInt(r(140))/10+parseInt(r(133))/11*(-parseInt(r(138))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Xi);Ze((function(e,t){var r,n,i,s=Ji;r=Qe[s(154)],n=function(e){var t,r,n,i,o,a,c=s;return n=(r=e)[(t=Ji)(148)][t(137)],i=r.algo,o=i.SHA256,a=i.SHA224=o[t(135)]({_doReset:function(){var e=t;this[e(150)]=new(n[e(155)])([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=t,r=o[e(151)].call(this);return r[e(132)]-=4,r}}),r[t(149)]=o._createHelper(a),r[t(145)]=o._createHmacHelper(a),e[c(149)]},(i=Ji)(136)==i(136)?e.exports=n(Ai):"undefined"===i(147)&&(void 0)[i(152)]?(void 0)([i(139),i(153)],n):n(r[i(130)])}));var Zi=es;function Qi(){var e=["object","x64","120253hvtRWi","sigBytes","lib","Word","_data","8340hReMxq","45045ZkaQeH","CryptoJS","_createHmacHelper","SHA512","_hash","Hasher","_process","3028215fVBFnN","./core","extend","toX32","1891000aBqqiG","exports","createCommonjsModule","high","words","floor","4RXhvsi","init","1087xcEOBs","3177yyJhjE","6800sWWpOf","385533rTiPrD","3106QrvDHC","low","clone","_createHelper","./x64-core","498hRLGPc"];return(Qi=function(){return e})()}function es(e,t){var r=Qi();return(es=function(e,t){return r[e-=472]})(e,t)}!function(e,t){for(var r=es,n=e();;)try{if(955361===parseInt(r(503))/1*(-parseInt(r(507))/2)+parseInt(r(506))/3+-parseInt(r(501))/4*(-parseInt(r(491))/5)+parseInt(r(475))/6*(-parseInt(r(478))/7)+parseInt(r(505))/8*(parseInt(r(504))/9)+parseInt(r(495))/10+-parseInt(r(484))/11*(-parseInt(r(483))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Qi);Qe[Zi(497)]((function(e,t){var r,n,i;r=Je,n=function(e){return function(){var t=es,r=e,n=r[t(480)][t(489)],i=r[t(477)],s=i[t(481)],o=i.WordArray,a=r.algo;function c(){return s.create.apply(s,arguments)}var u=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=c()}();var d=a[t(487)]=n[t(493)]({_doReset:function(){var e=t;this._hash=new(o[e(502)])([new s.init(1779033703,4089235720),new s.init(3144134277,2227873595),new(s[e(502)])(1013904242,4271175723),new s.init(2773480762,1595750129),new(s[e(502)])(1359893119,2917565137),new(s[e(502)])(2600822924,725511199),new(s[e(502)])(528734635,4215389547),new(s[e(502)])(1541459225,327033209)])},_doProcessBlock:function(e,r){for(var n=t,i=this._hash[n(499)],s=i[0],o=i[1],a=i[2],c=i[3],d=i[4],h=i[5],f=i[6],p=i[7],m=s.high,v=s.low,y=o[n(498)],_=o[n(508)],g=a[n(498)],b=a.low,w=c[n(498)],S=c[n(508)],I=d.high,A=d[n(508)],E=h[n(498)],k=h[n(508)],C=f[n(498)],x=f[n(508)],T=p.high,B=p.low,D=m,M=v,P=y,U=_,F=g,R=b,L=w,O=S,z=I,N=A,H=E,V=k,W=C,j=x,G=T,q=B,$=0;$<80;$++){var Y,K,J=l[$];if($<16)K=J[n(498)]=0|e[r+2*$],Y=J[n(508)]=0|e[r+2*$+1];else{var X=l[$-15],Z=X[n(498)],Q=X[n(508)],ee=(Z>>>1|Q<<31)^(Z>>>8|Q<<24)^Z>>>7,te=(Q>>>1|Z<<31)^(Q>>>8|Z<<24)^(Q>>>7|Z<<25),re=l[$-2],ne=re[n(498)],ie=re[n(508)],se=(ne>>>19|ie<<13)^(ne<<3|ie>>>29)^ne>>>6,oe=(ie>>>19|ne<<13)^(ie<<3|ne>>>29)^(ie>>>6|ne<<26),ae=l[$-7],ce=ae[n(498)],ue=ae.low,le=l[$-16],de=le[n(498)],he=le[n(508)];K=(K=(K=ee+ce+((Y=te+ue)>>>0>>0?1:0))+se+((Y+=oe)>>>0>>0?1:0))+de+((Y+=he)>>>0>>0?1:0),J[n(498)]=K,J.low=Y}var fe,pe=z&H^~z&W,me=N&V^~N&j,ve=D&P^D&F^P&F,ye=M&U^M&R^U&R,_e=(D>>>28|M<<4)^(D<<30|M>>>2)^(D<<25|M>>>7),ge=(M>>>28|D<<4)^(M<<30|D>>>2)^(M<<25|D>>>7),be=(z>>>14|N<<18)^(z>>>18|N<<14)^(z<<23|N>>>9),we=(N>>>14|z<<18)^(N>>>18|z<<14)^(N<<23|z>>>9),Se=u[$],Ie=Se[n(498)],Ae=Se[n(508)],Ee=G+be+((fe=q+we)>>>0>>0?1:0),ke=ge+ye;G=W,q=j,W=H,j=V,H=z,V=N,z=L+(Ee=(Ee=(Ee=Ee+pe+((fe+=me)>>>0>>0?1:0))+Ie+((fe+=Ae)>>>0>>0?1:0))+K+((fe+=Y)>>>0>>0?1:0))+((N=O+fe|0)>>>0>>0?1:0)|0,L=F,O=R,F=P,R=U,P=D,U=M,D=Ee+(_e+ve+(ke>>>0>>0?1:0))+((M=fe+ke|0)>>>0>>0?1:0)|0}v=s[n(508)]=v+M,s[n(498)]=m+D+(v>>>0>>0?1:0),_=o[n(508)]=_+U,o.high=y+P+(_>>>0>>0?1:0),b=a[n(508)]=b+R,a.high=g+F+(b>>>0>>0?1:0),S=c[n(508)]=S+O,c[n(498)]=w+L+(S>>>0>>0?1:0),A=d[n(508)]=A+N,d[n(498)]=I+z+(A>>>0>>0?1:0),k=h[n(508)]=k+V,h[n(498)]=E+H+(k>>>0>>0?1:0),x=f[n(508)]=x+j,f.high=C+W+(x>>>0>>0?1:0),B=p.low=B+q,p[n(498)]=T+G+(B>>>0>>0?1:0)},_doFinalize:function(){var e=t,r=this[e(482)],n=r[e(499)],i=8*this._nDataBytes,s=8*r[e(479)];return n[s>>>5]|=128<<24-s%32,n[30+(s+128>>>10<<5)]=Math[e(500)](i/4294967296),n[31+(s+128>>>10<<5)]=i,r[e(479)]=4*n.length,this[e(490)](),this[e(488)][e(494)]()},clone:function(){var e=t,r=n[e(472)].call(this);return r._hash=this[e(488)].clone(),r},blockSize:32});r[t(487)]=n[t(473)](d),r.HmacSHA512=n[t(486)](d)}(),e.SHA512},"object"===(i=es)(476)?e[i(496)]=n(Ai):n(r[i(485)])}));var ts=rs;function rs(e,t){var r=ns();return(rs=function(e,t){return r[e-=150]})(e,t)}!function(e,t){for(var r=rs,n=e();;)try{if(347207===-parseInt(r(164))/1+parseInt(r(168))/2+parseInt(r(172))/3+-parseInt(r(160))/4+parseInt(r(166))/5+-parseInt(r(155))/6*(-parseInt(r(167))/7)+-parseInt(r(152))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ns);Qe[ts(157)]((function(e,t){var r,n,i;r=Qe[ts(156)],n=function(e){return t=rs,n=(r=e).x64,i=n[t(173)],s=n[t(163)],o=r.algo,a=o.SHA512,c=o[t(158)]=a[t(162)]({_doReset:function(){var e=t;this[e(169)]=new(s[e(165)])([new i.init(3418070365,3238371032),new(i[e(165)])(1654270250,914150663),new(i[e(165)])(2438529370,812702999),new(i[e(165)])(355462360,4144912697),new(i[e(165)])(1731405415,4290775857),new(i[e(165)])(2394180231,1750603025),new(i[e(165)])(3675008525,1694076839),new(i[e(165)])(1203062813,3204075428)])},_doFinalize:function(){var e=t,r=a[e(159)].call(this);return r[e(151)]-=16,r}}),r[t(158)]=a[t(174)](c),r.HmacSHA384=a._createHmacHelper(c),e.SHA384;var t,r,n,i,s,o,a,c},"object"===(i=rs)(150)?e[i(171)]=n(Ai):n(r[i(153)])}));function ns(){var e=["1238655JROizh","Word","_createHelper","object","sigBytes","8189912dHrcfO","CryptoJS","./x64-core","738VrJxky","commonjsGlobal","createCommonjsModule","SHA384","_doFinalize","437824jVKFaX","./core","extend","WordArray","130033qDxyTM","init","2886480CIyRCG","6405sfZcxN","1015418rHJuCZ","_hash","amd","exports"];return(ns=function(){return e})()}var is=os;function ss(){var e=["231EQhpRp","./x64-core","Hasher","sigBytes","createCommonjsModule","length","init","_createHmacHelper","high","commonjsGlobal","_data","_createHelper","clone","low","_state","_process","blockSize","slice","1844544iJEhLW","./core","create","extend","algo","SHA3","object","113603MvqhAN","call","_nDataBytes","x64","cfg","outputLength","142xWndBz","272usggYW","WordArray","ceil","HmacSHA3","words","14562OMKBtv","exports","612576rDJWJH","263570vQEkXI","amd","CryptoJS","520845zXLDMo","5021nSBKAI","1115AcWCUV"];return(ss=function(){return e})()}function os(e,t){var r=ss();return(os=function(e,t){return r[e-=320]})(e,t)}!function(e,t){for(var r=os,n=e();;)try{if(405898===parseInt(r(361))/1*(-parseInt(r(348))/2)+-parseInt(r(360))/3+parseInt(r(335))/4+-parseInt(r(362))/5*(-parseInt(r(354))/6)+-parseInt(r(342))/7*(parseInt(r(349))/8)+-parseInt(r(356))/9+-parseInt(r(357))/10*(-parseInt(r(363))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ss);Qe[is(321)]((function(e,t){var r,n,i,s=is;r=Qe[s(326)],n=function(e){var t=s;return function(t){var r=os,n=e,i=n.lib,s=i[r(350)],o=i[r(365)],a=n[r(345)].Word,c=n[r(339)],u=[],l=[],d=[];!function(){for(var e=r,t=1,n=0,i=0;i<24;i++){u[t+5*n]=(i+1)*(i+2)/2%64;var s=(2*t+3*n)%5;t=n%5,n=s}for(t=0;t<5;t++)for(n=0;n<5;n++)l[t+5*n]=n+(2*t+3*n)%5*5;for(var o=1,c=0;c<24;c++){for(var h=0,f=0,p=0;p<7;p++){if(1&o){var m=(1<>>24)|4278255360&(a<<24|a>>>8),c=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),(B=i[o])[n(325)]^=c,B[n(330)]^=a}for(var f=0;f<24;f++){for(var p=0;p<5;p++){for(var m=0,v=0,y=0;y<5;y++)m^=(B=i[p+5*y])[n(325)],v^=B.low;var _=h[p];_[n(325)]=m,_.low=v}for(p=0;p<5;p++){var g=h[(p+4)%5],b=h[(p+1)%5],w=b[n(325)],S=b[n(330)];for(m=g[n(325)]^(w<<1|S>>>31),v=g.low^(S<<1|w>>>31),y=0;y<5;y++)(B=i[p+5*y])[n(325)]^=m,B[n(330)]^=v}for(var I=1;I<25;I++){var A=(B=i[I])[n(325)],E=B[n(330)],k=u[I];k<32?(m=A<>>32-k,v=E<>>32-k):(m=E<>>64-k,v=A<>>64-k);var C=h[l[I]];C[n(325)]=m,C[n(330)]=v}var x=h[0],T=i[0];for(x[n(325)]=T.high,x[n(330)]=T[n(330)],p=0;p<5;p++)for(y=0;y<5;y++){var B=i[I=p+5*y],D=h[I],M=h[(p+1)%5+5*y],P=h[(p+2)%5+5*y];B.high=D.high^~M[n(325)]&P.high,B[n(330)]=D[n(330)]^~M.low&P[n(330)]}B=i[0];var U=d[f];B[n(325)]^=U[n(325)],B[n(330)]^=U[n(330)]}},_doFinalize:function(){var e=r,n=this[e(327)],i=n[e(353)];this[e(344)];var o=8*n[e(320)],a=32*this[e(333)];i[o>>>5]|=1<<24-o%32,i[(t[e(351)]((o+1)/a)*a>>>5)-1]|=128,n[e(320)]=4*i[e(322)],this[e(332)]();for(var c=this._state,u=this[e(346)][e(347)]/8,l=u/8,d=[],h=0;h>>24)|4278255360&(p<<24|p>>>8),m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),d.push(m),d.push(p)}return new(s[e(323)])(d,u)},clone:function(){for(var e=r,t=o.clone[e(343)](this),n=t[e(331)]=this._state[e(334)](0),i=0;i<25;i++)n[i]=n[i][e(329)]();return t}});n[r(340)]=o[r(328)](f),n[r(352)]=o[r(324)](f)}(Math),e[t(340)]},(i=os)(341)==i(341)?e[i(355)]=n(Ai):n(r[i(359)])}));var as=cs;function cs(e,t){var r=us();return(cs=function(e,t){return r[e-=377]})(e,t)}function us(){var e=["HmacRIPEMD160","2410792TLZnuB","_nDataBytes","./core","clone","create","RIPEMD160","object","exports","139690SSiUKh","33206IWaHLq","commonjsGlobal","336432EpwIhb","words","function","call","3552978YxGldX","12625objBVJ","_createHmacHelper","CryptoJS","380cOWHsc","createCommonjsModule","_createHelper","1074618dypZtS","_hash","sigBytes","63SokjFk","length","algo","Hasher","2cyVFiq","7UBjGqt"];return(us=function(){return e})()}!function(e,t){for(var r=cs,n=e();;)try{if(160712===parseInt(r(382))/1*(parseInt(r(394))/2)+parseInt(r(396))/3+parseInt(r(404))/4*(-parseInt(r(401))/5)+parseInt(r(407))/6+-parseInt(r(383))/7*(-parseInt(r(385))/8)+-parseInt(r(378))/9*(-parseInt(r(393))/10)+-parseInt(r(400))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(us);Qe[as(405)]((function(e,t){var r,n,i,s=as;r=Qe[s(395)],n=function(e){var t=s;return function(t){var r=cs,n=e,i=n.lib,s=i.WordArray,o=i[r(381)],a=n[r(380)],c=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=s[r(389)]([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=s.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=s[r(389)]([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=s.create([0,1518500249,1859775393,2400959708,2840853838]),f=s.create([1352829926,1548603684,1836072691,2053994217,0]),p=a[r(390)]=o.extend({_doReset:function(){var e=r;this[e(408)]=s[e(389)]([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=r,i=0;i<16;i++){var s=t+i,o=e[s];e[s]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a,p,w,S,I,A,E,k,C,x,T,B=this[n(408)][n(397)],D=h[n(397)],M=f[n(397)],P=c[n(397)],U=u[n(397)],F=l[n(397)],R=d[n(397)];for(A=a=B[0],E=p=B[1],k=w=B[2],C=S=B[3],x=I=B[4],i=0;i<80;i+=1)T=a+e[t+P[i]]|0,T+=i<16?m(p,w,S)+D[0]:i<32?v(p,w,S)+D[1]:i<48?y(p,w,S)+D[2]:i<64?_(p,w,S)+D[3]:g(p,w,S)+D[4],T=(T=b(T|=0,F[i]))+I|0,a=I,I=S,S=b(w,10),w=p,p=T,T=A+e[t+U[i]]|0,T+=i<16?g(E,k,C)+M[0]:i<32?_(E,k,C)+M[1]:i<48?y(E,k,C)+M[2]:i<64?v(E,k,C)+M[3]:m(E,k,C)+M[4],T=(T=b(T|=0,R[i]))+x|0,A=x,x=C,C=b(k,10),k=E,E=T;T=B[1]+w+C|0,B[1]=B[2]+S+x|0,B[2]=B[3]+I+A|0,B[3]=B[4]+a+E|0,B[4]=B[0]+p+k|0,B[0]=T},_doFinalize:function(){var e=r,t=this._data,n=t[e(397)],i=8*this[e(386)],s=8*t[e(377)];n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t[e(377)]=4*(n[e(379)]+1),this._process();for(var o=this[e(408)],a=o.words,c=0;c<5;c++){var u=a[c];a[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return o},clone:function(){var e=r,t=o[e(388)][e(399)](this);return t._hash=this[e(408)].clone(),t}});function m(e,t,r){return e^t^r}function v(e,t,r){return e&t|~e&r}function y(e,t,r){return(e|~t)^r}function _(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}n[r(390)]=o[r(406)](p),n[r(384)]=o[r(402)](p)}(),e[t(390)]},"object"===(i=cs)(391)?e[i(392)]=n(Ai):"undefined"===i(398)&&(void 0).amd?(void 0)([i(387)],n):n(r[i(403)])}));var ls=hs;function ds(){var e=["lib","3211615wyllCz","object","algo","213xJoMXN","_oKey","Base","clamp","blockSize","commonjsGlobal","createCommonjsModule","clone","string","sigBytes","286058nSDZSw","30786Crnffg","./core","extend","concat","1295696eOMFFu","reset","HMAC","50jkRsBj","_iKey","finalize","amd","20782hXplnm","8TYcxvy","init","CryptoJS","enc","_hasher","exports","623RziByA","words","4378455FjYkKN","Utf8","12370977HKzYlN"];return(ds=function(){return e})()}function hs(e,t){var r=ds();return(hs=function(e,t){return r[e-=129]})(e,t)}!function(e,t){for(var r=hs,n=e();;)try{if(936988===-parseInt(r(162))/1+parseInt(r(136))/2*(-parseInt(r(152))/3)+-parseInt(r(137))/4*(-parseInt(r(145))/5)+parseInt(r(163))/6*(parseInt(r(143))/7)+-parseInt(r(129))/8+parseInt(r(147))/9+parseInt(r(132))/10*(-parseInt(r(149))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ds);Qe[ls(158)]((function(e,t){var r,n,i;r=Qe[ls(157)],n=function(e){var t,r,n,i;n=(r=e)[(t=hs)(148)][t(154)],i=r[t(140)][t(146)],r[t(151)][t(131)]=n[t(165)]({init:function(e,r){var n=t;e=this[n(141)]=new(e[n(138)]),typeof r==n(160)&&(r=i.parse(r));var s=e[n(156)],o=4*s;r[n(161)]>o&&(r=e[n(134)](r)),r[n(155)]();for(var a=this._oKey=r[n(159)](),c=this[n(133)]=r[n(159)](),u=a[n(144)],l=c[n(144)],d=0;d>>2];e[r(197)]-=n}};s[t(157)]=h[t(210)]({cfg:h[t(213)].extend({mode:m,padding:v}),reset:function(){var e,r=t;h[r(145)][r(158)](this);var n=this[r(213)],i=n.iv,s=n.mode;this[r(176)]==this[r(175)]?e=s.createEncryptor:(e=s[r(143)],this[r(169)]=1),this[r(138)]&&this._mode[r(196)]==e?this._mode.init(this,i&&i[r(207)]):(this[r(138)]=e[r(158)](s,this,i&&i.words),this[r(138)][r(196)]=e)},_doProcessBlock:function(e,r){this[t(138)].processBlock(e,r)},_doFinalize:function(){var e,r=t,n=this[r(213)].padding;return this[r(176)]==this._ENC_XFORM_MODE?(n[r(170)](this[r(140)],this[r(129)]),e=this[r(179)](!!r(167))):(e=this[r(179)](!0),n[r(148)](e)),e},blockSize:4});var y=s[t(135)]=o[t(210)]({init:function(e){this.mixIn(e)},toString:function(e){var r=t;return(e||this.formatter)[r(184)](this)}}),_=(i[t(146)]={}).OpenSSL={stringify:function(e){var r=t,n=e.ciphertext,i=e[r(155)];return(i?a[r(160)]([1398893684,1701076831])[r(191)](i)[r(191)](n):n).toString(l)},parse:function(e){var r,n=t,i=l.parse(e),s=i.words;return 1398893684==s[0]&&1701076831==s[1]&&(r=a[n(160)](s[n(177)](2,4)),s[n(208)](0,4),i[n(197)]-=16),y[n(160)]({ciphertext:i,salt:r})}},g=s[t(161)]=o[t(210)]({cfg:o[t(210)]({format:_}),encrypt:function(e,r,n,i){var s=t;i=this[s(213)][s(210)](i);var o=e[s(180)](n,i),a=o[s(199)](r),c=o.cfg;return y[s(160)]({ciphertext:a,key:n,iv:c.iv,algorithm:e,mode:c[s(204)],padding:c[s(142)],blockSize:e.blockSize,formatter:i[s(146)]})},decrypt:function(e,r,n,i){var s=t;return i=this[s(213)][s(210)](i),r=this._parse(r,i[s(146)]),e[s(143)](n,i)[s(199)](r[s(172)])},_parse:function(e,r){return"string"==typeof e?r[t(174)](e,this):e}}),b=(i[t(200)]={})[t(192)]={execute:function(e,r,n,i,s){var o=t;if(!i&&(i=a[o(131)](8)),s)c=d.create({keySize:r+n,hasher:s})[o(173)](e,i);else var c=d[o(160)]({keySize:r+n}).compute(e,i);var u=a[o(160)](c[o(207)].slice(r),4*n);return c[o(197)]=4*r,y[o(160)]({key:c,iv:u,salt:i})}},w=s[t(189)]=g[t(210)]({cfg:g[t(213)][t(210)]({kdf:b}),encrypt:function(e,r,n,i){var s=t,o=(i=this[s(213)][s(210)](i)).kdf[s(201)](n,e[s(193)],e.ivSize,i[s(155)],i[s(151)]);i.iv=o.iv;var a=g[s(198)][s(158)](this,e,r,o[s(178)],i);return a[s(132)](o),a},decrypt:function(e,r,n,i){var s=t;i=this.cfg[s(210)](i),r=this[s(186)](r,i.format);var o=i[s(200)][s(201)](n,e[s(193)],e[s(183)],r[s(155)],i[s(151)]);return i.iv=o.iv,g[s(212)][s(158)](this,e,r,o[s(178)],i)}})}())}));function gs(){var e=["words","splice","_key","extend","307386XflzSw","decrypt","cfg","decryptBlock","Encryptor","commonjsGlobal","blockSize","Base","random","mixIn","_doReset","BufferedBlockAlgorithm","CipherParams","Pkcs7","6oemlCz","_mode","1860859zQsZYn","_data","EvpKDF","padding","createDecryptor","Base64","reset","format","8aJjwGX","unpad","95890tdbrfO","CryptoJS","hasher","Decryptor","WordArray","_prevBlock","salt","algo","BlockCipher","call","577130qzGpyy","create","SerializableCipher","exports","StreamCipher","1291285nHOZRW","_cipher","Cipher","flush","1104174TZifIt","_minBufferSize","pad","amd","ciphertext","compute","parse","_ENC_XFORM_MODE","_xformMode","slice","key","_process","createEncryptor","_DEC_XFORM_MODE","_iv","ivSize","stringify","lib","_parse","./evpkdf","push","PasswordBasedCipher","255320ixFfKA","concat","OpenSSL","keySize","30vFWRuT","encryptBlock","__creator","sigBytes","encrypt","finalize","kdf","execute","./core","BlockCipherMode","mode","string","CBC"];return(gs=function(){return e})()}function bs(){var e=["Decryptor","extend","CFB","2702040scPhoo","BlockCipherMode","_prevBlock","mode","slice","_cipher","exports","448344HyQrcq","./cipher-core","commonjsGlobal","716860hmaOgV","call","object","encryptBlock","1241682KwKHHP","_iv","770520KPpmCu","lib","function","blockSize","10guvEwq","./core","amd","2179170JlOcuO","647769kyjqbW"];return(bs=function(){return e})()}!function(e,t){for(var r=ws,n=e();;)try{if(335530===-parseInt(r(256))/1+parseInt(r(246))/2+-parseInt(r(248))/3+-parseInt(r(270))/4+parseInt(r(252))/5*(parseInt(r(267))/6)+parseInt(r(255))/7+parseInt(r(260))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(bs);Ze((function(e,t){var r,n,i,s=ws;r=Qe[s(269)],n=function(e){var t=s;return e[t(263)].CFB=function(){var r=t,n=e[r(249)][r(261)][r(258)]();function i(e,t,n,i){var s,o=r,a=this[o(247)];a?(s=a.slice(0),this[o(247)]=void 0):s=this[o(262)],i[o(245)](s,0);for(var c=0;c>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var s=n[r(433)]=n.extend({processBlock:function(e,t){var n,s=r,o=this[s(406)],a=o[s(416)],c=this._iv,u=this[s(420)];c&&(u=this._counter=c[s(434)](0),this[s(407)]=void 0),0===((n=u)[0]=i(n[0]))&&(n[1]=i(n[1]));var l=u.slice(0);o.encryptBlock(l,0);for(var d=0;d>>2]|=o<<24-a%4*8,e[r(417)]+=o},unpad:function(e){var t=255&e[n(420)][e.sigBytes-1>>>2];e.sigBytes-=t}},r[n(407)][n(404)])}));var Ls=Os;function Os(e,t){var r=zs();return(Os=function(e,t){return r[e-=465]})(e,t)}!function(e,t){for(var r=Os,n=e();;)try{if(311931===parseInt(r(473))/1+parseInt(r(483))/2*(parseInt(r(477))/3)+parseInt(r(487))/4+-parseInt(r(484))/5*(-parseInt(r(478))/6)+-parseInt(r(479))/7+-parseInt(r(481))/8*(-parseInt(r(482))/9)+-parseInt(r(469))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(zs);Qe[Ls(468)]((function(e,t){var r,n,i,s=Ls;r=Qe[s(472)],n=function(e){var t=s;return e.pad[t(489)]={pad:function(r,n){var i=t,s=4*n,o=s-r[i(480)]%s;r[i(486)](e[i(474)][i(471)].random(o-1)).concat(e[i(474)][i(471)][i(490)]([o<<24],1))},unpad:function(e){var r=t,n=255&e.words[e.sigBytes-1>>>2];e[r(480)]-=n}},e[t(465)][t(489)]},(i=Os)(488)==i(488)?e[i(470)]=n(Ai):"undefined"===i(476)&&(void 0)[i(466)]?(void 0)([i(475),i(485)],n):n(r[i(467)])}));function zs(){var e=["27366kwWuuQ","3669456dTYqhS","sigBytes","136lGOmrr","171333fHJnxi","384870GQBKoy","20OMDRGM","./cipher-core","concat","1670136EaXLle","object","Iso10126","create","pad","amd","CryptoJS","createCommonjsModule","5890960XeztbD","exports","WordArray","commonjsGlobal","88523OYTeQA","lib","./core","function","9HsdIQo"];return(zs=function(){return e})()}function Ns(e,t){var r=Vs();return(Ns=function(e,t){return r[e-=169]})(e,t)}var Hs=Ns;function Vs(){var e=["sigBytes","1012626YImTkI","3412iyvMAE","1799990IUDHJl","26307CgyiXI","WordArray","unpad","350000iuqCmc","1410tbkGcT","object","concat","264lgeImA","pad","./core","CryptoJS","exports","commonjsGlobal","createCommonjsModule","Iso97971","33467potidk","lib","ZeroPadding","686oXiDKD","create","2096718ozmNoi","function","./cipher-core"];return(Vs=function(){return e})()}!function(e,t){for(var r=Ns,n=e();;)try{if(600057===parseInt(r(181))/1*(parseInt(r(174))/2)+-parseInt(r(176))/3+parseInt(r(186))/4+-parseInt(r(182))/5+-parseInt(r(180))/6+parseInt(r(171))/7*(parseInt(r(190))/8)+-parseInt(r(183))/9*(-parseInt(r(187))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Vs);Qe[Hs(169)]((function(e,t){var r,n,i,s=Hs;r=Qe[s(195)],n=function(e){var t=s;return e[t(191)].Iso97971={pad:function(r,n){var i=t;r[i(189)](e[i(172)][i(184)][i(175)]([2147483648],1)),e[i(191)][i(173)][i(191)](r,n)},unpad:function(r){var n=t;e[n(191)][n(173)][n(185)](r),r[n(179)]--}},e.pad[t(170)]},"object"===(i=Ns)(188)?e[i(194)]=n(Ai):"undefined"===i(177)&&(void 0).amd?(void 0)([i(192),i(178)],n):n(r[i(193)])}));var Ws=js;!function(e,t){for(var r=js,n=e();;)try{if(968420===-parseInt(r(353))/1*(-parseInt(r(335))/2)+-parseInt(r(343))/3+parseInt(r(336))/4+-parseInt(r(347))/5*(parseInt(r(340))/6)+-parseInt(r(349))/7+parseInt(r(337))/8+parseInt(r(352))/9*(-parseInt(r(342))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Gs);Qe[Ws(348)]((function(e,t){var r,n,i,s=Ws;r=Qe[s(345)],n=function(e){var t=s;return e.pad.ZeroPadding={pad:function(e,t){var r=js,n=4*t;e[r(346)](),e[r(341)]+=n-(e[r(341)]%n||n)},unpad:function(e){var t=js,r=e.words,n=e[t(341)]-1;for(n=e[t(341)]-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},e[t(339)].ZeroPadding},(i=js)(351)==i(351)?e[i(338)]=n(Ai):n(r[i(350)])}));function js(e,t){var r=Gs();return(js=function(e,t){return r[e-=334]})(e,t)}function Gs(){var e=["1564275OWjHmB","./core","commonjsGlobal","clamp","1610435UImsKZ","createCommonjsModule","7376355EVncbM","CryptoJS","object","9InDUMd","1yWEZmY","amd","3833906ivxEua","7623492xpfVRx","14469280KpOrGo","exports","pad","30neJlYQ","sigBytes","14774410jnajJM"];return(Gs=function(){return e})()}function qs(e,t){var r=$s();return(qs=function(e,t){return r[e-=428]})(e,t)}!function(e,t){for(var r=qs,n=e();;)try{if(915731===-parseInt(r(437))/1*(parseInt(r(431))/2)+-parseInt(r(439))/3+-parseInt(r(433))/4+-parseInt(r(429))/5+-parseInt(r(444))/6*(parseInt(r(432))/7)+parseInt(r(438))/8+parseInt(r(434))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}($s);Ze((function(e,t){var r,n,i,s=qs;r=Qe[s(428)],n=function(e){var t=s;return e.pad.NoPadding={pad:function(){},unpad:function(){}},e[t(430)][t(442)]},(i=qs)(435)==i(435)?e.exports=n(Ai):"undefined"===i(440)&&(void 0)[i(441)]?(void 0)(["./core",i(436)],n):n(r[i(443)])}));function $s(){var e=["pad","1272CGcULr","7JvJVfe","5144936HrxvUo","70458183eEKukS","object","./cipher-core","1852gqLPeY","2037480EmdJvA","5142873crsgqM","function","amd","NoPadding","CryptoJS","9835206PmaMlJ","commonjsGlobal","6750215QluSic"];return($s=function(){return e})()}var Ys=Ks;function Ks(e,t){var r=Js();return(Ks=function(e,t){return r[e-=412]})(e,t)}function Js(){var e=["802971zKlefp","commonjsGlobal","328674NQqBbH","1555972lYpAIi","3195639WeegAv","Hex","createCommonjsModule","function","./core","3381896UsyXcE","590566HYndrY","enc","create","ciphertext","27416763YAxlEU","8oQSZOZ","exports","CipherParams","110lCwjsb","3hvrqkf","object","40IJYlkx","CryptoJS","format","toString"];return(Js=function(){return e})()}!function(e,t){for(var r=Ks,n=e();;)try{if(656920===parseInt(r(416))/1*(parseInt(r(432))/2)+-parseInt(r(426))/3+parseInt(r(425))/4+parseInt(r(415))/5*(-parseInt(r(424))/6)+parseInt(r(431))/7*(-parseInt(r(412))/8)+parseInt(r(422))/9*(-parseInt(r(418))/10)+parseInt(r(436))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Js);Qe[Ys(428)]((function(e,t){var r,n,i,s=Ys;r=Qe[s(423)],n=function(e){var t,r,n,i,o=s;return t=Ks,n=(r=e).lib[t(414)],i=r[t(433)].Hex,r[t(420)][t(427)]={stringify:function(e){var r=t;return e[r(435)][r(421)](i)},parse:function(e){var r=t,s=i.parse(e);return n[r(434)]({ciphertext:s})}},e[o(420)][o(427)]},"object"===(i=Ks)(417)?e[i(413)]=n(Ai):"undefined"===i(429)&&(void 0).amd?(void 0)([i(430),"./cipher-core"],n):n(r[i(419)])}));function Xs(e,t){var r=Zs();return(Xs=function(e,t){return r[e-=421]})(e,t)}function Zs(){var e=["AES","_invKeySchedule","./core","BlockCipher","function","_nRounds","./cipher-core","6619700XWcorw","extend","object","./evpkdf","_keySchedule","7152033hfKVSE","9LZlrkZ","algo","110dRpIdw","1341336soRdAD","145428fufikP","2322792WdrlDc","exports","words","4Xbquhl","151362HHrhHN","./md5","3222165lyjxLm","_key","_doCryptBlock"];return(Zs=function(){return e})()}!function(e,t){for(var r=Xs,n=e();;)try{if(552162===-parseInt(r(445))/1*(parseInt(r(427))/2)+parseInt(r(429))/3*(-parseInt(r(426))/4)+parseInt(r(447))/5*(parseInt(r(422))/6)+parseInt(r(444))/7+-parseInt(r(421))/8+parseInt(r(423))/9+parseInt(r(439))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Zs);Ze((function(e,t){var r,n,i;r=Je,n=function(e){var t=Xs;return function(){var t=Xs,r=e,n=r.lib[t(435)],i=r[t(446)],s=[],o=[],a=[],c=[],u=[],l=[],d=[],h=[],f=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var i=n^n<<1^n<<2^n<<3^n<<4;i=i>>>8^255&i^99,s[r]=i,o[i]=r;var m=e[r],v=e[m],y=e[v],_=257*e[i]^16843008*i;a[r]=_<<24|_>>>8,c[r]=_<<16|_>>>16,u[r]=_<<8|_>>>24,l[r]=_,_=16843009*y^65537*v^257*m^16843008*r,d[i]=_<<24|_>>>8,h[i]=_<<16|_>>>16,f[i]=_<<8|_>>>24,p[i]=_,r?(r=m^e[e[e[y^m]]],n^=e[e[n]]):r=n=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],v=i.AES=n[t(440)]({_doReset:function(){var e=t;if(!this[e(437)]||this._keyPriorReset!==this[e(430)]){for(var r=this._keyPriorReset=this[e(430)],n=r[e(425)],i=r.sigBytes/4,o=4*((this[e(437)]=i+6)+1),a=this._keySchedule=[],c=0;c6&&c%i==4&&(v=s[v>>>24]<<24|s[v>>>16&255]<<16|s[v>>>8&255]<<8|s[255&v]):(v=s[(v=v<<8|v>>>24)>>>24]<<24|s[v>>>16&255]<<16|s[v>>>8&255]<<8|s[255&v],v^=m[c/i|0]<<24),a[c]=a[c-i]^v);for(var u=this[e(433)]=[],l=0;l>>24]]^h[s[v>>>16&255]]^f[s[v>>>8&255]]^p[s[255&v]]}}},encryptBlock:function(e,r){var n=t;this._doCryptBlock(e,r,this[n(443)],a,c,u,l,s)},decryptBlock:function(e,r){var n=t,i=e[r+1];e[r+1]=e[r+3],e[r+3]=i,this[n(431)](e,r,this._invKeySchedule,d,h,f,p,o),i=e[r+1],e[r+1]=e[r+3],e[r+3]=i},_doCryptBlock:function(e,t,r,n,i,s,o,a){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],d=e[t+2]^r[2],h=e[t+3]^r[3],f=4,p=1;p>>24]^i[l>>>16&255]^s[d>>>8&255]^o[255&h]^r[f++],v=n[l>>>24]^i[d>>>16&255]^s[h>>>8&255]^o[255&u]^r[f++],y=n[d>>>24]^i[h>>>16&255]^s[u>>>8&255]^o[255&l]^r[f++],_=n[h>>>24]^i[u>>>16&255]^s[l>>>8&255]^o[255&d]^r[f++];u=m,l=v,d=y,h=_}m=(a[u>>>24]<<24|a[l>>>16&255]<<16|a[d>>>8&255]<<8|a[255&h])^r[f++],v=(a[l>>>24]<<24|a[d>>>16&255]<<16|a[h>>>8&255]<<8|a[255&u])^r[f++],y=(a[d>>>24]<<24|a[h>>>16&255]<<16|a[u>>>8&255]<<8|a[255&l])^r[f++],_=(a[h>>>24]<<24|a[u>>>16&255]<<16|a[l>>>8&255]<<8|a[255&d])^r[f++],e[t]=m,e[t+1]=v,e[t+2]=y,e[t+3]=_},keySize:8});r[t(432)]=n._createHelper(v)}(),e[t(432)]},(i=Xs)(441)==i(441)?e[i(424)]=n(Ai):"undefined"===i(436)&&(void 0).amd?(void 0)([i(434),"./enc-base64",i(428),i(442),i(438)],n):n(r.CryptoJS)}));var Qs=to;function eo(){var e=["TripleDES","encryptBlock","7IjCQCT","create","963832faMmwL","1670wIRLxg","200315dhZdaY","./md5","DES","4506029nDXdXk","180WKuLPN","_des2","CryptoJS","./enc-base64","algo","_createHelper","_rBlock","_des1","5598SKYgaN","./cipher-core","_invSubKeys","decryptBlock","5048Sewcih","amd","object","call","_lBlock","Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.","slice","_key","words","_doCryptBlock","function","extend","./core","createEncryptor","length","3284yeyKyx","_subKeys","30oIfSPx","BlockCipher","_des3","WordArray","createCommonjsModule","438795gDqtvu","./evpkdf"];return(eo=function(){return e})()}function to(e,t){var r=eo();return(to=function(e,t){return r[e-=261]})(e,t)}!function(e,t){for(var r=to,n=e();;)try{if(323984===parseInt(r(287))/1+-parseInt(r(280))/2*(parseInt(r(299))/3)+-parseInt(r(265))/4+parseInt(r(295))/5*(-parseInt(r(282))/6)+parseInt(r(291))/7*(-parseInt(r(293))/8)+-parseInt(r(261))/9*(parseInt(r(294))/10)+parseInt(r(298))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(eo);Qe[Qs(286)]((function(e,t){var r,n,i;r=Je,n=function(e){var t=to;return function(){var t=to,r=e,n=r.lib,i=n[t(285)],s=n[t(283)],o=r[t(303)],a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=s[t(276)]({_doReset:function(){for(var e=t,r=this[e(272)][e(273)],n=[],i=0;i<56;i++){var s=a[i]-1;n[i]=r[s>>>5]>>>31-s%32&1}for(var o=this[e(281)]=[],l=0;l<16;l++){var d=o[l]=[],h=u[l];for(i=0;i<24;i++)d[i/6|0]|=n[(c[i]-1+h)%28]<<31-i%6,d[4+(i/6|0)]|=n[28+(c[i+24]-1+h)%28]<<31-i%6;for(d[0]=d[0]<<1|d[0]>>>31,i=1;i<7;i++)d[i]=d[i]>>>4*(i-1)+3;d[7]=d[7]<<5|d[7]>>>27}var f=this[e(263)]=[];for(i=0;i<16;i++)f[i]=o[15-i]},encryptBlock:function(e,r){var n=t;this[n(274)](e,r,this[n(281)])},decryptBlock:function(e,r){var n=t;this._doCryptBlock(e,r,this[n(263)])},_doCryptBlock:function(e,r,n){var i=t;this[i(269)]=e[r],this[i(305)]=e[r+1],f[i(268)](this,4,252645135),f[i(268)](this,16,65535),p[i(268)](this,2,858993459),p[i(268)](this,8,16711935),f.call(this,1,1431655765);for(var s=0;s<16;s++){for(var o=n[s],a=this[i(269)],c=this._rBlock,u=0,h=0;h<8;h++)u|=l[h][((c^o[h])&d[h])>>>0];this._lBlock=c,this._rBlock=a^u}var m=this[i(269)];this._lBlock=this[i(305)],this._rBlock=m,f.call(this,1,1431655765),p.call(this,8,16711935),p[i(268)](this,2,858993459),f[i(268)](this,16,65535),f.call(this,4,252645135),e[r]=this._lBlock,e[r+1]=this[i(305)]},keySize:2,ivSize:2,blockSize:2});function f(e,r){var n=t,i=(this[n(269)]>>>e^this._rBlock)&r;this[n(305)]^=i,this[n(269)]^=i<>>e^this._lBlock)&r;this[n(269)]^=i,this._rBlock^=i<>>2]>>>24-c%4*8&255;a=(a+s[o]+u)%256;var l=s[o];s[o]=s[a],s[a]=l}this._i=this._j=0},_doProcessBlock:function(e,r){var n=t;e[r]^=o[n(303)](this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var s=e[t];e[t]=e[r],e[r]=s,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}r[t(304)]=n[t(318)](s);var a=i.RC4Drop=s[t(313)]({cfg:s[t(328)][t(313)]({drop:192}),_doReset:function(){var e=t;s[e(311)][e(303)](this);for(var r=this[e(328)][e(317)];r>0;r--)o[e(303)](this)}});r[t(323)]=n[t(318)](a)}(),e[t(304)]},"object"===(i=io)(302)?e[i(325)]=n(Ai):"undefined"===i(308)&&(void 0).amd?(void 0)([i(301),"./enc-base64",i(309),i(312),i(316)],n):n(r.CryptoJS)}));function io(e,t){var r=no();return(io=function(e,t){return r[e-=301]})(e,t)}var so=oo;function oo(e,t){var r=ao();return(oo=function(e,t){return r[e-=245]})(e,t)}!function(e,t){for(var r=oo,n=e();;)try{if(772267===-parseInt(r(258))/1+parseInt(r(272))/2*(parseInt(r(252))/3)+-parseInt(r(267))/4+-parseInt(r(274))/5*(parseInt(r(268))/6)+-parseInt(r(266))/7*(-parseInt(r(254))/8)+-parseInt(r(248))/9*(-parseInt(r(264))/10)+parseInt(r(250))/11*(-parseInt(r(265))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ao);Qe[so(247)]((function(e,t){var r,n,i,s=so;r=Qe[s(257)],n=function(e){var t=s;return function(){var t=oo,r=e,n=r[t(262)][t(269)],i=r[t(270)],s=[],o=[],a=[],c=i[t(251)]=n[t(271)]({_doReset:function(){for(var e=t,r=this[e(259)][e(260)],n=this.cfg.iv,i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8);var s=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],o=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];for(this._b=0,i=0;i<4;i++)u[e(256)](this);for(i=0;i<8;i++)o[i]^=s[i+4&7];if(n){var a=n[e(260)],c=a[0],l=a[1],d=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=d>>>16|4294901760&h,p=h<<16|65535&d;for(o[0]^=d,o[1]^=f,o[2]^=h,o[3]^=p,o[4]^=d,o[5]^=f,o[6]^=h,o[7]^=p,i=0;i<4;i++)u[e(256)](this)}},_doProcessBlock:function(e,r){var n=t,i=this._X;u[n(256)](this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var o=0;o<4;o++)s[o]=16711935&(s[o]<<8|s[o]>>>24)|4278255360&(s[o]<<24|s[o]>>>8),e[r+o]^=s[o]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}r.Rabbit=n[t(263)](c)}(),e[t(251)]},(i=oo)(273)==i(273)?e[i(249)]=n(Ai):n(r[i(253)])}));function ao(){var e=["1664sFEnzQ","./evpkdf","call","commonjsGlobal","630026kCkqdE","_key","words","./core","lib","_createHelper","4639710gLYuKL","12LYjohe","44499kaKKhs","3539960iAmQPc","270138hrHCIC","StreamCipher","algo","extend","2dnnGVJ","object","130sOIYNN","amd","./cipher-core","./enc-base64","createCommonjsModule","27gombxw","exports","4937119VDdSia","Rabbit","3577623xLoeZb","CryptoJS"];return(ao=function(){return e})()}function co(e,t){var r=uo();return(co=function(e,t){return r[e-=227]})(e,t)}!function(e,t){for(var r=co,n=e();;)try{if(279468===-parseInt(r(229))/1*(parseInt(r(249))/2)+parseInt(r(252))/3+-parseInt(r(247))/4+-parseInt(r(248))/5*(parseInt(r(255))/6)+-parseInt(r(234))/7+parseInt(r(230))/8*(-parseInt(r(246))/9)+-parseInt(r(242))/10*(-parseInt(r(235))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(uo);Ze((function(e,t){var r,n,i,s=co;r=Qe[s(250)],n=function(e){var t=s;return function(){var t=co,r=e,n=r[t(232)][t(251)],i=r[t(254)],s=[],o=[],a=[],c=i[t(244)]=n[t(240)]({_doReset:function(){var e=t,r=this[e(239)][e(231)],n=this.cfg.iv,i=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],s=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];this._b=0;for(var o=0;o<4;o++)u[e(233)](this);for(o=0;o<8;o++)s[o]^=i[o+4&7];if(n){var a=n[e(231)],c=a[0],l=a[1],d=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=d>>>16|4294901760&h,p=h<<16|65535&d;for(s[0]^=d,s[1]^=f,s[2]^=h,s[3]^=p,s[4]^=d,s[5]^=f,s[6]^=h,s[7]^=p,o=0;o<4;o++)u[e(233)](this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),s[0]=r[0]^r[5]>>>16^r[3]<<16,s[1]=r[2]^r[7]>>>16^r[5]<<16,s[2]=r[4]^r[1]>>>16^r[7]<<16,s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)s[n]=16711935&(s[n]<<8|s[n]>>>24)|4278255360&(s[n]<<24|s[n]>>>8),e[t+n]^=s[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}r.RabbitLegacy=n._createHelper(c)}(),e[t(244)]},(i=co)(237)==i(237)?e[i(227)]=n(Ai):"undefined"===i(228)&&(void 0)[i(253)]?(void 0)([i(236),i(243),"./md5",i(238),i(245)],n):n(r[i(241)])}));function uo(){var e=["function","11fRtffs","560mLpOcj","words","lib","call","2472708riqFFP","4452833jAgwwA","./core","object","./evpkdf","_key","extend","CryptoJS","30aEtUPc","./enc-base64","RabbitLegacy","./cipher-core","33966xGtflJ","1224284OMfFMP","100PGYgCs","21686wquvrC","commonjsGlobal","StreamCipher","730761bqeJbS","amd","algo","40728VhEcTe","exports"];return(uo=function(){return e})()}function lo(){const e=["11277BQjBHJ","right","12HyeFZB","exports","BlockCipher","amd","165855oHTUrE","188374YJQBrd","_keyPriorReset","CryptoJS","./cipher-core","pbox","7104504IscGuJ","sigBytes","2aslbog","sbox","left","object","1256PqGbGo","words","_key","function","351358wzMZsG","1131890AxwSCy","extend","./md5","lib","15VcUUjO","./evpkdf","algo","292700OZhdQs"];return(lo=function(){return e})()}function ho(e,t){const r=lo();return(ho=function(e,t){return r[e-=421]})(e,t)}!function(e,t){const r=ho,n=e();for(;;)try{if(117048===parseInt(r(448))/1+parseInt(r(424))/2*(-parseInt(r(447))/3)+parseInt(r(440))/4*(parseInt(r(437))/5)+parseInt(r(443))/6*(parseInt(r(432))/7)+-parseInt(r(428))/8*(-parseInt(r(441))/9)+parseInt(r(433))/10+-parseInt(r(422))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(lo);Ze((function(e,t){!function(t,r,n){const i=ho;"object"===i(427)?e[i(444)]=r(Ai):"undefined"===i(431)&&(void 0)[i(446)]?(void 0)(["./core","./enc-base64",i(435),i(438),i(451)],r):r(t[i(450)])}(Je,(function(e){return function(){const t=ho;var r=e,n=r[t(436)][t(445)],i=r[t(439)];const s=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function u(e,r){const n=t;let i=r>>24&255,s=r>>16&255,o=r>>8&255,a=255&r,c=e[n(425)][0][i]+e.sbox[1][s];return c^=e[n(425)][2][o],c+=e[n(425)][3][a],c}function l(e,r,n){const i=t;let o,a=r,c=n;for(let t=0;t=n&&(s=0);let c=0,u=0,d=0;for(let t=0;t<18;t+=2)d=l(e,c,u),c=d[i(426)],u=d.right,e.pbox[t]=c,e[i(421)][t+1]=u;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)d=l(e,c,u),c=d[i(426)],u=d[i(442)],e[i(425)][t][r]=c,e[i(425)][t][r+1]=u}(c,n,i)}},encryptBlock:function(e,r){const n=t;var i=l(c,e[r],e[r+1]);e[r]=i[n(426)],e[r+1]=i[n(442)]},decryptBlock:function(e,r){const n=t;var i=function(e,r,n){const i=t;let s,o=r,a=n;for(let t=17;t>1;--t)o^=e[i(421)][t],a=u(e,o)^a,s=o,o=a,a=s;return s=o,o=a,a=s,a^=e.pbox[1],o^=e[i(421)][0],{left:o,right:a}}(c,e[r],e[r+1]);e[r]=i[n(426)],e[r+1]=i.right},blockSize:2,keySize:4,ivSize:2});r.Blowfish=n._createHelper(d)}(),e.Blowfish}))}));function fo(e,t){var r=po();return(fo=function(e,t){return r[e-=285]})(e,t)}function po(){var e=["./mode-ctr-gladman","./pad-nopadding","./hmac","./pbkdf2","1tMHPDZ","CryptoJS","./evpkdf","./pad-ansix923","commonjsGlobal","203fpJsjL","13526330iOToaw","./format-hex","./enc-utf16","2575644nhCVrQ","./mode-ofb","./enc-base64url","./cipher-core","596LCGCKC","./sha512","./sha224","./sha256","./enc-base64","object","./aes","./rabbit-legacy","./sha1","./rc4","./blowfish","./pad-iso97971","./x64-core","2965410JPTwQi","2469hFKXkE","91912HEQBQV","exports","11JUFQwc","./mode-ctr","./tripledes","./lib-typedarrays","./md5","./mode-cfb","546692xCsdHt","1421225JwKJxv","amd"];return(po=function(){return e})()}function mo(){const e=["1246761kqAgRp","1343244BPAoiD","get","381549KGOrvB","ctr","byteLength","1759688WpfDYt","243294ztgtgB","20FUlrjp","toString","Counter","4072308iLitVP","111044KqvdCc","decrypt","then","slice","260nDZPZr","set","create","length","5UrXwIy"];return(mo=function(){return e})()}function vo(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function yo(e,t,r){const n=go;let i=arguments[n(123)]>3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const s=e.byteLength;let o=5;for(;os)break;let c=e[o+4],u=!1;if(i?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(c)):(c&=31,u=1===c||5===c),u){const i=e.slice(o+4+2,o+4+a);let s=new(Si.ModeOfOperation[n(129)])(t,new(Si[n(114)])(r));const c=s[n(117)](i);s=null,e[n(121)](c,o+4+2)}o=o+4+a}return e}function _o(e,t,r){const n=go;if(e[n(109)]<=30)return e;const i=e[n(119)](32);let s=new(Si.ModeOfOperation[n(129)])(t,new(Si[n(114)])(r));const o=s[n(117)](i);return s=null,e[n(121)](o,32),e}function go(e,t){const r=mo();return(go=function(e,t){return r[e-=109]})(e,t)}!function(e,t){for(var r=fo,n=e();;)try{if(239450===parseInt(r(324))/1*(-parseInt(r(317))/2)+-parseInt(r(308))/3*(parseInt(r(294))/4)+-parseInt(r(318))/5+-parseInt(r(290))/6+parseInt(r(286))/7*(-parseInt(r(309))/8)+parseInt(r(307))/9+parseInt(r(287))/10*(parseInt(r(311))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(po),Ze((function(e,t){var r,n;r=Qe[fo(285)],(n=fo)(299)==n(299)?e[n(310)]=Ai:r.CryptoJS=r[n(325)]})),function(e,t){const r=go,n=e();for(;;)try{if(996917===parseInt(r(124))/1*(parseInt(r(111))/2)+-parseInt(r(128))/3+-parseInt(r(116))/4*(-parseInt(r(120))/5)+-parseInt(r(115))/6+-parseInt(r(126))/7+parseInt(r(110))/8+parseInt(r(125))/9*(-parseInt(r(112))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(mo);var bo=So;!function(e,t){for(var r=So,n=e();;)try{if(273314===parseInt(r(629))/1*(parseInt(r(1353))/2)+parseInt(r(1094))/3*(-parseInt(r(365))/4)+-parseInt(r(570))/5*(parseInt(r(1087))/6)+parseInt(r(359))/7+parseInt(r(361))/8*(parseInt(r(1461))/9)+parseInt(r(336))/10*(parseInt(r(384))/11)+-parseInt(r(283))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Io);var wo=Qe[bo(1059)]((function(e,t){var r,n,s=bo,o=(r=new Date,n=4,{setLogLevel:function(e){var t=So;n=e==this[t(499)]?1:e==this[t(1303)]?2:e==this.warn?3:(this[t(1086)],4)},debug:function(e,t){var i=So;void 0===console[i(499)]&&(console[i(499)]=console[i(566)]),1>=n&&console[i(499)]("["+o[i(575)](new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this[So(499)](e.msg)},info:function(e,t){var i=So;2>=n&&console.info("["+o[i(575)](new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){var i=So;3>=n&&console[i(647)]("["+o[i(575)](new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){var i=So;4>=n&&console[i(1086)]("["+o[i(575)](new Date-r,1e3)+"]","["+e+"]",t)}});o[s(575)]=function(e,t){var r,n=s;function i(e,t){for(var r=So,n=(""+e)[r(294)](".");n[0][r(949)]0){for(var n="",i=0;i0&&(n+=","),n+="["+o[t(575)](e.start(i))+","+o[t(575)](e[t(1155)](i))+"]";return n}return t(431)},s(854)!==s(814)&&(t.Log=o);var a=function(e){var t=s;if(!(e instanceof ArrayBuffer))throw t(1170);this[t(1392)]=e,this[t(317)]=new DataView(e),this[t(734)]=0};a[s(849)][s(795)]=function(){return this[s(734)]},a[s(849)].getEndPosition=function(){var e=s;return this[e(1392)][e(1338)]},a[s(849)][s(401)]=function(){return this[s(1392)].byteLength},a.prototype.seek=function(e){var t=s,r=Math[t(1056)](0,Math.min(this.buffer[t(1338)],e));return this[t(734)]=isNaN(r)||!isFinite(r)?0:r,!0},a.prototype[s(1079)]=function(){var e=s;return this[e(795)]()>=this[e(632)]()},a[s(849)][s(842)]=function(e,t){var r=s,n=0;if(this[r(734)]+e<=this[r(1392)][r(1338)]){switch(e){case 1:n=t?this.dataview[r(1138)](this.position):this[r(317)][r(591)](this[r(734)]);break;case 2:n=t?this.dataview[r(241)](this[r(734)]):this[r(317)][r(307)](this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";n=this.dataview[r(591)](this[r(734)])<<16,n|=this[r(317)][r(591)](this[r(734)]+1)<<8,n|=this.dataview[r(591)](this.position+2);break;case 4:n=t?this[r(317)].getInt32(this[r(734)]):this[r(317)][r(343)](this[r(734)]);break;case 8:if(t)throw r(1240);n=this[r(317)].getUint32(this.position)<<32,n|=this.dataview[r(343)](this[r(734)]+4);break;default:throw"readInt method not implemented for size: "+e}return this[r(734)]+=e,n}throw r(1444)},a[s(849)][s(931)]=function(){return this[s(842)](1,!1)},a[s(849)].readUint16=function(){return this[s(842)](2,!1)},a.prototype[s(1424)]=function(){return this[s(842)](3,!1)},a[s(849)][s(909)]=function(){return this[s(842)](4,!1)},a[s(849)][s(1085)]=function(){return this[s(842)](8,!1)},a[s(849)][s(469)]=function(e){var t=s;if(this.position+e<=this[t(1392)][t(1338)]){for(var r="",n=0;nthis[t(682)]&&(this._byteLength=r);else{for(n<1&&(n=1);r>n;)n*=2;var i=new ArrayBuffer(n),o=new Uint8Array(this[t(1261)]);new Uint8Array(i,0,o.length)[t(728)](o),this[t(1392)]=i,this._byteLength=r}}},c[s(849)][s(989)]=function(){var e=s;if(this[e(682)]!=this[e(1261)].byteLength){var t=new ArrayBuffer(this[e(682)]),r=new Uint8Array(t),n=new Uint8Array(this[e(1261)],0,r.length);r.set(n),this[e(1392)]=t}},c[s(956)]=!1,c[s(512)]=!0,c[s(849)][s(682)]=0,Object[s(1205)](c[s(849)],s(1338),{get:function(){var e=s;return this[e(682)]-this[e(1e3)]}}),Object[s(1205)](c[s(849)],s(1392),{get:function(){var e=s;return this[e(989)](),this[e(1261)]},set:function(e){var t=s;this[t(1261)]=e,this[t(529)]=new DataView(this[t(1261)],this[t(1e3)]),this[t(682)]=this[t(1261)][t(1338)]}}),Object[s(1205)](c[s(849)],s(925),{get:function(){return this[s(1e3)]},set:function(e){var t=s;this[t(1e3)]=e,this._dataView=new DataView(this._buffer,this[t(1e3)]),this[t(682)]=this[t(1261)][t(1338)]}}),Object[s(1205)](c[s(849)],s(1179),{get:function(){return this[s(529)]},set:function(e){var t=s;this[t(1e3)]=e[t(925)],this[t(1261)]=e.buffer,this[t(529)]=new DataView(this[t(1261)],this._byteOffset),this[t(682)]=this[t(1e3)]+e.byteLength}}),c[s(849)][s(1269)]=function(e){var t=s,r=Math[t(1056)](0,Math[t(292)](this[t(1338)],e));this.position=isNaN(r)||!isFinite(r)?0:r},c[s(849)][s(733)]=function(){var e=s;return this[e(734)]>=this[e(682)]},c[s(849)][s(955)]=function(e){var t=s;this[t(1449)](1*e);var r=new Uint8Array(this._buffer,this[t(925)]+this[t(734)],e);return this[t(734)]+=1*e,r},c[s(849)][s(646)]=function(e,t){var r=s;e=null==e?this[r(1338)]-this[r(734)]/4:e;var n=new Int32Array(e);return c[r(1281)](n[r(1392)],0,this[r(1392)],this[r(925)]+this[r(734)],e*n.BYTES_PER_ELEMENT),c[r(1109)](n,null==t?this.endianness:t),this[r(734)]+=n.byteLength,n},c[s(849)][s(286)]=function(e,t){var r=s;e=null==e?this[r(1338)]-this.position/2:e;var n=new Int16Array(e);return c[r(1281)](n.buffer,0,this.buffer,this[r(925)]+this.position,e*n.BYTES_PER_ELEMENT),c[r(1109)](n,null==t?this[r(312)]:t),this[r(734)]+=n[r(1338)],n},c.prototype[s(446)]=function(e){var t=s;e=null==e?this[t(1338)]-this[t(734)]:e;var r=new Int8Array(e);return c[t(1281)](r[t(1392)],0,this[t(1392)],this.byteOffset+this[t(734)],e*r[t(1211)]),this[t(734)]+=r.byteLength,r},c[s(849)].readUint32Array=function(e,t){var r=s;e=null==e?this[r(1338)]-this[r(734)]/4:e;var n=new Uint32Array(e);return c[r(1281)](n[r(1392)],0,this[r(1392)],this[r(925)]+this[r(734)],e*n.BYTES_PER_ELEMENT),c[r(1109)](n,null==t?this[r(312)]:t),this[r(734)]+=n[r(1338)],n},c[s(849)].readUint16Array=function(e,t){var r=s;e=null==e?this[r(1338)]-this[r(734)]/2:e;var n=new Uint16Array(e);return c[r(1281)](n[r(1392)],0,this[r(1392)],this.byteOffset+this[r(734)],e*n.BYTES_PER_ELEMENT),c[r(1109)](n,null==t?this[r(312)]:t),this[r(734)]+=n[r(1338)],n},c[s(849)][s(424)]=function(e){var t=s;e=null==e?this.byteLength-this[t(734)]:e;var r=new Uint8Array(e);return c[t(1281)](r[t(1392)],0,this[t(1392)],this[t(925)]+this[t(734)],e*r[t(1211)]),this.position+=r[t(1338)],r},c.prototype[s(1026)]=function(e,t){var r=s;e=null==e?this[r(1338)]-this.position/8:e;var n=new Float64Array(e);return c[r(1281)](n[r(1392)],0,this.buffer,this[r(925)]+this[r(734)],e*n[r(1211)]),c[r(1109)](n,null==t?this[r(312)]:t),this[r(734)]+=n[r(1338)],n},c.prototype[s(1360)]=function(e,t){var r=s;e=null==e?this[r(1338)]-this[r(734)]/4:e;var n=new Float32Array(e);return c[r(1281)](n[r(1392)],0,this[r(1392)],this[r(925)]+this.position,e*n[r(1211)]),c[r(1109)](n,null==t?this.endianness:t),this[r(734)]+=n[r(1338)],n},c.prototype[s(1423)]=function(e){var t=s,r=this[t(529)][t(1146)](this[t(734)],null==e?this[t(312)]:e);return this[t(734)]+=4,r},c[s(849)][s(1048)]=function(e){var t=s,r=this._dataView[t(241)](this.position,null==e?this.endianness:e);return this.position+=2,r},c[s(849)][s(965)]=function(){var e=s,t=this[e(529)][e(1138)](this[e(734)]);return this[e(734)]+=1,t},c[s(849)].readUint32=function(e){var t=s,r=this[t(529)][t(343)](this[t(734)],null==e?this.endianness:e);return this[t(734)]+=4,r},c.prototype[s(824)]=function(e){var t=s,r=this[t(529)].getUint16(this.position,null==e?this.endianness:e);return this[t(734)]+=2,r},c[s(849)][s(931)]=function(){var e=s,t=this[e(529)].getUint8(this.position);return this[e(734)]+=1,t},c.prototype[s(1137)]=function(e){var t=s,r=this[t(529)].getFloat32(this.position,null==e?this[t(312)]:e);return this[t(734)]+=4,r},c[s(849)][s(537)]=function(e){var t=s,r=this[t(529)].getFloat64(this[t(734)],null==e?this[t(312)]:e);return this[t(734)]+=8,r},c[s(312)]=new Int8Array(new Int16Array([1])[s(1392)])[0]>0,c[s(1281)]=function(e,t,r,n,i){var o=s,a=new Uint8Array(e,t,i),c=new Uint8Array(r,n,i);a[o(728)](c)},c.arrayToNative=function(e,t){var r=s;return t==this[r(312)]?e:this[r(1420)](e)},c[s(295)]=function(e,t){var r=s;return this[r(312)]==t?e:this[r(1420)](e)},c[s(1420)]=function(e){for(var t=s,r=new Uint8Array(e[t(1392)],e[t(925)],e[t(1338)]),n=0;no;i--,o++){var a=r[o];r[o]=r[i],r[i]=a}return e},c.prototype.failurePosition=0,String[s(281)]=function(e){for(var t=s,r=[],n=0;n>16),this[t(1238)]((65280&e)>>8),this[t(1238)](255&e)},c.prototype[s(544)]=function(e,t){var r=s,n=this[r(734)];this[r(1269)](e),this[r(456)](t),this[r(1269)](n)},c[s(849)][s(584)]=function(e,t){var r=s;this._realloc(4*e);var n=new Int32Array(this._buffer,this[r(925)]+this[r(734)],e);return c[r(1109)](n,null==t?this[r(312)]:t),this[r(734)]+=4*e,n},c[s(849)][s(1383)]=function(e,t){var r=s;this._realloc(2*e);var n=new Int16Array(this[r(1261)],this[r(925)]+this[r(734)],e);return c.arrayToNative(n,null==t?this[r(312)]:t),this.position+=2*e,n},c[s(849)][s(1089)]=function(e){var t=s;this._realloc(1*e);var r=new Int8Array(this[t(1261)],this[t(925)]+this[t(734)],e);return this[t(734)]+=1*e,r},c.prototype[s(354)]=function(e,t){var r=s;this[r(1449)](4*e);var n=new Uint32Array(this[r(1261)],this.byteOffset+this.position,e);return c.arrayToNative(n,null==t?this[r(312)]:t),this[r(734)]+=4*e,n},c[s(849)][s(1018)]=function(e,t){var r=s;this[r(1449)](2*e);var n=new Uint16Array(this[r(1261)],this[r(925)]+this[r(734)],e);return c[r(1109)](n,null==t?this.endianness:t),this.position+=2*e,n},c[s(849)][s(927)]=function(e,t){var r=s;this._realloc(8*e);var n=new Float64Array(this[r(1261)],this[r(925)]+this[r(734)],e);return c[r(1109)](n,null==t?this[r(312)]:t),this[r(734)]+=8*e,n},c[s(849)][s(414)]=function(e,t){var r=s;this[r(1449)](4*e);var n=new Float32Array(this[r(1261)],this[r(925)]+this[r(734)],e);return c[r(1109)](n,null==t?this[r(312)]:t),this.position+=4*e,n};var l=function(e){var t=s;this.buffers=[],this[t(440)]=-1,e&&(this[t(319)](e),this[t(440)]=0)};l.prototype=new c(new ArrayBuffer,0,c[s(956)]),l[s(849)][s(804)]=function(){var e,t=s;return this[t(440)]>-1||(this[t(1082)].length>0?0===(e=this[t(1082)][0])[t(528)]?(this[t(1392)]=e,this.bufferIndex=0,o.debug("MultiBufferStream",t(1004)),!0):(this.logBufferLevel(),!1):(this[t(1394)](),!1))},ArrayBuffer[s(1348)]=function(e,t){var r=s;o[r(499)]("ArrayBuffer","Trying to create a new buffer of size: "+(e[r(1338)]+t.byteLength));var n=new Uint8Array(e[r(1338)]+t.byteLength);return n[r(728)](new Uint8Array(e),0),n[r(728)](new Uint8Array(t),e[r(1338)]),n[r(1392)]},l[s(849)][s(1257)]=function(e,t,r){var n,i=s;return(n=new Uint8Array(r))[i(728)](new Uint8Array(e,t,r)),n.buffer.fileStart=e[i(528)]+t,n[i(1392)][i(1241)]=0,n[i(1392)]},l[s(849)][s(319)]=function(e){for(var t=s,r=!0,n=0;ni[t(1338)]){this[t(1082)][t(811)](n,1),n--;continue}}else e.fileStart+e[t(1338)]<=i[t(528)]||(e=this[t(1257)](e,0,i.fileStart-e[t(528)])),o[t(499)]("MultiBufferStream","Appending new buffer (fileStart: "+e[t(528)]+t(565)+e[t(1338)]+")"),this[t(1082)][t(811)](n,0,e),0===n&&(this[t(1392)]=e);r=!1;break}if(e[t(528)]0)){r=!1;break}e=this[t(1257)](e,a,c)}}r&&(o[t(499)](t(1425),"Appending new buffer (fileStart: "+e[t(528)]+t(565)+e[t(1338)]+")"),this[t(1082)][t(313)](e),0===n&&(this[t(1392)]=e))},l[s(849)][s(1394)]=function(e){var t,r,n,i,a,c=s,u=[],l="";for(n=0,i=0,t=0;t0&&(l+=a[c(1155)]-1+"]");var d=e?o[c(1303)]:o[c(499)];0===this[c(1082)][c(949)]?d(c(1425),"No more buffer in memory"):d(c(1425),""+this[c(1082)][c(949)]+c(1343)+n+"/"+i+c(998)+l)},l[s(849)].cleanBuffers=function(){var e,t,r=s;for(e=0;e"+this[t(1392)][t(1338)]+")"),!0}return!1}return!1},l[s(849)][s(1070)]=function(e,t,r){var n,i=s,a=null,c=-1;for(n=!0===e?0:this[i(440)];n=t?(o[i(499)](i(1425),i(581)+c),c):-1:-1},l[s(849)][s(1410)]=function(e){var t,r,n,i=s,o=void 0!==e?e:this[i(440)];if(r=this[i(1082)][o],this[i(1082)][i(949)]>o+1)for(t=o+1;t>3;return 31===s&&i.data.length>=2&&(s=32+((7&i[r(981)][0])<<3)+((224&i[r(981)][1])>>5)),s}return null},n[e(1120)]=function(t){var r=e;n[r(1005)][r(762)](this,4,t)},n[e(1120)].prototype=new(n[e(1005)]),n[e(1120)].prototype[e(623)]=function(t){var r=e;this.oti=t.readUint8(),this[r(1010)]=t[r(931)](),this.upStream=0!=(this[r(1010)]>>1&1),this.streamType=this.streamType>>>2,this.bufferSize=t[r(1424)](),this.maxBitrate=t[r(909)](),this[r(867)]=t[r(909)](),this[r(362)]-=13,this.parseRemainingDescriptors(t)},n[e(1136)]=function(t){var r=e;n.Descriptor[r(762)](this,5,t)},n.DecoderSpecificInfo[e(849)]=new n.Descriptor,n[e(871)]=function(e){n.Descriptor.call(this,6,e)},n[e(871)][e(849)]=new(n[e(1005)]),this};"object"!==s(814)&&(t[s(561)]=d);var h={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:[s(1032),"idat",s(963),"skip",s(1245),s(718)],FULL_BOXES:[s(929),"nmhd","iods",s(1263),s(1112),s(506),"mere"],CONTAINER_BOXES:[[s(743),["trak",s(873)]],["trak"],[s(872)],[s(540)],[s(1255)],[s(1440)],[s(1201),[s(778),s(747)]],[s(1101),[s(875)]],[s(1234),[s(1256)]],[s(1256),[s(1311),"sgpd",s(747)]],[s(1249)],["tref"],[s(305)],[s(993),[s(453)]],[s(1245)],[s(301)],[s(774)],[s(718)],[s(1378)],[s(1368)],[s(557)],[s(660)],[s(287)],[s(908),[s(276)]],["iprp",["ipma"]],[s(1483)],[s(654)],[s(738)],[s(731),["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){var e=s;h.FullBox[e(849)]=new(h[e(836)]),h[e(445)].prototype=new(h[e(836)]),h[e(1480)][e(849)]=new h.Box,h[e(364)][e(849)]=new(h[e(496)]),h.BASIC_BOXES[e(1029)]((function(e){h.createBoxCtor(e)})),h.FULL_BOXES[e(1029)]((function(t){h[e(620)](t)})),h[e(552)].forEach((function(e){h.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,r){this[s(971)]=e,this.size=t,this.uuid=r},FullBox:function(e,t,r){var n=s;h.Box[n(762)](this,e,t,r),this[n(860)]=0,this.version=0},ContainerBox:function(e,t,r){h.Box.call(this,e,t,r),this.boxes=[]},SampleEntry:function(e,t,r,n){var i=s;h.ContainerBox[i(762)](this,e,t),this.hdr_size=r,this[i(1152)]=n},SampleGroupEntry:function(e){this[s(398)]=e},TrackGroupTypeBox:function(e,t){var r=s;h[r(496)][r(762)](this,e,t)},createBoxCtor:function(e,t){var r=s;h[r(351)][r(313)](e),h[e+"Box"]=function(t){h[r(836)].call(this,e,t)},h[e+"Box"].prototype=new(h[r(836)]),t&&(h[e+"Box"][r(849)][r(623)]=t)},createFullBoxCtor:function(e,t){var r=s;h[e+r(836)]=function(t){var n=r;h[n(496)][n(762)](this,e,t)},h[e+r(836)][r(849)]=new(h[r(496)]),h[e+r(836)].prototype[r(623)]=function(e){this[r(1233)](e),t&&t.call(this,e)}},addSubBoxArrays:function(e){var t=s;if(e){this[t(608)]=e;for(var r=e[t(949)],n=0;nr?{code:h[c(413)],type:f,size:d,hdr_size:l,start:u}:0!==d&&u+d>e[c(632)]()?(e[c(1269)](u),{code:h[c(413)],type:f,size:d,hdr_size:l,start:u}):t?{code:h.OK,type:f,size:d,hdr_size:l,start:u}:(h[f+c(836)]?n=new h[f+"Box"](d):f!==c(790)?(n=new(h[c(836)])(f,d))[c(1290)]=!0:h[c(880)][a]?n=new(h[c(880)][a])(d):((n=new(h[c(836)])(f,d))[c(790)]=a,n[c(1290)]=!0),n[c(894)]=l,n[c(1152)]=u,n[c(832)]===h[c(836)].prototype[c(832)]&&n[c(971)]!==c(1032)&&n[c(944)](e),n[c(623)](e),(i=e[c(795)]()-(n[c(1152)]+n[c(362)]))<0?e[c(1269)](n[c(1152)]+n[c(362)]):i>0&&0!==n[c(362)]&&e[c(1269)](n.start+n[c(362)]),{code:h.OK,box:n,size:n[c(362)]})},h[s(836)][s(849)][s(623)]=function(e){var t=s;"mdat"!=this[t(971)]?this[t(981)]=e[t(424)](this.size-this.hdr_size):0===this[t(362)]?e[t(1269)](e.getEndPosition()):e[t(1269)](this[t(1152)]+this[t(362)])},h[s(836)].prototype[s(944)]=function(e){var t=s;this.data=e[t(424)](this[t(362)]-this[t(894)]),e[t(734)]-=this[t(362)]-this[t(894)]},h[s(496)][s(849)].parseDataAndRewind=function(e){var t=s;this[t(1233)](e),this.data=e[t(424)](this.size-this.hdr_size),this[t(894)]-=4,e[t(734)]-=this.size-this[t(894)]},h.FullBox.prototype[s(1233)]=function(e){var t=s;this.version=e.readUint8(),this[t(860)]=e[t(1424)](),this[t(894)]+=4},h[s(496)][s(849)].parse=function(e){var t=s;this[t(1233)](e),this[t(981)]=e.readUint8Array(this[t(362)]-this[t(894)])},h[s(445)][s(849)].parse=function(e){for(var t,r,n=s;e[n(795)]()>10&31,r[1]=this[t(534)]>>5&31,r[2]=31&this.language,this[t(958)]=String[t(265)](r[0]+96,r[1]+96,r[2]+96)},h[s(827)]=s(562),h.SAMPLE_ENTRY_TYPE_AUDIO=s(433),h[s(1104)]="Hint",h[s(1403)]=s(1130),h[s(536)]=s(1474),h[s(617)]="System",h[s(1315)]=s(1121),h.SampleEntry[s(849)].parseHeader=function(e){var t=s;e.readUint8Array(6),this[t(879)]=e[t(824)](),this[t(894)]+=8},h[s(1480)][s(849)][s(623)]=function(e){var t=s;this[t(705)](e),this.data=e[t(424)](this[t(362)]-this[t(894)])},h[s(1480)][s(849)][s(944)]=function(e){var t=s;this[t(705)](e),this[t(981)]=e.readUint8Array(this.size-this[t(894)]),this[t(894)]-=8,e[t(734)]-=this[t(362)]-this[t(894)]},h[s(1480)].prototype.parseFooter=function(e){var t=s;h.ContainerBox[t(849)].parse[t(762)](this,e)},h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_HINT),h[s(1372)](h[s(1403)]),h[s(1372)](h[s(536)]),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SYSTEM),h.createMediaSampleEntryCtor(h[s(1315)]),h[s(1372)](h.SAMPLE_ENTRY_TYPE_VISUAL,(function(e){var t,r=s;this[r(705)](e),e[r(824)](),e[r(824)](),e[r(859)](3),this.width=e[r(824)](),this.height=e[r(824)](),this[r(1047)]=e[r(909)](),this.vertresolution=e[r(909)](),e.readUint32(),this[r(741)]=e[r(824)](),t=Math[r(292)](31,e[r(931)]()),this[r(1006)]=e[r(469)](t),t<31&&e[r(469)](31-t),this[r(503)]=e[r(824)](),e[r(824)](),this[r(1260)](e)})),h[s(1372)](h.SAMPLE_ENTRY_TYPE_AUDIO,(function(e){var t=s;this[t(705)](e),e[t(859)](2),this[t(977)]=e[t(824)](),this[t(240)]=e[t(824)](),e[t(824)](),e[t(824)](),this[t(1404)]=e.readUint32()/65536,this.parseFooter(e)})),h.createSampleEntryCtor(h[s(827)],s(668)),h[s(610)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(947)),h[s(610)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(652)),h.createSampleEntryCtor(h[s(827)],s(357)),h.createSampleEntryCtor(h[s(827)],s(1350)),h.createSampleEntryCtor(h[s(827)],"dav1"),h[s(610)](h[s(827)],s(937)),h[s(610)](h.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),h[s(610)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(282)),h[s(610)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(1415)),h.createSampleEntryCtor(h[s(827)],s(999)),h[s(610)](h[s(827)],"dvhe"),h[s(610)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(1066)),h[s(610)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(1482)),h[s(610)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(740)),h[s(610)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(612)),h[s(610)](h[s(827)],s(481)),h[s(610)](h[s(827)],s(288)),h[s(610)](h.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),h.createSampleEntryCtor(h[s(827)],s(650)),h[s(610)](h[s(827)],s(978)),h.createSampleEntryCtor(h[s(827)],s(370)),h[s(610)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(742)),h.createSampleEntryCtor(h[s(488)],"mp4a"),h[s(610)](h[s(488)],s(1189)),h.createSampleEntryCtor(h[s(488)],s(1267)),h[s(610)](h[s(488)],s(1385)),h[s(610)](h[s(488)],s(988)),h.createSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_AUDIO,s(1402)),h[s(610)](h[s(488)],s(1419)),h[s(610)](h[s(488)],"mhm1"),h[s(610)](h[s(488)],s(637)),h.createEncryptedSampleEntryCtor(h[s(827)],s(239)),h.createEncryptedSampleEntryCtor(h[s(488)],"enca"),h[s(236)](h[s(536)],s(891)),h[s(236)](h[s(617)],"encs"),h[s(236)](h[s(1315)],s(942)),h.createEncryptedSampleEntryCtor(h[s(1403)],s(279)),h[s(1212)]("a1lx",(function(e){var t=s,r=16*(1+(1&(1&e[t(931)]())));this[t(876)]=[];for(var n=0;n<3;n++)this.layer_size[n]=16==r?e.readUint16():e.readUint32()})),h.createBoxCtor(s(272),(function(e){this.op_index=e.readUint8()})),h.createFullBoxCtor(s(242),(function(e){var t=s;this[t(641)]=e[t(1340)]();var r=this.size-this[t(894)]-(this[t(641)].length+1);this[t(1357)]=e[t(424)](r)})),h.createBoxCtor(s(320),(function(e){var t=s,r=e[t(931)]();if(!(r>>7&!1)&&(this[t(1426)]=127&r,1===this.version&&(r=e[t(931)](),this[t(893)]=r>>5&7,this[t(645)]=31&r,r=e[t(931)](),this.seq_tier_0=r>>7&1,this[t(1242)]=r>>6&1,this[t(1323)]=r>>5&1,this[t(1428)]=r>>4&1,this[t(1217)]=r>>3&1,this[t(857)]=r>>2&1,this[t(596)]=3&r,r=e[t(931)](),this.reserved_1=r>>5&7,0===this[t(1176)]))){if(this[t(807)]=r>>4&1,1===this[t(807)])this[t(1182)]=15&r;else if(this[t(1119)]=15&r,0!==this.reserved_2)return;var n=this[t(362)]-this[t(894)]-4;this[t(1445)]=e[t(424)](n)}})),h.createBoxCtor("avcC",(function(e){var t,r,n=s;for(this[n(666)]=e[n(931)](),this[n(335)]=e[n(931)](),this.profile_compatibility=e[n(931)](),this.AVCLevelIndication=e[n(931)](),this.lengthSizeMinusOne=3&e.readUint8(),this[n(383)]=31&e[n(931)](),r=this[n(362)]-this.hdr_size-6,this[n(1366)]=[],t=0;t0&&(this[n(1078)]=e[n(424)](r))})),h[s(1212)](s(558),(function(e){var t=s;this[t(1174)]=e.readUint32(),this.maxBitrate=e[t(909)](),this.avgBitrate=e[t(909)]()})),h[s(620)]("ccst",(function(e){var t=s,r=e.readUint8();this.all_ref_pics_intra=128==(128&r),this[t(1016)]=64==(64&r),this[t(263)]=(63&r)>>2,e[t(1424)]()})),h[s(1212)]("cdef",(function(e){var t,r=s;for(this.channel_count=e[r(824)](),this[r(885)]=[],this[r(539)]=[],this.channel_associations=[],t=0;t=32768&&this[t(1009)][t(313)](e[t(1340)]())}})),h[s(620)](s(315),(function(e){var t,r,n=s;if(t=e[n(909)](),this[n(1479)]=[],0===this.version)for(r=0;r>7}else this[t(1214)]===t(941)?this[t(703)]=e[t(424)](this[t(362)]-4):this[t(1214)]===t(1462)&&(this[t(703)]=e[t(424)](this.size-4))})),h[s(620)](s(394),(function(e){var t=s;this[t(1434)](e),this[t(960)]=e[t(1340)]()})),h[s(620)](s(1064),(function(e){var t=s;0===this[t(1426)]&&(this[t(485)]=e[t(1423)](),this.leastDecodeToDisplayDelta=e[t(1423)](),this[t(1128)]=e[t(1423)](),this[t(448)]=e.readInt32(),this[t(1219)]=e[t(1423)]())})),h.createFullBoxCtor(s(322),(function(e){var t,r,n=s;if(t=e[n(909)](),this[n(352)]=[],this[n(1406)]=[],0===this[n(1426)])for(r=0;r>6,this[t(1099)]=r>>1&31,this[t(959)]=(1&r)<<2|n>>6&3,this.acmod=n>>3&7,this[t(1253)]=n>>2&1,this[t(1273)]=3&n|i>>5&7})),h[s(1212)](s(887),(function(e){var t=s,r=e[t(824)]();this[t(1003)]=r>>3,this.num_ind_sub=7&r,this.ind_subs=[];for(var n=0;n>6,i.bsid=o>>1&31,i.bsmod=(1&o)<<4|a>>4&15,i[t(353)]=a>>1&7,i[t(1253)]=1&a,i[t(716)]=c>>1&15,i.num_dep_sub>0&&(i[t(966)]=(1&c)<<8|e[t(931)]())}})),h[s(620)](s(425),(function(e){var t=s,r=[],n=[t(651),t(495),"APPLICATION",t(391),t(498),t(473),t(921),t(493)];for(this[t(1233)](e);;){var i=e[t(931)](),o=Math[t(292)](127&i,n[t(949)]-1);if(o?e.readUint8Array(e[t(1424)]()):(e[t(424)](13),this[t(1404)]=e.readUint32()>>12,e[t(424)](20)),r[t(313)](n[o]),128&i)break}this[t(1313)]=r[t(949)]+" ("+r[t(1352)](", ")+")"})),h[s(1212)](s(460),(function(e){var t=s;this[t(890)]=e[t(1085)]()})),h[s(1212)](s(1250),(function(e){var t=s;this.time=e[t(909)]()})),h[s(1212)]("dmed",(function(e){var t=s;this[t(890)]=e[t(1085)]()})),h[s(1212)](s(815),(function(e){var t=s;if(this[t(258)]=e[t(931)](),this.OutputChannelCount=e[t(931)](),this.PreSkip=e[t(824)](),this[t(340)]=e[t(909)](),this[t(1454)]=e.readInt16(),this[t(1376)]=e.readUint8(),0!==this[t(1376)]){this.StreamCount=e.readUint8(),this[t(933)]=e[t(931)](),this[t(1115)]=[];for(var r=0;r=4;)this.compatible_brands[n]=e[t(469)](4),r-=4,n++})),h[s(620)](s(986),(function(e){var t=s;0===this.version&&(e[t(909)](),this[t(915)]=e[t(469)](4),e[t(859)](3),this[t(1083)]=e[t(469)](this[t(362)]-this[t(894)]-20),"\0"===this[t(1083)][this.name.length-1]&&(this[t(1083)]=this[t(1083)][t(1224)](0,-1)))})),h[s(1212)](s(1147),(function(e){var t,r,n,i,o=s;this.configurationVersion=e[o(931)](),i=e.readUint8(),this[o(559)]=i>>6,this.general_tier_flag=(32&i)>>5,this[o(1202)]=31&i,this[o(1041)]=e[o(909)](),this[o(1065)]=e[o(424)](6),this[o(273)]=e[o(931)](),this.min_spatial_segmentation_idc=4095&e[o(824)](),this[o(700)]=3&e[o(931)](),this[o(689)]=3&e[o(931)](),this[o(525)]=7&e[o(931)](),this[o(907)]=7&e[o(931)](),this.avgFrameRate=e[o(824)](),i=e[o(931)](),this[o(613)]=i>>6,this[o(996)]=(13&i)>>3,this[o(511)]=(4&i)>>2,this[o(1093)]=3&i,this[o(1187)]=[];var a=e[o(931)]();for(t=0;t>7,c.nalu_type=63&i;var u=e[o(824)]();for(r=0;r>4&15,this[r(799)]=15&t,t=e.readUint8(),this[r(688)]=t>>4&15,1===this[r(1426)]||2===this.version?this[r(1139)]=15&t:this[r(1139)]=0,this[r(713)]=[];var n=0;if(this[r(1426)]<2)n=e[r(824)]();else{if(2!==this[r(1426)])throw"version of iloc box not supported";n=e.readUint32()}for(var i=0;i>7,this.axis=1&r})),h[s(620)]("infe",(function(e){var t=s;if((0===this[t(1426)]||1===this[t(1426)])&&(this[t(1037)]=e[t(824)](),this[t(409)]=e[t(824)](),this.item_name=e[t(1340)](),this[t(393)]=e[t(1340)](),this[t(1486)]=e[t(1340)]()),1===this[t(1426)])return this.extension_type=e[t(469)](4),void e[t(1269)](this.start+this[t(362)]);this[t(1426)]>=2&&(2===this[t(1426)]?this[t(1037)]=e.readUint16():3===this[t(1426)]&&(this[t(1037)]=e[t(909)]()),this.item_protection_index=e[t(824)](),this.item_type=e[t(469)](4),this[t(1162)]=e.readCString(),this[t(1123)]===t(808)?(this[t(393)]=e.readCString(),this.content_encoding=e[t(1340)]()):this[t(1123)]===t(953)&&(this[t(1049)]=e[t(1340)]()))})),h.createFullBoxCtor(s(791),(function(e){var t,r,n=s;for(entry_count=e[n(909)](),this[n(1298)]=[],t=0;t>7==1,1&this[n(860)]?c.property_index=(127&a)<<8|e[n(931)]():c[n(1129)]=127&a}}})),h.createFullBoxCtor(s(305),(function(e){var t,r,n=s;for(this[n(350)]=[];e[n(795)]()>7,i[t(1330)]=127&o,i.assignment_type){case 0:i[t(398)]=e[t(469)](4);break;case 1:i[t(398)]=e[t(469)](4),i[t(1389)]=e[t(909)]();break;case 2:case 3:break;case 4:i.sub_track_id=e[t(909)]()}}})),h[s(1212)](s(1166),(function(e){var t=s;this[t(1096)]=e[t(824)]()})),h[s(1212)]("maxr",(function(e){var t=s;this[t(950)]=e.readUint32(),this.bytes=e[t(909)]()})),f[s(849)][s(856)]=function(){return"("+this.x+","+this.y+")"},h.createBoxCtor(s(1373),(function(e){var t=s;this.display_primaries=[],this[t(672)][0]=new f(e[t(824)](),e[t(824)]()),this.display_primaries[1]=new f(e[t(824)](),e[t(824)]()),this.display_primaries[2]=new f(e[t(824)](),e[t(824)]()),this[t(775)]=new f(e[t(824)](),e[t(824)]()),this[t(976)]=e.readUint32(),this[t(917)]=e[t(909)]()})),h[s(620)]("mdhd",(function(e){var t=s;1==this[t(1426)]?(this[t(848)]=e[t(1085)](),this[t(900)]=e.readUint64(),this[t(852)]=e[t(909)](),this[t(906)]=e[t(1085)]()):(this[t(848)]=e[t(909)](),this[t(900)]=e[t(909)](),this[t(852)]=e[t(909)](),this[t(906)]=e[t(909)]()),this[t(1434)](e),e[t(824)]()})),h[s(620)](s(1213),(function(e){var t=s;1&this.flags&&(this[t(1426)]=1),1==this[t(1426)]?this[t(1469)]=e[t(1085)]():this[t(1469)]=e.readUint32()})),h.createFullBoxCtor(s(1075),(function(e){var t=s;this[t(1463)]=[],h[t(445)][t(849)][t(623)][t(762)](this,e)})),h[s(620)](s(834),(function(e){var t=s;this[t(435)]=e[t(909)]()})),h[s(620)](s(1276),(function(e){this[s(550)]=e.readUint32()})),h[s(620)](s(329),(function(e){var t=s;this[t(1157)]=e[t(931)]()})),h[s(620)](s(457),(function(e){var t=s;1==this.version?(this[t(848)]=e.readUint64(),this[t(900)]=e.readUint64(),this[t(852)]=e[t(909)](),this[t(906)]=e[t(1085)]()):(this.creation_time=e[t(909)](),this[t(900)]=e.readUint32(),this[t(852)]=e[t(909)](),this[t(906)]=e[t(909)]()),this.rate=e[t(909)](),this[t(1177)]=e[t(824)]()>>8,e[t(824)](),e.readUint32Array(2),this[t(746)]=e.readUint32Array(9),e[t(859)](6),this[t(1285)]=e[t(909)]()})),h[s(1212)](s(678),(function(e){var t=s;this[t(840)]=e[t(909)]()})),h[s(1212)](s(1248),(function(e){this[s(840)]=e.readUint64()})),h.createFullBoxCtor(s(919),(function(e){var t=s,r=e.readUint32();this[t(519)]=[];for(var n=0;n0){var r=e[t(909)]();this.kid=[];for(var n=0;n0&&(this[t(981)]=e[t(424)](i))})),h[s(620)]("clef",(function(e){var t=s;this.width=e.readUint32(),this.height=e[t(909)]()})),h.createFullBoxCtor(s(338),(function(e){var t=s;this.width=e.readUint32(),this[t(1181)]=e[t(909)]()})),h[s(620)]("prof",(function(e){var t=s;this[t(438)]=e[t(909)](),this[t(1181)]=e[t(909)]()})),h.createContainerBoxCtor(s(426),null,[s(518),s(1462),s(338)]),h.createBoxCtor(s(1156),(function(e){var t=s;this[t(659)]=e[t(469)](4),this[t(1326)]=e[t(469)](this[t(362)]-this[t(894)]-4)})),h[s(620)](s(436),(function(e){var t=s;1&this[t(860)]&&(this.aux_info_type=e[t(909)](),this.aux_info_type_parameter=e[t(909)]());var r=e.readUint32();this[t(1416)]=[];for(var n=0;n>7,this[t(513)]=r>>6&1,this[t(1466)]&&(this[t(906)]=e[t(909)]()),this[t(513)]&&(this[t(501)]=e[t(931)](),this[t(802)]=e.readUint16(),this[t(387)]=e[t(824)]()),this[t(432)]=[];for(var n=e.readUint8(),i=0;i>7,this[t(850)]=127&r})),h[s(1024)](s(1470),(function(e){var t=s;if(this[t(251)]=e.readUint16(),this[t(1145)]!==2+(1===this[t(251)]?2:6*this.operation_point_count)+9)this[t(981)]=e[t(424)](this[t(1145)]-2);else{if(1===this[t(251)])this[t(1133)]=e[t(824)]();else{this[t(1133)]=[],this[t(237)]=[];for(var r=0;r>4,this[t(870)]=15&r,this.isProtected=e[t(931)](),this[t(656)]=e[t(931)](),this[t(1359)]=h[t(1062)](e),this.constant_IV_size=0,this[t(1204)]=0,1===this.isProtected&&0===this[t(656)]&&(this[t(665)]=e[t(931)](),this[t(1204)]=e[t(424)](this[t(665)]))})),h.createSampleGroupCtor(s(1107),(function(e){})),h.createSampleGroupCtor(s(704),(function(e){var t=s,r=e[t(931)]();this[t(428)]=63&r})),h[s(1024)]("tele",(function(e){var t=s,r=e[t(931)]();this[t(1396)]=r>>7})),h[s(1024)](s(679),(function(e){})),h.createSampleGroupCtor("tscl",(function(e){})),h[s(1024)](s(467),(function(e){})),h[s(620)](s(747),(function(e){var t=s;this[t(398)]=e.readString(4),1===this[t(1426)]?this[t(1389)]=e.readUint32():this[t(1389)]=0,this.entries=[];for(var r=e[t(909)](),n=0;n>6,this[r(590)][i]=t>>4&3,this[r(655)][i]=t>>2&3,this[r(831)][i]=3&t})),h[s(620)]("senc"),h[s(620)](s(778),(function(e){var t=s;this[t(398)]=e.readString(4),o.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this[t(805)]=e.readUint32():this[t(805)]=0,this.version>=2&&(this[t(1356)]=e[t(909)]()),this[t(418)]=[];for(var r=e[t(909)](),n=0;n>31&1,i.referenced_size=2147483647&o,i[t(1023)]=e[t(909)](),o=e[t(909)](),i[t(572)]=o>>31&1,i[t(1210)]=o>>28&7,i[t(755)]=268435455&o}})),h.SingleItemTypeReferenceBox=function(e,t,r,n){var i=s;h[i(836)][i(762)](this,e,t),this[i(894)]=r,this[i(1152)]=n},h[s(252)][s(849)]=new(h[s(836)]),h[s(252)].prototype[s(623)]=function(e){var t=s;this[t(415)]=e.readUint16();var r=e[t(824)]();this[t(350)]=[];for(var n=0;n>4&15,this[n(838)][t+1]=15&i}else if(8===this[n(616)])for(t=0;t0)for(r=0;r>4&15,this[t(600)]=15&r}this.default_isProtected=e[t(931)](),this[t(1304)]=e[t(931)](),this[t(1183)]=h[t(1062)](e),1===this[t(1442)]&&0===this[t(1304)]&&(this[t(1231)]=e[t(931)](),this[t(381)]=e[t(424)](this[t(1231)]))})),h[s(620)](s(1158),(function(e){var t=s;1==this.version?this[t(1331)]=e[t(1085)]():this[t(1331)]=e[t(909)]()})),h[s(620)](s(1208),(function(e){var t=s,r=0;this[t(1431)]=e[t(909)](),this.size-this.hdr_size>r&&this[t(860)]&h[t(238)]?(this[t(548)]=e.readUint64(),r+=8):this[t(548)]=0,this[t(362)]-this.hdr_size>r&&this[t(860)]&h.TFHD_FLAG_SAMPLE_DESC?(this[t(598)]=e[t(909)](),r+=4):this[t(598)]=0,this[t(362)]-this[t(894)]>r&&this[t(860)]&h[t(1447)]?(this.default_sample_duration=e[t(909)](),r+=4):this[t(1246)]=0,this[t(362)]-this[t(894)]>r&&this[t(860)]&h[t(1235)]?(this.default_sample_size=e[t(909)](),r+=4):this[t(586)]=0,this[t(362)]-this[t(894)]>r&&this.flags&h[t(835)]?(this[t(576)]=e[t(909)](),r+=4):this.default_sample_flags=0})),h.createFullBoxCtor(s(453),(function(e){var t=s;this.track_ID=e.readUint32(),e.readUint24();var r=e[t(931)]();this.length_size_of_traf_num=r>>4&3,this[t(1042)]=r>>2&3,this.length_size_of_sample_num=3&r,this.entries=[];for(var n=e.readUint32(),i=0;i>8,e[t(824)](),this[t(746)]=e.readInt32Array(9),this[t(438)]=e[t(909)](),this[t(1181)]=e[t(909)]()})),h[s(1212)](s(297),(function(e){var t=s;this[t(1277)]=e[t(909)]()})),h[s(1212)](s(284),(function(e){this[s(1277)]=e.readUint32()})),h[s(1212)](s(1393),(function(e){var t=s;this[t(890)]=e[t(909)]()})),h[s(1212)](s(579),(function(e){var t=s;this.bytessent=e[t(909)]()})),h[s(1212)](s(759),(function(e){var t=s;this[t(890)]=e[t(1085)]()})),h[s(364)][s(849)].parse=function(e){var t=s;this[t(1233)](e),this[t(358)]=e.readUint32()},h[s(1044)](s(1141)),h[s(1084)]=function(e,t,r,n){var i=s;h[i(836)][i(762)](this,e,t),this.hdr_size=r,this[i(1152)]=n},h[s(1084)][s(849)]=new(h[s(836)]),h[s(1084)].prototype[s(623)]=function(e){var t=s;this.track_ids=e[t(859)]((this[t(362)]-this.hdr_size)/4)},h[s(422)].prototype[s(623)]=function(e){for(var t,r,n=s;e.getPosition()r&&this.flags&h[t(863)]?(this[t(1108)]=e[t(1423)](),r+=4):this[t(1108)]=0,this[t(362)]-this[t(894)]>r&&this.flags&h[t(1305)]?(this.first_sample_flags=e.readUint32(),r+=4):this[t(487)]=0,this.sample_duration=[],this[t(1067)]=[],this[t(636)]=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>r)for(var n=0;n>7&1,this[r(686)]=n>>6&1,this.block_little_endian=n>>5&1,this[r(1335)]=n>>4&1,this[r(508)]=n>>3&1,this[r(1195)]=e.readUint32(),this[r(1143)]=e[r(909)](),this[r(624)]=e[r(909)](),this[r(580)]=e[r(909)](),this.num_tile_rows_minus_one=e.readUint32()}})),h[s(620)](s(901),(function(e){var t=s;1!==this[t(860)]&&(this[t(500)]=e[t(1340)]())})),h[s(620)]("urn ",(function(e){var t=s;this.name=e[t(1340)](),this[t(362)]-this.hdr_size-this[t(1083)][t(949)]-1>0&&(this[t(500)]=e[t(1340)]())})),h[s(896)]("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){var t=s;this[t(797)]=e[t(469)](this[t(362)]-this.hdr_size).replace(/&/g,"&").replace(//g,t(1271))[t(1150)](/"/g,t(583))[t(1150)](/'/g,t(1007))})),h.createUUIDBox(s(633),!0,!1,(function(e){var t=s;this.system_id=h[t(1062)](e);var r=e[t(909)]();r>0&&(this[t(981)]=e.readUint8Array(r))})),h[s(896)](s(374),!0,!1),h[s(896)]("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){var t=s;this[t(1033)]=e[t(1424)](),this[t(517)]=e[t(931)](),this[t(1183)]=h[t(1062)](e)})),h[s(896)](s(527),!0,!1,(function(e){var t=s;this[t(1191)]=e[t(931)](),this.entries=[];for(var r=0;r>4,this.chromaSubsampling=t>>1&7,this[r(255)]=1&t,this[r(437)]=e[r(931)](),this[r(1168)]=e[r(931)](),this.matrixCoefficients=e[r(931)](),this.codecIntializationDataSize=e[r(824)](),this[r(1165)]=e[r(424)](this[r(696)])):(this[r(1039)]=e[r(931)](),this[r(412)]=e[r(931)](),t=e[r(931)](),this[r(323)]=t>>4&15,this[r(735)]=15&t,t=e[r(931)](),this.chromaSubsampling=t>>4&15,this[r(1178)]=t>>1&7,this[r(255)]=1&t,this.codecIntializationDataSize=e[r(824)](),this[r(1165)]=e.readUint8Array(this[r(696)]))})),h[s(1212)](s(640),(function(e){var t=s;this.text=e.readString(this[t(362)]-this[t(894)])})),h[s(620)](s(1452),(function(e){var t,r,n=s,i={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){var t=So;this[t(573)]=e[t(931)](),this[t(334)]=8},stream_read_2_bytes:function(e){var t=So;this[t(573)]=e[t(824)](),this[t(334)]=16},extract_bits:function(e){var t=So,r=this[t(573)]>>this.num_held_bits-e&(1<1){for(i[n(464)](e),this[n(1292)]=0,r=this[n(1401)]-2;r>=0;--r){var c=i[n(724)](1);this[n(1292)]|=c<1;++r)i[n(724)](1);for(this[n(796)]=[],r=this[n(1401)]-2;r>=0;--r)this[n(1292)]&1<>=1;r+=h[t(551)](i,0),r+=".",0===this.hvcC[t(314)]?r+="L":r+="H",r+=this[t(1147)][t(273)];var o=!1,a="";for(e=5;e>=0;e--)(this[t(1147)][t(1065)][e]||o)&&(a="."+h[t(551)](this.hvcC[t(1065)][e],0)+a,o=!0);r+=a}return r},h.vvc1SampleEntry[s(849)][s(1371)]=h[s(1102)][s(849)][s(1371)]=function(){var e,t=s,r=h.SampleEntry[t(849)][t(1371)].call(this);if(this.vvcC){r+="."+this[t(1452)][t(1202)],this[t(1452)].general_tier_flag?r+=".H":r+=".L",r+=this[t(1452)][t(273)];var n="";if(this.vvcC[t(520)]){var i,o=[],a=0;for(a|=this[t(1452)][t(877)]<<7,a|=this[t(1452)][t(505)]<<6,e=0;e>2&63,o.push(a),a&&(i=e),a=this[t(1452)][t(520)][e]>>2&3;if(void 0===i)n=".CA";else{n=".C";var c=t(1230),u=0,l=0;for(e=0;e<=i;++e)for(u=u<<8|o[e],l+=8;l>=5;){n+=c[u>>l-5&31],u&=(1<<(l-=5))-1}l&&(n+=c[31&(u<<=5-l)])}}r+=n}return r},h[s(1375)][s(849)].getCodec=function(){var e=s,t=h[e(1480)][e(849)][e(1371)][e(762)](this);if(this[e(786)]&&this.esds.esd){var r=this.esds[e(569)][e(302)](),n=this[e(786)][e(569)][e(509)]();return t+"."+h[e(551)](r)+(n?"."+n:"")}return t},h[s(939)].prototype.getCodec=function(){var e=s,t=h.SampleEntry[e(849)][e(1371)][e(762)](this);return this[e(739)]?t+"."+this[e(739)]:t},h[s(780)].prototype[s(1371)]=h[s(444)].prototype[s(1371)]=function(){var e=s,t=h.SampleEntry[e(849)].getCodec.call(this),r=this[e(595)][e(412)];0==r&&(r="00");var n=this[e(595)][e(323)];return 8==n&&(n="08"),t+".0"+this[e(595)][e(1039)]+"."+r+"."+n},h[s(1185)][s(849)].getCodec=function(){var e,t=s,r=h[t(1480)][t(849)].getCodec.call(this),n=this[t(320)].seq_level_idx_0;return n<10&&(n="0"+n),2===this[t(320)][t(893)]&&1===this[t(320)][t(1242)]?e=1===this[t(320)].twelve_bit?"12":"10":this[t(320)].seq_profile<=2&&(e=1===this.av1C[t(1242)]?"10":"08"),r+"."+this.av1C[t(893)]+"."+n+(this[t(320)][t(771)]?"H":"M")+"."+e},h[s(836)][s(849)][s(303)]=function(e,t){var r=s;this[r(362)]+=8,this[r(362)]>u&&(this[r(362)]+=8),this[r(971)]===r(790)&&(this[r(362)]+=16),o[r(499)]("BoxWriter","Writing box "+this[r(971)]+r(1222)+this.size+r(619)+e[r(795)]()+(t||"")),this[r(362)]>u?e.writeUint32(1):(this[r(777)]=e.getPosition(),e[r(456)](this[r(362)])),e[r(1411)](this[r(971)],null,4),this.type===r(790)&&e[r(507)](this.uuid),this.size>u&&e[r(1322)](this[r(362)])},h.FullBox.prototype[s(303)]=function(e){var t=s;this[t(362)]+=4,h[t(836)][t(849)][t(303)][t(762)](this,e,t(497)+this[t(1426)]+t(546)+this.flags),e[t(1238)](this[t(1426)]),e[t(1254)](this[t(860)])},h.Box.prototype[s(832)]=function(e){var t=s;"mdat"===this[t(971)]?this[t(981)]&&(this[t(362)]=this[t(981)].length,this.writeHeader(e),e.writeUint8Array(this.data)):(this[t(362)]=this[t(981)]?this[t(981)][t(949)]:0,this[t(303)](e),this[t(981)]&&e[t(507)](this[t(981)]))},h[s(445)][s(849)].write=function(e){var t=s;this[t(362)]=0,this[t(303)](e);for(var r=0;r=2&&e[n(456)](this[n(598)]),e.writeUint32(this[n(418)][n(949)]),t=0;t0)for(t=0;t+1r?1:0,this[t(860)]=0,this[t(362)]=4,1===this[t(1426)]&&(this[t(362)]+=4),this[t(303)](e),1===this[t(1426)]?e[t(1322)](this[t(1331)]):e[t(456)](this[t(1331)])},h[s(1369)][s(849)][s(832)]=function(e){var t=s;this[t(1426)]=0,this[t(362)]=4,this[t(860)]&h[t(238)]&&(this.size+=8),this[t(860)]&h[t(299)]&&(this.size+=4),this.flags&h[t(1447)]&&(this[t(362)]+=4),this.flags&h.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&h[t(835)]&&(this[t(362)]+=4),this.writeHeader(e),e[t(456)](this.track_id),this[t(860)]&h[t(238)]&&e[t(1322)](this[t(548)]),this[t(860)]&h.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this[t(598)]),this[t(860)]&h[t(1447)]&&e[t(456)](this[t(1246)]),this[t(860)]&h[t(1235)]&&e[t(456)](this[t(586)]),this[t(860)]&h[t(835)]&&e.writeUint32(this[t(576)])},h.tkhdBox[s(849)][s(832)]=function(e){var t=s;this[t(1426)]=0,this[t(362)]=80,this[t(303)](e),e[t(456)](this.creation_time),e[t(456)](this.modification_time),e[t(456)](this.track_id),e[t(456)](0),e[t(456)](this[t(906)]),e[t(456)](0),e.writeUint32(0),e.writeInt16(this[t(545)]),e[t(406)](this[t(1071)]),e.writeInt16(this[t(1177)]<<8),e[t(321)](0),e[t(837)](this[t(746)]),e[t(456)](this[t(438)]),e[t(456)](this[t(1181)])},h.trexBox[s(849)].write=function(e){var t=s;this[t(1426)]=0,this[t(860)]=0,this[t(362)]=20,this[t(303)](e),e[t(456)](this.track_id),e.writeUint32(this.default_sample_description_index),e[t(456)](this[t(1246)]),e[t(456)](this[t(586)]),e[t(456)](this[t(576)])},h[s(1412)][s(849)][s(832)]=function(e){var t=s;this.version=0,this[t(362)]=4,this[t(860)]&h[t(863)]&&(this[t(362)]+=4),this[t(860)]&h[t(1305)]&&(this[t(362)]+=4),this[t(860)]&h[t(1197)]&&(this[t(362)]+=4*this[t(1478)].length),this[t(860)]&h[t(476)]&&(this[t(362)]+=4*this[t(1067)][t(949)]),this.flags&h[t(910)]&&(this.size+=4*this[t(636)][t(949)]),this[t(860)]&h[t(1351)]&&(this[t(362)]+=4*this[t(339)][t(949)]),this[t(303)](e),e[t(456)](this[t(1012)]),this[t(860)]&h.TRUN_FLAGS_DATA_OFFSET&&(this[t(1286)]=e[t(795)](),e.writeInt32(this[t(1108)])),this[t(860)]&h[t(1305)]&&e.writeUint32(this[t(487)]);for(var r=0;r-1||e[r]instanceof h[n(836)]||t[r]instanceof h[n(836)]||typeof e[r]===n(814)||typeof t[r]===n(814)||typeof e[r]===n(1027)||typeof t[r]===n(1027)||e.subBoxNames&&e[n(608)].indexOf(r[n(1224)](0,4))>-1||t.subBoxNames&&t[n(608)][n(1020)](r.slice(0,4))>-1||r===n(981)||r===n(1152)||r===n(362)||r===n(848)||r===n(900)||h.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1||e[r]===t[r]))return!1;return!0},h[s(669)]=function(e,t){var r=s;if(!h[r(1367)](e,t))return!1;for(var n=0;n=t?e:new Array(t-e[n(949)]+1)[n(1352)](r)+e}function o(e){var t=So,r=Math[t(274)](e/3600),n=Math.floor((e-3600*r)/60),s=Math[t(274)](e-3600*r-60*n),o=Math[t(274)](1e3*(e-3600*r-60*n-s));return i(r,2)+":"+i(n,2)+":"+i(s,2)+"."+i(o,3)}for(var a=this[n(1035)](r),c="",u=0;u1)for(t=1;t-1&&this[t(1001)].splice(r,1)},_[s(849)][s(1432)]=function(e,t,r){var n=s,i=this[n(1464)](e);if(i){var o={};this.extractedTracks[n(313)](o),o.id=e,o[n(1244)]=t,o[n(816)]=i,i[n(922)]=0,o.nb_samples=1e3,o.samples=[],r&&r[n(1144)]&&(o[n(983)]=r[n(1144)])}},_.prototype.unsetExtractionOptions=function(e){for(var t=s,r=-1,n=0;n-1&&this[t(1429)][t(811)](r,1)},_.prototype[s(623)]=function(){var e,t,r=s;if(!this[r(764)]||this[r(764)]())for(;;){if(this[r(454)]&&this.hasIncompleteMdat()){if(this[r(745)]())continue;return}if(this[r(961)]&&this[r(961)](),(e=h[r(270)](this.stream,false))[r(985)]===h[r(413)]){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var n;switch(n="uuid"!==(t=e[r(1124)])[r(971)]?t[r(971)]:t.uuid,this.boxes.push(t),n){case r(1032):this.mdats[r(313)](t);break;case"moof":this.moofs.push(t);break;case r(743):this.moovStartFound=!0,0===this.mdats[r(949)]&&(this[r(367)]=!0);default:this[n],this[n]=t}this[r(750)]&&this.updateUsedBytes(t,e)}},_[s(849)][s(697)]=function(e){var t=s;if(null==e)throw t(1014);if(void 0===e[t(528)])throw t(823);return 0===e[t(1338)]?(this[t(1040)][t(1394)](),!1):(e.usedBytes=0,this.stream.insertBuffer(e),this[t(1040)][t(1394)](),!!this[t(1040)][t(804)]())},_.prototype[s(1125)]=function(e,t){var r,n=s;if(this[n(697)](e))return this[n(623)](),this[n(1251)]&&!this[n(369)]&&(this.moovStartSent=!0,this[n(1105)]&&this.onMoovStart()),this[n(743)]?(!this[n(1186)]&&(this[n(980)](),this[n(1186)]=!0),this[n(720)](),this.onReady&&!this.readySent&&(this[n(1347)]=!0,this[n(1321)](this[n(379)]())),this[n(794)](t),this.nextSeekPosition?(r=this[n(468)],this[n(468)]=void 0):r=this[n(1380)],this[n(1040)][n(308)]&&(r=this[n(1040)][n(308)](r))):r=this[n(1380)]?this[n(1380)]:0,this[n(1052)]&&this[n(1180)]&&!this[n(833)]&&(this.onSidx(this[n(1052)]),this.sidxSent=!0),this[n(1075)]&&(this[n(749)]&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this[n(853)]&&this[n(853)](this[n(1400)])),this.stream[n(712)]&&(this[n(1040)][n(1394)](),this[n(1040)][n(712)](),this[n(1040)].logBufferLevel(!0)),r},_.prototype.getInfo=function(){var e,t,r,n,i,o,a=s,c={},u=new Date(a(839))[a(766)]();if(this[a(743)])for(c[a(260)]=!0,c.duration=this.moov.mvhd[a(906)],c.timescale=this[a(743)][a(457)][a(852)],c[a(264)]=null!=this[a(743)].mvex,c[a(264)]&&this[a(743)][a(1101)][a(1213)]&&(c[a(1469)]=this.moov[a(1101)].mehd[a(1469)]),c.isProgressive=this[a(367)],c[a(514)]=null!=this[a(743)].iods,c[a(1008)]=[],c[a(1008)][a(313)](this[a(1302)][a(410)]),c[a(1008)]=c[a(1008)][a(1348)](this.ftyp.compatible_brands),c[a(1223)]=new Date(u+1e3*this[a(743)][a(457)][a(848)]),c[a(1413)]=new Date(u+1e3*this.moov[a(457)][a(900)]),c[a(869)]=[],c.audioTracks=[],c[a(1446)]=[],c.subtitleTracks=[],c[a(829)]=[],c[a(1019)]=[],c[a(1021)]=[],e=0;e0?c[a(808)]+=a(567):c.audioTracks&&c[a(710)][a(949)]>0?c.mime+='audio/mp4; codecs="':c[a(808)]+=a(751),e=0;e=r[n(821)][n(949)])&&(this.onSegment&&this[n(757)](i.id,i[n(1244)],i[n(675)][n(1392)],r[n(922)],e||r[n(922)]>=r[n(821)][n(949)]),i[n(675)]=null,i!==this[n(1001)][t]))break}}if(null!==this.onSamples)for(t=0;t=r[n(821)][n(949)])&&(o.debug(n(825),n(763)+c.id+n(1395)+r[n(922)]),this[n(549)]&&this.onSamples(c.id,c.user,c.samples),c[n(821)]=[],c!==this[n(1429)][t]))break}}}},_.prototype[s(429)]=function(e){var t=s,r=this[t(347)](e,!0);return r[t(949)]?r[0]:null},_[s(849)].getBoxes=function(e,t){var r=s,n=[];return _[r(1295)][r(762)](this,e,n,t),n},_[s(1295)]=function(e,t,r){var n=s;for(var i in this[n(971)]&&this[n(971)]==e&&t[n(313)](this),this[n(1463)]){if(t.length&&r)return;_[n(1295)][n(762)](this[n(1463)][i],e,t,r)}},_[s(849)].getTrackSamplesInfo=function(e){var t=s,r=this[t(1464)](e);return r?r[t(821)]:void 0},_[s(849)][s(1398)]=function(e,t){var r=this.getTrackById(e);return this.getSample(r,t)},_[s(849)][s(784)]=function(e,t,r){var n=s,i=this[n(1464)](e);i[n(326)]||(i[n(326)]=0);for(var o=i[n(326)];oe*i.timescale){u=n-1;break}t&&i[a(607)]&&(c=n)}for(t&&(u=c),e=r.samples[u][a(1294)],r[a(922)]=u;r[a(821)][u].alreadyRead===r[a(821)][u][a(362)]&&r[a(821)][u+1];)u++;return{offset:r[a(821)][u][a(1416)]+r[a(821)][u][a(1344)],time:e/o}},_.prototype[s(1153)]=function(e){var t,r=s;return e[r(821)]?((t=e[r(821)][e[r(821)][r(949)]-1]).cts+t[r(906)])/t[r(852)]:1/0},_[s(849)][s(1269)]=function(e,t){var r,n,i,o=s,a=this.moov,c={offset:1/0,time:1/0};if(this[o(743)]){for(i=0;ithis[o(1153)](r)||((n=this[o(643)](e,t,r))[o(1416)]-1){u=l;break}switch(u){case"Visual":if(o[t(1045)](t(533))[t(728)]("graphicsmode",0)[t(728)](t(604),[0,0,0]),c[t(728)](t(438),r[t(438)])[t(728)](t(1181),r.height)[t(728)]("horizresolution",72<<16)[t(728)](t(447),72<<16)[t(728)](t(741),1)[t(728)](t(1006),r[t(971)]+t(670))[t(728)](t(503),24),r.avcDecoderConfigRecord){var p=new h.avcCBox;p[t(623)](new a(r[t(1386)])),c[t(898)](p)}else if(r[t(462)]){var m=new(h[t(1092)]);m[t(623)](new a(r.hevcDecoderConfigRecord)),c[t(898)](m)}break;case t(433):o.add(t(478))[t(728)](t(1301),r.balance||0),c.set(t(977),r[t(977)]||2)[t(728)]("samplesize",r[t(240)]||16)[t(728)](t(1404),r[t(1404)]||65536);break;case"Hint":o[t(1045)](t(929));break;case"Subtitle":if(o[t(1045)](t(1381)),r[t(971)]===t(1194))c[t(728)](t(1264),r[t(1264)]||t(524))[t(728)](t(1015),r[t(1015)]||"")[t(728)](t(789),r[t(789)]||"");break;case t(1130):o.add(t(522));break;case"System":o[t(1045)](t(522));break;default:o.add(t(522))}r.description&&c[t(898)](r[t(594)]),r[t(822)]&&r.description_boxes[t(1029)]((function(e){c[t(898)](e)})),o[t(1045)]("dinf")[t(1045)](t(443)).addEntry((new(h[t(1159)]))[t(728)](t(860),1));var v=o[t(1045)](t(1201));return v[t(1045)](t(1167))[t(1309)](c),v[t(1045)](t(1036))[t(728)](t(352),[])[t(728)]("sample_deltas",[]),v[t(1045)](t(1236))[t(728)](t(1485),[])[t(728)](t(962),[])[t(728)](t(1221),[]),v.add("stco").set(t(1479),[]),v.add(t(1148))[t(728)](t(838),[]),this.moov[t(1101)].add("trex")[t(728)]("track_id",r.id)[t(728)]("default_sample_description_index",r[t(598)]||1)[t(728)](t(1246),r[t(1246)]||0)[t(728)](t(586),r[t(586)]||0)[t(728)](t(576),r[t(576)]||0),this[t(331)](n),r.id}},h[s(836)][s(849)][s(680)]=function(e){var t=s,r=e||new c;r[t(312)]=c.BIG_ENDIAN,this[t(832)](r)},_[s(849)].addSample=function(e,t,r){var n=s,i=r||{},o={},a=this[n(1464)](e);if(null!==a){o[n(423)]=a[n(821)][n(949)],o[n(1431)]=a[n(1051)][n(1431)],o.timescale=a[n(540)][n(296)][n(852)],o[n(349)]=i[n(1221)]?i[n(1221)]-1:0,o[n(594)]=a.mdia[n(1255)][n(1201)][n(1167)][n(418)][o[n(349)]],o[n(981)]=t,o[n(362)]=t.byteLength,o[n(1344)]=o[n(362)],o[n(906)]=i[n(906)]||1,o[n(1294)]=i.cts||0,o.dts=i[n(259)]||0,o[n(607)]=i[n(607)]||!1,o[n(266)]=i[n(266)]||0,o[n(845)]=i[n(845)]||0,o[n(1160)]=i[n(1160)]||0,o.has_redundancy=i.has_redundancy||0,o[n(1200)]=i[n(1200)]||0,o[n(1416)]=0,o[n(325)]=i[n(325)],a[n(821)].push(o),a[n(979)]+=o[n(362)],a[n(692)]+=o[n(906)],void 0===a[n(1310)]&&(a[n(1310)]=i[n(259)]),this[n(794)]();var c=this.createSingleSampleMoof(o);return this[n(898)](c),c.computeSize(),c.trafs[0][n(819)][0][n(1108)]=c[n(362)]+8,this[n(1045)](n(1032))[n(981)]=new Uint8Array(t),o}},_.prototype[s(1262)]=function(e){var t=s,r=0;r=e[t(607)]?1<<25:65536;var n=new(h[t(1361)]);n[t(1045)](t(834))[t(728)]("sequence_number",this[t(585)]),this.nextMoofNumber++;var i=n[t(1045)](t(1256)),o=this[t(1464)](e[t(1431)]);return i[t(1045)](t(1208))[t(728)](t(1431),e[t(1431)])[t(728)](t(860),h[t(404)]),i[t(1045)](t(1158))[t(728)](t(1331),e[t(259)]-(o[t(1310)]||0)),i[t(1045)](t(1311))[t(728)](t(860),h[t(863)]|h[t(1197)]|h[t(476)]|h[t(910)]|h.TRUN_FLAGS_CTS_OFFSET).set(t(1108),0)[t(728)](t(487),0)[t(728)](t(1012),1)[t(728)]("sample_duration",[e[t(906)]])[t(728)]("sample_size",[e.size])[t(728)](t(636),[r]).set(t(339),[e.cts-e[t(259)]]),n},_[s(849)].lastMoofIndex=0,_[s(849)][s(1316)]=0,_.prototype[s(582)]=function(){var e,t,r,n,i,o,a=s;for(this.initial_duration=this.moov[a(457)][a(906)],this.moov[a(457)][a(906)]=0,e=0;e=2&&(u=i[a][l(398)]+"/0",(c=new d(i[a].grouping_type,0))[l(951)]=!0,!t[l(773)][u]&&(t[l(773)][u]=c))}else for(a=0;a=2&&(u=n[a].grouping_type+"/0",c=new d(n[a][l(398)],0),!e[l(773)][u]&&(e[l(773)][u]=c))},_[s(291)]=function(e,t,r,n){var i,o,a=s;for(i in t[a(563)]=[],n){var c;if(t[a(563)][i]={},t.sample_groups[i].grouping_type=n[i][a(398)],t.sample_groups[i][a(1389)]=n[i][a(1389)],r>=n[i][a(987)]&&(n[i].last_sample_in_run<0&&(n[i][a(987)]=0),n[i][a(571)]++,n[i][a(571)]<=n[i][a(747)][a(418)].length-1&&(n[i][a(987)]+=n[i][a(747)].entries[n[i][a(571)]][a(1012)])),n[i][a(571)]<=n[i].sbgp[a(418)][a(949)]-1?t[a(563)][i][a(1475)]=n[i][a(747)][a(418)][n[i].entry_index][a(1475)]:t[a(563)][i].group_description_index=-1,0!==t.sample_groups[i][a(1475)])c=n[i][a(635)]?n[i][a(635)]:n[i].description,t.sample_groups[i][a(1475)]>0?(o=t[a(563)][i][a(1475)]>65535?(t[a(563)][i][a(1475)]>>16)-1:t.sample_groups[i][a(1475)]-1,c&&o>=0&&(t[a(563)][i].description=c[a(418)][o])):c&&c[a(1426)]>=2&&c[a(1356)]>0&&(t[a(563)][i][a(594)]=c[a(418)][c.default_group_description_index-1])}},_[s(948)]=function(e,t,r){var n=s;t&&(e?(t.is_leading=e[n(266)][r],t[n(845)]=e.sample_depends_on[r],t.is_depended_on=e[n(655)][r],t[n(486)]=e[n(831)][r]):(t.is_leading=0,t[n(845)]=0,t[n(1160)]=0,t[n(486)]=0))},_.prototype[s(980)]=function(){var e,t,r=s;for(e=0;eb&&(w++,b<0&&(b=0),b+=o[C(352)][w]),t>0?(e[C(821)][t-1].duration=o[C(1328)][w],e[C(692)]+=e[C(821)][t-1].duration,x[C(259)]=e[C(821)][t-1].dts+e[C(821)][t-1][C(906)]):x[C(259)]=0,a?(t>=S&&(I++,S<0&&(S=0),S+=a[C(352)][I]),x[C(1294)]=e.samples[t].dts+a[C(1406)][I]):x[C(1294)]=x[C(259)],c?(t==c[C(888)][A]-1?(x[C(607)]=!0,A++):(x[C(607)]=!1,x[C(1200)]=0),l&&l.entries[E][C(1053)]+k==t+1&&(x.subsamples=l.entries[E][C(325)],k+=l[C(418)][E][C(1053)],E++)):x[C(607)]=!0,_[C(948)](e[C(540)][C(1255)][C(1201)][C(535)],x,x[C(423)]),x[C(1200)]=f?f[C(1332)][t]:0,l&&l[C(418)][E][C(1053)]+k==t&&(x.subsamples=l.entries[E][C(325)],k+=l[C(418)][E][C(1053)]),(d.length>0||h.length>0)&&_[C(291)](e,x,t,e[C(773)])}t>0&&(e[C(821)][t-1][C(906)]=Math[C(1056)](e[C(540)].mdhd.duration-e[C(821)][t-1].dts,0),e[C(692)]+=e[C(821)][t-1][C(906)])}},_[s(849)][s(720)]=function(){var e,t,r,n,i,o,a,c,u,l,d,f,p,m,v,y=s;if(void 0!==this[y(743)])for(;this.lastMoofIndex0&&_[y(1184)](f,d,d.sbgps,f[y(540)].minf.stbl.sgpds,d[y(262)]),t=0;t0?m.dts=f[y(821)][f[y(821)][y(949)]-2][y(259)]+f[y(821)][f.samples[y(949)]-2][y(906)]:(d[y(1158)]?m[y(259)]=d.tfdt.baseMediaDecodeTime:m.dts=0,f[y(246)]=!0),m[y(1294)]=m[y(259)],g.flags&h[y(1351)]&&(m[y(1294)]=m[y(259)]+g[y(339)][r]),v=a,g[y(860)]&h[y(910)]?v=g.sample_flags[r]:0===r&&g.flags&h.TRUN_FLAGS_FIRST_FLAG&&(v=g[y(487)]),m[y(607)]=!(v>>16&1),m[y(266)]=v>>26&3,m.depends_on=v>>24&3,m[y(1160)]=v>>22&3,m[y(486)]=v>>20&3,m[y(1200)]=65535&v;var b=!!(d.tfhd[y(860)]&h.TFHD_FLAG_BASE_DATA_OFFSET),w=!!(d[y(1208)][y(860)]&h.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),S=!!(g[y(860)]&h[y(863)]),I=0;I=b?d[y(1208)].base_data_offset:w?l[y(1152)]:0===t?l.start:c,m[y(1416)]=0===t&&0===r?S?I+g[y(1108)]:I:c,c=m[y(1416)]+m[y(362)],(d[y(375)][y(949)]>0||d[y(262)].length>0||f.mdia.minf.stbl[y(375)][y(949)]>0||f[y(540)][y(1255)][y(1201)][y(262)][y(949)]>0)&&_.setSampleGroupProperties(f,m,m[y(1161)],d[y(773)])}}if(d[y(480)]){f[y(397)]=!0;var A=d[y(293)];for(t=0;t-1))return null;var u=(r=this[n(1040)].buffers[a])[n(1338)]-(i.offset+i[n(1344)]-r[n(528)]);if(i[n(362)]-i[n(1344)]<=u)return o[n(499)](n(825),n(760)+t+n(494)+i[n(1344)]+n(918)+(i.offset+i[n(1344)]-r[n(528)])+n(475)+(i[n(362)]-i[n(1344)])+" full size: "+i[n(362)]+")"),c[n(1281)](i[n(981)][n(1392)],i[n(1344)],r,i[n(1416)]+i.alreadyRead-r.fileStart,i[n(362)]-i[n(1344)]),r.usedBytes+=i[n(362)]-i[n(1344)],this[n(1040)].logBufferLevel(),i.alreadyRead=i.size,i;if(0===u)return null;o[n(499)](n(825),"Getting sample #"+t+n(928)+i[n(1344)]+n(918)+(i[n(1416)]+i[n(1344)]-r[n(528)])+n(475)+u+" full size: "+i[n(362)]+")"),c[n(1281)](i.data[n(1392)],i[n(1344)],r,i[n(1416)]+i.alreadyRead-r[n(528)],u),i[n(1344)]+=u,r.usedBytes+=u,this[n(1040)][n(1394)]()}},_[s(849)][s(974)]=function(e,t){var r=s,n=e.samples[t];return n[r(981)]?(this[r(1316)]-=n.size,n[r(981)]=null,n[r(594)]=null,delete n[r(1200)],delete n[r(845)],delete n.description_index,delete n[r(486)],delete n[r(1160)],delete n[r(266)],delete n[r(607)],delete n[r(930)],delete n[r(1161)],delete n[r(852)],delete n.cts,delete n.dts,delete n[r(1416)],delete n[r(362)],delete n[r(1431)],delete n.duration,n[r(1344)]=0,n[r(362)]):0},_[s(849)][s(253)]=function(){return this.samplesDataSize},_.prototype[s(911)]=function(){var e=s;const t=this[e(1040)][e(1082)]||[];let r=0;return t[e(1029)]((e=>{const t=e.byteLength;r+=t})),r},_[s(849)][s(756)]=function(){var e,t=s,r="";for(e=0;e0&&(r+=","),r+=this[t(743)].traks[e][t(540)][t(1255)][t(1201)][t(1167)][t(418)][0][t(1371)]()}return r},_[s(849)][s(622)]=function(e){var t,r=s;if(!this[r(743)]||!this[r(743)].mvex)return null;for(t=0;t0&&(r[n(1218)]=a.ipro[n(1215)][a[n(1100)][n(1097)][e][n(761)]-1]),a[n(1100)][n(1097)][e][n(1123)]?r[n(971)]=a.iinf[n(1097)][e][n(1123)]:r[n(971)]="mime",r[n(393)]=a.iinf.item_infos[e][n(393)],r[n(1486)]=a[n(1100)][n(1097)][e][n(1486)];if(a[n(654)])for(e=0;e0&&f[n(1129)]-1-1))return null;var l=(t=this.stream[n(1082)][u])[n(1338)]-(a[n(1416)]+a[n(1344)]-t.fileStart);if(!(a[n(949)]-a[n(1344)]<=l))return o.debug(n(825),"Getting item #"+e+n(719)+i+n(928)+a[n(1344)]+n(918)+(a[n(1416)]+a.alreadyRead-t[n(528)])+n(475)+l+n(787)+a[n(949)]+" full item size: "+r[n(362)]+")"),c.memcpy(r[n(981)][n(1392)],r[n(1344)],t,a[n(1416)]+a.alreadyRead-t[n(528)],l),a[n(1344)]+=l,r[n(1344)]+=l,t[n(1241)]+=l,this[n(1040)][n(1394)](),null;o[n(499)](n(825),n(441)+e+n(719)+i+n(494)+a.alreadyRead+n(918)+(a[n(1416)]+a[n(1344)]-t[n(528)])+n(475)+(a.length-a[n(1344)])+" full extent size: "+a[n(949)]+n(1296)+r[n(362)]+")"),c[n(1281)](r.data[n(1392)],r[n(1344)],t,a[n(1416)]+a[n(1344)]-t[n(528)],a[n(949)]-a[n(1344)]),t[n(1241)]+=a.length-a[n(1344)],this.stream[n(1394)](),r[n(1344)]+=a[n(949)]-a.alreadyRead,a[n(1344)]=a.length}}return r[n(1344)]===r[n(362)]?r:null},_[s(849)][s(405)]=function(e){var t=s,r=this[t(713)][e];if(r[t(981)]){this[t(765)]-=r[t(362)],r[t(981)]=null,r[t(1344)]=0;for(var n=0;n0?this.moov.traks[e][i(821)][0][i(906)]:0),t[i(313)](n)}return t},_[s(849)][s(727)]=function(){var e=s,t={};return t[e(743)]=this[e(743)],this[e(743)]&&this[e(743)][e(1192)]&&this.moov[e(1192)].length>1&&(t[e(997)]=this[e(743)][e(1192)][0][e(821)][e(949)],t[e(390)]=this[e(743)][e(1192)][1][e(821)].length),t},h[s(836)][s(849)][s(1465)]=function(e){var t=s;this[t(362)]+=8,this[t(362)]>u&&(this[t(362)]+=8),this[t(971)]===t(790)&&(this[t(362)]+=16),e[t(566)](e[t(1050)]+"size:"+this[t(362)]),e[t(566)](e.indent+t(1126)+this.type)},h.FullBox.prototype[s(1465)]=function(e){var t=s;this[t(362)]+=4,h[t(836)][t(849)].printHeader[t(762)](this,e),e.log(e.indent+t(1288)+this.version),e[t(566)](e[t(1050)]+t(1436)+this[t(860)])},h.Box[s(849)].print=function(e){this[s(1465)](e)},h[s(445)][s(849)][s(1405)]=function(e){var t=s;this.printHeader(e);for(var r=0;r>8)),e[t(566)](e[t(1050)]+t(938)+this.matrix[t(1352)](", ")),e[t(566)](e[t(1050)]+t(968)+this[t(1285)])},h[s(994)][s(849)][s(1405)]=function(e){var t=s;h.FullBox[t(849)][t(1465)][t(762)](this,e),e[t(566)](e[t(1050)]+t(866)+this[t(848)]),e.log(e[t(1050)]+t(788)+this[t(900)]),e[t(566)](e.indent+t(846)+this[t(1431)]),e[t(566)](e.indent+"duration: "+this[t(906)]),e[t(566)](e[t(1050)]+t(1135)+(this[t(1177)]>>8)),e.log(e[t(1050)]+t(938)+this[t(746)][t(1352)](", ")),e[t(566)](e[t(1050)]+t(812)+this.layer),e[t(566)](e[t(1050)]+t(1435)+this[t(1071)]),e[t(566)](e[t(1050)]+t(587)+this[t(438)]),e[t(566)](e[t(1050)]+"height: "+this[t(1181)])};var g={createFile:function(e,t){var r=s,n=void 0===e||e,i=new _(t);return i[r(793)]=!n,i}};s(854)!==s(814)&&(t[s(817)]=g[s(817)])}));function So(e,t){var r=Io();return(So=function(e,t){return r[e-=235]})(e,t)}function Io(){var e=["udes","parseSample","stts","item_ID","Log","profile","stream","general_profile_compatibility","length_size_of_trun_num","save","createTrackGroupCtor","add","stppSampleEntry","horizresolution","readInt16","item_uri_type","indent","tkhd","sidx","sample_delta","alst","isAudio","max","used","processIncompleteBox","createCommonjsModule","createFragment","Error reading base offset size","parseHex16","SmDm","cslg","general_constraint_indicator","vvc1","sample_size","vertOffD","Generating initialization segment","findPosition","alternate_group","writeInt8Array","value","sub_track_id","meta","ind_subs","afbr","ext","isEos","stsg","interleave_type","buffers","name","TrackReferenceTypeBox","readUint64","error","1821516BwPvRf","charCodeAt","mapInt8Array","createEntityToGroupCtor","primaryGChromaticity_x","hvcCBox","lengthSizeMinusOne","222LoYsqi","num_entities_in_group","layer_id","item_infos","dac3","bsid","iinf","mvex","vvi1SampleEntry","DataStream.save: Can't create object URL.","SAMPLE_ENTRY_TYPE_HINT","onMoovStart","float32le","stsa","data_offset","arrayToNative","emsg","prdi","bxml","stcoBox","document","ChannelMapping","media_rate_integer","data_format","scheme_uri","reserved_2","DecoderConfigDescriptor","Text","isHint","item_type","box","appendBuffer","type:","sampleProcessingStarted","greatestDecodeToDisplayDelta","property_index","Metadata","full_range_flag","avc4SampleEntry","target_rate_share","writeUint32Array","volume: ","DecoderSpecificInfo","readFloat32","getInt8","index_size","pts","msrc","destroy","row_align_size","nbSamples","description_length","getInt32","hvcC","stsz","XMLSubtitlein4Parser","replace","documentString","start","getTrackDuration","skew_factor","end","rtp ","bits_per_pixel","tfdt","url Box","is_depended_on","number_in_traf","item_name","bad_rows","chunk_run_index","codecIntializationData","lsel","stsd","transferCharacteristics","Error reading extent index","Needs an array buffer","albc","sync_sample_numbers","MP4Box","bufferSizeDB","stscBox","reserved_1","volume","transferFunction","dataView","onSidx","height","initial_presentation_delay_minus_one","default_KID","initSampleGroups","av01SampleEntry","sampleListBuilt","nalu_arrays","ES_Descriptor","ac-3","lang","fragment_count","traks","ref_to","stpp","pixel_size","rate: ","TRUN_FLAGS_DURATION","], [","Concatenating buffer for box parsing (length: ","degradation_priority","stbl","general_profile_idc","stszBox","constant_IV","defineProperty","iloc","Descriptor ","tfhd","OutputChannelCount","SAP_type","BYTES_PER_ELEMENT","createBoxCtor","mehd","colour_type","protections","track_ID","chroma_subsampling_x","protection","compositionEndTime","writeUint16Array","sample_description_index"," of size: ","created","slice","minor_version","Not enough data in stream to parse the type and size of the box","stsh","trpy","init","ABCDEFGHIJKLMNOPQRSTUVWXYZ234567","default_constant_IV_size","setNextSeekPositionFromSample","parseFullHeader","moof","TFHD_FLAG_SAMPLE_SIZE","stsc","Creating media fragment on track #","writeUint8","getSampleSize","No method for reading signed 64 bits values","usedBytes","high_bitdepth","attribute_list","user","meco","default_sample_duration","avg_frame_rate","nump","vttc","dmax","moovStartFound","traf_number","lfeon","writeUint24","minf","traf","reduceBuffer","cleanApertureHeightN","Found box of type '","parseFooter","_buffer","createSingleSampleMoof","xml ","namespace","Cannot seek: moov not received!","writeFloat32Array","ac-4","itemId","seek","event_duration",">","entity_ids","bit_rate_code","tfdtBox","first_offset","mfro","time","cmin","co64Box","sbpm","memcpy","subtitleTracks"," (total: ","fr-FR","next_track_id","data_offset_position","ntp_timestamp","version:","BoxWriter","has_unparsed_data","avcC","ptl_sublayer_present_mask","segment_duration","cts","_sweep"," full item size: ","pdin","associations","step_count","sampling_type","balance","ftyp","info","default_Per_Sample_IV_Size","TRUN_FLAGS_FIRST_FLAG","image_width"," of size "," --\x3e ","addEntry","first_dts","trun","mergeNextBuffer","numMetadataBlocks","Adjusting box ","SAMPLE_ENTRY_TYPE_TEXT","samplesDataSize","clli","component_bit_depth_minus_one","isMetadata","hev1SampleEntry","onReady","writeUint64","twelve_bit","getWidth","presentation_time","sdptext","avcCBox","sample_deltas","fieldOrdering","assignment_type","baseMediaDecodeTime","priority","unpack","saiz","block_reversed","stshBox",'"; profiles="',"byteLength","bg_color_rgba","readCString","tsyn","cts_shift"," stored buffer(s) (","alreadyRead","cleanApertureWidthD","to_item_ID","readySent","concat","readUint","av01","TRUN_FLAGS_CTS_OFFSET","join","2TVVlly","default_sample_info_size","URL","default_group_description_index","aux_subtype","eqiv","KID","readFloat32Array","moofBox","elst","addSample","iprp","mdats","SPS","boxEqualFields","sinf","tfhdBox","extent_offset","getCodec","createMediaSampleEntryCtor","mdcv","moof_offset","mp4aSampleEntry","ChannelMappingFamily","crypt_byte_block","strd","minimum_bitrate","nextParsePosition","sthd","construction_method","mapInt16Array","component_types","ec-3","avcDecoderConfigRecord","scheme_version","mfhdBox","grouping_type_parameter","codec","vertical_justification","buffer","totl","logBufferLevel"," for sample ","level_independently_decodable","onError","getTrackSample","block_size","onItem","num_sublayers","mha1","SAMPLE_ENTRY_TYPE_METADATA","samplerate","print","sample_offsets","component_index","constant_frame_rate","pixi","findEndContiguousBuf","writeString","trunBox","modified","ipmas","lhe1","offset","ster","scheme_id_uri","mha2","flipArrayEndianness","moofs","click","readInt32","readUint24","MultiBufferStream","version","isSubtitle","monochrome","extractedTracks","SubtitleSampleEntry","track_id","setExtractionOptions","irot","parseLanguage","alternate_group: ","flags:","tsel","apply","displayFlags","dinf","scif","default_isProtected","elng","Not enough bytes in buffer","configOBUs","videoTracks","TFHD_FLAG_SAMPLE_DUR","primaryBChromaticity_y","_realloc","getItem","num_bytes_constraint_info","vvcC","createObjectURL","OutputGain","Repositioning parser at buffer position: ","levels","SingleItemTypeReferenceBoxLarge","pmax","setInt16","Found 'mdat' end in buffered data","2997963yCeghq","prof","boxes","getTrackById","printHeader","durationFlag","whitePointChromaticity_y","_dynamicSize","fragment_duration","rash","leva","int32","addTrack","Subtitle","group_description_index","scnm","padding_flag","sample_duration","chunk_offsets","SampleEntry","emsgBox","vvi1","ipco","appendChild","first_chunk","content_encoding","tref","compatible_brands","createEncryptedSampleEntryCtor","available_bitrate","TFHD_FLAG_BASE_DATA_OFFSET","encv","samplesize","getInt16","auxC","seekPoints","brst","writeInt8","first_traf_merged","Error accessing position in the MultiBufferStream","mdhdBox","maximum_bitrate","parseConfig","operation_point_count","SingleItemTypeReferenceBox","getAllocatedSampleDataSize","bits_per_channels","videoFullRangeFlag","aux_info_type_parameter","cleanApertureWidthN","Version","dts","hasMoov","cleanApertureHeightD","sgpds","max_ref_per_pic","isFragmented","fromCharCode","is_leading","Not enough bytes left in the parent box to parse a new box","writeFooter","switch_group","parseOneBox","graphicsmode","a1op","general_level_idc","floor","mdatBox","kind","avss","<","encm","horizOffN","fromCharCodeUint8","hvt1","1310580hMNDKU","tmin","getChannelCount","readInt16Array","trgr","vp09","Position ","encode","setSampleGroupProperties","min","first_sample_index","split","nativeToEndian","mdhd","tmax","AVCLevelIndication","TFHD_FLAG_SAMPLE_DESC","ASCII","hnti","getOTI","writeHeader","absolute_duration","iref","payl","getUint16","getEndFilePositionAfter","dtrt","' and size ","num_bad_rows","endianness","push","general_tier_flag","co64","writeFloat64Array","dataview","sttsBox","insertBuffer","av1C","writeUint16","ctts","bitDepth","primaryGChromaticity_y","subsamples","lastValidSample","media_time","item_count","mskC","und","buildTrakSampleLists","writeInt16Array","setUint32","num_held_bits","AVCProfileIndication","10HJBchZ","uint16be","enof","sample_composition_time_offset","InputSampleRate","stxt","iso4","getUint32","MP4BoxStream","nb_PPS_nalus","hasItem","getBoxes","href","description_index","references","boxCodes","sample_counts","acmod","mapUint32Array","extents","AudioSampleEntry","avc4","track_group_id","797356vmMNiR","component_format","8EtAvOq","size","writeInitializationSegment","TrackGroupTypeBox","5296mKjFCA","num_bad_cols","isProgressive","writeCString","moovStartSent","mjpg","uint16","duration: ","scheme_type","a2394f525a9b4f14a2446c427c648df4","sbgps","principal_point_x","moovBox","subsegments","getInfo","pos_x","default_constant_IV","DataStream","nb_SPS_nalus","1098009NzJhNW","track_height","avll","avgFrameRate","prol","elstBox","moovVideoNum","SEEKTABLE","image_height","content_type","cprt","luminanceMin","writeStruct","has_fragment_subsamples","grouping_type","quat_y","elngBox","getLength","TFHD_FLAG_DUR_EMPTY","txtC","TFHD_FLAG_DEFAULT_BASE_IS_MOOF","releaseItem","writeInt16","sent","dynamicSize","item_protection_index","major_brand","range_size","level","ERR_NOT_ENOUGH_DATA","mapFloat32Array","from_item_ID","video","luminanceMax","entries","tyco","infe","avc2SampleEntry","trefBox","number","readUint8Array","dfLa","tapt","edits","NAL_unit_type","getBox","Not enough bytes left in the parent box to parse a UUID box","(empty)","dependency","Audio","parseFromString","sequence_number","saio","colourPrimaries","width","UUIDs","bufferIndex","Getting item #","num_total_samples","dref","vp09SampleEntry","ContainerBox","readInt8Array","vertresolution","compositionStartTime","kid","payloadID","equal","vide","tfra","hasIncompleteMdat","earliest_presentation_time","writeUint32","mvhd","bad_columns","track_ids","dimm","subSequenceIdentifier","hevcDecoderConfigRecord","prft","stream_read_1_bytes","Allocating sample #"," on track #","vipr","nextSeekPosition","readString","sampleEntryCodes","_self","trafs","CUESHEET","vvnC"," read size: ","TRUN_FLAGS_SIZE","findDescriptor","smhd","isFragmentationInitialized","subs","vp08","rtpmap_string","stz2","layerNumber","compositionToDTSShift","has_redundancy","first_sample_flags","SAMPLE_ENTRY_TYPE_AUDIO","stss","int16","setUint8","component_align_size","RESERVED"," data (alreadyRead: ","PADDING","FullBox"," v=","VORBIS_COMMENT","debug","location","accurateStatisticsFlag","pos_z","depth"," with new size ","ptl_multilayer_enabled","ipro","writeUint8Array","pad_unknown","getAudioConfig","initializeSegmentation","temporalIdNested","LITTLE_ENDIAN","avgRateFlag","hasIOD","sbtt","shadowed_sample_numbers","default_IV_size","clef","padbits","general_constraint_info","getHeight","nmhd","primaryRChromaticity_x","nonamespace","bit_depth_luma_minus8","cmex","d4807ef2ca3946958e5426cb9e46a79f","fileStart","_dataView","absolute_time","group_id","bad_pixel_column","vmhd","language","sdtp","SAMPLE_ENTRY_TYPE_SUBTITLE","readFloat64","max_content_light_level","channel_types","mdia","ftypBox","setSegmentOptions","subtitles","adjustUint32","layer"," f=","ssix","base_data_offset","onSamples","_size","decimalToHex","CONTAINER_BOXES","entity_groups","lastBoxStartPosition","sgpdBox","schemeURI","rinf","btrt","general_profile_space","writeType","MPEG4DescriptorParser","Visual","sample_groups","horizontal_justification"," - Length: ","log",'video/mp4; codecs="',"uint16le","esd","5MJYmZO","entry_index","starts_with_SAP","held_bits","CoLL","getDurationString","default_sample_flags","TKHD_FLAG_IN_MOVIE"," sample #","tpay","num_tile_cols_minus_one","Found position in existing buffer #","resetTables",""","mapInt32Array","nextMoofNumber","default_sample_size","width: ","float64le","reserved","sample_depends_on","getUint8","movie_duration","cstring","description","vpcC","chroma_sample_position","timescale: ","default_sample_description_index","TKHD_FLAG_IN_PREVIEW","default_skip_byte_block","writeUCS2String","kinds","int32le","opcolor","metadata","max_picture_height","is_sync","subBoxNames","readUint16Array","createSampleEntryCtor","quat_x","vvcN","constantFrameRate","length_size_of_sample_num","uint32be","field_size","SAMPLE_ENTRY_TYPE_SYSTEM","stereo_indication_type"," at position ","createFullBoxCtor","parsingMdat","getTrexById","parse","tile_align_size","isVideo","entry_count","nalu","Textin4Parser","237257zjILde","Adjusting data_offset with new value ","favc","getEndPosition","d08a4f1810f34a82b6c832d8aba183d3","test","fragment_description","sample_flags","mhm2","text","referenced_size","vttC","aux_type","aux_info_type","seekTrack","descs","seq_level_idx_0","readInt32Array","warn","fiel","base_offset","j2ki","STREAMINFO","avc3","quat_z","grpl","sample_is_depended_on","Per_Sample_IV_Size","audio","setAttribute","descriptionformat","schi","message_data","float64","tags","body","constant_IV_size","configurationVersion","download","avc1","boxEqual"," Compressor","pasp","display_primaries","maxFALL","presentation_time_delta","segmentStream","hvc1SampleEntry","addUsedBytes","npck","tsas","computeSize","fieldCount","_byteLength","item_id","setAllUsedBytes","num_channels","block_pad_lsb","fscod","base_offset_size","chroma_format_idc","wbbr","sample_info_size","samples_duration","general_sub_profile_idc","substring","pow","codecIntializationDataSize","checkBuffer","stream_read_2_bytes","getSample","parallelismType","extent_index","props","ICC_profile","sync","parseHeader","itemListBuilt","component_count","int16le","properties","audioTracks","track_width","cleanBuffers","items","offset_size","ptl_num_sub_profiles","num_dep_sub","rapAlignement","strk"," extent #","updateSampleLists","bit_depth_minus8","trexs","profile_compatibility","extract_bits","oti","system_id","getPerformanceInfo","set","removeUsedSamples","pos_y","etyp","SampleGroupEntry","isEof","position","colorSpace","ptl_present_flag","u16stringle","j2kH","mime_format","vvs1","frame_count","uncv","moov","smhdBox","processIncompleteMdat","matrix","sbgp","rate","flattenItemInfo","updateUsedBytes",'application/mp4; codecs="',"addSubBoxArrays","setInt8","vmhdBox","SAP_delta_time","getCodecs","onSegment","reference_ID","tpyl","Getting sample #","protection_index","call","Sending samples on track #","restoreParsePosition","itemsDataSize","getTime","Found ","ols_idx","roll","aebr","seq_tier_0","sdp ","sample_groups_info","hinf","white_point","num_output_samples","sizePosition","sgpd","first_output_sample","vp08SampleEntry","getDescriptorName","stdp",", column: ","releaseUsedSamples","int32be","esds"," full extent size: ","modification_time: ","auxiliary_mime_types","uuid","ipma","extended_language","discardMdatData","processSamples","getPosition","sublayer_level_idc","LiveServerManifest","completeness","length_size","extent_length","getSampleRate","avgBitRate","shift","initialized","default_length","fobr","initial_presentation_delay_present","mime","sample_offset","angle","splice","layer: ","correction_applied","undefined","dOps","trak","createFile","stco","truns","uint32le","samples","description_boxes","Buffer must have a fileStart property","readUint16","ISOFile","initialize","SAMPLE_ENTRY_TYPE_VISUAL","OCR_ES_ID","metadataTracks","lastMoofIndex","sample_has_redundancy","write","sidxSent","mfhd","TFHD_FLAG_SAMPLE_FLAGS","Box","writeInt32Array","sample_sizes","1904-01-01T00:00:00Z","packetssent","pitm","readAnyInt","sample_number","wvtt","depends_on","track_id: ","itemToFragmentedTrackFile","creation_time","prototype","num_leading_samples","styp","timescale","processItems","object","trun_number","toString","chroma_subsampling_y","6d1d9b0542d544e680e2141daff757b2","readUint32Array","flags","maxCLL","hdlrBox","TRUN_FLAGS_DATA_OFFSET","tx3g","PPS","creation_time: ","avgBitrate","resources","tracks","skip_byte_block","SLConfigDescriptor","edts","pssh","matrix_coefficients","trex","layer_size","ptl_frame_only_constraint","writeInt32","data_reference_index","UUIDBoxes","stop","colour_primaries","parseRemainingDescriptors","version of iloc box not supported","channel_indexes","readInt64","dec3","sample_numbers","reference_type","bytessent","encu","getPrimaryItem","seq_profile","hdr_size","DIFF_BOXES_PROP_NAMES","createUUIDBox","stssBox","addBox","uncC","modification_time","url ","primaryRChromaticity_y","nalu_type","parseUUID","cmpd","duration","bit_depth_chroma_minus8","udta","readUint32","TRUN_FLAGS_FLAGS","getStreamBufferSize","component_little_endian","media_rate_fraction","focal_length_x","handler","urn Box","min_display_mastering_luminance"," offset: ","padb","tag","PICTURE","nextSample","ptl_frame_only_constraint_flag",", size ","byteOffset","bad_pixel_row","mapFloat64Array"," partial data (alreadyRead: ","hmhd","moof_number","readUint8","rap ","CoupledCount","writeFloat32","avc1SampleEntry","parseOneDescriptor","hvc1","matrix: ","stxtSampleEntry","writeFloat64","rICC","enct","ispe","parseDataAndRewind","roll_distance","uint32","avc2","process_sdtp","length","period","is_fragment","TKHD_FLAG_ENABLED","uri ","seekLists","mapUint8Array","BIG_ENDIAN","vertOffN","languageString","bsmod","notice","saveParsePosition","samples_per_chunk","free","bad_pixels","readInt8","chan_loc","ranges","next_track_id: ","mvif","slid","type","colr","VisualSampleEntry","releaseSample","DIFF_PRIMITIVE_ARRAY_PROP_NAMES","max_display_mastering_luminance","channel_count","mjp2","samples_size","buildSampleLists","data","sidxBox","nb_samples","u16stringbe","code","hdlr","last_sample_in_run","Opus","_trimAlloc","horizOffD","mvhdBox","max_pic_average_light_level","mfra","tkhdBox","mehdBox","numTemporalLayers","moovAudioNum"," bytes), continuous ranges: ","dvh1","_byteOffset","fragmentedTracks","num_bad_pixels","data_rate","Stream ready for parsing","Descriptor","compressorname","'","brands","component_type_urls","streamType","getMetaHandler","sample_count","source","Buffer must be defined and non empty","schema_location","intra_pred_used","subSeqDirectionFlag","mapUint16Array","hintTracks","indexOf","otherTracks","BoxParser","subsegment_duration","createSampleGroupCtor","u16string","readFloat64Array","function","printRanges","forEach","chunk_index","flush","mdat","default_AlgorithmID"];return(Io=function(){return e})()}function Ao(e,t){const r=xo();return(Ao=function(e,t){return r[e-=465]})(e,t)}wo[bo(1038)],wo[bo(344)],wo.DataStream,wo[bo(1425)],wo[bo(561)],wo[bo(1022)],wo[bo(1149)],wo.Textin4Parser,wo[bo(825)],wo[bo(817)];const Eo=Ao;function ko(e){return e[Ao(485)](((e,t)=>256*e+t))}function Co(e){const t=Ao,r=[101,103,119,99],n=e.length-28,i=e[t(491)](n,n+r[t(506)]);return r[t(467)](((e,t)=>e===i[t]))}!function(e,t){const r=Ao,n=e();for(;;)try{if(740457===-parseInt(r(480))/1*(parseInt(r(483))/2)+-parseInt(r(499))/3*(parseInt(r(468))/4)+-parseInt(r(487))/5+parseInt(r(482))/6+parseInt(r(496))/7*(-parseInt(r(470))/8)+-parseInt(r(486))/9*(parseInt(r(504))/10)+-parseInt(r(489))/11*(-parseInt(r(490))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(xo);Eo(474),Eo(472);function xo(){const e=["debugWarn","252986ndbMYt","memory","5206908bzymoq","4jVBBDA","reverse","reduce","261QwQWoT","5645785VyipsR","init error","11GbgqJI","39522456dXFNpj","slice","Instance","byteLength","init","debuglog","93086qsWjss","exports","buffer","6TojHON","player","TransportDescrambler","set","stack overflow","183640UaEztc","instantiate","length","parse","TAG_NAME","object","Memory","debugLog","every","564920jiQLtI","wasm not supported","584YpkNWu","Module","transport","message","destroy","instance","function","then","not support wasm"];return(xo=function(){return e})()}function To(e,t){const r=Do();return(To=function(e,t){return r[e-=428]})(e,t)}function Bo(){const e=To;for(var t=arguments.length,r=new Array(t),n=0;n{const n=e,s=new i((0|t.byteLength)+(0|r[n(432)]));return s.set(t,0),s.set(r,0|t[n(432)]),s}),new i)}function Do(){const e=["error","678NQnJAj","741732sQKQTF","88wmNtFX","reduce","length","850wAUAwp","95QSstSf","261ApTuwX","substr","4081vOPyLN","byteLength","1625316DeFrLx","3592OEiQxW","636837XuFTJo","padStart","207350KnAKxL","set","78900qIZvYn"];return(Do=function(){return e})()}!function(e,t){const r=To,n=e();for(;;)try{if(363456===parseInt(r(441))/1*(parseInt(r(446))/2)+-parseInt(r(435))/3+parseInt(r(433))/4+-parseInt(r(428))/5*(-parseInt(r(439))/6)+parseInt(r(431))/7*(-parseInt(r(434))/8)+parseInt(r(429))/9*(-parseInt(r(437))/10)+-parseInt(r(443))/11*(-parseInt(r(442))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Do),function(e,t){const r=Go,n=e();for(;;)try{if(157296===-parseInt(r(459))/1*(parseInt(r(453))/2)+parseInt(r(451))/3+-parseInt(r(455))/4*(-parseInt(r(461))/5)+parseInt(r(450))/6+parseInt(r(438))/7+parseInt(r(435))/8+-parseInt(r(446))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(qo);const Mo=16,Po=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Uo=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Fo(e){const t=Go,r=[];for(let n=0,i=e[t(434)];n{const t=Go;return 1===(e=e.toString(16))[t(434)]?"0"+e:e}))[t(442)]("")}function Lo(e){const t=Go,r=[];for(let n=0,i=e[t(434)];n>>6),r[t(454)](128|63&i);else if(i<=55295||i>=57344&&i<=65535)r[t(454)](224|i>>>12),r[t(454)](128|i>>>6&63),r[t(454)](128|63&i);else{if(!(i>=65536&&i<=1114111))throw r.push(i),new Error(t(444));n++,r[t(454)](240|i>>>18&28),r.push(128|i>>>12&63),r[t(454)](128|i>>>6&63),r[t(454)](128|63&i)}}return r}function Oo(e){const t=Go,r=[];for(let n=0,i=e.length;n=240&&e[n]<=247?(r.push(String.fromCodePoint(((7&e[n])<<18)+((63&e[n+1])<<12)+((63&e[n+2])<<6)+(63&e[n+3]))),n+=3):e[n]>=224&&e[n]<=239?(r.push(String[t(458)](((15&e[n])<<12)+((63&e[n+1])<<6)+(63&e[n+2]))),n+=2):e[n]>=192&&e[n]<=223?(r[t(454)](String[t(458)](((31&e[n])<<6)+(63&e[n+1]))),n++):r[t(454)](String.fromCodePoint(e[n]));return r.join("")}function zo(e,t){const r=31&t;return e<>>32-r}function No(e){return(255&Po[e>>>24&255])<<24|(255&Po[e>>>16&255])<<16|(255&Po[e>>>8&255])<<8|255&Po[255&e]}function Ho(e){return e^zo(e,2)^zo(e,10)^zo(e,18)^zo(e,24)}function Vo(e){return e^zo(e,13)^zo(e,23)}function Wo(e,t,r){const n=new Array(4),i=new Array(4);for(let t=0;t<4;t++)i[0]=255&e[4*t],i[1]=255&e[4*t+1],i[2]=255&e[4*t+2],i[3]=255&e[4*t+3],n[t]=i[0]<<24|i[1]<<16|i[2]<<8|i[3];for(let e,t=0;t<32;t+=4)e=n[1]^n[2]^n[3]^r[t+0],n[0]^=Ho(No(e)),e=n[2]^n[3]^n[0]^r[t+1],n[1]^=Ho(No(e)),e=n[3]^n[0]^n[1]^r[t+2],n[2]^=Ho(No(e)),e=n[0]^n[1]^n[2]^r[t+3],n[3]^=Ho(No(e));for(let e=0;e<16;e+=4)t[e]=n[3-e/4]>>>24&255,t[e+1]=n[3-e/4]>>>16&255,t[e+2]=n[3-e/4]>>>8&255,t[e+3]=255&n[3-e/4]}function jo(e,t,r){const n=new Array(4),i=new Array(4);for(let t=0;t<4;t++)i[0]=255&e[0+4*t],i[1]=255&e[1+4*t],i[2]=255&e[2+4*t],i[3]=255&e[3+4*t],n[t]=i[0]<<24|i[1]<<16|i[2]<<8|i[3];n[0]^=2746333894,n[1]^=1453994832,n[2]^=1736282519,n[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=n[1]^n[2]^n[3]^Uo[r+0],t[r+0]=n[0]^=Vo(No(e)),e=n[2]^n[3]^n[0]^Uo[r+1],t[r+1]=n[1]^=Vo(No(e)),e=n[3]^n[0]^n[1]^Uo[r+2],t[r+2]=n[2]^=Vo(No(e)),e=n[0]^n[1]^n[2]^Uo[r+3],t[r+3]=n[3]^=Vo(No(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function Go(e,t){const r=qo();return(Go=function(e,t){return r[e-=433]})(e,t)}function qo(){const e=["push","16AZJJAg","array","byteLength","fromCodePoint","21848AMxwIe","key is invalid","179365pgFwHd","set","pkcs#5","length","300352bvNKwP","includes","iv is invalid","647206WdJijU","string","cbc","substr","join","error","input is not supported","splice","1140705QipNzt","none","pkcs#7","slice","493260XfEPQB","374907apcJUw","codePointAt","18DyDsUh"];return(qo=function(){return e})()}function $o(e,t,r){const n=Go;let{padding:i=n(448),mode:s,iv:o=[],output:a="string"}=arguments[n(434)]>3&&void 0!==arguments[3]?arguments[3]:{};if(s===n(440)&&("string"==typeof o&&(o=Fo(o)),16!==o[n(434)]))throw new Error(n(437));if(typeof t===n(439)&&(t=Fo(t)),16!==t.length)throw new Error(n(460));if(e="string"==typeof e?0!==r?Lo(e):Fo(e):[...e],(i===n(433)||i===n(448))&&0!==r){const t=Mo-e[n(434)]%Mo;for(let r=0;r=Mo;){const t=e[n(449)](h,h+16),i=new Array(16);if(s===n(440))for(let e=0;e2&&void 0!==arguments[2]&&arguments[2],i=arguments[r(434)]>3&&void 0!==arguments[3]&&arguments[3];const s=e[r(457)];let o=new Uint8Array(e[r(449)](0,5)),a=5;for(;as){const t=new Uint8Array(o[r(434)]+e.length-a);t[r(462)](o,0),t[r(462)](e[r(449)](a),o[r(434)]),o=t;break}let l=e[a+4],d=!1,h=2;if(n?(i&&(h=3),l=l>>>1&63,d=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][r(436)](l)):(l&=31,d=1===l||5===l),d){const n=$o(e[r(449)](a+4+h,a+4+u),t,0,{padding:r(447),output:"array"});let i=n[n[r(434)]-1];if(i>0&&i<16){let e=!0;for(let t=1;t<=i;t++)if(n[n[r(434)]-t]!==i){e=!1;break}e&&n[r(445)](n[r(434)]-i,i)}const s=new Uint8Array(h);s[r(462)](e[r(449)](a+4,a+4+h),0);const c=Et(Bo(s,new Uint8Array(n))),l=new Uint8Array(o[r(434)]+c[r(434)]);l[r(462)](o,0),l[r(462)](c,o[r(434)]),o=l}else{const t=e[r(449)](a+4,a+4+u),n=new Uint8Array(o[r(434)]+4+t[r(434)]);n[r(462)](o,0),n[r(462)](c,o.length),n.set(t,o[r(434)]+4),o=n}a=a+4+u}return o}function Jo(){const e=["13drJWim","keys","emit","3462HhfVdr","push","6510552NFEQfa","14180SXpSTV","forEach","168MucumW","apply","8921164sdplGI","190618TeZJCk","61497ynIqSY","slice","265zeiJFp","once","off","159zNQHta","length","13592ylQTUg","ctx","11HSqtZO","8261vTPECP"];return(Jo=function(){return e})()}const Xo=Zo;function Zo(e,t){const r=Jo();return(Zo=function(e,t){return r[e-=304]})(e,t)}!function(e,t){const r=Zo,n=e();for(;;)try{if(709367===parseInt(r(312))/1*(parseInt(r(325))/2)+-parseInt(r(308))/3*(parseInt(r(310))/4)+-parseInt(r(305))/5*(-parseInt(r(317))/6)+parseInt(r(324))/7+-parseInt(r(322))/8*(-parseInt(r(326))/9)+parseInt(r(320))/10*(-parseInt(r(313))/11)+-parseInt(r(319))/12*(parseInt(r(314))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Jo);class Qo{on(e,t,r){const n=Zo,i=this.e||(this.e={});return(i[e]||(i[e]=[]))[n(318)]({fn:t,ctx:r}),this}[Xo(306)](e,t,r){const n=this;function i(){const s=Zo;n.off(e,i);for(var o=arguments[s(309)],a=new Array(o),c=0;c1?n-1:0),s=1;s{delete n[e]})),void delete this.e;const i=n[e],s=[];if(i&&t)for(let e=0,n=i[r(309)];e=2&&!this[r(383)];)if(255==this[r(381)][this.parsedOffset]){if(!(!1&this.tempBuffer[this[r(390)]+1])){this[r(385)]=this[r(381)][this[r(390)]+1],this[r(392)]=ta[r(403)],this.fisrtStartCodeOffset=this[r(390)],this[r(390)]+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this[r(392)]==ta[r(403)]){let e=!1;for(;this.tempBuffer[r(402)]-this[r(390)]>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(this.tempBuffer[this[r(390)]+1]==this.versionLayer){this[r(392)]=ta[r(406)],this[r(387)]=this[r(390)],this[r(390)]+=2,e=!0;break}this[r(390)]++}else this[r(390)]++;if(e)continue;break}if(this.state==ta[r(406)]){let e=this[r(381)][r(393)](this[r(404)],this.secondStartCodeOffset);this[r(386)](r(389),e,t),this[r(381)]=this[r(381)][r(393)](this[r(387)]),this[r(404)]=0,this[r(390)]=2,this[r(392)]=ta[r(403)]}}}}function sa(e,t){const r=oa();return(sa=function(e,t){return r[e-=380]})(e,t)}function oa(){const e=["12dtKscO","40644SUAXhE","2709822CVegiG","1VcMHXR","byteLength","set","2357852ZWIJhv","4655145baSPvv","11818976zNjTPD","5958065MbBYtq","slice","3808889ADTASG","6130ZCnPCX","length"];return(oa=function(){return e})()}function aa(e,t,r){const n=sa;for(let i=2;i3&&void 0!==arguments[3]&&arguments[3];const s=e.byteLength;let o=5;for(;os)break;let c=e[o+4],u=!1;if(i?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(c)):(c&=31,u=1===c||5===c),u){const i=aa(e[n(382)](o+4,o+4+a),t,r);e[n(391)](i,o+4)}o=o+4+a}return e}function la(e,t,r){const n=sa;if(e[n(390)]<=30)return e;const i=aa(e[n(382)](30),t,r);return e[n(391)](i,30),e}function da(){var e=["14598oEWBHs","1310pymvNF","614076YlarWn","255eTXlAg","14828wVwsDl","set","34298PTtNqX","11796384GllowP","byteLength","filter","length","2710bNnssi","forEach","5502567kkaMZa","8pzvGNV","4921614uovXCK","2PsPVsE"];return(da=function(){return e})()}function ha(e,t){var r=da();return(ha=function(e,t){return r[e-=121]})(e,t)}function fa(){for(var e=ha,t=arguments[e(126)],r=new Array(t),n=0;ne+t.byteLength),0));let s=0;return r[e(128)]((t=>{var r=e;i[r(121)](t,s),s+=t[r(124)]})),i}!function(e,t){const r=sa,n=e();for(;;)try{if(794918===-parseInt(r(389))/1*(parseInt(r(388))/2)+parseInt(r(393))/3+-parseInt(r(392))/4+-parseInt(r(381))/5+-parseInt(r(386))/6*(-parseInt(r(383))/7)+-parseInt(r(380))/8+-parseInt(r(387))/9*(-parseInt(r(384))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(oa),function(e,t){for(var r=ha,n=e();;)try{if(500628===-parseInt(r(135))/1*(parseInt(r(132))/2)+parseInt(r(136))/3*(-parseInt(r(137))/4)+parseInt(r(134))/5*(-parseInt(r(133))/6)+-parseInt(r(129))/7*(-parseInt(r(130))/8)+-parseInt(r(131))/9+parseInt(r(127))/10*(parseInt(r(122))/11)+parseInt(r(123))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(da);const pa=ma;function ma(e,t){const r=va();return(ma=function(e,t){return r[e-=322]})(e,t)}function va(){const e=["493062RPUXGg","destroy","Events","destroys","removeEventListener","9686200qRFNhX","addEventListener","proxy","push","18798QNHrcx","length","forEach","141725pQLWRh","26680EyGcVr","12uowpgi","3737800MAAHPJ","164ZyYxpR","657tiakLc","bind","master","isArray","1533urigVe","175975WWuoKL"];return(va=function(){return e})()}!function(e,t){const r=ma,n=e();for(;;)try{if(807903===-parseInt(r(339))/1*(parseInt(r(341))/2)+-parseInt(r(327))/3+-parseInt(r(343))/4*(-parseInt(r(326))/5)+parseInt(r(336))/6*(-parseInt(r(325))/7)+parseInt(r(332))/8+-parseInt(r(344))/9*(-parseInt(r(340))/10)+-parseInt(r(342))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(va);class ya{constructor(e){const t=ma;this.destroys=[],this[t(334)]=this[t(334)][t(322)](this),this[t(323)]=e}[pa(334)](e,t,r){const n=pa;let i=arguments[n(337)]>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array[n(324)](t))return t.map((t=>this.proxy(e,t,r,i)));e[n(333)](t,r,i);const s=()=>{const s=n;zt(e[s(331)])&&e[s(331)](t,r,i)};return this[n(330)][n(335)](s),s}[pa(328)](){const e=pa;this[e(323)].debugLog(e(329),e(328)),this[e(330)][e(338)]((e=>e())),this.destroys=[]}}const _a=ga;function ga(e,t){const r=ba();return(ga=function(e,t){return r[e-=137]})(e,t)}function ba(){const e=["dependsOn","73395dCblBQ","HDLR_VIDEO","tfdt","avcc","vmhd","dinf","mp3","call","1097555SFBjEN","trun","timescale","flags","codecHeight","isDependedOn","HDLR_AUDIO","mdia","avc1","byteLength","STSD_PREFIX","stsc","SMHD","slice","158550XRbjCN","stbl","dref","isLeading","ftyp","codecWidth","hasRedundancy","esds","hvc1","mdhd","845344UxFKZq","STTS","hasOwnProperty","mdat","STSC","STCO","audioType","moov","mvex","mfhd","type","sequenceNumber","tfhd","trex","379599NkpErH","FTYP","1329114dvsHDt","mp4a","STSZ","box","smhd","minf","6347763gasecC","mvhd","constants","charCodeAt","stts","channelCount","size","hvcC","init","hdlr","sdtp","audio","presentHeight","avcC","stsz","duration","stco","trak","VMHD","moof","DREF","avc","traf","set","length","14aBiFWG","isNonSync","concat","40vMxsWF","tkhd","generateInitSegment","stsd","types"];return(ba=function(){return e})()}!function(e,t){const r=ga,n=e();for(;;)try{if(215127===-parseInt(r(215))/1+-parseInt(r(191))/2+-parseInt(r(169))/3*(parseInt(r(163))/4)+-parseInt(r(177))/5+parseInt(r(217))/6+-parseInt(r(160))/7*(-parseInt(r(201))/8)+parseInt(r(223))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ba);class wa{static[_a(143)](){const e=_a;wa.types={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(let t in wa.types)wa[e(167)][e(203)](t)&&(wa.types[t]=[t[e(138)](0),t[e(138)](1),t[e(138)](2),t.charCodeAt(3)]);let t=wa[e(137)]={};t[e(216)]=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),t[e(187)]=new Uint8Array([0,0,0,0,0,0,0,1]),t[e(202)]=new Uint8Array([0,0,0,0,0,0,0,0]),t[e(205)]=t[e(206)]=t[e(202)],t[e(219)]=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),t.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),t.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),t[e(189)]=new Uint8Array([0,0,0,0,0,0,0,0]),t[e(153)]=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static[_a(220)](e){const t=_a;let r=8,n=null,i=Array.prototype[t(190)][t(176)](arguments,1),s=i.length;for(let e=0;e>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r,n[t(158)](e,4);let o=8;for(let e=0;e>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static[_a(152)](e){const t=_a;return wa[t(220)](wa[t(167)][t(152)],wa[t(164)](e),wa[t(184)](e))}static[_a(164)](e){const t=_a;let r=e.id,n=e.duration,i=e.presentWidth,s=e[t(147)];return wa[t(220)](wa[t(167)].tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,255&i,0,0,s>>>8&255,255&s,0,0]))}static[_a(184)](e){const t=_a;return wa.box(wa[t(167)][t(184)],wa[t(200)](e),wa[t(144)](e),wa[t(222)](e))}static[_a(200)](e){const t=_a;let r=e[t(179)],n=e[t(150)];return wa[t(220)](wa.types[t(200)],new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]))}static[_a(144)](e){const t=_a;let r=null;return r="audio"===e.type?wa.constants[t(183)]:wa.constants[t(170)],wa[t(220)](wa[t(167)][t(144)],r)}static[_a(222)](e){const t=_a;let r=null;return r=e[t(211)]===t(146)?wa[t(220)](wa[t(167)][t(221)],wa[t(137)][t(189)]):wa[t(220)](wa.types[t(173)],wa.constants[t(153)]),wa[t(220)](wa[t(167)][t(222)],r,wa[t(174)](),wa[t(192)](e))}static[_a(174)](){const e=_a;return wa[e(220)](wa[e(167)][e(174)],wa.box(wa.types[e(193)],wa[e(137)][e(155)]))}static[_a(192)](e){const t=_a;return wa.box(wa[t(167)][t(192)],wa[t(166)](e),wa.box(wa[t(167)][t(139)],wa.constants[t(202)]),wa[t(220)](wa[t(167)][t(188)],wa.constants[t(205)]),wa[t(220)](wa[t(167)][t(149)],wa.constants[t(219)]),wa[t(220)](wa.types[t(151)],wa[t(137)][t(206)]))}static[_a(166)](e){const t=_a;return e.type===t(146)?e[t(207)]===t(175)?wa.box(wa[t(167)].stsd,wa[t(137)][t(187)],wa.mp3(e)):wa[t(220)](wa[t(167)][t(166)],wa[t(137)].STSD_PREFIX,wa[t(218)](e)):e.videoType===t(156)?wa[t(220)](wa.types.stsd,wa[t(137)][t(187)],wa[t(185)](e)):wa.box(wa[t(167)].stsd,wa[t(137)].STSD_PREFIX,wa[t(199)](e))}static[_a(175)](e){const t=_a;let r=e[t(140)],n=e.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return wa[t(220)](wa.types[".mp3"],i)}static[_a(218)](e){const t=_a;let r=e.channelCount,n=e.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return wa[t(220)](wa.types[t(218)],i,wa[t(198)](e))}static[_a(198)](e){const t=_a;let r=e.config||[],n=r[t(159)],i=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n]).concat(r)[t(162)]([6,1,2]));return wa[t(220)](wa[t(167)].esds,i)}static[_a(185)](e){const t=_a;let r=e[t(172)];const n=e[t(196)],i=e[t(181)];let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return wa.box(wa[t(167)][t(185)],s,wa[t(220)](wa[t(167)][t(148)],r))}static[_a(199)](e){const t=_a;let r=e.avcc;const n=e.codecWidth,i=e[t(181)];let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return wa.box(wa[t(167)][t(199)],s,wa[t(220)](wa[t(167)][t(142)],r))}static[_a(209)](e){const t=_a;return wa[t(220)](wa.types[t(209)],wa[t(214)](e))}static[_a(214)](e){const t=_a;let r=e.id,n=new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return wa[t(220)](wa.types[t(214)],n)}static[_a(154)](e,t){const r=_a;return wa.box(wa[r(167)].moof,wa[r(210)](e[r(212)]),wa[r(157)](e,t))}static mfhd(e){const t=_a;let r=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return wa[t(220)](wa[t(167)][t(210)],r)}static[_a(157)](e,t){const r=_a;let n=e.id,i=wa[r(220)](wa[r(167)][r(213)],new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),s=wa[r(220)](wa[r(167)][r(171)],new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),o=wa[r(145)](e),a=wa[r(178)](e,o[r(186)]+16+16+8+16+8+8);return wa[r(220)](wa.types[r(157)],i,s,a,o)}static[_a(145)](e){const t=_a;let r=new Uint8Array(5),n=e[t(180)];return r[4]=n[t(194)]<<6|n.dependsOn<<4|n[t(182)]<<2|n[t(197)],wa.box(wa[t(167)][t(145)],r)}static[_a(178)](e,t){const r=_a;let n=new Uint8Array(28);t+=36,n[r(158)]([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let i=e[r(150)],s=e[r(141)],o=e.flags,a=e.cts;return n.set([i>>>24&255,i>>>16&255,i>>>8&255,255&i,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o[r(194)]<<2|o[r(168)],o[r(182)]<<6|o.hasRedundancy<<4|o[r(161)],0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12),wa[r(220)](wa[r(167)].trun,n)}static[_a(204)](e){const t=_a;return wa[t(220)](wa.types[t(204)],e)}}wa[_a(143)]();var Sa=Ea;function Ia(){var e=["921713rVHYde","16WLwpkX","420DpLDOY","2777739SaafrO","unwrapExports","298430qBBQHV","3048745jTetlB","createCommonjsModule","6oKpyuC","4GOEnJA","5805792KvrIbf","418coubUK","defineProperty","170GIOLfY","4474AxIgRC","exports","1094492KJoqvy","__esModule"];return(Ia=function(){return e})()}!function(e,t){for(var r=Ea,n=e();;)try{if(485783===-parseInt(r(486))/1*(-parseInt(r(483))/2)+parseInt(r(475))/3*(parseInt(r(481))/4)+-parseInt(r(478))/5*(-parseInt(r(480))/6)+parseInt(r(470))/7*(parseInt(r(473))/8)+parseInt(r(482))/9+parseInt(r(485))/10*(-parseInt(r(477))/11)+parseInt(r(474))/12*(-parseInt(r(472))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ia);var Aa=Qe[Sa(479)]((function(e){var t=Sa;e[t(487)]=function(e,t,r){return t in e?Object[Ea(484)](e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e[t(487)][t(471)]=!0,e[t(487)].default=e[t(487)]}));function Ea(e,t){var r=Ia();return(Ea=function(e,t){return r[e-=470]})(e,t)}function ka(){const e=["2596010vvXqWh","error","object_type","7939136uRgwcU","20XooMRG","Invalid MP3 packet, first byte != 0xFF ","set","channel_count","buffer","length","sample_rate","275316lQrmoJ","mp3","589853OAYZTe","Invalid MP3 packet, header missing!","674692YsCjWj","6pRPrKF","18605178WPPhqW","5348364gHrEyv"];return(ka=function(){return e})()}function Ca(e,t){const r=ka();return(Ca=function(e,t){return r[e-=483]})(e,t)}Qe[Sa(476)](Aa),function(e,t){const r=Ca,n=e();for(;;)try{if(502963===parseInt(r(488))/1+-parseInt(r(490))/2+parseInt(r(486))/3*(parseInt(r(498))/4)+-parseInt(r(494))/5*(parseInt(r(491))/6)+-parseInt(r(493))/7+-parseInt(r(497))/8+parseInt(r(492))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ka);const xa=[44100,48e3,32e3,0],Ta=[22050,24e3,16e3,0],Ba=[11025,12e3,8e3,0],Da=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],Ma=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],Pa=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1];function Ua(e){const t=Ca;if(e[t(484)]<4)return void console[t(495)](t(489));let r=new Uint8Array(e[t(483)]),n=null;if(255!==r[0])return void console[t(495)](t(499));let i=r[1]>>>3&3,s=(6&r[1])>>1,o=(240&r[2])>>>4,a=(12&r[2])>>>2,c=3!==(r[3]>>>6&3)?2:1,u=0,l=0;switch(i){case 0:u=Ba[a];break;case 2:u=Ta[a];break;case 3:u=xa[a]}switch(s){case 1:o=e[s]&&t=6?(i=5,r=new Array(4),a=s-3):(i=2,r=new Array(2),a=s):-1!==c[t(270)](t(269))?(i=2,r=new Array(2),a=s):(i=5,a=s,r=new Array(4),s>=6?a=s-3:1===o&&(i=2,r=new Array(2),a=s)),r[0]=i<<3,r[0]|=(15&s)>>>1,r[1]=(15&s)<<7,r[1]|=(15&o)<<3,5===i&&(r[1]|=(15&a)>>>1,r[2]=(1&a)<<7,r[2]|=8,r[3]=0),this[t(265)]=r,this.sampling_rate=Va[s],this.sampling_index=s,this[t(257)]=o,this.object_type=i,this[t(261)]=n,this[t(281)]="mp4a.40."+i,this[t(292)]=t(278)+n}}const Ga=qa;function qa(e,t){const r=$a();return(qa=function(e,t){return r[e-=449]})(e,t)}function $a(){const e=["readBoolean","23795xswClS","data","readUInt","5100174rTsewP","skipBits","readEG","byteLength","16piumwe","2042392fRHbPb","getBits","786ZciIZV","bitLength","bitsAvailable","skipEG","17178owxvQT","readUShort","181263UiYDQD","161378WDyrzJ","readUEG","573764XWhzpW","skipLZ","length","index","readBits"];return($a=function(){return e})()}!function(e,t){const r=qa,n=e();for(;;)try{if(215048===-parseInt(r(468))/1+parseInt(r(470))/2+parseInt(r(467))/3+-parseInt(r(458))/4*(-parseInt(r(451))/5)+-parseInt(r(461))/6*(-parseInt(r(465))/7)+parseInt(r(459))/8+-parseInt(r(454))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}($a);class Ya{constructor(e){const t=qa;this[t(452)]=e,this.index=0,this[t(462)]=8*e[t(457)]}get[Ga(463)](){const e=Ga;return this[e(462)]-this[e(473)]}[Ga(455)](e){const t=Ga;if(this[t(463)]1&&void 0!==arguments[1])||arguments[1];return this.getBits(e,this[t(473)],r)}[Ga(460)](e,t){const r=Ga;let n=!(arguments[r(472)]>2&&void 0!==arguments[2])||arguments[2];if(this.bitsAvailable>>i,o=8-i;if(o>=e)return n&&(this[r(473)]+=e),s>>o-e;{n&&(this[r(473)]+=o);const i=e-o;return s<>>1:-1*(e>>>1)}[Ga(450)](){return 1===this[Ga(449)](1)}readUByte(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this[Ga(449)](8*e)}[Ga(466)](){return this[Ga(449)](16)}[Ga(453)](){return this[Ga(449)](32)}}function Ka(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}!function(e,t){for(var r=cc,n=e();;)try{if(553791===parseInt(r(317))/1+-parseInt(r(316))/2+-parseInt(r(309))/3*(-parseInt(r(297))/4)+-parseInt(r(305))/5*(-parseInt(r(312))/6)+parseInt(r(303))/7*(-parseInt(r(302))/8)+parseInt(r(313))/9*(-parseInt(r(308))/10)+parseInt(r(311))/11*(parseInt(r(298))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(tc);const Ja=new Array(214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72),Xa=new Array(2746333894,1453994832,1736282519,2993693404),Za=new Array(462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257);function Qa(e,t,r,n,i){var s=cc,o=i;o=t+i>e.length&&n+i<=r[s(306)]?e[s(306)]-t:n+i>r[s(306)]&&t+i<=e[s(306)]?r.length-n:t+i<=e[s(306)]&&n+i<=r[s(306)]?i:r[s(306)]>24&255,e>>16&255,e>>8&255,255&e)}function tc(){var e=["min","1387354ErcIQp","123482XCgZKi","iv is error!","includes","533616aoyKqa","14711772UFzWmr","slice","log","ceil","8eSoSPC","841883JhTlSG","byteLength","573985liFcWT","length","cipher is error!","10USlfzK","3dTkWxA","sm4 key is error!","11FryHVc","30qQKUgK","6202035GKrgsz","data is error!"];return(tc=function(){return e})()}function rc(e,t){var r=cc;return t+3>>19)^(n<<23|n>>>9)}function sc(e,t){var r=new Array(36);r[0]=rc(t,0),r[1]=rc(t,4),r[2]=rc(t,8),r[3]=rc(t,12);for(var n=0;n<32;n++)r[n+4]=r[n]^oc(r[n+1]^r[n+2]^r[n+3]^e[n]);var i=new Array(4);for(n=35;n>=32;n--)i[35-n]=r[n];return function(e){for(var t=new Array(4*e[cc(306)]),r=0;r>>30)^(n<<10|n>>>22)^(n<<18|n>>>14)^(n<<24|n>>>8)}function ac(e,t,r){var n=cc;if(null==e||null==e||e.length%16!=0)return console[n(300)](n(310)),null;if(null==r||null==r||r[n(306)]<=0)return console[n(300)](n(307)),null;if(null==t||null==t||t[n(306)]%16!=0)return console[n(300)](n(318)),null;for(var i=nc(e),s=Math.ceil(r[n(306)]/16),o=new Array(r[n(306)]),a=t.slice(),c=0;c3&&void 0!==arguments[3]&&arguments[3],s=arguments[n(306)]>4&&void 0!==arguments[4]&&arguments[4];t=new Uint8Array(t),r=new Uint8Array(r);const o=e[n(304)];let a=5;for(;ao)break;let u=e[a+4],l=!1,d=2;if(i?(s&&(d=3),u=u>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(319)](u)):(u&=31,l=1===u||5===u),l){const i=ac(t,r,e[n(299)](a+4+d,a+4+c));e.set(i,a+4+d)}a=a+4+c}return e}const lc=dc;function dc(e,t){const r=hc();return(dc=function(e,t){return r[e-=270]})(e,t)}function hc(){const e=[" and decoder.delay is ","is_sync","AAC: SamplingFrequencyIndex changed from ","cacheTrack","mediaSourceAudioNoDataTimeout","Generated first AudioSpecificConfig for mimeType: "," and bufferList length is ","mseDecoder.sourceBuffer.appendBuffer()","mseAutoCleanupMaxBackwardDuration","pcr_pid","parsePPS","mp4Box onError","parseChunks","prefixSei","kSliceVPS","playVod","Webcodecs Video Decoder initSize","mseDecoderUseWorker","appendAudioBuffer() player is destroyed","videoBufferDelay","pts","close() and audioDecoder.clear error: ","handleVideoH264Frames","streamAbps","AAC","cryptoPayloadAudio"," and update next dts increase 5ms","video_track_","bit_stream_identification","close() and socket.readyState is "," and height is ","presentHeight","isWidthOrHeightChanged"," is not H264 or H265","dropBuffer$2() iFrameIndex is ","parseVPS","yuvData ts ",",and old bufferList length is ","fetchStream, WebsocketStream on error and isDestroyed is true, so return","length","startPlaybackCacheLoop","kSliceSEI","hasAudioInit","closeEnd","sampleRate","ref_frames","playbackCacheLoop fragDuration is ","codecHeight","AC3: Bit Stream Identification changed from ","isMpeg4","playAudio","mediaSourceError","audioCode",", dts is ",", streamFps is ","start","onopen",",\n and emit change event"," > ","flvScriptData","wasmWidthOrHeightChange","detectVideoMetadataChange","mediaSource video sourceBuffer error","removeEventListener","isAvc","handleAddNaluStartCode","videoSourceBuffer updateend and hasPendingEos is true, next endOfStream()","parsePES","demuxFlv() isVideoSequenceHeader is true and isHevc is "," and isVideoAndNextAudio is ","mpeg","hasVideo","dts","init and forHardDecode is ","kSliceSPS","onSamples","timescale","pendingAudioRemoveRanges","mseFirstRenderTime","shift","cts","playbackRate","decodeVideo and payload is video sequence header so drop this frame","549FhMhSJ"," and next dropBuffer","match","_initSourceBuffer() appendBuffer mseDecoder.mediaSource.addSourceBuffer()","playbackUpdatePlaybackRate","parseSynchronousKLVMetadataPayload","fetch response status is ",", height: "," or cryptoIV.length is ",",\n firstAudioTime is ","dispatchAudioMediaSegment","Generated first AVCDecoderConfigurationRecord for mimeType: ","lastBuffer","loop() do not decode and delay is ","toString","mseDecoder.mediaSourceAppendBufferFull is true","expected_length","drawImage","updating"," but isSocketError is true , so return","readNextAACFrame","abs","originalCodec","codec_size","kADTSAAC","decodeAudio","onMediaSourceSourceOpen() sourceBuffer is null and next init","videoPayload","onOffscreenCanvasWebglContextLost","loop demux diff time is ","sampling_rate","delay","mimeType","ac-3","currentTime","Audio: Audio Codecs changed from ","setCodecAudio: mp3 is not support for old version","audioSampleRate","AC3: Channel Mode changed from ","pes_private_data_pids","audioTracks","_initAudioSourceBuffer and mseDecoder.isStateOpen is ","H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment","getSourceBufferUpdating","doPlaybackCacheLoop","extractH265SEI","setCodecVideo: init video codec , codecId is ","protocols","updatePlaybackIsPause","abort success","clearPlaybackCacheLoop","reduce","channel_config","videoCode","detectAudioMetadataChange","prevTimestamp","mseSourceBufferError mseDecoder.sourceBuffer","s and status is ","TAG","keyFrame","decodeVideo","_initAudioSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()","yuvData, decoder is destroyed and return","getStreamBufferLength","isPlayback","streamVbps","abortSourceBuffer() abort sourceBuffer","getNotDroppingDelayTs","fps_den","fetchStream, WebsocketStream socket open"," and mseDecoder.audioMimeType is ","level","onError","updateConfig","loop() common dumex delay is -1 ,data.ts is","tsPacketSize"," is not corresponded to PAT!","first_parse_","ID3 ","playType","mp4Box","getState",'video/mp2t; codecs="',"kMPEG1Audio","payload_unit_start_indicator","websocketError","demuxFlv() type is ","getContext","appendAudioBuffer","pendingAudioSegments","onmessage:","firstRenderTime","setCodecAudio: init audio codec, codeId is ","debugWarn","getAudioBufferLength","asynchronous_klv_pids","AAC: Unknown pts","VideoDecoder","delay is ","audioBufferSize","decodeDiffTimestamp",", dts=","cryptoPayload","sps","streamRate"," more than ","readUByte","1141830rvnelv","\n decodeVideo dts is less than(or equal) prev dts ,\n dts is ","audioNalu","mseDecodeAudio","cacheAudioTrack","demuxTs","firstRenderTime is ",", start dts is ","kSliceIDR","handleVideoH265Nalu","log","getDelayNotUpdateDelay() and preDelayTimestamp is ","current_program_","assign","_doAppendSegments","url","videoMimeType","getTrackById","updateend","extractNALu() buffer error","loas_aac","setCodecAudio: audioDecoder or audioDecoder.setCodec is null","isPlaybackPause","ac3","isDecodeFirstIIframe","audio_last_sample_pts_","clearBuffer,bufferList length is ","slices","_decodeVideo payload bytes is 0 and return","pendingRemoveRanges","handleVideoH264Nalu","Synchronous KLV Metadata: pid=","payload","timescale_","streamEnd","isIFrame","isM7sCrypto cryptoKey.length is ","isRecordTypeFlv","isStateClosed"," , payload is ","parseTimedID3MetadataPayload",", and set streamFps is 25","sm4CryptoKey","_opt","secondStartCodeOffset"," and prev time is ","getDelay() and preDelayTimestamp is ","fetchNext().then() and done is true","handleSectionSlice","prevTs","h264 naluList.length === 0"," and forOldVersion is ","demuxFlv() type is video and payload.byteLength is ","mseAutoCleanupMinBackwardDuration","stream_id","setCodecVideo: videoDecoder or videoDecoder.setCodec is null","video_metadata_changed_","MP3: SamplingFrequencyIndex changed from ","getDelayNotUpdateDelay","audio_init_segment_dispatched_","supportMSEDecodeHevc","pmt_","webgl","program_pmt_map_","mdia","isEmitInfo"," and\n payloadBufferSize is ","pushBuffer","openWebglAlignment","end","audioSourceNoDataCheckTimeout","demuxNakedFlow","pushBuffer video ts is ","prevAudioDts","websocketFirstMessage","kLOASAAC","dispatchPESPrivateDataDescriptor","parsePES: packet_start_code_prefix should be 1 but with value ","isPlaybackOnlyDecodeIFrame","clear",", bufferList is ","Unsupported stream. type: ","types","websocket user aborted","subarray","fetchStream, WebsocketStream socket close and code is ","MP3: Channel count changed from ","websocket Open Timeout form ","_doAppendSegments() sourceBuffer is null and wait init and return",", and ts list is ","decodeVideo: simd decode error, and return","isWorkerFetch","2959095hgluEn","videoTracks","websocketStringMsg","decodeVideo: hasInitVideoCodec is false, codecId is ","dropBuffer$2() isAllIframeInBufferList() is true, and index is ","prevDts","descriptor","AC3: BitStream Mode changed from ",'" string so return'," ms","entries","extractNALu","_remainingPacketData","correctSamplePts","vps","kSliceNonIDR","width","isDropping","\n decodeVideo: video width or height is changed,\n old width is ","floor","fetchNext().then() and abortController.signal.aborted is true so return","mediaSourceDecoderConfigurationError","decodeVideo first frame is not iFrame","last_pcr_","mediaSource is not attached to video or mediaSource is closed","opus","level_string","audio_track_","has_video_","isFmp4","websocket error","lastBuf","eac3","webglcontextlost","worker nakedFlow","offscreenCanvasCtx","firstTimestamp","audioSampleRateIndex","mseAutoCleanupSourceBuffer","pushBuffer audio ts is ","fetchNext().catch() and e is ","writableStream write() and requestAbort is true so return","playbackConfig",", syncOffset = ","worker wcsDecoder","debug","has not init video codec","handleVideoH265NaluList list size is ","mediaSourceAddSourceBufferError","media_info_","delete","calcNetworkDelay, dts is ","dispatchVideoMediaSegment","video","getTime","fromCharCode","readNextNaluPayload","firstAudioTime is ","isRecording","undefined","parseAsynchronousKLVMetadataPayload","_resetInIt","clearSlices","mp4","audioSourceBufferCheckTimeout","mseCorrectTimeDuration","parsePESPrivateDataPayload","decodeVideo has not init , isIframe is ","isKeyframe","LOG_NAME","set","timed_id3_pids","isPlayUseMSE","Jb pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng","pps","dispatch naluArray length is 0","avcc"," next data type is ","AC3: Low Frequency Effects Channel On changed from ",",\n and mseCorrectTimeDuration is ","fetchErrorWorker","stop","pushBuffer,\n preTimestamp is ","decodeVideo dts is equal to prev dts and payload size is equal to prev payload size so drop this frame","pushBuffer(), pushLatestDelay is ","getAudioSourceBufferUpdating","kEAC3","readyState","_doAppendSegments() mediaSource is closed or ended and return","MP3"," less than (or equal) preTs is ","videoMeta","SMPTE 2038 Metadata: pid=","video_metadata_","complete","configure","removeUsedSamples","_doRemoveRanges","_bindMediaSourceEvents","findSei","videoCodec","fetch done","networkDelayTimeout","_onMediaSourceSourceOpen","G711A","codec"," and is Trial Version[试用版本]","low_frequency_effects_channel_on","handleOffscreenCanvasWebglContextLost, stencil is false","audioSequenceNumber","demuxFlv() type is audio and payload.byteLength is ","height","webglcontextrestored","flags","original_object_type","handleNALu","parseVideo264Header","iFrame","isfms","handlePESSlice: packet_start_code_prefix should be 1 but with value ","initVideo","isPlayUseMSEAndDecoderInWorker","present_size","options:"," cacheTrack dts is ","readUEG","emitError","isPlayer","isXorCrypto","Opus: SamplingFrequencyIndex changed from ","endOfStream","parseLOASAACPayload","object_type"," so drop this frame","PACKET_TYPE_FRAMESX","flush","hasIncompleteData","_doDecodeVideo"," and\n ts is ","channel_mode","parseG711Payload","sync_offset","ms and fragDuration is ","mediaSourceAudioInitTimeout","Malformed PES: PES_packet_length < 3 + PES_header_data_length","socket is not open and state is","_preDoDecode","sampling_freq_index","ts is ","preventDefault","doPlaybackCacheLoop() and isPlaybackOnlyDecodeIFrame is true and isIFrame is true, and ts is","extractH264SEI","data","Video: Present resolution width changed from ","isDestroyed","BIG_ENDIAN","avcC",";codecs=","g711a","AAC: AudioObjectType changed from ","worker mpeg4Demuxer","Asynchronous KLV Metadata: pid=","offscreenCanvas","debugLog","state"," ,delay is ","_doDecodeAudio",'fetchNext().then() and value "',"codec_mimetype","handleOffscreenCanvasWebglContextLost and next try to create webgl","fetchError","1119492XyTklh","decode","sequenceHeader","kSCTE35","bit_stream_mode","playbackCacheLoop","_initSourceBuffer and mseDecoder.isStateOpen is ","then"," and firstRenderTime is ","parseSPS"," and maxDiff is ","doDecode"," and prev ts is ","codedHeight","_isEnhancedH265Header","fps_num","mediaSourceAudioG711NotSupport","socket is null","section_slice_queues_","opt","isVideoInited","emitPESSlices","forEach",", need clear is ","mp3"," and mseDecoder.isAvc === null is ","isCryptoAudio","sample_rate","meta"," _opt.sampleRate is ","isAudioInitInfo","decodeVideo and payload is too small , payload length is ","random_access_indicator","validatedFailed, please contact the author to get the correct license","_decodeVideo","kSliceIDR_W_RADL","_doRemoveRanges() sourceBuffer error"," to ","codedWidth","loas_previous_frame","pushLatestDelay","mediaSourceH265NotSupport","onclose"," and isDestroyed is true, so return",",\n new width is ","PACKET_TYPE_SEQ_START"," and delay is ","mediaSourceAppendBufferFull","pes_slice_queues_","isPushDropping","decodeVideo is max diff , ts is "," isIFrame is ","removeSourceBuffer() audioSourceBuffer","h264"," and isIFrame is ","onmessage","channelCount","worker MediaSource","AC3: Sampling Frequency changed from ","firstAudioTime",", old height is ","units","handleVideoH264NaluList list size is ","Opus","parseEAC3Payload"," ,\n and diff is ","hasIframeInBufferList","_clearAudioSourceBufferCheckTimeout","_decodeAudioConfigurationRecord audio codec is not support , codecId is ","mseDecoder.mediaSourceBufferError is true","sourceClose","getUint32","addEventListener","sampling_index","fetchStream, WebsocketStream socket error","mseHandle","getDelay","HEAPU32","iframeIntervalTs","demux() isIFrame is false and unit type is IDR and update to true","prevPayloadBufferSize",",\n firstRenderTime is ","writableStream write() and abortController.signal.aborted is true so return","offscreenCanvasGL","appendBuffer","\n decodeVideo: video width or height is changed,\n old width is ","headers","remove","isFirefox","loop() bufferList is empty and reset delay","isEmitSEI","removeSourceBuffer","12atemkZ","catch","streamType","decodeVideo and webcodecs configure is","details","sourceended","audioMimeType","onMediaSourceSourceOpen() audioSourceBuffer is null and next init","fetchStream, WebsocketStream socket close and requestAbort is true so return","needInitAudio","needClear","setCodecAudio: hasInitAudioCodec is false, codecId is ","decodeNext","endOfStream() error","network_pid","slice","eventListenList","file_position","send","nearest_pts","dispatch","AAC: Detected pts overlapped, ","fetchNext().catch() and abortController.signal.aborted is true so return","_decodeConfigurationRecord error","socketStatus","parse","hev","kAC3","kH264","fetchNext().catch() and e.name is AbortError so return","frame_rate","body","isPlaybackCacheBeforeDecodeForFpsRender","parseSection","profile_string","renderYUV","mseWorkerAddSourceBufferError","getReader","hvcC","Not Supported Opus channel count.","elementary_stream_priority_indicator","minf","_initSourceBuffer","playbackCacheLoop sync frame duration is "," null","resetDelay","isInitSegmentDispatched","indexOf","now","mediaSourceFull","g711u","audio_object_type","codecWidth","kSlicePPS",", pid: ","stringify","isM7sCrypto","onReady","worker","firstStartCodeOffset","channel_count","kH265","smpte2038_pids","_clearAudioNoDataCheckTimeout"," > timestamp is ","sort","pushBuffer() and isIFrame is ","supportVideoFrameCallbackHandle","demuxFmp4","VANC","reset","JbPro Worker Version is ","_decodeVideo now time is ","calcIframeIntervalTimestamp","playbackForwardMaxRateDecodeIFrame","some","HEAPU8","_decodeAudio","35eBFoCB","cmd","value","pendingSegments","yuvData, isVideoFirstIFrame is false and return","isSendSeqHeader","demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is ","sourceOpen","stream_type","findIndex","cryptoKey","name","byteLength",", isAacCodecPacket is true","handleVideoFrames","useMSE","getContextAttributes","audioDecode","pid","sarRatio","streamDts","writableStream abort() and e is ","aac_last_incomplete_data_","buffering","_initAudioSourceBuffer() addSourceBuffer mseDecoder.mediaSource.addSourceBuffer()","fps","workerEnd","ms, PES pts: ","hasPendingEos","h265 naluList.length === 0","aacSequenceHeader","isFirstDispatch and tsPacketSize = ","onerror","initAudio"," and\n ts is ",", stream_id=","parseSPS$2","demuxMpeg4","playbackCacheBeforeDecodeForFpsRender, bufferListLength is ","AudioDecoder","error","cryptoIV",",\n diff is ","hvcc","version_number","mseWidthOrHeightChange"," ts is ","1855264XuJShE","duration"," and prevTs is ","G711U","mediaSourceAppendBufferError","_doCleanUpSourceBuffer"," create uint8Array error :","isStateOpen","mpeg4","size","decode data type is "," and diff is ","resetAllDelay","isHevc","width: ","audioPayload","handlePESSlice"," and bufferlist is ","original_codec_mimetype",", diff is ","sampling_frequency","hasInit","synchronous_klv_pids","from","onSamples() trackId error","handleVideoH265NaluList","presentWidth","isTs","Timed ID3 Metadata: pid=","websocketOpenTimeout",", height is ","setExtractionOptions","vcl","debugLevel","video_init_segment_dispatched_","close","write","dropBuffer$2","_decodeAudioConfigurationRecord","ms and return -1","videoInfo","stencil","parsePAT"," and prev dts is ","demuxFlv","audio_metadata_","isSm4CryptoH265V2","handleVideoNalu","appendBuffer() player is destroyed"," and,\n options.ts is ","signal","_hasPendingRemoveRanges","clearBuffer"," and emit error and next abort()","kMPEG2Audio","pendingUnits","writableStream abort() and abortController.signal.aborted is true so return","sequenceNumber","findFirstStartCode","key","playback and playbackIsCacheBeforeDecodeForFpsRender is true","isXorCrypto cryptoKey.length is ",",\n and prevPayloadBufferSize is ","VideoDecoder configure error","aac","Client disconnecting","offset","isFlv","parseSCTE35","\n maybe trigger black screen or flower screen\n ","warn","pcmData ts ","webglObj","audioTrackId","streamFps","seqHeader","Generated first HEVCDecoderConfigurationRecord for mimeType: ","arraybuffer","firstStartCodeOffset -14 is","setCodecVideo: SIMD H264 decode video width is too large, width is ","readBits","79010ZEWroe","handleOffscreenCanvasWebglContextRestored","render","playbackIsCacheBeforeDecodeForFpsRender","getVideoBufferLength","sourceBuffer","ec-3","avc",",\n and resetAllDelay","workerFetch","autoCalcFps","type","config","min","timeInit","idle","useOffscreen","$video","setCodecVideo: hasInitVideoCodec is false, codecId is ","loop() dropBuffer is dropping and isIFrame "," and packetType is ","_initPmt"," package length is ","\n diff is ","init","tempStream","TAG_NAME","message","websocket","wcsDecodeAudio","Parsed first PMT: ",", pts=","audioSourceBuffer","_checkTsIsMaxDiff","stopId","audioCodec","HEAPF32","decodeAudio\n local dts is < 0 , ts is ","networkDelay","6207168aKpLHc","current_pmt_pid_","videoBuffer","VideoEncoder","dispatchVideoInitSegment","kSliceCRA_NUT","buffered","prevAudioTs","useWCS","videoTrackId","refFrames","_hasPendingSegments","open","kPESPrivateData","6294wOUjEk","fetchStream, WebsocketStream socket close abnormally and code is ",",local diff is ","streamEndInner","streamVideoType","FT_KEY",", bufferListLength is ","chroma_format","binaryType"," and isNotPushDropping is ","handleVideoH264NaluList","refSampleDuration","mseCorrectAudioTimeDuration","decodeAudio() and decoder is destroyed","pat_","transferToImageBitmap"," and tempDelay is ","updatePlaybackIsPause, isPause is ","isStateEnded","hasAudio","playbackIsPause"," ,\n and diff is ","pipeTo","options","stopStreamRateAndStatsInterval","decoder","_initSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()","total_length","parsedOffset","_initAudioSourceBuffer","handleVideoH265Frames","scriptData","_doAppendSegments() audioSourceBuffer is null and need init audio source buffer","hasInitVideoCodec","pushBuffer, isDropSameTimestampGop is true and\n hasIframe is ","calcNetworkDelay","ceil","parseAC3Payload","_getSeqHeader","localDts","expected: ","nakedFlowH265DemuxUseNew","probe","recordType","decodeVideo\n local dts is < 0 , ts is ","mseSourceBufferError","addSourceBuffer","push","videoSEI"," and preTsDuration is ","nakedFlowFps","getIncompleteData","sendWebsocketMessage, message is","fetchStatus","player","h265","parseSMPTE2038MetadataPayload","setCodec","streamVideoType is null","extractNALu$2",",nalu type is ","checkFirstIFrame","string","videoNalu","isDropSameTimestampGop","ALAW","getBuildTime","MediaSource","parseH264Payload","playbackStreamVideoFps","getUint8","isSm4Crypto opt.sm4CryptoKey is null","abort catch","events","simdDecodeError","Video: Codec mimeType changed from "," and return","listenMp4Box","_decodeConfigurationRecord",'" is string so return',"samples","parseOpusPayload","simdH264DecodeVideoWidthIsTooLarge","decodeAudio and has already initialized and payload is aac codec packet so drop this frame","isPlayVod","abort","destroy","extractH265PPS",", preTs is ","mediaSourceTsIsMaxDiff","getNaluDts","onOffscreenCanvasWebglContextRestored","isAAC"," ,new bufferList is ","_needCleanupSourceBuffer","fetchStream","code","notConnect","has_audio_","adts_aac","checkStreamEnd","isNakedFlow","map","DataStream","generateInitSegment","closed","isCacheBeforeDecodeForFpsRender","mseUpdateVideoTimestamp","cancel","worker TsLoaderV2","profile","loop() is dropping = false, is iFrame","fetchNext().then() and requestAbort is true so return","mediaSource","audio"," and isVideoSqeHeader is ","debugError","ms and return ","mp4a.40.","syncOffset",", isVideoSequenceHeader is true","decodeVideo() and decoder is destroyed","buffer","_stopCheckWsOpenTimeout"," , message is ","code is ","common_pids","useSIMD","mseDecoder.mediaSourceAddSourceBufferError is true",", new height is ","sendWebsocketMessage","websocketOpen","abortSourceBuffer() abort audioSourceBuffer","duration_","dropping","sarNum","len","fetch"," ant auto wasm decode","findSecondStartCode","KLVA"," is not corresponded to PMT!","streamSuccess","mseSourceBufferError mseDecoder.audioSourceBuffer"," and mseCorrectTimeDuration is ","createImageBitmap","startTimestamp","2827jKGSXE","writableStream pipeTo() and e is","mp3Demuxer","writableStream","program_pmt_pid","startStreamRateAndStatsInterval","setCodecAudio","yuvData, transferToImageBitmap error is"," and has iFrame, set dropping is true","moof","writableStream abort() and e.name is AbortError so return","mediaSourceBufferError","fetchStream, url is ","aacADTSHeader","sar_ratio","frameRate","playbackCacheBeforeDecodeForFpsRender, calc streamVideoFps is ","parsePMT","getNearestTimestampMilliseconds","preDelayTimestamp","removeSourceBuffer() sourceBuffer","parsePAT: table_id ","pid_stream_type","aborted","mediaSource is end","streamVideoFps","dispatchAudioInitSegment"];return(hc=function(){return e})()}!function(e,t){const r=dc,n=e();for(;;)try{if(977687===parseInt(r(929))/1*(-parseInt(r(672))/2)+parseInt(r(1036))/3+parseInt(r(413))/4*(-parseInt(r(1128))/5)+parseInt(r(658))/6+parseInt(r(491))/7*(parseInt(r(538))/8)+-parseInt(r(321))/9+parseInt(r(619))/10*(parseInt(r(819))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(hc),Date[lc(461)]||(Date[lc(461)]=function(){return(new Date).getTime()}),console[lc(1046)](lc(484)+Ft+":"+Ut+lc(1234));var fc=pc;function pc(e,t){var r=mc();return(pc=function(e,t){return r[e-=400]})(e,t)}function mc(){var e=["then","JbPro[❌❌❌][wasm]:","224HCZxHp","1515646KdVCui","95292bCXlKP","toString","10mIHVyO","858764MFzypL","warn","96156HmqFGg","15TfMtLL","JbPro[❌❌❌][audio wasm]:","729776PWOEFo","1598301oDJbGr","4tsuUDh","706016qWOZyJ","1209qecJKf","108csBnyy"];return(mc=function(){return e})()}!function(e,t){for(var r=pc,n=e();;)try{if(649724===-parseInt(r(410))/1+parseInt(r(412))/2*(parseInt(r(411))/3)+-parseInt(r(405))/4*(-parseInt(r(408))/5)+parseInt(r(407))/6*(-parseInt(r(400))/7)+-parseInt(r(413))/8*(-parseInt(r(415))/9)+parseInt(r(404))/10*(-parseInt(r(401))/11)+-parseInt(r(402))/12*(parseInt(r(414))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(mc),s({printErr:function(e){var t=pc;(function(e){const t=Ct;return!(!e||-1===e[t(660)]("not compiled with thread support")&&-1===e.indexOf(t(619))&&-1===e[t(660)]("If you want to help, upload a sample of this file to")&&-1===e.indexOf(t(438)))})(e)||console.warn(t(409),e)}})[fc(416)]((e=>{!function(){const e=lc;let t=arguments[e(885)]>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[e(885)]>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[e(885)]>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=[],o=[],a=null,c=null,u=null,l=null,d=null,h=null,f=!1,p=null,m=null,v=!1,y=!1,_=!!Yt(n),g=0,b=0,w=!1,S=null,I=null,A=null,E=[],k=null,C=null,x=0,T=0,B=null,D=null,M=0,P=0,U=null,F=!1,R=!1,L=!1,O=null,z=null,N=!1,H=!0,V=0,W=0,j=null,G=null,q=null,$=()=>{const t=e,r=Gt();return{debug:r[t(1173)],debugLevel:r[t(571)],debugUuid:r.debugUuid,useOffscreen:r[t(635)],useWCS:r[t(666)],useMSE:r.useMSE,videoBuffer:r.videoBuffer,videoBufferDelay:r.videoBufferDelay,openWebglAlignment:r[t(1104)],playType:r[t(1008)],hasAudio:r[t(691)],hasVideo:r[t(917)],playbackRate:1,playVodRate:1,playbackFps:r.playbackConfig[t(516)],playbackDefaultFps:r.playbackFps,playbackAutoCalcFps:r[t(1170)][t(629)],playbackForwardMaxRateDecodeIFrame:r[t(487)],playbackIsCacheBeforeDecodeForFpsRender:r[t(1170)][t(778)],sampleRate:0,networkDelay:r[t(657)],visibility:!0,useSIMD:r[t(799)],isRecording:!1,recordType:r.recordType,isNakedFlow:r.isNakedFlow,checkFirstIFrame:r[t(733)],audioBufferSize:1024,isM7sCrypto:r[t(469)],isCryptoAudio:r[t(347)],cryptoKey:r[t(501)],cryptoIV:r[t(532)],isSm4Crypto:r.isSm4Crypto,isSm4CryptoH265V2:r[t(584)],sm4CryptoKey:r.sm4CryptoKey,isXorCrypto:r[t(278)],isHls265:!1,isFlv:r.isFlv,isFmp4:r[t(1157)],isMpeg4:r[t(895)],isTs:r[t(565)],isEmitSEI:r[t(411)],isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isFirefox:!1,isDropSameTimestampGop:r[t(736)],mseDecodeAudio:r.mseDecodeAudio,wcsDecodeAudio:r[t(648)],nakedFlowH265DemuxUseNew:r[t(713)],mseDecoderUseWorker:r.mseDecoderUseWorker,mseAutoCleanupSourceBuffer:r[t(1166)],mseAutoCleanupMaxBackwardDuration:r[t(854)],mseAutoCleanupMinBackwardDuration:r.mseAutoCleanupMinBackwardDuration,mseCorrectTimeDuration:r[t(1193)],mseCorrectAudioTimeDuration:r[t(684)],nakedFlowDemuxUseNew:r.nakedFlowDemuxUseNew,nakedFlowFps:r[t(722)],supportMSEDecodeHevc:!1,checkStreamEnd:!0,websocketOpenTimeout:r[t(567)]}};e(661)in self&&(a={TAG_NAME:e(1172),hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:null,init(){const t=e;a[t(697)]=new VideoDecoder({output:function(e){const r=t;if(zt(e[r(817)]))e.createImageBitmap().then((t=>{const n=r;a.offscreenCanvasCtx[n(946)](t,0,0,e[n(359)],e[n(334)]);let i=a.offscreenCanvas[n(687)]();postMessage({cmd:be[n(621)],buffer:i,delay:te[n(960)],ts:0},[i]),Vt(e)}));else{a[r(1163)][r(946)](e,0,0,e[r(359)],e.codedHeight);let t=a[r(312)].transferToImageBitmap();postMessage({cmd:be[r(621)],buffer:t,delay:te[r(960)],ts:0},[t]),Vt(e)}},error:function(e){const r=t;te[r(788)](r(471),"VideoDecoder error: ",e,e.toString())}}),te[t(313)](a[t(645)],"init")},destroy(){const t=e;a[t(483)](),a[t(697)]&&"closed"!==a.decoder[t(314)]&&(a[t(697)][t(573)](),a[t(697)]=null),te[t(313)](a[t(645)],t(758))},decode:function(t,r,n){const i=e,s=t[0]>>4==1;if(a[i(559)]){const e=new EncodedVideoChunk({data:t[i(428)](5),timestamp:r,type:s?Fe[i(597)]:Fe.delta});try{a.decoder[i(322)](e)}catch(e){}}else if(s&&t[1]===He.sequenceHeader){const e=15&t[0];postMessage({cmd:be[i(982)],code:e});const r=new Uint8Array(t);postMessage({cmd:be[i(1228)],buffer:r,codecId:e},[r.buffer]);let n=null,s=null;const o=t[i(428)](5);if(e===Te[i(374)]?(s=Ir(o),n={codec:s[i(1233)],description:o}):e===Te[i(727)]&&(s=Qr(o),n={codec:s[i(1233)],description:o}),!n||n&&!n[i(1233)]||s&&0===s[i(465)]&&0===s.codecHeight)return void te[i(1022)](a[i(645)],i(416),JSON[i(468)](n));s&&s[i(465)]&&s[i(893)]&&(n[i(334)]=s[i(893)],n[i(359)]=s[i(465)]),!a[i(1101)]&&(te[i(313)]("worker",i(862)),postMessage({cmd:be.initVideo,w:s[i(465)],h:s.codecHeight}),a.isEmitInfo=!0,a[i(312)]=new OffscreenCanvas(s.codecWidth,s.codecHeight),a[i(1163)]=a.offscreenCanvas[i(1016)]("2d")),te._opt[i(715)],i(1191);try{a[i(697)][i(1223)](n),a[i(559)]=!0}catch(e){te[i(788)]("worker",i(601),e.code,e,e[i(943)]()),e.toString()}}else te[i(1022)]("worker","VideoDecoder configure has not init , isIframe is "+s+i(1075)+t[1]+i(283))},reset(){const t=e;a[t(559)]=!1,a.isEmitInfo=!1,a.offscreenCanvas=null,a[t(1163)]=null}});let Y=function(){const t=e;if(N=!0,c)try{c.abort(),c=null,te[t(313)](t(471),t(978))}catch(e){c=null,te[t(313)](t(471),t(744),e)}},K={TAG_NAME:e(1162),init(){const t=e;K.lastBuf=null,K[t(1142)]=null,K[t(1032)]=null,K[t(1202)]=null,K[t(415)]=null,K[t(711)]=0,K.pendingUnits={},K[t(496)]=!1,te[t(313)](K[t(645)],"init")},destroy(){const t=e;K[t(1159)]=null,K.vps=null,K[t(1032)]=null,K[t(1202)]=null,K[t(415)]=null,K[t(711)]=0,K.pendingUnits={},K[t(496)]=!1,te[t(313)](K[t(645)],t(758))},dispatch(t){const r=e,n=new Uint8Array(t);if(te[r(1079)].nakedFlowDemuxUseNew){const e=K.extractNALu$3(n);if(0===e[r(885)])return void te[r(313)](K.TAG_NAME,r(1203));K[r(505)](e)}else K[r(731)](n)},getNaluDts(){const t=e,r=te._opt.nakedFlowFps;let n=K[t(711)];return K[t(711)]=K.localDts+parseInt(1e3/r,10),n},getNaluAudioDts(){const t=e,r=te[t(1079)][t(890)],n=te[t(1079)][t(1028)];return K[t(711)]+parseInt(n/r*1e3)},extractNALu(t){const r=e;let n,i,s=0,o=t[r(503)],a=0,c=[];for(;s1)for(let e=0;e{const t=r,n=Br(e);n===Pe.pps||n===Pe.sps?K[t(1066)](e):Mr(n)&&i[t(719)](e)})),1===i[r(885)])K[r(1066)](i[0]);else if(Ur(i)){const e=Br(i[0]),t=Pr(e);K[r(682)](i,t,e)}else i[r(343)]((e=>{K[r(1066)](e)}))}else if(K.streamType===Be[r(727)])if(te[r(1079)][r(713)]){const e=K.handleAddNaluStartCode(t),n=K[r(1139)](e);if(0===n.length)return void te.debugWarn(r(471),r(585),r(520));const i=[];if(n.forEach((e=>{const t=r,n=sn(e);n===Ue[t(1202)]||n===Ue.sps||n===Ue[t(1142)]?K[t(1045)](e):cn(n)&&i[t(719)](e)})),1===i[r(885)])K[r(1045)](i[0]);else if(ln(i)){const e=sn(i[0]),t=un(e);K[r(563)](i,t,e)}else i[r(343)]((e=>{K[r(1045)](e)}))}else sn(t)===Ue.pps?K[r(759)](t):K[r(1045)](t)},extractH264PPS(t){const r=e,n=K.handleAddNaluStartCode(t);K[r(1139)](n)[r(343)]((e=>{const t=r;Dr(Br(e))?K[t(301)](e):K[t(1066)](e)}))},extractH265PPS(t){const r=e,n=K[r(911)](t);K[r(1139)](n)[r(343)]((e=>{const t=r;on(sn(e))?K[t(974)](e):K.handleVideoH265Nalu(e)}))},extractH264SEI(t){const r=e,n=K.handleAddNaluStartCode(t);K[r(1139)](n)[r(343)]((e=>{K[r(1066)](e)}))},extractH265SEI(t){const r=e,n=K[r(911)](t);K[r(1139)](n)[r(343)]((e=>{K[r(1045)](e)}))},handleAddNaluStartCode(t){const r=e,n=[0,0,0,1],i=new Uint8Array(t[r(885)]+n[r(885)]);return i[r(1198)](n),i[r(1198)](t,n[r(885)]),i},handleVideoH264Nalu(t){const r=e,n=Br(t);switch(n){case Pe[r(1032)]:K[r(1032)]=t;break;case Pe[r(1202)]:K[r(1202)]=t}if(K[r(496)]){if(K[r(1032)]&&K.pps){const e=kr({sps:K[r(1032)],pps:K.pps}),t=K.localDts;te.decode(e,{type:we[r(1181)],ts:t,isIFrame:!0,cts:0}),K.sps=null,K[r(1202)]=null}if(Mr(n)){const e=Pr(n),i=K[r(762)](),s=xr(t,e);K[r(332)](s,{type:we.video,ts:i,isIFrame:e,cts:0})}}else if(K[r(1032)]&&K[r(1202)]){K[r(496)]=!0;const e=kr({sps:K[r(1032)],pps:K.pps});te.decode(e,{type:we[r(1181)],ts:0,isIFrame:!0,cts:0}),K[r(1032)]=null,K[r(1202)]=null}},handleVideoH264NaluList(t,r,n){const i=e;if(K[i(496)]){const e=K[i(762)](),s=Tr(t[i(980)](((e,t)=>{const r=i,n=Et(e),s=Et(t),o=new Uint8Array(n[r(503)]+s[r(503)]);return o[r(1198)](n,0),o[r(1198)](s,n[r(503)]),o})),r);K[i(332)](s,{type:we.video,ts:e,isIFrame:r,cts:0}),te[i(313)]("worker",i(383)+t[i(885)]+i(641)+s.byteLength+i(372)+r+i(732)+n+i(899)+e)}},handleVideoH265Nalu(t){const r=e,n=sn(t);switch(n){case Ue[r(1142)]:K[r(1142)]=t;break;case Ue[r(1032)]:K[r(1032)]=t;break;case Ue[r(1202)]:K[r(1202)]=t}if(K[r(496)]){if(K[r(1142)]&&K.sps&&K[r(1202)]){const e=tn({vps:K[r(1142)],sps:K.sps,pps:K[r(1202)]}),t=K[r(711)];te.decode(e,{type:we[r(1181)],ts:t,isIFrame:!0,cts:0}),K.vps=null,K[r(1032)]=null,K[r(1202)]=null}if(cn(n)){const e=un(n),i=K[r(762)](),s=rn(t,e);K.doDecode(s,{type:we[r(1181)],ts:i,isIFrame:e,cts:0})}}else if(K[r(1142)]&&K[r(1032)]&&K[r(1202)]){K[r(496)]=!0;const e=tn({vps:K[r(1142)],sps:K[r(1032)],pps:K[r(1202)]});te[r(322)](e,{type:we[r(1181)],ts:0,isIFrame:!0,cts:0}),K.vps=null,K.sps=null,K[r(1202)]=null}},handleVideoH265NaluList(t,r,n){const i=e;if(K[i(496)]){const e=K.getNaluDts(),s=nn(t[i(980)](((e,t)=>{const r=i,n=Et(e),s=Et(t),o=new Uint8Array(n.byteLength+s.byteLength);return o[r(1198)](n,0),o[r(1198)](s,n.byteLength),o})),r);K[i(332)](s,{type:we[i(1181)],ts:e,isIFrame:r,cts:0}),te[i(313)](i(471),i(1175)+t[i(885)]+" package length is "+s.byteLength+i(372)+r+i(732)+n+i(899)+e)}},doDecode(t,r){te[e(707)](r.ts),r.isIFrame&&te.calcIframeIntervalTimestamp(r.ts),te.decode(t,r)},handleVideoFrames(t){const r=e;if(!K.streamVideoType)for(let e of t)if(K[r(676)]=Nt(e),K.streamVideoType)break;K[r(676)]?K[r(676)]===Be[r(374)]?K[r(868)](t):K[r(676)]===Be[r(727)]&&K[r(702)](t):te[r(1022)](r(471),"handleVideoFrames",r(730))},handleVideoH264Frames(t){const r=e;let n=[],i=[],s=!1,o=!1;K[r(593)].units&&(n=K[r(593)][r(382)],o=K[r(593)].vcl,s=K[r(593)][r(1245)],K[r(593)]={});let a={};for(let e of t){if(e[r(503)]<4)continue;const t=Br(e);let c=!1,u=t===Pe[r(1044)];(t===Pe[r(1143)]||t===Pe[r(1044)])&&(a=K[r(1244)](e),c=!0),n.length&&o&&(a.isfms||!c)&&(i.push({units:n,isIFrame:s}),n=[],s=!1,o=!1),n.push(e),s=s||u,o=o||c}n[r(885)]&&(K[r(593)]={units:n,vcl:o,iFrame:s}),i[r(343)]((e=>{const t=r,n=e.units,i=e[t(1071)];let s=null,o=null;if(n[t(343)]((e=>{const r=t,n=31&e[0];switch(n){case Pe[r(1202)]:K[r(1202)]=e;break;case Pe.sps:K.sps=e;break;case Pe[r(887)]:o=e}if(Mr(n)){const t=Et(e);if(s){const e=new Uint8Array(s[r(503)]+t[r(503)]);e[r(1198)](s,0),e[r(1198)](t,s[r(503)]),s=e}else s=t}})),!K[t(496)]&&K.sps&&K[t(1202)]){K.isSendSeqHeader=!0;const e=Cr({sps:K.sps,pps:K[t(1202)]});te[t(322)](e,{type:we[t(1181)],ts:0,isIFrame:!0,cts:0}),K[t(1032)]=null,K.pps=null}if(K.isSendSeqHeader){if(K[t(1032)]&&K[t(1202)]){const e=Cr({sps:K[t(1032)],pps:K[t(1202)]}),r=K.localDts;te[t(322)](e,{type:we[t(1181)],ts:r,isIFrame:!0,cts:0}),K.sps=null,K[t(1202)]=null}if(s){const e=K[t(762)](),r=Tr(s,i);if(te._opt.isEmitSEI&&o){const r=At(o,!1);postMessage({cmd:be.videoSEI,buffer:r.payload,ts:e},[r[t(1068)].buffer])}K[t(332)](r,{type:we[t(1181)],ts:e,isIFrame:i,cts:0})}}}))},handleVideoH265Frames(t){const r=e;let n=[],i=[],s=!1,o=!1;K[r(593)][r(382)]&&(n=K[r(593)][r(382)],o=K.pendingUnits[r(570)],s=K.pendingUnits[r(1245)],K[r(593)]={});let a={};for(let e of t){if(e[r(503)]<4)continue;const t=sn(e);let c=!1,u=un(t);cn(t)&&(a=K.parseVideo265Header(e),c=!0),n[r(885)]&&o&&(a[r(1246)]||!c)&&(i[r(719)]({units:n,isIFrame:s}),n=[],s=!1,o=!1),n[r(719)](e),s=s||u,o=o||c}n[r(885)]&&(K[r(593)]={units:n,vcl:o,iFrame:s}),i[r(343)]((e=>{const t=r,n=e.units,i=e[t(1071)];let s=null,o=null;if(n.forEach((e=>{const r=t,n=e[0]>>>1&63;switch(n){case Ue[r(1202)]:K[r(1202)]=e;break;case Ue[r(1032)]:K[r(1032)]=e;break;case Ue[r(1142)]:K.vps=e;break;case Ue.suffixSei:case Ue[r(859)]:o=e}if(cn(n)){const t=Et(e);if(s){const e=new Uint8Array(s[r(503)]+t[r(503)]);e[r(1198)](s,0),e.set(t,s[r(503)]),s=e}else s=t}})),!K.isSendSeqHeader&&K[t(1032)]&&K.pps&&K[t(1142)]){K[t(496)]=!0;const e=tn({sps:K[t(1032)],pps:K[t(1202)],vps:K[t(1142)]});te.decode(e,{type:we.video,ts:0,isIFrame:!0,cts:0}),K.sps=null,K[t(1202)]=null,K[t(1142)]=null}if(K[t(496)]){if(K.sps&&K[t(1202)]&&K[t(1142)]){const e=tn({sps:K[t(1032)],pps:K[t(1202)],vps:K.vps}),r=K[t(711)];te[t(322)](e,{type:we.video,ts:r,isIFrame:!0,cts:0}),K[t(1032)]=null,K[t(1202)]=null,K[t(1142)]=null}if(s){const e=K.getNaluDts(),r=nn(s,i);if(te[t(1079)].isEmitSEI&&o){const r=At(o,!0);postMessage({cmd:be[t(720)],buffer:r[t(1068)],ts:e},[r[t(1068)][t(794)]])}K.doDecode(r,{type:we.video,ts:e,isIFrame:i,cts:0})}}}))},handleVideoH265Frames_1(t){t[e(343)]((e=>{K.handleVideoNalu(e)}))},parseVideo264Header(t){const r=e,n=new Ya(t);return n[r(1035)](),{isfms:0===n[r(275)](),sType:n[r(275)]()}},parseVideo265Header(t){const r=e,n=new Ya(t);return n[r(1035)](),{nalType:n[r(618)](6),isfms:0===n[r(618)](1),sType:n[r(618)](3)}}},J={LOG_NAME:"worker fmp4Demuxer",mp4Box:null,offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){const t=e;J[t(1009)]=wo.createFile(),J[t(1009)][t(470)]=J[t(470)],J[t(1009)][t(1001)]=J[t(1001)],J[t(1009)][t(921)]=J[t(921)],te[t(313)](J[t(1197)],t(643))},destroy(){const t=e;J.mp4Box&&(J[t(1009)][t(1209)](),J[t(1009)][t(285)](),J[t(1009)][t(758)](),J[t(1009)]=null),J.offset=0,J.videoTrackId=null,J[t(611)]=null,J[t(551)]=!1,te.debugLog(J[t(1197)],t(758))},_getSeqHeader(t){const r=e,n=J[r(1009)][r(1053)](t.id);for(const e of n[r(1100)][r(454)].stbl.stsd[r(1138)])if(e[r(306)]||e[r(451)]){const t=new(wo[r(775)])(void 0,0,wo.DataStream[r(305)]);let n=[];e[r(306)]?(e.avcC.write(t),n=[23,0,0,0,0]):(J[r(551)]=!0,te.isHevc=!0,e[r(451)][r(574)](t),n=[28,0,0,0,0]);const i=new Uint8Array(t[r(794)],8),s=new Uint8Array(n[r(885)]+i[r(885)]);return s.set(n,0),s[r(1198)](i,n.length),s}return null},onReady(t){const r=e;te[r(313)](J[r(1197)],"onReady()");const n=t[r(1129)][0],i=t[r(969)][0];if(n){J[r(667)]=n.id;const e=J[r(710)](n);e&&(te[r(313)](J[r(1197)],r(613)),te.decodeVideo(e,0,!0,0)),J[r(1009)][r(569)](n.id)}if(i&&te._opt.hasAudio){J.audioTrackId=i.id;const e=i[r(786)]||{},t=lt[r(460)](e[r(348)]),n=i[r(1233)].replace(r(790),"");J.mp4Box.setExtractionOptions(i.id);const s=dt({profile:parseInt(n,10),sampleRate:t,channel:e[r(473)]});te.debugLog(J[r(1197)],r(832)),te[r(954)](s,0)}J[r(1009)][r(901)]()},onError(t){const r=e;te[r(788)](J.LOG_NAME,r(857),t)},onSamples(t,r,n){const i=e;if(t===J.videoTrackId){for(const e of n){const t=e[i(302)],r=e[i(847)],n=1e3*e[i(926)]/e[i(922)];e.duration,e[i(922)],r&&te[i(486)](n);let s=null;s=J[i(551)]?nn(t,r):Tr(t,r),te.decode(s,{type:we[i(1181)],ts:n,isIFrame:r,cts:0})}J[i(1009)][i(1224)](t)}else if(t===J[i(611)]){if(te[i(1079)][i(691)]){for(const e of n){const t=e[i(302)],r=1e3*e[i(926)]/e.timescale;e[i(539)],e.timescale;const n=new Uint8Array(t[i(503)]+2);n[i(1198)]([175,1],0),n[i(1198)](t,2),te[i(322)](n,{type:we[i(786)],ts:r,isIFrame:!1,cts:0})}J[i(1009)].removeUsedSamples(t)}}else te[i(1022)](J[i(1197)],i(562),t)},dispatch(t){const r=e;let n=new Uint8Array(t);n.buffer.fileStart=J[r(604)],J[r(604)]+=n[r(503)],J.mp4Box[r(405)](n[r(794)])}},X={LOG_NAME:e(310),lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:e(643),hasInitVideoCodec:!1,localDts:0,dispatch(e){const t=new Uint8Array(e);X.extractNALu(t)},destroy(){const t=e;X.lastBuffer=new Uint8Array(0),X[t(700)]=0,X[t(472)]=0,X.secondStartCodeOffset=0,X[t(314)]=t(643),X[t(705)]=!1,X[t(711)]=0,te[t(313)](X.LOG_NAME,t(758))},extractNALu(t){const r=e;if(!t||t[r(503)]<1)return void te[r(1022)](X[r(1197)],r(1055),t);const n=new Uint8Array(X[r(941)][r(885)]+t[r(885)]);for(n[r(1198)](X[r(941)],0),n[r(1198)](new Uint8Array(t),X.lastBuffer[r(885)]),X[r(941)]=n;;){if(X.state===r(643)){let e=!1;for(;X[r(941)][r(885)]-X[r(700)]>=4;)if(0===X.lastBuffer[X[r(700)]])if(0===X[r(941)][X[r(700)]+1])if(1===X.lastBuffer[X[r(700)]+2]){if(182===X[r(941)][X.parsedOffset+3]){X.state=r(596),X[r(472)]=X[r(700)],X[r(700)]+=4,e=!0;break}X[r(700)]++}else X[r(700)]++;else X.parsedOffset++;else X[r(700)]++;if(e)continue;break}if(X.state===r(596)){let e=!1;for(;X.lastBuffer[r(885)]-X[r(700)]>=4;)if(0===X[r(941)][X[r(700)]])if(0===X.lastBuffer[X.parsedOffset+1])if(1===X[r(941)][X.parsedOffset+2]){if(182===X.lastBuffer[X[r(700)]+3]){X.state="findSecondStartCode",X[r(1080)]=X.parsedOffset,X[r(700)]+=4,e=!0;break}X[r(700)]++}else X.parsedOffset++;else X[r(700)]++;else X.parsedOffset++;if(e)continue;break}if(X[r(314)]===r(811)){if(!(X[r(941)][r(885)]-X[r(700)]>0))break;{let e,t=192&X[r(941)][X[r(700)]];e=0==t?X.secondStartCodeOffset-14:X[r(1080)];let n,i=0==(192&X[r(941)][X[r(472)]+4]);if(i){if(X.firstStartCodeOffset-14<0)return void te[r(1022)](X[r(1197)],r(616),X.firstStartCodeOffset-14);!X.hasInitVideoCodec&&(X[r(705)]=!0,te.debugLog(X.LOG_NAME,"setCodec"),ae[r(729)](Te[r(546)],"",te[r(738)]())),n=X[r(941)][r(1120)](X[r(472)]-14,e)}else n=X[r(941)][r(1120)](X[r(472)],e);let s=X.getNaluDts();X[r(705)]?(postMessage({cmd:be[r(628)],type:Ae[r(994)],value:n[r(503)]}),postMessage({cmd:be.workerFetch,type:Ae[r(511)],value:s}),g=s,ae[r(322)](n,i?1:0,s)):te[r(1022)](X[r(1197)],r(1174)),X[r(941)]=X[r(941)][r(1120)](e),0==t?X[r(472)]=14:X.firstStartCodeOffset=0,X.parsedOffset=X[r(472)]+4,X.state=r(596)}}}},getNaluDts(){const t=e;let r=X[t(711)];return X[t(711)]=X[t(711)]+40,r}},Z={TAG_NAME:e(781),first_parse_:!0,tsPacketSize:0,syncOffset:0,pmt_:null,config_:null,media_info_:new Wa,timescale_:90,duration_:0,pat_:{version_number:0,network_pid:0,program_map_pid:{}},current_program_:null,current_pmt_pid_:-1,program_pmt_map_:{},pes_slice_queues_:{},section_slice_queues_:{},video_metadata_:{vps:null,sps:null,pps:null,details:null},audio_metadata_:{codec:null,audio_object_type:null,sampling_freq_index:null,sampling_frequency:null,channel_config:null},last_pcr_:null,audio_last_sample_pts_:void 0,aac_last_incomplete_data_:null,has_video_:!1,has_audio_:!1,video_init_segment_dispatched_:!1,audio_init_segment_dispatched_:!1,video_metadata_changed_:!1,audio_metadata_changed_:!1,loas_previous_frame:null,video_track_:{type:e(1181),id:1,sequenceNumber:0,samples:[],length:0},audio_track_:{type:e(786),id:2,sequenceNumber:0,samples:[],length:0},_remainingPacketData:null,init(){},destroy(){const t=e;Z[t(1177)]=null,Z.pes_slice_queues_=null,Z[t(339)]=null,Z[t(1221)]=null,Z[t(583)]=null,Z.aac_last_incomplete_data_=null,Z[t(873)]=null,Z[t(1155)]=null,Z[t(1140)]=null,te[t(313)](Z[t(645)],t(758))},probe(t){const r=e;let n=new Uint8Array(t),i=-1,s=188;if(n[r(503)]<=3*s)return{needMoreData:!0};for(;-1===i;){let e=Math.min(1e3,n[r(503)]-3*s);for(let t=0;t=4&&(i-=4),{match:!0,consumed:0,ts_packet_size:s,sync_offset:i})},_initPmt:()=>({program_number:0,version_number:0,pcr_pid:0,pid_stream_type:{},common_pids:{h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0,g711a:void 0,g711u:void 0},pes_private_data_pids:{},timed_id3_pids:{},synchronous_klv_pids:{},asynchronous_klv_pids:{},scte_35_pids:{},smpte2038_pids:{}}),dispatch(t){const r=e;Z[r(1140)]&&(t=fa(Z[r(1140)],t),Z[r(1140)]=null);let n=t.buffer;const i=Z[r(858)](n);i?Z._remainingPacketData=t[r(1120)](i):t[r(885)]>>6;e[1];let o=(31&e[1])<<8|e[2],a=(48&e[3])>>>4,c=15&e[3],u=!(!Z[r(1097)]||Z.pmt_[r(855)]!==o),l={},d=4;if(2==a||3==a){let t=e[4];if(t>0&&(u||3==a)&&(l.discontinuity_indicator=(128&e[5])>>>7,l[r(353)]=(64&e[5])>>>6,l[r(453)]=(32&e[5])>>>5,(16&e[5])>>>4)){let t=300*(e[6]<<25|e[7]<<17|e[8]<<9|e[9]<<1|e[10]>>>7)+((1&e[10])<<8|e[11]);Z[r(1151)]=t}if(2==a||5+t===188){n+=188,204===Z[r(1004)]&&(n+=16);continue}d=5+t}if(1==a||3==a)if(0===o||o===Z[r(659)]||null!=Z.pmt_&&Z[r(1097)].pid_stream_type[o]===Oa.kSCTE35){let e=188-d;Z[r(1084)](t,n+d,e,{pid:o,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l[r(353)]})}else if(null!=Z.pmt_&&null!=Z.pmt_[r(841)][o]){let e=188-d,i=Z.pmt_[r(841)][o];(o===Z.pmt_[r(798)].h264||o===Z.pmt_[r(798)][r(727)]||o===Z[r(1097)][r(798)].adts_aac||o===Z[r(1097)][r(798)][r(1056)]||o===Z[r(1097)][r(798)].ac3||o===Z.pmt_.common_pids[r(1160)]||o===Z[r(1097)].common_pids.opus||o===Z[r(1097)][r(798)][r(345)]||o===Z[r(1097)][r(798)][r(308)]||o===Z[r(1097)][r(798)][r(463)]||!0===Z[r(1097)][r(968)][o]||!0===Z.pmt_.timed_id3_pids[o]||!0===Z.pmt_[r(560)][o]||!0===Z.pmt_.asynchronous_klv_pids[o])&&Z[r(554)](t,n+d,e,{pid:o,stream_type:i,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l.random_access_indicator})}n+=188,204===Z[r(1004)]&&(n+=16)}return Z.dispatchAudioVideoMediaSegment(),n},handleSectionSlice(t,r,n,i){const s=e;let o=new Uint8Array(t,r,n),a=Z[s(339)][i.pid];if(i[s(1013)]){let e=o[0];if(null!=a&&0!==a.total_length){let o=new Uint8Array(t,r+1,Math.min(n,e));a[s(1063)][s(719)](o),a[s(699)]+=o[s(503)],a.total_length===a.expected_length?Z.emitSectionSlices(a,i):Z.clearSlices(a,i)}for(let c=1+e;c=a[s(945)]&&Z.clearSlices(a,i),c+=u[s(503)]}}else if(null!=a&&0!==a[s(699)]){let e=new Uint8Array(t,r,Math[s(632)](n,a[s(945)]-a[s(699)]));a.slices.push(e),a[s(699)]+=e[s(503)],a[s(699)]===a.expected_length?Z.emitSectionSlices(a,i):a.total_length>=a[s(945)]&&Z[s(1190)](a,i)}},handlePESSlice(t,r,n,i){const s=e;let o=new Uint8Array(t,r,n),a=o[0]<<16|o[1]<<8|o[2];o[3];let c=o[4]<<8|o[5];if(i[s(1013)]){if(1!==a)return void te[s(1022)](Z.TAG_NAME,s(1247)+a);let e=Z[s(369)][i[s(509)]];e&&(0===e[s(945)]||e[s(945)]===e[s(699)]?Z.emitPESSlices(e,i):Z[s(1190)](e,i)),Z[s(369)][i[s(509)]]=new za,Z.pes_slice_queues_[i.pid][s(353)]=i[s(353)]}if(null==Z.pes_slice_queues_[i[s(509)]])return;let u=Z[s(369)][i[s(509)]];u.slices[s(719)](o),i[s(1013)]&&(u[s(945)]=0===c?0:c+6),u[s(699)]+=o[s(503)],u[s(945)]>0&&u[s(945)]===u.total_length?Z[s(342)](u,i):u[s(945)]>0&&u[s(945)]>>6,c=n[8];(2===a||3===a)&&(e=536870912*(14&n[9])+4194304*(255&n[10])+16384*(254&n[11])+128*(255&n[12])+(254&n[13])/2,i=3===a?536870912*(14&n[14])+4194304*(255&n[15])+16384*(254&n[16])+128*(255&n[17])+(254&n[18])/2:e);let u,l=9+c;if(0!==o){if(o<3+c)return void te[r(1022)](Z[r(645)],r(294));u=o-3-c}else u=n[r(503)]-l;let d=n[r(1120)](l,l+u);switch(t[r(499)]){case Oa[r(1012)]:case Oa[r(592)]:Z.parseMP3Payload(d,e);break;case Oa[r(671)]:Z[r(1097)][r(798)].opus===t[r(509)]?Z[r(753)](d,e):Z[r(1097)][r(798)].ac3===t[r(509)]?Z[r(709)](d,e):Z[r(1097)][r(798)][r(1160)]===t[r(509)]?Z[r(385)](d,e):Z[r(1097)].asynchronous_klv_pids[t[r(509)]]?Z[r(1188)](d,t[r(509)],s):Z[r(1097)][r(475)][t[r(509)]]?Z[r(728)](d,e,i,t.pid,s):Z[r(1194)](d,e,i,t.pid,s);break;case Oa[r(953)]:Z.parseADTSAACPayload(d,e);break;case Oa.kLOASAAC:Z[r(281)](d,e);break;case Oa[r(440)]:Z[r(709)](d,e);break;case Oa[r(1214)]:Z[r(385)](d,e);break;case Oa.kMetadata:Z[r(1097)][r(1199)][t.pid]?Z[r(1076)](d,e,i,t[r(509)],s):Z.pmt_.synchronous_klv_pids[t[r(509)]]&&Z[r(934)](d,e,i,t.pid,s);break;case Oa[r(441)]:Z[r(740)](d,e,i,t[r(353)]);break;case Oa[r(474)]:Z.parseH265Payload(d,e,i,t[r(353)]);break;case Oa[r(1232)]:Z.parseG711Payload(d,e,!0);break;case Oa[r(541)]:Z[r(290)](d,e,!1);break;default:te[r(313)](Z[r(645)],r(1117)+t[r(499)]+r(467)+t[r(509)])}}else if((188===s||191===s||240===s||241===s||255===s||242===s||248===s)&&t[r(499)]===Oa.kPESPrivateData){let e,i=6;e=0!==o?o:n.byteLength-i;let a=n[r(1120)](i,i+e);Z.parsePESPrivateDataPayload(a,void 0,void 0,t[r(509)],s)}}else te[r(788)](Z[r(645)],r(1113)+i)},parsePAT(t){const r=e;let n=t[0];if(0!==n)return void Log.e(Z[r(987)],r(840)+n+r(1005));let i=(15&t[1])<<8|t[2];t[3],t[4];let s=(62&t[5])>>>1,o=1&t[5],a=t[6];t[7];let c=null;if(1===o&&0===a)c={version_number:0,network_pid:0,program_pmt_pid:{}},c[r(535)]=s;else if(c=Z[r(686)],null==c)return;let u=i-5-4,l=-1,d=-1;for(let e=8;e<8+u;e+=4){let n=t[e]<<8|t[e+1],i=(31&t[e+2])<<8|t[e+3];0===n?c[r(427)]=i:(c[r(823)][n]=i,-1===l&&(l=n),-1===d&&(d=i))}1===o&&0===a&&(null==Z[r(686)]&&te[r(313)](Z[r(645)],"Parsed first PAT: "+JSON.stringify(c)),Z[r(686)]=c,Z[r(1048)]=l,Z[r(659)]=d)},parsePMT(t){const r=e;let n=t[0];if(2!==n)return void te[r(788)](Z[r(645)],"parsePMT: table_id "+n+r(813));let i,s=(15&t[1])<<8|t[2],o=t[3]<<8|t[4],a=(62&t[5])>>>1,c=1&t[5],u=t[6];if(t[7],1===c&&0===u)i=Z[r(640)](),i.program_number=o,i[r(535)]=a,Z[r(1099)][o]=i;else if(i=Z.program_pmt_map_[o],null==i)return;i[r(855)]=(31&t[8])<<8|t[9];let l=(15&t[10])<<8|t[11],d=12+l,h=s-9-l-4;for(let e=d;e0){for(let n=e+5;n0)for(let n=e+5;n1&&(te[n(1022)](Z[n(645)],n(434)+(n(712)+e+n(518)+s+"ms")),s=e)}}let o,a=new _t(t),c=null,u=s;for(;null!=(c=a[n(949)]());){i=1024/c.sampling_frequency*1e3;const e={codec:n(602),data:c};0==Z[n(1095)]?(Z.audio_metadata_={codec:"aac",audio_object_type:c[n(464)],sampling_freq_index:c[n(297)],sampling_frequency:c[n(558)],channel_config:c[n(981)]},Z[n(845)](e)):Z[n(983)](e)&&(Z[n(939)](),Z[n(845)](e)),o=u;let t=Math[n(1147)](u);const r=new Uint8Array(c[n(302)][n(885)]+2);r[n(1198)]([175,1],0),r[n(1198)](c.data,2);let s={payload:r,length:r[n(503)],pts:t,dts:t,type:we.audio};Z.audio_track_[n(752)].push(s),Z[n(1155)][n(885)]+=r.byteLength,u+=i}a[n(286)]()&&(Z.aac_last_incomplete_data_=a[n(723)]()),o&&(Z.audio_last_sample_pts_=o)},parseLOASAACPayload(t,r){const n=e;if(Z[n(1156)]&&!Z[n(572)])return;if(Z[n(513)]){let e=new Uint8Array(t.byteLength+Z.aac_last_incomplete_data_.byteLength);e[n(1198)](Z[n(513)],0),e[n(1198)](t,Z[n(513)][n(503)]),t=e}let i,s;if(null!=r&&(s=r/Z[n(1069)]),"aac"===Z[n(583)].codec){if(null==r&&null!=Z[n(1061)])i=1024/Z[n(583)][n(558)]*1e3,s=Z[n(1061)]+i;else if(null==r)return void te[n(1022)](Z[n(645)],n(1025));if(Z[n(513)]&&Z[n(1061)]){i=1024/Z[n(583)][n(558)]*1e3;let e=Z[n(1061)]+i;Math[n(950)](e-s)>1&&(te[n(1022)](Z[n(987)],"AAC: Detected pts overlapped, "+(n(712)+e+n(518)+s)+"ms"),s=e)}}let o,a=new gt(t),c=null,u=s;for(;null!=(c=a[n(949)](Lt(Z.loas_previous_frame)?void 0:Z[n(360)]));){Z[n(360)]=c,i=1024/c[n(558)]*1e3;const e={codec:"aac",data:c};0==Z[n(1095)]?(Z.audio_metadata_={codec:n(602),audio_object_type:c[n(464)],sampling_freq_index:c.sampling_freq_index,sampling_frequency:c[n(558)],channel_config:c[n(981)]},Z[n(845)](e)):Z[n(983)](e)&&(Z[n(939)](),Z[n(845)](e)),o=u;let t=Math[n(1147)](u);const r=new Uint8Array(c[n(302)][n(885)]+2);r.set([175,1],0),r[n(1198)](c[n(302)],2);let s={payload:r,length:r[n(503)],pts:t,dts:t,type:we.audio};Z[n(1155)][n(752)].push(s),Z[n(1155)].length+=r[n(503)],u+=i}a[n(286)]()&&(Z.aac_last_incomplete_data_=a.getIncompleteData()),o&&(Z[n(1061)]=o)},parseAC3Payload(e,t){},parseEAC3Payload(e,t){},parseOpusPayload(e,t){},parseMP3Payload(t,r){const n=e;if(Z[n(1156)]&&!Z[n(572)])return;let i=[44100,48e3,32e3,0],s=[22050,24e3,16e3,0],o=[11025,12e3,8e3,0],a=t[1]>>>3&3,c=(6&t[1])>>1,u=(t[2],(12&t[2])>>>2),l=3!=(t[3]>>>6&3)?2:1,d=0,h=34;switch(a){case 0:d=o[u];break;case 2:d=s[u];break;case 3:d=i[u]}switch(c){case 1:h=34,n(885);break;case 2:h=33,n(885);break;case 3:h=32,n(885)}const f={};f.object_type=h,f[n(348)]=d,f.channel_count=l,f[n(302)]=t;const p={codec:n(345),data:f};0==Z[n(1095)]?(Z.audio_metadata_={codec:n(345),object_type:h,sample_rate:d,channel_count:l},Z.dispatchAudioInitSegment(p)):Z[n(983)](p)&&(Z[n(939)](),Z[n(845)](p));const m=new Uint8Array(t[n(885)]+1);m[n(1198)]([32],0),m[n(1198)](t,1);let v={payload:m,length:m.byteLength,pts:r/Z[n(1069)],dts:r/Z[n(1069)],type:we[n(786)]};Z[n(1155)][n(752)].push(v),Z[n(1155)].length+=m.byteLength},parseG711Payload(t,r,n){const i=e;if(Z[i(1156)]&&!Z[i(572)])return;const s={};s[i(348)]=8e3,s[i(473)]=1;const o={codec:n?"g711a":i(463)};0==Z[i(1095)]?(Z[i(583)]={codec:o[i(1233)],sample_rate:s.sample_rate,channel_count:s[i(473)]},Z[i(845)](o)):Z[i(983)](o)&&(Z[i(939)](),Z[i(845)](o));const a=new Uint8Array(t[i(885)]+1),c=n?[114]:[130];a[i(1198)](c,0),a[i(1198)](t,1);let u={payload:a,length:a[i(503)],pts:r/Z[i(1069)],dts:r/Z[i(1069)],type:we[i(786)]};Z[i(1155)][i(752)][i(719)](u),Z[i(1155)][i(885)]+=a[i(503)]},detectAudioMetadataChange(t){const r=e;if(t[r(1233)]!==Z[r(583)].codec)return te[r(313)](Z[r(645)],r(964)+(Z[r(583)][r(1233)]+r(358)+t[r(1233)])),!0;if(t.codec===r(602)&&Z.audio_metadata_[r(1233)]===r(602)){const e=t[r(302)];if(e.audio_object_type!==Z[r(583)][r(464)])return te[r(313)](Z.TAG_NAME,r(309)+(Z[r(583)].audio_object_type+r(358)+e[r(464)])),!0;if(e[r(297)]!==Z[r(583)].sampling_freq_index)return te.debugLog(Z[r(645)],r(848)+(Z[r(583)][r(297)]+r(358)+e.sampling_freq_index)),!0;if(e[r(981)]!==Z.audio_metadata_.channel_config)return te[r(313)](Z[r(645)],"AAC: Channel configuration changed from "+Z[r(583)][r(981)]+" to "+e[r(981)]),!0}else if(t[r(1233)]===r(962)&&Z[r(583)][r(1233)]===r(962)){const e=t[r(302)];if(e[r(558)]!==Z[r(583)][r(558)])return te[r(313)](Z[r(645)],r(379)+(Z[r(583)].sampling_frequency+" to ")+e.sampling_frequency),!0;if(e[r(874)]!==Z[r(583)][r(874)])return te[r(313)](Z.TAG_NAME,r(894)+(Z.audio_metadata_[r(874)]+r(358)+e[r(874)])),!0;if(e[r(325)]!==Z[r(583)][r(325)])return te.debugLog(Z[r(645)],r(1135)+(Z[r(583)][r(325)]+r(358)+e[r(325)])),!0;if(e[r(289)]!==Z[r(583)][r(289)])return te[r(313)](Z[r(645)],r(967)+(Z[r(583)][r(289)]+r(358)+e[r(289)])),!0;if(e[r(1235)]!==Z[r(583)].low_frequency_effects_channel_on)return te.debugLog(Z[r(645)],r(1206)+(Z.audio_metadata_[r(1235)]+" to ")+e[r(1235)]),!0}else if(t[r(1233)]===r(1153)&&Z.audio_metadata_[r(1233)]===r(1153)){const e=t[r(349)];if(e[r(348)]!==Z.audio_metadata_[r(348)])return te[r(313)](Z[r(645)],r(279)+(Z[r(583)].sample_rate+" to ")+e[r(348)]),!0;if(e[r(473)]!==Z[r(583)].channel_count)return te.debugLog(Z.TAG_NAME,"Opus: Channel count changed from "+(Z.audio_metadata_[r(473)]+r(358)+e.channel_count)),!0}else if(t[r(1233)]===r(345)&&Z[r(583)][r(1233)]===r(345)){const e=t.data;if(e[r(282)]!==Z[r(583)][r(282)])return te.debugLog(Z[r(645)],"MP3: AudioObjectType changed from "+Z[r(583)][r(282)]+" to "+e[r(282)]),!0;if(e[r(348)]!==Z[r(583)].sample_rate)return te[r(313)](Z[r(645)],r(1093)+(Z[r(583)][r(348)]+r(358)+e[r(348)])),!0;if(e[r(473)]!==Z[r(583)][r(473)])return te[r(313)](Z.TAG_NAME,r(1122)+(Z.audio_metadata_[r(473)]+r(358)+e.channel_count)),!0}return!1},dispatchAudioInitSegment(t){const r=e;let n={};if(n[r(630)]=r(786),n.id=Z[r(1155)].id,n[r(922)]=1e3,n[r(539)]=Z[r(805)],Z[r(583)][r(1233)]===r(602)){let e=t[r(1233)]===r(602)?t.data:null,i=new ja(e);n.audioSampleRate=i[r(959)],n[r(1165)]=i[r(394)],n.channelCount=i[r(473)],n[r(1233)]=i.codec_mimetype,n[r(951)]=i[r(556)],n[r(631)]=i[r(631)],n[r(683)]=1024/n.audioSampleRate*n[r(922)],r(870);const s=dt({profile:te[r(1079)][r(1039)]?i[r(282)]:i[r(1242)],sampleRate:n.audioSampleRateIndex,channel:n[r(377)]});te[r(954)](s,0)}else Z[r(583)][r(1233)]===r(962)||Z[r(583)][r(1233)]===r(625)||Z[r(583)].codec===r(1153)||(Z[r(583)].codec===r(345)?(n.audioSampleRate=Z[r(583)][r(348)],n[r(377)]=Z.audio_metadata_[r(473)],n[r(1233)]=r(345),n.originalCodec=r(345),n[r(631)]=void 0):Z.audio_metadata_[r(1233)]===r(308)?(n[r(966)]=Z[r(583)][r(348)],n[r(377)]=Z[r(583)][r(473)],n.codec=r(308),n[r(951)]=r(308),n[r(631)]=void 0):Z[r(583)].codec===r(463)&&(n[r(966)]=Z[r(583)][r(348)],n[r(377)]=Z[r(583)].channel_count,n[r(1233)]=r(463),n[r(951)]=r(463),n[r(631)]=void 0));0==Z[r(1095)]&&te[r(313)](Z[r(645)],r(851)+n[r(1233)]),Z[r(1095)]=!0,Z[r(1092)]=!1},dispatchPESPrivateDataDescriptor(t,r,n){const i=e;let s={};s[i(509)]=t,s.stream_type=r,s[i(1134)]=n},parsePESPrivateDataPayload(t,r,n,i,s){const o=e;let a=new Ha;if(a[o(509)]=i,a[o(1090)]=s,a[o(808)]=t.byteLength,a[o(302)]=t,null!=r){let e=Math[o(1147)](r/Z[o(1069)]);a[o(866)]=e}else a[o(432)]=Z[o(837)]();if(null!=n){let e=Math.floor(n/Z.timescale_);a[o(918)]=e}},parseTimedID3MetadataPayload(t,r,n,i,s){const o=e;te[o(313)](Z[o(645)],o(566)+i+o(650)+r+o(1030)+n+o(526)+s)},parseSynchronousKLVMetadataPayload(t,r,n,i,s){const o=e;te[o(313)](Z[o(645)],o(1067)+i+o(650)+r+o(1030)+n+", stream_id="+s)},parseAsynchronousKLVMetadataPayload(t,r,n){const i=e;te[i(313)](Z[i(645)],i(311)+r+", stream_id="+n)},parseSMPTE2038MetadataPayload(t,r,n,i,s){const o=e;te[o(313)](Z[o(645)],o(1220)+i+o(650)+r+", dts="+n+o(526)+s)},getNearestTimestampMilliseconds(){const t=e;return null!=Z[t(1061)]?Math.floor(Z[t(1061)]):null!=Z.last_pcr_?Math[t(1147)](Z[t(1151)]/300/Z.timescale_):void 0},_preDoDecode(){const t=e,r=Z[t(873)],n=Z[t(1155)];let i=r[t(752)];Z[t(1141)](r),Z.correctSamplePts(n),n.samples[t(885)]>0&&(i=r.samples.concat(n[t(752)]),i=i[t(478)](((e,r)=>e[t(918)]-r.dts))),i.forEach((e=>{const r=t,n=new Uint8Array(e[r(1068)]);delete e[r(1068)],e[r(630)]===we.video?Z[r(287)]({...e,payload:n}):e[r(630)]===we[r(786)]&&Z[r(316)]({...e,payload:n})})),r.samples=[],r[t(885)]=0,n[t(752)]=[],n[t(885)]=0},_doDecodeVideo(t){const r=e,n=new Uint8Array(t[r(1068)]);let i=null;i=t.isHevc?nn(n,t[r(1071)]):Tr(n,t[r(1071)]),t[r(1071)]&&te.calcIframeIntervalTimestamp(t.dts);const s=te[r(1031)](i,t[r(1071)]);te.decode(s,{type:we.video,ts:t.dts,isIFrame:t[r(1071)],cts:t.cts})},_doDecodeAudio(t){const r=e,n=new Uint8Array(t.payload),i=te.cryptoPayloadAudio(n);te[r(322)](i,{type:we[r(786)],ts:t[r(918)],isIFrame:!1,cts:0})},correctSamplePts(t){const r=e;let n=arguments[r(885)]>1&&void 0!==arguments[1]?arguments[1]:5;const i=t.samples||[];for(let e=0;e=s[r(918)]&&(te[r(1022)](Z[r(645)],"correctSamplePts dts, dts: "+t.dts+", next dts: "+s[r(918)]+r(872)),s[r(918)]=t[r(918)]+n)}}},ee=null;Jt()&&(ee={TAG_NAME:e(378),_resetInIt(){const t=e;ee[t(910)]=null,ee[t(764)]=null,ee[t(578)]={},ee[t(1219)]={},ee.audioMeta={},ee[t(624)]=null,ee.audioSourceBuffer=null,ee[t(559)]=!1,ee.hasAudioInit=!1,ee.isAudioInitInfo=!1,ee[t(1052)]="",ee[t(419)]="",ee[t(849)]={},ee[t(1040)]={},ee[t(633)]=!1,ee[t(595)]=0,ee[t(1237)]=0,ee[t(1020)]=null,ee[t(380)]=null,ee[t(368)]=!1,ee[t(542)]=!1,ee[t(1176)]=!1,ee[t(830)]=!1,ee[t(897)]=!1,ee[t(984)]=null,ee[t(1029)]=null,ee[t(1133)]=null,ee[t(1109)]=null,ee[t(401)]=0,ee.isWidthOrHeightChanged=!1,ee[t(1085)]=null,ee.prevAudioTs=null,ee[t(429)]=[],ee[t(1065)]=[],ee[t(494)]=[],ee[t(923)]=[],ee.pendingAudioSegments=[],ee[t(480)]=null,ee.audioSourceBufferCheckTimeout=null,ee[t(1106)]=null,ee[t(519)]=!1,ee[t(636)]={currentTime:0,readyState:0}},init(){const t=e;ee[t(745)]=new ya,ee[t(1189)](),ee[t(785)]=new(self[t(739)]),ee[t(1060)]=!!Kt(te[t(1079)][t(733)]),ee[t(1226)](),te[t(313)](ee[t(645)],t(643))},destroy(){const t=e;ee.stop(),ee[t(388)](),ee[t(429)]&&ee[t(429)][t(885)]&&(ee[t(429)][t(343)]((e=>e())),ee[t(429)]=[]),ee[t(1189)](),ee[t(785)]=null,te.debugLog(ee[t(645)],t(758))},getState(){const t=e;return ee.mediaSource&&ee[t(785)][t(1215)]},isStateOpen(){const t=e;return ee.getState()===Le[t(670)]},isStateClosed(){const t=e;return ee.getState()===Le[t(777)]},isStateEnded:()=>ee[e(1010)]()===Le.ended,_bindMediaSourceEvents(){const t=e,{proxy:r}=ee[t(745)],n=r(ee[t(785)],Oe[t(498)],(()=>{const e=t;te[e(313)](ee[e(645)],"sourceOpen"),ee[e(1231)]()})),i=r(ee.mediaSource,Oe[t(391)],(()=>{const e=t;te.debugLog(ee.TAG_NAME,e(391))})),s=r(ee.mediaSource,Oe[t(418)],(()=>{const e=t;te.debugLog(ee.TAG_NAME,e(418))}));ee[t(429)][t(719)](n,i,s)},_onMediaSourceSourceOpen(){const t=e;!ee[t(624)]&&(te[t(313)](ee[t(645)],t(955)),ee._initSourceBuffer()),!ee[t(651)]&&(te[t(313)](ee[t(645)],t(420)),ee[t(701)]()),ee[t(669)]()&&ee[t(1050)]()},decodeVideo(t,r,n,i){const s=e;if(te[s(304)])te.debugWarn(ee.TAG_NAME,s(793));else if(Kt(ee[s(559)]))if(n&&t[1]===He[s(323)]){const e=15&t[0];if(e===Te.h265&&Kt(te[s(1079)][s(1096)]))return void ee[s(276)](ke[s(362)]);ee[s(578)][s(1233)]=e,postMessage({cmd:be[s(982)],code:e});const i=new Uint8Array(t);postMessage({cmd:be.videoCodec,buffer:i,codecId:e},[i[s(794)]]),ee[s(559)]=ee[s(750)](t,r,n,e)}else te[s(1022)](ee[s(645)],s(1195)+n+" , payload is "+t[1]+s(283));else if(!ee.isDecodeFirstIIframe&&n&&(ee.isDecodeFirstIIframe=!0),ee[s(1060)]){if(n&&0===t[1]){const e=15&t[0];let r={};e===Te[s(374)]?r=Ir(t[s(428)](5)):e===Te[s(727)]&&(r=Zr(t));const n=ee.videoInfo;n&&n[s(1144)]&&n[s(1239)]&&r&&r.codecWidth&&r[s(893)]&&(r[s(465)]!==n[s(1144)]||r[s(893)]!==n.height)&&(te[s(1022)](ee[s(645)],s(1146)+n.width+", old height is "+n[s(1239)]+",\n new width is "+r[s(465)]+s(801)+r[s(893)]+s(903)),ee.isWidthOrHeightChanged=!0,ee[s(276)](ke[s(536)],s(552)+n[s(1144)]+"->"+r.codecWidth+s(936)+n[s(1239)]+"->"+r[s(893)]))}if(ee[s(878)])return void te[s(1022)](ee[s(645)],"decodeVideo: video width or height is changed, and return");if($t(t))return void te[s(313)](ee[s(645)],s(928));if(t.byteLength0&&tpe},_decodeConfigurationRecord(t,r,n,i){const s=e;let o=t[s(428)](5),a={};if(i===Te[s(374)]?a=Ir(o):i===Te[s(727)]&&(a=Qr(o)),ee[s(578)].width=a.codecWidth,ee[s(578)][s(1239)]=a[s(893)],0===a[s(465)]&&0===a[s(893)])return te[s(1022)](ee.TAG_NAME,s(436),JSON.stringify(a)),ee[s(276)](ke[s(1149)],"width is "+(0===a[s(465)])+s(876)+a[s(893)]),!1;const c={id:Ge[s(1181)],type:s(1181),timescale:1e3,duration:0,avcc:o,codecWidth:a.codecWidth,codecHeight:a[s(893)],videoType:a.videoType},u=wa[s(776)](c);ee.isAvc=i===Te[s(374)];let l=a.codec;return ee[s(1052)]=l?'video/mp4; codecs="'+a[s(1233)]+'"':ee[s(910)]?Re[s(626)]:Re[s(439)],postMessage({cmd:be[s(270)],w:a[s(465)],h:a.codecHeight}),ee[s(455)](),ee[s(405)](u[s(794)]),ee.sequenceNumber=0,ee[s(849)]={},ee[s(633)]=!1,!0},_decodeAudioConfigurationRecord(t,r){const n=e,i=t[0]>>4&15,s=t[0]>>1&1,o=i===De.MP3,a=i===De[n(870)];if(Kt(a||o))return te.debugWarn(ee.TAG_NAME,n(389)+i+n(810)),ee.emitError(ke[n(337)]),!1;const c={id:Ge.audio,type:n(786),timescale:1e3};let u={};if(ht(t)){if(u=vt(t[n(428)](2)),!u)return!1;c[n(966)]=u[n(890)],c.channelCount=u[n(377)],c.config=u[n(631)],c[n(683)]=1024/c[n(966)]*c[n(922)]}else{if(!o)return!1;if(u=Ua(t.slice(1)),!u)return!1;c.audioSampleRate=u[n(890)],c[n(377)]=u[n(377)],c.refSampleDuration=1152/c[n(966)]*c[n(922)]}c[n(1233)]=u[n(1233)],c[n(539)]=0;let l="mp4",d=u.codec,h=null;o&&Kt(te[n(1079)][n(409)])?(l=n(916),d="",h=new Uint8Array):h=wa[n(776)](c);let f=c.type+"/"+l;return d&&d[n(885)]>0&&(f+=n(307)+d),Kt(ee[n(351)])&&(z=i===De[n(870)]?s?16:8:0===s?8:16,postMessage({cmd:be.audioCode,code:i}),postMessage({cmd:be[n(524)],sampleRate:c[n(966)],channels:c[n(377)],depth:z}),ee.isAudioInitInfo=!0),ee.audioMimeType=f,ee[n(764)]=a,ee[n(701)](),ee[n(1017)](h[n(794)]),!0},_initSourceBuffer(){const t=e,{proxy:r}=ee[t(745)];if(null===ee[t(624)]&&null!==ee[t(785)]&&ee[t(545)]()&&ee[t(1052)]){try{te[t(313)](ee[t(645)],t(698),ee[t(1052)]),ee[t(624)]=ee[t(785)][t(718)](ee[t(1052)])}catch(e){return te[t(788)](ee[t(645)],t(932),e[t(768)],e[t(943)](),e),ee[t(276)](ke[t(449)],e[t(768)]),void(ee[t(1176)]=!0)}if(ee[t(624)]){const e=r(ee[t(624)],t(531),(e=>{const r=t;ee.mediaSourceBufferError=!0,te[r(788)](ee.TAG_NAME,r(985),e),ee[r(276)](ke.mseSourceBufferError,r(908))})),n=r(ee[t(624)],t(1054),(()=>{const e=t;ee[e(589)]()?ee[e(1225)]():ee[e(669)]()?ee[e(1050)]():ee[e(519)]&&(te[e(313)](ee[e(645)],e(912)),ee[e(280)]())}));ee[t(429)].push(e,n)}}else te[t(313)](ee[t(645)],t(327)+ee.isStateOpen()+t(346)+(null===ee[t(910)]))},_initAudioSourceBuffer(){const t=e,{proxy:r}=ee[t(745)];if(null===ee[t(651)]&&null!==ee.mediaSource&&ee[t(545)]()&&ee[t(419)]){try{te.debugLog(ee[t(645)],t(990),ee.audioMimeType),ee[t(388)](),ee[t(651)]=ee.mediaSource[t(718)](ee[t(419)])}catch(e){return te[t(788)](ee[t(645)],t(515),e[t(768)],e[t(943)](),e),ee.emitError(ke[t(449)],e[t(768)]),void(ee[t(1176)]=!0)}if(ee.audioSourceBuffer){const e=r(ee[t(651)],t(531),(e=>{const r=t;ee[r(830)]=!0,te.debugError(ee.TAG_NAME,r(815),e),ee[r(276)](ke[r(717)],"mediaSource audio sourceBuffer error")})),n=r(ee[t(651)],"updateend",(()=>{const e=t;ee[e(589)]()?ee[e(1225)]():ee[e(669)]()?ee._doAppendSegments():ee[e(519)]&&(te[e(313)](ee[e(645)],"audioSourceBuffer updateend and hasPendingEos is true, next endOfStream()"),ee[e(280)]())}));ee[t(429)][t(719)](e,n),null===ee[t(1106)]&&(ee[t(1106)]=setTimeout((()=>{const e=t;ee[e(476)](),ee[e(276)](ke[e(850)])}),1e3))}}else te[t(313)](ee[t(645)],t(970)+ee.isStateOpen()+t(999)+ee[t(419)])},_decodeVideo(t,r,n,i,s){const o=e;let a=t[o(428)](5),c=a.byteLength;if(0===c)return void te[o(1022)](ee.TAG_NAME,o(1064));let u=(new Date)[o(1182)](),l=!1;!ee.prevTimestamp&&(ee[o(984)]=u,l=!0);const d=u-ee[o(984)];if(ee[o(1029)]=d,d>1e3&&!l&&te.isPlayer&&te[o(313)](ee[o(645)],o(485)+u+o(1081)+ee.prevTimestamp+", diff time is "+d+o(1137)),ee[o(849)].id&&r>=ee[o(849)][o(918)]){let e=8+ee.cacheTrack[o(547)],t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[o(1198)](wa.types.mdat,4),t[o(1198)](ee[o(849)][o(302)],8),ee[o(849)][o(539)]=r-ee.cacheTrack[o(918)];let n=wa[o(828)](ee.cacheTrack,ee[o(849)][o(918)]);ee[o(849)]={};let i=new Uint8Array(n[o(503)]+t[o(503)]);i[o(1198)](n,0),i[o(1198)](t,n[o(503)]),ee[o(405)](i[o(794)])}else te[o(313)](ee.TAG_NAME,"timeInit set false , cacheTrack = {} now dts is "+r+", and ts is "+s+o(274)+(ee.cacheTrack&&ee[o(849)].dts)),ee.timeInit=!1,ee.cacheTrack={};!ee[o(849)]&&(ee[o(849)]={}),ee[o(849)].id=Ge[o(1181)],ee[o(849)][o(595)]=++ee[o(595)],ee.cacheTrack[o(547)]=c,ee[o(849)][o(918)]=r,ee[o(849)].cts=i,ee[o(849)][o(1196)]=n,ee[o(849)].data=a,ee[o(849)][o(1241)]={isLeading:0,dependsOn:n?2:1,isDependedOn:n?1:0,hasRedundancy:0,isNonSync:n?0:1},ee[o(984)]=(new Date)[o(1182)]()},_decodeAudio(t,r,n){const i=e;let s=ee[i(764)]?t[i(428)](2):t[i(428)](1),o=s[i(503)];if(ee[i(1040)].id&&r>=ee.cacheAudioTrack.dts){let e=8+ee.cacheAudioTrack[i(547)],t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[i(1198)](wa[i(1118)].mdat,4),t[i(1198)](ee[i(1040)][i(302)],8),ee[i(1040)].duration=r-ee.cacheAudioTrack.dts;let n=wa[i(828)](ee[i(1040)],ee.cacheAudioTrack.dts);ee[i(1040)]={};let s=new Uint8Array(n[i(503)]+t.byteLength);s[i(1198)](n,0),s[i(1198)](t,n[i(503)]),ee[i(1017)](s[i(794)])}else ee[i(1040)]={};!ee[i(1040)]&&(ee[i(1040)]={}),ee[i(1040)].id=Ge[i(786)],ee.cacheAudioTrack.sequenceNumber=++ee[i(1237)],ee[i(1040)][i(547)]=o,ee[i(1040)][i(918)]=r,ee[i(1040)][i(926)]=0,ee[i(1040)].data=s,ee.cacheAudioTrack[i(1241)]={isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}},appendBuffer(t){const r=e;te[r(304)]?te[r(1022)](ee[r(645)],r(586)):ee[r(1176)]?te.debugWarn(ee[r(645)],r(800)):ee[r(368)]?te.debugWarn(ee[r(645)],r(944)):ee[r(542)]?te[r(1022)](ee[r(645)],"mseDecoder.mediaSourceAppendBufferError is true"):ee.mediaSourceBufferError?te.debugWarn(ee[r(645)],r(390)):(ee[r(494)][r(719)](t),ee[r(624)]&&(te[r(1079)][r(1166)]&&ee[r(766)]()&&ee[r(543)](),Kt(ee[r(972)]())&&ee.isStateOpen()&&Kt(ee[r(589)]()))?ee._doAppendSegments():ee.isStateClosed()?(ee[r(830)]=!0,ee[r(276)](ke[r(717)],r(1152))):ee[r(690)]()&&(ee[r(830)]=!0,ee[r(276)](ke[r(717)],r(843))))},appendAudioBuffer(t){const r=e;te[r(304)]?te[r(1022)](ee[r(645)],r(864)):ee[r(1176)]?te[r(1022)](ee[r(645)],r(800)):ee[r(368)]?te.debugWarn(ee[r(645)],r(944)):ee.mediaSourceAppendBufferError?te[r(1022)](ee[r(645)],"mseDecoder.mediaSourceAppendBufferError is true"):ee[r(830)]?te.debugWarn(ee[r(645)],"mseDecoder.mediaSourceBufferError is true"):(ee[r(1018)].push(t),ee.audioSourceBuffer&&(te[r(1079)][r(1166)]&&ee[r(766)]()&&ee[r(543)](),Kt(ee[r(1213)]())&&ee[r(545)]()&&Kt(ee._hasPendingRemoveRanges()))?ee[r(1050)]():ee[r(1074)]()?(ee[r(830)]=!0,ee[r(276)](ke[r(717)],r(1152))):ee[r(690)]()&&(ee[r(830)]=!0,ee[r(276)](ke[r(717)],r(843))))},getSourceBufferUpdating(){const t=e;return ee.sourceBuffer&&ee[t(624)].updating},getAudioSourceBufferUpdating(){const t=e;return ee[t(651)]&&ee[t(651)][t(947)]},stop(){const t=e;ee.abortSourceBuffer(),ee.removeSourceBuffer(),ee[t(280)]()},clearUpAllSourceBuffer(){const t=e;if(ee[t(624)]){const e=ee[t(624)][t(664)];for(let r=0;r0||ee.pendingAudioSegments[t(885)]>0},getPendingSegmentsLength(){const t=e;return ee.pendingSegments[t(885)]},_doAppendSegments(){const t=e;if(ee[t(1074)]()||ee.isStateEnded())te[t(313)](ee.TAG_NAME,t(1216));else if(null!==ee.sourceBuffer){if(ee[t(422)]()&&null===ee.audioSourceBuffer)return te[t(313)](ee[t(645)],t(704)),void(null===ee[t(1192)]&&(ee.audioSourceBufferCheckTimeout=setTimeout((()=>{const e=t;ee[e(388)](),ee[e(276)](ke[e(293)])}),1e3)));if(Kt(ee[t(972)]())&&ee[t(494)][t(885)]>0){const e=ee[t(494)][t(925)]();try{ee.sourceBuffer.appendBuffer(e)}catch(e){te[t(788)](ee[t(645)],t(853),e[t(768)],e),22===e[t(768)]?(ee[t(1209)](),ee[t(368)]=!0,ee[t(276)](ke[t(462)],t(797)+e[t(768)]+t(796)+e[t(646)])):11===e[t(768)]?(ee[t(1209)](),ee.mediaSourceAppendBufferError=!0,ee[t(276)](ke[t(542)],t(797)+e.code+t(796)+e[t(646)])):(ee.stop(),ee.mediaSourceBufferError=!0,ee.emitError(ke.mseSourceBufferError,t(797)+e.code+t(796)+e.message))}}if(Kt(ee[t(1213)]())&&ee[t(1018)][t(885)]>0){const e=ee[t(1018)].shift();try{ee.audioSourceBuffer[t(405)](e)}catch(e){te.debugError(ee[t(645)],"mseDecoder.audioSourceBuffer.appendBuffer()",e[t(768)],e),22===e[t(768)]?(ee[t(1209)](),ee.mediaSourceAppendBufferFull=!0,ee[t(276)](ke.mediaSourceFull,t(797)+e.code+t(796)+e[t(646)])):11===e.code?(ee[t(1209)](),ee[t(542)]=!0,ee[t(276)](ke[t(542)],"code is "+e[t(768)]+t(796)+e[t(646)])):(ee[t(1209)](),ee[t(830)]=!0,ee[t(276)](ke.mseSourceBufferError,e.code,"code is "+e[t(768)]+t(796)+e.message))}}}else te[t(313)](ee[t(645)],t(1124))},_doCleanUpSourceBuffer(){const t=e,r=ee[t(636)][t(963)];if(ee[t(624)]){const e=ee[t(624)][t(664)];let n=!1;for(let i=0;i=te[t(1079)][t(854)]){n=!0;let e=r-te[t(1079)].mseAutoCleanupMinBackwardDuration;ee.pendingRemoveRanges[t(719)]({start:s,end:e})}}else o=te[t(1079)][t(854)]){n=!0;let e=r-te[t(1079)][t(1089)];ee[t(923)][t(719)]({start:s,end:e})}}else o0||ee[t(923)][t(885)]>0},needInitAudio(){const t=e;return te[t(1079)][t(691)]&&te._opt[t(1039)]},_doRemoveRanges(){const t=e;if(ee[t(624)]&&Kt(ee.getSourceBufferUpdating())){let e=ee.pendingRemoveRanges;for(;e[t(885)]&&Kt(ee[t(972)]());){let r=e[t(925)]();try{ee[t(624)][t(408)](r[t(901)],r[t(1105)])}catch(e){te.debugWarn(ee[t(645)],t(357),e,e[t(943)]())}}}if(ee.audioSourceBuffer&&Kt(ee.getAudioSourceBufferUpdating())){let e=ee[t(923)];for(;e[t(885)]&&Kt(ee[t(1213)]());){let r=e[t(925)]();try{ee[t(651)][t(408)](r.start,r[t(1105)])}catch(e){te[t(1022)](ee[t(645)],"_doRemoveRanges() audioSourceBuffer error",e,e[t(943)]())}}}},_getPlaybackRate(){},_needCleanupSourceBuffer(){const t=e;if(Kt(te[t(1079)][t(1166)]))return!1;const r=ee[t(636)][t(963)];if(ee[t(624)]){let e=ee[t(624)][t(664)];if(e.length>=1&&r-e[t(901)](0)>=te[t(1079)][t(854)])return!0}if(ee[t(651)]){let e=ee[t(651)][t(664)];if(e[t(885)]>=1&&r-e[t(901)](0)>=te[t(1079)].mseAutoCleanupMaxBackwardDuration)return!0}return!1},_clearAudioSourceBufferCheckTimeout(){const t=e;ee.audioSourceBufferCheckTimeout&&(clearTimeout(ee[t(1192)]),ee[t(1192)]=null)},_clearAudioNoDataCheckTimeout(){const t=e;ee.audioSourceNoDataCheckTimeout&&(clearTimeout(ee[t(1106)]),ee.audioSourceNoDataCheckTimeout=null)},getHandle:()=>ee[e(785)].handle,emitError(t){let r=arguments[e(885)]>1&&void 0!==arguments[1]?arguments[1]:"";postMessage({cmd:be.mseError,value:t,msg:r})}});let te={isPlayer:!0,isHevc:null,isPlayVod:!1,isPlayback:!1,isPlaybackPause:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:je[e(634)],_opt:$(),mp3Demuxer:null,delay:-1,pushLatestDelay:-1,firstTimestamp:null,startTimestamp:null,preDelayTimestamp:null,stopId:null,streamFps:null,streamAudioFps:null,streamVideoFps:null,writableStream:null,networkDelay:0,webglObj:null,socketStatus:Ce.notConnect,startStreamRateAndStatsInterval:function(){const t=e;te[t(696)](),d=setInterval((()=>{const e=t;l&&l(0);const r=JSON[e(468)]({demuxBufferDelay:te.getVideoBufferLength(),audioDemuxBufferDelay:te[e(1023)](),streamBufferByteLength:te[e(992)](),netBuf:te[e(657)]||0,pushLatestDelay:te[e(361)]||0,latestDelay:te[e(960)],isStreamTsMoreThanLocal:w,wasmDecodeDelay:g-b});postMessage({cmd:be[e(628)],type:Ae.streamStats,value:r}),Zt()&&(null===j&&(j=xt()),Qt(xt()-j)&&te[e(573)]())}),1e3)},stopStreamRateAndStatsInterval:function(){d&&(clearInterval(d),d=null)},_startCheckWsOpenTimeout:function(){const t=e;te[t(795)](),G=setTimeout((()=>{const e=t;if(te[e(437)]===Ce[e(769)]){const t=e(1123)+te[e(1079)][e(567)]+e(986)+te[e(437)];te.debugError("worker",t),postMessage({cmd:be[e(628)],type:ke[e(567)],value:ne.websocket,msg:t})}}),1e3*te[t(1079)].websocketOpenTimeout)},_stopCheckWsOpenTimeout:function(){G&&(clearTimeout(G),G=null)},useOffscreen:function(){const t=e;return te._opt[t(635)]&&typeof OffscreenCanvas!=t(1187)},getDelay:function(t,r){const n=e;if(!t||te[n(1079)][n(917)]&&!_)return-1;if(r===we[n(786)])return te[n(960)];if(te[n(838)]&&te.preDelayTimestamp>t)return te.preDelayTimestamp-t>1e3&&te[n(1022)](n(471),n(1082)+te[n(838)]+n(477)+t+" more than "+(te.preDelayTimestamp-t)+n(789)+te[n(960)]),te.preDelayTimestamp=t,te[n(960)];if(te[n(1164)]){if(t){const e=Date[n(461)]()-te[n(818)],r=t-te[n(1164)];e>=r?(w=!1,te.delay=e-r):(w=!0,te.delay=r-e)}}else te[n(1164)]=t,te[n(818)]=Date[n(461)](),te.delay=-1;return te[n(838)]=t,te[n(960)]},getDelayNotUpdateDelay:function(t,r){const n=e;if(!t||te[n(1079)][n(917)]&&!_)return-1;if(r===we.audio)return te[n(361)];if(te[n(838)]&&te[n(838)]-t>1e3)return te[n(1022)]("worker",n(1047)+te[n(838)]+n(477)+t+n(1034)+(te[n(838)]-t)+n(577)),-1;if(te[n(1164)]){let e=-1;if(t){const r=Date[n(461)]()-te[n(818)],i=t-te[n(1164)];r>=i?(w=!1,e=r-i):(w=!0,e=i-r)}return e}return-1},resetDelay:function(){const t=e;te.firstTimestamp=null,te[t(818)]=null,te[t(960)]=-1,te[t(806)]=!1},resetAllDelay:function(){const t=e;te[t(458)](),te[t(838)]=null},doDecode:function(t){const r=e;te._opt[r(411)]&&t[r(630)]===we.video&&te.isWorkerFetch&&te[r(1227)](t.payload,t.ts),te[r(271)]()?t[r(630)]===we[r(786)]?te[r(1079)][r(1039)]?ee[r(954)](t[r(1068)],t.ts):t.decoder.decode(t[r(1068)],t.ts):t[r(630)]===we[r(1181)]&&ee.decodeVideo(t[r(1068)],t.ts,t[r(1071)],t[r(926)]):te[r(1079)].useWCS&&te[r(635)]()&&t.type===we.video&&a[r(322)]?a.decode(t[r(1068)],t.ts,t[r(926)]):t[r(697)][r(322)](t[r(1068)],t.ts,t[r(1071)],t[r(926)])},decodeNext(t){const r=e;if(0===s[r(885)])return;const i=t.ts,o=s[0],a=t[r(630)]===we.video&&$t(t[r(1068)]);if(Kt(n))a&&(te[r(313)](r(471),r(548)+t[r(630)]+r(288)+i+r(1205)+o.type+r(537)+o.ts+"\n isVideoSqeHeader is "+a),s[r(925)](),te.doDecode(o));else{const e=o.ts-i,n=o[r(630)]===we[r(786)]&&t[r(630)]===we[r(1181)];(e<=20||n||a)&&(te[r(313)](r(471),r(548)+t[r(630)]+r(288)+i+r(1205)+o[r(630)]+r(537)+o.ts+r(642)+e+r(915)+n+r(787)+a),s[r(925)](),te[r(332)](o))}},init:function(){const t=e;te[t(313)](t(471),t(919)+n+t(1087)+i+" and opt is",JSON.stringify(te._opt));const r=te[t(1079)].playType===ie[t(726)],o=te[t(1079)][t(1008)]===ie.playbackTF,c=te[t(1079)][t(1008)]===ie[t(861)];if(te[t(1079)][t(773)]&&K[t(643)](),te[t(277)]=r,te[t(993)]=o,te[t(756)]=c,te[t(271)]()&&ee&&ee[t(643)](),a&&te[t(1079)][t(666)]&&te[t(635)]()&&a[t(643)](),Kt(te.isPlaybackCacheBeforeDecodeForFpsRender())){te.debugLog(t(471),"setInterval()");const e=()=>{const e=t,n=te[e(1079)][e(660)]+te._opt.videoBufferDelay;let i=null;if(s[e(885)]){if(te[e(370)])return void te[e(1022)](e(471),"loop() isPushDropping is true and bufferList length is "+s.length);if(te.dropping){for(i=s.shift(),te[e(1022)](e(471),e(638)+i[e(1071)]+e(367)+te.delay+e(555)+s[e(885)]);!i.isIFrame&&s[e(885)];)i=s[e(925)]();const t=te[e(1094)](i.ts,i[e(630)]);i[e(1071)]&&t<=te[e(996)]()&&(te[e(313)](e(471),e(783)),te[e(806)]=!1,te[e(332)](i),te[e(425)](i))}else if(te.isPlayback||te[e(1200)]()||0===te[e(1079)][e(660)])for(;s[e(885)];)i=s[e(925)](),te[e(332)](i);else if(i=s[0],-1===te.getDelay(i.ts,i[e(630)]))te.debugLog(e(471),e(1003),i.ts),s.shift(),te[e(332)](i),te[e(425)](i);else if(te[e(960)]>n&&r)te.hasIframeInBufferList()?(te[e(313)](e(471),e(1027)+te[e(960)]+" > maxDelay "+n+e(827)),te[e(550)](),te[e(806)]=!0,postMessage({cmd:be[e(1145)]})):(s.shift(),te[e(332)](i),te[e(425)](i));else for(;s[e(885)];){if(i=s[0],!(te[e(397)](i.ts,i[e(630)])>te[e(1079)][e(660)])){te.delay<0&&te.debugWarn("worker",e(942)+te[e(960)]+e(1116)+s.length);break}s[e(925)](),te[e(332)](i)}}else-1!==te[e(960)]&&te[e(313)]("worker",e(410)),te[e(550)]()};te[t(653)]=setInterval((()=>{const r=t;let n=(new Date)[r(1182)]();!S&&(S=n);const i=n-S;i>100&&te[r(1022)](r(471),r(958)+i),e(),S=(new Date).getTime()}),20)}else te.debugLog("worker",t(598));if(Kt(te[t(1079)][t(733)])&&(_=!0),te[t(271)]()&&ee){const e=ee.getHandle();e&&postMessage({cmd:be[t(396)],mseHandle:e},[e])}},playbackCacheLoop:function(){const t=e;te[t(979)]();for(let e=0;e{const e=t,n=(new Date)[e(1182)]();!q&&(q=n);for(let t=0;t1&&s.length>0&&te.debugWarn(e(471),e(456)+i+e(292)+r+"ms and diffFps is "+o+e(852)+s[e(885)]),q=n}),r)},doPlaybackCacheLoop:function(){const t=e;let r=null;if(s[t(885)])if(r=s[t(925)](),r[t(630)]===we[t(1181)]){te[t(1114)]()?r[t(1071)]&&(te.debugLog(t(471),t(300),r.ts),te[t(332)](r)):te[t(332)](r);let e=s[0];for(;e&&e[t(630)]===we[t(786)];)s[t(925)](),te[t(1114)]()||te[t(332)](e),e=s[0]}else if(r[t(630)]===we[t(786)]){te[t(1114)]()||te[t(332)](r);let e=s[0];for(;e;){if(r=s[t(925)](),r[t(630)]===we[t(1181)]){te[t(1114)]()?r[t(1071)]&&(te[t(313)]("worker",t(300),r.ts),te[t(332)](r)):te[t(332)](r),e=null;break}r[t(630)]===we.audio&&(te[t(1114)]()||te[t(332)](r),e=s[0])}}},clearPlaybackCacheLoop:function(){const t=e;te.stopId&&(clearInterval(te.stopId),te[t(653)]=null),q=null},startPlaybackCacheLoop:function(){te[e(326)]()},close:function(){const t=e;if(te[t(313)](t(471),t(573)),te[t(304)]=!0,Y(),!u||1!==u[t(1215)]&&2!==u[t(1215)]?u&&te[t(313)](t(471),t(875)+u.readyState):(N=!0,u[t(573)](1e3,t(603))),u&&(u.onopen=null,u[t(376)]=null,u[t(363)]=null,u[t(523)]=null,te.socketStatus=Ce[t(769)]),u=null,te[t(696)](),te[t(795)](),te[t(979)](),te[t(653)]&&(clearInterval(te[t(653)]),te[t(653)]=null),te[t(821)]&&(te.mp3Demuxer[t(758)](),te[t(821)]=null),te[t(822)]&&(zt(te[t(822)].close)&&Kt(te.writableStream.locked)?te[t(822)][t(573)]()[t(414)]((e=>{const r=t;te.debugLog(r(471),"close() and writableStream.close() error",e[r(943)](),e)})).finally((()=>{te[t(822)]=null})):te[t(822)]=null),oe)try{zt(oe.clear)&&oe[t(1115)](),zt(oe.delete)&&oe[t(1178)](),oe=null}catch(e){te[t(313)]("worker",t(867)+e[t(943)]()+" and ignore")}if(ae)try{zt(ae.clear)&&ae[t(1115)](),zt(ae[t(1178)])&&ae[t(1178)](),ae=null}catch(e){te[t(313)](t(471),"close() and videoDecoder.clear error: "+e[t(943)]()+" and ignore")}l=null,S=null,w=!1,g=0,b=0,a&&(a[t(758)]&&a[t(758)](),a=null),ee&&(ee[t(758)](),ee=null),te[t(1164)]=null,te[t(818)]=null,te[t(657)]=0,te.streamFps=null,te.streamAudioFps=null,te[t(844)]=null,te[t(960)]=-1,te.pushLatestDelay=-1,te.preDelayTimestamp=null,te[t(806)]=!1,te[t(370)]=!1,te.isPlayer=!0,te[t(993)]=!1,te[t(1058)]=!1,te.isPlayVod=!1,te[t(1127)]=!1,te.isHevc=null,te[t(1079)]=$(),te.webglObj&&(te[t(610)][t(758)](),te[t(312)][t(909)](t(1161),te[t(957)]),te[t(312)][t(909)]("webglcontextrestored",te[t(763)]),te[t(312)]=null,te[t(404)]=null,te.offscreenCanvasCtx=null),s=[],o=[],h&&(h.close(),h=null),p=null,m=null,v=!1,y=!1,_=!1,F=!1,R=!1,L=!1,O=null,E=[],x=0,T=0,I=null,A=null,B=null,D=null,z=null,M=0,P=0,U=null,k=null,C=null,te[t(725)]=je[t(634)],H=!0,K[t(758)](),J[t(758)](),X.destroy(),Z[t(758)](),te[t(1173)]=null,te._opt={},postMessage({cmd:be[t(889)]})},pushBuffer:function(t,r){const i=e;if(r.type===we[i(786)]&&ht(t)){if(te[i(313)](i(471),i(1167)+r.ts+i(504)),te[i(1079)][i(1073)]){const e=new Uint8Array(t);postMessage({cmd:be[i(521)],buffer:e},[e[i(794)]])}te[i(954)](t,r.ts)}else if(r.type===we[i(1181)]&&r[i(1071)]&&$t(t)){if(te[i(313)]("worker",i(1108)+r.ts+i(792)),te[i(1079)][i(1073)]){const e=new Uint8Array(t);postMessage({cmd:be.videoSequenceHeader,buffer:e},[e[i(794)]])}te[i(989)](t,r.ts,r[i(1071)],r[i(926)])}else{if(te[i(1079)][i(1186)])if(te[i(1079)][i(1073)]){const e=new Uint8Array(t);postMessage({cmd:be.flvBufferData,type:r[i(630)],buffer:e,ts:r.ts},[e[i(794)]])}else if(te[i(1079)][i(715)]===se[i(1191)])if(r[i(630)]===we.video){const e=new Uint8Array(t)[i(428)](5);postMessage({cmd:be[i(735)],buffer:e,isIFrame:r[i(1071)],ts:r.ts,cts:r[i(926)]},[e[i(794)]])}else if(r.type===we[i(786)]&&te[i(1079)].isWasmMp4){const e=new Uint8Array(t),n=ft(e)?e[i(428)](2):e[i(428)](1);postMessage({cmd:be[i(1038)],buffer:n,ts:r.ts},[n.buffer])}if(te[i(277)]){if(r[i(630)]===we[i(1181)]){if(M>0){const e=r.ts-D,t=2*M;e>=t&&te.debugLog(i(471),"pushBuffer video and isIFrame is "+r.isIFrame+i(525)+r.ts+i(760)+D+",\n diff is "+e+i(721)+M+i(331)+t+i(607))}if(null!==D&&D>=r.ts&&(te[i(1022)](i(471),i(479)+r[i(1071)]+i(587)+r.ts+i(1218)+D+i(1102)+t[i(503)]+" and prevPayloadBufferSize is "+P),D-r.ts>pe&&(te[i(1022)](i(471),i(1210)+D+", options.ts is "+r.ts+i(533)+(D-r.ts)+i(1034)+pe+i(627)),te[i(550)](),D=null,M=0),te._opt[i(736)]&&Kt(r.isIFrame)&&_)){const e=te[i(387)](),t=Kt(te[i(370)]);return te[i(313)]("worker",i(706)+e+i(681)+t+i(930)),void(e&&t?te[i(575)]():(te[i(590)](!0),Yt(te[i(1079)].checkFirstIFrame)&&Yt(n)&&(te[i(271)]()?ee[i(1060)]=!1:postMessage({cmd:be.checkFirstIFrame}))))}D>0&&(M=r.ts-D),P=t[i(503)],D=r.ts}if(_){const e=te._opt.videoBuffer+te[i(1079)][i(865)],t=te.getDelayNotUpdateDelay(r.ts,r.type);te[i(361)]=t,te[i(960)]>0&&t>e&&te[i(960)]({type:e[t(630)],ts:e.ts})));te[t(313)](t(471),t(835)+e+t(678)+s[t(885)]+t(1125)+JSON.stringify(r));const n=100;s[t(885)]>=n&&(te[t(1022)](t(471),t(529)+s[t(885)]+t(1034)+n+t(1077)),te[t(844)]=25,postMessage({cmd:be.playbackStreamVideoFps,value:te[t(844)]}),te[t(612)]=te[t(844)],te.playbackCacheLoop())}}},getVideoBufferLength(){let e=0;return s.forEach((t=>{t[dc(630)]===we.video&&(e+=1)})),e},hasIframeInBufferList(){const t=e;return s[t(488)]((e=>{const r=t;return e[r(630)]===we[r(1181)]&&e[r(1071)]}))},isAllIframeInBufferList(){const t=e,r=te[t(623)]();let n=0;return s.forEach((e=>{const r=t;e[r(630)]===we[r(1181)]&&e[r(1071)]&&(n+=1)})),r===n},getNotDroppingDelayTs(){const t=e;return te[t(1079)].videoBuffer+te._opt[t(865)]/2},getAudioBufferLength(){const t=e;let r=0;return s[t(343)]((e=>{const n=t;e.type===we[n(786)]&&(r+=1)})),r},getStreamBufferLength(){const t=e;let r=0;return h&&h[t(794)]&&(r=h[t(794)][t(503)]),te._opt.isNakedFlow?K[t(1159)]&&(r=K[t(1159)].byteLength):te._opt.isTs?Z[t(1140)]&&(r=Z[t(1140)][t(503)]):te[t(1079)][t(1157)]&&J.mp4Box&&(r=J[t(1009)].getStreamBufferSize()),r},fetchStream:function(t){const r=e;let n=arguments[r(885)]>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[r(885)]>2&&void 0!==arguments[2]?arguments[2]:[];if(te[r(313)](r(471),r(831)+t,r(273),JSON[r(468)](n)),te.isWorkerFetch=!0,n[r(605)]?te[r(1079)][r(605)]=!0:n[r(1157)]?te[r(1079)].isFmp4=!0:n[r(895)]?te[r(1079)][r(895)]=!0:n.isNakedFlow?te._opt[r(773)]=!0:n[r(565)]&&(te[r(1079)][r(565)]=!0),l=Mt((e=>{postMessage({cmd:be.workerFetch,type:Ae[r(1033)],value:e})})),te.init(),te[r(824)](),n[r(1157)]&&J[r(749)](),n.protocol===re[r(809)]){n[r(605)]&&(h=new sr(te[r(582)]())),c=new AbortController;const e=Object[r(1049)]({signal:c[r(588)]},{headers:n[r(695)]&&n[r(695)][r(407)]||{}});fetch(t,e)[r(328)]((e=>{const t=r;if(Yt(N))return te[t(313)](t(471),"request abort and run res.body.cancel()"),te[t(725)]=je[t(634)],void e[t(444)][t(780)]();if(!jt(e))return te[t(1022)](t(471),t(935)+e.status+" and ok is "+e.ok+t(591)),Y(),void postMessage({cmd:be.workerFetch,type:ke.fetchError,value:t(935)+e.status+" and ok is "+e.ok});if(postMessage({cmd:be[t(628)],type:Ae[t(814)]}),Ht())te.writableStream=new WritableStream({write:e=>{const r=t;return c&&c[r(588)]&&c[r(588)][r(842)]?(te.debugLog(r(471),r(403)),void(te[r(725)]=je[r(1222)])):Yt(N)?(te.debugLog("worker",r(1169)),te[r(725)]=je.complete,void Y()):void(typeof e!==r(734)?(te[r(725)]=je[r(514)],l(e[r(503)]),n[r(605)]?h[r(574)](e):n[r(1157)]?te.demuxFmp4(e):n[r(895)]?te[r(528)](e):n[r(565)]?te[r(1041)](e):n.isNakedFlow&&te[r(1107)](e)):te[r(1022)](r(471),'writableStream write() and value is "'+e+r(1136)))},close:()=>{const e=t;te[e(313)]("worker","writableStream close()"),te[e(725)]=je.complete,Y(),te[e(1079)][e(772)]?(h&&(h[e(573)](),h=null),postMessage({cmd:be.workerFetch,type:Ae[e(1070)],value:ne.fetch,msg:e(1229)})):postMessage({cmd:be[e(628)],type:Ae[e(675)]})},abort:e=>{const r=t;if(c&&c[r(588)]&&c[r(588)].aborted)return te[r(313)]("worker",r(594)),void(te[r(725)]=je[r(1222)]);h&&(h[r(573)](),h=null),e[r(502)]!==Ne[r(757)]?(te[r(313)]("worker",r(512)+e[r(943)]()),Y(),postMessage({cmd:be[r(628)],type:ke.fetchErrorWorker,value:e[r(943)]()})):te[r(313)]("worker",r(829))}}),e[t(444)][t(694)](te.writableStream)[t(414)]((e=>{const r=t;"AbortError"!==e[r(502)]&&te[r(313)](r(471),r(820),e[r(502)],e[r(943)]())}));else{const r=e[t(444)][t(450)](),i=()=>{const e=t;r.read()[e(328)]((t=>{const r=e;let{done:s,value:o}=t;return s?(te[r(313)](r(471),r(1083)),te[r(725)]=je.complete,Y(),void(te[r(1079)].checkStreamEnd?(h&&(h[r(573)](),h=null),postMessage({cmd:be[r(628)],type:Ae[r(1070)],value:ne[r(809)],msg:r(1229)})):postMessage({cmd:be[r(628)],type:Ae[r(675)]}))):c&&c[r(588)]&&c.signal[r(842)]?(te[r(313)]("worker",r(1148)),void(te.fetchStatus=je[r(1222)])):Yt(N)?(te[r(313)](r(471),r(784)),te[r(725)]=je[r(1222)],void Y()):void(typeof o!==r(734)?(te[r(725)]=je[r(514)],l(o[r(503)]),n[r(605)]?h[r(574)](o):n[r(1157)]?te[r(481)](o):n.isMpeg4?te.demuxMpeg4(o):n[r(565)]?te[r(1041)](o):n.isNakedFlow&&te.demuxNakedFlow(o),i()):te[r(1022)](r(471),r(317)+o+r(751)))}))[e(414)]((t=>{const r=e;if(c&&c[r(588)]&&c[r(588)][r(842)])return te.debugLog(r(471),r(435)),void(te[r(725)]=je[r(1222)]);h&&(h[r(573)](),h=null),t[r(502)]!==Ne.abort?(te.debugLog(r(471),r(1168)+t[r(943)]()),Y(),postMessage({cmd:be[r(628)],type:ke[r(1208)],value:t[r(943)]()})):te.debugLog(r(471),r(442))}))};i()}}))[r(414)]((e=>{const t=r;c&&c[t(588)]&&c[t(588)].aborted?te.debugLog(t(471),"fetch().catch() and abortController.signal.aborted is true so return"):e[t(502)]!==Ne.abort?(te.debugLog(t(471),"fetch().catch() and e is "+e[t(943)]()),Y(),postMessage({cmd:be[t(628)],type:ke[t(320)],value:e[t(943)]()}),h&&(h.close(),h=null)):te.debugLog(t(471),"fetch().catch() and e.name is AbortError so return")}))}else n.protocol===re[r(647)]&&(n[r(605)]&&(h=new sr(te[r(582)]())),u=new WebSocket(t,i),u[r(680)]=r(615),u[r(902)]=()=>{const e=r;te[e(313)]("worker",e(998)),te[e(437)]=Ce.open,te._stopCheckWsOpenTimeout(),postMessage({cmd:be.workerFetch,type:Ae[e(814)]}),postMessage({cmd:be[e(628)],type:Ae[e(803)]}),n[e(695)]&&n[e(695)][e(1110)]&&te[e(802)](n[e(695)][e(1110)])},u[r(363)]=e=>{const t=r;if(te[t(304)])return void te.debugLog(t(471),t(1121)+e[t(768)]+t(364));if(f)return void te[t(313)](t(471),"fetchStream, WebsocketStream socket close and code is "+e[t(768)]+t(948));if(te[t(313)](t(471),t(1121)+e[t(768)]),Yt(N))return void te[t(313)]("worker",t(421));let n=!1;1006===e[t(768)]&&(te[t(788)]("worker",t(673)+e.code),n=!0),te.socketStatus=Ce.close,te[t(1079)].checkStreamEnd||n?(h&&(h.close(),h=null),postMessage({cmd:be[t(628)],type:Ae.streamEnd,value:ne[t(647)],msg:e[t(768)]})):postMessage({cmd:be[t(628)],type:Ae[t(675)]})},u.onerror=e=>{const t=r;te[t(788)]("worker",t(395),e,e[t(943)]()),f=!0,te.socketStatus=Ce.error,h&&(h[t(573)](),h=null),te[t(304)]?te.debugLog("worker",t(884)):Yt(N)?te.debugLog(t(471),"fetchStream, WebsocketStream on error and requestAbort is true so return"):postMessage({cmd:be[t(628)],type:ke[t(1014)],value:e.isTrusted?t(1119):t(1158)})},u[r(376)]=e=>{const t=r;"string"!=typeof e[t(302)]?(l(e.data[t(503)]),n[t(605)]?h[t(574)](e[t(302)]):n[t(1157)]?te[t(481)](e.data):n[t(895)]?te[t(528)](e[t(302)]):te[t(1079)][t(773)]?te[t(1107)](e[t(302)]):te[t(1079)][t(565)]?te[t(1041)](e[t(302)]):te.demuxM7s(e[t(302)])):postMessage({cmd:be[t(1130)],value:e[t(302)]})})},demuxFlv:function*(){const t=e;yield 9;const r=new ArrayBuffer(4),n=new Uint8Array(r),i=new Uint32Array(r);for(;;){n[3]=0;const e=yield 15,r=e[4];n[0]=e[7],n[1]=e[6],n[2]=e[5];const s=i[0];n[0]=e[10],n[1]=e[9],n[2]=e[8],n[3]=e[11];let o=i[0];const a=(yield s)[t(428)]();switch(r){case Se[t(786)]:if(a[t(503)]>0){const e=te[t(871)](a);te.decode(e,{type:we[t(786)],ts:o})}else te[t(1022)](t(471),t(1238)+a[t(503)]+t(748));break;case Se[t(1181)]:if(a[t(503)]>=6){const e=a[0];if(te[t(335)](e))te._decodeEnhancedH265Video(a,o);else{const e=15&a[0];let r=a[0]>>4===We[t(988)];const n=e===Te[t(727)];if(t(374),Kt(r)&&Yt(Xt(a,n))&&(te[t(313)]("worker",t(400)),r=!0),r&&$t(a)&&null===te.isHevc){const e=15&a[0];te.isHevc=e===Te[t(727)],O=kt(a,te[t(551)]),te[t(313)](t(471),t(914)+te[t(551)]+" and nalUnitSize is "+O)}r&&te[t(486)](o),te[t(277)]&&te.calcNetworkDelay(o),i[0]=a[4],i[1]=a[3],i[2]=a[2],i[3]=0;let s=i[0],c=te[t(1031)](a,r);te[t(322)](c,{type:we[t(1181)],ts:o,isIFrame:r,cts:s})}}else te.debugWarn(t(471),t(1088)+a[t(503)]+t(748));break;case Se[t(703)]:postMessage({cmd:be[t(905)],buffer:a},[a[t(794)]]);break;default:te[t(313)](t(471),t(1015)+r)}}},decode:function(t,r){const n=e;r[n(630)]===we[n(786)]?te[n(1079)].hasAudio&&(postMessage({cmd:be[n(628)],type:Ae[n(869)],value:t[n(503)]}),te[n(277)]?te[n(1103)](t,{type:r.type,ts:r.ts,cts:r.cts}):te[n(993)]&&(te[n(1114)]()||(te[n(445)](),te[n(1103)](t,{type:r[n(630)],ts:r.ts,cts:r[n(926)]})))):r[n(630)]===we[n(1181)]&&te[n(1079)].hasVideo&&(postMessage({cmd:be[n(628)],type:Ae.streamVbps,value:t[n(503)]}),postMessage({cmd:be.workerFetch,type:Ae[n(511)],value:r.ts}),te.isPlayer?te[n(1103)](t,{type:r[n(630)],ts:r.ts,isIFrame:r.isIFrame,cts:r[n(926)]}):te[n(993)]&&(te[n(445)]()?te.pushBuffer(t,{type:r[n(630)],ts:r.ts,cts:r[n(926)],isIFrame:r[n(1071)]}):te[n(1114)]()?r.isIFrame&&te[n(1103)](t,{type:r.type,ts:r.ts,cts:r[n(926)],isIFrame:r.isIFrame}):te[n(1103)](t,{type:r[n(630)],ts:r.ts,cts:r[n(926)],isIFrame:r[n(1071)]})))},cryptoPayload:function(t,r){const n=e;let i=t;return te._opt.isM7sCrypto?te[n(1079)][n(532)]&&te[n(1079)][n(532)][n(503)]>0&&te._opt[n(501)]&&te[n(1079)].cryptoKey[n(503)]>0?i=yo(t,te[n(1079)].cryptoKey,te[n(1079)].cryptoIV,te[n(551)]):te[n(788)](n(471),n(1072)+(te[n(1079)][n(501)]&&te[n(1079)][n(501)][n(503)])+n(937)+(te[n(1079)].cryptoIV&&te[n(1079)][n(532)].byteLength)+n(457)):te[n(1079)].isSm4Crypto?te._opt[n(1078)]?i=te[n(1079)].cryptoIV&&te._opt.cryptoIV[n(503)]>0&&te[n(1079)][n(501)]&&te[n(1079)][n(501)][n(503)]>0?uc(t,te[n(1079)][n(501)],te[n(1079)][n(532)],te.isHevc,te[n(1079)].isSm4CryptoH265V2):Ko(t,te[n(1079)].sm4CryptoKey,te[n(551)],te[n(1079)][n(584)]):!te[n(1079)][n(1078)]&&te[n(788)](n(471),n(743)):te._opt[n(278)]&&(te[n(1079)].cryptoIV&&te._opt.cryptoIV[n(503)]>0&&te[n(1079)][n(501)]&&te[n(1079)][n(501)][n(503)]>0?i=ua(t,te[n(1079)][n(501)],te[n(1079)][n(532)],te[n(551)]):te[n(788)](n(471),"isXorCrypto cryptoKey.length is "+(te[n(1079)][n(501)]&&te[n(1079)].cryptoKey[n(503)])+" or cryptoIV.length is "+(te._opt.cryptoIV&&te[n(1079)][n(532)][n(503)])+" null")),i},cryptoPayloadAudio:function(t){const r=e;if(Kt(te._opt.isCryptoAudio))return t;let n=t;return te._opt[r(469)]?te[r(1079)][r(532)]&&te[r(1079)].cryptoIV[r(503)]>0&&te[r(1079)][r(501)]&&te[r(1079)][r(501)][r(503)]>0?t[0]>>4===De[r(870)]&&(n=_o(t,te[r(1079)].cryptoKey,te._opt[r(532)])):te[r(788)](r(471),r(1072)+(te[r(1079)][r(501)]&&te[r(1079)][r(501)].byteLength)+" or cryptoIV.length is "+(te[r(1079)].cryptoIV&&te[r(1079)][r(532)].byteLength)+r(457)):te[r(1079)][r(278)]&&(te[r(1079)][r(532)]&&te[r(1079)][r(532)].byteLength>0&&te[r(1079)][r(501)]&&te[r(1079)].cryptoKey[r(503)]>0?t[0]>>4===De[r(870)]&&(n=la(t,te._opt[r(501)],te[r(1079)][r(532)])):te.debugError(r(471),r(599)+(te[r(1079)].cryptoKey&&te[r(1079)].cryptoKey[r(503)])+r(937)+(te._opt.cryptoIV&&te[r(1079)].cryptoIV[r(503)])+r(457))),n},setCodecAudio:function(t,r){const n=e,s=t[0]>>4,o=t[0]>>1&1;if(z=s===De[n(870)]?o?16:8:0===o?8:16,oe&&oe[n(729)]||!Kt(i))if(ht(t)||s===De[n(737)]||s===De.MULAW||s===De.MP3){te[n(313)](n(471),n(1021)+s+n(350)+te[n(1079)].sampleRate);const e=s===De[n(870)]?t[n(428)](2):new Uint8Array(0);if(i){if(s===De[n(1217)])return void te.debugError(n(471),n(965));oe[n(348)]=te[n(1079)].sampleRate,oe[n(322)](t,r)}else oe.setCodec(s,te._opt[n(890)],e,te[n(738)]());if(s===De.AAC&&postMessage({cmd:be.audioAACSequenceHeader,buffer:e},[e.buffer]),y=!0,s!==De[n(870)]&&(s===De.MP3?(!te[n(821)]&&(te[n(821)]=new ia(te),te[n(821)].on(n(302),((e,t)=>{oe[n(322)](e,t)}))),te[n(821)][n(433)](t.slice(1),r)):oe[n(322)](t[n(428)](1),r)),Zt()){const e=Number("1")||1;setTimeout((()=>{const e=n;te[e(788)]("worker",e(1201)),te[e(573)](),postMessage({cmd:be[e(517)]})}),60*e*60*1e3)}}else te.debugWarn(n(471),n(424),s);else te.debugError("worker",n(1057))},decodeAudio:function(t,r){const s=e;if(te[s(304)])te.debugLog("worker","decodeAudio, decoder is destroyed and return");else if(te.isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio())ee[s(954)](t,r);else if(Yt(n)&&Yt(te[s(1079)][s(1039)]))postMessage({cmd:be[s(553)],payload:t,ts:r,cts:r},[t.buffer]);else{const e=t[0]>>4;if(y){if(ht(t))return void te[s(313)](s(471),s(755));i?oe[s(322)](t,r):e===De[s(1217)]?te.mp3Demuxer[s(433)](t[s(428)](1),r):oe[s(322)](e===De.AAC?t.slice(2):t.slice(1),r)}else te[s(825)](t,r)}},setCodecVideo:function(t,r){const n=e,s=15&t[0];if(ae&&ae.setCodec||!Kt(i))if($t(t))if(s===Te[n(374)]||s===Te[n(727)]){te[n(313)](n(471),n(975)+s);const e=t[n(428)](5);if(s===Te[n(374)]&&te[n(1079)][n(799)]){const t=Ir(e);if(t.codecWidth>me||t[n(893)]>me)return postMessage({cmd:be[n(754)],value:n(552)+t[n(465)]+n(904)+me+n(936)+t[n(893)]+n(904)+me}),void te[n(1022)]("worker",n(617)+t.codecWidth+n(568)+t[n(893)])}const r=new Uint8Array(t);v=!0,i?ae[n(322)](t,0):ae[n(729)](s,e,te[n(738)]()),postMessage({cmd:be.videoCode,code:s}),postMessage({cmd:be.videoCodec,buffer:r,codecId:s},[r[n(794)]])}else te.debugWarn("worker",n(637)+s+n(879));else te[n(1022)](n(471),n(1131)+s+n(375)+r+n(639)+t[1]);else te.debugError("worker",n(1091))},decodeVideo:function(t,r,s){const o=e;let a=arguments[o(885)]>3&&void 0!==arguments[3]?arguments[3]:0;if(te[o(304)])te[o(313)](o(471),"decodeVideo, decoder is destroyed and return");else if(te.isPlayUseMSEAndDecoderInWorker())ee.decodeVideo(t,r,s,a);else if(Yt(n))postMessage({cmd:be[o(956)],payload:t,isIFrame:s,ts:r,cts:a,delay:te[o(960)]},[t.buffer]);else if(v)if(!_&&s&&(_=!0),_){if(s&&$t(t)){const e=15&t[0];let r={};e===Te[o(374)]?r=Ir(t[o(428)](5)):e===Te[o(727)]&&(r=Zr(t)),r[o(465)]&&r[o(893)]&&p&&m&&(r[o(465)]!==p||r[o(893)]!==m)&&(te[o(1022)](o(471),o(406)+p+o(381)+m+o(365)+r.codecWidth+o(801)+r[o(893)]+",\n and emit change event"),R=!0,postMessage({cmd:be[o(906)],value:o(552)+p+"->"+r[o(465)]+o(936)+m+"->"+r[o(893)]}))}if(R)return void te[o(1022)]("worker","decodeVideo: video width or height is changed, and return");if(L)return void te.debugWarn(o(471),o(1126));if($t(t))return void te.debugLog(o(471),o(928));if(t[o(503)]0&&void 0!==arguments[0]&&arguments[0];te.debugLog(t(471),t(1062)+s.length+t(344)+r),r&&(s=[]),te[t(277)]&&(te[t(550)](),Yt(te[t(1079)].checkFirstIFrame)&&(te.dropping=!0,postMessage({cmd:be[t(1145)]}))),Yt(te[t(1079)][t(733)])&&Kt(n)&&(_=!1)},dropBuffer$2:function(){const t=e;if(s[t(885)]>0){let e=s[t(500)]((e=>{const r=t;return Yt(e.isIFrame)&&e[r(630)]===we[r(1181)]}));if(te.isAllIframeInBufferList())for(let r=0;r=te[t(996)]()){te[t(313)](t(471),t(1132)+r+t(688)+i+" and notDroppingDelayTs is "+te[t(996)]()),e=r;break}}if(e>=0){te.isPushDropping=!0,postMessage({cmd:be[t(1145)]});const r=s[t(885)];s=s.slice(e);const n=s.shift();te[t(550)](),te[t(397)](n.ts,n[t(630)]),te[t(332)](n),te.isPushDropping=!1,te[t(313)](t(471),t(880)+e+t(883)+r+t(765)+s[t(885)]+" and new delay is "+te.delay+" ")}else te[t(370)]=!1}0===s[t(885)]&&(te[t(370)]=!1)},demuxM7s:function(t){const r=e,n=new DataView(t),i=n[r(392)](1,!1),s=n[r(742)](0),o=new ArrayBuffer(4),a=new Uint32Array(o);switch(s){case we[r(786)]:const e=te[r(871)](new Uint8Array(t,5));te[r(322)](e,{type:we[r(786)],ts:i});break;case we.video:if(n[r(503)]>=11){const e=new Uint8Array(t,5),s=e[0];if(te._isEnhancedH265Header(s))te._decodeEnhancedH265Video(e,i);else{const t=n.getUint8(5)>>4==1;if(t&&(te[r(486)](i),$t(e)&&null===te[r(551)])){const t=15&e[0];te[r(551)]=t===Te[r(727)]}te.isPlayer&&te[r(707)](i),a[0]=e[4],a[1]=e[3],a[2]=e[2],a[3]=0;let s=a[0],o=te.cryptoPayload(e,t);te[r(322)](o,{type:we[r(1181)],ts:i,isIFrame:t,cts:s})}}else te[r(1022)](r(471),"demuxM7s() type is video and arrayBuffer length is "+t[r(503)]+r(748))}},demuxNakedFlow:function(t){K[e(433)](t)},demuxFmp4:function(t){J[e(433)](t)},demuxMpeg4:function(t){X[e(433)](t)},demuxTs:function(t){Z[e(433)](t)},_decodeEnhancedH265Video:function(t,r){const n=e,i=t[0],s=48&i,o=15&i,a=t.slice(1,5),c=new ArrayBuffer(4),u=new Uint32Array(c),l="a"==String[n(1183)](a[0]);if(te[n(551)]=Kt(l),o===$e[n(366)]){if(s===Ye[n(677)]){const e=t.slice(5);if(l);else{const i=new Uint8Array(5+e.length);i.set([28,0,0,0,0],0),i[n(1198)](e,5),O=kt(t,te[n(551)]),te[n(313)](n(471),n(497)+te[n(551)]+" and nalUnitSize is "+O),te.decode(i,{type:we[n(1181)],ts:r,isIFrame:!0,cts:0})}}}else if(o===$e.PACKET_TYPE_FRAMES){let e=t,i=0;const o=s===Ye.FT_KEY;o&&te[n(486)](r),l||(u[0]=t[4],u[1]=t[3],u[2]=t[2],u[3]=0,i=u[0],e=nn(t.slice(8),o),e=te.cryptoPayload(e,o),te[n(322)](e,{type:we[n(1181)],ts:r,isIFrame:o,cts:i}))}else if(o===$e[n(284)]){const e=s===Ye.FT_KEY;e&&te.calcIframeIntervalTimestamp(r);let i=nn(t.slice(5),e);i=te[n(1031)](i,e),te.decode(i,{type:we.video,ts:r,isIFrame:e,cts:0})}},_isEnhancedH265Header:function(e){return(e&qe)===qe},findSei:function(t,r){const n=e;let i=4;Ot(O)&&(i=O),It(t[n(428)](5),i)[n(343)]((e=>{const t=n,i=te[t(551)]?e[0]>>>1&63:31&e[0],s=te[t(551)]&&(i===Ue.suffixSei||i===Ue[t(859)]),o=Kt(te[t(551)])&&i===Pe[t(887)];if(s||o){const n=At(e,te[t(551)]);postMessage({cmd:be.videoSEI,buffer:n.payload,ts:r},[n.payload[t(794)]])}}))},calcNetworkDelay:function(t){const r=e;if(!(_&&t>0))return;null===I?(I=t,A=xt()):tn?i-n:0;if(te[r(657)]=s,s>te[r(1079)][r(657)]&&te[r(1079)][r(1008)]===ie[r(726)]){let e=!1;null===U&&(e=!0,U=xt());const o=xt();(o-U>=1e3||e)&&(te.debugWarn("worker","calcNetworkDelay now dts:"+t+r(1043)+I+" vs start is "+n+r(674)+i+r(315)+s),postMessage({cmd:be.workerFetch,type:Ae[r(1230)],value:s}),U=o)}},calcIframeIntervalTimestamp:function(t){null===B?B=t:B=te._opt.playbackForwardMaxRateDecodeIFrame&&!(te[t(1079)][t(506)]&&te._opt[t(1039)])},isPlayUseMSE:function(){const t=e;return te.isPlayer&&te[t(1079)][t(506)]&&Yt(n)},isPlayUseMSEAndDecoderInWorker:function(){const t=e;return te[t(1200)]()&&te[t(1079)][t(863)]},isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio:function(){return te[e(271)]()&&te._opt.mseDecodeAudio},playbackUpdatePlaybackRate:function(){},onOffscreenCanvasWebglContextLost:function(t){const r=e;te[r(788)]("worker",r(319)),t[r(299)](),F=!0,te[r(610)][r(758)](),te[r(610)]=null,te.offscreenCanvasGL=null,setTimeout((()=>{const e=r;te[e(404)]=te[e(312)][e(1016)](e(1098)),te.offscreenCanvasGL&&te[e(404)][e(507)]()[e(579)]?(te[e(610)]=Q(te.offscreenCanvasGL,te._opt[e(1104)]),F=!1):te[e(788)]("worker",e(1236))}),500)},onOffscreenCanvasWebglContextRestored:function(t){const r=e;te[r(313)]("worker",r(620)),t.preventDefault()},videoInfo:function(t,r,n){const i=e;postMessage({cmd:be.videoCode,code:t}),postMessage({cmd:be[i(270)],w:r,h:n}),p=r,m=n,te[i(635)]()&&(te[i(312)]=new OffscreenCanvas(r,n),te[i(404)]=te.offscreenCanvas[i(1016)](i(1098)),te[i(610)]=Q(te[i(404)],te[i(1079)][i(1104)]),te[i(312)][i(393)](i(1161),te.onOffscreenCanvasWebglContextLost,!1),te[i(312)][i(393)](i(1240),te[i(763)],!1))},audioInfo:function(t,r,n){const i=e;postMessage({cmd:be[i(898)],code:t}),postMessage({cmd:be[i(524)],sampleRate:r,channels:n,depth:z}),T=n},yuvData:function(r,n){const i=e;if(te[i(304)])return void te[i(313)]("worker",i(991));if(Kt(_))return void te.debugLog("worker",i(495));const s=p*m*3/2;try{let e=t[i(489)][i(1120)](r,r+s),o=new Uint8Array(e);if(k=null,b=n,te[i(635)]())try{if(F)return;te[i(610)][i(448)](p,m,o);let e=te.offscreenCanvas[i(687)]();postMessage({cmd:be[i(621)],buffer:e,delay:te.delay,ts:n},[e])}catch(e){te.debugError(i(471),"yuvData, transferToImageBitmap error is",e,e[i(943)]())}else postMessage({cmd:be.render,output:o,delay:te[i(960)],ts:n},[o[i(794)]])}catch(e){te.debugWarn(i(471),i(882)+n+" create uint8Array error :",e,e[i(943)]())}},pcmData:function(t,n,i){const s=e;if(te.isDestroyed)return void te.debugLog(s(471),"pcmData, decoder is destroyed and return");let a=n,c=[],u=0;try{let e=te[s(1079)][s(1028)];for(let e=0;e<2;e++){let n=r[s(398)][(t>>2)+e]>>2;c[e]=r.HEAPF32[s(1120)](n,n+a)}if(x){if(!(a>=(n=e-x)))return x+=a,o[0]=Float32Array.of(...o[0],...c[0]),void(2==T&&(o[1]=Float32Array.of(...o[1],...c[1])));E[0]=Float32Array.of(...o[0],...c[0][s(1120)](0,n)),2==T&&(E[1]=Float32Array.of(...o[1],...c[1][s(1120)](0,n))),postMessage({cmd:be[s(896)],buffer:E,ts:i},E[s(774)]((e=>e.buffer))),u=n,a-=n}for(x=a;x>=e;x-=e)E[0]=c[0][s(428)](u,u+=e),2==T&&(E[1]=c[1].slice(u-e,u)),postMessage({cmd:be[s(896)],buffer:E,ts:i},E.map((e=>e[s(794)])));x&&(o[0]=c[0][s(428)](u),2==T&&(o[1]=c[1][s(428)](u))),c=[]}catch(e){te.debugWarn("worker",s(609)+i+s(544),e,e[s(943)]())}},errorInfo:function(t){const r=e;null===k&&(k=xt());const n=xt(),i=Bt(C>0?2*C:5e3,1e3,5e3),s=n-k;s>i&&(te.debugWarn(r(471),"errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is "+C+r(549)+s+r(331)+i+"\n and replay"),L=!0,postMessage({cmd:be[r(746)]}))},sendWebsocketMessage:function(t){const r=e;u?u.readyState===xe[r(670)]?(te.debugLog("worker",r(724),t),u[r(431)](t)):te[r(788)](r(471),r(295),u[r(1215)]):te.debugError(r(471),r(338))},timeEnd(){const t=e;te.debugError(t(471),t(1201)),te.close(),postMessage({cmd:be.workerEnd})},postStreamToMain(t,r){const n=e;postMessage({cmd:be[n(644)],type:r,buffer:t},[t[n(794)]])},updatePlaybackIsPause(t){const r=e;te[r(313)](r(471),r(689)+t),te[r(1058)]=t,Yt(t)?te[r(979)]():te[r(886)]()},getBuildTime:()=>he+"-"+fe,validatedFailed(){const t=e;te[t(788)](t(471),t(354))},debugLog(t){const r=e;if(te._opt[r(1173)]&&te[r(1173)]){for(var n=arguments[r(885)],i=new Array(n>1?n-1:0),s=1;s1?n-1:0),s=1;s1?n-1:0),s=1;s>2,p=t,m=r,postMessage({cmd:be[n(270)],w:t,h:r}),te[n(635)]()&&(te[n(312)]=new OffscreenCanvas(t,r),te[n(404)]=te.offscreenCanvas.getContext(n(1098)),te[n(610)]=Q(te[n(404)],te._opt[n(1104)]),te[n(312)][n(393)](n(1161),te[n(957)],!1),te.offscreenCanvas[n(393)](n(1240),te[n(763)],!1))},initAudioPlanar:function(t,r){T=t,postMessage({cmd:be[e(524)],sampleRate:r,channels:t,depth:z})},playAudioPlanar:function(t,n,i){const s=e;if(te[s(304)])return void te.debugLog("worker","pcmData, decoder is destroyed and return");let a=n,c=[],u=0,l=te[s(1079)][s(1028)];for(let e=0;e<2;e++){let n=r.HEAPU32[(t>>2)+e]>>2;c[e]=r[s(655)].subarray(n,n+a)}if(x){if(!(a>=(n=l-x)))return x+=a,o[0]=Float32Array.of(...o[0],...c[0]),void(2==T&&(o[1]=Float32Array.of(...o[1],...c[1])));E[0]=Float32Array.of(...o[0],...c[0][s(1120)](0,n)),2==T&&(E[1]=Float32Array.of(...o[1],...c[1][s(1120)](0,n))),postMessage({cmd:be.playAudio,buffer:E,ts:i},E.map((e=>e[s(794)]))),u=n,a-=n}for(x=a;x>=l;x-=l)E[0]=c[0].slice(u,u+=l),2==T&&(E[1]=c[1].slice(u-l,u)),postMessage({cmd:be[s(896)],buffer:E,ts:i},E[s(774)]((e=>e[s(794)])));x&&(o[0]=c[0].slice(u),2==T&&(o[1]=c[1][s(428)](u))),c=[]},draw:function(r,n,i,s){const o=e;if(te[o(304)])return void te.debugLog(o(471),"draw, decoder is destroyed and return");const a=t[o(489)].subarray(n,n+V),c=t[o(489)][o(1120)](i,i+W),u=t[o(489)][o(1120)](s,s+W),l=new Uint8Array(V+W+W);if(l[o(1198)](a),l.set(c,V),l[o(1198)](u,V+W),k=null,b=r,te.useOffscreen())try{if(F)return;te[o(610)][o(448)](p,m,l);let e=te[o(312)][o(687)]();postMessage({cmd:be[o(621)],buffer:e,delay:te[o(960)],ts:r},[e])}catch(e){te[o(788)](o(471),o(826),e,e[o(943)]())}else postMessage({cmd:be[o(621)],output:l,delay:te[o(960)],ts:r},[l[o(794)]])}}));let oe=null;r[e(530)]&&(oe=new(r[e(530)])(te));let ae=null;t[e(1026)]&&(ae=new(t[e(1026)])(te)),postMessage({cmd:be[e(643)]}),self.onmessage=function(t){const r=e;let n=t[r(302)];switch(n[r(492)]){case Ie[r(643)]:try{te._opt=Object[r(1049)](te[r(1079)],JSON[r(438)](n[r(340)]))}catch(e){}te[r(313)]("worker",r(1019)+Ie[r(643)],n[r(340)]);break;case Ie.decode:te[r(1103)](n.buffer,n[r(695)]);break;case Ie[r(508)]:te.decodeAudio(n[r(794)],n.ts);break;case Ie.videoDecode:te.decodeVideo(n[r(794)],n.ts,n.isIFrame);break;case Ie[r(590)]:te[r(590)](n[r(423)]);break;case Ie[r(767)]:te[r(767)](n[r(1051)],JSON[r(438)](n[r(340)]),n[r(976)]);break;case Ie[r(573)]:te[r(313)](r(471),r(1019)+Ie[r(573)],JSON[r(468)](n[r(695)])),n[r(695)]&&Kt(n[r(695)].isVideoInited)&&(H=n[r(695)][r(341)]),te[r(573)]();break;case Ie[r(1002)]:te.debugLog(r(471),r(1019)+Ie.updateConfig,n[r(597)],n.value),te[r(1079)][n[r(597)]]=n[r(493)],n.key===r(927)&&(te[r(933)](),te[r(445)]()&&Kt(te.isPlaybackPause));break;case Ie.sendWsMessage:te[r(802)](n.message);break;case Ie[r(779)]:ee.$video[r(963)]=Number(n[r(646)]);break;case Ie[r(692)]:te[r(977)](n.isPause)}}}(e,e,!0)})).catch((e=>{var t=fc;console[t(406)](t(417),e,e[t(403)]())}))})); diff --git a/ui/decoder-pro-mt-worker.js b/ui/decoder-pro-mt-worker.js index 11f9c7c..0e64012 100644 --- a/ui/decoder-pro-mt-worker.js +++ b/ui/decoder-pro-mt-worker.js @@ -5,12 +5,12 @@ var Module = (() => { return ( async function(moduleArg = {}) { -var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var Module=typeof Module!="undefined"?Module:{};Module["locateFile"]=function(url){if(url=="decoder-pro-mt-worker.wasm"&&typeof JESSIBUCA_PRO_MT_WORKER_WASM_URL!="undefined"&&JESSIBUCA_PRO_MT_WORKER_WASM_URL!="")return JESSIBUCA_PRO_MT_WORKER_WASM_URL;else return url;if(url=="decoder-pro-mt-worker.worker.js"&&typeof JESSIBUCA_PRO_MT_WORKER_JS_URL!="undefined"&&JESSIBUCA_PRO_MT_WORKER_JS_URL!=""){return JESSIBUCA_PRO_MT_WORKER_JS_URL}else{return url}};var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var ENVIRONMENT_IS_PTHREAD=Module["ENVIRONMENT_IS_PTHREAD"]||false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_NODE){const{createRequire:createRequire}=await import("module");var require=createRequire(import.meta.url);var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=require("url").fileURLToPath(new URL("./",import.meta.url))}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror,binary=true)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,binary?undefined:"utf8",(err,data)=>{if(err)onerror(err);else onload(binary?data.buffer:data)})};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow};Module["inspect"]=()=>"[Emscripten Module object]";let nodeWorkerThreads;try{nodeWorkerThreads=require("worker_threads")}catch(e){console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?');throw e}global.Worker=nodeWorkerThreads.Worker}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}if(!ENVIRONMENT_IS_NODE){read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}if(ENVIRONMENT_IS_NODE){if(typeof performance=="undefined"){global.performance=require("perf_hooks").performance}}var defaultPrint=console.log.bind(console);var defaultPrintErr=console.error.bind(console);if(ENVIRONMENT_IS_NODE){defaultPrint=(...args)=>fs.writeSync(1,args.join(" ")+"\n");defaultPrintErr=(...args)=>fs.writeSync(2,args.join(" ")+"\n")}var out=Module["print"]||defaultPrint;var err=Module["printErr"]||defaultPrintErr;Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var wasmModule;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||268435456;assert(INITIAL_MEMORY>=65536,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+INITIAL_MEMORY+"! (STACK_SIZE="+65536+")");if(ENVIRONMENT_IS_PTHREAD){wasmMemory=Module["wasmMemory"]}else{if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":INITIAL_MEMORY/65536,"shared":true});if(!(wasmMemory.buffer instanceof SharedArrayBuffer)){err("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag");if(ENVIRONMENT_IS_NODE){err("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)")}throw Error("bad memory")}}}updateMemoryViews();INITIAL_MEMORY=wasmMemory.buffer.byteLength;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(ENVIRONMENT_IS_PTHREAD)return;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function postRun(){if(ENVIRONMENT_IS_PTHREAD)return;if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;if(Module["locateFile"]){wasmBinaryFile="decoder-pro-mt-worker.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}}else{wasmBinaryFile=new URL("decoder-pro-mt-worker.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(binaryFile)){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{if(!response["ok"]){throw"failed to load wasm binary file at '"+binaryFile+"'"}return response["arrayBuffer"]()}).catch(()=>getBinarySync(binaryFile))}else if(readAsync){return new Promise((resolve,reject)=>{readAsync(binaryFile,response=>resolve(new Uint8Array(response)),reject)})}}return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;registerTLSInit(wasmExports["V"]);wasmTable=wasmExports["T"];addOnInit(wasmExports["Q"]);wasmModule=module;removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"],result["module"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var tempDouble;var tempI64;function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}var terminateWorker=worker=>{worker.terminate();worker.onmessage=e=>{}};var killThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];delete PThread.pthreads[pthread_ptr];terminateWorker(worker);__emscripten_thread_free_data(pthread_ptr);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0};var cancelThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];worker.postMessage({"cmd":"cancel"})};var cleanupThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];assert(worker);PThread.returnWorkerToPool(worker)};var spawnThread=threadParams=>{var worker=PThread.getNewWorker();if(!worker){return 6}PThread.runningWorkers.push(worker);PThread.pthreads[threadParams.pthread_ptr]=worker;worker.pthread_ptr=threadParams.pthread_ptr;var msg={"cmd":"run","start_routine":threadParams.startRoutine,"arg":threadParams.arg,"pthread_ptr":threadParams.pthread_ptr};if(ENVIRONMENT_IS_NODE){worker.unref()}worker.postMessage(msg,threadParams.transferList);return 0};var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"))},join2:(l,r)=>PATH.normalize(l+"/"+r)};var initRandomFill=()=>{if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){return view=>(view.set(crypto.getRandomValues(new Uint8Array(view.byteLength))),view)}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");var randomFillSync=crypto_module["randomFillSync"];if(randomFillSync){return view=>crypto_module["randomFillSync"](view)}var randomBytes=crypto_module["randomBytes"];return view=>(view.set(randomBytes(view.byteLength)),view)}catch(e){}}abort("initRandomDevice")};var randomFill=view=>(randomFill=initRandomFill())(view);var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.buffer instanceof SharedArrayBuffer?heapOrArray.slice(idx,endPtr):heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var FS_stdin_getChar_buffer=[];var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;var fd=process.stdin.fd;try{bytesRead=fs.readSync(fd,buf)}catch(e){if(e.toString().includes("EOF"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}FS_stdin_getChar_buffer=intArrayFromString(result,true)}return FS_stdin_getChar_buffer.shift()};var TTY={ttys:[],init(){},shutdown(){},register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close(stream){stream.tty.ops.fsync(stream.tty)},fsync(stream){stream.tty.ops.fsync(stream.tty)},read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}},ioctl_tcgets(tty){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(tty,optional_actions,data){return 0},ioctl_tiocgwinsz(tty){return[24,80]}},default_tty1_ops:{put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var mmapAlloc=size=>{abort()};var MEMFS={ops_table:null,mount(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup(parent,name){throw FS.genericErrors[44]},mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{var dep=!noRunDep?getUniqueRunDependency(`al ${url}`):"";readAsync(url,arrayBuffer=>{assert(arrayBuffer,`Loading data file "${url}" failed (no arrayBuffer).`);onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw`Loading data file "${url}" failed.`}});if(dep)addRunDependency(dep)};var FS_createDataFile=(parent,name,fileData,canRead,canWrite,canOwn)=>FS.createDataFile(parent,name,fileData,canRead,canWrite,canOwn);var preloadPlugins=Module["preloadPlugins"]||[];var FS_handledByPreloadPlugin=(byteArray,fullname,finish,onerror)=>{if(typeof Browser!="undefined")Browser.init();var handled=false;preloadPlugins.forEach(plugin=>{if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,onerror);handled=true}});return handled};var FS_createPreloadedFile=(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(`cp ${fullname}`);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS_createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(FS_handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}};var FS_modeStringToFlags=str=>{var flagModes={"r":0,"r+":2,"w":512|64|1,"w+":512|64|2,"a":1024|64|1,"a+":1024|64|2};var flags=flagModes[str];if(typeof flags=="undefined"){throw new Error(`Unknown file open mode: ${str}`)}return flags};var FS_getMode=(canRead,canWrite)=>{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(path,opts={}){path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?`${mount}/${path}`:mount+path}path=path?`${node.name}/${path}`:node.name;node=node.parent}},hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode(node){FS.hashRemoveNode(node)},isRoot(node){return node===node.parent},isMountpoint(node){return!!node.mounted},isFile(mode){return(mode&61440)===32768},isDir(mode){return(mode&61440)===16384},isLink(mode){return(mode&61440)===40960},isChrdev(mode){return(mode&61440)===8192},isBlkdev(mode){return(mode&61440)===24576},isFIFO(mode){return(mode&61440)===4096},isSocket(mode){return(mode&49152)===49152},flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions(node,perms){if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup(dir){var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd(){for(var fd=0;fd<=FS.MAX_OPEN_FDS;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStreamChecked(fd){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}return stream},getStream:fd=>FS.streams[fd],createStream(stream,fd=-1){if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get(){return this.node},set(val){this.node=val}},isRead:{get(){return(this.flags&2097155)!==1}},isWrite:{get(){return(this.flags&2097155)!==0}},isAppend:{get(){return this.flags&1024}},flags:{get(){return this.shared.flags},set(val){this.shared.flags=val}},position:{get(){return this.shared.position},set(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);if(fd==-1){fd=FS.nextfd()}stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream(fd){FS.streams[fd]=null},chrdev_stream_ops:{open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek(){throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`)}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup(parent,name){return parent.node_ops.lookup(parent,name)},mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var i=0;i0,ioctl(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile(path,opts={}){opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error(`Invalid encoding type "${opts.encoding}"`)}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile(path,data,opts={}){opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var randomBuffer=new Uint8Array(1024),randomLeft=0;var randomByte=()=>{if(randomLeft===0){randomLeft=randomFill(randomBuffer).byteLength}return randomBuffer[--randomLeft]};FS.createDevice("/dev","random",randomByte);FS.createDevice("/dev","urandom",randomByte);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount(){var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup(parent,name){var fd=+name;var stream=FS.getStreamChecked(fd);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams(){if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},ensureErrnoError(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.name="ErrnoError";this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS}},init(input,output,error){FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit(){FS.init.initialized=false;for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,HEAP8,ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node}};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}HEAP32[buf>>2]=stat.dev;HEAP32[buf+4>>2]=stat.mode;HEAPU32[buf+8>>2]=stat.nlink;HEAP32[buf+12>>2]=stat.uid;HEAP32[buf+16>>2]=stat.gid;HEAP32[buf+20>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+24>>2]=tempI64[0],HEAP32[buf+28>>2]=tempI64[1];HEAP32[buf+32>>2]=4096;HEAP32[buf+36>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>2]=tempI64[0],HEAP32[buf+44>>2]=tempI64[1];HEAPU32[buf+48>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>2]=tempI64[0],HEAP32[buf+60>>2]=tempI64[1];HEAPU32[buf+64>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>2]=tempI64[0],HEAP32[buf+76>>2]=tempI64[1];HEAPU32[buf+80>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>2]=tempI64[0],HEAP32[buf+92>>2]=tempI64[1];return 0},doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get(){var ret=HEAP32[+SYSCALLS.varargs>>2];SYSCALLS.varargs+=4;return ret},getp(){return SYSCALLS.get()},getStr(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD(fd){var stream=FS.getStreamChecked(fd);return stream}};function _proc_exit(code){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(0,1,code);EXITSTATUS=code;if(!keepRuntimeAlive()){PThread.terminateAllThreads();if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))}var exitJS=(status,implicit)=>{EXITSTATUS=status;if(ENVIRONMENT_IS_PTHREAD){exitOnMainThread(status);throw"unwind"}_proc_exit(status)};var _exit=exitJS;var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var PThread={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){if(ENVIRONMENT_IS_PTHREAD){PThread.initWorker()}else{PThread.initMainThread()}},initMainThread(){addOnPreRun(()=>{addRunDependency("loading-workers");PThread.loadWasmModuleToAllWorkers(()=>removeRunDependency("loading-workers"))})},initWorker(){noExitRuntime=false},setExitStatus:status=>{EXITSTATUS=status},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var worker of PThread.runningWorkers){terminateWorker(worker)}for(var worker of PThread.unusedWorkers){terminateWorker(worker)}PThread.unusedWorkers=[];PThread.runningWorkers=[];PThread.pthreads=[]},returnWorkerToPool:worker=>{var pthread_ptr=worker.pthread_ptr;delete PThread.pthreads[pthread_ptr];PThread.unusedWorkers.push(worker);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0;__emscripten_thread_free_data(pthread_ptr)},receiveObjectTransfer(data){},threadInitTLS(){PThread.tlsInitFunctions.forEach(f=>f())},loadWasmModuleToWorker:worker=>new Promise(onFinishedLoading=>{worker.onmessage=e=>{var d=e["data"];var cmd=d["cmd"];if(d["targetThread"]&&d["targetThread"]!=_pthread_self()){var targetWorker=PThread.pthreads[d["targetThread"]];if(targetWorker){targetWorker.postMessage(d,d["transferList"])}else{err(`Internal error! Worker sent a message "${cmd}" to target pthread ${d["targetThread"]}, but that thread no longer exists!`)}return}if(cmd==="checkMailbox"){checkMailbox()}else if(cmd==="spawnThread"){spawnThread(d)}else if(cmd==="cleanupThread"){cleanupThread(d["thread"])}else if(cmd==="killThread"){killThread(d["thread"])}else if(cmd==="cancelThread"){cancelThread(d["thread"])}else if(cmd==="loaded"){worker.loaded=true;onFinishedLoading(worker)}else if(cmd==="alert"){alert(`Thread ${d["threadId"]}: ${d["text"]}`)}else if(d.target==="setimmediate"){worker.postMessage(d)}else if(cmd==="callHandler"){Module[d["handler"]](...d["args"])}else if(cmd){err(`worker sent an unknown command ${cmd}`)}};worker.onerror=e=>{var message="worker sent an error!";err(`${message} ${e.filename}:${e.lineno}: ${e.message}`);throw e};if(ENVIRONMENT_IS_NODE){worker.on("message",data=>worker.onmessage({data:data}));worker.on("error",e=>worker.onerror(e))}var handlers=[];var knownHandlers=["onExit","onAbort","print","printErr"];for(var handler of knownHandlers){if(Module.hasOwnProperty(handler)){handlers.push(handler)}}worker.postMessage({"cmd":"load","handlers":handlers,"urlOrBlob":Module["mainScriptUrlOrBlob"],"wasmMemory":wasmMemory,"wasmModule":wasmModule})}),loadWasmModuleToAllWorkers(onMaybeReady){onMaybeReady()},allocateUnusedWorker(){var worker;if(!Module["locateFile"]){worker=new Worker(new URL("decoder-pro-mt-worker.worker.js",import.meta.url))}else{var pthreadMainJs=locateFile("decoder-pro-mt-worker.worker.js");worker=new Worker(pthreadMainJs)}PThread.unusedWorkers.push(worker)},getNewWorker(){if(PThread.unusedWorkers.length==0){PThread.allocateUnusedWorker();PThread.loadWasmModuleToWorker(PThread.unusedWorkers[0])}return PThread.unusedWorkers.pop()}};Module["PThread"]=PThread;var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var establishStackSpace=()=>{var pthread_ptr=_pthread_self();var stackHigh=HEAPU32[pthread_ptr+52>>2];var stackSize=HEAPU32[pthread_ptr+56>>2];var stackLow=stackHigh-stackSize;_emscripten_stack_set_limits(stackHigh,stackLow);stackRestore(stackHigh)};Module["establishStackSpace"]=establishStackSpace;function exitOnMainThread(returnCode){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(1,0,returnCode);_exit(returnCode)}var wasmTableMirror=[];var wasmTable;var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};var invokeEntryPoint=(ptr,arg)=>{var result=getWasmTableEntry(ptr)(arg);function finish(result){if(keepRuntimeAlive()){PThread.setExitStatus(result)}else{__emscripten_thread_exit(result)}}finish(result)};Module["invokeEntryPoint"]=invokeEntryPoint;var registerTLSInit=tlsInitFunc=>{PThread.tlsInitFunctions.push(tlsInitFunc)};function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;var ___cxa_throw=(ptr,type,destructor)=>{var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw exceptionLast};var ___emscripten_init_main_thread_js=tb=>{__emscripten_thread_init(tb,!ENVIRONMENT_IS_WORKER,1,!ENVIRONMENT_IS_WEB,65536,false);PThread.threadInitTLS()};var ___emscripten_thread_cleanup=thread=>{if(!ENVIRONMENT_IS_PTHREAD)cleanupThread(thread);else postMessage({"cmd":"cleanupThread","thread":thread})};function pthreadCreateProxied(pthread_ptr,attr,startRoutine,arg){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(2,1,pthread_ptr,attr,startRoutine,arg);return ___pthread_create_js(pthread_ptr,attr,startRoutine,arg)}var ___pthread_create_js=(pthread_ptr,attr,startRoutine,arg)=>{if(typeof SharedArrayBuffer=="undefined"){err("Current environment does not support SharedArrayBuffer, pthreads are not available!");return 6}var transferList=[];var error=0;if(ENVIRONMENT_IS_PTHREAD&&(transferList.length===0||error)){return pthreadCreateProxied(pthread_ptr,attr,startRoutine,arg)}if(error)return error;var threadParams={startRoutine:startRoutine,pthread_ptr:pthread_ptr,arg:arg,transferList:transferList};if(ENVIRONMENT_IS_PTHREAD){threadParams.cmd="spawnThread";postMessage(threadParams,transferList);return 0}return spawnThread(threadParams)};var setErrNo=value=>{HEAP32[___errno_location()>>2]=value;return value};function ___syscall_fcntl64(fd,cmd,varargs){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(3,1,fd,cmd,varargs);SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}while(FS.streams[arg]){arg++}var newStream;newStream=FS.createStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 5:{var arg=SYSCALLS.getp();var offset=0;HEAP16[arg+offset>>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(4,1,dirfd,path,flags,varargs);SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;var throwInternalError=message=>{throw new InternalError(message)};var whenDependentTypesAreResolved=(myTypes,dependentTypes,getTypeConverters)=>{myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i{if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(()=>{typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}};function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type "${name}" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":function(pointer){return this["fromWireType"](HEAPU8[pointer])},destructorFunction:null})};var shallowCopyInternalPointer=o=>({count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType});var throwInstanceAlreadyDeleted=obj=>{function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")};var finalizationRegistry=false;var detachFinalizer=handle=>{};var runDestructor=$$=>{if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}};var releaseClassHandle=$$=>{$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}};var downcastPointer=(ptr,ptrClass,desiredClass)=>{if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)};var registeredPointers={};var getInheritedInstanceCount=()=>Object.keys(registeredInstances).length;var getLiveInheritedInstances=()=>{var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv};var deletionQueue=[];var flushPendingDeletes=()=>{while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}};var delayFunction;var setDelayFunction=fn=>{delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}};var init_embind=()=>{Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction};var registeredInstances={};var getBasestPointer=(class_,ptr)=>{if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr};var getInheritedInstance=(class_,ptr)=>{ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]};var makeClassHandle=(prototype,record)=>{if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))};function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}var attachFinalizer=handle=>{if("undefined"===typeof FinalizationRegistry){attachFinalizer=handle=>handle;return handle}finalizationRegistry=new FinalizationRegistry(info=>{releaseClassHandle(info.$$)});attachFinalizer=handle=>{var $$=handle.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$:$$};finalizationRegistry.register(handle,info,handle)}return handle};detachFinalizer=handle=>finalizationRegistry.unregister(handle);return attachFinalizer(handle)};var init_ClassHandle=()=>{Object.assign(ClassHandle.prototype,{"isAliasOf"(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;other.$$=other.$$;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right},"clone"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}},"delete"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}},"isDeleted"(){return!this.$$.ptr},"deleteLater"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}})};function ClassHandle(){}var char_0=48;var char_9=57;var makeLegalFunctionName=name=>{if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return`_${name}`}return name};function createNamedFunction(name,body){name=makeLegalFunctionName(name);return{[name]:function(){return body.apply(this,arguments)}}[name]}var ensureOverloadTable=(proto,methodName,humanName)=>{if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError(`Function '${humanName}' called with an invalid number of arguments (${arguments.length}) - expects one of (${proto[methodName].overloadTable})!`)}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}};var exposePublicSymbol=(name,value,numArguments)=>{if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError(`Cannot register public name '${name}' twice`)}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError(`Cannot register multiple overloads of a function with the same number of arguments (${numArguments})!`)}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}};function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}var upcastPointer=(ptr,ptrClass,desiredClass)=>{while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError(`Expected null or instance of ${desiredClass.name}, got an instance of ${ptrClass.name}`)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr};function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(()=>clonedHandle["delete"]()));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function readPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}var init_RegisteredPointer=()=>{Object.assign(RegisteredPointer.prototype,{getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr},destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":readPointer,"deleteObject"(handle){if(handle!==null){handle["delete"]()}},"fromWireType":RegisteredPointer_fromWireType})};function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}var replacePublicSymbol=(name,value,numArguments)=>{if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}};var dynCallLegacy=(sig,ptr,args)=>{var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)};var dynCall=(sig,ptr,args)=>{if(sig.includes("j")){return dynCallLegacy(sig,ptr,args)}var rtn=getWasmTableEntry(ptr).apply(null,args);return rtn};var getDynCaller=(sig,ptr)=>{var argCache=[];return function(){argCache.length=0;Object.assign(argCache,arguments);return dynCall(sig,ptr,argCache)}};var embind__requireFunction=(signature,rawFunction)=>{signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes("j")){return getDynCaller(signature,rawFunction)}return getWasmTableEntry(rawFunction)}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError(`unknown function pointer with signature ${signature}: ${rawFunction}`)}return fp};var extendError=(baseErrorType,errorName)=>{var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return`${this.name}: ${this.message}`}};return errorClass};var UnboundTypeError;var getTypeName=type=>{var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv};var throwUnboundTypeError=(message,types)=>{var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(`${message}: `+unboundTypes.map(getTypeName).join([", "]))};var __embind_register_class=(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor)=>{name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError(`Cannot construct ${name} due to unbound types`,[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError("Use 'new' to construct "+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+" has no accessible constructor")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError(`Tried to invoke ctor of ${name} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(registeredClass.constructor_body).toString()}) parameters instead!`)}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);if(registeredClass.baseClass){if(registeredClass.baseClass.__derivedClasses===undefined){registeredClass.baseClass.__derivedClasses=[]}registeredClass.baseClass.__derivedClasses.push(registeredClass)}var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})};var heap32VectorToArray=(count,firstElement)=>{var array=[];for(var i=0;i>2])}return array};var runDestructors=destructors=>{while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}};function newFunc(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError(`new_ called with constructor type ${typeof constructor} which is not a function`)}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc,isAsync){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i0?", ":"")+argsListWired}invokerFnBody+=(returns||isAsync?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i{var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=`constructor ${classType.name}`;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError(`Cannot register multiple constructors with identical number of parameters (${argCount-1}) for class '${classType.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`)}classType.registeredClass.constructor_body[argCount-1]=()=>{throwUnboundTypeError(`Cannot construct ${classType.name} due to unbound types`,rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,argTypes=>{argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})};var __embind_register_class_function=(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual,isAsync)=>{var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=`${classType.name}.${methodName}`;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError(`Cannot call ${humanName} due to unbound types`,rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context,isAsync);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module["count_emval_handles"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":(destructors,value)=>Emval.toHandle(value),"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})};var embindRepr=v=>{if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":value=>value,"toWireType":(destructors,value)=>value,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.slice(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,"fromWireType":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":(destructors,value)=>{if(!(typeof value=="string")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":()=>undefined,"toWireType":(destructors,o)=>undefined})};var maybeExit=()=>{if(!keepRuntimeAlive()){try{if(ENVIRONMENT_IS_PTHREAD)__emscripten_thread_exit(EXITSTATUS);else _exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var __emscripten_thread_mailbox_await=pthread_ptr=>{if(typeof Atomics.waitAsync==="function"){var wait=Atomics.waitAsync(HEAP32,pthread_ptr>>2,pthread_ptr);wait.value.then(checkMailbox);var waitingAsync=pthread_ptr+128;Atomics.store(HEAP32,waitingAsync>>2,1)}};Module["__emscripten_thread_mailbox_await"]=__emscripten_thread_mailbox_await;var checkMailbox=()=>{var pthread_ptr=_pthread_self();if(pthread_ptr){__emscripten_thread_mailbox_await(pthread_ptr);callUserCallback(()=>__emscripten_check_mailbox())}};Module["checkMailbox"]=checkMailbox;var __emscripten_notify_mailbox_postmessage=(targetThreadId,currThreadId,mainThreadId)=>{if(targetThreadId==currThreadId){setTimeout(()=>checkMailbox())}else if(ENVIRONMENT_IS_PTHREAD){postMessage({"targetThread":targetThreadId,"cmd":"checkMailbox"})}else{var worker=PThread.pthreads[targetThreadId];if(!worker){return}worker.postMessage({"cmd":"checkMailbox"})}};var withStackSave=f=>{var stack=stackSave();var ret=f();stackRestore(stack);return ret};var proxyToMainThread=function(index,sync){var numCallArgs=arguments.length-2;var outerArgs=arguments;return withStackSave(()=>{var serializedNumCallArgs=numCallArgs;var args=stackAlloc(serializedNumCallArgs*8);var b=args>>3;for(var i=0;i{proxiedJSCallArgs.length=numCallArgs;var b=args>>3;for(var i=0;i{if(ENVIRONMENT_IS_NODE){PThread.pthreads[thread].ref()}};var emval_symbols={};var getStringOrSymbol=address=>{var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}return symbol};var emval_methodCallers=[];var __emval_call_void_method=(caller,handle,methodName,args)=>{caller=emval_methodCallers[caller];handle=Emval.toValue(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)};var emval_addMethodCaller=caller=>{var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id};var requireRegisteredType=(rawType,humanName)=>{var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl};var emval_lookupTypes=(argCount,argTypes)=>{var a=new Array(argCount);for(var i=0;i>2],"parameter "+i)}return a};var emval_registeredMethods={};var __emval_get_method_caller=(argCount,argTypes)=>{var types=emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+"_$"+types.slice(1).map(function(t){return t.name}).join("_")+"$";var returnId=emval_registeredMethods[signatureName];if(returnId!==undefined){return returnId}var params=["retType"];var args=[retType];var argsList="";for(var i=0;i{abort("")};var warnOnce=text=>{if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;if(ENVIRONMENT_IS_NODE)text="warning: "+text;err(text)}};var _emscripten_check_blocking_allowed=()=>{};var _emscripten_date_now=()=>Date.now();var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};var _emscripten_exit_with_live_runtime=()=>{runtimeKeepalivePush();throw"unwind"};var getHeapMax=()=>HEAPU8.length;var _emscripten_get_heap_max=()=>getHeapMax();var _emscripten_get_now;_emscripten_get_now=()=>performance.timeOrigin+performance.now();var _emscripten_num_logical_cores=()=>{if(ENVIRONMENT_IS_NODE)return require("os").cpus().length;return navigator["hardwareConcurrency"]};var abortOnCannotGrowMemory=requestedSize=>{abort("OOM")};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;abortOnCannotGrowMemory(requestedSize)};var ENV={};var getExecutableName=()=>thisProgram||"./this.program";var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings};var stringToAscii=(str,buffer)=>{for(var i=0;i>0]=str.charCodeAt(i)}HEAP8[buffer>>0]=0};var _environ_get=function(__environ,environ_buf){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(5,1,__environ,environ_buf);var bufSize=0;getEnvStrings().forEach((string,i)=>{var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>2]=ptr;stringToAscii(string,ptr);bufSize+=string.length+1});return 0};var _environ_sizes_get=function(penviron_count,penviron_buf_size){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(6,1,penviron_count,penviron_buf_size);var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(string=>bufSize+=string.length+1);HEAPU32[penviron_buf_size>>2]=bufSize;return 0};function _fd_close(fd){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(7,1,fd);try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_fdstat_get(fd,pbuf){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(8,1,fd,pbuf);try{var rightsBase=0;var rightsInheriting=0;var flags=0;{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4}HEAP8[pbuf>>0]=type;HEAP16[pbuf+2>>1]=flags;tempI64=[rightsBase>>>0,(tempDouble=rightsBase,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[pbuf+8>>2]=tempI64[0],HEAP32[pbuf+12>>2]=tempI64[1];tempI64=[rightsInheriting>>>0,(tempDouble=rightsInheriting,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[pbuf+16>>2]=tempI64[0],HEAP32[pbuf+20>>2]=tempI64[1];return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doReadv=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var convertI32PairToI53Checked=(lo,hi)=>hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;function _fd_seek(fd,offset_low,offset_high,whence,newOffset){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(10,1,fd,offset_low,offset_high,whence,newOffset);var offset=convertI32PairToI53Checked(offset_low,offset_high);try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>2]=tempI64[0],HEAP32[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doWritev=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret};function _fd_write(fd,iov,iovcnt,pnum){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(11,1,fd,iov,iovcnt,pnum);try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}PThread.init();var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.createPreloadedFile=FS_createPreloadedFile;FS.staticInit();embind_init_charCodes();BindingError=Module["BindingError"]=class BindingError extends Error{constructor(message){super(message);this.name="BindingError"}};InternalError=Module["InternalError"]=class InternalError extends Error{constructor(message){super(message);this.name="InternalError"}};init_ClassHandle();init_embind();init_RegisteredPointer();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");handleAllocatorInit();init_emval();var proxiedFunctionTable=[_proc_exit,exitOnMainThread,pthreadCreateProxied,___syscall_fcntl64,___syscall_openat,_environ_get,_environ_sizes_get,_fd_close,_fd_fdstat_get,_fd_read,_fd_seek,_fd_write];var wasmImports={t:___cxa_throw,H:___emscripten_init_main_thread_js,l:___emscripten_thread_cleanup,C:___pthread_create_js,O:___syscall_fcntl64,F:___syscall_openat,w:__embind_register_bigint,r:__embind_register_bool,E:__embind_register_class,v:__embind_register_class_constructor,f:__embind_register_class_function,P:__embind_register_emval,q:__embind_register_float,d:__embind_register_integer,c:__embind_register_memory_view,p:__embind_register_std_string,i:__embind_register_std_wstring,s:__embind_register_void,y:__emscripten_notify_mailbox_postmessage,D:__emscripten_receive_on_main_thread_js,G:__emscripten_thread_mailbox_await,M:__emscripten_thread_set_strongref,h:__emval_call_void_method,k:__emval_decref,j:__emval_get_method_caller,b:_abort,m:_emscripten_check_blocking_allowed,g:_emscripten_date_now,L:_emscripten_exit_with_live_runtime,z:_emscripten_get_heap_max,e:_emscripten_get_now,A:_emscripten_num_logical_cores,x:_emscripten_resize_heap,J:_environ_get,K:_environ_sizes_get,B:_exit,o:_fd_close,I:_fd_fdstat_get,N:_fd_read,u:_fd_seek,n:_fd_write,a:wasmMemory||Module["wasmMemory"]};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["Q"])();var _free=a0=>(_free=wasmExports["R"])(a0);var _malloc=a0=>(_malloc=wasmExports["S"])(a0);var ___errno_location=()=>(___errno_location=wasmExports["U"])();var __emscripten_tls_init=Module["__emscripten_tls_init"]=()=>(__emscripten_tls_init=Module["__emscripten_tls_init"]=wasmExports["V"])();var _pthread_self=Module["_pthread_self"]=()=>(_pthread_self=Module["_pthread_self"]=wasmExports["W"])();var ___getTypeName=a0=>(___getTypeName=wasmExports["X"])(a0);var __embind_initialize_bindings=Module["__embind_initialize_bindings"]=()=>(__embind_initialize_bindings=Module["__embind_initialize_bindings"]=wasmExports["Y"])();var __emscripten_thread_init=Module["__emscripten_thread_init"]=(a0,a1,a2,a3,a4,a5)=>(__emscripten_thread_init=Module["__emscripten_thread_init"]=wasmExports["Z"])(a0,a1,a2,a3,a4,a5);var __emscripten_thread_crashed=Module["__emscripten_thread_crashed"]=()=>(__emscripten_thread_crashed=Module["__emscripten_thread_crashed"]=wasmExports["_"])();var _emscripten_main_thread_process_queued_calls=()=>(_emscripten_main_thread_process_queued_calls=wasmExports["emscripten_main_thread_process_queued_calls"])();var _emscripten_main_runtime_thread_id=()=>(_emscripten_main_runtime_thread_id=wasmExports["emscripten_main_runtime_thread_id"])();var __emscripten_run_on_main_thread_js=(a0,a1,a2,a3)=>(__emscripten_run_on_main_thread_js=wasmExports["$"])(a0,a1,a2,a3);var __emscripten_thread_free_data=a0=>(__emscripten_thread_free_data=wasmExports["aa"])(a0);var __emscripten_thread_exit=Module["__emscripten_thread_exit"]=a0=>(__emscripten_thread_exit=Module["__emscripten_thread_exit"]=wasmExports["ba"])(a0);var __emscripten_check_mailbox=Module["__emscripten_check_mailbox"]=()=>(__emscripten_check_mailbox=Module["__emscripten_check_mailbox"]=wasmExports["ca"])();var _emscripten_stack_set_limits=(a0,a1)=>(_emscripten_stack_set_limits=wasmExports["da"])(a0,a1);var stackSave=()=>(stackSave=wasmExports["ea"])();var stackRestore=a0=>(stackRestore=wasmExports["fa"])(a0);var stackAlloc=a0=>(stackAlloc=wasmExports["ga"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports["ha"])(a0);var dynCall_jiji=Module["dynCall_jiji"]=(a0,a1,a2,a3,a4)=>(dynCall_jiji=Module["dynCall_jiji"]=wasmExports["ia"])(a0,a1,a2,a3,a4);var _ff_h264_cabac_tables=Module["_ff_h264_cabac_tables"]=111845;Module["keepRuntimeAlive"]=keepRuntimeAlive;Module["wasmMemory"]=wasmMemory;Module["ExitStatus"]=ExitStatus;Module["PThread"]=PThread;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}if(ENVIRONMENT_IS_PTHREAD){readyPromiseResolve(Module);initRuntime();startWorker(Module);return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); +function GROWABLE_HEAP_I8(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAP8}function GROWABLE_HEAP_U8(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAPU8}function GROWABLE_HEAP_I16(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAP16}function GROWABLE_HEAP_U16(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAPU16}function GROWABLE_HEAP_I32(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAP32}function GROWABLE_HEAP_U32(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAPU32}function GROWABLE_HEAP_F32(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAPF32}function GROWABLE_HEAP_F64(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAPF64}var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var Module=typeof Module!="undefined"?Module:{};Module["locateFile"]=function(url,scriptDirectory){if(url=="decoder-pro-mt-worker.wasm"){if(typeof JESSIBUCA_PRO_MT_WORKER_WASM_URL!="undefined"&&JESSIBUCA_PRO_MT_WORKER_WASM_URL!=""){return JESSIBUCA_PRO_MT_WORKER_WASM_URL}else{return scriptDirectory+url}}else if(url=="decoder-pro-mt-worker.worker.js"){if(typeof JESSIBUCA_PRO_MT_WORKER_JS_URL!="undefined"&&JESSIBUCA_PRO_MT_WORKER_JS_URL!=""){return JESSIBUCA_PRO_MT_WORKER_JS_URL}else{return scriptDirectory+url}}else{return scriptDirectory+url}};var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var ENVIRONMENT_IS_PTHREAD=Module["ENVIRONMENT_IS_PTHREAD"]||false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_NODE){const{createRequire:createRequire}=await import("module");var require=createRequire(import.meta.url);var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=require("url").fileURLToPath(new URL("./",import.meta.url))}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror,binary=true)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,binary?undefined:"utf8",(err,data)=>{if(err)onerror(err);else onload(binary?data.buffer:data)})};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow};Module["inspect"]=()=>"[Emscripten Module object]";let nodeWorkerThreads;try{nodeWorkerThreads=require("worker_threads")}catch(e){console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?');throw e}global.Worker=nodeWorkerThreads.Worker}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}if(!ENVIRONMENT_IS_NODE){read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}if(ENVIRONMENT_IS_NODE){if(typeof performance=="undefined"){global.performance=require("perf_hooks").performance}}var defaultPrint=console.log.bind(console);var defaultPrintErr=console.error.bind(console);if(ENVIRONMENT_IS_NODE){defaultPrint=(...args)=>fs.writeSync(1,args.join(" ")+"\n");defaultPrintErr=(...args)=>fs.writeSync(2,args.join(" ")+"\n")}var out=Module["print"]||defaultPrint;var err=Module["printErr"]||defaultPrintErr;Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var wasmModule;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||268435456;if(ENVIRONMENT_IS_PTHREAD){wasmMemory=Module["wasmMemory"]}else{if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":536870912/65536,"shared":true});if(!(wasmMemory.buffer instanceof SharedArrayBuffer)){err("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag");if(ENVIRONMENT_IS_NODE){err("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)")}throw Error("bad memory")}}}updateMemoryViews();INITIAL_MEMORY=wasmMemory.buffer.byteLength;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(ENVIRONMENT_IS_PTHREAD)return;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;TTY.init();callRuntimeCallbacks(__ATINIT__)}function postRun(){if(ENVIRONMENT_IS_PTHREAD)return;if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";var isDataURI=filename=>filename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");var wasmBinaryFile;if(Module["locateFile"]){wasmBinaryFile="decoder-pro-mt-worker.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}}else{wasmBinaryFile=new URL("decoder-pro-mt-worker.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(binaryFile)){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{if(!response["ok"]){throw"failed to load wasm binary file at '"+binaryFile+"'"}return response["arrayBuffer"]()}).catch(()=>getBinarySync(binaryFile))}else if(readAsync){return new Promise((resolve,reject)=>{readAsync(binaryFile,response=>resolve(new Uint8Array(response)),reject)})}}return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;registerTLSInit(wasmExports["Y"]);wasmTable=wasmExports["$"];addOnInit(wasmExports["T"]);wasmModule=module;removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"],result["module"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}var tempDouble;var tempI64;function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}var terminateWorker=worker=>{worker.terminate();worker.onmessage=e=>{}};var killThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];delete PThread.pthreads[pthread_ptr];terminateWorker(worker);__emscripten_thread_free_data(pthread_ptr);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0};var cancelThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];worker.postMessage({"cmd":"cancel"})};var cleanupThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];PThread.returnWorkerToPool(worker)};var spawnThread=threadParams=>{var worker=PThread.getNewWorker();if(!worker){return 6}PThread.runningWorkers.push(worker);PThread.pthreads[threadParams.pthread_ptr]=worker;worker.pthread_ptr=threadParams.pthread_ptr;var msg={"cmd":"run","start_routine":threadParams.startRoutine,"arg":threadParams.arg,"pthread_ptr":threadParams.pthread_ptr};if(ENVIRONMENT_IS_NODE){worker.unref()}worker.postMessage(msg,threadParams.transferList);return 0};var runtimeKeepaliveCounter=0;var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var PATH={isAbs:path=>path.charAt(0)==="/",splitPath:filename=>{var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1)},normalizeArray:(parts,allowAboveRoot)=>{var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up;up--){parts.unshift("..")}}return parts},normalize:path=>{var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(p=>!!p),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path},dirname:path=>{var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return"."}if(dir){dir=dir.substr(0,dir.length-1)}return root+dir},basename:path=>{if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1)},join:function(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"))},join2:(l,r)=>PATH.normalize(l+"/"+r)};var initRandomFill=()=>{if(typeof crypto=="object"&&typeof crypto["getRandomValues"]=="function"){return view=>(view.set(crypto.getRandomValues(new Uint8Array(view.byteLength))),view)}else if(ENVIRONMENT_IS_NODE){try{var crypto_module=require("crypto");var randomFillSync=crypto_module["randomFillSync"];if(randomFillSync){return view=>crypto_module["randomFillSync"](view)}var randomBytes=crypto_module["randomBytes"];return view=>(view.set(randomBytes(view.byteLength)),view)}catch(e){}}abort("initRandomDevice")};var randomFill=view=>(randomFill=initRandomFill())(view);var PATH_FS={resolve:function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){return""}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path)}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(p=>!!p),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."},relative:(from,to)=>{from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.buffer instanceof SharedArrayBuffer?heapOrArray.slice(idx,endPtr):heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var FS_stdin_getChar_buffer=[];var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};function intArrayFromString(stringy,dontAddNull,length){var len=length>0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array}var FS_stdin_getChar=()=>{if(!FS_stdin_getChar_buffer.length){var result=null;if(ENVIRONMENT_IS_NODE){var BUFSIZE=256;var buf=Buffer.alloc(BUFSIZE);var bytesRead=0;var fd=process.stdin.fd;try{bytesRead=fs.readSync(fd,buf)}catch(e){if(e.toString().includes("EOF"))bytesRead=0;else throw e}if(bytesRead>0){result=buf.slice(0,bytesRead).toString("utf-8")}else{result=null}}else if(typeof window!="undefined"&&typeof window.prompt=="function"){result=window.prompt("Input: ");if(result!==null){result+="\n"}}else if(typeof readline=="function"){result=readline();if(result!==null){result+="\n"}}if(!result){return null}FS_stdin_getChar_buffer=intArrayFromString(result,true)}return FS_stdin_getChar_buffer.shift()};var TTY={ttys:[],init(){},shutdown(){},register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops)},stream_ops:{open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43)}stream.tty=tty;stream.seekable=false},close(stream){stream.tty.ops.fsync(stream.tty)},fsync(stream){stream.tty.ops.fsync(stream.tty)},read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60)}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[]}},ioctl_tcgets(tty){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets(tty,optional_actions,data){return 0},ioctl_tiocgwinsz(tty){return[24,80]}},default_tty1_ops:{put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[]}else{if(val!=0)tty.output.push(val)}},fsync(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[]}}}};var mmapAlloc=size=>{abort()};var MEMFS={ops_table:null,mount(mount){return MEMFS.createNode(null,"/",16384|511,0)},createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63)}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}}}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={}}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp}return node},getFileDataAsTypedArray(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents)},expandFileStorage(node,newCapacity){var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0)},resizeFileStorage(node,newSize){if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)))}node.usedBytes=newSize}},node_ops:{getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096}else if(FS.isFile(node.mode)){attr.size=node.usedBytes}else if(FS.isLink(node.mode)){attr.size=node.link.length}else{attr.size=0}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr},setattr(node,attr){if(attr.mode!==undefined){node.mode=attr.mode}if(attr.timestamp!==undefined){node.timestamp=attr.timestamp}if(attr.size!==undefined){MEMFS.resizeFileStorage(node,attr.size)}},lookup(parent,name){throw FS.genericErrors[44]},mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev)},rename(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name)}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55)}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir},unlink(parent,name){delete parent.contents[name];parent.timestamp=Date.now()},rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55)}delete parent.contents[name];parent.timestamp=Date.now()},readdir(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue}entries.push(key)}return entries},symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node},readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28)}return node.link}},stream_ops:{read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset)}else{for(var i=0;i0||position+length{var dep=!noRunDep?getUniqueRunDependency(`al ${url}`):"";readAsync(url,arrayBuffer=>{assert(arrayBuffer,`Loading data file "${url}" failed (no arrayBuffer).`);onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency(dep)},event=>{if(onerror){onerror()}else{throw`Loading data file "${url}" failed.`}});if(dep)addRunDependency(dep)};var FS_createDataFile=(parent,name,fileData,canRead,canWrite,canOwn)=>{FS.createDataFile(parent,name,fileData,canRead,canWrite,canOwn)};var preloadPlugins=Module["preloadPlugins"]||[];var FS_handledByPreloadPlugin=(byteArray,fullname,finish,onerror)=>{if(typeof Browser!="undefined")Browser.init();var handled=false;preloadPlugins.forEach(plugin=>{if(handled)return;if(plugin["canHandle"](fullname)){plugin["handle"](byteArray,fullname,finish,onerror);handled=true}});return handled};var FS_createPreloadedFile=(parent,name,url,canRead,canWrite,onload,onerror,dontCreateFile,canOwn,preFinish)=>{var fullname=name?PATH_FS.resolve(PATH.join2(parent,name)):parent;var dep=getUniqueRunDependency(`cp ${fullname}`);function processData(byteArray){function finish(byteArray){if(preFinish)preFinish();if(!dontCreateFile){FS_createDataFile(parent,name,byteArray,canRead,canWrite,canOwn)}if(onload)onload();removeRunDependency(dep)}if(FS_handledByPreloadPlugin(byteArray,fullname,finish,()=>{if(onerror)onerror();removeRunDependency(dep)})){return}finish(byteArray)}addRunDependency(dep);if(typeof url=="string"){asyncLoad(url,byteArray=>processData(byteArray),onerror)}else{processData(url)}};var FS_modeStringToFlags=str=>{var flagModes={"r":0,"r+":2,"w":512|64|1,"w+":512|64|2,"a":1024|64|1,"a+":1024|64|2};var flags=flagModes[str];if(typeof flags=="undefined"){throw new Error(`Unknown file open mode: ${str}`)}return flags};var FS_getMode=(canRead,canWrite)=>{var mode=0;if(canRead)mode|=292|73;if(canWrite)mode|=146;return mode};var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(path,opts={}){path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32)}var parts=path.split("/").filter(p=>!!p);var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32)}}}}return{path:current_path,node:current}},getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?`${mount}/${path}`:mount+path}path=path?`${node.name}/${path}`:node.name;node=node.parent}},hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length},hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node},hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break}current=current.name_next}}},lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent)}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node}}return FS.lookup(parent,name)},createNode(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node},destroyNode(node){FS.hashRemoveNode(node)},isRoot(node){return node===node.parent},isMountpoint(node){return!!node.mounted},isFile(mode){return(mode&61440)===32768},isDir(mode){return(mode&61440)===16384},isLink(mode){return(mode&61440)===40960},isChrdev(mode){return(mode&61440)===8192},isBlkdev(mode){return(mode&61440)===24576},isFIFO(mode){return(mode&61440)===4096},isSocket(mode){return(mode&49152)===49152},flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w"}return perms},nodePermissions(node,perms){if(FS.ignorePermissions){return 0}if(perms.includes("r")&&!(node.mode&292)){return 2}else if(perms.includes("w")&&!(node.mode&146)){return 2}else if(perms.includes("x")&&!(node.mode&73)){return 2}return 0},mayLookup(dir){var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0},mayCreate(dir,name){try{var node=FS.lookupNode(dir,name);return 20}catch(e){}return FS.nodePermissions(dir,"wx")},mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name)}catch(e){return e.errno}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode}if(isdir){if(!FS.isDir(node.mode)){return 54}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10}}else{if(FS.isDir(node.mode)){return 31}}return 0},mayOpen(node,flags){if(!node){return 44}if(FS.isLink(node.mode)){return 32}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags))},MAX_OPEN_FDS:4096,nextfd(){for(var fd=0;fd<=FS.MAX_OPEN_FDS;fd++){if(!FS.streams[fd]){return fd}}throw new FS.ErrnoError(33)},getStreamChecked(fd){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(8)}return stream},getStream:fd=>FS.streams[fd],createStream(stream,fd=-1){if(!FS.FSStream){FS.FSStream=function(){this.shared={}};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get(){return this.node},set(val){this.node=val}},isRead:{get(){return(this.flags&2097155)!==1}},isWrite:{get(){return(this.flags&2097155)!==0}},isAppend:{get(){return this.flags&1024}},flags:{get(){return this.shared.flags},set(val){this.shared.flags=val}},position:{get(){return this.shared.position},set(val){this.shared.position=val}}})}stream=Object.assign(new FS.FSStream,stream);if(fd==-1){fd=FS.nextfd()}stream.fd=fd;FS.streams[fd]=stream;return stream},closeStream(fd){FS.streams[fd]=null},chrdev_stream_ops:{open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream)}},llseek(){throw new FS.ErrnoError(70)}},major:dev=>dev>>8,minor:dev=>dev&255,makedev:(ma,mi)=>ma<<8|mi,registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops}},getDevice:dev=>FS.devices[dev],getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts)}return mounts},syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false}FS.syncFSRequests++;if(FS.syncFSRequests>1){err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`)}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode)}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode)}return}if(++completed>=mounts.length){doCallback(null)}}mounts.forEach(mount=>{if(!mount.type.syncfs){return done(null)}mount.type.syncfs(mount,populate,done)})},mount(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10)}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10)}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54)}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount)}}return mountRoot},unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28)}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(hash=>{var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current)}current=next}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1)},lookup(parent,name){return parent.node_ops.lookup(parent,name)},mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28)}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode)}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63)}return parent.node_ops.mknod(parent,name,mode,dev)},create(path,mode){mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0)},mkdir(path,mode){mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0)},mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var i=0;i0,ioctl(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59)}return stream.stream_ops.ioctl(stream,cmd,arg)},readFile(path,opts={}){opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error(`Invalid encoding type "${opts.encoding}"`)}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0)}else if(opts.encoding==="binary"){ret=buf}FS.close(stream);return ret},writeFile(path,data,opts={}){opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,undefined,opts.canOwn)}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,undefined,opts.canOwn)}else{throw new Error("Unsupported data type")}FS.close(stream)},cwd:()=>FS.currentPath,chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44)}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54)}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode)}FS.currentPath=lookup.path},createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user")},createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(stream,buffer,offset,length,pos)=>length});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var randomBuffer=new Uint8Array(1024),randomLeft=0;var randomByte=()=>{if(randomLeft===0){randomLeft=randomFill(randomBuffer).byteLength}return randomBuffer[--randomLeft]};FS.createDevice("/dev","random",randomByte);FS.createDevice("/dev","urandom",randomByte);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")},createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount(){var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup(parent,name){var fd=+name;var stream=FS.getStreamChecked(fd);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>stream.path}};ret.parent=ret;return ret}};return node}},{},"/proc/self/fd")},createStandardStreams(){if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"])}else{FS.symlink("/dev/tty","/dev/stdin")}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"])}else{FS.symlink("/dev/tty","/dev/stdout")}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"])}else{FS.symlink("/dev/tty1","/dev/stderr")}var stdin=FS.open("/dev/stdin",0);var stdout=FS.open("/dev/stdout",1);var stderr=FS.open("/dev/stderr",1)},ensureErrnoError(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.name="ErrnoError";this.node=node;this.setErrno=function(errno){this.errno=errno};this.setErrno(errno);this.message="FS error"};FS.ErrnoError.prototype=new Error;FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(code=>{FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack=""})},staticInit(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS}},init(input,output,error){FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams()},quit(){FS.init.initialized=false;for(var i=0;ithis.length-1||idx<0){return undefined}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset]};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest;xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=(from,to)=>{if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr=new XMLHttpRequest;xhr.open("GET",url,false);if(datalength!==chunkSize)xhr.setRequestHeader("Range","bytes="+from+"-"+to);xhr.responseType="arraybuffer";if(xhr.overrideMimeType){xhr.overrideMimeType("text/plain; charset=x-user-defined")}xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);if(xhr.response!==undefined){return new Uint8Array(xhr.response||[])}return intArrayFromString(xhr.responseText||"",true)};var lazyArray=this;lazyArray.setDataGetter(chunkNum=>{var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray.chunks[chunkNum]=="undefined"){lazyArray.chunks[chunkNum]=doXHR(start,end)}if(typeof lazyArray.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray.chunks[chunkNum]});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed")}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array;Object.defineProperties(lazyArray,{length:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._length}},chunkSize:{get:function(){if(!this.lengthKnown){this.cacheLength()}return this._chunkSize}}});var properties={isDevice:false,contents:lazyArray}}else{var properties={isDevice:false,url:url}}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents}else if(properties.url){node.contents=null;node.url=properties.url}Object.defineProperties(node,{usedBytes:{get:function(){return this.contents.length}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(key=>{var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments)}});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i{FS.forceLoadFile(node);return writeChunks(stream,buffer,offset,length,position)};stream_ops.mmap=(stream,length,position,prot,flags)=>{FS.forceLoadFile(node);var ptr=mmapAlloc(length);if(!ptr){throw new FS.ErrnoError(48)}writeChunks(stream,GROWABLE_HEAP_I8(),ptr,length,position);return{ptr:ptr,allocated:true}};node.stream_ops=stream_ops;return node}};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(GROWABLE_HEAP_U8(),ptr,maxBytesToRead):"";var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path}var dir;if(dirfd===-100){dir=FS.cwd()}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44)}return dir}return PATH.join2(dir,path)},doStat(func,path,buf){try{var stat=func(path)}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54}throw e}GROWABLE_HEAP_I32()[buf>>2]=stat.dev;GROWABLE_HEAP_I32()[buf+4>>2]=stat.mode;GROWABLE_HEAP_U32()[buf+8>>2]=stat.nlink;GROWABLE_HEAP_I32()[buf+12>>2]=stat.uid;GROWABLE_HEAP_I32()[buf+16>>2]=stat.gid;GROWABLE_HEAP_I32()[buf+20>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+24>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+28>>2]=tempI64[1];GROWABLE_HEAP_I32()[buf+32>>2]=4096;GROWABLE_HEAP_I32()[buf+36>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+40>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+44>>2]=tempI64[1];GROWABLE_HEAP_U32()[buf+48>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+56>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+60>>2]=tempI64[1];GROWABLE_HEAP_U32()[buf+64>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+72>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+76>>2]=tempI64[1];GROWABLE_HEAP_U32()[buf+80>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+88>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+92>>2]=tempI64[1];return 0},doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43)}if(flags&2){return 0}var buffer=GROWABLE_HEAP_U8().slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags)},varargs:undefined,get(){var ret=GROWABLE_HEAP_I32()[+SYSCALLS.varargs>>2];SYSCALLS.varargs+=4;return ret},getp(){return SYSCALLS.get()},getStr(ptr){var ret=UTF8ToString(ptr);return ret},getStreamFromFD(fd){var stream=FS.getStreamChecked(fd);return stream}};var withStackSave=f=>{var stack=stackSave();var ret=f();stackRestore(stack);return ret};var convertI32PairToI53Checked=(lo,hi)=>hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;var proxyToMainThread=function(index,sync){var numCallArgs=arguments.length-2;var outerArgs=arguments;return withStackSave(()=>{var serializedNumCallArgs=numCallArgs;var args=stackAlloc(serializedNumCallArgs*8);var b=args>>3;for(var i=0;i{EXITSTATUS=status;if(ENVIRONMENT_IS_PTHREAD){exitOnMainThread(status);throw"unwind"}_proc_exit(status)};var _exit=exitJS;var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var PThread={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){if(ENVIRONMENT_IS_PTHREAD){PThread.initWorker()}else{PThread.initMainThread()}},initMainThread(){var pthreadPoolSize=4;while(pthreadPoolSize--){PThread.allocateUnusedWorker()}addOnPreRun(()=>{addRunDependency("loading-workers");PThread.loadWasmModuleToAllWorkers(()=>removeRunDependency("loading-workers"))})},initWorker(){noExitRuntime=false},setExitStatus:status=>{EXITSTATUS=status},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var worker of PThread.runningWorkers){terminateWorker(worker)}for(var worker of PThread.unusedWorkers){terminateWorker(worker)}PThread.unusedWorkers=[];PThread.runningWorkers=[];PThread.pthreads=[]},returnWorkerToPool:worker=>{var pthread_ptr=worker.pthread_ptr;delete PThread.pthreads[pthread_ptr];PThread.unusedWorkers.push(worker);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0;__emscripten_thread_free_data(pthread_ptr)},receiveObjectTransfer(data){},threadInitTLS(){PThread.tlsInitFunctions.forEach(f=>f())},loadWasmModuleToWorker:worker=>new Promise(onFinishedLoading=>{worker.onmessage=e=>{var d=e["data"];var cmd=d["cmd"];if(d["targetThread"]&&d["targetThread"]!=_pthread_self()){var targetWorker=PThread.pthreads[d["targetThread"]];if(targetWorker){targetWorker.postMessage(d,d["transferList"])}else{err(`Internal error! Worker sent a message "${cmd}" to target pthread ${d["targetThread"]}, but that thread no longer exists!`)}return}if(cmd==="checkMailbox"){checkMailbox()}else if(cmd==="spawnThread"){spawnThread(d)}else if(cmd==="cleanupThread"){cleanupThread(d["thread"])}else if(cmd==="killThread"){killThread(d["thread"])}else if(cmd==="cancelThread"){cancelThread(d["thread"])}else if(cmd==="loaded"){worker.loaded=true;if(ENVIRONMENT_IS_NODE&&!worker.pthread_ptr){worker.unref()}onFinishedLoading(worker)}else if(cmd==="alert"){alert(`Thread ${d["threadId"]}: ${d["text"]}`)}else if(d.target==="setimmediate"){worker.postMessage(d)}else if(cmd==="callHandler"){Module[d["handler"]](...d["args"])}else if(cmd){err(`worker sent an unknown command ${cmd}`)}};worker.onerror=e=>{var message="worker sent an error!";err(`${message} ${e.filename}:${e.lineno}: ${e.message}`);throw e};if(ENVIRONMENT_IS_NODE){worker.on("message",data=>worker.onmessage({data:data}));worker.on("error",e=>worker.onerror(e))}var handlers=[];var knownHandlers=["onExit","onAbort","print","printErr"];for(var handler of knownHandlers){if(Module.hasOwnProperty(handler)){handlers.push(handler)}}worker.postMessage({"cmd":"load","handlers":handlers,"urlOrBlob":Module["mainScriptUrlOrBlob"],"wasmMemory":wasmMemory,"wasmModule":wasmModule})}),loadWasmModuleToAllWorkers(onMaybeReady){if(ENVIRONMENT_IS_PTHREAD){return onMaybeReady()}let pthreadPoolReady=Promise.all(PThread.unusedWorkers.map(PThread.loadWasmModuleToWorker));pthreadPoolReady.then(onMaybeReady)},allocateUnusedWorker(){var worker;if(!Module["locateFile"]){worker=new Worker(new URL("decoder-pro-mt-worker.worker.js",import.meta.url),{type:"module"})}else{var pthreadMainJs=locateFile("decoder-pro-mt-worker.worker.js");worker=new Worker(pthreadMainJs,{type:"module"})}PThread.unusedWorkers.push(worker)},getNewWorker(){if(PThread.unusedWorkers.length==0){PThread.allocateUnusedWorker();PThread.loadWasmModuleToWorker(PThread.unusedWorkers[0])}return PThread.unusedWorkers.pop()}};Module["PThread"]=PThread;var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var establishStackSpace=()=>{var pthread_ptr=_pthread_self();var stackHigh=GROWABLE_HEAP_U32()[pthread_ptr+52>>2];var stackSize=GROWABLE_HEAP_U32()[pthread_ptr+56>>2];var stackLow=stackHigh-stackSize;_emscripten_stack_set_limits(stackHigh,stackLow);stackRestore(stackHigh)};Module["establishStackSpace"]=establishStackSpace;function exitOnMainThread(returnCode){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(1,0,returnCode);_exit(returnCode)}var wasmTableMirror=[];var wasmTable;var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};var invokeEntryPoint=(ptr,arg)=>{var result=getWasmTableEntry(ptr)(arg);function finish(result){if(keepRuntimeAlive()){PThread.setExitStatus(result)}else{__emscripten_thread_exit(result)}}finish(result)};Module["invokeEntryPoint"]=invokeEntryPoint;var noExitRuntime=Module["noExitRuntime"]||true;var registerTLSInit=tlsInitFunc=>{PThread.tlsInitFunctions.push(tlsInitFunc)};var ___assert_fail=(condition,filename,line,func)=>{abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])};function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){GROWABLE_HEAP_U32()[this.ptr+4>>2]=type};this.get_type=function(){return GROWABLE_HEAP_U32()[this.ptr+4>>2]};this.set_destructor=function(destructor){GROWABLE_HEAP_U32()[this.ptr+8>>2]=destructor};this.get_destructor=function(){return GROWABLE_HEAP_U32()[this.ptr+8>>2]};this.set_caught=function(caught){caught=caught?1:0;GROWABLE_HEAP_I8()[this.ptr+12>>0]=caught};this.get_caught=function(){return GROWABLE_HEAP_I8()[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;GROWABLE_HEAP_I8()[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return GROWABLE_HEAP_I8()[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)};this.set_adjusted_ptr=function(adjustedPtr){GROWABLE_HEAP_U32()[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return GROWABLE_HEAP_U32()[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return GROWABLE_HEAP_U32()[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;var ___cxa_throw=(ptr,type,destructor)=>{var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw exceptionLast};var ___emscripten_init_main_thread_js=tb=>{__emscripten_thread_init(tb,!ENVIRONMENT_IS_WORKER,1,!ENVIRONMENT_IS_WEB,2097152,false);PThread.threadInitTLS()};var ___emscripten_thread_cleanup=thread=>{if(!ENVIRONMENT_IS_PTHREAD)cleanupThread(thread);else postMessage({"cmd":"cleanupThread","thread":thread})};function pthreadCreateProxied(pthread_ptr,attr,startRoutine,arg){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(2,1,pthread_ptr,attr,startRoutine,arg);return ___pthread_create_js(pthread_ptr,attr,startRoutine,arg)}var ___pthread_create_js=(pthread_ptr,attr,startRoutine,arg)=>{if(typeof SharedArrayBuffer=="undefined"){err("Current environment does not support SharedArrayBuffer, pthreads are not available!");return 6}var transferList=[];var error=0;if(ENVIRONMENT_IS_PTHREAD&&(transferList.length===0||error)){return pthreadCreateProxied(pthread_ptr,attr,startRoutine,arg)}if(error)return error;var threadParams={startRoutine:startRoutine,pthread_ptr:pthread_ptr,arg:arg,transferList:transferList};if(ENVIRONMENT_IS_PTHREAD){threadParams.cmd="spawnThread";postMessage(threadParams,transferList);return 0}return spawnThread(threadParams)};var setErrNo=value=>{GROWABLE_HEAP_I32()[___errno_location()>>2]=value;return value};function ___syscall_fcntl64(fd,cmd,varargs){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(3,1,fd,cmd,varargs);SYSCALLS.varargs=varargs;try{var stream=SYSCALLS.getStreamFromFD(fd);switch(cmd){case 0:{var arg=SYSCALLS.get();if(arg<0){return-28}while(FS.streams[arg]){arg++}var newStream;newStream=FS.createStream(stream,arg);return newStream.fd}case 1:case 2:return 0;case 3:return stream.flags;case 4:{var arg=SYSCALLS.get();stream.flags|=arg;return 0}case 5:{var arg=SYSCALLS.getp();var offset=0;GROWABLE_HEAP_I16()[arg+offset>>1]=2;return 0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:setErrNo(28);return-1;default:{return-28}}}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}function ___syscall_openat(dirfd,path,flags,varargs){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(4,1,dirfd,path,flags,varargs);SYSCALLS.varargs=varargs;try{path=SYSCALLS.getStr(path);path=SYSCALLS.calculateAt(dirfd,path);var mode=varargs?SYSCALLS.get():0;return FS.open(path,flags,mode).fd}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return-e.errno}}var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret="";var c=ptr;while(GROWABLE_HEAP_U8()[c]){ret+=embind_charCodes[GROWABLE_HEAP_U8()[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;var throwInternalError=message=>{throw new InternalError(message)};var whenDependentTypesAreResolved=(myTypes,dependentTypes,getTypeConverters)=>{myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i{if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(()=>{typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}};function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type "${name}" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":function(pointer){return this["fromWireType"](GROWABLE_HEAP_U8()[pointer])},destructorFunction:null})};var shallowCopyInternalPointer=o=>({count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType});var throwInstanceAlreadyDeleted=obj=>{function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")};var finalizationRegistry=false;var detachFinalizer=handle=>{};var runDestructor=$$=>{if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}};var releaseClassHandle=$$=>{$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}};var downcastPointer=(ptr,ptrClass,desiredClass)=>{if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)};var registeredPointers={};var getInheritedInstanceCount=()=>Object.keys(registeredInstances).length;var getLiveInheritedInstances=()=>{var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv};var deletionQueue=[];var flushPendingDeletes=()=>{while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}};var delayFunction;var setDelayFunction=fn=>{delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}};var init_embind=()=>{Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction};var registeredInstances={};var getBasestPointer=(class_,ptr)=>{if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr};var getInheritedInstance=(class_,ptr)=>{ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]};var makeClassHandle=(prototype,record)=>{if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))};function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}var attachFinalizer=handle=>{if("undefined"===typeof FinalizationRegistry){attachFinalizer=handle=>handle;return handle}finalizationRegistry=new FinalizationRegistry(info=>{releaseClassHandle(info.$$)});attachFinalizer=handle=>{var $$=handle.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$:$$};finalizationRegistry.register(handle,info,handle)}return handle};detachFinalizer=handle=>finalizationRegistry.unregister(handle);return attachFinalizer(handle)};var init_ClassHandle=()=>{Object.assign(ClassHandle.prototype,{"isAliasOf"(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;other.$$=other.$$;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right},"clone"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}},"delete"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}},"isDeleted"(){return!this.$$.ptr},"deleteLater"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}})};function ClassHandle(){}var createNamedFunction=(name,body)=>Object.defineProperty(body,"name",{value:name});var ensureOverloadTable=(proto,methodName,humanName)=>{if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError(`Function '${humanName}' called with an invalid number of arguments (${arguments.length}) - expects one of (${proto[methodName].overloadTable})!`)}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}};var exposePublicSymbol=(name,value,numArguments)=>{if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError(`Cannot register public name '${name}' twice`)}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError(`Cannot register multiple overloads of a function with the same number of arguments (${numArguments})!`)}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}};var char_0=48;var char_9=57;var makeLegalFunctionName=name=>{if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return`_${name}`}return name};function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}var upcastPointer=(ptr,ptrClass,desiredClass)=>{while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError(`Expected null or instance of ${desiredClass.name}, got an instance of ${ptrClass.name}`)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr};function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(()=>clonedHandle["delete"]()));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function readPointer(pointer){return this["fromWireType"](GROWABLE_HEAP_U32()[pointer>>2])}var init_RegisteredPointer=()=>{Object.assign(RegisteredPointer.prototype,{getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr},destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":readPointer,"deleteObject"(handle){if(handle!==null){handle["delete"]()}},"fromWireType":RegisteredPointer_fromWireType})};function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}var replacePublicSymbol=(name,value,numArguments)=>{if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}};var dynCallLegacy=(sig,ptr,args)=>{var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)};var dynCall=(sig,ptr,args)=>{if(sig.includes("j")){return dynCallLegacy(sig,ptr,args)}var rtn=getWasmTableEntry(ptr).apply(null,args);return rtn};var getDynCaller=(sig,ptr)=>{var argCache=[];return function(){argCache.length=0;Object.assign(argCache,arguments);return dynCall(sig,ptr,argCache)}};var embind__requireFunction=(signature,rawFunction)=>{signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes("j")){return getDynCaller(signature,rawFunction)}return getWasmTableEntry(rawFunction)}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError(`unknown function pointer with signature ${signature}: ${rawFunction}`)}return fp};var extendError=(baseErrorType,errorName)=>{var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return`${this.name}: ${this.message}`}};return errorClass};var UnboundTypeError;var getTypeName=type=>{var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv};var throwUnboundTypeError=(message,types)=>{var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(`${message}: `+unboundTypes.map(getTypeName).join([", "]))};var __embind_register_class=(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor)=>{name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError(`Cannot construct ${name} due to unbound types`,[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(name,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError("Use 'new' to construct "+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+" has no accessible constructor")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError(`Tried to invoke ctor of ${name} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(registeredClass.constructor_body).toString()}) parameters instead!`)}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);if(registeredClass.baseClass){if(registeredClass.baseClass.__derivedClasses===undefined){registeredClass.baseClass.__derivedClasses=[]}registeredClass.baseClass.__derivedClasses.push(registeredClass)}var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})};var heap32VectorToArray=(count,firstElement)=>{var array=[];for(var i=0;i>2])}return array};var runDestructors=destructors=>{while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}};function newFunc(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError(`new_ called with constructor type ${typeof constructor} which is not a function`)}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc,isAsync){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i0?", ":"")+argsListWired}invokerFnBody+=(returns||isAsync?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i{var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=`constructor ${classType.name}`;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError(`Cannot register multiple constructors with identical number of parameters (${argCount-1}) for class '${classType.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`)}classType.registeredClass.constructor_body[argCount-1]=()=>{throwUnboundTypeError(`Cannot construct ${classType.name} due to unbound types`,rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,argTypes=>{argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})};var getFunctionName=signature=>{signature=signature.trim();const argsIndex=signature.indexOf("(");if(argsIndex!==-1){return signature.substr(0,argsIndex)}else{return signature}};var __embind_register_class_function=(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual,isAsync)=>{var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);methodName=getFunctionName(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=`${classType.name}.${methodName}`;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError(`Cannot call ${humanName} due to unbound types`,rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context,isAsync);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module["count_emval_handles"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this["fromWireType"](GROWABLE_HEAP_I32()[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":(destructors,value)=>Emval.toHandle(value),"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})};var embindRepr=v=>{if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this["fromWireType"](GROWABLE_HEAP_F32()[pointer>>2])};case 8:return function(pointer){return this["fromWireType"](GROWABLE_HEAP_F64()[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":value=>value,"toWireType":(destructors,value)=>value,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>GROWABLE_HEAP_I8()[pointer>>0]:pointer=>GROWABLE_HEAP_U8()[pointer>>0];case 2:return signed?pointer=>GROWABLE_HEAP_I16()[pointer>>1]:pointer=>GROWABLE_HEAP_U16()[pointer>>1];case 4:return signed?pointer=>GROWABLE_HEAP_I32()[pointer>>2]:pointer=>GROWABLE_HEAP_U32()[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=GROWABLE_HEAP_U32()[handle>>2];var data=GROWABLE_HEAP_U32()[handle+4>>2];return new TA(GROWABLE_HEAP_I8().buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,GROWABLE_HEAP_U8(),outPtr,maxBytesToWrite);var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType"(value){var length=GROWABLE_HEAP_U32()[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||GROWABLE_HEAP_U8()[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}GROWABLE_HEAP_U8()[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&GROWABLE_HEAP_U16()[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(GROWABLE_HEAP_U8().slice(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=GROWABLE_HEAP_I16()[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}GROWABLE_HEAP_I16()[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=GROWABLE_HEAP_I32()[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}GROWABLE_HEAP_I32()[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}GROWABLE_HEAP_I32()[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>GROWABLE_HEAP_U16();shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>GROWABLE_HEAP_U32();shift=2}registerType(rawType,{name:name,"fromWireType":value=>{var length=GROWABLE_HEAP_U32()[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":(destructors,value)=>{if(!(typeof value=="string")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);GROWABLE_HEAP_U32()[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":()=>undefined,"toWireType":(destructors,o)=>undefined})};var maybeExit=()=>{if(!keepRuntimeAlive()){try{if(ENVIRONMENT_IS_PTHREAD)__emscripten_thread_exit(EXITSTATUS);else _exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var __emscripten_thread_mailbox_await=pthread_ptr=>{if(typeof Atomics.waitAsync==="function"){var wait=Atomics.waitAsync(GROWABLE_HEAP_I32(),pthread_ptr>>2,pthread_ptr);wait.value.then(checkMailbox);var waitingAsync=pthread_ptr+128;Atomics.store(GROWABLE_HEAP_I32(),waitingAsync>>2,1)}};Module["__emscripten_thread_mailbox_await"]=__emscripten_thread_mailbox_await;var checkMailbox=()=>{var pthread_ptr=_pthread_self();if(pthread_ptr){__emscripten_thread_mailbox_await(pthread_ptr);callUserCallback(__emscripten_check_mailbox)}};Module["checkMailbox"]=checkMailbox;var __emscripten_notify_mailbox_postmessage=(targetThreadId,currThreadId,mainThreadId)=>{if(targetThreadId==currThreadId){setTimeout(()=>checkMailbox())}else if(ENVIRONMENT_IS_PTHREAD){postMessage({"targetThread":targetThreadId,"cmd":"checkMailbox"})}else{var worker=PThread.pthreads[targetThreadId];if(!worker){return}worker.postMessage({"cmd":"checkMailbox"})}};var proxiedJSCallArgs=[];var __emscripten_receive_on_main_thread_js=(index,callingThread,numCallArgs,args)=>{proxiedJSCallArgs.length=numCallArgs;var b=args>>3;for(var i=0;i{if(ENVIRONMENT_IS_NODE){PThread.pthreads[thread].ref()}};var emval_symbols={};var getStringOrSymbol=address=>{var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}return symbol};var emval_methodCallers=[];var __emval_call_method=(caller,objHandle,methodName,destructorsRef,args)=>{caller=emval_methodCallers[caller];objHandle=Emval.toValue(objHandle);methodName=getStringOrSymbol(methodName);return caller(objHandle,objHandle[methodName],destructorsRef,args)};var emval_addMethodCaller=caller=>{var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id};var requireRegisteredType=(rawType,humanName)=>{var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl};var emval_lookupTypes=(argCount,argTypes)=>{var a=new Array(argCount);for(var i=0;i>2],"parameter "+i)}return a};var reflectConstruct=Reflect.construct;var emval_returnValue=(returnType,destructorsRef,handle)=>{var destructors=[];var result=returnType["toWireType"](destructors,handle);if(destructors.length){GROWABLE_HEAP_U32()[destructorsRef>>2]=Emval.toHandle(destructors)}return result};var __emval_get_method_caller=(argCount,argTypes,kind)=>{var types=emval_lookupTypes(argCount,argTypes);var retType=types.shift();argCount--;var functionBody=`return function (obj, func, destructorsRef, args) {\n`;var offset=0;var argsList=[];if(kind===0){argsList.push("obj")}var params=["retType"];var args=[retType];for(var i=0;it.name).join(", ")}) => ${retType.name}>`;return emval_addMethodCaller(createNamedFunction(functionName,invokerFunction))};var __emval_run_destructors=handle=>{var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle)};var isLeapYear=year=>year%4===0&&(year%100!==0||year%400===0);var MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];var ydayFromDate=date=>{var leap=isLeapYear(date.getFullYear());var monthDaysCumulative=leap?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday};function __localtime_js(time_low,time_high,tmPtr){var time=convertI32PairToI53Checked(time_low,time_high);var date=new Date(time*1e3);GROWABLE_HEAP_I32()[tmPtr>>2]=date.getSeconds();GROWABLE_HEAP_I32()[tmPtr+4>>2]=date.getMinutes();GROWABLE_HEAP_I32()[tmPtr+8>>2]=date.getHours();GROWABLE_HEAP_I32()[tmPtr+12>>2]=date.getDate();GROWABLE_HEAP_I32()[tmPtr+16>>2]=date.getMonth();GROWABLE_HEAP_I32()[tmPtr+20>>2]=date.getFullYear()-1900;GROWABLE_HEAP_I32()[tmPtr+24>>2]=date.getDay();var yday=ydayFromDate(date)|0;GROWABLE_HEAP_I32()[tmPtr+28>>2]=yday;GROWABLE_HEAP_I32()[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;GROWABLE_HEAP_I32()[tmPtr+32>>2]=dst}var stringToNewUTF8=str=>{var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8(str,ret,size);return ret};var __tzset_js=(timezone,daylight,tzname)=>{var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);GROWABLE_HEAP_U32()[timezone>>2]=stdTimezoneOffset*60;GROWABLE_HEAP_I32()[daylight>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=stringToNewUTF8(winterName);var summerNamePtr=stringToNewUTF8(summerName);if(summerOffset>2]=winterNamePtr;GROWABLE_HEAP_U32()[tzname+4>>2]=summerNamePtr}else{GROWABLE_HEAP_U32()[tzname>>2]=summerNamePtr;GROWABLE_HEAP_U32()[tzname+4>>2]=winterNamePtr}};var _abort=()=>{abort("")};var warnOnce=text=>{if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;if(ENVIRONMENT_IS_NODE)text="warning: "+text;err(text)}};var _emscripten_check_blocking_allowed=()=>{};var _emscripten_date_now=()=>Date.now();var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};var _emscripten_exit_with_live_runtime=()=>{runtimeKeepalivePush();throw"unwind"};var _emscripten_get_now;_emscripten_get_now=()=>performance.timeOrigin+performance.now();var _emscripten_num_logical_cores=()=>{if(ENVIRONMENT_IS_NODE)return require("os").cpus().length;return navigator["hardwareConcurrency"]};var getHeapMax=()=>536870912;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=GROWABLE_HEAP_U8().length;requestedSize>>>=0;if(requestedSize<=oldSize){return false}var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var ENV={};var getExecutableName=()=>thisProgram||"./this.program";var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings};var stringToAscii=(str,buffer)=>{for(var i=0;i>0]=str.charCodeAt(i)}GROWABLE_HEAP_I8()[buffer>>0]=0};var _environ_get=function(__environ,environ_buf){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(5,1,__environ,environ_buf);var bufSize=0;getEnvStrings().forEach((string,i)=>{var ptr=environ_buf+bufSize;GROWABLE_HEAP_U32()[__environ+i*4>>2]=ptr;stringToAscii(string,ptr);bufSize+=string.length+1});return 0};var _environ_sizes_get=function(penviron_count,penviron_buf_size){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(6,1,penviron_count,penviron_buf_size);var strings=getEnvStrings();GROWABLE_HEAP_U32()[penviron_count>>2]=strings.length;var bufSize=0;strings.forEach(string=>bufSize+=string.length+1);GROWABLE_HEAP_U32()[penviron_buf_size>>2]=bufSize;return 0};function _fd_close(fd){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(7,1,fd);try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_fdstat_get(fd,pbuf){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(8,1,fd,pbuf);try{var rightsBase=0;var rightsInheriting=0;var flags=0;{var stream=SYSCALLS.getStreamFromFD(fd);var type=stream.tty?2:FS.isDir(stream.mode)?3:FS.isLink(stream.mode)?7:4}GROWABLE_HEAP_I8()[pbuf>>0]=type;GROWABLE_HEAP_I16()[pbuf+2>>1]=flags;tempI64=[rightsBase>>>0,(tempDouble=rightsBase,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[pbuf+8>>2]=tempI64[0],GROWABLE_HEAP_I32()[pbuf+12>>2]=tempI64[1];tempI64=[rightsInheriting>>>0,(tempDouble=rightsInheriting,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[pbuf+16>>2]=tempI64[0],GROWABLE_HEAP_I32()[pbuf+20>>2]=tempI64[1];return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doReadv=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=GROWABLE_HEAP_U32()[iov+4>>2];iov+=8;var curr=FS.read(stream,GROWABLE_HEAP_I8(),ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(10,1,fd,offset_low,offset_high,whence,newOffset);var offset=convertI32PairToI53Checked(offset_low,offset_high);try{if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?+Math.floor(tempDouble/4294967296)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[newOffset>>2]=tempI64[0],GROWABLE_HEAP_I32()[newOffset+4>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}var doWritev=(stream,iov,iovcnt,offset)=>{var ret=0;for(var i=0;i>2];var len=GROWABLE_HEAP_U32()[iov+4>>2];iov+=8;var curr=FS.write(stream,GROWABLE_HEAP_I8(),ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr}}return ret};function _fd_write(fd,iov,iovcnt,pnum){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(11,1,fd,iov,iovcnt,pnum);try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);GROWABLE_HEAP_U32()[pnum>>2]=num;return 0}catch(e){if(typeof FS=="undefined"||!(e.name==="ErrnoError"))throw e;return e.errno}}PThread.init();var FSNode=function(parent,name,mode,rdev){if(!parent){parent=this}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function(){return(this.mode&readMode)===readMode},set:function(val){val?this.mode|=readMode:this.mode&=~readMode}},write:{get:function(){return(this.mode&writeMode)===writeMode},set:function(val){val?this.mode|=writeMode:this.mode&=~writeMode}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}});FS.FSNode=FSNode;FS.createPreloadedFile=FS_createPreloadedFile;FS.staticInit();embind_init_charCodes();BindingError=Module["BindingError"]=class BindingError extends Error{constructor(message){super(message);this.name="BindingError"}};InternalError=Module["InternalError"]=class InternalError extends Error{constructor(message){super(message);this.name="InternalError"}};init_ClassHandle();init_embind();init_RegisteredPointer();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");handleAllocatorInit();init_emval();var proxiedFunctionTable=[_proc_exit,exitOnMainThread,pthreadCreateProxied,___syscall_fcntl64,___syscall_openat,_environ_get,_environ_sizes_get,_fd_close,_fd_fdstat_get,_fd_read,_fd_seek,_fd_write];var wasmImports={g:___assert_fail,s:___cxa_throw,G:___emscripten_init_main_thread_js,m:___emscripten_thread_cleanup,B:___pthread_create_js,P:___syscall_fcntl64,D:___syscall_openat,v:__embind_register_bigint,R:__embind_register_bool,O:__embind_register_class,F:__embind_register_class_constructor,k:__embind_register_class_function,Q:__embind_register_emval,p:__embind_register_float,d:__embind_register_integer,c:__embind_register_memory_view,q:__embind_register_std_string,l:__embind_register_std_wstring,S:__embind_register_void,y:__emscripten_notify_mailbox_postmessage,C:__emscripten_receive_on_main_thread_js,E:__emscripten_thread_mailbox_await,L:__emscripten_thread_set_strongref,j:__emval_call_method,r:__emval_decref,i:__emval_get_method_caller,h:__emval_run_destructors,t:__localtime_js,x:__tzset_js,b:_abort,n:_emscripten_check_blocking_allowed,f:_emscripten_date_now,K:_emscripten_exit_with_live_runtime,e:_emscripten_get_now,z:_emscripten_num_logical_cores,w:_emscripten_resize_heap,I:_environ_get,J:_environ_sizes_get,A:_exit,o:_fd_close,H:_fd_fdstat_get,N:_fd_read,u:_fd_seek,M:_fd_write,a:wasmMemory||Module["wasmMemory"]};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["T"])();var _free=a0=>(_free=wasmExports["U"])(a0);var _malloc=a0=>(_malloc=wasmExports["V"])(a0);var _pthread_self=Module["_pthread_self"]=()=>(_pthread_self=Module["_pthread_self"]=wasmExports["W"])();var ___errno_location=()=>(___errno_location=wasmExports["X"])();var __emscripten_tls_init=Module["__emscripten_tls_init"]=()=>(__emscripten_tls_init=Module["__emscripten_tls_init"]=wasmExports["Y"])();var ___getTypeName=a0=>(___getTypeName=wasmExports["Z"])(a0);var __embind_initialize_bindings=Module["__embind_initialize_bindings"]=()=>(__embind_initialize_bindings=Module["__embind_initialize_bindings"]=wasmExports["_"])();var __emscripten_thread_init=Module["__emscripten_thread_init"]=(a0,a1,a2,a3,a4,a5)=>(__emscripten_thread_init=Module["__emscripten_thread_init"]=wasmExports["aa"])(a0,a1,a2,a3,a4,a5);var __emscripten_thread_crashed=Module["__emscripten_thread_crashed"]=()=>(__emscripten_thread_crashed=Module["__emscripten_thread_crashed"]=wasmExports["ba"])();var _emscripten_main_thread_process_queued_calls=()=>(_emscripten_main_thread_process_queued_calls=wasmExports["emscripten_main_thread_process_queued_calls"])();var _emscripten_main_runtime_thread_id=()=>(_emscripten_main_runtime_thread_id=wasmExports["emscripten_main_runtime_thread_id"])();var __emscripten_run_on_main_thread_js=(a0,a1,a2,a3)=>(__emscripten_run_on_main_thread_js=wasmExports["ca"])(a0,a1,a2,a3);var __emscripten_thread_free_data=a0=>(__emscripten_thread_free_data=wasmExports["da"])(a0);var __emscripten_thread_exit=Module["__emscripten_thread_exit"]=a0=>(__emscripten_thread_exit=Module["__emscripten_thread_exit"]=wasmExports["ea"])(a0);var __emscripten_check_mailbox=()=>(__emscripten_check_mailbox=wasmExports["fa"])();var _emscripten_stack_set_limits=(a0,a1)=>(_emscripten_stack_set_limits=wasmExports["ga"])(a0,a1);var stackSave=()=>(stackSave=wasmExports["ha"])();var stackRestore=a0=>(stackRestore=wasmExports["ia"])(a0);var stackAlloc=a0=>(stackAlloc=wasmExports["ja"])(a0);var ___cxa_increment_exception_refcount=a0=>(___cxa_increment_exception_refcount=wasmExports["__cxa_increment_exception_refcount"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports["ka"])(a0);var dynCall_jiji=Module["dynCall_jiji"]=(a0,a1,a2,a3,a4)=>(dynCall_jiji=Module["dynCall_jiji"]=wasmExports["la"])(a0,a1,a2,a3,a4);var _ff_h264_cabac_tables=Module["_ff_h264_cabac_tables"]=98981;Module["wasmMemory"]=wasmMemory;Module["keepRuntimeAlive"]=keepRuntimeAlive;Module["ExitStatus"]=ExitStatus;Module["PThread"]=PThread;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}if(ENVIRONMENT_IS_PTHREAD){readyPromiseResolve(Module);initRuntime();startWorker(Module);return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); return moduleArg.ready } - ); })(); +; export default Module; \ No newline at end of file diff --git a/ui/decoder-pro-mt-worker.wasm b/ui/decoder-pro-mt-worker.wasm index 19c4c93..dc85c75 100755 Binary files a/ui/decoder-pro-mt-worker.wasm and b/ui/decoder-pro-mt-worker.wasm differ diff --git a/ui/decoder-pro-mt.js b/ui/decoder-pro-mt.js index 490efaf..8202c80 100644 --- a/ui/decoder-pro-mt.js +++ b/ui/decoder-pro-mt.js @@ -1 +1 @@ -!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,t=(e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href,async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,i,n;(n=t).ready=new Promise(((e,t)=>{r=e,i=t})),(n=void 0!==n?n:{}).locateFile=function(e){return"decoder-pro-mt-worker.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_MT_WORKER_WASM_URL&&""!=JESSIBUCA_PRO_MT_WORKER_WASM_URL?JESSIBUCA_PRO_MT_WORKER_WASM_URL:e};var s,o,a,l=Object.assign({},n),d="./this.program",u=(e,t)=>{throw t},h="object"==typeof window,c="function"==typeof importScripts,f="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,p=n.ENVIRONMENT_IS_PTHREAD||!1,m="";function _(e){return n.locateFile?n.locateFile(e,m):m+e}if(f){const{createRequire:e}=await import("module");var g=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href),y=g("fs"),v=g("path");let t;m=c?v.dirname(m)+"/":g("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href)),s=(e,t)=>(e=le(e)?new URL(e):v.normalize(e),y.readFileSync(e,t?void 0:"utf8")),a=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},o=function(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=le(e)?new URL(e):v.normalize(e),y.readFile(e,i?void 0:"utf8",((e,n)=>{e?r(e):t(i?n.buffer:n)}))},!n.thisProgram&&process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),u=(e,t)=>{throw process.exitCode=e,t},n.inspect=()=>"[Emscripten Module object]";try{t=g("worker_threads")}catch(e){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),e}global.Worker=t.Worker}else(h||c)&&(c?m=self.location.href:"undefined"!=typeof document&&document.currentScript&&(m=document.currentScript.src),e&&(m=e),m=0!==m.indexOf("blob:")?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",f||(s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},c&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)}));f&&"undefined"==typeof performance&&(global.performance=g("perf_hooks").performance);var b=console.log.bind(console),w=console.error.bind(console);f&&(b=function(){for(var e=arguments.length,t=new Array(e),r=0;r=65536,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+N+"! (STACK_SIZE=65536)"),p)x=n.wasmMemory;else if(n.wasmMemory)x=n.wasmMemory;else if(!((x=new WebAssembly.Memory({initial:N/65536,maximum:N/65536,shared:!0})).buffer instanceof SharedArrayBuffer))throw U("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),f&&U("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");O(),N=x.buffer.byteLength;var $=[],G=[],H=[],V=0;function W(){return A||V>0}function j(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)K(n.preRun.shift());Ke($)}function Y(){p||(n.noFSInit||$e.init.initialized||$e.init(),$e.ignorePermissions=!1,Ke(G))}function q(){if(!p){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)Z(n.postRun.shift());Ke(H)}}function K(e){$.unshift(e)}function X(e){G.unshift(e)}function Z(e){H.unshift(e)}var J=0,Q=null;function ee(e){J++,n.monitorRunDependencies&&n.monitorRunDependencies(J)}function te(e){if(J--,n.monitorRunDependencies&&n.monitorRunDependencies(J),0==J&&Q){var t=Q;Q=null,t()}}function re(e){n.onAbort&&n.onAbort(e),U(e="Aborted("+e+")"),z=!0,T=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}var ie,ne,se,oe="data:application/octet-stream;base64,";function ae(e){return e.startsWith(oe)}function le(e){return e.startsWith("file://")}function de(e){if(e==ie&&E)return new Uint8Array(E);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function ue(e){if(!E&&(h||c)){if("function"==typeof fetch&&!le(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>de(e)));if(o)return new Promise(((t,r)=>{o(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>de(e)))}function he(e,t,r){return ue(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{U(`failed to asynchronously prepare wasm: ${e}`),re(e)}))}function ce(e,t,r,i){return e||"function"!=typeof WebAssembly.instantiateStreaming||ae(t)||le(t)||f||"function"!=typeof fetch?he(t,r,i):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(i,(function(e){return U(`wasm streaming compile failed: ${e}`),U("falling back to ArrayBuffer instantiation"),he(t,r,i)}))))}function fe(){var e={a:Yi};function t(e,t){return qi=e.exports,rt(qi.V),Je=qi.T,X(qi.Q),k=t,te(),qi}if(ee(),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){U(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return ce(E,ie,e,(function(e){t(e.instance,e.module)})).catch(i),{}}function pe(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}n.locateFile?ae(ie="decoder-pro-mt-worker.wasm")||(ie=_(ie)):ie=new URL("decoder-pro-mt-worker.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href).href;var me=e=>{e.terminate(),e.onmessage=e=>{}},_e=e=>{var t=qe.pthreads[e];delete qe.pthreads[e],me(t),nn(e),qe.runningWorkers.splice(qe.runningWorkers.indexOf(t),1),t.pthread_ptr=0},ge=e=>{qe.pthreads[e].postMessage({cmd:"cancel"})},ye=e=>{var t=qe.pthreads[e];M(t),qe.returnWorkerToPool(t)},ve=e=>{var t=qe.getNewWorker();if(!t)return 6;qe.runningWorkers.push(t),qe.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var r={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return f&&t.unref(),t.postMessage(r,e.transferList),0},be={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=be.isAbs(e),r="/"===e.substr(-1);return(e=be.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=be.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=be.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return be.normalize(e.join("/"))},join2:(e,t)=>be.normalize(e+"/"+t)},we=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>(e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e);if(f)try{var e=g("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}re("initRandomDevice")},Ee=e=>(Ee=we())(e),Se={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:$e.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=be.isAbs(i)}return(t?"/":"")+(e=be.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=Se.resolve(e).substr(1),t=Se.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),s=Math.min(i.length,n.length),o=s,a=0;a{for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&Ue)return Ue.decode(e.buffer instanceof SharedArrayBuffer?e.slice(t,n):e.subarray(t,n));for(var s="";t>10,56320|1023&d)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s},ke=[],Ae=e=>{for(var t=0,r=0;r=55296&&i<=57343?(t+=4,++r):t+=3}return t},Te=(e,t,r,i)=>{if(!(i>0))return 0;for(var n=r,s=r+i-1,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-n};function Ce(e,t,r){var i=r>0?r:Ae(e)+1,n=new Array(i),s=Te(e,n,0,n.length);return t&&(n.length=s),n}var Be=()=>{if(!ke.length){var e=null;if(f){var t=Buffer.alloc(256),r=0,i=process.stdin.fd;try{r=y.readSync(i,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;ke=Ce(e,!0)}return ke.shift()},Fe={ttys:[],init(){},shutdown(){},register(e,t){Fe.ttys[e]={input:[],output:[],ops:t},$e.registerDevice(e,Fe.stream_ops)},stream_ops:{open(e){var t=Fe.ttys[e.node.rdev];if(!t)throw new $e.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,i,n){if(!e.tty||!e.tty.ops.get_char)throw new $e.ErrnoError(60);for(var s=0,o=0;oBe(),put_char(e,t){null===t||10===t?(S(xe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(S(xe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(U(xe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(U(xe(e.output,0)),e.output=[])}}},Pe=e=>{re()},De={ops_table:null,mount:e=>De.createNode(null,"/",16895,0),createNode(e,t,r,i){if($e.isBlkdev(r)||$e.isFIFO(r))throw new $e.ErrnoError(63);De.ops_table||(De.ops_table={dir:{node:{getattr:De.node_ops.getattr,setattr:De.node_ops.setattr,lookup:De.node_ops.lookup,mknod:De.node_ops.mknod,rename:De.node_ops.rename,unlink:De.node_ops.unlink,rmdir:De.node_ops.rmdir,readdir:De.node_ops.readdir,symlink:De.node_ops.symlink},stream:{llseek:De.stream_ops.llseek}},file:{node:{getattr:De.node_ops.getattr,setattr:De.node_ops.setattr},stream:{llseek:De.stream_ops.llseek,read:De.stream_ops.read,write:De.stream_ops.write,allocate:De.stream_ops.allocate,mmap:De.stream_ops.mmap,msync:De.stream_ops.msync}},link:{node:{getattr:De.node_ops.getattr,setattr:De.node_ops.setattr,readlink:De.node_ops.readlink},stream:{}},chrdev:{node:{getattr:De.node_ops.getattr,setattr:De.node_ops.setattr},stream:$e.chrdev_stream_ops}});var n=$e.createNode(e,t,r,i);return $e.isDir(n.mode)?(n.node_ops=De.ops_table.dir.node,n.stream_ops=De.ops_table.dir.stream,n.contents={}):$e.isFile(n.mode)?(n.node_ops=De.ops_table.file.node,n.stream_ops=De.ops_table.file.stream,n.usedBytes=0,n.contents=null):$e.isLink(n.mode)?(n.node_ops=De.ops_table.link.node,n.stream_ops=De.ops_table.link.stream):$e.isChrdev(n.mode)&&(n.node_ops=De.ops_table.chrdev.node,n.stream_ops=De.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n,e.timestamp=n.timestamp),n},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=$e.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,$e.isDir(e.mode)?t.size=4096:$e.isFile(e.mode)?t.size=e.usedBytes:$e.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&De.resizeFileStorage(e,t.size)},lookup(e,t){throw $e.genericErrors[44]},mknod:(e,t,r,i)=>De.createNode(e,t,r,i),rename(e,t,r){if($e.isDir(e.mode)){var i;try{i=$e.lookupNode(t,r)}catch(e){}if(i)for(var n in i.contents)throw new $e.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=$e.lookupNode(e,t);for(var i in r.contents)throw new $e.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var i=De.createNode(e,t,41471,0);return i.link=r,i},readlink(e){if(!$e.isLink(e.mode))throw new $e.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,i,n){var s=e.node.contents;if(n>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-n,i);if(o>8&&s.subarray)t.set(s.subarray(n,n+o),r);else for(var a=0;a0||r+t(De.stream_ops.write(e,t,0,i,r,!1),0)}},Ie=(e,t,r,i)=>{var n=i?"":`al ${e}`;o(e,(r=>{M(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),n&&te()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),n&&ee()},Le=(e,t,r,i,n,s)=>$e.createDataFile(e,t,r,i,n,s),Re=n.preloadPlugins||[],ze=(e,t,r,i)=>{"undefined"!=typeof Browser&&Browser.init();var n=!1;return Re.forEach((s=>{n||s.canHandle(t)&&(s.handle(e,t,r,i),n=!0)})),n},Me=(e,t,r,i,n,s,o,a,l,d)=>{var u=t?Se.resolve(be.join2(e,t)):e;function h(r){function h(r){d&&d(),a||Le(e,t,r,i,n,l),s&&s(),te()}ze(r,u,h,(()=>{o&&o(),te()}))||h(r)}ee(),"string"==typeof r?Ie(r,(e=>h(e)),o):h(r)},Oe=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Ne=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},$e={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=Se.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new $e.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),i=$e.root,n="/",s=0;s40)throw new $e.ErrnoError(32)}}return{path:n,node:i}},getPath(e){for(var t;;){if($e.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,i=0;i>>0)%$e.nameTable.length},hashAddNode(e){var t=$e.hashName(e.parent.id,e.name);e.name_next=$e.nameTable[t],$e.nameTable[t]=e},hashRemoveNode(e){var t=$e.hashName(e.parent.id,e.name);if($e.nameTable[t]===e)$e.nameTable[t]=e.name_next;else for(var r=$e.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=$e.mayLookup(e);if(r)throw new $e.ErrnoError(r,e);for(var i=$e.hashName(e.id,t),n=$e.nameTable[i];n;n=n.name_next){var s=n.name;if(n.parent.id===e.id&&s===t)return n}return $e.lookup(e,t)},createNode(e,t,r,i){var n=new $e.FSNode(e,t,r,i);return $e.hashAddNode(n),n},destroyNode(e){$e.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>$e.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=$e.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return $e.lookupNode(e,t),20}catch(e){}return $e.nodePermissions(e,"wx")},mayDelete(e,t,r){var i;try{i=$e.lookupNode(e,t)}catch(e){return e.errno}var n=$e.nodePermissions(e,"wx");if(n)return n;if(r){if(!$e.isDir(i.mode))return 54;if($e.isRoot(i)||$e.getPath(i)===$e.cwd())return 10}else if($e.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?$e.isLink(e.mode)?32:$e.isDir(e.mode)&&("r"!==$e.flagsToPermissionString(t)||512&t)?31:$e.nodePermissions(e,$e.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=$e.MAX_OPEN_FDS;e++)if(!$e.streams[e])return e;throw new $e.ErrnoError(33)},getStreamChecked(e){var t=$e.getStream(e);if(!t)throw new $e.ErrnoError(8);return t},getStream:e=>$e.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return $e.FSStream||($e.FSStream=function(){this.shared={}},$e.FSStream.prototype={},Object.defineProperties($e.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new $e.FSStream,e),-1==t&&(t=$e.nextfd()),e.fd=t,$e.streams[t]=e,e},closeStream(e){$e.streams[e]=null},chrdev_stream_ops:{open(e){var t=$e.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new $e.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){$e.devices[e]={stream_ops:t}},getDevice:e=>$e.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),$e.syncFSRequests++,$e.syncFSRequests>1&&U(`warning: ${$e.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=$e.getMounts($e.root.mount),i=0;function n(e){return $e.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,n(e));++i>=r.length&&n(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var i,n="/"===r,s=!r;if(n&&$e.root)throw new $e.ErrnoError(10);if(!n&&!s){var o=$e.lookupPath(r,{follow_mount:!1});if(r=o.path,i=o.node,$e.isMountpoint(i))throw new $e.ErrnoError(10);if(!$e.isDir(i.mode))throw new $e.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,n?$e.root=l:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),l},unmount(e){var t=$e.lookupPath(e,{follow_mount:!1});if(!$e.isMountpoint(t.node))throw new $e.ErrnoError(28);var r=t.node,i=r.mounted,n=$e.getMounts(i);Object.keys($e.nameTable).forEach((e=>{for(var t=$e.nameTable[e];t;){var r=t.name_next;n.includes(t.mount)&&$e.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(i);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var i=$e.lookupPath(e,{parent:!0}).node,n=be.basename(e);if(!n||"."===n||".."===n)throw new $e.ErrnoError(28);var s=$e.mayCreate(i,n);if(s)throw new $e.ErrnoError(s);if(!i.node_ops.mknod)throw new $e.ErrnoError(63);return i.node_ops.mknod(i,n,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,$e.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,$e.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),i="",n=0;n(void 0===r&&(r=t,t=438),t|=8192,$e.mknod(e,t,r)),symlink(e,t){if(!Se.resolve(e))throw new $e.ErrnoError(44);var r=$e.lookupPath(t,{parent:!0}).node;if(!r)throw new $e.ErrnoError(44);var i=be.basename(t),n=$e.mayCreate(r,i);if(n)throw new $e.ErrnoError(n);if(!r.node_ops.symlink)throw new $e.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename(e,t){var r,i,n=be.dirname(e),s=be.dirname(t),o=be.basename(e),a=be.basename(t);if(r=$e.lookupPath(e,{parent:!0}).node,i=$e.lookupPath(t,{parent:!0}).node,!r||!i)throw new $e.ErrnoError(44);if(r.mount!==i.mount)throw new $e.ErrnoError(75);var l,d=$e.lookupNode(r,o),u=Se.relative(e,s);if("."!==u.charAt(0))throw new $e.ErrnoError(28);if("."!==(u=Se.relative(t,n)).charAt(0))throw new $e.ErrnoError(55);try{l=$e.lookupNode(i,a)}catch(e){}if(d!==l){var h=$e.isDir(d.mode),c=$e.mayDelete(r,o,h);if(c)throw new $e.ErrnoError(c);if(c=l?$e.mayDelete(i,a,h):$e.mayCreate(i,a))throw new $e.ErrnoError(c);if(!r.node_ops.rename)throw new $e.ErrnoError(63);if($e.isMountpoint(d)||l&&$e.isMountpoint(l))throw new $e.ErrnoError(10);if(i!==r&&(c=$e.nodePermissions(r,"w")))throw new $e.ErrnoError(c);$e.hashRemoveNode(d);try{r.node_ops.rename(d,i,a)}catch(e){throw e}finally{$e.hashAddNode(d)}}},rmdir(e){var t=$e.lookupPath(e,{parent:!0}).node,r=be.basename(e),i=$e.lookupNode(t,r),n=$e.mayDelete(t,r,!0);if(n)throw new $e.ErrnoError(n);if(!t.node_ops.rmdir)throw new $e.ErrnoError(63);if($e.isMountpoint(i))throw new $e.ErrnoError(10);t.node_ops.rmdir(t,r),$e.destroyNode(i)},readdir(e){var t=$e.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new $e.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=$e.lookupPath(e,{parent:!0}).node;if(!t)throw new $e.ErrnoError(44);var r=be.basename(e),i=$e.lookupNode(t,r),n=$e.mayDelete(t,r,!1);if(n)throw new $e.ErrnoError(n);if(!t.node_ops.unlink)throw new $e.ErrnoError(63);if($e.isMountpoint(i))throw new $e.ErrnoError(10);t.node_ops.unlink(t,r),$e.destroyNode(i)},readlink(e){var t=$e.lookupPath(e).node;if(!t)throw new $e.ErrnoError(44);if(!t.node_ops.readlink)throw new $e.ErrnoError(28);return Se.resolve($e.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=$e.lookupPath(e,{follow:!t}).node;if(!r)throw new $e.ErrnoError(44);if(!r.node_ops.getattr)throw new $e.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>$e.stat(e,!0),chmod(e,t,r){var i;if(!(i="string"==typeof e?$e.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new $e.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod(e,t){$e.chmod(e,t,!0)},fchmod(e,t){var r=$e.getStreamChecked(e);$e.chmod(r.node,t)},chown(e,t,r,i){var n;if(!(n="string"==typeof e?$e.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new $e.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown(e,t,r){$e.chown(e,t,r,!0)},fchown(e,t,r){var i=$e.getStreamChecked(e);$e.chown(i.node,t,r)},truncate(e,t){if(t<0)throw new $e.ErrnoError(28);var r;if(!(r="string"==typeof e?$e.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new $e.ErrnoError(63);if($e.isDir(r.mode))throw new $e.ErrnoError(31);if(!$e.isFile(r.mode))throw new $e.ErrnoError(28);var i=$e.nodePermissions(r,"w");if(i)throw new $e.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=$e.getStreamChecked(e);if(0==(2097155&r.flags))throw new $e.ErrnoError(28);$e.truncate(r.node,t)},utime(e,t,r){var i=$e.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new $e.ErrnoError(44);var i;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Oe(t):t)?4095&r|32768:0,"object"==typeof e)i=e;else{e=be.normalize(e);try{i=$e.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(i){if(128&t)throw new $e.ErrnoError(20)}else i=$e.mknod(e,r,0),s=!0;if(!i)throw new $e.ErrnoError(44);if($e.isChrdev(i.mode)&&(t&=-513),65536&t&&!$e.isDir(i.mode))throw new $e.ErrnoError(54);if(!s){var o=$e.mayOpen(i,t);if(o)throw new $e.ErrnoError(o)}512&t&&!s&&$e.truncate(i,0),t&=-131713;var a=$e.createStream({node:i,path:$e.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!n.logReadFiles||1&t||($e.readFiles||($e.readFiles={}),e in $e.readFiles||($e.readFiles[e]=1)),a},close(e){if($e.isClosed(e))throw new $e.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{$e.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if($e.isClosed(e))throw new $e.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new $e.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new $e.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,i,n){if(i<0||n<0)throw new $e.ErrnoError(28);if($e.isClosed(e))throw new $e.ErrnoError(8);if(1==(2097155&e.flags))throw new $e.ErrnoError(8);if($e.isDir(e.node.mode))throw new $e.ErrnoError(31);if(!e.stream_ops.read)throw new $e.ErrnoError(28);var s=void 0!==n;if(s){if(!e.seekable)throw new $e.ErrnoError(70)}else n=e.position;var o=e.stream_ops.read(e,t,r,i,n);return s||(e.position+=o),o},write(e,t,r,i,n,s){if(i<0||n<0)throw new $e.ErrnoError(28);if($e.isClosed(e))throw new $e.ErrnoError(8);if(0==(2097155&e.flags))throw new $e.ErrnoError(8);if($e.isDir(e.node.mode))throw new $e.ErrnoError(31);if(!e.stream_ops.write)throw new $e.ErrnoError(28);e.seekable&&1024&e.flags&&$e.llseek(e,0,2);var o=void 0!==n;if(o){if(!e.seekable)throw new $e.ErrnoError(70)}else n=e.position;var a=e.stream_ops.write(e,t,r,i,n,s);return o||(e.position+=a),a},allocate(e,t,r){if($e.isClosed(e))throw new $e.ErrnoError(8);if(t<0||r<=0)throw new $e.ErrnoError(28);if(0==(2097155&e.flags))throw new $e.ErrnoError(8);if(!$e.isFile(e.node.mode)&&!$e.isDir(e.node.mode))throw new $e.ErrnoError(43);if(!e.stream_ops.allocate)throw new $e.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,i,n){if(0!=(2&i)&&0==(2&n)&&2!=(2097155&e.flags))throw new $e.ErrnoError(2);if(1==(2097155&e.flags))throw new $e.ErrnoError(2);if(!e.stream_ops.mmap)throw new $e.ErrnoError(43);return e.stream_ops.mmap(e,t,r,i,n)},msync:(e,t,r,i,n)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,n):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new $e.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,i=$e.open(e,t.flags),n=$e.stat(e).size,s=new Uint8Array(n);return $e.read(i,s,0,n,0),"utf8"===t.encoding?r=xe(s,0):"binary"===t.encoding&&(r=s),$e.close(i),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var i=$e.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(Ae(t)+1),s=Te(t,n,0,n.length);$e.write(i,n,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");$e.write(i,t,0,t.byteLength,void 0,r.canOwn)}$e.close(i)},cwd:()=>$e.currentPath,chdir(e){var t=$e.lookupPath(e,{follow:!0});if(null===t.node)throw new $e.ErrnoError(44);if(!$e.isDir(t.node.mode))throw new $e.ErrnoError(54);var r=$e.nodePermissions(t.node,"x");if(r)throw new $e.ErrnoError(r);$e.currentPath=t.path},createDefaultDirectories(){$e.mkdir("/tmp"),$e.mkdir("/home"),$e.mkdir("/home/web_user")},createDefaultDevices(){$e.mkdir("/dev"),$e.registerDevice($e.makedev(1,3),{read:()=>0,write:(e,t,r,i,n)=>i}),$e.mkdev("/dev/null",$e.makedev(1,3)),Fe.register($e.makedev(5,0),Fe.default_tty_ops),Fe.register($e.makedev(6,0),Fe.default_tty1_ops),$e.mkdev("/dev/tty",$e.makedev(5,0)),$e.mkdev("/dev/tty1",$e.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=Ee(e).byteLength),e[--t]);$e.createDevice("/dev","random",r),$e.createDevice("/dev","urandom",r),$e.mkdir("/dev/shm"),$e.mkdir("/dev/shm/tmp")},createSpecialDirectories(){$e.mkdir("/proc");var e=$e.mkdir("/proc/self");$e.mkdir("/proc/self/fd"),$e.mount({mount(){var t=$e.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,i=$e.getStreamChecked(r),n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return n.parent=n,n}},t}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?$e.createDevice("/dev","stdin",n.stdin):$e.symlink("/dev/tty","/dev/stdin"),n.stdout?$e.createDevice("/dev","stdout",null,n.stdout):$e.symlink("/dev/tty","/dev/stdout"),n.stderr?$e.createDevice("/dev","stderr",null,n.stderr):$e.symlink("/dev/tty1","/dev/stderr"),$e.open("/dev/stdin",0),$e.open("/dev/stdout",1),$e.open("/dev/stderr",1)},ensureErrnoError(){$e.ErrnoError||($e.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},$e.ErrnoError.prototype=new Error,$e.ErrnoError.prototype.constructor=$e.ErrnoError,[44].forEach((e=>{$e.genericErrors[e]=new $e.ErrnoError(e),$e.genericErrors[e].stack=""})))},staticInit(){$e.ensureErrnoError(),$e.nameTable=new Array(4096),$e.mount(De,{},"/"),$e.createDefaultDirectories(),$e.createDefaultDevices(),$e.createSpecialDirectories(),$e.filesystems={MEMFS:De}},init(e,t,r){$e.init.initialized=!0,$e.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=r||n.stderr,$e.createStandardStreams()},quit(){$e.init.initialized=!1;for(var e=0;e<$e.streams.length;e++){var t=$e.streams[e];t&&$e.close(t)}},findObject(e,t){var r=$e.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{e=(i=$e.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=$e.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=i.path,r.parentObject=i.node,r.name=be.basename(e),i=$e.lookupPath(e,{follow:!t}),r.exists=!0,r.path=i.path,r.object=i.node,r.name=i.node.name,r.isRoot="/"===i.path}catch(e){r.error=e.errno}return r},createPath(e,t,r,i){e="string"==typeof e?e:$e.getPath(e);for(var n=t.split("/").reverse();n.length;){var s=n.pop();if(s){var o=be.join2(e,s);try{$e.mkdir(o)}catch(e){}e=o}}return o},createFile(e,t,r,i,n){var s=be.join2("string"==typeof e?e:$e.getPath(e),t),o=Ne(i,n);return $e.create(s,o)},createDataFile(e,t,r,i,n,s){var o=t;e&&(e="string"==typeof e?e:$e.getPath(e),o=t?be.join2(e,t):e);var a=Ne(i,n),l=$e.create(o,a);if(r){if("string"==typeof r){for(var d=new Array(r.length),u=0,h=r.length;uthis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;n||(o=i);var a=this;a.setDataGetter((e=>{var t=e*o,n=(e+1)*o-1;if(n=Math.min(n,i-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",r,!1),i!==o&&n.setRequestHeader("Range","bytes="+e+"-"+t),n.responseType="arraybuffer",n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+r+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):Ce(n.responseText||"",!0)})(t,n)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&i||(o=i=1,i=this.getter(0).length,o=i,S("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!c)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var l=$e.createFile(e,t,a,i,n);a.contents?l.contents=a.contents:a.url&&(l.contents=null,l.url=a.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var d={};function u(e,t,r,i,n){var s=e.node.contents;if(n>=s.length)return 0;var o=Math.min(s.length-n,i);if(s.slice)for(var a=0;a{var t=l.stream_ops[e];d[e]=function(){return $e.forceLoadFile(l),t.apply(null,arguments)}})),d.read=(e,t,r,i,n)=>($e.forceLoadFile(l),u(e,t,r,i,n)),d.mmap=(e,t,r,i,n)=>{$e.forceLoadFile(l);var s=Pe();if(!s)throw new $e.ErrnoError(48);return u(e,C,s,t,r),{ptr:s,allocated:!0}},l.stream_ops=d,l}},Ge=(e,t)=>e?xe(B,e,t):"",He={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(be.isAbs(t))return t;var i;if(i=-100===e?$e.cwd():He.getStreamFromFD(e).path,0==t.length){if(!r)throw new $e.ErrnoError(44);return i}return be.join2(i,t)},doStat(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&be.normalize(t)!==be.normalize($e.getPath(e.node)))return-54;throw e}D[r>>2]=i.dev,D[r+4>>2]=i.mode,I[r+8>>2]=i.nlink,D[r+12>>2]=i.uid,D[r+16>>2]=i.gid,D[r+20>>2]=i.rdev,se=[i.size>>>0,(ne=i.size,+Math.abs(ne)>=1?ne>0?+Math.floor(ne/4294967296)>>>0:~~+Math.ceil((ne-+(~~ne>>>0))/4294967296)>>>0:0)],D[r+24>>2]=se[0],D[r+28>>2]=se[1],D[r+32>>2]=4096,D[r+36>>2]=i.blocks;var n=i.atime.getTime(),s=i.mtime.getTime(),o=i.ctime.getTime();return se=[Math.floor(n/1e3)>>>0,(ne=Math.floor(n/1e3),+Math.abs(ne)>=1?ne>0?+Math.floor(ne/4294967296)>>>0:~~+Math.ceil((ne-+(~~ne>>>0))/4294967296)>>>0:0)],D[r+40>>2]=se[0],D[r+44>>2]=se[1],I[r+48>>2]=n%1e3*1e3,se=[Math.floor(s/1e3)>>>0,(ne=Math.floor(s/1e3),+Math.abs(ne)>=1?ne>0?+Math.floor(ne/4294967296)>>>0:~~+Math.ceil((ne-+(~~ne>>>0))/4294967296)>>>0:0)],D[r+56>>2]=se[0],D[r+60>>2]=se[1],I[r+64>>2]=s%1e3*1e3,se=[Math.floor(o/1e3)>>>0,(ne=Math.floor(o/1e3),+Math.abs(ne)>=1?ne>0?+Math.floor(ne/4294967296)>>>0:~~+Math.ceil((ne-+(~~ne>>>0))/4294967296)>>>0:0)],D[r+72>>2]=se[0],D[r+76>>2]=se[1],I[r+80>>2]=o%1e3*1e3,se=[i.ino>>>0,(ne=i.ino,+Math.abs(ne)>=1?ne>0?+Math.floor(ne/4294967296)>>>0:~~+Math.ceil((ne-+(~~ne>>>0))/4294967296)>>>0:0)],D[r+88>>2]=se[0],D[r+92>>2]=se[1],0},doMsync(e,t,r,i,n){if(!$e.isFile(t.node.mode))throw new $e.ErrnoError(43);if(2&i)return 0;var s=B.slice(e,e+r);$e.msync(t,s,n,r,i)},varargs:void 0,get(){var e=D[+He.varargs>>2];return He.varargs+=4,e},getp:()=>He.get(),getStr:e=>Ge(e),getStreamFromFD:e=>$e.getStreamChecked(e)};function Ve(e){if(p)return oi(0,1,e);T=e,W()||(qe.terminateAllThreads(),n.onExit&&n.onExit(e),z=!0),u(e,new pe(e))}var We=(e,t)=>{if(T=e,p)throw Ze(e),"unwind";Ve(e)},je=We,Ye=e=>{if(e instanceof pe||"unwind"==e)return T;u(1,e)},qe={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){p?qe.initWorker():qe.initMainThread()},initMainThread(){K((()=>{ee(),qe.loadWasmModuleToAllWorkers((()=>te()))}))},initWorker(){A=!1},setExitStatus:e=>{T=e},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of qe.runningWorkers)me(e);for(var e of qe.unusedWorkers)me(e);qe.unusedWorkers=[],qe.runningWorkers=[],qe.pthreads=[]},returnWorkerToPool:e=>{var t=e.pthread_ptr;delete qe.pthreads[t],qe.unusedWorkers.push(e),qe.runningWorkers.splice(qe.runningWorkers.indexOf(e),1),e.pthread_ptr=0,nn(t)},receiveObjectTransfer(e){},threadInitTLS(){qe.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=r=>{var i=r.data,s=i.cmd;if(i.targetThread&&i.targetThread!=Ji()){var o=qe.pthreads[i.targetThread];o?o.postMessage(i,i.transferList):U(`Internal error! Worker sent a message "${s}" to target pthread ${i.targetThread}, but that thread no longer exists!`)}else"checkMailbox"===s?ri():"spawnThread"===s?ve(i):"cleanupThread"===s?ye(i.thread):"killThread"===s?_e(i.thread):"cancelThread"===s?ge(i.thread):"loaded"===s?(e.loaded=!0,t(e)):"alert"===s?alert(`Thread ${i.threadId}: ${i.text}`):"setimmediate"===i.target?e.postMessage(i):"callHandler"===s?n[i.handler](...i.args):s&&U(`worker sent an unknown command ${s}`)},e.onerror=e=>{throw U(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e},f&&(e.on("message",(t=>e.onmessage({data:t}))),e.on("error",(t=>e.onerror(t))));var r=[];for(var i of["onExit","onAbort","print","printErr"])n.hasOwnProperty(i)&&r.push(i);e.postMessage({cmd:"load",handlers:r,urlOrBlob:n.mainScriptUrlOrBlob,wasmMemory:x,wasmModule:k})})),loadWasmModuleToAllWorkers(e){e()},allocateUnusedWorker(){var e;if(n.locateFile){var t=_("decoder-pro-mt-worker.worker.js");e=new Worker(t)}else e=new Worker(new URL("decoder-pro-mt-worker.worker.js","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href));qe.unusedWorkers.push(e)},getNewWorker:()=>(0==qe.unusedWorkers.length&&(qe.allocateUnusedWorker(),qe.loadWasmModuleToWorker(qe.unusedWorkers[0])),qe.unusedWorkers.pop())};n.PThread=qe;var Ke=e=>{for(;e.length>0;)e.shift()(n)},Xe=()=>{var e=Ji(),t=I[e+52>>2],r=I[e+56>>2];an(t,t-r),dn(t)};function Ze(e){if(p)return oi(1,0,e);je(e)}n.establishStackSpace=Xe;var Je,Qe=[],et=e=>{var t=Qe[e];return t||(e>=Qe.length&&(Qe.length=e+1),Qe[e]=t=Je.get(e)),t},tt=(e,t)=>{!function(e){W()?qe.setExitStatus(e):sn(e)}(et(e)(t))};n.invokeEntryPoint=tt;var rt=e=>{qe.tlsInitFunctions.push(e)};function it(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){I[this.ptr+4>>2]=e},this.get_type=function(){return I[this.ptr+4>>2]},this.set_destructor=function(e){I[this.ptr+8>>2]=e},this.get_destructor=function(){return I[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,C[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=C[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,C[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=C[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){I[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return I[this.ptr+16>>2]},this.get_exception_ptr=function(){if(hn(this.get_type()))return I[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var nt=(e,t,r)=>{throw new it(e).init(t,r),e},st=e=>{en(e,!c,1,!h,65536,!1),qe.threadInitTLS()},ot=e=>{p?postMessage({cmd:"cleanupThread",thread:e}):ye(e)};function at(e,t,r,i){return p?oi(2,1,e,t,r,i):lt(e,t,r,i)}var lt=(e,t,r,i)=>{if("undefined"==typeof SharedArrayBuffer)return U("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var n=[];if(p&&0===n.length)return at(e,t,r,i);var s={startRoutine:r,pthread_ptr:e,arg:i,transferList:n};return p?(s.cmd="spawnThread",postMessage(s,n),0):ve(s)},dt=e=>(D[Zi()>>2]=e,e);function ut(e,t,r){if(p)return oi(3,1,e,t,r);He.varargs=r;try{var i=He.getStreamFromFD(e);switch(t){case 0:if((n=He.get())<0)return-28;for(;$e.streams[n];)n++;return $e.createStream(i,n).fd;case 1:case 2:case 6:case 7:return 0;case 3:return i.flags;case 4:var n=He.get();return i.flags|=n,0;case 5:return n=He.getp(),F[n+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return dt(28),-1}}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return-e.errno}}function ht(e,t,r,i){if(p)return oi(4,1,e,t,r,i);He.varargs=i;try{t=He.getStr(t),t=He.calculateAt(e,t);var n=i?He.get():0;return $e.open(t,r,n).fd}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return-e.errno}}var ct,ft,pt,mt=(e,t,r,i,n)=>{},_t=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);ct=e},gt=e=>{for(var t="",r=e;B[r];)t+=ct[B[r++]];return t},yt={},vt={},bt={},wt=e=>{throw new ft(e)},Et=e=>{throw new pt(e)},St=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Et("Mismatched type converter count");for(var n=0;n{vt.hasOwnProperty(e)?n[t]=vt[e]:(s.push(e),yt.hasOwnProperty(e)||(yt[e]=[]),yt[e].push((()=>{n[t]=vt[e],++o===s.length&&i(n)})))})),0===s.length&&i(n)};function Ut(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i=t.name;if(e||wt(`type "${i}" must have a positive integer typeid pointer`),vt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;wt(`Cannot register type '${i}' twice`)}if(vt[e]=t,delete bt[e],yt.hasOwnProperty(e)){var n=yt[e];delete yt[e],n.forEach((e=>e()))}}function xt(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ut(e,t,r)}var kt,At=8,Tt=(e,t,r,i)=>{xt(e,{name:t=gt(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:At,readValueFromPointer:function(e){return this.fromWireType(B[e])},destructorFunction:null})},Ct=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Bt=e=>{wt(e.$$.ptrType.registeredClass.name+" instance already deleted")},Ft=!1,Pt=e=>{},Dt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},It=e=>{e.count.value-=1,0===e.count.value&&Dt(e)},Lt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=Lt(e,t,r.baseClass);return null===i?null:r.downcast(i)},Rt={},zt=()=>Object.keys(Ht).length,Mt=()=>{var e=[];for(var t in Ht)Ht.hasOwnProperty(t)&&e.push(Ht[t]);return e},Ot=[],Nt=()=>{for(;Ot.length;){var e=Ot.pop();e.$$.deleteScheduled=!1,e.delete()}},$t=e=>{kt=e,Ot.length&&kt&&kt(Nt)},Gt=()=>{n.getInheritedInstanceCount=zt,n.getLiveInheritedInstances=Mt,n.flushPendingDeletes=Nt,n.setDelayFunction=$t},Ht={},Vt=(e,t)=>{for(void 0===t&&wt("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},Wt=(e,t)=>(t=Vt(e,t),Ht[t]),jt=(e,t)=>(t.ptrType&&t.ptr||Et("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Et("Both smartPtrType and smartPtr must be specified"),t.count={value:1},qt(Object.create(e,{$$:{value:t}})));function Yt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Wt(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function n(){return this.isSmartPointer?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=Rt[o];if(!a)return n.call(this);s=this.isConst?a.constPointerType:a.pointerType;var l=Lt(t,this.registeredClass,s.registeredClass);return null===l?n.call(this):this.isSmartPointer?jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var qt=e=>"undefined"==typeof FinalizationRegistry?(qt=e=>e,e):(Ft=new FinalizationRegistry((e=>{It(e.$$)})),qt=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Ft.register(e,r,e)}return e},Pt=e=>Ft.unregister(e),qt(e)),Kt=()=>{Object.assign(Xt.prototype,{isAliasOf(e){if(!(this instanceof Xt))return!1;if(!(e instanceof Xt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)n=i.upcast(n),i=i.baseClass;return t===i&&r===n},clone(){if(this.$$.ptr||Bt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=qt(Object.create(Object.getPrototypeOf(this),{$$:{value:Ct(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&wt("Object already scheduled for deletion"),Pt(this),It(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&wt("Object already scheduled for deletion"),Ot.push(this),1===Ot.length&&kt&&kt(Nt),this.$$.deleteScheduled=!0,this}})};function Xt(){}var Zt=48,Jt=57,Qt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Zt&&t<=Jt?`_${e}`:e};function er(e,t){return{[e=Qt(e)]:function(){return t.apply(this,arguments)}}[e]}var tr=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||wt(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}},rr=(e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&wt(`Cannot register public name '${e}' twice`),tr(n,e,e),n.hasOwnProperty(r)&&wt(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))};function ir(e,t,r,i,n,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=n,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}var nr=(e,t,r)=>{for(;t!==r;)t.upcast||wt(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function sr(e,t){if(null===t)return this.isReference&&wt(`null is not a valid ${this.name}`),0;t.$$||wt(`Cannot pass "${Rr(t)}" as a ${this.name}`),t.$$.ptr||wt(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return nr(t.$$.ptr,r,this.registeredClass)}function or(e,t){var r;if(null===t)return this.isReference&&wt(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||wt(`Cannot pass "${Rr(t)}" as a ${this.name}`),t.$$.ptr||wt(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&wt(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=nr(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&wt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:wt(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var n=t.clone();r=this.rawShare(r,Dr.toHandle((()=>n.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:wt("Unsupporting sharing policy")}return r}function ar(e,t){if(null===t)return this.isReference&&wt(`null is not a valid ${this.name}`),0;t.$$||wt(`Cannot pass "${Rr(t)}" as a ${this.name}`),t.$$.ptr||wt(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&wt(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return nr(t.$$.ptr,r,this.registeredClass)}function lr(e){return this.fromWireType(I[e>>2])}var dr=()=>{Object.assign(ur.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:At,readValueFromPointer:lr,deleteObject(e){null!==e&&e.delete()},fromWireType:Yt})};function ur(e,t,r,i,n,s,o,a,l,d,u){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=n,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=u,n||void 0!==t.baseClass?this.toWireType=or:i?(this.toWireType=sr,this.destructorFunction=null):(this.toWireType=ar,this.destructorFunction=null)}var hr,cr=(e,t,r)=>{n.hasOwnProperty(e)||Et("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},fr=(e,t,r)=>{var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)},pr=(e,t,r)=>e.includes("j")?fr(e,t,r):et(t).apply(null,r),mr=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),pr(e,t,r)}},_r=(e,t)=>{var r=(e=gt(e)).includes("j")?mr(e,t):et(t);return"function"!=typeof r&&wt(`unknown function pointer with signature ${e}: ${t}`),r},gr=(e,t)=>{var r=er(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},yr=e=>{var t=Qi(e),r=gt(t);return Ki(t),r},vr=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||vt[t]||(bt[t]?bt[t].forEach(e):(r.push(t),i[t]=!0))})),new hr(`${e}: `+r.map(yr).join([", "]))},br=(e,t,r,i,n,s,o,a,l,d,u,h,c)=>{u=gt(u),s=_r(n,s),a&&(a=_r(o,a)),d&&(d=_r(l,d)),c=_r(h,c);var f=Qt(u);rr(f,(function(){vr(`Cannot construct ${u} due to unbound types`,[i])})),St([e,t,r],i?[i]:[],(function(t){var r,n;t=t[0],n=i?(r=t.registeredClass).instancePrototype:Xt.prototype;var o=er(f,(function(){if(Object.getPrototypeOf(this)!==l)throw new ft("Use 'new' to construct "+u);if(void 0===h.constructor_body)throw new ft(u+" has no accessible constructor");var e=h.constructor_body[arguments.length];if(void 0===e)throw new ft(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(h.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(n,{constructor:{value:o}});o.prototype=l;var h=new ir(u,o,l,c,r,s,a,d);h.baseClass&&(void 0===h.baseClass.__derivedClasses&&(h.baseClass.__derivedClasses=[]),h.baseClass.__derivedClasses.push(h));var p=new ur(u,h,!0,!1,!1),m=new ur(u+"*",h,!1,!1,!1),_=new ur(u+" const*",h,!1,!0,!1);return Rt[e]={pointerType:m,constPointerType:_},cr(f,o),[p,m,_]}))},wr=(e,t)=>{for(var r=[],i=0;i>2]);return r},Er=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Sr(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=er(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,n=e.apply(i,t);return n instanceof Object?n:i}function Ur(e,t,r,i,n,s){var o=t.length;o<2&&wt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,l=!1,d=1;d0?", ":"")+c),f+=(u||s?"var rv = ":"")+"invoker(fn"+(c.length>0?", ":"")+c+");\n",l)f+="runDestructors(destructors);\n";else for(d=a?1:2;d{var o=wr(t,r);n=_r(i,n),St([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new ft(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{vr(`Cannot construct ${e.name} due to unbound types`,o)},St([],o,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Ur(r,i,null,n,s),[]))),[]}))},kr=(e,t,r,i,n,s,o,a,l)=>{var d=wr(r,i);t=gt(t),s=_r(n,s),St([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function n(){vr(`Cannot call ${i} due to unbound types`,d)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,h=u[t];return void 0===h||void 0===h.overloadTable&&h.className!==e.name&&h.argCount===r-2?(n.argCount=r-2,n.className=e.name,u[t]=n):(tr(u,t,i),u[t].overloadTable[r-2]=n),St([],d,(function(n){var a=Ur(i,n,e,s,o,l);return void 0===u[t].overloadTable?(a.argCount=r-2,u[t]=a):u[t].overloadTable[r-2]=a,[]})),[]}))};function Ar(){Object.assign(Tr.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Tr(){this.allocated=[void 0],this.freelist=[]}var Cr=new Tr,Br=e=>{e>=Cr.reserved&&0==--Cr.get(e).refcount&&Cr.free(e)},Fr=()=>{for(var e=0,t=Cr.reserved;t{Cr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Cr.reserved=Cr.allocated.length,n.count_emval_handles=Fr},Dr={toValue:e=>(e||wt("Cannot use deleted val. handle = "+e),Cr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Cr.allocate({refcount:1,value:e})}}};function Ir(e){return this.fromWireType(D[e>>2])}var Lr=(e,t)=>{xt(e,{name:t=gt(t),fromWireType:e=>{var t=Dr.toValue(e);return Br(e),t},toWireType:(e,t)=>Dr.toHandle(t),argPackAdvance:At,readValueFromPointer:Ir,destructorFunction:null})},Rr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},zr=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(L[e>>2])};case 8:return function(e){return this.fromWireType(R[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Mr=(e,t,r)=>{xt(e,{name:t=gt(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:At,readValueFromPointer:zr(t,r),destructorFunction:null})},Or=(e,t,r)=>{switch(t){case 1:return r?e=>C[e>>0]:e=>B[e>>0];case 2:return r?e=>F[e>>1]:e=>P[e>>1];case 4:return r?e=>D[e>>2]:e=>I[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Nr=(e,t,r,i,n)=>{t=gt(t);var s=e=>e;if(0===i){var o=32-8*r;s=e=>e<>>o}var a=t.includes("unsigned");xt(e,{name:t,fromWireType:s,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:At,readValueFromPointer:Or(t,r,0!==i),destructorFunction:null})},$r=(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=I[e>>2],r=I[e+4>>2];return new i(C.buffer,r,t)}xt(e,{name:r=gt(r),fromWireType:n,argPackAdvance:At,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},Gr=(e,t,r)=>Te(e,B,t,r),Hr=(e,t)=>{var r="std::string"===(t=gt(t));xt(e,{name:t,fromWireType(e){var t,i=I[e>>2],n=e+4;if(r)for(var s=n,o=0;o<=i;++o){var a=n+o;if(o==i||0==B[a]){var l=Ge(s,a-s);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),s=a+1}}else{var d=new Array(i);for(o=0;o>2]=i,r&&n)Gr(t,o,i+1);else if(n)for(var a=0;a255&&(Ki(o),wt("String has UTF-16 code units that do not fit in 8 bits")),B[o+a]=l}else for(a=0;a{for(var r=e,i=r>>1,n=i+t/2;!(i>=n)&&P[i];)++i;if((r=i<<1)-e>32&&Vr)return Vr.decode(B.slice(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=F[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s},jr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return F[t>>1]=0,t-i},Yr=e=>2*e.length,qr=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var n=D[e+4*r>>2];if(0==n)break;if(++r,n>=65536){var s=n-65536;i+=String.fromCharCode(55296|s>>10,56320|1023&s)}else i+=String.fromCharCode(n)}return i},Kr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,s=0;s=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s)),D[t>>2]=o,(t+=4)+4>n)break}return D[t>>2]=0,t-i},Xr=e=>{for(var t=0,r=0;r=55296&&i<=57343&&++r,t+=4}return t},Zr=(e,t,r)=>{var i,n,s,o,a;r=gt(r),2===t?(i=Wr,n=jr,o=Yr,s=()=>P,a=1):4===t&&(i=qr,n=Kr,o=Xr,s=()=>I,a=2),xt(e,{name:r,fromWireType:e=>{for(var r,n=I[e>>2],o=s(),l=e+4,d=0;d<=n;++d){var u=e+4+d*t;if(d==n||0==o[u>>a]){var h=i(l,u-l);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),l=u+t}}return Ki(e),r},toWireType:(e,i)=>{"string"!=typeof i&&wt(`Cannot pass non-string to C++ string type ${r}`);var s=o(i),l=Xi(4+s+t);return I[l>>2]=s>>a,n(i,l+4,s+t),null!==e&&e.push(Ki,l),l},argPackAdvance:At,readValueFromPointer:Ir,destructorFunction(e){Ki(e)}})},Jr=(e,t)=>{xt(e,{isVoid:!0,name:t=gt(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Qr=()=>{if(!W())try{p?sn(T):je(T)}catch(e){Ye(e)}},ei=e=>{if(!z)try{e(),Qr()}catch(e){Ye(e)}},ti=e=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(D,e>>2,e).value.then(ri);var t=e+128;Atomics.store(D,t>>2,1)}};n.__emscripten_thread_mailbox_await=ti;var ri=()=>{var e=Ji();e&&(ti(e),ei((()=>on())))};n.checkMailbox=ri;var ii,ni=(e,t,r)=>{if(e==t)setTimeout((()=>ri()));else if(p)postMessage({targetThread:e,cmd:"checkMailbox"});else{var i=qe.pthreads[e];if(!i)return;i.postMessage({cmd:"checkMailbox"})}},si=e=>{var t=ln(),r=e();return dn(t),r},oi=function(e,t){var r=arguments.length-2,i=arguments;return si((()=>{for(var n=r,s=un(8*n),o=s>>3,a=0;a{ai.length=r;for(var n=i>>3,s=0;s{f&&qe.pthreads[e].ref()},ui={},hi=e=>{var t=ui[e];return void 0===t?gt(e):t},ci=[],fi=(e,t,r,i)=>{(e=ci[e])(t=Dr.toValue(t),r=hi(r),null,i)},pi=e=>{var t=ci.length;return ci.push(e),t},mi=(e,t)=>{var r=vt[e];return void 0===r&&wt(t+" has unknown type "+yr(e)),r},_i=(e,t)=>{for(var r=new Array(e),i=0;i>2],"parameter "+i);return r},gi={},yi=(e,t)=>{var r=_i(e,t),i=r[0],n=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",s=gi[n];if(void 0!==s)return s;for(var o=["retType"],a=[i],l="",d=0;d{re("")},bi=()=>{},wi=()=>Date.now(),Ei=()=>{V+=1},Si=()=>{throw Ei(),"unwind"},Ui=()=>B.length,xi=()=>Ui();ii=()=>performance.timeOrigin+performance.now();var ki=()=>f?g("os").cpus().length:navigator.hardwareConcurrency,Ai=e=>{re("OOM")},Ti=e=>{B.length,Ai()},Ci={},Bi=()=>d||"./this.program",Fi=()=>{if(!Fi.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Bi()};for(var t in Ci)void 0===Ci[t]?delete e[t]:e[t]=Ci[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Fi.strings=r}return Fi.strings},Pi=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);C[t>>0]=0},Di=function(e,t){if(p)return oi(5,1,e,t);var r=0;return Fi().forEach(((i,n)=>{var s=t+r;I[e+4*n>>2]=s,Pi(i,s),r+=i.length+1})),0},Ii=function(e,t){if(p)return oi(6,1,e,t);var r=Fi();I[e>>2]=r.length;var i=0;return r.forEach((e=>i+=e.length+1)),I[t>>2]=i,0};function Li(e){if(p)return oi(7,1,e);try{var t=He.getStreamFromFD(e);return $e.close(t),0}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return e.errno}}function Ri(e,t){if(p)return oi(8,1,e,t);try{var r=He.getStreamFromFD(e),i=r.tty?2:$e.isDir(r.mode)?3:$e.isLink(r.mode)?7:4;return C[t>>0]=i,F[t+2>>1]=0,se=[0,(ne=0,+Math.abs(ne)>=1?ne>0?+Math.floor(ne/4294967296)>>>0:~~+Math.ceil((ne-+(~~ne>>>0))/4294967296)>>>0:0)],D[t+8>>2]=se[0],D[t+12>>2]=se[1],se=[0,(ne=0,+Math.abs(ne)>=1?ne>0?+Math.floor(ne/4294967296)>>>0:~~+Math.ceil((ne-+(~~ne>>>0))/4294967296)>>>0:0)],D[t+16>>2]=se[0],D[t+20>>2]=se[1],0}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return e.errno}}var zi=(e,t,r,i)=>{for(var n=0,s=0;s>2],a=I[t+4>>2];t+=8;var l=$e.read(e,C,o,a,i);if(l<0)return-1;if(n+=l,l>2]=s,0}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return e.errno}}var Oi=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN;function Ni(e,t,r,i,n){if(p)return oi(10,1,e,t,r,i,n);var s=Oi(t,r);try{if(isNaN(s))return 61;var o=He.getStreamFromFD(e);return $e.llseek(o,s,i),se=[o.position>>>0,(ne=o.position,+Math.abs(ne)>=1?ne>0?+Math.floor(ne/4294967296)>>>0:~~+Math.ceil((ne-+(~~ne>>>0))/4294967296)>>>0:0)],D[n>>2]=se[0],D[n+4>>2]=se[1],o.getdents&&0===s&&0===i&&(o.getdents=null),0}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return e.errno}}var $i=(e,t,r,i)=>{for(var n=0,s=0;s>2],a=I[t+4>>2];t+=8;var l=$e.write(e,C,o,a,i);if(l<0)return-1;n+=l,void 0!==i&&(i+=l)}return n};function Gi(e,t,r,i){if(p)return oi(11,1,e,t,r,i);try{var n=He.getStreamFromFD(e),s=$i(n,t,r);return I[i>>2]=s,0}catch(e){if(void 0===$e||"ErrnoError"!==e.name)throw e;return e.errno}}qe.init();var Hi=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=$e.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Vi=365,Wi=146;Object.defineProperties(Hi.prototype,{read:{get:function(){return(this.mode&Vi)===Vi},set:function(e){e?this.mode|=Vi:this.mode&=~Vi}},write:{get:function(){return(this.mode&Wi)===Wi},set:function(e){e?this.mode|=Wi:this.mode&=~Wi}},isFolder:{get:function(){return $e.isDir(this.mode)}},isDevice:{get:function(){return $e.isChrdev(this.mode)}}}),$e.FSNode=Hi,$e.createPreloadedFile=Me,$e.staticInit(),_t(),ft=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},pt=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Kt(),Gt(),dr(),hr=n.UnboundTypeError=gr(Error,"UnboundTypeError"),Ar(),Pr();var ji=[Ve,Ze,at,ut,ht,Di,Ii,Li,Ri,Mi,Ni,Gi],Yi={t:nt,H:st,l:ot,C:lt,O:ut,F:ht,w:mt,r:Tt,E:br,v:xr,f:kr,P:Lr,q:Mr,d:Nr,c:$r,p:Hr,i:Zr,s:Jr,y:ni,D:li,G:ti,M:di,h:fi,k:Br,j:yi,b:vi,m:bi,g:wi,L:Si,z:xi,e:ii,A:ki,x:Ti,J:Di,K:Ii,B:je,o:Li,I:Ri,N:Mi,u:Ni,n:Gi,a:x||n.wasmMemory},qi=fe(),Ki=e=>(Ki=qi.R)(e),Xi=e=>(Xi=qi.S)(e),Zi=()=>(Zi=qi.U)();n.__emscripten_tls_init=()=>(n.__emscripten_tls_init=qi.V)();var Ji=n._pthread_self=()=>(Ji=n._pthread_self=qi.W)(),Qi=e=>(Qi=qi.X)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=qi.Y)();var en=n.__emscripten_thread_init=(e,t,r,i,s,o)=>(en=n.__emscripten_thread_init=qi.Z)(e,t,r,i,s,o);n.__emscripten_thread_crashed=()=>(n.__emscripten_thread_crashed=qi._)();var tn,rn=(e,t,r,i)=>(rn=qi.$)(e,t,r,i),nn=e=>(nn=qi.aa)(e),sn=n.__emscripten_thread_exit=e=>(sn=n.__emscripten_thread_exit=qi.ba)(e),on=n.__emscripten_check_mailbox=()=>(on=n.__emscripten_check_mailbox=qi.ca)(),an=(e,t)=>(an=qi.da)(e,t),ln=()=>(ln=qi.ea)(),dn=e=>(dn=qi.fa)(e),un=e=>(un=qi.ga)(e),hn=e=>(hn=qi.ha)(e);function cn(){if(!(J>0)){if(p)return r(n),Y(),void startWorker(n);j(),J>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e())}function e(){tn||(tn=!0,n.calledRun=!0,z||(Y(),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),q()))}}if(n.dynCall_jiji=(e,t,r,i,s)=>(n.dynCall_jiji=qi.ia)(e,t,r,i,s),n._ff_h264_cabac_tables=111845,n.keepRuntimeAlive=W,n.wasmMemory=x,n.ExitStatus=pe,n.PThread=qe,Q=function e(){tn||cn(),tn||(Q=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return cn(),t.ready}),r=(()=>{var e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href;return async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,i,n;(n=t).ready=new Promise(((e,t)=>{r=e,i=t})),(n=void 0!==n?n:{}).locateFile=function(e){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:e};var s,o,a,l=Object.assign({},n),d="./this.program",u="object"==typeof window,h="function"==typeof importScripts,c="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";function p(e){return n.locateFile?n.locateFile(e,f):f+e}if(c){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href),_=m("fs"),g=m("path");f=h?g.dirname(f)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href)),s=(e,t)=>(e=J(e)?new URL(e):g.normalize(e),_.readFileSync(e,t?void 0:"utf8")),a=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},o=function(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=J(e)?new URL(e):g.normalize(e),_.readFile(e,i?void 0:"utf8",((e,n)=>{e?r(e):t(i?n.buffer:n)}))},!n.thisProgram&&process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),n.inspect=()=>"[Emscripten Module object]"}else(u||h)&&(h?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)});var y,v,b=n.print||console.log.bind(console),w=n.printErr||console.error.bind(console);Object.assign(n,l),l=null,n.arguments&&n.arguments,n.thisProgram&&(d=n.thisProgram),n.quit&&n.quit,n.wasmBinary&&(y=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&j("no native wasm support detected");var E,S,U,x,k,A,T,C,B=!1;function F(e,t){e||j(t)}function P(){var e=v.buffer;n.HEAP8=E=new Int8Array(e),n.HEAP16=U=new Int16Array(e),n.HEAPU8=S=new Uint8Array(e),n.HEAPU16=x=new Uint16Array(e),n.HEAP32=k=new Int32Array(e),n.HEAPU32=A=new Uint32Array(e),n.HEAPF32=T=new Float32Array(e),n.HEAPF64=C=new Float64Array(e)}var D=[],I=[],L=[];function R(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)O(n.preRun.shift());ne(D)}function z(){n.noFSInit||Ce.init.initialized||Ce.init(),Ce.ignorePermissions=!1,ne(I)}function M(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)$(n.postRun.shift());ne(L)}function O(e){D.unshift(e)}function N(e){I.unshift(e)}function $(e){L.unshift(e)}var G=0,H=null;function V(e){G++,n.monitorRunDependencies&&n.monitorRunDependencies(G)}function W(e){if(G--,n.monitorRunDependencies&&n.monitorRunDependencies(G),0==G&&H){var t=H;H=null,t()}}function j(e){n.onAbort&&n.onAbort(e),w(e="Aborted("+e+")"),B=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}var Y,q,K,X="data:application/octet-stream;base64,";function Z(e){return e.startsWith(X)}function J(e){return e.startsWith("file://")}function Q(e){if(e==Y&&y)return new Uint8Array(y);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!y&&(u||h)){if("function"==typeof fetch&&!J(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(o)return new Promise(((t,r)=>{o(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),j(e)}))}function re(e,t,r,i){return e||"function"!=typeof WebAssembly.instantiateStreaming||Z(t)||J(t)||c||"function"!=typeof fetch?te(t,r,i):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(i,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),te(t,r,i)}))))}function ie(){var e={a:ti};function t(e,t){return ri=e.exports,v=ri.D,P(),Dt=ri.G,N(ri.E),W(),ri}if(V(),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return re(y,Y,e,(function(e){t(e.instance)})).catch(i),{}}n.locateFile?Z(Y="decoder-pro-audio.wasm")||(Y=p(Y)):Y=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href).href;var ne=e=>{for(;e.length>0;)e.shift()(n)};function se(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){A[this.ptr+4>>2]=e},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(e){A[this.ptr+8>>2]=e},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,E[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=E[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,E[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=E[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){A[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(li(this.get_type()))return A[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var oe=(e,t,r)=>{throw new se(e).init(t,r),e},ae=e=>(k[ni()>>2]=e,e),le={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=le.isAbs(e),r="/"===e.substr(-1);return(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=le.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=le.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return le.normalize(e.join("/"))},join2:(e,t)=>le.normalize(e+"/"+t)},de=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(c)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}j("initRandomDevice")},ue=e=>(ue=de())(e),he={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:Ce.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=le.isAbs(i)}return(t?"/":"")+(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=he.resolve(e).substr(1),t=he.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),s=Math.min(i.length,n.length),o=s,a=0;a{for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&ce)return ce.decode(e.subarray(t,n));for(var s="";t>10,56320|1023&d)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s},pe=[],me=e=>{for(var t=0,r=0;r=55296&&i<=57343?(t+=4,++r):t+=3}return t},_e=(e,t,r,i)=>{if(!(i>0))return 0;for(var n=r,s=r+i-1,o=0;o=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o);if(a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-n};function ge(e,t,r){var i=r>0?r:me(e)+1,n=new Array(i),s=_e(e,n,0,n.length);return t&&(n.length=s),n}var ye=()=>{if(!pe.length){var e=null;if(c){var t=Buffer.alloc(256),r=0,i=process.stdin.fd;try{r=_.readSync(i,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ge(e,!0)}return pe.shift()},ve={ttys:[],init(){},shutdown(){},register(e,t){ve.ttys[e]={input:[],output:[],ops:t},Ce.registerDevice(e,ve.stream_ops)},stream_ops:{open(e){var t=ve.ttys[e.node.rdev];if(!t)throw new Ce.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,i,n){if(!e.tty||!e.tty.ops.get_char)throw new Ce.ErrnoError(60);for(var s=0,o=0;oye(),put_char(e,t){null===t||10===t?(b(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(fe(e.output,0)),e.output=[])}}},be=e=>{j()},we={ops_table:null,mount:e=>we.createNode(null,"/",16895,0),createNode(e,t,r,i){if(Ce.isBlkdev(r)||Ce.isFIFO(r))throw new Ce.ErrnoError(63);we.ops_table||(we.ops_table={dir:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,lookup:we.node_ops.lookup,mknod:we.node_ops.mknod,rename:we.node_ops.rename,unlink:we.node_ops.unlink,rmdir:we.node_ops.rmdir,readdir:we.node_ops.readdir,symlink:we.node_ops.symlink},stream:{llseek:we.stream_ops.llseek}},file:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:{llseek:we.stream_ops.llseek,read:we.stream_ops.read,write:we.stream_ops.write,allocate:we.stream_ops.allocate,mmap:we.stream_ops.mmap,msync:we.stream_ops.msync}},link:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,readlink:we.node_ops.readlink},stream:{}},chrdev:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:Ce.chrdev_stream_ops}});var n=Ce.createNode(e,t,r,i);return Ce.isDir(n.mode)?(n.node_ops=we.ops_table.dir.node,n.stream_ops=we.ops_table.dir.stream,n.contents={}):Ce.isFile(n.mode)?(n.node_ops=we.ops_table.file.node,n.stream_ops=we.ops_table.file.stream,n.usedBytes=0,n.contents=null):Ce.isLink(n.mode)?(n.node_ops=we.ops_table.link.node,n.stream_ops=we.ops_table.link.stream):Ce.isChrdev(n.mode)&&(n.node_ops=we.ops_table.chrdev.node,n.stream_ops=we.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n,e.timestamp=n.timestamp),n},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Ce.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Ce.isDir(e.mode)?t.size=4096:Ce.isFile(e.mode)?t.size=e.usedBytes:Ce.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&we.resizeFileStorage(e,t.size)},lookup(e,t){throw Ce.genericErrors[44]},mknod:(e,t,r,i)=>we.createNode(e,t,r,i),rename(e,t,r){if(Ce.isDir(e.mode)){var i;try{i=Ce.lookupNode(t,r)}catch(e){}if(i)for(var n in i.contents)throw new Ce.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Ce.lookupNode(e,t);for(var i in r.contents)throw new Ce.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var i=we.createNode(e,t,41471,0);return i.link=r,i},readlink(e){if(!Ce.isLink(e.mode))throw new Ce.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,i,n){var s=e.node.contents;if(n>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-n,i);if(o>8&&s.subarray)t.set(s.subarray(n,n+o),r);else for(var a=0;a0||r+t(we.stream_ops.write(e,t,0,i,r,!1),0)}},Ee=(e,t,r,i)=>{var n=i?"":`al ${e}`;o(e,(r=>{F(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),n&&W()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),n&&V()},Se=(e,t,r,i,n,s)=>Ce.createDataFile(e,t,r,i,n,s),Ue=n.preloadPlugins||[],xe=(e,t,r,i)=>{"undefined"!=typeof Browser&&Browser.init();var n=!1;return Ue.forEach((s=>{n||s.canHandle(t)&&(s.handle(e,t,r,i),n=!0)})),n},ke=(e,t,r,i,n,s,o,a,l,d)=>{var u=t?he.resolve(le.join2(e,t)):e;function h(r){function h(r){d&&d(),a||Se(e,t,r,i,n,l),s&&s(),W()}xe(r,u,h,(()=>{o&&o(),W()}))||h(r)}V(),"string"==typeof r?Ee(r,(e=>h(e)),o):h(r)},Ae=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Te=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Ce={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=he.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new Ce.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),i=Ce.root,n="/",s=0;s40)throw new Ce.ErrnoError(32)}}return{path:n,node:i}},getPath(e){for(var t;;){if(Ce.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,i=0;i>>0)%Ce.nameTable.length},hashAddNode(e){var t=Ce.hashName(e.parent.id,e.name);e.name_next=Ce.nameTable[t],Ce.nameTable[t]=e},hashRemoveNode(e){var t=Ce.hashName(e.parent.id,e.name);if(Ce.nameTable[t]===e)Ce.nameTable[t]=e.name_next;else for(var r=Ce.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Ce.mayLookup(e);if(r)throw new Ce.ErrnoError(r,e);for(var i=Ce.hashName(e.id,t),n=Ce.nameTable[i];n;n=n.name_next){var s=n.name;if(n.parent.id===e.id&&s===t)return n}return Ce.lookup(e,t)},createNode(e,t,r,i){var n=new Ce.FSNode(e,t,r,i);return Ce.hashAddNode(n),n},destroyNode(e){Ce.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Ce.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=Ce.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{Ce.lookupNode(e,t);return 20}catch(e){}return Ce.nodePermissions(e,"wx")},mayDelete(e,t,r){var i;try{i=Ce.lookupNode(e,t)}catch(e){return e.errno}var n=Ce.nodePermissions(e,"wx");if(n)return n;if(r){if(!Ce.isDir(i.mode))return 54;if(Ce.isRoot(i)||Ce.getPath(i)===Ce.cwd())return 10}else if(Ce.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?Ce.isLink(e.mode)?32:Ce.isDir(e.mode)&&("r"!==Ce.flagsToPermissionString(t)||512&t)?31:Ce.nodePermissions(e,Ce.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Ce.MAX_OPEN_FDS;e++)if(!Ce.streams[e])return e;throw new Ce.ErrnoError(33)},getStreamChecked(e){var t=Ce.getStream(e);if(!t)throw new Ce.ErrnoError(8);return t},getStream:e=>Ce.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Ce.FSStream||(Ce.FSStream=function(){this.shared={}},Ce.FSStream.prototype={},Object.defineProperties(Ce.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Ce.FSStream,e),-1==t&&(t=Ce.nextfd()),e.fd=t,Ce.streams[t]=e,e},closeStream(e){Ce.streams[e]=null},chrdev_stream_ops:{open(e){var t=Ce.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Ce.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Ce.devices[e]={stream_ops:t}},getDevice:e=>Ce.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Ce.syncFSRequests++,Ce.syncFSRequests>1&&w(`warning: ${Ce.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Ce.getMounts(Ce.root.mount),i=0;function n(e){return Ce.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,n(e));++i>=r.length&&n(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var i,n="/"===r,s=!r;if(n&&Ce.root)throw new Ce.ErrnoError(10);if(!n&&!s){var o=Ce.lookupPath(r,{follow_mount:!1});if(r=o.path,i=o.node,Ce.isMountpoint(i))throw new Ce.ErrnoError(10);if(!Ce.isDir(i.mode))throw new Ce.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,n?Ce.root=l:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),l},unmount(e){var t=Ce.lookupPath(e,{follow_mount:!1});if(!Ce.isMountpoint(t.node))throw new Ce.ErrnoError(28);var r=t.node,i=r.mounted,n=Ce.getMounts(i);Object.keys(Ce.nameTable).forEach((e=>{for(var t=Ce.nameTable[e];t;){var r=t.name_next;n.includes(t.mount)&&Ce.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(i);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var i=Ce.lookupPath(e,{parent:!0}).node,n=le.basename(e);if(!n||"."===n||".."===n)throw new Ce.ErrnoError(28);var s=Ce.mayCreate(i,n);if(s)throw new Ce.ErrnoError(s);if(!i.node_ops.mknod)throw new Ce.ErrnoError(63);return i.node_ops.mknod(i,n,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Ce.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Ce.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),i="",n=0;n(void 0===r&&(r=t,t=438),t|=8192,Ce.mknod(e,t,r)),symlink(e,t){if(!he.resolve(e))throw new Ce.ErrnoError(44);var r=Ce.lookupPath(t,{parent:!0}).node;if(!r)throw new Ce.ErrnoError(44);var i=le.basename(t),n=Ce.mayCreate(r,i);if(n)throw new Ce.ErrnoError(n);if(!r.node_ops.symlink)throw new Ce.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename(e,t){var r,i,n=le.dirname(e),s=le.dirname(t),o=le.basename(e),a=le.basename(t);if(r=Ce.lookupPath(e,{parent:!0}).node,i=Ce.lookupPath(t,{parent:!0}).node,!r||!i)throw new Ce.ErrnoError(44);if(r.mount!==i.mount)throw new Ce.ErrnoError(75);var l,d=Ce.lookupNode(r,o),u=he.relative(e,s);if("."!==u.charAt(0))throw new Ce.ErrnoError(28);if("."!==(u=he.relative(t,n)).charAt(0))throw new Ce.ErrnoError(55);try{l=Ce.lookupNode(i,a)}catch(e){}if(d!==l){var h=Ce.isDir(d.mode),c=Ce.mayDelete(r,o,h);if(c)throw new Ce.ErrnoError(c);if(c=l?Ce.mayDelete(i,a,h):Ce.mayCreate(i,a))throw new Ce.ErrnoError(c);if(!r.node_ops.rename)throw new Ce.ErrnoError(63);if(Ce.isMountpoint(d)||l&&Ce.isMountpoint(l))throw new Ce.ErrnoError(10);if(i!==r&&(c=Ce.nodePermissions(r,"w")))throw new Ce.ErrnoError(c);Ce.hashRemoveNode(d);try{r.node_ops.rename(d,i,a)}catch(e){throw e}finally{Ce.hashAddNode(d)}}},rmdir(e){var t=Ce.lookupPath(e,{parent:!0}).node,r=le.basename(e),i=Ce.lookupNode(t,r),n=Ce.mayDelete(t,r,!0);if(n)throw new Ce.ErrnoError(n);if(!t.node_ops.rmdir)throw new Ce.ErrnoError(63);if(Ce.isMountpoint(i))throw new Ce.ErrnoError(10);t.node_ops.rmdir(t,r),Ce.destroyNode(i)},readdir(e){var t=Ce.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Ce.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Ce.lookupPath(e,{parent:!0}).node;if(!t)throw new Ce.ErrnoError(44);var r=le.basename(e),i=Ce.lookupNode(t,r),n=Ce.mayDelete(t,r,!1);if(n)throw new Ce.ErrnoError(n);if(!t.node_ops.unlink)throw new Ce.ErrnoError(63);if(Ce.isMountpoint(i))throw new Ce.ErrnoError(10);t.node_ops.unlink(t,r),Ce.destroyNode(i)},readlink(e){var t=Ce.lookupPath(e).node;if(!t)throw new Ce.ErrnoError(44);if(!t.node_ops.readlink)throw new Ce.ErrnoError(28);return he.resolve(Ce.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Ce.lookupPath(e,{follow:!t}).node;if(!r)throw new Ce.ErrnoError(44);if(!r.node_ops.getattr)throw new Ce.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Ce.stat(e,!0),chmod(e,t,r){var i;"string"==typeof e?i=Ce.lookupPath(e,{follow:!r}).node:i=e;if(!i.node_ops.setattr)throw new Ce.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod(e,t){Ce.chmod(e,t,!0)},fchmod(e,t){var r=Ce.getStreamChecked(e);Ce.chmod(r.node,t)},chown(e,t,r,i){var n;"string"==typeof e?n=Ce.lookupPath(e,{follow:!i}).node:n=e;if(!n.node_ops.setattr)throw new Ce.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown(e,t,r){Ce.chown(e,t,r,!0)},fchown(e,t,r){var i=Ce.getStreamChecked(e);Ce.chown(i.node,t,r)},truncate(e,t){if(t<0)throw new Ce.ErrnoError(28);var r;"string"==typeof e?r=Ce.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new Ce.ErrnoError(63);if(Ce.isDir(r.mode))throw new Ce.ErrnoError(31);if(!Ce.isFile(r.mode))throw new Ce.ErrnoError(28);var i=Ce.nodePermissions(r,"w");if(i)throw new Ce.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Ce.getStreamChecked(e);if(0==(2097155&r.flags))throw new Ce.ErrnoError(28);Ce.truncate(r.node,t)},utime(e,t,r){var i=Ce.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Ce.ErrnoError(44);var i;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Ae(t):t)?4095&r|32768:0,"object"==typeof e)i=e;else{e=le.normalize(e);try{i=Ce.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(i){if(128&t)throw new Ce.ErrnoError(20)}else i=Ce.mknod(e,r,0),s=!0;if(!i)throw new Ce.ErrnoError(44);if(Ce.isChrdev(i.mode)&&(t&=-513),65536&t&&!Ce.isDir(i.mode))throw new Ce.ErrnoError(54);if(!s){var o=Ce.mayOpen(i,t);if(o)throw new Ce.ErrnoError(o)}512&t&&!s&&Ce.truncate(i,0),t&=-131713;var a=Ce.createStream({node:i,path:Ce.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!n.logReadFiles||1&t||(Ce.readFiles||(Ce.readFiles={}),e in Ce.readFiles||(Ce.readFiles[e]=1)),a},close(e){if(Ce.isClosed(e))throw new Ce.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Ce.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Ce.isClosed(e))throw new Ce.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ce.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Ce.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,i,n){if(i<0||n<0)throw new Ce.ErrnoError(28);if(Ce.isClosed(e))throw new Ce.ErrnoError(8);if(1==(2097155&e.flags))throw new Ce.ErrnoError(8);if(Ce.isDir(e.node.mode))throw new Ce.ErrnoError(31);if(!e.stream_ops.read)throw new Ce.ErrnoError(28);var s=void 0!==n;if(s){if(!e.seekable)throw new Ce.ErrnoError(70)}else n=e.position;var o=e.stream_ops.read(e,t,r,i,n);return s||(e.position+=o),o},write(e,t,r,i,n,s){if(i<0||n<0)throw new Ce.ErrnoError(28);if(Ce.isClosed(e))throw new Ce.ErrnoError(8);if(0==(2097155&e.flags))throw new Ce.ErrnoError(8);if(Ce.isDir(e.node.mode))throw new Ce.ErrnoError(31);if(!e.stream_ops.write)throw new Ce.ErrnoError(28);e.seekable&&1024&e.flags&&Ce.llseek(e,0,2);var o=void 0!==n;if(o){if(!e.seekable)throw new Ce.ErrnoError(70)}else n=e.position;var a=e.stream_ops.write(e,t,r,i,n,s);return o||(e.position+=a),a},allocate(e,t,r){if(Ce.isClosed(e))throw new Ce.ErrnoError(8);if(t<0||r<=0)throw new Ce.ErrnoError(28);if(0==(2097155&e.flags))throw new Ce.ErrnoError(8);if(!Ce.isFile(e.node.mode)&&!Ce.isDir(e.node.mode))throw new Ce.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ce.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,i,n){if(0!=(2&i)&&0==(2&n)&&2!=(2097155&e.flags))throw new Ce.ErrnoError(2);if(1==(2097155&e.flags))throw new Ce.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ce.ErrnoError(43);return e.stream_ops.mmap(e,t,r,i,n)},msync:(e,t,r,i,n)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,n):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Ce.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,i=Ce.open(e,t.flags),n=Ce.stat(e).size,s=new Uint8Array(n);return Ce.read(i,s,0,n,0),"utf8"===t.encoding?r=fe(s,0):"binary"===t.encoding&&(r=s),Ce.close(i),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var i=Ce.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(me(t)+1),s=_e(t,n,0,n.length);Ce.write(i,n,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Ce.write(i,t,0,t.byteLength,void 0,r.canOwn)}Ce.close(i)},cwd:()=>Ce.currentPath,chdir(e){var t=Ce.lookupPath(e,{follow:!0});if(null===t.node)throw new Ce.ErrnoError(44);if(!Ce.isDir(t.node.mode))throw new Ce.ErrnoError(54);var r=Ce.nodePermissions(t.node,"x");if(r)throw new Ce.ErrnoError(r);Ce.currentPath=t.path},createDefaultDirectories(){Ce.mkdir("/tmp"),Ce.mkdir("/home"),Ce.mkdir("/home/web_user")},createDefaultDevices(){Ce.mkdir("/dev"),Ce.registerDevice(Ce.makedev(1,3),{read:()=>0,write:(e,t,r,i,n)=>i}),Ce.mkdev("/dev/null",Ce.makedev(1,3)),ve.register(Ce.makedev(5,0),ve.default_tty_ops),ve.register(Ce.makedev(6,0),ve.default_tty1_ops),Ce.mkdev("/dev/tty",Ce.makedev(5,0)),Ce.mkdev("/dev/tty1",Ce.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ue(e).byteLength),e[--t]);Ce.createDevice("/dev","random",r),Ce.createDevice("/dev","urandom",r),Ce.mkdir("/dev/shm"),Ce.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Ce.mkdir("/proc");var e=Ce.mkdir("/proc/self");Ce.mkdir("/proc/self/fd"),Ce.mount({mount(){var t=Ce.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,i=Ce.getStreamChecked(r),n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return n.parent=n,n}},t}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?Ce.createDevice("/dev","stdin",n.stdin):Ce.symlink("/dev/tty","/dev/stdin"),n.stdout?Ce.createDevice("/dev","stdout",null,n.stdout):Ce.symlink("/dev/tty","/dev/stdout"),n.stderr?Ce.createDevice("/dev","stderr",null,n.stderr):Ce.symlink("/dev/tty1","/dev/stderr"),Ce.open("/dev/stdin",0),Ce.open("/dev/stdout",1),Ce.open("/dev/stderr",1)},ensureErrnoError(){Ce.ErrnoError||(Ce.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Ce.ErrnoError.prototype=new Error,Ce.ErrnoError.prototype.constructor=Ce.ErrnoError,[44].forEach((e=>{Ce.genericErrors[e]=new Ce.ErrnoError(e),Ce.genericErrors[e].stack=""})))},staticInit(){Ce.ensureErrnoError(),Ce.nameTable=new Array(4096),Ce.mount(we,{},"/"),Ce.createDefaultDirectories(),Ce.createDefaultDevices(),Ce.createSpecialDirectories(),Ce.filesystems={MEMFS:we}},init(e,t,r){Ce.init.initialized=!0,Ce.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=r||n.stderr,Ce.createStandardStreams()},quit(){Ce.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;n||(o=i);var a=this;a.setDataGetter((e=>{var t=e*o,n=(e+1)*o-1;if(n=Math.min(n,i-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",r,!1),i!==o&&n.setRequestHeader("Range","bytes="+e+"-"+t),n.responseType="arraybuffer",n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+r+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):ge(n.responseText||"",!0)})(t,n)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&i||(o=i=1,i=this.getter(0).length,o=i,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!h)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var l=Ce.createFile(e,t,a,i,n);a.contents?l.contents=a.contents:a.url&&(l.contents=null,l.url=a.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var d={};function u(e,t,r,i,n){var s=e.node.contents;if(n>=s.length)return 0;var o=Math.min(s.length-n,i);if(s.slice)for(var a=0;a{var t=l.stream_ops[e];d[e]=function(){return Ce.forceLoadFile(l),t.apply(null,arguments)}})),d.read=(e,t,r,i,n)=>(Ce.forceLoadFile(l),u(e,t,r,i,n)),d.mmap=(e,t,r,i,n)=>{Ce.forceLoadFile(l);var s=be();if(!s)throw new Ce.ErrnoError(48);return u(e,E,s,t,r),{ptr:s,allocated:!0}},l.stream_ops=d,l}},Be=(e,t)=>e?fe(S,e,t):"",Fe={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(le.isAbs(t))return t;var i;-100===e?i=Ce.cwd():i=Fe.getStreamFromFD(e).path;if(0==t.length){if(!r)throw new Ce.ErrnoError(44);return i}return le.join2(i,t)},doStat(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&le.normalize(t)!==le.normalize(Ce.getPath(e.node)))return-54;throw e}k[r>>2]=i.dev,k[r+4>>2]=i.mode,A[r+8>>2]=i.nlink,k[r+12>>2]=i.uid,k[r+16>>2]=i.gid,k[r+20>>2]=i.rdev,K=[i.size>>>0,(q=i.size,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],k[r+24>>2]=K[0],k[r+28>>2]=K[1],k[r+32>>2]=4096,k[r+36>>2]=i.blocks;var n=i.atime.getTime(),s=i.mtime.getTime(),o=i.ctime.getTime();return K=[Math.floor(n/1e3)>>>0,(q=Math.floor(n/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],k[r+40>>2]=K[0],k[r+44>>2]=K[1],A[r+48>>2]=n%1e3*1e3,K=[Math.floor(s/1e3)>>>0,(q=Math.floor(s/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],k[r+56>>2]=K[0],k[r+60>>2]=K[1],A[r+64>>2]=s%1e3*1e3,K=[Math.floor(o/1e3)>>>0,(q=Math.floor(o/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],k[r+72>>2]=K[0],k[r+76>>2]=K[1],A[r+80>>2]=o%1e3*1e3,K=[i.ino>>>0,(q=i.ino,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],k[r+88>>2]=K[0],k[r+92>>2]=K[1],0},doMsync(e,t,r,i,n){if(!Ce.isFile(t.node.mode))throw new Ce.ErrnoError(43);if(2&i)return 0;var s=S.slice(e,e+r);Ce.msync(t,s,n,r,i)},varargs:void 0,get(){var e=k[+Fe.varargs>>2];return Fe.varargs+=4,e},getp:()=>Fe.get(),getStr:e=>Be(e),getStreamFromFD:e=>Ce.getStreamChecked(e)};function Pe(e,t,r){Fe.varargs=r;try{var i=Fe.getStreamFromFD(e);switch(t){case 0:if((n=Fe.get())<0)return-28;for(;Ce.streams[n];)n++;return Ce.createStream(i,n).fd;case 1:case 2:case 6:case 7:return 0;case 3:return i.flags;case 4:var n=Fe.get();return i.flags|=n,0;case 5:n=Fe.getp();return U[n+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ae(28),-1}}catch(e){if(void 0===Ce||"ErrnoError"!==e.name)throw e;return-e.errno}}function De(e,t,r,i){Fe.varargs=i;try{t=Fe.getStr(t),t=Fe.calculateAt(e,t);var n=i?Fe.get():0;return Ce.open(t,r,n).fd}catch(e){if(void 0===Ce||"ErrnoError"!==e.name)throw e;return-e.errno}}var Ie,Le,Re,ze=(e,t,r,i,n)=>{},Me=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ie=e},Oe=e=>{for(var t="",r=e;S[r];)t+=Ie[S[r++]];return t},Ne={},$e={},Ge={},He=e=>{throw new Le(e)},Ve=e=>{throw new Re(e)},We=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Ve("Mismatched type converter count");for(var n=0;n{$e.hasOwnProperty(e)?n[t]=$e[e]:(s.push(e),Ne.hasOwnProperty(e)||(Ne[e]=[]),Ne[e].push((()=>{n[t]=$e[e],++o===s.length&&i(n)})))})),0===s.length&&i(n)};function je(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i=t.name;if(e||He(`type "${i}" must have a positive integer typeid pointer`),$e.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;He(`Cannot register type '${i}' twice`)}if($e[e]=t,delete Ge[e],Ne.hasOwnProperty(e)){var n=Ne[e];delete Ne[e],n.forEach((e=>e()))}}function Ye(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return je(e,t,r)}var qe,Ke=8,Xe=(e,t,r,i)=>{Ye(e,{name:t=Oe(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:Ke,readValueFromPointer:function(e){return this.fromWireType(S[e])},destructorFunction:null})},Ze=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Je=e=>{He(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},it=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=it(e,t,r.baseClass);return null===i?null:r.downcast(i)},nt={},st=()=>Object.keys(ht).length,ot=()=>{var e=[];for(var t in ht)ht.hasOwnProperty(t)&&e.push(ht[t]);return e},at=[],lt=()=>{for(;at.length;){var e=at.pop();e.$$.deleteScheduled=!1,e.delete()}},dt=e=>{qe=e,at.length&&qe&&qe(lt)},ut=()=>{n.getInheritedInstanceCount=st,n.getLiveInheritedInstances=ot,n.flushPendingDeletes=lt,n.setDelayFunction=dt},ht={},ct=(e,t)=>{for(void 0===t&&He("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=ct(e,t),ht[t]),pt=(e,t)=>(t.ptrType&&t.ptr||Ve("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&Ve("Both smartPtrType and smartPtr must be specified"),t.count={value:1},_t(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function n(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=nt[o];if(!a)return n.call(this);s=this.isConst?a.constPointerType:a.pointerType;var l=it(t,this.registeredClass,s.registeredClass);return null===l?n.call(this):this.isSmartPointer?pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var _t=e=>"undefined"==typeof FinalizationRegistry?(_t=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),_t=e=>{var t=e.$$;if(!!t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),_t(e)),gt=()=>{Object.assign(yt.prototype,{isAliasOf(e){if(!(this instanceof yt))return!1;if(!(e instanceof yt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)n=i.upcast(n),i=i.baseClass;return t===i&&r===n},clone(){if(this.$$.ptr||Je(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=_t(Object.create(Object.getPrototypeOf(this),{$$:{value:Ze(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),at.push(this),1===at.length&&qe&&qe(lt),this.$$.deleteScheduled=!0,this}})};function yt(){}var vt=48,bt=57,wt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=vt&&t<=bt?`_${e}`:e};function Et(e,t){return{[e=wt(e)]:function(){return t.apply(this,arguments)}}[e]}var St=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||He(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}},Ut=(e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&He(`Cannot register public name '${e}' twice`),St(n,e,e),n.hasOwnProperty(r)&&He(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))};function xt(e,t,r,i,n,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=n,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}var kt=(e,t,r)=>{for(;t!==r;)t.upcast||He(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function At(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${ar(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return kt(t.$$.ptr,r,this.registeredClass)}function Tt(e,t){var r;if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||He(`Cannot pass "${ar(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=kt(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&He("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var n=t.clone();r=this.rawShare(r,nr.toHandle((()=>n.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:He("Unsupporting sharing policy")}return r}function Ct(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${ar(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return kt(t.$$.ptr,r,this.registeredClass)}function Bt(e){return this.fromWireType(A[e>>2])}var Ft=()=>{Object.assign(Pt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Ke,readValueFromPointer:Bt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Pt(e,t,r,i,n,s,o,a,l,d,u){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=n,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=u,n||void 0!==t.baseClass?this.toWireType=Tt:i?(this.toWireType=At,this.destructorFunction=null):(this.toWireType=Ct,this.destructorFunction=null)}var Dt,It,Lt=(e,t,r)=>{n.hasOwnProperty(e)||Ve("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},Rt=(e,t,r)=>{var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)},zt=[],Mt=e=>{var t=zt[e];return t||(e>=zt.length&&(zt.length=e+1),zt[e]=t=Dt.get(e)),t},Ot=(e,t,r)=>e.includes("j")?Rt(e,t,r):Mt(t).apply(null,r),Nt=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Ot(e,t,r)}},$t=(e,t)=>{var r=(e=Oe(e)).includes("j")?Nt(e,t):Mt(t);return"function"!=typeof r&&He(`unknown function pointer with signature ${e}: ${t}`),r},Gt=(e,t)=>{var r=Et(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Ht=e=>{var t=si(e),r=Oe(t);return ii(t),r},Vt=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||$e[t]||(Ge[t]?Ge[t].forEach(e):(r.push(t),i[t]=!0))})),new It(`${e}: `+r.map(Ht).join([", "]))},Wt=(e,t,r,i,n,s,o,a,l,d,u,h,c)=>{u=Oe(u),s=$t(n,s),a&&(a=$t(o,a)),d&&(d=$t(l,d)),c=$t(h,c);var f=wt(u);Ut(f,(function(){Vt(`Cannot construct ${u} due to unbound types`,[i])})),We([e,t,r],i?[i]:[],(function(t){var r,n;t=t[0],n=i?(r=t.registeredClass).instancePrototype:yt.prototype;var o=Et(f,(function(){if(Object.getPrototypeOf(this)!==l)throw new Le("Use 'new' to construct "+u);if(void 0===h.constructor_body)throw new Le(u+" has no accessible constructor");var e=h.constructor_body[arguments.length];if(void 0===e)throw new Le(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(h.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(n,{constructor:{value:o}});o.prototype=l;var h=new xt(u,o,l,c,r,s,a,d);h.baseClass&&(void 0===h.baseClass.__derivedClasses&&(h.baseClass.__derivedClasses=[]),h.baseClass.__derivedClasses.push(h));var p=new Pt(u,h,!0,!1,!1),m=new Pt(u+"*",h,!1,!1,!1),_=new Pt(u+" const*",h,!1,!0,!1);return nt[e]={pointerType:m,constPointerType:_},Lt(f,o),[p,m,_]}))},jt=(e,t)=>{for(var r=[],i=0;i>2]);return r},Yt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function qt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=Et(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,n=e.apply(i,t);return n instanceof Object?n:i}function Kt(e,t,r,i,n,s){var o=t.length;o<2&&He("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,l=!1,d=1;d0?", ":"")+c),f+=(u||s?"var rv = ":"")+"invoker(fn"+(c.length>0?", ":"")+c+");\n",l)f+="runDestructors(destructors);\n";else for(d=a?1:2;d{var o=jt(t,r);n=$t(i,n),We([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Le(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Vt(`Cannot construct ${e.name} due to unbound types`,o)},We([],o,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Kt(r,i,null,n,s),[]))),[]}))},Zt=(e,t,r,i,n,s,o,a,l)=>{var d=jt(r,i);t=Oe(t),s=$t(n,s),We([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function n(){Vt(`Cannot call ${i} due to unbound types`,d)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,h=u[t];return void 0===h||void 0===h.overloadTable&&h.className!==e.name&&h.argCount===r-2?(n.argCount=r-2,n.className=e.name,u[t]=n):(St(u,t,i),u[t].overloadTable[r-2]=n),We([],d,(function(n){var a=Kt(i,n,e,s,o,l);return void 0===u[t].overloadTable?(a.argCount=r-2,u[t]=a):u[t].overloadTable[r-2]=a,[]})),[]}))};function Jt(){Object.assign(Qt.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Qt(){this.allocated=[void 0],this.freelist=[]}var er=new Qt,tr=e=>{e>=er.reserved&&0==--er.get(e).refcount&&er.free(e)},rr=()=>{for(var e=0,t=er.reserved;t{er.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),er.reserved=er.allocated.length,n.count_emval_handles=rr},nr={toValue:e=>(e||He("Cannot use deleted val. handle = "+e),er.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return er.allocate({refcount:1,value:e})}}};function sr(e){return this.fromWireType(k[e>>2])}var or=(e,t)=>{Ye(e,{name:t=Oe(t),fromWireType:e=>{var t=nr.toValue(e);return tr(e),t},toWireType:(e,t)=>nr.toHandle(t),argPackAdvance:Ke,readValueFromPointer:sr,destructorFunction:null})},ar=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},lr=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(T[e>>2])};case 8:return function(e){return this.fromWireType(C[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},dr=(e,t,r)=>{Ye(e,{name:t=Oe(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Ke,readValueFromPointer:lr(t,r),destructorFunction:null})},ur=(e,t,r)=>{switch(t){case 1:return r?e=>E[e>>0]:e=>S[e>>0];case 2:return r?e=>U[e>>1]:e=>x[e>>1];case 4:return r?e=>k[e>>2]:e=>A[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},hr=(e,t,r,i,n)=>{t=Oe(t);var s=e=>e;if(0===i){var o=32-8*r;s=e=>e<>>o}var a=t.includes("unsigned");Ye(e,{name:t,fromWireType:s,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Ke,readValueFromPointer:ur(t,r,0!==i),destructorFunction:null})},cr=(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=A[e>>2],r=A[e+4>>2];return new i(E.buffer,r,t)}Ye(e,{name:r=Oe(r),fromWireType:n,argPackAdvance:Ke,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},fr=(e,t,r)=>_e(e,S,t,r),pr=(e,t)=>{var r="std::string"===(t=Oe(t));Ye(e,{name:t,fromWireType(e){var t,i=A[e>>2],n=e+4;if(r)for(var s=n,o=0;o<=i;++o){var a=n+o;if(o==i||0==S[a]){var l=Be(s,a-s);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),s=a+1}}else{var d=new Array(i);for(o=0;o>2]=i,r&&n)fr(t,o,i+1);else if(n)for(var a=0;a255&&(ii(o),He("String has UTF-16 code units that do not fit in 8 bits")),S[o+a]=l}else for(a=0;a{for(var r=e,i=r>>1,n=i+t/2;!(i>=n)&&x[i];)++i;if((r=i<<1)-e>32&&mr)return mr.decode(S.subarray(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=U[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s},gr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return U[t>>1]=0,t-i},yr=e=>2*e.length,vr=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var n=k[e+4*r>>2];if(0==n)break;if(++r,n>=65536){var s=n-65536;i+=String.fromCharCode(55296|s>>10,56320|1023&s)}else i+=String.fromCharCode(n)}return i},br=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,s=0;s=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s);if(k[t>>2]=o,(t+=4)+4>n)break}return k[t>>2]=0,t-i},wr=e=>{for(var t=0,r=0;r=55296&&i<=57343&&++r,t+=4}return t},Er=(e,t,r)=>{var i,n,s,o,a;r=Oe(r),2===t?(i=_r,n=gr,o=yr,s=()=>x,a=1):4===t&&(i=vr,n=br,o=wr,s=()=>A,a=2),Ye(e,{name:r,fromWireType:e=>{for(var r,n=A[e>>2],o=s(),l=e+4,d=0;d<=n;++d){var u=e+4+d*t;if(d==n||0==o[u>>a]){var h=i(l,u-l);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),l=u+t}}return ii(e),r},toWireType:(e,i)=>{"string"!=typeof i&&He(`Cannot pass non-string to C++ string type ${r}`);var s=o(i),l=ai(4+s+t);return A[l>>2]=s>>a,n(i,l+4,s+t),null!==e&&e.push(ii,l),l},argPackAdvance:Ke,readValueFromPointer:sr,destructorFunction(e){ii(e)}})},Sr=(e,t)=>{Ye(e,{isVoid:!0,name:t=Oe(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Ur={},xr=e=>{var t=Ur[e];return void 0===t?Oe(e):t},kr=[],Ar=(e,t,r,i)=>{(e=kr[e])(t=nr.toValue(t),r=xr(r),null,i)},Tr=e=>{var t=kr.length;return kr.push(e),t},Cr=(e,t)=>{var r=$e[e];return void 0===r&&He(t+" has unknown type "+Ht(e)),r},Br=(e,t)=>{for(var r=new Array(e),i=0;i>2],"parameter "+i);return r},Fr={},Pr=(e,t)=>{var r=Br(e,t),i=r[0],n=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",s=Fr[n];if(void 0!==s)return s;for(var o=["retType"],a=[i],l="",d=0;dt+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Ir=()=>{j("")},Lr=()=>Date.now(),Rr=(e,t,r)=>S.copyWithin(e,t,t+r),zr=e=>{j("OOM")},Mr=e=>{S.length,zr()},Or={},Nr=()=>d||"./this.program",$r=()=>{if(!$r.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Nr()};for(var t in Or)void 0===Or[t]?delete e[t]:e[t]=Or[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);$r.strings=r}return $r.strings},Gr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);E[t>>0]=0},Hr=(e,t)=>{var r=0;return $r().forEach(((i,n)=>{var s=t+r;A[e+4*n>>2]=s,Gr(i,s),r+=i.length+1})),0},Vr=(e,t)=>{var r=$r();A[e>>2]=r.length;var i=0;return r.forEach((e=>i+=e.length+1)),A[t>>2]=i,0};function Wr(e){try{var t=Fe.getStreamFromFD(e);return Ce.close(t),0}catch(e){if(void 0===Ce||"ErrnoError"!==e.name)throw e;return e.errno}}function jr(e,t){try{var r=Fe.getStreamFromFD(e),i=r.tty?2:Ce.isDir(r.mode)?3:Ce.isLink(r.mode)?7:4;return E[t>>0]=i,U[t+2>>1]=0,K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],k[t+8>>2]=K[0],k[t+12>>2]=K[1],K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],k[t+16>>2]=K[0],k[t+20>>2]=K[1],0}catch(e){if(void 0===Ce||"ErrnoError"!==e.name)throw e;return e.errno}}var Yr=(e,t,r,i)=>{for(var n=0,s=0;s>2],a=A[t+4>>2];t+=8;var l=Ce.read(e,E,o,a,i);if(l<0)return-1;if(n+=l,l>2]=s,0}catch(e){if(void 0===Ce||"ErrnoError"!==e.name)throw e;return e.errno}}function Kr(e,t,r,i,n){var s=Dr(t,r);try{if(isNaN(s))return 61;var o=Fe.getStreamFromFD(e);return Ce.llseek(o,s,i),K=[o.position>>>0,(q=o.position,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],k[n>>2]=K[0],k[n+4>>2]=K[1],o.getdents&&0===s&&0===i&&(o.getdents=null),0}catch(e){if(void 0===Ce||"ErrnoError"!==e.name)throw e;return e.errno}}var Xr=(e,t,r,i)=>{for(var n=0,s=0;s>2],a=A[t+4>>2];t+=8;var l=Ce.write(e,E,o,a,i);if(l<0)return-1;n+=l,void 0!==i&&(i+=l)}return n};function Zr(e,t,r,i){try{var n=Fe.getStreamFromFD(e),s=Xr(n,t,r);return A[i>>2]=s,0}catch(e){if(void 0===Ce||"ErrnoError"!==e.name)throw e;return e.errno}}var Jr=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ce.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Qr=365,ei=146;Object.defineProperties(Jr.prototype,{read:{get:function(){return(this.mode&Qr)===Qr},set:function(e){e?this.mode|=Qr:this.mode&=~Qr}},write:{get:function(){return(this.mode&ei)===ei},set:function(e){e?this.mode|=ei:this.mode&=~ei}},isFolder:{get:function(){return Ce.isDir(this.mode)}},isDevice:{get:function(){return Ce.isChrdev(this.mode)}}}),Ce.FSNode=Jr,Ce.createPreloadedFile=ke,Ce.staticInit(),Me(),Le=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Re=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},gt(),ut(),Ft(),It=n.UnboundTypeError=Gt(Error,"UnboundTypeError"),Jt(),ir();var ti={p:oe,B:Pe,v:De,t:ze,n:Xe,r:Wt,q:Xt,f:Zt,C:or,m:dr,c:hr,b:cr,l:pr,h:Er,o:Sr,d:Ar,i:tr,e:Pr,a:Ir,g:Lr,z:Rr,u:Mr,x:Hr,y:Vr,k:Wr,w:jr,A:qr,s:Kr,j:Zr},ri=ie(),ii=e=>(ii=ri.F)(e),ni=()=>(ni=ri.H)(),si=e=>(si=ri.I)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=ri.J)();var oi,ai=e=>(ai=ri.K)(e),li=e=>(li=ri.M)(e);function di(){function e(){oi||(oi=!0,n.calledRun=!0,B||(z(),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),M()))}G>0||(R(),G>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_viiijj=(e,t,r,i,s,o,a,l)=>(n.dynCall_viiijj=ri.N)(e,t,r,i,s,o,a,l),n.dynCall_jij=(e,t,r,i)=>(n.dynCall_jij=ri.O)(e,t,r,i),n.dynCall_jii=(e,t,r)=>(n.dynCall_jii=ri.P)(e,t,r),n.dynCall_jiji=(e,t,r,i,s)=>(n.dynCall_jiji=ri.Q)(e,t,r,i,s),H=function e(){oi||di(),oi||(H=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return di(),t.ready}})(),n=1e-6,s="undefined"!=typeof Float32Array?Float32Array:Array;function o(){var e=new s(16);return s!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function a(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var l,d=function(e,t,r,i,n,s,o){var a=1/(t-r),l=1/(i-n),d=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*d,e[11]=0,e[12]=(t+r)*a,e[13]=(n+i)*l,e[14]=(o+s)*d,e[15]=1,e};function u(e,t,r){var i=new s(3);return i[0]=e,i[1]=t,i[2]=r,i}l=new s(3),s!=Float32Array&&(l[0]=0,l[1]=0,l[2]=0);var h=(e,t)=>{t&&e.pixelStorei(e.UNPACK_ALIGNMENT,1);const r=function(){const t=m(e.VERTEX_SHADER,"\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n "),r=m(e.FRAGMENT_SHADER,"\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),i=e.createProgram();if(e.attachShader(i,t),e.attachShader(i,r),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))return console.log("Unable to initialize the shader program: "+e.getProgramInfoLog(i)),null;return i}();let i={program:r,attribLocations:{vertexPosition:e.getAttribLocation(r,"aVertexPosition"),texturePosition:e.getAttribLocation(r,"aTexturePosition")},uniformLocations:{projectionMatrix:e.getUniformLocation(r,"uProjectionMatrix"),modelMatrix:e.getUniformLocation(r,"uModelMatrix"),viewMatrix:e.getUniformLocation(r,"uViewMatrix"),rgbatexture:e.getUniformLocation(r,"rgbaTexture"),ytexture:e.getUniformLocation(r,"yTexture"),utexture:e.getUniformLocation(r,"uTexture"),vtexture:e.getUniformLocation(r,"vTexture"),isyuv:e.getUniformLocation(r,"isyuv")}},s=function(){const t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e.STATIC_DRAW);var r=[];r=r.concat([0,1],[1,1],[1,0],[0,0]);const i=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,new Float32Array(r),e.STATIC_DRAW);const n=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{position:t,texPosition:i,indices:n}}(),l=p(),h=p(),c=p(),f=p();function p(){let t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function m(t,r){const i=e.createShader(t);return e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)?i:(console.log("An error occurred compiling the shaders: "+e.getShaderInfoLog(i)),e.deleteShader(i),null)}function _(t,r){e.viewport(0,0,t,r),e.clearColor(0,0,0,0),e.clearDepth(1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT);const l=o();d(l,-1,1,-1,1,.1,100);const p=o();a(p);const m=o();!function(e,t,r,i){var s,o,l,d,u,h,c,f,p,m,_=t[0],g=t[1],y=t[2],v=i[0],b=i[1],w=i[2],E=r[0],S=r[1],U=r[2];Math.abs(_-E)>1,(1&r)<<7|i<<3])}function lt(e){return dt(e)&&e[1]===Ke}function dt(e){return e[0]>>4===Ce}ot((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},r=e.exports,i=function(){for(var e,r=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,n=r.length,s={};i{if(n=i,"[object Number]"!==Object.prototype.toString.call(n))return;var n;t+=i;const s=ft(),o=s-r;o>=1e3&&(e(t/o*1e3),r=s,t=0)}}(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();function mt(e){let t=e.subarray(1,4),r="avc1.";for(let e=0;e<3;e++){let i=t[e].toString(16);i.length<2&&(i="0"+i),r+=i}return{codec:r,description:e}}function _t(e){return null==e}function gt(e){return!_t(e)}function yt(e){return"function"==typeof e}function vt(e){let t=null,r=31&e[0];return r!==De&&r!==Ie||(t=Ae),t||(r=(126&e[0])>>1,r!==Oe&&r!==Ne&&r!==$e||(t=Te)),t}function bt(){return"undefined"!=typeof WritableStream}function wt(e){e.close()}function Et(e,t){t&&(e=e.filter((e=>e.type&&e.type===t)));let r=e[0],i=null,n=1;if(e.length>0){let t=e[1];t&&t.ts-r.ts>1e5&&(r=t,n=2)}if(r)for(let s=n;s=1e3){e[s-1].ts-r.ts<1e3&&(i=s+1)}}}return i}function St(e){return e.ok&&e.status>=200&&e.status<=299}function Ut(){return function(e){let t="";if("object"==typeof e)try{t=JSON.stringify(e),t=JSON.parse(t)}catch(r){t=e}else t=e;return t}(S)}function xt(e){return e[0]>>4===Xe&&e[1]===Ke}function kt(e){return!0===e||"true"===e}function At(e){return!0!==e&&"true"!==e}var Tt=function(e,t,r,i){return new(r||(r=Promise))((function(n,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))};const Ct=Symbol(32),Bt=Symbol(16),Ft=Symbol(8);class Pt{constructor(e){this.g=e,this.consumed=0,e&&(this.need=e.next().value)}setG(e){this.g=e,this.demand(e.next().value,!0)}consume(){this.buffer&&this.consumed&&(this.buffer.copyWithin(0,this.consumed),this.buffer=this.buffer.subarray(0,this.buffer.length-this.consumed),this.consumed=0)}demand(e,t){return t&&this.consume(),this.need=e,this.flush()}read(e){return Tt(this,void 0,void 0,(function*(){return this.lastReadPromise&&(yield this.lastReadPromise),this.lastReadPromise=new Promise(((t,r)=>{var i;this.reject=r,this.resolve=e=>{delete this.lastReadPromise,delete this.resolve,delete this.need,t(e)};this.demand(e,!0)||null===(i=this.pull)||void 0===i||i.call(this,e)}))}))}readU32(){return this.read(Ct)}readU16(){return this.read(Bt)}readU8(){return this.read(Ft)}close(){var e;this.g&&this.g.return(),this.buffer&&this.buffer.subarray(0,0),null===(e=this.reject)||void 0===e||e.call(this,new Error("EOF")),delete this.lastReadPromise}flush(){if(!this.buffer||!this.need)return;let e=null;const t=this.buffer.subarray(this.consumed);let r=0;const i=e=>t.length<(r=e);if("number"==typeof this.need){if(i(this.need))return;e=t.subarray(0,r)}else if(this.need===Ct){if(i(4))return;e=t[0]<<24|t[1]<<16|t[2]<<8|t[3]}else if(this.need===Bt){if(i(2))return;e=t[0]<<8|t[1]}else if(this.need===Ft){if(i(1))return;e=t[0]}else if("buffer"in this.need){if("byteOffset"in this.need){if(i(this.need.byteLength-this.need.byteOffset))return;new Uint8Array(this.need.buffer,this.need.byteOffset).set(t.subarray(0,r)),e=this.need}else if(this.g)return void this.g.throw(new Error("Unsupported type"))}else{if(i(this.need.byteLength))return;new Uint8Array(this.need).set(t.subarray(0,r)),e=this.need}return this.consumed+=r,this.g?this.demand(this.g.next(e).value,!0):this.resolve&&this.resolve(e),e}write(e){if(e instanceof Uint8Array?this.malloc(e.length).set(e):"buffer"in e?this.malloc(e.byteLength).set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):this.malloc(e.byteLength).set(new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this.pull=e));this.flush()}writeU32(e){this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){this.malloc(2).set([e>>8&255,255&e]),this.flush()}writeU8(e){this.malloc(1)[0]=e,this.flush()}malloc(e){if(this.buffer){const t=this.buffer.length,r=t+e;if(r<=this.buffer.buffer.byteLength-this.buffer.byteOffset)this.buffer=new Uint8Array(this.buffer.buffer,this.buffer.byteOffset,r);else{const e=new Uint8Array(r);e.set(this.buffer),this.buffer=e}return this.buffer.subarray(t,r)}return this.buffer=new Uint8Array(e),this.buffer}}Pt.U32=Ct,Pt.U16=Bt,Pt.U8=Ft;class Dt{constructor(e){this.log=function(t){if(e._opt.debug&&e._opt.debugLevel==v){const s=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n1?r-1:0),n=1;n1?i-1:0),s=1;s32&&console.error("ExpGolomb: readBits() bits exceeded max 32bits!"),e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let r=e-this._current_word_bits_left;this._fillCurrentWord();let i=Math.min(r,this._current_word_bits_left),n=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,t=t<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}class Lt{static _ebsp2rbsp(e){let t=e,r=t.byteLength,i=new Uint8Array(r),n=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(i[n]=t[e],n++);return new Uint8Array(i.buffer,0,n)}static parseSPS(e){let t=Lt._ebsp2rbsp(e),r=new It(t);r.readByte();let i=r.readByte();r.readByte();let n=r.readByte();r.readUEG();let s=Lt.getProfileString(i),o=Lt.getLevelString(n),a=1,l=420,d=[0,420,422,444],u=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(a=r.readUEG(),3===a&&r.readBits(1),a<=3&&(l=d[a]),u=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool())){let e=3!==a?8:12;for(let t=0;t0&&e<16?(b=t[e-1],w=i[e-1]):255===e&&(b=r.readByte()<<8|r.readByte(),w=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){let e=r.readBits(32),t=r.readBits(32);S=r.readBool(),U=t,x=2*e,E=U/x}}let k=1;1===b&&1===w||(k=b/w);let A=0,T=0;if(0===a)A=1,T=2-m;else{A=3===a?1:2,T=(1===a?2:1)*(2-m)}let C=16*(f+1),B=16*(p+1)*(2-m);C-=(_+g)*A,B-=(y+v)*T;let F=Math.ceil(C*k);return r.destroy(),r=null,{profile_string:s,level_string:o,bit_depth:u,ref_frames:c,chroma_format:l,chroma_format_string:Lt.getChromaFormatString(l),frame_rate:{fixed:S,fps:E,fps_den:x,fps_num:U},sar_ratio:{width:b,height:w},codec_size:{width:C,height:B},present_size:{width:F,height:B}}}static parseSPS$2(e){let t=e.subarray(1,4),r="avc1.";for(let e=0;e<3;e++){let i=t[e].toString(16);i.length<2&&(i="0"+i),r+=i}let i=Lt._ebsp2rbsp(e),n=new It(i);n.readByte();let s=n.readByte();n.readByte();let o=n.readByte();n.readUEG();let a=Lt.getProfileString(s),l=Lt.getLevelString(o),d=1,u=420,h=[0,420,422,444],c=8,f=8;if((100===s||110===s||122===s||244===s||44===s||83===s||86===s||118===s||128===s||138===s||144===s)&&(d=n.readUEG(),3===d&&n.readBits(1),d<=3&&(u=h[d]),c=n.readUEG()+8,f=n.readUEG()+8,n.readBits(1),n.readBool())){let e=3!==d?8:12;for(let t=0;t0&&e<16?(S=t[e-1],U=r[e-1]):255===e&&(S=n.readByte()<<8|n.readByte(),U=n.readByte()<<8|n.readByte())}if(n.readBool()&&n.readBool(),n.readBool()&&(n.readBits(4),n.readBool()&&n.readBits(24)),n.readBool()&&(n.readUEG(),n.readUEG()),n.readBool()){let e=n.readBits(32),t=n.readBits(32);k=n.readBool(),A=t,T=2*e,x=A/T}}let C=1;1===S&&1===U||(C=S/U);let B=0,F=0;if(0===d)B=1,F=2-y;else{B=3===d?1:2,F=(1===d?2:1)*(2-y)}let P=16*(_+1),D=16*(g+1)*(2-y);P-=(v+b)*B,D-=(w+E)*F;let I=Math.ceil(P*C);return n.destroy(),n=null,{codec_mimetype:r,profile_idc:s,level_idc:o,profile_string:a,level_string:l,chroma_format_idc:d,bit_depth:c,bit_depth_luma:c,bit_depth_chroma:f,ref_frames:m,chroma_format:u,chroma_format_string:Lt.getChromaFormatString(u),frame_rate:{fixed:k,fps:x,fps_den:T,fps_num:A},sar_ratio:{width:S,height:U},codec_size:{width:P,height:D},present_size:{width:I,height:D}}}static _skipScalingList(e,t){let r=8,i=8,n=0;for(let s=0;s=this.buflen)return this.iserro=!0,0;this.iserro=!1,r=this.bufoff+e>8?8-this.bufoff:e,t<<=r,t+=this.buffer[this.bufpos]>>8-this.bufoff-r&255>>8-r,this.bufoff+=r,e-=r,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,r=this.bufoff,i=this.read(e);return this.bufpos=t,this.bufoff=r,i}read_golomb(){let e;for(e=0;0===this.read(1)&&!this.iserro;e++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(r,0),i.set(t.sps,4),t.sps=i}if(t.pps){const e=t.pps.byteLength,r=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(r,0),i.set(t.pps,4),t.pps=i}return t}function Mt(e){let{sps:t,pps:r}=e;const i=[23,0,0,0,0,1,66,0,30,255];i[0]=23,i[6]=t[1],i[7]=t[2],i[8]=t[3],i[10]=225,i[11]=t.byteLength>>8&255,i[12]=255&t.byteLength,i.push(...t,1,r.byteLength>>8&255,255&r.byteLength,...r);return new Uint8Array(i)}function Ot(e,t){let r=[];r[0]=t?23:39,r[1]=1,r[2]=0,r[3]=0,r[4]=0,r[5]=e.byteLength>>24&255,r[6]=e.byteLength>>16&255,r[7]=e.byteLength>>8&255,r[8]=255&e.byteLength;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function Nt(e,t){let r=[];r[0]=t?23:39,r[1]=1,r[2]=0,r[3]=0,r[4]=0;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function $t(e){return 31&e[0]}function Gt(e){return e===Re}function Ht(e){return!function(e){return e===De||e===Ie}(e)&&!Gt(e)}function Vt(e){return e===Le}function Wt(e){if(0===e.length)return!1;const t=$t(e[0]);for(let r=1;r{let t=e,r=t.byteLength,i=new Uint8Array(r),n=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(i[n]=t[e],n++);return new Uint8Array(i.buffer,0,n)},Yt=e=>{switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}};function qt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function Kt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e.length<4)return;const r=e.length,i=[];let n,s=0;for(;s+t>>=8),s+=t,n){if(s+n>r)break;i.push(e.subarray(s,s+n)),s+=n}return i}function Xt(e){const t=e.byteLength,r=new Uint8Array(4);r[0]=t>>>24&255,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t;const i=new Uint8Array(t+4);return i.set(r,0),i.set(e,4),i}function Zt(e,t){let r=null;return t?e.length>=28&&(r=1+(3&e[26])):e.length>=12&&(r=1+(3&e[9])),r}function Jt(e){let t={width:0,height:0,profile:0,level:0};e=e.slice(5);do{let r={};if(e.length<23){console.warn("parseHEVCDecoderConfigurationRecord$2",`arrayBuffer.length ${e.length} < 23`);break}if(r.configurationVersion=e[0],1!=r.configurationVersion)break;r.general_profile_space=e[1]>>6&3,r.general_tier_flag=e[1]>>5&1,r.general_profile_idc=31&e[1],r.general_profile_compatibility_flags=e[2]<<24|e[3]<<16|e[4]<<8|e[5],r.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],r.general_constraint_indicator_flags=r.general_constraint_indicator_flags<<16|e[10]<<8|e[11],r.general_level_idc=e[12],r.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],r.parallelismType=3&e[15],r.chromaFormat=3&e[16],r.bitDepthLumaMinus8=7&e[17],r.bitDepthChromaMinus8=7&e[18],r.avgFrameRate=e[19]<<8|e[20],r.constantFrameRate=e[21]>>6&3,r.numTemporalLayers=e[21]>>3&7,r.temporalIdNested=e[21]>>2&1,r.lengthSizeMinusOne=3&e[21];let i=e[22],n=e.slice(23);for(let e=0;e0)for(let t=r;t<8;t++)e.read(2);i.sub_layer_profile_space=[],i.sub_layer_tier_flag=[],i.sub_layer_profile_idc=[],i.sub_layer_profile_compatibility_flag=[],i.sub_layer_progressive_source_flag=[],i.sub_layer_interlaced_source_flag=[],i.sub_layer_non_packed_constraint_flag=[],i.sub_layer_frame_only_constraint_flag=[],i.sub_layer_level_idc=[];for(let t=0;t{let t=jt(e),r=new It(t);return r.readByte(),r.readByte(),r.readBits(4),r.readBits(2),r.readBits(6),{num_temporal_layers:r.readBits(3)+1,temporal_id_nested:r.readBool()}})(t),o=(e=>{let t=jt(e),r=new It(t);r.readByte(),r.readByte();let i=0,n=0,s=0,o=0;r.readBits(4);let a=r.readBits(3);r.readBool();let l=r.readBits(2),d=r.readBool(),u=r.readBits(5),h=r.readByte(),c=r.readByte(),f=r.readByte(),p=r.readByte(),m=r.readByte(),_=r.readByte(),g=r.readByte(),y=r.readByte(),v=r.readByte(),b=r.readByte(),w=r.readByte(),E=[],S=[];for(let e=0;e0)for(let e=a;e<8;e++)r.readBits(2);for(let e=0;e1&&r.readSEG();for(let e=0;e0&&e<16?(I=t[e-1],L=i[e-1]):255===e&&(I=r.readBits(16),L=r.readBits(16))}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(3),r.readBool(),r.readBool()&&(r.readByte(),r.readByte(),r.readByte())),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool(),r.readBool(),r.readBool(),P=r.readBool(),P&&(i+=r.readUEG(),n+=r.readUEG(),s+=r.readUEG(),o+=r.readUEG()),r.readBool()&&(z=r.readBits(32),M=r.readBits(32),r.readBool()&&(r.readUEG(),r.readBool()))){let e=!1,t=!1,i=!1;e=r.readBool(),t=r.readBool(),(e||t)&&(i=r.readBool(),i&&(r.readByte(),r.readBits(5),r.readBool(),r.readBits(5)),r.readBits(4),r.readBits(4),i&&r.readBits(4),r.readBits(5),r.readBits(5),r.readBits(5));for(let n=0;n<=a;n++){let n=r.readBool();R=n;let s=!1,o=1;n||(s=r.readBool());let a=!1;if(s?r.readSEG():a=r.readBool(),a||(cpbcnt=r.readUEG()+1),e)for(let e=0;e{let t=jt(e),r=new It(t);r.readByte(),r.readByte(),r.readUEG(),r.readUEG(),r.readBool(),r.readBool(),r.readBits(3),r.readBool(),r.readBool(),r.readUEG(),r.readUEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool()&&r.readUEG(),r.readSEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool(),r.readBool();let i=r.readBool(),n=r.readBool(),s=1;return n&&i?s=0:n?s=3:i&&(s=2),{parallelismType:s}})(r);n=Object.assign(n,s,o,a);let l=23+(5+t.byteLength)+(5+i.byteLength)+(5+r.byteLength),d=new Uint8Array(l);d[0]=1,d[1]=(3&n.general_profile_space)<<6|(n.general_tier_flag?1:0)<<5|31&n.general_profile_idc,d[2]=n.general_profile_compatibility_flags_1||0,d[3]=n.general_profile_compatibility_flags_2||0,d[4]=n.general_profile_compatibility_flags_3||0,d[5]=n.general_profile_compatibility_flags_4||0,d[6]=n.general_constraint_indicator_flags_1||0,d[7]=n.general_constraint_indicator_flags_2||0,d[8]=n.general_constraint_indicator_flags_3||0,d[9]=n.general_constraint_indicator_flags_4||0,d[10]=n.general_constraint_indicator_flags_5||0,d[11]=n.general_constraint_indicator_flags_6||0,d[12]=60,d[13]=240|(3840&n.min_spatial_segmentation_idc)>>8,d[14]=255&n.min_spatial_segmentation_idc,d[15]=252|3&n.parallelismType,d[16]=252|3&n.chroma_format_idc,d[17]=248|7&n.bit_depth_luma_minus8,d[18]=248|7&n.bit_depth_chroma_minus8,d[19]=0,d[20]=0,d[21]=(3&n.constant_frame_rate)<<6|(7&n.num_temporal_layers)<<3|(n.temporal_id_nested?1:0)<<2|3,d[22]=3,d[23]=128|Oe,d[24]=0,d[25]=1,d[26]=(65280&t.byteLength)>>8,d[27]=(255&t.byteLength)>>0,d.set(t,28),d[23+(5+t.byteLength)+0]=128|Ne,d[23+(5+t.byteLength)+1]=0,d[23+(5+t.byteLength)+2]=1,d[23+(5+t.byteLength)+3]=(65280&i.byteLength)>>8,d[23+(5+t.byteLength)+4]=(255&i.byteLength)>>0,d.set(i,23+(5+t.byteLength)+5),d[23+(5+t.byteLength+5+i.byteLength)+0]=128|$e,d[23+(5+t.byteLength+5+i.byteLength)+1]=0,d[23+(5+t.byteLength+5+i.byteLength)+2]=1,d[23+(5+t.byteLength+5+i.byteLength)+3]=(65280&r.byteLength)>>8,d[23+(5+t.byteLength+5+i.byteLength)+4]=(255&r.byteLength)>>0,d.set(r,23+(5+t.byteLength+5+i.byteLength)+5);const u=[28,0,0,0,0],h=new Uint8Array(u.length+d.byteLength);return h.set(u,0),h.set(d,u.length),h}function tr(e,t){let r=[];r[0]=t?28:44,r[1]=1,r[2]=0,r[3]=0,r[4]=0,r[5]=e.byteLength>>24&255,r[6]=e.byteLength>>16&255,r[7]=e.byteLength>>8&255,r[8]=255&e.byteLength;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function rr(e,t){let r=[];r[0]=t?28:44,r[1]=1,r[2]=0,r[3]=0,r[4]=0;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function ir(e){return(126&e[0])>>1}function nr(e){return e===Ge}function sr(e){return!function(e){return e>=32&&e<=40}(e)}function or(e){return e>=16&&e<=21}function ar(e){if(0===e.length)return!1;const t=ir(e[0]);for(let r=1;r255)return!1;return!0}function ur(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!dr(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(lr(e.length)&&dr(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function hr(e){return new Uint8Array(e)}function cr(e,t,r,i,n){null==i&&null==n||(e=e.slice?e.slice(i,n):Array.prototype.slice.call(e,i,n)),t.set(e,r)}var fr,pr={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&i<224?(t.push(String.fromCharCode((31&i)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&i)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},mr=(fr="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+fr[15&i])}return t.join("")}}),_r={16:10,24:12,32:14},gr=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],yr=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],vr=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],br=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],wr=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],Er=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],Sr=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Ur=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],xr=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],kr=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Ar=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Tr=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Cr=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],Br=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Fr=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Pr(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=s[t],this._Kd[e-r][t%4]=s[t];for(var o,a=0,l=n;l>16&255]<<24^yr[o>>8&255]<<16^yr[255&o]<<8^yr[o>>24&255]^gr[a]<<24,a+=1,8!=n)for(t=1;t>8&255]<<8^yr[o>>16&255]<<16^yr[o>>24&255]<<24;for(t=n/2+1;t>2,u=l%4,this._Ke[d][u]=s[t],this._Kd[e-d][u]=s[t++],l++}for(var d=1;d>24&255]^Cr[o>>16&255]^Br[o>>8&255]^Fr[255&o]},Dr.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],i=Pr(e),n=0;n<4;n++)i[n]^=this._Ke[0][n];for(var s=1;s>24&255]^wr[i[(n+1)%4]>>16&255]^Er[i[(n+2)%4]>>8&255]^Sr[255&i[(n+3)%4]]^this._Ke[s][n];i=r.slice()}var o,a=hr(16);for(n=0;n<4;n++)o=this._Ke[t][n],a[4*n]=255&(yr[i[n]>>24&255]^o>>24),a[4*n+1]=255&(yr[i[(n+1)%4]>>16&255]^o>>16),a[4*n+2]=255&(yr[i[(n+2)%4]>>8&255]^o>>8),a[4*n+3]=255&(yr[255&i[(n+3)%4]]^o);return a},Dr.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],i=Pr(e),n=0;n<4;n++)i[n]^=this._Kd[0][n];for(var s=1;s>24&255]^xr[i[(n+3)%4]>>16&255]^kr[i[(n+2)%4]>>8&255]^Ar[255&i[(n+1)%4]]^this._Kd[s][n];i=r.slice()}var o,a=hr(16);for(n=0;n<4;n++)o=this._Kd[t][n],a[4*n]=255&(vr[i[n]>>24&255]^o>>24),a[4*n+1]=255&(vr[i[(n+3)%4]>>16&255]^o>>16),a[4*n+2]=255&(vr[i[(n+2)%4]>>8&255]^o>>8),a[4*n+3]=255&(vr[255&i[(n+1)%4]]^o);return a};var Ir=function(e){if(!(this instanceof Ir))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Dr(e)};Ir.prototype.encrypt=function(e){if((e=ur(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=hr(e.length),r=hr(16),i=0;iNumber.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},Mr.prototype.setBytes=function(e){if(16!=(e=ur(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},Mr.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var Or=function(e,t){if(!(this instanceof Or))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof Mr||(t=new Mr(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Dr(e)};Or.prototype.encrypt=function(e){for(var t=ur(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,i=0;i3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const n=e.byteLength;let s=5;for(;sn)break;let a=e[s+4],l=!1;if(i?(a=a>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(a)):(a&=31,l=1===a||5===a),l){const i=e.slice(s+4+2,s+4+o);let n=new Nr.ModeOfOperation.ctr(t,new Nr.Counter(r));const a=n.decrypt(i);n=null,e.set(a,s+4+2)}s=s+4+o}return e}function Hr(e,t,r){if(e.byteLength<=30)return e;const i=e.slice(32);let n=new Nr.ModeOfOperation.ctr(t,new Nr.Counter(r));const s=n.decrypt(i);return n=null,e.set(s,32),e}var Vr=ot((function(e,t){var r,n,s,o=(r=new Date,n=4,s={setLogLevel:function(e){n=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+o.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=n&&console.info("["+o.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=n&&console.warn("["+o.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){4>=n&&console.error("["+o.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)}},s);o.getDurationString=function(e,t){var r;function i(e,t){for(var r=(""+e).split(".");r[0].length0){for(var r="",i=0;i0&&(r+=","),r+="["+o.getDurationString(e.start(i))+","+o.getDurationString(e.end(i))+"]";return r}return"(empty)"},t.Log=o;var a=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};a.prototype.getPosition=function(){return this.position},a.prototype.getEndPosition=function(){return this.buffer.byteLength},a.prototype.getLength=function(){return this.buffer.byteLength},a.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0},a.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},a.prototype.readAnyInt=function(e,t){var r=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:r=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16,r|=this.dataview.getUint8(this.position+1)<<8,r|=this.dataview.getUint8(this.position+2);break;case 4:r=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32,r|=this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,r}throw"Not enough bytes in buffer"},a.prototype.readUint8=function(){return this.readAnyInt(1,!1)},a.prototype.readUint16=function(){return this.readAnyInt(2,!1)},a.prototype.readUint24=function(){return this.readAnyInt(3,!1)},a.prototype.readUint32=function(){return this.readAnyInt(4,!1)},a.prototype.readUint64=function(){return this.readAnyInt(8,!1)},a.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",r=0;rthis._byteLength&&(this._byteLength=t);else{for(r<1&&(r=1);t>r;)r*=2;var i=new ArrayBuffer(r),n=new Uint8Array(this._buffer);new Uint8Array(i,0,n.length).set(n),this.buffer=i,this._byteLength=t}}},l.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),r=new Uint8Array(this._buffer,0,t.length);t.set(r),this.buffer=e}},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),l.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},l.prototype.isEof=function(){return this.position>=this._byteLength},l.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Int32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var r=new Int16Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Uint32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var r=new Uint16Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var r=new Float64Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Float32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},l.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},l.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,l.memcpy=function(e,t,r,i,n){var s=new Uint8Array(e,t,n),o=new Uint8Array(r,i,n);s.set(o)},l.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},l.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},l.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=0;rn;i--,n++){var s=t[n];t[n]=t[i],t[i]=s}return e},l.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],r=0;r>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},l.prototype.adjustUint32=function(e,t){var r=this.position;this.seek(e),this.writeUint32(t),this.seek(r)},l.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var r=new Int32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r},l.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var r=new Int16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=2*e,r},l.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r},l.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=2*e,r},l.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var r=new Float64Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=8*e,r},l.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var r=new Float32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r};var u=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(u.prototype=new l(new ArrayBuffer,0,l.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,o.debug("MultiBufferStream","Stream ready for parsing"),!0):(o.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(o.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){o.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e),0),r.set(new Uint8Array(t),e.byteLength),r.buffer},u.prototype.reduceBuffer=function(e,t,r){var i;return(i=new Uint8Array(r)).set(new Uint8Array(e,t,r)),i.buffer.fileStart=e.fileStart+t,i.buffer.usedBytes=0,i.buffer},u.prototype.insertBuffer=function(e){for(var t=!0,r=0;ri.byteLength){this.buffers.splice(r,1),r--;continue}o.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=i.fileStart||(e=this.reduceBuffer(e,0,i.fileStart-e.fileStart)),o.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(r,0,e),0===r&&(this.buffer=e);t=!1;break}if(e.fileStart0)){t=!1;break}e=this.reduceBuffer(e,n,s)}}t&&(o.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===r&&(this.buffer=e))},u.prototype.logBufferLevel=function(e){var t,r,i,n,s,a=[],l="";for(i=0,n=0,t=0;t0&&(l+=s.end-1+"]");var d=e?o.info:o.debug;0===this.buffers.length?d("MultiBufferStream","No more buffer in memory"):d("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+i+"/"+n+" bytes), continuous ranges: "+l)},u.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0}return!1}return!1},u.prototype.findPosition=function(e,t,r){var i,n=null,s=-1;for(i=!0===e?0:this.bufferIndex;i=t?(o.debug("MultiBufferStream","Found position in existing buffer #"+s),s):-1},u.prototype.findEndContiguousBuf=function(e){var t,r,i,n=void 0!==e?e:this.bufferIndex;if(r=this.buffers[n],this.buffers.length>n+1)for(t=n+1;t>3;return 31===i&&r.data.length>=2&&(i=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),i}return null},r.DecoderConfigDescriptor=function(e){r.Descriptor.call(this,4,e)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.upStream=0!=(this.streamType>>1&1),this.streamType=this.streamType>>>2,this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e)},r.DecoderSpecificInfo=function(e){r.Descriptor.call(this,5,e)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(e){r.Descriptor.call(this,6,e)},r.SLConfigDescriptor.prototype=new r.Descriptor,this};t.MPEG4DescriptorParser=h;var c={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){c.FullBox.prototype=new c.Box,c.ContainerBox.prototype=new c.Box,c.SampleEntry.prototype=new c.Box,c.TrackGroupTypeBox.prototype=new c.FullBox,c.BASIC_BOXES.forEach((function(e){c.createBoxCtor(e)})),c.FULL_BOXES.forEach((function(e){c.createFullBoxCtor(e)})),c.CONTAINER_BOXES.forEach((function(e){c.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,r){this.type=e,this.size=t,this.uuid=r},FullBox:function(e,t,r){c.Box.call(this,e,t,r),this.flags=0,this.version=0},ContainerBox:function(e,t,r){c.Box.call(this,e,t,r),this.boxes=[]},SampleEntry:function(e,t,r,i){c.ContainerBox.call(this,e,t),this.hdr_size=r,this.start=i},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){c.FullBox.call(this,e,t)},createBoxCtor:function(e,t){c.boxCodes.push(e),c[e+"Box"]=function(t){c.Box.call(this,e,t)},c[e+"Box"].prototype=new c.Box,t&&(c[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){c[e+"Box"]=function(t){c.FullBox.call(this,e,t)},c[e+"Box"].prototype=new c.FullBox,c[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,r=0;rr?(o.error("BoxParser","Box of type '"+u+"' has a size "+d+" greater than its container size "+r),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:d,hdr_size:l,start:a}):0!==d&&a+d>e.getEndPosition()?(e.seek(a),o.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:d,hdr_size:l,start:a}):t?{code:c.OK,type:u,size:d,hdr_size:l,start:a}:(c[u+"Box"]?i=new c[u+"Box"](d):"uuid"!==u?(o.warn("BoxParser","Unknown box type: '"+u+"'"),(i=new c.Box(u,d)).has_unparsed_data=!0):c.UUIDBoxes[s]?i=new c.UUIDBoxes[s](d):(o.warn("BoxParser","Unknown uuid type: '"+s+"'"),(i=new c.Box(u,d)).uuid=s,i.has_unparsed_data=!0),i.hdr_size=l,i.start=a,i.write===c.Box.prototype.write&&"mdat"!==i.type&&(o.info("BoxParser","'"+h+"' box writing not yet implemented, keeping unparsed data in memory for later write"),i.parseDataAndRewind(e)),i.parse(e),(n=e.getPosition()-(i.start+i.size))<0?(o.warn("BoxParser","Parsing of box '"+h+"' did not read the entire indicated box data size (missing "+-n+" bytes), seeking forward"),e.seek(i.start+i.size)):n>0&&(o.error("BoxParser","Parsing of box '"+h+"' read "+n+" more bytes than the indicated box data size, seeking backwards"),0!==i.size&&e.seek(i.start+i.size)),{code:c.OK,box:i,size:i.size})},c.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size)},c.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},c.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size},c.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},c.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},c.ContainerBox.prototype.parse=function(e){for(var t,r;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96)},c.SAMPLE_ENTRY_TYPE_VISUAL="Visual",c.SAMPLE_ENTRY_TYPE_AUDIO="Audio",c.SAMPLE_ENTRY_TYPE_HINT="Hint",c.SAMPLE_ENTRY_TYPE_METADATA="Metadata",c.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",c.SAMPLE_ENTRY_TYPE_SYSTEM="System",c.SAMPLE_ENTRY_TYPE_TEXT="Text",c.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},c.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},c.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size},c.SampleEntry.prototype.parseFooter=function(e){c.ContainerBox.prototype.parse.call(this,e)},c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_HINT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,(function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)})),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,(function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)})),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT,"enct"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA,"encm"),c.createBoxCtor("a1lx",(function(e){var t=16*(1+(1&(1&e.readUint8())));this.layer_size=[];for(var r=0;r<3;r++)this.layer_size[r]=16==t?e.readUint16():e.readUint32()})),c.createBoxCtor("a1op",(function(e){this.op_index=e.readUint8()})),c.createFullBoxCtor("auxC",(function(e){this.aux_type=e.readCString();var t=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=e.readUint8Array(t)})),c.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)o.error("av1C marker problem");else if(this.version=127&t,1===this.version)if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void o.error("av1C reserved_2 parsing problem");var r=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(r)}else o.error("av1C reserved_1 parsing problem");else o.error("av1C version "+this.version+" not supported")})),c.createBoxCtor("avcC",(function(e){var t,r;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(r))})),c.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),c.createFullBoxCtor("ccst",(function(e){var t=e.readUint8();this.all_ref_pics_intra=128==(128&t),this.intra_pred_used=64==(64&t),this.max_ref_per_pic=(63&t)>>2,e.readUint24()})),c.createBoxCtor("cdef",(function(e){var t;for(this.channel_count=e.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],t=0;t=32768&&this.component_type_urls.push(e.readCString())}})),c.createFullBoxCtor("co64",(function(e){var t,r;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4))})),c.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),c.createFullBoxCtor("cslg",(function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())})),c.createFullBoxCtor("ctts",(function(e){var t,r;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|i>>5&7})),c.createBoxCtor("dec3",(function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var r=0;r>6,i.bsid=n>>1&31,i.bsmod=(1&n)<<4|s>>4&15,i.acmod=s>>1&7,i.lfeon=1&s,i.num_dep_sub=o>>1&15,i.num_dep_sub>0&&(i.chan_loc=(1&o)<<8|e.readUint8())}})),c.createFullBoxCtor("dfLa",(function(e){var t=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var i=e.readUint8(),n=Math.min(127&i,r.length-1);if(n?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(r[n]),128&i)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),c.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),c.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),c.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),c.createBoxCtor("dOps",(function(e){if(this.Version=e.readUint8(),this.OutputChannelCount=e.readUint8(),this.PreSkip=e.readUint16(),this.InputSampleRate=e.readUint32(),this.OutputGain=e.readInt16(),this.ChannelMappingFamily=e.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=e.readUint8(),this.CoupledCount=e.readUint8(),this.ChannelMapping=[];for(var t=0;t=4;)this.compatible_brands[r]=e.readString(4),t-=4,r++})),c.createFullBoxCtor("hdlr",(function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))})),c.createBoxCtor("hvcC",(function(e){var t,r,i,n;this.configurationVersion=e.readUint8(),n=e.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(32&n)>>5,this.general_profile_idc=31&n,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),n=e.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var s=e.readUint8();for(t=0;t>7,o.nalu_type=63&n;var a=e.readUint16();for(r=0;r>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var r=0;if(this.version<2)r=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";r=e.readUint32()}for(var i=0;i>7,this.axis=1&t})),c.createFullBoxCtor("infe",(function(e){if(0!==this.version&&1!==this.version||(this.item_ID=e.readUint16(),this.item_protection_index=e.readUint16(),this.item_name=e.readCString(),this.content_type=e.readCString(),this.content_encoding=e.readCString()),1===this.version)return this.extension_type=e.readString(4),o.warn("BoxParser","Cannot parse extension type"),void e.seek(this.start+this.size);this.version>=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()))})),c.createFullBoxCtor("ipma",(function(e){var t,r;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?o.property_index=(127&s)<<8|e.readUint8():o.property_index=127&s}}})),c.createFullBoxCtor("iref",(function(e){var t,r;for(this.references=[];e.getPosition()>7,i.assignment_type=127&n,i.assignment_type){case 0:i.grouping_type=e.readString(4);break;case 1:i.grouping_type=e.readString(4),i.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:i.sub_track_id=e.readUint32();break;default:o.warn("BoxParser","Unknown leva assignement type")}}})),c.createBoxCtor("lsel",(function(e){this.layer_id=e.readUint16()})),c.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),f.prototype.toString=function(){return"("+this.x+","+this.y+")"},c.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]=new f(e.readUint16(),e.readUint16()),this.display_primaries[1]=new f(e.readUint16(),e.readUint16()),this.display_primaries[2]=new f(e.readUint16(),e.readUint16()),this.white_point=new f(e.readUint16(),e.readUint16()),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),c.createFullBoxCtor("mdhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()})),c.createFullBoxCtor("mehd",(function(e){1&this.flags&&(o.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()})),c.createFullBoxCtor("meta",(function(e){this.boxes=[],c.ContainerBox.prototype.parse.call(this,e)})),c.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),c.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),c.createFullBoxCtor("mskC",(function(e){this.bits_per_pixel=e.readUint8()})),c.createFullBoxCtor("mvhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()})),c.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),c.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),c.createFullBoxCtor("padb",(function(e){var t=e.readUint32();this.padbits=[];for(var r=0;r0){var t=e.readUint32();this.kid=[];for(var r=0;r0&&(this.data=e.readUint8Array(i))})),c.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),c.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),c.createFullBoxCtor("saio",(function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var r=e.readUint8(),i=0;i>7,this.num_leading_samples=127&t})),c.createSampleGroupCtor("rash",(function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)o.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=c.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))})),c.createSampleGroupCtor("stsa",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),c.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),c.createSampleGroupCtor("tsas",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("tscl",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("vipr",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createFullBoxCtor("sbgp",(function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),r=0;r>6,this.sample_depends_on[i]=t>>4&3,this.sample_is_depended_on[i]=t>>2&3,this.sample_has_redundancy[i]=3&t})),c.createFullBoxCtor("senc"),c.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),o.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),r=0;r>31&1,i.referenced_size=2147483647&n,i.subsegment_duration=e.readUint32(),n=e.readUint32(),i.starts_with_SAP=n>>31&1,i.SAP_type=n>>28&7,i.SAP_delta_time=268435455&n}})),c.SingleItemTypeReferenceBox=function(e,t,r,i){c.Box.call(this,e,t),this.hdr_size=r,this.start=i},c.SingleItemTypeReferenceBox.prototype=new c.Box,c.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[t+1]=15&i}else if(8===this.field_size)for(t=0;t0)for(r=0;r>4&15,this.default_skip_byte_block=15&t}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=c.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))})),c.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),c.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),c.createFullBoxCtor("tfra",(function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var r=e.readUint32(),i=0;i>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()})),c.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),c.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),c.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),c.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),c.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),c.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},c.createTrackGroupCtor("msrc"),c.TrackReferenceTypeBox=function(e,t,r,i){c.Box.call(this,e,t),this.hdr_size=r,this.start=i},c.TrackReferenceTypeBox.prototype=new c.Box,c.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},c.trefBox.prototype.parse=function(e){for(var t,r;e.getPosition()t&&this.flags&c.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=e.readUint32(),this.row_align_size=e.readUint32(),this.tile_align_size=e.readUint32(),this.num_tile_cols_minus_one=e.readUint32(),this.num_tile_rows_minus_one=e.readUint32()}})),c.createFullBoxCtor("url ",(function(e){1!==this.flags&&(this.location=e.readCString())})),c.createFullBoxCtor("urn ",(function(e){this.name=e.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=e.readCString())})),c.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")})),c.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=c.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),c.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),c.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=c.parseHex16(e)})),c.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize))})),c.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),c.createFullBoxCtor("vvcC",(function(e){var t,r,i={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){this.held_bits=e.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(e){this.held_bits=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=this.held_bits>>this.num_held_bits-e&(1<1){for(i.stream_read_1_bytes(e),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var o=i.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++r)i.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<>=1;t+=c.decimalToHex(i,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var n=!1,s="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||n)&&(s="."+c.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+s,n=!0);t+=s}return t},c.vvc1SampleEntry.prototype.getCodec=c.vvi1SampleEntry.prototype.getCodec=function(){var e,t=c.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var r="";if(this.vvcC.general_constraint_info){var i,n=[],s=0;for(s|=this.vvcC.ptl_frame_only_constraint<<7,s|=this.vvcC.ptl_multilayer_enabled<<6,e=0;e>2&63,n.push(s),s&&(i=e),s=this.vvcC.general_constraint_info[e]>>2&3;if(void 0===i)r=".CA";else{r=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",a=0,l=0;for(e=0;e<=i;++e)for(a=a<<8|n[e],l+=8;l>=5;){r+=o[a>>l-5&31],a&=(1<<(l-=5))-1}l&&(r+=o[31&(a<<=5-l)])}}t+=r}return t},c.mp4aSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),r=this.esds.esd.getAudioConfig();return e+"."+c.decimalToHex(t)+(r?"."+r:"")}return e},c.stxtSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},c.vp08SampleEntry.prototype.getCodec=c.vp09SampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this),t=this.vpcC.level;0==t&&(t="00");var r=this.vpcC.bitDepth;return 8==r&&(r="08"),e+".0"+this.vpcC.profile+"."+t+"."+r},c.av01SampleEntry.prototype.getCodec=function(){var e,t=c.SampleEntry.prototype.getCodec.call(this),r=this.av1C.seq_level_idx_0;return r<10&&(r="0"+r),2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+r+(this.av1C.seq_tier_0?"H":"M")+"."+e},c.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),o.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>d?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>d&&e.writeUint64(this.size)},c.FullBox.prototype.writeHeader=function(e){this.size+=4,c.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},c.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))},c.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1t?1:0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(e),1===this.version?e.writeUint64(this.baseMediaDecodeTime):e.writeUint32(this.baseMediaDecodeTime)},c.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&c.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&c.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&c.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&c.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&c.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags)},c.tkhdBox.prototype.write=function(e){this.version=0,this.size=80,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.track_id),e.writeUint32(0),e.writeUint32(this.duration),e.writeUint32(0),e.writeUint32(0),e.writeInt16(this.layer),e.writeInt16(this.alternate_group),e.writeInt16(this.volume<<8),e.writeUint16(0),e.writeInt32Array(this.matrix),e.writeUint32(this.width),e.writeUint32(this.height)},c.trexBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20,this.writeHeader(e),e.writeUint32(this.track_id),e.writeUint32(this.default_sample_description_index),e.writeUint32(this.default_sample_duration),e.writeUint32(this.default_sample_size),e.writeUint32(this.default_sample_flags)},c.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&c.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&c.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&c.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&c.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&c.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&c.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&c.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&c.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var t=0;t-1||e[r]instanceof c.Box||t[r]instanceof c.Box||void 0===e[r]||void 0===t[r]||"function"==typeof e[r]||"function"==typeof t[r]||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||"data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r||c.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1||e[r]===t[r]))return!1;return!0},c.boxEqual=function(e,t){if(!c.boxEqualFields(e,t))return!1;for(var r=0;r1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1)},g.prototype.setExtractionOptions=function(e,t,r){var i=this.getTrackById(e);if(i){var n={};this.extractedTracks.push(n),n.id=e,n.user=t,n.trak=i,i.nextSample=0,n.nb_samples=1e3,n.samples=[],r&&r.nbSamples&&(n.nb_samples=r.nbSamples)}},g.prototype.unsetExtractionOptions=function(e){for(var t=-1,r=0;r-1&&this.extractedTracks.splice(t,1)},g.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}if(this.saveParsePosition&&this.saveParsePosition(),(e=c.parseOneBox(this.stream,false)).code===c.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var r;switch(r="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),r){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[r]&&o.warn("ISOFile","Duplicate Box of type: "+r+", overriding previous occurrence"),this[r]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},g.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(o.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(o.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(o.warn("ISOFile","Not ready to start parsing"),!1))},g.prototype.appendBuffer=function(e,t){var r;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(o.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},g.prototype.getInfo=function(){var e,t,r,i,n,s,o={},a=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(a+1e3*this.moov.mvhd.creation_time),o.modified=new Date(a+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],e=0;e0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',e=0;e=r.samples.length)&&(o.info("ISOFile","Sending fragmented data on track #"+i.id+" for samples ["+Math.max(0,r.nextSample-i.nb_samples)+","+(r.nextSample-1)+"]"),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(i.id,i.user,i.segmentStream.buffer,r.nextSample,e||r.nextSample>=r.samples.length),i.segmentStream=null,i!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t=r.samples.length)&&(o.debug("ISOFile","Sending samples on track #"+s.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(s.id,s.user,s.samples),s.samples=[],s!==this.extractedTracks[t]))break}}}},g.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},g.prototype.getBoxes=function(e,t){var r=[];return g._sweep.call(this,e,r,t),r},g._sweep=function(e,t,r){for(var i in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&r)return;g._sweep.call(this.boxes[i],e,t,r)}},g.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},g.prototype.getTrackSample=function(e,t){var r=this.getTrackById(e);return this.getSample(r,t)},g.prototype.releaseUsedSamples=function(e,t){var r=0,i=this.getTrackById(e);i.lastValidSample||(i.lastValidSample=0);for(var n=i.lastValidSample;ne*n.timescale){d=i-1;break}t&&n.is_sync&&(l=i)}for(t&&(d=l),e=r.samples[d].cts,r.nextSample=d;r.samples[d].alreadyRead===r.samples[d].size&&r.samples[d+1];)d++;return s=r.samples[d].offset+r.samples[d].alreadyRead,o.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+o.getDurationString(e,a)+" and offset: "+s),{offset:s,time:e/a}},g.prototype.getTrackDuration=function(e){var t;return e.samples?((t=e.samples[e.samples.length-1]).cts+t.duration)/t.timescale:1/0},g.prototype.seek=function(e,t){var r,i,n,s=this.moov,a={offset:1/0,time:1/0};if(this.moov){for(n=0;nthis.getTrackDuration(r)||((i=this.seekTrack(e,t,r)).offset-1){o=l;break}switch(o){case"Visual":if(n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),s.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24),t.avcDecoderConfigRecord){var h=new c.avcCBox;h.parse(new a(t.avcDecoderConfigRecord)),s.addBox(h)}else if(t.hevcDecoderConfigRecord){var f=new c.hvcCBox;f.parse(new a(t.hevcDecoderConfigRecord)),s.addBox(f)}break;case"Audio":n.add("smhd").set("balance",t.balance||0),s.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":if(n.add("sthd"),"stpp"===t.type)s.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");break;default:n.add("nmhd")}t.description&&s.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){s.addBox(e)})),n.add("dinf").add("dref").addEntry((new c["url Box"]).set("flags",1));var p=n.add("stbl");return p.add("stsd").addEntry(s),p.add("stts").set("sample_counts",[]).set("sample_deltas",[]),p.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),p.add("stco").set("chunk_offsets",[]),p.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(r),t.id}},c.Box.prototype.computeSize=function(e){var t=e||new l;t.endianness=l.BIG_ENDIAN,this.write(t)},g.prototype.addSample=function(e,t,r){var i=r||{},n={},s=this.getTrackById(e);if(null!==s){n.number=s.samples.length,n.track_id=s.tkhd.track_id,n.timescale=s.mdia.mdhd.timescale,n.description_index=i.sample_description_index?i.sample_description_index-1:0,n.description=s.mdia.minf.stbl.stsd.entries[n.description_index],n.data=t,n.size=t.byteLength,n.alreadyRead=n.size,n.duration=i.duration||1,n.cts=i.cts||0,n.dts=i.dts||0,n.is_sync=i.is_sync||!1,n.is_leading=i.is_leading||0,n.depends_on=i.depends_on||0,n.is_depended_on=i.is_depended_on||0,n.has_redundancy=i.has_redundancy||0,n.degradation_priority=i.degradation_priority||0,n.offset=0,n.subsamples=i.subsamples,s.samples.push(n),s.samples_size+=n.size,s.samples_duration+=n.duration,void 0===s.first_dts&&(s.first_dts=i.dts),this.processSamples();var o=this.createSingleSampleMoof(n);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(t),n}},g.prototype.createSingleSampleMoof=function(e){var t=0;t=e.is_sync?1<<25:65536;var r=new c.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var i=r.add("traf"),n=this.getTrackById(e.track_id);return i.add("tfhd").set("track_id",e.track_id).set("flags",c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add("tfdt").set("baseMediaDecodeTime",e.dts-(n.first_dts||0)),i.add("trun").set("flags",c.TRUN_FLAGS_DATA_OFFSET|c.TRUN_FLAGS_DURATION|c.TRUN_FLAGS_SIZE|c.TRUN_FLAGS_FLAGS|c.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[t]).set("sample_composition_time_offset",[e.cts-e.dts]),r},g.prototype.lastMoofIndex=0,g.prototype.samplesDataSize=0,g.prototype.resetTables=function(){var e,t,r,i,n,s;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=n[o].grouping_type+"/0",(a=new d(n[o].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=a))}else for(o=0;o=2&&(l=i[o].grouping_type+"/0",a=new d(i[o].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=a))},g.setSampleGroupProperties=function(e,t,r,i){var n,s;for(n in t.sample_groups=[],i){var o;if(t.sample_groups[n]={},t.sample_groups[n].grouping_type=i[n].grouping_type,t.sample_groups[n].grouping_type_parameter=i[n].grouping_type_parameter,r>=i[n].last_sample_in_run&&(i[n].last_sample_in_run<0&&(i[n].last_sample_in_run=0),i[n].entry_index++,i[n].entry_index<=i[n].sbgp.entries.length-1&&(i[n].last_sample_in_run+=i[n].sbgp.entries[i[n].entry_index].sample_count)),i[n].entry_index<=i[n].sbgp.entries.length-1?t.sample_groups[n].group_description_index=i[n].sbgp.entries[i[n].entry_index].group_description_index:t.sample_groups[n].group_description_index=-1,0!==t.sample_groups[n].group_description_index)o=i[n].fragment_description?i[n].fragment_description:i[n].description,t.sample_groups[n].group_description_index>0?(s=t.sample_groups[n].group_description_index>65535?(t.sample_groups[n].group_description_index>>16)-1:t.sample_groups[n].group_description_index-1,o&&s>=0&&(t.sample_groups[n].description=o.entries[s])):o&&o.version>=2&&o.default_group_description_index>0&&(t.sample_groups[n].description=o.entries[o.default_group_description_index-1])}},g.process_sdtp=function(e,t,r){t&&(e?(t.is_leading=e.is_leading[r],t.depends_on=e.sample_depends_on[r],t.is_depended_on=e.sample_is_depended_on[r],t.has_redundancy=e.sample_has_redundancy[r]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))},g.prototype.buildSampleLists=function(){var e,t;for(e=0;ev&&(b++,v<0&&(v=0),v+=s.sample_counts[b]),t>0?(e.samples[t-1].duration=s.sample_deltas[b],e.samples_duration+=e.samples[t-1].duration,k.dts=e.samples[t-1].dts+e.samples[t-1].duration):k.dts=0,o?(t>=w&&(E++,w<0&&(w=0),w+=o.sample_counts[E]),k.cts=e.samples[t].dts+o.sample_offsets[E]):k.cts=k.dts,a?(t==a.sample_numbers[S]-1?(k.is_sync=!0,S++):(k.is_sync=!1,k.degradation_priority=0),d&&d.entries[U].sample_delta+x==t+1&&(k.subsamples=d.entries[U].subsamples,x+=d.entries[U].sample_delta,U++)):k.is_sync=!0,g.process_sdtp(e.mdia.minf.stbl.sdtp,k,k.number),k.degradation_priority=c?c.priority[t]:0,d&&d.entries[U].sample_delta+x==t&&(k.subsamples=d.entries[U].subsamples,x+=d.entries[U].sample_delta),(u.length>0||h.length>0)&&g.setSampleGroupProperties(e,k,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}},g.prototype.updateSampleLists=function(){var e,t,r,i,n,s,o,a,l,d,u,h,f,p,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&g.initSampleGroups(h,u,u.sbgps,h.mdia.minf.stbl.sgpds,u.sgpds),t=0;t0?p.dts=h.samples[h.samples.length-2].dts+h.samples[h.samples.length-2].duration:(u.tfdt?p.dts=u.tfdt.baseMediaDecodeTime:p.dts=0,h.first_traf_merged=!0),p.cts=p.dts,_.flags&c.TRUN_FLAGS_CTS_OFFSET&&(p.cts=p.dts+_.sample_composition_time_offset[r]),m=o,_.flags&c.TRUN_FLAGS_FLAGS?m=_.sample_flags[r]:0===r&&_.flags&c.TRUN_FLAGS_FIRST_FLAG&&(m=_.first_sample_flags),p.is_sync=!(m>>16&1),p.is_leading=m>>26&3,p.depends_on=m>>24&3,p.is_depended_on=m>>22&3,p.has_redundancy=m>>20&3,p.degradation_priority=65535&m;var y=!!(u.tfhd.flags&c.TFHD_FLAG_BASE_DATA_OFFSET),v=!!(u.tfhd.flags&c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),b=!!(_.flags&c.TRUN_FLAGS_DATA_OFFSET),w=0;w=y?u.tfhd.base_data_offset:v||0===t?d.start:a,p.offset=0===t&&0===r?b?w+_.data_offset:w:a,a=p.offset+p.size,(u.sbgps.length>0||u.sgpds.length>0||h.mdia.minf.stbl.sbgps.length>0||h.mdia.minf.stbl.sgpds.length>0)&&g.setSampleGroupProperties(h,p,p.number_in_traf,u.sample_groups_info)}}if(u.subs){h.has_fragment_subsamples=!0;var E=u.first_sample_index;for(t=0;t-1))return null;var s=(r=this.stream.buffers[n]).byteLength-(i.offset+i.alreadyRead-r.fileStart);if(i.size-i.alreadyRead<=s)return o.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-r.fileStart)+" read size: "+(i.size-i.alreadyRead)+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,r,i.offset+i.alreadyRead-r.fileStart,i.size-i.alreadyRead),r.usedBytes+=i.size-i.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead=i.size,i;if(0===s)return null;o.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-r.fileStart)+" read size: "+s+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,r,i.offset+i.alreadyRead-r.fileStart,s),i.alreadyRead+=s,r.usedBytes+=s,this.stream.logBufferLevel()}},g.prototype.releaseSample=function(e,t){var r=e.samples[t];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},g.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},g.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec()}return t},g.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(r.protection=s.ipro.protections[s.iinf.item_infos[e].protection_index-1]),s.iinf.item_infos[e].item_type?r.type=s.iinf.item_infos[e].item_type:r.type="mime",r.content_type=s.iinf.item_infos[e].content_type,r.content_encoding=s.iinf.item_infos[e].content_encoding;if(s.grpl)for(e=0;e0&&c.property_index-1-1))return null;var a=(t=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-t.fileStart);if(!(n.length-n.alreadyRead<=a))return o.debug("ISOFile","Getting item #"+e+" extent #"+i+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+a+" full extent size: "+n.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,a),n.alreadyRead+=a,r.alreadyRead+=a,t.usedBytes+=a,this.stream.logBufferLevel(),null;o.debug("ISOFile","Getting item #"+e+" extent #"+i+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,n.length-n.alreadyRead),t.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length}}return r.alreadyRead===r.size?r:null},g.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var r=0;r0?this.moov.traks[e].samples[0].duration:0),t.push(i)}return t},c.Box.prototype.printHeader=function(e){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},c.FullBox.prototype.printHeader=function(e){this.size+=4,c.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},c.Box.prototype.print=function(e){this.printHeader(e)},c.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)},c.tkhdBox.prototype.print=function(e){c.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)};var y={createFile:function(e,t){var r=void 0===e||e,i=new g(t);return i.discardMdatData=!r,i}};t.createFile=y.createFile}));function Wr(e){return e.reduce(((e,t)=>256*e+t))}function jr(e){const t=[101,103,119,99],r=e.length-28,i=e.slice(r,r+t.length);return t.every(((e,t)=>e===i[t]))}Vr.Log,Vr.MP4BoxStream,Vr.DataStream,Vr.MultiBufferStream,Vr.MPEG4DescriptorParser,Vr.BoxParser,Vr.XMLSubtitlein4Parser,Vr.Textin4Parser,Vr.ISOFile,Vr.createFile;class Yr{constructor(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=new Uint8Array([30,158,90,33,244,57,83,165,2,70,35,87,215,231,226,108]),this.t=this.n.slice().reverse()}destroy(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=null,this.t=null}transport(e){if(!this.s&&this.l>50)return e;if(this.l++,this.d)return e;const t=new Uint8Array(e);if(this.A){if(!(this.c~e))}(e.slice(r+32,r+32+t))]}return null}(t,this.t);if(!r)return e;const i=function(e){try{if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiate)throw null;{const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(!(e instanceof WebAssembly.Module&&new WebAssembly.Instance(e)instanceof WebAssembly.Instance))throw null}}catch(e){return new Error("video_error_4")}let t;try{t={env:{__handle_stack_overflow:()=>e(new Error("video_error_1")),memory:new WebAssembly.Memory({initial:256,maximum:256})}}}catch(e){return new Error("video_error_5")}return t}(e);if(i instanceof Error)return console.error(i.message),this.d=!0,e;this.A=!0,this.u=r[1],jr(t)&&this.c++,WebAssembly.instantiate(r[2],i).then((e=>{if("function"!=typeof(t=e.instance.exports).parse||"object"!=typeof t.memory)return this.d=!0,void console.error("video_error_3");var t;this.s=e.instance.exports,this.a=new Uint8Array(this.s.memory.buffer)})).catch((e=>{this.d=!0,console.error("video_error_6")}))}return e}}const qr=16,Kr=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Xr=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Zr(e){const t=[];for(let r=0,i=e.length;r1===(e=e.toString(16)).length?"0"+e:e)).join("")}function Qr(e){const t=[];for(let r=0,i=e.length;r>>6),t.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)t.push(224|i>>>12),t.push(128|i>>>6&63),t.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw t.push(i),new Error("input is not supported");r++,t.push(240|i>>>18&28),t.push(128|i>>>12&63),t.push(128|i>>>6&63),t.push(128|63&i)}}return t}function ei(e){const t=[];for(let r=0,i=e.length;r=240&&e[r]<=247?(t.push(String.fromCodePoint(((7&e[r])<<18)+((63&e[r+1])<<12)+((63&e[r+2])<<6)+(63&e[r+3]))),r+=3):e[r]>=224&&e[r]<=239?(t.push(String.fromCodePoint(((15&e[r])<<12)+((63&e[r+1])<<6)+(63&e[r+2]))),r+=2):e[r]>=192&&e[r]<=223?(t.push(String.fromCodePoint(((31&e[r])<<6)+(63&e[r+1]))),r++):t.push(String.fromCodePoint(e[r]));return t.join("")}function ti(e,t){const r=31&t;return e<>>32-r}function ri(e){return(255&Kr[e>>>24&255])<<24|(255&Kr[e>>>16&255])<<16|(255&Kr[e>>>8&255])<<8|255&Kr[255&e]}function ii(e){return e^ti(e,2)^ti(e,10)^ti(e,18)^ti(e,24)}function ni(e){return e^ti(e,13)^ti(e,23)}function si(e,t,r){const i=new Array(4),n=new Array(4);for(let t=0;t<4;t++)n[0]=255&e[4*t],n[1]=255&e[4*t+1],n[2]=255&e[4*t+2],n[3]=255&e[4*t+3],i[t]=n[0]<<24|n[1]<<16|n[2]<<8|n[3];for(let e,t=0;t<32;t+=4)e=i[1]^i[2]^i[3]^r[t+0],i[0]^=ii(ri(e)),e=i[2]^i[3]^i[0]^r[t+1],i[1]^=ii(ri(e)),e=i[3]^i[0]^i[1]^r[t+2],i[2]^=ii(ri(e)),e=i[0]^i[1]^i[2]^r[t+3],i[3]^=ii(ri(e));for(let e=0;e<16;e+=4)t[e]=i[3-e/4]>>>24&255,t[e+1]=i[3-e/4]>>>16&255,t[e+2]=i[3-e/4]>>>8&255,t[e+3]=255&i[3-e/4]}function oi(e,t,r){const i=new Array(4),n=new Array(4);for(let t=0;t<4;t++)n[0]=255&e[0+4*t],n[1]=255&e[1+4*t],n[2]=255&e[2+4*t],n[3]=255&e[3+4*t],i[t]=n[0]<<24|n[1]<<16|n[2]<<8|n[3];i[0]^=2746333894,i[1]^=1453994832,i[2]^=1736282519,i[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=i[1]^i[2]^i[3]^Xr[r+0],t[r+0]=i[0]^=ni(ri(e)),e=i[2]^i[3]^i[0]^Xr[r+1],t[r+1]=i[1]^=ni(ri(e)),e=i[3]^i[0]^i[1]^Xr[r+2],t[r+2]=i[2]^=ni(ri(e)),e=i[0]^i[1]^i[2]^Xr[r+3],t[r+3]=i[3]^=ni(ri(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function ai(e,t,r){let{padding:i="pkcs#7",mode:n,iv:s=[],output:o="string"}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("cbc"===n&&("string"==typeof s&&(s=Zr(s)),16!==s.length))throw new Error("iv is invalid");if("string"==typeof t&&(t=Zr(t)),16!==t.length)throw new Error("key is invalid");if(e="string"==typeof e?0!==r?Qr(e):Zr(e):[...e],("pkcs#5"===i||"pkcs#7"===i)&&0!==r){const t=qr-e.length%qr;for(let r=0;r=qr;){const t=e.slice(h,h+16),i=new Array(16);if("cbc"===n)for(let e=0;e2&&void 0!==arguments[2]&&arguments[2];const i=e.byteLength;let n=5;for(;ni)break;let o=e[n+4],a=!1;if(r?(o=o>>>1&63,a=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,a=1===o||5===o),a){const r=ai(e.slice(n+4+2,n+4+s),t,0,{padding:"none",output:"array"});e.set(r,n+4+2)}n=n+4+s}return e}const ui={init:0,findFirstStartCode:1,findSecondStartCode:2};class hi extends class{on(e,t,r){const i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:r}),this}once(e,t,r){const i=this;function n(){i.off(e,n);for(var s=arguments.length,o=new Array(s),a=0;a1?r-1:0),n=1;n{delete r[e]})),void delete this.e;const i=r[e],n=[];if(i&&t)for(let e=0,r=i.length;e=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(!(!1&this.tempBuffer[this.parsedOffset+1])){this.versionLayer=this.tempBuffer[this.parsedOffset+1],this.state=ui.findFirstStartCode,this.fisrtStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==ui.findFirstStartCode){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(this.tempBuffer[this.parsedOffset+1]==this.versionLayer){this.state=ui.findSecondStartCode,this.secondStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==ui.findSecondStartCode){let e=this.tempBuffer.slice(this.fisrtStartCodeOffset,this.secondStartCodeOffset);this.emit("data",e,t),this.tempBuffer=this.tempBuffer.slice(this.secondStartCodeOffset),this.fisrtStartCodeOffset=0,this.parsedOffset=2,this.state=ui.findFirstStartCode}}}}function ci(e,t,r){for(let i=2;i3&&void 0!==arguments[3]&&arguments[3];const n=e.byteLength;let s=5;for(;sn)break;let a=e[s+4],l=!1;if(i?(a=a>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(a)):(a&=31,l=1===a||5===a),l){const i=ci(e.slice(s+4,s+4+o),t,r);e.set(i,s+4)}s=s+4+o}return e}Date.now||(Date.now=function(){return(new Date).getTime()});const mi=[];mi.push(r(),t()),Promise.all(mi).then((e=>{const t=e[0];!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[],n=[],s={},o=new AbortController,a=null,l=null,d=null,u=null,v=null,b=null,S=!1,Ge=!1,Ye=!!kt(r),Ke=!1,Xe=null,ot=null,ft=null,Tt=[],Ct=null,Bt=null,Ft=0,It=0,Lt=null,Rt=null,jt=0,Yt=0,qt=!1,Qt=!1,lr=!1,dr=null,ur=null,hr=null,cr=!1,fr=()=>{const e=Ut();return{debug:e.debug,debugLevel:e.debugLevel,debugUuid:e.debugUuid,useOffscreen:e.useOffscreen,useWCS:e.useWCS,useMSE:e.useMSE,videoBuffer:e.videoBuffer,videoBufferDelay:e.videoBufferDelay,openWebglAlignment:e.openWebglAlignment,playType:e.playType,hasAudio:e.hasAudio,hasVideo:e.hasVideo,playbackRate:1,playbackForwardMaxRateDecodeIFrame:e.playbackForwardMaxRateDecodeIFrame,playbackIsCacheBeforeDecodeForFpsRender:e.playbackConfig.isCacheBeforeDecodeForFpsRender,sampleRate:0,networkDelay:e.networkDelay,visibility:!0,useSIMD:e.useSIMD,isRecording:!1,recordType:e.recordType,isNakedFlow:e.isNakedFlow,checkFirstIFrame:e.checkFirstIFrame,audioBufferSize:1024,isM7sCrypto:e.isM7sCrypto,m7sCryptoAudio:e.m7sCryptoAudio,cryptoKey:e.cryptoKey,cryptoIV:e.cryptoIV,isSm4Crypto:e.isSm4Crypto,sm4CryptoKey:e.sm4CryptoKey,isXorCrypto:e.isXorCrypto,isHls265:!1,isFlv:e.isFlv,isFmp4:e.isFmp4,isMpeg4:e.isMpeg4,isFmp4Private:e.isFmp4Private,isEmitSEI:e.isEmitSEI,isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isDropSameTimestampGop:e.isDropSameTimestampGop,mseDecodeAudio:e.mseDecodeAudio,nakedFlowH265DemuxUseNew:e.nakedFlowH265DemuxUseNew}};"VideoEncoder"in self&&(s={hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:new VideoDecoder({output:function(e){if(s.isEmitInfo||(yr.debug.log("worker","Webcodecs Video Decoder initSize"),postMessage({cmd:x,w:e.codedWidth,h:e.codedHeight}),s.isEmitInfo=!0,s.offscreenCanvas=new OffscreenCanvas(e.codedWidth,e.codedHeight),s.offscreenCanvasCtx=s.offscreenCanvas.getContext("2d")),yt(e.createImageBitmap))e.createImageBitmap().then((t=>{s.offscreenCanvasCtx.drawImage(t,0,0,e.codedWidth,e.codedHeight);let r=s.offscreenCanvas.transferToImageBitmap();postMessage({cmd:k,buffer:r,delay:yr.delay,ts:0},[r]),wt(e)}));else{s.offscreenCanvasCtx.drawImage(e,0,0,e.codedWidth,e.codedHeight);let t=s.offscreenCanvas.transferToImageBitmap();postMessage({cmd:k,buffer:t,delay:yr.delay,ts:0},[t]),wt(e)}},error:function(e){yr.debug.error("worker","VideoDecoder error",e)}}),decode:function(e,t,r){const i=e[0]>>4==1;if(s.hasInit){const r=new EncodedVideoChunk({data:e.slice(5),timestamp:t,type:i?We:je});s.decoder.decode(r)}else if(i&&0===e[1]){const t=15&e[0];postMessage({cmd:P,code:t});const r=mt(e.slice(5));yr._opt.recordType===y&&postMessage({cmd:D,buffer:e,codecId:t},[e.buffer]),s.decoder.configure(r),s.hasInit=!0}},reset(){s.hasInit=!1,s.isEmitInfo=!1,s.offscreenCanvas=null,s.offscreenCanvasCtx=null}});let pr=function(){if(cr=!0,yr.fetchStatus!==Qe||At(yr._opt.isChrome)){if(o)try{o.abort(),o=null}catch(e){yr.debug.log("worker","abort catch",e)}}else o=null,yr.debug.log("worker",`abort() and not abortController.abort() _status is ${yr.fetchStatus} and _isChrome is ${yr._opt.isChrome}`)},mr={init(){mr.lastBuf=null,mr.vps=null,mr.sps=null,mr.pps=null,mr.streamType=null,mr.localDts=0,mr.isSendSeqHeader=!1},destroy(){mr.lastBuf=null,mr.vps=null,mr.sps=null,mr.pps=null,mr.streamType=null,mr.localDts=0,mr.isSendSeqHeader=!1},dispatch(e){const t=new Uint8Array(e);mr.extractNALu$2(t)},getNaluDts(){let e=mr.localDts;return mr.localDts=mr.localDts+40,e},getNaluAudioDts(){const e=yr._opt.sampleRate,t=yr._opt.audioBufferSize;return mr.localDts+parseInt(t/e*1e3)},extractNALu(e){let t,r,i=0,n=e.byteLength,s=0,o=[];for(;i1)for(let e=0;e{const t=$t(e);t===Ie||t===De?mr.handleVideoH264Nalu(e):Ht(t)&&i.push(e)})),1===i.length)mr.handleVideoH264Nalu(i[0]);else if(Wt(i)){const e=$t(i[0]),t=Vt(e);mr.handleVideoH264NaluList(i,t,e)}else i.forEach((e=>{mr.handleVideoH264Nalu(e)}))}else if(mr.streamType===Te)if(yr._opt.nakedFlowH265DemuxUseNew){const t=mr.handleAddNaluStartCode(e),r=mr.extractNALu(t);if(0===r.length)return void yr.debug.warn("worker","handleVideoNalu","h265 naluList.length === 0");const i=[];if(r.forEach((e=>{const t=ir(e);t===$e||t===Ne||t===Oe?mr.handleVideoH265Nalu(e):sr(t)&&i.push(e)})),1===i.length)mr.handleVideoH265Nalu(i[0]);else if(ar(i)){const e=ir(i[0]),t=or(e);mr.handleVideoH265NaluList(i,t,e)}else i.forEach((e=>{this.handleVideoH265Nalu(e)}))}else ir(e)===$e?mr.extractH265PPS(e):mr.handleVideoH265Nalu(e)},extractH264PPS(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{Gt($t(e))?mr.extractH264SEI(e):mr.handleVideoH264Nalu(e)}))},extractH265PPS(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{nr(ir(e))?mr.extractH265SEI(e):mr.handleVideoH265Nalu(e)}))},extractH264SEI(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{mr.handleVideoH264Nalu(e)}))},extractH265SEI(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{mr.handleVideoH265Nalu(e)}))},handleAddNaluStartCode(e){const t=[0,0,0,1],r=new Uint8Array(e.length+t.length);return r.set(t),r.set(e,t.length),r},handleVideoH264Nalu(e){const t=$t(e);switch(t){case De:mr.sps=e;break;case Ie:mr.pps=e}if(mr.isSendSeqHeader){if(mr.sps&&mr.pps){const e=Mt({sps:mr.sps,pps:mr.pps}),t=mr.getNaluDts();yr.decode(e,{type:ee,ts:t,isIFrame:!0,cts:0}),mr.sps=null,mr.pps=null}if(Ht(t)){const r=Vt(t),i=mr.getNaluDts(),n=Ot(e,r);mr.doDecode(n,{type:ee,ts:i,isIFrame:r,cts:0})}else yr.debug.warn("work",`handleVideoH264Nalu Avc Seq Head is ${t}`)}else if(mr.sps&&mr.pps){mr.isSendSeqHeader=!0;const e=Mt({sps:mr.sps,pps:mr.pps});yr.decode(e,{type:ee,ts:0,isIFrame:!0,cts:0}),mr.sps=null,mr.pps=null}},handleVideoH264NaluList(e,t,r){if(mr.isSendSeqHeader){const i=mr.getNaluDts(),n=Nt(e.reduce(((e,t)=>{const r=Xt(e),i=Xt(t),n=new Uint8Array(r.byteLength+i.byteLength);return n.set(r,0),n.set(i,r.byteLength),n})),t);mr.doDecode(n,{type:ee,ts:i,isIFrame:t,cts:0}),yr.debug.log("worker",`handleVideoH264NaluList list size is ${e.length} package length is ${n.byteLength} isIFrame is ${t},nalu type is ${r}, dts is ${i}`)}else yr.debug.warn("worker","handleVideoH264NaluList isSendSeqHeader is false")},handleVideoH265Nalu(e){const t=ir(e);switch(t){case Oe:mr.vps=e;break;case Ne:mr.sps=e;break;case $e:mr.pps=e}if(mr.isSendSeqHeader){if(mr.vps&&mr.sps&&mr.pps){const e=er({vps:mr.vps,sps:mr.sps,pps:mr.pps}),t=mr.getNaluDts();yr.decode(e,{type:ee,ts:t,isIFrame:!0,cts:0}),mr.vps=null,mr.sps=null,mr.pps=null}if(sr(t)){const r=or(t),i=mr.getNaluDts(),n=tr(e,r);mr.doDecode(n,{type:ee,ts:i,isIFrame:r,cts:0})}else yr.debug.warn("work",`handleVideoH265Nalu HevcSeqHead is ${t}`)}else if(mr.vps&&mr.sps&&mr.pps){mr.isSendSeqHeader=!0;const e=er({vps:mr.vps,sps:mr.sps,pps:mr.pps});yr.decode(e,{type:ee,ts:0,isIFrame:!0,cts:0}),mr.vps=null,mr.sps=null,mr.pps=null}},handleVideoH265NaluList(e,t,r){if(mr.isSendSeqHeader){const i=mr.getNaluDts(),n=rr(e.reduce(((e,t)=>{const r=Xt(e),i=Xt(t),n=new Uint8Array(r.byteLength+i.byteLength);return n.set(r,0),n.set(i,r.byteLength),n})),t);mr.doDecode(n,{type:ee,ts:i,isIFrame:t,cts:0}),yr.debug.log("worker",`handleVideoH265NaluList list size is ${e.length} package length is ${n.byteLength} isIFrame is ${t},nalu type is ${r}, dts is ${i}`)}else yr.debug.warn("worker","handleVideoH265NaluList isSendSeqHeader is false")},doDecode(e,t){yr.calcNetworkDelay(t.ts),t.isIFrame&&yr.calcIframeIntervalTimestamp(t.ts),postMessage({cmd:z,type:_e,value:e.byteLength}),postMessage({cmd:z,type:ge,value:t.ts}),yr.decode(e,t)}},_r={LOG_NAME:"worker fmp4Demuxer",mp4Box:Vr.createFile(),offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){_r.mp4Box.onReady=_r.onReady,_r.mp4Box.onError=_r.onError,_r.mp4Box.onSamples=_r.onSamples},initTransportDescarmber(){_r.transportDescarmber=new Yr},_getSeqHeader(e){const t=_r.mp4Box.getTrackById(e.id);for(const e of t.mdia.minf.stbl.stsd.entries)if(e.avcC||e.hvcC){const t=new Vr.DataStream(void 0,0,Vr.DataStream.BIG_ENDIAN);let r=[];e.avcC?(e.avcC.write(t),r=[23,0,0,0,0]):(_r.isHevc=!0,dr=!0,e.hvcC.write(t),r=[28,0,0,0,0]);const i=new Uint8Array(t.buffer,8),n=new Uint8Array(r.length+i.length);return n.set(r,0),n.set(i,r.length),n}return null},onReady(e){yr.debug.log(_r.LOG_NAME,"onReady()",e);const t=e.videoTracks[0],r=e.audioTracks[0];if(t){_r.videoTrackId=t.id;const e=_r._getSeqHeader(t);e&&(yr.debug.log(_r.LOG_NAME,"seqHeader"),yr.decodeVideo(e,0,!0,0)),_r.mp4Box.setExtractionOptions(t.id)}if(r&&yr._opt.hasAudio){_r.audioTrackId=r.id;const e=r.audio||{},t=ut.indexOf(e.sample_rate),i=r.codec.replace("mp4a.40.","");_r.mp4Box.setExtractionOptions(r.id);const n=at({profile:parseInt(i,10),sampleRate:t,channel:e.channel_count});yr.debug.log(_r.LOG_NAME,"aacADTSHeader"),yr.decodeAudio(n,0)}_r.mp4Box.start()},onError(e){yr.debug.error(_r.LOG_NAME,"mp4Box onError",e)},onSamples(e,t,r){if(e===_r.videoTrackId)for(const e of r){const t=e.data,r=e.is_sync,i=1e3*e.cts/e.timescale;e.duration,e.timescale,r&&yr.calcIframeIntervalTimestamp(i);let n=null;n=_r.isHevc?rr(t,r):Nt(t,r),postMessage({cmd:z,type:_e,value:n.byteLength}),postMessage({cmd:z,type:ge,value:i}),yr.decode(n,{type:ee,ts:i,isIFrame:r,cts:0})}else if(e===_r.audioTrackId){if(yr._opt.hasAudio)for(const e of r){const t=e.data,r=1e3*e.cts/e.timescale;e.duration,e.timescale;const i=new Uint8Array(t.byteLength+2);i.set([175,1],0),i.set(t,2),postMessage({cmd:z,type:me,value:i.byteLength}),yr.decode(i,{type:Q,ts:r,isIFrame:!1,cts:0})}}else yr.debug.warn(_r.LOG_NAME,"onSamples() trackId error",e)},dispatch(e){let t=e;"string"!=typeof e?"object"==typeof e?(_r.transportDescarmber&&(t=_r.transportDescarmber.transport(t)),t.buffer.fileStart=_r.offset,_r.offset+=t.byteLength,_r.mp4Box.appendBuffer(t.buffer)):yr.debug.warn(_r.LOG_NAME,"dispatch()","data is not object",e):yr.debug.warn(_r.LOG_NAME,"dispatch()","data is string",e)},destroy(){_r.mp4Box&&(_r.mp4Box.flush(),_r.mp4Box=null),_r.transportDescarmber&&(_r.transportDescarmber.destroy(),_r.transportDescarmber=null),_r.offset=0,_r.videoTrackId=null,_r.audioTrackId=null,_r.isHevc=!1}},gr={LOG_NAME:"worker mpeg4Demuxer",lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:"init",hasInitVideoCodec:!1,localDts:0,dispatch(e){const t=new Uint8Array(e);gr.extractNALu(t)},destroy(){gr.lastBuffer=new Uint8Array(0),gr.parsedOffset=0,gr.firstStartCodeOffset=0,gr.secondStartCodeOffset=0,gr.state="init",gr.hasInitVideoCodec=!1,gr.localDts=0},extractNALu(e){if(!e||e.byteLength<1)return void yr.debug.warn(gr.LOG_NAME,"extractNALu() buffer error",e);const t=new Uint8Array(gr.lastBuffer.length+e.length);for(t.set(gr.lastBuffer,0),t.set(new Uint8Array(e),gr.lastBuffer.length),gr.lastBuffer=t;;){if("init"===gr.state){let e=!1;for(;gr.lastBuffer.length-gr.parsedOffset>=4;)if(0===gr.lastBuffer[gr.parsedOffset])if(0===gr.lastBuffer[gr.parsedOffset+1])if(1===gr.lastBuffer[gr.parsedOffset+2]){if(182===gr.lastBuffer[gr.parsedOffset+3]){gr.state="findFirstStartCode",gr.firstStartCodeOffset=gr.parsedOffset,gr.parsedOffset+=4,e=!0;break}gr.parsedOffset++}else gr.parsedOffset++;else gr.parsedOffset++;else gr.parsedOffset++;if(e)continue;break}if("findFirstStartCode"===gr.state){let e=!1;for(;gr.lastBuffer.length-gr.parsedOffset>=4;)if(0===gr.lastBuffer[gr.parsedOffset])if(0===gr.lastBuffer[gr.parsedOffset+1])if(1===gr.lastBuffer[gr.parsedOffset+2]){if(182===gr.lastBuffer[gr.parsedOffset+3]){gr.state="findSecondStartCode",gr.secondStartCodeOffset=gr.parsedOffset,gr.parsedOffset+=4,e=!0;break}gr.parsedOffset++}else gr.parsedOffset++;else gr.parsedOffset++;else gr.parsedOffset++;if(e)continue;break}if("findSecondStartCode"===gr.state){if(!(gr.lastBuffer.length-gr.parsedOffset>0))break;{let e,t,r=192&gr.lastBuffer[gr.parsedOffset];e=0==r?gr.secondStartCodeOffset-14:gr.secondStartCodeOffset;let i=0==(192&gr.lastBuffer[gr.firstStartCodeOffset+4]);if(i){if(gr.firstStartCodeOffset-14<0)return void yr.debug.warn(gr.LOG_NAME,"firstStartCodeOffset -14 is",gr.firstStartCodeOffset-14);gr.hasInitVideoCodec||(gr.hasInitVideoCodec=!0,yr.debug.log(gr.LOG_NAME,"setCodec"),br.setCodec(ke,"")),t=gr.lastBuffer.subarray(gr.firstStartCodeOffset-14,e)}else t=gr.lastBuffer.subarray(gr.firstStartCodeOffset,e);let n=gr.getNaluDts();gr.hasInitVideoCodec?(postMessage({cmd:z,type:_e,value:t.byteLength}),postMessage({cmd:z,type:ge,value:n}),br.decode(t,i?1:0,n)):yr.debug.warn(gr.LOG_NAME,"has not init video codec"),gr.lastBuffer=gr.lastBuffer.subarray(e),gr.firstStartCodeOffset=0==r?14:0,gr.parsedOffset=gr.firstStartCodeOffset+4,gr.state="findFirstStartCode"}}}},getNaluDts(){let e=gr.localDts;return gr.localDts=gr.localDts+40,e}},yr={isPlayer:!0,isPlayback:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:Je,_opt:fr(),mp3Demuxer:null,startStreamRateAndStatsInterval:function(){yr.stopStreamRateAndStatsInterval(),d=setInterval((()=>{l&&l(0);const e=JSON.stringify({demuxBufferDelay:yr.getVideoBufferLength(),audioDemuxBufferDelay:yr.getAudioBufferLength(),flvBufferByteLength:yr.getFlvBufferLength(),netBuf:yr.networkDelay||0,pushLatestDelay:yr.pushLatestDelay||0,isStreamTsMoreThanLocal:Ke});postMessage({cmd:z,type:ve,value:e})}),1e3)},stopStreamRateAndStatsInterval:function(){d&&(clearInterval(d),d=null)},useOffscreen:function(){return yr._opt.useOffscreen&&"undefined"!=typeof OffscreenCanvas},getDelay:function(e,t){if(!e||yr._opt.hasVideo&&!Ye)return-1;if(t===Q)return yr.delay;if(yr.preDelayTimestamp&&yr.preDelayTimestamp>e)return yr.preDelayTimestamp-e>1e3&&yr.debug.warn("worker",`getDelay() and preDelayTimestamp is ${yr.preDelayTimestamp} > timestamp is ${e} more than ${yr.preDelayTimestamp-e}ms and return ${yr.delay}`),yr.preDelayTimestamp=e,yr.delay;if(yr.firstTimestamp){if(e){const t=Date.now()-yr.startTimestamp,r=e-yr.firstTimestamp;t>=r?(Ke=!1,yr.delay=t-r):(Ke=!0,yr.delay=r-t)}}else yr.firstTimestamp=e,yr.startTimestamp=Date.now(),yr.delay=-1;return yr.preDelayTimestamp=e,yr.delay},getDelayNotUpdateDelay:function(e,t){if(!e||yr._opt.hasVideo&&!Ye)return-1;if(t===Q)return yr.pushLatestDelay;if(yr.preDelayTimestamp&&yr.preDelayTimestamp-e>1e3)return yr.debug.warn("worker",`getDelayNotUpdateDelay() and preDelayTimestamp is ${yr.preDelayTimestamp} > timestamp is ${e} more than ${yr.preDelayTimestamp-e}ms and return -1`),-1;if(yr.firstTimestamp){let t=-1;if(e){const r=Date.now()-yr.startTimestamp,i=e-yr.firstTimestamp;r>=i?(Ke=!1,t=r-i):(Ke=!0,t=i-r)}return t}return-1},resetDelay:function(){yr.firstTimestamp=null,yr.startTimestamp=null,yr.delay=-1,yr.dropping=!1},resetAllDelay:function(){yr.resetDelay(),yr.preDelayTimestamp=null},doDecode:function(e){yr._opt.isEmitSEI&&e.type===ee&&yr.isWorkerFetch&&yr.findSei(e.payload,e.ts),yr._opt.useWCS&&yr.useOffscreen()&&e.type===ee&&s.decode?s.decode(e.payload,e.ts,e.cts):e.decoder.decode(e.payload,e.ts,e.isIFrame,e.cts)},decodeNext(e){if(0===i.length)return;const t=e.ts,n=i[0],s=e.type===ee&&xt(e.payload);if(At(r))s&&(yr.debug.log("worker",`decode data type is ${e.type} and\n ts is ${t} next data type is ${n.type} ts is ${n.ts}\n isVideoSqeHeader is ${s}`),i.shift(),yr.doDecode(n));else{const r=n.ts-t,o=n.type===Q&&e.type===ee;(r<=20||o||s)&&(yr.debug.log("worker",`decode data type is ${e.type} and\n ts is ${t} next data type is ${n.type} ts is ${n.ts}\n diff is ${r} and isVideoAndNextAudio is ${o} and isVideoSqeHeader is ${s}`),i.shift(),yr.doDecode(n))}},init:function(){yr.debug.log("worker","init and opt is",JSON.stringify(yr._opt));const e=yr._opt.playType===_,t=yr._opt.playType===g;if(mr.init(),yr.isPlayer=e,yr.isPlayback=t,yr.isPlaybackCacheBeforeDecodeForFpsRender())yr.debug.log("worker","playback and playbackIsCacheBeforeDecodeForFpsRender is true");else{const t=()=>{let t=null;if(i.length){if(yr.isPushDropping)return void yr.debug.warn("worker",`loop() isPushDropping is true and bufferList length is ${i.length}`);if(yr.dropping){for(t=i.shift(),yr.debug.warn("worker",`loop() dropBuffer is dropping and isIFrame ${t.isIFrame} and delay is ${yr.delay} and bufferlist is ${i.length}`);!t.isIFrame&&i.length;)t=i.shift();const e=yr.getDelayNotUpdateDelay(t.ts,t.type);t.isIFrame&&e<=yr.getNotDroppingDelayTs()&&(yr.debug.log("worker","loop() is dropping = false, is iFrame"),yr.dropping=!1,yr.doDecode(t),yr.decodeNext(t))}else if(yr.isPlayback||yr.isPlayUseMSE())for(;i.length;)t=i.shift(),yr.doDecode(t);else if(t=i[0],-1===yr.getDelay(t.ts,t.type))yr.debug.log("worker","loop() common dumex delay is -1 ,data.ts is",t.ts),i.shift(),yr.doDecode(t),yr.decodeNext(t);else if(yr.delay>yr._opt.videoBuffer+yr._opt.videoBufferDelay&&e)yr.hasIframeInBufferList()?(yr.debug.log("worker",`delay is ${yr.delay}, set dropping is true`),yr.resetAllDelay(),yr.dropping=!0,postMessage({cmd:O})):(i.shift(),yr.doDecode(t),yr.decodeNext(t));else for(;i.length;){if(t=i[0],!(yr.getDelay(t.ts,t.type)>yr._opt.videoBuffer)){yr.delay<0&&yr.debug.warn("worker",`loop() do not decode and delay is ${yr.delay}, bufferList is ${i.length}`);break}i.shift(),yr.doDecode(t)}}else-1!==yr.delay&&yr.debug.log("worker","loop() bufferList is empty and reset delay"),yr.resetAllDelay()};yr.stopId=setInterval((()=>{let e=(new Date).getTime();Xe||(Xe=e);const r=e-Xe;r>100&&yr.debug.warn("worker",`loop demux diff time is ${r}`),t(),Xe=(new Date).getTime()}),20)}At(yr._opt.checkFirstIFrame)&&(Ye=!0)},playbackCacheLoop:function(){yr.stopId&&(clearInterval(yr.stopId),yr.stopId=null);const e=()=>{let e=null;i.length&&(e=i.shift(),yr.doDecode(e))};e();const t=Math.ceil(1e3/(yr.streamFps*yr._opt.playbackRate));yr.debug.log("worker",`playbackCacheLoop fragDuration is ${t}, streamFps is ${yr.streamFps}, streamAudioFps is ${yr.streamAudioFps} ,streamVideoFps is ${yr.streamVideoFps} playbackRate is ${yr._opt.playbackRate}`),yr.stopId=setInterval(e,t)},close:function(){if(yr.debug.log("worker","close"),yr.isDestroyed=!0,pr(),!a||1!==a.readyState&&2!==a.readyState?a&&yr.debug.log("worker",`close() and socket.readyState is ${a.readyState}`):(cr=!0,a.close(1e3,"Client disconnecting")),a=null,yr.stopStreamRateAndStatsInterval(),yr.stopId&&(clearInterval(yr.stopId),yr.stopId=null),yr.mp3Demuxer&&(yr.mp3Demuxer.destroy(),yr.mp3Demuxer=null),yr.writableStream&&At(yr.writableStream.locked)&&yr.writableStream.close().catch((e=>{yr.debug.log("worker","close() and writableStream.close() error",e)})),yr.writableStream=null,vr)try{vr.clear&&vr.clear(),vr=null}catch(e){yr.debug.warn("worker","close() and audioDecoder.clear error",e)}if(br)try{br.clear&&br.clear(),br=null}catch(e){yr.debug.warn("worker","close() and videoDecoder.clear error",e)}l=null,Xe=null,Ke=!1,s&&(s.reset&&s.reset(),s=null),yr.firstTimestamp=null,yr.startTimestamp=null,yr.networkDelay=0,yr.streamFps=null,yr.streamAudioFps=null,yr.streamVideoFps=null,yr.delay=-1,yr.pushLatestDelay=-1,yr.preDelayTimestamp=null,yr.dropping=!1,yr.isPushDropping=!1,yr.isPlayer=!0,yr.isPlayback=!1,yr.isWorkerFetch=!1,yr._opt=fr(),yr.webglObj&&(yr.webglObj.destroy(),yr.offscreenCanvas.removeEventListener("webglcontextlost",yr.onOffscreenCanvasWebglContextLost),yr.offscreenCanvas.removeEventListener("webglcontextrestored",yr.onOffscreenCanvasWebglContextRestored),yr.offscreenCanvas=null,yr.offscreenCanvasGL=null,yr.offscreenCanvasCtx=null),i=[],n=[],u=null,v=null,b=null,S=!1,Ge=!1,Ye=!1,qt=!1,Qt=!1,lr=!1,dr=null,ur=null,Tt=[],Ft=0,It=0,ot=null,ft=null,Lt=null,Rt=null,hr=null,jt=0,Yt=0,Ct=null,Bt=null,yr.fetchStatus=Je,mr.destroy(),_r.destroy(),gr.destroy(),postMessage({cmd:W})},pushBuffer:function(e,t){if(t.type===Q&<(e)){if(yr.debug.log("worker",`pushBuffer audio ts is ${t.ts}, isAacCodecPacket is true`),yr._opt.isRecordTypeFlv){const t=new Uint8Array(e);postMessage({cmd:K,buffer:t},[t.buffer])}yr.decodeAudio(e,t.ts)}else if(t.type===ee&&t.isIFrame&&xt(e)){if(yr.debug.log("worker",`pushBuffer video ts is ${t.ts}, isVideoSequenceHeader is true`),yr._opt.isRecordTypeFlv){const t=new Uint8Array(e);postMessage({cmd:X,buffer:t},[t.buffer])}yr.decodeVideo(e,t.ts,t.isIFrame,t.cts)}else{if(yr._opt.isRecording)if(yr._opt.isRecordTypeFlv){const r=new Uint8Array(e);postMessage({cmd:Z,type:t.type,buffer:r,ts:t.ts},[r.buffer])}else if(yr._opt.recordType===y)if(t.type===ee){const r=new Uint8Array(e).slice(5);postMessage({cmd:I,buffer:r,isIFrame:t.isIFrame,ts:t.ts,cts:t.cts},[r.buffer])}else if(t.type===Q&&yr._opt.isWasmMp4){const r=new Uint8Array(e),i=dt(r)?r.slice(2):r.slice(1);postMessage({cmd:B,buffer:i,ts:t.ts},[i.buffer])}if(yr.isPlayer&&jt>0&&Rt>0&&t.type===ee){const e=t.ts-Rt,r=jt+jt/2;e>r&&yr.debug.log("worker",`pushBuffer video\n ts is ${t.ts}, preTimestamp is ${Rt},\n diff is ${e} and preTimestampDuration is ${jt} and maxDiff is ${r}\n maybe trigger black screen or flower screen\n `)}if(yr.isPlayer&&Rt>0&&t.type===ee&&t.tsw&&(yr.debug.warn("worker",`pushBuffer,\n preTimestamp is ${Rt}, options.ts is ${t.ts},\n diff is ${Rt-t.ts} more than 3600000,\n and resetAllDelay`),yr.resetAllDelay()),yr.isPlayer&&t.ts<=Rt&&Rt>0&&t.type===ee&&(yr.debug.warn("worker",`pushBuffer,\n options.ts is ${t.ts} less than (or equal) preTimestamp is ${Rt} and\n payloadBufferSize is ${e.byteLength} and prevPayloadBufferSize is ${Yt}`),yr._opt.isDropSameTimestampGop&&Ye)){const e=yr.hasIframeInBufferList(),t=At(yr.isPushDropping);return yr.debug.log("worker",`pushBuffer, isDropSameTimestampGop is true and\n hasIframe is ${e} and isNotPushDropping is ${t} and next dropBuffer`),void(e&&t?yr.dropBuffer$2():(yr.clearBuffer(!0),kt(yr._opt.checkFirstIFrame)&&kt(r)&&postMessage({cmd:J})))}if(yr.isPlayer&&Ye){const e=yr._opt.videoBuffer+yr._opt.videoBufferDelay,r=yr.getDelayNotUpdateDelay(t.ts,t.type);yr.pushLatestDelay=r,r>e&&yr.delay0&&yr.hasIframeInBufferList()&&!1===yr.isPushDropping&&(yr.debug.log("worker",`pushBuffer(), pushLatestDelay is ${r} more than ${e} and decoder.delay is ${yr.delay} and has iIframe and next decoder.dropBuffer$2()`),yr.dropBuffer$2())}if(yr.isPlayer&&t.type===ee&&(Rt>0&&(jt=t.ts-Rt),Yt=e.byteLength,Rt=t.ts),t.type===Q?i.push({ts:t.ts,payload:e,decoder:{decode:yr.decodeAudio},type:Q,isIFrame:!1}):t.type===ee&&i.push({ts:t.ts,cts:t.cts,payload:e,decoder:{decode:yr.decodeVideo},type:ee,isIFrame:t.isIFrame}),yr.isPlaybackCacheBeforeDecodeForFpsRender()&&(_t(yr.streamVideoFps)||_t(yr.streamAudioFps))){let e=yr.streamVideoFps,t=yr.streamAudioFps;if(_t(yr.streamVideoFps)&&(e=Et(i,ee),e&&(yr.streamVideoFps=e,postMessage({cmd:$,value:yr.streamVideoFps}),yr.streamFps=t?e+t:e,At(yr._opt.hasAudio)&&(yr.debug.log("worker","playbackCacheBeforeDecodeForFpsRender, _opt.hasAudio is false and set streamAudioFps is 0"),yr.streamAudioFps=0),yr.playbackCacheLoop())),_t(yr.streamAudioFps)&&(t=Et(i,Q),t&&(yr.streamAudioFps=t,yr.streamFps=e?e+t:t,yr.playbackCacheLoop())),_t(yr.streamVideoFps)&&_t(yr.streamAudioFps)){const r=i.map((e=>({type:e.type,ts:e.ts})));yr.debug.log("worker",`playbackCacheBeforeDecodeForFpsRender, calc streamAudioFps is ${t}, streamVideoFps is ${e}, bufferListLength is ${i.length}, and ts list is ${JSON.stringify(r)}`)}const r=yr.getAudioBufferLength()>0,n=r?60:40;i.length>=n&&(yr.debug.warn("worker",`playbackCacheBeforeDecodeForFpsRender, bufferListLength is ${i.length} more than ${n}, and hasAudio is ${r} an set streamFps is 25`),yr.streamVideoFps=25,postMessage({cmd:$,value:yr.streamVideoFps}),r?(yr.streamAudioFps=25,yr.streamFps=yr.streamVideoFps+yr.streamAudioFps):yr.streamFps=yr.streamVideoFps,yr.playbackCacheLoop())}}},getVideoBufferLength(){let e=0;return i.forEach((t=>{t.type===ee&&(e+=1)})),e},hasIframeInBufferList:()=>i.some((e=>e.type===ee&&e.isIFrame)),isAllIframeInBufferList(){const e=yr.getVideoBufferLength();let t=0;return i.forEach((e=>{e.type===ee&&e.isIFrame&&(t+=1)})),e===t},getNotDroppingDelayTs:()=>yr._opt.videoBuffer+yr._opt.videoBufferDelay/2,getAudioBufferLength(){let e=0;return i.forEach((t=>{t.type===Q&&(e+=1)})),e},getFlvBufferLength(){let e=0;return u&&u.buffer&&(e=u.buffer.byteLength),yr._opt.isNakedFlow&&mr.lastBuf&&(e=mr.lastBuf.byteLength),e},fetchStream:function(e,t){yr.debug.log("worker","fetchStream, url is "+e,"options:",JSON.stringify(t)),yr.isWorkerFetch=!0,t.isFlv?yr._opt.isFlv=!0:t.isFmp4?yr._opt.isFmp4=!0:t.isMpeg4?yr._opt.isMpeg4=!0:t.isNakedFlow&&(yr._opt.isNakedFlow=!0),l=pt((e=>{postMessage({cmd:z,type:pe,value:e})})),yr.startStreamRateAndStatsInterval(),t.isFmp4&&(_r.listenMp4Box(),yr._opt.isFmp4Private&&_r.initTransportDescarmber()),t.protocol===f?(u=new Pt(yr.demuxFlv()),fetch(e,{signal:o.signal}).then((e=>{if(kt(cr))return yr.debug.log("worker","request abort and run res.body.cancel()"),yr.fetchStatus=Je,void e.body.cancel();if(!St(e))return yr.debug.warn("worker",`fetch response status is ${e.status} and ok is ${e.ok} and emit error and next abort()`),pr(),void postMessage({cmd:z,type:Ee.fetchError,value:`fetch response status is ${e.status} and ok is ${e.ok}`});if(postMessage({cmd:z,type:ye}),bt())yr.writableStream=new WritableStream({write:e=>o&&o.signal&&o.signal.aborted?(yr.debug.log("worker","writableStream write() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et)):kt(cr)?(yr.debug.log("worker","writableStream write() and requestAbort is true so return"),void(yr.fetchStatus=et)):(yr.fetchStatus=Qe,l(e.byteLength),void(t.isFlv?u.write(e):t.isFmp4?yr.demuxFmp4(e):t.isMpeg4&&yr.demuxMpeg4(e))),close:()=>{yr.fetchStatus=et,u=null,pr(),postMessage({cmd:z,type:fe,value:p})},abort:e=>{if(o&&o.signal&&o.signal.aborted)return yr.debug.log("worker","writableStream abort() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et);u=null,e.name!==qe&&(pr(),postMessage({cmd:z,type:Ee.fetchError,value:e.toString()}))}}),e.body.pipeTo(yr.writableStream);else{const r=e.body.getReader(),i=()=>{r.read().then((e=>{let{done:r,value:n}=e;return r?(yr.fetchStatus=et,u=null,pr(),void postMessage({cmd:z,type:fe,value:p})):o&&o.signal&&o.signal.aborted?(yr.debug.log("worker","fetchNext().then() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et)):kt(cr)?(yr.debug.log("worker","fetchNext().then() and requestAbort is true so return"),void(yr.fetchStatus=et)):(yr.fetchStatus=Qe,l(n.byteLength),t.isFlv?u.write(n):t.isFmp4?yr.demuxFmp4(n):t.isMpeg4&&yr.demuxMpeg4(n),void i())})).catch((e=>{if(o&&o.signal&&o.signal.aborted)return yr.debug.log("worker","fetchNext().catch() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et);u=null,e.name!==qe&&(pr(),postMessage({cmd:z,type:Ee.fetchError,value:e.toString()}))}))};i()}})).catch((e=>{o&&o.signal&&o.signal.aborted?yr.debug.log("worker","fetch().catch() and abortController.signal.aborted is true so return"):e.name!==qe&&(pr(),postMessage({cmd:z,type:Ee.fetchError,value:e.toString()}),u=null)}))):t.protocol===c&&(t.isFlv&&(u=new Pt(yr.demuxFlv())),a=new WebSocket(e),a.binaryType="arraybuffer",a.onopen=()=>{yr.debug.log("worker","fetchStream, WebsocketStream socket open"),postMessage({cmd:z,type:ye}),postMessage({cmd:z,type:we})},a.onclose=e=>{yr.debug.log("worker",`fetchStream, WebsocketStream socket close and code is ${e.code}`),1006===e.code&&yr.debug.error("worker",`fetchStream, WebsocketStream socket close abnormally and code is ${e.code}`),kt(cr)?yr.debug.log("worker","fetchStream, WebsocketStream socket close and requestAbort is true so return"):(u=null,postMessage({cmd:z,type:fe,value:m}))},a.onerror=e=>{yr.debug.error("worker","fetchStream, WebsocketStream socket error",e),u=null,postMessage({cmd:z,type:Ee.websocketError,value:e.isTrusted?"websocket user aborted":"websocket error"})},a.onmessage=e=>{l(e.data.byteLength),t.isFlv?u.write(e.data):t.isFmp4?yr.demuxFmp4(e.data):t.isMpeg4?yr.demuxMpeg4(e.data):yr._opt.isNakedFlow?yr.demuxNakedFlow(e.data):yr.demuxM7s(e.data)})},demuxFlv:function*(){yield 9;const e=new ArrayBuffer(4),t=new Uint8Array(e),r=new Uint32Array(e);for(;;){t[3]=0;const e=yield 15,i=e[4];t[0]=e[7],t[1]=e[6],t[2]=e[5];const n=r[0];t[0]=e[10],t[1]=e[9],t[2]=e[8],t[3]=e[11];let s=r[0];const o=(yield n).slice();switch(i){case te:if(o.byteLength>0){let e=o;kt(yr._opt.m7sCryptoAudio)&&(e=yr.cryptoPayloadAudio(o)),yr.decode(e,{type:Q,ts:s})}else yr.debug.warn("worker",`demuxFlv() type is audio and payload.byteLength is ${o.byteLength} and return`);break;case re:if(o.byteLength>=6){const e=o[0];if(yr._isEnhancedH265Header(e))yr._decodeEnhancedH265Video(o,s);else{o[0];const e=o[0]>>4===Ze;if(e&&xt(o)&&null===dr){const e=15&o[0];dr=e===xe,ur=Zt(o,dr),yr.debug.log("worker",`demuxFlv() isVideoSequenceHeader is true and isHevc is ${dr} and nalUnitSize is ${ur}`)}e&&yr.calcIframeIntervalTimestamp(s),yr.isPlayer&&yr.calcNetworkDelay(s),r[0]=o[4],r[1]=o[3],r[2]=o[2],r[3]=0;let t=r[0],i=yr.cryptoPayload(o,e);yr.decode(i,{type:ee,ts:s,isIFrame:e,cts:t})}}else yr.debug.warn("worker",`demuxFlv() type is video and payload.byteLength is ${o.byteLength} and return`);break;case ie:postMessage({cmd:q,buffer:o},[o.buffer]);break;default:yr.debug.log("worker",`demuxFlv() type is ${i}`)}}},decode:function(e,t){t.type===Q?yr._opt.hasAudio&&(postMessage({cmd:z,type:me,value:e.byteLength}),yr.isPlayer?yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts}):yr.isPlayback&&(yr.isPlaybackCacheBeforeDecodeForFpsRender(),yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts}))):t.type===ee&&yr._opt.hasVideo&&(postMessage({cmd:z,type:_e,value:e.byteLength}),postMessage({cmd:z,type:ge,value:t.ts}),yr.isPlayer?yr.pushBuffer(e,{type:t.type,ts:t.ts,isIFrame:t.isIFrame,cts:t.cts}):yr.isPlayback&&(yr.isPlaybackOnlyDecodeIFrame()?t.isIFrame&&yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts,isIFrame:t.isIFrame}):(yr.isPlaybackCacheBeforeDecodeForFpsRender(),yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts,isIFrame:t.isIFrame}))))},cryptoPayload:function(e,t){let r=e;return yr._opt.isM7sCrypto?yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?r=Gr(e,yr._opt.cryptoKey,yr._opt.cryptoIV,dr):yr.debug.error("worker",`isM7sCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`):yr._opt.isSm4Crypto?yr._opt.sm4CryptoKey&&t?r=di(e,yr._opt.sm4CryptoKey):yr._opt.sm4CryptoKey||yr.debug.error("worker","isSm4Crypto opt.sm4CryptoKey is null"):yr._opt.isXorCrypto&&(yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?r=pi(e,yr._opt.cryptoKey,yr._opt.cryptoIV,dr):yr.debug.error("worker",`isXorCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`)),r},cryptoPayloadAudio:function(e){let t=e;return yr._opt.isM7sCrypto&&(yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?e[0]>>4===Ce&&(t=Hr(e,yr._opt.cryptoKey,yr._opt.cryptoIV)):yr.debug.error("worker",`isM7sCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`)),t},setCodecAudio:function(e,t){const r=e[0]>>4,i=e[0]>>1&1;if(hr=r===Ce?i?16:8:0===i?8:16,vr&&vr.setCodec)if(lt(e)||r===Be||r===Fe||r===Pe){yr.debug.log("worker",`setCodecAudio: init audio codec, codeId is ${r}`);const i=r===Ce?e.slice(2):new Uint8Array(0);vr.setCodec(r,yr._opt.sampleRate,i),postMessage({cmd:F,buffer:i},[i.buffer]),Ge=!0,r!==Ce&&(r===Pe?(yr.mp3Demuxer||(yr.mp3Demuxer=new hi(yr),yr.mp3Demuxer.on("data",((e,t)=>{vr.decode(e,t)}))),yr.mp3Demuxer.dispatch(e.slice(1),t)):vr.decode(e.slice(1),t));{const e=Number("1")||1;setTimeout((()=>{yr.debug.error("worker","jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),yr.close(),postMessage({cmd:N})}),60*e*60*1e3)}}else yr.debug.warn("worker","setCodecAudio: hasInitAudioCodec is false, codecId is ",r);else yr.debug.error("worker","setCodecAudio: audioDecoder or audioDecoder.setCodec is null")},decodeAudio:function(e,t){if(yr.isDestroyed)yr.debug.log("worker","decodeAudio, decoder is destroyed and return");else if(kt(r)&&kt(yr._opt.mseDecodeAudio))postMessage({cmd:R,payload:e,ts:t,cts:t},[e.buffer]);else{const r=e[0]>>4;Ge?r===Pe?yr.mp3Demuxer.dispatch(e.slice(1),t):vr.decode(r===Ce?e.slice(2):e.slice(1),t):yr.setCodecAudio(e,t)}},setCodecVideo:function(e){const t=15&e[0];if(br&&br.setCodec)if(xt(e))if(t===Ue||t===xe){yr.debug.log("worker",`setCodecVideo: init video codec , codecId is ${t}`);const r=e.slice(5);if(t===Ue&&yr._opt.useSIMD){const e=zt(r);if(e.codecWidth>E||e.codecHeight>E)return postMessage({cmd:V}),void yr.debug.warn("worker",`setCodecVideo: SIMD H264 decode video width is too large, width is ${e.codecWidth}, height is ${e.codecHeight}`)}S=!0,br.setCodec(t,r),yr._opt.recordType===y&&postMessage({cmd:D,buffer:e,codecId:t},[e.buffer])}else yr.debug.warn("worker",`setCodecVideo: hasInitVideoCodec is false, codecId is ${t} is not H264 or H265`);else yr.debug.warn("worker",`decodeVideo: hasInitVideoCodec is false, codecId is ${t} and frameType is ${e[0]>>4} and packetType is ${e[1]}`);else yr.debug.error("worker","setCodecVideo: videoDecoder or videoDecoder.setCodec is null")},decodeVideo:function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(yr.isDestroyed)yr.debug.log("worker","decodeVideo, decoder is destroyed and return");else if(kt(r))postMessage({cmd:L,payload:e,isIFrame:i,ts:t,cts:n,delay:yr.delay},[e.buffer]);else if(S)if(!Ye&&i&&(Ye=!0),Ye){if(i&&xt(e)){const t=15&e[0];let r={};t===Ue?r=zt(e.slice(5)):t===xe&&(r=Jt(e)),r.codecWidth&&r.codecHeight&&v&&b&&(r.codecWidth!==v||r.codecHeight!==b)&&(yr.debug.warn("worker",`\n decodeVideo: video width or height is changed,\n old width is ${v}, old height is ${b},\n new width is ${r.codecWidth}, new height is ${r.codecHeight},\n and emit change event`),Qt=!0,postMessage({cmd:G}))}if(Qt)return void yr.debug.warn("worker","decodeVideo: video width or height is changed, and return");if(lr)return void yr.debug.warn("worker","decodeVideo: simd decode error, and return");if(xt(e))return void yr.debug.warn("worker","decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void yr.debug.warn("worker",`decodeVideo and payload is too small , payload length is ${e.byteLength}`);const r=e.slice(5);br.decode(r,i?1:0,t)}else yr.debug.log("worker","decodeVideo first frame is not iFrame");else yr.setCodecVideo(e)},clearBuffer:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];yr.debug.log("worker",`clearBuffer,bufferList length is ${i.length}, need clear is ${e}`),e&&(i=[]),yr.isPlayer&&(yr.resetAllDelay(),kt(yr._opt.checkFirstIFrame)&&(yr.dropping=!0,postMessage({cmd:O}))),kt(yr._opt.checkFirstIFrame)&&At(r)&&(Ye=!1)},dropBuffer$2:function(){if(i.length>0){let e=i.findIndex((e=>kt(e.isIFrame)&&e.type===ee));if(yr.isAllIframeInBufferList())for(let t=0;t=yr.getNotDroppingDelayTs()){yr.debug.log("worker",`dropBuffer$2() isAllIframeInBufferList() is true, and index is ${t} and tempDelay is ${n} and notDroppingDelayTs is ${yr.getNotDroppingDelayTs()}`),e=t;break}}if(e>=0){yr.isPushDropping=!0,postMessage({cmd:O});const t=i.length;i=i.slice(e);const r=i.shift();yr.resetAllDelay(),yr.getDelay(r.ts,r.type),yr.doDecode(r),yr.isPushDropping=!1,yr.debug.log("worker",`dropBuffer$2() iFrameIndex is ${e},and old bufferList length is ${t} ,new bufferList is ${i.length} and new delay is ${yr.delay} `)}else yr.isPushDropping=!1}0===i.length&&(yr.isPushDropping=!1)},demuxM7s:function(e){const t=new DataView(e),r=t.getUint32(1,!1),i=t.getUint8(0),n=new ArrayBuffer(4),s=new Uint32Array(n);switch(i){case Q:yr.decode(new Uint8Array(e,5),{type:Q,ts:r});break;case ee:if(t.byteLength>=11){const i=new Uint8Array(e,5),n=i[0];if(yr._isEnhancedH265Header(n))yr._decodeEnhancedH265Video(i,r);else{const e=t.getUint8(5)>>4==1;if(e&&(yr.calcIframeIntervalTimestamp(r),xt(i)&&null===dr)){const e=15&i[0];dr=e===xe}yr.isPlayer&&yr.calcNetworkDelay(r),s[0]=i[4],s[1]=i[3],s[2]=i[2],s[3]=0;let n=s[0],o=yr.cryptoPayload(i,e);yr.decode(o,{type:ee,ts:r,isIFrame:e,cts:n})}}else yr.debug.warn("worker",`demuxM7s() type is video and arrayBuffer length is ${e.byteLength} and return`)}},demuxNakedFlow:function(e){mr.dispatch(e)},demuxFmp4:function(e){const t=new Uint8Array(e);_r.dispatch(t)},demuxMpeg4:function(e){gr.dispatch(e)},_decodeEnhancedH265Video:function(e,t){const r=e[0],i=48&r,n=15&r,s=e.slice(1,5),o=new ArrayBuffer(4),a=new Uint32Array(o),l="a"==String.fromCharCode(s[0]);if(dr=At(l),n===rt){if(i===st){const r=e.slice(5);if(l);else{const i=new Uint8Array(5+r.length);i.set([28,0,0,0,0],0),i.set(r,5),ur=Zt(e,dr),yr.debug.log("worker",`demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is ${dr} and nalUnitSize is ${ur}`),yr.decode(i,{type:ee,ts:t,isIFrame:!0,cts:0})}}}else if(n===it){let r=e,n=0;const s=i===st;s&&yr.calcIframeIntervalTimestamp(t),l||(a[0]=e[4],a[1]=e[3],a[2]=e[2],a[3]=0,n=a[0],r=rr(e.slice(8),s),r=yr.cryptoPayload(r,s),yr.decode(r,{type:ee,ts:t,isIFrame:s,cts:n}))}else if(n===nt){const r=i===st;r&&yr.calcIframeIntervalTimestamp(t);let n=rr(e.slice(5),r);n=yr.cryptoPayload(n,r),yr.decode(n,{type:ee,ts:t,isIFrame:r,cts:0})}},_isEnhancedH265Header:function(e){return(e&tt)===tt},findSei:function(e,t){let r=4;gt(ur)&&(r=ur),Kt(e.slice(5),r).forEach((e=>{const r=dr?e[0]>>>1&63:31&e[0];(dr&&(r===Ve||r===He)||At(dr)&&r===Re)&&postMessage({cmd:Y,buffer:e,ts:t},[e.buffer])}))},flvHasUnitTypeIDR(e,t){const r=Kt(e.slice(5));let i=!1;return r.forEach((e=>{const r=t?e[0]>>>1&63:31&e[0];(t&&(r===ze||r===Me)||At(t)&&r===Le)&&(i=!0)})),i},calcNetworkDelay:function(e){if(!(Ye&&e>0))return;null===ot?(ot=e,ft=ht()):et?r-t:0;yr.networkDelay=i,i>yr._opt.networkDelay&&yr._opt.playType===_&&(yr.debug.warn("worker",`calcNetworkDelay now dts:${e}, start dts is ${ot} vs start is ${t},local diff is ${r} ,delay is ${i}`),postMessage({cmd:z,type:be,value:i}))},calcIframeIntervalTimestamp:function(e){null===Lt?Lt=e:Lt=yr._opt.playbackForwardMaxRateDecodeIFrame},isPlayUseMSE:function(){return yr.isPlayer&&yr._opt.useMSE&&kt(r)},playbackUpdatePlaybackRate:function(){yr.clearBuffer(!0)},onOffscreenCanvasWebglContextLost:function(e){yr.debug.error("worker","handleOffscreenCanvasWebglContextLost and next try to create webgl"),e.preventDefault(),qt=!0,yr.webglObj.destroy(),yr.webglObj=null,yr.offscreenCanvasGL=null,setTimeout((()=>{yr.offscreenCanvasGL=yr.offscreenCanvas.getContext("webgl"),yr.offscreenCanvasGL&&yr.offscreenCanvasGL.getContextAttributes().stencil?(yr.webglObj=h(yr.offscreenCanvasGL,yr._opt.openWebglAlignment),qt=!1):yr.debug.error("worker","handleOffscreenCanvasWebglContextLost, stencil is false")}),500)},onOffscreenCanvasWebglContextRestored:function(e){yr.debug.log("worker","handleOffscreenCanvasWebglContextRestored"),e.preventDefault()},videoInfo:function(e,t,r){postMessage({cmd:P,code:e}),postMessage({cmd:x,w:t,h:r}),v=t,b=r,yr.useOffscreen()&&(yr.offscreenCanvas=new OffscreenCanvas(t,r),yr.offscreenCanvasGL=yr.offscreenCanvas.getContext("webgl"),yr.webglObj=h(yr.offscreenCanvasGL,yr._opt.openWebglAlignment),yr.offscreenCanvas.addEventListener("webglcontextlost",yr.onOffscreenCanvasWebglContextLost,!1),yr.offscreenCanvas.addEventListener("webglcontextrestored",yr.onOffscreenCanvasWebglContextRestored,!1))},audioInfo:function(e,t,r){postMessage({cmd:C,code:e}),postMessage({cmd:T,sampleRate:t,channels:r,depth:hr}),It=r},yuvData:function(t,r){if(yr.isDestroyed)return void yr.debug.log("worker","yuvData, decoder is destroyed and return");const i=v*b*3/2;let n=e.HEAPU8.subarray(t,t+i),s=new Uint8Array(n);if(Ct=null,yr.useOffscreen())try{if(qt)return;yr.webglObj.renderYUV(v,b,s);let e=yr.offscreenCanvas.transferToImageBitmap();postMessage({cmd:k,buffer:e,delay:yr.delay,ts:r},[e])}catch(e){yr.debug.error("worker","yuvData, transferToImageBitmap error is",e)}else postMessage({cmd:k,output:s,delay:yr.delay,ts:r},[s.buffer])},pcmData:function(e,r,i){if(yr.isDestroyed)return void yr.debug.log("worker","pcmData, decoder is destroyed and return");let s=r,o=[],a=0,l=yr._opt.audioBufferSize;for(let r=0;r<2;r++){let i=t.HEAPU32[(e>>2)+r]>>2;o[r]=t.HEAPF32.subarray(i,i+s)}if(Ft){if(!(s>=(r=l-Ft)))return Ft+=s,n[0]=Float32Array.of(...n[0],...o[0]),void(2==It&&(n[1]=Float32Array.of(...n[1],...o[1])));Tt[0]=Float32Array.of(...n[0],...o[0].subarray(0,r)),2==It&&(Tt[1]=Float32Array.of(...n[1],...o[1].subarray(0,r))),postMessage({cmd:A,buffer:Tt,ts:i},Tt.map((e=>e.buffer))),a=r,s-=r}for(Ft=s;Ft>=l;Ft-=l)Tt[0]=o[0].slice(a,a+=l),2==It&&(Tt[1]=o[1].slice(a-l,a)),postMessage({cmd:A,buffer:Tt,ts:i},Tt.map((e=>e.buffer)));Ft&&(n[0]=o[0].slice(a),2==It&&(n[1]=o[1].slice(a)))},errorInfo:function(e){null===Ct&&(Ct=ht());const t=ht(),r=ct(Bt>0?2*Bt:5e3,1e3,5e3),i=t-Ct;i>r&&(yr.debug.warn("worker",`errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is ${Bt} and diff is ${i} and maxDiff is ${r}\n and replay`),lr=!0,postMessage({cmd:H}))},sendWebsocketMessage:function(e){a?a.readyState===Se?a.send(e):yr.debug.error("worker","socket is not open"):yr.debug.error("worker","socket is null")},timeEnd:function(){yr.debug.error("worker","jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),yr.close(),postMessage({cmd:N})},postStreamToMain(e,t){postMessage({cmd:j,type:t,buffer:e},[e.buffer])}};yr.debug=new Dt(yr);let vr=null;t.AudioDecoder&&(vr=new t.AudioDecoder(yr));let br=null;e.VideoDecoder&&(br=new e.VideoDecoder(yr)),postMessage({cmd:U}),self.onmessage=function(e){let t=e.data;switch(t.cmd){case ne:try{yr._opt=Object.assign(yr._opt,JSON.parse(t.opt))}catch(e){}yr.init();break;case se:yr.pushBuffer(t.buffer,t.options);break;case oe:yr.decodeAudio(t.buffer,t.ts);break;case ae:yr.decodeVideo(t.buffer,t.ts,t.isIFrame);break;case ue:yr.clearBuffer(t.needClear);break;case he:yr.fetchStream(t.url,JSON.parse(t.opt));break;case le:yr.close();break;case de:yr.debug.log("worker","updateConfig",t.key,t.value),yr._opt[t.key]=t.value,"playbackRate"===t.key&&(yr.playbackUpdatePlaybackRate(),yr.isPlaybackCacheBeforeDecodeForFpsRender()&&yr.playbackCacheLoop());break;case ce:yr.sendWebsocketMessage(t.message)}}}(e[1],t)}))})); +!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,r=(e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href,async function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function t(){return F.buffer!=O.buffer&&G(),O}function n(){return F.buffer!=O.buffer&&G(),W}function o(){return F.buffer!=O.buffer&&G(),U}function a(){return F.buffer!=O.buffer&&G(),x}function i(){return F.buffer!=O.buffer&&G(),j}function s(){return F.buffer!=O.buffer&&G(),L}function l(){return F.buffer!=O.buffer&&G(),z}function d(){return F.buffer!=O.buffer&&G(),N}var u,c,f;(f=r).ready=new Promise(((e,r)=>{u=e,c=r})),(f=void 0!==f?f:{}).locateFile=function(e,r){return"decoder-pro-mt-worker.wasm"==e?"undefined"!=typeof JESSIBUCA_PRO_MT_WORKER_WASM_URL&&""!=JESSIBUCA_PRO_MT_WORKER_WASM_URL?JESSIBUCA_PRO_MT_WORKER_WASM_URL:r+e:"decoder-pro-mt-worker.worker.js"==e&&"undefined"!=typeof JESSIBUCA_PRO_MT_WORKER_JS_URL&&""!=JESSIBUCA_PRO_MT_WORKER_JS_URL?JESSIBUCA_PRO_MT_WORKER_JS_URL:r+e};var h,p,m,g=Object.assign({},f),v="./this.program",y=(e,r)=>{throw r},w="object"==typeof window,b="function"==typeof importScripts,_="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,E=f.ENVIRONMENT_IS_PTHREAD||!1,k="";function S(e){return f.locateFile?f.locateFile(e,k):k+e}if(_){const{createRequire:e}=await import("module");var A=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href),C=A("fs"),T=A("path");let r;k=b?T.dirname(k)+"/":A("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href)),h=(e,r)=>(e=he(e)?new URL(e):T.normalize(e),C.readFileSync(e,r?void 0:"utf8")),m=e=>{var r=h(e,!0);return r.buffer||(r=new Uint8Array(r)),r},p=function(e,r,t){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=he(e)?new URL(e):T.normalize(e),C.readFile(e,n?void 0:"utf8",((e,o)=>{e?t(e):r(n?o.buffer:o)}))},!f.thisProgram&&process.argv.length>1&&(v=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),y=(e,r)=>{throw process.exitCode=e,r},f.inspect=()=>"[Emscripten Module object]";try{r=A("worker_threads")}catch(e){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),e}global.Worker=r.Worker}else(w||b)&&(b?k=self.location.href:"undefined"!=typeof document&&document.currentScript&&(k=document.currentScript.src),e&&(k=e),k=0!==k.indexOf("blob:")?k.substr(0,k.replace(/[?#].*/,"").lastIndexOf("/")+1):"",_||(h=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},b&&(m=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),p=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)}));_&&"undefined"==typeof performance&&(global.performance=A("perf_hooks").performance);var P=console.log.bind(console),D=console.error.bind(console);_&&(P=function(){for(var e=arguments.length,r=new Array(e),t=0;te.startsWith(ce),he=e=>e.startsWith("file://");function pe(e){if(e==le&&I)return new Uint8Array(I);if(m)return m(e);throw"both async and sync fetching of the wasm failed"}function me(e){if(!I&&(w||b)){if("function"==typeof fetch&&!he(e))return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>pe(e)));if(p)return new Promise(((r,t)=>{p(e,(e=>r(new Uint8Array(e))),t)}))}return Promise.resolve().then((()=>pe(e)))}function ge(e,r,t){return me(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{R(`failed to asynchronously prepare wasm: ${e}`),se(e)}))}function ve(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||fe(r)||he(r)||_||"function"!=typeof fetch?ge(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return R(`wasm streaming compile failed: ${e}`),R("falling back to ArrayBuffer instantiation"),ge(r,t,n)}))))}function ye(){var e={a:fo};function r(e,r){return ho=e.exports,hr(ho.Y),lr=ho.$,re(ho.T),$=r,ie(),ho}if(ae(),f.instantiateWasm)try{return f.instantiateWasm(e,r)}catch(e){R(`Module.instantiateWasm callback failed with error: ${e}`),c(e)}return ve(I,le,e,(function(e){r(e.instance,e.module)})).catch(c),{}}function we(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}f.locateFile?fe(le="decoder-pro-mt-worker.wasm")||(le=S(le)):le=new URL("decoder-pro-mt-worker.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href).href;var be=e=>{e.terminate(),e.onmessage=e=>{}},_e=e=>{var r=or.pthreads[e];delete or.pthreads[e],be(r),Eo(e),or.runningWorkers.splice(or.runningWorkers.indexOf(r),1),r.pthread_ptr=0},Ee=e=>{or.pthreads[e].postMessage({cmd:"cancel"})},ke=e=>{var r=or.pthreads[e];or.returnWorkerToPool(r)},Se=e=>{var r=or.getNewWorker();if(!r)return 6;or.runningWorkers.push(r),or.pthreads[e.pthread_ptr]=r,r.pthread_ptr=e.pthread_ptr;var t={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return _&&r.unref(),r.postMessage(t,e.transferList),0},Ae=0,Ce=()=>fr||Ae>0,Te={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=Te.isAbs(e),t="/"===e.substr(-1);return(e=Te.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=Te.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=Te.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return Te.normalize(e.join("/"))},join2:(e,r)=>Te.normalize(e+"/"+r)},Pe=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>(e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e);if(_)try{var e=A("crypto");if(e.randomFillSync)return r=>e.randomFillSync(r);var r=e.randomBytes;return e=>(e.set(r(e.byteLength)),e)}catch(e){}se("initRandomDevice")},De=e=>(De=Pe())(e),Ie={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:Ke.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=Te.isAbs(n)}return(r?"/":"")+(e=Te.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=Ie.resolve(e).substr(1),r=Ie.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&Fe)return Fe.decode(e.buffer instanceof SharedArrayBuffer?e.slice(r,o):e.subarray(r,o));for(var a="";r>10,56320|1023&d)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Me=[],Re=e=>{for(var r=0,t=0;t=55296&&n<=57343?(r+=4,++t):r+=3}return r},Be=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function Oe(e,r,t){var n=t>0?t:Re(e)+1,o=new Array(n),a=Be(e,o,0,o.length);return r&&(o.length=a),o}var We=()=>{if(!Me.length){var e=null;if(_){var r=Buffer.alloc(256),t=0,n=process.stdin.fd;try{t=C.readSync(n,r)}catch(e){if(!e.toString().includes("EOF"))throw e;t=0}e=t>0?r.slice(0,t).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;Me=Oe(e,!0)}return Me.shift()},Ue={ttys:[],init(){},shutdown(){},register(e,r){Ue.ttys[e]={input:[],output:[],ops:r},Ke.registerDevice(e,Ue.stream_ops)},stream_ops:{open(e){var r=Ue.ttys[e.node.rdev];if(!r)throw new Ke.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Ke.ErrnoError(60);for(var a=0,i=0;iWe(),put_char(e,r){null===r||10===r?(M($e(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(M($e(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(R($e(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(R($e(e.output,0)),e.output=[])}}},xe=e=>{se()},je={ops_table:null,mount:e=>je.createNode(null,"/",16895,0),createNode(e,r,t,n){if(Ke.isBlkdev(t)||Ke.isFIFO(t))throw new Ke.ErrnoError(63);je.ops_table||(je.ops_table={dir:{node:{getattr:je.node_ops.getattr,setattr:je.node_ops.setattr,lookup:je.node_ops.lookup,mknod:je.node_ops.mknod,rename:je.node_ops.rename,unlink:je.node_ops.unlink,rmdir:je.node_ops.rmdir,readdir:je.node_ops.readdir,symlink:je.node_ops.symlink},stream:{llseek:je.stream_ops.llseek}},file:{node:{getattr:je.node_ops.getattr,setattr:je.node_ops.setattr},stream:{llseek:je.stream_ops.llseek,read:je.stream_ops.read,write:je.stream_ops.write,allocate:je.stream_ops.allocate,mmap:je.stream_ops.mmap,msync:je.stream_ops.msync}},link:{node:{getattr:je.node_ops.getattr,setattr:je.node_ops.setattr,readlink:je.node_ops.readlink},stream:{}},chrdev:{node:{getattr:je.node_ops.getattr,setattr:je.node_ops.setattr},stream:Ke.chrdev_stream_ops}});var o=Ke.createNode(e,r,t,n);return Ke.isDir(o.mode)?(o.node_ops=je.ops_table.dir.node,o.stream_ops=je.ops_table.dir.stream,o.contents={}):Ke.isFile(o.mode)?(o.node_ops=je.ops_table.file.node,o.stream_ops=je.ops_table.file.stream,o.usedBytes=0,o.contents=null):Ke.isLink(o.mode)?(o.node_ops=je.ops_table.link.node,o.stream_ops=je.ops_table.link.stream):Ke.isChrdev(o.mode)&&(o.node_ops=je.ops_table.chrdev.node,o.stream_ops=je.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=Ke.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,Ke.isDir(e.mode)?r.size=4096:Ke.isFile(e.mode)?r.size=e.usedBytes:Ke.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&je.resizeFileStorage(e,r.size)},lookup(e,r){throw Ke.genericErrors[44]},mknod:(e,r,t,n)=>je.createNode(e,r,t,n),rename(e,r,t){if(Ke.isDir(e.mode)){var n;try{n=Ke.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new Ke.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=Ke.lookupNode(e,r);for(var n in t.contents)throw new Ke.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=je.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!Ke.isLink(e.mode))throw new Ke.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s0||n+r(je.stream_ops.write(e,r,0,n,t,!1),0)}},Le=(e,r,t,n)=>{var o=n?"":`al ${e}`;p(e,(t=>{H(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&ie()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&ae()},ze=(e,r,t,n,o,a)=>{Ke.createDataFile(e,r,t,n,o,a)},Ne=f.preloadPlugins||[],Ve=(e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return Ne.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o},He=(e,r,t,n,o,a,i,s,l,d)=>{var u=r?Ie.resolve(Te.join2(e,r)):e;function c(t){function c(t){d&&d(),s||ze(e,r,t,n,o,l),a&&a(),ie()}Ve(t,u,c,(()=>{i&&i(),ie()}))||c(t)}ae(),"string"==typeof t?Le(t,(e=>c(e)),i):c(t)},Ge=e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r},qe=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},Ke={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=Ie.resolve(e)))return{path:"",node:null};if(r=Object.assign({follow_mount:!0,recurse_count:0},r),r.recurse_count>8)throw new Ke.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=Ke.root,o="/",a=0;a40)throw new Ke.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(Ke.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n>>0)%Ke.nameTable.length},hashAddNode(e){var r=Ke.hashName(e.parent.id,e.name);e.name_next=Ke.nameTable[r],Ke.nameTable[r]=e},hashRemoveNode(e){var r=Ke.hashName(e.parent.id,e.name);if(Ke.nameTable[r]===e)Ke.nameTable[r]=e.name_next;else for(var t=Ke.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=Ke.mayLookup(e);if(t)throw new Ke.ErrnoError(t,e);for(var n=Ke.hashName(e.id,r),o=Ke.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return Ke.lookup(e,r)},createNode(e,r,t,n){var o=new Ke.FSNode(e,r,t,n);return Ke.hashAddNode(o),o},destroyNode(e){Ke.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>Ke.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){var r=Ke.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{return Ke.lookupNode(e,r),20}catch(e){}return Ke.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=Ke.lookupNode(e,r)}catch(e){return e.errno}var o=Ke.nodePermissions(e,"wx");if(o)return o;if(t){if(!Ke.isDir(n.mode))return 54;if(Ke.isRoot(n)||Ke.getPath(n)===Ke.cwd())return 10}else if(Ke.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?Ke.isLink(e.mode)?32:Ke.isDir(e.mode)&&("r"!==Ke.flagsToPermissionString(r)||512&r)?31:Ke.nodePermissions(e,Ke.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Ke.MAX_OPEN_FDS;e++)if(!Ke.streams[e])return e;throw new Ke.ErrnoError(33)},getStreamChecked(e){var r=Ke.getStream(e);if(!r)throw new Ke.ErrnoError(8);return r},getStream:e=>Ke.streams[e],createStream(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Ke.FSStream||(Ke.FSStream=function(){this.shared={}},Ke.FSStream.prototype={},Object.defineProperties(Ke.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Ke.FSStream,e),-1==r&&(r=Ke.nextfd()),e.fd=r,Ke.streams[r]=e,e},closeStream(e){Ke.streams[e]=null},chrdev_stream_ops:{open(e){var r=Ke.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Ke.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){Ke.devices[e]={stream_ops:r}},getDevice:e=>Ke.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),Ke.syncFSRequests++,Ke.syncFSRequests>1&&R(`warning: ${Ke.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=Ke.getMounts(Ke.root.mount),n=0;function o(e){return Ke.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&Ke.root)throw new Ke.ErrnoError(10);if(!o&&!a){var i=Ke.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,Ke.isMountpoint(n))throw new Ke.ErrnoError(10);if(!Ke.isDir(n.mode))throw new Ke.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?Ke.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=Ke.lookupPath(e,{follow_mount:!1});if(!Ke.isMountpoint(r.node))throw new Ke.ErrnoError(28);var t=r.node,n=t.mounted,o=Ke.getMounts(n);Object.keys(Ke.nameTable).forEach((e=>{for(var r=Ke.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&Ke.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=Ke.lookupPath(e,{parent:!0}).node,o=Te.basename(e);if(!o||"."===o||".."===o)throw new Ke.ErrnoError(28);var a=Ke.mayCreate(n,o);if(a)throw new Ke.ErrnoError(a);if(!n.node_ops.mknod)throw new Ke.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Ke.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Ke.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o(void 0===t&&(t=r,r=438),r|=8192,Ke.mknod(e,r,t)),symlink(e,r){if(!Ie.resolve(e))throw new Ke.ErrnoError(44);var t=Ke.lookupPath(r,{parent:!0}).node;if(!t)throw new Ke.ErrnoError(44);var n=Te.basename(r),o=Ke.mayCreate(t,n);if(o)throw new Ke.ErrnoError(o);if(!t.node_ops.symlink)throw new Ke.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=Te.dirname(e),a=Te.dirname(r),i=Te.basename(e),s=Te.basename(r);if(t=Ke.lookupPath(e,{parent:!0}).node,n=Ke.lookupPath(r,{parent:!0}).node,!t||!n)throw new Ke.ErrnoError(44);if(t.mount!==n.mount)throw new Ke.ErrnoError(75);var l,d=Ke.lookupNode(t,i),u=Ie.relative(e,a);if("."!==u.charAt(0))throw new Ke.ErrnoError(28);if("."!==(u=Ie.relative(r,o)).charAt(0))throw new Ke.ErrnoError(55);try{l=Ke.lookupNode(n,s)}catch(e){}if(d!==l){var c=Ke.isDir(d.mode),f=Ke.mayDelete(t,i,c);if(f)throw new Ke.ErrnoError(f);if(f=l?Ke.mayDelete(n,s,c):Ke.mayCreate(n,s))throw new Ke.ErrnoError(f);if(!t.node_ops.rename)throw new Ke.ErrnoError(63);if(Ke.isMountpoint(d)||l&&Ke.isMountpoint(l))throw new Ke.ErrnoError(10);if(n!==t&&(f=Ke.nodePermissions(t,"w")))throw new Ke.ErrnoError(f);Ke.hashRemoveNode(d);try{t.node_ops.rename(d,n,s)}catch(e){throw e}finally{Ke.hashAddNode(d)}}},rmdir(e){var r=Ke.lookupPath(e,{parent:!0}).node,t=Te.basename(e),n=Ke.lookupNode(r,t),o=Ke.mayDelete(r,t,!0);if(o)throw new Ke.ErrnoError(o);if(!r.node_ops.rmdir)throw new Ke.ErrnoError(63);if(Ke.isMountpoint(n))throw new Ke.ErrnoError(10);r.node_ops.rmdir(r,t),Ke.destroyNode(n)},readdir(e){var r=Ke.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new Ke.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=Ke.lookupPath(e,{parent:!0}).node;if(!r)throw new Ke.ErrnoError(44);var t=Te.basename(e),n=Ke.lookupNode(r,t),o=Ke.mayDelete(r,t,!1);if(o)throw new Ke.ErrnoError(o);if(!r.node_ops.unlink)throw new Ke.ErrnoError(63);if(Ke.isMountpoint(n))throw new Ke.ErrnoError(10);r.node_ops.unlink(r,t),Ke.destroyNode(n)},readlink(e){var r=Ke.lookupPath(e).node;if(!r)throw new Ke.ErrnoError(44);if(!r.node_ops.readlink)throw new Ke.ErrnoError(28);return Ie.resolve(Ke.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=Ke.lookupPath(e,{follow:!r}).node;if(!t)throw new Ke.ErrnoError(44);if(!t.node_ops.getattr)throw new Ke.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>Ke.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?Ke.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new Ke.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){Ke.chmod(e,r,!0)},fchmod(e,r){var t=Ke.getStreamChecked(e);Ke.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?Ke.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Ke.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){Ke.chown(e,r,t,!0)},fchown(e,r,t){var n=Ke.getStreamChecked(e);Ke.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new Ke.ErrnoError(28);var t;if(!(t="string"==typeof e?Ke.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Ke.ErrnoError(63);if(Ke.isDir(t.mode))throw new Ke.ErrnoError(31);if(!Ke.isFile(t.mode))throw new Ke.ErrnoError(28);var n=Ke.nodePermissions(t,"w");if(n)throw new Ke.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=Ke.getStreamChecked(e);if(0==(2097155&t.flags))throw new Ke.ErrnoError(28);Ke.truncate(t.node,r)},utime(e,r,t){var n=Ke.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new Ke.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?Ge(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=Te.normalize(e);try{n=Ke.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var o=!1;if(64&r)if(n){if(128&r)throw new Ke.ErrnoError(20)}else n=Ke.mknod(e,t,0),o=!0;if(!n)throw new Ke.ErrnoError(44);if(Ke.isChrdev(n.mode)&&(r&=-513),65536&r&&!Ke.isDir(n.mode))throw new Ke.ErrnoError(54);if(!o){var a=Ke.mayOpen(n,r);if(a)throw new Ke.ErrnoError(a)}512&r&&!o&&Ke.truncate(n,0),r&=-131713;var i=Ke.createStream({node:n,path:Ke.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!f.logReadFiles||1&r||(Ke.readFiles||(Ke.readFiles={}),e in Ke.readFiles||(Ke.readFiles[e]=1)),i},close(e){if(Ke.isClosed(e))throw new Ke.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Ke.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(Ke.isClosed(e))throw new Ke.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ke.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Ke.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new Ke.ErrnoError(28);if(Ke.isClosed(e))throw new Ke.ErrnoError(8);if(1==(2097155&e.flags))throw new Ke.ErrnoError(8);if(Ke.isDir(e.node.mode))throw new Ke.ErrnoError(31);if(!e.stream_ops.read)throw new Ke.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new Ke.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new Ke.ErrnoError(28);if(Ke.isClosed(e))throw new Ke.ErrnoError(8);if(0==(2097155&e.flags))throw new Ke.ErrnoError(8);if(Ke.isDir(e.node.mode))throw new Ke.ErrnoError(31);if(!e.stream_ops.write)throw new Ke.ErrnoError(28);e.seekable&&1024&e.flags&&Ke.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new Ke.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(Ke.isClosed(e))throw new Ke.ErrnoError(8);if(r<0||t<=0)throw new Ke.ErrnoError(28);if(0==(2097155&e.flags))throw new Ke.ErrnoError(8);if(!Ke.isFile(e.node.mode)&&!Ke.isDir(e.node.mode))throw new Ke.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ke.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new Ke.ErrnoError(2);if(1==(2097155&e.flags))throw new Ke.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ke.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new Ke.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=Ke.open(e,r.flags),o=Ke.stat(e).size,a=new Uint8Array(o);return Ke.read(n,a,0,o,0),"utf8"===r.encoding?t=$e(a,0):"binary"===r.encoding&&(t=a),Ke.close(n),t},writeFile(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.flags=t.flags||577;var n=Ke.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(Re(r)+1),a=Be(r,o,0,o.length);Ke.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Ke.write(n,r,0,r.byteLength,void 0,t.canOwn)}Ke.close(n)},cwd:()=>Ke.currentPath,chdir(e){var r=Ke.lookupPath(e,{follow:!0});if(null===r.node)throw new Ke.ErrnoError(44);if(!Ke.isDir(r.node.mode))throw new Ke.ErrnoError(54);var t=Ke.nodePermissions(r.node,"x");if(t)throw new Ke.ErrnoError(t);Ke.currentPath=r.path},createDefaultDirectories(){Ke.mkdir("/tmp"),Ke.mkdir("/home"),Ke.mkdir("/home/web_user")},createDefaultDevices(){Ke.mkdir("/dev"),Ke.registerDevice(Ke.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),Ke.mkdev("/dev/null",Ke.makedev(1,3)),Ue.register(Ke.makedev(5,0),Ue.default_tty_ops),Ue.register(Ke.makedev(6,0),Ue.default_tty1_ops),Ke.mkdev("/dev/tty",Ke.makedev(5,0)),Ke.mkdev("/dev/tty1",Ke.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=De(e).byteLength),e[--r]);Ke.createDevice("/dev","random",t),Ke.createDevice("/dev","urandom",t),Ke.mkdir("/dev/shm"),Ke.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Ke.mkdir("/proc");var e=Ke.mkdir("/proc/self");Ke.mkdir("/proc/self/fd"),Ke.mount({mount(){var r=Ke.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=Ke.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){f.stdin?Ke.createDevice("/dev","stdin",f.stdin):Ke.symlink("/dev/tty","/dev/stdin"),f.stdout?Ke.createDevice("/dev","stdout",null,f.stdout):Ke.symlink("/dev/tty","/dev/stdout"),f.stderr?Ke.createDevice("/dev","stderr",null,f.stderr):Ke.symlink("/dev/tty1","/dev/stderr"),Ke.open("/dev/stdin",0),Ke.open("/dev/stdout",1),Ke.open("/dev/stderr",1)},ensureErrnoError(){Ke.ErrnoError||(Ke.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Ke.ErrnoError.prototype=new Error,Ke.ErrnoError.prototype.constructor=Ke.ErrnoError,[44].forEach((e=>{Ke.genericErrors[e]=new Ke.ErrnoError(e),Ke.genericErrors[e].stack=""})))},staticInit(){Ke.ensureErrnoError(),Ke.nameTable=new Array(4096),Ke.mount(je,{},"/"),Ke.createDefaultDirectories(),Ke.createDefaultDevices(),Ke.createSpecialDirectories(),Ke.filesystems={MEMFS:je}},init(e,r,t){Ke.init.initialized=!0,Ke.ensureErrnoError(),f.stdin=e||f.stdin,f.stdout=r||f.stdout,f.stderr=t||f.stderr,Ke.createStandardStreams()},quit(){Ke.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var r,t=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=t);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,t-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>t-1)throw new Error("only "+t+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",n,!1),t!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+n+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Oe(o.responseText||"",!0)})(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&t||(i=t=1,t=this.getter(0).length,i=t,M("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=t,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!b)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var s=new i;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var l={isDevice:!1,contents:s}}else l={isDevice:!1,url:n};var d=Ke.createFile(e,r,l,o,a);l.contents?d.contents=l.contents:l.url&&(d.contents=null,d.url=l.url),Object.defineProperties(d,{usedBytes:{get:function(){return this.contents.length}}});var u={};function c(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s{var r=d.stream_ops[e];u[e]=function(){return Ke.forceLoadFile(d),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(Ke.forceLoadFile(d),c(e,r,t,n,o)),u.mmap=(e,r,n,o,a)=>{Ke.forceLoadFile(d);var i=xe();if(!i)throw new Ke.ErrnoError(48);return c(e,t(),i,r,n),{ptr:i,allocated:!0}},d.stream_ops=u,d}},Xe=(e,r)=>e?$e(n(),e,r):"",Je={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(Te.isAbs(r))return r;var n;if(n=-100===e?Ke.cwd():Je.getStreamFromFD(e).path,0==r.length){if(!t)throw new Ke.ErrnoError(44);return n}return Te.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&Te.normalize(r)!==Te.normalize(Ke.getPath(e.node)))return-54;throw e}i()[t>>2]=n.dev,i()[t+4>>2]=n.mode,s()[t+8>>2]=n.nlink,i()[t+12>>2]=n.uid,i()[t+16>>2]=n.gid,i()[t+20>>2]=n.rdev,ue=[n.size>>>0,(de=n.size,+Math.abs(de)>=1?de>0?+Math.floor(de/4294967296)>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],i()[t+24>>2]=ue[0],i()[t+28>>2]=ue[1],i()[t+32>>2]=4096,i()[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),l=n.ctime.getTime();return ue=[Math.floor(o/1e3)>>>0,(de=Math.floor(o/1e3),+Math.abs(de)>=1?de>0?+Math.floor(de/4294967296)>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],i()[t+40>>2]=ue[0],i()[t+44>>2]=ue[1],s()[t+48>>2]=o%1e3*1e3,ue=[Math.floor(a/1e3)>>>0,(de=Math.floor(a/1e3),+Math.abs(de)>=1?de>0?+Math.floor(de/4294967296)>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],i()[t+56>>2]=ue[0],i()[t+60>>2]=ue[1],s()[t+64>>2]=a%1e3*1e3,ue=[Math.floor(l/1e3)>>>0,(de=Math.floor(l/1e3),+Math.abs(de)>=1?de>0?+Math.floor(de/4294967296)>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],i()[t+72>>2]=ue[0],i()[t+76>>2]=ue[1],s()[t+80>>2]=l%1e3*1e3,ue=[n.ino>>>0,(de=n.ino,+Math.abs(de)>=1?de>0?+Math.floor(de/4294967296)>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],i()[t+88>>2]=ue[0],i()[t+92>>2]=ue[1],0},doMsync(e,r,t,o,a){if(!Ke.isFile(r.node.mode))throw new Ke.ErrnoError(43);if(2&o)return 0;var i=n().slice(e,e+t);Ke.msync(r,i,a,t,o)},varargs:void 0,get(){var e=i()[+Je.varargs>>2];return Je.varargs+=4,e},getp:()=>Je.get(),getStr:e=>Xe(e),getStreamFromFD:e=>Ke.getStreamChecked(e)},Ze=e=>{var r=Co(),t=e();return To(r),t},Ye=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN,Qe=function(e,r){var t=arguments.length-2,n=arguments;return Ze((()=>{for(var o=t,a=Po(8*o),i=a>>3,s=0;s{if(B=e,E)throw sr(e),"unwind";er(e)},tr=rr,nr=e=>{if(e instanceof we||"unwind"==e)return B;y(1,e)},or={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){E?or.initWorker():or.initMainThread()},initMainThread(){for(var e=4;e--;)or.allocateUnusedWorker();ee((()=>{ae(),or.loadWasmModuleToAllWorkers((()=>ie()))}))},initWorker(){fr=!1},setExitStatus:e=>{B=e},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of or.runningWorkers)be(e);for(var e of or.unusedWorkers)be(e);or.unusedWorkers=[],or.runningWorkers=[],or.pthreads=[]},returnWorkerToPool:e=>{var r=e.pthread_ptr;delete or.pthreads[r],or.unusedWorkers.push(e),or.runningWorkers.splice(or.runningWorkers.indexOf(e),1),e.pthread_ptr=0,Eo(r)},receiveObjectTransfer(e){},threadInitTLS(){or.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((r=>{e.onmessage=t=>{var n=t.data,o=n.cmd;if(n.targetThread&&n.targetThread!=go()){var a=or.pthreads[n.targetThread];a?a.postMessage(n,n.transferList):R(`Internal error! Worker sent a message "${o}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else"checkMailbox"===o?gn():"spawnThread"===o?Se(n):"cleanupThread"===o?ke(n.thread):"killThread"===o?_e(n.thread):"cancelThread"===o?Ee(n.thread):"loaded"===o?(e.loaded=!0,_&&!e.pthread_ptr&&e.unref(),r(e)):"alert"===o?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?e.postMessage(n):"callHandler"===o?f[n.handler](...n.args):o&&R(`worker sent an unknown command ${o}`)},e.onerror=e=>{throw R(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e},_&&(e.on("message",(r=>e.onmessage({data:r}))),e.on("error",(r=>e.onerror(r))));var t=[];for(var n of["onExit","onAbort","print","printErr"])f.hasOwnProperty(n)&&t.push(n);e.postMessage({cmd:"load",handlers:t,urlOrBlob:f.mainScriptUrlOrBlob,wasmMemory:F,wasmModule:$})})),loadWasmModuleToAllWorkers(e){if(E)return e();Promise.all(or.unusedWorkers.map(or.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker(){var e;if(f.locateFile){var r=S("decoder-pro-mt-worker.worker.js");e=new Worker(r,{type:"module"})}else e=new Worker(new URL("decoder-pro-mt-worker.worker.js","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href),{type:"module"});or.unusedWorkers.push(e)},getNewWorker:()=>(0==or.unusedWorkers.length&&(or.allocateUnusedWorker(),or.loadWasmModuleToWorker(or.unusedWorkers[0])),or.unusedWorkers.pop())};f.PThread=or;var ar=e=>{for(;e.length>0;)e.shift()(f)},ir=()=>{var e=go(),r=s()[e+52>>2],t=s()[e+56>>2];Ao(r,r-t),To(r)};function sr(e){if(E)return Qe(1,0,e);tr(e)}f.establishStackSpace=ir;var lr,dr=[],ur=e=>{var r=dr[e];return r||(e>=dr.length&&(dr.length=e+1),dr[e]=r=lr.get(e)),r},cr=(e,r)=>{!function(e){Ce()?or.setExitStatus(e):ko(e)}(ur(e)(r))};f.invokeEntryPoint=cr;var fr=f.noExitRuntime||!0,hr=e=>{or.tlsInitFunctions.push(e)},pr=(e,r,t,n)=>{se(`Assertion failed: ${Xe(e)}, at: `+[r?Xe(r):"unknown filename",t,n?Xe(n):"unknown function"])};function mr(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){s()[this.ptr+4>>2]=e},this.get_type=function(){return s()[this.ptr+4>>2]},this.set_destructor=function(e){s()[this.ptr+8>>2]=e},this.get_destructor=function(){return s()[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,t()[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=t()[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,t()[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=t()[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){s()[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Do(this.get_type()))return s()[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var gr=(e,r,t)=>{throw new mr(e).init(r,t),e},vr=e=>{wo(e,!b,1,!w,2097152,!1),or.threadInitTLS()},yr=e=>{E?postMessage({cmd:"cleanupThread",thread:e}):ke(e)};function wr(e,r,t,n){return E?Qe(2,1,e,r,t,n):br(e,r,t,n)}var br=(e,r,t,n)=>{if("undefined"==typeof SharedArrayBuffer)return R("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[];if(E&&0===o.length)return wr(e,r,t,n);var a={startRoutine:t,pthread_ptr:e,arg:n,transferList:o};return E?(a.cmd="spawnThread",postMessage(a,o),0):Se(a)},_r=e=>(i()[vo()>>2]=e,e);function Er(e,r,t){if(E)return Qe(3,1,e,r,t);Je.varargs=t;try{var n=Je.getStreamFromFD(e);switch(r){case 0:if((a=Je.get())<0)return-28;for(;Ke.streams[a];)a++;return Ke.createStream(n,a).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var a=Je.get();return n.flags|=a,0;case 5:return a=Je.getp(),o()[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return _r(28),-1}}catch(e){if(void 0===Ke||"ErrnoError"!==e.name)throw e;return-e.errno}}function kr(e,r,t,n){if(E)return Qe(4,1,e,r,t,n);Je.varargs=n;try{r=Je.getStr(r),r=Je.calculateAt(e,r);var o=n?Je.get():0;return Ke.open(r,t,o).fd}catch(e){if(void 0===Ke||"ErrnoError"!==e.name)throw e;return-e.errno}}var Sr,Ar,Cr,Tr=(e,r,t,n,o)=>{},Pr=()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);Sr=e},Dr=e=>{for(var r="",t=e;n()[t];)r+=Sr[n()[t++]];return r},Ir={},Fr={},$r={},Mr=e=>{throw new Ar(e)},Rr=e=>{throw new Cr(e)},Br=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Rr("Mismatched type converter count");for(var o=0;o{Fr.hasOwnProperty(e)?o[r]=Fr[e]:(a.push(e),Ir.hasOwnProperty(e)||(Ir[e]=[]),Ir[e].push((()=>{o[r]=Fr[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)};function Or(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=r.name;if(e||Mr(`type "${n}" must have a positive integer typeid pointer`),Fr.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Mr(`Cannot register type '${n}' twice`)}if(Fr[e]=r,delete $r[e],Ir.hasOwnProperty(e)){var o=Ir[e];delete Ir[e],o.forEach((e=>e()))}}function Wr(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Or(e,r,t)}var Ur,xr=8,jr=(e,r,t,o)=>{Wr(e,{name:r=Dr(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:o},argPackAdvance:xr,readValueFromPointer:function(e){return this.fromWireType(n()[e])},destructorFunction:null})},Lr=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),zr=e=>{Mr(e.$$.ptrType.registeredClass.name+" instance already deleted")},Nr=!1,Vr=e=>{},Hr=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Gr=e=>{e.count.value-=1,0===e.count.value&&Hr(e)},qr=(e,r,t)=>{if(r===t)return e;if(void 0===t.baseClass)return null;var n=qr(e,r,t.baseClass);return null===n?null:t.downcast(n)},Kr={},Xr=()=>Object.keys(rt).length,Jr=()=>{var e=[];for(var r in rt)rt.hasOwnProperty(r)&&e.push(rt[r]);return e},Zr=[],Yr=()=>{for(;Zr.length;){var e=Zr.pop();e.$$.deleteScheduled=!1,e.delete()}},Qr=e=>{Ur=e,Zr.length&&Ur&&Ur(Yr)},et=()=>{f.getInheritedInstanceCount=Xr,f.getLiveInheritedInstances=Jr,f.flushPendingDeletes=Yr,f.setDelayFunction=Qr},rt={},tt=(e,r)=>{for(void 0===r&&Mr("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r},nt=(e,r)=>(r=tt(e,r),rt[r]),ot=(e,r)=>(r.ptrType&&r.ptr||Rr("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!=!!r.smartPtr&&Rr("Both smartPtrType and smartPtr must be specified"),r.count={value:1},it(Object.create(e,{$$:{value:r}})));function at(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=nt(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?ot(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):ot(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=Kr[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var l=qr(r,this.registeredClass,a.registeredClass);return null===l?o.call(this):this.isSmartPointer?ot(a.registeredClass.instancePrototype,{ptrType:a,ptr:l,smartPtrType:this,smartPtr:e}):ot(a.registeredClass.instancePrototype,{ptrType:a,ptr:l})}var it=e=>"undefined"==typeof FinalizationRegistry?(it=e=>e,e):(Nr=new FinalizationRegistry((e=>{Gr(e.$$)})),it=e=>{var r=e.$$;if(r.smartPtr){var t={$$:r};Nr.register(e,t,e)}return e},Vr=e=>Nr.unregister(e),it(e)),st=()=>{Object.assign(lt.prototype,{isAliasOf(e){if(!(this instanceof lt))return!1;if(!(e instanceof lt))return!1;var r=this.$$.ptrType.registeredClass,t=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o},clone(){if(this.$$.ptr||zr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=it(Object.create(Object.getPrototypeOf(this),{$$:{value:Lr(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||zr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Mr("Object already scheduled for deletion"),Vr(this),Gr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||zr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Mr("Object already scheduled for deletion"),Zr.push(this),1===Zr.length&&Ur&&Ur(Yr),this.$$.deleteScheduled=!0,this}})};function lt(){}var dt=(e,r)=>Object.defineProperty(r,"name",{value:e}),ut=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Mr(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},ct=(e,r,t)=>{f.hasOwnProperty(e)?((void 0===t||void 0!==f[e].overloadTable&&void 0!==f[e].overloadTable[t])&&Mr(`Cannot register public name '${e}' twice`),ut(f,e,e),f.hasOwnProperty(t)&&Mr(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),f[e].overloadTable[t]=r):(f[e]=r,void 0!==t&&(f[e].numArguments=t))},ft=48,ht=57,pt=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=ft&&r<=ht?`_${e}`:e};function mt(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var gt=(e,r,t)=>{for(;r!==t;)r.upcast||Mr(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e};function vt(e,r){if(null===r)return this.isReference&&Mr(`null is not a valid ${this.name}`),0;r.$$||Mr(`Cannot pass "${Xt(r)}" as a ${this.name}`),r.$$.ptr||Mr(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass;return gt(r.$$.ptr,t,this.registeredClass)}function yt(e,r){var t;if(null===r)return this.isReference&&Mr(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r.$$||Mr(`Cannot pass "${Xt(r)}" as a ${this.name}`),r.$$.ptr||Mr(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&Mr(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=gt(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&Mr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:Mr(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,Gt.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:Mr("Unsupporting sharing policy")}return t}function wt(e,r){if(null===r)return this.isReference&&Mr(`null is not a valid ${this.name}`),0;r.$$||Mr(`Cannot pass "${Xt(r)}" as a ${this.name}`),r.$$.ptr||Mr(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&Mr(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass;return gt(r.$$.ptr,t,this.registeredClass)}function bt(e){return this.fromWireType(s()[e>>2])}var _t=()=>{Object.assign(Et.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:xr,readValueFromPointer:bt,deleteObject(e){null!==e&&e.delete()},fromWireType:at})};function Et(e,r,t,n,o,a,i,s,l,d,u){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=u,o||void 0!==r.baseClass?this.toWireType=yt:n?(this.toWireType=vt,this.destructorFunction=null):(this.toWireType=wt,this.destructorFunction=null)}var kt,St=(e,r,t)=>{f.hasOwnProperty(e)||Rr("Replacing nonexistant public symbol"),void 0!==f[e].overloadTable&&void 0!==t?f[e].overloadTable[t]=r:(f[e]=r,f[e].argCount=t)},At=(e,r,t)=>{var n=f["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)},Ct=(e,r,t)=>e.includes("j")?At(e,r,t):ur(r).apply(null,t),Tt=(e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),Ct(e,r,t)}},Pt=(e,r)=>{var t=(e=Dr(e)).includes("j")?Tt(e,r):ur(r);return"function"!=typeof t&&Mr(`unknown function pointer with signature ${e}: ${r}`),t},Dt=(e,r)=>{var t=dt(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t},It=e=>{var r=yo(e),t=Dr(r);return po(r),t},Ft=(e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||Fr[r]||($r[r]?$r[r].forEach(e):(t.push(r),n[r]=!0))})),new kt(`${e}: `+t.map(It).join([", "]))},$t=(e,r,t,n,o,a,i,s,l,d,u,c,f)=>{u=Dr(u),a=Pt(o,a),s&&(s=Pt(i,s)),d&&(d=Pt(l,d)),f=Pt(c,f);var h=pt(u);ct(h,(function(){Ft(`Cannot construct ${u} due to unbound types`,[n])})),Br([e,r,t],n?[n]:[],(function(r){var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:lt.prototype;var i=dt(u,(function(){if(Object.getPrototypeOf(this)!==l)throw new Ar("Use 'new' to construct "+u);if(void 0===c.constructor_body)throw new Ar(u+" has no accessible constructor");var e=c.constructor_body[arguments.length];if(void 0===e)throw new Ar(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(c.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(o,{constructor:{value:i}});i.prototype=l;var c=new mt(u,i,l,f,t,a,s,d);c.baseClass&&(void 0===c.baseClass.__derivedClasses&&(c.baseClass.__derivedClasses=[]),c.baseClass.__derivedClasses.push(c));var p=new Et(u,c,!0,!1,!1),m=new Et(u+"*",c,!1,!1,!1),g=new Et(u+" const*",c,!1,!0,!1);return Kr[e]={pointerType:m,constPointerType:g},St(h,i),[p,m,g]}))},Mt=(e,r)=>{for(var t=[],n=0;n>2]);return t},Rt=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function Bt(e,r){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var t=dt(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}function Ot(e,r,t,n,o,a){var i=r.length;i<2&&Mr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&null!==t,l=!1,d=1;d0?", ":"")+f),h+=(u||a?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",l)h+="runDestructors(destructors);\n";else for(d=s?1:2;d{var i=Mt(r,t);o=Pt(n,o),Br([],[e],(function(e){var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new Ar(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[r-1]=()=>{Ft(`Cannot construct ${e.name} due to unbound types`,i)},Br([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=Ot(t,n,null,o,a),[]))),[]}))},Ut=e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?e.substr(0,r):e},xt=(e,r,t,n,o,a,i,s,l)=>{var d=Mt(t,n);r=Dr(r),r=Ut(r),a=Pt(o,a),Br([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`;function o(){Ft(`Cannot call ${n} due to unbound types`,d)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var u=e.registeredClass.instancePrototype,c=u[r];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===t-2?(o.argCount=t-2,o.className=e.name,u[r]=o):(ut(u,r,n),u[r].overloadTable[t-2]=o),Br([],d,(function(o){var s=Ot(n,o,e,a,i,l);return void 0===u[r].overloadTable?(s.argCount=t-2,u[r]=s):u[r].overloadTable[t-2]=s,[]})),[]}))};function jt(){Object.assign(Lt.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Lt(){this.allocated=[void 0],this.freelist=[]}var zt=new Lt,Nt=e=>{e>=zt.reserved&&0==--zt.get(e).refcount&&zt.free(e)},Vt=()=>{for(var e=0,r=zt.reserved;r{zt.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),zt.reserved=zt.allocated.length,f.count_emval_handles=Vt},Gt={toValue:e=>(e||Mr("Cannot use deleted val. handle = "+e),zt.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return zt.allocate({refcount:1,value:e})}}};function qt(e){return this.fromWireType(i()[e>>2])}var Kt=(e,r)=>{Wr(e,{name:r=Dr(r),fromWireType:e=>{var r=Gt.toValue(e);return Nt(e),r},toWireType:(e,r)=>Gt.toHandle(r),argPackAdvance:xr,readValueFromPointer:qt,destructorFunction:null})},Xt=e=>{if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e},Jt=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(l()[e>>2])};case 8:return function(e){return this.fromWireType(d()[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},Zt=(e,r,t)=>{Wr(e,{name:r=Dr(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:xr,readValueFromPointer:Jt(r,t),destructorFunction:null})},Yt=(e,r,l)=>{switch(r){case 1:return l?e=>t()[e>>0]:e=>n()[e>>0];case 2:return l?e=>o()[e>>1]:e=>a()[e>>1];case 4:return l?e=>i()[e>>2]:e=>s()[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Qt=(e,r,t,n,o)=>{r=Dr(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<>>i}var s=r.includes("unsigned");Wr(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:xr,readValueFromPointer:Yt(r,t,0!==n),destructorFunction:null})},en=(e,r,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function a(e){var r=s()[e>>2],n=s()[e+4>>2];return new o(t().buffer,n,r)}Wr(e,{name:n=Dr(n),fromWireType:a,argPackAdvance:xr,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},rn=(e,r,t)=>Be(e,n(),r,t),tn=(e,r)=>{var t="std::string"===(r=Dr(r));Wr(e,{name:r,fromWireType(e){var r,o=s()[e>>2],a=e+4;if(t)for(var i=a,l=0;l<=o;++l){var d=a+l;if(l==o||0==n()[d]){var u=Xe(i,d-i);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),i=d+1}}else{var c=new Array(o);for(l=0;l>2]=o,t&&a)rn(r,l,o+1);else if(a)for(var d=0;d255&&(po(l),Mr("String has UTF-16 code units that do not fit in 8 bits")),n()[l+d]=u}else for(d=0;d{for(var t=e,i=t>>1,s=i+r/2;!(i>=s)&&a()[i];)++i;if((t=i<<1)-e>32&&nn)return nn.decode(n().slice(e,t));for(var l="",d=0;!(d>=r/2);++d){var u=o()[e+2*d>>1];if(0==u)break;l+=String.fromCharCode(u)}return l},an=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,a=(t-=2)<2*e.length?t/2:e.length,i=0;i>1]=s,r+=2}return o()[r>>1]=0,r-n},sn=e=>2*e.length,ln=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=i()[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},dn=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),i()[r>>2]=s,(r+=4)+4>o)break}return i()[r>>2]=0,r-n},un=e=>{for(var r=0,t=0;t=55296&&n<=57343&&++t,r+=4}return r},cn=(e,r,t)=>{var n,o,i,l,d;t=Dr(t),2===r?(n=on,o=an,l=sn,i=()=>a(),d=1):4===r&&(n=ln,o=dn,l=un,i=()=>s(),d=2),Wr(e,{name:t,fromWireType:e=>{for(var t,o=s()[e>>2],a=i(),l=e+4,u=0;u<=o;++u){var c=e+4+u*r;if(u==o||0==a[c>>d]){var f=n(l,c-l);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),l=c+r}}return po(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Mr(`Cannot pass non-string to C++ string type ${t}`);var a=l(n),i=mo(4+a+r);return s()[i>>2]=a>>d,o(n,i+4,a+r),null!==e&&e.push(po,i),i},argPackAdvance:xr,readValueFromPointer:qt,destructorFunction(e){po(e)}})},fn=(e,r)=>{Wr(e,{isVoid:!0,name:r=Dr(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},hn=()=>{if(!Ce())try{E?ko(B):tr(B)}catch(e){nr(e)}},pn=e=>{if(!V)try{e(),hn()}catch(e){nr(e)}},mn=e=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(i(),e>>2,e).value.then(gn);var r=e+128;Atomics.store(i(),r>>2,1)}};f.__emscripten_thread_mailbox_await=mn;var gn=()=>{var e=go();e&&(mn(e),pn(So))};f.checkMailbox=gn;var vn=(e,r,t)=>{if(e==r)setTimeout((()=>gn()));else if(E)postMessage({targetThread:e,cmd:"checkMailbox"});else{var n=or.pthreads[e];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},yn=[],wn=(e,r,t,n)=>{yn.length=t;for(var o=n>>3,a=0;a{_&&or.pthreads[e].ref()},_n={},En=e=>{var r=_n[e];return void 0===r?Dr(e):r},kn=[],Sn=(e,r,t,n,o)=>(e=kn[e])(r=Gt.toValue(r),r[t=En(t)],n,o),An=e=>{var r=kn.length;return kn.push(e),r},Cn=(e,r)=>{var t=Fr[e];return void 0===t&&Mr(r+" has unknown type "+It(e)),t},Tn=(e,r)=>{for(var t=new Array(e),n=0;n>2],"parameter "+n);return t},Pn=(e,r,t)=>{var n=[],o=e.toWireType(n,t);return n.length&&(s()[r>>2]=Gt.toHandle(n)),o},Dn=(e,r,t)=>{var n=Tn(e,r),o=n.shift();e--;var a="return function (obj, func, destructorsRef, args) {\n",i=0,s=[];0===t&&s.push("obj");for(var l=["retType"],d=[o],u=0;ue.name)).join(", ")}) => ${o.name}>`;return An(dt(f,c))},In=e=>{var r=Gt.toValue(e);Rt(r),Nt(e)},Fn=e=>e%4==0&&(e%100!=0||e%400==0),$n=[0,31,60,91,121,152,182,213,244,274,305,335],Mn=[0,31,59,90,120,151,181,212,243,273,304,334],Rn=e=>(Fn(e.getFullYear())?$n:Mn)[e.getMonth()]+e.getDate()-1;function Bn(e,r,t){var n=Ye(e,r),o=new Date(1e3*n);i()[t>>2]=o.getSeconds(),i()[t+4>>2]=o.getMinutes(),i()[t+8>>2]=o.getHours(),i()[t+12>>2]=o.getDate(),i()[t+16>>2]=o.getMonth(),i()[t+20>>2]=o.getFullYear()-1900,i()[t+24>>2]=o.getDay();var a=0|Rn(o);i()[t+28>>2]=a,i()[t+36>>2]=-60*o.getTimezoneOffset();var s=new Date(o.getFullYear(),0,1),l=new Date(o.getFullYear(),6,1).getTimezoneOffset(),d=s.getTimezoneOffset(),u=0|(l!=d&&o.getTimezoneOffset()==Math.min(d,l));i()[t+32>>2]=u}var On,Wn=e=>{var r=Re(e)+1,t=mo(r);return t&&rn(e,t,r),t},Un=(e,r,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),l=o.getTimezoneOffset(),d=a.getTimezoneOffset(),u=Math.max(l,d);function c(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}s()[e>>2]=60*u,i()[r>>2]=Number(l!=d);var f=c(o),h=c(a),p=Wn(f),m=Wn(h);d>2]=p,s()[t+4>>2]=m):(s()[t>>2]=m,s()[t+4>>2]=p)},xn=()=>{se("")},jn=()=>{},Ln=()=>Date.now(),zn=()=>{Ae+=1},Nn=()=>{throw zn(),"unwind"};On=()=>performance.timeOrigin+performance.now();var Vn=()=>_?A("os").cpus().length:navigator.hardwareConcurrency,Hn=()=>536870912,Gn=e=>{var r=(e-F.buffer.byteLength+65535)/65536;try{return F.grow(r),G(),1}catch(e){}},qn=e=>{var r=n().length;if((e>>>=0)<=r)return!1;var t=Hn();if(e>t)return!1;for(var o,a,i=1;i<=4;i*=2){var s=r*(1+.2/i);s=Math.min(s,e+100663296);var l=Math.min(t,(o=Math.max(e,s))+((a=65536)-o%a)%a);if(Gn(l))return!0}return!1},Kn={},Xn=()=>v||"./this.program",Jn=()=>{if(!Jn.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Xn()};for(var r in Kn)void 0===Kn[r]?delete e[r]:e[r]=Kn[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);Jn.strings=t}return Jn.strings},Zn=(e,r)=>{for(var n=0;n>0]=e.charCodeAt(n);t()[r>>0]=0},Yn=function(e,r){if(E)return Qe(5,1,e,r);var t=0;return Jn().forEach(((n,o)=>{var a=r+t;s()[e+4*o>>2]=a,Zn(n,a),t+=n.length+1})),0},Qn=function(e,r){if(E)return Qe(6,1,e,r);var t=Jn();s()[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),s()[r>>2]=n,0};function eo(e){if(E)return Qe(7,1,e);try{var r=Je.getStreamFromFD(e);return Ke.close(r),0}catch(e){if(void 0===Ke||"ErrnoError"!==e.name)throw e;return e.errno}}function ro(e,r){if(E)return Qe(8,1,e,r);try{var n=Je.getStreamFromFD(e),a=n.tty?2:Ke.isDir(n.mode)?3:Ke.isLink(n.mode)?7:4;return t()[r>>0]=a,o()[r+2>>1]=0,ue=[0,(de=0,+Math.abs(de)>=1?de>0?+Math.floor(de/4294967296)>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],i()[r+8>>2]=ue[0],i()[r+12>>2]=ue[1],ue=[0,(de=0,+Math.abs(de)>=1?de>0?+Math.floor(de/4294967296)>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],i()[r+16>>2]=ue[0],i()[r+20>>2]=ue[1],0}catch(e){if(void 0===Ke||"ErrnoError"!==e.name)throw e;return e.errno}}var to=(e,r,n,o)=>{for(var a=0,i=0;i>2],d=s()[r+4>>2];r+=8;var u=Ke.read(e,t(),l,d,o);if(u<0)return-1;if(a+=u,u>2]=a,0}catch(e){if(void 0===Ke||"ErrnoError"!==e.name)throw e;return e.errno}}function oo(e,r,t,n,o){if(E)return Qe(10,1,e,r,t,n,o);var a=Ye(r,t);try{if(isNaN(a))return 61;var s=Je.getStreamFromFD(e);return Ke.llseek(s,a,n),ue=[s.position>>>0,(de=s.position,+Math.abs(de)>=1?de>0?+Math.floor(de/4294967296)>>>0:~~+Math.ceil((de-+(~~de>>>0))/4294967296)>>>0:0)],i()[o>>2]=ue[0],i()[o+4>>2]=ue[1],s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(e){if(void 0===Ke||"ErrnoError"!==e.name)throw e;return e.errno}}var ao=(e,r,n,o)=>{for(var a=0,i=0;i>2],d=s()[r+4>>2];r+=8;var u=Ke.write(e,t(),l,d,o);if(u<0)return-1;a+=u,void 0!==o&&(o+=u)}return a};function io(e,r,t,n){if(E)return Qe(11,1,e,r,t,n);try{var o=Je.getStreamFromFD(e),a=ao(o,r,t);return s()[n>>2]=a,0}catch(e){if(void 0===Ke||"ErrnoError"!==e.name)throw e;return e.errno}}or.init();var so=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ke.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},lo=365,uo=146;Object.defineProperties(so.prototype,{read:{get:function(){return(this.mode&lo)===lo},set:function(e){e?this.mode|=lo:this.mode&=~lo}},write:{get:function(){return(this.mode&uo)===uo},set:function(e){e?this.mode|=uo:this.mode&=~uo}},isFolder:{get:function(){return Ke.isDir(this.mode)}},isDevice:{get:function(){return Ke.isChrdev(this.mode)}}}),Ke.FSNode=so,Ke.createPreloadedFile=He,Ke.staticInit(),Pr(),Ar=f.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Cr=f.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},st(),et(),_t(),kt=f.UnboundTypeError=Dt(Error,"UnboundTypeError"),jt(),Ht();var co=[er,sr,wr,Er,kr,Yn,Qn,eo,ro,no,oo,io],fo={g:pr,s:gr,G:vr,m:yr,B:br,P:Er,D:kr,v:Tr,R:jr,O:$t,F:Wt,k:xt,Q:Kt,p:Zt,d:Qt,c:en,q:tn,l:cn,S:fn,y:vn,C:wn,E:mn,L:bn,j:Sn,r:Nt,i:Dn,h:In,t:Bn,x:Un,b:xn,n:jn,f:Ln,K:Nn,e:On,z:Vn,w:qn,I:Yn,J:Qn,A:tr,o:eo,H:ro,N:no,u:oo,M:io,a:F||f.wasmMemory},ho=ye(),po=e=>(po=ho.U)(e),mo=e=>(mo=ho.V)(e),go=f._pthread_self=()=>(go=f._pthread_self=ho.W)(),vo=()=>(vo=ho.X)();f.__emscripten_tls_init=()=>(f.__emscripten_tls_init=ho.Y)();var yo=e=>(yo=ho.Z)(e);f.__embind_initialize_bindings=()=>(f.__embind_initialize_bindings=ho._)();var wo=f.__emscripten_thread_init=(e,r,t,n,o,a)=>(wo=f.__emscripten_thread_init=ho.aa)(e,r,t,n,o,a);f.__emscripten_thread_crashed=()=>(f.__emscripten_thread_crashed=ho.ba)();var bo,_o=(e,r,t,n)=>(_o=ho.ca)(e,r,t,n),Eo=e=>(Eo=ho.da)(e),ko=f.__emscripten_thread_exit=e=>(ko=f.__emscripten_thread_exit=ho.ea)(e),So=()=>(So=ho.fa)(),Ao=(e,r)=>(Ao=ho.ga)(e,r),Co=()=>(Co=ho.ha)(),To=e=>(To=ho.ia)(e),Po=e=>(Po=ho.ja)(e),Do=e=>(Do=ho.ka)(e);function Io(){if(!(ne>0)){if(E)return u(f),Y(),void startWorker(f);Z(),ne>0||(f.setStatus?(f.setStatus("Running..."),setTimeout((function(){setTimeout((function(){f.setStatus("")}),1),e()}),1)):e())}function e(){bo||(bo=!0,f.calledRun=!0,V||(Y(),u(f),f.onRuntimeInitialized&&f.onRuntimeInitialized(),Q()))}}if(f.dynCall_jiji=(e,r,t,n,o)=>(f.dynCall_jiji=ho.la)(e,r,t,n,o),f._ff_h264_cabac_tables=98981,f.wasmMemory=F,f.keepRuntimeAlive=Ce,f.ExitStatus=we,f.PThread=or,oe=function e(){bo||Io(),bo||(oe=e)},f.preInit)for("function"==typeof f.preInit&&(f.preInit=[f.preInit]);f.preInit.length>0;)f.preInit.pop()();return Io(),r.ready}),t=(()=>{var e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href;return async function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,n,o;(o=r).ready=new Promise(((e,r)=>{t=e,n=r})),(o=void 0!==o?o:{}).locateFile=function(e,r){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:r+e};var a,i,s,l=Object.assign({},o),d="./this.program",u="object"==typeof window,c="function"==typeof importScripts,f="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";function p(e){return o.locateFile?o.locateFile(e,h):h+e}if(f){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href),g=m("fs"),v=m("path");h=c?v.dirname(h)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href)),a=(e,r)=>(e=Y(e)?new URL(e):v.normalize(e),g.readFileSync(e,r?void 0:"utf8")),s=e=>{var r=a(e,!0);return r.buffer||(r=new Uint8Array(r)),r},i=function(e,r,t){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=Y(e)?new URL(e):v.normalize(e),g.readFile(e,n?void 0:"utf8",((e,o)=>{e?t(e):r(n?o.buffer:o)}))},!o.thisProgram&&process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),o.inspect=()=>"[Emscripten Module object]"}else(u||c)&&(c?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),e&&(h=e),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},c&&(s=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)});var y,w,b=o.print||console.log.bind(console),_=o.printErr||console.error.bind(console);Object.assign(o,l),l=null,o.arguments&&o.arguments,o.thisProgram&&(d=o.thisProgram),o.quit&&o.quit,o.wasmBinary&&(y=o.wasmBinary),"object"!=typeof WebAssembly&&G("no native wasm support detected");var E,k,S,A,C,T,P,D,I=!1;function F(e,r){e||G(r)}function $(){var e=w.buffer;o.HEAP8=E=new Int8Array(e),o.HEAP16=S=new Int16Array(e),o.HEAPU8=k=new Uint8Array(e),o.HEAPU16=A=new Uint16Array(e),o.HEAP32=C=new Int32Array(e),o.HEAPU32=T=new Uint32Array(e),o.HEAPF32=P=new Float32Array(e),o.HEAPF64=D=new Float64Array(e)}var M=[],R=[],B=[];function O(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)x(o.preRun.shift());oe(M)}function W(){o.noFSInit||De.init.initialized||De.init(),De.ignorePermissions=!1,oe(R)}function U(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)L(o.postRun.shift());oe(B)}function x(e){M.unshift(e)}function j(e){R.unshift(e)}function L(e){B.unshift(e)}var z=0,N=null;function V(e){z++,o.monitorRunDependencies&&o.monitorRunDependencies(z)}function H(e){if(z--,o.monitorRunDependencies&&o.monitorRunDependencies(z),0==z&&N){var r=N;N=null,r()}}function G(e){o.onAbort&&o.onAbort(e),_(e="Aborted("+e+")"),I=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw n(r),r}var q,K,X,J="data:application/octet-stream;base64,",Z=e=>e.startsWith(J),Y=e=>e.startsWith("file://");function Q(e){if(e==q&&y)return new Uint8Array(y);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!y&&(u||c)){if("function"==typeof fetch&&!Y(e))return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>Q(e)));if(i)return new Promise(((r,t)=>{i(e,(e=>r(new Uint8Array(e))),t)}))}return Promise.resolve().then((()=>Q(e)))}function re(e,r,t){return ee(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{_(`failed to asynchronously prepare wasm: ${e}`),G(e)}))}function te(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||Z(r)||Y(r)||f||"function"!=typeof fetch?re(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return _(`wasm streaming compile failed: ${e}`),_("falling back to ArrayBuffer instantiation"),re(r,t,n)}))))}function ne(){var e={a:hn};function r(e,r){return pn=e.exports,w=pn.G,$(),Mr=pn.J,j(pn.H),H(),pn}if(V(),o.instantiateWasm)try{return o.instantiateWasm(e,r)}catch(e){_(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return te(y,q,e,(function(e){r(e.instance)})).catch(n),{}}o.locateFile?Z(q="decoder-pro-audio.wasm")||(q=p(q)):q=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-mt.js",document.baseURI).href).href;var oe=e=>{for(;e.length>0;)e.shift()(o)};function ae(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){T[this.ptr+4>>2]=e},this.get_type=function(){return T[this.ptr+4>>2]},this.set_destructor=function(e){T[this.ptr+8>>2]=e},this.get_destructor=function(){return T[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,E[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=E[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,E[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=E[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){T[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return T[this.ptr+16>>2]},this.get_exception_ptr=function(){if(wn(this.get_type()))return T[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}o.noExitRuntime;var ie=(e,r,t)=>{throw new ae(e).init(r,t),e},se=e=>(C[gn()>>2]=e,e),le={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=le.isAbs(e),t="/"===e.substr(-1);return(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=le.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=le.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return le.normalize(e.join("/"))},join2:(e,r)=>le.normalize(e+"/"+r)},de=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(f)try{var e=m("crypto");if(e.randomFillSync)return r=>e.randomFillSync(r);var r=e.randomBytes;return e=>(e.set(r(e.byteLength)),e)}catch(e){}G("initRandomDevice")},ue=e=>(ue=de())(e),ce={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:De.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=le.isAbs(n)}return(r?"/":"")+(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=ce.resolve(e).substr(1),r=ce.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&fe)return fe.decode(e.subarray(r,o));for(var a="";r>10,56320|1023&d)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},pe=[],me=e=>{for(var r=0,t=0;t=55296&&n<=57343?(r+=4,++t):r+=3}return r},ge=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i);if(s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function ve(e,r,t){var n=t>0?t:me(e)+1,o=new Array(n),a=ge(e,o,0,o.length);return r&&(o.length=a),o}var ye=()=>{if(!pe.length){var e=null;if(f){var r=Buffer.alloc(256),t=0,n=process.stdin.fd;try{t=g.readSync(n,r)}catch(e){if(!e.toString().includes("EOF"))throw e;t=0}e=t>0?r.slice(0,t).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ve(e,!0)}return pe.shift()},we={ttys:[],init(){},shutdown(){},register(e,r){we.ttys[e]={input:[],output:[],ops:r},De.registerDevice(e,we.stream_ops)},stream_ops:{open(e){var r=we.ttys[e.node.rdev];if(!r)throw new De.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new De.ErrnoError(60);for(var a=0,i=0;iye(),put_char(e,r){null===r||10===r?(b(he(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(b(he(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(_(he(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(_(he(e.output,0)),e.output=[])}}},be=e=>{G()},_e={ops_table:null,mount:e=>_e.createNode(null,"/",16895,0),createNode(e,r,t,n){if(De.isBlkdev(t)||De.isFIFO(t))throw new De.ErrnoError(63);_e.ops_table||(_e.ops_table={dir:{node:{getattr:_e.node_ops.getattr,setattr:_e.node_ops.setattr,lookup:_e.node_ops.lookup,mknod:_e.node_ops.mknod,rename:_e.node_ops.rename,unlink:_e.node_ops.unlink,rmdir:_e.node_ops.rmdir,readdir:_e.node_ops.readdir,symlink:_e.node_ops.symlink},stream:{llseek:_e.stream_ops.llseek}},file:{node:{getattr:_e.node_ops.getattr,setattr:_e.node_ops.setattr},stream:{llseek:_e.stream_ops.llseek,read:_e.stream_ops.read,write:_e.stream_ops.write,allocate:_e.stream_ops.allocate,mmap:_e.stream_ops.mmap,msync:_e.stream_ops.msync}},link:{node:{getattr:_e.node_ops.getattr,setattr:_e.node_ops.setattr,readlink:_e.node_ops.readlink},stream:{}},chrdev:{node:{getattr:_e.node_ops.getattr,setattr:_e.node_ops.setattr},stream:De.chrdev_stream_ops}});var o=De.createNode(e,r,t,n);return De.isDir(o.mode)?(o.node_ops=_e.ops_table.dir.node,o.stream_ops=_e.ops_table.dir.stream,o.contents={}):De.isFile(o.mode)?(o.node_ops=_e.ops_table.file.node,o.stream_ops=_e.ops_table.file.stream,o.usedBytes=0,o.contents=null):De.isLink(o.mode)?(o.node_ops=_e.ops_table.link.node,o.stream_ops=_e.ops_table.link.stream):De.isChrdev(o.mode)&&(o.node_ops=_e.ops_table.chrdev.node,o.stream_ops=_e.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=De.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,De.isDir(e.mode)?r.size=4096:De.isFile(e.mode)?r.size=e.usedBytes:De.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&_e.resizeFileStorage(e,r.size)},lookup(e,r){throw De.genericErrors[44]},mknod:(e,r,t,n)=>_e.createNode(e,r,t,n),rename(e,r,t){if(De.isDir(e.mode)){var n;try{n=De.lookupNode(r,t)}catch(e){}if(n)for(var o in n.contents)throw new De.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=De.lookupNode(e,r);for(var n in t.contents)throw new De.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=_e.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!De.isLink(e.mode))throw new De.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s0||t+r(_e.stream_ops.write(e,r,0,n,t,!1),0)}},Ee=(e,r,t,n)=>{var o=n?"":`al ${e}`;i(e,(t=>{F(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&H()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&V()},ke=(e,r,t,n,o,a)=>{De.createDataFile(e,r,t,n,o,a)},Se=o.preloadPlugins||[],Ae=(e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return Se.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o},Ce=(e,r,t,n,o,a,i,s,l,d)=>{var u=r?ce.resolve(le.join2(e,r)):e;function c(t){function c(t){d&&d(),s||ke(e,r,t,n,o,l),a&&a(),H()}Ae(t,u,c,(()=>{i&&i(),H()}))||c(t)}V(),"string"==typeof t?Ee(t,(e=>c(e)),i):c(t)},Te=e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r},Pe=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},De={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=ce.resolve(e)))return{path:"",node:null};if(r=Object.assign({follow_mount:!0,recurse_count:0},r),r.recurse_count>8)throw new De.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=De.root,o="/",a=0;a40)throw new De.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var r;;){if(De.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n>>0)%De.nameTable.length},hashAddNode(e){var r=De.hashName(e.parent.id,e.name);e.name_next=De.nameTable[r],De.nameTable[r]=e},hashRemoveNode(e){var r=De.hashName(e.parent.id,e.name);if(De.nameTable[r]===e)De.nameTable[r]=e.name_next;else for(var t=De.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=De.mayLookup(e);if(t)throw new De.ErrnoError(t,e);for(var n=De.hashName(e.id,r),o=De.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return De.lookup(e,r)},createNode(e,r,t,n){var o=new De.FSNode(e,r,t,n);return De.hashAddNode(o),o},destroyNode(e){De.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>De.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){var r=De.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{De.lookupNode(e,r);return 20}catch(e){}return De.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=De.lookupNode(e,r)}catch(e){return e.errno}var o=De.nodePermissions(e,"wx");if(o)return o;if(t){if(!De.isDir(n.mode))return 54;if(De.isRoot(n)||De.getPath(n)===De.cwd())return 10}else if(De.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?De.isLink(e.mode)?32:De.isDir(e.mode)&&("r"!==De.flagsToPermissionString(r)||512&r)?31:De.nodePermissions(e,De.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=De.MAX_OPEN_FDS;e++)if(!De.streams[e])return e;throw new De.ErrnoError(33)},getStreamChecked(e){var r=De.getStream(e);if(!r)throw new De.ErrnoError(8);return r},getStream:e=>De.streams[e],createStream(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return De.FSStream||(De.FSStream=function(){this.shared={}},De.FSStream.prototype={},Object.defineProperties(De.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new De.FSStream,e),-1==r&&(r=De.nextfd()),e.fd=r,De.streams[r]=e,e},closeStream(e){De.streams[e]=null},chrdev_stream_ops:{open(e){var r=De.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new De.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){De.devices[e]={stream_ops:r}},getDevice:e=>De.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),De.syncFSRequests++,De.syncFSRequests>1&&_(`warning: ${De.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=De.getMounts(De.root.mount),n=0;function o(e){return De.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&De.root)throw new De.ErrnoError(10);if(!o&&!a){var i=De.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,De.isMountpoint(n))throw new De.ErrnoError(10);if(!De.isDir(n.mode))throw new De.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?De.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=De.lookupPath(e,{follow_mount:!1});if(!De.isMountpoint(r.node))throw new De.ErrnoError(28);var t=r.node,n=t.mounted,o=De.getMounts(n);Object.keys(De.nameTable).forEach((e=>{for(var r=De.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&De.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=De.lookupPath(e,{parent:!0}).node,o=le.basename(e);if(!o||"."===o||".."===o)throw new De.ErrnoError(28);var a=De.mayCreate(n,o);if(a)throw new De.ErrnoError(a);if(!n.node_ops.mknod)throw new De.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,De.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,De.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o(void 0===t&&(t=r,r=438),r|=8192,De.mknod(e,r,t)),symlink(e,r){if(!ce.resolve(e))throw new De.ErrnoError(44);var t=De.lookupPath(r,{parent:!0}).node;if(!t)throw new De.ErrnoError(44);var n=le.basename(r),o=De.mayCreate(t,n);if(o)throw new De.ErrnoError(o);if(!t.node_ops.symlink)throw new De.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=le.dirname(e),a=le.dirname(r),i=le.basename(e),s=le.basename(r);if(t=De.lookupPath(e,{parent:!0}).node,n=De.lookupPath(r,{parent:!0}).node,!t||!n)throw new De.ErrnoError(44);if(t.mount!==n.mount)throw new De.ErrnoError(75);var l,d=De.lookupNode(t,i),u=ce.relative(e,a);if("."!==u.charAt(0))throw new De.ErrnoError(28);if("."!==(u=ce.relative(r,o)).charAt(0))throw new De.ErrnoError(55);try{l=De.lookupNode(n,s)}catch(e){}if(d!==l){var c=De.isDir(d.mode),f=De.mayDelete(t,i,c);if(f)throw new De.ErrnoError(f);if(f=l?De.mayDelete(n,s,c):De.mayCreate(n,s))throw new De.ErrnoError(f);if(!t.node_ops.rename)throw new De.ErrnoError(63);if(De.isMountpoint(d)||l&&De.isMountpoint(l))throw new De.ErrnoError(10);if(n!==t&&(f=De.nodePermissions(t,"w")))throw new De.ErrnoError(f);De.hashRemoveNode(d);try{t.node_ops.rename(d,n,s)}catch(e){throw e}finally{De.hashAddNode(d)}}},rmdir(e){var r=De.lookupPath(e,{parent:!0}).node,t=le.basename(e),n=De.lookupNode(r,t),o=De.mayDelete(r,t,!0);if(o)throw new De.ErrnoError(o);if(!r.node_ops.rmdir)throw new De.ErrnoError(63);if(De.isMountpoint(n))throw new De.ErrnoError(10);r.node_ops.rmdir(r,t),De.destroyNode(n)},readdir(e){var r=De.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new De.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=De.lookupPath(e,{parent:!0}).node;if(!r)throw new De.ErrnoError(44);var t=le.basename(e),n=De.lookupNode(r,t),o=De.mayDelete(r,t,!1);if(o)throw new De.ErrnoError(o);if(!r.node_ops.unlink)throw new De.ErrnoError(63);if(De.isMountpoint(n))throw new De.ErrnoError(10);r.node_ops.unlink(r,t),De.destroyNode(n)},readlink(e){var r=De.lookupPath(e).node;if(!r)throw new De.ErrnoError(44);if(!r.node_ops.readlink)throw new De.ErrnoError(28);return ce.resolve(De.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=De.lookupPath(e,{follow:!r}).node;if(!t)throw new De.ErrnoError(44);if(!t.node_ops.getattr)throw new De.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>De.stat(e,!0),chmod(e,r,t){var n;"string"==typeof e?n=De.lookupPath(e,{follow:!t}).node:n=e;if(!n.node_ops.setattr)throw new De.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){De.chmod(e,r,!0)},fchmod(e,r){var t=De.getStreamChecked(e);De.chmod(t.node,r)},chown(e,r,t,n){var o;"string"==typeof e?o=De.lookupPath(e,{follow:!n}).node:o=e;if(!o.node_ops.setattr)throw new De.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){De.chown(e,r,t,!0)},fchown(e,r,t){var n=De.getStreamChecked(e);De.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new De.ErrnoError(28);var t;"string"==typeof e?t=De.lookupPath(e,{follow:!0}).node:t=e;if(!t.node_ops.setattr)throw new De.ErrnoError(63);if(De.isDir(t.mode))throw new De.ErrnoError(31);if(!De.isFile(t.mode))throw new De.ErrnoError(28);var n=De.nodePermissions(t,"w");if(n)throw new De.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=De.getStreamChecked(e);if(0==(2097155&t.flags))throw new De.ErrnoError(28);De.truncate(t.node,r)},utime(e,r,t){var n=De.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new De.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?Te(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=le.normalize(e);try{n=De.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(n){if(128&r)throw new De.ErrnoError(20)}else n=De.mknod(e,t,0),a=!0;if(!n)throw new De.ErrnoError(44);if(De.isChrdev(n.mode)&&(r&=-513),65536&r&&!De.isDir(n.mode))throw new De.ErrnoError(54);if(!a){var i=De.mayOpen(n,r);if(i)throw new De.ErrnoError(i)}512&r&&!a&&De.truncate(n,0),r&=-131713;var s=De.createStream({node:n,path:De.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&r||(De.readFiles||(De.readFiles={}),e in De.readFiles||(De.readFiles[e]=1)),s},close(e){if(De.isClosed(e))throw new De.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{De.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(De.isClosed(e))throw new De.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new De.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new De.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new De.ErrnoError(28);if(De.isClosed(e))throw new De.ErrnoError(8);if(1==(2097155&e.flags))throw new De.ErrnoError(8);if(De.isDir(e.node.mode))throw new De.ErrnoError(31);if(!e.stream_ops.read)throw new De.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new De.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new De.ErrnoError(28);if(De.isClosed(e))throw new De.ErrnoError(8);if(0==(2097155&e.flags))throw new De.ErrnoError(8);if(De.isDir(e.node.mode))throw new De.ErrnoError(31);if(!e.stream_ops.write)throw new De.ErrnoError(28);e.seekable&&1024&e.flags&&De.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new De.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(De.isClosed(e))throw new De.ErrnoError(8);if(r<0||t<=0)throw new De.ErrnoError(28);if(0==(2097155&e.flags))throw new De.ErrnoError(8);if(!De.isFile(e.node.mode)&&!De.isDir(e.node.mode))throw new De.ErrnoError(43);if(!e.stream_ops.allocate)throw new De.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new De.ErrnoError(2);if(1==(2097155&e.flags))throw new De.ErrnoError(2);if(!e.stream_ops.mmap)throw new De.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new De.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=De.open(e,r.flags),o=De.stat(e).size,a=new Uint8Array(o);return De.read(n,a,0,o,0),"utf8"===r.encoding?t=he(a,0):"binary"===r.encoding&&(t=a),De.close(n),t},writeFile(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t.flags=t.flags||577;var n=De.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(me(r)+1),a=ge(r,o,0,o.length);De.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");De.write(n,r,0,r.byteLength,void 0,t.canOwn)}De.close(n)},cwd:()=>De.currentPath,chdir(e){var r=De.lookupPath(e,{follow:!0});if(null===r.node)throw new De.ErrnoError(44);if(!De.isDir(r.node.mode))throw new De.ErrnoError(54);var t=De.nodePermissions(r.node,"x");if(t)throw new De.ErrnoError(t);De.currentPath=r.path},createDefaultDirectories(){De.mkdir("/tmp"),De.mkdir("/home"),De.mkdir("/home/web_user")},createDefaultDevices(){De.mkdir("/dev"),De.registerDevice(De.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),De.mkdev("/dev/null",De.makedev(1,3)),we.register(De.makedev(5,0),we.default_tty_ops),we.register(De.makedev(6,0),we.default_tty1_ops),De.mkdev("/dev/tty",De.makedev(5,0)),De.mkdev("/dev/tty1",De.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=ue(e).byteLength),e[--r]);De.createDevice("/dev","random",t),De.createDevice("/dev","urandom",t),De.mkdir("/dev/shm"),De.mkdir("/dev/shm/tmp")},createSpecialDirectories(){De.mkdir("/proc");var e=De.mkdir("/proc/self");De.mkdir("/proc/self/fd"),De.mount({mount(){var r=De.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=De.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){o.stdin?De.createDevice("/dev","stdin",o.stdin):De.symlink("/dev/tty","/dev/stdin"),o.stdout?De.createDevice("/dev","stdout",null,o.stdout):De.symlink("/dev/tty","/dev/stdout"),o.stderr?De.createDevice("/dev","stderr",null,o.stderr):De.symlink("/dev/tty1","/dev/stderr"),De.open("/dev/stdin",0),De.open("/dev/stdout",1),De.open("/dev/stderr",1)},ensureErrnoError(){De.ErrnoError||(De.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},De.ErrnoError.prototype=new Error,De.ErrnoError.prototype.constructor=De.ErrnoError,[44].forEach((e=>{De.genericErrors[e]=new De.ErrnoError(e),De.genericErrors[e].stack=""})))},staticInit(){De.ensureErrnoError(),De.nameTable=new Array(4096),De.mount(_e,{},"/"),De.createDefaultDirectories(),De.createDefaultDevices(),De.createSpecialDirectories(),De.filesystems={MEMFS:_e}},init(e,r,t){De.init.initialized=!0,De.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=r||o.stdout,o.stderr=t||o.stderr,De.createStandardStreams()},quit(){De.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=this;s.setDataGetter((e=>{var r=e*i,o=(e+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):ve(o.responseText||"",!0)})(r,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!c)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:t};var l=De.createFile(e,r,s,n,o);s.contents?l.contents=s.contents:s.url&&(l.contents=null,l.url=s.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var d={};function u(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s{var r=l.stream_ops[e];d[e]=function(){return De.forceLoadFile(l),r.apply(null,arguments)}})),d.read=(e,r,t,n,o)=>(De.forceLoadFile(l),u(e,r,t,n,o)),d.mmap=(e,r,t,n,o)=>{De.forceLoadFile(l);var a=be();if(!a)throw new De.ErrnoError(48);return u(e,E,a,r,t),{ptr:a,allocated:!0}},l.stream_ops=d,l}},Ie=(e,r)=>e?he(k,e,r):"",Fe={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(le.isAbs(r))return r;var n;-100===e?n=De.cwd():n=Fe.getStreamFromFD(e).path;if(0==r.length){if(!t)throw new De.ErrnoError(44);return n}return le.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(e){if(e&&e.node&&le.normalize(r)!==le.normalize(De.getPath(e.node)))return-54;throw e}C[t>>2]=n.dev,C[t+4>>2]=n.mode,T[t+8>>2]=n.nlink,C[t+12>>2]=n.uid,C[t+16>>2]=n.gid,C[t+20>>2]=n.rdev,X=[n.size>>>0,(K=n.size,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],C[t+24>>2]=X[0],C[t+28>>2]=X[1],C[t+32>>2]=4096,C[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return X=[Math.floor(o/1e3)>>>0,(K=Math.floor(o/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],C[t+40>>2]=X[0],C[t+44>>2]=X[1],T[t+48>>2]=o%1e3*1e3,X=[Math.floor(a/1e3)>>>0,(K=Math.floor(a/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],C[t+56>>2]=X[0],C[t+60>>2]=X[1],T[t+64>>2]=a%1e3*1e3,X=[Math.floor(i/1e3)>>>0,(K=Math.floor(i/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],C[t+72>>2]=X[0],C[t+76>>2]=X[1],T[t+80>>2]=i%1e3*1e3,X=[n.ino>>>0,(K=n.ino,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],C[t+88>>2]=X[0],C[t+92>>2]=X[1],0},doMsync(e,r,t,n,o){if(!De.isFile(r.node.mode))throw new De.ErrnoError(43);if(2&n)return 0;var a=k.slice(e,e+t);De.msync(r,a,o,t,n)},varargs:void 0,get(){var e=C[+Fe.varargs>>2];return Fe.varargs+=4,e},getp:()=>Fe.get(),getStr:e=>Ie(e),getStreamFromFD:e=>De.getStreamChecked(e)};function $e(e,r,t){Fe.varargs=t;try{var n=Fe.getStreamFromFD(e);switch(r){case 0:if((o=Fe.get())<0)return-28;for(;De.streams[o];)o++;return De.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=Fe.get();return n.flags|=o,0;case 5:o=Fe.getp();return S[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return se(28),-1}}catch(e){if(void 0===De||"ErrnoError"!==e.name)throw e;return-e.errno}}function Me(e,r,t,n){Fe.varargs=n;try{r=Fe.getStr(r),r=Fe.calculateAt(e,r);var o=n?Fe.get():0;return De.open(r,t,o).fd}catch(e){if(void 0===De||"ErrnoError"!==e.name)throw e;return-e.errno}}var Re,Be,Oe,We=(e,r,t,n,o)=>{},Ue=()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);Re=e},xe=e=>{for(var r="",t=e;k[t];)r+=Re[k[t++]];return r},je={},Le={},ze={},Ne=e=>{throw new Be(e)},Ve=e=>{throw new Oe(e)},He=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Ve("Mismatched type converter count");for(var o=0;o{Le.hasOwnProperty(e)?o[r]=Le[e]:(a.push(e),je.hasOwnProperty(e)||(je[e]=[]),je[e].push((()=>{o[r]=Le[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)};function Ge(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=r.name;if(e||Ne(`type "${n}" must have a positive integer typeid pointer`),Le.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Ne(`Cannot register type '${n}' twice`)}if(Le[e]=r,delete ze[e],je.hasOwnProperty(e)){var o=je[e];delete je[e],o.forEach((e=>e()))}}function qe(e,r){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ge(e,r,t)}var Ke,Xe=8,Je=(e,r,t,n)=>{qe(e,{name:r=xe(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:Xe,readValueFromPointer:function(e){return this.fromWireType(k[e])},destructorFunction:null})},Ze=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Ye=e=>{Ne(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,er=e=>{},rr=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},tr=e=>{e.count.value-=1,0===e.count.value&&rr(e)},nr=(e,r,t)=>{if(r===t)return e;if(void 0===t.baseClass)return null;var n=nr(e,r,t.baseClass);return null===n?null:t.downcast(n)},or={},ar=()=>Object.keys(cr).length,ir=()=>{var e=[];for(var r in cr)cr.hasOwnProperty(r)&&e.push(cr[r]);return e},sr=[],lr=()=>{for(;sr.length;){var e=sr.pop();e.$$.deleteScheduled=!1,e.delete()}},dr=e=>{Ke=e,sr.length&&Ke&&Ke(lr)},ur=()=>{o.getInheritedInstanceCount=ar,o.getLiveInheritedInstances=ir,o.flushPendingDeletes=lr,o.setDelayFunction=dr},cr={},fr=(e,r)=>{for(void 0===r&&Ne("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r},hr=(e,r)=>(r=fr(e,r),cr[r]),pr=(e,r)=>(r.ptrType&&r.ptr||Ve("makeClassHandle requires ptr and ptrType"),!!r.smartPtrType!==!!r.smartPtr&&Ve("Both smartPtrType and smartPtr must be specified"),r.count={value:1},gr(Object.create(e,{$$:{value:r}})));function mr(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=hr(this.registeredClass,r);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?pr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):pr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(r),s=or[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var l=nr(r,this.registeredClass,a.registeredClass);return null===l?o.call(this):this.isSmartPointer?pr(a.registeredClass.instancePrototype,{ptrType:a,ptr:l,smartPtrType:this,smartPtr:e}):pr(a.registeredClass.instancePrototype,{ptrType:a,ptr:l})}var gr=e=>"undefined"==typeof FinalizationRegistry?(gr=e=>e,e):(Qe=new FinalizationRegistry((e=>{tr(e.$$)})),gr=e=>{var r=e.$$;if(!!r.smartPtr){var t={$$:r};Qe.register(e,t,e)}return e},er=e=>Qe.unregister(e),gr(e)),vr=()=>{Object.assign(yr.prototype,{isAliasOf(e){if(!(this instanceof yr))return!1;if(!(e instanceof yr))return!1;var r=this.$$.ptrType.registeredClass,t=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,o=e.$$.ptr;r.baseClass;)t=r.upcast(t),r=r.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return r===n&&t===o},clone(){if(this.$$.ptr||Ye(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=gr(Object.create(Object.getPrototypeOf(this),{$$:{value:Ze(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Ye(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ne("Object already scheduled for deletion"),er(this),tr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ye(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ne("Object already scheduled for deletion"),sr.push(this),1===sr.length&&Ke&&Ke(lr),this.$$.deleteScheduled=!0,this}})};function yr(){}var wr=(e,r)=>Object.defineProperty(r,"name",{value:e}),br=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Ne(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},_r=(e,r,t)=>{o.hasOwnProperty(e)?((void 0===t||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[t])&&Ne(`Cannot register public name '${e}' twice`),br(o,e,e),o.hasOwnProperty(t)&&Ne(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[e].overloadTable[t]=r):(o[e]=r,void 0!==t&&(o[e].numArguments=t))},Er=48,kr=57,Sr=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=Er&&r<=kr?`_${e}`:e};function Ar(e,r,t,n,o,a,i,s){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var Cr=(e,r,t)=>{for(;r!==t;)r.upcast||Ne(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e};function Tr(e,r){if(null===r)return this.isReference&&Ne(`null is not a valid ${this.name}`),0;r.$$||Ne(`Cannot pass "${lt(r)}" as a ${this.name}`),r.$$.ptr||Ne(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass;return Cr(r.$$.ptr,t,this.registeredClass)}function Pr(e,r){var t;if(null===r)return this.isReference&&Ne(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,t),t):0;r.$$||Ne(`Cannot pass "${lt(r)}" as a ${this.name}`),r.$$.ptr||Ne(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&Ne(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=Cr(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===r.$$.smartPtr&&Ne("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:Ne(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var o=r.clone();t=this.rawShare(t,at.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,t)}break;default:Ne("Unsupporting sharing policy")}return t}function Dr(e,r){if(null===r)return this.isReference&&Ne(`null is not a valid ${this.name}`),0;r.$$||Ne(`Cannot pass "${lt(r)}" as a ${this.name}`),r.$$.ptr||Ne(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&Ne(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass;return Cr(r.$$.ptr,t,this.registeredClass)}function Ir(e){return this.fromWireType(T[e>>2])}var Fr=()=>{Object.assign($r.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Xe,readValueFromPointer:Ir,deleteObject(e){null!==e&&e.delete()},fromWireType:mr})};function $r(e,r,t,n,o,a,i,s,l,d,u){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=u,o||void 0!==r.baseClass?this.toWireType=Pr:n?(this.toWireType=Tr,this.destructorFunction=null):(this.toWireType=Dr,this.destructorFunction=null)}var Mr,Rr,Br=(e,r,t)=>{o.hasOwnProperty(e)||Ve("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==t?o[e].overloadTable[t]=r:(o[e]=r,o[e].argCount=t)},Or=(e,r,t)=>{var n=o["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)},Wr=[],Ur=e=>{var r=Wr[e];return r||(e>=Wr.length&&(Wr.length=e+1),Wr[e]=r=Mr.get(e)),r},xr=(e,r,t)=>e.includes("j")?Or(e,r,t):Ur(r).apply(null,t),jr=(e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),xr(e,r,t)}},Lr=(e,r)=>{var t=(e=xe(e)).includes("j")?jr(e,r):Ur(r);return"function"!=typeof t&&Ne(`unknown function pointer with signature ${e}: ${r}`),t},zr=(e,r)=>{var t=wr(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t},Nr=e=>{var r=vn(e),t=xe(r);return mn(r),t},Vr=(e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||Le[r]||(ze[r]?ze[r].forEach(e):(t.push(r),n[r]=!0))})),new Rr(`${e}: `+t.map(Nr).join([", "]))},Hr=(e,r,t,n,o,a,i,s,l,d,u,c,f)=>{u=xe(u),a=Lr(o,a),s&&(s=Lr(i,s)),d&&(d=Lr(l,d)),f=Lr(c,f);var h=Sr(u);_r(h,(function(){Vr(`Cannot construct ${u} due to unbound types`,[n])})),He([e,r,t],n?[n]:[],(function(r){var t,o;r=r[0],o=n?(t=r.registeredClass).instancePrototype:yr.prototype;var i=wr(u,(function(){if(Object.getPrototypeOf(this)!==l)throw new Be("Use 'new' to construct "+u);if(void 0===c.constructor_body)throw new Be(u+" has no accessible constructor");var e=c.constructor_body[arguments.length];if(void 0===e)throw new Be(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(c.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(o,{constructor:{value:i}});i.prototype=l;var c=new Ar(u,i,l,f,t,a,s,d);c.baseClass&&(void 0===c.baseClass.__derivedClasses&&(c.baseClass.__derivedClasses=[]),c.baseClass.__derivedClasses.push(c));var p=new $r(u,c,!0,!1,!1),m=new $r(u+"*",c,!1,!1,!1),g=new $r(u+" const*",c,!1,!0,!1);return or[e]={pointerType:m,constPointerType:g},Br(h,i),[p,m,g]}))},Gr=(e,r)=>{for(var t=[],n=0;n>2]);return t},qr=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function Kr(e,r){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var t=wr(e.name||"unknownFunctionName",(function(){}));t.prototype=e.prototype;var n=new t,o=e.apply(n,r);return o instanceof Object?o:n}function Xr(e,r,t,n,o,a){var i=r.length;i<2&&Ne("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&null!==t,l=!1,d=1;d0?", ":"")+f),h+=(u||a?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",l)h+="runDestructors(destructors);\n";else for(d=s?1:2;d{var i=Gr(r,t);o=Lr(n,o),He([],[e],(function(e){var t=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[r-1])throw new Be(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[r-1]=()=>{Vr(`Cannot construct ${e.name} due to unbound types`,i)},He([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[r-1]=Xr(t,n,null,o,a),[]))),[]}))},Zr=e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?e.substr(0,r):e},Yr=(e,r,t,n,o,a,i,s,l)=>{var d=Gr(t,n);r=xe(r),r=Zr(r),a=Lr(o,a),He([],[e],(function(e){var n=`${(e=e[0]).name}.${r}`;function o(){Vr(`Cannot call ${n} due to unbound types`,d)}r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(r);var u=e.registeredClass.instancePrototype,c=u[r];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===t-2?(o.argCount=t-2,o.className=e.name,u[r]=o):(br(u,r,n),u[r].overloadTable[t-2]=o),He([],d,(function(o){var s=Xr(n,o,e,a,i,l);return void 0===u[r].overloadTable?(s.argCount=t-2,u[r]=s):u[r].overloadTable[t-2]=s,[]})),[]}))};function Qr(){Object.assign(et.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function et(){this.allocated=[void 0],this.freelist=[]}var rt=new et,tt=e=>{e>=rt.reserved&&0==--rt.get(e).refcount&&rt.free(e)},nt=()=>{for(var e=0,r=rt.reserved;r{rt.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),rt.reserved=rt.allocated.length,o.count_emval_handles=nt},at={toValue:e=>(e||Ne("Cannot use deleted val. handle = "+e),rt.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return rt.allocate({refcount:1,value:e})}}};function it(e){return this.fromWireType(C[e>>2])}var st=(e,r)=>{qe(e,{name:r=xe(r),fromWireType:e=>{var r=at.toValue(e);return tt(e),r},toWireType:(e,r)=>at.toHandle(r),argPackAdvance:Xe,readValueFromPointer:it,destructorFunction:null})},lt=e=>{if(null===e)return"null";var r=typeof e;return"object"===r||"array"===r||"function"===r?e.toString():""+e},dt=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(P[e>>2])};case 8:return function(e){return this.fromWireType(D[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},ut=(e,r,t)=>{qe(e,{name:r=xe(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:Xe,readValueFromPointer:dt(r,t),destructorFunction:null})},ct=(e,r,t)=>{switch(r){case 1:return t?e=>E[e>>0]:e=>k[e>>0];case 2:return t?e=>S[e>>1]:e=>A[e>>1];case 4:return t?e=>C[e>>2]:e=>T[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},ft=(e,r,t,n,o)=>{r=xe(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<>>i}var s=r.includes("unsigned");qe(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:Xe,readValueFromPointer:ct(r,t,0!==n),destructorFunction:null})},ht=(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=T[e>>2],t=T[e+4>>2];return new n(E.buffer,t,r)}qe(e,{name:t=xe(t),fromWireType:o,argPackAdvance:Xe,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},pt=(e,r,t)=>ge(e,k,r,t),mt=(e,r)=>{var t="std::string"===(r=xe(r));qe(e,{name:r,fromWireType(e){var r,n=T[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==k[s]){var l=Ie(a,s-a);void 0===r?r=l:(r+=String.fromCharCode(0),r+=l),a=s+1}}else{var d=new Array(n);for(i=0;i>2]=n,t&&o)pt(r,i,n+1);else if(o)for(var s=0;s255&&(mn(i),Ne("String has UTF-16 code units that do not fit in 8 bits")),k[i+s]=l}else for(s=0;s{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&A[n];)++n;if((t=n<<1)-e>32&>)return gt.decode(k.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=S[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},yt=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a>1]=i,r+=2}return S[r>>1]=0,r-n},wt=e=>2*e.length,bt=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=C[e+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},_t=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a=55296&&i<=57343)i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a);if(C[r>>2]=i,(r+=4)+4>o)break}return C[r>>2]=0,r-n},Et=e=>{for(var r=0,t=0;t=55296&&n<=57343&&++t,r+=4}return r},kt=(e,r,t)=>{var n,o,a,i,s;t=xe(t),2===r?(n=vt,o=yt,i=wt,a=()=>A,s=1):4===r&&(n=bt,o=_t,i=Et,a=()=>T,s=2),qe(e,{name:t,fromWireType:e=>{for(var t,o=T[e>>2],i=a(),l=e+4,d=0;d<=o;++d){var u=e+4+d*r;if(d==o||0==i[u>>s]){var c=n(l,u-l);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),l=u+r}}return mn(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Ne(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),l=yn(4+a+r);return T[l>>2]=a>>s,o(n,l+4,a+r),null!==e&&e.push(mn,l),l},argPackAdvance:Xe,readValueFromPointer:it,destructorFunction(e){mn(e)}})},St=(e,r)=>{qe(e,{isVoid:!0,name:r=xe(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},At={},Ct=e=>{var r=At[e];return void 0===r?xe(e):r},Tt=[],Pt=(e,r,t,n,o)=>(e=Tt[e])(r=at.toValue(r),r[t=Ct(t)],n,o),Dt=e=>{var r=Tt.length;return Tt.push(e),r},It=(e,r)=>{var t=Le[e];return void 0===t&&Ne(r+" has unknown type "+Nr(e)),t},Ft=(e,r)=>{for(var t=new Array(e),n=0;n>2],"parameter "+n);return t},$t=(e,r,t)=>{var n=[],o=e.toWireType(n,t);return n.length&&(T[r>>2]=at.toHandle(n)),o},Mt=(e,r,t)=>{var n=Ft(e,r),o=n.shift();e--;var a="return function (obj, func, destructorsRef, args) {\n",i=0,s=[];0===t&&s.push("obj");for(var l=["retType"],d=[o],u=0;ue.name)).join(", ")}) => ${o.name}>`;return Dt(wr(f,c))},Rt=e=>{var r=at.toValue(e);qr(r),tt(e)},Bt=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN,Ot=e=>e%4==0&&(e%100!=0||e%400==0),Wt=[0,31,60,91,121,152,182,213,244,274,305,335],Ut=[0,31,59,90,120,151,181,212,243,273,304,334],xt=e=>(Ot(e.getFullYear())?Wt:Ut)[e.getMonth()]+e.getDate()-1;function jt(e,r,t){var n=Bt(e,r),o=new Date(1e3*n);C[t>>2]=o.getSeconds(),C[t+4>>2]=o.getMinutes(),C[t+8>>2]=o.getHours(),C[t+12>>2]=o.getDate(),C[t+16>>2]=o.getMonth(),C[t+20>>2]=o.getFullYear()-1900,C[t+24>>2]=o.getDay();var a=0|xt(o);C[t+28>>2]=a,C[t+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),s=new Date(o.getFullYear(),6,1).getTimezoneOffset(),l=i.getTimezoneOffset(),d=0|(s!=l&&o.getTimezoneOffset()==Math.min(l,s));C[t+32>>2]=d}var Lt=e=>{var r=me(e)+1,t=yn(r);return t&&pt(e,t,r),t},zt=(e,r,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),l=Math.max(i,s);function d(e){var r=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return r?r[1]:"GMT"}T[e>>2]=60*l,C[r>>2]=Number(i!=s);var u=d(o),c=d(a),f=Lt(u),h=Lt(c);s>2]=f,T[t+4>>2]=h):(T[t>>2]=h,T[t+4>>2]=f)},Nt=()=>{G("")},Vt=()=>Date.now(),Ht=(e,r,t)=>k.copyWithin(e,r,r+t),Gt=()=>134217728,qt=e=>{var r=(e-w.buffer.byteLength+65535)/65536;try{return w.grow(r),$(),1}catch(e){}},Kt=e=>{var r=k.length;e>>>=0;var t=Gt();if(e>t)return!1;for(var n,o,a=1;a<=4;a*=2){var i=r*(1+.2/a);i=Math.min(i,e+100663296);var s=Math.min(t,(n=Math.max(e,i))+((o=65536)-n%o)%o);if(qt(s))return!0}return!1},Xt={},Jt=()=>d||"./this.program",Zt=()=>{if(!Zt.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Jt()};for(var r in Xt)void 0===Xt[r]?delete e[r]:e[r]=Xt[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);Zt.strings=t}return Zt.strings},Yt=(e,r)=>{for(var t=0;t>0]=e.charCodeAt(t);E[r>>0]=0},Qt=(e,r)=>{var t=0;return Zt().forEach(((n,o)=>{var a=r+t;T[e+4*o>>2]=a,Yt(n,a),t+=n.length+1})),0},en=(e,r)=>{var t=Zt();T[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),T[r>>2]=n,0};function rn(e){try{var r=Fe.getStreamFromFD(e);return De.close(r),0}catch(e){if(void 0===De||"ErrnoError"!==e.name)throw e;return e.errno}}function tn(e,r){try{var t=Fe.getStreamFromFD(e),n=t.tty?2:De.isDir(t.mode)?3:De.isLink(t.mode)?7:4;return E[r>>0]=n,S[r+2>>1]=0,X=[0,(K=0,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],C[r+8>>2]=X[0],C[r+12>>2]=X[1],X=[0,(K=0,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],C[r+16>>2]=X[0],C[r+20>>2]=X[1],0}catch(e){if(void 0===De||"ErrnoError"!==e.name)throw e;return e.errno}}var nn=(e,r,t,n)=>{for(var o=0,a=0;a>2],s=T[r+4>>2];r+=8;var l=De.read(e,E,i,s,n);if(l<0)return-1;if(o+=l,l>2]=a,0}catch(e){if(void 0===De||"ErrnoError"!==e.name)throw e;return e.errno}}function an(e,r,t,n,o){var a=Bt(r,t);try{if(isNaN(a))return 61;var i=Fe.getStreamFromFD(e);return De.llseek(i,a,n),X=[i.position>>>0,(K=i.position,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],C[o>>2]=X[0],C[o+4>>2]=X[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===De||"ErrnoError"!==e.name)throw e;return e.errno}}var sn=(e,r,t,n)=>{for(var o=0,a=0;a>2],s=T[r+4>>2];r+=8;var l=De.write(e,E,i,s,n);if(l<0)return-1;o+=l,void 0!==n&&(n+=l)}return o};function ln(e,r,t,n){try{var o=Fe.getStreamFromFD(e),a=sn(o,r,t);return T[n>>2]=a,0}catch(e){if(void 0===De||"ErrnoError"!==e.name)throw e;return e.errno}}var dn=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=De.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},un=365,cn=146;Object.defineProperties(dn.prototype,{read:{get:function(){return(this.mode&un)===un},set:function(e){e?this.mode|=un:this.mode&=~un}},write:{get:function(){return(this.mode&cn)===cn},set:function(e){e?this.mode|=cn:this.mode&=~cn}},isFolder:{get:function(){return De.isDir(this.mode)}},isDevice:{get:function(){return De.isChrdev(this.mode)}}}),De.FSNode=dn,De.createPreloadedFile=Ce,De.staticInit(),Ue(),Be=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Oe=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},vr(),ur(),Fr(),Rr=o.UnboundTypeError=zr(Error,"UnboundTypeError"),Qr(),ot();var fn,hn={o:ie,C:$e,u:Me,r:We,E:Je,F:Hr,A:Jr,i:Yr,D:st,l:ut,c:ft,b:ht,m:mt,j:kt,n:St,f:Pt,h:tt,e:Mt,d:Rt,p:jt,t:zt,a:Nt,g:Vt,y:Ht,s:Kt,w:Qt,x:en,k:rn,v:tn,B:on,q:an,z:ln},pn=ne(),mn=e=>(mn=pn.I)(e),gn=()=>(gn=pn.K)(),vn=e=>(vn=pn.L)(e),yn=e=>(yn=pn.M)(e),wn=e=>(wn=pn.O)(e);function bn(){function e(){fn||(fn=!0,o.calledRun=!0,I||(W(),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),U()))}z>0||(O(),z>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.dynCall_viiijj=(e,r,t,n,a,i,s,l)=>(o.dynCall_viiijj=pn.P)(e,r,t,n,a,i,s,l),o.dynCall_jij=(e,r,t,n)=>(o.dynCall_jij=pn.Q)(e,r,t,n),o.dynCall_jii=(e,r,t)=>(o.dynCall_jii=pn.R)(e,r,t),o.dynCall_jiji=(e,r,t,n,a)=>(o.dynCall_jiji=pn.S)(e,r,t,n,a),N=function e(){fn||bn(),fn||(N=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return bn(),r.ready}})();const n=g;!function(e,r){const t=g,n=e();for(;;)try{if(706592===-parseInt(t(270))/1*(parseInt(t(347))/2)+parseInt(t(300))/3+-parseInt(t(356))/4+-parseInt(t(644))/5*(-parseInt(t(627))/6)+-parseInt(t(346))/7+-parseInt(t(395))/8*(parseInt(t(237))/9)+parseInt(t(354))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(S);const o={websocket:1,fetch:2,hls:3,webrtc:4,webTransport:5,aliyunRtc:6,ts:7};n(595),n(234),n(485),n(269),n(568),n(234),n(485),n(595),n(269),n(568),n(630),n(510),n(402);const a={player:"player",playerAudio:n(283),playbackTF:n(431),talk:n(560),playVod:n(545)},i={mp4:"mp4",webm:n(515),flv:n(367),mov:n(313)},s={flv:n(367),m7s:n(663),hls:"hls",webrtc:n(269),webTransport:"webTransport",nakedFlow:n(256),fmp4:n(694),mpeg4:n(370),aliyunRtc:n(510),ts:"ts",g711:"g711",pcm:n(483)};n(392),n(567),n(692),n(498);const l={mse:"mse",wcs:n(693),offscreen:"offscreen",wasm:n(426),simd:"simd",mt:"mt",webrtc:n(269),hls:n(485),aliyunRtc:n(510)},d={canvas:n(646),video:n(587)},u={debug:n(336),warn:n(342)},c={click:n(410),mouseDownAndUp:n(672)},f="normal",h=(n(499),n(374)),p=n(292),m=4080;function g(e,r){const t=S();return(g=function(e,r){return t[e-=230]})(e,r)}n(355),n(700);const v={playIsNotPauseOrUrlIsNull:n(669),webglAlignmentError:n(308),webglContextLostError:n(695),mediaSourceH265NotSupport:n(611),mseSourceBufferFull:"缓冲区已满",mediaSourceAppendBufferError:n(241),mseSourceBufferError:"解码失败",mseAddSourceBufferError:n(241),mseWorkerAddSourceBufferError:n(241),mediaSourceDecoderConfigurationError:n(241),mediaSourceTsIsMaxDiff:"流异常",mseWidthOrHeightChange:n(550),mediaSourceAudioG711NotSupport:n(598),mediaSourceAudioInitTimeout:"初始化音频解码器失败",mediaSourceAudioNoDataTimeout:"等待音频数据超时",mediaSourceUseCanvasRenderPlayFailed:n(580),mediaSourceBufferedIsZeroError:n(550),webcodecsH265NotSupport:n(611),webcodecsUnsupportedConfigurationError:"初始化解码器失败",webcodecsDecodeConfigureError:n(241),webcodecsDecodeError:n(422),webcodecsAudioInitTimeout:n(497),webcodecsAudioNoDataTimeout:n(272),wcsWidthOrHeightChange:n(422),wasmDecodeError:n(422),simdDecodeError:n(422),wasmWidthOrHeightChange:n(550),wasmUseVideoRenderError:"video自动渲染失败",videoElementPlayingFailed:n(519),simdH264DecodeVideoWidthIsTooLarge:"不支持该分辨率的视频",networkDelayTimeout:n(609),fetchError:n(688),streamEnd:"请求结束",websocket1006Error:n(429),websocketError:"请求失败",webrtcError:n(688),hlsError:n(688),decoderWorkerInitError:n(622),decoderWorkerWasmError:n(577),videoElementPlayingFailedForWebrtc:n(519),videoInfoError:"解析视频分辨率失败",webrtcStreamH265:"webrtc不支持H265",delayTimeout:"播放超时重播失败",loadingTimeout:n(329),loadingTimeoutRetryEnd:"加载超时重播失败",delayTimeoutRetryEnd:n(264),flvDemuxBufferSizeTooLarge:n(250),audioChannelError:n(654),aliyunRtcError:n(688),mseWaitVideoCanplayTimeout:n(550),initDecoderWorkerTimeout:n(538)};n(323),n(342),n(263),n(257),n(246),n(537),n(632),n(332),n(258),n(638),n(234),n(367),n(402),n(575),n(410),n(587),n(382),n(382),n(255);n(505),n(419),n(335),n(707),n(543),n(699),n(704),n(298),n(541),n(657),n(455),n(542),n(306),n(302),n(446),n(286),n(552),n(310);const y={init:n(556),initVideo:n(624),render:"render",playAudio:n(482),initAudio:n(486),kBps:n(295),decode:n(404),audioCode:n(304),audioNalu:"audioNalu",audioAACSequenceHeader:n(364),videoCode:n(604),videoCodec:"videoCodec",videoNalu:"videoNalu",videoPayload:"videoPayload",audioPayload:n(584),wasmError:n(619),workerFetch:"workerFetch",iframeIntervalTs:n(324),isDropping:n(706),workerEnd:"workerEnd",networkDelay:n(589),playbackStreamVideoFps:n(409),wasmWidthOrHeightChange:n(398),simdDecodeError:n(351),simdH264DecodeVideoWidthIsTooLarge:"simdH264DecodeVideoWidthIsTooLarge",websocketOpen:"websocketOpen",websocketStringMsg:n(406),closeEnd:n(701),tempStream:"tempStream",videoSEI:"videoSEI",flvScriptData:n(322),aacSequenceHeader:n(248),videoSequenceHeader:n(666),flvBufferData:n(403),checkFirstIFrame:n(601),mseHandle:"mseHandle",mseFirstRenderTime:n(436),mseError:"mseError",notSupportNewWasm:n(625),failedToAsynchronouslyPrepareWasm:"failedToAsynchronouslyPrepareWasm"};n(662),n(556),n(404),n(590),n(414),n(450),n(602),n(591),n(554),n(320),n(558),n(600),n(661),n(686),n(377),n(435),n(633),n(384),n(651),n(556),n(586),n(435),n(236),n(690),n(406),n(556);const w={fullscreen:n(447),fullScreenByStart:n(238),webFullscreen:n(592),decoderWorkerInit:n(277),play:n(315),playing:"playing",pause:n(293),mute:n(231),load:n(684),loading:n(273),zooming:n(496),drawingRect:"drawingRect",drawingRectInfo:n(439),videoInfo:n(647),timeUpdate:n(697),audioInfo:n(535),log:n(648),error:"error",kBps:n(295),timeout:n(310),delayTimeout:n(582),delayTimeoutRetryEnd:"delayTimeoutRetryEnd",loadingTimeout:n(574),loadingTimeoutRetryEnd:n(547),stats:n(396),performance:n(585),videoSmooth:"videoSmooth",faceDetectActive:n(279),objectDetectActive:n(597),occlusionDetectActive:n(399),imageDetectActive:n(613),record:"record",recording:"recording",recordingTimestamp:"recordingTimestamp",recordStart:n(480),recordEnd:n(509),recordCreateError:n(517),recordBlob:"recordBlob",recordCancel:n(361),buffer:n(435),videoFrame:n(427),videoSEI:n(454),videoSEISyncPts:"videoSEISyncPts",start:n(682),metadata:n(641),resize:n(372),volumechange:"volumechange",volume:n(365),destroy:n(586),beforeDestroy:n(407),streamEnd:n(309),streamRate:n(420),streamAbps:n(511),streamVbps:n(698),streamDts:n(434),streamSuccess:n(459),streamMessage:n(518),streamError:n(579),streamStats:n(559),streamEndInner:n(243),mseSourceOpen:n(233),mseSourceClose:n(291),mseSourceended:"mseSourceended",mseSourceStartStreaming:n(301),mseSourceEndStreaming:"mseSourceEndStreaming",mseSourceBufferError:n(677),mseAddSourceBufferError:n(469),mseWorkerAddSourceBufferError:n(664),mseSourceBufferBusy:n(474),mseSourceBufferFull:"mseSourceBufferFull",videoWaiting:n(297),videoTimeUpdate:"videoTimeUpdate",videoSyncAudio:n(555),playToRenderTimes:"playToRenderTimes",playbackTime:n(451),playbackTimestamp:n(636),playbackTimeScroll:"playbackTimeScroll",playbackPrecision:n(353),playbackShowPrecisionChange:"playbackShowPrecisionChange",playbackJustTime:n(685),playbackStats:n(472),playbackSeek:"playbackSeek",playbackPause:n(326),playbackPauseOrResume:"playbackPauseOrResume",playbackRateChange:n(674),playbackPreRateChange:n(296),playbackEndInner:"playbackEndInner",playbackEnd:n(463),playVodStats:"playVodStats",playVodPause:n(274),playVodPauseOrResume:n(441),playVodRateChange:n(425),playVodTime:n(539),playVodTimeCache:n(268),playVodSeek:n(239),playVodSeekEnd:n(516),playVodVideoSeekingByMse:"playVodVideoSeekingByMse",playVodVideoSeekedByMse:n(612),playVodCanplay:n(371),playVodWaiting:n(479),playVodEndedAndReplay:"playVodEndedAndReplay",playVodEnded:"playVodEnded",ptz:n(360),streamQualityChange:n(259),visibilityChange:n(645),netBuf:n(536),close:n(591),networkDelayTimeout:n(262),togglePerformancePanel:n(571),viewResizeChange:"viewResizeChange",flvDemuxBufferSizeTooLarge:n(311),talkGetUserMediaSuccess:n(249),talkGetUserMediaFail:n(314),talkGetUserMediaTimeout:n(478),talkStreamStart:n(504),talkStreamOpen:"talkStreamOpen",talkStreamClose:n(680),talkStreamError:"talkStreamError",talkStreamInactive:n(553),talkStreamMsg:"talkStreamMsg",webrtcDisconnect:n(271),webrtcFailed:n(401),webrtcClosed:n(379),webrtcChecking:"webrtcChecking",webrtcConnected:"webrtcConnected",webrtcCompleted:n(491),webrtcOnConnectionStateChange:n(390),webrtcOnIceConnectionStateChange:n(240),crashLog:"crashLog",focus:n(340),blur:n(465),inView:n(678),visibilityHiddenTimeout:n(260),websocketOpen:n(437),websocketClose:n(690),websocketError:n(236),websocketStringMsg:n(406),aiObjectDetectorInfo:n(334),aiFaceDetectorInfo:n(546),aiOcclusionDetectResult:n(394),aiImageDetectResult:n(470),playFailedAndPaused:n(653),audioResumeState:n(389),webrtcStreamH265:"webrtcStreamH265",flvMetaData:n(288),talkFailedAndStop:n(319),removeLoadingBgImage:n(386),memoryLog:n(352),downloadMemoryLog:n(594),pressureObserverCpu:n(566),currentPts:"currentPts",online:n(460),offline:n(650),networkState:n(617),clickInitPlayer:n(513)};n(684),n(697),n(647),n(295),n(310),n(574),n(547),n(582),n(527),n(592),n(315),n(293),n(231),n(585),n(391),n(480),n(517),n(509),n(473),n(361),n(635),n(411),n(472),n(636),n(501),n(296),n(674),n(442),n(463),n(441),n(425),n(539),n(239),n(516),n(360),n(496),n(629),n(340),n(465),n(645),n(437),n(690),n(262),n(334),n(546),n(394),n(653),n(309),n(389),n(454),n(288),n(390),n(240),n(359),n(362),n(365),n(680),n(599),n(553),n(478),n(319),n(684),n(697),n(244),n(295),n(682),n(582),n(527),n(315),n(293),n(231),n(396),n(635),n(629),n(437),n(389);n(599),n(680);n(481),n(303),n(633),n(623),n(330),n(385),n(333),n(413),n(643),n(299),n(373),n(350),n(387),n(456),n(616),n(677),n(469),n(664),n(458),n(331),n(525),n(284),n(603),n(351),n(282),n(492),n(252),n(398),n(576),n(311),n(565),n(687),n(357),n(381),n(490),n(309),n(582),n(574),n(262),n(691),n(380),n(507),n(625),n(488),n(528),n(640),n(244),n(493),n(526),n(493),n(572),n(683),n(692);const b={h264:7,h265:12,mpeg4:99};n(683),n(464);const _={AAC:10,ALAW:7,MULAW:8,MP3:2,OPUS:13,G711A:7,G711U:8};n(639),n(325),n(639),n(418);const E={sps:7,pps:8,iFrame:5,kUnspecified:0,kSliceNonIDR:1,kSliceDPA:2,kSliceDPB:3,kSliceDPC:4,kSliceIDR:5,kSliceSEI:6,kSliceSPS:7,kSlicePPS:8,kSliceAUD:9,kEndOfSequence:10,kEndOfStream:11,kFiller:12,kSPSExt:13,kReserved0:14};n(448),n(673),n(506),n(593),n(659),n(485),n(531),n(294),n(655),n(477),n(610),n(676),n(316),n(247),n(640),n(500),Math[n(626)](40),n(341),n(668),n(702),n(514),n(658),n(265),n(637),n(561),n(668),n(462),n(321),n(588),n(708),n(393),n(462),n(321),n(588),n(467),n(583),n(267),n(484),n(606),n(533),n(476),n(667),n(675),n(318),n(363),n(400);n(494),n(417),n(483),n(424);n(563),n(408),n(312),n(245),n(307),n(348),n(305),n(605),n(421),n(578);const k={h264:n(378),h265:n(376),av1:n(502)};function S(){const e=["videoInfoError","webrtcCompleted","webrtcIceCandidateError","download","g711a","buffering","zooming","初始化音频解码器失败","Webrtc","simple","closed","playbackPauseOrResume","av1","webrtc-disconnected","talkStreamStart","playbackForwardMaxRateDecodeIFrame","webgl2","mseWaitVideoCanplayTimeout","multiMouseover","recordEnd","aliyunRtc","streamAbps","object","clickInitPlayer","five-min","webm","playVodSeekEnd","recordCreateError","streamMessage","video自动渲染失败","loadeddata","#343434","wcsDecodeError","created","Wasm","mediaSourceBufferedIsZeroError","base64","delayTimeoutRetryEnd","mp4Error","active","webrtc-closed","key","sourcebuffer-created","apertureNear","操作盘","audioInfo","netBuf","decoder-pro-hard.js","初始化解码worker超时","playVodTime","flv-script-data","isWebrtc","isWebrtcForOthers","controlSize","NotAllowedError","playVod","aiFaceDetectorInfo","loadingTimeoutRetryEnd","multiFullscreen","人脸识别激活","流异常","canplaythrough","videoRenderSupportScale","talkStreamInactive","updateConfig","videoSyncAudio","init","seeked","clearBuffer","streamStats","talk","tenMin","multiSelected","image/jpeg","操作盘激活","audioChannelError","pressureObserverCpu","HLS","webTransport","Unsupported configuration","Unsupported audio format","togglePerformancePanel","blob","MEDIA_ERR_SRC_NOT_SUPPORTED","loadingTimeout","vertical","wcsWidthOrHeightChange","wasm解码失败","loadedmetadata","streamError","MediaSource解码使用canvas渲染失败","ttfb","delayTimeout","rightDown","audioPayload","performance","destroy","video","left","networkDelay","audioDecode","close","webFullscreen","webgpu","downloadMemoryLog","websocket","loadstart","objectDetectActive","硬解码不支持G711a/u音频格式","talkStreamError","resetVideoDecode","checkFirstIFrame","initVideoCodec","simdH264DecodeVideoWidthIsTooLarge","videoCode","timeupdate","apertureFar","A key frame is required after configure() or flush()","rtp","网络超时重播失败",'video/mp4;codecs="hev1.1.6.L120.90"',"不支持硬解码H265","playVodVideoSeekedByMse","imageDetectActive","connecting","subtitle-playlist","mseSourceBufferFull","networkState","mp3","wasmError","遮挡物检查","readystatechange","初始化worker失败","websocketOpenTimeout","initVideo","notSupportNewWasm","ceil","22026WhirNZ","sei","crashLog","worker","script","decoder-pro-hard-not-wasm.js","fetchErrorWorker","物品识别激活","playToRenderTimes","playbackTimestamp","oneHour","default","AAC","open","metadata","Cannot call 'decode' on a closed codec","webcodecsAudioNoDataTimeout","525iWvncM","visibilityChange","canvas","videoInfo","log","buffereos","offline","fetchSuccess","local-candidate","playFailedAndPaused","音频通道错误",'video/mp4; codecs="avc1.64002A"',"HEVC decoding is not supported","isWebrtcForZLM","30min","offscreen","receiver","fetchStream","Invalid NAL unit size","m7s","mseWorkerAddSourceBufferError","multiMousemove","videoSequenceHeader","focusNear","fiveMin","播放地址不能为空","3-4","subtitle-segments","mouseDownAndUp","webgl","playbackRateChange","cruiseStart",'video/mp4;codecs="hev1.2.4.L120.90"',"mseSourceBufferError","inView","stalled","talkStreamClose","self","start","H264(AVC)","load","playbackJustTime","mseUpdateVideoTimestamp","videoElementPlayingFailed","请求失败","multiDragenter","websocketClose","fullscreenError","MPEG4","wcs","fmp4","webgl 上下文丢失","性能面板","timeUpdate","streamVbps","multiIndex","jbprovm","closeEnd","half-hour","progress","isMpeg4","multiDragstart","isDropping","pauseAndNextPlayUseLastFrameShow","right-up","remote-inbound-rtp","mute","电子放大","mseSourceOpen","fetch","FSimd","websocketError","362763Trvidb","fullScreenByStart","playVodSeek","webrtcOnIceConnectionStateChange","初始化解码器失败","memory access out of bounds","streamEndInner","error","sourceended","decoder-pro-audio.js","ended","aacSequenceHeader","talkGetUserMediaSuccess","FLV待解封装buffer过大","stream","webglAlignmentError","video decoder initialization failed","remove-buffer","red","nakedFlow","decoder-pro-old.js","none","streamQualityChange","visibilityHiddenTimeout","Decoder error","networkDelayTimeout","normal","播放超时重播失败","10min","load-retry","stop","playVodTimeCache","webrtc","8DjEWLn","webrtcDisconnect","等待音频数据超时","loading","playVodPause","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C(wasm%E5%86%85%E9%83%A8%E4%BC%9A%E6%9A%82%E5%81%9C%E8%A7%A3%E7%A0%81)%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","tcp","decoderWorkerInit","multiDblSelected","faceDetectActive","遮挡物检查激活","paused","webrtcError","playerAudio","wasmDecodeError","ulaw","defaultStreamQuality","complete","flvMetaData","sei-in-time","Simd","mseSourceClose","20251201","pause","delta","kBps","playbackPreRateChange","videoWaiting","isHls","mediaSourceH265NotSupport","1091871rWDBgT","mseSourceStartStreaming","dynamicWatermarkConfig","fetchError","audioCode","waiting","isAliyunRtc","startstreaming","Webgl 渲染失败","streamEnd","timeout","flvDemuxBufferSizeTooLarge","sourceopen","mov","talkGetUserMediaFail","play",'video/mp4;codecs="hev1.3.E.L120.90"',"codec","cruiseStop","talkFailedAndStop","resetDecode","down","flvScriptData","player","iframeIntervalTs","MULAW(g711u)","playbackPause","alaw","1-1","加载超时重播失败","webcodecsH265NotSupport","mediaSourceTsIsMaxDiff","jessibuca-pro-mp4-recorder-decoder.js","webcodecsUnsupportedConfigurationError","aiObjectDetectorInfo","isM7sCrypto","debug","3-1","data-channel","switch-url-failed","focus","halfHour","warn","#FFCC00","hls-level-loaded","csrc","336469PQjTan","134836SGVsuU","canplay","性能面板激活","mediaSourceAudioInitTimeout","simdDecodeError","memoryLog","playbackPrecision","9170730lErgiz","jbprov","683788IxhjaN","videoElementPlayingFailedForWebrtc","保存日志","currentPts","ptz","recordCancel","videoSmooth","fogOpen","audioAACSequenceHeader","volume","metadata-parsed","flv","The user aborted a request","message","mpeg4","playVodCanplay","resize","mediaSourceAudioG711NotSupport","JessibucaPro","停止录制","hevc","destroyEnd","avc","webrtcClosed","aliyunRtcError","decoderWorkerWasmError","white","MEDIA_ERR_DECODE","fetchClose","webcodecsDecodeError","removeLoadingBgImage","mediaSourceAudioNoDataTimeout","playing","audioResumeState","webrtcOnConnectionStateChange","recordingTimestamp","M7S","left-down","aiOcclusionDetectResult","40gDAYRT","stats","suspend","wasmWidthOrHeightChange","occlusionDetectActive","fogClose","webrtcFailed","mp4","flvBufferData","decode","#000","websocketStringMsg","beforeDestroy","image/webp","playbackStreamVideoFps","click","playbackSeek","AbortError","webcodecsAudioInitTimeout","videoDecode","stream-parsed","media-source","g711u","ALAW","isMulti","streamRate","ratechange","解码失败","global","opus","playVodRateChange","wasm","videoFrame","durationchange","流异常结束","playback","playbackTF","MEDIA_ERR_NETWORK","inbound-rtp","streamDts","buffer","mseFirstRenderTime","websocketOpen","seeking","drawingRectInfo","udp","playVodPauseOrResume","playbackShowPrecisionChange","play() failed because the user didn't interact with the document first","multiMouseup","ws1006","watermarkConfig","fullscreen$2","webcodecs","empty","initAudioCodec","playbackTime","switch-url-success","no-audio-track","videoSEI","isWebrtcForSRS","mediaSourceDecoderConfigurationError","container","mediaSourceAppendBufferError","streamSuccess","online","mseDecodeError","right","playbackEnd","H265(HEVC)","blur","decoder-pro-audio-player.js","rightUp","load-start","mseAddSourceBufferError","aiImageDetectResult","multiDragleave","playbackStats","recordBlob","mseSourceBufferBusy","track","focusFar",'video/mp4; codecs="hev1.1.6.L123.b0"',"talkGetUserMediaTimeout","playVodWaiting","recordStart","playIsNotPauseOrUrlIsNull","playAudio","pcm","zoomNarrow","hls","initAudio","emptied","playVodMp4Error","audio packet"];return(S=function(){return e})()}n(607),n(642),n(569),n(261),n(656),n(368),n(412),n(273),n(388),n(281),n(586);const A={sequenceHeader:0,nalu:1},C={keyFrame:1,interFrame:2};n(449),n(608),n(276),n(440);n(251),n(430),n(640),n(591),n(244),n(369);n(631);n(608),n(276),n(342),n(631),n(529),n(521),n(343),n(405),n(548),n(278),n(562),n(508),n(444),n(665),n(705),n(689),n(471),n(337),n(328),n(670),n(457),n(587),n(283),n(342),n(234),n(466),n(671),n(344),n(540),n(366),n(581),n(266),n(468),n(628),n(289),n(453),n(254),n(649),n(532),n(339),n(452),n(615),n(415),n(244),n(614),n(495),n(244),n(287),n(432),n(383),n(573),n(253),n(489),n(570),n(443),n(544),n(242),n(317),n(345),n(338),n(433),n(652),n(660),n(230),n(475),n(416),n(445),n(461),n(522),n(579),n(285),n(327),n(618),n(424),n(503),n(530),n(523),n(273),n(388),"object"==typeof window&&window.window===window?window:typeof self===n(512)&&self[n(681)]===self?self:"object"==typeof global&&global[n(423)]===global&&global,n(551),n(287),n(428),n(487),n(247),n(520),n(578),n(596),n(293),n(315),n(703),n(421),n(557),n(438),n(679),n(397),n(605),n(305),n(621),n(244),n(375),n(534),n(564),n(232),n(696),n(349),n(549),n(634),n(620),n(280),n(358);const T={wasm:n(524),simd:n(290),fSimd:n(235)};n(275);var P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var D=Object.freeze({__proto__:null,commonjsGlobal:P,commonjsRequire:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},unwrapExports:function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e},createCommonjsModule:function(e,r){return e(r={exports:{}},r.exports),r.exports},getCjsExportFromNamespace:function(e){return e&&e.default||e}}),I=$;function F(){var e=["423270QkabOJ","mozFullScreenEnabled","change","object","MSFullscreenChange","catch","document","33PKsNbe","msExitFullscreen","createCommonjsModule","2bbZLwW","request","mozRequestFullScreen","webkitfullscreenchange","screenfull","exports","mozCancelFullScreen","996468tcyDLE","fullscreenEnabled","isEnabled","135mBLMaG","isFullscreen","length","webkitCurrentFullScreenElement","mozFullScreenElement","requestFullscreen","webkitRequestFullScreen","fullscreenElement","1217136OzDTEj","2345688vEFQck","webkitExitFullscreen","removeEventListener","webkitFullscreenElement","21456negGsF","error","fullscreenerror","undefined","off","webkitFullscreenEnabled","6CkeHoE","msFullscreenElement","bind","exitFullscreen","798651gqLFCS","addEventListener","exit","fullscreenchange","webkitRequestFullscreen","267239aDolao","webkitfullscreenerror","webkitCancelFullScreen","then","msFullscreenEnabled"];return(F=function(){return e})()}function $(e,r){var t=F();return($=function(e,r){return t[e-=261]})(e,r)}function M(){const e=["readUEG","destroy","set","_current_word_bits_left","_total_bytes","_fillCurrentWord","1008100OzDIJw","ExpGolomb: _fillCurrentWord() but no bytes available","ExpGolomb: readBits() bits exceeded max 32bits!","720035DKmhfb","min","848erPTgY","_buffer","byteLength","error","2JqGXME","98323WPjCdn","buffer","subarray","1520358GYKjXX","_current_word","readBool","readByte","_buffer_index","readBits","43695NuHTHc","readSEG","2044539HEUNvG","31620ZxDcyg","_skipLeadingZero","_total_bits"];return(M=function(){return e})()}!function(e,r){for(var t=$,n=e();;)try{if(175513===-parseInt(t(292))/1*(-parseInt(t(307))/2)+-parseInt(t(261))/3+parseInt(t(277))/4*(parseInt(t(264))/5)+-parseInt(t(283))/6*(-parseInt(t(287))/7)+-parseInt(t(272))/8+parseInt(t(273))/9+parseInt(t(297))/10*(-parseInt(t(304))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(F),D[I(306)]((function(e){var r,t,n,o,a,i;r=$,t="undefined"!=typeof window&&typeof window[r(303)]!==r(280)?window[r(303)]:{},n="undefined"!==r(300)&&e[r(312)],o=function(){for(var e,n=r,o=[["requestFullscreen",n(286),"fullscreenElement",n(262),n(290),n(279)],[n(291),n(274),n(276),n(282),"webkitfullscreenchange",n(293)],[n(270),n(294),n(267),"webkitCancelFullScreen",n(310),n(293)],[n(309),n(313),n(268),n(298),"mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen",n(305),n(284),n(296),n(301),"MSFullscreenError"]],a=0,i=o[n(266)],s={};a32&&console[r(263)](r(257)),e<=this[r(283)]){let t=this[r(269)]>>>32-e;return this[r(269)]<<=e,this[r(283)]-=e,t}let t=this[r(283)]?this._current_word:0;t>>>=32-this[r(283)];let n=e-this[r(283)];this._fillCurrentWord();let o=Math.min(n,this._current_word_bits_left),a=this._current_word>>>32-o;return this[r(269)]<<=o,this._current_word_bits_left-=o,t=t<>>r))return this[e(269)]<<=r,this._current_word_bits_left-=r,r;return this[e(254)](),r+this._skipLeadingZero()}[R(280)](){const e=R;let r=this._skipLeadingZero();return this[e(273)](r+1)-1}[R(275)](){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}const W=U;function U(e,r){const t=L();return(U=function(e,r){return t[e-=239]})(e,r)}!function(e,r){const t=U,n=e();for(;;)try{if(336988===-parseInt(t(257))/1+-parseInt(t(291))/2*(parseInt(t(253))/3)+-parseInt(t(285))/4+parseInt(t(249))/5*(-parseInt(t(286))/6)+parseInt(t(292))/7*(parseInt(t(304))/8)+-parseInt(t(265))/9*(parseInt(t(243))/10)+parseInt(t(244))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(L);const x=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1];function j(e){const r=U;return e[0]>>4===_.AAC&&e[1]===A[r(276)]}function L(){const e=["104HjZTzn","log","bufoff","readByte","length","other_data_present","indexOf","Flv: AAC invalid sampling frequency index!","sampling_frequency","ext_object_type","channel: ","set","bufpos","getIncompleteData","firefox","toLowerCase","457860IoxrjJ","19491659fKvlMD","data_","Invalid sampling index: ","push","slice","10PhhtNy","chan_config","error","sbr","3AQFzDK","aacEncoderConfigurationRecord","subarray","findNextSyncwordOffset","367061UZdmJb","has_last_incomplete_data","aac","more than 2 numSubFrames Not Supported","getLATMValue","sampling_freq_index","readNextAACFrame","warn","108TzgnMw","buflen","unshift","Could not found ADTS syncword until payload end","audio_object_type","sample_rate","look","object_type",". Only frameLengthType = 0 Supported","channels","eof_flag_","sequenceHeader","byteLength","data","navigator","mp4a.40.","frameLengthType = ","userAgent","sampleRate: ","read_golomb","2518644qFSRSA","485022kLxgWI","channel_config","sampling_index","mp4a.40.2","destroy","454760xBTEWg","269353fKaBWu","iserro","allStreamsSameTimeFraming zero is Not Supported","audioMuxVersionA is Not Supported","read","more than 2 numProgram Not Supported","readBool","hasIncompleteData","Flv: AAC invalid channel configuration","more than 2 numLayer Not Supported","current_syncword_offset_","readBits"];return(L=function(){return e})()}W(296),W(271),W(284);W(256),W(263),W(299),W(240);W(256),W(261),W(299),W(240);function z(e,r){const t=N();return(z=function(e,r){return t[e-=198]})(e,r)}function N(){const e=["452DOdCEO","set","3176688mHqgoF","push","50JGHqeA","31615xXkNXA","566675ApBKRD","1386209JjYomZ","892143pjckMR","3uttLgM","subarray","shift","toString","354wQXnZo","setUint32","length","66290CQRysK","148838FUERaz"];return(N=function(){return e})()}!function(e,r){const t=z,n=e();for(;;)try{if(498253===-parseInt(t(205))/1+parseInt(t(198))/2*(-parseInt(t(208))/3)+-parseInt(t(199))/4*(-parseInt(t(204))/5)+parseInt(t(212))/6*(parseInt(t(215))/7)+parseInt(t(201))/8+parseInt(t(207))/9+parseInt(t(203))/10*(-parseInt(t(206))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(N);const V=K;function H(){const e=K;return(new Date)[e(364)]()}!function(e,r){const t=K,n=e();for(;;)try{if(448391===parseInt(t(445))/1*(parseInt(t(226))/2)+-parseInt(t(475))/3*(-parseInt(t(493))/4)+-parseInt(t(268))/5*(parseInt(t(414))/6)+-parseInt(t(494))/7+-parseInt(t(447))/8+parseInt(t(441))/9*(parseInt(t(533))/10)+-parseInt(t(479))/11*(-parseInt(t(543))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Y),(()=>{const e=K;try{if("object"==typeof WebAssembly&&typeof WebAssembly[e(448)]===e(370)){const r=new(WebAssembly[e(310)])(Uint8Array.of(0,97,115,109,1,0,0,0));if(r instanceof WebAssembly[e(310)])return new(WebAssembly[e(484)])(r)instanceof WebAssembly[e(484)]}}catch(e){}})();const G=V(243);V(337),V(223),V(243);const q=G===V(238);V(393);function K(e,r){const t=Y();return(K=function(e,r){return t[e-=209]})(e,r)}function X(e){return e&&typeof e===V(370)}function J(e){const r=V;return e[0]>>4===C[r(421)]&&e[1]===A.sequenceHeader}function Z(e){return!0!==e&&e!==V(355)}function Y(){const e=["log","[object Error]","left","playbackRate","pow","origin","sampleRate","right","backgroundColor","-webkit-text-size-adjust","webkit-3d","transferControlToOffscreen","Worker","port","restore","fullscreenElement","onload","toDataURL","9NHFUPI","subarray","appendChild","numberOfFrames","746evNosK","putImageData","438208ZnnUKM","instantiate","WebGL2RenderingContext","noteOn","webgl","removeChild","-moz-user-select","html","kSliceBLA_W_LP","container","prototype","useWCS","setInt16","craNut","supported","fontSize","destination","pageY","moz-webgl","green","wcsDecodeAudio","gpu","showModalDialog","toString","numberOfChannels","msGetUserMedia","data","hev4","30uZkMJG","min","getFullYear","file","6580354KRswiO","getMonth","substr","opacity","360EE","Instance","element","version","f32-planar","getPropertyValue","charCodeAt","Safari","color","fillStyle","164180DYcxxR","1628165DlwDWM","borderStyle","position","hev3","assign","crossOrigin","ended","type","PressureObserver","illegal icc","drawImage","application/hwepass2001.installepass2001","iFrame","paused","If you want to help, upload a sample of this file to","content","lineWidth","{y}-{m}-{d} {h}:{i}:{s}","scrollLeft","NaN","touchmove","application/vnd.chromium.remoting-viewer","map","setInt8","webm","userAgent","test","substring","call","YB/s","trim","createBufferSource","document","data-","href","safari","toLowerCase","status","rect","3910570hliYdE","setHours","px Arial","VideoEncoder.isConfigSupported is not a function","touches","atob","xxxx","wow64","touchstart","-webkit-tap-highlight-color","12HbHPTZ","setInt32","WAVE","MediaStream","kSliceBLA_N_LP","-webkit-touch-callout","readyState","strokeStyle","pathname","toFixed","imageSmoothingQuality","Firefox","h264","target","canvas","borderWidth","length","setAttribute","localhost","createBuffer","createElement","ALAW","not compiled with thread support, using thread emulation","readAsArrayBuffer","set","event","canConstructInDedicatedWorker","setUint8","clearRect","top","h265",'"development"',"forEach","360","526JritGk","sps","undefined","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","visibility","overflow","MouseEvents","textAlign","string","none","msFullscreenElement","filter",'"delaytime"',"width","createTextNode","copyToChannel","mediaDevices",'"production"',"indexOf","scrollTop","Opera","win64","div","documentElement","text/javascript","mouseup","TB/s","srcElement","kSliceBLA_W_RADL","hev5","random","src","360SE","location","EB/s","validate","push","performance","removeAttribute","getSeconds","getContext","text","4300785TeduTN","solid","webkitGetUserMedia","insertBefore","#000","hev1.1.6.L120.90","line","setUint32","getImageData","[object Exception]","AudioDecoder","stringify","hostname","result","9999999","attachShadow","-ms-user-select","slice","then","createObjectURL","mousemove","application/vnd.apple.mpegurl","floor","angle","[object Number]","application/asx","keys","imageSmoothingEnabled","vps","img","requestVideoFrameCallback","isEnabled","start","setUint16","clientX","0 KB/s","PB/s","quality","download","byteLength","getMinutes","apply","Module","not compiled with thread support","opera","bottom","ManagedMediaSource","now","height","isConfigSupported","error","chrome","click","format","audioWorklet","VideoEncoder is not supported","close","image","round","second","RIFF","URL","max","hash","user-select","0 Bytes","getAttribute","hev","clientY",'"2.1.3"',"isTypeSupported","Chrome","px 宋体","hidden","ZB/s","KB/s","host","VideoFrame","useOffscreen","rgba(0,0,0,0)","high","createImageBitmap","getUserMedia","MB/s","pointer-events: none !important; display: block !important","onerror","demuxUseWorker","true","-webkit-user-select","addModule","touchend","Edge","getElementById","mousedown","application/360softmgrplugin","navigator","getTime","avc1.","AAC","100%","parse","webgl2","function","font","style","message","split","save","[object DOMException]","fillText","contain","endsWith","VideoDecoder","QQBrowser","fromCharCode","zIndex","QHBrowser","wow32","getUint8","revokeObjectURL","object",'video/mp4; codecs="',"protocol","ActiveXObject","fmt ","1738339200000","hasAudio","MediaStreamTrackGenerator","body","MULAW","mimeTypes",";base64","copyright","absolute","Anonymous","dataset","search","useMSE","pageX","video","shadowRoot","MediaSource","objectFit","firefox","experimental-webgl","charAt","6IAJmpu","createEvent","dispatchEvent","-o-user-select","open","replace","memory","keyFrame","match"];return(Y=function(){return e})()}const Q=ee;function ee(e,r){const t=re();return(ee=function(e,r){return t[e-=251]})(e,r)}function re(){const e=["63375ZCpHWD","3111760TnRlbV","slice","off","9555TEKgSf","length","once","forEach","9rjzBgT","219423opHZzF","push","180192eTiZhn","942MvnkBq","861996RcIPww","3DekvOv","1278272YjMAMf","apply","ctx"];return(re=function(){return e})()}!function(e,r){const t=ee,n=e();for(;;)try{if(144258===parseInt(t(253))/1+parseInt(t(255))/2+-parseInt(t(258))/3*(parseInt(t(257))/4)+-parseInt(t(262))/5+parseInt(t(256))/6*(parseInt(t(266))/7)+parseInt(t(259))/8*(parseInt(t(252))/9)+-parseInt(t(263))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(re);class te{on(e,r,t){const n=ee,o=this.e||(this.e={});return(o[e]||(o[e]=[]))[n(254)]({fn:r,ctx:t}),this}[Q(268)](e,r,t){const n=this;function o(){const a=ee;n[a(265)](e,o);for(var i=arguments[a(267)],s=new Array(i),l=0;l1?n-1:0),a=1;a{delete n[e]})),void delete this.e;const o=n[e],a=[];if(o&&r)for(let e=0,n=o[t(267)];e=2&&!this[t(292)];)if(255==this[t(300)][this.parsedOffset]){if(!(!1&this[t(300)][this[t(298)]+1])){this[t(288)]=this[t(300)][this[t(298)]+1],this[t(315)]=ie[t(307)],this[t(305)]=this.parsedOffset,this[t(298)]+=2,e=!0;break}this[t(298)]++}else this.parsedOffset++;if(e)continue;break}if(this[t(315)]==ie[t(307)]){let e=!1;for(;this[t(300)][t(306)]-this.parsedOffset>=2&&!this[t(292)];)if(255==this[t(300)][this[t(298)]]){if(this[t(300)][this[t(298)]+1]==this[t(288)]){this[t(315)]=ie[t(299)],this[t(304)]=this.parsedOffset,this[t(298)]+=2,e=!0;break}this[t(298)]++}else this.parsedOffset++;if(e)continue;break}if(this[t(315)]==ie[t(299)]){let e=this[t(300)].slice(this.fisrtStartCodeOffset,this[t(304)]);this.emit(t(301),e,r),this[t(300)]=this[t(300)][t(295)](this[t(304)]),this.fisrtStartCodeOffset=0,this[t(298)]=2,this[t(315)]=ie[t(307)]}}}}const le=ce;function de(){const e=["Baseline","toString","10115ekfXjk","High422","Extended","destroy","960785aQhnkV","parseSPS$2","545354KUgXsq","readUEG","byteLength","_ebsp2rbsp","ceil","getProfileString","readByte","avc1.","1679823nAoNCT","readBool","4:2:2","Unknown","726FjgvbE","4:4:4","getChromaFormatString","_skipScalingList","High10","toFixed","3534183pqrWVL","getLevelString","4VRmJxQ","8MqKDkL","length","15312360sCrPMI","483934zqPbRn","High444","readBits","parseSPS","readSEG","subarray"];return(de=function(){return e})()}!function(e,r){const t=ce,n=e();for(;;)try{if(499957===parseInt(t(139))/1+-parseInt(t(125))/2+parseInt(t(147))/3*(-parseInt(t(121))/4)+-parseInt(t(133))/5*(parseInt(t(151))/6)+parseInt(t(137))/7*(-parseInt(t(122))/8)+-parseInt(t(157))/9+parseInt(t(124))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(de);class ue{static[le(142)](e){let r=e,t=r[le(141)],n=new Uint8Array(t),o=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(n[o]=r[e],o++);return new Uint8Array(n.buffer,0,o)}static[le(128)](e){const r=le;let t=ue._ebsp2rbsp(e),n=new O(t);n[r(145)]();let o=n[r(145)]();n[r(145)]();let a=n[r(145)]();n[r(140)]();let i=ue[r(144)](o),s=ue[r(158)](a),l=1,d=420,u=[0,420,422,444],c=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(l=n[r(140)](),3===l&&n[r(127)](1),l<=3&&(d=u[l]),c=n[r(140)]()+8,n[r(140)](),n.readBits(1),n[r(148)]())){let e=3!==l?8:12;for(let t=0;t0&&e<16?(_=t[e-1],E=o[e-1]):255===e&&(_=n.readByte()<<8|n[r(145)](),E=n[r(145)]()<<8|n[r(145)]())}if(n.readBool()&&n[r(148)](),n.readBool()&&(n[r(127)](4),n[r(148)]()&&n.readBits(24)),n.readBool()&&(n[r(140)](),n[r(140)]()),n[r(148)]()){let e=n[r(127)](32),t=n[r(127)](32);S=n.readBool(),A=t,C=2*e,k=A/C}}let T=1;(1!==_||1!==E)&&(T=_/E);let P=0,D=0;if(0===l)P=1,D=2-g;else{P=3===l?1:2,D=(1===l?2:1)*(2-g)}let I=16*(p+1),F=16*(m+1)*(2-g);I-=(v+y)*P,F-=(w+b)*D;let $=Math[r(143)](I*T);return n[r(136)](),n=null,{profile_string:i,level_string:s,bit_depth:c,ref_frames:h,chroma_format:d,chroma_format_string:ue[r(153)](d),frame_rate:{fixed:S,fps:k,fps_den:C,fps_num:A},sar_ratio:{width:_,height:E},codec_size:{width:I,height:F},present_size:{width:$,height:F}}}static[le(138)](e){const r=le;let t=e[r(130)](1,4),n=r(146);for(let e=0;e<3;e++){let o=t[e][r(132)](16);o[r(123)]<2&&(o="0"+o),n+=o}let o=ue[r(142)](e),a=new O(o);a[r(145)]();let i=a.readByte();a[r(145)]();let s=a.readByte();a[r(140)]();let l=ue[r(144)](i),d=ue[r(158)](s),u=1,c=420,f=[0,420,422,444],h=8,p=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(u=a[r(140)](),3===u&&a[r(127)](1),u<=3&&(c=f[u]),h=a.readUEG()+8,p=a.readUEG()+8,a[r(127)](1),a[r(148)]())){let e=3!==u?8:12;for(let t=0;t0&&e<16?(S=t[e-1],A=n[e-1]):255===e&&(S=a[r(145)]()<<8|a[r(145)](),A=a[r(145)]()<<8|a[r(145)]())}if(a.readBool()&&a[r(148)](),a.readBool()&&(a.readBits(4),a.readBool()&&a[r(127)](24)),a.readBool()&&(a[r(140)](),a[r(140)]()),a.readBool()){let e=a.readBits(32),t=a.readBits(32);T=a[r(148)](),P=t,D=2*e,C=P/D}}let I=1;(1!==S||1!==A)&&(I=S/A);let F=0,$=0;if(0===u)F=1,$=2-w;else{F=3===u?1:2,$=(1===u?2:1)*(2-w)}let M=16*(v+1),R=16*(y+1)*(2-w);M-=(b+_)*F,R-=(E+k)*$;let B=Math[r(143)](M*I);return a.destroy(),a=null,{codec_mimetype:n,profile_idc:i,level_idc:s,profile_string:l,level_string:d,chroma_format_idc:u,bit_depth:h,bit_depth_luma:h,bit_depth_chroma:p,ref_frames:g,chroma_format:c,chroma_format_string:ue.getChromaFormatString(c),frame_rate:{fixed:T,fps:C,fps_den:D,fps_num:P},sar_ratio:{width:S,height:A},codec_size:{width:M,height:R},present_size:{width:B,height:R}}}static[le(154)](e,r){let t=8,n=8,o=0;for(let a=0;a=this[r(213)])return this[r(209)]=!0,0;this[r(209)]=!1,n=this[r(210)]+e>8?8-this[r(210)]:e,t<<=n,t+=this[r(206)][this[r(215)]]>>8-this[r(210)]-n&255>>8-n,this[r(210)]+=n,e-=n,8==this[r(210)]&&(this[r(215)]++,this[r(210)]=0)}return t}[fe(204)](e){const r=fe;let t=this.bufpos,n=this.bufoff,o=this[r(199)](e);return this.bufpos=t,this[r(210)]=n,o}[fe(198)](){const e=fe;let r;for(r=0;0===this[e(199)](1)&&!this[e(209)];r++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),o=new Uint8Array(e+4);o[r(382)](n,0),o[r(382)](t[r(365)],4),t.sps=o}if(t[r(321)]){const e=t[r(321)][r(381)],n=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),o=new Uint8Array(e+4);o[r(382)](n,0),o.set(t[r(321)],4),t[r(321)]=o}return t}function Ee(e,r){const t=be();return(Ee=function(e,r){return t[e-=304]})(e,r)}!function(e,r){const t=Ee,n=e();for(;;)try{if(252697===-parseInt(t(316))/1*(parseInt(t(320))/2)+-parseInt(t(350))/3+parseInt(t(342))/4*(parseInt(t(314))/5)+parseInt(t(377))/6*(-parseInt(t(383))/7)+parseInt(t(344))/8*(parseInt(t(379))/9)+-parseInt(t(333))/10+parseInt(t(339))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(be);we(317);function ke(e,r){const t=Ae();return(ke=function(e,r){return t[e-=401]})(e,r)}const Se=ke;function Ae(){const e=["1732088hkHSYY","101243oFGCsF","14XKjuCs","GetUE","m_len","2590992WlGGUR","m_zeros","m_bits","m_idx","m_byte","415452GOSsMJ","10ZeSCoM","GetSE","12NRtzlC","length","2877543DQGaqs","GetWord","578665XbKjBS","12fbyoxi","9126403MtblWV","GetBYTE","10JLQpZJ","GetBit","m_data"];return(Ae=function(){return e})()}!function(e,r){const t=ke,n=e();for(;;)try{if(489651===parseInt(t(401))/1*(parseInt(t(411))/2)+parseInt(t(405))/3+-parseInt(t(418))/4*(-parseInt(t(417))/5)+parseInt(t(410))/6*(parseInt(t(402))/7)+-parseInt(t(424))/8+parseInt(t(415))/9*(-parseInt(t(421))/10)+-parseInt(t(419))/11*(parseInt(t(413))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ae);class Ce{constructor(e){const r=ke;this[r(408)]=null,this[r(423)]=e,this[r(404)]=e[r(414)],this[r(408)]=0,this.m_bits=0,this[r(409)]=0,this[r(406)]=0}[Se(420)](){const e=Se;if(this.m_idx>=this[e(404)])return 0;let r=this[e(423)][this.m_idx++];return 0==r?(this[e(406)]++,this.m_idx>this[e(407)]&1}[Se(416)](e){const r=Se;let t=0;for(;e>0;)t<<=1,t|=this[r(422)](),e--;return t}GetUE(){const e=Se;let r=0;for(;this.m_idx>1;return!(1&e)&&(r=-r),r}}const Te=Pe;function Pe(e,r){const t=Ie();return(Pe=function(e,r){return t[e-=399]})(e,r)}!function(e,r){const t=Pe,n=e();for(;;)try{if(955241===-parseInt(t(406))/1+parseInt(t(414))/2*(-parseInt(t(413))/3)+parseInt(t(401))/4+parseInt(t(402))/5*(-parseInt(t(416))/6)+parseInt(t(415))/7+-parseInt(t(407))/8+parseInt(t(405))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ie);class De{static[Te(408)](e){const r=Te;let t=e,n=t[r(417)],o=new Uint8Array(n),a=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(o[a]=t[e],a++);return new Uint8Array(o[r(411)],0,a)}static[Te(400)](e){const r=Te;let t=De[r(408)](e);const n=new Ce(t);let o="",a="",i="",s="";n.GetWord(4);let l=n[r(399)](3);if(l>6)return console[r(409)](r(412)),!1;n[r(399)](1),n.GetWord(2),n[r(399)](1),o=n[r(399)](5),n[r(399)](32),n[r(399)](1),n.GetWord(1),n[r(399)](1),n[r(399)](1),n.GetWord(44),a=n[r(399)](8);let d=[],u=[];for(let e=0;e0)for(let e=l;e<8;e++)n[r(399)](2);for(let e=0;e15)return console[r(409)]("SPSParser sps_seq_parameter_set_id > 15",c),!1;let f=n.GetUE();return f>3?(console[r(409)](r(403),f),!1):(3==f&&n[r(399)](1),i=n[r(404)](),s=n[r(404)](),n[r(399)](1)&&(n.GetUE(),n[r(404)](),n.GetUE(),n.GetUE()),n.GetUE()!=n[r(404)]()?(console.warn(r(410)),!1):{profile_string:o,level_string:a,bit_depth:"",ref_frames:"",chroma_format:"",chroma_format_string:"",frame_rate:{fixed:"",fps:"",fps_den:"",fps_num:""},sar_ratio:{width:"",height:""},codec_size:{width:i,height:s},present_size:{width:"",height:s}})}}function Ie(){const e=["9629080lWIMNc","_ebsp2rbsp","warn","SPSParser bit_depth_luma_minus8 != bit_depth_chroma_minus8","buffer","SPSParser sps_max_sub_layers_minus1 > 6","14487HADUXo","46aIsWRZ","5180385GhYxJh","29928VwWRgl","byteLength","GetWord","parseSPS","2528480OYUyew","520EvSWDc","SPSParser chroma_format_idc > 3","GetUE","28957635kHkoiA","1800995dLngQF"];return(Ie=function(){return e})()}function Fe(e,r){const t=$e();return(Fe=function(e,r){return t[e-=136]})(e,r)}function $e(){const e=["Unknown","readBits","6010716aAotaj","64338WwdEEx","readSEG","toFixed","byteLength","6025068cTKaNm","4:2:0","readUEG","readBool","push","465774TyTghh","179229AwJNjp","4OnRJiQ","buffer","readByte","343tPKJvB","6719455SbDnLB","10HdGUvT",".B0","3813864LZcxuI","33oOacRO","hvc1.","4:0:0","min","4:2:2","2inqkUl"];return($e=function(){return e})()}!function(e,r){const t=Fe,n=e();for(;;)try{if(868001===parseInt(t(161))/1+parseInt(t(148))/2*(-parseInt(t(162))/3)+parseInt(t(163))/4*(parseInt(t(139))/5)+parseInt(t(152))/6*(-parseInt(t(138))/7)+parseInt(t(142))/8+-parseInt(t(156))/9*(-parseInt(t(140))/10)+-parseInt(t(143))/11*(parseInt(t(151))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}($e);const Me=Be;function Re(){const e=["4:0:0","getChromaFormatString","hvc1.","Rext","4:2:0","SCC","4:4:4","1345910IoRbqQ","3185109FjASlm","readByte","destroy","11LiigAi","86vtuKlC","14052xezxCK","12GmVSqq","readSEG","readBool","parseSPS","buffer","_ebsp2rbsp","1412065gItcqL","readBits","getLevelString",".B0","MainSP","4:2:2","readUEG","Main","803739UvqLXA",".1.L","156XHCfnL","160428oeBYwg","toFixed","8CSYzOg","getProfileString","401596XZZznK","35aAmaWL","Unknown","byteLength"];return(Re=function(){return e})()}function Be(e,r){const t=Re();return(Be=function(e,r){return t[e-=421]})(e,r)}!function(e,r){const t=Be,n=e();for(;;)try{if(778866===parseInt(t(457))/1+-parseInt(t(441))/2*(parseInt(t(442))/3)+-parseInt(t(443))/4*(parseInt(t(449))/5)+-parseInt(t(421))/6*(-parseInt(t(426))/7)+-parseInt(t(423))/8*(-parseInt(t(437))/9)+-parseInt(t(436))/10*(-parseInt(t(440))/11)+parseInt(t(459))/12*(parseInt(t(425))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Re);class Oe{static _ebsp2rbsp(e){const r=Be;let t=e,n=t[r(428)],o=new Uint8Array(n),a=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(o[a]=t[e],a++);return new Uint8Array(o[r(447)],0,a)}static parseVPS(e){const r=Be;let t=Oe._ebsp2rbsp(e),n=new O(t);return n[r(438)](),n[r(438)](),n.readBits(4),n[r(450)](2),n[r(450)](6),{num_temporal_layers:n.readBits(3)+1,temporal_id_nested:n[r(445)]()}}static[Me(446)](e){const r=Me;let t=Oe[r(448)](e),n=new O(t);n[r(438)](),n[r(438)]();let o=0,a=0,i=0,s=0;n[r(450)](4);let l=n[r(450)](3);n.readBool();let d=n[r(450)](2),u=n[r(445)](),c=n[r(450)](5),f=n.readByte(),h=n[r(438)](),p=n.readByte(),m=n[r(438)](),g=n.readByte(),v=n[r(438)](),y=n[r(438)](),w=n[r(438)](),b=n[r(438)](),_=n.readByte(),E=n[r(438)](),k=[],S=[];for(let e=0;e0)for(let e=l;e<8;e++)n[r(450)](2);for(let e=0;e1&&n[r(444)]();for(let e=0;e0&&e<=16?(B=t[e-1],W=o[e-1]):255===e&&(B=n.readBits(16),W=n[r(450)](16))}if(n[r(445)]()&&n[r(445)](),n.readBool()){n[r(450)](3),n[r(445)](),n[r(445)]()&&(n.readByte(),n[r(438)](),n[r(438)]())}if(n[r(445)]()&&(n[r(455)](),n[r(455)]()),n[r(445)](),n[r(445)](),n[r(445)](),M=n[r(445)](),M&&(n[r(455)](),n[r(455)](),n[r(455)](),n[r(455)]()),n[r(445)]()){if(x=n[r(450)](32),j=n.readBits(32),n.readBool()&&n[r(455)](),n.readBool()){let e=!1,t=!1,o=!1;e=n[r(445)](),t=n[r(445)](),(e||t)&&(o=n[r(445)](),o&&(n[r(438)](),n[r(450)](5),n[r(445)](),n[r(450)](5)),n[r(450)](4),n[r(450)](4),o&&n[r(450)](4),n[r(450)](5),n[r(450)](5),n[r(450)](5));for(let a=0;a<=l;a++){let a=n[r(445)]();U=a;let i=!0,s=1;!a&&(i=n[r(445)]());let l=!1;if(i?n[r(455)]():l=n.readBool(),!l&&(s=n[r(455)]()+1),e){for(let e=0;e0)for(let r=t;r<8;r++)e[n(441)](2);o[n(456)]=[],o[n(506)]=[],o[n(496)]=[],o[n(474)]=[],o[n(426)]=[],o[n(467)]=[],o[n(481)]=[],o.sub_layer_frame_only_constraint_flag=[],o.sub_layer_level_idc=[];for(let r=0;r ","541932qBPBQK","decodeVideo, decoder is destroyed and return","dispatch","\n and replay","10fEOHnH","player"," create uint8Array error :","iframeIntervalTimestamp"," and packetType is ","codecWidth","worker","TAG_NAME","decodeVideo and payload is video sequence header so drop this frame","simdDecodeError","ModuleVideo","clear","setCodec","HEAPU32","videoWidth","video wasm error:","ModuleAudio","MP3","h265","videoCode","audioDecoder","yuvData, isVideoFirstIFrame is false and return","audioInfo","tempAudioBuffer","pcmData","codecHeight","pcmData ts ","decodeVideo and payload is too small , payload length is ","5ZHCpYe","videoHeight","HEAPF32",", old height is ","3028120lEsKce","setCodecAudio: init audio codec, codeId is ","length"," _opt.sampleRate is ","width: ","audioChannels","delete",", height: ","839898cQrMOx","toString","emit","debugWarn",", height is "," and maxDiff is ","videoCodec","decode","off","simdH264DecodeVideoWidthIsTooLarge","1093252Sjdqwa","isDestroyed","yuvData, decoder is destroyed and return","pcmData, decoder is destroyed and return"];return(ze=function(){return e})()}function Ne(e,r){const t=ze();return(Ne=function(e,r){return t[e-=453]})(e,r)}!function(e,r){const t=Ne,n=e();for(;;)try{if(302354===-parseInt(t(500))/1+parseInt(t(566))/2+parseInt(t(556))/3+-parseInt(t(512))/4*(-parseInt(t(544))/5)+parseInt(t(465))/6*(parseInt(t(491))/7)+parseInt(t(548))/8+parseInt(t(506))/9*(-parseInt(t(516))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ze);class Ve extends te{constructor(e){const r=Ne;let t=arguments[r(550)]>1&&void 0!==arguments[1]?arguments[1]:{};super(),this[r(517)]=e,this[r(487)]=t,this.TAG_NAME=r(457),this[r(504)](),this[r(459)]=t[r(459)]||1024,this[r(488)]=t[r(488)]||44100,this[r(532)]=null,this.ModuleVideo=null,this.videoDecoder=null,this.audioDecoder=null,this[r(509)]=!!Z(e[r(487)].checkFirstIFrame),this.init()}[Le(460)](){const e=Le;if(this[e(564)](),this[e(536)]){try{X(this[e(536)][e(527)])&&this.audioDecoder[e(527)](),X(this[e(536)][e(554)])&&this[e(536)][e(554)]()}catch(e){}this[e(536)]=null}if(this[e(573)]){try{X(this.videoDecoder.clear)&&this[e(573)][e(527)](),X(this[e(573)][e(554)])&&this.videoDecoder[e(554)]()}catch(e){}this[e(573)]=null}this[e(505)]&&(this[e(505)].destroy(),this.mp3Demuxer=null),this[e(504)](),this[e(517)][e(454)](this[e(523)],e(460))}[Le(456)](){}[Le(470)](e){const r=Le;(function(e){const r=V;return!(!e||-1===e[r(244)](r(311))&&-1===e.indexOf(r(503))&&-1===e[r(244)](r(508))&&-1===e[r(244)]("Reserved SBR extensions is not implemented"))})(e)||this[r(517)][r(503)](this[r(523)],"audio wasm error:",e)}[Le(475)](e){const r=Le;(function(e){const r=V;return!(!e||-1===e.indexOf(r(214)))})(e)||(this[r(517)].debugError(this[r(523)],r(531),e),Z(function(e){let r=!0;return e&&-1!==e[V(244)]("failed to asynchronously prepare wasm")&&(r=!1),r}(e))&&this[r(558)](y.notSupportNewWasm,e))}[Le(504)](){const e=Le;this[e(536)]=null,this[e(573)]=null,this[e(459)]=null,this[e(530)]=0,this[e(545)]=0,this[e(553)]=0,this[e(476)]=0,this[e(492)]=!1,this[e(458)]=!1,this[e(505)]=null,this[e(509)]=!1,this[e(479)]=!1,this.isSimdDecodeError=!1,this.lastDecodeVideoFrameTimestamp=0,this[e(507)]=null,this[e(478)]=0,this[e(490)]=0,this[e(519)]=0,this[e(493)]=[],this.tempAudioBuffer=[]}[Le(464)](e,r){const t=Le,n=15&e[0],o=this.player;if(Z(this.videoDecoder&&X(this[t(573)][t(528)])))o.debugError(this[t(523)],"setCodecVideo, videoDecoder is not exist or setCodec is not a function");else if(J(e))if(n===b[t(501)]||n===b[t(534)]){o.debugLog(this[t(523)],t(486)+n);const r=e[t(489)](5);if(n===b[t(501)]&&o[t(487)].useSIMD){const e=_e(r);if(e.codecWidth>m||e[t(541)]>m)return this.emit(y[t(565)],t(552)+e.codecWidth+t(511)+m+", height: "+e[t(541)]+" > "+m),void o.debugWarn(this[t(523)],t(485)+e[t(521)]+t(560)+e[t(541)])}const a=new Uint8Array(e);this.hasInitVideoCodec=!0,this[t(573)][t(528)](n,r,this.getBuildTime()),this[t(558)](y[t(535)],{code:n}),this[t(558)](y[t(562)],{buffer:a,codecId:n})}else o.debugWarn(this[t(523)],"setCodecVideo: hasInitVideoCodec is false, codecId is "+n+" is not H264 or H265");else o[t(559)](this.TAG_NAME,"decodeVideo: hasInitVideoCodec is false, codecId is "+n+t(571)+r+t(520)+e[1])}[Le(474)](e,r){const t=Le,n=e[0]>>4,o=e[0]>>1&1;if(n===_.AAC?this[t(476)]=o?16:8:this.audioDepth=0===o?8:16,Z(this[t(536)]&&X(this[t(536)].setCodec)))return void this.player[t(503)](this.TAG_NAME,t(461));const a=this[t(517)];if(j(e)||n===_[t(483)]||n===_[t(484)]||n===_[t(533)]){this[t(517)][t(454)](this.TAG_NAME,t(549)+n+t(551)+this.sampleRate);const o=n===_.AAC?e[t(489)](2):new Uint8Array(0);if(this.audioDecoder[t(528)](n,this[t(488)],o,this[t(495)]()),n===_[t(482)]&&this[t(558)](y[t(497)],{buffer:o}),this[t(492)]=!0,n!==_[t(482)]&&(n===_.MP3?(!this[t(505)]&&(this[t(505)]=new se(this),this[t(505)].on(t(472),((e,r)=>{this[t(536)].decode(e,r)}))),this[t(505)][t(514)](e[t(489)](1),r)):this[t(536)][t(563)](e[t(489)](1),r)),Z(q)){const e=Number("1")||1;setTimeout((()=>{const e=t;this[e(517)][e(503)](this[e(523)],e(466)),this[e(460)](),this[e(558)](y.workerEnd)}),60*e*60*1e3)}}else a[t(559)](this[t(523)],t(463),n)}[Le(496)](e,r){const t=Le;if(this[t(517)].isDestroyed())return void this[t(517)][t(454)](this[t(523)],t(467));const n=e[0]>>4;if(this[t(492)]){if(j(e))return void this[t(517)][t(454)](this.TAG_NAME,"decodeAudio and has already initialized and payload is aac codec packet so drop this frame");n===_[t(533)]?this.mp3Demuxer[t(514)](e[t(489)](1),r):this[t(536)].decode(n===_[t(482)]?e[t(489)](2):e.slice(1),r)}else this[t(474)](e,r)}decodeVideo(e,r,t){const n=Le;if(n(550),this[n(517)][n(567)]())this[n(517)].debugLog(this[n(523)],n(513));else if(this[n(458)])if(!this[n(509)]&&t&&(this.isVideoFirstIFrame=!0),this.isVideoFirstIFrame){if(t&&J(e)){const r=15&e[0];let t={};if(r===b[n(501)]){t=_e(e[n(489)](5))}else r===b.h265&&(t=function(e){const r=Ue;let t={codecWidth:0,codecHeight:0,videoType:k.h265};t[r(455)]=0,t[r(395)]=0,t[r(470)]=0,t[r(429)]=0,e=e.slice(5);do{let n={};if(e[r(469)]<23){console.warn("parseHEVCDecoderConfigurationRecord$2","arrayBuffer.length "+e[r(469)]+" < 23");break}if(n[r(422)]=e[0],1!=n[r(422)])break;n[r(448)]=e[1]>>6&3,n[r(382)]=e[1]>>5&1,n.general_profile_idc=31&e[1],n[r(404)]=e[2]<<24|e[3]<<16|e[4]<<8|e[5],n[r(477)]=e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[r(477)]=n[r(477)]<<16|e[10]<<8|e[11],n[r(454)]=e[12],n[r(437)]=(15&e[13])<<8|e[14],n[r(465)]=3&e[15],n[r(432)]=3&e[16],n[r(436)]=7&e[17],n[r(502)]=7&e[18],n[r(460)]=e[19]<<8|e[20],n[r(485)]=e[21]>>6&3,n.numTemporalLayers=e[21]>>3&7,n[r(487)]=e[21]>>2&1,n[r(424)]=3&e[21];let o=e[22],a=e[r(461)](23);for(let e=0;e"+t[n(521)]+n(555)+this[n(545)]+"->"+t[n(541)]))}if(this[n(479)])return void this.player[n(559)](this[n(523)],n(575));if(this[n(510)])return void this[n(517)][n(559)](this[n(523)],"decodeVideo: simd decode error, and return");if(J(e))return void this[n(517)].debugLog(this.TAG_NAME,n(524));if(e[n(494)]<12)return void this[n(517)][n(559)](this[n(523)],n(543)+e[n(494)]);this[n(499)]=r;const o=e[n(489)](5);this[n(573)].decode(o,t?1:0,r)}else this[n(517)].debugLog(this.TAG_NAME,n(462));else this[n(464)](e,t)}[Le(481)](e,r,t){const n=Le;this[n(558)](y[n(535)],{code:e}),this.emit(y.initVideo,{w:r,h:t}),this.videoWidth=r,this[n(545)]=t}[Le(538)](e,r,t){const n=Le;this[n(558)](y[n(473)],{code:e}),this.emit(y[n(469)],{sampleRate:r,channels:t,depth:this[n(476)]}),this[n(553)]=t}[Le(498)](e,r){const t=Le;if(this[t(517)][t(567)]())return void this.player[t(454)](this.TAG_NAME,t(568));if(Z(this.isVideoFirstIFrame))return void this[t(517)][t(454)](this[t(523)],t(537));const n=this.videoWidth*this[t(545)]*3/2;try{let o=this[t(526)].HEAPU8[t(508)](e,e+n),a=new Uint8Array(o);this[t(507)]=null,this[t(478)]=r,this[t(558)](y[t(570)],{output:a,ts:r})}catch(e){this.player[t(559)](this[t(523)],t(468)+r+t(518),e,e[t(557)]())}}[Le(540)](e,r,t){const n=Le;if(this[n(517)][n(567)]())return void this[n(517)][n(454)](this[n(523)],n(569));let o=r,a=[],i=0;try{let s=this[n(459)];for(let r=0;r<2;r++){let t=this[n(532)][n(529)][(e>>2)+r]>>2;a[r]=this.ModuleAudio[n(546)][n(508)](t,t+o)}if(this[n(490)]){if(!(o>=(r=s-this[n(490)])))return this[n(490)]+=o,this[n(539)][0]=Float32Array.of(...this[n(539)][0],...a[0]),void(2==this[n(553)]&&(this.tempAudioBuffer[1]=Float32Array.of(...this[n(539)][1],...a[1])));this[n(493)][0]=Float32Array.of(...this[n(539)][0],...a[0][n(508)](0,r)),2==this[n(553)]&&(this.audioOutputArray[1]=Float32Array.of(...this[n(539)][1],...a[1][n(508)](0,r))),this.emit(y[n(453)],{buffer:this[n(493)],ts:t}),i=r,o-=r}for(this[n(490)]=o;this.audioRemain>=s;this.audioRemain-=s)this[n(493)][0]=a[0][n(489)](i,i+=s),2==this.audioChannels&&(this.audioOutputArray[1]=a[1][n(489)](i-s,i)),this[n(558)](y.playAudio,{buffer:this[n(493)],ts:t});this[n(490)]&&(this[n(539)][0]=a[0].slice(i),2==this[n(553)]&&(this[n(539)][1]=a[1][n(489)](i))),a=[]}catch(e){this[n(517)][n(559)](n(522),n(542)+t+n(518),e,e[n(557)]())}}[Le(574)](e){const r=Le;null===this.wasmDecodeErrorStartTime&&(this[r(507)]=H());const t=H(),n=function(e,r,t){const n=K;return Math[n(330)](Math[n(476)](e,Math[n(330)](r,t)),Math[n(476)](r,t))}(this[r(519)]>0?2*this[r(519)]:5e3,1e3,5e3),o=t-this[r(507)];o>n&&(this[r(517)][r(559)](this[r(523)],"errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is "+this[r(519)]+r(502)+o+r(561)+n+r(515)),this[r(510)]=!0,this.emit(y[r(525)]))}getBuildTime(){return h+"-"+p}[Le(455)](){const e=Le;this[e(517)][e(503)](this[e(523)],e(466)),this[e(460)](),this.emit(y.workerEnd)}[Le(471)](){const e=Le;this[e(517)][e(503)](this[e(523)],"validatedFailed, please contact the author to get the correct license")}}const He=Ge;function Ge(e,r){const t=qe();return(Ge=function(e,r){return t[e-=303]})(e,r)}function qe(){const e=["2268960ekrncx","9QeBHMf","8885745dKguGp","TAG_NAME","1736015coujkq","catch","134703DyylQj","init","player","1510863elKcSE","151081gGdWxS","debugError","_handleModuleVideoError","8LNeCRi","debugLog","1994830jitsrg","4LLicma","push","videoDecoder","all","ModuleAudio","mtType","init wasm error","audioDecoder","136qpSpmf","JessibucaProMtWasmDecoder","VideoDecoder","AudioDecoder","bind","_handleModuleAudioError"];return(qe=function(){return e})()}!function(e,r){const t=Ge,n=e();for(;;)try{if(307549===parseInt(t(315))/1*(parseInt(t(322))/2)+-parseInt(t(318))/3+-parseInt(t(325))/4*(parseInt(t(313))/5)+parseInt(t(309))/6+parseInt(t(319))/7*(-parseInt(t(303))/8)+parseInt(t(310))/9*(-parseInt(t(324))/10)+parseInt(t(311))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(qe);class Ke extends Ve{constructor(e){const r=Ge;super(e),this.TAG_NAME="MtWasmDecoder",this[r(330)]=T.wasm}[He(316)](){const e=He,n=[];n[e(326)](t({printErr:this[e(308)][e(307)](this)}),r({printErr:this[e(321)][e(307)](this)})),Promise[e(328)](n).then((r=>{const t=e;let[n,o]=r;this[t(329)]=n,this.ModuleVideo=o,o[t(305)]&&(this[t(327)]=new(o[t(305)])(this)),n[t(306)]&&(this[t(332)]=new(n[t(306)])(this)),this.emit(y[t(316)]),this[t(317)][t(323)](this[t(312)],t(316))}))[e(314)]((r=>{const t=e;this[t(317)][t(320)](this[t(312)],t(331),r,r.toString())}))}}window[He(304)]=Ke})); diff --git a/ui/decoder-pro-old.js b/ui/decoder-pro-old.js new file mode 100644 index 0000000..3a4086c --- /dev/null +++ b/ui/decoder-pro-old.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("path"),require("fs"),require("crypto")):"function"==typeof define&&define.amd?define(["path","fs","crypto"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).path,e.fs,e.crypto$1)}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=n(e),o=n(t),a=n(r),c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e,t){return e(t={exports:{}},t.exports),t.exports}var f=Object.freeze({__proto__:null,commonjsGlobal:c,commonjsRequire:u,unwrapExports:l,createCommonjsModule:d,getCjsExportFromNamespace:function(e){return e&&e.default||e}}),h=d((function(e){var t=void 0!==t?t:{},r=(t={locateFile:function(e,t){return"decoder-pro-old.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_OLD_WASM_URL&&""!=JESSIBUCA_PRO_OLD_WASM_URL?JESSIBUCA_PRO_OLD_WASM_URL:t+e},printErr:function(e){(!e||-1===e.indexOf("not compiled with thread support")&&-1===e.indexOf("illegal icc")&&-1===e.indexOf("If you want to help, upload a sample of this file to")&&-1===e.indexOf("Reserved SBR extensions is not implemented")&&-1===e.indexOf("not compiled with thread support, using thread emulation"))&&(console.warn("JbPro[❌❌❌][old wasm]:",e),e&&1!==e.indexOf("failed to asynchronously prepare wasm")&&postMessage({cmd:"failedToAsynchronouslyPrepareWasm",value:e}))}},Object.assign({},t)),n="./this.program",i="object"==typeof window,c="function"==typeof importScripts,u="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,l=!i&&!u&&!c;if(t.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var d,f,h,p,m,v,y="";if(u){if("object"!=typeof process)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");y=c?s.default.dirname(y)+"/":__dirname+"/",v=()=>{m||(p=o.default,m=s.default)},d=function(e,t){return v(),e=m.normalize(e),p.readFileSync(e,t?void 0:"utf8")},h=e=>{var t=d(e,!0);return t.buffer||(t=new Uint8Array(t)),x(t.buffer),t},f=(e,t,r)=>{v(),e=m.normalize(e),p.readFile(e,(function(e,n){e?r(e):t(n.buffer)}))},process.argv.length>1&&(n=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),e.exports=t,process.on("uncaughtException",(function(e){if(!(e instanceof Ar))throw e})),process.on("unhandledRejection",(function(e){throw e})),t.inspect=function(){return"[Emscripten Module object]"}}else if(l){if("object"==typeof process||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(d=function(e){return read(e)}),h=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),x("object"==typeof t),t)},f=function(e,t,r){setTimeout((()=>t(h(e))),0)},"undefined"!=typeof scriptArgs&&scriptArgs,"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!i&&!c)throw new Error("environment detection error");if(c?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),y=0!==y.indexOf("blob:")?y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");d=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},c&&(h=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),f=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var _,g,b,w=t.print||console.log.bind(console),S=t.printErr||console.warn.bind(console);function E(e){E.shown||(E.shown={}),E.shown[e]||(E.shown[e]=1,S(e))}function I(e,r){Object.getOwnPropertyDescriptor(t,e)||Object.defineProperty(t,e,{configurable:!0,get:function(){ve("Module."+e+" has been replaced with plain "+r+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function A(e,t){var r="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";return t&&(r+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),r}function k(e,r){Object.getOwnPropertyDescriptor(t,e)||Object.defineProperty(t,e,{configurable:!0,get:function(){ve(A(e,r))}})}function C(e,r){Object.getOwnPropertyDescriptor(t,e)||(t[e]=()=>ve(A(e,r)))}Object.assign(t,r),r=null,_="fetchSettings",Object.getOwnPropertyDescriptor(t,_)&&ve("`Module."+_+"` was supplied but `"+_+"` not included in INCOMING_MODULE_JS_API"),t.arguments&&t.arguments,I("arguments","arguments_"),t.thisProgram&&(n=t.thisProgram),I("thisProgram","thisProgram"),t.quit&&t.quit,I("quit","quit_"),x(void 0===t.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),x(void 0===t.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),x(void 0===t.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),x(void 0===t.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),x(void 0===t.read,"Module.read option was removed (modify read_ in JS)"),x(void 0===t.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),x(void 0===t.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),x(void 0===t.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),x(void 0===t.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),I("read","read_"),I("readAsync","readAsync"),I("readBinary","readBinary"),I("setWindowTitle","setWindowTitle"),x(!l,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable."),t.wasmBinary&&(g=t.wasmBinary),I("wasmBinary","wasmBinary"),t.noExitRuntime,I("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&ve("no native wasm support detected");var T=!1;function x(e,t){e||ve("Assertion failed"+(t?": "+t:""))}var D="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function B(e,t,r){for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&D)return D.decode(e.subarray(t,i));for(var s="";t>10,56320|1023&u)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s}function M(e,t){return e?B(O,e,t):""}function P(e,t,r,n){if(!(n>0))return 0;for(var i=r,s=r+n-1,o=0;o=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o);if(a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;a>1114111&&E("Invalid Unicode code point 0x"+a.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i}function F(e,t,r){return x("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),P(e,O,t,r)}function U(e){for(var t=0,r=0;r=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}var R,L,O,N,z,H,V,j,W,G="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function q(e,t){x(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&z[n];)++n;if((r=n<<1)-e>32&&G)return G.decode(O.subarray(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=N[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s}function Y(e,t,r){if(x(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),x("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return N[t>>1]=0,t-n}function K(e){return 2*e.length}function X(e,t){x(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var i=H[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var s=i-65536;n+=String.fromCharCode(55296|s>>10,56320|1023&s)}else n+=String.fromCharCode(i)}return n}function J(e,t,r){if(x(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),x("number"==typeof r,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,s=0;s=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s);if(H[t>>2]=o,(t+=4)+4>i)break}return H[t>>2]=0,t-n}function $(e){for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t}function Z(e){var t=U(e)+1,r=vr(t);return r&&P(e,L,r,t),r}function Q(e){R=e,t.HEAP8=L=new Int8Array(e),t.HEAP16=N=new Int16Array(e),t.HEAP32=H=new Int32Array(e),t.HEAPU8=O=new Uint8Array(e),t.HEAPU16=z=new Uint16Array(e),t.HEAPU32=V=new Uint32Array(e),t.HEAPF32=j=new Float32Array(e),t.HEAPF64=W=new Float64Array(e)}var ee=5242880;t.TOTAL_STACK&&x(ee===t.TOTAL_STACK,"the stack size can no longer be determined at runtime");var te,re=t.INITIAL_MEMORY||67108864;function ne(){var e=Ir();x(0==(3&e)),H[e>>2]=34821223,H[e+4>>2]=2310721022,H[0]=1668509029}function ie(){if(!T){var e=Ir(),t=V[e>>2],r=V[e+4>>2];34821223==t&&2310721022==r||ve("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16)),1668509029!==H[0]&&ve("Runtime error: The application has corrupted its heap memory area (address zero)!")}}I("INITIAL_MEMORY","INITIAL_MEMORY"),x(re>=ee,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+re+"! (TOTAL_STACK="+"5242880)"),x("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),x(!t.wasmMemory,"Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally"),x(67108864==re,"Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"}();var se=[],oe=[],ae=[],ce=!1;x(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),x(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),x(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),x(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var ue=0,le=null,de=null,fe={};function he(e){for(var t=e;;){if(!fe[e])return e;e=t+Math.random()}}function pe(e){ue++,t.monitorRunDependencies&&t.monitorRunDependencies(ue),e?(x(!fe[e]),fe[e]=1,null===le&&"undefined"!=typeof setInterval&&(le=setInterval((function(){if(T)return clearInterval(le),void(le=null);var e=!1;for(var t in fe)e||(e=!0,S("still waiting on run dependencies:")),S("dependency: "+t);e&&S("(end of list)")}),1e4))):S("warning: run dependency added without ID")}function me(e){if(ue--,t.monitorRunDependencies&&t.monitorRunDependencies(ue),e?(x(fe[e]),delete fe[e]):S("warning: run dependency removed without ID"),0==ue&&(null!==le&&(clearInterval(le),le=null),de)){var r=de;de=null,r()}}function ve(e){throw t.onAbort&&t.onAbort(e),S(e="Aborted("+e+")"),T=!0,new WebAssembly.RuntimeError(e)}var ye,_e,ge;function be(e){return e.startsWith("data:application/octet-stream;base64,")}function we(e){return e.startsWith("file://")}function Se(e,r){return function(){var n=e,i=r;return r||(i=t.asm),x(ce,"native function `"+n+"` called before runtime initialization"),i[e]||x(i[e],"exported native function `"+n+"` not found"),i[e].apply(null,arguments)}}function Ee(e){try{if(e==ye&&g)return new Uint8Array(g);if(h)return h(e);throw"both async and sync fetching of the wasm failed"}catch(e){ve(e)}}function Ie(e){for(;e.length>0;){var r=e.shift();if("function"!=typeof r){var n=r.func;"number"==typeof n?void 0===r.arg?ke(n)():ke(n)(r.arg):n(void 0===r.arg?null:r.arg)}else r(t)}}function Ae(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t,r=(t=e,E("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"),t);return e===r?e:r+" ["+e+"]"}))}function ke(e){return te.get(e)}function Ce(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}be(ye="decoder-pro-old.wasm")||(ye=function(e){return t.locateFile?t.locateFile(e,y):y+e}(ye));var Te={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=Te.isAbs(e),r="/"===e.substr(-1);return(e=Te.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=Te.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=Te.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments,0);return Te.normalize(e.join("/"))},join2:(e,t)=>Te.normalize(e+"/"+t)};var xe={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Ue.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=Te.isAbs(n)}return(t?"/":"")+(e=Te.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=xe.resolve(e).substr(1),t=xe.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),s=Math.min(n.length,i.length),o=s,a=0;a0?r.slice(0,n).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n");if(!t)return null;e.input=hr(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(w(B(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(w(B(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(S(B(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(S(B(e.output,0)),e.output=[])}}};function Be(e){e=function(e,t){return x(t,"alignment argument is required"),Math.ceil(e/t)*t}(e,65536);var t=wr(65536,e);return t?(function(e,t){O.fill(0,e,e+t)}(t,e),t):0}var Me={ops_table:null,mount:function(e){return Me.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(Ue.isBlkdev(r)||Ue.isFIFO(r))throw new Ue.ErrnoError(63);Me.ops_table||(Me.ops_table={dir:{node:{getattr:Me.node_ops.getattr,setattr:Me.node_ops.setattr,lookup:Me.node_ops.lookup,mknod:Me.node_ops.mknod,rename:Me.node_ops.rename,unlink:Me.node_ops.unlink,rmdir:Me.node_ops.rmdir,readdir:Me.node_ops.readdir,symlink:Me.node_ops.symlink},stream:{llseek:Me.stream_ops.llseek}},file:{node:{getattr:Me.node_ops.getattr,setattr:Me.node_ops.setattr},stream:{llseek:Me.stream_ops.llseek,read:Me.stream_ops.read,write:Me.stream_ops.write,allocate:Me.stream_ops.allocate,mmap:Me.stream_ops.mmap,msync:Me.stream_ops.msync}},link:{node:{getattr:Me.node_ops.getattr,setattr:Me.node_ops.setattr,readlink:Me.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Me.node_ops.getattr,setattr:Me.node_ops.setattr},stream:Ue.chrdev_stream_ops}});var i=Ue.createNode(e,t,r,n);return Ue.isDir(i.mode)?(i.node_ops=Me.ops_table.dir.node,i.stream_ops=Me.ops_table.dir.stream,i.contents={}):Ue.isFile(i.mode)?(i.node_ops=Me.ops_table.file.node,i.stream_ops=Me.ops_table.file.stream,i.usedBytes=0,i.contents=null):Ue.isLink(i.mode)?(i.node_ops=Me.ops_table.link.node,i.stream_ops=Me.ops_table.link.stream):Ue.isChrdev(i.mode)&&(i.node_ops=Me.ops_table.chrdev.node,i.stream_ops=Me.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=Ue.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Ue.isDir(e.mode)?t.size=4096:Ue.isFile(e.mode)?t.size=e.usedBytes:Ue.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&Me.resizeFileStorage(e,t.size)},lookup:function(e,t){throw Ue.genericErrors[44]},mknod:function(e,t,r,n){return Me.createNode(e,t,r,n)},rename:function(e,t,r){if(Ue.isDir(e.mode)){var n;try{n=Ue.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new Ue.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=Ue.lookupNode(e,t);for(var n in r.contents)throw new Ue.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=Me.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!Ue.isLink(e.mode))throw new Ue.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,i){var s=e.node.contents;if(i>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-i,n);if(x(o>=0),o>8&&s.subarray)t.set(s.subarray(i,i+o),r);else for(var a=0;a0||n+r1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=xe.resolve(Ue.cwd(),e)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};if(t=Object.assign(r,t),t.recurse_count>8)throw new Ue.ErrnoError(32);for(var n=Te.normalizeArray(e.split("/").filter((e=>!!e)),!1),i=Ue.root,s="/",o=0;o40)throw new Ue.ErrnoError(32)}}return{path:s,node:i}},getPath:e=>{for(var t;;){if(Ue.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var r=0,n=0;n>>0)%Ue.nameTable.length},hashAddNode:e=>{var t=Ue.hashName(e.parent.id,e.name);e.name_next=Ue.nameTable[t],Ue.nameTable[t]=e},hashRemoveNode:e=>{var t=Ue.hashName(e.parent.id,e.name);if(Ue.nameTable[t]===e)Ue.nameTable[t]=e.name_next;else for(var r=Ue.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=Ue.mayLookup(e);if(r)throw new Ue.ErrnoError(r,e);for(var n=Ue.hashName(e.id,t),i=Ue.nameTable[n];i;i=i.name_next){var s=i.name;if(i.parent.id===e.id&&s===t)return i}return Ue.lookup(e,t)},createNode:(e,t,r,n)=>{x("object"==typeof e);var i=new Ue.FSNode(e,t,r,n);return Ue.hashAddNode(i),i},destroyNode:e=>{Ue.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=Ue.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Ue.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>{var t=Ue.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:(e,t)=>{try{Ue.lookupNode(e,t);return 20}catch(e){}return Ue.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var n;try{n=Ue.lookupNode(e,t)}catch(e){return e.errno}var i=Ue.nodePermissions(e,"wx");if(i)return i;if(r){if(!Ue.isDir(n.mode))return 54;if(Ue.isRoot(n)||Ue.getPath(n)===Ue.cwd())return 10}else if(Ue.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?Ue.isLink(e.mode)?32:Ue.isDir(e.mode)&&("r"!==Ue.flagsToPermissionString(t)||512&t)?31:Ue.nodePermissions(e,Ue.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ue.MAX_OPEN_FDS;for(var r=e;r<=t;r++)if(!Ue.streams[r])return r;throw new Ue.ErrnoError(33)},getStream:e=>Ue.streams[e],createStream:(e,t,r)=>{Ue.FSStream||(Ue.FSStream=function(){this.shared={}},Ue.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get function(){return this.shared.position},set:function(e){this.shared.position=e}}}),e=Object.assign(new Ue.FSStream,e);var n=Ue.nextfd(t,r);return e.fd=n,Ue.streams[n]=e,e},closeStream:e=>{Ue.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=Ue.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new Ue.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{Ue.devices[e]={stream_ops:t}},getDevice:e=>Ue.devices[e],getMounts:e=>{for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),Ue.syncFSRequests++,Ue.syncFSRequests>1&&S("warning: "+Ue.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=Ue.getMounts(Ue.root.mount),n=0;function i(e){return x(Ue.syncFSRequests>0),Ue.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount:(e,t,r)=>{if("string"==typeof e)throw e;var n,i="/"===r,s=!r;if(i&&Ue.root)throw new Ue.ErrnoError(10);if(!i&&!s){var o=Ue.lookupPath(r,{follow_mount:!1});if(r=o.path,n=o.node,Ue.isMountpoint(n))throw new Ue.ErrnoError(10);if(!Ue.isDir(n.mode))throw new Ue.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(a);return c.mount=a,a.root=c,i?Ue.root=c:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),c},unmount:e=>{var t=Ue.lookupPath(e,{follow_mount:!1});if(!Ue.isMountpoint(t.node))throw new Ue.ErrnoError(28);var r=t.node,n=r.mounted,i=Ue.getMounts(n);Object.keys(Ue.nameTable).forEach((e=>{for(var t=Ue.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&Ue.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(n);x(-1!==s),r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var n=Ue.lookupPath(e,{parent:!0}).node,i=Te.basename(e);if(!i||"."===i||".."===i)throw new Ue.ErrnoError(28);var s=Ue.mayCreate(n,i);if(s)throw new Ue.ErrnoError(s);if(!n.node_ops.mknod)throw new Ue.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Ue.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Ue.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var r=e.split("/"),n="",i=0;i(void 0===r&&(r=t,t=438),t|=8192,Ue.mknod(e,t,r)),symlink:(e,t)=>{if(!xe.resolve(e))throw new Ue.ErrnoError(44);var r=Ue.lookupPath(t,{parent:!0}).node;if(!r)throw new Ue.ErrnoError(44);var n=Te.basename(t),i=Ue.mayCreate(r,n);if(i)throw new Ue.ErrnoError(i);if(!r.node_ops.symlink)throw new Ue.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:(e,t)=>{var r,n,i=Te.dirname(e),s=Te.dirname(t),o=Te.basename(e),a=Te.basename(t);if(r=Ue.lookupPath(e,{parent:!0}).node,n=Ue.lookupPath(t,{parent:!0}).node,!r||!n)throw new Ue.ErrnoError(44);if(r.mount!==n.mount)throw new Ue.ErrnoError(75);var c,u=Ue.lookupNode(r,o),l=xe.relative(e,s);if("."!==l.charAt(0))throw new Ue.ErrnoError(28);if("."!==(l=xe.relative(t,i)).charAt(0))throw new Ue.ErrnoError(55);try{c=Ue.lookupNode(n,a)}catch(e){}if(u!==c){var d=Ue.isDir(u.mode),f=Ue.mayDelete(r,o,d);if(f)throw new Ue.ErrnoError(f);if(f=c?Ue.mayDelete(n,a,d):Ue.mayCreate(n,a))throw new Ue.ErrnoError(f);if(!r.node_ops.rename)throw new Ue.ErrnoError(63);if(Ue.isMountpoint(u)||c&&Ue.isMountpoint(c))throw new Ue.ErrnoError(10);if(n!==r&&(f=Ue.nodePermissions(r,"w")))throw new Ue.ErrnoError(f);Ue.hashRemoveNode(u);try{r.node_ops.rename(u,n,a)}catch(e){throw e}finally{Ue.hashAddNode(u)}}},rmdir:e=>{var t=Ue.lookupPath(e,{parent:!0}).node,r=Te.basename(e),n=Ue.lookupNode(t,r),i=Ue.mayDelete(t,r,!0);if(i)throw new Ue.ErrnoError(i);if(!t.node_ops.rmdir)throw new Ue.ErrnoError(63);if(Ue.isMountpoint(n))throw new Ue.ErrnoError(10);t.node_ops.rmdir(t,r),Ue.destroyNode(n)},readdir:e=>{var t=Ue.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Ue.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=Ue.lookupPath(e,{parent:!0}).node;if(!t)throw new Ue.ErrnoError(44);var r=Te.basename(e),n=Ue.lookupNode(t,r),i=Ue.mayDelete(t,r,!1);if(i)throw new Ue.ErrnoError(i);if(!t.node_ops.unlink)throw new Ue.ErrnoError(63);if(Ue.isMountpoint(n))throw new Ue.ErrnoError(10);t.node_ops.unlink(t,r),Ue.destroyNode(n)},readlink:e=>{var t=Ue.lookupPath(e).node;if(!t)throw new Ue.ErrnoError(44);if(!t.node_ops.readlink)throw new Ue.ErrnoError(28);return xe.resolve(Ue.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var r=Ue.lookupPath(e,{follow:!t}).node;if(!r)throw new Ue.ErrnoError(44);if(!r.node_ops.getattr)throw new Ue.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Ue.stat(e,!0),chmod:(e,t,r)=>{var n;"string"==typeof e?n=Ue.lookupPath(e,{follow:!r}).node:n=e;if(!n.node_ops.setattr)throw new Ue.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{Ue.chmod(e,t,!0)},fchmod:(e,t)=>{var r=Ue.getStream(e);if(!r)throw new Ue.ErrnoError(8);Ue.chmod(r.node,t)},chown:(e,t,r,n)=>{var i;"string"==typeof e?i=Ue.lookupPath(e,{follow:!n}).node:i=e;if(!i.node_ops.setattr)throw new Ue.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown:(e,t,r)=>{Ue.chown(e,t,r,!0)},fchown:(e,t,r)=>{var n=Ue.getStream(e);if(!n)throw new Ue.ErrnoError(8);Ue.chown(n.node,t,r)},truncate:(e,t)=>{if(t<0)throw new Ue.ErrnoError(28);var r;"string"==typeof e?r=Ue.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new Ue.ErrnoError(63);if(Ue.isDir(r.mode))throw new Ue.ErrnoError(31);if(!Ue.isFile(r.mode))throw new Ue.ErrnoError(28);var n=Ue.nodePermissions(r,"w");if(n)throw new Ue.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var r=Ue.getStream(e);if(!r)throw new Ue.ErrnoError(8);if(0==(2097155&r.flags))throw new Ue.ErrnoError(28);Ue.truncate(r.node,t)},utime:(e,t,r)=>{var n=Ue.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:(e,r,n,i,s)=>{if(""===e)throw new Ue.ErrnoError(44);var o;if(n=void 0===n?438:n,n=64&(r="string"==typeof r?Ue.modeStringToFlags(r):r)?4095&n|32768:0,"object"==typeof e)o=e;else{e=Te.normalize(e);try{o=Ue.lookupPath(e,{follow:!(131072&r)}).node}catch(e){}}var a=!1;if(64&r)if(o){if(128&r)throw new Ue.ErrnoError(20)}else o=Ue.mknod(e,n,0),a=!0;if(!o)throw new Ue.ErrnoError(44);if(Ue.isChrdev(o.mode)&&(r&=-513),65536&r&&!Ue.isDir(o.mode))throw new Ue.ErrnoError(54);if(!a){var c=Ue.mayOpen(o,r);if(c)throw new Ue.ErrnoError(c)}512&r&&Ue.truncate(o,0),r&=-131713;var u=Ue.createStream({node:o,path:Ue.getPath(o),flags:r,seekable:!0,position:0,stream_ops:o.stream_ops,ungotten:[],error:!1},i,s);return u.stream_ops.open&&u.stream_ops.open(u),!t.logReadFiles||1&r||(Ue.readFiles||(Ue.readFiles={}),e in Ue.readFiles||(Ue.readFiles[e]=1)),u},close:e=>{if(Ue.isClosed(e))throw new Ue.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Ue.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,r)=>{if(Ue.isClosed(e))throw new Ue.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ue.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Ue.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:(e,t,r,n,i)=>{if(n<0||i<0)throw new Ue.ErrnoError(28);if(Ue.isClosed(e))throw new Ue.ErrnoError(8);if(1==(2097155&e.flags))throw new Ue.ErrnoError(8);if(Ue.isDir(e.node.mode))throw new Ue.ErrnoError(31);if(!e.stream_ops.read)throw new Ue.ErrnoError(28);var s=void 0!==i;if(s){if(!e.seekable)throw new Ue.ErrnoError(70)}else i=e.position;var o=e.stream_ops.read(e,t,r,n,i);return s||(e.position+=o),o},write:(e,t,r,n,i,s)=>{if(n<0||i<0)throw new Ue.ErrnoError(28);if(Ue.isClosed(e))throw new Ue.ErrnoError(8);if(0==(2097155&e.flags))throw new Ue.ErrnoError(8);if(Ue.isDir(e.node.mode))throw new Ue.ErrnoError(31);if(!e.stream_ops.write)throw new Ue.ErrnoError(28);e.seekable&&1024&e.flags&&Ue.llseek(e,0,2);var o=void 0!==i;if(o){if(!e.seekable)throw new Ue.ErrnoError(70)}else i=e.position;var a=e.stream_ops.write(e,t,r,n,i,s);return o||(e.position+=a),a},allocate:(e,t,r)=>{if(Ue.isClosed(e))throw new Ue.ErrnoError(8);if(t<0||r<=0)throw new Ue.ErrnoError(28);if(0==(2097155&e.flags))throw new Ue.ErrnoError(8);if(!Ue.isFile(e.node.mode)&&!Ue.isDir(e.node.mode))throw new Ue.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ue.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:(e,t,r,n,i,s)=>{if(0!=(2&i)&&0==(2&s)&&2!=(2097155&e.flags))throw new Ue.ErrnoError(2);if(1==(2097155&e.flags))throw new Ue.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ue.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i,s)},msync:(e,t,r,n,i)=>e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl:(e,t,r)=>{if(!e.stream_ops.ioctl)throw new Ue.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,n=Ue.open(e,t.flags),i=Ue.stat(e),s=i.size,o=new Uint8Array(s);return Ue.read(n,o,0,s,0),"utf8"===t.encoding?r=B(o,0):"binary"===t.encoding&&(r=o),Ue.close(n),r},writeFile:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var n=Ue.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(U(t)+1),s=P(t,i,0,i.length);Ue.write(n,i,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Ue.write(n,t,0,t.byteLength,void 0,r.canOwn)}Ue.close(n)},cwd:()=>Ue.currentPath,chdir:e=>{var t=Ue.lookupPath(e,{follow:!0});if(null===t.node)throw new Ue.ErrnoError(44);if(!Ue.isDir(t.node.mode))throw new Ue.ErrnoError(54);var r=Ue.nodePermissions(t.node,"x");if(r)throw new Ue.ErrnoError(r);Ue.currentPath=t.path},createDefaultDirectories:()=>{Ue.mkdir("/tmp"),Ue.mkdir("/home"),Ue.mkdir("/home/web_user")},createDefaultDevices:()=>{Ue.mkdir("/dev"),Ue.registerDevice(Ue.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),Ue.mkdev("/dev/null",Ue.makedev(1,3)),De.register(Ue.makedev(5,0),De.default_tty_ops),De.register(Ue.makedev(6,0),De.default_tty1_ops),Ue.mkdev("/dev/tty",Ue.makedev(5,0)),Ue.mkdev("/dev/tty1",Ue.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}if(u)try{var t=a.default;return function(){return t.randomBytes(1)[0]}}catch(e){}return function(){ve("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")}}();Ue.createDevice("/dev","random",e),Ue.createDevice("/dev","urandom",e),Ue.mkdir("/dev/shm"),Ue.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Ue.mkdir("/proc");var e=Ue.mkdir("/proc/self");Ue.mkdir("/proc/self/fd"),Ue.mount({mount:()=>{var t=Ue.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var r=+t,n=Ue.getStream(r);if(!n)throw new Ue.ErrnoError(8);var i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{t.stdin?Ue.createDevice("/dev","stdin",t.stdin):Ue.symlink("/dev/tty","/dev/stdin"),t.stdout?Ue.createDevice("/dev","stdout",null,t.stdout):Ue.symlink("/dev/tty","/dev/stdout"),t.stderr?Ue.createDevice("/dev","stderr",null,t.stderr):Ue.symlink("/dev/tty1","/dev/stderr");var e=Ue.open("/dev/stdin",0),r=Ue.open("/dev/stdout",1),n=Ue.open("/dev/stderr",1);x(0===e.fd,"invalid handle for stdin ("+e.fd+")"),x(1===r.fd,"invalid handle for stdout ("+r.fd+")"),x(2===n.fd,"invalid handle for stderr ("+n.fd+")")},ensureErrnoError:()=>{Ue.ErrnoError||(Ue.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,Fe)if(Fe[t]===e){this.code=t;break}},this.setErrno(e),this.message=Pe[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=Ae(this.stack))},Ue.ErrnoError.prototype=new Error,Ue.ErrnoError.prototype.constructor=Ue.ErrnoError,[44].forEach((e=>{Ue.genericErrors[e]=new Ue.ErrnoError(e),Ue.genericErrors[e].stack=""})))},staticInit:()=>{Ue.ensureErrnoError(),Ue.nameTable=new Array(4096),Ue.mount(Me,{},"/"),Ue.createDefaultDirectories(),Ue.createDefaultDevices(),Ue.createSpecialDirectories(),Ue.filesystems={MEMFS:Me}},init:(e,r,n)=>{x(!Ue.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),Ue.init.initialized=!0,Ue.ensureErrnoError(),t.stdin=e||t.stdin,t.stdout=r||t.stdout,t.stderr=n||t.stderr,Ue.createStandardStreams()},quit:()=>{Ue.init.initialized=!1,br();for(var e=0;e{var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:(e,t)=>{var r=Ue.analyzePath(e,t);return r.exists?r.object:null},analyzePath:(e,t)=>{try{e=(n=Ue.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Ue.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=Te.basename(e),n=Ue.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:(e,t,r,n)=>{e="string"==typeof e?e:Ue.getPath(e);for(var i=t.split("/").reverse();i.length;){var s=i.pop();if(s){var o=Te.join2(e,s);try{Ue.mkdir(o)}catch(e){}e=o}}return o},createFile:(e,t,r,n,i)=>{var s=Te.join2("string"==typeof e?e:Ue.getPath(e),t),o=Ue.getMode(n,i);return Ue.create(s,o)},createDataFile:(e,t,r,n,i,s)=>{var o=t;e&&(e="string"==typeof e?e:Ue.getPath(e),o=t?Te.join2(e,t):e);var a=Ue.getMode(n,i),c=Ue.create(o,a);if(r){if("string"==typeof r){for(var u=new Array(r.length),l=0,d=r.length;l{var i=Te.join2("string"==typeof e?e:Ue.getPath(e),t),s=Ue.getMode(!!r,!!n);Ue.createDevice.major||(Ue.createDevice.major=64);var o=Ue.makedev(Ue.createDevice.major++,0);return Ue.registerDevice(o,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,t,n,i,s)=>{for(var o=0,a=0;a{for(var o=0;o{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!d)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=hr(d(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new Ue.ErrnoError(29)}},createLazyFile:(e,t,r,n,i)=>{function s(){this.lengthKnown=!1,this.chunks=[]}if(s.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;i||(o=n);var a=this;a.setDataGetter((e=>{var t=e*o,i=(e+1)*o-1;if(i=Math.min(i,n-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",r,!1),n!==o&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+r+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):hr(i.responseText||"",!0)})(t,i)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&n||(o=n=1,n=this.getter(0).length,o=n,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!c)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var u=Ue.createFile(e,t,a,n,i);a.contents?u.contents=a.contents:a.url&&(u.contents=null,u.url=a.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var l={};return Object.keys(u.stream_ops).forEach((e=>{var t=u.stream_ops[e];l[e]=function(){return Ue.forceLoadFile(u),t.apply(null,arguments)}})),l.read=(e,t,r,n,i)=>{Ue.forceLoadFile(u);var s=e.node.contents;if(i>=s.length)return 0;var o=Math.min(s.length-i,n);if(x(o>=0),s.slice)for(var a=0;a{var l=t?xe.resolve(Te.join2(e,t)):e,d=he("cp "+l);function h(r){function f(r){u&&u(),a||Ue.createDataFile(e,t,r,n,i,c),s&&s(),me(d)}Browser.handledByPreloadPlugin(r,l,f,(()=>{o&&o(),me(d)}))||f(r)}pe(d),"string"==typeof r?function(e,t,r,n){var i=n?"":he("al "+e);f(e,(function(r){x(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),i&&me(i)}),(function(t){if(!r)throw'Loading data file "'+e+'" failed.';r()})),i&&pe(i)}(r,(e=>h(e)),o):h(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=Ue.indexedDB();try{var i=n.open(Ue.DB_NAME(),Ue.DB_VERSION)}catch(e){return r(e)}i.onupgradeneeded=()=>{w("creating db"),i.result.createObjectStore(Ue.DB_STORE_NAME)},i.onsuccess=()=>{var n=i.result.transaction([Ue.DB_STORE_NAME],"readwrite"),s=n.objectStore(Ue.DB_STORE_NAME),o=0,a=0,c=e.length;function u(){0==a?t():r()}e.forEach((e=>{var t=s.put(Ue.analyzePath(e).object.contents,e);t.onsuccess=()=>{++o+a==c&&u()},t.onerror=()=>{a++,o+a==c&&u()}})),n.onerror=r},i.onerror=r},loadFilesFromDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=Ue.indexedDB();try{var i=n.open(Ue.DB_NAME(),Ue.DB_VERSION)}catch(e){return r(e)}i.onupgradeneeded=r,i.onsuccess=()=>{var n=i.result;try{var s=n.transaction([Ue.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var o=s.objectStore(Ue.DB_STORE_NAME),a=0,c=0,u=e.length;function l(){0==c?t():r()}e.forEach((e=>{var t=o.get(e);t.onsuccess=()=>{Ue.analyzePath(e).exists&&Ue.unlink(e),Ue.createDataFile(Te.dirname(e),Te.basename(e),t.result,!0,!0,!0),++a+c==u&&l()},t.onerror=()=>{c++,a+c==u&&l()}})),s.onerror=r},i.onerror=r},absolutePath:()=>{ve("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:()=>{ve("FS.createFolder has been removed; use FS.mkdir instead")},createLink:()=>{ve("FS.createLink has been removed; use FS.symlink instead")},joinPath:()=>{ve("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:()=>{ve("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:()=>{ve("FS.standardizePath has been removed; use PATH.normalize instead")}},Re={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if(Te.isAbs(t))return t;var n;if(-100===e)n=Ue.cwd();else{var i=Ue.getStream(e);if(!i)throw new Ue.ErrnoError(8);n=i.path}if(0==t.length){if(!r)throw new Ue.ErrnoError(44);return n}return Te.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&Te.normalize(t)!==Te.normalize(Ue.getPath(e.node)))return-54;throw e}return H[r>>2]=n.dev,H[r+4>>2]=0,H[r+8>>2]=n.ino,H[r+12>>2]=n.mode,H[r+16>>2]=n.nlink,H[r+20>>2]=n.uid,H[r+24>>2]=n.gid,H[r+28>>2]=n.rdev,H[r+32>>2]=0,ge=[n.size>>>0,(_e=n.size,+Math.abs(_e)>=1?_e>0?(0|Math.min(+Math.floor(_e/4294967296),4294967295))>>>0:~~+Math.ceil((_e-+(~~_e>>>0))/4294967296)>>>0:0)],H[r+40>>2]=ge[0],H[r+44>>2]=ge[1],H[r+48>>2]=4096,H[r+52>>2]=n.blocks,H[r+56>>2]=n.atime.getTime()/1e3|0,H[r+60>>2]=0,H[r+64>>2]=n.mtime.getTime()/1e3|0,H[r+68>>2]=0,H[r+72>>2]=n.ctime.getTime()/1e3|0,H[r+76>>2]=0,ge=[n.ino>>>0,(_e=n.ino,+Math.abs(_e)>=1?_e>0?(0|Math.min(+Math.floor(_e/4294967296),4294967295))>>>0:~~+Math.ceil((_e-+(~~_e>>>0))/4294967296)>>>0:0)],H[r+80>>2]=ge[0],H[r+84>>2]=ge[1],0},doMsync:function(e,t,r,n,i){var s=O.slice(e,e+r);Ue.msync(t,s,i,r,n)},doMknod:function(e,t,r){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Ue.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var n=Ue.readlink(e),i=Math.min(r,U(n)),s=L[t+i];return F(n,t,r+1),L[t+i]=s,i},doAccess:function(e,t){if(-8&t)return-28;var r=Ue.lookupPath(e,{follow:!0}).node;if(!r)return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&Ue.nodePermissions(r,n)?-2:0},doReadv:function(e,t,r,n){for(var i=0,s=0;s>2],a=H[t+4>>2];t+=8;var c=Ue.read(e,L,o,a,n);if(c<0)return-1;if(i+=c,c>2],a=H[t+4>>2];t+=8;var c=Ue.write(e,L,o,a,n);if(c<0)return-1;i+=c}return i},varargs:void 0,get:function(){return x(null!=Re.varargs),Re.varargs+=4,H[Re.varargs-4>>2]},getStr:function(e){return M(e)},getStreamFromFD:function(e){var t=Ue.getStream(e);if(!t)throw new Ue.ErrnoError(8);return t}};function Le(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var Oe=void 0;function Ne(e){for(var t="",r=e;O[r];)t+=Oe[O[r++]];return t}var ze={},He={},Ve={};function je(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function We(e,t){return e=je(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Ge(e,t){var r=We(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var qe=void 0;function Ye(e){throw new qe(e)}var Ke=void 0;function Xe(e){throw new Ke(e)}function Je(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Xe("Mismatched type converter count");for(var i=0;i{He.hasOwnProperty(e)?i[t]=He[e]:(s.push(e),ze.hasOwnProperty(e)||(ze[e]=[]),ze[e].push((()=>{i[t]=He[e],++o===s.length&&n(i)})))})),0===s.length&&n(i)}function $e(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||Ye('type "'+n+'" must have a positive integer typeid pointer'),He.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Ye("Cannot register type '"+n+"' twice")}if(He[e]=t,delete Ve[e],ze.hasOwnProperty(e)){var i=ze[e];delete ze[e],i.forEach((e=>e()))}}function Ze(e){if(!(this instanceof bt))return!1;if(!(e instanceof bt))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i}function Qe(e){Ye(e.$$.ptrType.registeredClass.name+" instance already deleted")}var et=!1;function tt(e){}function rt(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function nt(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=nt(e,t,r.baseClass);return null===n?null:r.downcast(n)}var it={};function st(){return Object.keys(dt).length}function ot(){var e=[];for(var t in dt)dt.hasOwnProperty(t)&&e.push(dt[t]);return e}var at=[];function ct(){for(;at.length;){var e=at.pop();e.$$.deleteScheduled=!1,e.delete()}}var ut=void 0;function lt(e){ut=e,at.length&&ut&&ut(ct)}var dt={};function ft(e,t){return t=function(e,t){for(void 0===t&&Ye("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),dt[t]}function ht(e,t){return t.ptrType&&t.ptr||Xe("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&Xe("Both smartPtrType and smartPtr must be specified"),t.count={value:1},mt(Object.create(e,{$$:{value:t}}))}function pt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?ht(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ht(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=it[o];if(!a)return i.call(this);s=this.isConst?a.constPointerType:a.pointerType;var c=nt(t,this.registeredClass,s.registeredClass);return null===c?i.call(this):this.isSmartPointer?ht(s.registeredClass.instancePrototype,{ptrType:s,ptr:c,smartPtrType:this,smartPtr:e}):ht(s.registeredClass.instancePrototype,{ptrType:s,ptr:c})}function mt(e){return"undefined"==typeof FinalizationRegistry?(mt=e=>e,e):(et=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),rt(e.$$)})),mt=e=>{var t=e.$$;if(!!t.smartPtr){var r={$$:t},n=t.ptrType.registeredClass;r.leakWarning=new Error("Embind found a leaked C++ instance "+n.name+" <0x"+t.ptr.toString(16)+">.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated"),"captureStackTrace"in Error&&Error.captureStackTrace(r.leakWarning,pt),et.register(e,r,e)}return e},tt=e=>et.unregister(e),mt(e))}function vt(){if(this.$$.ptr||Qe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=mt(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function yt(){this.$$.ptr||Qe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ye("Object already scheduled for deletion"),tt(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function _t(){return!this.$$.ptr}function gt(){return this.$$.ptr||Qe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ye("Object already scheduled for deletion"),at.push(this),1===at.length&&ut&&ut(ct),this.$$.deleteScheduled=!0,this}function bt(){}function wt(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Ye("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function St(e,t,r,n,i,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}function Et(e,t,r){for(;t!==r;)t.upcast||Ye("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function It(e,t){if(null===t)return this.isReference&&Ye("null is not a valid "+this.name),0;t.$$||Ye('Cannot pass "'+Kt(t)+'" as a '+this.name),t.$$.ptr||Ye("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return Et(t.$$.ptr,r,this.registeredClass)}function At(e,t){var r;if(null===t)return this.isReference&&Ye("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Ye('Cannot pass "'+Kt(t)+'" as a '+this.name),t.$$.ptr||Ye("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&Ye("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=Et(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Ye("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Ye("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,Yt.toHandle((function(){i.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:Ye("Unsupporting sharing policy")}return r}function kt(e,t){if(null===t)return this.isReference&&Ye("null is not a valid "+this.name),0;t.$$||Ye('Cannot pass "'+Kt(t)+'" as a '+this.name),t.$$.ptr||Ye("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&Ye("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return Et(t.$$.ptr,r,this.registeredClass)}function Ct(e){return this.fromWireType(V[e>>2])}function Tt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function xt(e){this.rawDestructor&&this.rawDestructor(e)}function Dt(e){null!==e&&e.delete()}function Bt(e,t,r,n,i,s,o,a,c,u,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=At:n?(this.toWireType=It,this.destructorFunction=null):(this.toWireType=kt,this.destructorFunction=null)}function Mt(e,r,n){return e.includes("j")?function(e,r,n){x("dynCall_"+e in t,"bad function pointer type - no table for sig '"+e+"'"),n&&n.length?x(n.length===e.substring(1).replace(/j/g,"--").length):x(1==e.length);var i=t["dynCall_"+e];return n&&n.length?i.apply(null,[r].concat(n)):i.call(null,r)}(e,r,n):(x(ke(r),"missing table entry in dynCall: "+r),ke(r).apply(null,n))}function Pt(e,t){var r=(e=Ne(e)).includes("j")?function(e,t){x(e.includes("j"),"getDynCaller should only be called with i64 sigs");var r=[];return function(){return r.length=0,Object.assign(r,arguments),Mt(e,t,r)}}(e,t):ke(t);return"function"!=typeof r&&Ye("unknown function pointer with signature "+e+": "+t),r}var Ft=void 0;function Ut(e){var t=gr(e),r=Ne(t);return mr(t),r}function Rt(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||He[t]||(Ve[t]?Ve[t].forEach(e):(r.push(t),n[t]=!0))})),new Ft(e+": "+r.map(Ut).join([", "]))}function Lt(e,t){for(var r=[],n=0;n>2)+n]);return r}function Ot(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Nt(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=We(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function zt(e,t,r,n,i){var s=t.length;s<2&&Ye("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==t[1]&&null!==r,a=!1,c=1;c0?", ":"")+d),f+=(u?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",a)f+="runDestructors(destructors);\n";else for(c=o?1:2;c4&&0==--jt[e].refcount&&(jt[e]=void 0,Vt.push(e))}function Gt(){for(var e=0,t=5;t(e||Ye("Cannot use deleted val. handle = "+e),jt[e].value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Vt.length?Vt.pop():jt.length;return jt[t]={refcount:1,value:e},t}}};function Kt(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Xt(e,t){switch(t){case 2:return function(e){return this.fromWireType(j[e>>2])};case 3:return function(e){return this.fromWireType(W[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Jt(e,t,r){switch(t){case 0:return r?function(e){return L[e]}:function(e){return O[e]};case 1:return r?function(e){return N[e>>1]}:function(e){return z[e>>1]};case 2:return r?function(e){return H[e>>2]}:function(e){return V[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function $t(e,t){var r=He[e];return void 0===r&&Ye(t+" has unknown type "+Ut(e)),r}var Zt={};var Qt=[];var er=[];function tr(e,t){return x(t===(0|t)),(e>>>0)+4294967296*t}function rr(e,t){if(e<=0)return e;var r=t<=32?Math.abs(1<=r&&(t<=32||e>r)&&(e=-2*r+e),e}function nr(e,t){return e>=0?e:t<=32?2*Math.abs(1<>3]),n+=8):"i64"==e?(t=[H[n>>2],H[n+4>>2]],n+=8):(x(0==(3&n)),e="i32",t=H[n>>2],n+=4),t}for(var s,o,a,c,u,l,d=[];;){var f=r;if(0===(s=L[r>>0]))break;if(o=L[r+1>>0],37==s){var h=!1,p=!1,m=!1,v=!1,y=!1;e:for(;;){switch(o){case 43:h=!0;break;case 45:p=!0;break;case 35:m=!0;break;case 48:if(v)break e;v=!0;break;case 32:y=!0;break;default:break e}r++,o=L[r+1>>0]}var _=0;if(42==o)_=i("i32"),r++,o=L[r+1>>0];else for(;o>=48&&o<=57;)_=10*_+(o-48),r++,o=L[r+1>>0];var g,b=!1,w=-1;if(46==o){if(w=0,b=!0,r++,42==(o=L[r+1>>0]))w=i("i32"),r++;else for(;;){var S=L[r+1>>0];if(S<48||S>57)break;w=10*w+(S-48),r++}o=L[r+1>>0]}switch(w<0&&(w=6,b=!1),String.fromCharCode(o)){case"h":104==L[r+2>>0]?(r++,g=1):g=2;break;case"l":108==L[r+2>>0]?(r++,g=8):g=4;break;case"L":case"q":case"j":g=8;break;case"z":case"t":case"I":g=4;break;default:g=null}switch(g&&r++,o=L[r+1>>0],String.fromCharCode(o)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":var E=100==o||105==o;if(a=i("i"+8*(g=g||4)),8==g&&(a=117==o?(u=a[0],l=a[1],(u>>>0)+4294967296*(l>>>0)):tr(a[0],a[1])),g<=4)a=(E?rr:nr)(a&Math.pow(256,g)-1,8*g);var I=Math.abs(a),A="";if(100==o||105==o)T=rr(a,8*g).toString(10);else if(117==o)T=nr(a,8*g).toString(10),a=Math.abs(a);else if(111==o)T=(m?"0":"")+I.toString(8);else if(120==o||88==o){if(A=m&&0!=a?"0x":"",a<0){a=-a,T=(I-1).toString(16);for(var k=[],C=0;C=0&&(h?A="+"+A:y&&(A=" "+A)),"-"==T.charAt(0)&&(A="-"+A,T=T.substr(1));A.length+T.length<_;)p?T+=" ":v?T="0"+T:A=" "+A;(T=A+T).split("").forEach((function(e){d.push(e.charCodeAt(0))}));break;case"f":case"F":case"e":case"E":case"g":case"G":var T;if(a=i("double"),isNaN(a))T="nan",v=!1;else if(isFinite(a)){var D=!1,B=Math.min(w,20);if(103==o||71==o){D=!0,w=w||1;var M=parseInt(a.toExponential(B).split("e")[1],10);w>M&&M>=-4?(o=(103==o?"f":"F").charCodeAt(0),w-=M+1):(o=(103==o?"e":"E").charCodeAt(0),w--),B=Math.min(w,20)}101==o||69==o?(T=a.toExponential(B),/[eE][-+]\d$/.test(T)&&(T=T.slice(0,-1)+"0"+T.slice(-1))):102!=o&&70!=o||(T=a.toFixed(B),0===a&&((c=a)<0||0===c&&1/c==-1/0)&&(T="-"+T));var P=T.split("e");if(D&&!m)for(;P[0].length>1&&P[0].includes(".")&&("0"==P[0].slice(-1)||"."==P[0].slice(-1));)P[0]=P[0].slice(0,-1);else for(m&&-1==T.indexOf(".")&&(P[0]+=".");w>B++;)P[0]+="0";T=P[0]+(P.length>1?"e"+P[1]:""),69==o&&(T=T.toUpperCase()),a>=0&&(h?T="+"+T:y&&(T=" "+T))}else T=(a<0?"-":"")+"inf",v=!1;for(;T.length<_;)p?T+=" ":T=!v||"-"!=T[0]&&"+"!=T[0]?(v?"0":" ")+T:T[0]+"0"+T.slice(1);o<97&&(T=T.toUpperCase()),T.split("").forEach((function(e){d.push(e.charCodeAt(0))}));break;case"s":var F=i("i8*"),U=F?yr(F):"(null)".length;if(b&&(U=Math.min(U,w)),!p)for(;U<_--;)d.push(32);if(F)for(C=0;C>0]);else d=d.concat(hr("(null)".substr(0,U),!0));if(p)for(;U<_--;)d.push(32);break;case"c":for(p&&d.push(i("i8"));--_>0;)d.push(32);p||d.push(i("i8"));break;case"n":var R=i("i32*");H[R>>2]=d.length;break;case"%":d.push(s);break;default:for(C=f;C>0])}r+=2}else d.push(s),r+=1}return d}function sr(e){if(!e||!e.callee||!e.callee.name)return[null,"",""];e.callee.toString();var t=e.callee.name,r="(",n=!0;for(var i in e){var s=e[i];n||(r+=", "),n=!1,r+="number"==typeof s||"string"==typeof s?s:"("+typeof s+")"}r+=")";var o=e.callee.caller;return n&&(r=""),[e=o?o.arguments:[],t,r]}function or(e,t){24&e&&(t=t.replace(/\s+$/,""),t+=(t.length>0?"\n":"")+function(e){var t=Ce(),r=t.lastIndexOf("_emscripten_log"),n=t.lastIndexOf("_emscripten_get_callstack"),i=t.indexOf("\n",Math.max(r,n))+1;t=t.slice(i),32&e&&E("EM_LOG_DEMANGLE is deprecated; ignoring"),8&e&&"undefined"==typeof emscripten_source_map&&(E('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),e^=8,e|=16);var s=null;if(128&e)for(s=sr(arguments);s[1].includes("_emscripten_");)s=sr(s[0]);var o=t.split("\n");t="";var a=new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)"),c=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),u=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(var l in o){var d=o[l],f="",h="",p=0,m=0,v=u.exec(d);if(v&&5==v.length)f=v[1],h=v[2],p=v[3],m=v[4];else{if((v=a.exec(d))||(v=c.exec(d)),!(v&&v.length>=4)){t+=d+"\n";continue}f=v[1],h=v[2],p=v[3],m=0|v[4]}var y=!1;if(8&e){var _=emscripten_source_map.originalPositionFor({line:p,column:m});(y=_&&_.source)&&(64&e&&(_.source=_.source.substring(_.source.replace(/\\/g,"/").lastIndexOf("/")+1)),t+=" at "+f+" ("+_.source+":"+_.line+":"+_.column+")\n")}(16&e||!y)&&(64&e&&(h=h.substring(h.replace(/\\/g,"/").lastIndexOf("/")+1)),t+=(y?" = "+f:" at "+f)+" ("+h+":"+p+":"+m+")\n"),128&e&&s[0]&&(s[1]==f&&s[2].length>0&&(t=t.replace(/\s+$/,""),t+=" with values: "+s[1]+s[2]+"\n"),s=sr(s[0]))}return t.replace(/\s+$/,"")}(e)),1&e?4&e?console.error(t):2&e?console.warn(t):512&e?console.info(t):256&e?console.debug(t):console.log(t):6&e?S(t):w(t)}function ar(e){try{return b.grow(e-R.byteLength+65535>>>16),Q(b.buffer),1}catch(t){S("emscripten_realloc_buffer: Attempted to grow heap from "+R.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}var cr={};function ur(){if(!ur.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:n||"./this.program"};for(var t in cr)void 0===cr[t]?delete e[t]:e[t]=cr[t];var r=[];for(var t in e)r.push(t+"="+e[t]);ur.strings=r}return ur.strings}var lr=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ue.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},dr=365,fr=146;function hr(e,t,r){var n=r>0?r:U(e)+1,i=new Array(n),s=P(e,i,0,i.length);return t&&(i.length=s),i}Object.defineProperties(lr.prototype,{read:{get:function(){return(this.mode&dr)===dr},set:function(e){e?this.mode|=dr:this.mode&=-366}},write:{get:function(){return(this.mode&fr)===fr},set:function(e){e?this.mode|=fr:this.mode&=-147}},isFolder:{get:function(){return Ue.isDir(this.mode)}},isDevice:{get:function(){return Ue.isChrdev(this.mode)}}}),Ue.FSNode=lr,Ue.staticInit(),Fe={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Oe=e}(),qe=t.BindingError=Ge(Error,"BindingError"),Ke=t.InternalError=Ge(Error,"InternalError"),bt.prototype.isAliasOf=Ze,bt.prototype.clone=vt,bt.prototype.delete=yt,bt.prototype.isDeleted=_t,bt.prototype.deleteLater=gt,t.getInheritedInstanceCount=st,t.getLiveInheritedInstances=ot,t.flushPendingDeletes=ct,t.setDelayFunction=lt,Bt.prototype.getPointee=Tt,Bt.prototype.destructor=xt,Bt.prototype.argPackAdvance=8,Bt.prototype.readValueFromPointer=Ct,Bt.prototype.deleteObject=Dt,Bt.prototype.fromWireType=pt,Ft=t.UnboundTypeError=Ge(Error,"UnboundTypeError"),t.count_emval_handles=Gt,t.get_first_emval=qt;var pr={__syscall_fcntl64:function(e,t,r){Re.varargs=r;try{var n=Re.getStreamFromFD(e);switch(t){case 0:return(i=Re.get())<0?-28:Ue.createStream(n,i).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var i=Re.get();return n.flags|=i,0;case 5:i=Re.get();return N[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return s=28,H[_r()>>2]=s,-1}}catch(e){if(void 0===Ue||!(e instanceof Ue.ErrnoError))throw e;return-e.errno}var s},__syscall_openat:function(e,t,r,n){Re.varargs=n;try{t=Re.getStr(t),t=Re.calculateAt(e,t);var i=n?Re.get():0;return Ue.open(t,r,i).fd}catch(e){if(void 0===Ue||!(e instanceof Ue.ErrnoError))throw e;return-e.errno}},_embind_register_bigint:function(e,t,r,n,i){},_embind_register_bool:function(e,t,r,n,i){var s=Le(r);$e(e,{name:t=Ne(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:i},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=L;else if(2===r)n=N;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=H}return this.fromWireType(n[e>>s])},destructorFunction:null})},_embind_register_class:function(e,r,n,i,s,o,a,c,u,l,d,f,h){d=Ne(d),o=Pt(s,o),c&&(c=Pt(a,c)),l&&(l=Pt(u,l)),h=Pt(f,h);var p=je(d);!function(e,r,n){t.hasOwnProperty(e)?((void 0===n||void 0!==t[e].overloadTable&&void 0!==t[e].overloadTable[n])&&Ye("Cannot register public name '"+e+"' twice"),wt(t,e,e),t.hasOwnProperty(n)&&Ye("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),t[e].overloadTable[n]=r):(t[e]=r,void 0!==n&&(t[e].numArguments=n))}(p,(function(){Rt("Cannot construct "+d+" due to unbound types",[i])})),Je([e,r,n],i?[i]:[],(function(r){var n,s;r=r[0],s=i?(n=r.registeredClass).instancePrototype:bt.prototype;var a=We(p,(function(){if(Object.getPrototypeOf(this)!==u)throw new qe("Use 'new' to construct "+d);if(void 0===f.constructor_body)throw new qe(d+" has no accessible constructor");var e=f.constructor_body[arguments.length];if(void 0===e)throw new qe("Tried to invoke ctor of "+d+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),u=Object.create(s,{constructor:{value:a}});a.prototype=u;var f=new St(d,a,u,h,n,o,c,l),m=new Bt(d,f,!0,!1,!1),v=new Bt(d+"*",f,!1,!1,!1),y=new Bt(d+" const*",f,!1,!0,!1);return it[e]={pointerType:v,constPointerType:y},function(e,r,n){t.hasOwnProperty(e)||Xe("Replacing nonexistant public symbol"),void 0!==t[e].overloadTable&&void 0!==n?t[e].overloadTable[n]=r:(t[e]=r,t[e].argCount=n)}(p,a),[m,v,y]}))},_embind_register_class_constructor:function(e,t,r,n,i,s){x(t>0);var o=Lt(t,r);i=Pt(n,i),Je([],[e],(function(e){var r="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new qe("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=()=>{Rt("Cannot construct "+e.name+" due to unbound types",o)},Je([],o,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=zt(r,n,null,i,s),[]})),[]}))},_embind_register_class_function:function(e,t,r,n,i,s,o,a){var c=Lt(r,n);t=Ne(t),s=Pt(i,s),Je([],[e],(function(e){var n=(e=e[0]).name+"."+t;function i(){Rt("Cannot call "+n+" due to unbound types",c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,l=u[t];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===r-2?(i.argCount=r-2,i.className=e.name,u[t]=i):(wt(u,t,n),u[t].overloadTable[r-2]=i),Je([],c,(function(i){var a=zt(n,i,e,s,o);return void 0===u[t].overloadTable?(a.argCount=r-2,u[t]=a):u[t].overloadTable[r-2]=a,[]})),[]}))},_embind_register_class_property:function(e,t,r,n,i,s,o,a,c,u){t=Ne(t),i=Pt(n,i),Je([],[e],(function(e){var n=(e=e[0]).name+"."+t,l={get:function(){Rt("Cannot access "+n+" due to unbound types",[r,o])},enumerable:!0,configurable:!0};return l.set=c?()=>{Rt("Cannot access "+n+" due to unbound types",[r,o])}:e=>{Ye(n+" is a read-only property")},Object.defineProperty(e.registeredClass.instancePrototype,t,l),Je([],c?[r,o]:[r],(function(r){var o=r[0],l={get:function(){var t=Ht(this,e,n+" getter");return o.fromWireType(i(s,t))},enumerable:!0};if(c){c=Pt(a,c);var d=r[1];l.set=function(t){var r=Ht(this,e,n+" setter"),i=[];c(u,r,d.toWireType(i,t)),Ot(i)}}return Object.defineProperty(e.registeredClass.instancePrototype,t,l),[]})),[]}))},_embind_register_emval:function(e,t){$e(e,{name:t=Ne(t),fromWireType:function(e){var t=Yt.toValue(e);return Wt(e),t},toWireType:function(e,t){return Yt.toHandle(t)},argPackAdvance:8,readValueFromPointer:Ct,destructorFunction:null})},_embind_register_float:function(e,t,r){var n=Le(r);$e(e,{name:t=Ne(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Kt(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:Xt(t,n),destructorFunction:null})},_embind_register_integer:function(e,t,r,n,i){t=Ne(t),-1===i&&(i=4294967295);var s=Le(r),o=e=>e;if(0===n){var a=32-8*r;o=e=>e<>>a}var c=t.includes("unsigned"),u=(e,r)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+Kt(e)+'" to '+r);if(ei)throw new TypeError('Passing a number "'+Kt(e)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+i+"]!")};$e(e,{name:t,fromWireType:o,toWireType:c?function(e,t){return u(t,this.name),t>>>0}:function(e,t){return u(t,this.name),t},argPackAdvance:8,readValueFromPointer:Jt(t,s,0!==n),destructorFunction:null})},_embind_register_memory_view:function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=V,r=t[e>>=2],i=t[e+1];return new n(R,i,r)}$e(e,{name:r=Ne(r),fromWireType:i,argPackAdvance:8,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:function(e,t){var r="std::string"===(t=Ne(t));$e(e,{name:t,fromWireType:function(e){var t,n=V[e>>2];if(r)for(var i=e+4,s=0;s<=n;++s){var o=e+4+s;if(s==n||0==O[o]){var a=M(i,o-i);void 0===t?t=a:(t+=String.fromCharCode(0),t+=a),i=o+1}}else{var c=new Array(n);for(s=0;sU(t):()=>t.length)(),s=vr(4+i+1);if(V[s>>2]=i,r&&n)F(t,s+4,i+1);else if(n)for(var o=0;o255&&(mr(s),Ye("String has UTF-16 code units that do not fit in 8 bits")),O[s+4+o]=a}else for(o=0;oz,a=1):4===t&&(n=X,i=J,o=$,s=()=>V,a=2),$e(e,{name:r,fromWireType:function(e){for(var r,i=V[e>>2],o=s(),c=e+4,u=0;u<=i;++u){var l=e+4+u*t;if(u==i||0==o[l>>a]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return mr(e),r},toWireType:function(e,n){"string"!=typeof n&&Ye("Cannot pass non-string to C++ string type "+r);var s=o(n),c=vr(4+s+t);return V[c>>2]=s>>a,i(n,c+4,s+t),null!==e&&e.push(mr,c),c},argPackAdvance:8,readValueFromPointer:Ct,destructorFunction:function(e){mr(e)}})},_embind_register_void:function(e,t){$e(e,{isVoid:!0,name:t=Ne(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},_emscripten_date_now:function(){return Date.now()},_emval_as:function(e,t,r){e=Yt.toValue(e),t=$t(t,"emval::as");var n=[],i=Yt.toHandle(n);return H[r>>2]=i,t.toWireType(n,e)},_emval_call_void_method:function(e,t,r,n){var i,s;(e=Qt[e])(t=Yt.toValue(t),r=void 0===(s=Zt[i=r])?Ne(i):s,null,n)},_emval_decref:Wt,_emval_get_method_caller:function(e,t){var r=function(e,t){for(var r=new Array(e),n=0;n>2)+n],"parameter "+n);return r}(e,t),n=r[0],i=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",s=er[i];if(void 0!==s)return s;for(var o=["retType"],a=[n],c="",u=0;u4&&(jt[e].refcount+=1)},_emval_run_destructors:function(e){Ot(Yt.toValue(e)),Wt(e)},_emval_take_value:function(e,t){var r=(e=$t(e,"_emval_take_value")).readValueFromPointer(t);return Yt.toHandle(r)},_gmtime_js:function(e,t){var r=new Date(1e3*H[e>>2]);H[t>>2]=r.getUTCSeconds(),H[t+4>>2]=r.getUTCMinutes(),H[t+8>>2]=r.getUTCHours(),H[t+12>>2]=r.getUTCDate(),H[t+16>>2]=r.getUTCMonth(),H[t+20>>2]=r.getUTCFullYear()-1900,H[t+24>>2]=r.getUTCDay();var n=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),i=(r.getTime()-n)/864e5|0;H[t+28>>2]=i},_localtime_js:function(e,t){var r=new Date(1e3*H[e>>2]);H[t>>2]=r.getSeconds(),H[t+4>>2]=r.getMinutes(),H[t+8>>2]=r.getHours(),H[t+12>>2]=r.getDate(),H[t+16>>2]=r.getMonth(),H[t+20>>2]=r.getFullYear()-1900,H[t+24>>2]=r.getDay();var n=new Date(r.getFullYear(),0,1),i=(r.getTime()-n.getTime())/864e5|0;H[t+28>>2]=i,H[t+36>>2]=-60*r.getTimezoneOffset();var s=new Date(r.getFullYear(),6,1).getTimezoneOffset(),o=n.getTimezoneOffset(),a=0|(s!=o&&r.getTimezoneOffset()==Math.min(o,s));H[t+32>>2]=a},_mktime_js:function(e){var t=new Date(H[e+20>>2]+1900,H[e+16>>2],H[e+12>>2],H[e+8>>2],H[e+4>>2],H[e>>2],0),r=H[e+32>>2],n=t.getTimezoneOffset(),i=new Date(t.getFullYear(),0,1),s=new Date(t.getFullYear(),6,1).getTimezoneOffset(),o=i.getTimezoneOffset(),a=Math.min(o,s);if(r<0)H[e+32>>2]=Number(s!=o&&a==n);else if(r>0!=(a==n)){var c=Math.max(o,s),u=r>0?a:c;t.setTime(t.getTime()+6e4*(u-n))}H[e+24>>2]=t.getDay();var l=(t.getTime()-i.getTime())/864e5|0;return H[e+28>>2]=l,H[e>>2]=t.getSeconds(),H[e+4>>2]=t.getMinutes(),H[e+8>>2]=t.getHours(),H[e+12>>2]=t.getDate(),H[e+16>>2]=t.getMonth(),t.getTime()/1e3|0},_tzset_js:function e(t,r,n){e.called||(e.called=!0,function(e,t,r){var n=(new Date).getFullYear(),i=new Date(n,0,1),s=new Date(n,6,1),o=i.getTimezoneOffset(),a=s.getTimezoneOffset(),c=Math.max(o,a);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}H[e>>2]=60*c,H[t>>2]=Number(o!=a);var l=u(i),d=u(s),f=Z(l),h=Z(d);a>2]=f,H[r+4>>2]=h):(H[r>>2]=h,H[r+4>>2]=f)}(t,r,n))},abort:function(){ve("native code called abort()")},emscripten_log:function(e,t,r){or(e,B(ir(t,r),0))},emscripten_resize_heap:function(e){var t=O.length;x((e>>>=0)>t);var r,n,i=2147483648;if(e>i)return S("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is "+"2147483648 bytes!"),!1;for(var s=1;s<=4;s*=2){var o=t*(1+.2/s);o=Math.min(o,e+100663296);var a=Math.min(i,(r=Math.max(e,o))+((n=65536)-r%n)%n);if(ar(a))return!0}return S("Failed to grow the heap from "+t+" bytes to "+a+" bytes, not enough memory!"),!1},environ_get:function(e,t){var r=0;return ur().forEach((function(n,i){var s=t+r;H[e+4*i>>2]=s,function(e,t,r){for(var n=0;n>0]=e.charCodeAt(n);r||(L[t>>0]=0)}(n,s),r+=n.length+1})),0},environ_sizes_get:function(e,t){var r=ur();H[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),H[t>>2]=n,0},fd_close:function(e){try{var t=Re.getStreamFromFD(e);return Ue.close(t),0}catch(e){if(void 0===Ue||!(e instanceof Ue.ErrnoError))throw e;return e.errno}},fd_fdstat_get:function(e,t){try{var r=Re.getStreamFromFD(e),n=r.tty?2:Ue.isDir(r.mode)?3:Ue.isLink(r.mode)?7:4;return L[t>>0]=n,0}catch(e){if(void 0===Ue||!(e instanceof Ue.ErrnoError))throw e;return e.errno}},fd_read:function(e,t,r,n){try{var i=Re.getStreamFromFD(e),s=Re.doReadv(i,t,r);return H[n>>2]=s,0}catch(e){if(void 0===Ue||!(e instanceof Ue.ErrnoError))throw e;return e.errno}},fd_seek:function(e,t,r,n,i){try{var s=Re.getStreamFromFD(e),o=4294967296*r+(t>>>0),a=9007199254740992;return o<=-a||o>=a?-61:(Ue.llseek(s,o,n),ge=[s.position>>>0,(_e=s.position,+Math.abs(_e)>=1?_e>0?(0|Math.min(+Math.floor(_e/4294967296),4294967295))>>>0:~~+Math.ceil((_e-+(~~_e>>>0))/4294967296)>>>0:0)],H[i>>2]=ge[0],H[i+4>>2]=ge[1],s.getdents&&0===o&&0===n&&(s.getdents=null),0)}catch(e){if(void 0===Ue||!(e instanceof Ue.ErrnoError))throw e;return e.errno}},fd_write:function(e,t,r,n){try{var i=Re.getStreamFromFD(e),s=Re.doWritev(i,t,r);return H[n>>2]=s,0}catch(e){if(void 0===Ue||!(e instanceof Ue.ErrnoError))throw e;return e.errno}},setTempRet0:function(e){}};!function(){var e={env:pr,wasi_snapshot_preview1:pr};function r(e,r){var n,i=e.exports;t.asm=i,x(b=t.asm.memory,"memory not found in wasm exports"),Q(b.buffer),x(te=t.asm.__indirect_function_table,"table not found in wasm exports"),n=t.asm.__wasm_call_ctors,oe.unshift(n),me("wasm-instantiate")}pe("wasm-instantiate");var n=t;function s(e){x(t===n,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),n=null,r(e.instance)}function o(t){return function(){if(!g&&(i||c)){if("function"==typeof fetch&&!we(ye))return fetch(ye,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ye+"'";return e.arrayBuffer()})).catch((function(){return Ee(ye)}));if(f)return new Promise((function(e,t){f(ye,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return Ee(ye)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){S("failed to asynchronously prepare wasm: "+e),we(ye)&&S("warning: Loading from a file URI ("+ye+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),ve(e)}))}if(t.instantiateWasm)try{return t.instantiateWasm(e,r)}catch(e){return S("Module.instantiateWasm callback failed with error: "+e),!1}g||"function"!=typeof WebAssembly.instantiateStreaming||be(ye)||we(ye)||"function"!=typeof fetch?o(s):fetch(ye,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(s,(function(e){return S("wasm streaming compile failed: "+e),S("falling back to ArrayBuffer instantiation"),o(s)}))}))}(),t.___wasm_call_ctors=Se("__wasm_call_ctors");var mr=t._free=Se("free"),vr=t._malloc=Se("malloc"),yr=t._strlen=Se("strlen"),_r=t.___errno_location=Se("__errno_location"),gr=t.___getTypeName=Se("__getTypeName");t.___embind_register_native_and_builtin_types=Se("__embind_register_native_and_builtin_types");var br=t.___stdio_exit=Se("__stdio_exit"),wr=t._emscripten_builtin_memalign=Se("emscripten_builtin_memalign"),Sr=t._emscripten_stack_init=function(){return(Sr=t._emscripten_stack_init=t.asm.emscripten_stack_init).apply(null,arguments)};t._emscripten_stack_get_free=function(){return(t._emscripten_stack_get_free=t.asm.emscripten_stack_get_free).apply(null,arguments)},t._emscripten_stack_get_base=function(){return(t._emscripten_stack_get_base=t.asm.emscripten_stack_get_base).apply(null,arguments)};var Er,Ir=t._emscripten_stack_get_end=function(){return(Ir=t._emscripten_stack_get_end=t.asm.emscripten_stack_get_end).apply(null,arguments)};function Ar(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function kr(e){function r(){Er||(Er=!0,t.calledRun=!0,T||(ie(),x(!ce),ce=!0,t.noFSInit||Ue.init.initialized||Ue.init(),Ue.ignorePermissions=!1,Ie(oe),t.onRuntimeInitialized&&t.onRuntimeInitialized(),x(!t._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),function(){if(ie(),t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;)e=t.postRun.shift(),ae.unshift(e);var e;Ie(ae)}()))}ue>0||(Sr(),ne(),function(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)e=t.preRun.shift(),se.unshift(e);var e;Ie(se)}(),ue>0||(t.setStatus?(t.setStatus("Running..."),setTimeout((function(){setTimeout((function(){t.setStatus("")}),1),r()}),1)):r(),ie()))}if(t.stackSave=Se("stackSave"),t.stackRestore=Se("stackRestore"),t.stackAlloc=Se("stackAlloc"),t.dynCall_ijiii=Se("dynCall_ijiii"),t.dynCall_viiijj=Se("dynCall_viiijj"),t.dynCall_jij=Se("dynCall_jij"),t.dynCall_jii=Se("dynCall_jii"),t.dynCall_jiji=Se("dynCall_jiji"),t._ff_h264_cabac_tables=112940,C("intArrayFromString",!1),C("intArrayToString",!1),C("ccall",!1),C("cwrap",!1),C("setValue",!1),C("getValue",!1),C("allocate",!1),C("UTF8ArrayToString",!1),C("UTF8ToString",!1),C("stringToUTF8Array",!1),C("stringToUTF8",!1),C("lengthBytesUTF8",!1),C("stackTrace",!1),C("addOnPreRun",!1),C("addOnInit",!1),C("addOnPreMain",!1),C("addOnExit",!1),C("addOnPostRun",!1),C("writeStringToMemory",!1),C("writeArrayToMemory",!1),C("writeAsciiToMemory",!1),C("addRunDependency",!0),C("removeRunDependency",!0),C("FS_createFolder",!1),C("FS_createPath",!0),C("FS_createDataFile",!0),C("FS_createPreloadedFile",!0),C("FS_createLazyFile",!0),C("FS_createLink",!1),C("FS_createDevice",!0),C("FS_unlink",!0),C("getLEB",!1),C("getFunctionTables",!1),C("alignFunctionTables",!1),C("registerFunctions",!1),C("addFunction",!1),C("removeFunction",!1),C("prettyPrint",!1),C("dynCall",!1),C("getCompilerSetting",!1),C("print",!1),C("printErr",!1),C("getTempRet0",!1),C("setTempRet0",!1),C("callMain",!1),C("abort",!1),C("keepRuntimeAlive",!1),C("ptrToString",!1),C("zeroMemory",!1),C("stringToNewUTF8",!1),C("emscripten_realloc_buffer",!1),C("ENV",!1),C("ERRNO_CODES",!1),C("ERRNO_MESSAGES",!1),C("setErrNo",!1),C("inetPton4",!1),C("inetNtop4",!1),C("inetPton6",!1),C("inetNtop6",!1),C("readSockaddr",!1),C("writeSockaddr",!1),C("DNS",!1),C("getHostByName",!1),C("Protocols",!1),C("Sockets",!1),C("getRandomDevice",!1),C("traverseStack",!1),C("UNWIND_CACHE",!1),C("convertPCtoSourceLocation",!1),C("readAsmConstArgsArray",!1),C("readAsmConstArgs",!1),C("mainThreadEM_ASM",!1),C("jstoi_q",!1),C("jstoi_s",!1),C("getExecutableName",!1),C("listenOnce",!1),C("autoResumeAudioContext",!1),C("dynCallLegacy",!1),C("getDynCaller",!1),C("dynCall",!1),C("setWasmTableEntry",!1),C("getWasmTableEntry",!1),C("handleException",!1),C("runtimeKeepalivePush",!1),C("runtimeKeepalivePop",!1),C("callUserCallback",!1),C("maybeExit",!1),C("safeSetTimeout",!1),C("asmjsMangle",!1),C("asyncLoad",!1),C("alignMemory",!1),C("mmapAlloc",!1),C("reallyNegative",!1),C("unSign",!1),C("reSign",!1),C("formatString",!1),C("PATH",!1),C("PATH_FS",!1),C("SYSCALLS",!1),C("getSocketFromFD",!1),C("getSocketAddress",!1),C("JSEvents",!1),C("registerKeyEventCallback",!1),C("specialHTMLTargets",!1),C("maybeCStringToJsString",!1),C("findEventTarget",!1),C("findCanvasEventTarget",!1),C("getBoundingClientRect",!1),C("fillMouseEventData",!1),C("registerMouseEventCallback",!1),C("registerWheelEventCallback",!1),C("registerUiEventCallback",!1),C("registerFocusEventCallback",!1),C("fillDeviceOrientationEventData",!1),C("registerDeviceOrientationEventCallback",!1),C("fillDeviceMotionEventData",!1),C("registerDeviceMotionEventCallback",!1),C("screenOrientation",!1),C("fillOrientationChangeEventData",!1),C("registerOrientationChangeEventCallback",!1),C("fillFullscreenChangeEventData",!1),C("registerFullscreenChangeEventCallback",!1),C("registerRestoreOldStyle",!1),C("hideEverythingExceptGivenElement",!1),C("restoreHiddenElements",!1),C("setLetterbox",!1),C("currentFullscreenStrategy",!1),C("restoreOldWindowedStyle",!1),C("softFullscreenResizeWebGLRenderTarget",!1),C("doRequestFullscreen",!1),C("fillPointerlockChangeEventData",!1),C("registerPointerlockChangeEventCallback",!1),C("registerPointerlockErrorEventCallback",!1),C("requestPointerLock",!1),C("fillVisibilityChangeEventData",!1),C("registerVisibilityChangeEventCallback",!1),C("registerTouchEventCallback",!1),C("fillGamepadEventData",!1),C("registerGamepadEventCallback",!1),C("registerBeforeUnloadEventCallback",!1),C("fillBatteryEventData",!1),C("battery",!1),C("registerBatteryEventCallback",!1),C("setCanvasElementSize",!1),C("getCanvasElementSize",!1),C("demangle",!1),C("demangleAll",!1),C("jsStackTrace",!1),C("stackTrace",!1),C("getEnvStrings",!1),C("checkWasiClock",!1),C("writeI53ToI64",!1),C("writeI53ToI64Clamped",!1),C("writeI53ToI64Signaling",!1),C("writeI53ToU64Clamped",!1),C("writeI53ToU64Signaling",!1),C("readI53FromI64",!1),C("readI53FromU64",!1),C("convertI32PairToI53",!1),C("convertU32PairToI53",!1),C("dlopenMissingError",!1),C("setImmediateWrapped",!1),C("clearImmediateWrapped",!1),C("polyfillSetImmediate",!1),C("uncaughtExceptionCount",!1),C("exceptionLast",!1),C("exceptionCaught",!1),C("ExceptionInfo",!1),C("exception_addRef",!1),C("exception_decRef",!1),C("Browser",!1),C("setMainLoop",!1),C("wget",!1),C("FS",!1),C("MEMFS",!1),C("TTY",!1),C("PIPEFS",!1),C("SOCKFS",!1),C("_setNetworkCallback",!1),C("tempFixedLengthArray",!1),C("miniTempWebGLFloatBuffers",!1),C("heapObjectForWebGLType",!1),C("heapAccessShiftForWebGLHeap",!1),C("GL",!1),C("emscriptenWebGLGet",!1),C("computeUnpackAlignedImageSize",!1),C("emscriptenWebGLGetTexPixelData",!1),C("emscriptenWebGLGetUniform",!1),C("webglGetUniformLocation",!1),C("webglPrepareUniformLocationsBeforeFirstUse",!1),C("webglGetLeftBracePos",!1),C("emscriptenWebGLGetVertexAttrib",!1),C("writeGLArray",!1),C("AL",!1),C("SDL_unicode",!1),C("SDL_ttfContext",!1),C("SDL_audio",!1),C("SDL",!1),C("SDL_gfx",!1),C("GLUT",!1),C("EGL",!1),C("GLFW_Window",!1),C("GLFW",!1),C("GLEW",!1),C("IDBStore",!1),C("runAndAbortIfError",!1),C("InternalError",!1),C("BindingError",!1),C("UnboundTypeError",!1),C("PureVirtualError",!1),C("init_embind",!1),C("throwInternalError",!1),C("throwBindingError",!1),C("throwUnboundTypeError",!1),C("ensureOverloadTable",!1),C("exposePublicSymbol",!1),C("replacePublicSymbol",!1),C("extendError",!1),C("createNamedFunction",!1),C("registeredInstances",!1),C("getBasestPointer",!1),C("registerInheritedInstance",!1),C("unregisterInheritedInstance",!1),C("getInheritedInstance",!1),C("getInheritedInstanceCount",!1),C("getLiveInheritedInstances",!1),C("registeredTypes",!1),C("awaitingDependencies",!1),C("typeDependencies",!1),C("registeredPointers",!1),C("registerType",!1),C("whenDependentTypesAreResolved",!1),C("embind_charCodes",!1),C("embind_init_charCodes",!1),C("readLatin1String",!1),C("getTypeName",!1),C("heap32VectorToArray",!1),C("requireRegisteredType",!1),C("getShiftFromSize",!1),C("integerReadValueFromPointer",!1),C("enumReadValueFromPointer",!1),C("floatReadValueFromPointer",!1),C("simpleReadValueFromPointer",!1),C("runDestructors",!1),C("new_",!1),C("craftInvokerFunction",!1),C("embind__requireFunction",!1),C("tupleRegistrations",!1),C("structRegistrations",!1),C("genericPointerToWireType",!1),C("constNoSmartPtrRawPointerToWireType",!1),C("nonConstNoSmartPtrRawPointerToWireType",!1),C("init_RegisteredPointer",!1),C("RegisteredPointer",!1),C("RegisteredPointer_getPointee",!1),C("RegisteredPointer_destructor",!1),C("RegisteredPointer_deleteObject",!1),C("RegisteredPointer_fromWireType",!1),C("runDestructor",!1),C("releaseClassHandle",!1),C("finalizationRegistry",!1),C("detachFinalizer_deps",!1),C("detachFinalizer",!1),C("attachFinalizer",!1),C("makeClassHandle",!1),C("init_ClassHandle",!1),C("ClassHandle",!1),C("ClassHandle_isAliasOf",!1),C("throwInstanceAlreadyDeleted",!1),C("ClassHandle_clone",!1),C("ClassHandle_delete",!1),C("deletionQueue",!1),C("ClassHandle_isDeleted",!1),C("ClassHandle_deleteLater",!1),C("flushPendingDeletes",!1),C("delayFunction",!1),C("setDelayFunction",!1),C("RegisteredClass",!1),C("shallowCopyInternalPointer",!1),C("downcastPointer",!1),C("upcastPointer",!1),C("validateThis",!1),C("char_0",!1),C("char_9",!1),C("makeLegalFunctionName",!1),C("emval_handle_array",!1),C("emval_free_list",!1),C("emval_symbols",!1),C("init_emval",!1),C("count_emval_handles",!1),C("get_first_emval",!1),C("getStringOrSymbol",!1),C("Emval",!1),C("emval_newers",!1),C("craftEmvalAllocator",!1),C("emval_get_global",!1),C("emval_methodCallers",!1),C("emval_registeredMethods",!1),C("warnOnce",!1),C("stackSave",!1),C("stackRestore",!1),C("stackAlloc",!1),C("AsciiToString",!1),C("stringToAscii",!1),C("UTF16ToString",!1),C("stringToUTF16",!1),C("lengthBytesUTF16",!1),C("UTF32ToString",!1),C("stringToUTF32",!1),C("lengthBytesUTF32",!1),C("allocateUTF8",!1),C("allocateUTF8OnStack",!1),t.writeStackCookie=ne,t.checkStackCookie=ie,k("ALLOC_NORMAL",!1),k("ALLOC_STACK",!1),de=function e(){Er||kr(),Er||(de=e)},t.run=kr,t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.pop()();kr(),e.exports=t})),p=b;!function(e,t){for(var r=b,n=e();;)try{if(449290===parseInt(r(343))/1*(-parseInt(r(338))/2)+-parseInt(r(324))/3*(-parseInt(r(336))/4)+parseInt(r(329))/5*(parseInt(r(339))/6)+parseInt(r(328))/7*(-parseInt(r(342))/8)+parseInt(r(331))/9*(parseInt(r(335))/10)+parseInt(r(334))/11*(parseInt(r(340))/12)+-parseInt(r(326))/13*(parseInt(r(337))/14))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(_);var m=1e-6,v="undefined"!=typeof Float32Array?Float32Array:Array,y=Math[p(341)];function _(){var e=["9uzMGVl","max","sqrt","4740494wflbGp","4122490nRXOTI","932NZsZgp","140DhbjFU","3756vRZwLu","2781462bwOKQt","12zJyiKw","random","8XbMmgk","52OgcOrc","3903wDsBPE","abs","478036gWguhi","hypot","4866729DqGbgi","5SaERum","length"];return(_=function(){return e})()}var g=Math.PI/180;function b(e,t){var r=_();return(b=function(e,t){return r[e-=324]})(e,t)}Math[p(327)]||(Math[p(327)]=function(){for(var e=p,t=0,r=arguments[e(330)];r--;)t+=arguments[r]*arguments[r];return Math[e(333)](t)});var w=Object.freeze({__proto__:null,EPSILON:m,get ARRAY_TYPE(){return v},RANDOM:y,setMatrixArrayType:function(e){v=e},toRadian:function(e){return e*g},equals:function(e,t){var r=p;return Math.abs(e-t)<=m*Math[r(332)](1,Math[r(325)](e),Math[r(325)](t))}});function S(e,t){var r=k();return(S=function(e,t){return r[e-=100]})(e,t)}function E(){var e=S,t=new v(16);return w[e(112)]!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function I(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function A(e,t,r){var n=t[0],i=t[1],s=t[2],o=t[3],a=t[4],c=t[5],u=t[6],l=t[7],d=t[8],f=t[9],h=t[10],p=t[11],m=t[12],v=t[13],y=t[14],_=t[15],g=r[0],b=r[1],w=r[2],S=r[3];return e[0]=g*n+b*a+w*d+S*m,e[1]=g*i+b*c+w*f+S*v,e[2]=g*s+b*u+w*h+S*y,e[3]=g*o+b*l+w*p+S*_,g=r[4],b=r[5],w=r[6],S=r[7],e[4]=g*n+b*a+w*d+S*m,e[5]=g*i+b*c+w*f+S*v,e[6]=g*s+b*u+w*h+S*y,e[7]=g*o+b*l+w*p+S*_,g=r[8],b=r[9],w=r[10],S=r[11],e[8]=g*n+b*a+w*d+S*m,e[9]=g*i+b*c+w*f+S*v,e[10]=g*s+b*u+w*h+S*y,e[11]=g*o+b*l+w*p+S*_,g=r[12],b=r[13],w=r[14],S=r[15],e[12]=g*n+b*a+w*d+S*m,e[13]=g*i+b*c+w*f+S*v,e[14]=g*s+b*u+w*h+S*y,e[15]=g*o+b*l+w*p+S*_,e}function k(){var e=["3117790WYkEvo","217244FYPwcv","leftDegrees","sqrt","15HqwUHQ","hypot","4901958NrAouq","16EWdHKr","20bbzdFN","EPSILON","mat4(","max","upDegrees","tan","ARRAY_TYPE","4497248hacBwl","4563712EnbHFR","cos","sin","abs","113562oGepsy","594756GKoPGf"];return(k=function(){return e})()}function C(e,t,r){var n=t[0],i=t[1],s=t[2],o=t[3],a=n+n,c=i+i,u=s+s,l=n*a,d=n*c,f=n*u,h=i*c,p=i*u,m=s*u,v=o*a,y=o*c,_=o*u;return e[0]=1-(h+m),e[1]=d+_,e[2]=f-y,e[3]=0,e[4]=d-_,e[5]=1-(l+m),e[6]=p+v,e[7]=0,e[8]=f+y,e[9]=p-v,e[10]=1-(l+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function T(e,t){var r=S,n=t[0],i=t[1],s=t[2],o=t[4],a=t[5],c=t[6],u=t[8],l=t[9],d=t[10];return e[0]=Math[r(103)](n,i,s),e[1]=Math[r(103)](o,a,c),e[2]=Math[r(103)](u,l,d),e}function x(e,t,r,n,i){var s,o=1/Math.tan(t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(s=1/(n-i),e[10]=(i+n)*s,e[14]=2*i*n*s):(e[10]=-1,e[14]=-2*n),e}!function(e,t){for(var r=S,n=e();;)try{if(492814===parseInt(r(105))/1*(-parseInt(r(118))/2)+parseInt(r(102))/3*(-parseInt(r(121))/4)+parseInt(r(106))/5*(-parseInt(r(119))/6)+parseInt(r(113))/7+parseInt(r(114))/8+parseInt(r(104))/9+parseInt(r(120))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(k);var D=x;function B(e,t,r,n,i,s,o){var a=1/(t-r),c=1/(n-i),u=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*a,e[13]=(i+n)*c,e[14]=(o+s)*u,e[15]=1,e}var M=B;function P(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}var F=A,U=P,R=Object.freeze({__proto__:null,create:E,clone:function(e){var t=new(w[S(112)])(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},fromValues:function(e,t,r,n,i,s,o,a,c,u,l,d,f,h,p,m){var v=new(w[S(112)])(16);return v[0]=e,v[1]=t,v[2]=r,v[3]=n,v[4]=i,v[5]=s,v[6]=o,v[7]=a,v[8]=c,v[9]=u,v[10]=l,v[11]=d,v[12]=f,v[13]=h,v[14]=p,v[15]=m,v},set:function(e,t,r,n,i,s,o,a,c,u,l,d,f,h,p,m,v){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=s,e[5]=o,e[6]=a,e[7]=c,e[8]=u,e[9]=l,e[10]=d,e[11]=f,e[12]=h,e[13]=p,e[14]=m,e[15]=v,e},identity:I,transpose:function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],s=t[6],o=t[7],a=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=s,e[11]=t[14],e[12]=i,e[13]=o,e[14]=a}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e},invert:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],l=t[8],d=t[9],f=t[10],h=t[11],p=t[12],m=t[13],v=t[14],y=t[15],_=r*a-n*o,g=r*c-i*o,b=r*u-s*o,w=n*c-i*a,S=n*u-s*a,E=i*u-s*c,I=l*m-d*p,A=l*v-f*p,k=l*y-h*p,C=d*v-f*m,T=d*y-h*m,x=f*y-h*v,D=_*x-g*T+b*C+w*k-S*A+E*I;return D?(D=1/D,e[0]=(a*x-c*T+u*C)*D,e[1]=(i*T-n*x-s*C)*D,e[2]=(m*E-v*S+y*w)*D,e[3]=(f*S-d*E-h*w)*D,e[4]=(c*k-o*x-u*A)*D,e[5]=(r*x-i*k+s*A)*D,e[6]=(v*b-p*E-y*g)*D,e[7]=(l*E-f*b+h*g)*D,e[8]=(o*T-a*k+u*I)*D,e[9]=(n*k-r*T-s*I)*D,e[10]=(p*S-m*b+y*_)*D,e[11]=(d*b-l*S-h*_)*D,e[12]=(a*A-o*C-c*I)*D,e[13]=(r*C-n*A+i*I)*D,e[14]=(m*g-p*w-v*_)*D,e[15]=(l*w-d*g+f*_)*D,e):null},adjoint:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],l=t[8],d=t[9],f=t[10],h=t[11],p=t[12],m=t[13],v=t[14],y=t[15];return e[0]=a*(f*y-h*v)-d*(c*y-u*v)+m*(c*h-u*f),e[1]=-(n*(f*y-h*v)-d*(i*y-s*v)+m*(i*h-s*f)),e[2]=n*(c*y-u*v)-a*(i*y-s*v)+m*(i*u-s*c),e[3]=-(n*(c*h-u*f)-a*(i*h-s*f)+d*(i*u-s*c)),e[4]=-(o*(f*y-h*v)-l*(c*y-u*v)+p*(c*h-u*f)),e[5]=r*(f*y-h*v)-l*(i*y-s*v)+p*(i*h-s*f),e[6]=-(r*(c*y-u*v)-o*(i*y-s*v)+p*(i*u-s*c)),e[7]=r*(c*h-u*f)-o*(i*h-s*f)+l*(i*u-s*c),e[8]=o*(d*y-h*m)-l*(a*y-u*m)+p*(a*h-u*d),e[9]=-(r*(d*y-h*m)-l*(n*y-s*m)+p*(n*h-s*d)),e[10]=r*(a*y-u*m)-o*(n*y-s*m)+p*(n*u-s*a),e[11]=-(r*(a*h-u*d)-o*(n*h-s*d)+l*(n*u-s*a)),e[12]=-(o*(d*v-f*m)-l*(a*v-c*m)+p*(a*f-c*d)),e[13]=r*(d*v-f*m)-l*(n*v-i*m)+p*(n*f-i*d),e[14]=-(r*(a*v-c*m)-o*(n*v-i*m)+p*(n*c-i*a)),e[15]=r*(a*f-c*d)-o*(n*f-i*d)+l*(n*c-i*a),e},determinant:function(e){var t=e[0],r=e[1],n=e[2],i=e[3],s=e[4],o=e[5],a=e[6],c=e[7],u=e[8],l=e[9],d=e[10],f=e[11],h=e[12],p=e[13],m=e[14],v=e[15];return(t*o-r*s)*(d*v-f*m)-(t*a-n*s)*(l*v-f*p)+(t*c-i*s)*(l*m-d*p)+(r*a-n*o)*(u*v-f*h)-(r*c-i*o)*(u*m-d*h)+(n*c-i*a)*(u*p-l*h)},multiply:A,translate:function(e,t,r){var n,i,s,o,a,c,u,l,d,f,h,p,m=r[0],v=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*v+t[8]*y+t[12],e[13]=t[1]*m+t[5]*v+t[9]*y+t[13],e[14]=t[2]*m+t[6]*v+t[10]*y+t[14],e[15]=t[3]*m+t[7]*v+t[11]*y+t[15]):(n=t[0],i=t[1],s=t[2],o=t[3],a=t[4],c=t[5],u=t[6],l=t[7],d=t[8],f=t[9],h=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=s,e[3]=o,e[4]=a,e[5]=c,e[6]=u,e[7]=l,e[8]=d,e[9]=f,e[10]=h,e[11]=p,e[12]=n*m+a*v+d*y+t[12],e[13]=i*m+c*v+f*y+t[13],e[14]=s*m+u*v+h*y+t[14],e[15]=o*m+l*v+p*y+t[15]),e},scale:function(e,t,r){var n=r[0],i=r[1],s=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*s,e[9]=t[9]*s,e[10]=t[10]*s,e[11]=t[11]*s,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},rotate:function(e,t,r,n){var i,s,o,a,c,u,l,d,f,h,p,m,v,y,_,g,b,E,I,A,k,C,T,x,D=S,B=n[0],M=n[1],P=n[2],F=Math[D(103)](B,M,P);return F0?(r[0]=2*(a*o+l*n+c*s-u*i)/d,r[1]=2*(c*o+l*i+u*n-a*s)/d,r[2]=2*(u*o+l*s+a*i-c*n)/d):(r[0]=2*(a*o+l*n+c*s-u*i),r[1]=2*(c*o+l*i+u*n-a*s),r[2]=2*(u*o+l*s+a*i-c*n)),C(e,t,r),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:T,getRotation:function(e,t){var r=S,n=new(w[r(112)])(3);T(n,t);var i=1/n[0],s=1/n[1],o=1/n[2],a=t[0]*i,c=t[1]*s,u=t[2]*o,l=t[4]*i,d=t[5]*s,f=t[6]*o,h=t[8]*i,p=t[9]*s,m=t[10]*o,v=a+d+m,y=0;return v>0?(y=2*Math[r(101)](v+1),e[3]=.25*y,e[0]=(f-p)/y,e[1]=(h-u)/y,e[2]=(c-l)/y):a>d&&a>m?(y=2*Math[r(101)](1+a-d-m),e[3]=(f-p)/y,e[0]=.25*y,e[1]=(c+l)/y,e[2]=(h+u)/y):d>m?(y=2*Math.sqrt(1+d-a-m),e[3]=(h-u)/y,e[0]=(c+l)/y,e[1]=.25*y,e[2]=(f+p)/y):(y=2*Math[r(101)](1+m-a-d),e[3]=(c-l)/y,e[0]=(h+u)/y,e[1]=(f+p)/y,e[2]=.25*y),e},fromRotationTranslationScale:function(e,t,r,n){var i=t[0],s=t[1],o=t[2],a=t[3],c=i+i,u=s+s,l=o+o,d=i*c,f=i*u,h=i*l,p=s*u,m=s*l,v=o*l,y=a*c,_=a*u,g=a*l,b=n[0],w=n[1],S=n[2];return e[0]=(1-(p+v))*b,e[1]=(f+g)*b,e[2]=(h-_)*b,e[3]=0,e[4]=(f-g)*w,e[5]=(1-(d+v))*w,e[6]=(m+y)*w,e[7]=0,e[8]=(h+_)*S,e[9]=(m-y)*S,e[10]=(1-(d+p))*S,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e},fromRotationTranslationScaleOrigin:function(e,t,r,n,i){var s=t[0],o=t[1],a=t[2],c=t[3],u=s+s,l=o+o,d=a+a,f=s*u,h=s*l,p=s*d,m=o*l,v=o*d,y=a*d,_=c*u,g=c*l,b=c*d,w=n[0],S=n[1],E=n[2],I=i[0],A=i[1],k=i[2],C=(1-(m+y))*w,T=(h+b)*w,x=(p-g)*w,D=(h-b)*S,B=(1-(f+y))*S,M=(v+_)*S,P=(p+g)*E,F=(v-_)*E,U=(1-(f+m))*E;return e[0]=C,e[1]=T,e[2]=x,e[3]=0,e[4]=D,e[5]=B,e[6]=M,e[7]=0,e[8]=P,e[9]=F,e[10]=U,e[11]=0,e[12]=r[0]+I-(C*I+D*A+P*k),e[13]=r[1]+A-(T*I+B*A+F*k),e[14]=r[2]+k-(x*I+M*A+U*k),e[15]=1,e},fromQuat:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=r+r,a=n+n,c=i+i,u=r*o,l=n*o,d=n*a,f=i*o,h=i*a,p=i*c,m=s*o,v=s*a,y=s*c;return e[0]=1-d-p,e[1]=l+y,e[2]=f-v,e[3]=0,e[4]=l-y,e[5]=1-u-p,e[6]=h+m,e[7]=0,e[8]=f+v,e[9]=h-m,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},frustum:function(e,t,r,n,i,s,o){var a=1/(r-t),c=1/(i-n),u=1/(s-o);return e[0]=2*s*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*s*c,e[6]=0,e[7]=0,e[8]=(r+t)*a,e[9]=(i+n)*c,e[10]=(o+s)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*s*2*u,e[15]=0,e},perspectiveNO:x,perspective:D,perspectiveZO:function(e,t,r,n,i){var s,o=1/Math[S(111)](t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(s=1/(n-i),e[10]=i*s,e[14]=i*n*s):(e[10]=-1,e[14]=-n),e},perspectiveFromFieldOfView:function(e,t,r,n){var i=S,s=Math[i(111)](t[i(110)]*Math.PI/180),o=Math[i(111)](t.downDegrees*Math.PI/180),a=Math.tan(t[i(100)]*Math.PI/180),c=Math[i(111)](t.rightDegrees*Math.PI/180),u=2/(a+c),l=2/(s+o);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-(a-c)*u*.5,e[9]=(s-o)*l*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e},orthoNO:B,ortho:M,orthoZO:function(e,t,r,n,i,s,o){var a=1/(t-r),c=1/(n-i),u=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=u,e[11]=0,e[12]=(t+r)*a,e[13]=(i+n)*c,e[14]=s*u,e[15]=1,e},lookAt:function(e,t,r,n){var i,s,o,a,c,u,l,d,f,h,p=S,v=t[0],y=t[1],_=t[2],g=n[0],b=n[1],E=n[2],A=r[0],k=r[1],C=r[2];return Math[p(117)](v-A)0&&(d*=p=1/Math[i(101)](p),f*=p,h*=p);var m=u*h-l*f,v=l*d-c*h,y=c*f-u*d;return(p=m*m+v*v+y*y)>0&&(m*=p=1/Math.sqrt(p),v*=p,y*=p),e[0]=m,e[1]=v,e[2]=y,e[3]=0,e[4]=f*y-h*v,e[5]=h*m-d*y,e[6]=d*v-f*m,e[7]=0,e[8]=d,e[9]=f,e[10]=h,e[11]=0,e[12]=s,e[13]=o,e[14]=a,e[15]=1,e},str:function(e){return S(108)+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math[S(103)](e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},subtract:P,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var r=S,n=e[0],i=e[1],s=e[2],o=e[3],a=e[4],c=e[5],u=e[6],l=e[7],d=e[8],f=e[9],h=e[10],p=e[11],v=e[12],y=e[13],_=e[14],g=e[15],b=t[0],E=t[1],I=t[2],A=t[3],k=t[4],C=t[5],T=t[6],x=t[7],D=t[8],B=t[9],M=t[10],P=t[11],F=t[12],U=t[13],R=t[14],L=t[15];return Math[r(117)](n-b)<=w[r(107)]*Math[r(109)](1,Math[r(117)](n),Math[r(117)](b))&&Math[r(117)](i-E)<=w[r(107)]*Math[r(109)](1,Math[r(117)](i),Math[r(117)](E))&&Math[r(117)](s-I)<=w[r(107)]*Math.max(1,Math[r(117)](s),Math[r(117)](I))&&Math.abs(o-A)<=w[r(107)]*Math[r(109)](1,Math[r(117)](o),Math[r(117)](A))&&Math[r(117)](a-k)<=m*Math[r(109)](1,Math[r(117)](a),Math[r(117)](k))&&Math[r(117)](c-C)<=w[r(107)]*Math[r(109)](1,Math[r(117)](c),Math[r(117)](C))&&Math.abs(u-T)<=m*Math.max(1,Math[r(117)](u),Math[r(117)](T))&&Math[r(117)](l-x)<=w[r(107)]*Math[r(109)](1,Math[r(117)](l),Math.abs(x))&&Math[r(117)](d-D)<=m*Math[r(109)](1,Math.abs(d),Math.abs(D))&&Math[r(117)](f-B)<=w[r(107)]*Math[r(109)](1,Math[r(117)](f),Math[r(117)](B))&&Math.abs(h-M)<=w[r(107)]*Math[r(109)](1,Math.abs(h),Math.abs(M))&&Math[r(117)](p-P)<=m*Math[r(109)](1,Math[r(117)](p),Math[r(117)](P))&&Math[r(117)](v-F)<=m*Math[r(109)](1,Math[r(117)](v),Math[r(117)](F))&&Math[r(117)](y-U)<=w[r(107)]*Math[r(109)](1,Math.abs(y),Math[r(117)](U))&&Math[r(117)](_-R)<=w[r(107)]*Math[r(109)](1,Math.abs(_),Math.abs(R))&&Math[r(117)](g-L)<=w[r(107)]*Math.max(1,Math[r(117)](g),Math.abs(L))},mul:F,sub:U});function L(){var e=Z,t=new(w[e(330)])(3);return w[e(330)]!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function O(e){var t=Z,r=e[0],n=e[1],i=e[2];return Math[t(349)](r,n,i)}function N(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function z(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function H(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function V(e,t){var r=Z,n=t[0]-e[0],i=t[1]-e[1],s=t[2]-e[2];return Math[r(349)](n,i,s)}function j(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}function W(){var e=["406511vAoNUU","length","ceil","EPSILON","round","acos","RANDOM","floor","abs","min","51690WULqhD","33ZBLEzT","105RPXobL","sin","344864BFrptp","213947uSGHWp","max","sqrt","hypot","7034gSGvUf","691119bXBGpA","218620MXzgXp","8TxNRAf","cos","ARRAY_TYPE"];return(W=function(){return e})()}function G(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function q(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}!function(e,t){for(var r=Z,n=e();;)try{if(113233===parseInt(r(346))/1+-parseInt(r(350))/2*(parseInt(r(342))/3)+-parseInt(r(345))/4+parseInt(r(343))/5*(parseInt(r(341))/6)+parseInt(r(331))/7*(-parseInt(r(328))/8)+-parseInt(r(351))/9+-parseInt(r(352))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(W);var Y=N,K=z,X=H,J=V,$=j;function Z(e,t){var r=W();return(Z=function(e,t){return r[e-=328]})(e,t)}var Q,ee=O,te=G,re=(Q=L(),function(e,t,r,n,i,s){var o,a,c=Z;for(!t&&(t=3),!r&&(r=0),a=n?Math.min(n*t+r,e[c(332)]):e[c(332)],o=r;o0&&(o=1/Math[r(348)](o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e},dot:q,cross:function(e,t,r){var n=t[0],i=t[1],s=t[2],o=r[0],a=r[1],c=r[2];return e[0]=i*c-s*a,e[1]=s*o-n*c,e[2]=n*a-i*o,e},lerp:function(e,t,r,n){var i=t[0],s=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=s+n*(r[1]-s),e[2]=o+n*(r[2]-o),e},hermite:function(e,t,r,n,i,s){var o=s*s,a=o*(2*s-3)+1,c=o*(s-2)+s,u=o*(s-1),l=o*(3-2*s);return e[0]=t[0]*a+r[0]*c+n[0]*u+i[0]*l,e[1]=t[1]*a+r[1]*c+n[1]*u+i[1]*l,e[2]=t[2]*a+r[2]*c+n[2]*u+i[2]*l,e},bezier:function(e,t,r,n,i,s){var o=1-s,a=o*o,c=s*s,u=a*o,l=3*s*a,d=3*c*o,f=c*s;return e[0]=t[0]*u+r[0]*l+n[0]*d+i[0]*f,e[1]=t[1]*u+r[1]*l+n[1]*d+i[1]*f,e[2]=t[2]*u+r[2]*l+n[2]*d+i[2]*f,e},random:function(e,t){var r=Z;t=t||1;var n=2*y()*Math.PI,i=2*w[r(337)]()-1,s=Math.sqrt(1-i*i)*t;return e[0]=Math[r(329)](n)*s,e[1]=Math[r(344)](n)*s,e[2]=i*t,e},transformMat4:function(e,t,r){var n=t[0],i=t[1],s=t[2],o=r[3]*n+r[7]*i+r[11]*s+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*s+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*s+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*s+r[14])/o,e},transformMat3:function(e,t,r){var n=t[0],i=t[1],s=t[2];return e[0]=n*r[0]+i*r[3]+s*r[6],e[1]=n*r[1]+i*r[4]+s*r[7],e[2]=n*r[2]+i*r[5]+s*r[8],e},transformQuat:function(e,t,r){var n=r[0],i=r[1],s=r[2],o=r[3],a=t[0],c=t[1],u=t[2],l=i*u-s*c,d=s*a-n*u,f=n*c-i*a,h=i*f-s*d,p=s*l-n*f,m=n*d-i*l,v=2*o;return l*=v,d*=v,f*=v,h*=2,p*=2,m*=2,e[0]=a+l+h,e[1]=c+d+p,e[2]=u+f+m,e},rotateX:function(e,t,r,n){var i=Z,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[0],o[1]=s[1]*Math[i(329)](n)-s[2]*Math.sin(n),o[2]=s[1]*Math[i(344)](n)+s[2]*Math.cos(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateY:function(e,t,r,n){var i=Z,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[2]*Math[i(344)](n)+s[0]*Math[i(329)](n),o[1]=s[1],o[2]=s[2]*Math[i(329)](n)-s[0]*Math[i(344)](n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateZ:function(e,t,r,n){var i=Z,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[0]*Math[i(329)](n)-s[1]*Math[i(344)](n),o[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),o[2]=s[2],e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},angle:function(e,t){var r=Z,n=e[0],i=e[1],s=e[2],o=t[0],a=t[1],c=t[2],u=Math.sqrt(n*n+i*i+s*s)*Math[r(348)](o*o+a*a+c*c),l=u&&q(e,t)/u;return Math[r(336)](Math[r(340)](Math.max(l,-1),1))},zero:function(e){return e[0]=0,e[1]=0,e[2]=0,e},str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},equals:function(e,t){var r=Z,n=e[0],i=e[1],s=e[2],o=t[0],a=t[1],c=t[2];return Math.abs(n-o)<=w[r(334)]*Math.max(1,Math[r(339)](n),Math.abs(o))&&Math[r(339)](i-a)<=w[r(334)]*Math.max(1,Math[r(339)](i),Math[r(339)](a))&&Math[r(339)](s-c)<=m*Math[r(347)](1,Math[r(339)](s),Math[r(339)](c))},sub:Y,mul:K,div:X,dist:J,sqrDist:$,len:ee,sqrLen:te,forEach:re});function ie(e,t){var r=se();return(ie=function(e,t){return r[e-=323]})(e,t)}function se(){var e=["1578645RUxASR","15585nmuuya","142FCkKZk","3667904rMAOyN","8HTfRyt","30dRJHHe","13324899JReSRw","32324100csRSle","5525622vTywjO","1159782sOkVGS"];return(se=function(){return e})()}function oe(e,t){const r=ce();return(oe=function(e,t){return r[e-=314]})(e,t)}!function(e,t){for(var r=ie,n=e();;)try{if(975817===parseInt(r(326))/1+-parseInt(r(329))/2*(-parseInt(r(328))/3)+-parseInt(r(330))/4+parseInt(r(327))/5*(-parseInt(r(332))/6)+parseInt(r(323))/7*(-parseInt(r(331))/8)+parseInt(r(325))/9+parseInt(r(324))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(se),function(e,t){const r=oe,n=e();for(;;)try{if(312344===parseInt(r(339))/1*(parseInt(r(338))/2)+parseInt(r(389))/3+parseInt(r(333))/4+-parseInt(r(364))/5*(parseInt(r(385))/6)+-parseInt(r(392))/7*(parseInt(r(398))/8)+parseInt(r(324))/9+-parseInt(r(358))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ce);var ae=(e,t)=>{const r=oe,n=r(366);t&&e.pixelStorei(e.UNPACK_ALIGNMENT,1);const i=function(){const t=r,i=f(e[t(350)],n),s=f(e[t(395)],"\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),o=e[t(357)]();return e.attachShader(o,i),e.attachShader(o,s),e[t(336)](o),e[t(329)](o,e[t(346)])?o:(console[t(374)](t(365)+e.getProgramInfoLog(o)),null)}();let s={program:i,attribLocations:{vertexPosition:e[r(399)](i,"aVertexPosition"),texturePosition:e[r(399)](i,r(351))},uniformLocations:{projectionMatrix:e.getUniformLocation(i,r(330)),modelMatrix:e[r(393)](i,"uModelMatrix"),viewMatrix:e[r(393)](i,r(382)),rgbatexture:e.getUniformLocation(i,r(362)),ytexture:e[r(393)](i,r(319)),utexture:e[r(393)](i,"uTexture"),vtexture:e[r(393)](i,r(401)),isyuv:e.getUniformLocation(i,r(386))}},o=function(){const t=r,n=e[t(331)]();e[t(340)](e[t(394)],n);e.bufferData(e[t(394)],new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e.STATIC_DRAW);var i=[];i=i.concat([0,1],[1,1],[1,0],[0,0]);const s=e[t(331)]();e[t(340)](e[t(394)],s),e[t(314)](e[t(394)],new Float32Array(i),e[t(352)]);const o=e.createBuffer();e.bindBuffer(e[t(349)],o);return e[t(314)](e[t(349)],new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{position:n,texPosition:s,indices:o}}(),a=d(),c=d(),u=d(),l=d();function d(){const t=r;let n=e.createTexture();return e[t(316)](e.TEXTURE_2D,n),e[t(372)](e[t(332)],e[t(371)],e.LINEAR),e[t(372)](e[t(332)],e[t(402)],e[t(322)]),e[t(372)](e[t(332)],e.TEXTURE_WRAP_S,e[t(396)]),e.texParameteri(e[t(332)],e[t(347)],e[t(396)]),n}function f(t,n){const i=r,s=e[i(315)](t);return e[i(354)](s,n),e[i(387)](s),e[i(379)](s,e[i(403)])?s:(console[i(374)](i(400)+e.getShaderInfoLog(s)),e.deleteShader(s),null)}function h(t,n){const i=r;e[i(356)](0,0,t,n),e.clearColor(0,0,0,0),e[i(345)](1),e[i(328)](e[i(390)]),e[i(326)](e[i(391)]),e[i(368)](e[i(334)]|e[i(375)]);const a=R[i(320)]();R[i(317)](a,-1,1,-1,1,.1,100);const d=R[i(320)]();I(d);const f=E();R[i(383)](f,ne[i(325)](0,0,0),ne[i(325)](0,0,-1),ne[i(325)](0,1,0));{const t=3,r=e[i(337)],n=!1,a=0,c=0;e[i(340)](e.ARRAY_BUFFER,o[i(381)]),e[i(355)](s.attribLocations[i(378)],t,r,n,a,c),e[i(404)](s[i(384)][i(378)])}{const t=2,r=e.FLOAT,n=!1,a=0,c=0;e[i(340)](e[i(394)],o[i(373)]),e[i(355)](s[i(384)][i(318)],t,r,n,a,c),e[i(404)](s[i(384)][i(318)])}e[i(343)](e.TEXTURE0+3),e.bindTexture(e.TEXTURE_2D,c),e[i(343)](e[i(369)]+4),e[i(316)](e[i(332)],u),e[i(343)](e[i(369)]+5),e[i(316)](e.TEXTURE_2D,l),e[i(340)](e[i(349)],o[i(360)]),e[i(353)](s.program),e[i(397)](s[i(367)].projectionMatrix,!1,a),e[i(397)](s[i(367)].modelMatrix,!1,d),e[i(397)](s[i(367)][i(388)],!1,f),e[i(376)](s[i(367)].rgbatexture,2),e[i(376)](s.uniformLocations[i(341)],3),e[i(376)](s.uniformLocations[i(344)],4),e[i(376)](s.uniformLocations[i(342)],5),e[i(376)](s[i(367)][i(386)],1);{const t=6,r=e[i(335)],n=0;e[i(363)](e[i(359)],t,r,n)}}return{render:function(t,n,i,s,o){const a=r;e[a(343)](e[a(369)]),e.bindTexture(e[a(332)],c),e.texImage2D(e[a(332)],0,e.LUMINANCE,t,n,0,e.LUMINANCE,e[a(377)],i),e.activeTexture(e[a(370)]),e[a(316)](e[a(332)],u),e[a(380)](e[a(332)],0,e[a(406)],t/2,n/2,0,e[a(406)],e[a(377)],s),e[a(343)](e.TEXTURE2),e[a(316)](e[a(332)],l),e.texImage2D(e[a(332)],0,e[a(406)],t/2,n/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,o),h(t,n)},renderYUV:function(t,n,i){const s=r;let o=i.slice(0,t*n),a=i[s(323)](t*n,t*n*5/4),d=i[s(323)](t*n*5/4,t*n*3/2);e[s(343)](e[s(369)]),e[s(316)](e[s(332)],c),e[s(380)](e.TEXTURE_2D,0,e[s(406)],t,n,0,e.LUMINANCE,e[s(377)],o),e[s(343)](e[s(370)]),e[s(316)](e[s(332)],u),e[s(380)](e[s(332)],0,e[s(406)],t/2,n/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,a),e[s(343)](e[s(348)]),e.bindTexture(e[s(332)],l),e[s(380)](e[s(332)],0,e[s(406)],t/2,n/2,0,e[s(406)],e[s(377)],d),h(t,n)},destroy:function(){const t=r;e[t(321)](s[t(405)]),e[t(361)](o.position),e.deleteBuffer(o[t(373)]),e[t(361)](o[t(360)]),e[t(327)](a),e[t(327)](c),e[t(327)](u),e[t(327)](l),s=null,o=null,a=null,c=null,u=null,l=null}}};function ce(){const e=["drawElements","2483890FPHyDC","Unable to initialize the shader program: ","\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n ","uniformLocations","clear","TEXTURE0","TEXTURE1","TEXTURE_MAG_FILTER","texParameteri","texPosition","log","DEPTH_BUFFER_BIT","uniform1i","UNSIGNED_BYTE","vertexPosition","getShaderParameter","texImage2D","position","uViewMatrix","lookAt","attribLocations","6ENfhOM","isyuv","compileShader","viewMatrix","1499208qxJoyZ","DEPTH_TEST","LEQUAL","3176033dBxjhj","getUniformLocation","ARRAY_BUFFER","FRAGMENT_SHADER","CLAMP_TO_EDGE","uniformMatrix4fv","8aXZDuw","getAttribLocation","An error occurred compiling the shaders: ","vTexture","TEXTURE_MIN_FILTER","COMPILE_STATUS","enableVertexAttribArray","program","LUMINANCE","bufferData","createShader","bindTexture","ortho","texturePosition","yTexture","create","deleteProgram","LINEAR","slice","5167323QppzqS","fromValues","depthFunc","deleteTexture","enable","getProgramParameter","uProjectionMatrix","createBuffer","TEXTURE_2D","2364292xdBDHH","COLOR_BUFFER_BIT","UNSIGNED_SHORT","linkProgram","FLOAT","3266eQoQGJ","196gOjdSe","bindBuffer","ytexture","vtexture","activeTexture","utexture","clearDepth","LINK_STATUS","TEXTURE_WRAP_T","TEXTURE2","ELEMENT_ARRAY_BUFFER","VERTEX_SHADER","aTexturePosition","STATIC_DRAW","useProgram","shaderSource","vertexAttribPointer","viewport","createProgram","7221830PcseQz","TRIANGLES","indices","deleteBuffer","rgbaTexture"];return(ce=function(){return e})()}const ue=Ce;!function(e,t){const r=Ce,n=e();for(;;)try{if(526987===parseInt(r(528))/1*(-parseInt(r(584))/2)+-parseInt(r(446))/3*(-parseInt(r(572))/4)+-parseInt(r(716))/5+parseInt(r(455))/6*(parseInt(r(817))/7)+parseInt(r(764))/8+parseInt(r(467))/9+parseInt(r(543))/10*(-parseInt(r(488))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ge);const le={websocket:1,fetch:2,hls:3,webrtc:4,webTransport:5,aliyunRtc:6,ts:7};ue(461),ue(551),ue(653),ue(779),ue(773);const de={fetch:ue(461),hls:ue(551),websocket:ue(487),webrtc:"webrtc",webTransport:ue(779),worker:ue(636),aliyunRtc:"aliyunRtc",mp4:ue(531)},fe={player:"player",playerAudio:ue(676),playbackTF:ue(654),talk:ue(746),playVod:ue(747)},he={mp4:"mp4",webm:ue(509),flv:"flv",mov:"mov"},pe={flv:ue(826),m7s:ue(741),hls:"hls",webrtc:"webrtc",webTransport:ue(779),nakedFlow:ue(714),fmp4:ue(619),mpeg4:ue(763),aliyunRtc:"aliyunRtc",ts:"ts",g711:ue(796),pcm:"pcm"};ue(708),ue(453),ue(667),ue(765),ue(786),ue(556);const me={mse:ue(576),wcs:ue(525),offscreen:ue(772),wasm:ue(782),simd:"simd",mt:"mt",webrtc:ue(653),hls:ue(551),aliyunRtc:"aliyunRtc"},ve={canvas:ue(862),video:"video"},ye={debug:"debug",warn:ue(876)},_e={click:ue(749),mouseDownAndUp:ue(678)},ge={normal:ue(743),simple:ue(707)},be={normal:ue(743),small:ue(753)},we=ue(766),Se=36e5,Ee=4080,Ie=12;ue(913),ue(517);const Ae={playIsNotPauseOrUrlIsNull:ue(799),webglAlignmentError:ue(518),webglContextLostError:ue(492),mediaSourceH265NotSupport:"不支持硬解码H265",mseSourceBufferFull:ue(878),mediaSourceAppendBufferError:ue(744),mseSourceBufferError:ue(664),mseAddSourceBufferError:ue(744),mseWorkerAddSourceBufferError:ue(744),mediaSourceDecoderConfigurationError:ue(744),mediaSourceTsIsMaxDiff:ue(800),mseWidthOrHeightChange:"流异常",mediaSourceAudioG711NotSupport:ue(491),mediaSourceAudioInitTimeout:ue(457),mediaSourceAudioNoDataTimeout:ue(837),mediaSourceUseCanvasRenderPlayFailed:ue(581),mediaSourceBufferedIsZeroError:ue(800),webcodecsH265NotSupport:"不支持硬解码H265",webcodecsUnsupportedConfigurationError:"初始化解码器失败",webcodecsDecodeConfigureError:ue(744),webcodecsDecodeError:ue(664),webcodecsAudioInitTimeout:"初始化音频解码器失败",webcodecsAudioNoDataTimeout:"等待音频数据超时",wcsWidthOrHeightChange:"解码失败",wasmDecodeError:"解码失败",simdDecodeError:ue(664),wasmWidthOrHeightChange:ue(800),wasmUseVideoRenderError:ue(827),videoElementPlayingFailed:ue(827),simdH264DecodeVideoWidthIsTooLarge:ue(705),networkDelayTimeout:ue(612),fetchError:"请求失败",streamEnd:"请求结束",websocket1006Error:"流异常结束",websocketError:ue(895),webrtcError:ue(895),hlsError:ue(895),decoderWorkerInitError:ue(854),decoderWorkerWasmError:"wasm解码失败",videoElementPlayingFailedForWebrtc:ue(827),videoInfoError:"解析视频分辨率失败",webrtcStreamH265:ue(735),delayTimeout:ue(657),loadingTimeout:ue(898),loadingTimeoutRetryEnd:ue(898),delayTimeoutRetryEnd:ue(657),flvDemuxBufferSizeTooLarge:ue(815),audioChannelError:ue(599),aliyunRtcError:"请求失败",mseWaitVideoCanplayTimeout:"流异常",initDecoderWorkerTimeout:"初始化解码worker超时"},ke={playType:fe.player,videoBuffer:1e3,videoBufferDelay:1e3,networkDelay:1e4,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isFmp4:!1,isWebrtc:!1,isWebrtcForZLM:!1,isWebrtcForSRS:!1,webrtcForSRSBySDK:!1,isWebrtcForOthers:!1,isNakedFlow:!1,isMpeg4:!1,isAliyunRtc:!1,isTs:!1,debug:!1,debugLevel:ye.warn,debugUuid:"",isMulti:!0,multiIndex:-1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,pageVisibilityHiddenTimeout:300,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,heartTimeoutReplayUseLastFrameShow:!0,replayUseLastFrameShow:!0,replayShowLoadingIcon:!1,supportDblclickFullscreen:!1,showBandwidth:!1,showPerformance:!1,mseCorrectTimeDuration:20,mseCorrectAudioTimeDuration:20,keepScreenOn:!0,isNotMute:!1,muted:!0,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1,ptz:!1,quality:!1,zoom:!1,close:!1,scale:!1,performance:!1,logSave:!1,aiFace:!1,aiObject:!1,aiOcclusion:!1,fullscreenFn:null,fullscreenExitFn:null,screenshotFn:null,playFn:null,pauseFn:null,recordFn:null,recordStopFn:null},extendOperateBtns:[],contextmenuBtns:[],watermarkConfig:{},controlAutoHide:!1,controlAutoHideDelayTime:5,hasControl:!1,controlSize:be[ue(743)],loadingIcon:!0,loadingIconStyle:{},loadingText:"",background:"",poster:"",backgroundLoadingShow:!0,loadingBackground:"",loadingBackgroundWidth:0,loadingBackgroundHeight:0,decoder:ue(834),decoderOld:ue(645),decoderAudio:ue(557),decoderHard:"decoder-pro-hard.js",decoderHardNotWasm:ue(496),wasmMp4RecorderDecoder:ue(788),decoderWASM:"",isDecoderUseCDN:!1,url:"",rotate:0,mirrorRotate:"none",aspectRatio:ue(780),playbackConfig:{playList:[],fps:"",autoCalcFps:!0,showControl:!0,controlType:ge[ue(743)],duration:0,startTime:"",showRateBtn:!1,rateConfig:[],showPrecision:"",showPrecisionBtn:!0,isCacheBeforeDecodeForFpsRender:!1,uiUsePlaybackPause:!1,isPlaybackPauseClearCache:!0,isUseFpsRender:!1,isUseLocalCalculateTime:!1,localOneFrameTimestamp:40,supportWheel:!1,useWCS:!1,useMSE:!1,useSIMD:!0},qualityConfig:[],defaultStreamQuality:"",scaleConfig:["拉伸","缩放","正常"],forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:le[ue(461)],demuxType:pe[ue(826)],useWasm:!1,useOldWasm:!1,useMSE:!1,useWCS:!1,useSIMD:!0,isFFmpegSIMD:!1,useMThreading:!1,preferredHardDecode:!1,wcsUseVideoRender:!0,wcsUseWebgl2Render:!1,wasmUseVideoRender:!0,mseUseCanvasRender:!1,hlsUseCanvasRender:!1,webrtcUseCanvasRender:!1,useOffscreen:!1,useWebGPU:!1,useWebCanvas:!1,mseDecodeErrorReplay:!0,wcsDecodeErrorReplay:!0,wasmDecodeErrorReplay:!0,simdDecodeErrorReplay:!0,simdDecodeErrorReplayType:me[ue(782)],autoWasm:!0,decoderErrorAutoWasm:!1,hardDecodingNotSupportAutoWasm:!0,webglAlignmentErrorReplay:!0,webglContextLostErrorReplay:!0,openWebglAlignment:!1,syncAudioAndVideo:!0,syncAudioAndVideoDiff:400,playbackDelayTime:1e3,playbackFps:25,playVodFps:25,playbackForwardMaxRateDecodeIFrame:4,playbackCurrentTimeMove:!0,useVideoRender:!0,useCanvasRender:!1,videoRenderType:"",networkDelayTimeoutReplay:!1,recordType:he[ue(531)],checkFirstIFrame:!0,nakedFlowFps:25,audioEngine:null,isShowRecordingUI:!0,isShowZoomingUI:!0,useFaceDetector:!1,useObjectDetector:!1,useImageDetector:!1,useOcclusionDetector:!1,ptzPositionConfig:{},ptzShowType:ue(685),ptzClickType:_e[ue(749)],ptzStopEmitDelay:.3,ptzZoomShow:!1,ptzApertureShow:!1,ptzFocusShow:!1,ptzMoreArrowShow:!1,ptzCruiseShow:!1,ptzFogShow:!1,ptzWiperShow:!1,ptzSupportDraggable:!1,weiXinInAndroidAudioBufferSize:4800,isCryptoAudio:!1,isM7sCrypto:!1,isSm4Crypto:!1,isSm4CryptoH265V2:!1,isXorCrypto:!1,sm4CryptoKey:"",m7sCryptoKey:"",xorCryptoKey:"",cryptoKey:"",cryptoIV:"",cryptoKeyUrl:"",listenWindowResizeAuoResize:!0,orientationChangeResize:!1,useWebFullScreen:!1,ptsMaxDiff:3600,aiFaceDetectLevel:2,aiFaceDetectWidth:240,aiFaceDetectEmitBase64:!1,aiFaceDetectShowRect:!0,aiFaceDetectInterval:1e3,aiFaceDetectRectConfig:{},aiObjectDetectLevel:2,aiObjectDetectWidth:240,aiObjectDetectShowRect:!0,aiObjectDetectInterval:1e3,aiObjectDetectRectConfig:{},aiObjectDetectTarget:"",aiOcclusionDetectInterval:1e3,aiImageDetectDrop:!1,aiImageDetectActive:!1,videoRenderSupportScale:!0,mediaSourceTsIsMaxDiffReplay:!0,controlHtml:"",isH265:!1,isWebrtcH265:!1,supportLockScreenPlayAudio:!0,supportHls265:!0,hls265ForceFixLargeGap:!0,isEmitSEI:!1,pauseAndNextPlayUseLastFrameShow:!1,demuxUseWorker:!0,playFailedAndReplay:!0,showMessageConfig:Ae,videoElementPlayingFailedReplay:!0,mp4RecordUseWasm:!0,mseAutoCleanupSourceBuffer:!0,mseAutoCleanupMaxBackwardDuration:30,mseAutoCleanupMinBackwardDuration:10,widthOrHeightChangeReplay:!0,simdH264DecodeVideoWidthIsTooLargeReplay:!0,mediaSourceAudioG711NotSupportReplay:!0,mediaSourceAudioInitTimeoutReplay:!0,mediaSourceAudioNoDataTimeoutReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplayType:ve[ue(717)],webcodecsAudioInitTimeoutReplay:!0,webcodecsAudioNoDataTimeoutReplay:!0,widthOrHeightChangeReplayDelayTime:0,ghostWatermarkConfig:{on:5,off:5,content:"",fontSize:12,color:ue(506),opacity:.15,speed:.2},dynamicWatermarkConfig:{content:"",speed:.2,fontSize:12,color:"white",opacity:.15},isDropSameTimestampGop:!1,mseDecodeAudio:!0,wcsDecodeAudio:!0,nakedFlowH265DemuxUseNew:!0,nakedFlowDemuxUseNew:!0,extendDomConfig:{html:"",showBeforePlay:!1,showAfterLoading:!0},disableContextmenu:!1,mseDecoderUseWorker:!0,openMemoryLog:!1,mainThreadFetchUseWorker:!0,playFailedAndPausedShowPlayBtn:!0,mseCorrectionTimestamp:!0,flvDemuxBufferSizeTooLargeReplay:!1,flvDemuxBufferSizeTooLargeEmitFailed:!1,flvDemuxBufferSizeMaxLarge:1048576,isCheckInView:!1,hiddenControl:!1,androidMobileFullscreenRotate:!0,disableModule:{ptz:!1,record:!1,zoom:!1,watermark:!1,playback:!1},recordWebMSupportSeek:!1,wasmPlayAudioUseVideoRender:!1,mseWaitVideoCanplayTimeout:6,mseWaitVideoCanplayAutoWasm:!0,zoomMaxScale:5,zoomSupportGestureInMobile:!1,zoomSupportGestureInMobileSpeed:.2,drawingRectColor:"red",drawingRectLineWidth:1,drawingRectEndRemoveDom:!0,videoSEISyncPtsDiff:.2,initShowPlayBtn:!1,playbackCheckStreamEnd:!0,autoUseSystemFullScreen:!0,playVodConfig:{showRateBtn:!1,rateConfig:[],useWCS:!1,useMSE:!0,useSIMD:!0,startTime:null},playVodForwardMaxRateDecodeIFrame:8,playVodEndedAndAutoReplay:!1,playVodEndedAndShowPlayBtn:!0,hotKeyVolumeStep:.05,hotKeySeekStep:5,websocketOpenTimeout:8,i18n:{},screenshotUseHighQuality:!1,requestAnimationFrameMaxDiff:800,isUseFileProtocol:!1};function Ce(e,t){const r=Ge();return(Ce=function(e,t){return r[e-=442]})(e,t)}ue(745),ue(469),ue(704),ue(870),ue(460),ue(846),ue(801),ue(505),ue(477),ue(530),ue(647),ue(731),ue(804),ue(828),ue(548),ue(656),ue(910),ue(658),ue(552),ue(785),ue(646);const Te={init:ue(762),initVideo:"initVideo",render:ue(750),playAudio:ue(575),initAudio:ue(888),kBps:ue(513),decode:ue(443),audioCode:"audioCode",audioNalu:ue(649),audioAACSequenceHeader:ue(889),videoCode:ue(806),videoCodec:ue(712),videoNalu:ue(821),videoPayload:ue(721),audioPayload:ue(503),wasmError:ue(544),workerFetch:"workerFetch",iframeIntervalTs:ue(909),isDropping:ue(598),workerEnd:ue(776),networkDelay:"networkDelay",playbackStreamVideoFps:ue(638),wasmWidthOrHeightChange:ue(606),simdDecodeError:"simdDecodeError",simdH264DecodeVideoWidthIsTooLarge:"simdH264DecodeVideoWidthIsTooLarge",websocketOpen:ue(500),websocketStringMsg:ue(683),closeEnd:ue(448),tempStream:"tempStream",videoSEI:ue(841),flvScriptData:"flvScriptData",aacSequenceHeader:ue(617),videoSequenceHeader:ue(692),flvBufferData:ue(479),checkFirstIFrame:"checkFirstIFrame",mseHandle:ue(558),mseFirstRenderTime:ue(696),mseError:ue(550),notSupportNewWasm:"notSupportNewWasm",failedToAsynchronouslyPrepareWasm:ue(844)};ue(592);const xe={audio:1,video:2},De={audio:8,video:9,scriptData:18},Be={init:ue(762),decode:ue(443),audioDecode:"audioDecode",videoDecode:ue(450),initAudioCodec:"initAudioCodec",initVideoCodec:ue(882),close:ue(856),updateConfig:ue(511),resetDecode:"resetDecode",clearBuffer:ue(643),resetAudioDecode:ue(836),resetVideoDecode:ue(672),fetchStream:ue(728),sendWsMessage:ue(539),mseUpdateVideoTimestamp:ue(523),playbackIsPause:ue(784)};ue(461),ue(589),ue(671),ue(710),ue(811),ue(843),ue(644),ue(762),ue(461),ue(851),ue(866),ue(671),ue(700),ue(500),ue(683),ue(762);const Me={fullscreen:"fullscreen$2",fullScreenByStart:ue(860),webFullscreen:ue(534),decoderWorkerInit:ue(508),play:ue(829),playing:ue(701),pause:"pause",mute:"mute",load:ue(527),loading:ue(650),zooming:ue(899),drawingRect:ue(730),drawingRectInfo:ue(475),videoInfo:ue(689),timeUpdate:ue(470),audioInfo:"audioInfo",log:"log",error:ue(697),kBps:"kBps",timeout:ue(740),delayTimeout:"delayTimeout",delayTimeoutRetryEnd:ue(816),loadingTimeout:"loadingTimeout",loadingTimeoutRetryEnd:ue(832),stats:ue(915),performance:"performance",videoSmooth:ue(852),faceDetectActive:ue(892),objectDetectActive:ue(759),occlusionDetectActive:ue(463),imageDetectActive:ue(823),record:"record",recording:"recording",recordingTimestamp:ue(447),recordStart:ue(706),recordEnd:ue(498),recordCreateError:ue(737),recordBlob:ue(567),recordCancel:ue(916),buffer:"buffer",videoFrame:ue(781),videoSEI:ue(841),videoSEISyncPts:ue(583),start:ue(604),metadata:ue(820),resize:ue(594),volumechange:ue(682),volume:ue(887),destroy:ue(866),beforeDestroy:"beforeDestroy",streamEnd:ue(867),streamRate:ue(670),streamAbps:ue(734),streamVbps:ue(803),streamDts:ue(459),streamSuccess:ue(890),streamMessage:ue(684),streamError:ue(495),streamStats:"streamStats",streamEndInner:ue(497),mseSourceOpen:ue(914),mseSourceClose:ue(659),mseSourceended:ue(839),mseSourceStartStreaming:ue(611),mseSourceEndStreaming:ue(520),mseSourceBufferError:ue(637),mseAddSourceBufferError:ue(585),mseWorkerAddSourceBufferError:"mseWorkerAddSourceBufferError",mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:"mseSourceBufferFull",videoWaiting:"videoWaiting",videoTimeUpdate:ue(607),videoSyncAudio:"videoSyncAudio",playToRenderTimes:ue(481),playbackTime:"playbackTime",playbackTimestamp:ue(819),playbackTimeScroll:ue(872),playbackPrecision:ue(563),playbackShowPrecisionChange:ue(673),playbackJustTime:ue(553),playbackStats:"playbackStats",playbackSeek:ue(462),playbackPause:ue(748),playbackPauseOrResume:"playbackPauseOrResume",playbackRateChange:"playbackRateChange",playbackPreRateChange:ue(858),playbackEndInner:"playbackEndInner",playbackEnd:ue(864),playVodStats:ue(624),playVodPause:"playVodPause",playVodPauseOrResume:"playVodPauseOrResume",playVodRateChange:"playVodRateChange",playVodTime:ue(456),playVodTimeCache:ue(445),playVodSeek:"playVodSeek",playVodSeekEnd:ue(850),playVodVideoSeekingByMse:ue(903),playVodVideoSeekedByMse:ue(464),playVodCanplay:ue(465),playVodWaiting:ue(478),playVodEndedAndReplay:"playVodEndedAndReplay",playVodEnded:"playVodEnded",ptz:"ptz",streamQualityChange:ue(795),visibilityChange:ue(775),netBuf:ue(565),close:ue(856),networkDelayTimeout:ue(626),togglePerformancePanel:"togglePerformancePanel",viewResizeChange:"viewResizeChange",flvDemuxBufferSizeTooLarge:ue(830),talkGetUserMediaSuccess:"talkGetUserMediaSuccess",talkGetUserMediaFail:ue(665),talkGetUserMediaTimeout:"talkGetUserMediaTimeout",talkStreamStart:ue(512),talkStreamOpen:ue(699),talkStreamClose:"talkStreamClose",talkStreamError:ue(661),talkStreamInactive:ue(485),talkStreamMsg:"talkStreamMsg",webrtcDisconnect:ue(694),webrtcFailed:ue(863),webrtcClosed:"webrtcClosed",webrtcChecking:ue(614),webrtcConnected:ue(810),webrtcCompleted:ue(822),webrtcOnConnectionStateChange:ue(919),webrtcOnIceConnectionStateChange:ue(791),crashLog:ue(881),focus:"focus",blur:ue(571),inView:"inView",visibilityHiddenTimeout:ue(564),websocketOpen:ue(500),websocketClose:"websocketClose",websocketError:ue(733),websocketStringMsg:ue(683),aiObjectDetectorInfo:ue(880),aiFaceDetectorInfo:ue(591),aiOcclusionDetectResult:ue(547),aiImageDetectResult:ue(451),playFailedAndPaused:"playFailedAndPaused",audioResumeState:ue(859),webrtcStreamH265:ue(758),flvMetaData:ue(691),talkFailedAndStop:ue(918),removeLoadingBgImage:ue(595),memoryLog:"memoryLog",downloadMemoryLog:ue(493),pressureObserverCpu:ue(486),currentPts:ue(729),online:ue(845),offline:"offline",networkState:ue(526),clickInitPlayer:ue(770)};ue(689),ue(641),ue(513),ue(604),ue(740),ue(629),ue(832),ue(816),ue(534),ue(829),ue(596),ue(915),ue(480),ue(447),ue(706),ue(737),ue(498),ue(567),ue(462),ue(660),ue(819),ue(618),ue(858),ue(877),ue(673),ue(864),ue(494),ue(630),ue(456),ue(850),ue(805),ue(795),ue(899),ue(635),ue(571),ue(775),ue(700),ue(683),ue(626),ue(451),ue(771),ue(867),ue(859),ue(841),ue(919),ue(729),ue(526),ue(475),ue(651),ue(661),ue(485),ue(587),ue(527),ue(470),ue(641),ue(697),ue(513),ue(604),ue(740),ue(832),ue(742),ue(829),ue(596),ue(590),ue(915),ue(881),ue(500),ue(700),ue(771);const Pe={talkStreamError:Me[ue(661)],talkStreamClose:Me[ue(651)]},Fe={playError:ue(757),fetchError:ue(710),fetchErrorWorker:ue(811),websocketError:"websocketError",websocketOpenTimeout:ue(797),webcodecsH265NotSupport:ue(840),webcodecsDecodeError:ue(449),webcodecsUnsupportedConfigurationError:ue(690),webcodecsDecodeConfigureError:ue(794),webcodecsAudioInitTimeout:"webcodecsAudioInitTimeout",webcodecsAudioNoDataTimeout:ue(896),mediaSourceH265NotSupport:"mediaSourceH265NotSupport",mediaSourceAudioG711NotSupport:ue(554),mediaSourceAudioInitTimeout:"mediaSourceAudioInitTimeout",mediaSourceAudioNoDataTimeout:ue(569),mediaSourceDecoderConfigurationError:"mediaSourceDecoderConfigurationError",mediaSourceFull:Me.mseSourceBufferFull,mseSourceBufferError:Me.mseSourceBufferError,mseAddSourceBufferError:Me.mseAddSourceBufferError,mseWorkerAddSourceBufferError:Me[ue(568)],mediaSourceAppendBufferError:ue(542),mediaSourceTsIsMaxDiff:ue(476),mediaSourceUseCanvasRenderPlayFailed:ue(904),mediaSourceBufferedIsZeroError:"mediaSourceBufferedIsZeroError",wasmDecodeError:ue(905),wasmUseVideoRenderError:ue(897),simdH264DecodeVideoWidthIsTooLarge:"simdH264DecodeVideoWidthIsTooLarge",simdDecodeError:ue(458),hlsError:"hlsError",webrtcError:ue(608),webrtcClosed:Me[ue(893)],webrtcIceCandidateError:ue(600),webglAlignmentError:"webglAlignmentError",wasmWidthOrHeightChange:ue(606),mseWidthOrHeightChange:"mseWidthOrHeightChange",wcsWidthOrHeightChange:ue(602),widthOrHeightChange:ue(723),tallWebsocketClosedByError:ue(831),flvDemuxBufferSizeTooLarge:Me.flvDemuxBufferSizeTooLarge,audioChannelError:"audioChannelError",webglContextLostError:"webglContextLostError",videoElementPlayingFailed:"videoElementPlayingFailed",videoElementPlayingFailedForWebrtc:ue(873),decoderWorkerInitError:ue(719),decoderWorkerWasmError:ue(501),videoInfoError:"videoInfoError",streamEnd:Me[ue(867)],websocket1006Error:"websocket1006Error",delayTimeout:Me.delayTimeout,loadingTimeout:Me[ue(629)],networkDelayTimeout:Me[ue(626)],fullscreenError:ue(573),aliyunRtcError:ue(687),mseWaitVideoCanplayTimeout:ue(838),initDecoderWorkerTimeout:"initDecoderWorkerTimeout",notSupportNewWasm:ue(906),failedToAsynchronouslyPrepareWasm:ue(844),playVodMp4Error:ue(549),mp4Error:"mp4Error",...Pe},Ue={notConnect:"notConnect",open:ue(586),close:ue(856),error:ue(697)},Re=1;ue(756),ue(802),ue(578),ue(732),ue(593),ue(713),ue(560);const Le={h264:7,h265:12,mpeg4:99},Oe={h264:ue(713),h265:"H265(HEVC)"},Ne={AAC:10,ALAW:7,MULAW:8,MP3:2,OPUS:13,G711A:7,G711U:8};ue(489),ue(789),ue(907),ue(849),ue(489),ue(631);const ze={sps:7,pps:8,iFrame:5,kUnspecified:0,kSliceNonIDR:1,kSliceDPA:2,kSliceDPB:3,kSliceDPC:4,kSliceIDR:5,kSliceSEI:6,kSliceSPS:7,kSlicePPS:8,kSliceAUD:9,kEndOfSequence:10,kEndOfStream:11,kFiller:12,kSPSExt:13,kReserved0:14},He={pFrame:1,kSliceBLA_W_LP:16,kSliceBLA_W_RADL:17,kSliceBLA_N_LP:18,iFrame:19,kSliceIDR_W_RADL:19,nLp:20,kSliceIDR_N_LP:20,craNut:21,kSliceCRA_NUT:21,kSliceRSV_IRAP_VCL22:22,kSliceRSV_IRAP_VCL23:23,vps:32,kSliceVPS:32,sps:33,kSliceSPS:33,pps:34,kSlicePPS:34,kSliceAUD:35,sei:39,prefixSei:39,suffixSei:40};ue(894),ue(668),ue(767),ue(760),ue(772),ue(551),ue(653),ue(862);const Ve={key:"key",delta:ue(857)},je={avc:ue(507),hev:ue(510),hev2:ue(833),hev3:ue(807),hev4:ue(738),hev5:ue(686)},We={ended:"ended",open:ue(586),closed:ue(769)};function Ge(){const e=["isWebrtc","1-1","audioNalu","loading","talkStreamClose","container","webrtc","playbackTF","left-up","ghostWatermarkConfig","播放超时重播失败","watermarkConfig","mseSourceClose","playbackStats","talkStreamError","MEDIA_ERR_DECODE","image/jpeg","解码失败","talkGetUserMediaFail","load-start","MPEG4","webgl","webrtc-failed","streamRate","buffer","resetVideoDecode","playbackShowPrecisionChange","seeking","jtt","playerAudio","seeked","mouseDownAndUp","sourceended","timeupdate","subtitle-playlist","volumechange","websocketStringMsg","streamMessage","vertical",'video/mp4;codecs="hev1.4.10.L120.90"',"aliyunRtcError","cruiseStop","videoInfo","webcodecsUnsupportedConfigurationError","flvMetaData","videoSequenceHeader","MEDIA_ERR_SRC_NOT_SUPPORTED","webrtcDisconnect","left","mseFirstRenderTime","error","suspend","talkStreamOpen","websocketClose","playing","peer-connection","active","isM7sCrypto","不支持该分辨率的视频","recordStart","simple","M7S","complete","fetchError","multiDragstart","videoCodec","H264(AVC)","nakedFlow","sei","463600XSiRYr","video","audio packet","decoderWorkerInitError","oneHour","videoPayload","load-retry","widthOrHeightChange","ratechange","waiting","AbortError","rightUp","fetchStream","currentPts","drawingRect","isWebrtcForZLM","blob","websocketError","streamAbps","webrtc不支持H265","3-4","recordCreateError",'video/mp4;codecs="hev1.3.E.L120.90"',"Cannot call 'decode' on a closed codec","timeout","m7s","delayTimeout","normal","初始化解码器失败","playbackForwardMaxRateDecodeIFrame","talk","playVod","playbackPause","click","render","10min","multiDblSelected","small","MEDIA_ERR_NETWORK","webrtc-connected","empty","playIsNotPauseOrUrlIsNull","webrtcStreamH265","objectDetectActive","webgpu","worklet","init","mpeg4","4632944goYkyU","Webrtc","20251201","webgl2","remote-inbound-rtp","closed","clickInitPlayer","playFailedAndPaused","offscreen","aliyunRtc","multiMouseover","visibilityChange","workerEnd","MEDIA_ERR_ABORTED","left-down","webTransport","default","videoFrame","wasm","endstreaming","playbackIsPause","videoRenderSupportScale","WebTransport","canplaythrough","jessibuca-pro-mp4-recorder-decoder.js","ALAW(g711a)","local-candidate","webrtcOnIceConnectionStateChange","image/png","ceil","webcodecsDecodeConfigureError","streamQualityChange","g711","websocketOpenTimeout","操作盘","播放地址不能为空","流异常","widthOrHeightChangeReplayDelayTime","buffering","streamVbps","isWebrtcForSRS","ptz","videoCode",'video/mp4;codecs="hev1.2.4.L120.90"',"loadedmetadata","multiFullscreen","webrtcConnected","fetchErrorWorker","rightDown","playback","halfHour","FLV待解封装buffer过大","delayTimeoutRetryEnd","896pjThEP","关闭电子放大","playbackTimestamp","metadata","videoNalu","webrtcCompleted","imageDetectActive","self","wiperOpen","flv","video自动渲染失败","isWebrtcForOthers","play","flvDemuxBufferSizeTooLarge","tallWebsocketClosedByError","loadingTimeoutRetryEnd",'video/mp4;codecs="hev1.1.6.L120.90"',"decoder-pro.js","FSimd","resetAudioDecode","等待音频数据超时","mseWaitVideoCanplayTimeout","mseSourceended","webcodecsH265NotSupport","videoSEI","subtitle-segments","fetchClose","failedToAsynchronouslyPrepareWasm","online","replayUseLastFrameShow","#FFCC00","readystatechange","MP3","playVodSeekEnd","sendMessage","videoSmooth","right-down","初始化worker失败","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","close","delta","playbackPreRateChange","audioResumeState","fullScreenByStart","multiDrop","canvas","webrtcFailed","playbackEnd","fogOpen","destroy","streamEnd","遮挡物检查激活","remote-candidate","supportHls265","buffereos","playbackTimeScroll","videoElementPlayingFailedForWebrtc","性能面板","created","warn","playbackRateChange","缓冲区已满","multiMouseup","aiObjectDetectorInfo","crashLog","initVideoCodec","hls-manifest-loaded","tcp","remote-outbound-rtp","stream-parsed","volume","initAudio","audioAACSequenceHeader","streamSuccess","multiDragenter","faceDetectActive","webrtcClosed","webcodecs","请求失败","webcodecsAudioNoDataTimeout","wasmUseVideoRenderError","加载超时重播失败","zooming","停止录制","codec","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C(wasm%E5%86%85%E9%83%A8%E4%BC%9A%E6%9A%82%E5%81%9C%E8%A7%A3%E7%A0%81)%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","playVodVideoSeekingByMse","mediaSourceUseCanvasRenderPlayFailed","wasmDecodeError","notSupportNewWasm","MULAW(g711u)","#343434","iframeIntervalTs","dynamicWatermarkConfig","stalled","fogClose","/crypto/","mseSourceOpen","stats","recordCancel","avc","talkFailedAndStop","webrtcOnConnectionStateChange","connecting","decode","receiver","playVodTimeCache","3942IYmJBv","recordingTimestamp","closeEnd","webcodecsDecodeError","videoDecode","aiImageDetectResult","window","HLS","webrtc-completed","27126UYoVBw","playVodTime","初始化音频解码器失败","simdDecodeError","streamDts","pauseAndNextPlayUseLastFrameShow","fetch","playbackSeek","occlusionDetectActive","playVodVideoSeekedByMse","playVodCanplay","emptied","699957WycTqx","alaw","isMulti","timeUpdate","message","qualitychange","progress","退出全屏","drawingRectInfo","mediaSourceTsIsMaxDiff","isFlv","playVodWaiting","flvBufferData","performance","playToRenderTimes","right","play() failed because the user didn't interact with the document first","object","talkStreamInactive","pressureObserverCpu","websocket","33EXSeeK","AAC","udp","硬解码不支持G711a/u音频格式","webgl 上下文丢失","downloadMemoryLog","playVodEnded","streamError","decoder-pro-hard-not-wasm.js","streamEndInner","recordEnd","g711u","websocketOpen","decoderWorkerWasmError","pcm","audioPayload","csrc","multiIndex","white",'video/mp4; codecs="avc1.64002A"',"decoderWorkerInit","webm",'video/mp4; codecs="hev1.1.6.L123.b0"',"updateConfig","talkStreamStart","kBps","five-min","paused","ten-min","jbprovm","Webgl 渲染失败","0000000000","mseSourceEndStreaming","multiMousemove","flv-script-data","mseUpdateVideoTimestamp","load-complete","wcs","networkState","load","88223UrYfJy","load-response-headers","isHls","mp4","保存日志","canplay","webFullscreen","人脸识别激活","Decoder error","g711a","multiDragleave","sendWsMessage","ended","5min","mediaSourceAppendBufferError","857230ZvMqrh","wasmError","one-hour","tenMin","aiOcclusionDetectResult","isAliyunRtc","playVodMp4Error","mseError","hls","defaultStreamQuality","playbackJustTime","mediaSourceAudioG711NotSupport","right-up","AliyunRtc","decoder-pro-audio.js","mseHandle","demuxed-track","H265(HEVC)","性能面板激活","down","playbackPrecision","visibilityHiddenTimeout","netBuf","ws1006","recordBlob","mseWorkerAddSourceBufferError","mediaSourceAudioNoDataTimeout","rtp","blur","788YIVNoX","fullscreenError","操作盘激活","playAudio","mse","no-audio-track","full","mseDecodeError","candidate-pair","MediaSource解码使用canvas渲染失败","stream","videoSEISyncPts","14KnZpaA","mseAddSourceBufferError","open","talkStreamMsg","cruiseStart","destroyEnd","mute","aiFaceDetectorInfo","Invalid NAL unit size","download","resize","removeLoadingBgImage","pause","The user aborted a request","isDropping","音频通道错误","webrtcIceCandidateError","ttfb","wcsWidthOrHeightChange","half-hour","start","人脸识别","wasmWidthOrHeightChange","videoTimeUpdate","webrtcError","Decoding error","#000","mseSourceStartStreaming","网络超时重播失败","script","webrtcChecking","NotAllowedError","inbound-rtp","aacSequenceHeader","playbackPauseOrResume","fmp4","webrtc-checking","电子放大","A key frame is required after configure() or flush()","fiveMin","playVodStats","30min","networkDelayTimeout","3-1","Unsupported configuration","loadingTimeout","playVodRateChange","MULAW","Unsupported audio format","durationchange","sourceclose","focus","worker","mseSourceBufferError","playbackStreamVideoFps","switch-url-failed","opus","audioInfo","sei-in-time","clearBuffer","fetchSuccess","decoder-pro-old.js","heartTimeout"];return(Ge=function(){return e})()}Math[ue(793)](40),ue(720),ue(814),ue(546),ue(545),ue(603),ue(516),ue(514),ue(625),ue(751),ue(541),ue(814),ue(546),ue(623),ue(482),ue(695),ue(655),ue(555),ue(778),ue(853),ue(482),ue(562),ue(727),ue(812),ue(588),ue(688),ue(865),ue(912),ue(825);ue(537),ue(499),ue(502);ue(792),ue(663);const qe={sourceClose:ue(634),sourceOpen:"sourceopen",sourceended:ue(679),startstreaming:"startstreaming",endstreaming:ue(783),qualitychange:ue(472)};ue(725),ue(680),ue(724),ue(473),ue(808);const Ye={h264:ue(917),h265:"hevc",av1:"av1"};ue(622),ue(739),ue(628),ue(609),ue(536);const Ke={abortError:ue(597),abortError2:ue(726),abort:ue(726)};ue(650),ue(701),ue(515),ue(866);const Xe={sequenceHeader:0,nalu:1},Je={keyFrame:1,interFrame:2};ue(756),ue(570),ue(675),ue(884),ue(490);ue(582),ue(813),ue(856),ue(697),ue(471);ue(761),ue(613);ue(537),ue(519),ue(876),ue(613),ue(703),ue(908),ue(847),ue(610),ue(809),ue(752),ue(774),ue(879),ue(521),ue(711),ue(891),ue(538),ue(861),ue(627),ue(648),ue(736),ue(652),ue(717);const $e={keyFrame:1,interFrame:2};ue(676),ue(876),ue(826),ue(842),ue(883),ue(559),ue(522),ue(601),ue(722),ue(666),ue(524),ue(529),ue(715),ue(642),ue(577),ue(871),ue(639),ue(681),ue(886),ue(697);const Ze={idle:"idle",connecting:ue(442),buffering:"buffering",error:"error",complete:"complete"};ue(777),ue(754),ue(662),ue(693),ue(718),ue(632),ue(483),ue(615);const Qe={video:1,audio:2},et=128,tt={PACKET_TYPE_SEQ_START:0,PACKET_TYPE_FRAMES:1,PACKET_TYPE_SEQ_END:2,PACKET_TYPE_FRAMESX:3,PACKET_TYPE_METADATA:4},rt={FT_KEY:16,FT_INTER:32};ue(580),ue(901),ue(504),ue(616),ue(790),ue(702),ue(444),ue(869),ue(768),ue(885),ue(566),ue(579),ue(495),ue(468),ue(640),ue(620),ue(755),ue(454),ue(669),ue(875),ue(650),ue(701);const nt=typeof window===ue(484)&&window[ue(452)]===window?window:typeof self===ue(484)&&self[ue(824)]===self?self:typeof global===ue(484)&&global.global===global?global:void 0;ue(533),ue(787),ue(709),ue(633),ue(466),ue(540),ue(697),ue(808),ue(596),ue(724),ue(677),ue(674),ue(911),ue(698),ue(725),ue(848),ue(697),ue(474),ue(900),ue(798),ue(574),ue(621),ue(818),ue(874),ue(561),ue(605),ue(535),ue(868),ue(532),ue(835),ue(855),ue(902);var it=st;function st(e,t){var r=ot();return(st=function(e,t){return r[e-=389]})(e,t)}function ot(){var e=["createCommonjsModule","undefined","change","webkitRequestFullscreen","23890fWUbZc","exports","8drUWLa","isFullscreen","20658YWpTjg","off","2895030huUSuQ","webkitCurrentFullScreenElement","object","catch","length","mozFullScreenElement","54715TArmpY","webkitCancelFullScreen","removeEventListener","mozRequestFullScreen","bind","documentElement","msFullscreenEnabled","addEventListener","4426452UYKFNN","fullscreenerror","fullscreenElement","error","screenfull","requestFullscreen","isEnabled","request","webkitfullscreenerror","webkitFullscreenElement","4yoyeVL","6561338mPaQGM","fullscreenchange","8756739hrLCOo","document","389085CBIbRj","webkitRequestFullScreen","msRequestFullscreen","msFullscreenElement","mozFullScreenEnabled","MSFullscreenError","exit","MSFullscreenChange","148tkFiHN","mozfullscreenerror","exitFullscreen","defineProperties","webkitfullscreenchange"];return(ot=function(){return e})()}!function(e,t){for(var r=st,n=e();;)try{if(500206===parseInt(r(424))/1*(-parseInt(r(419))/2)+-parseInt(r(395))/3+-parseInt(r(432))/4*(-parseInt(r(401))/5)+-parseInt(r(409))/6+-parseInt(r(420))/7+-parseInt(r(391))/8*(parseInt(r(422))/9)+-parseInt(r(389))/10*(-parseInt(r(393))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ot),f[it(437)]((function(e){var t,r,n,i,s,o;t=st,r=typeof window!==t(438)&&typeof window[t(423)]!==t(438)?window.document:{},n=t(397)!==t(438)&&e[t(390)],i=function(){for(var e,n=t,i=[[n(414),"exitFullscreen",n(411),"fullscreenEnabled",n(421),"fullscreenerror"],[n(440),"webkitExitFullscreen",n(418),"webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],[n(425),n(402),n(396),n(402),n(436),n(417)],[n(404),"mozCancelFullScreen",n(400),n(428),"mozfullscreenchange",n(433)],[n(426),"msExitFullscreen",n(427),n(407),n(431),n(429)]],s=0,o=i[n(399)],a={};s32&&console[t(421)](t(419)),e<=this._current_word_bits_left){let r=this[t(433)]>>>32-e;return this[t(433)]<<=e,this[t(415)]-=e,r}let r=this[t(415)]?this[t(433)]:0;r>>>=32-this[t(415)];let n=e-this[t(415)];this._fillCurrentWord();let i=Math[t(414)](n,this[t(415)]),s=this[t(433)]>>>32-i;return this[t(433)]<<=i,this[t(415)]-=i,r=r<>>t))return this[e(433)]<<=t,this[e(415)]-=t,t;return this[e(434)](),t+this[e(435)]()}[at(417)](){const e=at;let t=this[e(435)]();return this[e(408)](t+1)-1}[at(418)](){let e=this[at(417)]();return 1&e?e+1>>>1:-1*(e>>>1)}}function lt(e,t){const r=ct();return(lt=function(e,t){return r[e-=406]})(e,t)}const dt=St;function ft(){const e=["length","1480eCBOVX","unshift","userAgent","getLATMValue","push","more than 2 numSubFrames Not Supported","read","24MZKPWG","aac","19762cVyhEF","sampling_frequency",". Only frameLengthType = 0 Supported","data_","set","eof_flag_","destroy","1130620ofAeuo","navigator","data","channel_config","error","other_data_present","toLowerCase","sequenceHeader","android","bufpos","more than 2 numProgram Not Supported","4166904hbDtAn","subarray","log","readBool","slice","current_syncword_offset_","Could not found ADTS syncword until payload end","readByte","warn","4JMSEtp","getIncompleteData","sample_rate","Invalid sampling index: ","buffer","AAC","channel: ","StreamMuxConfig Missing","Flv: AAC invalid sampling frequency index!","mp4a.40.","552286NghGzA","byteLength","audioMuxVersionA is Not Supported","readNextAACFrame","allStreamsSameTimeFraming zero is Not Supported","10QFzvyD","iserro","findNextSyncwordOffset","sampleRate: ","sampling_freq_index","profile: ","140677cnFCjZ","chan_config","Flv: AAC invalid channel configuration","sampling_index","audio_object_type","read_golomb","has_last_incomplete_data","readBits","hasIncompleteData","15167911YUjbRo","bufoff","29502vtDWMN","buflen","object_type","indexOf","sbr","channels"];return(ft=function(){return e})()}!function(e,t){const r=St,n=e();for(;;)try{if(444638===parseInt(r(290))/1+-parseInt(r(242))/2*(parseInt(r(240))/3)+-parseInt(r(269))/4*(-parseInt(r(249))/5)+-parseInt(r(260))/6+parseInt(r(279))/7+parseInt(r(233))/8*(-parseInt(r(226))/9)+parseInt(r(284))/10*(parseInt(r(224))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ft);const ht=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1],pt=ht,mt=ht;function vt(e){let{profile:t,sampleRate:r,channel:n}=e;return new Uint8Array([175,0,t<<3|(14&r)>>1,(1&r)<<7|n<<3])}function yt(e){const t=St;return _t(e)&&e[1]===Xe[t(256)]}function _t(e){const t=St;return e[0]>>4===Ne[t(274)]}const gt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];function bt(e){const t=St;let r=new Uint8Array(e),n=null,i=0,s=0,o=0,a=null;if(i=s=r[0]>>>3,o=(7&r[0])<<1|r[1]>>>7,o<0||o>=gt[t(232)])return void console[t(253)](t(277));let c=gt[o],u=(120&r[1])>>>3;if(u<0||u>=8)return void console[t(262)](t(292));5===i&&(a=(7&r[1])<<1|r[2]>>>7,r[2]);let l=nt[t(250)][t(235)][t(255)]();return-1!==l[t(229)]("firefox")?o>=6?(i=5,n=new Array(4),a=o-3):(i=2,n=new Array(2),a=o):-1!==l.indexOf(t(257))?(i=2,n=new Array(2),a=o):(i=5,a=o,n=new Array(4),o>=6?a=o-3:1===u&&(i=2,n=new Array(2),a=o)),n[0]=i<<3,n[0]|=(15&o)>>>1,n[1]=(15&o)<<7,n[1]|=(15&u)<<3,5===i&&(n[1]|=(15&a)>>>1,n[2]=(1&a)<<7,n[2]|=8,n[3]=0),{audioType:t(241),config:n,sampleRate:c,channelCount:u,objectType:i,codec:t(278)+i,originalCodec:"mp4a.40."+s}}dt(239),dt(220);class wt{constructor(e){const t=dt;this[t(245)]=e,this[t(247)]=!1,this[t(265)]=this[t(286)](0),this[t(247)]&&console[t(253)](t(266))}[dt(286)](e){const t=dt;let r=e,n=this[t(245)];for(;;){if(r+7>=n.byteLength)return this[t(247)]=!0,n.byteLength;if(4095===(n[r+0]<<8|n[r+1])>>>4)return r;r++}}readNextAACFrame(){const e=dt;let t=this[e(245)],r=null;for(;null==r&&!this.eof_flag_;){let n=this.current_syncword_offset_,i=(8&t[n+1])>>>3,s=(6&t[n+1])>>>1,o=1&t[n+1],a=(192&t[n+2])>>>6,c=(60&t[n+2])>>>2,u=(1&t[n+2])<<2|(192&t[n+3])>>>6,l=(3&t[n+3])<<11|t[n+4]<<3|(224&t[n+5])>>>5;if(t[n+6],n+l>this[e(245)].byteLength){this[e(247)]=!0,this[e(221)]=!0;break}let d=1===o?7:9,f=l-d;n+=d;let h=this[e(286)](n+f);if(this.current_syncword_offset_=h,0!==i&&1!==i||0!==s)continue;let p=t[e(261)](n,n+f);r={},r.audio_object_type=a+1,r[e(288)]=c,r[e(243)]=pt[c],r.channel_config=u,r[e(251)]=p}return r}[dt(223)](){return this.has_last_incomplete_data}[dt(270)](){const e=dt;return this[e(221)]?this[e(245)].subarray(this[e(265)]):null}}function St(e,t){const r=ft();return(St=function(e,t){return r[e-=218]})(e,t)}class Et{constructor(e){const t=dt;this[t(245)]=e,this.eof_flag_=!1,this[t(265)]=this[t(286)](0),this[t(247)]&&console[t(253)](t(266))}findNextSyncwordOffset(e){const t=dt;let r=e,n=this.data_;for(;;){if(r+1>=n[t(280)])return this[t(247)]=!0,n[t(280)];if(695===(n[r+0]<<3|n[r+1]>>>5))return r;r++}}[dt(236)](e){const t=dt;let r=e.readBits(2),n=0;for(let i=0;i<=r;i++)n<<=8,n|=e[t(267)]();return n}[dt(282)](e){const t=dt;let r=this[t(245)],n=null;for(;null==n&&!this[t(247)];){let i=this.current_syncword_offset_,s=(31&r[i+1])<<8|r[i+2];if(i+3+s>=this[t(245)][t(280)]){this.eof_flag_=!0,this[t(221)]=!0;break}let o=new ut(r[t(261)](i+3,i+3+s)),a=null;if(o[t(263)]()){if(null==e){console[t(268)](t(276)),this.current_syncword_offset_=this.findNextSyncwordOffset(i+3+s),o[t(248)]();continue}a=e}else{let e=o[t(263)]();if(e&&o[t(263)]()){console[t(253)](t(281)),o.destroy();break}if(e&&this[t(236)](o),!o[t(263)]()){console[t(253)](t(283)),o[t(248)]();break}if(0!==o[t(222)](6)){console[t(253)](t(238)),o[t(248)]();break}if(0!==o[t(222)](4)){console[t(253)](t(259)),o[t(248)]();break}if(0!==o[t(222)](3)){console[t(253)]("more than 2 numLayer Not Supported"),o[t(248)]();break}let r=e?this[t(236)](o):0,n=o.readBits(5);r-=5;let i=o.readBits(4);r-=4;let s=o.readBits(4);r-=4,o[t(222)](3),r-=3,r>0&&o[t(222)](r);let c=o[t(222)](3);if(0!==c){console.error("frameLengthType = "+c+t(244)),o[t(248)]();break}o[t(267)]();let u=o.readBool();if(u)if(e)this[t(236)](o);else{let e=0;for(;;){e<<=8;let t=o.readBool();if(e+=o.readByte(),!t)break}console[t(262)](e)}o[t(263)]()&&o.readByte(),a={},a[t(219)]=n,a.sampling_freq_index=i,a[t(243)]=pt[a.sampling_freq_index],a[t(252)]=s,a[t(254)]=u}let c=0;for(;;){let e=o[t(267)]();if(c+=e,255!==e)break}let u=new Uint8Array(c);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:0;return(e[r]<<24>>>0)+(e[r+1]<<16)+(e[r+2]<<8)+(e[r+3]||0)}function kt(e){const t=Ct;let r=arguments[t(328)]>1&&void 0!==arguments[1]?arguments[1]:4;if(e[t(328)]<4)return[];const n=e[t(328)],i=[];let s,o=0;for(;o+r>>=8),o+=r,s){if(o+s>n)break;i[t(347)](e.subarray(o,o+s)),o+=s}return i}function Ct(e,t){const r=It();return(Ct=function(e,t){return r[e-=328]})(e,t)}function Tt(e){const t=Ct;let r=arguments[t(328)]>1&&void 0!==arguments[1]&&arguments[1];const n=e[t(328)];let i=r?2:1,s=0,o=0,a="";for(;255===e[i];)s+=255,i++;for(s+=e[i++];255===e[i];)o+=255,i++;if(o+=e[i++],5===s&&n>i+16)for(let r=0;r<16;r++)a+=e[i][t(348)](16),i++;return{payload:e[t(345)](i),type:s,size:o,uuid:a}}function xt(e){const t=Ct,r=e[t(346)],n=new Uint8Array(4);n[0]=r>>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r;const i=new Uint8Array(r+4);return i[t(338)](n,0),i[t(338)](e,4),i}function Dt(e,t){const r=Ct;let n=null;return t?e[r(328)]>=28&&(n=1+(3&e[26])):e[r(328)]>=12&&(n=1+(3&e[9])),n}!function(e,t){const r=Ct,n=e();for(;;)try{if(467587===-parseInt(r(337))/1*(parseInt(r(332))/2)+parseInt(r(341))/3*(-parseInt(r(340))/4)+parseInt(r(336))/5+parseInt(r(333))/6+-parseInt(r(334))/7*(-parseInt(r(330))/8)+-parseInt(r(335))/9*(parseInt(r(329))/10)+parseInt(r(343))/11*(parseInt(r(344))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(It);const Bt=Pt;function Mt(){const e=["slice","iFrame","mimeTypes",'"2.1.3"',"touchend","[object Number]","getDay","copyright","download","fullscreenElement","hev","#000","instantiate","AudioData","scrollLeft","paused","hostname","initEvent","toDataURL","showModalDialog","message","color","demuxUseWorker","data-","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","close","clientY","541yCtaoO","fontSize","onload","width","-webkit-tap-highlight-color","location","atob","type","visibility","prototype","host","100%","f32-planar","toFixed","796964KknbBt","WAVE","Opera","createBufferSource","video","Firefox","hour","removeAttribute","repeat",'"2025-2-1"',"html","object","100","protocol","now","canConstructInDedicatedWorker","match","result","readAsArrayBuffer","getContext","innerHTML","insertBefore","sps","line","log","isFullscreen",'"delaytime"',"text/javascript","touchmove","pointer-events: none !important; display: block !important","4090QIQLjp","NaN","position","numberOfFrames","opera","mousemove","nLp","webgl2","click","status","charCodeAt","image/png","error","h265","quality","safari","document","fillText","getFullYear","font","ALAW","not compiled with thread support","mediaDevices","getPropertyValue","0 Bytes","top","hash","vps","search","img","forEach","revokeObjectURL","height","5ZIfPgp","187DaBLkg","function","hev2","rgba(0,0,0,0)","getMonth","memory","TB/s","start","fmt ","URL","wow64","trim","element","ended","px 宋体","substring","imageSmoothingEnabled","PressureObserver","validate","toLowerCase","solid","mozGetUserMedia","createEvent","rect","getUint8","https:","setAttribute","VideoFrame","byteLength","pps","getDate","VideoDecoder","application/javascript","getImageData","block","application/vnd.chromium.remoting-viewer","replace","webkitGetUserMedia","performance","keys","charAt","restore","style","experimental-webgl","lineWidth","keyFrame","touchstart","isTypeSupported","illegal icc","-o-user-select","test","borderStyle","failed to asynchronously prepare wasm","borderWidth","hev5","then","filter","imageSmoothingQuality","setHours","setUint16","VideoEncoder.isConfigSupported is not a function","floor","open","data","audioWorklet","split","GB/s","image",'"1-2-2025"',"map","kSliceRSV_IRAP_VCL22","7869546FJLYTy","AudioDecoder","getTime","set","noteOn","ZB/s","360EE","display","isConfigSupported",'"production"',"removeChild","onerror","shadowRoot","borderColor","left","[object Error]","scrollTop","VideoEncoder.isConfigSupported() result is not supported","true","strokeRect","right","dispatchEvent","sequenceHeader","firefox","opacity","useMSE","data:","absolute","format","fillStyle","crossOrigin","isEnabled","sampleRate","getMinutes","div","moz-webgl","copyToChannel","-webkit-user-select","user-select","application/mozilla-npqihooquicklogin","chrome","body","localhost","Anonymous","createImageBitmap","round","toString","-webkit-touch-callout","text","container","EB/s",'video/mp4; codecs="',"1000899kkDyPC","-webkit-text-size-adjust","canvas","call","245156BNCGhJ","Safari","MULAW","ManagedMediaSource","angle","xxxxxxxxxxxx4xxx","VideoEncoder is not supported","pageY","parse","MediaStream","pathname","pageX","useOffscreen","supported","Edge","xxxx","win64","MediaSource","numberOfChannels","gpu","application/360softmgrplugin","useWCS","getParameter","setInt16","dataset","wcsDecodeAudio","children","drawImage","touches","If you want to help, upload a sample of this file to","bottom","srcElement","createObjectURL","MB/s","not compiled with thread support, using thread emulation","attachShadow","application/vnd.apple.mpegurl","content","max","mouseup","random","getUserMedia","length","0 KB/s","-ms-user-select","href","hev3","Module","event","overflow","transferControlToOffscreen","setUint8","setInt32","clearRect","Bytes",";base64","string","min","none","objectFit","fromCharCode","undefined","src","ActiveXObject","Edg","9999999","toUpperCase","save","assign","Instance","playbackRate","wow32","green","px Arial","hidden","WebGL2RenderingContext","msFullscreenElement","RIFF","hasAudio","clientX","indexOf","subarray","createElement","webgl","application/asx","getSeconds","8CUfFIN","strokeStyle","craNut","push","2985795WgaHvB","navigator","resume","360","setUint32","endsWith","target","appendChild","createBuffer","MediaStreamTrackGenerator","kSliceBLA_W_RADL","117510fsYkYv","high","backgroundColor","KB/s","userAgent"];return(Mt=function(){return e})()}function Pt(e,t){const r=Mt();return(Pt=function(e,t){return r[e-=386]})(e,t)}function Ft(){const e=Pt;return(new Date)[e(500)]()}function Ut(e,t,r){return Math.max(Math.min(e,Math.max(t,r)),Math.min(t,r))}function Rt(){const e=Pt;return performance&&typeof performance[e(715)]===e(428)?performance[e(715)]():Date[e(715)]()}function Lt(e){let t=0,r=Rt();return n=>{if(!function(e){const t=Bt;return Object[t(696)][t(544)][t(553)](e)===t(665)}(n))return;t+=n;const i=Rt(),s=i-r;s>=1e3&&(e(t/s*1e3),r=i,t=0)}}!function(e,t){const r=Pt,n=e();for(;;)try{if(936814===-parseInt(r(687))/1*(parseInt(r(393))/2)+parseInt(r(644))/3+parseInt(r(554))/4*(-parseInt(r(426))/5)+parseInt(r(498))/6+-parseInt(r(701))/7+-parseInt(r(640))/8*(-parseInt(r(550))/9)+-parseInt(r(655))/10*(parseInt(r(427))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Mt),(()=>{const e=Pt;try{if(typeof WebAssembly===e(712)&&"function"==typeof WebAssembly[e(672)]){const t=new(WebAssembly[e(601)])(Uint8Array.of(0,97,115,109,1,0,0,0));if(t instanceof WebAssembly[e(601)])return new WebAssembly.Instance(t)instanceof WebAssembly[e(623)]}}catch(e){}})();const Ot=Bt(507),Nt=Bt(663),zt=Bt(495);Bt(507);const Ht=Ot===Bt(389);Bt(710);function Vt(e){return null==e}function jt(e){return!Vt(e)}function Wt(e){return e&&typeof e===Bt(428)}function Gt(e){const t=Bt;let r=null,n=31&e[0];return(n===ze[t(723)]||n===ze[t(456)])&&(r=Oe.h264),!r&&(n=(126&e[0])>>1,(n===He[t(420)]||n===He[t(723)]||n===He[t(456)])&&(r=Oe[t(406)])),r}function qt(){return typeof WritableStream!==Bt(615)}function Yt(e){e[Bt(685)]()}function Kt(e,t){const r=Bt;t&&(e=e[r(483)]((e=>e[r(694)]&&e.type===t)));let n=e[0],i=null,s=1;if(e[r(596)]>0){let t=e[1];t&&t.ts-n.ts>1e5&&(n=t,s=2)}if(n)for(let o=s;o=1e3){e[o-1].ts-n.ts<1e3&&(i=o+1)}}}return i}function Xt(e){const t=Bt;return e.ok&&e[t(402)]>=200&&e[t(402)]<=299}function Jt(){return function(e){const t=Bt;let r="";if(typeof e===t(712))try{r=JSON.stringify(e),r=JSON[t(562)](r)}catch(t){r=e}else r=e;return r}(ke)}function $t(e){const t=Bt;return e[0]>>4===Je[t(472)]&&e[1]===Xe[t(520)]}function Zt(e){return!0===e||e===Bt(516)}function Qt(e){return!0!==e&&"true"!==e}function er(){const e=Bt;return!!(nt.Worker&&nt[e(571)]&&e(716)in nt[e(571)]&&!0===nt[e(571)][e(716)])}function tr(e,t){const r=Bt,n=kt(e[r(660)](5));let i=!1;return n[r(423)]((e=>{const n=r,s=t?e[0]>>>1&63:31&e[0];(t&&(s===He.kSliceBLA_W_LP||s===He[n(654)]||s===He.kSliceBLA_N_LP||s===He[n(661)]||s===He[n(399)]||n(642),n(497),s===He.kSliceRSV_IRAP_VCL23)||Qt(t)&&s===ze[n(661)])&&(i=!0)})),i}function rr(){return Qt(Ht)}function nr(e){return e>60*(Number("1")||1)*60*1e3&&rr()}const ir=dr;!function(e,t){const r=dr,n=e();for(;;)try{if(215033===parseInt(r(338))/1*(parseInt(r(367))/2)+-parseInt(r(346))/3+parseInt(r(360))/4+-parseInt(r(350))/5*(parseInt(r(359))/6)+parseInt(r(330))/7+-parseInt(r(368))/8*(parseInt(r(336))/9)+parseInt(r(354))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(lr);var sr=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){const o=dr;function a(e){const t=dr;try{u(n[t(332)](e))}catch(e){s(e)}}function c(e){const t=dr;try{u(n[t(334)](e))}catch(e){s(e)}}function u(e){const t=dr;var n;e[t(369)]?i(e[t(347)]):(n=e[t(347)],n instanceof r?n:new r((function(e){e(n)}))).then(a,c)}u((n=n[o(337)](e,t||[]))[o(332)]())}))};const or=Symbol(32),ar=Symbol(16),cr=Symbol(8);class ur{constructor(e){const t=ir;this.g=e,this[t(364)]=0,e&&(this[t(371)]=e.next()[t(347)])}[ir(328)](e){const t=ir;this.g=e,this[t(372)](e[t(332)]()[t(347)],!0)}[ir(348)](){const e=ir;this.buffer&&this[e(364)]&&(this[e(358)][e(349)](0,this[e(364)]),this[e(358)]=this[e(358)].subarray(0,this[e(358)][e(366)]-this[e(364)]),this.consumed=0)}demand(e,t){const r=ir;return t&&this[r(348)](),this[r(371)]=e,this[r(357)]()}[ir(339)](e){return sr(this,void 0,void 0,(function*(){const t=dr;return this[t(335)]&&(yield this[t(335)]),this.lastReadPromise=new Promise(((r,n)=>{const i=t;var s;this.reject=n,this[i(363)]=e=>{const t=i;delete this[t(335)],delete this[t(363)],delete this[t(371)],r(e)};this[i(372)](e,!0)||null===(s=this.pull)||void 0===s||s.call(this,e)}))}))}readU32(){return this.read(or)}[ir(370)](){return this.read(ar)}[ir(333)](){return this[ir(339)](cr)}[ir(327)](){const e=ir;var t;this.g&&this.g[e(365)](),this.buffer&&this[e(358)][e(352)](0,0),null===(t=this[e(362)])||void 0===t||t[e(344)](this,new Error("EOF")),delete this[e(335)]}[ir(357)](){const e=ir;if(!this[e(358)]||!this.need)return;let t=null;const r=this.buffer.subarray(this.consumed);let n=0;const i=t=>r[e(366)]<(n=t);if(typeof this[e(371)]===e(351)){if(i(this[e(371)]))return;t=r[e(352)](0,n)}else if(this[e(371)]===or){if(i(4))return;t=r[0]<<24|r[1]<<16|r[2]<<8|r[3]}else if(this.need===ar){if(i(2))return;t=r[0]<<8|r[1]}else if(this[e(371)]===cr){if(i(1))return;t=r[0]}else if(e(358)in this[e(371)]){if("byteOffset"in this[e(371)]){if(i(this.need[e(353)]-this[e(371)][e(373)]))return;new Uint8Array(this.need[e(358)],this[e(371)][e(373)])[e(361)](r[e(352)](0,n)),t=this[e(371)]}else if(this.g)return void this.g[e(334)](new Error("Unsupported type"))}else{if(i(this.need[e(353)]))return;new Uint8Array(this[e(371)])[e(361)](r[e(352)](0,n)),t=this.need}return this[e(364)]+=n,this.g?this[e(372)](this.g[e(332)](t)[e(347)],!0):this[e(363)]&&this[e(363)](t),t}[ir(343)](e){const t=ir;if(e instanceof Uint8Array?this.malloc(e[t(366)])[t(361)](e):"buffer"in e?this[t(340)](e.byteLength)[t(361)](new Uint8Array(e[t(358)],e[t(373)],e[t(353)])):this[t(340)](e[t(353)])[t(361)](new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this[t(355)]=e));this.flush()}[ir(345)](e){const t=ir;this.malloc(4)[t(361)]([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}[ir(341)](e){const t=ir;this[t(340)](2)[t(361)]([e>>8&255,255&e]),this[t(357)]()}[ir(342)](e){const t=ir;this[t(340)](1)[0]=e,this[t(357)]()}[ir(340)](e){const t=ir;if(this.buffer){const r=this[t(358)][t(366)],n=r+e;if(n<=this[t(358)].buffer[t(353)]-this[t(358)].byteOffset)this[t(358)]=new Uint8Array(this[t(358)][t(358)],this[t(358)].byteOffset,n);else{const e=new Uint8Array(n);e[t(361)](this.buffer),this[t(358)]=e}return this[t(358)][t(352)](r,n)}return this[t(358)]=new Uint8Array(e),this.buffer}}function lr(){const e=["4YsxJZN","175792Xxaprm","done","readU16","need","demand","byteOffset","close","setG","U16","630525iovGhX","U32","next","readU8","throw","lastReadPromise","63LZSxVN","apply","183011fnRizS","read","malloc","writeU16","writeU8","write","call","writeU32","1240716GSnCdO","value","consume","copyWithin","1940eZdSVb","number","subarray","byteLength","4049730mgiNMm","pull","__awaiter","flush","buffer","3936rxpjcR","703524QAqRtJ","set","reject","resolve","consumed","return","length"];return(lr=function(){return e})()}function dr(e,t){const r=lr();return(dr=function(e,t){return r[e-=327]})(e,t)}function fr(e,t){const r=pr();return(fr=function(e,t){return r[e-=406]})(e,t)}ur[ir(331)]=or,ur[ir(329)]=ar,ur.U8=cr,function(e,t){const r=fr,n=e();for(;;)try{if(895567===parseInt(r(428))/1+parseInt(r(418))/2+parseInt(r(425))/3*(parseInt(r(407))/4)+-parseInt(r(421))/5*(parseInt(r(412))/6)+-parseInt(r(406))/7*(parseInt(r(413))/8)+-parseInt(r(410))/9*(-parseInt(r(414))/10)+-parseInt(r(419))/11*(parseInt(r(420))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(pr);class hr{constructor(e){const t=fr;this[t(408)]=function(r){const n=t;if(e[n(416)][n(415)]==ye[n(422)]){const t=e[n(416)][n(417)]?"["+e[n(416)][n(417)]+"]":"";for(var i=arguments[n(411)],s=new Array(i>1?i-1:0),o=1;o1?i-1:0),o=1;o1?s-1:0),a=1;a=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(n[i]=t[e],i++);return new Uint8Array(n.buffer,0,i)}static[mr(492)](e){const t=mr;let r=vr[t(493)](e),n=new ut(r);n[t(474)]();let i=n[t(474)]();n[t(474)]();let s=n.readByte();n[t(484)]();let o=vr.getProfileString(i),a=vr.getLevelString(s),c=1,u=420,l=[0,420,422,444],d=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(c=n[t(484)](),3===c&&n[t(504)](1),c<=3&&(u=l[c]),d=n[t(484)]()+8,n.readUEG(),n[t(504)](1),n.readBool())){let e=3!==c?8:12;for(let r=0;r0&&e<16?(w=r[e-1],S=i[e-1]):255===e&&(w=n[t(474)]()<<8|n[t(474)](),S=n[t(474)]()<<8|n[t(474)]())}if(n[t(476)]()&&n.readBool(),n.readBool()&&(n[t(504)](4),n.readBool()&&n.readBits(24)),n.readBool()&&(n[t(484)](),n.readUEG()),n[t(476)]()){let e=n[t(504)](32),r=n[t(504)](32);I=n[t(476)](),A=r,k=2*e,E=A/k}}let C=1;(1!==w||1!==S)&&(C=w/S);let T=0,x=0;if(0===c)T=1,x=2-v;else{T=3===c?1:2,x=(1===c?2:1)*(2-v)}let D=16*(p+1),B=16*(m+1)*(2-v);D-=(y+_)*T,B-=(g+b)*x;let M=Math[t(497)](D*C);return n.destroy(),n=null,{profile_string:o,level_string:a,bit_depth:d,ref_frames:h,chroma_format:u,chroma_format_string:vr.getChromaFormatString(u),frame_rate:{fixed:I,fps:E,fps_den:k,fps_num:A},sar_ratio:{width:w,height:S},codec_size:{width:D,height:B},present_size:{width:M,height:B}}}static parseSPS$2(e){const t=mr;let r=e[t(503)](1,4),n=t(470);for(let e=0;e<3;e++){let i=r[e][t(487)](16);i[t(483)]<2&&(i="0"+i),n+=i}let i=vr[t(493)](e),s=new ut(i);s[t(474)]();let o=s[t(474)]();s.readByte();let a=s[t(474)]();s.readUEG();let c=vr[t(468)](o),u=vr[t(479)](a),l=1,d=420,f=[0,420,422,444],h=8,p=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(l=s[t(484)](),3===l&&s[t(504)](1),l<=3&&(d=f[l]),h=s[t(484)]()+8,p=s.readUEG()+8,s[t(504)](1),s[t(476)]())){let e=3!==l?8:12;for(let r=0;r0&&e<16?(I=r[e-1],A=n[e-1]):255===e&&(I=s[t(474)]()<<8|s[t(474)](),A=s.readByte()<<8|s[t(474)]())}if(s[t(476)]()&&s[t(476)](),s.readBool()&&(s[t(504)](4),s[t(476)]()&&s[t(504)](24)),s[t(476)]()&&(s.readUEG(),s[t(484)]()),s.readBool()){let e=s[t(504)](32),r=s[t(504)](32);C=s[t(476)](),T=r,x=2*e,k=T/x}}let D=1;(1!==I||1!==A)&&(D=I/A);let B=0,M=0;if(0===l)B=1,M=2-g;else{B=3===l?1:2,M=(1===l?2:1)*(2-g)}let P=16*(y+1),F=16*(_+1)*(2-g);P-=(b+w)*B,F-=(S+E)*M;let U=Math[t(497)](P*D);return s.destroy(),s=null,{codec_mimetype:n,profile_idc:o,level_idc:a,profile_string:c,level_string:u,chroma_format_idc:l,bit_depth:h,bit_depth_luma:h,bit_depth_chroma:p,ref_frames:v,chroma_format:d,chroma_format_string:vr.getChromaFormatString(d),frame_rate:{fixed:C,fps:k,fps_den:x,fps_num:T},sar_ratio:{width:I,height:A},codec_size:{width:P,height:F},present_size:{width:U,height:F}}}static _skipScalingList(e,t){const r=mr;let n=8,i=8,s=0;for(let o=0;o=this[t(360)])return this[t(365)]=!0,0;this[t(365)]=!1,n=this.bufoff+e>8?8-this[t(371)]:e,r<<=n,r+=this[t(367)][this[t(356)]]>>8-this.bufoff-n&255>>8-n,this.bufoff+=n,e-=n,8==this[t(371)]&&(this[t(356)]++,this.bufoff=0)}return r}look(e){const t=wr;let r=this[t(356)],n=this[t(371)],i=this.read(e);return this.bufpos=r,this[t(371)]=n,i}[gr(359)](){const e=gr;let t;for(t=0;0===this[e(368)](1)&&!this[e(365)];t++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i[t(251)](n,0),i.set(r[t(288)],4),r.sps=i}if(r[t(247)]){const e=r[t(247)].byteLength,n=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i[t(251)](n,0),i.set(r[t(247)],4),r.pps=i}return r}function xr(){const e=["read","Strange NaluLengthSizeMinusOne: ","fps_num","16122thhLqa","refSampleDuration","skipScalingList","skipBits","16QCkyHX","compat","byteLength","chromaFormat","timescale","iFrame","22FbkKEt","readUByte","1544596ErUcud","frame_rate","pps","codecWidth","nb_sps","level_string","set","present_size","Invalid AVCDecoderConfigurationRecord: No SPS","Invalid AVCDecoderConfigurationRecord: No PPS'","h264","level","bit_depth_luma","setInt16","Strange AVCDecoderConfigurationRecord: PPS Count = "," Strange AVCDecoderConfigurationRecord: SPS Count = ","45790404vdZdQF","frameRate","currentStartcodeOffset","2723tWJfLP","123937mQKNor","readBits","fps_den","shift","error","Invalid AVCDecoderConfigurationRecord version !== 1 || avcProfile === 0","fixed","length","codec","codecHeight","kSliceSEI","nalu","avc1.","eofFlag","3jAcBgb","readUEG","buffer","width","readBool","profile_string","getUint8","sar_ratio","subarray","sps","skipUEG","chroma_format","parseSPS$2","height","bit_depth","1420aQhTeF","type","readNextNaluPayload","data","codec_size","bitDepth","read_golomb","videoType","push","Invalid AVCDecoderConfigurationRecord, lack of data!","avc_ref_frames","getUint16","8224935hrXGbI","8111511MTwjOg","36670KkrpwB","kSliceNonIDR","findNextStartCodeOffset","profile","toString"];return(xr=function(){return e})()}function Dr(e){const t=Cr;let{sps:r,pps:n}=e;const i=[23,0,0,0,0,1,66,0,30,255];i[0]=23,i[6]=r[1],i[7]=r[2],i[8]=r[3],i[10]=225,i[11]=r.byteLength>>8&255,i[12]=255&r[t(239)],i.push(...r,1,n[t(239)]>>8&255,255&n[t(239)],...n);return new Uint8Array(i)}function Br(e){const t=Cr;let{sps:r,pps:n}=e,i=8+r.byteLength+1+2+n[t(239)],s=!1;const o=vr[t(291)](r);66!==r[3]&&77!==r[3]&&88!==r[3]&&(s=!0,i+=4);let a=new Uint8Array(i);a[0]=1,a[1]=r[1],a[2]=r[2],a[3]=r[3],a[4]=255,a[5]=225;let c=r[t(239)];a[6]=c>>>8,a[7]=255&c;let u=8;a[t(251)](r,8),u+=c,a[u]=1;let l=n[t(239)];a[u+1]=l>>>8,a[u+2]=255&l,a[t(251)](n,u+3),u+=3+l,s&&(a[u]=252|o.chroma_format_idc,a[u+1]=248|o[t(257)]-8,a[u+2]=248|o.bit_depth_chroma-8,a[u+3]=0,u+=4);const d=[23,0,0,0,0],f=new Uint8Array(d[t(272)]+a[t(239)]);return f.set(d,0),f.set(a,d[t(272)]),f}function Mr(e,t){const r=Cr;let n=[];n[0]=t?23:39,n[1]=1,n[2]=0,n[3]=0,n[4]=0,n[5]=e.byteLength>>24&255,n[6]=e[r(239)]>>16&255,n[7]=e[r(239)]>>8&255,n[8]=255&e[r(239)];const i=new Uint8Array(n[r(272)]+e.byteLength);return i[r(251)](n,0),i[r(251)](e,n[r(272)]),i}function Pr(e,t){const r=Cr;let n=[];n[0]=t?23:39,n[1]=1,n[2]=0,n[3]=0,n[4]=0;const i=new Uint8Array(n[r(272)]+e[r(239)]);return i[r(251)](n,0),i.set(e,n.length),i}function Fr(e){return 31&e[0]}function Ur(e){return e===ze[Cr(275)]}function Rr(e){return!function(e){const t=Cr;return e===ze[t(288)]||e===ze[t(247)]}(e)&&!Ur(e)}function Lr(e){return e===ze[Cr(242)]}function Or(e){const t=Cr;if(0===e[t(272)])return!1;const r=Fr(e[0]);for(let n=1;n=n[t(239)])return this[t(278)]=!0,n[t(239)];let e=n[r+0]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],i=n[r+0]<<16|n[r+1]<<8|n[r+2];if(1===e||1===i)return r;r++}}[kr(296)](){const e=kr;let t=this[e(297)],r=null;for(;null==r&&!this.eofFlag;){let n=this[e(263)];n+=1===(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])?4:3;let i=31&t[n],s=(128&t[n])>>>7,o=this.findNextStartCodeOffset(n);this[e(263)]=o,i>=ze.kReserved0||0===s&&(r={type:i,data:t[e(287)](n,o)})}return r}}class zr{constructor(e){const t=kr;let r=e[t(297)][t(239)];this[t(295)]=e[t(295)],this[t(297)]=new Uint8Array(4+r),new DataView(this[t(297)][t(281)]).setUint32(0,r),this[t(297)].set(e[t(297)],4)}}function Hr(){const e=["GetBYTE","260145wejCxn","6bzywns","2138568lawRtF","3cvyUUm","length","60PbPeEo","309592nAuALd","GetBit","m_bits","67822BMfzVJ","m_byte","8046765sVYCoZ","GetWord","6962360QgKzkv","m_len","GetSE","m_idx","GetUE","m_zeros","150689CFLwIR","m_data"];return(Hr=function(){return e})()}const Vr=jr;function jr(e,t){const r=Hr();return(jr=function(e,t){return r[e-=261]})(e,t)}!function(e,t){const r=jr,n=e();for(;;)try{if(478735===parseInt(r(267))/1*(parseInt(r(281))/2)+parseInt(r(261))/3*(parseInt(r(264))/4)+-parseInt(r(280))/5+-parseInt(r(263))/6*(parseInt(r(277))/7)+parseInt(r(282))/8+parseInt(r(269))/9+-parseInt(r(271))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Hr);class Wr{constructor(e){const t=jr;this.m_idx=null,this[t(278)]=e,this[t(272)]=e[t(262)],this[t(274)]=0,this[t(266)]=0,this[t(268)]=0,this[t(276)]=0}[Vr(279)](){const e=Vr;if(this[e(274)]>=this[e(272)])return 0;let t=this[e(278)][this[e(274)]++];return 0==t?(this[e(276)]++,this[e(274)]>this[e(266)]&1}GetWord(e){const t=Vr;let r=0;for(;e>0;)r<<=1,r|=this[t(265)](),e--;return r}[Vr(275)](){const e=Vr;let t=0;for(;this.m_idx>1;return!(1&e)&&(t=-t),t}}function Gr(){const e=["warn","2927640YtEouj","SPSParser chroma_format_idc > 3","9HhmJsY","22826tOIgry","parseSPS","GetUE","1974119ZIMcmW","309265LMypMs","30wPLzCD","SPSParser sps_seq_parameter_set_id > 15","81ceyeyg","GetWord","556092oXKRbX","148500nDIBUe","_ebsp2rbsp","7500050ZUrjJC"];return(Gr=function(){return e})()}const qr=Yr;function Yr(e,t){const r=Gr();return(Yr=function(e,t){return r[e-=380]})(e,t)}!function(e,t){const r=Yr,n=e();for(;;)try{if(227860===-parseInt(r(380))/1+-parseInt(r(387))/2*(-parseInt(r(394))/3)+-parseInt(r(396))/4+parseInt(r(391))/5*(parseInt(r(392))/6)+parseInt(r(390))/7+parseInt(r(384))/8+-parseInt(r(386))/9*(parseInt(r(382))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Gr);class Kr{static[qr(381)](e){let t=e,r=t.byteLength,n=new Uint8Array(r),i=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(n[i]=t[e],i++);return new Uint8Array(n.buffer,0,i)}static[qr(388)](e){const t=qr;let r=Kr[t(381)](e);const n=new Wr(r);let i="",s="",o="",a="";n[t(395)](4);let c=n.GetWord(3);if(c>6)return console[t(383)]("SPSParser sps_max_sub_layers_minus1 > 6"),!1;n.GetWord(1),n[t(395)](2),n.GetWord(1),i=n[t(395)](5),n[t(395)](32),n.GetWord(1),n.GetWord(1),n[t(395)](1),n[t(395)](1),n[t(395)](44),s=n[t(395)](8);let u=[],l=[];for(let e=0;e0)for(let e=c;e<8;e++)n[t(395)](2);for(let e=0;e15)return console.warn(t(393),d),!1;let f=n[t(389)]();return f>3?(console.warn(t(385),f),!1):(3==f&&n[t(395)](1),o=n.GetUE(),a=n[t(389)](),n[t(395)](1)&&(n[t(389)](),n[t(389)](),n.GetUE(),n[t(389)]()),n[t(389)]()!=n.GetUE()?(console[t(383)]("SPSParser bit_depth_luma_minus8 != bit_depth_chroma_minus8"),!1):{profile_string:i,level_string:s,bit_depth:"",ref_frames:"",chroma_format:"",chroma_format_string:"",frame_rate:{fixed:"",fps:"",fps_den:"",fps_num:""},sar_ratio:{width:"",height:""},codec_size:{width:o,height:a},present_size:{width:"",height:a}})}}function Xr(){const e=["4:4:4","readBool","toFixed","readByte","856uBnsdo","143THBIlP","readSEG",".1.L","4398DzLJkp","readUEG","49656XjyIEo","4:0:0","13630CTMQmM","801JwgHkz","389780kSfreJ","byteLength","51312zAqNDz","619722axXUgh","4:2:2","buffer","readBits","4537CujKhK","7pgVrMb","Unknown","201czKjPv","push","591661rwGcxh","min"];return(Xr=function(){return e})()}function Jr(e,t){const r=Xr();return(Jr=function(e,t){return r[e-=171]})(e,t)}!function(e,t){const r=Jr,n=e();for(;;)try{if(314259===-parseInt(r(198))/1+parseInt(r(180))/2*(-parseInt(r(196))/3)+-parseInt(r(176))/4*(-parseInt(r(184))/5)+-parseInt(r(189))/6*(-parseInt(r(194))/7)+-parseInt(r(188))/8*(parseInt(r(185))/9)+parseInt(r(186))/10*(-parseInt(r(177))/11)+-parseInt(r(182))/12*(-parseInt(r(193))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Xr);const $r=e=>{const t=Jr;let r=e,n=r[t(187)],i=new Uint8Array(n),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(191)],0,s)},Zr=e=>{const t=Jr;switch(e){case 0:return t(183);case 1:return"4:2:0";case 2:return t(190);case 3:return t(172);default:return t(195)}};function Qr(e,t){const r=tn();return(Qr=function(e,t){return r[e-=196]})(e,t)}const en=Qr;function tn(){const e=["readUEG","756936QtVdUa","Rext","readSEG","MainSP","getLevelString","getProfileString","4:2:2",".B0","4:0:0","24LhOWrJ","Main10","readBits","2246902ZtwALU","readByte","4:2:0","hvc1.","parseVPS","3Ygzllx","177vwfEmX","toFixed","Main","66960MrWOjt","1001170FIYTFO","push","1915490RgOyED","38792yKpewX","byteLength","Unknown","_ebsp2rbsp","readBool","parsePPS","min","205848mKrQGU"];return(tn=function(){return e})()}!function(e,t){const r=Qr,n=e();for(;;)try{if(326997===-parseInt(r(204))/1*(-parseInt(r(208))/2)+parseInt(r(205))/3*(-parseInt(r(212))/4)+parseInt(r(211))/5+parseInt(r(221))/6+parseInt(r(199))/7+-parseInt(r(196))/8*(-parseInt(r(219))/9)+-parseInt(r(209))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(tn);class rn{static[en(215)](e){let t=e,r=t[en(213)],n=new Uint8Array(r),i=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(n[i]=t[e],i++);return new Uint8Array(n.buffer,0,i)}static[en(203)](e){const t=en;let r=rn._ebsp2rbsp(e),n=new ut(r);return n[t(200)](),n[t(200)](),n[t(198)](4),n[t(198)](2),n[t(198)](6),{num_temporal_layers:n[t(198)](3)+1,temporal_id_nested:n[t(216)]()}}static parseSPS(e){const t=en;let r=rn._ebsp2rbsp(e),n=new ut(r);n.readByte(),n[t(200)]();let i=0,s=0,o=0,a=0;n[t(198)](4);let c=n.readBits(3);n[t(216)]();let u=n[t(198)](2),l=n[t(216)](),d=n[t(198)](5),f=n[t(200)](),h=n[t(200)](),p=n[t(200)](),m=n.readByte(),v=n.readByte(),y=n[t(200)](),_=n[t(200)](),g=n[t(200)](),b=n[t(200)](),w=n[t(200)](),S=n[t(200)](),E=[],I=[];for(let e=0;e0)for(let e=c;e<8;e++)n[t(198)](2);for(let e=0;e1&&n.readSEG();for(let e=0;e0&&e<=16?(U=r[e-1],R=i[e-1]):255===e&&(U=n[t(198)](16),R=n.readBits(16))}if(n.readBool()&&n[t(216)](),n[t(216)]()){n.readBits(3),n[t(216)](),n[t(216)]()&&(n.readByte(),n[t(200)](),n[t(200)]())}if(n[t(216)]()&&(n[t(220)](),n.readUEG()),n[t(216)](),n[t(216)](),n[t(216)](),P=n[t(216)](),P&&(n[t(220)](),n.readUEG(),n[t(220)](),n[t(220)]()),n.readBool()){if(O=n[t(198)](32),N=n.readBits(32),n[t(216)]()&&n[t(220)](),n[t(216)]()){let e=!1,r=!1,i=!1;e=n[t(216)](),r=n[t(216)](),(e||r)&&(i=n.readBool(),i&&(n[t(200)](),n[t(198)](5),n[t(216)](),n[t(198)](5)),n[t(198)](4),n[t(198)](4),i&&n[t(198)](4),n[t(198)](5),n[t(198)](5),n[t(198)](5));for(let s=0;s<=c;s++){let s=n[t(216)]();L=s;let o=!0,a=1;!s&&(o=n[t(216)]());let c=!1;if(o?n[t(220)]():c=n[t(216)](),!c&&(a=n.readUEG()+1),e){for(let e=0;e>6&3,n[t(470)]=e[1]>>5&1,n[t(484)]=31&e[1],n[t(483)]=e[2]<<24|e[3]<<16|e[4]<<8|e[5],n[t(501)]=e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[t(501)]=n[t(501)]<<16|e[10]<<8|e[11],n[t(511)]=e[12],n[t(567)]=(15&e[13])<<8|e[14],n[t(473)]=3&e[15],n[t(449)]=3&e[16],n[t(439)]=7&e[17],n[t(438)]=7&e[18],n[t(565)]=e[19]<<8|e[20],n[t(515)]=e[21]>>6&3,n[t(480)]=e[21]>>3&7,n[t(444)]=e[21]>>2&1,n[t(432)]=3&e[21];let i=e[22],s=e[t(464)](23);for(let e=0;e0)for(let t=r;t<8;t++)e[n(436)](2);i[n(498)]=[],i.sub_layer_tier_flag=[],i[n(545)]=[],i[n(527)]=[],i.sub_layer_progressive_source_flag=[],i[n(474)]=[],i[n(452)]=[],i[n(563)]=[],i.sub_layer_level_idc=[];for(let t=0;t{const t=Jr;let r=$r(e),n=new ut(r);return n.readByte(),n.readByte(),n[t(192)](4),n[t(192)](2),n.readBits(6),{num_temporal_layers:n[t(192)](3)+1,temporal_id_nested:n[t(173)]()}})(r),a=(e=>{const t=Jr;let r=$r(e),n=new ut(r);n.readByte(),n[t(175)]();let i=0,s=0,o=0,a=0;n[t(192)](4);let c=n.readBits(3);n[t(173)]();let u=n[t(192)](2),l=n[t(173)](),d=n[t(192)](5),f=n.readByte(),h=n[t(175)](),p=n[t(175)](),m=n.readByte(),v=n[t(175)](),y=n[t(175)](),_=n[t(175)](),g=n[t(175)](),b=n[t(175)](),w=n[t(175)](),S=n.readByte(),E=[],I=[];for(let e=0;e0)for(let e=c;e<8;e++)n[t(192)](2);for(let e=0;e1&&n[t(178)]();for(let e=0;e0&&e<16?(U=r[e-1],R=i[e-1]):255===e&&(U=n[t(192)](16),R=n[t(192)](16))}if(n[t(173)]()&&n.readBool(),n[t(173)]()&&(n[t(192)](3),n.readBool(),n[t(173)]()&&(n[t(175)](),n[t(175)](),n[t(175)]())),n[t(173)]()&&(n[t(181)](),n[t(181)]()),n[t(173)](),n.readBool(),n.readBool(),P=n.readBool(),P&&(i+=n[t(181)](),s+=n[t(181)](),o+=n[t(181)](),a+=n[t(181)]()),n[t(173)]()&&(O=n[t(192)](32),N=n.readBits(32),n[t(173)]()&&(n[t(181)](),n[t(173)]()))){let e=!1,r=!1,i=!1;e=n[t(173)](),r=n.readBool(),(e||r)&&(i=n.readBool(),i&&(n.readByte(),n[t(192)](5),n[t(173)](),n[t(192)](5)),n[t(192)](4),n.readBits(4),i&&n[t(192)](4),n[t(192)](5),n[t(192)](5),n.readBits(5));for(let s=0;s<=c;s++){let s=n[t(173)]();L=s;let o=!1,a=1;!s&&(o=n[t(173)]());let c=!1;if(o?n[t(178)]():c=n[t(173)](),!c&&(cpbcnt=n[t(181)]()+1),e)for(let e=0;e{const t=Jr;let r=$r(e),n=new ut(r);n[t(175)](),n[t(175)](),n[t(181)](),n.readUEG(),n[t(173)](),n.readBool(),n[t(192)](3),n[t(173)](),n[t(173)](),n[t(181)](),n.readUEG(),n[t(178)](),n[t(173)](),n[t(173)](),n.readBool()&&n.readUEG(),n.readSEG(),n[t(178)](),n[t(173)](),n[t(173)](),n[t(173)](),n.readBool();let i=n[t(173)](),s=n[t(173)](),o=1;return s&&i?o=0:s?o=3:i&&(o=2),{parallelismType:o}})(n);s=Object.assign(s,o,a,c);let u=23+(5+r.byteLength)+(5+i[t(533)])+(5+n[t(533)]),l=new Uint8Array(u);l[0]=1,l[1]=(3&s[t(485)])<<6|(s[t(470)]?1:0)<<5|31&s.general_profile_idc,l[2]=s.general_profile_compatibility_flags_1||0,l[3]=s[t(513)]||0,l[4]=s[t(540)]||0,l[5]=s.general_profile_compatibility_flags_4||0,l[6]=s[t(467)]||0,l[7]=s[t(499)]||0,l[8]=s[t(506)]||0,l[9]=s[t(491)]||0,l[10]=s[t(528)]||0,l[11]=s[t(561)]||0,l[12]=60,l[13]=240|(3840&s.min_spatial_segmentation_idc)>>8,l[14]=255&s[t(567)],l[15]=252|3&s[t(473)],l[16]=252|3&s[t(496)],l[17]=248|7&s[t(440)],l[18]=248|7&s[t(460)],l[19]=0,l[20]=0,l[21]=(3&s[t(516)])<<6|(7&s[t(448)])<<3|(s[t(535)]?1:0)<<2|3,l[22]=3,l[23]=128|He[t(537)],l[24]=0,l[25]=1,l[26]=(65280&r[t(533)])>>8,l[27]=(255&r.byteLength)>>0,l[t(555)](r,28),l[23+(5+r[t(533)])+0]=128|He[t(490)],l[23+(5+r[t(533)])+1]=0,l[23+(5+r[t(533)])+2]=1,l[23+(5+r[t(533)])+3]=(65280&i[t(533)])>>8,l[23+(5+r[t(533)])+4]=(255&i[t(533)])>>0,l.set(i,23+(5+r[t(533)])+5),l[23+(5+r[t(533)]+5+i[t(533)])+0]=128|He.pps,l[23+(5+r.byteLength+5+i[t(533)])+1]=0,l[23+(5+r.byteLength+5+i[t(533)])+2]=1,l[23+(5+r[t(533)]+5+i[t(533)])+3]=(65280&n[t(533)])>>8,l[23+(5+r[t(533)]+5+i[t(533)])+4]=(255&n[t(533)])>>0,l[t(555)](n,23+(5+r[t(533)]+5+i.byteLength)+5);const d=[28,0,0,0,0],f=new Uint8Array(d.length+l[t(533)]);return f[t(555)](d,0),f[t(555)](l,d[t(547)]),f}function ln(e,t){const r=sn;let n=[];n[0]=t?28:44,n[1]=1,n[2]=0,n[3]=0,n[4]=0,n[5]=e[r(533)]>>24&255,n[6]=e[r(533)]>>16&255,n[7]=e.byteLength>>8&255,n[8]=255&e[r(533)];const i=new Uint8Array(n.length+e.byteLength);return i[r(555)](n,0),i[r(555)](e,n[r(547)]),i}function dn(e,t){const r=sn;let n=[];n[0]=t?28:44,n[1]=1,n[2]=0,n[3]=0,n[4]=0;const i=new Uint8Array(n[r(547)]+e[r(533)]);return i[r(555)](n,0),i[r(555)](e,n[r(547)]),i}function fn(e){return(126&e[0])>>1}function hn(e){return e===He[sn(544)]}function pn(){const e=["separate_colour_plane_flag","min_spatial_segmentation_idc","sarRatio","setInt16","level_string","readUEG","sub_layer_level_idc","fixed","findNextStartCodeOffset","profile_compatibility_flags","hev1.1.6.L93.B0","codecHeight","parseHEVCDecoderVPSAndSPSAndPPS and pps tag is ","pps","lengthSizeMinusOne","readUByte","Could not find H265 startcode until payload end!","7278095YTPdJi","read","width","bitDepthChromaMinus8","bitDepthLumaMinus8","bit_depth_luma_minus8","data"," < 23","level_idc","temporalIdNested","hvcc","arrayBuffer.length ","type","num_temporal_layers","chromaFormat","generalProfileCompatibilityFlags","generalTierFlag","sub_layer_non_packed_constraint_flag","bit_depth","pic_width_in_luma_samples","readNextNaluPayload","codec_mimetype","conformance_window_flag","general_interlaced_source_flag","h265","bit_depth_chroma_minus8","codec","bitDepth","refSampleDuration","slice","conf_win_right_offset","5AxKDEx","general_constraint_indicator_flags_1"," < 22","presentHeight","general_tier_flag","parseHEVCDecoderVPSAndSPSAndPPS and sps tag is ","height","parallelismType","sub_layer_interlaced_source_flag","parseHEVCDecoderConfigurationRecord$3","107670oQHwxM","codecWidth","1950440oZkTOS","max","numTemporalLayers","conf_win_left_offset","level","general_profile_compatibility_flags","general_profile_idc","general_profile_space","fps_num","parseSPS","chroma_format","Invalid HEVCDecoderConfigurationRecord,version is ","sps","general_constraint_indicator_flags_4","generalProfileIdc","general_frame_only_constraint_flag","7365FgeiJg","subarray","chroma_format_idc","codec_size","sub_layer_profile_space","general_constraint_indicator_flags_2","read_golomb","general_constraint_indicator_flags","push","fps_den","getUint8","present_size","general_constraint_indicator_flags_3","455986emqnbu","sps_max_sub_layers_minus1","frameRate","conf_win_top_offset","general_level_idc","profile_idc","general_profile_compatibility_flags_2","warn","constantFrameRate","constant_frame_rate","generalLevelIdc","sar_ratio","generalProfileSpace","455NeLskb","parseHEVCDecoderVPSAndSPSAndPPS and vpsTag is ","20tPStOb","sps_video_parameter_set_id","Invalid HEVCDecoderConfigurationRecord, lack of data! ","pic_height_in_luma_samples","profile_string","sub_layer_profile_compatibility_flag","general_constraint_indicator_flags_5","Invalid HEVCDecoderConfigurationRecord, Strange NaluLengthSizeMinusOne: ","getUint16","presentWidth","currentStartcodeOffset","byteLength","configurationVersion","temporal_id_nested","sub_layer_progressive_source_flag","vps","general_non_packed_constraint_flag","error","general_profile_compatibility_flags_3","readBits","general_progressive_source_flag","timescale","sei","sub_layer_profile_idc","from","length","156717oCzpGQ","444NdgWdk","4303016SuuKDT","psps","sub_layer_profile_present_flag","profile","buffer","set","sps_seq_parameter_set_id","conf_win_bottom_offset","setUint32","parseHEVCDecoderConfigurationRecord$2","eofFlag","general_constraint_indicator_flags_6","frame_rate","sub_layer_frame_only_constraint_flag","sps_temporal_id_nesting_flag","avgFrameRate"];return(pn=function(){return e})()}function mn(e){return!((t=e)>=32&&t<=40);var t}function vn(e){return e>=16&&e<=21}function yn(e){const t=sn;if(0===e[t(547)])return!1;const r=fn(e[0]);for(let n=1;n=n[t(533)])return this[t(560)]=!0,n[t(533)];let e=n[r+0]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],i=n[r+0]<<16|n[r+1]<<8|n[r+2];if(1===e||1===i)return r;r++}}[nn(455)](){const e=nn;let t=this[e(441)],r=null;for(;null==r&&!this[e(560)];){let n=this.currentStartcodeOffset;n+=1===(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])?4:3;let i=t[n]>>1&63,s=(128&t[n])>>>7,o=this[e(574)](n);this.currentStartcodeOffset=o,0===s&&(r={type:i,data:t[e(495)](n,o)})}return r}}class gn{constructor(e){const t=nn;let r=e.data[t(533)];this[t(447)]=e[t(447)],this[t(441)]=new Uint8Array(4+r),new DataView(this.data[t(554)])[t(558)](0,r),this[t(441)][t(555)](e[t(441)],4)}}var bn=Mn;!function(e,t){for(var r=Mn,n=e();;)try{if(115645===-parseInt(r(241))/1*(parseInt(r(228))/2)+-parseInt(r(216))/3*(parseInt(r(200))/4)+-parseInt(r(184))/5*(parseInt(r(207))/6)+parseInt(r(254))/7*(parseInt(r(230))/8)+parseInt(r(168))/9+-parseInt(r(215))/10+parseInt(r(240))/11*(parseInt(r(232))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(qn);var wn,Sn=bn(246),En="text/html",In=/^(?:text|application)\/xml/i,An=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,kn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Cn=/^\s*$/,Tn={},xn={},Dn="",Bn={type:bn(190),beforeSend:Pn,success:Pn,error:Pn,complete:Pn,context:null,xhr:function(){return new(window[bn(239)])},accepts:{json:Sn,xml:bn(251),html:En,text:bn(202),"*":"*/"[bn(243)]("*")},crossDomain:!1,timeout:0,username:null,password:null,processData:!0,promise:Pn,contentType:bn(178)};function Mn(e,t){var r=qn();return(Mn=function(e,t){return r[e-=168]})(e,t)}function Pn(){}var Fn=function(e,t){var r=bn;typeof e===r(250)&&(t=e,e=void 0);var n=Vn({},t=t||{});for(var i in Bn)void 0===n[i]&&(n[i]=Bn[i]);try{var s={},o=new Promise((function(e,t){var n=r;s.resolve=e,s[n(192)]=t}));o.resolve=s[r(229)],o[r(192)]=s[r(192)],n.promise=o}catch(e){n[r(237)]={resolve:Pn,reject:Pn}}var a=kn[r(212)](window[r(220)][r(262)][r(249)]())||[];n.url=((e||n[r(274)]||window[r(220)].href)+"")[r(247)](/#.*$/,"").replace(/^\/\//,a[1]+"//");var c=n[r(274)];!n[r(183)]&&(n.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/[r(199)](n[r(274)])&&RegExp.$2!==window[r(220)][r(262)]);var u=n[r(213)];if(u===r(242)){if(!/=\?/.test(n[r(274)])){var l=(n.jsonp||"callback")+"=?";n[r(274)]=Nn(n[r(274)],l)}return function(e){var t,r=bn,n=e[r(177)]||r(242)+Gn(),i=window.document.createElement("script"),s={abort:function(){n in window&&(window[n]=Pn)}},o=window[r(182)][r(186)]("head")[0]||window[r(182)].documentElement;function a(n){var i=r;window[i(244)](t),s[i(204)](),Ln(n[i(217)],s,n[i(217)],e),c()}function c(){var e=r;i[e(175)]?i[e(175)]():i.onload=i[e(256)]=i.onerror=null,i[e(245)]&&i[e(245)][e(252)](i),i=null,delete window[n]}return i[r(198)]=function(e){a(e)},window[n]=function(n){window[r(244)](t),Un(n,s,e),c()},zn(e),i[r(170)]=e.url[r(247)](/=\?/,"="+n),i[r(170)]=Nn(i[r(170)],"_="+(new Date)[r(214)]()),i.async=!0,e.scriptCharset&&(i[r(260)]=e[r(223)]),o[r(172)](i,o[r(226)]),e[r(219)]>0&&(t=window[r(227)]((function(){var t=r;s[t(204)](),Ln(t(219),s,"timeout",e),c()}),e.timeout)),e.promise[r(204)]=function(){s[r(204)]()},e[r(237)][r(276)]=s,e[r(237)]}(n)}zn(n);var d=n[r(271)][u]||n[r(271)]["*"],f={};/^([\w-]+:)\/\//.test(n[r(274)])?RegExp.$1:window.location[r(193)];var h,p=Bn[r(276)]();!n[r(183)]&&!f[r(233)]&&(f[r(233)]=r(239)),n[r(218)]&&(Tn[c]&&(f[r(259)]=Tn[c]),xn[c]&&(f["If-None-Match"]=xn[c])),d&&(f[r(275)]=d,d[r(205)](",")>-1&&(d=d[r(273)](",",2)[0]),p.overrideMimeType&&p[r(201)](d));var m=!/^(?:GET|HEAD)$/.test(n[r(217)][r(263)]());if((n.data&&m&&!1!==n[r(236)]||t[r(236)])&&(f[r(188)]=n[r(236)]),!1===n[r(187)]&&!m){var v=/([?&])_=[^&]*/;n[r(274)]=v[r(199)](c)?c.replace(v,"$1_="+Gn()):c+(/\?/[r(199)](c)?"&":"?")+"_="+Gn()}n.headers=Vn(f,n[r(265)]||{}),p[r(256)]=function(){var e,t,i=r;if(4===p[i(222)]){clearTimeout(h);var s,o=!1;if(p.status>=200&&p[i(238)]<300||304===p[i(238)]){if(Dn=p[i(221)](),n[i(218)]){var a=On("Last-Modified");a&&(Tn[c]=a),(a=On(i(174)))&&(xn[c]=a)}u=u||(e=p[i(269)](i(210)),t=bn,e&&(e===En?t(225):e===Sn?t(209):In[t(199)](e)&&t(197))||t(196)),s=p[i(189)];try{u===i(197)?s=p.responseXML:u===i(209)&&(s=Cn[i(199)](s)?null:JSON[i(211)](s))}catch(e){o=e}o?Ln(o,"parseerror",p,n):Un(s,p,n)}else Ln(null,i(267),p,n)}};var y=!(r(169)in n)||n[r(169)];if(p[r(176)](n.type,n.url,y,n[r(234)],n[r(255)]),n[r(191)])for(var _ in n.xhrFields)p[_]=n[r(191)][_];for(var _ in n[r(179)]&&p.overrideMimeType&&p[r(201)](n[r(179)]),n[r(265)])void 0!==n[r(265)][_]&&p[r(195)](_,n[r(265)][_]+"");return!1===function(e,t){var r=t.context;if(!1===t.beforeSend.call(r,e,t))return!1}(p,n)?(p[r(204)](),!1):(n[r(219)]>0&&(h=window[r(227)]((function(){var e=r;p[e(256)]=Pn,p[e(204)](),Ln(null,e(219),p,n)}),n.timeout)),p[r(224)](n[r(272)]?n.data:null),n[r(237)][r(204)]=function(){p[r(204)]()},n[r(237)])};function Un(e,t,r){var n=bn,i=r[n(206)],s=n(171);r.success[n(268)](i,e,s,t),r.promise.resolve(e,s,t),Rn(s,t,r)}function Rn(e,t,r){var n=bn,i=r[n(206)];r.complete[n(268)](i,t,e)}function Ln(e,t,r,n){var i=bn,s=n[i(206)];n[i(267)][i(268)](s,r,t,e),n.promise.reject(r,t,e),Rn(t,r,n)}function On(e){var t,r=bn;if(!wn){for(wn={};t=An[r(212)](Dn);)wn[t[1].toLowerCase()]=t[2];t=wn[e[r(249)]()]}return null===t?null:t}function Nn(e,t){return(e+"&"+t)[bn(247)](/[&?]{1,2}/,"?")}function zn(e){var t,r,n,i,s=bn;jn(e)&&!(e[s(272)]instanceof FormData)&&e[s(257)]&&(e.data=(t=e[s(272)],(i=[])[(n=bn)(258)]=function(e,t){this[n(235)](encodeURIComponent(e)+"="+encodeURIComponent(t))},Hn(i,t,r),i[n(270)]("&")[n(247)](n(194),"+"))),e.data&&(!e.type||"GET"===e[s(217)][s(263)]())&&(e.url=Nn(e[s(274)],e[s(272)]))}function Hn(e,t,r,n){var i,s,o=bn,a=(i=t,s=bn,Object[s(181)][s(173)][s(268)](i)===s(248));for(var c in t){var u=t[c];n&&(c=r?n:n+"["+(a?"":c)+"]"),!n&&a?e[o(258)](u[o(208)],u.value):(r?a(u):jn(u))?Hn(e,u,r,c):e[o(258)](c,u)}}function Vn(e){for(var t=bn,r=Array.prototype[t(266)],n=r.call(arguments,1),i=0,s=n[t(203)];i255)return!1;return!0}function Jn(e,t){var r=$n;if(e[r(224)]&&e[r(255)]===r(266))return t&&(e=e[r(227)]?e[r(227)]():Array.prototype.slice.call(e)),e;if(Array[r(252)](e)){if(!Xn(e))throw new Error(r(229)+e);return new Uint8Array(e)}if(Kn(e[r(218)])&&Xn(e))return new Uint8Array(e);throw new Error(r(233))}function $n(e,t){var r=Ci();return($n=function(e,t){return r[e-=201]})(e,t)}function Zn(e){return new Uint8Array(e)}function Qn(e,t,r,n,i){var s=$n;(null!=n||null!=i)&&(e=e[s(227)]?e[s(227)](n,i):Array[s(259)][s(227)][s(207)](e,n,i)),t[s(230)](e,r)}!function(e,t){for(var r=$n,n=e();;)try{if(874190===parseInt(r(221))/1*(parseInt(r(248))/2)+-parseInt(r(241))/3*(parseInt(r(206))/4)+-parseInt(r(247))/5*(-parseInt(r(272))/6)+parseInt(r(219))/7*(-parseInt(r(228))/8)+parseInt(r(239))/9*(parseInt(r(231))/10)+-parseInt(r(203))/11*(parseInt(r(260))/12)+-parseInt(r(254))/13)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ci);var ei,ti={toBytes:function(e){var t=$n,r=[],n=0;for(e=encodeURI(e);n191&&i<224?(r.push(String.fromCharCode((31&i)<<6|63&e[n+1])),n+=2):(r.push(String.fromCharCode((15&i)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return r.join("")}},ri=(ei="0123456789abcdef",{toBytes:function(e){for(var t=$n,r=[],n=0;n>4]+ei[15&i])}return r[t(258)]("")}}),ni={16:10,24:12,32:14},ii=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],si=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],oi=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],ai=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],ci=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],ui=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],li=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],di=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],fi=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],hi=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],pi=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],mi=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],vi=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],yi=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],_i=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function gi(e){for(var t=$n,r=[],n=0;n>2,this[e(214)][n][r%4]=o[r],this._Kd[t-n][r%4]=o[r];for(var a,c=0,u=s;u>16&255]<<24^si[a>>8&255]<<16^si[255&a]<<8^si[a>>24&255]^ii[c]<<24,c+=1,8!=s)for(r=1;r>8&255]<<8^si[a>>16&255]<<16^si[a>>24&255]<<24;for(r=s/2+1;r>2,d=u%4,this[e(214)][l][d]=o[r],this[e(237)][t-l][d]=o[r++],u++}for(var l=1;l>24&255]^vi[a>>16&255]^yi[a>>8&255]^_i[255&a]},bi[Yn(259)][Yn(225)]=function(e){var t=Yn;if(16!=e[t(218)])throw new Error(t(240));for(var r=this._Ke[t(218)]-1,n=[0,0,0,0],i=gi(e),s=0;s<4;s++)i[s]^=this[t(214)][0][s];for(var o=1;o>24&255]^ci[i[(s+1)%4]>>16&255]^ui[i[(s+2)%4]>>8&255]^li[255&i[(s+3)%4]]^this[t(214)][o][s];i=n[t(227)]()}var a,c=Zn(16);for(s=0;s<4;s++)a=this[t(214)][r][s],c[4*s]=255&(si[i[s]>>24&255]^a>>24),c[4*s+1]=255&(si[i[(s+1)%4]>>16&255]^a>>16),c[4*s+2]=255&(si[i[(s+2)%4]>>8&255]^a>>8),c[4*s+3]=255&(si[255&i[(s+3)%4]]^a);return c},bi[Yn(259)][Yn(232)]=function(e){var t=Yn;if(16!=e[t(218)])throw new Error("invalid ciphertext size (must be 16 bytes)");for(var r=this[t(237)][t(218)]-1,n=[0,0,0,0],i=gi(e),s=0;s<4;s++)i[s]^=this._Kd[0][s];for(var o=1;o>24&255]^fi[i[(s+3)%4]>>16&255]^hi[i[(s+2)%4]>>8&255]^pi[255&i[(s+1)%4]]^this[t(237)][o][s];i=n[t(227)]()}var a,c=Zn(16);for(s=0;s<4;s++)a=this._Kd[r][s],c[4*s]=255&(oi[i[s]>>24&255]^a>>24),c[4*s+1]=255&(oi[i[(s+3)%4]>>16&255]^a>>16),c[4*s+2]=255&(oi[i[(s+2)%4]>>8&255]^a>>8),c[4*s+3]=255&(oi[255&i[(s+1)%4]]^a);return c};var wi=function(e){var t=Yn;if(!(this instanceof wi))throw Error(t(256));this[t(265)]=t(201),this[t(255)]=t(257),this[t(205)]=new bi(e)};wi[Yn(259)].encrypt=function(e){var t=Yn;if((e=Jn(e)).length%16!=0)throw new Error(t(208));for(var r=Zn(e[t(218)]),n=Zn(16),i=0;iNumber[t(253)])throw new Error(t(202));for(var r=15;r>=0;--r)this[t(234)][r]=e%256,e=parseInt(e/256)},Ai.prototype.setBytes=function(e){var t=Yn;if(16!=(e=Jn(e,!0))[t(218)])throw new Error(t(262));this._counter=e},Ai[Yn(259)][Yn(263)]=function(){for(var e=Yn,t=15;t>=0;t--){if(255!==this._counter[t]){this[e(234)][t]++;break}this[e(234)][t]=0}};var ki=function(e,t){var r=Yn;if(!(this instanceof ki))throw Error(r(256));this.description=r(220),this.name=r(249),!(t instanceof Ai)&&(t=new Ai(t)),this[r(234)]=t,this[r(226)]=null,this[r(211)]=16,this[r(205)]=new bi(e)};function Ci(){var e=["12LcQPOG","segmentSize","invalid counter bytes size (must be 16 bytes)","increment","_lastCipherblock","description","Uint8Array","invalid key size (must be 16, 24 or 32 bytes)","substr","_lastPrecipherIndex","PKCS#7 invalid padding byte","Cipher Block Chaining","30wESHLm","charCodeAt","defineProperty","Electronic Code Block","integer value out of safe range","16833839BIITGV","fromCharCode","_aes","404812VzQpNy","call","invalid plaintext size (must be multiple of 16 bytes)","invalid initialation vector size (must be 16 bytes)","setBytes","_remainingCounterIndex","_lastPrecipher","_shiftRegister","_Ke","invalid ciphertext size (must be multiple of 16 bytes)","_prepare","invalid plaintext size (must be segmentSize bytes)","length","1575763rmhFdE","Counter","911140VJZrTe","push","invalid ciphertext size (must be segmentSize bytes)","buffer","encrypt","_remainingCounter","slice","32XwBLVG","Array contains invalid value: ","set","15056810iHtFxB","decrypt","unsupported array-like object","_counter","setValue","invalid initialation vector size (must be 16 size)","_Kd","Counter must be instanitated with `new`","9POSgMa","invalid plaintext size (must be 16 bytes)","18xAvEwM","Cipher Feedback","number","invalid counter value (must be an integer)","cbc","cfb","1563955FeXCeC","2OBxikh","ctr","Output Feedback","key","isArray","MAX_SAFE_INTEGER","891579qnXLAf","name","AES must be instanitated with `new`","ecb","join","prototype"];return(Ci=function(){return e})()}ki[Yn(259)][Yn(225)]=function(e){for(var t=Yn,r=Jn(e,!0),n=0;n16)throw new Error("PKCS#7 padding byte out of range");for(var n=e.length-r,i=0;i>>2]>>>24-a%4*8&255;r[s+a>>>2]|=c<<24-(s+a)%4*8}else for(var u=0;u>>2]=i[u>>>2];return this.sigBytes+=o,this},clamp:function(){var t=n,r=this[t(245)],i=this[t(263)];r[i>>>2]&=4294967295<<32-i%4*8,r[t(248)]=e.ceil(i/4)},clone:function(){var e=n,t=u.clone[e(232)](this);return t.words=this[e(245)][e(273)](0),t},random:function(e){for(var t=n,r=[],s=0;s>>2]>>>24-o%4*8&255;s[t(224)]((a>>>4)[t(269)](16)),s[t(224)]((15&a)[t(269)](16))}return s[t(274)]("")},parse:function(e){for(var t=n,r=e[t(248)],i=[],s=0;s>>3]|=parseInt(e.substr(s,2),16)<<24-s%8*4;return new(l[t(249)])(i,r/2)}},p=d[n(280)]={stringify:function(e){for(var t=n,r=e.words,i=e.sigBytes,s=[],o=0;o>>2]>>>24-o%4*8&255;s[t(224)](String.fromCharCode(a))}return s.join("")},parse:function(e){for(var t=n,r=e[t(248)],i=[],s=0;s>>2]|=(255&e[t(222)](s))<<24-s%4*8;return new(l[t(249)])(i,r)}},m=d[n(223)]={stringify:function(e){var t=n;try{return decodeURIComponent(escape(p[t(271)](e)))}catch(e){throw new Error(t(225))}},parse:function(e){return p[n(227)](unescape(encodeURIComponent(e)))}},v=c.BufferedBlockAlgorithm=u.extend({reset:function(){var e=n;this[e(264)]=new(l[e(249)]),this[e(267)]=0},_append:function(e){var t=n;"string"==typeof e&&(e=m[t(227)](e)),this[t(264)][t(259)](e),this[t(267)]+=e[t(263)]},_process:function(t){var r,i=n,s=this[i(264)],o=s.words,a=s[i(263)],c=this[i(218)],u=a/(4*c),d=(u=t?e.ceil(u):e[i(237)]((0|u)-this[i(278)],0))*c,f=e.min(4*d,a);if(d){for(var h=0;h>>2]|=e[o]<<24-o%4*8;n[r(148)](this,s,i)}else n.apply(this,arguments)};i[t(160)]=r}}(),e.lib[t(142)]},"object"===(i=Li)(161)?e[i(151)]=n(Mi):"undefined"===i(155)&&(void 0)[i(144)]?(void 0)([i(147)],n):n(r.CryptoJS)}));function Li(e,t){var r=Ri();return(Li=function(e,t){return r[e-=140]})(e,t)}var Oi=zi;function Ni(){var e=["charCodeAt","enc","length","731646ynZZqo","11048864RWSvso","3zWtvHe","createCommonjsModule","22079590wZGaPv","WordArray","create","1085444jLVmfW","lib","Utf16LE","push","amd","Utf16","exports","5427810pzedJx","8733348YbGUZL","./core","7eJCoTV","CryptoJS","object","sigBytes","1232878WrTlbL","fromCharCode","5jeWCzS","words","join"];return(Ni=function(){return e})()}function zi(e,t){var r=Ni();return(zi=function(e,t){return r[e-=141]})(e,t)}!function(e,t){for(var r=zi,n=e();;)try{if(736434===parseInt(r(156))/1+-parseInt(r(148))/2*(parseInt(r(158))/3)+parseInt(r(163))/4*(-parseInt(r(150))/5)+parseInt(r(141))/6*(-parseInt(r(144))/7)+-parseInt(r(157))/8+parseInt(r(142))/9+parseInt(r(160))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ni);f[Oi(159)]((function(e,t){var r,n,i;r=c,n=function(e){var t=zi;return function(){var t=zi,r=e,n=r[t(164)][t(161)],i=r.enc;function s(e){return e<<8&4278255360|e>>>8&16711935}i[t(168)]=i.Utf16BE={stringify:function(e){for(var r=t,n=e[r(151)],i=e[r(147)],s=[],o=0;o>>2]>>>16-o%4*8&65535;s.push(String[r(149)](a))}return s[r(152)]("")},parse:function(e){for(var r=t,i=e[r(155)],s=[],o=0;o>>1]|=e[r(153)](o)<<16-o%2*16;return n.create(s,2*i)}},i[t(165)]={stringify:function(e){for(var r=t,n=e[r(151)],i=e[r(147)],o=[],a=0;a>>2]>>>16-a%4*8&65535);o[r(166)](String[r(149)](c))}return o[r(152)]("")},parse:function(e){for(var r=t,i=e[r(155)],o=[],a=0;a>>1]|=s(e[r(153)](a)<<16-a%2*16);return n[r(162)](o,2*i)}}}(),e[t(154)][t(168)]},"object"===(i=zi)(146)?e[i(169)]=n(Mi):n(r[i(145)])}));var Hi=ji;function Vi(){var e=["charCodeAt","createCommonjsModule","./core","enc","650935nXthLM","_map","object","CryptoJS","charAt","Base64","sigBytes","function","exports","WordArray","clamp","54zkmJSN","words","length","19896cxUOJw","push","18716550PdiHTZ","_reverseMap","447jIaYCY","join","commonjsGlobal","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","708221VayrXB","amd","151781AneDtP","2WHnhWU","10547478qLjBsa","273592pQbpFH"];return(Vi=function(){return e})()}function ji(e,t){var r=Vi();return(ji=function(e,t){return r[e-=164]})(e,t)}!function(e,t){for(var r=ji,n=e();;)try{if(633459===parseInt(r(173))/1*(-parseInt(r(176))/2)+parseInt(r(169))/3*(parseInt(r(165))/4)+parseInt(r(183))/5+-parseInt(r(194))/6*(parseInt(r(175))/7)+-parseInt(r(178))/8+-parseInt(r(177))/9+parseInt(r(167))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Vi);f[Hi(180)]((function(e,t){var r,n,i,s=Hi;r=f[s(171)],n=function(e){var t,r,n,i=s;return t=ji,n=(r=e).lib[t(192)],r.enc[t(188)]={stringify:function(e){var r=t,n=e[r(195)],i=e[r(189)],s=this[r(184)];e[r(193)]();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,u=0;u<4&&a+.75*u>>6*(3-u)&63));var l=s.charAt(64);if(l)for(;o[r(164)]%4;)o[r(166)](l);return o[r(170)]("")},parse:function(e){var r=t,i=e.length,s=this[r(184)],o=this._reverseMap;if(!o){o=this[r(168)]=[];for(var a=0;a>>6-c%4*2;o[a>>>2]|=u<<24-a%4*8,a++}return n.create(o,a)}(e,i,o)},_map:t(172)},e[i(182)][i(188)]},"object"===(i=ji)(185)?e[i(191)]=n(Mi):"undefined"===i(190)&&(void 0)[i(174)]?(void 0)([i(181)],n):n(r[i(186)])}));var Wi=qi;function Gi(){var e=["5sPsBQs","Base64url","create","function","CryptoJS","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_","createCommonjsModule","281927bLzXNz","11mHdLQT","18200sVvIbP","charCodeAt","709896jLmPfG","indexOf","_map","enc","2087448cBpIzj","14NgAiWN","_safe_map","2545602AfkOop","WordArray","join","words","charAt","length","_reverseMap","9007584LaheZo","1773XAVhCm","4qYenEL","sigBytes","./core","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","clamp","25240rDQTmH","object"];return(Gi=function(){return e})()}!function(e,t){for(var r=qi,n=e();;)try{if(262696===-parseInt(r(243))/1+-parseInt(r(263))/2*(parseInt(r(247))/3)+-parseInt(r(251))/4+parseInt(r(236))/5*(parseInt(r(254))/6)+-parseInt(r(252))/7*(-parseInt(r(268))/8)+-parseInt(r(262))/9*(-parseInt(r(245))/10)+parseInt(r(244))/11*(parseInt(r(261))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Gi);f[Wi(242)]((function(e,t){var r,n,i;r=c,n=function(e){var t,r,n,i=qi;return t=qi,n=(r=e).lib[t(255)],r.enc[t(237)]={stringify:function(e,r){var n=t;void 0===r&&(r=!0);var i=e[n(257)],s=e[n(264)],o=r?this[n(253)]:this[n(249)];e[n(267)]();for(var a=[],c=0;c>>2]>>>24-c%4*8&255)<<16|(i[c+1>>>2]>>>24-(c+1)%4*8&255)<<8|i[c+2>>>2]>>>24-(c+2)%4*8&255,l=0;l<4&&c+.75*l>>6*(3-l)&63));var d=o[n(258)](64);if(d)for(;a[n(259)]%4;)a.push(d);return a[n(256)]("")},parse:function(e,r){var i=t;void 0===r&&(r=!0);var s=e[i(259)],o=r?this._safe_map:this._map,a=this[i(260)];if(!a){a=this._reverseMap=[];for(var c=0;c>>6-c%4*2;o[a>>>2]|=u<<24-a%4*8,a++}return n[s(238)](o,a)}(e,s,a)},_map:t(266),_safe_map:t(241)},e[i(250)][i(237)]},(i=qi)(269)==i(269)?e.exports=n(Mi):"undefined"===i(239)&&(void 0).amd?(void 0)([i(265)],n):n(r[i(240)])}));function qi(e,t){var r=Gi();return(qi=function(e,t){return r[e-=236]})(e,t)}function Yi(e,t){var r=Ki();return(Yi=function(e,t){return r[e-=295]})(e,t)}function Ki(){var e=["_process","commonjsGlobal","3095144fLlmmX","193218CkhBGU","Hasher","length","object","_hash","clone","WordArray","algo","createCommonjsModule","words","4137000psaiJy","floor","259ZdSLtG","amd","CryptoJS","_createHelper","sigBytes","2795000ofloap","7965747CqBofN","HmacMD5","2046osLxRx","_nDataBytes","155936MufwpQ","./core","lib","682PhQBCE","extend","call","8fdmFvI","_data"];return(Ki=function(){return e})()}var Xi=Yi;!function(e,t){for(var r=Yi,n=e();;)try{if(689284===-parseInt(r(303))/1+parseInt(r(306))/2*(parseInt(r(301))/3)+parseInt(r(313))/4+parseInt(r(298))/5+parseInt(r(314))/6*(-parseInt(r(326))/7)+parseInt(r(309))/8*(parseInt(r(299))/9)+-parseInt(r(324))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ki);f[Xi(322)]((function(e,t){var r,n,i;r=f[Xi(312)],n=function(e){return function(t){var r=Yi,n=e,i=n[r(305)],s=i[r(320)],o=i[r(315)],a=n[r(321)],c=[];!function(){for(var e=0;e<64;e++)c[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=a.MD5=o[r(307)]({_doReset:function(){this[r(318)]=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=r,i=0;i<16;i++){var s=t+i,o=e[s];e[s]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a=this[n(318)][n(323)],u=e[t+0],p=e[t+1],m=e[t+2],v=e[t+3],y=e[t+4],_=e[t+5],g=e[t+6],b=e[t+7],w=e[t+8],S=e[t+9],E=e[t+10],I=e[t+11],A=e[t+12],k=e[t+13],C=e[t+14],T=e[t+15],x=a[0],D=a[1],B=a[2],M=a[3];x=l(x,D,B,M,u,7,c[0]),M=l(M,x,D,B,p,12,c[1]),B=l(B,M,x,D,m,17,c[2]),D=l(D,B,M,x,v,22,c[3]),x=l(x,D,B,M,y,7,c[4]),M=l(M,x,D,B,_,12,c[5]),B=l(B,M,x,D,g,17,c[6]),D=l(D,B,M,x,b,22,c[7]),x=l(x,D,B,M,w,7,c[8]),M=l(M,x,D,B,S,12,c[9]),B=l(B,M,x,D,E,17,c[10]),D=l(D,B,M,x,I,22,c[11]),x=l(x,D,B,M,A,7,c[12]),M=l(M,x,D,B,k,12,c[13]),B=l(B,M,x,D,C,17,c[14]),x=d(x,D=l(D,B,M,x,T,22,c[15]),B,M,p,5,c[16]),M=d(M,x,D,B,g,9,c[17]),B=d(B,M,x,D,I,14,c[18]),D=d(D,B,M,x,u,20,c[19]),x=d(x,D,B,M,_,5,c[20]),M=d(M,x,D,B,E,9,c[21]),B=d(B,M,x,D,T,14,c[22]),D=d(D,B,M,x,y,20,c[23]),x=d(x,D,B,M,S,5,c[24]),M=d(M,x,D,B,C,9,c[25]),B=d(B,M,x,D,v,14,c[26]),D=d(D,B,M,x,w,20,c[27]),x=d(x,D,B,M,k,5,c[28]),M=d(M,x,D,B,m,9,c[29]),B=d(B,M,x,D,b,14,c[30]),x=f(x,D=d(D,B,M,x,A,20,c[31]),B,M,_,4,c[32]),M=f(M,x,D,B,w,11,c[33]),B=f(B,M,x,D,I,16,c[34]),D=f(D,B,M,x,C,23,c[35]),x=f(x,D,B,M,p,4,c[36]),M=f(M,x,D,B,y,11,c[37]),B=f(B,M,x,D,b,16,c[38]),D=f(D,B,M,x,E,23,c[39]),x=f(x,D,B,M,k,4,c[40]),M=f(M,x,D,B,u,11,c[41]),B=f(B,M,x,D,v,16,c[42]),D=f(D,B,M,x,g,23,c[43]),x=f(x,D,B,M,S,4,c[44]),M=f(M,x,D,B,A,11,c[45]),B=f(B,M,x,D,T,16,c[46]),x=h(x,D=f(D,B,M,x,m,23,c[47]),B,M,u,6,c[48]),M=h(M,x,D,B,b,10,c[49]),B=h(B,M,x,D,C,15,c[50]),D=h(D,B,M,x,_,21,c[51]),x=h(x,D,B,M,A,6,c[52]),M=h(M,x,D,B,v,10,c[53]),B=h(B,M,x,D,E,15,c[54]),D=h(D,B,M,x,p,21,c[55]),x=h(x,D,B,M,w,6,c[56]),M=h(M,x,D,B,T,10,c[57]),B=h(B,M,x,D,g,15,c[58]),D=h(D,B,M,x,k,21,c[59]),x=h(x,D,B,M,y,6,c[60]),M=h(M,x,D,B,I,10,c[61]),B=h(B,M,x,D,m,15,c[62]),D=h(D,B,M,x,S,21,c[63]),a[0]=a[0]+x|0,a[1]=a[1]+D|0,a[2]=a[2]+B|0,a[3]=a[3]+M|0},_doFinalize:function(){var e=r,n=this[e(310)],i=n[e(323)],s=8*this[e(302)],o=8*n[e(297)];i[o>>>5]|=128<<24-o%32;var a=t[e(325)](s/4294967296),c=s;i[15+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(o+64>>>9<<4)]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),n[e(297)]=4*(i[e(316)]+1),this[e(311)]();for(var u=this._hash,l=u.words,d=0;d<4;d++){var f=l[d];l[d]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return u},clone:function(){var e=r,t=o[e(319)][e(308)](this);return t._hash=this[e(318)][e(319)](),t}});function l(e,t,r,n,i,s,o){var a=e+(t&r|~t&n)+i+o;return(a<>>32-s)+t}function d(e,t,r,n,i,s,o){var a=e+(t&n|r&~n)+i+o;return(a<>>32-s)+t}function f(e,t,r,n,i,s,o){var a=e+(t^r^n)+i+o;return(a<>>32-s)+t}function h(e,t,r,n,i,s,o){var a=e+(r^(t|~n))+i+o;return(a<>>32-s)+t}n.MD5=o[r(296)](u),n[r(300)]=o._createHmacHelper(u)}(Math),e.MD5},"object"===(i=Yi)(317)?e.exports=n(Mi):n(r[i(295)])}));var Ji=$i;function $i(e,t){var r=Zi();return($i=function(e,t){return r[e-=204]})(e,t)}function Zi(){var e=["1805478bWmAOc","_createHmacHelper","1155jgAvAE","34723NfMBaS","call","1262934HoSkKX","SHA1","HmacSHA1","_data","init","20khUEEW","extend","createCommonjsModule","amd","190288VbmeKb","140XuIJAE","WordArray","_nDataBytes","floor","commonjsGlobal","words","Hasher","CryptoJS","110416lPIcLb","_hash","12zEOMFV","7237967MZlpCn","algo","lib","clone","object","17352XQYyEg","sigBytes"];return(Zi=function(){return e})()}!function(e,t){for(var r=$i,n=e();;)try{if(345335===parseInt(r(209))/1*(parseInt(r(231))/2)+-parseInt(r(206))/3+-parseInt(r(229))/4+-parseInt(r(208))/5*(-parseInt(r(204))/6)+-parseInt(r(221))/7*(-parseInt(r(220))/8)+parseInt(r(211))/9*(parseInt(r(216))/10)+-parseInt(r(232))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Zi);f[Ji(218)]((function(e,t){var r,n,i,s=Ji;r=f[s(225)],n=function(e){var t,r,n,i,o,a,c,u,l=s;return n=(r=e)[(t=$i)(234)],i=n[t(222)],o=n[t(227)],a=r[t(233)],c=[],u=a[t(212)]=o[t(217)]({_doReset:function(){var e=t;this[e(230)]=new(i[e(215)])([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,r){for(var n=t,i=this._hash[n(226)],s=i[0],o=i[1],a=i[2],u=i[3],l=i[4],d=0;d<80;d++){if(d<16)c[d]=0|e[r+d];else{var f=c[d-3]^c[d-8]^c[d-14]^c[d-16];c[d]=f<<1|f>>>31}var h=(s<<5|s>>>27)+l+c[d];h+=d<20?1518500249+(o&a|~o&u):d<40?1859775393+(o^a^u):d<60?(o&a|o&u|a&u)-1894007588:(o^a^u)-899497514,l=u,u=a,a=o<<30|o>>>2,o=s,s=h}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+a|0,i[3]=i[3]+u|0,i[4]=i[4]+l|0},_doFinalize:function(){var e=t,r=this[e(214)],n=r.words,i=8*this[e(223)],s=8*r[e(205)];return n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=Math[e(224)](i/4294967296),n[15+(s+64>>>9<<4)]=i,r[e(205)]=4*n.length,this._process(),this[e(230)]},clone:function(){var e=t,r=o[e(235)][e(210)](this);return r[e(230)]=this._hash[e(235)](),r}}),r.SHA1=o._createHelper(u),r[t(213)]=o[t(207)](u),e[l(212)]},(i=$i)(236)==i(236)?e.exports=n(Mi):n(r[i(228)])}));var Qi=es;!function(e,t){for(var r=es,n=e();;)try{if(206435===parseInt(r(306))/1+-parseInt(r(315))/2*(parseInt(r(294))/3)+parseInt(r(310))/4*(-parseInt(r(305))/5)+parseInt(r(290))/6+-parseInt(r(313))/7+parseInt(r(297))/8+parseInt(r(303))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ts);f[Qi(296)]((function(e,t){var r,n,i;r=c,n=function(e){var t=es;return function(t){var r=es,n=e,i=n[r(302)],s=i[r(295)],o=i[r(314)],a=n[r(316)],c=[],u=[];!function(){function e(e){for(var r=t[es(312)](e),n=2;n<=r;n++)if(!(e%n))return!1;return!0}function r(e){return 4294967296*(e-(0|e))|0}for(var n=2,i=0;i<64;)e(n)&&(i<8&&(c[i]=r(t.pow(n,.5))),u[i]=r(t.pow(n,1/3)),i++),n++}();var l=[],d=a.SHA256=o.extend({_doReset:function(){var e=r;this[e(288)]=new s.init(c[e(291)](0))},_doProcessBlock:function(e,t){for(var n=r,i=this[n(288)][n(301)],s=i[0],o=i[1],a=i[2],c=i[3],d=i[4],f=i[5],h=i[6],p=i[7],m=0;m<64;m++){if(m<16)l[m]=0|e[t+m];else{var v=l[m-15],y=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3,_=l[m-2],g=(_<<15|_>>>17)^(_<<13|_>>>19)^_>>>10;l[m]=y+l[m-7]+g+l[m-16]}var b=s&o^s&a^o&a,w=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),S=p+((d<<26|d>>>6)^(d<<21|d>>>11)^(d<<7|d>>>25))+(d&f^~d&h)+u[m]+l[m];p=h,h=f,f=d,d=c+S|0,c=a,a=o,o=s,s=S+(w+b)|0}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+a|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0,i[5]=i[5]+f|0,i[6]=i[6]+h|0,i[7]=i[7]+p|0},_doFinalize:function(){var e=r,n=this._data,i=n[e(301)],s=8*this[e(317)],o=8*n[e(308)];return i[o>>>5]|=128<<24-o%32,i[14+(o+64>>>9<<4)]=t[e(309)](s/4294967296),i[15+(o+64>>>9<<4)]=s,n.sigBytes=4*i[e(292)],this._process(),this._hash},clone:function(){var e=r,t=o[e(293)].call(this);return t[e(288)]=this[e(288)].clone(),t}});n[r(304)]=o[r(298)](d),n.HmacSHA256=o[r(289)](d)}(Math),e[t(304)]},"object"===(i=es)(300)?e[i(311)]=n(Mi):n(r[i(299)])}));function es(e,t){var r=ts();return(es=function(e,t){return r[e-=288]})(e,t)}function ts(){var e=["763524SpnTKl","slice","length","clone","9357GjSRPI","WordArray","createCommonjsModule","1982408rWmVba","_createHelper","CryptoJS","object","words","lib","2134026FlsAkG","SHA256","348060ySPXHI","142075mosbUQ","amd","sigBytes","floor","8YjHnEa","exports","sqrt","2117773ekSHDy","Hasher","68ZjywEp","algo","_nDataBytes","_hash","_createHmacHelper"];return(ts=function(){return e})()}var rs=ns;function ns(e,t){var r=is();return(ns=function(e,t){return r[e-=316]})(e,t)}!function(e,t){for(var r=ns,n=e();;)try{if(834524===parseInt(r(327))/1+-parseInt(r(331))/2*(-parseInt(r(338))/3)+-parseInt(r(335))/4*(-parseInt(r(317))/5)+-parseInt(r(322))/6+parseInt(r(323))/7*(parseInt(r(342))/8)+parseInt(r(344))/9*(parseInt(r(319))/10)+-parseInt(r(330))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(is);f[rs(345)]((function(e,t){var r,n,i,s,o,a,c;f[rs(320)],e[ns(329)]=(s=(i=r=Mi)[(n=ns)(324)][n(316)],o=i[n(334)],a=o[n(328)],c=o[n(318)]=a[n(325)]({_doReset:function(){this[n(326)]=new s.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=n,t=a[e(343)][e(337)](this);return t[e(332)]-=4,t}}),i.SHA224=a[n(339)](c),i[n(333)]=a._createHmacHelper(c),r.SHA224)}));function is(){var e=["5558fvOZKp","lib","extend","_hash","1202296nwfhpG","SHA256","exports","34969869XSvRNH","30kzwsDd","sigBytes","HmacSHA224","algo","152MiNILO","amd","call","260166jTICCs","_createHelper","function","CryptoJS","6568GYuAYV","_doFinalize","234zvZTYm","createCommonjsModule","WordArray","129085AdFhLr","SHA224","220370BpZvRn","commonjsGlobal","./core","4172430mfUirZ"];return(is=function(){return e})()}var ss=os;function os(e,t){var r=as();return(os=function(e,t){return r[e-=159]})(e,t)}!function(e,t){for(var r=os,n=e();;)try{if(663412===-parseInt(r(162))/1+-parseInt(r(163))/2*(-parseInt(r(170))/3)+parseInt(r(166))/4*(-parseInt(r(201))/5)+-parseInt(r(173))/6+parseInt(r(187))/7*(-parseInt(r(203))/8)+-parseInt(r(161))/9*(-parseInt(r(189))/10)+parseInt(r(199))/11*(parseInt(r(190))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(as);f[ss(178)]((function(e,t){var r,n,i,s=ss;r=f[s(204)],n=function(e){var t=s;return function(){var t=os,r=e,n=r[t(197)][t(184)],i=r[t(167)],s=i[t(194)],o=i[t(193)],a=r[t(172)];function c(){var e=t;return s[e(171)][e(164)](s,arguments)}var u=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=c()}();var d=a[t(198)]=n[t(177)]({_doReset:function(){var e=t;this._hash=new o.init([new(s[e(179)])(1779033703,4089235720),new(s[e(179)])(3144134277,2227873595),new(s[e(179)])(1013904242,4271175723),new s.init(2773480762,1595750129),new(s[e(179)])(1359893119,2917565137),new(s[e(179)])(2600822924,725511199),new(s[e(179)])(528734635,4215389547),new s.init(1541459225,327033209)])},_doProcessBlock:function(e,r){for(var n=t,i=this[n(182)][n(185)],s=i[0],o=i[1],a=i[2],c=i[3],d=i[4],f=i[5],h=i[6],p=i[7],m=s[n(174)],v=s[n(180)],y=o.high,_=o[n(180)],g=a.high,b=a.low,w=c[n(174)],S=c[n(180)],E=d[n(174)],I=d[n(180)],A=f.high,k=f[n(180)],C=h.high,T=h[n(180)],x=p[n(174)],D=p[n(180)],B=m,M=v,P=y,F=_,U=g,R=b,L=w,O=S,N=E,z=I,H=A,V=k,j=C,W=T,G=x,q=D,Y=0;Y<80;Y++){var K,X,J=l[Y];if(Y<16)X=J[n(174)]=0|e[r+2*Y],K=J.low=0|e[r+2*Y+1];else{var $=l[Y-15],Z=$[n(174)],Q=$[n(180)],ee=(Z>>>1|Q<<31)^(Z>>>8|Q<<24)^Z>>>7,te=(Q>>>1|Z<<31)^(Q>>>8|Z<<24)^(Q>>>7|Z<<25),re=l[Y-2],ne=re.high,ie=re[n(180)],se=(ne>>>19|ie<<13)^(ne<<3|ie>>>29)^ne>>>6,oe=(ie>>>19|ne<<13)^(ie<<3|ne>>>29)^(ie>>>6|ne<<26),ae=l[Y-7],ce=ae.high,ue=ae[n(180)],le=l[Y-16],de=le.high,fe=le[n(180)];X=(X=(X=ee+ce+((K=te+ue)>>>0>>0?1:0))+se+((K+=oe)>>>0>>0?1:0))+de+((K+=fe)>>>0>>0?1:0),J[n(174)]=X,J[n(180)]=K}var he,pe=N&H^~N&j,me=z&V^~z&W,ve=B&P^B&U^P&U,ye=M&F^M&R^F&R,_e=(B>>>28|M<<4)^(B<<30|M>>>2)^(B<<25|M>>>7),ge=(M>>>28|B<<4)^(M<<30|B>>>2)^(M<<25|B>>>7),be=(N>>>14|z<<18)^(N>>>18|z<<14)^(N<<23|z>>>9),we=(z>>>14|N<<18)^(z>>>18|N<<14)^(z<<23|N>>>9),Se=u[Y],Ee=Se[n(174)],Ie=Se.low,Ae=G+be+((he=q+we)>>>0>>0?1:0),ke=ge+ye;G=j,q=W,j=H,W=V,H=N,V=z,N=L+(Ae=(Ae=(Ae=Ae+pe+((he+=me)>>>0>>0?1:0))+Ee+((he+=Ie)>>>0>>0?1:0))+X+((he+=K)>>>0>>0?1:0))+((z=O+he|0)>>>0>>0?1:0)|0,L=U,O=R,U=P,R=F,P=B,F=M,B=Ae+(_e+ve+(ke>>>0>>0?1:0))+((M=he+ke|0)>>>0>>0?1:0)|0}v=s.low=v+M,s.high=m+B+(v>>>0>>0?1:0),_=o[n(180)]=_+F,o[n(174)]=y+P+(_>>>0>>0?1:0),b=a[n(180)]=b+R,a[n(174)]=g+U+(b>>>0>>0?1:0),S=c.low=S+O,c[n(174)]=w+L+(S>>>0>>0?1:0),I=d.low=I+z,d[n(174)]=E+N+(I>>>0>>0?1:0),k=f[n(180)]=k+V,f[n(174)]=A+H+(k>>>0>>0?1:0),T=h[n(180)]=T+W,h.high=C+j+(T>>>0>>0?1:0),D=p.low=D+q,p[n(174)]=x+G+(D>>>0>>0?1:0)},_doFinalize:function(){var e=t,r=this[e(186)],n=r.words,i=8*this[e(168)],s=8*r.sigBytes;return n[s>>>5]|=128<<24-s%32,n[30+(s+128>>>10<<5)]=Math[e(200)](i/4294967296),n[31+(s+128>>>10<<5)]=i,r[e(181)]=4*n[e(159)],this[e(196)](),this._hash[e(192)]()},clone:function(){var e=t,r=n[e(195)][e(188)](this);return r[e(182)]=this[e(182)][e(195)](),r},blockSize:32});r[t(198)]=n[t(169)](d),r[t(191)]=n[t(176)](d)}(),e[t(198)]},"object"===(i=os)(160)?e.exports=n(Mi):n(r[i(175)])}));function as(){var e=["object","1179909qgapFR","368004TykTcQ","163944wjaMHM","apply","amd","2701984uvRQpq","x64","_nDataBytes","_createHelper","21QcGbXd","create","algo","6418104DKaArJ","high","CryptoJS","_createHmacHelper","extend","createCommonjsModule","init","low","sigBytes","_hash","./core","Hasher","words","_data","91WSHEpS","call","30iUcslA","74364bjuoPo","HmacSHA512","toX32","WordArray","Word","clone","_process","lib","SHA512","5489XUameQ","floor","5KCbWIr","./x64-core","789424nbKptd","commonjsGlobal","length"];return(as=function(){return e})()}var cs=us;function us(e,t){var r=ls();return(us=function(e,t){return r[e-=382]})(e,t)}!function(e,t){for(var r=us,n=e();;)try{if(962223===-parseInt(r(400))/1+-parseInt(r(397))/2*(-parseInt(r(396))/3)+parseInt(r(390))/4+-parseInt(r(399))/5*(parseInt(r(384))/6)+-parseInt(r(404))/7+-parseInt(r(386))/8*(-parseInt(r(382))/9)+parseInt(r(402))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ls);f[cs(393)]((function(e,t){var r,n,i;r=c,n=function(e){return t=us,n=(r=e).x64,i=n.Word,s=n.WordArray,o=r[t(383)],a=o[t(387)],c=o[t(395)]=a.extend({_doReset:function(){var e=t;this[e(405)]=new(s[e(385)])([new(i[e(385)])(3418070365,3238371032),new(i[e(385)])(1654270250,914150663),new(i[e(385)])(2438529370,812702999),new(i[e(385)])(355462360,4144912697),new i.init(1731405415,4290775857),new(i[e(385)])(2394180231,1750603025),new(i[e(385)])(3675008525,1694076839),new(i[e(385)])(1203062813,3204075428)])},_doFinalize:function(){var e=t,r=a[e(389)][e(388)](this);return r[e(403)]-=16,r}}),r.SHA384=a._createHelper(c),r[t(406)]=a._createHmacHelper(c),e.SHA384;var t,r,n,i,s,o,a,c},(i=us)(392)==i(392)?e[i(394)]=n(Mi):"undefined"===i(391)&&(void 0)[i(398)]?(void 0)(["./core",i(407),i(401)],n):n(r.CryptoJS)}));function ls(){var e=["SHA384","201AJMrOl","15210ynmFtA","amd","445XmjMYf","972341ohaabp","./sha512","27623320sTcJCg","sigBytes","6755700ldymof","_hash","HmacSHA384","./x64-core","306bwPGVJ","algo","102078XPmfuv","init","220608HnQAhX","SHA512","call","_doFinalize","817480BQGRfZ","function","object","createCommonjsModule","exports"];return(ls=function(){return e})()}var ds=fs;!function(e,t){for(var r=fs,n=e();;)try{if(240220===-parseInt(r(378))/1+-parseInt(r(399))/2+-parseInt(r(377))/3*(-parseInt(r(373))/4)+parseInt(r(369))/5+-parseInt(r(388))/6*(parseInt(r(374))/7)+parseInt(r(376))/8*(-parseInt(r(389))/9)+parseInt(r(387))/10*(parseInt(r(401))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(hs);f[ds(394)]((function(e,t){var r,n,i,s=ds;r=f[s(364)],n=function(e){var t=s;return function(t){var r=fs,n=e,i=n[r(390)],s=i[r(380)],o=i[r(368)],a=n[r(395)][r(382)],c=n[r(363)],u=[],l=[],d=[];!function(){for(var e=r,t=1,n=0,i=0;i<24;i++){u[t+5*n]=(i+1)*(i+2)/2%64;var s=(2*t+3*n)%5;t=n%5,n=s}for(t=0;t<5;t++)for(n=0;n<5;n++)l[t+5*n]=n+(2*t+3*n)%5*5;for(var o=1,c=0;c<24;c++){for(var f=0,h=0,p=0;p<7;p++){if(1&o){var m=(1<>>24)|4278255360&(a<<24|a>>>8),c=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),(D=i[o])[n(379)]^=c,D[n(391)]^=a}for(var h=0;h<24;h++){for(var p=0;p<5;p++){for(var m=0,v=0,y=0;y<5;y++)m^=(D=i[p+5*y])[n(379)],v^=D[n(391)];var _=f[p];_[n(379)]=m,_[n(391)]=v}for(p=0;p<5;p++){var g=f[(p+4)%5],b=f[(p+1)%5],w=b.high,S=b.low;for(m=g[n(379)]^(w<<1|S>>>31),v=g[n(391)]^(S<<1|w>>>31),y=0;y<5;y++)(D=i[p+5*y]).high^=m,D[n(391)]^=v}for(var E=1;E<25;E++){var I=(D=i[E])[n(379)],A=D[n(391)],k=u[E];k<32?(m=I<>>32-k,v=A<>>32-k):(m=A<>>64-k,v=I<>>64-k);var C=f[l[E]];C[n(379)]=m,C[n(391)]=v}var T=f[0],x=i[0];for(T.high=x.high,T[n(391)]=x[n(391)],p=0;p<5;p++)for(y=0;y<5;y++){var D=i[E=p+5*y],B=f[E],M=f[(p+1)%5+5*y],P=f[(p+2)%5+5*y];D.high=B[n(379)]^~M.high&P[n(379)],D.low=B[n(391)]^~M[n(391)]&P[n(391)]}D=i[0];var F=d[h];D[n(379)]^=F[n(379)],D[n(391)]^=F[n(391)]}},_doFinalize:function(){var e=r,n=this[e(386)],i=n[e(372)];this[e(392)];var o=8*n.sigBytes,a=32*this.blockSize;i[o>>>5]|=1<<24-o%32,i[(t.ceil((o+1)/a)*a>>>5)-1]|=128,n[e(354)]=4*i[e(371)],this[e(397)]();for(var c=this._state,u=this[e(398)][e(381)]/8,l=u/8,d=[],f=0;f>>24)|4278255360&(p<<24|p>>>8),m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),d[e(355)](m),d[e(355)](p)}return new(s[e(383)])(d,u)},clone:function(){for(var e=r,t=o[e(361)][e(365)](this),n=t[e(400)]=this._state[e(366)](0),i=0;i<25;i++)n[i]=n[i].clone();return t}});n[r(357)]=o[r(362)](h),n[r(367)]=o[r(375)](h)}(Math),e[t(357)]},"object"===(i=fs)(370)?e[i(356)]=n(Mi):"undefined"===i(385)&&(void 0)[i(384)]?(void 0)([i(360),i(396)],n):n(r.CryptoJS)}));function fs(e,t){var r=hs();return(fs=function(e,t){return r[e-=354]})(e,t)}function hs(){var e=["224795GDjciy","high","WordArray","outputLength","Word","init","amd","function","_data","10UkYFnG","544710qSYobE","9HYFjRC","lib","low","_nDataBytes","blockSize","createCommonjsModule","x64","./x64-core","_process","cfg","732814IALgoM","_state","8196881VVIESB","sigBytes","push","exports","SHA3","create","extend","./core","clone","_createHelper","algo","commonjsGlobal","call","slice","HmacSHA3","Hasher","92420nKbhzq","object","length","words","35356iIaWoX","7DeXnVJ","_createHmacHelper","1630776wLvcbY","123RZscVb"];return(hs=function(){return e})()}var ps=vs;function ms(){var e=["_createHelper","object","1104185MNuIIK","HmacRIPEMD160","create","1785976twKUao","lib","extend","clone","3bjDBtf","134772PBsPSA","_nDataBytes","_hash","function","sigBytes","940YapZrX","words","algo","_data","createCommonjsModule","Hasher","59832trnBsI","1ODvxFN","exports","1667340bywgpW","commonjsGlobal","./core","length","517916goJbNx","RIPEMD160","76419sgQrsJ","WordArray"];return(ms=function(){return e})()}function vs(e,t){var r=ms();return(vs=function(e,t){return r[e-=476]})(e,t)}!function(e,t){for(var r=vs,n=e();;)try{if(141650===parseInt(r(482))/1*(-parseInt(r(502))/2)+-parseInt(r(501))/3*(parseInt(r(488))/4)+-parseInt(r(494))/5+-parseInt(r(484))/6+-parseInt(r(490))/7+parseInt(r(497))/8+parseInt(r(481))/9*(parseInt(r(507))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ms);f[ps(479)]((function(e,t){var r,n,i,s=ps;r=f[s(485)],n=function(e){var t=s;return function(t){var r=vs,n=e,i=n[r(498)],s=i[r(491)],o=i[r(480)],a=n[r(477)],c=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=s.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=s[r(496)]([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=s[r(496)]([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=s[r(496)]([0,1518500249,1859775393,2400959708,2840853838]),h=s[r(496)]([1352829926,1548603684,1836072691,2053994217,0]),p=a.RIPEMD160=o[r(499)]({_doReset:function(){var e=r;this[e(504)]=s[e(496)]([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=r,i=0;i<16;i++){var s=t+i,o=e[s];e[s]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a,p,w,S,E,I,A,k,C,T,x,D=this[n(504)][n(476)],B=f[n(476)],M=h[n(476)],P=c[n(476)],F=u[n(476)],U=l[n(476)],R=d[n(476)];for(I=a=D[0],A=p=D[1],k=w=D[2],C=S=D[3],T=E=D[4],i=0;i<80;i+=1)x=a+e[t+P[i]]|0,x+=i<16?m(p,w,S)+B[0]:i<32?v(p,w,S)+B[1]:i<48?y(p,w,S)+B[2]:i<64?_(p,w,S)+B[3]:g(p,w,S)+B[4],x=(x=b(x|=0,U[i]))+E|0,a=E,E=S,S=b(w,10),w=p,p=x,x=I+e[t+F[i]]|0,x+=i<16?g(A,k,C)+M[0]:i<32?_(A,k,C)+M[1]:i<48?y(A,k,C)+M[2]:i<64?v(A,k,C)+M[3]:m(A,k,C)+M[4],x=(x=b(x|=0,R[i]))+T|0,I=T,T=C,C=b(k,10),k=A,A=x;x=D[1]+w+C|0,D[1]=D[2]+S+T|0,D[2]=D[3]+E+I|0,D[3]=D[4]+a+A|0,D[4]=D[0]+p+k|0,D[0]=x},_doFinalize:function(){var e=r,t=this[e(478)],n=t[e(476)],i=8*this[e(503)],s=8*t[e(506)];n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t[e(506)]=4*(n[e(487)]+1),this._process();for(var o=this._hash,a=o[e(476)],c=0;c<5;c++){var u=a[c];a[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return o},clone:function(){var e=r,t=o.clone.call(this);return t[e(504)]=this[e(504)][e(500)](),t}});function m(e,t,r){return e^t^r}function v(e,t,r){return e&t|~e&r}function y(e,t,r){return(e|~t)^r}function _(e,t,r){return e&r|t&~r}function g(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}n[r(489)]=o[r(492)](p),n[r(495)]=o._createHmacHelper(p)}(),e[t(489)]},(i=vs)(493)==i(493)?e[i(483)]=n(Mi):"undefined"===i(505)&&(void 0).amd?(void 0)([i(486)],n):n(r.CryptoJS)}));function ys(e,t){var r=_s();return(ys=function(e,t){return r[e-=217]})(e,t)}!function(e,t){for(var r=ys,n=e();;)try{if(234841===-parseInt(r(236))/1+-parseInt(r(239))/2*(parseInt(r(226))/3)+parseInt(r(220))/4*(parseInt(r(246))/5)+-parseInt(r(240))/6*(-parseInt(r(252))/7)+parseInt(r(223))/8+parseInt(r(229))/9+-parseInt(r(242))/10*(parseInt(r(217))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(_s);d((function(e,t){var r,n,i;r=f[ys(234)],n=function(e){var t,r,n,i;n=(r=e)[(t=ys)(235)][t(241)],i=r[t(218)][t(251)],r[t(244)][t(219)]=n[t(231)]({init:function(e,r){var n=t;e=this[n(243)]=new(e[n(230)]),typeof r==n(248)&&(r=i.parse(r));var s=e[n(224)],o=4*s;r[n(247)]>o&&(r=e[n(225)](r)),r.clamp();for(var a=this[n(238)]=r[n(221)](),c=this[n(228)]=r[n(221)](),u=a[n(249)],l=c[n(249)],d=0;d>>2];e.sigBytes-=r}};s.BlockCipher=f[n(426)]({cfg:f.cfg[n(426)]({mode:m,padding:v}),reset:function(){var e,t=n;f[t(384)][t(408)](this);var r=this[t(399)],i=r.iv,s=r[t(397)];this[t(411)]==this[t(371)]?e=s[t(383)]:(e=s[t(393)],this[t(402)]=1),this._mode&&this[t(363)][t(435)]==e?this._mode.init(this,i&&i[t(392)]):(this[t(363)]=e[t(408)](s,this,i&&i[t(392)]),this._mode[t(435)]=e)},_doProcessBlock:function(e,t){this[n(363)].processBlock(e,t)},_doFinalize:function(){var e,t=n,r=this[t(399)][t(379)];return this._xformMode==this[t(371)]?(r[t(418)](this[t(369)],this[t(437)]),e=this[t(412)](!!t(404))):(e=this[t(412)](!!t(404)),r.unpad(e)),e},blockSize:4});var y=s[n(416)]=o[n(426)]({init:function(e){this[n(358)](e)},toString:function(e){var t=n;return(e||this.formatter)[t(368)](this)}}),_=(i[n(365)]={})[n(394)]={stringify:function(e){var t=n,r=e[t(424)],i=e.salt;return(i?a.create([1398893684,1701076831])[t(427)](i)[t(427)](r):r).toString(l)},parse:function(e){var t,r=n,i=l[r(415)](e),s=i[r(392)];return 1398893684==s[0]&&1701076831==s[1]&&(t=a[r(423)](s[r(361)](2,4)),s.splice(0,4),i[r(381)]-=16),y[r(423)]({ciphertext:i,salt:t})}},g=s[n(364)]=o.extend({cfg:o[n(426)]({format:_}),encrypt:function(e,t,r,i){var s=n;i=this[s(399)][s(426)](i);var o=e[s(383)](r,i),a=o.finalize(t),c=o[s(399)];return y[s(423)]({ciphertext:a,key:r,iv:c.iv,algorithm:e,mode:c[s(397)],padding:c[s(379)],blockSize:e[s(437)],formatter:i.format})},decrypt:function(e,t,r,i){var s=n;return i=this[s(399)].extend(i),t=this[s(433)](t,i[s(365)]),e[s(393)](r,i)[s(432)](t[s(424)])},_parse:function(e,t){var r=n;return typeof e==r(429)?t[r(415)](e,this):e}}),b=(i[n(438)]={})[n(394)]={execute:function(e,t,r,i,s){var o=n;if(!i&&(i=a[o(403)](8)),s)c=d.create({keySize:t+r,hasher:s})[o(386)](e,i);else var c=d.create({keySize:t+r})[o(386)](e,i);var u=a.create(c[o(392)][o(361)](t),4*r);return c[o(381)]=4*t,y[o(423)]({key:c,iv:u,salt:i})}},w=s[n(430)]=g[n(426)]({cfg:g.cfg[n(426)]({kdf:b}),encrypt:function(e,t,r,i){var s=n,o=(i=this[s(399)][s(426)](i))[s(438)][s(377)](r,e.keySize,e[s(366)],i[s(440)],i[s(388)]);i.iv=o.iv;var a=g[s(425)][s(408)](this,e,t,o[s(409)],i);return a[s(358)](o),a},decrypt:function(e,t,r,i){var s=n;i=this.cfg.extend(i),t=this._parse(t,i[s(365)]);var o=i.kdf[s(377)](r,e.keySize,e[s(366)],t.salt,i[s(388)]);return i.iv=o.iv,g[s(385)][s(408)](this,e,t,o.key,i)}})}()},"object"===(i=ks)(413)?e[i(422)]=n(Mi):"undefined"===i(359)&&(void 0)[i(374)]?(void 0)([i(387),i(391)],n):n(r[i(421)])}));function ks(e,t){var r=Is();return(ks=function(e,t){return r[e-=355]})(e,t)}var Cs=Ts;function Ts(e,t){var r=xs();return(Ts=function(e,t){return r[e-=460]})(e,t)}function xs(){var e=["6hLNjGp","4457054dTGbSi","2101930hjxEIL","1066840giqZah","BlockCipherMode","CryptoJS","lib","Encryptor","mode","1336PRAQqj","846bkagpg","commonjsGlobal","call","10JvxAfl","encryptBlock","92LHOjeo","object","./core","createCommonjsModule","_cipher","amd","blockSize","8178643sGIEqM","function","slice","51843FsAUWD","extend","26769ZZQbqI","_prevBlock"];return(xs=function(){return e})()}!function(e,t){for(var r=Ts,n=e();;)try{if(338780===-parseInt(r(468))/1*(-parseInt(r(485))/2)+parseInt(r(470))/3*(parseInt(r(487))/4)+-parseInt(r(475))/5*(parseInt(r(472))/6)+parseInt(r(473))/7+parseInt(r(481))/8*(-parseInt(r(482))/9)+parseInt(r(474))/10+-parseInt(r(465))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(xs);f[Cs(461)]((function(e,t){var r,n,i,s=Cs;r=f[s(483)],n=function(e){var t=s;return e[t(480)].CFB=function(){var r=t,n=e[r(478)][r(476)][r(469)]();function i(e,t,n,i){var s,o=r,a=this._iv;a?(s=a.slice(0),this._iv=void 0):s=this[o(471)],i[o(486)](s,0);for(var c=0;c>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var s=n.Encryptor=n[r(363)]({processBlock:function(e,t){var n,s=r,o=this[s(357)],a=o[s(350)],c=this._iv,u=this[s(366)];c&&(u=this[s(366)]=c.slice(0),this._iv=void 0),0===((n=u)[0]=i(n[0]))&&(n[1]=i(n[1]));var l=u[s(362)](0);o[s(360)](l,0);for(var d=0;d>>2]|=o<<24-a%4*8,e[r(329)]+=o},unpad:function(e){var t=n,r=255&e[t(325)][e[t(329)]-1>>>2];e[t(329)]-=r}},r[n(337)].Ansix923)}));function Vs(e,t){var r=Hs();return(Vs=function(e,t){return r[e-=320]})(e,t)}var js=Ws;function Ws(e,t){var r=Gs();return(Ws=function(e,t){return r[e-=155]})(e,t)}function Gs(){var e=["pad","amd","1023HvDjnt","function","21DEocLl","./core","exports","random","createCommonjsModule","44ZaMKnk","202876vuJuGH","object","sigBytes","./cipher-core","3504bUDxzB","39770enbnrH","6ZQqPUR","10975TTxtUa","words","Iso10126","5749982vRDVue","13394472YbKlHp","1771045otvlMc","lib","create","10584cxSMou"];return(Gs=function(){return e})()}!function(e,t){for(var r=Ws,n=e();;)try{if(510685===parseInt(r(162))/1*(parseInt(r(180))/2)+-parseInt(r(175))/3*(-parseInt(r(155))/4)+-parseInt(r(167))/5*(-parseInt(r(161))/6)+parseInt(r(165))/7+-parseInt(r(159))/8*(parseInt(r(170))/9)+-parseInt(r(160))/10*(-parseInt(r(173))/11)+-parseInt(r(166))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Gs);f[js(179)]((function(e,t){var r,n,i;r=c,n=function(e){var t=Ws;return e[t(171)][t(164)]={pad:function(r,n){var i=t,s=4*n,o=s-r[i(157)]%s;r.concat(e.lib.WordArray[i(178)](o-1)).concat(e[i(168)].WordArray[i(169)]([o<<24],1))},unpad:function(e){var r=t,n=255&e[r(163)][e.sigBytes-1>>>2];e[r(157)]-=n}},e[t(171)][t(164)]},(i=Ws)(156)==i(156)?e[i(177)]=n(Mi):"undefined"===i(174)&&(void 0)[i(172)]?(void 0)([i(176),i(158)],n):n(r.CryptoJS)}));function qs(e,t){var r=Ks();return(qs=function(e,t){return r[e-=113]})(e,t)}var Ys=qs;function Ks(){var e=["2776584rIhwnN","ZeroPadding","object","24GxdHSN","321030bkvaOc","pad","createCommonjsModule","lib","Iso97971","4704105KJUhvM","5931wpCUyG","exports","./cipher-core","410876mGyvPz","function","unpad","concat","1800fKHDAd","./core","925483HojvmL","313707hnFwcL","CryptoJS"];return(Ks=function(){return e})()}!function(e,t){for(var r=qs,n=e();;)try{if(547203===-parseInt(r(125))/1+-parseInt(r(119))/2+parseInt(r(126))/3*(parseInt(r(131))/4)+parseInt(r(132))/5+parseInt(r(128))/6+parseInt(r(115))/7+-parseInt(r(123))/8*(parseInt(r(116))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ks);f[Ys(134)]((function(e,t){var r,n,i;r=c,n=function(e){var t=qs;return e.pad[t(114)]={pad:function(r,n){var i=t;r[i(122)](e[i(113)].WordArray.create([2147483648],1)),e[i(133)][i(129)][i(133)](r,n)},unpad:function(r){var n=t;e[n(133)][n(129)][n(121)](r),r.sigBytes--}},e[t(133)][t(114)]},(i=qs)(130)==i(130)?e[i(117)]=n(Mi):"undefined"===i(120)&&(void 0).amd?(void 0)([i(124),i(118)],n):n(r[i(127)])}));var Xs=$s;function Js(){var e=["pad","25OqzPoY","1111058ozlDZI","129657exmYFm","object","words","3RlxAig","./core","24vMEUww","function","sigBytes","3946437IcDBhe","CryptoJS","exports","clamp","10165TLmqSZ","420kCPdml","212499mFGiFr","ZeroPadding","1876088EzYaVZ","commonjsGlobal","createCommonjsModule","687798iIBwkD"];return(Js=function(){return e})()}function $s(e,t){var r=Js();return($s=function(e,t){return r[e-=123]})(e,t)}!function(e,t){for(var r=$s,n=e();;)try{if(380925===-parseInt(r(137))/1+-parseInt(r(124))/2+-parseInt(r(128))/3*(parseInt(r(141))/4)+-parseInt(r(123))/5*(-parseInt(r(144))/6)+parseInt(r(139))/7*(-parseInt(r(130))/8)+parseInt(r(133))/9+parseInt(r(138))/10*(parseInt(r(125))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Js);f[Xs(143)]((function(e,t){var r,n,i,s=Xs;r=f[s(142)],n=function(e){var t=s;return e.pad[t(140)]={pad:function(e,r){var n=t,i=4*r;e[n(136)](),e.sigBytes+=i-(e[n(132)]%i||i)},unpad:function(e){var r=t,n=e[r(127)],i=e[r(132)]-1;for(i=e[r(132)]-1;i>=0;i--)if(n[i>>>2]>>>24-i%4*8&255){e[r(132)]=i+1;break}}},e[t(145)][t(140)]},(i=$s)(126)==i(126)?e[i(135)]=n(Mi):"undefined"===i(131)&&(void 0).amd?(void 0)([i(129),"./cipher-core"],n):n(r[i(134)])}));var Zs=eo;function Qs(){var e=["1864284HGmLgg","14398LreOZS","object","createCommonjsModule","exports","2853RqiqAl","61026PIhqwT","NoPadding","6310TUFxdw","pad","215mOrFmh","994441XWatCO","1412DKZpHO","225192RvkOzm","67AIaEMg","4557GSjvUV","function","commonjsGlobal","11eWLPzQ"];return(Qs=function(){return e})()}function eo(e,t){var r=Qs();return(eo=function(e,t){return r[e-=497]})(e,t)}!function(e,t){for(var r=eo,n=e();;)try{if(276345===-parseInt(r(505))/1*(parseInt(r(511))/2)+-parseInt(r(506))/3*(-parseInt(r(503))/4)+parseInt(r(501))/5*(parseInt(r(497))/6)+-parseInt(r(502))/7+-parseInt(r(504))/8+parseInt(r(515))/9*(-parseInt(r(499))/10)+-parseInt(r(509))/11*(-parseInt(r(510))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Qs);f[Zs(513)]((function(e,t){var r,n,i,s=Zs;r=f[s(508)],n=function(e){var t=s;return e[t(500)].NoPadding={pad:function(){},unpad:function(){}},e[t(500)][t(498)]},(i=eo)(512)==i(512)?e[i(514)]=n(Mi):"undefined"===i(507)&&(void 0).amd?(void 0)(["./core","./cipher-core"],n):n(r.CryptoJS)}));var to=ro;function ro(e,t){var r=no();return(ro=function(e,t){return r[e-=420]})(e,t)}!function(e,t){for(var r=ro,n=e();;)try{if(896808===-parseInt(r(422))/1*(parseInt(r(445))/2)+-parseInt(r(444))/3*(parseInt(r(426))/4)+parseInt(r(443))/5*(-parseInt(r(420))/6)+parseInt(r(433))/7+parseInt(r(430))/8*(parseInt(r(435))/9)+-parseInt(r(429))/10+-parseInt(r(432))/11*(parseInt(r(425))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(no);f[to(441)]((function(e,t){var r,n,i,s=to;r=f[s(428)],n=function(e){var t,r,n,i,o=s;return n=(r=e)[(t=ro)(440)][t(442)],i=r.enc[t(427)],r.format[t(427)]={stringify:function(e){var r=t;return e.ciphertext[r(421)](i)},parse:function(e){var r=t,s=i[r(423)](e);return n[r(438)]({ciphertext:s})}},e.format[o(427)]},(i=ro)(424)==i(424)?e[i(437)]=n(Mi):"undefined"===i(434)&&(void 0).amd?(void 0)([i(439),i(436)],n):n(r[i(431)])}));function no(){var e=["9239202kheViM","function","752220UFEISp","./cipher-core","exports","create","./core","lib","createCommonjsModule","CipherParams","285djDFVC","3821751QcVNeW","9616PUskBS","2316LkfczU","toString","71ebJXNL","parse","object","624jStUtc","4BNbNTJ","Hex","commonjsGlobal","202830NNHgJJ","136YTJfjr","CryptoJS","39424zWHLLt"];return(no=function(){return e})()}var io=so;function so(e,t){var r=oo();return(so=function(e,t){return r[e-=289]})(e,t)}function oo(){var e=["3908600gZbLxZ","commonjsGlobal","_keySchedule","extend","768915eoKJuU","lib","amd","_createHelper","1HZjiMZ","_doCryptBlock","170FCmpzm","277480ZLVlHr","object","./enc-base64","CryptoJS","words","createCommonjsModule","_keyPriorReset","64jQVfsQ","2263044OLvOtg","./evpkdf","_invKeySchedule","_key","./core","72964jsNlCn","algo","_nRounds","BlockCipher","./cipher-core","1298788OPPjMJ","AES","4447719fKYeTr"];return(oo=function(){return e})()}!function(e,t){for(var r=so,n=e();;)try{if(390490===-parseInt(r(289))/1*(parseInt(r(310))/2)+parseInt(r(317))/3+parseInt(r(305))/4*(parseInt(r(291))/5)+parseInt(r(300))/6+parseInt(r(292))/7*(-parseInt(r(299))/8)+parseInt(r(312))/9+-parseInt(r(313))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(oo);f[io(297)]((function(e,t){var r,n,i,s=io;r=f[s(314)],n=function(e){var t=s;return function(){var t=so,r=e,n=r[t(318)][t(308)],i=r[t(306)],s=[],o=[],a=[],c=[],u=[],l=[],d=[],f=[],h=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var i=n^n<<1^n<<2^n<<3^n<<4;i=i>>>8^255&i^99,s[r]=i,o[i]=r;var m=e[r],v=e[m],y=e[v],_=257*e[i]^16843008*i;a[r]=_<<24|_>>>8,c[r]=_<<16|_>>>16,u[r]=_<<8|_>>>24,l[r]=_,_=16843009*y^65537*v^257*m^16843008*r,d[i]=_<<24|_>>>8,f[i]=_<<16|_>>>16,h[i]=_<<8|_>>>24,p[i]=_,r?(r=m^e[e[e[y^m]]],n^=e[e[n]]):r=n=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],v=i[t(311)]=n[t(316)]({_doReset:function(){var e=t;if(!this._nRounds||this[e(298)]!==this[e(303)]){for(var r=this._keyPriorReset=this[e(303)],n=r[e(296)],i=r.sigBytes/4,o=4*((this[e(307)]=i+6)+1),a=this[e(315)]=[],c=0;c6&&c%i==4&&(v=s[v>>>24]<<24|s[v>>>16&255]<<16|s[v>>>8&255]<<8|s[255&v]):(v=s[(v=v<<8|v>>>24)>>>24]<<24|s[v>>>16&255]<<16|s[v>>>8&255]<<8|s[255&v],v^=m[c/i|0]<<24),a[c]=a[c-i]^v);for(var u=this[e(302)]=[],l=0;l>>24]]^f[s[v>>>16&255]]^h[s[v>>>8&255]]^p[s[255&v]]}}},encryptBlock:function(e,r){var n=t;this[n(290)](e,r,this[n(315)],a,c,u,l,s)},decryptBlock:function(e,r){var n=t,i=e[r+1];e[r+1]=e[r+3],e[r+3]=i,this[n(290)](e,r,this[n(302)],d,f,h,p,o),i=e[r+1],e[r+1]=e[r+3],e[r+3]=i},_doCryptBlock:function(e,r,n,i,s,o,a,c){for(var u=this[t(307)],l=e[r]^n[0],d=e[r+1]^n[1],f=e[r+2]^n[2],h=e[r+3]^n[3],p=4,m=1;m>>24]^s[d>>>16&255]^o[f>>>8&255]^a[255&h]^n[p++],y=i[d>>>24]^s[f>>>16&255]^o[h>>>8&255]^a[255&l]^n[p++],_=i[f>>>24]^s[h>>>16&255]^o[l>>>8&255]^a[255&d]^n[p++],g=i[h>>>24]^s[l>>>16&255]^o[d>>>8&255]^a[255&f]^n[p++];l=v,d=y,f=_,h=g}v=(c[l>>>24]<<24|c[d>>>16&255]<<16|c[f>>>8&255]<<8|c[255&h])^n[p++],y=(c[d>>>24]<<24|c[f>>>16&255]<<16|c[h>>>8&255]<<8|c[255&l])^n[p++],_=(c[f>>>24]<<24|c[h>>>16&255]<<16|c[l>>>8&255]<<8|c[255&d])^n[p++],g=(c[h>>>24]<<24|c[l>>>16&255]<<16|c[d>>>8&255]<<8|c[255&f])^n[p++],e[r]=v,e[r+1]=y,e[r+2]=_,e[r+3]=g},keySize:8});r[t(311)]=n[t(320)](v)}(),e[t(311)]},"object"===(i=so)(293)?e.exports=n(Mi):n(r[i(295)])}));var ao=uo;function co(){var e=["./evpkdf","length","create","_lBlock","5jduFqL","DES","amd","_subKeys","7WPmTIF","./md5","decryptBlock","_invSubKeys","88231lPgnrf","createEncryptor","extend","_des1","./enc-base64","call","4hQhNqY","algo","words","slice","encryptBlock","_key","CryptoJS","2125404eVSeYk","2239113prLLyE","_des3","object","exports","_des2","BlockCipher","686799dedogx","./cipher-core","_rBlock","TripleDES","1756662IFpPoc","_doCryptBlock","_createHelper","2610LsPQUT","4582344obiFnP","createCommonjsModule","947902plUYfA"];return(co=function(){return e})()}!function(e,t){for(var r=uo,n=e();;)try{if(443054===parseInt(r(255))/1+parseInt(r(265))/2+-parseInt(r(292))/3*(-parseInt(r(284))/4)+parseInt(r(270))/5*(parseInt(r(259))/6)+-parseInt(r(274))/7*(-parseInt(r(263))/8)+-parseInt(r(291))/9+parseInt(r(262))/10*(-parseInt(r(278))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(co);f[ao(264)]((function(e,t){var r,n,i;r=c,n=function(e){return function(){var t=uo,r=e,n=r.lib,i=n.WordArray,s=n[t(254)],o=r[t(285)],a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=o[t(271)]=s[t(280)]({_doReset:function(){for(var e=t,r=this[e(289)][e(286)],n=[],i=0;i<56;i++){var s=a[i]-1;n[i]=r[s>>>5]>>>31-s%32&1}for(var o=this[e(273)]=[],l=0;l<16;l++){var d=o[l]=[],f=u[l];for(i=0;i<24;i++)d[i/6|0]|=n[(c[i]-1+f)%28]<<31-i%6,d[4+(i/6|0)]|=n[28+(c[i+24]-1+f)%28]<<31-i%6;for(d[0]=d[0]<<1|d[0]>>>31,i=1;i<7;i++)d[i]=d[i]>>>4*(i-1)+3;d[7]=d[7]<<5|d[7]>>>27}var h=this[e(277)]=[];for(i=0;i<16;i++)h[i]=o[15-i]},encryptBlock:function(e,r){var n=t;this[n(260)](e,r,this[n(273)])},decryptBlock:function(e,r){this[t(260)](e,r,this._invSubKeys)},_doCryptBlock:function(e,r,n){var i=t;this[i(269)]=e[r],this._rBlock=e[r+1],h[i(283)](this,4,252645135),h[i(283)](this,16,65535),p[i(283)](this,2,858993459),p.call(this,8,16711935),h[i(283)](this,1,1431655765);for(var s=0;s<16;s++){for(var o=n[s],a=this[i(269)],c=this[i(257)],u=0,f=0;f<8;f++)u|=l[f][((c^o[f])&d[f])>>>0];this._lBlock=c,this._rBlock=a^u}var m=this._lBlock;this._lBlock=this[i(257)],this[i(257)]=m,h[i(283)](this,1,1431655765),p[i(283)](this,8,16711935),p[i(283)](this,2,858993459),h[i(283)](this,16,65535),h[i(283)](this,4,252645135),e[r]=this._lBlock,e[r+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,r){var n=t,i=(this[n(269)]>>>e^this[n(257)])&r;this._rBlock^=i,this[n(269)]^=i<>>e^this[n(269)])&r;this._lBlock^=i,this[n(257)]^=i<192.");var n=r[e(287)](0,2),s=r[e(267)]<4?r.slice(0,2):r[e(287)](2,4),o=r[e(267)]<6?r[e(287)](0,2):r.slice(4,6);this[e(281)]=f[e(279)](i[e(268)](n)),this._des2=f.createEncryptor(i.create(s)),this[e(293)]=f[e(279)](i.create(o))},encryptBlock:function(e,r){var n=t;this[n(281)].encryptBlock(e,r),this[n(253)][n(276)](e,r),this._des3[n(288)](e,r)},decryptBlock:function(e,r){var n=t;this[n(293)][n(276)](e,r),this[n(253)][n(288)](e,r),this._des1.decryptBlock(e,r)},keySize:6,ivSize:2,blockSize:2});r.TripleDES=s[t(261)](m)}(),e.TripleDES},(i=uo)(294)==i(294)?e[i(295)]=n(Mi):n(r[i(290)])}));function uo(e,t){var r=co();return(uo=function(e,t){return r[e-=253]})(e,t)}var lo=fo;function fo(e,t){var r=ho();return(fo=function(e,t){return r[e-=285]})(e,t)}function ho(){var e=["./evpkdf","1339947vSQDVj","sigBytes","createCommonjsModule","1425996QPkQcf","drop","words","RC4Drop","6IGWluH","RC4","_doReset","function","998070lxIlRS","commonjsGlobal","3956248qJRMrv","9872RmAlof","./core","1115532dlgEwG","_createHelper","226666DvGrYC","extend","object","CryptoJS","lib","call","cfg","./enc-base64"];return(ho=function(){return e})()}!function(e,t){for(var r=fo,n=e();;)try{if(176515===-parseInt(r(305))/1+-parseInt(r(309))/2*(parseInt(r(298))/3)+parseInt(r(307))/4+parseInt(r(302))/5+parseInt(r(294))/6+parseInt(r(291))/7+-parseInt(r(304))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ho);f[lo(293)]((function(e,t){var r,n,i,s=lo;r=f[s(303)],n=function(e){var t=s;return function(){var t=fo,r=e,n=r[t(286)].StreamCipher,i=r.algo,s=i[t(299)]=n[t(310)]({_doReset:function(){for(var e=t,r=this._key,n=r[e(296)],i=r[e(292)],s=this._S=[],o=0;o<256;o++)s[o]=o;o=0;for(var a=0;o<256;o++){var c=o%i,u=n[c>>>2]>>>24-c%4*8&255;a=(a+s[o]+u)%256;var l=s[o];s[o]=s[a],s[a]=l}this._i=this._j=0},_doProcessBlock:function(e,r){var n=t;e[r]^=o[n(287)](this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var s=e[t];e[t]=e[r],e[r]=s,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}r[t(299)]=n._createHelper(s);var a=i[t(297)]=s[t(310)]({cfg:s.cfg[t(310)]({drop:192}),_doReset:function(){var e=t;s[e(300)][e(287)](this);for(var r=this[e(288)][e(295)];r>0;r--)o[e(287)](this)}});r.RC4Drop=n[t(308)](a)}(),e[t(299)]},"object"===(i=fo)(311)?e.exports=n(Mi):"undefined"===i(301)&&(void 0).amd?(void 0)([i(306),i(289),"./md5",i(290),"./cipher-core"],n):n(r[i(285)])}));var po=mo;function mo(e,t){var r=vo();return(mo=function(e,t){return r[e-=276]})(e,t)}function vo(){var e=["commonjsGlobal","./enc-base64","./cipher-core","924oTtFOw","./md5","1383uhyPhG","_key","./evpkdf","StreamCipher","300TkUXAl","21889620iTkUjQ","_createHelper","34609akgYUk","words","CryptoJS","amd","algo","./core","137436WWtAcj","object","call","createCommonjsModule","5504984PEGmfz","cfg","110IgrJIi","2256mvnKrl","3188dkIFWx","Rabbit","129555pDExCQ","11iXIlso"];return(vo=function(){return e})()}!function(e,t){for(var r=mo,n=e();;)try{if(505435===-parseInt(r(301))/1+-parseInt(r(285))/2*(parseInt(r(294))/3)+-parseInt(r(277))/4*(parseInt(r(283))/5)+parseInt(r(284))/6*(-parseInt(r(292))/7)+parseInt(r(281))/8+parseInt(r(287))/9*(-parseInt(r(298))/10)+parseInt(r(288))/11*(parseInt(r(299))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(vo);f[po(280)]((function(e,t){var r,n,i,s=po;r=f[s(289)],n=function(e){var t=s;return function(){var t=mo,r=e,n=r.lib[t(297)],i=r[t(305)],s=[],o=[],a=[],c=i.Rabbit=n.extend({_doReset:function(){for(var e=t,r=this[e(295)][e(302)],n=this[e(282)].iv,i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8);var s=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],o=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];for(this._b=0,i=0;i<4;i++)u.call(this);for(i=0;i<8;i++)o[i]^=s[i+4&7];if(n){var a=n[e(302)],c=a[0],l=a[1],d=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),f=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),h=d>>>16|4294901760&f,p=f<<16|65535&d;for(o[0]^=d,o[1]^=h,o[2]^=f,o[3]^=p,o[4]^=d,o[5]^=h,o[6]^=f,o[7]^=p,i=0;i<4;i++)u[e(279)](this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),s[0]=r[0]^r[5]>>>16^r[3]<<16,s[1]=r[2]^r[7]>>>16^r[5]<<16,s[2]=r[4]^r[1]>>>16^r[7]<<16,s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)s[n]=16711935&(s[n]<<8|s[n]>>>24)|4278255360&(s[n]<<24|s[n]>>>8),e[t+n]^=s[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}r[t(286)]=n[t(300)](c)}(),e[t(286)]},(i=mo)(278)==i(278)?e.exports=n(Mi):n(r[i(303)])}));var yo=go;!function(e,t){for(var r=go,n=e();;)try{if(989662===parseInt(r(518))/1*(-parseInt(r(510))/2)+-parseInt(r(505))/3*(parseInt(r(526))/4)+parseInt(r(523))/5*(-parseInt(r(512))/6)+parseInt(r(515))/7+-parseInt(r(514))/8*(-parseInt(r(525))/9)+parseInt(r(501))/10*(-parseInt(r(498))/11)+parseInt(r(502))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(_o);f[yo(511)]((function(e,t){var r,n,i,s=yo;r=f[s(522)],n=function(e){var t=s;return function(){var t=go,r=e,n=r[t(507)].StreamCipher,i=r[t(504)],s=[],o=[],a=[],c=i[t(509)]=n[t(508)]({_doReset:function(){var e=t,r=this[e(524)][e(520)],n=this.cfg.iv,i=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],s=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];this._b=0;for(var o=0;o<4;o++)u[e(517)](this);for(o=0;o<8;o++)s[o]^=i[o+4&7];if(n){var a=n.words,c=a[0],l=a[1],d=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),f=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),h=d>>>16|4294901760&f,p=f<<16|65535&d;for(s[0]^=d,s[1]^=h,s[2]^=f,s[3]^=p,s[4]^=d,s[5]^=h,s[6]^=f,s[7]^=p,o=0;o<4;o++)u.call(this)}},_doProcessBlock:function(e,r){var n=t,i=this._X;u[n(517)](this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var o=0;o<4;o++)s[o]=16711935&(s[o]<<8|s[o]>>>24)|4278255360&(s[o]<<24|s[o]>>>8),e[r+o]^=s[o]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}r[t(509)]=n._createHelper(c)}(),e[t(509)]},(i=go)(500)==i(500)?e[i(499)]=n(Mi):n(r[i(521)])}));function _o(){var e=["algo","15dXuPOO","./enc-base64","lib","extend","RabbitLegacy","40070PPVUQU","createCommonjsModule","6ksyQgc","./core","32GLbSuR","13476827BYBYmg","./cipher-core","call","7PoGeBc","./evpkdf","words","CryptoJS","commonjsGlobal","7483255XrASVE","_key","1347714JNtwGB","782556vFkWmY","./md5","10516407zgoneH","exports","object","10BxrZrb","24438540piEjZk","amd"];return(_o=function(){return e})()}function go(e,t){var r=_o();return(go=function(e,t){return r[e-=497]})(e,t)}function bo(e,t){const r=wo();return(bo=function(e,t){return r[e-=494]})(e,t)}!function(e,t){const r=bo,n=e();for(;;)try{if(378378===parseInt(r(517))/1+parseInt(r(503))/2+parseInt(r(522))/3*(parseInt(r(513))/4)+-parseInt(r(495))/5+parseInt(r(521))/6+-parseInt(r(504))/7+parseInt(r(496))/8*(-parseInt(r(497))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(wo);d((function(e,t){const r=bo;!function(t,r,n){const i=bo;i(502)==i(502)?e[i(501)]=r(Mi):"undefined"===i(510)&&(void 0).amd?(void 0)(["./core",i(519),i(518),i(498),i(508)],r):r(t.CryptoJS)}(f[r(512)],(function(e){const t=r;return function(){const t=bo;var r=e,n=r.lib[t(506)],i=r[t(509)];const s=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function u(e,r){const n=t;let i=r>>24&255,s=r>>16&255,o=r>>8&255,a=255&r,c=e.sbox[0][i]+e[n(520)][1][s];return c^=e[n(520)][2][o],c+=e[n(520)][3][a],c}function l(e,r,n){const i=t;let o,a=r,c=n;for(let t=0;t=n&&(s=0);let c=0,u=0,d=0;for(let t=0;t<18;t+=2)d=l(e,c,u),c=d.left,u=d[i(516)],e[i(505)][t]=c,e.pbox[t+1]=u;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)d=l(e,c,u),c=d.left,u=d[i(516)],e[i(520)][t][r]=c,e.sbox[t][r+1]=u}(c,n,i)}},encryptBlock:function(e,t){var r=l(c,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},decryptBlock:function(e,r){const n=t;var i=function(e,r,n){const i=t;let s,o=r,a=n;for(let t=17;t>1;--t)o^=e[i(505)][t],a=u(e,o)^a,s=o,o=a,a=s;return s=o,o=a,a=s,a^=e[i(505)][1],o^=e[i(505)][0],{left:o,right:a}}(c,e[r],e[r+1]);e[r]=i[n(499)],e[r+1]=i.right},blockSize:2,keySize:4,ivSize:2});r[t(507)]=n._createHelper(d)}(),e[t(507)]}))}));function wo(){const e=["806076sMDFcC","9PsLDlZ","_key","1034040Liccal","27200UzEoun","2277HkeLZA","./evpkdf","left","words","exports","object","749078OVvsHt","89705zYpbPo","pbox","BlockCipher","Blowfish","./cipher-core","algo","function","sigBytes","commonjsGlobal","477164XApVtR","extend","_keyPriorReset","right","591443GoDnLl","./md5","./enc-base64","sbox"];return(wo=function(){return e})()}var So=Io;function Eo(){var e=["./sha256","CryptoJS","object","./pbkdf2","./rabbit-legacy","./mode-ofb","./blowfish","./pad-ansix923","./sha224","./md5","2970990BnXZkl","./pad-zeropadding","6148456fhytIV","./x64-core","./pad-iso97971","./tripledes","./lib-typedarrays","1427788lialWL","./sha1","exports","createCommonjsModule","./evpkdf","./mode-ctr-gladman","commonjsGlobal","./enc-base64url","./rc4","./sha3","./cipher-core","6xzyYiI","./pad-iso10126","./core","4235350zVhfLO","./enc-base64","219688TkwyFx","amd","./mode-ecb","./format-hex","./sha384","17201439lPwHFO","91GDDwOc","./mode-ctr","7270iUnNUg","./hmac","./mode-cfb","./aes"];return(Eo=function(){return e})()}function Io(e,t){var r=Eo();return(Io=function(e,t){return r[e-=319]})(e,t)}function Ao(e,t){const r=xo();return(Ao=function(e,t){return r[e-=456]})(e,t)}function ko(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function Co(e,t,r){const n=Ao;let i=arguments[n(460)]>3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const s=e[n(472)];let o=5;for(;os)break;let c=e[o+4],u=!1;if(i?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(c)):(c&=31,u=1===c||5===c),u){const i=e[n(457)](o+4+2,o+4+a);let s=new(Ti[n(468)][n(467)])(t,new(Ti[n(466)])(r));const c=s[n(462)](i);s=null,e.set(c,o+4+2)}o=o+4+a}return e}function To(e,t,r){const n=Ao;if(e[n(472)]<=30)return e;const i=e[n(457)](32);let s=new(Ti[n(468)][n(467)])(t,new Ti.Counter(r));const o=s[n(462)](i);return s=null,e.set(o,32),e}function xo(){const e=["ctr","ModeOfOperation","15044751vawRlH","WordArray","1180554FivvhF","byteLength","564942vMEQsn","2260772PyMOje","slice","94722MGIWDW","catch","length","20wLOwfV","decrypt","11qiavJR","3013328Toxbuh","337309ojjDED","Counter"];return(xo=function(){return e})()}!function(e,t){for(var r=Io,n=e();;)try{if(637140===-parseInt(r(331))/1*(-parseInt(r(333))/2)+parseInt(r(347))/3+-parseInt(r(354))/4+parseInt(r(323))/5+parseInt(r(320))/6*(-parseInt(r(325))/7)+parseInt(r(349))/8+-parseInt(r(330))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Eo),f[So(357)]((function(e,t){var r,n;r=f[So(360)],"object"===(n=Io)(339)?e[n(356)]=Mi:r[n(338)]=r[n(338)]})),function(e,t){const r=Ao,n=e();for(;;)try{if(432418===parseInt(r(463))/1*(parseInt(r(458))/2)+-parseInt(r(471))/3+-parseInt(r(456))/4+-parseInt(r(461))/5*(parseInt(r(473))/6)+-parseInt(r(465))/7+-parseInt(r(464))/8+parseInt(r(469))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(xo);var Do=Mo;!function(e,t){for(var r=Mo,n=e();;)try{if(721640===-parseInt(r(1176))/1+parseInt(r(605))/2*(-parseInt(r(1264))/3)+-parseInt(r(171))/4+parseInt(r(342))/5+-parseInt(r(387))/6+-parseInt(r(385))/7*(parseInt(r(521))/8)+parseInt(r(942))/9*(parseInt(r(156))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Po);var Bo=f[Do(1276)]((function(e,t){var r,n,s=Do,o=(r=new Date,n=4,{setLogLevel:function(e){var t=Mo;n=e==this[t(390)]?1:e==this[t(726)]?2:e==this[t(1102)]?3:(this[t(1245)],4)},debug:function(e,t){var i=Mo;void 0===console.debug&&(console[i(390)]=console.log),1>=n&&console.debug("["+o[i(466)](new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){var i=Mo;2>=n&&console.info("["+o[i(466)](new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){var i=Mo;3>=n&&console.warn("["+o[i(466)](new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){var i=Mo;4>=n&&console[i(1245)]("["+o[i(466)](new Date-r,1e3)+"]","["+e+"]",t)}});o[s(466)]=function(e,t){var r,n=s;function i(e,t){for(var r=Mo,n=(""+e)[r(1186)](".");n[0].length0){for(var n="",i=0;i0&&(n+=","),n+="["+o[t(466)](e[t(532)](i))+","+o[t(466)](e[t(584)](i))+"]";return n}return t(562)},s(350)!==s(690)&&(t.Log=o);var a=function(e){var t=s;if(!(e instanceof ArrayBuffer))throw t(805);this[t(571)]=e,this[t(906)]=new DataView(e),this[t(1326)]=0};a[s(1260)][s(459)]=function(){return this[s(1326)]},a[s(1260)].getEndPosition=function(){return this.buffer.byteLength},a[s(1260)].getLength=function(){var e=s;return this.buffer[e(546)]},a[s(1260)].seek=function(e){var t=s,r=Math[t(611)](0,Math[t(858)](this[t(571)][t(546)],e));return this[t(1326)]=isNaN(r)||!isFinite(r)?0:r,!0},a[s(1260)][s(1160)]=function(){var e=s;return this[e(459)]()>=this[e(493)]()},a[s(1260)][s(434)]=function(e,t){var r=s,n=0;if(this[r(1326)]+e<=this[r(571)][r(546)]){switch(e){case 1:n=t?this[r(906)][r(1146)](this[r(1326)]):this[r(906)].getUint8(this[r(1326)]);break;case 2:n=t?this[r(906)][r(1255)](this.position):this.dataview[r(327)](this[r(1326)]);break;case 3:if(t)throw r(1097);n=this[r(906)][r(1387)](this.position)<<16,n|=this[r(906)][r(1387)](this[r(1326)]+1)<<8,n|=this[r(906)][r(1387)](this[r(1326)]+2);break;case 4:n=t?this.dataview[r(809)](this[r(1326)]):this.dataview[r(1254)](this[r(1326)]);break;case 8:if(t)throw r(369);n=this.dataview[r(1254)](this[r(1326)])<<32,n|=this[r(906)][r(1254)](this[r(1326)]+4);break;default:throw r(506)+e}return this[r(1326)]+=e,n}throw"Not enough bytes in buffer"},a.prototype.readUint8=function(){return this.readAnyInt(1,!1)},a[s(1260)].readUint16=function(){return this[s(434)](2,!1)},a[s(1260)][s(781)]=function(){return this[s(434)](3,!1)},a.prototype[s(163)]=function(){return this.readAnyInt(4,!1)},a.prototype.readUint64=function(){return this[s(434)](8,!1)},a.prototype[s(418)]=function(e){var t=s;if(this[t(1326)]+e<=this[t(571)].byteLength){for(var r="",n=0;nthis[t(1238)]&&(this[t(1238)]=r);else{for(n<1&&(n=1);r>n;)n*=2;var i=new ArrayBuffer(n),o=new Uint8Array(this[t(467)]);new Uint8Array(i,0,o[t(195)])[t(1400)](o),this[t(571)]=i,this._byteLength=r}}},c[s(1260)][s(570)]=function(){var e=s;if(this[e(1238)]!=this[e(467)][e(546)]){var t=new ArrayBuffer(this[e(1238)]),r=new Uint8Array(t),n=new Uint8Array(this[e(467)],0,r[e(195)]);r[e(1400)](n),this[e(571)]=t}},c[s(306)]=!1,c[s(872)]=!0,c[s(1260)][s(1238)]=0,Object[s(1372)](c[s(1260)],s(546),{get:function(){var e=s;return this[e(1238)]-this[e(1056)]}}),Object[s(1372)](c[s(1260)],s(571),{get:function(){return this[s(570)](),this._buffer},set:function(e){var t=s;this[t(467)]=e,this[t(738)]=new DataView(this[t(467)],this._byteOffset),this._byteLength=this[t(467)][t(546)]}}),Object[s(1372)](c[s(1260)],"byteOffset",{get:function(){return this._byteOffset},set:function(e){var t=s;this[t(1056)]=e,this._dataView=new DataView(this[t(467)],this[t(1056)]),this[t(1238)]=this[t(467)][t(546)]}}),Object[s(1372)](c[s(1260)],"dataView",{get:function(){return this[s(738)]},set:function(e){var t=s;this[t(1056)]=e[t(870)],this[t(467)]=e.buffer,this[t(738)]=new DataView(this[t(467)],this[t(1056)]),this[t(1238)]=this[t(1056)]+e.byteLength}}),c.prototype[s(713)]=function(e){var t=s,r=Math.max(0,Math[t(858)](this[t(546)],e));this[t(1326)]=isNaN(r)||!isFinite(r)?0:r},c[s(1260)][s(948)]=function(){var e=s;return this[e(1326)]>=this[e(1238)]},c[s(1260)][s(157)]=function(e){var t=s;this[t(1207)](1*e);var r=new Uint8Array(this[t(467)],this[t(870)]+this[t(1326)],e);return this[t(1326)]+=1*e,r},c[s(1260)][s(1291)]=function(e,t){var r=s;e=null==e?this[r(546)]-this.position/4:e;var n=new Int32Array(e);return c[r(838)](n.buffer,0,this.buffer,this[r(870)]+this[r(1326)],e*n[r(951)]),c[r(666)](n,null==t?this[r(300)]:t),this[r(1326)]+=n.byteLength,n},c[s(1260)][s(844)]=function(e,t){var r=s;e=null==e?this.byteLength-this[r(1326)]/2:e;var n=new Int16Array(e);return c.memcpy(n[r(571)],0,this[r(571)],this[r(870)]+this.position,e*n[r(951)]),c.arrayToNative(n,null==t?this[r(300)]:t),this.position+=n[r(546)],n},c[s(1260)][s(1024)]=function(e){var t=s;e=null==e?this[t(546)]-this[t(1326)]:e;var r=new Int8Array(e);return c.memcpy(r[t(571)],0,this[t(571)],this[t(870)]+this[t(1326)],e*r[t(951)]),this[t(1326)]+=r[t(546)],r},c.prototype[s(551)]=function(e,t){var r=s;e=null==e?this.byteLength-this[r(1326)]/4:e;var n=new Uint32Array(e);return c[r(838)](n[r(571)],0,this.buffer,this[r(870)]+this[r(1326)],e*n[r(951)]),c.arrayToNative(n,null==t?this[r(300)]:t),this[r(1326)]+=n[r(546)],n},c[s(1260)][s(512)]=function(e,t){var r=s;e=null==e?this[r(546)]-this[r(1326)]/2:e;var n=new Uint16Array(e);return c[r(838)](n[r(571)],0,this.buffer,this.byteOffset+this[r(1326)],e*n.BYTES_PER_ELEMENT),c.arrayToNative(n,null==t?this[r(300)]:t),this[r(1326)]+=n[r(546)],n},c[s(1260)][s(554)]=function(e){var t=s;e=null==e?this[t(546)]-this[t(1326)]:e;var r=new Uint8Array(e);return c[t(838)](r[t(571)],0,this.buffer,this[t(870)]+this.position,e*r[t(951)]),this.position+=r[t(546)],r},c[s(1260)][s(1088)]=function(e,t){var r=s;e=null==e?this[r(546)]-this[r(1326)]/8:e;var n=new Float64Array(e);return c.memcpy(n[r(571)],0,this[r(571)],this[r(870)]+this[r(1326)],e*n[r(951)]),c.arrayToNative(n,null==t?this[r(300)]:t),this.position+=n[r(546)],n},c[s(1260)].readFloat32Array=function(e,t){var r=s;e=null==e?this[r(546)]-this.position/4:e;var n=new Float32Array(e);return c.memcpy(n[r(571)],0,this[r(571)],this.byteOffset+this[r(1326)],e*n[r(951)]),c[r(666)](n,null==t?this[r(300)]:t),this.position+=n.byteLength,n},c[s(1260)].readInt32=function(e){var t=s,r=this[t(738)][t(809)](this[t(1326)],null==e?this[t(300)]:e);return this[t(1326)]+=4,r},c[s(1260)].readInt16=function(e){var t=s,r=this._dataView.getInt16(this[t(1326)],null==e?this[t(300)]:e);return this[t(1326)]+=2,r},c.prototype.readInt8=function(){var e=s,t=this._dataView.getInt8(this[e(1326)]);return this[e(1326)]+=1,t},c[s(1260)][s(163)]=function(e){var t=s,r=this._dataView.getUint32(this.position,null==e?this[t(300)]:e);return this.position+=4,r},c[s(1260)][s(597)]=function(e){var t=s,r=this[t(738)][t(327)](this[t(1326)],null==e?this.endianness:e);return this[t(1326)]+=2,r},c[s(1260)][s(774)]=function(){var e=s,t=this[e(738)].getUint8(this[e(1326)]);return this[e(1326)]+=1,t},c[s(1260)][s(216)]=function(e){var t=s,r=this[t(738)].getFloat32(this[t(1326)],null==e?this[t(300)]:e);return this[t(1326)]+=4,r},c[s(1260)][s(207)]=function(e){var t=s,r=this[t(738)][t(1022)](this[t(1326)],null==e?this[t(300)]:e);return this.position+=8,r},c[s(300)]=new Int8Array(new Int16Array([1])[s(571)])[0]>0,c[s(838)]=function(e,t,r,n,i){var o=s,a=new Uint8Array(e,t,i),c=new Uint8Array(r,n,i);a[o(1400)](c)},c[s(666)]=function(e,t){var r=s;return t==this[r(300)]?e:this[r(199)](e)},c[s(1025)]=function(e,t){var r=s;return this[r(300)]==t?e:this[r(199)](e)},c.flipArrayEndianness=function(e){for(var t=s,r=new Uint8Array(e.buffer,e.byteOffset,e[t(546)]),n=0;no;i--,o++){var a=r[o];r[o]=r[i],r[i]=a}return e},c[s(1260)][s(1077)]=0,String[s(1379)]=function(e){for(var t=s,r=[],n=0;n>16),this[t(1366)]((65280&e)>>8),this[t(1366)](255&e)},c[s(1260)][s(736)]=function(e,t){var r=this[s(1326)];this.seek(e),this.writeUint32(t),this.seek(r)},c.prototype[s(421)]=function(e,t){var r=s;this._realloc(4*e);var n=new Int32Array(this[r(467)],this.byteOffset+this[r(1326)],e);return c.arrayToNative(n,null==t?this[r(300)]:t),this[r(1326)]+=4*e,n},c.prototype[s(992)]=function(e,t){var r=s;this[r(1207)](2*e);var n=new Int16Array(this[r(467)],this[r(870)]+this.position,e);return c[r(666)](n,null==t?this[r(300)]:t),this.position+=2*e,n},c[s(1260)][s(846)]=function(e){var t=s;this[t(1207)](1*e);var r=new Int8Array(this[t(467)],this.byteOffset+this[t(1326)],e);return this.position+=1*e,r},c[s(1260)].mapUint32Array=function(e,t){var r=s;this[r(1207)](4*e);var n=new Uint32Array(this[r(467)],this.byteOffset+this.position,e);return c[r(666)](n,null==t?this[r(300)]:t),this[r(1326)]+=4*e,n},c[s(1260)][s(189)]=function(e,t){var r=s;this[r(1207)](2*e);var n=new Uint16Array(this[r(467)],this[r(870)]+this.position,e);return c[r(666)](n,null==t?this.endianness:t),this[r(1326)]+=2*e,n},c.prototype.mapFloat64Array=function(e,t){var r=s;this[r(1207)](8*e);var n=new Float64Array(this._buffer,this.byteOffset+this.position,e);return c[r(666)](n,null==t?this.endianness:t),this[r(1326)]+=8*e,n},c[s(1260)][s(830)]=function(e,t){var r=s;this[r(1207)](4*e);var n=new Float32Array(this[r(467)],this[r(870)]+this[r(1326)],e);return c[r(666)](n,null==t?this[r(300)]:t),this[r(1326)]+=4*e,n};var l=function(e){var t=s;this[t(820)]=[],this[t(606)]=-1,e&&(this[t(986)](e),this[t(606)]=0)};l[s(1260)]=new c(new ArrayBuffer,0,c.BIG_ENDIAN),l[s(1260)][s(485)]=function(){var e,t=s;return this[t(606)]>-1||(this[t(820)][t(195)]>0?0===(e=this[t(820)][0])[t(359)]?(this.buffer=e,this[t(606)]=0,o.debug(t(351),"Stream ready for parsing"),!0):(this[t(1348)](),!1):(this[t(1348)](),!1))},ArrayBuffer[s(626)]=function(e,t){var r=s;o[r(390)](r(1003),r(242)+(e[r(546)]+t[r(546)]));var n=new Uint8Array(e[r(546)]+t[r(546)]);return n[r(1400)](new Uint8Array(e),0),n[r(1400)](new Uint8Array(t),e[r(546)]),n[r(571)]},l.prototype[s(620)]=function(e,t,r){var n,i=s;return(n=new Uint8Array(r))[i(1400)](new Uint8Array(e,t,r)),n.buffer[i(359)]=e[i(359)]+t,n[i(571)][i(455)]=0,n[i(571)]},l[s(1260)].insertBuffer=function(e){for(var t=s,r=!0,n=0;ni[t(546)]){this[t(820)][t(1116)](n,1),n--;continue}}else e[t(359)]+e.byteLength<=i.fileStart||(e=this[t(620)](e,0,i.fileStart-e[t(359)])),o[t(390)](t(351),t(657)+e[t(359)]+t(1380)+e[t(546)]+")"),this.buffers.splice(n,0,e),0===n&&(this[t(571)]=e);r=!1;break}if(e[t(359)]0)){r=!1;break}e=this[t(620)](e,a,c)}}r&&(o[t(390)](t(351),t(657)+e[t(359)]+t(1380)+e.byteLength+")"),this[t(820)].push(e),0===n&&(this[t(571)]=e))},l[s(1260)][s(1348)]=function(e){var t,r,n,i,a,c=s,u=[],l="";for(n=0,i=0,t=0;t0&&(l+=a[c(584)]-1+"]");var d=e?o.info:o[c(390)];0===this.buffers.length?d(c(351),c(665)):d(c(351),this[c(820)][c(195)]+" stored buffer(s) ("+n+"/"+i+c(693)+l)},l.prototype[s(1351)]=function(){var e,t,r=s;for(e=0;e"+this[t(571)][t(546)]+")"),!0}return!1}return!1},l.prototype[s(843)]=function(e,t,r){var n,i=s,a=null,c=-1;for(n=!0===e?0:this[i(606)];n=t?(o.debug(i(351),i(850)+c),c):-1:-1},l.prototype[s(1111)]=function(e){var t,r,n,i=s,o=void 0!==e?e:this[i(606)];if(r=this.buffers[o],this[i(820)][i(195)]>o+1)for(t=o+1;t>3;return 31===s&&i[r(883)].length>=2&&(s=32+((7&i[r(883)][0])<<3)+((224&i[r(883)][1])>>5)),s}return null},n[e(1046)]=function(e){n.Descriptor.call(this,4,e)},n[e(1046)][e(1260)]=new(n[e(1353)]),n[e(1046)][e(1260)][e(1270)]=function(t){var r=e;this[r(964)]=t.readUint8(),this.streamType=t[r(774)](),this.upStream=0!=(this[r(1092)]>>1&1),this[r(1092)]=this[r(1092)]>>>2,this[r(446)]=t.readUint24(),this[r(394)]=t[r(163)](),this[r(1155)]=t[r(163)](),this[r(1098)]-=13,this[r(1124)](t)},n.DecoderSpecificInfo=function(t){var r=e;n.Descriptor[r(259)](this,5,t)},n.DecoderSpecificInfo[e(1260)]=new(n[e(1353)]),n.SLConfigDescriptor=function(t){var r=e;n[r(1353)][r(259)](this,6,t)},n.SLConfigDescriptor[e(1260)]=new(n[e(1353)]),this};s(350)!==s(690)&&(t[s(553)]=d);var f={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:[s(889),s(268),s(924),"skip","meco",s(431)],FULL_BOXES:[s(598),s(1143),s(1004),s(260),"bxml","ipro",s(957)],CONTAINER_BOXES:[[s(1114),[s(866),s(753)]],["trak"],[s(1319)],[s(235)],["minf"],[s(1229)],[s(302),[s(1241),"sbgp"]],[s(1016),["trex"]],["moof",[s(1257)]],["traf",[s(417),s(1241),"sbgp"]],[s(332)],[s(482)],[s(392)],[s(865),[s(433)]],["meco"],["hnti"],[s(943)],[s(431)],["strd"],[s(683)],[s(504)],[s(1191)],[s(346)],[s(1215),[s(803)]],[s(1043),[s(1347)]],[s(643)],["grpl"],[s(245)],[s(289),[s(1182)]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){var e=s;f[e(343)].prototype=new f.Box,f.ContainerBox[e(1260)]=new(f[e(160)]),f.SampleEntry[e(1260)]=new f.Box,f[e(1377)].prototype=new(f[e(343)]),f.BASIC_BOXES.forEach((function(t){f[e(222)](t)})),f[e(454)][e(647)]((function(t){f[e(305)](t)})),f[e(641)][e(647)]((function(t){f[e(842)](t[0],null,t[1])}))},Box:function(e,t,r){var n=s;this[n(1218)]=e,this[n(1098)]=t,this[n(614)]=r},FullBox:function(e,t,r){var n=s;f[n(160)][n(259)](this,e,t,r),this[n(1239)]=0,this[n(1085)]=0},ContainerBox:function(e,t,r){var n=s;f[n(160)][n(259)](this,e,t,r),this[n(237)]=[]},SampleEntry:function(e,t,r,n){var i=s;f[i(370)][i(259)](this,e,t),this[i(1305)]=r,this[i(532)]=n},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){var r=s;f[r(343)][r(259)](this,e,t)},createBoxCtor:function(e,t){var r=s;f[r(1284)][r(818)](e),f[e+"Box"]=function(t){f[r(160)].call(this,e,t)},f[e+r(160)][r(1260)]=new(f[r(160)]),t&&(f[e+r(160)][r(1260)][r(1270)]=t)},createFullBoxCtor:function(e,t){var r=s;f[e+r(160)]=function(t){var n=r;f[n(343)][n(259)](this,e,t)},f[e+r(160)][r(1260)]=new f.FullBox,f[e+r(160)].prototype[r(1270)]=function(e){var n=r;this[n(741)](e),t&&t[n(259)](this,e)}},addSubBoxArrays:function(e){if(e){this[s(1081)]=e;for(var t=e.length,r=0;rr?{code:f[c(855)],type:h,size:d,hdr_size:l,start:u}:0!==d&&u+d>e[c(493)]()?(e[c(713)](u),{code:f[c(855)],type:h,size:d,hdr_size:l,start:u}):t?{code:f.OK,type:h,size:d,hdr_size:l,start:u}:(f[h+"Box"]?n=new(f[h+c(160)])(d):h!==c(614)?(n=new(f[c(160)])(h,d))[c(1171)]=!0:f.UUIDBoxes[a]?n=new(f[c(340)][a])(d):((n=new(f[c(160)])(h,d))[c(614)]=a,n[c(1171)]=!0),n[c(1305)]=l,n[c(532)]=u,n[c(1251)]===f[c(160)][c(1260)].write&&n[c(1218)]!==c(889)&&n[c(471)](e),n[c(1270)](e),(i=e[c(459)]()-(n[c(532)]+n.size))<0?e[c(713)](n.start+n[c(1098)]):i>0&&0!==n[c(1098)]&&e[c(713)](n[c(532)]+n.size),{code:f.OK,box:n,size:n[c(1098)]})},f.Box[s(1260)][s(1270)]=function(e){var t=s;this.type!=t(889)?this.data=e[t(554)](this[t(1098)]-this.hdr_size):0===this[t(1098)]?e[t(713)](e[t(493)]()):e[t(713)](this[t(532)]+this.size)},f[s(160)][s(1260)][s(471)]=function(e){var t=s;this[t(883)]=e[t(554)](this.size-this.hdr_size),e.position-=this.size-this.hdr_size},f.FullBox[s(1260)][s(471)]=function(e){var t=s;this.parseFullHeader(e),this[t(883)]=e[t(554)](this[t(1098)]-this[t(1305)]),this.hdr_size-=4,e[t(1326)]-=this[t(1098)]-this.hdr_size},f[s(343)][s(1260)][s(741)]=function(e){var t=s;this[t(1085)]=e[t(774)](),this[t(1239)]=e[t(781)](),this.hdr_size+=4},f[s(343)][s(1260)][s(1270)]=function(e){var t=s;this.parseFullHeader(e),this[t(883)]=e[t(554)](this.size-this[t(1305)])},f[s(370)][s(1260)][s(1270)]=function(e){for(var t,r,n=s;e[n(459)]()>10&31,r[1]=this[t(1039)]>>5&31,r[2]=31&this.language,this[t(212)]=String[t(211)](r[0]+96,r[1]+96,r[2]+96)},f.SAMPLE_ENTRY_TYPE_VISUAL=s(1007),f.SAMPLE_ENTRY_TYPE_AUDIO=s(879),f[s(1074)]=s(400),f[s(871)]=s(542),f[s(535)]=s(790),f[s(704)]=s(1258),f.SAMPLE_ENTRY_TYPE_TEXT=s(575),f[s(182)].prototype[s(734)]=function(e){var t=s;e.readUint8Array(6),this[t(405)]=e.readUint16(),this[t(1305)]+=8},f[s(182)][s(1260)][s(1270)]=function(e){var t=s;this[t(734)](e),this[t(883)]=e[t(554)](this[t(1098)]-this.hdr_size)},f[s(182)][s(1260)][s(471)]=function(e){var t=s;this[t(734)](e),this[t(883)]=e.readUint8Array(this[t(1098)]-this[t(1305)]),this[t(1305)]-=8,e[t(1326)]-=this[t(1098)]-this.hdr_size},f[s(182)][s(1260)].parseFooter=function(e){var t=s;f[t(370)][t(1260)][t(1270)][t(259)](this,e)},f[s(613)](f[s(1074)]),f[s(613)](f[s(871)]),f[s(613)](f[s(535)]),f[s(613)](f[s(704)]),f.createMediaSampleEntryCtor(f[s(378)]),f[s(613)](f[s(1389)],(function(e){var t,r=s;this.parseHeader(e),e[r(597)](),e[r(597)](),e[r(551)](3),this[r(301)]=e[r(597)](),this[r(1185)]=e.readUint16(),this[r(1127)]=e[r(163)](),this[r(594)]=e.readUint32(),e[r(163)](),this.frame_count=e[r(597)](),t=Math[r(858)](31,e.readUint8()),this[r(1128)]=e[r(418)](t),t<31&&e[r(418)](31-t),this[r(905)]=e[r(597)](),e[r(597)](),this[r(1010)](e)})),f[s(613)](f[s(1263)],(function(e){var t=s;this[t(734)](e),e[t(551)](2),this.channel_count=e.readUint16(),this[t(707)]=e[t(597)](),e[t(597)](),e[t(597)](),this[t(538)]=e[t(163)]()/65536,this[t(1010)](e)})),f.createSampleEntryCtor(f[s(1389)],"avc1"),f.createSampleEntryCtor(f[s(1389)],s(1053)),f.createSampleEntryCtor(f[s(1389)],s(502)),f.createSampleEntryCtor(f[s(1389)],s(517)),f[s(719)](f[s(1389)],"av01"),f[s(719)](f[s(1389)],s(1170)),f[s(719)](f[s(1389)],"hvc1"),f[s(719)](f.SAMPLE_ENTRY_TYPE_VISUAL,s(508)),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),f[s(719)](f[s(1389)],s(638)),f[s(719)](f[s(1389)],"dvh1"),f[s(719)](f[s(1389)],s(1144)),f.createSampleEntryCtor(f[s(1389)],"vvc1"),f[s(719)](f[s(1389)],s(360)),f[s(719)](f[s(1389)],"vvs1"),f.createSampleEntryCtor(f[s(1389)],s(227)),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_VISUAL,s(1234)),f[s(719)](f[s(1389)],s(1161)),f[s(719)](f[s(1389)],s(1075)),f[s(719)](f[s(1389)],s(954)),f[s(719)](f[s(1389)],s(692)),f[s(719)](f[s(1389)],s(1333)),f[s(719)](f[s(1389)],"uncv"),f.createSampleEntryCtor(f[s(1263)],s(1126)),f.createSampleEntryCtor(f[s(1263)],s(583)),f.createSampleEntryCtor(f[s(1263)],s(796)),f[s(719)](f[s(1263)],s(1403)),f[s(719)](f[s(1263)],"Opus"),f[s(719)](f.SAMPLE_ENTRY_TYPE_AUDIO,s(1037)),f[s(719)](f.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),f.createSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_AUDIO,s(290)),f.createSampleEntryCtor(f[s(1263)],s(1343)),f[s(1323)](f.SAMPLE_ENTRY_TYPE_VISUAL,s(877)),f[s(1323)](f[s(1263)],"enca"),f[s(1323)](f[s(535)],"encu"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),f.createEncryptedSampleEntryCtor(f.SAMPLE_ENTRY_TYPE_TEXT,s(596)),f[s(1323)](f[s(871)],s(1398)),f[s(222)](s(236),(function(e){var t=s,r=16*(1+(1&(1&e[t(774)]())));this.layer_size=[];for(var n=0;n<3;n++)this[t(885)][n]=16==r?e.readUint16():e[t(163)]()})),f[s(222)](s(967),(function(e){this[s(1169)]=e.readUint8()})),f[s(305)](s(604),(function(e){var t=s;this.aux_type=e[t(1158)]();var r=this[t(1098)]-this[t(1305)]-(this.aux_type[t(195)]+1);this[t(814)]=e.readUint8Array(r)})),f[s(222)]("av1C",(function(e){var t=s,r=e[t(774)]();if(!(r>>7&!1)&&(this.version=127&r,1===this[t(1085)]&&(r=e.readUint8(),this.seq_profile=r>>5&7,this.seq_level_idx_0=31&r,r=e[t(774)](),this.seq_tier_0=r>>7&1,this[t(792)]=r>>6&1,this[t(999)]=r>>5&1,this[t(401)]=r>>4&1,this[t(414)]=r>>3&1,this[t(208)]=r>>2&1,this[t(681)]=3&r,r=e[t(774)](),this.reserved_1=r>>5&7,0===this[t(468)]))){if(this[t(539)]=r>>4&1,1===this[t(539)])this.initial_presentation_delay_minus_one=15&r;else if(this[t(618)]=15&r,0!==this.reserved_2)return;var n=this[t(1098)]-this[t(1305)]-4;this[t(481)]=e.readUint8Array(n)}})),f[s(222)]("avcC",(function(e){var t,r,n=s;for(this[n(1209)]=e[n(774)](),this[n(923)]=e.readUint8(),this[n(873)]=e.readUint8(),this[n(1230)]=e[n(774)](),this[n(278)]=3&e.readUint8(),this[n(198)]=31&e[n(774)](),r=this[n(1098)]-this[n(1305)]-6,this[n(684)]=[],t=0;t0&&(this[n(1396)]=e[n(554)](r))})),f.createBoxCtor("btrt",(function(e){var t=s;this[t(1082)]=e.readUint32(),this[t(394)]=e[t(163)](),this[t(1155)]=e[t(163)]()})),f[s(305)](s(225),(function(e){var t=s,r=e[t(774)]();this[t(939)]=128==(128&r),this.intra_pred_used=64==(64&r),this[t(854)]=(63&r)>>2,e.readUint24()})),f.createBoxCtor(s(292),(function(e){var t,r=s;for(this[r(688)]=e[r(597)](),this[r(983)]=[],this.channel_types=[],this[r(685)]=[],t=0;t=32768&&this[t(808)][t(818)](e[t(1158)]())}})),f[s(305)](s(678),(function(e){var t,r,n=s;if(t=e[n(163)](),this[n(972)]=[],0===this[n(1085)])for(r=0;r>7}else"rICC"===this[t(1118)]?this[t(170)]=e[t(554)](this[t(1098)]-4):this[t(1118)]===t(766)&&(this[t(170)]=e[t(554)](this.size-4))})),f[s(305)](s(283),(function(e){var t=s;this[t(1216)](e),this[t(386)]=e[t(1158)]()})),f.createFullBoxCtor(s(1065),(function(e){var t=s;0===this.version&&(this[t(526)]=e[t(177)](),this[t(347)]=e.readInt32(),this[t(1028)]=e[t(177)](),this.compositionStartTime=e[t(177)](),this[t(1265)]=e[t(177)]())})),f.createFullBoxCtor("ctts",(function(e){var t,r,n=s;if(t=e.readUint32(),this.sample_counts=[],this[n(354)]=[],0===this.version)for(r=0;r>6,this[t(780)]=r>>1&31,this[t(1134)]=(1&r)<<2|n>>6&3,this[t(1267)]=n>>3&7,this[t(566)]=n>>2&1,this[t(357)]=3&n|i>>5&7})),f[s(222)](s(777),(function(e){var t=s,r=e[t(597)]();this[t(1180)]=r>>3,this[t(840)]=7&r,this.ind_subs=[];for(var n=0;n>6,i.bsid=o>>1&31,i[t(1134)]=(1&o)<<4|a>>4&15,i[t(1267)]=a>>1&7,i[t(566)]=1&a,i.num_dep_sub=c>>1&15,i[t(1278)]>0&&(i[t(530)]=(1&c)<<8|e.readUint8())}})),f[s(305)](s(798),(function(e){var t=s,r=[],n=[t(186),t(428),t(617),"SEEKTABLE",t(971),t(295),t(968),t(1104)];for(this[t(741)](e);;){var i=e[t(774)](),o=Math[t(858)](127&i,n[t(195)]-1);if(o?e[t(554)](e[t(781)]()):(e[t(554)](13),this[t(538)]=e[t(163)]()>>12,e[t(554)](20)),r[t(818)](n[o]),128&i)break}this[t(989)]=r.length+" ("+r[t(890)](", ")+")"})),f[s(222)](s(1011),(function(e){var t=s;this[t(1139)]=e[t(1244)]()})),f[s(222)](s(836),(function(e){var t=s;this[t(934)]=e[t(163)]()})),f.createBoxCtor("dmed",(function(e){var t=s;this.bytessent=e[t(1244)]()})),f[s(222)](s(950),(function(e){var t=s;if(this[t(1206)]=e[t(774)](),this[t(834)]=e[t(774)](),this[t(1033)]=e[t(597)](),this[t(680)]=e.readUint32(),this[t(541)]=e[t(188)](),this[t(1187)]=e[t(774)](),0!==this[t(1187)]){this[t(1302)]=e[t(774)](),this[t(650)]=e[t(774)](),this.ChannelMapping=[];for(var r=0;r=4;)this[t(206)][n]=e[t(418)](4),r-=4,n++})),f[s(305)](s(1310),(function(e){var t=s;0===this[t(1085)]&&(e.readUint32(),this[t(158)]=e[t(418)](4),e[t(551)](3),this[t(491)]=e.readString(this[t(1098)]-this.hdr_size-20),"\0"===this[t(491)][this[t(491)][t(195)]-1]&&(this[t(491)]=this[t(491)][t(294)](0,-1)))})),f.createBoxCtor(s(1231),(function(e){var t,r,n,i,o=s;this[o(1209)]=e[o(774)](),i=e[o(774)](),this[o(1094)]=i>>6,this[o(576)]=(32&i)>>5,this[o(663)]=31&i,this[o(544)]=e.readUint32(),this[o(1253)]=e.readUint8Array(6),this.general_level_idc=e[o(774)](),this.min_spatial_segmentation_idc=4095&e[o(597)](),this[o(1115)]=3&e[o(774)](),this.chroma_format_idc=3&e[o(774)](),this.bit_depth_luma_minus8=7&e[o(774)](),this.bit_depth_chroma_minus8=7&e.readUint8(),this[o(256)]=e[o(597)](),i=e.readUint8(),this[o(447)]=i>>6,this[o(997)]=(13&i)>>3,this[o(987)]=(4&i)>>2,this[o(278)]=3&i,this[o(982)]=[];var a=e.readUint8();for(t=0;t>7,c[o(634)]=63&i;var u=e[o(597)]();for(r=0;r>4&15,this[r(1066)]=15&t,t=e[r(774)](),this.base_offset_size=t>>4&15,1===this[r(1085)]||2===this[r(1085)]?this[r(619)]=15&t:this[r(619)]=0,this.items=[];var n=0;if(this[r(1085)]<2)n=e[r(597)]();else{if(2!==this.version)throw r(601);n=e[r(163)]()}for(var i=0;i>7,this[t(448)]=1&r})),f[s(305)](s(1249),(function(e){var t=s;if((0===this[t(1085)]||1===this[t(1085)])&&(this.item_ID=e[t(597)](),this.item_protection_index=e.readUint16(),this[t(1147)]=e.readCString(),this[t(184)]=e[t(1158)](),this[t(1349)]=e[t(1158)]()),1===this[t(1085)])return this[t(976)]=e[t(418)](4),void e[t(713)](this[t(532)]+this.size);this[t(1085)]>=2&&(2===this[t(1085)]?this[t(154)]=e.readUint16():3===this[t(1085)]&&(this[t(154)]=e[t(163)]()),this[t(600)]=e[t(597)](),this[t(698)]=e[t(418)](4),this.item_name=e[t(1158)](),this[t(698)]===t(848)?(this[t(184)]=e[t(1158)](),this[t(1349)]=e[t(1158)]()):this[t(698)]===t(296)&&(this.item_uri_type=e[t(1158)]()))})),f.createFullBoxCtor(s(1347),(function(e){var t,r,n=s;for(entry_count=e[n(163)](),this[n(1002)]=[],t=0;t>7==1,1&this[n(1239)]?c.property_index=(127&a)<<8|e.readUint8():c.property_index=127&a}}})),f[s(305)](s(392),(function(e){var t,r,n=s;for(this.references=[];e.getPosition()>7,i[t(1344)]=127&o,i[t(1344)]){case 0:i.grouping_type=e[t(418)](4);break;case 1:i[t(518)]=e[t(418)](4),i[t(1331)]=e[t(163)]();break;case 2:case 3:break;case 4:i[t(640)]=e[t(163)]()}}})),f[s(222)](s(461),(function(e){var t=s;this[t(453)]=e[t(597)]()})),f[s(222)](s(373),(function(e){var t=s;this[t(623)]=e[t(163)](),this[t(192)]=e[t(163)]()})),h.prototype[s(1084)]=function(){return"("+this.x+","+this.y+")"},f[s(222)](s(590),(function(e){var t=s;this[t(200)]=[],this[t(200)][0]=new h(e[t(597)](),e[t(597)]()),this[t(200)][1]=new h(e[t(597)](),e[t(597)]()),this[t(200)][2]=new h(e[t(597)](),e[t(597)]()),this[t(427)]=new h(e.readUint16(),e[t(597)]()),this[t(1219)]=e.readUint32(),this[t(1322)]=e[t(163)]()})),f[s(305)](s(659),(function(e){var t=s;1==this[t(1085)]?(this[t(990)]=e.readUint64(),this[t(389)]=e[t(1244)](),this[t(859)]=e[t(163)](),this[t(533)]=e[t(1244)]()):(this[t(990)]=e.readUint32(),this.modification_time=e[t(163)](),this[t(859)]=e[t(163)](),this[t(533)]=e[t(163)]()),this[t(1216)](e),e[t(597)]()})),f[s(305)](s(746),(function(e){var t=s;1&this[t(1239)]&&(this.version=1),1==this[t(1085)]?this.fragment_duration=e.readUint64():this[t(720)]=e[t(163)]()})),f[s(305)]("meta",(function(e){var t=s;this.boxes=[],f[t(370)][t(1260)].parse[t(259)](this,e)})),f[s(305)](s(565),(function(e){var t=s;this[t(1274)]=e[t(163)]()})),f[s(305)]("mfro",(function(e){this[s(484)]=e.readUint32()})),f.createFullBoxCtor(s(432),(function(e){var t=s;this[t(706)]=e[t(774)]()})),f[s(305)](s(298),(function(e){var t=s;1==this[t(1085)]?(this[t(990)]=e[t(1244)](),this[t(389)]=e[t(1244)](),this[t(859)]=e.readUint32(),this[t(533)]=e[t(1244)]()):(this[t(990)]=e[t(163)](),this[t(389)]=e.readUint32(),this[t(859)]=e[t(163)](),this.duration=e[t(163)]()),this[t(754)]=e[t(163)](),this[t(759)]=e.readUint16()>>8,e[t(597)](),e[t(551)](2),this[t(695)]=e.readUint32Array(9),e[t(551)](6),this[t(1035)]=e[t(163)]()})),f[s(222)](s(511),(function(e){var t=s;this[t(595)]=e[t(163)]()})),f[s(222)]("nump",(function(e){this.packetssent=e.readUint64()})),f[s(305)](s(180),(function(e){var t=s,r=e[t(163)]();this[t(450)]=[];for(var n=0;n0){var r=e[t(163)]();this.kid=[];for(var n=0;n0&&(this[t(883)]=e[t(554)](i))})),f[s(305)](s(162),(function(e){var t=s;this[t(301)]=e[t(163)](),this[t(1185)]=e[t(163)]()})),f[s(305)]("enof",(function(e){var t=s;this[t(301)]=e[t(163)](),this.height=e[t(163)]()})),f.createFullBoxCtor(s(766),(function(e){var t=s;this.width=e.readUint32(),this[t(1185)]=e[t(163)]()})),f.createContainerBoxCtor(s(835),null,["clef","prof",s(1309)]),f[s(222)]("rtp ",(function(e){var t=s;this[t(167)]=e[t(418)](4),this[t(166)]=e.readString(this.size-this[t(1305)]-4)})),f[s(305)]("saio",(function(e){var t=s;1&this.flags&&(this[t(998)]=e[t(163)](),this[t(785)]=e[t(163)]());var r=e.readUint32();this.offset=[];for(var n=0;n>7,this[t(1314)]=r>>6&1,this[t(630)]&&(this[t(533)]=e[t(163)]()),this.avgRateFlag&&(this[t(272)]=e[t(774)](),this[t(488)]=e[t(597)](),this[t(256)]=e[t(597)]()),this[t(528)]=[];for(var n=e[t(774)](),i=0;i>7,this[t(876)]=127&r})),f[s(609)](s(912),(function(e){var t=s;if(this.operation_point_count=e.readUint16(),this[t(1173)]!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)this[t(883)]=e[t(554)](this.description_length-2);else{if(1===this[t(1289)])this[t(452)]=e[t(597)]();else{this[t(452)]=[],this.available_bitrate=[];for(var r=0;r>4,this[t(402)]=15&r,this[t(979)]=e[t(774)](),this[t(1386)]=e[t(774)](),this[t(258)]=f[t(913)](e),this[t(1120)]=0,this[t(1067)]=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e[t(774)](),this[t(1067)]=e[t(554)](this.constant_IV_size))})),f.createSampleGroupCtor(s(826),(function(e){})),f[s(609)](s(273),(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),f.createSampleGroupCtor("tele",(function(e){var t=s,r=e[t(774)]();this[t(1178)]=r>>7})),f[s(609)]("tsas",(function(e){})),f[s(609)](s(1292),(function(e){})),f[s(609)](s(362),(function(e){})),f[s(305)](s(1072),(function(e){var t=s;this[t(518)]=e[t(418)](4),1===this[t(1085)]?this.grouping_type_parameter=e.readUint32():this[t(1331)]=0,this[t(325)]=[];for(var r=e[t(163)](),n=0;n>6,this[r(531)][i]=t>>4&3,this[r(510)][i]=t>>2&3,this[r(223)][i]=3&t})),f[s(305)](s(1029)),f[s(305)]("sgpd",(function(e){var t=s;this[t(518)]=e[t(418)](4),o[t(390)]("BoxParser",t(412)+this[t(518)]),1===this[t(1085)]?this[t(322)]=e[t(163)]():this[t(322)]=0,this.version>=2&&(this[t(1210)]=e[t(163)]()),this.entries=[];for(var r=e[t(163)](),n=0;n>31&1,i.referenced_size=2147483647&o,i[t(477)]=e[t(163)](),o=e[t(163)](),i[t(1049)]=o>>31&1,i[t(348)]=o>>28&7,i[t(966)]=268435455&o}})),f.SingleItemTypeReferenceBox=function(e,t,r,n){var i=s;f[i(160)][i(259)](this,e,t),this[i(1305)]=r,this[i(532)]=n},f[s(941)][s(1260)]=new(f[s(160)]),f[s(941)][s(1260)][s(1270)]=function(e){var t=s;this[t(965)]=e[t(597)]();var r=e.readUint16();this[t(516)]=[];for(var n=0;n>4&15,this[n(1266)][t+1]=15&i}else if(8===this.field_size)for(t=0;t0)for(r=0;r>4&15,this.default_skip_byte_block=15&r}this[t(483)]=e[t(774)](),this.default_Per_Sample_IV_Size=e[t(774)](),this[t(752)]=f[t(913)](e),1===this.default_isProtected&&0===this[t(1277)]&&(this[t(318)]=e[t(774)](),this[t(321)]=e.readUint8Array(this[t(318)]))})),f[s(305)](s(1058),(function(e){var t=s;1==this[t(1085)]?this[t(988)]=e[t(1244)]():this[t(988)]=e[t(163)]()})),f[s(305)]("tfhd",(function(e){var t=s,r=0;this[t(1183)]=e[t(163)](),this[t(1098)]-this.hdr_size>r&&this[t(1239)]&f[t(1192)]?(this[t(775)]=e[t(1244)](),r+=8):this[t(775)]=0,this[t(1098)]-this[t(1305)]>r&&this.flags&f.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e[t(163)](),r+=4):this[t(1042)]=0,this[t(1098)]-this[t(1305)]>r&&this[t(1239)]&f[t(784)]?(this[t(330)]=e[t(163)](),r+=4):this[t(330)]=0,this[t(1098)]-this[t(1305)]>r&&this[t(1239)]&f[t(1391)]?(this[t(778)]=e[t(163)](),r+=4):this[t(778)]=0,this[t(1098)]-this[t(1305)]>r&&this.flags&f[t(730)]?(this[t(772)]=e[t(163)](),r+=4):this[t(772)]=0})),f.createFullBoxCtor("tfra",(function(e){var t=s;this[t(560)]=e[t(163)](),e[t(781)]();var r=e.readUint8();this[t(246)]=r>>4&3,this[t(293)]=r>>2&3,this[t(345)]=3&r,this[t(325)]=[];for(var n=e.readUint32(),i=0;i>8,e.readUint16(),this[t(695)]=e[t(1291)](9),this[t(301)]=e[t(163)](),this[t(1185)]=e.readUint32()})),f[s(222)](s(1382),(function(e){var t=s;this[t(934)]=e[t(163)]()})),f[s(222)](s(1177),(function(e){var t=s;this[t(934)]=e[t(163)]()})),f[s(222)]("totl",(function(e){var t=s;this[t(1139)]=e[t(163)]()})),f[s(222)](s(1275),(function(e){this.bytessent=e.readUint32()})),f[s(222)](s(1034),(function(e){var t=s;this[t(1139)]=e[t(1244)]()})),f[s(1377)][s(1260)][s(1270)]=function(e){var t=s;this[t(741)](e),this[t(1027)]=e[t(163)]()},f.createTrackGroupCtor(s(320)),f[s(1342)]=function(e,t,r,n){var i=s;f[i(160)][i(259)](this,e,t),this[i(1305)]=r,this.start=n},f[s(1342)][s(1260)]=new(f[s(160)]),f[s(1342)][s(1260)].parse=function(e){var t=s;this[t(1248)]=e.readUint32Array((this.size-this[t(1305)])/4)},f[s(153)][s(1260)].parse=function(e){for(var t,r,n=s;e[n(459)]()r&&this[t(1239)]&f[t(1019)]?(this.data_offset=e.readInt32(),r+=4):this[t(702)]=0,this[t(1098)]-this[t(1305)]>r&&this[t(1239)]&f[t(552)]?(this.first_sample_flags=e.readUint32(),r+=4):this[t(725)]=0,this.sample_duration=[],this[t(592)]=[],this.sample_flags=[],this[t(771)]=[],this[t(1098)]-this.hdr_size>r)for(var n=0;n>7&1,this[r(311)]=n>>6&1,this[r(415)]=n>>5&1,this[r(978)]=n>>4&1,this[r(308)]=n>>3&1,this[r(671)]=e[r(163)](),this[r(1236)]=e[r(163)](),this[r(955)]=e[r(163)](),this[r(213)]=e.readUint32(),this.num_tile_rows_minus_one=e[r(163)]()}})),f.createFullBoxCtor("url ",(function(e){var t=s;1!==this[t(1239)]&&(this[t(878)]=e[t(1158)]())})),f[s(305)]("urn ",(function(e){var t=s;this.name=e[t(1158)](),this[t(1098)]-this[t(1305)]-this[t(491)][t(195)]-1>0&&(this[t(878)]=e[t(1158)]())})),f[s(1346)](s(585),!0,!1,(function(e){var t=s;this[t(1336)]=e[t(418)](this.size-this.hdr_size).replace(/&/g,"&")[t(697)](//g,">")[t(697)](/"/g,t(540))[t(697)](/'/g,"'")})),f[s(1346)]("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){var t=s;this.system_id=f.parseHex16(e);var r=e[t(163)]();r>0&&(this[t(883)]=e[t(554)](r))})),f.createUUIDBox(s(1015),!0,!1),f[s(1346)]("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){var t=s;this[t(1315)]=e[t(781)](),this[t(1021)]=e[t(774)](),this[t(752)]=f[t(913)](e)})),f[s(1346)](s(642),!0,!1,(function(e){var t=s;this[t(652)]=e[t(774)](),this[t(325)]=[];for(var r=0;r>4,this[r(205)]=t>>1&7,this[r(1225)]=1&t,this[r(1101)]=e.readUint8(),this[r(1073)]=e[r(774)](),this[r(1303)]=e[r(774)](),this[r(1281)]=e[r(597)](),this[r(928)]=e[r(554)](this[r(1281)])):(this[r(793)]=e[r(774)](),this[r(1152)]=e.readUint8(),t=e[r(774)](),this[r(981)]=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this[r(205)]=t>>4&15,this[r(489)]=t>>1&7,this[r(1225)]=1&t,this[r(1281)]=e[r(597)](),this[r(928)]=e[r(554)](this[r(1281)]))})),f[s(222)](s(1294),(function(e){var t=s;this[t(1138)]=e[t(418)](this[t(1098)]-this[t(1305)])})),f[s(305)](s(1162),(function(e){var t,r,n=s,i={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){var t=Mo;this[t(933)]=e[t(774)](),this[t(1129)]=8},stream_read_2_bytes:function(e){this[Mo(933)]=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=Mo,r=this[t(933)]>>this[t(1129)]-e&(1<1){for(i.stream_read_1_bytes(e),this[n(637)]=0,r=this[n(248)]-2;r>=0;--r){var c=i[n(1296)](1);this[n(637)]|=c<1;++r)i[n(1296)](1);for(this[n(1201)]=[],r=this.num_sublayers-2;r>=0;--r)this[n(637)]&1<>=1;r+=f.decimalToHex(i,0),r+=".",0===this[t(1231)][t(576)]?r+="L":r+="H",r+=this[t(1231)][t(628)];var o=!1,a="";for(e=5;e>=0;e--)(this[t(1231)][t(1253)][e]||o)&&(a="."+f[t(800)](this[t(1231)].general_constraint_indicator[e],0)+a,o=!0);r+=a}return r},f[s(1378)][s(1260)].getCodec=f[s(1062)].prototype.getCodec=function(){var e,t=s,r=f[t(182)][t(1260)][t(984)][t(259)](this);if(this.vvcC){r+="."+this[t(1162)][t(663)],this.vvcC.general_tier_flag?r+=".H":r+=".L",r+=this[t(1162)][t(628)];var n="";if(this[t(1162)].general_constraint_info){var i,o=[],a=0;for(a|=this.vvcC[t(909)]<<7,a|=this.vvcC[t(1329)]<<6,e=0;e>2&63,o[t(818)](a),a&&(i=e),a=this[t(1162)][t(629)][e]>>2&3;if(void 0===i)n=t(806);else{n=".C";var c=t(413),u=0,l=0;for(e=0;e<=i;++e)for(u=u<<8|o[e],l+=8;l>=5;){n+=c[u>>l-5&31],u&=(1<<(l-=5))-1}l&&(n+=c[31&(u<<=5-l)])}}r+=n}return r},f[s(458)][s(1260)][s(984)]=function(){var e=s,t=f[e(182)][e(1260)][e(984)][e(259)](this);if(this[e(1106)]&&this.esds[e(694)]){var r=this[e(1106)][e(694)][e(980)](),n=this[e(1106)][e(694)][e(228)]();return t+"."+f[e(800)](r)+(n?"."+n:"")}return t},f[s(891)][s(1260)][s(984)]=function(){var e=s,t=f[e(182)][e(1260)].getCodec[e(259)](this);return this[e(1095)]?t+"."+this[e(1095)]:t},f[s(474)].prototype[s(984)]=f[s(1008)].prototype[s(984)]=function(){var e=s,t=f[e(182)][e(1260)].getCodec[e(259)](this),r=this[e(1083)].level;0==r&&(r="00");var n=this.vpcC[e(981)];return 8==n&&(n="08"),t+".0"+this.vpcC.profile+"."+r+"."+n},f[s(1070)].prototype.getCodec=function(){var e,t=s,r=f[t(182)][t(1260)][t(984)][t(259)](this),n=this[t(1223)][t(723)];return n<10&&(n="0"+n),2===this[t(1223)][t(1184)]&&1===this[t(1223)][t(792)]?e=1===this[t(1223)][t(999)]?"12":"10":this.av1C.seq_profile<=2&&(e=1===this[t(1223)][t(792)]?"10":"08"),r+"."+this[t(1223)][t(1184)]+"."+n+(this[t(1223)][t(1235)]?"H":"M")+"."+e},f[s(160)][s(1260)][s(852)]=function(e,t){var r=s;this[r(1098)]+=8,this[r(1098)]>u&&(this.size+=8),this[r(1218)]===r(614)&&(this[r(1098)]+=16),o[r(390)]("BoxWriter",r(1112)+this[r(1218)]+r(773)+this[r(1098)]+r(953)+e[r(459)]()+(t||"")),this[r(1098)]>u?e[r(758)](1):(this[r(257)]=e[r(459)](),e.writeUint32(this.size)),e[r(1242)](this[r(1218)],null,4),this.type===r(614)&&e.writeUint8Array(this[r(614)]),this.size>u&&e.writeUint64(this[r(1098)])},f.FullBox[s(1260)][s(852)]=function(e){var t=s;this[t(1098)]+=4,f[t(160)].prototype.writeHeader.call(this,e," v="+this.version+" f="+this[t(1239)]),e.writeUint8(this.version),e[t(1079)](this.flags)},f[s(160)][s(1260)][s(1251)]=function(e){var t=s;"mdat"===this[t(1218)]?this.data&&(this[t(1098)]=this.data.length,this[t(852)](e),e.writeUint8Array(this[t(883)])):(this[t(1098)]=this[t(883)]?this[t(883)].length:0,this[t(852)](e),this[t(883)]&&e[t(220)](this.data))},f.ContainerBox[s(1260)][s(1251)]=function(e){var t=s;this.size=0,this[t(852)](e);for(var r=0;r=2&&e[n(758)](this[n(1042)]),e.writeUint32(this[n(325)][n(195)]),t=0;t0)for(t=0;t+1r?1:0,this[t(1239)]=0,this.size=4,1===this.version&&(this.size+=4),this[t(852)](e),1===this[t(1085)]?e.writeUint64(this.baseMediaDecodeTime):e[t(758)](this.baseMediaDecodeTime)},f[s(880)][s(1260)][s(1251)]=function(e){var t=s;this[t(1085)]=0,this[t(1098)]=4,this[t(1239)]&f[t(1192)]&&(this[t(1098)]+=8),this.flags&f[t(810)]&&(this[t(1098)]+=4),this[t(1239)]&f[t(784)]&&(this[t(1098)]+=4),this[t(1239)]&f[t(1391)]&&(this.size+=4),this[t(1239)]&f[t(730)]&&(this[t(1098)]+=4),this[t(852)](e),e[t(758)](this[t(1183)]),this.flags&f[t(1192)]&&e[t(513)](this[t(775)]),this.flags&f[t(810)]&&e.writeUint32(this[t(1042)]),this[t(1239)]&f[t(784)]&&e[t(758)](this[t(330)]),this[t(1239)]&f[t(1391)]&&e[t(758)](this[t(778)]),this[t(1239)]&f[t(730)]&&e[t(758)](this.default_sample_flags)},f[s(863)].prototype[s(1251)]=function(e){var t=s;this[t(1085)]=0,this[t(1098)]=80,this[t(852)](e),e.writeUint32(this[t(990)]),e.writeUint32(this.modification_time),e.writeUint32(this[t(1183)]),e[t(758)](0),e[t(758)](this[t(533)]),e[t(758)](0),e[t(758)](0),e[t(1355)](this[t(1009)]),e[t(1355)](this[t(935)]),e[t(1355)](this.volume<<8),e[t(377)](0),e[t(893)](this[t(695)]),e.writeUint32(this.width),e.writeUint32(this[t(1185)])},f[s(1141)].prototype[s(1251)]=function(e){var t=s;this[t(1085)]=0,this[t(1239)]=0,this[t(1098)]=20,this[t(852)](e),e[t(758)](this[t(1183)]),e[t(758)](this[t(1042)]),e[t(758)](this[t(330)]),e[t(758)](this.default_sample_size),e[t(758)](this[t(772)])},f[s(1156)][s(1260)][s(1251)]=function(e){var t=s;this[t(1085)]=0,this.size=4,this.flags&f[t(1019)]&&(this[t(1098)]+=4),this[t(1239)]&f[t(552)]&&(this.size+=4),this[t(1239)]&f[t(313)]&&(this[t(1098)]+=4*this[t(1166)][t(195)]),this[t(1239)]&f[t(760)]&&(this[t(1098)]+=4*this[t(592)].length),this[t(1239)]&f.TRUN_FLAGS_FLAGS&&(this[t(1098)]+=4*this[t(896)][t(195)]),this[t(1239)]&f.TRUN_FLAGS_CTS_OFFSET&&(this[t(1098)]+=4*this[t(771)][t(195)]),this[t(852)](e),e.writeUint32(this[t(379)]),this[t(1239)]&f[t(1019)]&&(this[t(911)]=e[t(459)](),e[t(607)](this[t(702)])),this[t(1239)]&f.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var r=0;r-1||e[r]instanceof f.Box||t[r]instanceof f[n(160)]||typeof e[r]===n(690)||void 0===t[r]||typeof e[r]===n(240)||typeof t[r]===n(240)||e[n(1081)]&&e.subBoxNames[n(1212)](r[n(294)](0,4))>-1||t[n(1081)]&&t[n(1081)][n(1212)](r[n(294)](0,4))>-1||r===n(883)||r===n(532)||r===n(1098)||"creation_time"===r||"modification_time"===r||f[n(744)][n(1212)](r)>-1||e[r]===t[r]))return!1;return!0},f[s(368)]=function(e,t){var r=s;if(!f[r(310)](e,t))return!1;for(var n=0;n=t?e:new Array(t-e.length+1)[n(890)](r)+e}function o(e){var t=Mo,r=Math[t(653)](e/3600),n=Math[t(653)]((e-3600*r)/60),s=Math[t(653)](e-3600*r-60*n),o=Math[t(653)](1e3*(e-3600*r-60*n-s));return i(r,2)+":"+i(n,2)+":"+i(s,2)+"."+i(o,3)}for(var a=this.parseSample(r),c="",u=0;u1)for(t=1;t-1&&this.fragmentedTracks[t(1116)](r,1)},_[s(1260)][s(1123)]=function(e,t,r){var n=s,i=this.getTrackById(e);if(i){var o={};this[n(1153)][n(818)](o),o.id=e,o[n(932)]=t,o.trak=i,i[n(1157)]=0,o.nb_samples=1e3,o[n(867)]=[],r&&r.nbSamples&&(o.nb_samples=r[n(1137)])}},_[s(1260)][s(380)]=function(e){for(var t=s,r=-1,n=0;n-1&&this.extractedTracks[t(1116)](r,1)},_[s(1260)][s(1270)]=function(){var e,t,r=s;if(!this[r(169)]||this[r(169)]())for(;;){if(this[r(828)]&&this.hasIncompleteMdat()){if(this[r(328)]())continue;return}if(this[r(1059)]&&this[r(1059)](),(e=f[r(445)](this[r(1151)],false))[r(372)]===f[r(855)]){if(this[r(825)]){if(this[r(825)](e))continue;return}return}var n;switch(n=(t=e[r(779)])[r(1218)]!==r(614)?t.type:t[r(614)],this.boxes.push(t),n){case"mdat":this[r(314)][r(818)](t);break;case r(658):this[r(721)].push(t);break;case r(1114):this.moovStartFound=!0,0===this[r(314)][r(195)]&&(this[r(735)]=!0);default:this[n],this[n]=t}this.updateUsedBytes&&this[r(456)](t,e)}},_[s(1260)].checkBuffer=function(e){var t=s;if(null==e)throw t(926);if(void 0===e[t(359)])throw t(969);return 0===e[t(546)]?(this[t(1151)][t(1348)](),!1):(e[t(455)]=0,this[t(1151)][t(986)](e),this.stream.logBufferLevel(),!!this.stream[t(485)]())},_[s(1260)][s(1317)]=function(e,t){var r,n=s;if(this[n(1149)](e))return this.parse(),this[n(703)]&&!this.moovStartSent&&(this[n(1100)]=!0,this[n(561)]&&this[n(561)]()),this[n(1114)]?(!this.sampleListBuilt&&(this.buildSampleLists(),this[n(441)]=!0),this[n(496)](),this[n(1330)]&&!this.readySent&&(this.readySent=!0,this[n(1330)](this[n(908)]())),this[n(1103)](t),this.nextSeekPosition?(r=this[n(686)],this[n(686)]=void 0):r=this[n(398)],this[n(1151)][n(241)]&&(r=this.stream[n(241)](r))):r=this[n(398)]?this.nextParsePosition:0,this.sidx&&this[n(333)]&&!this[n(747)]&&(this.onSidx(this[n(947)]),this[n(747)]=!0),this.meta&&(this[n(151)]&&!this.itemListBuilt&&(this[n(151)](),this[n(791)]=!0),this[n(1023)]&&this[n(1023)](this.onItem)),this[n(1151)][n(1351)]&&(this[n(1151)][n(1348)](),this[n(1151)][n(1351)](),this[n(1151)][n(1348)](!0)),r},_[s(1260)][s(908)]=function(){var e,t,r,n,i,o,a=s,c={},u=new Date(a(672))[a(1107)]();if(this[a(1114)])for(c[a(1006)]=!0,c[a(533)]=this[a(1114)][a(298)][a(533)],c[a(859)]=this[a(1114)][a(298)].timescale,c[a(839)]=null!=this[a(1114)].mvex,c[a(839)]&&this[a(1114)][a(1016)][a(746)]&&(c[a(720)]=this.moov[a(1016)].mehd[a(720)]),c.isProgressive=this[a(735)],c[a(352)]=null!=this[a(1114)][a(1004)],c[a(1360)]=[],c.brands[a(818)](this[a(676)][a(549)]),c[a(1360)]=c.brands[a(626)](this.ftyp[a(206)]),c[a(515)]=new Date(u+1e3*this[a(1114)][a(298)].creation_time),c[a(383)]=new Date(u+1e3*this[a(1114)][a(298)][a(389)]),c.tracks=[],c[a(557)]=[],c[a(786)]=[],c[a(633)]=[],c[a(500)]=[],c[a(1113)]=[],c[a(1325)]=[],e=0;e0?c[a(848)]+='video/mp4; codecs="':c[a(557)]&&c[a(557)][a(195)]>0?c[a(848)]+=a(1298):c[a(848)]+='application/mp4; codecs="',e=0;e=r[n(867)][n(195)])&&(this[n(1080)]&&this[n(1080)](i.id,i[n(932)],i[n(1208)][n(571)],r[n(1157)],e||r.nextSample>=r[n(867)][n(195)]),i[n(1208)]=null,i!==this[n(436)][t]))break}}if(null!==this[n(1307)])for(t=0;t=r.samples[n(195)])&&(o.debug(n(335),n(1109)+c.id+n(1145)+r.nextSample),this[n(1307)]&&this[n(1307)](c.id,c[n(932)],c[n(867)]),c[n(867)]=[],c!==this[n(1153)][t]))break}}}},_.prototype[s(1018)]=function(e){var t=s,r=this[t(922)](e,!0);return r[t(195)]?r[0]:null},_[s(1260)][s(922)]=function(e,t){var r=s,n=[];return _[r(438)][r(259)](this,e,n,t),n},_[s(438)]=function(e,t,r){var n=s;for(var i in this[n(1218)]&&this[n(1218)]==e&&t[n(818)](this),this[n(237)]){if(t[n(195)]&&r)return;_[n(438)][n(259)](this[n(237)][i],e,t,r)}},_.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},_[s(1260)][s(599)]=function(e,t){var r=this[s(1195)](e);return this.getSample(r,t)},_[s(1260)][s(824)]=function(e,t,r){var n=s,i=this.getTrackById(e);i[n(624)]||(i[n(624)]=0);for(var o=i[n(624)];oe*i[a(859)]){u=n-1;break}t&&i[a(728)]&&(c=n)}for(t&&(u=c),e=r[a(867)][u][a(267)],r[a(1157)]=u;r[a(867)][u].alreadyRead===r.samples[u][a(1098)]&&r[a(867)][u+1];)u++;return{offset:r.samples[u][a(1045)]+r[a(867)][u].alreadyRead,time:e/o}},_[s(1260)][s(868)]=function(e){var t,r=s;return e[r(867)]?((t=e[r(867)][e.samples.length-1])[r(267)]+t[r(533)])/t[r(859)]:1/0},_[s(1260)][s(713)]=function(e,t){var r,n,i,o=s,a=this[o(1114)],c={offset:1/0,time:1/0};if(this.moov){for(i=0;ithis[o(868)](r)||((n=this[o(411)](e,t,r))[o(1045)]-1){u=l;break}switch(u){case t(1007):if(o[t(632)](t(371)).set(t(232),0).set(t(644),[0,0,0]),c[t(1400)](t(301),r[t(301)]).set(t(1185),r[t(1185)])[t(1400)](t(1127),72<<16)[t(1400)](t(594),72<<16)[t(1400)]("frame_count",1).set(t(1128),r[t(1218)]+t(495))[t(1400)](t(905),24),r[t(770)]){var p=new f.avcCBox;p[t(1270)](new a(r.avcDecoderConfigRecord)),c[t(915)](p)}else if(r[t(627)]){var m=new(f[t(1044)]);m[t(1270)](new a(r[t(627)])),c[t(915)](m)}break;case t(879):o[t(632)](t(497))[t(1400)](t(430),r[t(430)]||0),c.set("channel_count",r[t(688)]||2)[t(1400)](t(707),r.samplesize||16)[t(1400)](t(538),r[t(538)]||65536);break;case t(400):o[t(632)](t(598));break;case"Subtitle":if(o[t(632)](t(860)),r[t(1218)]===t(509))c[t(1400)](t(887),r[t(887)]||"nonamespace").set(t(276),r.schema_location||"")[t(1400)]("auxiliary_mime_types",r[t(451)]||"");break;case"Metadata":o[t(632)](t(1143));break;case"System":o.add(t(1143));break;default:o.add("nmhd")}r[t(1261)]&&c[t(915)](r.description),r[t(985)]&&r[t(985)][t(647)]((function(e){c[t(915)](e)})),o[t(632)](t(1229))[t(632)](t(426)).addEntry((new f["url Box"])[t(1400)](t(1239),1));var v=o[t(632)](t(302));return v[t(632)]("stsd").addEntry(c),v[t(632)](t(1179)).set(t(608),[])[t(1400)](t(460),[]),v[t(632)](t(1361)).set(t(475),[])[t(1400)](t(764),[]).set(t(507),[]),v[t(632)](t(336))[t(1400)](t(972),[]),v[t(632)](t(226)).set("sample_sizes",[]),this[t(1114)][t(1016)][t(632)](t(457))[t(1400)]("track_id",r.id)[t(1400)]("default_sample_description_index",r.default_sample_description_index||1)[t(1400)]("default_sample_duration",r[t(330)]||0)[t(1400)](t(778),r[t(778)]||0)[t(1400)]("default_sample_flags",r[t(772)]||0),this[t(172)](n),r.id}},f[s(160)][s(1260)][s(1163)]=function(e){var t=s,r=e||new c;r[t(300)]=c[t(306)],this[t(1251)](r)},_.prototype[s(1401)]=function(e,t,r){var n=s,i=r||{},o={},a=this.getTrackById(e);if(null!==a){o.number=a[n(867)].length,o.track_id=a.tkhd[n(1183)],o[n(859)]=a.mdia.mdhd.timescale,o[n(480)]=i[n(507)]?i[n(507)]-1:0,o[n(1261)]=a[n(235)][n(1047)][n(302)][n(168)].entries[o[n(480)]],o[n(883)]=t,o[n(1098)]=t[n(546)],o.alreadyRead=o.size,o[n(533)]=i[n(533)]||1,o[n(267)]=i[n(267)]||0,o[n(1269)]=i[n(1269)]||0,o.is_sync=i[n(728)]||!1,o[n(376)]=i[n(376)]||0,o[n(253)]=i[n(253)]||0,o[n(587)]=i[n(587)]||0,o[n(709)]=i[n(709)]||0,o[n(176)]=i[n(176)]||0,o.offset=0,o[n(603)]=i[n(603)],a[n(867)][n(818)](o),a[n(444)]+=o[n(1098)],a.samples_duration+=o[n(533)],void 0===a.first_dts&&(a[n(823)]=i.dts),this[n(1103)]();var c=this.createSingleSampleMoof(o);return this[n(915)](c),c.computeSize(),c[n(616)][0][n(768)][0][n(702)]=c.size+8,this.add("mdat")[n(883)]=new Uint8Array(t),o}},_[s(1260)][s(921)]=function(e){var t=s,r=0;r=e[t(728)]?1<<25:65536;var n=new(f[t(945)]);n[t(632)](t(565)).set(t(1274),this[t(724)]),this[t(724)]++;var i=n.add("traf"),o=this[t(1195)](e[t(1183)]);return i.add(t(261))[t(1400)](t(1183),e[t(1183)])[t(1400)](t(1239),f[t(1117)]),i[t(632)](t(1058))[t(1400)](t(988),e[t(1269)]-(o[t(823)]||0)),i[t(632)](t(417))[t(1400)](t(1239),f[t(1019)]|f[t(313)]|f[t(760)]|f[t(1217)]|f[t(782)])[t(1400)](t(702),0).set(t(725),0)[t(1400)](t(379),1)[t(1400)](t(1166),[e[t(533)]])[t(1400)](t(592),[e[t(1098)]]).set(t(896),[r])[t(1400)](t(771),[e.cts-e[t(1269)]]),n},_[s(1260)][s(329)]=0,_[s(1260)][s(660)]=0,_[s(1260)].resetTables=function(){var e,t,r,n,i,o,a=s;for(this[a(1318)]=this[a(1114)][a(298)].duration,this.moov.mvhd[a(533)]=0,e=0;e=2&&(u=i[a][l(518)]+"/0",(c=new d(i[a].grouping_type,0))[l(857)]=!0,!t[l(312)][u]&&(t[l(312)][u]=c))}else for(a=0;a=2&&(u=n[a].grouping_type+"/0",c=new d(n[a][l(518)],0),!e.sample_groups_info[u]&&(e[l(312)][u]=c))},_[s(897)]=function(e,t,r,n){var i,o,a=s;for(i in t[a(819)]=[],n){var c;if(t[a(819)][i]={},t[a(819)][i][a(518)]=n[i][a(518)],t[a(819)][i].grouping_type_parameter=n[i][a(1331)],r>=n[i].last_sample_in_run&&(n[i][a(419)]<0&&(n[i].last_sample_in_run=0),n[i].entry_index++,n[i][a(1374)]<=n[i][a(1072)].entries.length-1&&(n[i].last_sample_in_run+=n[i][a(1072)].entries[n[i].entry_index][a(379)])),n[i].entry_index<=n[i][a(1072)][a(325)].length-1?t.sample_groups[i][a(1338)]=n[i].sbgp[a(325)][n[i][a(1374)]].group_description_index:t[a(819)][i][a(1338)]=-1,0!==t[a(819)][i].group_description_index)c=n[i][a(682)]?n[i].fragment_description:n[i][a(1261)],t[a(819)][i].group_description_index>0?(o=t[a(819)][i][a(1338)]>65535?(t.sample_groups[i][a(1338)]>>16)-1:t[a(819)][i][a(1338)]-1,c&&o>=0&&(t.sample_groups[i][a(1261)]=c.entries[o])):c&&c[a(1085)]>=2&&c[a(1210)]>0&&(t.sample_groups[i][a(1261)]=c[a(325)][c[a(1210)]-1])}},_[s(367)]=function(e,t,r){var n=s;t&&(e?(t[n(376)]=e[n(376)][r],t[n(253)]=e[n(531)][r],t.is_depended_on=e.sample_is_depended_on[r],t[n(709)]=e.sample_has_redundancy[r]):(t[n(376)]=0,t[n(253)]=0,t.is_depended_on=0,t[n(709)]=0))},_[s(1260)][s(366)]=function(){var e,t,r=s;for(e=0;eb&&(w++,b<0&&(b=0),b+=o[C(608)][w]),t>0?(e.samples[t-1][C(533)]=o[C(460)][w],e[C(787)]+=e[C(867)][t-1][C(533)],T[C(1269)]=e.samples[t-1].dts+e[C(867)][t-1][C(533)]):T[C(1269)]=0,a?(t>=S&&(E++,S<0&&(S=0),S+=a[C(608)][E]),T[C(267)]=e[C(867)][t][C(1269)]+a[C(354)][E]):T[C(267)]=T.dts,c?(t==c[C(622)][I]-1?(T[C(728)]=!0,I++):(T[C(728)]=!1,T[C(176)]=0),l&&l.entries[A][C(745)]+k==t+1&&(T[C(603)]=l.entries[A][C(603)],k+=l.entries[A][C(745)],A++)):T[C(728)]=!0,_[C(367)](e[C(235)][C(1047)][C(302)].sdtp,T,T[C(472)]),T.degradation_priority=h?h[C(191)][t]:0,l&&l[C(325)][A].sample_delta+k==t&&(T[C(603)]=l[C(325)][A][C(603)],k+=l.entries[A].sample_delta),(d[C(195)]>0||f[C(195)]>0)&&_[C(897)](e,T,t,e[C(312)])}t>0&&(e.samples[t-1][C(533)]=Math[C(611)](e[C(235)][C(659)][C(533)]-e.samples[t-1][C(1269)],0),e[C(787)]+=e[C(867)][t-1][C(533)])}},_[s(1260)].updateSampleLists=function(){var e,t,r,n,i,o,a,c,u,l,d,h,p,m,v,y=s;if(void 0!==this.moov)for(;this[y(329)]0&&_[y(183)](h,d,d.sbgps,h[y(235)][y(1047)][y(302)][y(631)],d[y(631)]),t=0;t0?m.dts=h[y(867)][h[y(867)][y(195)]-2][y(1269)]+h.samples[h[y(867)][y(195)]-2][y(533)]:(d[y(1058)]?m[y(1269)]=d[y(1058)][y(988)]:m[y(1269)]=0,h[y(326)]=!0),m[y(267)]=m[y(1269)],g.flags&f[y(782)]&&(m[y(267)]=m[y(1269)]+g[y(771)][r]),v=a,g[y(1239)]&f.TRUN_FLAGS_FLAGS?v=g.sample_flags[r]:0===r&&g.flags&f.TRUN_FLAGS_FIRST_FLAG&&(v=g[y(725)]),m[y(728)]=!(v>>16&1),m[y(376)]=v>>26&3,m[y(253)]=v>>24&3,m[y(587)]=v>>22&3,m[y(709)]=v>>20&3,m[y(176)]=65535&v;var b=!!(d[y(261)][y(1239)]&f.TFHD_FLAG_BASE_DATA_OFFSET),w=!!(d[y(261)][y(1239)]&f[y(1117)]),S=!!(g.flags&f.TRUN_FLAGS_DATA_OFFSET),E=0;E=b?d[y(261)][y(775)]:w?l[y(532)]:0===t?l.start:c,m[y(1045)]=0===t&&0===r?S?E+g[y(702)]:E:c,c=m.offset+m[y(1098)],(d.sbgps[y(195)]>0||d[y(631)].length>0||h[y(235)].minf.stbl[y(478)][y(195)]>0||h[y(235)][y(1047)][y(302)].sgpds[y(195)]>0)&&_[y(897)](h,m,m.number_in_traf,d[y(312)])}}if(d[y(1308)]){h[y(1154)]=!0;var I=d[y(581)];for(t=0;t-1))return null;var u=(r=this.stream[n(820)][a]).byteLength-(i[n(1045)]+i[n(1167)]-r[n(359)]);if(i.size-i[n(1167)]<=u)return o[n(390)](n(335),n(214)+t+n(829)+i[n(1167)]+" offset: "+(i[n(1045)]+i[n(1167)]-r.fileStart)+n(918)+(i[n(1098)]-i[n(1167)])+n(579)+i[n(1098)]+")"),c[n(838)](i[n(883)].buffer,i[n(1167)],r,i.offset+i[n(1167)]-r[n(359)],i[n(1098)]-i.alreadyRead),r.usedBytes+=i[n(1098)]-i[n(1167)],this[n(1151)][n(1348)](),i[n(1167)]=i.size,i;if(0===u)return null;o[n(390)]("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+i[n(1167)]+n(1371)+(i[n(1045)]+i.alreadyRead-r[n(359)])+n(918)+u+n(579)+i[n(1098)]+")"),c.memcpy(i[n(883)][n(571)],i[n(1167)],r,i[n(1045)]+i[n(1167)]-r[n(359)],u),i[n(1167)]+=u,r.usedBytes+=u,this.stream[n(1348)]()}},_[s(1260)].releaseSample=function(e,t){var r=s,n=e[r(867)][t];return n[r(883)]?(this[r(660)]-=n[r(1098)],n.data=null,n.description=null,delete n.degradation_priority,delete n.depends_on,delete n.description_index,delete n.has_redundancy,delete n[r(587)],delete n[r(376)],delete n[r(728)],delete n[r(1335)],delete n[r(281)],delete n[r(859)],delete n[r(267)],delete n.dts,delete n[r(1045)],delete n.size,delete n[r(1183)],delete n[r(533)],n[r(1167)]=0,n[r(1098)]):0},_[s(1260)][s(1205)]=function(){return this[s(660)]},_[s(1260)][s(437)]=function(){var e=s;const t=this[e(1151)].buffers||[];let r=0;return t[e(647)]((t=>{const n=t[e(546)];r+=n})),r},_.prototype[s(996)]=function(){var e,t=s,r="";for(e=0;e0&&(r+=","),r+=this[t(1114)][t(811)][e][t(235)].minf[t(302)][t(168)].entries[0].getCodec()}return r},_.prototype[s(765)]=function(e){var t,r=s;if(!this[r(1114)]||!this.moov.mvex)return null;for(t=0;t0&&(r[n(1397)]=a[n(691)].protections[a[n(700)][n(388)][e][n(874)]-1]),a[n(700)][n(388)][e][n(698)]?r[n(1218)]=a[n(700)][n(388)][e][n(698)]:r.type=n(848),r.content_type=a[n(700)][n(388)][e][n(184)],r[n(1349)]=a[n(700)][n(388)][e][n(1349)];if(a[n(602)])for(e=0;e0&&h[n(1200)]-1-1))return null;var l=(t=this.stream.buffers[u]).byteLength-(a[n(1045)]+a[n(1167)]-t[n(359)]);if(!(a.length-a[n(1167)]<=l))return o[n(390)](n(335),n(1017)+e+n(1313)+i+n(196)+a[n(1167)]+n(1371)+(a[n(1045)]+a[n(1167)]-t[n(359)])+n(918)+l+n(251)+a[n(195)]+n(1285)+r[n(1098)]+")"),c[n(838)](r.data[n(571)],r.alreadyRead,t,a[n(1045)]+a[n(1167)]-t[n(359)],l),a[n(1167)]+=l,r.alreadyRead+=l,t[n(455)]+=l,this[n(1151)][n(1348)](),null;o[n(390)](n(335),n(1017)+e+" extent #"+i+" data (alreadyRead: "+a[n(1167)]+n(1371)+(a.offset+a[n(1167)]-t[n(359)])+n(918)+(a.length-a.alreadyRead)+n(251)+a[n(195)]+n(1285)+r[n(1098)]+")"),c[n(838)](r.data[n(571)],r[n(1167)],t,a[n(1045)]+a[n(1167)]-t.fileStart,a[n(195)]-a[n(1167)]),t[n(455)]+=a[n(195)]-a[n(1167)],this[n(1151)][n(1348)](),r[n(1167)]+=a.length-a[n(1167)],a[n(1167)]=a[n(195)]}}return r[n(1167)]===r[n(1098)]?r:null},_[s(1260)][s(1367)]=function(e){var t=s,r=this.items[e];if(r[t(883)]){this[t(1031)]-=r[t(1098)],r[t(883)]=null,r[t(1167)]=0;for(var n=0;n0?this[i(1114)].traks[e][i(867)][0].duration:0),t[i(818)](n)}return t},_.prototype[s(1168)]=function(){var e=s,t={};return t[e(1114)]=this[e(1114)],this[e(1114)]&&this[e(1114)][e(811)]&&this[e(1114)][e(811)].length>1&&(t.moovAudioNum=this[e(1114)][e(811)][0].samples.length,t[e(1136)]=this[e(1114)][e(811)][1].samples[e(195)]),t},f.Box[s(1260)][s(239)]=function(e){var t=s;this[t(1098)]+=8,this.size>u&&(this.size+=8),this[t(1218)]===t(614)&&(this.size+=16),e.log(e[t(244)]+t(1240)+this.size),e[t(1093)](e[t(244)]+t(277)+this[t(1218)])},f[s(343)][s(1260)].printHeader=function(e){var t=s;this[t(1098)]+=4,f.Box[t(1260)][t(239)][t(259)](this,e),e.log(e[t(244)]+t(525)+this[t(1085)]),e.log(e[t(244)]+t(534)+this[t(1239)])},f[s(160)].prototype.print=function(e){this.printHeader(e)},f[s(370)][s(1260)][s(670)]=function(e){var t=s;this[t(239)](e);for(var r=0;r>8)),e[t(1093)](e.indent+t(331)+this[t(695)][t(890)](", ")),e[t(1093)](e[t(244)]+t(1108)+this[t(1035)])},f.tkhdBox[s(1260)][s(670)]=function(e){var t=s;f[t(343)][t(1260)].printHeader.call(this,e),e.log(e.indent+t(1131)+this[t(990)]),e[t(1093)](e.indent+t(363)+this[t(389)]),e[t(1093)](e[t(244)]+t(701)+this[t(1183)]),e[t(1093)](e[t(244)]+t(664)+this[t(533)]),e.log(e.indent+t(1148)+(this[t(759)]>>8)),e[t(1093)](e[t(244)]+"matrix: "+this[t(695)][t(890)](", ")),e.log(e.indent+t(391)+this.layer),e[t(1093)](e[t(244)]+t(655)+this[t(935)]),e[t(1093)](e[t(244)]+t(1287)+this[t(301)]),e.log(e[t(244)]+"height: "+this.height)};var g={createFile:function(e,t){var r=void 0===e||e,n=new _(t);return n.discardMdatData=!r,n}};"object"!==s(690)&&(t[s(204)]=g.createFile)}));function Mo(e,t){var r=Po();return(Mo=function(e,t){return r[e-=151]})(e,t)}function Po(){var e=["dvhe"," for sample ","getInt8","item_name","volume: ","checkBuffer","Not enough bytes left in the parent box to parse a new box","stream","level","extractedTracks","has_fragment_subsamples","avgBitrate","trunBox","nextSample","readCString","fr-FR","isEos","vp09","vvcC","computeSize","primaryGChromaticity_x","<","sample_duration","alreadyRead","getPerformanceInfo","op_index","dav1","has_unparsed_data"," with new size ","description_length","ptl_frame_only_constraint_flag","component_little_endian","751637pvTyST","tmin","level_independently_decodable","stts","data_rate","stscBox","tyco","track_id","seq_profile","height","split","ChannelMappingFamily","cttsBox","items","base_offset_size","schi","TFHD_FLAG_BASE_DATA_OFFSET","whitePointChromaticity_x",'"; profiles="',"getTrackById","lastBoxStartPosition","isHint","kid","emsgBox","property_index","sublayer_level_idc","min_spatial_segmentation_idc","bit_depth_luma_minus8","dac3","getAllocatedSampleDataSize","Version","_realloc","segmentStream","configurationVersion","default_group_description_index","kinds","indexOf","ASCII","stss","udta","parseLanguage","TRUN_FLAGS_FLAGS","type","max_display_mastering_luminance","tag","elngBox","construction_method","av1C","pdin","videoFullRangeFlag","media_rate_integer","Allocating item #","component_types","dinf","AVCLevelIndication","hvcC","cmex","range_size","vp08","seq_tier_0","row_align_size","first_offset","_byteLength","flags","size:","sgpd","writeString","component_count","readUint64","error","component_index","getItem","track_ids","infe","default_crypt_byte_block","write","Generating initialization segment","general_constraint_indicator","getUint32","getInt16","6d1d9b0542d544e680e2141daff757b2","traf","System","SLConfigDescriptor","prototype","description","seekPoints","SAMPLE_ENTRY_TYPE_AUDIO","53817odPeNE","compositionEndTime","sample_sizes","acmod","bad_pixels","dts","parse","cmin","writeCString","block_size","sequence_number","tpay","createCommonjsModule","default_Per_Sample_IV_Size","num_dep_sub","scheme_type","transfer_characteristics","codecIntializationDataSize","entity_groups","cleanApertureHeightD","boxCodes"," full item size: ","getWidth","width: ","switch_group","operation_point_count"," sample #","readInt32Array","tscl","ptl_multilayer_enabled_flag","vttC","ind_subs","extract_bits","elstBox",'audio/mp4; codecs="',"compositionStartTime","subSeqDirectionFlag","XMLSubtitlein4Parser","StreamCount","matrixCoefficients","quat_y","hdr_size","vertOffD","onSamples","subs","enof","hdlr","referenced_size","num_total_samples"," extent #","avgRateFlag","default_AlgorithmID","quat_z","appendBuffer","initial_duration","edts","cmpd","ptl_num_sub_profiles","min_display_mastering_luminance","createEncryptedSampleEntryCtor","primaryBChromaticity_y","otherTracks","position","matrix_coefficients","unsetSegmentOptions","ptl_multilayer_enabled","onReady","grouping_type_parameter","documentString","mjpg","timescale: ","moof_number","LiveServerManifest","hSpacing","group_description_index","setUint32","init","DataStream.save: Can't create object URL.","TrackReferenceTypeBox","mhm2","assignment_type","substring","createUUIDBox","ipma","logBufferLevel","content_encoding","focal_length_x","cleanBuffers","SingleItemTypeReferenceBoxLarge","Descriptor","avc2SampleEntry","writeInt16","Adjusting box ","Track created with MP4Box.js","udes","nalu","brands","stsc","discardMdatData","presentation_time","subtitles","SubtitleSampleEntry","writeUint8","releaseItem","focal_length_y","alst","schm"," offset: ","defineProperty","stcoBox","entry_index","to_item_ID","field_size","TrackGroupTypeBox","vvc1SampleEntry","fromCharCodeUint8"," - Length: ","item_id","tmax","prdi","], [","rate: ","Per_Sample_IV_Size","getUint8","crypt_byte_block","SAMPLE_ENTRY_TYPE_VISUAL","styp","TFHD_FLAG_SAMPLE_SIZE","default_sample_info_size","group_id","whitePointChromaticity_y","step_count","ext","protection","encm","ispe","set","addSample","setUint16","ec-3","flattenItemInfo","sample_rate","trefBox","item_ID","vertOffN","20rqGLTE","mapUint8Array","handler","luminanceMax","Box","' and size ","clef","readUint32","test","setSegmentOptions","sdptext","descriptionformat","stsd","restoreParsePosition","ICC_profile","1488588FoAbHi","buildTrakSampleLists","setNextSeekPositionFromSample","addTrack","pow","degradation_priority","readInt32","MetadataSampleEntry","writeFloat32","padb",", column: ","SampleEntry","initSampleGroups","content_type","quat_x","STREAMINFO","trexs","readInt16","mapUint16Array","sbgpBox","priority","bytes","entity_ids","addEntry","length"," partial data (alreadyRead: ","dynamicSize","nb_SPS_nalus","flipArrayEndianness","display_primaries","lang","CoLL","seig","createFile","chromaSubsampling","compatible_brands","readFloat64","chroma_subsampling_y","max_pic_average_light_level","sdtp","fromCharCode","languageString","num_tile_cols_minus_one","Getting sample #","tfdtBox","readFloat32","layerNumber","writeUint16Array","avc4SampleEntry","writeUint8Array","pitm","createBoxCtor","sample_has_redundancy","elst","ccst","stsz","vvcN","getAudioConfig","tx3g","iloc","roll","graphicsmode","mdatBox","stz2","mdia","a1lx","boxes","BoxParser","printHeader","function","getEndFilePositionAfter","Trying to create a new buffer of size: ","sent","indent","j2kH","length_size_of_traf_num","ranges","num_sublayers","sidxBox","cts_shift"," full extent size: ","MP4Box","depends_on","component_format","writeFloat64Array","avgFrameRate","sizePosition","KID","call","xml ","tfhd","media_duration",", size ","component_bit_depth_minus_one","props","u16stringbe","cts","idat","setInt16","int32be","uncC","accurateStatisticsFlag","sync","reference_type","sbpm","schema_location","type:","lengthSizeMinusOne","mdhdBox","nclx","number_in_traf","general_sub_profile_idc","cprt","Position ","findDescriptor","fieldOrdering","int32","system_id","etyp","mhm1","bit_depth_chroma_minus8","cdef","length_size_of_trun_num","slice","CUESHEET","uri ","mapUint32Array","mvhd","ipmas","endianness","width","stbl","bad_rows","item_count","createFullBoxCtor","BIG_ENDIAN","stream_read_2_bytes","pad_unknown","iso4","boxEqualFields","block_pad_lsb","sample_groups_info","TRUN_FLAGS_DURATION","mdats","isMetadata","num_bad_rows","OCR_ES_ID","default_constant_IV_size","max_picture_width","msrc","default_constant_IV","default_length","maxCLL","writeInt16Array","entries","first_traf_merged","getUint16","processIncompleteMdat","lastMoofIndex","default_sample_duration","matrix: ","vttc","onSidx","fobr","ISOFile","stco","getMetaHandler","message_data","codec_specific_parameters","UUIDBoxes","shadowed_sample_numbers","4008965bsWzzE","FullBox"," of size ","length_size_of_sample_num","trgr","leastDecodeToDisplayDelta","SAP_type","brst","object","MultiBufferStream","hasIOD","writeStruct","sample_offsets","stream_read_1_bytes","tenc","bit_rate_code","single_view_allowed","fileStart","vvi1","absolute_duration","vipr","modification_time: ","prol"," on track #","buildSampleLists","process_sdtp","boxEqual","No method for reading signed 64 bits values","ContainerBox","vmhd","code","maxr","setInt8","getHeight","is_leading","writeUint16","SAMPLE_ENTRY_TYPE_TEXT","sample_count","unsetExtractionOptions","URL","clli","modified","uint32le","1800449jmFCce","notice","7432416QrvyKF","item_infos","modification_time","debug","layer: ","iref","event_duration","maxBitrate","track_height","ES_ID","reserved","nextParsePosition","num_bad_cols","Hint","monochrome","skip_byte_block","readInt64","SmDm","data_reference_index","getSampleRate"," --\x3e ","attribute_list","stereo_scheme","getSample","seekTrack","Found Sample Groups of type ","ABCDEFGHIJKLMNOPQRSTUVWXYZ234567","chroma_subsampling_x","block_little_endian","scnm","trun","readString","last_sample_in_run","isVideo","mapInt32Array","target","int16le","earliest_presentation_time","primaryGChromaticity_y","dref","white_point","PADDING","AudioSampleEntry","balance","strk","mskC","tfra","readAnyInt","primary","fragmentedTracks","getStreamBufferSize","_sweep","pos_z","bitrate","sampleListBuilt","track_width","pos_y","samples_size","parseOneBox","bufferSize","constantFrameRate","axis","Not enough bytes left in the parent box to parse a UUID box","padbits","auxiliary_mime_types","target_rate_share","layer_id","FULL_BOXES","usedBytes","updateUsedBytes","trex","mp4aSampleEntry","getPosition","sample_deltas","lsel","bad_pixel_row","uint32be","maxFALL","maximum_bitrate","getDurationString","_buffer","reserved_1","extent_offset","primaryRChromaticity_x","parseDataAndRewind","number","readUint","vp08SampleEntry","first_chunk","writeInitializationSegment","subsegment_duration","sbgps","uint16","description_index","configOBUs","tref","default_isProtected","_size","initialized","available_bitrate","Error reading base offset size","avgBitRate","transferFunction","wvtt","name","parseUUID","getEndPosition","writeUint32Array"," Compressor","updateSampleLists","smhd","hvc1SampleEntry","num_bytes_constraint_info","metadataTracks","fieldCount","avc3","bad_columns","rinf","component_align_size","readInt method not implemented for size: ","sample_description_index","hev1","stpp","sample_is_depended_on","npck","readUint16Array","writeUint64","num_output_samples","created","references","avc4","grouping_type","float64le","document","16GXqkyG","tsyn","destroy","Error accessing position in the MultiBufferStream","version:","compositionToDTSShift","parseOneDescriptor","dependency","charCodeAt","chan_loc","sample_depends_on","start","duration","flags:","SAMPLE_ENTRY_TYPE_SUBTITLE","sample_info_size","int8","samplerate","initial_presentation_delay_present",""","OutputGain","Metadata","bg_color_rgba","general_profile_compatibility","hasItem","byteLength","subsegments","mvhdBox","major_brand","appendChild","readUint32Array","TRUN_FLAGS_FIRST_FLAG","MPEG4DescriptorParser","readUint8Array","setAttribute","colour_primaries","audioTracks","num_channels","readInt8","track_ID","onMoovStart","(empty)","pos_x","DIFF_BOXES_PROP_NAMES","mfhd","lfeon","setFloat64","skew_factor","Found 'mdat' end in buffered data","_trimAlloc","buffer","vertical_justification","prft","payl","Text","general_tier_flag","getBuffer","int32le"," full size: ","Repositioning parser at buffer position: ","first_sample_index","slid","ac-3","end","a5d40b30e81411ddba2f0800200c9a66"," not found in buffered data","is_depended_on","aebr","moovBox","mdcv","subSequenceIdentifier","sample_size","writeFloat64","vertresolution","packetssent","enct","readUint16","hmhd","getTrackSample","item_protection_index","version of iloc box not supported","grpl","subsamples","auxC","94CCrvlD","bufferIndex","writeInt32","sample_counts","createSampleGroupCtor","save","max","readySent","createMediaSampleEntryCtor","uuid","Not enough data in stream to parse the type and size of the box","trafs","APPLICATION","reserved_2","index_size","reduceBuffer","audio","sample_numbers","period","lastValidSample","full_range_flag","concat","hevcDecoderConfigRecord","general_level_idc","general_constraint_info","durationFlag","sgpds","add","subtitleTracks","nalu_type","stop","movie_duration","ptl_sublayer_present_mask","lhe1","descs","sub_track_id","CONTAINER_BOXES","d4807ef2ca3946958e5426cb9e46a79f","ipco","opcolor","ChannelMapping","createFragment","forEach","sbtt","TKHD_FLAG_ENABLED","CoupledCount","avc1","fragment_count","floor"," (total: ","alternate_group: ","used","Appending new buffer (fileStart: ","moof","mdhd","samplesDataSize","afbr","frma","general_profile_idc","duration: ","No more buffer in memory","arrayToNative","style_record","parseFromString","wbbr","print","pixel_size","1904-01-01T00:00:00Z","absolute_time","saiz","meta","ftyp","scheme_uri","co64","vvnC","InputSampleRate","chroma_sample_position","fragment_description","sinf","SPS","channel_associations","nextSeekPosition","emsg","channel_count","video","undefined","ipro","mjp2"," bytes), continuous ranges: ","esd","matrix","getSampleSize","replace","item_type","isFragmentationInitialized","iinf","track_id: ","data_offset","moovStartFound","SAMPLE_ENTRY_TYPE_SYSTEM","extended_language","bits_per_pixel","samplesize","stereo_indication_type","has_redundancy","u16stringle","download","writeUCS2String","seek","ftypBox","u16string","config","resources","isSubtitle","createSampleEntryCtor","fragment_duration","moofs","offset_size","seq_level_idx_0","nextMoofNumber","first_sample_flags","info","avc3SampleEntry","is_sync","addSubBoxArrays","TFHD_FLAG_SAMPLE_FLAGS","base_offset","sgpdBox","uint16le","parseHeader","isProgressive","adjustUint32","stdp","_dataView","schemeURI","roll_distance","parseFullHeader","horizontal_justification","addUsedBytes","DIFF_PRIMITIVE_ARRAY_PROP_NAMES","sample_delta","mehd","sidxSent","releaseSample","SampleGroupEntry","uint8","Textin4Parser","default_KID","pssh","rate","rap ","isAudio","properties","writeUint32","volume","TRUN_FLAGS_SIZE","rapAlignement","num_bad_pixels","moof_offset","samples_per_chunk","getTrexById","prof","nb_PPS_nalus","truns","image_height","avcDecoderConfigRecord","sample_composition_time_offset","default_sample_flags"," of size: ","readUint8","base_data_offset","mehdBox","dec3","default_sample_size","box","bsid","readUint24","TRUN_FLAGS_CTS_OFFSET","Error reading extent index","TFHD_FLAG_SAMPLE_DUR","aux_info_type_parameter","videoTracks","samples_duration","sample_offset","Exporting on track #","Subtitle","itemListBuilt","high_bitdepth","profile","tracks","uint16be","ac-4","eqiv","dfLa","correction_applied","decimalToHex","minimum_bitrate","Found ","kind","entry_count","Needs an array buffer",".CA","pasp","component_type_urls","getInt32","TFHD_FLAG_SAMPLE_DESC","traks","cleanApertureWidthN","trep","aux_subtype","TFHD_FLAG_DUR_EMPTY","equal","drep","push","sample_groups","buffers","bit_depth_minus8","stsdBox","first_dts","releaseUsedSamples","processIncompleteBox","stsa","Removing buffer #","hasIncompleteMdat"," data (alreadyRead: ","mapFloat32Array","txtC","mergeNextBuffer","Log","OutputChannelCount","tapt","dmax","writeInt8","memcpy","isFragmented","num_ind_sub","_dynamicSize","createContainerBoxCtor","findPosition","readInt16Array","max_picture_height","mapInt8Array","createEntityToGroupCtor","mime","elng","Found position in existing buffer #","imir","writeHeader","click","max_ref_per_pic","ERR_NOT_ENOUGH_DATA","vmhdBox","is_fragment","min","timescale","sthd","application/xml","initial_delay","tkhdBox","float64","mfra","trak","samples","getTrackDuration","parsingMdat","byteOffset","SAMPLE_ENTRY_TYPE_METADATA","LITTLE_ENDIAN","profile_compatibility","protection_index","sample_number","num_leading_samples","encv","location","Audio","tfhdBox","chunk_run_index","ref_track_id","data","createObjectURL","layer_size","ES_Descriptor","namespace","media_rate_fraction","mdat","join","stxtSampleEntry","essential","writeInt32Array","chunk_index","setInt32","sample_flags","setSampleGroupProperties","bits_per_channels","avcC","iaug","stssBox","dependsOn_ES_ID","float32le","sdp ","depth","dataview","hdlrBox","getInfo","ptl_frame_only_constraint","sync_sample_numbers","data_offset_position","rash","parseHex16","apply","addBox","itemId","encode"," read size: ","string","sttsBox","createSingleSampleMoof","getBoxes","AVCProfileIndication","free","minor_version","Buffer must be defined and non empty","stppSampleEntry","codecIntializationData","presentation_time_delta","completeness","TKHD_FLAG_IN_PREVIEW","user","held_bits","time","alternate_group","extents","trun_number","extent_index","all_ref_pics_intra","extent_length","SingleItemTypeReferenceBox","16379613daklAa","hinf","scheme_id_uri","moofBox","writeType","sidx","isEof","traf_number","dOps","BYTES_PER_ELEMENT","ptl_present_flag"," at position ","j2ki","tile_align_size","displayFlags","mere","PPS","uint32","image_width","TKHD_FLAG_IN_MOVIE","fscod","box_record","oti","from_item_ID","SAP_delta_time","a1op","PICTURE","Buffer must have a fileStart property","primaryRChromaticity_y","VORBIS_COMMENT","chunk_offsets","Allocating sample #","writeInt8Array","BoxWriter","extension_type","decode","block_reversed","isProtected","getOTI","bitDepth","nalu_arrays","channel_indexes","getCodec","description_boxes","insertBuffer","temporalIdNested","baseMediaDecodeTime","numMetadataBlocks","creation_time","unpack","mapInt16Array","favc","padding_flag","stsg","getCodecs","numTemporalLayers","aux_info_type","twelve_bit","reference_ID","value","associations","ArrayBuffer","iods","num_entities_in_group","hasMoov","Visual","vp09SampleEntry","layer","parseFooter","dimm","sampleProcessingStarted","getPrimaryItem","mapFloat64Array","a2394f525a9b4f14a2446c427c648df4","mvex","Getting item #","getBox","TRUN_FLAGS_DATA_OFFSET","segment_duration","default_IV_size","getFloat64","processItems","readInt8Array","nativeToEndian","float64be","track_group_id","greatestDecodeToDisplayDelta","senc","dobr","itemsDataSize","setAllUsedBytes","PreSkip","tpyl","next_track_id","mvif","mha1","smhdBox","language","revokeObjectURL","first_output_sample","default_sample_description_index","iprp","hvcCBox","offset","DecoderConfigDescriptor","minf","principal_point_x","starts_with_SAP","payt","getLength","channel_types","avc2","stsh","pmax","_byteOffset","getChannelCount","tfdt","saveParsePosition","DataStream","onError","vvi1SampleEntry","levels","metadata","cslg","length_size","constant_IV","avss","albc","av01SampleEntry","Creating media fragment on track #","sbgp","transferCharacteristics","SAMPLE_ENTRY_TYPE_HINT","avs3","scif","failurePosition","sampleEntryCodes","writeUint24","onSegment","subBoxNames","bufferSizeDB","vpcC","toString","version","int16be","discardable","readFloat64Array","chroma_format_idc","avg_frame_rate","num_leading_samples_known","streamType","log","general_profile_space","mime_format","irot","No method for reading signed 24 bits values","size","co64Box","moovStartSent","colourPrimaries","warn","processSamples","RESERVED","VisualSampleEntry","esds","getTime","next_track_id: ","Sending samples on track #","ref_to","findEndContiguousBuf","Writing box ","hintTracks","moov","parallelismType","splice","TFHD_FLAG_DEFAULT_BASE_IS_MOOF","colour_type","writeFooter","constant_IV_size","tkhd","vSpacing","setExtractionOptions","parseRemainingDescriptors","stri","mp4a","horizresolution","compressorname","num_held_bits","getDescriptorName","creation_time: ","_self","media_time","bsmod","nb_samples","moovVideoNum","nbSamples","text","bytessent","MP4BoxStream","trexBox","und","nmhd"];return(Po=function(){return e})()}Bo[Do(833)],Bo[Do(1140)],Bo[Do(1060)],Bo[Do(351)],Bo[Do(553)],Bo[Do(238)],Bo[Do(1301)],Bo[Do(751)],Bo[Do(335)],Bo[Do(204)];const Fo=Lo;function Uo(e){return e[Lo(442)](((e,t)=>256*e+t))}function Ro(e){const t=Lo,r=[101,103,119,99],n=e[t(445)]-28,i=e[t(425)](n,n+r.length);return r[t(432)](((e,t)=>e===i[t]))}!function(e,t){const r=Lo,n=e();for(;;)try{if(968591===-parseInt(r(408))/1*(parseInt(r(415))/2)+parseInt(r(421))/3+parseInt(r(441))/4*(parseInt(r(411))/5)+-parseInt(r(430))/6+-parseInt(r(427))/7+parseInt(r(438))/8+parseInt(r(405))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Oo);Fo(420),Fo(426);function Lo(e,t){const r=Oo();return(Lo=function(e,t){return r[e-=402]})(e,t)}function Oo(){const e=["5344717wOkdGr","instantiate","debugWarn","5212746IGipfk","init","every","wasm not supported","debuglog","object","not support wasm","instance","8783712GPYBRp","init error","map","16FcKSPz","reduce","TAG_NAME","catch","length","Memory","player","message","5289084aWZmqC","byteLength","buffer","2pYQsAo","Module","memory","392155mLgCDj","TransportDescrambler","then","function","745564hlVmPh","debugLog","parse","reverse","stack overflow","destroy","4041339YKmhfI","Instance","exports","set","slice","transport"];return(Oo=function(){return e})()}function No(){const e=Ho;for(var t=arguments[e(307)],r=new Array(t),n=0;n{const n=e,s=new i((0|t.byteLength)+(0|r[n(315)]));return s[n(303)](t,0),s[n(303)](r,0|t[n(315)]),s}),new i)}function zo(){const e=["800482sixENn","1360171ZBdLWT","2620yuqvyT","constructor","16558443ZKDJRk","2185398KRbLEE","padStart","set","483655fzrlIt","error","substr","length","8tTGVrm","3479749KDQLmn","reduce","6bUqwWV","hexStringToUint8Array: invalid hexString length, must be even and bexString length is: ","3411dwmYvV","20TFVWcM","byteLength"];return(zo=function(){return e})()}function Ho(e,t){const r=zo();return(Ho=function(e,t){return r[e-=297]})(e,t)}function Vo(e,t){const r=ia();return(Vo=function(e,t){return r[e-=382]})(e,t)}!function(e,t){const r=Ho,n=e();for(;;)try{if(906823===parseInt(r(297))/1+parseInt(r(316))/2*(parseInt(r(311))/3)+parseInt(r(314))/4*(parseInt(r(304))/5)+parseInt(r(301))/6+-parseInt(r(309))/7*(parseInt(r(308))/8)+-parseInt(r(313))/9*(parseInt(r(298))/10)+-parseInt(r(300))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(zo),function(e,t){const r=Vo,n=e();for(;;)try{if(831151===parseInt(r(390))/1*(-parseInt(r(395))/2)+-parseInt(r(387))/3+parseInt(r(400))/4+-parseInt(r(404))/5+-parseInt(r(401))/6*(parseInt(r(402))/7)+-parseInt(r(391))/8+-parseInt(r(383))/9*(-parseInt(r(408))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ia);const jo=16,Wo=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Go=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function qo(e){const t=Vo,r=[];for(let n=0,i=e[t(396)];n{const r=t;return 1===(e=e.toString(16))[r(396)]?"0"+e:e})).join("")}function Ko(e){const t=Vo,r=[];for(let n=0,i=e[t(396)];n>>6),r[t(398)](128|63&i);else if(i<=55295||i>=57344&&i<=65535)r[t(398)](224|i>>>12),r[t(398)](128|i>>>6&63),r.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw r[t(398)](i),new Error("input is not supported");n++,r.push(240|i>>>18&28),r[t(398)](128|i>>>12&63),r[t(398)](128|i>>>6&63),r[t(398)](128|63&i)}}return r}function Xo(e){const t=Vo,r=[];for(let n=0,i=e[t(396)];n=240&&e[n]<=247?(r.push(String[t(413)](((7&e[n])<<18)+((63&e[n+1])<<12)+((63&e[n+2])<<6)+(63&e[n+3]))),n+=3):e[n]>=224&&e[n]<=239?(r[t(398)](String[t(413)](((15&e[n])<<12)+((63&e[n+1])<<6)+(63&e[n+2]))),n+=2):e[n]>=192&&e[n]<=223?(r[t(398)](String[t(413)](((31&e[n])<<6)+(63&e[n+1]))),n++):r[t(398)](String[t(413)](e[n]));return r[t(397)]("")}function Jo(e,t){const r=31&t;return e<>>32-r}function $o(e){return(255&Wo[e>>>24&255])<<24|(255&Wo[e>>>16&255])<<16|(255&Wo[e>>>8&255])<<8|255&Wo[255&e]}function Zo(e){return e^Jo(e,2)^Jo(e,10)^Jo(e,18)^Jo(e,24)}function Qo(e){return e^Jo(e,13)^Jo(e,23)}function ea(e,t,r){const n=new Array(4),i=new Array(4);for(let t=0;t<4;t++)i[0]=255&e[4*t],i[1]=255&e[4*t+1],i[2]=255&e[4*t+2],i[3]=255&e[4*t+3],n[t]=i[0]<<24|i[1]<<16|i[2]<<8|i[3];for(let e,t=0;t<32;t+=4)e=n[1]^n[2]^n[3]^r[t+0],n[0]^=Zo($o(e)),e=n[2]^n[3]^n[0]^r[t+1],n[1]^=Zo($o(e)),e=n[3]^n[0]^n[1]^r[t+2],n[2]^=Zo($o(e)),e=n[0]^n[1]^n[2]^r[t+3],n[3]^=Zo($o(e));for(let e=0;e<16;e+=4)t[e]=n[3-e/4]>>>24&255,t[e+1]=n[3-e/4]>>>16&255,t[e+2]=n[3-e/4]>>>8&255,t[e+3]=255&n[3-e/4]}function ta(e,t,r){const n=new Array(4),i=new Array(4);for(let t=0;t<4;t++)i[0]=255&e[0+4*t],i[1]=255&e[1+4*t],i[2]=255&e[2+4*t],i[3]=255&e[3+4*t],n[t]=i[0]<<24|i[1]<<16|i[2]<<8|i[3];n[0]^=2746333894,n[1]^=1453994832,n[2]^=1736282519,n[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=n[1]^n[2]^n[3]^Go[r+0],t[r+0]=n[0]^=Qo($o(e)),e=n[2]^n[3]^n[0]^Go[r+1],t[r+1]=n[1]^=Qo($o(e)),e=n[3]^n[0]^n[1]^Go[r+2],t[r+2]=n[2]^=Qo($o(e)),e=n[0]^n[1]^n[2]^Go[r+3],t[r+3]=n[3]^=Qo($o(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function ra(e,t,r){const n=Vo;let{padding:i=n(386),mode:s,iv:o=[],output:a="string"}=arguments[n(396)]>3&&void 0!==arguments[3]?arguments[3]:{};if(s===n(410)&&(typeof o===n(403)&&(o=qo(o)),16!==o[n(396)]))throw new Error(n(388));if(typeof t===n(403)&&(t=qo(t)),16!==t[n(396)])throw new Error(n(399));if(e=typeof e===n(403)?0!==r?Ko(e):qo(e):[...e],(i===n(392)||"pkcs#7"===i)&&0!==r){const t=jo-e[n(396)]%jo;for(let r=0;r=jo;){const t=e.slice(f,f+16),i=new Array(16);if(s===n(410))for(let e=0;e2&&void 0!==arguments[2]&&arguments[2],i=arguments[r(396)]>3&&void 0!==arguments[3]&&arguments[3];const s=e.byteLength;let o=new Uint8Array(e[r(406)](0,5)),a=5;for(;as){const t=new Uint8Array(o.length+e.length-a);t[r(384)](o,0),t[r(384)](e[r(406)](a),o[r(396)]),o=t;break}let l=e[a+4],d=!1,f=2;if(n?(i&&(f=3),l=l>>>1&63,d=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][r(389)](l)):(l&=31,d=1===l||5===l),d){const n=ra(e.slice(a+4+f,a+4+u),t,0,{padding:r(412),output:"array"});let i=n[n[r(396)]-1];if(i>0&&i<16){let e=!0;for(let t=1;t<=i;t++)if(n[n[r(396)]-t]!==i){e=!1;break}e&&n[r(405)](n[r(396)]-i,i)}const s=new Uint8Array(f);s[r(384)](e[r(406)](a+4,a+4+f),0);const c=xt(No(s,new Uint8Array(n))),l=new Uint8Array(o[r(396)]+c[r(396)]);l[r(384)](o,0),l[r(384)](c,o[r(396)]),o=l}else{const t=e[r(406)](a+4,a+4+u),n=new Uint8Array(o[r(396)]+4+t[r(396)]);n.set(o,0),n[r(384)](c,o[r(396)]),n[r(384)](t,o.length+4),o=n}a=a+4+u}return o}const oa=aa;function aa(e,t){const r=ca();return(aa=function(e,t){return r[e-=291]})(e,t)}function ca(){const e=["push","2694632qyFipV","4eXrEQC","slice","forEach","3302735IIheaT","9840rfKQIE","641437QpgLCE","ctx","55966gJywHd","742swgflc","310354NJBZsy","apply","372tITLGG","emit","length","keys","10OWIUsp","66EwKwRW","once","7707087RKOtzQ","off"];return(ca=function(){return e})()}!function(e,t){const r=aa,n=e();for(;;)try{if(453456===-parseInt(r(307))/1+-parseInt(r(309))/2*(-parseInt(r(296))/3)+parseInt(r(302))/4*(parseInt(r(305))/5)+-parseInt(r(306))/6*(-parseInt(r(310))/7)+-parseInt(r(301))/8+parseInt(r(298))/9*(parseInt(r(295))/10)+parseInt(r(311))/11*(-parseInt(r(291))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ca);class ua{on(e,t,r){const n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this}[oa(297)](e,t,r){const n=this;function i(){const s=aa;n[s(299)](e,i);for(var o=arguments.length,a=new Array(o),c=0;c1?n-1:0),s=1;s{delete n[e]})),void delete this.e;const i=n[e],s=[];if(i&&t)for(let e=0,n=i[r(293)];e=2&&!this[r(475)];)if(255==this[r(484)][this.parsedOffset]){if(!(!1&this[r(484)][this.parsedOffset+1])){this[r(471)]=this[r(484)][this[r(486)]+1],this.state=ha[r(466)],this[r(467)]=this[r(486)],this[r(486)]+=2,e=!0;break}this[r(486)]++}else this[r(486)]++;if(e)continue;break}if(this[r(488)]==ha[r(466)]){let e=!1;for(;this[r(484)][r(485)]-this.parsedOffset>=2&&!this[r(475)];)if(255==this[r(484)][this[r(486)]]){if(this[r(484)][this[r(486)]+1]==this[r(471)]){this[r(488)]=ha[r(473)],this[r(465)]=this[r(486)],this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this[r(486)]++;if(e)continue;break}if(this[r(488)]==ha[r(473)]){let e=this.tempBuffer[r(487)](this[r(467)],this[r(465)]);this[r(474)]("data",e,t),this[r(484)]=this[r(484)][r(487)](this[r(465)]),this.fisrtStartCodeOffset=0,this[r(486)]=2,this[r(488)]=ha[r(466)]}}}}function ma(e,t){const r=ya();return(ma=function(e,t){return r[e-=452]})(e,t)}function va(e,t,r){const n=ma;for(let i=2;i3&&void 0!==arguments[3]&&arguments[3];const s=e[n(457)];let o=5;for(;os)break;let c=e[o+4],u=!1;if(i?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(466)](c)):(c&=31,u=1===c||5===c),u){const i=va(e[n(461)](o+4,o+4+a),t,r);e[n(464)](i,o+4)}o=o+4+a}return e}function ba(e,t,r){const n=ma;if(e[n(457)]<=30)return e;const i=va(e[n(461)](30),t,r);return e[n(464)](i,30),e}function wa(e,t){var r=Ea();return(wa=function(e,t){return r[e-=462]})(e,t)}function Sa(){for(var e=wa,t=arguments[e(473)],r=new Array(t),n=0;nt+r[e(463)]),0));let s=0;return r.forEach((t=>{var r=e;i.set(t,s),s+=t[r(463)]})),i}function Ea(){var e=["88314gHSnem","filter","6017211MLGGqB","4hXhnRL","436132tXMhOY","450950FpvRGO","reduce","3001320LCUnnP","length","230097lojyzh","136eiRErD","byteLength","2915364QoTtKR"];return(Ea=function(){return e})()}function Ia(){const e=["9EIIISJ","614022jdsxVD","length","20tEtYCE","push","destroys","515896xjuWpi","95GJHSvX","removeEventListener","8432604moGcWl","491594QQButh","proxy","bind","108VSGyLx","14ipurqW","debugLog","forEach","destroy","isArray","26WTrGLI","26804RpMuYi","master","280861mJecwY","793628hVpybA"];return(Ia=function(){return e})()}!function(e,t){const r=ma,n=e();for(;;)try{if(790461===-parseInt(r(463))/1*(-parseInt(r(455))/2)+parseInt(r(467))/3*(-parseInt(r(458))/4)+parseInt(r(454))/5*(-parseInt(r(462))/6)+-parseInt(r(459))/7+-parseInt(r(465))/8*(parseInt(r(453))/9)+-parseInt(r(456))/10+parseInt(r(460))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ya),function(e,t){for(var r=wa,n=e();;)try{if(597972===parseInt(r(469))/1*(parseInt(r(468))/2)+-parseInt(r(465))/3+-parseInt(r(472))/4+-parseInt(r(470))/5+parseInt(r(464))/6+-parseInt(r(474))/7*(parseInt(r(462))/8)+parseInt(r(467))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ea);const Aa=ka;function ka(e,t){const r=Ia();return(ka=function(e,t){return r[e-=362]})(e,t)}!function(e,t){const r=ka,n=e();for(;;)try{if(453603===parseInt(r(376))/1+-parseInt(r(364))/2*(-parseInt(r(378))/3)+-parseInt(r(374))/4*(-parseInt(r(385))/5)+-parseInt(r(379))/6*(parseInt(r(368))/7)+-parseInt(r(384))/8*(-parseInt(r(367))/9)+-parseInt(r(381))/10*(-parseInt(r(377))/11)+parseInt(r(363))/12*(-parseInt(r(373))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ia);class Ca{constructor(e){const t=ka;this.destroys=[],this[t(365)]=this[t(365)][t(366)](this),this[t(375)]=e}[Aa(365)](e,t,r){const n=Aa;let i=arguments[n(380)]>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array[n(372)](t))return t.map((t=>this.proxy(e,t,r,i)));e.addEventListener(t,r,i);const s=()=>{const s=n;Wt(e[s(362)])&&e[s(362)](t,r,i)};return this[n(383)][n(382)](s),s}[Aa(371)](){const e=Aa;this.master[e(369)]("Events",e(371)),this[e(383)][e(370)]((e=>e())),this[e(383)]=[]}}function Ta(){const e=["esds","VMHD","mdia","55AlRauY","audioSampleRate","trak","234036mUMcTZ","charCodeAt","minf","stco","dependsOn","SMHD","HDLR_VIDEO","528710TqlJYD","type","concat","mfhd","stsz","23384bcnusI","types","933255JjFQrP","mvhd","tfhd","audioType","config","codecWidth","hasRedundancy","tkhd","STSZ","315ojSrfp","STSC","mp3","box","mdat","trun","trex","500550NFxmZD","presentHeight","avcc","tfdt","timescale","isDependedOn","6245AEoDqo","mdhd","init","avc","mvex","ftyp","stts","duration","dinf","655PERehI","traf","avcC","slice","718sxsHrP","STTS","codecHeight","sdtp","byteLength","prototype","isLeading","FTYP","32FQUGNi","set","moof","vmhd","channelCount","stbl","hdlr","mp4a","size","moov","HDLR_AUDIO","audio","stsd","dref","hvc1","flags","constants","hvcC","STSD_PREFIX","videoType","avc1","DREF"];return(Ta=function(){return e})()}const xa=Ba;!function(e,t){const r=Ba,n=e();for(;;)try{if(119222===parseInt(r(438))/1*(-parseInt(r(442))/2)+parseInt(r(423))/3+parseInt(r(450))/4*(-parseInt(r(429))/5)+-parseInt(r(393))/6+parseInt(r(416))/7*(-parseInt(r(405))/8)+parseInt(r(407))/9+-parseInt(r(400))/10*(-parseInt(r(390))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ta);class Da{static[xa(431)](){const e=xa;Da[e(406)]={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(let t in Da.types)Da[e(406)].hasOwnProperty(t)&&(Da[e(406)][t]=[t.charCodeAt(0),t[e(394)](1),t[e(394)](2),t[e(394)](3)]);let t=Da[e(381)]={};t[e(449)]=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),t.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),t[e(443)]=new Uint8Array([0,0,0,0,0,0,0,0]),t[e(417)]=t.STCO=t[e(443)],t[e(415)]=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t[e(399)]=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),t[e(375)]=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),t[e(386)]=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),t[e(398)]=new Uint8Array([0,0,0,0,0,0,0,0]),t[e(388)]=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static[xa(419)](e){const t=xa;let r=8,n=null,i=Array[t(447)][t(441)].call(arguments,1),s=i.length;for(let e=0;e>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r,n[t(451)](e,4);let o=8;for(let e=0;e>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(e){const t=xa;return Da[t(419)](Da[t(406)][t(392)],Da.tkhd(e),Da[t(389)](e))}static[xa(414)](e){const t=xa;let r=e.id,n=e.duration,i=e.presentWidth,s=e[t(424)];return Da[t(419)](Da[t(406)][t(414)],new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,255&i,0,0,s>>>8&255,255&s,0,0]))}static[xa(389)](e){const t=xa;return Da[t(419)](Da.types[t(389)],Da[t(430)](e),Da.hdlr(e),Da[t(395)](e))}static[xa(430)](e){const t=xa;let r=e[t(427)],n=e.duration;return Da[t(419)](Da.types[t(430)],new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]))}static hdlr(e){const t=xa;let r=null;return r=e[t(401)]===t(376)?Da[t(381)].HDLR_AUDIO:Da[t(381)].HDLR_VIDEO,Da[t(419)](Da[t(406)][t(371)],r)}static[xa(395)](e){const t=xa;let r=null;return r=e[t(401)]===t(376)?Da.box(Da.types.smhd,Da[t(381)].SMHD):Da[t(419)](Da.types[t(453)],Da[t(381)][t(388)]),Da.box(Da.types[t(395)],r,Da[t(437)](),Da[t(370)](e))}static[xa(437)](){const e=xa;return Da[e(419)](Da[e(406)][e(437)],Da[e(419)](Da.types[e(378)],Da[e(381)][e(386)]))}static[xa(370)](e){const t=xa;return Da.box(Da[t(406)].stbl,Da[t(377)](e),Da[t(419)](Da.types[t(435)],Da[t(381)][t(443)]),Da[t(419)](Da[t(406)].stsc,Da.constants.STSC),Da.box(Da[t(406)][t(404)],Da[t(381)][t(415)]),Da[t(419)](Da[t(406)][t(396)],Da[t(381)].STCO))}static stsd(e){const t=xa;return"audio"===e.type?"mp3"===e[t(410)]?Da[t(419)](Da.types[t(377)],Da.constants.STSD_PREFIX,Da[t(418)](e)):Da[t(419)](Da[t(406)][t(377)],Da[t(381)][t(383)],Da[t(372)](e)):e[t(384)]===t(432)?Da.box(Da[t(406)].stsd,Da[t(381)][t(383)],Da.avc1(e)):Da[t(419)](Da[t(406)][t(377)],Da.constants[t(383)],Da[t(379)](e))}static[xa(418)](e){const t=xa;let r=e[t(369)],n=e[t(391)],i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return Da[t(419)](Da[t(406)][".mp3"],i)}static[xa(372)](e){const t=xa;let r=e[t(369)],n=e.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return Da[t(419)](Da[t(406)][t(372)],i,Da[t(387)](e))}static[xa(387)](e){const t=xa;let r=e[t(411)]||[],n=r.length,i=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5][t(402)]([n])[t(402)](r)[t(402)]([6,1,2]));return Da[t(419)](Da[t(406)][t(387)],i)}static[xa(385)](e){const t=xa;let r=e.avcc;const n=e[t(412)],i=e[t(444)];let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Da[t(419)](Da[t(406)][t(385)],s,Da[t(419)](Da[t(406)][t(440)],r))}static[xa(379)](e){const t=xa;let r=e[t(425)];const n=e[t(412)],i=e[t(444)];let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Da[t(419)](Da[t(406)][t(379)],s,Da[t(419)](Da[t(406)][t(382)],r))}static[xa(433)](e){const t=xa;return Da[t(419)](Da[t(406)].mvex,Da.trex(e))}static[xa(422)](e){const t=xa;let r=e.id,n=new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Da[t(419)](Da.types[t(422)],n)}static[xa(452)](e,t){const r=xa;return Da.box(Da.types[r(452)],Da.mfhd(e.sequenceNumber),Da[r(439)](e,t))}static[xa(403)](e){const t=xa;let r=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return Da.box(Da[t(406)][t(403)],r)}static[xa(439)](e,t){const r=xa;let n=e.id,i=Da[r(419)](Da[r(406)][r(409)],new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),s=Da.box(Da[r(406)][r(426)],new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),o=Da[r(445)](e),a=Da[r(421)](e,o.byteLength+16+16+8+16+8+8);return Da.box(Da[r(406)].traf,i,s,a,o)}static[xa(445)](e){const t=xa;let r=new Uint8Array(5),n=e[t(380)];return r[4]=n[t(448)]<<6|n[t(397)]<<4|n[t(428)]<<2|n[t(413)],Da[t(419)](Da[t(406)][t(445)],r)}static[xa(421)](e,t){const r=xa;let n=new Uint8Array(28);t+=36,n.set([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let i=e[r(436)],s=e[r(373)],o=e[r(380)],a=e.cts;return n.set([i>>>24&255,i>>>16&255,i>>>8&255,255&i,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o[r(448)]<<2|o[r(397)],o.isDependedOn<<6|o[r(413)]<<4|o.isNonSync,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12),Da[r(419)](Da[r(406)].trun,n)}static[xa(420)](e){const t=xa;return Da.box(Da[t(406)][t(420)],e)}}function Ba(e,t){const r=Ta();return(Ba=function(e,t){return r[e-=369]})(e,t)}Da[xa(431)]();var Ma=Fa;function Pa(){var e=["3484472CWSzDC","1882395MsMtqR","1lXkFhN","createCommonjsModule","4556770XhcVya","12014982BjhlEA","3407320QXlAFt","5219703TumbPq","4jtppSM","11dmSUCF","__esModule","default","exports","6froZvM","19639580gjskJc"];return(Pa=function(){return e})()}function Fa(e,t){var r=Pa();return(Fa=function(e,t){return r[e-=307]})(e,t)}function Ua(e,t){const r=Va();return(Ua=function(e,t){return r[e-=219]})(e,t)}!function(e,t){for(var r=Fa,n=e();;)try{if(878247===-parseInt(r(319))/1*(parseInt(r(317))/2)+-parseInt(r(309))/3*(-parseInt(r(310))/4)+parseInt(r(321))/5*(parseInt(r(315))/6)+parseInt(r(307))/7+parseInt(r(308))/8+-parseInt(r(318))/9+parseInt(r(316))/10*(-parseInt(r(311))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Pa),l(f[Ma(320)]((function(e){var t=Ma;e[t(314)]=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e[t(314)][t(312)]=!0,e.exports[t(313)]=e[t(314)]}))),function(e,t){const r=Ua,n=e();for(;;)try{if(372972===parseInt(r(230))/1+-parseInt(r(232))/2*(-parseInt(r(224))/3)+parseInt(r(226))/4+-parseInt(r(227))/5+parseInt(r(231))/6+-parseInt(r(221))/7+-parseInt(r(223))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Va);const Ra=[44100,48e3,32e3,0],La=[22050,24e3,16e3,0],Oa=[11025,12e3,8e3,0],Na=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],za=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],Ha=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1];function Va(){const e=["746330dTwZRh","error","channel_count","54353HpThmz","3431850xSQaKO","944NmnZhd","set","Invalid MP3 packet, header missing!","object_type","sample_rate","length","268716cwWJhs","mp3","8059072mDEaRo","2544kjChwQ","Invalid MP3 packet, first byte != 0xFF ","2165704UPYAyp"];return(Va=function(){return e})()}function ja(e){const t=Ua;if(e[t(220)]<4)return void console[t(228)](t(234));let r=new Uint8Array(e.buffer),n=null;if(255!==r[0])return void console[t(228)](t(225));let i=r[1]>>>3&3,s=(6&r[1])>>1,o=(240&r[2])>>>4,a=(12&r[2])>>>2,c=3!==(r[3]>>>6&3)?2:1,u=0,l=0,d=t(222);switch(i){case 0:u=Oa[a];break;case 2:u=La[a];break;case 3:u=Ra[a]}switch(s){case 1:o=e[i]&&t=6?(i=5,r=new Array(4),a=s-3):(i=2,r=new Array(2),a=s):-1!==c[t(212)](t(230))?(i=2,r=new Array(2),a=s):(i=5,a=s,r=new Array(4),s>=6?a=s-3:1===o&&(i=2,r=new Array(2),a=s)),r[0]=i<<3,r[0]|=(15&s)>>>1,r[1]=(15&s)<<7,r[1]|=(15&o)<<3,5===i&&(r[1]|=(15&a)>>>1,r[2]=(1&a)<<7,r[2]|=8,r[3]=0),this[t(197)]=r,this[t(188)]=$a[s],this.sampling_index=s,this[t(201)]=o,this[t(227)]=i,this.original_object_type=n,this.codec_mimetype=t(226)+i,this.original_codec_mimetype=t(226)+n}}const ec=tc;function tc(e,t){const r=nc();return(tc=function(e,t){return r[e-=265]})(e,t)}!function(e,t){const r=tc,n=e();for(;;)try{if(548195===parseInt(r(289))/1+-parseInt(r(278))/2+-parseInt(r(285))/3*(-parseInt(r(274))/4)+-parseInt(r(265))/5*(-parseInt(r(276))/6)+parseInt(r(281))/7+-parseInt(r(283))/8+-parseInt(r(291))/9*(parseInt(r(290))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(nc);class rc{constructor(e){const t=tc;this.data=e,this.index=0,this[t(266)]=8*e.byteLength}get[ec(280)](){const e=ec;return this[e(266)]-this[e(269)]}[ec(284)](e){const t=ec;if(this[t(280)]1&&void 0!==arguments[1])||arguments[1];return this[t(286)](e,this[t(269)],r)}[ec(286)](e,t){const r=ec;let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this[r(280)]>>i,o=8-i;if(o>=e)return n&&(this[r(269)]+=e),s>>o-e;{n&&(this[r(269)]+=o);const i=e-o;return s<>>1:-1*(e>>>1)}[ec(273)](){return 1===this[ec(287)](1)}[ec(277)](){const e=ec;let t=arguments[e(267)]>0&&void 0!==arguments[0]?arguments[0]:1;return this[e(287)](8*t)}[ec(270)](){return this[ec(287)](16)}[ec(279)](){return this[ec(287)](32)}}function nc(){const e=["data","381696iLkdiJ","120dRHpfT","170982LpiNXe","5ylfSJH","bitLength","length","skipUEG","index","readUShort","readEG","skipLZ","readBoolean","4tYgSIH","skipEG","5842674RxDqOq","readUByte","294298lGGoAt","readUInt","bitsAvailable","250656mVvNjh","readUEG","8013696DazhOH","skipBits","1601247isjWXY","getBits","readBits"];return(nc=function(){return e})()}function ic(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}!function(e,t){for(var r=yc,n=e();;)try{if(185198===parseInt(r(410))/1*(parseInt(r(409))/2)+parseInt(r(408))/3*(parseInt(r(428))/4)+-parseInt(r(424))/5+-parseInt(r(426))/6+parseInt(r(425))/7*(-parseInt(r(415))/8)+-parseInt(r(412))/9+-parseInt(r(423))/10*(-parseInt(r(413))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(pc);const sc=new Array(214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72),oc=new Array(2746333894,1453994832,1736282519,2993693404),ac=new Array(462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257);function cc(e,t,r,n,i){var s=yc,o=i;o=t+i>e.length&&n+i<=r.length?e.length-t:n+i>r[s(417)]&&t+i<=e[s(417)]?r[s(417)]-n:t+i<=e[s(417)]&&n+i<=r[s(417)]?i:r[s(417)]>24&255,e>>16&255,e>>8&255,255&e)}function lc(e,t){var r=yc;return t+3>>19)^(n<<23|n>>>9)}function hc(e,t){var r=new Array(36);r[0]=lc(t,0),r[1]=lc(t,4),r[2]=lc(t,8),r[3]=lc(t,12);for(var n=0;n<32;n++)r[n+4]=r[n]^mc(r[n+1]^r[n+2]^r[n+3]^e[n]);var i=new Array(4);for(n=35;n>=32;n--)i[35-n]=r[n];return function(e){for(var t=new Array(4*e[yc(417)]),r=0;r>>30)^(n<<10|n>>>22)^(n<<18|n>>>14)^(n<<24|n>>>8)}function vc(e,t,r){var n=yc;if(null==e||null==e||e[n(417)]%16!=0)return console[n(421)]("sm4 key is error!"),null;if(null==r||null==r||r[n(417)]<=0)return console[n(421)](n(416)),null;if(null==t||null==t||t[n(417)]%16!=0)return console.log(n(420)),null;for(var i=dc(e),s=Math[n(411)](r[n(417)]/16),o=new Array(r[n(417)]),a=t[n(414)](),c=0;c3&&void 0!==arguments[3]&&arguments[3],s=arguments[n(417)]>4&&void 0!==arguments[4]&&arguments[4];t=new Uint8Array(t),r=new Uint8Array(r);const o=e[n(427)];let a=5;for(;ao)break;let u=e[a+4],l=!1,d=2;if(i?(s&&(d=3),u=u>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(419)](u)):(u&=31,l=1===u||5===u),l){const i=vc(t,r,e[n(414)](a+4+d,a+4+c));e[n(422)](i,a+4+d)}a=a+4+c}return e}const gc=bc;function bc(e,t){const r=wc();return(bc=function(e,t){return r[e-=220]})(e,t)}function wc(){const e=["version_number","playbackForwardMaxRateDecodeIFrame","socketStatus","onReady","isPlaybackPause","10Cfgzoi","fetchNext().then() and abortController.signal.aborted is true so return","audioTrackId"," but isSocketError is true , so return",'" is string so return',"updatePlaybackIsPause","offscreenCanvas","opt","loop() do not decode and delay is ","firstStartCodeOffset","level","debugWarn","removeSourceBuffer() audioSourceBuffer error","setCodecAudio","delete","mediaSourceTsIsMaxDiff","videoSourceBuffer updateend and hasPendingEos is true, next endOfStream()","streamDts","AAC: Detected pts overlapped, ","calcNetworkDelay now dts:","level_string","3628656bduNXW","idle","endOfStream","_remainingPacketData","fetchStream, WebsocketStream on error and isDestroyed is true, so return","clearBuffer","cmd","fetchNext().then() and requestAbort is true so return","websocket user aborted","mediaSource","appendBuffer() player is destroyed","readUByte"," ,\n and now ts is ","mediaSourceAudioG711NotSupport","streamVbps","protocol","isAudioInitInfo","mseCorrectTimeDuration","kH265",", diff is ","open","_resetInIt","handleOffscreenCanvasWebglContextLost, stencil is false","setCodecVideo: init video codec , codecId is "," > maxDelay ","PACKET_TYPE_FRAMES",", dts is ","MediaSource",",local diff is ","_decodeConfigurationRecord error","FT_KEY","MULAW","slice","AAC: AudioObjectType changed from ","handleVideoNalu","_clearAudioNoDataCheckTimeout","PACKET_TYPE_FRAMESX","handleVideoH265Nalu","reset","fileStart","HEAPU32"," and prevTs is ","parseVPS","fetchStream, WebsocketStream socket close abnormally and code is ","demuxFlv() type is ","VideoDecoder configure has not init , isIframe is "," and isIFrame is ","doPlaybackCacheLoop() and isPlaybackOnlyDecodeIFrame is true and isIFrame is true, and ts is","dropBuffer$2() isAllIframeInBufferList() is true, and index is ","kSliceVPS","frameRate","isDropSameTimestampGop","AbortError"," and isIframe is "," to ","emitError",",\n and emit change event","aacADTSHeader","audioNalu","reduce","parseH265Payload","decodeNext","isPushDropping","draw, decoder is destroyed and return","webglcontextrestored","common_pids","onSamples() trackId error"," ,\n and diff is ","isRecordTypeFlv","payload","worker mpeg4Demuxer","playbackCacheBeforeDecodeForFpsRender, bufferListLength is ","Opus","hasAudio","duration_","playAudio","pid","nakedFlowH265DemuxUseNew","dispatchVideoInitSegment","tsPacketSize"," package length is ","websocketError","writableStream write() and abortController.signal.aborted is true so return","_initAudioSourceBuffer","transferToImageBitmap","delay","units","mseFirstRenderTime",", dts=","videoMimeType","extractNALu$2","TAG_NAME","cts","extractH265PPS","isPlayUseMSEAndDecoderInWorker","mediaSourceBufferError","decode data type is ","flush","isSm4Crypto","mseDecodeAudio","dispatchVideoMediaSegment","findFirstStartCode","secondStartCodeOffset","kSliceIDR_W_RADL","codedWidth","playbackIsPause","duration","configure","stop","\n decodeVideo: video width or height is changed,\n old width is ","offscreenCanvasCtx","\n and replay","video_metadata_","isEmitSEI"," ,\n and now ts is ","close() and audioDecoder.clear error: ","websocket","BIG_ENDIAN","map"," null","flvBufferData","Malformed PES: PES_packet_length < 3 + PES_header_data_length","validatedFailed, please contact the author to get the correct license","mseDecoder.mediaSourceAddSourceBufferError is true","aac","HEAPU8","mseError","\n isVideoSqeHeader is ","loop() bufferList is empty and reset delay","Synchronous KLV Metadata: pid=","mseDecoderUseWorker"," and ignore","streamAbps","forEach","expected: "," and\n ts is "," or cryptoIV.length is ","finally","pcr_pid","demuxNakedFlow","Client disconnecting","_decodeEnhancedH265Video","isSm4Crypto opt.sm4CryptoKey is null",",\n and emit change event","push","fromCharCode","175LBxrAz","appendBuffer","appendAudioBuffer","clear","decodeAudio and has already initialized and payload is aac codec packet so drop this frame","hasIncompleteData","warn","5016682xiPrcP","playbackIsCacheBeforeDecodeForFpsRender"," and,\n options.ts is ","kMPEG1Audio","isSendSeqHeader","supportMSEDecodeHevc","isCacheBeforeDecodeForFpsRender"," create uint8Array error :"," and tempDelay is "," and forOldVersion is ","subarray","loas_aac","closeEnd","nakedFlowFps","fetchNext().then() and done is true","isPlayUseMSE","moof","AC3: Bit Stream Identification changed from ","low_frequency_effects_channel_on"," and isVideoAndNextAudio is ","floor","chromaFormat","websocketFirstMessage","decodeAudio, decoder is destroyed and return","audio_last_sample_pts_","suffixSei","streamSuccess","websocketOpenTimeout","Generated first HEVCDecoderConfigurationRecord for mimeType: ","videoTrackId","isPlayVod"," and isVideoSqeHeader is ","prevTs","updating","mediaSourceFull",'writableStream write() and value is "',"LOG_NAME","playbackConfig","kSliceSPS","fetchStream, WebsocketStream socket close and code is ","sampling_rate","_doCleanUpSourceBuffer","streamVideoType is null","H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment","startStreamRateAndStatsInterval","websocket Open Timeout form "," and preTsDuration is "," and has iIframe and next decoder.dropBuffer$2()","JbPro Worker Version is ","profile","resetDelay","debugUuid","aac_last_incomplete_data_","loop() is dropping = false, is iFrame","vcl","audioSourceBuffer updateend and hasPendingEos is true, next endOfStream()",",\n firstAudioTime is ","width","sourceClose","playbackRate","isWasmMp4","parse","h264 naluList.length === 0",", start dts is ","removeSourceBuffer","stream_id","avcC","len","parseEAC3Payload","buffering","prevAudioDts","loop demux diff time is ","dispatchAudioMediaSegment","stopStreamRateAndStatsInterval","videoSEI","channelCount"," and ok is ","recordType","getDelayNotUpdateDelay","streamRate","mseWidthOrHeightChange","fetch response status is ","bit_stream_mode","decodeVideo and payload is too small , payload length is ","types","isRecording","kLOASAAC","audio_metadata_","opus","worker","videoTracks","isPlayback","close() and videoDecoder.clear error: ","\n decodeAudio dts is less than(or equal) prev dts ,\n dts is ","mseDecoder.audioSourceBuffer.appendBuffer()","fetchStream","clearSlices","refFrames","codedHeight","media_info_","setExtractionOptions","byteLength"," is not H264 or H265","chroma_format_string","fetchStream, WebsocketStream socket close and requestAbort is true so return",", syncOffset = ","setCodecAudio: init audio codec, codeId is ","arraybuffer","pendingRemoveRanges",", diff time is ","playbackCacheLoop fragDuration is ","codec_mimetype","ms and return -1","video_track_","mediaSourceError","audioPayload","smpte2038_pids","mdat","parseTimedID3MetadataPayload","parsePPS"," and notDroppingDelayTs is ","decodeVideo and payload is video sequence header so drop this frame","extractNALu$3","getAudioSourceBufferUpdating","parseOpusPayload","isNakedFlow","streamStats","ac3","clearPlaybackCacheLoop","kSliceSEI","audioMimeType","handleOffscreenCanvasWebglContextRestored","isCryptoAudio","isPlayer","player","mseHandle","getUint32","error","vps","handleNALu","set","eac3","pmt_","name","channel_config","asynchronous_klv_pids","detectVideoMetadataChange","signal","pendingUnits","audioCodec","setCodecAudio: hasInitAudioCodec is false, codecId is ","details","parseAsynchronousKLVMetadataPayload","sourceended","prevAudioTs","calcPlaybackStreamFps","updateend","h265 naluList.length === 0","1068872zEsmoj","video","sendWsMessage",", need clear is ","fetchError"," and bufferList length is ","delay is ","value","setInterval()","hasIframeInBufferList","pendingAudioRemoveRanges","state","mediaSourceAppendBufferFull","simdDecodeError","mseWorkerAddSourceBufferError","supportVideoFrameCallbackHandle","fps","G711U"," ts is ","parsePES","aborted","isHevc","demuxFlv",",\n diff is ","render","currentTime","offscreenCanvasGL","fetch done","cryptoPayloadAudio","_doDecodeVideo","onerror","last_pcr_","onmessage","_needCleanupSourceBuffer","_doRemoveRanges","string","sampling_freq_index","isAllIframeInBufferList","_clearAudioSourceBufferCheckTimeout","parseChunks","originalCodec","isIFrame","_isEnhancedH265Header","debugLog","isAAC","length","socket is null"," more than ","samples"," > timestamp is ","readNextNaluPayload"," and has iFrame, set dropping is true","mpeg","fetchErrorWorker","pendingSegments"," and opt is","videoNalu","demuxM7s","demuxFmp4","isPause","iFrame","end","h265","events","isDropping","SMPTE 2038 Metadata: pid=","setCodecVideo: videoDecoder or videoDecoder.setCodec is null","useSIMD","isTs"," and firstRenderTime is ","_hasPendingRemoveRanges","extractNALu","dts","getNotDroppingDelayTs","audioCode","isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio","isEmitInfo","MP3: AudioObjectType changed from ","payload_unit_start_indicator","endOfStream() error","from","data","prevPayloadBufferSize","Video: Coded Resolution changed from ","generateInitSegment","fetchNext().catch() and e is ",'video/mp4; codecs="',"playVod"," and next dropBuffer","timeInit set false , cacheTrack = {} now dts is ","fetch().catch() and abortController.signal.aborted is true so return","fetchStream, WebsocketStream socket open","status","checkStreamEnd","handlePESSlice: packet_start_code_prefix should be 1 but with value ","buffered","isFirstDispatch and tsPacketSize = ","parseAC3Payload","sequenceNumber","mp4Box onError","videoCode","ts is ","bit_depth","worker wcsDecoder","_opt","dispatchPESPrivateDataDescriptor","_initAudioSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()","initAudio","keyFrame","setCodecVideo: SIMD H264 decode video width is too large, width is ","pps","original_object_type","adts_aac","hvcc","toString","mp3","correctSamplePts","getDelay","streamEnd","audio_object_type","hasVideo","handleOffscreenCanvasWebglContextLost and next try to create webgl","pes_private_data_pids","mseDecoder.mediaSourceAppendBufferError is true"," less than (or equal) preTs is ","current_program_","Not Supported Opus channel count.","parseSMPTE2038MetadataPayload",", and ts list is ","nearest_pts","isXorCrypto cryptoKey.length is ","endOfStream()","shift","cancel",",\n new width is ","useWCS","videoInfo","destroy","eventListenList","audio","getContext","kADTSAAC","close","createFile","KLVA","wasmWidthOrHeightChange","clearBuffer,bufferList length is ",",\n and mseCorrectTimeDuration is ","dropBuffer$2","yuvData, isVideoFirstIFrame is false and return","closed","aacSequenceHeader","findSecondStartCode","stream_type","width is ","hev","wcsDecodeAudio"," and nalUnitSize is ","decode","cacheAudioTrack","1404273eoEoQK","prefixSei","demuxFlv() type is audio and payload.byteLength is ","timescale","_initSourceBuffer and mseDecoder.isStateOpen is "," and prevPayloadBufferSize is ","channel_count","init and forHardDecode is ","bitDepth","is_sync","mseCorrectAudioTimeDuration","h264","kSCTE35","_bindMediaSourceEvents","firstTimestamp","handleVideoFrames","sendWebsocketMessage, message is","sar_ratio",", bufferListLength is ","2gxlWqw","extractH265SEI","_doAppendSegments() mediaSource is closed or ended and return","mseDecoder.mediaSourceBufferError is true","then","Generated first AudioSpecificConfig for mimeType: ",'" string so return',"handleVideoH264NaluList list size is ","audio_init_segment_dispatched_","initVideo","stsd","Parsed first PMT: "," is not corresponded to PAT!","onError","frame_rate","decodeAudio","MP3","fetch","emitSectionSlices","chroma_format","decodeVideo","isWorkerFetch","write","Webcodecs Video Decoder initSize","isStateEnded","sampleRate","onReady()","audio_track_","mseSourceBufferError","meta","decodeAudio() and decoder is destroyed","TAG","timed_id3_pids"," ms","\n diff is ","_onMediaSourceSourceOpen"," > ","nakedFlowDemuxUseNew","delta","isXorCrypto","useMSE","listenMp4Box","sync_byte = ","mp4a.40.","cacheTrack","kSliceIDR","codecWidth","handleSectionSlice","socket is not open and state is","removeSourceBuffer() sourceBuffer","readNextAACFrame","kMetadata","isVideoInited","hvcC","iframeIntervalTs","isFirefox","parseVideo264Header","43324cqckXD","openWebglAlignment"," and return","has_video_","prevTimestamp","mp3Demuxer"," next data type is ","isDecodeFirstIIframe","fps_num","writableStream abort() and abortController.signal.aborted is true so return","isTrusted","sendWebsocketMessage","close() and writableStream.close() error","isMpeg4"," and\n ts is ","dispatchAudioInitSegment","onMediaSourceSourceOpen() audioSourceBuffer is null and next init","worker fmp4Demuxer","audioBufferSize","playbackStreamVideoFps","buffer",", stream_id=","handleVideoH265NaluList","sarDen","videoBufferDelay","AC3: Sampling Frequency changed from ","mimeType","indexOf","fetchStatus","loop() isPushDropping is true and bufferList length is ","file_position","timescale_","pendingAudioSegments","findSei","sort","seqHeader","bit_stream_identification","Opus: Channel count changed from ","correctSamplePts dts, dts: ","program_number","DataStream"," less than bufferStartDts is ","prevDts","Jb pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng","yuvData ts ","section_slice_queues_","isM7sCrypto cryptoKey.length is ","onmessage:","writableStream pipeTo() and e is","pcmData, decoder is destroyed and return","handleVideoH264NaluList","audioAACSequenceHeader","writableStream","scte_35_pids","stopId","demuxMpeg4","first_parse_","init","_decodeAudioConfigurationRecord",", and set streamFps is 25","loop() common dumex delay is -1 ,data.ts is",", height: ","body","isSm4CryptoH265V2","isFlv","streamAudioFps","decodeVideo: simd decode error, and return","parseSPS$2"," and prev dts is ","streamVideoFps","assign","close() and socket.readyState is ","_initPmt","preDelayTimestamp","ID3 ","cryptoKey","decodeDiffTimestamp","random_access_indicator","$video","demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is ","webglObj","parseSCTE35","getIncompleteData","getTime","loop() dropBuffer is dropping and isIFrame ","networkDelay","start","_doAppendSegments","kAC3","getAudioBufferLength","hasInit","doDecode","parseLOASAACPayload","expected_length"," and maxDiff is ","mseSourceBufferError mseDecoder.sourceBuffer","total_length","getBuildTime","remove","mseSourceBufferError mseDecoder.audioSourceBuffer","isStateOpen","_decodeVideo payload bytes is 0 and return",", new height is ","flags","size","config",", pts=","key","has not init video codec","parsedOffset","webgl","videoPayload","VideoDecoder error: ","playbackCacheBeforeDecodeForFpsRender, calc streamVideoFps is ","stbl","videoBuffer","emitPESSlices","HEAPF32","mediaSource video sourceBuffer error","removeEventListener","audioSourceBuffer",", streamFps is ","isPlaybackOnlyDecodeIFrame","parsePESPrivateDataPayload","options","calcIframeIntervalTimestamp"," is not corresponded to PMT!","mediaSource audio sourceBuffer error","parseVideo265Header","parseADTSAACPayload","handlePESSlice","avcc","mp4Box","video_init_segment_dispatched_","preventDefault",'video/mp2t; codecs="',"parsePAT: table_id ",",and old bufferList length is ","catch","presentWidth","getState","loas_previous_frame","debug","detectAudioMetadataChange","code is ","program_pmt_map_","codecHeight","handleVideoH264Nalu","lastBuffer","cryptoPayload","setCodecAudio: audioDecoder or audioDecoder.setCodec is null","avc","audioDecode","send","stringify","mseDecoder.mediaSourceAppendBufferFull is true","demuxFlv() isVideoSequenceHeader is true and isHevc is ","setCodecVideo","AAC: SamplingFrequencyIndex changed from ","workerFetch","calcNetworkDelay"," and prev time is ","networkDelayTimeout"," isIFrame is ","videoCodec","VideoDecoder","_stopCheckWsOpenTimeout",",\n and prevPayloadBufferSize is ","PACKET_TYPE_SEQ_START","width: ",", bufferList is ",",nalu type is ","isWidthOrHeightChanged","_doDecodeAudio"," and bufferlist is ","audioSampleRate","pes_slice_queues_","kSliceCRA_NUT","sps","fetch().catch() and e.name is AbortError so return","decodeVideo has not init , isIframe is ","url","AC3: Low Frequency Effects Channel On changed from ","g711a","codec",", and ts is ","sm4CryptoKey","258fRNZYc","parseG711Payload","_initSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()","localDts","scriptData","sampling_index","_initSourceBuffer","onclose","pipeTo"," _opt.sampleRate is ","_doRemoveRanges() sourceBuffer error","demuxM7s() type is video and arrayBuffer length is ","calcNetworkDelay, dts is ","isDestroyed","message","worker MediaSource","writableStream close()","dropBuffer$2() iFrameIndex is ","decoder",",\n firstRenderTime is ","AAC: Channel configuration changed from ","pushBuffer","getSourceBufferUpdating","drawImage","needClear","isAvc","kSliceNonIDR","setCodec","Opus: SamplingFrequencyIndex changed from ","_decodeVideo now time is ","Video: Codec mimeType changed from ","audioSourceBufferCheckTimeout","entries"," and payload size is ","ac-3","workerEnd"," and mseDecoder.audioMimeType is ",", next dts: ","readBits","current_pmt_pid_","has_audio_","handleVideoH264Frames","writableStream write() and requestAbort is true so return"," and\n payloadBufferSize is ","streamType","present_size","AAC: Unknown pts","videoType","getTrackById","_checkTsIsMaxDiff","kMPEG2Audio","pid_stream_type","dispatchAudioVideoMediaSegment","createImageBitmap","handleAddNaluStartCode","ms and return ","simdH264DecodeVideoWidthIsTooLarge","decodeVideo: video width or height is changed, and return","kH264","onOffscreenCanvasWebglContextLost","handleVideoH265Frames","fetchStream, WebsocketStream socket error"," and is Trial Version[试用版本]","synchronous_klv_pids","yuvData, decoder is destroyed and return","audioSequenceNumber",", preTs is ","now","protocols","mediaSource is end","streamEndInner","doPlaybackCacheLoop","getNaluDts","isM7sCrypto","G711A","findIndex"," and packetType is ","isInitSegmentDispatched","kEAC3","ms, PES pts: ","isFmp4","isKeyframe","complete","original_codec_mimetype","onOffscreenCanvasWebglContextRestored","Parsed first PAT: ","kSliceIDR_N_LP","video_metadata_changed_","pat_","sourceBuffer","sampling_frequency","abortSourceBuffer","isPlaybackCacheBeforeDecodeForFpsRender","height"," and isNotPushDropping is ","slices","code","useOffscreen","getNearestTimestampMilliseconds","match","mediaSourceAddSourceBufferError","yuvData, transferToImageBitmap error is","firstAudioTime","webglcontextlost","hasInitVideoCodec","abort","pushBuffer,\n preTimestamp is ","ec-3","tempStream"," and update next dts increase 5ms","ALAW","pts","getVideoBufferLength","27384JYeEJb","_decodeAudioConfigurationRecord audio codec is not support , codecId is ","type"," so drop this frame","offset",", pid: ","mp4",";codecs=","startTimestamp","decodeVideo\n local dts is < 0 , ts is ","pushLatestDelay","Asynchronous KLV Metadata: pid=","g711u","abort catch","_hasPendingSegments","AudioDecoder","Video: Present resolution width changed from ","mseAutoCleanupSourceBuffer","ms and diffFps is ","decodeVideo is max diff , ts is ","Unsupported stream. type: ","audioSourceNoDataCheckTimeout","lastBuf"," and mseDecoder.isAvc === null is ","startPlaybackCacheLoop","firstRenderTime","streamFps","object_type"," and height is ","streamVideoType","hasPendingEos","parsePAT","_preDoDecode","mseAutoCleanupMaxBackwardDuration","extractH264SEI","parseSPS","mseAutoCleanupMinBackwardDuration","checkFirstIFrame","writableStream abort() and e.name is AbortError so return","_doAppendSegments() audioSourceBuffer is null and need init audio source buffer","VideoDecoder configure error","decodeVideo and webcodecs configure is","readyState","resetAllDelay","AAC",", isVideoSequenceHeader is true","visibility","getContextAttributes"," , payload is ","onSamples","demuxTs","hasAudioInit","mediaSourceAppendBufferError","websocketOpen","playType","playbackCacheLoop"," , message is ","log","refSampleDuration","kPESPrivateData","pcmData ts ","kSlicePPS","cryptoIV","some","debugError","min","sample_rate","mediaSource is not attached to video or mediaSource is closed","pushBuffer video ts is "," cacheTrack dts is ","\n decodeVideo: video width or height is changed,\n old width is "," ,new bufferList is ","timeInit","onopen","codec_size","renderYUV","isStateClosed","stencil",", options.ts is ","mseUpdateVideoTimestamp","decodeAudio\n local dts is < 0 , ts is ","dispatch","mseDecoder.sourceBuffer.appendBuffer()","sequenceHeader","_decodeAudio","addSourceBuffer","onMediaSourceSourceOpen() sourceBuffer is null and next init","channel_mode","network_pid","AC3: Channel Mode changed from ","dropping","readUEG","s and status is ","23464yJaxOZ","addEventListener","sourceOpen","decodeVideo dts is equal to prev dts and payload size is equal to prev payload size so drop this frame","isfms","setCodecVideo: hasInitVideoCodec is false, codecId is "," and emit replay","decodeVideo first frame is not iFrame"];return(wc=function(){return e})()}function Sc(e,t){var r=Ec();return(Sc=function(e,t){return r[e-=372]})(e,t)}function Ec(){var e=["78gMzCBp","8DecNoH","361290WtKoNJ","303424xudvyK","984792ySdsdP","59270WMAOXF","688zYFwbW","35NCdOMb","2158300jrFYiu","150NrVKvF","11vehoAa","2077695WBFRkF","postRun"];return(Ec=function(){return e})()}!function(e,t){const r=bc,n=e();for(;;)try{if(237728===-parseInt(r(553))/1*(parseInt(r(610))/2)+parseInt(r(534))/3+-parseInt(r(1003))/4*(parseInt(r(1183))/5)+parseInt(r(797))/6*(-parseInt(r(910))/7)+parseInt(r(374))/8+-parseInt(r(1037))/9+parseInt(r(1016))/10*(parseInt(r(1190))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(wc),Date[gc(864)]||(Date[gc(864)]=function(){const e=gc;return(new Date)[e(693)]()}),console[gc(967)](gc(264)+zt+":"+Nt+gc(859));var Ic=Sc;!function(e,t){for(var r=Sc,n=e();;)try{if(310383===-parseInt(r(376))/1*(parseInt(r(384))/2)+-parseInt(r(379))/3*(-parseInt(r(372))/4)+parseInt(r(374))/5+parseInt(r(381))/6*(parseInt(r(373))/7)+parseInt(r(380))/8*(parseInt(r(377))/9)+-parseInt(r(375))/10*(parseInt(r(382))/11)+parseInt(r(383))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ec),h[Ic(378)]=function(){!function(){const e=gc;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[e(419)]>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[e(419)]>2&&void 0!==arguments[2]&&arguments[2],i=arguments[e(419)]>3&&void 0!==arguments[3]&&arguments[3],s=[],o=[],a=null,c=null,u=null,l=null,d=null,f=null,h=!1,p=null,m=null,v=!1,y=!1,_=!!Zt(n),g=0,b=0,w=!1,S=null,E=null,I=null,A=[],k=null,C=null,T=0,x=0,D=null,B=null,M=0,P=0,F=null,U=!1,R=!1,L=!1,O=null,N=null,z=!1,H=!0,V=0,j=0,W=null,G=null,q=null,Y=()=>{const t=e,r=Jt();return{debug:r[t(752)],debugLevel:r.debugLevel,debugUuid:r[t(267)],useOffscreen:r[t(894)],useWCS:r[t(509)],useMSE:r[t(593)],videoBuffer:r[t(725)],videoBufferDelay:r[t(634)],openWebglAlignment:r[t(611)],playType:r[t(964)],hasAudio:r[t(1110)],hasVideo:r[t(494)],playbackRate:1,playVodRate:1,playbackFps:r[t(253)][t(390)],playbackDefaultFps:r.playbackFps,playbackAutoCalcFps:r[t(253)].autoCalcFps,playbackForwardMaxRateDecodeIFrame:r[t(1012)],playbackIsCacheBeforeDecodeForFpsRender:r[t(253)][t(222)],sampleRate:0,networkDelay:r.networkDelay,visibility:!0,useSIMD:r.useSIMD,isRecording:!1,recordType:r[t(293)],isNakedFlow:r[t(341)],checkFirstIFrame:r[t(947)],audioBufferSize:1024,isM7sCrypto:r[t(870)],isCryptoAudio:r[t(348)],cryptoKey:r.cryptoKey,cryptoIV:r[t(972)],isSm4Crypto:r.isSm4Crypto,isSm4CryptoH265V2:r[t(673)],sm4CryptoKey:r.sm4CryptoKey,isXorCrypto:r[t(592)],isHls265:!1,isFlv:r[t(674)],isFmp4:r[t(877)],isMpeg4:r.isMpeg4,isTs:r.isTs,isEmitSEI:r.isEmitSEI,isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isFirefox:!1,isDropSameTimestampGop:r[t(1088)],mseDecodeAudio:r[t(1136)],wcsDecodeAudio:r[t(530)],nakedFlowH265DemuxUseNew:r[t(1114)],mseDecoderUseWorker:r[t(1167)],mseAutoCleanupSourceBuffer:r[t(927)],mseAutoCleanupMaxBackwardDuration:r[t(943)],mseAutoCleanupMinBackwardDuration:r[t(946)],mseCorrectTimeDuration:r[t(1054)],mseCorrectAudioTimeDuration:r[t(544)],nakedFlowDemuxUseNew:r[t(590)],nakedFlowFps:r[t(229)],supportMSEDecodeHevc:!1,checkStreamEnd:!0,websocketOpenTimeout:r.websocketOpenTimeout}};"VideoEncoder"in self&&(a={TAG_NAME:e(477),hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:null,init(){const t=e;a[t(815)]=new VideoDecoder({output:function(e){const r=t;if(Wt(e[r(850)]))e[r(850)]()[r(557)]((t=>{const n=r;a[n(1147)].drawImage(t,0,0,e[n(1141)],e.codedHeight);let i=a[n(1022)][n(1121)]();postMessage({cmd:Te[n(398)],buffer:i,delay:ee[n(1122)],ts:0},[i]),Yt(e)}));else{a[r(1147)][r(820)](e,0,0,e[r(1141)],e[r(314)]);let t=a[r(1022)][r(1121)]();postMessage({cmd:Te[r(398)],buffer:t,delay:ee[r(1122)],ts:0},[t]),Yt(e)}},error:function(e){const r=t;ee[r(974)](r(305),r(722),e,e[r(488)]())}}),ee.debugLog(a[t(1128)],"init")},destroy(){const t=e;a[t(1075)](),a[t(815)]&&a[t(815)][t(385)]!==t(524)&&(a.decoder[t(516)](),a[t(815)]=null),ee.debugLog(a[t(1128)],t(511))},decode:function(t,r,n){const i=e,s=t[0]>>4==1;if(a[i(700)]){const e=new EncodedVideoChunk({data:t[i(1069)](5),timestamp:r,type:s?Ve[i(717)]:Ve[i(591)]});try{a[i(815)][i(532)](e)}catch(e){}}else if(s&&t[1]===Xe[i(993)]){const e=15&t[0];postMessage({cmd:Te.videoCode,code:e});const r=new Uint8Array(t);postMessage({cmd:Te.videoCodec,buffer:r,codecId:e},[r[i(630)]]);let n=null,s=null;const o=t[i(1069)](5);if(e===Le[i(545)]?(s=Tr(o),n={codec:s[i(794)],description:o}):e===Le[i(436)]&&(s=an(o),n={codec:s[i(794)],description:o}),!n||n&&!n[i(794)]||s&&0===s.codecWidth&&0===s[i(756)])return void ee[i(1027)](a[i(1128)],i(951),JSON[i(764)](n));s&&s[i(599)]&&s[i(756)]&&(n[i(314)]=s[i(756)],n[i(1141)]=s[i(599)]),!a.isEmitInfo&&(ee[i(417)](i(305),i(576)),postMessage({cmd:Te[i(562)],w:s[i(599)],h:s[i(756)]}),a[i(450)]=!0,a[i(1022)]=new OffscreenCanvas(s[i(599)],s[i(756)]),a.offscreenCanvasCtx=a.offscreenCanvas[i(514)]("2d")),ee[i(478)][i(293)];try{a[i(815)][i(1144)](n),a[i(700)]=!0}catch(e){ee[i(974)]("worker",i(950),e[i(893)],e,e[i(488)]()),e.toString()}}else ee[i(1027)](i(305),i(1082)+s+" , payload is "+t[1]+" so drop this frame")},reset(){const t=e;a[t(700)]=!1,a[t(450)]=!1,a[t(1022)]=null,a[t(1147)]=null}});let K=function(){const t=e;if(z=!0,c)try{c[t(902)](),c=null,ee[t(417)]("worker","abort success")}catch(e){c=null,ee[t(417)](t(305),t(923),e)}},X={TAG_NAME:"worker nakedFlow",init(){const t=e;X[t(932)]=null,X[t(354)]=null,X.sps=null,X[t(484)]=null,X[t(841)]=null,X[t(800)]=0,X.pendingUnits={},X.isSendSeqHeader=!1,ee[t(417)](X[t(1128)],t(667))},destroy(){const t=e;X[t(932)]=null,X[t(354)]=null,X.sps=null,X[t(484)]=null,X[t(841)]=null,X[t(800)]=0,X.pendingUnits={},X[t(220)]=!1,ee.debugLog(X.TAG_NAME,t(511))},dispatch(t){const r=e,n=new Uint8Array(t);if(ee._opt[r(590)]){const e=X[r(338)](n);if(0===e[r(419)])return void ee[r(417)](X.TAG_NAME,"dispatch naluArray length is 0");X.handleVideoFrames(e)}else X[r(1127)](n)},getNaluDts(){const t=e,r=ee[t(478)][t(229)];let n=X[t(800)];return X[t(800)]=X[t(800)]+parseInt(1e3/r,10),n},getNaluAudioDts(){const t=e,r=ee._opt[t(578)],n=ee[t(478)][t(628)];return X[t(800)]+parseInt(n/r*1e3)},extractNALu(t){const r=e;let n,i,s=0,o=t[r(317)],a=0,c=[];for(;s1)for(let e=0;e{const t=r,n=Fr(e);n===ze[t(484)]||n===ze.sps?X[t(757)](e):Rr(n)&&i[t(1181)](e)})),1===i.length)X[r(757)](i[0]);else if(Or(i)){const e=Fr(i[0]),t=Lr(e);X[r(660)](i,t,e)}else i.forEach((e=>{X[r(757)](e)}))}else if(X.streamType===Oe[r(436)])if(ee._opt[r(1114)]){const e=X[r(851)](t),n=X[r(445)](e);if(0===n[r(419)])return void ee.debugWarn(r(305),r(1071),r(373));const i=[];if(n[r(1170)]((e=>{const t=r,n=fn(e);n===He[t(484)]||n===He[t(788)]||n===He[t(354)]?X.handleVideoH265Nalu(e):mn(n)&&i[t(1181)](e)})),1===i[r(419)])X[r(1074)](i[0]);else if(yn(i)){const e=fn(i[0]),t=vn(e);X[r(632)](i,t,e)}else i[r(1170)]((e=>{X[r(1074)](e)}))}else fn(t)===He[r(484)]?X[r(1130)](t):X[r(1074)](t)},extractH264PPS(t){const r=e,n=X[r(851)](t);X[r(445)](n)[r(1170)]((e=>{const t=r;Ur(Fr(e))?X[t(944)](e):X[t(757)](e)}))},extractH265PPS(t){const r=e,n=X[r(851)](t);X[r(445)](n)[r(1170)]((e=>{const t=r;hn(fn(e))?X[t(554)](e):X[t(1074)](e)}))},extractH264SEI(t){const r=e,n=X[r(851)](t);X[r(445)](n).forEach((e=>{X[r(757)](e)}))},extractH265SEI(t){const r=e,n=X[r(851)](t);X[r(445)](n).forEach((e=>{X[r(1074)](e)}))},handleAddNaluStartCode(t){const r=e,n=[0,0,0,1],i=new Uint8Array(t[r(419)]+n[r(419)]);return i.set(n),i[r(356)](t,n.length),i},handleVideoH264Nalu(t){const r=e,n=Fr(t);switch(n){case ze[r(788)]:X.sps=t;break;case ze[r(484)]:X.pps=t}if(X[r(220)]){if(X.sps&&X[r(484)]){const e=Dr({sps:X[r(788)],pps:X[r(484)]}),t=X[r(800)];ee.decode(e,{type:xe.video,ts:t,isIFrame:!0,cts:0}),X[r(788)]=null,X[r(484)]=null}if(Rr(n)){const e=Lr(n),i=X[r(869)](),s=Mr(t,e);X[r(701)](s,{type:xe[r(375)],ts:i,isIFrame:e,cts:0})}}else if(X.sps&&X[r(484)]){X[r(220)]=!0;const e=Dr({sps:X[r(788)],pps:X[r(484)]});ee[r(532)](e,{type:xe[r(375)],ts:0,isIFrame:!0,cts:0}),X[r(788)]=null,X[r(484)]=null}},handleVideoH264NaluList(t,r,n){const i=e;if(X.isSendSeqHeader){const e=X[i(869)](),s=Pr(t[i(1096)](((e,t)=>{const r=i,n=xt(e),s=xt(t),o=new Uint8Array(n[r(317)]+s[r(317)]);return o[r(356)](n,0),o.set(s,n[r(317)]),o})),r);X[i(701)](s,{type:xe[i(375)],ts:e,isIFrame:r,cts:0}),ee[i(417)](i(305),i(560)+t[i(419)]+i(1117)+s[i(317)]+i(773)+r+i(781)+n+i(1063)+e)}},handleVideoH265Nalu(t){const r=e,n=fn(t);switch(n){case He.vps:X[r(354)]=t;break;case He[r(788)]:X[r(788)]=t;break;case He[r(484)]:X[r(484)]=t}if(X[r(220)]){if(X[r(354)]&&X[r(788)]&&X[r(484)]){const e=un({vps:X[r(354)],sps:X[r(788)],pps:X[r(484)]}),t=X.localDts;ee[r(532)](e,{type:xe[r(375)],ts:t,isIFrame:!0,cts:0}),X[r(354)]=null,X.sps=null,X.pps=null}if(mn(n)){const e=vn(n),i=X.getNaluDts(),s=ln(t,e);X.doDecode(s,{type:xe[r(375)],ts:i,isIFrame:e,cts:0})}}else if(X.vps&&X[r(788)]&&X.pps){X[r(220)]=!0;const e=un({vps:X[r(354)],sps:X[r(788)],pps:X[r(484)]});ee.decode(e,{type:xe[r(375)],ts:0,isIFrame:!0,cts:0}),X[r(354)]=null,X[r(788)]=null,X[r(484)]=null}},handleVideoH265NaluList(t,r,n){const i=e;if(X[i(220)]){const e=X[i(869)](),s=dn(t.reduce(((e,t)=>{const r=i,n=xt(e),s=xt(t),o=new Uint8Array(n[r(317)]+s[r(317)]);return o[r(356)](n,0),o[r(356)](s,n[r(317)]),o})),r);X[i(701)](s,{type:xe[i(375)],ts:e,isIFrame:r,cts:0}),ee[i(417)]("worker","handleVideoH265NaluList list size is "+t[i(419)]+i(1117)+s[i(317)]+i(773)+r+i(781)+n+", dts is "+e)}},doDecode(t,r){const n=e;ee[n(770)](r.ts),r[n(415)]&&ee.calcIframeIntervalTimestamp(r.ts),ee.decode(t,r)},handleVideoFrames(t){const r=e;if(!X[r(939)])for(let e of t)if(X.streamVideoType=Gt(e),X.streamVideoType)break;X[r(939)]?X.streamVideoType===Oe[r(545)]?X[r(838)](t):X[r(939)]===Oe[r(436)]&&X[r(857)](t):ee[r(1027)](r(305),r(549),r(258))},handleVideoH264Frames(t){const r=e;let n=[],i=[],s=!1,o=!1;X.pendingUnits[r(1123)]&&(n=X.pendingUnits[r(1123)],o=X[r(364)][r(270)],s=X[r(364)][r(434)],X[r(364)]={});let a={};for(let e of t){if(e[r(317)]<4)continue;const t=Fr(e);let c=!1,u=t===ze[r(598)];(t===ze[r(823)]||t===ze.kSliceIDR)&&(a=X[r(609)](e),c=!0),n.length&&o&&(a[r(1007)]||!c)&&(i.push({units:n,isIFrame:s}),n=[],s=!1,o=!1),n.push(e),s=s||u,o=o||c}n[r(419)]&&(X[r(364)]={units:n,vcl:o,iFrame:s}),i[r(1170)]((e=>{const t=r,n=e[t(1123)],i=e[t(415)];let s=null,o=null;if(n[t(1170)]((e=>{const r=t,n=31&e[0];switch(n){case ze[r(484)]:X[r(484)]=e;break;case ze.sps:X.sps=e;break;case ze.kSliceSEI:o=e}if(Rr(n)){const t=xt(e);if(s){const e=new Uint8Array(s.byteLength+t[r(317)]);e[r(356)](s,0),e.set(t,s[r(317)]),s=e}else s=t}})),!X[t(220)]&&X[t(788)]&&X[t(484)]){X[t(220)]=!0;const e=Br({sps:X.sps,pps:X[t(484)]});ee.decode(e,{type:xe[t(375)],ts:0,isIFrame:!0,cts:0}),X[t(788)]=null,X[t(484)]=null}if(X.isSendSeqHeader){if(X[t(788)]&&X[t(484)]){const e=Br({sps:X[t(788)],pps:X[t(484)]}),r=X[t(800)];ee[t(532)](e,{type:xe[t(375)],ts:r,isIFrame:!0,cts:0}),X[t(788)]=null,X[t(484)]=null}if(s){const e=X[t(869)](),r=Pr(s,i);if(ee[t(478)][t(1150)]&&o){const r=Tt(o,!1);postMessage({cmd:Te[t(290)],buffer:r.payload,ts:e},[r[t(1106)].buffer])}X.doDecode(r,{type:xe.video,ts:e,isIFrame:i,cts:0})}}}))},handleVideoH265Frames(t){const r=e;let n=[],i=[],s=!1,o=!1;X[r(364)][r(1123)]&&(n=X[r(364)][r(1123)],o=X[r(364)][r(270)],s=X.pendingUnits.iFrame,X[r(364)]={});let a={};for(let e of t){if(e[r(317)]<4)continue;const t=fn(e);let c=!1,u=vn(t);mn(t)&&(a=X[r(738)](e),c=!0),n[r(419)]&&o&&(a[r(1007)]||!c)&&(i[r(1181)]({units:n,isIFrame:s}),n=[],s=!1,o=!1),n[r(1181)](e),s=s||u,o=o||c}n[r(419)]&&(X[r(364)]={units:n,vcl:o,iFrame:s}),i[r(1170)]((e=>{const t=r,n=e.units,i=e.isIFrame;let s=null,o=null;if(n[t(1170)]((e=>{const r=t,n=e[0]>>>1&63;switch(n){case He.pps:X.pps=e;break;case He[r(788)]:X[r(788)]=e;break;case He.vps:X[r(354)]=e;break;case He[r(241)]:case He[r(535)]:o=e}if(mn(n)){const t=xt(e);if(s){const e=new Uint8Array(s[r(317)]+t.byteLength);e[r(356)](s,0),e[r(356)](t,s.byteLength),s=e}else s=t}})),!X[t(220)]&&X[t(788)]&&X.pps&&X[t(354)]){X[t(220)]=!0;const e=un({sps:X[t(788)],pps:X[t(484)],vps:X.vps});ee[t(532)](e,{type:xe[t(375)],ts:0,isIFrame:!0,cts:0}),X.sps=null,X[t(484)]=null,X[t(354)]=null}if(X[t(220)]){if(X[t(788)]&&X.pps&&X[t(354)]){const e=un({sps:X.sps,pps:X[t(484)],vps:X[t(354)]}),r=X[t(800)];ee[t(532)](e,{type:xe[t(375)],ts:r,isIFrame:!0,cts:0}),X[t(788)]=null,X.pps=null,X[t(354)]=null}if(s){const e=X.getNaluDts(),r=dn(s,i);if(ee[t(478)].isEmitSEI&&o){const r=Tt(o,!0);postMessage({cmd:Te[t(290)],buffer:r[t(1106)],ts:e},[r[t(1106)][t(630)]])}X[t(701)](r,{type:xe[t(375)],ts:e,isIFrame:i,cts:0})}}}))},handleVideoH265Frames_1(e){e.forEach((e=>{X.handleVideoNalu(e)}))},parseVideo264Header(t){const r=e,n=new rc(t);return n[r(1048)](),{isfms:0===n.readUEG(),sType:n[r(1001)]()}},parseVideo265Header(t){const r=e,n=new rc(t);return n.readUByte(),{nalType:n.readBits(6),isfms:0===n[r(835)](1),sType:n[r(835)](3)}}},J={LOG_NAME:e(627),mp4Box:null,offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){const t=e;J[t(742)]=Bo[t(517)](),J[t(742)][t(1014)]=J[t(1014)],J.mp4Box[t(566)]=J.onError,J[t(742)][t(959)]=J[t(959)],ee[t(417)](J[t(252)],t(667))},destroy(){const t=e;J.mp4Box&&(J[t(742)][t(1145)](),J[t(742)][t(1134)](),J[t(742)][t(511)](),J[t(742)]=null),J[t(914)]=0,J.videoTrackId=null,J[t(1018)]=null,J[t(395)]=!1,ee[t(417)](J.LOG_NAME,"destroy")},_getSeqHeader(t){const r=e,n=J[r(742)][r(845)](t.id);for(const e of n.mdia.minf[r(724)][r(563)][r(829)])if(e[r(282)]||e[r(606)]){const t=new(Bo[r(650)])(void 0,0,Bo[r(650)][r(1154)]);let n=[];e[r(282)]?(e[r(282)][r(575)](t),n=[23,0,0,0,0]):(J.isHevc=!0,ee[r(395)]=!0,e[r(606)][r(575)](t),n=[28,0,0,0,0]);const i=new Uint8Array(t[r(630)],8),s=new Uint8Array(n[r(419)]+i[r(419)]);return s.set(n,0),s.set(i,n[r(419)]),s}return null},onReady(t){const r=e;ee[r(417)](J.LOG_NAME,r(579));const n=t[r(306)][0],i=t.audioTracks[0];if(n){J[r(245)]=n.id;const e=J._getSeqHeader(n);e&&(ee.debugLog(J[r(252)],r(645)),ee[r(573)](e,0,!0,0)),J[r(742)][r(316)](n.id)}if(i&&ee[r(478)].hasAudio){J[r(1018)]=i.id;const e=i.audio||{},t=mt[r(637)](e[r(976)]),n=i[r(794)].replace(r(596),"");J[r(742)].setExtractionOptions(i.id);const s=vt({profile:parseInt(n,10),sampleRate:t,channel:e[r(540)]});ee[r(417)](J.LOG_NAME,r(1094)),ee[r(568)](s,0)}J[r(742)].start()},onError(t){const r=e;ee[r(974)](J[r(252)],r(473),t)},onSamples(t,r,n){const i=e;if(t===J[i(245)]){for(const e of n){const t=e.data,r=e[i(543)],n=1e3*e[i(1129)]/e[i(537)];e[i(1143)],e[i(537)],r&&ee[i(735)](n);let s=null;s=J[i(395)]?dn(t,r):Pr(t,r),ee[i(532)](s,{type:xe.video,ts:n,isIFrame:r,cts:0})}J[i(742)].removeUsedSamples(t)}else if(t===J.audioTrackId){if(ee[i(478)].hasAudio){for(const e of n){const t=e[i(455)],r=1e3*e[i(1129)]/e[i(537)];e[i(1143)],e[i(537)];const n=new Uint8Array(t[i(317)]+2);n[i(356)]([175,1],0),n[i(356)](t,2),ee[i(532)](n,{type:xe[i(513)],ts:r,isIFrame:!1,cts:0})}J.mp4Box.removeUsedSamples(t)}}else ee[i(1027)](J.LOG_NAME,i(1103),t)},dispatch(t){const r=e;let n=new Uint8Array(t);n.buffer[r(1076)]=J[r(914)],J[r(914)]+=n[r(317)],J.mp4Box[r(1184)](n[r(630)])}},$={LOG_NAME:e(1107),lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:e(667),hasInitVideoCodec:!1,localDts:0,dispatch(t){const r=e,n=new Uint8Array(t);$[r(445)](n)},destroy(){const t=e;$[t(758)]=new Uint8Array(0),$.parsedOffset=0,$.firstStartCodeOffset=0,$[t(1139)]=0,$.state=t(667),$[t(901)]=!1,$[t(800)]=0,ee[t(417)]($[t(252)],t(511))},extractNALu(t){const r=e;if(!t||t[r(317)]<1)return void ee[r(1027)]($[r(252)],"extractNALu() buffer error",t);const n=new Uint8Array($[r(758)].length+t[r(419)]);for(n[r(356)]($.lastBuffer,0),n[r(356)](new Uint8Array(t),$[r(758)][r(419)]),$[r(758)]=n;;){if($[r(385)]===r(667)){let e=!1;for(;$[r(758)][r(419)]-$[r(719)]>=4;)if(0===$.lastBuffer[$[r(719)]])if(0===$[r(758)][$[r(719)]+1])if(1===$[r(758)][$[r(719)]+2]){if(182===$[r(758)][$[r(719)]+3]){$.state=r(1138),$[r(1025)]=$[r(719)],$[r(719)]+=4,e=!0;break}$.parsedOffset++}else $.parsedOffset++;else $[r(719)]++;else $[r(719)]++;if(e)continue;break}if($[r(385)]===r(1138)){let e=!1;for(;$.lastBuffer[r(419)]-$.parsedOffset>=4;)if(0===$[r(758)][$[r(719)]])if(0===$[r(758)][$[r(719)]+1])if(1===$[r(758)][$[r(719)]+2]){if(182===$.lastBuffer[$.parsedOffset+3]){$.state=r(526),$[r(1139)]=$[r(719)],$[r(719)]+=4,e=!0;break}$.parsedOffset++}else $[r(719)]++;else $.parsedOffset++;else $.parsedOffset++;if(e)continue;break}if("findSecondStartCode"===$.state){if(!($[r(758)][r(419)]-$.parsedOffset>0))break;{let e,t=192&$[r(758)][$[r(719)]];e=0==t?$[r(1139)]-14:$[r(1139)];let n,i=0==(192&$.lastBuffer[$[r(1025)]+4]);if(i){if($[r(1025)]-14<0)return void ee.debugWarn($[r(252)],"firstStartCodeOffset -14 is",$[r(1025)]-14);!$[r(901)]&&($[r(901)]=!0,ee.debugLog($[r(252)],r(824)),re[r(824)](Le.mpeg4,"",ee[r(707)]())),n=$.lastBuffer[r(226)]($.firstStartCodeOffset-14,e)}else n=$[r(758)][r(226)]($[r(1025)],e);let s=$[r(869)]();$[r(901)]?(postMessage({cmd:Te[r(769)],type:Me[r(1051)],value:n.byteLength}),postMessage({cmd:Te[r(769)],type:Me[r(1033)],value:s}),g=s,re.decode(n,i?1:0,s)):ee[r(1027)]($.LOG_NAME,r(718)),$[r(758)]=$.lastBuffer[r(226)](e),0==t?$[r(1025)]=14:$.firstStartCodeOffset=0,$[r(719)]=$[r(1025)]+4,$[r(385)]="findFirstStartCode"}}}},getNaluDts(){const t=e;let r=$.localDts;return $[t(800)]=$[t(800)]+40,r}},Z={TAG_NAME:"worker TsLoaderV2",first_parse_:!0,tsPacketSize:0,syncOffset:0,pmt_:null,config_:null,media_info_:new Za,timescale_:90,duration_:0,pat_:{version_number:0,network_pid:0,program_map_pid:{}},current_program_:null,current_pmt_pid_:-1,program_pmt_map_:{},pes_slice_queues_:{},section_slice_queues_:{},video_metadata_:{vps:null,sps:null,pps:null,details:null},audio_metadata_:{codec:null,audio_object_type:null,sampling_freq_index:null,sampling_frequency:null,channel_config:null},last_pcr_:null,audio_last_sample_pts_:void 0,aac_last_incomplete_data_:null,has_video_:!1,has_audio_:!1,video_init_segment_dispatched_:!1,audio_init_segment_dispatched_:!1,video_metadata_changed_:!1,audio_metadata_changed_:!1,loas_previous_frame:null,video_track_:{type:e(375),id:1,sequenceNumber:0,samples:[],length:0},audio_track_:{type:e(513),id:2,sequenceNumber:0,samples:[],length:0},_remainingPacketData:null,init(){},destroy(){const t=e;Z[t(315)]=null,Z[t(786)]=null,Z[t(655)]=null,Z.video_metadata_=null,Z[t(303)]=null,Z[t(268)]=null,Z[t(329)]=null,Z[t(580)]=null,Z[t(1040)]=null,ee[t(417)](Z[t(1128)],t(511))},probe(t){const r=e;let n=new Uint8Array(t),i=-1,s=188;if(n.byteLength<=3*s)return{needMoreData:!0};for(;-1===i;){let e=Math.min(1e3,n[r(317)]-3*s);for(let t=0;t=4&&(i-=4),{match:!0,consumed:0,ts_packet_size:s,sync_offset:i})},_initPmt:()=>({program_number:0,version_number:0,pcr_pid:0,pid_stream_type:{},common_pids:{h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0,g711a:void 0,g711u:void 0},pes_private_data_pids:{},timed_id3_pids:{},synchronous_klv_pids:{},asynchronous_klv_pids:{},scte_35_pids:{},smpte2038_pids:{}}),dispatch(t){const r=e;Z[r(1040)]&&(t=Sa(Z[r(1040)],t),Z[r(1040)]=null);let n=t[r(630)];const i=Z[r(413)](n);i?Z[r(1040)]=t[r(226)](i):t.length>>6;e[1];let o=(31&e[1])<<8|e[2],a=(48&e[3])>>>4,c=15&e[3],u=!(!Z[r(358)]||Z[r(358)][r(1175)]!==o),l={},d=4;if(2==a||3==a){let t=e[4];if(t>0&&(u||3==a)&&(l.discontinuity_indicator=(128&e[5])>>>7,l[r(687)]=(64&e[5])>>>6,l.elementary_stream_priority_indicator=(32&e[5])>>>5,(16&e[5])>>>4)){let t=300*(e[6]<<25|e[7]<<17|e[8]<<9|e[9]<<1|e[10]>>>7)+((1&e[10])<<8|e[11]);Z[r(405)]=t}if(2==a||5+t===188){n+=188,204===Z[r(1116)]&&(n+=16);continue}d=5+t}if(1==a||3==a)if(0===o||o===Z[r(836)]||null!=Z[r(358)]&&Z[r(358)][r(848)][o]===Ya[r(546)]){let e=188-d;Z[r(600)](t,n+d,e,{pid:o,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l[r(687)]})}else if(null!=Z[r(358)]&&null!=Z[r(358)][r(848)][o]){let e=188-d,i=Z.pmt_[r(848)][o];(o===Z.pmt_.common_pids[r(545)]||o===Z[r(358)][r(1102)][r(436)]||o===Z[r(358)][r(1102)][r(486)]||o===Z.pmt_[r(1102)][r(227)]||o===Z[r(358)][r(1102)][r(343)]||o===Z[r(358)][r(1102)][r(357)]||o===Z[r(358)][r(1102)][r(304)]||o===Z[r(358)].common_pids[r(489)]||o===Z[r(358)][r(1102)][r(793)]||o===Z[r(358)][r(1102)].g711u||!0===Z[r(358)][r(496)][o]||!0===Z[r(358)].timed_id3_pids[o]||!0===Z[r(358)][r(860)][o]||!0===Z[r(358)][r(361)][o])&&Z[r(740)](t,n+d,e,{pid:o,stream_type:i,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l[r(687)]})}n+=188,204===Z[r(1116)]&&(n+=16)}return Z[r(849)](),n},handleSectionSlice(t,r,n,i){const s=e;let o=new Uint8Array(t,r,n),a=Z[s(655)][i[s(1113)]];if(i[s(452)]){let e=o[0];if(null!=a&&0!==a[s(706)]){let o=new Uint8Array(t,r+1,Math[s(975)](n,e));a.slices[s(1181)](o),a[s(706)]+=o[s(317)],a.total_length===a.expected_length?Z[s(571)](a,i):Z[s(312)](a,i)}for(let c=1+e;c=a[s(703)]&&Z[s(312)](a,i),c+=u.byteLength}}else if(null!=a&&0!==a[s(706)]){let e=new Uint8Array(t,r,Math.min(n,a[s(703)]-a.total_length));a[s(892)].push(e),a[s(706)]+=e[s(317)],a[s(706)]===a[s(703)]?Z[s(571)](a,i):a[s(706)]>=a[s(703)]&&Z[s(312)](a,i)}},handlePESSlice(t,r,n,i){const s=e;let o=new Uint8Array(t,r,n),a=o[0]<<16|o[1]<<8|o[2];o[3];let c=o[4]<<8|o[5];if(i[s(452)]){if(1!==a)return void ee.debugWarn(Z.TAG_NAME,s(468)+a);let e=Z[s(786)][i[s(1113)]];e&&(0===e[s(703)]||e.expected_length===e.total_length?Z.emitPESSlices(e,i):Z[s(312)](e,i)),Z.pes_slice_queues_[i[s(1113)]]=new Ka,Z[s(786)][i[s(1113)]][s(687)]=i[s(687)]}if(null==Z[s(786)][i[s(1113)]])return;let u=Z.pes_slice_queues_[i[s(1113)]];u.slices[s(1181)](o),i[s(452)]&&(u[s(703)]=0===c?0:c+6),u[s(706)]+=o[s(317)],u[s(703)]>0&&u[s(703)]===u[s(706)]?Z[s(726)](u,i):u[s(703)]>0&&u[s(703)]>>6,c=n[8];(2===a||3===a)&&(e=536870912*(14&n[9])+4194304*(255&n[10])+16384*(254&n[11])+128*(255&n[12])+(254&n[13])/2,i=3===a?536870912*(14&n[14])+4194304*(255&n[15])+16384*(254&n[16])+128*(255&n[17])+(254&n[18])/2:e);let u,l=9+c;if(0!==o){if(o<3+c)return void ee[r(1027)](Z[r(1128)],r(1158));u=o-3-c}else u=n[r(317)]-l;let d=n[r(226)](l,l+u);switch(t.stream_type){case Ya[r(1193)]:case Ya[r(847)]:Z.parseMP3Payload(d,e);break;case Ya[r(969)]:Z[r(358)][r(1102)][r(304)]===t[r(1113)]?Z[r(340)](d,e):Z.pmt_[r(1102)].ac3===t[r(1113)]?Z[r(471)](d,e):Z.pmt_[r(1102)][r(357)]===t.pid?Z.parseEAC3Payload(d,e):Z.pmt_[r(361)][t[r(1113)]]?Z[r(368)](d,t.pid,s):Z[r(358)][r(332)][t.pid]?Z[r(501)](d,e,i,t[r(1113)],s):Z[r(733)](d,e,i,t[r(1113)],s);break;case Ya[r(515)]:Z[r(739)](d,e);break;case Ya[r(302)]:Z[r(702)](d,e);break;case Ya[r(698)]:Z[r(471)](d,e);break;case Ya[r(875)]:Z[r(284)](d,e);break;case Ya[r(604)]:Z[r(358)].timed_id3_pids[t[r(1113)]]?Z[r(334)](d,e,i,t[r(1113)],s):Z[r(358)][r(860)][t[r(1113)]]&&Z.parseSynchronousKLVMetadataPayload(d,e,i,t[r(1113)],s);break;case Ya[r(855)]:Z.parseH264Payload(d,e,i,t[r(687)]);break;case Ya[r(1055)]:Z[r(1097)](d,e,i,t.random_access_indicator);break;case Ya[r(871)]:Z[r(798)](d,e,!0);break;case Ya[r(391)]:Z.parseG711Payload(d,e,!1);break;default:ee[r(417)](Z[r(1128)],r(930)+t[r(527)]+r(915)+t.pid)}}else if((188===s||191===s||240===s||241===s||255===s||242===s||248===s)&&t[r(527)]===Ya[r(969)]){let e,i=6;e=0!==o?o:n[r(317)]-i;let a=n[r(226)](i,i+e);Z[r(733)](a,void 0,void 0,t[r(1113)],s)}}else ee[r(974)](Z[r(1128)],"parsePES: packet_start_code_prefix should be 1 but with value "+i)},parsePAT(t){const r=e;let n=t[0];if(0!==n)return void Log.e(Z[r(584)],r(746)+n+r(565));let i=(15&t[1])<<8|t[2];t[3],t[4];let s=(62&t[5])>>>1,o=1&t[5],a=t[6];t[7];let c=null;if(1===o&&0===a)c={version_number:0,network_pid:0,program_pmt_pid:{}},c[r(1011)]=s;else if(c=Z[r(885)],null==c)return;let u=i-5-4,l=-1,d=-1;for(let e=8;e<8+u;e+=4){let n=t[e]<<8|t[e+1],i=(31&t[e+2])<<8|t[e+3];0===n?c[r(998)]=i:(c.program_pmt_pid[n]=i,-1===l&&(l=n),-1===d&&(d=i))}1===o&&0===a&&(null==Z[r(885)]&&ee[r(417)](Z[r(1128)],r(882)+JSON[r(764)](c)),Z[r(885)]=c,Z[r(499)]=l,Z.current_pmt_pid_=d)},parsePMT(t){const r=e;let n=t[0];if(2!==n)return void ee[r(974)](Z[r(1128)],"parsePMT: table_id "+n+r(736));let i,s=(15&t[1])<<8|t[2],o=t[3]<<8|t[4],a=(62&t[5])>>>1,c=1&t[5],u=t[6];if(t[7],1===c&&0===u)i=Z[r(682)](),i[r(649)]=o,i[r(1011)]=a,Z.program_pmt_map_[o]=i;else if(i=Z[r(755)][o],null==i)return;i[r(1175)]=(31&t[8])<<8|t[9];let l=(15&t[10])<<8|t[11],d=12+l,f=s-9-l-4;for(let e=d;e0){for(let n=e+5;n0)for(let n=e+5;n1&&(ee[n(1027)](Z[n(1128)],n(1034)+(n(1171)+e+n(876)+s+"ms")),s=e)}}let o,a=new wt(t),c=null,u=s;for(;null!=(c=a[n(603)]());){i=1024/c[n(887)]*1e3;const e={codec:n(1161),data:c};0==Z[n(561)]?(Z[n(303)]={codec:n(1161),audio_object_type:c[n(493)],sampling_freq_index:c[n(410)],sampling_frequency:c[n(887)],channel_config:c[n(360)]},Z[n(625)](e)):Z[n(753)](e)&&(Z[n(288)](),Z[n(625)](e)),o=u;let t=Math.floor(u);const r=new Uint8Array(c.data.length+2);r[n(356)]([175,1],0),r[n(356)](c[n(455)],2);let s={payload:r,length:r[n(317)],pts:t,dts:t,type:xe[n(513)]};Z[n(580)][n(422)][n(1181)](s),Z[n(580)][n(419)]+=r[n(317)],u+=i}a[n(1188)]()&&(Z[n(268)]=a[n(692)]()),o&&(Z[n(240)]=o)},parseLOASAACPayload(t,r){const n=e;if(Z.has_video_&&!Z.video_init_segment_dispatched_)return;if(Z.aac_last_incomplete_data_){let e=new Uint8Array(t.byteLength+Z[n(268)][n(317)]);e[n(356)](Z[n(268)],0),e.set(t,Z.aac_last_incomplete_data_[n(317)]),t=e}let i,s;if(null!=r&&(s=r/Z[n(641)]),Z[n(303)].codec===n(1161)){if(null==r&&null!=Z[n(240)])i=1024/Z[n(303)].sampling_frequency*1e3,s=Z[n(240)]+i;else if(null==r)return void ee[n(1027)](Z[n(1128)],n(843));if(Z.aac_last_incomplete_data_&&Z[n(240)]){i=1024/Z.audio_metadata_[n(887)]*1e3;let e=Z.audio_last_sample_pts_+i;Math.abs(e-s)>1&&(ee.debugWarn(Z[n(584)],n(1034)+"expected: "+e+"ms, PES pts: "+s+"ms"),s=e)}}let o,a=new Et(t),c=null,u=s;for(;null!=(c=a[n(603)](Vt(Z[n(751)])?void 0:Z[n(751)]));){Z.loas_previous_frame=c,i=1024/c[n(887)]*1e3;const e={codec:n(1161),data:c};0==Z[n(561)]?(Z[n(303)]={codec:n(1161),audio_object_type:c[n(493)],sampling_freq_index:c[n(410)],sampling_frequency:c[n(887)],channel_config:c[n(360)]},Z[n(625)](e)):Z[n(753)](e)&&(Z[n(288)](),Z[n(625)](e)),o=u;let t=Math[n(236)](u);const r=new Uint8Array(c[n(455)][n(419)]+2);r[n(356)]([175,1],0),r[n(356)](c[n(455)],2);let s={payload:r,length:r.byteLength,pts:t,dts:t,type:xe[n(513)]};Z[n(580)][n(422)].push(s),Z[n(580)][n(419)]+=r[n(317)],u+=i}a[n(1188)]()&&(Z[n(268)]=a.getIncompleteData()),o&&(Z[n(240)]=o)},parseAC3Payload(e,t){},parseEAC3Payload(e,t){},parseOpusPayload(e,t){},parseMP3Payload(t,r){const n=e;if(Z[n(613)]&&!Z[n(743)])return;let i=[44100,48e3,32e3,0],s=[22050,24e3,16e3,0],o=[11025,12e3,8e3,0],a=t[1]>>>3&3,c=(6&t[1])>>1,u=(t[2],(12&t[2])>>>2),l=3!=(t[3]>>>6&3)?2:1,d=0,f=34;switch(a){case 0:d=o[u];break;case 2:d=s[u];break;case 3:d=i[u]}switch(c){case 1:f=34,n(419);break;case 2:f=33,n(419);break;case 3:f=32}const h={};h[n(937)]=f,h.sample_rate=d,h.channel_count=l,h[n(455)]=t;const p={codec:"mp3",data:h};0==Z[n(561)]?(Z.audio_metadata_={codec:n(489),object_type:f,sample_rate:d,channel_count:l},Z[n(625)](p)):Z[n(753)](p)&&(Z[n(288)](),Z.dispatchAudioInitSegment(p));const m=new Uint8Array(t[n(419)]+1);m[n(356)]([32],0),m[n(356)](t,1);let v={payload:m,length:m[n(317)],pts:r/Z[n(641)],dts:r/Z.timescale_,type:xe[n(513)]};Z.audio_track_.samples[n(1181)](v),Z[n(580)][n(419)]+=m[n(317)]},parseG711Payload(t,r,n){const i=e;if(Z.has_video_&&!Z[i(743)])return;const s={};s[i(976)]=8e3,s[i(540)]=1;const o={codec:n?i(793):"g711u"};0==Z[i(561)]?(Z[i(303)]={codec:o[i(794)],sample_rate:s[i(976)],channel_count:s.channel_count},Z[i(625)](o)):Z[i(753)](o)&&(Z[i(288)](),Z[i(625)](o));const a=new Uint8Array(t.length+1),c=n?[114]:[130];a.set(c,0),a[i(356)](t,1);let u={payload:a,length:a.byteLength,pts:r/Z[i(641)],dts:r/Z[i(641)],type:xe[i(513)]};Z[i(580)][i(422)][i(1181)](u),Z[i(580)].length+=a[i(317)]},detectAudioMetadataChange(t){const r=e;if(t[r(794)]!==Z[r(303)][r(794)])return ee[r(417)](Z[r(1128)],"Audio: Audio Codecs changed from "+(Z.audio_metadata_[r(794)]+r(1091)+t[r(794)])),!0;if(t[r(794)]===r(1161)&&Z[r(303)][r(794)]===r(1161)){const e=t[r(455)];if(e[r(493)]!==Z[r(303)][r(493)])return ee[r(417)](Z[r(1128)],r(1070)+(Z[r(303)][r(493)]+r(1091)+e[r(493)])),!0;if(e[r(410)]!==Z[r(303)][r(410)])return ee.debugLog(Z[r(1128)],r(768)+(Z[r(303)][r(410)]+r(1091)+e.sampling_freq_index)),!0;if(e[r(360)]!==Z[r(303)].channel_config)return ee[r(417)](Z[r(1128)],r(817)+(Z[r(303)].channel_config+r(1091)+e[r(360)])),!0}else if(t[r(794)]===r(831)&&"ac-3"===Z[r(303)][r(794)]){const e=t[r(455)];if(e[r(887)]!==Z.audio_metadata_.sampling_frequency)return ee[r(417)](Z.TAG_NAME,r(635)+(Z.audio_metadata_[r(887)]+r(1091)+e[r(887)])),!0;if(e[r(646)]!==Z[r(303)][r(646)])return ee[r(417)](Z[r(1128)],r(233)+(Z[r(303)][r(646)]+r(1091)+e.bit_stream_identification)),!0;if(e[r(298)]!==Z[r(303)].bit_stream_mode)return ee[r(417)](Z[r(1128)],"AC3: BitStream Mode changed from "+(Z[r(303)][r(298)]+r(1091)+e[r(298)])),!0;if(e[r(997)]!==Z.audio_metadata_[r(997)])return ee.debugLog(Z[r(1128)],r(999)+(Z[r(303)].channel_mode+r(1091)+e[r(997)])),!0;if(e[r(234)]!==Z[r(303)][r(234)])return ee[r(417)](Z.TAG_NAME,r(792)+(Z[r(303)][r(234)]+r(1091)+e[r(234)])),!0}else if(t[r(794)]===r(304)&&Z.audio_metadata_.codec===r(304)){const e=t[r(582)];if(e[r(976)]!==Z[r(303)][r(976)])return ee[r(417)](Z.TAG_NAME,r(825)+(Z[r(303)][r(976)]+" to ")+e.sample_rate),!0;if(e[r(540)]!==Z[r(303)][r(540)])return ee.debugLog(Z.TAG_NAME,r(647)+(Z[r(303)][r(540)]+" to ")+e[r(540)]),!0}else if(t[r(794)]===r(489)&&Z[r(303)][r(794)]===r(489)){const e=t[r(455)];if(e[r(937)]!==Z[r(303)][r(937)])return ee.debugLog(Z[r(1128)],r(451)+(Z[r(303)][r(937)]+" to ")+e[r(937)]),!0;if(e.sample_rate!==Z[r(303)].sample_rate)return ee[r(417)](Z[r(1128)],"MP3: SamplingFrequencyIndex changed from "+(Z[r(303)][r(976)]+r(1091)+e[r(976)])),!0;if(e.channel_count!==Z[r(303)][r(540)])return ee[r(417)](Z.TAG_NAME,"MP3: Channel count changed from "+(Z.audio_metadata_[r(540)]+r(1091)+e[r(540)])),!0}return!1},dispatchAudioInitSegment(t){const r=e;let n={};if(n[r(912)]=r(513),n.id=Z[r(580)].id,n[r(537)]=1e3,n[r(1143)]=Z[r(1111)],Z[r(303)].codec===r(1161)){let e="aac"===t[r(794)]?t[r(455)]:null,i=new Qa(e);n[r(785)]=i[r(256)],n.audioSampleRateIndex=i[r(802)],n[r(291)]=i.channel_count,n.codec=i.codec_mimetype,n[r(414)]=i[r(880)],n.config=i[r(715)],n[r(968)]=1024/n[r(785)]*n[r(537)],r(954);const s=vt({profile:ee._opt[r(1136)]?i[r(937)]:i[r(485)],sampleRate:n.audioSampleRateIndex,channel:n[r(291)]});ee[r(568)](s,0)}else Z[r(303)][r(794)]===r(831)||Z[r(303)][r(794)]===r(904)||"opus"===Z[r(303)][r(794)]||(Z[r(303)].codec===r(489)?(n[r(785)]=Z.audio_metadata_.sample_rate,n.channelCount=Z[r(303)][r(540)],n[r(794)]=r(489),n[r(414)]=r(489),n.config=void 0,r(569)):"g711a"===Z[r(303)][r(794)]?(n.audioSampleRate=Z[r(303)][r(976)],n[r(291)]=Z[r(303)].channel_count,n[r(794)]=r(793),n[r(414)]="g711a",n[r(715)]=void 0,r(871)):Z[r(303)][r(794)]===r(922)&&(n.audioSampleRate=Z.audio_metadata_[r(976)],n[r(291)]=Z.audio_metadata_[r(540)],n[r(794)]="g711u",n[r(414)]=r(922),n[r(715)]=void 0));0==Z[r(561)]&&ee[r(417)](Z[r(1128)],r(558)+n.codec),Z[r(561)]=!0,Z.video_metadata_changed_=!1},dispatchPESPrivateDataDescriptor(t,r,n){const i=e;let s={};s[i(1113)]=t,s[i(527)]=r,s.descriptor=n},parsePESPrivateDataPayload(t,r,n,i,s){const o=e;let a=new Ja;if(a[o(1113)]=i,a[o(281)]=s,a[o(283)]=t[o(317)],a[o(455)]=t,null!=r){let e=Math[o(236)](r/Z[o(641)]);a[o(908)]=e}else a[o(503)]=Z[o(895)]();if(null!=n){let e=Math[o(236)](n/Z[o(641)]);a[o(446)]=e}},parseTimedID3MetadataPayload(t,r,n,i,s){const o=e;ee[o(417)](Z[o(1128)],"Timed ID3 Metadata: pid="+i+o(716)+r+", dts="+n+o(631)+s)},parseSynchronousKLVMetadataPayload(t,r,n,i,s){const o=e;ee[o(417)](Z[o(1128)],o(1166)+i+o(716)+r+", dts="+n+o(631)+s)},parseAsynchronousKLVMetadataPayload(t,r,n){const i=e;ee[i(417)](Z.TAG_NAME,i(921)+r+", stream_id="+n)},parseSMPTE2038MetadataPayload(t,r,n,i,s){const o=e;ee[o(417)](Z.TAG_NAME,o(439)+i+o(716)+r+o(1125)+n+o(631)+s)},getNearestTimestampMilliseconds(){const t=e;return null!=Z[t(240)]?Math[t(236)](Z[t(240)]):null!=Z[t(405)]?Math.floor(Z.last_pcr_/300/Z[t(641)]):void 0},_preDoDecode(){const t=e,r=Z[t(329)],n=Z[t(580)];let i=r.samples;Z[t(490)](r),Z[t(490)](n),n[t(422)][t(419)]>0&&(i=r.samples.concat(n.samples),i=i[t(644)](((e,r)=>{const n=t;return e[n(446)]-r[n(446)]}))),i[t(1170)]((e=>{const r=t,n=new Uint8Array(e.payload);delete e[r(1106)],e.type===xe[r(375)]?Z[r(403)]({...e,payload:n}):e[r(912)]===xe[r(513)]&&Z[r(783)]({...e,payload:n})})),r.samples=[],r.length=0,n.samples=[],n[t(419)]=0},_doDecodeVideo(t){const r=e,n=new Uint8Array(t[r(1106)]);let i=null;i=t[r(395)]?dn(n,t.isIFrame):Pr(n,t[r(415)]),t[r(415)]&&ee[r(735)](t.dts);const s=ee[r(759)](i,t[r(415)]);ee[r(532)](s,{type:xe[r(375)],ts:t[r(446)],isIFrame:t[r(415)],cts:t.cts})},_doDecodeAudio(t){const r=e,n=new Uint8Array(t[r(1106)]),i=ee[r(402)](n);ee.decode(i,{type:xe[r(513)],ts:t.dts,isIFrame:!1,cts:0})},correctSamplePts(t){const r=e;let n=arguments[r(419)]>1&&void 0!==arguments[1]?arguments[1]:5;const i=t.samples||[];for(let e=0;e=s[r(446)]&&(ee[r(1027)](Z[r(1128)],r(648)+t[r(446)]+r(834)+s[r(446)]+r(906)),s[r(446)]=t.dts+n)}}},Q=null;er()&&(Q={TAG_NAME:e(812),_resetInIt(){const t=e;Q[t(822)]=null,Q[t(418)]=null,Q[t(510)]={},Q.videoMeta={},Q.audioMeta={},Q.sourceBuffer=null,Q[t(730)]=null,Q.hasInit=!1,Q[t(961)]=!1,Q[t(1053)]=!1,Q[t(1126)]="",Q[t(346)]="",Q[t(597)]={},Q[t(533)]={},Q[t(982)]=!1,Q.sequenceNumber=0,Q[t(862)]=0,Q[t(935)]=null,Q[t(899)]=null,Q[t(386)]=!1,Q[t(962)]=!1,Q.mediaSourceAddSourceBufferError=!1,Q.mediaSourceBufferError=!1,Q[t(330)]=!1,Q[t(614)]=null,Q[t(686)]=null,Q[t(652)]=null,Q[t(286)]=null,Q[t(456)]=0,Q.isWidthOrHeightChanged=!1,Q[t(248)]=null,Q.prevAudioTs=null,Q[t(512)]=[],Q[t(324)]=[],Q.pendingSegments=[],Q[t(384)]=[],Q[t(642)]=[],Q[t(389)]=null,Q.audioSourceBufferCheckTimeout=null,Q[t(931)]=null,Q[t(940)]=!1,Q[t(688)]={currentTime:0,readyState:0}},init(){const t=e;Q[t(437)]=new Ca,Q._resetInIt(),Q[t(1046)]=new(self[t(1064)]),Q.isDecodeFirstIIframe=!!Qt(ee._opt[t(947)]),Q[t(547)](),ee.debugLog(Q.TAG_NAME,"init")},destroy(){const t=e;Q[t(1145)](),Q[t(412)](),Q[t(512)]&&Q[t(512)][t(419)]&&(Q[t(512)][t(1170)]((e=>e())),Q[t(512)]=[]),Q[t(1058)](),Q[t(1046)]=null,ee[t(417)](Q[t(1128)],t(511))},getState(){const t=e;return Q[t(1046)]&&Q[t(1046)][t(952)]},isStateOpen(){const t=e;return Q[t(750)]()===We[t(1057)]},isStateClosed(){const t=e;return Q[t(750)]()===We[t(524)]},isStateEnded:()=>Q[e(750)]()===We.ended,_bindMediaSourceEvents(){const t=e,{proxy:r}=Q[t(437)],n=r(Q[t(1046)],qe[t(1005)],(()=>{const e=t;ee[e(417)](Q.TAG_NAME,e(1005)),Q[e(588)]()})),i=r(Q.mediaSource,qe.sourceClose,(()=>{const e=t;ee[e(417)](Q[e(1128)],e(274))})),s=r(Q[t(1046)],qe[t(369)],(()=>{const e=t;ee[e(417)](Q[e(1128)],e(369))}));Q[t(512)].push(n,i,s)},_onMediaSourceSourceOpen(){const t=e;!Q[t(886)]&&(ee[t(417)](Q[t(1128)],t(996)),Q[t(803)]()),!Q.audioSourceBuffer&&(ee[t(417)](Q[t(1128)],t(626)),Q[t(1120)]()),Q[t(924)]()&&Q[t(697)]()},decodeVideo(t,r,n,i){const s=e;if(ee.isDestroyed)ee[s(1027)](Q.TAG_NAME,"decodeVideo() and decoder is destroyed");else if(Qt(Q[s(700)]))if(n&&t[1]===Xe.sequenceHeader){const e=15&t[0];if(e===Le.h265&&Qt(ee[s(478)][s(221)]))return void Q[s(1092)](Fe.mediaSourceH265NotSupport);Q[s(510)][s(794)]=e,postMessage({cmd:Te[s(474)],code:e});const i=new Uint8Array(t);postMessage({cmd:Te.videoCodec,buffer:i,codecId:e},[i[s(630)]]),Q[s(700)]=Q._decodeConfigurationRecord(t,r,n,e)}else ee[s(1027)](Q[s(1128)],s(790)+n+s(958)+t[1]+s(913));else if(!Q[s(617)]&&n&&(Q[s(617)]=!0),Q[s(617)]){if(n&&0===t[1]){const e=15&t[0];let r={};e===Le[s(545)]?r=Tr(t[s(1069)](5)):e===Le[s(436)]&&(r=on(t));const n=Q[s(510)];n&&n[s(273)]&&n[s(890)]&&r&&r[s(599)]&&r[s(756)]&&(r[s(599)]!==n[s(273)]||r.codecHeight!==n.height)&&(ee[s(1027)](Q.TAG_NAME,s(1146)+n.width+", old height is "+n[s(890)]+",\n new width is "+r[s(599)]+s(712)+r[s(756)]+s(1093)),Q[s(782)]=!0,Q.emitError(Fe[s(296)],s(779)+n[s(273)]+"->"+r[s(599)]+s(671)+n[s(890)]+"->"+r[s(756)]))}if(Q[s(782)])return void ee[s(1027)](Q[s(1128)],s(854));if($t(t))return void ee[s(417)](Q[s(1128)],"decodeVideo and payload is video sequence header so drop this frame");if(t[s(317)]0&&tSe},_decodeConfigurationRecord(t,r,n,i){const s=e;let o=t.slice(5),a={};if(i===Le[s(545)]?a=Tr(o):i===Le[s(436)]&&(a=an(o)),Q[s(510)][s(273)]=a[s(599)],Q.videoInfo.height=a.codecHeight,0===a[s(599)]&&0===a[s(756)])return ee[s(1027)](Q[s(1128)],s(1066),JSON[s(764)](a)),Q[s(1092)](Fe.mediaSourceDecoderConfigurationError,s(528)+(0===a[s(599)])+s(938)+a[s(756)]),!1;const c={id:Qe[s(375)],type:s(375),timescale:1e3,duration:0,avcc:o,codecWidth:a.codecWidth,codecHeight:a.codecHeight,videoType:a[s(844)]},u=Da.generateInitSegment(c);return Q[s(822)]=i===Le[s(545)],a[s(794)]?Q[s(1126)]=s(460)+a[s(794)]+'"':Q.videoMimeType=Q[s(822)]?je[s(761)]:je[s(529)],postMessage({cmd:Te[s(562)],w:a.codecWidth,h:a[s(756)]}),Q._initSourceBuffer(),Q[s(1184)](u.buffer),Q.sequenceNumber=0,Q[s(597)]={},Q[s(982)]=!1,!0},_decodeAudioConfigurationRecord(t,r){const n=e,i=t[0]>>4&15,s=t[0]>>1&1,o=i===Ne[n(569)],a=i===Ne[n(954)];if(Qt(a||o))return ee[n(1027)](Q[n(1128)],n(911)+i+" ant auto wasm decode"),Q[n(1092)](Fe[n(1050)]),!1;const c={id:Qe[n(513)],type:n(513),timescale:1e3};let u={};if(yt(t)){if(u=bt(t[n(1069)](2)),!u)return!1;c.audioSampleRate=u[n(578)],c[n(291)]=u.channelCount,c[n(715)]=u.config,c[n(968)]=1024/c.audioSampleRate*c.timescale}else{if(!o)return!1;if(u=ja(t[n(1069)](1)),!u)return!1;c[n(785)]=u.sampleRate,c.channelCount=u[n(291)],c[n(968)]=1152/c[n(785)]*c[n(537)]}c[n(794)]=u[n(794)],c[n(1143)]=0;let l=n(916),d=u[n(794)],f=null;o&&Qt(ee[n(478)][n(608)])?(l=n(426),d="",f=new Uint8Array):f=Da[n(458)](c);let h=c[n(912)]+"/"+l;return d&&d[n(419)]>0&&(h+=n(917)+d),Qt(Q[n(1053)])&&(N=i===Ne.AAC?s?16:8:0===s?8:16,postMessage({cmd:Te.audioCode,code:i}),postMessage({cmd:Te[n(481)],sampleRate:c[n(785)],channels:c[n(291)],depth:N}),Q[n(1053)]=!0),Q[n(346)]=h,Q[n(418)]=a,Q[n(1120)](),Q[n(1185)](f[n(630)]),!0},_initSourceBuffer(){const t=e,{proxy:r}=Q[t(437)];if(null===Q[t(886)]&&null!==Q[t(1046)]&&Q[t(710)]()&&Q[t(1126)]){try{ee[t(417)](Q[t(1128)],t(799),Q.videoMimeType),Q[t(886)]=Q[t(1046)][t(995)](Q[t(1126)])}catch(e){return ee[t(974)](Q[t(1128)],"_initSourceBuffer() appendBuffer mseDecoder.mediaSource.addSourceBuffer()",e[t(893)],e[t(488)](),e),Q.emitError(Fe[t(388)],e[t(893)]),void(Q[t(897)]=!0)}if(Q[t(886)]){const e=r(Q[t(886)],t(353),(e=>{const r=t;Q[r(1132)]=!0,ee[r(974)](Q[r(1128)],r(705),e),Q.emitError(Fe[r(581)],r(728))})),n=r(Q[t(886)],"updateend",(()=>{const e=t;Q[e(444)]()?Q[e(408)]():Q._hasPendingSegments()?Q._doAppendSegments():Q[e(940)]&&(ee[e(417)](Q[e(1128)],e(1032)),Q[e(1039)]())}));Q[t(512)][t(1181)](e,n)}}else ee[t(417)](Q[t(1128)],t(538)+Q[t(710)]()+t(933)+(null===Q[t(822)]))},_initAudioSourceBuffer(){const t=e,{proxy:r}=Q[t(437)];if(null===Q[t(730)]&&null!==Q.mediaSource&&Q.isStateOpen()&&Q[t(346)]){try{ee[t(417)](Q[t(1128)],t(480),Q[t(346)]),Q._clearAudioSourceBufferCheckTimeout(),Q.audioSourceBuffer=Q[t(1046)][t(995)](Q[t(346)])}catch(e){return ee[t(974)](Q[t(1128)],"_initAudioSourceBuffer() addSourceBuffer mseDecoder.mediaSource.addSourceBuffer()",e[t(893)],e[t(488)](),e),Q[t(1092)](Fe[t(388)],e[t(893)]),void(Q[t(897)]=!0)}if(Q[t(730)]){const e=r(Q[t(730)],t(353),(e=>{const r=t;Q[r(1132)]=!0,ee[r(974)](Q.TAG_NAME,r(709),e),Q[r(1092)](Fe[r(581)],r(737))})),n=r(Q[t(730)],t(372),(()=>{const e=t;Q[e(444)]()?Q[e(408)]():Q._hasPendingSegments()?Q._doAppendSegments():Q.hasPendingEos&&(ee.debugLog(Q[e(1128)],e(271)),Q.endOfStream())}));Q[t(512)][t(1181)](e,n),null===Q[t(931)]&&(Q.audioSourceNoDataCheckTimeout=setTimeout((()=>{const e=t;Q[e(1072)](),Q[e(1092)](Fe.mediaSourceAudioNoDataTimeout)}),1e3))}}else ee[t(417)](Q[t(1128)],"_initAudioSourceBuffer and mseDecoder.isStateOpen is "+Q[t(710)]()+t(833)+Q[t(346)])},_decodeVideo(t,r,n,i,s){const o=e;let a=t[o(1069)](5),c=a[o(317)];if(0===c)return void ee[o(1027)](Q[o(1128)],o(711));let u=(new Date)[o(693)](),l=!1;!Q[o(614)]&&(Q[o(614)]=u,l=!0);const d=u-Q.prevTimestamp;if(Q[o(686)]=d,d>1e3&&!l&&ee[o(349)]&&ee.debugLog(Q[o(1128)],o(826)+u+o(771)+Q[o(614)]+o(325)+d+o(586)),Q[o(597)].id&&r>=Q[o(597)][o(446)]){let e=8+Q[o(597)][o(714)],t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[o(356)](Da.types[o(333)],4),t[o(356)](Q[o(597)][o(455)],8),Q[o(597)][o(1143)]=r-Q.cacheTrack[o(446)];let n=Da[o(232)](Q[o(597)],Q[o(597)][o(446)]);Q[o(597)]={};let i=new Uint8Array(n[o(317)]+t[o(317)]);i[o(356)](n,0),i[o(356)](t,n[o(317)]),Q.appendBuffer(i.buffer)}else ee[o(417)](Q.TAG_NAME,o(463)+r+o(795)+s+o(979)+(Q[o(597)]&&Q[o(597)][o(446)])),Q.timeInit=!1,Q[o(597)]={};!Q[o(597)]&&(Q[o(597)]={}),Q[o(597)].id=Qe[o(375)],Q[o(597)][o(472)]=++Q[o(472)],Q[o(597)][o(714)]=c,Q[o(597)].dts=r,Q[o(597)][o(1129)]=i,Q[o(597)][o(878)]=n,Q[o(597)][o(455)]=a,Q[o(597)].flags={isLeading:0,dependsOn:n?2:1,isDependedOn:n?1:0,hasRedundancy:0,isNonSync:n?0:1},Q[o(614)]=(new Date)[o(693)]()},_decodeAudio(t,r,n){const i=e;let s=Q.isAAC?t.slice(2):t.slice(1),o=s[i(317)];if(Q[i(533)].id&&r>=Q.cacheAudioTrack.dts){let e=8+Q[i(533)][i(714)],t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t.set(Da[i(300)][i(333)],4),t[i(356)](Q[i(533)][i(455)],8),Q[i(533)][i(1143)]=r-Q[i(533)][i(446)];let n=Da[i(232)](Q[i(533)],Q.cacheAudioTrack.dts);Q.cacheAudioTrack={};let s=new Uint8Array(n[i(317)]+t[i(317)]);s[i(356)](n,0),s[i(356)](t,n[i(317)]),Q.appendAudioBuffer(s.buffer)}else Q[i(533)]={};!Q[i(533)]&&(Q[i(533)]={}),Q.cacheAudioTrack.id=Qe.audio,Q[i(533)][i(472)]=++Q[i(862)],Q[i(533)].size=o,Q.cacheAudioTrack[i(446)]=r,Q[i(533)][i(1129)]=0,Q[i(533)][i(455)]=s,Q[i(533)][i(713)]={isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}},appendBuffer(t){const r=e;ee[r(810)]?ee[r(1027)](Q[r(1128)],r(1047)):Q[r(897)]?ee[r(1027)](Q.TAG_NAME,"mseDecoder.mediaSourceAddSourceBufferError is true"):Q[r(386)]?ee[r(1027)](Q.TAG_NAME,"mseDecoder.mediaSourceAppendBufferFull is true"):Q[r(962)]?ee[r(1027)](Q.TAG_NAME,"mseDecoder.mediaSourceAppendBufferError is true"):Q[r(1132)]?ee[r(1027)](Q[r(1128)],"mseDecoder.mediaSourceBufferError is true"):(Q[r(428)][r(1181)](t),Q[r(886)]&&(ee[r(478)][r(927)]&&Q[r(407)]()&&Q[r(257)](),Qt(Q[r(819)]())&&Q[r(710)]()&&Qt(Q[r(444)]()))?Q._doAppendSegments():Q[r(986)]()?(Q.mediaSourceBufferError=!0,Q.emitError(Fe[r(581)],r(977))):Q[r(577)]()&&(Q[r(1132)]=!0,Q.emitError(Fe[r(581)],r(866))))},appendAudioBuffer(t){const r=e;ee[r(810)]?ee.debugWarn(Q.TAG_NAME,"appendAudioBuffer() player is destroyed"):Q[r(897)]?ee[r(1027)](Q[r(1128)],r(1160)):Q[r(386)]?ee.debugWarn(Q[r(1128)],r(765)):Q.mediaSourceAppendBufferError?ee[r(1027)](Q[r(1128)],r(497)):Q[r(1132)]?ee[r(1027)](Q[r(1128)],r(556)):(Q[r(642)][r(1181)](t),Q.audioSourceBuffer&&(ee._opt[r(927)]&&Q[r(407)]()&&Q._doCleanUpSourceBuffer(),Qt(Q[r(339)]())&&Q[r(710)]()&&Qt(Q[r(444)]()))?Q[r(697)]():Q.isStateClosed()?(Q[r(1132)]=!0,Q[r(1092)](Fe[r(581)],r(977))):Q.isStateEnded()&&(Q[r(1132)]=!0,Q.emitError(Fe[r(581)],"mediaSource is end")))},getSourceBufferUpdating(){const t=e;return Q.sourceBuffer&&Q[t(886)][t(249)]},getAudioSourceBufferUpdating(){const t=e;return Q[t(730)]&&Q[t(730)][t(249)]},stop(){const t=e;Q[t(888)](),Q[t(280)](),Q.endOfStream()},clearUpAllSourceBuffer(){const t=e;if(Q.sourceBuffer){const e=Q.sourceBuffer[t(469)];for(let r=0;r0||Q[t(642)][t(419)]>0},getPendingSegmentsLength:()=>Q[e(428)].length,_doAppendSegments(){const t=e;if(Q[t(986)]()||Q[t(577)]())ee[t(417)](Q.TAG_NAME,t(555));else if(null!==Q[t(886)]){if(Q.needInitAudio()&&null===Q[t(730)])return ee.debugLog(Q[t(1128)],t(949)),void(null===Q[t(828)]&&(Q[t(828)]=setTimeout((()=>{const e=t;Q[e(412)](),Q[e(1092)](Fe.mediaSourceAudioInitTimeout)}),1e3)));if(Qt(Q.getSourceBufferUpdating())&&Q[t(428)].length>0){const e=Q.pendingSegments[t(506)]();try{Q[t(886)][t(1184)](e)}catch(e){ee[t(974)](Q[t(1128)],t(992),e[t(893)],e),22===e[t(893)]?(Q[t(1145)](),Q[t(386)]=!0,Q[t(1092)](Fe[t(250)],t(754)+e.code+" , message is "+e[t(811)])):11===e.code?(Q[t(1145)](),Q[t(962)]=!0,Q[t(1092)](Fe[t(962)],t(754)+e.code+t(966)+e.message)):(Q.stop(),Q[t(1132)]=!0,Q[t(1092)](Fe[t(581)],t(754)+e.code+t(966)+e.message))}}if(Qt(Q[t(339)]())&&Q[t(642)][t(419)]>0){const e=Q[t(642)][t(506)]();try{Q.audioSourceBuffer.appendBuffer(e)}catch(e){ee[t(974)](Q[t(1128)],t(310),e[t(893)],e),22===e[t(893)]?(Q[t(1145)](),Q[t(386)]=!0,Q[t(1092)](Fe[t(250)],"code is "+e[t(893)]+t(966)+e[t(811)])):11===e[t(893)]?(Q[t(1145)](),Q[t(962)]=!0,Q[t(1092)](Fe[t(962)],t(754)+e[t(893)]+" , message is "+e[t(811)])):(Q.stop(),Q[t(1132)]=!0,Q.emitError(Fe[t(581)],e.code,t(754)+e[t(893)]+" , message is "+e[t(811)]))}}}else ee[t(417)](Q[t(1128)],"_doAppendSegments() sourceBuffer is null and wait init and return")},_doCleanUpSourceBuffer(){const t=e,r=Q[t(688)].currentTime;if(Q[t(886)]){const e=Q[t(886)][t(469)];let n=!1;for(let i=0;i=ee[t(478)][t(943)]){n=!0;let e=r-ee[t(478)].mseAutoCleanupMinBackwardDuration;Q[t(324)][t(1181)]({start:s,end:e})}}else o=ee._opt[t(943)]){n=!0;let e=r-ee[t(478)][t(946)];Q.pendingAudioRemoveRanges[t(1181)]({start:s,end:e})}}else o0||Q[t(384)][t(419)]>0},needInitAudio(){const t=e;return ee[t(478)].hasAudio&&ee[t(478)].mseDecodeAudio},_doRemoveRanges(){const t=e;if(Q[t(886)]&&Qt(Q.getSourceBufferUpdating())){let e=Q[t(324)];for(;e[t(419)]&&Qt(Q[t(819)]());){let r=e.shift();try{Q[t(886)].remove(r[t(696)],r[t(435)])}catch(e){ee[t(1027)](Q[t(1128)],t(807),e,e.toString())}}}if(Q[t(730)]&&Qt(Q[t(339)]())){let e=Q.pendingAudioRemoveRanges;for(;e.length&&Qt(Q.getAudioSourceBufferUpdating());){let r=e[t(506)]();try{Q[t(730)][t(708)](r.start,r[t(435)])}catch(e){ee[t(1027)](Q[t(1128)],"_doRemoveRanges() audioSourceBuffer error",e,e[t(488)]())}}}},_getPlaybackRate(){},_needCleanupSourceBuffer(){const t=e;if(Qt(ee[t(478)][t(927)]))return!1;const r=Q.$video.currentTime;if(Q.sourceBuffer){let e=Q.sourceBuffer[t(469)];if(e[t(419)]>=1&&r-e[t(696)](0)>=ee[t(478)].mseAutoCleanupMaxBackwardDuration)return!0}if(Q[t(730)]){let e=Q[t(730)][t(469)];if(e[t(419)]>=1&&r-e[t(696)](0)>=ee[t(478)][t(943)])return!0}return!1},_clearAudioSourceBufferCheckTimeout(){const t=e;Q[t(828)]&&(clearTimeout(Q[t(828)]),Q[t(828)]=null)},_clearAudioNoDataCheckTimeout(){const t=e;Q[t(931)]&&(clearTimeout(Q[t(931)]),Q[t(931)]=null)},getHandle:()=>Q[e(1046)].handle,emitError(t){const r=e;let n=arguments[r(419)]>1&&void 0!==arguments[1]?arguments[1]:"";postMessage({cmd:Te[r(1163)],value:t,msg:n})}});let ee={isPlayer:!0,isHevc:null,isPlayVod:!1,isPlayback:!1,isPlaybackPause:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:Ze[e(1038)],_opt:Y(),mp3Demuxer:null,delay:-1,pushLatestDelay:-1,firstTimestamp:null,startTimestamp:null,preDelayTimestamp:null,stopId:null,streamFps:null,streamAudioFps:null,streamVideoFps:null,writableStream:null,networkDelay:0,webglObj:null,socketStatus:Ue.notConnect,startStreamRateAndStatsInterval:function(){const t=e;ee[t(289)](),d=setInterval((()=>{const e=t;l&&l(0);const r=JSON[e(764)]({demuxBufferDelay:ee[e(909)](),audioDemuxBufferDelay:ee[e(699)](),streamBufferByteLength:ee.getStreamBufferLength(),netBuf:ee.networkDelay||0,pushLatestDelay:ee[e(920)]||0,latestDelay:ee[e(1122)],isStreamTsMoreThanLocal:w,wasmDecodeDelay:g-b});postMessage({cmd:Te.workerFetch,type:Me[e(342)],value:r}),rr()&&(null===W&&(W=Ft()),nr(Ft()-W)&&ee[e(516)]())}),1e3)},stopStreamRateAndStatsInterval:function(){d&&(clearInterval(d),d=null)},_startCheckWsOpenTimeout:function(){const t=e;ee[t(776)](),G=setTimeout((()=>{const e=t;if(ee[e(1013)]===Ue.notConnect){const t=e(261)+ee[e(478)][e(243)]+e(1002)+ee[e(1013)];ee[e(974)](e(305),t),postMessage({cmd:Te.workerFetch,type:Fe[e(243)],value:de[e(1153)],msg:t})}}),1e3*ee._opt[t(243)])},_stopCheckWsOpenTimeout:function(){G&&(clearTimeout(G),G=null)},useOffscreen:function(){const t=e;return ee._opt[t(894)]&&"undefined"!=typeof OffscreenCanvas},getDelay:function(t,r){const n=e;if(!t||ee[n(478)][n(494)]&&!_)return-1;if(r===xe.audio)return ee.delay;if(ee.preDelayTimestamp&&ee[n(683)]>t)return ee[n(683)]-t>1e3&&ee[n(1027)](n(305),"getDelay() and preDelayTimestamp is "+ee.preDelayTimestamp+n(423)+t+n(421)+(ee[n(683)]-t)+n(852)+ee.delay),ee.preDelayTimestamp=t,ee.delay;if(ee[n(548)]){if(t){const e=Date[n(864)]()-ee[n(918)],r=t-ee[n(548)];e>=r?(w=!1,ee[n(1122)]=e-r):(w=!0,ee[n(1122)]=r-e)}}else ee[n(548)]=t,ee[n(918)]=Date.now(),ee.delay=-1;return ee[n(683)]=t,ee[n(1122)]},getDelayNotUpdateDelay:function(t,r){const n=e;if(!t||ee[n(478)][n(494)]&&!_)return-1;if(r===xe[n(513)])return ee[n(920)];if(ee[n(683)]&&ee[n(683)]-t>1e3)return ee[n(1027)](n(305),"getDelayNotUpdateDelay() and preDelayTimestamp is "+ee[n(683)]+n(423)+t+n(421)+(ee[n(683)]-t)+n(328)),-1;if(ee[n(548)]){let e=-1;if(t){const r=Date[n(864)]()-ee[n(918)],i=t-ee[n(548)];r>=i?(w=!1,e=r-i):(w=!0,e=i-r)}return e}return-1},resetDelay:function(){const t=e;ee[t(548)]=null,ee[t(918)]=null,ee[t(1122)]=-1,ee.dropping=!1},resetAllDelay:function(){const t=e;ee[t(266)](),ee[t(683)]=null},doDecode:function(t){const r=e;ee[r(478)].isEmitSEI&&t.type===xe.video&&ee[r(574)]&&ee[r(643)](t.payload,t.ts),ee[r(1131)]()?t[r(912)]===xe[r(513)]?ee[r(478)][r(1136)]?Q.decodeAudio(t.payload,t.ts):t[r(815)][r(532)](t[r(1106)],t.ts):t.type===xe[r(375)]&&Q[r(573)](t[r(1106)],t.ts,t[r(415)],t[r(1129)]):ee[r(478)][r(509)]&&ee[r(894)]()&&t[r(912)]===xe[r(375)]&&a[r(532)]?a.decode(t[r(1106)],t.ts,t[r(1129)]):t[r(815)][r(532)](t[r(1106)],t.ts,t[r(415)],t[r(1129)])},decodeNext(t){const r=e;if(0===s[r(419)])return;const i=t.ts,o=s[0],a=t[r(912)]===xe[r(375)]&&$t(t[r(1106)]);if(Qt(n))a&&(ee[r(417)]("worker",r(1133)+t.type+" and\n ts is "+i+r(616)+o[r(912)]+r(392)+o.ts+r(1164)+a),s[r(506)](),ee[r(701)](o));else{const e=o.ts-i,n=o[r(912)]===xe[r(513)]&&t[r(912)]===xe[r(375)];(e<=20||n||a)&&(ee[r(417)](r(305),r(1133)+t.type+r(1172)+i+r(616)+o.type+" ts is "+o.ts+r(587)+e+r(235)+n+r(247)+a),s[r(506)](),ee[r(701)](o))}},init:function(){const t=e;ee.debugLog("worker",t(541)+n+t(225)+i+t(429),JSON[t(764)](ee[t(478)]));const r=ee[t(478)][t(964)]===fe[t(350)],o=ee[t(478)].playType===fe.playbackTF,c=ee._opt.playType===fe[t(461)];if(ee[t(478)][t(341)]&&X.init(),ee[t(349)]=r,ee[t(307)]=o,ee[t(246)]=c,ee[t(1131)]()&&Q&&Q.init(),a&&ee[t(478)][t(509)]&&ee[t(894)]()&&a[t(667)](),Qt(ee[t(889)]())){ee[t(417)](t(305),t(382));const e=()=>{const e=t,n=ee[e(478)][e(725)]+ee[e(478)][e(634)];let i=null;if(s.length){if(ee[e(1099)])return void ee.debugWarn(e(305),e(639)+s[e(419)]);if(ee[e(1e3)]){for(i=s[e(506)](),ee[e(1027)]("worker",e(694)+i[e(415)]+" and delay is "+ee[e(1122)]+e(784)+s[e(419)]);!i[e(415)]&&s[e(419)];)i=s.shift();const t=ee[e(294)](i.ts,i[e(912)]);i.isIFrame&&t<=ee.getNotDroppingDelayTs()&&(ee[e(417)](e(305),e(269)),ee[e(1e3)]=!1,ee.doDecode(i),ee[e(1098)](i))}else if(ee[e(307)]||ee[e(231)]()||0===ee._opt[e(725)])for(;s.length;)i=s[e(506)](),ee.doDecode(i);else if(i=s[0],-1===ee[e(491)](i.ts,i.type))ee[e(417)](e(305),e(670),i.ts),s.shift(),ee[e(701)](i),ee[e(1098)](i);else if(ee[e(1122)]>n&&r)ee[e(383)]()?(ee[e(417)](e(305),e(380)+ee.delay+e(1061)+n+e(425)),ee.resetAllDelay(),ee[e(1e3)]=!0,postMessage({cmd:Te[e(438)]})):(s.shift(),ee.doDecode(i),ee[e(1098)](i));else for(;s[e(419)];){if(i=s[0],!(ee[e(491)](i.ts,i[e(912)])>ee[e(478)][e(725)])){ee.delay<0&&ee[e(1027)]("worker",e(1024)+ee[e(1122)]+e(780)+s[e(419)]);break}s[e(506)](),ee.doDecode(i)}}else-1!==ee[e(1122)]&&ee[e(417)](e(305),e(1165)),ee[e(953)]()};ee.stopId=setInterval((()=>{const r=t;let n=(new Date)[r(693)]();!S&&(S=n);const i=n-S;i>100&&ee.debugWarn("worker",r(287)+i),e(),S=(new Date)[r(693)]()}),20)}else ee[t(417)]("worker","playback and playbackIsCacheBeforeDecodeForFpsRender is true");if(Qt(ee._opt[t(947)])&&(_=!0),ee[t(1131)]()&&Q){const e=Q.getHandle();e&&postMessage({cmd:Te[t(351)],mseHandle:e},[e])}},playbackCacheLoop:function(){const t=e;ee[t(344)]();for(let e=0;e{const e=t,n=(new Date)[e(693)]();!q&&(q=n);for(let t=0;t1&&s[e(419)]>0&&ee.debugWarn(e(305),"playbackCacheLoop sync frame duration is "+i+"ms and fragDuration is "+r+e(928)+o+e(379)+s[e(419)]),q=n}),r)},doPlaybackCacheLoop:function(){const t=e;let r=null;if(s[t(419)])if(r=s.shift(),r.type===xe[t(375)]){ee.isPlaybackOnlyDecodeIFrame()?r[t(415)]&&(ee.debugLog(t(305),t(1084),r.ts),ee[t(701)](r)):ee[t(701)](r);let e=s[0];for(;e&&e[t(912)]===xe.audio;)s[t(506)](),ee[t(732)]()||ee[t(701)](e),e=s[0]}else if(r[t(912)]===xe[t(513)]){ee[t(732)]()||ee.doDecode(r);let e=s[0];for(;e;){if(r=s[t(506)](),r.type===xe[t(375)]){ee.isPlaybackOnlyDecodeIFrame()?r[t(415)]&&(ee.debugLog("worker",t(1084),r.ts),ee[t(701)](r)):ee[t(701)](r),e=null;break}r.type===xe[t(513)]&&(ee.isPlaybackOnlyDecodeIFrame()||ee[t(701)](r),e=s[0])}}},clearPlaybackCacheLoop:function(){const t=e;ee.stopId&&(clearInterval(ee[t(664)]),ee[t(664)]=null),q=null},startPlaybackCacheLoop:function(){ee[e(965)]()},close:function(){const t=e;if(ee[t(417)](t(305),t(516)),ee[t(810)]=!0,K(),!u||1!==u[t(952)]&&2!==u[t(952)]?u&&ee[t(417)](t(305),t(681)+u[t(952)]):(z=!0,u[t(516)](1e3,t(1177))),u&&(u.onopen=null,u[t(406)]=null,u[t(804)]=null,u[t(404)]=null,ee[t(1013)]=Ue.notConnect),u=null,ee.stopStreamRateAndStatsInterval(),ee[t(776)](),ee.clearPlaybackCacheLoop(),ee[t(664)]&&(clearInterval(ee[t(664)]),ee[t(664)]=null),ee[t(615)]&&(ee[t(615)].destroy(),ee[t(615)]=null),ee[t(662)]&&(Wt(ee[t(662)][t(516)])&&Qt(ee[t(662)].locked)?ee.writableStream[t(516)]().catch((e=>{const r=t;ee[r(417)]("worker",r(622),e[r(488)](),e)}))[t(1174)]((()=>{ee[t(662)]=null})):ee[t(662)]=null),te)try{Wt(te[t(1186)])&&te[t(1186)](),Wt(te[t(1030)])&&te[t(1030)](),te=null}catch(e){ee[t(417)](t(305),t(1152)+e[t(488)]()+t(1168))}if(re)try{Wt(re[t(1186)])&&re[t(1186)](),Wt(re[t(1030)])&&re[t(1030)](),re=null}catch(e){ee[t(417)]("worker",t(308)+e[t(488)]()+t(1168))}l=null,S=null,w=!1,g=0,b=0,a&&(a[t(511)]&&a[t(511)](),a=null),Q&&(Q.destroy(),Q=null),ee.firstTimestamp=null,ee[t(918)]=null,ee[t(695)]=0,ee[t(936)]=null,ee[t(675)]=null,ee[t(679)]=null,ee[t(1122)]=-1,ee[t(920)]=-1,ee.preDelayTimestamp=null,ee[t(1e3)]=!1,ee[t(1099)]=!1,ee[t(349)]=!0,ee.isPlayback=!1,ee[t(1015)]=!1,ee[t(246)]=!1,ee[t(574)]=!1,ee[t(395)]=null,ee[t(478)]=Y(),ee.webglObj&&(ee[t(690)][t(511)](),ee[t(1022)][t(729)](t(900),ee.onOffscreenCanvasWebglContextLost),ee[t(1022)][t(729)](t(1101),ee[t(881)]),ee[t(1022)]=null,ee[t(400)]=null,ee[t(1147)]=null),s=[],o=[],f&&(f.close(),f=null),p=null,m=null,v=!1,y=!1,_=!1,U=!1,R=!1,L=!1,O=null,A=[],T=0,x=0,E=null,I=null,D=null,B=null,N=null,M=0,P=0,F=null,k=null,C=null,ee[t(638)]=Ze[t(1038)],H=!0,X[t(511)](),J[t(511)](),$.destroy(),Z[t(511)](),ee.debug=null,ee._opt={},postMessage({cmd:Te[t(228)]})},pushBuffer:function(t,r){const i=e;if(r[i(912)]===xe[i(513)]&&yt(t)){if(ee[i(417)](i(305),"pushBuffer audio ts is "+r.ts+", isAacCodecPacket is true"),ee[i(478)][i(1105)]){const e=new Uint8Array(t);postMessage({cmd:Te[i(525)],buffer:e},[e[i(630)]])}ee[i(568)](t,r.ts)}else if(r[i(912)]===xe.video&&r[i(415)]&&$t(t)){if(ee[i(417)]("worker",i(978)+r.ts+i(955)),ee[i(478)].isRecordTypeFlv){const e=new Uint8Array(t);postMessage({cmd:Te.videoSequenceHeader,buffer:e},[e[i(630)]])}ee[i(573)](t,r.ts,r[i(415)],r[i(1129)])}else{if(ee._opt[i(301)])if(ee[i(478)][i(1105)]){const e=new Uint8Array(t);postMessage({cmd:Te[i(1157)],type:r[i(912)],buffer:e,ts:r.ts},[e[i(630)]])}else if(ee[i(478)].recordType===he.mp4)if(r[i(912)]===xe.video){const e=new Uint8Array(t)[i(1069)](5);postMessage({cmd:Te[i(430)],buffer:e,isIFrame:r[i(415)],ts:r.ts,cts:r[i(1129)]},[e[i(630)]])}else if(r[i(912)]===xe.audio&&ee[i(478)][i(276)]){const e=new Uint8Array(t),n=_t(e)?e[i(1069)](2):e[i(1069)](1);postMessage({cmd:Te[i(1095)],buffer:n,ts:r.ts},[n.buffer])}if(ee.isPlayer){if(r[i(912)]===xe[i(375)]){if(M>0){const e=r.ts-B,t=2*M;e>=t&&ee[i(417)](i(305),"pushBuffer video and isIFrame is "+r[i(415)]+i(624)+r.ts+i(863)+B+i(397)+e+i(262)+M+i(704)+t+"\n maybe trigger black screen or flower screen\n ")}if(null!==B&&B>=r.ts&&(ee[i(1027)](i(305),"pushBuffer() and isIFrame is "+r[i(415)]+i(1192)+r.ts+i(498)+B+i(840)+t[i(317)]+i(539)+P),B-r.ts>Se&&(ee.debugWarn("worker",i(903)+B+i(988)+r.ts+i(397)+(B-r.ts)+i(421)+Se+",\n and resetAllDelay"),ee[i(953)](),B=null,M=0),ee._opt[i(1088)]&&Qt(r[i(415)])&&_)){const e=ee[i(383)](),t=Qt(ee.isPushDropping);return ee[i(417)](i(305),"pushBuffer, isDropSameTimestampGop is true and\n hasIframe is "+e+i(891)+t+i(462)),void(e&&t?ee[i(522)]():(ee[i(1042)](!0),Zt(ee[i(478)].checkFirstIFrame)&&Zt(n)&&(ee[i(1131)]()?Q[i(617)]=!1:postMessage({cmd:Te[i(947)]}))))}B>0&&(M=r.ts-B),P=t[i(317)],B=r.ts}if(_){const e=ee[i(478)][i(725)]+ee[i(478)].videoBufferDelay,t=ee[i(294)](r.ts,r[i(912)]);ee[i(920)]=t,ee[i(1122)]>0&&t>e&&ee[i(1122)]({type:e.type,ts:e.ts})));ee[t(417)](t(305),t(723)+e+t(552)+s.length+t(502)+JSON[t(764)](r));const n=100;s[t(419)]>=n&&(ee[t(1027)](t(305),t(1108)+s[t(419)]+t(421)+n+t(669)),ee[t(679)]=25,postMessage({cmd:Te[t(629)],value:ee.streamVideoFps}),ee.streamFps=ee[t(679)],ee[t(965)]())}}},getVideoBufferLength(){let e=0;return s.forEach((t=>{const r=bc;t[r(912)]===xe[r(375)]&&(e+=1)})),e},hasIframeInBufferList(){const t=e;return s[t(973)]((e=>{const r=t;return e[r(912)]===xe[r(375)]&&e[r(415)]}))},isAllIframeInBufferList(){const t=e,r=ee[t(909)]();let n=0;return s[t(1170)]((e=>{const r=t;e.type===xe[r(375)]&&e[r(415)]&&(n+=1)})),r===n},getNotDroppingDelayTs(){const t=e;return ee[t(478)][t(725)]+ee[t(478)][t(634)]/2},getAudioBufferLength(){const t=e;let r=0;return s[t(1170)]((e=>{const n=t;e[n(912)]===xe[n(513)]&&(r+=1)})),r},getStreamBufferLength(){const t=e;let r=0;return f&&f[t(630)]&&(r=f[t(630)][t(317)]),ee[t(478)][t(341)]?X[t(932)]&&(r=X[t(932)][t(317)]):ee[t(478)][t(442)]?Z._remainingPacketData&&(r=Z[t(1040)][t(317)]):ee[t(478)].isFmp4&&J[t(742)]&&(r=J[t(742)].getStreamBufferSize()),r},fetchStream:function(t){const r=e;let n=arguments[r(419)]>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[r(419)]>2&&void 0!==arguments[2]?arguments[2]:[];if(ee[r(417)](r(305),"fetchStream, url is "+t,"options:",JSON[r(764)](n)),ee.isWorkerFetch=!0,n[r(674)]?ee[r(478)][r(674)]=!0:n[r(877)]?ee[r(478)].isFmp4=!0:n.isMpeg4?ee[r(478)][r(623)]=!0:n[r(341)]?ee._opt.isNakedFlow=!0:n[r(442)]&&(ee[r(478)][r(442)]=!0),l=Lt((e=>{const t=r;postMessage({cmd:Te[t(769)],type:Me[t(295)],value:e})})),ee[r(667)](),ee[r(260)](),n[r(877)]&&J[r(594)](),n[r(1052)]===le[r(570)]){n[r(674)]&&(f=new ur(ee[r(396)]())),c=new AbortController;const e=Object[r(680)]({signal:c[r(363)]},{headers:n.options&&n[r(734)].headers||{}});fetch(t,e)[r(557)]((e=>{const t=r;if(Zt(z))return ee[t(417)](t(305),"request abort and run res.body.cancel()"),ee[t(638)]=Ze[t(1038)],void e[t(672)][t(507)]();if(!Xt(e))return ee[t(1027)](t(305),"fetch response status is "+e[t(466)]+t(292)+e.ok+" and emit error and next abort()"),K(),void postMessage({cmd:Te[t(769)],type:Fe.fetchError,value:t(297)+e[t(466)]+t(292)+e.ok});if(postMessage({cmd:Te[t(769)],type:Me[t(242)]}),qt())ee[t(662)]=new WritableStream({write:e=>{const r=t;return c&&c[r(363)]&&c[r(363)].aborted?(ee[r(417)]("worker",r(1119)),void(ee[r(638)]=Ze[r(879)])):Zt(z)?(ee[r(417)](r(305),r(839)),ee[r(638)]=Ze.complete,void K()):void(typeof e!==r(409)?(ee[r(638)]=Ze[r(285)],l(e[r(317)]),n[r(674)]?f[r(575)](e):n[r(877)]?ee[r(432)](e):n[r(623)]?ee.demuxMpeg4(e):n[r(442)]?ee[r(960)](e):n[r(341)]&&ee[r(1176)](e)):ee[r(1027)](r(305),r(251)+e+r(559)))},close:()=>{const e=t;ee[e(417)](e(305),e(813)),ee[e(638)]=Ze[e(879)],K(),ee[e(478)].checkStreamEnd?(f&&(f.close(),f=null),postMessage({cmd:Te[e(769)],type:Me[e(492)],value:de.fetch,msg:e(401)})):postMessage({cmd:Te[e(769)],type:Me[e(867)]})},abort:e=>{const r=t;if(c&&c[r(363)]&&c[r(363)][r(394)])return ee.debugLog(r(305),r(619)),void(ee[r(638)]=Ze.complete);f&&(f[r(516)](),f=null),e[r(359)]!==Ke[r(902)]?(ee[r(417)]("worker","writableStream abort() and e is "+e[r(488)]()),K(),postMessage({cmd:Te[r(769)],type:Fe[r(427)],value:e.toString()})):ee.debugLog(r(305),r(948))}}),e[t(672)][t(805)](ee[t(662)]).catch((e=>{const r=t;e.name!==r(1089)&&ee[r(417)](r(305),r(658),e.name,e.toString())}));else{const r=e[t(672)].getReader(),i=()=>{const e=t;r.read()[e(557)]((t=>{const r=e;let{done:s,value:o}=t;return s?(ee[r(417)](r(305),r(230)),ee[r(638)]=Ze[r(879)],K(),void(ee[r(478)][r(467)]?(f&&(f[r(516)](),f=null),postMessage({cmd:Te[r(769)],type:Me[r(492)],value:de[r(570)],msg:r(401)})):postMessage({cmd:Te.workerFetch,type:Me[r(867)]}))):c&&c.signal&&c[r(363)].aborted?(ee.debugLog(r(305),r(1017)),void(ee[r(638)]=Ze.complete)):Zt(z)?(ee[r(417)](r(305),r(1044)),ee[r(638)]=Ze[r(879)],void K()):void(typeof o!==r(409)?(ee[r(638)]=Ze[r(285)],l(o[r(317)]),n[r(674)]?f.write(o):n[r(877)]?ee[r(432)](o):n[r(623)]?ee[r(665)](o):n.isTs?ee[r(960)](o):n[r(341)]&&ee.demuxNakedFlow(o),i()):ee.debugWarn("worker",'fetchNext().then() and value "'+o+r(1020)))}))[e(748)]((t=>{const r=e;if(c&&c.signal&&c[r(363)][r(394)])return ee[r(417)](r(305),"fetchNext().catch() and abortController.signal.aborted is true so return"),void(ee[r(638)]=Ze[r(879)]);f&&(f[r(516)](),f=null),t[r(359)]!==Ke[r(902)]?(ee[r(417)]("worker",r(459)+t[r(488)]()),K(),postMessage({cmd:Te.workerFetch,type:Fe[r(427)],value:t.toString()})):ee[r(417)](r(305),"fetchNext().catch() and e.name is AbortError so return")}))};i()}})).catch((e=>{const t=r;c&&c[t(363)]&&c[t(363)][t(394)]?ee[t(417)](t(305),t(464)):e[t(359)]!==Ke[t(902)]?(ee[t(417)](t(305),"fetch().catch() and e is "+e[t(488)]()),K(),postMessage({cmd:Te[t(769)],type:Fe[t(378)],value:e[t(488)]()}),f&&(f[t(516)](),f=null)):ee[t(417)]("worker",t(789))}))}else n[r(1052)]===le[r(1153)]&&(n.isFlv&&(f=new ur(ee[r(396)]())),u=new WebSocket(t,i),u.binaryType=r(323),u[r(983)]=()=>{const e=r;ee[e(417)](e(305),e(465)),ee[e(1013)]=Ue[e(1057)],ee[e(776)](),postMessage({cmd:Te[e(769)],type:Me[e(242)]}),postMessage({cmd:Te.workerFetch,type:Me[e(963)]}),n[e(734)]&&n[e(734)][e(238)]&&ee[e(621)](n[e(734)][e(238)])},u[r(804)]=e=>{const t=r;if(ee[t(810)])return void ee.debugLog(t(305),"fetchStream, WebsocketStream socket close and code is "+e.code+" and isDestroyed is true, so return");if(h)return void ee[t(417)]("worker",t(255)+e.code+t(1019));if(ee[t(417)](t(305),"fetchStream, WebsocketStream socket close and code is "+e.code),Zt(z))return void ee.debugLog(t(305),t(320));let n=!1;1006===e[t(893)]&&(ee[t(974)]("worker",t(1080)+e[t(893)]),n=!0),ee[t(1013)]=Ue[t(516)],ee[t(478)][t(467)]||n?(f&&(f[t(516)](),f=null),postMessage({cmd:Te.workerFetch,type:Me[t(492)],value:de.websocket,msg:e[t(893)]})):postMessage({cmd:Te.workerFetch,type:Me.streamEndInner})},u.onerror=e=>{const t=r;ee.debugError("worker",t(858),e,e[t(488)]()),h=!0,ee.socketStatus=Ue.error,f&&(f[t(516)](),f=null),ee[t(810)]?ee.debugLog(t(305),t(1041)):Zt(z)?ee[t(417)](t(305),"fetchStream, WebsocketStream on error and requestAbort is true so return"):postMessage({cmd:Te[t(769)],type:Fe[t(1118)],value:e[t(620)]?t(1045):"websocket error"})},u[r(406)]=e=>{const t=r;typeof e.data!==t(409)?(l(e[t(455)][t(317)]),n[t(674)]?f[t(575)](e[t(455)]):n.isFmp4?ee[t(432)](e.data):n[t(623)]?ee[t(665)](e[t(455)]):ee._opt[t(341)]?ee[t(1176)](e[t(455)]):ee._opt[t(442)]?ee[t(960)](e[t(455)]):ee[t(431)](e[t(455)])):postMessage({cmd:Te.websocketStringMsg,value:e.data})})},demuxFlv:function*(){const t=e;yield 9;const r=new ArrayBuffer(4),n=new Uint8Array(r),i=new Uint32Array(r);for(;;){n[3]=0;const e=yield 15,r=e[4];n[0]=e[7],n[1]=e[6],n[2]=e[5];const s=i[0];n[0]=e[10],n[1]=e[9],n[2]=e[8],n[3]=e[11];let o=i[0];const a=(yield s)[t(1069)]();switch(r){case De[t(513)]:if(a.byteLength>0){const e=ee[t(402)](a);ee.decode(e,{type:xe.audio,ts:o})}else ee.debugWarn(t(305),t(536)+a[t(317)]+t(612));break;case De.video:if(a[t(317)]>=6){const e=a[0];if(ee[t(416)](e))ee[t(1178)](a,o);else{const e=15&a[0];let r=a[0]>>4===$e[t(482)];const n=e===Le[t(436)];if(Qt(r)&&Zt(tr(a,n))&&(ee[t(417)](t(305),"demux() isIFrame is false and unit type is IDR and update to true"),r=!0),r&&$t(a)&&null===ee[t(395)]){const e=15&a[0];ee[t(395)]=e===Le[t(436)],O=Dt(a,ee[t(395)]),ee[t(417)](t(305),t(766)+ee.isHevc+" and nalUnitSize is "+O)}r&&ee.calcIframeIntervalTimestamp(o),ee.isPlayer&&ee[t(770)](o),i[0]=a[4],i[1]=a[3],i[2]=a[2],i[3]=0;let s=i[0],c=ee[t(759)](a,r);ee[t(532)](c,{type:xe.video,ts:o,isIFrame:r,cts:s})}}else ee[t(1027)](t(305),"demuxFlv() type is video and payload.byteLength is "+a.byteLength+t(612));break;case De[t(801)]:postMessage({cmd:Te.flvScriptData,buffer:a},[a[t(630)]]);break;default:ee[t(417)]("worker",t(1081)+r)}}},decode:function(t,r){const n=e;r[n(912)]===xe[n(513)]?ee._opt[n(1110)]&&(postMessage({cmd:Te[n(769)],type:Me[n(1169)],value:t.byteLength}),ee[n(349)]?ee[n(818)](t,{type:r.type,ts:r.ts,cts:r[n(1129)]}):ee[n(307)]&&(ee[n(732)]()||(ee.isPlaybackCacheBeforeDecodeForFpsRender()?ee.pushBuffer(t,{type:r.type,ts:r.ts,cts:r[n(1129)]}):ee[n(818)](t,{type:r[n(912)],ts:r.ts,cts:r[n(1129)]})))):r[n(912)]===xe.video&&ee[n(478)][n(494)]&&(postMessage({cmd:Te[n(769)],type:Me[n(1051)],value:t[n(317)]}),postMessage({cmd:Te[n(769)],type:Me.streamDts,value:r.ts}),ee[n(349)]?ee[n(818)](t,{type:r[n(912)],ts:r.ts,isIFrame:r.isIFrame,cts:r[n(1129)]}):ee[n(307)]&&(ee[n(889)]()?ee[n(818)](t,{type:r[n(912)],ts:r.ts,cts:r[n(1129)],isIFrame:r[n(415)]}):ee[n(732)]()?r[n(415)]&&ee[n(818)](t,{type:r.type,ts:r.ts,cts:r.cts,isIFrame:r[n(415)]}):ee[n(818)](t,{type:r[n(912)],ts:r.ts,cts:r[n(1129)],isIFrame:r[n(415)]})))},cryptoPayload:function(t,r){const n=e;let i=t;return ee[n(478)][n(870)]?ee[n(478)][n(972)]&&ee[n(478)][n(972)][n(317)]>0&&ee[n(478)][n(685)]&&ee[n(478)][n(685)][n(317)]>0?i=Co(t,ee[n(478)].cryptoKey,ee[n(478)][n(972)],ee.isHevc):ee[n(974)](n(305),n(656)+(ee[n(478)].cryptoKey&&ee[n(478)].cryptoKey[n(317)])+n(1173)+(ee[n(478)].cryptoIV&&ee[n(478)][n(972)][n(317)])+n(1156)):ee[n(478)][n(1135)]?ee._opt.sm4CryptoKey?i=ee._opt[n(972)]&&ee[n(478)][n(972)][n(317)]>0&&ee[n(478)][n(685)]&&ee._opt[n(685)][n(317)]>0?_c(t,ee[n(478)][n(685)],ee[n(478)][n(972)],ee[n(395)],ee[n(478)][n(673)]):sa(t,ee[n(478)].sm4CryptoKey,ee[n(395)],ee[n(478)][n(673)]):!ee._opt[n(796)]&&ee[n(974)](n(305),n(1179)):ee._opt.isXorCrypto&&(ee[n(478)][n(972)]&&ee[n(478)].cryptoIV[n(317)]>0&&ee[n(478)].cryptoKey&&ee[n(478)][n(685)].byteLength>0?i=ga(t,ee[n(478)].cryptoKey,ee[n(478)][n(972)],ee[n(395)]):ee[n(974)]("worker","isXorCrypto cryptoKey.length is "+(ee[n(478)].cryptoKey&&ee[n(478)].cryptoKey[n(317)])+n(1173)+(ee[n(478)][n(972)]&&ee[n(478)][n(972)][n(317)])+n(1156))),i},cryptoPayloadAudio:function(t){const r=e;if(Qt(ee._opt[r(348)]))return t;let n=t;return ee[r(478)][r(870)]?ee[r(478)][r(972)]&&ee[r(478)][r(972)][r(317)]>0&&ee._opt.cryptoKey&&ee[r(478)].cryptoKey.byteLength>0?t[0]>>4===Ne.AAC&&(n=To(t,ee[r(478)].cryptoKey,ee._opt.cryptoIV)):ee[r(974)](r(305),r(656)+(ee[r(478)].cryptoKey&&ee[r(478)][r(685)].byteLength)+r(1173)+(ee[r(478)][r(972)]&&ee._opt[r(972)][r(317)])+" null"):ee._opt[r(592)]&&(ee[r(478)].cryptoIV&&ee._opt[r(972)][r(317)]>0&&ee._opt[r(685)]&&ee[r(478)][r(685)][r(317)]>0?t[0]>>4===Ne[r(954)]&&(n=ba(t,ee._opt.cryptoKey,ee[r(478)][r(972)])):ee[r(974)]("worker",r(504)+(ee[r(478)][r(685)]&&ee[r(478)].cryptoKey[r(317)])+r(1173)+(ee[r(478)][r(972)]&&ee[r(478)][r(972)][r(317)])+" null")),n},setCodecAudio:function(t,r){const n=e,s=t[0]>>4,o=t[0]>>1&1;if(N=s===Ne[n(954)]?o?16:8:0===o?8:16,te&&te[n(824)]||!Qt(i))if(yt(t)||s===Ne[n(907)]||s===Ne[n(1068)]||s===Ne[n(569)]){ee[n(417)](n(305),n(322)+s+n(806)+ee[n(478)][n(578)]);const e=s===Ne[n(954)]?t[n(1069)](2):new Uint8Array(0);if(i){if(s===Ne[n(569)])return void ee[n(974)](n(305),"setCodecAudio: mp3 is not support for old version");te[n(976)]=ee[n(478)].sampleRate,te.decode(t,r)}else te[n(824)](s,ee[n(478)][n(578)],e,ee[n(707)]());if(s===Ne[n(954)]&&postMessage({cmd:Te[n(661)],buffer:e},[e[n(630)]]),y=!0,s!==Ne[n(954)]&&(s===Ne[n(569)]?(!ee[n(615)]&&(ee[n(615)]=new pa(ee),ee[n(615)].on(n(455),((e,t)=>{te[n(532)](e,t)}))),ee.mp3Demuxer[n(991)](t[n(1069)](1),r)):te[n(532)](t[n(1069)](1),r)),rr()){const e=Number("1")||1;setTimeout((()=>{const e=n;ee[e(974)]("worker",e(653)),ee.close(),postMessage({cmd:Te[e(832)]})}),60*e*60*1e3)}}else ee.debugWarn(n(305),n(366),s);else ee.debugError(n(305),n(760))},decodeAudio:function(t,r){const s=e;if(ee[s(810)])ee[s(417)](s(305),s(239));else if(ee[s(449)]())Q[s(568)](t,r);else if(Zt(n)&&Zt(ee[s(478)][s(1136)]))postMessage({cmd:Te[s(331)],payload:t,ts:r,cts:r},[t.buffer]);else{const e=t[0]>>4;if(y){if(yt(t))return void ee.debugLog(s(305),s(1187));i?te[s(532)](t,r):e===Ne[s(569)]?ee[s(615)][s(991)](t[s(1069)](1),r):te.decode(e===Ne[s(954)]?t[s(1069)](2):t[s(1069)](1),r)}else ee[s(1029)](t,r)}},setCodecVideo:function(t,r){const n=e,s=15&t[0];if(re&&re[n(824)]||!Qt(i))if($t(t))if(s===Le[n(545)]||s===Le[n(436)]){ee[n(417)](n(305),n(1060)+s);const e=t[n(1069)](5);if(s===Le[n(545)]&&ee[n(478)][n(441)]){const t=Tr(e);if(t[n(599)]>Ee||t[n(756)]>Ee)return postMessage({cmd:Te[n(853)],value:"width: "+t[n(599)]+n(589)+Ee+n(671)+t.codecHeight+n(589)+Ee}),void ee[n(1027)](n(305),n(483)+t.codecWidth+", height is "+t[n(756)])}const r=new Uint8Array(t);v=!0,i?re[n(532)](t,0):re[n(824)](s,e,ee.getBuildTime()),postMessage({cmd:Te.videoCode,code:s}),postMessage({cmd:Te[n(774)],buffer:r,codecId:s},[r[n(630)]])}else ee[n(1027)](n(305),n(1008)+s+n(318));else ee[n(1027)](n(305),"decodeVideo: hasInitVideoCodec is false, codecId is "+s+n(1083)+r+n(873)+t[1]);else ee.debugError(n(305),n(440))},decodeVideo:function(t,r,s){const o=e;let a=arguments[o(419)]>3&&void 0!==arguments[3]?arguments[3]:0;if(ee[o(810)])ee.debugLog(o(305),"decodeVideo, decoder is destroyed and return");else if(ee[o(1131)]())Q[o(573)](t,r,s,a);else if(Zt(n))postMessage({cmd:Te[o(721)],payload:t,isIFrame:s,ts:r,cts:a,delay:ee[o(1122)]},[t[o(630)]]);else if(v)if(!_&&s&&(_=!0),_){if(s&&$t(t)){const e=15&t[0];let r={};e===Le.h264?r=Tr(t[o(1069)](5)):e===Le.h265&&(r=on(t)),r.codecWidth&&r[o(756)]&&p&&m&&(r[o(599)]!==p||r[o(756)]!==m)&&(ee[o(1027)]("worker",o(980)+p+", old height is "+m+o(508)+r[o(599)]+o(712)+r[o(756)]+o(1180)),R=!0,postMessage({cmd:Te[o(519)],value:o(779)+p+"->"+r.codecWidth+o(671)+m+"->"+r[o(756)]}))}if(R)return void ee[o(1027)](o(305),o(854));if(L)return void ee[o(1027)](o(305),o(676));if($t(t))return void ee[o(417)]("worker",o(337));if(t[o(317)]0&&void 0!==arguments[0]&&arguments[0];ee[t(417)](t(305),t(520)+s[t(419)]+t(377)+r),r&&(s=[]),ee[t(349)]&&(ee[t(953)](),Zt(ee[t(478)][t(947)])&&(ee.dropping=!0,postMessage({cmd:Te[t(438)]}))),Zt(ee._opt[t(947)])&&Qt(n)&&(_=!1)},dropBuffer$2:function(){const t=e;if(s[t(419)]>0){let e=s[t(872)]((e=>{const r=t;return Zt(e.isIFrame)&&e[r(912)]===xe[r(375)]}));if(ee[t(411)]())for(let r=0;r=ee[t(447)]()){ee.debugLog(t(305),t(1085)+r+t(224)+i+t(336)+ee[t(447)]()),e=r;break}}if(e>=0){ee[t(1099)]=!0,postMessage({cmd:Te.isDropping});const r=s[t(419)];s=s[t(1069)](e);const n=s[t(506)]();ee[t(953)](),ee.getDelay(n.ts,n[t(912)]),ee.doDecode(n),ee.isPushDropping=!1,ee[t(417)](t(305),t(814)+e+t(747)+r+t(981)+s[t(419)]+" and new delay is "+ee[t(1122)]+" ")}else ee[t(1099)]=!1}0===s[t(419)]&&(ee[t(1099)]=!1)},demuxM7s:function(t){const r=e,n=new DataView(t),i=n[r(352)](1,!1),s=n.getUint8(0),o=new ArrayBuffer(4),a=new Uint32Array(o);switch(s){case xe[r(513)]:const e=ee[r(402)](new Uint8Array(t,5));ee[r(532)](e,{type:xe[r(513)],ts:i});break;case xe[r(375)]:if(n[r(317)]>=11){const e=new Uint8Array(t,5),s=e[0];if(ee[r(416)](s))ee[r(1178)](e,i);else{const t=n.getUint8(5)>>4==1;if(t&&(ee.calcIframeIntervalTimestamp(i),$t(e)&&null===ee[r(395)])){const t=15&e[0];ee.isHevc=t===Le[r(436)]}ee.isPlayer&&ee[r(770)](i),a[0]=e[4],a[1]=e[3],a[2]=e[2],a[3]=0;let s=a[0],o=ee[r(759)](e,t);ee.decode(o,{type:xe[r(375)],ts:i,isIFrame:t,cts:s})}}else ee[r(1027)](r(305),r(808)+t[r(317)]+" and return")}},demuxNakedFlow:function(t){X[e(991)](t)},demuxFmp4:function(t){J[e(991)](t)},demuxMpeg4:function(e){$.dispatch(e)},demuxTs:function(t){Z[e(991)](t)},_decodeEnhancedH265Video:function(t,r){const n=e,i=t[0],s=48&i,o=15&i,a=t.slice(1,5),c=new ArrayBuffer(4),u=new Uint32Array(c),l="a"==String[n(1182)](a[0]);if(ee[n(395)]=Qt(l),o===tt[n(778)]){if(s===rt[n(1067)]){const e=t.slice(5);if(l);else{const i=new Uint8Array(5+e[n(419)]);i[n(356)]([28,0,0,0,0],0),i.set(e,5),O=Dt(t,ee[n(395)]),ee.debugLog(n(305),n(689)+ee[n(395)]+n(531)+O),ee[n(532)](i,{type:xe[n(375)],ts:r,isIFrame:!0,cts:0})}}}else if(o===tt[n(1062)]){let e=t,i=0;const o=s===rt[n(1067)];o&&ee.calcIframeIntervalTimestamp(r),l||(u[0]=t[4],u[1]=t[3],u[2]=t[2],u[3]=0,i=u[0],e=dn(t.slice(8),o),e=ee.cryptoPayload(e,o),ee[n(532)](e,{type:xe[n(375)],ts:r,isIFrame:o,cts:i}))}else if(o===tt[n(1073)]){const e=s===rt[n(1067)];e&&ee[n(735)](r);let i=dn(t[n(1069)](5),e);i=ee.cryptoPayload(i,e),ee[n(532)](i,{type:xe[n(375)],ts:r,isIFrame:e,cts:0})}},_isEnhancedH265Header:function(e){return(e&et)===et},findSei:function(t,r){const n=e;let i=4;jt(O)&&(i=O),kt(t.slice(5),i)[n(1170)]((e=>{const t=n,i=ee[t(395)]?e[0]>>>1&63:31&e[0],s=ee[t(395)]&&(i===He[t(241)]||i===He[t(535)]),o=Qt(ee[t(395)])&&i===ze[t(345)];if(s||o){const n=Tt(e,ee[t(395)]);postMessage({cmd:Te[t(290)],buffer:n[t(1106)],ts:r},[n[t(1106)][t(630)]])}}))},calcNetworkDelay:function(t){const r=e;if(!(_&&t>0))return;null===E?(E=t,I=Ft()):tn?i-n:0;if(ee[r(695)]=s,s>ee._opt[r(695)]&&ee[r(478)][r(964)]===fe[r(350)]){let e=!1;null===F&&(e=!0,F=Ft());const o=Ft();(o-F>=1e3||e)&&(ee[r(1027)](r(305),r(1035)+t+r(279)+E+" vs start is "+n+r(1065)+i+" ,delay is "+s),postMessage({cmd:Te.workerFetch,type:Me[r(772)],value:s}),F=o)}},calcIframeIntervalTimestamp:function(t){null===D?D=t:D=ee[t(478)][t(1012)]&&!(ee[t(478)][t(593)]&&ee[t(478)][t(1136)])},isPlayUseMSE:function(){const t=e;return ee[t(349)]&&ee[t(478)][t(593)]&&Zt(n)},isPlayUseMSEAndDecoderInWorker:function(){const t=e;return ee[t(231)]()&&ee._opt[t(1167)]},isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio:function(){const t=e;return ee.isPlayUseMSEAndDecoderInWorker()&&ee[t(478)][t(1136)]},playbackUpdatePlaybackRate:function(){},onOffscreenCanvasWebglContextLost:function(t){const r=e;ee[r(974)](r(305),r(495)),t[r(744)](),U=!0,ee.webglObj[r(511)](),ee[r(690)]=null,ee[r(400)]=null,setTimeout((()=>{const e=r;ee[e(400)]=ee[e(1022)][e(514)](e(720)),ee[e(400)]&&ee[e(400)][e(957)]()[e(987)]?(ee.webglObj=ae(ee.offscreenCanvasGL,ee[e(478)][e(611)]),U=!1):ee.debugError(e(305),e(1059))}),500)},onOffscreenCanvasWebglContextRestored:function(t){const r=e;ee.debugLog(r(305),r(347)),t[r(744)]()},videoInfo:function(t,r,n){const i=e;postMessage({cmd:Te.videoCode,code:t}),postMessage({cmd:Te[i(562)],w:r,h:n}),p=r,m=n,ee.useOffscreen()&&(ee[i(1022)]=new OffscreenCanvas(r,n),ee[i(400)]=ee[i(1022)][i(514)]("webgl"),ee.webglObj=ae(ee.offscreenCanvasGL,ee[i(478)].openWebglAlignment),ee[i(1022)][i(1004)](i(900),ee[i(856)],!1),ee[i(1022)].addEventListener("webglcontextrestored",ee.onOffscreenCanvasWebglContextRestored,!1))},audioInfo:function(t,r,n){const i=e;postMessage({cmd:Te.audioCode,code:t}),postMessage({cmd:Te[i(481)],sampleRate:r,channels:n,depth:N}),x=n},yuvData:function(r,n){const i=e;if(ee.isDestroyed)return void ee[i(417)]("worker",i(861));if(Qt(_))return void ee[i(417)](i(305),i(523));const s=p*m*3/2;try{let e=t[i(1162)][i(226)](r,r+s),o=new Uint8Array(e);if(k=null,b=n,ee[i(894)]())try{if(U)return;ee[i(690)][i(985)](p,m,o);let e=ee[i(1022)].transferToImageBitmap();postMessage({cmd:Te[i(398)],buffer:e,delay:ee[i(1122)],ts:n},[e])}catch(e){ee[i(974)](i(305),i(898),e,e[i(488)]())}else postMessage({cmd:Te[i(398)],output:o,delay:ee.delay,ts:n},[o[i(630)]])}catch(e){ee[i(1027)](i(305),i(654)+n+i(223),e,e[i(488)]())}},pcmData:function(t,n,i){const s=e;if(ee[s(810)])return void ee[s(417)](s(305),s(659));let a=n,c=[],u=0;try{let e=ee._opt[s(628)];for(let e=0;e<2;e++){let n=r[s(1077)][(t>>2)+e]>>2;c[e]=r.HEAPF32.subarray(n,n+a)}if(T){if(!(a>=(n=e-T)))return T+=a,o[0]=Float32Array.of(...o[0],...c[0]),void(2==x&&(o[1]=Float32Array.of(...o[1],...c[1])));A[0]=Float32Array.of(...o[0],...c[0][s(226)](0,n)),2==x&&(A[1]=Float32Array.of(...o[1],...c[1][s(226)](0,n))),postMessage({cmd:Te.playAudio,buffer:A,ts:i},A[s(1155)]((e=>e[s(630)]))),u=n,a-=n}for(T=a;T>=e;T-=e)A[0]=c[0].slice(u,u+=e),2==x&&(A[1]=c[1].slice(u-e,u)),postMessage({cmd:Te[s(1112)],buffer:A,ts:i},A[s(1155)]((e=>e[s(630)])));T&&(o[0]=c[0][s(1069)](u),2==x&&(o[1]=c[1][s(1069)](u))),c=[]}catch(e){ee[s(1027)]("worker",s(970)+i+s(223),e,e[s(488)]())}},errorInfo:function(t){const r=e;null===k&&(k=Ft());const n=Ft(),i=Ut(C>0?2*C:5e3,1e3,5e3),s=n-k;s>i&&(ee.debugWarn("worker","errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is "+C+" and diff is "+s+" and maxDiff is "+i+r(1148)),L=!0,postMessage({cmd:Te[r(387)]}))},sendWebsocketMessage:function(t){const r=e;u?u[r(952)]===Re?(ee.debugLog(r(305),r(550),t),u[r(763)](t)):ee[r(974)](r(305),r(601),u.readyState):ee.debugError(r(305),r(420))},timeEnd(){const t=e;ee[t(974)]("worker","Jb pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),ee.close(),postMessage({cmd:Te[t(832)]})},postStreamToMain(t,r){const n=e;postMessage({cmd:Te[n(905)],type:r,buffer:t},[t[n(630)]])},updatePlaybackIsPause(t){const r=e;ee[r(417)](r(305),"updatePlaybackIsPause, isPause is "+t),ee[r(1015)]=t,Zt(t)?ee[r(344)]():ee[r(934)]()},getBuildTime:()=>"JessibucaPro-"+we,validatedFailed(){const t=e;ee[t(974)](t(305),t(1159))},debugLog(t){const r=e;if(ee[r(478)].debug&&ee[r(752)]){for(var n=arguments[r(419)],i=new Array(n>1?n-1:0),s=1;s1?n-1:0),s=1;s1?n-1:0),s=1;s>2,p=t,m=r,postMessage({cmd:Te.initVideo,w:t,h:r}),ee[n(894)]()&&(ee.offscreenCanvas=new OffscreenCanvas(t,r),ee[n(400)]=ee.offscreenCanvas[n(514)](n(720)),ee.webglObj=ae(ee.offscreenCanvasGL,ee[n(478)][n(611)]),ee.offscreenCanvas.addEventListener(n(900),ee.onOffscreenCanvasWebglContextLost,!1),ee[n(1022)][n(1004)](n(1101),ee[n(881)],!1))},initAudioPlanar:function(t,r){x=t,postMessage({cmd:Te[e(481)],sampleRate:r,channels:t,depth:N})},playAudioPlanar:function(t,n,i){const s=e;if(ee[s(810)])return void ee[s(417)](s(305),s(659));let a=n,c=[],u=0,l=ee._opt[s(628)];for(let e=0;e<2;e++){let n=r[s(1077)][(t>>2)+e]>>2;c[e]=r[s(727)][s(226)](n,n+a)}if(T){if(!(a>=(n=l-T)))return T+=a,o[0]=Float32Array.of(...o[0],...c[0]),void(2==x&&(o[1]=Float32Array.of(...o[1],...c[1])));A[0]=Float32Array.of(...o[0],...c[0][s(226)](0,n)),2==x&&(A[1]=Float32Array.of(...o[1],...c[1][s(226)](0,n))),postMessage({cmd:Te[s(1112)],buffer:A,ts:i},A[s(1155)]((e=>e[s(630)]))),u=n,a-=n}for(T=a;T>=l;T-=l)A[0]=c[0][s(1069)](u,u+=l),2==x&&(A[1]=c[1][s(1069)](u-l,u)),postMessage({cmd:Te[s(1112)],buffer:A,ts:i},A[s(1155)]((e=>e[s(630)])));T&&(o[0]=c[0][s(1069)](u),2==x&&(o[1]=c[1][s(1069)](u))),c=[]},draw:function(r,n,i,s){const o=e;if(ee[o(810)])return void ee[o(417)](o(305),o(1100));const a=t[o(1162)][o(226)](n,n+V),c=t.HEAPU8[o(226)](i,i+j),u=t[o(1162)][o(226)](s,s+j),l=new Uint8Array(V+j+j);if(l[o(356)](a),l[o(356)](c,V),l[o(356)](u,V+j),k=null,b=r,ee[o(894)]())try{if(U)return;ee[o(690)].renderYUV(p,m,l);let e=ee[o(1022)][o(1121)]();postMessage({cmd:Te[o(398)],buffer:e,delay:ee[o(1122)],ts:r},[e])}catch(e){ee[o(974)](o(305),o(898),e,e[o(488)]())}else postMessage({cmd:Te.render,output:l,delay:ee[o(1122)],ts:r},[l[o(630)]])}}));let te=null;r[e(925)]&&(te=new(r[e(925)])(ee));let re=null;t[e(775)]&&(re=new(t[e(775)])(ee)),postMessage({cmd:Te[e(667)]}),self.onmessage=function(t){const r=e;let n=t[r(455)];switch(n[r(1043)]){case Be[r(667)]:try{ee[r(478)]=Object.assign(ee[r(478)],JSON[r(277)](n.opt))}catch(e){}ee[r(417)]("worker",r(657)+Be[r(667)],n[r(1023)]);break;case Be.decode:ee.pushBuffer(n[r(630)],n[r(734)]);break;case Be[r(762)]:ee[r(568)](n[r(630)],n.ts);break;case Be.videoDecode:ee[r(573)](n[r(630)],n.ts,n[r(415)]);break;case Be[r(1042)]:ee[r(1042)](n[r(821)]);break;case Be[r(311)]:ee.fetchStream(n[r(791)],JSON[r(277)](n[r(1023)]),n[r(865)]);break;case Be[r(516)]:ee[r(417)](r(305),r(657)+Be[r(516)],JSON[r(764)](n.options)),n[r(734)]&&Qt(n[r(734)][r(605)])&&(H=n.options[r(605)]),ee[r(516)]();break;case Be.updateConfig:ee[r(417)](r(305),r(657)+Be.updateConfig,n[r(717)],n[r(381)]),ee[r(478)][n[r(717)]]=n[r(381)],n[r(717)]===r(275)&&(ee.playbackUpdatePlaybackRate(),ee[r(889)]()&&Qt(ee[r(1015)]));break;case Be[r(376)]:ee[r(621)](n[r(811)]);break;case Be[r(989)]:Q[r(688)][r(399)]=Number(n[r(811)]);break;case Be[r(1142)]:ee[r(1021)](n[r(433)])}}}(h,h,!1,!0)}})); diff --git a/ui/decoder-pro-old.wasm b/ui/decoder-pro-old.wasm new file mode 100755 index 0000000..89c8185 Binary files /dev/null and b/ui/decoder-pro-old.wasm differ diff --git a/ui/decoder-pro-simd-mt-worker.js b/ui/decoder-pro-simd-mt-worker.js index 88f521a..489aa9e 100644 --- a/ui/decoder-pro-simd-mt-worker.js +++ b/ui/decoder-pro-simd-mt-worker.js @@ -5,12 +5,12 @@ var Module = (() => { return ( async function(moduleArg = {}) { -var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var Module=typeof Module!="undefined"?Module:{};Module["locateFile"]=function(url){if(url=="decoder-pro-simd-mt-worker.wasm"&&typeof JESSIBUCA_PRO_SIMD_MT_WORKER_WASM_URL!="undefined"&&JESSIBUCA_PRO_SIMD_MT_WORKER_WASM_URL!="")return JESSIBUCA_PRO_SIMD_MT_WORKER_WASM_URL;else return url;if(url=="decoder-pro-simd-mt-worker.worker.js"&&typeof JESSIBUCA_PRO_SIMD_MT_WORKER_JS_URL!="undefined"&&JESSIBUCA_PRO_SIMD_MT_WORKER_JS_URL!=""){return JESSIBUCA_PRO_SIMD_MT_WORKER_JS_URL}else{return url}};var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var ENVIRONMENT_IS_PTHREAD=Module["ENVIRONMENT_IS_PTHREAD"]||false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_NODE){const{createRequire:createRequire}=await import("module");var require=createRequire(import.meta.url);var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=require("url").fileURLToPath(new URL("./",import.meta.url))}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror,binary=true)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,binary?undefined:"utf8",(err,data)=>{if(err)onerror(err);else onload(binary?data.buffer:data)})};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow};Module["inspect"]=()=>"[Emscripten Module object]";let nodeWorkerThreads;try{nodeWorkerThreads=require("worker_threads")}catch(e){console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?');throw e}global.Worker=nodeWorkerThreads.Worker}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}if(!ENVIRONMENT_IS_NODE){read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}if(ENVIRONMENT_IS_NODE){if(typeof performance=="undefined"){global.performance=require("perf_hooks").performance}}var defaultPrint=console.log.bind(console);var defaultPrintErr=console.error.bind(console);if(ENVIRONMENT_IS_NODE){defaultPrint=(...args)=>fs.writeSync(1,args.join(" ")+"\n");defaultPrintErr=(...args)=>fs.writeSync(2,args.join(" ")+"\n")}var out=Module["print"]||defaultPrint;var err=Module["printErr"]||defaultPrintErr;Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var wasmModule;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text)}}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||536870912;assert(INITIAL_MEMORY>=16777216,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+INITIAL_MEMORY+"! (STACK_SIZE="+16777216+")");if(ENVIRONMENT_IS_PTHREAD){wasmMemory=Module["wasmMemory"]}else{if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":INITIAL_MEMORY/65536,"shared":true});if(!(wasmMemory.buffer instanceof SharedArrayBuffer)){err("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag");if(ENVIRONMENT_IS_NODE){err("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)")}throw Error("bad memory")}}}updateMemoryViews();INITIAL_MEMORY=wasmMemory.buffer.byteLength;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;var runtimeKeepaliveCounter=0;function keepRuntimeAlive(){return noExitRuntime||runtimeKeepaliveCounter>0}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(ENVIRONMENT_IS_PTHREAD)return;callRuntimeCallbacks(__ATINIT__)}function postRun(){if(ENVIRONMENT_IS_PTHREAD)return;if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix)}function isFileURI(filename){return filename.startsWith("file://")}var wasmBinaryFile;if(Module["locateFile"]){wasmBinaryFile="decoder-pro-simd-mt-worker.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}}else{wasmBinaryFile=new URL("decoder-pro-simd-mt-worker.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(binaryFile)){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{if(!response["ok"]){throw"failed to load wasm binary file at '"+binaryFile+"'"}return response["arrayBuffer"]()}).catch(()=>getBinarySync(binaryFile))}else if(readAsync){return new Promise((resolve,reject)=>{readAsync(binaryFile,response=>resolve(new Uint8Array(response)),reject)})}}return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;registerTLSInit(wasmExports["O"]);wasmTable=wasmExports["T"];addOnInit(wasmExports["L"]);wasmModule=module;removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"],result["module"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}var terminateWorker=worker=>{worker.terminate();worker.onmessage=e=>{}};var killThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];delete PThread.pthreads[pthread_ptr];terminateWorker(worker);__emscripten_thread_free_data(pthread_ptr);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0};var cancelThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];worker.postMessage({"cmd":"cancel"})};var cleanupThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];assert(worker);PThread.returnWorkerToPool(worker)};var spawnThread=threadParams=>{var worker=PThread.getNewWorker();if(!worker){return 6}PThread.runningWorkers.push(worker);PThread.pthreads[threadParams.pthread_ptr]=worker;worker.pthread_ptr=threadParams.pthread_ptr;var msg={"cmd":"run","start_routine":threadParams.startRoutine,"arg":threadParams.arg,"pthread_ptr":threadParams.pthread_ptr};if(ENVIRONMENT_IS_NODE){worker.unref()}worker.postMessage(msg,threadParams.transferList);return 0};var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.buffer instanceof SharedArrayBuffer?heapOrArray.slice(idx,endPtr):heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var SYSCALLS={varargs:undefined,get(){var ret=HEAP32[+SYSCALLS.varargs>>2];SYSCALLS.varargs+=4;return ret},getp(){return SYSCALLS.get()},getStr(ptr){var ret=UTF8ToString(ptr);return ret}};function _proc_exit(code){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(0,1,code);EXITSTATUS=code;if(!keepRuntimeAlive()){PThread.terminateAllThreads();if(Module["onExit"])Module["onExit"](code);ABORT=true}quit_(code,new ExitStatus(code))}var exitJS=(status,implicit)=>{EXITSTATUS=status;if(ENVIRONMENT_IS_PTHREAD){exitOnMainThread(status);throw"unwind"}_proc_exit(status)};var _exit=exitJS;var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var PThread={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){if(ENVIRONMENT_IS_PTHREAD){PThread.initWorker()}else{PThread.initMainThread()}},initMainThread(){var pthreadPoolSize=8;while(pthreadPoolSize--){PThread.allocateUnusedWorker()}addOnPreRun(()=>{addRunDependency("loading-workers");PThread.loadWasmModuleToAllWorkers(()=>removeRunDependency("loading-workers"))})},initWorker(){noExitRuntime=false},setExitStatus:status=>{EXITSTATUS=status},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var worker of PThread.runningWorkers){terminateWorker(worker)}for(var worker of PThread.unusedWorkers){terminateWorker(worker)}PThread.unusedWorkers=[];PThread.runningWorkers=[];PThread.pthreads=[]},returnWorkerToPool:worker=>{var pthread_ptr=worker.pthread_ptr;delete PThread.pthreads[pthread_ptr];PThread.unusedWorkers.push(worker);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0;__emscripten_thread_free_data(pthread_ptr)},receiveObjectTransfer(data){},threadInitTLS(){PThread.tlsInitFunctions.forEach(f=>f())},loadWasmModuleToWorker:worker=>new Promise(onFinishedLoading=>{worker.onmessage=e=>{var d=e["data"];var cmd=d["cmd"];if(d["targetThread"]&&d["targetThread"]!=_pthread_self()){var targetWorker=PThread.pthreads[d["targetThread"]];if(targetWorker){targetWorker.postMessage(d,d["transferList"])}else{err(`Internal error! Worker sent a message "${cmd}" to target pthread ${d["targetThread"]}, but that thread no longer exists!`)}return}if(cmd==="checkMailbox"){checkMailbox()}else if(cmd==="spawnThread"){spawnThread(d)}else if(cmd==="cleanupThread"){cleanupThread(d["thread"])}else if(cmd==="killThread"){killThread(d["thread"])}else if(cmd==="cancelThread"){cancelThread(d["thread"])}else if(cmd==="loaded"){worker.loaded=true;if(ENVIRONMENT_IS_NODE&&!worker.pthread_ptr){worker.unref()}onFinishedLoading(worker)}else if(cmd==="alert"){alert(`Thread ${d["threadId"]}: ${d["text"]}`)}else if(d.target==="setimmediate"){worker.postMessage(d)}else if(cmd==="callHandler"){Module[d["handler"]](...d["args"])}else if(cmd){err(`worker sent an unknown command ${cmd}`)}};worker.onerror=e=>{var message="worker sent an error!";err(`${message} ${e.filename}:${e.lineno}: ${e.message}`);throw e};if(ENVIRONMENT_IS_NODE){worker.on("message",data=>worker.onmessage({data:data}));worker.on("error",e=>worker.onerror(e))}var handlers=[];var knownHandlers=["onExit","onAbort","print","printErr"];for(var handler of knownHandlers){if(Module.hasOwnProperty(handler)){handlers.push(handler)}}worker.postMessage({"cmd":"load","handlers":handlers,"urlOrBlob":Module["mainScriptUrlOrBlob"],"wasmMemory":wasmMemory,"wasmModule":wasmModule})}),loadWasmModuleToAllWorkers(onMaybeReady){if(ENVIRONMENT_IS_PTHREAD){return onMaybeReady()}let pthreadPoolReady=Promise.all(PThread.unusedWorkers.map(PThread.loadWasmModuleToWorker));pthreadPoolReady.then(onMaybeReady)},allocateUnusedWorker(){var worker;if(!Module["locateFile"]){worker=new Worker(new URL("decoder-pro-simd-mt-worker.worker.js",import.meta.url))}else{var pthreadMainJs=locateFile("decoder-pro-simd-mt-worker.worker.js");worker=new Worker(pthreadMainJs)}PThread.unusedWorkers.push(worker)},getNewWorker(){if(PThread.unusedWorkers.length==0){PThread.allocateUnusedWorker();PThread.loadWasmModuleToWorker(PThread.unusedWorkers[0])}return PThread.unusedWorkers.pop()}};Module["PThread"]=PThread;var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var establishStackSpace=()=>{var pthread_ptr=_pthread_self();var stackHigh=HEAPU32[pthread_ptr+52>>2];var stackSize=HEAPU32[pthread_ptr+56>>2];var stackLow=stackHigh-stackSize;_emscripten_stack_set_limits(stackHigh,stackLow);stackRestore(stackHigh)};Module["establishStackSpace"]=establishStackSpace;function exitOnMainThread(returnCode){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(1,0,returnCode);_exit(returnCode)}var wasmTableMirror=[];var wasmTable;var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};var invokeEntryPoint=(ptr,arg)=>{var result=getWasmTableEntry(ptr)(arg);function finish(result){if(keepRuntimeAlive()){PThread.setExitStatus(result)}else{__emscripten_thread_exit(result)}}finish(result)};Module["invokeEntryPoint"]=invokeEntryPoint;var registerTLSInit=tlsInitFunc=>{PThread.tlsInitFunctions.push(tlsInitFunc)};function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>2]=type};this.get_type=function(){return HEAPU32[this.ptr+4>>2]};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>2]=destructor};this.get_destructor=function(){return HEAPU32[this.ptr+8>>2]};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>0]=caught};this.get_caught=function(){return HEAP8[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return HEAP8[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;var ___cxa_throw=(ptr,type,destructor)=>{var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw exceptionLast};var ___emscripten_init_main_thread_js=tb=>{__emscripten_thread_init(tb,!ENVIRONMENT_IS_WORKER,1,!ENVIRONMENT_IS_WEB,16777216,false);PThread.threadInitTLS()};var ___emscripten_thread_cleanup=thread=>{if(!ENVIRONMENT_IS_PTHREAD)cleanupThread(thread);else postMessage({"cmd":"cleanupThread","thread":thread})};function pthreadCreateProxied(pthread_ptr,attr,startRoutine,arg){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(2,1,pthread_ptr,attr,startRoutine,arg);return ___pthread_create_js(pthread_ptr,attr,startRoutine,arg)}var ___pthread_create_js=(pthread_ptr,attr,startRoutine,arg)=>{if(typeof SharedArrayBuffer=="undefined"){err("Current environment does not support SharedArrayBuffer, pthreads are not available!");return 6}var transferList=[];var error=0;if(ENVIRONMENT_IS_PTHREAD&&(transferList.length===0||error)){return pthreadCreateProxied(pthread_ptr,attr,startRoutine,arg)}if(error)return error;var threadParams={startRoutine:startRoutine,pthread_ptr:pthread_ptr,arg:arg,transferList:transferList};if(ENVIRONMENT_IS_PTHREAD){threadParams.cmd="spawnThread";postMessage(threadParams,transferList);return 0}return spawnThread(threadParams)};var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret="";var c=ptr;while(HEAPU8[c]){ret+=embind_charCodes[HEAPU8[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;var throwInternalError=message=>{throw new InternalError(message)};var whenDependentTypesAreResolved=(myTypes,dependentTypes,getTypeConverters)=>{myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i{if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(()=>{typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}};function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type "${name}" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":function(pointer){return this["fromWireType"](HEAPU8[pointer])},destructorFunction:null})};var shallowCopyInternalPointer=o=>({count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType});var throwInstanceAlreadyDeleted=obj=>{function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")};var finalizationRegistry=false;var detachFinalizer=handle=>{};var runDestructor=$$=>{if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}};var releaseClassHandle=$$=>{$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}};var downcastPointer=(ptr,ptrClass,desiredClass)=>{if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)};var registeredPointers={};var getInheritedInstanceCount=()=>Object.keys(registeredInstances).length;var getLiveInheritedInstances=()=>{var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv};var deletionQueue=[];var flushPendingDeletes=()=>{while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}};var delayFunction;var setDelayFunction=fn=>{delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}};var init_embind=()=>{Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction};var registeredInstances={};var getBasestPointer=(class_,ptr)=>{if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr};var getInheritedInstance=(class_,ptr)=>{ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]};var makeClassHandle=(prototype,record)=>{if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))};function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}var attachFinalizer=handle=>{if("undefined"===typeof FinalizationRegistry){attachFinalizer=handle=>handle;return handle}finalizationRegistry=new FinalizationRegistry(info=>{releaseClassHandle(info.$$)});attachFinalizer=handle=>{var $$=handle.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$:$$};finalizationRegistry.register(handle,info,handle)}return handle};detachFinalizer=handle=>finalizationRegistry.unregister(handle);return attachFinalizer(handle)};var init_ClassHandle=()=>{Object.assign(ClassHandle.prototype,{"isAliasOf"(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;other.$$=other.$$;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right},"clone"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}},"delete"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}},"isDeleted"(){return!this.$$.ptr},"deleteLater"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}})};function ClassHandle(){}var char_0=48;var char_9=57;var makeLegalFunctionName=name=>{if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return`_${name}`}return name};function createNamedFunction(name,body){name=makeLegalFunctionName(name);return{[name]:function(){return body.apply(this,arguments)}}[name]}var ensureOverloadTable=(proto,methodName,humanName)=>{if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError(`Function '${humanName}' called with an invalid number of arguments (${arguments.length}) - expects one of (${proto[methodName].overloadTable})!`)}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}};var exposePublicSymbol=(name,value,numArguments)=>{if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError(`Cannot register public name '${name}' twice`)}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError(`Cannot register multiple overloads of a function with the same number of arguments (${numArguments})!`)}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}};function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}var upcastPointer=(ptr,ptrClass,desiredClass)=>{while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError(`Expected null or instance of ${desiredClass.name}, got an instance of ${ptrClass.name}`)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr};function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(()=>clonedHandle["delete"]()));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function readPointer(pointer){return this["fromWireType"](HEAPU32[pointer>>2])}var init_RegisteredPointer=()=>{Object.assign(RegisteredPointer.prototype,{getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr},destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":readPointer,"deleteObject"(handle){if(handle!==null){handle["delete"]()}},"fromWireType":RegisteredPointer_fromWireType})};function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}var replacePublicSymbol=(name,value,numArguments)=>{if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}};var dynCallLegacy=(sig,ptr,args)=>{var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)};var dynCall=(sig,ptr,args)=>{if(sig.includes("j")){return dynCallLegacy(sig,ptr,args)}var rtn=getWasmTableEntry(ptr).apply(null,args);return rtn};var getDynCaller=(sig,ptr)=>{var argCache=[];return function(){argCache.length=0;Object.assign(argCache,arguments);return dynCall(sig,ptr,argCache)}};var embind__requireFunction=(signature,rawFunction)=>{signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes("j")){return getDynCaller(signature,rawFunction)}return getWasmTableEntry(rawFunction)}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError(`unknown function pointer with signature ${signature}: ${rawFunction}`)}return fp};var extendError=(baseErrorType,errorName)=>{var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return`${this.name}: ${this.message}`}};return errorClass};var UnboundTypeError;var getTypeName=type=>{var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv};var throwUnboundTypeError=(message,types)=>{var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(`${message}: `+unboundTypes.map(getTypeName).join([", "]))};var __embind_register_class=(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor)=>{name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError(`Cannot construct ${name} due to unbound types`,[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError("Use 'new' to construct "+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+" has no accessible constructor")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError(`Tried to invoke ctor of ${name} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(registeredClass.constructor_body).toString()}) parameters instead!`)}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);if(registeredClass.baseClass){if(registeredClass.baseClass.__derivedClasses===undefined){registeredClass.baseClass.__derivedClasses=[]}registeredClass.baseClass.__derivedClasses.push(registeredClass)}var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})};var heap32VectorToArray=(count,firstElement)=>{var array=[];for(var i=0;i>2])}return array};var runDestructors=destructors=>{while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}};function newFunc(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError(`new_ called with constructor type ${typeof constructor} which is not a function`)}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc,isAsync){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i0?", ":"")+argsListWired}invokerFnBody+=(returns||isAsync?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i{var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=`constructor ${classType.name}`;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError(`Cannot register multiple constructors with identical number of parameters (${argCount-1}) for class '${classType.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`)}classType.registeredClass.constructor_body[argCount-1]=()=>{throwUnboundTypeError(`Cannot construct ${classType.name} due to unbound types`,rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,argTypes=>{argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})};var __embind_register_class_function=(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual,isAsync)=>{var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=`${classType.name}.${methodName}`;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError(`Cannot call ${humanName} due to unbound types`,rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context,isAsync);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module["count_emval_handles"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAP32[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":(destructors,value)=>Emval.toHandle(value),"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})};var embindRepr=v=>{if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>2])};case 8:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":value=>value,"toWireType":(destructors,value)=>value,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer>>0]:pointer=>HEAPU8[pointer>>0];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType"(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.slice(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}HEAP32[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>HEAPU16;shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>HEAPU32;shift=2}registerType(rawType,{name:name,"fromWireType":value=>{var length=HEAPU32[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":(destructors,value)=>{if(!(typeof value=="string")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":()=>undefined,"toWireType":(destructors,o)=>undefined})};var maybeExit=()=>{if(!keepRuntimeAlive()){try{if(ENVIRONMENT_IS_PTHREAD)__emscripten_thread_exit(EXITSTATUS);else _exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var __emscripten_thread_mailbox_await=pthread_ptr=>{if(typeof Atomics.waitAsync==="function"){var wait=Atomics.waitAsync(HEAP32,pthread_ptr>>2,pthread_ptr);wait.value.then(checkMailbox);var waitingAsync=pthread_ptr+128;Atomics.store(HEAP32,waitingAsync>>2,1)}};Module["__emscripten_thread_mailbox_await"]=__emscripten_thread_mailbox_await;var checkMailbox=()=>{var pthread_ptr=_pthread_self();if(pthread_ptr){__emscripten_thread_mailbox_await(pthread_ptr);callUserCallback(()=>__emscripten_check_mailbox())}};Module["checkMailbox"]=checkMailbox;var __emscripten_notify_mailbox_postmessage=(targetThreadId,currThreadId,mainThreadId)=>{if(targetThreadId==currThreadId){setTimeout(()=>checkMailbox())}else if(ENVIRONMENT_IS_PTHREAD){postMessage({"targetThread":targetThreadId,"cmd":"checkMailbox"})}else{var worker=PThread.pthreads[targetThreadId];if(!worker){return}worker.postMessage({"cmd":"checkMailbox"})}};var withStackSave=f=>{var stack=stackSave();var ret=f();stackRestore(stack);return ret};var proxyToMainThread=function(index,sync){var numCallArgs=arguments.length-2;var outerArgs=arguments;return withStackSave(()=>{var serializedNumCallArgs=numCallArgs;var args=stackAlloc(serializedNumCallArgs*8);var b=args>>3;for(var i=0;i{proxiedJSCallArgs.length=numCallArgs;var b=args>>3;for(var i=0;i{if(ENVIRONMENT_IS_NODE){PThread.pthreads[thread].ref()}};var emval_symbols={};var getStringOrSymbol=address=>{var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}return symbol};var emval_methodCallers=[];var __emval_call_void_method=(caller,handle,methodName,args)=>{caller=emval_methodCallers[caller];handle=Emval.toValue(handle);methodName=getStringOrSymbol(methodName);caller(handle,methodName,null,args)};var emval_addMethodCaller=caller=>{var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id};var requireRegisteredType=(rawType,humanName)=>{var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl};var emval_lookupTypes=(argCount,argTypes)=>{var a=new Array(argCount);for(var i=0;i>2],"parameter "+i)}return a};var emval_registeredMethods={};var __emval_get_method_caller=(argCount,argTypes)=>{var types=emval_lookupTypes(argCount,argTypes);var retType=types[0];var signatureName=retType.name+"_$"+types.slice(1).map(function(t){return t.name}).join("_")+"$";var returnId=emval_registeredMethods[signatureName];if(returnId!==undefined){return returnId}var params=["retType"];var args=[retType];var argsList="";for(var i=0;i{if(handle>4){emval_handles.get(handle).refcount+=1}};var __emval_new_cstring=v=>Emval.toHandle(getStringOrSymbol(v));var __emval_new_object=()=>Emval.toHandle({});var __emval_new_u8string=v=>Emval.toHandle(UTF8ToString(v));var __emval_set_property=(handle,key,value)=>{handle=Emval.toValue(handle);key=Emval.toValue(key);value=Emval.toValue(value);handle[key]=value};var __emval_take_value=(type,arg)=>{type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](arg);return Emval.toHandle(v)};var _abort=()=>{abort("")};var warnOnce=text=>{if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;if(ENVIRONMENT_IS_NODE)text="warning: "+text;err(text)}};var _emscripten_check_blocking_allowed=()=>{};var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};var _emscripten_exit_with_live_runtime=()=>{runtimeKeepalivePush();throw"unwind"};var _emscripten_get_now;_emscripten_get_now=()=>performance.timeOrigin+performance.now();var abortOnCannotGrowMemory=requestedSize=>{abort("OOM")};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;abortOnCannotGrowMemory(requestedSize)};var printCharBuffers=[null,[],[]];var printChar=(stream,curr)=>{var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}};function _fd_write(fd,iov,iovcnt,pnum){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(3,1,fd,iov,iovcnt,pnum);var num=0;for(var i=0;i>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j>2]=num;return 0}PThread.init();embind_init_charCodes();BindingError=Module["BindingError"]=class BindingError extends Error{constructor(message){super(message);this.name="BindingError"}};InternalError=Module["InternalError"]=class InternalError extends Error{constructor(message){super(message);this.name="InternalError"}};init_ClassHandle();init_embind();init_RegisteredPointer();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");handleAllocatorInit();init_emval();var proxiedFunctionTable=[_proc_exit,exitOnMainThread,pthreadCreateProxied,_fd_write];var wasmImports={q:___cxa_throw,A:___emscripten_init_main_thread_js,l:___emscripten_thread_cleanup,y:___pthread_create_js,s:__embind_register_bigint,G:__embind_register_bool,w:__embind_register_class,r:__embind_register_class_constructor,h:__embind_register_class_function,F:__embind_register_emval,n:__embind_register_float,c:__embind_register_integer,b:__embind_register_memory_view,o:__embind_register_std_string,i:__embind_register_std_wstring,H:__embind_register_void,u:__emscripten_notify_mailbox_postmessage,B:__emscripten_receive_on_main_thread_js,z:__emscripten_thread_mailbox_await,D:__emscripten_thread_set_strongref,g:__emval_call_void_method,d:__emval_decref,f:__emval_get_method_caller,I:__emval_incref,p:__emval_new_cstring,K:__emval_new_object,E:__emval_new_u8string,j:__emval_set_property,J:__emval_take_value,k:_abort,m:_emscripten_check_blocking_allowed,C:_emscripten_exit_with_live_runtime,e:_emscripten_get_now,t:_emscripten_resize_heap,x:_exit,v:_fd_write,a:wasmMemory||Module["wasmMemory"]};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["L"])();var _free=a0=>(_free=wasmExports["M"])(a0);var _malloc=a0=>(_malloc=wasmExports["N"])(a0);var __emscripten_tls_init=Module["__emscripten_tls_init"]=()=>(__emscripten_tls_init=Module["__emscripten_tls_init"]=wasmExports["O"])();var _pthread_self=Module["_pthread_self"]=()=>(_pthread_self=Module["_pthread_self"]=wasmExports["P"])();var ___getTypeName=a0=>(___getTypeName=wasmExports["Q"])(a0);var __embind_initialize_bindings=Module["__embind_initialize_bindings"]=()=>(__embind_initialize_bindings=Module["__embind_initialize_bindings"]=wasmExports["R"])();var ___errno_location=()=>(___errno_location=wasmExports["__errno_location"])();var __emscripten_thread_init=Module["__emscripten_thread_init"]=(a0,a1,a2,a3,a4,a5)=>(__emscripten_thread_init=Module["__emscripten_thread_init"]=wasmExports["S"])(a0,a1,a2,a3,a4,a5);var __emscripten_thread_crashed=Module["__emscripten_thread_crashed"]=()=>(__emscripten_thread_crashed=Module["__emscripten_thread_crashed"]=wasmExports["U"])();var _emscripten_main_runtime_thread_id=()=>(_emscripten_main_runtime_thread_id=wasmExports["emscripten_main_runtime_thread_id"])();var _emscripten_main_thread_process_queued_calls=()=>(_emscripten_main_thread_process_queued_calls=wasmExports["emscripten_main_thread_process_queued_calls"])();var __emscripten_run_on_main_thread_js=(a0,a1,a2,a3)=>(__emscripten_run_on_main_thread_js=wasmExports["V"])(a0,a1,a2,a3);var __emscripten_thread_free_data=a0=>(__emscripten_thread_free_data=wasmExports["W"])(a0);var __emscripten_thread_exit=Module["__emscripten_thread_exit"]=a0=>(__emscripten_thread_exit=Module["__emscripten_thread_exit"]=wasmExports["X"])(a0);var __emscripten_check_mailbox=Module["__emscripten_check_mailbox"]=()=>(__emscripten_check_mailbox=Module["__emscripten_check_mailbox"]=wasmExports["Y"])();var _emscripten_stack_set_limits=(a0,a1)=>(_emscripten_stack_set_limits=wasmExports["Z"])(a0,a1);var stackSave=()=>(stackSave=wasmExports["_"])();var stackRestore=a0=>(stackRestore=wasmExports["$"])(a0);var stackAlloc=a0=>(stackAlloc=wasmExports["aa"])(a0);var ___cxa_increment_exception_refcount=a0=>(___cxa_increment_exception_refcount=wasmExports["__cxa_increment_exception_refcount"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports["ba"])(a0);var dynCall_jiji=Module["dynCall_jiji"]=(a0,a1,a2,a3,a4)=>(dynCall_jiji=Module["dynCall_jiji"]=wasmExports["ca"])(a0,a1,a2,a3,a4);var ___start_em_js=Module["___start_em_js"]=143356;var ___stop_em_js=Module["___stop_em_js"]=143413;Module["keepRuntimeAlive"]=keepRuntimeAlive;Module["wasmMemory"]=wasmMemory;Module["ExitStatus"]=ExitStatus;Module["PThread"]=PThread;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}if(ENVIRONMENT_IS_PTHREAD){readyPromiseResolve(Module);initRuntime();startWorker(Module);return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); +function GROWABLE_HEAP_I8(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAP8}function GROWABLE_HEAP_U8(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAPU8}function GROWABLE_HEAP_I16(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAP16}function GROWABLE_HEAP_U16(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAPU16}function GROWABLE_HEAP_I32(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAP32}function GROWABLE_HEAP_U32(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAPU32}function GROWABLE_HEAP_F32(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAPF32}function GROWABLE_HEAP_F64(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews()}return HEAPF64}var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var Module=typeof Module!="undefined"?Module:{};Module["locateFile"]=function(url,scriptDirectory){if(url=="decoder-pro-simd-mt-worker.wasm"){if(typeof JESSIBUCA_PRO_SIMD_MT_WORKER_WASM_URL!="undefined"&&JESSIBUCA_PRO_SIMD_MT_WORKER_WASM_URL!=""){return JESSIBUCA_PRO_SIMD_MT_WORKER_WASM_URL}else{return scriptDirectory+url}}else if(url=="decoder-pro-simd-mt-worker.worker.js"){if(typeof JESSIBUCA_PRO_SIMD_MT_WORKER_JS_URL!="undefined"&&JESSIBUCA_PRO_SIMD_MT_WORKER_JS_URL!=""){return JESSIBUCA_PRO_SIMD_MT_WORKER_JS_URL}else{return scriptDirectory+url}}else{return scriptDirectory+url}};var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";var ENVIRONMENT_IS_PTHREAD=Module["ENVIRONMENT_IS_PTHREAD"]||false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_NODE){const{createRequire:createRequire}=await import("module");var require=createRequire(import.meta.url);var fs=require("fs");var nodePath=require("path");if(ENVIRONMENT_IS_WORKER){scriptDirectory=nodePath.dirname(scriptDirectory)+"/"}else{scriptDirectory=require("url").fileURLToPath(new URL("./",import.meta.url))}read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror,binary=true)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,binary?undefined:"utf8",(err,data)=>{if(err)onerror(err);else onload(binary?data.buffer:data)})};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow};Module["inspect"]=()=>"[Emscripten Module object]";let nodeWorkerThreads;try{nodeWorkerThreads=require("worker_threads")}catch(e){console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?');throw e}global.Worker=nodeWorkerThreads.Worker}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(_scriptDir){scriptDirectory=_scriptDir}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}else{scriptDirectory=""}if(!ENVIRONMENT_IS_NODE){read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}if(ENVIRONMENT_IS_NODE){if(typeof performance=="undefined"){global.performance=require("perf_hooks").performance}}var defaultPrint=console.log.bind(console);var defaultPrintErr=console.error.bind(console);if(ENVIRONMENT_IS_NODE){defaultPrint=(...args)=>fs.writeSync(1,args.join(" ")+"\n");defaultPrintErr=(...args)=>fs.writeSync(2,args.join(" ")+"\n")}var out=Module["print"]||defaultPrint;var err=Module["printErr"]||defaultPrintErr;Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];if(typeof WebAssembly!="object"){abort("no native wasm support detected")}var wasmMemory;var wasmModule;var ABORT=false;var EXITSTATUS;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||268435456;if(ENVIRONMENT_IS_PTHREAD){wasmMemory=Module["wasmMemory"]}else{if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"]}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":536870912/65536,"shared":true});if(!(wasmMemory.buffer instanceof SharedArrayBuffer)){err("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag");if(ENVIRONMENT_IS_NODE){err("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)")}throw Error("bad memory")}}}updateMemoryViews();INITIAL_MEMORY=wasmMemory.buffer.byteLength;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;if(ENVIRONMENT_IS_PTHREAD)return;callRuntimeCallbacks(__ATINIT__)}function postRun(){if(ENVIRONMENT_IS_PTHREAD)return;if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies)}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what)}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e}var dataURIPrefix="data:application/octet-stream;base64,";var isDataURI=filename=>filename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");var wasmBinaryFile;if(Module["locateFile"]){wasmBinaryFile="decoder-pro-simd-mt-worker.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile)}}else{wasmBinaryFile=new URL("decoder-pro-simd-mt-worker.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(binaryFile)){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{if(!response["ok"]){throw"failed to load wasm binary file at '"+binaryFile+"'"}return response["arrayBuffer"]()}).catch(()=>getBinarySync(binaryFile))}else if(readAsync){return new Promise((resolve,reject)=>{readAsync(binaryFile,response=>resolve(new Uint8Array(response)),reject)})}}return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(instance=>instance).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}return instantiateArrayBuffer(binaryFile,imports,callback)}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module){wasmExports=instance.exports;registerTLSInit(wasmExports["U"]);wasmTable=wasmExports["Y"];addOnInit(wasmExports["Q"]);wasmModule=module;removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"],result["module"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);readyPromiseReject(e)}}instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult).catch(readyPromiseReject);return{}}function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}var terminateWorker=worker=>{worker.terminate();worker.onmessage=e=>{}};var killThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];delete PThread.pthreads[pthread_ptr];terminateWorker(worker);__emscripten_thread_free_data(pthread_ptr);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0};var cancelThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];worker.postMessage({"cmd":"cancel"})};var cleanupThread=pthread_ptr=>{var worker=PThread.pthreads[pthread_ptr];PThread.returnWorkerToPool(worker)};var spawnThread=threadParams=>{var worker=PThread.getNewWorker();if(!worker){return 6}PThread.runningWorkers.push(worker);PThread.pthreads[threadParams.pthread_ptr]=worker;worker.pthread_ptr=threadParams.pthread_ptr;var msg={"cmd":"run","start_routine":threadParams.startRoutine,"arg":threadParams.arg,"pthread_ptr":threadParams.pthread_ptr};if(ENVIRONMENT_IS_NODE){worker.unref()}worker.postMessage(msg,threadParams.transferList);return 0};var runtimeKeepaliveCounter=0;var keepRuntimeAlive=()=>noExitRuntime||runtimeKeepaliveCounter>0;var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.buffer instanceof SharedArrayBuffer?heapOrArray.slice(idx,endPtr):heapOrArray.subarray(idx,endPtr))}var str="";while(idx>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(GROWABLE_HEAP_U8(),ptr,maxBytesToRead):"";var SYSCALLS={varargs:undefined,get(){var ret=GROWABLE_HEAP_I32()[+SYSCALLS.varargs>>2];SYSCALLS.varargs+=4;return ret},getp(){return SYSCALLS.get()},getStr(ptr){var ret=UTF8ToString(ptr);return ret}};var withStackSave=f=>{var stack=stackSave();var ret=f();stackRestore(stack);return ret};var convertI32PairToI53Checked=(lo,hi)=>hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;var proxyToMainThread=function(index,sync){var numCallArgs=arguments.length-2;var outerArgs=arguments;return withStackSave(()=>{var serializedNumCallArgs=numCallArgs;var args=stackAlloc(serializedNumCallArgs*8);var b=args>>3;for(var i=0;i{EXITSTATUS=status;if(ENVIRONMENT_IS_PTHREAD){exitOnMainThread(status);throw"unwind"}_proc_exit(status)};var _exit=exitJS;var handleException=e=>{if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS}quit_(1,e)};var PThread={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){if(ENVIRONMENT_IS_PTHREAD){PThread.initWorker()}else{PThread.initMainThread()}},initMainThread(){var pthreadPoolSize=4;while(pthreadPoolSize--){PThread.allocateUnusedWorker()}addOnPreRun(()=>{addRunDependency("loading-workers");PThread.loadWasmModuleToAllWorkers(()=>removeRunDependency("loading-workers"))})},initWorker(){noExitRuntime=false},setExitStatus:status=>{EXITSTATUS=status},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var worker of PThread.runningWorkers){terminateWorker(worker)}for(var worker of PThread.unusedWorkers){terminateWorker(worker)}PThread.unusedWorkers=[];PThread.runningWorkers=[];PThread.pthreads=[]},returnWorkerToPool:worker=>{var pthread_ptr=worker.pthread_ptr;delete PThread.pthreads[pthread_ptr];PThread.unusedWorkers.push(worker);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0;__emscripten_thread_free_data(pthread_ptr)},receiveObjectTransfer(data){},threadInitTLS(){PThread.tlsInitFunctions.forEach(f=>f())},loadWasmModuleToWorker:worker=>new Promise(onFinishedLoading=>{worker.onmessage=e=>{var d=e["data"];var cmd=d["cmd"];if(d["targetThread"]&&d["targetThread"]!=_pthread_self()){var targetWorker=PThread.pthreads[d["targetThread"]];if(targetWorker){targetWorker.postMessage(d,d["transferList"])}else{err(`Internal error! Worker sent a message "${cmd}" to target pthread ${d["targetThread"]}, but that thread no longer exists!`)}return}if(cmd==="checkMailbox"){checkMailbox()}else if(cmd==="spawnThread"){spawnThread(d)}else if(cmd==="cleanupThread"){cleanupThread(d["thread"])}else if(cmd==="killThread"){killThread(d["thread"])}else if(cmd==="cancelThread"){cancelThread(d["thread"])}else if(cmd==="loaded"){worker.loaded=true;if(ENVIRONMENT_IS_NODE&&!worker.pthread_ptr){worker.unref()}onFinishedLoading(worker)}else if(cmd==="alert"){alert(`Thread ${d["threadId"]}: ${d["text"]}`)}else if(d.target==="setimmediate"){worker.postMessage(d)}else if(cmd==="callHandler"){Module[d["handler"]](...d["args"])}else if(cmd){err(`worker sent an unknown command ${cmd}`)}};worker.onerror=e=>{var message="worker sent an error!";err(`${message} ${e.filename}:${e.lineno}: ${e.message}`);throw e};if(ENVIRONMENT_IS_NODE){worker.on("message",data=>worker.onmessage({data:data}));worker.on("error",e=>worker.onerror(e))}var handlers=[];var knownHandlers=["onExit","onAbort","print","printErr"];for(var handler of knownHandlers){if(Module.hasOwnProperty(handler)){handlers.push(handler)}}worker.postMessage({"cmd":"load","handlers":handlers,"urlOrBlob":Module["mainScriptUrlOrBlob"],"wasmMemory":wasmMemory,"wasmModule":wasmModule})}),loadWasmModuleToAllWorkers(onMaybeReady){if(ENVIRONMENT_IS_PTHREAD){return onMaybeReady()}let pthreadPoolReady=Promise.all(PThread.unusedWorkers.map(PThread.loadWasmModuleToWorker));pthreadPoolReady.then(onMaybeReady)},allocateUnusedWorker(){var worker;if(!Module["locateFile"]){worker=new Worker(new URL("decoder-pro-simd-mt-worker.worker.js",import.meta.url),{type:"module"})}else{var pthreadMainJs=locateFile("decoder-pro-simd-mt-worker.worker.js");worker=new Worker(pthreadMainJs,{type:"module"})}PThread.unusedWorkers.push(worker)},getNewWorker(){if(PThread.unusedWorkers.length==0){PThread.allocateUnusedWorker();PThread.loadWasmModuleToWorker(PThread.unusedWorkers[0])}return PThread.unusedWorkers.pop()}};Module["PThread"]=PThread;var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var establishStackSpace=()=>{var pthread_ptr=_pthread_self();var stackHigh=GROWABLE_HEAP_U32()[pthread_ptr+52>>2];var stackSize=GROWABLE_HEAP_U32()[pthread_ptr+56>>2];var stackLow=stackHigh-stackSize;_emscripten_stack_set_limits(stackHigh,stackLow);stackRestore(stackHigh)};Module["establishStackSpace"]=establishStackSpace;function exitOnMainThread(returnCode){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(1,0,returnCode);_exit(returnCode)}var wasmTableMirror=[];var wasmTable;var getWasmTableEntry=funcPtr=>{var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr)}return func};var invokeEntryPoint=(ptr,arg)=>{var result=getWasmTableEntry(ptr)(arg);function finish(result){if(keepRuntimeAlive()){PThread.setExitStatus(result)}else{__emscripten_thread_exit(result)}}finish(result)};Module["invokeEntryPoint"]=invokeEntryPoint;var noExitRuntime=Module["noExitRuntime"]||true;var registerTLSInit=tlsInitFunc=>{PThread.tlsInitFunctions.push(tlsInitFunc)};var ___assert_fail=(condition,filename,line,func)=>{abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"])};function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){GROWABLE_HEAP_U32()[this.ptr+4>>2]=type};this.get_type=function(){return GROWABLE_HEAP_U32()[this.ptr+4>>2]};this.set_destructor=function(destructor){GROWABLE_HEAP_U32()[this.ptr+8>>2]=destructor};this.get_destructor=function(){return GROWABLE_HEAP_U32()[this.ptr+8>>2]};this.set_caught=function(caught){caught=caught?1:0;GROWABLE_HEAP_I8()[this.ptr+12>>0]=caught};this.get_caught=function(){return GROWABLE_HEAP_I8()[this.ptr+12>>0]!=0};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;GROWABLE_HEAP_I8()[this.ptr+13>>0]=rethrown};this.get_rethrown=function(){return GROWABLE_HEAP_I8()[this.ptr+13>>0]!=0};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor)};this.set_adjusted_ptr=function(adjustedPtr){GROWABLE_HEAP_U32()[this.ptr+16>>2]=adjustedPtr};this.get_adjusted_ptr=function(){return GROWABLE_HEAP_U32()[this.ptr+16>>2]};this.get_exception_ptr=function(){var isPointer=___cxa_is_pointer_type(this.get_type());if(isPointer){return GROWABLE_HEAP_U32()[this.excPtr>>2]}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr}}var exceptionLast=0;var uncaughtExceptionCount=0;var ___cxa_throw=(ptr,type,destructor)=>{var info=new ExceptionInfo(ptr);info.init(type,destructor);exceptionLast=ptr;uncaughtExceptionCount++;throw exceptionLast};var ___emscripten_init_main_thread_js=tb=>{__emscripten_thread_init(tb,!ENVIRONMENT_IS_WORKER,1,!ENVIRONMENT_IS_WEB,2097152,false);PThread.threadInitTLS()};var ___emscripten_thread_cleanup=thread=>{if(!ENVIRONMENT_IS_PTHREAD)cleanupThread(thread);else postMessage({"cmd":"cleanupThread","thread":thread})};function pthreadCreateProxied(pthread_ptr,attr,startRoutine,arg){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(2,1,pthread_ptr,attr,startRoutine,arg);return ___pthread_create_js(pthread_ptr,attr,startRoutine,arg)}var ___pthread_create_js=(pthread_ptr,attr,startRoutine,arg)=>{if(typeof SharedArrayBuffer=="undefined"){err("Current environment does not support SharedArrayBuffer, pthreads are not available!");return 6}var transferList=[];var error=0;if(ENVIRONMENT_IS_PTHREAD&&(transferList.length===0||error)){return pthreadCreateProxied(pthread_ptr,attr,startRoutine,arg)}if(error)return error;var threadParams={startRoutine:startRoutine,pthread_ptr:pthread_ptr,arg:arg,transferList:transferList};if(ENVIRONMENT_IS_PTHREAD){threadParams.cmd="spawnThread";postMessage(threadParams,transferList);return 0}return spawnThread(threadParams)};var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{};var embind_init_charCodes=()=>{var codes=new Array(256);for(var i=0;i<256;++i){codes[i]=String.fromCharCode(i)}embind_charCodes=codes};var embind_charCodes;var readLatin1String=ptr=>{var ret="";var c=ptr;while(GROWABLE_HEAP_U8()[c]){ret+=embind_charCodes[GROWABLE_HEAP_U8()[c++]]}return ret};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError;var throwBindingError=message=>{throw new BindingError(message)};var InternalError;var throwInternalError=message=>{throw new InternalError(message)};var whenDependentTypesAreResolved=(myTypes,dependentTypes,getTypeConverters)=>{myTypes.forEach(function(type){typeDependencies[type]=dependentTypes});function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i{if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(()=>{typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}};function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type "${name}" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance")}return sharedRegisterType(rawType,registeredInstance,options)}var GenericWireTypeSize=8;var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function(wt){return!!wt},"toWireType":function(destructors,o){return o?trueValue:falseValue},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":function(pointer){return this["fromWireType"](GROWABLE_HEAP_U8()[pointer])},destructorFunction:null})};var shallowCopyInternalPointer=o=>({count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType});var throwInstanceAlreadyDeleted=obj=>{function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")};var finalizationRegistry=false;var detachFinalizer=handle=>{};var runDestructor=$$=>{if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}};var releaseClassHandle=$$=>{$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}};var downcastPointer=(ptr,ptrClass,desiredClass)=>{if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)};var registeredPointers={};var getInheritedInstanceCount=()=>Object.keys(registeredInstances).length;var getLiveInheritedInstances=()=>{var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k])}}return rv};var deletionQueue=[];var flushPendingDeletes=()=>{while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}};var delayFunction;var setDelayFunction=fn=>{delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes)}};var init_embind=()=>{Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction};var registeredInstances={};var getBasestPointer=(class_,ptr)=>{if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr};var getInheritedInstance=(class_,ptr)=>{ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]};var makeClassHandle=(prototype,record)=>{if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}))};function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}var attachFinalizer=handle=>{if("undefined"===typeof FinalizationRegistry){attachFinalizer=handle=>handle;return handle}finalizationRegistry=new FinalizationRegistry(info=>{releaseClassHandle(info.$$)});attachFinalizer=handle=>{var $$=handle.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$:$$};finalizationRegistry.register(handle,info,handle)}return handle};detachFinalizer=handle=>finalizationRegistry.unregister(handle);return attachFinalizer(handle)};var init_ClassHandle=()=>{Object.assign(ClassHandle.prototype,{"isAliasOf"(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;other.$$=other.$$;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right},"clone"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}},"delete"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}},"isDeleted"(){return!this.$$.ptr},"deleteLater"(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}})};function ClassHandle(){}var createNamedFunction=(name,body)=>Object.defineProperty(body,"name",{value:name});var ensureOverloadTable=(proto,methodName,humanName)=>{if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError(`Function '${humanName}' called with an invalid number of arguments (${arguments.length}) - expects one of (${proto[methodName].overloadTable})!`)}return proto[methodName].overloadTable[arguments.length].apply(this,arguments)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}};var exposePublicSymbol=(name,value,numArguments)=>{if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError(`Cannot register public name '${name}' twice`)}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError(`Cannot register multiple overloads of a function with the same number of arguments (${numArguments})!`)}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;if(undefined!==numArguments){Module[name].numArguments=numArguments}}};var char_0=48;var char_9=57;var makeLegalFunctionName=name=>{if(undefined===name){return"_unknown"}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return`_${name}`}return name};function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}var upcastPointer=(ptr,ptrClass,desiredClass)=>{while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError(`Expected null or instance of ${desiredClass.name}, got an instance of ${ptrClass.name}`)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr};function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(()=>clonedHandle["delete"]()));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function readPointer(pointer){return this["fromWireType"](GROWABLE_HEAP_U32()[pointer>>2])}var init_RegisteredPointer=()=>{Object.assign(RegisteredPointer.prototype,{getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr},destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr)}},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":readPointer,"deleteObject"(handle){if(handle!==null){handle["delete"]()}},"fromWireType":RegisteredPointer_fromWireType})};function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this["toWireType"]=genericPointerToWireType}}var replacePublicSymbol=(name,value,numArguments)=>{if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}};var dynCallLegacy=(sig,ptr,args)=>{var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr)};var dynCall=(sig,ptr,args)=>{if(sig.includes("j")){return dynCallLegacy(sig,ptr,args)}var rtn=getWasmTableEntry(ptr).apply(null,args);return rtn};var getDynCaller=(sig,ptr)=>{var argCache=[];return function(){argCache.length=0;Object.assign(argCache,arguments);return dynCall(sig,ptr,argCache)}};var embind__requireFunction=(signature,rawFunction)=>{signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes("j")){return getDynCaller(signature,rawFunction)}return getWasmTableEntry(rawFunction)}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError(`unknown function pointer with signature ${signature}: ${rawFunction}`)}return fp};var extendError=(baseErrorType,errorName)=>{var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==undefined){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"")}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===undefined){return this.name}else{return`${this.name}: ${this.message}`}};return errorClass};var UnboundTypeError;var getTypeName=type=>{var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free(ptr);return rv};var throwUnboundTypeError=(message,types)=>{var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(`${message}: `+unboundTypes.map(getTypeName).join([", "]))};var __embind_register_class=(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor)=>{name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast)}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast)}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError(`Cannot construct ${name} due to unbound types`,[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(name,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError("Use 'new' to construct "+name)}if(undefined===registeredClass.constructor_body){throw new BindingError(name+" has no accessible constructor")}var body=registeredClass.constructor_body[arguments.length];if(undefined===body){throw new BindingError(`Tried to invoke ctor of ${name} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(registeredClass.constructor_body).toString()}) parameters instead!`)}return body.apply(this,arguments)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);if(registeredClass.baseClass){if(registeredClass.baseClass.__derivedClasses===undefined){registeredClass.baseClass.__derivedClasses=[]}registeredClass.baseClass.__derivedClasses.push(registeredClass)}var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})};var heap32VectorToArray=(count,firstElement)=>{var array=[];for(var i=0;i>2])}return array};var runDestructors=destructors=>{while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}};function newFunc(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError(`new_ called with constructor type ${typeof constructor} which is not a function`)}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy;var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc,isAsync){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!")}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i0?", ":"")+argsListWired}invokerFnBody+=(returns||isAsync?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i{var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=`constructor ${classType.name}`;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError(`Cannot register multiple constructors with identical number of parameters (${argCount-1}) for class '${classType.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`)}classType.registeredClass.constructor_body[argCount-1]=()=>{throwUnboundTypeError(`Cannot construct ${classType.name} due to unbound types`,rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,argTypes=>{argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})};var getFunctionName=signature=>{signature=signature.trim();const argsIndex=signature.indexOf("(");if(argsIndex!==-1){return signature.substr(0,argsIndex)}else{return signature}};var __embind_register_class_function=(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual,isAsync)=>{var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);methodName=getFunctionName(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=`${classType.name}.${methodName}`;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError(`Cannot call ${humanName} due to unbound types`,rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context,isAsync);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})};function handleAllocatorInit(){Object.assign(HandleAllocator.prototype,{get(id){return this.allocated[id]},has(id){return this.allocated[id]!==undefined},allocate(handle){var id=this.freelist.pop()||this.allocated.length;this.allocated[id]=handle;return id},free(id){this.allocated[id]=undefined;this.freelist.push(id)}})}function HandleAllocator(){this.allocated=[undefined];this.freelist=[]}var emval_handles=new HandleAllocator;var __emval_decref=handle=>{if(handle>=emval_handles.reserved&&0===--emval_handles.get(handle).refcount){emval_handles.free(handle)}};var count_emval_handles=()=>{var count=0;for(var i=emval_handles.reserved;i{emval_handles.allocated.push({value:undefined},{value:null},{value:true},{value:false});emval_handles.reserved=emval_handles.allocated.length;Module["count_emval_handles"]=count_emval_handles};var Emval={toValue:handle=>{if(!handle){throwBindingError("Cannot use deleted val. handle = "+handle)}return emval_handles.get(handle).value},toHandle:value=>{switch(value){case undefined:return 1;case null:return 2;case true:return 3;case false:return 4;default:{return emval_handles.allocate({refcount:1,value:value})}}}};function simpleReadValueFromPointer(pointer){return this["fromWireType"](GROWABLE_HEAP_I32()[pointer>>2])}var __embind_register_emval=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},"toWireType":(destructors,value)=>Emval.toHandle(value),"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:null})};var embindRepr=v=>{if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}};var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this["fromWireType"](GROWABLE_HEAP_F32()[pointer>>2])};case 8:return function(pointer){return this["fromWireType"](GROWABLE_HEAP_F64()[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":value=>value,"toWireType":(destructors,value)=>value,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":floatReadValueFromPointer(name,size),destructorFunction:null})};var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>GROWABLE_HEAP_I8()[pointer>>0]:pointer=>GROWABLE_HEAP_U8()[pointer>>0];case 2:return signed?pointer=>GROWABLE_HEAP_I16()[pointer>>1]:pointer=>GROWABLE_HEAP_U16()[pointer>>1];case 4:return signed?pointer=>GROWABLE_HEAP_I32()[pointer>>2]:pointer=>GROWABLE_HEAP_U32()[pointer>>2];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=readLatin1String(name);if(maxRange===-1){maxRange=4294967295}var fromWireType=value=>value;if(minRange===0){var bitshift=32-8*size;fromWireType=value=>value<>>bitshift}var isUnsignedType=name.includes("unsigned");var checkAssertions=(value,toTypeName)=>{};var toWireType;if(isUnsignedType){toWireType=function(destructors,value){checkAssertions(value,this.name);return value>>>0}}else{toWireType=function(destructors,value){checkAssertions(value,this.name);return value}}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=GROWABLE_HEAP_U32()[handle>>2];var data=GROWABLE_HEAP_U32()[handle+4>>2];return new TA(GROWABLE_HEAP_I8().buffer,data,size)}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true})};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,GROWABLE_HEAP_U8(),outPtr,maxBytesToWrite);var lengthBytesUTF8=str=>{var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var __embind_register_std_string=(rawType,name)=>{name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType"(value){var length=GROWABLE_HEAP_U32()[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||GROWABLE_HEAP_U8()[currentBytePtr]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+1}}}else{var a=new Array(length);for(var i=0;i>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1)}else{if(valueIsOfTypeString){for(var i=0;i255){_free(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}GROWABLE_HEAP_U8()[ptr+i]=charCode}}else{for(var i=0;i{var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&GROWABLE_HEAP_U16()[idx])++idx;endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(GROWABLE_HEAP_U8().slice(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=GROWABLE_HEAP_I16()[ptr+i*2>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit)}return str};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>1]=codeUnit;outPtr+=2}GROWABLE_HEAP_I16()[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead)=>{var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=GROWABLE_HEAP_I32()[ptr+i*4>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}else{str+=String.fromCharCode(utf32)}}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{if(maxBytesToWrite===undefined){maxBytesToWrite=2147483647}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023}GROWABLE_HEAP_I32()[outPtr>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break}GROWABLE_HEAP_I32()[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=()=>GROWABLE_HEAP_U16();shift=1}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=()=>GROWABLE_HEAP_U32();shift=2}registerType(rawType,{name:name,"fromWireType":value=>{var length=GROWABLE_HEAP_U32()[value>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===undefined){str=stringSegment}else{str+=String.fromCharCode(0);str+=stringSegment}decodeStartPtr=currentBytePtr+charSize}}_free(value);return str},"toWireType":(destructors,value)=>{if(!(typeof value=="string")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);GROWABLE_HEAP_U32()[ptr>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},"argPackAdvance":GenericWireTypeSize,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":()=>undefined,"toWireType":(destructors,o)=>undefined})};var maybeExit=()=>{if(!keepRuntimeAlive()){try{if(ENVIRONMENT_IS_PTHREAD)__emscripten_thread_exit(EXITSTATUS);else _exit(EXITSTATUS)}catch(e){handleException(e)}}};var callUserCallback=func=>{if(ABORT){return}try{func();maybeExit()}catch(e){handleException(e)}};var __emscripten_thread_mailbox_await=pthread_ptr=>{if(typeof Atomics.waitAsync==="function"){var wait=Atomics.waitAsync(GROWABLE_HEAP_I32(),pthread_ptr>>2,pthread_ptr);wait.value.then(checkMailbox);var waitingAsync=pthread_ptr+128;Atomics.store(GROWABLE_HEAP_I32(),waitingAsync>>2,1)}};Module["__emscripten_thread_mailbox_await"]=__emscripten_thread_mailbox_await;var checkMailbox=()=>{var pthread_ptr=_pthread_self();if(pthread_ptr){__emscripten_thread_mailbox_await(pthread_ptr);callUserCallback(__emscripten_check_mailbox)}};Module["checkMailbox"]=checkMailbox;var __emscripten_notify_mailbox_postmessage=(targetThreadId,currThreadId,mainThreadId)=>{if(targetThreadId==currThreadId){setTimeout(()=>checkMailbox())}else if(ENVIRONMENT_IS_PTHREAD){postMessage({"targetThread":targetThreadId,"cmd":"checkMailbox"})}else{var worker=PThread.pthreads[targetThreadId];if(!worker){return}worker.postMessage({"cmd":"checkMailbox"})}};var proxiedJSCallArgs=[];var __emscripten_receive_on_main_thread_js=(index,callingThread,numCallArgs,args)=>{proxiedJSCallArgs.length=numCallArgs;var b=args>>3;for(var i=0;i{if(ENVIRONMENT_IS_NODE){PThread.pthreads[thread].ref()}};var emval_symbols={};var getStringOrSymbol=address=>{var symbol=emval_symbols[address];if(symbol===undefined){return readLatin1String(address)}return symbol};var emval_methodCallers=[];var __emval_call_method=(caller,objHandle,methodName,destructorsRef,args)=>{caller=emval_methodCallers[caller];objHandle=Emval.toValue(objHandle);methodName=getStringOrSymbol(methodName);return caller(objHandle,objHandle[methodName],destructorsRef,args)};var emval_addMethodCaller=caller=>{var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id};var requireRegisteredType=(rawType,humanName)=>{var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(humanName+" has unknown type "+getTypeName(rawType))}return impl};var emval_lookupTypes=(argCount,argTypes)=>{var a=new Array(argCount);for(var i=0;i>2],"parameter "+i)}return a};var reflectConstruct=Reflect.construct;var emval_returnValue=(returnType,destructorsRef,handle)=>{var destructors=[];var result=returnType["toWireType"](destructors,handle);if(destructors.length){GROWABLE_HEAP_U32()[destructorsRef>>2]=Emval.toHandle(destructors)}return result};var __emval_get_method_caller=(argCount,argTypes,kind)=>{var types=emval_lookupTypes(argCount,argTypes);var retType=types.shift();argCount--;var functionBody=`return function (obj, func, destructorsRef, args) {\n`;var offset=0;var argsList=[];if(kind===0){argsList.push("obj")}var params=["retType"];var args=[retType];for(var i=0;it.name).join(", ")}) => ${retType.name}>`;return emval_addMethodCaller(createNamedFunction(functionName,invokerFunction))};var __emval_incref=handle=>{if(handle>4){emval_handles.get(handle).refcount+=1}};var __emval_new_cstring=v=>Emval.toHandle(getStringOrSymbol(v));var __emval_new_object=()=>Emval.toHandle({});var __emval_new_u8string=v=>Emval.toHandle(UTF8ToString(v));var __emval_run_destructors=handle=>{var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle)};var __emval_set_property=(handle,key,value)=>{handle=Emval.toValue(handle);key=Emval.toValue(key);value=Emval.toValue(value);handle[key]=value};var __emval_take_value=(type,arg)=>{type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](arg);return Emval.toHandle(v)};var isLeapYear=year=>year%4===0&&(year%100!==0||year%400===0);var MONTH_DAYS_LEAP_CUMULATIVE=[0,31,60,91,121,152,182,213,244,274,305,335];var MONTH_DAYS_REGULAR_CUMULATIVE=[0,31,59,90,120,151,181,212,243,273,304,334];var ydayFromDate=date=>{var leap=isLeapYear(date.getFullYear());var monthDaysCumulative=leap?MONTH_DAYS_LEAP_CUMULATIVE:MONTH_DAYS_REGULAR_CUMULATIVE;var yday=monthDaysCumulative[date.getMonth()]+date.getDate()-1;return yday};function __localtime_js(time_low,time_high,tmPtr){var time=convertI32PairToI53Checked(time_low,time_high);var date=new Date(time*1e3);GROWABLE_HEAP_I32()[tmPtr>>2]=date.getSeconds();GROWABLE_HEAP_I32()[tmPtr+4>>2]=date.getMinutes();GROWABLE_HEAP_I32()[tmPtr+8>>2]=date.getHours();GROWABLE_HEAP_I32()[tmPtr+12>>2]=date.getDate();GROWABLE_HEAP_I32()[tmPtr+16>>2]=date.getMonth();GROWABLE_HEAP_I32()[tmPtr+20>>2]=date.getFullYear()-1900;GROWABLE_HEAP_I32()[tmPtr+24>>2]=date.getDay();var yday=ydayFromDate(date)|0;GROWABLE_HEAP_I32()[tmPtr+28>>2]=yday;GROWABLE_HEAP_I32()[tmPtr+36>>2]=-(date.getTimezoneOffset()*60);var start=new Date(date.getFullYear(),0,1);var summerOffset=new Date(date.getFullYear(),6,1).getTimezoneOffset();var winterOffset=start.getTimezoneOffset();var dst=(summerOffset!=winterOffset&&date.getTimezoneOffset()==Math.min(winterOffset,summerOffset))|0;GROWABLE_HEAP_I32()[tmPtr+32>>2]=dst}var stringToNewUTF8=str=>{var size=lengthBytesUTF8(str)+1;var ret=_malloc(size);if(ret)stringToUTF8(str,ret,size);return ret};var __tzset_js=(timezone,daylight,tzname)=>{var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);GROWABLE_HEAP_U32()[timezone>>2]=stdTimezoneOffset*60;GROWABLE_HEAP_I32()[daylight>>2]=Number(winterOffset!=summerOffset);function extractZone(date){var match=date.toTimeString().match(/\(([A-Za-z ]+)\)$/);return match?match[1]:"GMT"}var winterName=extractZone(winter);var summerName=extractZone(summer);var winterNamePtr=stringToNewUTF8(winterName);var summerNamePtr=stringToNewUTF8(summerName);if(summerOffset>2]=winterNamePtr;GROWABLE_HEAP_U32()[tzname+4>>2]=summerNamePtr}else{GROWABLE_HEAP_U32()[tzname>>2]=summerNamePtr;GROWABLE_HEAP_U32()[tzname+4>>2]=winterNamePtr}};var _abort=()=>{abort("")};var warnOnce=text=>{if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;if(ENVIRONMENT_IS_NODE)text="warning: "+text;err(text)}};var _emscripten_check_blocking_allowed=()=>{};var _emscripten_date_now=()=>Date.now();var runtimeKeepalivePush=()=>{runtimeKeepaliveCounter+=1};var _emscripten_exit_with_live_runtime=()=>{runtimeKeepalivePush();throw"unwind"};var _emscripten_get_now;_emscripten_get_now=()=>performance.timeOrigin+performance.now();var getHeapMax=()=>536870912;var growMemory=size=>{var b=wasmMemory.buffer;var pages=(size-b.byteLength+65535)/65536;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){}};var _emscripten_resize_heap=requestedSize=>{var oldSize=GROWABLE_HEAP_U8().length;requestedSize>>>=0;if(requestedSize<=oldSize){return false}var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false}var alignUp=(x,multiple)=>x+(multiple-x%multiple)%multiple;for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}return false};var printCharBuffers=[null,[],[]];var printChar=(stream,curr)=>{var buffer=printCharBuffers[stream];if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer,0));buffer.length=0}else{buffer.push(curr)}};function _fd_write(fd,iov,iovcnt,pnum){if(ENVIRONMENT_IS_PTHREAD)return proxyToMainThread(3,1,fd,iov,iovcnt,pnum);var num=0;for(var i=0;i>2];var len=GROWABLE_HEAP_U32()[iov+4>>2];iov+=8;for(var j=0;j>2]=num;return 0}PThread.init();embind_init_charCodes();BindingError=Module["BindingError"]=class BindingError extends Error{constructor(message){super(message);this.name="BindingError"}};InternalError=Module["InternalError"]=class InternalError extends Error{constructor(message){super(message);this.name="InternalError"}};init_ClassHandle();init_embind();init_RegisteredPointer();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");handleAllocatorInit();init_emval();var proxiedFunctionTable=[_proc_exit,exitOnMainThread,pthreadCreateProxied,_fd_write];var wasmImports={e:___assert_fail,s:___cxa_throw,F:___emscripten_init_main_thread_js,m:___emscripten_thread_cleanup,C:___pthread_create_js,w:__embind_register_bigint,M:__embind_register_bool,v:__embind_register_class,t:__embind_register_class_constructor,j:__embind_register_class_function,L:__embind_register_emval,o:__embind_register_float,c:__embind_register_integer,b:__embind_register_memory_view,p:__embind_register_std_string,k:__embind_register_std_wstring,N:__embind_register_void,z:__emscripten_notify_mailbox_postmessage,G:__emscripten_receive_on_main_thread_js,E:__emscripten_thread_mailbox_await,I:__emscripten_thread_set_strongref,h:__emval_call_method,d:__emval_decref,g:__emval_get_method_caller,O:__emval_incref,q:__emval_new_cstring,K:__emval_new_object,D:__emval_new_u8string,i:__emval_run_destructors,r:__emval_set_property,P:__emval_take_value,u:__localtime_js,y:__tzset_js,l:_abort,n:_emscripten_check_blocking_allowed,J:_emscripten_date_now,H:_emscripten_exit_with_live_runtime,f:_emscripten_get_now,x:_emscripten_resize_heap,B:_exit,A:_fd_write,a:wasmMemory||Module["wasmMemory"]};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["Q"])();var _free=a0=>(_free=wasmExports["R"])(a0);var _malloc=a0=>(_malloc=wasmExports["S"])(a0);var _pthread_self=Module["_pthread_self"]=()=>(_pthread_self=Module["_pthread_self"]=wasmExports["T"])();var __emscripten_tls_init=Module["__emscripten_tls_init"]=()=>(__emscripten_tls_init=Module["__emscripten_tls_init"]=wasmExports["U"])();var ___getTypeName=a0=>(___getTypeName=wasmExports["V"])(a0);var __embind_initialize_bindings=Module["__embind_initialize_bindings"]=()=>(__embind_initialize_bindings=Module["__embind_initialize_bindings"]=wasmExports["W"])();var ___errno_location=()=>(___errno_location=wasmExports["__errno_location"])();var __emscripten_thread_init=Module["__emscripten_thread_init"]=(a0,a1,a2,a3,a4,a5)=>(__emscripten_thread_init=Module["__emscripten_thread_init"]=wasmExports["X"])(a0,a1,a2,a3,a4,a5);var __emscripten_thread_crashed=Module["__emscripten_thread_crashed"]=()=>(__emscripten_thread_crashed=Module["__emscripten_thread_crashed"]=wasmExports["Z"])();var _emscripten_main_runtime_thread_id=()=>(_emscripten_main_runtime_thread_id=wasmExports["emscripten_main_runtime_thread_id"])();var _emscripten_main_thread_process_queued_calls=()=>(_emscripten_main_thread_process_queued_calls=wasmExports["emscripten_main_thread_process_queued_calls"])();var __emscripten_run_on_main_thread_js=(a0,a1,a2,a3)=>(__emscripten_run_on_main_thread_js=wasmExports["_"])(a0,a1,a2,a3);var __emscripten_thread_free_data=a0=>(__emscripten_thread_free_data=wasmExports["$"])(a0);var __emscripten_thread_exit=Module["__emscripten_thread_exit"]=a0=>(__emscripten_thread_exit=Module["__emscripten_thread_exit"]=wasmExports["aa"])(a0);var __emscripten_check_mailbox=()=>(__emscripten_check_mailbox=wasmExports["ba"])();var _emscripten_stack_set_limits=(a0,a1)=>(_emscripten_stack_set_limits=wasmExports["ca"])(a0,a1);var stackSave=()=>(stackSave=wasmExports["da"])();var stackRestore=a0=>(stackRestore=wasmExports["ea"])(a0);var stackAlloc=a0=>(stackAlloc=wasmExports["fa"])(a0);var ___cxa_increment_exception_refcount=a0=>(___cxa_increment_exception_refcount=wasmExports["__cxa_increment_exception_refcount"])(a0);var ___cxa_is_pointer_type=a0=>(___cxa_is_pointer_type=wasmExports["ga"])(a0);var dynCall_jiji=Module["dynCall_jiji"]=(a0,a1,a2,a3,a4)=>(dynCall_jiji=Module["dynCall_jiji"]=wasmExports["ha"])(a0,a1,a2,a3,a4);var ___start_em_js=Module["___start_em_js"]=143628;var ___stop_em_js=Module["___stop_em_js"]=143685;Module["wasmMemory"]=wasmMemory;Module["keepRuntimeAlive"]=keepRuntimeAlive;Module["ExitStatus"]=ExitStatus;Module["PThread"]=PThread;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}if(ENVIRONMENT_IS_PTHREAD){readyPromiseResolve(Module);initRuntime();startWorker(Module);return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run(); return moduleArg.ready } - ); })(); +; export default Module; \ No newline at end of file diff --git a/ui/decoder-pro-simd-mt-worker.wasm b/ui/decoder-pro-simd-mt-worker.wasm index ddb26f7..5fc2c2f 100755 Binary files a/ui/decoder-pro-simd-mt-worker.wasm and b/ui/decoder-pro-simd-mt-worker.wasm differ diff --git a/ui/decoder-pro-simd-mt.js b/ui/decoder-pro-simd-mt.js index 21175fe..e220582 100644 --- a/ui/decoder-pro-simd-mt.js +++ b/ui/decoder-pro-simd-mt.js @@ -1 +1 @@ -!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,t=(e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href,async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,i,n;(n=t).ready=new Promise(((e,t)=>{r=e,i=t})),(n=void 0!==n?n:{}).locateFile=function(e){return"decoder-pro-simd-mt-worker.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_SIMD_MT_WORKER_WASM_URL&&""!=JESSIBUCA_PRO_SIMD_MT_WORKER_WASM_URL?JESSIBUCA_PRO_SIMD_MT_WORKER_WASM_URL:e};var s,a,o,l=Object.assign({},n),d=(e,t)=>{throw t},u="object"==typeof window,h="function"==typeof importScripts,c="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f=n.ENVIRONMENT_IS_PTHREAD||!1,p="";function m(e){return n.locateFile?n.locateFile(e,p):p+e}if(c){const{createRequire:e}=await import("module");var _=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href),g=_("fs"),y=_("path");let t;p=h?y.dirname(p)+"/":_("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href)),s=(e,t)=>(e=se(e)?new URL(e):y.normalize(e),g.readFileSync(e,t?void 0:"utf8")),o=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},a=function(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=se(e)?new URL(e):y.normalize(e),g.readFile(e,i?void 0:"utf8",((e,n)=>{e?r(e):t(i?n.buffer:n)}))},!n.thisProgram&&process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),d=(e,t)=>{throw process.exitCode=e,t},n.inspect=()=>"[Emscripten Module object]";try{t=_("worker_threads")}catch(e){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),e}global.Worker=t.Worker}else(u||h)&&(h?p=self.location.href:"undefined"!=typeof document&&document.currentScript&&(p=document.currentScript.src),e&&(p=e),p=0!==p.indexOf("blob:")?p.substr(0,p.replace(/[?#].*/,"").lastIndexOf("/")+1):"",c||(s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h&&(o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),a=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)}));c&&"undefined"==typeof performance&&(global.performance=_("perf_hooks").performance);var v=console.log.bind(console),b=console.error.bind(console);c&&(v=function(){for(var e=arguments.length,t=new Array(e),r=0;r=16777216,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+O+"! (STACK_SIZE=16777216)"),f)U=n.wasmMemory;else if(n.wasmMemory)U=n.wasmMemory;else if(!((U=new WebAssembly.Memory({initial:O/65536,maximum:O/65536,shared:!0})).buffer instanceof SharedArrayBuffer))throw E("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),c&&E("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");M(),O=U.buffer.byteLength;var $=[],N=[],G=[],H=0;function V(){return A||H>0}function W(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)q(n.preRun.shift());xe($)}function j(){f||xe(N)}function Y(){if(!f){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)X(n.postRun.shift());xe(G)}}function q(e){$.unshift(e)}function K(e){N.unshift(e)}function X(e){G.unshift(e)}var Z=0,J=null;function Q(e){Z++,n.monitorRunDependencies&&n.monitorRunDependencies(Z)}function ee(e){if(Z--,n.monitorRunDependencies&&n.monitorRunDependencies(Z),0==Z&&J){var t=J;J=null,t()}}function te(e){n.onAbort&&n.onAbort(e),E(e="Aborted("+e+")"),R=!0,T=1,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}var re,ie="data:application/octet-stream;base64,";function ne(e){return e.startsWith(ie)}function se(e){return e.startsWith("file://")}function ae(e){if(e==re&&w)return new Uint8Array(w);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function oe(e){if(!w&&(u||h)){if("function"==typeof fetch&&!se(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>ae(e)));if(a)return new Promise(((t,r)=>{a(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>ae(e)))}function le(e,t,r){return oe(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{E(`failed to asynchronously prepare wasm: ${e}`),te(e)}))}function de(e,t,r,i){return e||"function"!=typeof WebAssembly.instantiateStreaming||ne(t)||se(t)||c||"function"!=typeof fetch?le(t,r,i):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(i,(function(e){return E(`wasm streaming compile failed: ${e}`),E("falling back to ArrayBuffer instantiation"),le(t,r,i)}))))}function ue(){var e={a:ui};function t(e,t){return hi=e.exports,Pe(hi.O),Ce=hi.T,K(hi.L),x=t,ee(),hi}if(Q(),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){E(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return de(w,re,e,(function(e){t(e.instance,e.module)})).catch(i),{}}function he(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}n.locateFile?ne(re="decoder-pro-simd-mt-worker.wasm")||(re=m(re)):re=new URL("decoder-pro-simd-mt-worker.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href).href;var ce=e=>{e.terminate(),e.onmessage=e=>{}},fe=e=>{var t=Ue.pthreads[e];delete Ue.pthreads[e],ce(t),vi(e),Ue.runningWorkers.splice(Ue.runningWorkers.indexOf(t),1),t.pthread_ptr=0},pe=e=>{Ue.pthreads[e].postMessage({cmd:"cancel"})},me=e=>{var t=Ue.pthreads[e];z(t),Ue.returnWorkerToPool(t)},_e=e=>{var t=Ue.getNewWorker();if(!t)return 6;Ue.runningWorkers.push(t),Ue.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var r={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return c&&t.unref(),t.postMessage(r,e.transferList),0},ge="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ye=(e,t,r)=>{for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&ge)return ge.decode(e.buffer instanceof SharedArrayBuffer?e.slice(t,n):e.subarray(t,n));for(var s="";t>10,56320|1023&d)}}else s+=String.fromCharCode((31&a)<<6|o)}else s+=String.fromCharCode(a)}return s},ve=(e,t)=>e?ye(B,e,t):"";function be(e){if(f)return Lr(0,1,e);T=e,V()||(Ue.terminateAllThreads(),n.onExit&&n.onExit(e),R=!0),d(e,new he(e))}var we=(e,t)=>{if(T=e,f)throw Te(e),"unwind";be(e)},Se=we,Ee=e=>{if(e instanceof he||"unwind"==e)return T;d(1,e)},Ue={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){f?Ue.initWorker():Ue.initMainThread()},initMainThread(){for(var e=8;e--;)Ue.allocateUnusedWorker();q((()=>{Q(),Ue.loadWasmModuleToAllWorkers((()=>ee()))}))},initWorker(){A=!1},setExitStatus:e=>{T=e},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of Ue.runningWorkers)ce(e);for(var e of Ue.unusedWorkers)ce(e);Ue.unusedWorkers=[],Ue.runningWorkers=[],Ue.pthreads=[]},returnWorkerToPool:e=>{var t=e.pthread_ptr;delete Ue.pthreads[t],Ue.unusedWorkers.push(e),Ue.runningWorkers.splice(Ue.runningWorkers.indexOf(e),1),e.pthread_ptr=0,vi(t)},receiveObjectTransfer(e){},threadInitTLS(){Ue.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=r=>{var i=r.data,s=i.cmd;if(i.targetThread&&i.targetThread!=pi()){var a=Ue.pthreads[i.targetThread];a?a.postMessage(i,i.transferList):E(`Internal error! Worker sent a message "${s}" to target pthread ${i.targetThread}, but that thread no longer exists!`)}else"checkMailbox"===s?Fr():"spawnThread"===s?_e(i):"cleanupThread"===s?me(i.thread):"killThread"===s?fe(i.thread):"cancelThread"===s?pe(i.thread):"loaded"===s?(e.loaded=!0,c&&!e.pthread_ptr&&e.unref(),t(e)):"alert"===s?alert(`Thread ${i.threadId}: ${i.text}`):"setimmediate"===i.target?e.postMessage(i):"callHandler"===s?n[i.handler](...i.args):s&&E(`worker sent an unknown command ${s}`)},e.onerror=e=>{throw E(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e},c&&(e.on("message",(t=>e.onmessage({data:t}))),e.on("error",(t=>e.onerror(t))));var r=[];for(var i of["onExit","onAbort","print","printErr"])n.hasOwnProperty(i)&&r.push(i);e.postMessage({cmd:"load",handlers:r,urlOrBlob:n.mainScriptUrlOrBlob,wasmMemory:U,wasmModule:x})})),loadWasmModuleToAllWorkers(e){if(f)return e();Promise.all(Ue.unusedWorkers.map(Ue.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker(){var e;if(n.locateFile){var t=m("decoder-pro-simd-mt-worker.worker.js");e=new Worker(t)}else e=new Worker(new URL("decoder-pro-simd-mt-worker.worker.js","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href));Ue.unusedWorkers.push(e)},getNewWorker:()=>(0==Ue.unusedWorkers.length&&(Ue.allocateUnusedWorker(),Ue.loadWasmModuleToWorker(Ue.unusedWorkers[0])),Ue.unusedWorkers.pop())};n.PThread=Ue;var xe=e=>{for(;e.length>0;)e.shift()(n)},Ae=()=>{var e=pi(),t=I[e+52>>2],r=I[e+56>>2];Si(t,t-r),Ui(t)};function Te(e){if(f)return Lr(1,0,e);Se(e)}n.establishStackSpace=Ae;var Ce,Be=[],ke=e=>{var t=Be[e];return t||(e>=Be.length&&(Be.length=e+1),Be[e]=t=Ce.get(e)),t},Fe=(e,t)=>{!function(e){V()?Ue.setExitStatus(e):bi(e)}(ke(e)(t))};n.invokeEntryPoint=Fe;var Pe=e=>{Ue.tlsInitFunctions.push(e)};function Ie(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){I[this.ptr+4>>2]=e},this.get_type=function(){return I[this.ptr+4>>2]},this.set_destructor=function(e){I[this.ptr+8>>2]=e},this.get_destructor=function(){return I[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,C[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=C[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,C[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=C[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){I[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return I[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Ai(this.get_type()))return I[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var De=(e,t,r)=>{throw new Ie(e).init(t,r),e},Le=e=>{_i(e,!h,1,!u,16777216,!1),Ue.threadInitTLS()},Re=e=>{f?postMessage({cmd:"cleanupThread",thread:e}):me(e)};function ze(e,t,r,i){return f?Lr(2,1,e,t,r,i):Ne(e,t,r,i)}var Me,Oe,$e,Ne=(e,t,r,i)=>{if("undefined"==typeof SharedArrayBuffer)return E("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var n=[];if(f&&0===n.length)return ze(e,t,r,i);var s={startRoutine:r,pthread_ptr:e,arg:i,transferList:n};return f?(s.cmd="spawnThread",postMessage(s,n),0):_e(s)},Ge=(e,t,r,i,n)=>{},He=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Me=e},Ve=e=>{for(var t="",r=e;B[r];)t+=Me[B[r++]];return t},We={},je={},Ye={},qe=e=>{throw new Oe(e)},Ke=e=>{throw new $e(e)},Xe=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Ke("Mismatched type converter count");for(var n=0;n{je.hasOwnProperty(e)?n[t]=je[e]:(s.push(e),We.hasOwnProperty(e)||(We[e]=[]),We[e].push((()=>{n[t]=je[e],++a===s.length&&i(n)})))})),0===s.length&&i(n)};function Ze(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i=t.name;if(e||qe(`type "${i}" must have a positive integer typeid pointer`),je.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;qe(`Cannot register type '${i}' twice`)}if(je[e]=t,delete Ye[e],We.hasOwnProperty(e)){var n=We[e];delete We[e],n.forEach((e=>e()))}}function Je(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ze(e,t,r)}var Qe,et=8,tt=(e,t,r,i)=>{Je(e,{name:t=Ve(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:et,readValueFromPointer:function(e){return this.fromWireType(B[e])},destructorFunction:null})},rt=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),it=e=>{qe(e.$$.ptrType.registeredClass.name+" instance already deleted")},nt=!1,st=e=>{},at=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},ot=e=>{e.count.value-=1,0===e.count.value&&at(e)},lt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=lt(e,t,r.baseClass);return null===i?null:r.downcast(i)},dt={},ut=()=>Object.keys(_t).length,ht=()=>{var e=[];for(var t in _t)_t.hasOwnProperty(t)&&e.push(_t[t]);return e},ct=[],ft=()=>{for(;ct.length;){var e=ct.pop();e.$$.deleteScheduled=!1,e.delete()}},pt=e=>{Qe=e,ct.length&&Qe&&Qe(ft)},mt=()=>{n.getInheritedInstanceCount=ut,n.getLiveInheritedInstances=ht,n.flushPendingDeletes=ft,n.setDelayFunction=pt},_t={},gt=(e,t)=>{for(void 0===t&&qe("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},yt=(e,t)=>(t=gt(e,t),_t[t]),vt=(e,t)=>(t.ptrType&&t.ptr||Ke("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ke("Both smartPtrType and smartPtr must be specified"),t.count={value:1},wt(Object.create(e,{$$:{value:t}})));function bt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=yt(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function n(){return this.isSmartPointer?vt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):vt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,a=this.registeredClass.getActualType(t),o=dt[a];if(!o)return n.call(this);s=this.isConst?o.constPointerType:o.pointerType;var l=lt(t,this.registeredClass,s.registeredClass);return null===l?n.call(this):this.isSmartPointer?vt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):vt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var wt=e=>"undefined"==typeof FinalizationRegistry?(wt=e=>e,e):(nt=new FinalizationRegistry((e=>{ot(e.$$)})),wt=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};nt.register(e,r,e)}return e},st=e=>nt.unregister(e),wt(e)),St=()=>{Object.assign(Et.prototype,{isAliasOf(e){if(!(this instanceof Et))return!1;if(!(e instanceof Et))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)n=i.upcast(n),i=i.baseClass;return t===i&&r===n},clone(){if(this.$$.ptr||it(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=wt(Object.create(Object.getPrototypeOf(this),{$$:{value:rt(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||it(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&qe("Object already scheduled for deletion"),st(this),ot(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||it(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&qe("Object already scheduled for deletion"),ct.push(this),1===ct.length&&Qe&&Qe(ft),this.$$.deleteScheduled=!0,this}})};function Et(){}var Ut=48,xt=57,At=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Ut&&t<=xt?`_${e}`:e};function Tt(e,t){return{[e=At(e)]:function(){return t.apply(this,arguments)}}[e]}var Ct=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||qe(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}},Bt=(e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&qe(`Cannot register public name '${e}' twice`),Ct(n,e,e),n.hasOwnProperty(r)&&qe(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))};function kt(e,t,r,i,n,s,a,o){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=n,this.getActualType=s,this.upcast=a,this.downcast=o,this.pureVirtualFunctions=[]}var Ft=(e,t,r)=>{for(;t!==r;)t.upcast||qe(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Pt(e,t){if(null===t)return this.isReference&&qe(`null is not a valid ${this.name}`),0;t.$$||qe(`Cannot pass "${dr(t)}" as a ${this.name}`),t.$$.ptr||qe(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Ft(t.$$.ptr,r,this.registeredClass)}function It(e,t){var r;if(null===t)return this.isReference&&qe(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||qe(`Cannot pass "${dr(t)}" as a ${this.name}`),t.$$.ptr||qe(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&qe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=Ft(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&qe("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:qe(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var n=t.clone();r=this.rawShare(r,ar.toHandle((()=>n.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:qe("Unsupporting sharing policy")}return r}function Dt(e,t){if(null===t)return this.isReference&&qe(`null is not a valid ${this.name}`),0;t.$$||qe(`Cannot pass "${dr(t)}" as a ${this.name}`),t.$$.ptr||qe(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&qe(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Ft(t.$$.ptr,r,this.registeredClass)}function Lt(e){return this.fromWireType(I[e>>2])}var Rt=()=>{Object.assign(zt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:et,readValueFromPointer:Lt,deleteObject(e){null!==e&&e.delete()},fromWireType:bt})};function zt(e,t,r,i,n,s,a,o,l,d,u){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=n,this.pointeeType=s,this.sharingPolicy=a,this.rawGetPointee=o,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=u,n||void 0!==t.baseClass?this.toWireType=It:i?(this.toWireType=Pt,this.destructorFunction=null):(this.toWireType=Dt,this.destructorFunction=null)}var Mt,Ot=(e,t,r)=>{n.hasOwnProperty(e)||Ke("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},$t=(e,t,r)=>{var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)},Nt=(e,t,r)=>e.includes("j")?$t(e,t,r):ke(t).apply(null,r),Gt=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Nt(e,t,r)}},Ht=(e,t)=>{var r=(e=Ve(e)).includes("j")?Gt(e,t):ke(t);return"function"!=typeof r&&qe(`unknown function pointer with signature ${e}: ${t}`),r},Vt=(e,t)=>{var r=Tt(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Wt=e=>{var t=mi(e),r=Ve(t);return ci(t),r},jt=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||je[t]||(Ye[t]?Ye[t].forEach(e):(r.push(t),i[t]=!0))})),new Mt(`${e}: `+r.map(Wt).join([", "]))},Yt=(e,t,r,i,n,s,a,o,l,d,u,h,c)=>{u=Ve(u),s=Ht(n,s),o&&(o=Ht(a,o)),d&&(d=Ht(l,d)),c=Ht(h,c);var f=At(u);Bt(f,(function(){jt(`Cannot construct ${u} due to unbound types`,[i])})),Xe([e,t,r],i?[i]:[],(function(t){var r,n;t=t[0],n=i?(r=t.registeredClass).instancePrototype:Et.prototype;var a=Tt(f,(function(){if(Object.getPrototypeOf(this)!==l)throw new Oe("Use 'new' to construct "+u);if(void 0===h.constructor_body)throw new Oe(u+" has no accessible constructor");var e=h.constructor_body[arguments.length];if(void 0===e)throw new Oe(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(h.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(n,{constructor:{value:a}});a.prototype=l;var h=new kt(u,a,l,c,r,s,o,d);h.baseClass&&(void 0===h.baseClass.__derivedClasses&&(h.baseClass.__derivedClasses=[]),h.baseClass.__derivedClasses.push(h));var p=new zt(u,h,!0,!1,!1),m=new zt(u+"*",h,!1,!1,!1),_=new zt(u+" const*",h,!1,!0,!1);return dt[e]={pointerType:m,constPointerType:_},Ot(f,a),[p,m,_]}))},qt=(e,t)=>{for(var r=[],i=0;i>2]);return r},Kt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Xt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=Tt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,n=e.apply(i,t);return n instanceof Object?n:i}function Zt(e,t,r,i,n,s){var a=t.length;a<2&&qe("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==t[1]&&null!==r,l=!1,d=1;d0?", ":"")+c),f+=(u||s?"var rv = ":"")+"invoker(fn"+(c.length>0?", ":"")+c+");\n",l)f+="runDestructors(destructors);\n";else for(d=o?1:2;d{var a=qt(t,r);n=Ht(i,n),Xe([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Oe(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{jt(`Cannot construct ${e.name} due to unbound types`,a)},Xe([],a,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Zt(r,i,null,n,s),[]))),[]}))},Qt=(e,t,r,i,n,s,a,o,l)=>{var d=qt(r,i);t=Ve(t),s=Ht(n,s),Xe([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function n(){jt(`Cannot call ${i} due to unbound types`,d)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),o&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,h=u[t];return void 0===h||void 0===h.overloadTable&&h.className!==e.name&&h.argCount===r-2?(n.argCount=r-2,n.className=e.name,u[t]=n):(Ct(u,t,i),u[t].overloadTable[r-2]=n),Xe([],d,(function(n){var o=Zt(i,n,e,s,a,l);return void 0===u[t].overloadTable?(o.argCount=r-2,u[t]=o):u[t].overloadTable[r-2]=o,[]})),[]}))};function er(){Object.assign(tr.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function tr(){this.allocated=[void 0],this.freelist=[]}var rr=new tr,ir=e=>{e>=rr.reserved&&0==--rr.get(e).refcount&&rr.free(e)},nr=()=>{for(var e=0,t=rr.reserved;t{rr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),rr.reserved=rr.allocated.length,n.count_emval_handles=nr},ar={toValue:e=>(e||qe("Cannot use deleted val. handle = "+e),rr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return rr.allocate({refcount:1,value:e})}}};function or(e){return this.fromWireType(P[e>>2])}var lr=(e,t)=>{Je(e,{name:t=Ve(t),fromWireType:e=>{var t=ar.toValue(e);return ir(e),t},toWireType:(e,t)=>ar.toHandle(t),argPackAdvance:et,readValueFromPointer:or,destructorFunction:null})},dr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},ur=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(D[e>>2])};case 8:return function(e){return this.fromWireType(L[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},hr=(e,t,r)=>{Je(e,{name:t=Ve(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:et,readValueFromPointer:ur(t,r),destructorFunction:null})},cr=(e,t,r)=>{switch(t){case 1:return r?e=>C[e>>0]:e=>B[e>>0];case 2:return r?e=>k[e>>1]:e=>F[e>>1];case 4:return r?e=>P[e>>2]:e=>I[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},fr=(e,t,r,i,n)=>{t=Ve(t);var s=e=>e;if(0===i){var a=32-8*r;s=e=>e<>>a}var o=t.includes("unsigned");Je(e,{name:t,fromWireType:s,toWireType:o?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:et,readValueFromPointer:cr(t,r,0!==i),destructorFunction:null})},pr=(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=I[e>>2],r=I[e+4>>2];return new i(C.buffer,r,t)}Je(e,{name:r=Ve(r),fromWireType:n,argPackAdvance:et,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},mr=(e,t,r,i)=>{if(!(i>0))return 0;for(var n=r,s=r+i-1,a=0;a=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),o<=127){if(r>=s)break;t[r++]=o}else if(o<=2047){if(r+1>=s)break;t[r++]=192|o>>6,t[r++]=128|63&o}else if(o<=65535){if(r+2>=s)break;t[r++]=224|o>>12,t[r++]=128|o>>6&63,t[r++]=128|63&o}else{if(r+3>=s)break;t[r++]=240|o>>18,t[r++]=128|o>>12&63,t[r++]=128|o>>6&63,t[r++]=128|63&o}}return t[r]=0,r-n},_r=(e,t,r)=>mr(e,B,t,r),gr=e=>{for(var t=0,r=0;r=55296&&i<=57343?(t+=4,++r):t+=3}return t},yr=(e,t)=>{var r="std::string"===(t=Ve(t));Je(e,{name:t,fromWireType(e){var t,i=I[e>>2],n=e+4;if(r)for(var s=n,a=0;a<=i;++a){var o=n+a;if(a==i||0==B[o]){var l=ve(s,o-s);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),s=o+1}}else{var d=new Array(i);for(a=0;a>2]=i,r&&n)_r(t,a,i+1);else if(n)for(var o=0;o255&&(ci(a),qe("String has UTF-16 code units that do not fit in 8 bits")),B[a+o]=l}else for(o=0;o{for(var r=e,i=r>>1,n=i+t/2;!(i>=n)&&F[i];)++i;if((r=i<<1)-e>32&&vr)return vr.decode(B.slice(e,r));for(var s="",a=0;!(a>=t/2);++a){var o=k[e+2*a>>1];if(0==o)break;s+=String.fromCharCode(o)}return s},wr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=a,t+=2}return k[t>>1]=0,t-i},Sr=e=>2*e.length,Er=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var n=P[e+4*r>>2];if(0==n)break;if(++r,n>=65536){var s=n-65536;i+=String.fromCharCode(55296|s>>10,56320|1023&s)}else i+=String.fromCharCode(n)}return i},Ur=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,s=0;s=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++s)),P[t>>2]=a,(t+=4)+4>n)break}return P[t>>2]=0,t-i},xr=e=>{for(var t=0,r=0;r=55296&&i<=57343&&++r,t+=4}return t},Ar=(e,t,r)=>{var i,n,s,a,o;r=Ve(r),2===t?(i=br,n=wr,a=Sr,s=()=>F,o=1):4===t&&(i=Er,n=Ur,a=xr,s=()=>I,o=2),Je(e,{name:r,fromWireType:e=>{for(var r,n=I[e>>2],a=s(),l=e+4,d=0;d<=n;++d){var u=e+4+d*t;if(d==n||0==a[u>>o]){var h=i(l,u-l);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),l=u+t}}return ci(e),r},toWireType:(e,i)=>{"string"!=typeof i&&qe(`Cannot pass non-string to C++ string type ${r}`);var s=a(i),l=fi(4+s+t);return I[l>>2]=s>>o,n(i,l+4,s+t),null!==e&&e.push(ci,l),l},argPackAdvance:et,readValueFromPointer:or,destructorFunction(e){ci(e)}})},Tr=(e,t)=>{Je(e,{isVoid:!0,name:t=Ve(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Cr=()=>{if(!V())try{f?bi(T):Se(T)}catch(e){Ee(e)}},Br=e=>{if(!R)try{e(),Cr()}catch(e){Ee(e)}},kr=e=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(P,e>>2,e).value.then(Fr);var t=e+128;Atomics.store(P,t>>2,1)}};n.__emscripten_thread_mailbox_await=kr;var Fr=()=>{var e=pi();e&&(kr(e),Br((()=>wi())))};n.checkMailbox=Fr;var Pr,Ir=(e,t,r)=>{if(e==t)setTimeout((()=>Fr()));else if(f)postMessage({targetThread:e,cmd:"checkMailbox"});else{var i=Ue.pthreads[e];if(!i)return;i.postMessage({cmd:"checkMailbox"})}},Dr=e=>{var t=Ei(),r=e();return Ui(t),r},Lr=function(e,t){var r=arguments.length-2,i=arguments;return Dr((()=>{for(var n=r,s=xi(8*n),a=s>>3,o=0;o{Rr.length=r;for(var n=i>>3,s=0;s{c&&Ue.pthreads[e].ref()},Or={},$r=e=>{var t=Or[e];return void 0===t?Ve(e):t},Nr=[],Gr=(e,t,r,i)=>{(e=Nr[e])(t=ar.toValue(t),r=$r(r),null,i)},Hr=e=>{var t=Nr.length;return Nr.push(e),t},Vr=(e,t)=>{var r=je[e];return void 0===r&&qe(t+" has unknown type "+Wt(e)),r},Wr=(e,t)=>{for(var r=new Array(e),i=0;i>2],"parameter "+i);return r},jr={},Yr=(e,t)=>{var r=Wr(e,t),i=r[0],n=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",s=jr[n];if(void 0!==s)return s;for(var a=["retType"],o=[i],l="",d=0;d{e>4&&(rr.get(e).refcount+=1)},Kr=e=>ar.toHandle($r(e)),Xr=()=>ar.toHandle({}),Zr=e=>ar.toHandle(ve(e)),Jr=(e,t,r)=>{e=ar.toValue(e),t=ar.toValue(t),r=ar.toValue(r),e[t]=r},Qr=(e,t)=>{var r=(e=Vr(e,"_emval_take_value")).readValueFromPointer(t);return ar.toHandle(r)},ei=()=>{te("")},ti=()=>{},ri=()=>{H+=1},ii=()=>{throw ri(),"unwind"};Pr=()=>performance.timeOrigin+performance.now();var ni=e=>{te("OOM")},si=e=>{B.length,ni()},ai=[null,[],[]],oi=(e,t)=>{var r=ai[e];0===t||10===t?((1===e?S:E)(ye(r,0)),r.length=0):r.push(t)};function li(e,t,r,i){if(f)return Lr(3,1,e,t,r,i);for(var n=0,s=0;s>2],o=I[t+4>>2];t+=8;for(var l=0;l>2]=n,0}Ue.init(),He(),Oe=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},$e=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},St(),mt(),Rt(),Mt=n.UnboundTypeError=Vt(Error,"UnboundTypeError"),er(),sr();var di=[be,Te,ze,li],ui={q:De,A:Le,l:Re,y:Ne,s:Ge,G:tt,w:Yt,r:Jt,h:Qt,F:lr,n:hr,c:fr,b:pr,o:yr,i:Ar,H:Tr,u:Ir,B:zr,z:kr,D:Mr,g:Gr,d:ir,f:Yr,I:qr,p:Kr,K:Xr,E:Zr,j:Jr,J:Qr,k:ei,m:ti,C:ii,e:Pr,t:si,x:Se,v:li,a:U||n.wasmMemory},hi=ue(),ci=e=>(ci=hi.M)(e),fi=e=>(fi=hi.N)(e);n.__emscripten_tls_init=()=>(n.__emscripten_tls_init=hi.O)();var pi=n._pthread_self=()=>(pi=n._pthread_self=hi.P)(),mi=e=>(mi=hi.Q)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=hi.R)();var _i=n.__emscripten_thread_init=(e,t,r,i,s,a)=>(_i=n.__emscripten_thread_init=hi.S)(e,t,r,i,s,a);n.__emscripten_thread_crashed=()=>(n.__emscripten_thread_crashed=hi.U)();var gi,yi=(e,t,r,i)=>(yi=hi.V)(e,t,r,i),vi=e=>(vi=hi.W)(e),bi=n.__emscripten_thread_exit=e=>(bi=n.__emscripten_thread_exit=hi.X)(e),wi=n.__emscripten_check_mailbox=()=>(wi=n.__emscripten_check_mailbox=hi.Y)(),Si=(e,t)=>(Si=hi.Z)(e,t),Ei=()=>(Ei=hi._)(),Ui=e=>(Ui=hi.$)(e),xi=e=>(xi=hi.aa)(e),Ai=e=>(Ai=hi.ba)(e);function Ti(){if(!(Z>0)){if(f)return r(n),j(),void startWorker(n);W(),Z>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e())}function e(){gi||(gi=!0,n.calledRun=!0,R||(j(),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),Y()))}}if(n.dynCall_jiji=(e,t,r,i,s)=>(n.dynCall_jiji=hi.ca)(e,t,r,i,s),n.___start_em_js=143356,n.___stop_em_js=143413,n.keepRuntimeAlive=V,n.wasmMemory=U,n.ExitStatus=he,n.PThread=Ue,J=function e(){gi||Ti(),gi||(J=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return Ti(),t.ready}),r=(()=>{var e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href;return async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,i,n;(n=t).ready=new Promise(((e,t)=>{r=e,i=t})),(n=void 0!==n?n:{}).locateFile=function(e){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:e};var s,a,o,l=Object.assign({},n),d="./this.program",u="object"==typeof window,h="function"==typeof importScripts,c="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";function p(e){return n.locateFile?n.locateFile(e,f):f+e}if(c){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href),_=m("fs"),g=m("path");f=h?g.dirname(f)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href)),s=(e,t)=>(e=J(e)?new URL(e):g.normalize(e),_.readFileSync(e,t?void 0:"utf8")),o=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},a=function(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=J(e)?new URL(e):g.normalize(e),_.readFile(e,i?void 0:"utf8",((e,n)=>{e?r(e):t(i?n.buffer:n)}))},!n.thisProgram&&process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),n.inspect=()=>"[Emscripten Module object]"}else(u||h)&&(h?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h&&(o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),a=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)});var y,v,b=n.print||console.log.bind(console),w=n.printErr||console.error.bind(console);Object.assign(n,l),l=null,n.arguments&&n.arguments,n.thisProgram&&(d=n.thisProgram),n.quit&&n.quit,n.wasmBinary&&(y=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&j("no native wasm support detected");var S,E,U,x,A,T,C,B,k=!1;function F(e,t){e||j(t)}function P(){var e=v.buffer;n.HEAP8=S=new Int8Array(e),n.HEAP16=U=new Int16Array(e),n.HEAPU8=E=new Uint8Array(e),n.HEAPU16=x=new Uint16Array(e),n.HEAP32=A=new Int32Array(e),n.HEAPU32=T=new Uint32Array(e),n.HEAPF32=C=new Float32Array(e),n.HEAPF64=B=new Float64Array(e)}var I=[],D=[],L=[];function R(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)O(n.preRun.shift());ne(I)}function z(){n.noFSInit||Be.init.initialized||Be.init(),Be.ignorePermissions=!1,ne(D)}function M(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)N(n.postRun.shift());ne(L)}function O(e){I.unshift(e)}function $(e){D.unshift(e)}function N(e){L.unshift(e)}var G=0,H=null;function V(e){G++,n.monitorRunDependencies&&n.monitorRunDependencies(G)}function W(e){if(G--,n.monitorRunDependencies&&n.monitorRunDependencies(G),0==G&&H){var t=H;H=null,t()}}function j(e){n.onAbort&&n.onAbort(e),w(e="Aborted("+e+")"),k=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}var Y,q,K,X="data:application/octet-stream;base64,";function Z(e){return e.startsWith(X)}function J(e){return e.startsWith("file://")}function Q(e){if(e==Y&&y)return new Uint8Array(y);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!y&&(u||h)){if("function"==typeof fetch&&!J(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(a)return new Promise(((t,r)=>{a(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),j(e)}))}function re(e,t,r,i){return e||"function"!=typeof WebAssembly.instantiateStreaming||Z(t)||J(t)||c||"function"!=typeof fetch?te(t,r,i):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(i,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),te(t,r,i)}))))}function ie(){var e={a:ti};function t(e,t){return ri=e.exports,v=ri.D,P(),It=ri.G,$(ri.E),W(),ri}if(V(),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return re(y,Y,e,(function(e){t(e.instance)})).catch(i),{}}n.locateFile?Z(Y="decoder-pro-audio.wasm")||(Y=p(Y)):Y=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href).href;var ne=e=>{for(;e.length>0;)e.shift()(n)};function se(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){T[this.ptr+4>>2]=e},this.get_type=function(){return T[this.ptr+4>>2]},this.set_destructor=function(e){T[this.ptr+8>>2]=e},this.get_destructor=function(){return T[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,S[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=S[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,S[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=S[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){T[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return T[this.ptr+16>>2]},this.get_exception_ptr=function(){if(li(this.get_type()))return T[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var ae=(e,t,r)=>{throw new se(e).init(t,r),e},oe=e=>(A[ni()>>2]=e,e),le={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=le.isAbs(e),r="/"===e.substr(-1);return(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=le.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=le.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return le.normalize(e.join("/"))},join2:(e,t)=>le.normalize(e+"/"+t)},de=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(c)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}j("initRandomDevice")},ue=e=>(ue=de())(e),he={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:Be.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=le.isAbs(i)}return(t?"/":"")+(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=he.resolve(e).substr(1),t=he.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),s=Math.min(i.length,n.length),a=s,o=0;o{for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&ce)return ce.decode(e.subarray(t,n));for(var s="";t>10,56320|1023&d)}}else s+=String.fromCharCode((31&a)<<6|o)}else s+=String.fromCharCode(a)}return s},pe=[],me=e=>{for(var t=0,r=0;r=55296&&i<=57343?(t+=4,++r):t+=3}return t},_e=(e,t,r,i)=>{if(!(i>0))return 0;for(var n=r,s=r+i-1,a=0;a=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a);if(o<=127){if(r>=s)break;t[r++]=o}else if(o<=2047){if(r+1>=s)break;t[r++]=192|o>>6,t[r++]=128|63&o}else if(o<=65535){if(r+2>=s)break;t[r++]=224|o>>12,t[r++]=128|o>>6&63,t[r++]=128|63&o}else{if(r+3>=s)break;t[r++]=240|o>>18,t[r++]=128|o>>12&63,t[r++]=128|o>>6&63,t[r++]=128|63&o}}return t[r]=0,r-n};function ge(e,t,r){var i=r>0?r:me(e)+1,n=new Array(i),s=_e(e,n,0,n.length);return t&&(n.length=s),n}var ye=()=>{if(!pe.length){var e=null;if(c){var t=Buffer.alloc(256),r=0,i=process.stdin.fd;try{r=_.readSync(i,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ge(e,!0)}return pe.shift()},ve={ttys:[],init(){},shutdown(){},register(e,t){ve.ttys[e]={input:[],output:[],ops:t},Be.registerDevice(e,ve.stream_ops)},stream_ops:{open(e){var t=ve.ttys[e.node.rdev];if(!t)throw new Be.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,i,n){if(!e.tty||!e.tty.ops.get_char)throw new Be.ErrnoError(60);for(var s=0,a=0;aye(),put_char(e,t){null===t||10===t?(b(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(fe(e.output,0)),e.output=[])}}},be=e=>{j()},we={ops_table:null,mount:e=>we.createNode(null,"/",16895,0),createNode(e,t,r,i){if(Be.isBlkdev(r)||Be.isFIFO(r))throw new Be.ErrnoError(63);we.ops_table||(we.ops_table={dir:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,lookup:we.node_ops.lookup,mknod:we.node_ops.mknod,rename:we.node_ops.rename,unlink:we.node_ops.unlink,rmdir:we.node_ops.rmdir,readdir:we.node_ops.readdir,symlink:we.node_ops.symlink},stream:{llseek:we.stream_ops.llseek}},file:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:{llseek:we.stream_ops.llseek,read:we.stream_ops.read,write:we.stream_ops.write,allocate:we.stream_ops.allocate,mmap:we.stream_ops.mmap,msync:we.stream_ops.msync}},link:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,readlink:we.node_ops.readlink},stream:{}},chrdev:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:Be.chrdev_stream_ops}});var n=Be.createNode(e,t,r,i);return Be.isDir(n.mode)?(n.node_ops=we.ops_table.dir.node,n.stream_ops=we.ops_table.dir.stream,n.contents={}):Be.isFile(n.mode)?(n.node_ops=we.ops_table.file.node,n.stream_ops=we.ops_table.file.stream,n.usedBytes=0,n.contents=null):Be.isLink(n.mode)?(n.node_ops=we.ops_table.link.node,n.stream_ops=we.ops_table.link.stream):Be.isChrdev(n.mode)&&(n.node_ops=we.ops_table.chrdev.node,n.stream_ops=we.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n,e.timestamp=n.timestamp),n},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Be.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Be.isDir(e.mode)?t.size=4096:Be.isFile(e.mode)?t.size=e.usedBytes:Be.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&we.resizeFileStorage(e,t.size)},lookup(e,t){throw Be.genericErrors[44]},mknod:(e,t,r,i)=>we.createNode(e,t,r,i),rename(e,t,r){if(Be.isDir(e.mode)){var i;try{i=Be.lookupNode(t,r)}catch(e){}if(i)for(var n in i.contents)throw new Be.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Be.lookupNode(e,t);for(var i in r.contents)throw new Be.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var i=we.createNode(e,t,41471,0);return i.link=r,i},readlink(e){if(!Be.isLink(e.mode))throw new Be.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,i,n){var s=e.node.contents;if(n>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-n,i);if(a>8&&s.subarray)t.set(s.subarray(n,n+a),r);else for(var o=0;o0||r+t(we.stream_ops.write(e,t,0,i,r,!1),0)}},Se=(e,t,r,i)=>{var n=i?"":`al ${e}`;a(e,(r=>{F(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),n&&W()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),n&&V()},Ee=(e,t,r,i,n,s)=>Be.createDataFile(e,t,r,i,n,s),Ue=n.preloadPlugins||[],xe=(e,t,r,i)=>{"undefined"!=typeof Browser&&Browser.init();var n=!1;return Ue.forEach((s=>{n||s.canHandle(t)&&(s.handle(e,t,r,i),n=!0)})),n},Ae=(e,t,r,i,n,s,a,o,l,d)=>{var u=t?he.resolve(le.join2(e,t)):e;function h(r){function h(r){d&&d(),o||Ee(e,t,r,i,n,l),s&&s(),W()}xe(r,u,h,(()=>{a&&a(),W()}))||h(r)}V(),"string"==typeof r?Se(r,(e=>h(e)),a):h(r)},Te=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Ce=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Be={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=he.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new Be.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),i=Be.root,n="/",s=0;s40)throw new Be.ErrnoError(32)}}return{path:n,node:i}},getPath(e){for(var t;;){if(Be.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,i=0;i>>0)%Be.nameTable.length},hashAddNode(e){var t=Be.hashName(e.parent.id,e.name);e.name_next=Be.nameTable[t],Be.nameTable[t]=e},hashRemoveNode(e){var t=Be.hashName(e.parent.id,e.name);if(Be.nameTable[t]===e)Be.nameTable[t]=e.name_next;else for(var r=Be.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Be.mayLookup(e);if(r)throw new Be.ErrnoError(r,e);for(var i=Be.hashName(e.id,t),n=Be.nameTable[i];n;n=n.name_next){var s=n.name;if(n.parent.id===e.id&&s===t)return n}return Be.lookup(e,t)},createNode(e,t,r,i){var n=new Be.FSNode(e,t,r,i);return Be.hashAddNode(n),n},destroyNode(e){Be.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Be.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=Be.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{Be.lookupNode(e,t);return 20}catch(e){}return Be.nodePermissions(e,"wx")},mayDelete(e,t,r){var i;try{i=Be.lookupNode(e,t)}catch(e){return e.errno}var n=Be.nodePermissions(e,"wx");if(n)return n;if(r){if(!Be.isDir(i.mode))return 54;if(Be.isRoot(i)||Be.getPath(i)===Be.cwd())return 10}else if(Be.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?Be.isLink(e.mode)?32:Be.isDir(e.mode)&&("r"!==Be.flagsToPermissionString(t)||512&t)?31:Be.nodePermissions(e,Be.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Be.MAX_OPEN_FDS;e++)if(!Be.streams[e])return e;throw new Be.ErrnoError(33)},getStreamChecked(e){var t=Be.getStream(e);if(!t)throw new Be.ErrnoError(8);return t},getStream:e=>Be.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Be.FSStream||(Be.FSStream=function(){this.shared={}},Be.FSStream.prototype={},Object.defineProperties(Be.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Be.FSStream,e),-1==t&&(t=Be.nextfd()),e.fd=t,Be.streams[t]=e,e},closeStream(e){Be.streams[e]=null},chrdev_stream_ops:{open(e){var t=Be.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Be.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Be.devices[e]={stream_ops:t}},getDevice:e=>Be.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Be.syncFSRequests++,Be.syncFSRequests>1&&w(`warning: ${Be.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Be.getMounts(Be.root.mount),i=0;function n(e){return Be.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,n(e));++i>=r.length&&n(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var i,n="/"===r,s=!r;if(n&&Be.root)throw new Be.ErrnoError(10);if(!n&&!s){var a=Be.lookupPath(r,{follow_mount:!1});if(r=a.path,i=a.node,Be.isMountpoint(i))throw new Be.ErrnoError(10);if(!Be.isDir(i.mode))throw new Be.ErrnoError(54)}var o={type:e,opts:t,mountpoint:r,mounts:[]},l=e.mount(o);return l.mount=o,o.root=l,n?Be.root=l:i&&(i.mounted=o,i.mount&&i.mount.mounts.push(o)),l},unmount(e){var t=Be.lookupPath(e,{follow_mount:!1});if(!Be.isMountpoint(t.node))throw new Be.ErrnoError(28);var r=t.node,i=r.mounted,n=Be.getMounts(i);Object.keys(Be.nameTable).forEach((e=>{for(var t=Be.nameTable[e];t;){var r=t.name_next;n.includes(t.mount)&&Be.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(i);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var i=Be.lookupPath(e,{parent:!0}).node,n=le.basename(e);if(!n||"."===n||".."===n)throw new Be.ErrnoError(28);var s=Be.mayCreate(i,n);if(s)throw new Be.ErrnoError(s);if(!i.node_ops.mknod)throw new Be.ErrnoError(63);return i.node_ops.mknod(i,n,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Be.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Be.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),i="",n=0;n(void 0===r&&(r=t,t=438),t|=8192,Be.mknod(e,t,r)),symlink(e,t){if(!he.resolve(e))throw new Be.ErrnoError(44);var r=Be.lookupPath(t,{parent:!0}).node;if(!r)throw new Be.ErrnoError(44);var i=le.basename(t),n=Be.mayCreate(r,i);if(n)throw new Be.ErrnoError(n);if(!r.node_ops.symlink)throw new Be.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename(e,t){var r,i,n=le.dirname(e),s=le.dirname(t),a=le.basename(e),o=le.basename(t);if(r=Be.lookupPath(e,{parent:!0}).node,i=Be.lookupPath(t,{parent:!0}).node,!r||!i)throw new Be.ErrnoError(44);if(r.mount!==i.mount)throw new Be.ErrnoError(75);var l,d=Be.lookupNode(r,a),u=he.relative(e,s);if("."!==u.charAt(0))throw new Be.ErrnoError(28);if("."!==(u=he.relative(t,n)).charAt(0))throw new Be.ErrnoError(55);try{l=Be.lookupNode(i,o)}catch(e){}if(d!==l){var h=Be.isDir(d.mode),c=Be.mayDelete(r,a,h);if(c)throw new Be.ErrnoError(c);if(c=l?Be.mayDelete(i,o,h):Be.mayCreate(i,o))throw new Be.ErrnoError(c);if(!r.node_ops.rename)throw new Be.ErrnoError(63);if(Be.isMountpoint(d)||l&&Be.isMountpoint(l))throw new Be.ErrnoError(10);if(i!==r&&(c=Be.nodePermissions(r,"w")))throw new Be.ErrnoError(c);Be.hashRemoveNode(d);try{r.node_ops.rename(d,i,o)}catch(e){throw e}finally{Be.hashAddNode(d)}}},rmdir(e){var t=Be.lookupPath(e,{parent:!0}).node,r=le.basename(e),i=Be.lookupNode(t,r),n=Be.mayDelete(t,r,!0);if(n)throw new Be.ErrnoError(n);if(!t.node_ops.rmdir)throw new Be.ErrnoError(63);if(Be.isMountpoint(i))throw new Be.ErrnoError(10);t.node_ops.rmdir(t,r),Be.destroyNode(i)},readdir(e){var t=Be.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Be.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Be.lookupPath(e,{parent:!0}).node;if(!t)throw new Be.ErrnoError(44);var r=le.basename(e),i=Be.lookupNode(t,r),n=Be.mayDelete(t,r,!1);if(n)throw new Be.ErrnoError(n);if(!t.node_ops.unlink)throw new Be.ErrnoError(63);if(Be.isMountpoint(i))throw new Be.ErrnoError(10);t.node_ops.unlink(t,r),Be.destroyNode(i)},readlink(e){var t=Be.lookupPath(e).node;if(!t)throw new Be.ErrnoError(44);if(!t.node_ops.readlink)throw new Be.ErrnoError(28);return he.resolve(Be.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Be.lookupPath(e,{follow:!t}).node;if(!r)throw new Be.ErrnoError(44);if(!r.node_ops.getattr)throw new Be.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Be.stat(e,!0),chmod(e,t,r){var i;"string"==typeof e?i=Be.lookupPath(e,{follow:!r}).node:i=e;if(!i.node_ops.setattr)throw new Be.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod(e,t){Be.chmod(e,t,!0)},fchmod(e,t){var r=Be.getStreamChecked(e);Be.chmod(r.node,t)},chown(e,t,r,i){var n;"string"==typeof e?n=Be.lookupPath(e,{follow:!i}).node:n=e;if(!n.node_ops.setattr)throw new Be.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown(e,t,r){Be.chown(e,t,r,!0)},fchown(e,t,r){var i=Be.getStreamChecked(e);Be.chown(i.node,t,r)},truncate(e,t){if(t<0)throw new Be.ErrnoError(28);var r;"string"==typeof e?r=Be.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new Be.ErrnoError(63);if(Be.isDir(r.mode))throw new Be.ErrnoError(31);if(!Be.isFile(r.mode))throw new Be.ErrnoError(28);var i=Be.nodePermissions(r,"w");if(i)throw new Be.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Be.getStreamChecked(e);if(0==(2097155&r.flags))throw new Be.ErrnoError(28);Be.truncate(r.node,t)},utime(e,t,r){var i=Be.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Be.ErrnoError(44);var i;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Te(t):t)?4095&r|32768:0,"object"==typeof e)i=e;else{e=le.normalize(e);try{i=Be.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(i){if(128&t)throw new Be.ErrnoError(20)}else i=Be.mknod(e,r,0),s=!0;if(!i)throw new Be.ErrnoError(44);if(Be.isChrdev(i.mode)&&(t&=-513),65536&t&&!Be.isDir(i.mode))throw new Be.ErrnoError(54);if(!s){var a=Be.mayOpen(i,t);if(a)throw new Be.ErrnoError(a)}512&t&&!s&&Be.truncate(i,0),t&=-131713;var o=Be.createStream({node:i,path:Be.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return o.stream_ops.open&&o.stream_ops.open(o),!n.logReadFiles||1&t||(Be.readFiles||(Be.readFiles={}),e in Be.readFiles||(Be.readFiles[e]=1)),o},close(e){if(Be.isClosed(e))throw new Be.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Be.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Be.isClosed(e))throw new Be.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Be.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Be.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,i,n){if(i<0||n<0)throw new Be.ErrnoError(28);if(Be.isClosed(e))throw new Be.ErrnoError(8);if(1==(2097155&e.flags))throw new Be.ErrnoError(8);if(Be.isDir(e.node.mode))throw new Be.ErrnoError(31);if(!e.stream_ops.read)throw new Be.ErrnoError(28);var s=void 0!==n;if(s){if(!e.seekable)throw new Be.ErrnoError(70)}else n=e.position;var a=e.stream_ops.read(e,t,r,i,n);return s||(e.position+=a),a},write(e,t,r,i,n,s){if(i<0||n<0)throw new Be.ErrnoError(28);if(Be.isClosed(e))throw new Be.ErrnoError(8);if(0==(2097155&e.flags))throw new Be.ErrnoError(8);if(Be.isDir(e.node.mode))throw new Be.ErrnoError(31);if(!e.stream_ops.write)throw new Be.ErrnoError(28);e.seekable&&1024&e.flags&&Be.llseek(e,0,2);var a=void 0!==n;if(a){if(!e.seekable)throw new Be.ErrnoError(70)}else n=e.position;var o=e.stream_ops.write(e,t,r,i,n,s);return a||(e.position+=o),o},allocate(e,t,r){if(Be.isClosed(e))throw new Be.ErrnoError(8);if(t<0||r<=0)throw new Be.ErrnoError(28);if(0==(2097155&e.flags))throw new Be.ErrnoError(8);if(!Be.isFile(e.node.mode)&&!Be.isDir(e.node.mode))throw new Be.ErrnoError(43);if(!e.stream_ops.allocate)throw new Be.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,i,n){if(0!=(2&i)&&0==(2&n)&&2!=(2097155&e.flags))throw new Be.ErrnoError(2);if(1==(2097155&e.flags))throw new Be.ErrnoError(2);if(!e.stream_ops.mmap)throw new Be.ErrnoError(43);return e.stream_ops.mmap(e,t,r,i,n)},msync:(e,t,r,i,n)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,n):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Be.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,i=Be.open(e,t.flags),n=Be.stat(e).size,s=new Uint8Array(n);return Be.read(i,s,0,n,0),"utf8"===t.encoding?r=fe(s,0):"binary"===t.encoding&&(r=s),Be.close(i),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var i=Be.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(me(t)+1),s=_e(t,n,0,n.length);Be.write(i,n,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Be.write(i,t,0,t.byteLength,void 0,r.canOwn)}Be.close(i)},cwd:()=>Be.currentPath,chdir(e){var t=Be.lookupPath(e,{follow:!0});if(null===t.node)throw new Be.ErrnoError(44);if(!Be.isDir(t.node.mode))throw new Be.ErrnoError(54);var r=Be.nodePermissions(t.node,"x");if(r)throw new Be.ErrnoError(r);Be.currentPath=t.path},createDefaultDirectories(){Be.mkdir("/tmp"),Be.mkdir("/home"),Be.mkdir("/home/web_user")},createDefaultDevices(){Be.mkdir("/dev"),Be.registerDevice(Be.makedev(1,3),{read:()=>0,write:(e,t,r,i,n)=>i}),Be.mkdev("/dev/null",Be.makedev(1,3)),ve.register(Be.makedev(5,0),ve.default_tty_ops),ve.register(Be.makedev(6,0),ve.default_tty1_ops),Be.mkdev("/dev/tty",Be.makedev(5,0)),Be.mkdev("/dev/tty1",Be.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ue(e).byteLength),e[--t]);Be.createDevice("/dev","random",r),Be.createDevice("/dev","urandom",r),Be.mkdir("/dev/shm"),Be.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Be.mkdir("/proc");var e=Be.mkdir("/proc/self");Be.mkdir("/proc/self/fd"),Be.mount({mount(){var t=Be.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,i=Be.getStreamChecked(r),n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return n.parent=n,n}},t}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?Be.createDevice("/dev","stdin",n.stdin):Be.symlink("/dev/tty","/dev/stdin"),n.stdout?Be.createDevice("/dev","stdout",null,n.stdout):Be.symlink("/dev/tty","/dev/stdout"),n.stderr?Be.createDevice("/dev","stderr",null,n.stderr):Be.symlink("/dev/tty1","/dev/stderr"),Be.open("/dev/stdin",0),Be.open("/dev/stdout",1),Be.open("/dev/stderr",1)},ensureErrnoError(){Be.ErrnoError||(Be.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Be.ErrnoError.prototype=new Error,Be.ErrnoError.prototype.constructor=Be.ErrnoError,[44].forEach((e=>{Be.genericErrors[e]=new Be.ErrnoError(e),Be.genericErrors[e].stack=""})))},staticInit(){Be.ensureErrnoError(),Be.nameTable=new Array(4096),Be.mount(we,{},"/"),Be.createDefaultDirectories(),Be.createDefaultDevices(),Be.createSpecialDirectories(),Be.filesystems={MEMFS:we}},init(e,t,r){Be.init.initialized=!0,Be.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=r||n.stderr,Be.createStandardStreams()},quit(){Be.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;n||(a=i);var o=this;o.setDataGetter((e=>{var t=e*a,n=(e+1)*a-1;if(n=Math.min(n,i-1),void 0===o.chunks[e]&&(o.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",r,!1),i!==a&&n.setRequestHeader("Range","bytes="+e+"-"+t),n.responseType="arraybuffer",n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+r+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):ge(n.responseText||"",!0)})(t,n)),void 0===o.chunks[e])throw new Error("doXHR failed!");return o.chunks[e]})),!s&&i||(a=i=1,i=this.getter(0).length,a=i,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!h)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new s;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var o={isDevice:!1,contents:a}}else o={isDevice:!1,url:r};var l=Be.createFile(e,t,o,i,n);o.contents?l.contents=o.contents:o.url&&(l.contents=null,l.url=o.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var d={};function u(e,t,r,i,n){var s=e.node.contents;if(n>=s.length)return 0;var a=Math.min(s.length-n,i);if(s.slice)for(var o=0;o{var t=l.stream_ops[e];d[e]=function(){return Be.forceLoadFile(l),t.apply(null,arguments)}})),d.read=(e,t,r,i,n)=>(Be.forceLoadFile(l),u(e,t,r,i,n)),d.mmap=(e,t,r,i,n)=>{Be.forceLoadFile(l);var s=be();if(!s)throw new Be.ErrnoError(48);return u(e,S,s,t,r),{ptr:s,allocated:!0}},l.stream_ops=d,l}},ke=(e,t)=>e?fe(E,e,t):"",Fe={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(le.isAbs(t))return t;var i;-100===e?i=Be.cwd():i=Fe.getStreamFromFD(e).path;if(0==t.length){if(!r)throw new Be.ErrnoError(44);return i}return le.join2(i,t)},doStat(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&le.normalize(t)!==le.normalize(Be.getPath(e.node)))return-54;throw e}A[r>>2]=i.dev,A[r+4>>2]=i.mode,T[r+8>>2]=i.nlink,A[r+12>>2]=i.uid,A[r+16>>2]=i.gid,A[r+20>>2]=i.rdev,K=[i.size>>>0,(q=i.size,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+24>>2]=K[0],A[r+28>>2]=K[1],A[r+32>>2]=4096,A[r+36>>2]=i.blocks;var n=i.atime.getTime(),s=i.mtime.getTime(),a=i.ctime.getTime();return K=[Math.floor(n/1e3)>>>0,(q=Math.floor(n/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+40>>2]=K[0],A[r+44>>2]=K[1],T[r+48>>2]=n%1e3*1e3,K=[Math.floor(s/1e3)>>>0,(q=Math.floor(s/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+56>>2]=K[0],A[r+60>>2]=K[1],T[r+64>>2]=s%1e3*1e3,K=[Math.floor(a/1e3)>>>0,(q=Math.floor(a/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+72>>2]=K[0],A[r+76>>2]=K[1],T[r+80>>2]=a%1e3*1e3,K=[i.ino>>>0,(q=i.ino,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+88>>2]=K[0],A[r+92>>2]=K[1],0},doMsync(e,t,r,i,n){if(!Be.isFile(t.node.mode))throw new Be.ErrnoError(43);if(2&i)return 0;var s=E.slice(e,e+r);Be.msync(t,s,n,r,i)},varargs:void 0,get(){var e=A[+Fe.varargs>>2];return Fe.varargs+=4,e},getp:()=>Fe.get(),getStr:e=>ke(e),getStreamFromFD:e=>Be.getStreamChecked(e)};function Pe(e,t,r){Fe.varargs=r;try{var i=Fe.getStreamFromFD(e);switch(t){case 0:if((n=Fe.get())<0)return-28;for(;Be.streams[n];)n++;return Be.createStream(i,n).fd;case 1:case 2:case 6:case 7:return 0;case 3:return i.flags;case 4:var n=Fe.get();return i.flags|=n,0;case 5:n=Fe.getp();return U[n+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return oe(28),-1}}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ie(e,t,r,i){Fe.varargs=i;try{t=Fe.getStr(t),t=Fe.calculateAt(e,t);var n=i?Fe.get():0;return Be.open(t,r,n).fd}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return-e.errno}}var De,Le,Re,ze=(e,t,r,i,n)=>{},Me=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);De=e},Oe=e=>{for(var t="",r=e;E[r];)t+=De[E[r++]];return t},$e={},Ne={},Ge={},He=e=>{throw new Le(e)},Ve=e=>{throw new Re(e)},We=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Ve("Mismatched type converter count");for(var n=0;n{Ne.hasOwnProperty(e)?n[t]=Ne[e]:(s.push(e),$e.hasOwnProperty(e)||($e[e]=[]),$e[e].push((()=>{n[t]=Ne[e],++a===s.length&&i(n)})))})),0===s.length&&i(n)};function je(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i=t.name;if(e||He(`type "${i}" must have a positive integer typeid pointer`),Ne.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;He(`Cannot register type '${i}' twice`)}if(Ne[e]=t,delete Ge[e],$e.hasOwnProperty(e)){var n=$e[e];delete $e[e],n.forEach((e=>e()))}}function Ye(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return je(e,t,r)}var qe,Ke=8,Xe=(e,t,r,i)=>{Ye(e,{name:t=Oe(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:Ke,readValueFromPointer:function(e){return this.fromWireType(E[e])},destructorFunction:null})},Ze=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Je=e=>{He(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},it=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=it(e,t,r.baseClass);return null===i?null:r.downcast(i)},nt={},st=()=>Object.keys(ht).length,at=()=>{var e=[];for(var t in ht)ht.hasOwnProperty(t)&&e.push(ht[t]);return e},ot=[],lt=()=>{for(;ot.length;){var e=ot.pop();e.$$.deleteScheduled=!1,e.delete()}},dt=e=>{qe=e,ot.length&&qe&&qe(lt)},ut=()=>{n.getInheritedInstanceCount=st,n.getLiveInheritedInstances=at,n.flushPendingDeletes=lt,n.setDelayFunction=dt},ht={},ct=(e,t)=>{for(void 0===t&&He("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=ct(e,t),ht[t]),pt=(e,t)=>(t.ptrType&&t.ptr||Ve("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&Ve("Both smartPtrType and smartPtr must be specified"),t.count={value:1},_t(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function n(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,a=this.registeredClass.getActualType(t),o=nt[a];if(!o)return n.call(this);s=this.isConst?o.constPointerType:o.pointerType;var l=it(t,this.registeredClass,s.registeredClass);return null===l?n.call(this):this.isSmartPointer?pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var _t=e=>"undefined"==typeof FinalizationRegistry?(_t=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),_t=e=>{var t=e.$$;if(!!t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),_t(e)),gt=()=>{Object.assign(yt.prototype,{isAliasOf(e){if(!(this instanceof yt))return!1;if(!(e instanceof yt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)n=i.upcast(n),i=i.baseClass;return t===i&&r===n},clone(){if(this.$$.ptr||Je(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=_t(Object.create(Object.getPrototypeOf(this),{$$:{value:Ze(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),ot.push(this),1===ot.length&&qe&&qe(lt),this.$$.deleteScheduled=!0,this}})};function yt(){}var vt=48,bt=57,wt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=vt&&t<=bt?`_${e}`:e};function St(e,t){return{[e=wt(e)]:function(){return t.apply(this,arguments)}}[e]}var Et=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||He(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}},Ut=(e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&He(`Cannot register public name '${e}' twice`),Et(n,e,e),n.hasOwnProperty(r)&&He(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))};function xt(e,t,r,i,n,s,a,o){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=n,this.getActualType=s,this.upcast=a,this.downcast=o,this.pureVirtualFunctions=[]}var At=(e,t,r)=>{for(;t!==r;)t.upcast||He(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Tt(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${or(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Ct(e,t){var r;if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||He(`Cannot pass "${or(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=At(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&He("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var n=t.clone();r=this.rawShare(r,nr.toHandle((()=>n.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:He("Unsupporting sharing policy")}return r}function Bt(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${or(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function kt(e){return this.fromWireType(T[e>>2])}var Ft=()=>{Object.assign(Pt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Ke,readValueFromPointer:kt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Pt(e,t,r,i,n,s,a,o,l,d,u){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=n,this.pointeeType=s,this.sharingPolicy=a,this.rawGetPointee=o,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=u,n||void 0!==t.baseClass?this.toWireType=Ct:i?(this.toWireType=Tt,this.destructorFunction=null):(this.toWireType=Bt,this.destructorFunction=null)}var It,Dt,Lt=(e,t,r)=>{n.hasOwnProperty(e)||Ve("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},Rt=(e,t,r)=>{var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)},zt=[],Mt=e=>{var t=zt[e];return t||(e>=zt.length&&(zt.length=e+1),zt[e]=t=It.get(e)),t},Ot=(e,t,r)=>e.includes("j")?Rt(e,t,r):Mt(t).apply(null,r),$t=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Ot(e,t,r)}},Nt=(e,t)=>{var r=(e=Oe(e)).includes("j")?$t(e,t):Mt(t);return"function"!=typeof r&&He(`unknown function pointer with signature ${e}: ${t}`),r},Gt=(e,t)=>{var r=St(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Ht=e=>{var t=si(e),r=Oe(t);return ii(t),r},Vt=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||Ne[t]||(Ge[t]?Ge[t].forEach(e):(r.push(t),i[t]=!0))})),new Dt(`${e}: `+r.map(Ht).join([", "]))},Wt=(e,t,r,i,n,s,a,o,l,d,u,h,c)=>{u=Oe(u),s=Nt(n,s),o&&(o=Nt(a,o)),d&&(d=Nt(l,d)),c=Nt(h,c);var f=wt(u);Ut(f,(function(){Vt(`Cannot construct ${u} due to unbound types`,[i])})),We([e,t,r],i?[i]:[],(function(t){var r,n;t=t[0],n=i?(r=t.registeredClass).instancePrototype:yt.prototype;var a=St(f,(function(){if(Object.getPrototypeOf(this)!==l)throw new Le("Use 'new' to construct "+u);if(void 0===h.constructor_body)throw new Le(u+" has no accessible constructor");var e=h.constructor_body[arguments.length];if(void 0===e)throw new Le(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(h.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(n,{constructor:{value:a}});a.prototype=l;var h=new xt(u,a,l,c,r,s,o,d);h.baseClass&&(void 0===h.baseClass.__derivedClasses&&(h.baseClass.__derivedClasses=[]),h.baseClass.__derivedClasses.push(h));var p=new Pt(u,h,!0,!1,!1),m=new Pt(u+"*",h,!1,!1,!1),_=new Pt(u+" const*",h,!1,!0,!1);return nt[e]={pointerType:m,constPointerType:_},Lt(f,a),[p,m,_]}))},jt=(e,t)=>{for(var r=[],i=0;i>2]);return r},Yt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function qt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=St(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,n=e.apply(i,t);return n instanceof Object?n:i}function Kt(e,t,r,i,n,s){var a=t.length;a<2&&He("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==t[1]&&null!==r,l=!1,d=1;d0?", ":"")+c),f+=(u||s?"var rv = ":"")+"invoker(fn"+(c.length>0?", ":"")+c+");\n",l)f+="runDestructors(destructors);\n";else for(d=o?1:2;d{var a=jt(t,r);n=Nt(i,n),We([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Le(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Vt(`Cannot construct ${e.name} due to unbound types`,a)},We([],a,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Kt(r,i,null,n,s),[]))),[]}))},Zt=(e,t,r,i,n,s,a,o,l)=>{var d=jt(r,i);t=Oe(t),s=Nt(n,s),We([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function n(){Vt(`Cannot call ${i} due to unbound types`,d)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),o&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,h=u[t];return void 0===h||void 0===h.overloadTable&&h.className!==e.name&&h.argCount===r-2?(n.argCount=r-2,n.className=e.name,u[t]=n):(Et(u,t,i),u[t].overloadTable[r-2]=n),We([],d,(function(n){var o=Kt(i,n,e,s,a,l);return void 0===u[t].overloadTable?(o.argCount=r-2,u[t]=o):u[t].overloadTable[r-2]=o,[]})),[]}))};function Jt(){Object.assign(Qt.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Qt(){this.allocated=[void 0],this.freelist=[]}var er=new Qt,tr=e=>{e>=er.reserved&&0==--er.get(e).refcount&&er.free(e)},rr=()=>{for(var e=0,t=er.reserved;t{er.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),er.reserved=er.allocated.length,n.count_emval_handles=rr},nr={toValue:e=>(e||He("Cannot use deleted val. handle = "+e),er.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return er.allocate({refcount:1,value:e})}}};function sr(e){return this.fromWireType(A[e>>2])}var ar=(e,t)=>{Ye(e,{name:t=Oe(t),fromWireType:e=>{var t=nr.toValue(e);return tr(e),t},toWireType:(e,t)=>nr.toHandle(t),argPackAdvance:Ke,readValueFromPointer:sr,destructorFunction:null})},or=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},lr=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(C[e>>2])};case 8:return function(e){return this.fromWireType(B[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},dr=(e,t,r)=>{Ye(e,{name:t=Oe(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Ke,readValueFromPointer:lr(t,r),destructorFunction:null})},ur=(e,t,r)=>{switch(t){case 1:return r?e=>S[e>>0]:e=>E[e>>0];case 2:return r?e=>U[e>>1]:e=>x[e>>1];case 4:return r?e=>A[e>>2]:e=>T[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},hr=(e,t,r,i,n)=>{t=Oe(t);var s=e=>e;if(0===i){var a=32-8*r;s=e=>e<>>a}var o=t.includes("unsigned");Ye(e,{name:t,fromWireType:s,toWireType:o?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Ke,readValueFromPointer:ur(t,r,0!==i),destructorFunction:null})},cr=(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=T[e>>2],r=T[e+4>>2];return new i(S.buffer,r,t)}Ye(e,{name:r=Oe(r),fromWireType:n,argPackAdvance:Ke,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},fr=(e,t,r)=>_e(e,E,t,r),pr=(e,t)=>{var r="std::string"===(t=Oe(t));Ye(e,{name:t,fromWireType(e){var t,i=T[e>>2],n=e+4;if(r)for(var s=n,a=0;a<=i;++a){var o=n+a;if(a==i||0==E[o]){var l=ke(s,o-s);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),s=o+1}}else{var d=new Array(i);for(a=0;a>2]=i,r&&n)fr(t,a,i+1);else if(n)for(var o=0;o255&&(ii(a),He("String has UTF-16 code units that do not fit in 8 bits")),E[a+o]=l}else for(o=0;o{for(var r=e,i=r>>1,n=i+t/2;!(i>=n)&&x[i];)++i;if((r=i<<1)-e>32&&mr)return mr.decode(E.subarray(e,r));for(var s="",a=0;!(a>=t/2);++a){var o=U[e+2*a>>1];if(0==o)break;s+=String.fromCharCode(o)}return s},gr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=a,t+=2}return U[t>>1]=0,t-i},yr=e=>2*e.length,vr=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var n=A[e+4*r>>2];if(0==n)break;if(++r,n>=65536){var s=n-65536;i+=String.fromCharCode(55296|s>>10,56320|1023&s)}else i+=String.fromCharCode(n)}return i},br=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,s=0;s=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++s);if(A[t>>2]=a,(t+=4)+4>n)break}return A[t>>2]=0,t-i},wr=e=>{for(var t=0,r=0;r=55296&&i<=57343&&++r,t+=4}return t},Sr=(e,t,r)=>{var i,n,s,a,o;r=Oe(r),2===t?(i=_r,n=gr,a=yr,s=()=>x,o=1):4===t&&(i=vr,n=br,a=wr,s=()=>T,o=2),Ye(e,{name:r,fromWireType:e=>{for(var r,n=T[e>>2],a=s(),l=e+4,d=0;d<=n;++d){var u=e+4+d*t;if(d==n||0==a[u>>o]){var h=i(l,u-l);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),l=u+t}}return ii(e),r},toWireType:(e,i)=>{"string"!=typeof i&&He(`Cannot pass non-string to C++ string type ${r}`);var s=a(i),l=oi(4+s+t);return T[l>>2]=s>>o,n(i,l+4,s+t),null!==e&&e.push(ii,l),l},argPackAdvance:Ke,readValueFromPointer:sr,destructorFunction(e){ii(e)}})},Er=(e,t)=>{Ye(e,{isVoid:!0,name:t=Oe(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Ur={},xr=e=>{var t=Ur[e];return void 0===t?Oe(e):t},Ar=[],Tr=(e,t,r,i)=>{(e=Ar[e])(t=nr.toValue(t),r=xr(r),null,i)},Cr=e=>{var t=Ar.length;return Ar.push(e),t},Br=(e,t)=>{var r=Ne[e];return void 0===r&&He(t+" has unknown type "+Ht(e)),r},kr=(e,t)=>{for(var r=new Array(e),i=0;i>2],"parameter "+i);return r},Fr={},Pr=(e,t)=>{var r=kr(e,t),i=r[0],n=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",s=Fr[n];if(void 0!==s)return s;for(var a=["retType"],o=[i],l="",d=0;dt+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Dr=()=>{j("")},Lr=()=>Date.now(),Rr=(e,t,r)=>E.copyWithin(e,t,t+r),zr=e=>{j("OOM")},Mr=e=>{E.length,zr()},Or={},$r=()=>d||"./this.program",Nr=()=>{if(!Nr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:$r()};for(var t in Or)void 0===Or[t]?delete e[t]:e[t]=Or[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Nr.strings=r}return Nr.strings},Gr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);S[t>>0]=0},Hr=(e,t)=>{var r=0;return Nr().forEach(((i,n)=>{var s=t+r;T[e+4*n>>2]=s,Gr(i,s),r+=i.length+1})),0},Vr=(e,t)=>{var r=Nr();T[e>>2]=r.length;var i=0;return r.forEach((e=>i+=e.length+1)),T[t>>2]=i,0};function Wr(e){try{var t=Fe.getStreamFromFD(e);return Be.close(t),0}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return e.errno}}function jr(e,t){try{var r=Fe.getStreamFromFD(e),i=r.tty?2:Be.isDir(r.mode)?3:Be.isLink(r.mode)?7:4;return S[t>>0]=i,U[t+2>>1]=0,K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[t+8>>2]=K[0],A[t+12>>2]=K[1],K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[t+16>>2]=K[0],A[t+20>>2]=K[1],0}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return e.errno}}var Yr=(e,t,r,i)=>{for(var n=0,s=0;s>2],o=T[t+4>>2];t+=8;var l=Be.read(e,S,a,o,i);if(l<0)return-1;if(n+=l,l>2]=s,0}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return e.errno}}function Kr(e,t,r,i,n){var s=Ir(t,r);try{if(isNaN(s))return 61;var a=Fe.getStreamFromFD(e);return Be.llseek(a,s,i),K=[a.position>>>0,(q=a.position,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[n>>2]=K[0],A[n+4>>2]=K[1],a.getdents&&0===s&&0===i&&(a.getdents=null),0}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return e.errno}}var Xr=(e,t,r,i)=>{for(var n=0,s=0;s>2],o=T[t+4>>2];t+=8;var l=Be.write(e,S,a,o,i);if(l<0)return-1;n+=l,void 0!==i&&(i+=l)}return n};function Zr(e,t,r,i){try{var n=Fe.getStreamFromFD(e),s=Xr(n,t,r);return T[i>>2]=s,0}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return e.errno}}var Jr=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Be.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Qr=365,ei=146;Object.defineProperties(Jr.prototype,{read:{get:function(){return(this.mode&Qr)===Qr},set:function(e){e?this.mode|=Qr:this.mode&=~Qr}},write:{get:function(){return(this.mode&ei)===ei},set:function(e){e?this.mode|=ei:this.mode&=~ei}},isFolder:{get:function(){return Be.isDir(this.mode)}},isDevice:{get:function(){return Be.isChrdev(this.mode)}}}),Be.FSNode=Jr,Be.createPreloadedFile=Ae,Be.staticInit(),Me(),Le=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Re=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},gt(),ut(),Ft(),Dt=n.UnboundTypeError=Gt(Error,"UnboundTypeError"),Jt(),ir();var ti={p:ae,B:Pe,v:Ie,t:ze,n:Xe,r:Wt,q:Xt,f:Zt,C:ar,m:dr,c:hr,b:cr,l:pr,h:Sr,o:Er,d:Tr,i:tr,e:Pr,a:Dr,g:Lr,z:Rr,u:Mr,x:Hr,y:Vr,k:Wr,w:jr,A:qr,s:Kr,j:Zr},ri=ie(),ii=e=>(ii=ri.F)(e),ni=()=>(ni=ri.H)(),si=e=>(si=ri.I)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=ri.J)();var ai,oi=e=>(oi=ri.K)(e),li=e=>(li=ri.M)(e);function di(){function e(){ai||(ai=!0,n.calledRun=!0,k||(z(),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),M()))}G>0||(R(),G>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_viiijj=(e,t,r,i,s,a,o,l)=>(n.dynCall_viiijj=ri.N)(e,t,r,i,s,a,o,l),n.dynCall_jij=(e,t,r,i)=>(n.dynCall_jij=ri.O)(e,t,r,i),n.dynCall_jii=(e,t,r)=>(n.dynCall_jii=ri.P)(e,t,r),n.dynCall_jiji=(e,t,r,i,s)=>(n.dynCall_jiji=ri.Q)(e,t,r,i,s),H=function e(){ai||di(),ai||(H=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return di(),t.ready}})(),n=1e-6,s="undefined"!=typeof Float32Array?Float32Array:Array;function a(){var e=new s(16);return s!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var l,d=function(e,t,r,i,n,s,a){var o=1/(t-r),l=1/(i-n),d=1/(s-a);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*d,e[11]=0,e[12]=(t+r)*o,e[13]=(n+i)*l,e[14]=(a+s)*d,e[15]=1,e};function u(e,t,r){var i=new s(3);return i[0]=e,i[1]=t,i[2]=r,i}l=new s(3),s!=Float32Array&&(l[0]=0,l[1]=0,l[2]=0);var h=(e,t)=>{t&&e.pixelStorei(e.UNPACK_ALIGNMENT,1);const r=function(){const t=m(e.VERTEX_SHADER,"\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n "),r=m(e.FRAGMENT_SHADER,"\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),i=e.createProgram();if(e.attachShader(i,t),e.attachShader(i,r),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))return console.log("Unable to initialize the shader program: "+e.getProgramInfoLog(i)),null;return i}();let i={program:r,attribLocations:{vertexPosition:e.getAttribLocation(r,"aVertexPosition"),texturePosition:e.getAttribLocation(r,"aTexturePosition")},uniformLocations:{projectionMatrix:e.getUniformLocation(r,"uProjectionMatrix"),modelMatrix:e.getUniformLocation(r,"uModelMatrix"),viewMatrix:e.getUniformLocation(r,"uViewMatrix"),rgbatexture:e.getUniformLocation(r,"rgbaTexture"),ytexture:e.getUniformLocation(r,"yTexture"),utexture:e.getUniformLocation(r,"uTexture"),vtexture:e.getUniformLocation(r,"vTexture"),isyuv:e.getUniformLocation(r,"isyuv")}},s=function(){const t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e.STATIC_DRAW);var r=[];r=r.concat([0,1],[1,1],[1,0],[0,0]);const i=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,new Float32Array(r),e.STATIC_DRAW);const n=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{position:t,texPosition:i,indices:n}}(),l=p(),h=p(),c=p(),f=p();function p(){let t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function m(t,r){const i=e.createShader(t);return e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)?i:(console.log("An error occurred compiling the shaders: "+e.getShaderInfoLog(i)),e.deleteShader(i),null)}function _(t,r){e.viewport(0,0,t,r),e.clearColor(0,0,0,0),e.clearDepth(1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT);const l=a();d(l,-1,1,-1,1,.1,100);const p=a();o(p);const m=a();!function(e,t,r,i){var s,a,l,d,u,h,c,f,p,m,_=t[0],g=t[1],y=t[2],v=i[0],b=i[1],w=i[2],S=r[0],E=r[1],U=r[2];Math.abs(_-S)>1,(1&r)<<7|i<<3])}function lt(e){return dt(e)&&e[1]===Ke}function dt(e){return e[0]>>4===Be}at((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},r=e.exports,i=function(){for(var e,r=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,n=r.length,s={};i{if(n=i,"[object Number]"!==Object.prototype.toString.call(n))return;var n;t+=i;const s=ft(),a=s-r;a>=1e3&&(e(t/a*1e3),r=s,t=0)}}(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();function mt(e){let t=e.subarray(1,4),r="avc1.";for(let e=0;e<3;e++){let i=t[e].toString(16);i.length<2&&(i="0"+i),r+=i}return{codec:r,description:e}}function _t(e){return null==e}function gt(e){return!_t(e)}function yt(e){return"function"==typeof e}function vt(e){let t=null,r=31&e[0];return r!==Ie&&r!==De||(t=Te),t||(r=(126&e[0])>>1,r!==Oe&&r!==$e&&r!==Ne||(t=Ce)),t}function bt(){return"undefined"!=typeof WritableStream}function wt(e){e.close()}function St(e,t){t&&(e=e.filter((e=>e.type&&e.type===t)));let r=e[0],i=null,n=1;if(e.length>0){let t=e[1];t&&t.ts-r.ts>1e5&&(r=t,n=2)}if(r)for(let s=n;s=1e3){e[s-1].ts-r.ts<1e3&&(i=s+1)}}}return i}function Et(e){return e.ok&&e.status>=200&&e.status<=299}function Ut(){return function(e){let t="";if("object"==typeof e)try{t=JSON.stringify(e),t=JSON.parse(t)}catch(r){t=e}else t=e;return t}(E)}function xt(e){return e[0]>>4===Xe&&e[1]===Ke}function At(e){return!0===e||"true"===e}function Tt(e){return!0!==e&&"true"!==e}var Ct=function(e,t,r,i){return new(r||(r=Promise))((function(n,s){function a(e){try{l(i.next(e))}catch(e){s(e)}}function o(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,o)}l((i=i.apply(e,t||[])).next())}))};const Bt=Symbol(32),kt=Symbol(16),Ft=Symbol(8);class Pt{constructor(e){this.g=e,this.consumed=0,e&&(this.need=e.next().value)}setG(e){this.g=e,this.demand(e.next().value,!0)}consume(){this.buffer&&this.consumed&&(this.buffer.copyWithin(0,this.consumed),this.buffer=this.buffer.subarray(0,this.buffer.length-this.consumed),this.consumed=0)}demand(e,t){return t&&this.consume(),this.need=e,this.flush()}read(e){return Ct(this,void 0,void 0,(function*(){return this.lastReadPromise&&(yield this.lastReadPromise),this.lastReadPromise=new Promise(((t,r)=>{var i;this.reject=r,this.resolve=e=>{delete this.lastReadPromise,delete this.resolve,delete this.need,t(e)};this.demand(e,!0)||null===(i=this.pull)||void 0===i||i.call(this,e)}))}))}readU32(){return this.read(Bt)}readU16(){return this.read(kt)}readU8(){return this.read(Ft)}close(){var e;this.g&&this.g.return(),this.buffer&&this.buffer.subarray(0,0),null===(e=this.reject)||void 0===e||e.call(this,new Error("EOF")),delete this.lastReadPromise}flush(){if(!this.buffer||!this.need)return;let e=null;const t=this.buffer.subarray(this.consumed);let r=0;const i=e=>t.length<(r=e);if("number"==typeof this.need){if(i(this.need))return;e=t.subarray(0,r)}else if(this.need===Bt){if(i(4))return;e=t[0]<<24|t[1]<<16|t[2]<<8|t[3]}else if(this.need===kt){if(i(2))return;e=t[0]<<8|t[1]}else if(this.need===Ft){if(i(1))return;e=t[0]}else if("buffer"in this.need){if("byteOffset"in this.need){if(i(this.need.byteLength-this.need.byteOffset))return;new Uint8Array(this.need.buffer,this.need.byteOffset).set(t.subarray(0,r)),e=this.need}else if(this.g)return void this.g.throw(new Error("Unsupported type"))}else{if(i(this.need.byteLength))return;new Uint8Array(this.need).set(t.subarray(0,r)),e=this.need}return this.consumed+=r,this.g?this.demand(this.g.next(e).value,!0):this.resolve&&this.resolve(e),e}write(e){if(e instanceof Uint8Array?this.malloc(e.length).set(e):"buffer"in e?this.malloc(e.byteLength).set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):this.malloc(e.byteLength).set(new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this.pull=e));this.flush()}writeU32(e){this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){this.malloc(2).set([e>>8&255,255&e]),this.flush()}writeU8(e){this.malloc(1)[0]=e,this.flush()}malloc(e){if(this.buffer){const t=this.buffer.length,r=t+e;if(r<=this.buffer.buffer.byteLength-this.buffer.byteOffset)this.buffer=new Uint8Array(this.buffer.buffer,this.buffer.byteOffset,r);else{const e=new Uint8Array(r);e.set(this.buffer),this.buffer=e}return this.buffer.subarray(t,r)}return this.buffer=new Uint8Array(e),this.buffer}}Pt.U32=Bt,Pt.U16=kt,Pt.U8=Ft;class It{constructor(e){this.log=function(t){if(e._opt.debug&&e._opt.debugLevel==v){const s=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n1?r-1:0),n=1;n1?i-1:0),s=1;s32&&console.error("ExpGolomb: readBits() bits exceeded max 32bits!"),e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let r=e-this._current_word_bits_left;this._fillCurrentWord();let i=Math.min(r,this._current_word_bits_left),n=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,t=t<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}class Lt{static _ebsp2rbsp(e){let t=e,r=t.byteLength,i=new Uint8Array(r),n=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(i[n]=t[e],n++);return new Uint8Array(i.buffer,0,n)}static parseSPS(e){let t=Lt._ebsp2rbsp(e),r=new Dt(t);r.readByte();let i=r.readByte();r.readByte();let n=r.readByte();r.readUEG();let s=Lt.getProfileString(i),a=Lt.getLevelString(n),o=1,l=420,d=[0,420,422,444],u=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(o=r.readUEG(),3===o&&r.readBits(1),o<=3&&(l=d[o]),u=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool())){let e=3!==o?8:12;for(let t=0;t0&&e<16?(b=t[e-1],w=i[e-1]):255===e&&(b=r.readByte()<<8|r.readByte(),w=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){let e=r.readBits(32),t=r.readBits(32);E=r.readBool(),U=t,x=2*e,S=U/x}}let A=1;1===b&&1===w||(A=b/w);let T=0,C=0;if(0===o)T=1,C=2-m;else{T=3===o?1:2,C=(1===o?2:1)*(2-m)}let B=16*(f+1),k=16*(p+1)*(2-m);B-=(_+g)*T,k-=(y+v)*C;let F=Math.ceil(B*A);return r.destroy(),r=null,{profile_string:s,level_string:a,bit_depth:u,ref_frames:c,chroma_format:l,chroma_format_string:Lt.getChromaFormatString(l),frame_rate:{fixed:E,fps:S,fps_den:x,fps_num:U},sar_ratio:{width:b,height:w},codec_size:{width:B,height:k},present_size:{width:F,height:k}}}static parseSPS$2(e){let t=e.subarray(1,4),r="avc1.";for(let e=0;e<3;e++){let i=t[e].toString(16);i.length<2&&(i="0"+i),r+=i}let i=Lt._ebsp2rbsp(e),n=new Dt(i);n.readByte();let s=n.readByte();n.readByte();let a=n.readByte();n.readUEG();let o=Lt.getProfileString(s),l=Lt.getLevelString(a),d=1,u=420,h=[0,420,422,444],c=8,f=8;if((100===s||110===s||122===s||244===s||44===s||83===s||86===s||118===s||128===s||138===s||144===s)&&(d=n.readUEG(),3===d&&n.readBits(1),d<=3&&(u=h[d]),c=n.readUEG()+8,f=n.readUEG()+8,n.readBits(1),n.readBool())){let e=3!==d?8:12;for(let t=0;t0&&e<16?(E=t[e-1],U=r[e-1]):255===e&&(E=n.readByte()<<8|n.readByte(),U=n.readByte()<<8|n.readByte())}if(n.readBool()&&n.readBool(),n.readBool()&&(n.readBits(4),n.readBool()&&n.readBits(24)),n.readBool()&&(n.readUEG(),n.readUEG()),n.readBool()){let e=n.readBits(32),t=n.readBits(32);A=n.readBool(),T=t,C=2*e,x=T/C}}let B=1;1===E&&1===U||(B=E/U);let k=0,F=0;if(0===d)k=1,F=2-y;else{k=3===d?1:2,F=(1===d?2:1)*(2-y)}let P=16*(_+1),I=16*(g+1)*(2-y);P-=(v+b)*k,I-=(w+S)*F;let D=Math.ceil(P*B);return n.destroy(),n=null,{codec_mimetype:r,profile_idc:s,level_idc:a,profile_string:o,level_string:l,chroma_format_idc:d,bit_depth:c,bit_depth_luma:c,bit_depth_chroma:f,ref_frames:m,chroma_format:u,chroma_format_string:Lt.getChromaFormatString(u),frame_rate:{fixed:A,fps:x,fps_den:C,fps_num:T},sar_ratio:{width:E,height:U},codec_size:{width:P,height:I},present_size:{width:D,height:I}}}static _skipScalingList(e,t){let r=8,i=8,n=0;for(let s=0;s=this.buflen)return this.iserro=!0,0;this.iserro=!1,r=this.bufoff+e>8?8-this.bufoff:e,t<<=r,t+=this.buffer[this.bufpos]>>8-this.bufoff-r&255>>8-r,this.bufoff+=r,e-=r,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,r=this.bufoff,i=this.read(e);return this.bufpos=t,this.bufoff=r,i}read_golomb(){let e;for(e=0;0===this.read(1)&&!this.iserro;e++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(r,0),i.set(t.sps,4),t.sps=i}if(t.pps){const e=t.pps.byteLength,r=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(r,0),i.set(t.pps,4),t.pps=i}return t}function Mt(e){let{sps:t,pps:r}=e;const i=[23,0,0,0,0,1,66,0,30,255];i[0]=23,i[6]=t[1],i[7]=t[2],i[8]=t[3],i[10]=225,i[11]=t.byteLength>>8&255,i[12]=255&t.byteLength,i.push(...t,1,r.byteLength>>8&255,255&r.byteLength,...r);return new Uint8Array(i)}function Ot(e,t){let r=[];r[0]=t?23:39,r[1]=1,r[2]=0,r[3]=0,r[4]=0,r[5]=e.byteLength>>24&255,r[6]=e.byteLength>>16&255,r[7]=e.byteLength>>8&255,r[8]=255&e.byteLength;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function $t(e,t){let r=[];r[0]=t?23:39,r[1]=1,r[2]=0,r[3]=0,r[4]=0;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function Nt(e){return 31&e[0]}function Gt(e){return e===Re}function Ht(e){return!function(e){return e===Ie||e===De}(e)&&!Gt(e)}function Vt(e){return e===Le}function Wt(e){if(0===e.length)return!1;const t=Nt(e[0]);for(let r=1;r{let t=e,r=t.byteLength,i=new Uint8Array(r),n=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(i[n]=t[e],n++);return new Uint8Array(i.buffer,0,n)},Yt=e=>{switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}};function qt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function Kt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e.length<4)return;const r=e.length,i=[];let n,s=0;for(;s+t>>=8),s+=t,n){if(s+n>r)break;i.push(e.subarray(s,s+n)),s+=n}return i}function Xt(e){const t=e.byteLength,r=new Uint8Array(4);r[0]=t>>>24&255,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t;const i=new Uint8Array(t+4);return i.set(r,0),i.set(e,4),i}function Zt(e,t){let r=null;return t?e.length>=28&&(r=1+(3&e[26])):e.length>=12&&(r=1+(3&e[9])),r}function Jt(e){let t={width:0,height:0,profile:0,level:0};e=e.slice(5);do{let r={};if(e.length<23){console.warn("parseHEVCDecoderConfigurationRecord$2",`arrayBuffer.length ${e.length} < 23`);break}if(r.configurationVersion=e[0],1!=r.configurationVersion)break;r.general_profile_space=e[1]>>6&3,r.general_tier_flag=e[1]>>5&1,r.general_profile_idc=31&e[1],r.general_profile_compatibility_flags=e[2]<<24|e[3]<<16|e[4]<<8|e[5],r.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],r.general_constraint_indicator_flags=r.general_constraint_indicator_flags<<16|e[10]<<8|e[11],r.general_level_idc=e[12],r.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],r.parallelismType=3&e[15],r.chromaFormat=3&e[16],r.bitDepthLumaMinus8=7&e[17],r.bitDepthChromaMinus8=7&e[18],r.avgFrameRate=e[19]<<8|e[20],r.constantFrameRate=e[21]>>6&3,r.numTemporalLayers=e[21]>>3&7,r.temporalIdNested=e[21]>>2&1,r.lengthSizeMinusOne=3&e[21];let i=e[22],n=e.slice(23);for(let e=0;e0)for(let t=r;t<8;t++)e.read(2);i.sub_layer_profile_space=[],i.sub_layer_tier_flag=[],i.sub_layer_profile_idc=[],i.sub_layer_profile_compatibility_flag=[],i.sub_layer_progressive_source_flag=[],i.sub_layer_interlaced_source_flag=[],i.sub_layer_non_packed_constraint_flag=[],i.sub_layer_frame_only_constraint_flag=[],i.sub_layer_level_idc=[];for(let t=0;t{let t=jt(e),r=new Dt(t);return r.readByte(),r.readByte(),r.readBits(4),r.readBits(2),r.readBits(6),{num_temporal_layers:r.readBits(3)+1,temporal_id_nested:r.readBool()}})(t),a=(e=>{let t=jt(e),r=new Dt(t);r.readByte(),r.readByte();let i=0,n=0,s=0,a=0;r.readBits(4);let o=r.readBits(3);r.readBool();let l=r.readBits(2),d=r.readBool(),u=r.readBits(5),h=r.readByte(),c=r.readByte(),f=r.readByte(),p=r.readByte(),m=r.readByte(),_=r.readByte(),g=r.readByte(),y=r.readByte(),v=r.readByte(),b=r.readByte(),w=r.readByte(),S=[],E=[];for(let e=0;e0)for(let e=o;e<8;e++)r.readBits(2);for(let e=0;e1&&r.readSEG();for(let e=0;e0&&e<16?(D=t[e-1],L=i[e-1]):255===e&&(D=r.readBits(16),L=r.readBits(16))}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(3),r.readBool(),r.readBool()&&(r.readByte(),r.readByte(),r.readByte())),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool(),r.readBool(),r.readBool(),P=r.readBool(),P&&(i+=r.readUEG(),n+=r.readUEG(),s+=r.readUEG(),a+=r.readUEG()),r.readBool()&&(z=r.readBits(32),M=r.readBits(32),r.readBool()&&(r.readUEG(),r.readBool()))){let e=!1,t=!1,i=!1;e=r.readBool(),t=r.readBool(),(e||t)&&(i=r.readBool(),i&&(r.readByte(),r.readBits(5),r.readBool(),r.readBits(5)),r.readBits(4),r.readBits(4),i&&r.readBits(4),r.readBits(5),r.readBits(5),r.readBits(5));for(let n=0;n<=o;n++){let n=r.readBool();R=n;let s=!1,a=1;n||(s=r.readBool());let o=!1;if(s?r.readSEG():o=r.readBool(),o||(cpbcnt=r.readUEG()+1),e)for(let e=0;e{let t=jt(e),r=new Dt(t);r.readByte(),r.readByte(),r.readUEG(),r.readUEG(),r.readBool(),r.readBool(),r.readBits(3),r.readBool(),r.readBool(),r.readUEG(),r.readUEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool()&&r.readUEG(),r.readSEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool(),r.readBool();let i=r.readBool(),n=r.readBool(),s=1;return n&&i?s=0:n?s=3:i&&(s=2),{parallelismType:s}})(r);n=Object.assign(n,s,a,o);let l=23+(5+t.byteLength)+(5+i.byteLength)+(5+r.byteLength),d=new Uint8Array(l);d[0]=1,d[1]=(3&n.general_profile_space)<<6|(n.general_tier_flag?1:0)<<5|31&n.general_profile_idc,d[2]=n.general_profile_compatibility_flags_1||0,d[3]=n.general_profile_compatibility_flags_2||0,d[4]=n.general_profile_compatibility_flags_3||0,d[5]=n.general_profile_compatibility_flags_4||0,d[6]=n.general_constraint_indicator_flags_1||0,d[7]=n.general_constraint_indicator_flags_2||0,d[8]=n.general_constraint_indicator_flags_3||0,d[9]=n.general_constraint_indicator_flags_4||0,d[10]=n.general_constraint_indicator_flags_5||0,d[11]=n.general_constraint_indicator_flags_6||0,d[12]=60,d[13]=240|(3840&n.min_spatial_segmentation_idc)>>8,d[14]=255&n.min_spatial_segmentation_idc,d[15]=252|3&n.parallelismType,d[16]=252|3&n.chroma_format_idc,d[17]=248|7&n.bit_depth_luma_minus8,d[18]=248|7&n.bit_depth_chroma_minus8,d[19]=0,d[20]=0,d[21]=(3&n.constant_frame_rate)<<6|(7&n.num_temporal_layers)<<3|(n.temporal_id_nested?1:0)<<2|3,d[22]=3,d[23]=128|Oe,d[24]=0,d[25]=1,d[26]=(65280&t.byteLength)>>8,d[27]=(255&t.byteLength)>>0,d.set(t,28),d[23+(5+t.byteLength)+0]=128|$e,d[23+(5+t.byteLength)+1]=0,d[23+(5+t.byteLength)+2]=1,d[23+(5+t.byteLength)+3]=(65280&i.byteLength)>>8,d[23+(5+t.byteLength)+4]=(255&i.byteLength)>>0,d.set(i,23+(5+t.byteLength)+5),d[23+(5+t.byteLength+5+i.byteLength)+0]=128|Ne,d[23+(5+t.byteLength+5+i.byteLength)+1]=0,d[23+(5+t.byteLength+5+i.byteLength)+2]=1,d[23+(5+t.byteLength+5+i.byteLength)+3]=(65280&r.byteLength)>>8,d[23+(5+t.byteLength+5+i.byteLength)+4]=(255&r.byteLength)>>0,d.set(r,23+(5+t.byteLength+5+i.byteLength)+5);const u=[28,0,0,0,0],h=new Uint8Array(u.length+d.byteLength);return h.set(u,0),h.set(d,u.length),h}function tr(e,t){let r=[];r[0]=t?28:44,r[1]=1,r[2]=0,r[3]=0,r[4]=0,r[5]=e.byteLength>>24&255,r[6]=e.byteLength>>16&255,r[7]=e.byteLength>>8&255,r[8]=255&e.byteLength;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function rr(e,t){let r=[];r[0]=t?28:44,r[1]=1,r[2]=0,r[3]=0,r[4]=0;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function ir(e){return(126&e[0])>>1}function nr(e){return e===Ge}function sr(e){return!function(e){return e>=32&&e<=40}(e)}function ar(e){return e>=16&&e<=21}function or(e){if(0===e.length)return!1;const t=ir(e[0]);for(let r=1;r255)return!1;return!0}function ur(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!dr(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(lr(e.length)&&dr(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function hr(e){return new Uint8Array(e)}function cr(e,t,r,i,n){null==i&&null==n||(e=e.slice?e.slice(i,n):Array.prototype.slice.call(e,i,n)),t.set(e,r)}var fr,pr={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&i<224?(t.push(String.fromCharCode((31&i)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&i)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},mr=(fr="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+fr[15&i])}return t.join("")}}),_r={16:10,24:12,32:14},gr=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],yr=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],vr=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],br=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],wr=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],Sr=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],Er=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Ur=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],xr=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],Ar=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Tr=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Cr=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Br=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],kr=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Fr=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Pr(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=s[t],this._Kd[e-r][t%4]=s[t];for(var a,o=0,l=n;l>16&255]<<24^yr[a>>8&255]<<16^yr[255&a]<<8^yr[a>>24&255]^gr[o]<<24,o+=1,8!=n)for(t=1;t>8&255]<<8^yr[a>>16&255]<<16^yr[a>>24&255]<<24;for(t=n/2+1;t>2,u=l%4,this._Ke[d][u]=s[t],this._Kd[e-d][u]=s[t++],l++}for(var d=1;d>24&255]^Br[a>>16&255]^kr[a>>8&255]^Fr[255&a]},Ir.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],i=Pr(e),n=0;n<4;n++)i[n]^=this._Ke[0][n];for(var s=1;s>24&255]^wr[i[(n+1)%4]>>16&255]^Sr[i[(n+2)%4]>>8&255]^Er[255&i[(n+3)%4]]^this._Ke[s][n];i=r.slice()}var a,o=hr(16);for(n=0;n<4;n++)a=this._Ke[t][n],o[4*n]=255&(yr[i[n]>>24&255]^a>>24),o[4*n+1]=255&(yr[i[(n+1)%4]>>16&255]^a>>16),o[4*n+2]=255&(yr[i[(n+2)%4]>>8&255]^a>>8),o[4*n+3]=255&(yr[255&i[(n+3)%4]]^a);return o},Ir.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],i=Pr(e),n=0;n<4;n++)i[n]^=this._Kd[0][n];for(var s=1;s>24&255]^xr[i[(n+3)%4]>>16&255]^Ar[i[(n+2)%4]>>8&255]^Tr[255&i[(n+1)%4]]^this._Kd[s][n];i=r.slice()}var a,o=hr(16);for(n=0;n<4;n++)a=this._Kd[t][n],o[4*n]=255&(vr[i[n]>>24&255]^a>>24),o[4*n+1]=255&(vr[i[(n+3)%4]>>16&255]^a>>16),o[4*n+2]=255&(vr[i[(n+2)%4]>>8&255]^a>>8),o[4*n+3]=255&(vr[255&i[(n+1)%4]]^a);return o};var Dr=function(e){if(!(this instanceof Dr))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Ir(e)};Dr.prototype.encrypt=function(e){if((e=ur(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=hr(e.length),r=hr(16),i=0;iNumber.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},Mr.prototype.setBytes=function(e){if(16!=(e=ur(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},Mr.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var Or=function(e,t){if(!(this instanceof Or))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof Mr||(t=new Mr(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Ir(e)};Or.prototype.encrypt=function(e){for(var t=ur(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,i=0;i3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const n=e.byteLength;let s=5;for(;sn)break;let o=e[s+4],l=!1;if(i?(o=o>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,l=1===o||5===o),l){const i=e.slice(s+4+2,s+4+a);let n=new $r.ModeOfOperation.ctr(t,new $r.Counter(r));const o=n.decrypt(i);n=null,e.set(o,s+4+2)}s=s+4+a}return e}function Hr(e,t,r){if(e.byteLength<=30)return e;const i=e.slice(32);let n=new $r.ModeOfOperation.ctr(t,new $r.Counter(r));const s=n.decrypt(i);return n=null,e.set(s,32),e}var Vr=at((function(e,t){var r,n,s,a=(r=new Date,n=4,s={setLogLevel:function(e){n=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=n&&console.info("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=n&&console.warn("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){4>=n&&console.error("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)}},s);a.getDurationString=function(e,t){var r;function i(e,t){for(var r=(""+e).split(".");r[0].length0){for(var r="",i=0;i0&&(r+=","),r+="["+a.getDurationString(e.start(i))+","+a.getDurationString(e.end(i))+"]";return r}return"(empty)"},t.Log=a;var o=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};o.prototype.getPosition=function(){return this.position},o.prototype.getEndPosition=function(){return this.buffer.byteLength},o.prototype.getLength=function(){return this.buffer.byteLength},o.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0},o.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},o.prototype.readAnyInt=function(e,t){var r=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:r=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16,r|=this.dataview.getUint8(this.position+1)<<8,r|=this.dataview.getUint8(this.position+2);break;case 4:r=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32,r|=this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,r}throw"Not enough bytes in buffer"},o.prototype.readUint8=function(){return this.readAnyInt(1,!1)},o.prototype.readUint16=function(){return this.readAnyInt(2,!1)},o.prototype.readUint24=function(){return this.readAnyInt(3,!1)},o.prototype.readUint32=function(){return this.readAnyInt(4,!1)},o.prototype.readUint64=function(){return this.readAnyInt(8,!1)},o.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",r=0;rthis._byteLength&&(this._byteLength=t);else{for(r<1&&(r=1);t>r;)r*=2;var i=new ArrayBuffer(r),n=new Uint8Array(this._buffer);new Uint8Array(i,0,n.length).set(n),this.buffer=i,this._byteLength=t}}},l.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),r=new Uint8Array(this._buffer,0,t.length);t.set(r),this.buffer=e}},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),l.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},l.prototype.isEof=function(){return this.position>=this._byteLength},l.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Int32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var r=new Int16Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Uint32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var r=new Uint16Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var r=new Float64Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Float32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},l.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},l.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,l.memcpy=function(e,t,r,i,n){var s=new Uint8Array(e,t,n),a=new Uint8Array(r,i,n);s.set(a)},l.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},l.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},l.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=0;rn;i--,n++){var s=t[n];t[n]=t[i],t[i]=s}return e},l.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],r=0;r>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},l.prototype.adjustUint32=function(e,t){var r=this.position;this.seek(e),this.writeUint32(t),this.seek(r)},l.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var r=new Int32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r},l.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var r=new Int16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=2*e,r},l.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r},l.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=2*e,r},l.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var r=new Float64Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=8*e,r},l.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var r=new Float32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r};var u=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(u.prototype=new l(new ArrayBuffer,0,l.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e),0),r.set(new Uint8Array(t),e.byteLength),r.buffer},u.prototype.reduceBuffer=function(e,t,r){var i;return(i=new Uint8Array(r)).set(new Uint8Array(e,t,r)),i.buffer.fileStart=e.fileStart+t,i.buffer.usedBytes=0,i.buffer},u.prototype.insertBuffer=function(e){for(var t=!0,r=0;ri.byteLength){this.buffers.splice(r,1),r--;continue}a.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=i.fileStart||(e=this.reduceBuffer(e,0,i.fileStart-e.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(r,0,e),0===r&&(this.buffer=e);t=!1;break}if(e.fileStart0)){t=!1;break}e=this.reduceBuffer(e,n,s)}}t&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===r&&(this.buffer=e))},u.prototype.logBufferLevel=function(e){var t,r,i,n,s,o=[],l="";for(i=0,n=0,t=0;t0&&(l+=s.end-1+"]");var d=e?a.info:a.debug;0===this.buffers.length?d("MultiBufferStream","No more buffer in memory"):d("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+i+"/"+n+" bytes), continuous ranges: "+l)},u.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0}return!1}return!1},u.prototype.findPosition=function(e,t,r){var i,n=null,s=-1;for(i=!0===e?0:this.bufferIndex;i=t?(a.debug("MultiBufferStream","Found position in existing buffer #"+s),s):-1},u.prototype.findEndContiguousBuf=function(e){var t,r,i,n=void 0!==e?e:this.bufferIndex;if(r=this.buffers[n],this.buffers.length>n+1)for(t=n+1;t>3;return 31===i&&r.data.length>=2&&(i=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),i}return null},r.DecoderConfigDescriptor=function(e){r.Descriptor.call(this,4,e)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.upStream=0!=(this.streamType>>1&1),this.streamType=this.streamType>>>2,this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e)},r.DecoderSpecificInfo=function(e){r.Descriptor.call(this,5,e)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(e){r.Descriptor.call(this,6,e)},r.SLConfigDescriptor.prototype=new r.Descriptor,this};t.MPEG4DescriptorParser=h;var c={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){c.FullBox.prototype=new c.Box,c.ContainerBox.prototype=new c.Box,c.SampleEntry.prototype=new c.Box,c.TrackGroupTypeBox.prototype=new c.FullBox,c.BASIC_BOXES.forEach((function(e){c.createBoxCtor(e)})),c.FULL_BOXES.forEach((function(e){c.createFullBoxCtor(e)})),c.CONTAINER_BOXES.forEach((function(e){c.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,r){this.type=e,this.size=t,this.uuid=r},FullBox:function(e,t,r){c.Box.call(this,e,t,r),this.flags=0,this.version=0},ContainerBox:function(e,t,r){c.Box.call(this,e,t,r),this.boxes=[]},SampleEntry:function(e,t,r,i){c.ContainerBox.call(this,e,t),this.hdr_size=r,this.start=i},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){c.FullBox.call(this,e,t)},createBoxCtor:function(e,t){c.boxCodes.push(e),c[e+"Box"]=function(t){c.Box.call(this,e,t)},c[e+"Box"].prototype=new c.Box,t&&(c[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){c[e+"Box"]=function(t){c.FullBox.call(this,e,t)},c[e+"Box"].prototype=new c.FullBox,c[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,r=0;rr?(a.error("BoxParser","Box of type '"+u+"' has a size "+d+" greater than its container size "+r),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:d,hdr_size:l,start:o}):0!==d&&o+d>e.getEndPosition()?(e.seek(o),a.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:d,hdr_size:l,start:o}):t?{code:c.OK,type:u,size:d,hdr_size:l,start:o}:(c[u+"Box"]?i=new c[u+"Box"](d):"uuid"!==u?(a.warn("BoxParser","Unknown box type: '"+u+"'"),(i=new c.Box(u,d)).has_unparsed_data=!0):c.UUIDBoxes[s]?i=new c.UUIDBoxes[s](d):(a.warn("BoxParser","Unknown uuid type: '"+s+"'"),(i=new c.Box(u,d)).uuid=s,i.has_unparsed_data=!0),i.hdr_size=l,i.start=o,i.write===c.Box.prototype.write&&"mdat"!==i.type&&(a.info("BoxParser","'"+h+"' box writing not yet implemented, keeping unparsed data in memory for later write"),i.parseDataAndRewind(e)),i.parse(e),(n=e.getPosition()-(i.start+i.size))<0?(a.warn("BoxParser","Parsing of box '"+h+"' did not read the entire indicated box data size (missing "+-n+" bytes), seeking forward"),e.seek(i.start+i.size)):n>0&&(a.error("BoxParser","Parsing of box '"+h+"' read "+n+" more bytes than the indicated box data size, seeking backwards"),0!==i.size&&e.seek(i.start+i.size)),{code:c.OK,box:i,size:i.size})},c.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size)},c.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},c.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size},c.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},c.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},c.ContainerBox.prototype.parse=function(e){for(var t,r;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96)},c.SAMPLE_ENTRY_TYPE_VISUAL="Visual",c.SAMPLE_ENTRY_TYPE_AUDIO="Audio",c.SAMPLE_ENTRY_TYPE_HINT="Hint",c.SAMPLE_ENTRY_TYPE_METADATA="Metadata",c.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",c.SAMPLE_ENTRY_TYPE_SYSTEM="System",c.SAMPLE_ENTRY_TYPE_TEXT="Text",c.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},c.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},c.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size},c.SampleEntry.prototype.parseFooter=function(e){c.ContainerBox.prototype.parse.call(this,e)},c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_HINT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,(function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)})),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,(function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)})),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT,"enct"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA,"encm"),c.createBoxCtor("a1lx",(function(e){var t=16*(1+(1&(1&e.readUint8())));this.layer_size=[];for(var r=0;r<3;r++)this.layer_size[r]=16==t?e.readUint16():e.readUint32()})),c.createBoxCtor("a1op",(function(e){this.op_index=e.readUint8()})),c.createFullBoxCtor("auxC",(function(e){this.aux_type=e.readCString();var t=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=e.readUint8Array(t)})),c.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)a.error("av1C marker problem");else if(this.version=127&t,1===this.version)if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void a.error("av1C reserved_2 parsing problem");var r=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(r)}else a.error("av1C reserved_1 parsing problem");else a.error("av1C version "+this.version+" not supported")})),c.createBoxCtor("avcC",(function(e){var t,r;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(r))})),c.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),c.createFullBoxCtor("ccst",(function(e){var t=e.readUint8();this.all_ref_pics_intra=128==(128&t),this.intra_pred_used=64==(64&t),this.max_ref_per_pic=(63&t)>>2,e.readUint24()})),c.createBoxCtor("cdef",(function(e){var t;for(this.channel_count=e.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],t=0;t=32768&&this.component_type_urls.push(e.readCString())}})),c.createFullBoxCtor("co64",(function(e){var t,r;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4))})),c.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),c.createFullBoxCtor("cslg",(function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())})),c.createFullBoxCtor("ctts",(function(e){var t,r;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|i>>5&7})),c.createBoxCtor("dec3",(function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var r=0;r>6,i.bsid=n>>1&31,i.bsmod=(1&n)<<4|s>>4&15,i.acmod=s>>1&7,i.lfeon=1&s,i.num_dep_sub=a>>1&15,i.num_dep_sub>0&&(i.chan_loc=(1&a)<<8|e.readUint8())}})),c.createFullBoxCtor("dfLa",(function(e){var t=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var i=e.readUint8(),n=Math.min(127&i,r.length-1);if(n?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(r[n]),128&i)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),c.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),c.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),c.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),c.createBoxCtor("dOps",(function(e){if(this.Version=e.readUint8(),this.OutputChannelCount=e.readUint8(),this.PreSkip=e.readUint16(),this.InputSampleRate=e.readUint32(),this.OutputGain=e.readInt16(),this.ChannelMappingFamily=e.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=e.readUint8(),this.CoupledCount=e.readUint8(),this.ChannelMapping=[];for(var t=0;t=4;)this.compatible_brands[r]=e.readString(4),t-=4,r++})),c.createFullBoxCtor("hdlr",(function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))})),c.createBoxCtor("hvcC",(function(e){var t,r,i,n;this.configurationVersion=e.readUint8(),n=e.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(32&n)>>5,this.general_profile_idc=31&n,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),n=e.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var s=e.readUint8();for(t=0;t>7,a.nalu_type=63&n;var o=e.readUint16();for(r=0;r>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var r=0;if(this.version<2)r=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";r=e.readUint32()}for(var i=0;i>7,this.axis=1&t})),c.createFullBoxCtor("infe",(function(e){if(0!==this.version&&1!==this.version||(this.item_ID=e.readUint16(),this.item_protection_index=e.readUint16(),this.item_name=e.readCString(),this.content_type=e.readCString(),this.content_encoding=e.readCString()),1===this.version)return this.extension_type=e.readString(4),a.warn("BoxParser","Cannot parse extension type"),void e.seek(this.start+this.size);this.version>=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()))})),c.createFullBoxCtor("ipma",(function(e){var t,r;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?a.property_index=(127&s)<<8|e.readUint8():a.property_index=127&s}}})),c.createFullBoxCtor("iref",(function(e){var t,r;for(this.references=[];e.getPosition()>7,i.assignment_type=127&n,i.assignment_type){case 0:i.grouping_type=e.readString(4);break;case 1:i.grouping_type=e.readString(4),i.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:i.sub_track_id=e.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type")}}})),c.createBoxCtor("lsel",(function(e){this.layer_id=e.readUint16()})),c.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),f.prototype.toString=function(){return"("+this.x+","+this.y+")"},c.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]=new f(e.readUint16(),e.readUint16()),this.display_primaries[1]=new f(e.readUint16(),e.readUint16()),this.display_primaries[2]=new f(e.readUint16(),e.readUint16()),this.white_point=new f(e.readUint16(),e.readUint16()),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),c.createFullBoxCtor("mdhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()})),c.createFullBoxCtor("mehd",(function(e){1&this.flags&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()})),c.createFullBoxCtor("meta",(function(e){this.boxes=[],c.ContainerBox.prototype.parse.call(this,e)})),c.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),c.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),c.createFullBoxCtor("mskC",(function(e){this.bits_per_pixel=e.readUint8()})),c.createFullBoxCtor("mvhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()})),c.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),c.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),c.createFullBoxCtor("padb",(function(e){var t=e.readUint32();this.padbits=[];for(var r=0;r0){var t=e.readUint32();this.kid=[];for(var r=0;r0&&(this.data=e.readUint8Array(i))})),c.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),c.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),c.createFullBoxCtor("saio",(function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var r=e.readUint8(),i=0;i>7,this.num_leading_samples=127&t})),c.createSampleGroupCtor("rash",(function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=c.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))})),c.createSampleGroupCtor("stsa",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),c.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),c.createSampleGroupCtor("tsas",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("tscl",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("vipr",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createFullBoxCtor("sbgp",(function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),r=0;r>6,this.sample_depends_on[i]=t>>4&3,this.sample_is_depended_on[i]=t>>2&3,this.sample_has_redundancy[i]=3&t})),c.createFullBoxCtor("senc"),c.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),r=0;r>31&1,i.referenced_size=2147483647&n,i.subsegment_duration=e.readUint32(),n=e.readUint32(),i.starts_with_SAP=n>>31&1,i.SAP_type=n>>28&7,i.SAP_delta_time=268435455&n}})),c.SingleItemTypeReferenceBox=function(e,t,r,i){c.Box.call(this,e,t),this.hdr_size=r,this.start=i},c.SingleItemTypeReferenceBox.prototype=new c.Box,c.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[t+1]=15&i}else if(8===this.field_size)for(t=0;t0)for(r=0;r>4&15,this.default_skip_byte_block=15&t}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=c.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))})),c.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),c.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),c.createFullBoxCtor("tfra",(function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var r=e.readUint32(),i=0;i>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()})),c.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),c.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),c.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),c.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),c.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),c.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},c.createTrackGroupCtor("msrc"),c.TrackReferenceTypeBox=function(e,t,r,i){c.Box.call(this,e,t),this.hdr_size=r,this.start=i},c.TrackReferenceTypeBox.prototype=new c.Box,c.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},c.trefBox.prototype.parse=function(e){for(var t,r;e.getPosition()t&&this.flags&c.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=e.readUint32(),this.row_align_size=e.readUint32(),this.tile_align_size=e.readUint32(),this.num_tile_cols_minus_one=e.readUint32(),this.num_tile_rows_minus_one=e.readUint32()}})),c.createFullBoxCtor("url ",(function(e){1!==this.flags&&(this.location=e.readCString())})),c.createFullBoxCtor("urn ",(function(e){this.name=e.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=e.readCString())})),c.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")})),c.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=c.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),c.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),c.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=c.parseHex16(e)})),c.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize))})),c.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),c.createFullBoxCtor("vvcC",(function(e){var t,r,i={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){this.held_bits=e.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(e){this.held_bits=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=this.held_bits>>this.num_held_bits-e&(1<1){for(i.stream_read_1_bytes(e),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var a=i.extract_bits(1);this.ptl_sublayer_present_mask|=a<1;++r)i.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<>=1;t+=c.decimalToHex(i,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var n=!1,s="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||n)&&(s="."+c.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+s,n=!0);t+=s}return t},c.vvc1SampleEntry.prototype.getCodec=c.vvi1SampleEntry.prototype.getCodec=function(){var e,t=c.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var r="";if(this.vvcC.general_constraint_info){var i,n=[],s=0;for(s|=this.vvcC.ptl_frame_only_constraint<<7,s|=this.vvcC.ptl_multilayer_enabled<<6,e=0;e>2&63,n.push(s),s&&(i=e),s=this.vvcC.general_constraint_info[e]>>2&3;if(void 0===i)r=".CA";else{r=".C";var a="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",o=0,l=0;for(e=0;e<=i;++e)for(o=o<<8|n[e],l+=8;l>=5;){r+=a[o>>l-5&31],o&=(1<<(l-=5))-1}l&&(r+=a[31&(o<<=5-l)])}}t+=r}return t},c.mp4aSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),r=this.esds.esd.getAudioConfig();return e+"."+c.decimalToHex(t)+(r?"."+r:"")}return e},c.stxtSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},c.vp08SampleEntry.prototype.getCodec=c.vp09SampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this),t=this.vpcC.level;0==t&&(t="00");var r=this.vpcC.bitDepth;return 8==r&&(r="08"),e+".0"+this.vpcC.profile+"."+t+"."+r},c.av01SampleEntry.prototype.getCodec=function(){var e,t=c.SampleEntry.prototype.getCodec.call(this),r=this.av1C.seq_level_idx_0;return r<10&&(r="0"+r),2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+r+(this.av1C.seq_tier_0?"H":"M")+"."+e},c.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>d?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>d&&e.writeUint64(this.size)},c.FullBox.prototype.writeHeader=function(e){this.size+=4,c.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},c.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))},c.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1t?1:0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(e),1===this.version?e.writeUint64(this.baseMediaDecodeTime):e.writeUint32(this.baseMediaDecodeTime)},c.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&c.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&c.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&c.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&c.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&c.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags)},c.tkhdBox.prototype.write=function(e){this.version=0,this.size=80,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.track_id),e.writeUint32(0),e.writeUint32(this.duration),e.writeUint32(0),e.writeUint32(0),e.writeInt16(this.layer),e.writeInt16(this.alternate_group),e.writeInt16(this.volume<<8),e.writeUint16(0),e.writeInt32Array(this.matrix),e.writeUint32(this.width),e.writeUint32(this.height)},c.trexBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20,this.writeHeader(e),e.writeUint32(this.track_id),e.writeUint32(this.default_sample_description_index),e.writeUint32(this.default_sample_duration),e.writeUint32(this.default_sample_size),e.writeUint32(this.default_sample_flags)},c.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&c.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&c.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&c.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&c.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&c.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&c.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&c.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&c.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var t=0;t-1||e[r]instanceof c.Box||t[r]instanceof c.Box||void 0===e[r]||void 0===t[r]||"function"==typeof e[r]||"function"==typeof t[r]||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||"data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r||c.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1||e[r]===t[r]))return!1;return!0},c.boxEqual=function(e,t){if(!c.boxEqualFields(e,t))return!1;for(var r=0;r1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1)},g.prototype.setExtractionOptions=function(e,t,r){var i=this.getTrackById(e);if(i){var n={};this.extractedTracks.push(n),n.id=e,n.user=t,n.trak=i,i.nextSample=0,n.nb_samples=1e3,n.samples=[],r&&r.nbSamples&&(n.nb_samples=r.nbSamples)}},g.prototype.unsetExtractionOptions=function(e){for(var t=-1,r=0;r-1&&this.extractedTracks.splice(t,1)},g.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}if(this.saveParsePosition&&this.saveParsePosition(),(e=c.parseOneBox(this.stream,false)).code===c.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var r;switch(r="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),r){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[r]&&a.warn("ISOFile","Duplicate Box of type: "+r+", overriding previous occurrence"),this[r]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},g.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(a.warn("ISOFile","Not ready to start parsing"),!1))},g.prototype.appendBuffer=function(e,t){var r;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},g.prototype.getInfo=function(){var e,t,r,i,n,s,a={},o=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(a.hasMoov=!0,a.duration=this.moov.mvhd.duration,a.timescale=this.moov.mvhd.timescale,a.isFragmented=null!=this.moov.mvex,a.isFragmented&&this.moov.mvex.mehd&&(a.fragment_duration=this.moov.mvex.mehd.fragment_duration),a.isProgressive=this.isProgressive,a.hasIOD=null!=this.moov.iods,a.brands=[],a.brands.push(this.ftyp.major_brand),a.brands=a.brands.concat(this.ftyp.compatible_brands),a.created=new Date(o+1e3*this.moov.mvhd.creation_time),a.modified=new Date(o+1e3*this.moov.mvhd.modification_time),a.tracks=[],a.audioTracks=[],a.videoTracks=[],a.subtitleTracks=[],a.metadataTracks=[],a.hintTracks=[],a.otherTracks=[],e=0;e0?a.mime+='video/mp4; codecs="':a.audioTracks&&a.audioTracks.length>0?a.mime+='audio/mp4; codecs="':a.mime+='application/mp4; codecs="',e=0;e=r.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+i.id+" for samples ["+Math.max(0,r.nextSample-i.nb_samples)+","+(r.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(i.id,i.user,i.segmentStream.buffer,r.nextSample,e||r.nextSample>=r.samples.length),i.segmentStream=null,i!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t=r.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+s.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(s.id,s.user,s.samples),s.samples=[],s!==this.extractedTracks[t]))break}}}},g.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},g.prototype.getBoxes=function(e,t){var r=[];return g._sweep.call(this,e,r,t),r},g._sweep=function(e,t,r){for(var i in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&r)return;g._sweep.call(this.boxes[i],e,t,r)}},g.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},g.prototype.getTrackSample=function(e,t){var r=this.getTrackById(e);return this.getSample(r,t)},g.prototype.releaseUsedSamples=function(e,t){var r=0,i=this.getTrackById(e);i.lastValidSample||(i.lastValidSample=0);for(var n=i.lastValidSample;ne*n.timescale){d=i-1;break}t&&n.is_sync&&(l=i)}for(t&&(d=l),e=r.samples[d].cts,r.nextSample=d;r.samples[d].alreadyRead===r.samples[d].size&&r.samples[d+1];)d++;return s=r.samples[d].offset+r.samples[d].alreadyRead,a.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+a.getDurationString(e,o)+" and offset: "+s),{offset:s,time:e/o}},g.prototype.getTrackDuration=function(e){var t;return e.samples?((t=e.samples[e.samples.length-1]).cts+t.duration)/t.timescale:1/0},g.prototype.seek=function(e,t){var r,i,n,s=this.moov,o={offset:1/0,time:1/0};if(this.moov){for(n=0;nthis.getTrackDuration(r)||((i=this.seekTrack(e,t,r)).offset-1){a=l;break}switch(a){case"Visual":if(n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),s.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24),t.avcDecoderConfigRecord){var h=new c.avcCBox;h.parse(new o(t.avcDecoderConfigRecord)),s.addBox(h)}else if(t.hevcDecoderConfigRecord){var f=new c.hvcCBox;f.parse(new o(t.hevcDecoderConfigRecord)),s.addBox(f)}break;case"Audio":n.add("smhd").set("balance",t.balance||0),s.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":if(n.add("sthd"),"stpp"===t.type)s.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");break;default:n.add("nmhd")}t.description&&s.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){s.addBox(e)})),n.add("dinf").add("dref").addEntry((new c["url Box"]).set("flags",1));var p=n.add("stbl");return p.add("stsd").addEntry(s),p.add("stts").set("sample_counts",[]).set("sample_deltas",[]),p.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),p.add("stco").set("chunk_offsets",[]),p.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(r),t.id}},c.Box.prototype.computeSize=function(e){var t=e||new l;t.endianness=l.BIG_ENDIAN,this.write(t)},g.prototype.addSample=function(e,t,r){var i=r||{},n={},s=this.getTrackById(e);if(null!==s){n.number=s.samples.length,n.track_id=s.tkhd.track_id,n.timescale=s.mdia.mdhd.timescale,n.description_index=i.sample_description_index?i.sample_description_index-1:0,n.description=s.mdia.minf.stbl.stsd.entries[n.description_index],n.data=t,n.size=t.byteLength,n.alreadyRead=n.size,n.duration=i.duration||1,n.cts=i.cts||0,n.dts=i.dts||0,n.is_sync=i.is_sync||!1,n.is_leading=i.is_leading||0,n.depends_on=i.depends_on||0,n.is_depended_on=i.is_depended_on||0,n.has_redundancy=i.has_redundancy||0,n.degradation_priority=i.degradation_priority||0,n.offset=0,n.subsamples=i.subsamples,s.samples.push(n),s.samples_size+=n.size,s.samples_duration+=n.duration,void 0===s.first_dts&&(s.first_dts=i.dts),this.processSamples();var a=this.createSingleSampleMoof(n);return this.addBox(a),a.computeSize(),a.trafs[0].truns[0].data_offset=a.size+8,this.add("mdat").data=new Uint8Array(t),n}},g.prototype.createSingleSampleMoof=function(e){var t=0;t=e.is_sync?1<<25:65536;var r=new c.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var i=r.add("traf"),n=this.getTrackById(e.track_id);return i.add("tfhd").set("track_id",e.track_id).set("flags",c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add("tfdt").set("baseMediaDecodeTime",e.dts-(n.first_dts||0)),i.add("trun").set("flags",c.TRUN_FLAGS_DATA_OFFSET|c.TRUN_FLAGS_DURATION|c.TRUN_FLAGS_SIZE|c.TRUN_FLAGS_FLAGS|c.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[t]).set("sample_composition_time_offset",[e.cts-e.dts]),r},g.prototype.lastMoofIndex=0,g.prototype.samplesDataSize=0,g.prototype.resetTables=function(){var e,t,r,i,n,s;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=n[a].grouping_type+"/0",(o=new d(n[a].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=o))}else for(a=0;a=2&&(l=i[a].grouping_type+"/0",o=new d(i[a].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=o))},g.setSampleGroupProperties=function(e,t,r,i){var n,s;for(n in t.sample_groups=[],i){var a;if(t.sample_groups[n]={},t.sample_groups[n].grouping_type=i[n].grouping_type,t.sample_groups[n].grouping_type_parameter=i[n].grouping_type_parameter,r>=i[n].last_sample_in_run&&(i[n].last_sample_in_run<0&&(i[n].last_sample_in_run=0),i[n].entry_index++,i[n].entry_index<=i[n].sbgp.entries.length-1&&(i[n].last_sample_in_run+=i[n].sbgp.entries[i[n].entry_index].sample_count)),i[n].entry_index<=i[n].sbgp.entries.length-1?t.sample_groups[n].group_description_index=i[n].sbgp.entries[i[n].entry_index].group_description_index:t.sample_groups[n].group_description_index=-1,0!==t.sample_groups[n].group_description_index)a=i[n].fragment_description?i[n].fragment_description:i[n].description,t.sample_groups[n].group_description_index>0?(s=t.sample_groups[n].group_description_index>65535?(t.sample_groups[n].group_description_index>>16)-1:t.sample_groups[n].group_description_index-1,a&&s>=0&&(t.sample_groups[n].description=a.entries[s])):a&&a.version>=2&&a.default_group_description_index>0&&(t.sample_groups[n].description=a.entries[a.default_group_description_index-1])}},g.process_sdtp=function(e,t,r){t&&(e?(t.is_leading=e.is_leading[r],t.depends_on=e.sample_depends_on[r],t.is_depended_on=e.sample_is_depended_on[r],t.has_redundancy=e.sample_has_redundancy[r]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))},g.prototype.buildSampleLists=function(){var e,t;for(e=0;ev&&(b++,v<0&&(v=0),v+=s.sample_counts[b]),t>0?(e.samples[t-1].duration=s.sample_deltas[b],e.samples_duration+=e.samples[t-1].duration,A.dts=e.samples[t-1].dts+e.samples[t-1].duration):A.dts=0,a?(t>=w&&(S++,w<0&&(w=0),w+=a.sample_counts[S]),A.cts=e.samples[t].dts+a.sample_offsets[S]):A.cts=A.dts,o?(t==o.sample_numbers[E]-1?(A.is_sync=!0,E++):(A.is_sync=!1,A.degradation_priority=0),d&&d.entries[U].sample_delta+x==t+1&&(A.subsamples=d.entries[U].subsamples,x+=d.entries[U].sample_delta,U++)):A.is_sync=!0,g.process_sdtp(e.mdia.minf.stbl.sdtp,A,A.number),A.degradation_priority=c?c.priority[t]:0,d&&d.entries[U].sample_delta+x==t&&(A.subsamples=d.entries[U].subsamples,x+=d.entries[U].sample_delta),(u.length>0||h.length>0)&&g.setSampleGroupProperties(e,A,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}},g.prototype.updateSampleLists=function(){var e,t,r,i,n,s,a,o,l,d,u,h,f,p,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&g.initSampleGroups(h,u,u.sbgps,h.mdia.minf.stbl.sgpds,u.sgpds),t=0;t0?p.dts=h.samples[h.samples.length-2].dts+h.samples[h.samples.length-2].duration:(u.tfdt?p.dts=u.tfdt.baseMediaDecodeTime:p.dts=0,h.first_traf_merged=!0),p.cts=p.dts,_.flags&c.TRUN_FLAGS_CTS_OFFSET&&(p.cts=p.dts+_.sample_composition_time_offset[r]),m=a,_.flags&c.TRUN_FLAGS_FLAGS?m=_.sample_flags[r]:0===r&&_.flags&c.TRUN_FLAGS_FIRST_FLAG&&(m=_.first_sample_flags),p.is_sync=!(m>>16&1),p.is_leading=m>>26&3,p.depends_on=m>>24&3,p.is_depended_on=m>>22&3,p.has_redundancy=m>>20&3,p.degradation_priority=65535&m;var y=!!(u.tfhd.flags&c.TFHD_FLAG_BASE_DATA_OFFSET),v=!!(u.tfhd.flags&c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),b=!!(_.flags&c.TRUN_FLAGS_DATA_OFFSET),w=0;w=y?u.tfhd.base_data_offset:v||0===t?d.start:o,p.offset=0===t&&0===r?b?w+_.data_offset:w:o,o=p.offset+p.size,(u.sbgps.length>0||u.sgpds.length>0||h.mdia.minf.stbl.sbgps.length>0||h.mdia.minf.stbl.sgpds.length>0)&&g.setSampleGroupProperties(h,p,p.number_in_traf,u.sample_groups_info)}}if(u.subs){h.has_fragment_subsamples=!0;var S=u.first_sample_index;for(t=0;t-1))return null;var s=(r=this.stream.buffers[n]).byteLength-(i.offset+i.alreadyRead-r.fileStart);if(i.size-i.alreadyRead<=s)return a.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-r.fileStart)+" read size: "+(i.size-i.alreadyRead)+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,r,i.offset+i.alreadyRead-r.fileStart,i.size-i.alreadyRead),r.usedBytes+=i.size-i.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead=i.size,i;if(0===s)return null;a.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-r.fileStart)+" read size: "+s+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,r,i.offset+i.alreadyRead-r.fileStart,s),i.alreadyRead+=s,r.usedBytes+=s,this.stream.logBufferLevel()}},g.prototype.releaseSample=function(e,t){var r=e.samples[t];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},g.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},g.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec()}return t},g.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(r.protection=s.ipro.protections[s.iinf.item_infos[e].protection_index-1]),s.iinf.item_infos[e].item_type?r.type=s.iinf.item_infos[e].item_type:r.type="mime",r.content_type=s.iinf.item_infos[e].content_type,r.content_encoding=s.iinf.item_infos[e].content_encoding;if(s.grpl)for(e=0;e0&&c.property_index-1-1))return null;var o=(t=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-t.fileStart);if(!(n.length-n.alreadyRead<=o))return a.debug("ISOFile","Getting item #"+e+" extent #"+i+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+o+" full extent size: "+n.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,o),n.alreadyRead+=o,r.alreadyRead+=o,t.usedBytes+=o,this.stream.logBufferLevel(),null;a.debug("ISOFile","Getting item #"+e+" extent #"+i+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,n.length-n.alreadyRead),t.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length}}return r.alreadyRead===r.size?r:null},g.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var r=0;r0?this.moov.traks[e].samples[0].duration:0),t.push(i)}return t},c.Box.prototype.printHeader=function(e){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},c.FullBox.prototype.printHeader=function(e){this.size+=4,c.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},c.Box.prototype.print=function(e){this.printHeader(e)},c.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)},c.tkhdBox.prototype.print=function(e){c.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)};var y={createFile:function(e,t){var r=void 0===e||e,i=new g(t);return i.discardMdatData=!r,i}};t.createFile=y.createFile}));function Wr(e){return e.reduce(((e,t)=>256*e+t))}function jr(e){const t=[101,103,119,99],r=e.length-28,i=e.slice(r,r+t.length);return t.every(((e,t)=>e===i[t]))}Vr.Log,Vr.MP4BoxStream,Vr.DataStream,Vr.MultiBufferStream,Vr.MPEG4DescriptorParser,Vr.BoxParser,Vr.XMLSubtitlein4Parser,Vr.Textin4Parser,Vr.ISOFile,Vr.createFile;class Yr{constructor(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=new Uint8Array([30,158,90,33,244,57,83,165,2,70,35,87,215,231,226,108]),this.t=this.n.slice().reverse()}destroy(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=null,this.t=null}transport(e){if(!this.s&&this.l>50)return e;if(this.l++,this.d)return e;const t=new Uint8Array(e);if(this.A){if(!(this.c~e))}(e.slice(r+32,r+32+t))]}return null}(t,this.t);if(!r)return e;const i=function(e){try{if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiate)throw null;{const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(!(e instanceof WebAssembly.Module&&new WebAssembly.Instance(e)instanceof WebAssembly.Instance))throw null}}catch(e){return new Error("video_error_4")}let t;try{t={env:{__handle_stack_overflow:()=>e(new Error("video_error_1")),memory:new WebAssembly.Memory({initial:256,maximum:256})}}}catch(e){return new Error("video_error_5")}return t}(e);if(i instanceof Error)return console.error(i.message),this.d=!0,e;this.A=!0,this.u=r[1],jr(t)&&this.c++,WebAssembly.instantiate(r[2],i).then((e=>{if("function"!=typeof(t=e.instance.exports).parse||"object"!=typeof t.memory)return this.d=!0,void console.error("video_error_3");var t;this.s=e.instance.exports,this.a=new Uint8Array(this.s.memory.buffer)})).catch((e=>{this.d=!0,console.error("video_error_6")}))}return e}}const qr=16,Kr=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Xr=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Zr(e){const t=[];for(let r=0,i=e.length;r1===(e=e.toString(16)).length?"0"+e:e)).join("")}function Qr(e){const t=[];for(let r=0,i=e.length;r>>6),t.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)t.push(224|i>>>12),t.push(128|i>>>6&63),t.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw t.push(i),new Error("input is not supported");r++,t.push(240|i>>>18&28),t.push(128|i>>>12&63),t.push(128|i>>>6&63),t.push(128|63&i)}}return t}function ei(e){const t=[];for(let r=0,i=e.length;r=240&&e[r]<=247?(t.push(String.fromCodePoint(((7&e[r])<<18)+((63&e[r+1])<<12)+((63&e[r+2])<<6)+(63&e[r+3]))),r+=3):e[r]>=224&&e[r]<=239?(t.push(String.fromCodePoint(((15&e[r])<<12)+((63&e[r+1])<<6)+(63&e[r+2]))),r+=2):e[r]>=192&&e[r]<=223?(t.push(String.fromCodePoint(((31&e[r])<<6)+(63&e[r+1]))),r++):t.push(String.fromCodePoint(e[r]));return t.join("")}function ti(e,t){const r=31&t;return e<>>32-r}function ri(e){return(255&Kr[e>>>24&255])<<24|(255&Kr[e>>>16&255])<<16|(255&Kr[e>>>8&255])<<8|255&Kr[255&e]}function ii(e){return e^ti(e,2)^ti(e,10)^ti(e,18)^ti(e,24)}function ni(e){return e^ti(e,13)^ti(e,23)}function si(e,t,r){const i=new Array(4),n=new Array(4);for(let t=0;t<4;t++)n[0]=255&e[4*t],n[1]=255&e[4*t+1],n[2]=255&e[4*t+2],n[3]=255&e[4*t+3],i[t]=n[0]<<24|n[1]<<16|n[2]<<8|n[3];for(let e,t=0;t<32;t+=4)e=i[1]^i[2]^i[3]^r[t+0],i[0]^=ii(ri(e)),e=i[2]^i[3]^i[0]^r[t+1],i[1]^=ii(ri(e)),e=i[3]^i[0]^i[1]^r[t+2],i[2]^=ii(ri(e)),e=i[0]^i[1]^i[2]^r[t+3],i[3]^=ii(ri(e));for(let e=0;e<16;e+=4)t[e]=i[3-e/4]>>>24&255,t[e+1]=i[3-e/4]>>>16&255,t[e+2]=i[3-e/4]>>>8&255,t[e+3]=255&i[3-e/4]}function ai(e,t,r){const i=new Array(4),n=new Array(4);for(let t=0;t<4;t++)n[0]=255&e[0+4*t],n[1]=255&e[1+4*t],n[2]=255&e[2+4*t],n[3]=255&e[3+4*t],i[t]=n[0]<<24|n[1]<<16|n[2]<<8|n[3];i[0]^=2746333894,i[1]^=1453994832,i[2]^=1736282519,i[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=i[1]^i[2]^i[3]^Xr[r+0],t[r+0]=i[0]^=ni(ri(e)),e=i[2]^i[3]^i[0]^Xr[r+1],t[r+1]=i[1]^=ni(ri(e)),e=i[3]^i[0]^i[1]^Xr[r+2],t[r+2]=i[2]^=ni(ri(e)),e=i[0]^i[1]^i[2]^Xr[r+3],t[r+3]=i[3]^=ni(ri(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function oi(e,t,r){let{padding:i="pkcs#7",mode:n,iv:s=[],output:a="string"}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("cbc"===n&&("string"==typeof s&&(s=Zr(s)),16!==s.length))throw new Error("iv is invalid");if("string"==typeof t&&(t=Zr(t)),16!==t.length)throw new Error("key is invalid");if(e="string"==typeof e?0!==r?Qr(e):Zr(e):[...e],("pkcs#5"===i||"pkcs#7"===i)&&0!==r){const t=qr-e.length%qr;for(let r=0;r=qr;){const t=e.slice(h,h+16),i=new Array(16);if("cbc"===n)for(let e=0;e2&&void 0!==arguments[2]&&arguments[2];const i=e.byteLength;let n=5;for(;ni)break;let a=e[n+4],o=!1;if(r?(a=a>>>1&63,o=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(a)):(a&=31,o=1===a||5===a),o){const r=oi(e.slice(n+4+2,n+4+s),t,0,{padding:"none",output:"array"});e.set(r,n+4+2)}n=n+4+s}return e}const ui={init:0,findFirstStartCode:1,findSecondStartCode:2};class hi extends class{on(e,t,r){const i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:r}),this}once(e,t,r){const i=this;function n(){i.off(e,n);for(var s=arguments.length,a=new Array(s),o=0;o1?r-1:0),n=1;n{delete r[e]})),void delete this.e;const i=r[e],n=[];if(i&&t)for(let e=0,r=i.length;e=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(!(!1&this.tempBuffer[this.parsedOffset+1])){this.versionLayer=this.tempBuffer[this.parsedOffset+1],this.state=ui.findFirstStartCode,this.fisrtStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==ui.findFirstStartCode){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(this.tempBuffer[this.parsedOffset+1]==this.versionLayer){this.state=ui.findSecondStartCode,this.secondStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==ui.findSecondStartCode){let e=this.tempBuffer.slice(this.fisrtStartCodeOffset,this.secondStartCodeOffset);this.emit("data",e,t),this.tempBuffer=this.tempBuffer.slice(this.secondStartCodeOffset),this.fisrtStartCodeOffset=0,this.parsedOffset=2,this.state=ui.findFirstStartCode}}}}function ci(e,t,r){for(let i=2;i3&&void 0!==arguments[3]&&arguments[3];const n=e.byteLength;let s=5;for(;sn)break;let o=e[s+4],l=!1;if(i?(o=o>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,l=1===o||5===o),l){const i=ci(e.slice(s+4,s+4+a),t,r);e.set(i,s+4)}s=s+4+a}return e}Date.now||(Date.now=function(){return(new Date).getTime()});const mi=[];mi.push(r(),t()),Promise.all(mi).then((e=>{const t=e[0];!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[],n=[],s={},a=new AbortController,o=null,l=null,d=null,u=null,v=null,b=null,E=!1,Ge=!1,Ye=!!At(r),Ke=!1,Xe=null,at=null,ft=null,Ct=[],Bt=null,kt=null,Ft=0,Dt=0,Lt=null,Rt=null,jt=0,Yt=0,qt=!1,Qt=!1,lr=!1,dr=null,ur=null,hr=null,cr=!1,fr=()=>{const e=Ut();return{debug:e.debug,debugLevel:e.debugLevel,debugUuid:e.debugUuid,useOffscreen:e.useOffscreen,useWCS:e.useWCS,useMSE:e.useMSE,videoBuffer:e.videoBuffer,videoBufferDelay:e.videoBufferDelay,openWebglAlignment:e.openWebglAlignment,playType:e.playType,hasAudio:e.hasAudio,hasVideo:e.hasVideo,playbackRate:1,playbackForwardMaxRateDecodeIFrame:e.playbackForwardMaxRateDecodeIFrame,playbackIsCacheBeforeDecodeForFpsRender:e.playbackConfig.isCacheBeforeDecodeForFpsRender,sampleRate:0,networkDelay:e.networkDelay,visibility:!0,useSIMD:e.useSIMD,isRecording:!1,recordType:e.recordType,isNakedFlow:e.isNakedFlow,checkFirstIFrame:e.checkFirstIFrame,audioBufferSize:1024,isM7sCrypto:e.isM7sCrypto,m7sCryptoAudio:e.m7sCryptoAudio,cryptoKey:e.cryptoKey,cryptoIV:e.cryptoIV,isSm4Crypto:e.isSm4Crypto,sm4CryptoKey:e.sm4CryptoKey,isXorCrypto:e.isXorCrypto,isHls265:!1,isFlv:e.isFlv,isFmp4:e.isFmp4,isMpeg4:e.isMpeg4,isFmp4Private:e.isFmp4Private,isEmitSEI:e.isEmitSEI,isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isDropSameTimestampGop:e.isDropSameTimestampGop,mseDecodeAudio:e.mseDecodeAudio,nakedFlowH265DemuxUseNew:e.nakedFlowH265DemuxUseNew}};"VideoEncoder"in self&&(s={hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:new VideoDecoder({output:function(e){if(s.isEmitInfo||(yr.debug.log("worker","Webcodecs Video Decoder initSize"),postMessage({cmd:x,w:e.codedWidth,h:e.codedHeight}),s.isEmitInfo=!0,s.offscreenCanvas=new OffscreenCanvas(e.codedWidth,e.codedHeight),s.offscreenCanvasCtx=s.offscreenCanvas.getContext("2d")),yt(e.createImageBitmap))e.createImageBitmap().then((t=>{s.offscreenCanvasCtx.drawImage(t,0,0,e.codedWidth,e.codedHeight);let r=s.offscreenCanvas.transferToImageBitmap();postMessage({cmd:A,buffer:r,delay:yr.delay,ts:0},[r]),wt(e)}));else{s.offscreenCanvasCtx.drawImage(e,0,0,e.codedWidth,e.codedHeight);let t=s.offscreenCanvas.transferToImageBitmap();postMessage({cmd:A,buffer:t,delay:yr.delay,ts:0},[t]),wt(e)}},error:function(e){yr.debug.error("worker","VideoDecoder error",e)}}),decode:function(e,t,r){const i=e[0]>>4==1;if(s.hasInit){const r=new EncodedVideoChunk({data:e.slice(5),timestamp:t,type:i?We:je});s.decoder.decode(r)}else if(i&&0===e[1]){const t=15&e[0];postMessage({cmd:P,code:t});const r=mt(e.slice(5));yr._opt.recordType===y&&postMessage({cmd:I,buffer:e,codecId:t},[e.buffer]),s.decoder.configure(r),s.hasInit=!0}},reset(){s.hasInit=!1,s.isEmitInfo=!1,s.offscreenCanvas=null,s.offscreenCanvasCtx=null}});let pr=function(){if(cr=!0,yr.fetchStatus!==Qe||Tt(yr._opt.isChrome)){if(a)try{a.abort(),a=null}catch(e){yr.debug.log("worker","abort catch",e)}}else a=null,yr.debug.log("worker",`abort() and not abortController.abort() _status is ${yr.fetchStatus} and _isChrome is ${yr._opt.isChrome}`)},mr={init(){mr.lastBuf=null,mr.vps=null,mr.sps=null,mr.pps=null,mr.streamType=null,mr.localDts=0,mr.isSendSeqHeader=!1},destroy(){mr.lastBuf=null,mr.vps=null,mr.sps=null,mr.pps=null,mr.streamType=null,mr.localDts=0,mr.isSendSeqHeader=!1},dispatch(e){const t=new Uint8Array(e);mr.extractNALu$2(t)},getNaluDts(){let e=mr.localDts;return mr.localDts=mr.localDts+40,e},getNaluAudioDts(){const e=yr._opt.sampleRate,t=yr._opt.audioBufferSize;return mr.localDts+parseInt(t/e*1e3)},extractNALu(e){let t,r,i=0,n=e.byteLength,s=0,a=[];for(;i1)for(let e=0;e{const t=Nt(e);t===De||t===Ie?mr.handleVideoH264Nalu(e):Ht(t)&&i.push(e)})),1===i.length)mr.handleVideoH264Nalu(i[0]);else if(Wt(i)){const e=Nt(i[0]),t=Vt(e);mr.handleVideoH264NaluList(i,t,e)}else i.forEach((e=>{mr.handleVideoH264Nalu(e)}))}else if(mr.streamType===Ce)if(yr._opt.nakedFlowH265DemuxUseNew){const t=mr.handleAddNaluStartCode(e),r=mr.extractNALu(t);if(0===r.length)return void yr.debug.warn("worker","handleVideoNalu","h265 naluList.length === 0");const i=[];if(r.forEach((e=>{const t=ir(e);t===Ne||t===$e||t===Oe?mr.handleVideoH265Nalu(e):sr(t)&&i.push(e)})),1===i.length)mr.handleVideoH265Nalu(i[0]);else if(or(i)){const e=ir(i[0]),t=ar(e);mr.handleVideoH265NaluList(i,t,e)}else i.forEach((e=>{this.handleVideoH265Nalu(e)}))}else ir(e)===Ne?mr.extractH265PPS(e):mr.handleVideoH265Nalu(e)},extractH264PPS(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{Gt(Nt(e))?mr.extractH264SEI(e):mr.handleVideoH264Nalu(e)}))},extractH265PPS(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{nr(ir(e))?mr.extractH265SEI(e):mr.handleVideoH265Nalu(e)}))},extractH264SEI(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{mr.handleVideoH264Nalu(e)}))},extractH265SEI(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{mr.handleVideoH265Nalu(e)}))},handleAddNaluStartCode(e){const t=[0,0,0,1],r=new Uint8Array(e.length+t.length);return r.set(t),r.set(e,t.length),r},handleVideoH264Nalu(e){const t=Nt(e);switch(t){case Ie:mr.sps=e;break;case De:mr.pps=e}if(mr.isSendSeqHeader){if(mr.sps&&mr.pps){const e=Mt({sps:mr.sps,pps:mr.pps}),t=mr.getNaluDts();yr.decode(e,{type:ee,ts:t,isIFrame:!0,cts:0}),mr.sps=null,mr.pps=null}if(Ht(t)){const r=Vt(t),i=mr.getNaluDts(),n=Ot(e,r);mr.doDecode(n,{type:ee,ts:i,isIFrame:r,cts:0})}else yr.debug.warn("work",`handleVideoH264Nalu Avc Seq Head is ${t}`)}else if(mr.sps&&mr.pps){mr.isSendSeqHeader=!0;const e=Mt({sps:mr.sps,pps:mr.pps});yr.decode(e,{type:ee,ts:0,isIFrame:!0,cts:0}),mr.sps=null,mr.pps=null}},handleVideoH264NaluList(e,t,r){if(mr.isSendSeqHeader){const i=mr.getNaluDts(),n=$t(e.reduce(((e,t)=>{const r=Xt(e),i=Xt(t),n=new Uint8Array(r.byteLength+i.byteLength);return n.set(r,0),n.set(i,r.byteLength),n})),t);mr.doDecode(n,{type:ee,ts:i,isIFrame:t,cts:0}),yr.debug.log("worker",`handleVideoH264NaluList list size is ${e.length} package length is ${n.byteLength} isIFrame is ${t},nalu type is ${r}, dts is ${i}`)}else yr.debug.warn("worker","handleVideoH264NaluList isSendSeqHeader is false")},handleVideoH265Nalu(e){const t=ir(e);switch(t){case Oe:mr.vps=e;break;case $e:mr.sps=e;break;case Ne:mr.pps=e}if(mr.isSendSeqHeader){if(mr.vps&&mr.sps&&mr.pps){const e=er({vps:mr.vps,sps:mr.sps,pps:mr.pps}),t=mr.getNaluDts();yr.decode(e,{type:ee,ts:t,isIFrame:!0,cts:0}),mr.vps=null,mr.sps=null,mr.pps=null}if(sr(t)){const r=ar(t),i=mr.getNaluDts(),n=tr(e,r);mr.doDecode(n,{type:ee,ts:i,isIFrame:r,cts:0})}else yr.debug.warn("work",`handleVideoH265Nalu HevcSeqHead is ${t}`)}else if(mr.vps&&mr.sps&&mr.pps){mr.isSendSeqHeader=!0;const e=er({vps:mr.vps,sps:mr.sps,pps:mr.pps});yr.decode(e,{type:ee,ts:0,isIFrame:!0,cts:0}),mr.vps=null,mr.sps=null,mr.pps=null}},handleVideoH265NaluList(e,t,r){if(mr.isSendSeqHeader){const i=mr.getNaluDts(),n=rr(e.reduce(((e,t)=>{const r=Xt(e),i=Xt(t),n=new Uint8Array(r.byteLength+i.byteLength);return n.set(r,0),n.set(i,r.byteLength),n})),t);mr.doDecode(n,{type:ee,ts:i,isIFrame:t,cts:0}),yr.debug.log("worker",`handleVideoH265NaluList list size is ${e.length} package length is ${n.byteLength} isIFrame is ${t},nalu type is ${r}, dts is ${i}`)}else yr.debug.warn("worker","handleVideoH265NaluList isSendSeqHeader is false")},doDecode(e,t){yr.calcNetworkDelay(t.ts),t.isIFrame&&yr.calcIframeIntervalTimestamp(t.ts),postMessage({cmd:z,type:_e,value:e.byteLength}),postMessage({cmd:z,type:ge,value:t.ts}),yr.decode(e,t)}},_r={LOG_NAME:"worker fmp4Demuxer",mp4Box:Vr.createFile(),offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){_r.mp4Box.onReady=_r.onReady,_r.mp4Box.onError=_r.onError,_r.mp4Box.onSamples=_r.onSamples},initTransportDescarmber(){_r.transportDescarmber=new Yr},_getSeqHeader(e){const t=_r.mp4Box.getTrackById(e.id);for(const e of t.mdia.minf.stbl.stsd.entries)if(e.avcC||e.hvcC){const t=new Vr.DataStream(void 0,0,Vr.DataStream.BIG_ENDIAN);let r=[];e.avcC?(e.avcC.write(t),r=[23,0,0,0,0]):(_r.isHevc=!0,dr=!0,e.hvcC.write(t),r=[28,0,0,0,0]);const i=new Uint8Array(t.buffer,8),n=new Uint8Array(r.length+i.length);return n.set(r,0),n.set(i,r.length),n}return null},onReady(e){yr.debug.log(_r.LOG_NAME,"onReady()",e);const t=e.videoTracks[0],r=e.audioTracks[0];if(t){_r.videoTrackId=t.id;const e=_r._getSeqHeader(t);e&&(yr.debug.log(_r.LOG_NAME,"seqHeader"),yr.decodeVideo(e,0,!0,0)),_r.mp4Box.setExtractionOptions(t.id)}if(r&&yr._opt.hasAudio){_r.audioTrackId=r.id;const e=r.audio||{},t=ut.indexOf(e.sample_rate),i=r.codec.replace("mp4a.40.","");_r.mp4Box.setExtractionOptions(r.id);const n=ot({profile:parseInt(i,10),sampleRate:t,channel:e.channel_count});yr.debug.log(_r.LOG_NAME,"aacADTSHeader"),yr.decodeAudio(n,0)}_r.mp4Box.start()},onError(e){yr.debug.error(_r.LOG_NAME,"mp4Box onError",e)},onSamples(e,t,r){if(e===_r.videoTrackId)for(const e of r){const t=e.data,r=e.is_sync,i=1e3*e.cts/e.timescale;e.duration,e.timescale,r&&yr.calcIframeIntervalTimestamp(i);let n=null;n=_r.isHevc?rr(t,r):$t(t,r),postMessage({cmd:z,type:_e,value:n.byteLength}),postMessage({cmd:z,type:ge,value:i}),yr.decode(n,{type:ee,ts:i,isIFrame:r,cts:0})}else if(e===_r.audioTrackId){if(yr._opt.hasAudio)for(const e of r){const t=e.data,r=1e3*e.cts/e.timescale;e.duration,e.timescale;const i=new Uint8Array(t.byteLength+2);i.set([175,1],0),i.set(t,2),postMessage({cmd:z,type:me,value:i.byteLength}),yr.decode(i,{type:Q,ts:r,isIFrame:!1,cts:0})}}else yr.debug.warn(_r.LOG_NAME,"onSamples() trackId error",e)},dispatch(e){let t=e;"string"!=typeof e?"object"==typeof e?(_r.transportDescarmber&&(t=_r.transportDescarmber.transport(t)),t.buffer.fileStart=_r.offset,_r.offset+=t.byteLength,_r.mp4Box.appendBuffer(t.buffer)):yr.debug.warn(_r.LOG_NAME,"dispatch()","data is not object",e):yr.debug.warn(_r.LOG_NAME,"dispatch()","data is string",e)},destroy(){_r.mp4Box&&(_r.mp4Box.flush(),_r.mp4Box=null),_r.transportDescarmber&&(_r.transportDescarmber.destroy(),_r.transportDescarmber=null),_r.offset=0,_r.videoTrackId=null,_r.audioTrackId=null,_r.isHevc=!1}},gr={LOG_NAME:"worker mpeg4Demuxer",lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:"init",hasInitVideoCodec:!1,localDts:0,dispatch(e){const t=new Uint8Array(e);gr.extractNALu(t)},destroy(){gr.lastBuffer=new Uint8Array(0),gr.parsedOffset=0,gr.firstStartCodeOffset=0,gr.secondStartCodeOffset=0,gr.state="init",gr.hasInitVideoCodec=!1,gr.localDts=0},extractNALu(e){if(!e||e.byteLength<1)return void yr.debug.warn(gr.LOG_NAME,"extractNALu() buffer error",e);const t=new Uint8Array(gr.lastBuffer.length+e.length);for(t.set(gr.lastBuffer,0),t.set(new Uint8Array(e),gr.lastBuffer.length),gr.lastBuffer=t;;){if("init"===gr.state){let e=!1;for(;gr.lastBuffer.length-gr.parsedOffset>=4;)if(0===gr.lastBuffer[gr.parsedOffset])if(0===gr.lastBuffer[gr.parsedOffset+1])if(1===gr.lastBuffer[gr.parsedOffset+2]){if(182===gr.lastBuffer[gr.parsedOffset+3]){gr.state="findFirstStartCode",gr.firstStartCodeOffset=gr.parsedOffset,gr.parsedOffset+=4,e=!0;break}gr.parsedOffset++}else gr.parsedOffset++;else gr.parsedOffset++;else gr.parsedOffset++;if(e)continue;break}if("findFirstStartCode"===gr.state){let e=!1;for(;gr.lastBuffer.length-gr.parsedOffset>=4;)if(0===gr.lastBuffer[gr.parsedOffset])if(0===gr.lastBuffer[gr.parsedOffset+1])if(1===gr.lastBuffer[gr.parsedOffset+2]){if(182===gr.lastBuffer[gr.parsedOffset+3]){gr.state="findSecondStartCode",gr.secondStartCodeOffset=gr.parsedOffset,gr.parsedOffset+=4,e=!0;break}gr.parsedOffset++}else gr.parsedOffset++;else gr.parsedOffset++;else gr.parsedOffset++;if(e)continue;break}if("findSecondStartCode"===gr.state){if(!(gr.lastBuffer.length-gr.parsedOffset>0))break;{let e,t,r=192&gr.lastBuffer[gr.parsedOffset];e=0==r?gr.secondStartCodeOffset-14:gr.secondStartCodeOffset;let i=0==(192&gr.lastBuffer[gr.firstStartCodeOffset+4]);if(i){if(gr.firstStartCodeOffset-14<0)return void yr.debug.warn(gr.LOG_NAME,"firstStartCodeOffset -14 is",gr.firstStartCodeOffset-14);gr.hasInitVideoCodec||(gr.hasInitVideoCodec=!0,yr.debug.log(gr.LOG_NAME,"setCodec"),br.setCodec(Ae,"")),t=gr.lastBuffer.subarray(gr.firstStartCodeOffset-14,e)}else t=gr.lastBuffer.subarray(gr.firstStartCodeOffset,e);let n=gr.getNaluDts();gr.hasInitVideoCodec?(postMessage({cmd:z,type:_e,value:t.byteLength}),postMessage({cmd:z,type:ge,value:n}),br.decode(t,i?1:0,n)):yr.debug.warn(gr.LOG_NAME,"has not init video codec"),gr.lastBuffer=gr.lastBuffer.subarray(e),gr.firstStartCodeOffset=0==r?14:0,gr.parsedOffset=gr.firstStartCodeOffset+4,gr.state="findFirstStartCode"}}}},getNaluDts(){let e=gr.localDts;return gr.localDts=gr.localDts+40,e}},yr={isPlayer:!0,isPlayback:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:Je,_opt:fr(),mp3Demuxer:null,startStreamRateAndStatsInterval:function(){yr.stopStreamRateAndStatsInterval(),d=setInterval((()=>{l&&l(0);const e=JSON.stringify({demuxBufferDelay:yr.getVideoBufferLength(),audioDemuxBufferDelay:yr.getAudioBufferLength(),flvBufferByteLength:yr.getFlvBufferLength(),netBuf:yr.networkDelay||0,pushLatestDelay:yr.pushLatestDelay||0,isStreamTsMoreThanLocal:Ke});postMessage({cmd:z,type:ve,value:e})}),1e3)},stopStreamRateAndStatsInterval:function(){d&&(clearInterval(d),d=null)},useOffscreen:function(){return yr._opt.useOffscreen&&"undefined"!=typeof OffscreenCanvas},getDelay:function(e,t){if(!e||yr._opt.hasVideo&&!Ye)return-1;if(t===Q)return yr.delay;if(yr.preDelayTimestamp&&yr.preDelayTimestamp>e)return yr.preDelayTimestamp-e>1e3&&yr.debug.warn("worker",`getDelay() and preDelayTimestamp is ${yr.preDelayTimestamp} > timestamp is ${e} more than ${yr.preDelayTimestamp-e}ms and return ${yr.delay}`),yr.preDelayTimestamp=e,yr.delay;if(yr.firstTimestamp){if(e){const t=Date.now()-yr.startTimestamp,r=e-yr.firstTimestamp;t>=r?(Ke=!1,yr.delay=t-r):(Ke=!0,yr.delay=r-t)}}else yr.firstTimestamp=e,yr.startTimestamp=Date.now(),yr.delay=-1;return yr.preDelayTimestamp=e,yr.delay},getDelayNotUpdateDelay:function(e,t){if(!e||yr._opt.hasVideo&&!Ye)return-1;if(t===Q)return yr.pushLatestDelay;if(yr.preDelayTimestamp&&yr.preDelayTimestamp-e>1e3)return yr.debug.warn("worker",`getDelayNotUpdateDelay() and preDelayTimestamp is ${yr.preDelayTimestamp} > timestamp is ${e} more than ${yr.preDelayTimestamp-e}ms and return -1`),-1;if(yr.firstTimestamp){let t=-1;if(e){const r=Date.now()-yr.startTimestamp,i=e-yr.firstTimestamp;r>=i?(Ke=!1,t=r-i):(Ke=!0,t=i-r)}return t}return-1},resetDelay:function(){yr.firstTimestamp=null,yr.startTimestamp=null,yr.delay=-1,yr.dropping=!1},resetAllDelay:function(){yr.resetDelay(),yr.preDelayTimestamp=null},doDecode:function(e){yr._opt.isEmitSEI&&e.type===ee&&yr.isWorkerFetch&&yr.findSei(e.payload,e.ts),yr._opt.useWCS&&yr.useOffscreen()&&e.type===ee&&s.decode?s.decode(e.payload,e.ts,e.cts):e.decoder.decode(e.payload,e.ts,e.isIFrame,e.cts)},decodeNext(e){if(0===i.length)return;const t=e.ts,n=i[0],s=e.type===ee&&xt(e.payload);if(Tt(r))s&&(yr.debug.log("worker",`decode data type is ${e.type} and\n ts is ${t} next data type is ${n.type} ts is ${n.ts}\n isVideoSqeHeader is ${s}`),i.shift(),yr.doDecode(n));else{const r=n.ts-t,a=n.type===Q&&e.type===ee;(r<=20||a||s)&&(yr.debug.log("worker",`decode data type is ${e.type} and\n ts is ${t} next data type is ${n.type} ts is ${n.ts}\n diff is ${r} and isVideoAndNextAudio is ${a} and isVideoSqeHeader is ${s}`),i.shift(),yr.doDecode(n))}},init:function(){yr.debug.log("worker","init and opt is",JSON.stringify(yr._opt));const e=yr._opt.playType===_,t=yr._opt.playType===g;if(mr.init(),yr.isPlayer=e,yr.isPlayback=t,yr.isPlaybackCacheBeforeDecodeForFpsRender())yr.debug.log("worker","playback and playbackIsCacheBeforeDecodeForFpsRender is true");else{const t=()=>{let t=null;if(i.length){if(yr.isPushDropping)return void yr.debug.warn("worker",`loop() isPushDropping is true and bufferList length is ${i.length}`);if(yr.dropping){for(t=i.shift(),yr.debug.warn("worker",`loop() dropBuffer is dropping and isIFrame ${t.isIFrame} and delay is ${yr.delay} and bufferlist is ${i.length}`);!t.isIFrame&&i.length;)t=i.shift();const e=yr.getDelayNotUpdateDelay(t.ts,t.type);t.isIFrame&&e<=yr.getNotDroppingDelayTs()&&(yr.debug.log("worker","loop() is dropping = false, is iFrame"),yr.dropping=!1,yr.doDecode(t),yr.decodeNext(t))}else if(yr.isPlayback||yr.isPlayUseMSE())for(;i.length;)t=i.shift(),yr.doDecode(t);else if(t=i[0],-1===yr.getDelay(t.ts,t.type))yr.debug.log("worker","loop() common dumex delay is -1 ,data.ts is",t.ts),i.shift(),yr.doDecode(t),yr.decodeNext(t);else if(yr.delay>yr._opt.videoBuffer+yr._opt.videoBufferDelay&&e)yr.hasIframeInBufferList()?(yr.debug.log("worker",`delay is ${yr.delay}, set dropping is true`),yr.resetAllDelay(),yr.dropping=!0,postMessage({cmd:O})):(i.shift(),yr.doDecode(t),yr.decodeNext(t));else for(;i.length;){if(t=i[0],!(yr.getDelay(t.ts,t.type)>yr._opt.videoBuffer)){yr.delay<0&&yr.debug.warn("worker",`loop() do not decode and delay is ${yr.delay}, bufferList is ${i.length}`);break}i.shift(),yr.doDecode(t)}}else-1!==yr.delay&&yr.debug.log("worker","loop() bufferList is empty and reset delay"),yr.resetAllDelay()};yr.stopId=setInterval((()=>{let e=(new Date).getTime();Xe||(Xe=e);const r=e-Xe;r>100&&yr.debug.warn("worker",`loop demux diff time is ${r}`),t(),Xe=(new Date).getTime()}),20)}Tt(yr._opt.checkFirstIFrame)&&(Ye=!0)},playbackCacheLoop:function(){yr.stopId&&(clearInterval(yr.stopId),yr.stopId=null);const e=()=>{let e=null;i.length&&(e=i.shift(),yr.doDecode(e))};e();const t=Math.ceil(1e3/(yr.streamFps*yr._opt.playbackRate));yr.debug.log("worker",`playbackCacheLoop fragDuration is ${t}, streamFps is ${yr.streamFps}, streamAudioFps is ${yr.streamAudioFps} ,streamVideoFps is ${yr.streamVideoFps} playbackRate is ${yr._opt.playbackRate}`),yr.stopId=setInterval(e,t)},close:function(){if(yr.debug.log("worker","close"),yr.isDestroyed=!0,pr(),!o||1!==o.readyState&&2!==o.readyState?o&&yr.debug.log("worker",`close() and socket.readyState is ${o.readyState}`):(cr=!0,o.close(1e3,"Client disconnecting")),o=null,yr.stopStreamRateAndStatsInterval(),yr.stopId&&(clearInterval(yr.stopId),yr.stopId=null),yr.mp3Demuxer&&(yr.mp3Demuxer.destroy(),yr.mp3Demuxer=null),yr.writableStream&&Tt(yr.writableStream.locked)&&yr.writableStream.close().catch((e=>{yr.debug.log("worker","close() and writableStream.close() error",e)})),yr.writableStream=null,vr)try{vr.clear&&vr.clear(),vr=null}catch(e){yr.debug.warn("worker","close() and audioDecoder.clear error",e)}if(br)try{br.clear&&br.clear(),br=null}catch(e){yr.debug.warn("worker","close() and videoDecoder.clear error",e)}l=null,Xe=null,Ke=!1,s&&(s.reset&&s.reset(),s=null),yr.firstTimestamp=null,yr.startTimestamp=null,yr.networkDelay=0,yr.streamFps=null,yr.streamAudioFps=null,yr.streamVideoFps=null,yr.delay=-1,yr.pushLatestDelay=-1,yr.preDelayTimestamp=null,yr.dropping=!1,yr.isPushDropping=!1,yr.isPlayer=!0,yr.isPlayback=!1,yr.isWorkerFetch=!1,yr._opt=fr(),yr.webglObj&&(yr.webglObj.destroy(),yr.offscreenCanvas.removeEventListener("webglcontextlost",yr.onOffscreenCanvasWebglContextLost),yr.offscreenCanvas.removeEventListener("webglcontextrestored",yr.onOffscreenCanvasWebglContextRestored),yr.offscreenCanvas=null,yr.offscreenCanvasGL=null,yr.offscreenCanvasCtx=null),i=[],n=[],u=null,v=null,b=null,E=!1,Ge=!1,Ye=!1,qt=!1,Qt=!1,lr=!1,dr=null,ur=null,Ct=[],Ft=0,Dt=0,at=null,ft=null,Lt=null,Rt=null,hr=null,jt=0,Yt=0,Bt=null,kt=null,yr.fetchStatus=Je,mr.destroy(),_r.destroy(),gr.destroy(),postMessage({cmd:W})},pushBuffer:function(e,t){if(t.type===Q&<(e)){if(yr.debug.log("worker",`pushBuffer audio ts is ${t.ts}, isAacCodecPacket is true`),yr._opt.isRecordTypeFlv){const t=new Uint8Array(e);postMessage({cmd:K,buffer:t},[t.buffer])}yr.decodeAudio(e,t.ts)}else if(t.type===ee&&t.isIFrame&&xt(e)){if(yr.debug.log("worker",`pushBuffer video ts is ${t.ts}, isVideoSequenceHeader is true`),yr._opt.isRecordTypeFlv){const t=new Uint8Array(e);postMessage({cmd:X,buffer:t},[t.buffer])}yr.decodeVideo(e,t.ts,t.isIFrame,t.cts)}else{if(yr._opt.isRecording)if(yr._opt.isRecordTypeFlv){const r=new Uint8Array(e);postMessage({cmd:Z,type:t.type,buffer:r,ts:t.ts},[r.buffer])}else if(yr._opt.recordType===y)if(t.type===ee){const r=new Uint8Array(e).slice(5);postMessage({cmd:D,buffer:r,isIFrame:t.isIFrame,ts:t.ts,cts:t.cts},[r.buffer])}else if(t.type===Q&&yr._opt.isWasmMp4){const r=new Uint8Array(e),i=dt(r)?r.slice(2):r.slice(1);postMessage({cmd:k,buffer:i,ts:t.ts},[i.buffer])}if(yr.isPlayer&&jt>0&&Rt>0&&t.type===ee){const e=t.ts-Rt,r=jt+jt/2;e>r&&yr.debug.log("worker",`pushBuffer video\n ts is ${t.ts}, preTimestamp is ${Rt},\n diff is ${e} and preTimestampDuration is ${jt} and maxDiff is ${r}\n maybe trigger black screen or flower screen\n `)}if(yr.isPlayer&&Rt>0&&t.type===ee&&t.tsw&&(yr.debug.warn("worker",`pushBuffer,\n preTimestamp is ${Rt}, options.ts is ${t.ts},\n diff is ${Rt-t.ts} more than 3600000,\n and resetAllDelay`),yr.resetAllDelay()),yr.isPlayer&&t.ts<=Rt&&Rt>0&&t.type===ee&&(yr.debug.warn("worker",`pushBuffer,\n options.ts is ${t.ts} less than (or equal) preTimestamp is ${Rt} and\n payloadBufferSize is ${e.byteLength} and prevPayloadBufferSize is ${Yt}`),yr._opt.isDropSameTimestampGop&&Ye)){const e=yr.hasIframeInBufferList(),t=Tt(yr.isPushDropping);return yr.debug.log("worker",`pushBuffer, isDropSameTimestampGop is true and\n hasIframe is ${e} and isNotPushDropping is ${t} and next dropBuffer`),void(e&&t?yr.dropBuffer$2():(yr.clearBuffer(!0),At(yr._opt.checkFirstIFrame)&&At(r)&&postMessage({cmd:J})))}if(yr.isPlayer&&Ye){const e=yr._opt.videoBuffer+yr._opt.videoBufferDelay,r=yr.getDelayNotUpdateDelay(t.ts,t.type);yr.pushLatestDelay=r,r>e&&yr.delay0&&yr.hasIframeInBufferList()&&!1===yr.isPushDropping&&(yr.debug.log("worker",`pushBuffer(), pushLatestDelay is ${r} more than ${e} and decoder.delay is ${yr.delay} and has iIframe and next decoder.dropBuffer$2()`),yr.dropBuffer$2())}if(yr.isPlayer&&t.type===ee&&(Rt>0&&(jt=t.ts-Rt),Yt=e.byteLength,Rt=t.ts),t.type===Q?i.push({ts:t.ts,payload:e,decoder:{decode:yr.decodeAudio},type:Q,isIFrame:!1}):t.type===ee&&i.push({ts:t.ts,cts:t.cts,payload:e,decoder:{decode:yr.decodeVideo},type:ee,isIFrame:t.isIFrame}),yr.isPlaybackCacheBeforeDecodeForFpsRender()&&(_t(yr.streamVideoFps)||_t(yr.streamAudioFps))){let e=yr.streamVideoFps,t=yr.streamAudioFps;if(_t(yr.streamVideoFps)&&(e=St(i,ee),e&&(yr.streamVideoFps=e,postMessage({cmd:N,value:yr.streamVideoFps}),yr.streamFps=t?e+t:e,Tt(yr._opt.hasAudio)&&(yr.debug.log("worker","playbackCacheBeforeDecodeForFpsRender, _opt.hasAudio is false and set streamAudioFps is 0"),yr.streamAudioFps=0),yr.playbackCacheLoop())),_t(yr.streamAudioFps)&&(t=St(i,Q),t&&(yr.streamAudioFps=t,yr.streamFps=e?e+t:t,yr.playbackCacheLoop())),_t(yr.streamVideoFps)&&_t(yr.streamAudioFps)){const r=i.map((e=>({type:e.type,ts:e.ts})));yr.debug.log("worker",`playbackCacheBeforeDecodeForFpsRender, calc streamAudioFps is ${t}, streamVideoFps is ${e}, bufferListLength is ${i.length}, and ts list is ${JSON.stringify(r)}`)}const r=yr.getAudioBufferLength()>0,n=r?60:40;i.length>=n&&(yr.debug.warn("worker",`playbackCacheBeforeDecodeForFpsRender, bufferListLength is ${i.length} more than ${n}, and hasAudio is ${r} an set streamFps is 25`),yr.streamVideoFps=25,postMessage({cmd:N,value:yr.streamVideoFps}),r?(yr.streamAudioFps=25,yr.streamFps=yr.streamVideoFps+yr.streamAudioFps):yr.streamFps=yr.streamVideoFps,yr.playbackCacheLoop())}}},getVideoBufferLength(){let e=0;return i.forEach((t=>{t.type===ee&&(e+=1)})),e},hasIframeInBufferList:()=>i.some((e=>e.type===ee&&e.isIFrame)),isAllIframeInBufferList(){const e=yr.getVideoBufferLength();let t=0;return i.forEach((e=>{e.type===ee&&e.isIFrame&&(t+=1)})),e===t},getNotDroppingDelayTs:()=>yr._opt.videoBuffer+yr._opt.videoBufferDelay/2,getAudioBufferLength(){let e=0;return i.forEach((t=>{t.type===Q&&(e+=1)})),e},getFlvBufferLength(){let e=0;return u&&u.buffer&&(e=u.buffer.byteLength),yr._opt.isNakedFlow&&mr.lastBuf&&(e=mr.lastBuf.byteLength),e},fetchStream:function(e,t){yr.debug.log("worker","fetchStream, url is "+e,"options:",JSON.stringify(t)),yr.isWorkerFetch=!0,t.isFlv?yr._opt.isFlv=!0:t.isFmp4?yr._opt.isFmp4=!0:t.isMpeg4?yr._opt.isMpeg4=!0:t.isNakedFlow&&(yr._opt.isNakedFlow=!0),l=pt((e=>{postMessage({cmd:z,type:pe,value:e})})),yr.startStreamRateAndStatsInterval(),t.isFmp4&&(_r.listenMp4Box(),yr._opt.isFmp4Private&&_r.initTransportDescarmber()),t.protocol===f?(u=new Pt(yr.demuxFlv()),fetch(e,{signal:a.signal}).then((e=>{if(At(cr))return yr.debug.log("worker","request abort and run res.body.cancel()"),yr.fetchStatus=Je,void e.body.cancel();if(!Et(e))return yr.debug.warn("worker",`fetch response status is ${e.status} and ok is ${e.ok} and emit error and next abort()`),pr(),void postMessage({cmd:z,type:Se.fetchError,value:`fetch response status is ${e.status} and ok is ${e.ok}`});if(postMessage({cmd:z,type:ye}),bt())yr.writableStream=new WritableStream({write:e=>a&&a.signal&&a.signal.aborted?(yr.debug.log("worker","writableStream write() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et)):At(cr)?(yr.debug.log("worker","writableStream write() and requestAbort is true so return"),void(yr.fetchStatus=et)):(yr.fetchStatus=Qe,l(e.byteLength),void(t.isFlv?u.write(e):t.isFmp4?yr.demuxFmp4(e):t.isMpeg4&&yr.demuxMpeg4(e))),close:()=>{yr.fetchStatus=et,u=null,pr(),postMessage({cmd:z,type:fe,value:p})},abort:e=>{if(a&&a.signal&&a.signal.aborted)return yr.debug.log("worker","writableStream abort() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et);u=null,e.name!==qe&&(pr(),postMessage({cmd:z,type:Se.fetchError,value:e.toString()}))}}),e.body.pipeTo(yr.writableStream);else{const r=e.body.getReader(),i=()=>{r.read().then((e=>{let{done:r,value:n}=e;return r?(yr.fetchStatus=et,u=null,pr(),void postMessage({cmd:z,type:fe,value:p})):a&&a.signal&&a.signal.aborted?(yr.debug.log("worker","fetchNext().then() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et)):At(cr)?(yr.debug.log("worker","fetchNext().then() and requestAbort is true so return"),void(yr.fetchStatus=et)):(yr.fetchStatus=Qe,l(n.byteLength),t.isFlv?u.write(n):t.isFmp4?yr.demuxFmp4(n):t.isMpeg4&&yr.demuxMpeg4(n),void i())})).catch((e=>{if(a&&a.signal&&a.signal.aborted)return yr.debug.log("worker","fetchNext().catch() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et);u=null,e.name!==qe&&(pr(),postMessage({cmd:z,type:Se.fetchError,value:e.toString()}))}))};i()}})).catch((e=>{a&&a.signal&&a.signal.aborted?yr.debug.log("worker","fetch().catch() and abortController.signal.aborted is true so return"):e.name!==qe&&(pr(),postMessage({cmd:z,type:Se.fetchError,value:e.toString()}),u=null)}))):t.protocol===c&&(t.isFlv&&(u=new Pt(yr.demuxFlv())),o=new WebSocket(e),o.binaryType="arraybuffer",o.onopen=()=>{yr.debug.log("worker","fetchStream, WebsocketStream socket open"),postMessage({cmd:z,type:ye}),postMessage({cmd:z,type:we})},o.onclose=e=>{yr.debug.log("worker",`fetchStream, WebsocketStream socket close and code is ${e.code}`),1006===e.code&&yr.debug.error("worker",`fetchStream, WebsocketStream socket close abnormally and code is ${e.code}`),At(cr)?yr.debug.log("worker","fetchStream, WebsocketStream socket close and requestAbort is true so return"):(u=null,postMessage({cmd:z,type:fe,value:m}))},o.onerror=e=>{yr.debug.error("worker","fetchStream, WebsocketStream socket error",e),u=null,postMessage({cmd:z,type:Se.websocketError,value:e.isTrusted?"websocket user aborted":"websocket error"})},o.onmessage=e=>{l(e.data.byteLength),t.isFlv?u.write(e.data):t.isFmp4?yr.demuxFmp4(e.data):t.isMpeg4?yr.demuxMpeg4(e.data):yr._opt.isNakedFlow?yr.demuxNakedFlow(e.data):yr.demuxM7s(e.data)})},demuxFlv:function*(){yield 9;const e=new ArrayBuffer(4),t=new Uint8Array(e),r=new Uint32Array(e);for(;;){t[3]=0;const e=yield 15,i=e[4];t[0]=e[7],t[1]=e[6],t[2]=e[5];const n=r[0];t[0]=e[10],t[1]=e[9],t[2]=e[8],t[3]=e[11];let s=r[0];const a=(yield n).slice();switch(i){case te:if(a.byteLength>0){let e=a;At(yr._opt.m7sCryptoAudio)&&(e=yr.cryptoPayloadAudio(a)),yr.decode(e,{type:Q,ts:s})}else yr.debug.warn("worker",`demuxFlv() type is audio and payload.byteLength is ${a.byteLength} and return`);break;case re:if(a.byteLength>=6){const e=a[0];if(yr._isEnhancedH265Header(e))yr._decodeEnhancedH265Video(a,s);else{a[0];const e=a[0]>>4===Ze;if(e&&xt(a)&&null===dr){const e=15&a[0];dr=e===xe,ur=Zt(a,dr),yr.debug.log("worker",`demuxFlv() isVideoSequenceHeader is true and isHevc is ${dr} and nalUnitSize is ${ur}`)}e&&yr.calcIframeIntervalTimestamp(s),yr.isPlayer&&yr.calcNetworkDelay(s),r[0]=a[4],r[1]=a[3],r[2]=a[2],r[3]=0;let t=r[0],i=yr.cryptoPayload(a,e);yr.decode(i,{type:ee,ts:s,isIFrame:e,cts:t})}}else yr.debug.warn("worker",`demuxFlv() type is video and payload.byteLength is ${a.byteLength} and return`);break;case ie:postMessage({cmd:q,buffer:a},[a.buffer]);break;default:yr.debug.log("worker",`demuxFlv() type is ${i}`)}}},decode:function(e,t){t.type===Q?yr._opt.hasAudio&&(postMessage({cmd:z,type:me,value:e.byteLength}),yr.isPlayer?yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts}):yr.isPlayback&&(yr.isPlaybackCacheBeforeDecodeForFpsRender(),yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts}))):t.type===ee&&yr._opt.hasVideo&&(postMessage({cmd:z,type:_e,value:e.byteLength}),postMessage({cmd:z,type:ge,value:t.ts}),yr.isPlayer?yr.pushBuffer(e,{type:t.type,ts:t.ts,isIFrame:t.isIFrame,cts:t.cts}):yr.isPlayback&&(yr.isPlaybackOnlyDecodeIFrame()?t.isIFrame&&yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts,isIFrame:t.isIFrame}):(yr.isPlaybackCacheBeforeDecodeForFpsRender(),yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts,isIFrame:t.isIFrame}))))},cryptoPayload:function(e,t){let r=e;return yr._opt.isM7sCrypto?yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?r=Gr(e,yr._opt.cryptoKey,yr._opt.cryptoIV,dr):yr.debug.error("worker",`isM7sCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`):yr._opt.isSm4Crypto?yr._opt.sm4CryptoKey&&t?r=di(e,yr._opt.sm4CryptoKey):yr._opt.sm4CryptoKey||yr.debug.error("worker","isSm4Crypto opt.sm4CryptoKey is null"):yr._opt.isXorCrypto&&(yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?r=pi(e,yr._opt.cryptoKey,yr._opt.cryptoIV,dr):yr.debug.error("worker",`isXorCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`)),r},cryptoPayloadAudio:function(e){let t=e;return yr._opt.isM7sCrypto&&(yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?e[0]>>4===Be&&(t=Hr(e,yr._opt.cryptoKey,yr._opt.cryptoIV)):yr.debug.error("worker",`isM7sCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`)),t},setCodecAudio:function(e,t){const r=e[0]>>4,i=e[0]>>1&1;if(hr=r===Be?i?16:8:0===i?8:16,vr&&vr.setCodec)if(lt(e)||r===ke||r===Fe||r===Pe){yr.debug.log("worker",`setCodecAudio: init audio codec, codeId is ${r}`);const i=r===Be?e.slice(2):new Uint8Array(0);vr.setCodec(r,yr._opt.sampleRate,i),postMessage({cmd:F,buffer:i},[i.buffer]),Ge=!0,r!==Be&&(r===Pe?(yr.mp3Demuxer||(yr.mp3Demuxer=new hi(yr),yr.mp3Demuxer.on("data",((e,t)=>{vr.decode(e,t)}))),yr.mp3Demuxer.dispatch(e.slice(1),t)):vr.decode(e.slice(1),t));{const e=Number("1")||1;setTimeout((()=>{yr.debug.error("worker","jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),yr.close(),postMessage({cmd:$})}),60*e*60*1e3)}}else yr.debug.warn("worker","setCodecAudio: hasInitAudioCodec is false, codecId is ",r);else yr.debug.error("worker","setCodecAudio: audioDecoder or audioDecoder.setCodec is null")},decodeAudio:function(e,t){if(yr.isDestroyed)yr.debug.log("worker","decodeAudio, decoder is destroyed and return");else if(At(r)&&At(yr._opt.mseDecodeAudio))postMessage({cmd:R,payload:e,ts:t,cts:t},[e.buffer]);else{const r=e[0]>>4;Ge?r===Pe?yr.mp3Demuxer.dispatch(e.slice(1),t):vr.decode(r===Be?e.slice(2):e.slice(1),t):yr.setCodecAudio(e,t)}},setCodecVideo:function(e){const t=15&e[0];if(br&&br.setCodec)if(xt(e))if(t===Ue||t===xe){yr.debug.log("worker",`setCodecVideo: init video codec , codecId is ${t}`);const r=e.slice(5);if(t===Ue&&yr._opt.useSIMD){const e=zt(r);if(e.codecWidth>S||e.codecHeight>S)return postMessage({cmd:V}),void yr.debug.warn("worker",`setCodecVideo: SIMD H264 decode video width is too large, width is ${e.codecWidth}, height is ${e.codecHeight}`)}E=!0,br.setCodec(t,r),yr._opt.recordType===y&&postMessage({cmd:I,buffer:e,codecId:t},[e.buffer])}else yr.debug.warn("worker",`setCodecVideo: hasInitVideoCodec is false, codecId is ${t} is not H264 or H265`);else yr.debug.warn("worker",`decodeVideo: hasInitVideoCodec is false, codecId is ${t} and frameType is ${e[0]>>4} and packetType is ${e[1]}`);else yr.debug.error("worker","setCodecVideo: videoDecoder or videoDecoder.setCodec is null")},decodeVideo:function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(yr.isDestroyed)yr.debug.log("worker","decodeVideo, decoder is destroyed and return");else if(At(r))postMessage({cmd:L,payload:e,isIFrame:i,ts:t,cts:n,delay:yr.delay},[e.buffer]);else if(E)if(!Ye&&i&&(Ye=!0),Ye){if(i&&xt(e)){const t=15&e[0];let r={};t===Ue?r=zt(e.slice(5)):t===xe&&(r=Jt(e)),r.codecWidth&&r.codecHeight&&v&&b&&(r.codecWidth!==v||r.codecHeight!==b)&&(yr.debug.warn("worker",`\n decodeVideo: video width or height is changed,\n old width is ${v}, old height is ${b},\n new width is ${r.codecWidth}, new height is ${r.codecHeight},\n and emit change event`),Qt=!0,postMessage({cmd:G}))}if(Qt)return void yr.debug.warn("worker","decodeVideo: video width or height is changed, and return");if(lr)return void yr.debug.warn("worker","decodeVideo: simd decode error, and return");if(xt(e))return void yr.debug.warn("worker","decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void yr.debug.warn("worker",`decodeVideo and payload is too small , payload length is ${e.byteLength}`);const r=e.slice(5);br.decode(r,i?1:0,t)}else yr.debug.log("worker","decodeVideo first frame is not iFrame");else yr.setCodecVideo(e)},clearBuffer:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];yr.debug.log("worker",`clearBuffer,bufferList length is ${i.length}, need clear is ${e}`),e&&(i=[]),yr.isPlayer&&(yr.resetAllDelay(),At(yr._opt.checkFirstIFrame)&&(yr.dropping=!0,postMessage({cmd:O}))),At(yr._opt.checkFirstIFrame)&&Tt(r)&&(Ye=!1)},dropBuffer$2:function(){if(i.length>0){let e=i.findIndex((e=>At(e.isIFrame)&&e.type===ee));if(yr.isAllIframeInBufferList())for(let t=0;t=yr.getNotDroppingDelayTs()){yr.debug.log("worker",`dropBuffer$2() isAllIframeInBufferList() is true, and index is ${t} and tempDelay is ${n} and notDroppingDelayTs is ${yr.getNotDroppingDelayTs()}`),e=t;break}}if(e>=0){yr.isPushDropping=!0,postMessage({cmd:O});const t=i.length;i=i.slice(e);const r=i.shift();yr.resetAllDelay(),yr.getDelay(r.ts,r.type),yr.doDecode(r),yr.isPushDropping=!1,yr.debug.log("worker",`dropBuffer$2() iFrameIndex is ${e},and old bufferList length is ${t} ,new bufferList is ${i.length} and new delay is ${yr.delay} `)}else yr.isPushDropping=!1}0===i.length&&(yr.isPushDropping=!1)},demuxM7s:function(e){const t=new DataView(e),r=t.getUint32(1,!1),i=t.getUint8(0),n=new ArrayBuffer(4),s=new Uint32Array(n);switch(i){case Q:yr.decode(new Uint8Array(e,5),{type:Q,ts:r});break;case ee:if(t.byteLength>=11){const i=new Uint8Array(e,5),n=i[0];if(yr._isEnhancedH265Header(n))yr._decodeEnhancedH265Video(i,r);else{const e=t.getUint8(5)>>4==1;if(e&&(yr.calcIframeIntervalTimestamp(r),xt(i)&&null===dr)){const e=15&i[0];dr=e===xe}yr.isPlayer&&yr.calcNetworkDelay(r),s[0]=i[4],s[1]=i[3],s[2]=i[2],s[3]=0;let n=s[0],a=yr.cryptoPayload(i,e);yr.decode(a,{type:ee,ts:r,isIFrame:e,cts:n})}}else yr.debug.warn("worker",`demuxM7s() type is video and arrayBuffer length is ${e.byteLength} and return`)}},demuxNakedFlow:function(e){mr.dispatch(e)},demuxFmp4:function(e){const t=new Uint8Array(e);_r.dispatch(t)},demuxMpeg4:function(e){gr.dispatch(e)},_decodeEnhancedH265Video:function(e,t){const r=e[0],i=48&r,n=15&r,s=e.slice(1,5),a=new ArrayBuffer(4),o=new Uint32Array(a),l="a"==String.fromCharCode(s[0]);if(dr=Tt(l),n===rt){if(i===st){const r=e.slice(5);if(l);else{const i=new Uint8Array(5+r.length);i.set([28,0,0,0,0],0),i.set(r,5),ur=Zt(e,dr),yr.debug.log("worker",`demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is ${dr} and nalUnitSize is ${ur}`),yr.decode(i,{type:ee,ts:t,isIFrame:!0,cts:0})}}}else if(n===it){let r=e,n=0;const s=i===st;s&&yr.calcIframeIntervalTimestamp(t),l||(o[0]=e[4],o[1]=e[3],o[2]=e[2],o[3]=0,n=o[0],r=rr(e.slice(8),s),r=yr.cryptoPayload(r,s),yr.decode(r,{type:ee,ts:t,isIFrame:s,cts:n}))}else if(n===nt){const r=i===st;r&&yr.calcIframeIntervalTimestamp(t);let n=rr(e.slice(5),r);n=yr.cryptoPayload(n,r),yr.decode(n,{type:ee,ts:t,isIFrame:r,cts:0})}},_isEnhancedH265Header:function(e){return(e&tt)===tt},findSei:function(e,t){let r=4;gt(ur)&&(r=ur),Kt(e.slice(5),r).forEach((e=>{const r=dr?e[0]>>>1&63:31&e[0];(dr&&(r===Ve||r===He)||Tt(dr)&&r===Re)&&postMessage({cmd:Y,buffer:e,ts:t},[e.buffer])}))},flvHasUnitTypeIDR(e,t){const r=Kt(e.slice(5));let i=!1;return r.forEach((e=>{const r=t?e[0]>>>1&63:31&e[0];(t&&(r===ze||r===Me)||Tt(t)&&r===Le)&&(i=!0)})),i},calcNetworkDelay:function(e){if(!(Ye&&e>0))return;null===at?(at=e,ft=ht()):et?r-t:0;yr.networkDelay=i,i>yr._opt.networkDelay&&yr._opt.playType===_&&(yr.debug.warn("worker",`calcNetworkDelay now dts:${e}, start dts is ${at} vs start is ${t},local diff is ${r} ,delay is ${i}`),postMessage({cmd:z,type:be,value:i}))},calcIframeIntervalTimestamp:function(e){null===Lt?Lt=e:Lt=yr._opt.playbackForwardMaxRateDecodeIFrame},isPlayUseMSE:function(){return yr.isPlayer&&yr._opt.useMSE&&At(r)},playbackUpdatePlaybackRate:function(){yr.clearBuffer(!0)},onOffscreenCanvasWebglContextLost:function(e){yr.debug.error("worker","handleOffscreenCanvasWebglContextLost and next try to create webgl"),e.preventDefault(),qt=!0,yr.webglObj.destroy(),yr.webglObj=null,yr.offscreenCanvasGL=null,setTimeout((()=>{yr.offscreenCanvasGL=yr.offscreenCanvas.getContext("webgl"),yr.offscreenCanvasGL&&yr.offscreenCanvasGL.getContextAttributes().stencil?(yr.webglObj=h(yr.offscreenCanvasGL,yr._opt.openWebglAlignment),qt=!1):yr.debug.error("worker","handleOffscreenCanvasWebglContextLost, stencil is false")}),500)},onOffscreenCanvasWebglContextRestored:function(e){yr.debug.log("worker","handleOffscreenCanvasWebglContextRestored"),e.preventDefault()},videoInfo:function(e,t,r){postMessage({cmd:P,code:e}),postMessage({cmd:x,w:t,h:r}),v=t,b=r,yr.useOffscreen()&&(yr.offscreenCanvas=new OffscreenCanvas(t,r),yr.offscreenCanvasGL=yr.offscreenCanvas.getContext("webgl"),yr.webglObj=h(yr.offscreenCanvasGL,yr._opt.openWebglAlignment),yr.offscreenCanvas.addEventListener("webglcontextlost",yr.onOffscreenCanvasWebglContextLost,!1),yr.offscreenCanvas.addEventListener("webglcontextrestored",yr.onOffscreenCanvasWebglContextRestored,!1))},audioInfo:function(e,t,r){postMessage({cmd:B,code:e}),postMessage({cmd:C,sampleRate:t,channels:r,depth:hr}),Dt=r},yuvData:function(t,r){if(yr.isDestroyed)return void yr.debug.log("worker","yuvData, decoder is destroyed and return");const i=v*b*3/2;let n=e.HEAPU8.subarray(t,t+i),s=new Uint8Array(n);if(Bt=null,yr.useOffscreen())try{if(qt)return;yr.webglObj.renderYUV(v,b,s);let e=yr.offscreenCanvas.transferToImageBitmap();postMessage({cmd:A,buffer:e,delay:yr.delay,ts:r},[e])}catch(e){yr.debug.error("worker","yuvData, transferToImageBitmap error is",e)}else postMessage({cmd:A,output:s,delay:yr.delay,ts:r},[s.buffer])},pcmData:function(e,r,i){if(yr.isDestroyed)return void yr.debug.log("worker","pcmData, decoder is destroyed and return");let s=r,a=[],o=0,l=yr._opt.audioBufferSize;for(let r=0;r<2;r++){let i=t.HEAPU32[(e>>2)+r]>>2;a[r]=t.HEAPF32.subarray(i,i+s)}if(Ft){if(!(s>=(r=l-Ft)))return Ft+=s,n[0]=Float32Array.of(...n[0],...a[0]),void(2==Dt&&(n[1]=Float32Array.of(...n[1],...a[1])));Ct[0]=Float32Array.of(...n[0],...a[0].subarray(0,r)),2==Dt&&(Ct[1]=Float32Array.of(...n[1],...a[1].subarray(0,r))),postMessage({cmd:T,buffer:Ct,ts:i},Ct.map((e=>e.buffer))),o=r,s-=r}for(Ft=s;Ft>=l;Ft-=l)Ct[0]=a[0].slice(o,o+=l),2==Dt&&(Ct[1]=a[1].slice(o-l,o)),postMessage({cmd:T,buffer:Ct,ts:i},Ct.map((e=>e.buffer)));Ft&&(n[0]=a[0].slice(o),2==Dt&&(n[1]=a[1].slice(o)))},errorInfo:function(e){null===Bt&&(Bt=ht());const t=ht(),r=ct(kt>0?2*kt:5e3,1e3,5e3),i=t-Bt;i>r&&(yr.debug.warn("worker",`errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is ${kt} and diff is ${i} and maxDiff is ${r}\n and replay`),lr=!0,postMessage({cmd:H}))},sendWebsocketMessage:function(e){o?o.readyState===Ee?o.send(e):yr.debug.error("worker","socket is not open"):yr.debug.error("worker","socket is null")},timeEnd:function(){yr.debug.error("worker","jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),yr.close(),postMessage({cmd:$})},postStreamToMain(e,t){postMessage({cmd:j,type:t,buffer:e},[e.buffer])}};yr.debug=new It(yr);let vr=null;t.AudioDecoder&&(vr=new t.AudioDecoder(yr));let br=null;e.VideoDecoder&&(br=new e.VideoDecoder(yr)),postMessage({cmd:U}),self.onmessage=function(e){let t=e.data;switch(t.cmd){case ne:try{yr._opt=Object.assign(yr._opt,JSON.parse(t.opt))}catch(e){}yr.init();break;case se:yr.pushBuffer(t.buffer,t.options);break;case ae:yr.decodeAudio(t.buffer,t.ts);break;case oe:yr.decodeVideo(t.buffer,t.ts,t.isIFrame);break;case ue:yr.clearBuffer(t.needClear);break;case he:yr.fetchStream(t.url,JSON.parse(t.opt));break;case le:yr.close();break;case de:yr.debug.log("worker","updateConfig",t.key,t.value),yr._opt[t.key]=t.value,"playbackRate"===t.key&&(yr.playbackUpdatePlaybackRate(),yr.isPlaybackCacheBeforeDecodeForFpsRender()&&yr.playbackCacheLoop());break;case ce:yr.sendWebsocketMessage(t.message)}}}(e[1],t)}))})); +!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,t=(e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href,async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};function r(){return $.buffer!=B.buffer&&z(),B}function n(){return $.buffer!=B.buffer&&z(),W}function o(){return $.buffer!=B.buffer&&z(),O}function a(){return $.buffer!=B.buffer&&z(),U}function i(){return $.buffer!=B.buffer&&z(),j}function s(){return $.buffer!=B.buffer&&z(),x}function l(){return $.buffer!=B.buffer&&z(),L}function u(){return $.buffer!=B.buffer&&z(),V}var d,c,f;(f=t).ready=new Promise(((e,t)=>{d=e,c=t})),(f=void 0!==f?f:{}).locateFile=function(e,t){return"decoder-pro-simd-mt-worker.wasm"==e?"undefined"!=typeof JESSIBUCA_PRO_SIMD_MT_WORKER_WASM_URL&&""!=JESSIBUCA_PRO_SIMD_MT_WORKER_WASM_URL?JESSIBUCA_PRO_SIMD_MT_WORKER_WASM_URL:t+e:"decoder-pro-simd-mt-worker.worker.js"==e&&"undefined"!=typeof JESSIBUCA_PRO_SIMD_MT_WORKER_JS_URL&&""!=JESSIBUCA_PRO_SIMD_MT_WORKER_JS_URL?JESSIBUCA_PRO_SIMD_MT_WORKER_JS_URL:t+e};var p,h,m,g=Object.assign({},f),y=(e,t)=>{throw t},v="object"==typeof window,w="function"==typeof importScripts,b="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,_=f.ENVIRONMENT_IS_PTHREAD||!1,E="";function k(e){return f.locateFile?f.locateFile(e,E):E+e}if(b){const{createRequire:e}=await import("module");var S=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href),C=S("fs"),A=S("path");let t;E=w?A.dirname(E)+"/":S("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href)),p=(e,t)=>(e=ue(e)?new URL(e):A.normalize(e),C.readFileSync(e,t?void 0:"utf8")),m=e=>{var t=p(e,!0);return t.buffer||(t=new Uint8Array(t)),t},h=function(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=ue(e)?new URL(e):A.normalize(e),C.readFile(e,n?void 0:"utf8",((e,o)=>{e?r(e):t(n?o.buffer:o)}))},!f.thisProgram&&process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),y=(e,t)=>{throw process.exitCode=e,t},f.inspect=()=>"[Emscripten Module object]";try{t=S("worker_threads")}catch(e){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),e}global.Worker=t.Worker}else(v||w)&&(w?E=self.location.href:"undefined"!=typeof document&&document.currentScript&&(E=document.currentScript.src),e&&(E=e),E=0!==E.indexOf("blob:")?E.substr(0,E.replace(/[?#].*/,"").lastIndexOf("/")+1):"",b||(p=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},w&&(m=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),h=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}));b&&"undefined"==typeof performance&&(global.performance=S("perf_hooks").performance);var T=console.log.bind(console),P=console.error.bind(console);b&&(T=function(){for(var e=arguments.length,t=new Array(e),r=0;re.startsWith(se),ue=e=>e.startsWith("file://");function de(e){if(e==ie&&I)return new Uint8Array(I);if(m)return m(e);throw"both async and sync fetching of the wasm failed"}function ce(e){if(!I&&(v||w)){if("function"==typeof fetch&&!ue(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>de(e)));if(h)return new Promise(((t,r)=>{h(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>de(e)))}function fe(e,t,r){return ce(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{R(`failed to asynchronously prepare wasm: ${e}`),ae(e)}))}function pe(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||le(t)||ue(t)||b||"function"!=typeof fetch?fe(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return R(`wasm streaming compile failed: ${e}`),R("falling back to ArrayBuffer instantiation"),fe(t,r,n)}))))}function he(){var e={a:Dn};function t(e,t){return Fn=e.exports,Ve(Fn.U),Oe=Fn.Y,Z(Fn.Q),D=t,oe(),Fn}if(ne(),f.instantiateWasm)try{return f.instantiateWasm(e,t)}catch(e){R(`Module.instantiateWasm callback failed with error: ${e}`),c(e)}return pe(I,ie,e,(function(e){t(e.instance,e.module)})).catch(c),{}}function me(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}f.locateFile?le(ie="decoder-pro-simd-mt-worker.wasm")||(ie=k(ie)):ie=new URL("decoder-pro-simd-mt-worker.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href).href;var ge=e=>{e.terminate(),e.onmessage=e=>{}},ye=e=>{var t=Re.pthreads[e];delete Re.pthreads[e],ge(t),xn(e),Re.runningWorkers.splice(Re.runningWorkers.indexOf(t),1),t.pthread_ptr=0},ve=e=>{Re.pthreads[e].postMessage({cmd:"cancel"})},we=e=>{var t=Re.pthreads[e];Re.returnWorkerToPool(t)},be=e=>{var t=Re.getNewWorker();if(!t)return 6;Re.runningWorkers.push(t),Re.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var r={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return b&&t.unref(),t.postMessage(r,e.transferList),0},_e=0,Ee=()=>Le||_e>0,ke="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Se=(e,t,r)=>{for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.buffer&&ke)return ke.decode(e.buffer instanceof SharedArrayBuffer?e.slice(t,o):e.subarray(t,o));for(var a="";t>10,56320|1023&u)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Ce=(e,t)=>e?Se(n(),e,t):"",Ae=e=>{var t=zn(),r=e();return Nn(t),r},Te=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Pe=function(e,t){var r=arguments.length-2,n=arguments;return Ae((()=>{for(var o=r,a=Gn(8*o),i=a>>3,s=0;s{if(M=e,_)throw We(e),"unwind";Ie(e)},De=$e,Fe=e=>{if(e instanceof me||"unwind"==e)return M;y(1,e)},Re={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){_?Re.initWorker():Re.initMainThread()},initMainThread(){for(var e=4;e--;)Re.allocateUnusedWorker();Q((()=>{ne(),Re.loadWasmModuleToAllWorkers((()=>oe()))}))},initWorker(){Le=!1},setExitStatus:e=>{M=e},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var e of Re.runningWorkers)ge(e);for(var e of Re.unusedWorkers)ge(e);Re.unusedWorkers=[],Re.runningWorkers=[],Re.pthreads=[]},returnWorkerToPool:e=>{var t=e.pthread_ptr;delete Re.pthreads[t],Re.unusedWorkers.push(e),Re.runningWorkers.splice(Re.runningWorkers.indexOf(e),1),e.pthread_ptr=0,xn(t)},receiveObjectTransfer(e){},threadInitTLS(){Re.tlsInitFunctions.forEach((e=>e()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=r=>{var n=r.data,o=n.cmd;if(n.targetThread&&n.targetThread!=Bn()){var a=Re.pthreads[n.targetThread];a?a.postMessage(n,n.transferList):R(`Internal error! Worker sent a message "${o}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else"checkMailbox"===o?Hr():"spawnThread"===o?be(n):"cleanupThread"===o?we(n.thread):"killThread"===o?ye(n.thread):"cancelThread"===o?ve(n.thread):"loaded"===o?(e.loaded=!0,b&&!e.pthread_ptr&&e.unref(),t(e)):"alert"===o?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?e.postMessage(n):"callHandler"===o?f[n.handler](...n.args):o&&R(`worker sent an unknown command ${o}`)},e.onerror=e=>{throw R(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e},b&&(e.on("message",(t=>e.onmessage({data:t}))),e.on("error",(t=>e.onerror(t))));var r=[];for(var n of["onExit","onAbort","print","printErr"])f.hasOwnProperty(n)&&r.push(n);e.postMessage({cmd:"load",handlers:r,urlOrBlob:f.mainScriptUrlOrBlob,wasmMemory:$,wasmModule:D})})),loadWasmModuleToAllWorkers(e){if(_)return e();Promise.all(Re.unusedWorkers.map(Re.loadWasmModuleToWorker)).then(e)},allocateUnusedWorker(){var e;if(f.locateFile){var t=k("decoder-pro-simd-mt-worker.worker.js");e=new Worker(t,{type:"module"})}else e=new Worker(new URL("decoder-pro-simd-mt-worker.worker.js","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href),{type:"module"});Re.unusedWorkers.push(e)},getNewWorker:()=>(0==Re.unusedWorkers.length&&(Re.allocateUnusedWorker(),Re.loadWasmModuleToWorker(Re.unusedWorkers[0])),Re.unusedWorkers.pop())};f.PThread=Re;var Me=e=>{for(;e.length>0;)e.shift()(f)},Be=()=>{var e=Bn(),t=s()[e+52>>2],r=s()[e+56>>2];Hn(t,t-r),Nn(t)};function We(e){if(_)return Pe(1,0,e);De(e)}f.establishStackSpace=Be;var Oe,Ue=[],je=e=>{var t=Ue[e];return t||(e>=Ue.length&&(Ue.length=e+1),Ue[e]=t=Oe.get(e)),t},xe=(e,t)=>{!function(e){Ee()?Re.setExitStatus(e):Ln(e)}(je(e)(t))};f.invokeEntryPoint=xe;var Le=f.noExitRuntime||!0,Ve=e=>{Re.tlsInitFunctions.push(e)},He=(e,t,r,n)=>{ae(`Assertion failed: ${Ce(e)}, at: `+[t?Ce(t):"unknown filename",r,n?Ce(n):"unknown function"])};function ze(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){s()[this.ptr+4>>2]=e},this.get_type=function(){return s()[this.ptr+4>>2]},this.set_destructor=function(e){s()[this.ptr+8>>2]=e},this.get_destructor=function(){return s()[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,r()[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=r()[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,r()[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=r()[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){s()[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if(qn(this.get_type()))return s()[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var Ne=(e,t,r)=>{throw new ze(e).init(t,r),e},Ge=e=>{On(e,!w,1,!v,2097152,!1),Re.threadInitTLS()},qe=e=>{_?postMessage({cmd:"cleanupThread",thread:e}):we(e)};function Ke(e,t,r,n){return _?Pe(2,1,e,t,r,n):Qe(e,t,r,n)}var Je,Xe,Ye,Qe=(e,t,r,n)=>{if("undefined"==typeof SharedArrayBuffer)return R("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[];if(_&&0===o.length)return Ke(e,t,r,n);var a={startRoutine:r,pthread_ptr:e,arg:n,transferList:o};return _?(a.cmd="spawnThread",postMessage(a,o),0):be(a)},Ze=(e,t,r,n,o)=>{},et=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Je=e},tt=e=>{for(var t="",r=e;n()[r];)t+=Je[n()[r++]];return t},rt={},nt={},ot={},at=e=>{throw new Xe(e)},it=e=>{throw new Ye(e)},st=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&it("Mismatched type converter count");for(var o=0;o{nt.hasOwnProperty(e)?o[t]=nt[e]:(a.push(e),rt.hasOwnProperty(e)||(rt[e]=[]),rt[e].push((()=>{o[t]=nt[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)};function lt(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=t.name;if(e||at(`type "${n}" must have a positive integer typeid pointer`),nt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;at(`Cannot register type '${n}' twice`)}if(nt[e]=t,delete ot[e],rt.hasOwnProperty(e)){var o=rt[e];delete rt[e],o.forEach((e=>e()))}}function ut(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return lt(e,t,r)}var dt,ct=8,ft=(e,t,r,o)=>{ut(e,{name:t=tt(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:o},argPackAdvance:ct,readValueFromPointer:function(e){return this.fromWireType(n()[e])},destructorFunction:null})},pt=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),ht=e=>{at(e.$$.ptrType.registeredClass.name+" instance already deleted")},mt=!1,gt=e=>{},yt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},vt=e=>{e.count.value-=1,0===e.count.value&&yt(e)},wt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=wt(e,t,r.baseClass);return null===n?null:r.downcast(n)},bt={},_t=()=>Object.keys(Tt).length,Et=()=>{var e=[];for(var t in Tt)Tt.hasOwnProperty(t)&&e.push(Tt[t]);return e},kt=[],St=()=>{for(;kt.length;){var e=kt.pop();e.$$.deleteScheduled=!1,e.delete()}},Ct=e=>{dt=e,kt.length&&dt&&dt(St)},At=()=>{f.getInheritedInstanceCount=_t,f.getLiveInheritedInstances=Et,f.flushPendingDeletes=St,f.setDelayFunction=Ct},Tt={},Pt=(e,t)=>{for(void 0===t&&at("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},It=(e,t)=>(t=Pt(e,t),Tt[t]),$t=(e,t)=>(t.ptrType&&t.ptr||it("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&it("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ft(Object.create(e,{$$:{value:t}})));function Dt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=It(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?$t(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):$t(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(t),s=bt[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var l=wt(t,this.registeredClass,a.registeredClass);return null===l?o.call(this):this.isSmartPointer?$t(a.registeredClass.instancePrototype,{ptrType:a,ptr:l,smartPtrType:this,smartPtr:e}):$t(a.registeredClass.instancePrototype,{ptrType:a,ptr:l})}var Ft=e=>"undefined"==typeof FinalizationRegistry?(Ft=e=>e,e):(mt=new FinalizationRegistry((e=>{vt(e.$$)})),Ft=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};mt.register(e,r,e)}return e},gt=e=>mt.unregister(e),Ft(e)),Rt=()=>{Object.assign(Mt.prototype,{isAliasOf(e){if(!(this instanceof Mt))return!1;if(!(e instanceof Mt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o},clone(){if(this.$$.ptr||ht(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Ft(Object.create(Object.getPrototypeOf(this),{$$:{value:pt(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||ht(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&at("Object already scheduled for deletion"),gt(this),vt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||ht(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&at("Object already scheduled for deletion"),kt.push(this),1===kt.length&&dt&&dt(St),this.$$.deleteScheduled=!0,this}})};function Mt(){}var Bt=(e,t)=>Object.defineProperty(t,"name",{value:e}),Wt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||at(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},Ot=(e,t,r)=>{f.hasOwnProperty(e)?((void 0===r||void 0!==f[e].overloadTable&&void 0!==f[e].overloadTable[r])&&at(`Cannot register public name '${e}' twice`),Wt(f,e,e),f.hasOwnProperty(r)&&at(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),f[e].overloadTable[r]=t):(f[e]=t,void 0!==r&&(f[e].numArguments=r))},Ut=48,jt=57,xt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Ut&&t<=jt?`_${e}`:e};function Lt(e,t,r,n,o,a,i,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var Vt=(e,t,r)=>{for(;t!==r;)t.upcast||at(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Ht(e,t){if(null===t)return this.isReference&&at(`null is not a valid ${this.name}`),0;t.$$||at(`Cannot pass "${_r(t)}" as a ${this.name}`),t.$$.ptr||at(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Vt(t.$$.ptr,r,this.registeredClass)}function zt(e,t){var r;if(null===t)return this.isReference&&at(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||at(`Cannot pass "${_r(t)}" as a ${this.name}`),t.$$.ptr||at(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&at(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=Vt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&at("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:at(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var o=t.clone();r=this.rawShare(r,vr.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:at("Unsupporting sharing policy")}return r}function Nt(e,t){if(null===t)return this.isReference&&at(`null is not a valid ${this.name}`),0;t.$$||at(`Cannot pass "${_r(t)}" as a ${this.name}`),t.$$.ptr||at(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&at(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Vt(t.$$.ptr,r,this.registeredClass)}function Gt(e){return this.fromWireType(s()[e>>2])}var qt=()=>{Object.assign(Kt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:ct,readValueFromPointer:Gt,deleteObject(e){null!==e&&e.delete()},fromWireType:Dt})};function Kt(e,t,r,n,o,a,i,s,l,u,d){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=u,this.rawDestructor=d,o||void 0!==t.baseClass?this.toWireType=zt:n?(this.toWireType=Ht,this.destructorFunction=null):(this.toWireType=Nt,this.destructorFunction=null)}var Jt,Xt=(e,t,r)=>{f.hasOwnProperty(e)||it("Replacing nonexistant public symbol"),void 0!==f[e].overloadTable&&void 0!==r?f[e].overloadTable[r]=t:(f[e]=t,f[e].argCount=r)},Yt=(e,t,r)=>{var n=f["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)},Qt=(e,t,r)=>e.includes("j")?Yt(e,t,r):je(t).apply(null,r),Zt=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Qt(e,t,r)}},er=(e,t)=>{var r=(e=tt(e)).includes("j")?Zt(e,t):je(t);return"function"!=typeof r&&at(`unknown function pointer with signature ${e}: ${t}`),r},tr=(e,t)=>{var r=Bt(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},rr=e=>{var t=Wn(e),r=tt(t);return Rn(t),r},nr=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||nt[t]||(ot[t]?ot[t].forEach(e):(r.push(t),n[t]=!0))})),new Jt(`${e}: `+r.map(rr).join([", "]))},or=(e,t,r,n,o,a,i,s,l,u,d,c,f)=>{d=tt(d),a=er(o,a),s&&(s=er(i,s)),u&&(u=er(l,u)),f=er(c,f);var p=xt(d);Ot(p,(function(){nr(`Cannot construct ${d} due to unbound types`,[n])})),st([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:Mt.prototype;var i=Bt(d,(function(){if(Object.getPrototypeOf(this)!==l)throw new Xe("Use 'new' to construct "+d);if(void 0===c.constructor_body)throw new Xe(d+" has no accessible constructor");var e=c.constructor_body[arguments.length];if(void 0===e)throw new Xe(`Tried to invoke ctor of ${d} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(c.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(o,{constructor:{value:i}});i.prototype=l;var c=new Lt(d,i,l,f,r,a,s,u);c.baseClass&&(void 0===c.baseClass.__derivedClasses&&(c.baseClass.__derivedClasses=[]),c.baseClass.__derivedClasses.push(c));var h=new Kt(d,c,!0,!1,!1),m=new Kt(d+"*",c,!1,!1,!1),g=new Kt(d+" const*",c,!1,!0,!1);return bt[e]={pointerType:m,constPointerType:g},Xt(p,i),[h,m,g]}))},ar=(e,t)=>{for(var r=[],n=0;n>2]);return r},ir=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function sr(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=Bt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,o=e.apply(n,t);return o instanceof Object?o:n}function lr(e,t,r,n,o,a){var i=t.length;i<2&&at("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==r,l=!1,u=1;u0?", ":"")+f),p+=(d||a?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",l)p+="runDestructors(destructors);\n";else for(u=s?1:2;u{var i=ar(t,r);o=er(n,o),st([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Xe(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{nr(`Cannot construct ${e.name} due to unbound types`,i)},st([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=lr(r,n,null,o,a),[]))),[]}))},dr=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},cr=(e,t,r,n,o,a,i,s,l)=>{var u=ar(r,n);t=tt(t),t=dr(t),a=er(o,a),st([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function o(){nr(`Cannot call ${n} due to unbound types`,u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var d=e.registeredClass.instancePrototype,c=d[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===r-2?(o.argCount=r-2,o.className=e.name,d[t]=o):(Wt(d,t,n),d[t].overloadTable[r-2]=o),st([],u,(function(o){var s=lr(n,o,e,a,i,l);return void 0===d[t].overloadTable?(s.argCount=r-2,d[t]=s):d[t].overloadTable[r-2]=s,[]})),[]}))};function fr(){Object.assign(pr.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function pr(){this.allocated=[void 0],this.freelist=[]}var hr=new pr,mr=e=>{e>=hr.reserved&&0==--hr.get(e).refcount&&hr.free(e)},gr=()=>{for(var e=0,t=hr.reserved;t{hr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),hr.reserved=hr.allocated.length,f.count_emval_handles=gr},vr={toValue:e=>(e||at("Cannot use deleted val. handle = "+e),hr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return hr.allocate({refcount:1,value:e})}}};function wr(e){return this.fromWireType(i()[e>>2])}var br=(e,t)=>{ut(e,{name:t=tt(t),fromWireType:e=>{var t=vr.toValue(e);return mr(e),t},toWireType:(e,t)=>vr.toHandle(t),argPackAdvance:ct,readValueFromPointer:wr,destructorFunction:null})},_r=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},Er=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(l()[e>>2])};case 8:return function(e){return this.fromWireType(u()[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},kr=(e,t,r)=>{ut(e,{name:t=tt(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:ct,readValueFromPointer:Er(t,r),destructorFunction:null})},Sr=(e,t,l)=>{switch(t){case 1:return l?e=>r()[e>>0]:e=>n()[e>>0];case 2:return l?e=>o()[e>>1]:e=>a()[e>>1];case 4:return l?e=>i()[e>>2]:e=>s()[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Cr=(e,t,r,n,o)=>{t=tt(t);var a=e=>e;if(0===n){var i=32-8*r;a=e=>e<>>i}var s=t.includes("unsigned");ut(e,{name:t,fromWireType:a,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:ct,readValueFromPointer:Sr(t,r,0!==n),destructorFunction:null})},Ar=(e,t,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function a(e){var t=s()[e>>2],n=s()[e+4>>2];return new o(r().buffer,n,t)}ut(e,{name:n=tt(n),fromWireType:a,argPackAdvance:ct,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},Tr=(e,t,r,n)=>{if(!(n>0))return 0;for(var o=r,a=r+n-1,i=0;i=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(r>=a)break;t[r++]=s}else if(s<=2047){if(r+1>=a)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=a)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=a)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o},Pr=(e,t,r)=>Tr(e,n(),t,r),Ir=e=>{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},$r=(e,t)=>{var r="std::string"===(t=tt(t));ut(e,{name:t,fromWireType(e){var t,o=s()[e>>2],a=e+4;if(r)for(var i=a,l=0;l<=o;++l){var u=a+l;if(l==o||0==n()[u]){var d=Ce(i,u-i);void 0===t?t=d:(t+=String.fromCharCode(0),t+=d),i=u+1}}else{var c=new Array(o);for(l=0;l>2]=o,r&&a)Pr(t,l,o+1);else if(a)for(var u=0;u255&&(Rn(l),at("String has UTF-16 code units that do not fit in 8 bits")),n()[l+u]=d}else for(u=0;u{for(var r=e,i=r>>1,s=i+t/2;!(i>=s)&&a()[i];)++i;if((r=i<<1)-e>32&&Dr)return Dr.decode(n().slice(e,r));for(var l="",u=0;!(u>=t/2);++u){var d=o()[e+2*u>>1];if(0==d)break;l+=String.fromCharCode(d)}return l},Rr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,a=(r-=2)<2*e.length?r/2:e.length,i=0;i>1]=s,t+=2}return o()[t>>1]=0,t-n},Mr=e=>2*e.length,Br=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var o=i()[e+4*r>>2];if(0==o)break;if(++r,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},Wr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,o=n+r-4,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),i()[t>>2]=s,(t+=4)+4>o)break}return i()[t>>2]=0,t-n},Or=e=>{for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t},Ur=(e,t,r)=>{var n,o,i,l,u;r=tt(r),2===t?(n=Fr,o=Rr,l=Mr,i=()=>a(),u=1):4===t&&(n=Br,o=Wr,l=Or,i=()=>s(),u=2),ut(e,{name:r,fromWireType:e=>{for(var r,o=s()[e>>2],a=i(),l=e+4,d=0;d<=o;++d){var c=e+4+d*t;if(d==o||0==a[c>>u]){var f=n(l,c-l);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),l=c+t}}return Rn(e),r},toWireType:(e,n)=>{"string"!=typeof n&&at(`Cannot pass non-string to C++ string type ${r}`);var a=l(n),i=Mn(4+a+t);return s()[i>>2]=a>>u,o(n,i+4,a+t),null!==e&&e.push(Rn,i),i},argPackAdvance:ct,readValueFromPointer:wr,destructorFunction(e){Rn(e)}})},jr=(e,t)=>{ut(e,{isVoid:!0,name:t=tt(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},xr=()=>{if(!Ee())try{_?Ln(M):De(M)}catch(e){Fe(e)}},Lr=e=>{if(!H)try{e(),xr()}catch(e){Fe(e)}},Vr=e=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(i(),e>>2,e).value.then(Hr);var t=e+128;Atomics.store(i(),t>>2,1)}};f.__emscripten_thread_mailbox_await=Vr;var Hr=()=>{var e=Bn();e&&(Vr(e),Lr(Vn))};f.checkMailbox=Hr;var zr=(e,t,r)=>{if(e==t)setTimeout((()=>Hr()));else if(_)postMessage({targetThread:e,cmd:"checkMailbox"});else{var n=Re.pthreads[e];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},Nr=[],Gr=(e,t,r,n)=>{Nr.length=r;for(var o=n>>3,a=0;a{b&&Re.pthreads[e].ref()},Kr={},Jr=e=>{var t=Kr[e];return void 0===t?tt(e):t},Xr=[],Yr=(e,t,r,n,o)=>(e=Xr[e])(t=vr.toValue(t),t[r=Jr(r)],n,o),Qr=e=>{var t=Xr.length;return Xr.push(e),t},Zr=(e,t)=>{var r=nt[e];return void 0===r&&at(t+" has unknown type "+rr(e)),r},en=(e,t)=>{for(var r=new Array(e),n=0;n>2],"parameter "+n);return r},tn=(e,t,r)=>{var n=[],o=e.toWireType(n,r);return n.length&&(s()[t>>2]=vr.toHandle(n)),o},rn=(e,t,r)=>{var n=en(e,t),o=n.shift();e--;var a="return function (obj, func, destructorsRef, args) {\n",i=0,s=[];0===r&&s.push("obj");for(var l=["retType"],u=[o],d=0;de.name)).join(", ")}) => ${o.name}>`;return Qr(Bt(f,c))},nn=e=>{e>4&&(hr.get(e).refcount+=1)},on=e=>vr.toHandle(Jr(e)),an=()=>vr.toHandle({}),sn=e=>vr.toHandle(Ce(e)),ln=e=>{var t=vr.toValue(e);ir(t),mr(e)},un=(e,t,r)=>{e=vr.toValue(e),t=vr.toValue(t),r=vr.toValue(r),e[t]=r},dn=(e,t)=>{var r=(e=Zr(e,"_emval_take_value")).readValueFromPointer(t);return vr.toHandle(r)},cn=e=>e%4==0&&(e%100!=0||e%400==0),fn=[0,31,60,91,121,152,182,213,244,274,305,335],pn=[0,31,59,90,120,151,181,212,243,273,304,334],hn=e=>(cn(e.getFullYear())?fn:pn)[e.getMonth()]+e.getDate()-1;function mn(e,t,r){var n=Te(e,t),o=new Date(1e3*n);i()[r>>2]=o.getSeconds(),i()[r+4>>2]=o.getMinutes(),i()[r+8>>2]=o.getHours(),i()[r+12>>2]=o.getDate(),i()[r+16>>2]=o.getMonth(),i()[r+20>>2]=o.getFullYear()-1900,i()[r+24>>2]=o.getDay();var a=0|hn(o);i()[r+28>>2]=a,i()[r+36>>2]=-60*o.getTimezoneOffset();var s=new Date(o.getFullYear(),0,1),l=new Date(o.getFullYear(),6,1).getTimezoneOffset(),u=s.getTimezoneOffset(),d=0|(l!=u&&o.getTimezoneOffset()==Math.min(u,l));i()[r+32>>2]=d}var gn,yn=e=>{var t=Ir(e)+1,r=Mn(t);return r&&Pr(e,r,t),r},vn=(e,t,r)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),l=o.getTimezoneOffset(),u=a.getTimezoneOffset(),d=Math.max(l,u);function c(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}s()[e>>2]=60*d,i()[t>>2]=Number(l!=u);var f=c(o),p=c(a),h=yn(f),m=yn(p);u>2]=h,s()[r+4>>2]=m):(s()[r>>2]=m,s()[r+4>>2]=h)},wn=()=>{ae("")},bn=()=>{},_n=()=>Date.now(),En=()=>{_e+=1},kn=()=>{throw En(),"unwind"};gn=()=>performance.timeOrigin+performance.now();var Sn=()=>536870912,Cn=e=>{var t=(e-$.buffer.byteLength+65535)/65536;try{return $.grow(t),z(),1}catch(e){}},An=e=>{var t=n().length;if((e>>>=0)<=t)return!1;var r=Sn();if(e>r)return!1;for(var o,a,i=1;i<=4;i*=2){var s=t*(1+.2/i);s=Math.min(s,e+100663296);var l=Math.min(r,(o=Math.max(e,s))+((a=65536)-o%a)%a);if(Cn(l))return!0}return!1},Tn=[null,[],[]],Pn=(e,t)=>{var r=Tn[e];0===t||10===t?((1===e?F:R)(Se(r,0)),r.length=0):r.push(t)};function In(e,t,r,o){if(_)return Pe(3,1,e,t,r,o);for(var a=0,i=0;i>2],u=s()[t+4>>2];t+=8;for(var d=0;d>2]=a,0}Re.init(),et(),Xe=f.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Ye=f.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Rt(),At(),qt(),Jt=f.UnboundTypeError=tr(Error,"UnboundTypeError"),fr(),yr();var $n=[Ie,We,Ke,In],Dn={e:He,s:Ne,F:Ge,m:qe,C:Qe,w:Ze,M:ft,v:or,t:ur,j:cr,L:br,o:kr,c:Cr,b:Ar,p:$r,k:Ur,N:jr,z:zr,G:Gr,E:Vr,I:qr,h:Yr,d:mr,g:rn,O:nn,q:on,K:an,D:sn,i:ln,r:un,P:dn,u:mn,y:vn,l:wn,n:bn,J:_n,H:kn,f:gn,x:An,B:De,A:In,a:$||f.wasmMemory},Fn=he(),Rn=e=>(Rn=Fn.R)(e),Mn=e=>(Mn=Fn.S)(e),Bn=f._pthread_self=()=>(Bn=f._pthread_self=Fn.T)();f.__emscripten_tls_init=()=>(f.__emscripten_tls_init=Fn.U)();var Wn=e=>(Wn=Fn.V)(e);f.__embind_initialize_bindings=()=>(f.__embind_initialize_bindings=Fn.W)();var On=f.__emscripten_thread_init=(e,t,r,n,o,a)=>(On=f.__emscripten_thread_init=Fn.X)(e,t,r,n,o,a);f.__emscripten_thread_crashed=()=>(f.__emscripten_thread_crashed=Fn.Z)();var Un,jn=(e,t,r,n)=>(jn=Fn._)(e,t,r,n),xn=e=>(xn=Fn.$)(e),Ln=f.__emscripten_thread_exit=e=>(Ln=f.__emscripten_thread_exit=Fn.aa)(e),Vn=()=>(Vn=Fn.ba)(),Hn=(e,t)=>(Hn=Fn.ca)(e,t),zn=()=>(zn=Fn.da)(),Nn=e=>(Nn=Fn.ea)(e),Gn=e=>(Gn=Fn.fa)(e),qn=e=>(qn=Fn.ga)(e);function Kn(){if(!(te>0)){if(_)return d(f),X(),void startWorker(f);J(),te>0||(f.setStatus?(f.setStatus("Running..."),setTimeout((function(){setTimeout((function(){f.setStatus("")}),1),e()}),1)):e())}function e(){Un||(Un=!0,f.calledRun=!0,H||(X(),d(f),f.onRuntimeInitialized&&f.onRuntimeInitialized(),Y()))}}if(f.dynCall_jiji=(e,t,r,n,o)=>(f.dynCall_jiji=Fn.ha)(e,t,r,n,o),f.___start_em_js=143628,f.___stop_em_js=143685,f.wasmMemory=$,f.keepRuntimeAlive=Ee,f.ExitStatus=me,f.PThread=Re,re=function e(){Un||Kn(),Un||(re=e)},f.preInit)for("function"==typeof f.preInit&&(f.preInit=[f.preInit]);f.preInit.length>0;)f.preInit.pop()();return Kn(),t.ready}),r=(()=>{var e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href;return async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,n,o;(o=t).ready=new Promise(((e,t)=>{r=e,n=t})),(o=void 0!==o?o:{}).locateFile=function(e,t){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:t+e};var a,i,s,l=Object.assign({},o),u="./this.program",d="object"==typeof window,c="function"==typeof importScripts,f="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,p="";function h(e){return o.locateFile?o.locateFile(e,p):p+e}if(f){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href),g=m("fs"),y=m("path");p=c?y.dirname(p)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href)),a=(e,t)=>(e=Q(e)?new URL(e):y.normalize(e),g.readFileSync(e,t?void 0:"utf8")),s=e=>{var t=a(e,!0);return t.buffer||(t=new Uint8Array(t)),t},i=function(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=Q(e)?new URL(e):y.normalize(e),g.readFile(e,n?void 0:"utf8",((e,o)=>{e?r(e):t(n?o.buffer:o)}))},!o.thisProgram&&process.argv.length>1&&(u=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),o.inspect=()=>"[Emscripten Module object]"}else(d||c)&&(c?p=self.location.href:"undefined"!=typeof document&&document.currentScript&&(p=document.currentScript.src),e&&(p=e),p=0!==p.indexOf("blob:")?p.substr(0,p.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},c&&(s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),i=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var v,w,b=o.print||console.log.bind(console),_=o.printErr||console.error.bind(console);Object.assign(o,l),l=null,o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&o.quit,o.wasmBinary&&(v=o.wasmBinary),"object"!=typeof WebAssembly&&G("no native wasm support detected");var E,k,S,C,A,T,P,I,$=!1;function D(e,t){e||G(t)}function F(){var e=w.buffer;o.HEAP8=E=new Int8Array(e),o.HEAP16=S=new Int16Array(e),o.HEAPU8=k=new Uint8Array(e),o.HEAPU16=C=new Uint16Array(e),o.HEAP32=A=new Int32Array(e),o.HEAPU32=T=new Uint32Array(e),o.HEAPF32=P=new Float32Array(e),o.HEAPF64=I=new Float64Array(e)}var R=[],M=[],B=[];function W(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)j(o.preRun.shift());oe(R)}function O(){o.noFSInit||Ie.init.initialized||Ie.init(),Ie.ignorePermissions=!1,oe(M)}function U(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)L(o.postRun.shift());oe(B)}function j(e){R.unshift(e)}function x(e){M.unshift(e)}function L(e){B.unshift(e)}var V=0,H=null;function z(e){V++,o.monitorRunDependencies&&o.monitorRunDependencies(V)}function N(e){if(V--,o.monitorRunDependencies&&o.monitorRunDependencies(V),0==V&&H){var t=H;H=null,t()}}function G(e){o.onAbort&&o.onAbort(e),_(e="Aborted("+e+")"),$=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var q,K,J,X="data:application/octet-stream;base64,",Y=e=>e.startsWith(X),Q=e=>e.startsWith("file://");function Z(e){if(e==q&&v)return new Uint8Array(v);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!v&&(d||c)){if("function"==typeof fetch&&!Q(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Z(e)));if(i)return new Promise(((t,r)=>{i(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Z(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{_(`failed to asynchronously prepare wasm: ${e}`),G(e)}))}function re(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||Y(t)||Q(t)||f||"function"!=typeof fetch?te(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return _(`wasm streaming compile failed: ${e}`),_("falling back to ArrayBuffer instantiation"),te(t,r,n)}))))}function ne(){var e={a:pn};function t(e,t){return hn=e.exports,w=hn.G,F(),Rt=hn.J,x(hn.H),N(),hn}if(z(),o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){_(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return re(v,q,e,(function(e){t(e.instance)})).catch(n),{}}o.locateFile?Y(q="decoder-pro-audio.wasm")||(q=h(q)):q=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd-mt.js",document.baseURI).href).href;var oe=e=>{for(;e.length>0;)e.shift()(o)};function ae(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){T[this.ptr+4>>2]=e},this.get_type=function(){return T[this.ptr+4>>2]},this.set_destructor=function(e){T[this.ptr+8>>2]=e},this.get_destructor=function(){return T[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,E[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=E[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,E[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=E[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){T[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return T[this.ptr+16>>2]},this.get_exception_ptr=function(){if(wn(this.get_type()))return T[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}o.noExitRuntime;var ie=(e,t,r)=>{throw new ae(e).init(t,r),e},se=e=>(A[gn()>>2]=e,e),le={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=le.isAbs(e),r="/"===e.substr(-1);return(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=le.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=le.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return le.normalize(e.join("/"))},join2:(e,t)=>le.normalize(e+"/"+t)},ue=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(f)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}G("initRandomDevice")},de=e=>(de=ue())(e),ce={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Ie.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=le.isAbs(n)}return(t?"/":"")+(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=ce.resolve(e).substr(1),t=ce.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s{for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.buffer&&fe)return fe.decode(e.subarray(t,o));for(var a="";t>10,56320|1023&u)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},he=[],me=e=>{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},ge=(e,t,r,n)=>{if(!(n>0))return 0;for(var o=r,a=r+n-1,i=0;i=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i);if(s<=127){if(r>=a)break;t[r++]=s}else if(s<=2047){if(r+1>=a)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=a)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=a)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o};function ye(e,t,r){var n=r>0?r:me(e)+1,o=new Array(n),a=ge(e,o,0,o.length);return t&&(o.length=a),o}var ve=()=>{if(!he.length){var e=null;if(f){var t=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=g.readSync(n,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;he=ye(e,!0)}return he.shift()},we={ttys:[],init(){},shutdown(){},register(e,t){we.ttys[e]={input:[],output:[],ops:t},Ie.registerDevice(e,we.stream_ops)},stream_ops:{open(e){var t=we.ttys[e.node.rdev];if(!t)throw new Ie.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Ie.ErrnoError(60);for(var a=0,i=0;ive(),put_char(e,t){null===t||10===t?(b(pe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(pe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(_(pe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(_(pe(e.output,0)),e.output=[])}}},be=e=>{G()},_e={ops_table:null,mount:e=>_e.createNode(null,"/",16895,0),createNode(e,t,r,n){if(Ie.isBlkdev(r)||Ie.isFIFO(r))throw new Ie.ErrnoError(63);_e.ops_table||(_e.ops_table={dir:{node:{getattr:_e.node_ops.getattr,setattr:_e.node_ops.setattr,lookup:_e.node_ops.lookup,mknod:_e.node_ops.mknod,rename:_e.node_ops.rename,unlink:_e.node_ops.unlink,rmdir:_e.node_ops.rmdir,readdir:_e.node_ops.readdir,symlink:_e.node_ops.symlink},stream:{llseek:_e.stream_ops.llseek}},file:{node:{getattr:_e.node_ops.getattr,setattr:_e.node_ops.setattr},stream:{llseek:_e.stream_ops.llseek,read:_e.stream_ops.read,write:_e.stream_ops.write,allocate:_e.stream_ops.allocate,mmap:_e.stream_ops.mmap,msync:_e.stream_ops.msync}},link:{node:{getattr:_e.node_ops.getattr,setattr:_e.node_ops.setattr,readlink:_e.node_ops.readlink},stream:{}},chrdev:{node:{getattr:_e.node_ops.getattr,setattr:_e.node_ops.setattr},stream:Ie.chrdev_stream_ops}});var o=Ie.createNode(e,t,r,n);return Ie.isDir(o.mode)?(o.node_ops=_e.ops_table.dir.node,o.stream_ops=_e.ops_table.dir.stream,o.contents={}):Ie.isFile(o.mode)?(o.node_ops=_e.ops_table.file.node,o.stream_ops=_e.ops_table.file.stream,o.usedBytes=0,o.contents=null):Ie.isLink(o.mode)?(o.node_ops=_e.ops_table.link.node,o.stream_ops=_e.ops_table.link.stream):Ie.isChrdev(o.mode)&&(o.node_ops=_e.ops_table.chrdev.node,o.stream_ops=_e.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Ie.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Ie.isDir(e.mode)?t.size=4096:Ie.isFile(e.mode)?t.size=e.usedBytes:Ie.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&_e.resizeFileStorage(e,t.size)},lookup(e,t){throw Ie.genericErrors[44]},mknod:(e,t,r,n)=>_e.createNode(e,t,r,n),rename(e,t,r){if(Ie.isDir(e.mode)){var n;try{n=Ie.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new Ie.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Ie.lookupNode(e,t);for(var n in r.contents)throw new Ie.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=_e.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!Ie.isLink(e.mode))throw new Ie.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)t.set(a.subarray(o,o+i),r);else for(var s=0;s0||r+t(_e.stream_ops.write(e,t,0,n,r,!1),0)}},Ee=(e,t,r,n)=>{var o=n?"":`al ${e}`;i(e,(r=>{D(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),o&&N()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),o&&z()},ke=(e,t,r,n,o,a)=>{Ie.createDataFile(e,t,r,n,o,a)},Se=o.preloadPlugins||[],Ce=(e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return Se.forEach((a=>{o||a.canHandle(t)&&(a.handle(e,t,r,n),o=!0)})),o},Ae=(e,t,r,n,o,a,i,s,l,u)=>{var d=t?ce.resolve(le.join2(e,t)):e;function c(r){function c(r){u&&u(),s||ke(e,t,r,n,o,l),a&&a(),N()}Ce(r,d,c,(()=>{i&&i(),N()}))||c(r)}z(),"string"==typeof r?Ee(r,(e=>c(e)),i):c(r)},Te=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Pe=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Ie={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=ce.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new Ie.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=Ie.root,o="/",a=0;a40)throw new Ie.ErrnoError(32)}}return{path:o,node:n}},getPath(e){for(var t;;){if(Ie.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n>>0)%Ie.nameTable.length},hashAddNode(e){var t=Ie.hashName(e.parent.id,e.name);e.name_next=Ie.nameTable[t],Ie.nameTable[t]=e},hashRemoveNode(e){var t=Ie.hashName(e.parent.id,e.name);if(Ie.nameTable[t]===e)Ie.nameTable[t]=e.name_next;else for(var r=Ie.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Ie.mayLookup(e);if(r)throw new Ie.ErrnoError(r,e);for(var n=Ie.hashName(e.id,t),o=Ie.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===t)return o}return Ie.lookup(e,t)},createNode(e,t,r,n){var o=new Ie.FSNode(e,t,r,n);return Ie.hashAddNode(o),o},destroyNode(e){Ie.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Ie.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=Ie.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{Ie.lookupNode(e,t);return 20}catch(e){}return Ie.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=Ie.lookupNode(e,t)}catch(e){return e.errno}var o=Ie.nodePermissions(e,"wx");if(o)return o;if(r){if(!Ie.isDir(n.mode))return 54;if(Ie.isRoot(n)||Ie.getPath(n)===Ie.cwd())return 10}else if(Ie.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?Ie.isLink(e.mode)?32:Ie.isDir(e.mode)&&("r"!==Ie.flagsToPermissionString(t)||512&t)?31:Ie.nodePermissions(e,Ie.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Ie.MAX_OPEN_FDS;e++)if(!Ie.streams[e])return e;throw new Ie.ErrnoError(33)},getStreamChecked(e){var t=Ie.getStream(e);if(!t)throw new Ie.ErrnoError(8);return t},getStream:e=>Ie.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Ie.FSStream||(Ie.FSStream=function(){this.shared={}},Ie.FSStream.prototype={},Object.defineProperties(Ie.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Ie.FSStream,e),-1==t&&(t=Ie.nextfd()),e.fd=t,Ie.streams[t]=e,e},closeStream(e){Ie.streams[e]=null},chrdev_stream_ops:{open(e){var t=Ie.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Ie.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Ie.devices[e]={stream_ops:t}},getDevice:e=>Ie.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Ie.syncFSRequests++,Ie.syncFSRequests>1&&_(`warning: ${Ie.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Ie.getMounts(Ie.root.mount),n=0;function o(e){return Ie.syncFSRequests--,t(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((t=>{if(!t.type.syncfs)return a(null);t.type.syncfs(t,e,a)}))},mount(e,t,r){var n,o="/"===r,a=!r;if(o&&Ie.root)throw new Ie.ErrnoError(10);if(!o&&!a){var i=Ie.lookupPath(r,{follow_mount:!1});if(r=i.path,n=i.node,Ie.isMountpoint(n))throw new Ie.ErrnoError(10);if(!Ie.isDir(n.mode))throw new Ie.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?Ie.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var t=Ie.lookupPath(e,{follow_mount:!1});if(!Ie.isMountpoint(t.node))throw new Ie.ErrnoError(28);var r=t.node,n=r.mounted,o=Ie.getMounts(n);Object.keys(Ie.nameTable).forEach((e=>{for(var t=Ie.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&Ie.destroyNode(t),t=r}})),r.mounted=null;var a=r.mount.mounts.indexOf(n);r.mount.mounts.splice(a,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=Ie.lookupPath(e,{parent:!0}).node,o=le.basename(e);if(!o||"."===o||".."===o)throw new Ie.ErrnoError(28);var a=Ie.mayCreate(n,o);if(a)throw new Ie.ErrnoError(a);if(!n.node_ops.mknod)throw new Ie.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Ie.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Ie.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",o=0;o(void 0===r&&(r=t,t=438),t|=8192,Ie.mknod(e,t,r)),symlink(e,t){if(!ce.resolve(e))throw new Ie.ErrnoError(44);var r=Ie.lookupPath(t,{parent:!0}).node;if(!r)throw new Ie.ErrnoError(44);var n=le.basename(t),o=Ie.mayCreate(r,n);if(o)throw new Ie.ErrnoError(o);if(!r.node_ops.symlink)throw new Ie.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,o=le.dirname(e),a=le.dirname(t),i=le.basename(e),s=le.basename(t);if(r=Ie.lookupPath(e,{parent:!0}).node,n=Ie.lookupPath(t,{parent:!0}).node,!r||!n)throw new Ie.ErrnoError(44);if(r.mount!==n.mount)throw new Ie.ErrnoError(75);var l,u=Ie.lookupNode(r,i),d=ce.relative(e,a);if("."!==d.charAt(0))throw new Ie.ErrnoError(28);if("."!==(d=ce.relative(t,o)).charAt(0))throw new Ie.ErrnoError(55);try{l=Ie.lookupNode(n,s)}catch(e){}if(u!==l){var c=Ie.isDir(u.mode),f=Ie.mayDelete(r,i,c);if(f)throw new Ie.ErrnoError(f);if(f=l?Ie.mayDelete(n,s,c):Ie.mayCreate(n,s))throw new Ie.ErrnoError(f);if(!r.node_ops.rename)throw new Ie.ErrnoError(63);if(Ie.isMountpoint(u)||l&&Ie.isMountpoint(l))throw new Ie.ErrnoError(10);if(n!==r&&(f=Ie.nodePermissions(r,"w")))throw new Ie.ErrnoError(f);Ie.hashRemoveNode(u);try{r.node_ops.rename(u,n,s)}catch(e){throw e}finally{Ie.hashAddNode(u)}}},rmdir(e){var t=Ie.lookupPath(e,{parent:!0}).node,r=le.basename(e),n=Ie.lookupNode(t,r),o=Ie.mayDelete(t,r,!0);if(o)throw new Ie.ErrnoError(o);if(!t.node_ops.rmdir)throw new Ie.ErrnoError(63);if(Ie.isMountpoint(n))throw new Ie.ErrnoError(10);t.node_ops.rmdir(t,r),Ie.destroyNode(n)},readdir(e){var t=Ie.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Ie.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Ie.lookupPath(e,{parent:!0}).node;if(!t)throw new Ie.ErrnoError(44);var r=le.basename(e),n=Ie.lookupNode(t,r),o=Ie.mayDelete(t,r,!1);if(o)throw new Ie.ErrnoError(o);if(!t.node_ops.unlink)throw new Ie.ErrnoError(63);if(Ie.isMountpoint(n))throw new Ie.ErrnoError(10);t.node_ops.unlink(t,r),Ie.destroyNode(n)},readlink(e){var t=Ie.lookupPath(e).node;if(!t)throw new Ie.ErrnoError(44);if(!t.node_ops.readlink)throw new Ie.ErrnoError(28);return ce.resolve(Ie.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Ie.lookupPath(e,{follow:!t}).node;if(!r)throw new Ie.ErrnoError(44);if(!r.node_ops.getattr)throw new Ie.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Ie.stat(e,!0),chmod(e,t,r){var n;"string"==typeof e?n=Ie.lookupPath(e,{follow:!r}).node:n=e;if(!n.node_ops.setattr)throw new Ie.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){Ie.chmod(e,t,!0)},fchmod(e,t){var r=Ie.getStreamChecked(e);Ie.chmod(r.node,t)},chown(e,t,r,n){var o;"string"==typeof e?o=Ie.lookupPath(e,{follow:!n}).node:o=e;if(!o.node_ops.setattr)throw new Ie.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,t,r){Ie.chown(e,t,r,!0)},fchown(e,t,r){var n=Ie.getStreamChecked(e);Ie.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new Ie.ErrnoError(28);var r;"string"==typeof e?r=Ie.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new Ie.ErrnoError(63);if(Ie.isDir(r.mode))throw new Ie.ErrnoError(31);if(!Ie.isFile(r.mode))throw new Ie.ErrnoError(28);var n=Ie.nodePermissions(r,"w");if(n)throw new Ie.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Ie.getStreamChecked(e);if(0==(2097155&r.flags))throw new Ie.ErrnoError(28);Ie.truncate(r.node,t)},utime(e,t,r){var n=Ie.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Ie.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Te(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=le.normalize(e);try{n=Ie.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var a=!1;if(64&t)if(n){if(128&t)throw new Ie.ErrnoError(20)}else n=Ie.mknod(e,r,0),a=!0;if(!n)throw new Ie.ErrnoError(44);if(Ie.isChrdev(n.mode)&&(t&=-513),65536&t&&!Ie.isDir(n.mode))throw new Ie.ErrnoError(54);if(!a){var i=Ie.mayOpen(n,t);if(i)throw new Ie.ErrnoError(i)}512&t&&!a&&Ie.truncate(n,0),t&=-131713;var s=Ie.createStream({node:n,path:Ie.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&t||(Ie.readFiles||(Ie.readFiles={}),e in Ie.readFiles||(Ie.readFiles[e]=1)),s},close(e){if(Ie.isClosed(e))throw new Ie.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Ie.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Ie.isClosed(e))throw new Ie.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ie.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Ie.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,o){if(n<0||o<0)throw new Ie.ErrnoError(28);if(Ie.isClosed(e))throw new Ie.ErrnoError(8);if(1==(2097155&e.flags))throw new Ie.ErrnoError(8);if(Ie.isDir(e.node.mode))throw new Ie.ErrnoError(31);if(!e.stream_ops.read)throw new Ie.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new Ie.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,t,r,n,o);return a||(e.position+=i),i},write(e,t,r,n,o,a){if(n<0||o<0)throw new Ie.ErrnoError(28);if(Ie.isClosed(e))throw new Ie.ErrnoError(8);if(0==(2097155&e.flags))throw new Ie.ErrnoError(8);if(Ie.isDir(e.node.mode))throw new Ie.ErrnoError(31);if(!e.stream_ops.write)throw new Ie.ErrnoError(28);e.seekable&&1024&e.flags&&Ie.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new Ie.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,t,r,n,o,a);return i||(e.position+=s),s},allocate(e,t,r){if(Ie.isClosed(e))throw new Ie.ErrnoError(8);if(t<0||r<=0)throw new Ie.ErrnoError(28);if(0==(2097155&e.flags))throw new Ie.ErrnoError(8);if(!Ie.isFile(e.node.mode)&&!Ie.isDir(e.node.mode))throw new Ie.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ie.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new Ie.ErrnoError(2);if(1==(2097155&e.flags))throw new Ie.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ie.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o)},msync:(e,t,r,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Ie.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=Ie.open(e,t.flags),o=Ie.stat(e).size,a=new Uint8Array(o);return Ie.read(n,a,0,o,0),"utf8"===t.encoding?r=pe(a,0):"binary"===t.encoding&&(r=a),Ie.close(n),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var n=Ie.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(me(t)+1),a=ge(t,o,0,o.length);Ie.write(n,o,0,a,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Ie.write(n,t,0,t.byteLength,void 0,r.canOwn)}Ie.close(n)},cwd:()=>Ie.currentPath,chdir(e){var t=Ie.lookupPath(e,{follow:!0});if(null===t.node)throw new Ie.ErrnoError(44);if(!Ie.isDir(t.node.mode))throw new Ie.ErrnoError(54);var r=Ie.nodePermissions(t.node,"x");if(r)throw new Ie.ErrnoError(r);Ie.currentPath=t.path},createDefaultDirectories(){Ie.mkdir("/tmp"),Ie.mkdir("/home"),Ie.mkdir("/home/web_user")},createDefaultDevices(){Ie.mkdir("/dev"),Ie.registerDevice(Ie.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),Ie.mkdev("/dev/null",Ie.makedev(1,3)),we.register(Ie.makedev(5,0),we.default_tty_ops),we.register(Ie.makedev(6,0),we.default_tty1_ops),Ie.mkdev("/dev/tty",Ie.makedev(5,0)),Ie.mkdev("/dev/tty1",Ie.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=de(e).byteLength),e[--t]);Ie.createDevice("/dev","random",r),Ie.createDevice("/dev","urandom",r),Ie.mkdir("/dev/shm"),Ie.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Ie.mkdir("/proc");var e=Ie.mkdir("/proc/self");Ie.mkdir("/proc/self/fd"),Ie.mount({mount(){var t=Ie.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=Ie.getStreamChecked(r),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams(){o.stdin?Ie.createDevice("/dev","stdin",o.stdin):Ie.symlink("/dev/tty","/dev/stdin"),o.stdout?Ie.createDevice("/dev","stdout",null,o.stdout):Ie.symlink("/dev/tty","/dev/stdout"),o.stderr?Ie.createDevice("/dev","stderr",null,o.stderr):Ie.symlink("/dev/tty1","/dev/stderr"),Ie.open("/dev/stdin",0),Ie.open("/dev/stdout",1),Ie.open("/dev/stderr",1)},ensureErrnoError(){Ie.ErrnoError||(Ie.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Ie.ErrnoError.prototype=new Error,Ie.ErrnoError.prototype.constructor=Ie.ErrnoError,[44].forEach((e=>{Ie.genericErrors[e]=new Ie.ErrnoError(e),Ie.genericErrors[e].stack=""})))},staticInit(){Ie.ensureErrnoError(),Ie.nameTable=new Array(4096),Ie.mount(_e,{},"/"),Ie.createDefaultDirectories(),Ie.createDefaultDevices(),Ie.createSpecialDirectories(),Ie.filesystems={MEMFS:_e}},init(e,t,r){Ie.init.initialized=!0,Ie.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,Ie.createStandardStreams()},quit(){Ie.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,i=1048576;o||(i=n);var s=this;s.setDataGetter((e=>{var t=e*i,o=(e+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+t),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):ye(o.responseText||"",!0)})(t,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!c)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:r};var l=Ie.createFile(e,t,s,n,o);s.contents?l.contents=s.contents:s.url&&(l.contents=null,l.url=s.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var u={};function d(e,t,r,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s{var t=l.stream_ops[e];u[e]=function(){return Ie.forceLoadFile(l),t.apply(null,arguments)}})),u.read=(e,t,r,n,o)=>(Ie.forceLoadFile(l),d(e,t,r,n,o)),u.mmap=(e,t,r,n,o)=>{Ie.forceLoadFile(l);var a=be();if(!a)throw new Ie.ErrnoError(48);return d(e,E,a,t,r),{ptr:a,allocated:!0}},l.stream_ops=u,l}},$e=(e,t)=>e?pe(k,e,t):"",De={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(le.isAbs(t))return t;var n;-100===e?n=Ie.cwd():n=De.getStreamFromFD(e).path;if(0==t.length){if(!r)throw new Ie.ErrnoError(44);return n}return le.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&le.normalize(t)!==le.normalize(Ie.getPath(e.node)))return-54;throw e}A[r>>2]=n.dev,A[r+4>>2]=n.mode,T[r+8>>2]=n.nlink,A[r+12>>2]=n.uid,A[r+16>>2]=n.gid,A[r+20>>2]=n.rdev,J=[n.size>>>0,(K=n.size,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+24>>2]=J[0],A[r+28>>2]=J[1],A[r+32>>2]=4096,A[r+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return J=[Math.floor(o/1e3)>>>0,(K=Math.floor(o/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+40>>2]=J[0],A[r+44>>2]=J[1],T[r+48>>2]=o%1e3*1e3,J=[Math.floor(a/1e3)>>>0,(K=Math.floor(a/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+56>>2]=J[0],A[r+60>>2]=J[1],T[r+64>>2]=a%1e3*1e3,J=[Math.floor(i/1e3)>>>0,(K=Math.floor(i/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+72>>2]=J[0],A[r+76>>2]=J[1],T[r+80>>2]=i%1e3*1e3,J=[n.ino>>>0,(K=n.ino,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+88>>2]=J[0],A[r+92>>2]=J[1],0},doMsync(e,t,r,n,o){if(!Ie.isFile(t.node.mode))throw new Ie.ErrnoError(43);if(2&n)return 0;var a=k.slice(e,e+r);Ie.msync(t,a,o,r,n)},varargs:void 0,get(){var e=A[+De.varargs>>2];return De.varargs+=4,e},getp:()=>De.get(),getStr:e=>$e(e),getStreamFromFD:e=>Ie.getStreamChecked(e)};function Fe(e,t,r){De.varargs=r;try{var n=De.getStreamFromFD(e);switch(t){case 0:if((o=De.get())<0)return-28;for(;Ie.streams[o];)o++;return Ie.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=De.get();return n.flags|=o,0;case 5:o=De.getp();return S[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return se(28),-1}}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return-e.errno}}function Re(e,t,r,n){De.varargs=n;try{t=De.getStr(t),t=De.calculateAt(e,t);var o=n?De.get():0;return Ie.open(t,r,o).fd}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return-e.errno}}var Me,Be,We,Oe=(e,t,r,n,o)=>{},Ue=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Me=e},je=e=>{for(var t="",r=e;k[r];)t+=Me[k[r++]];return t},xe={},Le={},Ve={},He=e=>{throw new Be(e)},ze=e=>{throw new We(e)},Ne=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&ze("Mismatched type converter count");for(var o=0;o{Le.hasOwnProperty(e)?o[t]=Le[e]:(a.push(e),xe.hasOwnProperty(e)||(xe[e]=[]),xe[e].push((()=>{o[t]=Le[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)};function Ge(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=t.name;if(e||He(`type "${n}" must have a positive integer typeid pointer`),Le.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;He(`Cannot register type '${n}' twice`)}if(Le[e]=t,delete Ve[e],xe.hasOwnProperty(e)){var o=xe[e];delete xe[e],o.forEach((e=>e()))}}function qe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ge(e,t,r)}var Ke,Je=8,Xe=(e,t,r,n)=>{qe(e,{name:t=je(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:Je,readValueFromPointer:function(e){return this.fromWireType(k[e])},destructorFunction:null})},Ye=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Qe=e=>{He(e.$$.ptrType.registeredClass.name+" instance already deleted")},Ze=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},nt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=nt(e,t,r.baseClass);return null===n?null:r.downcast(n)},ot={},at=()=>Object.keys(ct).length,it=()=>{var e=[];for(var t in ct)ct.hasOwnProperty(t)&&e.push(ct[t]);return e},st=[],lt=()=>{for(;st.length;){var e=st.pop();e.$$.deleteScheduled=!1,e.delete()}},ut=e=>{Ke=e,st.length&&Ke&&Ke(lt)},dt=()=>{o.getInheritedInstanceCount=at,o.getLiveInheritedInstances=it,o.flushPendingDeletes=lt,o.setDelayFunction=ut},ct={},ft=(e,t)=>{for(void 0===t&&He("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},pt=(e,t)=>(t=ft(e,t),ct[t]),ht=(e,t)=>(t.ptrType&&t.ptr||ze("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&ze("Both smartPtrType and smartPtr must be specified"),t.count={value:1},gt(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=pt(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?ht(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ht(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a,i=this.registeredClass.getActualType(t),s=ot[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var l=nt(t,this.registeredClass,a.registeredClass);return null===l?o.call(this):this.isSmartPointer?ht(a.registeredClass.instancePrototype,{ptrType:a,ptr:l,smartPtrType:this,smartPtr:e}):ht(a.registeredClass.instancePrototype,{ptrType:a,ptr:l})}var gt=e=>"undefined"==typeof FinalizationRegistry?(gt=e=>e,e):(Ze=new FinalizationRegistry((e=>{rt(e.$$)})),gt=e=>{var t=e.$$;if(!!t.smartPtr){var r={$$:t};Ze.register(e,r,e)}return e},et=e=>Ze.unregister(e),gt(e)),yt=()=>{Object.assign(vt.prototype,{isAliasOf(e){if(!(this instanceof vt))return!1;if(!(e instanceof vt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o},clone(){if(this.$$.ptr||Qe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=gt(Object.create(Object.getPrototypeOf(this),{$$:{value:Ye(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Qe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Qe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),st.push(this),1===st.length&&Ke&&Ke(lt),this.$$.deleteScheduled=!0,this}})};function vt(){}var wt=(e,t)=>Object.defineProperty(t,"name",{value:e}),bt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||He(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},_t=(e,t,r)=>{o.hasOwnProperty(e)?((void 0===r||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[r])&&He(`Cannot register public name '${e}' twice`),bt(o,e,e),o.hasOwnProperty(r)&&He(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),o[e].overloadTable[r]=t):(o[e]=t,void 0!==r&&(o[e].numArguments=r))},Et=48,kt=57,St=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Et&&t<=kt?`_${e}`:e};function Ct(e,t,r,n,o,a,i,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var At=(e,t,r)=>{for(;t!==r;)t.upcast||He(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Tt(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${lr(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Pt(e,t){var r;if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||He(`Cannot pass "${lr(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=At(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&He("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var o=t.clone();r=this.rawShare(r,ar.toHandle((()=>o.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:He("Unsupporting sharing policy")}return r}function It(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${lr(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function $t(e){return this.fromWireType(T[e>>2])}var Dt=()=>{Object.assign(Ft.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Je,readValueFromPointer:$t,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Ft(e,t,r,n,o,a,i,s,l,u,d){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=u,this.rawDestructor=d,o||void 0!==t.baseClass?this.toWireType=Pt:n?(this.toWireType=Tt,this.destructorFunction=null):(this.toWireType=It,this.destructorFunction=null)}var Rt,Mt,Bt=(e,t,r)=>{o.hasOwnProperty(e)||ze("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==r?o[e].overloadTable[r]=t:(o[e]=t,o[e].argCount=r)},Wt=(e,t,r)=>{var n=o["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)},Ot=[],Ut=e=>{var t=Ot[e];return t||(e>=Ot.length&&(Ot.length=e+1),Ot[e]=t=Rt.get(e)),t},jt=(e,t,r)=>e.includes("j")?Wt(e,t,r):Ut(t).apply(null,r),xt=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),jt(e,t,r)}},Lt=(e,t)=>{var r=(e=je(e)).includes("j")?xt(e,t):Ut(t);return"function"!=typeof r&&He(`unknown function pointer with signature ${e}: ${t}`),r},Vt=(e,t)=>{var r=wt(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Ht=e=>{var t=yn(e),r=je(t);return mn(t),r},zt=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||Le[t]||(Ve[t]?Ve[t].forEach(e):(r.push(t),n[t]=!0))})),new Mt(`${e}: `+r.map(Ht).join([", "]))},Nt=(e,t,r,n,o,a,i,s,l,u,d,c,f)=>{d=je(d),a=Lt(o,a),s&&(s=Lt(i,s)),u&&(u=Lt(l,u)),f=Lt(c,f);var p=St(d);_t(p,(function(){zt(`Cannot construct ${d} due to unbound types`,[n])})),Ne([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:vt.prototype;var i=wt(d,(function(){if(Object.getPrototypeOf(this)!==l)throw new Be("Use 'new' to construct "+d);if(void 0===c.constructor_body)throw new Be(d+" has no accessible constructor");var e=c.constructor_body[arguments.length];if(void 0===e)throw new Be(`Tried to invoke ctor of ${d} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(c.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(o,{constructor:{value:i}});i.prototype=l;var c=new Ct(d,i,l,f,r,a,s,u);c.baseClass&&(void 0===c.baseClass.__derivedClasses&&(c.baseClass.__derivedClasses=[]),c.baseClass.__derivedClasses.push(c));var h=new Ft(d,c,!0,!1,!1),m=new Ft(d+"*",c,!1,!1,!1),g=new Ft(d+" const*",c,!1,!0,!1);return ot[e]={pointerType:m,constPointerType:g},Bt(p,i),[h,m,g]}))},Gt=(e,t)=>{for(var r=[],n=0;n>2]);return r},qt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Kt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=wt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,o=e.apply(n,t);return o instanceof Object?o:n}function Jt(e,t,r,n,o,a){var i=t.length;i<2&&He("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==r,l=!1,u=1;u0?", ":"")+f),p+=(d||a?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",l)p+="runDestructors(destructors);\n";else for(u=s?1:2;u{var i=Gt(t,r);o=Lt(n,o),Ne([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Be(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{zt(`Cannot construct ${e.name} due to unbound types`,i)},Ne([],i,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Jt(r,n,null,o,a),[]))),[]}))},Yt=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},Qt=(e,t,r,n,o,a,i,s,l)=>{var u=Gt(r,n);t=je(t),t=Yt(t),a=Lt(o,a),Ne([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function o(){zt(`Cannot call ${n} due to unbound types`,u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var d=e.registeredClass.instancePrototype,c=d[t];return void 0===c||void 0===c.overloadTable&&c.className!==e.name&&c.argCount===r-2?(o.argCount=r-2,o.className=e.name,d[t]=o):(bt(d,t,n),d[t].overloadTable[r-2]=o),Ne([],u,(function(o){var s=Jt(n,o,e,a,i,l);return void 0===d[t].overloadTable?(s.argCount=r-2,d[t]=s):d[t].overloadTable[r-2]=s,[]})),[]}))};function Zt(){Object.assign(er.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function er(){this.allocated=[void 0],this.freelist=[]}var tr=new er,rr=e=>{e>=tr.reserved&&0==--tr.get(e).refcount&&tr.free(e)},nr=()=>{for(var e=0,t=tr.reserved;t{tr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),tr.reserved=tr.allocated.length,o.count_emval_handles=nr},ar={toValue:e=>(e||He("Cannot use deleted val. handle = "+e),tr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return tr.allocate({refcount:1,value:e})}}};function ir(e){return this.fromWireType(A[e>>2])}var sr=(e,t)=>{qe(e,{name:t=je(t),fromWireType:e=>{var t=ar.toValue(e);return rr(e),t},toWireType:(e,t)=>ar.toHandle(t),argPackAdvance:Je,readValueFromPointer:ir,destructorFunction:null})},lr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},ur=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(P[e>>2])};case 8:return function(e){return this.fromWireType(I[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},dr=(e,t,r)=>{qe(e,{name:t=je(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Je,readValueFromPointer:ur(t,r),destructorFunction:null})},cr=(e,t,r)=>{switch(t){case 1:return r?e=>E[e>>0]:e=>k[e>>0];case 2:return r?e=>S[e>>1]:e=>C[e>>1];case 4:return r?e=>A[e>>2]:e=>T[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},fr=(e,t,r,n,o)=>{t=je(t);var a=e=>e;if(0===n){var i=32-8*r;a=e=>e<>>i}var s=t.includes("unsigned");qe(e,{name:t,fromWireType:a,toWireType:s?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Je,readValueFromPointer:cr(t,r,0!==n),destructorFunction:null})},pr=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=T[e>>2],r=T[e+4>>2];return new n(E.buffer,r,t)}qe(e,{name:r=je(r),fromWireType:o,argPackAdvance:Je,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},hr=(e,t,r)=>ge(e,k,t,r),mr=(e,t)=>{var r="std::string"===(t=je(t));qe(e,{name:t,fromWireType(e){var t,n=T[e>>2],o=e+4;if(r)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==k[s]){var l=$e(a,s-a);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),a=s+1}}else{var u=new Array(n);for(i=0;i>2]=n,r&&o)hr(t,i,n+1);else if(o)for(var s=0;s255&&(mn(i),He("String has UTF-16 code units that do not fit in 8 bits")),k[i+s]=l}else for(s=0;s{for(var r=e,n=r>>1,o=n+t/2;!(n>=o)&&C[n];)++n;if((r=n<<1)-e>32&&gr)return gr.decode(k.subarray(e,r));for(var a="",i=0;!(i>=t/2);++i){var s=S[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},vr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,a=0;a>1]=i,t+=2}return S[t>>1]=0,t-n},wr=e=>2*e.length,br=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var o=A[e+4*r>>2];if(0==o)break;if(++r,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},_r=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,o=n+r-4,a=0;a=55296&&i<=57343)i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a);if(A[t>>2]=i,(t+=4)+4>o)break}return A[t>>2]=0,t-n},Er=e=>{for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t},kr=(e,t,r)=>{var n,o,a,i,s;r=je(r),2===t?(n=yr,o=vr,i=wr,a=()=>C,s=1):4===t&&(n=br,o=_r,i=Er,a=()=>T,s=2),qe(e,{name:r,fromWireType:e=>{for(var r,o=T[e>>2],i=a(),l=e+4,u=0;u<=o;++u){var d=e+4+u*t;if(u==o||0==i[d>>s]){var c=n(l,d-l);void 0===r?r=c:(r+=String.fromCharCode(0),r+=c),l=d+t}}return mn(e),r},toWireType:(e,n)=>{"string"!=typeof n&&He(`Cannot pass non-string to C++ string type ${r}`);var a=i(n),l=vn(4+a+t);return T[l>>2]=a>>s,o(n,l+4,a+t),null!==e&&e.push(mn,l),l},argPackAdvance:Je,readValueFromPointer:ir,destructorFunction(e){mn(e)}})},Sr=(e,t)=>{qe(e,{isVoid:!0,name:t=je(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Cr={},Ar=e=>{var t=Cr[e];return void 0===t?je(e):t},Tr=[],Pr=(e,t,r,n,o)=>(e=Tr[e])(t=ar.toValue(t),t[r=Ar(r)],n,o),Ir=e=>{var t=Tr.length;return Tr.push(e),t},$r=(e,t)=>{var r=Le[e];return void 0===r&&He(t+" has unknown type "+Ht(e)),r},Dr=(e,t)=>{for(var r=new Array(e),n=0;n>2],"parameter "+n);return r},Fr=(e,t,r)=>{var n=[],o=e.toWireType(n,r);return n.length&&(T[t>>2]=ar.toHandle(n)),o},Rr=(e,t,r)=>{var n=Dr(e,t),o=n.shift();e--;var a="return function (obj, func, destructorsRef, args) {\n",i=0,s=[];0===r&&s.push("obj");for(var l=["retType"],u=[o],d=0;de.name)).join(", ")}) => ${o.name}>`;return Ir(wt(f,c))},Mr=e=>{var t=ar.toValue(e);qt(t),rr(e)},Br=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Wr=e=>e%4==0&&(e%100!=0||e%400==0),Or=[0,31,60,91,121,152,182,213,244,274,305,335],Ur=[0,31,59,90,120,151,181,212,243,273,304,334],jr=e=>(Wr(e.getFullYear())?Or:Ur)[e.getMonth()]+e.getDate()-1;function xr(e,t,r){var n=Br(e,t),o=new Date(1e3*n);A[r>>2]=o.getSeconds(),A[r+4>>2]=o.getMinutes(),A[r+8>>2]=o.getHours(),A[r+12>>2]=o.getDate(),A[r+16>>2]=o.getMonth(),A[r+20>>2]=o.getFullYear()-1900,A[r+24>>2]=o.getDay();var a=0|jr(o);A[r+28>>2]=a,A[r+36>>2]=-60*o.getTimezoneOffset();var i=new Date(o.getFullYear(),0,1),s=new Date(o.getFullYear(),6,1).getTimezoneOffset(),l=i.getTimezoneOffset(),u=0|(s!=l&&o.getTimezoneOffset()==Math.min(l,s));A[r+32>>2]=u}var Lr=e=>{var t=me(e)+1,r=vn(t);return r&&hr(e,r,t),r},Vr=(e,t,r)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),l=Math.max(i,s);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}T[e>>2]=60*l,A[t>>2]=Number(i!=s);var d=u(o),c=u(a),f=Lr(d),p=Lr(c);s>2]=f,T[r+4>>2]=p):(T[r>>2]=p,T[r+4>>2]=f)},Hr=()=>{G("")},zr=()=>Date.now(),Nr=(e,t,r)=>k.copyWithin(e,t,t+r),Gr=()=>134217728,qr=e=>{var t=(e-w.buffer.byteLength+65535)/65536;try{return w.grow(t),F(),1}catch(e){}},Kr=e=>{var t=k.length;e>>>=0;var r=Gr();if(e>r)return!1;for(var n,o,a=1;a<=4;a*=2){var i=t*(1+.2/a);i=Math.min(i,e+100663296);var s=Math.min(r,(n=Math.max(e,i))+((o=65536)-n%o)%o);if(qr(s))return!0}return!1},Jr={},Xr=()=>u||"./this.program",Yr=()=>{if(!Yr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Xr()};for(var t in Jr)void 0===Jr[t]?delete e[t]:e[t]=Jr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Yr.strings=r}return Yr.strings},Qr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);E[t>>0]=0},Zr=(e,t)=>{var r=0;return Yr().forEach(((n,o)=>{var a=t+r;T[e+4*o>>2]=a,Qr(n,a),r+=n.length+1})),0},en=(e,t)=>{var r=Yr();T[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),T[t>>2]=n,0};function tn(e){try{var t=De.getStreamFromFD(e);return Ie.close(t),0}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return e.errno}}function rn(e,t){try{var r=De.getStreamFromFD(e),n=r.tty?2:Ie.isDir(r.mode)?3:Ie.isLink(r.mode)?7:4;return E[t>>0]=n,S[t+2>>1]=0,J=[0,(K=0,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[t+8>>2]=J[0],A[t+12>>2]=J[1],J=[0,(K=0,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[t+16>>2]=J[0],A[t+20>>2]=J[1],0}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return e.errno}}var nn=(e,t,r,n)=>{for(var o=0,a=0;a>2],s=T[t+4>>2];t+=8;var l=Ie.read(e,E,i,s,n);if(l<0)return-1;if(o+=l,l>2]=a,0}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return e.errno}}function an(e,t,r,n,o){var a=Br(t,r);try{if(isNaN(a))return 61;var i=De.getStreamFromFD(e);return Ie.llseek(i,a,n),J=[i.position>>>0,(K=i.position,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[o>>2]=J[0],A[o+4>>2]=J[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return e.errno}}var sn=(e,t,r,n)=>{for(var o=0,a=0;a>2],s=T[t+4>>2];t+=8;var l=Ie.write(e,E,i,s,n);if(l<0)return-1;o+=l,void 0!==n&&(n+=l)}return o};function ln(e,t,r,n){try{var o=De.getStreamFromFD(e),a=sn(o,t,r);return T[n>>2]=a,0}catch(e){if(void 0===Ie||"ErrnoError"!==e.name)throw e;return e.errno}}var un=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ie.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},dn=365,cn=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&dn)===dn},set:function(e){e?this.mode|=dn:this.mode&=~dn}},write:{get:function(){return(this.mode&cn)===cn},set:function(e){e?this.mode|=cn:this.mode&=~cn}},isFolder:{get:function(){return Ie.isDir(this.mode)}},isDevice:{get:function(){return Ie.isChrdev(this.mode)}}}),Ie.FSNode=un,Ie.createPreloadedFile=Ae,Ie.staticInit(),Ue(),Be=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},We=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},yt(),dt(),Dt(),Mt=o.UnboundTypeError=Vt(Error,"UnboundTypeError"),Zt(),or();var fn,pn={o:ie,C:Fe,u:Re,r:Oe,E:Xe,F:Nt,A:Xt,i:Qt,D:sr,l:dr,c:fr,b:pr,m:mr,j:kr,n:Sr,f:Pr,h:rr,e:Rr,d:Mr,p:xr,t:Vr,a:Hr,g:zr,y:Nr,s:Kr,w:Zr,x:en,k:tn,v:rn,B:on,q:an,z:ln},hn=ne(),mn=e=>(mn=hn.I)(e),gn=()=>(gn=hn.K)(),yn=e=>(yn=hn.L)(e),vn=e=>(vn=hn.M)(e),wn=e=>(wn=hn.O)(e);function bn(){function e(){fn||(fn=!0,o.calledRun=!0,$||(O(),r(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),U()))}V>0||(W(),V>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.dynCall_viiijj=(e,t,r,n,a,i,s,l)=>(o.dynCall_viiijj=hn.P)(e,t,r,n,a,i,s,l),o.dynCall_jij=(e,t,r,n)=>(o.dynCall_jij=hn.Q)(e,t,r,n),o.dynCall_jii=(e,t,r)=>(o.dynCall_jii=hn.R)(e,t,r),o.dynCall_jiji=(e,t,r,n,a)=>(o.dynCall_jiji=hn.S)(e,t,r,n,a),H=function e(){fn||bn(),fn||(H=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return bn(),t.ready}})();const n=h;!function(e,t){const r=h,n=e();for(;;)try{if(551693===parseInt(r(523))/1+-parseInt(r(436))/2+parseInt(r(566))/3*(-parseInt(r(477))/4)+-parseInt(r(636))/5+-parseInt(r(546))/6+-parseInt(r(615))/7*(-parseInt(r(466))/8)+-parseInt(r(434))/9*(-parseInt(r(431))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(b);const o={websocket:1,fetch:2,hls:3,webrtc:4,webTransport:5,aliyunRtc:6,ts:7};n(774),n(364),n(698),n(764),n(364),n(774),n(419),n(698),n(789),n(764),n(595);const a={player:n(482),playerAudio:n(568),playbackTF:n(509),talk:n(374),playVod:n(825)},i={mp4:n(595),webm:n(380),flv:n(597),mov:n(839)},s={flv:n(597),m7s:n(760),hls:n(831),webrtc:n(419),webTransport:n(698),nakedFlow:n(796),fmp4:n(578),mpeg4:n(591),aliyunRtc:n(764),ts:"ts",g711:"g711",pcm:n(821)};n(423),n(430),n(620),n(524),n(474),n(447);const l={mse:n(811),wcs:"wcs",offscreen:n(668),wasm:n(758),simd:"simd",mt:"mt",webrtc:n(419),hls:n(831),aliyunRtc:n(764)},u={canvas:n(393),video:"video"},d={debug:"debug",warn:n(699)},c={click:"click",mouseDownAndUp:n(700)},f={normal:n(761),simple:n(609)},p=n(465);function h(e,t){const r=b();return(h=function(e,t){return r[e-=361]})(e,t)}const m=4080;n(456),n(772),n(365);const g={playIsNotPauseOrUrlIsNull:n(561),webglAlignmentError:n(544),webglContextLostError:"webgl 上下文丢失",mediaSourceH265NotSupport:"不支持硬解码H265",mseSourceBufferFull:n(385),mediaSourceAppendBufferError:n(369),mseSourceBufferError:"解码失败",mseAddSourceBufferError:n(369),mseWorkerAddSourceBufferError:n(369),mediaSourceDecoderConfigurationError:n(369),mediaSourceTsIsMaxDiff:"流异常",mseWidthOrHeightChange:"流异常",mediaSourceAudioG711NotSupport:n(664),mediaSourceAudioInitTimeout:"初始化音频解码器失败",mediaSourceAudioNoDataTimeout:n(467),mediaSourceUseCanvasRenderPlayFailed:n(692),mediaSourceBufferedIsZeroError:"流异常",webcodecsH265NotSupport:n(795),webcodecsUnsupportedConfigurationError:"初始化解码器失败",webcodecsDecodeConfigureError:n(369),webcodecsDecodeError:n(540),webcodecsAudioInitTimeout:n(759),webcodecsAudioNoDataTimeout:n(467),wcsWidthOrHeightChange:"解码失败",wasmDecodeError:n(540),simdDecodeError:n(540),wasmWidthOrHeightChange:n(397),wasmUseVideoRenderError:"video自动渲染失败",videoElementPlayingFailed:"video自动渲染失败",simdH264DecodeVideoWidthIsTooLarge:"不支持该分辨率的视频",networkDelayTimeout:n(663),fetchError:n(518),streamEnd:n(412),websocket1006Error:n(754),websocketError:n(518),webrtcError:"请求失败",hlsError:n(518),decoderWorkerInitError:n(627),decoderWorkerWasmError:"wasm解码失败",videoElementPlayingFailedForWebrtc:"video自动渲染失败",videoInfoError:n(766),webrtcStreamH265:n(785),delayTimeout:n(534),loadingTimeout:n(679),loadingTimeoutRetryEnd:"加载超时重播失败",delayTimeoutRetryEnd:"播放超时重播失败",flvDemuxBufferSizeTooLarge:n(527),audioChannelError:n(706),aliyunRtcError:n(518),mseWaitVideoCanplayTimeout:n(397),initDecoderWorkerTimeout:n(587)};n(482),n(699),n(761),n(371),n(642),n(816),n(808),n(459),n(572),n(761),n(597),n(758),n(595),n(767),n(512),n(418),n(428),n(428),n(690);n(442),n(542),n(471),n(669),n(448),n(697),n(826),n(413),n(678),n(633),n(817),n(824),n(492),n(426),n(589),n(728),n(576),n(800),n(730);const y={init:n(473),initVideo:n(402),render:n(830),playAudio:n(792),initAudio:"initAudio",kBps:n(810),decode:"decode",audioCode:n(556),audioNalu:n(394),audioAACSequenceHeader:n(592),videoCode:"videoCode",videoCodec:n(535),videoNalu:n(581),videoPayload:n(573),audioPayload:"audioPayload",wasmError:"wasmError",workerFetch:"workerFetch",iframeIntervalTs:"iframeIntervalTs",isDropping:n(571),workerEnd:n(756),networkDelay:"networkDelay",playbackStreamVideoFps:n(387),wasmWidthOrHeightChange:n(675),simdDecodeError:n(782),simdH264DecodeVideoWidthIsTooLarge:n(538),websocketOpen:n(802),websocketStringMsg:n(784),closeEnd:n(484),tempStream:n(685),videoSEI:n(709),flvScriptData:n(840),aacSequenceHeader:n(741),videoSequenceHeader:"videoSequenceHeader",flvBufferData:n(381),checkFirstIFrame:"checkFirstIFrame",mseHandle:n(742),mseFirstRenderTime:n(464),mseError:n(643),notSupportNewWasm:n(541),failedToAsynchronouslyPrepareWasm:n(781)};n(736),n(473),n(361),n(823),n(468),n(829),n(580),n(513),n(539),n(420),n(827),n(658),n(806),n(614),n(400),n(528),n(476),n(388),n(364),n(528),n(612),n(802),n(784),n(473);const v={fullscreen:"fullscreen$2",fullScreenByStart:n(618),webFullscreen:n(530),decoderWorkerInit:n(562),play:n(457),playing:n(499),pause:n(452),mute:"mute",load:n(659),loading:n(600),zooming:"zooming",drawingRect:n(747),drawingRectInfo:n(777),videoInfo:n(395),timeUpdate:"timeUpdate",audioInfo:n(654),log:"log",error:"error",kBps:"kBps",timeout:"timeout",delayTimeout:n(616),delayTimeoutRetryEnd:"delayTimeoutRetryEnd",loadingTimeout:n(770),loadingTimeoutRetryEnd:"loadingTimeoutRetryEnd",stats:"stats",performance:n(738),videoSmooth:n(711),faceDetectActive:n(601),objectDetectActive:"objectDetectActive",occlusionDetectActive:n(549),imageDetectActive:n(432),record:n(536),recording:n(470),recordingTimestamp:n(496),recordStart:n(537),recordEnd:n(807),recordCreateError:n(630),recordBlob:n(667),recordCancel:n(786),buffer:n(557),videoFrame:"videoFrame",videoSEI:n(709),videoSEISyncPts:n(732),start:"start",metadata:"metadata",resize:n(584),volumechange:n(646),volume:n(529),destroy:n(528),beforeDestroy:"beforeDestroy",streamEnd:n(408),streamRate:"streamRate",streamAbps:n(525),streamVbps:n(793),streamDts:n(521),streamSuccess:n(531),streamMessage:n(769),streamError:n(510),streamStats:"streamStats",streamEndInner:n(676),mseSourceOpen:n(739),mseSourceClose:n(478),mseSourceended:n(586),mseSourceStartStreaming:"mseSourceStartStreaming",mseSourceEndStreaming:n(494),mseSourceBufferError:n(594),mseAddSourceBufferError:n(677),mseWorkerAddSourceBufferError:n(729),mseSourceBufferBusy:n(639),mseSourceBufferFull:n(575),videoWaiting:"videoWaiting",videoTimeUpdate:n(723),videoSyncAudio:"videoSyncAudio",playToRenderTimes:n(788),playbackTime:n(558),playbackTimestamp:n(602),playbackTimeScroll:"playbackTimeScroll",playbackPrecision:n(401),playbackShowPrecisionChange:n(372),playbackJustTime:"playbackJustTime",playbackStats:"playbackStats",playbackSeek:n(560),playbackPause:n(673),playbackPauseOrResume:n(634),playbackRateChange:n(703),playbackPreRateChange:"playbackPreRateChange",playbackEndInner:n(734),playbackEnd:n(373),playVodStats:n(768),playVodPause:n(611),playVodPauseOrResume:n(379),playVodRateChange:n(516),playVodTime:"playVodTime",playVodTimeCache:n(707),playVodSeek:n(493),playVodSeekEnd:n(497),playVodVideoSeekingByMse:n(483),playVodVideoSeekedByMse:"playVodVideoSeekedByMse",playVodCanplay:n(514),playVodWaiting:n(545),playVodEndedAndReplay:n(533),playVodEnded:"playVodEnded",ptz:n(367),streamQualityChange:"streamQualityChange",visibilityChange:"visibilityChange",netBuf:n(713),close:n(580),networkDelayTimeout:n(427),togglePerformancePanel:"togglePerformancePanel",viewResizeChange:"viewResizeChange",flvDemuxBufferSizeTooLarge:n(392),talkGetUserMediaSuccess:"talkGetUserMediaSuccess",talkGetUserMediaFail:n(719),talkGetUserMediaTimeout:n(651),talkStreamStart:n(722),talkStreamOpen:"talkStreamOpen",talkStreamClose:"talkStreamClose",talkStreamError:n(691),talkStreamInactive:n(491),talkStreamMsg:n(450),webrtcDisconnect:n(551),webrtcFailed:"webrtcFailed",webrtcClosed:n(662),webrtcChecking:n(384),webrtcConnected:n(797),webrtcCompleted:n(833),webrtcOnConnectionStateChange:n(437),webrtcOnIceConnectionStateChange:n(744),crashLog:n(570),focus:n(743),blur:n(441),inView:n(407),visibilityHiddenTimeout:n(506),websocketOpen:n(802),websocketClose:n(563),websocketError:n(612),websocketStringMsg:n(784),aiObjectDetectorInfo:n(819),aiFaceDetectorInfo:n(773),aiOcclusionDetectResult:n(582),aiImageDetectResult:"aiImageDetectResult",playFailedAndPaused:"playFailedAndPaused",audioResumeState:"audioResumeState",webrtcStreamH265:n(836),flvMetaData:n(803),talkFailedAndStop:n(559),removeLoadingBgImage:n(391),memoryLog:n(398),downloadMemoryLog:n(519),pressureObserverCpu:n(569),currentPts:n(657),online:n(812),offline:n(405),networkState:n(686),clickInitPlayer:"clickInitPlayer"};n(659),n(449),n(395),n(775),n(810),n(610),n(800),n(770),n(616),n(451),n(708),n(530),n(457),n(452),n(522),n(738),n(537),n(630),n(807),n(788),n(560),n(745),n(602),n(634),n(656),n(703),n(372),n(373),n(379),n(567),n(493),n(497),n(555),n(570),n(743),n(506),n(635),n(802),n(563),n(427),n(582),n(502),n(593),n(645),n(709),n(803),n(437),n(744),n(657),n(711),n(686),n(777),n(689),n(626),n(691),n(491),n(651),n(559),n(450),n(659),n(449),n(654),n(810),n(610),n(800),n(770),n(455),n(616),n(451),n(452),n(443),n(522),n(788),n(802),n(563),n(593),n(645);n(626);n(476),n(746),n(612),n(453),n(670),n(763),n(794),n(383),n(604),n(631),n(644),n(677),n(729),n(574),n(660),n(472),n(724),n(805),n(538),n(662),n(701),n(503),n(655),n(588),n(424),n(392),n(376),n(735),n(621),n(733),n(617),n(368),n(408),n(652),n(616),n(462),n(596),n(386),n(687),n(541),n(781),n(765),n(580),n(775),n(410),n(433),n(579),n(481),n(603),n(590),n(620);const w={h264:7,h265:12,mpeg4:99};function b(){const e=["image/webp","initVideoCodec","render","hls","buffereos","webrtcCompleted","playback","MEDIA_ERR_NETWORK","webrtcStreamH265","multiMouseup","MEDIA_ERR_SRC_NOT_SUPPORTED","mov","flvScriptData","sender","decode","A key frame is required after configure() or flush()","leftUp","fetch","jbprovm","self","ptz","decoderWorkerWasmError","初始化解码器失败","apertureFar","decoder-pro.js","playbackShowPrecisionChange","playbackEnd","talk","seeked","audioChannelError","remote-outbound-rtp","demuxed-track","playVodPauseOrResume","webm","flvBufferData","ulaw","mediaSourceAudioG711NotSupport","webrtcChecking","缓冲区已满","mseWaitVideoCanplayTimeout","playbackStreamVideoFps","fetchClose","遮挡物检查激活","multiDrop","removeLoadingBgImage","flvDemuxBufferSizeTooLarge","canvas","audioNalu","videoInfo","half-hour","流异常","memoryLog","five-min","playbackIsPause","playbackPrecision","initVideo",'video/mp4;codecs="hev1.3.E.L120.90"',"multiDragenter","offline","g711u","inView","streamEnd","load-start","empty","jtt","请求结束","isFlv","webgl2","canplay","emptied","10min","video","webrtc","clearBuffer","csrc","webgl","FLV","tallWebsocketClosedByError","subtitle-segments","ghostWatermarkConfig","networkDelayTimeout","white","left","FMP4","50590RdNYTS","imageDetectActive","buffering","1494qQRzge","关闭电子放大","140984myytEp","webrtcOnConnectionStateChange","transport","ten-min","webrtc-failed","blur","playType","mute","remove-buffer","load-response-headers","right-up","AliyunRtc","widthOrHeightChangeReplayDelayTime","timeUpdate","talkStreamMsg","delayTimeoutRetryEnd","pause","websocketOpenTimeout","right","loadingTimeoutRetryEnd","/crypto/","play","switch-url-failed","jessibuca-pro-mp4-recorder-decoder.js","ws1006","webcodecs","fullscreenError","readystatechange","mseFirstRenderTime","20251201","8beBTZr","等待音频数据超时","initAudioCodec","oneHour","recording","isMulti","mediaSourceUseCanvasRenderPlayFailed","init","WebTransport","#FFCC00","fetchError","604VcaKcP","mseSourceClose","one-hour","message","base64","player","playVodVideoSeekingByMse","closeEnd","closed","active","Cannot call 'decode' on a closed codec","1-1","canplaythrough","metadata-parsed","talkStreamInactive","isTs","playVodSeek","mseSourceEndStreaming","Decoder failure","recordingTimestamp","playVodSeekEnd","保存日志","playing","focusFar","key","aiImageDetectResult","webglAlignmentError","udp","loadstart","visibilityHiddenTimeout","zoomNarrow","ALAW(g711a)","playbackTF","streamError","webrtc-closed","click","updateConfig","playVodCanplay","worklet","playVodRateChange","人脸识别激活","请求失败","downloadMemoryLog","complete","streamDts","stats","595710tNkurM","Webrtc","streamAbps","window","FLV待解封装buffer过大","destroy","volume","webFullscreen","streamSuccess","remote-inbound-rtp","playVodEndedAndReplay","播放超时重播失败","videoCodec","record","recordStart","simdH264DecodeVideoWidthIsTooLarge","resetDecode","解码失败","notSupportNewWasm","playbackForwardMaxRateDecodeIFrame","leftDown","Webgl 渲染失败","playVodWaiting","5865174UkzBxM","ceil","apertureNear","occlusionDetectActive","speed","webrtcDisconnect","MULAW(g711u)","idle","no-audio-track","zooming","audioCode","buffer","playbackTime","talkFailedAndStop","playbackSeek","播放地址不能为空","decoderWorkerInit","websocketClose","ended","alaw","5097FfgYZD","playVodTime","playerAudio","pressureObserverCpu","crashLog","isDropping","none","videoPayload","mediaSourceAppendBufferError","mseSourceBufferFull","videoRenderSupportScale","Decoder error","fmp4","full","close","videoNalu","aiOcclusionDetectResult","outbound-rtp","resize","cruiseStart","mseSourceended","初始化解码worker超时","widthOrHeightChange","dynamicWatermarkConfig","H265(HEVC)","mpeg4","audioAACSequenceHeader","playFailedAndPaused","mseSourceBufferError","mp4","aliyunRtcError","flv","AAC","halfHour","loading","faceDetectActive","playbackTimestamp","H264(AVC)","mediaSourceAudioInitTimeout","open","rightDown","sourceclose","down","simple","start","playVodPause","websocketError","right-down","mseUpdateVideoTimestamp","6050695xwYxCa","delayTimeout","decoderWorkerInitError","fullScreenByStart","multiDragstart","MPEG4","videoElementPlayingFailed","mp3","multiMouseover","物品识别","rightUp","talkStreamClose","初始化worker失败","3-4","container","recordCreateError","mediaSourceAudioNoDataTimeout","memory access out of bounds","isWebrtc","playbackPauseOrResume","visibilityChange","2218130ubcHAG","peer-connection","endstreaming","mseSourceBufferBusy","hevc","loadedmetadata","decoder-pro-old.js","mseError","mediaSourceDecoderConfigurationError","audioResumeState","volumechange","opus","media-source","fiveMin","stream-parsed","talkGetUserMediaTimeout","websocket1006Error","tenMin","audioInfo","wcsWidthOrHeightChange","playbackPreRateChange","currentPts","fetchStream","load","mediaSourceTsIsMaxDiff","物品识别激活","webrtcClosed","网络超时重播失败","硬解码不支持G711a/u音频格式","5min","progress","recordBlob","offscreen","supportHls265","webcodecsDecodeError","Decoding error","性能面板激活","playbackPause","30min","wasmWidthOrHeightChange","streamEndInner","mseAddSourceBufferError","isNakedFlow","加载超时重播失败","g711a","ratechange","webrtc-connected","#000","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","tempStream","networkState","initDecoderWorkerTimeout","HEVC decoding is not supported","clickInitPlayer","red","talkStreamError","MediaSource解码使用canvas渲染失败",'video/mp4; codecs="hev1.1.6.L123.b0"',"receiver","load-complete","webrtc-checking","controlSize","webTransport","warn","mouseDownAndUp","webrtcIceCandidateError","script","playbackRateChange","#343434","waiting","音频通道错误","playVodTimeCache","fullscreen","videoSEI","multiMouseout","videoSmooth","av1","netBuf","电子放大","timeupdate","webgpu","connecting","3-1","talkGetUserMediaFail","人脸识别","track","talkStreamStart","videoTimeUpdate","mediaSourceBufferedIsZeroError","sourcebuffer-created","qualitychange","stalled","watermarkConfig","mseWorkerAddSourceBufferError","heartTimeout","global","videoSEISyncPts","videoElementPlayingFailedForWebrtc","playbackEndInner","webglContextLostError","Invalid NAL unit size","stop","performance","mseSourceOpen","webrtc-disconnected","aacSequenceHeader","mseHandle","focus","webrtcOnIceConnectionStateChange","playbackStats","fetchErrorWorker","drawingRect","Unsupported configuration",'video/mp4;codecs="hev1.1.6.L120.90"',"multiDblSelected","Wasm","object","startstreaming","流异常结束","sei","workerEnd","fiStop","wasm","初始化音频解码器失败","m7s","normal","ALAW","webcodecsDecodeConfigureError","aliyunRtc","playVodMp4Error","解析视频分辨率失败","vertical","playVodStats","streamMessage","loadingTimeout","multiDragleave","jbprov","aiFaceDetectorInfo","websocket","error","candidate-pair","drawingRectInfo","left-down","stream","rtp","failedToAsynchronouslyPrepareWasm","simdDecodeError","sourceopen","websocketStringMsg","webrtc不支持H265","recordCancel","退出全屏","playToRenderTimes","worker","zoomExpand","MP3","playAudio","streamVbps","webcodecsAudioInitTimeout","不支持硬解码H265","nakedFlow","webrtcConnected","MEDIA_ERR_DECODE","flv-script-data","timeout","local-candidate","websocketOpen","flvMetaData","fogClose","wasmDecodeError","sendWsMessage","recordEnd","decoder-pro-hard-not-wasm.js","FSimd","kBps","mse","online","certificate","cruiseStop","multiFullscreen","decoder-pro-hard.js","isWebrtcForSRS","The user aborted a request","aiObjectDetectorInfo","MEDIA_ERR_ABORTED","pcm","4-1","audioDecode","isWebrtcForOthers","playVod","multiIndex","resetAudioDecode"];return(b=function(){return e})()}n(590);const _={AAC:10,ALAW:7,MULAW:8,MP3:2,OPUS:13,G711A:7,G711U:8};n(598),n(508),n(552),n(791),n(598),n(762),n(791);const E=14;n(461),n(422),n(414),n(716),n(811),n(831),n(419),n(501),n(693),n(749),n(403),n(605),n(485),Math[n(547)](40),n(599),n(653),n(649),n(479),n(396),n(439),n(399),n(674),n(417),n(665),n(469),n(599),n(653),n(649),n(608),n(429),n(446),n(778),n(613),n(454),n(608),n(429),n(363),n(543),n(625),n(606),n(737),n(757),n(790),n(507),n(370),n(548),n(500),n(585),n(814),n(804);n(680),n(406),n(821),n(647);n(828),n(607),n(783),n(753),n(638),n(726),n(415),n(705),n(715),n(681),n(727),n(666),n(641);const k={h264:"avc",h265:n(640),av1:n(712)};n(362),n(487),n(748),n(495),n(671),n(577),n(688),n(818),n(600),n(499),n(528);const S={sequenceHeader:0,nalu:1},C=1;n(410),n(780),n(411),n(504);n(779),n(834),n(605),n(580),n(775),n(480);n(515),n(702);n(680),n(699),n(515),n(515),n(486),n(704),n(475),n(683),n(815),n(750),n(623),n(710),n(837),n(619),n(404),n(771),n(390),n(718),n(822),n(488),n(628),n(629),n(418),n(568),n(699),n(364),n(597),n(425),n(378),n(799),n(490),n(409),n(550),n(695),n(445),n(755),n(554),n(444),n(832),n(725),n(458),n(650),n(553),n(717),n(433),n(775),n(520),n(820),n(835),n(798),n(838),n(632),n(776),n(813),n(421),n(801),n(583),n(637),n(694),n(532),n(377),n(841),n(779),n(721),n(438),n(648),n(460),n(382),n(565),n(622),n(647),n(696),n(682),n(740),n(440),n(511),n(600),"object"==typeof window&&window[n(526)]===window?window:"object"==typeof self&&self[n(366)]===self?self:typeof global===n(752)&&global[n(731)]===global&&global,n(415),n(489),n(520),n(416),n(564),n(505),n(452),n(457),n(666),n(681),n(375),n(727),n(715),n(646),n(705),n(463),n(775),n(787),n(714),n(435),n(672),n(720),n(517),n(624),n(661),n(389),n(498);const A={wasm:n(751),simd:"Simd",fSimd:n(809)};n(684);var T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var P=Object.freeze({__proto__:null,commonjsGlobal:T,commonjsRequire:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},unwrapExports:function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e},createCommonjsModule:function(e,t){return e(t={exports:{}},t.exports),t.exports},getCjsExportFromNamespace:function(e){return e&&e.default||e}}),I=$;function $(e,t){var r=D();return($=function(e,t){return r[e-=124]})(e,t)}function D(){var e=["473367hzgXcG","MSFullscreenError","request","webkitCurrentFullScreenElement","mozCancelFullScreen","change","then","defineProperties","msRequestFullscreen","mozfullscreenerror","mozFullScreenEnabled","fullscreenchange","createCommonjsModule","isFullscreen","webkitfullscreenerror","error","webkitfullscreenchange","exitFullscreen","isEnabled","webkitFullscreenElement","12DWMfBi","exit","1026690TuqKyB","bind","removeEventListener","msExitFullscreen","4RkLTSa","1342408HXDAdv","158484CHbnqG","object","283682NIJLES","fullscreenerror","fullscreenElement","exports","webkitCancelFullScreen","mozFullScreenElement","requestFullscreen","9XgnlFR","undefined","off","webkitExitFullscreen","catch","length","501690vuMaoz","239799mkpNlW","webkitRequestFullScreen","fullscreenEnabled","documentElement","screenfull"];return(D=function(){return e})()}!function(e,t){for(var r=$,n=e();;)try{if(107838===-parseInt(r(140))/1+parseInt(r(142))/2+parseInt(r(161))/3*(parseInt(r(138))/4)+parseInt(r(155))/5+parseInt(r(132))/6*(-parseInt(r(156))/7)+parseInt(r(139))/8*(-parseInt(r(149))/9)+parseInt(r(134))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(D),P[I(124)]((function(e){var t,r,n,o,a,i;t=$,r="undefined"!=typeof window&&typeof window.document!==t(150)?window.document:{},n=t(141)!==t(150)&&e[t(145)],o=function(){for(var e,n=t,o=[["requestFullscreen",n(129),n(144),"fullscreenEnabled","fullscreenchange",n(143)],["webkitRequestFullscreen",n(152),n(131),"webkitFullscreenEnabled","webkitfullscreenchange",n(126)],[n(157),n(146),n(164),n(146),n(128),n(126)],["mozRequestFullScreen",n(165),n(147),n(171),"mozfullscreenchange",n(170)],[n(169),n(137),"msFullscreenElement","msFullscreenEnabled","MSFullscreenChange",n(162)]],a=0,i=o[n(154)],s={};a32&&console[t(348)](t(325)),e<=this[t(338)]){let r=this[t(334)]>>>32-e;return this[t(334)]<<=e,this._current_word_bits_left-=e,r}let r=this[t(338)]?this[t(334)]:0;r>>>=32-this._current_word_bits_left;let n=e-this[t(338)];this._fillCurrentWord();let o=Math.min(n,this[t(338)]),a=this[t(334)]>>>32-o;return this[t(334)]<<=o,this[t(338)]-=o,r=r<>>t))return this[e(334)]<<=t,this[e(338)]-=t,t;return this[e(340)](),t+this._skipLeadingZero()}[F(319)](){const e=F;let t=this._skipLeadingZero();return this[e(343)](t+1)-1}readSEG(){let e=this[F(319)]();return 1&e?e+1>>>1:-1*(e>>>1)}}function B(){const e=["_buffer_index","470obbmtp","readByte","readBool","ExpGolomb: readBits() bits exceeded max 32bits!","destroy","320ATYmFa","7401IyZDVJ","set","16869717NbArJI","52115767jIRJFx","4155LdITbl","_total_bytes","_current_word","_total_bits","453284FoAeLw","ExpGolomb: _fillCurrentWord() but no bytes available","_current_word_bits_left","min","_fillCurrentWord","1364396KNledR","13002qmtmRg","readBits","byteLength","subarray","319837oQjrSX","10ofPrSy","error","readUEG","buffer"];return(B=function(){return e})()}const W=U;!function(e,t){const r=U,n=e();for(;;)try{if(267669===-parseInt(r(466))/1*(parseInt(r(451))/2)+-parseInt(r(431))/3*(-parseInt(r(478))/4)+parseInt(r(409))/5+parseInt(r(479))/6*(parseInt(r(437))/7)+parseInt(r(471))/8*(parseInt(r(425))/9)+-parseInt(r(413))/10*(-parseInt(r(473))/11)+-parseInt(r(417))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(x);const O=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1];function U(e,t){const r=x();return(U=function(e,t){return r[e-=407]})(e,t)}function j(e){const t=U;return function(e){const t=U;return e[0]>>4===_[t(421)]}(e)&&e[1]===S[t(452)]}W(454);function x(){const e=["aacEncoderConfigurationRecord","mp4a.40.","12146cKNTav","sequenceHeader","push","read","has_last_incomplete_data","userAgent","getLATMValue","bufoff","android","audio_object_type","set","mp4a.40.2","firefox","more than 2 numLayer Not Supported","log","15KmokBi","buffer","sample_rate","navigator","sampling_index","16YxuCkj",". Only frameLengthType = 0 Supported","4346177rqgtss","iserro","destroy","findNextSyncwordOffset","byteLength","4yPHOvk","6bgRxOI","object_type","readByte","other_data_present","frameLengthType = ","475415Lajhaw","channel_config","unshift","aac","10lHFIoy","Invalid sampling index: ","chan_config","error","11153052CPKpDu","hasIncompleteData","readNextAACFrame","channel: ","AAC","data","buflen","readBits","1138104LdkWCz","Flv: AAC invalid channel configuration","toLowerCase","current_syncword_offset_","Flv: AAC invalid sampling frequency index!","subarray","817956dEtwfW","data_","audioMuxVersionA is Not Supported","warn","sbr","channels","1907017idbpYC","sampling_frequency","StreamMuxConfig Missing","indexOf","sampling_freq_index","bufpos","eof_flag_","getIncompleteData","length","Could not found ADTS syncword until payload end","more than 2 numProgram Not Supported","readBool"];return(x=function(){return e})()}W(418),W(444);W(457),W(419),W(418),W(444);function L(e,t){const r=V();return(L=function(e,t){return r[e-=338]})(e,t)}function V(){const e=["byteLength","set","792890bQHjUe","shift","134qoeNcG","4754CeACEQ","2057913DvgLDS","subarray","8mTuORT","575706FfKPlY","length","1670830QVBUNa","push","691296wKmDWL","5OaFmin","1372746Kdgweg"];return(V=function(){return e})()}!function(e,t){const r=L,n=e();for(;;)try{if(234279===parseInt(r(343))/1*(parseInt(r(342))/2)+-parseInt(r(347))/3+-parseInt(r(351))/4+-parseInt(r(352))/5*(-parseInt(r(353))/6)+parseInt(r(340))/7+-parseInt(r(346))/8*(parseInt(r(344))/9)+parseInt(r(349))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(V);const H=J;function z(){const e=J;return(new Date)[e(778)]()}!function(e,t){const r=J,n=e();for(;;)try{if(898747===-parseInt(r(466))/1*(-parseInt(r(774))/2)+-parseInt(r(524))/3+-parseInt(r(464))/4*(-parseInt(r(564))/5)+parseInt(r(687))/6+-parseInt(r(768))/7+parseInt(r(636))/8*(parseInt(r(639))/9)+-parseInt(r(473))/10*(parseInt(r(526))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(q),(()=>{const e=J;try{if(typeof WebAssembly===e(679)&&typeof WebAssembly[e(760)]===e(462)){const t=new(WebAssembly[e(607)])(Uint8Array.of(0,97,115,109,1,0,0,0));if(t instanceof WebAssembly[e(607)])return new(WebAssembly[e(663)])(t)instanceof WebAssembly[e(663)]}}catch(e){}})();const N=H(449);H(514),H(507),H(629),H(449);const G=N===H(538);H(771);function q(){const e=["bottom","object","pageY","click","src","message","setHours","kSliceBLA_N_LP","supported","10648062WPMtkE","img","attachShadow","objectFit","search","apply","error","min","AAC","ManagedMediaSource","getMinutes","hev4","fullscreenElement","port","QQBrowser","hev5","script","style","NaN","application/vnd.chromium.remoting-viewer","hour","replace","setInt16","text/javascript","mediaDevices","EB/s","now","[object Exception]","-webkit-touch-callout","target","Anonymous","mseDecodeAudio","pathname","subarray","playbackRate","close","-o-user-select","canPlayType","innerHTML","lineWidth","setUint16","type","-moz-user-select","pageX","ALAW","charCodeAt","0 Bytes","[object DOMException]","byteLength","borderWidth","div","appendChild","isFullscreen","not compiled with thread support, using thread emulation","backgroundColor","PB/s","mimeTypes","getSeconds","top",'video/mp4; codecs="',"getDay","sps","getImageData","px Arial","solid","none","numberOfFrames","application/360softmgrplugin","Reserved SBR extensions is not implemented","clearRect","navigator","position","Firefox","instantiate","copyright","toString","chrome","win32","fillStyle","filter","event","2393195uFCbRI","length","fillText",'"2025-2-1"',"createTextNode","performance","300vyzykJ","protocol","msGetUserMedia","connect","getTime","imageSmoothingEnabled","dataset","360","destination","font","readAsArrayBuffer","transferControlToOffscreen",'"production"',"data","strokeStyle","wow64","test","touches","display","data:","copyToChannel","absolute","hev1.1.6.L120.90","clientX","isConfigSupported","function","toFixed","4cuiBva","href","6745VjXLpv","kSliceBLA_W_RADL","round","children","application/hwepass2001.installepass2001","[object Error]","MediaSource","445880ZMIKGr","srcElement","AudioDecoder","download","toLowerCase","content","location","safari","drawImage","#000","height",";base64","touchend","{y}-{m}-{d} {h}:{i}:{s}","scrollTop","addModule","substr","QHBrowser","ActiveXObject","getUserMedia","requestVideoFrameCallback","onload","quality","-webkit-tap-highlight-color","data-","getUint8","createImageBitmap","useMSE","rect","getContext","floor","userAgent","webgl","validate",'"1-2-2025"',"360EE","getAttribute","RIFF","webkitFullscreenElement","Opera","clientY",'"2.1.3"',"opacity","mouseup","sequenceHeader","host","setAttribute","VideoDecoder","pps","high","PressureObserver","5032773EjDEMq","experimental-webgl","759HKxcGA","endsWith","prototype","slice","toDataURL","audioWorklet","substring","useOffscreen","version","Bytes","showModalDialog","-webkit-user-select",'"delaytime"',"removeAttribute","h265","iFrame","log","right","resume","webm","file","msFullscreenElement","random","MB/s","assign","crossOrigin","toUpperCase","element","text","application/asx","charAt","zIndex","visibility","insertBefore","VideoFrame","setUint32","webkitGetUserMedia","removeChild","8696225RXLLcb","-webkit-text-size-adjust","VideoEncoder.isConfigSupported() result is not supported","hev3","width","Edg","save","status","green","shadowRoot","not compiled with thread support","-ms-user-select","pointer-events: none !important; display: block !important","string","html","Chrome","overflow","max","stringify","webgl2","WAVE","9999999","sampleRate","set","borderColor","MULAW","mousedown","KB/s","kSliceRSV_IRAP_VCL23","hev","trim","borderStyle","QihooBrowser","win64","h264","image","true","image/png","createObjectURL","touchmove","application/javascript","hev2","isTypeSupported","Module","undefined","noteOn","ended","kSliceBLA_W_LP","gpu","revokeObjectURL","split","angle","fmt ","repeat","WebGL2RenderingContext","call","fontFamily","xxxx","open","fontSize","demuxUseWorker","360SE","match","format","useWCS",'"development"',"setUint8","webkit-3d","keys","color","imageSmoothingQuality","application/mozilla-npqihooquicklogin","7768KQHXsj","VideoEncoder.isConfigSupported is not a function","origin","13617sYjCFm","onerror","createBufferSource","documentElement","TB/s","parse","hash","URL","initEvent","contain","avc1.","indexOf","getPropertyValue","createBuffer","fromCharCode","MediaStream","setInt32","left","pow","body","moz-webgl","forEach","localhost","canvas","Instance","hasAudio","restore","wow32","line","atob","push","createElement","join","green yuv","getElementById","AudioData","vps","putImageData","isEnabled"];return(q=function(){return e})()}function K(e){return e&&typeof e===H(462)}function J(e,t){const r=q();return(J=function(e,t){return r[e-=442]})(e,t)}function X(e){const t=H;return e[0]>>4===C&&e[1]===S[t(517)]}function Y(e){return!0!==e&&e!==H(600)}const Q=ee;!function(e,t){const r=ee,n=e();for(;;)try{if(279689===-parseInt(r(120))/1+parseInt(r(123))/2+-parseInt(r(118))/3+parseInt(r(134))/4+parseInt(r(130))/5+parseInt(r(133))/6+-parseInt(r(126))/7*(parseInt(r(129))/8))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(te);class Z{on(e,t,r){const n=ee,o=this.e||(this.e={});return(o[e]||(o[e]=[]))[n(121)]({fn:t,ctx:r}),this}[Q(122)](e,t,r){const n=this;function o(){const a=ee;n[a(131)](e,o);for(var i=arguments.length,s=new Array(i),l=0;l1?n-1:0),a=1;a{delete n[e]})),void delete this.e;const o=n[e],a=[];if(o&&t)for(let e=0,n=o.length;e=2&&!this[r(264)];)if(255==this[r(281)][this.parsedOffset]){if(!(!1&this[r(281)][this[r(261)]+1])){this[r(270)]=this.tempBuffer[this[r(261)]+1],this[r(262)]=oe[r(267)],this[r(278)]=this[r(261)],this.parsedOffset+=2,e=!0;break}this[r(261)]++}else this[r(261)]++;if(e)continue;break}if(this.state==oe[r(267)]){let e=!1;for(;this[r(281)][r(280)]-this[r(261)]>=2&&!this[r(264)];)if(255==this[r(281)][this[r(261)]]){if(this.tempBuffer[this[r(261)]+1]==this.versionLayer){this[r(262)]=oe[r(256)],this[r(287)]=this[r(261)],this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this[r(262)]==oe[r(256)]){let e=this[r(281)][r(269)](this.fisrtStartCodeOffset,this.secondStartCodeOffset);this.emit(r(286),e,t),this[r(281)]=this[r(281)].slice(this[r(287)]),this[r(278)]=0,this[r(261)]=2,this[r(262)]=oe[r(267)]}}}}function se(e,t){const r=ue();return(se=function(e,t){return r[e-=248]})(e,t)}const le=se;function ue(){const e=["High10","85040dEQtXn","getProfileString","627556VCqWwr","High422","readSEG","parseSPS$2","getLevelString","readBits","19775512jwovWf","5ATfyRV","readUEG","3966256kWAMGA","4:4:4","High444","4:2:0","getChromaFormatString","parseSPS","Extended","toString","destroy","Unknown","2655492crRmhy","byteLength","ceil","2091555aMmSCM","High","Baseline","toFixed","_ebsp2rbsp","buffer","readBool","4:2:2","_skipScalingList","1246086HylcPr","length","readByte"];return(ue=function(){return e})()}!function(e,t){const r=se,n=e();for(;;)try{if(353136===-parseInt(r(276))/1+-parseInt(r(278))/2+-parseInt(r(263))/3+-parseInt(r(260))/4+parseInt(r(248))/5*(parseInt(r(272))/6)+-parseInt(r(250))/7+parseInt(r(284))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ue);class de{static[le(267)](e){const t=le;let r=e,n=r[t(261)],o=new Uint8Array(n),a=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(o[a]=r[e],a++);return new Uint8Array(o[t(268)],0,a)}static[le(255)](e){const t=le;let r=de[t(267)](e),n=new M(r);n.readByte();let o=n[t(274)]();n[t(274)]();let a=n.readByte();n.readUEG();let i=de[t(277)](o),s=de[t(282)](a),l=1,u=420,d=[0,420,422,444],c=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(l=n[t(249)](),3===l&&n[t(283)](1),l<=3&&(u=d[l]),c=n[t(249)]()+8,n[t(249)](),n[t(283)](1),n[t(269)]())){let e=3!==l?8:12;for(let r=0;r0&&e<16?(_=r[e-1],E=o[e-1]):255===e&&(_=n[t(274)]()<<8|n[t(274)](),E=n[t(274)]()<<8|n.readByte())}if(n[t(269)]()&&n[t(269)](),n[t(269)]()&&(n[t(283)](4),n[t(269)]()&&n[t(283)](24)),n[t(269)]()&&(n[t(249)](),n[t(249)]()),n[t(269)]()){let e=n[t(283)](32),r=n.readBits(32);S=n.readBool(),C=r,A=2*e,k=C/A}}let T=1;(1!==_||1!==E)&&(T=_/E);let P=0,I=0;if(0===l)P=1,I=2-g;else{P=3===l?1:2,I=(1===l?2:1)*(2-g)}let $=16*(h+1),D=16*(m+1)*(2-g);$-=(y+v)*P,D-=(w+b)*I;let F=Math[t(262)]($*T);return n[t(258)](),n=null,{profile_string:i,level_string:s,bit_depth:c,ref_frames:p,chroma_format:u,chroma_format_string:de[t(254)](u),frame_rate:{fixed:S,fps:k,fps_den:A,fps_num:C},sar_ratio:{width:_,height:E},codec_size:{width:$,height:D},present_size:{width:F,height:D}}}static[le(281)](e){const t=le;let r=e.subarray(1,4),n="avc1.";for(let e=0;e<3;e++){let o=r[e][t(257)](16);o[t(273)]<2&&(o="0"+o),n+=o}let o=de[t(267)](e),a=new M(o);a.readByte();let i=a.readByte();a[t(274)]();let s=a[t(274)]();a.readUEG();let l=de.getProfileString(i),u=de[t(282)](s),d=1,c=420,f=[0,420,422,444],p=8,h=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(d=a[t(249)](),3===d&&a[t(283)](1),d<=3&&(c=f[d]),p=a.readUEG()+8,h=a.readUEG()+8,a.readBits(1),a[t(269)]())){let e=3!==d?8:12;for(let r=0;r0&&e<16?(S=r[e-1],C=n[e-1]):255===e&&(S=a[t(274)]()<<8|a[t(274)](),C=a[t(274)]()<<8|a.readByte())}if(a[t(269)]()&&a.readBool(),a[t(269)]()&&(a.readBits(4),a.readBool()&&a.readBits(24)),a.readBool()&&(a[t(249)](),a[t(249)]()),a.readBool()){let e=a[t(283)](32),r=a[t(283)](32);T=a[t(269)](),P=r,I=2*e,A=P/I}}let $=1;(1!==S||1!==C)&&($=S/C);let D=0,F=0;if(0===d)D=1,F=2-w;else{D=3===d?1:2,F=(1===d?2:1)*(2-w)}let R=16*(y+1),B=16*(v+1)*(2-w);R-=(b+_)*D,B-=(E+k)*F;let W=Math[t(262)](R*$);return a[t(258)](),a=null,{codec_mimetype:n,profile_idc:i,level_idc:s,profile_string:l,level_string:u,chroma_format_idc:d,bit_depth:p,bit_depth_luma:p,bit_depth_chroma:h,ref_frames:g,chroma_format:c,chroma_format_string:de.getChromaFormatString(c),frame_rate:{fixed:T,fps:A,fps_den:I,fps_num:P},sar_ratio:{width:S,height:C},codec_size:{width:R,height:B},present_size:{width:W,height:B}}}static[le(271)](e,t){const r=le;let n=8,o=8,a=0;for(let i=0;i=this[t(369)])return this[t(365)]=!0,0;this[t(365)]=!1,n=this[t(364)]+e>8?8-this[t(364)]:e,r<<=n,r+=this[t(371)][this[t(370)]]>>8-this[t(364)]-n&255>>8-n,this[t(364)]+=n,e-=n,8==this[t(364)]&&(this[t(370)]++,this[t(364)]=0)}return r}[ce(358)](e){const t=ce;let r=this[t(370)],n=this[t(364)],o=this[t(368)](e);return this.bufpos=r,this[t(364)]=n,o}[ce(362)](){const e=ce;let t;for(t=0;0===this[e(368)](1)&&!this[e(365)];t++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),o=new Uint8Array(e+4);o[t(495)](n,0),o[t(495)](r[t(499)],4),r[t(499)]=o}if(r[t(516)]){const e=r[t(516)][t(482)],n=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),o=new Uint8Array(e+4);o[t(495)](n,0),o[t(495)](r[t(516)],4),r[t(516)]=o}return r}function _e(e,t){const r=we();return(_e=function(e,t){return r[e-=442]})(e,t)}!function(e,t){const r=_e,n=e();for(;;)try{if(804289===parseInt(r(524))/1+parseInt(r(465))/2+-parseInt(r(476))/3*(parseInt(r(515))/4)+-parseInt(r(526))/5+parseInt(r(517))/6*(parseInt(r(485))/7)+parseInt(r(527))/8+-parseInt(r(489))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(we);ve(455),ve(504);function Ee(e,t){const r=Se();return(Ee=function(e,t){return r[e-=455]})(e,t)}const ke=Ee;function Se(){const e=["GetSE","GetBYTE","m_idx","m_byte","1578aBVKBB","m_data","17754384LMaIsk","m_zeros","6875WJWWTr","8QUyAVU","m_len","GetWord","length","26jUHnDM","10340pCbFEK","4824207eiNyTa","GetUE","4WwFjYK","m_bits","6755616qMyTYt","9629975WcslXI","1134654LqWbKN","903NSqDZw","GetBit","35pOgsFs"];return(Se=function(){return e})()}!function(e,t){const r=Ee,n=e();for(;;)try{if(978638===-parseInt(r(456))/1*(-parseInt(r(463))/2)+-parseInt(r(474))/3*(parseInt(r(476))/4)+-parseInt(r(479))/5+parseInt(r(455))/6*(parseInt(r(458))/7)+parseInt(r(468))/8*(-parseInt(r(478))/9)+parseInt(r(473))/10*(parseInt(r(467))/11)+parseInt(r(465))/12*(parseInt(r(472))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Se);ke(470),ke(475),ke(459);function Ce(){const e=["SPSParser bit_depth_luma_minus8 != bit_depth_chroma_minus8","121247suXMMi","_ebsp2rbsp","GetUE","SPSParser sps_max_sub_layers_minus1 > 6","2068078espuyf","1HCXKFO","SPSParser sps_seq_parameter_set_id > 15","245409PPAQjp","6870144zDsGHD","byteLength","buffer","GetWord","4942970EBBJcY","1691946vsJWqy","28hKiVhB","19533740qwyVhl","54ZMbCGy","warn"];return(Ce=function(){return e})()}const Ae=Te;function Te(e,t){const r=Ce();return(Te=function(e,t){return r[e-=390]})(e,t)}!function(e,t){const r=Te,n=e();for(;;)try{if(535325===parseInt(r(399))/1*(parseInt(r(398))/2)+parseInt(r(401))/3*(-parseInt(r(408))/4)+-parseInt(r(406))/5+-parseInt(r(391))/6*(-parseInt(r(394))/7)+-parseInt(r(402))/8+-parseInt(r(407))/9+parseInt(r(390))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ce);Ae(395);function Pe(){const e=["readSEG","push","buffer","14925480KnPToA","79WYFsOv","readUEG","3453471JfHSeW","hvc1.","4218363QPGJAs","4908448tkzPdV","readByte","4:2:0","92RoYXtH","4:2:2","readBool","2643245jXvPuh","toFixed","readBits","6GcIGPR",".B0","byteLength","4450jCVjgT","destroy","Unknown","4:0:0","21249PNARXG"];return(Pe=function(){return e})()}function Ie(e,t){const r=Pe();return(Ie=function(e,t){return r[e-=495]})(e,t)}!function(e,t){const r=Ie,n=e();for(;;)try{if(362123===-parseInt(r(496))/1*(parseInt(r(513))/2)+-parseInt(r(517))/3*(-parseInt(r(504))/4)+parseInt(r(507))/5*(-parseInt(r(510))/6)+parseInt(r(498))/7+-parseInt(r(501))/8+-parseInt(r(500))/9+parseInt(r(495))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Pe);const $e=De;function De(e,t){const r=Re();return(De=function(e,t){return r[e-=280]})(e,t)}!function(e,t){const r=De,n=e();for(;;)try{if(660766===-parseInt(r(292))/1+-parseInt(r(283))/2+-parseInt(r(312))/3*(-parseInt(r(298))/4)+parseInt(r(306))/5+parseInt(r(313))/6+-parseInt(r(294))/7+parseInt(r(296))/8*(parseInt(r(287))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Re);class Fe{static[$e(304)](e){const t=$e;let r=e,n=r[t(285)],o=new Uint8Array(n),a=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(o[a]=r[e],a++);return new Uint8Array(o[t(311)],0,a)}static[$e(299)](e){const t=$e;let r=Fe[t(304)](e),n=new M(r);return n.readByte(),n.readByte(),n[t(293)](4),n[t(293)](2),n[t(293)](6),{num_temporal_layers:n[t(293)](3)+1,temporal_id_nested:n.readBool()}}static parseSPS(e){const t=$e;let r=Fe[t(304)](e),n=new M(r);n[t(300)](),n[t(300)]();let o=0,a=0,i=0,s=0;n[t(293)](4);let l=n.readBits(3);n[t(315)]();let u=n[t(293)](2),d=n[t(315)](),c=n[t(293)](5),f=n[t(300)](),p=n.readByte(),h=n[t(300)](),m=n[t(300)](),g=n.readByte(),y=n[t(300)](),v=n[t(300)](),w=n[t(300)](),b=n.readByte(),_=n[t(300)](),E=n.readByte(),k=[],S=[];for(let e=0;e0)for(let e=l;e<8;e++)n[t(293)](2);for(let e=0;e1&&n[t(303)]();for(let e=0;e0&&e<=16?(W=r[e-1],O=o[e-1]):255===e&&(W=n.readBits(16),O=n.readBits(16))}if(n[t(315)]()&&n[t(315)](),n[t(315)]()){n[t(293)](3),n.readBool(),n[t(315)]()&&(n[t(300)](),n[t(300)](),n[t(300)]())}if(n[t(315)]()&&(n.readUEG(),n.readUEG()),n[t(315)](),n[t(315)](),n[t(315)](),R=n[t(315)](),R&&(n.readUEG(),n[t(282)](),n.readUEG(),n.readUEG()),n[t(315)]()){if(j=n[t(293)](32),x=n.readBits(32),n[t(315)]()&&n[t(282)](),n[t(315)]()){let e=!1,r=!1,o=!1;e=n[t(315)](),r=n[t(315)](),(e||r)&&(o=n[t(315)](),o&&(n[t(300)](),n[t(293)](5),n.readBool(),n[t(293)](5)),n[t(293)](4),n[t(293)](4),o&&n[t(293)](4),n[t(293)](5),n[t(293)](5),n.readBits(5));for(let a=0;a<=l;a++){let a=n[t(315)]();U=a;let i=!0,s=1;!a&&(i=n.readBool());let l=!1;if(i?n[t(282)]():l=n[t(315)](),!l&&(s=n.readUEG()+1),e){for(let e=0;e0)for(let t=r;t<8;t++)e.read(2);o[n(258)]=[],o[n(348)]=[],o[n(311)]=[],o[n(249)]=[],o[n(329)]=[],o[n(331)]=[],o[n(220)]=[],o[n(338)]=[],o[n(342)]=[];for(let t=0;t ","HEAPU8","8VawUEL","validatedFailed, please contact the author to get the correct license"," and isIFrame is ","player","\n and replay","video wasm error:","pcmData","3532998UdJWuK","debugError","TAG_NAME","checkFirstIFrame","h265","h264","slice","destroy","byteLength","errorInfo","MP3","worker","codecHeight","hasInitAudioCodec","decodeAudio and has already initialized and payload is aac codec packet so drop this frame","decodeVideo: video width or height is changed, and return","render","10gfxiAp","6613155LuMciO","notSupportNewWasm","yuvData, isVideoFirstIFrame is false and return","ModuleVideo","setCodecVideo, videoDecoder is not exist or setCodec is not a function","validatedFailed","clear","subarray","sampleRate","setCodec","toString",", old height is "," and maxDiff is ","setCodecAudio: hasInitAudioCodec is false, codecId is ","simdDecodeError","simdH264DecodeVideoWidthIsTooLarge","setCodecVideo: hasInitVideoCodec is false, codecId is ","getBuildTime","6890chbiIJ","lastDecodeVideoFrameTimestamp","_handleModuleAudioError","mp3Demuxer","isDestroyed","codecWidth","playAudio","length","pcmData, decoder is destroyed and return","yuvData"," and diff is ","workerEnd","isSimdDecodeError","debugLog",", height: ","videoCodec","HEAPU32","audioBufferSize","emit"," create uint8Array error :","audioRemain","audioDecoder","pcmData ts ","decodeVideo and payload is too small , payload length is ","isWidthOrHeightChanged","_reset","videoCode","setCodecVideo: SIMD H264 decode video width is too large, width is ","timeEnd","wasmDecodeErrorStartTime","videoWidth",",\n and emit change event","ModuleAudio","delete","MtWasmDecoder","setCodecAudio","off","decodeAudio","setCodecVideo","yuvData, decoder is destroyed and return","27775dFcnCQ","audioDepth","decodeVideo: simd decode error, and return","setCodecAudio, audioDecoder is not exist or setCodec is not a function","setCodecAudio: init audio codec, codeId is ","audioChannels","audioInfo","width: ","audioCode"," _opt.sampleRate is ","AAC","errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is ","decodeAudio, decoder is destroyed and return","12olMQLA","debugWarn","audioAACSequenceHeader","869450OHuXqK","decodeVideo, decoder is destroyed and return","hasInitVideoCodec",", height is ","MULAW","74940bJAvBG","iframeIntervalTimestamp","ALAW","decode","videoDecoder","15807xhfSFr"];return(je=function(){return e})()}function xe(e,t){const r=je();return(xe=function(e,t){return r[e-=439]})(e,t)}!function(e,t){const r=xe,n=e();for(;;)try{if(411818===parseInt(r(477))/1*(parseInt(r(540))/2)+-parseInt(r(504))/3+-parseInt(r(498))/4+-parseInt(r(493))/5*(parseInt(r(490))/6)+parseInt(r(523))/7+-parseInt(r(516))/8*(parseInt(r(541))/9)+parseInt(r(559))/10*(parseInt(r(503))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(je);class Le extends Z{constructor(e){const t=xe;let r=arguments[t(444)]>1&&void 0!==arguments[1]?arguments[1]:{};super(),this[t(519)]=e,this._opt=r,this[t(525)]=t(471),this._reset(),this[t(454)]=r[t(454)]||1024,this[t(549)]=r[t(549)]||44100,this[t(469)]=null,this.ModuleVideo=null,this[t(502)]=null,this[t(458)]=null,this[t(508)]=!!Y(e._opt[t(526)]),this.init()}[Ue(530)](){const e=Ue;if(this[e(473)](),this[e(458)]){try{K(this[e(458)].clear)&&this[e(458)][e(547)](),K(this[e(458)].delete)&&this[e(458)][e(470)]()}catch(e){}this.audioDecoder=null}if(this[e(502)]){try{K(this[e(502)][e(547)])&&this.videoDecoder[e(547)](),K(this[e(502)].delete)&&this[e(502)].delete()}catch(e){}this[e(502)]=null}this[e(440)]&&(this[e(440)][e(530)](),this[e(440)]=null),this[e(462)](),this[e(519)][e(450)](this[e(525)],e(530))}init(){}[Ue(439)](e){const t=Ue;(function(e){const t=H;return!(!e||-1===e.indexOf(t(574))&&-1===e.indexOf("illegal icc")&&-1===e[t(650)]("If you want to help, upload a sample of this file to")&&-1===e[t(650)](t(755)))})(e)||this.player.debugError(this[t(525)],"audio wasm error:",e)}[Ue(509)](e){const t=Ue;(function(e){const t=H;return!(!e||-1===e[t(650)](t(740)))})(e)||(this[t(519)][t(524)](this[t(525)],t(521),e),Y(function(e){let t=!0;return e&&-1!==e[H(650)]("failed to asynchronously prepare wasm")&&(t=!1),t}(e))&&this[t(455)](y[t(542)],e))}_reset(){const e=Ue;this[e(458)]=null,this[e(502)]=null,this[e(454)]=null,this.videoWidth=0,this[e(513)]=0,this.audioChannels=0,this[e(478)]=0,this[e(536)]=!1,this[e(495)]=!1,this[e(440)]=null,this[e(508)]=!1,this.isWidthOrHeightChanged=!1,this[e(449)]=!1,this[e(560)]=0,this.wasmDecodeErrorStartTime=null,this.newDecodedVideoFrameTimestamp=0,this.audioRemain=0,this[e(499)]=0,this.audioOutputArray=[],this[e(506)]=[]}[Ue(475)](e,t){const r=Ue,n=15&e[0],o=this.player;if(Y(this.videoDecoder&&K(this[r(502)][r(550)])))o[r(524)](this[r(525)],r(545));else if(X(e))if(n===w.h264||n===w[r(527)]){o[r(450)](this.TAG_NAME,"setCodecVideo: init video codec , codecId is "+n);const t=e.slice(5);if(n===w[r(528)]&&o._opt.useSIMD){const e=be(t);if(e[r(442)]>m||e.codecHeight>m)return this[r(455)](y[r(556)],r(484)+e[r(442)]+r(514)+m+r(451)+e[r(535)]+r(514)+m),void o.debugWarn(this[r(525)],r(464)+e[r(442)]+r(496)+e[r(535)])}const a=new Uint8Array(e);this[r(495)]=!0,this[r(502)].setCodec(n,t,this[r(558)]()),this[r(455)](y.videoCode,{code:n}),this.emit(y[r(452)],{buffer:a,codecId:n})}else o[r(491)](this[r(525)],r(557)+n+" is not H264 or H265");else o[r(491)](this[r(525)],"decodeVideo: hasInitVideoCodec is false, codecId is "+n+r(518)+t+r(507)+e[1])}[Ue(472)](e,t){const r=Ue,n=e[0]>>4,o=e[0]>>1&1;if(n===_[r(487)]?this[r(478)]=o?16:8:this[r(478)]=0===o?8:16,Y(this[r(458)]&&K(this.audioDecoder[r(550)])))return void this[r(519)].debugError(this[r(525)],r(480));const a=this[r(519)];if(j(e)||n===_[r(500)]||n===_[r(497)]||n===_[r(533)]){this.player[r(450)](this[r(525)],r(481)+n+r(486)+this[r(549)]);const o=n===_.AAC?e.slice(2):new Uint8Array(0);if(this[r(458)][r(550)](n,this[r(549)],o,this.getBuildTime()),n===_.AAC&&this.emit(y[r(492)],{buffer:o}),this[r(536)]=!0,n!==_.AAC&&(n===_[r(533)]?(!this[r(440)]&&(this.mp3Demuxer=new ie(this),this[r(440)].on("data",((e,t)=>{const n=r;this[n(458)][n(501)](e,t)}))),this[r(440)][r(512)](e[r(529)](1),t)):this.audioDecoder[r(501)](e.slice(1),t)),Y(G)){const e=Number("1")||1;setTimeout((()=>{const e=r;this[e(519)][e(524)](this[e(525)],e(505)),this.destroy(),this[e(455)](y.workerEnd)}),60*e*60*1e3)}}else a[r(491)](this[r(525)],r(554),n)}[Ue(474)](e,t){const r=Ue;if(this[r(519)][r(441)]())return void this.player[r(450)](this[r(525)],r(489));const n=e[0]>>4;if(this[r(536)]){if(j(e))return void this[r(519)][r(450)](this[r(525)],r(537));n===_[r(533)]?this.mp3Demuxer[r(512)](e[r(529)](1),t):this[r(458)].decode(n===_.AAC?e[r(529)](2):e[r(529)](1),t)}else this[r(472)](e,t)}decodeVideo(e,t,r){const n=Ue;if(n(444),this[n(519)][n(441)]())this[n(519)][n(450)](this[n(525)],n(494));else if(this[n(495)])if(!this[n(508)]&&r&&(this[n(508)]=!0),this[n(508)]){if(r&&X(e)){const t=15&e[0];let r={};if(t===w[n(528)]){r=be(e[n(529)](5))}else t===w[n(527)]&&(r=function(e){const t=Be;let r={codecWidth:0,codecHeight:0,videoType:k[t(336)]};r[t(268)]=0,r.height=0,r[t(235)]=0,r.level=0,e=e[t(211)](5);do{let n={};if(e[t(292)]<23){console[t(291)]("parseHEVCDecoderConfigurationRecord$2",t(254)+e[t(292)]+t(269));break}if(n[t(290)]=e[0],1!=n.configurationVersion)break;n[t(277)]=e[1]>>6&3,n[t(238)]=e[1]>>5&1,n[t(350)]=31&e[1],n[t(299)]=e[2]<<24|e[3]<<16|e[4]<<8|e[5],n.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],n.general_constraint_indicator_flags=n[t(352)]<<16|e[10]<<8|e[11],n[t(248)]=e[12],n[t(261)]=(15&e[13])<<8|e[14],n[t(216)]=3&e[15],n[t(214)]=3&e[16],n[t(209)]=7&e[17],n[t(252)]=7&e[18],n[t(347)]=e[19]<<8|e[20],n[t(234)]=e[21]>>6&3,n[t(245)]=e[21]>>3&7,n[t(324)]=e[21]>>2&1,n.lengthSizeMinusOne=3&e[21];let o=e[22],a=e[t(211)](23);for(let e=0;e"+r[n(442)]+n(451)+this[n(513)]+"->"+r[n(535)]))}if(this[n(461)])return void this[n(519)][n(491)](this[n(525)],n(538));if(this[n(449)])return void this[n(519)].debugWarn(this[n(525)],n(479));if(X(e))return void this.player[n(450)](this[n(525)],"decodeVideo and payload is video sequence header so drop this frame");if(e[n(531)]<12)return void this[n(519)][n(491)](this.TAG_NAME,n(460)+e[n(531)]);this.lastDecodeVideoFrameTimestamp=t;const o=e[n(529)](5);this.videoDecoder[n(501)](o,r?1:0,t)}else this.player[n(450)](this[n(525)],"decodeVideo first frame is not iFrame");else this[n(475)](e,r)}[Ue(511)](e,t,r){const n=Ue;this[n(455)](y[n(463)],{code:e}),this.emit(y.initVideo,{w:t,h:r}),this[n(467)]=t,this.videoHeight=r}[Ue(483)](e,t,r){const n=Ue;this[n(455)](y[n(485)],{code:e}),this[n(455)](y.initAudio,{sampleRate:t,channels:r,depth:this.audioDepth}),this[n(482)]=r}[Ue(446)](e,t){const r=Ue;if(this.player[r(441)]())return void this.player[r(450)](this.TAG_NAME,r(476));if(Y(this[r(508)]))return void this[r(519)][r(450)](this[r(525)],r(543));const n=this[r(467)]*this[r(513)]*3/2;try{let o=this[r(544)][r(515)][r(548)](e,e+n),a=new Uint8Array(o);this.wasmDecodeErrorStartTime=null,this.newDecodedVideoFrameTimestamp=t,this[r(455)](y[r(539)],{output:a,ts:t})}catch(e){this[r(519)].debugWarn(this[r(525)],"yuvData ts "+t+" create uint8Array error :",e,e[r(551)]())}}[Ue(522)](e,t,r){const n=Ue;if(this[n(519)][n(441)]())return void this.player[n(450)](this[n(525)],n(445));let o=t,a=[],i=0;try{let s=this.audioBufferSize;for(let t=0;t<2;t++){let r=this[n(469)][n(453)][(e>>2)+t]>>2;a[t]=this[n(469)].HEAPF32[n(548)](r,r+o)}if(this[n(457)]){if(!(o>=(t=s-this.audioRemain)))return this[n(457)]+=o,this.tempAudioBuffer[0]=Float32Array.of(...this[n(506)][0],...a[0]),void(2==this[n(482)]&&(this[n(506)][1]=Float32Array.of(...this[n(506)][1],...a[1])));this[n(510)][0]=Float32Array.of(...this.tempAudioBuffer[0],...a[0][n(548)](0,t)),2==this[n(482)]&&(this[n(510)][1]=Float32Array.of(...this[n(506)][1],...a[1].subarray(0,t))),this.emit(y.playAudio,{buffer:this.audioOutputArray,ts:r}),i=t,o-=t}for(this.audioRemain=o;this[n(457)]>=s;this.audioRemain-=s)this[n(510)][0]=a[0][n(529)](i,i+=s),2==this[n(482)]&&(this[n(510)][1]=a[1].slice(i-s,i)),this.emit(y[n(443)],{buffer:this.audioOutputArray,ts:r});this[n(457)]&&(this[n(506)][0]=a[0][n(529)](i),2==this[n(482)]&&(this.tempAudioBuffer[1]=a[1].slice(i))),a=[]}catch(e){this[n(519)][n(491)](n(534),n(459)+r+n(456),e,e[n(551)]())}}[Ue(532)](e){const t=Ue;null===this[t(466)]&&(this[t(466)]=z());const r=z(),n=function(e,t,r){const n=J;return Math[n(581)](Math[n(694)](e,Math[n(581)](t,r)),Math[n(694)](t,r))}(this[t(499)]>0?2*this[t(499)]:5e3,1e3,5e3),o=r-this[t(466)];o>n&&(this[t(519)][t(491)](this[t(525)],t(488)+this[t(499)]+t(447)+o+t(553)+n+t(520)),this[t(449)]=!0,this[t(455)](y[t(555)]))}[Ue(558)](){return"JessibucaPro-"+p}[Ue(465)](){const e=Ue;this[e(519)][e(524)](this[e(525)],e(505)),this[e(530)](),this[e(455)](y[e(448)])}[Ue(546)](){const e=Ue;this[e(519)][e(524)](this.TAG_NAME,e(517))}}const Ve=He;function He(e,t){const r=ze();return(He=function(e,t){return r[e-=484]})(e,t)}function ze(){const e=["push","_handleModuleAudioError","AudioDecoder","50709oREdCt","VideoDecoder","debugError","player","audioDecoder","then","9fRLiNy","354271tSflCl","7423850EjjbYN","6TWHIMl","_handleModuleVideoError","init","bind","7163492QhIuJR","toString","18595940DukBbB","66lMRCfy","165805AifKdi","simd","init wasm error","TAG_NAME","2688488yAdgZt","debugLog","videoDecoder","JessibucaProMtSimdDecoder","all","catch","236mUeKqv"];return(ze=function(){return e})()}!function(e,t){const r=He,n=e();for(;;)try{if(560095===parseInt(r(504))/1*(-parseInt(r(506))/2)+-parseInt(r(497))/3*(-parseInt(r(493))/4)+parseInt(r(514))/5*(parseInt(r(513))/6)+-parseInt(r(510))/7+-parseInt(r(487))/8*(-parseInt(r(503))/9)+-parseInt(r(505))/10+parseInt(r(512))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ze);class Ne extends Le{constructor(e){const t=He;super(e),this[t(486)]="MtSimdDecoder",this.mtType=A[t(484)]}[Ve(508)](){const e=Ve,n=[];n[e(494)](r({printErr:this[e(495)][e(509)](this)}),t({printErr:this[e(507)][e(509)](this)})),Promise[e(491)](n)[e(502)]((t=>{const r=e;let[n,o]=t;this.ModuleAudio=n,this.ModuleVideo=o,o[r(498)]&&(this[r(489)]=new(o[r(498)])(this)),n[r(496)]&&(this[r(501)]=new(n[r(496)])(this)),this.emit(y[r(508)]),this[r(500)][r(488)](this[r(486)],r(508))}))[e(492)]((t=>{const r=e;this.player[r(499)](this.TAG_NAME,r(485),t,t[r(511)]())}))}}window[Ve(490)]=Ne})); diff --git a/ui/decoder-pro-simd.js b/ui/decoder-pro-simd.js index f6c2272..8aa9c13 100644 --- a/ui/decoder-pro-simd.js +++ b/ui/decoder-pro-simd.js @@ -1 +1 @@ -!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,t=(e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href,async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,i,n;(n=t).ready=new Promise(((e,t)=>{r=e,i=t})),(n=void 0!==n?n:{}).locateFile=function(e){return"decoder-pro-simd.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_SIMD_WASM_URL&&""!=JESSIBUCA_PRO_SIMD_WASM_URL?JESSIBUCA_PRO_SIMD_WASM_URL:e};var s,a,o,l=Object.assign({},n),d="object"==typeof window,u="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,c="";function f(e){return n.locateFile?n.locateFile(e,c):c+e}if(h){const{createRequire:e}=await import("module");var p=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href),m=p("fs"),_=p("path");c=u?_.dirname(c)+"/":p("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href)),s=(e,t)=>(e=q(e)?new URL(e):_.normalize(e),m.readFileSync(e,t?void 0:"utf8")),o=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},a=function(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=q(e)?new URL(e):_.normalize(e),m.readFile(e,i?void 0:"utf8",((e,n)=>{e?r(e):t(i?n.buffer:n)}))},!n.thisProgram&&process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),n.inspect=()=>"[Emscripten Module object]"}else(d||u)&&(u?c=self.location.href:"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),e&&(c=e),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},u&&(o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),a=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)});var g,y,v=n.print||console.log.bind(console),b=n.printErr||console.error.bind(console);Object.assign(n,l),l=null,n.arguments&&n.arguments,n.thisProgram&&n.thisProgram,n.quit&&n.quit,n.wasmBinary&&(g=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&V("no native wasm support detected");var w,S,E,U,x,A,C,T,B=!1;function k(){var e=y.buffer;n.HEAP8=w=new Int8Array(e),n.HEAP16=E=new Int16Array(e),n.HEAPU8=S=new Uint8Array(e),n.HEAPU16=U=new Uint16Array(e),n.HEAP32=x=new Int32Array(e),n.HEAPU32=A=new Uint32Array(e),n.HEAPF32=C=new Float32Array(e),n.HEAPF64=T=new Float64Array(e)}var F=[],P=[],I=[];function D(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)z(n.preRun.shift());ee(F)}function L(){ee(P)}function R(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)O(n.postRun.shift());ee(I)}function z(e){F.unshift(e)}function M(e){P.unshift(e)}function O(e){I.unshift(e)}var $=0,N=null;function G(e){$++,n.monitorRunDependencies&&n.monitorRunDependencies($)}function H(e){if($--,n.monitorRunDependencies&&n.monitorRunDependencies($),0==$&&N){var t=N;N=null,t()}}function V(e){n.onAbort&&n.onAbort(e),b(e="Aborted("+e+")"),B=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}var W,j="data:application/octet-stream;base64,";function Y(e){return e.startsWith(j)}function q(e){return e.startsWith("file://")}function K(e){if(e==W&&g)return new Uint8Array(g);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function X(e){if(!g&&(d||u)){if("function"==typeof fetch&&!q(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>K(e)));if(a)return new Promise(((t,r)=>{a(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>K(e)))}function Z(e,t,r){return X(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{b(`failed to asynchronously prepare wasm: ${e}`),V(e)}))}function J(e,t,r,i){return e||"function"!=typeof WebAssembly.instantiateStreaming||Y(t)||q(t)||h||"function"!=typeof fetch?Z(t,r,i):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(i,(function(e){return b(`wasm streaming compile failed: ${e}`),b("falling back to ArrayBuffer instantiation"),Z(t,r,i)}))))}function Q(){var e={a:wr};function t(e,t){return Sr=e.exports,y=Sr.B,k(),rt=Sr.F,M(Sr.C),H(),Sr}if(G(),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){b(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return J(g,W,e,(function(e){t(e.instance)})).catch(i),{}}n.locateFile?Y(W="decoder-pro-simd.wasm")||(W=f(W)):W=new URL("decoder-pro-simd.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href).href;var ee=e=>{for(;e.length>0;)e.shift()(n)};function te(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){A[this.ptr+4>>2]=e},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(e){A[this.ptr+8>>2]=e},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,w[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=w[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,w[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=w[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){A[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Cr(this.get_type()))return A[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var re,ie,ne,se=(e,t,r)=>{throw new te(e).init(t,r),e},ae=(e,t,r,i,n)=>{},oe=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);re=e},le=e=>{for(var t="",r=e;S[r];)t+=re[S[r++]];return t},de={},ue={},he={},ce=e=>{throw new ie(e)},fe=e=>{throw new ne(e)},pe=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&fe("Mismatched type converter count");for(var n=0;n{ue.hasOwnProperty(e)?n[t]=ue[e]:(s.push(e),de.hasOwnProperty(e)||(de[e]=[]),de[e].push((()=>{n[t]=ue[e],++a===s.length&&i(n)})))})),0===s.length&&i(n)};function me(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i=t.name;if(e||ce(`type "${i}" must have a positive integer typeid pointer`),ue.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;ce(`Cannot register type '${i}' twice`)}if(ue[e]=t,delete he[e],de.hasOwnProperty(e)){var n=de[e];delete de[e],n.forEach((e=>e()))}}function _e(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return me(e,t,r)}var ge,ye=8,ve=(e,t,r,i)=>{_e(e,{name:t=le(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:ye,readValueFromPointer:function(e){return this.fromWireType(S[e])},destructorFunction:null})},be=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),we=e=>{ce(e.$$.ptrType.registeredClass.name+" instance already deleted")},Se=!1,Ee=e=>{},Ue=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},xe=e=>{e.count.value-=1,0===e.count.value&&Ue(e)},Ae=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=Ae(e,t,r.baseClass);return null===i?null:r.downcast(i)},Ce={},Te=()=>Object.keys(De).length,Be=()=>{var e=[];for(var t in De)De.hasOwnProperty(t)&&e.push(De[t]);return e},ke=[],Fe=()=>{for(;ke.length;){var e=ke.pop();e.$$.deleteScheduled=!1,e.delete()}},Pe=e=>{ge=e,ke.length&&ge&&ge(Fe)},Ie=()=>{n.getInheritedInstanceCount=Te,n.getLiveInheritedInstances=Be,n.flushPendingDeletes=Fe,n.setDelayFunction=Pe},De={},Le=(e,t)=>{for(void 0===t&&ce("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},Re=(e,t)=>(t=Le(e,t),De[t]),ze=(e,t)=>(t.ptrType&&t.ptr||fe("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&fe("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Oe(Object.create(e,{$$:{value:t}})));function Me(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Re(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function n(){return this.isSmartPointer?ze(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):ze(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,a=this.registeredClass.getActualType(t),o=Ce[a];if(!o)return n.call(this);s=this.isConst?o.constPointerType:o.pointerType;var l=Ae(t,this.registeredClass,s.registeredClass);return null===l?n.call(this):this.isSmartPointer?ze(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):ze(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var Oe=e=>"undefined"==typeof FinalizationRegistry?(Oe=e=>e,e):(Se=new FinalizationRegistry((e=>{xe(e.$$)})),Oe=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Se.register(e,r,e)}return e},Ee=e=>Se.unregister(e),Oe(e)),$e=()=>{Object.assign(Ne.prototype,{isAliasOf(e){if(!(this instanceof Ne))return!1;if(!(e instanceof Ne))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)n=i.upcast(n),i=i.baseClass;return t===i&&r===n},clone(){if(this.$$.ptr||we(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Oe(Object.create(Object.getPrototypeOf(this),{$$:{value:be(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||we(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ce("Object already scheduled for deletion"),Ee(this),xe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||we(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ce("Object already scheduled for deletion"),ke.push(this),1===ke.length&&ge&&ge(Fe),this.$$.deleteScheduled=!0,this}})};function Ne(){}var Ge=48,He=57,Ve=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Ge&&t<=He?`_${e}`:e};function We(e,t){return{[e=Ve(e)]:function(){return t.apply(this,arguments)}}[e]}var je=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||ce(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}},Ye=(e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&ce(`Cannot register public name '${e}' twice`),je(n,e,e),n.hasOwnProperty(r)&&ce(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))};function qe(e,t,r,i,n,s,a,o){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=n,this.getActualType=s,this.upcast=a,this.downcast=o,this.pureVirtualFunctions=[]}var Ke=(e,t,r)=>{for(;t!==r;)t.upcast||ce(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Xe(e,t){if(null===t)return this.isReference&&ce(`null is not a valid ${this.name}`),0;t.$$||ce(`Cannot pass "${Ft(t)}" as a ${this.name}`),t.$$.ptr||ce(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Ke(t.$$.ptr,r,this.registeredClass)}function Ze(e,t){var r;if(null===t)return this.isReference&&ce(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||ce(`Cannot pass "${Ft(t)}" as a ${this.name}`),t.$$.ptr||ce(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&ce(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=Ke(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ce("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:ce(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var n=t.clone();r=this.rawShare(r,Ct.toHandle((()=>n.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:ce("Unsupporting sharing policy")}return r}function Je(e,t){if(null===t)return this.isReference&&ce(`null is not a valid ${this.name}`),0;t.$$||ce(`Cannot pass "${Ft(t)}" as a ${this.name}`),t.$$.ptr||ce(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&ce(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Ke(t.$$.ptr,r,this.registeredClass)}function Qe(e){return this.fromWireType(A[e>>2])}var et=()=>{Object.assign(tt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:ye,readValueFromPointer:Qe,deleteObject(e){null!==e&&e.delete()},fromWireType:Me})};function tt(e,t,r,i,n,s,a,o,l,d,u){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=n,this.pointeeType=s,this.sharingPolicy=a,this.rawGetPointee=o,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=u,n||void 0!==t.baseClass?this.toWireType=Ze:i?(this.toWireType=Xe,this.destructorFunction=null):(this.toWireType=Je,this.destructorFunction=null)}var rt,it,nt=(e,t,r)=>{n.hasOwnProperty(e)||fe("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},st=(e,t,r)=>{var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)},at=[],ot=e=>{var t=at[e];return t||(e>=at.length&&(at.length=e+1),at[e]=t=rt.get(e)),t},lt=(e,t,r)=>e.includes("j")?st(e,t,r):ot(t).apply(null,r),dt=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),lt(e,t,r)}},ut=(e,t)=>{var r=(e=le(e)).includes("j")?dt(e,t):ot(t);return"function"!=typeof r&&ce(`unknown function pointer with signature ${e}: ${t}`),r},ht=(e,t)=>{var r=We(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},ct=e=>{var t=xr(e),r=le(t);return Er(t),r},ft=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||ue[t]||(he[t]?he[t].forEach(e):(r.push(t),i[t]=!0))})),new it(`${e}: `+r.map(ct).join([", "]))},pt=(e,t,r,i,n,s,a,o,l,d,u,h,c)=>{u=le(u),s=ut(n,s),o&&(o=ut(a,o)),d&&(d=ut(l,d)),c=ut(h,c);var f=Ve(u);Ye(f,(function(){ft(`Cannot construct ${u} due to unbound types`,[i])})),pe([e,t,r],i?[i]:[],(function(t){var r,n;t=t[0],n=i?(r=t.registeredClass).instancePrototype:Ne.prototype;var a=We(f,(function(){if(Object.getPrototypeOf(this)!==l)throw new ie("Use 'new' to construct "+u);if(void 0===h.constructor_body)throw new ie(u+" has no accessible constructor");var e=h.constructor_body[arguments.length];if(void 0===e)throw new ie(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(h.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(n,{constructor:{value:a}});a.prototype=l;var h=new qe(u,a,l,c,r,s,o,d);h.baseClass&&(void 0===h.baseClass.__derivedClasses&&(h.baseClass.__derivedClasses=[]),h.baseClass.__derivedClasses.push(h));var p=new tt(u,h,!0,!1,!1),m=new tt(u+"*",h,!1,!1,!1),_=new tt(u+" const*",h,!1,!0,!1);return Ce[e]={pointerType:m,constPointerType:_},nt(f,a),[p,m,_]}))},mt=(e,t)=>{for(var r=[],i=0;i>2]);return r},_t=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function gt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=We(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,n=e.apply(i,t);return n instanceof Object?n:i}function yt(e,t,r,i,n,s){var a=t.length;a<2&&ce("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==t[1]&&null!==r,l=!1,d=1;d0?", ":"")+c),f+=(u||s?"var rv = ":"")+"invoker(fn"+(c.length>0?", ":"")+c+");\n",l)f+="runDestructors(destructors);\n";else for(d=o?1:2;d{var a=mt(t,r);n=ut(i,n),pe([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new ie(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{ft(`Cannot construct ${e.name} due to unbound types`,a)},pe([],a,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=yt(r,i,null,n,s),[]))),[]}))},bt=(e,t,r,i,n,s,a,o,l)=>{var d=mt(r,i);t=le(t),s=ut(n,s),pe([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function n(){ft(`Cannot call ${i} due to unbound types`,d)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),o&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,h=u[t];return void 0===h||void 0===h.overloadTable&&h.className!==e.name&&h.argCount===r-2?(n.argCount=r-2,n.className=e.name,u[t]=n):(je(u,t,i),u[t].overloadTable[r-2]=n),pe([],d,(function(n){var o=yt(i,n,e,s,a,l);return void 0===u[t].overloadTable?(o.argCount=r-2,u[t]=o):u[t].overloadTable[r-2]=o,[]})),[]}))};function wt(){Object.assign(St.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function St(){this.allocated=[void 0],this.freelist=[]}var Et=new St,Ut=e=>{e>=Et.reserved&&0==--Et.get(e).refcount&&Et.free(e)},xt=()=>{for(var e=0,t=Et.reserved;t{Et.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Et.reserved=Et.allocated.length,n.count_emval_handles=xt},Ct={toValue:e=>(e||ce("Cannot use deleted val. handle = "+e),Et.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Et.allocate({refcount:1,value:e})}}};function Tt(e){return this.fromWireType(x[e>>2])}var Bt,kt=(e,t)=>{_e(e,{name:t=le(t),fromWireType:e=>{var t=Ct.toValue(e);return Ut(e),t},toWireType:(e,t)=>Ct.toHandle(t),argPackAdvance:ye,readValueFromPointer:Tt,destructorFunction:null})},Ft=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},Pt=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(C[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},It=(e,t,r)=>{_e(e,{name:t=le(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:ye,readValueFromPointer:Pt(t,r),destructorFunction:null})},Dt=(e,t,r)=>{switch(t){case 1:return r?e=>w[e>>0]:e=>S[e>>0];case 2:return r?e=>E[e>>1]:e=>U[e>>1];case 4:return r?e=>x[e>>2]:e=>A[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Lt=(e,t,r,i,n)=>{t=le(t);var s=e=>e;if(0===i){var a=32-8*r;s=e=>e<>>a}var o=t.includes("unsigned");_e(e,{name:t,fromWireType:s,toWireType:o?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:ye,readValueFromPointer:Dt(t,r,0!==i),destructorFunction:null})},Rt=(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=A[e>>2],r=A[e+4>>2];return new i(w.buffer,r,t)}_e(e,{name:r=le(r),fromWireType:n,argPackAdvance:ye,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},zt=(e,t,r,i)=>{if(!(i>0))return 0;for(var n=r,s=r+i-1,a=0;a=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),o<=127){if(r>=s)break;t[r++]=o}else if(o<=2047){if(r+1>=s)break;t[r++]=192|o>>6,t[r++]=128|63&o}else if(o<=65535){if(r+2>=s)break;t[r++]=224|o>>12,t[r++]=128|o>>6&63,t[r++]=128|63&o}else{if(r+3>=s)break;t[r++]=240|o>>18,t[r++]=128|o>>12&63,t[r++]=128|o>>6&63,t[r++]=128|63&o}}return t[r]=0,r-n},Mt=(e,t,r)=>zt(e,S,t,r),Ot=e=>{for(var t=0,r=0;r=55296&&i<=57343?(t+=4,++r):t+=3}return t},$t="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Nt=(e,t,r)=>{for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&$t)return $t.decode(e.subarray(t,n));for(var s="";t>10,56320|1023&d)}}else s+=String.fromCharCode((31&a)<<6|o)}else s+=String.fromCharCode(a)}return s},Gt=(e,t)=>e?Nt(S,e,t):"",Ht=(e,t)=>{var r="std::string"===(t=le(t));_e(e,{name:t,fromWireType(e){var t,i=A[e>>2],n=e+4;if(r)for(var s=n,a=0;a<=i;++a){var o=n+a;if(a==i||0==S[o]){var l=Gt(s,o-s);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),s=o+1}}else{var d=new Array(i);for(a=0;a>2]=i,r&&n)Mt(t,a,i+1);else if(n)for(var o=0;o255&&(Er(a),ce("String has UTF-16 code units that do not fit in 8 bits")),S[a+o]=l}else for(o=0;o{for(var r=e,i=r>>1,n=i+t/2;!(i>=n)&&U[i];)++i;if((r=i<<1)-e>32&&Vt)return Vt.decode(S.subarray(e,r));for(var s="",a=0;!(a>=t/2);++a){var o=E[e+2*a>>1];if(0==o)break;s+=String.fromCharCode(o)}return s},jt=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=a,t+=2}return E[t>>1]=0,t-i},Yt=e=>2*e.length,qt=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var n=x[e+4*r>>2];if(0==n)break;if(++r,n>=65536){var s=n-65536;i+=String.fromCharCode(55296|s>>10,56320|1023&s)}else i+=String.fromCharCode(n)}return i},Kt=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,s=0;s=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++s)),x[t>>2]=a,(t+=4)+4>n)break}return x[t>>2]=0,t-i},Xt=e=>{for(var t=0,r=0;r=55296&&i<=57343&&++r,t+=4}return t},Zt=(e,t,r)=>{var i,n,s,a,o;r=le(r),2===t?(i=Wt,n=jt,a=Yt,s=()=>U,o=1):4===t&&(i=qt,n=Kt,a=Xt,s=()=>A,o=2),_e(e,{name:r,fromWireType:e=>{for(var r,n=A[e>>2],a=s(),l=e+4,d=0;d<=n;++d){var u=e+4+d*t;if(d==n||0==a[u>>o]){var h=i(l,u-l);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),l=u+t}}return Er(e),r},toWireType:(e,i)=>{"string"!=typeof i&&ce(`Cannot pass non-string to C++ string type ${r}`);var s=a(i),l=Ur(4+s+t);return A[l>>2]=s>>o,n(i,l+4,s+t),null!==e&&e.push(Er,l),l},argPackAdvance:ye,readValueFromPointer:Tt,destructorFunction(e){Er(e)}})},Jt=(e,t)=>{_e(e,{isVoid:!0,name:t=le(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Qt={},er=e=>{var t=Qt[e];return void 0===t?le(e):t},tr=[],rr=(e,t,r,i)=>{(e=tr[e])(t=Ct.toValue(t),r=er(r),null,i)},ir=e=>{var t=tr.length;return tr.push(e),t},nr=(e,t)=>{var r=ue[e];return void 0===r&&ce(t+" has unknown type "+ct(e)),r},sr=(e,t)=>{for(var r=new Array(e),i=0;i>2],"parameter "+i);return r},ar={},or=(e,t)=>{var r=sr(e,t),i=r[0],n=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",s=ar[n];if(void 0!==s)return s;for(var a=["retType"],o=[i],l="",d=0;d{e>4&&(Et.get(e).refcount+=1)},dr=e=>Ct.toHandle(er(e)),ur=()=>Ct.toHandle({}),hr=e=>Ct.toHandle(Gt(e)),cr=(e,t,r)=>{e=Ct.toValue(e),t=Ct.toValue(t),r=Ct.toValue(r),e[t]=r},fr=(e,t)=>{var r=(e=nr(e,"_emval_take_value")).readValueFromPointer(t);return Ct.toHandle(r)},pr=()=>{V("")};Bt=()=>performance.now();var mr=(e,t,r)=>S.copyWithin(e,t,t+r),_r=e=>{V("OOM")},gr=e=>{S.length,_r()},yr=[null,[],[]],vr=(e,t)=>{var r=yr[e];0===t||10===t?((1===e?v:b)(Nt(r,0)),r.length=0):r.push(t)},br=(e,t,r,i)=>{for(var n=0,s=0;s>2],o=A[t+4>>2];t+=8;for(var l=0;l>2]=n,0};oe(),ie=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},ne=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},$e(),Ie(),et(),it=n.UnboundTypeError=ht(Error,"UnboundTypeError"),wt(),At();var wr={n:se,q:ae,w:ve,p:pt,o:vt,g:bt,v:kt,k:It,b:Lt,a:Rt,l:Ht,h:Zt,x:Jt,f:rr,c:Ut,e:or,y:lr,m:dr,A:ur,u:hr,i:cr,z:fr,j:pr,d:Bt,t:mr,r:gr,s:br},Sr=Q(),Er=e=>(Er=Sr.D)(e),Ur=e=>(Ur=Sr.E)(e),xr=e=>(xr=Sr.G)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=Sr.H)();var Ar,Cr=e=>(Cr=Sr.I)(e);function Tr(){function e(){Ar||(Ar=!0,n.calledRun=!0,B||(L(),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),R()))}$>0||(D(),$>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_jiji=(e,t,r,i,s)=>(n.dynCall_jiji=Sr.J)(e,t,r,i,s),n.___start_em_js=143316,n.___stop_em_js=143373,N=function e(){Ar||Tr(),Ar||(N=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return Tr(),t.ready}),r=(()=>{var e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href;return async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,i,n;(n=t).ready=new Promise(((e,t)=>{r=e,i=t})),(n=void 0!==n?n:{}).locateFile=function(e){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:e};var s,a,o,l=Object.assign({},n),d="./this.program",u="object"==typeof window,h="function"==typeof importScripts,c="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";function p(e){return n.locateFile?n.locateFile(e,f):f+e}if(c){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href),_=m("fs"),g=m("path");f=h?g.dirname(f)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href)),s=(e,t)=>(e=J(e)?new URL(e):g.normalize(e),_.readFileSync(e,t?void 0:"utf8")),o=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},a=function(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=J(e)?new URL(e):g.normalize(e),_.readFile(e,i?void 0:"utf8",((e,n)=>{e?r(e):t(i?n.buffer:n)}))},!n.thisProgram&&process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),n.inspect=()=>"[Emscripten Module object]"}else(u||h)&&(h?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h&&(o=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),a=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)});var y,v,b=n.print||console.log.bind(console),w=n.printErr||console.error.bind(console);Object.assign(n,l),l=null,n.arguments&&n.arguments,n.thisProgram&&(d=n.thisProgram),n.quit&&n.quit,n.wasmBinary&&(y=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&j("no native wasm support detected");var S,E,U,x,A,C,T,B,k=!1;function F(e,t){e||j(t)}function P(){var e=v.buffer;n.HEAP8=S=new Int8Array(e),n.HEAP16=U=new Int16Array(e),n.HEAPU8=E=new Uint8Array(e),n.HEAPU16=x=new Uint16Array(e),n.HEAP32=A=new Int32Array(e),n.HEAPU32=C=new Uint32Array(e),n.HEAPF32=T=new Float32Array(e),n.HEAPF64=B=new Float64Array(e)}var I=[],D=[],L=[];function R(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)O(n.preRun.shift());ne(I)}function z(){n.noFSInit||Be.init.initialized||Be.init(),Be.ignorePermissions=!1,ne(D)}function M(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)N(n.postRun.shift());ne(L)}function O(e){I.unshift(e)}function $(e){D.unshift(e)}function N(e){L.unshift(e)}var G=0,H=null;function V(e){G++,n.monitorRunDependencies&&n.monitorRunDependencies(G)}function W(e){if(G--,n.monitorRunDependencies&&n.monitorRunDependencies(G),0==G&&H){var t=H;H=null,t()}}function j(e){n.onAbort&&n.onAbort(e),w(e="Aborted("+e+")"),k=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}var Y,q,K,X="data:application/octet-stream;base64,";function Z(e){return e.startsWith(X)}function J(e){return e.startsWith("file://")}function Q(e){if(e==Y&&y)return new Uint8Array(y);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!y&&(u||h)){if("function"==typeof fetch&&!J(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(a)return new Promise(((t,r)=>{a(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),j(e)}))}function re(e,t,r,i){return e||"function"!=typeof WebAssembly.instantiateStreaming||Z(t)||J(t)||c||"function"!=typeof fetch?te(t,r,i):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(i,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),te(t,r,i)}))))}function ie(){var e={a:ti};function t(e,t){return ri=e.exports,v=ri.D,P(),It=ri.G,$(ri.E),W(),ri}if(V(),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return re(y,Y,e,(function(e){t(e.instance)})).catch(i),{}}n.locateFile?Z(Y="decoder-pro-audio.wasm")||(Y=p(Y)):Y=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href).href;var ne=e=>{for(;e.length>0;)e.shift()(n)};function se(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,S[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=S[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,S[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=S[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(li(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var ae=(e,t,r)=>{throw new se(e).init(t,r),e},oe=e=>(A[ni()>>2]=e,e),le={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=le.isAbs(e),r="/"===e.substr(-1);return(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=le.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=le.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return le.normalize(e.join("/"))},join2:(e,t)=>le.normalize(e+"/"+t)},de=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(c)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}j("initRandomDevice")},ue=e=>(ue=de())(e),he={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:Be.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=le.isAbs(i)}return(t?"/":"")+(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=he.resolve(e).substr(1),t=he.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),s=Math.min(i.length,n.length),a=s,o=0;o{for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&ce)return ce.decode(e.subarray(t,n));for(var s="";t>10,56320|1023&d)}}else s+=String.fromCharCode((31&a)<<6|o)}else s+=String.fromCharCode(a)}return s},pe=[],me=e=>{for(var t=0,r=0;r=55296&&i<=57343?(t+=4,++r):t+=3}return t},_e=(e,t,r,i)=>{if(!(i>0))return 0;for(var n=r,s=r+i-1,a=0;a=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a);if(o<=127){if(r>=s)break;t[r++]=o}else if(o<=2047){if(r+1>=s)break;t[r++]=192|o>>6,t[r++]=128|63&o}else if(o<=65535){if(r+2>=s)break;t[r++]=224|o>>12,t[r++]=128|o>>6&63,t[r++]=128|63&o}else{if(r+3>=s)break;t[r++]=240|o>>18,t[r++]=128|o>>12&63,t[r++]=128|o>>6&63,t[r++]=128|63&o}}return t[r]=0,r-n};function ge(e,t,r){var i=r>0?r:me(e)+1,n=new Array(i),s=_e(e,n,0,n.length);return t&&(n.length=s),n}var ye=()=>{if(!pe.length){var e=null;if(c){var t=Buffer.alloc(256),r=0,i=process.stdin.fd;try{r=_.readSync(i,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ge(e,!0)}return pe.shift()},ve={ttys:[],init(){},shutdown(){},register(e,t){ve.ttys[e]={input:[],output:[],ops:t},Be.registerDevice(e,ve.stream_ops)},stream_ops:{open(e){var t=ve.ttys[e.node.rdev];if(!t)throw new Be.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,i,n){if(!e.tty||!e.tty.ops.get_char)throw new Be.ErrnoError(60);for(var s=0,a=0;aye(),put_char(e,t){null===t||10===t?(b(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(fe(e.output,0)),e.output=[])}}},be=e=>{j()},we={ops_table:null,mount:e=>we.createNode(null,"/",16895,0),createNode(e,t,r,i){if(Be.isBlkdev(r)||Be.isFIFO(r))throw new Be.ErrnoError(63);we.ops_table||(we.ops_table={dir:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,lookup:we.node_ops.lookup,mknod:we.node_ops.mknod,rename:we.node_ops.rename,unlink:we.node_ops.unlink,rmdir:we.node_ops.rmdir,readdir:we.node_ops.readdir,symlink:we.node_ops.symlink},stream:{llseek:we.stream_ops.llseek}},file:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:{llseek:we.stream_ops.llseek,read:we.stream_ops.read,write:we.stream_ops.write,allocate:we.stream_ops.allocate,mmap:we.stream_ops.mmap,msync:we.stream_ops.msync}},link:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,readlink:we.node_ops.readlink},stream:{}},chrdev:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:Be.chrdev_stream_ops}});var n=Be.createNode(e,t,r,i);return Be.isDir(n.mode)?(n.node_ops=we.ops_table.dir.node,n.stream_ops=we.ops_table.dir.stream,n.contents={}):Be.isFile(n.mode)?(n.node_ops=we.ops_table.file.node,n.stream_ops=we.ops_table.file.stream,n.usedBytes=0,n.contents=null):Be.isLink(n.mode)?(n.node_ops=we.ops_table.link.node,n.stream_ops=we.ops_table.link.stream):Be.isChrdev(n.mode)&&(n.node_ops=we.ops_table.chrdev.node,n.stream_ops=we.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n,e.timestamp=n.timestamp),n},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Be.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Be.isDir(e.mode)?t.size=4096:Be.isFile(e.mode)?t.size=e.usedBytes:Be.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&we.resizeFileStorage(e,t.size)},lookup(e,t){throw Be.genericErrors[44]},mknod:(e,t,r,i)=>we.createNode(e,t,r,i),rename(e,t,r){if(Be.isDir(e.mode)){var i;try{i=Be.lookupNode(t,r)}catch(e){}if(i)for(var n in i.contents)throw new Be.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Be.lookupNode(e,t);for(var i in r.contents)throw new Be.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var i=we.createNode(e,t,41471,0);return i.link=r,i},readlink(e){if(!Be.isLink(e.mode))throw new Be.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,i,n){var s=e.node.contents;if(n>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-n,i);if(a>8&&s.subarray)t.set(s.subarray(n,n+a),r);else for(var o=0;o0||r+t(we.stream_ops.write(e,t,0,i,r,!1),0)}},Se=(e,t,r,i)=>{var n=i?"":`al ${e}`;a(e,(r=>{F(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),n&&W()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),n&&V()},Ee=(e,t,r,i,n,s)=>Be.createDataFile(e,t,r,i,n,s),Ue=n.preloadPlugins||[],xe=(e,t,r,i)=>{"undefined"!=typeof Browser&&Browser.init();var n=!1;return Ue.forEach((s=>{n||s.canHandle(t)&&(s.handle(e,t,r,i),n=!0)})),n},Ae=(e,t,r,i,n,s,a,o,l,d)=>{var u=t?he.resolve(le.join2(e,t)):e;function h(r){function h(r){d&&d(),o||Ee(e,t,r,i,n,l),s&&s(),W()}xe(r,u,h,(()=>{a&&a(),W()}))||h(r)}V(),"string"==typeof r?Se(r,(e=>h(e)),a):h(r)},Ce=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Te=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Be={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=he.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new Be.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),i=Be.root,n="/",s=0;s40)throw new Be.ErrnoError(32)}}return{path:n,node:i}},getPath(e){for(var t;;){if(Be.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,i=0;i>>0)%Be.nameTable.length},hashAddNode(e){var t=Be.hashName(e.parent.id,e.name);e.name_next=Be.nameTable[t],Be.nameTable[t]=e},hashRemoveNode(e){var t=Be.hashName(e.parent.id,e.name);if(Be.nameTable[t]===e)Be.nameTable[t]=e.name_next;else for(var r=Be.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Be.mayLookup(e);if(r)throw new Be.ErrnoError(r,e);for(var i=Be.hashName(e.id,t),n=Be.nameTable[i];n;n=n.name_next){var s=n.name;if(n.parent.id===e.id&&s===t)return n}return Be.lookup(e,t)},createNode(e,t,r,i){var n=new Be.FSNode(e,t,r,i);return Be.hashAddNode(n),n},destroyNode(e){Be.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Be.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=Be.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{Be.lookupNode(e,t);return 20}catch(e){}return Be.nodePermissions(e,"wx")},mayDelete(e,t,r){var i;try{i=Be.lookupNode(e,t)}catch(e){return e.errno}var n=Be.nodePermissions(e,"wx");if(n)return n;if(r){if(!Be.isDir(i.mode))return 54;if(Be.isRoot(i)||Be.getPath(i)===Be.cwd())return 10}else if(Be.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?Be.isLink(e.mode)?32:Be.isDir(e.mode)&&("r"!==Be.flagsToPermissionString(t)||512&t)?31:Be.nodePermissions(e,Be.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Be.MAX_OPEN_FDS;e++)if(!Be.streams[e])return e;throw new Be.ErrnoError(33)},getStreamChecked(e){var t=Be.getStream(e);if(!t)throw new Be.ErrnoError(8);return t},getStream:e=>Be.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Be.FSStream||(Be.FSStream=function(){this.shared={}},Be.FSStream.prototype={},Object.defineProperties(Be.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Be.FSStream,e),-1==t&&(t=Be.nextfd()),e.fd=t,Be.streams[t]=e,e},closeStream(e){Be.streams[e]=null},chrdev_stream_ops:{open(e){var t=Be.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Be.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Be.devices[e]={stream_ops:t}},getDevice:e=>Be.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Be.syncFSRequests++,Be.syncFSRequests>1&&w(`warning: ${Be.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Be.getMounts(Be.root.mount),i=0;function n(e){return Be.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,n(e));++i>=r.length&&n(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var i,n="/"===r,s=!r;if(n&&Be.root)throw new Be.ErrnoError(10);if(!n&&!s){var a=Be.lookupPath(r,{follow_mount:!1});if(r=a.path,i=a.node,Be.isMountpoint(i))throw new Be.ErrnoError(10);if(!Be.isDir(i.mode))throw new Be.ErrnoError(54)}var o={type:e,opts:t,mountpoint:r,mounts:[]},l=e.mount(o);return l.mount=o,o.root=l,n?Be.root=l:i&&(i.mounted=o,i.mount&&i.mount.mounts.push(o)),l},unmount(e){var t=Be.lookupPath(e,{follow_mount:!1});if(!Be.isMountpoint(t.node))throw new Be.ErrnoError(28);var r=t.node,i=r.mounted,n=Be.getMounts(i);Object.keys(Be.nameTable).forEach((e=>{for(var t=Be.nameTable[e];t;){var r=t.name_next;n.includes(t.mount)&&Be.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(i);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var i=Be.lookupPath(e,{parent:!0}).node,n=le.basename(e);if(!n||"."===n||".."===n)throw new Be.ErrnoError(28);var s=Be.mayCreate(i,n);if(s)throw new Be.ErrnoError(s);if(!i.node_ops.mknod)throw new Be.ErrnoError(63);return i.node_ops.mknod(i,n,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Be.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Be.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),i="",n=0;n(void 0===r&&(r=t,t=438),t|=8192,Be.mknod(e,t,r)),symlink(e,t){if(!he.resolve(e))throw new Be.ErrnoError(44);var r=Be.lookupPath(t,{parent:!0}).node;if(!r)throw new Be.ErrnoError(44);var i=le.basename(t),n=Be.mayCreate(r,i);if(n)throw new Be.ErrnoError(n);if(!r.node_ops.symlink)throw new Be.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename(e,t){var r,i,n=le.dirname(e),s=le.dirname(t),a=le.basename(e),o=le.basename(t);if(r=Be.lookupPath(e,{parent:!0}).node,i=Be.lookupPath(t,{parent:!0}).node,!r||!i)throw new Be.ErrnoError(44);if(r.mount!==i.mount)throw new Be.ErrnoError(75);var l,d=Be.lookupNode(r,a),u=he.relative(e,s);if("."!==u.charAt(0))throw new Be.ErrnoError(28);if("."!==(u=he.relative(t,n)).charAt(0))throw new Be.ErrnoError(55);try{l=Be.lookupNode(i,o)}catch(e){}if(d!==l){var h=Be.isDir(d.mode),c=Be.mayDelete(r,a,h);if(c)throw new Be.ErrnoError(c);if(c=l?Be.mayDelete(i,o,h):Be.mayCreate(i,o))throw new Be.ErrnoError(c);if(!r.node_ops.rename)throw new Be.ErrnoError(63);if(Be.isMountpoint(d)||l&&Be.isMountpoint(l))throw new Be.ErrnoError(10);if(i!==r&&(c=Be.nodePermissions(r,"w")))throw new Be.ErrnoError(c);Be.hashRemoveNode(d);try{r.node_ops.rename(d,i,o)}catch(e){throw e}finally{Be.hashAddNode(d)}}},rmdir(e){var t=Be.lookupPath(e,{parent:!0}).node,r=le.basename(e),i=Be.lookupNode(t,r),n=Be.mayDelete(t,r,!0);if(n)throw new Be.ErrnoError(n);if(!t.node_ops.rmdir)throw new Be.ErrnoError(63);if(Be.isMountpoint(i))throw new Be.ErrnoError(10);t.node_ops.rmdir(t,r),Be.destroyNode(i)},readdir(e){var t=Be.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Be.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Be.lookupPath(e,{parent:!0}).node;if(!t)throw new Be.ErrnoError(44);var r=le.basename(e),i=Be.lookupNode(t,r),n=Be.mayDelete(t,r,!1);if(n)throw new Be.ErrnoError(n);if(!t.node_ops.unlink)throw new Be.ErrnoError(63);if(Be.isMountpoint(i))throw new Be.ErrnoError(10);t.node_ops.unlink(t,r),Be.destroyNode(i)},readlink(e){var t=Be.lookupPath(e).node;if(!t)throw new Be.ErrnoError(44);if(!t.node_ops.readlink)throw new Be.ErrnoError(28);return he.resolve(Be.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Be.lookupPath(e,{follow:!t}).node;if(!r)throw new Be.ErrnoError(44);if(!r.node_ops.getattr)throw new Be.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Be.stat(e,!0),chmod(e,t,r){var i;"string"==typeof e?i=Be.lookupPath(e,{follow:!r}).node:i=e;if(!i.node_ops.setattr)throw new Be.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod(e,t){Be.chmod(e,t,!0)},fchmod(e,t){var r=Be.getStreamChecked(e);Be.chmod(r.node,t)},chown(e,t,r,i){var n;"string"==typeof e?n=Be.lookupPath(e,{follow:!i}).node:n=e;if(!n.node_ops.setattr)throw new Be.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown(e,t,r){Be.chown(e,t,r,!0)},fchown(e,t,r){var i=Be.getStreamChecked(e);Be.chown(i.node,t,r)},truncate(e,t){if(t<0)throw new Be.ErrnoError(28);var r;"string"==typeof e?r=Be.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new Be.ErrnoError(63);if(Be.isDir(r.mode))throw new Be.ErrnoError(31);if(!Be.isFile(r.mode))throw new Be.ErrnoError(28);var i=Be.nodePermissions(r,"w");if(i)throw new Be.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Be.getStreamChecked(e);if(0==(2097155&r.flags))throw new Be.ErrnoError(28);Be.truncate(r.node,t)},utime(e,t,r){var i=Be.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Be.ErrnoError(44);var i;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Ce(t):t)?4095&r|32768:0,"object"==typeof e)i=e;else{e=le.normalize(e);try{i=Be.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(i){if(128&t)throw new Be.ErrnoError(20)}else i=Be.mknod(e,r,0),s=!0;if(!i)throw new Be.ErrnoError(44);if(Be.isChrdev(i.mode)&&(t&=-513),65536&t&&!Be.isDir(i.mode))throw new Be.ErrnoError(54);if(!s){var a=Be.mayOpen(i,t);if(a)throw new Be.ErrnoError(a)}512&t&&!s&&Be.truncate(i,0),t&=-131713;var o=Be.createStream({node:i,path:Be.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return o.stream_ops.open&&o.stream_ops.open(o),!n.logReadFiles||1&t||(Be.readFiles||(Be.readFiles={}),e in Be.readFiles||(Be.readFiles[e]=1)),o},close(e){if(Be.isClosed(e))throw new Be.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Be.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Be.isClosed(e))throw new Be.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Be.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Be.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,i,n){if(i<0||n<0)throw new Be.ErrnoError(28);if(Be.isClosed(e))throw new Be.ErrnoError(8);if(1==(2097155&e.flags))throw new Be.ErrnoError(8);if(Be.isDir(e.node.mode))throw new Be.ErrnoError(31);if(!e.stream_ops.read)throw new Be.ErrnoError(28);var s=void 0!==n;if(s){if(!e.seekable)throw new Be.ErrnoError(70)}else n=e.position;var a=e.stream_ops.read(e,t,r,i,n);return s||(e.position+=a),a},write(e,t,r,i,n,s){if(i<0||n<0)throw new Be.ErrnoError(28);if(Be.isClosed(e))throw new Be.ErrnoError(8);if(0==(2097155&e.flags))throw new Be.ErrnoError(8);if(Be.isDir(e.node.mode))throw new Be.ErrnoError(31);if(!e.stream_ops.write)throw new Be.ErrnoError(28);e.seekable&&1024&e.flags&&Be.llseek(e,0,2);var a=void 0!==n;if(a){if(!e.seekable)throw new Be.ErrnoError(70)}else n=e.position;var o=e.stream_ops.write(e,t,r,i,n,s);return a||(e.position+=o),o},allocate(e,t,r){if(Be.isClosed(e))throw new Be.ErrnoError(8);if(t<0||r<=0)throw new Be.ErrnoError(28);if(0==(2097155&e.flags))throw new Be.ErrnoError(8);if(!Be.isFile(e.node.mode)&&!Be.isDir(e.node.mode))throw new Be.ErrnoError(43);if(!e.stream_ops.allocate)throw new Be.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,i,n){if(0!=(2&i)&&0==(2&n)&&2!=(2097155&e.flags))throw new Be.ErrnoError(2);if(1==(2097155&e.flags))throw new Be.ErrnoError(2);if(!e.stream_ops.mmap)throw new Be.ErrnoError(43);return e.stream_ops.mmap(e,t,r,i,n)},msync:(e,t,r,i,n)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,n):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Be.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,i=Be.open(e,t.flags),n=Be.stat(e).size,s=new Uint8Array(n);return Be.read(i,s,0,n,0),"utf8"===t.encoding?r=fe(s,0):"binary"===t.encoding&&(r=s),Be.close(i),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var i=Be.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(me(t)+1),s=_e(t,n,0,n.length);Be.write(i,n,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Be.write(i,t,0,t.byteLength,void 0,r.canOwn)}Be.close(i)},cwd:()=>Be.currentPath,chdir(e){var t=Be.lookupPath(e,{follow:!0});if(null===t.node)throw new Be.ErrnoError(44);if(!Be.isDir(t.node.mode))throw new Be.ErrnoError(54);var r=Be.nodePermissions(t.node,"x");if(r)throw new Be.ErrnoError(r);Be.currentPath=t.path},createDefaultDirectories(){Be.mkdir("/tmp"),Be.mkdir("/home"),Be.mkdir("/home/web_user")},createDefaultDevices(){Be.mkdir("/dev"),Be.registerDevice(Be.makedev(1,3),{read:()=>0,write:(e,t,r,i,n)=>i}),Be.mkdev("/dev/null",Be.makedev(1,3)),ve.register(Be.makedev(5,0),ve.default_tty_ops),ve.register(Be.makedev(6,0),ve.default_tty1_ops),Be.mkdev("/dev/tty",Be.makedev(5,0)),Be.mkdev("/dev/tty1",Be.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ue(e).byteLength),e[--t]);Be.createDevice("/dev","random",r),Be.createDevice("/dev","urandom",r),Be.mkdir("/dev/shm"),Be.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Be.mkdir("/proc");var e=Be.mkdir("/proc/self");Be.mkdir("/proc/self/fd"),Be.mount({mount(){var t=Be.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,i=Be.getStreamChecked(r),n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return n.parent=n,n}},t}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?Be.createDevice("/dev","stdin",n.stdin):Be.symlink("/dev/tty","/dev/stdin"),n.stdout?Be.createDevice("/dev","stdout",null,n.stdout):Be.symlink("/dev/tty","/dev/stdout"),n.stderr?Be.createDevice("/dev","stderr",null,n.stderr):Be.symlink("/dev/tty1","/dev/stderr"),Be.open("/dev/stdin",0),Be.open("/dev/stdout",1),Be.open("/dev/stderr",1)},ensureErrnoError(){Be.ErrnoError||(Be.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Be.ErrnoError.prototype=new Error,Be.ErrnoError.prototype.constructor=Be.ErrnoError,[44].forEach((e=>{Be.genericErrors[e]=new Be.ErrnoError(e),Be.genericErrors[e].stack=""})))},staticInit(){Be.ensureErrnoError(),Be.nameTable=new Array(4096),Be.mount(we,{},"/"),Be.createDefaultDirectories(),Be.createDefaultDevices(),Be.createSpecialDirectories(),Be.filesystems={MEMFS:we}},init(e,t,r){Be.init.initialized=!0,Be.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=r||n.stderr,Be.createStandardStreams()},quit(){Be.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;n||(a=i);var o=this;o.setDataGetter((e=>{var t=e*a,n=(e+1)*a-1;if(n=Math.min(n,i-1),void 0===o.chunks[e]&&(o.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",r,!1),i!==a&&n.setRequestHeader("Range","bytes="+e+"-"+t),n.responseType="arraybuffer",n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+r+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):ge(n.responseText||"",!0)})(t,n)),void 0===o.chunks[e])throw new Error("doXHR failed!");return o.chunks[e]})),!s&&i||(a=i=1,i=this.getter(0).length,a=i,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!h)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new s;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var o={isDevice:!1,contents:a}}else o={isDevice:!1,url:r};var l=Be.createFile(e,t,o,i,n);o.contents?l.contents=o.contents:o.url&&(l.contents=null,l.url=o.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var d={};function u(e,t,r,i,n){var s=e.node.contents;if(n>=s.length)return 0;var a=Math.min(s.length-n,i);if(s.slice)for(var o=0;o{var t=l.stream_ops[e];d[e]=function(){return Be.forceLoadFile(l),t.apply(null,arguments)}})),d.read=(e,t,r,i,n)=>(Be.forceLoadFile(l),u(e,t,r,i,n)),d.mmap=(e,t,r,i,n)=>{Be.forceLoadFile(l);var s=be();if(!s)throw new Be.ErrnoError(48);return u(e,S,s,t,r),{ptr:s,allocated:!0}},l.stream_ops=d,l}},ke=(e,t)=>e?fe(E,e,t):"",Fe={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(le.isAbs(t))return t;var i;-100===e?i=Be.cwd():i=Fe.getStreamFromFD(e).path;if(0==t.length){if(!r)throw new Be.ErrnoError(44);return i}return le.join2(i,t)},doStat(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&le.normalize(t)!==le.normalize(Be.getPath(e.node)))return-54;throw e}A[r>>2]=i.dev,A[r+4>>2]=i.mode,C[r+8>>2]=i.nlink,A[r+12>>2]=i.uid,A[r+16>>2]=i.gid,A[r+20>>2]=i.rdev,K=[i.size>>>0,(q=i.size,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+24>>2]=K[0],A[r+28>>2]=K[1],A[r+32>>2]=4096,A[r+36>>2]=i.blocks;var n=i.atime.getTime(),s=i.mtime.getTime(),a=i.ctime.getTime();return K=[Math.floor(n/1e3)>>>0,(q=Math.floor(n/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+40>>2]=K[0],A[r+44>>2]=K[1],C[r+48>>2]=n%1e3*1e3,K=[Math.floor(s/1e3)>>>0,(q=Math.floor(s/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+56>>2]=K[0],A[r+60>>2]=K[1],C[r+64>>2]=s%1e3*1e3,K=[Math.floor(a/1e3)>>>0,(q=Math.floor(a/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+72>>2]=K[0],A[r+76>>2]=K[1],C[r+80>>2]=a%1e3*1e3,K=[i.ino>>>0,(q=i.ino,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+88>>2]=K[0],A[r+92>>2]=K[1],0},doMsync(e,t,r,i,n){if(!Be.isFile(t.node.mode))throw new Be.ErrnoError(43);if(2&i)return 0;var s=E.slice(e,e+r);Be.msync(t,s,n,r,i)},varargs:void 0,get(){var e=A[+Fe.varargs>>2];return Fe.varargs+=4,e},getp:()=>Fe.get(),getStr:e=>ke(e),getStreamFromFD:e=>Be.getStreamChecked(e)};function Pe(e,t,r){Fe.varargs=r;try{var i=Fe.getStreamFromFD(e);switch(t){case 0:if((n=Fe.get())<0)return-28;for(;Be.streams[n];)n++;return Be.createStream(i,n).fd;case 1:case 2:case 6:case 7:return 0;case 3:return i.flags;case 4:var n=Fe.get();return i.flags|=n,0;case 5:n=Fe.getp();return U[n+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return oe(28),-1}}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return-e.errno}}function Ie(e,t,r,i){Fe.varargs=i;try{t=Fe.getStr(t),t=Fe.calculateAt(e,t);var n=i?Fe.get():0;return Be.open(t,r,n).fd}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return-e.errno}}var De,Le,Re,ze=(e,t,r,i,n)=>{},Me=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);De=e},Oe=e=>{for(var t="",r=e;E[r];)t+=De[E[r++]];return t},$e={},Ne={},Ge={},He=e=>{throw new Le(e)},Ve=e=>{throw new Re(e)},We=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Ve("Mismatched type converter count");for(var n=0;n{Ne.hasOwnProperty(e)?n[t]=Ne[e]:(s.push(e),$e.hasOwnProperty(e)||($e[e]=[]),$e[e].push((()=>{n[t]=Ne[e],++a===s.length&&i(n)})))})),0===s.length&&i(n)};function je(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i=t.name;if(e||He(`type "${i}" must have a positive integer typeid pointer`),Ne.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;He(`Cannot register type '${i}' twice`)}if(Ne[e]=t,delete Ge[e],$e.hasOwnProperty(e)){var n=$e[e];delete $e[e],n.forEach((e=>e()))}}function Ye(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return je(e,t,r)}var qe,Ke=8,Xe=(e,t,r,i)=>{Ye(e,{name:t=Oe(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:Ke,readValueFromPointer:function(e){return this.fromWireType(E[e])},destructorFunction:null})},Ze=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Je=e=>{He(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},it=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=it(e,t,r.baseClass);return null===i?null:r.downcast(i)},nt={},st=()=>Object.keys(ht).length,at=()=>{var e=[];for(var t in ht)ht.hasOwnProperty(t)&&e.push(ht[t]);return e},ot=[],lt=()=>{for(;ot.length;){var e=ot.pop();e.$$.deleteScheduled=!1,e.delete()}},dt=e=>{qe=e,ot.length&&qe&&qe(lt)},ut=()=>{n.getInheritedInstanceCount=st,n.getLiveInheritedInstances=at,n.flushPendingDeletes=lt,n.setDelayFunction=dt},ht={},ct=(e,t)=>{for(void 0===t&&He("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=ct(e,t),ht[t]),pt=(e,t)=>(t.ptrType&&t.ptr||Ve("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&Ve("Both smartPtrType and smartPtr must be specified"),t.count={value:1},_t(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function n(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,a=this.registeredClass.getActualType(t),o=nt[a];if(!o)return n.call(this);s=this.isConst?o.constPointerType:o.pointerType;var l=it(t,this.registeredClass,s.registeredClass);return null===l?n.call(this):this.isSmartPointer?pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var _t=e=>"undefined"==typeof FinalizationRegistry?(_t=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),_t=e=>{var t=e.$$;if(!!t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),_t(e)),gt=()=>{Object.assign(yt.prototype,{isAliasOf(e){if(!(this instanceof yt))return!1;if(!(e instanceof yt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)n=i.upcast(n),i=i.baseClass;return t===i&&r===n},clone(){if(this.$$.ptr||Je(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=_t(Object.create(Object.getPrototypeOf(this),{$$:{value:Ze(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),ot.push(this),1===ot.length&&qe&&qe(lt),this.$$.deleteScheduled=!0,this}})};function yt(){}var vt=48,bt=57,wt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=vt&&t<=bt?`_${e}`:e};function St(e,t){return{[e=wt(e)]:function(){return t.apply(this,arguments)}}[e]}var Et=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||He(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}},Ut=(e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&He(`Cannot register public name '${e}' twice`),Et(n,e,e),n.hasOwnProperty(r)&&He(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))};function xt(e,t,r,i,n,s,a,o){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=n,this.getActualType=s,this.upcast=a,this.downcast=o,this.pureVirtualFunctions=[]}var At=(e,t,r)=>{for(;t!==r;)t.upcast||He(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Ct(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${or(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Tt(e,t){var r;if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||He(`Cannot pass "${or(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=At(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&He("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var n=t.clone();r=this.rawShare(r,nr.toHandle((()=>n.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:He("Unsupporting sharing policy")}return r}function Bt(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${or(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function kt(e){return this.fromWireType(C[e>>2])}var Ft=()=>{Object.assign(Pt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Ke,readValueFromPointer:kt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Pt(e,t,r,i,n,s,a,o,l,d,u){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=n,this.pointeeType=s,this.sharingPolicy=a,this.rawGetPointee=o,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=u,n||void 0!==t.baseClass?this.toWireType=Tt:i?(this.toWireType=Ct,this.destructorFunction=null):(this.toWireType=Bt,this.destructorFunction=null)}var It,Dt,Lt=(e,t,r)=>{n.hasOwnProperty(e)||Ve("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},Rt=(e,t,r)=>{var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)},zt=[],Mt=e=>{var t=zt[e];return t||(e>=zt.length&&(zt.length=e+1),zt[e]=t=It.get(e)),t},Ot=(e,t,r)=>e.includes("j")?Rt(e,t,r):Mt(t).apply(null,r),$t=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Ot(e,t,r)}},Nt=(e,t)=>{var r=(e=Oe(e)).includes("j")?$t(e,t):Mt(t);return"function"!=typeof r&&He(`unknown function pointer with signature ${e}: ${t}`),r},Gt=(e,t)=>{var r=St(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Ht=e=>{var t=si(e),r=Oe(t);return ii(t),r},Vt=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||Ne[t]||(Ge[t]?Ge[t].forEach(e):(r.push(t),i[t]=!0))})),new Dt(`${e}: `+r.map(Ht).join([", "]))},Wt=(e,t,r,i,n,s,a,o,l,d,u,h,c)=>{u=Oe(u),s=Nt(n,s),o&&(o=Nt(a,o)),d&&(d=Nt(l,d)),c=Nt(h,c);var f=wt(u);Ut(f,(function(){Vt(`Cannot construct ${u} due to unbound types`,[i])})),We([e,t,r],i?[i]:[],(function(t){var r,n;t=t[0],n=i?(r=t.registeredClass).instancePrototype:yt.prototype;var a=St(f,(function(){if(Object.getPrototypeOf(this)!==l)throw new Le("Use 'new' to construct "+u);if(void 0===h.constructor_body)throw new Le(u+" has no accessible constructor");var e=h.constructor_body[arguments.length];if(void 0===e)throw new Le(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(h.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(n,{constructor:{value:a}});a.prototype=l;var h=new xt(u,a,l,c,r,s,o,d);h.baseClass&&(void 0===h.baseClass.__derivedClasses&&(h.baseClass.__derivedClasses=[]),h.baseClass.__derivedClasses.push(h));var p=new Pt(u,h,!0,!1,!1),m=new Pt(u+"*",h,!1,!1,!1),_=new Pt(u+" const*",h,!1,!0,!1);return nt[e]={pointerType:m,constPointerType:_},Lt(f,a),[p,m,_]}))},jt=(e,t)=>{for(var r=[],i=0;i>2]);return r},Yt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function qt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=St(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,n=e.apply(i,t);return n instanceof Object?n:i}function Kt(e,t,r,i,n,s){var a=t.length;a<2&&He("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==t[1]&&null!==r,l=!1,d=1;d0?", ":"")+c),f+=(u||s?"var rv = ":"")+"invoker(fn"+(c.length>0?", ":"")+c+");\n",l)f+="runDestructors(destructors);\n";else for(d=o?1:2;d{var a=jt(t,r);n=Nt(i,n),We([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Le(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Vt(`Cannot construct ${e.name} due to unbound types`,a)},We([],a,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Kt(r,i,null,n,s),[]))),[]}))},Zt=(e,t,r,i,n,s,a,o,l)=>{var d=jt(r,i);t=Oe(t),s=Nt(n,s),We([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function n(){Vt(`Cannot call ${i} due to unbound types`,d)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),o&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,h=u[t];return void 0===h||void 0===h.overloadTable&&h.className!==e.name&&h.argCount===r-2?(n.argCount=r-2,n.className=e.name,u[t]=n):(Et(u,t,i),u[t].overloadTable[r-2]=n),We([],d,(function(n){var o=Kt(i,n,e,s,a,l);return void 0===u[t].overloadTable?(o.argCount=r-2,u[t]=o):u[t].overloadTable[r-2]=o,[]})),[]}))};function Jt(){Object.assign(Qt.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Qt(){this.allocated=[void 0],this.freelist=[]}var er=new Qt,tr=e=>{e>=er.reserved&&0==--er.get(e).refcount&&er.free(e)},rr=()=>{for(var e=0,t=er.reserved;t{er.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),er.reserved=er.allocated.length,n.count_emval_handles=rr},nr={toValue:e=>(e||He("Cannot use deleted val. handle = "+e),er.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return er.allocate({refcount:1,value:e})}}};function sr(e){return this.fromWireType(A[e>>2])}var ar=(e,t)=>{Ye(e,{name:t=Oe(t),fromWireType:e=>{var t=nr.toValue(e);return tr(e),t},toWireType:(e,t)=>nr.toHandle(t),argPackAdvance:Ke,readValueFromPointer:sr,destructorFunction:null})},or=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},lr=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(T[e>>2])};case 8:return function(e){return this.fromWireType(B[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},dr=(e,t,r)=>{Ye(e,{name:t=Oe(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Ke,readValueFromPointer:lr(t,r),destructorFunction:null})},ur=(e,t,r)=>{switch(t){case 1:return r?e=>S[e>>0]:e=>E[e>>0];case 2:return r?e=>U[e>>1]:e=>x[e>>1];case 4:return r?e=>A[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},hr=(e,t,r,i,n)=>{t=Oe(t);var s=e=>e;if(0===i){var a=32-8*r;s=e=>e<>>a}var o=t.includes("unsigned");Ye(e,{name:t,fromWireType:s,toWireType:o?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Ke,readValueFromPointer:ur(t,r,0!==i),destructorFunction:null})},cr=(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=C[e>>2],r=C[e+4>>2];return new i(S.buffer,r,t)}Ye(e,{name:r=Oe(r),fromWireType:n,argPackAdvance:Ke,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},fr=(e,t,r)=>_e(e,E,t,r),pr=(e,t)=>{var r="std::string"===(t=Oe(t));Ye(e,{name:t,fromWireType(e){var t,i=C[e>>2],n=e+4;if(r)for(var s=n,a=0;a<=i;++a){var o=n+a;if(a==i||0==E[o]){var l=ke(s,o-s);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),s=o+1}}else{var d=new Array(i);for(a=0;a>2]=i,r&&n)fr(t,a,i+1);else if(n)for(var o=0;o255&&(ii(a),He("String has UTF-16 code units that do not fit in 8 bits")),E[a+o]=l}else for(o=0;o{for(var r=e,i=r>>1,n=i+t/2;!(i>=n)&&x[i];)++i;if((r=i<<1)-e>32&&mr)return mr.decode(E.subarray(e,r));for(var s="",a=0;!(a>=t/2);++a){var o=U[e+2*a>>1];if(0==o)break;s+=String.fromCharCode(o)}return s},gr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=a,t+=2}return U[t>>1]=0,t-i},yr=e=>2*e.length,vr=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var n=A[e+4*r>>2];if(0==n)break;if(++r,n>=65536){var s=n-65536;i+=String.fromCharCode(55296|s>>10,56320|1023&s)}else i+=String.fromCharCode(n)}return i},br=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,s=0;s=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++s);if(A[t>>2]=a,(t+=4)+4>n)break}return A[t>>2]=0,t-i},wr=e=>{for(var t=0,r=0;r=55296&&i<=57343&&++r,t+=4}return t},Sr=(e,t,r)=>{var i,n,s,a,o;r=Oe(r),2===t?(i=_r,n=gr,a=yr,s=()=>x,o=1):4===t&&(i=vr,n=br,a=wr,s=()=>C,o=2),Ye(e,{name:r,fromWireType:e=>{for(var r,n=C[e>>2],a=s(),l=e+4,d=0;d<=n;++d){var u=e+4+d*t;if(d==n||0==a[u>>o]){var h=i(l,u-l);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),l=u+t}}return ii(e),r},toWireType:(e,i)=>{"string"!=typeof i&&He(`Cannot pass non-string to C++ string type ${r}`);var s=a(i),l=oi(4+s+t);return C[l>>2]=s>>o,n(i,l+4,s+t),null!==e&&e.push(ii,l),l},argPackAdvance:Ke,readValueFromPointer:sr,destructorFunction(e){ii(e)}})},Er=(e,t)=>{Ye(e,{isVoid:!0,name:t=Oe(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Ur={},xr=e=>{var t=Ur[e];return void 0===t?Oe(e):t},Ar=[],Cr=(e,t,r,i)=>{(e=Ar[e])(t=nr.toValue(t),r=xr(r),null,i)},Tr=e=>{var t=Ar.length;return Ar.push(e),t},Br=(e,t)=>{var r=Ne[e];return void 0===r&&He(t+" has unknown type "+Ht(e)),r},kr=(e,t)=>{for(var r=new Array(e),i=0;i>2],"parameter "+i);return r},Fr={},Pr=(e,t)=>{var r=kr(e,t),i=r[0],n=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",s=Fr[n];if(void 0!==s)return s;for(var a=["retType"],o=[i],l="",d=0;dt+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Dr=()=>{j("")},Lr=()=>Date.now(),Rr=(e,t,r)=>E.copyWithin(e,t,t+r),zr=e=>{j("OOM")},Mr=e=>{E.length,zr()},Or={},$r=()=>d||"./this.program",Nr=()=>{if(!Nr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:$r()};for(var t in Or)void 0===Or[t]?delete e[t]:e[t]=Or[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Nr.strings=r}return Nr.strings},Gr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);S[t>>0]=0},Hr=(e,t)=>{var r=0;return Nr().forEach(((i,n)=>{var s=t+r;C[e+4*n>>2]=s,Gr(i,s),r+=i.length+1})),0},Vr=(e,t)=>{var r=Nr();C[e>>2]=r.length;var i=0;return r.forEach((e=>i+=e.length+1)),C[t>>2]=i,0};function Wr(e){try{var t=Fe.getStreamFromFD(e);return Be.close(t),0}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return e.errno}}function jr(e,t){try{var r=Fe.getStreamFromFD(e),i=r.tty?2:Be.isDir(r.mode)?3:Be.isLink(r.mode)?7:4;return S[t>>0]=i,U[t+2>>1]=0,K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[t+8>>2]=K[0],A[t+12>>2]=K[1],K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[t+16>>2]=K[0],A[t+20>>2]=K[1],0}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return e.errno}}var Yr=(e,t,r,i)=>{for(var n=0,s=0;s>2],o=C[t+4>>2];t+=8;var l=Be.read(e,S,a,o,i);if(l<0)return-1;if(n+=l,l>2]=s,0}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return e.errno}}function Kr(e,t,r,i,n){var s=Ir(t,r);try{if(isNaN(s))return 61;var a=Fe.getStreamFromFD(e);return Be.llseek(a,s,i),K=[a.position>>>0,(q=a.position,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[n>>2]=K[0],A[n+4>>2]=K[1],a.getdents&&0===s&&0===i&&(a.getdents=null),0}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return e.errno}}var Xr=(e,t,r,i)=>{for(var n=0,s=0;s>2],o=C[t+4>>2];t+=8;var l=Be.write(e,S,a,o,i);if(l<0)return-1;n+=l,void 0!==i&&(i+=l)}return n};function Zr(e,t,r,i){try{var n=Fe.getStreamFromFD(e),s=Xr(n,t,r);return C[i>>2]=s,0}catch(e){if(void 0===Be||"ErrnoError"!==e.name)throw e;return e.errno}}var Jr=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Be.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Qr=365,ei=146;Object.defineProperties(Jr.prototype,{read:{get:function(){return(this.mode&Qr)===Qr},set:function(e){e?this.mode|=Qr:this.mode&=~Qr}},write:{get:function(){return(this.mode&ei)===ei},set:function(e){e?this.mode|=ei:this.mode&=~ei}},isFolder:{get:function(){return Be.isDir(this.mode)}},isDevice:{get:function(){return Be.isChrdev(this.mode)}}}),Be.FSNode=Jr,Be.createPreloadedFile=Ae,Be.staticInit(),Me(),Le=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Re=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},gt(),ut(),Ft(),Dt=n.UnboundTypeError=Gt(Error,"UnboundTypeError"),Jt(),ir();var ti={p:ae,B:Pe,v:Ie,t:ze,n:Xe,r:Wt,q:Xt,f:Zt,C:ar,m:dr,c:hr,b:cr,l:pr,h:Sr,o:Er,d:Cr,i:tr,e:Pr,a:Dr,g:Lr,z:Rr,u:Mr,x:Hr,y:Vr,k:Wr,w:jr,A:qr,s:Kr,j:Zr},ri=ie(),ii=e=>(ii=ri.F)(e),ni=()=>(ni=ri.H)(),si=e=>(si=ri.I)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=ri.J)();var ai,oi=e=>(oi=ri.K)(e),li=e=>(li=ri.M)(e);function di(){function e(){ai||(ai=!0,n.calledRun=!0,k||(z(),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),M()))}G>0||(R(),G>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_viiijj=(e,t,r,i,s,a,o,l)=>(n.dynCall_viiijj=ri.N)(e,t,r,i,s,a,o,l),n.dynCall_jij=(e,t,r,i)=>(n.dynCall_jij=ri.O)(e,t,r,i),n.dynCall_jii=(e,t,r)=>(n.dynCall_jii=ri.P)(e,t,r),n.dynCall_jiji=(e,t,r,i,s)=>(n.dynCall_jiji=ri.Q)(e,t,r,i,s),H=function e(){ai||di(),ai||(H=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return di(),t.ready}})(),n=1e-6,s="undefined"!=typeof Float32Array?Float32Array:Array;function a(){var e=new s(16);return s!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var l,d=function(e,t,r,i,n,s,a){var o=1/(t-r),l=1/(i-n),d=1/(s-a);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*d,e[11]=0,e[12]=(t+r)*o,e[13]=(n+i)*l,e[14]=(a+s)*d,e[15]=1,e};function u(e,t,r){var i=new s(3);return i[0]=e,i[1]=t,i[2]=r,i}l=new s(3),s!=Float32Array&&(l[0]=0,l[1]=0,l[2]=0);var h=(e,t)=>{t&&e.pixelStorei(e.UNPACK_ALIGNMENT,1);const r=function(){const t=m(e.VERTEX_SHADER,"\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n "),r=m(e.FRAGMENT_SHADER,"\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),i=e.createProgram();if(e.attachShader(i,t),e.attachShader(i,r),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))return console.log("Unable to initialize the shader program: "+e.getProgramInfoLog(i)),null;return i}();let i={program:r,attribLocations:{vertexPosition:e.getAttribLocation(r,"aVertexPosition"),texturePosition:e.getAttribLocation(r,"aTexturePosition")},uniformLocations:{projectionMatrix:e.getUniformLocation(r,"uProjectionMatrix"),modelMatrix:e.getUniformLocation(r,"uModelMatrix"),viewMatrix:e.getUniformLocation(r,"uViewMatrix"),rgbatexture:e.getUniformLocation(r,"rgbaTexture"),ytexture:e.getUniformLocation(r,"yTexture"),utexture:e.getUniformLocation(r,"uTexture"),vtexture:e.getUniformLocation(r,"vTexture"),isyuv:e.getUniformLocation(r,"isyuv")}},s=function(){const t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e.STATIC_DRAW);var r=[];r=r.concat([0,1],[1,1],[1,0],[0,0]);const i=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,new Float32Array(r),e.STATIC_DRAW);const n=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{position:t,texPosition:i,indices:n}}(),l=p(),h=p(),c=p(),f=p();function p(){let t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function m(t,r){const i=e.createShader(t);return e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)?i:(console.log("An error occurred compiling the shaders: "+e.getShaderInfoLog(i)),e.deleteShader(i),null)}function _(t,r){e.viewport(0,0,t,r),e.clearColor(0,0,0,0),e.clearDepth(1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT);const l=a();d(l,-1,1,-1,1,.1,100);const p=a();o(p);const m=a();!function(e,t,r,i){var s,a,l,d,u,h,c,f,p,m,_=t[0],g=t[1],y=t[2],v=i[0],b=i[1],w=i[2],S=r[0],E=r[1],U=r[2];Math.abs(_-S)>1,(1&r)<<7|i<<3])}function lt(e){return dt(e)&&e[1]===Ke}function dt(e){return e[0]>>4===Be}at((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},r=e.exports,i=function(){for(var e,r=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,n=r.length,s={};i{if(n=i,"[object Number]"!==Object.prototype.toString.call(n))return;var n;t+=i;const s=ft(),a=s-r;a>=1e3&&(e(t/a*1e3),r=s,t=0)}}(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();function mt(e){let t=e.subarray(1,4),r="avc1.";for(let e=0;e<3;e++){let i=t[e].toString(16);i.length<2&&(i="0"+i),r+=i}return{codec:r,description:e}}function _t(e){return null==e}function gt(e){return!_t(e)}function yt(e){return"function"==typeof e}function vt(e){let t=null,r=31&e[0];return r!==Ie&&r!==De||(t=Ce),t||(r=(126&e[0])>>1,r!==Oe&&r!==$e&&r!==Ne||(t=Te)),t}function bt(){return"undefined"!=typeof WritableStream}function wt(e){e.close()}function St(e,t){t&&(e=e.filter((e=>e.type&&e.type===t)));let r=e[0],i=null,n=1;if(e.length>0){let t=e[1];t&&t.ts-r.ts>1e5&&(r=t,n=2)}if(r)for(let s=n;s=1e3){e[s-1].ts-r.ts<1e3&&(i=s+1)}}}return i}function Et(e){return e.ok&&e.status>=200&&e.status<=299}function Ut(){return function(e){let t="";if("object"==typeof e)try{t=JSON.stringify(e),t=JSON.parse(t)}catch(r){t=e}else t=e;return t}(E)}function xt(e){return e[0]>>4===Xe&&e[1]===Ke}function At(e){return!0===e||"true"===e}function Ct(e){return!0!==e&&"true"!==e}var Tt=function(e,t,r,i){return new(r||(r=Promise))((function(n,s){function a(e){try{l(i.next(e))}catch(e){s(e)}}function o(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,o)}l((i=i.apply(e,t||[])).next())}))};const Bt=Symbol(32),kt=Symbol(16),Ft=Symbol(8);class Pt{constructor(e){this.g=e,this.consumed=0,e&&(this.need=e.next().value)}setG(e){this.g=e,this.demand(e.next().value,!0)}consume(){this.buffer&&this.consumed&&(this.buffer.copyWithin(0,this.consumed),this.buffer=this.buffer.subarray(0,this.buffer.length-this.consumed),this.consumed=0)}demand(e,t){return t&&this.consume(),this.need=e,this.flush()}read(e){return Tt(this,void 0,void 0,(function*(){return this.lastReadPromise&&(yield this.lastReadPromise),this.lastReadPromise=new Promise(((t,r)=>{var i;this.reject=r,this.resolve=e=>{delete this.lastReadPromise,delete this.resolve,delete this.need,t(e)};this.demand(e,!0)||null===(i=this.pull)||void 0===i||i.call(this,e)}))}))}readU32(){return this.read(Bt)}readU16(){return this.read(kt)}readU8(){return this.read(Ft)}close(){var e;this.g&&this.g.return(),this.buffer&&this.buffer.subarray(0,0),null===(e=this.reject)||void 0===e||e.call(this,new Error("EOF")),delete this.lastReadPromise}flush(){if(!this.buffer||!this.need)return;let e=null;const t=this.buffer.subarray(this.consumed);let r=0;const i=e=>t.length<(r=e);if("number"==typeof this.need){if(i(this.need))return;e=t.subarray(0,r)}else if(this.need===Bt){if(i(4))return;e=t[0]<<24|t[1]<<16|t[2]<<8|t[3]}else if(this.need===kt){if(i(2))return;e=t[0]<<8|t[1]}else if(this.need===Ft){if(i(1))return;e=t[0]}else if("buffer"in this.need){if("byteOffset"in this.need){if(i(this.need.byteLength-this.need.byteOffset))return;new Uint8Array(this.need.buffer,this.need.byteOffset).set(t.subarray(0,r)),e=this.need}else if(this.g)return void this.g.throw(new Error("Unsupported type"))}else{if(i(this.need.byteLength))return;new Uint8Array(this.need).set(t.subarray(0,r)),e=this.need}return this.consumed+=r,this.g?this.demand(this.g.next(e).value,!0):this.resolve&&this.resolve(e),e}write(e){if(e instanceof Uint8Array?this.malloc(e.length).set(e):"buffer"in e?this.malloc(e.byteLength).set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):this.malloc(e.byteLength).set(new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this.pull=e));this.flush()}writeU32(e){this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){this.malloc(2).set([e>>8&255,255&e]),this.flush()}writeU8(e){this.malloc(1)[0]=e,this.flush()}malloc(e){if(this.buffer){const t=this.buffer.length,r=t+e;if(r<=this.buffer.buffer.byteLength-this.buffer.byteOffset)this.buffer=new Uint8Array(this.buffer.buffer,this.buffer.byteOffset,r);else{const e=new Uint8Array(r);e.set(this.buffer),this.buffer=e}return this.buffer.subarray(t,r)}return this.buffer=new Uint8Array(e),this.buffer}}Pt.U32=Bt,Pt.U16=kt,Pt.U8=Ft;class It{constructor(e){this.log=function(t){if(e._opt.debug&&e._opt.debugLevel==v){const s=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n1?r-1:0),n=1;n1?i-1:0),s=1;s32&&console.error("ExpGolomb: readBits() bits exceeded max 32bits!"),e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let r=e-this._current_word_bits_left;this._fillCurrentWord();let i=Math.min(r,this._current_word_bits_left),n=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,t=t<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}class Lt{static _ebsp2rbsp(e){let t=e,r=t.byteLength,i=new Uint8Array(r),n=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(i[n]=t[e],n++);return new Uint8Array(i.buffer,0,n)}static parseSPS(e){let t=Lt._ebsp2rbsp(e),r=new Dt(t);r.readByte();let i=r.readByte();r.readByte();let n=r.readByte();r.readUEG();let s=Lt.getProfileString(i),a=Lt.getLevelString(n),o=1,l=420,d=[0,420,422,444],u=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(o=r.readUEG(),3===o&&r.readBits(1),o<=3&&(l=d[o]),u=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool())){let e=3!==o?8:12;for(let t=0;t0&&e<16?(b=t[e-1],w=i[e-1]):255===e&&(b=r.readByte()<<8|r.readByte(),w=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){let e=r.readBits(32),t=r.readBits(32);E=r.readBool(),U=t,x=2*e,S=U/x}}let A=1;1===b&&1===w||(A=b/w);let C=0,T=0;if(0===o)C=1,T=2-m;else{C=3===o?1:2,T=(1===o?2:1)*(2-m)}let B=16*(f+1),k=16*(p+1)*(2-m);B-=(_+g)*C,k-=(y+v)*T;let F=Math.ceil(B*A);return r.destroy(),r=null,{profile_string:s,level_string:a,bit_depth:u,ref_frames:c,chroma_format:l,chroma_format_string:Lt.getChromaFormatString(l),frame_rate:{fixed:E,fps:S,fps_den:x,fps_num:U},sar_ratio:{width:b,height:w},codec_size:{width:B,height:k},present_size:{width:F,height:k}}}static parseSPS$2(e){let t=e.subarray(1,4),r="avc1.";for(let e=0;e<3;e++){let i=t[e].toString(16);i.length<2&&(i="0"+i),r+=i}let i=Lt._ebsp2rbsp(e),n=new Dt(i);n.readByte();let s=n.readByte();n.readByte();let a=n.readByte();n.readUEG();let o=Lt.getProfileString(s),l=Lt.getLevelString(a),d=1,u=420,h=[0,420,422,444],c=8,f=8;if((100===s||110===s||122===s||244===s||44===s||83===s||86===s||118===s||128===s||138===s||144===s)&&(d=n.readUEG(),3===d&&n.readBits(1),d<=3&&(u=h[d]),c=n.readUEG()+8,f=n.readUEG()+8,n.readBits(1),n.readBool())){let e=3!==d?8:12;for(let t=0;t0&&e<16?(E=t[e-1],U=r[e-1]):255===e&&(E=n.readByte()<<8|n.readByte(),U=n.readByte()<<8|n.readByte())}if(n.readBool()&&n.readBool(),n.readBool()&&(n.readBits(4),n.readBool()&&n.readBits(24)),n.readBool()&&(n.readUEG(),n.readUEG()),n.readBool()){let e=n.readBits(32),t=n.readBits(32);A=n.readBool(),C=t,T=2*e,x=C/T}}let B=1;1===E&&1===U||(B=E/U);let k=0,F=0;if(0===d)k=1,F=2-y;else{k=3===d?1:2,F=(1===d?2:1)*(2-y)}let P=16*(_+1),I=16*(g+1)*(2-y);P-=(v+b)*k,I-=(w+S)*F;let D=Math.ceil(P*B);return n.destroy(),n=null,{codec_mimetype:r,profile_idc:s,level_idc:a,profile_string:o,level_string:l,chroma_format_idc:d,bit_depth:c,bit_depth_luma:c,bit_depth_chroma:f,ref_frames:m,chroma_format:u,chroma_format_string:Lt.getChromaFormatString(u),frame_rate:{fixed:A,fps:x,fps_den:T,fps_num:C},sar_ratio:{width:E,height:U},codec_size:{width:P,height:I},present_size:{width:D,height:I}}}static _skipScalingList(e,t){let r=8,i=8,n=0;for(let s=0;s=this.buflen)return this.iserro=!0,0;this.iserro=!1,r=this.bufoff+e>8?8-this.bufoff:e,t<<=r,t+=this.buffer[this.bufpos]>>8-this.bufoff-r&255>>8-r,this.bufoff+=r,e-=r,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,r=this.bufoff,i=this.read(e);return this.bufpos=t,this.bufoff=r,i}read_golomb(){let e;for(e=0;0===this.read(1)&&!this.iserro;e++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(r,0),i.set(t.sps,4),t.sps=i}if(t.pps){const e=t.pps.byteLength,r=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(r,0),i.set(t.pps,4),t.pps=i}return t}function Mt(e){let{sps:t,pps:r}=e;const i=[23,0,0,0,0,1,66,0,30,255];i[0]=23,i[6]=t[1],i[7]=t[2],i[8]=t[3],i[10]=225,i[11]=t.byteLength>>8&255,i[12]=255&t.byteLength,i.push(...t,1,r.byteLength>>8&255,255&r.byteLength,...r);return new Uint8Array(i)}function Ot(e,t){let r=[];r[0]=t?23:39,r[1]=1,r[2]=0,r[3]=0,r[4]=0,r[5]=e.byteLength>>24&255,r[6]=e.byteLength>>16&255,r[7]=e.byteLength>>8&255,r[8]=255&e.byteLength;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function $t(e,t){let r=[];r[0]=t?23:39,r[1]=1,r[2]=0,r[3]=0,r[4]=0;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function Nt(e){return 31&e[0]}function Gt(e){return e===Re}function Ht(e){return!function(e){return e===Ie||e===De}(e)&&!Gt(e)}function Vt(e){return e===Le}function Wt(e){if(0===e.length)return!1;const t=Nt(e[0]);for(let r=1;r{let t=e,r=t.byteLength,i=new Uint8Array(r),n=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(i[n]=t[e],n++);return new Uint8Array(i.buffer,0,n)},Yt=e=>{switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}};function qt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function Kt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e.length<4)return;const r=e.length,i=[];let n,s=0;for(;s+t>>=8),s+=t,n){if(s+n>r)break;i.push(e.subarray(s,s+n)),s+=n}return i}function Xt(e){const t=e.byteLength,r=new Uint8Array(4);r[0]=t>>>24&255,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t;const i=new Uint8Array(t+4);return i.set(r,0),i.set(e,4),i}function Zt(e,t){let r=null;return t?e.length>=28&&(r=1+(3&e[26])):e.length>=12&&(r=1+(3&e[9])),r}function Jt(e){let t={width:0,height:0,profile:0,level:0};e=e.slice(5);do{let r={};if(e.length<23){console.warn("parseHEVCDecoderConfigurationRecord$2",`arrayBuffer.length ${e.length} < 23`);break}if(r.configurationVersion=e[0],1!=r.configurationVersion)break;r.general_profile_space=e[1]>>6&3,r.general_tier_flag=e[1]>>5&1,r.general_profile_idc=31&e[1],r.general_profile_compatibility_flags=e[2]<<24|e[3]<<16|e[4]<<8|e[5],r.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],r.general_constraint_indicator_flags=r.general_constraint_indicator_flags<<16|e[10]<<8|e[11],r.general_level_idc=e[12],r.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],r.parallelismType=3&e[15],r.chromaFormat=3&e[16],r.bitDepthLumaMinus8=7&e[17],r.bitDepthChromaMinus8=7&e[18],r.avgFrameRate=e[19]<<8|e[20],r.constantFrameRate=e[21]>>6&3,r.numTemporalLayers=e[21]>>3&7,r.temporalIdNested=e[21]>>2&1,r.lengthSizeMinusOne=3&e[21];let i=e[22],n=e.slice(23);for(let e=0;e0)for(let t=r;t<8;t++)e.read(2);i.sub_layer_profile_space=[],i.sub_layer_tier_flag=[],i.sub_layer_profile_idc=[],i.sub_layer_profile_compatibility_flag=[],i.sub_layer_progressive_source_flag=[],i.sub_layer_interlaced_source_flag=[],i.sub_layer_non_packed_constraint_flag=[],i.sub_layer_frame_only_constraint_flag=[],i.sub_layer_level_idc=[];for(let t=0;t{let t=jt(e),r=new Dt(t);return r.readByte(),r.readByte(),r.readBits(4),r.readBits(2),r.readBits(6),{num_temporal_layers:r.readBits(3)+1,temporal_id_nested:r.readBool()}})(t),a=(e=>{let t=jt(e),r=new Dt(t);r.readByte(),r.readByte();let i=0,n=0,s=0,a=0;r.readBits(4);let o=r.readBits(3);r.readBool();let l=r.readBits(2),d=r.readBool(),u=r.readBits(5),h=r.readByte(),c=r.readByte(),f=r.readByte(),p=r.readByte(),m=r.readByte(),_=r.readByte(),g=r.readByte(),y=r.readByte(),v=r.readByte(),b=r.readByte(),w=r.readByte(),S=[],E=[];for(let e=0;e0)for(let e=o;e<8;e++)r.readBits(2);for(let e=0;e1&&r.readSEG();for(let e=0;e0&&e<16?(D=t[e-1],L=i[e-1]):255===e&&(D=r.readBits(16),L=r.readBits(16))}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(3),r.readBool(),r.readBool()&&(r.readByte(),r.readByte(),r.readByte())),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool(),r.readBool(),r.readBool(),P=r.readBool(),P&&(i+=r.readUEG(),n+=r.readUEG(),s+=r.readUEG(),a+=r.readUEG()),r.readBool()&&(z=r.readBits(32),M=r.readBits(32),r.readBool()&&(r.readUEG(),r.readBool()))){let e=!1,t=!1,i=!1;e=r.readBool(),t=r.readBool(),(e||t)&&(i=r.readBool(),i&&(r.readByte(),r.readBits(5),r.readBool(),r.readBits(5)),r.readBits(4),r.readBits(4),i&&r.readBits(4),r.readBits(5),r.readBits(5),r.readBits(5));for(let n=0;n<=o;n++){let n=r.readBool();R=n;let s=!1,a=1;n||(s=r.readBool());let o=!1;if(s?r.readSEG():o=r.readBool(),o||(cpbcnt=r.readUEG()+1),e)for(let e=0;e{let t=jt(e),r=new Dt(t);r.readByte(),r.readByte(),r.readUEG(),r.readUEG(),r.readBool(),r.readBool(),r.readBits(3),r.readBool(),r.readBool(),r.readUEG(),r.readUEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool()&&r.readUEG(),r.readSEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool(),r.readBool();let i=r.readBool(),n=r.readBool(),s=1;return n&&i?s=0:n?s=3:i&&(s=2),{parallelismType:s}})(r);n=Object.assign(n,s,a,o);let l=23+(5+t.byteLength)+(5+i.byteLength)+(5+r.byteLength),d=new Uint8Array(l);d[0]=1,d[1]=(3&n.general_profile_space)<<6|(n.general_tier_flag?1:0)<<5|31&n.general_profile_idc,d[2]=n.general_profile_compatibility_flags_1||0,d[3]=n.general_profile_compatibility_flags_2||0,d[4]=n.general_profile_compatibility_flags_3||0,d[5]=n.general_profile_compatibility_flags_4||0,d[6]=n.general_constraint_indicator_flags_1||0,d[7]=n.general_constraint_indicator_flags_2||0,d[8]=n.general_constraint_indicator_flags_3||0,d[9]=n.general_constraint_indicator_flags_4||0,d[10]=n.general_constraint_indicator_flags_5||0,d[11]=n.general_constraint_indicator_flags_6||0,d[12]=60,d[13]=240|(3840&n.min_spatial_segmentation_idc)>>8,d[14]=255&n.min_spatial_segmentation_idc,d[15]=252|3&n.parallelismType,d[16]=252|3&n.chroma_format_idc,d[17]=248|7&n.bit_depth_luma_minus8,d[18]=248|7&n.bit_depth_chroma_minus8,d[19]=0,d[20]=0,d[21]=(3&n.constant_frame_rate)<<6|(7&n.num_temporal_layers)<<3|(n.temporal_id_nested?1:0)<<2|3,d[22]=3,d[23]=128|Oe,d[24]=0,d[25]=1,d[26]=(65280&t.byteLength)>>8,d[27]=(255&t.byteLength)>>0,d.set(t,28),d[23+(5+t.byteLength)+0]=128|$e,d[23+(5+t.byteLength)+1]=0,d[23+(5+t.byteLength)+2]=1,d[23+(5+t.byteLength)+3]=(65280&i.byteLength)>>8,d[23+(5+t.byteLength)+4]=(255&i.byteLength)>>0,d.set(i,23+(5+t.byteLength)+5),d[23+(5+t.byteLength+5+i.byteLength)+0]=128|Ne,d[23+(5+t.byteLength+5+i.byteLength)+1]=0,d[23+(5+t.byteLength+5+i.byteLength)+2]=1,d[23+(5+t.byteLength+5+i.byteLength)+3]=(65280&r.byteLength)>>8,d[23+(5+t.byteLength+5+i.byteLength)+4]=(255&r.byteLength)>>0,d.set(r,23+(5+t.byteLength+5+i.byteLength)+5);const u=[28,0,0,0,0],h=new Uint8Array(u.length+d.byteLength);return h.set(u,0),h.set(d,u.length),h}function tr(e,t){let r=[];r[0]=t?28:44,r[1]=1,r[2]=0,r[3]=0,r[4]=0,r[5]=e.byteLength>>24&255,r[6]=e.byteLength>>16&255,r[7]=e.byteLength>>8&255,r[8]=255&e.byteLength;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function rr(e,t){let r=[];r[0]=t?28:44,r[1]=1,r[2]=0,r[3]=0,r[4]=0;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function ir(e){return(126&e[0])>>1}function nr(e){return e===Ge}function sr(e){return!function(e){return e>=32&&e<=40}(e)}function ar(e){return e>=16&&e<=21}function or(e){if(0===e.length)return!1;const t=ir(e[0]);for(let r=1;r255)return!1;return!0}function ur(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!dr(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(lr(e.length)&&dr(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function hr(e){return new Uint8Array(e)}function cr(e,t,r,i,n){null==i&&null==n||(e=e.slice?e.slice(i,n):Array.prototype.slice.call(e,i,n)),t.set(e,r)}var fr,pr={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&i<224?(t.push(String.fromCharCode((31&i)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&i)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},mr=(fr="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+fr[15&i])}return t.join("")}}),_r={16:10,24:12,32:14},gr=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],yr=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],vr=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],br=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],wr=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],Sr=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],Er=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Ur=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],xr=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],Ar=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Cr=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Tr=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Br=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],kr=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Fr=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Pr(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=s[t],this._Kd[e-r][t%4]=s[t];for(var a,o=0,l=n;l>16&255]<<24^yr[a>>8&255]<<16^yr[255&a]<<8^yr[a>>24&255]^gr[o]<<24,o+=1,8!=n)for(t=1;t>8&255]<<8^yr[a>>16&255]<<16^yr[a>>24&255]<<24;for(t=n/2+1;t>2,u=l%4,this._Ke[d][u]=s[t],this._Kd[e-d][u]=s[t++],l++}for(var d=1;d>24&255]^Br[a>>16&255]^kr[a>>8&255]^Fr[255&a]},Ir.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],i=Pr(e),n=0;n<4;n++)i[n]^=this._Ke[0][n];for(var s=1;s>24&255]^wr[i[(n+1)%4]>>16&255]^Sr[i[(n+2)%4]>>8&255]^Er[255&i[(n+3)%4]]^this._Ke[s][n];i=r.slice()}var a,o=hr(16);for(n=0;n<4;n++)a=this._Ke[t][n],o[4*n]=255&(yr[i[n]>>24&255]^a>>24),o[4*n+1]=255&(yr[i[(n+1)%4]>>16&255]^a>>16),o[4*n+2]=255&(yr[i[(n+2)%4]>>8&255]^a>>8),o[4*n+3]=255&(yr[255&i[(n+3)%4]]^a);return o},Ir.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],i=Pr(e),n=0;n<4;n++)i[n]^=this._Kd[0][n];for(var s=1;s>24&255]^xr[i[(n+3)%4]>>16&255]^Ar[i[(n+2)%4]>>8&255]^Cr[255&i[(n+1)%4]]^this._Kd[s][n];i=r.slice()}var a,o=hr(16);for(n=0;n<4;n++)a=this._Kd[t][n],o[4*n]=255&(vr[i[n]>>24&255]^a>>24),o[4*n+1]=255&(vr[i[(n+3)%4]>>16&255]^a>>16),o[4*n+2]=255&(vr[i[(n+2)%4]>>8&255]^a>>8),o[4*n+3]=255&(vr[255&i[(n+1)%4]]^a);return o};var Dr=function(e){if(!(this instanceof Dr))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Ir(e)};Dr.prototype.encrypt=function(e){if((e=ur(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=hr(e.length),r=hr(16),i=0;iNumber.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},Mr.prototype.setBytes=function(e){if(16!=(e=ur(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},Mr.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var Or=function(e,t){if(!(this instanceof Or))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof Mr||(t=new Mr(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Ir(e)};Or.prototype.encrypt=function(e){for(var t=ur(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,i=0;i3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const n=e.byteLength;let s=5;for(;sn)break;let o=e[s+4],l=!1;if(i?(o=o>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,l=1===o||5===o),l){const i=e.slice(s+4+2,s+4+a);let n=new $r.ModeOfOperation.ctr(t,new $r.Counter(r));const o=n.decrypt(i);n=null,e.set(o,s+4+2)}s=s+4+a}return e}function Hr(e,t,r){if(e.byteLength<=30)return e;const i=e.slice(32);let n=new $r.ModeOfOperation.ctr(t,new $r.Counter(r));const s=n.decrypt(i);return n=null,e.set(s,32),e}var Vr=at((function(e,t){var r,n,s,a=(r=new Date,n=4,s={setLogLevel:function(e){n=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=n&&console.info("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=n&&console.warn("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){4>=n&&console.error("["+a.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)}},s);a.getDurationString=function(e,t){var r;function i(e,t){for(var r=(""+e).split(".");r[0].length0){for(var r="",i=0;i0&&(r+=","),r+="["+a.getDurationString(e.start(i))+","+a.getDurationString(e.end(i))+"]";return r}return"(empty)"},t.Log=a;var o=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};o.prototype.getPosition=function(){return this.position},o.prototype.getEndPosition=function(){return this.buffer.byteLength},o.prototype.getLength=function(){return this.buffer.byteLength},o.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0},o.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},o.prototype.readAnyInt=function(e,t){var r=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:r=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16,r|=this.dataview.getUint8(this.position+1)<<8,r|=this.dataview.getUint8(this.position+2);break;case 4:r=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32,r|=this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,r}throw"Not enough bytes in buffer"},o.prototype.readUint8=function(){return this.readAnyInt(1,!1)},o.prototype.readUint16=function(){return this.readAnyInt(2,!1)},o.prototype.readUint24=function(){return this.readAnyInt(3,!1)},o.prototype.readUint32=function(){return this.readAnyInt(4,!1)},o.prototype.readUint64=function(){return this.readAnyInt(8,!1)},o.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",r=0;rthis._byteLength&&(this._byteLength=t);else{for(r<1&&(r=1);t>r;)r*=2;var i=new ArrayBuffer(r),n=new Uint8Array(this._buffer);new Uint8Array(i,0,n.length).set(n),this.buffer=i,this._byteLength=t}}},l.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),r=new Uint8Array(this._buffer,0,t.length);t.set(r),this.buffer=e}},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),l.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},l.prototype.isEof=function(){return this.position>=this._byteLength},l.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Int32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var r=new Int16Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Uint32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var r=new Uint16Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var r=new Float64Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Float32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},l.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},l.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,l.memcpy=function(e,t,r,i,n){var s=new Uint8Array(e,t,n),a=new Uint8Array(r,i,n);s.set(a)},l.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},l.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},l.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=0;rn;i--,n++){var s=t[n];t[n]=t[i],t[i]=s}return e},l.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],r=0;r>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},l.prototype.adjustUint32=function(e,t){var r=this.position;this.seek(e),this.writeUint32(t),this.seek(r)},l.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var r=new Int32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r},l.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var r=new Int16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=2*e,r},l.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r},l.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=2*e,r},l.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var r=new Float64Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=8*e,r},l.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var r=new Float32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r};var u=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(u.prototype=new l(new ArrayBuffer,0,l.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,a.debug("MultiBufferStream","Stream ready for parsing"),!0):(a.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(a.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){a.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e),0),r.set(new Uint8Array(t),e.byteLength),r.buffer},u.prototype.reduceBuffer=function(e,t,r){var i;return(i=new Uint8Array(r)).set(new Uint8Array(e,t,r)),i.buffer.fileStart=e.fileStart+t,i.buffer.usedBytes=0,i.buffer},u.prototype.insertBuffer=function(e){for(var t=!0,r=0;ri.byteLength){this.buffers.splice(r,1),r--;continue}a.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=i.fileStart||(e=this.reduceBuffer(e,0,i.fileStart-e.fileStart)),a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(r,0,e),0===r&&(this.buffer=e);t=!1;break}if(e.fileStart0)){t=!1;break}e=this.reduceBuffer(e,n,s)}}t&&(a.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===r&&(this.buffer=e))},u.prototype.logBufferLevel=function(e){var t,r,i,n,s,o=[],l="";for(i=0,n=0,t=0;t0&&(l+=s.end-1+"]");var d=e?a.info:a.debug;0===this.buffers.length?d("MultiBufferStream","No more buffer in memory"):d("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+i+"/"+n+" bytes), continuous ranges: "+l)},u.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0}return!1}return!1},u.prototype.findPosition=function(e,t,r){var i,n=null,s=-1;for(i=!0===e?0:this.bufferIndex;i=t?(a.debug("MultiBufferStream","Found position in existing buffer #"+s),s):-1},u.prototype.findEndContiguousBuf=function(e){var t,r,i,n=void 0!==e?e:this.bufferIndex;if(r=this.buffers[n],this.buffers.length>n+1)for(t=n+1;t>3;return 31===i&&r.data.length>=2&&(i=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),i}return null},r.DecoderConfigDescriptor=function(e){r.Descriptor.call(this,4,e)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.upStream=0!=(this.streamType>>1&1),this.streamType=this.streamType>>>2,this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e)},r.DecoderSpecificInfo=function(e){r.Descriptor.call(this,5,e)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(e){r.Descriptor.call(this,6,e)},r.SLConfigDescriptor.prototype=new r.Descriptor,this};t.MPEG4DescriptorParser=h;var c={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){c.FullBox.prototype=new c.Box,c.ContainerBox.prototype=new c.Box,c.SampleEntry.prototype=new c.Box,c.TrackGroupTypeBox.prototype=new c.FullBox,c.BASIC_BOXES.forEach((function(e){c.createBoxCtor(e)})),c.FULL_BOXES.forEach((function(e){c.createFullBoxCtor(e)})),c.CONTAINER_BOXES.forEach((function(e){c.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,r){this.type=e,this.size=t,this.uuid=r},FullBox:function(e,t,r){c.Box.call(this,e,t,r),this.flags=0,this.version=0},ContainerBox:function(e,t,r){c.Box.call(this,e,t,r),this.boxes=[]},SampleEntry:function(e,t,r,i){c.ContainerBox.call(this,e,t),this.hdr_size=r,this.start=i},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){c.FullBox.call(this,e,t)},createBoxCtor:function(e,t){c.boxCodes.push(e),c[e+"Box"]=function(t){c.Box.call(this,e,t)},c[e+"Box"].prototype=new c.Box,t&&(c[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){c[e+"Box"]=function(t){c.FullBox.call(this,e,t)},c[e+"Box"].prototype=new c.FullBox,c[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,r=0;rr?(a.error("BoxParser","Box of type '"+u+"' has a size "+d+" greater than its container size "+r),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:d,hdr_size:l,start:o}):0!==d&&o+d>e.getEndPosition()?(e.seek(o),a.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:d,hdr_size:l,start:o}):t?{code:c.OK,type:u,size:d,hdr_size:l,start:o}:(c[u+"Box"]?i=new c[u+"Box"](d):"uuid"!==u?(a.warn("BoxParser","Unknown box type: '"+u+"'"),(i=new c.Box(u,d)).has_unparsed_data=!0):c.UUIDBoxes[s]?i=new c.UUIDBoxes[s](d):(a.warn("BoxParser","Unknown uuid type: '"+s+"'"),(i=new c.Box(u,d)).uuid=s,i.has_unparsed_data=!0),i.hdr_size=l,i.start=o,i.write===c.Box.prototype.write&&"mdat"!==i.type&&(a.info("BoxParser","'"+h+"' box writing not yet implemented, keeping unparsed data in memory for later write"),i.parseDataAndRewind(e)),i.parse(e),(n=e.getPosition()-(i.start+i.size))<0?(a.warn("BoxParser","Parsing of box '"+h+"' did not read the entire indicated box data size (missing "+-n+" bytes), seeking forward"),e.seek(i.start+i.size)):n>0&&(a.error("BoxParser","Parsing of box '"+h+"' read "+n+" more bytes than the indicated box data size, seeking backwards"),0!==i.size&&e.seek(i.start+i.size)),{code:c.OK,box:i,size:i.size})},c.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size)},c.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},c.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size},c.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},c.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},c.ContainerBox.prototype.parse=function(e){for(var t,r;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96)},c.SAMPLE_ENTRY_TYPE_VISUAL="Visual",c.SAMPLE_ENTRY_TYPE_AUDIO="Audio",c.SAMPLE_ENTRY_TYPE_HINT="Hint",c.SAMPLE_ENTRY_TYPE_METADATA="Metadata",c.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",c.SAMPLE_ENTRY_TYPE_SYSTEM="System",c.SAMPLE_ENTRY_TYPE_TEXT="Text",c.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},c.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},c.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size},c.SampleEntry.prototype.parseFooter=function(e){c.ContainerBox.prototype.parse.call(this,e)},c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_HINT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,(function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)})),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,(function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)})),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT,"enct"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA,"encm"),c.createBoxCtor("a1lx",(function(e){var t=16*(1+(1&(1&e.readUint8())));this.layer_size=[];for(var r=0;r<3;r++)this.layer_size[r]=16==t?e.readUint16():e.readUint32()})),c.createBoxCtor("a1op",(function(e){this.op_index=e.readUint8()})),c.createFullBoxCtor("auxC",(function(e){this.aux_type=e.readCString();var t=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=e.readUint8Array(t)})),c.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)a.error("av1C marker problem");else if(this.version=127&t,1===this.version)if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void a.error("av1C reserved_2 parsing problem");var r=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(r)}else a.error("av1C reserved_1 parsing problem");else a.error("av1C version "+this.version+" not supported")})),c.createBoxCtor("avcC",(function(e){var t,r;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(r))})),c.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),c.createFullBoxCtor("ccst",(function(e){var t=e.readUint8();this.all_ref_pics_intra=128==(128&t),this.intra_pred_used=64==(64&t),this.max_ref_per_pic=(63&t)>>2,e.readUint24()})),c.createBoxCtor("cdef",(function(e){var t;for(this.channel_count=e.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],t=0;t=32768&&this.component_type_urls.push(e.readCString())}})),c.createFullBoxCtor("co64",(function(e){var t,r;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4))})),c.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),c.createFullBoxCtor("cslg",(function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())})),c.createFullBoxCtor("ctts",(function(e){var t,r;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|i>>5&7})),c.createBoxCtor("dec3",(function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var r=0;r>6,i.bsid=n>>1&31,i.bsmod=(1&n)<<4|s>>4&15,i.acmod=s>>1&7,i.lfeon=1&s,i.num_dep_sub=a>>1&15,i.num_dep_sub>0&&(i.chan_loc=(1&a)<<8|e.readUint8())}})),c.createFullBoxCtor("dfLa",(function(e){var t=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var i=e.readUint8(),n=Math.min(127&i,r.length-1);if(n?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(r[n]),128&i)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),c.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),c.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),c.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),c.createBoxCtor("dOps",(function(e){if(this.Version=e.readUint8(),this.OutputChannelCount=e.readUint8(),this.PreSkip=e.readUint16(),this.InputSampleRate=e.readUint32(),this.OutputGain=e.readInt16(),this.ChannelMappingFamily=e.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=e.readUint8(),this.CoupledCount=e.readUint8(),this.ChannelMapping=[];for(var t=0;t=4;)this.compatible_brands[r]=e.readString(4),t-=4,r++})),c.createFullBoxCtor("hdlr",(function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))})),c.createBoxCtor("hvcC",(function(e){var t,r,i,n;this.configurationVersion=e.readUint8(),n=e.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(32&n)>>5,this.general_profile_idc=31&n,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),n=e.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var s=e.readUint8();for(t=0;t>7,a.nalu_type=63&n;var o=e.readUint16();for(r=0;r>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var r=0;if(this.version<2)r=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";r=e.readUint32()}for(var i=0;i>7,this.axis=1&t})),c.createFullBoxCtor("infe",(function(e){if(0!==this.version&&1!==this.version||(this.item_ID=e.readUint16(),this.item_protection_index=e.readUint16(),this.item_name=e.readCString(),this.content_type=e.readCString(),this.content_encoding=e.readCString()),1===this.version)return this.extension_type=e.readString(4),a.warn("BoxParser","Cannot parse extension type"),void e.seek(this.start+this.size);this.version>=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()))})),c.createFullBoxCtor("ipma",(function(e){var t,r;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?a.property_index=(127&s)<<8|e.readUint8():a.property_index=127&s}}})),c.createFullBoxCtor("iref",(function(e){var t,r;for(this.references=[];e.getPosition()>7,i.assignment_type=127&n,i.assignment_type){case 0:i.grouping_type=e.readString(4);break;case 1:i.grouping_type=e.readString(4),i.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:i.sub_track_id=e.readUint32();break;default:a.warn("BoxParser","Unknown leva assignement type")}}})),c.createBoxCtor("lsel",(function(e){this.layer_id=e.readUint16()})),c.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),f.prototype.toString=function(){return"("+this.x+","+this.y+")"},c.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]=new f(e.readUint16(),e.readUint16()),this.display_primaries[1]=new f(e.readUint16(),e.readUint16()),this.display_primaries[2]=new f(e.readUint16(),e.readUint16()),this.white_point=new f(e.readUint16(),e.readUint16()),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),c.createFullBoxCtor("mdhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()})),c.createFullBoxCtor("mehd",(function(e){1&this.flags&&(a.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()})),c.createFullBoxCtor("meta",(function(e){this.boxes=[],c.ContainerBox.prototype.parse.call(this,e)})),c.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),c.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),c.createFullBoxCtor("mskC",(function(e){this.bits_per_pixel=e.readUint8()})),c.createFullBoxCtor("mvhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()})),c.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),c.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),c.createFullBoxCtor("padb",(function(e){var t=e.readUint32();this.padbits=[];for(var r=0;r0){var t=e.readUint32();this.kid=[];for(var r=0;r0&&(this.data=e.readUint8Array(i))})),c.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),c.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),c.createFullBoxCtor("saio",(function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var r=e.readUint8(),i=0;i>7,this.num_leading_samples=127&t})),c.createSampleGroupCtor("rash",(function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)a.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=c.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))})),c.createSampleGroupCtor("stsa",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),c.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),c.createSampleGroupCtor("tsas",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("tscl",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("vipr",(function(e){a.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createFullBoxCtor("sbgp",(function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),r=0;r>6,this.sample_depends_on[i]=t>>4&3,this.sample_is_depended_on[i]=t>>2&3,this.sample_has_redundancy[i]=3&t})),c.createFullBoxCtor("senc"),c.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),a.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),r=0;r>31&1,i.referenced_size=2147483647&n,i.subsegment_duration=e.readUint32(),n=e.readUint32(),i.starts_with_SAP=n>>31&1,i.SAP_type=n>>28&7,i.SAP_delta_time=268435455&n}})),c.SingleItemTypeReferenceBox=function(e,t,r,i){c.Box.call(this,e,t),this.hdr_size=r,this.start=i},c.SingleItemTypeReferenceBox.prototype=new c.Box,c.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[t+1]=15&i}else if(8===this.field_size)for(t=0;t0)for(r=0;r>4&15,this.default_skip_byte_block=15&t}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=c.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))})),c.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),c.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),c.createFullBoxCtor("tfra",(function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var r=e.readUint32(),i=0;i>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()})),c.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),c.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),c.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),c.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),c.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),c.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},c.createTrackGroupCtor("msrc"),c.TrackReferenceTypeBox=function(e,t,r,i){c.Box.call(this,e,t),this.hdr_size=r,this.start=i},c.TrackReferenceTypeBox.prototype=new c.Box,c.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},c.trefBox.prototype.parse=function(e){for(var t,r;e.getPosition()t&&this.flags&c.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=e.readUint32(),this.row_align_size=e.readUint32(),this.tile_align_size=e.readUint32(),this.num_tile_cols_minus_one=e.readUint32(),this.num_tile_rows_minus_one=e.readUint32()}})),c.createFullBoxCtor("url ",(function(e){1!==this.flags&&(this.location=e.readCString())})),c.createFullBoxCtor("urn ",(function(e){this.name=e.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=e.readCString())})),c.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")})),c.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=c.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),c.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),c.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=c.parseHex16(e)})),c.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize))})),c.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),c.createFullBoxCtor("vvcC",(function(e){var t,r,i={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){this.held_bits=e.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(e){this.held_bits=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=this.held_bits>>this.num_held_bits-e&(1<1){for(i.stream_read_1_bytes(e),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var a=i.extract_bits(1);this.ptl_sublayer_present_mask|=a<1;++r)i.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<>=1;t+=c.decimalToHex(i,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var n=!1,s="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||n)&&(s="."+c.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+s,n=!0);t+=s}return t},c.vvc1SampleEntry.prototype.getCodec=c.vvi1SampleEntry.prototype.getCodec=function(){var e,t=c.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var r="";if(this.vvcC.general_constraint_info){var i,n=[],s=0;for(s|=this.vvcC.ptl_frame_only_constraint<<7,s|=this.vvcC.ptl_multilayer_enabled<<6,e=0;e>2&63,n.push(s),s&&(i=e),s=this.vvcC.general_constraint_info[e]>>2&3;if(void 0===i)r=".CA";else{r=".C";var a="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",o=0,l=0;for(e=0;e<=i;++e)for(o=o<<8|n[e],l+=8;l>=5;){r+=a[o>>l-5&31],o&=(1<<(l-=5))-1}l&&(r+=a[31&(o<<=5-l)])}}t+=r}return t},c.mp4aSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),r=this.esds.esd.getAudioConfig();return e+"."+c.decimalToHex(t)+(r?"."+r:"")}return e},c.stxtSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},c.vp08SampleEntry.prototype.getCodec=c.vp09SampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this),t=this.vpcC.level;0==t&&(t="00");var r=this.vpcC.bitDepth;return 8==r&&(r="08"),e+".0"+this.vpcC.profile+"."+t+"."+r},c.av01SampleEntry.prototype.getCodec=function(){var e,t=c.SampleEntry.prototype.getCodec.call(this),r=this.av1C.seq_level_idx_0;return r<10&&(r="0"+r),2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+r+(this.av1C.seq_tier_0?"H":"M")+"."+e},c.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),a.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>d?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>d&&e.writeUint64(this.size)},c.FullBox.prototype.writeHeader=function(e){this.size+=4,c.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},c.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))},c.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1t?1:0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(e),1===this.version?e.writeUint64(this.baseMediaDecodeTime):e.writeUint32(this.baseMediaDecodeTime)},c.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&c.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&c.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&c.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&c.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&c.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags)},c.tkhdBox.prototype.write=function(e){this.version=0,this.size=80,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.track_id),e.writeUint32(0),e.writeUint32(this.duration),e.writeUint32(0),e.writeUint32(0),e.writeInt16(this.layer),e.writeInt16(this.alternate_group),e.writeInt16(this.volume<<8),e.writeUint16(0),e.writeInt32Array(this.matrix),e.writeUint32(this.width),e.writeUint32(this.height)},c.trexBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20,this.writeHeader(e),e.writeUint32(this.track_id),e.writeUint32(this.default_sample_description_index),e.writeUint32(this.default_sample_duration),e.writeUint32(this.default_sample_size),e.writeUint32(this.default_sample_flags)},c.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&c.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&c.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&c.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&c.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&c.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&c.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&c.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&c.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var t=0;t-1||e[r]instanceof c.Box||t[r]instanceof c.Box||void 0===e[r]||void 0===t[r]||"function"==typeof e[r]||"function"==typeof t[r]||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||"data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r||c.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1||e[r]===t[r]))return!1;return!0},c.boxEqual=function(e,t){if(!c.boxEqualFields(e,t))return!1;for(var r=0;r1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1)},g.prototype.setExtractionOptions=function(e,t,r){var i=this.getTrackById(e);if(i){var n={};this.extractedTracks.push(n),n.id=e,n.user=t,n.trak=i,i.nextSample=0,n.nb_samples=1e3,n.samples=[],r&&r.nbSamples&&(n.nb_samples=r.nbSamples)}},g.prototype.unsetExtractionOptions=function(e){for(var t=-1,r=0;r-1&&this.extractedTracks.splice(t,1)},g.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}if(this.saveParsePosition&&this.saveParsePosition(),(e=c.parseOneBox(this.stream,false)).code===c.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var r;switch(r="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),r){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[r]&&a.warn("ISOFile","Duplicate Box of type: "+r+", overriding previous occurrence"),this[r]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},g.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(a.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(a.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(a.warn("ISOFile","Not ready to start parsing"),!1))},g.prototype.appendBuffer=function(e,t){var r;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(a.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},g.prototype.getInfo=function(){var e,t,r,i,n,s,a={},o=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(a.hasMoov=!0,a.duration=this.moov.mvhd.duration,a.timescale=this.moov.mvhd.timescale,a.isFragmented=null!=this.moov.mvex,a.isFragmented&&this.moov.mvex.mehd&&(a.fragment_duration=this.moov.mvex.mehd.fragment_duration),a.isProgressive=this.isProgressive,a.hasIOD=null!=this.moov.iods,a.brands=[],a.brands.push(this.ftyp.major_brand),a.brands=a.brands.concat(this.ftyp.compatible_brands),a.created=new Date(o+1e3*this.moov.mvhd.creation_time),a.modified=new Date(o+1e3*this.moov.mvhd.modification_time),a.tracks=[],a.audioTracks=[],a.videoTracks=[],a.subtitleTracks=[],a.metadataTracks=[],a.hintTracks=[],a.otherTracks=[],e=0;e0?a.mime+='video/mp4; codecs="':a.audioTracks&&a.audioTracks.length>0?a.mime+='audio/mp4; codecs="':a.mime+='application/mp4; codecs="',e=0;e=r.samples.length)&&(a.info("ISOFile","Sending fragmented data on track #"+i.id+" for samples ["+Math.max(0,r.nextSample-i.nb_samples)+","+(r.nextSample-1)+"]"),a.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(i.id,i.user,i.segmentStream.buffer,r.nextSample,e||r.nextSample>=r.samples.length),i.segmentStream=null,i!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t=r.samples.length)&&(a.debug("ISOFile","Sending samples on track #"+s.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(s.id,s.user,s.samples),s.samples=[],s!==this.extractedTracks[t]))break}}}},g.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},g.prototype.getBoxes=function(e,t){var r=[];return g._sweep.call(this,e,r,t),r},g._sweep=function(e,t,r){for(var i in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&r)return;g._sweep.call(this.boxes[i],e,t,r)}},g.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},g.prototype.getTrackSample=function(e,t){var r=this.getTrackById(e);return this.getSample(r,t)},g.prototype.releaseUsedSamples=function(e,t){var r=0,i=this.getTrackById(e);i.lastValidSample||(i.lastValidSample=0);for(var n=i.lastValidSample;ne*n.timescale){d=i-1;break}t&&n.is_sync&&(l=i)}for(t&&(d=l),e=r.samples[d].cts,r.nextSample=d;r.samples[d].alreadyRead===r.samples[d].size&&r.samples[d+1];)d++;return s=r.samples[d].offset+r.samples[d].alreadyRead,a.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+a.getDurationString(e,o)+" and offset: "+s),{offset:s,time:e/o}},g.prototype.getTrackDuration=function(e){var t;return e.samples?((t=e.samples[e.samples.length-1]).cts+t.duration)/t.timescale:1/0},g.prototype.seek=function(e,t){var r,i,n,s=this.moov,o={offset:1/0,time:1/0};if(this.moov){for(n=0;nthis.getTrackDuration(r)||((i=this.seekTrack(e,t,r)).offset-1){a=l;break}switch(a){case"Visual":if(n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),s.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24),t.avcDecoderConfigRecord){var h=new c.avcCBox;h.parse(new o(t.avcDecoderConfigRecord)),s.addBox(h)}else if(t.hevcDecoderConfigRecord){var f=new c.hvcCBox;f.parse(new o(t.hevcDecoderConfigRecord)),s.addBox(f)}break;case"Audio":n.add("smhd").set("balance",t.balance||0),s.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":if(n.add("sthd"),"stpp"===t.type)s.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");break;default:n.add("nmhd")}t.description&&s.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){s.addBox(e)})),n.add("dinf").add("dref").addEntry((new c["url Box"]).set("flags",1));var p=n.add("stbl");return p.add("stsd").addEntry(s),p.add("stts").set("sample_counts",[]).set("sample_deltas",[]),p.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),p.add("stco").set("chunk_offsets",[]),p.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(r),t.id}},c.Box.prototype.computeSize=function(e){var t=e||new l;t.endianness=l.BIG_ENDIAN,this.write(t)},g.prototype.addSample=function(e,t,r){var i=r||{},n={},s=this.getTrackById(e);if(null!==s){n.number=s.samples.length,n.track_id=s.tkhd.track_id,n.timescale=s.mdia.mdhd.timescale,n.description_index=i.sample_description_index?i.sample_description_index-1:0,n.description=s.mdia.minf.stbl.stsd.entries[n.description_index],n.data=t,n.size=t.byteLength,n.alreadyRead=n.size,n.duration=i.duration||1,n.cts=i.cts||0,n.dts=i.dts||0,n.is_sync=i.is_sync||!1,n.is_leading=i.is_leading||0,n.depends_on=i.depends_on||0,n.is_depended_on=i.is_depended_on||0,n.has_redundancy=i.has_redundancy||0,n.degradation_priority=i.degradation_priority||0,n.offset=0,n.subsamples=i.subsamples,s.samples.push(n),s.samples_size+=n.size,s.samples_duration+=n.duration,void 0===s.first_dts&&(s.first_dts=i.dts),this.processSamples();var a=this.createSingleSampleMoof(n);return this.addBox(a),a.computeSize(),a.trafs[0].truns[0].data_offset=a.size+8,this.add("mdat").data=new Uint8Array(t),n}},g.prototype.createSingleSampleMoof=function(e){var t=0;t=e.is_sync?1<<25:65536;var r=new c.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var i=r.add("traf"),n=this.getTrackById(e.track_id);return i.add("tfhd").set("track_id",e.track_id).set("flags",c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add("tfdt").set("baseMediaDecodeTime",e.dts-(n.first_dts||0)),i.add("trun").set("flags",c.TRUN_FLAGS_DATA_OFFSET|c.TRUN_FLAGS_DURATION|c.TRUN_FLAGS_SIZE|c.TRUN_FLAGS_FLAGS|c.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[t]).set("sample_composition_time_offset",[e.cts-e.dts]),r},g.prototype.lastMoofIndex=0,g.prototype.samplesDataSize=0,g.prototype.resetTables=function(){var e,t,r,i,n,s;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=n[a].grouping_type+"/0",(o=new d(n[a].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=o))}else for(a=0;a=2&&(l=i[a].grouping_type+"/0",o=new d(i[a].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=o))},g.setSampleGroupProperties=function(e,t,r,i){var n,s;for(n in t.sample_groups=[],i){var a;if(t.sample_groups[n]={},t.sample_groups[n].grouping_type=i[n].grouping_type,t.sample_groups[n].grouping_type_parameter=i[n].grouping_type_parameter,r>=i[n].last_sample_in_run&&(i[n].last_sample_in_run<0&&(i[n].last_sample_in_run=0),i[n].entry_index++,i[n].entry_index<=i[n].sbgp.entries.length-1&&(i[n].last_sample_in_run+=i[n].sbgp.entries[i[n].entry_index].sample_count)),i[n].entry_index<=i[n].sbgp.entries.length-1?t.sample_groups[n].group_description_index=i[n].sbgp.entries[i[n].entry_index].group_description_index:t.sample_groups[n].group_description_index=-1,0!==t.sample_groups[n].group_description_index)a=i[n].fragment_description?i[n].fragment_description:i[n].description,t.sample_groups[n].group_description_index>0?(s=t.sample_groups[n].group_description_index>65535?(t.sample_groups[n].group_description_index>>16)-1:t.sample_groups[n].group_description_index-1,a&&s>=0&&(t.sample_groups[n].description=a.entries[s])):a&&a.version>=2&&a.default_group_description_index>0&&(t.sample_groups[n].description=a.entries[a.default_group_description_index-1])}},g.process_sdtp=function(e,t,r){t&&(e?(t.is_leading=e.is_leading[r],t.depends_on=e.sample_depends_on[r],t.is_depended_on=e.sample_is_depended_on[r],t.has_redundancy=e.sample_has_redundancy[r]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))},g.prototype.buildSampleLists=function(){var e,t;for(e=0;ev&&(b++,v<0&&(v=0),v+=s.sample_counts[b]),t>0?(e.samples[t-1].duration=s.sample_deltas[b],e.samples_duration+=e.samples[t-1].duration,A.dts=e.samples[t-1].dts+e.samples[t-1].duration):A.dts=0,a?(t>=w&&(S++,w<0&&(w=0),w+=a.sample_counts[S]),A.cts=e.samples[t].dts+a.sample_offsets[S]):A.cts=A.dts,o?(t==o.sample_numbers[E]-1?(A.is_sync=!0,E++):(A.is_sync=!1,A.degradation_priority=0),d&&d.entries[U].sample_delta+x==t+1&&(A.subsamples=d.entries[U].subsamples,x+=d.entries[U].sample_delta,U++)):A.is_sync=!0,g.process_sdtp(e.mdia.minf.stbl.sdtp,A,A.number),A.degradation_priority=c?c.priority[t]:0,d&&d.entries[U].sample_delta+x==t&&(A.subsamples=d.entries[U].subsamples,x+=d.entries[U].sample_delta),(u.length>0||h.length>0)&&g.setSampleGroupProperties(e,A,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}},g.prototype.updateSampleLists=function(){var e,t,r,i,n,s,a,o,l,d,u,h,f,p,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&g.initSampleGroups(h,u,u.sbgps,h.mdia.minf.stbl.sgpds,u.sgpds),t=0;t0?p.dts=h.samples[h.samples.length-2].dts+h.samples[h.samples.length-2].duration:(u.tfdt?p.dts=u.tfdt.baseMediaDecodeTime:p.dts=0,h.first_traf_merged=!0),p.cts=p.dts,_.flags&c.TRUN_FLAGS_CTS_OFFSET&&(p.cts=p.dts+_.sample_composition_time_offset[r]),m=a,_.flags&c.TRUN_FLAGS_FLAGS?m=_.sample_flags[r]:0===r&&_.flags&c.TRUN_FLAGS_FIRST_FLAG&&(m=_.first_sample_flags),p.is_sync=!(m>>16&1),p.is_leading=m>>26&3,p.depends_on=m>>24&3,p.is_depended_on=m>>22&3,p.has_redundancy=m>>20&3,p.degradation_priority=65535&m;var y=!!(u.tfhd.flags&c.TFHD_FLAG_BASE_DATA_OFFSET),v=!!(u.tfhd.flags&c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),b=!!(_.flags&c.TRUN_FLAGS_DATA_OFFSET),w=0;w=y?u.tfhd.base_data_offset:v||0===t?d.start:o,p.offset=0===t&&0===r?b?w+_.data_offset:w:o,o=p.offset+p.size,(u.sbgps.length>0||u.sgpds.length>0||h.mdia.minf.stbl.sbgps.length>0||h.mdia.minf.stbl.sgpds.length>0)&&g.setSampleGroupProperties(h,p,p.number_in_traf,u.sample_groups_info)}}if(u.subs){h.has_fragment_subsamples=!0;var S=u.first_sample_index;for(t=0;t-1))return null;var s=(r=this.stream.buffers[n]).byteLength-(i.offset+i.alreadyRead-r.fileStart);if(i.size-i.alreadyRead<=s)return a.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-r.fileStart)+" read size: "+(i.size-i.alreadyRead)+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,r,i.offset+i.alreadyRead-r.fileStart,i.size-i.alreadyRead),r.usedBytes+=i.size-i.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead=i.size,i;if(0===s)return null;a.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-r.fileStart)+" read size: "+s+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,r,i.offset+i.alreadyRead-r.fileStart,s),i.alreadyRead+=s,r.usedBytes+=s,this.stream.logBufferLevel()}},g.prototype.releaseSample=function(e,t){var r=e.samples[t];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},g.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},g.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec()}return t},g.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(r.protection=s.ipro.protections[s.iinf.item_infos[e].protection_index-1]),s.iinf.item_infos[e].item_type?r.type=s.iinf.item_infos[e].item_type:r.type="mime",r.content_type=s.iinf.item_infos[e].content_type,r.content_encoding=s.iinf.item_infos[e].content_encoding;if(s.grpl)for(e=0;e0&&c.property_index-1-1))return null;var o=(t=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-t.fileStart);if(!(n.length-n.alreadyRead<=o))return a.debug("ISOFile","Getting item #"+e+" extent #"+i+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+o+" full extent size: "+n.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,o),n.alreadyRead+=o,r.alreadyRead+=o,t.usedBytes+=o,this.stream.logBufferLevel(),null;a.debug("ISOFile","Getting item #"+e+" extent #"+i+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,n.length-n.alreadyRead),t.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length}}return r.alreadyRead===r.size?r:null},g.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var r=0;r0?this.moov.traks[e].samples[0].duration:0),t.push(i)}return t},c.Box.prototype.printHeader=function(e){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},c.FullBox.prototype.printHeader=function(e){this.size+=4,c.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},c.Box.prototype.print=function(e){this.printHeader(e)},c.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)},c.tkhdBox.prototype.print=function(e){c.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)};var y={createFile:function(e,t){var r=void 0===e||e,i=new g(t);return i.discardMdatData=!r,i}};t.createFile=y.createFile}));function Wr(e){return e.reduce(((e,t)=>256*e+t))}function jr(e){const t=[101,103,119,99],r=e.length-28,i=e.slice(r,r+t.length);return t.every(((e,t)=>e===i[t]))}Vr.Log,Vr.MP4BoxStream,Vr.DataStream,Vr.MultiBufferStream,Vr.MPEG4DescriptorParser,Vr.BoxParser,Vr.XMLSubtitlein4Parser,Vr.Textin4Parser,Vr.ISOFile,Vr.createFile;class Yr{constructor(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=new Uint8Array([30,158,90,33,244,57,83,165,2,70,35,87,215,231,226,108]),this.t=this.n.slice().reverse()}destroy(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=null,this.t=null}transport(e){if(!this.s&&this.l>50)return e;if(this.l++,this.d)return e;const t=new Uint8Array(e);if(this.A){if(!(this.c~e))}(e.slice(r+32,r+32+t))]}return null}(t,this.t);if(!r)return e;const i=function(e){try{if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiate)throw null;{const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(!(e instanceof WebAssembly.Module&&new WebAssembly.Instance(e)instanceof WebAssembly.Instance))throw null}}catch(e){return new Error("video_error_4")}let t;try{t={env:{__handle_stack_overflow:()=>e(new Error("video_error_1")),memory:new WebAssembly.Memory({initial:256,maximum:256})}}}catch(e){return new Error("video_error_5")}return t}(e);if(i instanceof Error)return console.error(i.message),this.d=!0,e;this.A=!0,this.u=r[1],jr(t)&&this.c++,WebAssembly.instantiate(r[2],i).then((e=>{if("function"!=typeof(t=e.instance.exports).parse||"object"!=typeof t.memory)return this.d=!0,void console.error("video_error_3");var t;this.s=e.instance.exports,this.a=new Uint8Array(this.s.memory.buffer)})).catch((e=>{this.d=!0,console.error("video_error_6")}))}return e}}const qr=16,Kr=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Xr=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Zr(e){const t=[];for(let r=0,i=e.length;r1===(e=e.toString(16)).length?"0"+e:e)).join("")}function Qr(e){const t=[];for(let r=0,i=e.length;r>>6),t.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)t.push(224|i>>>12),t.push(128|i>>>6&63),t.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw t.push(i),new Error("input is not supported");r++,t.push(240|i>>>18&28),t.push(128|i>>>12&63),t.push(128|i>>>6&63),t.push(128|63&i)}}return t}function ei(e){const t=[];for(let r=0,i=e.length;r=240&&e[r]<=247?(t.push(String.fromCodePoint(((7&e[r])<<18)+((63&e[r+1])<<12)+((63&e[r+2])<<6)+(63&e[r+3]))),r+=3):e[r]>=224&&e[r]<=239?(t.push(String.fromCodePoint(((15&e[r])<<12)+((63&e[r+1])<<6)+(63&e[r+2]))),r+=2):e[r]>=192&&e[r]<=223?(t.push(String.fromCodePoint(((31&e[r])<<6)+(63&e[r+1]))),r++):t.push(String.fromCodePoint(e[r]));return t.join("")}function ti(e,t){const r=31&t;return e<>>32-r}function ri(e){return(255&Kr[e>>>24&255])<<24|(255&Kr[e>>>16&255])<<16|(255&Kr[e>>>8&255])<<8|255&Kr[255&e]}function ii(e){return e^ti(e,2)^ti(e,10)^ti(e,18)^ti(e,24)}function ni(e){return e^ti(e,13)^ti(e,23)}function si(e,t,r){const i=new Array(4),n=new Array(4);for(let t=0;t<4;t++)n[0]=255&e[4*t],n[1]=255&e[4*t+1],n[2]=255&e[4*t+2],n[3]=255&e[4*t+3],i[t]=n[0]<<24|n[1]<<16|n[2]<<8|n[3];for(let e,t=0;t<32;t+=4)e=i[1]^i[2]^i[3]^r[t+0],i[0]^=ii(ri(e)),e=i[2]^i[3]^i[0]^r[t+1],i[1]^=ii(ri(e)),e=i[3]^i[0]^i[1]^r[t+2],i[2]^=ii(ri(e)),e=i[0]^i[1]^i[2]^r[t+3],i[3]^=ii(ri(e));for(let e=0;e<16;e+=4)t[e]=i[3-e/4]>>>24&255,t[e+1]=i[3-e/4]>>>16&255,t[e+2]=i[3-e/4]>>>8&255,t[e+3]=255&i[3-e/4]}function ai(e,t,r){const i=new Array(4),n=new Array(4);for(let t=0;t<4;t++)n[0]=255&e[0+4*t],n[1]=255&e[1+4*t],n[2]=255&e[2+4*t],n[3]=255&e[3+4*t],i[t]=n[0]<<24|n[1]<<16|n[2]<<8|n[3];i[0]^=2746333894,i[1]^=1453994832,i[2]^=1736282519,i[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=i[1]^i[2]^i[3]^Xr[r+0],t[r+0]=i[0]^=ni(ri(e)),e=i[2]^i[3]^i[0]^Xr[r+1],t[r+1]=i[1]^=ni(ri(e)),e=i[3]^i[0]^i[1]^Xr[r+2],t[r+2]=i[2]^=ni(ri(e)),e=i[0]^i[1]^i[2]^Xr[r+3],t[r+3]=i[3]^=ni(ri(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function oi(e,t,r){let{padding:i="pkcs#7",mode:n,iv:s=[],output:a="string"}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("cbc"===n&&("string"==typeof s&&(s=Zr(s)),16!==s.length))throw new Error("iv is invalid");if("string"==typeof t&&(t=Zr(t)),16!==t.length)throw new Error("key is invalid");if(e="string"==typeof e?0!==r?Qr(e):Zr(e):[...e],("pkcs#5"===i||"pkcs#7"===i)&&0!==r){const t=qr-e.length%qr;for(let r=0;r=qr;){const t=e.slice(h,h+16),i=new Array(16);if("cbc"===n)for(let e=0;e2&&void 0!==arguments[2]&&arguments[2];const i=e.byteLength;let n=5;for(;ni)break;let a=e[n+4],o=!1;if(r?(a=a>>>1&63,o=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(a)):(a&=31,o=1===a||5===a),o){const r=oi(e.slice(n+4+2,n+4+s),t,0,{padding:"none",output:"array"});e.set(r,n+4+2)}n=n+4+s}return e}const ui={init:0,findFirstStartCode:1,findSecondStartCode:2};class hi extends class{on(e,t,r){const i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:r}),this}once(e,t,r){const i=this;function n(){i.off(e,n);for(var s=arguments.length,a=new Array(s),o=0;o1?r-1:0),n=1;n{delete r[e]})),void delete this.e;const i=r[e],n=[];if(i&&t)for(let e=0,r=i.length;e=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(!(!1&this.tempBuffer[this.parsedOffset+1])){this.versionLayer=this.tempBuffer[this.parsedOffset+1],this.state=ui.findFirstStartCode,this.fisrtStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==ui.findFirstStartCode){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(this.tempBuffer[this.parsedOffset+1]==this.versionLayer){this.state=ui.findSecondStartCode,this.secondStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==ui.findSecondStartCode){let e=this.tempBuffer.slice(this.fisrtStartCodeOffset,this.secondStartCodeOffset);this.emit("data",e,t),this.tempBuffer=this.tempBuffer.slice(this.secondStartCodeOffset),this.fisrtStartCodeOffset=0,this.parsedOffset=2,this.state=ui.findFirstStartCode}}}}function ci(e,t,r){for(let i=2;i3&&void 0!==arguments[3]&&arguments[3];const n=e.byteLength;let s=5;for(;sn)break;let o=e[s+4],l=!1;if(i?(o=o>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,l=1===o||5===o),l){const i=ci(e.slice(s+4,s+4+a),t,r);e.set(i,s+4)}s=s+4+a}return e}Date.now||(Date.now=function(){return(new Date).getTime()});const mi=[];mi.push(r(),t()),Promise.all(mi).then((e=>{const t=e[0];!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[],n=[],s={},a=new AbortController,o=null,l=null,d=null,u=null,v=null,b=null,E=!1,Ge=!1,Ye=!!At(r),Ke=!1,Xe=null,at=null,ft=null,Tt=[],Bt=null,kt=null,Ft=0,Dt=0,Lt=null,Rt=null,jt=0,Yt=0,qt=!1,Qt=!1,lr=!1,dr=null,ur=null,hr=null,cr=!1,fr=()=>{const e=Ut();return{debug:e.debug,debugLevel:e.debugLevel,debugUuid:e.debugUuid,useOffscreen:e.useOffscreen,useWCS:e.useWCS,useMSE:e.useMSE,videoBuffer:e.videoBuffer,videoBufferDelay:e.videoBufferDelay,openWebglAlignment:e.openWebglAlignment,playType:e.playType,hasAudio:e.hasAudio,hasVideo:e.hasVideo,playbackRate:1,playbackForwardMaxRateDecodeIFrame:e.playbackForwardMaxRateDecodeIFrame,playbackIsCacheBeforeDecodeForFpsRender:e.playbackConfig.isCacheBeforeDecodeForFpsRender,sampleRate:0,networkDelay:e.networkDelay,visibility:!0,useSIMD:e.useSIMD,isRecording:!1,recordType:e.recordType,isNakedFlow:e.isNakedFlow,checkFirstIFrame:e.checkFirstIFrame,audioBufferSize:1024,isM7sCrypto:e.isM7sCrypto,m7sCryptoAudio:e.m7sCryptoAudio,cryptoKey:e.cryptoKey,cryptoIV:e.cryptoIV,isSm4Crypto:e.isSm4Crypto,sm4CryptoKey:e.sm4CryptoKey,isXorCrypto:e.isXorCrypto,isHls265:!1,isFlv:e.isFlv,isFmp4:e.isFmp4,isMpeg4:e.isMpeg4,isFmp4Private:e.isFmp4Private,isEmitSEI:e.isEmitSEI,isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isDropSameTimestampGop:e.isDropSameTimestampGop,mseDecodeAudio:e.mseDecodeAudio,nakedFlowH265DemuxUseNew:e.nakedFlowH265DemuxUseNew}};"VideoEncoder"in self&&(s={hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:new VideoDecoder({output:function(e){if(s.isEmitInfo||(yr.debug.log("worker","Webcodecs Video Decoder initSize"),postMessage({cmd:x,w:e.codedWidth,h:e.codedHeight}),s.isEmitInfo=!0,s.offscreenCanvas=new OffscreenCanvas(e.codedWidth,e.codedHeight),s.offscreenCanvasCtx=s.offscreenCanvas.getContext("2d")),yt(e.createImageBitmap))e.createImageBitmap().then((t=>{s.offscreenCanvasCtx.drawImage(t,0,0,e.codedWidth,e.codedHeight);let r=s.offscreenCanvas.transferToImageBitmap();postMessage({cmd:A,buffer:r,delay:yr.delay,ts:0},[r]),wt(e)}));else{s.offscreenCanvasCtx.drawImage(e,0,0,e.codedWidth,e.codedHeight);let t=s.offscreenCanvas.transferToImageBitmap();postMessage({cmd:A,buffer:t,delay:yr.delay,ts:0},[t]),wt(e)}},error:function(e){yr.debug.error("worker","VideoDecoder error",e)}}),decode:function(e,t,r){const i=e[0]>>4==1;if(s.hasInit){const r=new EncodedVideoChunk({data:e.slice(5),timestamp:t,type:i?We:je});s.decoder.decode(r)}else if(i&&0===e[1]){const t=15&e[0];postMessage({cmd:P,code:t});const r=mt(e.slice(5));yr._opt.recordType===y&&postMessage({cmd:I,buffer:e,codecId:t},[e.buffer]),s.decoder.configure(r),s.hasInit=!0}},reset(){s.hasInit=!1,s.isEmitInfo=!1,s.offscreenCanvas=null,s.offscreenCanvasCtx=null}});let pr=function(){if(cr=!0,yr.fetchStatus!==Qe||Ct(yr._opt.isChrome)){if(a)try{a.abort(),a=null}catch(e){yr.debug.log("worker","abort catch",e)}}else a=null,yr.debug.log("worker",`abort() and not abortController.abort() _status is ${yr.fetchStatus} and _isChrome is ${yr._opt.isChrome}`)},mr={init(){mr.lastBuf=null,mr.vps=null,mr.sps=null,mr.pps=null,mr.streamType=null,mr.localDts=0,mr.isSendSeqHeader=!1},destroy(){mr.lastBuf=null,mr.vps=null,mr.sps=null,mr.pps=null,mr.streamType=null,mr.localDts=0,mr.isSendSeqHeader=!1},dispatch(e){const t=new Uint8Array(e);mr.extractNALu$2(t)},getNaluDts(){let e=mr.localDts;return mr.localDts=mr.localDts+40,e},getNaluAudioDts(){const e=yr._opt.sampleRate,t=yr._opt.audioBufferSize;return mr.localDts+parseInt(t/e*1e3)},extractNALu(e){let t,r,i=0,n=e.byteLength,s=0,a=[];for(;i1)for(let e=0;e{const t=Nt(e);t===De||t===Ie?mr.handleVideoH264Nalu(e):Ht(t)&&i.push(e)})),1===i.length)mr.handleVideoH264Nalu(i[0]);else if(Wt(i)){const e=Nt(i[0]),t=Vt(e);mr.handleVideoH264NaluList(i,t,e)}else i.forEach((e=>{mr.handleVideoH264Nalu(e)}))}else if(mr.streamType===Te)if(yr._opt.nakedFlowH265DemuxUseNew){const t=mr.handleAddNaluStartCode(e),r=mr.extractNALu(t);if(0===r.length)return void yr.debug.warn("worker","handleVideoNalu","h265 naluList.length === 0");const i=[];if(r.forEach((e=>{const t=ir(e);t===Ne||t===$e||t===Oe?mr.handleVideoH265Nalu(e):sr(t)&&i.push(e)})),1===i.length)mr.handleVideoH265Nalu(i[0]);else if(or(i)){const e=ir(i[0]),t=ar(e);mr.handleVideoH265NaluList(i,t,e)}else i.forEach((e=>{this.handleVideoH265Nalu(e)}))}else ir(e)===Ne?mr.extractH265PPS(e):mr.handleVideoH265Nalu(e)},extractH264PPS(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{Gt(Nt(e))?mr.extractH264SEI(e):mr.handleVideoH264Nalu(e)}))},extractH265PPS(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{nr(ir(e))?mr.extractH265SEI(e):mr.handleVideoH265Nalu(e)}))},extractH264SEI(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{mr.handleVideoH264Nalu(e)}))},extractH265SEI(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{mr.handleVideoH265Nalu(e)}))},handleAddNaluStartCode(e){const t=[0,0,0,1],r=new Uint8Array(e.length+t.length);return r.set(t),r.set(e,t.length),r},handleVideoH264Nalu(e){const t=Nt(e);switch(t){case Ie:mr.sps=e;break;case De:mr.pps=e}if(mr.isSendSeqHeader){if(mr.sps&&mr.pps){const e=Mt({sps:mr.sps,pps:mr.pps}),t=mr.getNaluDts();yr.decode(e,{type:ee,ts:t,isIFrame:!0,cts:0}),mr.sps=null,mr.pps=null}if(Ht(t)){const r=Vt(t),i=mr.getNaluDts(),n=Ot(e,r);mr.doDecode(n,{type:ee,ts:i,isIFrame:r,cts:0})}else yr.debug.warn("work",`handleVideoH264Nalu Avc Seq Head is ${t}`)}else if(mr.sps&&mr.pps){mr.isSendSeqHeader=!0;const e=Mt({sps:mr.sps,pps:mr.pps});yr.decode(e,{type:ee,ts:0,isIFrame:!0,cts:0}),mr.sps=null,mr.pps=null}},handleVideoH264NaluList(e,t,r){if(mr.isSendSeqHeader){const i=mr.getNaluDts(),n=$t(e.reduce(((e,t)=>{const r=Xt(e),i=Xt(t),n=new Uint8Array(r.byteLength+i.byteLength);return n.set(r,0),n.set(i,r.byteLength),n})),t);mr.doDecode(n,{type:ee,ts:i,isIFrame:t,cts:0}),yr.debug.log("worker",`handleVideoH264NaluList list size is ${e.length} package length is ${n.byteLength} isIFrame is ${t},nalu type is ${r}, dts is ${i}`)}else yr.debug.warn("worker","handleVideoH264NaluList isSendSeqHeader is false")},handleVideoH265Nalu(e){const t=ir(e);switch(t){case Oe:mr.vps=e;break;case $e:mr.sps=e;break;case Ne:mr.pps=e}if(mr.isSendSeqHeader){if(mr.vps&&mr.sps&&mr.pps){const e=er({vps:mr.vps,sps:mr.sps,pps:mr.pps}),t=mr.getNaluDts();yr.decode(e,{type:ee,ts:t,isIFrame:!0,cts:0}),mr.vps=null,mr.sps=null,mr.pps=null}if(sr(t)){const r=ar(t),i=mr.getNaluDts(),n=tr(e,r);mr.doDecode(n,{type:ee,ts:i,isIFrame:r,cts:0})}else yr.debug.warn("work",`handleVideoH265Nalu HevcSeqHead is ${t}`)}else if(mr.vps&&mr.sps&&mr.pps){mr.isSendSeqHeader=!0;const e=er({vps:mr.vps,sps:mr.sps,pps:mr.pps});yr.decode(e,{type:ee,ts:0,isIFrame:!0,cts:0}),mr.vps=null,mr.sps=null,mr.pps=null}},handleVideoH265NaluList(e,t,r){if(mr.isSendSeqHeader){const i=mr.getNaluDts(),n=rr(e.reduce(((e,t)=>{const r=Xt(e),i=Xt(t),n=new Uint8Array(r.byteLength+i.byteLength);return n.set(r,0),n.set(i,r.byteLength),n})),t);mr.doDecode(n,{type:ee,ts:i,isIFrame:t,cts:0}),yr.debug.log("worker",`handleVideoH265NaluList list size is ${e.length} package length is ${n.byteLength} isIFrame is ${t},nalu type is ${r}, dts is ${i}`)}else yr.debug.warn("worker","handleVideoH265NaluList isSendSeqHeader is false")},doDecode(e,t){yr.calcNetworkDelay(t.ts),t.isIFrame&&yr.calcIframeIntervalTimestamp(t.ts),postMessage({cmd:z,type:_e,value:e.byteLength}),postMessage({cmd:z,type:ge,value:t.ts}),yr.decode(e,t)}},_r={LOG_NAME:"worker fmp4Demuxer",mp4Box:Vr.createFile(),offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){_r.mp4Box.onReady=_r.onReady,_r.mp4Box.onError=_r.onError,_r.mp4Box.onSamples=_r.onSamples},initTransportDescarmber(){_r.transportDescarmber=new Yr},_getSeqHeader(e){const t=_r.mp4Box.getTrackById(e.id);for(const e of t.mdia.minf.stbl.stsd.entries)if(e.avcC||e.hvcC){const t=new Vr.DataStream(void 0,0,Vr.DataStream.BIG_ENDIAN);let r=[];e.avcC?(e.avcC.write(t),r=[23,0,0,0,0]):(_r.isHevc=!0,dr=!0,e.hvcC.write(t),r=[28,0,0,0,0]);const i=new Uint8Array(t.buffer,8),n=new Uint8Array(r.length+i.length);return n.set(r,0),n.set(i,r.length),n}return null},onReady(e){yr.debug.log(_r.LOG_NAME,"onReady()",e);const t=e.videoTracks[0],r=e.audioTracks[0];if(t){_r.videoTrackId=t.id;const e=_r._getSeqHeader(t);e&&(yr.debug.log(_r.LOG_NAME,"seqHeader"),yr.decodeVideo(e,0,!0,0)),_r.mp4Box.setExtractionOptions(t.id)}if(r&&yr._opt.hasAudio){_r.audioTrackId=r.id;const e=r.audio||{},t=ut.indexOf(e.sample_rate),i=r.codec.replace("mp4a.40.","");_r.mp4Box.setExtractionOptions(r.id);const n=ot({profile:parseInt(i,10),sampleRate:t,channel:e.channel_count});yr.debug.log(_r.LOG_NAME,"aacADTSHeader"),yr.decodeAudio(n,0)}_r.mp4Box.start()},onError(e){yr.debug.error(_r.LOG_NAME,"mp4Box onError",e)},onSamples(e,t,r){if(e===_r.videoTrackId)for(const e of r){const t=e.data,r=e.is_sync,i=1e3*e.cts/e.timescale;e.duration,e.timescale,r&&yr.calcIframeIntervalTimestamp(i);let n=null;n=_r.isHevc?rr(t,r):$t(t,r),postMessage({cmd:z,type:_e,value:n.byteLength}),postMessage({cmd:z,type:ge,value:i}),yr.decode(n,{type:ee,ts:i,isIFrame:r,cts:0})}else if(e===_r.audioTrackId){if(yr._opt.hasAudio)for(const e of r){const t=e.data,r=1e3*e.cts/e.timescale;e.duration,e.timescale;const i=new Uint8Array(t.byteLength+2);i.set([175,1],0),i.set(t,2),postMessage({cmd:z,type:me,value:i.byteLength}),yr.decode(i,{type:Q,ts:r,isIFrame:!1,cts:0})}}else yr.debug.warn(_r.LOG_NAME,"onSamples() trackId error",e)},dispatch(e){let t=e;"string"!=typeof e?"object"==typeof e?(_r.transportDescarmber&&(t=_r.transportDescarmber.transport(t)),t.buffer.fileStart=_r.offset,_r.offset+=t.byteLength,_r.mp4Box.appendBuffer(t.buffer)):yr.debug.warn(_r.LOG_NAME,"dispatch()","data is not object",e):yr.debug.warn(_r.LOG_NAME,"dispatch()","data is string",e)},destroy(){_r.mp4Box&&(_r.mp4Box.flush(),_r.mp4Box=null),_r.transportDescarmber&&(_r.transportDescarmber.destroy(),_r.transportDescarmber=null),_r.offset=0,_r.videoTrackId=null,_r.audioTrackId=null,_r.isHevc=!1}},gr={LOG_NAME:"worker mpeg4Demuxer",lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:"init",hasInitVideoCodec:!1,localDts:0,dispatch(e){const t=new Uint8Array(e);gr.extractNALu(t)},destroy(){gr.lastBuffer=new Uint8Array(0),gr.parsedOffset=0,gr.firstStartCodeOffset=0,gr.secondStartCodeOffset=0,gr.state="init",gr.hasInitVideoCodec=!1,gr.localDts=0},extractNALu(e){if(!e||e.byteLength<1)return void yr.debug.warn(gr.LOG_NAME,"extractNALu() buffer error",e);const t=new Uint8Array(gr.lastBuffer.length+e.length);for(t.set(gr.lastBuffer,0),t.set(new Uint8Array(e),gr.lastBuffer.length),gr.lastBuffer=t;;){if("init"===gr.state){let e=!1;for(;gr.lastBuffer.length-gr.parsedOffset>=4;)if(0===gr.lastBuffer[gr.parsedOffset])if(0===gr.lastBuffer[gr.parsedOffset+1])if(1===gr.lastBuffer[gr.parsedOffset+2]){if(182===gr.lastBuffer[gr.parsedOffset+3]){gr.state="findFirstStartCode",gr.firstStartCodeOffset=gr.parsedOffset,gr.parsedOffset+=4,e=!0;break}gr.parsedOffset++}else gr.parsedOffset++;else gr.parsedOffset++;else gr.parsedOffset++;if(e)continue;break}if("findFirstStartCode"===gr.state){let e=!1;for(;gr.lastBuffer.length-gr.parsedOffset>=4;)if(0===gr.lastBuffer[gr.parsedOffset])if(0===gr.lastBuffer[gr.parsedOffset+1])if(1===gr.lastBuffer[gr.parsedOffset+2]){if(182===gr.lastBuffer[gr.parsedOffset+3]){gr.state="findSecondStartCode",gr.secondStartCodeOffset=gr.parsedOffset,gr.parsedOffset+=4,e=!0;break}gr.parsedOffset++}else gr.parsedOffset++;else gr.parsedOffset++;else gr.parsedOffset++;if(e)continue;break}if("findSecondStartCode"===gr.state){if(!(gr.lastBuffer.length-gr.parsedOffset>0))break;{let e,t,r=192&gr.lastBuffer[gr.parsedOffset];e=0==r?gr.secondStartCodeOffset-14:gr.secondStartCodeOffset;let i=0==(192&gr.lastBuffer[gr.firstStartCodeOffset+4]);if(i){if(gr.firstStartCodeOffset-14<0)return void yr.debug.warn(gr.LOG_NAME,"firstStartCodeOffset -14 is",gr.firstStartCodeOffset-14);gr.hasInitVideoCodec||(gr.hasInitVideoCodec=!0,yr.debug.log(gr.LOG_NAME,"setCodec"),br.setCodec(Ae,"")),t=gr.lastBuffer.subarray(gr.firstStartCodeOffset-14,e)}else t=gr.lastBuffer.subarray(gr.firstStartCodeOffset,e);let n=gr.getNaluDts();gr.hasInitVideoCodec?(postMessage({cmd:z,type:_e,value:t.byteLength}),postMessage({cmd:z,type:ge,value:n}),br.decode(t,i?1:0,n)):yr.debug.warn(gr.LOG_NAME,"has not init video codec"),gr.lastBuffer=gr.lastBuffer.subarray(e),gr.firstStartCodeOffset=0==r?14:0,gr.parsedOffset=gr.firstStartCodeOffset+4,gr.state="findFirstStartCode"}}}},getNaluDts(){let e=gr.localDts;return gr.localDts=gr.localDts+40,e}},yr={isPlayer:!0,isPlayback:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:Je,_opt:fr(),mp3Demuxer:null,startStreamRateAndStatsInterval:function(){yr.stopStreamRateAndStatsInterval(),d=setInterval((()=>{l&&l(0);const e=JSON.stringify({demuxBufferDelay:yr.getVideoBufferLength(),audioDemuxBufferDelay:yr.getAudioBufferLength(),flvBufferByteLength:yr.getFlvBufferLength(),netBuf:yr.networkDelay||0,pushLatestDelay:yr.pushLatestDelay||0,isStreamTsMoreThanLocal:Ke});postMessage({cmd:z,type:ve,value:e})}),1e3)},stopStreamRateAndStatsInterval:function(){d&&(clearInterval(d),d=null)},useOffscreen:function(){return yr._opt.useOffscreen&&"undefined"!=typeof OffscreenCanvas},getDelay:function(e,t){if(!e||yr._opt.hasVideo&&!Ye)return-1;if(t===Q)return yr.delay;if(yr.preDelayTimestamp&&yr.preDelayTimestamp>e)return yr.preDelayTimestamp-e>1e3&&yr.debug.warn("worker",`getDelay() and preDelayTimestamp is ${yr.preDelayTimestamp} > timestamp is ${e} more than ${yr.preDelayTimestamp-e}ms and return ${yr.delay}`),yr.preDelayTimestamp=e,yr.delay;if(yr.firstTimestamp){if(e){const t=Date.now()-yr.startTimestamp,r=e-yr.firstTimestamp;t>=r?(Ke=!1,yr.delay=t-r):(Ke=!0,yr.delay=r-t)}}else yr.firstTimestamp=e,yr.startTimestamp=Date.now(),yr.delay=-1;return yr.preDelayTimestamp=e,yr.delay},getDelayNotUpdateDelay:function(e,t){if(!e||yr._opt.hasVideo&&!Ye)return-1;if(t===Q)return yr.pushLatestDelay;if(yr.preDelayTimestamp&&yr.preDelayTimestamp-e>1e3)return yr.debug.warn("worker",`getDelayNotUpdateDelay() and preDelayTimestamp is ${yr.preDelayTimestamp} > timestamp is ${e} more than ${yr.preDelayTimestamp-e}ms and return -1`),-1;if(yr.firstTimestamp){let t=-1;if(e){const r=Date.now()-yr.startTimestamp,i=e-yr.firstTimestamp;r>=i?(Ke=!1,t=r-i):(Ke=!0,t=i-r)}return t}return-1},resetDelay:function(){yr.firstTimestamp=null,yr.startTimestamp=null,yr.delay=-1,yr.dropping=!1},resetAllDelay:function(){yr.resetDelay(),yr.preDelayTimestamp=null},doDecode:function(e){yr._opt.isEmitSEI&&e.type===ee&&yr.isWorkerFetch&&yr.findSei(e.payload,e.ts),yr._opt.useWCS&&yr.useOffscreen()&&e.type===ee&&s.decode?s.decode(e.payload,e.ts,e.cts):e.decoder.decode(e.payload,e.ts,e.isIFrame,e.cts)},decodeNext(e){if(0===i.length)return;const t=e.ts,n=i[0],s=e.type===ee&&xt(e.payload);if(Ct(r))s&&(yr.debug.log("worker",`decode data type is ${e.type} and\n ts is ${t} next data type is ${n.type} ts is ${n.ts}\n isVideoSqeHeader is ${s}`),i.shift(),yr.doDecode(n));else{const r=n.ts-t,a=n.type===Q&&e.type===ee;(r<=20||a||s)&&(yr.debug.log("worker",`decode data type is ${e.type} and\n ts is ${t} next data type is ${n.type} ts is ${n.ts}\n diff is ${r} and isVideoAndNextAudio is ${a} and isVideoSqeHeader is ${s}`),i.shift(),yr.doDecode(n))}},init:function(){yr.debug.log("worker","init and opt is",JSON.stringify(yr._opt));const e=yr._opt.playType===_,t=yr._opt.playType===g;if(mr.init(),yr.isPlayer=e,yr.isPlayback=t,yr.isPlaybackCacheBeforeDecodeForFpsRender())yr.debug.log("worker","playback and playbackIsCacheBeforeDecodeForFpsRender is true");else{const t=()=>{let t=null;if(i.length){if(yr.isPushDropping)return void yr.debug.warn("worker",`loop() isPushDropping is true and bufferList length is ${i.length}`);if(yr.dropping){for(t=i.shift(),yr.debug.warn("worker",`loop() dropBuffer is dropping and isIFrame ${t.isIFrame} and delay is ${yr.delay} and bufferlist is ${i.length}`);!t.isIFrame&&i.length;)t=i.shift();const e=yr.getDelayNotUpdateDelay(t.ts,t.type);t.isIFrame&&e<=yr.getNotDroppingDelayTs()&&(yr.debug.log("worker","loop() is dropping = false, is iFrame"),yr.dropping=!1,yr.doDecode(t),yr.decodeNext(t))}else if(yr.isPlayback||yr.isPlayUseMSE())for(;i.length;)t=i.shift(),yr.doDecode(t);else if(t=i[0],-1===yr.getDelay(t.ts,t.type))yr.debug.log("worker","loop() common dumex delay is -1 ,data.ts is",t.ts),i.shift(),yr.doDecode(t),yr.decodeNext(t);else if(yr.delay>yr._opt.videoBuffer+yr._opt.videoBufferDelay&&e)yr.hasIframeInBufferList()?(yr.debug.log("worker",`delay is ${yr.delay}, set dropping is true`),yr.resetAllDelay(),yr.dropping=!0,postMessage({cmd:O})):(i.shift(),yr.doDecode(t),yr.decodeNext(t));else for(;i.length;){if(t=i[0],!(yr.getDelay(t.ts,t.type)>yr._opt.videoBuffer)){yr.delay<0&&yr.debug.warn("worker",`loop() do not decode and delay is ${yr.delay}, bufferList is ${i.length}`);break}i.shift(),yr.doDecode(t)}}else-1!==yr.delay&&yr.debug.log("worker","loop() bufferList is empty and reset delay"),yr.resetAllDelay()};yr.stopId=setInterval((()=>{let e=(new Date).getTime();Xe||(Xe=e);const r=e-Xe;r>100&&yr.debug.warn("worker",`loop demux diff time is ${r}`),t(),Xe=(new Date).getTime()}),20)}Ct(yr._opt.checkFirstIFrame)&&(Ye=!0)},playbackCacheLoop:function(){yr.stopId&&(clearInterval(yr.stopId),yr.stopId=null);const e=()=>{let e=null;i.length&&(e=i.shift(),yr.doDecode(e))};e();const t=Math.ceil(1e3/(yr.streamFps*yr._opt.playbackRate));yr.debug.log("worker",`playbackCacheLoop fragDuration is ${t}, streamFps is ${yr.streamFps}, streamAudioFps is ${yr.streamAudioFps} ,streamVideoFps is ${yr.streamVideoFps} playbackRate is ${yr._opt.playbackRate}`),yr.stopId=setInterval(e,t)},close:function(){if(yr.debug.log("worker","close"),yr.isDestroyed=!0,pr(),!o||1!==o.readyState&&2!==o.readyState?o&&yr.debug.log("worker",`close() and socket.readyState is ${o.readyState}`):(cr=!0,o.close(1e3,"Client disconnecting")),o=null,yr.stopStreamRateAndStatsInterval(),yr.stopId&&(clearInterval(yr.stopId),yr.stopId=null),yr.mp3Demuxer&&(yr.mp3Demuxer.destroy(),yr.mp3Demuxer=null),yr.writableStream&&Ct(yr.writableStream.locked)&&yr.writableStream.close().catch((e=>{yr.debug.log("worker","close() and writableStream.close() error",e)})),yr.writableStream=null,vr)try{vr.clear&&vr.clear(),vr=null}catch(e){yr.debug.warn("worker","close() and audioDecoder.clear error",e)}if(br)try{br.clear&&br.clear(),br=null}catch(e){yr.debug.warn("worker","close() and videoDecoder.clear error",e)}l=null,Xe=null,Ke=!1,s&&(s.reset&&s.reset(),s=null),yr.firstTimestamp=null,yr.startTimestamp=null,yr.networkDelay=0,yr.streamFps=null,yr.streamAudioFps=null,yr.streamVideoFps=null,yr.delay=-1,yr.pushLatestDelay=-1,yr.preDelayTimestamp=null,yr.dropping=!1,yr.isPushDropping=!1,yr.isPlayer=!0,yr.isPlayback=!1,yr.isWorkerFetch=!1,yr._opt=fr(),yr.webglObj&&(yr.webglObj.destroy(),yr.offscreenCanvas.removeEventListener("webglcontextlost",yr.onOffscreenCanvasWebglContextLost),yr.offscreenCanvas.removeEventListener("webglcontextrestored",yr.onOffscreenCanvasWebglContextRestored),yr.offscreenCanvas=null,yr.offscreenCanvasGL=null,yr.offscreenCanvasCtx=null),i=[],n=[],u=null,v=null,b=null,E=!1,Ge=!1,Ye=!1,qt=!1,Qt=!1,lr=!1,dr=null,ur=null,Tt=[],Ft=0,Dt=0,at=null,ft=null,Lt=null,Rt=null,hr=null,jt=0,Yt=0,Bt=null,kt=null,yr.fetchStatus=Je,mr.destroy(),_r.destroy(),gr.destroy(),postMessage({cmd:W})},pushBuffer:function(e,t){if(t.type===Q&<(e)){if(yr.debug.log("worker",`pushBuffer audio ts is ${t.ts}, isAacCodecPacket is true`),yr._opt.isRecordTypeFlv){const t=new Uint8Array(e);postMessage({cmd:K,buffer:t},[t.buffer])}yr.decodeAudio(e,t.ts)}else if(t.type===ee&&t.isIFrame&&xt(e)){if(yr.debug.log("worker",`pushBuffer video ts is ${t.ts}, isVideoSequenceHeader is true`),yr._opt.isRecordTypeFlv){const t=new Uint8Array(e);postMessage({cmd:X,buffer:t},[t.buffer])}yr.decodeVideo(e,t.ts,t.isIFrame,t.cts)}else{if(yr._opt.isRecording)if(yr._opt.isRecordTypeFlv){const r=new Uint8Array(e);postMessage({cmd:Z,type:t.type,buffer:r,ts:t.ts},[r.buffer])}else if(yr._opt.recordType===y)if(t.type===ee){const r=new Uint8Array(e).slice(5);postMessage({cmd:D,buffer:r,isIFrame:t.isIFrame,ts:t.ts,cts:t.cts},[r.buffer])}else if(t.type===Q&&yr._opt.isWasmMp4){const r=new Uint8Array(e),i=dt(r)?r.slice(2):r.slice(1);postMessage({cmd:k,buffer:i,ts:t.ts},[i.buffer])}if(yr.isPlayer&&jt>0&&Rt>0&&t.type===ee){const e=t.ts-Rt,r=jt+jt/2;e>r&&yr.debug.log("worker",`pushBuffer video\n ts is ${t.ts}, preTimestamp is ${Rt},\n diff is ${e} and preTimestampDuration is ${jt} and maxDiff is ${r}\n maybe trigger black screen or flower screen\n `)}if(yr.isPlayer&&Rt>0&&t.type===ee&&t.tsw&&(yr.debug.warn("worker",`pushBuffer,\n preTimestamp is ${Rt}, options.ts is ${t.ts},\n diff is ${Rt-t.ts} more than 3600000,\n and resetAllDelay`),yr.resetAllDelay()),yr.isPlayer&&t.ts<=Rt&&Rt>0&&t.type===ee&&(yr.debug.warn("worker",`pushBuffer,\n options.ts is ${t.ts} less than (or equal) preTimestamp is ${Rt} and\n payloadBufferSize is ${e.byteLength} and prevPayloadBufferSize is ${Yt}`),yr._opt.isDropSameTimestampGop&&Ye)){const e=yr.hasIframeInBufferList(),t=Ct(yr.isPushDropping);return yr.debug.log("worker",`pushBuffer, isDropSameTimestampGop is true and\n hasIframe is ${e} and isNotPushDropping is ${t} and next dropBuffer`),void(e&&t?yr.dropBuffer$2():(yr.clearBuffer(!0),At(yr._opt.checkFirstIFrame)&&At(r)&&postMessage({cmd:J})))}if(yr.isPlayer&&Ye){const e=yr._opt.videoBuffer+yr._opt.videoBufferDelay,r=yr.getDelayNotUpdateDelay(t.ts,t.type);yr.pushLatestDelay=r,r>e&&yr.delay0&&yr.hasIframeInBufferList()&&!1===yr.isPushDropping&&(yr.debug.log("worker",`pushBuffer(), pushLatestDelay is ${r} more than ${e} and decoder.delay is ${yr.delay} and has iIframe and next decoder.dropBuffer$2()`),yr.dropBuffer$2())}if(yr.isPlayer&&t.type===ee&&(Rt>0&&(jt=t.ts-Rt),Yt=e.byteLength,Rt=t.ts),t.type===Q?i.push({ts:t.ts,payload:e,decoder:{decode:yr.decodeAudio},type:Q,isIFrame:!1}):t.type===ee&&i.push({ts:t.ts,cts:t.cts,payload:e,decoder:{decode:yr.decodeVideo},type:ee,isIFrame:t.isIFrame}),yr.isPlaybackCacheBeforeDecodeForFpsRender()&&(_t(yr.streamVideoFps)||_t(yr.streamAudioFps))){let e=yr.streamVideoFps,t=yr.streamAudioFps;if(_t(yr.streamVideoFps)&&(e=St(i,ee),e&&(yr.streamVideoFps=e,postMessage({cmd:N,value:yr.streamVideoFps}),yr.streamFps=t?e+t:e,Ct(yr._opt.hasAudio)&&(yr.debug.log("worker","playbackCacheBeforeDecodeForFpsRender, _opt.hasAudio is false and set streamAudioFps is 0"),yr.streamAudioFps=0),yr.playbackCacheLoop())),_t(yr.streamAudioFps)&&(t=St(i,Q),t&&(yr.streamAudioFps=t,yr.streamFps=e?e+t:t,yr.playbackCacheLoop())),_t(yr.streamVideoFps)&&_t(yr.streamAudioFps)){const r=i.map((e=>({type:e.type,ts:e.ts})));yr.debug.log("worker",`playbackCacheBeforeDecodeForFpsRender, calc streamAudioFps is ${t}, streamVideoFps is ${e}, bufferListLength is ${i.length}, and ts list is ${JSON.stringify(r)}`)}const r=yr.getAudioBufferLength()>0,n=r?60:40;i.length>=n&&(yr.debug.warn("worker",`playbackCacheBeforeDecodeForFpsRender, bufferListLength is ${i.length} more than ${n}, and hasAudio is ${r} an set streamFps is 25`),yr.streamVideoFps=25,postMessage({cmd:N,value:yr.streamVideoFps}),r?(yr.streamAudioFps=25,yr.streamFps=yr.streamVideoFps+yr.streamAudioFps):yr.streamFps=yr.streamVideoFps,yr.playbackCacheLoop())}}},getVideoBufferLength(){let e=0;return i.forEach((t=>{t.type===ee&&(e+=1)})),e},hasIframeInBufferList:()=>i.some((e=>e.type===ee&&e.isIFrame)),isAllIframeInBufferList(){const e=yr.getVideoBufferLength();let t=0;return i.forEach((e=>{e.type===ee&&e.isIFrame&&(t+=1)})),e===t},getNotDroppingDelayTs:()=>yr._opt.videoBuffer+yr._opt.videoBufferDelay/2,getAudioBufferLength(){let e=0;return i.forEach((t=>{t.type===Q&&(e+=1)})),e},getFlvBufferLength(){let e=0;return u&&u.buffer&&(e=u.buffer.byteLength),yr._opt.isNakedFlow&&mr.lastBuf&&(e=mr.lastBuf.byteLength),e},fetchStream:function(e,t){yr.debug.log("worker","fetchStream, url is "+e,"options:",JSON.stringify(t)),yr.isWorkerFetch=!0,t.isFlv?yr._opt.isFlv=!0:t.isFmp4?yr._opt.isFmp4=!0:t.isMpeg4?yr._opt.isMpeg4=!0:t.isNakedFlow&&(yr._opt.isNakedFlow=!0),l=pt((e=>{postMessage({cmd:z,type:pe,value:e})})),yr.startStreamRateAndStatsInterval(),t.isFmp4&&(_r.listenMp4Box(),yr._opt.isFmp4Private&&_r.initTransportDescarmber()),t.protocol===f?(u=new Pt(yr.demuxFlv()),fetch(e,{signal:a.signal}).then((e=>{if(At(cr))return yr.debug.log("worker","request abort and run res.body.cancel()"),yr.fetchStatus=Je,void e.body.cancel();if(!Et(e))return yr.debug.warn("worker",`fetch response status is ${e.status} and ok is ${e.ok} and emit error and next abort()`),pr(),void postMessage({cmd:z,type:Se.fetchError,value:`fetch response status is ${e.status} and ok is ${e.ok}`});if(postMessage({cmd:z,type:ye}),bt())yr.writableStream=new WritableStream({write:e=>a&&a.signal&&a.signal.aborted?(yr.debug.log("worker","writableStream write() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et)):At(cr)?(yr.debug.log("worker","writableStream write() and requestAbort is true so return"),void(yr.fetchStatus=et)):(yr.fetchStatus=Qe,l(e.byteLength),void(t.isFlv?u.write(e):t.isFmp4?yr.demuxFmp4(e):t.isMpeg4&&yr.demuxMpeg4(e))),close:()=>{yr.fetchStatus=et,u=null,pr(),postMessage({cmd:z,type:fe,value:p})},abort:e=>{if(a&&a.signal&&a.signal.aborted)return yr.debug.log("worker","writableStream abort() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et);u=null,e.name!==qe&&(pr(),postMessage({cmd:z,type:Se.fetchError,value:e.toString()}))}}),e.body.pipeTo(yr.writableStream);else{const r=e.body.getReader(),i=()=>{r.read().then((e=>{let{done:r,value:n}=e;return r?(yr.fetchStatus=et,u=null,pr(),void postMessage({cmd:z,type:fe,value:p})):a&&a.signal&&a.signal.aborted?(yr.debug.log("worker","fetchNext().then() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et)):At(cr)?(yr.debug.log("worker","fetchNext().then() and requestAbort is true so return"),void(yr.fetchStatus=et)):(yr.fetchStatus=Qe,l(n.byteLength),t.isFlv?u.write(n):t.isFmp4?yr.demuxFmp4(n):t.isMpeg4&&yr.demuxMpeg4(n),void i())})).catch((e=>{if(a&&a.signal&&a.signal.aborted)return yr.debug.log("worker","fetchNext().catch() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et);u=null,e.name!==qe&&(pr(),postMessage({cmd:z,type:Se.fetchError,value:e.toString()}))}))};i()}})).catch((e=>{a&&a.signal&&a.signal.aborted?yr.debug.log("worker","fetch().catch() and abortController.signal.aborted is true so return"):e.name!==qe&&(pr(),postMessage({cmd:z,type:Se.fetchError,value:e.toString()}),u=null)}))):t.protocol===c&&(t.isFlv&&(u=new Pt(yr.demuxFlv())),o=new WebSocket(e),o.binaryType="arraybuffer",o.onopen=()=>{yr.debug.log("worker","fetchStream, WebsocketStream socket open"),postMessage({cmd:z,type:ye}),postMessage({cmd:z,type:we})},o.onclose=e=>{yr.debug.log("worker",`fetchStream, WebsocketStream socket close and code is ${e.code}`),1006===e.code&&yr.debug.error("worker",`fetchStream, WebsocketStream socket close abnormally and code is ${e.code}`),At(cr)?yr.debug.log("worker","fetchStream, WebsocketStream socket close and requestAbort is true so return"):(u=null,postMessage({cmd:z,type:fe,value:m}))},o.onerror=e=>{yr.debug.error("worker","fetchStream, WebsocketStream socket error",e),u=null,postMessage({cmd:z,type:Se.websocketError,value:e.isTrusted?"websocket user aborted":"websocket error"})},o.onmessage=e=>{l(e.data.byteLength),t.isFlv?u.write(e.data):t.isFmp4?yr.demuxFmp4(e.data):t.isMpeg4?yr.demuxMpeg4(e.data):yr._opt.isNakedFlow?yr.demuxNakedFlow(e.data):yr.demuxM7s(e.data)})},demuxFlv:function*(){yield 9;const e=new ArrayBuffer(4),t=new Uint8Array(e),r=new Uint32Array(e);for(;;){t[3]=0;const e=yield 15,i=e[4];t[0]=e[7],t[1]=e[6],t[2]=e[5];const n=r[0];t[0]=e[10],t[1]=e[9],t[2]=e[8],t[3]=e[11];let s=r[0];const a=(yield n).slice();switch(i){case te:if(a.byteLength>0){let e=a;At(yr._opt.m7sCryptoAudio)&&(e=yr.cryptoPayloadAudio(a)),yr.decode(e,{type:Q,ts:s})}else yr.debug.warn("worker",`demuxFlv() type is audio and payload.byteLength is ${a.byteLength} and return`);break;case re:if(a.byteLength>=6){const e=a[0];if(yr._isEnhancedH265Header(e))yr._decodeEnhancedH265Video(a,s);else{a[0];const e=a[0]>>4===Ze;if(e&&xt(a)&&null===dr){const e=15&a[0];dr=e===xe,ur=Zt(a,dr),yr.debug.log("worker",`demuxFlv() isVideoSequenceHeader is true and isHevc is ${dr} and nalUnitSize is ${ur}`)}e&&yr.calcIframeIntervalTimestamp(s),yr.isPlayer&&yr.calcNetworkDelay(s),r[0]=a[4],r[1]=a[3],r[2]=a[2],r[3]=0;let t=r[0],i=yr.cryptoPayload(a,e);yr.decode(i,{type:ee,ts:s,isIFrame:e,cts:t})}}else yr.debug.warn("worker",`demuxFlv() type is video and payload.byteLength is ${a.byteLength} and return`);break;case ie:postMessage({cmd:q,buffer:a},[a.buffer]);break;default:yr.debug.log("worker",`demuxFlv() type is ${i}`)}}},decode:function(e,t){t.type===Q?yr._opt.hasAudio&&(postMessage({cmd:z,type:me,value:e.byteLength}),yr.isPlayer?yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts}):yr.isPlayback&&(yr.isPlaybackCacheBeforeDecodeForFpsRender(),yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts}))):t.type===ee&&yr._opt.hasVideo&&(postMessage({cmd:z,type:_e,value:e.byteLength}),postMessage({cmd:z,type:ge,value:t.ts}),yr.isPlayer?yr.pushBuffer(e,{type:t.type,ts:t.ts,isIFrame:t.isIFrame,cts:t.cts}):yr.isPlayback&&(yr.isPlaybackOnlyDecodeIFrame()?t.isIFrame&&yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts,isIFrame:t.isIFrame}):(yr.isPlaybackCacheBeforeDecodeForFpsRender(),yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts,isIFrame:t.isIFrame}))))},cryptoPayload:function(e,t){let r=e;return yr._opt.isM7sCrypto?yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?r=Gr(e,yr._opt.cryptoKey,yr._opt.cryptoIV,dr):yr.debug.error("worker",`isM7sCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`):yr._opt.isSm4Crypto?yr._opt.sm4CryptoKey&&t?r=di(e,yr._opt.sm4CryptoKey):yr._opt.sm4CryptoKey||yr.debug.error("worker","isSm4Crypto opt.sm4CryptoKey is null"):yr._opt.isXorCrypto&&(yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?r=pi(e,yr._opt.cryptoKey,yr._opt.cryptoIV,dr):yr.debug.error("worker",`isXorCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`)),r},cryptoPayloadAudio:function(e){let t=e;return yr._opt.isM7sCrypto&&(yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?e[0]>>4===Be&&(t=Hr(e,yr._opt.cryptoKey,yr._opt.cryptoIV)):yr.debug.error("worker",`isM7sCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`)),t},setCodecAudio:function(e,t){const r=e[0]>>4,i=e[0]>>1&1;if(hr=r===Be?i?16:8:0===i?8:16,vr&&vr.setCodec)if(lt(e)||r===ke||r===Fe||r===Pe){yr.debug.log("worker",`setCodecAudio: init audio codec, codeId is ${r}`);const i=r===Be?e.slice(2):new Uint8Array(0);vr.setCodec(r,yr._opt.sampleRate,i),postMessage({cmd:F,buffer:i},[i.buffer]),Ge=!0,r!==Be&&(r===Pe?(yr.mp3Demuxer||(yr.mp3Demuxer=new hi(yr),yr.mp3Demuxer.on("data",((e,t)=>{vr.decode(e,t)}))),yr.mp3Demuxer.dispatch(e.slice(1),t)):vr.decode(e.slice(1),t));{const e=Number("1")||1;setTimeout((()=>{yr.debug.error("worker","jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),yr.close(),postMessage({cmd:$})}),60*e*60*1e3)}}else yr.debug.warn("worker","setCodecAudio: hasInitAudioCodec is false, codecId is ",r);else yr.debug.error("worker","setCodecAudio: audioDecoder or audioDecoder.setCodec is null")},decodeAudio:function(e,t){if(yr.isDestroyed)yr.debug.log("worker","decodeAudio, decoder is destroyed and return");else if(At(r)&&At(yr._opt.mseDecodeAudio))postMessage({cmd:R,payload:e,ts:t,cts:t},[e.buffer]);else{const r=e[0]>>4;Ge?r===Pe?yr.mp3Demuxer.dispatch(e.slice(1),t):vr.decode(r===Be?e.slice(2):e.slice(1),t):yr.setCodecAudio(e,t)}},setCodecVideo:function(e){const t=15&e[0];if(br&&br.setCodec)if(xt(e))if(t===Ue||t===xe){yr.debug.log("worker",`setCodecVideo: init video codec , codecId is ${t}`);const r=e.slice(5);if(t===Ue&&yr._opt.useSIMD){const e=zt(r);if(e.codecWidth>S||e.codecHeight>S)return postMessage({cmd:V}),void yr.debug.warn("worker",`setCodecVideo: SIMD H264 decode video width is too large, width is ${e.codecWidth}, height is ${e.codecHeight}`)}E=!0,br.setCodec(t,r),yr._opt.recordType===y&&postMessage({cmd:I,buffer:e,codecId:t},[e.buffer])}else yr.debug.warn("worker",`setCodecVideo: hasInitVideoCodec is false, codecId is ${t} is not H264 or H265`);else yr.debug.warn("worker",`decodeVideo: hasInitVideoCodec is false, codecId is ${t} and frameType is ${e[0]>>4} and packetType is ${e[1]}`);else yr.debug.error("worker","setCodecVideo: videoDecoder or videoDecoder.setCodec is null")},decodeVideo:function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(yr.isDestroyed)yr.debug.log("worker","decodeVideo, decoder is destroyed and return");else if(At(r))postMessage({cmd:L,payload:e,isIFrame:i,ts:t,cts:n,delay:yr.delay},[e.buffer]);else if(E)if(!Ye&&i&&(Ye=!0),Ye){if(i&&xt(e)){const t=15&e[0];let r={};t===Ue?r=zt(e.slice(5)):t===xe&&(r=Jt(e)),r.codecWidth&&r.codecHeight&&v&&b&&(r.codecWidth!==v||r.codecHeight!==b)&&(yr.debug.warn("worker",`\n decodeVideo: video width or height is changed,\n old width is ${v}, old height is ${b},\n new width is ${r.codecWidth}, new height is ${r.codecHeight},\n and emit change event`),Qt=!0,postMessage({cmd:G}))}if(Qt)return void yr.debug.warn("worker","decodeVideo: video width or height is changed, and return");if(lr)return void yr.debug.warn("worker","decodeVideo: simd decode error, and return");if(xt(e))return void yr.debug.warn("worker","decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void yr.debug.warn("worker",`decodeVideo and payload is too small , payload length is ${e.byteLength}`);const r=e.slice(5);br.decode(r,i?1:0,t)}else yr.debug.log("worker","decodeVideo first frame is not iFrame");else yr.setCodecVideo(e)},clearBuffer:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];yr.debug.log("worker",`clearBuffer,bufferList length is ${i.length}, need clear is ${e}`),e&&(i=[]),yr.isPlayer&&(yr.resetAllDelay(),At(yr._opt.checkFirstIFrame)&&(yr.dropping=!0,postMessage({cmd:O}))),At(yr._opt.checkFirstIFrame)&&Ct(r)&&(Ye=!1)},dropBuffer$2:function(){if(i.length>0){let e=i.findIndex((e=>At(e.isIFrame)&&e.type===ee));if(yr.isAllIframeInBufferList())for(let t=0;t=yr.getNotDroppingDelayTs()){yr.debug.log("worker",`dropBuffer$2() isAllIframeInBufferList() is true, and index is ${t} and tempDelay is ${n} and notDroppingDelayTs is ${yr.getNotDroppingDelayTs()}`),e=t;break}}if(e>=0){yr.isPushDropping=!0,postMessage({cmd:O});const t=i.length;i=i.slice(e);const r=i.shift();yr.resetAllDelay(),yr.getDelay(r.ts,r.type),yr.doDecode(r),yr.isPushDropping=!1,yr.debug.log("worker",`dropBuffer$2() iFrameIndex is ${e},and old bufferList length is ${t} ,new bufferList is ${i.length} and new delay is ${yr.delay} `)}else yr.isPushDropping=!1}0===i.length&&(yr.isPushDropping=!1)},demuxM7s:function(e){const t=new DataView(e),r=t.getUint32(1,!1),i=t.getUint8(0),n=new ArrayBuffer(4),s=new Uint32Array(n);switch(i){case Q:yr.decode(new Uint8Array(e,5),{type:Q,ts:r});break;case ee:if(t.byteLength>=11){const i=new Uint8Array(e,5),n=i[0];if(yr._isEnhancedH265Header(n))yr._decodeEnhancedH265Video(i,r);else{const e=t.getUint8(5)>>4==1;if(e&&(yr.calcIframeIntervalTimestamp(r),xt(i)&&null===dr)){const e=15&i[0];dr=e===xe}yr.isPlayer&&yr.calcNetworkDelay(r),s[0]=i[4],s[1]=i[3],s[2]=i[2],s[3]=0;let n=s[0],a=yr.cryptoPayload(i,e);yr.decode(a,{type:ee,ts:r,isIFrame:e,cts:n})}}else yr.debug.warn("worker",`demuxM7s() type is video and arrayBuffer length is ${e.byteLength} and return`)}},demuxNakedFlow:function(e){mr.dispatch(e)},demuxFmp4:function(e){const t=new Uint8Array(e);_r.dispatch(t)},demuxMpeg4:function(e){gr.dispatch(e)},_decodeEnhancedH265Video:function(e,t){const r=e[0],i=48&r,n=15&r,s=e.slice(1,5),a=new ArrayBuffer(4),o=new Uint32Array(a),l="a"==String.fromCharCode(s[0]);if(dr=Ct(l),n===rt){if(i===st){const r=e.slice(5);if(l);else{const i=new Uint8Array(5+r.length);i.set([28,0,0,0,0],0),i.set(r,5),ur=Zt(e,dr),yr.debug.log("worker",`demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is ${dr} and nalUnitSize is ${ur}`),yr.decode(i,{type:ee,ts:t,isIFrame:!0,cts:0})}}}else if(n===it){let r=e,n=0;const s=i===st;s&&yr.calcIframeIntervalTimestamp(t),l||(o[0]=e[4],o[1]=e[3],o[2]=e[2],o[3]=0,n=o[0],r=rr(e.slice(8),s),r=yr.cryptoPayload(r,s),yr.decode(r,{type:ee,ts:t,isIFrame:s,cts:n}))}else if(n===nt){const r=i===st;r&&yr.calcIframeIntervalTimestamp(t);let n=rr(e.slice(5),r);n=yr.cryptoPayload(n,r),yr.decode(n,{type:ee,ts:t,isIFrame:r,cts:0})}},_isEnhancedH265Header:function(e){return(e&tt)===tt},findSei:function(e,t){let r=4;gt(ur)&&(r=ur),Kt(e.slice(5),r).forEach((e=>{const r=dr?e[0]>>>1&63:31&e[0];(dr&&(r===Ve||r===He)||Ct(dr)&&r===Re)&&postMessage({cmd:Y,buffer:e,ts:t},[e.buffer])}))},flvHasUnitTypeIDR(e,t){const r=Kt(e.slice(5));let i=!1;return r.forEach((e=>{const r=t?e[0]>>>1&63:31&e[0];(t&&(r===ze||r===Me)||Ct(t)&&r===Le)&&(i=!0)})),i},calcNetworkDelay:function(e){if(!(Ye&&e>0))return;null===at?(at=e,ft=ht()):et?r-t:0;yr.networkDelay=i,i>yr._opt.networkDelay&&yr._opt.playType===_&&(yr.debug.warn("worker",`calcNetworkDelay now dts:${e}, start dts is ${at} vs start is ${t},local diff is ${r} ,delay is ${i}`),postMessage({cmd:z,type:be,value:i}))},calcIframeIntervalTimestamp:function(e){null===Lt?Lt=e:Lt=yr._opt.playbackForwardMaxRateDecodeIFrame},isPlayUseMSE:function(){return yr.isPlayer&&yr._opt.useMSE&&At(r)},playbackUpdatePlaybackRate:function(){yr.clearBuffer(!0)},onOffscreenCanvasWebglContextLost:function(e){yr.debug.error("worker","handleOffscreenCanvasWebglContextLost and next try to create webgl"),e.preventDefault(),qt=!0,yr.webglObj.destroy(),yr.webglObj=null,yr.offscreenCanvasGL=null,setTimeout((()=>{yr.offscreenCanvasGL=yr.offscreenCanvas.getContext("webgl"),yr.offscreenCanvasGL&&yr.offscreenCanvasGL.getContextAttributes().stencil?(yr.webglObj=h(yr.offscreenCanvasGL,yr._opt.openWebglAlignment),qt=!1):yr.debug.error("worker","handleOffscreenCanvasWebglContextLost, stencil is false")}),500)},onOffscreenCanvasWebglContextRestored:function(e){yr.debug.log("worker","handleOffscreenCanvasWebglContextRestored"),e.preventDefault()},videoInfo:function(e,t,r){postMessage({cmd:P,code:e}),postMessage({cmd:x,w:t,h:r}),v=t,b=r,yr.useOffscreen()&&(yr.offscreenCanvas=new OffscreenCanvas(t,r),yr.offscreenCanvasGL=yr.offscreenCanvas.getContext("webgl"),yr.webglObj=h(yr.offscreenCanvasGL,yr._opt.openWebglAlignment),yr.offscreenCanvas.addEventListener("webglcontextlost",yr.onOffscreenCanvasWebglContextLost,!1),yr.offscreenCanvas.addEventListener("webglcontextrestored",yr.onOffscreenCanvasWebglContextRestored,!1))},audioInfo:function(e,t,r){postMessage({cmd:B,code:e}),postMessage({cmd:T,sampleRate:t,channels:r,depth:hr}),Dt=r},yuvData:function(t,r){if(yr.isDestroyed)return void yr.debug.log("worker","yuvData, decoder is destroyed and return");const i=v*b*3/2;let n=e.HEAPU8.subarray(t,t+i),s=new Uint8Array(n);if(Bt=null,yr.useOffscreen())try{if(qt)return;yr.webglObj.renderYUV(v,b,s);let e=yr.offscreenCanvas.transferToImageBitmap();postMessage({cmd:A,buffer:e,delay:yr.delay,ts:r},[e])}catch(e){yr.debug.error("worker","yuvData, transferToImageBitmap error is",e)}else postMessage({cmd:A,output:s,delay:yr.delay,ts:r},[s.buffer])},pcmData:function(e,r,i){if(yr.isDestroyed)return void yr.debug.log("worker","pcmData, decoder is destroyed and return");let s=r,a=[],o=0,l=yr._opt.audioBufferSize;for(let r=0;r<2;r++){let i=t.HEAPU32[(e>>2)+r]>>2;a[r]=t.HEAPF32.subarray(i,i+s)}if(Ft){if(!(s>=(r=l-Ft)))return Ft+=s,n[0]=Float32Array.of(...n[0],...a[0]),void(2==Dt&&(n[1]=Float32Array.of(...n[1],...a[1])));Tt[0]=Float32Array.of(...n[0],...a[0].subarray(0,r)),2==Dt&&(Tt[1]=Float32Array.of(...n[1],...a[1].subarray(0,r))),postMessage({cmd:C,buffer:Tt,ts:i},Tt.map((e=>e.buffer))),o=r,s-=r}for(Ft=s;Ft>=l;Ft-=l)Tt[0]=a[0].slice(o,o+=l),2==Dt&&(Tt[1]=a[1].slice(o-l,o)),postMessage({cmd:C,buffer:Tt,ts:i},Tt.map((e=>e.buffer)));Ft&&(n[0]=a[0].slice(o),2==Dt&&(n[1]=a[1].slice(o)))},errorInfo:function(e){null===Bt&&(Bt=ht());const t=ht(),r=ct(kt>0?2*kt:5e3,1e3,5e3),i=t-Bt;i>r&&(yr.debug.warn("worker",`errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is ${kt} and diff is ${i} and maxDiff is ${r}\n and replay`),lr=!0,postMessage({cmd:H}))},sendWebsocketMessage:function(e){o?o.readyState===Ee?o.send(e):yr.debug.error("worker","socket is not open"):yr.debug.error("worker","socket is null")},timeEnd:function(){yr.debug.error("worker","jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),yr.close(),postMessage({cmd:$})},postStreamToMain(e,t){postMessage({cmd:j,type:t,buffer:e},[e.buffer])}};yr.debug=new It(yr);let vr=null;t.AudioDecoder&&(vr=new t.AudioDecoder(yr));let br=null;e.VideoDecoder&&(br=new e.VideoDecoder(yr)),postMessage({cmd:U}),self.onmessage=function(e){let t=e.data;switch(t.cmd){case ne:try{yr._opt=Object.assign(yr._opt,JSON.parse(t.opt))}catch(e){}yr.init();break;case se:yr.pushBuffer(t.buffer,t.options);break;case ae:yr.decodeAudio(t.buffer,t.ts);break;case oe:yr.decodeVideo(t.buffer,t.ts,t.isIFrame);break;case ue:yr.clearBuffer(t.needClear);break;case he:yr.fetchStream(t.url,JSON.parse(t.opt));break;case le:yr.close();break;case de:yr.debug.log("worker","updateConfig",t.key,t.value),yr._opt[t.key]=t.value,"playbackRate"===t.key&&(yr.playbackUpdatePlaybackRate(),yr.isPlaybackCacheBeforeDecodeForFpsRender()&&yr.playbackCacheLoop());break;case ce:yr.sendWebsocketMessage(t.message)}}}(e[1],t)}))})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).crypto$1)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r,n=t(e),s=(r="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href,async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,n,i;(i=e).ready=new Promise(((e,r)=>{t=e,n=r})),(i=void 0!==i?i:{}).locateFile=function(e,t){return"decoder-pro-simd.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_SIMD_WASM_URL&&""!=JESSIBUCA_PRO_SIMD_WASM_URL?JESSIBUCA_PRO_SIMD_WASM_URL:t+e};var s,o,a,c=Object.assign({},i),u="object"==typeof window,l="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";function f(e){return i.locateFile?i.locateFile(e,h):h+e}if(d){const{createRequire:e}=await import("module");var p=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href),m=p("fs"),v=p("path");h=l?v.dirname(h)+"/":p("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href)),s=(e,t)=>(e=K(e)?new URL(e):v.normalize(e),m.readFileSync(e,t?void 0:"utf8")),a=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},o=function(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=K(e)?new URL(e):v.normalize(e),m.readFile(e,n?void 0:"utf8",((e,i)=>{e?r(e):t(n?i.buffer:i)}))},!i.thisProgram&&process.argv.length>1&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),i.inspect=()=>"[Emscripten Module object]"}else(u||l)&&(l?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),r&&(h=r),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},l&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var y,g,_=i.print||console.log.bind(console),b=i.printErr||console.error.bind(console);Object.assign(i,c),c=null,i.arguments&&i.arguments,i.thisProgram&&i.thisProgram,i.quit&&i.quit,i.wasmBinary&&(y=i.wasmBinary),"object"!=typeof WebAssembly&&W("no native wasm support detected");var w,S,I,A,E,k,C,T,x=!1;function D(){var e=g.buffer;i.HEAP8=w=new Int8Array(e),i.HEAP16=I=new Int16Array(e),i.HEAPU8=S=new Uint8Array(e),i.HEAPU16=A=new Uint16Array(e),i.HEAP32=E=new Int32Array(e),i.HEAPU32=k=new Uint32Array(e),i.HEAPF32=C=new Float32Array(e),i.HEAPF64=T=new Float64Array(e)}var B=[],P=[],M=[];function U(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)L(i.preRun.shift());ee(B)}function F(){ee(P)}function R(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)z(i.postRun.shift());ee(M)}function L(e){B.unshift(e)}function O(e){P.unshift(e)}function z(e){M.unshift(e)}var N=0,H=null;function j(e){N++,i.monitorRunDependencies&&i.monitorRunDependencies(N)}function V(e){if(N--,i.monitorRunDependencies&&i.monitorRunDependencies(N),0==N&&H){var t=H;H=null,t()}}function W(e){i.onAbort&&i.onAbort(e),b(e="Aborted("+e+")"),x=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var $,G="data:application/octet-stream;base64,",q=e=>e.startsWith(G),K=e=>e.startsWith("file://");function J(e){if(e==$&&y)return new Uint8Array(y);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function X(e){if(!y&&(u||l)){if("function"==typeof fetch&&!K(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>J(e)));if(o)return new Promise(((t,r)=>{o(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>J(e)))}function Y(e,t,r){return X(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{b(`failed to asynchronously prepare wasm: ${e}`),W(e)}))}function Z(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||q(t)||K(t)||d||"function"!=typeof fetch?Y(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return b(`wasm streaming compile failed: ${e}`),b("falling back to ArrayBuffer instantiation"),Y(t,r,n)}))))}function Q(){var e={a:Ur};function t(e,t){return Fr=e.exports,g=Fr.F,D(),rt=Fr.J,O(Fr.G),V(),Fr}if(j(),i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){b(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return Z(y,$,e,(function(e){t(e.instance)})).catch(n),{}}i.locateFile?q($="decoder-pro-simd.wasm")||($=f($)):$=new URL("decoder-pro-simd.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href).href;var ee=e=>{for(;e.length>0;)e.shift()(i)};function te(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){k[this.ptr+4>>2]=e},this.get_type=function(){return k[this.ptr+4>>2]},this.set_destructor=function(e){k[this.ptr+8>>2]=e},this.get_destructor=function(){return k[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,w[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=w[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,w[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=w[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){k[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return k[this.ptr+16>>2]},this.get_exception_ptr=function(){if(zr(this.get_type()))return k[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var re,ne,ie,se=(e,t,r)=>{throw new te(e).init(t,r),e},oe=(e,t,r,n,i)=>{},ae=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);re=e},ce=e=>{for(var t="",r=e;S[r];)t+=re[S[r++]];return t},ue={},le={},de={},he=e=>{throw new ne(e)},fe=e=>{throw new ie(e)},pe=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&fe("Mismatched type converter count");for(var i=0;i{le.hasOwnProperty(e)?i[t]=le[e]:(s.push(e),ue.hasOwnProperty(e)||(ue[e]=[]),ue[e].push((()=>{i[t]=le[e],++o===s.length&&n(i)})))})),0===s.length&&n(i)};function me(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=t.name;if(e||he(`type "${n}" must have a positive integer typeid pointer`),le.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;he(`Cannot register type '${n}' twice`)}if(le[e]=t,delete de[e],ue.hasOwnProperty(e)){var i=ue[e];delete ue[e],i.forEach((e=>e()))}}function ve(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return me(e,t,r)}var ye,ge=8,_e=(e,t,r,n)=>{ve(e,{name:t=ce(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:ge,readValueFromPointer:function(e){return this.fromWireType(S[e])},destructorFunction:null})},be=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),we=e=>{he(e.$$.ptrType.registeredClass.name+" instance already deleted")},Se=!1,Ie=e=>{},Ae=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Ee=e=>{e.count.value-=1,0===e.count.value&&Ae(e)},ke=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=ke(e,t,r.baseClass);return null===n?null:r.downcast(n)},Ce={},Te=()=>Object.keys(Ue).length,xe=()=>{var e=[];for(var t in Ue)Ue.hasOwnProperty(t)&&e.push(Ue[t]);return e},De=[],Be=()=>{for(;De.length;){var e=De.pop();e.$$.deleteScheduled=!1,e.delete()}},Pe=e=>{ye=e,De.length&&ye&&ye(Be)},Me=()=>{i.getInheritedInstanceCount=Te,i.getLiveInheritedInstances=xe,i.flushPendingDeletes=Be,i.setDelayFunction=Pe},Ue={},Fe=(e,t)=>{for(void 0===t&&he("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},Re=(e,t)=>(t=Fe(e,t),Ue[t]),Le=(e,t)=>(t.ptrType&&t.ptr||fe("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&fe("Both smartPtrType and smartPtr must be specified"),t.count={value:1},ze(Object.create(e,{$$:{value:t}})));function Oe(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Re(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?Le(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Le(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=Ce[o];if(!a)return i.call(this);s=this.isConst?a.constPointerType:a.pointerType;var c=ke(t,this.registeredClass,s.registeredClass);return null===c?i.call(this):this.isSmartPointer?Le(s.registeredClass.instancePrototype,{ptrType:s,ptr:c,smartPtrType:this,smartPtr:e}):Le(s.registeredClass.instancePrototype,{ptrType:s,ptr:c})}var ze=e=>"undefined"==typeof FinalizationRegistry?(ze=e=>e,e):(Se=new FinalizationRegistry((e=>{Ee(e.$$)})),ze=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Se.register(e,r,e)}return e},Ie=e=>Se.unregister(e),ze(e)),Ne=()=>{Object.assign(He.prototype,{isAliasOf(e){if(!(this instanceof He))return!1;if(!(e instanceof He))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i},clone(){if(this.$$.ptr||we(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=ze(Object.create(Object.getPrototypeOf(this),{$$:{value:be(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||we(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&he("Object already scheduled for deletion"),Ie(this),Ee(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||we(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&he("Object already scheduled for deletion"),De.push(this),1===De.length&&ye&&ye(Be),this.$$.deleteScheduled=!0,this}})};function He(){}var je=(e,t)=>Object.defineProperty(t,"name",{value:e}),Ve=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||he(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},We=(e,t,r)=>{i.hasOwnProperty(e)?((void 0===r||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[r])&&he(`Cannot register public name '${e}' twice`),Ve(i,e,e),i.hasOwnProperty(r)&&he(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),i[e].overloadTable[r]=t):(i[e]=t,void 0!==r&&(i[e].numArguments=r))},$e=48,Ge=57,qe=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=$e&&t<=Ge?`_${e}`:e};function Ke(e,t,r,n,i,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}var Je=(e,t,r)=>{for(;t!==r;)t.upcast||he(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Xe(e,t){if(null===t)return this.isReference&&he(`null is not a valid ${this.name}`),0;t.$$||he(`Cannot pass "${Bt(t)}" as a ${this.name}`),t.$$.ptr||he(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Je(t.$$.ptr,r,this.registeredClass)}function Ye(e,t){var r;if(null===t)return this.isReference&&he(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||he(`Cannot pass "${Bt(t)}" as a ${this.name}`),t.$$.ptr||he(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&he(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=Je(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&he("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:he(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,Tt.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:he("Unsupporting sharing policy")}return r}function Ze(e,t){if(null===t)return this.isReference&&he(`null is not a valid ${this.name}`),0;t.$$||he(`Cannot pass "${Bt(t)}" as a ${this.name}`),t.$$.ptr||he(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&he(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return Je(t.$$.ptr,r,this.registeredClass)}function Qe(e){return this.fromWireType(k[e>>2])}var et=()=>{Object.assign(tt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:ge,readValueFromPointer:Qe,deleteObject(e){null!==e&&e.delete()},fromWireType:Oe})};function tt(e,t,r,n,i,s,o,a,c,u,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=Ye:n?(this.toWireType=Xe,this.destructorFunction=null):(this.toWireType=Ze,this.destructorFunction=null)}var rt,nt,it=(e,t,r)=>{i.hasOwnProperty(e)||fe("Replacing nonexistant public symbol"),void 0!==i[e].overloadTable&&void 0!==r?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)},st=(e,t,r)=>{var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)},ot=[],at=e=>{var t=ot[e];return t||(e>=ot.length&&(ot.length=e+1),ot[e]=t=rt.get(e)),t},ct=(e,t,r)=>e.includes("j")?st(e,t,r):at(t).apply(null,r),ut=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),ct(e,t,r)}},lt=(e,t)=>{var r=(e=ce(e)).includes("j")?ut(e,t):at(t);return"function"!=typeof r&&he(`unknown function pointer with signature ${e}: ${t}`),r},dt=(e,t)=>{var r=je(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},ht=e=>{var t=Or(e),r=ce(t);return Rr(t),r},ft=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||le[t]||(de[t]?de[t].forEach(e):(r.push(t),n[t]=!0))})),new nt(`${e}: `+r.map(ht).join([", "]))},pt=(e,t,r,n,i,s,o,a,c,u,l,d,h)=>{l=ce(l),s=lt(i,s),a&&(a=lt(o,a)),u&&(u=lt(c,u)),h=lt(d,h);var f=qe(l);We(f,(function(){ft(`Cannot construct ${l} due to unbound types`,[n])})),pe([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:He.prototype;var o=je(l,(function(){if(Object.getPrototypeOf(this)!==c)throw new ne("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new ne(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new ne(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new Ke(l,o,c,h,r,s,a,u);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new tt(l,d,!0,!1,!1),m=new tt(l+"*",d,!1,!1,!1),v=new tt(l+" const*",d,!1,!0,!1);return Ce[e]={pointerType:m,constPointerType:v},it(f,o),[p,m,v]}))},mt=(e,t)=>{for(var r=[],n=0;n>2]);return r},vt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function yt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=je(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function gt(e,t,r,n,i,s){var o=t.length;o<2&&he("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,c=!1,u=1;u0?", ":"")+h),f+=(l||s?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",c)f+="runDestructors(destructors);\n";else for(u=a?1:2;u{var o=mt(t,r);i=lt(n,i),pe([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new ne(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{ft(`Cannot construct ${e.name} due to unbound types`,o)},pe([],o,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=gt(r,n,null,i,s),[]))),[]}))},bt=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},wt=(e,t,r,n,i,s,o,a,c)=>{var u=mt(r,n);t=ce(t),t=bt(t),s=lt(i,s),pe([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){ft(`Cannot call ${n} due to unbound types`,u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,d=l[t];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===r-2?(i.argCount=r-2,i.className=e.name,l[t]=i):(Ve(l,t,n),l[t].overloadTable[r-2]=i),pe([],u,(function(i){var a=gt(n,i,e,s,o,c);return void 0===l[t].overloadTable?(a.argCount=r-2,l[t]=a):l[t].overloadTable[r-2]=a,[]})),[]}))};function St(){Object.assign(It.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function It(){this.allocated=[void 0],this.freelist=[]}var At=new It,Et=e=>{e>=At.reserved&&0==--At.get(e).refcount&&At.free(e)},kt=()=>{for(var e=0,t=At.reserved;t{At.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),At.reserved=At.allocated.length,i.count_emval_handles=kt},Tt={toValue:e=>(e||he("Cannot use deleted val. handle = "+e),At.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return At.allocate({refcount:1,value:e})}}};function xt(e){return this.fromWireType(E[e>>2])}var Dt=(e,t)=>{ve(e,{name:t=ce(t),fromWireType:e=>{var t=Tt.toValue(e);return Et(e),t},toWireType:(e,t)=>Tt.toHandle(t),argPackAdvance:ge,readValueFromPointer:xt,destructorFunction:null})},Bt=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},Pt=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(C[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Mt=(e,t,r)=>{ve(e,{name:t=ce(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:ge,readValueFromPointer:Pt(t,r),destructorFunction:null})},Ut=(e,t,r)=>{switch(t){case 1:return r?e=>w[e>>0]:e=>S[e>>0];case 2:return r?e=>I[e>>1]:e=>A[e>>1];case 4:return r?e=>E[e>>2]:e=>k[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Ft=(e,t,r,n,i)=>{t=ce(t);var s=e=>e;if(0===n){var o=32-8*r;s=e=>e<>>o}var a=t.includes("unsigned");ve(e,{name:t,fromWireType:s,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:ge,readValueFromPointer:Ut(t,r,0!==n),destructorFunction:null})},Rt=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=k[e>>2],r=k[e+4>>2];return new n(w.buffer,r,t)}ve(e,{name:r=ce(r),fromWireType:i,argPackAdvance:ge,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},Lt=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,s=r+n-1,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i},Ot=(e,t,r)=>Lt(e,S,t,r),zt=e=>{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},Nt="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,Ht=(e,t,r)=>{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&Nt)return Nt.decode(e.subarray(t,i));for(var s="";t>10,56320|1023&u)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s},jt=(e,t)=>e?Ht(S,e,t):"",Vt=(e,t)=>{var r="std::string"===(t=ce(t));ve(e,{name:t,fromWireType(e){var t,n=k[e>>2],i=e+4;if(r)for(var s=i,o=0;o<=n;++o){var a=i+o;if(o==n||0==S[a]){var c=jt(s,a-s);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),s=a+1}}else{var u=new Array(n);for(o=0;o>2]=n,r&&i)Ot(t,o,n+1);else if(i)for(var a=0;a255&&(Rr(o),he("String has UTF-16 code units that do not fit in 8 bits")),S[o+a]=c}else for(a=0;a{for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&A[n];)++n;if((r=n<<1)-e>32&&Wt)return Wt.decode(S.subarray(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=I[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s},Gt=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return I[t>>1]=0,t-n},qt=e=>2*e.length,Kt=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=E[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var s=i-65536;n+=String.fromCharCode(55296|s>>10,56320|1023&s)}else n+=String.fromCharCode(i)}return n},Jt=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,s=0;s=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s)),E[t>>2]=o,(t+=4)+4>i)break}return E[t>>2]=0,t-n},Xt=e=>{for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t},Yt=(e,t,r)=>{var n,i,s,o,a;r=ce(r),2===t?(n=$t,i=Gt,o=qt,s=()=>A,a=1):4===t&&(n=Kt,i=Jt,o=Xt,s=()=>k,a=2),ve(e,{name:r,fromWireType:e=>{for(var r,i=k[e>>2],o=s(),c=e+4,u=0;u<=i;++u){var l=e+4+u*t;if(u==i||0==o[l>>a]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return Rr(e),r},toWireType:(e,n)=>{"string"!=typeof n&&he(`Cannot pass non-string to C++ string type ${r}`);var s=o(n),c=Lr(4+s+t);return k[c>>2]=s>>a,i(n,c+4,s+t),null!==e&&e.push(Rr,c),c},argPackAdvance:ge,readValueFromPointer:xt,destructorFunction(e){Rr(e)}})},Zt=(e,t)=>{ve(e,{isVoid:!0,name:t=ce(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Qt={},er=e=>{var t=Qt[e];return void 0===t?ce(e):t},tr=[],rr=(e,t,r,n,i)=>(e=tr[e])(t=Tt.toValue(t),t[r=er(r)],n,i),nr=e=>{var t=tr.length;return tr.push(e),t},ir=(e,t)=>{var r=le[e];return void 0===r&&he(t+" has unknown type "+ht(e)),r},sr=(e,t)=>{for(var r=new Array(e),n=0;n>2],"parameter "+n);return r},or=(e,t,r)=>{var n=[],i=e.toWireType(n,r);return n.length&&(k[t>>2]=Tt.toHandle(n)),i},ar=(e,t,r)=>{var n=sr(e,t),i=n.shift();e--;var s="return function (obj, func, destructorsRef, args) {\n",o=0,a=[];0===r&&a.push("obj");for(var c=["retType"],u=[i],l=0;le.name)).join(", ")}) => ${i.name}>`;return nr(je(h,d))},cr=e=>{e>4&&(At.get(e).refcount+=1)},ur=e=>Tt.toHandle(er(e)),lr=()=>Tt.toHandle({}),dr=e=>Tt.toHandle(jt(e)),hr=e=>{var t=Tt.toValue(e);vt(t),Et(e)},fr=(e,t,r)=>{e=Tt.toValue(e),t=Tt.toValue(t),r=Tt.toValue(r),e[t]=r},pr=(e,t)=>{var r=(e=ir(e,"_emval_take_value")).readValueFromPointer(t);return Tt.toHandle(r)},mr=e=>e%4==0&&(e%100!=0||e%400==0),vr=[0,31,60,91,121,152,182,213,244,274,305,335],yr=[0,31,59,90,120,151,181,212,243,273,304,334],gr=e=>(mr(e.getFullYear())?vr:yr)[e.getMonth()]+e.getDate()-1,_r=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN;function br(e,t,r){var n=_r(e,t),i=new Date(1e3*n);E[r>>2]=i.getSeconds(),E[r+4>>2]=i.getMinutes(),E[r+8>>2]=i.getHours(),E[r+12>>2]=i.getDate(),E[r+16>>2]=i.getMonth(),E[r+20>>2]=i.getFullYear()-1900,E[r+24>>2]=i.getDay();var s=0|gr(i);E[r+28>>2]=s,E[r+36>>2]=-60*i.getTimezoneOffset();var o=new Date(i.getFullYear(),0,1),a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),c=o.getTimezoneOffset(),u=0|(a!=c&&i.getTimezoneOffset()==Math.min(c,a));E[r+32>>2]=u}var wr,Sr=e=>{var t=zt(e)+1,r=Lr(t);return r&&Ot(e,r,t),r},Ir=(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),s=new Date(n,6,1),o=i.getTimezoneOffset(),a=s.getTimezoneOffset(),c=Math.max(o,a);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}k[e>>2]=60*c,E[t>>2]=Number(o!=a);var l=u(i),d=u(s),h=Sr(l),f=Sr(d);a>2]=h,k[r+4>>2]=f):(k[r>>2]=f,k[r+4>>2]=h)},Ar=()=>{W("")},Er=()=>Date.now();wr=()=>performance.now();var kr=(e,t,r)=>S.copyWithin(e,t,t+r),Cr=()=>536870912,Tr=e=>{var t=(e-g.buffer.byteLength+65535)/65536;try{return g.grow(t),D(),1}catch(e){}},xr=e=>{var t=S.length;e>>>=0;var r=Cr();if(e>r)return!1;for(var n,i,s=1;s<=4;s*=2){var o=t*(1+.2/s);o=Math.min(o,e+100663296);var a=Math.min(r,(n=Math.max(e,o))+((i=65536)-n%i)%i);if(Tr(a))return!0}return!1},Dr=[null,[],[]],Br=(e,t)=>{var r=Dr[e];0===t||10===t?((1===e?_:b)(Ht(r,0)),r.length=0):r.push(t)},Pr=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=k[t+4>>2];t+=8;for(var c=0;c>2]=i,0};ae(),ne=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},ie=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Ne(),Me(),et(),nt=i.UnboundTypeError=dt(Error,"UnboundTypeError"),St(),Ct();var Mr,Ur={o:se,s:oe,A:_e,r:pt,p:_t,h:wt,z:Dt,k:Mt,b:Ft,a:Rt,l:Vt,i:Yt,B:Zt,g:rr,c:Et,f:ar,C:cr,m:ur,E:lr,y:dr,e:hr,n:fr,D:pr,q:br,u:Ir,j:Ar,w:Er,d:wr,x:kr,t:xr,v:Pr},Fr=Q(),Rr=e=>(Rr=Fr.H)(e),Lr=e=>(Lr=Fr.I)(e),Or=e=>(Or=Fr.K)(e),zr=e=>(zr=Fr.L)(e);function Nr(){function e(){Mr||(Mr=!0,i.calledRun=!0,x||(F(),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),R()))}N>0||(U(),N>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_jiji=(e,t,r,n,s)=>(i.dynCall_jiji=Fr.M)(e,t,r,n,s),i.___start_em_js=143564,i.___stop_em_js=143621,H=function e(){Mr||Nr(),Mr||(H=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Nr(),e.ready}),o=(()=>{var e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href;return async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,n,i;(i=t).ready=new Promise(((e,t)=>{r=e,n=t})),(i=void 0!==i?i:{}).locateFile=function(e,t){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:t+e};var s,o,a,c=Object.assign({},i),u="./this.program",l="object"==typeof window,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";function p(e){return i.locateFile?i.locateFile(e,f):f+e}if(h){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href),v=m("fs"),y=m("path");f=d?y.dirname(f)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href)),s=(e,t)=>(e=Z(e)?new URL(e):y.normalize(e),v.readFileSync(e,t?void 0:"utf8")),a=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},o=function(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=Z(e)?new URL(e):y.normalize(e),v.readFile(e,n?void 0:"utf8",((e,i)=>{e?r(e):t(n?i.buffer:i)}))},!i.thisProgram&&process.argv.length>1&&(u=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),i.inspect=()=>"[Emscripten Module object]"}else(l||d)&&(d?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var g,_,b=i.print||console.log.bind(console),w=i.printErr||console.error.bind(console);Object.assign(i,c),c=null,i.arguments&&i.arguments,i.thisProgram&&(u=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(g=i.wasmBinary),"object"!=typeof WebAssembly&&G("no native wasm support detected");var S,I,A,E,k,C,T,x,D=!1;function B(e,t){e||G(t)}function P(){var e=_.buffer;i.HEAP8=S=new Int8Array(e),i.HEAP16=A=new Int16Array(e),i.HEAPU8=I=new Uint8Array(e),i.HEAPU16=E=new Uint16Array(e),i.HEAP32=k=new Int32Array(e),i.HEAPU32=C=new Uint32Array(e),i.HEAPF32=T=new Float32Array(e),i.HEAPF64=x=new Float64Array(e)}var M=[],U=[],F=[];function R(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)z(i.preRun.shift());ie(M)}function L(){i.noFSInit||xe.init.initialized||xe.init(),xe.ignorePermissions=!1,ie(U)}function O(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)H(i.postRun.shift());ie(F)}function z(e){M.unshift(e)}function N(e){U.unshift(e)}function H(e){F.unshift(e)}var j=0,V=null;function W(e){j++,i.monitorRunDependencies&&i.monitorRunDependencies(j)}function $(e){if(j--,i.monitorRunDependencies&&i.monitorRunDependencies(j),0==j&&V){var t=V;V=null,t()}}function G(e){i.onAbort&&i.onAbort(e),w(e="Aborted("+e+")"),D=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var q,K,J,X="data:application/octet-stream;base64,",Y=e=>e.startsWith(X),Z=e=>e.startsWith("file://");function Q(e){if(e==q&&g)return new Uint8Array(g);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!g&&(l||d)){if("function"==typeof fetch&&!Z(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(o)return new Promise(((t,r)=>{o(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),G(e)}))}function re(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||Y(t)||Z(t)||h||"function"!=typeof fetch?te(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),te(t,r,n)}))))}function ne(){var e={a:fn};function t(e,t){return pn=e.exports,_=pn.G,P(),Mt=pn.J,N(pn.H),$(),pn}if(W(),i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return re(g,q,e,(function(e){t(e.instance)})).catch(n),{}}i.locateFile?Y(q="decoder-pro-audio.wasm")||(q=p(q)):q=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro-simd.js",document.baseURI).href).href;var ie=e=>{for(;e.length>0;)e.shift()(i)};function se(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,S[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=S[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,S[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=S[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(_n(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var oe=(e,t,r)=>{throw new se(e).init(t,r),e},ae=e=>(k[vn()>>2]=e,e),ce={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=ce.isAbs(e),r="/"===e.substr(-1);return(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ce.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ce.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ce.normalize(e.join("/"))},join2:(e,t)=>ce.normalize(e+"/"+t)},ue=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(h)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}G("initRandomDevice")},le=e=>(le=ue())(e),de={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:xe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=ce.isAbs(n)}return(t?"/":"")+(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=de.resolve(e).substr(1),t=de.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),s=Math.min(n.length,i.length),o=s,a=0;a{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&he)return he.decode(e.subarray(t,i));for(var s="";t>10,56320|1023&u)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s},pe=[],me=e=>{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},ve=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,s=r+n-1,o=0;o=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o);if(a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i};function ye(e,t,r){var n=r>0?r:me(e)+1,i=new Array(n),s=ve(e,i,0,i.length);return t&&(i.length=s),i}var ge=()=>{if(!pe.length){var e=null;if(h){var t=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=v.readSync(n,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ye(e,!0)}return pe.shift()},_e={ttys:[],init(){},shutdown(){},register(e,t){_e.ttys[e]={input:[],output:[],ops:t},xe.registerDevice(e,_e.stream_ops)},stream_ops:{open(e){var t=_e.ttys[e.node.rdev];if(!t)throw new xe.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new xe.ErrnoError(60);for(var s=0,o=0;oge(),put_char(e,t){null===t||10===t?(b(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(fe(e.output,0)),e.output=[])}}},be=e=>{G()},we={ops_table:null,mount:e=>we.createNode(null,"/",16895,0),createNode(e,t,r,n){if(xe.isBlkdev(r)||xe.isFIFO(r))throw new xe.ErrnoError(63);we.ops_table||(we.ops_table={dir:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,lookup:we.node_ops.lookup,mknod:we.node_ops.mknod,rename:we.node_ops.rename,unlink:we.node_ops.unlink,rmdir:we.node_ops.rmdir,readdir:we.node_ops.readdir,symlink:we.node_ops.symlink},stream:{llseek:we.stream_ops.llseek}},file:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:{llseek:we.stream_ops.llseek,read:we.stream_ops.read,write:we.stream_ops.write,allocate:we.stream_ops.allocate,mmap:we.stream_ops.mmap,msync:we.stream_ops.msync}},link:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,readlink:we.node_ops.readlink},stream:{}},chrdev:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:xe.chrdev_stream_ops}});var i=xe.createNode(e,t,r,n);return xe.isDir(i.mode)?(i.node_ops=we.ops_table.dir.node,i.stream_ops=we.ops_table.dir.stream,i.contents={}):xe.isFile(i.mode)?(i.node_ops=we.ops_table.file.node,i.stream_ops=we.ops_table.file.stream,i.usedBytes=0,i.contents=null):xe.isLink(i.mode)?(i.node_ops=we.ops_table.link.node,i.stream_ops=we.ops_table.link.stream):xe.isChrdev(i.mode)&&(i.node_ops=we.ops_table.chrdev.node,i.stream_ops=we.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=xe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,xe.isDir(e.mode)?t.size=4096:xe.isFile(e.mode)?t.size=e.usedBytes:xe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&we.resizeFileStorage(e,t.size)},lookup(e,t){throw xe.genericErrors[44]},mknod:(e,t,r,n)=>we.createNode(e,t,r,n),rename(e,t,r){if(xe.isDir(e.mode)){var n;try{n=xe.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new xe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=xe.lookupNode(e,t);for(var n in r.contents)throw new xe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=we.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!xe.isLink(e.mode))throw new xe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,i){var s=e.node.contents;if(i>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-i,n);if(o>8&&s.subarray)t.set(s.subarray(i,i+o),r);else for(var a=0;a0||r+t(we.stream_ops.write(e,t,0,n,r,!1),0)}},Se=(e,t,r,n)=>{var i=n?"":`al ${e}`;o(e,(r=>{B(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),i&&$()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&W()},Ie=(e,t,r,n,i,s)=>{xe.createDataFile(e,t,r,n,i,s)},Ae=i.preloadPlugins||[],Ee=(e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return Ae.forEach((s=>{i||s.canHandle(t)&&(s.handle(e,t,r,n),i=!0)})),i},ke=(e,t,r,n,i,s,o,a,c,u)=>{var l=t?de.resolve(ce.join2(e,t)):e;function d(r){function d(r){u&&u(),a||Ie(e,t,r,n,i,c),s&&s(),$()}Ee(r,l,d,(()=>{o&&o(),$()}))||d(r)}W(),"string"==typeof r?Se(r,(e=>d(e)),o):d(r)},Ce=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Te=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},xe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=de.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new xe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=xe.root,i="/",s=0;s40)throw new xe.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(xe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n>>0)%xe.nameTable.length},hashAddNode(e){var t=xe.hashName(e.parent.id,e.name);e.name_next=xe.nameTable[t],xe.nameTable[t]=e},hashRemoveNode(e){var t=xe.hashName(e.parent.id,e.name);if(xe.nameTable[t]===e)xe.nameTable[t]=e.name_next;else for(var r=xe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=xe.mayLookup(e);if(r)throw new xe.ErrnoError(r,e);for(var n=xe.hashName(e.id,t),i=xe.nameTable[n];i;i=i.name_next){var s=i.name;if(i.parent.id===e.id&&s===t)return i}return xe.lookup(e,t)},createNode(e,t,r,n){var i=new xe.FSNode(e,t,r,n);return xe.hashAddNode(i),i},destroyNode(e){xe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>xe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=xe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{xe.lookupNode(e,t);return 20}catch(e){}return xe.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=xe.lookupNode(e,t)}catch(e){return e.errno}var i=xe.nodePermissions(e,"wx");if(i)return i;if(r){if(!xe.isDir(n.mode))return 54;if(xe.isRoot(n)||xe.getPath(n)===xe.cwd())return 10}else if(xe.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?xe.isLink(e.mode)?32:xe.isDir(e.mode)&&("r"!==xe.flagsToPermissionString(t)||512&t)?31:xe.nodePermissions(e,xe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=xe.MAX_OPEN_FDS;e++)if(!xe.streams[e])return e;throw new xe.ErrnoError(33)},getStreamChecked(e){var t=xe.getStream(e);if(!t)throw new xe.ErrnoError(8);return t},getStream:e=>xe.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return xe.FSStream||(xe.FSStream=function(){this.shared={}},xe.FSStream.prototype={},Object.defineProperties(xe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new xe.FSStream,e),-1==t&&(t=xe.nextfd()),e.fd=t,xe.streams[t]=e,e},closeStream(e){xe.streams[e]=null},chrdev_stream_ops:{open(e){var t=xe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new xe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){xe.devices[e]={stream_ops:t}},getDevice:e=>xe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),xe.syncFSRequests++,xe.syncFSRequests>1&&w(`warning: ${xe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=xe.getMounts(xe.root.mount),n=0;function i(e){return xe.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var n,i="/"===r,s=!r;if(i&&xe.root)throw new xe.ErrnoError(10);if(!i&&!s){var o=xe.lookupPath(r,{follow_mount:!1});if(r=o.path,n=o.node,xe.isMountpoint(n))throw new xe.ErrnoError(10);if(!xe.isDir(n.mode))throw new xe.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(a);return c.mount=a,a.root=c,i?xe.root=c:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),c},unmount(e){var t=xe.lookupPath(e,{follow_mount:!1});if(!xe.isMountpoint(t.node))throw new xe.ErrnoError(28);var r=t.node,n=r.mounted,i=xe.getMounts(n);Object.keys(xe.nameTable).forEach((e=>{for(var t=xe.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&xe.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(n);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=xe.lookupPath(e,{parent:!0}).node,i=ce.basename(e);if(!i||"."===i||".."===i)throw new xe.ErrnoError(28);var s=xe.mayCreate(n,i);if(s)throw new xe.ErrnoError(s);if(!n.node_ops.mknod)throw new xe.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,xe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,xe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",i=0;i(void 0===r&&(r=t,t=438),t|=8192,xe.mknod(e,t,r)),symlink(e,t){if(!de.resolve(e))throw new xe.ErrnoError(44);var r=xe.lookupPath(t,{parent:!0}).node;if(!r)throw new xe.ErrnoError(44);var n=ce.basename(t),i=xe.mayCreate(r,n);if(i)throw new xe.ErrnoError(i);if(!r.node_ops.symlink)throw new xe.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=ce.dirname(e),s=ce.dirname(t),o=ce.basename(e),a=ce.basename(t);if(r=xe.lookupPath(e,{parent:!0}).node,n=xe.lookupPath(t,{parent:!0}).node,!r||!n)throw new xe.ErrnoError(44);if(r.mount!==n.mount)throw new xe.ErrnoError(75);var c,u=xe.lookupNode(r,o),l=de.relative(e,s);if("."!==l.charAt(0))throw new xe.ErrnoError(28);if("."!==(l=de.relative(t,i)).charAt(0))throw new xe.ErrnoError(55);try{c=xe.lookupNode(n,a)}catch(e){}if(u!==c){var d=xe.isDir(u.mode),h=xe.mayDelete(r,o,d);if(h)throw new xe.ErrnoError(h);if(h=c?xe.mayDelete(n,a,d):xe.mayCreate(n,a))throw new xe.ErrnoError(h);if(!r.node_ops.rename)throw new xe.ErrnoError(63);if(xe.isMountpoint(u)||c&&xe.isMountpoint(c))throw new xe.ErrnoError(10);if(n!==r&&(h=xe.nodePermissions(r,"w")))throw new xe.ErrnoError(h);xe.hashRemoveNode(u);try{r.node_ops.rename(u,n,a)}catch(e){throw e}finally{xe.hashAddNode(u)}}},rmdir(e){var t=xe.lookupPath(e,{parent:!0}).node,r=ce.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!0);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.rmdir)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.rmdir(t,r),xe.destroyNode(n)},readdir(e){var t=xe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new xe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=xe.lookupPath(e,{parent:!0}).node;if(!t)throw new xe.ErrnoError(44);var r=ce.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!1);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.unlink)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.unlink(t,r),xe.destroyNode(n)},readlink(e){var t=xe.lookupPath(e).node;if(!t)throw new xe.ErrnoError(44);if(!t.node_ops.readlink)throw new xe.ErrnoError(28);return de.resolve(xe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=xe.lookupPath(e,{follow:!t}).node;if(!r)throw new xe.ErrnoError(44);if(!r.node_ops.getattr)throw new xe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>xe.stat(e,!0),chmod(e,t,r){var n;"string"==typeof e?n=xe.lookupPath(e,{follow:!r}).node:n=e;if(!n.node_ops.setattr)throw new xe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){xe.chmod(e,t,!0)},fchmod(e,t){var r=xe.getStreamChecked(e);xe.chmod(r.node,t)},chown(e,t,r,n){var i;"string"==typeof e?i=xe.lookupPath(e,{follow:!n}).node:i=e;if(!i.node_ops.setattr)throw new xe.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){xe.chown(e,t,r,!0)},fchown(e,t,r){var n=xe.getStreamChecked(e);xe.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new xe.ErrnoError(28);var r;"string"==typeof e?r=xe.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new xe.ErrnoError(63);if(xe.isDir(r.mode))throw new xe.ErrnoError(31);if(!xe.isFile(r.mode))throw new xe.ErrnoError(28);var n=xe.nodePermissions(r,"w");if(n)throw new xe.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=xe.getStreamChecked(e);if(0==(2097155&r.flags))throw new xe.ErrnoError(28);xe.truncate(r.node,t)},utime(e,t,r){var n=xe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new xe.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Ce(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=ce.normalize(e);try{n=xe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(n){if(128&t)throw new xe.ErrnoError(20)}else n=xe.mknod(e,r,0),s=!0;if(!n)throw new xe.ErrnoError(44);if(xe.isChrdev(n.mode)&&(t&=-513),65536&t&&!xe.isDir(n.mode))throw new xe.ErrnoError(54);if(!s){var o=xe.mayOpen(n,t);if(o)throw new xe.ErrnoError(o)}512&t&&!s&&xe.truncate(n,0),t&=-131713;var a=xe.createStream({node:n,path:xe.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!i.logReadFiles||1&t||(xe.readFiles||(xe.readFiles={}),e in xe.readFiles||(xe.readFiles[e]=1)),a},close(e){if(xe.isClosed(e))throw new xe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{xe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new xe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new xe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,i){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(1==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.read)throw new xe.ErrnoError(28);var s=void 0!==i;if(s){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var o=e.stream_ops.read(e,t,r,n,i);return s||(e.position+=o),o},write(e,t,r,n,i,s){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.write)throw new xe.ErrnoError(28);e.seekable&&1024&e.flags&&xe.llseek(e,0,2);var o=void 0!==i;if(o){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var a=e.stream_ops.write(e,t,r,n,i,s);return o||(e.position+=a),a},allocate(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(t<0||r<=0)throw new xe.ErrnoError(28);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(!xe.isFile(e.node.mode)&&!xe.isDir(e.node.mode))throw new xe.ErrnoError(43);if(!e.stream_ops.allocate)throw new xe.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new xe.ErrnoError(2);if(1==(2097155&e.flags))throw new xe.ErrnoError(2);if(!e.stream_ops.mmap)throw new xe.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new xe.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=xe.open(e,t.flags),i=xe.stat(e).size,s=new Uint8Array(i);return xe.read(n,s,0,i,0),"utf8"===t.encoding?r=fe(s,0):"binary"===t.encoding&&(r=s),xe.close(n),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var n=xe.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(me(t)+1),s=ve(t,i,0,i.length);xe.write(n,i,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");xe.write(n,t,0,t.byteLength,void 0,r.canOwn)}xe.close(n)},cwd:()=>xe.currentPath,chdir(e){var t=xe.lookupPath(e,{follow:!0});if(null===t.node)throw new xe.ErrnoError(44);if(!xe.isDir(t.node.mode))throw new xe.ErrnoError(54);var r=xe.nodePermissions(t.node,"x");if(r)throw new xe.ErrnoError(r);xe.currentPath=t.path},createDefaultDirectories(){xe.mkdir("/tmp"),xe.mkdir("/home"),xe.mkdir("/home/web_user")},createDefaultDevices(){xe.mkdir("/dev"),xe.registerDevice(xe.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),xe.mkdev("/dev/null",xe.makedev(1,3)),_e.register(xe.makedev(5,0),_e.default_tty_ops),_e.register(xe.makedev(6,0),_e.default_tty1_ops),xe.mkdev("/dev/tty",xe.makedev(5,0)),xe.mkdev("/dev/tty1",xe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=le(e).byteLength),e[--t]);xe.createDevice("/dev","random",r),xe.createDevice("/dev","urandom",r),xe.mkdir("/dev/shm"),xe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){xe.mkdir("/proc");var e=xe.mkdir("/proc/self");xe.mkdir("/proc/self/fd"),xe.mount({mount(){var t=xe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=xe.getStreamChecked(r),i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?xe.createDevice("/dev","stdin",i.stdin):xe.symlink("/dev/tty","/dev/stdin"),i.stdout?xe.createDevice("/dev","stdout",null,i.stdout):xe.symlink("/dev/tty","/dev/stdout"),i.stderr?xe.createDevice("/dev","stderr",null,i.stderr):xe.symlink("/dev/tty1","/dev/stderr"),xe.open("/dev/stdin",0),xe.open("/dev/stdout",1),xe.open("/dev/stderr",1)},ensureErrnoError(){xe.ErrnoError||(xe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},xe.ErrnoError.prototype=new Error,xe.ErrnoError.prototype.constructor=xe.ErrnoError,[44].forEach((e=>{xe.genericErrors[e]=new xe.ErrnoError(e),xe.genericErrors[e].stack=""})))},staticInit(){xe.ensureErrnoError(),xe.nameTable=new Array(4096),xe.mount(we,{},"/"),xe.createDefaultDirectories(),xe.createDefaultDevices(),xe.createSpecialDirectories(),xe.filesystems={MEMFS:we}},init(e,t,r){xe.init.initialized=!0,xe.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,xe.createStandardStreams()},quit(){xe.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;i||(o=n);var a=this;a.setDataGetter((e=>{var t=e*o,i=(e+1)*o-1;if(i=Math.min(i,n-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",r,!1),n!==o&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+r+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):ye(i.responseText||"",!0)})(t,i)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&n||(o=n=1,n=this.getter(0).length,o=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!d)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var c=xe.createFile(e,t,a,n,i);a.contents?c.contents=a.contents:a.url&&(c.contents=null,c.url=a.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,t,r,n,i){var s=e.node.contents;if(i>=s.length)return 0;var o=Math.min(s.length-i,n);if(s.slice)for(var a=0;a{var t=c.stream_ops[e];u[e]=function(){return xe.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,i)=>(xe.forceLoadFile(c),l(e,t,r,n,i)),u.mmap=(e,t,r,n,i)=>{xe.forceLoadFile(c);var s=be();if(!s)throw new xe.ErrnoError(48);return l(e,S,s,t,r),{ptr:s,allocated:!0}},c.stream_ops=u,c}},De=(e,t)=>e?fe(I,e,t):"",Be={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(ce.isAbs(t))return t;var n;-100===e?n=xe.cwd():n=Be.getStreamFromFD(e).path;if(0==t.length){if(!r)throw new xe.ErrnoError(44);return n}return ce.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ce.normalize(t)!==ce.normalize(xe.getPath(e.node)))return-54;throw e}k[r>>2]=n.dev,k[r+4>>2]=n.mode,C[r+8>>2]=n.nlink,k[r+12>>2]=n.uid,k[r+16>>2]=n.gid,k[r+20>>2]=n.rdev,J=[n.size>>>0,(K=n.size,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[r+24>>2]=J[0],k[r+28>>2]=J[1],k[r+32>>2]=4096,k[r+36>>2]=n.blocks;var i=n.atime.getTime(),s=n.mtime.getTime(),o=n.ctime.getTime();return J=[Math.floor(i/1e3)>>>0,(K=Math.floor(i/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[r+40>>2]=J[0],k[r+44>>2]=J[1],C[r+48>>2]=i%1e3*1e3,J=[Math.floor(s/1e3)>>>0,(K=Math.floor(s/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[r+56>>2]=J[0],k[r+60>>2]=J[1],C[r+64>>2]=s%1e3*1e3,J=[Math.floor(o/1e3)>>>0,(K=Math.floor(o/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[r+72>>2]=J[0],k[r+76>>2]=J[1],C[r+80>>2]=o%1e3*1e3,J=[n.ino>>>0,(K=n.ino,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[r+88>>2]=J[0],k[r+92>>2]=J[1],0},doMsync(e,t,r,n,i){if(!xe.isFile(t.node.mode))throw new xe.ErrnoError(43);if(2&n)return 0;var s=I.slice(e,e+r);xe.msync(t,s,i,r,n)},varargs:void 0,get(){var e=k[+Be.varargs>>2];return Be.varargs+=4,e},getp:()=>Be.get(),getStr:e=>De(e),getStreamFromFD:e=>xe.getStreamChecked(e)};function Pe(e,t,r){Be.varargs=r;try{var n=Be.getStreamFromFD(e);switch(t){case 0:if((i=Be.get())<0)return-28;for(;xe.streams[i];)i++;return xe.createStream(n,i).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var i=Be.get();return n.flags|=i,0;case 5:i=Be.getp();return A[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ae(28),-1}}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Me(e,t,r,n){Be.varargs=n;try{t=Be.getStr(t),t=Be.calculateAt(e,t);var i=n?Be.get():0;return xe.open(t,r,i).fd}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return-e.errno}}var Ue,Fe,Re,Le=(e,t,r,n,i)=>{},Oe=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ue=e},ze=e=>{for(var t="",r=e;I[r];)t+=Ue[I[r++]];return t},Ne={},He={},je={},Ve=e=>{throw new Fe(e)},We=e=>{throw new Re(e)},$e=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&We("Mismatched type converter count");for(var i=0;i{He.hasOwnProperty(e)?i[t]=He[e]:(s.push(e),Ne.hasOwnProperty(e)||(Ne[e]=[]),Ne[e].push((()=>{i[t]=He[e],++o===s.length&&n(i)})))})),0===s.length&&n(i)};function Ge(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=t.name;if(e||Ve(`type "${n}" must have a positive integer typeid pointer`),He.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Ve(`Cannot register type '${n}' twice`)}if(He[e]=t,delete je[e],Ne.hasOwnProperty(e)){var i=Ne[e];delete Ne[e],i.forEach((e=>e()))}}function qe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ge(e,t,r)}var Ke,Je=8,Xe=(e,t,r,n)=>{qe(e,{name:t=ze(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:Je,readValueFromPointer:function(e){return this.fromWireType(I[e])},destructorFunction:null})},Ye=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Ze=e=>{Ve(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},nt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=nt(e,t,r.baseClass);return null===n?null:r.downcast(n)},it={},st=()=>Object.keys(dt).length,ot=()=>{var e=[];for(var t in dt)dt.hasOwnProperty(t)&&e.push(dt[t]);return e},at=[],ct=()=>{for(;at.length;){var e=at.pop();e.$$.deleteScheduled=!1,e.delete()}},ut=e=>{Ke=e,at.length&&Ke&&Ke(ct)},lt=()=>{i.getInheritedInstanceCount=st,i.getLiveInheritedInstances=ot,i.flushPendingDeletes=ct,i.setDelayFunction=ut},dt={},ht=(e,t)=>{for(void 0===t&&Ve("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=ht(e,t),dt[t]),pt=(e,t)=>(t.ptrType&&t.ptr||We("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&We("Both smartPtrType and smartPtr must be specified"),t.count={value:1},vt(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=it[o];if(!a)return i.call(this);s=this.isConst?a.constPointerType:a.pointerType;var c=nt(t,this.registeredClass,s.registeredClass);return null===c?i.call(this):this.isSmartPointer?pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c,smartPtrType:this,smartPtr:e}):pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c})}var vt=e=>"undefined"==typeof FinalizationRegistry?(vt=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),vt=e=>{var t=e.$$;if(!!t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),vt(e)),yt=()=>{Object.assign(gt.prototype,{isAliasOf(e){if(!(this instanceof gt))return!1;if(!(e instanceof gt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i},clone(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:Ye(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ve("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ve("Object already scheduled for deletion"),at.push(this),1===at.length&&Ke&&Ke(ct),this.$$.deleteScheduled=!0,this}})};function gt(){}var _t=(e,t)=>Object.defineProperty(t,"name",{value:e}),bt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Ve(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},wt=(e,t,r)=>{i.hasOwnProperty(e)?((void 0===r||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[r])&&Ve(`Cannot register public name '${e}' twice`),bt(i,e,e),i.hasOwnProperty(r)&&Ve(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),i[e].overloadTable[r]=t):(i[e]=t,void 0!==r&&(i[e].numArguments=r))},St=48,It=57,At=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=St&&t<=It?`_${e}`:e};function Et(e,t,r,n,i,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}var kt=(e,t,r)=>{for(;t!==r;)t.upcast||Ve(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Ct(e,t){if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return kt(t.$$.ptr,r,this.registeredClass)}function Tt(e,t){var r;if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Ve(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=kt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Ve("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Ve(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,sr.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:Ve("Unsupporting sharing policy")}return r}function xt(e,t){if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Ve(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return kt(t.$$.ptr,r,this.registeredClass)}function Dt(e){return this.fromWireType(C[e>>2])}var Bt=()=>{Object.assign(Pt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Je,readValueFromPointer:Dt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Pt(e,t,r,n,i,s,o,a,c,u,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=Tt:n?(this.toWireType=Ct,this.destructorFunction=null):(this.toWireType=xt,this.destructorFunction=null)}var Mt,Ut,Ft=(e,t,r)=>{i.hasOwnProperty(e)||We("Replacing nonexistant public symbol"),void 0!==i[e].overloadTable&&void 0!==r?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)},Rt=(e,t,r)=>{var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)},Lt=[],Ot=e=>{var t=Lt[e];return t||(e>=Lt.length&&(Lt.length=e+1),Lt[e]=t=Mt.get(e)),t},zt=(e,t,r)=>e.includes("j")?Rt(e,t,r):Ot(t).apply(null,r),Nt=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),zt(e,t,r)}},Ht=(e,t)=>{var r=(e=ze(e)).includes("j")?Nt(e,t):Ot(t);return"function"!=typeof r&&Ve(`unknown function pointer with signature ${e}: ${t}`),r},jt=(e,t)=>{var r=_t(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Vt=e=>{var t=yn(e),r=ze(t);return mn(t),r},Wt=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||He[t]||(je[t]?je[t].forEach(e):(r.push(t),n[t]=!0))})),new Ut(`${e}: `+r.map(Vt).join([", "]))},$t=(e,t,r,n,i,s,o,a,c,u,l,d,h)=>{l=ze(l),s=Ht(i,s),a&&(a=Ht(o,a)),u&&(u=Ht(c,u)),h=Ht(d,h);var f=At(l);wt(f,(function(){Wt(`Cannot construct ${l} due to unbound types`,[n])})),$e([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:gt.prototype;var o=_t(l,(function(){if(Object.getPrototypeOf(this)!==c)throw new Fe("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Fe(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Fe(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new Et(l,o,c,h,r,s,a,u);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new Pt(l,d,!0,!1,!1),m=new Pt(l+"*",d,!1,!1,!1),v=new Pt(l+" const*",d,!1,!0,!1);return it[e]={pointerType:m,constPointerType:v},Ft(f,o),[p,m,v]}))},Gt=(e,t)=>{for(var r=[],n=0;n>2]);return r},qt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Kt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=_t(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function Jt(e,t,r,n,i,s){var o=t.length;o<2&&Ve("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,c=!1,u=1;u0?", ":"")+h),f+=(l||s?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",c)f+="runDestructors(destructors);\n";else for(u=a?1:2;u{var o=Gt(t,r);i=Ht(n,i),$e([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Fe(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Wt(`Cannot construct ${e.name} due to unbound types`,o)},$e([],o,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Jt(r,n,null,i,s),[]))),[]}))},Yt=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},Zt=(e,t,r,n,i,s,o,a,c)=>{var u=Gt(r,n);t=ze(t),t=Yt(t),s=Ht(i,s),$e([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){Wt(`Cannot call ${n} due to unbound types`,u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,d=l[t];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===r-2?(i.argCount=r-2,i.className=e.name,l[t]=i):(bt(l,t,n),l[t].overloadTable[r-2]=i),$e([],u,(function(i){var a=Jt(n,i,e,s,o,c);return void 0===l[t].overloadTable?(a.argCount=r-2,l[t]=a):l[t].overloadTable[r-2]=a,[]})),[]}))};function Qt(){Object.assign(er.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function er(){this.allocated=[void 0],this.freelist=[]}var tr=new er,rr=e=>{e>=tr.reserved&&0==--tr.get(e).refcount&&tr.free(e)},nr=()=>{for(var e=0,t=tr.reserved;t{tr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),tr.reserved=tr.allocated.length,i.count_emval_handles=nr},sr={toValue:e=>(e||Ve("Cannot use deleted val. handle = "+e),tr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return tr.allocate({refcount:1,value:e})}}};function or(e){return this.fromWireType(k[e>>2])}var ar=(e,t)=>{qe(e,{name:t=ze(t),fromWireType:e=>{var t=sr.toValue(e);return rr(e),t},toWireType:(e,t)=>sr.toHandle(t),argPackAdvance:Je,readValueFromPointer:or,destructorFunction:null})},cr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},ur=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(T[e>>2])};case 8:return function(e){return this.fromWireType(x[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},lr=(e,t,r)=>{qe(e,{name:t=ze(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Je,readValueFromPointer:ur(t,r),destructorFunction:null})},dr=(e,t,r)=>{switch(t){case 1:return r?e=>S[e>>0]:e=>I[e>>0];case 2:return r?e=>A[e>>1]:e=>E[e>>1];case 4:return r?e=>k[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},hr=(e,t,r,n,i)=>{t=ze(t);var s=e=>e;if(0===n){var o=32-8*r;s=e=>e<>>o}var a=t.includes("unsigned");qe(e,{name:t,fromWireType:s,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Je,readValueFromPointer:dr(t,r,0!==n),destructorFunction:null})},fr=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=C[e>>2],r=C[e+4>>2];return new n(S.buffer,r,t)}qe(e,{name:r=ze(r),fromWireType:i,argPackAdvance:Je,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},pr=(e,t,r)=>ve(e,I,t,r),mr=(e,t)=>{var r="std::string"===(t=ze(t));qe(e,{name:t,fromWireType(e){var t,n=C[e>>2],i=e+4;if(r)for(var s=i,o=0;o<=n;++o){var a=i+o;if(o==n||0==I[a]){var c=De(s,a-s);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),s=a+1}}else{var u=new Array(n);for(o=0;o>2]=n,r&&i)pr(t,o,n+1);else if(i)for(var a=0;a255&&(mn(o),Ve("String has UTF-16 code units that do not fit in 8 bits")),I[o+a]=c}else for(a=0;a{for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&E[n];)++n;if((r=n<<1)-e>32&&vr)return vr.decode(I.subarray(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=A[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s},gr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return A[t>>1]=0,t-n},_r=e=>2*e.length,br=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=k[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var s=i-65536;n+=String.fromCharCode(55296|s>>10,56320|1023&s)}else n+=String.fromCharCode(i)}return n},wr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,s=0;s=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s);if(k[t>>2]=o,(t+=4)+4>i)break}return k[t>>2]=0,t-n},Sr=e=>{for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t},Ir=(e,t,r)=>{var n,i,s,o,a;r=ze(r),2===t?(n=yr,i=gr,o=_r,s=()=>E,a=1):4===t&&(n=br,i=wr,o=Sr,s=()=>C,a=2),qe(e,{name:r,fromWireType:e=>{for(var r,i=C[e>>2],o=s(),c=e+4,u=0;u<=i;++u){var l=e+4+u*t;if(u==i||0==o[l>>a]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return mn(e),r},toWireType:(e,n)=>{"string"!=typeof n&&Ve(`Cannot pass non-string to C++ string type ${r}`);var s=o(n),c=gn(4+s+t);return C[c>>2]=s>>a,i(n,c+4,s+t),null!==e&&e.push(mn,c),c},argPackAdvance:Je,readValueFromPointer:or,destructorFunction(e){mn(e)}})},Ar=(e,t)=>{qe(e,{isVoid:!0,name:t=ze(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Er={},kr=e=>{var t=Er[e];return void 0===t?ze(e):t},Cr=[],Tr=(e,t,r,n,i)=>(e=Cr[e])(t=sr.toValue(t),t[r=kr(r)],n,i),xr=e=>{var t=Cr.length;return Cr.push(e),t},Dr=(e,t)=>{var r=He[e];return void 0===r&&Ve(t+" has unknown type "+Vt(e)),r},Br=(e,t)=>{for(var r=new Array(e),n=0;n>2],"parameter "+n);return r},Pr=(e,t,r)=>{var n=[],i=e.toWireType(n,r);return n.length&&(C[t>>2]=sr.toHandle(n)),i},Mr=(e,t,r)=>{var n=Br(e,t),i=n.shift();e--;var s="return function (obj, func, destructorsRef, args) {\n",o=0,a=[];0===r&&a.push("obj");for(var c=["retType"],u=[i],l=0;le.name)).join(", ")}) => ${i.name}>`;return xr(_t(h,d))},Ur=e=>{var t=sr.toValue(e);qt(t),rr(e)},Fr=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Rr=e=>e%4==0&&(e%100!=0||e%400==0),Lr=[0,31,60,91,121,152,182,213,244,274,305,335],Or=[0,31,59,90,120,151,181,212,243,273,304,334],zr=e=>(Rr(e.getFullYear())?Lr:Or)[e.getMonth()]+e.getDate()-1;function Nr(e,t,r){var n=Fr(e,t),i=new Date(1e3*n);k[r>>2]=i.getSeconds(),k[r+4>>2]=i.getMinutes(),k[r+8>>2]=i.getHours(),k[r+12>>2]=i.getDate(),k[r+16>>2]=i.getMonth(),k[r+20>>2]=i.getFullYear()-1900,k[r+24>>2]=i.getDay();var s=0|zr(i);k[r+28>>2]=s,k[r+36>>2]=-60*i.getTimezoneOffset();var o=new Date(i.getFullYear(),0,1),a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),c=o.getTimezoneOffset(),u=0|(a!=c&&i.getTimezoneOffset()==Math.min(c,a));k[r+32>>2]=u}var Hr=e=>{var t=me(e)+1,r=gn(t);return r&&pr(e,r,t),r},jr=(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),s=new Date(n,6,1),o=i.getTimezoneOffset(),a=s.getTimezoneOffset(),c=Math.max(o,a);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[e>>2]=60*c,k[t>>2]=Number(o!=a);var l=u(i),d=u(s),h=Hr(l),f=Hr(d);a>2]=h,C[r+4>>2]=f):(C[r>>2]=f,C[r+4>>2]=h)},Vr=()=>{G("")},Wr=()=>Date.now(),$r=(e,t,r)=>I.copyWithin(e,t,t+r),Gr=()=>134217728,qr=e=>{var t=(e-_.buffer.byteLength+65535)/65536;try{return _.grow(t),P(),1}catch(e){}},Kr=e=>{var t=I.length;e>>>=0;var r=Gr();if(e>r)return!1;for(var n,i,s=1;s<=4;s*=2){var o=t*(1+.2/s);o=Math.min(o,e+100663296);var a=Math.min(r,(n=Math.max(e,o))+((i=65536)-n%i)%i);if(qr(a))return!0}return!1},Jr={},Xr=()=>u||"./this.program",Yr=()=>{if(!Yr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Xr()};for(var t in Jr)void 0===Jr[t]?delete e[t]:e[t]=Jr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Yr.strings=r}return Yr.strings},Zr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);S[t>>0]=0},Qr=(e,t)=>{var r=0;return Yr().forEach(((n,i)=>{var s=t+r;C[e+4*i>>2]=s,Zr(n,s),r+=n.length+1})),0},en=(e,t)=>{var r=Yr();C[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),C[t>>2]=n,0};function tn(e){try{var t=Be.getStreamFromFD(e);return xe.close(t),0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}function rn(e,t){try{var r=Be.getStreamFromFD(e),n=r.tty?2:xe.isDir(r.mode)?3:xe.isLink(r.mode)?7:4;return S[t>>0]=n,A[t+2>>1]=0,J=[0,(K=0,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[t+8>>2]=J[0],k[t+12>>2]=J[1],J=[0,(K=0,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[t+16>>2]=J[0],k[t+20>>2]=J[1],0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var nn=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=xe.read(e,S,o,a,n);if(c<0)return-1;if(i+=c,c>2]=s,0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}function on(e,t,r,n,i){var s=Fr(t,r);try{if(isNaN(s))return 61;var o=Be.getStreamFromFD(e);return xe.llseek(o,s,n),J=[o.position>>>0,(K=o.position,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],k[i>>2]=J[0],k[i+4>>2]=J[1],o.getdents&&0===s&&0===n&&(o.getdents=null),0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var an=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=xe.write(e,S,o,a,n);if(c<0)return-1;i+=c,void 0!==n&&(n+=c)}return i};function cn(e,t,r,n){try{var i=Be.getStreamFromFD(e),s=an(i,t,r);return C[n>>2]=s,0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var un=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=xe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},ln=365,dn=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&ln)===ln},set:function(e){e?this.mode|=ln:this.mode&=~ln}},write:{get:function(){return(this.mode&dn)===dn},set:function(e){e?this.mode|=dn:this.mode&=~dn}},isFolder:{get:function(){return xe.isDir(this.mode)}},isDevice:{get:function(){return xe.isChrdev(this.mode)}}}),xe.FSNode=un,xe.createPreloadedFile=ke,xe.staticInit(),Oe(),Fe=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Re=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},yt(),lt(),Bt(),Ut=i.UnboundTypeError=jt(Error,"UnboundTypeError"),Qt(),ir();var hn,fn={o:oe,C:Pe,u:Me,r:Le,E:Xe,F:$t,A:Xt,i:Zt,D:ar,l:lr,c:hr,b:fr,m:mr,j:Ir,n:Ar,f:Tr,h:rr,e:Mr,d:Ur,p:Nr,t:jr,a:Vr,g:Wr,y:$r,s:Kr,w:Qr,x:en,k:tn,v:rn,B:sn,q:on,z:cn},pn=ne(),mn=e=>(mn=pn.I)(e),vn=()=>(vn=pn.K)(),yn=e=>(yn=pn.L)(e),gn=e=>(gn=pn.M)(e),_n=e=>(_n=pn.O)(e);function bn(){function e(){hn||(hn=!0,i.calledRun=!0,D||(L(),r(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),O()))}j>0||(R(),j>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_viiijj=(e,t,r,n,s,o,a,c)=>(i.dynCall_viiijj=pn.P)(e,t,r,n,s,o,a,c),i.dynCall_jij=(e,t,r,n)=>(i.dynCall_jij=pn.Q)(e,t,r,n),i.dynCall_jii=(e,t,r)=>(i.dynCall_jii=pn.R)(e,t,r),i.dynCall_jiji=(e,t,r,n,s)=>(i.dynCall_jiji=pn.S)(e,t,r,n,s),V=function e(){hn||bn(),hn||(V=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return bn(),t.ready}})(),a=u;!function(e,t){for(var r=u,n=e();;)try{if(651774===parseInt(r(417))/1*(-parseInt(r(410))/2)+-parseInt(r(402))/3*(-parseInt(r(401))/4)+-parseInt(r(415))/5*(-parseInt(r(416))/6)+-parseInt(r(419))/7+parseInt(r(418))/8*(-parseInt(r(414))/9)+-parseInt(r(406))/10*(parseInt(r(407))/11)+parseInt(r(411))/12*(parseInt(r(403))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(h);var c=1e-6;function u(e,t){var r=h();return(u=function(e,t){return r[e-=400]})(e,t)}var l=typeof Float32Array!==a(404)?Float32Array:Array,d=Math[a(408)];function h(){var e=["undefined","max","251470ZtvqJV","539QSvCsD","random","sqrt","11394pAwSKh","12cMgTDb","abs","length","4733991mwHIvr","2435AtfYzK","15498zvceZy","207cVTBnk","8mIhaUT","1558858vkmisk","hypot","2028gukCPa","837XTCwll","31363475vCUxtc"];return(h=function(){return e})()}var f=Math.PI/180;Math[a(400)]||(Math[a(400)]=function(){for(var e=a,t=0,r=arguments[e(413)];r--;)t+=arguments[r]*arguments[r];return Math[e(409)](t)});var p=Object.freeze({__proto__:null,EPSILON:c,get ARRAY_TYPE(){return l},RANDOM:d,setMatrixArrayType:function(e){l=e},toRadian:function(e){return e*f},equals:function(e,t){var r=a;return Math[r(412)](e-t)<=c*Math[r(405)](1,Math[r(412)](e),Math[r(412)](t))}});function m(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function v(){var e=["11683660nJsYnl","abs","rightDegrees","5180248oiYLKO","mat4(","252856JyAKSH","hypot","ARRAY_TYPE","max","451308kPJkPk","120ogaShA","2111148ZOKvpA","cos","sin","73680EIJGqh","downDegrees","286398pdOfXP","upDegrees","7rNApIh","tan","sqrt","leftDegrees","EPSILON","3QdBFiZ"];return(v=function(){return e})()}function y(e,t,r){var n=t[0],i=t[1],s=t[2],o=t[3],a=t[4],c=t[5],u=t[6],l=t[7],d=t[8],h=t[9],f=t[10],p=t[11],m=t[12],v=t[13],y=t[14],g=t[15],_=r[0],b=r[1],w=r[2],S=r[3];return e[0]=_*n+b*a+w*d+S*m,e[1]=_*i+b*c+w*h+S*v,e[2]=_*s+b*u+w*f+S*y,e[3]=_*o+b*l+w*p+S*g,_=r[4],b=r[5],w=r[6],S=r[7],e[4]=_*n+b*a+w*d+S*m,e[5]=_*i+b*c+w*h+S*v,e[6]=_*s+b*u+w*f+S*y,e[7]=_*o+b*l+w*p+S*g,_=r[8],b=r[9],w=r[10],S=r[11],e[8]=_*n+b*a+w*d+S*m,e[9]=_*i+b*c+w*h+S*v,e[10]=_*s+b*u+w*f+S*y,e[11]=_*o+b*l+w*p+S*g,_=r[12],b=r[13],w=r[14],S=r[15],e[12]=_*n+b*a+w*d+S*m,e[13]=_*i+b*c+w*h+S*v,e[14]=_*s+b*u+w*f+S*y,e[15]=_*o+b*l+w*p+S*g,e}function g(e,t){var r=v();return(g=function(e,t){return r[e-=423]})(e,t)}function _(e,t,r){var n=t[0],i=t[1],s=t[2],o=t[3],a=n+n,c=i+i,u=s+s,l=n*a,d=n*c,h=n*u,f=i*c,p=i*u,m=s*u,v=o*a,y=o*c,g=o*u;return e[0]=1-(f+m),e[1]=d+g,e[2]=h-y,e[3]=0,e[4]=d-g,e[5]=1-(l+m),e[6]=p+v,e[7]=0,e[8]=h+y,e[9]=p-v,e[10]=1-(l+f),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function b(e,t){var r=g,n=t[0],i=t[1],s=t[2],o=t[4],a=t[5],c=t[6],u=t[8],l=t[9],d=t[10];return e[0]=Math.hypot(n,i,s),e[1]=Math[r(446)](o,a,c),e[2]=Math.hypot(u,l,d),e}function w(e,t,r,n,i){var s,o=1/Math[g(435)](t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(s=1/(n-i),e[10]=(i+n)*s,e[14]=2*i*n*s):(e[10]=-1,e[14]=-2*n),e}!function(e,t){for(var r=g,n=e();;)try{if(518834===-parseInt(r(425))/1+-parseInt(r(432))/2+parseInt(r(439))/3*(parseInt(r(445))/4)+parseInt(r(426))/5*(parseInt(r(430))/6)+parseInt(r(434))/7*(-parseInt(r(443))/8)+parseInt(r(427))/9+parseInt(r(440))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(v);var S=w;function I(e,t,r,n,i,s,o){var a=1/(t-r),c=1/(n-i),u=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*a,e[13]=(i+n)*c,e[14]=(o+s)*u,e[15]=1,e}var A=I;function E(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}var k=y,C=E,T=Object.freeze({__proto__:null,create:function(){var e=g,t=new(p[e(423)])(16);return p[e(423)]!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},clone:function(e){var t=new(p[g(423)])(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},fromValues:function(e,t,r,n,i,s,o,a,c,u,d,h,f,p,m,v){var y=new l(16);return y[0]=e,y[1]=t,y[2]=r,y[3]=n,y[4]=i,y[5]=s,y[6]=o,y[7]=a,y[8]=c,y[9]=u,y[10]=d,y[11]=h,y[12]=f,y[13]=p,y[14]=m,y[15]=v,y},set:function(e,t,r,n,i,s,o,a,c,u,l,d,h,f,p,m,v){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=s,e[5]=o,e[6]=a,e[7]=c,e[8]=u,e[9]=l,e[10]=d,e[11]=h,e[12]=f,e[13]=p,e[14]=m,e[15]=v,e},identity:m,transpose:function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],s=t[6],o=t[7],a=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=s,e[11]=t[14],e[12]=i,e[13]=o,e[14]=a}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e},invert:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],l=t[8],d=t[9],h=t[10],f=t[11],p=t[12],m=t[13],v=t[14],y=t[15],g=r*a-n*o,_=r*c-i*o,b=r*u-s*o,w=n*c-i*a,S=n*u-s*a,I=i*u-s*c,A=l*m-d*p,E=l*v-h*p,k=l*y-f*p,C=d*v-h*m,T=d*y-f*m,x=h*y-f*v,D=g*x-_*T+b*C+w*k-S*E+I*A;return D?(D=1/D,e[0]=(a*x-c*T+u*C)*D,e[1]=(i*T-n*x-s*C)*D,e[2]=(m*I-v*S+y*w)*D,e[3]=(h*S-d*I-f*w)*D,e[4]=(c*k-o*x-u*E)*D,e[5]=(r*x-i*k+s*E)*D,e[6]=(v*b-p*I-y*_)*D,e[7]=(l*I-h*b+f*_)*D,e[8]=(o*T-a*k+u*A)*D,e[9]=(n*k-r*T-s*A)*D,e[10]=(p*S-m*b+y*g)*D,e[11]=(d*b-l*S-f*g)*D,e[12]=(a*E-o*C-c*A)*D,e[13]=(r*C-n*E+i*A)*D,e[14]=(m*_-p*w-v*g)*D,e[15]=(l*w-d*_+h*g)*D,e):null},adjoint:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],l=t[8],d=t[9],h=t[10],f=t[11],p=t[12],m=t[13],v=t[14],y=t[15];return e[0]=a*(h*y-f*v)-d*(c*y-u*v)+m*(c*f-u*h),e[1]=-(n*(h*y-f*v)-d*(i*y-s*v)+m*(i*f-s*h)),e[2]=n*(c*y-u*v)-a*(i*y-s*v)+m*(i*u-s*c),e[3]=-(n*(c*f-u*h)-a*(i*f-s*h)+d*(i*u-s*c)),e[4]=-(o*(h*y-f*v)-l*(c*y-u*v)+p*(c*f-u*h)),e[5]=r*(h*y-f*v)-l*(i*y-s*v)+p*(i*f-s*h),e[6]=-(r*(c*y-u*v)-o*(i*y-s*v)+p*(i*u-s*c)),e[7]=r*(c*f-u*h)-o*(i*f-s*h)+l*(i*u-s*c),e[8]=o*(d*y-f*m)-l*(a*y-u*m)+p*(a*f-u*d),e[9]=-(r*(d*y-f*m)-l*(n*y-s*m)+p*(n*f-s*d)),e[10]=r*(a*y-u*m)-o*(n*y-s*m)+p*(n*u-s*a),e[11]=-(r*(a*f-u*d)-o*(n*f-s*d)+l*(n*u-s*a)),e[12]=-(o*(d*v-h*m)-l*(a*v-c*m)+p*(a*h-c*d)),e[13]=r*(d*v-h*m)-l*(n*v-i*m)+p*(n*h-i*d),e[14]=-(r*(a*v-c*m)-o*(n*v-i*m)+p*(n*c-i*a)),e[15]=r*(a*h-c*d)-o*(n*h-i*d)+l*(n*c-i*a),e},determinant:function(e){var t=e[0],r=e[1],n=e[2],i=e[3],s=e[4],o=e[5],a=e[6],c=e[7],u=e[8],l=e[9],d=e[10],h=e[11],f=e[12],p=e[13],m=e[14],v=e[15];return(t*o-r*s)*(d*v-h*m)-(t*a-n*s)*(l*v-h*p)+(t*c-i*s)*(l*m-d*p)+(r*a-n*o)*(u*v-h*f)-(r*c-i*o)*(u*m-d*f)+(n*c-i*a)*(u*p-l*f)},multiply:y,translate:function(e,t,r){var n,i,s,o,a,c,u,l,d,h,f,p,m=r[0],v=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*v+t[8]*y+t[12],e[13]=t[1]*m+t[5]*v+t[9]*y+t[13],e[14]=t[2]*m+t[6]*v+t[10]*y+t[14],e[15]=t[3]*m+t[7]*v+t[11]*y+t[15]):(n=t[0],i=t[1],s=t[2],o=t[3],a=t[4],c=t[5],u=t[6],l=t[7],d=t[8],h=t[9],f=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=s,e[3]=o,e[4]=a,e[5]=c,e[6]=u,e[7]=l,e[8]=d,e[9]=h,e[10]=f,e[11]=p,e[12]=n*m+a*v+d*y+t[12],e[13]=i*m+c*v+h*y+t[13],e[14]=s*m+u*v+f*y+t[14],e[15]=o*m+l*v+p*y+t[15]),e},scale:function(e,t,r){var n=r[0],i=r[1],s=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*s,e[9]=t[9]*s,e[10]=t[10]*s,e[11]=t[11]*s,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},rotate:function(e,t,r,n){var i,s,o,a,u,l,d,h,f,p,m,v,y,_,b,w,S,I,A,E,k,C,T,x,D=g,B=n[0],P=n[1],M=n[2],U=Math[D(446)](B,P,M);return U0?(r[0]=2*(a*o+d*n+c*s-u*i)/h,r[1]=2*(c*o+d*i+u*n-a*s)/h,r[2]=2*(u*o+d*s+a*i-c*n)/h):(r[0]=2*(a*o+d*n+c*s-u*i),r[1]=2*(c*o+d*i+u*n-a*s),r[2]=2*(u*o+d*s+a*i-c*n)),_(e,t,r),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:b,getRotation:function(e,t){var r=g,n=new(p[r(423)])(3);b(n,t);var i=1/n[0],s=1/n[1],o=1/n[2],a=t[0]*i,c=t[1]*s,u=t[2]*o,l=t[4]*i,d=t[5]*s,h=t[6]*o,f=t[8]*i,m=t[9]*s,v=t[10]*o,y=a+d+v,_=0;return y>0?(_=2*Math.sqrt(y+1),e[3]=.25*_,e[0]=(h-m)/_,e[1]=(f-u)/_,e[2]=(c-l)/_):a>d&&a>v?(_=2*Math[r(436)](1+a-d-v),e[3]=(h-m)/_,e[0]=.25*_,e[1]=(c+l)/_,e[2]=(f+u)/_):d>v?(_=2*Math[r(436)](1+d-a-v),e[3]=(f-u)/_,e[0]=(c+l)/_,e[1]=.25*_,e[2]=(h+m)/_):(_=2*Math[r(436)](1+v-a-d),e[3]=(c-l)/_,e[0]=(f+u)/_,e[1]=(h+m)/_,e[2]=.25*_),e},fromRotationTranslationScale:function(e,t,r,n){var i=t[0],s=t[1],o=t[2],a=t[3],c=i+i,u=s+s,l=o+o,d=i*c,h=i*u,f=i*l,p=s*u,m=s*l,v=o*l,y=a*c,g=a*u,_=a*l,b=n[0],w=n[1],S=n[2];return e[0]=(1-(p+v))*b,e[1]=(h+_)*b,e[2]=(f-g)*b,e[3]=0,e[4]=(h-_)*w,e[5]=(1-(d+v))*w,e[6]=(m+y)*w,e[7]=0,e[8]=(f+g)*S,e[9]=(m-y)*S,e[10]=(1-(d+p))*S,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e},fromRotationTranslationScaleOrigin:function(e,t,r,n,i){var s=t[0],o=t[1],a=t[2],c=t[3],u=s+s,l=o+o,d=a+a,h=s*u,f=s*l,p=s*d,m=o*l,v=o*d,y=a*d,g=c*u,_=c*l,b=c*d,w=n[0],S=n[1],I=n[2],A=i[0],E=i[1],k=i[2],C=(1-(m+y))*w,T=(f+b)*w,x=(p-_)*w,D=(f-b)*S,B=(1-(h+y))*S,P=(v+g)*S,M=(p+_)*I,U=(v-g)*I,F=(1-(h+m))*I;return e[0]=C,e[1]=T,e[2]=x,e[3]=0,e[4]=D,e[5]=B,e[6]=P,e[7]=0,e[8]=M,e[9]=U,e[10]=F,e[11]=0,e[12]=r[0]+A-(C*A+D*E+M*k),e[13]=r[1]+E-(T*A+B*E+U*k),e[14]=r[2]+k-(x*A+P*E+F*k),e[15]=1,e},fromQuat:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=r+r,a=n+n,c=i+i,u=r*o,l=n*o,d=n*a,h=i*o,f=i*a,p=i*c,m=s*o,v=s*a,y=s*c;return e[0]=1-d-p,e[1]=l+y,e[2]=h-v,e[3]=0,e[4]=l-y,e[5]=1-u-p,e[6]=f+m,e[7]=0,e[8]=h+v,e[9]=f-m,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},frustum:function(e,t,r,n,i,s,o){var a=1/(r-t),c=1/(i-n),u=1/(s-o);return e[0]=2*s*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*s*c,e[6]=0,e[7]=0,e[8]=(r+t)*a,e[9]=(i+n)*c,e[10]=(o+s)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*s*2*u,e[15]=0,e},perspectiveNO:w,perspective:S,perspectiveZO:function(e,t,r,n,i){var s,o=1/Math[g(435)](t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(s=1/(n-i),e[10]=i*s,e[14]=i*n*s):(e[10]=-1,e[14]=-n),e},perspectiveFromFieldOfView:function(e,t,r,n){var i=g,s=Math.tan(t[i(433)]*Math.PI/180),o=Math.tan(t[i(431)]*Math.PI/180),a=Math[i(435)](t[i(437)]*Math.PI/180),c=Math[i(435)](t[i(442)]*Math.PI/180),u=2/(a+c),l=2/(s+o);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-(a-c)*u*.5,e[9]=(s-o)*l*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e},orthoNO:I,ortho:A,orthoZO:function(e,t,r,n,i,s,o){var a=1/(t-r),c=1/(n-i),u=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=u,e[11]=0,e[12]=(t+r)*a,e[13]=(i+n)*c,e[14]=s*u,e[15]=1,e},lookAt:function(e,t,r,n){var i,s,o,a,u,l,d,h,f,v,y=g,_=t[0],b=t[1],w=t[2],S=n[0],I=n[1],A=n[2],E=r[0],k=r[1],C=r[2];return Math.abs(_-E)0&&(d*=p=1/Math[i(436)](p),h*=p,f*=p);var m=u*f-l*h,v=l*d-c*f,y=c*h-u*d;return(p=m*m+v*v+y*y)>0&&(m*=p=1/Math.sqrt(p),v*=p,y*=p),e[0]=m,e[1]=v,e[2]=y,e[3]=0,e[4]=h*y-f*v,e[5]=f*m-d*y,e[6]=d*v-h*m,e[7]=0,e[8]=d,e[9]=h,e[10]=f,e[11]=0,e[12]=s,e[13]=o,e[14]=a,e[15]=1,e},str:function(e){return g(444)+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math[g(446)](e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},subtract:E,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var r=g,n=e[0],i=e[1],s=e[2],o=e[3],a=e[4],u=e[5],l=e[6],d=e[7],h=e[8],f=e[9],m=e[10],v=e[11],y=e[12],_=e[13],b=e[14],w=e[15],S=t[0],I=t[1],A=t[2],E=t[3],k=t[4],C=t[5],T=t[6],x=t[7],D=t[8],B=t[9],P=t[10],M=t[11],U=t[12],F=t[13],R=t[14],L=t[15];return Math.abs(n-S)<=p[r(438)]*Math[r(424)](1,Math[r(441)](n),Math.abs(S))&&Math[r(441)](i-I)<=p[r(438)]*Math[r(424)](1,Math[r(441)](i),Math[r(441)](I))&&Math[r(441)](s-A)<=p[r(438)]*Math.max(1,Math[r(441)](s),Math.abs(A))&&Math.abs(o-E)<=c*Math.max(1,Math[r(441)](o),Math[r(441)](E))&&Math[r(441)](a-k)<=c*Math[r(424)](1,Math[r(441)](a),Math[r(441)](k))&&Math.abs(u-C)<=p[r(438)]*Math[r(424)](1,Math[r(441)](u),Math[r(441)](C))&&Math[r(441)](l-T)<=p[r(438)]*Math[r(424)](1,Math.abs(l),Math[r(441)](T))&&Math[r(441)](d-x)<=p[r(438)]*Math[r(424)](1,Math[r(441)](d),Math[r(441)](x))&&Math[r(441)](h-D)<=p[r(438)]*Math[r(424)](1,Math[r(441)](h),Math[r(441)](D))&&Math[r(441)](f-B)<=p[r(438)]*Math.max(1,Math[r(441)](f),Math.abs(B))&&Math.abs(m-P)<=p[r(438)]*Math.max(1,Math[r(441)](m),Math[r(441)](P))&&Math.abs(v-M)<=p[r(438)]*Math[r(424)](1,Math.abs(v),Math[r(441)](M))&&Math[r(441)](y-U)<=p[r(438)]*Math[r(424)](1,Math[r(441)](y),Math.abs(U))&&Math[r(441)](_-F)<=p[r(438)]*Math[r(424)](1,Math[r(441)](_),Math[r(441)](F))&&Math[r(441)](b-R)<=c*Math[r(424)](1,Math.abs(b),Math[r(441)](R))&&Math[r(441)](w-L)<=p[r(438)]*Math.max(1,Math[r(441)](w),Math[r(441)](L))},mul:k,sub:C});function x(){var e=U,t=new(p[e(406)])(3);return p[e(406)]!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function D(e){var t=e[0],r=e[1],n=e[2];return Math.hypot(t,r,n)}function B(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function P(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function M(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function U(e,t){var r=z();return(U=function(e,t){return r[e-=399]})(e,t)}function F(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.hypot(r,n,i)}function R(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}function L(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function O(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function z(){var e=["ARRAY_TYPE","min","1770723AQBZHE","3186mSnzZz","339vvsKtn","39954HHbSsG","2844324GMoREp","3126BkuWox","vec3(","8936AJXqOP","cos","ceil","sin","EPSILON","max","round","floor","abs","sqrt","length","acos","5eWiWvu","12345910UIHhnD","RANDOM","220636JbyYuG"];return(z=function(){return e})()}!function(e,t){for(var r=U,n=e();;)try{if(310639===-parseInt(r(410))/1*(-parseInt(r(413))/2)+-parseInt(r(408))/3+-parseInt(r(405))/4+parseInt(r(402))/5*(-parseInt(r(411))/6)+-parseInt(r(412))/7+-parseInt(r(415))/8*(parseInt(r(409))/9)+parseInt(r(403))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(z);var N,H=B,j=P,V=M,W=F,$=R,G=D,q=L,K=(N=x(),function(e,t,r,n,i,s){var o,a,c=U;for(!t&&(t=3),!r&&(r=0),a=n?Math[c(407)](n*t+r,e[c(400)]):e[c(400)],o=r;o0&&(s=1/Math.sqrt(s)),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e},dot:O,cross:function(e,t,r){var n=t[0],i=t[1],s=t[2],o=r[0],a=r[1],c=r[2];return e[0]=i*c-s*a,e[1]=s*o-n*c,e[2]=n*a-i*o,e},lerp:function(e,t,r,n){var i=t[0],s=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=s+n*(r[1]-s),e[2]=o+n*(r[2]-o),e},hermite:function(e,t,r,n,i,s){var o=s*s,a=o*(2*s-3)+1,c=o*(s-2)+s,u=o*(s-1),l=o*(3-2*s);return e[0]=t[0]*a+r[0]*c+n[0]*u+i[0]*l,e[1]=t[1]*a+r[1]*c+n[1]*u+i[1]*l,e[2]=t[2]*a+r[2]*c+n[2]*u+i[2]*l,e},bezier:function(e,t,r,n,i,s){var o=1-s,a=o*o,c=s*s,u=a*o,l=3*s*a,d=3*c*o,h=c*s;return e[0]=t[0]*u+r[0]*l+n[0]*d+i[0]*h,e[1]=t[1]*u+r[1]*l+n[1]*d+i[1]*h,e[2]=t[2]*u+r[2]*l+n[2]*d+i[2]*h,e},random:function(e,t){var r=U;t=t||1;var n=2*p[r(404)]()*Math.PI,i=2*d()-1,s=Math[r(399)](1-i*i)*t;return e[0]=Math.cos(n)*s,e[1]=Math[r(418)](n)*s,e[2]=i*t,e},transformMat4:function(e,t,r){var n=t[0],i=t[1],s=t[2],o=r[3]*n+r[7]*i+r[11]*s+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*s+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*s+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*s+r[14])/o,e},transformMat3:function(e,t,r){var n=t[0],i=t[1],s=t[2];return e[0]=n*r[0]+i*r[3]+s*r[6],e[1]=n*r[1]+i*r[4]+s*r[7],e[2]=n*r[2]+i*r[5]+s*r[8],e},transformQuat:function(e,t,r){var n=r[0],i=r[1],s=r[2],o=r[3],a=t[0],c=t[1],u=t[2],l=i*u-s*c,d=s*a-n*u,h=n*c-i*a,f=i*h-s*d,p=s*l-n*h,m=n*d-i*l,v=2*o;return l*=v,d*=v,h*=v,f*=2,p*=2,m*=2,e[0]=a+l+f,e[1]=c+d+p,e[2]=u+h+m,e},rotateX:function(e,t,r,n){var i=U,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[0],o[1]=s[1]*Math[i(416)](n)-s[2]*Math[i(418)](n),o[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateY:function(e,t,r,n){var i=U,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[2]*Math[i(418)](n)+s[0]*Math[i(416)](n),o[1]=s[1],o[2]=s[2]*Math[i(416)](n)-s[0]*Math.sin(n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateZ:function(e,t,r,n){var i=U,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),o[1]=s[0]*Math.sin(n)+s[1]*Math[i(416)](n),o[2]=s[2],e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},angle:function(e,t){var r=U,n=e[0],i=e[1],s=e[2],o=t[0],a=t[1],c=t[2],u=Math[r(399)](n*n+i*i+s*s)*Math[r(399)](o*o+a*a+c*c),l=u&&O(e,t)/u;return Math[r(401)](Math.min(Math.max(l,-1),1))},zero:function(e){return e[0]=0,e[1]=0,e[2]=0,e},str:function(e){return U(414)+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},equals:function(e,t){var r=U,n=e[0],i=e[1],s=e[2],o=t[0],a=t[1],c=t[2];return Math[r(423)](n-o)<=p[r(419)]*Math[r(420)](1,Math.abs(n),Math[r(423)](o))&&Math.abs(i-a)<=p[r(419)]*Math[r(420)](1,Math.abs(i),Math[r(423)](a))&&Math.abs(s-c)<=p[r(419)]*Math[r(420)](1,Math[r(423)](s),Math[r(423)](c))},sub:H,mul:j,div:V,dist:W,sqrDist:$,len:G,sqrLen:q,forEach:K});function X(e,t){var r=Y();return(X=function(e,t){return r[e-=482]})(e,t)}function Y(){var e=["1580730xbNWCY","60pDJaRU","53478CixmLT","3829riHRpk","3477695TofDuE","7763760ONCHfc","12IbWXTo","6550WPxDoR","1952jNhUMI","42oiocnB","1553931JGZMlJ","29359RtqspJ","546HGjKhL"];return(Y=function(){return e})()}function Z(){const e=["TEXTURE_WRAP_T","isyuv","TEXTURE2","createProgram","program","lookAt","665plJTgA","uniformLocations","bindTexture","ELEMENT_ARRAY_BUFFER","texImage2D","uModelMatrix","attachShader","fromValues","LINK_STATUS","deleteTexture","clearDepth","UNPACK_ALIGNMENT","drawElements","utexture","uniformMatrix4fv","rgbatexture","concat","createShader","enable","386EqXLwZ","yTexture","modelMatrix","rgbaTexture","CLAMP_TO_EDGE","UNSIGNED_BYTE","STATIC_DRAW","ARRAY_BUFFER","LEQUAL","FLOAT","\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n ","createBuffer","texParameteri","activeTexture","position","getShaderParameter","DEPTH_BUFFER_BIT","getProgramInfoLog","aVertexPosition","texturePosition","842721RiWYtd","98020TqPnrU","aTexturePosition","deleteProgram","vtexture","TEXTURE0","ytexture","FRAGMENT_SHADER","log","getUniformLocation","\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n ","create","TEXTURE1","uViewMatrix","4rmypYb","attribLocations","TEXTURE_MIN_FILTER","TEXTURE_MAG_FILTER","bindBuffer","projectionMatrix","pixelStorei","LUMINANCE","31GQaYJm","bufferData","2411649OhhjAs","uTexture","COLOR_BUFFER_BIT","vertexPosition","6ZfJMuK","1810072SABCQj","viewMatrix","clearColor","viewport","vertexAttribPointer","COMPILE_STATUS","671853bKRivW","LINEAR","40glzYdf","getAttribLocation","deleteBuffer","An error occurred compiling the shaders: ","slice","TEXTURE_2D","texPosition","uniform1i","TEXTURE_WRAP_S"];return(Z=function(){return e})()}function Q(e,t){const r=Z();return(Q=function(e,t){return r[e-=381]})(e,t)}!function(e,t){for(var r=X,n=e();;)try{if(935348===parseInt(r(494))/1*(parseInt(r(490))/2)+-parseInt(r(488))/3*(-parseInt(r(484))/4)+parseInt(r(483))/5+-parseInt(r(491))/6*(parseInt(r(487))/7)+-parseInt(r(486))/8*(-parseInt(r(493))/9)+parseInt(r(485))/10*(-parseInt(r(489))/11)+parseInt(r(492))/12*(-parseInt(r(482))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Y),function(e,t){const r=Q,n=e();for(;;)try{if(137911===parseInt(r(382))/1*(-parseInt(r(431))/2)+-parseInt(r(395))/3+parseInt(r(465))/4*(parseInt(r(452))/5)+-parseInt(r(388))/6*(-parseInt(r(412))/7)+-parseInt(r(389))/8+parseInt(r(384))/9+-parseInt(r(397))/10*(-parseInt(r(451))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Z);var ee=(e,t)=>{const r=Q,n=r(461),i=r(441);t&&e[r(471)](e[r(423)],1);const s=function(){const t=r,s=f(e.VERTEX_SHADER,n),o=f(e[t(458)],i),a=e[t(409)]();return e[t(418)](a,s),e[t(418)](a,o),e.linkProgram(a),e.getProgramParameter(a,e[t(420)])?a:(console[t(459)]("Unable to initialize the shader program: "+e[t(448)](a)),null)}();let o={program:s,attribLocations:{vertexPosition:e[r(398)](s,r(449)),texturePosition:e[r(398)](s,r(453))},uniformLocations:{projectionMatrix:e[r(460)](s,"uProjectionMatrix"),modelMatrix:e[r(460)](s,r(417)),viewMatrix:e[r(460)](s,r(464)),rgbatexture:e[r(460)](s,r(434)),ytexture:e[r(460)](s,r(432)),utexture:e[r(460)](s,r(385)),vtexture:e.getUniformLocation(s,"vTexture"),isyuv:e[r(460)](s,"isyuv")}},a=function(){const t=r,n=e[t(442)]();e[t(469)](e[t(438)],n);e[t(383)](e.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e[t(437)]);var i=[];i=i[t(428)]([0,1],[1,1],[1,0],[0,0]);const s=e[t(442)]();e[t(469)](e[t(438)],s),e.bufferData(e[t(438)],new Float32Array(i),e.STATIC_DRAW);const o=e[t(442)]();e[t(469)](e.ELEMENT_ARRAY_BUFFER,o);return e[t(383)](e[t(415)],new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{position:n,texPosition:s,indices:o}}(),c=h(),u=h(),l=h(),d=h();function h(){const t=r;let n=e.createTexture();return e[t(414)](e.TEXTURE_2D,n),e[t(443)](e.TEXTURE_2D,e[t(468)],e[t(396)]),e[t(443)](e[t(402)],e[t(467)],e[t(396)]),e[t(443)](e[t(402)],e[t(405)],e[t(435)]),e[t(443)](e.TEXTURE_2D,e[t(406)],e[t(435)]),n}function f(t,n){const i=r,s=e[i(429)](t);return e.shaderSource(s,n),e.compileShader(s),e[i(446)](s,e[i(394)])?s:(console.log(i(400)+e.getShaderInfoLog(s)),e.deleteShader(s),null)}function p(t,n){const i=r;e[i(392)](0,0,t,n),e[i(391)](0,0,0,0),e[i(422)](1),e[i(430)](e.DEPTH_TEST),e.depthFunc(e[i(439)]),e.clear(e[i(386)]|e[i(447)]);const s=T[i(462)]();A(s,-1,1,-1,1,.1,100);const c=T[i(462)]();m(c);const h=T[i(462)]();T[i(411)](h,J[i(419)](0,0,0),J[i(419)](0,0,-1),J[i(419)](0,1,0));{const t=3,r=e[i(440)],n=!1,s=0,c=0;e[i(469)](e[i(438)],a[i(445)]),e[i(393)](o[i(466)][i(387)],t,r,n,s,c),e.enableVertexAttribArray(o[i(466)][i(387)])}{const t=2,r=e[i(440)],n=!1,s=0,c=0;e[i(469)](e[i(438)],a[i(403)]),e[i(393)](o[i(466)].texturePosition,t,r,n,s,c),e.enableVertexAttribArray(o[i(466)][i(450)])}e[i(444)](e[i(456)]+3),e[i(414)](e[i(402)],u),e[i(444)](e[i(456)]+4),e[i(414)](e[i(402)],l),e[i(444)](e[i(456)]+5),e[i(414)](e.TEXTURE_2D,d),e.bindBuffer(e[i(415)],a.indices),e.useProgram(o[i(410)]),e[i(426)](o[i(413)][i(470)],!1,s),e.uniformMatrix4fv(o.uniformLocations[i(433)],!1,c),e[i(426)](o[i(413)][i(390)],!1,h),e.uniform1i(o[i(413)][i(427)],2),e[i(404)](o.uniformLocations[i(457)],3),e[i(404)](o[i(413)][i(425)],4),e[i(404)](o[i(413)][i(455)],5),e.uniform1i(o[i(413)][i(407)],1);{const t=6,r=e.UNSIGNED_SHORT,n=0;e[i(424)](e.TRIANGLES,t,r,n)}}return{render:function(t,n,i,s,o){const a=r;e.activeTexture(e[a(456)]),e.bindTexture(e[a(402)],u),e.texImage2D(e[a(402)],0,e[a(381)],t,n,0,e[a(381)],e[a(436)],i),e[a(444)](e[a(463)]),e.bindTexture(e[a(402)],l),e[a(416)](e[a(402)],0,e[a(381)],t/2,n/2,0,e[a(381)],e.UNSIGNED_BYTE,s),e[a(444)](e.TEXTURE2),e[a(414)](e[a(402)],d),e[a(416)](e[a(402)],0,e[a(381)],t/2,n/2,0,e[a(381)],e[a(436)],o),p(t,n)},renderYUV:function(t,n,i){const s=r;let o=i[s(401)](0,t*n),a=i[s(401)](t*n,t*n*5/4),c=i[s(401)](t*n*5/4,t*n*3/2);e[s(444)](e[s(456)]),e.bindTexture(e[s(402)],u),e[s(416)](e[s(402)],0,e[s(381)],t,n,0,e[s(381)],e.UNSIGNED_BYTE,o),e.activeTexture(e.TEXTURE1),e[s(414)](e[s(402)],l),e[s(416)](e[s(402)],0,e[s(381)],t/2,n/2,0,e[s(381)],e[s(436)],a),e.activeTexture(e[s(408)]),e[s(414)](e[s(402)],d),e[s(416)](e.TEXTURE_2D,0,e[s(381)],t/2,n/2,0,e[s(381)],e[s(436)],c),p(t,n)},destroy:function(){const t=r;e[t(454)](o[t(410)]),e[t(399)](a.position),e.deleteBuffer(a[t(403)]),e[t(399)](a.indices),e[t(421)](c),e[t(421)](u),e[t(421)](l),e.deleteTexture(d),o=null,a=null,c=null,u=null,l=null,d=null}}};const te=Ae;!function(e,t){const r=Ae,n=e();for(;;)try{if(867646===-parseInt(r(865))/1+parseInt(r(421))/2*(parseInt(r(843))/3)+parseInt(r(412))/4+parseInt(r(760))/5*(parseInt(r(593))/6)+-parseInt(r(566))/7*(parseInt(r(799))/8)+parseInt(r(444))/9*(-parseInt(r(491))/10)+-parseInt(r(866))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Je);const re={websocket:1,fetch:2,hls:3,webrtc:4,webTransport:5,aliyunRtc:6,ts:7};te(654),te(793),te(867),te(518);const ne={fetch:te(473),hls:te(793),websocket:te(654),webrtc:te(867),webTransport:"webTransport",worker:te(889),aliyunRtc:te(518),mp4:te(809)},ie={player:te(622),playerAudio:te(488),playbackTF:te(590),talk:te(463),playVod:te(466)},se={mp4:"mp4",webm:"webm",flv:te(479),mov:"mov"},oe={flv:te(479),m7s:"m7s",hls:"hls",webrtc:te(867),webTransport:te(583),nakedFlow:te(697),fmp4:te(437),mpeg4:te(805),aliyunRtc:te(518),ts:"ts",g711:te(785),pcm:te(817)};te(482),te(587),te(506),te(798),te(633);const ae={mse:te(576),wcs:te(797),offscreen:te(544),wasm:te(570),simd:te(459),mt:"mt",webrtc:te(867),hls:te(793),aliyunRtc:te(518)},ce=(te(592),"video"),ue={debug:te(492),warn:"warn"},le={click:te(876),mouseDownAndUp:te(747)},de={normal:te(769),simple:te(610)},he={normal:te(769),small:te(807)},fe=te(550),pe=te(678),me=36e5,ve=4080,ye=12;te(453),te(536);const ge={playIsNotPauseOrUrlIsNull:te(842),webglAlignmentError:"Webgl 渲染失败",webglContextLostError:"webgl 上下文丢失",mediaSourceH265NotSupport:te(839),mseSourceBufferFull:te(551),mediaSourceAppendBufferError:te(707),mseSourceBufferError:te(649),mseAddSourceBufferError:te(707),mseWorkerAddSourceBufferError:te(707),mediaSourceDecoderConfigurationError:te(707),mediaSourceTsIsMaxDiff:te(722),mseWidthOrHeightChange:te(722),mediaSourceAudioG711NotSupport:te(708),mediaSourceAudioInitTimeout:te(469),mediaSourceAudioNoDataTimeout:te(430),mediaSourceUseCanvasRenderPlayFailed:te(705),mediaSourceBufferedIsZeroError:te(722),webcodecsH265NotSupport:te(839),webcodecsUnsupportedConfigurationError:te(707),webcodecsDecodeConfigureError:te(707),webcodecsDecodeError:te(649),webcodecsAudioInitTimeout:te(469),webcodecsAudioNoDataTimeout:te(430),wcsWidthOrHeightChange:te(649),wasmDecodeError:te(649),simdDecodeError:te(649),wasmWidthOrHeightChange:"流异常",wasmUseVideoRenderError:te(510),videoElementPlayingFailed:"video自动渲染失败",simdH264DecodeVideoWidthIsTooLarge:te(794),networkDelayTimeout:"网络超时重播失败",fetchError:te(450),streamEnd:"请求结束",websocket1006Error:"流异常结束",websocketError:te(450),webrtcError:te(450),hlsError:te(450),decoderWorkerInitError:te(669),decoderWorkerWasmError:te(744),videoElementPlayingFailedForWebrtc:te(510),videoInfoError:te(611),webrtcStreamH265:"webrtc不支持H265",delayTimeout:"播放超时重播失败",loadingTimeout:"加载超时重播失败",loadingTimeoutRetryEnd:te(696),delayTimeoutRetryEnd:"播放超时重播失败",flvDemuxBufferSizeTooLarge:te(771),audioChannelError:te(586),aliyunRtcError:te(450),mseWaitVideoCanplayTimeout:te(722),initDecoderWorkerTimeout:"初始化解码worker超时"},_e={playType:ie[te(622)],videoBuffer:1e3,videoBufferDelay:1e3,networkDelay:1e4,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isFmp4:!1,isWebrtc:!1,isWebrtcForZLM:!1,isWebrtcForSRS:!1,webrtcForSRSBySDK:!1,isWebrtcForOthers:!1,isNakedFlow:!1,isMpeg4:!1,isAliyunRtc:!1,isTs:!1,debug:!1,debugLevel:ue.warn,debugUuid:"",isMulti:!0,multiIndex:-1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,pageVisibilityHiddenTimeout:300,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,heartTimeoutReplayUseLastFrameShow:!0,replayUseLastFrameShow:!0,replayShowLoadingIcon:!1,supportDblclickFullscreen:!1,showBandwidth:!1,showPerformance:!1,mseCorrectTimeDuration:20,mseCorrectAudioTimeDuration:20,keepScreenOn:!0,isNotMute:!1,muted:!0,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1,ptz:!1,quality:!1,zoom:!1,close:!1,scale:!1,performance:!1,logSave:!1,aiFace:!1,aiObject:!1,aiOcclusion:!1,fullscreenFn:null,fullscreenExitFn:null,screenshotFn:null,playFn:null,pauseFn:null,recordFn:null,recordStopFn:null},extendOperateBtns:[],contextmenuBtns:[],watermarkConfig:{},controlAutoHide:!1,controlAutoHideDelayTime:5,hasControl:!1,controlSize:he[te(769)],loadingIcon:!0,loadingIconStyle:{},loadingText:"",background:"",poster:"",backgroundLoadingShow:!0,loadingBackground:"",loadingBackgroundWidth:0,loadingBackgroundHeight:0,decoder:te(732),decoderOld:te(887),decoderAudio:te(618),decoderHard:"decoder-pro-hard.js",decoderHardNotWasm:te(546),wasmMp4RecorderDecoder:te(514),decoderWASM:"",isDecoderUseCDN:!1,url:"",rotate:0,mirrorRotate:te(703),aspectRatio:te(632),playbackConfig:{playList:[],fps:"",autoCalcFps:!0,showControl:!0,controlType:de.normal,duration:0,startTime:"",showRateBtn:!1,rateConfig:[],showPrecision:"",showPrecisionBtn:!0,isCacheBeforeDecodeForFpsRender:!1,uiUsePlaybackPause:!1,isPlaybackPauseClearCache:!0,isUseFpsRender:!1,isUseLocalCalculateTime:!1,localOneFrameTimestamp:40,supportWheel:!1,useWCS:!1,useMSE:!1,useSIMD:!0},qualityConfig:[],defaultStreamQuality:"",scaleConfig:["拉伸","缩放","正常"],forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:re.fetch,demuxType:oe[te(479)],useWasm:!1,useOldWasm:!1,useMSE:!1,useWCS:!1,useSIMD:!0,isFFmpegSIMD:!1,useMThreading:!1,preferredHardDecode:!1,wcsUseVideoRender:!0,wcsUseWebgl2Render:!1,wasmUseVideoRender:!0,mseUseCanvasRender:!1,hlsUseCanvasRender:!1,webrtcUseCanvasRender:!1,useOffscreen:!1,useWebGPU:!1,useWebCanvas:!1,mseDecodeErrorReplay:!0,wcsDecodeErrorReplay:!0,wasmDecodeErrorReplay:!0,simdDecodeErrorReplay:!0,simdDecodeErrorReplayType:ae[te(570)],autoWasm:!0,decoderErrorAutoWasm:!1,hardDecodingNotSupportAutoWasm:!0,webglAlignmentErrorReplay:!0,webglContextLostErrorReplay:!0,openWebglAlignment:!1,syncAudioAndVideo:!0,syncAudioAndVideoDiff:400,playbackDelayTime:1e3,playbackFps:25,playVodFps:25,playbackForwardMaxRateDecodeIFrame:4,playbackCurrentTimeMove:!0,useVideoRender:!0,useCanvasRender:!1,videoRenderType:"",networkDelayTimeoutReplay:!1,recordType:se[te(809)],checkFirstIFrame:!0,nakedFlowFps:25,audioEngine:null,isShowRecordingUI:!0,isShowZoomingUI:!0,useFaceDetector:!1,useObjectDetector:!1,useImageDetector:!1,useOcclusionDetector:!1,ptzPositionConfig:{},ptzShowType:te(800),ptzClickType:le[te(876)],ptzStopEmitDelay:.3,ptzZoomShow:!1,ptzApertureShow:!1,ptzFocusShow:!1,ptzMoreArrowShow:!1,ptzCruiseShow:!1,ptzFogShow:!1,ptzWiperShow:!1,ptzSupportDraggable:!1,weiXinInAndroidAudioBufferSize:4800,isCryptoAudio:!1,isM7sCrypto:!1,isSm4Crypto:!1,isSm4CryptoH265V2:!1,isXorCrypto:!1,sm4CryptoKey:"",m7sCryptoKey:"",xorCryptoKey:"",cryptoKey:"",cryptoIV:"",cryptoKeyUrl:"",listenWindowResizeAuoResize:!0,orientationChangeResize:!1,useWebFullScreen:!1,ptsMaxDiff:3600,aiFaceDetectLevel:2,aiFaceDetectWidth:240,aiFaceDetectEmitBase64:!1,aiFaceDetectShowRect:!0,aiFaceDetectInterval:1e3,aiFaceDetectRectConfig:{},aiObjectDetectLevel:2,aiObjectDetectWidth:240,aiObjectDetectShowRect:!0,aiObjectDetectInterval:1e3,aiObjectDetectRectConfig:{},aiObjectDetectTarget:"",aiOcclusionDetectInterval:1e3,aiImageDetectDrop:!1,aiImageDetectActive:!1,videoRenderSupportScale:!0,mediaSourceTsIsMaxDiffReplay:!0,controlHtml:"",isH265:!1,isWebrtcH265:!1,supportLockScreenPlayAudio:!0,supportHls265:!0,hls265ForceFixLargeGap:!0,isEmitSEI:!1,pauseAndNextPlayUseLastFrameShow:!1,demuxUseWorker:!0,playFailedAndReplay:!0,showMessageConfig:ge,videoElementPlayingFailedReplay:!0,mp4RecordUseWasm:!0,mseAutoCleanupSourceBuffer:!0,mseAutoCleanupMaxBackwardDuration:30,mseAutoCleanupMinBackwardDuration:10,widthOrHeightChangeReplay:!0,simdH264DecodeVideoWidthIsTooLargeReplay:!0,mediaSourceAudioG711NotSupportReplay:!0,mediaSourceAudioInitTimeoutReplay:!0,mediaSourceAudioNoDataTimeoutReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplayType:ce,webcodecsAudioInitTimeoutReplay:!0,webcodecsAudioNoDataTimeoutReplay:!0,widthOrHeightChangeReplayDelayTime:0,ghostWatermarkConfig:{on:5,off:5,content:"",fontSize:12,color:"white",opacity:.15,speed:.2},dynamicWatermarkConfig:{content:"",speed:.2,fontSize:12,color:te(543),opacity:.15},isDropSameTimestampGop:!1,mseDecodeAudio:!0,wcsDecodeAudio:!0,nakedFlowH265DemuxUseNew:!0,nakedFlowDemuxUseNew:!0,extendDomConfig:{html:"",showBeforePlay:!1,showAfterLoading:!0},disableContextmenu:!1,mseDecoderUseWorker:!0,openMemoryLog:!1,mainThreadFetchUseWorker:!0,playFailedAndPausedShowPlayBtn:!0,mseCorrectionTimestamp:!0,flvDemuxBufferSizeTooLargeReplay:!1,flvDemuxBufferSizeTooLargeEmitFailed:!1,flvDemuxBufferSizeMaxLarge:1048576,isCheckInView:!1,hiddenControl:!1,androidMobileFullscreenRotate:!0,disableModule:{ptz:!1,record:!1,zoom:!1,watermark:!1,playback:!1},recordWebMSupportSeek:!1,wasmPlayAudioUseVideoRender:!1,mseWaitVideoCanplayTimeout:6,mseWaitVideoCanplayAutoWasm:!0,zoomMaxScale:5,zoomSupportGestureInMobile:!1,zoomSupportGestureInMobileSpeed:.2,drawingRectColor:"red",drawingRectLineWidth:1,drawingRectEndRemoveDom:!0,videoSEISyncPtsDiff:.2,initShowPlayBtn:!1,playbackCheckStreamEnd:!0,autoUseSystemFullScreen:!0,playVodConfig:{showRateBtn:!1,rateConfig:[],useWCS:!1,useMSE:!0,useSIMD:!0,startTime:null},playVodForwardMaxRateDecodeIFrame:8,playVodEndedAndAutoReplay:!1,playVodEndedAndShowPlayBtn:!0,hotKeyVolumeStep:.05,hotKeySeekStep:5,websocketOpenTimeout:8,i18n:{},screenshotUseHighQuality:!1,requestAnimationFrameMaxDiff:800,isUseFileProtocol:!1};te(651),te(852),te(795),te(646),te(813),te(485),te(727),te(644),te(780),te(505),te(516),te(531),te(748),te(810),te(830),te(441),te(893),te(497),te(655),te(638),te(545),te(715),te(422);const be={init:te(559),initVideo:"initVideo",render:te(487),playAudio:te(574),initAudio:te(451),kBps:te(665),decode:te(827),audioCode:te(657),audioNalu:te(818),audioAACSequenceHeader:"audioAACSequenceHeader",videoCode:te(863),videoCodec:te(782),videoNalu:"videoNalu",videoPayload:te(527),audioPayload:te(871),wasmError:te(474),workerFetch:te(752),iframeIntervalTs:"iframeIntervalTs",isDropping:te(462),workerEnd:te(857),networkDelay:te(685),playbackStreamVideoFps:te(695),wasmWidthOrHeightChange:"wasmWidthOrHeightChange",simdDecodeError:"simdDecodeError",simdH264DecodeVideoWidthIsTooLarge:te(541),websocketOpen:te(629),websocketStringMsg:te(898),closeEnd:te(880),tempStream:"tempStream",videoSEI:"videoSEI",flvScriptData:te(811),aacSequenceHeader:te(779),videoSequenceHeader:te(691),flvBufferData:te(604),checkFirstIFrame:"checkFirstIFrame",mseHandle:te(736),mseFirstRenderTime:te(716),mseError:"mseError",notSupportNewWasm:te(758),failedToAsynchronouslyPrepareWasm:te(781)},we={audio:1,video:2},Se={audio:8,video:9,scriptData:18},Ie={init:te(559),decode:te(827),audioDecode:te(836),videoDecode:te(763),initAudioCodec:te(535),initVideoCodec:te(833),close:te(526),updateConfig:te(575),resetDecode:te(458),clearBuffer:"clearBuffer",resetAudioDecode:te(522),resetVideoDecode:te(464),fetchStream:"fetchStream",sendWsMessage:te(693),mseUpdateVideoTimestamp:te(578),playbackIsPause:"playbackIsPause"};function Ae(e,t){const r=Je();return(Ae=function(e,t){return r[e-=410]})(e,t)}te(414),te(750),te(821),te(735),te(584),te(559),te(473),te(549),te(414),te(515),te(750),te(791),te(730),te(629),te(898);const Ee={fullscreen:te(627),fullScreenByStart:te(751),webFullscreen:te(472),decoderWorkerInit:"decoderWorkerInit",play:te(819),playing:te(613),pause:te(521),mute:te(563),load:te(702),loading:"loading",zooming:te(436),drawingRect:te(507),drawingRectInfo:te(896),videoInfo:te(647),timeUpdate:te(468),audioInfo:te(718),log:te(623),error:te(589),kBps:te(665),timeout:"timeout",delayTimeout:te(621),delayTimeoutRetryEnd:te(517),loadingTimeout:te(422),loadingTimeoutRetryEnd:"loadingTimeoutRetryEnd",stats:te(673),performance:"performance",videoSmooth:te(675),faceDetectActive:te(560),objectDetectActive:te(684),occlusionDetectActive:te(628),imageDetectActive:"imageDetectActive",record:te(786),recording:te(598),recordingTimestamp:"recordingTimestamp",recordStart:te(860),recordEnd:te(637),recordCreateError:te(582),recordBlob:"recordBlob",recordCancel:te(434),buffer:te(750),videoFrame:te(899),videoSEI:"videoSEI",videoSEISyncPts:te(826),start:te(619),metadata:te(738),resize:te(534),volumechange:te(539),volume:"volume",destroy:te(414),beforeDestroy:te(476),streamEnd:"streamEnd",streamRate:te(530),streamAbps:te(668),streamVbps:te(700),streamDts:"streamDts",streamSuccess:"streamSuccess",streamMessage:te(724),streamError:"streamError",streamStats:"streamStats",streamEndInner:"streamEndInner",mseSourceOpen:"mseSourceOpen",mseSourceClose:te(490),mseSourceended:te(431),mseSourceStartStreaming:te(720),mseSourceEndStreaming:te(461),mseSourceBufferError:te(561),mseAddSourceBufferError:te(562),mseWorkerAddSourceBufferError:te(687),mseSourceBufferBusy:te(585),mseSourceBufferFull:te(864),videoWaiting:te(683),videoTimeUpdate:te(859),videoSyncAudio:te(501),playToRenderTimes:te(513),playbackTime:te(653),playbackTimestamp:te(783),playbackTimeScroll:"playbackTimeScroll",playbackPrecision:"playbackPrecision",playbackShowPrecisionChange:"playbackShowPrecisionChange",playbackJustTime:"playbackJustTime",playbackStats:te(606),playbackSeek:te(753),playbackPause:te(626),playbackPauseOrResume:te(746),playbackRateChange:te(624),playbackPreRateChange:"playbackPreRateChange",playbackEndInner:te(635),playbackEnd:te(666),playVodStats:"playVodStats",playVodPause:"playVodPause",playVodPauseOrResume:te(512),playVodRateChange:te(820),playVodTime:te(634),playVodTimeCache:te(676),playVodSeek:te(554),playVodSeekEnd:te(721),playVodVideoSeekingByMse:"playVodVideoSeekingByMse",playVodVideoSeekedByMse:te(890),playVodCanplay:te(878),playVodWaiting:te(690),playVodEndedAndReplay:"playVodEndedAndReplay",playVodEnded:te(605),ptz:"ptz",streamQualityChange:te(615),visibilityChange:te(432),netBuf:te(630),close:te(526),networkDelayTimeout:te(425),togglePerformancePanel:te(847),viewResizeChange:te(569),flvDemuxBufferSizeTooLarge:te(868),talkGetUserMediaSuccess:te(815),talkGetUserMediaFail:te(706),talkGetUserMediaTimeout:"talkGetUserMediaTimeout",talkStreamStart:"talkStreamStart",talkStreamOpen:te(762),talkStreamClose:"talkStreamClose",talkStreamError:te(846),talkStreamInactive:te(681),talkStreamMsg:"talkStreamMsg",webrtcDisconnect:te(739),webrtcFailed:te(659),webrtcClosed:"webrtcClosed",webrtcChecking:te(770),webrtcConnected:te(806),webrtcCompleted:te(433),webrtcOnConnectionStateChange:te(480),webrtcOnIceConnectionStateChange:te(612),crashLog:te(509),focus:"focus",blur:te(470),inView:te(894),visibilityHiddenTimeout:te(689),websocketOpen:te(629),websocketClose:"websocketClose",websocketError:"websocketError",websocketStringMsg:te(898),aiObjectDetectorInfo:te(741),aiFaceDetectorInfo:te(861),aiOcclusionDetectResult:"aiOcclusionDetectResult",aiImageDetectResult:"aiImageDetectResult",playFailedAndPaused:te(851),audioResumeState:te(538),webrtcStreamH265:"webrtcStreamH265",flvMetaData:te(688),talkFailedAndStop:te(579),removeLoadingBgImage:te(435),memoryLog:"memoryLog",downloadMemoryLog:te(850),pressureObserverCpu:"pressureObserverCpu",currentPts:"currentPts",online:te(895),offline:te(872),networkState:te(523),clickInitPlayer:te(489)};te(702),te(468),te(647),te(718),te(715),te(677),te(517),te(528),te(472),te(521),te(563),te(673),te(591),te(582),te(639),te(434),te(513),te(753),te(606),te(783),te(746),te(445),te(624),te(503),te(605),te(512),te(634),te(554),te(553),te(615),te(509),te(903),te(689),te(629),te(898),te(741),te(861),te(603),te(555),te(538),te(494),te(826),te(688),te(480),te(612),te(855),te(675),te(523),te(489),te(723),te(846),te(681),te(777),te(579),te(882),te(702),te(468),te(718),te(589),te(715),te(677),te(621),te(517),te(819),te(521),te(563),te(513),te(509),te(629),te(851);const ke={talkStreamError:Ee[te(846)],talkStreamClose:Ee[te(723)]},Ce={playError:te(552),fetchError:te(821),fetchErrorWorker:"fetchErrorWorker",websocketError:te(791),websocketOpenTimeout:te(460),webcodecsH265NotSupport:te(656),webcodecsDecodeError:te(835),webcodecsUnsupportedConfigurationError:te(577),webcodecsDecodeConfigureError:te(905),webcodecsAudioInitTimeout:te(761),webcodecsAudioNoDataTimeout:te(429),mediaSourceH265NotSupport:te(594),mediaSourceAudioG711NotSupport:te(873),mediaSourceAudioInitTimeout:te(814),mediaSourceAudioNoDataTimeout:te(731),mediaSourceDecoderConfigurationError:te(410),mediaSourceFull:Ee[te(864)],mseSourceBufferError:Ee[te(561)],mseAddSourceBufferError:Ee[te(562)],mseWorkerAddSourceBufferError:Ee[te(687)],mediaSourceAppendBufferError:"mediaSourceAppendBufferError",mediaSourceTsIsMaxDiff:te(904),mediaSourceUseCanvasRenderPlayFailed:te(823),mediaSourceBufferedIsZeroError:te(484),wasmDecodeError:"wasmDecodeError",wasmUseVideoRenderError:te(671),simdH264DecodeVideoWidthIsTooLarge:te(541),simdDecodeError:te(442),hlsError:te(858),webrtcError:te(486),webrtcClosed:Ee[te(452)],webrtcIceCandidateError:te(568),webglAlignmentError:"webglAlignmentError",wasmWidthOrHeightChange:te(454),mseWidthOrHeightChange:te(888),wcsWidthOrHeightChange:te(884),widthOrHeightChange:te(415),tallWebsocketClosedByError:te(439),flvDemuxBufferSizeTooLarge:Ee[te(868)],audioChannelError:te(420),webglContextLostError:te(787),videoElementPlayingFailed:te(643),videoElementPlayingFailedForWebrtc:te(802),decoderWorkerInitError:te(682),decoderWorkerWasmError:te(856),videoInfoError:te(662),streamEnd:Ee[te(555)],websocket1006Error:te(790),delayTimeout:Ee[te(621)],loadingTimeout:Ee[te(422)],networkDelayTimeout:Ee[te(425)],fullscreenError:te(443),aliyunRtcError:te(775),mseWaitVideoCanplayTimeout:te(640),initDecoderWorkerTimeout:te(423),notSupportNewWasm:te(758),failedToAsynchronouslyPrepareWasm:te(781),playVodMp4Error:te(456),mp4Error:"mp4Error",...ke},Te={notConnect:"notConnect",open:te(844),close:"close",error:"error"},xe={connecting:0,open:1,closing:2,closed:3};te(596),te(804),te(558),te(558),te(500),te(506);const De={h264:7,h265:12,mpeg4:99},Be={h264:te(609),h265:te(500)},Pe={AAC:10,ALAW:7,MULAW:8,MP3:2,OPUS:13,G711A:7,G711U:8};te(599),te(572),te(686),te(599),te(772),te(726),te(742);const Me={sps:7,pps:8,iFrame:5,kUnspecified:0,kSliceNonIDR:1,kSliceDPA:2,kSliceDPB:3,kSliceDPC:4,kSliceIDR:5,kSliceSEI:6,kSliceSPS:7,kSlicePPS:8,kSliceAUD:9,kEndOfSequence:10,kEndOfStream:11,kFiller:12,kSPSExt:13,kReserved0:14},Ue={pFrame:1,kSliceBLA_W_LP:16,kSliceBLA_W_RADL:17,kSliceBLA_N_LP:18,iFrame:19,kSliceIDR_W_RADL:19,nLp:20,kSliceIDR_N_LP:20,craNut:21,kSliceCRA_NUT:21,kSliceRSV_IRAP_VCL22:22,kSliceRSV_IRAP_VCL23:23,vps:32,kSliceVPS:32,sps:33,kSliceSPS:33,pps:34,kSlicePPS:34,kSliceAUD:35,sei:39,prefixSei:39,suffixSei:40};te(832),te(614),te(822),te(719),te(576),te(793),te(592);const Fe={key:"key",delta:"delta"},Re={avc:'video/mp4; codecs="avc1.64002A"',hev:te(658),hev2:'video/mp4;codecs="hev1.1.6.L120.90"',hev3:te(565),hev4:te(625),hev5:te(870)},Le={ended:te(853),open:te(844),closed:te(495)};te(824),te(542),te(743),te(694),te(652),te(447),te(448),te(581),te(542),te(774),te(743),te(885),te(428),te(519),te(897),te(525),te(869),te(508),te(885),te(449),te(831),te(573),te(740),te(547),te(849),te(663),te(759),te(881),te(816),te(877),te(749),te(478);te(645),te(481),te(817),te(712);te(709),te(901);const Oe={sourceClose:te(698),sourceOpen:te(729),sourceended:te(607),startstreaming:"startstreaming",endstreaming:te(838),qualitychange:te(483)};te(620),te(588),te(616),te(713);const ze={h264:te(411),h265:"hevc",av1:"av1"};te(650),te(672),te(537),te(854),te(756);te(641),te(803);const Ne="AbortError";te(418),te(613),te(664);const He={sequenceHeader:0,nalu:1},je=1;te(504),te(661),te(891),te(902);te(556),te(717),te(844),te(589),te(440);te(745),te(704);te(600),te(891),te(532),te(829),te(745),te(745),te(704),te(595),te(533),te(438),te(848),te(788),te(801),te(773),te(601),te(728),te(636),te(502),te(886),te(764),te(417),te(825),te(617),te(520);const Ve={keyFrame:1,interFrame:2};te(488),te(829),te(473),te(479),te(837),te(792),te(529),te(754),te(710),te(834),te(776),te(608),te(757),te(548),te(648),te(766),te(499),te(892),te(446),te(427),te(725),te(874),te(900),te(883),te(424);const We={idle:te(567),connecting:te(477),buffering:"buffering",error:te(589),complete:te(493)};te(467),te(812),te(642),te(571),te(540);const $e={video:1,audio:2},Ge=128,qe={PACKET_TYPE_SEQ_START:0,PACKET_TYPE_FRAMES:1,PACKET_TYPE_SEQ_END:2,PACKET_TYPE_FRAMESX:3,PACKET_TYPE_METADATA:4},Ke={FT_KEY:16,FT_INTER:32};function Je(){const e=["webrtcOnConnectionStateChange","g711u","M7S","qualitychange","mediaSourceBufferedIsZeroError","replayUseLastFrameShow","webrtcError","render","playerAudio","clickInitPlayer","mseSourceClose","9310PtqjVX","debug","complete","videoSEI","closed","canplaythrough","ghostWatermarkConfig","seeking","sei","H265(HEVC)","videoSyncAudio","multiDragleave","playbackShowPrecisionChange","empty","isFmp4","MPEG4","drawingRect","right","crashLog","video自动渲染失败","Wasm","playVodPauseOrResume","playToRenderTimes","jessibuca-pro-mp4-recorder-decoder.js","destroyEnd","isMpeg4","delayTimeoutRetryEnd","aliyunRtc","left-up","video","pause","resetAudioDecode","networkState","停止录制","left-down","close","videoPayload","fullscreen","hls-manifest-loaded","streamRate","isNakedFlow","0000000000","#343434","resize","initAudioCodec","jbprovm","Decoder failure","audioResumeState","volumechange","NotAllowedError","simdH264DecodeVideoWidthIsTooLarge","halfHour","white","offscreen","videoRenderSupportScale","decoder-pro-hard-not-wasm.js","zoomNarrow","speed","sendMessage","JessibucaPro","缓冲区已满","playIsNotPauseOrUrlIsNull","ptz","playVodSeek","streamEnd","stream","self","blob","init","faceDetectActive","mseSourceBufferError","mseAddSourceBufferError","mute","suspend",'video/mp4;codecs="hev1.2.4.L120.90"',"310380BbqqNO","idle","webrtcIceCandidateError","viewResizeChange","wasm","audio packet","ALAW(g711a)","rightDown","playAudio","updateConfig","mse","webcodecsUnsupportedConfigurationError","mseUpdateVideoTimestamp","talkFailedAndStop","人脸识别激活","5min","recordCreateError","webTransport","fetchSuccess","mseSourceBufferBusy","音频通道错误","HLS","ratechange","error","playbackTF","recordingTimestamp","canvas","30300nLUhLh","mediaSourceH265NotSupport","active","buffering","local-candidate","recording","AAC","rtp","multiMousedown","人脸识别","aiImageDetectResult","flvBufferData","playVodEnded","playbackStats","sourceended","ttfb","H264(AVC)","simple","解析视频分辨率失败","webrtcOnIceConnectionStateChange","playing","webgl","streamQualityChange","progress","container","decoder-pro-audio.js","start","timeupdate","delayTimeout","player","log","playbackRateChange",'video/mp4;codecs="hev1.3.E.L120.90"',"playbackPause","fullscreen$2","occlusionDetectActive","websocketOpen","netBuf","remote-outbound-rtp","default","AliyunRtc","playVodTime","playbackEndInner","multiDragenter","recordEnd","defaultStreamQuality","recordBlob","mseWaitVideoCanplayTimeout","The user aborted a request","video decoder initialization failed","videoElementPlayingFailed","multiIndex","g711a","supportHls265","videoInfo","load-complete","解码失败","A key frame is required after configure() or flush()","playType","half-hour","playbackTime","websocket","watermarkConfig","webcodecsH265NotSupport","audioCode",'video/mp4; codecs="hev1.1.6.L123.b0"',"webrtcFailed","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C(wasm%E5%86%85%E9%83%A8%E4%BC%9A%E6%9A%82%E5%81%9C%E8%A7%A3%E7%A0%81)%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","jtt","videoInfoError","apertureNear","paused","kBps","playbackEnd","receiver","streamAbps","初始化worker失败","peer-connection","wasmUseVideoRenderError","Cannot call 'decode' on a closed codec","stats","性能面板激活","videoSmooth","playVodTimeCache","loadingTimeoutRetryEnd","20251201","webrtc-completed","FSimd","talkStreamInactive","decoderWorkerInitError","videoWaiting","objectDetectActive","networkDelay","MULAW(g711u)","mseWorkerAddSourceBufferError","flvMetaData","visibilityHiddenTimeout","playVodWaiting","videoSequenceHeader","seeked","sendWsMessage","one-hour","playbackStreamVideoFps","加载超时重播失败","nakedFlow","sourceclose","codec","streamVbps","遮挡物检查激活","load","none","script","MediaSource解码使用canvas渲染失败","talkGetUserMediaFail","初始化解码器失败","硬解码不支持G711a/u音频格式","image/png","demuxed-track","csrc","opus","loadedmetadata","durationchange","timeout","mseFirstRenderTime","playback","audioInfo","webgpu","mseSourceStartStreaming","playVodSeekEnd","流异常","talkStreamClose","streamMessage","sourcebuffer-created","MULAW","controlSize","multiMousemove","sourceopen","websocketClose","mediaSourceAudioNoDataTimeout","decoder-pro.js","物品识别","webrtc-closed","fetchErrorWorker","mseHandle","wcsDecodeError","metadata","webrtcDisconnect","zoomExpand","aiObjectDetectorInfo","MP3","fiveMin","wasm解码失败","worklet","playbackPauseOrResume","mouseDownAndUp","isHls","wiperOpen","buffer","fullScreenByStart","workerFetch","playbackSeek","hls-level-loaded","remote-inbound-rtp","Decoder error","load-start","notSupportNewWasm","focusFar","210EZjRMb","webcodecsAudioInitTimeout","talkStreamOpen","videoDecode","4-1","alaw","load-response-headers","object","电子放大","normal","webrtcChecking","FLV待解封装buffer过大","ALAW","multiMouseup","tenMin","aliyunRtcError","metadata-parsed","talkGetUserMediaTimeout","mp3","aacSequenceHeader","isFlv","failedToAsynchronouslyPrepareWasm","videoCodec","playbackTimestamp","sender","g711","record","webglContextLostError","multiSelected","global","websocket1006Error","websocketError","subtitle-segments","hls","不支持该分辨率的视频","isM7sCrypto","window","wcs","Webrtc","56aMgXvk","vertical","multiMouseover","videoElementPlayingFailedForWebrtc","AbortError","download","mpeg4","webrtcConnected","small","物品识别激活","mp4","isWebrtcForZLM","flvScriptData","MEDIA_ERR_DECODE","pauseAndNextPlayUseLastFrameShow","mediaSourceAudioInitTimeout","talkGetUserMediaSuccess","cruiseStart","pcm","audioNalu","play","playVodRateChange","fetchError","webgl2","mediaSourceUseCanvasRenderPlayFailed","oneHour","3-4","videoSEISyncPts","decode","操作盘激活","warn","isWebrtcForSRS","rightUp","webcodecs","initVideoCodec","flv-script-data","webcodecsDecodeError","audioDecode","decoder-pro-audio-player.js","endstreaming","不支持硬解码H265","transport","webrtc-checking","播放地址不能为空","24qkPCHm","open","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","talkStreamError","togglePerformancePanel","multiDblSelected","apertureFar","downloadMemoryLog","playFailedAndPaused","playbackForwardMaxRateDecodeIFrame","ended","Decoding error","currentPts","decoderWorkerWasmError","workerEnd","hlsError","videoTimeUpdate","recordStart","aiFaceDetectorInfo","webrtc-failed","videoCode","mseSourceBufferFull","852707LSMiDM","8017427JwDgrA","webrtc","flvDemuxBufferSizeTooLarge","right-down",'video/mp4;codecs="hev1.4.10.L120.90"',"audioPayload","offline","mediaSourceAudioG711NotSupport","switch-url-failed","退出全屏","click","fogOpen","playVodCanplay","candidate-pair","closeEnd","focusNear","talkStreamMsg","subtitle-playlist","wcsWidthOrHeightChange","down","3-1","decoder-pro-old.js","mseWidthOrHeightChange","worker","playVodVideoSeekedByMse","tcp","sei-in-time","isAliyunRtc","inView","online","drawingRectInfo","right-up","websocketStringMsg","videoFrame","switch-url-success","image/jpeg","udp","focus","mediaSourceTsIsMaxDiff","webcodecsDecodeConfigureError","mediaSourceDecoderConfigurationError","avc","6136492PSQygx","inbound-rtp","destroy","widthOrHeightChange","media-source","1-1","loading","remote-candidate","audioChannelError","401138HjMUaf","loadingTimeout","initDecoderWorkerTimeout","stream-parsed","networkDelayTimeout","ws1006","buffereos","left","webcodecsAudioNoDataTimeout","等待音频数据超时","mseSourceended","visibilityChange","webrtcCompleted","recordCancel","removeLoadingBgImage","zooming","fmp4","#000","tallWebsocketClosedByError","message","isWebrtcForOthers","simdDecodeError","fullscreenError","5715OHuSLJ","playbackPreRateChange","remove-buffer","30min","10min","leftUp","请求失败","initAudio","webrtcClosed","jbprov","wasmWidthOrHeightChange","waiting","playVodMp4Error","emptied","resetDecode","simd","websocketOpenTimeout","mseSourceEndStreaming","isDropping","talk","resetVideoDecode","遮挡物检查","playVod","MEDIA_ERR_ABORTED","timeUpdate","初始化音频解码器失败","blur","outbound-rtp","webFullscreen","fetch","wasmError","webrtc-disconnected","beforeDestroy","connecting","wiperClose","flv"];return(Je=function(){return e})()}te(879),te(699),te(711),te(413),te(597),te(471),te(670),te(667),te(419),te(755),te(631),te(784),te(556),te(840),te(416),te(426),te(737),te(765),te(778),te(712),te(841),te(679),te(475),te(862),te(734),te(418);const Xe="object"==typeof window&&window[te(796)]===window?window:typeof self===te(767)&&self[te(557)]===self?self:typeof global===te(767)&&global[te(789)]===global?global:void 0;te(496),te(493),te(714),te(457),te(713),te(521),te(819),te(613),te(616),te(588),te(692),te(498),te(564),te(620),te(539),te(455),te(875),te(524),te(828),te(768),te(674),te(602),te(580),te(733),te(808),te(465),te(701),te(511),te(680),te(845),te(660);var Ye="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ze(e,t){return e(t={exports:{}},t.exports),t.exports}var Qe=Object.freeze({__proto__:null,commonjsGlobal:Ye,commonjsRequire:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},unwrapExports:function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e},createCommonjsModule:Ze,getCjsExportFromNamespace:function(e){return e&&e.default||e}});function et(){var e=["375UZNjEl","exports","fullscreenEnabled","mozFullScreenElement","4KWuTyJ","MSFullscreenChange","exit","off","exitFullscreen","webkitRequestFullScreen","1502004aahOaA","18PSGbsb","msFullscreenEnabled","addEventListener","45561XBvTPH","8196744cdYubZ","undefined","webkitfullscreenerror","mozRequestFullScreen","webkitCancelFullScreen","length","request","createCommonjsModule","fullscreenElement","webkitfullscreenchange","msFullscreenElement","26826bewnAu","msExitFullscreen","isFullscreen","webkitRequestFullscreen","1755208NipdYA","then","webkitFullscreenEnabled","mozCancelFullScreen","isEnabled","webkitExitFullscreen","fullscreenerror","fullscreenchange","requestFullscreen","catch","webkitFullscreenElement","screenfull","documentElement","mozfullscreenchange","change","document","25433470xqPMZn","object","4452416EfcQfZ","bind"];return(et=function(){return e})()}function tt(e,t){var r=et();return(tt=function(e,t){return r[e-=466]})(e,t)}var rt=tt;function nt(){const e=["_total_bytes","readBits","1045311xNNOHB","getUint32","_buffer_index","ExpGolomb: readBits() bits exceeded max 32bits!","549068rCoTwC","_fillCurrentWord","set","35784zxVJnE","1625032uiRCuZ","min","2047338RCfhPq","readSEG","readUEG","_buffer","readByte","_total_bits","ExpGolomb: _fillCurrentWord() but no bytes available","byteLength","6999244ovlghO","_current_word_bits_left","_current_word","_skipLeadingZero","error","880865qoCVST","subarray"];return(nt=function(){return e})()}!function(e,t){for(var r=tt,n=e();;)try{if(830550===-parseInt(r(486))/1+-parseInt(r(480))/2*(parseInt(r(490))/3)+-parseInt(r(474))/4+parseInt(r(476))/5*(-parseInt(r(502))/6)+-parseInt(r(506))/7+-parseInt(r(491))/8+-parseInt(r(487))/9*(-parseInt(r(472))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(et),Qe[rt(498)]((function(e){var t,r,n,i,s,o;t=tt,r=typeof window!==t(492)&&void 0!==window[t(471)]?window[t(471)]:{},n="undefined"!==t(473)&&e[t(477)],i=function(){for(var e,n=t,i=[[n(514),n(484),"fullscreenElement",n(478),n(513),"fullscreenerror"],[n(505),n(511),n(466),n(508),n(500),n(493)],[n(485),n(495),"webkitCurrentFullScreenElement",n(495),n(500),"webkitfullscreenerror"],[n(494),n(509),n(479),"mozFullScreenEnabled",n(469),"mozfullscreenerror"],["msRequestFullscreen",n(503),n(501),n(488),n(481),"MSFullscreenError"]],s=0,o=i[n(496)],a={};s32&&console.error(t(216)),e<=this[t(232)]){let r=this._current_word>>>32-e;return this[t(233)]<<=e,this[t(232)]-=e,r}let r=this[t(232)]?this[t(233)]:0;r>>>=32-this[t(232)];let n=e-this._current_word_bits_left;this[t(218)]();let i=Math.min(n,this._current_word_bits_left),s=this[t(233)]>>>32-i;return this._current_word<<=i,this[t(232)]-=i,r=r<>>t))return this._current_word<<=t,this[e(232)]-=t,t;return this._fillCurrentWord(),t+this[e(234)]()}[it(225)](){const e=it;let t=this._skipLeadingZero();return this[e(212)](t+1)-1}[it(224)](){let e=this[it(225)]();return 1&e?e+1>>>1:-1*(e>>>1)}}const at=ft;!function(e,t){const r=ft,n=e();for(;;)try{if(213755===parseInt(r(278))/1*(-parseInt(r(235))/2)+parseInt(r(274))/3*(-parseInt(r(251))/4)+-parseInt(r(218))/5+parseInt(r(239))/6+-parseInt(r(261))/7*(-parseInt(r(220))/8)+parseInt(r(228))/9+-parseInt(r(283))/10*(-parseInt(r(272))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(yt);const ct=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1],ut=ct,lt=ct;function dt(e){let{profile:t,sampleRate:r,channel:n}=e;return new Uint8Array([175,0,t<<3|(14&r)>>1,(1&r)<<7|n<<3])}function ht(e){const t=ft;return pt(e)&&e[1]===He[t(242)]}function ft(e,t){const r=yt();return(ft=function(e,t){return r[e-=211]})(e,t)}function pt(e){return e[0]>>4===Pe.AAC}const mt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];function vt(e){const t=ft;let r=new Uint8Array(e),n=null,i=0,s=0,o=0,a=null;if(i=s=r[0]>>>3,o=(7&r[0])<<1|r[1]>>>7,o<0||o>=mt[t(227)])return void console[t(275)](t(243));let c=mt[o],u=(120&r[1])>>>3;if(u<0||u>=8)return void console.log("Flv: AAC invalid channel configuration");5===i&&(a=(7&r[1])<<1|r[2]>>>7,r[2]);let l=Xe.navigator[t(241)].toLowerCase();return-1!==l[t(255)]("firefox")?o>=6?(i=5,n=new Array(4),a=o-3):(i=2,n=new Array(2),a=o):-1!==l[t(255)](t(223))?(i=2,n=new Array(2),a=o):(i=5,a=o,n=new Array(4),o>=6?a=o-3:1===u&&(i=2,n=new Array(2),a=o)),n[0]=i<<3,n[0]|=(15&o)>>>1,n[1]=(15&o)<<7,n[1]|=(15&u)<<3,5===i&&(n[1]|=(15&a)>>>1,n[2]=(1&a)<<7,n[2]|=8,n[3]=0),{audioType:"aac",config:n,sampleRate:c,channelCount:u,objectType:i,codec:t(267)+i,originalCodec:t(267)+s}}at(221),at(249),at(264);function yt(){const e=["error","bufoff","push","1zSHwrL","sampling_index","other_data_present","Could not found ADTS syncword until payload end","channels","31410ahrkCb","bufpos","sampleRate: ","destroy","subarray","audioMuxVersionA is Not Supported","audio_object_type","sampling_frequency","1318740KRDakS","sbr","123848gtVivM","read","warn","android","eof_flag_","frameLengthType = ","readByte","length","3716649EOaimi","hasIncompleteData","data","channel_config","chan_config","more than 2 numSubFrames Not Supported","iserro","694418mDhZXw","getLATMValue","log","data_","1443408lHCPNe","byteLength","userAgent","sequenceHeader","Flv: AAC invalid sampling frequency index!",". Only frameLengthType = 0 Supported","StreamMuxConfig Missing","readBool","readNextAACFrame","sampling_freq_index","look","aacEncoderConfigurationRecord","32UKxEZE","findNextSyncwordOffset","ext_object_type","has_last_incomplete_data","indexOf","getIncompleteData","unshift","more than 2 numProgram Not Supported","buffer","more than 2 numLayer Not Supported","14fmBnuL","buflen","Invalid sampling index: ","read_golomb","channel: ","sample_rate","mp4a.40.","allStreamsSameTimeFraming zero is Not Supported","set","object_type","readBits","715HNKmgE","current_syncword_offset_","23979Tosoof"];return(yt=function(){return e})()}class gt{constructor(e){const t=at;this[t(238)]=e,this.eof_flag_=!1,this[t(273)]=this.findNextSyncwordOffset(0),this.eof_flag_&&console.error(t(281))}[at(252)](e){const t=at;let r=e,n=this[t(238)];for(;;){if(r+7>=n[t(240)])return this.eof_flag_=!0,n[t(240)];if(4095===(n[r+0]<<8|n[r+1])>>>4)return r;r++}}[at(247)](){const e=at;let t=this[e(238)],r=null;for(;null==r&&!this.eof_flag_;){let n=this[e(273)],i=(8&t[n+1])>>>3,s=(6&t[n+1])>>>1,o=1&t[n+1],a=(192&t[n+2])>>>6,c=(60&t[n+2])>>>2,u=(1&t[n+2])<<2|(192&t[n+3])>>>6,l=(3&t[n+3])<<11|t[n+4]<<3|(224&t[n+5])>>>5;if(t[n+6],n+l>this[e(238)][e(240)]){this.eof_flag_=!0,this[e(254)]=!0;break}let d=1===o?7:9,h=l-d;n+=d;let f=this[e(252)](n+h);if(this[e(273)]=f,0!==i&&1!==i||0!==s)continue;let p=t[e(214)](n,n+h);r={},r[e(216)]=a+1,r[e(248)]=c,r[e(217)]=ut[c],r[e(231)]=u,r[e(230)]=p}return r}[at(229)](){return this[at(254)]}[at(256)](){const e=at;return this[e(254)]?this[e(238)][e(214)](this[e(273)]):null}}class _t{constructor(e){const t=at;this[t(238)]=e,this[t(224)]=!1,this[t(273)]=this.findNextSyncwordOffset(0),this.eof_flag_&&console[t(275)](t(281))}[at(252)](e){const t=at;let r=e,n=this[t(238)];for(;;){if(r+1>=n[t(240)])return this[t(224)]=!0,n[t(240)];if(695===(n[r+0]<<3|n[r+1]>>>5))return r;r++}}[at(236)](e){const t=at;let r=e[t(271)](2),n=0;for(let i=0;i<=r;i++)n<<=8,n|=e[t(226)]();return n}[at(247)](e){const t=at;let r=this[t(238)],n=null;for(;null==n&&!this[t(224)];){let i=this[t(273)],s=(31&r[i+1])<<8|r[i+2];if(i+3+s>=this[t(238)][t(240)]){this.eof_flag_=!0,this[t(254)]=!0;break}let o=new ot(r[t(214)](i+3,i+3+s)),a=null;if(o[t(246)]()){if(null==e){console[t(222)](t(245)),this[t(273)]=this[t(252)](i+3+s),o.destroy();continue}a=e}else{let e=o.readBool();if(e&&o[t(246)]()){console[t(275)](t(215)),o.destroy();break}if(e&&this[t(236)](o),!o[t(246)]()){console.error(t(268)),o[t(213)]();break}if(0!==o.readBits(6)){console.error(t(233)),o[t(213)]();break}if(0!==o[t(271)](4)){console.error(t(258)),o[t(213)]();break}if(0!==o[t(271)](3)){console[t(275)](t(260)),o.destroy();break}let r=e?this[t(236)](o):0,n=o[t(271)](5);r-=5;let i=o.readBits(4);r-=4;let s=o[t(271)](4);r-=4,o[t(271)](3),r-=3,r>0&&o[t(271)](r);let c=o.readBits(3);if(0!==c){console[t(275)](t(225)+c+t(244)),o[t(213)]();break}o[t(226)]();let u=o[t(246)]();if(u)if(e)this.getLATMValue(o);else{let e=0;for(;;){e<<=8;let r=o.readBool();if(e+=o[t(226)](),!r)break}console[t(237)](e)}o[t(246)]()&&o.readByte(),a={},a.audio_object_type=n,a[t(248)]=i,a.sampling_frequency=ut[a[t(248)]],a[t(231)]=s,a.other_data_present=u}let c=0;for(;;){let e=o[t(226)]();if(c+=e,255!==e)break}let u=new Uint8Array(c);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:0;return(e[r]<<24>>>0)+(e[r+1]<<16)+(e[r+2]<<8)+(e[r+3]||0)}function St(e){const t=Et;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e[t(214)]<4)return[];const n=e[t(214)],i=[];let s,o=0;for(;o+r>>=8),o+=r,s){if(o+s>n)break;i[t(207)](e[t(211)](o,o+s)),o+=s}return i}function It(e){const t=Et;let r=arguments[t(214)]>1&&void 0!==arguments[1]&&arguments[1];const n=e[t(214)];let i=r?2:1,s=0,o=0,a="";for(;255===e[i];)s+=255,i++;for(s+=e[i++];255===e[i];)o+=255,i++;if(o+=e[i++],5===s&&n>i+16)for(let t=0;t<16;t++)a+=e[i].toString(16),i++;return{payload:e.subarray(i),type:s,size:o,uuid:a}}function At(e){const t=Et,r=e[t(204)],n=new Uint8Array(4);n[0]=r>>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r;const i=new Uint8Array(r+4);return i[t(209)](n,0),i[t(209)](e,4),i}function Et(e,t){const r=bt();return(Et=function(e,t){return r[e-=203]})(e,t)}function kt(e,t){const r=Et;let n=null;return t?e.length>=28&&(n=1+(3&e[26])):e[r(214)]>=12&&(n=1+(3&e[9])),n}!function(e,t){const r=Et,n=e();for(;;)try{if(392518===-parseInt(r(206))/1*(parseInt(r(216))/2)+-parseInt(r(205))/3*(-parseInt(r(210))/4)+-parseInt(r(208))/5+-parseInt(r(218))/6*(parseInt(r(219))/7)+-parseInt(r(212))/8+parseInt(r(203))/9+-parseInt(r(220))/10*(-parseInt(r(213))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(bt);const Ct=Yt;function Tt(){const e=Yt;return(new Date)[e(439)]()}function xt(e,t,r){const n=Yt;return Math[n(442)](Math[n(623)](e,Math[n(442)](t,r)),Math[n(623)](t,r))}function Dt(){const e=Yt;return performance&&typeof performance[e(565)]===e(558)?performance[e(565)]():Date[e(565)]()}function Bt(e){let t=0,r=Dt();return n=>{if(!function(e){const t=Ct;return Object[t(533)][t(410)][t(627)](e)===t(529)}(n))return;t+=n;const i=Dt(),s=i-r;s>=1e3&&(e(t/s*1e3),r=i,t=0)}}!function(e,t){const r=Yt,n=e();for(;;)try{if(432638===-parseInt(r(580))/1+parseInt(r(618))/2*(-parseInt(r(654))/3)+parseInt(r(570))/4*(-parseInt(r(455))/5)+-parseInt(r(687))/6*(-parseInt(r(727))/7)+-parseInt(r(518))/8*(parseInt(r(629))/9)+-parseInt(r(666))/10+parseInt(r(611))/11*(parseInt(r(723))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Xt),(()=>{const e=Yt;try{if(typeof WebAssembly===e(639)&&typeof WebAssembly[e(696)]===e(558)){const t=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(t instanceof WebAssembly[e(550)])return new WebAssembly.Instance(t)instanceof WebAssembly[e(624)]}}catch(e){}})();const Pt=Ct(521),Mt=Ct(488),Ut=Ct(540);Ct(521);const Ft=Pt===Ct(714);Ct(602);function Rt(e){return null==e}function Lt(e){return!Rt(e)}function Ot(e){return e&&"function"==typeof e}function zt(e){const t=Ct;let r=null,n=31&e[0];return(n===Me[t(605)]||n===Me.pps)&&(r=Be.h264),!r&&(n=(126&e[0])>>1,(n===Ue[t(718)]||n===Ue[t(605)]||n===Ue[t(539)])&&(r=Be[t(707)])),r}function Nt(){return typeof WritableStream!==Ct(697)}function Ht(e){e[Ct(563)]()}function jt(e,t){const r=Ct;t&&(e=e.filter((e=>e[r(636)]&&e[r(636)]===t)));let n=e[0],i=null,s=1;if(e[r(576)]>0){let t=e[1];t&&t.ts-n.ts>1e5&&(n=t,s=2)}if(n)for(let o=s;o=1e3){e[o-1].ts-n.ts<1e3&&(i=o+1)}}}return i}function Vt(e){return e.ok&&e.status>=200&&e.status<=299}function Wt(){return function(e){const t=Ct;let r="";if("object"==typeof e)try{r=JSON[t(457)](e),r=JSON[t(407)](r)}catch(t){r=e}else r=e;return r}(_e)}function $t(e){const t=Ct;return e[0]>>4===je&&e[1]===He[t(647)]}function Gt(e){return!0===e||e===Ct(650)}function qt(e){return!0!==e&&e!==Ct(650)}function Kt(){const e=Ct;return!!(Xe[e(485)]&&Xe[e(594)]&&e(698)in Xe[e(594)]&&!0===Xe[e(594)][e(698)])}function Jt(e,t){const r=Ct,n=St(e[r(479)](5));let i=!1;return n[r(501)]((e=>{const n=r,s=t?e[0]>>>1&63:31&e[0];(t&&(s===Ue.kSliceBLA_W_LP||s===Ue[n(554)]||s===Ue.kSliceBLA_N_LP||s===Ue[n(621)]||s===Ue[n(656)]||n(584),n(615),s===Ue[n(417)])||qt(t)&&s===Me[n(621)])&&(i=!0)})),i}function Xt(){const e=["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","toUpperCase","sequenceHeader","setInt32","win64","true","wow64","overflow","createTextNode","10239vuzwOd","dispatchEvent","nLp","target","Edge","userAgent","setHours","application/vnd.chromium.remoting-viewer","random","mozGetUserMedia","left","zIndex","3685180XdXcQj","touchstart","hash","VideoFrame","none","getImageData","byteLength","restore","revokeObjectURL","crossOrigin","webgl","createElement","string","charAt","xxxxxxxxxxxx4xxx","wow32","borderColor","edge","WAVE","AAC","event","33606wCLzcH","log","top","avc1.","createBuffer","PB/s","{y}-{m}-{d} {h}:{i}:{s}","getUint8","protocol","instantiate","undefined","canConstructInDedicatedWorker","numberOfFrames","Reserved SBR extensions is not implemented","isEnabled","ManagedMediaSource","fillText","substr","documentElement","bottom","h265","hev","[object Error]","xxxx","-webkit-touch-callout","paused","getContext",'"delaytime"',"set","getPropertyValue","f32-planar","vps","subarray","setUint32","wcsDecodeAudio","map","2076jMaWps","hour","-o-user-select","test","784zWDrYE","innerHTML","application/asx","getMonth","#000","origin","toDataURL","transferControlToOffscreen","backgroundColor","-webkit-text-size-adjust","getFullYear","playbackRate","application/javascript","src","element","getAttribute","mousedown","WebGL2RenderingContext","attachShadow","font","webgl2","fontSize","safari","imageSmoothingQuality","hev2","noteOn","image/png","px 宋体","parse","connect","copyright","toString","srcElement","toFixed","match","mousemove","insertBefore","message","kSliceRSV_IRAP_VCL23","mouseup","9999999","isConfigSupported","destination","open","setInt8","join","useMSE","360SE","onerror","not compiled with thread support","round","msFullscreenElement","100","textAlign","gpu","setUint16","application/360softmgrplugin","shadowRoot","canPlayType","touches","getTime","hev3","resume","max","line","performance","toLowerCase","script","charCodeAt","save","mediaDevices","opacity","search","-webkit-tap-highlight-color","mimeTypes","getElementById","38930eKZBid","demuxUseWorker","stringify","createBufferSource","color","createEvent","green","KB/s","children","borderStyle","document",'video/mp4; codecs="',"then","buffer","Bytes","QihooBrowser","filter","PressureObserver","WebGLRenderingContext","replace","download","supported","moz-webgl","getSeconds","slice","clientY","failed to asynchronously prepare wasm","application/hwepass2001.installepass2001","touchmove","0 KB/s","Worker","text","setInt16",'"2.1.3"',"[object Exception]","pageX","memory","firefox","VideoEncoder is not supported","readyState","start","getDay","onload","numberOfChannels","file","application/vnd.apple.mpegurl","forEach","dataset","objectFit","requestVideoFrameCallback","GB/s","div","illegal icc","drawImage","getUserMedia","strokeStyle","getParameter","video","QHBrowser","style","endsWith","user-select","visibility","16qpJHrq","Chrome","keys",'"production"',"application/mozilla-npqihooquicklogin","location","click","TB/s","lineWidth","Anonymous","setUint8","[object Number]","rect","data","hev1.1.6.L120.90","prototype","trim","VideoEncoder.isConfigSupported is not a function","Safari","navigator","webkitGetUserMedia","pps",'"1-2-2025"',"appendChild","AudioData","image","right","setAttribute","100%","push","substring","data-","Module","atob","fillStyle","scrollLeft","kSliceBLA_W_RADL","clientX","RIFF","version","function","MULAW","img","chrome","assign","close","useWCS","now","MediaStream","not compiled with thread support, using thread emulation","html","fromCharCode","68hpbqHZ","-moz-user-select","floor","solid","repeat","initEvent","length","high","ended","webm","177446HSDRxZ","validate","hev4","ActiveXObject","craNut","indexOf","ALAW","height","VideoEncoder.isConfigSupported() result is not supported","pow","isFullscreen","win32","putImageData","pageY","MediaSource","split","hev5","format","[object DOMException]","fullscreenElement","pathname","absolute","1738339200000","imageSmoothingEnabled","width","sps","opera","clearRect","block","mseDecodeAudio","href","51557NVqctr","isTypeSupported","px Arial","createObjectURL","kSliceRSV_IRAP_VCL22","contain","msGetUserMedia","14FRreVE","green yuv","content","iFrame","copyToChannel","min","Instance","localhost","second","call","URL","1364886vrZahu","angle","scrollTop","strokeRect","ZB/s","MediaStreamTrackGenerator","audioWorklet","type","removeChild","createImageBitmap","object","body","hostname","port","canvas","MB/s"];return(Xt=function(){return e})()}function Yt(e,t){const r=Xt();return(Yt=function(e,t){return r[e-=382]})(e,t)}function Zt(){return qt(Ft)}function Qt(e){return e>60*(Number("1")||1)*60*1e3&&Zt()}const er=rr;!function(e,t){const r=rr,n=e();for(;;)try{if(831836===-parseInt(r(397))/1+parseInt(r(423))/2+-parseInt(r(405))/3*(-parseInt(r(421))/4)+parseInt(r(420))/5+-parseInt(r(403))/6+-parseInt(r(392))/7*(-parseInt(r(415))/8)+-parseInt(r(399))/9*(-parseInt(r(414))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ar);var tr=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){const o=rr;function a(e){try{u(n.next(e))}catch(e){s(e)}}function c(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){const t=rr;var n;e[t(413)]?i(e[t(387)]):(n=e.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,c)}u((n=n[o(411)](e,t||[]))[o(390)]())}))};function rr(e,t){const r=ar();return(rr=function(e,t){return r[e-=383]})(e,t)}const nr=Symbol(32),ir=Symbol(16),sr=Symbol(8);class or{constructor(e){const t=er;this.g=e,this[t(400)]=0,e&&(this[t(417)]=e.next().value)}[er(412)](e){const t=er;this.g=e,this[t(402)](e[t(390)]()[t(387)],!0)}[er(401)](){const e=er;this[e(389)]&&this[e(400)]&&(this[e(389)].copyWithin(0,this[e(400)]),this[e(389)]=this[e(389)][e(419)](0,this.buffer[e(395)]-this[e(400)]),this[e(400)]=0)}demand(e,t){const r=er;return t&&this.consume(),this[r(417)]=e,this.flush()}read(e){return tr(this,void 0,void 0,(function*(){const t=rr;return this[t(410)]&&(yield this[t(410)]),this[t(410)]=new Promise(((r,n)=>{const i=t;var s;this[i(422)]=n,this[i(404)]=e=>{const t=i;delete this[t(410)],delete this.resolve,delete this[t(417)],r(e)};this[i(402)](e,!0)||null===(s=this.pull)||void 0===s||s.call(this,e)}))}))}[er(383)](){return this[er(393)](nr)}readU16(){return this.read(ir)}readU8(){return this[er(393)](sr)}close(){const e=er;var t;this.g&&this.g.return(),this[e(389)]&&this[e(389)][e(419)](0,0),null===(t=this.reject)||void 0===t||t[e(384)](this,new Error(e(388))),delete this[e(410)]}[er(385)](){const e=er;if(!this[e(389)]||!this[e(417)])return;let t=null;const r=this[e(389)].subarray(this[e(400)]);let n=0;const i=t=>r[e(395)]<(n=t);if(typeof this[e(417)]===e(406)){if(i(this[e(417)]))return;t=r[e(419)](0,n)}else if(this[e(417)]===nr){if(i(4))return;t=r[0]<<24|r[1]<<16|r[2]<<8|r[3]}else if(this[e(417)]===ir){if(i(2))return;t=r[0]<<8|r[1]}else if(this.need===sr){if(i(1))return;t=r[0]}else if(e(389)in this[e(417)]){if(e(416)in this[e(417)]){if(i(this[e(417)].byteLength-this.need[e(416)]))return;new Uint8Array(this[e(417)].buffer,this.need[e(416)])[e(409)](r[e(419)](0,n)),t=this[e(417)]}else if(this.g)return void this.g[e(394)](new Error(e(396)))}else{if(i(this[e(417)][e(398)]))return;new Uint8Array(this[e(417)]).set(r[e(419)](0,n)),t=this[e(417)]}return this.consumed+=n,this.g?this.demand(this.g[e(390)](t).value,!0):this.resolve&&this[e(404)](t),t}write(e){const t=er;if(e instanceof Uint8Array?this[t(391)](e.length)[t(409)](e):t(389)in e?this[t(391)](e.byteLength)[t(409)](new Uint8Array(e.buffer,e[t(416)],e[t(398)])):this[t(391)](e[t(398)])[t(409)](new Uint8Array(e)),!this.g&&!this[t(404)])return new Promise((e=>this[t(408)]=e));this[t(385)]()}writeU32(e){const t=er;this[t(391)](4)[t(409)]([e>>24&255,e>>16&255,e>>8&255,255&e]),this[t(385)]()}[er(418)](e){this[er(391)](2).set([e>>8&255,255&e]),this.flush()}writeU8(e){const t=er;this[t(391)](1)[0]=e,this[t(385)]()}malloc(e){const t=er;if(this[t(389)]){const r=this[t(389)][t(395)],n=r+e;if(n<=this[t(389)].buffer[t(398)]-this[t(389)][t(416)])this[t(389)]=new Uint8Array(this[t(389)][t(389)],this[t(389)][t(416)],n);else{const e=new Uint8Array(n);e[t(409)](this[t(389)]),this.buffer=e}return this.buffer[t(419)](r,n)}return this[t(389)]=new Uint8Array(e),this[t(389)]}}function ar(){const e=["throw","length","Unsupported type","1163527rQGhaj","byteLength","18HQuFot","consumed","consume","demand","6895776FreCoL","resolve","15dNpmDk","number","U32","pull","set","lastReadPromise","apply","setG","done","5768530IhbGsd","1120pXcTbE","byteOffset","need","writeU16","subarray","7334340OsEPWV","39568SnGvXa","reject","230770LEmkFu","readU32","call","flush","__awaiter","value","EOF","buffer","next","malloc","17962EKaYHu","read"];return(ar=function(){return e})()}function cr(){const e=["1738515sTDDMh","_opt","error","debug","7482442klvoCr","1566621RoMXdw","414814bzpxcx","63mnuYWy","debugUuid","2QtbbDf","[❗❗❗][","[✅✅✅][","6MyDyMF","24qJaxfF","212319QfganW","24112MvGCCw","[❌❌❌][","log","JbPro","1244800UsNRaH","warn","12mvXxsu","length","debugLevel"];return(cr=function(){return e})()}function ur(e,t){const r=cr();return(ur=function(e,t){return r[e-=462]})(e,t)}or[er(407)]=nr,or.U16=ir,or.U8=sr,function(e,t){const r=ur,n=e();for(;;)try{if(233217===parseInt(r(485))/1*(parseInt(r(464))/2)+parseInt(r(462))/3*(-parseInt(r(470))/4)+parseInt(r(479))/5*(parseInt(r(467))/6)+parseInt(r(484))/7+-parseInt(r(468))/8*(parseInt(r(469))/9)+parseInt(r(474))/10+-parseInt(r(483))/11*(parseInt(r(476))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(cr);class lr{constructor(e){const t=ur;this[t(472)]=function(r){const n=t;if(e._opt[n(478)]==ue.debug){const t=e._opt[n(463)]?"["+e[n(480)].debugUuid+"]":"";for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o1?i-1:0),o=1;o1?s-1:0),a=1;a=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(271)],0,s)}static[dr(279)](e){const t=dr;let r=pr._ebsp2rbsp(e),n=new ot(r);n[t(281)]();let i=n[t(281)]();n[t(281)]();let s=n[t(281)]();n[t(254)]();let o=pr[t(258)](i),a=pr[t(282)](s),c=1,u=420,l=[0,420,422,444],d=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(c=n[t(254)](),3===c&&n[t(262)](1),c<=3&&(u=l[c]),d=n[t(254)]()+8,n[t(254)](),n[t(262)](1),n[t(266)]())){let e=3!==c?8:12;for(let r=0;r0&&e<16?(w=r[e-1],S=i[e-1]):255===e&&(w=n.readByte()<<8|n[t(281)](),S=n[t(281)]()<<8|n.readByte())}if(n[t(266)]()&&n.readBool(),n.readBool()&&(n[t(262)](4),n[t(266)]()&&n[t(262)](24)),n.readBool()&&(n[t(254)](),n[t(254)]()),n[t(266)]()){let e=n.readBits(32),r=n[t(262)](32);A=n[t(266)](),E=r,k=2*e,I=E/k}}let C=1;(1!==w||1!==S)&&(C=w/S);let T=0,x=0;if(0===c)T=1,x=2-v;else{T=3===c?1:2,x=(1===c?2:1)*(2-v)}let D=16*(p+1),B=16*(m+1)*(2-v);D-=(y+g)*T,B-=(_+b)*x;let P=Math[t(274)](D*C);return n[t(283)](),n=null,{profile_string:o,level_string:a,bit_depth:d,ref_frames:f,chroma_format:u,chroma_format_string:pr.getChromaFormatString(u),frame_rate:{fixed:A,fps:I,fps_den:k,fps_num:E},sar_ratio:{width:w,height:S},codec_size:{width:D,height:B},present_size:{width:P,height:B}}}static[dr(273)](e){const t=dr;let r=e[t(284)](1,4),n=t(280);for(let e=0;e<3;e++){let i=r[e][t(277)](16);i[t(268)]<2&&(i="0"+i),n+=i}let i=pr[t(270)](e),s=new ot(i);s[t(281)]();let o=s[t(281)]();s.readByte();let a=s[t(281)]();s[t(254)]();let c=pr.getProfileString(o),u=pr[t(282)](a),l=1,d=420,h=[0,420,422,444],f=8,p=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(l=s.readUEG(),3===l&&s.readBits(1),l<=3&&(d=h[l]),f=s[t(254)]()+8,p=s.readUEG()+8,s[t(262)](1),s.readBool())){let e=3!==l?8:12;for(let r=0;r0&&e<16?(A=r[e-1],E=n[e-1]):255===e&&(A=s[t(281)]()<<8|s[t(281)](),E=s.readByte()<<8|s[t(281)]())}if(s[t(266)]()&&s[t(266)](),s[t(266)]()&&(s[t(262)](4),s[t(266)]()&&s[t(262)](24)),s[t(266)]()&&(s[t(254)](),s[t(254)]()),s[t(266)]()){let e=s[t(262)](32),r=s[t(262)](32);C=s[t(266)](),T=r,x=2*e,k=T/x}}let D=1;(1!==A||1!==E)&&(D=A/E);let B=0,P=0;if(0===l)B=1,P=2-_;else{B=3===l?1:2,P=(1===l?2:1)*(2-_)}let M=16*(y+1),U=16*(g+1)*(2-_);M-=(b+w)*B,U-=(S+I)*P;let F=Math.ceil(M*D);return s.destroy(),s=null,{codec_mimetype:n,profile_idc:o,level_idc:a,profile_string:c,level_string:u,chroma_format_idc:l,bit_depth:f,bit_depth_luma:f,bit_depth_chroma:p,ref_frames:v,chroma_format:d,chroma_format_string:pr.getChromaFormatString(d),frame_rate:{fixed:C,fps:k,fps_den:x,fps_num:T},sar_ratio:{width:A,height:E},codec_size:{width:M,height:U},present_size:{width:F,height:U}}}static _skipScalingList(e,t){const r=dr;let n=8,i=8,s=0;for(let o=0;o=this[t(285)])return this[t(290)]=!0,0;this.iserro=!1,n=this[t(291)]+e>8?8-this[t(291)]:e,r<<=n,r+=this[t(289)][this[t(283)]]>>8-this[t(291)]-n&255>>8-n,this.bufoff+=n,e-=n,8==this[t(291)]&&(this[t(283)]++,this[t(291)]=0)}return r}[mr(286)](e){const t=mr;let r=this[t(283)],n=this[t(291)],i=this[t(287)](e);return this[t(283)]=r,this[t(291)]=n,i}[mr(284)](){const e=mr;let t;for(t=0;0===this[e(287)](1)&&!this[e(290)];t++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i[t(334)](n,0),i[t(334)](r[t(384)],4),r.sps=i}if(r.pps){const e=r[t(403)][t(321)],n=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i[t(334)](n,0),i.set(r[t(403)],4),r.pps=i}return r}function Er(){const e=["readNextNaluPayload","1274304uyAlYa","7060554TgxSnL","Invalid AVCDecoderConfigurationRecord: No PPS'","skipBits","sps","bit_depth","getUint8","timescale","nalu","codec","parseSPS$2","level_string","toString","Strange NaluLengthSizeMinusOne: ","sar_ratio","avc_ref_frames","readBits","error","h264","refSampleDuration","ceil","kReserved0","readUByte","pps","968366ghijFf","803418GGqzzF","byteLength","Could not find H264 startcode until payload end!","currentStartcodeOffset","readUEG","readBool","fps_num","data","avc1.","present_size","kSliceNonIDR","avcc","Invalid AVCDecoderConfigurationRecord, lack of data!","eofFlag","set","presentWidth","fixed","read","frameRate","nb_sps","99479maRdOV","chromaFormat","fps_den","parseSPS","codecWidth","1110675aDfgge","profile_string","bit_depth_chroma","findNextStartCodeOffset","push","codecHeight","profile","length","Invalid AVCDecoderConfigurationRecord: No SPS","width","getUint16","frame_rate","setUint32","12JXolqd","level","read_golomb","iFrame","8KggCkh","subarray","type","kSliceSEI","presentHeight","chroma_format","buffer","558483lPpwKJ","chroma_format_idc","sarRatio","shift","codec_size","skipScalingList","bitDepth","height","setInt16","skipUEG"];return(Er=function(){return e})()}function kr(e){const t=Ir;let{sps:r,pps:n}=e;const i=[23,0,0,0,0,1,66,0,30,255];i[0]=23,i[6]=r[1],i[7]=r[2],i[8]=r[3],i[10]=225,i[11]=r[t(321)]>>8&255,i[12]=255&r[t(321)],i[t(349)](...r,1,n[t(321)]>>8&255,255&n[t(321)],...n);return new Uint8Array(i)}function Cr(e){const t=Ir;let{sps:r,pps:n}=e,i=8+r[t(321)]+1+2+n[t(321)],s=!1;const o=pr[t(390)](r);66!==r[3]&&77!==r[3]&&88!==r[3]&&(s=!0,i+=4);let a=new Uint8Array(i);a[0]=1,a[1]=r[1],a[2]=r[2],a[3]=r[3],a[4]=255,a[5]=225;let c=r.byteLength;a[6]=c>>>8,a[7]=255&c;let u=8;a[t(334)](r,8),u+=c,a[u]=1;let l=n[t(321)];a[u+1]=l>>>8,a[u+2]=255&l,a[t(334)](n,u+3),u+=3+l,s&&(a[u]=252|o[t(370)],a[u+1]=248|o.bit_depth_luma-8,a[u+2]=248|o[t(347)]-8,a[u+3]=0,u+=4);const d=[23,0,0,0,0],h=new Uint8Array(d.length+a[t(321)]);return h[t(334)](d,0),h.set(a,d[t(352)]),h}function Tr(e,t){const r=Ir;let n=[];n[0]=t?23:39,n[1]=1,n[2]=0,n[3]=0,n[4]=0,n[5]=e.byteLength>>24&255,n[6]=e[r(321)]>>16&255,n[7]=e[r(321)]>>8&255,n[8]=255&e[r(321)];const i=new Uint8Array(n.length+e[r(321)]);return i[r(334)](n,0),i[r(334)](e,n.length),i}function xr(e,t){const r=Ir;let n=[];n[0]=t?23:39,n[1]=1,n[2]=0,n[3]=0,n[4]=0;const i=new Uint8Array(n[r(352)]+e[r(321)]);return i[r(334)](n,0),i.set(e,n[r(352)]),i}function Dr(e){return 31&e[0]}function Br(e){return e===Me[Ir(365)]}function Pr(e){return!function(e){const t=Ir;return e===Me[t(384)]||e===Me[t(403)]}(e)&&!Br(e)}function Mr(e){return e===Me[Ir(361)]}function Ur(e){const t=Ir;if(0===e[t(352)])return!1;const r=Dr(e[0]);for(let n=1;n=n[t(321)])return this[t(333)]=!0,n[t(321)];let e=n[r+0]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],i=n[r+0]<<16|n[r+1]<<8|n[r+2];if(1===e||1===i)return r;r++}}[Sr(379)](){const e=Sr;let t=this[e(327)],r=null;for(;null==r&&!this[e(333)];){let n=this[e(323)];n+=1===(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])?4:3;let i=31&t[n],s=(128&t[n])>>>7,o=this.findNextStartCodeOffset(n);this.currentStartcodeOffset=o,i>=Me[e(401)]||0===s&&(r={type:i,data:t[e(363)](n,o)})}return r}}class Rr{constructor(e){const t=Sr;let r=e[t(327)].byteLength;this[t(364)]=e[t(364)],this[t(327)]=new Uint8Array(4+r),new DataView(this[t(327)].buffer)[t(357)](0,r),this[t(327)][t(334)](e.data,4)}}function Lr(){const e=["m_byte","GetWord","100932sOyXbK","4785YHRaoC","GetBit","m_idx","21241264uhuEVg","7266424pqAXXH","m_bits","GetUE","4072dhFXaB","m_len","GetBYTE","6vscNip","1490WbFpjd","535239ugvrTP","GetSE","m_data","140BxzxUl","35136hbPShk","length","155641HwuEet","m_zeros"];return(Lr=function(){return e})()}const Or=zr;function zr(e,t){const r=Lr();return(zr=function(e,t){return r[e-=323]})(e,t)}!function(e,t){const r=zr,n=e();for(;;)try{if(576359===-parseInt(r(336))/1+-parseInt(r(328))/2*(-parseInt(r(330))/3)+parseInt(r(325))/4*(parseInt(r(341))/5)+-parseInt(r(340))/6*(parseInt(r(333))/7)+parseInt(r(345))/8+-parseInt(r(334))/9*(-parseInt(r(329))/10)+-parseInt(r(344))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Lr);Or(327),Or(342),Or(331);const Nr=Hr;function Hr(e,t){const r=jr();return(Hr=function(e,t){return r[e-=297]})(e,t)}function jr(){const e=["1656292JkfaFZ","397870ZAPRfJ","10BNgQIg","49MpjiGy","14244bTGltz","998048ibSLAg","30737XZvcoV","45fKcRVV","15HTdcjP","warn","GetUE","byteLength","SPSParser chroma_format_idc > 3","GetWord","SPSParser bit_depth_luma_minus8 != bit_depth_chroma_minus8","_ebsp2rbsp","SPSParser sps_seq_parameter_set_id > 15","529448aFUvGg","50778bDckeZ"];return(jr=function(){return e})()}!function(e,t){const r=Hr,n=e();for(;;)try{if(202433===-parseInt(r(305))/1+-parseInt(r(303))/2*(parseInt(r(307))/3)+-parseInt(r(297))/4*(parseInt(r(301))/5)+-parseInt(r(298))/6*(-parseInt(r(302))/7)+parseInt(r(304))/8+parseInt(r(306))/9*(parseInt(r(300))/10)+parseInt(r(299))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(jr);Nr(314);function Vr(e,t){const r=Gr();return(Vr=function(e,t){return r[e-=326]})(e,t)}!function(e,t){const r=Vr,n=e();for(;;)try{if(587318===-parseInt(r(347))/1*(-parseInt(r(333))/2)+-parseInt(r(344))/3*(parseInt(r(342))/4)+parseInt(r(348))/5*(-parseInt(r(338))/6)+-parseInt(r(331))/7*(parseInt(r(334))/8)+-parseInt(r(327))/9+parseInt(r(341))/10*(parseInt(r(345))/11)+parseInt(r(351))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Gr);const Wr=e=>{const t=Vr;let r=e,n=r[t(346)],i=new Uint8Array(n),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(335)],0,s)},$r=e=>{const t=Vr;switch(e){case 0:return"4:0:0";case 1:return t(330);case 2:return t(336);case 3:return t(343);default:return"Unknown"}};function Gr(){const e=["readSEG","5037900lKAYuw","readUEG","toFixed","readByte","1376406txNIIp",".B0",".1.L","4:2:0","7MCEbnI","push","1533362QkfOwN","284888QkjOMv","buffer","4:2:2","destroy","2088svHPfq","readBits","readBool","10FgZCDN","4bTJsfQ","4:4:4","166776SrcjGB","205711iKdGbK","byteLength","1yzzpWR","5370xhCZzH","min"];return(Gr=function(){return e})()}const qr=Jr;function Kr(){const e=["parseVPS","959yjJZtN","Rext","buffer","byteLength","4154625YDlnfU","1913967UsUtpt",".B0","readBool","194018bkRXeD","readSEG","4:2:0","2310740yhPrSP","toFixed","parsePPS","getProfileString","_ebsp2rbsp","Unknown","getLevelString","SCC","readBits","7562712oIgAPG","destroy","2WxNruh","min","readUEG","Main","push","26526FDrmVX","getChromaFormatString","4:0:0","2058424xkQEja","readByte","4:4:4"];return(Kr=function(){return e})()}function Jr(e,t){const r=Kr();return(Jr=function(e,t){return r[e-=363]})(e,t)}!function(e,t){const r=Jr,n=e();for(;;)try{if(556608===-parseInt(r(380))/1*(parseInt(r(394))/2)+parseInt(r(377))/3+-parseInt(r(368))/4+-parseInt(r(383))/5+-parseInt(r(365))/6*(-parseInt(r(372))/7)+parseInt(r(392))/8+-parseInt(r(376))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Kr);class Xr{static _ebsp2rbsp(e){const t=Jr;let r=e,n=r[t(375)],i=new Uint8Array(n),s=0;for(let e=0;e=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(374)],0,s)}static[qr(371)](e){const t=qr;let r=Xr[t(387)](e),n=new ot(r);return n[t(369)](),n.readByte(),n.readBits(4),n[t(391)](2),n[t(391)](6),{num_temporal_layers:n[t(391)](3)+1,temporal_id_nested:n[t(379)]()}}static parseSPS(e){const t=qr;let r=Xr._ebsp2rbsp(e),n=new ot(r);n[t(369)](),n[t(369)]();let i=0,s=0,o=0,a=0;n[t(391)](4);let c=n.readBits(3);n[t(379)]();let u=n.readBits(2),l=n.readBool(),d=n[t(391)](5),h=n.readByte(),f=n.readByte(),p=n[t(369)](),m=n[t(369)](),v=n.readByte(),y=n[t(369)](),g=n.readByte(),_=n.readByte(),b=n[t(369)](),w=n[t(369)](),S=n[t(369)](),I=[],A=[];for(let e=0;e0)for(let e=c;e<8;e++)n[t(391)](2);for(let e=0;e1&&n.readSEG();for(let e=0;e0&&e<=16?(F=r[e-1],R=i[e-1]):255===e&&(F=n[t(391)](16),R=n[t(391)](16))}if(n[t(379)]()&&n[t(379)](),n[t(379)]()){n[t(391)](3),n[t(379)](),n[t(379)]()&&(n.readByte(),n.readByte(),n[t(369)]())}if(n[t(379)]()&&(n[t(396)](),n[t(396)]()),n[t(379)](),n[t(379)](),n[t(379)](),M=n[t(379)](),M&&(n[t(396)](),n.readUEG(),n[t(396)](),n[t(396)]()),n.readBool()){if(O=n[t(391)](32),z=n[t(391)](32),n[t(379)]()&&n[t(396)](),n.readBool()){let e=!1,r=!1,i=!1;e=n.readBool(),r=n.readBool(),(e||r)&&(i=n[t(379)](),i&&(n.readByte(),n[t(391)](5),n.readBool(),n.readBits(5)),n[t(391)](4),n[t(391)](4),i&&n.readBits(4),n[t(391)](5),n.readBits(5),n[t(391)](5));for(let s=0;s<=c;s++){let s=n[t(379)]();L=s;let o=!0,a=1;!s&&(o=n.readBool());let c=!1;if(o?n.readUEG():c=n.readBool(),!c&&(a=n[t(396)]()+1),e){for(let e=0;e>6&3,n[t(137)]=e[1]>>5&1,n[t(140)]=31&e[1],n[t(148)]=e[2]<<24|e[3]<<16|e[4]<<8|e[5],n[t(231)]=e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[t(231)]=n[t(231)]<<16|e[10]<<8|e[11],n[t(238)]=e[12],n[t(235)]=(15&e[13])<<8|e[14],n.parallelismType=3&e[15],n[t(203)]=3&e[16],n[t(134)]=7&e[17],n[t(198)]=7&e[18],n[t(219)]=e[19]<<8|e[20],n.constantFrameRate=e[21]>>6&3,n[t(157)]=e[21]>>3&7,n[t(155)]=e[21]>>2&1,n[t(178)]=3&e[21];let i=e[22],s=e[t(168)](23);for(let e=0;e0)for(let t=r;t<8;t++)e[n(183)](2);i[n(253)]=[],i[n(246)]=[],i.sub_layer_profile_idc=[],i[n(271)]=[],i[n(224)]=[],i[n(266)]=[],i.sub_layer_non_packed_constraint_flag=[],i[n(164)]=[],i[n(129)]=[];for(let t=0;t{const t=Vr;let r=Wr(e),n=new ot(r);return n[t(326)](),n[t(326)](),n[t(339)](4),n[t(339)](2),n[t(339)](6),{num_temporal_layers:n.readBits(3)+1,temporal_id_nested:n[t(340)]()}})(r),a=(e=>{const t=Vr;let r=Wr(e),n=new ot(r);n[t(326)](),n[t(326)]();let i=0,s=0,o=0,a=0;n[t(339)](4);let c=n[t(339)](3);n[t(340)]();let u=n.readBits(2),l=n[t(340)](),d=n.readBits(5),h=n[t(326)](),f=n.readByte(),p=n.readByte(),m=n[t(326)](),v=n.readByte(),y=n[t(326)](),g=n[t(326)](),_=n.readByte(),b=n[t(326)](),w=n[t(326)](),S=n[t(326)](),I=[],A=[];for(let e=0;e0)for(let e=c;e<8;e++)n.readBits(2);for(let e=0;e1&&n[t(350)]();for(let e=0;e0&&e<16?(F=r[e-1],R=i[e-1]):255===e&&(F=n[t(339)](16),R=n[t(339)](16))}if(n[t(340)]()&&n[t(340)](),n.readBool()&&(n[t(339)](3),n[t(340)](),n[t(340)]()&&(n[t(326)](),n[t(326)](),n[t(326)]())),n[t(340)]()&&(n[t(352)](),n[t(352)]()),n[t(340)](),n[t(340)](),n[t(340)](),M=n[t(340)](),M&&(i+=n[t(352)](),s+=n[t(352)](),o+=n[t(352)](),a+=n.readUEG()),n[t(340)]()&&(O=n[t(339)](32),z=n[t(339)](32),n.readBool()&&(n[t(352)](),n[t(340)]()))){let e=!1,r=!1,i=!1;e=n.readBool(),r=n[t(340)](),(e||r)&&(i=n[t(340)](),i&&(n[t(326)](),n[t(339)](5),n.readBool(),n[t(339)](5)),n.readBits(4),n[t(339)](4),i&&n.readBits(4),n[t(339)](5),n[t(339)](5),n[t(339)](5));for(let s=0;s<=c;s++){let s=n[t(340)]();L=s;let o=!1,a=1;!s&&(o=n[t(340)]());let c=!1;if(o?n[t(350)]():c=n[t(340)](),!c&&(cpbcnt=n[t(352)]()+1),e)for(let e=0;e{const t=Vr;let r=Wr(e),n=new ot(r);n.readByte(),n.readByte(),n.readUEG(),n[t(352)](),n[t(340)](),n.readBool(),n.readBits(3),n[t(340)](),n.readBool(),n.readUEG(),n[t(352)](),n[t(350)](),n[t(340)](),n[t(340)](),n[t(340)]()&&n[t(352)](),n.readSEG(),n.readSEG(),n[t(340)](),n[t(340)](),n[t(340)](),n[t(340)]();let i=n[t(340)](),s=n[t(340)](),o=1;return s&&i?o=0:s?o=3:i&&(o=2),{parallelismType:o}})(n);s=Object[t(237)](s,o,a,c);let u=23+(5+r[t(264)])+(5+i.byteLength)+(5+n[t(264)]),l=new Uint8Array(u);l[0]=1,l[1]=(3&s[t(159)])<<6|(s[t(137)]?1:0)<<5|31&s[t(140)],l[2]=s[t(241)]||0,l[3]=s[t(158)]||0,l[4]=s[t(220)]||0,l[5]=s[t(180)]||0,l[6]=s[t(192)]||0,l[7]=s[t(205)]||0,l[8]=s[t(270)]||0,l[9]=s.general_constraint_indicator_flags_4||0,l[10]=s[t(191)]||0,l[11]=s[t(167)]||0,l[12]=60,l[13]=240|(3840&s[t(235)])>>8,l[14]=255&s[t(235)],l[15]=252|3&s[t(208)],l[16]=252|3&s[t(149)],l[17]=248|7&s.bit_depth_luma_minus8,l[18]=248|7&s.bit_depth_chroma_minus8,l[19]=0,l[20]=0,l[21]=(3&s[t(145)])<<6|(7&s[t(172)])<<3|(s[t(214)]?1:0)<<2|3,l[22]=3,l[23]=128|Ue.vps,l[24]=0,l[25]=1,l[26]=(65280&r[t(264)])>>8,l[27]=(255&r.byteLength)>>0,l[t(170)](r,28),l[23+(5+r[t(264)])+0]=128|Ue.sps,l[23+(5+r[t(264)])+1]=0,l[23+(5+r.byteLength)+2]=1,l[23+(5+r[t(264)])+3]=(65280&i.byteLength)>>8,l[23+(5+r[t(264)])+4]=(255&i[t(264)])>>0,l[t(170)](i,23+(5+r.byteLength)+5),l[23+(5+r[t(264)]+5+i[t(264)])+0]=128|Ue[t(244)],l[23+(5+r[t(264)]+5+i.byteLength)+1]=0,l[23+(5+r[t(264)]+5+i.byteLength)+2]=1,l[23+(5+r.byteLength+5+i.byteLength)+3]=(65280&n[t(264)])>>8,l[23+(5+r.byteLength+5+i[t(264)])+4]=(255&n.byteLength)>>0,l[t(170)](n,23+(5+r[t(264)]+5+i[t(264)])+5);const d=[28,0,0,0,0],h=new Uint8Array(d[t(254)]+l[t(264)]);return h[t(170)](d,0),h[t(170)](l,d.length),h}function sn(e,t){const r=Zr;let n=[];n[0]=t?28:44,n[1]=1,n[2]=0,n[3]=0,n[4]=0,n[5]=e[r(264)]>>24&255,n[6]=e[r(264)]>>16&255,n[7]=e[r(264)]>>8&255,n[8]=255&e.byteLength;const i=new Uint8Array(n.length+e[r(264)]);return i[r(170)](n,0),i[r(170)](e,n[r(254)]),i}function on(e,t){const r=Zr;let n=[];n[0]=t?28:44,n[1]=1,n[2]=0,n[3]=0,n[4]=0;const i=new Uint8Array(n.length+e[r(264)]);return i[r(170)](n,0),i[r(170)](e,n[r(254)]),i}function an(e){return(126&e[0])>>1}function cn(e){return e===Ue[Zr(177)]}function un(e){return!((t=e)>=32&&t<=40);var t}function ln(e){return e>=16&&e<=21}function dn(e){const t=Zr;if(0===e[t(254)])return!1;const r=an(e[0]);for(let n=1;n=n[t(264)])return this[t(256)]=!0,n[t(264)];let e=n[r+0]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],i=n[r+0]<<16|n[r+1]<<8|n[r+2];if(1===e||1===i)return r;r++}}[Yr(174)](){const e=Yr;let t=this[e(146)],r=null;for(;null==r&&!this[e(256)];){let n=this[e(142)];n+=1===(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])?4:3;let i=t[n]>>1&63,s=(128&t[n])>>>7,o=this[e(217)](n);this.currentStartcodeOffset=o,0===s&&(r={type:i,data:t.subarray(n,o)})}return r}}class fn{constructor(e){const t=Yr;let r=e[t(146)][t(264)];this[t(268)]=e.type,this[t(146)]=new Uint8Array(4+r),new DataView(this.data[t(184)])[t(187)](0,r),this[t(146)][t(170)](e[t(146)],4)}}var pn=xn;!function(e,t){for(var r=xn,n=e();;)try{if(551162===-parseInt(r(176))/1*(parseInt(r(153))/2)+parseInt(r(147))/3*(-parseInt(r(216))/4)+-parseInt(r(166))/5+parseInt(r(201))/6*(parseInt(r(170))/7)+parseInt(r(205))/8*(-parseInt(r(171))/9)+parseInt(r(213))/10+parseInt(r(164))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Tn);var mn,vn=pn(208),yn=pn(159),gn=/^(?:text|application)\/xml/i,_n=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,bn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,wn=/^\s*$/,Sn={},In={},An="",En={type:pn(175),beforeSend:kn,success:kn,error:kn,complete:kn,context:null,xhr:function(){return new(window[pn(197)])},accepts:{json:vn,xml:pn(194),html:yn,text:pn(225),"*":"*/"[pn(202)]("*")},crossDomain:!1,timeout:0,username:null,password:null,processData:!0,promise:kn,contentType:"application/x-www-form-urlencoded; charset=UTF-8"};function kn(){}var Cn=function(e,t){var r=pn;"object"==typeof e&&(t=e,e=void 0);var n=Ln({},t=t||{});for(var i in En)void 0===n[i]&&(n[i]=En[i]);try{var s={},o=new Promise((function(e,t){var r=xn;s[r(185)]=e,s[r(186)]=t}));o[r(185)]=s[r(185)],o.reject=s[r(186)],n[r(214)]=o}catch(e){n.promise={resolve:kn,reject:kn}}var a=bn[r(230)](window[r(210)][r(162)][r(221)]())||[];n[r(195)]=((e||n.url||window[r(210)][r(162)])+"")[r(173)](/#.*$/,"")[r(173)](/^\/\//,a[1]+"//");var c=n.url;!n[r(142)]&&(n[r(142)]=/^([\w-]+:)?\/\/([^\/]+)/[r(232)](n[r(195)])&&RegExp.$2!==window[r(210)].href);var u=n[r(220)];if(u===r(212)){if(!/=\?/[r(232)](n.url)){var l=(n[r(212)]||r(229))+"=?";n.url=Un(n[r(195)],l)}return function(e){var t,r=pn,n=e[r(157)]||"jsonp"+Nn(),i=window[r(224)][r(160)](r(203)),s={abort:function(){n in window&&(window[n]=kn)}},o=window[r(224)].getElementsByTagName(r(231))[0]||window[r(224)].documentElement;function a(n){var i=r;window[i(138)](t),s[i(174)](),Pn(n[i(235)],s,n[i(235)],e),c()}function c(){var e=r;i[e(169)]?i[e(169)]():i.onload=i[e(193)]=i[e(154)]=null,i[e(140)]&&i[e(140)].removeChild(i),i=null,delete window[n]}return i.onerror=function(e){a(e)},window[n]=function(n){window[r(138)](t),Dn(n,s,e),c()},Fn(e),i[r(211)]=e.url[r(173)](/=\?/,"="+n),i.src=Un(i[r(211)],"_="+(new Date)[r(150)]()),i.async=!0,e[r(137)]&&(i.charset=e[r(137)]),o.insertBefore(i,o[r(228)]),e[r(219)]>0&&(t=window[r(227)]((function(){var t=r;s[t(174)](),Pn(t(219),s,t(219),e),c()}),e[r(219)])),e[r(214)][r(174)]=function(){s[r(174)]()},e[r(214)].xhr=s,e[r(214)]}(n)}Fn(n);var d=n[r(198)][u]||n[r(198)]["*"],h={};/^([\w-]+:)\/\//[r(232)](n[r(195)])?RegExp.$1:window[r(210)].protocol;var f,p=En[r(226)]();!n.crossDomain&&!h[r(199)]&&(h[r(199)]=r(197)),n[r(143)]&&(Sn[c]&&(h["If-Modified-Since"]=Sn[c]),In[c]&&(h[r(181)]=In[c])),d&&(h[r(184)]=d,d[r(189)](",")>-1&&(d=d[r(136)](",",2)[0]),p.overrideMimeType&&p[r(190)](d));var m=!/^(?:GET|HEAD)$/[r(232)](n[r(235)][r(188)]());if((n.data&&m&&!1!==n[r(177)]||t[r(177)])&&(h[r(192)]=n.contentType),!1===n.cache&&!m){var v=/([?&])_=[^&]*/;n.url=v[r(232)](c)?c[r(173)](v,r(191)+Nn()):c+(/\?/.test(c)?"&":"?")+"_="+Nn()}n[r(179)]=Ln(h,n[r(179)]||{}),p[r(193)]=function(){var e,t,i=r;if(4===p[i(217)]){clearTimeout(f);var s,o=!1;if(p.status>=200&&p[i(172)]<300||304===p[i(172)]){if(An=p.getAllResponseHeaders(),n[i(143)]){var a=Mn(i(158));a&&(Sn[c]=a),(a=Mn(i(145)))&&(In[c]=a)}u=u||(e=p[i(206)](i(183)),t=pn,e&&(e===yn?t(233):e===vn?t(187):gn[t(232)](e)&&t(144))||t(146)),s=p[i(207)];try{u===i(144)?s=p[i(196)]:"json"===u&&(s=wn[i(232)](s)?null:JSON[i(141)](s))}catch(e){o=e}o?Pn(o,"parseerror",p,n):Dn(s,p,n)}else Pn(null,i(218),p,n)}};var y=!("async"in n)||n.async;if(p.open(n.type,n[r(195)],y,n[r(156)],n[r(234)]),n[r(223)])for(var g in n[r(223)])p[g]=n.xhrFields[g];for(var g in n[r(135)]&&p[r(190)]&&p[r(190)](n[r(135)]),n[r(179)])void 0!==n[r(179)][g]&&p[r(165)](g,n.headers[g]+"");return!1===function(e,t){var r=pn,n=t[r(178)];if(!1===t.beforeSend[r(182)](n,e,t))return!1}(p,n)?(p[r(174)](),!1):(n.timeout>0&&(f=window[r(227)]((function(){var e=r;p[e(193)]=kn,p[e(174)](),Pn(null,e(219),p,n)}),n.timeout)),p[r(209)](n[r(155)]?n[r(155)]:null),n.promise[r(174)]=function(){p[r(174)]()},n[r(214)])};function Tn(){var e=["mimeType","split","scriptCharset","clearTimeout","get","parentNode","parse","crossDomain","ifModified","xml","etag","text","33141giNXqt","length","add","getTime","[object Array]","success","344zgTwSh","onerror","data","username","jsonpCallback","Last-Modified","text/html","createElement","POST","href","object","18696931dnPldg","setRequestHeader","4208430DgfJSv","join","prototype","clearAttributes","21CQOEPi","267642fyAhWK","status","replace","abort","GET","5531OhAKHu","contentType","context","headers","function","If-None-Match","call","content-type","Accept","resolve","reject","json","toUpperCase","indexOf","overrideMimeType","$1_=","Content-Type","onreadystatechange","application/xml, text/xml","url","responseXML","XMLHttpRequest","accepts","X-Requested-With","getJSON","75606zbQMic","concat","script","toString","40XyixTZ","getResponseHeader","responseText","application/json, text/javascript","send","location","src","jsonp","8326750gUccVB","promise","value","28YQGbHd","readyState","error","timeout","dataType","toLowerCase","complete","xhrFields","document","text/plain","xhr","setTimeout","firstChild","callback","exec","head","test","html","password","type"];return(Tn=function(){return e})()}function xn(e,t){var r=Tn();return(xn=function(e,t){return r[e-=135]})(e,t)}function Dn(e,t,r){var n=pn,i=r[n(178)],s=n(152);r[n(152)].call(i,e,s,t),r[n(214)][n(185)](e,s,t),Bn(s,t,r)}function Bn(e,t,r){var n=pn,i=r.context;r[n(222)].call(i,t,e)}function Pn(e,t,r,n){var i=pn,s=n[i(178)];n.error[i(182)](s,r,t,e),n[i(214)][i(186)](r,t,e),Bn(t,r,n)}function Mn(e){var t,r=pn;if(!mn){for(mn={};t=_n[r(230)](An);)mn[t[1][r(221)]()]=t[2];t=mn[e[r(221)]()]}return null===t?null:t}function Un(e,t){return(e+"&"+t)[pn(173)](/[&?]{1,2}/,"?")}function Fn(e){var t,r,n,i,s=pn;On(e)&&!(e.data instanceof FormData)&&e.processData&&(e[s(155)]=(t=e[s(155)],(i=[])[(n=pn)(149)]=function(e,t){this.push(encodeURIComponent(e)+"="+encodeURIComponent(t))},Rn(i,t,r),i[n(167)]("&")[n(173)]("%20","+"))),e[s(155)]&&(!e.type||e.type[s(188)]()===s(175))&&(e[s(195)]=Un(e[s(195)],e[s(155)]))}function Rn(e,t,r,n){var i,s,o=pn,a=(i=t,s=pn,Object.prototype[s(204)][s(182)](i)===s(151));for(var c in t){var u=t[c];n&&(c=r?n:n+"["+(a?"":c)+"]"),!n&&a?e[o(149)](u.name,u[o(215)]):(r?a(u):On(u))?Rn(e,u,r,c):e.add(c,u)}}function Ln(e){for(var t=pn,r=Array[t(168)].slice,n=r.call(arguments,1),i=0,s=n[t(148)];i255)return!1;return!0}function $n(e,t){var r=jn;if(e[r(285)]&&e[r(317)]===r(295))return t&&(e=e[r(299)]?e[r(299)]():Array[r(288)][r(299)][r(279)](e)),e;if(Array[r(287)](e)){if(!Wn(e))throw new Error(r(332)+e);return new Uint8Array(e)}if(Vn(e[r(269)])&&Wn(e))return new Uint8Array(e);throw new Error(r(308))}function Gn(e){return new Uint8Array(e)}function qn(e,t,r,n,i){var s=jn;(null!=n||null!=i)&&(e=e[s(299)]?e[s(299)](n,i):Array[s(288)][s(299)][s(279)](e,n,i)),t[s(314)](e,r)}function Kn(){var e=["MAX_SAFE_INTEGER","2680wAgIOZ","call","invalid key size (must be 16, 24 or 32 bytes)","_lastCipherblock","AES must be instanitated with `new`","Counter","15452KEMSNa","buffer","invalid plaintext size (must be multiple of 16 bytes)","isArray","prototype","Electronic Code Block","11RGBqAu","19290HCDAum","_Ke","_shiftRegister","fromCharCode","Uint8Array","setBytes","_aes","substr","slice","PKCS#7 invalid padding byte","_prepare","join","invalid plaintext size (must be segmentSize bytes)","setValue","ofb","increment","invalid counter value (must be an integer)","unsupported array-like object","Cipher Block Chaining","Output Feedback","_lastPrecipher","ctr","Counter must be instanitated with `new`","set","segmentSize","invalid ciphertext size (must be 16 bytes)","name","PKCS#7 padding byte out of range","cbc","encrypt","decrypt","Cipher Feedback","invalid counter bytes size (must be 16 bytes)","_Kd","361954jpTJSD","invalid initialation vector size (must be 16 bytes)","invalid ciphertext size (must be multiple of 16 bytes)","description","7XjdTJk","_remainingCounter","ecb","Array contains invalid value: ","invalid initialation vector size (must be 16 size)","585ZzgIxa","80trIADn","15156DGQUtB","push","key","length","64758OIKhvW","3176268wElCQF","_lastPrecipherIndex","_remainingCounterIndex","_counter","5001544AtgUVx","number"];return(Kn=function(){return e})()}!function(e,t){for(var r=jn,n=e();;)try{if(737233===parseInt(r(325))/1+-parseInt(r(284))/2+parseInt(r(270))/3*(-parseInt(r(265))/4)+-parseInt(r(334))/5*(-parseInt(r(291))/6)+parseInt(r(329))/7*(parseInt(r(275))/8)+parseInt(r(266))/9*(-parseInt(r(278))/10)+parseInt(r(290))/11*(parseInt(r(271))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Kn);var Jn,Xn={toBytes:function(e){var t=jn,r=[],n=0;for(e=encodeURI(e);n191&&i<224?(r[t(267)](String[t(294)]((31&i)<<6|63&e[n+1])),n+=2):(r.push(String.fromCharCode((15&i)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return r.join("")}},Yn=(Jn="0123456789abcdef",{toBytes:function(e){for(var t=jn,r=[],n=0;n>4]+Jn[15&i])}return r[t(302)]("")}}),Zn={16:10,24:12,32:14},Qn=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],ei=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],ti=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],ri=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],ni=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],ii=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],si=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],oi=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],ai=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],ci=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],ui=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],li=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],di=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],hi=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],fi=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function pi(e){for(var t=jn,r=[],n=0;n>2,this._Ke[n][r%4]=o[r],this[e(324)][t-n][r%4]=o[r];for(var a,c=0,u=s;u>16&255]<<24^ei[a>>8&255]<<16^ei[255&a]<<8^ei[a>>24&255]^Qn[c]<<24,c+=1,8!=s)for(r=1;r>8&255]<<8^ei[a>>16&255]<<16^ei[a>>24&255]<<24;for(r=s/2+1;r>2,d=u%4,this._Ke[l][d]=o[r],this[e(324)][t-l][d]=o[r++],u++}for(var l=1;l>24&255]^di[a>>16&255]^hi[a>>8&255]^fi[255&a]},mi[Hn(288)][Hn(320)]=function(e){var t=Hn;if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var r=this[t(292)].length-1,n=[0,0,0,0],i=pi(e),s=0;s<4;s++)i[s]^=this[t(292)][0][s];for(var o=1;o>24&255]^ni[i[(s+1)%4]>>16&255]^ii[i[(s+2)%4]>>8&255]^si[255&i[(s+3)%4]]^this[t(292)][o][s];i=n[t(299)]()}var a,c=Gn(16);for(s=0;s<4;s++)a=this[t(292)][r][s],c[4*s]=255&(ei[i[s]>>24&255]^a>>24),c[4*s+1]=255&(ei[i[(s+1)%4]>>16&255]^a>>16),c[4*s+2]=255&(ei[i[(s+2)%4]>>8&255]^a>>8),c[4*s+3]=255&(ei[255&i[(s+3)%4]]^a);return c},mi.prototype[Hn(321)]=function(e){var t=Hn;if(16!=e[t(269)])throw new Error(t(316));for(var r=this[t(324)].length-1,n=[0,0,0,0],i=pi(e),s=0;s<4;s++)i[s]^=this[t(324)][0][s];for(var o=1;o>24&255]^ai[i[(s+3)%4]>>16&255]^ci[i[(s+2)%4]>>8&255]^ui[255&i[(s+1)%4]]^this[t(324)][o][s];i=n[t(299)]()}var a,c=Gn(16);for(s=0;s<4;s++)a=this._Kd[r][s],c[4*s]=255&(ti[i[s]>>24&255]^a>>24),c[4*s+1]=255&(ti[i[(s+3)%4]>>16&255]^a>>16),c[4*s+2]=255&(ti[i[(s+2)%4]>>8&255]^a>>8),c[4*s+3]=255&(ti[255&i[(s+1)%4]]^a);return c};var vi=function(e){var t=Hn;if(!(this instanceof vi))throw Error(t(282));this[t(328)]=t(289),this[t(317)]=t(331),this[t(297)]=new mi(e)};vi[Hn(288)].encrypt=function(e){var t=Hn;if((e=$n(e))[t(269)]%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var r=Gn(e[t(269)]),n=Gn(16),i=0;iNumber[t(277)])throw new Error("integer value out of safe range");for(var r=15;r>=0;--r)this[t(274)][r]=e%256,e=parseInt(e/256)},bi[Hn(288)].setBytes=function(e){var t=Hn;if(16!=(e=$n(e,!0)).length)throw new Error(t(323));this[t(274)]=e},bi[Hn(288)].increment=function(){for(var e=Hn,t=15;t>=0;t--){if(255!==this._counter[t]){this[e(274)][t]++;break}this[e(274)][t]=0}};var wi=function(e,t){var r=Hn;if(!(this instanceof wi))throw Error("AES must be instanitated with `new`");this.description=r(283),this.name=r(312),!(t instanceof bi)&&(t=new bi(t)),this[r(274)]=t,this._remainingCounter=null,this._remainingCounterIndex=16,this[r(297)]=new mi(e)};wi[Hn(288)].encrypt=function(e){for(var t=Hn,r=$n(e,!0),n=0;n16)throw new Error(t(318));for(var n=e[t(269)]-r,i=0;i>>2]>>>24-a%4*8&255;r[s+a>>>2]|=c<<24-(s+a)%4*8}else for(var u=0;u>>2]=n[u>>>2];return this[t(333)]+=o,this},clamp:function(){var t=i,r=this[t(271)],n=this.sigBytes;r[n>>>2]&=4294967295<<32-n%4*8,r[t(272)]=e[t(274)](n/4)},clone:function(){var e=i,t=u.clone[e(284)](this);return t[e(271)]=this.words[e(273)](0),t},random:function(e){for(var t=i,r=[],n=0;n>>2]>>>24-o%4*8&255;s.push((a>>>4).toString(16)),s[t(337)]((15&a).toString(16))}return s[t(305)]("")},parse:function(e){for(var t=i,r=e.length,n=[],s=0;s>>3]|=parseInt(e.substr(s,2),16)<<24-s%8*4;return new(l[t(327)])(n,r/2)}},f=d[i(292)]={stringify:function(e){for(var t=i,r=e.words,n=e.sigBytes,s=[],o=0;o>>2]>>>24-o%4*8&255;s.push(String.fromCharCode(a))}return s[t(305)]("")},parse:function(e){for(var t=i,r=e.length,n=[],s=0;s>>2]|=(255&e[t(338)](s))<<24-s%4*8;return new(l[t(327)])(n,r)}},p=d[i(287)]={stringify:function(e){var t=i;try{return decodeURIComponent(escape(f[t(340)](e)))}catch(e){throw new Error(t(318))}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=c[i(314)]=u[i(335)]({reset:function(){var e=i;this._data=new(l[e(327)]),this._nDataBytes=0},_append:function(e){var t=i;"string"==typeof e&&(e=p[t(290)](e)),this[t(275)][t(279)](e),this[t(328)]+=e[t(333)]},_process:function(t){var r,n=i,s=this._data,o=s[n(271)],a=s[n(333)],c=this[n(301)],u=a/(4*c),d=(u=t?e[n(274)](u):e[n(303)]((0|u)-this[n(285)],0))*c,h=e.min(4*d,a);if(d){for(var f=0;f>>2]|=e[o]<<24-o%4*8;n[r(216)](this,s,i)}else n[r(225)](this,arguments)};i.prototype=r}}(),e.lib.WordArray},(i=xi)(229)==i(229)?e[i(224)]=n(Ei):"undefined"===i(212)&&(void 0)[i(213)]?(void 0)([i(227)],n):n(r[i(232)])}));var Pi=Ui;!function(e,t){for(var r=Ui,n=e();;)try{if(553166===-parseInt(r(509))/1*(parseInt(r(486))/2)+-parseInt(r(484))/3+-parseInt(r(507))/4+-parseInt(r(505))/5*(-parseInt(r(510))/6)+parseInt(r(508))/7*(parseInt(r(497))/8)+-parseInt(r(506))/9*(-parseInt(r(490))/10)+-parseInt(r(496))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Mi);Qe[Pi(489)]((function(e,t){var r,n,i=Pi;Qe[i(492)],e[Ui(502)]=(r=Ei,n=i,function(){var e=Ui,t=r,n=t.lib.WordArray,i=t[e(498)];function s(e){return e<<8&4278255360|e>>>8&16711935}i[e(500)]=i[e(504)]={stringify:function(t){for(var r=e,n=t.words,i=t[r(483)],s=[],o=0;o>>2]>>>16-o%4*8&65535;s.push(String[r(493)](a))}return s.join("")},parse:function(t){for(var r=e,i=t[r(491)],s=[],o=0;o>>1]|=t[r(503)](o)<<16-o%2*16;return n[r(488)](s,2*i)}},i[e(499)]={stringify:function(t){for(var r=e,n=t[r(501)],i=t[r(483)],o=[],a=0;a>>2]>>>16-a%4*8&65535);o.push(String[r(493)](c))}return o[r(495)]("")},parse:function(t){for(var r=e,i=t[r(491)],o=[],a=0;a>>1]|=s(t[r(503)](a)<<16-a%2*16);return n.create(o,2*i)}}}(),r[n(498)][n(500)])}));function Mi(){var e=["Utf16BE","5JVtzbY","3538593CHdDWv","1169672lBNQQR","98flwWrw","685vGxRxP","5351550qncgCX","sigBytes","76584gaohrL","./core","2026FjcVUw","function","create","createCommonjsModule","10TAjYVz","length","commonjsGlobal","fromCharCode","amd","join","5646113IcxDkR","453256hZgirQ","enc","Utf16LE","Utf16","words","exports","charCodeAt"];return(Mi=function(){return e})()}function Ui(e,t){var r=Mi();return(Ui=function(e,t){return r[e-=483]})(e,t)}var Fi=Ri;function Ri(e,t){var r=Li();return(Ri=function(e,t){return r[e-=430]})(e,t)}!function(e,t){for(var r=Ri,n=e();;)try{if(951049===parseInt(r(455))/1+-parseInt(r(440))/2+parseInt(r(441))/3*(parseInt(r(435))/4)+-parseInt(r(444))/5*(parseInt(r(462))/6)+parseInt(r(453))/7+parseInt(r(433))/8+-parseInt(r(438))/9*(parseInt(r(452))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Li);Qe[Fi(430)]((function(e,t){var r,n,i;r=Qe[Fi(458)],n=function(e){return n=(r=e)[(t=Ri)(434)][t(450)],r.enc[t(456)]={stringify:function(e){var r=t,n=e[r(446)],i=e[r(457)],s=this[r(448)];e[r(451)]();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,u=0;u<4&&a+.75*u>>6*(3-u)&63));var l=s[r(432)](64);if(l)for(;o.length%4;)o[r(461)](l);return o[r(459)]("")},parse:function(e){var r=t,i=e.length,s=this[r(448)],o=this[r(442)];if(!o){o=this[r(442)]=[];for(var a=0;a>>6-c%4*2;o[a>>>2]|=u<<24-a%4*8,a++}return n[s(454)](o,a)}(e,i,o)},_map:t(436)},e.enc.Base64;var t,r,n},(i=Ri)(449)==i(449)?e.exports=n(Ei):"undefined"===i(443)&&(void 0)[i(445)]?(void 0)([i(431)],n):n(r[i(439)])}));function Li(){var e=["words","indexOf","_map","object","WordArray","clamp","22545490gAHTre","11910556qsdKvn","create","7386WcOJIk","Base64","sigBytes","commonjsGlobal","join","length","push","397338TLrTcW","createCommonjsModule","./core","charAt","12784816UUnLXi","lib","8312msbqsd","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","charCodeAt","9DgyTqm","CryptoJS","764402IUNSKT","501IepJVO","_reverseMap","function","5zJXide","amd"];return(Li=function(){return e})()}var Oi=zi;function zi(e,t){var r=Ni();return(zi=function(e,t){return r[e-=273]})(e,t)}!function(e,t){for(var r=zi,n=e();;)try{if(716810===-parseInt(r(283))/1*(parseInt(r(287))/2)+-parseInt(r(278))/3*(parseInt(r(279))/4)+-parseInt(r(282))/5+-parseInt(r(275))/6*(-parseInt(r(308))/7)+parseInt(r(273))/8*(-parseInt(r(293))/9)+-parseInt(r(300))/10+-parseInt(r(294))/11*(-parseInt(r(306))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ni);Qe[Oi(298)]((function(e,t){var r,n,i,s=Oi;r=Qe[s(292)],n=function(e){var t,r,n,i=s;return t=zi,n=(r=e).lib[t(304)],r[t(295)][t(284)]={stringify:function(e,r){var n=t;void 0===r&&(r=!0);var i=e[n(288)],s=e[n(281)],o=r?this[n(307)]:this[n(305)];e[n(280)]();for(var a=[],c=0;c>>2]>>>24-c%4*8&255)<<16|(i[c+1>>>2]>>>24-(c+1)%4*8&255)<<8|i[c+2>>>2]>>>24-(c+2)%4*8&255,l=0;l<4&&c+.75*l>>6*(3-l)&63));var d=o[n(276)](64);if(d)for(;a[n(296)]%4;)a[n(286)](d);return a[n(290)]("")},parse:function(e,r){var i=t;void 0===r&&(r=!0);var s=e[i(296)],o=r?this[i(307)]:this._map,a=this[i(277)];if(!a){a=this._reverseMap=[];for(var c=0;c>>6-c%4*2;o[a>>>2]|=u<<24-a%4*8,a++}return n[s(297)](o,a)}(e,s,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:t(301)},e[i(295)][i(284)]},(i=zi)(299)==i(299)?e[i(291)]=n(Ei):"undefined"===i(302)&&(void 0).amd?(void 0)([i(289)],n):n(r[i(274)])}));function Ni(){var e=["4818910azHJIa","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_","function","charCodeAt","WordArray","_map","9749148VafRSx","_safe_map","12278tRgSSe","152mBCyTo","CryptoJS","1326laVSUB","charAt","_reverseMap","3MiocFb","3360092zZIpRk","clamp","sigBytes","60620lGAneK","94060TvAQJQ","Base64url","indexOf","push","14bguOdw","words","./core","join","exports","commonjsGlobal","54783UgrbJq","33dolxSw","enc","length","create","createCommonjsModule","object"];return(Ni=function(){return e})()}var Hi=ji;function ji(e,t){var r=Vi();return(ji=function(e,t){return r[e-=127]})(e,t)}!function(e,t){for(var r=ji,n=e();;)try{if(811914===-parseInt(r(151))/1*(parseInt(r(141))/2)+parseInt(r(144))/3+parseInt(r(139))/4*(-parseInt(r(132))/5)+parseInt(r(153))/6*(-parseInt(r(142))/7)+-parseInt(r(143))/8+-parseInt(r(145))/9*(-parseInt(r(128))/10)+parseInt(r(147))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Vi);Qe[Hi(155)]((function(e,t){var r,n,i=Hi;Qe[i(134)],e[ji(150)]=(r=Ei,n=i,function(e){var t=ji,n=r,i=n[t(135)],s=i[t(154)],o=i[t(156)],a=n[t(137)],c=[];!function(){for(var r=t,n=0;n<64;n++)c[n]=4294967296*e[r(138)](e[r(158)](n+1))|0}();var u=a[t(162)]=o[t(129)]({_doReset:function(){var e=t;this._hash=new(s[e(131)])([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var n=t+r,i=e[n];e[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var s=this._hash.words,o=e[t+0],a=e[t+1],u=e[t+2],p=e[t+3],m=e[t+4],v=e[t+5],y=e[t+6],g=e[t+7],_=e[t+8],b=e[t+9],w=e[t+10],S=e[t+11],I=e[t+12],A=e[t+13],E=e[t+14],k=e[t+15],C=s[0],T=s[1],x=s[2],D=s[3];C=l(C,T,x,D,o,7,c[0]),D=l(D,C,T,x,a,12,c[1]),x=l(x,D,C,T,u,17,c[2]),T=l(T,x,D,C,p,22,c[3]),C=l(C,T,x,D,m,7,c[4]),D=l(D,C,T,x,v,12,c[5]),x=l(x,D,C,T,y,17,c[6]),T=l(T,x,D,C,g,22,c[7]),C=l(C,T,x,D,_,7,c[8]),D=l(D,C,T,x,b,12,c[9]),x=l(x,D,C,T,w,17,c[10]),T=l(T,x,D,C,S,22,c[11]),C=l(C,T,x,D,I,7,c[12]),D=l(D,C,T,x,A,12,c[13]),x=l(x,D,C,T,E,17,c[14]),C=d(C,T=l(T,x,D,C,k,22,c[15]),x,D,a,5,c[16]),D=d(D,C,T,x,y,9,c[17]),x=d(x,D,C,T,S,14,c[18]),T=d(T,x,D,C,o,20,c[19]),C=d(C,T,x,D,v,5,c[20]),D=d(D,C,T,x,w,9,c[21]),x=d(x,D,C,T,k,14,c[22]),T=d(T,x,D,C,m,20,c[23]),C=d(C,T,x,D,b,5,c[24]),D=d(D,C,T,x,E,9,c[25]),x=d(x,D,C,T,p,14,c[26]),T=d(T,x,D,C,_,20,c[27]),C=d(C,T,x,D,A,5,c[28]),D=d(D,C,T,x,u,9,c[29]),x=d(x,D,C,T,g,14,c[30]),C=h(C,T=d(T,x,D,C,I,20,c[31]),x,D,v,4,c[32]),D=h(D,C,T,x,_,11,c[33]),x=h(x,D,C,T,S,16,c[34]),T=h(T,x,D,C,E,23,c[35]),C=h(C,T,x,D,a,4,c[36]),D=h(D,C,T,x,m,11,c[37]),x=h(x,D,C,T,g,16,c[38]),T=h(T,x,D,C,w,23,c[39]),C=h(C,T,x,D,A,4,c[40]),D=h(D,C,T,x,o,11,c[41]),x=h(x,D,C,T,p,16,c[42]),T=h(T,x,D,C,y,23,c[43]),C=h(C,T,x,D,b,4,c[44]),D=h(D,C,T,x,I,11,c[45]),x=h(x,D,C,T,k,16,c[46]),C=f(C,T=h(T,x,D,C,u,23,c[47]),x,D,o,6,c[48]),D=f(D,C,T,x,g,10,c[49]),x=f(x,D,C,T,E,15,c[50]),T=f(T,x,D,C,v,21,c[51]),C=f(C,T,x,D,I,6,c[52]),D=f(D,C,T,x,p,10,c[53]),x=f(x,D,C,T,w,15,c[54]),T=f(T,x,D,C,a,21,c[55]),C=f(C,T,x,D,_,6,c[56]),D=f(D,C,T,x,k,10,c[57]),x=f(x,D,C,T,y,15,c[58]),T=f(T,x,D,C,A,21,c[59]),C=f(C,T,x,D,m,6,c[60]),D=f(D,C,T,x,S,10,c[61]),x=f(x,D,C,T,u,15,c[62]),T=f(T,x,D,C,b,21,c[63]),s[0]=s[0]+C|0,s[1]=s[1]+T|0,s[2]=s[2]+x|0,s[3]=s[3]+D|0},_doFinalize:function(){var r=t,n=this[r(127)],i=n.words,s=8*this._nDataBytes,o=8*n[r(136)];i[o>>>5]|=128<<24-o%32;var a=e[r(149)](s/4294967296),c=s;i[15+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(o+64>>>9<<4)]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),n[r(136)]=4*(i[r(148)]+1),this[r(140)]();for(var u=this[r(130)],l=u[r(133)],d=0;d<4;d++){var h=l[d];l[d]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return u},clone:function(){var e=t,r=o[e(157)][e(159)](this);return r[e(130)]=this[e(130)][e(157)](),r}});function l(e,t,r,n,i,s,o){var a=e+(t&r|~t&n)+i+o;return(a<>>32-s)+t}function d(e,t,r,n,i,s,o){var a=e+(t&n|r&~n)+i+o;return(a<>>32-s)+t}function h(e,t,r,n,i,s,o){var a=e+(t^r^n)+i+o;return(a<>>32-s)+t}function f(e,t,r,n,i,s,o){var a=e+(r^(t|~n))+i+o;return(a<>>32-s)+t}n[t(162)]=o._createHelper(u),n[t(152)]=o[t(160)](u)}(Math),r[n(162)])}));function Vi(){var e=["1305FVvOFv","amd","6853374aqtltQ","length","floor","exports","158eOcYlL","HmacMD5","864Dhqhcw","WordArray","createCommonjsModule","Hasher","clone","sin","call","_createHmacHelper","./core","MD5","_data","90890CmhpsB","extend","_hash","init","1276530NDDAuv","words","commonjsGlobal","lib","sigBytes","algo","abs","4dmMEGU","_process","1460ySNzCj","58380rsSXwp","7190288FXdPXl","4024101DWPUlg"];return(Vi=function(){return e})()}!function(e,t){for(var r=Wi,n=e();;)try{if(578388===-parseInt(r(128))/1+parseInt(r(125))/2+-parseInt(r(107))/3*(-parseInt(r(126))/4)+parseInt(r(124))/5*(-parseInt(r(108))/6)+-parseInt(r(110))/7+-parseInt(r(118))/8+-parseInt(r(112))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}($i);Ze((function(e,t){var r,n,i;r=Qe[Wi(122)],n=function(e){return n=(r=e)[(t=Wi)(117)],i=n.WordArray,s=n[t(116)],o=r[t(132)],a=[],c=o[t(135)]=s[t(139)]({_doReset:function(){var e=t;this[e(130)]=new(i[e(120)])([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,r){for(var n=t,i=this[n(130)][n(114)],s=i[0],o=i[1],c=i[2],u=i[3],l=i[4],d=0;d<80;d++){if(d<16)a[d]=0|e[r+d];else{var h=a[d-3]^a[d-8]^a[d-14]^a[d-16];a[d]=h<<1|h>>>31}var f=(s<<5|s>>>27)+l+a[d];f+=d<20?1518500249+(o&c|~o&u):d<40?1859775393+(o^c^u):d<60?(o&c|o&u|c&u)-1894007588:(o^c^u)-899497514,l=u,u=c,c=o<<30|o>>>2,o=s,s=f}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+c|0,i[3]=i[3]+u|0,i[4]=i[4]+l|0},_doFinalize:function(){var e=t,r=this[e(109)],n=r.words,i=8*this[e(133)],s=8*r[e(111)];return n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=Math[e(123)](i/4294967296),n[15+(s+64>>>9<<4)]=i,r[e(111)]=4*n[e(113)],this[e(136)](),this[e(130)]},clone:function(){var e=t,r=s[e(119)][e(131)](this);return r._hash=this[e(130)][e(119)](),r}}),r.SHA1=s[t(134)](c),r.HmacSHA1=s[t(137)](c),e.SHA1;var t,r,n,i,s,o,a,c},"object"===(i=Wi)(129)?e[i(127)]=n(Ei):"undefined"===i(138)&&(void 0)[i(121)]?(void 0)([i(115)],n):n(r.CryptoJS)}));function Wi(e,t){var r=$i();return(Wi=function(e,t){return r[e-=107]})(e,t)}function $i(){var e=["SHA1","_process","_createHmacHelper","function","extend","2777262lfylUJ","26538CxaJtY","_data","2986466sOpbRd","sigBytes","1541475InUkHo","length","words","./core","Hasher","lib","1911376yAduSz","clone","init","amd","commonjsGlobal","floor","550ZgOPeX","2251198UQQDRP","4LvwnFQ","exports","149600jaZHis","object","_hash","call","algo","_nDataBytes","_createHelper"];return($i=function(){return e})()}function Gi(e,t){var r=qi();return(Gi=function(e,t){return r[e-=292]})(e,t)}function qi(){var e=["createCommonjsModule","sqrt","./core","slice","1971488ASuiAS","words","29167758uBMhhk","_hash","length","SHA256","sigBytes","38430rntEqM","lib","extend","clone","900OjAzbi","2918vnrHqx","922443hZOWlX","Hasher","9696323jIMlCy","_nDataBytes","_process","_data","586728byddLb","commonjsGlobal","165EUPtKE","CryptoJS","pow","floor","call","WordArray"];return(qi=function(){return e})()}var Ki=Gi;!function(e,t){for(var r=Gi,n=e();;)try{if(705638===parseInt(r(299))/1+-parseInt(r(298))/2*(parseInt(r(307))/3)+parseInt(r(317))/4+parseInt(r(297))/5*(parseInt(r(293))/6)+parseInt(r(301))/7+parseInt(r(305))/8+-parseInt(r(319))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(qi);Qe[Ki(313)]((function(e,t){var r;Qe[Ki(306)],e.exports=(r=Ei,function(e){var t=Gi,n=r,i=n[t(294)],s=i[t(312)],o=i[t(300)],a=n.algo,c=[],u=[];!function(){var r=t;function n(t){for(var r=e[Gi(314)](t),n=2;n<=r;n++)if(!(t%n))return!1;return!0}function i(e){return 4294967296*(e-(0|e))|0}for(var s=2,o=0;o<64;)n(s)&&(o<8&&(c[o]=i(e[r(309)](s,.5))),u[o]=i(e[r(309)](s,1/3)),o++),s++}();var l=[],d=a.SHA256=o[t(295)]({_doReset:function(){var e=t;this[e(320)]=new s.init(c[e(316)](0))},_doProcessBlock:function(e,r){for(var n=t,i=this[n(320)][n(318)],s=i[0],o=i[1],a=i[2],c=i[3],d=i[4],h=i[5],f=i[6],p=i[7],m=0;m<64;m++){if(m<16)l[m]=0|e[r+m];else{var v=l[m-15],y=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3,g=l[m-2],_=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;l[m]=y+l[m-7]+_+l[m-16]}var b=s&o^s&a^o&a,w=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),S=p+((d<<26|d>>>6)^(d<<21|d>>>11)^(d<<7|d>>>25))+(d&h^~d&f)+u[m]+l[m];p=f,f=h,h=d,d=c+S|0,c=a,a=o,o=s,s=S+(w+b)|0}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+a|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0,i[5]=i[5]+h|0,i[6]=i[6]+f|0,i[7]=i[7]+p|0},_doFinalize:function(){var r=t,n=this[r(304)],i=n[r(318)],s=8*this[r(302)],o=8*n[r(292)];return i[o>>>5]|=128<<24-o%32,i[14+(o+64>>>9<<4)]=e[r(310)](s/4294967296),i[15+(o+64>>>9<<4)]=s,n[r(292)]=4*i[r(321)],this[r(303)](),this[r(320)]},clone:function(){var e=t,r=o[e(296)][e(311)](this);return r[e(320)]=this._hash[e(296)](),r}});n[t(322)]=o._createHelper(d),n.HmacSHA256=o._createHmacHelper(d)}(Math),r.SHA256)}));function Ji(){var e=["4321513SmRmXZ","SHA256","function","4psWvgM","_doFinalize","lib","2354065KAewCv","HmacSHA224","333GKnPvQ","amd","4073496LOdmlZ","175920MTKUhJ","./sha256","sigBytes","SHA224","4fGwaVI","2265798KYnrge","./core","commonjsGlobal","272084dwDzQH","CryptoJS","5342410CkERmY","object","_createHelper","extend","WordArray"];return(Ji=function(){return e})()}!function(e,t){for(var r=Xi,n=e();;)try{if(483933===-parseInt(r(199))/1*(-parseInt(r(189))/2)+-parseInt(r(212))/3*(-parseInt(r(211))/4)+parseInt(r(202))/5+parseInt(r(206))/6+-parseInt(r(196))/7+parseInt(r(207))/8*(-parseInt(r(204))/9)+-parseInt(r(191))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ji);Ze((function(e,t){var r,n,i,s=Xi;r=Qe[s(188)],n=function(e){var t,r,n,i,o,a,c=s;return n=(r=e)[(t=Xi)(201)][t(195)],i=r.algo,o=i[t(197)],a=i[t(210)]=o[t(194)]({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=t,r=o[e(200)].call(this);return r[e(209)]-=4,r}}),r[t(210)]=o[t(193)](a),r[t(203)]=o._createHmacHelper(a),e[c(210)]},(i=Xi)(192)==i(192)?e.exports=n(Ei):"undefined"===i(198)&&(void 0)[i(205)]?(void 0)([i(187),i(208)],n):n(r[i(190)])}));function Xi(e,t){var r=Ji();return(Xi=function(e,t){return r[e-=187]})(e,t)}var Yi=Qi;function Zi(){var e=["commonjsGlobal","./x64-core","_hash","lib","words","extend","algo","Hasher","object","call","exports","Word","./core","2237360XgHVGC","_data","6229993SZUzds","amd","8010864smggJB","function","_nDataBytes","init","SHA512","4aCuLjn","clone","low","HmacSHA512","createCommonjsModule","high","sigBytes","1306698WypQAb","length","apply","WordArray","1679172zyaKog","8sPprnC","1471359IoDHDB","_createHelper","CryptoJS","2232864ehWssX","toX32","create","floor"];return(Zi=function(){return e})()}!function(e,t){for(var r=Qi,n=e();;)try{if(769597===parseInt(r(156))/1+-parseInt(r(143))/2*(parseInt(r(150))/3)+parseInt(r(154))/4+-parseInt(r(134))/5+parseInt(r(138))/6+parseInt(r(136))/7*(-parseInt(r(155))/8)+-parseInt(r(159))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Zi);Qe[Yi(147)]((function(e,t){var r,n,i,s=Yi;r=Qe[s(163)],n=function(e){var t=s;return function(){var t=Qi,r=e,n=r[t(166)][t(128)],i=r.x64,s=i[t(132)],o=i[t(153)],a=r[t(127)];function c(){var e=t;return s[e(161)][e(152)](s,arguments)}var u=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=c()}();var d=a[t(142)]=n[t(126)]({_doReset:function(){var e=t;this[e(165)]=new o.init([new(s[e(141)])(1779033703,4089235720),new(s[e(141)])(3144134277,2227873595),new(s[e(141)])(1013904242,4271175723),new(s[e(141)])(2773480762,1595750129),new(s[e(141)])(1359893119,2917565137),new(s[e(141)])(2600822924,725511199),new s.init(528734635,4215389547),new(s[e(141)])(1541459225,327033209)])},_doProcessBlock:function(e,r){for(var n=t,i=this[n(165)][n(125)],s=i[0],o=i[1],a=i[2],c=i[3],d=i[4],h=i[5],f=i[6],p=i[7],m=s[n(148)],v=s[n(145)],y=o[n(148)],g=o[n(145)],_=a[n(148)],b=a.low,w=c.high,S=c[n(145)],I=d[n(148)],A=d[n(145)],E=h[n(148)],k=h[n(145)],C=f[n(148)],T=f[n(145)],x=p[n(148)],D=p[n(145)],B=m,P=v,M=y,U=g,F=_,R=b,L=w,O=S,z=I,N=A,H=E,j=k,V=C,W=T,$=x,G=D,q=0;q<80;q++){var K,J,X=l[q];if(q<16)J=X.high=0|e[r+2*q],K=X[n(145)]=0|e[r+2*q+1];else{var Y=l[q-15],Z=Y[n(148)],Q=Y.low,ee=(Z>>>1|Q<<31)^(Z>>>8|Q<<24)^Z>>>7,te=(Q>>>1|Z<<31)^(Q>>>8|Z<<24)^(Q>>>7|Z<<25),re=l[q-2],ne=re[n(148)],ie=re[n(145)],se=(ne>>>19|ie<<13)^(ne<<3|ie>>>29)^ne>>>6,oe=(ie>>>19|ne<<13)^(ie<<3|ne>>>29)^(ie>>>6|ne<<26),ae=l[q-7],ce=ae[n(148)],ue=ae[n(145)],le=l[q-16],de=le.high,he=le.low;J=(J=(J=ee+ce+((K=te+ue)>>>0>>0?1:0))+se+((K+=oe)>>>0>>0?1:0))+de+((K+=he)>>>0>>0?1:0),X[n(148)]=J,X[n(145)]=K}var fe,pe=z&H^~z&V,me=N&j^~N&W,ve=B&M^B&F^M&F,ye=P&U^P&R^U&R,ge=(B>>>28|P<<4)^(B<<30|P>>>2)^(B<<25|P>>>7),_e=(P>>>28|B<<4)^(P<<30|B>>>2)^(P<<25|B>>>7),be=(z>>>14|N<<18)^(z>>>18|N<<14)^(z<<23|N>>>9),we=(N>>>14|z<<18)^(N>>>18|z<<14)^(N<<23|z>>>9),Se=u[q],Ie=Se[n(148)],Ae=Se[n(145)],Ee=$+be+((fe=G+we)>>>0>>0?1:0),ke=_e+ye;$=V,G=W,V=H,W=j,H=z,j=N,z=L+(Ee=(Ee=(Ee=Ee+pe+((fe+=me)>>>0>>0?1:0))+Ie+((fe+=Ae)>>>0>>0?1:0))+J+((fe+=K)>>>0>>0?1:0))+((N=O+fe|0)>>>0>>0?1:0)|0,L=F,O=R,F=M,R=U,M=B,U=P,B=Ee+(ge+ve+(ke>>>0<_e>>>0?1:0))+((P=fe+ke|0)>>>0>>0?1:0)|0}v=s[n(145)]=v+P,s[n(148)]=m+B+(v>>>0

>>0?1:0),g=o[n(145)]=g+U,o[n(148)]=y+M+(g>>>0>>0?1:0),b=a[n(145)]=b+R,a[n(148)]=_+F+(b>>>0>>0?1:0),S=c[n(145)]=S+O,c[n(148)]=w+L+(S>>>0>>0?1:0),A=d[n(145)]=A+N,d[n(148)]=I+z+(A>>>0>>0?1:0),k=h[n(145)]=k+j,h[n(148)]=E+H+(k>>>0>>0?1:0),T=f.low=T+W,f[n(148)]=C+V+(T>>>0>>0?1:0),D=p[n(145)]=D+G,p.high=x+$+(D>>>0>>0?1:0)},_doFinalize:function(){var e=t,r=this[e(135)],n=r[e(125)],i=8*this[e(140)],s=8*r[e(149)];return n[s>>>5]|=128<<24-s%32,n[30+(s+128>>>10<<5)]=Math[e(162)](i/4294967296),n[31+(s+128>>>10<<5)]=i,r[e(149)]=4*n[e(151)],this._process(),this[e(165)][e(160)]()},clone:function(){var e=t,r=n[e(144)][e(130)](this);return r[e(165)]=this[e(165)][e(144)](),r},blockSize:32});r[t(142)]=n[t(157)](d),r[t(146)]=n._createHmacHelper(d)}(),e[t(142)]},"object"===(i=Qi)(129)?e[i(131)]=n(Ei):"undefined"===i(139)&&(void 0)[i(137)]?(void 0)([i(133),i(164)],n):n(r[i(158)])}));function Qi(e,t){var r=Zi();return(Qi=function(e,t){return r[e-=125]})(e,t)}function es(){var e=["8626184yoTqYg","./sha512","WordArray","SHA384","126qqOokv","198245imwRrP","./core","sigBytes","exports","algo","31276edeHUX","Word","object","23618097RbYWdE","240765ZbKvBe","init","CryptoJS","2uQjvLM","x64","_createHmacHelper","function","_createHelper","HmacSHA384","3973776YIafuE","SHA512","616979HefhfD"];return(es=function(){return e})()}function ts(e,t){var r=es();return(ts=function(e,t){return r[e-=491]})(e,t)}!function(e,t){for(var r=ts,n=e();;)try{if(683443===-parseInt(r(514))/1+-parseInt(r(506))/2*(parseInt(r(503))/3)+-parseInt(r(512))/4+parseInt(r(494))/5*(parseInt(r(493))/6)+-parseInt(r(499))/7+-parseInt(r(515))/8+parseInt(r(502))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(es);Ze((function(e,t){var r,n,i;r=Ye,n=function(e){var t,r,n,i,s,o,a,c,u=ts;return n=(r=e)[(t=ts)(507)],i=n[t(500)],s=n[t(491)],o=r[t(498)],a=o[t(513)],c=o.SHA384=a.extend({_doReset:function(){var e=t;this._hash=new(s[e(504)])([new(i[e(504)])(3418070365,3238371032),new(i[e(504)])(1654270250,914150663),new(i[e(504)])(2438529370,812702999),new i.init(355462360,4144912697),new(i[e(504)])(1731405415,4290775857),new(i[e(504)])(2394180231,1750603025),new(i[e(504)])(3675008525,1694076839),new(i[e(504)])(1203062813,3204075428)])},_doFinalize:function(){var e=t,r=a._doFinalize.call(this);return r[e(496)]-=16,r}}),r[t(492)]=a[t(510)](c),r[t(511)]=a[t(508)](c),e[u(492)]},(i=ts)(501)==i(501)?e[i(497)]=n(Ei):"undefined"===i(509)&&(void 0).amd?(void 0)([i(495),"./x64-core",i(516)],n):n(r[i(505)])}));var rs=is;function ns(){var e=["words","13421ssKPnZ","_data","low","ceil","clone","8LJWRxs","CryptoJS","42bnudWD","call","sigBytes","WordArray","Hasher","function","SHA3","lib","1903433JrJRjK","HmacSHA3","./x64-core","4xPVVOZ","create","./core","object","_createHelper","_process","createCommonjsModule","push","341640OUQsth","extend","init","exports","_createHmacHelper","_state","814221tCkWJW","374811VNJXdB","1556770qVdiyw","high","outputLength","blockSize","slice","amd","cfg","8218420ZDruSr","commonjsGlobal","length"];return(ns=function(){return e})()}function is(e,t){var r=ns();return(is=function(e,t){return r[e-=480]})(e,t)}!function(e,t){for(var r=is,n=e();;)try{if(229074===-parseInt(r(490))/1*(parseInt(r(497))/2)+-parseInt(r(523))/3*(-parseInt(r(508))/4)+-parseInt(r(524))/5+parseInt(r(516))/6+parseInt(r(505))/7*(-parseInt(r(495))/8)+parseInt(r(522))/9+parseInt(r(486))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ns);Qe[rs(514)]((function(e,t){var r,n,i,s=rs;r=Qe[s(487)],n=function(e){var t=s;return function(t){var r=is,n=e,i=n[r(504)],s=i[r(500)],o=i[r(501)],a=n.x64.Word,c=n.algo,u=[],l=[],d=[];!function(){for(var e=r,t=1,n=0,i=0;i<24;i++){u[t+5*n]=(i+1)*(i+2)/2%64;var s=(2*t+3*n)%5;t=n%5,n=s}for(t=0;t<5;t++)for(n=0;n<5;n++)l[t+5*n]=n+(2*t+3*n)%5*5;for(var o=1,c=0;c<24;c++){for(var h=0,f=0,p=0;p<7;p++){if(1&o){var m=(1<>>24)|4278255360&(a<<24|a>>>8),c=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),(D=i[o])[n(480)]^=c,D[n(492)]^=a}for(var f=0;f<24;f++){for(var p=0;p<5;p++){for(var m=0,v=0,y=0;y<5;y++)m^=(D=i[p+5*y])[n(480)],v^=D[n(492)];var g=h[p];g.high=m,g[n(492)]=v}for(p=0;p<5;p++){var _=h[(p+4)%5],b=h[(p+1)%5],w=b[n(480)],S=b[n(492)];for(m=_[n(480)]^(w<<1|S>>>31),v=_[n(492)]^(S<<1|w>>>31),y=0;y<5;y++)(D=i[p+5*y])[n(480)]^=m,D[n(492)]^=v}for(var I=1;I<25;I++){var A=(D=i[I]).high,E=D[n(492)],k=u[I];k<32?(m=A<>>32-k,v=E<>>32-k):(m=E<>>64-k,v=A<>>64-k);var C=h[l[I]];C.high=m,C[n(492)]=v}var T=h[0],x=i[0];for(T[n(480)]=x[n(480)],T[n(492)]=x[n(492)],p=0;p<5;p++)for(y=0;y<5;y++){var D=i[I=p+5*y],B=h[I],P=h[(p+1)%5+5*y],M=h[(p+2)%5+5*y];D[n(480)]=B[n(480)]^~P[n(480)]&M.high,D[n(492)]=B[n(492)]^~P[n(492)]&M.low}D=i[0];var U=d[f];D.high^=U.high,D[n(492)]^=U[n(492)]}},_doFinalize:function(){var e=r,n=this[e(491)],i=n[e(489)];this._nDataBytes;var o=8*n[e(499)],a=32*this[e(482)];i[o>>>5]|=1<<24-o%32,i[(t[e(493)]((o+1)/a)*a>>>5)-1]|=128,n.sigBytes=4*i[e(488)],this[e(513)]();for(var c=this._state,u=this[e(485)][e(481)]/8,l=u/8,d=[],h=0;h>>24)|4278255360&(p<<24|p>>>8),m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),d[e(515)](m),d[e(515)](p)}return new(s[e(518)])(d,u)},clone:function(){for(var e=r,t=o[e(494)][e(498)](this),n=t[e(521)]=this[e(521)][e(483)](0),i=0;i<25;i++)n[i]=n[i][e(494)]();return t}});n.SHA3=o[r(512)](f),n[r(506)]=o[r(520)](f)}(Math),e[t(503)]},(i=is)(511)==i(511)?e[i(519)]=n(Ei):"undefined"===i(502)&&(void 0)[i(484)]?(void 0)([i(510),i(507)],n):n(r[i(496)])}));function ss(e,t){var r=os();return(ss=function(e,t){return r[e-=374]})(e,t)}!function(e,t){for(var r=ss,n=e();;)try{if(456963===-parseInt(r(388))/1+-parseInt(r(387))/2+-parseInt(r(390))/3*(-parseInt(r(374))/4)+-parseInt(r(394))/5+parseInt(r(385))/6+-parseInt(r(395))/7+parseInt(r(398))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(os);Ze((function(e,t){var r,n,i,s=ss;r=Qe[s(384)],n=function(e){var t=s;return function(t){var r=ss,n=e,i=n[r(375)],s=i[r(386)],o=i.Hasher,a=n[r(400)],c=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=s[r(399)]([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=s.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=s[r(399)]([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=s[r(399)]([0,1518500249,1859775393,2400959708,2840853838]),f=s[r(399)]([1352829926,1548603684,1836072691,2053994217,0]),p=a[r(376)]=o[r(378)]({_doReset:function(){this._hash=s.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=r,i=0;i<16;i++){var s=t+i,o=e[s];e[s]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a,p,w,S,I,A,E,k,C,T,x,D=this._hash.words,B=h[n(391)],P=f[n(391)],M=c[n(391)],U=u[n(391)],F=l.words,R=d[n(391)];for(A=a=D[0],E=p=D[1],k=w=D[2],C=S=D[3],T=I=D[4],i=0;i<80;i+=1)x=a+e[t+M[i]]|0,x+=i<16?m(p,w,S)+B[0]:i<32?v(p,w,S)+B[1]:i<48?y(p,w,S)+B[2]:i<64?g(p,w,S)+B[3]:_(p,w,S)+B[4],x=(x=b(x|=0,F[i]))+I|0,a=I,I=S,S=b(w,10),w=p,p=x,x=A+e[t+U[i]]|0,x+=i<16?_(E,k,C)+P[0]:i<32?g(E,k,C)+P[1]:i<48?y(E,k,C)+P[2]:i<64?v(E,k,C)+P[3]:m(E,k,C)+P[4],x=(x=b(x|=0,R[i]))+T|0,A=T,T=C,C=b(k,10),k=E,E=x;x=D[1]+w+C|0,D[1]=D[2]+S+T|0,D[2]=D[3]+I+A|0,D[3]=D[4]+a+E|0,D[4]=D[0]+p+k|0,D[0]=x},_doFinalize:function(){var e=r,t=this[e(380)],n=t.words,i=8*this._nDataBytes,s=8*t[e(396)];n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t[e(396)]=4*(n.length+1),this[e(393)]();for(var o=this[e(397)],a=o[e(391)],c=0;c<5;c++){var u=a[c];a[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return o},clone:function(){var e=r,t=o[e(379)][e(381)](this);return t[e(397)]=this._hash[e(379)](),t}});function m(e,t,r){return e^t^r}function v(e,t,r){return e&t|~e&r}function y(e,t,r){return(e|~t)^r}function g(e,t,r){return e&r|t&~r}function _(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}n.RIPEMD160=o[r(377)](p),n.HmacRIPEMD160=o[r(382)](p)}(),e[t(376)]},"object"===(i=ss)(383)?e.exports=n(Ei):"undefined"===i(389)&&(void 0).amd?(void 0)([i(392)],n):n(r.CryptoJS)}));function os(){var e=["extend","clone","_data","call","_createHmacHelper","object","commonjsGlobal","2019240uUpcGx","WordArray","156402TaIGFy","7630gUdRcf","function","423COiJZH","words","./core","_process","1785555nJVKcr","1797929lLxtwD","sigBytes","_hash","6265032WrtMrC","create","algo","1052aekfvM","lib","RIPEMD160","_createHelper"];return(os=function(){return e})()}function as(e,t){var r=cs();return(as=function(e,t){return r[e-=128]})(e,t)}!function(e,t){for(var r=as,n=e();;)try{if(988797===-parseInt(r(134))/1+-parseInt(r(139))/2*(-parseInt(r(146))/3)+-parseInt(r(155))/4+-parseInt(r(133))/5*(parseInt(r(144))/6)+-parseInt(r(154))/7*(parseInt(r(162))/8)+-parseInt(r(131))/9+parseInt(r(156))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(cs);Ze((function(e,t){var r,n,i;r=Qe[as(160)],n=function(e){var t,r,n,i;n=(r=e)[(t=as)(132)].Base,i=r[t(148)][t(163)],r[t(161)][t(141)]=n[t(149)]({init:function(e,r){var n=t;e=this[n(135)]=new(e[n(164)]),typeof r==n(143)&&(r=i[n(142)](r));var s=e[n(137)],o=4*s;r[n(150)]>o&&(r=e[n(157)](r)),r[n(145)]();for(var a=this._oKey=r[n(159)](),c=this[n(140)]=r.clone(),u=a[n(152)],l=c[n(152)],d=0;d>>2];e[t(311)]-=r}};s[n(264)]=h[n(304)]({cfg:h[n(291)].extend({mode:m,padding:v}),reset:function(){var e,t=n;h[t(290)][t(316)](this);var r=this[t(291)],i=r.iv,s=r[t(279)];this._xformMode==this[t(324)]?e=s[t(310)]:(e=s[t(287)],this[t(326)]=1),this[t(284)]&&this[t(284)][t(265)]==e?this[t(284)][t(298)](this,i&&i[t(276)]):(this[t(284)]=e[t(316)](s,this,i&&i.words),this[t(284)][t(265)]=e)},_doProcessBlock:function(e,t){var r=n;this[r(284)][r(293)](e,t)},_doFinalize:function(){var e,t=n,r=this[t(291)][t(271)];return this._xformMode==this[t(324)]?(r[t(269)](this[t(270)],this.blockSize),e=this[t(317)](!!t(278))):(e=this[t(317)](!!t(278)),r[t(253)](e)),e},blockSize:4});var y=s[n(309)]=o[n(304)]({init:function(e){this[n(277)](e)},toString:function(e){return(e||this[n(306)]).stringify(this)}}),g=(i[n(257)]={}).OpenSSL={stringify:function(e){var t=n,r=e[t(288)],i=e.salt;return(i?a[t(263)]([1398893684,1701076831])[t(281)](i).concat(r):r)[t(319)](l)},parse:function(e){var t,r=n,i=l[r(318)](e),s=i.words;return 1398893684==s[0]&&1701076831==s[1]&&(t=a[r(263)](s[r(256)](2,4)),s[r(249)](0,4),i[r(311)]-=16),y[r(263)]({ciphertext:i,salt:t})}},_=s[n(282)]=o[n(304)]({cfg:o[n(304)]({format:g}),encrypt:function(e,t,r,i){var s=n;i=this[s(291)][s(304)](i);var o=e[s(310)](r,i),a=o[s(321)](t),c=o.cfg;return y[s(263)]({ciphertext:a,key:r,iv:c.iv,algorithm:e,mode:c[s(279)],padding:c[s(271)],blockSize:e[s(280)],formatter:i[s(257)]})},decrypt:function(e,t,r,i){var s=n;return i=this[s(291)][s(304)](i),t=this[s(254)](t,i[s(257)]),e[s(287)](r,i)[s(321)](t[s(288)])},_parse:function(e,t){var r=n;return typeof e==r(266)?t[r(318)](e,this):e}}),b=(i[n(300)]={}).OpenSSL={execute:function(e,t,r,i,s){var o=n;if(!i&&(i=a[o(258)](8)),s)c=d.create({keySize:t+r,hasher:s}).compute(e,i);else var c=d.create({keySize:t+r})[o(243)](e,i);var u=a.create(c[o(276)][o(256)](t),4*r);return c[o(311)]=4*t,y[o(263)]({key:c,iv:u,salt:i})}},w=s[n(274)]=_.extend({cfg:_[n(291)].extend({kdf:b}),encrypt:function(e,t,r,i){var s=n,o=(i=this[s(291)][s(304)](i))[s(300)][s(299)](r,e[s(267)],e.ivSize,i[s(327)],i[s(314)]);i.iv=o.iv;var a=_[s(296)][s(316)](this,e,t,o[s(325)],i);return a.mixIn(o),a},decrypt:function(e,t,r,i){var s=n;i=this[s(291)].extend(i),t=this[s(254)](t,i.format);var o=i[s(300)][s(299)](r,e[s(267)],e.ivSize,t[s(327)],i.hasher);return i.iv=o.iv,_[s(285)][s(316)](this,e,t,o.key,i)}})}()},"object"===(i=vs)(255)?e[i(292)]=n(Ei):"undefined"===i(260)&&(void 0)[i(246)]?(void 0)([i(261),"./evpkdf"],n):n(r[i(245)])}));function ys(e,t){var r=gs();return(ys=function(e,t){return r[e-=463]})(e,t)}function gs(){var e=["1441896FmFcOs","lib","4qYVUuj","247828Lhmxpx","CryptoJS","extend","object","Decryptor","call","546390pPwmVs","./cipher-core","929845ZGsrHP","20867976fAWDIZ","1605670CAQBle","_iv","slice","commonjsGlobal","2208894fgNqdi","encryptBlock","_prevBlock","CFB","function","_cipher","./core","amd"];return(gs=function(){return e})()}!function(e,t){for(var r=ys,n=e();;)try{if(789072===parseInt(r(467))/1+-parseInt(r(469))/2*(-parseInt(r(484))/3)+-parseInt(r(470))/4+parseInt(r(480))/5+parseInt(r(476))/6+parseInt(r(478))/7+-parseInt(r(479))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(gs);Ze((function(e,t){var r,n,i,s=ys;r=Qe[s(483)],n=function(e){var t=s;return e.mode[t(487)]=function(){var r=t,n=e[r(468)].BlockCipherMode.extend();function i(e,t,n,i){var s,o=r,a=this[o(481)];a?(s=a[o(482)](0),this[o(481)]=void 0):s=this._prevBlock,i[o(485)](s,0);for(var c=0;c>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var s=n.Encryptor=n[r(340)]({processBlock:function(e,t){var n,s=r,o=this._cipher,a=o[s(333)],c=this._iv,u=this._counter;c&&(u=this[s(347)]=c[s(327)](0),this._iv=void 0),0===((n=u)[0]=i(n[0]))&&(n[1]=i(n[1]));var l=u[s(327)](0);o[s(332)](l,0);for(var d=0;d>>2]|=o<<24-a%4*8,e.sigBytes+=o},unpad:function(e){var r=t,n=255&e[r(267)][e[r(270)]-1>>>2];e[r(270)]-=n}},e[t(273)].Ansix923},"object"===(i=Bs)(269)?e[i(278)]=n(Ei):"undefined"===i(271)&&(void 0)[i(279)]?(void 0)([i(284),i(283)],n):n(r[i(287)])}));var Ms=Fs;function Us(){var e=["sigBytes","78FyDFtS","Iso10126","191555LcTIJn","commonjsGlobal","./core","108988jLKFsL","pad","21454CnozLP","function","785428DAwmGN","1384140ZRYSbm","object","424GiVSjr","concat","lib","./cipher-core","60WIxTYP","97884WSFaVQ","10WMqppx","words","random","exports","14HYMQHk","WordArray","12828084QXNbxg","createCommonjsModule"];return(Us=function(){return e})()}function Fs(e,t){var r=Us();return(Fs=function(e,t){return r[e-=309]})(e,t)}!function(e,t){for(var r=Fs,n=e();;)try{if(415126===-parseInt(r(324))/1*(-parseInt(r(309))/2)+parseInt(r(312))/3+parseInt(r(311))/4*(-parseInt(r(320))/5)+parseInt(r(329))/6*(-parseInt(r(331))/7)+-parseInt(r(314))/8*(parseInt(r(319))/9)+-parseInt(r(318))/10*(-parseInt(r(334))/11)+parseInt(r(326))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Us);Qe[Ms(327)]((function(e,t){var r,n,i,s=Ms;r=Qe[s(332)],n=function(e){var t=s;return e[t(335)][t(330)]={pad:function(r,n){var i=t,s=4*n,o=s-r[i(328)]%s;r.concat(e.lib[i(325)][i(322)](o-1))[i(315)](e[i(316)][i(325)].create([o<<24],1))},unpad:function(e){var r=t,n=255&e[r(321)][e[r(328)]-1>>>2];e[r(328)]-=n}},e[t(335)][t(330)]},"object"===(i=Fs)(313)?e[i(323)]=n(Ei):"undefined"===i(310)&&(void 0).amd?(void 0)([i(333),i(317)],n):n(r.CryptoJS)}));function Rs(e,t){var r=Ls();return(Rs=function(e,t){return r[e-=420]})(e,t)}function Ls(){var e=["2459946jiahno","27fmhEbG","Iso97971","commonjsGlobal","452145QAQWYO","217IrnIjL","ZeroPadding","./core","object","1605jEXKeE","4904zdjozy","994371evNJCB","948aQuNmI","./cipher-core","1383510LAyiGw","lib","pad","create","267052HjaeTe"];return(Ls=function(){return e})()}!function(e,t){for(var r=Rs,n=e();;)try{if(232042===-parseInt(r(430))/1+parseInt(r(425))/2+-parseInt(r(437))/3+parseInt(r(438))/4*(parseInt(r(435))/5)+parseInt(r(426))/6+parseInt(r(431))/7*(-parseInt(r(436))/8)+parseInt(r(427))/9*(parseInt(r(421))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ls);Ze((function(e,t){var r,n,i=Rs;r=Qe[i(429)],n=function(e){var t=i;return e.pad[t(428)]={pad:function(r,n){var i=t;r.concat(e[i(422)].WordArray[i(424)]([2147483648],1)),e[i(423)][i(432)][i(423)](r,n)},unpad:function(r){e[t(423)].ZeroPadding.unpad(r),r.sigBytes--}},e[t(423)][t(428)]},"object"===Rs(434)?e.exports=n(Ei):n(r.CryptoJS)}));var Os=zs;function zs(e,t){var r=Ns();return(zs=function(e,t){return r[e-=384]})(e,t)}function Ns(){var e=["pad","4106812OzYYay","sigBytes","3JdotMg","ZeroPadding","30BboKIv","1568936DenvxN","34076WpBXkG","object","52JxDMZS","./core","71754cqwHJh","amd","CryptoJS","7088375IzuaBE","createCommonjsModule","7019370ZyODHo","exports","./cipher-core","15673750MklRqD"];return(Ns=function(){return e})()}!function(e,t){for(var r=zs,n=e();;)try{if(702362===-parseInt(r(397))/1*(-parseInt(r(399))/2)+parseInt(r(393))/3*(parseInt(r(391))/4)+-parseInt(r(395))/5*(parseInt(r(401))/6)+parseInt(r(384))/7+parseInt(r(396))/8+-parseInt(r(386))/9+-parseInt(r(389))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ns);Qe[Os(385)]((function(e,t){var r,n,i;r=Ye,n=function(e){var t=zs;return e.pad[t(394)]={pad:function(e,r){var n=t,i=4*r;e.clamp(),e.sigBytes+=i-(e[n(392)]%i||i)},unpad:function(e){var r=t,n=e.words,i=e[r(392)]-1;for(i=e[r(392)]-1;i>=0;i--)if(n[i>>>2]>>>24-i%4*8&255){e[r(392)]=i+1;break}}},e[t(390)][t(394)]},"object"===(i=zs)(398)?e[i(387)]=n(Ei):n(r[i(403)])}));function Hs(){var e=["pad","18lHraLL","./cipher-core","556458VTUBAq","object","NoPadding","amd","966863uUCVmV","1648242iEwVwh","CryptoJS","55kMfWQv","457848tpDece","14vifzKU","3614360dRmFSC","exports","function","2pxVvXY","./core","1327960kPwCsf","3020168yvYnTX"];return(Hs=function(){return e})()}function js(e,t){var r=Hs();return(js=function(e,t){return r[e-=231]})(e,t)}!function(e,t){for(var r=js,n=e();;)try{if(520179===-parseInt(r(250))/1*(-parseInt(r(239))/2)+parseInt(r(231))/3+-parseInt(r(234))/4+parseInt(r(236))/5+parseInt(r(246))/6*(-parseInt(r(235))/7)+parseInt(r(242))/8*(-parseInt(r(244))/9)+-parseInt(r(241))/10*(parseInt(r(233))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Hs);Ze((function(e,t){var r,n,i;r=Ye,n=function(e){var t=js;return e[t(243)].NoPadding={pad:function(){},unpad:function(){}},e.pad[t(248)]},(i=js)(247)==i(247)?e[i(237)]=n(Ei):"undefined"===i(238)&&(void 0)[i(249)]?(void 0)([i(240),i(245)],n):n(r[i(232)])}));var Vs=$s;function Ws(){var e=["commonjsGlobal","CipherParams","27513BIpUnQ","lib","toString","function","150878EzBUZj","createCommonjsModule","4518MizLFZ","112NYipGU","parse","CryptoJS","./cipher-core","6LTWNmj","object","format","115181Vulzgd","20390jiMolV","amd","Hex","create","2960wGlxFM","54PsHLKA","1218230YGJoCs","./core","1461295jhQGZv","exports"];return(Ws=function(){return e})()}!function(e,t){for(var r=$s,n=e();;)try{if(131820===parseInt(r(461))/1+-parseInt(r(458))/2*(-parseInt(r(447))/3)+-parseInt(r(454))/4*(-parseInt(r(462))/5)+parseInt(r(467))/6*(-parseInt(r(451))/7)+parseInt(r(466))/8*(-parseInt(r(453))/9)+parseInt(r(468))/10+parseInt(r(443))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ws);Qe[Vs(452)]((function(e,t){var r,n,i,s=Vs;r=Qe[s(445)],n=function(e){var t,r,n,i,o=s;return n=(r=e)[(t=$s)(448)][t(446)],i=r.enc[t(464)],r[t(460)][t(464)]={stringify:function(e){var r=t;return e.ciphertext[r(449)](i)},parse:function(e){var r=t,s=i[r(455)](e);return n[r(465)]({ciphertext:s})}},e[o(460)][o(464)]},"object"===(i=$s)(459)?e[i(444)]=n(Ei):"undefined"===i(450)&&(void 0)[i(463)]?(void 0)([i(442),i(457)],n):n(r[i(456)])}));function $s(e,t){var r=Ws();return($s=function(e,t){return r[e-=442]})(e,t)}var Gs=qs;function qs(e,t){var r=Ks();return(qs=function(e,t){return r[e-=348]})(e,t)}!function(e,t){for(var r=qs,n=e();;)try{if(607447===parseInt(r(356))/1*(-parseInt(r(352))/2)+-parseInt(r(365))/3*(-parseInt(r(368))/4)+parseInt(r(355))/5+-parseInt(r(349))/6+-parseInt(r(376))/7+-parseInt(r(358))/8+-parseInt(r(351))/9*(-parseInt(r(363))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ks);Qe[Gs(360)]((function(e,t){var r,n,i;r=Ye,n=function(e){var t=qs;return function(){var t=qs,r=e,n=r[t(350)][t(378)],i=r[t(373)],s=[],o=[],a=[],c=[],u=[],l=[],d=[],h=[],f=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var i=n^n<<1^n<<2^n<<3^n<<4;i=i>>>8^255&i^99,s[r]=i,o[i]=r;var m=e[r],v=e[m],y=e[v],g=257*e[i]^16843008*i;a[r]=g<<24|g>>>8,c[r]=g<<16|g>>>16,u[r]=g<<8|g>>>24,l[r]=g,g=16843009*y^65537*v^257*m^16843008*r,d[i]=g<<24|g>>>8,h[i]=g<<16|g>>>16,f[i]=g<<8|g>>>24,p[i]=g,r?(r=m^e[e[e[y^m]]],n^=e[e[n]]):r=n=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],v=i[t(375)]=n[t(353)]({_doReset:function(){var e=t;if(!this[e(357)]||this[e(366)]!==this[e(348)]){for(var r=this._keyPriorReset=this._key,n=r[e(371)],i=r[e(379)]/4,o=4*((this[e(357)]=i+6)+1),a=this[e(372)]=[],c=0;c6&&c%i==4&&(v=s[v>>>24]<<24|s[v>>>16&255]<<16|s[v>>>8&255]<<8|s[255&v]):(v=s[(v=v<<8|v>>>24)>>>24]<<24|s[v>>>16&255]<<16|s[v>>>8&255]<<8|s[255&v],v^=m[c/i|0]<<24),a[c]=a[c-i]^v);for(var u=this[e(364)]=[],l=0;l>>24]]^h[s[v>>>16&255]]^f[s[v>>>8&255]]^p[s[255&v]]}}},encryptBlock:function(e,r){var n=t;this[n(369)](e,r,this[n(372)],a,c,u,l,s)},decryptBlock:function(e,r){var n=t,i=e[r+1];e[r+1]=e[r+3],e[r+3]=i,this[n(369)](e,r,this[n(364)],d,h,f,p,o),i=e[r+1],e[r+1]=e[r+3],e[r+3]=i},_doCryptBlock:function(e,r,n,i,s,o,a,c){for(var u=this[t(357)],l=e[r]^n[0],d=e[r+1]^n[1],h=e[r+2]^n[2],f=e[r+3]^n[3],p=4,m=1;m>>24]^s[d>>>16&255]^o[h>>>8&255]^a[255&f]^n[p++],y=i[d>>>24]^s[h>>>16&255]^o[f>>>8&255]^a[255&l]^n[p++],g=i[h>>>24]^s[f>>>16&255]^o[l>>>8&255]^a[255&d]^n[p++],_=i[f>>>24]^s[l>>>16&255]^o[d>>>8&255]^a[255&h]^n[p++];l=v,d=y,h=g,f=_}v=(c[l>>>24]<<24|c[d>>>16&255]<<16|c[h>>>8&255]<<8|c[255&f])^n[p++],y=(c[d>>>24]<<24|c[h>>>16&255]<<16|c[f>>>8&255]<<8|c[255&l])^n[p++],g=(c[h>>>24]<<24|c[f>>>16&255]<<16|c[l>>>8&255]<<8|c[255&d])^n[p++],_=(c[f>>>24]<<24|c[l>>>16&255]<<16|c[d>>>8&255]<<8|c[255&h])^n[p++],e[r]=v,e[r+1]=y,e[r+2]=g,e[r+3]=_},keySize:8});r[t(375)]=n[t(377)](v)}(),e[t(375)]},(i=qs)(374)==i(374)?e[i(367)]=n(Ei):"undefined"===i(361)&&(void 0)[i(359)]?(void 0)(["./core",i(370),"./md5",i(354),"./cipher-core"],n):n(r[i(362)])}));function Ks(){var e=["9fbjFSD","424052WoCxEK","extend","./evpkdf","2592700TFrgOP","5bQDHue","_nRounds","2420184XGZptA","amd","createCommonjsModule","function","CryptoJS","27986140wHjaQT","_invKeySchedule","24TkjPdu","_keyPriorReset","exports","249148spaZfR","_doCryptBlock","./enc-base64","words","_keySchedule","algo","object","AES","7289247dujtUp","_createHelper","BlockCipher","sigBytes","_key","4824174vApUJd","lib"];return(Ks=function(){return e})()}var Js=Ys;function Xs(){var e=["_invSubKeys","./cipher-core","lib","./evpkdf","168316AxIQRp","amd","_des3","create","object","words","_des2","createCommonjsModule","88510gtNbJX","./core","_doCryptBlock","createEncryptor","Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.","./enc-base64","_key","exports","decryptBlock","28832ZESgUj","_createHelper","call","18Qbvtwy","9myfAyc","_lBlock","_des1","_rBlock","_subKeys","80070VwteZb","./md5","slice","124558XbTjFf","243170rxsCad","extend","TripleDES","BlockCipher","length","758488Pszsks","algo","CryptoJS","DES","12KgfEzt"];return(Xs=function(){return e})()}!function(e,t){for(var r=Ys,n=e();;)try{if(111406===parseInt(r(421))/1+-parseInt(r(412))/2+-parseInt(r(390))/3*(parseInt(r(395))/4)+-parseInt(r(425))/5*(-parseInt(r(415))/6)+-parseInt(r(424))/7+parseInt(r(430))/8+parseInt(r(416))/9*(-parseInt(r(403))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Xs);Qe[Js(402)]((function(e,t){var r,n,i;r=Ye,n=function(e){var t=Ys;return function(){var t=Ys,r=e,n=r[t(393)],i=n.WordArray,s=n[t(428)],o=r[t(431)],a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o[t(389)]=s[t(426)]({_doReset:function(){for(var e=t,r=this[e(409)][e(400)],n=[],i=0;i<56;i++){var s=a[i]-1;n[i]=r[s>>>5]>>>31-s%32&1}for(var o=this[e(420)]=[],l=0;l<16;l++){var d=o[l]=[],h=u[l];for(i=0;i<24;i++)d[i/6|0]|=n[(c[i]-1+h)%28]<<31-i%6,d[4+(i/6|0)]|=n[28+(c[i+24]-1+h)%28]<<31-i%6;for(d[0]=d[0]<<1|d[0]>>>31,i=1;i<7;i++)d[i]=d[i]>>>4*(i-1)+3;d[7]=d[7]<<5|d[7]>>>27}var f=this._invSubKeys=[];for(i=0;i<16;i++)f[i]=o[15-i]},encryptBlock:function(e,r){var n=t;this[n(405)](e,r,this[n(420)])},decryptBlock:function(e,r){var n=t;this[n(405)](e,r,this[n(391)])},_doCryptBlock:function(e,r,n){var i=t;this._lBlock=e[r],this._rBlock=e[r+1],f.call(this,4,252645135),f[i(414)](this,16,65535),p[i(414)](this,2,858993459),p[i(414)](this,8,16711935),f[i(414)](this,1,1431655765);for(var s=0;s<16;s++){for(var o=n[s],a=this[i(417)],c=this[i(419)],u=0,h=0;h<8;h++)u|=l[h][((c^o[h])&d[h])>>>0];this[i(417)]=c,this[i(419)]=a^u}var m=this[i(417)];this[i(417)]=this[i(419)],this[i(419)]=m,f[i(414)](this,1,1431655765),p.call(this,8,16711935),p[i(414)](this,2,858993459),f.call(this,16,65535),f[i(414)](this,4,252645135),e[r]=this[i(417)],e[r+1]=this[i(419)]},keySize:2,ivSize:2,blockSize:2});function f(e,r){var n=t,i=(this[n(417)]>>>e^this[n(419)])&r;this[n(419)]^=i,this[n(417)]^=i<>>e^this[n(417)])&r;this[n(417)]^=i,this[n(419)]^=i<>>2]>>>24-c%4*8&255;a=(a+s[o]+u)%256;var l=s[o];s[o]=s[a],s[a]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var s=e[t];e[t]=e[r],e[r]=s,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}r[t(311)]=n[t(285)](s);var a=i[t(283)]=s[t(287)]({cfg:s[t(282)][t(287)]({drop:192}),_doReset:function(){var e=t;s[e(307)][e(288)](this);for(var r=this[e(282)][e(296)];r>0;r--)o[e(288)](this)}});r[t(283)]=n[t(285)](a)}(),e.RC4},"object"===(i=Qs)(299)?e.exports=n(Ei):"undefined"===i(304)&&(void 0).amd?(void 0)([i(300),i(286),i(305),"./evpkdf","./cipher-core"],n):n(r[i(309)])}));var to=no;function ro(){var e=["words","extend","453635XkRbAU","call","13370814qzysyV","function","exports","70JdQoam","150IXEbJS","StreamCipher","7417810kkeveM","./core","lib","commonjsGlobal","createCommonjsModule","./evpkdf","algo","_createHelper","159234cepUuG","Rabbit","11ciBdWm","cfg","./md5","13978232tDRdVw","object","148492ZMqglQ","1674023AWVUMl","69ZoadRQ"];return(ro=function(){return e})()}!function(e,t){for(var r=no,n=e();;)try{if(979265===parseInt(r(280))/1+-parseInt(r(272))/2*(parseInt(r(281))/3)+-parseInt(r(279))/4*(-parseInt(r(289))/5)+-parseInt(r(290))/6*(-parseInt(r(284))/7)+-parseInt(r(277))/8+parseInt(r(286))/9+parseInt(r(292))/10*(-parseInt(r(274))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ro);Qe[to(296)]((function(e,t){var r,n,i,s=to;r=Qe[s(295)],n=function(e){var t=s;return function(){var t=no,r=e,n=r[t(294)][t(291)],i=r[t(298)],s=[],o=[],a=[],c=i.Rabbit=n[t(283)]({_doReset:function(){for(var e=t,r=this._key[e(282)],n=this[e(275)].iv,i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8);var s=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],o=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];for(this._b=0,i=0;i<4;i++)u[e(285)](this);for(i=0;i<8;i++)o[i]^=s[i+4&7];if(n){var a=n[e(282)],c=a[0],l=a[1],d=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=d>>>16|4294901760&h,p=h<<16|65535&d;for(o[0]^=d,o[1]^=f,o[2]^=h,o[3]^=p,o[4]^=d,o[5]^=f,o[6]^=h,o[7]^=p,i=0;i<4;i++)u[e(285)](this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),s[0]=r[0]^r[5]>>>16^r[3]<<16,s[1]=r[2]^r[7]>>>16^r[5]<<16,s[2]=r[4]^r[1]>>>16^r[7]<<16,s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)s[n]=16711935&(s[n]<<8|s[n]>>>24)|4278255360&(s[n]<<24|s[n]>>>8),e[t+n]^=s[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}r.Rabbit=n[t(299)](c)}(),e[t(273)]},(i=no)(278)==i(278)?e[i(288)]=n(Ei):"undefined"===i(287)&&(void 0).amd?(void 0)([i(293),"./enc-base64",i(276),i(297),"./cipher-core"],n):n(r.CryptoJS)}));function no(e,t){var r=ro();return(no=function(e,t){return r[e-=272]})(e,t)}var io=oo;function so(){var e=["./md5","113768AHRHEN","object","commonjsGlobal","_key","createCommonjsModule","extend","3840312FqHPiY","624039ECBygi","3139PRgtTQ","100ppIOxT","1296hOwTwN","RabbitLegacy","words","call","CryptoJS","68910PVmQbG","StreamCipher","491785vRKCqf","amd","cfg","algo","12sgPYxv","_createHelper","./evpkdf","399764GNBBqp"];return(so=function(){return e})()}function oo(e,t){var r=so();return(oo=function(e,t){return r[e-=495]})(e,t)}!function(e,t){for(var r=oo,n=e();;)try{if(361159===parseInt(r(515))/1*(-parseInt(r(516))/2)+-parseInt(r(514))/3+parseInt(r(505))/4+-parseInt(r(498))/5*(-parseInt(r(502))/6)+-parseInt(r(513))/7+-parseInt(r(507))/8+parseInt(r(517))/9*(parseInt(r(496))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(so);Qe[io(511)]((function(e,t){var r,n,i,s=io;r=Qe[s(509)],n=function(e){var t=s;return function(){var t=oo,r=e,n=r.lib[t(497)],i=r[t(501)],s=[],o=[],a=[],c=i[t(518)]=n[t(512)]({_doReset:function(){var e=t,r=this[e(510)][e(519)],n=this[e(500)].iv,i=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],s=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];this._b=0;for(var o=0;o<4;o++)u[e(520)](this);for(o=0;o<8;o++)s[o]^=i[o+4&7];if(n){var a=n[e(519)],c=a[0],l=a[1],d=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=d>>>16|4294901760&h,p=h<<16|65535&d;for(s[0]^=d,s[1]^=f,s[2]^=h,s[3]^=p,s[4]^=d,s[5]^=f,s[6]^=h,s[7]^=p,o=0;o<4;o++)u.call(this)}},_doProcessBlock:function(e,r){var n=t,i=this._X;u[n(520)](this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var o=0;o<4;o++)s[o]=16711935&(s[o]<<8|s[o]>>>24)|4278255360&(s[o]<<24|s[o]>>>8),e[r+o]^=s[o]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}r.RabbitLegacy=n[t(503)](c)}(),e[t(518)]},(i=oo)(508)==i(508)?e.exports=n(Ei):n(r[i(495)])}));const ao=co;function co(e,t){const r=uo();return(co=function(e,t){return r[e-=246]})(e,t)}function uo(){const e=["words","195330KQxGvq","sbox","_createHelper","./enc-base64","_keyPriorReset","BlockCipher","left","createCommonjsModule","function","pbox","./evpkdf","367112ovgtNT","extend","_key","algo","right","5OjProo","./md5","exports","object","585956ZUTRyH","commonjsGlobal","117CdNtJu","CryptoJS","./core","8JVldXz","82845MHURbM","1156757mUaAzN","Blowfish","149525EZLGFr","618012pniZWQ"];return(uo=function(){return e})()}!function(e,t){const r=co,n=e();for(;;)try{if(101971===-parseInt(r(258))/1+-parseInt(r(272))/2+-parseInt(r(255))/3+parseInt(r(249))/4+-parseInt(r(277))/5*(parseInt(r(259))/6)+-parseInt(r(256))/7*(-parseInt(r(254))/8)+-parseInt(r(251))/9*(-parseInt(r(261))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(uo);Qe[ao(268)]((function(e,t){!function(t,r,n){const i=co;"object"===i(248)?e[i(247)]=r(Ei):"undefined"===i(269)&&(void 0).amd?(void 0)([i(253),i(264),i(246),i(271),"./cipher-core"],r):r(t[i(252)])}(Qe[ao(250)],(function(e){return function(){const t=co;var r=e,n=r.lib[t(266)],i=r[t(275)];const s=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function u(e,r){const n=t;let i=r>>24&255,s=r>>16&255,o=r>>8&255,a=255&r,c=e[n(262)][0][i]+e.sbox[1][s];return c^=e[n(262)][2][o],c+=e.sbox[3][a],c}function l(e,r,n){const i=t;let o,a=r,c=n;for(let t=0;t=n&&(s=0);let c=0,u=0,d=0;for(let t=0;t<18;t+=2)d=l(e,c,u),c=d[i(267)],u=d[i(276)],e[i(270)][t]=c,e[i(270)][t+1]=u;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)d=l(e,c,u),c=d[i(267)],u=d[i(276)],e[i(262)][t][r]=c,e.sbox[t][r+1]=u}(c,n,i)}},encryptBlock:function(e,r){const n=t;var i=l(c,e[r],e[r+1]);e[r]=i[n(267)],e[r+1]=i.right},decryptBlock:function(e,r){const n=t;var i=function(e,r,n){const i=t;let s,o=r,a=n;for(let t=17;t>1;--t)o^=e.pbox[t],a=u(e,o)^a,s=o,o=a,a=s;return s=o,o=a,a=s,a^=e[i(270)][1],o^=e[i(270)][0],{left:o,right:a}}(c,e[r],e[r+1]);e[r]=i[n(267)],e[r+1]=i[n(276)]},blockSize:2,keySize:4,ivSize:2});r[t(257)]=n[t(263)](d)}(),e.Blowfish}))}));var lo=ho;function ho(e,t){var r=fo();return(ho=function(e,t){return r[e-=309]})(e,t)}function fo(){var e=["./sha1","./lib-typedarrays","18304814ODeJRB","./cipher-core","./pad-ansix923","function","amd","./rabbit-legacy","commonjsGlobal","./pad-iso97971","./enc-base64url","13134264vFYYAy","1560796BoXJcM","9oIZxoe","408270oAlyUT","./sha224","CryptoJS","./tripledes","22WYpLty","./enc-base64","./core","./aes","./pad-iso10126","./enc-utf16","./pad-nopadding","./ripemd160","exports","./sha256","6coPhTX","./sha512","59135WvURvI","object","./pbkdf2","./md5","./x64-core","createCommonjsModule","./pad-zeropadding","6244077JXyZSf","6763220LJuZIz","./hmac","6CUxIPx","./rc4","./mode-ctr-gladman"];return(fo=function(){return e})()}function po(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function mo(e,t,r){const n=yo;let i=arguments[n(450)]>3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const s=e[n(460)];let o=5;for(;os)break;let c=e[o+4],u=!1;if(i?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(441)](c)):(c&=31,u=1===c||5===c),u){const i=e.slice(o+4+2,o+4+a);let s=new(Si[n(444)][n(442)])(t,new(Si[n(459)])(r));const c=s[n(445)](i);s=null,e[n(453)](c,o+4+2)}o=o+4+a}return e}function vo(e,t,r){const n=yo;if(e[n(460)]<=30)return e;const i=e.slice(32);let s=new(Si[n(444)][n(442)])(t,new Si.Counter(r));const o=s[n(445)](i);return s=null,e[n(453)](o,32),e}function yo(e,t){const r=go();return(yo=function(e,t){return r[e-=440]})(e,t)}function go(){const e=["decrypt","3298170pMIhfq","then","3qZRTbL","create","length","18CubPMD","slice","set","545fIGSoe","toString","33676lhxuhP","2750140kjGnZz","get","Counter","byteLength","7191180tmrKHz","683562oydgRE","9417720IXMnNB","2267965LYMlIg","includes","ctr","WordArray","ModeOfOperation"];return(go=function(){return e})()}!function(e,t){for(var r=ho,n=e();;)try{if(907132===-parseInt(r(325))/1*(-parseInt(r(313))/2)+parseInt(r(323))/3*(parseInt(r(350))/4)+parseInt(r(333))/5*(-parseInt(r(335))/6)+parseInt(r(332))/7+parseInt(r(349))/8+parseInt(r(351))/9*(-parseInt(r(309))/10)+-parseInt(r(340))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fo),Qe[lo(330)]((function(e,t){var r,n,i;r=Qe[lo(346)],n=function(e){return e},"object"===(i=ho)(326)?e[i(321)]=Ei:"undefined"===i(343)&&(void 0)[i(344)]?(void 0)([i(315),i(329),i(339),i(318),i(314),i(348),i(328),i(338),i(322),i(310),i(324),"./sha384","./sha3",i(320),i(334),i(327),"./evpkdf",i(341),"./mode-cfb","./mode-ctr",i(337),"./mode-ofb","./mode-ecb",i(342),i(317),i(347),i(331),i(319),"./format-hex",i(316),i(312),i(336),"./rabbit",i(345),"./blowfish"],n):r[i(311)]=r[i(311)]})),function(e,t){const r=yo,n=e();for(;;)try{if(900596===parseInt(r(462))/1+parseInt(r(457))/2*(-parseInt(r(448))/3)+-parseInt(r(456))/4*(-parseInt(r(454))/5)+parseInt(r(451))/6*(-parseInt(r(440))/7)+parseInt(r(463))/8+parseInt(r(461))/9+-parseInt(r(446))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(go);var _o=So;!function(e,t){for(var r=So,n=e();;)try{if(523142===parseInt(r(381))/1+parseInt(r(833))/2*(parseInt(r(762))/3)+parseInt(r(797))/4+-parseInt(r(444))/5+-parseInt(r(1315))/6+-parseInt(r(848))/7+parseInt(r(989))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(wo);var bo=Qe[_o(823)]((function(e,t){var r,n,s=_o,o=(r=new Date,n=4,{setLogLevel:function(e){var t=So;n=e==this[t(503)]?1:e==this.info?2:e==this[t(1476)]?3:(this[t(1485)],4)},debug:function(e,t){var i=So;void 0===console.debug&&(console.debug=console[i(370)]),1>=n&&console[i(503)]("["+o[i(1144)](new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){var r=So;this[r(503)](e[r(893)])},info:function(e,t){var i=So;2>=n&&console[i(1320)]("["+o[i(1144)](new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){var i=So;3>=n&&console[i(1476)]("["+o[i(1144)](new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){var i=So;4>=n&&console[i(1485)]("["+o[i(1144)](new Date-r,1e3)+"]","["+e+"]",t)}});o[s(1144)]=function(e,t){var r,n=s;function i(e,t){for(var r=So,n=(""+e)[r(384)](".");n[0][r(271)]0){for(var n="",i=0;i0&&(n+=","),n+="["+o[t(1144)](e[t(760)](i))+","+o.getDurationString(e[t(1262)](i))+"]";return n}return"(empty)"},s(1153)!==s(1212)&&(t[s(1008)]=o);var a=function(e){var t=s;if(!(e instanceof ArrayBuffer))throw t(1009);this[t(1421)]=e,this.dataview=new DataView(e),this.position=0};a.prototype.getPosition=function(){return this[s(1313)]},a[s(1432)][s(313)]=function(){return this[s(1421)].byteLength},a[s(1432)][s(1451)]=function(){var e=s;return this[e(1421)][e(449)]},a.prototype.seek=function(e){var t=s,r=Math[t(671)](0,Math[t(815)](this[t(1421)][t(449)],e));return this[t(1313)]=isNaN(r)||!isFinite(r)?0:r,!0},a[s(1432)][s(1311)]=function(){var e=s;return this[e(1482)]()>=this[e(313)]()},a[s(1432)][s(1087)]=function(e,t){var r=s,n=0;if(this.position+e<=this[r(1421)][r(449)]){switch(e){case 1:n=t?this[r(1415)][r(1207)](this[r(1313)]):this[r(1415)].getUint8(this[r(1313)]);break;case 2:n=t?this[r(1415)][r(1246)](this[r(1313)]):this.dataview.getUint16(this[r(1313)]);break;case 3:if(t)throw"No method for reading signed 24 bits values";n=this[r(1415)][r(1237)](this[r(1313)])<<16,n|=this[r(1415)][r(1237)](this[r(1313)]+1)<<8,n|=this.dataview[r(1237)](this[r(1313)]+2);break;case 4:n=t?this.dataview[r(436)](this[r(1313)]):this[r(1415)].getUint32(this[r(1313)]);break;case 8:if(t)throw"No method for reading signed 64 bits values";n=this[r(1415)][r(1323)](this.position)<<32,n|=this.dataview[r(1323)](this.position+4);break;default:throw r(552)+e}return this[r(1313)]+=e,n}throw"Not enough bytes in buffer"},a[s(1432)][s(566)]=function(){return this.readAnyInt(1,!1)},a[s(1432)].readUint16=function(){return this.readAnyInt(2,!1)},a[s(1432)].readUint24=function(){return this[s(1087)](3,!1)},a[s(1432)].readUint32=function(){return this[s(1087)](4,!1)},a[s(1432)][s(686)]=function(){return this.readAnyInt(8,!1)},a[s(1432)][s(494)]=function(e){var t=s;if(this[t(1313)]+e<=this[t(1421)][t(449)]){for(var r="",n=0;nthis[t(376)]&&(this[t(376)]=r);else{for(n<1&&(n=1);r>n;)n*=2;var i=new ArrayBuffer(n),o=new Uint8Array(this[t(722)]);new Uint8Array(i,0,o[t(271)])[t(697)](o),this[t(1421)]=i,this[t(376)]=r}}},c[s(1432)][s(1304)]=function(){var e=s;if(this[e(376)]!=this[e(722)].byteLength){var t=new ArrayBuffer(this[e(376)]),r=new Uint8Array(t),n=new Uint8Array(this[e(722)],0,r[e(271)]);r[e(697)](n),this[e(1421)]=t}},c.BIG_ENDIAN=!1,c.LITTLE_ENDIAN=!0,c.prototype[s(376)]=0,Object.defineProperty(c[s(1432)],s(449),{get:function(){var e=s;return this[e(376)]-this[e(400)]}}),Object[s(1467)](c[s(1432)],s(1421),{get:function(){var e=s;return this[e(1304)](),this[e(722)]},set:function(e){var t=s;this[t(722)]=e,this._dataView=new DataView(this[t(722)],this[t(400)]),this[t(376)]=this._buffer.byteLength}}),Object[s(1467)](c.prototype,"byteOffset",{get:function(){return this[s(400)]},set:function(e){var t=s;this[t(400)]=e,this._dataView=new DataView(this[t(722)],this._byteOffset),this[t(376)]=this[t(722)][t(449)]}}),Object[s(1467)](c[s(1432)],s(1259),{get:function(){return this[s(472)]},set:function(e){var t=s;this._byteOffset=e.byteOffset,this[t(722)]=e.buffer,this[t(472)]=new DataView(this[t(722)],this[t(400)]),this[t(376)]=this._byteOffset+e[t(449)]}}),c[s(1432)][s(1201)]=function(e){var t=s,r=Math[t(671)](0,Math.min(this[t(449)],e));this.position=isNaN(r)||!isFinite(r)?0:r},c[s(1432)][s(586)]=function(){var e=s;return this[e(1313)]>=this[e(376)]},c[s(1432)][s(1104)]=function(e){var t=s;this[t(1098)](1*e);var r=new Uint8Array(this[t(722)],this[t(1355)]+this[t(1313)],e);return this[t(1313)]+=1*e,r},c[s(1432)][s(590)]=function(e,t){var r=s;e=null==e?this[r(449)]-this[r(1313)]/4:e;var n=new Int32Array(e);return c.memcpy(n[r(1421)],0,this[r(1421)],this[r(1355)]+this[r(1313)],e*n[r(540)]),c.arrayToNative(n,null==t?this[r(923)]:t),this.position+=n[r(449)],n},c[s(1432)][s(500)]=function(e,t){var r=s;e=null==e?this[r(449)]-this[r(1313)]/2:e;var n=new Int16Array(e);return c[r(1333)](n[r(1421)],0,this[r(1421)],this[r(1355)]+this[r(1313)],e*n.BYTES_PER_ELEMENT),c[r(1161)](n,null==t?this[r(923)]:t),this[r(1313)]+=n[r(449)],n},c[s(1432)][s(1047)]=function(e){var t=s;e=null==e?this[t(449)]-this.position:e;var r=new Int8Array(e);return c[t(1333)](r.buffer,0,this[t(1421)],this[t(1355)]+this.position,e*r[t(540)]),this[t(1313)]+=r[t(449)],r},c[s(1432)][s(266)]=function(e,t){var r=s;e=null==e?this.byteLength-this[r(1313)]/4:e;var n=new Uint32Array(e);return c[r(1333)](n[r(1421)],0,this[r(1421)],this[r(1355)]+this[r(1313)],e*n[r(540)]),c[r(1161)](n,null==t?this.endianness:t),this[r(1313)]+=n[r(449)],n},c[s(1432)].readUint16Array=function(e,t){var r=s;e=null==e?this[r(449)]-this[r(1313)]/2:e;var n=new Uint16Array(e);return c[r(1333)](n[r(1421)],0,this[r(1421)],this[r(1355)]+this[r(1313)],e*n[r(540)]),c[r(1161)](n,null==t?this[r(923)]:t),this.position+=n.byteLength,n},c[s(1432)][s(1179)]=function(e){var t=s;e=null==e?this[t(449)]-this.position:e;var r=new Uint8Array(e);return c[t(1333)](r[t(1421)],0,this.buffer,this.byteOffset+this[t(1313)],e*r[t(540)]),this[t(1313)]+=r.byteLength,r},c.prototype.readFloat64Array=function(e,t){var r=s;e=null==e?this[r(449)]-this[r(1313)]/8:e;var n=new Float64Array(e);return c[r(1333)](n[r(1421)],0,this[r(1421)],this[r(1355)]+this[r(1313)],e*n[r(540)]),c[r(1161)](n,null==t?this[r(923)]:t),this.position+=n[r(449)],n},c.prototype[s(1278)]=function(e,t){var r=s;e=null==e?this.byteLength-this.position/4:e;var n=new Float32Array(e);return c[r(1333)](n[r(1421)],0,this[r(1421)],this[r(1355)]+this[r(1313)],e*n[r(540)]),c[r(1161)](n,null==t?this[r(923)]:t),this[r(1313)]+=n[r(449)],n},c[s(1432)][s(818)]=function(e){var t=s,r=this._dataView[t(436)](this[t(1313)],null==e?this.endianness:e);return this.position+=4,r},c[s(1432)].readInt16=function(e){var t=s,r=this[t(472)][t(1246)](this[t(1313)],null==e?this[t(923)]:e);return this[t(1313)]+=2,r},c[s(1432)][s(653)]=function(){var e=s,t=this[e(472)][e(1207)](this[e(1313)]);return this[e(1313)]+=1,t},c[s(1432)][s(899)]=function(e){var t=s,r=this._dataView.getUint32(this[t(1313)],null==e?this[t(923)]:e);return this[t(1313)]+=4,r},c.prototype[s(1483)]=function(e){var t=s,r=this[t(472)][t(434)](this.position,null==e?this[t(923)]:e);return this[t(1313)]+=2,r},c[s(1432)][s(566)]=function(){var e=s,t=this._dataView[e(1237)](this[e(1313)]);return this[e(1313)]+=1,t},c[s(1432)].readFloat32=function(e){var t=s,r=this[t(472)].getFloat32(this[t(1313)],null==e?this[t(923)]:e);return this.position+=4,r},c[s(1432)].readFloat64=function(e){var t=s,r=this[t(472)][t(1015)](this[t(1313)],null==e?this.endianness:e);return this[t(1313)]+=8,r},c.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,c[s(1333)]=function(e,t,r,n,i){var o=s,a=new Uint8Array(e,t,i),c=new Uint8Array(r,n,i);a[o(697)](c)},c[s(1161)]=function(e,t){var r=s;return t==this[r(923)]?e:this[r(690)](e)},c[s(268)]=function(e,t){return this[s(923)]==t?e:this.flipArrayEndianness(e)},c.flipArrayEndianness=function(e){for(var t=s,r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),n=0;no;i--,o++){var a=r[o];r[o]=r[i],r[i]=a}return e},c[s(1432)][s(458)]=0,String[s(810)]=function(e){for(var t=s,r=[],n=0;n>16),this[t(578)]((65280&e)>>8),this.writeUint8(255&e)},c[s(1432)].adjustUint32=function(e,t){var r=s,n=this[r(1313)];this.seek(e),this[r(1433)](t),this[r(1201)](n)},c[s(1432)][s(1183)]=function(e,t){var r=s;this[r(1098)](4*e);var n=new Int32Array(this[r(722)],this[r(1355)]+this[r(1313)],e);return c[r(1161)](n,null==t?this[r(923)]:t),this[r(1313)]+=4*e,n},c[s(1432)].mapInt16Array=function(e,t){var r=s;this[r(1098)](2*e);var n=new Int16Array(this[r(722)],this[r(1355)]+this.position,e);return c[r(1161)](n,null==t?this[r(923)]:t),this[r(1313)]+=2*e,n},c[s(1432)][s(987)]=function(e){var t=s;this[t(1098)](1*e);var r=new Int8Array(this._buffer,this.byteOffset+this[t(1313)],e);return this.position+=1*e,r},c.prototype[s(866)]=function(e,t){var r=s;this[r(1098)](4*e);var n=new Uint32Array(this[r(722)],this[r(1355)]+this[r(1313)],e);return c[r(1161)](n,null==t?this[r(923)]:t),this[r(1313)]+=4*e,n},c[s(1432)].mapUint16Array=function(e,t){var r=s;this._realloc(2*e);var n=new Uint16Array(this[r(722)],this[r(1355)]+this.position,e);return c.arrayToNative(n,null==t?this[r(923)]:t),this[r(1313)]+=2*e,n},c[s(1432)].mapFloat64Array=function(e,t){var r=s;this[r(1098)](8*e);var n=new Float64Array(this[r(722)],this.byteOffset+this[r(1313)],e);return c[r(1161)](n,null==t?this[r(923)]:t),this[r(1313)]+=8*e,n},c[s(1432)][s(643)]=function(e,t){var r=s;this[r(1098)](4*e);var n=new Float32Array(this[r(722)],this.byteOffset+this[r(1313)],e);return c[r(1161)](n,null==t?this[r(923)]:t),this[r(1313)]+=4*e,n};var l=function(e){var t=s;this[t(1385)]=[],this[t(688)]=-1,e&&(this[t(962)](e),this[t(688)]=0)};l.prototype=new c(new ArrayBuffer,0,c.BIG_ENDIAN),l[s(1432)][s(375)]=function(){var e,t=s;return this[t(688)]>-1||(this[t(1385)][t(271)]>0?0===(e=this[t(1385)][0])[t(1230)]?(this.buffer=e,this[t(688)]=0,o[t(503)](t(1074),t(696)),!0):(this.logBufferLevel(),!1):(this[t(299)](),!1))},ArrayBuffer[s(1479)]=function(e,t){var r=s;o.debug(r(1217),"Trying to create a new buffer of size: "+(e[r(449)]+t[r(449)]));var n=new Uint8Array(e[r(449)]+t[r(449)]);return n[r(697)](new Uint8Array(e),0),n[r(697)](new Uint8Array(t),e[r(449)]),n[r(1421)]},l.prototype[s(845)]=function(e,t,r){var n,i=s;return(n=new Uint8Array(r))[i(697)](new Uint8Array(e,t,r)),n[i(1421)].fileStart=e[i(1230)]+t,n[i(1421)][i(1210)]=0,n[i(1421)]},l[s(1432)][s(962)]=function(e){for(var t=s,r=!0,n=0;ni[t(449)]){this[t(1385)][t(608)](n,1),n--;continue}}else e[t(1230)]+e[t(449)]<=i[t(1230)]||(e=this.reduceBuffer(e,0,i[t(1230)]-e[t(1230)])),o[t(503)](t(1074),"Appending new buffer (fileStart: "+e.fileStart+t(420)+e[t(449)]+")"),this.buffers.splice(n,0,e),0===n&&(this.buffer=e);r=!1;break}if(e[t(1230)]0)){r=!1;break}e=this[t(845)](e,a,c)}}r&&(o[t(503)](t(1074),"Appending new buffer (fileStart: "+e[t(1230)]+t(420)+e[t(449)]+")"),this[t(1385)][t(435)](e),0===n&&(this[t(1421)]=e))},l[s(1432)][s(299)]=function(e){var t,r,n,i,a,c=s,u=[],l="";for(n=0,i=0,t=0;t0&&(l+=a[c(1262)]-1+"]");var d=e?o[c(1320)]:o.debug;0===this[c(1385)][c(271)]?d(c(1074),c(707)):d(c(1074),""+this.buffers[c(271)]+c(1255)+n+"/"+i+c(467)+l)},l[s(1432)][s(613)]=function(){var e,t,r=s;for(e=0;e"+this.buffer[t(449)]+")"),!0}return!1}return!1},l[s(1432)].findPosition=function(e,t,r){var n,i=s,a=null,c=-1;for(n=!0===e?0:this[i(688)];n=t?(o[i(503)]("MultiBufferStream",i(1017)+c),c):-1:-1},l.prototype[s(1248)]=function(e){var t,r,n,i=s,o=void 0!==e?e:this[i(688)];if(r=this[i(1385)][o],this[i(1385)].length>o+1)for(t=o+1;t>3;return 31===s&&i[r(482)][r(271)]>=2&&(s=32+((7&i.data[0])<<3)+((224&i[r(482)][1])>>5)),s}return null},n[e(1090)]=function(t){var r=e;n.Descriptor[r(499)](this,4,t)},n.DecoderConfigDescriptor[e(1432)]=new(n[e(1312)]),n[e(1090)].prototype.parse=function(t){var r=e;this[r(286)]=t[r(566)](),this[r(1186)]=t[r(566)](),this[r(1013)]=0!=(this[r(1186)]>>1&1),this[r(1186)]=this.streamType>>>2,this[r(636)]=t[r(890)](),this.maxBitrate=t[r(899)](),this.avgBitrate=t[r(899)](),this[r(557)]-=13,this[r(926)](t)},n[e(448)]=function(t){var r=e;n[r(1312)][r(499)](this,5,t)},n[e(448)][e(1432)]=new(n[e(1312)]),n[e(872)]=function(t){var r=e;n.Descriptor[r(499)](this,6,t)},n[e(872)][e(1432)]=new(n[e(1312)]),this};"object"!==s(1212)&&(t[s(537)]=d);var h={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat",s(906),s(1205),s(1140),s(781),s(711)],FULL_BOXES:[s(293),s(598),s(1448),s(1180),s(581),s(736),s(1029)],CONTAINER_BOXES:[[s(651),[s(1084),"pssh"]],["trak"],["edts"],["mdia"],[s(1071)],[s(679)],[s(821),[s(1231),"sbgp"]],[s(647),[s(1192)]],[s(795),[s(867)]],[s(867),[s(267),s(1231),s(840)]],["vttc"],[s(364)],["iref"],[s(858),[s(1209)]],[s(781)],["hnti"],[s(577)],["strk"],[s(732)],["sinf"],[s(533)],[s(392)],["trgr"],[s(262),[s(888)]],["iprp",["ipma"]],[s(528)],[s(1213)],[s(300)],[s(1010),[s(985)]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){var e=s;h[e(469)].prototype=new(h[e(1018)]),h[e(562)][e(1432)]=new(h[e(1018)]),h[e(302)].prototype=new h.Box,h[e(953)][e(1432)]=new(h[e(469)]),h[e(1170)].forEach((function(t){h[e(584)](t)})),h[e(550)][e(981)]((function(t){h[e(1289)](t)})),h[e(967)][e(981)]((function(t){h[e(1065)](t[0],null,t[1])}))},Box:function(e,t,r){var n=s;this.type=e,this[n(557)]=t,this[n(768)]=r},FullBox:function(e,t,r){var n=s;h.Box[n(499)](this,e,t,r),this[n(725)]=0,this[n(1059)]=0},ContainerBox:function(e,t,r){var n=s;h.Box[n(499)](this,e,t,r),this[n(1489)]=[]},SampleEntry:function(e,t,r,n){var i=s;h[i(562)][i(499)](this,e,t),this[i(334)]=r,this[i(760)]=n},SampleGroupEntry:function(e){this[s(720)]=e},TrackGroupTypeBox:function(e,t){h[s(469)].call(this,e,t)},createBoxCtor:function(e,t){var r=s;h.boxCodes[r(435)](e),h[e+r(1018)]=function(t){var n=r;h[n(1018)][n(499)](this,e,t)},h[e+"Box"][r(1432)]=new h.Box,t&&(h[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){var r=s;h[e+"Box"]=function(t){h[So(469)].call(this,e,t)},h[e+r(1018)].prototype=new(h[r(469)]),h[e+"Box"][r(1432)][r(943)]=function(e){var n=r;this[n(1350)](e),t&&t[n(499)](this,e)}},addSubBoxArrays:function(e){var t=s;if(e){this.subBoxNames=e;for(var r=e[t(271)],n=0;nr?{code:h[c(1195)],type:f,size:d,hdr_size:l,start:u}:0!==d&&u+d>e[c(313)]()?(e[c(1201)](u),{code:h.ERR_NOT_ENOUGH_DATA,type:f,size:d,hdr_size:l,start:u}):t?{code:h.OK,type:f,size:d,hdr_size:l,start:u}:(h[f+c(1018)]?n=new h[f+"Box"](d):f!==c(768)?(n=new(h[c(1018)])(f,d))[c(830)]=!0:h[c(695)][a]?n=new(h[c(695)][a])(d):((n=new h.Box(f,d))[c(768)]=a,n[c(830)]=!0),n[c(334)]=l,n[c(760)]=u,n[c(1295)]===h.Box.prototype[c(1295)]&&n[c(1395)]!==c(601)&&n[c(541)](e),n[c(943)](e),(i=e[c(1482)]()-(n[c(760)]+n[c(557)]))<0?e[c(1201)](n[c(760)]+n.size):i>0&&0!==n.size&&e[c(1201)](n[c(760)]+n[c(557)]),{code:h.OK,box:n,size:n[c(557)]})},h[s(1018)][s(1432)][s(943)]=function(e){var t=s;this.type!=t(601)?this.data=e[t(1179)](this[t(557)]-this[t(334)]):0===this[t(557)]?e[t(1201)](e.getEndPosition()):e[t(1201)](this[t(760)]+this[t(557)])},h[s(1018)].prototype.parseDataAndRewind=function(e){var t=s;this[t(482)]=e[t(1179)](this[t(557)]-this[t(334)]),e[t(1313)]-=this[t(557)]-this[t(334)]},h[s(469)].prototype[s(541)]=function(e){var t=s;this[t(1350)](e),this.data=e[t(1179)](this[t(557)]-this[t(334)]),this[t(334)]-=4,e[t(1313)]-=this[t(557)]-this[t(334)]},h[s(469)][s(1432)][s(1350)]=function(e){var t=s;this[t(1059)]=e[t(566)](),this[t(725)]=e[t(890)](),this[t(334)]+=4},h[s(469)][s(1432)][s(943)]=function(e){var t=s;this.parseFullHeader(e),this.data=e[t(1179)](this.size-this[t(334)])},h[s(562)].prototype.parse=function(e){for(var t,r,n=s;e[n(1482)]()>10&31,r[1]=this[t(1103)]>>5&31,r[2]=31&this[t(1103)],this[t(1124)]=String[t(322)](r[0]+96,r[1]+96,r[2]+96)},h[s(410)]=s(1222),h.SAMPLE_ENTRY_TYPE_AUDIO="Audio",h[s(682)]=s(451),h[s(990)]="Metadata",h[s(710)]=s(1347),h[s(426)]=s(789),h[s(660)]=s(1079),h[s(302)][s(1432)][s(572)]=function(e){var t=s;e[t(1179)](6),this[t(1308)]=e[t(1483)](),this.hdr_size+=8},h[s(302)].prototype[s(943)]=function(e){var t=s;this[t(572)](e),this[t(482)]=e[t(1179)](this[t(557)]-this[t(334)])},h[s(302)].prototype.parseDataAndRewind=function(e){var t=s;this[t(572)](e),this[t(482)]=e[t(1179)](this.size-this.hdr_size),this.hdr_size-=8,e.position-=this[t(557)]-this[t(334)]},h[s(302)].prototype[s(662)]=function(e){var t=s;h[t(562)][t(1432)][t(943)].call(this,e)},h[s(279)](h[s(682)]),h[s(279)](h[s(990)]),h[s(279)](h[s(710)]),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_SYSTEM),h[s(279)](h[s(660)]),h[s(279)](h[s(410)],(function(e){var t,r=s;this.parseHeader(e),e[r(1483)](),e.readUint16(),e[r(266)](3),this[r(320)]=e[r(1483)](),this[r(1240)]=e.readUint16(),this.horizresolution=e[r(899)](),this[r(1319)]=e[r(899)](),e[r(899)](),this.frame_count=e.readUint16(),t=Math[r(815)](31,e.readUint8()),this[r(631)]=e[r(494)](t),t<31&&e[r(494)](31-t),this[r(272)]=e[r(1483)](),e.readUint16(),this.parseFooter(e)})),h[s(279)](h[s(437)],(function(e){var t=s;this[t(572)](e),e.readUint32Array(2),this[t(1203)]=e[t(1483)](),this[t(1335)]=e[t(1483)](),e.readUint16(),e[t(1483)](),this[t(351)]=e.readUint32()/65536,this[t(662)](e)})),h[s(734)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(1361)),h[s(734)](h[s(410)],s(459)),h[s(734)](h[s(410)],s(594)),h[s(734)](h[s(410)],s(412)),h[s(734)](h[s(410)],s(1193)),h[s(734)](h[s(410)],"dav1"),h.createSampleEntryCtor(h[s(410)],s(855)),h[s(734)](h[s(410)],s(1291)),h[s(734)](h[s(410)],s(1454)),h[s(734)](h.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),h[s(734)](h[s(410)],s(294)),h[s(734)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(504)),h[s(734)](h[s(410)],s(525)),h[s(734)](h[s(410)],s(610)),h[s(734)](h[s(410)],s(658)),h.createSampleEntryCtor(h[s(410)],s(534)),h[s(734)](h[s(410)],"vp08"),h[s(734)](h[s(410)],"vp09"),h[s(734)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(1349)),h[s(734)](h[s(410)],"j2ki"),h[s(734)](h[s(410)],s(1224)),h[s(734)](h[s(410)],s(1280)),h[s(734)](h[s(410)],"uncv"),h[s(734)](h[s(437)],s(835)),h[s(734)](h.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),h[s(734)](h[s(437)],s(1099)),h[s(734)](h[s(437)],s(766)),h.createSampleEntryCtor(h[s(437)],s(693)),h[s(734)](h[s(437)],s(1337)),h[s(734)](h[s(437)],"mha2"),h[s(734)](h.SAMPLE_ENTRY_TYPE_AUDIO,s(1221)),h.createSampleEntryCtor(h[s(437)],s(289)),h[s(609)](h.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),h[s(609)](h[s(437)],"enca"),h[s(609)](h.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),h[s(609)](h[s(426)],s(409)),h.createEncryptedSampleEntryCtor(h[s(660)],s(1206)),h[s(609)](h[s(990)],s(548)),h[s(584)](s(753),(function(e){var t=s,r=16*(1+(1&(1&e[t(566)]())));this[t(728)]=[];for(var n=0;n<3;n++)this[t(728)][n]=16==r?e[t(1483)]():e.readUint32()})),h.createBoxCtor(s(994),(function(e){this[s(803)]=e.readUint8()})),h[s(1289)](s(1480),(function(e){var t=s;this[t(1114)]=e[t(1159)]();var r=this[t(557)]-this.hdr_size-(this.aux_type[t(271)]+1);this[t(1082)]=e.readUint8Array(r)})),h[s(584)](s(1305),(function(e){var t=s,r=e[t(566)]();if(!(r>>7&!1)&&(this.version=127&r,1===this[t(1059)]&&(r=e[t(566)](),this.seq_profile=r>>5&7,this[t(372)]=31&r,r=e[t(566)](),this[t(346)]=r>>7&1,this[t(1169)]=r>>6&1,this.twelve_bit=r>>5&1,this[t(984)]=r>>4&1,this[t(1423)]=r>>3&1,this[t(740)]=r>>2&1,this.chroma_sample_position=3&r,r=e[t(566)](),this.reserved_1=r>>5&7,0===this.reserved_1))){if(this[t(276)]=r>>4&1,1===this[t(276)])this[t(1477)]=15&r;else if(this[t(1253)]=15&r,0!==this.reserved_2)return;var n=this.size-this.hdr_size-4;this[t(960)]=e[t(1179)](n)}})),h[s(584)](s(1393),(function(e){var t,r,n=s;for(this[n(741)]=e.readUint8(),this[n(1388)]=e[n(566)](),this[n(1125)]=e[n(566)](),this[n(765)]=e[n(566)](),this.lengthSizeMinusOne=3&e[n(566)](),this[n(414)]=31&e.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e[n(1179)](r))})),h[s(584)](s(1043),(function(e){var t=s;this[t(1439)]=e.readUint32(),this.maxBitrate=e[t(899)](),this[t(749)]=e[t(899)]()})),h[s(1289)](s(769),(function(e){var t=s,r=e.readUint8();this[t(362)]=128==(128&r),this[t(832)]=64==(64&r),this[t(597)]=(63&r)>>2,e[t(890)]()})),h[s(584)]("cdef",(function(e){var t,r=s;for(this[r(1203)]=e[r(1483)](),this.channel_indexes=[],this[r(397)]=[],this[r(621)]=[],t=0;t=32768&&this.component_type_urls.push(e[t(1159)]())}})),h[s(1289)](s(1342),(function(e){var t,r,n=s;if(t=e[n(899)](),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else(this[t(1223)]===t(938)||this[t(1223)]===t(648))&&(this[t(600)]=e[t(1179)](this[t(557)]-4))})),h[s(1289)](s(1050),(function(e){var t=s;this[t(480)](e),this[t(952)]=e[t(1159)]()})),h.createFullBoxCtor(s(1166),(function(e){var t=s;0===this.version&&(this[t(1147)]=e[t(818)](),this[t(326)]=e[t(818)](),this.greatestDecodeToDisplayDelta=e[t(818)](),this[t(925)]=e[t(818)](),this[t(1036)]=e.readInt32())})),h[s(1289)](s(1438),(function(e){var t,r,n=s;if(t=e.readUint32(),this[n(1028)]=[],this[n(887)]=[],0===this[n(1059)])for(r=0;r>6,this[t(841)]=r>>1&31,this[t(1243)]=(1&r)<<2|n>>6&3,this[t(979)]=n>>3&7,this[t(1220)]=n>>2&1,this[t(1495)]=3&n|i>>5&7})),h[s(584)](s(1095),(function(e){var t=s,r=e.readUint16();this[t(297)]=r>>3,this[t(1064)]=7&r,this[t(1365)]=[];for(var n=0;n>6,i[t(841)]=o>>1&31,i[t(1243)]=(1&o)<<4|a>>4&15,i[t(979)]=a>>1&7,i[t(1220)]=1&a,i[t(312)]=c>>1&15,i[t(312)]>0&&(i[t(359)]=(1&c)<<8|e[t(566)]())}})),h[s(1289)]("dfLa",(function(e){var t=s,r=[],n=[t(1242),t(1041),t(546),t(1287),t(968),t(614),t(859),"RESERVED"];for(this.parseFullHeader(e);;){var i=e[t(566)](),o=Math[t(815)](127&i,n.length-1);if(o?e[t(1179)](e[t(890)]()):(e.readUint8Array(13),this[t(351)]=e[t(899)]()>>12,e[t(1179)](20)),r[t(435)](n[o]),128&i)break}this[t(1370)]=r[t(271)]+" ("+r.join(", ")+")"})),h[s(584)]("dimm",(function(e){var t=s;this[t(1027)]=e[t(686)]()})),h.createBoxCtor(s(774),(function(e){var t=s;this.time=e[t(899)]()})),h[s(584)](s(1430),(function(e){var t=s;this.bytessent=e[t(686)]()})),h[s(584)](s(1271),(function(e){var t=s;if(this.Version=e[t(566)](),this[t(791)]=e[t(566)](),this.PreSkip=e[t(1483)](),this.InputSampleRate=e.readUint32(),this.OutputGain=e.readInt16(),this[t(507)]=e[t(566)](),0!==this[t(507)]){this.StreamCount=e[t(566)](),this[t(1481)]=e[t(566)](),this[t(1409)]=[];for(var r=0;r=4;)this[t(536)][n]=e[t(494)](4),r-=4,n++})),h[s(1289)](s(365),(function(e){var t=s;0===this[t(1059)]&&(e.readUint32(),this[t(622)]=e[t(494)](4),e[t(266)](3),this[t(940)]=e[t(494)](this.size-this[t(334)]-20),"\0"===this[t(940)][this[t(940)].length-1]&&(this[t(940)]=this[t(940)][t(368)](0,-1)))})),h[s(584)](s(415),(function(e){var t,r,n,i,o=s;this[o(741)]=e[o(566)](),i=e[o(566)](),this[o(1113)]=i>>6,this[o(545)]=(32&i)>>5,this[o(1123)]=31&i,this.general_profile_compatibility=e.readUint32(),this[o(1244)]=e[o(1179)](6),this[o(523)]=e[o(566)](),this.min_spatial_segmentation_idc=4095&e[o(1483)](),this.parallelismType=3&e[o(566)](),this[o(506)]=3&e[o(566)](),this.bit_depth_luma_minus8=7&e[o(566)](),this[o(1426)]=7&e.readUint8(),this[o(1026)]=e[o(1483)](),i=e.readUint8(),this[o(580)]=i>>6,this[o(1025)]=(13&i)>>3,this[o(1252)]=(4&i)>>2,this[o(842)]=3&i,this[o(1345)]=[];var a=e[o(566)]();for(t=0;t>7,c.nalu_type=63&i;var u=e[o(1483)]();for(r=0;r>4&15,this[r(1111)]=15&t,t=e[r(566)](),this[r(1238)]=t>>4&15,1===this[r(1059)]||2===this[r(1059)]?this[r(1449)]=15&t:this.index_size=0,this[r(635)]=[];var n=0;if(this[r(1059)]<2)n=e[r(1483)]();else{if(2!==this[r(1059)])throw"version of iloc box not supported";n=e[r(899)]()}for(var i=0;i>7,this[t(1208)]=1&r})),h[s(1289)]("infe",(function(e){var t=s;if((0===this[t(1059)]||1===this[t(1059)])&&(this.item_ID=e[t(1483)](),this[t(681)]=e[t(1483)](),this.item_name=e[t(1159)](),this[t(1164)]=e[t(1159)](),this[t(324)]=e.readCString()),1===this[t(1059)])return this[t(715)]=e[t(494)](4),void e[t(1201)](this[t(760)]+this[t(557)]);this.version>=2&&(2===this[t(1059)]?this.item_ID=e[t(1483)]():3===this[t(1059)]&&(this.item_ID=e[t(899)]()),this[t(681)]=e[t(1483)](),this[t(418)]=e[t(494)](4),this[t(1058)]=e[t(1159)](),this[t(418)]===t(716)?(this[t(1164)]=e[t(1159)](),this[t(324)]=e[t(1159)]()):this[t(418)]===t(1269)&&(this[t(386)]=e[t(1159)]()))})),h[s(1289)](s(1116),(function(e){var t,r,n=s;for(entry_count=e[n(899)](),this.associations=[],t=0;t>7==1,1&this[n(725)]?c[n(822)]=(127&a)<<8|e[n(566)]():c[n(822)]=127&a}}})),h[s(1289)]("iref",(function(e){var t,r,n=s;for(this[n(770)]=[];e.getPosition()>7,i.assignment_type=127&o,i[t(483)]){case 0:i[t(720)]=e[t(494)](4);break;case 1:i[t(720)]=e[t(494)](4),i[t(669)]=e[t(899)]();break;case 2:case 3:break;case 4:i.sub_track_id=e[t(899)]()}}})),h.createBoxCtor(s(529),(function(e){this[s(634)]=e.readUint16()})),h[s(584)](s(1317),(function(e){var t=s;this[t(292)]=e[t(899)](),this[t(677)]=e[t(899)]()})),f[s(1432)][s(834)]=function(){return"("+this.x+","+this.y+")"},h[s(584)]("mdcv",(function(e){var t=s;this[t(798)]=[],this.display_primaries[0]=new f(e[t(1483)](),e[t(1483)]()),this.display_primaries[1]=new f(e[t(1483)](),e[t(1483)]()),this[t(798)][2]=new f(e.readUint16(),e[t(1483)]()),this[t(547)]=new f(e[t(1483)](),e[t(1483)]()),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e[t(899)]()})),h[s(1289)](s(1016),(function(e){var t=s;1==this[t(1059)]?(this[t(1094)]=e[t(686)](),this[t(379)]=e[t(686)](),this[t(673)]=e[t(899)](),this[t(330)]=e[t(686)]()):(this[t(1094)]=e[t(899)](),this.modification_time=e.readUint32(),this.timescale=e[t(899)](),this[t(330)]=e.readUint32()),this[t(480)](e),e.readUint16()})),h.createFullBoxCtor(s(874),(function(e){var t=s;1&this[t(725)]&&(this[t(1059)]=1),1==this[t(1059)]?this[t(498)]=e[t(686)]():this.fragment_duration=e[t(899)]()})),h.createFullBoxCtor(s(1085),(function(e){var t=s;this[t(1489)]=[],h[t(562)][t(1432)].parse[t(499)](this,e)})),h[s(1289)](s(556),(function(e){var t=s;this[t(1068)]=e[t(899)]()})),h[s(1289)](s(819),(function(e){this[s(1077)]=e.readUint32()})),h[s(1289)]("mskC",(function(e){var t=s;this.bits_per_pixel=e[t(566)]()})),h[s(1289)]("mvhd",(function(e){var t=s;1==this.version?(this[t(1094)]=e[t(686)](),this.modification_time=e.readUint64(),this[t(673)]=e[t(899)](),this.duration=e.readUint64()):(this[t(1094)]=e[t(899)](),this[t(379)]=e[t(899)](),this.timescale=e[t(899)](),this[t(330)]=e[t(899)]()),this[t(1413)]=e[t(899)](),this[t(463)]=e[t(1483)]()>>8,e[t(1483)](),e.readUint32Array(2),this[t(977)]=e.readUint32Array(9),e[t(266)](6),this[t(862)]=e[t(899)]()})),h[s(584)](s(522),(function(e){var t=s;this.packetssent=e[t(899)]()})),h.createBoxCtor("nump",(function(e){var t=s;this[t(782)]=e[t(686)]()})),h[s(1289)](s(1322),(function(e){var t=s,r=e[t(899)]();this[t(656)]=[];for(var n=0;n0){var r=e[t(899)]();this[t(1466)]=[];for(var n=0;n0&&(this[t(482)]=e[t(1179)](i))})),h.createFullBoxCtor(s(513),(function(e){var t=s;this[t(320)]=e.readUint32(),this[t(1240)]=e[t(899)]()})),h[s(1289)](s(284),(function(e){var t=s;this.width=e[t(899)](),this[t(1240)]=e[t(899)]()})),h[s(1289)](s(648),(function(e){var t=s;this[t(320)]=e.readUint32(),this[t(1240)]=e[t(899)]()})),h[s(1065)]("tapt",null,[s(513),s(648),"enof"]),h[s(584)]("rtp ",(function(e){var t=s;this[t(1176)]=e[t(494)](4),this.sdptext=e[t(494)](this[t(557)]-this[t(334)]-4)})),h.createFullBoxCtor(s(949),(function(e){var t=s;1&this[t(725)]&&(this[t(1151)]=e.readUint32(),this[t(455)]=e.readUint32());var r=e[t(899)]();this[t(1324)]=[];for(var n=0;n>7,this.avgRateFlag=r>>6&1,this[t(961)]&&(this[t(330)]=e[t(899)]()),this[t(991)]&&(this[t(828)]=e[t(566)](),this[t(307)]=e[t(1483)](),this.avgFrameRate=e[t(1483)]()),this.dependency=[];for(var n=e.readUint8(),i=0;i>7,this[t(999)]=127&r})),h.createSampleGroupCtor("rash",(function(e){var t=s;if(this[t(884)]=e.readUint16(),this[t(1344)]!==2+(1===this[t(884)]?2:6*this.operation_point_count)+9)this[t(482)]=e.readUint8Array(this[t(1344)]-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this[t(1470)]=[],this[t(733)]=[];for(var r=0;r>4,this[t(844)]=15&r,this[t(305)]=e[t(566)](),this[t(393)]=e[t(566)](),this.KID=h[t(1408)](e),this.constant_IV_size=0,this[t(799)]=0,1===this[t(305)]&&0===this[t(393)]&&(this[t(1452)]=e[t(566)](),this[t(799)]=e.readUint8Array(this[t(1452)]))})),h[s(1081)]("stsa",(function(e){})),h.createSampleGroupCtor(s(1012),(function(e){var t=s,r=e[t(566)]();this[t(917)]=63&r})),h[s(1081)](s(342),(function(e){var t=e[s(566)]();this.level_independently_decodable=t>>7})),h.createSampleGroupCtor(s(1198),(function(e){})),h[s(1081)](s(1042),(function(e){})),h[s(1081)](s(516),(function(e){})),h[s(1289)](s(840),(function(e){var t=s;this[t(720)]=e.readString(4),1===this[t(1059)]?this[t(669)]=e.readUint32():this.grouping_type_parameter=0,this[t(705)]=[];for(var r=e[t(899)](),n=0;n>6,this[r(559)][i]=t>>4&3,this.sample_is_depended_on[i]=t>>2&3,this[r(717)][i]=3&t})),h[s(1289)](s(296)),h[s(1289)](s(1231),(function(e){var t=s;this[t(720)]=e[t(494)](4),o.debug(t(856),t(836)+this.grouping_type),1===this[t(1059)]?this.default_length=e[t(899)]():this[t(964)]=0,this[t(1059)]>=2&&(this.default_group_description_index=e[t(899)]()),this[t(705)]=[];for(var r=e.readUint32(),n=0;n>31&1,i[t(1364)]=2147483647&o,i[t(353)]=e[t(899)](),o=e.readUint32(),i.starts_with_SAP=o>>31&1,i[t(1446)]=o>>28&7,i.SAP_delta_time=268435455&o}})),h.SingleItemTypeReferenceBox=function(e,t,r,n){var i=s;h[i(1018)][i(499)](this,e,t),this[i(334)]=r,this[i(760)]=n},h[s(650)][s(1432)]=new h.Box,h.SingleItemTypeReferenceBox[s(1432)][s(943)]=function(e){var t=s;this[t(591)]=e[t(1483)]();var r=e[t(1483)]();this.references=[];for(var n=0;n>4&15,this[n(1387)][t+1]=15&i}else if(8===this[n(617)])for(t=0;t0)for(r=0;r>4&15,this[t(259)]=15&r}this.default_isProtected=e[t(566)](),this[t(955)]=e[t(566)](),this.default_KID=h[t(1408)](e),1===this[t(1281)]&&0===this[t(955)]&&(this[t(684)]=e[t(566)](),this[t(751)]=e.readUint8Array(this.default_constant_IV_size))})),h[s(1289)]("tfdt",(function(e){var t=s;1==this[t(1059)]?this[t(1362)]=e[t(686)]():this[t(1362)]=e.readUint32()})),h[s(1289)](s(511),(function(e){var t=s,r=0;this[t(927)]=e[t(899)](),this[t(557)]-this[t(334)]>r&&this[t(725)]&h[t(1460)]?(this.base_data_offset=e[t(686)](),r+=8):this[t(1283)]=0,this[t(557)]-this[t(334)]>r&&this[t(725)]&h.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e[t(899)](),r+=4):this[t(1412)]=0,this[t(557)]-this[t(334)]>r&&this[t(725)]&h[t(1163)]?(this[t(672)]=e[t(899)](),r+=4):this[t(672)]=0,this[t(557)]-this[t(334)]>r&&this.flags&h.TFHD_FLAG_SAMPLE_SIZE?(this[t(407)]=e[t(899)](),r+=4):this.default_sample_size=0,this[t(557)]-this.hdr_size>r&&this[t(725)]&h[t(1214)]?(this.default_sample_flags=e[t(899)](),r+=4):this[t(1247)]=0})),h[s(1289)](s(1209),(function(e){var t=s;this[t(1360)]=e[t(899)](),e.readUint24();var r=e[t(566)]();this[t(1168)]=r>>4&3,this[t(553)]=r>>2&3,this.length_size_of_sample_num=3&r,this.entries=[];for(var n=e.readUint32(),i=0;i>8,e[t(1483)](),this.matrix=e[t(590)](9),this[t(320)]=e[t(899)](),this[t(1240)]=e.readUint32()})),h[s(584)](s(378),(function(e){var t=s;this[t(486)]=e[t(899)]()})),h[s(584)](s(897),(function(e){var t=s;this[t(486)]=e[t(899)]()})),h.createBoxCtor("totl",(function(e){this[s(1027)]=e.readUint32()})),h.createBoxCtor("tpay",(function(e){var t=s;this.bytessent=e[t(899)]()})),h[s(584)](s(726),(function(e){var t=s;this[t(1027)]=e[t(686)]()})),h[s(953)][s(1432)][s(943)]=function(e){this[s(1350)](e),this.track_group_id=e.readUint32()},h[s(339)](s(303)),h[s(285)]=function(e,t,r,n){var i=s;h[i(1018)][i(499)](this,e,t),this.hdr_size=r,this[i(760)]=n},h.TrackReferenceTypeBox[s(1432)]=new(h[s(1018)]),h[s(285)][s(1432)][s(943)]=function(e){var t=s;this[t(863)]=e.readUint32Array((this[t(557)]-this[t(334)])/4)},h[s(1367)][s(1432)].parse=function(e){for(var t,r,n=s;e[n(1482)]()r&&this[t(725)]&h.TRUN_FLAGS_DATA_OFFSET?(this[t(509)]=e[t(818)](),r+=4):this[t(509)]=0,this.size-this[t(334)]>r&&this[t(725)]&h[t(388)]?(this[t(485)]=e[t(899)](),r+=4):this[t(485)]=0,this.sample_duration=[],this[t(947)]=[],this.sample_flags=[],this[t(638)]=[],this.size-this.hdr_size>r)for(var n=0;n>7&1,this[r(316)]=n>>6&1,this.block_little_endian=n>>5&1,this.block_reversed=n>>4&1,this[r(1135)]=n>>3&1,this.pixel_size=e[r(899)](),this[r(319)]=e.readUint32(),this[r(423)]=e[r(899)](),this.num_tile_cols_minus_one=e[r(899)](),this.num_tile_rows_minus_one=e.readUint32()}})),h[s(1289)]("url ",(function(e){var t=s;1!==this[t(725)]&&(this[t(963)]=e[t(1159)]())})),h[s(1289)](s(419),(function(e){var t=s;this[t(940)]=e[t(1159)](),this[t(557)]-this[t(334)]-this.name[t(271)]-1>0&&(this.location=e.readCString())})),h[s(308)](s(644),!0,!1,(function(e){var t=s;this[t(1263)]=e[t(494)](this[t(557)]-this.hdr_size)[t(1493)](/&/g,t(1453))[t(1493)](//g,">")[t(1493)](/"/g,t(1039))[t(1493)](/'/g,t(670))})),h[s(308)](s(461),!0,!1,(function(e){var t=s;this[t(491)]=h[t(1408)](e);var r=e[t(899)]();r>0&&(this[t(482)]=e[t(1179)](r))})),h[s(308)]("a2394f525a9b4f14a2446c427c648df4",!0,!1),h.createUUIDBox(s(702),!0,!1,(function(e){var t=s;this[t(1142)]=e[t(890)](),this[t(495)]=e.readUint8(),this[t(411)]=h[t(1408)](e)})),h[s(308)](s(1484),!0,!1,(function(e){var t=s;this[t(1069)]=e[t(566)](),this[t(705)]=[];for(var r=0;r>4,this[r(978)]=t>>1&7,this[r(1346)]=1&t,this[r(1078)]=e.readUint8(),this[r(1363)]=e[r(566)](),this[r(1371)]=e[r(566)](),this.codecIntializationDataSize=e[r(1483)](),this.codecIntializationData=e[r(1179)](this[r(1155)])):(this[r(879)]=e.readUint8(),this[r(1399)]=e[r(566)](),t=e[r(566)](),this[r(278)]=t>>4&15,this[r(1260)]=15&t,t=e[r(566)](),this[r(978)]=t>>4&15,this[r(1211)]=t>>1&7,this[r(1346)]=1&t,this[r(1155)]=e[r(1483)](),this[r(287)]=e[r(1179)](this[r(1155)]))})),h[s(584)]("vttC",(function(e){var t=s;this[t(1073)]=e[t(494)](this[t(557)]-this[t(334)])})),h.createFullBoxCtor(s(1093),(function(e){var t,r,n=s,i={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){var t=So;this[t(430)]=e[t(566)](),this.num_held_bits=8},stream_read_2_bytes:function(e){this[So(430)]=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=So,r=this[t(430)]>>this[t(752)]-e&(1<1){for(i[n(812)](e),this[n(780)]=0,r=this[n(1456)]-2;r>=0;--r){var c=i[n(1096)](1);this.ptl_sublayer_present_mask|=c<1;++r)i[n(1096)](1);for(this[n(958)]=[],r=this[n(1456)]-2;r>=0;--r)this[n(780)]&1<>=1;r+=h[t(1185)](i,0),r+=".",0===this[t(415)][t(545)]?r+="L":r+="H",r+=this[t(415)][t(523)];var o=!1,a="";for(e=5;e>=0;e--)(this.hvcC[t(1244)][e]||o)&&(a="."+h[t(1185)](this[t(415)].general_constraint_indicator[e],0)+a,o=!0);r+=a}return r},h[s(813)][s(1432)][s(1410)]=h[s(1488)][s(1432)][s(1410)]=function(){var e,t=s,r=h[t(302)].prototype[t(1410)].call(this);if(this[t(1093)]){r+="."+this[t(1093)].general_profile_idc,this[t(1093)][t(545)]?r+=".H":r+=".L",r+=this[t(1093)].general_level_idc;var n="";if(this[t(1093)].general_constraint_info){var i,o=[],a=0;for(a|=this[t(1093)][t(1152)]<<7,a|=this.vvcC[t(512)]<<6,e=0;e>2&63,o[t(435)](a),a&&(i=e),a=this[t(1093)][t(488)][e]>>2&3;if(void 0===i)n=t(583);else{n=".C";var c=t(433),u=0,l=0;for(e=0;e<=i;++e)for(u=u<<8|o[e],l+=8;l>=5;){n+=c[u>>l-5&31],u&=(1<<(l-=5))-1}l&&(n+=c[31&(u<<=5-l)])}}r+=n}return r},h.mp4aSampleEntry[s(1432)][s(1410)]=function(){var e=s,t=h[e(302)][e(1432)].getCodec.call(this);if(this[e(1473)]&&this[e(1473)][e(589)]){var r=this[e(1473)][e(589)].getOTI(),n=this[e(1473)][e(589)][e(361)]();return t+"."+h[e(1185)](r)+(n?"."+n:"")}return t},h[s(1109)][s(1432)][s(1410)]=function(){var e=s,t=h[e(302)][e(1432)].getCodec[e(499)](this);return this[e(1411)]?t+"."+this.mime_format:t},h[s(727)][s(1432)][s(1410)]=h.vp09SampleEntry.prototype.getCodec=function(){var e=s,t=h[e(302)][e(1432)].getCodec[e(499)](this),r=this[e(882)][e(1399)];0==r&&(r="00");var n=this.vpcC[e(278)];return 8==n&&(n="08"),t+".0"+this.vpcC[e(879)]+"."+r+"."+n},h[s(1292)][s(1432)][s(1410)]=function(){var e,t=s,r=h[t(302)][t(1432)][t(1410)][t(499)](this),n=this[t(1305)][t(372)];return n<10&&(n="0"+n),2===this[t(1305)][t(604)]&&1===this[t(1305)][t(1169)]?e=1===this[t(1305)].twelve_bit?"12":"10":this[t(1305)][t(604)]<=2&&(e=1===this[t(1305)][t(1169)]?"10":"08"),r+"."+this[t(1305)][t(604)]+"."+n+(this[t(1305)][t(346)]?"H":"M")+"."+e},h[s(1018)][s(1432)][s(282)]=function(e,t){var r=s;this.size+=8,this.size>u&&(this.size+=8),this.type===r(768)&&(this.size+=16),o[r(503)](r(1357),r(976)+this[r(1395)]+r(1474)+this.size+r(869)+e[r(1482)]()+(t||"")),this.size>u?e.writeUint32(1):(this[r(327)]=e.getPosition(),e[r(1433)](this.size)),e[r(654)](this[r(1395)],null,4),this[r(1395)]===r(768)&&e[r(942)](this[r(768)]),this.size>u&&e[r(502)](this[r(557)])},h[s(469)][s(1432)][s(282)]=function(e){var t=s;this[t(557)]+=4,h[t(1018)][t(1432)].writeHeader.call(this,e,t(575)+this[t(1059)]+t(456)+this[t(725)]),e[t(578)](this[t(1059)]),e[t(560)](this[t(725)])},h[s(1018)][s(1432)][s(1295)]=function(e){var t=s;"mdat"===this[t(1395)]?this[t(482)]&&(this[t(557)]=this.data[t(271)],this[t(282)](e),e[t(942)](this[t(482)])):(this[t(557)]=this[t(482)]?this[t(482)][t(271)]:0,this[t(282)](e),this.data&&e[t(942)](this[t(482)]))},h[s(562)][s(1432)][s(1295)]=function(e){var t=s;this[t(557)]=0,this[t(282)](e);for(var r=0;r=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this[n(705)][n(271)]),t=0;t0)for(t=0;t+1r?1:0,this[t(725)]=0,this[t(557)]=4,1===this[t(1059)]&&(this[t(557)]+=4),this[t(282)](e),1===this[t(1059)]?e[t(502)](this.baseMediaDecodeTime):e[t(1433)](this[t(1362)])},h[s(1356)][s(1432)][s(1295)]=function(e){var t=s;this[t(1059)]=0,this[t(557)]=4,this[t(725)]&h[t(1460)]&&(this.size+=8),this[t(725)]&h[t(357)]&&(this[t(557)]+=4),this[t(725)]&h.TFHD_FLAG_SAMPLE_DUR&&(this[t(557)]+=4),this[t(725)]&h[t(1257)]&&(this[t(557)]+=4),this[t(725)]&h[t(1214)]&&(this[t(557)]+=4),this[t(282)](e),e.writeUint32(this.track_id),this.flags&h.TFHD_FLAG_BASE_DATA_OFFSET&&e[t(502)](this.base_data_offset),this[t(725)]&h[t(357)]&&e[t(1433)](this[t(1412)]),this[t(725)]&h[t(1163)]&&e.writeUint32(this.default_sample_duration),this[t(725)]&h.TFHD_FLAG_SAMPLE_SIZE&&e[t(1433)](this[t(407)]),this[t(725)]&h[t(1214)]&&e.writeUint32(this.default_sample_flags)},h[s(1202)][s(1432)][s(1295)]=function(e){var t=s;this.version=0,this.size=80,this[t(282)](e),e[t(1433)](this[t(1094)]),e[t(1433)](this[t(379)]),e[t(1433)](this[t(927)]),e[t(1433)](0),e[t(1433)](this[t(330)]),e[t(1433)](0),e[t(1433)](0),e[t(1354)](this[t(1063)]),e[t(1354)](this[t(588)]),e[t(1354)](this[t(463)]<<8),e.writeUint16(0),e.writeInt32Array(this[t(977)]),e[t(1433)](this[t(320)]),e[t(1433)](this.height)},h.trexBox[s(1432)][s(1295)]=function(e){var t=s;this[t(1059)]=0,this[t(725)]=0,this.size=20,this[t(282)](e),e[t(1433)](this.track_id),e[t(1433)](this[t(1412)]),e[t(1433)](this[t(672)]),e[t(1433)](this[t(407)]),e[t(1433)](this.default_sample_flags)},h[s(1268)].prototype[s(1295)]=function(e){var t=s;this.version=0,this.size=4,this[t(725)]&h[t(281)]&&(this[t(557)]+=4),this.flags&h[t(388)]&&(this[t(557)]+=4),this.flags&h[t(645)]&&(this[t(557)]+=4*this[t(431)].length),this.flags&h[t(363)]&&(this[t(557)]+=4*this.sample_size[t(271)]),this[t(725)]&h[t(1303)]&&(this[t(557)]+=4*this[t(298)].length),this[t(725)]&h[t(747)]&&(this[t(557)]+=4*this[t(638)][t(271)]),this[t(282)](e),e[t(1433)](this[t(846)]),this[t(725)]&h.TRUN_FLAGS_DATA_OFFSET&&(this[t(649)]=e[t(1482)](),e.writeInt32(this.data_offset)),this[t(725)]&h.TRUN_FLAGS_FIRST_FLAG&&e[t(1433)](this[t(485)]);for(var r=0;r-1||e[r]instanceof h.Box||t[r]instanceof h[n(1018)]||typeof e[r]===n(1212)||typeof t[r]===n(1212)||typeof e[r]===n(554)||typeof t[r]===n(554)||e[n(1353)]&&e.subBoxNames[n(270)](r.slice(0,4))>-1||t[n(1353)]&&t[n(1353)][n(270)](r.slice(0,4))>-1||r===n(482)||"start"===r||r===n(557)||"creation_time"===r||r===n(379)||h.DIFF_PRIMITIVE_ARRAY_PROP_NAMES[n(270)](r)>-1||e[r]===t[r]))return!1;return!0},h[s(723)]=function(e,t){var r=s;if(!h[r(1233)](e,t))return!1;for(var n=0;n=t?e:new Array(t-e[n(271)]+1)[n(337)](r)+e}function o(e){var t=So,r=Math[t(471)](e/3600),n=Math[t(471)]((e-3600*r)/60),s=Math[t(471)](e-3600*r-60*n),o=Math[t(471)](1e3*(e-3600*r-60*n-s));return i(r,2)+":"+i(n,2)+":"+i(s,2)+"."+i(o,3)}for(var a=this[n(1318)](r),c="",u=0;u1)for(t=1;t-1&&this[t(443)][t(608)](r,1)},g.prototype[s(801)]=function(e,t,r){var n=s,i=this[n(640)](e);if(i){var o={};this.extractedTracks[n(435)](o),o.id=e,o[n(551)]=t,o.trak=i,i[n(1300)]=0,o[n(930)]=1e3,o[n(329)]=[],r&&r[n(1020)]&&(o[n(930)]=r[n(1020)])}},g[s(1432)][s(1424)]=function(e){for(var t=s,r=-1,n=0;n-1&&this.extractedTracks[t(608)](r,1)},g[s(1432)].parse=function(){var e,t,r=s;if(!this[r(1052)]||this[r(1052)]())for(;;){if(this[r(318)]&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}if(this[r(328)]&&this[r(328)](),(e=h[r(704)](this[r(1403)],false))[r(1177)]===h[r(1195)]){if(this[r(820)]){if(this.processIncompleteBox(e))continue;return}return}var n;switch(n=(t=e[r(1033)])[r(1395)]!==r(768)?t[r(1395)]:t[r(768)],this[r(1489)][r(435)](t),n){case"mdat":this[r(1447)].push(t);break;case r(795):this.moofs[r(435)](t);break;case r(651):this.moovStartFound=!0,0===this[r(1447)][r(271)]&&(this[r(739)]=!0);default:this[n],this[n]=t}this.updateUsedBytes&&this[r(965)](t,e)}},g[s(1432)][s(489)]=function(e){var t=s;if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw t(877);return 0===e[t(449)]?(this[t(1403)][t(299)](),!1):(e[t(1210)]=0,this[t(1403)][t(962)](e),this.stream[t(299)](),!!this[t(1403)].initialized())},g.prototype[s(1157)]=function(e,t){var r,n=s;if(this.checkBuffer(e))return this[n(943)](),this[n(290)]&&!this[n(637)]&&(this[n(637)]=!0,this[n(1293)]&&this[n(1293)]()),this[n(651)]?(!this.sampleListBuilt&&(this.buildSampleLists(),this[n(619)]=!0),this[n(639)](),this[n(971)]&&!this[n(277)]&&(this[n(277)]=!0,this[n(971)](this[n(1141)]())),this[n(668)](t),this[n(678)]?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this[n(759)],this[n(1403)][n(611)]&&(r=this[n(1403)].getEndFilePositionAfter(r))):r=this[n(759)]?this.nextParsePosition:0,this[n(1006)]&&this.onSidx&&!this[n(592)]&&(this[n(1471)](this[n(1006)]),this.sidxSent=!0),this[n(1085)]&&(this[n(729)]&&!this[n(1382)]&&(this[n(729)](),this[n(1382)]=!0),this[n(539)]&&this.processItems(this[n(1119)])),this[n(1403)][n(613)]&&(this[n(1403)][n(299)](),this[n(1403)][n(613)](),this.stream[n(299)](!0)),r},g[s(1432)].getInfo=function(){var e,t,r,n,i,o,a=s,c={},u=new Date("1904-01-01T00:00:00Z")[a(814)]();if(this.moov)for(c[a(974)]=!0,c[a(330)]=this[a(651)].mvhd[a(330)],c[a(673)]=this[a(651)][a(260)].timescale,c[a(335)]=null!=this[a(651)].mvex,c[a(335)]&&this[a(651)][a(647)][a(874)]&&(c[a(498)]=this[a(651)].mvex[a(874)][a(498)]),c[a(739)]=this.isProgressive,c[a(425)]=null!=this[a(651)][a(1448)],c[a(1165)]=[],c[a(1165)].push(this.ftyp.major_brand),c[a(1165)]=c[a(1165)][a(1479)](this[a(1376)].compatible_brands),c.created=new Date(u+1e3*this.moov[a(260)].creation_time),c[a(383)]=new Date(u+1e3*this.moov.mvhd[a(379)]),c[a(731)]=[],c[a(1187)]=[],c[a(1391)]=[],c[a(1133)]=[],c[a(466)]=[],c.hintTracks=[],c[a(508)]=[],e=0;e0?c[a(716)]+=a(343):c.audioTracks&&c.audioTracks.length>0?c.mime+=a(460):c[a(716)]+=a(1235),e=0;e=r[n(329)][n(271)])&&(this[n(1397)]&&this.onSegment(i.id,i[n(551)],i.segmentStream[n(1421)],r.nextSample,e||r[n(1300)]>=r.samples[n(271)]),i.segmentStream=null,i!==this[n(443)][t]))break}}if(null!==this[n(1200)])for(t=0;t=r[n(329)][n(271)])&&(o[n(503)](n(1394),n(878)+c.id+n(1276)+r.nextSample),this.onSamples&&this[n(1200)](c.id,c.user,c[n(329)]),c[n(329)]=[],c!==this.extractedTracks[t]))break}}}},g.prototype.getBox=function(e){var t=s,r=this[t(983)](e,!0);return r[t(271)]?r[0]:null},g.prototype[s(983)]=function(e,t){var r=s,n=[];return g[r(959)][r(499)](this,e,n,t),n},g[s(959)]=function(e,t,r){var n=s;for(var i in this[n(1395)]&&this[n(1395)]==e&&t.push(this),this.boxes){if(t[n(271)]&&r)return;g[n(959)][n(499)](this[n(1489)][i],e,t,r)}},g[s(1432)][s(806)]=function(e){var t=s,r=this.getTrackById(e);return r?r[t(329)]:void 0},g.prototype[s(479)]=function(e,t){var r=s,n=this.getTrackById(e);return this[r(737)](n,t)},g[s(1432)][s(1490)]=function(e,t,r){var n=s,i=this[n(640)](e);i[n(1450)]||(i[n(1450)]=0);for(var o=i.lastValidSample;oe*i[a(673)]){u=n-1;break}t&&i[a(1425)]&&(c=n)}for(t&&(u=c),e=r[a(329)][u][a(996)],r[a(1300)]=u;r[a(329)][u][a(1431)]===r[a(329)][u][a(557)]&&r[a(329)][u+1];)u++;return{offset:r[a(329)][u].offset+r[a(329)][u][a(1431)],time:e/o}},g.prototype[s(712)]=function(e){var t,r=s;return e[r(329)]?((t=e[r(329)][e[r(329)][r(271)]-1]).cts+t[r(330)])/t[r(673)]:1/0},g.prototype[s(1201)]=function(e,t){var r,n,i,o=s,a=this.moov,c={offset:1/0,time:1/0};if(this[o(651)]){for(i=0;ithis[o(712)](r)||((n=this[o(860)](e,t,r))[o(1324)]-1){u=l;break}switch(u){case"Visual":if(o[t(700)](t(1348))[t(697)]("graphicsmode",0)[t(697)](t(685),[0,0,0]),c.set(t(320),r.width).set(t(1240),r[t(1240)]).set(t(666),72<<16).set(t(1319),72<<16)[t(697)](t(1101),1)[t(697)]("compressorname",r.type+" Compressor")[t(697)](t(272),24),r[t(1475)]){var p=new h.avcCBox;p.parse(new a(r.avcDecoderConfigRecord)),c.addBox(p)}else if(r[t(895)]){var m=new(h[t(1075)]);m[t(943)](new a(r[t(895)])),c.addBox(m)}break;case"Audio":o.add(t(1285)).set("balance",r[t(1419)]||0),c.set(t(1203),r.channel_count||2).set("samplesize",r[t(1335)]||16)[t(697)](t(351),r[t(351)]||65536);break;case t(451):o[t(700)](t(293));break;case"Subtitle":if(o.add(t(784)),r[t(1395)]===t(870))c[t(697)](t(630),r[t(630)]||t(1005))[t(697)]("schema_location",r.schema_location||"")[t(697)](t(1380),r[t(1380)]||"");break;case t(1341):o[t(700)](t(598));break;case t(789):o.add(t(598));break;default:o[t(700)](t(598))}r[t(861)]&&c[t(1049)](r[t(861)]),r[t(399)]&&r[t(399)].forEach((function(e){c[t(1049)](e)})),o[t(700)](t(679))[t(700)](t(402)).addEntry((new h["url Box"])[t(697)](t(725),1));var v=o.add(t(821));return v[t(700)](t(970)).addEntry(c),v[t(700)](t(824))[t(697)]("sample_counts",[]).set(t(558),[]),v[t(700)](t(1422))[t(697)]("first_chunk",[]).set("samples_per_chunk",[])[t(697)]("sample_description_index",[]),v[t(700)](t(790))[t(697)](t(1401),[]),v[t(700)]("stsz").set("sample_sizes",[]),this.moov[t(647)][t(700)](t(1192))[t(697)](t(927),r.id).set(t(1412),r.default_sample_description_index||1)[t(697)](t(672),r.default_sample_duration||0).set("default_sample_size",r.default_sample_size||0)[t(697)](t(1247),r.default_sample_flags||0),this[t(273)](n),r.id}},h[s(1018)][s(1432)][s(939)]=function(e){var t=s,r=e||new c;r[t(923)]=c[t(773)],this[t(1295)](r)},g[s(1432)][s(629)]=function(e,t,r){var n=s,i=r||{},o={},a=this[n(640)](e);if(null!==a){o.number=a[n(329)].length,o[n(927)]=a[n(1338)][n(927)],o[n(673)]=a.mdia[n(1016)][n(673)],o[n(1373)]=i.sample_description_index?i[n(692)]-1:0,o[n(861)]=a[n(295)][n(1071)].stbl[n(970)][n(705)][o[n(1373)]],o[n(482)]=t,o[n(557)]=t[n(449)],o[n(1431)]=o[n(557)],o[n(330)]=i.duration||1,o[n(996)]=i[n(996)]||0,o[n(445)]=i.dts||0,o[n(1425)]=i.is_sync||!1,o.is_leading=i.is_leading||0,o[n(532)]=i[n(532)]||0,o[n(390)]=i[n(390)]||0,o[n(387)]=i[n(387)]||0,o[n(755)]=i[n(755)]||0,o[n(1324)]=0,o.subsamples=i[n(1044)],a.samples[n(435)](o),a[n(1072)]+=o[n(557)],a.samples_duration+=o[n(330)],void 0===a[n(374)]&&(a[n(374)]=i.dts),this.processSamples();var c=this[n(1316)](o);return this[n(1049)](c),c[n(939)](),c[n(1122)][0].truns[0][n(509)]=c[n(557)]+8,this[n(700)](n(601))[n(482)]=new Uint8Array(t),o}},g[s(1432)][s(1316)]=function(e){var t=s,r=0;r=e[t(1425)]?1<<25:65536;var n=new(h[t(892)]);n[t(700)](t(556))[t(697)](t(1068),this[t(367)]),this.nextMoofNumber++;var i=n[t(700)](t(867)),o=this[t(640)](e[t(927)]);return i[t(700)](t(511)).set(t(927),e[t(927)])[t(697)](t(725),h.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i[t(700)](t(526))[t(697)](t(1362),e[t(445)]-(o[t(374)]||0)),i[t(700)](t(267))[t(697)](t(725),h[t(281)]|h[t(645)]|h[t(363)]|h[t(1303)]|h[t(747)])[t(697)](t(509),0).set(t(485),0)[t(697)](t(846),1).set(t(431),[e[t(330)]])[t(697)](t(947),[e[t(557)]])[t(697)](t(298),[r])[t(697)](t(638),[e[t(996)]-e.dts]),n},g[s(1432)].lastMoofIndex=0,g[s(1432)].samplesDataSize=0,g.prototype[s(514)]=function(){var e,t,r,n,i,o,a=s;for(this[a(675)]=this.moov[a(260)].duration,this[a(651)].mvhd[a(330)]=0,e=0;e=2&&(u=i[a][l(720)]+"/0",(c=new d(i[a][l(720)],0)).is_fragment=!0,!t[l(1301)][u]&&(t[l(1301)][u]=c))}else for(a=0;a=2&&(u=n[a][l(720)]+"/0",c=new d(n[a][l(720)],0),!e[l(1301)][u]&&(e.sample_groups_info[u]=c))},g[s(954)]=function(e,t,r,n){var i,o,a=s;for(i in t.sample_groups=[],n){var c;if(t[a(315)][i]={},t.sample_groups[i].grouping_type=n[i][a(720)],t[a(315)][i][a(669)]=n[i].grouping_type_parameter,r>=n[i][a(1040)]&&(n[i][a(1040)]<0&&(n[i].last_sample_in_run=0),n[i][a(1437)]++,n[i][a(1437)]<=n[i].sbgp[a(705)][a(271)]-1&&(n[i].last_sample_in_run+=n[i][a(840)][a(705)][n[i].entry_index][a(846)])),n[i][a(1437)]<=n[i][a(840)].entries[a(271)]-1?t[a(315)][i][a(1251)]=n[i][a(840)][a(705)][n[i][a(1437)]][a(1251)]:t[a(315)][i][a(1251)]=-1,0!==t[a(315)][i][a(1251)])c=n[i][a(941)]?n[i].fragment_description:n[i][a(861)],t[a(315)][i].group_description_index>0?(o=t[a(315)][i].group_description_index>65535?(t[a(315)][i].group_description_index>>16)-1:t.sample_groups[i][a(1251)]-1,c&&o>=0&&(t[a(315)][i][a(861)]=c[a(705)][o])):c&&c[a(1059)]>=2&&c.default_group_description_index>0&&(t.sample_groups[i][a(861)]=c[a(705)][c.default_group_description_index-1])}},g.process_sdtp=function(e,t,r){var n=s;t&&(e?(t[n(450)]=e.is_leading[r],t[n(532)]=e[n(559)][r],t[n(390)]=e[n(1174)][r],t[n(387)]=e[n(717)][r]):(t[n(450)]=0,t.depends_on=0,t[n(390)]=0,t[n(387)]=0))},g[s(1432)].buildSampleLists=function(){var e,t,r=s;for(e=0;eb&&(w++,b<0&&(b=0),b+=o[C(1028)][w]),t>0?(e.samples[t-1][C(330)]=o[C(558)][w],e[C(1229)]+=e[C(329)][t-1][C(330)],T[C(445)]=e.samples[t-1][C(445)]+e[C(329)][t-1][C(330)]):T[C(445)]=0,a?(t>=S&&(I++,S<0&&(S=0),S+=a[C(1028)][I]),T[C(996)]=e.samples[t][C(445)]+a[C(887)][I]):T[C(996)]=T[C(445)],c?(t==c[C(1038)][A]-1?(T[C(1425)]=!0,A++):(T[C(1425)]=!1,T[C(755)]=0),l&&l.entries[E][C(889)]+k==t+1&&(T[C(1044)]=l[C(705)][E][C(1044)],k+=l[C(705)][E].sample_delta,E++)):T.is_sync=!0,g[C(721)](e.mdia[C(1071)][C(821)].sdtp,T,T[C(945)]),f?T[C(755)]=f[C(291)][t]:T.degradation_priority=0,l&&l[C(705)][E][C(889)]+k==t&&(T.subsamples=l.entries[E][C(1044)],k+=l[C(705)][E][C(889)]),(d[C(271)]>0||h[C(271)]>0)&&g[C(954)](e,T,t,e.sample_groups_info)}t>0&&(e[C(329)][t-1].duration=Math[C(671)](e[C(295)][C(1016)][C(330)]-e[C(329)][t-1][C(445)],0),e[C(1229)]+=e[C(329)][t-1][C(330)])}},g.prototype.updateSampleLists=function(){var e,t,r,n,i,o,a,c,u,l,d,f,p,m,v,y=s;if(void 0!==this[y(651)])for(;this[y(355)]0&&g[y(719)](f,d,d[y(904)],f[y(295)][y(1071)][y(821)][y(1469)],d[y(1469)]),t=0;t0?m[y(445)]=f.samples[f[y(329)][y(271)]-2].dts+f[y(329)][f[y(329)][y(271)]-2][y(330)]:(d[y(526)]?m[y(445)]=d.tfdt[y(1362)]:m[y(445)]=0,f[y(992)]=!0),m[y(996)]=m.dts,_[y(725)]&h.TRUN_FLAGS_CTS_OFFSET&&(m.cts=m[y(445)]+_.sample_composition_time_offset[r]),v=a,_[y(725)]&h[y(1303)]?v=_[y(298)][r]:0===r&&_[y(725)]&h[y(388)]&&(v=_[y(485)]),m[y(1425)]=!(v>>16&1),m[y(450)]=v>>26&3,m[y(532)]=v>>24&3,m[y(390)]=v>>22&3,m.has_redundancy=v>>20&3,m[y(755)]=65535&v;var b=!!(d[y(511)][y(725)]&h[y(1460)]),w=!!(d[y(511)].flags&h[y(1492)]),S=!!(_[y(725)]&h.TRUN_FLAGS_DATA_OFFSET),I=0;I=b?d[y(511)][y(1283)]:w||0===t?l[y(760)]:c,0===t&&0===r?S?m.offset=I+_[y(509)]:m[y(1324)]=I:m[y(1324)]=c,c=m[y(1324)]+m[y(557)],(d[y(904)][y(271)]>0||d[y(1469)][y(271)]>0||f[y(295)][y(1071)][y(821)].sbgps[y(271)]>0||f[y(295)][y(1071)][y(821)][y(1469)].length>0)&&g[y(954)](f,m,m[y(261)],d[y(1301)])}}if(d[y(626)]){f.has_fragment_subsamples=!0;var A=d[y(1384)];for(t=0;t-1))return null;var u=(r=this[n(1403)][n(1385)][a])[n(449)]-(i[n(1324)]+i[n(1431)]-r[n(1230)]);if(i[n(557)]-i[n(1431)]<=u)return o[n(503)](n(1394),n(950)+t+n(442)+i.alreadyRead+n(1127)+(i[n(1324)]+i.alreadyRead-r[n(1230)])+" read size: "+(i[n(557)]-i[n(1431)])+n(447)+i[n(557)]+")"),c[n(1333)](i[n(482)].buffer,i[n(1431)],r,i[n(1324)]+i[n(1431)]-r[n(1230)],i[n(557)]-i[n(1431)]),r[n(1210)]+=i[n(557)]-i.alreadyRead,this[n(1403)][n(299)](),i.alreadyRead=i[n(557)],i;if(0===u)return null;o[n(503)](n(1394),"Getting sample #"+t+n(680)+i[n(1431)]+n(1127)+(i.offset+i.alreadyRead-r[n(1230)])+n(288)+u+" full size: "+i[n(557)]+")"),c.memcpy(i[n(482)][n(1421)],i[n(1431)],r,i[n(1324)]+i[n(1431)]-r[n(1230)],u),i[n(1431)]+=u,r[n(1210)]+=u,this[n(1403)].logBufferLevel()}},g[s(1432)][s(1330)]=function(e,t){var r=s,n=e[r(329)][t];return n.data?(this[r(850)]-=n[r(557)],n.data=null,n[r(861)]=null,delete n[r(755)],delete n[r(532)],delete n[r(1373)],delete n[r(387)],delete n[r(390)],delete n[r(450)],delete n[r(1425)],delete n.moof_number,delete n[r(261)],delete n[r(673)],delete n.cts,delete n[r(445)],delete n[r(1324)],delete n[r(557)],delete n[r(927)],delete n[r(330)],n[r(1431)]=0,n[r(557)]):0},g[s(1432)].getAllocatedSampleDataSize=function(){return this[s(850)]},g[s(1432)][s(817)]=function(){var e=s;const t=this[e(1403)][e(1385)]||[];let r=0;return t[e(981)]((t=>{const n=t[e(449)];r+=n})),r},g[s(1432)][s(881)]=function(){var e,t=s,r="";for(e=0;e0&&(r+=","),r+=this.moov[t(1245)][e][t(295)][t(1071)][t(821)][t(970)][t(705)][0][t(1410)]()}return r},g[s(1432)][s(865)]=function(e){var t,r=s;if(!this[r(651)]||!this[r(651)].mvex)return null;for(t=0;t0&&(r[n(756)]=a.ipro[n(1057)][a.iinf[n(333)][e][n(1086)]-1]),a.iinf[n(333)][e][n(418)]?r[n(1395)]=a[n(772)][n(333)][e][n(418)]:r.type=n(716),r[n(1164)]=a[n(772)].item_infos[e][n(1164)],r[n(324)]=a[n(772)][n(333)][e].content_encoding;if(a[n(1213)])for(e=0;e0&&f[n(822)]-1-1))return null;var l=(t=this[n(1403)][n(1385)][u])[n(449)]-(a[n(1324)]+a[n(1431)]-t.fileStart);if(!(a[n(271)]-a[n(1431)]<=l))return o[n(503)](n(1394),"Getting item #"+e+" extent #"+i+n(680)+a[n(1431)]+n(1127)+(a[n(1324)]+a[n(1431)]-t[n(1230)])+n(288)+l+n(519)+a[n(271)]+n(764)+r[n(557)]+")"),c[n(1333)](r[n(482)][n(1421)],r[n(1431)],t,a[n(1324)]+a[n(1431)]-t.fileStart,l),a[n(1431)]+=l,r.alreadyRead+=l,t[n(1210)]+=l,this[n(1403)][n(299)](),null;o[n(503)](n(1394),n(757)+e+n(1417)+i+n(442)+a[n(1431)]+n(1127)+(a[n(1324)]+a[n(1431)]-t[n(1230)])+n(288)+(a[n(271)]-a.alreadyRead)+n(519)+a.length+n(764)+r[n(557)]+")"),c[n(1333)](r[n(482)].buffer,r[n(1431)],t,a[n(1324)]+a.alreadyRead-t[n(1230)],a[n(271)]-a.alreadyRead),t[n(1210)]+=a[n(271)]-a[n(1431)],this[n(1403)][n(299)](),r[n(1431)]+=a.length-a[n(1431)],a[n(1431)]=a[n(271)]}}return r[n(1431)]===r[n(557)]?r:null},g[s(1432)][s(1443)]=function(e){var t=s,r=this[t(635)][e];if(r[t(482)]){this[t(1236)]-=r[t(557)],r[t(482)]=null,r[t(1431)]=0;for(var n=0;n0?this[i(651)][i(1245)][e].samples[0][i(330)]:0),t[i(435)](n)}return t},g[s(1432)][s(416)]=function(){var e=s,t={};return t[e(651)]=this.moov,this.moov&&this[e(651)][e(1245)]&&this[e(651)][e(1245)][e(271)]>1&&(t[e(1089)]=this[e(651)][e(1245)][0][e(329)][e(271)],t.moovVideoNum=this[e(651)][e(1245)][1][e(329)][e(271)]),t},h[s(1018)][s(1432)][s(1494)]=function(e){var t=s;this.size+=8,this[t(557)]>u&&(this[t(557)]+=8),this[t(1395)]===t(768)&&(this.size+=16),e.log(e.indent+t(1184)+this.size),e[t(370)](e[t(275)]+t(587)+this[t(1395)])},h[s(469)].prototype.printHeader=function(e){var t=s;this.size+=4,h[t(1018)][t(1432)][t(1494)][t(499)](this,e),e[t(370)](e[t(275)]+t(1045)+this.version),e[t(370)](e[t(275)]+t(973)+this.flags)},h.Box[s(1432)][s(776)]=function(e){this[s(1494)](e)},h.ContainerBox[s(1432)].print=function(e){var t=s;this[t(1494)](e);for(var r=0;r>8)),e[t(370)](e[t(275)]+t(555)+this[t(977)][t(337)](", ")),e[t(370)](e.indent+"next_track_id: "+this[t(862)])},h[s(1202)].prototype[s(776)]=function(e){var t=s;h[t(469)][t(1432)][t(1494)].call(this,e),e.log(e[t(275)]+t(829)+this.creation_time),e[t(370)](e[t(275)]+t(905)+this[t(379)]),e[t(370)](e[t(275)]+t(1173)+this.track_id),e[t(370)](e[t(275)]+t(1172)+this[t(330)]),e[t(370)](e[t(275)]+t(706)+(this[t(463)]>>8)),e[t(370)](e[t(275)]+t(555)+this.matrix[t(337)](", ")),e[t(370)](e[t(275)]+t(816)+this[t(1063)]),e[t(370)](e[t(275)]+t(561)+this[t(588)]),e[t(370)](e[t(275)]+t(520)+this.width),e[t(370)](e[t(275)]+t(1088)+this[t(1240)])};var _={};_[s(800)]=function(e,t){var r=s,n=void 0===e||e,i=new g(t);return i[r(340)]=!n,i},s(1153)!==s(1212)&&(t[s(800)]=_[s(800)])}));function wo(){var e=["schema_location","dataView","colorSpace","dynamicSize","end","LiveServerManifest","num_bytes_constraint_info","edts","moofs","extents","trunBox","uri ","bits_per_channels","dOps"," not found in buffered data","co64Box","hdlrBox","createFragment"," for sample ","wvtt","readFloat32Array","item_ID","mjpg","default_isProtected","primary","base_data_offset","subSeqDirectionFlag","smhd","pdin","SEEKTABLE","horizOffD","createFullBoxCtor","setInt32","hev1","av01SampleEntry","onMoovStart","channel_indexes","write","component_little_endian","image_width","initialize","version of iloc box not supported","nextSample","sample_groups_info","initializeSegmentation","TRUN_FLAGS_FLAGS","_trimAlloc","av1C","getPrimaryItem","hasItem","data_reference_index","major_brand","DIFF_BOXES_PROP_NAMES","isEos","Descriptor","position","sent","5076222gEAmEn","createSingleSampleMoof","maxr","parseSample","vertresolution","info","attribute_list","padb","getUint32","offset","brst","fieldOrdering","stereo_scheme","float64","length_size_of_sample_num","releaseSample","u16stringle","getSampleRate","memcpy","tx3g","samplesize","ptl_present_flag","mha1","tkhd","nclx","Error reading base offset size","Metadata","co64","stdp","description_length","nalu_arrays","videoFullRangeFlag","Subtitle","vmhd","avs3","parseFullHeader","kindBox","writeStruct","subBoxNames","writeInt16","byteOffset","tfhdBox","BoxWriter","schm","levels","track_ID","avc1","baseMediaDecodeTime","transferCharacteristics","referenced_size","ind_subs","initial_delay","trefBox","style_record","writeInt8","numMetadataBlocks","matrixCoefficients","Repositioning parser at buffer position: ","description_index","vertical_justification","resources","ftyp","traf_number","writeFooter","ptl_multilayer_enabled_flag","auxiliary_mime_types","component_type_urls","itemListBuilt","cttsBox","first_sample_index","buffers","presentation_time","sample_sizes","AVCProfileIndication","cleanApertureHeightD","media_time","videoTracks","message_data","avcC","ISOFile","type","stsz","onSegment","tsyn","level","payloadID","chunk_offsets","getHeight","stream","whitePointChromaticity_y","num_output_samples","ext","num_channels","parseHex16","ChannelMapping","getCodec","mime_format","default_sample_description_index","rate","sttsBox","dataview","VisualSampleEntry"," extent #"," of size ","balance","string","buffer","stsc","chroma_subsampling_x","unsetExtractionOptions","is_sync","bit_depth_chroma_minus8","colr","movie_duration","ref_track_id","dmed","alreadyRead","prototype","writeUint32","Found ","video","entry_count","entry_index","ctts","bufferSizeDB","vertOffN","subtitles","equal","releaseItem","createEntityToGroupCtor","float32be","SAP_type","mdats","iods","index_size","lastValidSample","getLength","constant_IV_size","&","hvt1","prdi","num_sublayers","printRanges","samples_per_chunk","skew_factor","TFHD_FLAG_BASE_DATA_OFFSET","starts_with_SAP","shadowed_sample_numbers","stszBox","parallelismType","AudioSampleEntry","kid","defineProperty","bad_pixel_row","sgpds","target_rate_share","onSidx","eqiv","esds"," of size: ","avcDecoderConfigRecord","warn","initial_presentation_delay_minus_one","mapFloat64Array","concat","auxC","CoupledCount","getPosition","readUint16","d4807ef2ca3946958e5426cb9e46a79f","error","max_picture_height","scheme_uri","vvi1SampleEntry","boxes","releaseUsedSamples","getOTI","TFHD_FLAG_DEFAULT_BASE_IS_MOOF","replace","printHeader","bit_rate_code","default_skip_byte_block","mvhd","number_in_traf","udta","parseOneDescriptor","properties","correction_applied","readUint32Array","trun","nativeToEndian","iprp","indexOf","length","depth","buildTrakSampleLists","isVideo","indent","initial_presentation_delay_present","readySent","bitDepth","createMediaSampleEntryCtor","setUint32","TRUN_FLAGS_DATA_OFFSET","writeHeader","pow","enof","TrackReferenceTypeBox","oti","codecIntializationData"," read size: ","mhm2","moovStartFound","priority","period","hmhd","dvh1","mdia","senc","data_rate","sample_flags","logBufferLevel","j2kH","mehdBox","SampleEntry","msrc","iloc","isProtected","decode","avgBitRate","createUUIDBox","uint16be","trpy","writeInt32","num_dep_sub","getEndPosition","num_total_samples","sample_groups","block_pad_lsb","sbgpBox","hasIncompleteMdat","row_align_size","width","_dynamicSize","fromCharCode","isAudio","content_encoding","component_format","leastDecodeToDisplayDelta","sizePosition","saveParsePosition","samples","duration","save","truns","item_infos","hdr_size","isFragmented","Exporting on track #","join","sample_rate","createTrackGroupCtor","discardMdatData","leva","tele",'video/mp4; codecs="',"maximum_bitrate","DIFF_PRIMITIVE_ARRAY_PROP_NAMES","seq_tier_0","fr-FR","displayFlags","pasp","nb_PPS_nalus","samplerate","group_id","subsegment_duration","writeInt8Array","lastMoofIndex","vide","TFHD_FLAG_SAMPLE_DESC","URL","chan_loc","encode","getAudioConfig","all_ref_pics_intra","TRUN_FLAGS_SIZE","tref","hdlr","clli","nextMoofNumber","slice","ispe","log","writeUint16Array","seq_level_idx_0","ftypBox","first_dts","initialized","_byteLength","flush","tmax","modification_time","hev1SampleEntry","583825ZOCDRm","moof_offset","modified","split","prol","item_uri_type","has_redundancy","TRUN_FLAGS_FIRST_FLAG","chunk_index","is_depended_on",", size ","schi","Per_Sample_IV_Size","edits","addTrack","pitm","channel_types","altr","description_boxes","_byteOffset","media_rate_integer","dref","stcoBox","used","writeType","writeUint16","default_sample_size","associations","encs","SAMPLE_ENTRY_TYPE_VISUAL","default_KID","avc4","scheme_type","nb_SPS_nalus","hvcC","getPerformanceInfo","first_output_sample","item_type","urn "," - Length: ","absolute_duration","extent_offset","tile_align_size","props","hasIOD","SAMPLE_ENTRY_TYPE_SYSTEM","alst","config","presentation_time_delta","held_bits","sample_duration","Not enough bytes left in the parent box to parse a UUID box","ABCDEFGHIJKLMNOPQRSTUVWXYZ234567","getUint16","push","getInt32","SAMPLE_ENTRY_TYPE_AUDIO","iso4","stsh","SPS","Adjusting box "," data (alreadyRead: ","fragmentedTracks","5005205eathcJ","dts","Track created with MP4Box.js"," full size: ","DecoderSpecificInfo","byteLength","is_leading","Hint","itemId","getChannelCount","UUIDs","aux_info_type_parameter"," f=","und","failurePosition","avc2",'audio/mp4; codecs="',"d08a4f1810f34a82b6c832d8aba183d3","uint16","volume","layerNumber","bad_pixel_column","metadataTracks"," bytes), continuous ranges: ","avll","FullBox","sampling_type","floor","_dataView","avcCBox","ES_Descriptor","default_crypt_byte_block","u16stringbe","minor_version","maxFALL","getTrackSample","parseLanguage","imir","data","assignment_type","offset_size","first_sample_flags","time","box_record","general_constraint_info","checkBuffer","albc","system_id","uint32","getMetaHandler","readString","default_IV_size","drefBox","SAP_delta_time","fragment_duration","call","readInt16Array","' and size ","writeUint64","debug","dvhe","appendChild","chroma_format_idc","ChannelMappingFamily","otherTracks","data_offset","principal_point_x","tfhd","ptl_multilayer_enabled","clef","resetTables","sub_track_id","vipr","seig","DataStream"," full extent size: ","width: ","completeness","npck","general_level_idc","TKHD_FLAG_ENABLED","vvc1","tfdt","getText","ipco","lsel","stvi","<","depends_on","rinf","vvcN","prft","compatible_brands","MPEG4DescriptorParser","Position ","processItems","BYTES_PER_ELEMENT","parseDataAndRewind","transfer_characteristics","txtC"," (total: ","general_tier_flag","APPLICATION","white_point","encm","isMetadata","FULL_BOXES","user","readInt method not implemented for size: ","length_size_of_trun_num","function","matrix: ","mfhd","size","sample_deltas","sample_depends_on","writeUint24","alternate_group: ","ContainerBox","readUint","track_width","schemeURI","readUint8","elstBox","writeFloat64","hvc1SampleEntry","writeCString","float32","parseHeader","component_align_size","component_bit_depth_minus_one"," v=","rtpmap_string","hinf","writeUint8","SampleGroupEntry","constantFrameRate","bxml","step_count",".CA","createBoxCtor","cleanApertureHeightN","isEof","type:","alternate_group","esd","readInt32Array","from_item_ID","sidxSent","quat_z","avc3","cmex","avc2SampleEntry","max_ref_per_pic","nmhd","seekPoints","ICC_profile","mdat","XMLSubtitlein4Parser","stscBox","seq_profile","stsdBox","getSampleSize","addUsedBytes","splice","createEncryptedSampleEntryCtor","vvi1","getEndFilePositionAfter","focal_length_x","cleanBuffers","CUESHEET","getWidth","setUint16","field_size","construction_method","sampleListBuilt","max_content_light_level","channel_associations","handler","writeFloat32Array","sgpdBox","int32be","subs","num_bad_cols","value","addSample","namespace","compressorname","sidxBox","tag","layer_id","items","bufferSize","moovStartSent","sample_composition_time_offset","updateSampleLists","getTrackById","unsetSegmentOptions","6d1d9b0542d544e680e2141daff757b2","mapFloat32Array","a5d40b30e81411ddba2f0800200c9a66","TRUN_FLAGS_DURATION","sdptext","mvex","prof","data_offset_position","SingleItemTypeReferenceBox","moov","target","readInt8","writeString","sync_sample_numbers","padbits","avss","vvs1","_self","SAMPLE_ENTRY_TYPE_TEXT","quat_y","parseFooter","mett","primaryRChromaticity_x","setFloat64","horizresolution","mergeNextBuffer","processSamples","grouping_type_parameter","'","max","default_sample_duration","timescale","mdatBox","initial_duration","stssBox","bytes","nextSeekPosition","dinf"," partial data (alreadyRead: ","item_protection_index","SAMPLE_ENTRY_TYPE_HINT","graphicsmode","default_constant_IV_size","opcolor","readUint64","readUint16Array","bufferIndex","general_profile_compatibility","flipArrayEndianness","metx","sample_description_index","Opus","sample_info_size","UUIDBoxes","Stream ready for parsing","set","media_rate_fraction","fiel","add","angle","8974dbce7be74c5184f97148f9882554","max_pic_average_light_level","parseOneBox","entries","volume: ","No more buffer in memory","image_height","ES_ID","SAMPLE_ENTRY_TYPE_SUBTITLE","strk","getTrackDuration","pos_y","isFragmentationInitialized","extension_type","mime","sample_has_redundancy","bit_depth_luma_minus8","initSampleGroups","grouping_type","process_sdtp","_buffer","boxEqual","sampleProcessingStarted","flags","tpyl","vp08SampleEntry","layer_size","flattenItemInfo","full_range_flag","tracks","strd","available_bitrate","createSampleEntryCtor","switch_group","ipro","getSample","segmentStream","isProgressive","chroma_subsampling_y","configurationVersion","cts_shift","styp","elng","stsg","setAttribute","TRUN_FLAGS_CTS_OFFSET","roll","avgBitrate","ranges","default_constant_IV","num_held_bits","a1lx","createObjectURL","degradation_priority","protection","Getting item #","kinds","nextParsePosition","start","quat_x","2036949LqamcY","movie_timescale"," full item size: ","AVCLevelIndication","ec-3","DataStream.save: Can't create object URL.","uuid","ccst","references","essential","iinf","BIG_ENDIAN","dmax","smhdBox","print","principal_point_y","parseUUID","Allocating item #","ptl_sublayer_present_mask","meco","packetssent","onError","sthd","ols_idx","component_index","primaryRChromaticity_y","tags","System","stco","OutputChannelCount","CoLL","matrix_coefficients","emsgBox","moof","whitePointChromaticity_x","3063732TzqCWA","display_primaries","constant_IV","createFile","setExtractionOptions","PPS","op_index","metadata","extractedTracks","getTrackSamplesInfo","sbpm","application/xml","test","fromCharCodeUint8","default_sample_info_size","stream_read_1_bytes","vvc1SampleEntry","getTime","min","layer: ","getStreamBufferSize","readInt32","mfro","processIncompleteBox","stbl","property_index","createCommonjsModule","stts","getBuffer","stream_read_2_bytes","general_sub_profile_idc","accurateStatisticsFlag","creation_time: ","has_unparsed_data","range_size","intra_pred_used","2wgoVmK","toString","mp4a","Found Sample Groups of type ","Removing buffer #","nalu","base_offset","sbgp","bsid","lengthSizeMinusOne","bad_pixels","skip_byte_block","reduceBuffer","sample_count","setInt16","2403275rAbpjb","setNextSeekPositionFromSample","samplesDataSize","data_format",", column: ","adjustUint32","saiz","hvc1","BoxParser","shift","mfra","PICTURE","seekTrack","description","next_track_id","track_ids",'"; profiles="',"getTrexById","mapUint32Array","traf","mapUint16Array"," at position ","stpp"," with new size ","SLConfigDescriptor","wbbr","mehd","sample_number","ipmas","Buffer must have a fileStart property","Sending samples on track #","profile","stop","getCodecs","vpcC","readInt64","operation_point_count","scif","cslgBox","sample_offsets","kind","sample_delta","readUint24","revokeObjectURL","moofBox","msg","addEntry","hevcDecoderConfigRecord","uint16le","tmin","isSubtitle","readUint32","bad_columns","u16string","stri","entity_groups","sbgps","modification_time: ","idat","stss","event_duration","block_size","first_chunk"," sample #","rate: ","mapInt16Array","focal_length_y","nalu_type","constant_frame_rate","NAL_unit_type","writeFloat32","int32le","hintTracks","irot","scheme_id_uri","endianness","OCR_ES_ID","compositionStartTime","parseRemainingDescriptors","track_id","tfdtBox","sdp ","nb_samples","Error reading extent index","writeInitializationSegment","segment_duration","unpack","float64be","Textin4Parser","urn Box","rICC","computeSize","name","fragment_description","writeUint8Array","parse","int16be","number","seekLists","sample_size","vmhdBox","saio","Getting sample #","absolute_time","notice","TrackGroupTypeBox","setSampleGroupProperties","default_Per_Sample_IV_Size","interleave_type","sdtp","sublayer_level_idc","_sweep","configOBUs","durationFlag","insertBuffer","location","default_length","updateUsedBytes","TKHD_FLAG_IN_MOVIE","CONTAINER_BOXES","VORBIS_COMMENT","int16","stsd","onReady","luminanceMin","flags:","hasMoov","pos_x","Writing box ","matrix","chromaSubsampling","acmod","pano","forEach","subsegments","getBoxes","monochrome","tyco","Not enough data in stream to parse the type and size of the box","mapInt8Array","MP4Box","5478432eGtFxc","SAMPLE_ENTRY_TYPE_METADATA","avgRateFlag","first_traf_merged","cmpd","a1op","to_item_ID","cts","isHint","mdhdBox","num_leading_samples","reference_type","stz2","documentString","SingleItemTypeReferenceBoxLarge","item_id","nonamespace","sidx","avg_frame_rate","Log","Needs an array buffer","etyp","reserved","sync","upStream","Descriptor ","getFloat64","mdhd","Found position in existing buffer #","Box","Generating initialization segment","nbSamples","discardable","document","uncC","findDescriptor","numTemporalLayers","avgFrameRate","bytessent","sample_counts","mere","getDescriptorName","stereo_indication_type","Error accessing position in the MultiBufferStream","box","avc1SampleEntry","padding_flag","compositionEndTime","moovBox","sample_numbers",""","last_sample_in_run","PADDING","tscl","btrt","subsamples","version:","lang","readInt8Array","setUint8","addBox","cprt","first_offset","restoreParsePosition","body","reference_ID","is_fragment","extent_length","protections","item_name","version","codec","trexs","component_types","layer","num_ind_sub","createContainerBoxCtor","entity_ids","sample_offset","sequence_number","fragment_count","codec_specific_parameters","minf","samples_size","text","MultiBufferStream","hvcCBox","TKHD_FLAG_IN_PREVIEW","_size","colourPrimaries","Text","readInt16","createSampleGroupCtor","aux_subtype","setFloat32","trak","meta","protection_index","readAnyInt","height: ","moovAudioNum","DecoderConfigDescriptor","horizOffN","subSequenceIdentifier","vvcC","creation_time","dec3","extract_bits","Allocating sample #","_realloc","ac-4","init","frame_count","], [","language","mapUint8Array","luminanceMax","primaryBChromaticity_x","apply","minimum_bitrate","stxtSampleEntry","cleanApertureWidthN","length_size","LITTLE_ENDIAN","general_profile_space","aux_type","writeFloat64Array","ipma","destroy","MP4BoxStream","onItem","earliest_presentation_time","ASCII","trafs","general_profile_idc","languageString","profile_compatibility","writeInt32Array"," offset: ","ptl_num_sub_profiles","bitrate","audio","descs","scnm","subtitleTracks","getItem","pad_unknown","chunk_run_index","href","download","mvhdBox","skip","getInfo","default_AlgorithmID","iref","getDurationString","parsingMdat","rapAlignement","compositionToDTSShift","fobr"," on track #","writeUCS2String","aux_info_type","ptl_frame_only_constraint","object","extended_language","codecIntializationDataSize","sampleEntryCodes","appendBuffer","avc3SampleEntry","readCString","pos_z","arrayToNative","Not enough bytes in buffer","TFHD_FLAG_SAMPLE_DUR","content_type","brands","cslg","timescale: ","length_size_of_traf_num","high_bitdepth","BASIC_BOXES","max_picture_width","duration: ","track_id: ","sample_is_depended_on","roll_distance","descriptionformat","code","primaryBChromaticity_y","readUint8Array","xml ","charCodeAt","component_count","mapInt32Array","size:","decimalToHex","streamType","audioTracks","tenc","fscod","parseConfig","bad_rows","trex","av01","MetadataSampleEntry","ERR_NOT_ENOUGH_DATA","item_count","payl","tsas","lastBoxStartPosition","onSamples","seek","tkhdBox","channel_count","slid","free","enct","getInt8","axis","tfra","usedBytes","transferFunction","undefined","grpl","TFHD_FLAG_SAMPLE_FLAGS","uint32be","hSpacing","ArrayBuffer","num_bad_rows","scheme_version","lfeon","mhm1","Visual","colour_type","mjp2","SubtitleSampleEntry","extent_index","findPosition","ptl_frame_only_constraint_flag","samples_duration","fileStart","sgpd","rap ","boxEqualFields","aebr",'application/mp4; codecs="',"itemsDataSize","getUint8","base_offset_size","addSubBoxArrays","height","num_bad_pixels","STREAMINFO","bsmod","general_constraint_indicator","traks","getInt16","default_sample_flags","findEndContiguousBuf","writeUint32Array","favc","group_description_index","temporalIdNested","reserved_2","num_entities_in_group"," stored buffer(s) (","stshBox","TFHD_FLAG_SAMPLE_SIZE"];return(wo=function(){return e})()}function So(e,t){var r=wo();return(So=function(e,t){return r[e-=259]})(e,t)}function Io(e,t){const r=Ao();return(Io=function(e,t){return r[e-=390]})(e,t)}function Ao(){const e=["7064649isDhun","62070BiMSpA","init","24BXrkBt","1147918apmQBk","stack overflow","wasm not supported","debugLog","catch","433668oonNRK","Module","init error","instantiate","134VfIxkD","map","memory","parse","TAG_NAME","debugWarn","instance","function","reduce","exports","3156848wNSqfs","player","debuglog","10wZPsJk","then","every","Instance","message","slice","55tMnnOP","6613783zdNtmH","object","936943fMCSlw","length","byteLength","Memory","destroy"];return(Ao=function(){return e})()}function Eo(){const e=ko;for(var t=arguments[e(213)],r=new Array(t),n=0;n{const n=e,s=new i((0|t[n(231)])+(0|r[n(231)]));return s[n(229)](t,0),s[n(229)](r,0|t[n(231)]),s}),new i)}function ko(e,t){const r=Co();return(ko=function(e,t){return r[e-=213]})(e,t)}function Co(){const e=["291489SloKHn","12CAYgSE","replace","353738RVHoby","reduce","48LLqfRP","set","135kLBFZX","byteLength","length","687560ouFqnp","error","759715axsyuI","constructor","substr","69593jvRYRv","2280831KdMHvC","8901541Ifzqrw","10JrGrDX"];return(Co=function(){return e})()}function To(e,t){const r=$o();return(To=function(e,t){return r[e-=295]})(e,t)}bo.Log,bo[_o(1118)],bo[_o(518)],bo.MultiBufferStream,bo.MPEG4DescriptorParser,bo.BoxParser,bo[_o(602)],bo.Textin4Parser,bo[_o(1394)],bo[_o(800)],function(e,t){const r=Io,n=e();for(;;)try{if(732039===parseInt(r(423))/1+parseInt(r(392))/2*(parseInt(r(420))/3)+-parseInt(r(402))/4+parseInt(r(411))/5*(-parseInt(r(428))/6)+parseInt(r(414))/7*(-parseInt(r(422))/8)+-parseInt(r(419))/9*(-parseInt(r(405))/10)+-parseInt(r(412))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ao),function(e,t){const r=ko,n=e();for(;;)try{if(954421===parseInt(r(219))/1+parseInt(r(226))/2+parseInt(r(223))/3*(parseInt(r(228))/4)+parseInt(r(216))/5*(-parseInt(r(224))/6)+parseInt(r(220))/7+-parseInt(r(214))/8*(parseInt(r(230))/9)+parseInt(r(222))/10*(parseInt(r(221))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Co),function(e,t){const r=To,n=e();for(;;)try{if(993536===parseInt(r(313))/1+-parseInt(r(311))/2*(parseInt(r(324))/3)+-parseInt(r(305))/4*(-parseInt(r(307))/5)+parseInt(r(300))/6*(parseInt(r(326))/7)+-parseInt(r(328))/8+-parseInt(r(295))/9*(-parseInt(r(312))/10)+parseInt(r(320))/11*(-parseInt(r(329))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}($o);const xo=16,Do=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Bo=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Po(e){const t=To,r=[];for(let n=0,i=e[t(316)];n{const r=t;return 1===(e=e[r(301)](16))[r(316)]?"0"+e:e})).join("")}function Uo(e){const t=To,r=[];for(let n=0,i=e.length;n>>6),r[t(310)](128|63&i);else if(i<=55295||i>=57344&&i<=65535)r[t(310)](224|i>>>12),r[t(310)](128|i>>>6&63),r.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw r.push(i),new Error(t(296));n++,r[t(310)](240|i>>>18&28),r[t(310)](128|i>>>12&63),r[t(310)](128|i>>>6&63),r.push(128|63&i)}}return r}function Fo(e){const t=To,r=[];for(let n=0,i=e[t(316)];n=240&&e[n]<=247?(r[t(310)](String[t(318)](((7&e[n])<<18)+((63&e[n+1])<<12)+((63&e[n+2])<<6)+(63&e[n+3]))),n+=3):e[n]>=224&&e[n]<=239?(r[t(310)](String[t(318)](((15&e[n])<<12)+((63&e[n+1])<<6)+(63&e[n+2]))),n+=2):e[n]>=192&&e[n]<=223?(r[t(310)](String.fromCodePoint(((31&e[n])<<6)+(63&e[n+1]))),n++):r.push(String[t(318)](e[n]));return r[t(317)]("")}function Ro(e,t){const r=31&t;return e<>>32-r}function Lo(e){return(255&Do[e>>>24&255])<<24|(255&Do[e>>>16&255])<<16|(255&Do[e>>>8&255])<<8|255&Do[255&e]}function Oo(e){return e^Ro(e,2)^Ro(e,10)^Ro(e,18)^Ro(e,24)}function zo(e){return e^Ro(e,13)^Ro(e,23)}function No(e,t,r){const n=new Array(4),i=new Array(4);for(let t=0;t<4;t++)i[0]=255&e[4*t],i[1]=255&e[4*t+1],i[2]=255&e[4*t+2],i[3]=255&e[4*t+3],n[t]=i[0]<<24|i[1]<<16|i[2]<<8|i[3];for(let e,t=0;t<32;t+=4)e=n[1]^n[2]^n[3]^r[t+0],n[0]^=Oo(Lo(e)),e=n[2]^n[3]^n[0]^r[t+1],n[1]^=Oo(Lo(e)),e=n[3]^n[0]^n[1]^r[t+2],n[2]^=Oo(Lo(e)),e=n[0]^n[1]^n[2]^r[t+3],n[3]^=Oo(Lo(e));for(let e=0;e<16;e+=4)t[e]=n[3-e/4]>>>24&255,t[e+1]=n[3-e/4]>>>16&255,t[e+2]=n[3-e/4]>>>8&255,t[e+3]=255&n[3-e/4]}function Ho(e,t,r){const n=new Array(4),i=new Array(4);for(let t=0;t<4;t++)i[0]=255&e[0+4*t],i[1]=255&e[1+4*t],i[2]=255&e[2+4*t],i[3]=255&e[3+4*t],n[t]=i[0]<<24|i[1]<<16|i[2]<<8|i[3];n[0]^=2746333894,n[1]^=1453994832,n[2]^=1736282519,n[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=n[1]^n[2]^n[3]^Bo[r+0],t[r+0]=n[0]^=zo(Lo(e)),e=n[2]^n[3]^n[0]^Bo[r+1],t[r+1]=n[1]^=zo(Lo(e)),e=n[3]^n[0]^n[1]^Bo[r+2],t[r+2]=n[2]^=zo(Lo(e)),e=n[0]^n[1]^n[2]^Bo[r+3],t[r+3]=n[3]^=zo(Lo(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function jo(e,t,r){const n=To;let{padding:i=n(314),mode:s,iv:o=[],output:a="string"}=arguments[n(316)]>3&&void 0!==arguments[3]?arguments[3]:{};if(s===n(319)&&(typeof o===n(297)&&(o=Po(o)),16!==o.length))throw new Error(n(303));if(typeof t===n(297)&&(t=Po(t)),16!==t[n(316)])throw new Error(n(321));if(e=typeof e===n(297)?0!==r?Uo(e):Po(e):[...e],(i===n(299)||i===n(314))&&0!==r){const t=xo-e[n(316)]%xo;for(let r=0;r=xo;){const t=e[n(304)](h,h+16),i=new Array(16);if("cbc"===s)for(let e=0;e2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=e[r(327)];let o=new Uint8Array(e.slice(0,5)),a=5;for(;as){const t=new Uint8Array(o[r(316)]+e[r(316)]-a);t[r(302)](o,0),t.set(e.slice(a),o[r(316)]),o=t;break}let l=e[a+4],d=!1,h=2;if(n?(i&&(h=3),l=l>>>1&63,d=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][r(308)](l)):(l&=31,d=1===l||5===l),d){const n=jo(e[r(304)](a+4+h,a+4+u),t,0,{padding:r(331),output:r(323)});let i=n[n[r(316)]-1];if(i>0&&i<16){let e=!0;for(let t=1;t<=i;t++)if(n[n.length-t]!==i){e=!1;break}e&&n[r(309)](n[r(316)]-i,i)}const s=new Uint8Array(h);s[r(302)](e[r(304)](a+4,a+4+h),0);const c=At(Eo(s,new Uint8Array(n))),l=new Uint8Array(o.length+c.length);l[r(302)](o,0),l.set(c,o[r(316)]),o=l}else{const t=e.slice(a+4,a+4+u),n=new Uint8Array(o[r(316)]+4+t[r(316)]);n.set(o,0),n[r(302)](c,o.length),n[r(302)](t,o.length+4),o=n}a=a+4+u}return o}function $o(){const e=["byteLength","14596224BLlfyg","20971884TUDzwC","error","none","1053ZrWCol","input is not supported","string","arrayBuffer.length","pkcs#5","78JlroAI","toString","set","iv is invalid","slice","34660WQHjEk","padding is invalid","955IJnPEh","includes","splice","push","308uOptTY","13820agxBAm","1955105vaQTeJ","pkcs#7","codePointAt","length","join","fromCodePoint","cbc","11wkFpIJ","key is invalid","map","array","15537uQiPyC","substr","856947FXjhzw"];return($o=function(){return e})()}const Go=qo;function qo(e,t){const r=Jo();return(qo=function(e,t){return r[e-=399]})(e,t)}!function(e,t){const r=qo,n=e();for(;;)try{if(450721===-parseInt(r(404))/1+-parseInt(r(402))/2*(-parseInt(r(409))/3)+-parseInt(r(403))/4+-parseInt(r(401))/5+parseInt(r(400))/6*(parseInt(r(412))/7)+-parseInt(r(413))/8+parseInt(r(410))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Jo);class Ko{on(e,t,r){const n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this}once(e,t,r){const n=this;function i(){const s=qo;n.off(e,i);for(var o=arguments[s(411)],a=new Array(o),c=0;c1?n-1:0),s=1;s{delete n[e]})),void delete this.e;const i=n[e],s=[];if(i&&t)for(let e=0,n=i[r(411)];e=2&&!this[r(340)];)if(255==this.tempBuffer[this[r(357)]]){if(!(!1&this[r(358)][this[r(357)]+1])){this[r(354)]=this[r(358)][this.parsedOffset+1],this.state=Qo[r(362)],this[r(342)]=this[r(357)],this[r(357)]+=2,e=!0;break}this[r(357)]++}else this[r(357)]++;if(e)continue;break}if(this[r(348)]==Qo[r(362)]){let e=!1;for(;this[r(358)].length-this[r(357)]>=2&&!this[r(340)];)if(255==this[r(358)][this[r(357)]]){if(this[r(358)][this[r(357)]+1]==this[r(354)]){this[r(348)]=Qo[r(347)],this[r(349)]=this[r(357)],this[r(357)]+=2,e=!0;break}this[r(357)]++}else this[r(357)]++;if(e)continue;break}if(this[r(348)]==Qo.findSecondStartCode){let e=this[r(358)][r(356)](this[r(342)],this.secondStartCodeOffset);this[r(339)]("data",e,t),this.tempBuffer=this[r(358)].slice(this[r(349)]),this[r(342)]=0,this.parsedOffset=2,this.state=Qo[r(362)]}}}}function ta(e,t,r){const n=ra;for(let i=2;i3&&void 0!==arguments[3]&&arguments[3];const s=e[n(137)];let o=5;for(;os)break;let c=e[o+4],u=!1;if(i?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(141)](c)):(c&=31,u=1===c||5===c),u){const i=ta(e[n(138)](o+4,o+4+a),t,r);e[n(145)](i,o+4)}o=o+4+a}return e}function sa(){const e=["2665329ADMXIn","8qXKBPG","3368150DZXAZS","395444ksGpLh","4pktVSw","4980372OVxhOw","byteLength","slice","length","978KabTru","includes","85kLGsky","7283187kdtlBP","22ArqkoH","set","1061hTuPpN","200358hVwCYL"];return(sa=function(){return e})()}function oa(e,t,r){const n=ra;if(e[n(137)]<=30)return e;const i=ta(e.slice(30),t,r);return e[n(145)](i,30),e}function aa(){var e=["filter","55QKzbEo","length","set","3614568WPAvfs","170VCLtWX","1190WhonUV","211252Cjbwmc","forEach","byteLength","15mwJyPS","30ASYlZN","821781kCgBCV","1148170gAVZEu","154380HwRbWz","1000dwcTqU","8483kheRdS"];return(aa=function(){return e})()}function ca(e,t){var r=aa();return(ca=function(e,t){return r[e-=419]})(e,t)}function ua(){for(var e=ca,t=arguments[e(420)],r=new Array(t),n=0;nt+r[e(427)]),0));let s=0;return r[e(426)]((t=>{i[e(421)](t,s),s+=t.byteLength})),i}!function(e,t){const r=ra,n=e();for(;;)try{if(519391===-parseInt(r(146))/1*(parseInt(r(140))/2)+parseInt(r(148))/3*(-parseInt(r(152))/4)+-parseInt(r(142))/5*(-parseInt(r(147))/6)+parseInt(r(151))/7*(parseInt(r(149))/8)+parseInt(r(143))/9+-parseInt(r(150))/10+-parseInt(r(144))/11*(-parseInt(r(136))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(sa),function(e,t){for(var r=ca,n=e();;)try{if(498539===parseInt(r(434))/1*(-parseInt(r(423))/2)+parseInt(r(428))/3*(parseInt(r(425))/4)+-parseInt(r(431))/5+-parseInt(r(432))/6+-parseInt(r(424))/7*(parseInt(r(433))/8)+parseInt(r(430))/9*(-parseInt(r(429))/10)+parseInt(r(419))/11*(parseInt(r(422))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(aa);const la=da;function da(e,t){const r=fa();return(da=function(e,t){return r[e-=233]})(e,t)}!function(e,t){const r=da,n=e();for(;;)try{if(768716===-parseInt(r(237))/1+-parseInt(r(241))/2+-parseInt(r(242))/3*(-parseInt(r(240))/4)+-parseInt(r(245))/5+parseInt(r(236))/6*(parseInt(r(250))/7)+parseInt(r(244))/8+-parseInt(r(251))/9*(-parseInt(r(238))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fa);class ha{constructor(e){const t=da;this.destroys=[],this[t(243)]=this[t(243)][t(239)](this),this.master=e}[la(243)](e,t,r){const n=la;let i=arguments[n(233)]>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array.isArray(t))return t[n(247)]((t=>this[n(243)](e,t,r,i)));e.addEventListener(t,r,i);const s=()=>{const s=n;Ot(e[s(235)])&&e[s(235)](t,r,i)};return this[n(253)].push(s),s}[la(234)](){const e=la;this[e(248)][e(252)](e(249),e(234)),this[e(253)][e(246)]((e=>e())),this.destroys=[]}}function fa(){const e=["45822RcsWDn","243QwUhae","debugLog","destroys","length","destroy","removeEventListener","18UWZAST","1276666wZepRx","199380XYYpUD","bind","4OqPDYl","614588slNqoe","2578377NDavWw","proxy","10366248eLKMab","1802640zSwUSl","forEach","map","master","Events"];return(fa=function(){return e})()}const pa=va;!function(e,t){const r=va,n=e();for(;;)try{if(702650===parseInt(r(545))/1+parseInt(r(507))/2+-parseInt(r(504))/3+parseInt(r(511))/4+-parseInt(r(530))/5+parseInt(r(554))/6*(parseInt(r(490))/7)+parseInt(r(506))/8*(-parseInt(r(548))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ya);class ma{static[pa(486)](){const e=pa;ma[e(532)]={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(let t in ma[e(532)])ma.types[e(517)](t)&&(ma[e(532)][t]=[t.charCodeAt(0),t[e(540)](1),t[e(540)](2),t[e(540)](3)]);let t=ma.constants={};t[e(527)]=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),t.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),t[e(550)]=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSC=t[e(498)]=t[e(550)],t[e(556)]=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t[e(479)]=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),t.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),t.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),t[e(497)]=new Uint8Array([0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static[pa(501)](e){const t=pa;let r=8,n=null,i=Array.prototype[t(496)].call(arguments,1),s=i.length;for(let e=0;e>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r,n[t(484)](e,4);let o=8;for(let e=0;e>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static[pa(505)](e){const t=pa;return ma[t(501)](ma.types[t(505)],ma[t(474)](e),ma.mdia(e))}static[pa(474)](e){const t=pa;let r=e.id,n=e.duration,i=e[t(480)],s=e[t(555)];return ma[t(501)](ma.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,255&i,0,0,s>>>8&255,255&s,0,0]))}static[pa(510)](e){const t=pa;return ma[t(501)](ma[t(532)][t(510)],ma.mdhd(e),ma[t(515)](e),ma.minf(e))}static[pa(518)](e){const t=pa;let r=e[t(485)],n=e.duration;return ma[t(501)](ma.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]))}static[pa(515)](e){const t=pa;let r=null;return r=e[t(529)]===t(499)?ma.constants[t(536)]:ma[t(500)][t(479)],ma[t(501)](ma[t(532)][t(515)],r)}static[pa(546)](e){const t=pa;let r=null;return r=e[t(529)]===t(499)?ma[t(501)](ma[t(532)][t(539)],ma[t(500)].SMHD):ma[t(501)](ma.types[t(502)],ma.constants.VMHD),ma[t(501)](ma[t(532)][t(546)],r,ma[t(557)](),ma[t(549)](e))}static[pa(557)](){const e=pa;return ma[e(501)](ma[e(532)][e(557)],ma[e(501)](ma[e(532)][e(475)],ma.constants[e(508)]))}static[pa(549)](e){const t=pa;return ma[t(501)](ma[t(532)].stbl,ma[t(494)](e),ma[t(501)](ma.types[t(552)],ma[t(500)][t(550)]),ma[t(501)](ma[t(532)].stsc,ma[t(500)].STSC),ma.box(ma[t(532)][t(512)],ma[t(500)][t(556)]),ma[t(501)](ma.types[t(551)],ma[t(500)][t(498)]))}static[pa(494)](e){const t=pa;return"audio"===e[t(529)]?e[t(519)]===t(558)?ma[t(501)](ma[t(532)][t(494)],ma[t(500)][t(492)],ma[t(558)](e)):ma[t(501)](ma.types.stsd,ma[t(500)][t(492)],ma[t(483)](e)):"avc"===e[t(528)]?ma[t(501)](ma[t(532)][t(494)],ma[t(500)].STSD_PREFIX,ma[t(544)](e)):ma.box(ma[t(532)][t(494)],ma[t(500)][t(492)],ma[t(521)](e))}static[pa(558)](e){const t=pa;let r=e[t(489)],n=e[t(487)],i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return ma[t(501)](ma[t(532)][t(537)],i)}static[pa(483)](e){const t=pa;let r=e[t(489)],n=e[t(487)],i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return ma[t(501)](ma.types.mp4a,i,ma[t(478)](e))}static[pa(478)](e){const t=pa;let r=e[t(531)]||[],n=r[t(482)],i=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n])[t(476)](r).concat([6,1,2]));return ma[t(501)](ma[t(532)][t(478)],i)}static[pa(544)](e){const t=pa;let r=e[t(525)];const n=e.codecWidth,i=e[t(524)];let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return ma[t(501)](ma[t(532)][t(544)],s,ma.box(ma.types.avcC,r))}static[pa(521)](e){const t=pa;let r=e[t(525)];const n=e[t(491)],i=e[t(524)];let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return ma.box(ma[t(532)].hvc1,s,ma[t(501)](ma[t(532)][t(509)],r))}static[pa(535)](e){const t=pa;return ma.box(ma[t(532)][t(535)],ma.trex(e))}static[pa(516)](e){const t=pa;let r=e.id,n=new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return ma[t(501)](ma.types.trex,n)}static moof(e,t){const r=pa;return ma[r(501)](ma[r(532)][r(547)],ma[r(526)](e[r(542)]),ma[r(520)](e,t))}static[pa(526)](e){const t=pa;let r=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return ma.box(ma[t(532)][t(526)],r)}static[pa(520)](e,t){const r=pa;let n=e.id,i=ma[r(501)](ma[r(532)][r(495)],new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),s=ma[r(501)](ma.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),o=ma[r(481)](e),a=ma[r(514)](e,o[r(493)]+16+16+8+16+8+8);return ma[r(501)](ma[r(532)][r(520)],i,s,a,o)}static[pa(481)](e){const t=pa;let r=new Uint8Array(5),n=e[t(533)];return r[4]=n[t(473)]<<6|n[t(513)]<<4|n[t(503)]<<2|n.hasRedundancy,ma[t(501)](ma.types.sdtp,r)}static[pa(514)](e,t){const r=pa;let n=new Uint8Array(28);t+=36,n[r(484)]([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let i=e[r(523)],s=e[r(553)],o=e[r(533)],a=e[r(534)];return n[r(484)]([i>>>24&255,i>>>16&255,i>>>8&255,255&i,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o[r(473)]<<2|o[r(513)],o[r(503)]<<6|o.hasRedundancy<<4|o[r(538)],0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12),ma[r(501)](ma[r(532)].trun,n)}static[pa(522)](e){const t=pa;return ma[t(501)](ma[t(532)].mdat,e)}}function va(e,t){const r=ya();return(va=function(e,t){return r[e-=473]})(e,t)}function ya(){const e=["hasOwnProperty","mdhd","audioType","traf","hvc1","mdat","duration","codecHeight","avcc","mfhd","FTYP","videoType","type","4035260sFHVrb","config","types","flags","cts","mvex","HDLR_AUDIO",".mp3","isNonSync","smhd","charCodeAt","mvhd","sequenceNumber","ftyp","avc1","1308193IlFdbc","minf","moof","63aWHHSs","stbl","STTS","stco","stts","size","12UsEwQX","presentHeight","STSZ","dinf","mp3","isLeading","tkhd","dref","concat","moov","esds","HDLR_VIDEO","presentWidth","sdtp","length","mp4a","set","timescale","init","audioSampleRate","generateInitSegment","channelCount","4170131VDhjhx","codecWidth","STSD_PREFIX","byteLength","stsd","tfhd","slice","SMHD","STCO","audio","constants","box","vmhd","isDependedOn","1743051UNQUzd","trak","3318872LEtoXQ","2309464YqhvUV","DREF","hvcC","mdia","5361364ARZygq","stsz","dependsOn","trun","hdlr","trex"];return(ya=function(){return e})()}ma[pa(486)]();var ga=ba;!function(e,t){for(var r=ba,n=e();;)try{if(423661===parseInt(r(132))/1*(-parseInt(r(130))/2)+-parseInt(r(137))/3+parseInt(r(131))/4+parseInt(r(139))/5*(parseInt(r(128))/6)+-parseInt(r(136))/7*(-parseInt(r(129))/8)+parseInt(r(133))/9+-parseInt(r(134))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(wa);var _a=Qe[ga(140)]((function(e){var t=ga;e[t(135)]=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e[t(135)].__esModule=!0,e[t(135)][t(141)]=e[t(135)]}));function ba(e,t){var r=wa();return(ba=function(e,t){return r[e-=128]})(e,t)}function wa(){var e=["2208tCEsrg","2dAxVLa","3036260VBfdsP","306203XhsKca","5376825HRAjPg","8055340WQKcbk","exports","1358xyDGFb","795462emisEt","unwrapExports","976295TlNcPB","createCommonjsModule","default","12vqjmwY"];return(wa=function(){return e})()}function Sa(){const e=["error","length","82NrhRJU","4BcdBgk","2445006sLTEtw","868gWzEWI","mp3","13110KbTMBg","368080kquCHB","4875561QqycNm","buffer","channel_count","data","2305395rtZynG","16355XRDZBd","Invalid MP3 packet, first byte != 0xFF ","530aBMQiB","set","159203rCqlqG","Invalid MP3 packet, header missing!"];return(Sa=function(){return e})()}Qe[ga(138)](_a),function(e,t){const r=xa,n=e();for(;;)try{if(408242===-parseInt(r(242))/1*(-parseInt(r(250))/2)+-parseInt(r(252))/3*(parseInt(r(251))/4)+parseInt(r(241))/5+parseInt(r(255))/6*(parseInt(r(253))/7)+parseInt(r(256))/8+parseInt(r(257))/9+-parseInt(r(244))/10*(parseInt(r(246))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Sa);const Ia=[44100,48e3,32e3,0],Aa=[22050,24e3,16e3,0],Ea=[11025,12e3,8e3,0],ka=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],Ca=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],Ta=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1];function xa(e,t){const r=Sa();return(xa=function(e,t){return r[e-=240]})(e,t)}function Da(e){const t=xa;if(e[t(249)]<4)return void console[t(248)](t(247));let r=new Uint8Array(e[t(258)]),n=null;if(255!==r[0])return void console[t(248)](t(243));let i=r[1]>>>3&3,s=(6&r[1])>>1,o=(240&r[2])>>>4,a=(12&r[2])>>>2,c=3!==(r[3]>>>6&3)?2:1,u=0,l=0,d=t(254);switch(i){case 0:u=Ea[a];break;case 2:u=Aa[a];break;case 3:u=Ia[a]}switch(s){case 1:o=e[i]&&t=6?(i=5,r=new Array(4),a=s-3):(i=2,r=new Array(2),a=s):-1!==c[t(416)](t(397))?(i=2,r=new Array(2),a=s):(i=5,a=s,r=new Array(4),s>=6?a=s-3:1===o&&(i=2,r=new Array(2),a=s)),r[0]=i<<3,r[0]|=(15&s)>>>1,r[1]=(15&s)<<7,r[1]|=(15&o)<<3,5===i&&(r[1]|=(15&a)>>>1,r[2]=(1&a)<<7,r[2]|=8,r[3]=0),this[t(388)]=r,this[t(384)]=La[s],this.sampling_index=s,this[t(421)]=o,this.object_type=i,this[t(419)]=n,this[t(407)]=t(378)+i,this[t(403)]=t(378)+n}}const Ha=Va;function ja(){const e=["5985693JaWlvW","1383570aEznQG","skipLZ","readUByte","bitsAvailable","27978376yEwvbT","getBits","3871074YklhnK","byteLength","length","readUEG","readBits","data","skipUEG","bitLength","5fuSuep","skipBits","readUShort","skipEG","427419pCyFoT","9shZfRn","index","1454505fmWfsn","3470792TpEywi"];return(ja=function(){return e})()}function Va(e,t){const r=ja();return(Va=function(e,t){return r[e-=381]})(e,t)}!function(e,t){const r=Va,n=e();for(;;)try{if(494952===-parseInt(r(395))/1+-parseInt(r(401))/2+parseInt(r(398))/3+-parseInt(r(399))/4+parseInt(r(391))/5*(-parseInt(r(383))/6)+-parseInt(r(400))/7+-parseInt(r(381))/8*(-parseInt(r(396))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ja);class Wa{constructor(e){const t=Va;this[t(388)]=e,this[t(397)]=0,this.bitLength=8*e[t(384)]}get[Ha(404)](){return this[Ha(390)]-this.index}[Ha(392)](e){const t=Ha;if(this.bitsAvailable1&&void 0!==arguments[1])||arguments[1];return this[t(382)](e,this[t(397)],r)}[Ha(382)](e,t){const r=Ha;let n=!(arguments[r(385)]>2&&void 0!==arguments[2])||arguments[2];if(this[r(404)]>>i,o=8-i;if(o>=e)return n&&(this.index+=e),s>>o-e;{n&&(this[r(397)]+=o);const i=e-o;return s<>>1:-1*(e>>>1)}readBoolean(){return 1===this[Ha(387)](1)}[Ha(403)](){const e=Ha;let t=arguments[e(385)]>0&&void 0!==arguments[0]?arguments[0]:1;return this[e(387)](8*t)}[Ha(393)](){return this[Ha(387)](16)}readUInt(){return this[Ha(387)](32)}}function $a(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}!function(e,t){for(var r=Ja,n=e();;)try{if(488066===parseInt(r(122))/1*(-parseInt(r(101))/2)+-parseInt(r(105))/3*(parseInt(r(120))/4)+-parseInt(r(106))/5*(-parseInt(r(104))/6)+-parseInt(r(114))/7*(parseInt(r(111))/8)+-parseInt(r(110))/9*(-parseInt(r(107))/10)+-parseInt(r(123))/11+-parseInt(r(108))/12*(-parseInt(r(117))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ec);const Ga=new Array(214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72),qa=new Array(2746333894,1453994832,1736282519,2993693404),Ka=new Array(462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257);function Ja(e,t){var r=ec();return(Ja=function(e,t){return r[e-=100]})(e,t)}function Xa(e,t,r,n,i){var s=Ja,o=i;o=t+i>e[s(118)]&&n+i<=r[s(118)]?e[s(118)]-t:n+i>r[s(118)]&&t+i<=e[s(118)]?r[s(118)]-n:t+i<=e[s(118)]&&n+i<=r[s(118)]?i:r[s(118)]>24&255,e>>16&255,e>>8&255,255&e)}function Za(e,t){var r=Ja;return t+3>>19)^(n<<23|n>>>9)}function rc(e,t){var r=new Array(36);r[0]=Za(t,0),r[1]=Za(t,4),r[2]=Za(t,8),r[3]=Za(t,12);for(var n=0;n<32;n++)r[n+4]=r[n]^nc(r[n+1]^r[n+2]^r[n+3]^e[n]);var i=new Array(4);for(n=35;n>=32;n--)i[35-n]=r[n];return function(e){for(var t=Ja,r=new Array(4*e[t(118)]),n=0;n>>30)^(n<<10|n>>>22)^(n<<18|n>>>14)^(n<<24|n>>>8)}function ic(e,t,r){var n=Ja;if(null==e||null==e||e[n(118)]%16!=0)return console[n(115)](n(102)),null;if(null==r||null==r||r.length<=0)return console[n(115)](n(119)),null;if(null==t||null==t||t[n(118)]%16!=0)return console[n(115)]("iv is error!"),null;for(var i=Qa(e),s=Math[n(100)](r[n(118)]/16),o=new Array(r[n(118)]),a=t[n(121)](),c=0;c3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];t=new Uint8Array(t),r=new Uint8Array(r);const o=e[n(116)];let a=5;for(;ao)break;let u=e[a+4],l=!1,d=2;if(i?(s&&(d=3),u=u>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(112)](u)):(u&=31,l=1===u||5===u),l){const i=ic(t,r,e[n(121)](a+4+d,a+4+c));e[n(109)](i,a+4+d)}a=a+4+c}return e}const oc=ac;function ac(e,t){const r=cc();return(ac=function(e,t){return r[e-=286]})(e,t)}function cc(){const e=["2145789wGFZMc","Opus: Channel count changed from ","demuxM7s() type is video and arrayBuffer length is "," and diff is "," and has iFrame, set dropping is true","LOG_NAME","PACKET_TYPE_FRAMESX","fileStart","audioTrackId","key","_decodeVideo payload bytes is 0 and return","concat","addEventListener","streamDts","channel_mode","timeInit set false , cacheTrack = {} now dts is ","kSliceSPS","videoCode","chromaFormat","fetchErrorWorker",", isVideoSequenceHeader is true","_resetInIt","fps_num","mseError","isSendSeqHeader","isCacheBeforeDecodeForFpsRender","videoPayload","H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment","decodeNext","parsePAT: table_id ","dispatchAudioMediaSegment","videoMimeType","websocketOpenTimeout","_decodeVideo now time is ","getAudioBufferLength"," less than (or equal) preTs is ","274333ntVMEr","dropping","entries","_clearAudioNoDataCheckTimeout","useSIMD","indexOf","worker TsLoaderV2","pat_","_needCleanupSourceBuffer","_initAudioSourceBuffer and mseDecoder.isStateOpen is ","config","wasmWidthOrHeightChange","errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is ","flvBufferData","loop() isPushDropping is true and bufferList length is ","close","hasInit","onReady","pcr_pid","demuxFlv() type is ","addSourceBuffer","endOfStream","audioAACSequenceHeader","firstRenderTime is ","MP3: AudioObjectType changed from ","loop() do not decode and delay is ","random_access_indicator","worker wcsDecoder","decodeVideo and webcodecs configure is","demuxMpeg4","sarRatio","hasIframeInBufferList","parseG711Payload","sampling_freq_index","onMediaSourceSourceOpen() audioSourceBuffer is null and next init","clearBuffer,bufferList length is ","demuxFlv() type is video and payload.byteLength is ","kSlicePPS"," create uint8Array error :","AAC","pushBuffer audio ts is ","handleAddNaluStartCode","audioSampleRate","HEAPU8",",nalu type is ","options","calcNetworkDelay","getDelayNotUpdateDelay() and preDelayTimestamp is ","mimeType"," and decoder.delay is ","state","streamFps"," null","getStreamBufferLength","mp3Demuxer","mseSourceBufferError mseDecoder.audioSourceBuffer","onOffscreenCanvasWebglContextLost","delete","onmessage:","kEAC3","streamVideoType","flvScriptData","mediaSourceAppendBufferError","protocols","isPlaybackPause","timescale_","onMediaSourceSourceOpen() sourceBuffer is null and next init","nakedFlowH265DemuxUseNew","h264 naluList.length === 0","idle",", pts=","fetchNext().catch() and e is ","_getSeqHeader","_isEnhancedH265Header","fetchNext().then() and requestAbort is true so return","mediaSourceAudioG711NotSupport","visibility"," ,\n and now ts is ","Parsed first PMT: ","audioBufferSize","JbPro Worker Version is ","isPlayUseMSEAndDecoderInWorker","fetchStream","dispatchAudioInitSegment","_preDoDecode","decodeAudio and has already initialized and payload is aac codec packet so drop this frame","isTrusted","loas_previous_frame","playbackIsPause",",and old bufferList length is ","notConnect","locked","pmt_","HEAPU32","isSm4Crypto","h264","onopen","parsePAT","hasInitVideoCodec",",\n diff is ","Jb pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng","code","buffering","abortSourceBuffer() abort sourceBuffer","useMSE","timed_id3_pids","prevDts","minf"," package length is ","keyFrame","parsePES: packet_start_code_prefix should be 1 but with value ","kSliceNonIDR","HEAPF32"," and next dropBuffer","needInitAudio"," and forOldVersion is ","cacheTrack","videoTrackId","stencil","ec-3","setCodecAudio: mp3 is not support for old version","options:",'fetchNext().then() and value "',",\n and emit change event","kMetadata","handleOffscreenCanvasWebglContextRestored"," and isVideoSqeHeader is ","pendingAudioSegments","fetchStream, WebsocketStream socket open","setCodecVideo: videoDecoder or videoDecoder.setCodec is null","onerror","_bindMediaSourceEvents","pes_private_data_pids","_decodeAudio","simdDecodeError",", old height is ","mseAutoCleanupMinBackwardDuration","codecHeight","dispatchVideoMediaSegment","parseSPS$2","sourceClose",", new height is ","Synchronous KLV Metadata: pid=","dropBuffer$2() isAllIframeInBufferList() is true, and index is ","kH264","DataStream","audioSampleRateIndex"," and notDroppingDelayTs is ","parseADTSAACPayload","audioSequenceNumber","streamType","subarray","audioSourceBuffer updateend and hasPendingEos is true, next endOfStream()",'video/mp4; codecs="',"VideoDecoder","level","streamStats","isPlayVod","parseEAC3Payload","audioCode","_decodeVideo"," ,\n and now ts is ","stream_type","kLOASAAC","getTime","firstRenderTime","message","Video: Codec mimeType changed from ","isAAC","parseSection","pes_slice_queues_","common_pids","low_frequency_effects_channel_on","refSampleDuration","pcmData ts ","abort","audioNalu",", start dts is ","getDelayNotUpdateDelay","playbackRate","toString","debugLog","updating","fetchNext().then() and abortController.signal.aborted is true so return","decodeVideo first frame is not iFrame"," and maxDiff is ","isPlayUseMSE","iFrame","bit_stream_identification","fetch done","error","decoder","yuvData, transferToImageBitmap error is","catch",'video/mp2t; codecs="',"mseDecoder.sourceBuffer.appendBuffer()","pipeTo","streamSuccess","aborted","video_init_segment_dispatched_","getContextAttributes","yuvData ts ",", need clear is ","clearBuffer","firstAudioTime","kSCTE35","audioCodec","handleVideoH265NaluList list size is ","expected_length"," ,\n and diff is ","abort success",",\n and resetAllDelay",", streamFps is ","video_metadata_changed_","avcC","wcsDecodeAudio","isPause","height","videoSEI","readNextNaluPayload"," ,new bufferList is ","reduce","playType","playbackCacheLoop","codec_size","_initPmt","webglcontextrestored",", syncOffset = ","lastBuffer"," > ","details","removeSourceBuffer"," > timestamp is ","original_object_type","getNaluDts","data","hasPendingEos","isWasmMp4","nearest_pts","\n and replay","createFile","offscreenCanvasCtx"," and ignore","isTs"," and prevTs is ","getUint32","scte_35_pids","mediaSourceAudioNoDataTimeout","streamVideoFps","dts","audio_last_sample_pts_","ts_packet_size","pts","setCodecAudio: hasInitAudioCodec is false, codecId is ","initVideo","setCodecVideo: hasInitVideoCodec is false, codecId is ","PACKET_TYPE_FRAMES","H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment","\n maybe trigger black screen or flower screen\n ","loas_aac",", height: ","pushBuffer(), pushLatestDelay is ","videoNalu","kAC3"," and prev dts is ","bit_depth","draw, decoder is destroyed and return","current_pmt_pid_","setCodec","ac3","writableStream pipeTo() and e is","Client disconnecting","sort","webglObj"," and mseCorrectTimeDuration is ","codedWidth","sync_byte = ","Video: Present resolution width changed from ","isStateOpen","openWebglAlignment"," and prevPayloadBufferSize is ","nakedFlowFps","isFirefox","pendingRemoveRanges","suffixSei","parseVideo265Header","Generated first HEVCDecoderConfigurationRecord for mimeType: ","videoSourceBuffer updateend and hasPendingEos is true, next endOfStream()",", and set streamFps is 25","units","stopStreamRateAndStatsInterval","websocket","VideoEncoder","getDelay() and preDelayTimestamp is ","pid","simdH264DecodeVideoWidthIsTooLarge","onError","FT_KEY","name","fetch().catch() and abortController.signal.aborted is true so return","codedHeight","localDts","decodeVideo"," cacheTrack dts is ","mseDecoder.audioSourceBuffer.appendBuffer()","getTrackById"," and return","parseH265Payload","debugWarn","isIFrame","ID3 ","extractNALu() buffer error","size","stringify","websocket error","video","_doDecodeVideo","onSamples","useWCS","getHandle","readyState","dispatch naluArray length is 0","forEach","isWidthOrHeightChanged","width is ","handleVideoH265Nalu","offscreenCanvasGL","hasAudio","asynchronous_klv_pids","setCodecAudio: init audio codec, codeId is ","read","VideoDecoder error: ","resetDelay","readBits","updatePlaybackIsPause, isPause is ","startTimestamp"," and has iIframe and next decoder.dropBuffer$2()","setCodecVideo: init video codec , codecId is ","findIndex","dispatchPESPrivateDataDescriptor","destroy","send","extractNALu$2","demuxTs","mp3","useOffscreen","605SLMohf","channel_config","network_pid","AudioDecoder","meta"," and bufferList length is ","version_number","aac","mseCorrectTimeDuration","MP3: SamplingFrequencyIndex changed from "," ,delay is ","debugUuid"," vs start is ","reset","vps","frameRate","clearSlices","signal","audioTracks","_initSourceBuffer() appendBuffer mseDecoder.mediaSource.addSourceBuffer()","isFmp4","pushBuffer video ts is ","pushBuffer video and isIFrame is ","decodeVideo has not init , isIframe is ","recordType","removeSourceBuffer() sourceBuffer error","set","min","kMPEG1Audio","parseLOASAACPayload","types","removeSourceBuffer() audioSourceBuffer","original_codec_mimetype","getVideoBufferLength","last_pcr_","pendingAudioRemoveRanges","stopId","iframeIntervalTs","_doDecodeAudio","playbackFps","url"," and new delay is ","parseSMPTE2038MetadataPayload","isFirstDispatch and tsPacketSize = ","socket is null","workerFetch","mediaSourceAddSourceBufferError","parseAsynchronousKLVMetadataPayload","fetchStatus","extractNALu","prevTs","TAG","calcPlaybackStreamFps","finally","parseAC3Payload","mediaSourceAudioInitTimeout","sourceBuffer","s and status is ","remove","calcIframeIntervalTimestamp",",\n and mseCorrectTimeDuration is ","isHevc"," to ","fetchError","loop() common dumex delay is -1 ,data.ts is","171yJnMVl","type","isPlaybackOnlyDecodeIFrame","audioSourceNoDataCheckTimeout","findSei","fetchStream, WebsocketStream socket close and code is ","debugError","decodeVideo: simd decode error, and return","sarDen"," and emit error and next abort()","worker mpeg4Demuxer","aac_last_incomplete_data_","prevTimestamp","mseHandle","sarNum","avcc","handleVideoH264Nalu","writableStream write() and requestAbort is true so return","isStateClosed","audioMimeType","$video","removeEventListener","VANC","now","mp4Box onError","firstStartCodeOffset","audio_init_segment_dispatched_","pushBuffer,\n preTimestamp is ","expected: ","dropBuffer$2() iFrameIndex is ","\n decodeVideo dts is less than(or equal) prev dts ,\n dts is ","20wrybGq","then","isAudioInitInfo","cryptoIV","program_number","calcNetworkDelay now dts:","present_size","close() and videoDecoder.clear error: ","audioMeta","pushLatestDelay","isStateEnded","videoBufferDelay","networkDelay","h265"," and firstRenderTime is ","fetchNext().catch() and e.name is AbortError so return","mediaSourceH265NotSupport","parseSPS","onmessage","writableStream","mdia","duration"," so drop this frame","isSm4Crypto opt.sm4CryptoKey is null","correctSamplePts dts, dts: ","decodeAudio, decoder is destroyed and return","transferToImageBitmap","mp4a.40."," ts is ","demuxFlv","demux() isIFrame is false and unit type is IDR and update to true","videoInfo","prevPayloadBufferSize","decodeVideo\n local dts is < 0 , ts is ","stream_id","isXorCrypto","_stopCheckWsOpenTimeout","binaryType","len","generateInitSegment","pendingSegments","parsePPS","websocketError"," and opt is","sps","endOfStream() has pending eos","_opt","kSliceCRA_NUT","createImageBitmap","h265 naluList.length === 0","stop","closed","readUEG","ceil","getSourceBufferUpdating"," and ok is ","_hasPendingSegments","fetchNext().catch() and abortController.signal.aborted is true so return","playback and playbackIsCacheBeforeDecodeForFpsRender is true","isEmitInfo","audioPayload",", dts is ","discontinuity_indicator","VideoDecoder configure has not init , isIframe is ","hasIncompleteData","handleNALu","profile","handleVideoH264NaluList","offset","mp4Box",", diff is ","warn","worker","_initAudioSourceBuffer","ms, PES pts: ","mseUpdateVideoTimestamp","buffer","log","string","socketStatus","websocket Open Timeout form ","codecWidth","calcNetworkDelay, dts is ","emitError","detectAudioMetadataChange","abs","\n decodeAudio dts is less than(or equal) prev dts ,\n dts is ","demuxM7s","supportMSEDecodeHevc","pcmData, decoder is destroyed and return","MULAW","mediaSourceFull"," and\n ts is ","parse","correctSamplePts","decodeDiffTimestamp"," and isNotPushDropping is ","20045179UlYPQM","mediaSourceAppendBufferFull","_initSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()","sequenceNumber","cmd","_remainingPacketData","ts is ","isDecodeFirstIIframe","code is ","slice","playbackIsCacheBeforeDecodeForFpsRender","isDestroyed","fetch().catch() and e.name is AbortError so return","videoType","prevAudioTs","handleVideoH265Frames","AC3: Channel Mode changed from "," ant auto wasm decode","audio","program_pmt_pid","init and forHardDecode is ","workerEnd","clearPlaybackCacheLoop",",\n firstAudioTime is ","slices",", diff time is ","15076wAsnNF","isDropping","hasAudioInit","is_sync","sendWebsocketMessage, message is","demuxNakedFlow","hasVideo","getNotDroppingDelayTs","mseAutoCleanupMaxBackwardDuration","mseDecoder.mediaSourceAddSourceBufferError is true","parsePMT","program_pmt_map_","stsd"," or cryptoIV.length is ","sampling_frequency","width"," and height is ","decodeVideo, decoder is destroyed and return","audio_metadata_","parseChunks"," ,\n and diff is ","mp4","onReady()","kSliceIDR","abortSourceBuffer() abort audioSourceBuffer","isPushDropping","pid_stream_type","handleVideoNalu","replace","playbackConfig","tempStream","doDecode","abort catch",", isAacCodecPacket is true","clear","yuvData, isVideoFirstIFrame is false and return","Not Supported Opus channel count.","preDelayTimestamp"," and delay is ","getIncompleteData","end","fetchStream, WebsocketStream socket error","isPlayback","aacSequenceHeader","pushBuffer, isDropSameTimestampGop is true and\n hasIframe is ","sync_offset","isMpeg4","emitPESSlices","onclose","duration_","supportVideoFrameCallbackHandle","audioDecode","isEmitSEI","cryptoPayload","sampleRate",", height is ","section_slice_queues_","from","fromCharCode","dispatchVideoInitSegment","dispatch","loop demux diff time is ","parsePESPrivateDataPayload","isPlayer","playbackStreamVideoFps","kPESPrivateData","writableStream close()","demuxFlv() type is audio and payload.byteLength is ","356046vzLvnh","opt"," but isSocketError is true , so return","mseDecoder.mediaSourceAppendBufferError is true","delta","AC3: BitStream Mode changed from ","dropBuffer$2","emitSectionSlices","getAudioSourceBufferUpdating",", options.ts is "," is not H264 or H265","websocketOpen","close() and writableStream.close() error","Opus: SamplingFrequencyIndex changed from ","mpeg4","mseDecoder.mediaSourceBufferError is true","mediaSourceBufferError","length","firstAudioTime is ","streamEnd","isFlv","updatePlaybackIsPause","codec_mimetype"," is not corresponded to PMT!","yuvData, decoder is destroyed and return","map","loop() dropBuffer is dropping and isIFrame ","AAC: Channel configuration changed from ","open","flags","decodeAudio() and decoder is destroyed","streamAbps","onSamples() trackId error","readNextAACFrame","currentTime","KLVA","mseDecodeAudio","webgl","cancel","readUByte","playAudio","media_info_","demuxFmp4","checkFirstIFrame","prevAudioDts","originalCodec","channelCount","handleVideoH264Frames","codec","demuxFlv() isVideoSequenceHeader is true and isHevc is ","debugLevel","flush",",\n and prevPayloadBufferSize is ",", dts=","tsPacketSize","adts_aac","videoDecode","floor","webglcontextlost","demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is ","shift","hvcc"," and mseDecoder.audioMimeType is "," and update next dts increase 5ms",",local diff is ","start","isAvc","video_metadata_","eventListenList","writableStream abort() and abortController.signal.aborted is true so return","fetchStream, WebsocketStream on error and requestAbort is true so return","firstStartCodeOffset -14 is","validatedFailed, please contact the author to get the correct license","syncOffset","mseWorkerAddSourceBufferError","isDropSameTimestampGop","onOffscreenCanvasWebglContextRestored"," and payload size is ","G711U","payload_unit_start_indicator","_hasPendingRemoveRanges","isXorCrypto cryptoKey.length is ","fetchNext().then() and done is true","mpeg","handleVideoFrames","sampling_rate","videoBuffer","kMPEG2Audio","current_program_","vcl","getBuildTime","hvcC","sampling_index","_onMediaSourceSourceOpen","complete","assign","kSliceVPS","worker MediaSource","isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio","first_parse_","isSm4CryptoH265V2","bit_stream_mode","extractH265SEI","_doCleanUpSourceBuffer","Opus","isWorkerFetch","opus","audio_object_type","mediaSource","decode"," is not corresponded to PAT!","close() and socket.readyState is ","decodeVideo dts is equal to prev dts and payload size is equal to prev payload size so drop this frame","endOfStream() error","kSliceIDR_W_RADL","_decodeAudioConfigurationRecord","video_track_","startStreamRateAndStatsInterval","audioSourceBuffer","has not init video codec"," and is Trial Version[试用版本]"," and\n ts is ","\n decodeVideo: video width or height is changed,\n old width is ","body","ac-3","decodeVideo: hasInitVideoCodec is false, codecId is ","lastBuf","playbackCacheLoop fragDuration is ","audioSourceBufferCheckTimeout","_initSourceBuffer and mseDecoder.isStateOpen is ","pendingUnits",", preTs is ","handleOffscreenCanvasWebglContextLost and next try to create webgl","samples","isInitSegmentDispatched"," , payload is ","updateend","frame_rate"," and isIframe is ","autoCalcFps","findFirstStartCode","debug","ms and diffFps is ","_decodeEnhancedH265Video","G711A","buffered","mseSourceBufferError mseDecoder.sourceBuffer","isfms","getDelay","doPlaybackCacheLoop","cacheAudioTrack","resetAllDelay","push","byteLength","AAC: Unknown pts"," > maxDelay ","startPlaybackCacheLoop",";codecs=","getContext","eac3","payload","sample_rate","PACKET_TYPE_SEQ_START","ms and fragDuration is ","init","has_audio_","parseVPS","moof","Malformed PES: PES_packet_length < 3 + PES_header_data_length","delay is ","pushBuffer","playbackCacheLoop sync frame duration is ","sm4CryptoKey","isCryptoAudio","streamRate","extractNALu$3","setExtractionOptions","request abort and run res.body.cancel()","parseTimedID3MetadataPayload","undefined","removeSourceBuffer() sourceBuffer","mediaSource is not attached to video or mediaSource is closed","streamVbps","match","secondStartCodeOffset"," and prev time is ","checkStreamEnd","g711u","AAC: Detected pts overlapped, ","detectVideoMetadataChange"," , message is ","videoCodec","writableStream write() and abortController.signal.aborted is true so return","_clearAudioSourceBufferCheckTimeout","mediaSource video sourceBuffer error","getUint8",", next dts: ","MP3: Channel count changed from ","kSliceIDR_N_LP","kSliceSEI","kH265","setCodecVideo",'" is string so return',"cryptoPayloadAudio","decodeAudio",", not 0x47","decodeVideo and payload is too small , payload length is ","cryptoKey","level_string","mseCorrectAudioTimeDuration","appendAudioBuffer","synchronous_klv_pids","updateConfig","offscreenCanvas","timeInit","mseSourceBufferError","_doRemoveRanges","avc","_initSourceBuffer","mseWidthOrHeightChange","firstTimestamp","Generated first AVCDecoderConfigurationRecord for mimeType: ","isPlaybackCacheBeforeDecodeForFpsRender","channel_count","parseSCTE35","sequenceHeader","sendWebsocketMessage"," and packetType is ","findSecondStartCode","Audio: Audio Codecs changed from ","player","streamEndInner","_doAppendSegments","probe","isM7sCrypto cryptoKey.length is ","ms and return ","scriptData","width: "," isIFrame is ","_decodeConfigurationRecord error","decodeVideo and payload is video sequence header so drop this frame","decodeVideo is max diff , ts is ","7gIcRLU","g711a","AC3: Low Frequency Effects Channel On changed from ","_doAppendSegments() audioSourceBuffer is null and need init audio source buffer","handleOffscreenCanvasWebglContextLost, stencil is false","_checkTsIsMaxDiff","_initAudioSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()","getNearestTimestampMilliseconds","smpte2038_pids","appendBuffer","total_length","4721160LVPcFa","TAG_NAME"," more than ","isNakedFlow","sourceOpen","handlePESSlice","_decodeConfigurationRecord","Parsed first PAT: ","timescale","fetchStream, url is ","value",", stream_id=","nakedFlowDemuxUseNew","MP3","has_video_","dispatchAudioVideoMediaSegment","socket is not open and state is","some","object_type","mediaSource audio sourceBuffer error","sourceended","11368Kolepk"," and\n payloadBufferSize is ","isM7sCrypto","videoSequenceHeader","audio_track_","events","videoMeta","endOfStream()","isVideoInited","elementary_stream_priority_indicator","mseAutoCleanupSourceBuffer","ms and return -1","getState","mediaSourceTsIsMaxDiff","kADTSAAC","mediaSourceDecoderConfigurationError","decodeVideo() and decoder is destroyed","initAudio","delay","render","fetchStream, WebsocketStream socket close abnormally and code is ","decodeVideo: video width or height is changed, and return"," next data type is "," and prev ts is ","cts","pps","setInterval()","BIG_ENDIAN","setCodecAudio: audioDecoder or audioDecoder.setCodec is null","parseVideo264Header","handlePESSlice: packet_start_code_prefix should be 1 but with value ","isRecordTypeFlv","\n diff is ","Asynchronous KLV Metadata: pid=","isAllIframeInBufferList","doPlaybackCacheLoop() and isPlaybackOnlyDecodeIFrame is true and isIFrame is true, and ts is","write",",\n new width is ","file_position","parsedOffset","status","MediaSource"," and nalUnitSize is ","presentHeight","parsePMT: table_id "];return(cc=function(){return e})()}!function(e,t){const r=ac,n=e();for(;;)try{if(315428===parseInt(r(911))/1+-parseInt(r(488))/2*(parseInt(r(334))/3)+parseInt(r(830))/4*(-parseInt(r(1257))/5)+-parseInt(r(556))/6*(-parseInt(r(798))/7)+-parseInt(r(809))/8+-parseInt(r(875))/9*(parseInt(r(365))/10)+parseInt(r(462))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(cc),Date.now||(Date[oc(357)]=function(){const e=oc;return(new Date)[e(1075)]()}),console[oc(442)](oc(991)+Ut+":"+Mt+oc(676));const uc=dc;function lc(){const e=["push","JbPro[❌❌❌][simd wasm]:","63qyxQEE","52844jDMSYB","283416ohGoVg","693966cPUmwZ","then","toString","360944tOXfwt","all","JbPro[❌❌❌][audio wasm]:","80zjPWTn","690150raHImz","1MOGMQm","warn","3425400iXjqVn","1575621Rewprv"];return(lc=function(){return e})()}function dc(e,t){const r=lc();return(dc=function(e,t){return r[e-=428]})(e,t)}!function(e,t){const r=dc,n=e();for(;;)try{if(324542===parseInt(r(442))/1*(-parseInt(r(437))/2)+parseInt(r(431))/3*(-parseInt(r(432))/4)+-parseInt(r(441))/5+parseInt(r(433))/6+-parseInt(r(434))/7+-parseInt(r(444))/8+parseInt(r(428))/9*(parseInt(r(440))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(lc);const hc=[];hc[uc(429)](o({printErr:function(e){const t=uc;(function(e){const t=Ct;return!(!e||-1===e[t(585)](t(428))&&-1===e[t(585)](t(507))&&-1===e.indexOf("If you want to help, upload a sample of this file to")&&-1===e.indexOf(t(700)))})(e)||console[t(443)](t(439),e)}}),s({printErr:function(e){const t=uc;(function(e){const t=Ct;return!(!e||-1===e[t(585)](t(567)))})(e)||(console[t(443)]("JbPro[❌❌❌][video wasm]:",e),qt(function(e){const t=Ct;let r=!0;return e&&-1!==e[t(585)](t(481))&&(r=!1),r}(e))&&postMessage({cmd:be.notSupportNewWasm,value:e}))}})),Promise[uc(438)](hc)[uc(435)]((e=>{const t=e[0];!function(){const e=oc;let t=arguments[e(573)]>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments[e(573)]>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[e(573)]>2&&void 0!==arguments[2]&&arguments[2],i=arguments[e(573)]>3&&void 0!==arguments[3]&&arguments[3],s=[],o=[],a=null,c=null,u=null,l=null,d=null,h=null,f=!1,p=null,m=null,v=!1,y=!1,g=!!Gt(n),_=0,b=0,w=!1,S=null,I=null,A=null,E=[],k=null,C=null,T=0,x=0,D=null,B=null,P=0,M=0,U=null,F=!1,R=!1,L=!1,O=null,z=null,N=!1,H=!0,j=0,V=0,W=null,$=null,G=null,q=()=>{const t=e,r=Wt();return{debug:r.debug,debugLevel:r[t(606)],debugUuid:r[t(1268)],useOffscreen:r[t(1256)],useWCS:r[t(1229)],useMSE:r[t(1015)],videoBuffer:r.videoBuffer,videoBufferDelay:r[t(376)],openWebglAlignment:r[t(1190)],playType:r.playType,hasAudio:r[t(1238)],hasVideo:r[t(494)],playbackRate:1,playVodRate:1,playbackFps:r[t(517)].fps,playbackDefaultFps:r[t(308)],playbackAutoCalcFps:r.playbackConfig[t(695)],playbackForwardMaxRateDecodeIFrame:r.playbackForwardMaxRateDecodeIFrame,playbackIsCacheBeforeDecodeForFpsRender:r[t(517)][t(900)],sampleRate:0,networkDelay:r[t(377)],visibility:!0,useSIMD:r[t(915)],isRecording:!1,recordType:r[t(293)],isNakedFlow:r.isNakedFlow,checkFirstIFrame:r[t(599)],audioBufferSize:1024,isM7sCrypto:r.isM7sCrypto,isCryptoAudio:r[t(729)],cryptoKey:r[t(763)],cryptoIV:r[t(368)],isSm4Crypto:r[t(1005)],isSm4CryptoH265V2:r[t(656)],sm4CryptoKey:r[t(728)],isXorCrypto:r.isXorCrypto,isHls265:!1,isFlv:r.isFlv,isFmp4:r[t(289)],isMpeg4:r[t(534)],isTs:r[t(1154)],isEmitSEI:r[t(540)],isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isFirefox:!1,isDropSameTimestampGop:r[t(631)],mseDecodeAudio:r[t(592)],wcsDecodeAudio:r[t(1126)],nakedFlowH265DemuxUseNew:r[t(978)],mseDecoderUseWorker:r.mseDecoderUseWorker,mseAutoCleanupSourceBuffer:r[t(840)],mseAutoCleanupMaxBackwardDuration:r[t(496)],mseAutoCleanupMinBackwardDuration:r[t(1047)],mseCorrectTimeDuration:r[t(1265)],mseCorrectAudioTimeDuration:r[t(765)],nakedFlowDemuxUseNew:r[t(821)],nakedFlowFps:r.nakedFlowFps,supportMSEDecodeHevc:!1,checkStreamEnd:!0,websocketOpenTimeout:r[t(907)]}};e(1203)in self&&(a={TAG_NAME:e(938),hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:null,init(){const t=e;a.decoder=new VideoDecoder({output:function(e){const t=ac;if(Ot(e[t(413)]))e[t(413)]().then((r=>{const n=t;a.offscreenCanvasCtx.drawImage(r,0,0,e[n(1186)],e[n(1211)]);let i=a[n(769)].transferToImageBitmap();postMessage({cmd:be[n(849)],buffer:i,delay:te[n(848)],ts:0},[i]),Ht(e)}));else{a[t(1152)].drawImage(e,0,0,e[t(1186)],e.codedHeight);let r=a[t(769)][t(391)]();postMessage({cmd:be.render,buffer:r,delay:te[t(848)],ts:0},[r]),Ht(e)}},error:function(e){const t=ac;te[t(340)]("worker",t(1242),e,e[t(1091)]())}}),te[t(1092)](a[t(810)],t(720))},destroy(){const t=e;a[t(1270)](),a[t(1102)]&&"closed"!==a.decoder[t(961)]&&(a[t(1102)].close(),a[t(1102)]=null),te[t(1092)](a[t(810)],"destroy")},decode:function(t,r,n){const i=e,s=t[0]>>4==1;if(a[i(927)]){const e=new EncodedVideoChunk({data:t[i(471)](5),timestamp:r,type:s?Fe[i(884)]:Fe[i(560)]});try{a[i(1102)][i(665)](e)}catch(e){}}else if(s&&t[1]===He[i(781)]){const e=15&t[0];postMessage({cmd:be[i(892)],code:e});const r=new Uint8Array(t);postMessage({cmd:be.videoCodec,buffer:r,codecId:e},[r.buffer]);let n=null,s=null;const o=t.slice(5);if(e===De[i(1006)]?(s=Ar(o),n={codec:s.codec,description:o}):e===De[i(378)]&&(s=tn(o),n={codec:s.codec,description:o}),!n||n&&!n[i(604)]||s&&0===s[i(446)]&&0===s.codecHeight)return void te[i(1219)](a.TAG_NAME,i(939),JSON[i(1224)](n));s&&s.codecWidth&&s[i(1048)]&&(n[i(1211)]=s[i(1048)],n[i(1186)]=s[i(446)]),!a[i(424)]&&(te[i(1092)]("worker","Webcodecs Video Decoder initSize"),postMessage({cmd:be.initVideo,w:s[i(446)],h:s[i(1048)]}),a[i(424)]=!0,a[i(769)]=new OffscreenCanvas(s[i(446)],s.codecHeight),a[i(1152)]=a[i(769)][i(714)]("2d")),te[i(411)].recordType,i(509);try{a[i(1102)].configure(n),a[i(927)]=!0}catch(e){te[i(340)](i(437),"VideoDecoder configure error",e[i(1012)],e,e.toString()),e[i(1091)]()}}else te.debugWarn(i(437),i(428)+s+i(691)+t[1]+" so drop this frame")},reset(){a[e(927)]=!1,a.isEmitInfo=!1,a.offscreenCanvas=null,a.offscreenCanvasCtx=null}});let K=function(){const t=e;if(N=!0,c)try{c[t(1086)](),c=null,te[t(1092)]("worker",t(1121))}catch(e){c=null,te[t(1092)](t(437),t(520),e)}},J={TAG_NAME:"worker nakedFlow",init(){const t=e;J[t(682)]=null,J[t(1271)]=null,J.sps=null,J[t(855)]=null,J.streamType=null,J[t(1212)]=0,J.pendingUnits={},J[t(899)]=!1,te[t(1092)](J.TAG_NAME,t(720))},destroy(){const t=e;J.lastBuf=null,J.vps=null,J[t(409)]=null,J[t(855)]=null,J.streamType=null,J[t(1212)]=0,J[t(686)]={},J[t(899)]=!1,te[t(1092)](J[t(810)],"destroy")},dispatch(t){const r=e,n=new Uint8Array(t);if(te[r(411)][r(821)]){const e=J[r(731)](n);if(0===e[r(573)])return void te[r(1092)](J.TAG_NAME,r(1232));J[r(640)](e)}else J[r(1253)](n)},getNaluDts(){const t=e,r=te[t(411)][t(1192)];let n=J.localDts;return J[t(1212)]=J[t(1212)]+parseInt(1e3/r,10),n},getNaluAudioDts(){const t=e,r=te._opt[t(542)],n=te._opt.audioBufferSize;return J.localDts+parseInt(n/r*1e3)},extractNALu(t){const r=e;let n,i,s=0,o=t[r(709)],a=0,c=[];for(;s1)for(let e=0;e{const t=r,n=Dr(e);n===Me[t(855)]||n===Me.sps?J[t(350)](e):Pr(n)&&i[t(708)](e)})),1===i[r(573)])J.handleVideoH264Nalu(i[0]);else if(Ur(i)){const e=Dr(i[0]),t=Mr(e);J[r(432)](i,t,e)}else i[r(1233)]((e=>{J[r(350)](e)}))}else if(J[r(1061)]===Be[r(378)])if(te[r(411)].nakedFlowH265DemuxUseNew){const e=J[r(952)](t),n=J[r(318)](e);if(0===n[r(573)])return void te.debugWarn(r(437),"handleVideoNalu",r(414));const i=[];if(n.forEach((e=>{const t=r,n=an(e);n===Ue[t(855)]||n===Ue[t(409)]||n===Ue.vps?J[t(1236)](e):un(n)&&i[t(708)](e)})),1===i[r(573)])J[r(1236)](i[0]);else if(dn(i)){const e=an(i[0]),t=ln(e);J.handleVideoH265NaluList(i,t,e)}else i[r(1233)]((e=>{J[r(1236)](e)}))}else an(t)===Ue[r(855)]?J.extractH265PPS(t):J.handleVideoH265Nalu(t)},extractH264PPS(t){const r=e,n=J[r(952)](t);J[r(318)](n)[r(1233)]((e=>{const t=r;Br(Dr(e))?J.extractH264SEI(e):J[t(350)](e)}))},extractH265PPS(t){const r=e,n=J[r(952)](t);J[r(318)](n)[r(1233)]((e=>{const t=r;cn(an(e))?J[t(658)](e):J[t(1236)](e)}))},extractH264SEI(t){const r=e,n=J[r(952)](t);J[r(318)](n)[r(1233)]((e=>{J[r(350)](e)}))},extractH265SEI(e){const t=J.handleAddNaluStartCode(e);J.extractNALu(t).forEach((e=>{J.handleVideoH265Nalu(e)}))},handleAddNaluStartCode(t){const r=e,n=[0,0,0,1],i=new Uint8Array(t[r(573)]+n[r(573)]);return i[r(295)](n),i[r(295)](t,n.length),i},handleVideoH264Nalu(t){const r=e,n=Dr(t);switch(n){case Me[r(409)]:J[r(409)]=t;break;case Me[r(855)]:J[r(855)]=t}if(J.isSendSeqHeader){if(J[r(409)]&&J[r(855)]){const e=kr({sps:J[r(409)],pps:J[r(855)]}),t=J[r(1212)];te[r(665)](e,{type:we.video,ts:t,isIFrame:!0,cts:0}),J[r(409)]=null,J[r(855)]=null}if(Pr(n)){const e=Mr(n),i=J[r(1145)](),s=Tr(t,e);J[r(519)](s,{type:we[r(1226)],ts:i,isIFrame:e,cts:0})}}else if(J[r(409)]&&J.pps){J.isSendSeqHeader=!0;const e=kr({sps:J[r(409)],pps:J[r(855)]});te[r(665)](e,{type:we[r(1226)],ts:0,isIFrame:!0,cts:0}),J[r(409)]=null,J.pps=null}},handleVideoH264NaluList(t,r,n){const i=e;if(J[i(899)]){const e=J[i(1145)](),s=xr(t.reduce(((e,t)=>{const r=i,n=At(e),s=At(t),o=new Uint8Array(n.byteLength+s[r(709)]);return o[r(295)](n,0),o[r(295)](s,n[r(709)]),o})),r);J.doDecode(s,{type:we[i(1226)],ts:e,isIFrame:r,cts:0}),te.debugLog(i(437),"handleVideoH264NaluList list size is "+t[i(573)]+i(1019)+s.byteLength+i(794)+r+i(955)+n+i(426)+e)}},handleVideoH265Nalu(t){const r=e,n=an(t);switch(n){case Ue[r(1271)]:J[r(1271)]=t;break;case Ue.sps:J[r(409)]=t;break;case Ue[r(855)]:J.pps=t}if(J[r(899)]){if(J[r(1271)]&&J[r(409)]&&J[r(855)]){const e=nn({vps:J.vps,sps:J.sps,pps:J.pps}),t=J[r(1212)];te[r(665)](e,{type:we[r(1226)],ts:t,isIFrame:!0,cts:0}),J[r(1271)]=null,J.sps=null,J[r(855)]=null}if(un(n)){const e=ln(n),i=J[r(1145)](),s=sn(t,e);J.doDecode(s,{type:we[r(1226)],ts:i,isIFrame:e,cts:0})}}else if(J.vps&&J[r(409)]&&J.pps){J[r(899)]=!0;const e=nn({vps:J[r(1271)],sps:J[r(409)],pps:J.pps});te[r(665)](e,{type:we[r(1226)],ts:0,isIFrame:!0,cts:0}),J.vps=null,J[r(409)]=null,J[r(855)]=null}},handleVideoH265NaluList(t,r,n){const i=e;if(J.isSendSeqHeader){const e=J.getNaluDts(),s=on(t[i(1132)](((e,t)=>{const r=i,n=At(e),s=At(t),o=new Uint8Array(n[r(709)]+s[r(709)]);return o[r(295)](n,0),o[r(295)](s,n[r(709)]),o})),r);J[i(519)](s,{type:we.video,ts:e,isIFrame:r,cts:0}),te.debugLog(i(437),i(1118)+t[i(573)]+i(1019)+s[i(709)]+i(794)+r+",nalu type is "+n+i(426)+e)}},doDecode(t,r){const n=e;te[n(957)](r.ts),r[n(1220)]&&te[n(328)](r.ts),te[n(665)](t,r)},handleVideoFrames(t){const r=e;if(!J.streamVideoType)for(let e of t)if(J[r(971)]=zt(e),J[r(971)])break;J[r(971)]?J.streamVideoType===Be.h264?J[r(603)](t):J.streamVideoType===Be.h265&&J[r(477)](t):te.debugWarn("worker",r(640),"streamVideoType is null")},handleVideoH264Frames(t){const r=e;let n=[],i=[],s=!1,o=!1;J[r(686)][r(1200)]&&(n=J[r(686)].units,o=J[r(686)][r(645)],s=J[r(686)][r(1098)],J[r(686)]={});let a={};for(let e of t){if(e[r(709)]<4)continue;const t=Dr(e);let c=!1,u=t===Me[r(511)];(t===Me[r(1022)]||t===Me[r(511)])&&(a=J[r(859)](e),c=!0),n.length&&o&&(a[r(703)]||!c)&&(i[r(708)]({units:n,isIFrame:s}),n=[],s=!1,o=!1),n[r(708)](e),s=s||u,o=o||c}n[r(573)]&&(J[r(686)]={units:n,vcl:o,iFrame:s}),i[r(1233)]((e=>{const t=r,n=e[t(1200)],i=e.isIFrame;let s=null,o=null;if(n[t(1233)]((e=>{const r=t,n=31&e[0];switch(n){case Me[r(855)]:J[r(855)]=e;break;case Me[r(409)]:J[r(409)]=e;break;case Me.kSliceSEI:o=e}if(Pr(n)){const t=At(e);if(s){const e=new Uint8Array(s[r(709)]+t.byteLength);e[r(295)](s,0),e[r(295)](t,s[r(709)]),s=e}else s=t}})),!J[t(899)]&&J[t(409)]&&J[t(855)]){J[t(899)]=!0;const e=Cr({sps:J[t(409)],pps:J[t(855)]});te.decode(e,{type:we[t(1226)],ts:0,isIFrame:!0,cts:0}),J[t(409)]=null,J[t(855)]=null}if(J[t(899)]){if(J[t(409)]&&J.pps){const e=Cr({sps:J[t(409)],pps:J[t(855)]}),r=J[t(1212)];te[t(665)](e,{type:we.video,ts:r,isIFrame:!0,cts:0}),J[t(409)]=null,J[t(855)]=null}if(s){const e=J[t(1145)](),r=xr(s,i);if(te[t(411)][t(540)]&&o){const r=It(o,!1);postMessage({cmd:be[t(1129)],buffer:r[t(716)],ts:e},[r[t(716)].buffer])}J[t(519)](r,{type:we[t(1226)],ts:e,isIFrame:i,cts:0})}}}))},handleVideoH265Frames(t){const r=e;let n=[],i=[],s=!1,o=!1;J[r(686)][r(1200)]&&(n=J[r(686)][r(1200)],o=J.pendingUnits[r(645)],s=J[r(686)].iFrame,J[r(686)]={});let a={};for(let e of t){if(e[r(709)]<4)continue;const t=an(e);let c=!1,u=ln(t);un(t)&&(a=J[r(1196)](e),c=!0),n[r(573)]&&o&&(a.isfms||!c)&&(i.push({units:n,isIFrame:s}),n=[],s=!1,o=!1),n[r(708)](e),s=s||u,o=o||c}n[r(573)]&&(J[r(686)]={units:n,vcl:o,iFrame:s}),i[r(1233)]((e=>{const t=r,n=e[t(1200)],i=e.isIFrame;let s=null,o=null;if(n[t(1233)]((e=>{const r=t,n=e[0]>>>1&63;switch(n){case Ue[r(855)]:J.pps=e;break;case Ue.sps:J[r(409)]=e;break;case Ue[r(1271)]:J[r(1271)]=e;break;case Ue[r(1195)]:case Ue.prefixSei:o=e}if(un(n)){const t=At(e);if(s){const e=new Uint8Array(s[r(709)]+t[r(709)]);e[r(295)](s,0),e[r(295)](t,s[r(709)]),s=e}else s=t}})),!J[t(899)]&&J.sps&&J[t(855)]&&J[t(1271)]){J[t(899)]=!0;const e=nn({sps:J[t(409)],pps:J[t(855)],vps:J[t(1271)]});te[t(665)](e,{type:we[t(1226)],ts:0,isIFrame:!0,cts:0}),J[t(409)]=null,J[t(855)]=null,J[t(1271)]=null}if(J[t(899)]){if(J[t(409)]&&J.pps&&J[t(1271)]){const e=nn({sps:J[t(409)],pps:J[t(855)],vps:J[t(1271)]}),r=J[t(1212)];te[t(665)](e,{type:we[t(1226)],ts:r,isIFrame:!0,cts:0}),J[t(409)]=null,J.pps=null,J[t(1271)]=null}if(s){const e=J[t(1145)](),r=on(s,i);if(te[t(411)][t(540)]&&o){const r=It(o,!0);postMessage({cmd:be[t(1129)],buffer:r[t(716)],ts:e},[r.payload[t(441)]])}J[t(519)](r,{type:we[t(1226)],ts:e,isIFrame:i,cts:0})}}}))},handleVideoH265Frames_1(t){t[e(1233)]((e=>{J.handleVideoNalu(e)}))},parseVideo264Header(t){const r=e,n=new Wa(t);return n[r(595)](),{isfms:0===n[r(417)](),sType:n[r(417)]()}},parseVideo265Header(t){const r=e,n=new Wa(t);return n[r(595)](),{nalType:n.readBits(6),isfms:0===n.readBits(1),sType:n[r(1244)](3)}}},X={LOG_NAME:"worker fmp4Demuxer",mp4Box:null,offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){const t=e;X.mp4Box=bo[t(1151)](),X[t(434)][t(928)]=X[t(928)],X[t(434)].onError=X[t(1207)],X[t(434)][t(1228)]=X[t(1228)],te[t(1092)](X.LOG_NAME,"init")},destroy(){const t=e;X[t(434)]&&(X.mp4Box[t(415)](),X[t(434)][t(607)](),X[t(434)].destroy(),X[t(434)]=null),X.offset=0,X[t(1028)]=null,X[t(883)]=null,X[t(330)]=!1,te[t(1092)](X[t(880)],t(1251))},_getSeqHeader(t){const r=e,n=X.mp4Box[r(1216)](t.id);for(const e of n[r(385)][r(1018)].stbl[r(500)][r(913)])if(e.avcC||e[r(647)]){const t=new(bo[r(1056)])(void 0,0,bo.DataStream[r(857)]);let n=[];e[r(1125)]?(e[r(1125)].write(t),n=[23,0,0,0,0]):(X.isHevc=!0,te[r(330)]=!0,e[r(647)][r(866)](t),n=[28,0,0,0,0]);const i=new Uint8Array(t[r(441)],8),s=new Uint8Array(n.length+i[r(573)]);return s[r(295)](n,0),s[r(295)](i,n[r(573)]),s}return null},onReady(t){const r=e;te[r(1092)](X.LOG_NAME,r(510));const n=t.videoTracks[0],i=t[r(287)][0];if(n){X[r(1028)]=n.id;const e=X[r(983)](n);e&&(te[r(1092)](X[r(880)],"seqHeader"),te[r(1213)](e,0,!0,0)),X.mp4Box[r(732)](n.id)}if(i&&te._opt[r(1238)]){X[r(883)]=i.id;const e=i[r(480)]||{},t=lt[r(916)](e[r(717)]),n=i[r(604)][r(516)](r(392),"");X[r(434)][r(732)](i.id);const s=dt({profile:parseInt(n,10),sampleRate:t,channel:e[r(779)]});te[r(1092)](X.LOG_NAME,"aacADTSHeader"),te[r(760)](s,0)}X.mp4Box.start()},onError(t){const r=e;te[r(340)](X[r(880)],r(358),t)},onSamples(t,r,n){const i=e;if(t===X.videoTrackId){for(const e of n){const t=e[i(1146)],r=e[i(491)],n=1e3*e.cts/e[i(817)];e.duration,e[i(817)],r&&te.calcIframeIntervalTimestamp(n);let s=null;s=X.isHevc?on(t,r):xr(t,r),te[i(665)](s,{type:we[i(1226)],ts:n,isIFrame:r,cts:0})}X[i(434)].removeUsedSamples(t)}else if(t===X[i(883)]){if(te[i(411)][i(1238)]){for(const e of n){const t=e[i(1146)],r=1e3*e[i(854)]/e[i(817)];e[i(386)],e[i(817)];const n=new Uint8Array(t[i(709)]+2);n[i(295)]([175,1],0),n[i(295)](t,2),te[i(665)](n,{type:we.audio,ts:r,isIFrame:!1,cts:0})}X[i(434)].removeUsedSamples(t)}}else te[i(1219)](X[i(880)],i(588),t)},dispatch(t){const r=e;let n=new Uint8Array(t);n[r(441)][r(882)]=X[r(433)],X[r(433)]+=n[r(709)],X[r(434)].appendBuffer(n[r(441)])}},Y={LOG_NAME:e(344),lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:"init",hasInitVideoCodec:!1,localDts:0,dispatch(t){const r=e,n=new Uint8Array(t);Y[r(318)](n)},destroy(){const t=e;Y.lastBuffer=new Uint8Array(0),Y[t(869)]=0,Y[t(359)]=0,Y.secondStartCodeOffset=0,Y[t(961)]=t(720),Y[t(1009)]=!1,Y[t(1212)]=0,te[t(1092)](Y.LOG_NAME,t(1251))},extractNALu(t){const r=e;if(!t||t[r(709)]<1)return void te[r(1219)](Y[r(880)],r(1222),t);const n=new Uint8Array(Y[r(1139)][r(573)]+t.length);for(n[r(295)](Y[r(1139)],0),n.set(new Uint8Array(t),Y[r(1139)][r(573)]),Y[r(1139)]=n;;){if(Y[r(961)]===r(720)){let e=!1;for(;Y[r(1139)].length-Y[r(869)]>=4;)if(0===Y[r(1139)][Y.parsedOffset])if(0===Y[r(1139)][Y.parsedOffset+1])if(1===Y[r(1139)][Y.parsedOffset+2]){if(182===Y[r(1139)][Y[r(869)]+3]){Y.state=r(696),Y.firstStartCodeOffset=Y[r(869)],Y[r(869)]+=4,e=!0;break}Y[r(869)]++}else Y[r(869)]++;else Y[r(869)]++;else Y[r(869)]++;if(e)continue;break}if(Y[r(961)]===r(696)){let e=!1;for(;Y.lastBuffer[r(573)]-Y[r(869)]>=4;)if(0===Y[r(1139)][Y.parsedOffset])if(0===Y.lastBuffer[Y[r(869)]+1])if(1===Y[r(1139)][Y[r(869)]+2]){if(182===Y.lastBuffer[Y[r(869)]+3]){Y[r(961)]=r(784),Y[r(740)]=Y[r(869)],Y[r(869)]+=4,e=!0;break}Y[r(869)]++}else Y[r(869)]++;else Y.parsedOffset++;else Y[r(869)]++;if(e)continue;break}if(Y.state===r(784)){if(!(Y[r(1139)][r(573)]-Y[r(869)]>0))break;{let e,t=192&Y[r(1139)][Y[r(869)]];e=0==t?Y.secondStartCodeOffset-14:Y[r(740)];let n,i=0==(192&Y[r(1139)][Y[r(359)]+4]);if(i){if(Y[r(359)]-14<0)return void te.debugWarn(Y[r(880)],r(627),Y[r(359)]-14);!Y[r(1009)]&&(Y.hasInitVideoCodec=!0,te.debugLog(Y[r(880)],r(1179)),ae.setCodec(De[r(570)],"",te[r(646)]())),n=Y[r(1139)][r(1062)](Y[r(359)]-14,e)}else n=Y[r(1139)][r(1062)](Y.firstStartCodeOffset,e);let s=Y[r(1145)]();Y[r(1009)]?(postMessage({cmd:be[r(314)],type:Ee[r(738)],value:n[r(709)]}),postMessage({cmd:be[r(314)],type:Ee.streamDts,value:s}),_=s,ae[r(665)](n,i?1:0,s)):te[r(1219)](Y[r(880)],r(675)),Y[r(1139)]=Y.lastBuffer.subarray(e),Y[r(359)]=0==t?14:0,Y[r(869)]=Y[r(359)]+4,Y.state=r(696)}}}},getNaluDts(){const t=e;let r=Y.localDts;return Y[t(1212)]=Y[t(1212)]+40,r}},Z={TAG_NAME:e(917),first_parse_:!0,tsPacketSize:0,syncOffset:0,pmt_:null,config_:null,media_info_:new Oa,timescale_:90,duration_:0,pat_:{version_number:0,network_pid:0,program_map_pid:{}},current_program_:null,current_pmt_pid_:-1,program_pmt_map_:{},pes_slice_queues_:{},section_slice_queues_:{},video_metadata_:{vps:null,sps:null,pps:null,details:null},audio_metadata_:{codec:null,audio_object_type:null,sampling_freq_index:null,sampling_frequency:null,channel_config:null},last_pcr_:null,audio_last_sample_pts_:void 0,aac_last_incomplete_data_:null,has_video_:!1,has_audio_:!1,video_init_segment_dispatched_:!1,audio_init_segment_dispatched_:!1,video_metadata_changed_:!1,audio_metadata_changed_:!1,loas_previous_frame:null,video_track_:{type:e(1226),id:1,sequenceNumber:0,samples:[],length:0},audio_track_:{type:"audio",id:2,sequenceNumber:0,samples:[],length:0},_remainingPacketData:null,init(){},destroy(){const t=e;Z[t(597)]=null,Z[t(1081)]=null,Z[t(544)]=null,Z[t(623)]=null,Z[t(506)]=null,Z[t(345)]=null,Z[t(672)]=null,Z[t(834)]=null,Z._remainingPacketData=null,te[t(1092)](Z.TAG_NAME,t(1251))},probe(t){const r=e;let n=new Uint8Array(t),i=-1,s=188;if(n[r(709)]<=3*s)return{needMoreData:!0};for(;-1===i;){let e=Math.min(1e3,n[r(709)]-3*s);for(let t=0;t=4&&(i-=4),{match:!0,consumed:0,ts_packet_size:s,sync_offset:i})},_initPmt:()=>({program_number:0,version_number:0,pcr_pid:0,pid_stream_type:{},common_pids:{h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0,g711a:void 0,g711u:void 0},pes_private_data_pids:{},timed_id3_pids:{},synchronous_klv_pids:{},asynchronous_klv_pids:{},scte_35_pids:{},smpte2038_pids:{}}),dispatch(t){const r=e;Z[r(467)]&&(t=ua(Z[r(467)],t),Z[r(467)]=null);let n=t[r(441)];const i=Z[r(507)](n);i?Z._remainingPacketData=t.subarray(i):t.length>>6;e[1];let o=(31&e[1])<<8|e[2],a=(48&e[3])>>>4,c=15&e[3],u=!(!Z.pmt_||Z[r(1003)][r(929)]!==o),l={},d=4;if(2==a||3==a){let t=e[4];if(t>0&&(u||3==a)&&(l[r(427)]=(128&e[5])>>>7,l.random_access_indicator=(64&e[5])>>>6,l[r(839)]=(32&e[5])>>>5,(16&e[5])>>>4)){let t=300*(e[6]<<25|e[7]<<17|e[8]<<9|e[9]<<1|e[10]>>>7)+((1&e[10])<<8|e[11]);Z.last_pcr_=t}if(2==a||5+t===188){n+=188,204===Z[r(610)]&&(n+=16);continue}d=5+t}if(1==a||3==a)if(0===o||o===Z[r(1178)]||null!=Z[r(1003)]&&Z[r(1003)][r(514)][o]===Ma[r(1116)]){let e=188-d;Z.handleSectionSlice(t,n+d,e,{pid:o,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l[r(937)]})}else if(null!=Z[r(1003)]&&null!=Z[r(1003)][r(514)][o]){let e=188-d,i=Z.pmt_[r(514)][o];(o===Z[r(1003)].common_pids[r(1006)]||o===Z[r(1003)].common_pids[r(378)]||o===Z[r(1003)][r(1082)].adts_aac||o===Z.pmt_[r(1082)][r(1170)]||o===Z.pmt_.common_pids[r(1180)]||o===Z.pmt_[r(1082)][r(715)]||o===Z[r(1003)][r(1082)].opus||o===Z[r(1003)][r(1082)][r(1255)]||o===Z[r(1003)][r(1082)][r(799)]||o===Z.pmt_[r(1082)][r(743)]||!0===Z[r(1003)][r(1043)][o]||!0===Z[r(1003)][r(1016)][o]||!0===Z[r(1003)][r(767)][o]||!0===Z[r(1003)][r(1239)][o])&&Z[r(814)](t,n+d,e,{pid:o,stream_type:i,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l.random_access_indicator})}n+=188,204===Z[r(610)]&&(n+=16)}return Z[r(824)](),n},handleSectionSlice(t,r,n,i){const s=e;let o=new Uint8Array(t,r,n),a=Z.section_slice_queues_[i[s(1205)]];if(i[s(635)]){let e=o[0];if(null!=a&&0!==a[s(808)]){let o=new Uint8Array(t,r+1,Math[s(296)](n,e));a[s(486)][s(708)](o),a[s(808)]+=o.byteLength,a[s(808)]===a[s(1119)]?Z[s(563)](a,i):Z.clearSlices(a,i)}for(let c=1+e;c=a.expected_length&&Z.clearSlices(a,i),c+=u.byteLength}}else if(null!=a&&0!==a[s(808)]){let e=new Uint8Array(t,r,Math.min(n,a[s(1119)]-a.total_length));a[s(486)][s(708)](e),a[s(808)]+=e[s(709)],a[s(808)]===a[s(1119)]?Z.emitSectionSlices(a,i):a.total_length>=a[s(1119)]&&Z[s(1273)](a,i)}},handlePESSlice(t,r,n,i){const s=e;let o=new Uint8Array(t,r,n),a=o[0]<<16|o[1]<<8|o[2];o[3];let c=o[4]<<8|o[5];if(i.payload_unit_start_indicator){if(1!==a)return void te[s(1219)](Z[s(810)],s(860)+a);let e=Z[s(1081)][i.pid];e&&(0===e[s(1119)]||e[s(1119)]===e.total_length?Z.emitPESSlices(e,i):Z[s(1273)](e,i)),Z.pes_slice_queues_[i[s(1205)]]=new Ua,Z[s(1081)][i[s(1205)]][s(937)]=i[s(937)]}if(null==Z[s(1081)][i[s(1205)]])return;let u=Z.pes_slice_queues_[i[s(1205)]];u.slices[s(708)](o),i[s(635)]&&(u.expected_length=0===c?0:c+6),u[s(808)]+=o.byteLength,u[s(1119)]>0&&u[s(1119)]===u.total_length?Z[s(535)](u,i):u[s(1119)]>0&&u.expected_length>>6,c=n[8];(2===a||3===a)&&(e=536870912*(14&n[9])+4194304*(255&n[10])+16384*(254&n[11])+128*(255&n[12])+(254&n[13])/2,i=3===a?536870912*(14&n[14])+4194304*(255&n[15])+16384*(254&n[16])+128*(255&n[17])+(254&n[18])/2:e);let u,l=9+c;if(0!==o){if(o<3+c)return void te.debugWarn(Z[r(810)],r(724));u=o-3-c}else u=n[r(709)]-l;let d=n.subarray(l,l+u);switch(t[r(1073)]){case Ma[r(297)]:case Ma[r(643)]:Z.parseMP3Payload(d,e);break;case Ma.kPESPrivateData:Z.pmt_[r(1082)].opus===t[r(1205)]?Z.parseOpusPayload(d,e):Z[r(1003)].common_pids[r(1180)]===t.pid?Z[r(323)](d,e):Z.pmt_.common_pids.eac3===t.pid?Z[r(1069)](d,e):Z[r(1003)][r(1239)][t.pid]?Z[r(316)](d,t[r(1205)],s):Z[r(1003)][r(806)][t.pid]?Z[r(311)](d,e,i,t[r(1205)],s):Z[r(550)](d,e,i,t[r(1205)],s);break;case Ma.kADTSAAC:Z[r(1059)](d,e);break;case Ma[r(1074)]:Z[r(298)](d,e);break;case Ma.kAC3:Z[r(323)](d,e);break;case Ma.kEAC3:Z[r(1069)](d,e);break;case Ma[r(1035)]:Z[r(1003)][r(1016)][t[r(1205)]]?Z[r(734)](d,e,i,t[r(1205)],s):Z[r(1003)][r(767)][t[r(1205)]]&&Z.parseSynchronousKLVMetadataPayload(d,e,i,t[r(1205)],s);break;case Ma[r(1055)]:Z.parseH264Payload(d,e,i,t[r(937)]);break;case Ma[r(756)]:Z[r(1218)](d,e,i,t[r(937)]);break;case Ma[r(700)]:Z.parseG711Payload(d,e,!0);break;case Ma[r(634)]:Z[r(943)](d,e,!1);break;default:te[r(1092)](Z[r(810)],"Unsupported stream. type: "+t.stream_type+", pid: "+t[r(1205)])}}else if((188===s||191===s||240===s||241===s||255===s||242===s||248===s)&&t[r(1073)]===Ma[r(553)]){let e,i=6;e=0!==o?o:n[r(709)]-i;let a=n[r(1062)](i,i+e);Z.parsePESPrivateDataPayload(a,void 0,void 0,t[r(1205)],s)}}else te[r(340)](Z[r(810)],r(1021)+i)},parsePAT(t){const r=e;let n=t[0];if(0!==n)return void Log.e(Z[r(320)],r(904)+n+r(666));let i=(15&t[1])<<8|t[2];t[3],t[4];let s=(62&t[5])>>>1,o=1&t[5],a=t[6];t[7];let c=null;if(1===o&&0===a)c={version_number:0,network_pid:0,program_pmt_pid:{}},c[r(1263)]=s;else if(c=Z[r(918)],null==c)return;let u=i-5-4,l=-1,d=-1;for(let e=8;e<8+u;e+=4){let n=t[e]<<8|t[e+1],i=(31&t[e+2])<<8|t[e+3];0===n?c[r(1259)]=i:(c[r(481)][n]=i,-1===l&&(l=n),-1===d&&(d=i))}1===o&&0===a&&(null==Z[r(918)]&&te[r(1092)](Z.TAG_NAME,r(816)+JSON.stringify(c)),Z.pat_=c,Z[r(644)]=l,Z.current_pmt_pid_=d)},parsePMT(t){const r=e;let n=t[0];if(2!==n)return void te[r(340)](Z[r(810)],r(874)+n+r(579));let i,s=(15&t[1])<<8|t[2],o=t[3]<<8|t[4],a=(62&t[5])>>>1,c=1&t[5],u=t[6];if(t[7],1===c&&0===u)i=Z[r(1136)](),i[r(369)]=o,i[r(1263)]=a,Z[r(499)][o]=i;else if(i=Z[r(499)][o],null==i)return;i[r(929)]=(31&t[8])<<8|t[9];let l=(15&t[10])<<8|t[11],d=12+l,h=s-9-l-4;for(let e=d;e0){for(let n=e+5;n0)for(let n=e+5;n1&&(te[n(1219)](Z[n(810)],n(744)+"expected: "+e+n(439)+s+"ms"),s=e)}}let o,a=new gt(t),c=null,u=s;for(;null!=(c=a[n(589)]());){i=1024/c.sampling_frequency*1e3;const e={codec:n(1264),data:c};0==Z.audio_init_segment_dispatched_?(Z.audio_metadata_={codec:n(1264),audio_object_type:c[n(663)],sampling_freq_index:c[n(944)],sampling_frequency:c[n(502)],channel_config:c[n(1258)]},Z[n(994)](e)):Z[n(449)](e)&&(Z[n(905)](),Z[n(994)](e)),o=u;let t=Math[n(613)](u);const r=new Uint8Array(c[n(1146)][n(573)]+2);r[n(295)]([175,1],0),r[n(295)](c[n(1146)],2);let s={payload:r,length:r[n(709)],pts:t,dts:t,type:we[n(480)]};Z[n(834)][n(689)][n(708)](s),Z[n(834)][n(573)]+=r[n(709)],u+=i}a[n(429)]()&&(Z[n(345)]=a[n(527)]()),o&&(Z.audio_last_sample_pts_=o)},parseLOASAACPayload(t,r){const n=e;if(Z[n(823)]&&!Z[n(1110)])return;if(Z[n(345)]){let e=new Uint8Array(t[n(709)]+Z[n(345)].byteLength);e[n(295)](Z[n(345)],0),e[n(295)](t,Z[n(345)][n(709)]),t=e}let i,s;if(null!=r&&(s=r/Z[n(976)]),Z[n(506)][n(604)]===n(1264)){if(null==r&&null!=Z[n(1161)])i=1024/Z[n(506)][n(502)]*1e3,s=Z[n(1161)]+i;else if(null==r)return void te[n(1219)](Z[n(810)],n(710));if(Z[n(345)]&&Z[n(1161)]){i=1024/Z.audio_metadata_[n(502)]*1e3;let e=Z[n(1161)]+i;Math[n(450)](e-s)>1&&(te[n(1219)](Z[n(320)],"AAC: Detected pts overlapped, "+(n(362)+e+n(439)+s)+"ms"),s=e)}}let o,a=new _t(t),c=null,u=s;for(;null!=(c=a.readNextAACFrame(Rt(Z[n(998)])?void 0:Z[n(998)]));){Z.loas_previous_frame=c,i=1024/c.sampling_frequency*1e3;const e={codec:n(1264),data:c};0==Z.audio_init_segment_dispatched_?(Z[n(506)]={codec:n(1264),audio_object_type:c[n(663)],sampling_freq_index:c[n(944)],sampling_frequency:c[n(502)],channel_config:c[n(1258)]},Z[n(994)](e)):Z[n(449)](e)&&(Z[n(905)](),Z[n(994)](e)),o=u;let t=Math[n(613)](u);const r=new Uint8Array(c[n(1146)][n(573)]+2);r[n(295)]([175,1],0),r[n(295)](c[n(1146)],2);let s={payload:r,length:r[n(709)],pts:t,dts:t,type:we[n(480)]};Z[n(834)][n(689)][n(708)](s),Z.audio_track_[n(573)]+=r[n(709)],u+=i}a[n(429)]()&&(Z[n(345)]=a[n(527)]()),o&&(Z[n(1161)]=o)},parseAC3Payload(e,t){},parseEAC3Payload(e,t){},parseOpusPayload(e,t){},parseMP3Payload(t,r){const n=e;if(Z[n(823)]&&!Z[n(1110)])return;let i=[44100,48e3,32e3,0],s=[22050,24e3,16e3,0],o=[11025,12e3,8e3,0],a=t[1]>>>3&3,c=(6&t[1])>>1,u=(t[2],(12&t[2])>>>2),l=3!=(t[3]>>>6&3)?2:1,d=0,h=34;switch(a){case 0:d=o[u];break;case 2:d=s[u];break;case 3:d=i[u]}switch(c){case 1:h=34,n(573);break;case 2:h=33,n(573);break;case 3:h=32,n(573)}const f={};f[n(827)]=h,f[n(717)]=d,f.channel_count=l,f[n(1146)]=t;const p={codec:n(1255),data:f};0==Z.audio_init_segment_dispatched_?(Z.audio_metadata_={codec:n(1255),object_type:h,sample_rate:d,channel_count:l},Z.dispatchAudioInitSegment(p)):Z.detectAudioMetadataChange(p)&&(Z[n(905)](),Z[n(994)](p));const m=new Uint8Array(t[n(573)]+1);m.set([32],0),m.set(t,1);let v={payload:m,length:m[n(709)],pts:r/Z[n(976)],dts:r/Z[n(976)],type:we[n(480)]};Z[n(834)].samples.push(v),Z.audio_track_[n(573)]+=m[n(709)]},parseG711Payload(t,r,n){const i=e;if(Z[i(823)]&&!Z[i(1110)])return;const s={};s[i(717)]=8e3,s[i(779)]=1;const o={codec:n?i(799):"g711u"};0==Z[i(360)]?(Z[i(506)]={codec:o[i(604)],sample_rate:s[i(717)],channel_count:s[i(779)]},Z[i(994)](o)):Z.detectAudioMetadataChange(o)&&(Z.dispatchAudioMediaSegment(),Z[i(994)](o));const a=new Uint8Array(t[i(573)]+1),c=n?[114]:[130];a[i(295)](c,0),a[i(295)](t,1);let u={payload:a,length:a[i(709)],pts:r/Z[i(976)],dts:r/Z[i(976)],type:we[i(480)]};Z[i(834)].samples.push(u),Z.audio_track_[i(573)]+=a[i(709)]},detectAudioMetadataChange(t){const r=e;if(t[r(604)]!==Z[r(506)][r(604)])return te[r(1092)](Z[r(810)],r(785)+(Z[r(506)].codec+r(331)+t[r(604)])),!0;if("aac"===t[r(604)]&&"aac"===Z[r(506)].codec){const e=t[r(1146)];if(e[r(663)]!==Z.audio_metadata_.audio_object_type)return te.debugLog(Z[r(810)],"AAC: AudioObjectType changed from "+(Z.audio_metadata_[r(663)]+r(331)+e.audio_object_type)),!0;if(e.sampling_freq_index!==Z[r(506)][r(944)])return te[r(1092)](Z[r(810)],"AAC: SamplingFrequencyIndex changed from "+(Z.audio_metadata_[r(944)]+r(331)+e[r(944)])),!0;if(e[r(1258)]!==Z[r(506)][r(1258)])return te[r(1092)](Z[r(810)],r(583)+(Z[r(506)][r(1258)]+r(331)+e[r(1258)])),!0}else if("ac-3"===t.codec&&Z[r(506)][r(604)]===r(680)){const e=t[r(1146)];if(e[r(502)]!==Z.audio_metadata_[r(502)])return te[r(1092)](Z[r(810)],"AC3: Sampling Frequency changed from "+Z[r(506)].sampling_frequency+" to "+e[r(502)]),!0;if(e[r(1099)]!==Z[r(506)][r(1099)])return te[r(1092)](Z[r(810)],"AC3: Bit Stream Identification changed from "+(Z.audio_metadata_[r(1099)]+r(331)+e[r(1099)])),!0;if(e[r(657)]!==Z[r(506)][r(657)])return te[r(1092)](Z[r(810)],r(561)+(Z[r(506)].bit_stream_mode+r(331)+e[r(657)])),!0;if(e.channel_mode!==Z.audio_metadata_[r(889)])return te[r(1092)](Z[r(810)],r(478)+(Z.audio_metadata_.channel_mode+r(331)+e[r(889)])),!0;if(e[r(1083)]!==Z[r(506)].low_frequency_effects_channel_on)return te[r(1092)](Z.TAG_NAME,r(800)+(Z[r(506)][r(1083)]+r(331)+e[r(1083)])),!0}else if("opus"===t[r(604)]&&Z[r(506)][r(604)]===r(662)){const e=t[r(1261)];if(e[r(717)]!==Z[r(506)][r(717)])return te[r(1092)](Z[r(810)],r(569)+(Z[r(506)][r(717)]+r(331)+e[r(717)])),!0;if(e[r(779)]!==Z[r(506)][r(779)])return te[r(1092)](Z[r(810)],r(876)+(Z[r(506)].channel_count+r(331)+e.channel_count)),!0}else if("mp3"===t[r(604)]&&"mp3"===Z[r(506)][r(604)]){const e=t[r(1146)];if(e[r(827)]!==Z[r(506)][r(827)])return te[r(1092)](Z.TAG_NAME,r(935)+(Z[r(506)].object_type+r(331)+e[r(827)])),!0;if(e.sample_rate!==Z.audio_metadata_.sample_rate)return te.debugLog(Z[r(810)],r(1266)+(Z.audio_metadata_[r(717)]+r(331)+e[r(717)])),!0;if(e[r(779)]!==Z[r(506)][r(779)])return te[r(1092)](Z[r(810)],r(753)+(Z[r(506)][r(779)]+r(331)+e[r(779)])),!0}return!1},dispatchAudioInitSegment(t){const r=e;let n={};if(n[r(335)]="audio",n.id=Z[r(834)].id,n[r(817)]=1e3,n[r(386)]=Z.duration_,"aac"===Z[r(506)][r(604)]){let e=t.codec===r(1264)?t.data:null,i=new Na(e);n[r(953)]=i[r(641)],n[r(1057)]=i[r(648)],n[r(602)]=i.channel_count,n.codec=i[r(578)],n[r(601)]=i[r(301)],n[r(921)]=i[r(921)],n[r(1084)]=1024/n.audioSampleRate*n[r(817)],r(950);const s=dt({profile:te[r(411)][r(592)]?i.object_type:i[r(1144)],sampleRate:n[r(1057)],channel:n.channelCount});te[r(760)](s,0)}else Z[r(506)][r(604)]===r(680)||Z[r(506)][r(604)]===r(1030)||Z.audio_metadata_[r(604)]===r(662)||("mp3"===Z[r(506)][r(604)]?(n[r(953)]=Z[r(506)][r(717)],n[r(602)]=Z[r(506)][r(779)],n[r(604)]=r(1255),n.originalCodec=r(1255),n[r(921)]=void 0,r(822)):Z[r(506)][r(604)]===r(799)?(n[r(953)]=Z[r(506)][r(717)],n[r(602)]=Z.audio_metadata_.channel_count,n[r(604)]=r(799),n[r(601)]=r(799),n[r(921)]=void 0,r(700)):"g711u"===Z[r(506)].codec&&(n.audioSampleRate=Z[r(506)][r(717)],n.channelCount=Z[r(506)][r(779)],n[r(604)]="g711u",n[r(601)]=r(743),n.config=void 0,r(634)));0==Z[r(360)]&&te.debugLog(Z.TAG_NAME,"Generated first AudioSpecificConfig for mimeType: "+n[r(604)]),Z.audio_init_segment_dispatched_=!0,Z[r(1124)]=!1},dispatchPESPrivateDataDescriptor(t,r,n){const i=e;let s={};s[i(1205)]=t,s[i(1073)]=r,s.descriptor=n},parsePESPrivateDataPayload(t,r,n,i,s){const o=e;let a=new Ra;if(a[o(1205)]=i,a[o(399)]=s,a[o(403)]=t[o(709)],a[o(1146)]=t,null!=r){let e=Math.floor(r/Z[o(976)]);a[o(1163)]=e}else a[o(1149)]=Z[o(805)]();if(null!=n){let e=Math[o(613)](n/Z[o(976)]);a[o(1160)]=e}},parseTimedID3MetadataPayload(t,r,n,i,s){const o=e;te[o(1092)](Z[o(810)],"Timed ID3 Metadata: pid="+i+o(981)+r+", dts="+n+o(820)+s)},parseSynchronousKLVMetadataPayload(t,r,n,i,s){const o=e;te.debugLog(Z.TAG_NAME,o(1053)+i+", pts="+r+o(609)+n+o(820)+s)},parseAsynchronousKLVMetadataPayload(t,r,n){const i=e;te.debugLog(Z[i(810)],i(863)+r+i(820)+n)},parseSMPTE2038MetadataPayload(t,r,n,i,s){const o=e;te[o(1092)](Z[o(810)],"SMPTE 2038 Metadata: pid="+i+o(981)+r+o(609)+n+o(820)+s)},getNearestTimestampMilliseconds(){const t=e;return null!=Z.audio_last_sample_pts_?Math[t(613)](Z[t(1161)]):null!=Z[t(303)]?Math[t(613)](Z[t(303)]/300/Z[t(976)]):void 0},_preDoDecode(){const t=e,r=Z[t(672)],n=Z.audio_track_;let i=r[t(689)];Z[t(459)](r),Z[t(459)](n),n[t(689)].length>0&&(i=r[t(689)][t(886)](n.samples),i=i[t(1183)](((e,r)=>{const n=t;return e[n(1160)]-r[n(1160)]}))),i[t(1233)]((e=>{const r=t,n=new Uint8Array(e.payload);delete e[r(716)],e[r(335)]===we[r(1226)]?Z[r(1227)]({...e,payload:n}):e.type===we[r(480)]&&Z[r(307)]({...e,payload:n})})),r[t(689)]=[],r.length=0,n[t(689)]=[],n[t(573)]=0},_doDecodeVideo(t){const r=e,n=new Uint8Array(t.payload);let i=null;i=t.isHevc?on(n,t[r(1220)]):xr(n,t.isIFrame),t.isIFrame&&te[r(328)](t[r(1160)]);const s=te[r(541)](i,t.isIFrame);te.decode(s,{type:we.video,ts:t[r(1160)],isIFrame:t[r(1220)],cts:t[r(854)]})},_doDecodeAudio(t){const r=e,n=new Uint8Array(t[r(716)]),i=te[r(759)](n);te[r(665)](i,{type:we[r(480)],ts:t[r(1160)],isIFrame:!1,cts:0})},correctSamplePts(t){const r=e;let n=arguments[r(573)]>1&&void 0!==arguments[1]?arguments[1]:5;const i=t[r(689)]||[];for(let e=0;e=s[r(1160)]&&(te[r(1219)](Z[r(810)],r(389)+t.dts+r(752)+s[r(1160)]+r(619)),s[r(1160)]=t[r(1160)]+n)}}},Q=null;Kt()&&(Q={TAG_NAME:e(653),_resetInIt(){const t=e;Q[t(622)]=null,Q[t(1079)]=null,Q[t(396)]={},Q[t(836)]={},Q[t(373)]={},Q[t(325)]=null,Q[t(674)]=null,Q[t(927)]=!1,Q[t(490)]=!1,Q[t(367)]=!1,Q[t(906)]="",Q[t(353)]="",Q[t(1027)]={},Q[t(706)]={},Q.timeInit=!1,Q[t(465)]=0,Q[t(1060)]=0,Q[t(1076)]=null,Q[t(1115)]=null,Q[t(463)]=!1,Q[t(973)]=!1,Q[t(315)]=!1,Q[t(572)]=!1,Q.mediaSourceError=!1,Q[t(346)]=null,Q[t(460)]=null,Q[t(1017)]=null,Q[t(600)]=null,Q[t(397)]=0,Q[t(1234)]=!1,Q[t(319)]=null,Q[t(476)]=null,Q[t(624)]=[],Q.pendingRemoveRanges=[],Q[t(405)]=[],Q[t(304)]=[],Q[t(1038)]=[],Q[t(538)]=null,Q[t(684)]=null,Q.audioSourceNoDataCheckTimeout=null,Q[t(1147)]=!1,Q.$video={currentTime:0,readyState:0}},init(){const t=e;Q[t(835)]=new ha,Q[t(896)](),Q[t(664)]=new(self[t(871)]),Q[t(469)]=!!qt(te._opt[t(599)]),Q[t(1042)](),te[t(1092)](Q[t(810)],t(720))},destroy(){const t=e;Q[t(415)](),Q[t(749)](),Q[t(624)]&&Q[t(624)].length&&(Q[t(624)][t(1233)]((e=>e())),Q.eventListenList=[]),Q[t(896)](),Q[t(664)]=null,te[t(1092)](Q[t(810)],t(1251))},getState(){const t=e;return Q.mediaSource&&Q[t(664)][t(1231)]},isStateOpen:()=>Q[e(842)]()===Le.open,isStateClosed(){const t=e;return Q[t(842)]()===Le[t(416)]},isStateEnded:()=>Q[e(842)]()===Le.ended,_bindMediaSourceEvents(){const t=e,{proxy:r}=Q.events,n=r(Q[t(664)],Oe[t(813)],(()=>{const e=t;te[e(1092)](Q[e(810)],e(813)),Q[e(649)]()})),i=r(Q.mediaSource,Oe[t(1051)],(()=>{const e=t;te[e(1092)](Q.TAG_NAME,e(1051))})),s=r(Q.mediaSource,Oe.sourceended,(()=>{const e=t;te[e(1092)](Q[e(810)],e(829))}));Q[t(624)][t(708)](n,i,s)},_onMediaSourceSourceOpen(){const t=e;!Q[t(325)]&&(te.debugLog(Q[t(810)],t(977)),Q[t(774)]()),!Q[t(674)]&&(te[t(1092)](Q[t(810)],t(945)),Q[t(438)]()),Q[t(421)]()&&Q[t(788)]()},decodeVideo(t,r,n,i){const s=e;if(te[s(473)])te.debugWarn(Q.TAG_NAME,s(846));else if(qt(Q.hasInit))if(n&&t[1]===He.sequenceHeader){const e=15&t[0];if(e===De[s(378)]&&qt(te[s(411)][s(453)]))return void Q[s(448)](Ce[s(381)]);Q.videoInfo[s(604)]=e,postMessage({cmd:be.videoCode,code:e});const i=new Uint8Array(t);postMessage({cmd:be[s(747)],buffer:i,codecId:e},[i[s(441)]]),Q[s(927)]=Q[s(815)](t,r,n,e)}else te[s(1219)](Q[s(810)],s(292)+n+s(691)+t[1]+s(387));else if(!Q[s(469)]&&n&&(Q[s(469)]=!0),Q.isDecodeFirstIIframe){if(n&&0===t[1]){const e=15&t[0];let r={};e===De.h264?r=Ar(t[s(471)](5)):e===De[s(378)]&&(r=Qr(t));const n=Q[s(396)];n&&n[s(503)]&&n.height&&r&&r[s(446)]&&r.codecHeight&&(r[s(446)]!==n.width||r[s(1048)]!==n[s(1128)])&&(te.debugWarn(Q.TAG_NAME,"\n decodeVideo: video width or height is changed,\n old width is "+n[s(503)]+s(1046)+n[s(1128)]+s(867)+r[s(446)]+s(1052)+r[s(1048)]+s(1034)),Q.isWidthOrHeightChanged=!0,Q[s(448)](Ce[s(775)],"width: "+n[s(503)]+"->"+r.codecWidth+s(1171)+n[s(1128)]+"->"+r[s(1048)]))}if(Q[s(1234)])return void te[s(1219)](Q[s(810)],s(851));if($t(t))return void te[s(1092)](Q[s(810)],s(796));if(t[s(709)]Q[e(319)]>0&&tme,_decodeConfigurationRecord(t,r,n,i){const s=e;let o=t[s(471)](5),a={};if(i===De.h264?a=Ar(o):i===De[s(378)]&&(a=tn(o)),Q.videoInfo.width=a[s(446)],Q.videoInfo.height=a[s(1048)],0===a[s(446)]&&0===a.codecHeight)return te[s(1219)](Q[s(810)],s(795),JSON.stringify(a)),Q.emitError(Ce[s(845)],s(1235)+(0===a[s(446)])+s(504)+a[s(1048)]),!1;const c={id:$e[s(1226)],type:"video",timescale:1e3,duration:0,avcc:o,codecWidth:a[s(446)],codecHeight:a[s(1048)],videoType:a[s(475)]},u=ma[s(404)](c);return Q[s(622)]=i===De[s(1006)],a.codec?Q.videoMimeType=s(1064)+a[s(604)]+'"':Q[s(906)]=Q[s(622)]?Re[s(773)]:Re.hev,postMessage({cmd:be.initVideo,w:a[s(446)],h:a.codecHeight}),Q._initSourceBuffer(),Q[s(807)](u[s(441)]),Q[s(465)]=0,Q[s(1027)]={},Q[s(770)]=!1,!0},_decodeAudioConfigurationRecord(t,r){const n=e,i=t[0]>>4&15,s=t[0]>>1&1,o=i===Pe.MP3,a=i===Pe[n(950)];if(qt(a||o))return te[n(1219)](Q[n(810)],"_decodeAudioConfigurationRecord audio codec is not support , codecId is "+i+n(479)),Q[n(448)](Ce[n(986)]),!1;const c={id:$e[n(480)],type:"audio",timescale:1e3};let u={};if(ht(t)){if(u=vt(t[n(471)](2)),!u)return!1;c[n(953)]=u[n(542)],c[n(602)]=u.channelCount,c.config=u.config,c[n(1084)]=1024/c[n(953)]*c[n(817)]}else{if(!o)return!1;if(u=Da(t.slice(1)),!u)return!1;c.audioSampleRate=u.sampleRate,c[n(602)]=u.channelCount,c[n(1084)]=1152/c[n(953)]*c[n(817)]}c[n(604)]=u[n(604)],c[n(386)]=0;let l=n(509),d=u[n(604)],h=null;o&&qt(te[n(411)][n(1193)])?(l=n(639),d="",h=new Uint8Array):h=ma[n(404)](c);let f=c[n(335)]+"/"+l;return d&&d[n(573)]>0&&(f+=n(713)+d),qt(Q[n(367)])&&(z=i===Pe[n(950)]?s?16:8:0===s?8:16,postMessage({cmd:be[n(1070)],code:i}),postMessage({cmd:be[n(847)],sampleRate:c.audioSampleRate,channels:c[n(602)],depth:z}),Q[n(367)]=!0),Q[n(353)]=f,Q[n(1079)]=a,Q[n(438)](),Q[n(766)](h[n(441)]),!0},_initSourceBuffer(){const t=e,{proxy:r}=Q[t(835)];if(null===Q[t(325)]&&null!==Q[t(664)]&&Q.isStateOpen()&&Q[t(906)]){try{te[t(1092)](Q.TAG_NAME,t(464),Q[t(906)]),Q[t(325)]=Q[t(664)][t(931)](Q[t(906)])}catch(e){return te.debugError(Q[t(810)],t(288),e[t(1012)],e.toString(),e),Q.emitError(Ce[t(630)],e.code),void(Q[t(315)]=!0)}if(Q[t(325)]){const e=r(Q[t(325)],t(1101),(e=>{const r=t;Q[r(572)]=!0,te.debugError(Q.TAG_NAME,r(702),e),Q[r(448)](Ce[r(771)],r(750))})),n=r(Q[t(325)],t(692),(()=>{const e=t;Q[e(636)]()?Q[e(772)]():Q._hasPendingSegments()?Q[e(788)]():Q[e(1147)]&&(te[e(1092)](Q.TAG_NAME,e(1198)),Q[e(932)]())}));Q[t(624)].push(e,n)}}else te.debugLog(Q[t(810)],t(685)+Q.isStateOpen()+" and mseDecoder.isAvc === null is "+(null===Q[t(622)]))},_initAudioSourceBuffer(){const t=e,{proxy:r}=Q[t(835)];if(null===Q[t(674)]&&null!==Q[t(664)]&&Q[t(1189)]()&&Q[t(353)]){try{te[t(1092)](Q[t(810)],t(804),Q[t(353)]),Q[t(749)](),Q[t(674)]=Q[t(664)].addSourceBuffer(Q[t(353)])}catch(e){return te.debugError(Q[t(810)],"_initAudioSourceBuffer() addSourceBuffer mseDecoder.mediaSource.addSourceBuffer()",e[t(1012)],e[t(1091)](),e),Q[t(448)](Ce[t(630)],e[t(1012)]),void(Q[t(315)]=!0)}if(Q[t(674)]){const e=r(Q.audioSourceBuffer,t(1101),(e=>{const r=t;Q[r(572)]=!0,te.debugError(Q[r(810)],r(966),e),Q[r(448)](Ce.mseSourceBufferError,r(828))})),n=r(Q[t(674)],t(692),(()=>{const e=t;Q[e(636)]()?Q[e(772)]():Q._hasPendingSegments()?Q[e(788)]():Q[e(1147)]&&(te[e(1092)](Q[e(810)],e(1063)),Q[e(932)]())}));Q[t(624)][t(708)](e,n),null===Q.audioSourceNoDataCheckTimeout&&(Q[t(337)]=setTimeout((()=>{const e=t;Q._clearAudioNoDataCheckTimeout(),Q[e(448)](Ce[e(1158)])}),1e3))}}else te[t(1092)](Q[t(810)],t(920)+Q.isStateOpen()+t(618)+Q.audioMimeType)},_decodeVideo(t,r,n,i,s){const o=e;let a=t.slice(5),c=a[o(709)];if(0===c)return void te[o(1219)](Q[o(810)],o(885));let u=(new Date)[o(1075)](),l=!1;!Q[o(346)]&&(Q[o(346)]=u,l=!0);const d=u-Q[o(346)];if(Q.decodeDiffTimestamp=d,d>1e3&&!l&&te[o(551)]&&te[o(1092)](Q.TAG_NAME,o(908)+u+o(741)+Q[o(346)]+o(487)+d+" ms"),Q[o(1027)].id&&r>=Q[o(1027)][o(1160)]){let e=8+Q[o(1027)].size,t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[o(295)](ma[o(299)].mdat,4),t[o(295)](Q[o(1027)][o(1146)],8),Q.cacheTrack[o(386)]=r-Q[o(1027)][o(1160)];let n=ma[o(723)](Q.cacheTrack,Q[o(1027)][o(1160)]);Q[o(1027)]={};let i=new Uint8Array(n[o(709)]+t.byteLength);i[o(295)](n,0),i.set(t,n[o(709)]),Q[o(807)](i[o(441)])}else te[o(1092)](Q.TAG_NAME,o(890)+r+", and ts is "+s+o(1214)+(Q.cacheTrack&&Q[o(1027)][o(1160)])),Q[o(770)]=!1,Q.cacheTrack={};!Q[o(1027)]&&(Q[o(1027)]={}),Q[o(1027)].id=$e[o(1226)],Q[o(1027)].sequenceNumber=++Q[o(465)],Q[o(1027)][o(1223)]=c,Q[o(1027)][o(1160)]=r,Q[o(1027)][o(854)]=i,Q[o(1027)].isKeyframe=n,Q[o(1027)][o(1146)]=a,Q[o(1027)][o(585)]={isLeading:0,dependsOn:n?2:1,isDependedOn:n?1:0,hasRedundancy:0,isNonSync:n?0:1},Q[o(346)]=(new Date).getTime()},_decodeAudio(t,r,n){const i=e;let s=Q.isAAC?t[i(471)](2):t[i(471)](1),o=s[i(709)];if(Q[i(706)].id&&r>=Q[i(706)][i(1160)]){let e=8+Q.cacheAudioTrack[i(1223)],t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t[i(295)](ma.types.mdat,4),t[i(295)](Q[i(706)].data,8),Q[i(706)][i(386)]=r-Q[i(706)][i(1160)];let n=ma[i(723)](Q[i(706)],Q[i(706)][i(1160)]);Q.cacheAudioTrack={};let s=new Uint8Array(n[i(709)]+t.byteLength);s[i(295)](n,0),s[i(295)](t,n[i(709)]),Q[i(766)](s[i(441)])}else Q.cacheAudioTrack={};!Q[i(706)]&&(Q[i(706)]={}),Q.cacheAudioTrack.id=$e[i(480)],Q[i(706)].sequenceNumber=++Q.audioSequenceNumber,Q[i(706)][i(1223)]=o,Q.cacheAudioTrack[i(1160)]=r,Q[i(706)][i(854)]=0,Q.cacheAudioTrack[i(1146)]=s,Q[i(706)][i(585)]={isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}},appendBuffer(t){const r=e;te.isDestroyed?te[r(1219)](Q[r(810)],"appendBuffer() player is destroyed"):Q[r(315)]?te[r(1219)](Q[r(810)],r(497)):Q[r(463)]?te[r(1219)](Q[r(810)],"mseDecoder.mediaSourceAppendBufferFull is true"):Q[r(973)]?te[r(1219)](Q[r(810)],r(559)):Q[r(572)]?te[r(1219)](Q.TAG_NAME,r(571)):(Q[r(405)][r(708)](t),Q.sourceBuffer&&(te[r(411)][r(840)]&&Q[r(919)]()&&Q[r(659)](),qt(Q.getSourceBufferUpdating())&&Q[r(1189)]()&&qt(Q[r(636)]()))?Q[r(788)]():Q[r(352)]()?(Q[r(572)]=!0,Q[r(448)](Ce.mseSourceBufferError,r(737))):Q[r(375)]()&&(Q.mediaSourceBufferError=!0,Q[r(448)](Ce[r(771)],"mediaSource is end")))},appendAudioBuffer(t){const r=e;te.isDestroyed?te.debugWarn(Q[r(810)],"appendAudioBuffer() player is destroyed"):Q[r(315)]?te[r(1219)](Q[r(810)],"mseDecoder.mediaSourceAddSourceBufferError is true"):Q.mediaSourceAppendBufferFull?te.debugWarn(Q.TAG_NAME,"mseDecoder.mediaSourceAppendBufferFull is true"):Q[r(973)]?te.debugWarn(Q[r(810)],r(559)):Q.mediaSourceBufferError?te[r(1219)](Q[r(810)],r(571)):(Q[r(1038)][r(708)](t),Q[r(674)]&&(te[r(411)][r(840)]&&Q[r(919)]()&&Q._doCleanUpSourceBuffer(),qt(Q[r(564)]())&&Q[r(1189)]()&&qt(Q[r(636)]()))?Q._doAppendSegments():Q[r(352)]()?(Q[r(572)]=!0,Q.emitError(Ce[r(771)],r(737))):Q[r(375)]()&&(Q[r(572)]=!0,Q[r(448)](Ce[r(771)],"mediaSource is end")))},getSourceBufferUpdating(){const t=e;return Q[t(325)]&&Q[t(325)][t(1093)]},getAudioSourceBufferUpdating(){const t=e;return Q[t(674)]&&Q[t(674)][t(1093)]},stop(){const t=e;Q.abortSourceBuffer(),Q.removeSourceBuffer(),Q[t(932)]()},clearUpAllSourceBuffer(){const t=e;if(Q[t(325)]){const e=Q[t(325)][t(701)];for(let r=0;r0||Q[t(1038)][t(573)]>0},getPendingSegmentsLength(){const t=e;return Q[t(405)][t(573)]},_doAppendSegments(){const t=e;if(Q.isStateClosed()||Q[t(375)]())te[t(1092)](Q[t(810)],"_doAppendSegments() mediaSource is closed or ended and return");else if(null!==Q[t(325)]){if(Q[t(1025)]()&&null===Q[t(674)])return te.debugLog(Q[t(810)],t(801)),void(null===Q[t(684)]&&(Q[t(684)]=setTimeout((()=>{const e=t;Q[e(749)](),Q[e(448)](Ce[e(324)])}),1e3)));if(qt(Q[t(419)]())&&Q[t(405)][t(573)]>0){const e=Q[t(405)][t(616)]();try{Q[t(325)][t(807)](e)}catch(e){te[t(340)](Q[t(810)],t(1106),e[t(1012)],e),22===e[t(1012)]?(Q.stop(),Q.mediaSourceAppendBufferFull=!0,Q[t(448)](Ce[t(456)],t(470)+e.code+t(746)+e.message)):11===e[t(1012)]?(Q[t(415)](),Q[t(973)]=!0,Q[t(448)](Ce[t(973)],t(470)+e.code+t(746)+e[t(1077)])):(Q[t(415)](),Q[t(572)]=!0,Q.emitError(Ce[t(771)],"code is "+e.code+t(746)+e[t(1077)]))}}if(qt(Q[t(564)]())&&Q.pendingAudioSegments.length>0){const e=Q.pendingAudioSegments.shift();try{Q[t(674)].appendBuffer(e)}catch(e){te[t(340)](Q.TAG_NAME,t(1215),e[t(1012)],e),22===e[t(1012)]?(Q[t(415)](),Q[t(463)]=!0,Q[t(448)](Ce[t(456)],"code is "+e.code+t(746)+e[t(1077)])):11===e[t(1012)]?(Q.stop(),Q[t(973)]=!0,Q.emitError(Ce[t(973)],"code is "+e[t(1012)]+t(746)+e.message)):(Q[t(415)](),Q[t(572)]=!0,Q[t(448)](Ce[t(771)],e.code,t(470)+e.code+t(746)+e.message))}}}else te.debugLog(Q[t(810)],"_doAppendSegments() sourceBuffer is null and wait init and return")},_doCleanUpSourceBuffer(){const t=e,r=Q[t(354)][t(590)];if(Q[t(325)]){const e=Q[t(325)][t(701)];let n=!1;for(let i=0;i=te[t(411)].mseAutoCleanupMaxBackwardDuration){n=!0;let e=r-te[t(411)][t(1047)];Q[t(1194)][t(708)]({start:s,end:e})}}else o=te._opt[t(496)]){n=!0;let e=r-te[t(411)][t(1047)];Q.pendingAudioRemoveRanges.push({start:s,end:e})}}else o0||Q.pendingAudioRemoveRanges[t(573)]>0},needInitAudio(){const t=e;return te[t(411)].hasAudio&&te[t(411)][t(592)]},_doRemoveRanges(){const t=e;if(Q.sourceBuffer&&qt(Q[t(419)]())){let e=Q[t(1194)];for(;e[t(573)]&&qt(Q.getSourceBufferUpdating());){let r=e.shift();try{Q[t(325)].remove(r.start,r.end)}catch(e){te[t(1219)](Q[t(810)],"_doRemoveRanges() sourceBuffer error",e,e[t(1091)]())}}}if(Q[t(674)]&&qt(Q[t(564)]())){let e=Q[t(304)];for(;e[t(573)]&&qt(Q[t(564)]());){let r=e[t(616)]();try{Q[t(674)][t(327)](r[t(621)],r[t(528)])}catch(e){te[t(1219)](Q[t(810)],"_doRemoveRanges() audioSourceBuffer error",e,e[t(1091)]())}}}},_getPlaybackRate(){},_needCleanupSourceBuffer(){const t=e;if(qt(te._opt[t(840)]))return!1;const r=Q[t(354)][t(590)];if(Q[t(325)]){let e=Q[t(325)].buffered;if(e[t(573)]>=1&&r-e[t(621)](0)>=te[t(411)][t(496)])return!0}if(Q[t(674)]){let e=Q[t(674)][t(701)];if(e[t(573)]>=1&&r-e[t(621)](0)>=te[t(411)][t(496)])return!0}return!1},_clearAudioSourceBufferCheckTimeout(){const t=e;Q[t(684)]&&(clearTimeout(Q[t(684)]),Q.audioSourceBufferCheckTimeout=null)},_clearAudioNoDataCheckTimeout(){const t=e;Q[t(337)]&&(clearTimeout(Q[t(337)]),Q[t(337)]=null)},getHandle:()=>Q[e(664)].handle,emitError(t){const r=e;let n=arguments[r(573)]>1&&void 0!==arguments[1]?arguments[1]:"";postMessage({cmd:be[r(898)],value:t,msg:n})}});let te={isPlayer:!0,isHevc:null,isPlayVod:!1,isPlayback:!1,isPlaybackPause:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:We[e(980)],_opt:q(),mp3Demuxer:null,delay:-1,pushLatestDelay:-1,firstTimestamp:null,startTimestamp:null,preDelayTimestamp:null,stopId:null,streamFps:null,streamAudioFps:null,streamVideoFps:null,writableStream:null,networkDelay:0,webglObj:null,socketStatus:Te.notConnect,startStreamRateAndStatsInterval:function(){const t=e;te[t(1201)](),d=setInterval((()=>{const e=t;l&&l(0);const r=JSON[e(1224)]({demuxBufferDelay:te[e(302)](),audioDemuxBufferDelay:te[e(909)](),streamBufferByteLength:te[e(964)](),netBuf:te[e(377)]||0,pushLatestDelay:te[e(374)]||0,latestDelay:te[e(848)],isStreamTsMoreThanLocal:w,wasmDecodeDelay:_-b});postMessage({cmd:be[e(314)],type:Ee[e(1067)],value:r}),Zt()&&(null===W&&(W=Tt()),Qt(Tt()-W)&&te[e(926)]())}),1e3)},stopStreamRateAndStatsInterval:function(){d&&(clearInterval(d),d=null)},_startCheckWsOpenTimeout:function(){const t=e;te[t(401)](),$=setTimeout((()=>{const e=t;if(te[e(444)]===Te.notConnect){const t=e(445)+te[e(411)][e(907)]+e(326)+te[e(444)];te.debugError(e(437),t),postMessage({cmd:be.workerFetch,type:Ce.websocketOpenTimeout,value:ne.websocket,msg:t})}}),1e3*te._opt.websocketOpenTimeout)},_stopCheckWsOpenTimeout:function(){$&&(clearTimeout($),$=null)},useOffscreen:function(){const t=e;return te[t(411)][t(1256)]&&typeof OffscreenCanvas!=t(735)},getDelay:function(t,r){const n=e;if(!t||te[n(411)][n(494)]&&!g)return-1;if(r===we.audio)return te[n(848)];if(te.preDelayTimestamp&&te.preDelayTimestamp>t)return te[n(525)]-t>1e3&&te[n(1219)](n(437),n(1204)+te.preDelayTimestamp+" > timestamp is "+t+n(811)+(te[n(525)]-t)+n(791)+te[n(848)]),te[n(525)]=t,te[n(848)];if(te[n(776)]){if(t){const e=Date.now()-te[n(1246)],r=t-te[n(776)];e>=r?(w=!1,te[n(848)]=e-r):(w=!0,te[n(848)]=r-e)}}else te[n(776)]=t,te[n(1246)]=Date[n(357)](),te[n(848)]=-1;return te[n(525)]=t,te.delay},getDelayNotUpdateDelay:function(t,r){const n=e;if(!t||te[n(411)][n(494)]&&!g)return-1;if(r===we[n(480)])return te[n(374)];if(te.preDelayTimestamp&&te.preDelayTimestamp-t>1e3)return te.debugWarn("worker",n(958)+te[n(525)]+n(1143)+t+n(811)+(te[n(525)]-t)+n(841)),-1;if(te[n(776)]){let e=-1;if(t){const r=Date.now()-te[n(1246)],i=t-te[n(776)];r>=i?(w=!1,e=r-i):(w=!0,e=i-r)}return e}return-1},resetDelay:function(){const t=e;te[t(776)]=null,te[t(1246)]=null,te[t(848)]=-1,te.dropping=!1},resetAllDelay:function(){const t=e;te[t(1243)](),te[t(525)]=null},doDecode:function(t){const r=e;te[r(411)][r(540)]&&t[r(335)]===we[r(1226)]&&te[r(661)]&&te[r(338)](t[r(716)],t.ts),te[r(992)]()?t.type===we[r(480)]?te._opt[r(592)]?Q.decodeAudio(t[r(716)],t.ts):t[r(1102)][r(665)](t.payload,t.ts):t[r(335)]===we[r(1226)]&&Q.decodeVideo(t[r(716)],t.ts,t[r(1220)],t[r(854)]):te[r(411)][r(1229)]&&te[r(1256)]()&&t[r(335)]===we[r(1226)]&&a[r(665)]?a[r(665)](t[r(716)],t.ts,t[r(854)]):t.decoder[r(665)](t[r(716)],t.ts,t[r(1220)],t[r(854)])},decodeNext(t){const r=e;if(0===s[r(573)])return;const i=t.ts,o=s[0],a=t[r(335)]===we[r(1226)]&&$t(t[r(716)]);if(qt(n))a&&(te[r(1092)](r(437),"decode data type is "+t[r(335)]+r(677)+i+r(852)+o[r(335)]+r(393)+o.ts+"\n isVideoSqeHeader is "+a),s[r(616)](),te[r(519)](o));else{const e=o.ts-i,n=o[r(335)]===we[r(480)]&&t[r(335)]===we[r(1226)];(e<=20||n||a)&&(te[r(1092)](r(437),"decode data type is "+t.type+r(677)+i+r(852)+o.type+r(393)+o.ts+r(862)+e+" and isVideoAndNextAudio is "+n+r(1037)+a),s[r(616)](),te[r(519)](o))}},init:function(){const t=e;te.debugLog(t(437),t(482)+n+t(1026)+i+t(408),JSON.stringify(te[t(411)]));const r=te[t(411)][t(1133)]===ie.player,o=te[t(411)][t(1133)]===ie.playbackTF,c=te[t(411)][t(1133)]===ie.playVod;if(te[t(411)][t(812)]&&J[t(720)](),te[t(551)]=r,te.isPlayback=o,te.isPlayVod=c,te[t(992)]()&&Q&&Q.init(),a&&te[t(411)][t(1229)]&&te.useOffscreen()&&a.init(),qt(te.isPlaybackCacheBeforeDecodeForFpsRender())){te[t(1092)]("worker",t(856));const e=()=>{const e=t,n=te._opt[e(642)]+te[e(411)][e(376)];let i=null;if(s[e(573)]){if(te.isPushDropping)return void te[e(1219)](e(437),e(925)+s[e(573)]);if(te.dropping){for(i=s.shift(),te[e(1219)](e(437),e(582)+i[e(1220)]+e(526)+te[e(848)]+" and bufferlist is "+s[e(573)]);!i[e(1220)]&&s[e(573)];)i=s[e(616)]();const t=te[e(1089)](i.ts,i[e(335)]);i[e(1220)]&&t<=te[e(495)]()&&(te[e(1092)](e(437),"loop() is dropping = false, is iFrame"),te[e(912)]=!1,te.doDecode(i),te[e(903)](i))}else if(te[e(530)]||te[e(1097)]()||0===te._opt[e(642)])for(;s.length;)i=s[e(616)](),te[e(519)](i);else if(i=s[0],-1===te[e(704)](i.ts,i.type))te.debugLog(e(437),e(333),i.ts),s[e(616)](),te[e(519)](i),te.decodeNext(i);else if(te[e(848)]>n&&r)te.hasIframeInBufferList()?(te[e(1092)](e(437),e(725)+te[e(848)]+e(711)+n+e(879)),te[e(707)](),te[e(912)]=!0,postMessage({cmd:be.isDropping})):(s.shift(),te[e(519)](i),te.decodeNext(i));else for(;s[e(573)];){if(i=s[0],!(te[e(704)](i.ts,i.type)>te[e(411)].videoBuffer)){te[e(848)]<0&&te[e(1219)]("worker",e(936)+te[e(848)]+", bufferList is "+s.length);break}s.shift(),te[e(519)](i)}}else-1!==te.delay&&te[e(1092)](e(437),"loop() bufferList is empty and reset delay"),te[e(707)]()};te[t(305)]=setInterval((()=>{const r=t;let n=(new Date)[r(1075)]();!S&&(S=n);const i=n-S;i>100&&te[r(1219)](r(437),r(549)+i),e(),S=(new Date)[r(1075)]()}),20)}else te[t(1092)](t(437),t(423));if(qt(te[t(411)][t(599)])&&(g=!0),te[t(992)]()&&Q){const e=Q[t(1230)]();e&&postMessage({cmd:be[t(347)],mseHandle:e},[e])}},playbackCacheLoop:function(){const t=e;te[t(484)]();for(let e=0;e{const e=t,n=(new Date)[e(1075)]();!G&&(G=n);for(let t=0;t1&&s[e(573)]>0&&te[e(1219)]("worker",e(727)+i+e(719)+r+e(698)+o+e(1262)+s[e(573)]),G=n}),r)},doPlaybackCacheLoop:function(){const t=e;let r=null;if(s[t(573)])if(r=s[t(616)](),r.type===we.video){te[t(336)]()?r[t(1220)]&&(te[t(1092)](t(437),t(865),r.ts),te[t(519)](r)):te[t(519)](r);let e=s[0];for(;e&&e.type===we[t(480)];)s[t(616)](),te[t(336)]()||te.doDecode(e),e=s[0]}else if(r[t(335)]===we[t(480)]){te.isPlaybackOnlyDecodeIFrame()||te[t(519)](r);let e=s[0];for(;e;){if(r=s[t(616)](),r[t(335)]===we[t(1226)]){te.isPlaybackOnlyDecodeIFrame()?r[t(1220)]&&(te[t(1092)](t(437),t(865),r.ts),te[t(519)](r)):te.doDecode(r),e=null;break}r[t(335)]===we[t(480)]&&(te.isPlaybackOnlyDecodeIFrame()||te[t(519)](r),e=s[0])}}},clearPlaybackCacheLoop:function(){const t=e;te.stopId&&(clearInterval(te[t(305)]),te.stopId=null),G=null},startPlaybackCacheLoop:function(){te[e(1134)]()},close:function(){const t=e;if(te[t(1092)]("worker",t(926)),te[t(473)]=!0,K(),!u||1!==u.readyState&&2!==u.readyState?u&&te[t(1092)](t(437),t(667)+u.readyState):(N=!0,u[t(926)](1e3,t(1182))),u&&(u[t(1007)]=null,u[t(383)]=null,u[t(536)]=null,u[t(1041)]=null,te.socketStatus=Te[t(1001)]),u=null,te.stopStreamRateAndStatsInterval(),te[t(401)](),te[t(484)](),te[t(305)]&&(clearInterval(te[t(305)]),te.stopId=null),te[t(965)]&&(te[t(965)][t(1251)](),te[t(965)]=null),te[t(384)]&&(Ot(te[t(384)][t(926)])&&qt(te[t(384)][t(1002)])?te.writableStream[t(926)]().catch((e=>{const r=t;te.debugLog(r(437),r(568),e[r(1091)](),e)}))[t(322)]((()=>{te[t(384)]=null})):te[t(384)]=null),oe)try{Ot(oe[t(522)])&&oe[t(522)](),Ot(oe.delete)&&oe[t(968)](),oe=null}catch(e){te[t(1092)](t(437),"close() and audioDecoder.clear error: "+e[t(1091)]()+t(1153))}if(ae)try{Ot(ae[t(522)])&&ae[t(522)](),Ot(ae.delete)&&ae.delete(),ae=null}catch(e){te[t(1092)](t(437),t(372)+e[t(1091)]()+t(1153))}l=null,S=null,w=!1,_=0,b=0,a&&(a[t(1251)]&&a[t(1251)](),a=null),Q&&(Q[t(1251)](),Q=null),te[t(776)]=null,te[t(1246)]=null,te.networkDelay=0,te[t(962)]=null,te.streamAudioFps=null,te[t(1159)]=null,te[t(848)]=-1,te.pushLatestDelay=-1,te[t(525)]=null,te[t(912)]=!1,te[t(513)]=!1,te[t(551)]=!0,te[t(530)]=!1,te[t(975)]=!1,te[t(1068)]=!1,te[t(661)]=!1,te.isHevc=null,te._opt=q(),te[t(1184)]&&(te[t(1184)][t(1251)](),te[t(769)][t(355)](t(614),te[t(967)]),te[t(769)][t(355)](t(1137),te[t(632)]),te[t(769)]=null,te.offscreenCanvasGL=null,te.offscreenCanvasCtx=null),s=[],o=[],h&&(h[t(926)](),h=null),p=null,m=null,v=!1,y=!1,g=!1,F=!1,R=!1,L=!1,O=null,E=[],T=0,x=0,I=null,A=null,D=null,B=null,z=null,P=0,M=0,U=null,k=null,C=null,te[t(317)]=We[t(980)],H=!0,J.destroy(),X[t(1251)](),Y[t(1251)](),Z[t(1251)](),te.debug=null,te[t(411)]={},postMessage({cmd:be.closeEnd})},pushBuffer:function(t,r){const i=e;if(r.type===we[i(480)]&&ht(t)){if(te[i(1092)](i(437),i(951)+r.ts+i(521)),te[i(411)].isRecordTypeFlv){const e=new Uint8Array(t);postMessage({cmd:be[i(531)],buffer:e},[e[i(441)]])}te[i(760)](t,r.ts)}else if(r[i(335)]===we.video&&r[i(1220)]&&$t(t)){if(te[i(1092)]("worker",i(290)+r.ts+i(895)),te[i(411)][i(861)]){const e=new Uint8Array(t);postMessage({cmd:be[i(833)],buffer:e},[e.buffer])}te[i(1213)](t,r.ts,r[i(1220)],r.cts)}else{if(te._opt.isRecording)if(te[i(411)].isRecordTypeFlv){const e=new Uint8Array(t);postMessage({cmd:be[i(924)],type:r.type,buffer:e,ts:r.ts},[e[i(441)]])}else if(te._opt[i(293)]===se[i(509)])if(r[i(335)]===we[i(1226)]){const e=new Uint8Array(t)[i(471)](5);postMessage({cmd:be[i(1173)],buffer:e,isIFrame:r[i(1220)],ts:r.ts,cts:r[i(854)]},[e[i(441)]])}else if(r.type===we.audio&&te[i(411)][i(1148)]){const e=new Uint8Array(t),n=pt(e)?e[i(471)](2):e.slice(1);postMessage({cmd:be[i(1087)],buffer:n,ts:r.ts},[n[i(441)]])}if(te.isPlayer){if(r.type===we[i(1226)]){if(P>0){const e=r.ts-B,t=2*P;e>=t&&te[i(1092)](i(437),i(291)+r[i(1220)]+i(457)+r.ts+i(687)+B+i(1010)+e+" and preTsDuration is "+P+i(1096)+t+i(1169))}if(null!==B&&B>=r.ts&&(te[i(1219)]("worker","pushBuffer() and isIFrame is "+r[i(1220)]+" and,\n options.ts is "+r.ts+i(910)+B+i(831)+t[i(709)]+i(1191)+M),B-r.ts>me&&(te[i(1219)]("worker",i(361)+B+i(565)+r.ts+",\n diff is "+(B-r.ts)+i(811)+me+i(1122)),te[i(707)](),B=null,P=0),te[i(411)][i(631)]&&qt(r[i(1220)])&&g)){const e=te.hasIframeInBufferList(),t=qt(te[i(513)]);return te[i(1092)]("worker",i(532)+e+i(461)+t+i(1024)),void(e&&t?te[i(562)]():(te[i(1114)](!0),Gt(te[i(411)][i(599)])&&Gt(n)&&(te[i(992)]()?Q.isDecodeFirstIIframe=!1:postMessage({cmd:be[i(599)]}))))}B>0&&(P=r.ts-B),M=t[i(709)],B=r.ts}if(g){const e=te[i(411)].videoBuffer+te[i(411)][i(376)],t=te[i(1089)](r.ts,r.type);te[i(374)]=t,te[i(848)]>0&&t>e&&te[i(848)]({type:e[t(335)],ts:e.ts})));te.debugLog(t(437),"playbackCacheBeforeDecodeForFpsRender, calc streamVideoFps is "+e+", bufferListLength is "+s[t(573)]+", and ts list is "+JSON[t(1224)](r));const n=100;s[t(573)]>=n&&(te[t(1219)]("worker","playbackCacheBeforeDecodeForFpsRender, bufferListLength is "+s[t(573)]+t(811)+n+t(1199)),te[t(1159)]=25,postMessage({cmd:be[t(552)],value:te.streamVideoFps}),te[t(962)]=te[t(1159)],te.playbackCacheLoop())}}},getVideoBufferLength(){const t=e;let r=0;return s[t(1233)]((e=>{const n=t;e.type===we[n(1226)]&&(r+=1)})),r},hasIframeInBufferList(){const t=e;return s[t(826)]((e=>{const r=t;return e.type===we.video&&e[r(1220)]}))},isAllIframeInBufferList(){const t=e,r=te.getVideoBufferLength();let n=0;return s[t(1233)]((e=>{const r=t;e.type===we[r(1226)]&&e[r(1220)]&&(n+=1)})),r===n},getNotDroppingDelayTs(){const t=e;return te[t(411)][t(642)]+te[t(411)][t(376)]/2},getAudioBufferLength(){const t=e;let r=0;return s[t(1233)]((e=>{const n=t;e[n(335)]===we[n(480)]&&(r+=1)})),r},getStreamBufferLength(){const t=e;let r=0;return h&&h[t(441)]&&(r=h[t(441)].byteLength),te[t(411)].isNakedFlow?J[t(682)]&&(r=J.lastBuf.byteLength):te[t(411)][t(1154)]?Z[t(467)]&&(r=Z[t(467)][t(709)]):te[t(411)].isFmp4&&X[t(434)]&&(r=X[t(434)].getStreamBufferSize()),r},fetchStream:function(t){const r=e;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments[r(573)]>2&&void 0!==arguments[2]?arguments[2]:[];if(te.debugLog(r(437),r(818)+t,r(1032),JSON[r(1224)](n)),te[r(661)]=!0,n[r(576)]?te[r(411)][r(576)]=!0:n[r(289)]?te[r(411)].isFmp4=!0:n[r(534)]?te._opt[r(534)]=!0:n[r(812)]?te[r(411)].isNakedFlow=!0:n[r(1154)]&&(te._opt[r(1154)]=!0),l=Bt((e=>{const t=r;postMessage({cmd:be[t(314)],type:Ee[t(730)],value:e})})),te[r(720)](),te[r(673)](),n.isFmp4&&X.listenMp4Box(),n.protocol===re.fetch){n[r(576)]&&(h=new or(te.demuxFlv())),c=new AbortController;const e=Object.assign({signal:c[r(286)]},{headers:n[r(956)]&&n[r(956)].headers||{}});fetch(t,e)[r(366)]((e=>{const t=r;if(Gt(N))return te[t(1092)]("worker",t(733)),te[t(317)]=We[t(980)],void e[t(679)][t(594)]();if(!Vt(e))return te[t(1219)](t(437),"fetch response status is "+e.status+t(420)+e.ok+t(343)),K(),void postMessage({cmd:be[t(314)],type:Ce[t(332)],value:"fetch response status is "+e[t(870)]+" and ok is "+e.ok});if(postMessage({cmd:be[t(314)],type:Ee[t(1108)]}),Nt())te[t(384)]=new WritableStream({write:e=>{const r=t;return c&&c.signal&&c[r(286)][r(1109)]?(te[r(1092)](r(437),r(748)),void(te[r(317)]=We[r(650)])):Gt(N)?(te[r(1092)](r(437),r(351)),te[r(317)]=We[r(650)],void K()):void(typeof e!==r(443)?(te.fetchStatus=We[r(1013)],l(e[r(709)]),n[r(576)]?h[r(866)](e):n[r(289)]?te[r(598)](e):n[r(534)]?te.demuxMpeg4(e):n[r(1154)]?te[r(1254)](e):n.isNakedFlow&&te[r(493)](e)):te.debugWarn("worker",'writableStream write() and value is "'+e+'" string so return'))},close:()=>{const e=t;te[e(1092)]("worker",e(554)),te[e(317)]=We[e(650)],K(),te[e(411)].checkStreamEnd?(h&&(h[e(926)](),h=null),postMessage({cmd:be[e(314)],type:Ee[e(575)],value:ne.fetch,msg:e(1100)})):postMessage({cmd:be[e(314)],type:Ee.streamEndInner})},abort:e=>{const r=t;if(c&&c.signal&&c[r(286)][r(1109)])return te.debugLog("worker",r(625)),void(te[r(317)]=We[r(650)]);h&&(h.close(),h=null),e[r(1209)]!==Ne?(te.debugLog("worker","writableStream abort() and e is "+e.toString()),K(),postMessage({cmd:be[r(314)],type:Ce[r(894)],value:e.toString()})):te[r(1092)](r(437),"writableStream abort() and e.name is AbortError so return")}}),e[t(679)][t(1107)](te[t(384)])[t(1104)]((e=>{const r=t;"AbortError"!==e[r(1209)]&&te[r(1092)]("worker",r(1181),e[r(1209)],e[r(1091)]())}));else{const r=e[t(679)].getReader(),i=()=>{const e=t;r[e(1241)]()[e(366)]((t=>{const r=e;let{done:s,value:o}=t;return s?(te[r(1092)]("worker",r(638)),te[r(317)]=We[r(650)],K(),void(te[r(411)][r(742)]?(h&&(h[r(926)](),h=null),postMessage({cmd:be[r(314)],type:Ee[r(575)],value:ne.fetch,msg:r(1100)})):postMessage({cmd:be[r(314)],type:Ee[r(787)]}))):c&&c.signal&&c[r(286)][r(1109)]?(te.debugLog(r(437),r(1094)),void(te[r(317)]=We[r(650)])):Gt(N)?(te[r(1092)](r(437),r(985)),te[r(317)]=We[r(650)],void K()):void(typeof o!==r(443)?(te[r(317)]=We[r(1013)],l(o[r(709)]),n[r(576)]?h[r(866)](o):n[r(289)]?te[r(598)](o):n[r(534)]?te[r(940)](o):n[r(1154)]?te.demuxTs(o):n.isNakedFlow&&te[r(493)](o),i()):te.debugWarn(r(437),r(1033)+o+r(758)))}))[e(1104)]((t=>{const r=e;if(c&&c[r(286)]&&c[r(286)][r(1109)])return te[r(1092)](r(437),r(422)),void(te[r(317)]=We.complete);h&&(h[r(926)](),h=null),t[r(1209)]!==Ne?(te[r(1092)](r(437),r(982)+t[r(1091)]()),K(),postMessage({cmd:be[r(314)],type:Ce[r(894)],value:t[r(1091)]()})):te[r(1092)](r(437),r(380))}))};i()}}))[r(1104)]((e=>{const t=r;c&&c[t(286)]&&c[t(286)][t(1109)]?te[t(1092)](t(437),t(1210)):e.name!==Ne?(te[t(1092)](t(437),"fetch().catch() and e is "+e[t(1091)]()),K(),postMessage({cmd:be.workerFetch,type:Ce[t(332)],value:e[t(1091)]()}),h&&(h[t(926)](),h=null)):te.debugLog(t(437),t(474))}))}else n.protocol===re[r(1202)]&&(n[r(576)]&&(h=new or(te[r(394)]())),u=new WebSocket(t,i),u[r(402)]="arraybuffer",u[r(1007)]=()=>{const e=r;te.debugLog(e(437),e(1039)),te[e(444)]=Te[e(584)],te[e(401)](),postMessage({cmd:be[e(314)],type:Ee.streamSuccess}),postMessage({cmd:be[e(314)],type:Ee[e(567)]}),n[e(956)]&&n[e(956)].websocketFirstMessage&&te.sendWebsocketMessage(n.options.websocketFirstMessage)},u[r(536)]=e=>{const t=r;if(te[t(473)])return void te.debugLog(t(437),t(339)+e[t(1012)]+" and isDestroyed is true, so return");if(f)return void te.debugLog(t(437),t(339)+e[t(1012)]+t(558));if(te.debugLog(t(437),t(339)+e[t(1012)]),Gt(N))return void te[t(1092)]("worker","fetchStream, WebsocketStream socket close and requestAbort is true so return");let n=!1;1006===e[t(1012)]&&(te[t(340)](t(437),t(850)+e[t(1012)]),n=!0),te.socketStatus=Te[t(926)],te[t(411)][t(742)]||n?(h&&(h[t(926)](),h=null),postMessage({cmd:be[t(314)],type:Ee[t(575)],value:ne.websocket,msg:e[t(1012)]})):postMessage({cmd:be[t(314)],type:Ee.streamEndInner})},u[r(1041)]=e=>{const t=r;te[t(340)](t(437),t(529),e,e[t(1091)]()),f=!0,te[t(444)]=Te.error,h&&(h[t(926)](),h=null),te[t(473)]?te[t(1092)](t(437),"fetchStream, WebsocketStream on error and isDestroyed is true, so return"):Gt(N)?te[t(1092)](t(437),t(626)):postMessage({cmd:be[t(314)],type:Ce[t(407)],value:e[t(997)]?"websocket user aborted":t(1225)})},u[r(383)]=e=>{const t=r;typeof e[t(1146)]!==t(443)?(l(e.data[t(709)]),n.isFlv?h[t(866)](e[t(1146)]):n.isFmp4?te[t(598)](e[t(1146)]):n[t(534)]?te.demuxMpeg4(e[t(1146)]):te[t(411)][t(812)]?te[t(493)](e[t(1146)]):te[t(411)].isTs?te[t(1254)](e[t(1146)]):te[t(452)](e[t(1146)])):postMessage({cmd:be.websocketStringMsg,value:e[t(1146)]})})},demuxFlv:function*(){const t=e;yield 9;const r=new ArrayBuffer(4),n=new Uint8Array(r),i=new Uint32Array(r);for(;;){n[3]=0;const e=yield 15,r=e[4];n[0]=e[7],n[1]=e[6],n[2]=e[5];const s=i[0];n[0]=e[10],n[1]=e[9],n[2]=e[8],n[3]=e[11];let o=i[0];const a=(yield s)[t(471)]();switch(r){case Se[t(480)]:if(a[t(709)]>0){const e=te[t(759)](a);te[t(665)](e,{type:we[t(480)],ts:o})}else te[t(1219)]("worker",t(555)+a[t(709)]+t(1217));break;case Se[t(1226)]:if(a[t(709)]>=6){const e=a[0];if(te._isEnhancedH265Header(e))te[t(699)](a,o);else{const e=15&a[0];let r=a[0]>>4===Ve[t(1020)];const n=e===De.h265;if(qt(r)&&Gt(Jt(a,n))&&(te[t(1092)](t(437),t(395)),r=!0),r&&$t(a)&&null===te[t(330)]){const e=15&a[0];te.isHevc=e===De[t(378)],O=kt(a,te[t(330)]),te[t(1092)]("worker",t(605)+te[t(330)]+t(872)+O)}r&&te.calcIframeIntervalTimestamp(o),te[t(551)]&&te[t(957)](o),i[0]=a[4],i[1]=a[3],i[2]=a[2],i[3]=0;let s=i[0],c=te.cryptoPayload(a,r);te[t(665)](c,{type:we[t(1226)],ts:o,isIFrame:r,cts:s})}}else te[t(1219)](t(437),t(947)+a[t(709)]+t(1217));break;case Se[t(792)]:postMessage({cmd:be[t(972)],buffer:a},[a[t(441)]]);break;default:te[t(1092)](t(437),t(930)+r)}}},decode:function(t,r){const n=e;r[n(335)]===we.audio?te[n(411)].hasAudio&&(postMessage({cmd:be[n(314)],type:Ee[n(587)],value:t[n(709)]}),te[n(551)]?te[n(726)](t,{type:r[n(335)],ts:r.ts,cts:r.cts}):te[n(530)]&&(te[n(336)]()||(te.isPlaybackCacheBeforeDecodeForFpsRender(),te.pushBuffer(t,{type:r[n(335)],ts:r.ts,cts:r[n(854)]})))):r[n(335)]===we[n(1226)]&&te[n(411)][n(494)]&&(postMessage({cmd:be[n(314)],type:Ee[n(738)],value:t.byteLength}),postMessage({cmd:be.workerFetch,type:Ee[n(888)],value:r.ts}),te[n(551)]?te[n(726)](t,{type:r[n(335)],ts:r.ts,isIFrame:r[n(1220)],cts:r[n(854)]}):te.isPlayback&&(te.isPlaybackCacheBeforeDecodeForFpsRender()?te.pushBuffer(t,{type:r.type,ts:r.ts,cts:r[n(854)],isIFrame:r[n(1220)]}):te[n(336)]()?r[n(1220)]&&te[n(726)](t,{type:r[n(335)],ts:r.ts,cts:r[n(854)],isIFrame:r.isIFrame}):te.pushBuffer(t,{type:r[n(335)],ts:r.ts,cts:r.cts,isIFrame:r[n(1220)]})))},cryptoPayload:function(t,r){const n=e;let i=t;return te[n(411)][n(832)]?te[n(411)].cryptoIV&&te._opt[n(368)][n(709)]>0&&te._opt[n(763)]&&te[n(411)][n(763)][n(709)]>0?i=mo(t,te[n(411)][n(763)],te[n(411)][n(368)],te[n(330)]):te[n(340)](n(437),n(790)+(te[n(411)][n(763)]&&te[n(411)][n(763)][n(709)])+" or cryptoIV.length is "+(te._opt.cryptoIV&&te[n(411)][n(368)][n(709)])+n(963)):te[n(411)].isSm4Crypto?te._opt[n(728)]?i=te[n(411)][n(368)]&&te._opt[n(368)][n(709)]>0&&te[n(411)][n(763)]&&te._opt[n(763)].byteLength>0?sc(t,te._opt[n(763)],te[n(411)][n(368)],te[n(330)],te._opt[n(656)]):Wo(t,te._opt[n(728)],te[n(330)],te[n(411)][n(656)]):!te[n(411)].sm4CryptoKey&&te.debugError("worker",n(388)):te[n(411)][n(400)]&&(te._opt[n(368)]&&te[n(411)].cryptoIV[n(709)]>0&&te._opt.cryptoKey&&te[n(411)][n(763)][n(709)]>0?i=ia(t,te[n(411)][n(763)],te[n(411)][n(368)],te[n(330)]):te.debugError(n(437),n(637)+(te[n(411)][n(763)]&&te[n(411)].cryptoKey.byteLength)+n(501)+(te[n(411)][n(368)]&&te._opt[n(368)][n(709)])+n(963))),i},cryptoPayloadAudio:function(t){const r=e;if(qt(te[r(411)].isCryptoAudio))return t;let n=t;return te._opt[r(832)]?te._opt[r(368)]&&te[r(411)][r(368)][r(709)]>0&&te[r(411)][r(763)]&&te[r(411)][r(763)][r(709)]>0?t[0]>>4===Pe[r(950)]&&(n=vo(t,te._opt[r(763)],te[r(411)][r(368)])):te[r(340)](r(437),"isM7sCrypto cryptoKey.length is "+(te[r(411)].cryptoKey&&te[r(411)][r(763)][r(709)])+r(501)+(te[r(411)].cryptoIV&&te[r(411)][r(368)][r(709)])+r(963)):te._opt[r(400)]&&(te[r(411)][r(368)]&&te[r(411)].cryptoIV[r(709)]>0&&te[r(411)][r(763)]&&te[r(411)][r(763)][r(709)]>0?t[0]>>4===Pe[r(950)]&&(n=oa(t,te[r(411)][r(763)],te[r(411)][r(368)])):te[r(340)]("worker",r(637)+(te[r(411)][r(763)]&&te[r(411)].cryptoKey[r(709)])+r(501)+(te[r(411)][r(368)]&&te._opt.cryptoIV[r(709)])+r(963))),n},setCodecAudio:function(t,r){const n=e,s=t[0]>>4,o=t[0]>>1&1;if(z=s===Pe[n(950)]?o?16:8:0===o?8:16,oe&&oe[n(1179)]||!qt(i))if(ht(t)||s===Pe.ALAW||s===Pe[n(455)]||s===Pe.MP3){te[n(1092)](n(437),n(1240)+s+" _opt.sampleRate is "+te[n(411)][n(542)]);const e=s===Pe.AAC?t[n(471)](2):new Uint8Array(0);if(i){if(s===Pe[n(822)])return void te[n(340)](n(437),n(1031));oe[n(717)]=te._opt.sampleRate,oe.decode(t,r)}else oe.setCodec(s,te[n(411)][n(542)],e,te.getBuildTime());if(s===Pe.AAC&&postMessage({cmd:be[n(933)],buffer:e},[e[n(441)]]),y=!0,s!==Pe[n(950)]&&(s===Pe[n(822)]?(!te[n(965)]&&(te.mp3Demuxer=new ea(te),te[n(965)].on(n(1146),((e,t)=>{oe[n(665)](e,t)}))),te[n(965)][n(548)](t[n(471)](1),r)):oe[n(665)](t.slice(1),r)),Zt()){const e=Number("1")||1;setTimeout((()=>{const e=n;te.debugError("worker",e(1011)),te[e(926)](),postMessage({cmd:be[e(483)]})}),60*e*60*1e3)}}else te[n(1219)](n(437),n(1164),s);else te.debugError(n(437),n(858))},decodeAudio:function(t,r){const s=e;if(te.isDestroyed)te[s(1092)](s(437),s(390));else if(te[s(654)]())Q[s(760)](t,r);else if(Gt(n)&&Gt(te[s(411)][s(592)]))postMessage({cmd:be[s(425)],payload:t,ts:r,cts:r},[t[s(441)]]);else{const e=t[0]>>4;if(y){if(ht(t))return void te[s(1092)](s(437),"decodeAudio and has already initialized and payload is aac codec packet so drop this frame");i?oe[s(665)](t,r):e===Pe[s(822)]?te[s(965)][s(548)](t[s(471)](1),r):oe.decode(e===Pe[s(950)]?t[s(471)](2):t[s(471)](1),r)}else te.setCodecAudio(t,r)}},setCodecVideo:function(t,r){const n=e,s=15&t[0];if(ae&&ae[n(1179)]||!qt(i))if($t(t))if(s===De[n(1006)]||s===De[n(378)]){te[n(1092)](n(437),n(1248)+s);const e=t[n(471)](5);if(s===De[n(1006)]&&te[n(411)].useSIMD){const t=Ar(e);if(t[n(446)]>ve||t[n(1048)]>ve)return postMessage({cmd:be[n(1206)],value:n(793)+t[n(446)]+n(1140)+ve+n(1171)+t[n(1048)]+" > "+ve}),void te[n(1219)]("worker","setCodecVideo: SIMD H264 decode video width is too large, width is "+t[n(446)]+n(543)+t[n(1048)])}const r=new Uint8Array(t);v=!0,i?ae.decode(t,0):ae[n(1179)](s,e,te[n(646)]()),postMessage({cmd:be[n(892)],code:s}),postMessage({cmd:be[n(747)],buffer:r,codecId:s},[r[n(441)]])}else te[n(1219)](n(437),n(1166)+s+n(566));else te[n(1219)](n(437),n(681)+s+" and isIFrame is "+r+n(783)+t[1]);else te[n(340)](n(437),n(1040))},decodeVideo:function(t,r,s){const o=e;let a=arguments[o(573)]>3&&void 0!==arguments[3]?arguments[3]:0;if(te[o(473)])te.debugLog(o(437),o(505));else if(te[o(992)]())Q[o(1213)](t,r,s,a);else if(Gt(n))postMessage({cmd:be[o(901)],payload:t,isIFrame:s,ts:r,cts:a,delay:te.delay},[t[o(441)]]);else if(v)if(!g&&s&&(g=!0),g){if(s&&$t(t)){const e=15&t[0];let r={};e===De[o(1006)]?r=Ar(t[o(471)](5)):e===De[o(378)]&&(r=Qr(t)),r[o(446)]&&r[o(1048)]&&p&&m&&(r[o(446)]!==p||r.codecHeight!==m)&&(te[o(1219)]("worker",o(678)+p+o(1046)+m+",\n new width is "+r[o(446)]+o(1052)+r[o(1048)]+",\n and emit change event"),R=!0,postMessage({cmd:be[o(922)],value:"width: "+p+"->"+r.codecWidth+o(1171)+m+"->"+r[o(1048)]}))}if(R)return void te.debugWarn(o(437),o(851));if(L)return void te[o(1219)](o(437),o(341));if($t(t))return void te[o(1092)](o(437),o(796));if(t[o(709)]0&&void 0!==arguments[0]&&arguments[0];te.debugLog(t(437),t(946)+s[t(573)]+t(1113)+r),r&&(s=[]),te.isPlayer&&(te[t(707)](),Gt(te[t(411)][t(599)])&&(te[t(912)]=!0,postMessage({cmd:be.isDropping}))),Gt(te._opt.checkFirstIFrame)&&qt(n)&&(g=!1)},dropBuffer$2:function(){const t=e;if(s[t(573)]>0){let e=s[t(1249)]((e=>{const r=t;return Gt(e[r(1220)])&&e.type===we[r(1226)]}));if(te[t(864)]())for(let r=0;r=te[t(495)]()){te.debugLog("worker",t(1054)+r+" and tempDelay is "+i+t(1058)+te[t(495)]()),e=r;break}}if(e>=0){te[t(513)]=!0,postMessage({cmd:be[t(489)]});const r=s.length;s=s[t(471)](e);const n=s[t(616)]();te[t(707)](),te[t(704)](n.ts,n[t(335)]),te[t(519)](n),te[t(513)]=!1,te.debugLog(t(437),t(363)+e+t(1e3)+r+t(1131)+s.length+t(310)+te[t(848)]+" ")}else te.isPushDropping=!1}0===s[t(573)]&&(te[t(513)]=!1)},demuxM7s:function(t){const r=e,n=new DataView(t),i=n[r(1156)](1,!1),s=n[r(751)](0),o=new ArrayBuffer(4),a=new Uint32Array(o);switch(s){case we.audio:const e=te[r(759)](new Uint8Array(t,5));te[r(665)](e,{type:we[r(480)],ts:i});break;case we.video:if(n[r(709)]>=11){const e=new Uint8Array(t,5),s=e[0];if(te[r(984)](s))te[r(699)](e,i);else{const t=n.getUint8(5)>>4==1;if(t&&(te[r(328)](i),$t(e)&&null===te.isHevc)){const t=15&e[0];te[r(330)]=t===De[r(378)]}te[r(551)]&&te[r(957)](i),a[0]=e[4],a[1]=e[3],a[2]=e[2],a[3]=0;let s=a[0],o=te[r(541)](e,t);te[r(665)](o,{type:we[r(1226)],ts:i,isIFrame:t,cts:s})}}else te.debugWarn("worker",r(877)+t[r(709)]+r(1217))}},demuxNakedFlow:function(t){J[e(548)](t)},demuxFmp4:function(t){X[e(548)](t)},demuxMpeg4:function(t){Y[e(548)](t)},demuxTs:function(t){Z[e(548)](t)},_decodeEnhancedH265Video:function(t,r){const n=e,i=t[0],s=48&i,o=15&i,a=t[n(471)](1,5),c=new ArrayBuffer(4),u=new Uint32Array(c),l="a"==String.fromCharCode(a[0]);if(te[n(330)]=qt(l),o===qe[n(718)]){if(s===Ke[n(1208)]){const e=t[n(471)](5);if(l);else{const i=new Uint8Array(5+e.length);i[n(295)]([28,0,0,0,0],0),i[n(295)](e,5),O=kt(t,te[n(330)]),te[n(1092)](n(437),n(615)+te[n(330)]+n(872)+O),te[n(665)](i,{type:we.video,ts:r,isIFrame:!0,cts:0})}}}else if(o===qe[n(1167)]){let e=t,i=0;const o=s===Ke.FT_KEY;o&&te[n(328)](r),l||(u[0]=t[4],u[1]=t[3],u[2]=t[2],u[3]=0,i=u[0],e=on(t.slice(8),o),e=te[n(541)](e,o),te[n(665)](e,{type:we[n(1226)],ts:r,isIFrame:o,cts:i}))}else if(o===qe[n(881)]){const e=s===Ke.FT_KEY;e&&te[n(328)](r);let i=on(t.slice(5),e);i=te[n(541)](i,e),te[n(665)](i,{type:we[n(1226)],ts:r,isIFrame:e,cts:0})}},_isEnhancedH265Header:function(e){return(e&Ge)===Ge},findSei:function(t,r){const n=e;let i=4;Lt(O)&&(i=O),St(t[n(471)](5),i).forEach((e=>{const t=n,i=te[t(330)]?e[0]>>>1&63:31&e[0],s=te[t(330)]&&(i===Ue[t(1195)]||i===Ue.prefixSei),o=qt(te[t(330)])&&i===Me[t(755)];if(s||o){const n=It(e,te[t(330)]);postMessage({cmd:be[t(1129)],buffer:n[t(716)],ts:r},[n[t(716)][t(441)]])}}))},calcNetworkDelay:function(t){const r=e;if(!(g&&t>0))return;null===I?(I=t,A=Tt()):tn?i-n:0;if(te[r(377)]=s,s>te[r(411)][r(377)]&&te[r(411)][r(1133)]===ie[r(786)]){let e=!1;null===U&&(e=!0,U=Tt());const o=Tt();(o-U>=1e3||e)&&(te.debugWarn(r(437),r(370)+t+r(1088)+I+r(1269)+n+r(620)+i+r(1267)+s),postMessage({cmd:be[r(314)],type:Ee.networkDelayTimeout,value:s}),U=o)}},calcIframeIntervalTimestamp:function(t){null===D?D=t:D=te[t(411)].playbackForwardMaxRateDecodeIFrame&&!(te[t(411)][t(1015)]&&te[t(411)][t(592)])},isPlayUseMSE:function(){const t=e;return te[t(551)]&&te[t(411)][t(1015)]&&Gt(n)},isPlayUseMSEAndDecoderInWorker:function(){const t=e;return te.isPlayUseMSE()&&te[t(411)].mseDecoderUseWorker},isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio:function(){const t=e;return te[t(992)]()&&te[t(411)][t(592)]},playbackUpdatePlaybackRate:function(){},onOffscreenCanvasWebglContextLost:function(t){const r=e;te[r(340)](r(437),r(688)),t.preventDefault(),F=!0,te[r(1184)].destroy(),te[r(1184)]=null,te[r(1237)]=null,setTimeout((()=>{const e=r;te.offscreenCanvasGL=te[e(769)][e(714)]("webgl"),te.offscreenCanvasGL&&te.offscreenCanvasGL[e(1111)]()[e(1029)]?(te.webglObj=ee(te[e(1237)],te._opt[e(1190)]),F=!1):te[e(340)](e(437),e(802))}),500)},onOffscreenCanvasWebglContextRestored:function(t){const r=e;te[r(1092)](r(437),r(1036)),t.preventDefault()},videoInfo:function(t,r,n){const i=e;postMessage({cmd:be[i(892)],code:t}),postMessage({cmd:be[i(1165)],w:r,h:n}),p=r,m=n,te[i(1256)]()&&(te[i(769)]=new OffscreenCanvas(r,n),te[i(1237)]=te[i(769)].getContext(i(593)),te[i(1184)]=ee(te[i(1237)],te[i(411)][i(1190)]),te[i(769)][i(887)](i(614),te[i(967)],!1),te.offscreenCanvas[i(887)](i(1137),te[i(632)],!1))},audioInfo:function(t,r,n){postMessage({cmd:be[e(1070)],code:t}),postMessage({cmd:be.initAudio,sampleRate:r,channels:n,depth:z}),x=n},yuvData:function(r,n){const i=e;if(te.isDestroyed)return void te.debugLog("worker",i(580));if(qt(g))return void te.debugLog(i(437),i(523));const s=p*m*3/2;try{let e=t[i(954)][i(1062)](r,r+s),o=new Uint8Array(e);if(k=null,b=n,te[i(1256)]())try{if(F)return;te[i(1184)].renderYUV(p,m,o);let e=te[i(769)][i(391)]();postMessage({cmd:be[i(849)],buffer:e,delay:te[i(848)],ts:n},[e])}catch(e){te.debugError("worker","yuvData, transferToImageBitmap error is",e,e[i(1091)]())}else postMessage({cmd:be.render,output:o,delay:te.delay,ts:n},[o[i(441)]])}catch(e){te[i(1219)](i(437),i(1112)+n+i(949),e,e[i(1091)]())}},pcmData:function(t,n,i){const s=e;if(te[s(473)])return void te[s(1092)]("worker",s(454));let a=n,c=[],u=0;try{let e=te[s(411)].audioBufferSize;for(let e=0;e<2;e++){let n=r[s(1004)][(t>>2)+e]>>2;c[e]=r[s(1023)].subarray(n,n+a)}if(T){if(!(a>=(n=e-T)))return T+=a,o[0]=Float32Array.of(...o[0],...c[0]),void(2==x&&(o[1]=Float32Array.of(...o[1],...c[1])));E[0]=Float32Array.of(...o[0],...c[0][s(1062)](0,n)),2==x&&(E[1]=Float32Array.of(...o[1],...c[1][s(1062)](0,n))),postMessage({cmd:be[s(596)],buffer:E,ts:i},E[s(581)]((e=>e[s(441)]))),u=n,a-=n}for(T=a;T>=e;T-=e)E[0]=c[0][s(471)](u,u+=e),2==x&&(E[1]=c[1][s(471)](u-e,u)),postMessage({cmd:be[s(596)],buffer:E,ts:i},E.map((e=>e.buffer)));T&&(o[0]=c[0][s(471)](u),2==x&&(o[1]=c[1][s(471)](u))),c=[]}catch(e){te.debugWarn(s(437),s(1085)+i+s(949),e,e[s(1091)]())}},errorInfo:function(t){const r=e;null===k&&(k=Tt());const n=Tt(),i=xt(C>0?2*C:5e3,1e3,5e3),s=n-k;s>i&&(te[r(1219)](r(437),r(923)+C+r(878)+s+" and maxDiff is "+i+r(1150)),L=!0,postMessage({cmd:be[r(1045)]}))},sendWebsocketMessage:function(t){const r=e;u?u[r(1231)]===xe[r(584)]?(te[r(1092)]("worker",r(492),t),u[r(1252)](t)):te[r(340)](r(437),r(825),u[r(1231)]):te[r(340)]("worker",r(313))},timeEnd(){const t=e;te[t(340)](t(437),t(1011)),te[t(926)](),postMessage({cmd:be.workerEnd})},postStreamToMain(t,r){postMessage({cmd:be[e(518)],type:r,buffer:t},[t.buffer])},updatePlaybackIsPause(t){const r=e;te[r(1092)](r(437),r(1245)+t),te[r(975)]=t,Gt(t)?te[r(484)]():te[r(712)]()},getBuildTime:()=>fe+"-"+pe,validatedFailed(){const t=e;te.debugError(t(437),t(628))},debugLog(t){const r=e;if(te[r(411)][r(697)]&&te.debug){for(var n=arguments[r(573)],i=new Array(n>1?n-1:0),s=1;s1?n-1:0),s=1;s1?n-1:0),s=1;s>2,p=t,m=r,postMessage({cmd:be[n(1165)],w:t,h:r}),te[n(1256)]()&&(te[n(769)]=new OffscreenCanvas(t,r),te[n(1237)]=te[n(769)][n(714)]("webgl"),te[n(1184)]=ee(te[n(1237)],te[n(411)][n(1190)]),te[n(769)][n(887)]("webglcontextlost",te.onOffscreenCanvasWebglContextLost,!1),te[n(769)][n(887)](n(1137),te[n(632)],!1))},initAudioPlanar:function(t,r){x=t,postMessage({cmd:be[e(847)],sampleRate:r,channels:t,depth:z})},playAudioPlanar:function(t,n,i){const s=e;if(te.isDestroyed)return void te.debugLog(s(437),"pcmData, decoder is destroyed and return");let a=n,c=[],u=0,l=te[s(411)][s(990)];for(let e=0;e<2;e++){let n=r.HEAPU32[(t>>2)+e]>>2;c[e]=r[s(1023)][s(1062)](n,n+a)}if(T){if(!(a>=(n=l-T)))return T+=a,o[0]=Float32Array.of(...o[0],...c[0]),void(2==x&&(o[1]=Float32Array.of(...o[1],...c[1])));E[0]=Float32Array.of(...o[0],...c[0][s(1062)](0,n)),2==x&&(E[1]=Float32Array.of(...o[1],...c[1][s(1062)](0,n))),postMessage({cmd:be[s(596)],buffer:E,ts:i},E[s(581)]((e=>e.buffer))),u=n,a-=n}for(T=a;T>=l;T-=l)E[0]=c[0][s(471)](u,u+=l),2==x&&(E[1]=c[1][s(471)](u-l,u)),postMessage({cmd:be[s(596)],buffer:E,ts:i},E.map((e=>e[s(441)])));T&&(o[0]=c[0][s(471)](u),2==x&&(o[1]=c[1][s(471)](u))),c=[]},draw:function(r,n,i,s){const o=e;if(te[o(473)])return void te[o(1092)](o(437),o(1177));const a=t.HEAPU8[o(1062)](n,n+j),c=t[o(954)][o(1062)](i,i+V),u=t[o(954)][o(1062)](s,s+V),l=new Uint8Array(j+V+V);if(l[o(295)](a),l.set(c,j),l[o(295)](u,j+V),k=null,b=r,te[o(1256)]())try{if(F)return;te[o(1184)].renderYUV(p,m,l);let e=te.offscreenCanvas[o(391)]();postMessage({cmd:be[o(849)],buffer:e,delay:te[o(848)],ts:r},[e])}catch(e){te[o(340)](o(437),o(1103),e,e.toString())}else postMessage({cmd:be[o(849)],output:l,delay:te[o(848)],ts:r},[l[o(441)]])}}));let oe=null;r.AudioDecoder&&(oe=new(r[e(1260)])(te));let ae=null;t[e(1065)]&&(ae=new(t[e(1065)])(te)),postMessage({cmd:be[e(720)]}),self.onmessage=function(t){const r=e;let n=t[r(1146)];switch(n[r(466)]){case Ie[r(720)]:try{te[r(411)]=Object[r(651)](te._opt,JSON[r(458)](n[r(557)]))}catch(e){}te[r(1092)](r(437),r(969)+Ie[r(720)],n.opt);break;case Ie[r(665)]:te[r(726)](n[r(441)],n[r(956)]);break;case Ie[r(539)]:te[r(760)](n[r(441)],n.ts);break;case Ie[r(612)]:te[r(1213)](n[r(441)],n.ts,n[r(1220)]);break;case Ie[r(1114)]:te[r(1114)](n.needClear);break;case Ie[r(993)]:te[r(993)](n[r(309)],JSON[r(458)](n.opt),n[r(974)]);break;case Ie[r(926)]:te.debugLog("worker","onmessage:"+Ie.close,JSON.stringify(n[r(956)])),n.options&&qt(n[r(956)][r(838)])&&(H=n[r(956)][r(838)]),te[r(926)]();break;case Ie.updateConfig:te[r(1092)](r(437),r(969)+Ie[r(768)],n.key,n[r(819)]),te._opt[n.key]=n.value,n[r(884)]===r(1090)&&(te.playbackUpdatePlaybackRate(),te[r(778)]()&&qt(te[r(975)]));break;case Ie.sendWsMessage:te[r(782)](n.message);break;case Ie[r(440)]:Q[r(354)].currentTime=Number(n[r(1077)]);break;case Ie[r(999)]:te[r(577)](n[r(1127)])}}}(e[1],t)})).catch((e=>{const t=uc;console[t(443)](t(430),e,e[t(436)]())}))})); diff --git a/ui/decoder-pro-simd.wasm b/ui/decoder-pro-simd.wasm index 10256ef..3747585 100755 Binary files a/ui/decoder-pro-simd.wasm and b/ui/decoder-pro-simd.wasm differ diff --git a/ui/decoder-pro.js b/ui/decoder-pro.js index d4da073..9ee2979 100644 --- a/ui/decoder-pro.js +++ b/ui/decoder-pro.js @@ -1 +1 @@ -!function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";var e,t=(e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href,async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,i,n;(n=t).ready=new Promise(((e,t)=>{r=e,i=t})),(n=void 0!==n?n:{}).locateFile=function(e){return"decoder-pro.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_WASM_URL&&""!=JESSIBUCA_PRO_WASM_URL?JESSIBUCA_PRO_WASM_URL:e};var s,o,a,l=Object.assign({},n),d="./this.program",u="object"==typeof window,h="function"==typeof importScripts,c="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";function p(e){return n.locateFile?n.locateFile(e,f):f+e}if(c){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href),g=m("fs"),_=m("path");f=h?_.dirname(f)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href)),s=(e,t)=>(e=J(e)?new URL(e):_.normalize(e),g.readFileSync(e,t?void 0:"utf8")),a=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},o=function(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=J(e)?new URL(e):_.normalize(e),g.readFile(e,i?void 0:"utf8",((e,n)=>{e?r(e):t(i?n.buffer:n)}))},!n.thisProgram&&process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),n.inspect=()=>"[Emscripten Module object]"}else(u||h)&&(h?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)});var y,v,b=n.print||console.log.bind(console),w=n.printErr||console.error.bind(console);Object.assign(n,l),l=null,n.arguments&&n.arguments,n.thisProgram&&(d=n.thisProgram),n.quit&&n.quit,n.wasmBinary&&(y=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&W("no native wasm support detected");var E,S,U,x,A,k,C,T,B=!1;function F(e,t){e||W(t)}function P(){var e=v.buffer;n.HEAP8=E=new Int8Array(e),n.HEAP16=U=new Int16Array(e),n.HEAPU8=S=new Uint8Array(e),n.HEAPU16=x=new Uint16Array(e),n.HEAP32=A=new Int32Array(e),n.HEAPU32=k=new Uint32Array(e),n.HEAPF32=C=new Float32Array(e),n.HEAPF64=T=new Float64Array(e)}var D=[],I=[],L=[];function R(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)N(n.preRun.shift());ne(D)}function z(){n.noFSInit||Te.init.initialized||Te.init(),Te.ignorePermissions=!1,ne(I)}function M(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)$(n.postRun.shift());ne(L)}function N(e){D.unshift(e)}function O(e){I.unshift(e)}function $(e){L.unshift(e)}var G=0,H=null;function V(e){G++,n.monitorRunDependencies&&n.monitorRunDependencies(G)}function j(e){if(G--,n.monitorRunDependencies&&n.monitorRunDependencies(G),0==G&&H){var t=H;H=null,t()}}function W(e){n.onAbort&&n.onAbort(e),w(e="Aborted("+e+")"),B=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}var Y,q,K,X="data:application/octet-stream;base64,";function Z(e){return e.startsWith(X)}function J(e){return e.startsWith("file://")}function Q(e){if(e==Y&&y)return new Uint8Array(y);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!y&&(u||h)){if("function"==typeof fetch&&!J(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(o)return new Promise(((t,r)=>{o(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),W(e)}))}function re(e,t,r,i){return e||"function"!=typeof WebAssembly.instantiateStreaming||Z(t)||J(t)||c||"function"!=typeof fetch?te(t,r,i):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(i,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),te(t,r,i)}))))}function ie(){var e={a:ti};function t(e,t){return ri=e.exports,v=ri.D,P(),Dt=ri.H,O(ri.E),j(),ri}if(V(),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return re(y,Y,e,(function(e){t(e.instance)})).catch(i),{}}n.locateFile?Z(Y="decoder-pro.wasm")||(Y=p(Y)):Y=new URL("decoder-pro.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href).href;var ne=e=>{for(;e.length>0;)e.shift()(n)};function se(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){k[this.ptr+4>>2]=e},this.get_type=function(){return k[this.ptr+4>>2]},this.set_destructor=function(e){k[this.ptr+8>>2]=e},this.get_destructor=function(){return k[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,E[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=E[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,E[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=E[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){k[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return k[this.ptr+16>>2]},this.get_exception_ptr=function(){if(li(this.get_type()))return k[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var oe=(e,t,r)=>{throw new se(e).init(t,r),e},ae=e=>(A[si()>>2]=e,e),le={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=le.isAbs(e),r="/"===e.substr(-1);return(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=le.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=le.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return le.normalize(e.join("/"))},join2:(e,t)=>le.normalize(e+"/"+t)},de=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(c)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}W("initRandomDevice")},ue=e=>(ue=de())(e),he={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:Te.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=le.isAbs(i)}return(t?"/":"")+(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=he.resolve(e).substr(1),t=he.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),s=Math.min(i.length,n.length),o=s,a=0;a{for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&ce)return ce.decode(e.subarray(t,n));for(var s="";t>10,56320|1023&d)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s},pe=[],me=e=>{for(var t=0,r=0;r=55296&&i<=57343?(t+=4,++r):t+=3}return t},ge=(e,t,r,i)=>{if(!(i>0))return 0;for(var n=r,s=r+i-1,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-n};function _e(e,t,r){var i=r>0?r:me(e)+1,n=new Array(i),s=ge(e,n,0,n.length);return t&&(n.length=s),n}var ye=()=>{if(!pe.length){var e=null;if(c){var t=Buffer.alloc(256),r=0,i=process.stdin.fd;try{r=g.readSync(i,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=_e(e,!0)}return pe.shift()},ve={ttys:[],init(){},shutdown(){},register(e,t){ve.ttys[e]={input:[],output:[],ops:t},Te.registerDevice(e,ve.stream_ops)},stream_ops:{open(e){var t=ve.ttys[e.node.rdev];if(!t)throw new Te.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,i,n){if(!e.tty||!e.tty.ops.get_char)throw new Te.ErrnoError(60);for(var s=0,o=0;oye(),put_char(e,t){null===t||10===t?(b(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(fe(e.output,0)),e.output=[])}}},be=e=>{W()},we={ops_table:null,mount:e=>we.createNode(null,"/",16895,0),createNode(e,t,r,i){if(Te.isBlkdev(r)||Te.isFIFO(r))throw new Te.ErrnoError(63);we.ops_table||(we.ops_table={dir:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,lookup:we.node_ops.lookup,mknod:we.node_ops.mknod,rename:we.node_ops.rename,unlink:we.node_ops.unlink,rmdir:we.node_ops.rmdir,readdir:we.node_ops.readdir,symlink:we.node_ops.symlink},stream:{llseek:we.stream_ops.llseek}},file:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:{llseek:we.stream_ops.llseek,read:we.stream_ops.read,write:we.stream_ops.write,allocate:we.stream_ops.allocate,mmap:we.stream_ops.mmap,msync:we.stream_ops.msync}},link:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,readlink:we.node_ops.readlink},stream:{}},chrdev:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:Te.chrdev_stream_ops}});var n=Te.createNode(e,t,r,i);return Te.isDir(n.mode)?(n.node_ops=we.ops_table.dir.node,n.stream_ops=we.ops_table.dir.stream,n.contents={}):Te.isFile(n.mode)?(n.node_ops=we.ops_table.file.node,n.stream_ops=we.ops_table.file.stream,n.usedBytes=0,n.contents=null):Te.isLink(n.mode)?(n.node_ops=we.ops_table.link.node,n.stream_ops=we.ops_table.link.stream):Te.isChrdev(n.mode)&&(n.node_ops=we.ops_table.chrdev.node,n.stream_ops=we.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n,e.timestamp=n.timestamp),n},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Te.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Te.isDir(e.mode)?t.size=4096:Te.isFile(e.mode)?t.size=e.usedBytes:Te.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&we.resizeFileStorage(e,t.size)},lookup(e,t){throw Te.genericErrors[44]},mknod:(e,t,r,i)=>we.createNode(e,t,r,i),rename(e,t,r){if(Te.isDir(e.mode)){var i;try{i=Te.lookupNode(t,r)}catch(e){}if(i)for(var n in i.contents)throw new Te.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Te.lookupNode(e,t);for(var i in r.contents)throw new Te.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var i=we.createNode(e,t,41471,0);return i.link=r,i},readlink(e){if(!Te.isLink(e.mode))throw new Te.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,i,n){var s=e.node.contents;if(n>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-n,i);if(o>8&&s.subarray)t.set(s.subarray(n,n+o),r);else for(var a=0;a0||r+t(we.stream_ops.write(e,t,0,i,r,!1),0)}},Ee=(e,t,r,i)=>{var n=i?"":`al ${e}`;o(e,(r=>{F(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),n&&j()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),n&&V()},Se=(e,t,r,i,n,s)=>Te.createDataFile(e,t,r,i,n,s),Ue=n.preloadPlugins||[],xe=(e,t,r,i)=>{"undefined"!=typeof Browser&&Browser.init();var n=!1;return Ue.forEach((s=>{n||s.canHandle(t)&&(s.handle(e,t,r,i),n=!0)})),n},Ae=(e,t,r,i,n,s,o,a,l,d)=>{var u=t?he.resolve(le.join2(e,t)):e;function h(r){function h(r){d&&d(),a||Se(e,t,r,i,n,l),s&&s(),j()}xe(r,u,h,(()=>{o&&o(),j()}))||h(r)}V(),"string"==typeof r?Ee(r,(e=>h(e)),o):h(r)},ke=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Ce=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Te={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=he.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new Te.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),i=Te.root,n="/",s=0;s40)throw new Te.ErrnoError(32)}}return{path:n,node:i}},getPath(e){for(var t;;){if(Te.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,i=0;i>>0)%Te.nameTable.length},hashAddNode(e){var t=Te.hashName(e.parent.id,e.name);e.name_next=Te.nameTable[t],Te.nameTable[t]=e},hashRemoveNode(e){var t=Te.hashName(e.parent.id,e.name);if(Te.nameTable[t]===e)Te.nameTable[t]=e.name_next;else for(var r=Te.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Te.mayLookup(e);if(r)throw new Te.ErrnoError(r,e);for(var i=Te.hashName(e.id,t),n=Te.nameTable[i];n;n=n.name_next){var s=n.name;if(n.parent.id===e.id&&s===t)return n}return Te.lookup(e,t)},createNode(e,t,r,i){var n=new Te.FSNode(e,t,r,i);return Te.hashAddNode(n),n},destroyNode(e){Te.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Te.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=Te.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return Te.lookupNode(e,t),20}catch(e){}return Te.nodePermissions(e,"wx")},mayDelete(e,t,r){var i;try{i=Te.lookupNode(e,t)}catch(e){return e.errno}var n=Te.nodePermissions(e,"wx");if(n)return n;if(r){if(!Te.isDir(i.mode))return 54;if(Te.isRoot(i)||Te.getPath(i)===Te.cwd())return 10}else if(Te.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?Te.isLink(e.mode)?32:Te.isDir(e.mode)&&("r"!==Te.flagsToPermissionString(t)||512&t)?31:Te.nodePermissions(e,Te.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Te.MAX_OPEN_FDS;e++)if(!Te.streams[e])return e;throw new Te.ErrnoError(33)},getStreamChecked(e){var t=Te.getStream(e);if(!t)throw new Te.ErrnoError(8);return t},getStream:e=>Te.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Te.FSStream||(Te.FSStream=function(){this.shared={}},Te.FSStream.prototype={},Object.defineProperties(Te.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Te.FSStream,e),-1==t&&(t=Te.nextfd()),e.fd=t,Te.streams[t]=e,e},closeStream(e){Te.streams[e]=null},chrdev_stream_ops:{open(e){var t=Te.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Te.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Te.devices[e]={stream_ops:t}},getDevice:e=>Te.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Te.syncFSRequests++,Te.syncFSRequests>1&&w(`warning: ${Te.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Te.getMounts(Te.root.mount),i=0;function n(e){return Te.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,n(e));++i>=r.length&&n(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var i,n="/"===r,s=!r;if(n&&Te.root)throw new Te.ErrnoError(10);if(!n&&!s){var o=Te.lookupPath(r,{follow_mount:!1});if(r=o.path,i=o.node,Te.isMountpoint(i))throw new Te.ErrnoError(10);if(!Te.isDir(i.mode))throw new Te.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,n?Te.root=l:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),l},unmount(e){var t=Te.lookupPath(e,{follow_mount:!1});if(!Te.isMountpoint(t.node))throw new Te.ErrnoError(28);var r=t.node,i=r.mounted,n=Te.getMounts(i);Object.keys(Te.nameTable).forEach((e=>{for(var t=Te.nameTable[e];t;){var r=t.name_next;n.includes(t.mount)&&Te.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(i);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var i=Te.lookupPath(e,{parent:!0}).node,n=le.basename(e);if(!n||"."===n||".."===n)throw new Te.ErrnoError(28);var s=Te.mayCreate(i,n);if(s)throw new Te.ErrnoError(s);if(!i.node_ops.mknod)throw new Te.ErrnoError(63);return i.node_ops.mknod(i,n,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Te.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Te.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),i="",n=0;n(void 0===r&&(r=t,t=438),t|=8192,Te.mknod(e,t,r)),symlink(e,t){if(!he.resolve(e))throw new Te.ErrnoError(44);var r=Te.lookupPath(t,{parent:!0}).node;if(!r)throw new Te.ErrnoError(44);var i=le.basename(t),n=Te.mayCreate(r,i);if(n)throw new Te.ErrnoError(n);if(!r.node_ops.symlink)throw new Te.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename(e,t){var r,i,n=le.dirname(e),s=le.dirname(t),o=le.basename(e),a=le.basename(t);if(r=Te.lookupPath(e,{parent:!0}).node,i=Te.lookupPath(t,{parent:!0}).node,!r||!i)throw new Te.ErrnoError(44);if(r.mount!==i.mount)throw new Te.ErrnoError(75);var l,d=Te.lookupNode(r,o),u=he.relative(e,s);if("."!==u.charAt(0))throw new Te.ErrnoError(28);if("."!==(u=he.relative(t,n)).charAt(0))throw new Te.ErrnoError(55);try{l=Te.lookupNode(i,a)}catch(e){}if(d!==l){var h=Te.isDir(d.mode),c=Te.mayDelete(r,o,h);if(c)throw new Te.ErrnoError(c);if(c=l?Te.mayDelete(i,a,h):Te.mayCreate(i,a))throw new Te.ErrnoError(c);if(!r.node_ops.rename)throw new Te.ErrnoError(63);if(Te.isMountpoint(d)||l&&Te.isMountpoint(l))throw new Te.ErrnoError(10);if(i!==r&&(c=Te.nodePermissions(r,"w")))throw new Te.ErrnoError(c);Te.hashRemoveNode(d);try{r.node_ops.rename(d,i,a)}catch(e){throw e}finally{Te.hashAddNode(d)}}},rmdir(e){var t=Te.lookupPath(e,{parent:!0}).node,r=le.basename(e),i=Te.lookupNode(t,r),n=Te.mayDelete(t,r,!0);if(n)throw new Te.ErrnoError(n);if(!t.node_ops.rmdir)throw new Te.ErrnoError(63);if(Te.isMountpoint(i))throw new Te.ErrnoError(10);t.node_ops.rmdir(t,r),Te.destroyNode(i)},readdir(e){var t=Te.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Te.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Te.lookupPath(e,{parent:!0}).node;if(!t)throw new Te.ErrnoError(44);var r=le.basename(e),i=Te.lookupNode(t,r),n=Te.mayDelete(t,r,!1);if(n)throw new Te.ErrnoError(n);if(!t.node_ops.unlink)throw new Te.ErrnoError(63);if(Te.isMountpoint(i))throw new Te.ErrnoError(10);t.node_ops.unlink(t,r),Te.destroyNode(i)},readlink(e){var t=Te.lookupPath(e).node;if(!t)throw new Te.ErrnoError(44);if(!t.node_ops.readlink)throw new Te.ErrnoError(28);return he.resolve(Te.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Te.lookupPath(e,{follow:!t}).node;if(!r)throw new Te.ErrnoError(44);if(!r.node_ops.getattr)throw new Te.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Te.stat(e,!0),chmod(e,t,r){var i;if(!(i="string"==typeof e?Te.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod(e,t){Te.chmod(e,t,!0)},fchmod(e,t){var r=Te.getStreamChecked(e);Te.chmod(r.node,t)},chown(e,t,r,i){var n;if(!(n="string"==typeof e?Te.lookupPath(e,{follow:!i}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown(e,t,r){Te.chown(e,t,r,!0)},fchown(e,t,r){var i=Te.getStreamChecked(e);Te.chown(i.node,t,r)},truncate(e,t){if(t<0)throw new Te.ErrnoError(28);var r;if(!(r="string"==typeof e?Te.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Te.ErrnoError(63);if(Te.isDir(r.mode))throw new Te.ErrnoError(31);if(!Te.isFile(r.mode))throw new Te.ErrnoError(28);var i=Te.nodePermissions(r,"w");if(i)throw new Te.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Te.getStreamChecked(e);if(0==(2097155&r.flags))throw new Te.ErrnoError(28);Te.truncate(r.node,t)},utime(e,t,r){var i=Te.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Te.ErrnoError(44);var i;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?ke(t):t)?4095&r|32768:0,"object"==typeof e)i=e;else{e=le.normalize(e);try{i=Te.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(i){if(128&t)throw new Te.ErrnoError(20)}else i=Te.mknod(e,r,0),s=!0;if(!i)throw new Te.ErrnoError(44);if(Te.isChrdev(i.mode)&&(t&=-513),65536&t&&!Te.isDir(i.mode))throw new Te.ErrnoError(54);if(!s){var o=Te.mayOpen(i,t);if(o)throw new Te.ErrnoError(o)}512&t&&!s&&Te.truncate(i,0),t&=-131713;var a=Te.createStream({node:i,path:Te.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!n.logReadFiles||1&t||(Te.readFiles||(Te.readFiles={}),e in Te.readFiles||(Te.readFiles[e]=1)),a},close(e){if(Te.isClosed(e))throw new Te.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Te.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Te.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Te.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,i,n){if(i<0||n<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(1==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.read)throw new Te.ErrnoError(28);var s=void 0!==n;if(s){if(!e.seekable)throw new Te.ErrnoError(70)}else n=e.position;var o=e.stream_ops.read(e,t,r,i,n);return s||(e.position+=o),o},write(e,t,r,i,n,s){if(i<0||n<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(0==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.write)throw new Te.ErrnoError(28);e.seekable&&1024&e.flags&&Te.llseek(e,0,2);var o=void 0!==n;if(o){if(!e.seekable)throw new Te.ErrnoError(70)}else n=e.position;var a=e.stream_ops.write(e,t,r,i,n,s);return o||(e.position+=a),a},allocate(e,t,r){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(t<0||r<=0)throw new Te.ErrnoError(28);if(0==(2097155&e.flags))throw new Te.ErrnoError(8);if(!Te.isFile(e.node.mode)&&!Te.isDir(e.node.mode))throw new Te.ErrnoError(43);if(!e.stream_ops.allocate)throw new Te.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,i,n){if(0!=(2&i)&&0==(2&n)&&2!=(2097155&e.flags))throw new Te.ErrnoError(2);if(1==(2097155&e.flags))throw new Te.ErrnoError(2);if(!e.stream_ops.mmap)throw new Te.ErrnoError(43);return e.stream_ops.mmap(e,t,r,i,n)},msync:(e,t,r,i,n)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,n):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Te.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,i=Te.open(e,t.flags),n=Te.stat(e).size,s=new Uint8Array(n);return Te.read(i,s,0,n,0),"utf8"===t.encoding?r=fe(s,0):"binary"===t.encoding&&(r=s),Te.close(i),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var i=Te.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(me(t)+1),s=ge(t,n,0,n.length);Te.write(i,n,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Te.write(i,t,0,t.byteLength,void 0,r.canOwn)}Te.close(i)},cwd:()=>Te.currentPath,chdir(e){var t=Te.lookupPath(e,{follow:!0});if(null===t.node)throw new Te.ErrnoError(44);if(!Te.isDir(t.node.mode))throw new Te.ErrnoError(54);var r=Te.nodePermissions(t.node,"x");if(r)throw new Te.ErrnoError(r);Te.currentPath=t.path},createDefaultDirectories(){Te.mkdir("/tmp"),Te.mkdir("/home"),Te.mkdir("/home/web_user")},createDefaultDevices(){Te.mkdir("/dev"),Te.registerDevice(Te.makedev(1,3),{read:()=>0,write:(e,t,r,i,n)=>i}),Te.mkdev("/dev/null",Te.makedev(1,3)),ve.register(Te.makedev(5,0),ve.default_tty_ops),ve.register(Te.makedev(6,0),ve.default_tty1_ops),Te.mkdev("/dev/tty",Te.makedev(5,0)),Te.mkdev("/dev/tty1",Te.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ue(e).byteLength),e[--t]);Te.createDevice("/dev","random",r),Te.createDevice("/dev","urandom",r),Te.mkdir("/dev/shm"),Te.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Te.mkdir("/proc");var e=Te.mkdir("/proc/self");Te.mkdir("/proc/self/fd"),Te.mount({mount(){var t=Te.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,i=Te.getStreamChecked(r),n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return n.parent=n,n}},t}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?Te.createDevice("/dev","stdin",n.stdin):Te.symlink("/dev/tty","/dev/stdin"),n.stdout?Te.createDevice("/dev","stdout",null,n.stdout):Te.symlink("/dev/tty","/dev/stdout"),n.stderr?Te.createDevice("/dev","stderr",null,n.stderr):Te.symlink("/dev/tty1","/dev/stderr"),Te.open("/dev/stdin",0),Te.open("/dev/stdout",1),Te.open("/dev/stderr",1)},ensureErrnoError(){Te.ErrnoError||(Te.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Te.ErrnoError.prototype=new Error,Te.ErrnoError.prototype.constructor=Te.ErrnoError,[44].forEach((e=>{Te.genericErrors[e]=new Te.ErrnoError(e),Te.genericErrors[e].stack=""})))},staticInit(){Te.ensureErrnoError(),Te.nameTable=new Array(4096),Te.mount(we,{},"/"),Te.createDefaultDirectories(),Te.createDefaultDevices(),Te.createSpecialDirectories(),Te.filesystems={MEMFS:we}},init(e,t,r){Te.init.initialized=!0,Te.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=r||n.stderr,Te.createStandardStreams()},quit(){Te.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;n||(o=i);var a=this;a.setDataGetter((e=>{var t=e*o,n=(e+1)*o-1;if(n=Math.min(n,i-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",r,!1),i!==o&&n.setRequestHeader("Range","bytes="+e+"-"+t),n.responseType="arraybuffer",n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+r+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):_e(n.responseText||"",!0)})(t,n)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&i||(o=i=1,i=this.getter(0).length,o=i,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!h)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var l=Te.createFile(e,t,a,i,n);a.contents?l.contents=a.contents:a.url&&(l.contents=null,l.url=a.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var d={};function u(e,t,r,i,n){var s=e.node.contents;if(n>=s.length)return 0;var o=Math.min(s.length-n,i);if(s.slice)for(var a=0;a{var t=l.stream_ops[e];d[e]=function(){return Te.forceLoadFile(l),t.apply(null,arguments)}})),d.read=(e,t,r,i,n)=>(Te.forceLoadFile(l),u(e,t,r,i,n)),d.mmap=(e,t,r,i,n)=>{Te.forceLoadFile(l);var s=be();if(!s)throw new Te.ErrnoError(48);return u(e,E,s,t,r),{ptr:s,allocated:!0}},l.stream_ops=d,l}},Be=(e,t)=>e?fe(S,e,t):"",Fe={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(le.isAbs(t))return t;var i;if(i=-100===e?Te.cwd():Fe.getStreamFromFD(e).path,0==t.length){if(!r)throw new Te.ErrnoError(44);return i}return le.join2(i,t)},doStat(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&le.normalize(t)!==le.normalize(Te.getPath(e.node)))return-54;throw e}A[r>>2]=i.dev,A[r+4>>2]=i.mode,k[r+8>>2]=i.nlink,A[r+12>>2]=i.uid,A[r+16>>2]=i.gid,A[r+20>>2]=i.rdev,K=[i.size>>>0,(q=i.size,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+24>>2]=K[0],A[r+28>>2]=K[1],A[r+32>>2]=4096,A[r+36>>2]=i.blocks;var n=i.atime.getTime(),s=i.mtime.getTime(),o=i.ctime.getTime();return K=[Math.floor(n/1e3)>>>0,(q=Math.floor(n/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+40>>2]=K[0],A[r+44>>2]=K[1],k[r+48>>2]=n%1e3*1e3,K=[Math.floor(s/1e3)>>>0,(q=Math.floor(s/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+56>>2]=K[0],A[r+60>>2]=K[1],k[r+64>>2]=s%1e3*1e3,K=[Math.floor(o/1e3)>>>0,(q=Math.floor(o/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+72>>2]=K[0],A[r+76>>2]=K[1],k[r+80>>2]=o%1e3*1e3,K=[i.ino>>>0,(q=i.ino,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+88>>2]=K[0],A[r+92>>2]=K[1],0},doMsync(e,t,r,i,n){if(!Te.isFile(t.node.mode))throw new Te.ErrnoError(43);if(2&i)return 0;var s=S.slice(e,e+r);Te.msync(t,s,n,r,i)},varargs:void 0,get(){var e=A[+Fe.varargs>>2];return Fe.varargs+=4,e},getp:()=>Fe.get(),getStr:e=>Be(e),getStreamFromFD:e=>Te.getStreamChecked(e)};function Pe(e,t,r){Fe.varargs=r;try{var i=Fe.getStreamFromFD(e);switch(t){case 0:if((n=Fe.get())<0)return-28;for(;Te.streams[n];)n++;return Te.createStream(i,n).fd;case 1:case 2:case 6:case 7:return 0;case 3:return i.flags;case 4:var n=Fe.get();return i.flags|=n,0;case 5:return n=Fe.getp(),U[n+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ae(28),-1}}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}}function De(e,t,r,i){Fe.varargs=i;try{t=Fe.getStr(t),t=Fe.calculateAt(e,t);var n=i?Fe.get():0;return Te.open(t,r,n).fd}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}}var Ie,Le,Re,ze=(e,t,r,i,n)=>{},Me=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ie=e},Ne=e=>{for(var t="",r=e;S[r];)t+=Ie[S[r++]];return t},Oe={},$e={},Ge={},He=e=>{throw new Le(e)},Ve=e=>{throw new Re(e)},je=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Ve("Mismatched type converter count");for(var n=0;n{$e.hasOwnProperty(e)?n[t]=$e[e]:(s.push(e),Oe.hasOwnProperty(e)||(Oe[e]=[]),Oe[e].push((()=>{n[t]=$e[e],++o===s.length&&i(n)})))})),0===s.length&&i(n)};function We(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i=t.name;if(e||He(`type "${i}" must have a positive integer typeid pointer`),$e.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;He(`Cannot register type '${i}' twice`)}if($e[e]=t,delete Ge[e],Oe.hasOwnProperty(e)){var n=Oe[e];delete Oe[e],n.forEach((e=>e()))}}function Ye(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return We(e,t,r)}var qe,Ke=8,Xe=(e,t,r,i)=>{Ye(e,{name:t=Ne(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:Ke,readValueFromPointer:function(e){return this.fromWireType(S[e])},destructorFunction:null})},Ze=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Je=e=>{He(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},it=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=it(e,t,r.baseClass);return null===i?null:r.downcast(i)},nt={},st=()=>Object.keys(ht).length,ot=()=>{var e=[];for(var t in ht)ht.hasOwnProperty(t)&&e.push(ht[t]);return e},at=[],lt=()=>{for(;at.length;){var e=at.pop();e.$$.deleteScheduled=!1,e.delete()}},dt=e=>{qe=e,at.length&&qe&&qe(lt)},ut=()=>{n.getInheritedInstanceCount=st,n.getLiveInheritedInstances=ot,n.flushPendingDeletes=lt,n.setDelayFunction=dt},ht={},ct=(e,t)=>{for(void 0===t&&He("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=ct(e,t),ht[t]),pt=(e,t)=>(t.ptrType&&t.ptr||Ve("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ve("Both smartPtrType and smartPtr must be specified"),t.count={value:1},gt(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function n(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=nt[o];if(!a)return n.call(this);s=this.isConst?a.constPointerType:a.pointerType;var l=it(t,this.registeredClass,s.registeredClass);return null===l?n.call(this):this.isSmartPointer?pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var gt=e=>"undefined"==typeof FinalizationRegistry?(gt=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),gt=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),gt(e)),_t=()=>{Object.assign(yt.prototype,{isAliasOf(e){if(!(this instanceof yt))return!1;if(!(e instanceof yt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)n=i.upcast(n),i=i.baseClass;return t===i&&r===n},clone(){if(this.$$.ptr||Je(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=gt(Object.create(Object.getPrototypeOf(this),{$$:{value:Ze(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),at.push(this),1===at.length&&qe&&qe(lt),this.$$.deleteScheduled=!0,this}})};function yt(){}var vt=48,bt=57,wt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=vt&&t<=bt?`_${e}`:e};function Et(e,t){return{[e=wt(e)]:function(){return t.apply(this,arguments)}}[e]}var St=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||He(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}},Ut=(e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&He(`Cannot register public name '${e}' twice`),St(n,e,e),n.hasOwnProperty(r)&&He(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))};function xt(e,t,r,i,n,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=n,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}var At=(e,t,r)=>{for(;t!==r;)t.upcast||He(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function kt(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${ar(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Ct(e,t){var r;if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||He(`Cannot pass "${ar(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=At(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&He("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var n=t.clone();r=this.rawShare(r,nr.toHandle((()=>n.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:He("Unsupporting sharing policy")}return r}function Tt(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${ar(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Bt(e){return this.fromWireType(k[e>>2])}var Ft=()=>{Object.assign(Pt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Ke,readValueFromPointer:Bt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Pt(e,t,r,i,n,s,o,a,l,d,u){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=n,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=u,n||void 0!==t.baseClass?this.toWireType=Ct:i?(this.toWireType=kt,this.destructorFunction=null):(this.toWireType=Tt,this.destructorFunction=null)}var Dt,It,Lt=(e,t,r)=>{n.hasOwnProperty(e)||Ve("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},Rt=(e,t,r)=>{var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)},zt=[],Mt=e=>{var t=zt[e];return t||(e>=zt.length&&(zt.length=e+1),zt[e]=t=Dt.get(e)),t},Nt=(e,t,r)=>e.includes("j")?Rt(e,t,r):Mt(t).apply(null,r),Ot=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Nt(e,t,r)}},$t=(e,t)=>{var r=(e=Ne(e)).includes("j")?Ot(e,t):Mt(t);return"function"!=typeof r&&He(`unknown function pointer with signature ${e}: ${t}`),r},Gt=(e,t)=>{var r=Et(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Ht=e=>{var t=oi(e),r=Ne(t);return ii(t),r},Vt=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||$e[t]||(Ge[t]?Ge[t].forEach(e):(r.push(t),i[t]=!0))})),new It(`${e}: `+r.map(Ht).join([", "]))},jt=(e,t,r,i,n,s,o,a,l,d,u,h,c)=>{u=Ne(u),s=$t(n,s),a&&(a=$t(o,a)),d&&(d=$t(l,d)),c=$t(h,c);var f=wt(u);Ut(f,(function(){Vt(`Cannot construct ${u} due to unbound types`,[i])})),je([e,t,r],i?[i]:[],(function(t){var r,n;t=t[0],n=i?(r=t.registeredClass).instancePrototype:yt.prototype;var o=Et(f,(function(){if(Object.getPrototypeOf(this)!==l)throw new Le("Use 'new' to construct "+u);if(void 0===h.constructor_body)throw new Le(u+" has no accessible constructor");var e=h.constructor_body[arguments.length];if(void 0===e)throw new Le(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(h.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(n,{constructor:{value:o}});o.prototype=l;var h=new xt(u,o,l,c,r,s,a,d);h.baseClass&&(void 0===h.baseClass.__derivedClasses&&(h.baseClass.__derivedClasses=[]),h.baseClass.__derivedClasses.push(h));var p=new Pt(u,h,!0,!1,!1),m=new Pt(u+"*",h,!1,!1,!1),g=new Pt(u+" const*",h,!1,!0,!1);return nt[e]={pointerType:m,constPointerType:g},Lt(f,o),[p,m,g]}))},Wt=(e,t)=>{for(var r=[],i=0;i>2]);return r},Yt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function qt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=Et(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,n=e.apply(i,t);return n instanceof Object?n:i}function Kt(e,t,r,i,n,s){var o=t.length;o<2&&He("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,l=!1,d=1;d0?", ":"")+c),f+=(u||s?"var rv = ":"")+"invoker(fn"+(c.length>0?", ":"")+c+");\n",l)f+="runDestructors(destructors);\n";else for(d=a?1:2;d{var o=Wt(t,r);n=$t(i,n),je([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Le(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Vt(`Cannot construct ${e.name} due to unbound types`,o)},je([],o,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Kt(r,i,null,n,s),[]))),[]}))},Zt=(e,t,r,i,n,s,o,a,l)=>{var d=Wt(r,i);t=Ne(t),s=$t(n,s),je([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function n(){Vt(`Cannot call ${i} due to unbound types`,d)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,h=u[t];return void 0===h||void 0===h.overloadTable&&h.className!==e.name&&h.argCount===r-2?(n.argCount=r-2,n.className=e.name,u[t]=n):(St(u,t,i),u[t].overloadTable[r-2]=n),je([],d,(function(n){var a=Kt(i,n,e,s,o,l);return void 0===u[t].overloadTable?(a.argCount=r-2,u[t]=a):u[t].overloadTable[r-2]=a,[]})),[]}))};function Jt(){Object.assign(Qt.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Qt(){this.allocated=[void 0],this.freelist=[]}var er=new Qt,tr=e=>{e>=er.reserved&&0==--er.get(e).refcount&&er.free(e)},rr=()=>{for(var e=0,t=er.reserved;t{er.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),er.reserved=er.allocated.length,n.count_emval_handles=rr},nr={toValue:e=>(e||He("Cannot use deleted val. handle = "+e),er.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return er.allocate({refcount:1,value:e})}}};function sr(e){return this.fromWireType(A[e>>2])}var or=(e,t)=>{Ye(e,{name:t=Ne(t),fromWireType:e=>{var t=nr.toValue(e);return tr(e),t},toWireType:(e,t)=>nr.toHandle(t),argPackAdvance:Ke,readValueFromPointer:sr,destructorFunction:null})},ar=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},lr=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(C[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},dr=(e,t,r)=>{Ye(e,{name:t=Ne(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Ke,readValueFromPointer:lr(t,r),destructorFunction:null})},ur=(e,t,r)=>{switch(t){case 1:return r?e=>E[e>>0]:e=>S[e>>0];case 2:return r?e=>U[e>>1]:e=>x[e>>1];case 4:return r?e=>A[e>>2]:e=>k[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},hr=(e,t,r,i,n)=>{t=Ne(t);var s=e=>e;if(0===i){var o=32-8*r;s=e=>e<>>o}var a=t.includes("unsigned");Ye(e,{name:t,fromWireType:s,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Ke,readValueFromPointer:ur(t,r,0!==i),destructorFunction:null})},cr=(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=k[e>>2],r=k[e+4>>2];return new i(E.buffer,r,t)}Ye(e,{name:r=Ne(r),fromWireType:n,argPackAdvance:Ke,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},fr=(e,t,r)=>ge(e,S,t,r),pr=(e,t)=>{var r="std::string"===(t=Ne(t));Ye(e,{name:t,fromWireType(e){var t,i=k[e>>2],n=e+4;if(r)for(var s=n,o=0;o<=i;++o){var a=n+o;if(o==i||0==S[a]){var l=Be(s,a-s);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),s=a+1}}else{var d=new Array(i);for(o=0;o>2]=i,r&&n)fr(t,o,i+1);else if(n)for(var a=0;a255&&(ii(o),He("String has UTF-16 code units that do not fit in 8 bits")),S[o+a]=l}else for(a=0;a{for(var r=e,i=r>>1,n=i+t/2;!(i>=n)&&x[i];)++i;if((r=i<<1)-e>32&&mr)return mr.decode(S.subarray(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=U[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s},_r=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return U[t>>1]=0,t-i},yr=e=>2*e.length,vr=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var n=A[e+4*r>>2];if(0==n)break;if(++r,n>=65536){var s=n-65536;i+=String.fromCharCode(55296|s>>10,56320|1023&s)}else i+=String.fromCharCode(n)}return i},br=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,s=0;s=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s)),A[t>>2]=o,(t+=4)+4>n)break}return A[t>>2]=0,t-i},wr=e=>{for(var t=0,r=0;r=55296&&i<=57343&&++r,t+=4}return t},Er=(e,t,r)=>{var i,n,s,o,a;r=Ne(r),2===t?(i=gr,n=_r,o=yr,s=()=>x,a=1):4===t&&(i=vr,n=br,o=wr,s=()=>k,a=2),Ye(e,{name:r,fromWireType:e=>{for(var r,n=k[e>>2],o=s(),l=e+4,d=0;d<=n;++d){var u=e+4+d*t;if(d==n||0==o[u>>a]){var h=i(l,u-l);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),l=u+t}}return ii(e),r},toWireType:(e,i)=>{"string"!=typeof i&&He(`Cannot pass non-string to C++ string type ${r}`);var s=o(i),l=ni(4+s+t);return k[l>>2]=s>>a,n(i,l+4,s+t),null!==e&&e.push(ii,l),l},argPackAdvance:Ke,readValueFromPointer:sr,destructorFunction(e){ii(e)}})},Sr=(e,t)=>{Ye(e,{isVoid:!0,name:t=Ne(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Ur={},xr=e=>{var t=Ur[e];return void 0===t?Ne(e):t},Ar=[],kr=(e,t,r,i)=>{(e=Ar[e])(t=nr.toValue(t),r=xr(r),null,i)},Cr=e=>{var t=Ar.length;return Ar.push(e),t},Tr=(e,t)=>{var r=$e[e];return void 0===r&&He(t+" has unknown type "+Ht(e)),r},Br=(e,t)=>{for(var r=new Array(e),i=0;i>2],"parameter "+i);return r},Fr={},Pr=(e,t)=>{var r=Br(e,t),i=r[0],n=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",s=Fr[n];if(void 0!==s)return s;for(var o=["retType"],a=[i],l="",d=0;dt+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Ir=()=>{W("")},Lr=()=>Date.now(),Rr=(e,t,r)=>S.copyWithin(e,t,t+r),zr=e=>{W("OOM")},Mr=e=>{S.length,zr()},Nr={},Or=()=>d||"./this.program",$r=()=>{if(!$r.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Or()};for(var t in Nr)void 0===Nr[t]?delete e[t]:e[t]=Nr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);$r.strings=r}return $r.strings},Gr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);E[t>>0]=0},Hr=(e,t)=>{var r=0;return $r().forEach(((i,n)=>{var s=t+r;k[e+4*n>>2]=s,Gr(i,s),r+=i.length+1})),0},Vr=(e,t)=>{var r=$r();k[e>>2]=r.length;var i=0;return r.forEach((e=>i+=e.length+1)),k[t>>2]=i,0};function jr(e){try{var t=Fe.getStreamFromFD(e);return Te.close(t),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}function Wr(e,t){try{var r=Fe.getStreamFromFD(e),i=r.tty?2:Te.isDir(r.mode)?3:Te.isLink(r.mode)?7:4;return E[t>>0]=i,U[t+2>>1]=0,K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[t+8>>2]=K[0],A[t+12>>2]=K[1],K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[t+16>>2]=K[0],A[t+20>>2]=K[1],0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var Yr=(e,t,r,i)=>{for(var n=0,s=0;s>2],a=k[t+4>>2];t+=8;var l=Te.read(e,E,o,a,i);if(l<0)return-1;if(n+=l,l>2]=s,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}function Kr(e,t,r,i,n){var s=Dr(t,r);try{if(isNaN(s))return 61;var o=Fe.getStreamFromFD(e);return Te.llseek(o,s,i),K=[o.position>>>0,(q=o.position,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[n>>2]=K[0],A[n+4>>2]=K[1],o.getdents&&0===s&&0===i&&(o.getdents=null),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var Xr=(e,t,r,i)=>{for(var n=0,s=0;s>2],a=k[t+4>>2];t+=8;var l=Te.write(e,E,o,a,i);if(l<0)return-1;n+=l,void 0!==i&&(i+=l)}return n};function Zr(e,t,r,i){try{var n=Fe.getStreamFromFD(e),s=Xr(n,t,r);return k[i>>2]=s,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var Jr=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Te.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Qr=365,ei=146;Object.defineProperties(Jr.prototype,{read:{get:function(){return(this.mode&Qr)===Qr},set:function(e){e?this.mode|=Qr:this.mode&=~Qr}},write:{get:function(){return(this.mode&ei)===ei},set:function(e){e?this.mode|=ei:this.mode&=~ei}},isFolder:{get:function(){return Te.isDir(this.mode)}},isDevice:{get:function(){return Te.isChrdev(this.mode)}}}),Te.FSNode=Jr,Te.createPreloadedFile=Ae,Te.staticInit(),Me(),Le=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Re=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},_t(),ut(),Ft(),It=n.UnboundTypeError=Gt(Error,"UnboundTypeError"),Jt(),ir();var ti={p:oe,B:Pe,v:De,t:ze,n:Xe,r:jt,q:Xt,d:Zt,C:or,m:dr,c:hr,b:cr,l:pr,g:Er,o:Sr,f:kr,i:tr,h:Pr,a:Ir,e:Lr,z:Rr,u:Mr,x:Hr,y:Vr,k:jr,w:Wr,A:qr,s:Kr,j:Zr},ri=ie(),ii=e=>(ii=ri.F)(e),ni=e=>(ni=ri.G)(e),si=()=>(si=ri.I)(),oi=e=>(oi=ri.J)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=ri.K)();var ai,li=e=>(li=ri.M)(e);function di(){function e(){ai||(ai=!0,n.calledRun=!0,B||(z(),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),M()))}G>0||(R(),G>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_jiji=(e,t,r,i,s)=>(n.dynCall_jiji=ri.N)(e,t,r,i,s),n._ff_h264_cabac_tables=74828,H=function e(){ai||di(),ai||(H=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return di(),t.ready}),r=(()=>{var e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href;return async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,i,n;(n=t).ready=new Promise(((e,t)=>{r=e,i=t})),(n=void 0!==n?n:{}).locateFile=function(e){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:e};var s,o,a,l=Object.assign({},n),d="./this.program",u="object"==typeof window,h="function"==typeof importScripts,c="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";function p(e){return n.locateFile?n.locateFile(e,f):f+e}if(c){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href),g=m("fs"),_=m("path");f=h?_.dirname(f)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href)),s=(e,t)=>(e=J(e)?new URL(e):_.normalize(e),g.readFileSync(e,t?void 0:"utf8")),a=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},o=function(e,t,r){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=J(e)?new URL(e):_.normalize(e),g.readFile(e,i?void 0:"utf8",((e,n)=>{e?r(e):t(i?n.buffer:n)}))},!n.thisProgram&&process.argv.length>1&&(d=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),n.inspect=()=>"[Emscripten Module object]"}else(u||h)&&(h?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},h&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):r()},i.onerror=r,i.send(null)});var y,v,b=n.print||console.log.bind(console),w=n.printErr||console.error.bind(console);Object.assign(n,l),l=null,n.arguments&&n.arguments,n.thisProgram&&(d=n.thisProgram),n.quit&&n.quit,n.wasmBinary&&(y=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&W("no native wasm support detected");var E,S,U,x,A,k,C,T,B=!1;function F(e,t){e||W(t)}function P(){var e=v.buffer;n.HEAP8=E=new Int8Array(e),n.HEAP16=U=new Int16Array(e),n.HEAPU8=S=new Uint8Array(e),n.HEAPU16=x=new Uint16Array(e),n.HEAP32=A=new Int32Array(e),n.HEAPU32=k=new Uint32Array(e),n.HEAPF32=C=new Float32Array(e),n.HEAPF64=T=new Float64Array(e)}var D=[],I=[],L=[];function R(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)N(n.preRun.shift());ne(D)}function z(){n.noFSInit||Te.init.initialized||Te.init(),Te.ignorePermissions=!1,ne(I)}function M(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)$(n.postRun.shift());ne(L)}function N(e){D.unshift(e)}function O(e){I.unshift(e)}function $(e){L.unshift(e)}var G=0,H=null;function V(e){G++,n.monitorRunDependencies&&n.monitorRunDependencies(G)}function j(e){if(G--,n.monitorRunDependencies&&n.monitorRunDependencies(G),0==G&&H){var t=H;H=null,t()}}function W(e){n.onAbort&&n.onAbort(e),w(e="Aborted("+e+")"),B=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw i(t),t}var Y,q,K,X="data:application/octet-stream;base64,";function Z(e){return e.startsWith(X)}function J(e){return e.startsWith("file://")}function Q(e){if(e==Y&&y)return new Uint8Array(y);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!y&&(u||h)){if("function"==typeof fetch&&!J(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(o)return new Promise(((t,r)=>{o(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),W(e)}))}function re(e,t,r,i){return e||"function"!=typeof WebAssembly.instantiateStreaming||Z(t)||J(t)||c||"function"!=typeof fetch?te(t,r,i):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(i,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),te(t,r,i)}))))}function ie(){var e={a:ti};function t(e,t){return ri=e.exports,v=ri.D,P(),Dt=ri.G,O(ri.E),j(),ri}if(V(),n.instantiateWasm)try{return n.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),i(e)}return re(y,Y,e,(function(e){t(e.instance)})).catch(i),{}}n.locateFile?Z(Y="decoder-pro-audio.wasm")||(Y=p(Y)):Y=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href).href;var ne=e=>{for(;e.length>0;)e.shift()(n)};function se(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){k[this.ptr+4>>2]=e},this.get_type=function(){return k[this.ptr+4>>2]},this.set_destructor=function(e){k[this.ptr+8>>2]=e},this.get_destructor=function(){return k[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,E[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=E[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,E[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=E[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){k[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return k[this.ptr+16>>2]},this.get_exception_ptr=function(){if(li(this.get_type()))return k[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var oe=(e,t,r)=>{throw new se(e).init(t,r),e},ae=e=>(A[ni()>>2]=e,e),le={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,i=e.length-1;i>=0;i--){var n=e[i];"."===n?e.splice(i,1):".."===n?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=le.isAbs(e),r="/"===e.substr(-1);return(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=le.splitPath(e),r=t[0],i=t[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=le.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return le.normalize(e.join("/"))},join2:(e,t)=>le.normalize(e+"/"+t)},de=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(c)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}W("initRandomDevice")},ue=e=>(ue=de())(e),he={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:Te.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");if(!i)return"";e=i+"/"+e,t=le.isAbs(i)}return(t?"/":"")+(e=le.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=he.resolve(e).substr(1),t=he.resolve(t).substr(1);for(var i=r(e.split("/")),n=r(t.split("/")),s=Math.min(i.length,n.length),o=s,a=0;a{for(var i=t+r,n=t;e[n]&&!(n>=i);)++n;if(n-t>16&&e.buffer&&ce)return ce.decode(e.subarray(t,n));for(var s="";t>10,56320|1023&d)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s},pe=[],me=e=>{for(var t=0,r=0;r=55296&&i<=57343?(t+=4,++r):t+=3}return t},ge=(e,t,r,i)=>{if(!(i>0))return 0;for(var n=r,s=r+i-1,o=0;o=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o);if(a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-n};function _e(e,t,r){var i=r>0?r:me(e)+1,n=new Array(i),s=ge(e,n,0,n.length);return t&&(n.length=s),n}var ye=()=>{if(!pe.length){var e=null;if(c){var t=Buffer.alloc(256),r=0,i=process.stdin.fd;try{r=g.readSync(i,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=_e(e,!0)}return pe.shift()},ve={ttys:[],init(){},shutdown(){},register(e,t){ve.ttys[e]={input:[],output:[],ops:t},Te.registerDevice(e,ve.stream_ops)},stream_ops:{open(e){var t=ve.ttys[e.node.rdev];if(!t)throw new Te.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,i,n){if(!e.tty||!e.tty.ops.get_char)throw new Te.ErrnoError(60);for(var s=0,o=0;oye(),put_char(e,t){null===t||10===t?(b(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(fe(e.output,0)),e.output=[])}}},be=e=>{W()},we={ops_table:null,mount:e=>we.createNode(null,"/",16895,0),createNode(e,t,r,i){if(Te.isBlkdev(r)||Te.isFIFO(r))throw new Te.ErrnoError(63);we.ops_table||(we.ops_table={dir:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,lookup:we.node_ops.lookup,mknod:we.node_ops.mknod,rename:we.node_ops.rename,unlink:we.node_ops.unlink,rmdir:we.node_ops.rmdir,readdir:we.node_ops.readdir,symlink:we.node_ops.symlink},stream:{llseek:we.stream_ops.llseek}},file:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:{llseek:we.stream_ops.llseek,read:we.stream_ops.read,write:we.stream_ops.write,allocate:we.stream_ops.allocate,mmap:we.stream_ops.mmap,msync:we.stream_ops.msync}},link:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,readlink:we.node_ops.readlink},stream:{}},chrdev:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:Te.chrdev_stream_ops}});var n=Te.createNode(e,t,r,i);return Te.isDir(n.mode)?(n.node_ops=we.ops_table.dir.node,n.stream_ops=we.ops_table.dir.stream,n.contents={}):Te.isFile(n.mode)?(n.node_ops=we.ops_table.file.node,n.stream_ops=we.ops_table.file.stream,n.usedBytes=0,n.contents=null):Te.isLink(n.mode)?(n.node_ops=we.ops_table.link.node,n.stream_ops=we.ops_table.link.stream):Te.isChrdev(n.mode)&&(n.node_ops=we.ops_table.chrdev.node,n.stream_ops=we.ops_table.chrdev.stream),n.timestamp=Date.now(),e&&(e.contents[t]=n,e.timestamp=n.timestamp),n},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var i=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(i.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=Te.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Te.isDir(e.mode)?t.size=4096:Te.isFile(e.mode)?t.size=e.usedBytes:Te.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&we.resizeFileStorage(e,t.size)},lookup(e,t){throw Te.genericErrors[44]},mknod:(e,t,r,i)=>we.createNode(e,t,r,i),rename(e,t,r){if(Te.isDir(e.mode)){var i;try{i=Te.lookupNode(t,r)}catch(e){}if(i)for(var n in i.contents)throw new Te.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=Te.lookupNode(e,t);for(var i in r.contents)throw new Te.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var i=we.createNode(e,t,41471,0);return i.link=r,i},readlink(e){if(!Te.isLink(e.mode))throw new Te.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,i,n){var s=e.node.contents;if(n>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-n,i);if(o>8&&s.subarray)t.set(s.subarray(n,n+o),r);else for(var a=0;a0||r+t(we.stream_ops.write(e,t,0,i,r,!1),0)}},Ee=(e,t,r,i)=>{var n=i?"":`al ${e}`;o(e,(r=>{F(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),n&&j()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),n&&V()},Se=(e,t,r,i,n,s)=>Te.createDataFile(e,t,r,i,n,s),Ue=n.preloadPlugins||[],xe=(e,t,r,i)=>{"undefined"!=typeof Browser&&Browser.init();var n=!1;return Ue.forEach((s=>{n||s.canHandle(t)&&(s.handle(e,t,r,i),n=!0)})),n},Ae=(e,t,r,i,n,s,o,a,l,d)=>{var u=t?he.resolve(le.join2(e,t)):e;function h(r){function h(r){d&&d(),a||Se(e,t,r,i,n,l),s&&s(),j()}xe(r,u,h,(()=>{o&&o(),j()}))||h(r)}V(),"string"==typeof r?Ee(r,(e=>h(e)),o):h(r)},ke=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Ce=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Te={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=he.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new Te.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),i=Te.root,n="/",s=0;s40)throw new Te.ErrnoError(32)}}return{path:n,node:i}},getPath(e){for(var t;;){if(Te.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,i=0;i>>0)%Te.nameTable.length},hashAddNode(e){var t=Te.hashName(e.parent.id,e.name);e.name_next=Te.nameTable[t],Te.nameTable[t]=e},hashRemoveNode(e){var t=Te.hashName(e.parent.id,e.name);if(Te.nameTable[t]===e)Te.nameTable[t]=e.name_next;else for(var r=Te.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=Te.mayLookup(e);if(r)throw new Te.ErrnoError(r,e);for(var i=Te.hashName(e.id,t),n=Te.nameTable[i];n;n=n.name_next){var s=n.name;if(n.parent.id===e.id&&s===t)return n}return Te.lookup(e,t)},createNode(e,t,r,i){var n=new Te.FSNode(e,t,r,i);return Te.hashAddNode(n),n},destroyNode(e){Te.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>Te.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=Te.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{Te.lookupNode(e,t);return 20}catch(e){}return Te.nodePermissions(e,"wx")},mayDelete(e,t,r){var i;try{i=Te.lookupNode(e,t)}catch(e){return e.errno}var n=Te.nodePermissions(e,"wx");if(n)return n;if(r){if(!Te.isDir(i.mode))return 54;if(Te.isRoot(i)||Te.getPath(i)===Te.cwd())return 10}else if(Te.isDir(i.mode))return 31;return 0},mayOpen:(e,t)=>e?Te.isLink(e.mode)?32:Te.isDir(e.mode)&&("r"!==Te.flagsToPermissionString(t)||512&t)?31:Te.nodePermissions(e,Te.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Te.MAX_OPEN_FDS;e++)if(!Te.streams[e])return e;throw new Te.ErrnoError(33)},getStreamChecked(e){var t=Te.getStream(e);if(!t)throw new Te.ErrnoError(8);return t},getStream:e=>Te.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return Te.FSStream||(Te.FSStream=function(){this.shared={}},Te.FSStream.prototype={},Object.defineProperties(Te.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Te.FSStream,e),-1==t&&(t=Te.nextfd()),e.fd=t,Te.streams[t]=e,e},closeStream(e){Te.streams[e]=null},chrdev_stream_ops:{open(e){var t=Te.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Te.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){Te.devices[e]={stream_ops:t}},getDevice:e=>Te.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var i=r.pop();t.push(i),r.push.apply(r,i.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),Te.syncFSRequests++,Te.syncFSRequests>1&&w(`warning: ${Te.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=Te.getMounts(Te.root.mount),i=0;function n(e){return Te.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,n(e));++i>=r.length&&n(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var i,n="/"===r,s=!r;if(n&&Te.root)throw new Te.ErrnoError(10);if(!n&&!s){var o=Te.lookupPath(r,{follow_mount:!1});if(r=o.path,i=o.node,Te.isMountpoint(i))throw new Te.ErrnoError(10);if(!Te.isDir(i.mode))throw new Te.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},l=e.mount(a);return l.mount=a,a.root=l,n?Te.root=l:i&&(i.mounted=a,i.mount&&i.mount.mounts.push(a)),l},unmount(e){var t=Te.lookupPath(e,{follow_mount:!1});if(!Te.isMountpoint(t.node))throw new Te.ErrnoError(28);var r=t.node,i=r.mounted,n=Te.getMounts(i);Object.keys(Te.nameTable).forEach((e=>{for(var t=Te.nameTable[e];t;){var r=t.name_next;n.includes(t.mount)&&Te.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(i);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var i=Te.lookupPath(e,{parent:!0}).node,n=le.basename(e);if(!n||"."===n||".."===n)throw new Te.ErrnoError(28);var s=Te.mayCreate(i,n);if(s)throw new Te.ErrnoError(s);if(!i.node_ops.mknod)throw new Te.ErrnoError(63);return i.node_ops.mknod(i,n,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Te.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Te.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),i="",n=0;n(void 0===r&&(r=t,t=438),t|=8192,Te.mknod(e,t,r)),symlink(e,t){if(!he.resolve(e))throw new Te.ErrnoError(44);var r=Te.lookupPath(t,{parent:!0}).node;if(!r)throw new Te.ErrnoError(44);var i=le.basename(t),n=Te.mayCreate(r,i);if(n)throw new Te.ErrnoError(n);if(!r.node_ops.symlink)throw new Te.ErrnoError(63);return r.node_ops.symlink(r,i,e)},rename(e,t){var r,i,n=le.dirname(e),s=le.dirname(t),o=le.basename(e),a=le.basename(t);if(r=Te.lookupPath(e,{parent:!0}).node,i=Te.lookupPath(t,{parent:!0}).node,!r||!i)throw new Te.ErrnoError(44);if(r.mount!==i.mount)throw new Te.ErrnoError(75);var l,d=Te.lookupNode(r,o),u=he.relative(e,s);if("."!==u.charAt(0))throw new Te.ErrnoError(28);if("."!==(u=he.relative(t,n)).charAt(0))throw new Te.ErrnoError(55);try{l=Te.lookupNode(i,a)}catch(e){}if(d!==l){var h=Te.isDir(d.mode),c=Te.mayDelete(r,o,h);if(c)throw new Te.ErrnoError(c);if(c=l?Te.mayDelete(i,a,h):Te.mayCreate(i,a))throw new Te.ErrnoError(c);if(!r.node_ops.rename)throw new Te.ErrnoError(63);if(Te.isMountpoint(d)||l&&Te.isMountpoint(l))throw new Te.ErrnoError(10);if(i!==r&&(c=Te.nodePermissions(r,"w")))throw new Te.ErrnoError(c);Te.hashRemoveNode(d);try{r.node_ops.rename(d,i,a)}catch(e){throw e}finally{Te.hashAddNode(d)}}},rmdir(e){var t=Te.lookupPath(e,{parent:!0}).node,r=le.basename(e),i=Te.lookupNode(t,r),n=Te.mayDelete(t,r,!0);if(n)throw new Te.ErrnoError(n);if(!t.node_ops.rmdir)throw new Te.ErrnoError(63);if(Te.isMountpoint(i))throw new Te.ErrnoError(10);t.node_ops.rmdir(t,r),Te.destroyNode(i)},readdir(e){var t=Te.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Te.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=Te.lookupPath(e,{parent:!0}).node;if(!t)throw new Te.ErrnoError(44);var r=le.basename(e),i=Te.lookupNode(t,r),n=Te.mayDelete(t,r,!1);if(n)throw new Te.ErrnoError(n);if(!t.node_ops.unlink)throw new Te.ErrnoError(63);if(Te.isMountpoint(i))throw new Te.ErrnoError(10);t.node_ops.unlink(t,r),Te.destroyNode(i)},readlink(e){var t=Te.lookupPath(e).node;if(!t)throw new Te.ErrnoError(44);if(!t.node_ops.readlink)throw new Te.ErrnoError(28);return he.resolve(Te.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=Te.lookupPath(e,{follow:!t}).node;if(!r)throw new Te.ErrnoError(44);if(!r.node_ops.getattr)throw new Te.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Te.stat(e,!0),chmod(e,t,r){var i;"string"==typeof e?i=Te.lookupPath(e,{follow:!r}).node:i=e;if(!i.node_ops.setattr)throw new Te.ErrnoError(63);i.node_ops.setattr(i,{mode:4095&t|-4096&i.mode,timestamp:Date.now()})},lchmod(e,t){Te.chmod(e,t,!0)},fchmod(e,t){var r=Te.getStreamChecked(e);Te.chmod(r.node,t)},chown(e,t,r,i){var n;"string"==typeof e?n=Te.lookupPath(e,{follow:!i}).node:n=e;if(!n.node_ops.setattr)throw new Te.ErrnoError(63);n.node_ops.setattr(n,{timestamp:Date.now()})},lchown(e,t,r){Te.chown(e,t,r,!0)},fchown(e,t,r){var i=Te.getStreamChecked(e);Te.chown(i.node,t,r)},truncate(e,t){if(t<0)throw new Te.ErrnoError(28);var r;"string"==typeof e?r=Te.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new Te.ErrnoError(63);if(Te.isDir(r.mode))throw new Te.ErrnoError(31);if(!Te.isFile(r.mode))throw new Te.ErrnoError(28);var i=Te.nodePermissions(r,"w");if(i)throw new Te.ErrnoError(i);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=Te.getStreamChecked(e);if(0==(2097155&r.flags))throw new Te.ErrnoError(28);Te.truncate(r.node,t)},utime(e,t,r){var i=Te.lookupPath(e,{follow:!0}).node;i.node_ops.setattr(i,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new Te.ErrnoError(44);var i;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?ke(t):t)?4095&r|32768:0,"object"==typeof e)i=e;else{e=le.normalize(e);try{i=Te.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(i){if(128&t)throw new Te.ErrnoError(20)}else i=Te.mknod(e,r,0),s=!0;if(!i)throw new Te.ErrnoError(44);if(Te.isChrdev(i.mode)&&(t&=-513),65536&t&&!Te.isDir(i.mode))throw new Te.ErrnoError(54);if(!s){var o=Te.mayOpen(i,t);if(o)throw new Te.ErrnoError(o)}512&t&&!s&&Te.truncate(i,0),t&=-131713;var a=Te.createStream({node:i,path:Te.getPath(i),flags:t,seekable:!0,position:0,stream_ops:i.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!n.logReadFiles||1&t||(Te.readFiles||(Te.readFiles={}),e in Te.readFiles||(Te.readFiles[e]=1)),a},close(e){if(Te.isClosed(e))throw new Te.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Te.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Te.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Te.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,i,n){if(i<0||n<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(1==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.read)throw new Te.ErrnoError(28);var s=void 0!==n;if(s){if(!e.seekable)throw new Te.ErrnoError(70)}else n=e.position;var o=e.stream_ops.read(e,t,r,i,n);return s||(e.position+=o),o},write(e,t,r,i,n,s){if(i<0||n<0)throw new Te.ErrnoError(28);if(Te.isClosed(e))throw new Te.ErrnoError(8);if(0==(2097155&e.flags))throw new Te.ErrnoError(8);if(Te.isDir(e.node.mode))throw new Te.ErrnoError(31);if(!e.stream_ops.write)throw new Te.ErrnoError(28);e.seekable&&1024&e.flags&&Te.llseek(e,0,2);var o=void 0!==n;if(o){if(!e.seekable)throw new Te.ErrnoError(70)}else n=e.position;var a=e.stream_ops.write(e,t,r,i,n,s);return o||(e.position+=a),a},allocate(e,t,r){if(Te.isClosed(e))throw new Te.ErrnoError(8);if(t<0||r<=0)throw new Te.ErrnoError(28);if(0==(2097155&e.flags))throw new Te.ErrnoError(8);if(!Te.isFile(e.node.mode)&&!Te.isDir(e.node.mode))throw new Te.ErrnoError(43);if(!e.stream_ops.allocate)throw new Te.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,i,n){if(0!=(2&i)&&0==(2&n)&&2!=(2097155&e.flags))throw new Te.ErrnoError(2);if(1==(2097155&e.flags))throw new Te.ErrnoError(2);if(!e.stream_ops.mmap)throw new Te.ErrnoError(43);return e.stream_ops.mmap(e,t,r,i,n)},msync:(e,t,r,i,n)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,i,n):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new Te.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,i=Te.open(e,t.flags),n=Te.stat(e).size,s=new Uint8Array(n);return Te.read(i,s,0,n,0),"utf8"===t.encoding?r=fe(s,0):"binary"===t.encoding&&(r=s),Te.close(i),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var i=Te.open(e,r.flags,r.mode);if("string"==typeof t){var n=new Uint8Array(me(t)+1),s=ge(t,n,0,n.length);Te.write(i,n,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Te.write(i,t,0,t.byteLength,void 0,r.canOwn)}Te.close(i)},cwd:()=>Te.currentPath,chdir(e){var t=Te.lookupPath(e,{follow:!0});if(null===t.node)throw new Te.ErrnoError(44);if(!Te.isDir(t.node.mode))throw new Te.ErrnoError(54);var r=Te.nodePermissions(t.node,"x");if(r)throw new Te.ErrnoError(r);Te.currentPath=t.path},createDefaultDirectories(){Te.mkdir("/tmp"),Te.mkdir("/home"),Te.mkdir("/home/web_user")},createDefaultDevices(){Te.mkdir("/dev"),Te.registerDevice(Te.makedev(1,3),{read:()=>0,write:(e,t,r,i,n)=>i}),Te.mkdev("/dev/null",Te.makedev(1,3)),ve.register(Te.makedev(5,0),ve.default_tty_ops),ve.register(Te.makedev(6,0),ve.default_tty1_ops),Te.mkdev("/dev/tty",Te.makedev(5,0)),Te.mkdev("/dev/tty1",Te.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=ue(e).byteLength),e[--t]);Te.createDevice("/dev","random",r),Te.createDevice("/dev","urandom",r),Te.mkdir("/dev/shm"),Te.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Te.mkdir("/proc");var e=Te.mkdir("/proc/self");Te.mkdir("/proc/self/fd"),Te.mount({mount(){var t=Te.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,i=Te.getStreamChecked(r),n={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>i.path}};return n.parent=n,n}},t}},{},"/proc/self/fd")},createStandardStreams(){n.stdin?Te.createDevice("/dev","stdin",n.stdin):Te.symlink("/dev/tty","/dev/stdin"),n.stdout?Te.createDevice("/dev","stdout",null,n.stdout):Te.symlink("/dev/tty","/dev/stdout"),n.stderr?Te.createDevice("/dev","stderr",null,n.stderr):Te.symlink("/dev/tty1","/dev/stderr"),Te.open("/dev/stdin",0),Te.open("/dev/stdout",1),Te.open("/dev/stderr",1)},ensureErrnoError(){Te.ErrnoError||(Te.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Te.ErrnoError.prototype=new Error,Te.ErrnoError.prototype.constructor=Te.ErrnoError,[44].forEach((e=>{Te.genericErrors[e]=new Te.ErrnoError(e),Te.genericErrors[e].stack=""})))},staticInit(){Te.ensureErrnoError(),Te.nameTable=new Array(4096),Te.mount(we,{},"/"),Te.createDefaultDirectories(),Te.createDefaultDevices(),Te.createSpecialDirectories(),Te.filesystems={MEMFS:we}},init(e,t,r){Te.init.initialized=!0,Te.ensureErrnoError(),n.stdin=e||n.stdin,n.stdout=t||n.stdout,n.stderr=r||n.stderr,Te.createStandardStreams()},quit(){Te.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,i=Number(e.getResponseHeader("Content-length")),n=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;n||(o=i);var a=this;a.setDataGetter((e=>{var t=e*o,n=(e+1)*o-1;if(n=Math.min(n,i-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>i-1)throw new Error("only "+i+" bytes available! programmer error!");var n=new XMLHttpRequest;if(n.open("GET",r,!1),i!==o&&n.setRequestHeader("Range","bytes="+e+"-"+t),n.responseType="arraybuffer",n.overrideMimeType&&n.overrideMimeType("text/plain; charset=x-user-defined"),n.send(null),!(n.status>=200&&n.status<300||304===n.status))throw new Error("Couldn't load "+r+". Status: "+n.status);return void 0!==n.response?new Uint8Array(n.response||[]):_e(n.responseText||"",!0)})(t,n)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&i||(o=i=1,i=this.getter(0).length,o=i,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=i,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!h)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var l=Te.createFile(e,t,a,i,n);a.contents?l.contents=a.contents:a.url&&(l.contents=null,l.url=a.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var d={};function u(e,t,r,i,n){var s=e.node.contents;if(n>=s.length)return 0;var o=Math.min(s.length-n,i);if(s.slice)for(var a=0;a{var t=l.stream_ops[e];d[e]=function(){return Te.forceLoadFile(l),t.apply(null,arguments)}})),d.read=(e,t,r,i,n)=>(Te.forceLoadFile(l),u(e,t,r,i,n)),d.mmap=(e,t,r,i,n)=>{Te.forceLoadFile(l);var s=be();if(!s)throw new Te.ErrnoError(48);return u(e,E,s,t,r),{ptr:s,allocated:!0}},l.stream_ops=d,l}},Be=(e,t)=>e?fe(S,e,t):"",Fe={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(le.isAbs(t))return t;var i;-100===e?i=Te.cwd():i=Fe.getStreamFromFD(e).path;if(0==t.length){if(!r)throw new Te.ErrnoError(44);return i}return le.join2(i,t)},doStat(e,t,r){try{var i=e(t)}catch(e){if(e&&e.node&&le.normalize(t)!==le.normalize(Te.getPath(e.node)))return-54;throw e}A[r>>2]=i.dev,A[r+4>>2]=i.mode,k[r+8>>2]=i.nlink,A[r+12>>2]=i.uid,A[r+16>>2]=i.gid,A[r+20>>2]=i.rdev,K=[i.size>>>0,(q=i.size,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+24>>2]=K[0],A[r+28>>2]=K[1],A[r+32>>2]=4096,A[r+36>>2]=i.blocks;var n=i.atime.getTime(),s=i.mtime.getTime(),o=i.ctime.getTime();return K=[Math.floor(n/1e3)>>>0,(q=Math.floor(n/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+40>>2]=K[0],A[r+44>>2]=K[1],k[r+48>>2]=n%1e3*1e3,K=[Math.floor(s/1e3)>>>0,(q=Math.floor(s/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+56>>2]=K[0],A[r+60>>2]=K[1],k[r+64>>2]=s%1e3*1e3,K=[Math.floor(o/1e3)>>>0,(q=Math.floor(o/1e3),+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+72>>2]=K[0],A[r+76>>2]=K[1],k[r+80>>2]=o%1e3*1e3,K=[i.ino>>>0,(q=i.ino,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[r+88>>2]=K[0],A[r+92>>2]=K[1],0},doMsync(e,t,r,i,n){if(!Te.isFile(t.node.mode))throw new Te.ErrnoError(43);if(2&i)return 0;var s=S.slice(e,e+r);Te.msync(t,s,n,r,i)},varargs:void 0,get(){var e=A[+Fe.varargs>>2];return Fe.varargs+=4,e},getp:()=>Fe.get(),getStr:e=>Be(e),getStreamFromFD:e=>Te.getStreamChecked(e)};function Pe(e,t,r){Fe.varargs=r;try{var i=Fe.getStreamFromFD(e);switch(t){case 0:if((n=Fe.get())<0)return-28;for(;Te.streams[n];)n++;return Te.createStream(i,n).fd;case 1:case 2:case 6:case 7:return 0;case 3:return i.flags;case 4:var n=Fe.get();return i.flags|=n,0;case 5:n=Fe.getp();return U[n+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ae(28),-1}}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}}function De(e,t,r,i){Fe.varargs=i;try{t=Fe.getStr(t),t=Fe.calculateAt(e,t);var n=i?Fe.get():0;return Te.open(t,r,n).fd}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return-e.errno}}var Ie,Le,Re,ze=(e,t,r,i,n)=>{},Me=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ie=e},Ne=e=>{for(var t="",r=e;S[r];)t+=Ie[S[r++]];return t},Oe={},$e={},Ge={},He=e=>{throw new Le(e)},Ve=e=>{throw new Re(e)},je=(e,t,r)=>{function i(t){var i=r(t);i.length!==e.length&&Ve("Mismatched type converter count");for(var n=0;n{$e.hasOwnProperty(e)?n[t]=$e[e]:(s.push(e),Oe.hasOwnProperty(e)||(Oe[e]=[]),Oe[e].push((()=>{n[t]=$e[e],++o===s.length&&i(n)})))})),0===s.length&&i(n)};function We(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var i=t.name;if(e||He(`type "${i}" must have a positive integer typeid pointer`),$e.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;He(`Cannot register type '${i}' twice`)}if($e[e]=t,delete Ge[e],Oe.hasOwnProperty(e)){var n=Oe[e];delete Oe[e],n.forEach((e=>e()))}}function Ye(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return We(e,t,r)}var qe,Ke=8,Xe=(e,t,r,i)=>{Ye(e,{name:t=Ne(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:i},argPackAdvance:Ke,readValueFromPointer:function(e){return this.fromWireType(S[e])},destructorFunction:null})},Ze=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Je=e=>{He(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},it=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var i=it(e,t,r.baseClass);return null===i?null:r.downcast(i)},nt={},st=()=>Object.keys(ht).length,ot=()=>{var e=[];for(var t in ht)ht.hasOwnProperty(t)&&e.push(ht[t]);return e},at=[],lt=()=>{for(;at.length;){var e=at.pop();e.$$.deleteScheduled=!1,e.delete()}},dt=e=>{qe=e,at.length&&qe&&qe(lt)},ut=()=>{n.getInheritedInstanceCount=st,n.getLiveInheritedInstances=ot,n.flushPendingDeletes=lt,n.setDelayFunction=dt},ht={},ct=(e,t)=>{for(void 0===t&&He("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=ct(e,t),ht[t]),pt=(e,t)=>(t.ptrType&&t.ptr||Ve("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&Ve("Both smartPtrType and smartPtr must be specified"),t.count={value:1},gt(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var i=r.clone();return this.destructor(e),i}function n(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=nt[o];if(!a)return n.call(this);s=this.isConst?a.constPointerType:a.pointerType;var l=it(t,this.registeredClass,s.registeredClass);return null===l?n.call(this):this.isSmartPointer?pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var gt=e=>"undefined"==typeof FinalizationRegistry?(gt=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),gt=e=>{var t=e.$$;if(!!t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),gt(e)),_t=()=>{Object.assign(yt.prototype,{isAliasOf(e){if(!(this instanceof yt))return!1;if(!(e instanceof yt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var i=e.$$.ptrType.registeredClass,n=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;i.baseClass;)n=i.upcast(n),i=i.baseClass;return t===i&&r===n},clone(){if(this.$$.ptr||Je(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=gt(Object.create(Object.getPrototypeOf(this),{$$:{value:Ze(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Je(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&He("Object already scheduled for deletion"),at.push(this),1===at.length&&qe&&qe(lt),this.$$.deleteScheduled=!0,this}})};function yt(){}var vt=48,bt=57,wt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=vt&&t<=bt?`_${e}`:e};function Et(e,t){return{[e=wt(e)]:function(){return t.apply(this,arguments)}}[e]}var St=(e,t,r)=>{if(void 0===e[t].overloadTable){var i=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||He(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[i.argCount]=i}},Ut=(e,t,r)=>{n.hasOwnProperty(e)?((void 0===r||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[r])&&He(`Cannot register public name '${e}' twice`),St(n,e,e),n.hasOwnProperty(r)&&He(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),n[e].overloadTable[r]=t):(n[e]=t,void 0!==r&&(n[e].numArguments=r))};function xt(e,t,r,i,n,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=i,this.baseClass=n,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}var At=(e,t,r)=>{for(;t!==r;)t.upcast||He(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function kt(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${ar(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Ct(e,t){var r;if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||He(`Cannot pass "${ar(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var i=t.$$.ptrType.registeredClass;if(r=At(t.$$.ptr,i,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&He("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:He(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var n=t.clone();r=this.rawShare(r,nr.toHandle((()=>n.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:He("Unsupporting sharing policy")}return r}function Tt(e,t){if(null===t)return this.isReference&&He(`null is not a valid ${this.name}`),0;t.$$||He(`Cannot pass "${ar(t)}" as a ${this.name}`),t.$$.ptr||He(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&He(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Bt(e){return this.fromWireType(k[e>>2])}var Ft=()=>{Object.assign(Pt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Ke,readValueFromPointer:Bt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Pt(e,t,r,i,n,s,o,a,l,d,u){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=i,this.isSmartPointer=n,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=u,n||void 0!==t.baseClass?this.toWireType=Ct:i?(this.toWireType=kt,this.destructorFunction=null):(this.toWireType=Tt,this.destructorFunction=null)}var Dt,It,Lt=(e,t,r)=>{n.hasOwnProperty(e)||Ve("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==r?n[e].overloadTable[r]=t:(n[e]=t,n[e].argCount=r)},Rt=(e,t,r)=>{var i=n["dynCall_"+e];return r&&r.length?i.apply(null,[t].concat(r)):i.call(null,t)},zt=[],Mt=e=>{var t=zt[e];return t||(e>=zt.length&&(zt.length=e+1),zt[e]=t=Dt.get(e)),t},Nt=(e,t,r)=>e.includes("j")?Rt(e,t,r):Mt(t).apply(null,r),Ot=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Nt(e,t,r)}},$t=(e,t)=>{var r=(e=Ne(e)).includes("j")?Ot(e,t):Mt(t);return"function"!=typeof r&&He(`unknown function pointer with signature ${e}: ${t}`),r},Gt=(e,t)=>{var r=Et(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Ht=e=>{var t=si(e),r=Ne(t);return ii(t),r},Vt=(e,t)=>{var r=[],i={};throw t.forEach((function e(t){i[t]||$e[t]||(Ge[t]?Ge[t].forEach(e):(r.push(t),i[t]=!0))})),new It(`${e}: `+r.map(Ht).join([", "]))},jt=(e,t,r,i,n,s,o,a,l,d,u,h,c)=>{u=Ne(u),s=$t(n,s),a&&(a=$t(o,a)),d&&(d=$t(l,d)),c=$t(h,c);var f=wt(u);Ut(f,(function(){Vt(`Cannot construct ${u} due to unbound types`,[i])})),je([e,t,r],i?[i]:[],(function(t){var r,n;t=t[0],n=i?(r=t.registeredClass).instancePrototype:yt.prototype;var o=Et(f,(function(){if(Object.getPrototypeOf(this)!==l)throw new Le("Use 'new' to construct "+u);if(void 0===h.constructor_body)throw new Le(u+" has no accessible constructor");var e=h.constructor_body[arguments.length];if(void 0===e)throw new Le(`Tried to invoke ctor of ${u} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(h.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),l=Object.create(n,{constructor:{value:o}});o.prototype=l;var h=new xt(u,o,l,c,r,s,a,d);h.baseClass&&(void 0===h.baseClass.__derivedClasses&&(h.baseClass.__derivedClasses=[]),h.baseClass.__derivedClasses.push(h));var p=new Pt(u,h,!0,!1,!1),m=new Pt(u+"*",h,!1,!1,!1),g=new Pt(u+" const*",h,!1,!0,!1);return nt[e]={pointerType:m,constPointerType:g},Lt(f,o),[p,m,g]}))},Wt=(e,t)=>{for(var r=[],i=0;i>2]);return r},Yt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function qt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=Et(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var i=new r,n=e.apply(i,t);return n instanceof Object?n:i}function Kt(e,t,r,i,n,s){var o=t.length;o<2&&He("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,l=!1,d=1;d0?", ":"")+c),f+=(u||s?"var rv = ":"")+"invoker(fn"+(c.length>0?", ":"")+c+");\n",l)f+="runDestructors(destructors);\n";else for(d=a?1:2;d{var o=Wt(t,r);n=$t(i,n),je([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Le(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Vt(`Cannot construct ${e.name} due to unbound types`,o)},je([],o,(i=>(i.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Kt(r,i,null,n,s),[]))),[]}))},Zt=(e,t,r,i,n,s,o,a,l)=>{var d=Wt(r,i);t=Ne(t),s=$t(n,s),je([],[e],(function(e){var i=`${(e=e[0]).name}.${t}`;function n(){Vt(`Cannot call ${i} due to unbound types`,d)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,h=u[t];return void 0===h||void 0===h.overloadTable&&h.className!==e.name&&h.argCount===r-2?(n.argCount=r-2,n.className=e.name,u[t]=n):(St(u,t,i),u[t].overloadTable[r-2]=n),je([],d,(function(n){var a=Kt(i,n,e,s,o,l);return void 0===u[t].overloadTable?(a.argCount=r-2,u[t]=a):u[t].overloadTable[r-2]=a,[]})),[]}))};function Jt(){Object.assign(Qt.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Qt(){this.allocated=[void 0],this.freelist=[]}var er=new Qt,tr=e=>{e>=er.reserved&&0==--er.get(e).refcount&&er.free(e)},rr=()=>{for(var e=0,t=er.reserved;t{er.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),er.reserved=er.allocated.length,n.count_emval_handles=rr},nr={toValue:e=>(e||He("Cannot use deleted val. handle = "+e),er.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return er.allocate({refcount:1,value:e})}}};function sr(e){return this.fromWireType(A[e>>2])}var or=(e,t)=>{Ye(e,{name:t=Ne(t),fromWireType:e=>{var t=nr.toValue(e);return tr(e),t},toWireType:(e,t)=>nr.toHandle(t),argPackAdvance:Ke,readValueFromPointer:sr,destructorFunction:null})},ar=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},lr=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(C[e>>2])};case 8:return function(e){return this.fromWireType(T[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},dr=(e,t,r)=>{Ye(e,{name:t=Ne(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Ke,readValueFromPointer:lr(t,r),destructorFunction:null})},ur=(e,t,r)=>{switch(t){case 1:return r?e=>E[e>>0]:e=>S[e>>0];case 2:return r?e=>U[e>>1]:e=>x[e>>1];case 4:return r?e=>A[e>>2]:e=>k[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},hr=(e,t,r,i,n)=>{t=Ne(t);var s=e=>e;if(0===i){var o=32-8*r;s=e=>e<>>o}var a=t.includes("unsigned");Ye(e,{name:t,fromWireType:s,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Ke,readValueFromPointer:ur(t,r,0!==i),destructorFunction:null})},cr=(e,t,r)=>{var i=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function n(e){var t=k[e>>2],r=k[e+4>>2];return new i(E.buffer,r,t)}Ye(e,{name:r=Ne(r),fromWireType:n,argPackAdvance:Ke,readValueFromPointer:n},{ignoreDuplicateRegistrations:!0})},fr=(e,t,r)=>ge(e,S,t,r),pr=(e,t)=>{var r="std::string"===(t=Ne(t));Ye(e,{name:t,fromWireType(e){var t,i=k[e>>2],n=e+4;if(r)for(var s=n,o=0;o<=i;++o){var a=n+o;if(o==i||0==S[a]){var l=Be(s,a-s);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),s=a+1}}else{var d=new Array(i);for(o=0;o>2]=i,r&&n)fr(t,o,i+1);else if(n)for(var a=0;a255&&(ii(o),He("String has UTF-16 code units that do not fit in 8 bits")),S[o+a]=l}else for(a=0;a{for(var r=e,i=r>>1,n=i+t/2;!(i>=n)&&x[i];)++i;if((r=i<<1)-e>32&&mr)return mr.decode(S.subarray(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=U[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s},_r=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var i=t,n=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return U[t>>1]=0,t-i},yr=e=>2*e.length,vr=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var n=A[e+4*r>>2];if(0==n)break;if(++r,n>=65536){var s=n-65536;i+=String.fromCharCode(55296|s>>10,56320|1023&s)}else i+=String.fromCharCode(n)}return i},br=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var i=t,n=i+r-4,s=0;s=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s);if(A[t>>2]=o,(t+=4)+4>n)break}return A[t>>2]=0,t-i},wr=e=>{for(var t=0,r=0;r=55296&&i<=57343&&++r,t+=4}return t},Er=(e,t,r)=>{var i,n,s,o,a;r=Ne(r),2===t?(i=gr,n=_r,o=yr,s=()=>x,a=1):4===t&&(i=vr,n=br,o=wr,s=()=>k,a=2),Ye(e,{name:r,fromWireType:e=>{for(var r,n=k[e>>2],o=s(),l=e+4,d=0;d<=n;++d){var u=e+4+d*t;if(d==n||0==o[u>>a]){var h=i(l,u-l);void 0===r?r=h:(r+=String.fromCharCode(0),r+=h),l=u+t}}return ii(e),r},toWireType:(e,i)=>{"string"!=typeof i&&He(`Cannot pass non-string to C++ string type ${r}`);var s=o(i),l=ai(4+s+t);return k[l>>2]=s>>a,n(i,l+4,s+t),null!==e&&e.push(ii,l),l},argPackAdvance:Ke,readValueFromPointer:sr,destructorFunction(e){ii(e)}})},Sr=(e,t)=>{Ye(e,{isVoid:!0,name:t=Ne(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Ur={},xr=e=>{var t=Ur[e];return void 0===t?Ne(e):t},Ar=[],kr=(e,t,r,i)=>{(e=Ar[e])(t=nr.toValue(t),r=xr(r),null,i)},Cr=e=>{var t=Ar.length;return Ar.push(e),t},Tr=(e,t)=>{var r=$e[e];return void 0===r&&He(t+" has unknown type "+Ht(e)),r},Br=(e,t)=>{for(var r=new Array(e),i=0;i>2],"parameter "+i);return r},Fr={},Pr=(e,t)=>{var r=Br(e,t),i=r[0],n=i.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",s=Fr[n];if(void 0!==s)return s;for(var o=["retType"],a=[i],l="",d=0;dt+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Ir=()=>{W("")},Lr=()=>Date.now(),Rr=(e,t,r)=>S.copyWithin(e,t,t+r),zr=e=>{W("OOM")},Mr=e=>{S.length,zr()},Nr={},Or=()=>d||"./this.program",$r=()=>{if(!$r.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Or()};for(var t in Nr)void 0===Nr[t]?delete e[t]:e[t]=Nr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);$r.strings=r}return $r.strings},Gr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);E[t>>0]=0},Hr=(e,t)=>{var r=0;return $r().forEach(((i,n)=>{var s=t+r;k[e+4*n>>2]=s,Gr(i,s),r+=i.length+1})),0},Vr=(e,t)=>{var r=$r();k[e>>2]=r.length;var i=0;return r.forEach((e=>i+=e.length+1)),k[t>>2]=i,0};function jr(e){try{var t=Fe.getStreamFromFD(e);return Te.close(t),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}function Wr(e,t){try{var r=Fe.getStreamFromFD(e),i=r.tty?2:Te.isDir(r.mode)?3:Te.isLink(r.mode)?7:4;return E[t>>0]=i,U[t+2>>1]=0,K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[t+8>>2]=K[0],A[t+12>>2]=K[1],K=[0,(q=0,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[t+16>>2]=K[0],A[t+20>>2]=K[1],0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var Yr=(e,t,r,i)=>{for(var n=0,s=0;s>2],a=k[t+4>>2];t+=8;var l=Te.read(e,E,o,a,i);if(l<0)return-1;if(n+=l,l>2]=s,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}function Kr(e,t,r,i,n){var s=Dr(t,r);try{if(isNaN(s))return 61;var o=Fe.getStreamFromFD(e);return Te.llseek(o,s,i),K=[o.position>>>0,(q=o.position,+Math.abs(q)>=1?q>0?+Math.floor(q/4294967296)>>>0:~~+Math.ceil((q-+(~~q>>>0))/4294967296)>>>0:0)],A[n>>2]=K[0],A[n+4>>2]=K[1],o.getdents&&0===s&&0===i&&(o.getdents=null),0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var Xr=(e,t,r,i)=>{for(var n=0,s=0;s>2],a=k[t+4>>2];t+=8;var l=Te.write(e,E,o,a,i);if(l<0)return-1;n+=l,void 0!==i&&(i+=l)}return n};function Zr(e,t,r,i){try{var n=Fe.getStreamFromFD(e),s=Xr(n,t,r);return k[i>>2]=s,0}catch(e){if(void 0===Te||"ErrnoError"!==e.name)throw e;return e.errno}}var Jr=function(e,t,r,i){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Te.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=i},Qr=365,ei=146;Object.defineProperties(Jr.prototype,{read:{get:function(){return(this.mode&Qr)===Qr},set:function(e){e?this.mode|=Qr:this.mode&=~Qr}},write:{get:function(){return(this.mode&ei)===ei},set:function(e){e?this.mode|=ei:this.mode&=~ei}},isFolder:{get:function(){return Te.isDir(this.mode)}},isDevice:{get:function(){return Te.isChrdev(this.mode)}}}),Te.FSNode=Jr,Te.createPreloadedFile=Ae,Te.staticInit(),Me(),Le=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Re=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},_t(),ut(),Ft(),It=n.UnboundTypeError=Gt(Error,"UnboundTypeError"),Jt(),ir();var ti={p:oe,B:Pe,v:De,t:ze,n:Xe,r:jt,q:Xt,f:Zt,C:or,m:dr,c:hr,b:cr,l:pr,h:Er,o:Sr,d:kr,i:tr,e:Pr,a:Ir,g:Lr,z:Rr,u:Mr,x:Hr,y:Vr,k:jr,w:Wr,A:qr,s:Kr,j:Zr},ri=ie(),ii=e=>(ii=ri.F)(e),ni=()=>(ni=ri.H)(),si=e=>(si=ri.I)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=ri.J)();var oi,ai=e=>(ai=ri.K)(e),li=e=>(li=ri.M)(e);function di(){function e(){oi||(oi=!0,n.calledRun=!0,B||(z(),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),M()))}G>0||(R(),G>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_viiijj=(e,t,r,i,s,o,a,l)=>(n.dynCall_viiijj=ri.N)(e,t,r,i,s,o,a,l),n.dynCall_jij=(e,t,r,i)=>(n.dynCall_jij=ri.O)(e,t,r,i),n.dynCall_jii=(e,t,r)=>(n.dynCall_jii=ri.P)(e,t,r),n.dynCall_jiji=(e,t,r,i,s)=>(n.dynCall_jiji=ri.Q)(e,t,r,i,s),H=function e(){oi||di(),oi||(H=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return di(),t.ready}})(),n=1e-6,s="undefined"!=typeof Float32Array?Float32Array:Array;function o(){var e=new s(16);return s!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function a(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var l,d=function(e,t,r,i,n,s,o){var a=1/(t-r),l=1/(i-n),d=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*d,e[11]=0,e[12]=(t+r)*a,e[13]=(n+i)*l,e[14]=(o+s)*d,e[15]=1,e};function u(e,t,r){var i=new s(3);return i[0]=e,i[1]=t,i[2]=r,i}l=new s(3),s!=Float32Array&&(l[0]=0,l[1]=0,l[2]=0);var h=(e,t)=>{t&&e.pixelStorei(e.UNPACK_ALIGNMENT,1);const r=function(){const t=m(e.VERTEX_SHADER,"\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n "),r=m(e.FRAGMENT_SHADER,"\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),i=e.createProgram();if(e.attachShader(i,t),e.attachShader(i,r),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))return console.log("Unable to initialize the shader program: "+e.getProgramInfoLog(i)),null;return i}();let i={program:r,attribLocations:{vertexPosition:e.getAttribLocation(r,"aVertexPosition"),texturePosition:e.getAttribLocation(r,"aTexturePosition")},uniformLocations:{projectionMatrix:e.getUniformLocation(r,"uProjectionMatrix"),modelMatrix:e.getUniformLocation(r,"uModelMatrix"),viewMatrix:e.getUniformLocation(r,"uViewMatrix"),rgbatexture:e.getUniformLocation(r,"rgbaTexture"),ytexture:e.getUniformLocation(r,"yTexture"),utexture:e.getUniformLocation(r,"uTexture"),vtexture:e.getUniformLocation(r,"vTexture"),isyuv:e.getUniformLocation(r,"isyuv")}},s=function(){const t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e.STATIC_DRAW);var r=[];r=r.concat([0,1],[1,1],[1,0],[0,0]);const i=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,i),e.bufferData(e.ARRAY_BUFFER,new Float32Array(r),e.STATIC_DRAW);const n=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{position:t,texPosition:i,indices:n}}(),l=p(),h=p(),c=p(),f=p();function p(){let t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function m(t,r){const i=e.createShader(t);return e.shaderSource(i,r),e.compileShader(i),e.getShaderParameter(i,e.COMPILE_STATUS)?i:(console.log("An error occurred compiling the shaders: "+e.getShaderInfoLog(i)),e.deleteShader(i),null)}function g(t,r){e.viewport(0,0,t,r),e.clearColor(0,0,0,0),e.clearDepth(1),e.enable(e.DEPTH_TEST),e.depthFunc(e.LEQUAL),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT);const l=o();d(l,-1,1,-1,1,.1,100);const p=o();a(p);const m=o();!function(e,t,r,i){var s,o,l,d,u,h,c,f,p,m,g=t[0],_=t[1],y=t[2],v=i[0],b=i[1],w=i[2],E=r[0],S=r[1],U=r[2];Math.abs(g-E)>1,(1&r)<<7|i<<3])}function lt(e){return dt(e)&&e[1]===Ke}function dt(e){return e[0]>>4===Te}ot((function(e){!function(){var t="undefined"!=typeof window&&void 0!==window.document?window.document:{},r=e.exports,i=function(){for(var e,r=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=0,n=r.length,s={};i{if(n=i,"[object Number]"!==Object.prototype.toString.call(n))return;var n;t+=i;const s=ft(),o=s-r;o>=1e3&&(e(t/o*1e3),r=s,t=0)}}(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();function mt(e){let t=e.subarray(1,4),r="avc1.";for(let e=0;e<3;e++){let i=t[e].toString(16);i.length<2&&(i="0"+i),r+=i}return{codec:r,description:e}}function gt(e){return null==e}function _t(e){return!gt(e)}function yt(e){return"function"==typeof e}function vt(e){let t=null,r=31&e[0];return r!==De&&r!==Ie||(t=ke),t||(r=(126&e[0])>>1,r!==Ne&&r!==Oe&&r!==$e||(t=Ce)),t}function bt(){return"undefined"!=typeof WritableStream}function wt(e){e.close()}function Et(e,t){t&&(e=e.filter((e=>e.type&&e.type===t)));let r=e[0],i=null,n=1;if(e.length>0){let t=e[1];t&&t.ts-r.ts>1e5&&(r=t,n=2)}if(r)for(let s=n;s=1e3){e[s-1].ts-r.ts<1e3&&(i=s+1)}}}return i}function St(e){return e.ok&&e.status>=200&&e.status<=299}function Ut(){return function(e){let t="";if("object"==typeof e)try{t=JSON.stringify(e),t=JSON.parse(t)}catch(r){t=e}else t=e;return t}(S)}function xt(e){return e[0]>>4===Xe&&e[1]===Ke}function At(e){return!0===e||"true"===e}function kt(e){return!0!==e&&"true"!==e}var Ct=function(e,t,r,i){return new(r||(r=Promise))((function(n,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))};const Tt=Symbol(32),Bt=Symbol(16),Ft=Symbol(8);class Pt{constructor(e){this.g=e,this.consumed=0,e&&(this.need=e.next().value)}setG(e){this.g=e,this.demand(e.next().value,!0)}consume(){this.buffer&&this.consumed&&(this.buffer.copyWithin(0,this.consumed),this.buffer=this.buffer.subarray(0,this.buffer.length-this.consumed),this.consumed=0)}demand(e,t){return t&&this.consume(),this.need=e,this.flush()}read(e){return Ct(this,void 0,void 0,(function*(){return this.lastReadPromise&&(yield this.lastReadPromise),this.lastReadPromise=new Promise(((t,r)=>{var i;this.reject=r,this.resolve=e=>{delete this.lastReadPromise,delete this.resolve,delete this.need,t(e)};this.demand(e,!0)||null===(i=this.pull)||void 0===i||i.call(this,e)}))}))}readU32(){return this.read(Tt)}readU16(){return this.read(Bt)}readU8(){return this.read(Ft)}close(){var e;this.g&&this.g.return(),this.buffer&&this.buffer.subarray(0,0),null===(e=this.reject)||void 0===e||e.call(this,new Error("EOF")),delete this.lastReadPromise}flush(){if(!this.buffer||!this.need)return;let e=null;const t=this.buffer.subarray(this.consumed);let r=0;const i=e=>t.length<(r=e);if("number"==typeof this.need){if(i(this.need))return;e=t.subarray(0,r)}else if(this.need===Tt){if(i(4))return;e=t[0]<<24|t[1]<<16|t[2]<<8|t[3]}else if(this.need===Bt){if(i(2))return;e=t[0]<<8|t[1]}else if(this.need===Ft){if(i(1))return;e=t[0]}else if("buffer"in this.need){if("byteOffset"in this.need){if(i(this.need.byteLength-this.need.byteOffset))return;new Uint8Array(this.need.buffer,this.need.byteOffset).set(t.subarray(0,r)),e=this.need}else if(this.g)return void this.g.throw(new Error("Unsupported type"))}else{if(i(this.need.byteLength))return;new Uint8Array(this.need).set(t.subarray(0,r)),e=this.need}return this.consumed+=r,this.g?this.demand(this.g.next(e).value,!0):this.resolve&&this.resolve(e),e}write(e){if(e instanceof Uint8Array?this.malloc(e.length).set(e):"buffer"in e?this.malloc(e.byteLength).set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):this.malloc(e.byteLength).set(new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this.pull=e));this.flush()}writeU32(e){this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){this.malloc(2).set([e>>8&255,255&e]),this.flush()}writeU8(e){this.malloc(1)[0]=e,this.flush()}malloc(e){if(this.buffer){const t=this.buffer.length,r=t+e;if(r<=this.buffer.buffer.byteLength-this.buffer.byteOffset)this.buffer=new Uint8Array(this.buffer.buffer,this.buffer.byteOffset,r);else{const e=new Uint8Array(r);e.set(this.buffer),this.buffer=e}return this.buffer.subarray(t,r)}return this.buffer=new Uint8Array(e),this.buffer}}Pt.U32=Tt,Pt.U16=Bt,Pt.U8=Ft;class Dt{constructor(e){this.log=function(t){if(e._opt.debug&&e._opt.debugLevel==v){const s=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n1?r-1:0),n=1;n1?i-1:0),s=1;s32&&console.error("ExpGolomb: readBits() bits exceeded max 32bits!"),e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let r=e-this._current_word_bits_left;this._fillCurrentWord();let i=Math.min(r,this._current_word_bits_left),n=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,t=t<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}class Lt{static _ebsp2rbsp(e){let t=e,r=t.byteLength,i=new Uint8Array(r),n=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(i[n]=t[e],n++);return new Uint8Array(i.buffer,0,n)}static parseSPS(e){let t=Lt._ebsp2rbsp(e),r=new It(t);r.readByte();let i=r.readByte();r.readByte();let n=r.readByte();r.readUEG();let s=Lt.getProfileString(i),o=Lt.getLevelString(n),a=1,l=420,d=[0,420,422,444],u=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(a=r.readUEG(),3===a&&r.readBits(1),a<=3&&(l=d[a]),u=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool())){let e=3!==a?8:12;for(let t=0;t0&&e<16?(b=t[e-1],w=i[e-1]):255===e&&(b=r.readByte()<<8|r.readByte(),w=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){let e=r.readBits(32),t=r.readBits(32);S=r.readBool(),U=t,x=2*e,E=U/x}}let A=1;1===b&&1===w||(A=b/w);let k=0,C=0;if(0===a)k=1,C=2-m;else{k=3===a?1:2,C=(1===a?2:1)*(2-m)}let T=16*(f+1),B=16*(p+1)*(2-m);T-=(g+_)*k,B-=(y+v)*C;let F=Math.ceil(T*A);return r.destroy(),r=null,{profile_string:s,level_string:o,bit_depth:u,ref_frames:c,chroma_format:l,chroma_format_string:Lt.getChromaFormatString(l),frame_rate:{fixed:S,fps:E,fps_den:x,fps_num:U},sar_ratio:{width:b,height:w},codec_size:{width:T,height:B},present_size:{width:F,height:B}}}static parseSPS$2(e){let t=e.subarray(1,4),r="avc1.";for(let e=0;e<3;e++){let i=t[e].toString(16);i.length<2&&(i="0"+i),r+=i}let i=Lt._ebsp2rbsp(e),n=new It(i);n.readByte();let s=n.readByte();n.readByte();let o=n.readByte();n.readUEG();let a=Lt.getProfileString(s),l=Lt.getLevelString(o),d=1,u=420,h=[0,420,422,444],c=8,f=8;if((100===s||110===s||122===s||244===s||44===s||83===s||86===s||118===s||128===s||138===s||144===s)&&(d=n.readUEG(),3===d&&n.readBits(1),d<=3&&(u=h[d]),c=n.readUEG()+8,f=n.readUEG()+8,n.readBits(1),n.readBool())){let e=3!==d?8:12;for(let t=0;t0&&e<16?(S=t[e-1],U=r[e-1]):255===e&&(S=n.readByte()<<8|n.readByte(),U=n.readByte()<<8|n.readByte())}if(n.readBool()&&n.readBool(),n.readBool()&&(n.readBits(4),n.readBool()&&n.readBits(24)),n.readBool()&&(n.readUEG(),n.readUEG()),n.readBool()){let e=n.readBits(32),t=n.readBits(32);A=n.readBool(),k=t,C=2*e,x=k/C}}let T=1;1===S&&1===U||(T=S/U);let B=0,F=0;if(0===d)B=1,F=2-y;else{B=3===d?1:2,F=(1===d?2:1)*(2-y)}let P=16*(g+1),D=16*(_+1)*(2-y);P-=(v+b)*B,D-=(w+E)*F;let I=Math.ceil(P*T);return n.destroy(),n=null,{codec_mimetype:r,profile_idc:s,level_idc:o,profile_string:a,level_string:l,chroma_format_idc:d,bit_depth:c,bit_depth_luma:c,bit_depth_chroma:f,ref_frames:m,chroma_format:u,chroma_format_string:Lt.getChromaFormatString(u),frame_rate:{fixed:A,fps:x,fps_den:C,fps_num:k},sar_ratio:{width:S,height:U},codec_size:{width:P,height:D},present_size:{width:I,height:D}}}static _skipScalingList(e,t){let r=8,i=8,n=0;for(let s=0;s=this.buflen)return this.iserro=!0,0;this.iserro=!1,r=this.bufoff+e>8?8-this.bufoff:e,t<<=r,t+=this.buffer[this.bufpos]>>8-this.bufoff-r&255>>8-r,this.bufoff+=r,e-=r,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,r=this.bufoff,i=this.read(e);return this.bufpos=t,this.bufoff=r,i}read_golomb(){let e;for(e=0;0===this.read(1)&&!this.iserro;e++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(r,0),i.set(t.sps,4),t.sps=i}if(t.pps){const e=t.pps.byteLength,r=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i.set(r,0),i.set(t.pps,4),t.pps=i}return t}function Mt(e){let{sps:t,pps:r}=e;const i=[23,0,0,0,0,1,66,0,30,255];i[0]=23,i[6]=t[1],i[7]=t[2],i[8]=t[3],i[10]=225,i[11]=t.byteLength>>8&255,i[12]=255&t.byteLength,i.push(...t,1,r.byteLength>>8&255,255&r.byteLength,...r);return new Uint8Array(i)}function Nt(e,t){let r=[];r[0]=t?23:39,r[1]=1,r[2]=0,r[3]=0,r[4]=0,r[5]=e.byteLength>>24&255,r[6]=e.byteLength>>16&255,r[7]=e.byteLength>>8&255,r[8]=255&e.byteLength;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function Ot(e,t){let r=[];r[0]=t?23:39,r[1]=1,r[2]=0,r[3]=0,r[4]=0;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function $t(e){return 31&e[0]}function Gt(e){return e===Re}function Ht(e){return!function(e){return e===De||e===Ie}(e)&&!Gt(e)}function Vt(e){return e===Le}function jt(e){if(0===e.length)return!1;const t=$t(e[0]);for(let r=1;r{let t=e,r=t.byteLength,i=new Uint8Array(r),n=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(i[n]=t[e],n++);return new Uint8Array(i.buffer,0,n)},Yt=e=>{switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}};function qt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function Kt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e.length<4)return;const r=e.length,i=[];let n,s=0;for(;s+t>>=8),s+=t,n){if(s+n>r)break;i.push(e.subarray(s,s+n)),s+=n}return i}function Xt(e){const t=e.byteLength,r=new Uint8Array(4);r[0]=t>>>24&255,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t;const i=new Uint8Array(t+4);return i.set(r,0),i.set(e,4),i}function Zt(e,t){let r=null;return t?e.length>=28&&(r=1+(3&e[26])):e.length>=12&&(r=1+(3&e[9])),r}function Jt(e){let t={width:0,height:0,profile:0,level:0};e=e.slice(5);do{let r={};if(e.length<23){console.warn("parseHEVCDecoderConfigurationRecord$2",`arrayBuffer.length ${e.length} < 23`);break}if(r.configurationVersion=e[0],1!=r.configurationVersion)break;r.general_profile_space=e[1]>>6&3,r.general_tier_flag=e[1]>>5&1,r.general_profile_idc=31&e[1],r.general_profile_compatibility_flags=e[2]<<24|e[3]<<16|e[4]<<8|e[5],r.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],r.general_constraint_indicator_flags=r.general_constraint_indicator_flags<<16|e[10]<<8|e[11],r.general_level_idc=e[12],r.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],r.parallelismType=3&e[15],r.chromaFormat=3&e[16],r.bitDepthLumaMinus8=7&e[17],r.bitDepthChromaMinus8=7&e[18],r.avgFrameRate=e[19]<<8|e[20],r.constantFrameRate=e[21]>>6&3,r.numTemporalLayers=e[21]>>3&7,r.temporalIdNested=e[21]>>2&1,r.lengthSizeMinusOne=3&e[21];let i=e[22],n=e.slice(23);for(let e=0;e0)for(let t=r;t<8;t++)e.read(2);i.sub_layer_profile_space=[],i.sub_layer_tier_flag=[],i.sub_layer_profile_idc=[],i.sub_layer_profile_compatibility_flag=[],i.sub_layer_progressive_source_flag=[],i.sub_layer_interlaced_source_flag=[],i.sub_layer_non_packed_constraint_flag=[],i.sub_layer_frame_only_constraint_flag=[],i.sub_layer_level_idc=[];for(let t=0;t{let t=Wt(e),r=new It(t);return r.readByte(),r.readByte(),r.readBits(4),r.readBits(2),r.readBits(6),{num_temporal_layers:r.readBits(3)+1,temporal_id_nested:r.readBool()}})(t),o=(e=>{let t=Wt(e),r=new It(t);r.readByte(),r.readByte();let i=0,n=0,s=0,o=0;r.readBits(4);let a=r.readBits(3);r.readBool();let l=r.readBits(2),d=r.readBool(),u=r.readBits(5),h=r.readByte(),c=r.readByte(),f=r.readByte(),p=r.readByte(),m=r.readByte(),g=r.readByte(),_=r.readByte(),y=r.readByte(),v=r.readByte(),b=r.readByte(),w=r.readByte(),E=[],S=[];for(let e=0;e0)for(let e=a;e<8;e++)r.readBits(2);for(let e=0;e1&&r.readSEG();for(let e=0;e0&&e<16?(I=t[e-1],L=i[e-1]):255===e&&(I=r.readBits(16),L=r.readBits(16))}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(3),r.readBool(),r.readBool()&&(r.readByte(),r.readByte(),r.readByte())),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool(),r.readBool(),r.readBool(),P=r.readBool(),P&&(i+=r.readUEG(),n+=r.readUEG(),s+=r.readUEG(),o+=r.readUEG()),r.readBool()&&(z=r.readBits(32),M=r.readBits(32),r.readBool()&&(r.readUEG(),r.readBool()))){let e=!1,t=!1,i=!1;e=r.readBool(),t=r.readBool(),(e||t)&&(i=r.readBool(),i&&(r.readByte(),r.readBits(5),r.readBool(),r.readBits(5)),r.readBits(4),r.readBits(4),i&&r.readBits(4),r.readBits(5),r.readBits(5),r.readBits(5));for(let n=0;n<=a;n++){let n=r.readBool();R=n;let s=!1,o=1;n||(s=r.readBool());let a=!1;if(s?r.readSEG():a=r.readBool(),a||(cpbcnt=r.readUEG()+1),e)for(let e=0;e{let t=Wt(e),r=new It(t);r.readByte(),r.readByte(),r.readUEG(),r.readUEG(),r.readBool(),r.readBool(),r.readBits(3),r.readBool(),r.readBool(),r.readUEG(),r.readUEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool()&&r.readUEG(),r.readSEG(),r.readSEG(),r.readBool(),r.readBool(),r.readBool(),r.readBool();let i=r.readBool(),n=r.readBool(),s=1;return n&&i?s=0:n?s=3:i&&(s=2),{parallelismType:s}})(r);n=Object.assign(n,s,o,a);let l=23+(5+t.byteLength)+(5+i.byteLength)+(5+r.byteLength),d=new Uint8Array(l);d[0]=1,d[1]=(3&n.general_profile_space)<<6|(n.general_tier_flag?1:0)<<5|31&n.general_profile_idc,d[2]=n.general_profile_compatibility_flags_1||0,d[3]=n.general_profile_compatibility_flags_2||0,d[4]=n.general_profile_compatibility_flags_3||0,d[5]=n.general_profile_compatibility_flags_4||0,d[6]=n.general_constraint_indicator_flags_1||0,d[7]=n.general_constraint_indicator_flags_2||0,d[8]=n.general_constraint_indicator_flags_3||0,d[9]=n.general_constraint_indicator_flags_4||0,d[10]=n.general_constraint_indicator_flags_5||0,d[11]=n.general_constraint_indicator_flags_6||0,d[12]=60,d[13]=240|(3840&n.min_spatial_segmentation_idc)>>8,d[14]=255&n.min_spatial_segmentation_idc,d[15]=252|3&n.parallelismType,d[16]=252|3&n.chroma_format_idc,d[17]=248|7&n.bit_depth_luma_minus8,d[18]=248|7&n.bit_depth_chroma_minus8,d[19]=0,d[20]=0,d[21]=(3&n.constant_frame_rate)<<6|(7&n.num_temporal_layers)<<3|(n.temporal_id_nested?1:0)<<2|3,d[22]=3,d[23]=128|Ne,d[24]=0,d[25]=1,d[26]=(65280&t.byteLength)>>8,d[27]=(255&t.byteLength)>>0,d.set(t,28),d[23+(5+t.byteLength)+0]=128|Oe,d[23+(5+t.byteLength)+1]=0,d[23+(5+t.byteLength)+2]=1,d[23+(5+t.byteLength)+3]=(65280&i.byteLength)>>8,d[23+(5+t.byteLength)+4]=(255&i.byteLength)>>0,d.set(i,23+(5+t.byteLength)+5),d[23+(5+t.byteLength+5+i.byteLength)+0]=128|$e,d[23+(5+t.byteLength+5+i.byteLength)+1]=0,d[23+(5+t.byteLength+5+i.byteLength)+2]=1,d[23+(5+t.byteLength+5+i.byteLength)+3]=(65280&r.byteLength)>>8,d[23+(5+t.byteLength+5+i.byteLength)+4]=(255&r.byteLength)>>0,d.set(r,23+(5+t.byteLength+5+i.byteLength)+5);const u=[28,0,0,0,0],h=new Uint8Array(u.length+d.byteLength);return h.set(u,0),h.set(d,u.length),h}function tr(e,t){let r=[];r[0]=t?28:44,r[1]=1,r[2]=0,r[3]=0,r[4]=0,r[5]=e.byteLength>>24&255,r[6]=e.byteLength>>16&255,r[7]=e.byteLength>>8&255,r[8]=255&e.byteLength;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function rr(e,t){let r=[];r[0]=t?28:44,r[1]=1,r[2]=0,r[3]=0,r[4]=0;const i=new Uint8Array(r.length+e.byteLength);return i.set(r,0),i.set(e,r.length),i}function ir(e){return(126&e[0])>>1}function nr(e){return e===Ge}function sr(e){return!function(e){return e>=32&&e<=40}(e)}function or(e){return e>=16&&e<=21}function ar(e){if(0===e.length)return!1;const t=ir(e[0]);for(let r=1;r255)return!1;return!0}function ur(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!dr(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(lr(e.length)&&dr(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function hr(e){return new Uint8Array(e)}function cr(e,t,r,i,n){null==i&&null==n||(e=e.slice?e.slice(i,n):Array.prototype.slice.call(e,i,n)),t.set(e,r)}var fr,pr={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&i<224?(t.push(String.fromCharCode((31&i)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&i)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},mr=(fr="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+fr[15&i])}return t.join("")}}),gr={16:10,24:12,32:14},_r=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],yr=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],vr=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],br=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],wr=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],Er=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],Sr=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Ur=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],xr=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],Ar=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],kr=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Cr=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Tr=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],Br=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Fr=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Pr(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=s[t],this._Kd[e-r][t%4]=s[t];for(var o,a=0,l=n;l>16&255]<<24^yr[o>>8&255]<<16^yr[255&o]<<8^yr[o>>24&255]^_r[a]<<24,a+=1,8!=n)for(t=1;t>8&255]<<8^yr[o>>16&255]<<16^yr[o>>24&255]<<24;for(t=n/2+1;t>2,u=l%4,this._Ke[d][u]=s[t],this._Kd[e-d][u]=s[t++],l++}for(var d=1;d>24&255]^Tr[o>>16&255]^Br[o>>8&255]^Fr[255&o]},Dr.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],i=Pr(e),n=0;n<4;n++)i[n]^=this._Ke[0][n];for(var s=1;s>24&255]^wr[i[(n+1)%4]>>16&255]^Er[i[(n+2)%4]>>8&255]^Sr[255&i[(n+3)%4]]^this._Ke[s][n];i=r.slice()}var o,a=hr(16);for(n=0;n<4;n++)o=this._Ke[t][n],a[4*n]=255&(yr[i[n]>>24&255]^o>>24),a[4*n+1]=255&(yr[i[(n+1)%4]>>16&255]^o>>16),a[4*n+2]=255&(yr[i[(n+2)%4]>>8&255]^o>>8),a[4*n+3]=255&(yr[255&i[(n+3)%4]]^o);return a},Dr.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],i=Pr(e),n=0;n<4;n++)i[n]^=this._Kd[0][n];for(var s=1;s>24&255]^xr[i[(n+3)%4]>>16&255]^Ar[i[(n+2)%4]>>8&255]^kr[255&i[(n+1)%4]]^this._Kd[s][n];i=r.slice()}var o,a=hr(16);for(n=0;n<4;n++)o=this._Kd[t][n],a[4*n]=255&(vr[i[n]>>24&255]^o>>24),a[4*n+1]=255&(vr[i[(n+3)%4]>>16&255]^o>>16),a[4*n+2]=255&(vr[i[(n+2)%4]>>8&255]^o>>8),a[4*n+3]=255&(vr[255&i[(n+1)%4]]^o);return a};var Ir=function(e){if(!(this instanceof Ir))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Dr(e)};Ir.prototype.encrypt=function(e){if((e=ur(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=hr(e.length),r=hr(16),i=0;iNumber.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},Mr.prototype.setBytes=function(e){if(16!=(e=ur(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},Mr.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var Nr=function(e,t){if(!(this instanceof Nr))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof Mr||(t=new Mr(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Dr(e)};Nr.prototype.encrypt=function(e){for(var t=ur(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,i=0;i3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const n=e.byteLength;let s=5;for(;sn)break;let a=e[s+4],l=!1;if(i?(a=a>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(a)):(a&=31,l=1===a||5===a),l){const i=e.slice(s+4+2,s+4+o);let n=new Or.ModeOfOperation.ctr(t,new Or.Counter(r));const a=n.decrypt(i);n=null,e.set(a,s+4+2)}s=s+4+o}return e}function Hr(e,t,r){if(e.byteLength<=30)return e;const i=e.slice(32);let n=new Or.ModeOfOperation.ctr(t,new Or.Counter(r));const s=n.decrypt(i);return n=null,e.set(s,32),e}var Vr=ot((function(e,t){var r,n,s,o=(r=new Date,n=4,s={setLogLevel:function(e){n=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=n&&console.debug("["+o.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=n&&console.info("["+o.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=n&&console.warn("["+o.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){4>=n&&console.error("["+o.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)}},s);o.getDurationString=function(e,t){var r;function i(e,t){for(var r=(""+e).split(".");r[0].length0){for(var r="",i=0;i0&&(r+=","),r+="["+o.getDurationString(e.start(i))+","+o.getDurationString(e.end(i))+"]";return r}return"(empty)"},t.Log=o;var a=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};a.prototype.getPosition=function(){return this.position},a.prototype.getEndPosition=function(){return this.buffer.byteLength},a.prototype.getLength=function(){return this.buffer.byteLength},a.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0},a.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},a.prototype.readAnyInt=function(e,t){var r=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:r=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:r=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";r=this.dataview.getUint8(this.position)<<16,r|=this.dataview.getUint8(this.position+1)<<8,r|=this.dataview.getUint8(this.position+2);break;case 4:r=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";r=this.dataview.getUint32(this.position)<<32,r|=this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,r}throw"Not enough bytes in buffer"},a.prototype.readUint8=function(){return this.readAnyInt(1,!1)},a.prototype.readUint16=function(){return this.readAnyInt(2,!1)},a.prototype.readUint24=function(){return this.readAnyInt(3,!1)},a.prototype.readUint32=function(){return this.readAnyInt(4,!1)},a.prototype.readUint64=function(){return this.readAnyInt(8,!1)},a.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",r=0;rthis._byteLength&&(this._byteLength=t);else{for(r<1&&(r=1);t>r;)r*=2;var i=new ArrayBuffer(r),n=new Uint8Array(this._buffer);new Uint8Array(i,0,n.length).set(n),this.buffer=i,this._byteLength=t}}},l.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),r=new Uint8Array(this._buffer,0,t.length);t.set(r),this.buffer=e}},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),l.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},l.prototype.isEof=function(){return this.position>=this._byteLength},l.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Int32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var r=new Int16Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Uint32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var r=new Uint16Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var r=new Float64Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var r=new Float32Array(e);return l.memcpy(r.buffer,0,this.buffer,this.byteOffset+this.position,e*r.BYTES_PER_ELEMENT),l.arrayToNative(r,null==t?this.endianness:t),this.position+=r.byteLength,r},l.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},l.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},l.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,l.memcpy=function(e,t,r,i,n){var s=new Uint8Array(e,t,n),o=new Uint8Array(r,i,n);s.set(o)},l.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},l.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},l.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),r=0;rn;i--,n++){var s=t[n];t[n]=t[i],t[i]=s}return e},l.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],r=0;r>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},l.prototype.adjustUint32=function(e,t){var r=this.position;this.seek(e),this.writeUint32(t),this.seek(r)},l.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var r=new Int32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r},l.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var r=new Int16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=2*e,r},l.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var r=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r},l.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var r=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=2*e,r},l.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var r=new Float64Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=8*e,r},l.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var r=new Float32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(r,null==t?this.endianness:t),this.position+=4*e,r};var u=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(u.prototype=new l(new ArrayBuffer,0,l.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,o.debug("MultiBufferStream","Stream ready for parsing"),!0):(o.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(o.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){o.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var r=new Uint8Array(e.byteLength+t.byteLength);return r.set(new Uint8Array(e),0),r.set(new Uint8Array(t),e.byteLength),r.buffer},u.prototype.reduceBuffer=function(e,t,r){var i;return(i=new Uint8Array(r)).set(new Uint8Array(e,t,r)),i.buffer.fileStart=e.fileStart+t,i.buffer.usedBytes=0,i.buffer},u.prototype.insertBuffer=function(e){for(var t=!0,r=0;ri.byteLength){this.buffers.splice(r,1),r--;continue}o.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=i.fileStart||(e=this.reduceBuffer(e,0,i.fileStart-e.fileStart)),o.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(r,0,e),0===r&&(this.buffer=e);t=!1;break}if(e.fileStart0)){t=!1;break}e=this.reduceBuffer(e,n,s)}}t&&(o.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===r&&(this.buffer=e))},u.prototype.logBufferLevel=function(e){var t,r,i,n,s,a=[],l="";for(i=0,n=0,t=0;t0&&(l+=s.end-1+"]");var d=e?o.info:o.debug;0===this.buffers.length?d("MultiBufferStream","No more buffer in memory"):d("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+i+"/"+n+" bytes), continuous ranges: "+l)},u.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0}return!1}return!1},u.prototype.findPosition=function(e,t,r){var i,n=null,s=-1;for(i=!0===e?0:this.bufferIndex;i=t?(o.debug("MultiBufferStream","Found position in existing buffer #"+s),s):-1},u.prototype.findEndContiguousBuf=function(e){var t,r,i,n=void 0!==e?e:this.bufferIndex;if(r=this.buffers[n],this.buffers.length>n+1)for(t=n+1;t>3;return 31===i&&r.data.length>=2&&(i=32+((7&r.data[0])<<3)+((224&r.data[1])>>5)),i}return null},r.DecoderConfigDescriptor=function(e){r.Descriptor.call(this,4,e)},r.DecoderConfigDescriptor.prototype=new r.Descriptor,r.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.upStream=0!=(this.streamType>>1&1),this.streamType=this.streamType>>>2,this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e)},r.DecoderSpecificInfo=function(e){r.Descriptor.call(this,5,e)},r.DecoderSpecificInfo.prototype=new r.Descriptor,r.SLConfigDescriptor=function(e){r.Descriptor.call(this,6,e)},r.SLConfigDescriptor.prototype=new r.Descriptor,this};t.MPEG4DescriptorParser=h;var c={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){c.FullBox.prototype=new c.Box,c.ContainerBox.prototype=new c.Box,c.SampleEntry.prototype=new c.Box,c.TrackGroupTypeBox.prototype=new c.FullBox,c.BASIC_BOXES.forEach((function(e){c.createBoxCtor(e)})),c.FULL_BOXES.forEach((function(e){c.createFullBoxCtor(e)})),c.CONTAINER_BOXES.forEach((function(e){c.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,r){this.type=e,this.size=t,this.uuid=r},FullBox:function(e,t,r){c.Box.call(this,e,t,r),this.flags=0,this.version=0},ContainerBox:function(e,t,r){c.Box.call(this,e,t,r),this.boxes=[]},SampleEntry:function(e,t,r,i){c.ContainerBox.call(this,e,t),this.hdr_size=r,this.start=i},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){c.FullBox.call(this,e,t)},createBoxCtor:function(e,t){c.boxCodes.push(e),c[e+"Box"]=function(t){c.Box.call(this,e,t)},c[e+"Box"].prototype=new c.Box,t&&(c[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){c[e+"Box"]=function(t){c.FullBox.call(this,e,t)},c[e+"Box"].prototype=new c.FullBox,c[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,r=0;rr?(o.error("BoxParser","Box of type '"+u+"' has a size "+d+" greater than its container size "+r),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:d,hdr_size:l,start:a}):0!==d&&a+d>e.getEndPosition()?(e.seek(a),o.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:c.ERR_NOT_ENOUGH_DATA,type:u,size:d,hdr_size:l,start:a}):t?{code:c.OK,type:u,size:d,hdr_size:l,start:a}:(c[u+"Box"]?i=new c[u+"Box"](d):"uuid"!==u?(o.warn("BoxParser","Unknown box type: '"+u+"'"),(i=new c.Box(u,d)).has_unparsed_data=!0):c.UUIDBoxes[s]?i=new c.UUIDBoxes[s](d):(o.warn("BoxParser","Unknown uuid type: '"+s+"'"),(i=new c.Box(u,d)).uuid=s,i.has_unparsed_data=!0),i.hdr_size=l,i.start=a,i.write===c.Box.prototype.write&&"mdat"!==i.type&&(o.info("BoxParser","'"+h+"' box writing not yet implemented, keeping unparsed data in memory for later write"),i.parseDataAndRewind(e)),i.parse(e),(n=e.getPosition()-(i.start+i.size))<0?(o.warn("BoxParser","Parsing of box '"+h+"' did not read the entire indicated box data size (missing "+-n+" bytes), seeking forward"),e.seek(i.start+i.size)):n>0&&(o.error("BoxParser","Parsing of box '"+h+"' read "+n+" more bytes than the indicated box data size, seeking backwards"),0!==i.size&&e.seek(i.start+i.size)),{code:c.OK,box:i,size:i.size})},c.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size)},c.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},c.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size},c.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},c.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},c.ContainerBox.prototype.parse=function(e){for(var t,r;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96)},c.SAMPLE_ENTRY_TYPE_VISUAL="Visual",c.SAMPLE_ENTRY_TYPE_AUDIO="Audio",c.SAMPLE_ENTRY_TYPE_HINT="Hint",c.SAMPLE_ENTRY_TYPE_METADATA="Metadata",c.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",c.SAMPLE_ENTRY_TYPE_SYSTEM="System",c.SAMPLE_ENTRY_TYPE_TEXT="Text",c.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},c.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},c.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size},c.SampleEntry.prototype.parseFooter=function(e){c.ContainerBox.prototype.parse.call(this,e)},c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_HINT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,(function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)})),c.createMediaSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,(function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)})),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),c.createSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_TEXT,"enct"),c.createEncryptedSampleEntryCtor(c.SAMPLE_ENTRY_TYPE_METADATA,"encm"),c.createBoxCtor("a1lx",(function(e){var t=16*(1+(1&(1&e.readUint8())));this.layer_size=[];for(var r=0;r<3;r++)this.layer_size[r]=16==t?e.readUint16():e.readUint32()})),c.createBoxCtor("a1op",(function(e){this.op_index=e.readUint8()})),c.createFullBoxCtor("auxC",(function(e){this.aux_type=e.readCString();var t=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=e.readUint8Array(t)})),c.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)o.error("av1C marker problem");else if(this.version=127&t,1===this.version)if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void o.error("av1C reserved_2 parsing problem");var r=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(r)}else o.error("av1C reserved_1 parsing problem");else o.error("av1C version "+this.version+" not supported")})),c.createBoxCtor("avcC",(function(e){var t,r;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),r=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(r))})),c.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),c.createFullBoxCtor("ccst",(function(e){var t=e.readUint8();this.all_ref_pics_intra=128==(128&t),this.intra_pred_used=64==(64&t),this.max_ref_per_pic=(63&t)>>2,e.readUint24()})),c.createBoxCtor("cdef",(function(e){var t;for(this.channel_count=e.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],t=0;t=32768&&this.component_type_urls.push(e.readCString())}})),c.createFullBoxCtor("co64",(function(e){var t,r;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(r=0;r>7}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4))})),c.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),c.createFullBoxCtor("cslg",(function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())})),c.createFullBoxCtor("ctts",(function(e){var t,r;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(r=0;r>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|r>>6&3,this.acmod=r>>3&7,this.lfeon=r>>2&1,this.bit_rate_code=3&r|i>>5&7})),c.createBoxCtor("dec3",(function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var r=0;r>6,i.bsid=n>>1&31,i.bsmod=(1&n)<<4|s>>4&15,i.acmod=s>>1&7,i.lfeon=1&s,i.num_dep_sub=o>>1&15,i.num_dep_sub>0&&(i.chan_loc=(1&o)<<8|e.readUint8())}})),c.createFullBoxCtor("dfLa",(function(e){var t=[],r=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var i=e.readUint8(),n=Math.min(127&i,r.length-1);if(n?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(r[n]),128&i)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),c.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),c.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),c.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),c.createBoxCtor("dOps",(function(e){if(this.Version=e.readUint8(),this.OutputChannelCount=e.readUint8(),this.PreSkip=e.readUint16(),this.InputSampleRate=e.readUint32(),this.OutputGain=e.readInt16(),this.ChannelMappingFamily=e.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=e.readUint8(),this.CoupledCount=e.readUint8(),this.ChannelMapping=[];for(var t=0;t=4;)this.compatible_brands[r]=e.readString(4),t-=4,r++})),c.createFullBoxCtor("hdlr",(function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))})),c.createBoxCtor("hvcC",(function(e){var t,r,i,n;this.configurationVersion=e.readUint8(),n=e.readUint8(),this.general_profile_space=n>>6,this.general_tier_flag=(32&n)>>5,this.general_profile_idc=31&n,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),n=e.readUint8(),this.constantFrameRate=n>>6,this.numTemporalLayers=(13&n)>>3,this.temporalIdNested=(4&n)>>2,this.lengthSizeMinusOne=3&n,this.nalu_arrays=[];var s=e.readUint8();for(t=0;t>7,o.nalu_type=63&n;var a=e.readUint16();for(r=0;r>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var r=0;if(this.version<2)r=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";r=e.readUint32()}for(var i=0;i>7,this.axis=1&t})),c.createFullBoxCtor("infe",(function(e){if(0!==this.version&&1!==this.version||(this.item_ID=e.readUint16(),this.item_protection_index=e.readUint16(),this.item_name=e.readCString(),this.content_type=e.readCString(),this.content_encoding=e.readCString()),1===this.version)return this.extension_type=e.readString(4),o.warn("BoxParser","Cannot parse extension type"),void e.seek(this.start+this.size);this.version>=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()))})),c.createFullBoxCtor("ipma",(function(e){var t,r;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?o.property_index=(127&s)<<8|e.readUint8():o.property_index=127&s}}})),c.createFullBoxCtor("iref",(function(e){var t,r;for(this.references=[];e.getPosition()>7,i.assignment_type=127&n,i.assignment_type){case 0:i.grouping_type=e.readString(4);break;case 1:i.grouping_type=e.readString(4),i.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:i.sub_track_id=e.readUint32();break;default:o.warn("BoxParser","Unknown leva assignement type")}}})),c.createBoxCtor("lsel",(function(e){this.layer_id=e.readUint16()})),c.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),f.prototype.toString=function(){return"("+this.x+","+this.y+")"},c.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]=new f(e.readUint16(),e.readUint16()),this.display_primaries[1]=new f(e.readUint16(),e.readUint16()),this.display_primaries[2]=new f(e.readUint16(),e.readUint16()),this.white_point=new f(e.readUint16(),e.readUint16()),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),c.createFullBoxCtor("mdhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()})),c.createFullBoxCtor("mehd",(function(e){1&this.flags&&(o.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()})),c.createFullBoxCtor("meta",(function(e){this.boxes=[],c.ContainerBox.prototype.parse.call(this,e)})),c.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),c.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),c.createFullBoxCtor("mskC",(function(e){this.bits_per_pixel=e.readUint8()})),c.createFullBoxCtor("mvhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()})),c.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),c.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),c.createFullBoxCtor("padb",(function(e){var t=e.readUint32();this.padbits=[];for(var r=0;r0){var t=e.readUint32();this.kid=[];for(var r=0;r0&&(this.data=e.readUint8Array(i))})),c.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),c.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),c.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),c.createFullBoxCtor("saio",(function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var r=0;r>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var r=e.readUint8(),i=0;i>7,this.num_leading_samples=127&t})),c.createSampleGroupCtor("rash",(function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)o.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=c.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))})),c.createSampleGroupCtor("stsa",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),c.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),c.createSampleGroupCtor("tsas",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("tscl",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createSampleGroupCtor("vipr",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),c.createFullBoxCtor("sbgp",(function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),r=0;r>6,this.sample_depends_on[i]=t>>4&3,this.sample_is_depended_on[i]=t>>2&3,this.sample_has_redundancy[i]=3&t})),c.createFullBoxCtor("senc"),c.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),o.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),r=0;r>31&1,i.referenced_size=2147483647&n,i.subsegment_duration=e.readUint32(),n=e.readUint32(),i.starts_with_SAP=n>>31&1,i.SAP_type=n>>28&7,i.SAP_delta_time=268435455&n}})),c.SingleItemTypeReferenceBox=function(e,t,r,i){c.Box.call(this,e,t),this.hdr_size=r,this.start=i},c.SingleItemTypeReferenceBox.prototype=new c.Box,c.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var r=0;r>4&15,this.sample_sizes[t+1]=15&i}else if(8===this.field_size)for(t=0;t0)for(r=0;r>4&15,this.default_skip_byte_block=15&t}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=c.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))})),c.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),c.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&c.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),c.createFullBoxCtor("tfra",(function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var r=e.readUint32(),i=0;i>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()})),c.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),c.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),c.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),c.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),c.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),c.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},c.createTrackGroupCtor("msrc"),c.TrackReferenceTypeBox=function(e,t,r,i){c.Box.call(this,e,t),this.hdr_size=r,this.start=i},c.TrackReferenceTypeBox.prototype=new c.Box,c.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},c.trefBox.prototype.parse=function(e){for(var t,r;e.getPosition()t&&this.flags&c.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&c.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var r=0;r>7&1,this.block_pad_lsb=r>>6&1,this.block_little_endian=r>>5&1,this.block_reversed=r>>4&1,this.pad_unknown=r>>3&1,this.pixel_size=e.readUint32(),this.row_align_size=e.readUint32(),this.tile_align_size=e.readUint32(),this.num_tile_cols_minus_one=e.readUint32(),this.num_tile_rows_minus_one=e.readUint32()}})),c.createFullBoxCtor("url ",(function(e){1!==this.flags&&(this.location=e.readCString())})),c.createFullBoxCtor("urn ",(function(e){this.name=e.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=e.readCString())})),c.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")})),c.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=c.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),c.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),c.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=c.parseHex16(e)})),c.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize))})),c.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),c.createFullBoxCtor("vvcC",(function(e){var t,r,i={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){this.held_bits=e.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(e){this.held_bits=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=this.held_bits>>this.num_held_bits-e&(1<1){for(i.stream_read_1_bytes(e),this.ptl_sublayer_present_mask=0,r=this.num_sublayers-2;r>=0;--r){var o=i.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++r)i.extract_bits(1);for(this.sublayer_level_idc=[],r=this.num_sublayers-2;r>=0;--r)this.ptl_sublayer_present_mask&1<>=1;t+=c.decimalToHex(i,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var n=!1,s="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||n)&&(s="."+c.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+s,n=!0);t+=s}return t},c.vvc1SampleEntry.prototype.getCodec=c.vvi1SampleEntry.prototype.getCodec=function(){var e,t=c.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var r="";if(this.vvcC.general_constraint_info){var i,n=[],s=0;for(s|=this.vvcC.ptl_frame_only_constraint<<7,s|=this.vvcC.ptl_multilayer_enabled<<6,e=0;e>2&63,n.push(s),s&&(i=e),s=this.vvcC.general_constraint_info[e]>>2&3;if(void 0===i)r=".CA";else{r=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",a=0,l=0;for(e=0;e<=i;++e)for(a=a<<8|n[e],l+=8;l>=5;){r+=o[a>>l-5&31],a&=(1<<(l-=5))-1}l&&(r+=o[31&(a<<=5-l)])}}t+=r}return t},c.mp4aSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),r=this.esds.esd.getAudioConfig();return e+"."+c.decimalToHex(t)+(r?"."+r:"")}return e},c.stxtSampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},c.vp08SampleEntry.prototype.getCodec=c.vp09SampleEntry.prototype.getCodec=function(){var e=c.SampleEntry.prototype.getCodec.call(this),t=this.vpcC.level;0==t&&(t="00");var r=this.vpcC.bitDepth;return 8==r&&(r="08"),e+".0"+this.vpcC.profile+"."+t+"."+r},c.av01SampleEntry.prototype.getCodec=function(){var e,t=c.SampleEntry.prototype.getCodec.call(this),r=this.av1C.seq_level_idx_0;return r<10&&(r="0"+r),2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+r+(this.av1C.seq_tier_0?"H":"M")+"."+e},c.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),o.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>d?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>d&&e.writeUint64(this.size)},c.FullBox.prototype.writeHeader=function(e){this.size+=4,c.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},c.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))},c.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1t?1:0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(e),1===this.version?e.writeUint64(this.baseMediaDecodeTime):e.writeUint32(this.baseMediaDecodeTime)},c.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&c.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&c.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&c.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&c.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&c.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&c.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&c.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags)},c.tkhdBox.prototype.write=function(e){this.version=0,this.size=80,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.track_id),e.writeUint32(0),e.writeUint32(this.duration),e.writeUint32(0),e.writeUint32(0),e.writeInt16(this.layer),e.writeInt16(this.alternate_group),e.writeInt16(this.volume<<8),e.writeUint16(0),e.writeInt32Array(this.matrix),e.writeUint32(this.width),e.writeUint32(this.height)},c.trexBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20,this.writeHeader(e),e.writeUint32(this.track_id),e.writeUint32(this.default_sample_description_index),e.writeUint32(this.default_sample_duration),e.writeUint32(this.default_sample_size),e.writeUint32(this.default_sample_flags)},c.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&c.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&c.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&c.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&c.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&c.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&c.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&c.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&c.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var t=0;t-1||e[r]instanceof c.Box||t[r]instanceof c.Box||void 0===e[r]||void 0===t[r]||"function"==typeof e[r]||"function"==typeof t[r]||e.subBoxNames&&e.subBoxNames.indexOf(r.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(r.slice(0,4))>-1||"data"===r||"start"===r||"size"===r||"creation_time"===r||"modification_time"===r||c.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(r)>-1||e[r]===t[r]))return!1;return!0},c.boxEqual=function(e,t){if(!c.boxEqualFields(e,t))return!1;for(var r=0;r1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1)},_.prototype.setExtractionOptions=function(e,t,r){var i=this.getTrackById(e);if(i){var n={};this.extractedTracks.push(n),n.id=e,n.user=t,n.trak=i,i.nextSample=0,n.nb_samples=1e3,n.samples=[],r&&r.nbSamples&&(n.nb_samples=r.nbSamples)}},_.prototype.unsetExtractionOptions=function(e){for(var t=-1,r=0;r-1&&this.extractedTracks.splice(t,1)},_.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}if(this.saveParsePosition&&this.saveParsePosition(),(e=c.parseOneBox(this.stream,false)).code===c.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var r;switch(r="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),r){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[r]&&o.warn("ISOFile","Duplicate Box of type: "+r+", overriding previous occurrence"),this[r]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},_.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(o.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(o.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(o.warn("ISOFile","Not ready to start parsing"),!1))},_.prototype.appendBuffer=function(e,t){var r;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(r=this.nextSeekPosition,this.nextSeekPosition=void 0):r=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(r=this.stream.getEndFilePositionAfter(r))):r=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(o.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+r),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),r},_.prototype.getInfo=function(){var e,t,r,i,n,s,o={},a=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(a+1e3*this.moov.mvhd.creation_time),o.modified=new Date(a+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],e=0;e0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',e=0;e=r.samples.length)&&(o.info("ISOFile","Sending fragmented data on track #"+i.id+" for samples ["+Math.max(0,r.nextSample-i.nb_samples)+","+(r.nextSample-1)+"]"),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(i.id,i.user,i.segmentStream.buffer,r.nextSample,e||r.nextSample>=r.samples.length),i.segmentStream=null,i!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t=r.samples.length)&&(o.debug("ISOFile","Sending samples on track #"+s.id+" for sample "+r.nextSample),this.onSamples&&this.onSamples(s.id,s.user,s.samples),s.samples=[],s!==this.extractedTracks[t]))break}}}},_.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},_.prototype.getBoxes=function(e,t){var r=[];return _._sweep.call(this,e,r,t),r},_._sweep=function(e,t,r){for(var i in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&r)return;_._sweep.call(this.boxes[i],e,t,r)}},_.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},_.prototype.getTrackSample=function(e,t){var r=this.getTrackById(e);return this.getSample(r,t)},_.prototype.releaseUsedSamples=function(e,t){var r=0,i=this.getTrackById(e);i.lastValidSample||(i.lastValidSample=0);for(var n=i.lastValidSample;ne*n.timescale){d=i-1;break}t&&n.is_sync&&(l=i)}for(t&&(d=l),e=r.samples[d].cts,r.nextSample=d;r.samples[d].alreadyRead===r.samples[d].size&&r.samples[d+1];)d++;return s=r.samples[d].offset+r.samples[d].alreadyRead,o.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+r.nextSample+" on track "+r.tkhd.track_id+", time "+o.getDurationString(e,a)+" and offset: "+s),{offset:s,time:e/a}},_.prototype.getTrackDuration=function(e){var t;return e.samples?((t=e.samples[e.samples.length-1]).cts+t.duration)/t.timescale:1/0},_.prototype.seek=function(e,t){var r,i,n,s=this.moov,a={offset:1/0,time:1/0};if(this.moov){for(n=0;nthis.getTrackDuration(r)||((i=this.seekTrack(e,t,r)).offset-1){o=l;break}switch(o){case"Visual":if(n.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),s.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24),t.avcDecoderConfigRecord){var h=new c.avcCBox;h.parse(new a(t.avcDecoderConfigRecord)),s.addBox(h)}else if(t.hevcDecoderConfigRecord){var f=new c.hvcCBox;f.parse(new a(t.hevcDecoderConfigRecord)),s.addBox(f)}break;case"Audio":n.add("smhd").set("balance",t.balance||0),s.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":n.add("hmhd");break;case"Subtitle":if(n.add("sthd"),"stpp"===t.type)s.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");break;default:n.add("nmhd")}t.description&&s.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){s.addBox(e)})),n.add("dinf").add("dref").addEntry((new c["url Box"]).set("flags",1));var p=n.add("stbl");return p.add("stsd").addEntry(s),p.add("stts").set("sample_counts",[]).set("sample_deltas",[]),p.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),p.add("stco").set("chunk_offsets",[]),p.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(r),t.id}},c.Box.prototype.computeSize=function(e){var t=e||new l;t.endianness=l.BIG_ENDIAN,this.write(t)},_.prototype.addSample=function(e,t,r){var i=r||{},n={},s=this.getTrackById(e);if(null!==s){n.number=s.samples.length,n.track_id=s.tkhd.track_id,n.timescale=s.mdia.mdhd.timescale,n.description_index=i.sample_description_index?i.sample_description_index-1:0,n.description=s.mdia.minf.stbl.stsd.entries[n.description_index],n.data=t,n.size=t.byteLength,n.alreadyRead=n.size,n.duration=i.duration||1,n.cts=i.cts||0,n.dts=i.dts||0,n.is_sync=i.is_sync||!1,n.is_leading=i.is_leading||0,n.depends_on=i.depends_on||0,n.is_depended_on=i.is_depended_on||0,n.has_redundancy=i.has_redundancy||0,n.degradation_priority=i.degradation_priority||0,n.offset=0,n.subsamples=i.subsamples,s.samples.push(n),s.samples_size+=n.size,s.samples_duration+=n.duration,void 0===s.first_dts&&(s.first_dts=i.dts),this.processSamples();var o=this.createSingleSampleMoof(n);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(t),n}},_.prototype.createSingleSampleMoof=function(e){var t=0;t=e.is_sync?1<<25:65536;var r=new c.moofBox;r.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var i=r.add("traf"),n=this.getTrackById(e.track_id);return i.add("tfhd").set("track_id",e.track_id).set("flags",c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i.add("tfdt").set("baseMediaDecodeTime",e.dts-(n.first_dts||0)),i.add("trun").set("flags",c.TRUN_FLAGS_DATA_OFFSET|c.TRUN_FLAGS_DURATION|c.TRUN_FLAGS_SIZE|c.TRUN_FLAGS_FLAGS|c.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[t]).set("sample_composition_time_offset",[e.cts-e.dts]),r},_.prototype.lastMoofIndex=0,_.prototype.samplesDataSize=0,_.prototype.resetTables=function(){var e,t,r,i,n,s;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=n[o].grouping_type+"/0",(a=new d(n[o].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=a))}else for(o=0;o=2&&(l=i[o].grouping_type+"/0",a=new d(i[o].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=a))},_.setSampleGroupProperties=function(e,t,r,i){var n,s;for(n in t.sample_groups=[],i){var o;if(t.sample_groups[n]={},t.sample_groups[n].grouping_type=i[n].grouping_type,t.sample_groups[n].grouping_type_parameter=i[n].grouping_type_parameter,r>=i[n].last_sample_in_run&&(i[n].last_sample_in_run<0&&(i[n].last_sample_in_run=0),i[n].entry_index++,i[n].entry_index<=i[n].sbgp.entries.length-1&&(i[n].last_sample_in_run+=i[n].sbgp.entries[i[n].entry_index].sample_count)),i[n].entry_index<=i[n].sbgp.entries.length-1?t.sample_groups[n].group_description_index=i[n].sbgp.entries[i[n].entry_index].group_description_index:t.sample_groups[n].group_description_index=-1,0!==t.sample_groups[n].group_description_index)o=i[n].fragment_description?i[n].fragment_description:i[n].description,t.sample_groups[n].group_description_index>0?(s=t.sample_groups[n].group_description_index>65535?(t.sample_groups[n].group_description_index>>16)-1:t.sample_groups[n].group_description_index-1,o&&s>=0&&(t.sample_groups[n].description=o.entries[s])):o&&o.version>=2&&o.default_group_description_index>0&&(t.sample_groups[n].description=o.entries[o.default_group_description_index-1])}},_.process_sdtp=function(e,t,r){t&&(e?(t.is_leading=e.is_leading[r],t.depends_on=e.sample_depends_on[r],t.is_depended_on=e.sample_is_depended_on[r],t.has_redundancy=e.sample_has_redundancy[r]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))},_.prototype.buildSampleLists=function(){var e,t;for(e=0;ev&&(b++,v<0&&(v=0),v+=s.sample_counts[b]),t>0?(e.samples[t-1].duration=s.sample_deltas[b],e.samples_duration+=e.samples[t-1].duration,A.dts=e.samples[t-1].dts+e.samples[t-1].duration):A.dts=0,o?(t>=w&&(E++,w<0&&(w=0),w+=o.sample_counts[E]),A.cts=e.samples[t].dts+o.sample_offsets[E]):A.cts=A.dts,a?(t==a.sample_numbers[S]-1?(A.is_sync=!0,S++):(A.is_sync=!1,A.degradation_priority=0),d&&d.entries[U].sample_delta+x==t+1&&(A.subsamples=d.entries[U].subsamples,x+=d.entries[U].sample_delta,U++)):A.is_sync=!0,_.process_sdtp(e.mdia.minf.stbl.sdtp,A,A.number),A.degradation_priority=c?c.priority[t]:0,d&&d.entries[U].sample_delta+x==t&&(A.subsamples=d.entries[U].subsamples,x+=d.entries[U].sample_delta),(u.length>0||h.length>0)&&_.setSampleGroupProperties(e,A,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}},_.prototype.updateSampleLists=function(){var e,t,r,i,n,s,o,a,l,d,u,h,f,p,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&_.initSampleGroups(h,u,u.sbgps,h.mdia.minf.stbl.sgpds,u.sgpds),t=0;t0?p.dts=h.samples[h.samples.length-2].dts+h.samples[h.samples.length-2].duration:(u.tfdt?p.dts=u.tfdt.baseMediaDecodeTime:p.dts=0,h.first_traf_merged=!0),p.cts=p.dts,g.flags&c.TRUN_FLAGS_CTS_OFFSET&&(p.cts=p.dts+g.sample_composition_time_offset[r]),m=o,g.flags&c.TRUN_FLAGS_FLAGS?m=g.sample_flags[r]:0===r&&g.flags&c.TRUN_FLAGS_FIRST_FLAG&&(m=g.first_sample_flags),p.is_sync=!(m>>16&1),p.is_leading=m>>26&3,p.depends_on=m>>24&3,p.is_depended_on=m>>22&3,p.has_redundancy=m>>20&3,p.degradation_priority=65535&m;var y=!!(u.tfhd.flags&c.TFHD_FLAG_BASE_DATA_OFFSET),v=!!(u.tfhd.flags&c.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),b=!!(g.flags&c.TRUN_FLAGS_DATA_OFFSET),w=0;w=y?u.tfhd.base_data_offset:v||0===t?d.start:a,p.offset=0===t&&0===r?b?w+g.data_offset:w:a,a=p.offset+p.size,(u.sbgps.length>0||u.sgpds.length>0||h.mdia.minf.stbl.sbgps.length>0||h.mdia.minf.stbl.sgpds.length>0)&&_.setSampleGroupProperties(h,p,p.number_in_traf,u.sample_groups_info)}}if(u.subs){h.has_fragment_subsamples=!0;var E=u.first_sample_index;for(t=0;t-1))return null;var s=(r=this.stream.buffers[n]).byteLength-(i.offset+i.alreadyRead-r.fileStart);if(i.size-i.alreadyRead<=s)return o.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-r.fileStart)+" read size: "+(i.size-i.alreadyRead)+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,r,i.offset+i.alreadyRead-r.fileStart,i.size-i.alreadyRead),r.usedBytes+=i.size-i.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead=i.size,i;if(0===s)return null;o.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+i.alreadyRead+" offset: "+(i.offset+i.alreadyRead-r.fileStart)+" read size: "+s+" full size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,r,i.offset+i.alreadyRead-r.fileStart,s),i.alreadyRead+=s,r.usedBytes+=s,this.stream.logBufferLevel()}},_.prototype.releaseSample=function(e,t){var r=e.samples[t];return r.data?(this.samplesDataSize-=r.size,r.data=null,r.alreadyRead=0,r.size):0},_.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},_.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec()}return t},_.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(r.protection=s.ipro.protections[s.iinf.item_infos[e].protection_index-1]),s.iinf.item_infos[e].item_type?r.type=s.iinf.item_infos[e].item_type:r.type="mime",r.content_type=s.iinf.item_infos[e].content_type,r.content_encoding=s.iinf.item_infos[e].content_encoding;if(s.grpl)for(e=0;e0&&c.property_index-1-1))return null;var a=(t=this.stream.buffers[s]).byteLength-(n.offset+n.alreadyRead-t.fileStart);if(!(n.length-n.alreadyRead<=a))return o.debug("ISOFile","Getting item #"+e+" extent #"+i+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+a+" full extent size: "+n.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,a),n.alreadyRead+=a,r.alreadyRead+=a,t.usedBytes+=a,this.stream.logBufferLevel(),null;o.debug("ISOFile","Getting item #"+e+" extent #"+i+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-t.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+r.size+")"),l.memcpy(r.data.buffer,r.alreadyRead,t,n.offset+n.alreadyRead-t.fileStart,n.length-n.alreadyRead),t.usedBytes+=n.length-n.alreadyRead,this.stream.logBufferLevel(),r.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length}}return r.alreadyRead===r.size?r:null},_.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var r=0;r0?this.moov.traks[e].samples[0].duration:0),t.push(i)}return t},c.Box.prototype.printHeader=function(e){this.size+=8,this.size>d&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},c.FullBox.prototype.printHeader=function(e){this.size+=4,c.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},c.Box.prototype.print=function(e){this.printHeader(e)},c.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)},c.tkhdBox.prototype.print=function(e){c.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)};var y={createFile:function(e,t){var r=void 0===e||e,i=new _(t);return i.discardMdatData=!r,i}};t.createFile=y.createFile}));function jr(e){return e.reduce(((e,t)=>256*e+t))}function Wr(e){const t=[101,103,119,99],r=e.length-28,i=e.slice(r,r+t.length);return t.every(((e,t)=>e===i[t]))}Vr.Log,Vr.MP4BoxStream,Vr.DataStream,Vr.MultiBufferStream,Vr.MPEG4DescriptorParser,Vr.BoxParser,Vr.XMLSubtitlein4Parser,Vr.Textin4Parser,Vr.ISOFile,Vr.createFile;class Yr{constructor(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=new Uint8Array([30,158,90,33,244,57,83,165,2,70,35,87,215,231,226,108]),this.t=this.n.slice().reverse()}destroy(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=null,this.t=null}transport(e){if(!this.s&&this.l>50)return e;if(this.l++,this.d)return e;const t=new Uint8Array(e);if(this.A){if(!(this.c~e))}(e.slice(r+32,r+32+t))]}return null}(t,this.t);if(!r)return e;const i=function(e){try{if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiate)throw null;{const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(!(e instanceof WebAssembly.Module&&new WebAssembly.Instance(e)instanceof WebAssembly.Instance))throw null}}catch(e){return new Error("video_error_4")}let t;try{t={env:{__handle_stack_overflow:()=>e(new Error("video_error_1")),memory:new WebAssembly.Memory({initial:256,maximum:256})}}}catch(e){return new Error("video_error_5")}return t}(e);if(i instanceof Error)return console.error(i.message),this.d=!0,e;this.A=!0,this.u=r[1],Wr(t)&&this.c++,WebAssembly.instantiate(r[2],i).then((e=>{if("function"!=typeof(t=e.instance.exports).parse||"object"!=typeof t.memory)return this.d=!0,void console.error("video_error_3");var t;this.s=e.instance.exports,this.a=new Uint8Array(this.s.memory.buffer)})).catch((e=>{this.d=!0,console.error("video_error_6")}))}return e}}const qr=16,Kr=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Xr=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Zr(e){const t=[];for(let r=0,i=e.length;r1===(e=e.toString(16)).length?"0"+e:e)).join("")}function Qr(e){const t=[];for(let r=0,i=e.length;r>>6),t.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)t.push(224|i>>>12),t.push(128|i>>>6&63),t.push(128|63&i);else{if(!(i>=65536&&i<=1114111))throw t.push(i),new Error("input is not supported");r++,t.push(240|i>>>18&28),t.push(128|i>>>12&63),t.push(128|i>>>6&63),t.push(128|63&i)}}return t}function ei(e){const t=[];for(let r=0,i=e.length;r=240&&e[r]<=247?(t.push(String.fromCodePoint(((7&e[r])<<18)+((63&e[r+1])<<12)+((63&e[r+2])<<6)+(63&e[r+3]))),r+=3):e[r]>=224&&e[r]<=239?(t.push(String.fromCodePoint(((15&e[r])<<12)+((63&e[r+1])<<6)+(63&e[r+2]))),r+=2):e[r]>=192&&e[r]<=223?(t.push(String.fromCodePoint(((31&e[r])<<6)+(63&e[r+1]))),r++):t.push(String.fromCodePoint(e[r]));return t.join("")}function ti(e,t){const r=31&t;return e<>>32-r}function ri(e){return(255&Kr[e>>>24&255])<<24|(255&Kr[e>>>16&255])<<16|(255&Kr[e>>>8&255])<<8|255&Kr[255&e]}function ii(e){return e^ti(e,2)^ti(e,10)^ti(e,18)^ti(e,24)}function ni(e){return e^ti(e,13)^ti(e,23)}function si(e,t,r){const i=new Array(4),n=new Array(4);for(let t=0;t<4;t++)n[0]=255&e[4*t],n[1]=255&e[4*t+1],n[2]=255&e[4*t+2],n[3]=255&e[4*t+3],i[t]=n[0]<<24|n[1]<<16|n[2]<<8|n[3];for(let e,t=0;t<32;t+=4)e=i[1]^i[2]^i[3]^r[t+0],i[0]^=ii(ri(e)),e=i[2]^i[3]^i[0]^r[t+1],i[1]^=ii(ri(e)),e=i[3]^i[0]^i[1]^r[t+2],i[2]^=ii(ri(e)),e=i[0]^i[1]^i[2]^r[t+3],i[3]^=ii(ri(e));for(let e=0;e<16;e+=4)t[e]=i[3-e/4]>>>24&255,t[e+1]=i[3-e/4]>>>16&255,t[e+2]=i[3-e/4]>>>8&255,t[e+3]=255&i[3-e/4]}function oi(e,t,r){const i=new Array(4),n=new Array(4);for(let t=0;t<4;t++)n[0]=255&e[0+4*t],n[1]=255&e[1+4*t],n[2]=255&e[2+4*t],n[3]=255&e[3+4*t],i[t]=n[0]<<24|n[1]<<16|n[2]<<8|n[3];i[0]^=2746333894,i[1]^=1453994832,i[2]^=1736282519,i[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=i[1]^i[2]^i[3]^Xr[r+0],t[r+0]=i[0]^=ni(ri(e)),e=i[2]^i[3]^i[0]^Xr[r+1],t[r+1]=i[1]^=ni(ri(e)),e=i[3]^i[0]^i[1]^Xr[r+2],t[r+2]=i[2]^=ni(ri(e)),e=i[0]^i[1]^i[2]^Xr[r+3],t[r+3]=i[3]^=ni(ri(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function ai(e,t,r){let{padding:i="pkcs#7",mode:n,iv:s=[],output:o="string"}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("cbc"===n&&("string"==typeof s&&(s=Zr(s)),16!==s.length))throw new Error("iv is invalid");if("string"==typeof t&&(t=Zr(t)),16!==t.length)throw new Error("key is invalid");if(e="string"==typeof e?0!==r?Qr(e):Zr(e):[...e],("pkcs#5"===i||"pkcs#7"===i)&&0!==r){const t=qr-e.length%qr;for(let r=0;r=qr;){const t=e.slice(h,h+16),i=new Array(16);if("cbc"===n)for(let e=0;e2&&void 0!==arguments[2]&&arguments[2];const i=e.byteLength;let n=5;for(;ni)break;let o=e[n+4],a=!1;if(r?(o=o>>>1&63,a=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,a=1===o||5===o),a){const r=ai(e.slice(n+4+2,n+4+s),t,0,{padding:"none",output:"array"});e.set(r,n+4+2)}n=n+4+s}return e}const ui={init:0,findFirstStartCode:1,findSecondStartCode:2};class hi extends class{on(e,t,r){const i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:r}),this}once(e,t,r){const i=this;function n(){i.off(e,n);for(var s=arguments.length,o=new Array(s),a=0;a1?r-1:0),n=1;n{delete r[e]})),void delete this.e;const i=r[e],n=[];if(i&&t)for(let e=0,r=i.length;e=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(!(!1&this.tempBuffer[this.parsedOffset+1])){this.versionLayer=this.tempBuffer[this.parsedOffset+1],this.state=ui.findFirstStartCode,this.fisrtStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==ui.findFirstStartCode){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(this.tempBuffer[this.parsedOffset+1]==this.versionLayer){this.state=ui.findSecondStartCode,this.secondStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==ui.findSecondStartCode){let e=this.tempBuffer.slice(this.fisrtStartCodeOffset,this.secondStartCodeOffset);this.emit("data",e,t),this.tempBuffer=this.tempBuffer.slice(this.secondStartCodeOffset),this.fisrtStartCodeOffset=0,this.parsedOffset=2,this.state=ui.findFirstStartCode}}}}function ci(e,t,r){for(let i=2;i3&&void 0!==arguments[3]&&arguments[3];const n=e.byteLength;let s=5;for(;sn)break;let a=e[s+4],l=!1;if(i?(a=a>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(a)):(a&=31,l=1===a||5===a),l){const i=ci(e.slice(s+4,s+4+o),t,r);e.set(i,s+4)}s=s+4+o}return e}Date.now||(Date.now=function(){return(new Date).getTime()});const mi=[];mi.push(r(),t()),Promise.all(mi).then((e=>{const t=e[0];!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[],n=[],s={},o=new AbortController,a=null,l=null,d=null,u=null,v=null,b=null,S=!1,Ge=!1,Ye=!!At(r),Ke=!1,Xe=null,ot=null,ft=null,Ct=[],Tt=null,Bt=null,Ft=0,It=0,Lt=null,Rt=null,Wt=0,Yt=0,qt=!1,Qt=!1,lr=!1,dr=null,ur=null,hr=null,cr=!1,fr=()=>{const e=Ut();return{debug:e.debug,debugLevel:e.debugLevel,debugUuid:e.debugUuid,useOffscreen:e.useOffscreen,useWCS:e.useWCS,useMSE:e.useMSE,videoBuffer:e.videoBuffer,videoBufferDelay:e.videoBufferDelay,openWebglAlignment:e.openWebglAlignment,playType:e.playType,hasAudio:e.hasAudio,hasVideo:e.hasVideo,playbackRate:1,playbackForwardMaxRateDecodeIFrame:e.playbackForwardMaxRateDecodeIFrame,playbackIsCacheBeforeDecodeForFpsRender:e.playbackConfig.isCacheBeforeDecodeForFpsRender,sampleRate:0,networkDelay:e.networkDelay,visibility:!0,useSIMD:e.useSIMD,isRecording:!1,recordType:e.recordType,isNakedFlow:e.isNakedFlow,checkFirstIFrame:e.checkFirstIFrame,audioBufferSize:1024,isM7sCrypto:e.isM7sCrypto,m7sCryptoAudio:e.m7sCryptoAudio,cryptoKey:e.cryptoKey,cryptoIV:e.cryptoIV,isSm4Crypto:e.isSm4Crypto,sm4CryptoKey:e.sm4CryptoKey,isXorCrypto:e.isXorCrypto,isHls265:!1,isFlv:e.isFlv,isFmp4:e.isFmp4,isMpeg4:e.isMpeg4,isFmp4Private:e.isFmp4Private,isEmitSEI:e.isEmitSEI,isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isDropSameTimestampGop:e.isDropSameTimestampGop,mseDecodeAudio:e.mseDecodeAudio,nakedFlowH265DemuxUseNew:e.nakedFlowH265DemuxUseNew}};"VideoEncoder"in self&&(s={hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:new VideoDecoder({output:function(e){if(s.isEmitInfo||(yr.debug.log("worker","Webcodecs Video Decoder initSize"),postMessage({cmd:x,w:e.codedWidth,h:e.codedHeight}),s.isEmitInfo=!0,s.offscreenCanvas=new OffscreenCanvas(e.codedWidth,e.codedHeight),s.offscreenCanvasCtx=s.offscreenCanvas.getContext("2d")),yt(e.createImageBitmap))e.createImageBitmap().then((t=>{s.offscreenCanvasCtx.drawImage(t,0,0,e.codedWidth,e.codedHeight);let r=s.offscreenCanvas.transferToImageBitmap();postMessage({cmd:A,buffer:r,delay:yr.delay,ts:0},[r]),wt(e)}));else{s.offscreenCanvasCtx.drawImage(e,0,0,e.codedWidth,e.codedHeight);let t=s.offscreenCanvas.transferToImageBitmap();postMessage({cmd:A,buffer:t,delay:yr.delay,ts:0},[t]),wt(e)}},error:function(e){yr.debug.error("worker","VideoDecoder error",e)}}),decode:function(e,t,r){const i=e[0]>>4==1;if(s.hasInit){const r=new EncodedVideoChunk({data:e.slice(5),timestamp:t,type:i?je:We});s.decoder.decode(r)}else if(i&&0===e[1]){const t=15&e[0];postMessage({cmd:P,code:t});const r=mt(e.slice(5));yr._opt.recordType===y&&postMessage({cmd:D,buffer:e,codecId:t},[e.buffer]),s.decoder.configure(r),s.hasInit=!0}},reset(){s.hasInit=!1,s.isEmitInfo=!1,s.offscreenCanvas=null,s.offscreenCanvasCtx=null}});let pr=function(){if(cr=!0,yr.fetchStatus!==Qe||kt(yr._opt.isChrome)){if(o)try{o.abort(),o=null}catch(e){yr.debug.log("worker","abort catch",e)}}else o=null,yr.debug.log("worker",`abort() and not abortController.abort() _status is ${yr.fetchStatus} and _isChrome is ${yr._opt.isChrome}`)},mr={init(){mr.lastBuf=null,mr.vps=null,mr.sps=null,mr.pps=null,mr.streamType=null,mr.localDts=0,mr.isSendSeqHeader=!1},destroy(){mr.lastBuf=null,mr.vps=null,mr.sps=null,mr.pps=null,mr.streamType=null,mr.localDts=0,mr.isSendSeqHeader=!1},dispatch(e){const t=new Uint8Array(e);mr.extractNALu$2(t)},getNaluDts(){let e=mr.localDts;return mr.localDts=mr.localDts+40,e},getNaluAudioDts(){const e=yr._opt.sampleRate,t=yr._opt.audioBufferSize;return mr.localDts+parseInt(t/e*1e3)},extractNALu(e){let t,r,i=0,n=e.byteLength,s=0,o=[];for(;i1)for(let e=0;e{const t=$t(e);t===Ie||t===De?mr.handleVideoH264Nalu(e):Ht(t)&&i.push(e)})),1===i.length)mr.handleVideoH264Nalu(i[0]);else if(jt(i)){const e=$t(i[0]),t=Vt(e);mr.handleVideoH264NaluList(i,t,e)}else i.forEach((e=>{mr.handleVideoH264Nalu(e)}))}else if(mr.streamType===Ce)if(yr._opt.nakedFlowH265DemuxUseNew){const t=mr.handleAddNaluStartCode(e),r=mr.extractNALu(t);if(0===r.length)return void yr.debug.warn("worker","handleVideoNalu","h265 naluList.length === 0");const i=[];if(r.forEach((e=>{const t=ir(e);t===$e||t===Oe||t===Ne?mr.handleVideoH265Nalu(e):sr(t)&&i.push(e)})),1===i.length)mr.handleVideoH265Nalu(i[0]);else if(ar(i)){const e=ir(i[0]),t=or(e);mr.handleVideoH265NaluList(i,t,e)}else i.forEach((e=>{this.handleVideoH265Nalu(e)}))}else ir(e)===$e?mr.extractH265PPS(e):mr.handleVideoH265Nalu(e)},extractH264PPS(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{Gt($t(e))?mr.extractH264SEI(e):mr.handleVideoH264Nalu(e)}))},extractH265PPS(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{nr(ir(e))?mr.extractH265SEI(e):mr.handleVideoH265Nalu(e)}))},extractH264SEI(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{mr.handleVideoH264Nalu(e)}))},extractH265SEI(e){const t=mr.handleAddNaluStartCode(e);mr.extractNALu(t).forEach((e=>{mr.handleVideoH265Nalu(e)}))},handleAddNaluStartCode(e){const t=[0,0,0,1],r=new Uint8Array(e.length+t.length);return r.set(t),r.set(e,t.length),r},handleVideoH264Nalu(e){const t=$t(e);switch(t){case De:mr.sps=e;break;case Ie:mr.pps=e}if(mr.isSendSeqHeader){if(mr.sps&&mr.pps){const e=Mt({sps:mr.sps,pps:mr.pps}),t=mr.getNaluDts();yr.decode(e,{type:ee,ts:t,isIFrame:!0,cts:0}),mr.sps=null,mr.pps=null}if(Ht(t)){const r=Vt(t),i=mr.getNaluDts(),n=Nt(e,r);mr.doDecode(n,{type:ee,ts:i,isIFrame:r,cts:0})}else yr.debug.warn("work",`handleVideoH264Nalu Avc Seq Head is ${t}`)}else if(mr.sps&&mr.pps){mr.isSendSeqHeader=!0;const e=Mt({sps:mr.sps,pps:mr.pps});yr.decode(e,{type:ee,ts:0,isIFrame:!0,cts:0}),mr.sps=null,mr.pps=null}},handleVideoH264NaluList(e,t,r){if(mr.isSendSeqHeader){const i=mr.getNaluDts(),n=Ot(e.reduce(((e,t)=>{const r=Xt(e),i=Xt(t),n=new Uint8Array(r.byteLength+i.byteLength);return n.set(r,0),n.set(i,r.byteLength),n})),t);mr.doDecode(n,{type:ee,ts:i,isIFrame:t,cts:0}),yr.debug.log("worker",`handleVideoH264NaluList list size is ${e.length} package length is ${n.byteLength} isIFrame is ${t},nalu type is ${r}, dts is ${i}`)}else yr.debug.warn("worker","handleVideoH264NaluList isSendSeqHeader is false")},handleVideoH265Nalu(e){const t=ir(e);switch(t){case Ne:mr.vps=e;break;case Oe:mr.sps=e;break;case $e:mr.pps=e}if(mr.isSendSeqHeader){if(mr.vps&&mr.sps&&mr.pps){const e=er({vps:mr.vps,sps:mr.sps,pps:mr.pps}),t=mr.getNaluDts();yr.decode(e,{type:ee,ts:t,isIFrame:!0,cts:0}),mr.vps=null,mr.sps=null,mr.pps=null}if(sr(t)){const r=or(t),i=mr.getNaluDts(),n=tr(e,r);mr.doDecode(n,{type:ee,ts:i,isIFrame:r,cts:0})}else yr.debug.warn("work",`handleVideoH265Nalu HevcSeqHead is ${t}`)}else if(mr.vps&&mr.sps&&mr.pps){mr.isSendSeqHeader=!0;const e=er({vps:mr.vps,sps:mr.sps,pps:mr.pps});yr.decode(e,{type:ee,ts:0,isIFrame:!0,cts:0}),mr.vps=null,mr.sps=null,mr.pps=null}},handleVideoH265NaluList(e,t,r){if(mr.isSendSeqHeader){const i=mr.getNaluDts(),n=rr(e.reduce(((e,t)=>{const r=Xt(e),i=Xt(t),n=new Uint8Array(r.byteLength+i.byteLength);return n.set(r,0),n.set(i,r.byteLength),n})),t);mr.doDecode(n,{type:ee,ts:i,isIFrame:t,cts:0}),yr.debug.log("worker",`handleVideoH265NaluList list size is ${e.length} package length is ${n.byteLength} isIFrame is ${t},nalu type is ${r}, dts is ${i}`)}else yr.debug.warn("worker","handleVideoH265NaluList isSendSeqHeader is false")},doDecode(e,t){yr.calcNetworkDelay(t.ts),t.isIFrame&&yr.calcIframeIntervalTimestamp(t.ts),postMessage({cmd:z,type:ge,value:e.byteLength}),postMessage({cmd:z,type:_e,value:t.ts}),yr.decode(e,t)}},gr={LOG_NAME:"worker fmp4Demuxer",mp4Box:Vr.createFile(),offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){gr.mp4Box.onReady=gr.onReady,gr.mp4Box.onError=gr.onError,gr.mp4Box.onSamples=gr.onSamples},initTransportDescarmber(){gr.transportDescarmber=new Yr},_getSeqHeader(e){const t=gr.mp4Box.getTrackById(e.id);for(const e of t.mdia.minf.stbl.stsd.entries)if(e.avcC||e.hvcC){const t=new Vr.DataStream(void 0,0,Vr.DataStream.BIG_ENDIAN);let r=[];e.avcC?(e.avcC.write(t),r=[23,0,0,0,0]):(gr.isHevc=!0,dr=!0,e.hvcC.write(t),r=[28,0,0,0,0]);const i=new Uint8Array(t.buffer,8),n=new Uint8Array(r.length+i.length);return n.set(r,0),n.set(i,r.length),n}return null},onReady(e){yr.debug.log(gr.LOG_NAME,"onReady()",e);const t=e.videoTracks[0],r=e.audioTracks[0];if(t){gr.videoTrackId=t.id;const e=gr._getSeqHeader(t);e&&(yr.debug.log(gr.LOG_NAME,"seqHeader"),yr.decodeVideo(e,0,!0,0)),gr.mp4Box.setExtractionOptions(t.id)}if(r&&yr._opt.hasAudio){gr.audioTrackId=r.id;const e=r.audio||{},t=ut.indexOf(e.sample_rate),i=r.codec.replace("mp4a.40.","");gr.mp4Box.setExtractionOptions(r.id);const n=at({profile:parseInt(i,10),sampleRate:t,channel:e.channel_count});yr.debug.log(gr.LOG_NAME,"aacADTSHeader"),yr.decodeAudio(n,0)}gr.mp4Box.start()},onError(e){yr.debug.error(gr.LOG_NAME,"mp4Box onError",e)},onSamples(e,t,r){if(e===gr.videoTrackId)for(const e of r){const t=e.data,r=e.is_sync,i=1e3*e.cts/e.timescale;e.duration,e.timescale,r&&yr.calcIframeIntervalTimestamp(i);let n=null;n=gr.isHevc?rr(t,r):Ot(t,r),postMessage({cmd:z,type:ge,value:n.byteLength}),postMessage({cmd:z,type:_e,value:i}),yr.decode(n,{type:ee,ts:i,isIFrame:r,cts:0})}else if(e===gr.audioTrackId){if(yr._opt.hasAudio)for(const e of r){const t=e.data,r=1e3*e.cts/e.timescale;e.duration,e.timescale;const i=new Uint8Array(t.byteLength+2);i.set([175,1],0),i.set(t,2),postMessage({cmd:z,type:me,value:i.byteLength}),yr.decode(i,{type:Q,ts:r,isIFrame:!1,cts:0})}}else yr.debug.warn(gr.LOG_NAME,"onSamples() trackId error",e)},dispatch(e){let t=e;"string"!=typeof e?"object"==typeof e?(gr.transportDescarmber&&(t=gr.transportDescarmber.transport(t)),t.buffer.fileStart=gr.offset,gr.offset+=t.byteLength,gr.mp4Box.appendBuffer(t.buffer)):yr.debug.warn(gr.LOG_NAME,"dispatch()","data is not object",e):yr.debug.warn(gr.LOG_NAME,"dispatch()","data is string",e)},destroy(){gr.mp4Box&&(gr.mp4Box.flush(),gr.mp4Box=null),gr.transportDescarmber&&(gr.transportDescarmber.destroy(),gr.transportDescarmber=null),gr.offset=0,gr.videoTrackId=null,gr.audioTrackId=null,gr.isHevc=!1}},_r={LOG_NAME:"worker mpeg4Demuxer",lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:"init",hasInitVideoCodec:!1,localDts:0,dispatch(e){const t=new Uint8Array(e);_r.extractNALu(t)},destroy(){_r.lastBuffer=new Uint8Array(0),_r.parsedOffset=0,_r.firstStartCodeOffset=0,_r.secondStartCodeOffset=0,_r.state="init",_r.hasInitVideoCodec=!1,_r.localDts=0},extractNALu(e){if(!e||e.byteLength<1)return void yr.debug.warn(_r.LOG_NAME,"extractNALu() buffer error",e);const t=new Uint8Array(_r.lastBuffer.length+e.length);for(t.set(_r.lastBuffer,0),t.set(new Uint8Array(e),_r.lastBuffer.length),_r.lastBuffer=t;;){if("init"===_r.state){let e=!1;for(;_r.lastBuffer.length-_r.parsedOffset>=4;)if(0===_r.lastBuffer[_r.parsedOffset])if(0===_r.lastBuffer[_r.parsedOffset+1])if(1===_r.lastBuffer[_r.parsedOffset+2]){if(182===_r.lastBuffer[_r.parsedOffset+3]){_r.state="findFirstStartCode",_r.firstStartCodeOffset=_r.parsedOffset,_r.parsedOffset+=4,e=!0;break}_r.parsedOffset++}else _r.parsedOffset++;else _r.parsedOffset++;else _r.parsedOffset++;if(e)continue;break}if("findFirstStartCode"===_r.state){let e=!1;for(;_r.lastBuffer.length-_r.parsedOffset>=4;)if(0===_r.lastBuffer[_r.parsedOffset])if(0===_r.lastBuffer[_r.parsedOffset+1])if(1===_r.lastBuffer[_r.parsedOffset+2]){if(182===_r.lastBuffer[_r.parsedOffset+3]){_r.state="findSecondStartCode",_r.secondStartCodeOffset=_r.parsedOffset,_r.parsedOffset+=4,e=!0;break}_r.parsedOffset++}else _r.parsedOffset++;else _r.parsedOffset++;else _r.parsedOffset++;if(e)continue;break}if("findSecondStartCode"===_r.state){if(!(_r.lastBuffer.length-_r.parsedOffset>0))break;{let e,t,r=192&_r.lastBuffer[_r.parsedOffset];e=0==r?_r.secondStartCodeOffset-14:_r.secondStartCodeOffset;let i=0==(192&_r.lastBuffer[_r.firstStartCodeOffset+4]);if(i){if(_r.firstStartCodeOffset-14<0)return void yr.debug.warn(_r.LOG_NAME,"firstStartCodeOffset -14 is",_r.firstStartCodeOffset-14);_r.hasInitVideoCodec||(_r.hasInitVideoCodec=!0,yr.debug.log(_r.LOG_NAME,"setCodec"),br.setCodec(Ae,"")),t=_r.lastBuffer.subarray(_r.firstStartCodeOffset-14,e)}else t=_r.lastBuffer.subarray(_r.firstStartCodeOffset,e);let n=_r.getNaluDts();_r.hasInitVideoCodec?(postMessage({cmd:z,type:ge,value:t.byteLength}),postMessage({cmd:z,type:_e,value:n}),br.decode(t,i?1:0,n)):yr.debug.warn(_r.LOG_NAME,"has not init video codec"),_r.lastBuffer=_r.lastBuffer.subarray(e),_r.firstStartCodeOffset=0==r?14:0,_r.parsedOffset=_r.firstStartCodeOffset+4,_r.state="findFirstStartCode"}}}},getNaluDts(){let e=_r.localDts;return _r.localDts=_r.localDts+40,e}},yr={isPlayer:!0,isPlayback:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:Je,_opt:fr(),mp3Demuxer:null,startStreamRateAndStatsInterval:function(){yr.stopStreamRateAndStatsInterval(),d=setInterval((()=>{l&&l(0);const e=JSON.stringify({demuxBufferDelay:yr.getVideoBufferLength(),audioDemuxBufferDelay:yr.getAudioBufferLength(),flvBufferByteLength:yr.getFlvBufferLength(),netBuf:yr.networkDelay||0,pushLatestDelay:yr.pushLatestDelay||0,isStreamTsMoreThanLocal:Ke});postMessage({cmd:z,type:ve,value:e})}),1e3)},stopStreamRateAndStatsInterval:function(){d&&(clearInterval(d),d=null)},useOffscreen:function(){return yr._opt.useOffscreen&&"undefined"!=typeof OffscreenCanvas},getDelay:function(e,t){if(!e||yr._opt.hasVideo&&!Ye)return-1;if(t===Q)return yr.delay;if(yr.preDelayTimestamp&&yr.preDelayTimestamp>e)return yr.preDelayTimestamp-e>1e3&&yr.debug.warn("worker",`getDelay() and preDelayTimestamp is ${yr.preDelayTimestamp} > timestamp is ${e} more than ${yr.preDelayTimestamp-e}ms and return ${yr.delay}`),yr.preDelayTimestamp=e,yr.delay;if(yr.firstTimestamp){if(e){const t=Date.now()-yr.startTimestamp,r=e-yr.firstTimestamp;t>=r?(Ke=!1,yr.delay=t-r):(Ke=!0,yr.delay=r-t)}}else yr.firstTimestamp=e,yr.startTimestamp=Date.now(),yr.delay=-1;return yr.preDelayTimestamp=e,yr.delay},getDelayNotUpdateDelay:function(e,t){if(!e||yr._opt.hasVideo&&!Ye)return-1;if(t===Q)return yr.pushLatestDelay;if(yr.preDelayTimestamp&&yr.preDelayTimestamp-e>1e3)return yr.debug.warn("worker",`getDelayNotUpdateDelay() and preDelayTimestamp is ${yr.preDelayTimestamp} > timestamp is ${e} more than ${yr.preDelayTimestamp-e}ms and return -1`),-1;if(yr.firstTimestamp){let t=-1;if(e){const r=Date.now()-yr.startTimestamp,i=e-yr.firstTimestamp;r>=i?(Ke=!1,t=r-i):(Ke=!0,t=i-r)}return t}return-1},resetDelay:function(){yr.firstTimestamp=null,yr.startTimestamp=null,yr.delay=-1,yr.dropping=!1},resetAllDelay:function(){yr.resetDelay(),yr.preDelayTimestamp=null},doDecode:function(e){yr._opt.isEmitSEI&&e.type===ee&&yr.isWorkerFetch&&yr.findSei(e.payload,e.ts),yr._opt.useWCS&&yr.useOffscreen()&&e.type===ee&&s.decode?s.decode(e.payload,e.ts,e.cts):e.decoder.decode(e.payload,e.ts,e.isIFrame,e.cts)},decodeNext(e){if(0===i.length)return;const t=e.ts,n=i[0],s=e.type===ee&&xt(e.payload);if(kt(r))s&&(yr.debug.log("worker",`decode data type is ${e.type} and\n ts is ${t} next data type is ${n.type} ts is ${n.ts}\n isVideoSqeHeader is ${s}`),i.shift(),yr.doDecode(n));else{const r=n.ts-t,o=n.type===Q&&e.type===ee;(r<=20||o||s)&&(yr.debug.log("worker",`decode data type is ${e.type} and\n ts is ${t} next data type is ${n.type} ts is ${n.ts}\n diff is ${r} and isVideoAndNextAudio is ${o} and isVideoSqeHeader is ${s}`),i.shift(),yr.doDecode(n))}},init:function(){yr.debug.log("worker","init and opt is",JSON.stringify(yr._opt));const e=yr._opt.playType===g,t=yr._opt.playType===_;if(mr.init(),yr.isPlayer=e,yr.isPlayback=t,yr.isPlaybackCacheBeforeDecodeForFpsRender())yr.debug.log("worker","playback and playbackIsCacheBeforeDecodeForFpsRender is true");else{const t=()=>{let t=null;if(i.length){if(yr.isPushDropping)return void yr.debug.warn("worker",`loop() isPushDropping is true and bufferList length is ${i.length}`);if(yr.dropping){for(t=i.shift(),yr.debug.warn("worker",`loop() dropBuffer is dropping and isIFrame ${t.isIFrame} and delay is ${yr.delay} and bufferlist is ${i.length}`);!t.isIFrame&&i.length;)t=i.shift();const e=yr.getDelayNotUpdateDelay(t.ts,t.type);t.isIFrame&&e<=yr.getNotDroppingDelayTs()&&(yr.debug.log("worker","loop() is dropping = false, is iFrame"),yr.dropping=!1,yr.doDecode(t),yr.decodeNext(t))}else if(yr.isPlayback||yr.isPlayUseMSE())for(;i.length;)t=i.shift(),yr.doDecode(t);else if(t=i[0],-1===yr.getDelay(t.ts,t.type))yr.debug.log("worker","loop() common dumex delay is -1 ,data.ts is",t.ts),i.shift(),yr.doDecode(t),yr.decodeNext(t);else if(yr.delay>yr._opt.videoBuffer+yr._opt.videoBufferDelay&&e)yr.hasIframeInBufferList()?(yr.debug.log("worker",`delay is ${yr.delay}, set dropping is true`),yr.resetAllDelay(),yr.dropping=!0,postMessage({cmd:N})):(i.shift(),yr.doDecode(t),yr.decodeNext(t));else for(;i.length;){if(t=i[0],!(yr.getDelay(t.ts,t.type)>yr._opt.videoBuffer)){yr.delay<0&&yr.debug.warn("worker",`loop() do not decode and delay is ${yr.delay}, bufferList is ${i.length}`);break}i.shift(),yr.doDecode(t)}}else-1!==yr.delay&&yr.debug.log("worker","loop() bufferList is empty and reset delay"),yr.resetAllDelay()};yr.stopId=setInterval((()=>{let e=(new Date).getTime();Xe||(Xe=e);const r=e-Xe;r>100&&yr.debug.warn("worker",`loop demux diff time is ${r}`),t(),Xe=(new Date).getTime()}),20)}kt(yr._opt.checkFirstIFrame)&&(Ye=!0)},playbackCacheLoop:function(){yr.stopId&&(clearInterval(yr.stopId),yr.stopId=null);const e=()=>{let e=null;i.length&&(e=i.shift(),yr.doDecode(e))};e();const t=Math.ceil(1e3/(yr.streamFps*yr._opt.playbackRate));yr.debug.log("worker",`playbackCacheLoop fragDuration is ${t}, streamFps is ${yr.streamFps}, streamAudioFps is ${yr.streamAudioFps} ,streamVideoFps is ${yr.streamVideoFps} playbackRate is ${yr._opt.playbackRate}`),yr.stopId=setInterval(e,t)},close:function(){if(yr.debug.log("worker","close"),yr.isDestroyed=!0,pr(),!a||1!==a.readyState&&2!==a.readyState?a&&yr.debug.log("worker",`close() and socket.readyState is ${a.readyState}`):(cr=!0,a.close(1e3,"Client disconnecting")),a=null,yr.stopStreamRateAndStatsInterval(),yr.stopId&&(clearInterval(yr.stopId),yr.stopId=null),yr.mp3Demuxer&&(yr.mp3Demuxer.destroy(),yr.mp3Demuxer=null),yr.writableStream&&kt(yr.writableStream.locked)&&yr.writableStream.close().catch((e=>{yr.debug.log("worker","close() and writableStream.close() error",e)})),yr.writableStream=null,vr)try{vr.clear&&vr.clear(),vr=null}catch(e){yr.debug.warn("worker","close() and audioDecoder.clear error",e)}if(br)try{br.clear&&br.clear(),br=null}catch(e){yr.debug.warn("worker","close() and videoDecoder.clear error",e)}l=null,Xe=null,Ke=!1,s&&(s.reset&&s.reset(),s=null),yr.firstTimestamp=null,yr.startTimestamp=null,yr.networkDelay=0,yr.streamFps=null,yr.streamAudioFps=null,yr.streamVideoFps=null,yr.delay=-1,yr.pushLatestDelay=-1,yr.preDelayTimestamp=null,yr.dropping=!1,yr.isPushDropping=!1,yr.isPlayer=!0,yr.isPlayback=!1,yr.isWorkerFetch=!1,yr._opt=fr(),yr.webglObj&&(yr.webglObj.destroy(),yr.offscreenCanvas.removeEventListener("webglcontextlost",yr.onOffscreenCanvasWebglContextLost),yr.offscreenCanvas.removeEventListener("webglcontextrestored",yr.onOffscreenCanvasWebglContextRestored),yr.offscreenCanvas=null,yr.offscreenCanvasGL=null,yr.offscreenCanvasCtx=null),i=[],n=[],u=null,v=null,b=null,S=!1,Ge=!1,Ye=!1,qt=!1,Qt=!1,lr=!1,dr=null,ur=null,Ct=[],Ft=0,It=0,ot=null,ft=null,Lt=null,Rt=null,hr=null,Wt=0,Yt=0,Tt=null,Bt=null,yr.fetchStatus=Je,mr.destroy(),gr.destroy(),_r.destroy(),postMessage({cmd:j})},pushBuffer:function(e,t){if(t.type===Q&<(e)){if(yr.debug.log("worker",`pushBuffer audio ts is ${t.ts}, isAacCodecPacket is true`),yr._opt.isRecordTypeFlv){const t=new Uint8Array(e);postMessage({cmd:K,buffer:t},[t.buffer])}yr.decodeAudio(e,t.ts)}else if(t.type===ee&&t.isIFrame&&xt(e)){if(yr.debug.log("worker",`pushBuffer video ts is ${t.ts}, isVideoSequenceHeader is true`),yr._opt.isRecordTypeFlv){const t=new Uint8Array(e);postMessage({cmd:X,buffer:t},[t.buffer])}yr.decodeVideo(e,t.ts,t.isIFrame,t.cts)}else{if(yr._opt.isRecording)if(yr._opt.isRecordTypeFlv){const r=new Uint8Array(e);postMessage({cmd:Z,type:t.type,buffer:r,ts:t.ts},[r.buffer])}else if(yr._opt.recordType===y)if(t.type===ee){const r=new Uint8Array(e).slice(5);postMessage({cmd:I,buffer:r,isIFrame:t.isIFrame,ts:t.ts,cts:t.cts},[r.buffer])}else if(t.type===Q&&yr._opt.isWasmMp4){const r=new Uint8Array(e),i=dt(r)?r.slice(2):r.slice(1);postMessage({cmd:B,buffer:i,ts:t.ts},[i.buffer])}if(yr.isPlayer&&Wt>0&&Rt>0&&t.type===ee){const e=t.ts-Rt,r=Wt+Wt/2;e>r&&yr.debug.log("worker",`pushBuffer video\n ts is ${t.ts}, preTimestamp is ${Rt},\n diff is ${e} and preTimestampDuration is ${Wt} and maxDiff is ${r}\n maybe trigger black screen or flower screen\n `)}if(yr.isPlayer&&Rt>0&&t.type===ee&&t.tsw&&(yr.debug.warn("worker",`pushBuffer,\n preTimestamp is ${Rt}, options.ts is ${t.ts},\n diff is ${Rt-t.ts} more than 3600000,\n and resetAllDelay`),yr.resetAllDelay()),yr.isPlayer&&t.ts<=Rt&&Rt>0&&t.type===ee&&(yr.debug.warn("worker",`pushBuffer,\n options.ts is ${t.ts} less than (or equal) preTimestamp is ${Rt} and\n payloadBufferSize is ${e.byteLength} and prevPayloadBufferSize is ${Yt}`),yr._opt.isDropSameTimestampGop&&Ye)){const e=yr.hasIframeInBufferList(),t=kt(yr.isPushDropping);return yr.debug.log("worker",`pushBuffer, isDropSameTimestampGop is true and\n hasIframe is ${e} and isNotPushDropping is ${t} and next dropBuffer`),void(e&&t?yr.dropBuffer$2():(yr.clearBuffer(!0),At(yr._opt.checkFirstIFrame)&&At(r)&&postMessage({cmd:J})))}if(yr.isPlayer&&Ye){const e=yr._opt.videoBuffer+yr._opt.videoBufferDelay,r=yr.getDelayNotUpdateDelay(t.ts,t.type);yr.pushLatestDelay=r,r>e&&yr.delay0&&yr.hasIframeInBufferList()&&!1===yr.isPushDropping&&(yr.debug.log("worker",`pushBuffer(), pushLatestDelay is ${r} more than ${e} and decoder.delay is ${yr.delay} and has iIframe and next decoder.dropBuffer$2()`),yr.dropBuffer$2())}if(yr.isPlayer&&t.type===ee&&(Rt>0&&(Wt=t.ts-Rt),Yt=e.byteLength,Rt=t.ts),t.type===Q?i.push({ts:t.ts,payload:e,decoder:{decode:yr.decodeAudio},type:Q,isIFrame:!1}):t.type===ee&&i.push({ts:t.ts,cts:t.cts,payload:e,decoder:{decode:yr.decodeVideo},type:ee,isIFrame:t.isIFrame}),yr.isPlaybackCacheBeforeDecodeForFpsRender()&&(gt(yr.streamVideoFps)||gt(yr.streamAudioFps))){let e=yr.streamVideoFps,t=yr.streamAudioFps;if(gt(yr.streamVideoFps)&&(e=Et(i,ee),e&&(yr.streamVideoFps=e,postMessage({cmd:$,value:yr.streamVideoFps}),yr.streamFps=t?e+t:e,kt(yr._opt.hasAudio)&&(yr.debug.log("worker","playbackCacheBeforeDecodeForFpsRender, _opt.hasAudio is false and set streamAudioFps is 0"),yr.streamAudioFps=0),yr.playbackCacheLoop())),gt(yr.streamAudioFps)&&(t=Et(i,Q),t&&(yr.streamAudioFps=t,yr.streamFps=e?e+t:t,yr.playbackCacheLoop())),gt(yr.streamVideoFps)&>(yr.streamAudioFps)){const r=i.map((e=>({type:e.type,ts:e.ts})));yr.debug.log("worker",`playbackCacheBeforeDecodeForFpsRender, calc streamAudioFps is ${t}, streamVideoFps is ${e}, bufferListLength is ${i.length}, and ts list is ${JSON.stringify(r)}`)}const r=yr.getAudioBufferLength()>0,n=r?60:40;i.length>=n&&(yr.debug.warn("worker",`playbackCacheBeforeDecodeForFpsRender, bufferListLength is ${i.length} more than ${n}, and hasAudio is ${r} an set streamFps is 25`),yr.streamVideoFps=25,postMessage({cmd:$,value:yr.streamVideoFps}),r?(yr.streamAudioFps=25,yr.streamFps=yr.streamVideoFps+yr.streamAudioFps):yr.streamFps=yr.streamVideoFps,yr.playbackCacheLoop())}}},getVideoBufferLength(){let e=0;return i.forEach((t=>{t.type===ee&&(e+=1)})),e},hasIframeInBufferList:()=>i.some((e=>e.type===ee&&e.isIFrame)),isAllIframeInBufferList(){const e=yr.getVideoBufferLength();let t=0;return i.forEach((e=>{e.type===ee&&e.isIFrame&&(t+=1)})),e===t},getNotDroppingDelayTs:()=>yr._opt.videoBuffer+yr._opt.videoBufferDelay/2,getAudioBufferLength(){let e=0;return i.forEach((t=>{t.type===Q&&(e+=1)})),e},getFlvBufferLength(){let e=0;return u&&u.buffer&&(e=u.buffer.byteLength),yr._opt.isNakedFlow&&mr.lastBuf&&(e=mr.lastBuf.byteLength),e},fetchStream:function(e,t){yr.debug.log("worker","fetchStream, url is "+e,"options:",JSON.stringify(t)),yr.isWorkerFetch=!0,t.isFlv?yr._opt.isFlv=!0:t.isFmp4?yr._opt.isFmp4=!0:t.isMpeg4?yr._opt.isMpeg4=!0:t.isNakedFlow&&(yr._opt.isNakedFlow=!0),l=pt((e=>{postMessage({cmd:z,type:pe,value:e})})),yr.startStreamRateAndStatsInterval(),t.isFmp4&&(gr.listenMp4Box(),yr._opt.isFmp4Private&&gr.initTransportDescarmber()),t.protocol===f?(u=new Pt(yr.demuxFlv()),fetch(e,{signal:o.signal}).then((e=>{if(At(cr))return yr.debug.log("worker","request abort and run res.body.cancel()"),yr.fetchStatus=Je,void e.body.cancel();if(!St(e))return yr.debug.warn("worker",`fetch response status is ${e.status} and ok is ${e.ok} and emit error and next abort()`),pr(),void postMessage({cmd:z,type:Ee.fetchError,value:`fetch response status is ${e.status} and ok is ${e.ok}`});if(postMessage({cmd:z,type:ye}),bt())yr.writableStream=new WritableStream({write:e=>o&&o.signal&&o.signal.aborted?(yr.debug.log("worker","writableStream write() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et)):At(cr)?(yr.debug.log("worker","writableStream write() and requestAbort is true so return"),void(yr.fetchStatus=et)):(yr.fetchStatus=Qe,l(e.byteLength),void(t.isFlv?u.write(e):t.isFmp4?yr.demuxFmp4(e):t.isMpeg4&&yr.demuxMpeg4(e))),close:()=>{yr.fetchStatus=et,u=null,pr(),postMessage({cmd:z,type:fe,value:p})},abort:e=>{if(o&&o.signal&&o.signal.aborted)return yr.debug.log("worker","writableStream abort() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et);u=null,e.name!==qe&&(pr(),postMessage({cmd:z,type:Ee.fetchError,value:e.toString()}))}}),e.body.pipeTo(yr.writableStream);else{const r=e.body.getReader(),i=()=>{r.read().then((e=>{let{done:r,value:n}=e;return r?(yr.fetchStatus=et,u=null,pr(),void postMessage({cmd:z,type:fe,value:p})):o&&o.signal&&o.signal.aborted?(yr.debug.log("worker","fetchNext().then() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et)):At(cr)?(yr.debug.log("worker","fetchNext().then() and requestAbort is true so return"),void(yr.fetchStatus=et)):(yr.fetchStatus=Qe,l(n.byteLength),t.isFlv?u.write(n):t.isFmp4?yr.demuxFmp4(n):t.isMpeg4&&yr.demuxMpeg4(n),void i())})).catch((e=>{if(o&&o.signal&&o.signal.aborted)return yr.debug.log("worker","fetchNext().catch() and abortController.signal.aborted is true so return"),void(yr.fetchStatus=et);u=null,e.name!==qe&&(pr(),postMessage({cmd:z,type:Ee.fetchError,value:e.toString()}))}))};i()}})).catch((e=>{o&&o.signal&&o.signal.aborted?yr.debug.log("worker","fetch().catch() and abortController.signal.aborted is true so return"):e.name!==qe&&(pr(),postMessage({cmd:z,type:Ee.fetchError,value:e.toString()}),u=null)}))):t.protocol===c&&(t.isFlv&&(u=new Pt(yr.demuxFlv())),a=new WebSocket(e),a.binaryType="arraybuffer",a.onopen=()=>{yr.debug.log("worker","fetchStream, WebsocketStream socket open"),postMessage({cmd:z,type:ye}),postMessage({cmd:z,type:we})},a.onclose=e=>{yr.debug.log("worker",`fetchStream, WebsocketStream socket close and code is ${e.code}`),1006===e.code&&yr.debug.error("worker",`fetchStream, WebsocketStream socket close abnormally and code is ${e.code}`),At(cr)?yr.debug.log("worker","fetchStream, WebsocketStream socket close and requestAbort is true so return"):(u=null,postMessage({cmd:z,type:fe,value:m}))},a.onerror=e=>{yr.debug.error("worker","fetchStream, WebsocketStream socket error",e),u=null,postMessage({cmd:z,type:Ee.websocketError,value:e.isTrusted?"websocket user aborted":"websocket error"})},a.onmessage=e=>{l(e.data.byteLength),t.isFlv?u.write(e.data):t.isFmp4?yr.demuxFmp4(e.data):t.isMpeg4?yr.demuxMpeg4(e.data):yr._opt.isNakedFlow?yr.demuxNakedFlow(e.data):yr.demuxM7s(e.data)})},demuxFlv:function*(){yield 9;const e=new ArrayBuffer(4),t=new Uint8Array(e),r=new Uint32Array(e);for(;;){t[3]=0;const e=yield 15,i=e[4];t[0]=e[7],t[1]=e[6],t[2]=e[5];const n=r[0];t[0]=e[10],t[1]=e[9],t[2]=e[8],t[3]=e[11];let s=r[0];const o=(yield n).slice();switch(i){case te:if(o.byteLength>0){let e=o;At(yr._opt.m7sCryptoAudio)&&(e=yr.cryptoPayloadAudio(o)),yr.decode(e,{type:Q,ts:s})}else yr.debug.warn("worker",`demuxFlv() type is audio and payload.byteLength is ${o.byteLength} and return`);break;case re:if(o.byteLength>=6){const e=o[0];if(yr._isEnhancedH265Header(e))yr._decodeEnhancedH265Video(o,s);else{o[0];const e=o[0]>>4===Ze;if(e&&xt(o)&&null===dr){const e=15&o[0];dr=e===xe,ur=Zt(o,dr),yr.debug.log("worker",`demuxFlv() isVideoSequenceHeader is true and isHevc is ${dr} and nalUnitSize is ${ur}`)}e&&yr.calcIframeIntervalTimestamp(s),yr.isPlayer&&yr.calcNetworkDelay(s),r[0]=o[4],r[1]=o[3],r[2]=o[2],r[3]=0;let t=r[0],i=yr.cryptoPayload(o,e);yr.decode(i,{type:ee,ts:s,isIFrame:e,cts:t})}}else yr.debug.warn("worker",`demuxFlv() type is video and payload.byteLength is ${o.byteLength} and return`);break;case ie:postMessage({cmd:q,buffer:o},[o.buffer]);break;default:yr.debug.log("worker",`demuxFlv() type is ${i}`)}}},decode:function(e,t){t.type===Q?yr._opt.hasAudio&&(postMessage({cmd:z,type:me,value:e.byteLength}),yr.isPlayer?yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts}):yr.isPlayback&&(yr.isPlaybackCacheBeforeDecodeForFpsRender(),yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts}))):t.type===ee&&yr._opt.hasVideo&&(postMessage({cmd:z,type:ge,value:e.byteLength}),postMessage({cmd:z,type:_e,value:t.ts}),yr.isPlayer?yr.pushBuffer(e,{type:t.type,ts:t.ts,isIFrame:t.isIFrame,cts:t.cts}):yr.isPlayback&&(yr.isPlaybackOnlyDecodeIFrame()?t.isIFrame&&yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts,isIFrame:t.isIFrame}):(yr.isPlaybackCacheBeforeDecodeForFpsRender(),yr.pushBuffer(e,{type:t.type,ts:t.ts,cts:t.cts,isIFrame:t.isIFrame}))))},cryptoPayload:function(e,t){let r=e;return yr._opt.isM7sCrypto?yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?r=Gr(e,yr._opt.cryptoKey,yr._opt.cryptoIV,dr):yr.debug.error("worker",`isM7sCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`):yr._opt.isSm4Crypto?yr._opt.sm4CryptoKey&&t?r=di(e,yr._opt.sm4CryptoKey):yr._opt.sm4CryptoKey||yr.debug.error("worker","isSm4Crypto opt.sm4CryptoKey is null"):yr._opt.isXorCrypto&&(yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?r=pi(e,yr._opt.cryptoKey,yr._opt.cryptoIV,dr):yr.debug.error("worker",`isXorCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`)),r},cryptoPayloadAudio:function(e){let t=e;return yr._opt.isM7sCrypto&&(yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength>0&&yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength>0?e[0]>>4===Te&&(t=Hr(e,yr._opt.cryptoKey,yr._opt.cryptoIV)):yr.debug.error("worker",`isM7sCrypto cryptoKey.length is ${yr._opt.cryptoKey&&yr._opt.cryptoKey.byteLength} or cryptoIV.length is ${yr._opt.cryptoIV&&yr._opt.cryptoIV.byteLength} null`)),t},setCodecAudio:function(e,t){const r=e[0]>>4,i=e[0]>>1&1;if(hr=r===Te?i?16:8:0===i?8:16,vr&&vr.setCodec)if(lt(e)||r===Be||r===Fe||r===Pe){yr.debug.log("worker",`setCodecAudio: init audio codec, codeId is ${r}`);const i=r===Te?e.slice(2):new Uint8Array(0);vr.setCodec(r,yr._opt.sampleRate,i),postMessage({cmd:F,buffer:i},[i.buffer]),Ge=!0,r!==Te&&(r===Pe?(yr.mp3Demuxer||(yr.mp3Demuxer=new hi(yr),yr.mp3Demuxer.on("data",((e,t)=>{vr.decode(e,t)}))),yr.mp3Demuxer.dispatch(e.slice(1),t)):vr.decode(e.slice(1),t));{const e=Number("1")||1;setTimeout((()=>{yr.debug.error("worker","jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),yr.close(),postMessage({cmd:O})}),60*e*60*1e3)}}else yr.debug.warn("worker","setCodecAudio: hasInitAudioCodec is false, codecId is ",r);else yr.debug.error("worker","setCodecAudio: audioDecoder or audioDecoder.setCodec is null")},decodeAudio:function(e,t){if(yr.isDestroyed)yr.debug.log("worker","decodeAudio, decoder is destroyed and return");else if(At(r)&&At(yr._opt.mseDecodeAudio))postMessage({cmd:R,payload:e,ts:t,cts:t},[e.buffer]);else{const r=e[0]>>4;Ge?r===Pe?yr.mp3Demuxer.dispatch(e.slice(1),t):vr.decode(r===Te?e.slice(2):e.slice(1),t):yr.setCodecAudio(e,t)}},setCodecVideo:function(e){const t=15&e[0];if(br&&br.setCodec)if(xt(e))if(t===Ue||t===xe){yr.debug.log("worker",`setCodecVideo: init video codec , codecId is ${t}`);const r=e.slice(5);if(t===Ue&&yr._opt.useSIMD){const e=zt(r);if(e.codecWidth>E||e.codecHeight>E)return postMessage({cmd:V}),void yr.debug.warn("worker",`setCodecVideo: SIMD H264 decode video width is too large, width is ${e.codecWidth}, height is ${e.codecHeight}`)}S=!0,br.setCodec(t,r),yr._opt.recordType===y&&postMessage({cmd:D,buffer:e,codecId:t},[e.buffer])}else yr.debug.warn("worker",`setCodecVideo: hasInitVideoCodec is false, codecId is ${t} is not H264 or H265`);else yr.debug.warn("worker",`decodeVideo: hasInitVideoCodec is false, codecId is ${t} and frameType is ${e[0]>>4} and packetType is ${e[1]}`);else yr.debug.error("worker","setCodecVideo: videoDecoder or videoDecoder.setCodec is null")},decodeVideo:function(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(yr.isDestroyed)yr.debug.log("worker","decodeVideo, decoder is destroyed and return");else if(At(r))postMessage({cmd:L,payload:e,isIFrame:i,ts:t,cts:n,delay:yr.delay},[e.buffer]);else if(S)if(!Ye&&i&&(Ye=!0),Ye){if(i&&xt(e)){const t=15&e[0];let r={};t===Ue?r=zt(e.slice(5)):t===xe&&(r=Jt(e)),r.codecWidth&&r.codecHeight&&v&&b&&(r.codecWidth!==v||r.codecHeight!==b)&&(yr.debug.warn("worker",`\n decodeVideo: video width or height is changed,\n old width is ${v}, old height is ${b},\n new width is ${r.codecWidth}, new height is ${r.codecHeight},\n and emit change event`),Qt=!0,postMessage({cmd:G}))}if(Qt)return void yr.debug.warn("worker","decodeVideo: video width or height is changed, and return");if(lr)return void yr.debug.warn("worker","decodeVideo: simd decode error, and return");if(xt(e))return void yr.debug.warn("worker","decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void yr.debug.warn("worker",`decodeVideo and payload is too small , payload length is ${e.byteLength}`);const r=e.slice(5);br.decode(r,i?1:0,t)}else yr.debug.log("worker","decodeVideo first frame is not iFrame");else yr.setCodecVideo(e)},clearBuffer:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];yr.debug.log("worker",`clearBuffer,bufferList length is ${i.length}, need clear is ${e}`),e&&(i=[]),yr.isPlayer&&(yr.resetAllDelay(),At(yr._opt.checkFirstIFrame)&&(yr.dropping=!0,postMessage({cmd:N}))),At(yr._opt.checkFirstIFrame)&&kt(r)&&(Ye=!1)},dropBuffer$2:function(){if(i.length>0){let e=i.findIndex((e=>At(e.isIFrame)&&e.type===ee));if(yr.isAllIframeInBufferList())for(let t=0;t=yr.getNotDroppingDelayTs()){yr.debug.log("worker",`dropBuffer$2() isAllIframeInBufferList() is true, and index is ${t} and tempDelay is ${n} and notDroppingDelayTs is ${yr.getNotDroppingDelayTs()}`),e=t;break}}if(e>=0){yr.isPushDropping=!0,postMessage({cmd:N});const t=i.length;i=i.slice(e);const r=i.shift();yr.resetAllDelay(),yr.getDelay(r.ts,r.type),yr.doDecode(r),yr.isPushDropping=!1,yr.debug.log("worker",`dropBuffer$2() iFrameIndex is ${e},and old bufferList length is ${t} ,new bufferList is ${i.length} and new delay is ${yr.delay} `)}else yr.isPushDropping=!1}0===i.length&&(yr.isPushDropping=!1)},demuxM7s:function(e){const t=new DataView(e),r=t.getUint32(1,!1),i=t.getUint8(0),n=new ArrayBuffer(4),s=new Uint32Array(n);switch(i){case Q:yr.decode(new Uint8Array(e,5),{type:Q,ts:r});break;case ee:if(t.byteLength>=11){const i=new Uint8Array(e,5),n=i[0];if(yr._isEnhancedH265Header(n))yr._decodeEnhancedH265Video(i,r);else{const e=t.getUint8(5)>>4==1;if(e&&(yr.calcIframeIntervalTimestamp(r),xt(i)&&null===dr)){const e=15&i[0];dr=e===xe}yr.isPlayer&&yr.calcNetworkDelay(r),s[0]=i[4],s[1]=i[3],s[2]=i[2],s[3]=0;let n=s[0],o=yr.cryptoPayload(i,e);yr.decode(o,{type:ee,ts:r,isIFrame:e,cts:n})}}else yr.debug.warn("worker",`demuxM7s() type is video and arrayBuffer length is ${e.byteLength} and return`)}},demuxNakedFlow:function(e){mr.dispatch(e)},demuxFmp4:function(e){const t=new Uint8Array(e);gr.dispatch(t)},demuxMpeg4:function(e){_r.dispatch(e)},_decodeEnhancedH265Video:function(e,t){const r=e[0],i=48&r,n=15&r,s=e.slice(1,5),o=new ArrayBuffer(4),a=new Uint32Array(o),l="a"==String.fromCharCode(s[0]);if(dr=kt(l),n===rt){if(i===st){const r=e.slice(5);if(l);else{const i=new Uint8Array(5+r.length);i.set([28,0,0,0,0],0),i.set(r,5),ur=Zt(e,dr),yr.debug.log("worker",`demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is ${dr} and nalUnitSize is ${ur}`),yr.decode(i,{type:ee,ts:t,isIFrame:!0,cts:0})}}}else if(n===it){let r=e,n=0;const s=i===st;s&&yr.calcIframeIntervalTimestamp(t),l||(a[0]=e[4],a[1]=e[3],a[2]=e[2],a[3]=0,n=a[0],r=rr(e.slice(8),s),r=yr.cryptoPayload(r,s),yr.decode(r,{type:ee,ts:t,isIFrame:s,cts:n}))}else if(n===nt){const r=i===st;r&&yr.calcIframeIntervalTimestamp(t);let n=rr(e.slice(5),r);n=yr.cryptoPayload(n,r),yr.decode(n,{type:ee,ts:t,isIFrame:r,cts:0})}},_isEnhancedH265Header:function(e){return(e&tt)===tt},findSei:function(e,t){let r=4;_t(ur)&&(r=ur),Kt(e.slice(5),r).forEach((e=>{const r=dr?e[0]>>>1&63:31&e[0];(dr&&(r===Ve||r===He)||kt(dr)&&r===Re)&&postMessage({cmd:Y,buffer:e,ts:t},[e.buffer])}))},flvHasUnitTypeIDR(e,t){const r=Kt(e.slice(5));let i=!1;return r.forEach((e=>{const r=t?e[0]>>>1&63:31&e[0];(t&&(r===ze||r===Me)||kt(t)&&r===Le)&&(i=!0)})),i},calcNetworkDelay:function(e){if(!(Ye&&e>0))return;null===ot?(ot=e,ft=ht()):et?r-t:0;yr.networkDelay=i,i>yr._opt.networkDelay&&yr._opt.playType===g&&(yr.debug.warn("worker",`calcNetworkDelay now dts:${e}, start dts is ${ot} vs start is ${t},local diff is ${r} ,delay is ${i}`),postMessage({cmd:z,type:be,value:i}))},calcIframeIntervalTimestamp:function(e){null===Lt?Lt=e:Lt=yr._opt.playbackForwardMaxRateDecodeIFrame},isPlayUseMSE:function(){return yr.isPlayer&&yr._opt.useMSE&&At(r)},playbackUpdatePlaybackRate:function(){yr.clearBuffer(!0)},onOffscreenCanvasWebglContextLost:function(e){yr.debug.error("worker","handleOffscreenCanvasWebglContextLost and next try to create webgl"),e.preventDefault(),qt=!0,yr.webglObj.destroy(),yr.webglObj=null,yr.offscreenCanvasGL=null,setTimeout((()=>{yr.offscreenCanvasGL=yr.offscreenCanvas.getContext("webgl"),yr.offscreenCanvasGL&&yr.offscreenCanvasGL.getContextAttributes().stencil?(yr.webglObj=h(yr.offscreenCanvasGL,yr._opt.openWebglAlignment),qt=!1):yr.debug.error("worker","handleOffscreenCanvasWebglContextLost, stencil is false")}),500)},onOffscreenCanvasWebglContextRestored:function(e){yr.debug.log("worker","handleOffscreenCanvasWebglContextRestored"),e.preventDefault()},videoInfo:function(e,t,r){postMessage({cmd:P,code:e}),postMessage({cmd:x,w:t,h:r}),v=t,b=r,yr.useOffscreen()&&(yr.offscreenCanvas=new OffscreenCanvas(t,r),yr.offscreenCanvasGL=yr.offscreenCanvas.getContext("webgl"),yr.webglObj=h(yr.offscreenCanvasGL,yr._opt.openWebglAlignment),yr.offscreenCanvas.addEventListener("webglcontextlost",yr.onOffscreenCanvasWebglContextLost,!1),yr.offscreenCanvas.addEventListener("webglcontextrestored",yr.onOffscreenCanvasWebglContextRestored,!1))},audioInfo:function(e,t,r){postMessage({cmd:T,code:e}),postMessage({cmd:C,sampleRate:t,channels:r,depth:hr}),It=r},yuvData:function(t,r){if(yr.isDestroyed)return void yr.debug.log("worker","yuvData, decoder is destroyed and return");const i=v*b*3/2;let n=e.HEAPU8.subarray(t,t+i),s=new Uint8Array(n);if(Tt=null,yr.useOffscreen())try{if(qt)return;yr.webglObj.renderYUV(v,b,s);let e=yr.offscreenCanvas.transferToImageBitmap();postMessage({cmd:A,buffer:e,delay:yr.delay,ts:r},[e])}catch(e){yr.debug.error("worker","yuvData, transferToImageBitmap error is",e)}else postMessage({cmd:A,output:s,delay:yr.delay,ts:r},[s.buffer])},pcmData:function(e,r,i){if(yr.isDestroyed)return void yr.debug.log("worker","pcmData, decoder is destroyed and return");let s=r,o=[],a=0,l=yr._opt.audioBufferSize;for(let r=0;r<2;r++){let i=t.HEAPU32[(e>>2)+r]>>2;o[r]=t.HEAPF32.subarray(i,i+s)}if(Ft){if(!(s>=(r=l-Ft)))return Ft+=s,n[0]=Float32Array.of(...n[0],...o[0]),void(2==It&&(n[1]=Float32Array.of(...n[1],...o[1])));Ct[0]=Float32Array.of(...n[0],...o[0].subarray(0,r)),2==It&&(Ct[1]=Float32Array.of(...n[1],...o[1].subarray(0,r))),postMessage({cmd:k,buffer:Ct,ts:i},Ct.map((e=>e.buffer))),a=r,s-=r}for(Ft=s;Ft>=l;Ft-=l)Ct[0]=o[0].slice(a,a+=l),2==It&&(Ct[1]=o[1].slice(a-l,a)),postMessage({cmd:k,buffer:Ct,ts:i},Ct.map((e=>e.buffer)));Ft&&(n[0]=o[0].slice(a),2==It&&(n[1]=o[1].slice(a)))},errorInfo:function(e){null===Tt&&(Tt=ht());const t=ht(),r=ct(Bt>0?2*Bt:5e3,1e3,5e3),i=t-Tt;i>r&&(yr.debug.warn("worker",`errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is ${Bt} and diff is ${i} and maxDiff is ${r}\n and replay`),lr=!0,postMessage({cmd:H}))},sendWebsocketMessage:function(e){a?a.readyState===Se?a.send(e):yr.debug.error("worker","socket is not open"):yr.debug.error("worker","socket is null")},timeEnd:function(){yr.debug.error("worker","jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),yr.close(),postMessage({cmd:O})},postStreamToMain(e,t){postMessage({cmd:W,type:t,buffer:e},[e.buffer])}};yr.debug=new Dt(yr);let vr=null;t.AudioDecoder&&(vr=new t.AudioDecoder(yr));let br=null;e.VideoDecoder&&(br=new e.VideoDecoder(yr)),postMessage({cmd:U}),self.onmessage=function(e){let t=e.data;switch(t.cmd){case ne:try{yr._opt=Object.assign(yr._opt,JSON.parse(t.opt))}catch(e){}yr.init();break;case se:yr.pushBuffer(t.buffer,t.options);break;case oe:yr.decodeAudio(t.buffer,t.ts);break;case ae:yr.decodeVideo(t.buffer,t.ts,t.isIFrame);break;case ue:yr.clearBuffer(t.needClear);break;case he:yr.fetchStream(t.url,JSON.parse(t.opt));break;case le:yr.close();break;case de:yr.debug.log("worker","updateConfig",t.key,t.value),yr._opt[t.key]=t.value,"playbackRate"===t.key&&(yr.playbackUpdatePlaybackRate(),yr.isPlaybackCacheBeforeDecodeForFpsRender()&&yr.playbackCacheLoop());break;case ce:yr.sendWebsocketMessage(t.message)}}}(e[1],t)}))})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).crypto$1)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r,n=t(e),s=(r="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href,async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t,n,i;(i=e).ready=new Promise(((e,r)=>{t=e,n=r})),(i=void 0!==i?i:{}).locateFile=function(e,t){return"decoder-pro.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_WASM_URL&&""!=JESSIBUCA_PRO_WASM_URL?JESSIBUCA_PRO_WASM_URL:t+e};var s,o,a,c=Object.assign({},i),u="./this.program",l="object"==typeof window,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";function p(e){return i.locateFile?i.locateFile(e,f):f+e}if(h){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href),v=m("fs"),y=m("path");f=d?y.dirname(f)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href)),s=(e,t)=>(e=Z(e)?new URL(e):y.normalize(e),v.readFileSync(e,t?void 0:"utf8")),a=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},o=function(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=Z(e)?new URL(e):y.normalize(e),v.readFile(e,n?void 0:"utf8",((e,i)=>{e?r(e):t(n?i.buffer:i)}))},!i.thisProgram&&process.argv.length>1&&(u=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),i.inspect=()=>"[Emscripten Module object]"}else(l||d)&&(d?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),r&&(f=r),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var g,_,b=i.print||console.log.bind(console),w=i.printErr||console.error.bind(console);Object.assign(i,c),c=null,i.arguments&&i.arguments,i.thisProgram&&(u=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(g=i.wasmBinary),"object"!=typeof WebAssembly&&G("no native wasm support detected");var S,E,k,I,A,C,T,x,D=!1;function B(e,t){e||G(t)}function P(){var e=_.buffer;i.HEAP8=S=new Int8Array(e),i.HEAP16=k=new Int16Array(e),i.HEAPU8=E=new Uint8Array(e),i.HEAPU16=I=new Uint16Array(e),i.HEAP32=A=new Int32Array(e),i.HEAPU32=C=new Uint32Array(e),i.HEAPF32=T=new Float32Array(e),i.HEAPF64=x=new Float64Array(e)}var M=[],F=[],U=[];function R(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)z(i.preRun.shift());ie(M)}function L(){i.noFSInit||xe.init.initialized||xe.init(),xe.ignorePermissions=!1,ie(F)}function O(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)H(i.postRun.shift());ie(U)}function z(e){M.unshift(e)}function N(e){F.unshift(e)}function H(e){U.unshift(e)}var j=0,V=null;function W(e){j++,i.monitorRunDependencies&&i.monitorRunDependencies(j)}function $(e){if(j--,i.monitorRunDependencies&&i.monitorRunDependencies(j),0==j&&V){var t=V;V=null,t()}}function G(e){i.onAbort&&i.onAbort(e),w(e="Aborted("+e+")"),D=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var q,K,X,Y="data:application/octet-stream;base64,",J=e=>e.startsWith(Y),Z=e=>e.startsWith("file://");function Q(e){if(e==q&&g)return new Uint8Array(g);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!g&&(l||d)){if("function"==typeof fetch&&!Z(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(o)return new Promise(((t,r)=>{o(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),G(e)}))}function re(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||J(t)||Z(t)||h||"function"!=typeof fetch?te(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),te(t,r,n)}))))}function ne(){var e={a:fn};function t(e,t){return pn=e.exports,_=pn.G,P(),Mt=pn.K,N(pn.H),$(),pn}if(W(),i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return re(g,q,e,(function(e){t(e.instance)})).catch(n),{}}i.locateFile?J(q="decoder-pro.wasm")||(q=p(q)):q=new URL("decoder-pro.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href).href;var ie=e=>{for(;e.length>0;)e.shift()(i)};function se(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,S[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=S[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,S[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=S[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(_n(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var oe=(e,t,r)=>{throw new se(e).init(t,r),e},ae=e=>(A[yn()>>2]=e,e),ce={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=ce.isAbs(e),r="/"===e.substr(-1);return(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ce.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ce.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ce.normalize(e.join("/"))},join2:(e,t)=>ce.normalize(e+"/"+t)},ue=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(h)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}G("initRandomDevice")},le=e=>(le=ue())(e),de={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:xe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=ce.isAbs(n)}return(t?"/":"")+(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=de.resolve(e).substr(1),t=de.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),s=Math.min(n.length,i.length),o=s,a=0;a{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&he)return he.decode(e.subarray(t,i));for(var s="";t>10,56320|1023&u)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s},pe=[],me=e=>{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},ve=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,s=r+n-1,o=0;o=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o)),a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i};function ye(e,t,r){var n=r>0?r:me(e)+1,i=new Array(n),s=ve(e,i,0,i.length);return t&&(i.length=s),i}var ge=()=>{if(!pe.length){var e=null;if(h){var t=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=v.readSync(n,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ye(e,!0)}return pe.shift()},_e={ttys:[],init(){},shutdown(){},register(e,t){_e.ttys[e]={input:[],output:[],ops:t},xe.registerDevice(e,_e.stream_ops)},stream_ops:{open(e){var t=_e.ttys[e.node.rdev];if(!t)throw new xe.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new xe.ErrnoError(60);for(var s=0,o=0;oge(),put_char(e,t){null===t||10===t?(b(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(fe(e.output,0)),e.output=[])}}},be=e=>{G()},we={ops_table:null,mount:e=>we.createNode(null,"/",16895,0),createNode(e,t,r,n){if(xe.isBlkdev(r)||xe.isFIFO(r))throw new xe.ErrnoError(63);we.ops_table||(we.ops_table={dir:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,lookup:we.node_ops.lookup,mknod:we.node_ops.mknod,rename:we.node_ops.rename,unlink:we.node_ops.unlink,rmdir:we.node_ops.rmdir,readdir:we.node_ops.readdir,symlink:we.node_ops.symlink},stream:{llseek:we.stream_ops.llseek}},file:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:{llseek:we.stream_ops.llseek,read:we.stream_ops.read,write:we.stream_ops.write,allocate:we.stream_ops.allocate,mmap:we.stream_ops.mmap,msync:we.stream_ops.msync}},link:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,readlink:we.node_ops.readlink},stream:{}},chrdev:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:xe.chrdev_stream_ops}});var i=xe.createNode(e,t,r,n);return xe.isDir(i.mode)?(i.node_ops=we.ops_table.dir.node,i.stream_ops=we.ops_table.dir.stream,i.contents={}):xe.isFile(i.mode)?(i.node_ops=we.ops_table.file.node,i.stream_ops=we.ops_table.file.stream,i.usedBytes=0,i.contents=null):xe.isLink(i.mode)?(i.node_ops=we.ops_table.link.node,i.stream_ops=we.ops_table.link.stream):xe.isChrdev(i.mode)&&(i.node_ops=we.ops_table.chrdev.node,i.stream_ops=we.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=xe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,xe.isDir(e.mode)?t.size=4096:xe.isFile(e.mode)?t.size=e.usedBytes:xe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&we.resizeFileStorage(e,t.size)},lookup(e,t){throw xe.genericErrors[44]},mknod:(e,t,r,n)=>we.createNode(e,t,r,n),rename(e,t,r){if(xe.isDir(e.mode)){var n;try{n=xe.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new xe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=xe.lookupNode(e,t);for(var n in r.contents)throw new xe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=we.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!xe.isLink(e.mode))throw new xe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,i){var s=e.node.contents;if(i>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-i,n);if(o>8&&s.subarray)t.set(s.subarray(i,i+o),r);else for(var a=0;a0||r+t(we.stream_ops.write(e,t,0,n,r,!1),0)}},Se=(e,t,r,n)=>{var i=n?"":`al ${e}`;o(e,(r=>{B(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),i&&$()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&W()},Ee=(e,t,r,n,i,s)=>{xe.createDataFile(e,t,r,n,i,s)},ke=i.preloadPlugins||[],Ie=(e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return ke.forEach((s=>{i||s.canHandle(t)&&(s.handle(e,t,r,n),i=!0)})),i},Ae=(e,t,r,n,i,s,o,a,c,u)=>{var l=t?de.resolve(ce.join2(e,t)):e;function d(r){function d(r){u&&u(),a||Ee(e,t,r,n,i,c),s&&s(),$()}Ie(r,l,d,(()=>{o&&o(),$()}))||d(r)}W(),"string"==typeof r?Se(r,(e=>d(e)),o):d(r)},Ce=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Te=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},xe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=de.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new xe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=xe.root,i="/",s=0;s40)throw new xe.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(xe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n>>0)%xe.nameTable.length},hashAddNode(e){var t=xe.hashName(e.parent.id,e.name);e.name_next=xe.nameTable[t],xe.nameTable[t]=e},hashRemoveNode(e){var t=xe.hashName(e.parent.id,e.name);if(xe.nameTable[t]===e)xe.nameTable[t]=e.name_next;else for(var r=xe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=xe.mayLookup(e);if(r)throw new xe.ErrnoError(r,e);for(var n=xe.hashName(e.id,t),i=xe.nameTable[n];i;i=i.name_next){var s=i.name;if(i.parent.id===e.id&&s===t)return i}return xe.lookup(e,t)},createNode(e,t,r,n){var i=new xe.FSNode(e,t,r,n);return xe.hashAddNode(i),i},destroyNode(e){xe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>xe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=xe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{return xe.lookupNode(e,t),20}catch(e){}return xe.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=xe.lookupNode(e,t)}catch(e){return e.errno}var i=xe.nodePermissions(e,"wx");if(i)return i;if(r){if(!xe.isDir(n.mode))return 54;if(xe.isRoot(n)||xe.getPath(n)===xe.cwd())return 10}else if(xe.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?xe.isLink(e.mode)?32:xe.isDir(e.mode)&&("r"!==xe.flagsToPermissionString(t)||512&t)?31:xe.nodePermissions(e,xe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=xe.MAX_OPEN_FDS;e++)if(!xe.streams[e])return e;throw new xe.ErrnoError(33)},getStreamChecked(e){var t=xe.getStream(e);if(!t)throw new xe.ErrnoError(8);return t},getStream:e=>xe.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return xe.FSStream||(xe.FSStream=function(){this.shared={}},xe.FSStream.prototype={},Object.defineProperties(xe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new xe.FSStream,e),-1==t&&(t=xe.nextfd()),e.fd=t,xe.streams[t]=e,e},closeStream(e){xe.streams[e]=null},chrdev_stream_ops:{open(e){var t=xe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new xe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){xe.devices[e]={stream_ops:t}},getDevice:e=>xe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),xe.syncFSRequests++,xe.syncFSRequests>1&&w(`warning: ${xe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=xe.getMounts(xe.root.mount),n=0;function i(e){return xe.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var n,i="/"===r,s=!r;if(i&&xe.root)throw new xe.ErrnoError(10);if(!i&&!s){var o=xe.lookupPath(r,{follow_mount:!1});if(r=o.path,n=o.node,xe.isMountpoint(n))throw new xe.ErrnoError(10);if(!xe.isDir(n.mode))throw new xe.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(a);return c.mount=a,a.root=c,i?xe.root=c:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),c},unmount(e){var t=xe.lookupPath(e,{follow_mount:!1});if(!xe.isMountpoint(t.node))throw new xe.ErrnoError(28);var r=t.node,n=r.mounted,i=xe.getMounts(n);Object.keys(xe.nameTable).forEach((e=>{for(var t=xe.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&xe.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(n);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=xe.lookupPath(e,{parent:!0}).node,i=ce.basename(e);if(!i||"."===i||".."===i)throw new xe.ErrnoError(28);var s=xe.mayCreate(n,i);if(s)throw new xe.ErrnoError(s);if(!n.node_ops.mknod)throw new xe.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,xe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,xe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",i=0;i(void 0===r&&(r=t,t=438),t|=8192,xe.mknod(e,t,r)),symlink(e,t){if(!de.resolve(e))throw new xe.ErrnoError(44);var r=xe.lookupPath(t,{parent:!0}).node;if(!r)throw new xe.ErrnoError(44);var n=ce.basename(t),i=xe.mayCreate(r,n);if(i)throw new xe.ErrnoError(i);if(!r.node_ops.symlink)throw new xe.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=ce.dirname(e),s=ce.dirname(t),o=ce.basename(e),a=ce.basename(t);if(r=xe.lookupPath(e,{parent:!0}).node,n=xe.lookupPath(t,{parent:!0}).node,!r||!n)throw new xe.ErrnoError(44);if(r.mount!==n.mount)throw new xe.ErrnoError(75);var c,u=xe.lookupNode(r,o),l=de.relative(e,s);if("."!==l.charAt(0))throw new xe.ErrnoError(28);if("."!==(l=de.relative(t,i)).charAt(0))throw new xe.ErrnoError(55);try{c=xe.lookupNode(n,a)}catch(e){}if(u!==c){var d=xe.isDir(u.mode),h=xe.mayDelete(r,o,d);if(h)throw new xe.ErrnoError(h);if(h=c?xe.mayDelete(n,a,d):xe.mayCreate(n,a))throw new xe.ErrnoError(h);if(!r.node_ops.rename)throw new xe.ErrnoError(63);if(xe.isMountpoint(u)||c&&xe.isMountpoint(c))throw new xe.ErrnoError(10);if(n!==r&&(h=xe.nodePermissions(r,"w")))throw new xe.ErrnoError(h);xe.hashRemoveNode(u);try{r.node_ops.rename(u,n,a)}catch(e){throw e}finally{xe.hashAddNode(u)}}},rmdir(e){var t=xe.lookupPath(e,{parent:!0}).node,r=ce.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!0);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.rmdir)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.rmdir(t,r),xe.destroyNode(n)},readdir(e){var t=xe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new xe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=xe.lookupPath(e,{parent:!0}).node;if(!t)throw new xe.ErrnoError(44);var r=ce.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!1);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.unlink)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.unlink(t,r),xe.destroyNode(n)},readlink(e){var t=xe.lookupPath(e).node;if(!t)throw new xe.ErrnoError(44);if(!t.node_ops.readlink)throw new xe.ErrnoError(28);return de.resolve(xe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=xe.lookupPath(e,{follow:!t}).node;if(!r)throw new xe.ErrnoError(44);if(!r.node_ops.getattr)throw new xe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>xe.stat(e,!0),chmod(e,t,r){var n;if(!(n="string"==typeof e?xe.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new xe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){xe.chmod(e,t,!0)},fchmod(e,t){var r=xe.getStreamChecked(e);xe.chmod(r.node,t)},chown(e,t,r,n){var i;if(!(i="string"==typeof e?xe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new xe.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){xe.chown(e,t,r,!0)},fchown(e,t,r){var n=xe.getStreamChecked(e);xe.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new xe.ErrnoError(28);var r;if(!(r="string"==typeof e?xe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new xe.ErrnoError(63);if(xe.isDir(r.mode))throw new xe.ErrnoError(31);if(!xe.isFile(r.mode))throw new xe.ErrnoError(28);var n=xe.nodePermissions(r,"w");if(n)throw new xe.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=xe.getStreamChecked(e);if(0==(2097155&r.flags))throw new xe.ErrnoError(28);xe.truncate(r.node,t)},utime(e,t,r){var n=xe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new xe.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Ce(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=ce.normalize(e);try{n=xe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(n){if(128&t)throw new xe.ErrnoError(20)}else n=xe.mknod(e,r,0),s=!0;if(!n)throw new xe.ErrnoError(44);if(xe.isChrdev(n.mode)&&(t&=-513),65536&t&&!xe.isDir(n.mode))throw new xe.ErrnoError(54);if(!s){var o=xe.mayOpen(n,t);if(o)throw new xe.ErrnoError(o)}512&t&&!s&&xe.truncate(n,0),t&=-131713;var a=xe.createStream({node:n,path:xe.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!i.logReadFiles||1&t||(xe.readFiles||(xe.readFiles={}),e in xe.readFiles||(xe.readFiles[e]=1)),a},close(e){if(xe.isClosed(e))throw new xe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{xe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new xe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new xe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,i){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(1==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.read)throw new xe.ErrnoError(28);var s=void 0!==i;if(s){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var o=e.stream_ops.read(e,t,r,n,i);return s||(e.position+=o),o},write(e,t,r,n,i,s){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.write)throw new xe.ErrnoError(28);e.seekable&&1024&e.flags&&xe.llseek(e,0,2);var o=void 0!==i;if(o){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var a=e.stream_ops.write(e,t,r,n,i,s);return o||(e.position+=a),a},allocate(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(t<0||r<=0)throw new xe.ErrnoError(28);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(!xe.isFile(e.node.mode)&&!xe.isDir(e.node.mode))throw new xe.ErrnoError(43);if(!e.stream_ops.allocate)throw new xe.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new xe.ErrnoError(2);if(1==(2097155&e.flags))throw new xe.ErrnoError(2);if(!e.stream_ops.mmap)throw new xe.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new xe.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=xe.open(e,t.flags),i=xe.stat(e).size,s=new Uint8Array(i);return xe.read(n,s,0,i,0),"utf8"===t.encoding?r=fe(s,0):"binary"===t.encoding&&(r=s),xe.close(n),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var n=xe.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(me(t)+1),s=ve(t,i,0,i.length);xe.write(n,i,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");xe.write(n,t,0,t.byteLength,void 0,r.canOwn)}xe.close(n)},cwd:()=>xe.currentPath,chdir(e){var t=xe.lookupPath(e,{follow:!0});if(null===t.node)throw new xe.ErrnoError(44);if(!xe.isDir(t.node.mode))throw new xe.ErrnoError(54);var r=xe.nodePermissions(t.node,"x");if(r)throw new xe.ErrnoError(r);xe.currentPath=t.path},createDefaultDirectories(){xe.mkdir("/tmp"),xe.mkdir("/home"),xe.mkdir("/home/web_user")},createDefaultDevices(){xe.mkdir("/dev"),xe.registerDevice(xe.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),xe.mkdev("/dev/null",xe.makedev(1,3)),_e.register(xe.makedev(5,0),_e.default_tty_ops),_e.register(xe.makedev(6,0),_e.default_tty1_ops),xe.mkdev("/dev/tty",xe.makedev(5,0)),xe.mkdev("/dev/tty1",xe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=le(e).byteLength),e[--t]);xe.createDevice("/dev","random",r),xe.createDevice("/dev","urandom",r),xe.mkdir("/dev/shm"),xe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){xe.mkdir("/proc");var e=xe.mkdir("/proc/self");xe.mkdir("/proc/self/fd"),xe.mount({mount(){var t=xe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=xe.getStreamChecked(r),i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?xe.createDevice("/dev","stdin",i.stdin):xe.symlink("/dev/tty","/dev/stdin"),i.stdout?xe.createDevice("/dev","stdout",null,i.stdout):xe.symlink("/dev/tty","/dev/stdout"),i.stderr?xe.createDevice("/dev","stderr",null,i.stderr):xe.symlink("/dev/tty1","/dev/stderr"),xe.open("/dev/stdin",0),xe.open("/dev/stdout",1),xe.open("/dev/stderr",1)},ensureErrnoError(){xe.ErrnoError||(xe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},xe.ErrnoError.prototype=new Error,xe.ErrnoError.prototype.constructor=xe.ErrnoError,[44].forEach((e=>{xe.genericErrors[e]=new xe.ErrnoError(e),xe.genericErrors[e].stack=""})))},staticInit(){xe.ensureErrnoError(),xe.nameTable=new Array(4096),xe.mount(we,{},"/"),xe.createDefaultDirectories(),xe.createDefaultDevices(),xe.createSpecialDirectories(),xe.filesystems={MEMFS:we}},init(e,t,r){xe.init.initialized=!0,xe.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,xe.createStandardStreams()},quit(){xe.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;i||(o=n);var a=this;a.setDataGetter((e=>{var t=e*o,i=(e+1)*o-1;if(i=Math.min(i,n-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",r,!1),n!==o&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+r+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):ye(i.responseText||"",!0)})(t,i)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&n||(o=n=1,n=this.getter(0).length,o=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!d)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var c=xe.createFile(e,t,a,n,i);a.contents?c.contents=a.contents:a.url&&(c.contents=null,c.url=a.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,t,r,n,i){var s=e.node.contents;if(i>=s.length)return 0;var o=Math.min(s.length-i,n);if(s.slice)for(var a=0;a{var t=c.stream_ops[e];u[e]=function(){return xe.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,i)=>(xe.forceLoadFile(c),l(e,t,r,n,i)),u.mmap=(e,t,r,n,i)=>{xe.forceLoadFile(c);var s=be();if(!s)throw new xe.ErrnoError(48);return l(e,S,s,t,r),{ptr:s,allocated:!0}},c.stream_ops=u,c}},De=(e,t)=>e?fe(E,e,t):"",Be={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(ce.isAbs(t))return t;var n;if(n=-100===e?xe.cwd():Be.getStreamFromFD(e).path,0==t.length){if(!r)throw new xe.ErrnoError(44);return n}return ce.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ce.normalize(t)!==ce.normalize(xe.getPath(e.node)))return-54;throw e}A[r>>2]=n.dev,A[r+4>>2]=n.mode,C[r+8>>2]=n.nlink,A[r+12>>2]=n.uid,A[r+16>>2]=n.gid,A[r+20>>2]=n.rdev,X=[n.size>>>0,(K=n.size,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+24>>2]=X[0],A[r+28>>2]=X[1],A[r+32>>2]=4096,A[r+36>>2]=n.blocks;var i=n.atime.getTime(),s=n.mtime.getTime(),o=n.ctime.getTime();return X=[Math.floor(i/1e3)>>>0,(K=Math.floor(i/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+40>>2]=X[0],A[r+44>>2]=X[1],C[r+48>>2]=i%1e3*1e3,X=[Math.floor(s/1e3)>>>0,(K=Math.floor(s/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+56>>2]=X[0],A[r+60>>2]=X[1],C[r+64>>2]=s%1e3*1e3,X=[Math.floor(o/1e3)>>>0,(K=Math.floor(o/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+72>>2]=X[0],A[r+76>>2]=X[1],C[r+80>>2]=o%1e3*1e3,X=[n.ino>>>0,(K=n.ino,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+88>>2]=X[0],A[r+92>>2]=X[1],0},doMsync(e,t,r,n,i){if(!xe.isFile(t.node.mode))throw new xe.ErrnoError(43);if(2&n)return 0;var s=E.slice(e,e+r);xe.msync(t,s,i,r,n)},varargs:void 0,get(){var e=A[+Be.varargs>>2];return Be.varargs+=4,e},getp:()=>Be.get(),getStr:e=>De(e),getStreamFromFD:e=>xe.getStreamChecked(e)};function Pe(e,t,r){Be.varargs=r;try{var n=Be.getStreamFromFD(e);switch(t){case 0:if((i=Be.get())<0)return-28;for(;xe.streams[i];)i++;return xe.createStream(n,i).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var i=Be.get();return n.flags|=i,0;case 5:return i=Be.getp(),k[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ae(28),-1}}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Me(e,t,r,n){Be.varargs=n;try{t=Be.getStr(t),t=Be.calculateAt(e,t);var i=n?Be.get():0;return xe.open(t,r,i).fd}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return-e.errno}}var Fe,Ue,Re,Le=(e,t,r,n,i)=>{},Oe=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Fe=e},ze=e=>{for(var t="",r=e;E[r];)t+=Fe[E[r++]];return t},Ne={},He={},je={},Ve=e=>{throw new Ue(e)},We=e=>{throw new Re(e)},$e=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&We("Mismatched type converter count");for(var i=0;i{He.hasOwnProperty(e)?i[t]=He[e]:(s.push(e),Ne.hasOwnProperty(e)||(Ne[e]=[]),Ne[e].push((()=>{i[t]=He[e],++o===s.length&&n(i)})))})),0===s.length&&n(i)};function Ge(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=t.name;if(e||Ve(`type "${n}" must have a positive integer typeid pointer`),He.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Ve(`Cannot register type '${n}' twice`)}if(He[e]=t,delete je[e],Ne.hasOwnProperty(e)){var i=Ne[e];delete Ne[e],i.forEach((e=>e()))}}function qe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ge(e,t,r)}var Ke,Xe=8,Ye=(e,t,r,n)=>{qe(e,{name:t=ze(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:Xe,readValueFromPointer:function(e){return this.fromWireType(E[e])},destructorFunction:null})},Je=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Ze=e=>{Ve(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},nt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=nt(e,t,r.baseClass);return null===n?null:r.downcast(n)},it={},st=()=>Object.keys(dt).length,ot=()=>{var e=[];for(var t in dt)dt.hasOwnProperty(t)&&e.push(dt[t]);return e},at=[],ct=()=>{for(;at.length;){var e=at.pop();e.$$.deleteScheduled=!1,e.delete()}},ut=e=>{Ke=e,at.length&&Ke&&Ke(ct)},lt=()=>{i.getInheritedInstanceCount=st,i.getLiveInheritedInstances=ot,i.flushPendingDeletes=ct,i.setDelayFunction=ut},dt={},ht=(e,t)=>{for(void 0===t&&Ve("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=ht(e,t),dt[t]),pt=(e,t)=>(t.ptrType&&t.ptr||We("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&We("Both smartPtrType and smartPtr must be specified"),t.count={value:1},vt(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=it[o];if(!a)return i.call(this);s=this.isConst?a.constPointerType:a.pointerType;var c=nt(t,this.registeredClass,s.registeredClass);return null===c?i.call(this):this.isSmartPointer?pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c,smartPtrType:this,smartPtr:e}):pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c})}var vt=e=>"undefined"==typeof FinalizationRegistry?(vt=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),vt=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),vt(e)),yt=()=>{Object.assign(gt.prototype,{isAliasOf(e){if(!(this instanceof gt))return!1;if(!(e instanceof gt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i},clone(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:Je(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ve("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ve("Object already scheduled for deletion"),at.push(this),1===at.length&&Ke&&Ke(ct),this.$$.deleteScheduled=!0,this}})};function gt(){}var _t=(e,t)=>Object.defineProperty(t,"name",{value:e}),bt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Ve(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},wt=(e,t,r)=>{i.hasOwnProperty(e)?((void 0===r||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[r])&&Ve(`Cannot register public name '${e}' twice`),bt(i,e,e),i.hasOwnProperty(r)&&Ve(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),i[e].overloadTable[r]=t):(i[e]=t,void 0!==r&&(i[e].numArguments=r))},St=48,Et=57,kt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=St&&t<=Et?`_${e}`:e};function It(e,t,r,n,i,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}var At=(e,t,r)=>{for(;t!==r;)t.upcast||Ve(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Ct(e,t){if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Tt(e,t){var r;if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Ve(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=At(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Ve("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Ve(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,sr.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:Ve("Unsupporting sharing policy")}return r}function xt(e,t){if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Ve(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Dt(e){return this.fromWireType(C[e>>2])}var Bt=()=>{Object.assign(Pt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Xe,readValueFromPointer:Dt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Pt(e,t,r,n,i,s,o,a,c,u,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=Tt:n?(this.toWireType=Ct,this.destructorFunction=null):(this.toWireType=xt,this.destructorFunction=null)}var Mt,Ft,Ut=(e,t,r)=>{i.hasOwnProperty(e)||We("Replacing nonexistant public symbol"),void 0!==i[e].overloadTable&&void 0!==r?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)},Rt=(e,t,r)=>{var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)},Lt=[],Ot=e=>{var t=Lt[e];return t||(e>=Lt.length&&(Lt.length=e+1),Lt[e]=t=Mt.get(e)),t},zt=(e,t,r)=>e.includes("j")?Rt(e,t,r):Ot(t).apply(null,r),Nt=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),zt(e,t,r)}},Ht=(e,t)=>{var r=(e=ze(e)).includes("j")?Nt(e,t):Ot(t);return"function"!=typeof r&&Ve(`unknown function pointer with signature ${e}: ${t}`),r},jt=(e,t)=>{var r=_t(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Vt=e=>{var t=gn(e),r=ze(t);return mn(t),r},Wt=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||He[t]||(je[t]?je[t].forEach(e):(r.push(t),n[t]=!0))})),new Ft(`${e}: `+r.map(Vt).join([", "]))},$t=(e,t,r,n,i,s,o,a,c,u,l,d,h)=>{l=ze(l),s=Ht(i,s),a&&(a=Ht(o,a)),u&&(u=Ht(c,u)),h=Ht(d,h);var f=kt(l);wt(f,(function(){Wt(`Cannot construct ${l} due to unbound types`,[n])})),$e([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:gt.prototype;var o=_t(l,(function(){if(Object.getPrototypeOf(this)!==c)throw new Ue("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Ue(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Ue(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new It(l,o,c,h,r,s,a,u);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new Pt(l,d,!0,!1,!1),m=new Pt(l+"*",d,!1,!1,!1),v=new Pt(l+" const*",d,!1,!0,!1);return it[e]={pointerType:m,constPointerType:v},Ut(f,o),[p,m,v]}))},Gt=(e,t)=>{for(var r=[],n=0;n>2]);return r},qt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Kt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=_t(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function Xt(e,t,r,n,i,s){var o=t.length;o<2&&Ve("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,c=!1,u=1;u0?", ":"")+h),f+=(l||s?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",c)f+="runDestructors(destructors);\n";else for(u=a?1:2;u{var o=Gt(t,r);i=Ht(n,i),$e([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Ue(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Wt(`Cannot construct ${e.name} due to unbound types`,o)},$e([],o,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Xt(r,n,null,i,s),[]))),[]}))},Jt=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},Zt=(e,t,r,n,i,s,o,a,c)=>{var u=Gt(r,n);t=ze(t),t=Jt(t),s=Ht(i,s),$e([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){Wt(`Cannot call ${n} due to unbound types`,u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,d=l[t];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===r-2?(i.argCount=r-2,i.className=e.name,l[t]=i):(bt(l,t,n),l[t].overloadTable[r-2]=i),$e([],u,(function(i){var a=Xt(n,i,e,s,o,c);return void 0===l[t].overloadTable?(a.argCount=r-2,l[t]=a):l[t].overloadTable[r-2]=a,[]})),[]}))};function Qt(){Object.assign(er.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function er(){this.allocated=[void 0],this.freelist=[]}var tr=new er,rr=e=>{e>=tr.reserved&&0==--tr.get(e).refcount&&tr.free(e)},nr=()=>{for(var e=0,t=tr.reserved;t{tr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),tr.reserved=tr.allocated.length,i.count_emval_handles=nr},sr={toValue:e=>(e||Ve("Cannot use deleted val. handle = "+e),tr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return tr.allocate({refcount:1,value:e})}}};function or(e){return this.fromWireType(A[e>>2])}var ar=(e,t)=>{qe(e,{name:t=ze(t),fromWireType:e=>{var t=sr.toValue(e);return rr(e),t},toWireType:(e,t)=>sr.toHandle(t),argPackAdvance:Xe,readValueFromPointer:or,destructorFunction:null})},cr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},ur=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(T[e>>2])};case 8:return function(e){return this.fromWireType(x[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},lr=(e,t,r)=>{qe(e,{name:t=ze(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Xe,readValueFromPointer:ur(t,r),destructorFunction:null})},dr=(e,t,r)=>{switch(t){case 1:return r?e=>S[e>>0]:e=>E[e>>0];case 2:return r?e=>k[e>>1]:e=>I[e>>1];case 4:return r?e=>A[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},hr=(e,t,r,n,i)=>{t=ze(t);var s=e=>e;if(0===n){var o=32-8*r;s=e=>e<>>o}var a=t.includes("unsigned");qe(e,{name:t,fromWireType:s,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Xe,readValueFromPointer:dr(t,r,0!==n),destructorFunction:null})},fr=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=C[e>>2],r=C[e+4>>2];return new n(S.buffer,r,t)}qe(e,{name:r=ze(r),fromWireType:i,argPackAdvance:Xe,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},pr=(e,t,r)=>ve(e,E,t,r),mr=(e,t)=>{var r="std::string"===(t=ze(t));qe(e,{name:t,fromWireType(e){var t,n=C[e>>2],i=e+4;if(r)for(var s=i,o=0;o<=n;++o){var a=i+o;if(o==n||0==E[a]){var c=De(s,a-s);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),s=a+1}}else{var u=new Array(n);for(o=0;o>2]=n,r&&i)pr(t,o,n+1);else if(i)for(var a=0;a255&&(mn(o),Ve("String has UTF-16 code units that do not fit in 8 bits")),E[o+a]=c}else for(a=0;a{for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&I[n];)++n;if((r=n<<1)-e>32&&vr)return vr.decode(E.subarray(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=k[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s},gr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return k[t>>1]=0,t-n},_r=e=>2*e.length,br=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=A[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var s=i-65536;n+=String.fromCharCode(55296|s>>10,56320|1023&s)}else n+=String.fromCharCode(i)}return n},wr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,s=0;s=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s)),A[t>>2]=o,(t+=4)+4>i)break}return A[t>>2]=0,t-n},Sr=e=>{for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t},Er=(e,t,r)=>{var n,i,s,o,a;r=ze(r),2===t?(n=yr,i=gr,o=_r,s=()=>I,a=1):4===t&&(n=br,i=wr,o=Sr,s=()=>C,a=2),qe(e,{name:r,fromWireType:e=>{for(var r,i=C[e>>2],o=s(),c=e+4,u=0;u<=i;++u){var l=e+4+u*t;if(u==i||0==o[l>>a]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return mn(e),r},toWireType:(e,n)=>{"string"!=typeof n&&Ve(`Cannot pass non-string to C++ string type ${r}`);var s=o(n),c=vn(4+s+t);return C[c>>2]=s>>a,i(n,c+4,s+t),null!==e&&e.push(mn,c),c},argPackAdvance:Xe,readValueFromPointer:or,destructorFunction(e){mn(e)}})},kr=(e,t)=>{qe(e,{isVoid:!0,name:t=ze(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Ir={},Ar=e=>{var t=Ir[e];return void 0===t?ze(e):t},Cr=[],Tr=(e,t,r,n,i)=>(e=Cr[e])(t=sr.toValue(t),t[r=Ar(r)],n,i),xr=e=>{var t=Cr.length;return Cr.push(e),t},Dr=(e,t)=>{var r=He[e];return void 0===r&&Ve(t+" has unknown type "+Vt(e)),r},Br=(e,t)=>{for(var r=new Array(e),n=0;n>2],"parameter "+n);return r},Pr=(e,t,r)=>{var n=[],i=e.toWireType(n,r);return n.length&&(C[t>>2]=sr.toHandle(n)),i},Mr=(e,t,r)=>{var n=Br(e,t),i=n.shift();e--;var s="return function (obj, func, destructorsRef, args) {\n",o=0,a=[];0===r&&a.push("obj");for(var c=["retType"],u=[i],l=0;le.name)).join(", ")}) => ${i.name}>`;return xr(_t(h,d))},Fr=e=>{var t=sr.toValue(e);qt(t),rr(e)},Ur=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Rr=e=>e%4==0&&(e%100!=0||e%400==0),Lr=[0,31,60,91,121,152,182,213,244,274,305,335],Or=[0,31,59,90,120,151,181,212,243,273,304,334],zr=e=>(Rr(e.getFullYear())?Lr:Or)[e.getMonth()]+e.getDate()-1;function Nr(e,t,r){var n=Ur(e,t),i=new Date(1e3*n);A[r>>2]=i.getSeconds(),A[r+4>>2]=i.getMinutes(),A[r+8>>2]=i.getHours(),A[r+12>>2]=i.getDate(),A[r+16>>2]=i.getMonth(),A[r+20>>2]=i.getFullYear()-1900,A[r+24>>2]=i.getDay();var s=0|zr(i);A[r+28>>2]=s,A[r+36>>2]=-60*i.getTimezoneOffset();var o=new Date(i.getFullYear(),0,1),a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),c=o.getTimezoneOffset(),u=0|(a!=c&&i.getTimezoneOffset()==Math.min(c,a));A[r+32>>2]=u}var Hr=e=>{var t=me(e)+1,r=vn(t);return r&&pr(e,r,t),r},jr=(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),s=new Date(n,6,1),o=i.getTimezoneOffset(),a=s.getTimezoneOffset(),c=Math.max(o,a);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[e>>2]=60*c,A[t>>2]=Number(o!=a);var l=u(i),d=u(s),h=Hr(l),f=Hr(d);a>2]=h,C[r+4>>2]=f):(C[r>>2]=f,C[r+4>>2]=h)},Vr=()=>{G("")},Wr=()=>Date.now(),$r=(e,t,r)=>E.copyWithin(e,t,t+r),Gr=()=>268435456,qr=e=>{var t=(e-_.buffer.byteLength+65535)/65536;try{return _.grow(t),P(),1}catch(e){}},Kr=e=>{var t=E.length;e>>>=0;var r=Gr();if(e>r)return!1;for(var n,i,s=1;s<=4;s*=2){var o=t*(1+.2/s);o=Math.min(o,e+100663296);var a=Math.min(r,(n=Math.max(e,o))+((i=65536)-n%i)%i);if(qr(a))return!0}return!1},Xr={},Yr=()=>u||"./this.program",Jr=()=>{if(!Jr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Yr()};for(var t in Xr)void 0===Xr[t]?delete e[t]:e[t]=Xr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Jr.strings=r}return Jr.strings},Zr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);S[t>>0]=0},Qr=(e,t)=>{var r=0;return Jr().forEach(((n,i)=>{var s=t+r;C[e+4*i>>2]=s,Zr(n,s),r+=n.length+1})),0},en=(e,t)=>{var r=Jr();C[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),C[t>>2]=n,0};function tn(e){try{var t=Be.getStreamFromFD(e);return xe.close(t),0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}function rn(e,t){try{var r=Be.getStreamFromFD(e),n=r.tty?2:xe.isDir(r.mode)?3:xe.isLink(r.mode)?7:4;return S[t>>0]=n,k[t+2>>1]=0,X=[0,(K=0,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[t+8>>2]=X[0],A[t+12>>2]=X[1],X=[0,(K=0,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[t+16>>2]=X[0],A[t+20>>2]=X[1],0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var nn=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=xe.read(e,S,o,a,n);if(c<0)return-1;if(i+=c,c>2]=s,0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}function on(e,t,r,n,i){var s=Ur(t,r);try{if(isNaN(s))return 61;var o=Be.getStreamFromFD(e);return xe.llseek(o,s,n),X=[o.position>>>0,(K=o.position,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[i>>2]=X[0],A[i+4>>2]=X[1],o.getdents&&0===s&&0===n&&(o.getdents=null),0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var an=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=xe.write(e,S,o,a,n);if(c<0)return-1;i+=c,void 0!==n&&(n+=c)}return i};function cn(e,t,r,n){try{var i=Be.getStreamFromFD(e),s=an(i,t,r);return C[n>>2]=s,0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var un=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=xe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},ln=365,dn=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&ln)===ln},set:function(e){e?this.mode|=ln:this.mode&=~ln}},write:{get:function(){return(this.mode&dn)===dn},set:function(e){e?this.mode|=dn:this.mode&=~dn}},isFolder:{get:function(){return xe.isDir(this.mode)}},isDevice:{get:function(){return xe.isChrdev(this.mode)}}}),xe.FSNode=un,xe.createPreloadedFile=Ae,xe.staticInit(),Oe(),Ue=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Re=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},yt(),lt(),Bt(),Ft=i.UnboundTypeError=jt(Error,"UnboundTypeError"),Qt(),ir();var hn,fn={o:oe,C:Pe,u:Me,r:Le,E:Ye,F:$t,A:Yt,i:Zt,D:ar,l:lr,c:hr,b:fr,m:mr,j:Er,n:kr,f:Tr,h:rr,e:Mr,d:Fr,p:Nr,t:jr,a:Vr,g:Wr,y:$r,s:Kr,w:Qr,x:en,k:tn,v:rn,B:sn,q:on,z:cn},pn=ne(),mn=e=>(mn=pn.I)(e),vn=e=>(vn=pn.J)(e),yn=()=>(yn=pn.L)(),gn=e=>(gn=pn.M)(e),_n=e=>(_n=pn.O)(e);function bn(){function e(){hn||(hn=!0,i.calledRun=!0,D||(L(),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),O()))}j>0||(R(),j>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_jiji=(e,t,r,n,s)=>(i.dynCall_jiji=pn.P)(e,t,r,n,s),i._ff_h264_cabac_tables=74508,V=function e(){hn||bn(),hn||(V=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return bn(),e.ready}),o=(()=>{var e="undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href;return async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var r,n,i;(i=t).ready=new Promise(((e,t)=>{r=e,n=t})),(i=void 0!==i?i:{}).locateFile=function(e,t){return"decoder-pro-audio.wasm"==e&&"undefined"!=typeof JESSIBUCA_PRO_AUDIO_WASM_URL&&""!=JESSIBUCA_PRO_AUDIO_WASM_URL?JESSIBUCA_PRO_AUDIO_WASM_URL:t+e};var s,o,a,c=Object.assign({},i),u="./this.program",l="object"==typeof window,d="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,f="";function p(e){return i.locateFile?i.locateFile(e,f):f+e}if(h){const{createRequire:e}=await import("module");var m=e("undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href),v=m("fs"),y=m("path");f=d?y.dirname(f)+"/":m("url").fileURLToPath(new URL("./","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href)),s=(e,t)=>(e=Z(e)?new URL(e):y.normalize(e),v.readFileSync(e,t?void 0:"utf8")),a=e=>{var t=s(e,!0);return t.buffer||(t=new Uint8Array(t)),t},o=function(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=Z(e)?new URL(e):y.normalize(e),v.readFile(e,n?void 0:"utf8",((e,i)=>{e?r(e):t(n?i.buffer:i)}))},!i.thisProgram&&process.argv.length>1&&(u=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),i.inspect=()=>"[Emscripten Module object]"}else(l||d)&&(d?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),e&&(f=e),f=0!==f.indexOf("blob:")?f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1):"",s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},d&&(a=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var g,_,b=i.print||console.log.bind(console),w=i.printErr||console.error.bind(console);Object.assign(i,c),c=null,i.arguments&&i.arguments,i.thisProgram&&(u=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(g=i.wasmBinary),"object"!=typeof WebAssembly&&G("no native wasm support detected");var S,E,k,I,A,C,T,x,D=!1;function B(e,t){e||G(t)}function P(){var e=_.buffer;i.HEAP8=S=new Int8Array(e),i.HEAP16=k=new Int16Array(e),i.HEAPU8=E=new Uint8Array(e),i.HEAPU16=I=new Uint16Array(e),i.HEAP32=A=new Int32Array(e),i.HEAPU32=C=new Uint32Array(e),i.HEAPF32=T=new Float32Array(e),i.HEAPF64=x=new Float64Array(e)}var M=[],F=[],U=[];function R(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)z(i.preRun.shift());ie(M)}function L(){i.noFSInit||xe.init.initialized||xe.init(),xe.ignorePermissions=!1,ie(F)}function O(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)H(i.postRun.shift());ie(U)}function z(e){M.unshift(e)}function N(e){F.unshift(e)}function H(e){U.unshift(e)}var j=0,V=null;function W(e){j++,i.monitorRunDependencies&&i.monitorRunDependencies(j)}function $(e){if(j--,i.monitorRunDependencies&&i.monitorRunDependencies(j),0==j&&V){var t=V;V=null,t()}}function G(e){i.onAbort&&i.onAbort(e),w(e="Aborted("+e+")"),D=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var q,K,X,Y="data:application/octet-stream;base64,",J=e=>e.startsWith(Y),Z=e=>e.startsWith("file://");function Q(e){if(e==q&&g)return new Uint8Array(g);if(a)return a(e);throw"both async and sync fetching of the wasm failed"}function ee(e){if(!g&&(l||d)){if("function"==typeof fetch&&!Z(e))return fetch(e,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((()=>Q(e)));if(o)return new Promise(((t,r)=>{o(e,(e=>t(new Uint8Array(e))),r)}))}return Promise.resolve().then((()=>Q(e)))}function te(e,t,r){return ee(e).then((e=>WebAssembly.instantiate(e,t))).then((e=>e)).then(r,(e=>{w(`failed to asynchronously prepare wasm: ${e}`),G(e)}))}function re(e,t,r,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||J(t)||Z(t)||h||"function"!=typeof fetch?te(t,r,n):fetch(t,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,r).then(n,(function(e){return w(`wasm streaming compile failed: ${e}`),w("falling back to ArrayBuffer instantiation"),te(t,r,n)}))))}function ne(){var e={a:fn};function t(e,t){return pn=e.exports,_=pn.G,P(),Mt=pn.J,N(pn.H),$(),pn}if(W(),i.instantiateWasm)try{return i.instantiateWasm(e,t)}catch(e){w(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return re(g,q,e,(function(e){t(e.instance)})).catch(n),{}}i.locateFile?J(q="decoder-pro-audio.wasm")||(q=p(q)):q=new URL("decoder-pro-audio.wasm","undefined"==typeof document&&"undefined"==typeof location?new(require("url").URL)("file:"+__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("decoder-pro.js",document.baseURI).href).href;var ie=e=>{for(;e.length>0;)e.shift()(i)};function se(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,S[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=S[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,S[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=S[this.ptr+13>>0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(_n(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}i.noExitRuntime;var oe=(e,t,r)=>{throw new se(e).init(t,r),e},ae=e=>(A[vn()>>2]=e,e),ce={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=ce.isAbs(e),r="/"===e.substr(-1);return(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ce.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ce.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ce.normalize(e.join("/"))},join2:(e,t)=>ce.normalize(e+"/"+t)},ue=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(h)try{var e=m("crypto");if(e.randomFillSync)return t=>e.randomFillSync(t);var t=e.randomBytes;return e=>(e.set(t(e.byteLength)),e)}catch(e){}G("initRandomDevice")},le=e=>(le=ue())(e),de={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:xe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=ce.isAbs(n)}return(t?"/":"")+(e=ce.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=de.resolve(e).substr(1),t=de.resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),s=Math.min(n.length,i.length),o=s,a=0;a{for(var n=t+r,i=t;e[i]&&!(i>=n);)++i;if(i-t>16&&e.buffer&&he)return he.decode(e.subarray(t,i));for(var s="";t>10,56320|1023&u)}}else s+=String.fromCharCode((31&o)<<6|a)}else s+=String.fromCharCode(o)}return s},pe=[],me=e=>{for(var t=0,r=0;r=55296&&n<=57343?(t+=4,++r):t+=3}return t},ve=(e,t,r,n)=>{if(!(n>0))return 0;for(var i=r,s=r+n-1,o=0;o=55296&&a<=57343)a=65536+((1023&a)<<10)|1023&e.charCodeAt(++o);if(a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-i};function ye(e,t,r){var n=r>0?r:me(e)+1,i=new Array(n),s=ve(e,i,0,i.length);return t&&(i.length=s),i}var ge=()=>{if(!pe.length){var e=null;if(h){var t=Buffer.alloc(256),r=0,n=process.stdin.fd;try{r=v.readSync(n,t)}catch(e){if(!e.toString().includes("EOF"))throw e;r=0}e=r>0?t.slice(0,r).toString("utf-8"):null}else"undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n");if(!e)return null;pe=ye(e,!0)}return pe.shift()},_e={ttys:[],init(){},shutdown(){},register(e,t){_e.ttys[e]={input:[],output:[],ops:t},xe.registerDevice(e,_e.stream_ops)},stream_ops:{open(e){var t=_e.ttys[e.node.rdev];if(!t)throw new xe.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,i){if(!e.tty||!e.tty.ops.get_char)throw new xe.ErrnoError(60);for(var s=0,o=0;oge(),put_char(e,t){null===t||10===t?(b(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(b(fe(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,t,r)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,t){null===t||10===t?(w(fe(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(w(fe(e.output,0)),e.output=[])}}},be=e=>{G()},we={ops_table:null,mount:e=>we.createNode(null,"/",16895,0),createNode(e,t,r,n){if(xe.isBlkdev(r)||xe.isFIFO(r))throw new xe.ErrnoError(63);we.ops_table||(we.ops_table={dir:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,lookup:we.node_ops.lookup,mknod:we.node_ops.mknod,rename:we.node_ops.rename,unlink:we.node_ops.unlink,rmdir:we.node_ops.rmdir,readdir:we.node_ops.readdir,symlink:we.node_ops.symlink},stream:{llseek:we.stream_ops.llseek}},file:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:{llseek:we.stream_ops.llseek,read:we.stream_ops.read,write:we.stream_ops.write,allocate:we.stream_ops.allocate,mmap:we.stream_ops.mmap,msync:we.stream_ops.msync}},link:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr,readlink:we.node_ops.readlink},stream:{}},chrdev:{node:{getattr:we.node_ops.getattr,setattr:we.node_ops.setattr},stream:xe.chrdev_stream_ops}});var i=xe.createNode(e,t,r,n);return xe.isDir(i.mode)?(i.node_ops=we.ops_table.dir.node,i.stream_ops=we.ops_table.dir.stream,i.contents={}):xe.isFile(i.mode)?(i.node_ops=we.ops_table.file.node,i.stream_ops=we.ops_table.file.stream,i.usedBytes=0,i.contents=null):xe.isLink(i.mode)?(i.node_ops=we.ops_table.link.node,i.stream_ops=we.ops_table.link.stream):xe.isChrdev(i.mode)&&(i.node_ops=we.ops_table.chrdev.node,i.stream_ops=we.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i,e.timestamp=i.timestamp),i},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=xe.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,xe.isDir(e.mode)?t.size=4096:xe.isFile(e.mode)?t.size=e.usedBytes:xe.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&we.resizeFileStorage(e,t.size)},lookup(e,t){throw xe.genericErrors[44]},mknod:(e,t,r,n)=>we.createNode(e,t,r,n),rename(e,t,r){if(xe.isDir(e.mode)){var n;try{n=xe.lookupNode(t,r)}catch(e){}if(n)for(var i in n.contents)throw new xe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir(e,t){var r=xe.lookupNode(e,t);for(var n in r.contents)throw new xe.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink(e,t,r){var n=we.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!xe.isLink(e.mode))throw new xe.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,i){var s=e.node.contents;if(i>=e.node.usedBytes)return 0;var o=Math.min(e.node.usedBytes-i,n);if(o>8&&s.subarray)t.set(s.subarray(i,i+o),r);else for(var a=0;a0||r+t(we.stream_ops.write(e,t,0,n,r,!1),0)}},Se=(e,t,r,n)=>{var i=n?"":`al ${e}`;o(e,(r=>{B(r,`Loading data file "${e}" failed (no arrayBuffer).`),t(new Uint8Array(r)),i&&$()}),(t=>{if(!r)throw`Loading data file "${e}" failed.`;r()})),i&&W()},Ee=(e,t,r,n,i,s)=>{xe.createDataFile(e,t,r,n,i,s)},ke=i.preloadPlugins||[],Ie=(e,t,r,n)=>{"undefined"!=typeof Browser&&Browser.init();var i=!1;return ke.forEach((s=>{i||s.canHandle(t)&&(s.handle(e,t,r,n),i=!0)})),i},Ae=(e,t,r,n,i,s,o,a,c,u)=>{var l=t?de.resolve(ce.join2(e,t)):e;function d(r){function d(r){u&&u(),a||Ee(e,t,r,n,i,c),s&&s(),$()}Ie(r,l,d,(()=>{o&&o(),$()}))||d(r)}W(),"string"==typeof r?Se(r,(e=>d(e)),o):d(r)},Ce=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===t)throw new Error(`Unknown file open mode: ${e}`);return t},Te=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},xe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(e=de.resolve(e)))return{path:"",node:null};if(t=Object.assign({follow_mount:!0,recurse_count:0},t),t.recurse_count>8)throw new xe.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=xe.root,i="/",s=0;s40)throw new xe.ErrnoError(32)}}return{path:i,node:n}},getPath(e){for(var t;;){if(xe.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n>>0)%xe.nameTable.length},hashAddNode(e){var t=xe.hashName(e.parent.id,e.name);e.name_next=xe.nameTable[t],xe.nameTable[t]=e},hashRemoveNode(e){var t=xe.hashName(e.parent.id,e.name);if(xe.nameTable[t]===e)xe.nameTable[t]=e.name_next;else for(var r=xe.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=xe.mayLookup(e);if(r)throw new xe.ErrnoError(r,e);for(var n=xe.hashName(e.id,t),i=xe.nameTable[n];i;i=i.name_next){var s=i.name;if(i.parent.id===e.id&&s===t)return i}return xe.lookup(e,t)},createNode(e,t,r,n){var i=new xe.FSNode(e,t,r,n);return xe.hashAddNode(i),i},destroyNode(e){xe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>xe.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup(e){var t=xe.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){try{xe.lookupNode(e,t);return 20}catch(e){}return xe.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=xe.lookupNode(e,t)}catch(e){return e.errno}var i=xe.nodePermissions(e,"wx");if(i)return i;if(r){if(!xe.isDir(n.mode))return 54;if(xe.isRoot(n)||xe.getPath(n)===xe.cwd())return 10}else if(xe.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?xe.isLink(e.mode)?32:xe.isDir(e.mode)&&("r"!==xe.flagsToPermissionString(t)||512&t)?31:xe.nodePermissions(e,xe.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=xe.MAX_OPEN_FDS;e++)if(!xe.streams[e])return e;throw new xe.ErrnoError(33)},getStreamChecked(e){var t=xe.getStream(e);if(!t)throw new xe.ErrnoError(8);return t},getStream:e=>xe.streams[e],createStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return xe.FSStream||(xe.FSStream=function(){this.shared={}},xe.FSStream.prototype={},Object.defineProperties(xe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new xe.FSStream,e),-1==t&&(t=xe.nextfd()),e.fd=t,xe.streams[t]=e,e},closeStream(e){xe.streams[e]=null},chrdev_stream_ops:{open(e){var t=xe.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new xe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice(e,t){xe.devices[e]={stream_ops:t}},getDevice:e=>xe.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs(e,t){"function"==typeof e&&(t=e,e=!1),xe.syncFSRequests++,xe.syncFSRequests>1&&w(`warning: ${xe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=xe.getMounts(xe.root.mount),n=0;function i(e){return xe.syncFSRequests--,t(e)}function s(e){if(e)return s.errored?void 0:(s.errored=!0,i(e));++n>=r.length&&i(null)}r.forEach((t=>{if(!t.type.syncfs)return s(null);t.type.syncfs(t,e,s)}))},mount(e,t,r){var n,i="/"===r,s=!r;if(i&&xe.root)throw new xe.ErrnoError(10);if(!i&&!s){var o=xe.lookupPath(r,{follow_mount:!1});if(r=o.path,n=o.node,xe.isMountpoint(n))throw new xe.ErrnoError(10);if(!xe.isDir(n.mode))throw new xe.ErrnoError(54)}var a={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(a);return c.mount=a,a.root=c,i?xe.root=c:n&&(n.mounted=a,n.mount&&n.mount.mounts.push(a)),c},unmount(e){var t=xe.lookupPath(e,{follow_mount:!1});if(!xe.isMountpoint(t.node))throw new xe.ErrnoError(28);var r=t.node,n=r.mounted,i=xe.getMounts(n);Object.keys(xe.nameTable).forEach((e=>{for(var t=xe.nameTable[e];t;){var r=t.name_next;i.includes(t.mount)&&xe.destroyNode(t),t=r}})),r.mounted=null;var s=r.mount.mounts.indexOf(n);r.mount.mounts.splice(s,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod(e,t,r){var n=xe.lookupPath(e,{parent:!0}).node,i=ce.basename(e);if(!i||"."===i||".."===i)throw new xe.ErrnoError(28);var s=xe.mayCreate(n,i);if(s)throw new xe.ErrnoError(s);if(!n.node_ops.mknod)throw new xe.ErrnoError(63);return n.node_ops.mknod(n,i,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,xe.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,xe.mknod(e,t,0)),mkdirTree(e,t){for(var r=e.split("/"),n="",i=0;i(void 0===r&&(r=t,t=438),t|=8192,xe.mknod(e,t,r)),symlink(e,t){if(!de.resolve(e))throw new xe.ErrnoError(44);var r=xe.lookupPath(t,{parent:!0}).node;if(!r)throw new xe.ErrnoError(44);var n=ce.basename(t),i=xe.mayCreate(r,n);if(i)throw new xe.ErrnoError(i);if(!r.node_ops.symlink)throw new xe.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename(e,t){var r,n,i=ce.dirname(e),s=ce.dirname(t),o=ce.basename(e),a=ce.basename(t);if(r=xe.lookupPath(e,{parent:!0}).node,n=xe.lookupPath(t,{parent:!0}).node,!r||!n)throw new xe.ErrnoError(44);if(r.mount!==n.mount)throw new xe.ErrnoError(75);var c,u=xe.lookupNode(r,o),l=de.relative(e,s);if("."!==l.charAt(0))throw new xe.ErrnoError(28);if("."!==(l=de.relative(t,i)).charAt(0))throw new xe.ErrnoError(55);try{c=xe.lookupNode(n,a)}catch(e){}if(u!==c){var d=xe.isDir(u.mode),h=xe.mayDelete(r,o,d);if(h)throw new xe.ErrnoError(h);if(h=c?xe.mayDelete(n,a,d):xe.mayCreate(n,a))throw new xe.ErrnoError(h);if(!r.node_ops.rename)throw new xe.ErrnoError(63);if(xe.isMountpoint(u)||c&&xe.isMountpoint(c))throw new xe.ErrnoError(10);if(n!==r&&(h=xe.nodePermissions(r,"w")))throw new xe.ErrnoError(h);xe.hashRemoveNode(u);try{r.node_ops.rename(u,n,a)}catch(e){throw e}finally{xe.hashAddNode(u)}}},rmdir(e){var t=xe.lookupPath(e,{parent:!0}).node,r=ce.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!0);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.rmdir)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.rmdir(t,r),xe.destroyNode(n)},readdir(e){var t=xe.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new xe.ErrnoError(54);return t.node_ops.readdir(t)},unlink(e){var t=xe.lookupPath(e,{parent:!0}).node;if(!t)throw new xe.ErrnoError(44);var r=ce.basename(e),n=xe.lookupNode(t,r),i=xe.mayDelete(t,r,!1);if(i)throw new xe.ErrnoError(i);if(!t.node_ops.unlink)throw new xe.ErrnoError(63);if(xe.isMountpoint(n))throw new xe.ErrnoError(10);t.node_ops.unlink(t,r),xe.destroyNode(n)},readlink(e){var t=xe.lookupPath(e).node;if(!t)throw new xe.ErrnoError(44);if(!t.node_ops.readlink)throw new xe.ErrnoError(28);return de.resolve(xe.getPath(t.parent),t.node_ops.readlink(t))},stat(e,t){var r=xe.lookupPath(e,{follow:!t}).node;if(!r)throw new xe.ErrnoError(44);if(!r.node_ops.getattr)throw new xe.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>xe.stat(e,!0),chmod(e,t,r){var n;"string"==typeof e?n=xe.lookupPath(e,{follow:!r}).node:n=e;if(!n.node_ops.setattr)throw new xe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(e,t){xe.chmod(e,t,!0)},fchmod(e,t){var r=xe.getStreamChecked(e);xe.chmod(r.node,t)},chown(e,t,r,n){var i;"string"==typeof e?i=xe.lookupPath(e,{follow:!n}).node:i=e;if(!i.node_ops.setattr)throw new xe.ErrnoError(63);i.node_ops.setattr(i,{timestamp:Date.now()})},lchown(e,t,r){xe.chown(e,t,r,!0)},fchown(e,t,r){var n=xe.getStreamChecked(e);xe.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new xe.ErrnoError(28);var r;"string"==typeof e?r=xe.lookupPath(e,{follow:!0}).node:r=e;if(!r.node_ops.setattr)throw new xe.ErrnoError(63);if(xe.isDir(r.mode))throw new xe.ErrnoError(31);if(!xe.isFile(r.mode))throw new xe.ErrnoError(28);var n=xe.nodePermissions(r,"w");if(n)throw new xe.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=xe.getStreamChecked(e);if(0==(2097155&r.flags))throw new xe.ErrnoError(28);xe.truncate(r.node,t)},utime(e,t,r){var n=xe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open(e,t,r){if(""===e)throw new xe.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Ce(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=ce.normalize(e);try{n=xe.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(n){if(128&t)throw new xe.ErrnoError(20)}else n=xe.mknod(e,r,0),s=!0;if(!n)throw new xe.ErrnoError(44);if(xe.isChrdev(n.mode)&&(t&=-513),65536&t&&!xe.isDir(n.mode))throw new xe.ErrnoError(54);if(!s){var o=xe.mayOpen(n,t);if(o)throw new xe.ErrnoError(o)}512&t&&!s&&xe.truncate(n,0),t&=-131713;var a=xe.createStream({node:n,path:xe.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return a.stream_ops.open&&a.stream_ops.open(a),!i.logReadFiles||1&t||(xe.readFiles||(xe.readFiles={}),e in xe.readFiles||(xe.readFiles[e]=1)),a},close(e){if(xe.isClosed(e))throw new xe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{xe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new xe.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new xe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,i){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(1==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.read)throw new xe.ErrnoError(28);var s=void 0!==i;if(s){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var o=e.stream_ops.read(e,t,r,n,i);return s||(e.position+=o),o},write(e,t,r,n,i,s){if(n<0||i<0)throw new xe.ErrnoError(28);if(xe.isClosed(e))throw new xe.ErrnoError(8);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(xe.isDir(e.node.mode))throw new xe.ErrnoError(31);if(!e.stream_ops.write)throw new xe.ErrnoError(28);e.seekable&&1024&e.flags&&xe.llseek(e,0,2);var o=void 0!==i;if(o){if(!e.seekable)throw new xe.ErrnoError(70)}else i=e.position;var a=e.stream_ops.write(e,t,r,n,i,s);return o||(e.position+=a),a},allocate(e,t,r){if(xe.isClosed(e))throw new xe.ErrnoError(8);if(t<0||r<=0)throw new xe.ErrnoError(28);if(0==(2097155&e.flags))throw new xe.ErrnoError(8);if(!xe.isFile(e.node.mode)&&!xe.isDir(e.node.mode))throw new xe.ErrnoError(43);if(!e.stream_ops.allocate)throw new xe.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,i){if(0!=(2&n)&&0==(2&i)&&2!=(2097155&e.flags))throw new xe.ErrnoError(2);if(1==(2097155&e.flags))throw new xe.ErrnoError(2);if(!e.stream_ops.mmap)throw new xe.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,i)},msync:(e,t,r,n,i)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,i):0,munmap:e=>0,ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new xe.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=xe.open(e,t.flags),i=xe.stat(e).size,s=new Uint8Array(i);return xe.read(n,s,0,i,0),"utf8"===t.encoding?r=fe(s,0):"binary"===t.encoding&&(r=s),xe.close(n),r},writeFile(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.flags=r.flags||577;var n=xe.open(e,r.flags,r.mode);if("string"==typeof t){var i=new Uint8Array(me(t)+1),s=ve(t,i,0,i.length);xe.write(n,i,0,s,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");xe.write(n,t,0,t.byteLength,void 0,r.canOwn)}xe.close(n)},cwd:()=>xe.currentPath,chdir(e){var t=xe.lookupPath(e,{follow:!0});if(null===t.node)throw new xe.ErrnoError(44);if(!xe.isDir(t.node.mode))throw new xe.ErrnoError(54);var r=xe.nodePermissions(t.node,"x");if(r)throw new xe.ErrnoError(r);xe.currentPath=t.path},createDefaultDirectories(){xe.mkdir("/tmp"),xe.mkdir("/home"),xe.mkdir("/home/web_user")},createDefaultDevices(){xe.mkdir("/dev"),xe.registerDevice(xe.makedev(1,3),{read:()=>0,write:(e,t,r,n,i)=>n}),xe.mkdev("/dev/null",xe.makedev(1,3)),_e.register(xe.makedev(5,0),_e.default_tty_ops),_e.register(xe.makedev(6,0),_e.default_tty1_ops),xe.mkdev("/dev/tty",xe.makedev(5,0)),xe.mkdev("/dev/tty1",xe.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(0===t&&(t=le(e).byteLength),e[--t]);xe.createDevice("/dev","random",r),xe.createDevice("/dev","urandom",r),xe.mkdir("/dev/shm"),xe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){xe.mkdir("/proc");var e=xe.mkdir("/proc/self");xe.mkdir("/proc/self/fd"),xe.mount({mount(){var t=xe.createNode(e,"fd",16895,73);return t.node_ops={lookup(e,t){var r=+t,n=xe.getStreamChecked(r),i={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return i.parent=i,i}},t}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?xe.createDevice("/dev","stdin",i.stdin):xe.symlink("/dev/tty","/dev/stdin"),i.stdout?xe.createDevice("/dev","stdout",null,i.stdout):xe.symlink("/dev/tty","/dev/stdout"),i.stderr?xe.createDevice("/dev","stderr",null,i.stderr):xe.symlink("/dev/tty1","/dev/stderr"),xe.open("/dev/stdin",0),xe.open("/dev/stdout",1),xe.open("/dev/stderr",1)},ensureErrnoError(){xe.ErrnoError||(xe.ErrnoError=function(e,t){this.name="ErrnoError",this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},xe.ErrnoError.prototype=new Error,xe.ErrnoError.prototype.constructor=xe.ErrnoError,[44].forEach((e=>{xe.genericErrors[e]=new xe.ErrnoError(e),xe.genericErrors[e].stack=""})))},staticInit(){xe.ensureErrnoError(),xe.nameTable=new Array(4096),xe.mount(we,{},"/"),xe.createDefaultDirectories(),xe.createDefaultDevices(),xe.createSpecialDirectories(),xe.filesystems={MEMFS:we}},init(e,t,r){xe.init.initialized=!0,xe.ensureErrnoError(),i.stdin=e||i.stdin,i.stdout=t||i.stdout,i.stderr=r||i.stderr,xe.createStandardStreams()},quit(){xe.init.initialized=!1;for(var e=0;ethis.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},s.prototype.setDataGetter=function(e){this.getter=e},s.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,s=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,o=1048576;i||(o=n);var a=this;a.setDataGetter((e=>{var t=e*o,i=(e+1)*o-1;if(i=Math.min(i,n-1),void 0===a.chunks[e]&&(a.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",r,!1),n!==o&&i.setRequestHeader("Range","bytes="+e+"-"+t),i.responseType="arraybuffer",i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+r+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):ye(i.responseText||"",!0)})(t,i)),void 0===a.chunks[e])throw new Error("doXHR failed!");return a.chunks[e]})),!s&&n||(o=n=1,n=this.getter(0).length,o=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=o,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!d)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new s;Object.defineProperties(o,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var a={isDevice:!1,contents:o}}else a={isDevice:!1,url:r};var c=xe.createFile(e,t,a,n,i);a.contents?c.contents=a.contents:a.url&&(c.contents=null,c.url=a.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,t,r,n,i){var s=e.node.contents;if(i>=s.length)return 0;var o=Math.min(s.length-i,n);if(s.slice)for(var a=0;a{var t=c.stream_ops[e];u[e]=function(){return xe.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,i)=>(xe.forceLoadFile(c),l(e,t,r,n,i)),u.mmap=(e,t,r,n,i)=>{xe.forceLoadFile(c);var s=be();if(!s)throw new xe.ErrnoError(48);return l(e,S,s,t,r),{ptr:s,allocated:!0}},c.stream_ops=u,c}},De=(e,t)=>e?fe(E,e,t):"",Be={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(ce.isAbs(t))return t;var n;-100===e?n=xe.cwd():n=Be.getStreamFromFD(e).path;if(0==t.length){if(!r)throw new xe.ErrnoError(44);return n}return ce.join2(n,t)},doStat(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ce.normalize(t)!==ce.normalize(xe.getPath(e.node)))return-54;throw e}A[r>>2]=n.dev,A[r+4>>2]=n.mode,C[r+8>>2]=n.nlink,A[r+12>>2]=n.uid,A[r+16>>2]=n.gid,A[r+20>>2]=n.rdev,X=[n.size>>>0,(K=n.size,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+24>>2]=X[0],A[r+28>>2]=X[1],A[r+32>>2]=4096,A[r+36>>2]=n.blocks;var i=n.atime.getTime(),s=n.mtime.getTime(),o=n.ctime.getTime();return X=[Math.floor(i/1e3)>>>0,(K=Math.floor(i/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+40>>2]=X[0],A[r+44>>2]=X[1],C[r+48>>2]=i%1e3*1e3,X=[Math.floor(s/1e3)>>>0,(K=Math.floor(s/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+56>>2]=X[0],A[r+60>>2]=X[1],C[r+64>>2]=s%1e3*1e3,X=[Math.floor(o/1e3)>>>0,(K=Math.floor(o/1e3),+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+72>>2]=X[0],A[r+76>>2]=X[1],C[r+80>>2]=o%1e3*1e3,X=[n.ino>>>0,(K=n.ino,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[r+88>>2]=X[0],A[r+92>>2]=X[1],0},doMsync(e,t,r,n,i){if(!xe.isFile(t.node.mode))throw new xe.ErrnoError(43);if(2&n)return 0;var s=E.slice(e,e+r);xe.msync(t,s,i,r,n)},varargs:void 0,get(){var e=A[+Be.varargs>>2];return Be.varargs+=4,e},getp:()=>Be.get(),getStr:e=>De(e),getStreamFromFD:e=>xe.getStreamChecked(e)};function Pe(e,t,r){Be.varargs=r;try{var n=Be.getStreamFromFD(e);switch(t){case 0:if((i=Be.get())<0)return-28;for(;xe.streams[i];)i++;return xe.createStream(n,i).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var i=Be.get();return n.flags|=i,0;case 5:i=Be.getp();return k[i+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ae(28),-1}}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return-e.errno}}function Me(e,t,r,n){Be.varargs=n;try{t=Be.getStr(t),t=Be.calculateAt(e,t);var i=n?Be.get():0;return xe.open(t,r,i).fd}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return-e.errno}}var Fe,Ue,Re,Le=(e,t,r,n,i)=>{},Oe=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Fe=e},ze=e=>{for(var t="",r=e;E[r];)t+=Fe[E[r++]];return t},Ne={},He={},je={},Ve=e=>{throw new Ue(e)},We=e=>{throw new Re(e)},$e=(e,t,r)=>{function n(t){var n=r(t);n.length!==e.length&&We("Mismatched type converter count");for(var i=0;i{He.hasOwnProperty(e)?i[t]=He[e]:(s.push(e),Ne.hasOwnProperty(e)||(Ne[e]=[]),Ne[e].push((()=>{i[t]=He[e],++o===s.length&&n(i)})))})),0===s.length&&n(i)};function Ge(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var n=t.name;if(e||Ve(`type "${n}" must have a positive integer typeid pointer`),He.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Ve(`Cannot register type '${n}' twice`)}if(He[e]=t,delete je[e],Ne.hasOwnProperty(e)){var i=Ne[e];delete Ne[e],i.forEach((e=>e()))}}function qe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ge(e,t,r)}var Ke,Xe=8,Ye=(e,t,r,n)=>{qe(e,{name:t=ze(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?r:n},argPackAdvance:Xe,readValueFromPointer:function(e){return this.fromWireType(E[e])},destructorFunction:null})},Je=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Ze=e=>{Ve(e.$$.ptrType.registeredClass.name+" instance already deleted")},Qe=!1,et=e=>{},tt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},rt=e=>{e.count.value-=1,0===e.count.value&&tt(e)},nt=(e,t,r)=>{if(t===r)return e;if(void 0===r.baseClass)return null;var n=nt(e,t,r.baseClass);return null===n?null:r.downcast(n)},it={},st=()=>Object.keys(dt).length,ot=()=>{var e=[];for(var t in dt)dt.hasOwnProperty(t)&&e.push(dt[t]);return e},at=[],ct=()=>{for(;at.length;){var e=at.pop();e.$$.deleteScheduled=!1,e.delete()}},ut=e=>{Ke=e,at.length&&Ke&&Ke(ct)},lt=()=>{i.getInheritedInstanceCount=st,i.getLiveInheritedInstances=ot,i.flushPendingDeletes=ct,i.setDelayFunction=ut},dt={},ht=(e,t)=>{for(void 0===t&&Ve("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},ft=(e,t)=>(t=ht(e,t),dt[t]),pt=(e,t)=>(t.ptrType&&t.ptr||We("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&We("Both smartPtrType and smartPtr must be specified"),t.count={value:1},vt(Object.create(e,{$$:{value:t}})));function mt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=ft(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var s,o=this.registeredClass.getActualType(t),a=it[o];if(!a)return i.call(this);s=this.isConst?a.constPointerType:a.pointerType;var c=nt(t,this.registeredClass,s.registeredClass);return null===c?i.call(this):this.isSmartPointer?pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c,smartPtrType:this,smartPtr:e}):pt(s.registeredClass.instancePrototype,{ptrType:s,ptr:c})}var vt=e=>"undefined"==typeof FinalizationRegistry?(vt=e=>e,e):(Qe=new FinalizationRegistry((e=>{rt(e.$$)})),vt=e=>{var t=e.$$;if(!!t.smartPtr){var r={$$:t};Qe.register(e,r,e)}return e},et=e=>Qe.unregister(e),vt(e)),yt=()=>{Object.assign(gt.prototype,{isAliasOf(e){if(!(this instanceof gt))return!1;if(!(e instanceof gt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return t===n&&r===i},clone(){if(this.$$.ptr||Ze(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:Je(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ve("Object already scheduled for deletion"),et(this),rt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Ze(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Ve("Object already scheduled for deletion"),at.push(this),1===at.length&&Ke&&Ke(ct),this.$$.deleteScheduled=!0,this}})};function gt(){}var _t=(e,t)=>Object.defineProperty(t,"name",{value:e}),bt=(e,t,r)=>{if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||Ve(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},wt=(e,t,r)=>{i.hasOwnProperty(e)?((void 0===r||void 0!==i[e].overloadTable&&void 0!==i[e].overloadTable[r])&&Ve(`Cannot register public name '${e}' twice`),bt(i,e,e),i.hasOwnProperty(r)&&Ve(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),i[e].overloadTable[r]=t):(i[e]=t,void 0!==r&&(i[e].numArguments=r))},St=48,Et=57,kt=e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=St&&t<=Et?`_${e}`:e};function It(e,t,r,n,i,s,o,a){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=i,this.getActualType=s,this.upcast=o,this.downcast=a,this.pureVirtualFunctions=[]}var At=(e,t,r)=>{for(;t!==r;)t.upcast||Ve(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Ct(e,t){if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Tt(e,t){var r;if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&Ve(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=At(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Ve("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:Ve(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var i=t.clone();r=this.rawShare(r,sr.toHandle((()=>i.delete()))),null!==e&&e.push(this.rawDestructor,r)}break;default:Ve("Unsupporting sharing policy")}return r}function xt(e,t){if(null===t)return this.isReference&&Ve(`null is not a valid ${this.name}`),0;t.$$||Ve(`Cannot pass "${cr(t)}" as a ${this.name}`),t.$$.ptr||Ve(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&Ve(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;return At(t.$$.ptr,r,this.registeredClass)}function Dt(e){return this.fromWireType(C[e>>2])}var Bt=()=>{Object.assign(Pt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor&&this.rawDestructor(e)},argPackAdvance:Xe,readValueFromPointer:Dt,deleteObject(e){null!==e&&e.delete()},fromWireType:mt})};function Pt(e,t,r,n,i,s,o,a,c,u,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=i,this.pointeeType=s,this.sharingPolicy=o,this.rawGetPointee=a,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,i||void 0!==t.baseClass?this.toWireType=Tt:n?(this.toWireType=Ct,this.destructorFunction=null):(this.toWireType=xt,this.destructorFunction=null)}var Mt,Ft,Ut=(e,t,r)=>{i.hasOwnProperty(e)||We("Replacing nonexistant public symbol"),void 0!==i[e].overloadTable&&void 0!==r?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)},Rt=(e,t,r)=>{var n=i["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)},Lt=[],Ot=e=>{var t=Lt[e];return t||(e>=Lt.length&&(Lt.length=e+1),Lt[e]=t=Mt.get(e)),t},zt=(e,t,r)=>e.includes("j")?Rt(e,t,r):Ot(t).apply(null,r),Nt=(e,t)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),zt(e,t,r)}},Ht=(e,t)=>{var r=(e=ze(e)).includes("j")?Nt(e,t):Ot(t);return"function"!=typeof r&&Ve(`unknown function pointer with signature ${e}: ${t}`),r},jt=(e,t)=>{var r=_t(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},r},Vt=e=>{var t=yn(e),r=ze(t);return mn(t),r},Wt=(e,t)=>{var r=[],n={};throw t.forEach((function e(t){n[t]||He[t]||(je[t]?je[t].forEach(e):(r.push(t),n[t]=!0))})),new Ft(`${e}: `+r.map(Vt).join([", "]))},$t=(e,t,r,n,i,s,o,a,c,u,l,d,h)=>{l=ze(l),s=Ht(i,s),a&&(a=Ht(o,a)),u&&(u=Ht(c,u)),h=Ht(d,h);var f=kt(l);wt(f,(function(){Wt(`Cannot construct ${l} due to unbound types`,[n])})),$e([e,t,r],n?[n]:[],(function(t){var r,i;t=t[0],i=n?(r=t.registeredClass).instancePrototype:gt.prototype;var o=_t(l,(function(){if(Object.getPrototypeOf(this)!==c)throw new Ue("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Ue(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Ue(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return e.apply(this,arguments)})),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new It(l,o,c,h,r,s,a,u);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new Pt(l,d,!0,!1,!1),m=new Pt(l+"*",d,!1,!1,!1),v=new Pt(l+" const*",d,!1,!0,!1);return it[e]={pointerType:m,constPointerType:v},Ut(f,o),[p,m,v]}))},Gt=(e,t)=>{for(var r=[],n=0;n>2]);return r},qt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Kt(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=_t(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,i=e.apply(n,t);return i instanceof Object?i:n}function Xt(e,t,r,n,i,s){var o=t.length;o<2&&Ve("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,c=!1,u=1;u0?", ":"")+h),f+=(l||s?"var rv = ":"")+"invoker(fn"+(h.length>0?", ":"")+h+");\n",c)f+="runDestructors(destructors);\n";else for(u=a?1:2;u{var o=Gt(t,r);i=Ht(n,i),$e([],[e],(function(e){var r=`constructor ${(e=e[0]).name}`;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Ue(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Wt(`Cannot construct ${e.name} due to unbound types`,o)},$e([],o,(n=>(n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Xt(r,n,null,i,s),[]))),[]}))},Jt=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},Zt=(e,t,r,n,i,s,o,a,c)=>{var u=Gt(r,n);t=ze(t),t=Jt(t),s=Ht(i,s),$e([],[e],(function(e){var n=`${(e=e[0]).name}.${t}`;function i(){Wt(`Cannot call ${n} due to unbound types`,u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),a&&e.registeredClass.pureVirtualFunctions.push(t);var l=e.registeredClass.instancePrototype,d=l[t];return void 0===d||void 0===d.overloadTable&&d.className!==e.name&&d.argCount===r-2?(i.argCount=r-2,i.className=e.name,l[t]=i):(bt(l,t,n),l[t].overloadTable[r-2]=i),$e([],u,(function(i){var a=Xt(n,i,e,s,o,c);return void 0===l[t].overloadTable?(a.argCount=r-2,l[t]=a):l[t].overloadTable[r-2]=a,[]})),[]}))};function Qt(){Object.assign(er.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function er(){this.allocated=[void 0],this.freelist=[]}var tr=new er,rr=e=>{e>=tr.reserved&&0==--tr.get(e).refcount&&tr.free(e)},nr=()=>{for(var e=0,t=tr.reserved;t{tr.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),tr.reserved=tr.allocated.length,i.count_emval_handles=nr},sr={toValue:e=>(e||Ve("Cannot use deleted val. handle = "+e),tr.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return tr.allocate({refcount:1,value:e})}}};function or(e){return this.fromWireType(A[e>>2])}var ar=(e,t)=>{qe(e,{name:t=ze(t),fromWireType:e=>{var t=sr.toValue(e);return rr(e),t},toWireType:(e,t)=>sr.toHandle(t),argPackAdvance:Xe,readValueFromPointer:or,destructorFunction:null})},cr=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},ur=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(T[e>>2])};case 8:return function(e){return this.fromWireType(x[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},lr=(e,t,r)=>{qe(e,{name:t=ze(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:Xe,readValueFromPointer:ur(t,r),destructorFunction:null})},dr=(e,t,r)=>{switch(t){case 1:return r?e=>S[e>>0]:e=>E[e>>0];case 2:return r?e=>k[e>>1]:e=>I[e>>1];case 4:return r?e=>A[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},hr=(e,t,r,n,i)=>{t=ze(t);var s=e=>e;if(0===n){var o=32-8*r;s=e=>e<>>o}var a=t.includes("unsigned");qe(e,{name:t,fromWireType:s,toWireType:a?function(e,t){return this.name,t>>>0}:function(e,t){return this.name,t},argPackAdvance:Xe,readValueFromPointer:dr(t,r,0!==n),destructorFunction:null})},fr=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function i(e){var t=C[e>>2],r=C[e+4>>2];return new n(S.buffer,r,t)}qe(e,{name:r=ze(r),fromWireType:i,argPackAdvance:Xe,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},pr=(e,t,r)=>ve(e,E,t,r),mr=(e,t)=>{var r="std::string"===(t=ze(t));qe(e,{name:t,fromWireType(e){var t,n=C[e>>2],i=e+4;if(r)for(var s=i,o=0;o<=n;++o){var a=i+o;if(o==n||0==E[a]){var c=De(s,a-s);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),s=a+1}}else{var u=new Array(n);for(o=0;o>2]=n,r&&i)pr(t,o,n+1);else if(i)for(var a=0;a255&&(mn(o),Ve("String has UTF-16 code units that do not fit in 8 bits")),E[o+a]=c}else for(a=0;a{for(var r=e,n=r>>1,i=n+t/2;!(n>=i)&&I[n];)++n;if((r=n<<1)-e>32&&vr)return vr.decode(E.subarray(e,r));for(var s="",o=0;!(o>=t/2);++o){var a=k[e+2*o>>1];if(0==a)break;s+=String.fromCharCode(a)}return s},gr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,i=(r-=2)<2*e.length?r/2:e.length,s=0;s>1]=o,t+=2}return k[t>>1]=0,t-n},_r=e=>2*e.length,br=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var i=A[e+4*r>>2];if(0==i)break;if(++r,i>=65536){var s=i-65536;n+=String.fromCharCode(55296|s>>10,56320|1023&s)}else n+=String.fromCharCode(i)}return n},wr=(e,t,r)=>{if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,i=n+r-4,s=0;s=55296&&o<=57343)o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s);if(A[t>>2]=o,(t+=4)+4>i)break}return A[t>>2]=0,t-n},Sr=e=>{for(var t=0,r=0;r=55296&&n<=57343&&++r,t+=4}return t},Er=(e,t,r)=>{var n,i,s,o,a;r=ze(r),2===t?(n=yr,i=gr,o=_r,s=()=>I,a=1):4===t&&(n=br,i=wr,o=Sr,s=()=>C,a=2),qe(e,{name:r,fromWireType:e=>{for(var r,i=C[e>>2],o=s(),c=e+4,u=0;u<=i;++u){var l=e+4+u*t;if(u==i||0==o[l>>a]){var d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return mn(e),r},toWireType:(e,n)=>{"string"!=typeof n&&Ve(`Cannot pass non-string to C++ string type ${r}`);var s=o(n),c=gn(4+s+t);return C[c>>2]=s>>a,i(n,c+4,s+t),null!==e&&e.push(mn,c),c},argPackAdvance:Xe,readValueFromPointer:or,destructorFunction(e){mn(e)}})},kr=(e,t)=>{qe(e,{isVoid:!0,name:t=ze(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,t)=>{}})},Ir={},Ar=e=>{var t=Ir[e];return void 0===t?ze(e):t},Cr=[],Tr=(e,t,r,n,i)=>(e=Cr[e])(t=sr.toValue(t),t[r=Ar(r)],n,i),xr=e=>{var t=Cr.length;return Cr.push(e),t},Dr=(e,t)=>{var r=He[e];return void 0===r&&Ve(t+" has unknown type "+Vt(e)),r},Br=(e,t)=>{for(var r=new Array(e),n=0;n>2],"parameter "+n);return r},Pr=(e,t,r)=>{var n=[],i=e.toWireType(n,r);return n.length&&(C[t>>2]=sr.toHandle(n)),i},Mr=(e,t,r)=>{var n=Br(e,t),i=n.shift();e--;var s="return function (obj, func, destructorsRef, args) {\n",o=0,a=[];0===r&&a.push("obj");for(var c=["retType"],u=[i],l=0;le.name)).join(", ")}) => ${i.name}>`;return xr(_t(h,d))},Fr=e=>{var t=sr.toValue(e);qt(t),rr(e)},Ur=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN,Rr=e=>e%4==0&&(e%100!=0||e%400==0),Lr=[0,31,60,91,121,152,182,213,244,274,305,335],Or=[0,31,59,90,120,151,181,212,243,273,304,334],zr=e=>(Rr(e.getFullYear())?Lr:Or)[e.getMonth()]+e.getDate()-1;function Nr(e,t,r){var n=Ur(e,t),i=new Date(1e3*n);A[r>>2]=i.getSeconds(),A[r+4>>2]=i.getMinutes(),A[r+8>>2]=i.getHours(),A[r+12>>2]=i.getDate(),A[r+16>>2]=i.getMonth(),A[r+20>>2]=i.getFullYear()-1900,A[r+24>>2]=i.getDay();var s=0|zr(i);A[r+28>>2]=s,A[r+36>>2]=-60*i.getTimezoneOffset();var o=new Date(i.getFullYear(),0,1),a=new Date(i.getFullYear(),6,1).getTimezoneOffset(),c=o.getTimezoneOffset(),u=0|(a!=c&&i.getTimezoneOffset()==Math.min(c,a));A[r+32>>2]=u}var Hr=e=>{var t=me(e)+1,r=gn(t);return r&&pr(e,r,t),r},jr=(e,t,r)=>{var n=(new Date).getFullYear(),i=new Date(n,0,1),s=new Date(n,6,1),o=i.getTimezoneOffset(),a=s.getTimezoneOffset(),c=Math.max(o,a);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[e>>2]=60*c,A[t>>2]=Number(o!=a);var l=u(i),d=u(s),h=Hr(l),f=Hr(d);a>2]=h,C[r+4>>2]=f):(C[r>>2]=f,C[r+4>>2]=h)},Vr=()=>{G("")},Wr=()=>Date.now(),$r=(e,t,r)=>E.copyWithin(e,t,t+r),Gr=()=>134217728,qr=e=>{var t=(e-_.buffer.byteLength+65535)/65536;try{return _.grow(t),P(),1}catch(e){}},Kr=e=>{var t=E.length;e>>>=0;var r=Gr();if(e>r)return!1;for(var n,i,s=1;s<=4;s*=2){var o=t*(1+.2/s);o=Math.min(o,e+100663296);var a=Math.min(r,(n=Math.max(e,o))+((i=65536)-n%i)%i);if(qr(a))return!0}return!1},Xr={},Yr=()=>u||"./this.program",Jr=()=>{if(!Jr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Yr()};for(var t in Xr)void 0===Xr[t]?delete e[t]:e[t]=Xr[t];var r=[];for(var t in e)r.push(`${t}=${e[t]}`);Jr.strings=r}return Jr.strings},Zr=(e,t)=>{for(var r=0;r>0]=e.charCodeAt(r);S[t>>0]=0},Qr=(e,t)=>{var r=0;return Jr().forEach(((n,i)=>{var s=t+r;C[e+4*i>>2]=s,Zr(n,s),r+=n.length+1})),0},en=(e,t)=>{var r=Jr();C[e>>2]=r.length;var n=0;return r.forEach((e=>n+=e.length+1)),C[t>>2]=n,0};function tn(e){try{var t=Be.getStreamFromFD(e);return xe.close(t),0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}function rn(e,t){try{var r=Be.getStreamFromFD(e),n=r.tty?2:xe.isDir(r.mode)?3:xe.isLink(r.mode)?7:4;return S[t>>0]=n,k[t+2>>1]=0,X=[0,(K=0,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[t+8>>2]=X[0],A[t+12>>2]=X[1],X=[0,(K=0,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[t+16>>2]=X[0],A[t+20>>2]=X[1],0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var nn=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=xe.read(e,S,o,a,n);if(c<0)return-1;if(i+=c,c>2]=s,0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}function on(e,t,r,n,i){var s=Ur(t,r);try{if(isNaN(s))return 61;var o=Be.getStreamFromFD(e);return xe.llseek(o,s,n),X=[o.position>>>0,(K=o.position,+Math.abs(K)>=1?K>0?+Math.floor(K/4294967296)>>>0:~~+Math.ceil((K-+(~~K>>>0))/4294967296)>>>0:0)],A[i>>2]=X[0],A[i+4>>2]=X[1],o.getdents&&0===s&&0===n&&(o.getdents=null),0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var an=(e,t,r,n)=>{for(var i=0,s=0;s>2],a=C[t+4>>2];t+=8;var c=xe.write(e,S,o,a,n);if(c<0)return-1;i+=c,void 0!==n&&(n+=c)}return i};function cn(e,t,r,n){try{var i=Be.getStreamFromFD(e),s=an(i,t,r);return C[n>>2]=s,0}catch(e){if(void 0===xe||"ErrnoError"!==e.name)throw e;return e.errno}}var un=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=xe.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},ln=365,dn=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&ln)===ln},set:function(e){e?this.mode|=ln:this.mode&=~ln}},write:{get:function(){return(this.mode&dn)===dn},set:function(e){e?this.mode|=dn:this.mode&=~dn}},isFolder:{get:function(){return xe.isDir(this.mode)}},isDevice:{get:function(){return xe.isChrdev(this.mode)}}}),xe.FSNode=un,xe.createPreloadedFile=Ae,xe.staticInit(),Oe(),Ue=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Re=i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},yt(),lt(),Bt(),Ft=i.UnboundTypeError=jt(Error,"UnboundTypeError"),Qt(),ir();var hn,fn={o:oe,C:Pe,u:Me,r:Le,E:Ye,F:$t,A:Yt,i:Zt,D:ar,l:lr,c:hr,b:fr,m:mr,j:Er,n:kr,f:Tr,h:rr,e:Mr,d:Fr,p:Nr,t:jr,a:Vr,g:Wr,y:$r,s:Kr,w:Qr,x:en,k:tn,v:rn,B:sn,q:on,z:cn},pn=ne(),mn=e=>(mn=pn.I)(e),vn=()=>(vn=pn.K)(),yn=e=>(yn=pn.L)(e),gn=e=>(gn=pn.M)(e),_n=e=>(_n=pn.O)(e);function bn(){function e(){hn||(hn=!0,i.calledRun=!0,D||(L(),r(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),O()))}j>0||(R(),j>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.dynCall_viiijj=(e,t,r,n,s,o,a,c)=>(i.dynCall_viiijj=pn.P)(e,t,r,n,s,o,a,c),i.dynCall_jij=(e,t,r,n)=>(i.dynCall_jij=pn.Q)(e,t,r,n),i.dynCall_jii=(e,t,r)=>(i.dynCall_jii=pn.R)(e,t,r),i.dynCall_jiji=(e,t,r,n,s)=>(i.dynCall_jiji=pn.S)(e,t,r,n,s),V=function e(){hn||bn(),hn||(V=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return bn(),t.ready}})(),a=l;function c(){var e=["1755477GsEzmR","2054192XEUVdp","random","4325488RGooHc","hypot","32eSqBjh","undefined","5574300hBBtqz","1011100lrDSWh","abs","1823862tafHsE","1088459jtGXgW"];return(c=function(){return e})()}!function(e,t){for(var r=l,n=e();;)try{if(834109===parseInt(r(418))/1+-parseInt(r(415))/2+-parseInt(r(419))/3+parseInt(r(410))/4+-parseInt(r(414))/5+-parseInt(r(417))/6+parseInt(r(408))/7*(parseInt(r(412))/8))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(c);var u=1e-6;function l(e,t){var r=c();return(l=function(e,t){return r[e-=408]})(e,t)}var d=typeof Float32Array!==a(413)?Float32Array:Array,h=Math[a(409)];var f=Math.PI/180;Math[a(411)]||(Math[a(411)]=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var p=Object.freeze({__proto__:null,EPSILON:u,get ARRAY_TYPE(){return d},RANDOM:h,setMatrixArrayType:function(e){d=e},toRadian:function(e){return e*f},equals:function(e,t){var r=a;return Math.abs(e-t)<=u*Math.max(1,Math.abs(e),Math[r(416)](t))}});function m(){var e=new(p[S(335)])(16);return d!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function v(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function y(e,t,r){var n=t[0],i=t[1],s=t[2],o=t[3],a=t[4],c=t[5],u=t[6],l=t[7],d=t[8],h=t[9],f=t[10],p=t[11],m=t[12],v=t[13],y=t[14],g=t[15],_=r[0],b=r[1],w=r[2],S=r[3];return e[0]=_*n+b*a+w*d+S*m,e[1]=_*i+b*c+w*h+S*v,e[2]=_*s+b*u+w*f+S*y,e[3]=_*o+b*l+w*p+S*g,_=r[4],b=r[5],w=r[6],S=r[7],e[4]=_*n+b*a+w*d+S*m,e[5]=_*i+b*c+w*h+S*v,e[6]=_*s+b*u+w*f+S*y,e[7]=_*o+b*l+w*p+S*g,_=r[8],b=r[9],w=r[10],S=r[11],e[8]=_*n+b*a+w*d+S*m,e[9]=_*i+b*c+w*h+S*v,e[10]=_*s+b*u+w*f+S*y,e[11]=_*o+b*l+w*p+S*g,_=r[12],b=r[13],w=r[14],S=r[15],e[12]=_*n+b*a+w*d+S*m,e[13]=_*i+b*c+w*h+S*v,e[14]=_*s+b*u+w*f+S*y,e[15]=_*o+b*l+w*p+S*g,e}function g(e,t,r){var n=t[0],i=t[1],s=t[2],o=t[3],a=n+n,c=i+i,u=s+s,l=n*a,d=n*c,h=n*u,f=i*c,p=i*u,m=s*u,v=o*a,y=o*c,g=o*u;return e[0]=1-(f+m),e[1]=d+g,e[2]=h-y,e[3]=0,e[4]=d-g,e[5]=1-(l+m),e[6]=p+v,e[7]=0,e[8]=h+y,e[9]=p-v,e[10]=1-(l+f),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function _(){var e=["sin","EPSILON","upDegrees","sqrt","1619988OUZzUa","5627375EbmrXk","ARRAY_TYPE","4891864BiEJuw","mat4(","195ytoVKS","downDegrees","565657BjtKnt","3518604lRAbhq","14osqmUN","tan","14302VFVcQI","hypot","abs","cos","leftDegrees","max","2135538onflOu"];return(_=function(){return e})()}function b(e,t){var r=S,n=t[0],i=t[1],s=t[2],o=t[4],a=t[5],c=t[6],u=t[8],l=t[9],d=t[10];return e[0]=Math[r(323)](n,i,s),e[1]=Math.hypot(o,a,c),e[2]=Math[r(323)](u,l,d),e}function w(e,t,r,n,i){var s,o=1/Math[S(321)](t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(s=1/(n-i),e[10]=(i+n)*s,e[14]=2*i*n*s):(e[10]=-1,e[14]=-2*n),e}function S(e,t){var r=_();return(S=function(e,t){return r[e-=316]})(e,t)}!function(e,t){for(var r=S,n=e();;)try{if(709244===parseInt(r(318))/1+parseInt(r(322))/2*(parseInt(r(316))/3)+parseInt(r(333))/4+-parseInt(r(334))/5+-parseInt(r(319))/6+parseInt(r(320))/7*(parseInt(r(336))/8)+-parseInt(r(328))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(_);var E=w;function k(e,t,r,n,i,s,o){var a=1/(t-r),c=1/(n-i),u=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*a,e[13]=(i+n)*c,e[14]=(o+s)*u,e[15]=1,e}var I=k;function A(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}var C=y,T=A,x=Object.freeze({__proto__:null,create:m,clone:function(e){var t=new(p[S(335)])(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},fromValues:function(e,t,r,n,i,s,o,a,c,u,l,h,f,p,m,v){var y=new d(16);return y[0]=e,y[1]=t,y[2]=r,y[3]=n,y[4]=i,y[5]=s,y[6]=o,y[7]=a,y[8]=c,y[9]=u,y[10]=l,y[11]=h,y[12]=f,y[13]=p,y[14]=m,y[15]=v,y},set:function(e,t,r,n,i,s,o,a,c,u,l,d,h,f,p,m,v){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=s,e[5]=o,e[6]=a,e[7]=c,e[8]=u,e[9]=l,e[10]=d,e[11]=h,e[12]=f,e[13]=p,e[14]=m,e[15]=v,e},identity:v,transpose:function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],s=t[6],o=t[7],a=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=s,e[11]=t[14],e[12]=i,e[13]=o,e[14]=a}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e},invert:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],l=t[8],d=t[9],h=t[10],f=t[11],p=t[12],m=t[13],v=t[14],y=t[15],g=r*a-n*o,_=r*c-i*o,b=r*u-s*o,w=n*c-i*a,S=n*u-s*a,E=i*u-s*c,k=l*m-d*p,I=l*v-h*p,A=l*y-f*p,C=d*v-h*m,T=d*y-f*m,x=h*y-f*v,D=g*x-_*T+b*C+w*A-S*I+E*k;return D?(D=1/D,e[0]=(a*x-c*T+u*C)*D,e[1]=(i*T-n*x-s*C)*D,e[2]=(m*E-v*S+y*w)*D,e[3]=(h*S-d*E-f*w)*D,e[4]=(c*A-o*x-u*I)*D,e[5]=(r*x-i*A+s*I)*D,e[6]=(v*b-p*E-y*_)*D,e[7]=(l*E-h*b+f*_)*D,e[8]=(o*T-a*A+u*k)*D,e[9]=(n*A-r*T-s*k)*D,e[10]=(p*S-m*b+y*g)*D,e[11]=(d*b-l*S-f*g)*D,e[12]=(a*I-o*C-c*k)*D,e[13]=(r*C-n*I+i*k)*D,e[14]=(m*_-p*w-v*g)*D,e[15]=(l*w-d*_+h*g)*D,e):null},adjoint:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=t[4],a=t[5],c=t[6],u=t[7],l=t[8],d=t[9],h=t[10],f=t[11],p=t[12],m=t[13],v=t[14],y=t[15];return e[0]=a*(h*y-f*v)-d*(c*y-u*v)+m*(c*f-u*h),e[1]=-(n*(h*y-f*v)-d*(i*y-s*v)+m*(i*f-s*h)),e[2]=n*(c*y-u*v)-a*(i*y-s*v)+m*(i*u-s*c),e[3]=-(n*(c*f-u*h)-a*(i*f-s*h)+d*(i*u-s*c)),e[4]=-(o*(h*y-f*v)-l*(c*y-u*v)+p*(c*f-u*h)),e[5]=r*(h*y-f*v)-l*(i*y-s*v)+p*(i*f-s*h),e[6]=-(r*(c*y-u*v)-o*(i*y-s*v)+p*(i*u-s*c)),e[7]=r*(c*f-u*h)-o*(i*f-s*h)+l*(i*u-s*c),e[8]=o*(d*y-f*m)-l*(a*y-u*m)+p*(a*f-u*d),e[9]=-(r*(d*y-f*m)-l*(n*y-s*m)+p*(n*f-s*d)),e[10]=r*(a*y-u*m)-o*(n*y-s*m)+p*(n*u-s*a),e[11]=-(r*(a*f-u*d)-o*(n*f-s*d)+l*(n*u-s*a)),e[12]=-(o*(d*v-h*m)-l*(a*v-c*m)+p*(a*h-c*d)),e[13]=r*(d*v-h*m)-l*(n*v-i*m)+p*(n*h-i*d),e[14]=-(r*(a*v-c*m)-o*(n*v-i*m)+p*(n*c-i*a)),e[15]=r*(a*h-c*d)-o*(n*h-i*d)+l*(n*c-i*a),e},determinant:function(e){var t=e[0],r=e[1],n=e[2],i=e[3],s=e[4],o=e[5],a=e[6],c=e[7],u=e[8],l=e[9],d=e[10],h=e[11],f=e[12],p=e[13],m=e[14],v=e[15];return(t*o-r*s)*(d*v-h*m)-(t*a-n*s)*(l*v-h*p)+(t*c-i*s)*(l*m-d*p)+(r*a-n*o)*(u*v-h*f)-(r*c-i*o)*(u*m-d*f)+(n*c-i*a)*(u*p-l*f)},multiply:y,translate:function(e,t,r){var n,i,s,o,a,c,u,l,d,h,f,p,m=r[0],v=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*v+t[8]*y+t[12],e[13]=t[1]*m+t[5]*v+t[9]*y+t[13],e[14]=t[2]*m+t[6]*v+t[10]*y+t[14],e[15]=t[3]*m+t[7]*v+t[11]*y+t[15]):(n=t[0],i=t[1],s=t[2],o=t[3],a=t[4],c=t[5],u=t[6],l=t[7],d=t[8],h=t[9],f=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=s,e[3]=o,e[4]=a,e[5]=c,e[6]=u,e[7]=l,e[8]=d,e[9]=h,e[10]=f,e[11]=p,e[12]=n*m+a*v+d*y+t[12],e[13]=i*m+c*v+h*y+t[13],e[14]=s*m+u*v+f*y+t[14],e[15]=o*m+l*v+p*y+t[15]),e},scale:function(e,t,r){var n=r[0],i=r[1],s=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*s,e[9]=t[9]*s,e[10]=t[10]*s,e[11]=t[11]*s,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},rotate:function(e,t,r,n){var i,s,o,a,c,u,l,d,h,f,m,v,y,g,_,b,w,E,k,I,A,C,T,x,D=S,B=n[0],P=n[1],M=n[2],F=Math[D(323)](B,P,M);return F0?(r[0]=2*(a*o+l*n+c*s-u*i)/d,r[1]=2*(c*o+l*i+u*n-a*s)/d,r[2]=2*(u*o+l*s+a*i-c*n)/d):(r[0]=2*(a*o+l*n+c*s-u*i),r[1]=2*(c*o+l*i+u*n-a*s),r[2]=2*(u*o+l*s+a*i-c*n)),g(e,t,r),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:b,getRotation:function(e,t){var r=S,n=new(p[r(335)])(3);b(n,t);var i=1/n[0],s=1/n[1],o=1/n[2],a=t[0]*i,c=t[1]*s,u=t[2]*o,l=t[4]*i,d=t[5]*s,h=t[6]*o,f=t[8]*i,m=t[9]*s,v=t[10]*o,y=a+d+v,g=0;return y>0?(g=2*Math[r(332)](y+1),e[3]=.25*g,e[0]=(h-m)/g,e[1]=(f-u)/g,e[2]=(c-l)/g):a>d&&a>v?(g=2*Math.sqrt(1+a-d-v),e[3]=(h-m)/g,e[0]=.25*g,e[1]=(c+l)/g,e[2]=(f+u)/g):d>v?(g=2*Math[r(332)](1+d-a-v),e[3]=(f-u)/g,e[0]=(c+l)/g,e[1]=.25*g,e[2]=(h+m)/g):(g=2*Math[r(332)](1+v-a-d),e[3]=(c-l)/g,e[0]=(f+u)/g,e[1]=(h+m)/g,e[2]=.25*g),e},fromRotationTranslationScale:function(e,t,r,n){var i=t[0],s=t[1],o=t[2],a=t[3],c=i+i,u=s+s,l=o+o,d=i*c,h=i*u,f=i*l,p=s*u,m=s*l,v=o*l,y=a*c,g=a*u,_=a*l,b=n[0],w=n[1],S=n[2];return e[0]=(1-(p+v))*b,e[1]=(h+_)*b,e[2]=(f-g)*b,e[3]=0,e[4]=(h-_)*w,e[5]=(1-(d+v))*w,e[6]=(m+y)*w,e[7]=0,e[8]=(f+g)*S,e[9]=(m-y)*S,e[10]=(1-(d+p))*S,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e},fromRotationTranslationScaleOrigin:function(e,t,r,n,i){var s=t[0],o=t[1],a=t[2],c=t[3],u=s+s,l=o+o,d=a+a,h=s*u,f=s*l,p=s*d,m=o*l,v=o*d,y=a*d,g=c*u,_=c*l,b=c*d,w=n[0],S=n[1],E=n[2],k=i[0],I=i[1],A=i[2],C=(1-(m+y))*w,T=(f+b)*w,x=(p-_)*w,D=(f-b)*S,B=(1-(h+y))*S,P=(v+g)*S,M=(p+_)*E,F=(v-g)*E,U=(1-(h+m))*E;return e[0]=C,e[1]=T,e[2]=x,e[3]=0,e[4]=D,e[5]=B,e[6]=P,e[7]=0,e[8]=M,e[9]=F,e[10]=U,e[11]=0,e[12]=r[0]+k-(C*k+D*I+M*A),e[13]=r[1]+I-(T*k+B*I+F*A),e[14]=r[2]+A-(x*k+P*I+U*A),e[15]=1,e},fromQuat:function(e,t){var r=t[0],n=t[1],i=t[2],s=t[3],o=r+r,a=n+n,c=i+i,u=r*o,l=n*o,d=n*a,h=i*o,f=i*a,p=i*c,m=s*o,v=s*a,y=s*c;return e[0]=1-d-p,e[1]=l+y,e[2]=h-v,e[3]=0,e[4]=l-y,e[5]=1-u-p,e[6]=f+m,e[7]=0,e[8]=h+v,e[9]=f-m,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},frustum:function(e,t,r,n,i,s,o){var a=1/(r-t),c=1/(i-n),u=1/(s-o);return e[0]=2*s*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*s*c,e[6]=0,e[7]=0,e[8]=(r+t)*a,e[9]=(i+n)*c,e[10]=(o+s)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*s*2*u,e[15]=0,e},perspectiveNO:w,perspective:E,perspectiveZO:function(e,t,r,n,i){var s,o=1/Math[S(321)](t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(s=1/(n-i),e[10]=i*s,e[14]=i*n*s):(e[10]=-1,e[14]=-n),e},perspectiveFromFieldOfView:function(e,t,r,n){var i=S,s=Math.tan(t[i(331)]*Math.PI/180),o=Math[i(321)](t[i(317)]*Math.PI/180),a=Math.tan(t[i(326)]*Math.PI/180),c=Math[i(321)](t.rightDegrees*Math.PI/180),u=2/(a+c),l=2/(s+o);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-(a-c)*u*.5,e[9]=(s-o)*l*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e},orthoNO:k,ortho:I,orthoZO:function(e,t,r,n,i,s,o){var a=1/(t-r),c=1/(n-i),u=1/(s-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*c,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=u,e[11]=0,e[12]=(t+r)*a,e[13]=(i+n)*c,e[14]=s*u,e[15]=1,e},lookAt:function(e,t,r,n){var i,s,o,a,c,l,d,h,f,m,y=S,g=t[0],_=t[1],b=t[2],w=n[0],E=n[1],k=n[2],I=r[0],A=r[1],C=r[2];return Math[y(324)](g-I)0&&(d*=p=1/Math[i(332)](p),h*=p,f*=p);var m=u*f-l*h,v=l*d-c*f,y=c*h-u*d;return(p=m*m+v*v+y*y)>0&&(m*=p=1/Math[i(332)](p),v*=p,y*=p),e[0]=m,e[1]=v,e[2]=y,e[3]=0,e[4]=h*y-f*v,e[5]=f*m-d*y,e[6]=d*v-h*m,e[7]=0,e[8]=d,e[9]=h,e[10]=f,e[11]=0,e[12]=s,e[13]=o,e[14]=a,e[15]=1,e},str:function(e){return S(337)+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math[S(323)](e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},subtract:A,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:function(e,t){var r=S,n=e[0],i=e[1],s=e[2],o=e[3],a=e[4],c=e[5],l=e[6],d=e[7],h=e[8],f=e[9],m=e[10],v=e[11],y=e[12],g=e[13],_=e[14],b=e[15],w=t[0],E=t[1],k=t[2],I=t[3],A=t[4],C=t[5],T=t[6],x=t[7],D=t[8],B=t[9],P=t[10],M=t[11],F=t[12],U=t[13],R=t[14],L=t[15];return Math.abs(n-w)<=p[r(330)]*Math[r(327)](1,Math[r(324)](n),Math.abs(w))&&Math[r(324)](i-E)<=p[r(330)]*Math[r(327)](1,Math[r(324)](i),Math[r(324)](E))&&Math[r(324)](s-k)<=u*Math[r(327)](1,Math[r(324)](s),Math.abs(k))&&Math[r(324)](o-I)<=p[r(330)]*Math[r(327)](1,Math.abs(o),Math.abs(I))&&Math.abs(a-A)<=p[r(330)]*Math[r(327)](1,Math[r(324)](a),Math.abs(A))&&Math[r(324)](c-C)<=p[r(330)]*Math.max(1,Math[r(324)](c),Math[r(324)](C))&&Math[r(324)](l-T)<=p[r(330)]*Math[r(327)](1,Math[r(324)](l),Math[r(324)](T))&&Math[r(324)](d-x)<=p[r(330)]*Math[r(327)](1,Math[r(324)](d),Math[r(324)](x))&&Math.abs(h-D)<=u*Math.max(1,Math.abs(h),Math[r(324)](D))&&Math[r(324)](f-B)<=p[r(330)]*Math[r(327)](1,Math.abs(f),Math[r(324)](B))&&Math[r(324)](m-P)<=p[r(330)]*Math[r(327)](1,Math[r(324)](m),Math[r(324)](P))&&Math[r(324)](v-M)<=p[r(330)]*Math[r(327)](1,Math[r(324)](v),Math.abs(M))&&Math[r(324)](y-F)<=p[r(330)]*Math[r(327)](1,Math[r(324)](y),Math.abs(F))&&Math[r(324)](g-U)<=p[r(330)]*Math[r(327)](1,Math[r(324)](g),Math.abs(U))&&Math[r(324)](_-R)<=p[r(330)]*Math[r(327)](1,Math.abs(_),Math[r(324)](R))&&Math.abs(b-L)<=p[r(330)]*Math.max(1,Math[r(324)](b),Math[r(324)](L))},mul:C,sub:T});function D(){var e=H,t=new d(3);return p[e(375)]!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function B(e){var t=H,r=e[0],n=e[1],i=e[2];return Math[t(371)](r,n,i)}function P(e,t,r){var n=new(p[H(375)])(3);return n[0]=e,n[1]=t,n[2]=r,n}function M(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function F(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function U(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function R(){var e=["hypot","min","6fSsrlt","abs","ARRAY_TYPE","vec3(","477932oGIbFb","RANDOM","max","344155bovHhu","2611600CNGTKz","sin","cos","9OGPCiB","10398BByuEP","EPSILON","8951vfUMOd","length","floor","acos","ceil","763vLkQJm","round","850320tKWIvx","sqrt","205800rJzsDn"];return(R=function(){return e})()}function L(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.hypot(r,n,i)}function O(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}function z(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function N(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function H(e,t){var r=R();return(H=function(e,t){return r[e-=363]})(e,t)}!function(e,t){for(var r=H,n=e();;)try{if(120269===parseInt(r(387))/1+parseInt(r(370))/2+-parseInt(r(373))/3*(parseInt(r(377))/4)+parseInt(r(380))/5+parseInt(r(385))/6*(-parseInt(r(366))/7)+parseInt(r(368))/8+parseInt(r(384))/9*(parseInt(r(381))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(R);var j,V=M,W=F,$=U,G=L,q=O,K=B,X=z,Y=(j=D(),function(e,t,r,n,i,s){var o,a,c=H;for(!t&&(t=3),!r&&(r=0),a=n?Math[c(372)](n*t+r,e[c(388)]):e[c(388)],o=r;o0&&(o=1/Math[r(369)](o)),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o,e},dot:N,cross:function(e,t,r){var n=t[0],i=t[1],s=t[2],o=r[0],a=r[1],c=r[2];return e[0]=i*c-s*a,e[1]=s*o-n*c,e[2]=n*a-i*o,e},lerp:function(e,t,r,n){var i=t[0],s=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=s+n*(r[1]-s),e[2]=o+n*(r[2]-o),e},hermite:function(e,t,r,n,i,s){var o=s*s,a=o*(2*s-3)+1,c=o*(s-2)+s,u=o*(s-1),l=o*(3-2*s);return e[0]=t[0]*a+r[0]*c+n[0]*u+i[0]*l,e[1]=t[1]*a+r[1]*c+n[1]*u+i[1]*l,e[2]=t[2]*a+r[2]*c+n[2]*u+i[2]*l,e},bezier:function(e,t,r,n,i,s){var o=1-s,a=o*o,c=s*s,u=a*o,l=3*s*a,d=3*c*o,h=c*s;return e[0]=t[0]*u+r[0]*l+n[0]*d+i[0]*h,e[1]=t[1]*u+r[1]*l+n[1]*d+i[1]*h,e[2]=t[2]*u+r[2]*l+n[2]*d+i[2]*h,e},random:function(e,t){var r=H;t=t||1;var n=2*p[r(378)]()*Math.PI,i=2*h()-1,s=Math[r(369)](1-i*i)*t;return e[0]=Math[r(383)](n)*s,e[1]=Math.sin(n)*s,e[2]=i*t,e},transformMat4:function(e,t,r){var n=t[0],i=t[1],s=t[2],o=r[3]*n+r[7]*i+r[11]*s+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*s+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*s+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*s+r[14])/o,e},transformMat3:function(e,t,r){var n=t[0],i=t[1],s=t[2];return e[0]=n*r[0]+i*r[3]+s*r[6],e[1]=n*r[1]+i*r[4]+s*r[7],e[2]=n*r[2]+i*r[5]+s*r[8],e},transformQuat:function(e,t,r){var n=r[0],i=r[1],s=r[2],o=r[3],a=t[0],c=t[1],u=t[2],l=i*u-s*c,d=s*a-n*u,h=n*c-i*a,f=i*h-s*d,p=s*l-n*h,m=n*d-i*l,v=2*o;return l*=v,d*=v,h*=v,f*=2,p*=2,m*=2,e[0]=a+l+f,e[1]=c+d+p,e[2]=u+h+m,e},rotateX:function(e,t,r,n){var i=H,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[0],o[1]=s[1]*Math[i(383)](n)-s[2]*Math[i(382)](n),o[2]=s[1]*Math[i(382)](n)+s[2]*Math[i(383)](n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateY:function(e,t,r,n){var i=H,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[2]*Math[i(382)](n)+s[0]*Math[i(383)](n),o[1]=s[1],o[2]=s[2]*Math.cos(n)-s[0]*Math[i(382)](n),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateZ:function(e,t,r,n){var i=H,s=[],o=[];return s[0]=t[0]-r[0],s[1]=t[1]-r[1],s[2]=t[2]-r[2],o[0]=s[0]*Math.cos(n)-s[1]*Math[i(382)](n),o[1]=s[0]*Math.sin(n)+s[1]*Math[i(383)](n),o[2]=s[2],e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},angle:function(e,t){var r=H,n=e[0],i=e[1],s=e[2],o=t[0],a=t[1],c=t[2],u=Math.sqrt(n*n+i*i+s*s)*Math.sqrt(o*o+a*a+c*c),l=u&&N(e,t)/u;return Math[r(364)](Math[r(372)](Math.max(l,-1),1))},zero:function(e){return e[0]=0,e[1]=0,e[2]=0,e},str:function(e){return H(376)+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},equals:function(e,t){var r=H,n=e[0],i=e[1],s=e[2],o=t[0],a=t[1],c=t[2];return Math[r(374)](n-o)<=p[r(386)]*Math.max(1,Math[r(374)](n),Math[r(374)](o))&&Math[r(374)](i-a)<=p[r(386)]*Math[r(379)](1,Math[r(374)](i),Math[r(374)](a))&&Math[r(374)](s-c)<=p[r(386)]*Math[r(379)](1,Math[r(374)](s),Math[r(374)](c))},sub:V,mul:W,div:$,dist:G,sqrDist:q,len:K,sqrLen:X,forEach:Y});function Z(e,t){var r=Q();return(Z=function(e,t){return r[e-=423]})(e,t)}function Q(){var e=["7IKKJvQ","1922oibuZS","1020582gGHysu","521424dGdKrf","794056QrLezW","1465713kJxJQy","941090akqhGR","121637xRZkUk","261feiqFV"];return(Q=function(){return e})()}function ee(e,t){const r=re();return(ee=function(e,t){return r[e-=377]})(e,t)}!function(e,t){for(var r=Z,n=e();;)try{if(122907===parseInt(r(430))/1+-parseInt(r(424))/2*(parseInt(r(431))/3)+parseInt(r(426))/4+parseInt(r(429))/5+-parseInt(r(425))/6+-parseInt(r(423))/7*(-parseInt(r(427))/8)+-parseInt(r(428))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Q),function(e,t){const r=ee,n=e();for(;;)try{if(208449===-parseInt(r(451))/1+-parseInt(r(453))/2*(parseInt(r(438))/3)+parseInt(r(431))/4+-parseInt(r(447))/5+parseInt(r(390))/6+-parseInt(r(448))/7*(-parseInt(r(422))/8)+-parseInt(r(455))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(re);var te=(e,t)=>{const r=ee,n=r(387);t&&e[r(459)](e[r(461)],1);const i=function(){const t=r,i=h(e.VERTEX_SHADER,n),s=h(e[t(384)],"\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),o=e[t(397)]();return e[t(415)](o,i),e.attachShader(o,s),e[t(418)](o),e[t(429)](o,e[t(434)])?o:(console[t(414)](t(436)+e[t(401)](o)),null)}();let s={program:i,attribLocations:{vertexPosition:e[r(430)](i,r(439)),texturePosition:e.getAttribLocation(i,r(383))},uniformLocations:{projectionMatrix:e[r(435)](i,r(456)),modelMatrix:e.getUniformLocation(i,r(474)),viewMatrix:e[r(435)](i,r(432)),rgbatexture:e[r(435)](i,r(476)),ytexture:e[r(435)](i,r(377)),utexture:e[r(435)](i,r(454)),vtexture:e[r(435)](i,"vTexture"),isyuv:e.getUniformLocation(i,r(396))}},o=function(){const t=r,n=e[t(389)]();e.bindBuffer(e[t(395)],n);e[t(475)](e.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),e[t(437)]);var i=[];i=i[t(424)]([0,1],[1,1],[1,0],[0,0]);const s=e[t(389)]();e[t(378)](e[t(395)],s),e[t(475)](e[t(395)],new Float32Array(i),e[t(437)]);const o=e[t(389)]();e[t(378)](e[t(400)],o);return e[t(475)](e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e[t(437)]),{position:n,texPosition:s,indices:o}}(),a=d(),c=d(),u=d(),l=d();function d(){const t=r;let n=e[t(444)]();return e[t(409)](e.TEXTURE_2D,n),e[t(462)](e.TEXTURE_2D,e[t(458)],e.LINEAR),e[t(462)](e[t(402)],e[t(460)],e[t(441)]),e[t(462)](e[t(402)],e[t(413)],e[t(428)]),e.texParameteri(e[t(402)],e[t(381)],e[t(428)]),n}function h(t,n){const i=r,s=e[i(423)](t);return e.shaderSource(s,n),e.compileShader(s),e[i(416)](s,e[i(464)])?s:(console[i(414)](i(408)+e[i(403)](s)),e[i(406)](s),null)}function f(t,n){const i=r;e[i(386)](0,0,t,n),e[i(407)](0,0,0,0),e[i(379)](1),e[i(405)](e[i(450)]),e[i(417)](e.LEQUAL),e[i(393)](e[i(420)]|e[i(469)]);const a=m();x[i(382)](a,-1,1,-1,1,.1,100);const d=x[i(443)]();x[i(425)](d);const h=x[i(443)]();x[i(463)](h,J[i(466)](0,0,0),P(0,0,-1),P(0,1,0));{const t=3,r=e[i(470)],n=!1,a=0,c=0;e.bindBuffer(e[i(395)],o[i(426)]),e.vertexAttribPointer(s[i(452)][i(467)],t,r,n,a,c),e[i(440)](s[i(452)][i(467)])}{const t=2,r=e[i(470)],n=!1,a=0,c=0;e[i(378)](e.ARRAY_BUFFER,o[i(411)]),e[i(468)](s.attribLocations[i(442)],t,r,n,a,c),e[i(440)](s[i(452)].texturePosition)}e[i(410)](e[i(398)]+3),e.bindTexture(e[i(402)],c),e.activeTexture(e[i(398)]+4),e[i(409)](e[i(402)],u),e.activeTexture(e[i(398)]+5),e.bindTexture(e[i(402)],l),e[i(378)](e.ELEMENT_ARRAY_BUFFER,o.indices),e[i(394)](s[i(433)]),e[i(404)](s[i(392)][i(399)],!1,a),e[i(404)](s.uniformLocations.modelMatrix,!1,d),e.uniformMatrix4fv(s.uniformLocations[i(449)],!1,h),e.uniform1i(s[i(392)][i(419)],2),e[i(385)](s[i(392)].ytexture,3),e[i(385)](s[i(392)][i(465)],4),e[i(385)](s[i(392)][i(427)],5),e[i(385)](s[i(392)][i(396)],1);{const t=6,r=e.UNSIGNED_SHORT,n=0;e.drawElements(e[i(445)],t,r,n)}}return{render:function(t,n,i,s,o){const a=r;e[a(410)](e[a(398)]),e.bindTexture(e[a(402)],c),e[a(380)](e[a(402)],0,e[a(446)],t,n,0,e[a(446)],e[a(388)],i),e.activeTexture(e[a(412)]),e[a(409)](e.TEXTURE_2D,u),e[a(380)](e[a(402)],0,e[a(446)],t/2,n/2,0,e.LUMINANCE,e.UNSIGNED_BYTE,s),e[a(410)](e.TEXTURE2),e.bindTexture(e[a(402)],l),e.texImage2D(e[a(402)],0,e[a(446)],t/2,n/2,0,e[a(446)],e.UNSIGNED_BYTE,o),f(t,n)},renderYUV:function(t,n,i){const s=r;let o=i[s(457)](0,t*n),a=i.slice(t*n,t*n*5/4),d=i.slice(t*n*5/4,t*n*3/2);e[s(410)](e[s(398)]),e[s(409)](e[s(402)],c),e[s(380)](e[s(402)],0,e[s(446)],t,n,0,e.LUMINANCE,e[s(388)],o),e[s(410)](e[s(412)]),e.bindTexture(e.TEXTURE_2D,u),e[s(380)](e[s(402)],0,e.LUMINANCE,t/2,n/2,0,e[s(446)],e[s(388)],a),e[s(410)](e[s(473)]),e[s(409)](e.TEXTURE_2D,l),e[s(380)](e[s(402)],0,e[s(446)],t/2,n/2,0,e[s(446)],e.UNSIGNED_BYTE,d),f(t,n)},destroy:function(){const t=r;e[t(471)](s[t(433)]),e[t(421)](o[t(426)]),e[t(421)](o[t(411)]),e.deleteBuffer(o[t(472)]),e[t(391)](a),e.deleteTexture(c),e.deleteTexture(u),e.deleteTexture(l),s=null,o=null,a=null,c=null,u=null,l=null}}};function re(){const e=["createTexture","TRIANGLES","LUMINANCE","892990nDSVME","203189vTBkFm","viewMatrix","DEPTH_TEST","33721GnEAAQ","attribLocations","159454ZUEMMo","uTexture","3395601xDnAZC","uProjectionMatrix","slice","TEXTURE_MAG_FILTER","pixelStorei","TEXTURE_MIN_FILTER","UNPACK_ALIGNMENT","texParameteri","lookAt","COMPILE_STATUS","utexture","fromValues","vertexPosition","vertexAttribPointer","DEPTH_BUFFER_BIT","FLOAT","deleteProgram","indices","TEXTURE2","uModelMatrix","bufferData","rgbaTexture","yTexture","bindBuffer","clearDepth","texImage2D","TEXTURE_WRAP_T","ortho","aTexturePosition","FRAGMENT_SHADER","uniform1i","viewport","\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n uniform mat4 uModelMatrix;\n uniform mat4 uViewMatrix;\n uniform mat4 uProjectionMatrix;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n ","UNSIGNED_BYTE","createBuffer","1016628tCkvnv","deleteTexture","uniformLocations","clear","useProgram","ARRAY_BUFFER","isyuv","createProgram","TEXTURE0","projectionMatrix","ELEMENT_ARRAY_BUFFER","getProgramInfoLog","TEXTURE_2D","getShaderInfoLog","uniformMatrix4fv","enable","deleteShader","clearColor","An error occurred compiling the shaders: ","bindTexture","activeTexture","texPosition","TEXTURE1","TEXTURE_WRAP_S","log","attachShader","getShaderParameter","depthFunc","linkProgram","rgbatexture","COLOR_BUFFER_BIT","deleteBuffer","104ebxRQS","createShader","concat","identity","position","vtexture","CLAMP_TO_EDGE","getProgramParameter","getAttribLocation","1323980kEianp","uViewMatrix","program","LINK_STATUS","getUniformLocation","Unable to initialize the shader program: ","STATIC_DRAW","3syyYvr","aVertexPosition","enableVertexAttribArray","LINEAR","texturePosition","create"];return(re=function(){return e})()}const ne=$e;!function(e,t){const r=$e,n=e();for(;;)try{if(747550===parseInt(r(858))/1*(parseInt(r(541))/2)+parseInt(r(504))/3+-parseInt(r(472))/4+parseInt(r(646))/5*(parseInt(r(771))/6)+-parseInt(r(872))/7+-parseInt(r(566))/8*(parseInt(r(874))/9)+-parseInt(r(905))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ve);const ie={websocket:1,fetch:2,hls:3,webrtc:4,webTransport:5,aliyunRtc:6,ts:7};ne(904),ne(840),ne(542),ne(513),ne(545);const se={fetch:ne(840),hls:ne(542),websocket:"websocket",webrtc:ne(513),webTransport:ne(453),worker:ne(490),aliyunRtc:"aliyunRtc",mp4:ne(639)},oe={player:ne(612),playerAudio:ne(887),playbackTF:ne(755),talk:ne(785),playVod:ne(815)},ae={mp4:ne(639),webm:ne(773),flv:ne(693),mov:ne(767)},ce={flv:ne(693),m7s:ne(921),hls:"hls",webrtc:ne(513),webTransport:"webTransport",nakedFlow:ne(873),fmp4:"fmp4",mpeg4:ne(574),aliyunRtc:ne(545),ts:"ts",g711:"g711",pcm:"pcm"};ne(724),ne(610),ne(697),ne(636),ne(616),ne(473);const ue={mse:"mse",wcs:ne(677),offscreen:"offscreen",wasm:"wasm",simd:"simd",mt:"mt",webrtc:ne(513),hls:"hls",aliyunRtc:"aliyunRtc"},le={canvas:ne(783),video:ne(501)},de={debug:"debug",warn:ne(631)},he={click:ne(598),mouseDownAndUp:ne(895)},fe={normal:ne(778),simple:ne(760)},pe={normal:ne(778),small:ne(735)},me=ne(643);function ve(){const e=["talkStreamInactive","load-response-headers","playToRenderTimes","fogOpen","wasm","audioInfo","load-retry","peer-connection","endstreaming","seeked","videoTimeUpdate","download","fullscreenError","container","playVodRateChange","supportHls265","mseSourceBufferError","videoInfoError","websocketStringMsg","playVodSeek","FSimd","playVod","readystatechange","watermarkConfig","videoWaiting",'video/mp4;codecs="hev1.3.E.L120.90"',"mseWaitVideoCanplayTimeout","inView","mediaSourceAppendBufferError","left-up","replayUseLastFrameShow","down","video自动渲染失败","init","subtitle-segments","webrtcIceCandidateError","initVideo","webcodecsDecodeError","waiting","Webgl 渲染失败","webcodecs","avc","fogClose","playAudio","remote-candidate","destroyEnd","fetch","kBps","stop","local-candidate","#000","half-hour","resetAudioDecode","NotAllowedError","timeUpdate","initAudio","webcodecsH265NotSupport","webcodecsAudioNoDataTimeout","zoomExpand","left-down","tallWebsocketClosedByError","3-4","receiver","left","12191DOsCTK","playVodVideoSeekingByMse","wcsDecodeError","flv-script-data","fullScreenByStart","webrtcStreamH265","pause","zoomNarrow","checkFirstIFrame","initAudioCodec","MEDIA_ERR_ABORTED","csrc","webrtcChecking","硬解码不支持G711a/u音频格式","5623737YdORWg","nakedFlow","1532772GlVmVj","updateConfig","delayTimeout","mseUpdateVideoTimestamp","fetchStream","play() failed because the user didn't interact with the document first","webrtc-disconnected","操作盘激活","faceDetectActive","g711u","remove-buffer","播放超时重播失败","pcm","playerAudio","webcodecsAudioInitTimeout","ghostWatermarkConfig","ws1006","error","multiMousemove","streamMessage",'video/mp4;codecs="hev1.1.6.L120.90"',"mouseDownAndUp","请求结束","recording","ten-min","播放地址不能为空","playVodVideoSeekedByMse","mseAddSourceBufferError","videoInfo","multiDragenter","websocket","11810870ErLJqX","multiMouseup","cruiseStop","playVodPause","playbackStats","downloadMemoryLog","networkDelayTimeout","imageDetectActive","wasmDecodeError","right","isMpeg4","destroy","remote-outbound-rtp","online","videoDecode","mseFirstRenderTime","m7s","simdDecodeError","drawingRect","webrtcOnIceConnectionStateChange","sender",'video/mp4; codecs="avc1.64002A"',"等待音频数据超时","解码失败","decoder-pro-hard-not-wasm.js","wasmUseVideoRenderError",'video/mp4;codecs="hev1.4.10.L120.90"',"playbackSeek","MULAW(g711u)","multiMouseout","关闭电子放大","heartTimeout","recordingTimestamp","fiveMin","self","webrtcOnConnectionStateChange","hevc","talkGetUserMediaFail","4-1","3-1","loadingTimeout","g711a","open","widthOrHeightChange","decoderWorkerInit","volume","recordBlob","multiMousedown","streamDts","image/png","FLV待解封装buffer过大","webTransport","record","timeout","dynamicWatermarkConfig","mediaSourceH265NotSupport","sourceended","media-source","Decoder failure","Unsupported audio format","playVodEndedAndReplay","mseError","decoder-pro.js","progress","multiDblSelected","playFailedAndPaused","MEDIA_ERR_DECODE","talkGetUserMediaSuccess","apertureNear","multiDragleave","317124UTSdzU","AliyunRtc","webgl","websocketError","isWebrtc","电子放大","sendWsMessage","decoderWorkerInitError","memory access out of bounds","Simd","流异常","保存日志","初始化worker失败","webglAlignmentError","mseSourceClose","video decoder initialization failed","pressureObserverCpu","subtitle-playlist","worker","load","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C(wasm%E5%86%85%E9%83%A8%E4%BC%9A%E6%9A%82%E5%81%9C%E8%A7%A3%E7%A0%81)%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","playVodWaiting","MPEG4","aiOcclusionDetectResult","videoSyncAudio","playbackPreRateChange","beforeDestroy","offscreen","widthOrHeightChangeReplayDelayTime","video","talkStreamMsg","playVodEnded","3367455LjRyQJ","A key frame is required after configure() or flush()","videoSEI","tempStream","leftDown","MP3","udp","isHls","durationchange","webrtc","初始化音频解码器失败","right-up","playVodPauseOrResume","解析视频分辨率失败","mseWidthOrHeightChange","AbortError","outbound-rtp","mediaSourceAudioG711NotSupport","decoder-pro-audio.js","ratechange","videoElementPlayingFailedForWebrtc","sei-in-time","playVodCanplay","talkFailedAndStop","play","操作盘","mediaSourceBufferedIsZeroError","iframeIntervalTs","物品识别","white","delayTimeoutRetryEnd","mseSourceEndStreaming","stream-parsed","webrtcClosed","videoSEISyncPts","networkDelay","playbackTime","240EiKUyG","hls","audioCode","talkGetUserMediaTimeout","aliyunRtc","sendMessage","script","complete","isM7sCrypto","stalled","Invalid NAL unit size","videoNalu","/crypto/","isAliyunRtc","visibilityHiddenTimeout","streamEndInner","streamQualityChange","loading","metadata","streamRate","streamStats","playbackShowPrecisionChange","ALAW","ptz","playbackTimestamp","16zBIvFu","worklet","缓冲区已满","hls-manifest-loaded","resetVideoDecode","focus","isNakedFlow","遮挡物检查激活","mpeg4","notSupportNewWasm","mediaSourceDecoderConfigurationError","webgl2","videoSmooth","audioResumeState","webrtcDisconnect","mse","videoSequenceHeader","talkStreamOpen","webrtcConnected","alaw","不支持硬解码H265","flvMetaData","speed","start","playbackStreamVideoFps","fullscreen$2","initDecoderWorkerTimeout","websocketClose","sourceopen","visibilityChange","流异常结束","certificate","click","playbackJustTime","webrtc-checking","wasmWidthOrHeightChange","fiStop","occlusionDetectActive","performance","right-down","buffereos","MEDIA_ERR_SRC_NOT_SUPPORTED","AAC","websocketOpenTimeout","M7S","multiFullscreen","player","aacSequenceHeader","fetchErrorWorker","buffering","WebTransport","webgl 上下文丢失","drawingRectInfo","decoder-pro-hard.js","inbound-rtp","codec","The user aborted a request","load-start","jessibuca-pro-mp4-recorder-decoder.js","H264(AVC)","red","isWebrtcForZLM","none","canplay","请求失败","warn","startstreaming","closeEnd","playbackEnd","audioChannelError","Webrtc","image/webp","mediaSourceAudioInitTimeout","mp4","opus","isWebrtcForSRS","image/jpeg","JessibucaPro","5min","empty","1416300kWixWw","message","crashLog","recordCancel","paused","ALAW(g711a)","switch-url-success","networkState","halfHour","audio packet","av1","loadeddata","playVodTime","#343434","退出全屏","oneHour","mediaSourceAudioNoDataTimeout","talkStreamClose","loadstart","candidate-pair","vertical","音频通道错误","object","videoCode","mseHandle","multiMouseover","no-audio-track","key","videoCodec","recordStart","aiImageDetectResult","wcs","Cannot call 'decode' on a closed codec","timeupdate","seeking","focusNear","removeLoadingBgImage","streamAbps","initVideoCodec","jtt","aliyunRtcError","recordEnd","apertureFar","videoPayload","isTs","simdH264DecodeVideoWidthIsTooLarge","failedToAsynchronouslyPrepareWasm","flv","recordCreateError","playIsNotPauseOrUrlIsNull","currentPts","FMP4","close","mute","active","sourceclose","created","suspend","tenMin","render","playbackIsPause","switch-url-failed","20251201","初始化解码器失败","flvBufferData","multiIndex","ceil","aiFaceDetectorInfo","wasmError","playbackForwardMaxRateDecodeIFrame","playVodTimeCache","workerFetch","loadingTimeoutRetryEnd","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","jbprovm","playbackPrecision","volumechange","mseSourceBufferFull","FLV","clickInitPlayer","zooming","MediaSource解码使用canvas渲染失败","playing","webFullscreen","talkStreamError","wcsWidthOrHeightChange","mediaSourceUseCanvasRenderPlayFailed","遮挡物检查","websocketOpen","small","mseSourceStartStreaming","five-min","buffer","网络超时重播失败","resize","fetchSuccess","audioPayload","streamSuccess","isDropping","isFmp4","fetchError","aiObjectDetectorInfo","jbprov","decoder-pro-old.js","streamError","playbackTimeScroll","objectDetectActive","streamVbps","playVodMp4Error","playbackTF","playback","clearBuffer","netBuf","playVodStats","simple","focusFar","videoRenderSupportScale","stream","offline","playbackRateChange","streamEnd","mov","rtp","multiDragstart","blob","12NYFkok","mseDecodeError","webm","webcodecsDecodeConfigureError","playVodSeekEnd","H265(HEVC)","fetchClose","normal","HEVC decoding is not supported","webrtc-failed","isMulti","加载超时重播失败","canvas","webrtc-completed","talk","transport","playbackPauseOrResume","ended","flvDemuxBufferSizeTooLarge","wasm解码失败","Decoding error","mseSourceBufferBusy","defaultStreamQuality"];return(ve=function(){return e})()}const ye=ne(708),ge=36e5,_e=4080,be=12;ne(553),ne(748),ne(720);const we={playIsNotPauseOrUrlIsNull:ne(899),webglAlignmentError:ne(833),webglContextLostError:ne(617),mediaSourceH265NotSupport:ne(586),mseSourceBufferFull:ne(568),mediaSourceAppendBufferError:ne(709),mseSourceBufferError:ne(425),mseAddSourceBufferError:ne(709),mseWorkerAddSourceBufferError:ne(709),mediaSourceDecoderConfigurationError:"初始化解码器失败",mediaSourceTsIsMaxDiff:ne(482),mseWidthOrHeightChange:ne(482),mediaSourceAudioG711NotSupport:ne(871),mediaSourceAudioInitTimeout:ne(514),mediaSourceAudioNoDataTimeout:ne(424),mediaSourceUseCanvasRenderPlayFailed:ne(727),mediaSourceBufferedIsZeroError:ne(482),webcodecsH265NotSupport:"不支持硬解码H265",webcodecsUnsupportedConfigurationError:"初始化解码器失败",webcodecsDecodeConfigureError:ne(709),webcodecsDecodeError:ne(425),webcodecsAudioInitTimeout:ne(514),webcodecsAudioNoDataTimeout:ne(424),wcsWidthOrHeightChange:ne(425),wasmDecodeError:"解码失败",simdDecodeError:ne(425),wasmWidthOrHeightChange:ne(482),wasmUseVideoRenderError:"video自动渲染失败",videoElementPlayingFailed:ne(826),simdH264DecodeVideoWidthIsTooLarge:"不支持该分辨率的视频",networkDelayTimeout:ne(739),fetchError:ne(630),streamEnd:ne(896),websocket1006Error:ne(596),websocketError:ne(630),webrtcError:ne(630),hlsError:ne(630),decoderWorkerInitError:ne(484),decoderWorkerWasmError:ne(790),videoElementPlayingFailedForWebrtc:ne(826),videoInfoError:ne(517),webrtcStreamH265:"webrtc不支持H265",delayTimeout:ne(885),loadingTimeout:ne(782),loadingTimeoutRetryEnd:ne(782),delayTimeoutRetryEnd:ne(885),flvDemuxBufferSizeTooLarge:ne(452),audioChannelError:ne(667),aliyunRtcError:"请求失败",mseWaitVideoCanplayTimeout:ne(482),initDecoderWorkerTimeout:"初始化解码worker超时"},Se={playType:oe.player,videoBuffer:1e3,videoBufferDelay:1e3,networkDelay:1e4,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isFmp4:!1,isWebrtc:!1,isWebrtcForZLM:!1,isWebrtcForSRS:!1,webrtcForSRSBySDK:!1,isWebrtcForOthers:!1,isNakedFlow:!1,isMpeg4:!1,isAliyunRtc:!1,isTs:!1,debug:!1,debugLevel:de[ne(631)],debugUuid:"",isMulti:!0,multiIndex:-1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,pageVisibilityHiddenTimeout:300,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,heartTimeoutReplayUseLastFrameShow:!0,replayUseLastFrameShow:!0,replayShowLoadingIcon:!1,supportDblclickFullscreen:!1,showBandwidth:!1,showPerformance:!1,mseCorrectTimeDuration:20,mseCorrectAudioTimeDuration:20,keepScreenOn:!0,isNotMute:!1,muted:!0,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1,ptz:!1,quality:!1,zoom:!1,close:!1,scale:!1,performance:!1,logSave:!1,aiFace:!1,aiObject:!1,aiOcclusion:!1,fullscreenFn:null,fullscreenExitFn:null,screenshotFn:null,playFn:null,pauseFn:null,recordFn:null,recordStopFn:null},extendOperateBtns:[],contextmenuBtns:[],watermarkConfig:{},controlAutoHide:!1,controlAutoHideDelayTime:5,hasControl:!1,controlSize:pe[ne(778)],loadingIcon:!0,loadingIconStyle:{},loadingText:"",background:"",poster:"",backgroundLoadingShow:!0,loadingBackground:"",loadingBackgroundWidth:0,loadingBackgroundHeight:0,decoder:ne(464),decoderOld:ne(749),decoderAudio:ne(522),decoderHard:ne(619),decoderHardNotWasm:ne(426),wasmMp4RecorderDecoder:ne(624),decoderWASM:"",isDecoderUseCDN:!1,url:"",rotate:0,mirrorRotate:ne(628),aspectRatio:"default",playbackConfig:{playList:[],fps:"",autoCalcFps:!0,showControl:!0,controlType:fe.normal,duration:0,startTime:"",showRateBtn:!1,rateConfig:[],showPrecision:"",showPrecisionBtn:!0,isCacheBeforeDecodeForFpsRender:!1,uiUsePlaybackPause:!1,isPlaybackPauseClearCache:!0,isUseFpsRender:!1,isUseLocalCalculateTime:!1,localOneFrameTimestamp:40,supportWheel:!1,useWCS:!1,useMSE:!1,useSIMD:!0},qualityConfig:[],defaultStreamQuality:"",scaleConfig:["拉伸","缩放","正常"],forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:ie[ne(840)],demuxType:ce[ne(693)],useWasm:!1,useOldWasm:!1,useMSE:!1,useWCS:!1,useSIMD:!0,isFFmpegSIMD:!1,useMThreading:!1,preferredHardDecode:!1,wcsUseVideoRender:!0,wcsUseWebgl2Render:!1,wasmUseVideoRender:!0,mseUseCanvasRender:!1,hlsUseCanvasRender:!1,webrtcUseCanvasRender:!1,useOffscreen:!1,useWebGPU:!1,useWebCanvas:!1,mseDecodeErrorReplay:!0,wcsDecodeErrorReplay:!0,wasmDecodeErrorReplay:!0,simdDecodeErrorReplay:!0,simdDecodeErrorReplayType:ue[ne(798)],autoWasm:!0,decoderErrorAutoWasm:!1,hardDecodingNotSupportAutoWasm:!0,webglAlignmentErrorReplay:!0,webglContextLostErrorReplay:!0,openWebglAlignment:!1,syncAudioAndVideo:!0,syncAudioAndVideoDiff:400,playbackDelayTime:1e3,playbackFps:25,playVodFps:25,playbackForwardMaxRateDecodeIFrame:4,playbackCurrentTimeMove:!0,useVideoRender:!0,useCanvasRender:!1,videoRenderType:"",networkDelayTimeoutReplay:!1,recordType:ae[ne(639)],checkFirstIFrame:!0,nakedFlowFps:25,audioEngine:null,isShowRecordingUI:!0,isShowZoomingUI:!0,useFaceDetector:!1,useObjectDetector:!1,useImageDetector:!1,useOcclusionDetector:!1,ptzPositionConfig:{},ptzShowType:ne(666),ptzClickType:he[ne(598)],ptzStopEmitDelay:.3,ptzZoomShow:!1,ptzApertureShow:!1,ptzFocusShow:!1,ptzMoreArrowShow:!1,ptzCruiseShow:!1,ptzFogShow:!1,ptzWiperShow:!1,ptzSupportDraggable:!1,weiXinInAndroidAudioBufferSize:4800,isCryptoAudio:!1,isM7sCrypto:!1,isSm4Crypto:!1,isSm4CryptoH265V2:!1,isXorCrypto:!1,sm4CryptoKey:"",m7sCryptoKey:"",xorCryptoKey:"",cryptoKey:"",cryptoIV:"",cryptoKeyUrl:"",listenWindowResizeAuoResize:!0,orientationChangeResize:!1,useWebFullScreen:!1,ptsMaxDiff:3600,aiFaceDetectLevel:2,aiFaceDetectWidth:240,aiFaceDetectEmitBase64:!1,aiFaceDetectShowRect:!0,aiFaceDetectInterval:1e3,aiFaceDetectRectConfig:{},aiObjectDetectLevel:2,aiObjectDetectWidth:240,aiObjectDetectShowRect:!0,aiObjectDetectInterval:1e3,aiObjectDetectRectConfig:{},aiObjectDetectTarget:"",aiOcclusionDetectInterval:1e3,aiImageDetectDrop:!1,aiImageDetectActive:!1,videoRenderSupportScale:!0,mediaSourceTsIsMaxDiffReplay:!0,controlHtml:"",isH265:!1,isWebrtcH265:!1,supportLockScreenPlayAudio:!0,supportHls265:!0,hls265ForceFixLargeGap:!0,isEmitSEI:!1,pauseAndNextPlayUseLastFrameShow:!1,demuxUseWorker:!0,playFailedAndReplay:!0,showMessageConfig:we,videoElementPlayingFailedReplay:!0,mp4RecordUseWasm:!0,mseAutoCleanupSourceBuffer:!0,mseAutoCleanupMaxBackwardDuration:30,mseAutoCleanupMinBackwardDuration:10,widthOrHeightChangeReplay:!0,simdH264DecodeVideoWidthIsTooLargeReplay:!0,mediaSourceAudioG711NotSupportReplay:!0,mediaSourceAudioInitTimeoutReplay:!0,mediaSourceAudioNoDataTimeoutReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplayType:le[ne(501)],webcodecsAudioInitTimeoutReplay:!0,webcodecsAudioNoDataTimeoutReplay:!0,widthOrHeightChangeReplayDelayTime:0,ghostWatermarkConfig:{on:5,off:5,content:"",fontSize:12,color:ne(533),opacity:.15,speed:.2},dynamicWatermarkConfig:{content:"",speed:.2,fontSize:12,color:ne(533),opacity:.15},isDropSameTimestampGop:!1,mseDecodeAudio:!0,wcsDecodeAudio:!0,nakedFlowH265DemuxUseNew:!0,nakedFlowDemuxUseNew:!0,extendDomConfig:{html:"",showBeforePlay:!1,showAfterLoading:!0},disableContextmenu:!1,mseDecoderUseWorker:!0,openMemoryLog:!1,mainThreadFetchUseWorker:!0,playFailedAndPausedShowPlayBtn:!0,mseCorrectionTimestamp:!0,flvDemuxBufferSizeTooLargeReplay:!1,flvDemuxBufferSizeTooLargeEmitFailed:!1,flvDemuxBufferSizeMaxLarge:1048576,isCheckInView:!1,hiddenControl:!1,androidMobileFullscreenRotate:!0,disableModule:{ptz:!1,record:!1,zoom:!1,watermark:!1,playback:!1},recordWebMSupportSeek:!1,wasmPlayAudioUseVideoRender:!1,mseWaitVideoCanplayTimeout:6,mseWaitVideoCanplayAutoWasm:!0,zoomMaxScale:5,zoomSupportGestureInMobile:!1,zoomSupportGestureInMobileSpeed:.2,drawingRectColor:ne(626),drawingRectLineWidth:1,drawingRectEndRemoveDom:!0,videoSEISyncPtsDiff:.2,initShowPlayBtn:!1,playbackCheckStreamEnd:!0,autoUseSystemFullScreen:!0,playVodConfig:{showRateBtn:!1,rateConfig:[],useWCS:!1,useMSE:!0,useSIMD:!0,startTime:null},playVodForwardMaxRateDecodeIFrame:8,playVodEndedAndAutoReplay:!1,playVodEndedAndShowPlayBtn:!0,hotKeyVolumeStep:.05,hotKeySeekStep:5,websocketOpenTimeout:8,i18n:{},screenshotUseHighQuality:!1,requestAnimationFrameMaxDiff:800,isUseFileProtocol:!1};ne(715),ne(781),ne(549),ne(809),ne(824),ne(500),ne(711),ne(745),ne(915),ne(572),ne(511),ne(476),ne(627),ne(641),ne(554),ne(690),ne(889),ne(456),ne(817),ne(793),ne(762),ne(442),ne(433);const Ee={init:ne(827),initVideo:ne(830),render:ne(705),playAudio:ne(837),initAudio:ne(849),kBps:ne(841),decode:"decode",audioCode:ne(543),audioNalu:"audioNalu",audioAACSequenceHeader:"audioAACSequenceHeader",videoCode:ne(669),videoCodec:ne(674),videoNalu:ne(552),videoPayload:ne(689),audioPayload:ne(742),wasmError:ne(714),workerFetch:ne(717),iframeIntervalTs:ne(531),isDropping:ne(744),workerEnd:"workerEnd",networkDelay:ne(539),playbackStreamVideoFps:ne(590),wasmWidthOrHeightChange:ne(601),simdDecodeError:ne(922),simdH264DecodeVideoWidthIsTooLarge:ne(691),websocketOpen:ne(734),websocketStringMsg:ne(812),closeEnd:ne(633),tempStream:ne(507),videoSEI:ne(506),flvScriptData:"flvScriptData",aacSequenceHeader:ne(613),videoSequenceHeader:ne(582),flvBufferData:ne(710),checkFirstIFrame:ne(866),mseHandle:ne(670),mseFirstRenderTime:ne(920),mseError:ne(463),notSupportNewWasm:ne(575),failedToAsynchronouslyPrepareWasm:ne(692)};ne(551);const ke={audio:1,video:2},Ie={audio:8,video:9,scriptData:18},Ae={init:"init",decode:"decode",audioDecode:"audioDecode",videoDecode:ne(919),initAudioCodec:ne(867),initVideoCodec:ne(684),close:"close",updateConfig:ne(875),resetDecode:"resetDecode",clearBuffer:ne(757),resetAudioDecode:ne(846),resetVideoDecode:ne(570),fetchStream:ne(878),sendWsMessage:ne(478),mseUpdateVideoTimestamp:ne(877),playbackIsPause:ne(706)};ne(916),ne(738),ne(746),ne(614),ne(777),ne(741),ne(827),ne(546),ne(916),ne(839),ne(738),ne(475),ne(593),ne(812),ne(827);const Ce={fullscreen:ne(591),fullScreenByStart:ne(862),webFullscreen:ne(729),decoderWorkerInit:ne(446),play:ne(528),playing:ne(728),pause:ne(864),mute:ne(699),load:ne(491),loading:ne(558),zooming:ne(726),drawingRect:ne(923),drawingRectInfo:"drawingRectInfo",videoInfo:ne(902),timeUpdate:ne(848),audioInfo:"audioInfo",log:"log",error:ne(891),kBps:"kBps",timeout:ne(455),delayTimeout:ne(876),delayTimeoutRetryEnd:ne(534),loadingTimeout:ne(442),loadingTimeoutRetryEnd:ne(718),stats:"stats",performance:ne(604),videoSmooth:ne(578),faceDetectActive:ne(882),objectDetectActive:ne(752),occlusionDetectActive:ne(603),imageDetectActive:ne(912),record:ne(454),recording:ne(897),recordingTimestamp:ne(434),recordStart:ne(675),recordEnd:ne(687),recordCreateError:ne(694),recordBlob:ne(448),recordCancel:ne(649),buffer:ne(738),videoFrame:"videoFrame",videoSEI:ne(506),videoSEISyncPts:ne(538),start:ne(589),metadata:ne(559),resize:ne(740),volumechange:ne(722),volume:"volume",destroy:"destroy",beforeDestroy:ne(498),streamEnd:"streamEnd",streamRate:ne(560),streamAbps:ne(683),streamVbps:ne(753),streamDts:ne(450),streamSuccess:ne(743),streamMessage:ne(893),streamError:ne(750),streamStats:ne(561),streamEndInner:ne(556),mseSourceOpen:"mseSourceOpen",mseSourceClose:ne(486),mseSourceended:"mseSourceended",mseSourceStartStreaming:ne(736),mseSourceEndStreaming:ne(535),mseSourceBufferError:ne(810),mseAddSourceBufferError:ne(901),mseWorkerAddSourceBufferError:"mseWorkerAddSourceBufferError",mseSourceBufferBusy:ne(792),mseSourceBufferFull:ne(723),videoWaiting:ne(818),videoTimeUpdate:ne(804),videoSyncAudio:ne(496),playToRenderTimes:ne(796),playbackTime:ne(540),playbackTimestamp:ne(565),playbackTimeScroll:ne(751),playbackPrecision:ne(721),playbackShowPrecisionChange:ne(562),playbackJustTime:ne(599),playbackStats:ne(909),playbackSeek:"playbackSeek",playbackPause:"playbackPause",playbackPauseOrResume:ne(787),playbackRateChange:ne(765),playbackPreRateChange:ne(497),playbackEndInner:"playbackEndInner",playbackEnd:ne(634),playVodStats:ne(759),playVodPause:ne(908),playVodPauseOrResume:"playVodPauseOrResume",playVodRateChange:"playVodRateChange",playVodTime:"playVodTime",playVodTimeCache:ne(716),playVodSeek:ne(813),playVodSeekEnd:ne(775),playVodVideoSeekingByMse:ne(859),playVodVideoSeekedByMse:ne(900),playVodCanplay:ne(526),playVodWaiting:ne(493),playVodEndedAndReplay:ne(462),playVodEnded:ne(503),ptz:ne(564),streamQualityChange:"streamQualityChange",visibilityChange:ne(595),netBuf:ne(758),close:ne(698),networkDelayTimeout:"networkDelayTimeout",togglePerformancePanel:"togglePerformancePanel",viewResizeChange:"viewResizeChange",flvDemuxBufferSizeTooLarge:"flvDemuxBufferSizeTooLarge",talkGetUserMediaSuccess:ne(469),talkGetUserMediaFail:ne(439),talkGetUserMediaTimeout:ne(544),talkStreamStart:"talkStreamStart",talkStreamOpen:ne(583),talkStreamClose:"talkStreamClose",talkStreamError:"talkStreamError",talkStreamInactive:ne(794),talkStreamMsg:ne(502),webrtcDisconnect:ne(580),webrtcFailed:"webrtcFailed",webrtcClosed:ne(537),webrtcChecking:ne(870),webrtcConnected:ne(584),webrtcCompleted:"webrtcCompleted",webrtcOnConnectionStateChange:ne(437),webrtcOnIceConnectionStateChange:ne(924),crashLog:ne(648),focus:ne(571),blur:"blur",inView:ne(821),visibilityHiddenTimeout:ne(555),websocketOpen:ne(734),websocketClose:ne(593),websocketError:ne(475),websocketStringMsg:ne(812),aiObjectDetectorInfo:ne(747),aiFaceDetectorInfo:ne(713),aiOcclusionDetectResult:"aiOcclusionDetectResult",aiImageDetectResult:ne(676),playFailedAndPaused:ne(467),audioResumeState:ne(579),webrtcStreamH265:ne(863),flvMetaData:ne(587),talkFailedAndStop:ne(527),removeLoadingBgImage:ne(682),memoryLog:"memoryLog",downloadMemoryLog:ne(910),pressureObserverCpu:ne(488),currentPts:ne(696),online:ne(918),offline:ne(764),networkState:ne(653),clickInitPlayer:ne(725)};ne(491),ne(848),ne(902),ne(799),ne(891),ne(841),ne(455),ne(442),ne(718),ne(729),ne(528),ne(864),ne(604),ne(434),ne(675),ne(694),ne(687),ne(448),ne(429),ne(909),ne(565),ne(787),ne(497),ne(765),ne(562),ne(634),ne(503),ne(516),ne(808),ne(658),ne(813),ne(775),ne(564),ne(557),ne(726),ne(648),ne(555),ne(595),ne(812),ne(747),ne(713),ne(495),ne(676),ne(467),ne(766),ne(579),ne(506),ne(587),ne(437),ne(924),ne(696),ne(447),ne(618),ne(725),ne(730),ne(544),ne(527),ne(502),ne(848),ne(799),ne(891),ne(841),ne(589),ne(455),ne(442),ne(876),ne(534),ne(528),ne(864),ne(699),ne(648),ne(593),ne(467),ne(579);const Te={talkStreamError:Ce.talkStreamError,talkStreamClose:Ce[ne(663)]},xe={playError:ne(695),fetchError:ne(746),fetchErrorWorker:"fetchErrorWorker",websocketError:ne(475),websocketOpenTimeout:ne(609),webcodecsH265NotSupport:ne(850),webcodecsDecodeError:ne(831),webcodecsUnsupportedConfigurationError:"webcodecsUnsupportedConfigurationError",webcodecsDecodeConfigureError:ne(774),webcodecsAudioInitTimeout:ne(888),webcodecsAudioNoDataTimeout:ne(851),mediaSourceH265NotSupport:ne(457),mediaSourceAudioG711NotSupport:ne(521),mediaSourceAudioInitTimeout:ne(638),mediaSourceAudioNoDataTimeout:ne(662),mediaSourceDecoderConfigurationError:ne(576),mediaSourceFull:Ce[ne(723)],mseSourceBufferError:Ce[ne(810)],mseAddSourceBufferError:Ce[ne(901)],mseWorkerAddSourceBufferError:Ce.mseWorkerAddSourceBufferError,mediaSourceAppendBufferError:ne(822),mediaSourceTsIsMaxDiff:"mediaSourceTsIsMaxDiff",mediaSourceUseCanvasRenderPlayFailed:ne(732),mediaSourceBufferedIsZeroError:ne(530),wasmDecodeError:ne(913),wasmUseVideoRenderError:ne(427),simdH264DecodeVideoWidthIsTooLarge:ne(691),simdDecodeError:ne(922),hlsError:"hlsError",webrtcError:"webrtcError",webrtcClosed:Ce[ne(537)],webrtcIceCandidateError:ne(829),webglAlignmentError:ne(485),wasmWidthOrHeightChange:ne(601),mseWidthOrHeightChange:ne(518),wcsWidthOrHeightChange:ne(731),widthOrHeightChange:ne(445),tallWebsocketClosedByError:ne(854),flvDemuxBufferSizeTooLarge:Ce[ne(789)],audioChannelError:ne(635),webglContextLostError:"webglContextLostError",videoElementPlayingFailed:"videoElementPlayingFailed",videoElementPlayingFailedForWebrtc:ne(524),decoderWorkerInitError:ne(479),decoderWorkerWasmError:"decoderWorkerWasmError",videoInfoError:ne(811),streamEnd:Ce[ne(766)],websocket1006Error:"websocket1006Error",delayTimeout:Ce.delayTimeout,loadingTimeout:Ce.loadingTimeout,networkDelayTimeout:Ce[ne(911)],fullscreenError:ne(806),aliyunRtcError:ne(686),mseWaitVideoCanplayTimeout:ne(820),initDecoderWorkerTimeout:ne(592),notSupportNewWasm:ne(575),failedToAsynchronouslyPrepareWasm:ne(692),playVodMp4Error:ne(754),mp4Error:"mp4Error",...Te},De={notConnect:"notConnect",open:ne(444),close:ne(698),error:ne(891)},Be={connecting:0,open:1,closing:2,closed:3};ne(615),ne(805),ne(770),ne(805),ne(770),ne(625),ne(494);const Pe={h264:7,h265:12,mpeg4:99},Me={h264:ne(625),h265:ne(776)},Fe={AAC:10,ALAW:7,MULAW:8,MP3:2,OPUS:13,G711A:7,G711U:8};ne(608),ne(651),ne(430),ne(509),ne(608),ne(563),ne(509);const Ue={sps:7,pps:8,iFrame:5,kUnspecified:0,kSliceNonIDR:1,kSliceDPA:2,kSliceDPB:3,kSliceDPC:4,kSliceIDR:5,kSliceSEI:6,kSliceSPS:7,kSlicePPS:8,kSliceAUD:9,kEndOfSequence:10,kEndOfStream:11,kFiller:12,kSPSExt:13,kReserved0:14},Re={pFrame:1,kSliceBLA_W_LP:16,kSliceBLA_W_RADL:17,kSliceBLA_N_LP:18,iFrame:19,kSliceIDR_W_RADL:19,nLp:20,kSliceIDR_N_LP:20,craNut:21,kSliceCRA_NUT:21,kSliceRSV_IRAP_VCL22:22,kSliceRSV_IRAP_VCL23:23,vps:32,kSliceVPS:32,sps:33,kSliceSPS:33,pps:34,kSlicePPS:34,kSliceAUD:35,sei:39,prefixSei:39,suffixSei:40};ne(834),ne(474),ne(577),ne(499),ne(581),ne(542);const Le={key:ne(673),delta:"delta"},Oe={avc:ne(926),hev:'video/mp4; codecs="hev1.1.6.L123.b0"',hev2:ne(894),hev3:'video/mp4;codecs="hev1.2.4.L120.90"',hev4:ne(819),hev5:ne(428)},ze={ended:ne(788),open:ne(444),closed:"closed"};Math[ne(712)](40),ne(661),ne(704),ne(845),ne(898),ne(737),ne(644),ne(654),ne(704),ne(435),ne(914),ne(823),ne(515),ne(853),ne(605),ne(825),ne(857),ne(508),ne(842),ne(602),ne(852),ne(865),ne(688),ne(470),ne(761),ne(681),ne(907),ne(797),ne(836);ne(443),ne(883),ne(886),ne(640);ne(451),ne(642),ne(637);const Ne={sourceClose:ne(701),sourceOpen:ne(594),sourceended:ne(458),startstreaming:ne(632),endstreaming:ne(802),qualitychange:"qualitychange"};ne(629),ne(832),ne(679),ne(523),ne(465);const He={h264:ne(835),h265:ne(438),av1:ne(656)};ne(505),ne(678),ne(460),ne(791),ne(779);const je={abortError:ne(622),abortError2:ne(519),abort:ne(519)};ne(558),ne(728),ne(650),ne(916);const Ve={sequenceHeader:0,nalu:1},We={keyFrame:1,interFrame:2};ne(645),ne(768),ne(685),ne(510);function $e(e,t){const r=ve();return($e=function(e,t){return r[e-=424]})(e,t)}ne(763),ne(756),ne(698),ne(891),ne(647);ne(567),ne(547);ne(768),ne(631),ne(567),ne(567),ne(547),ne(700),ne(659),ne(844),ne(611),ne(466),ne(671),ne(431),ne(906),ne(449),ne(892),ne(769),ne(903),ne(471),ne(441),ne(440),ne(855),ne(807);const Ge=1;ne(887),ne(840),ne(693),ne(828),ne(569),ne(861),ne(800),ne(623),ne(588),ne(795),ne(525),ne(672),ne(884),ne(606),ne(707),ne(652),ne(489),ne(536),ne(891);const qe={idle:"idle",connecting:"connecting",buffering:ne(615),error:ne(891),complete:ne(548)};ne(868),ne(468),ne(607),ne(487),ne(655),ne(461),ne(879),ne(847),ne(480);const Ke={video:1,audio:2},Xe=128,Ye={PACKET_TYPE_SEQ_START:0,PACKET_TYPE_FRAMES:1,PACKET_TYPE_SEQ_END:2,PACKET_TYPE_FRAMESX:3,PACKET_TYPE_METADATA:4},Je={FT_KEY:16,FT_INTER:32};ne(665),ne(597),ne(621),ne(869),ne(620),ne(843),ne(520),ne(801),ne(856),ne(838),ne(917),ne(925),ne(786),ne(459),ne(890),ne(772),ne(860),ne(750),ne(585),ne(640),ne(600),ne(784),ne(880),ne(780),ne(702),ne(558),ne(728);const Ze=typeof window===ne(668)&&window.window===window?window:typeof self===ne(668)&&self[ne(436)]===self?self:typeof global===ne(668)&&global.global===global?global:void 0;ne(629),ne(548),ne(512),ne(657),ne(664),ne(864),ne(528),ne(728),ne(523),ne(803),ne(680),ne(550),ne(703),ne(679),ne(722),ne(832),ne(816),ne(891),ne(660),ne(529),ne(881),ne(477),ne(432),ne(532),ne(733),ne(573),ne(483),ne(481),ne(814),ne(719),ne(492);var Qe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function et(e,t){return e(t={exports:{}},t.exports),t.exports}var tt=Object.freeze({__proto__:null,commonjsGlobal:Qe,commonjsRequire:function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")},unwrapExports:function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e},createCommonjsModule:et,getCjsExportFromNamespace:function(e){return e&&e.default||e}}),rt=nt;function nt(e,t){var r=it();return(nt=function(e,t){return r[e-=270]})(e,t)}function it(){var e=["msExitFullscreen","13iHdFLF","fullscreenerror","7757450whknZx","fullscreenchange","webkitRequestFullScreen","mozfullscreenerror","undefined","webkitfullscreenchange","webkitRequestFullscreen","webkitCurrentFullScreenElement","webkitFullscreenEnabled","538515PgFtnS","msFullscreenElement","screenfull","8RTpmDW","mozFullScreenEnabled","addEventListener","removeEventListener","mozfullscreenchange","isFullscreen","MSFullscreenChange","error","then","4raXmZe","webkitCancelFullScreen","1469772xBnLqZ","fullscreenElement","request","off","500781zvAkcF","length","14114upgzNP","bind","isEnabled","msFullscreenEnabled","change","1947029mpDpaM","mozCancelFullScreen","MSFullscreenError","createCommonjsModule","mozFullScreenElement","object","fullscreenEnabled","defineProperties","requestFullscreen","msRequestFullscreen","documentElement","document","exports","exitFullscreen","catch","webkitfullscreenerror","webkitExitFullscreen","1029510eXUmul"];return(it=function(){return e})()}function st(e,t){const r=ct();return(st=function(e,t){return r[e-=236]})(e,t)}!function(e,t){for(var r=nt,n=e();;)try{if(218155===parseInt(r(317))/1*(-parseInt(r(293))/2)+-parseInt(r(291))/3*(parseInt(r(285))/4)+-parseInt(r(315))/5+parseInt(r(287))/6+parseInt(r(298))/7*(-parseInt(r(276))/8)+-parseInt(r(273))/9+parseInt(r(319))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(it),tt[rt(301)]((function(e){var t,r,n,i,s,o;t=nt,r="undefined"!=typeof window&&void 0!==window[t(309)]?window[t(309)]:{},n=t(303)!==t(323)&&e[t(310)],i=function(){for(var e,n=t,i=[[n(306),n(311),n(288),n(304),n(320),n(318)],[n(270),n(314),"webkitFullscreenElement",n(272),n(324),n(313)],[n(321),n(286),n(271),n(286),n(324),"webkitfullscreenerror"],["mozRequestFullScreen",n(299),n(302),n(277),n(280),n(322)],[n(307),n(316),n(274),n(296),n(282),n(300)]],s=0,o=i[n(292)],a={};s32&&console[t(264)](t(249)),e<=this._current_word_bits_left){let r=this[t(268)]>>>32-e;return this[t(268)]<<=e,this[t(255)]-=e,r}let r=this[t(255)]?this[t(268)]:0;r>>>=32-this._current_word_bits_left;let n=e-this[t(255)];this[t(252)]();let i=Math.min(n,this[t(255)]),s=this[t(268)]>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,r=r<>>t))return this[e(268)]<<=t,this[e(255)]-=t,t;return this[e(252)](),t+this[e(243)]()}[ot(269)](){const e=ot;let t=this[e(243)]();return this[e(238)](t+1)-1}[ot(245)](){let e=this[ot(269)]();return 1&e?e+1>>>1:-1*(e>>>1)}}function ct(){const e=["min","readBool","_current_word","readUEG","4841244FwthDN","getUint32","readBits","_buffer_index","buffer","6236VEcmQM","9032450WHpouW","_skipLeadingZero","33929269ajUDrk","readSEG","279112gDsojd","destroy","set","ExpGolomb: readBits() bits exceeded max 32bits!","7NUhfDw","208TXCvvj","_fillCurrentWord","_buffer","byteLength","_current_word_bits_left","ExpGolomb: _fillCurrentWord() but no bytes available","readByte","6529686OsvEGi","subarray","178gwzMFY","115JNdwjz","537039ZJKxEC","_total_bytes","error","_total_bits"];return(ct=function(){return e})()}const ut=lt;function lt(e,t){const r=_t();return(lt=function(e,t){return r[e-=497]})(e,t)}!function(e,t){const r=lt,n=e();for(;;)try{if(186138===-parseInt(r(510))/1+parseInt(r(535))/2+-parseInt(r(508))/3*(parseInt(r(569))/4)+parseInt(r(524))/5+parseInt(r(525))/6*(parseInt(r(551))/7)+-parseInt(r(534))/8*(-parseInt(r(571))/9)+-parseInt(r(500))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(_t);const dt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1],ht=dt,ft=dt;function pt(e){let{profile:t,sampleRate:r,channel:n}=e;return new Uint8Array([175,0,t<<3|(14&r)>>1,(1&r)<<7|n<<3])}function mt(e){return vt(e)&&e[1]===Ve.sequenceHeader}function vt(e){const t=lt;return e[0]>>4===Fe[t(521)]}const yt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];function gt(e){const t=lt;let r=new Uint8Array(e),n=null,i=0,s=0,o=0,a=null;if(i=s=r[0]>>>3,o=(7&r[0])<<1|r[1]>>>7,o<0||o>=yt[t(531)])return void console.error(t(526));let c=yt[o],u=(120&r[1])>>>3;if(u<0||u>=8)return void console[t(563)](t(516));5===i&&(a=(7&r[1])<<1|r[2]>>>7,r[2]);let l=Ze[t(533)][t(565)][t(514)]();return-1!==l[t(549)](t(550))?o>=6?(i=5,n=new Array(4),a=o-3):(i=2,n=new Array(2),a=o):-1!==l[t(549)](t(548))?(i=2,n=new Array(2),a=o):(i=5,a=o,n=new Array(4),o>=6?a=o-3:1===u&&(i=2,n=new Array(2),a=o)),n[0]=i<<3,n[0]|=(15&o)>>>1,n[1]=(15&o)<<7,n[1]|=(15&u)<<3,5===i&&(n[1]|=(15&a)>>>1,n[2]=(1&a)<<7,n[2]|=8,n[3]=0),{audioType:t(555),config:n,sampleRate:c,channelCount:u,objectType:i,codec:t(547)+i,originalCodec:t(547)+s}}ut(528),ut(558);function _t(){const e=["length","Could not found ADTS syncword until payload end","navigator","4024YZXtRf","213694SMxQkB","subarray","sampling_index","chan_config","warn","readBits","more than 2 numSubFrames Not Supported","iserro","error","eof_flag_","bufpos","buflen","mp4a.40.","android","indexOf","firefox","7441OntQOs","data","getIncompleteData","more than 2 numProgram Not Supported","aac","byteLength","channel_config","look","more than 2 numLayer Not Supported","sampleRate: ","audioMuxVersionA is Not Supported","sbr","log","channels","userAgent","readByte","set","mp4a.40.2","374868SHeXwy","channel: ","27RCdLwC","data_","profile: ","sampling_freq_index","1734460MkFdpn","unshift","other_data_present","push","destroy","StreamMuxConfig Missing","readNextAACFrame","bufoff","6kPWigZ","frameLengthType = ","253524phXMXJ","has_last_incomplete_data","Invalid sampling index: ","sampling_frequency","toLowerCase","ext_object_type","Flv: AAC invalid channel configuration","audio_object_type","findNextSyncwordOffset","hasIncompleteData","object_type","AAC","readBool","sample_rate","1621940hoNoYl","2076ywsEAD","Flv: AAC invalid sampling frequency index!","getLATMValue","read","current_syncword_offset_","buffer"];return(_t=function(){return e})()}class bt{constructor(e){const t=ut;this[t(497)]=e,this.eof_flag_=!1,this[t(529)]=this[t(518)](0),this.eof_flag_&&console[t(543)](t(532))}[ut(518)](e){const t=ut;let r=e,n=this[t(497)];for(;;){if(r+7>=n.byteLength)return this[t(544)]=!0,n[t(556)];if(4095===(n[r+0]<<8|n[r+1])>>>4)return r;r++}}[ut(506)](){const e=ut;let t=this.data_,r=null;for(;null==r&&!this[e(544)];){let n=this[e(529)],i=(8&t[n+1])>>>3,s=(6&t[n+1])>>>1,o=1&t[n+1],a=(192&t[n+2])>>>6,c=(60&t[n+2])>>>2,u=(1&t[n+2])<<2|(192&t[n+3])>>>6,l=(3&t[n+3])<<11|t[n+4]<<3|(224&t[n+5])>>>5;if(t[n+6],n+l>this[e(497)].byteLength){this[e(544)]=!0,this.has_last_incomplete_data=!0;break}let d=1===o?7:9,h=l-d;n+=d;let f=this[e(518)](n+h);if(this[e(529)]=f,0!==i&&1!==i||0!==s)continue;let p=t.subarray(n,n+h);r={},r.audio_object_type=a+1,r.sampling_freq_index=c,r[e(513)]=ht[c],r[e(557)]=u,r[e(552)]=p}return r}hasIncompleteData(){return this[ut(511)]}[ut(553)](){const e=ut;return this.has_last_incomplete_data?this[e(497)][e(536)](this[e(529)]):null}}class wt{constructor(e){const t=ut;this[t(497)]=e,this[t(544)]=!1,this.current_syncword_offset_=this[t(518)](0),this[t(544)]&&console[t(543)](t(532))}[ut(518)](e){const t=ut;let r=e,n=this[t(497)];for(;;){if(r+1>=n[t(556)])return this[t(544)]=!0,n[t(556)];if(695===(n[r+0]<<3|n[r+1]>>>5))return r;r++}}[ut(527)](e){const t=ut;let r=e[t(540)](2),n=0;for(let i=0;i<=r;i++)n<<=8,n|=e[t(566)]();return n}readNextAACFrame(e){const t=ut;let r=this[t(497)],n=null;for(;null==n&&!this[t(544)];){let i=this[t(529)],s=(31&r[i+1])<<8|r[i+2];if(i+3+s>=this[t(497)][t(556)]){this[t(544)]=!0,this[t(511)]=!0;break}let o=new at(r[t(536)](i+3,i+3+s)),a=null;if(o[t(522)]()){if(null==e){console[t(539)](t(505)),this[t(529)]=this[t(518)](i+3+s),o.destroy();continue}a=e}else{let e=o[t(522)]();if(e&&o[t(522)]()){console[t(543)](t(561)),o[t(504)]();break}if(e&&this[t(527)](o),!o.readBool()){console[t(543)]("allStreamsSameTimeFraming zero is Not Supported"),o.destroy();break}if(0!==o.readBits(6)){console[t(543)](t(541)),o.destroy();break}if(0!==o[t(540)](4)){console.error(t(554)),o[t(504)]();break}if(0!==o[t(540)](3)){console.error(t(559)),o[t(504)]();break}let r=e?this.getLATMValue(o):0,n=o[t(540)](5);r-=5;let i=o.readBits(4);r-=4;let s=o.readBits(4);r-=4,o[t(540)](3),r-=3,r>0&&o.readBits(r);let c=o[t(540)](3);if(0!==c){console[t(543)](t(509)+c+". Only frameLengthType = 0 Supported"),o[t(504)]();break}o.readByte();let u=o[t(522)]();if(u)if(e)this[t(527)](o);else{let e=0;for(;;){e<<=8;let r=o[t(522)]();if(e+=o[t(566)](),!r)break}console[t(563)](e)}o[t(522)]()&&o.readByte(),a={},a[t(517)]=n,a[t(499)]=i,a[t(513)]=ht[a[t(499)]],a.channel_config=s,a[t(502)]=u}let c=0;for(;;){let e=o[t(566)]();if(c+=e,255!==e)break}let u=new Uint8Array(c);for(let e=0;e1&&void 0!==arguments[1]?arguments[1]:0;return(e[r]<<24>>>0)+(e[r+1]<<16)+(e[r+2]<<8)+(e[r+3]||0)}function kt(e){const t=Ct;let r=arguments[t(236)]>1&&void 0!==arguments[1]?arguments[1]:4;if(e.length<4)return[];const n=e[t(236)],i=[];let s,o=0;for(;o+r>>=8),o+=r,s){if(o+s>n)break;i[t(232)](e[t(243)](o,o+s)),o+=s}return i}function It(e){const t=Ct;let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e[t(236)];let i=r?2:1,s=0,o=0,a="";for(;255===e[i];)s+=255,i++;for(s+=e[i++];255===e[i];)o+=255,i++;if(o+=e[i++],5===s&&n>i+16)for(let t=0;t<16;t++)a+=e[i].toString(16),i++;return{payload:e.subarray(i),type:s,size:o,uuid:a}}function At(e){const t=Ct,r=e[t(242)],n=new Uint8Array(4);n[0]=r>>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r;const i=new Uint8Array(r+4);return i[t(231)](n,0),i[t(231)](e,4),i}function Ct(e,t){const r=St();return(Ct=function(e,t){return r[e-=228]})(e,t)}function Tt(e,t){const r=Ct;let n=null;return t?e[r(236)]>=28&&(n=1+(3&e[26])):e[r(236)]>=12&&(n=1+(3&e[9])),n}!function(e,t){const r=Ct,n=e();for(;;)try{if(376324===parseInt(r(240))/1+-parseInt(r(239))/2+parseInt(r(238))/3+-parseInt(r(230))/4*(parseInt(r(237))/5)+parseInt(r(241))/6+-parseInt(r(229))/7*(parseInt(r(228))/8)+parseInt(r(234))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(St);const xt=Ht;function Dt(){const e=Ht;return(new Date)[e(690)]()}function Bt(e,t,r){const n=Ht;return Math[n(617)](Math[n(712)](e,Math.max(t,r)),Math[n(712)](t,r))}function Pt(){const e=Ht;return performance&&typeof performance[e(570)]===e(529)?performance.now():Date[e(570)]()}function Mt(e){let t=0,r=Pt();return n=>{if(!function(e){const t=xt;return Object[t(428)][t(401)][t(627)](e)===t(618)}(n))return;t+=n;const i=Pt(),s=i-r;s>=1e3&&(e(t/s*1e3),r=i,t=0)}}!function(e,t){const r=Ht,n=e();for(;;)try{if(955889===-parseInt(r(626))/1+-parseInt(r(568))/2+-parseInt(r(391))/3*(parseInt(r(491))/4)+-parseInt(r(425))/5*(-parseInt(r(703))/6)+parseInt(r(539))/7+-parseInt(r(458))/8*(-parseInt(r(544))/9)+-parseInt(r(558))/10*(-parseInt(r(434))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Nt),(()=>{const e=Ht;try{if(typeof WebAssembly===e(551)&&typeof WebAssembly[e(634)]===e(529)){const t=new(WebAssembly[e(540)])(Uint8Array.of(0,97,115,109,1,0,0,0));if(t instanceof WebAssembly.Module)return new(WebAssembly[e(511)])(t)instanceof WebAssembly[e(511)]}}catch(e){}})();const Ft=xt(684),Ut=xt(546),Rt=xt(576);xt(615),xt(684);const Lt='"delaytime"'===Ft;xt(555);function Ot(e){return null==e}function zt(e){return!Ot(e)}function Nt(){const e=["setUint16","min","pointer-events: none !important; display: block !important","getPropertyValue","paused","substr","application/hwepass2001.installepass2001","div","webkitGetUserMedia","image","Opera","hidden","save","userAgent","webm","imageSmoothingEnabled","pageX","getHours","filter","wow32","clientY","109704AmFMOa","click","safari","absolute","toLowerCase","MediaSource","application/asx","documentElement","getAttribute","experimental-webgl","toString","round","setInt8","font","innerHTML","QQBrowser","quality","data","mimeTypes","target","isTypeSupported","true","line","repeat","msFullscreenElement","hour","useWCS","PB/s","crossOrigin","setUint8","hev1.1.6.L120.90","forEach","createElement","h264","5vXPNkt","replace","then","prototype","MB/s","keyFrame","appendChild","right","charCodeAt","11vyWFMV","solid","rect","hev","video","putImageData","location","scrollLeft","length","test","src","map","hev4","setHours","getFullYear","onload","xxxxxxxxxxxx4xxx","getUserMedia","parse","px 宋体","status","AudioData","green","webkitFullscreenElement","1704eNIdMW","Edg","srcElement","none","VideoFrame","set","useMSE","nLp","initEvent","hev2","gpu","mediaDevices","noteOn","#000","h265","restore","keys","shadowRoot","getDay","string","strokeRect","trim","assign","QihooBrowser","GB/s","style","document","px Arial","performance","getParameter","undefined","type","canvas","80OmgdDI","search","chrome","position","360SE",'video/mp4; codecs="',"atob","fontSize","pps","readAsArrayBuffer","isConfigSupported","-webkit-touch-callout","ended","pow","MediaStream","sps","copyright","copyToChannel","MouseEvents","drawImage","Instance","data-","container","Anonymous","RIFF","protocol","touchmove","byteLength","version","insertBefore","fillStyle","WebGLRenderingContext","-webkit-user-select","100%","stringify","borderColor","download","webkit-3d","function","apply","audioWorklet","left","green yuv","removeChild","fmt ","result","illegal icc","mozGetUserMedia","3485783hmebUn","Module","log","img","failed to asynchronously prepare wasm","38277OAOATk","demuxUseWorker",'"2.1.3"',"imageSmoothingQuality","WAVE","block","floor","object","createBuffer","[object Error]","TB/s",'"2025-2-1"',"sampleRate","setInt32","14230130SBQmEm","strokeStyle","kSliceRSV_IRAP_VCL23","numberOfChannels","fullscreenElement","NaN","-webkit-tap-highlight-color","onerror","attachShadow","text/javascript","1212008EaRsaa","borderWidth","now","application/vnd.apple.mpegurl","-webkit-text-size-adjust","toDataURL","push","display",'"1-2-2025"',"getElementById","opacity","xxxx","format","touches","hev3","host","VideoEncoder.isConfigSupported is not a function","random","https:","ActiveXObject","showModalDialog","substring","kSliceRSV_IRAP_VCL22","navigator","ManagedMediaSource","-o-user-select","win32","origin","indexOf","avc1.","iFrame","mouseup","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","getContext","match","getMinutes","application/mozilla-npqihooquicklogin","split","scrollTop","application/vnd.chromium.remoting-viewer","ALAW","fromCharCode","backgroundColor","angle","webgl2","KB/s","VideoDecoder",'"development"',"hash","max","[object Number]","hev5","textAlign","Chrome","resume","connect","kSliceBLA_N_LP","webgl","1438677koEpMj","call","not compiled with thread support, using thread emulation","application/javascript","360EE","second","bottom","fillText","instantiate","body","objectFit","setUint32","-moz-user-select","html","createObjectURL","clearRect","supported","isEnabled","overflow","port","touchstart","MULAW","setAttribute","transferControlToOffscreen","image/png","content","MediaStreamTrackGenerator","charAt","If you want to help, upload a sample of this file to","start","requestVideoFrameCallback","slice","script","msGetUserMedia","top","ZB/s","WebGL2RenderingContext","getSeconds","close","URL","subarray","Firefox","dataset","QHBrowser","height","data:","toUpperCase","localhost","playbackRate","lineWidth","numberOfFrames","edge",";base64","revokeObjectURL","EB/s","sequenceHeader","color","100",'"production"',"toFixed","mousedown","memory","Bytes","join","getTime","pathname","children","fontFamily","clientX","getDate","PressureObserver","width","high","pageY","0 Bytes","AudioDecoder","text","5430354fNcGNh","win64","createTextNode","href","removeAttribute","application/360softmgrplugin","wow64","opera"];return(Nt=function(){return e})()}function Ht(e,t){const r=Nt();return(Ht=function(e,t){return r[e-=380]})(e,t)}function jt(e){return e&&"function"==typeof e}function Vt(e){const t=xt;let r=null,n=31&e[0];return(n===Ue[t(506)]||n===Ue[t(499)])&&(r=Me[t(424)]),!r&&(n=(126&e[0])>>1,(n===Re.vps||n===Re.sps||n===Re.pps)&&(r=Me[t(472)])),r}function Wt(){return typeof WritableStream!==xt(488)}function $t(e){e[xt(664)]()}function Gt(e,t){const r=xt;t&&(e=e[r(388)]((e=>e[r(489)]&&e[r(489)]===t)));let n=e[0],i=null,s=1;if(e[r(442)]>0){let t=e[1];t&&t.ts-n.ts>1e5&&(n=t,s=2)}if(n)for(let o=s;o=1e3){e[o-1].ts-n.ts<1e3&&(i=o+1)}}}return i}function qt(e){const t=xt;return e.ok&&e[t(454)]>=200&&e[t(454)]<=299}function Kt(){return function(e){const t=xt;let r="";if(typeof e===t(551))try{r=JSON.stringify(e),r=JSON[t(452)](r)}catch(t){r=e}else r=e;return r}(Se)}function Xt(e){const t=xt;return e[0]>>4===We[t(430)]&&e[1]===Ve[t(681)]}function Yt(e){return!0===e||e===xt(412)}function Jt(e){return!0!==e&&e!==xt(412)}function Zt(){const e=xt;return!!(Ze.Worker&&Ze[e(396)]&&"canConstructInDedicatedWorker"in Ze[e(396)]&&!0===Ze.MediaSource.canConstructInDedicatedWorker)}function Qt(e,t){const r=xt,n=kt(e[r(657)](5));let i=!1;return n[r(422)]((e=>{const n=r,s=t?e[0]>>>1&63:31&e[0];(t&&(s===Re.kSliceBLA_W_LP||s===Re.kSliceBLA_W_RADL||s===Re[n(624)]||s===Re[n(598)]||n(465),n(590),s===Re[n(560)])||Jt(t)&&s===Ue.iFrame)&&(i=!0)})),i}function er(){return Jt(Lt)}function tr(e){return e>60*(Number("1")||1)*60*1e3&&er()}const rr=cr;!function(e,t){const r=cr,n=e();for(;;)try{if(446938===parseInt(r(143))/1+-parseInt(r(112))/2*(-parseInt(r(108))/3)+parseInt(r(123))/4*(parseInt(r(116))/5)+parseInt(r(147))/6*(parseInt(r(131))/7)+-parseInt(r(122))/8*(-parseInt(r(120))/9)+-parseInt(r(125))/10+-parseInt(r(141))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ur);var nr=function(e,t,r,n){return new(r||(r=Promise))((function(i,s){const o=cr;function a(e){const t=cr;try{u(n[t(150)](e))}catch(e){s(e)}}function c(e){const t=cr;try{u(n[t(136)](e))}catch(e){s(e)}}function u(e){const t=cr;var n;e[t(115)]?i(e[t(114)]):(n=e[t(114)],n instanceof r?n:new r((function(e){e(n)})))[t(117)](a,c)}u((n=n[o(148)](e,t||[]))[o(150)]())}))};const ir=Symbol(32),sr=Symbol(16),or=Symbol(8);class ar{constructor(e){const t=cr;this.g=e,this[t(139)]=0,e&&(this[t(107)]=e[t(150)]()[t(114)])}[rr(121)](e){const t=rr;this.g=e,this.demand(e[t(150)]()[t(114)],!0)}consume(){const e=rr;this[e(132)]&&this[e(139)]&&(this[e(132)][e(135)](0,this[e(139)]),this[e(132)]=this[e(132)][e(110)](0,this[e(132)][e(151)]-this.consumed),this[e(139)]=0)}[rr(145)](e,t){const r=rr;return t&&this[r(118)](),this[r(107)]=e,this[r(149)]()}[rr(146)](e){return nr(this,void 0,void 0,(function*(){const t=cr;return this[t(144)]&&(yield this[t(144)]),this[t(144)]=new Promise(((r,n)=>{const i=t;var s;this.reject=n,this[i(142)]=e=>{const t=i;delete this[t(144)],delete this[t(142)],delete this[t(107)],r(e)};this[i(145)](e,!0)||null===(s=this[i(133)])||void 0===s||s[i(134)](this,e)}))}))}readU32(){return this[rr(146)](ir)}[rr(113)](){return this.read(sr)}[rr(127)](){return this[rr(146)](or)}[rr(109)](){const e=rr;var t;this.g&&this.g[e(128)](),this[e(132)]&&this.buffer.subarray(0,0),null===(t=this[e(126)])||void 0===t||t[e(134)](this,new Error("EOF")),delete this[e(144)]}[rr(149)](){const e=rr;if(!this.buffer||!this.need)return;let t=null;const r=this[e(132)][e(110)](this[e(139)]);let n=0;const i=t=>r[e(151)]<(n=t);if(typeof this[e(107)]===e(124)){if(i(this[e(107)]))return;t=r[e(110)](0,n)}else if(this[e(107)]===ir){if(i(4))return;t=r[0]<<24|r[1]<<16|r[2]<<8|r[3]}else if(this.need===sr){if(i(2))return;t=r[0]<<8|r[1]}else if(this[e(107)]===or){if(i(1))return;t=r[0]}else if(e(132)in this[e(107)]){if(e(111)in this[e(107)]){if(i(this[e(107)][e(119)]-this[e(107)][e(111)]))return;new Uint8Array(this[e(107)].buffer,this.need[e(111)]).set(r[e(110)](0,n)),t=this[e(107)]}else if(this.g)return void this.g.throw(new Error("Unsupported type"))}else{if(i(this[e(107)].byteLength))return;new Uint8Array(this[e(107)])[e(130)](r.subarray(0,n)),t=this[e(107)]}return this.consumed+=n,this.g?this.demand(this.g[e(150)](t)[e(114)],!0):this[e(142)]&&this.resolve(t),t}[rr(137)](e){const t=rr;if(e instanceof Uint8Array?this[t(105)](e.length)[t(130)](e):t(132)in e?this[t(105)](e.byteLength).set(new Uint8Array(e[t(132)],e.byteOffset,e[t(119)])):this[t(105)](e[t(119)]).set(new Uint8Array(e)),!this.g&&!this[t(142)])return new Promise((e=>this.pull=e));this[t(149)]()}[rr(106)](e){const t=rr;this[t(105)](4)[t(130)]([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){const t=rr;this[t(105)](2)[t(130)]([e>>8&255,255&e]),this.flush()}[rr(129)](e){this[rr(105)](1)[0]=e,this.flush()}malloc(e){const t=rr;if(this[t(132)]){const r=this[t(132)][t(151)],n=r+e;if(n<=this[t(132)][t(132)][t(119)]-this[t(132)][t(111)])this[t(132)]=new Uint8Array(this.buffer[t(132)],this.buffer.byteOffset,n);else{const e=new Uint8Array(n);e[t(130)](this[t(132)]),this[t(132)]=e}return this.buffer[t(110)](r,n)}return this[t(132)]=new Uint8Array(e),this[t(132)]}}function cr(e,t){const r=ur();return(cr=function(e,t){return r[e-=105]})(e,t)}function ur(){const e=["17418FCJfLf","readU16","value","done","1090XGrlRd","then","consume","byteLength","3104667SjDxKq","setG","8bMwkFM","2692vMbZaZ","number","5535440PwZmkw","reject","readU8","return","writeU8","set","7EFrTQb","buffer","pull","call","copyWithin","throw","write","U32","consumed","U16","5423572ETmFiF","resolve","301518gqHBxL","lastReadPromise","demand","read","3209208wdRCXw","apply","flush","next","length","malloc","writeU32","need","57KQYvPy","close","subarray","byteOffset"];return(ur=function(){return e})()}function lr(){const e=["error","JbPro","debug","_opt","2bacsCw","729UGlotj","1100127YUoWDS","70GdvTux","1391296gbIpyz","debugUuid","length","1081157iQdZCC","115377iLPBwv","34407DbuSbQ","[❌❌❌][","warn","1082262oCGNmX","5SsMJVz","39352PwJAje","debugLevel","[✅✅✅][","log","[❗❗❗]["];return(lr=function(){return e})()}function dr(e,t){const r=lr();return(dr=function(e,t){return r[e-=277]})(e,t)}ar[rr(138)]=ir,ar[rr(140)]=sr,ar.U8=or,function(e,t){const r=dr,n=e();for(;;)try{if(208316===parseInt(r(290))/1+parseInt(r(282))/2*(parseInt(r(291))/3)+parseInt(r(286))/4*(parseInt(r(295))/5)+parseInt(r(294))/6+-parseInt(r(284))/7+-parseInt(r(296))/8*(-parseInt(r(283))/9)+parseInt(r(285))/10*(-parseInt(r(289))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(lr);class hr{constructor(e){const t=dr;this.log=function(t){const r=dr;if(e._opt.debugLevel==de.debug){const o=e[r(281)].debugUuid?"["+e._opt[r(287)]+"]":"";for(var n=arguments[r(288)],i=new Array(n>1?n-1:0),s=1;s1?i-1:0),o=1;o1?s-1:0),a=1;a=2&&3===r[e]&&0===r[e-1]&&0===r[e-2]||(i[s]=r[e],s++);return new Uint8Array(i[t(459)],0,s)}static parseSPS(e){const t=fr;let r=vr[t(463)](e),n=new at(r);n.readByte();let i=n[t(472)]();n[t(472)]();let s=n.readByte();n[t(453)]();let o=vr[t(468)](i),a=vr[t(469)](s),c=1,u=420,l=[0,420,422,444],d=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(c=n[t(453)](),3===c&&n[t(456)](1),c<=3&&(u=l[c]),d=n[t(453)]()+8,n.readUEG(),n.readBits(1),n[t(481)]())){let e=3!==c?8:12;for(let r=0;r0&&e<16?(w=r[e-1],S=i[e-1]):255===e&&(w=n.readByte()<<8|n[t(472)](),S=n[t(472)]()<<8|n[t(472)]())}if(n[t(481)]()&&n[t(481)](),n[t(481)]()&&(n[t(456)](4),n[t(481)]()&&n[t(456)](24)),n[t(481)]()&&(n.readUEG(),n[t(453)]()),n[t(481)]()){let e=n[t(456)](32),r=n.readBits(32);k=n[t(481)](),I=r,A=2*e,E=I/A}}let C=1;(1!==w||1!==S)&&(C=w/S);let T=0,x=0;if(0===c)T=1,x=2-v;else{T=3===c?1:2,x=(1===c?2:1)*(2-v)}let D=16*(p+1),B=16*(m+1)*(2-v);D-=(y+g)*T,B-=(_+b)*x;let P=Math[t(475)](D*C);return n[t(474)](),n=null,{profile_string:o,level_string:a,bit_depth:d,ref_frames:f,chroma_format:u,chroma_format_string:vr[t(447)](u),frame_rate:{fixed:k,fps:E,fps_den:A,fps_num:I},sar_ratio:{width:w,height:S},codec_size:{width:D,height:B},present_size:{width:P,height:B}}}static[fr(450)](e){const t=fr;let r=e[t(471)](1,4),n="avc1.";for(let e=0;e<3;e++){let i=r[e][t(479)](16);i.length<2&&(i="0"+i),n+=i}let i=vr._ebsp2rbsp(e),s=new at(i);s[t(472)]();let o=s[t(472)]();s[t(472)]();let a=s[t(472)]();s[t(453)]();let c=vr[t(468)](o),u=vr[t(469)](a),l=1,d=420,h=[0,420,422,444],f=8,p=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(l=s.readUEG(),3===l&&s[t(456)](1),l<=3&&(d=h[l]),f=s[t(453)]()+8,p=s[t(453)]()+8,s.readBits(1),s.readBool())){let e=3!==l?8:12;for(let r=0;r0&&e<16?(k=r[e-1],I=n[e-1]):255===e&&(k=s[t(472)]()<<8|s[t(472)](),I=s.readByte()<<8|s[t(472)]())}if(s[t(481)]()&&s.readBool(),s[t(481)]()&&(s[t(456)](4),s[t(481)]()&&s[t(456)](24)),s[t(481)]()&&(s.readUEG(),s[t(453)]()),s[t(481)]()){let e=s[t(456)](32),r=s[t(456)](32);C=s.readBool(),T=r,x=2*e,A=T/x}}let D=1;(1!==k||1!==I)&&(D=k/I);let B=0,P=0;if(0===l)B=1,P=2-_;else{B=3===l?1:2,P=(1===l?2:1)*(2-_)}let M=16*(y+1),F=16*(g+1)*(2-_);M-=(b+w)*B,F-=(S+E)*P;let U=Math[t(475)](M*D);return s[t(474)](),s=null,{codec_mimetype:n,profile_idc:o,level_idc:a,profile_string:c,level_string:u,chroma_format_idc:l,bit_depth:f,bit_depth_luma:f,bit_depth_chroma:p,ref_frames:v,chroma_format:d,chroma_format_string:vr[t(447)](d),frame_rate:{fixed:C,fps:A,fps_den:x,fps_num:T},sar_ratio:{width:k,height:I},codec_size:{width:M,height:F},present_size:{width:U,height:F}}}static[fr(460)](e,t){const r=fr;let n=8,i=8,s=0;for(let o=0;o=this.buflen)return this[t(500)]=!0,0;this[t(500)]=!1,n=this[t(498)]+e>8?8-this.bufoff:e,r<<=n,r+=this[t(503)][this[t(506)]]>>8-this[t(498)]-n&255>>8-n,this.bufoff+=n,e-=n,8==this.bufoff&&(this[t(506)]++,this[t(498)]=0)}return r}[_r(508)](e){const t=_r;let r=this[t(506)],n=this[t(498)],i=this[t(497)](e);return this.bufpos=r,this[t(498)]=n,i}read_golomb(){const e=_r;let t;for(t=0;0===this[e(497)](1)&&!this.iserro;t++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i[t(234)](n,0),i.set(r[t(239)],4),r[t(239)]=i}if(r[t(248)]){const e=r[t(248)][t(256)],n=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),i=new Uint8Array(e+4);i[t(234)](n,0),i[t(234)](r[t(248)],4),r[t(248)]=i}return r}function Cr(){const e=["sps","readUByte","441vzwdwX","kReserved0","readBool","push","fps_den","readNextNaluPayload","read","pps","Could not find H264 startcode until payload end!","present_size","parseSPS","presentWidth","kSliceNonIDR","Invalid AVCDecoderConfigurationRecord version !== 1 || avcProfile === 0","avcc","byteLength","Invalid AVCDecoderConfigurationRecord: No PPS'","width","485376FtAikU","findNextStartCodeOffset","eofFlag","h264","fixed","18756bKALER","skipBits","bit_depth_chroma","1414545TovnNX","profile_string","Invalid AVCDecoderConfigurationRecord, lack of data!","avc_ref_frames","2037VgeESl","chromaFormat","skipUEG","1329888rVzTTE","bit_depth","frameRate","parseSPS$2","nalu","codec_size","iFrame","chroma_format_idc","4008432YDdOcF","12942jlAoNy","9026568Yebrwy","level_string","readUEG","level","fps_num","getUint16","read_golomb","codecWidth","buffer","profile","Strange NaluLengthSizeMinusOne: ","ceil","compat","length","setInt16","refSampleDuration","Invalid AVCDecoderConfigurationRecord: No SPS","codecHeight","subarray","type","sar_ratio","timescale","bit_depth_luma","nb_sps","presentHeight"," Strange AVCDecoderConfigurationRecord: SPS Count = ","readBits","chroma_format","shift","skipScalingList","frame_rate","data","bitDepth","codec","getUint8","videoType","set","height","error","avc1.","toString"];return(Cr=function(){return e})()}function Tr(e){const t=Ir;let{sps:r,pps:n}=e;const i=[23,0,0,0,0,1,66,0,30,255];i[0]=23,i[6]=r[1],i[7]=r[2],i[8]=r[3],i[10]=225,i[11]=r.byteLength>>8&255,i[12]=255&r[t(256)],i[t(244)](...r,1,n[t(256)]>>8&255,255&n.byteLength,...n);return new Uint8Array(i)}function xr(e){const t=Ir;let{sps:r,pps:n}=e,i=8+r.byteLength+1+2+n[t(256)],s=!1;const o=vr.parseSPS$2(r);66!==r[3]&&77!==r[3]&&88!==r[3]&&(s=!0,i+=4);let a=new Uint8Array(i);a[0]=1,a[1]=r[1],a[2]=r[2],a[3]=r[3],a[4]=255,a[5]=225;let c=r.byteLength;a[6]=c>>>8,a[7]=255&c;let u=8;a[t(234)](r,8),u+=c,a[u]=1;let l=n.byteLength;a[u+1]=l>>>8,a[u+2]=255&l,a[t(234)](n,u+3),u+=3+l,s&&(a[u]=252|o[t(195)],a[u+1]=248|o[t(220)]-8,a[u+2]=248|o[t(180)]-8,a[u+3]=0,u+=4);const d=[23,0,0,0,0],h=new Uint8Array(d[t(211)]+a[t(256)]);return h[t(234)](d,0),h[t(234)](a,d[t(211)]),h}function Dr(e,t){const r=Ir;let n=[];n[0]=t?23:39,n[1]=1,n[2]=0,n[3]=0,n[4]=0,n[5]=e[r(256)]>>24&255,n[6]=e[r(256)]>>16&255,n[7]=e.byteLength>>8&255,n[8]=255&e.byteLength;const i=new Uint8Array(n[r(211)]+e[r(256)]);return i[r(234)](n,0),i[r(234)](e,n[r(211)]),i}function Br(e,t){const r=Ir;let n=[];n[0]=t?23:39,n[1]=1,n[2]=0,n[3]=0,n[4]=0;const i=new Uint8Array(n[r(211)]+e[r(256)]);return i[r(234)](n,0),i[r(234)](e,n[r(211)]),i}function Pr(e){return 31&e[0]}function Mr(e){return e===Ue.kSliceSEI}function Fr(e){return!(t=e,t===Ue[Ir(239)]||t===Ue.pps||Mr(e));var t}function Ur(e){return e===Ue[Ir(194)]}function Rr(e){const t=Ir;if(0===e.length)return!1;const r=Pr(e[0]);for(let n=1;n=n.byteLength)return this[t(261)]=!0,n[t(256)];let e=n[r+0]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],i=n[r+0]<<16|n[r+1]<<8|n[r+2];if(1===e||1===i)return r;r++}}[kr(246)](){const e=kr;let t=this[e(229)],r=null;for(;null==r&&!this[e(261)];){let n=this.currentStartcodeOffset;n+=1===(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])?4:3;let i=31&t[n],s=(128&t[n])>>>7,o=this[e(260)](n);this.currentStartcodeOffset=o,i>=Ue[e(242)]||0===s&&(r={type:i,data:t[e(216)](n,o)})}return r}}class Or{constructor(e){const t=kr;let r=e.data.byteLength;this[t(217)]=e[t(217)],this.data=new Uint8Array(4+r),new DataView(this[t(229)][t(206)]).setUint32(0,r),this[t(229)][t(234)](e[t(229)],4)}}function zr(e,t){const r=Hr();return(zr=function(e,t){return r[e-=406]})(e,t)}const Nr=zr;function Hr(){const e=["m_bits","195SGBvTu","5CoMleI","12243072gmDSPd","34472273oIsyom","GetSE","m_byte","m_len","62496Yzmkcx","GetBYTE","12WTEaGy","41750COVLIo","9ncHtqt","GetWord","83872gYIRqP","m_data","m_zeros","32oQoVYG","166182vMmEjM","GetBit","m_idx","2674238nKRpBJ"];return(Hr=function(){return e})()}!function(e,t){const r=zr,n=e();for(;;)try{if(834919===parseInt(r(411))/1*(parseInt(r(424))/2)+parseInt(r(417))/3*(-parseInt(r(408))/4)+-parseInt(r(418))/5*(parseInt(r(412))/6)+-parseInt(r(415))/7+-parseInt(r(419))/8*(parseInt(r(406))/9)+parseInt(r(427))/10+parseInt(r(420))/11*(parseInt(r(426))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Hr);Nr(425),Nr(413),Nr(407),Nr(421);const jr=Wr;!function(e,t){const r=Wr,n=e();for(;;)try{if(931513===parseInt(r(441))/1+parseInt(r(447))/2+-parseInt(r(444))/3+parseInt(r(446))/4+parseInt(r(438))/5*(-parseInt(r(450))/6)+-parseInt(r(443))/7*(parseInt(r(453))/8)+parseInt(r(455))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Vr);jr(439);function Vr(){const e=["GetWord","SPSParser sps_seq_parameter_set_id > 15","24RgFCwO","SPSParser chroma_format_idc > 3","5736798OwqIga","15baqJGG","_ebsp2rbsp","GetUE","1279833KCMXvR","byteLength","17031yxJcHt","5114043ncZuXb","SPSParser bit_depth_luma_minus8 != bit_depth_chroma_minus8","6016944QkiCiG","475568BWdGHs","warn","buffer","2031564rymXaf"];return(Vr=function(){return e})()}function Wr(e,t){const r=Vr();return(Wr=function(e,t){return r[e-=438]})(e,t)}function $r(e,t){const r=Kr();return($r=function(e,t){return r[e-=175]})(e,t)}!function(e,t){const r=$r,n=e();for(;;)try{if(156528===-parseInt(r(178))/1+-parseInt(r(181))/2+parseInt(r(176))/3*(parseInt(r(180))/4)+-parseInt(r(179))/5+parseInt(r(189))/6*(-parseInt(r(193))/7)+parseInt(r(196))/8+parseInt(r(190))/9*(parseInt(r(185))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Kr);const Gr=e=>{let t=e,r=t[$r(183)],n=new Uint8Array(r),i=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(n[i]=t[e],i++);return new Uint8Array(n.buffer,0,i)},qr=e=>{const t=$r;switch(e){case 0:return"4:0:0";case 1:return t(186);case 2:return t(194);case 3:return"4:4:4";default:return t(192)}};function Kr(){const e=["byteLength",".1.L","10gHRKBu","4:2:0","readUEG","readSEG","647718HLZASv","5978520degApC","readBits","Unknown","7dnARCI","4:2:2","readBool","767000PGVBhh","hvc1.","readByte","33YxshGh",".B0","242060OnQHAb","201360KVryMz","29448iyzzZp","588648uxmxIF","push"];return(Kr=function(){return e})()}function Xr(){const e=["11248352KNeCTW","hvc1.","11620596wgnUkM","Main10","MainSP","parsePPS","parseVPS","getProfileString","4:0:0","Unknown","destroy","readBits","parseSPS","Main","toFixed","push",".B0","getChromaFormatString","2571336RsdaVr","4255958mZeQzF","getLevelString","3152547XVzMib","4:2:2","readByte","4:2:0","readSEG","readBool","2BmKeYH","1761672DgIUSV","4:4:4","Rext","readUEG","876145ZBmSHn",".1.L","_ebsp2rbsp","20INRPRt"];return(Xr=function(){return e})()}const Yr=Jr;function Jr(e,t){const r=Xr();return(Jr=function(e,t){return r[e-=471]})(e,t)}!function(e,t){const r=Jr,n=e();for(;;)try{if(992272===parseInt(r(503))/1*(parseInt(r(504))/2)+-parseInt(r(494))/3+parseInt(r(475))/4*(parseInt(r(472))/5)+-parseInt(r(478))/6+-parseInt(r(495))/7+parseInt(r(476))/8+parseInt(r(497))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Xr);class Zr{static[Yr(474)](e){let t=e,r=t.byteLength,n=new Uint8Array(r),i=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(n[i]=t[e],i++);return new Uint8Array(n.buffer,0,i)}static[Yr(482)](e){const t=Yr;let r=Zr._ebsp2rbsp(e),n=new at(r);return n[t(499)](),n[t(499)](),n[t(487)](4),n[t(487)](2),n[t(487)](6),{num_temporal_layers:n[t(487)](3)+1,temporal_id_nested:n[t(502)]()}}static[Yr(488)](e){const t=Yr;let r=Zr[t(474)](e),n=new at(r);n[t(499)](),n[t(499)]();let i=0,s=0,o=0,a=0;n.readBits(4);let c=n[t(487)](3);n[t(502)]();let u=n[t(487)](2),l=n[t(502)](),d=n[t(487)](5),h=n[t(499)](),f=n[t(499)](),p=n[t(499)](),m=n.readByte(),v=n[t(499)](),y=n[t(499)](),g=n[t(499)](),_=n.readByte(),b=n[t(499)](),w=n[t(499)](),S=n[t(499)](),E=[],k=[];for(let e=0;e0)for(let e=c;e<8;e++)n[t(487)](2);for(let e=0;e1&&n.readSEG();for(let e=0;e0&&e<=16?(U=r[e-1],R=i[e-1]):255===e&&(U=n.readBits(16),R=n[t(487)](16))}if(n[t(502)]()&&n.readBool(),n[t(502)]()){n[t(487)](3),n[t(502)](),n.readBool()&&(n.readByte(),n[t(499)](),n[t(499)]())}if(n[t(502)]()&&(n[t(471)](),n[t(471)]()),n[t(502)](),n[t(502)](),n.readBool(),M=n[t(502)](),M&&(n[t(471)](),n[t(471)](),n.readUEG(),n.readUEG()),n[t(502)]()){if(O=n[t(487)](32),z=n[t(487)](32),n[t(502)]()&&n[t(471)](),n[t(502)]()){let e=!1,r=!1,i=!1;e=n[t(502)](),r=n[t(502)](),(e||r)&&(i=n[t(502)](),i&&(n[t(499)](),n[t(487)](5),n.readBool(),n[t(487)](5)),n.readBits(4),n[t(487)](4),i&&n[t(487)](4),n.readBits(5),n[t(487)](5),n[t(487)](5));for(let s=0;s<=c;s++){let s=n[t(502)]();L=s;let o=!0,a=1;!s&&(o=n[t(502)]());let c=!1;if(o?n.readUEG():c=n[t(502)](),!c&&(a=n[t(471)]()+1),e){for(let e=0;e>6&3,n[t(264)]=e[1]>>5&1,n[t(241)]=31&e[1],n.general_profile_compatibility_flags=e[2]<<24|e[3]<<16|e[4]<<8|e[5],n.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],n[t(242)]=n.general_constraint_indicator_flags<<16|e[10]<<8|e[11],n[t(310)]=e[12],n.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],n.parallelismType=3&e[15],n[t(286)]=3&e[16],n[t(322)]=7&e[17],n[t(229)]=7&e[18],n.avgFrameRate=e[19]<<8|e[20],n[t(257)]=e[21]>>6&3,n[t(279)]=e[21]>>3&7,n[t(225)]=e[21]>>2&1,n[t(328)]=3&e[21];let i=e[22],s=e[t(252)](23);for(let e=0;e0)for(let t=r;t<8;t++)e[n(359)](2);i.sub_layer_profile_space=[],i.sub_layer_tier_flag=[],i[n(227)]=[],i.sub_layer_profile_compatibility_flag=[],i.sub_layer_progressive_source_flag=[],i[n(334)]=[],i[n(268)]=[],i[n(336)]=[],i[n(284)]=[];for(let t=0;t{const t=$r;let r=Gr(e),n=new at(r);return n[t(175)](),n[t(175)](),n[t(191)](4),n.readBits(2),n[t(191)](6),{num_temporal_layers:n.readBits(3)+1,temporal_id_nested:n[t(195)]()}})(r),a=(e=>{const t=$r;let r=Gr(e),n=new at(r);n[t(175)](),n[t(175)]();let i=0,s=0,o=0,a=0;n[t(191)](4);let c=n[t(191)](3);n[t(195)]();let u=n.readBits(2),l=n[t(195)](),d=n[t(191)](5),h=n[t(175)](),f=n[t(175)](),p=n[t(175)](),m=n.readByte(),v=n[t(175)](),y=n[t(175)](),g=n.readByte(),_=n.readByte(),b=n[t(175)](),w=n[t(175)](),S=n.readByte(),E=[],k=[];for(let e=0;e0)for(let e=c;e<8;e++)n[t(191)](2);for(let e=0;e1&&n[t(188)]();for(let e=0;e0&&e<16?(U=r[e-1],R=i[e-1]):255===e&&(U=n[t(191)](16),R=n[t(191)](16))}if(n.readBool()&&n[t(195)](),n[t(195)]()&&(n[t(191)](3),n.readBool(),n[t(195)]()&&(n[t(175)](),n[t(175)](),n[t(175)]())),n[t(195)]()&&(n[t(187)](),n[t(187)]()),n[t(195)](),n.readBool(),n.readBool(),M=n.readBool(),M&&(i+=n[t(187)](),s+=n[t(187)](),o+=n.readUEG(),a+=n[t(187)]()),n.readBool()&&(O=n[t(191)](32),z=n[t(191)](32),n[t(195)]()&&(n[t(187)](),n[t(195)]()))){let e=!1,r=!1,i=!1;e=n.readBool(),r=n.readBool(),(e||r)&&(i=n.readBool(),i&&(n[t(175)](),n[t(191)](5),n[t(195)](),n.readBits(5)),n.readBits(4),n[t(191)](4),i&&n[t(191)](4),n[t(191)](5),n[t(191)](5),n.readBits(5));for(let s=0;s<=c;s++){let s=n.readBool();L=s;let o=!1,a=1;!s&&(o=n[t(195)]());let c=!1;if(o?n[t(188)]():c=n[t(195)](),!c&&(cpbcnt=n.readUEG()+1),e)for(let e=0;e{const t=$r;let r=Gr(e),n=new at(r);n[t(175)](),n[t(175)](),n[t(187)](),n.readUEG(),n[t(195)](),n[t(195)](),n[t(191)](3),n[t(195)](),n[t(195)](),n.readUEG(),n[t(187)](),n.readSEG(),n[t(195)](),n[t(195)](),n.readBool()&&n[t(187)](),n[t(188)](),n[t(188)](),n[t(195)](),n[t(195)](),n[t(195)](),n.readBool();let i=n.readBool(),s=n[t(195)](),o=1;return s&&i?o=0:s?o=3:i&&(o=2),{parallelismType:o}})(n);s=Object.assign(s,o,a,c);let u=23+(5+r.byteLength)+(5+i[t(235)])+(5+n[t(235)]),l=new Uint8Array(u);l[0]=1,l[1]=(3&s.general_profile_space)<<6|(s[t(264)]?1:0)<<5|31&s[t(241)],l[2]=s[t(341)]||0,l[3]=s.general_profile_compatibility_flags_2||0,l[4]=s[t(358)]||0,l[5]=s[t(289)]||0,l[6]=s[t(254)]||0,l[7]=s[t(278)]||0,l[8]=s[t(307)]||0,l[9]=s[t(230)]||0,l[10]=s[t(282)]||0,l[11]=s[t(249)]||0,l[12]=60,l[13]=240|(3840&s[t(294)])>>8,l[14]=255&s[t(294)],l[15]=252|3&s.parallelismType,l[16]=252|3&s[t(272)],l[17]=248|7&s[t(354)],l[18]=248|7&s[t(297)],l[19]=0,l[20]=0,l[21]=(3&s[t(223)])<<6|(7&s[t(331)])<<3|(s[t(231)]?1:0)<<2|3,l[22]=3,l[23]=128|Re[t(283)],l[24]=0,l[25]=1,l[26]=(65280&r[t(235)])>>8,l[27]=(255&r[t(235)])>>0,l[t(245)](r,28),l[23+(5+r[t(235)])+0]=128|Re[t(255)],l[23+(5+r.byteLength)+1]=0,l[23+(5+r[t(235)])+2]=1,l[23+(5+r.byteLength)+3]=(65280&i.byteLength)>>8,l[23+(5+r.byteLength)+4]=(255&i[t(235)])>>0,l[t(245)](i,23+(5+r[t(235)])+5),l[23+(5+r[t(235)]+5+i[t(235)])+0]=128|Re[t(288)],l[23+(5+r.byteLength+5+i[t(235)])+1]=0,l[23+(5+r.byteLength+5+i.byteLength)+2]=1,l[23+(5+r.byteLength+5+i[t(235)])+3]=(65280&n[t(235)])>>8,l[23+(5+r[t(235)]+5+i[t(235)])+4]=(255&n[t(235)])>>0,l[t(245)](n,23+(5+r[t(235)]+5+i[t(235)])+5);const d=[28,0,0,0,0],h=new Uint8Array(d.length+l.byteLength);return h[t(245)](d,0),h[t(245)](l,d[t(280)]),h}function sn(e,t){const r=cn;let n=[];n[0]=t?28:44,n[1]=1,n[2]=0,n[3]=0,n[4]=0,n[5]=e[r(235)]>>24&255,n[6]=e[r(235)]>>16&255,n[7]=e.byteLength>>8&255,n[8]=255&e[r(235)];const i=new Uint8Array(n[r(280)]+e[r(235)]);return i[r(245)](n,0),i[r(245)](e,n.length),i}function on(e,t){const r=cn;let n=[];n[0]=t?28:44,n[1]=1,n[2]=0,n[3]=0,n[4]=0;const i=new Uint8Array(n[r(280)]+e[r(235)]);return i[r(245)](n,0),i[r(245)](e,n[r(280)]),i}function an(e){return(126&e[0])>>1}function cn(e,t){const r=fn();return(cn=function(e,t){return r[e-=222]})(e,t)}function un(e){return e===Re.sei}function ln(e){return!((t=e)>=32&&t<=40);var t}function dn(e){return e>=16&&e<=21}function hn(e){const t=cn;if(0===e[t(280)])return!1;const r=an(e[0]);for(let n=1;n=n[t(235)])return this.eofFlag=!0,n.byteLength;let e=n[r+0]<<24|n[r+1]<<16|n[r+2]<<8|n[r+3],i=n[r+0]<<16|n[r+1]<<8|n[r+2];if(1===e||1===i)return r;r++}}[Qr(326)](){const e=Qr;let t=this[e(261)],r=null;for(;null==r&&!this[e(343)];){let n=this[e(239)];n+=1===(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3])?4:3;let i=t[n]>>1&63,s=(128&t[n])>>>7,o=this[e(327)](n);this[e(239)]=o,0===s&&(r={type:i,data:t[e(355)](n,o)})}return r}}class mn{constructor(e){const t=Qr;let r=e[t(261)].byteLength;this[t(305)]=e[t(305)],this[t(261)]=new Uint8Array(4+r),new DataView(this[t(261)][t(324)])[t(266)](0,r),this[t(261)][t(245)](e[t(261)],4)}}var vn=Pn;!function(e,t){for(var r=Pn,n=e();;)try{if(830110===-parseInt(r(269))/1+-parseInt(r(300))/2+-parseInt(r(273))/3+parseInt(r(327))/4*(-parseInt(r(297))/5)+parseInt(r(288))/6*(-parseInt(r(304))/7)+parseInt(r(291))/8+parseInt(r(313))/9*(parseInt(r(334))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(On);var yn,gn=vn(328),_n=vn(333),bn=/^(?:text|application)\/xml/i,wn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Sn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,En=/^\s*$/,kn={},In={},An="",Cn={type:vn(293),beforeSend:Tn,success:Tn,error:Tn,complete:Tn,context:null,xhr:function(){return new(window[vn(318)])},accepts:{json:gn,xml:vn(315),html:_n,text:vn(268),"*":"*/"[vn(325)]("*")},crossDomain:!1,timeout:0,username:null,password:null,processData:!0,promise:Tn,contentType:vn(279)};function Tn(){}var xn=function(e,t){var r=vn;"object"==typeof e&&(t=e,e=void 0);var n=zn({},t=t||{});for(var i in Cn)void 0===n[i]&&(n[i]=Cn[i]);try{var s={},o=new Promise((function(e,t){var r=Pn;s[r(275)]=e,s[r(248)]=t}));o[r(275)]=s[r(275)],o[r(248)]=s[r(248)],n[r(322)]=o}catch(e){n[r(322)]={resolve:Tn,reject:Tn}}var a=Sn.exec(window.location.href.toLowerCase())||[];n[r(267)]=((e||n[r(267)]||window[r(337)].href)+"")[r(289)](/#.*$/,"")[r(289)](/^\/\//,a[1]+"//");var c=n[r(267)];!n.crossDomain&&(n[r(285)]=/^([\w-]+:)?\/\/([^\/]+)/.test(n.url)&&RegExp.$2!==window[r(337)].href);var u=n[r(321)];if("jsonp"===u){if(!/=\?/[r(305)](n.url)){var l=(n[r(331)]||"callback")+"=?";n[r(267)]=Un(n[r(267)],l)}return function(e){var t,r=vn,n=e[r(277)]||"jsonp"+jn(),i=window[r(280)][r(347)](r(339)),s={abort:function(){n in window&&(window[n]=Tn)}},o=window[r(280)][r(274)](r(299))[0]||window.document.documentElement;function a(n){var i=r;window[i(336)](t),s[i(351)](),Mn(n.type,s,n[i(338)],e),c()}function c(){var e=r;i[e(292)]?i[e(292)]():i.onload=i[e(257)]=i[e(335)]=null,i.parentNode&&i.parentNode[e(284)](i),i=null,delete window[n]}return i.onerror=function(e){a(e)},window[n]=function(n){window[r(336)](t),Dn(n,s,e),c()},Rn(e),i[r(262)]=e.url.replace(/=\?/,"="+n),i[r(262)]=Un(i.src,"_="+(new Date)[r(247)]()),i[r(295)]=!0,e[r(253)]&&(i.charset=e.scriptCharset),o[r(308)](i,o.firstChild),e[r(350)]>0&&(t=window[r(340)]((function(){var t=r;s[t(351)](),Mn(t(350),s,t(350),e),c()}),e.timeout)),e[r(322)][r(351)]=function(){s.abort()},e[r(322)][r(270)]=s,e[r(322)]}(n)}Rn(n);var d=n[r(341)][u]||n.accepts["*"],h={};/^([\w-]+:)\/\//[r(305)](n[r(267)])?RegExp.$1:window[r(337)][r(249)];var f,p=Cn[r(270)]();!n.crossDomain&&!h[r(251)]&&(h[r(251)]="XMLHttpRequest"),n[r(290)]&&(kn[c]&&(h[r(281)]=kn[c]),In[c]&&(h["If-None-Match"]=In[c])),d&&(h[r(256)]=d,d[r(332)](",")>-1&&(d=d[r(254)](",",2)[0]),p[r(302)]&&p[r(302)](d));var m=!/^(?:GET|HEAD)$/[r(305)](n[r(338)][r(342)]());if((n[r(346)]&&m&&!1!==n[r(307)]||t.contentType)&&(h[r(264)]=n[r(307)]),!1===n[r(344)]&&!m){var v=/([?&])_=[^&]*/;n.url=v.test(c)?c[r(289)](v,r(283)+jn()):c+(/\?/[r(305)](c)?"&":"?")+"_="+jn()}n[r(314)]=zn(h,n[r(314)]||{}),p[r(257)]=function(){var e,t,i=r;if(4===p.readyState){clearTimeout(f);var s,o=!1;if(p[i(349)]>=200&&p[i(349)]<300||304===p.status){if(An=p[i(320)](),n[i(290)]){var a=Fn(i(330));a&&(kn[c]=a),(a=Fn("etag"))&&(In[c]=a)}u=u||(e=p[i(348)](i(255)),t=vn,e&&(e===_n?"html":e===gn?t(282):bn.test(e)&&t(294))||"text"),s=p[i(326)];try{u===i(294)?s=p[i(250)]:u===i(282)&&(s=En[i(305)](s)?null:JSON[i(266)](s))}catch(e){o=e}o?Mn(o,i(323),p,n):Dn(s,p,n)}else Mn(null,i(306),p,n)}};var y=!("async"in n)||n.async;if(p[r(276)](n[r(338)],n[r(267)],y,n[r(259)],n[r(260)]),n[r(309)])for(var g in n.xhrFields)p[g]=n[r(309)][g];for(var g in n.mimeType&&p.overrideMimeType&&p[r(302)](n[r(272)]),n[r(314)])void 0!==n[r(314)][g]&&p[r(310)](g,n[r(314)][g]+"");return!1===function(e,t){var r=vn,n=t[r(287)];if(!1===t[r(343)][r(324)](n,e,t))return!1}(p,n)?(p[r(351)](),!1):(n[r(350)]>0&&(f=window[r(340)]((function(){var e=r;p.onreadystatechange=Tn,p[e(351)](),Mn(null,e(350),p,n)}),n.timeout)),p[r(278)](n[r(346)]?n.data:null),n[r(322)][r(351)]=function(){p.abort()},n[r(322)])};function Dn(e,t,r){var n=vn,i=r[n(287)],s=n(316);r[n(316)][n(324)](i,e,s,t),r[n(322)][n(275)](e,s,t),Bn(s,t,r)}function Bn(e,t,r){var n=vn,i=r[n(287)];r[n(258)][n(324)](i,t,e)}function Pn(e,t){var r=On();return(Pn=function(e,t){return r[e-=247]})(e,t)}function Mn(e,t,r,n){var i=vn,s=n[i(287)];n.error[i(324)](s,r,t,e),n[i(322)][i(248)](r,t,e),Bn(t,r,n)}function Fn(e){var t,r=vn;if(!yn){for(yn={};t=wn[r(286)](An);)yn[t[1][r(301)]()]=t[2];t=yn[e[r(301)]()]}return null===t?null:t}function Un(e,t){return(e+"&"+t).replace(/[&?]{1,2}/,"?")}function Rn(e){var t,r,n,i,s=vn;Nn(e)&&!(e[s(346)]instanceof FormData)&&e[s(329)]&&(e[s(346)]=(t=e[s(346)],(i=[])[(n=vn)(265)]=function(e,t){this[n(317)](encodeURIComponent(e)+"="+encodeURIComponent(t))},Ln(i,t,r),i[n(345)]("&")[n(289)](n(303),"+"))),e.data&&(!e[s(338)]||e[s(338)].toUpperCase()===s(293))&&(e[s(267)]=Un(e[s(267)],e[s(346)]))}function Ln(e,t,r,n){var i,s,o=vn,a=(i=t,s=vn,"[object Array]"===Object[s(263)][s(252)].call(i));for(var c in t){var u=t[c];n&&(c=r?n:n+"["+(a?"":c)+"]"),!n&&a?e[o(265)](u.name,u[o(311)]):(r?a(u):Nn(u))?Ln(e,u,r,c):e[o(265)](c,u)}}function On(){var e=["10zRjQYG","onerror","clearTimeout","location","type","script","setTimeout","accepts","toUpperCase","beforeSend","cache","join","data","createElement","getResponseHeader","status","timeout","abort","getTime","reject","protocol","responseXML","X-Requested-With","toString","scriptCharset","split","content-type","Accept","onreadystatechange","complete","username","password","get","src","prototype","Content-Type","add","parse","url","text/plain","500142ZAPLbD","xhr","POST","mimeType","1489884bZZcuh","getElementsByTagName","resolve","open","jsonpCallback","send","application/x-www-form-urlencoded; charset=UTF-8","document","If-Modified-Since","json","$1_=","removeChild","crossDomain","exec","context","1122udLbaM","replace","ifModified","6957584oqXZKw","clearAttributes","GET","xml","async","function","17095iZzddy","length","head","3251990QGjjPY","toLowerCase","overrideMimeType","%20","23835NWDzRl","test","error","contentType","insertBefore","xhrFields","setRequestHeader","value","ajaxSetup","35687286nLXPoN","headers","application/xml, text/xml","success","push","XMLHttpRequest","getJSON","getAllResponseHeaders","dataType","promise","parseerror","call","concat","responseText","872YdnIvI","application/json, text/javascript","processData","Last-Modified","jsonp","indexOf","text/html"];return(On=function(){return e})()}function zn(e){for(var t=vn,r=Array[t(263)].slice,n=r[t(324)](arguments,1),i=0,s=n[t(298)];i255)return!1;return!0}function Gn(e,t){var r=_i;if(e[r(371)]&&e[r(386)]===r(416))return t&&(e=e[r(402)]?e[r(402)]():Array[r(380)][r(402)][r(374)](e)),e;if(Array[r(368)](e)){if(!$n(e))throw new Error(r(365)+e);return new Uint8Array(e)}if(Wn(e[r(410)])&&$n(e))return new Uint8Array(e);throw new Error(r(413))}function qn(e){return new Uint8Array(e)}function Kn(e,t,r,n,i){var s=_i;(null!=n||null!=i)&&(e=e[s(402)]?e.slice(n,i):Array[s(380)][s(402)].call(e,n,i)),t[s(376)](e,r)}!function(e,t){for(var r=_i,n=e();;)try{if(739423===-parseInt(r(385))/1+-parseInt(r(407))/2*(-parseInt(r(363))/3)+parseInt(r(414))/4+parseInt(r(418))/5*(parseInt(r(408))/6)+parseInt(r(360))/7*(-parseInt(r(361))/8)+-parseInt(r(362))/9+-parseInt(r(369))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(yi);var Xn,Yn={toBytes:function(e){var t=_i,r=[],n=0;for(e=encodeURI(e);n191&&i<224?(r.push(String[t(417)]((31&i)<<6|63&e[n+1])),n+=2):(r[t(373)](String[t(417)]((15&i)<<12|(63&e[n+1])<<6|63&e[n+2])),n+=3)}return r[t(370)]("")}},Jn=(Xn="0123456789abcdef",{toBytes:function(e){for(var t=_i,r=[],n=0;n>4]+Xn[15&i])}return r[t(370)]("")}}),Zn={16:10,24:12,32:14},Qn=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],ei=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],ti=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],ri=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],ni=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],ii=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],si=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],oi=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],ai=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],ci=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],ui=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],li=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],di=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],hi=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],fi=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function pi(e){for(var t=_i,r=[],n=0;n>2,this[e(367)][n][r%4]=o[r],this[e(406)][t-n][r%4]=o[r];for(var a,c=0,u=s;u>16&255]<<24^ei[a>>8&255]<<16^ei[255&a]<<8^ei[a>>24&255]^Qn[c]<<24,c+=1,8!=s)for(r=1;r>8&255]<<8^ei[a>>16&255]<<16^ei[a>>24&255]<<24;for(r=s/2+1;r>2,d=u%4,this._Ke[l][d]=o[r],this[e(406)][t-l][d]=o[r++],u++}for(var l=1;l>24&255]^di[a>>16&255]^hi[a>>8&255]^fi[255&a]},mi[Vn(380)][Vn(412)]=function(e){var t=Vn;if(16!=e[t(410)])throw new Error(t(379));for(var r=this[t(367)][t(410)]-1,n=[0,0,0,0],i=pi(e),s=0;s<4;s++)i[s]^=this._Ke[0][s];for(var o=1;o>24&255]^ni[i[(s+1)%4]>>16&255]^ii[i[(s+2)%4]>>8&255]^si[255&i[(s+3)%4]]^this[t(367)][o][s];i=n[t(402)]()}var a,c=qn(16);for(s=0;s<4;s++)a=this[t(367)][r][s],c[4*s]=255&(ei[i[s]>>24&255]^a>>24),c[4*s+1]=255&(ei[i[(s+1)%4]>>16&255]^a>>16),c[4*s+2]=255&(ei[i[(s+2)%4]>>8&255]^a>>8),c[4*s+3]=255&(ei[255&i[(s+3)%4]]^a);return c},mi[Vn(380)][Vn(391)]=function(e){var t=Vn;if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var r=this[t(406)][t(410)]-1,n=[0,0,0,0],i=pi(e),s=0;s<4;s++)i[s]^=this[t(406)][0][s];for(var o=1;o>24&255]^ai[i[(s+3)%4]>>16&255]^ci[i[(s+2)%4]>>8&255]^ui[255&i[(s+1)%4]]^this[t(406)][o][s];i=n[t(402)]()}var a,c=qn(16);for(s=0;s<4;s++)a=this._Kd[r][s],c[4*s]=255&(ti[i[s]>>24&255]^a>>24),c[4*s+1]=255&(ti[i[(s+3)%4]>>16&255]^a>>16),c[4*s+2]=255&(ti[i[(s+2)%4]>>8&255]^a>>8),c[4*s+3]=255&(ti[255&i[(s+1)%4]]^a);return c};var vi=function(e){var t=Vn;if(!(this instanceof vi))throw Error("AES must be instanitated with `new`");this[t(388)]=t(400),this[t(386)]=t(375),this[t(387)]=new mi(e)};function yi(){var e=["push","call","ecb","set","invalid initialation vector size (must be 16 bytes)","segmentSize","invalid plaintext size (must be 16 bytes)","prototype","_lastCipherblock","invalid key size (must be 16, 24 or 32 bytes)","_remainingCounterIndex","increment","466266SFjJaZ","name","_aes","description","PKCS#7 invalid padding byte","AES must be instanitated with `new`","decrypt","cfb","defineProperty","_lastPrecipher","key","setBytes","substr","_prepare","PKCS#7 invalid length","Electronic Code Block","Output Feedback","slice","invalid ciphertext size (must be multiple of 16 bytes)","invalid initialation vector size (must be 16 size)","_lastPrecipherIndex","_Kd","838846qOzVBc","58974zbYyGv","Cipher Feedback","length","_remainingCounter","encrypt","unsupported array-like object","4688144XhwHTV","Cipher Block Chaining","Uint8Array","fromCharCode","160OqURKS","invalid ciphertext size (must be segmentSize bytes)","charCodeAt","_counter","setValue","_shiftRegister","number","966287UOzOhV","8LyVObO","3475422vTcLuX","3LXyHXn","MAX_SAFE_INTEGER","Array contains invalid value: ","invalid counter value (must be an integer)","_Ke","isArray","1760990thsWZS","join","buffer","Counter"];return(yi=function(){return e})()}vi[Vn(380)][Vn(412)]=function(e){var t=Vn;if((e=Gn(e))[t(410)]%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var r=qn(e.length),n=qn(16),i=0;iNumber[t(364)])throw new Error("integer value out of safe range");for(var r=15;r>=0;--r)this[t(356)][r]=e%256,e=parseInt(e/256)},Si[Vn(380)][Vn(396)]=function(e){var t=Vn;if(16!=(e=Gn(e,!0))[t(410)])throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},Si[Vn(380)][Vn(384)]=function(){for(var e=Vn,t=15;t>=0;t--){if(255!==this[e(356)][t]){this[e(356)][t]++;break}this._counter[t]=0}};var Ei=function(e,t){var r=Vn;if(!(this instanceof Ei))throw Error(r(390));this[r(388)]=r(372),this.name="ctr",!(t instanceof Si)&&(t=new Si(t)),this._counter=t,this[r(411)]=null,this._remainingCounterIndex=16,this[r(387)]=new mi(e)};Ei[Vn(380)].encrypt=function(e){for(var t=Vn,r=Gn(e,!0),n=0;n16)throw new Error("PKCS#7 padding byte out of range");for(var n=e[t(410)]-r,i=0;i>>2]>>>24-a%4*8&255;r[s+a>>>2]|=c<<24-(s+a)%4*8}else for(var u=0;u>>2]=n[u>>>2];return this[t(519)]+=o,this},clamp:function(){var t=i,r=this[t(523)],n=this[t(519)];r[n>>>2]&=4294967295<<32-n%4*8,r[t(549)]=e[t(498)](n/4)},clone:function(){var e=i,t=u[e(546)][e(510)](this);return t[e(523)]=this[e(523)].slice(0),t},random:function(e){for(var t=i,r=[],n=0;n>>2]>>>24-o%4*8&255;s[t(560)]((a>>>4)[t(548)](16)),s[t(560)]((15&a)[t(548)](16))}return s.join("")},parse:function(e){for(var t=e[i(549)],r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new l.init(r,t/2)}},f=d[i(530)]={stringify:function(e){for(var t=i,r=e[t(523)],n=e[t(519)],s=[],o=0;o>>2]>>>24-o%4*8&255;s.push(String.fromCharCode(a))}return s[t(537)]("")},parse:function(e){for(var t=i,r=e[t(549)],n=[],s=0;s>>2]|=(255&e.charCodeAt(s))<<24-s%4*8;return new(l[t(535)])(n,r)}},p=d[i(556)]={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},m=c[i(528)]=u[i(543)]({reset:function(){var e=i;this[e(524)]=new(l[e(535)]),this[e(541)]=0},_append:function(e){var t=i;"string"==typeof e&&(e=p[t(531)](e)),this[t(524)].concat(e),this._nDataBytes+=e[t(519)]},_process:function(t){var r,n=i,s=this[n(524)],o=s.words,a=s[n(519)],c=this[n(557)],u=a/(4*c),d=(u=t?e[n(498)](u):e.max((0|u)-this[n(503)],0))*c,h=e[n(539)](4*d,a);if(d){for(var f=0;f>>2]|=e[o]<<24-o%4*8;n.call(this,s,i)}else n[r(476)](this,arguments)};i[t(456)]=r}}(),e.lib[t(458)]},"object"===(i=Bi)(454)?e[i(470)]=n(Ti):n(r[i(453)])}));var Fi=Ri;function Ui(){var e=["Utf16BE","enc","376389pyBIIA","WordArray","2256060TZfHDV","sigBytes","25694320ZWLDDv","10iDyEzu","16octVuR","charCodeAt","createCommonjsModule","2783852GtJWjc","3578352Sfcmfa","Utf16","push","create","Utf16LE","join","2830226CCNRwl","object","fromCharCode","./core","amd","CryptoJS","lib","length","commonjsGlobal","6rKhQUN","exports","words","946116ZZJeOR"];return(Ui=function(){return e})()}function Ri(e,t){var r=Ui();return(Ri=function(e,t){return r[e-=179]})(e,t)}!function(e,t){for(var r=Ri,n=e();;)try{if(784104===-parseInt(r(180))/1+-parseInt(r(185))/2+parseInt(r(193))/3+-parseInt(r(192))/4*(parseInt(r(188))/5)+parseInt(r(208))/6*(parseInt(r(199))/7)+parseInt(r(189))/8*(parseInt(r(183))/9)+parseInt(r(187))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ui);tt[Fi(191)]((function(e,t){var r,n,i,s=Fi;r=tt[s(207)],n=function(e){var t=s;return function(){var t=Ri,r=e,n=r[t(205)][t(184)],i=r[t(182)];function s(e){return e<<8&4278255360|e>>>8&16711935}i[t(194)]=i[t(181)]={stringify:function(e){for(var r=t,n=e[r(179)],i=e.sigBytes,s=[],o=0;o>>2]>>>16-o%4*8&65535;s[r(195)](String[r(201)](a))}return s[r(198)]("")},parse:function(e){for(var r=t,i=e.length,s=[],o=0;o>>1]|=e.charCodeAt(o)<<16-o%2*16;return n[r(196)](s,2*i)}},i[t(197)]={stringify:function(e){for(var r=t,n=e.words,i=e[r(186)],o=[],a=0;a>>2]>>>16-a%4*8&65535);o[r(195)](String[r(201)](c))}return o[r(198)]("")},parse:function(e){for(var r=t,i=e[r(206)],o=[],a=0;a>>1]|=s(e[r(190)](a)<<16-a%2*16);return n[r(196)](o,2*i)}}}(),e[t(182)].Utf16},"object"===(i=Ri)(200)?e[i(209)]=n(Ti):n(r[i(204)])}));var Li=Oi;function Oi(e,t){var r=zi();return(Oi=function(e,t){return r[e-=320]})(e,t)}!function(e,t){for(var r=Oi,n=e();;)try{if(681729===parseInt(r(350))/1*(parseInt(r(322))/2)+-parseInt(r(327))/3+-parseInt(r(329))/4+-parseInt(r(344))/5*(parseInt(r(342))/6)+-parseInt(r(336))/7*(-parseInt(r(341))/8)+parseInt(r(320))/9*(parseInt(r(345))/10)+-parseInt(r(349))/11*(-parseInt(r(333))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(zi);tt[Li(352)]((function(e,t){var r,n,i,s=Li;r=tt[s(347)],n=function(e){var t,r,n,i=s;return t=Oi,n=(r=e).lib.WordArray,r[t(324)][t(332)]={stringify:function(e){var r=t,n=e[r(331)],i=e[r(340)],s=this[r(338)];e[r(335)]();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,u=0;u<4&&a+.75*u>>6*(3-u)&63));var l=s[r(326)](64);if(l)for(;o[r(323)]%4;)o[r(321)](l);return o[r(334)]("")},parse:function(e){var r=t,i=e.length,s=this[r(338)],o=this._reverseMap;if(!o){o=this[r(325)]=[];for(var a=0;a>>6-c%4*2;o[a>>>2]|=u<<24-a%4*8,a++}return n[s(328)](o,a)}(e,i,o)},_map:t(348)},e[i(324)].Base64},"object"===(i=Oi)(337)?e.exports=n(Ti):n(r[i(330)])}));function zi(){var e=["./core","sigBytes","2152PUOrPs","66AnbPsv","amd","238995EWSyNL","78770Zdjdvh","charCodeAt","commonjsGlobal","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","33lLEesY","360867bTgoeX","indexOf","createCommonjsModule","1098gjKPgU","push","4ikBdZJ","length","enc","_reverseMap","charAt","1196823PdjxGT","create","4200160XWlihs","CryptoJS","words","Base64","1052292AILZua","join","clamp","18494LzelbB","object","_map"];return(zi=function(){return e})()}var Ni=Hi;function Hi(e,t){var r=ji();return(Hi=function(e,t){return r[e-=442]})(e,t)}function ji(){var e=["11331dAtKvD","indexOf","Base64url","enc","60gcUUcE","133281owsfrj","_reverseMap","words","CryptoJS","_map","3234770UezAdy","join","8180STICnt","clamp","5671720AsZQwr","WordArray","18PxIohN","./core","65997IKgHpV","charCodeAt","commonjsGlobal","1090855qrowIq","function","charAt","805814yBDGML","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","push","length","sigBytes","createCommonjsModule","object","create"];return(ji=function(){return e})()}!function(e,t){for(var r=Hi,n=e();;)try{if(737679===parseInt(r(461))/1+parseInt(r(448))/2+parseInt(r(442))/3*(parseInt(r(460))/4)+-parseInt(r(445))/5*(-parseInt(r(472))/6)+-parseInt(r(466))/7+parseInt(r(470))/8+-parseInt(r(456))/9*(parseInt(r(468))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ji);tt[Ni(453)]((function(e,t){var r,n,i;r=tt[Ni(444)],n=function(e){return t=Hi,n=(r=e).lib[t(471)],r[t(459)][t(458)]={stringify:function(e,r){var n=t;void 0===r&&(r=!0);var i=e[n(463)],s=e[n(452)],o=r?this._safe_map:this._map;e[n(469)]();for(var a=[],c=0;c>>2]>>>24-c%4*8&255)<<16|(i[c+1>>>2]>>>24-(c+1)%4*8&255)<<8|i[c+2>>>2]>>>24-(c+2)%4*8&255,l=0;l<4&&c+.75*l>>6*(3-l)&63));var d=o[n(447)](64);if(d)for(;a[n(451)]%4;)a[n(450)](d);return a[n(467)]("")},parse:function(e,r){var i=t;void 0===r&&(r=!0);var s=e[i(451)],o=r?this._safe_map:this[i(465)],a=this._reverseMap;if(!a){a=this[i(462)]=[];for(var c=0;c>>6-c%4*2;o[a>>>2]|=u<<24-a%4*8,a++}return n[s(455)](o,a)}(e,s,a)},_map:t(449),_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},e.enc.Base64url;var t,r,n},(i=Hi)(454)==i(454)?e.exports=n(Ti):"undefined"===i(446)&&(void 0).amd?(void 0)([i(473)],n):n(r[i(464)])}));var Vi=Wi;!function(e,t){for(var r=Wi,n=e();;)try{if(547682===-parseInt(r(166))/1*(-parseInt(r(150))/2)+-parseInt(r(163))/3+parseInt(r(168))/4+parseInt(r(143))/5*(-parseInt(r(152))/6)+parseInt(r(159))/7*(-parseInt(r(156))/8)+parseInt(r(162))/9*(parseInt(r(137))/10)+-parseInt(r(161))/11*(-parseInt(r(139))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}($i);tt[Vi(169)]((function(e,t){var r,n,i,s=Vi;r=tt[s(170)],n=function(e){var t=s;return function(t){var r=Wi,n=e,i=n[r(147)],s=i[r(145)],o=i[r(157)],a=n[r(167)],c=[];!function(){for(var e=r,n=0;n<64;n++)c[n]=4294967296*t[e(149)](t[e(144)](n+1))|0}();var u=a[r(155)]=o[r(140)]({_doReset:function(){var e=r;this[e(153)]=new(s[e(135)])([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=r,i=0;i<16;i++){var s=t+i,o=e[s];e[s]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a=this[n(153)][n(151)],u=e[t+0],p=e[t+1],m=e[t+2],v=e[t+3],y=e[t+4],g=e[t+5],_=e[t+6],b=e[t+7],w=e[t+8],S=e[t+9],E=e[t+10],k=e[t+11],I=e[t+12],A=e[t+13],C=e[t+14],T=e[t+15],x=a[0],D=a[1],B=a[2],P=a[3];x=l(x,D,B,P,u,7,c[0]),P=l(P,x,D,B,p,12,c[1]),B=l(B,P,x,D,m,17,c[2]),D=l(D,B,P,x,v,22,c[3]),x=l(x,D,B,P,y,7,c[4]),P=l(P,x,D,B,g,12,c[5]),B=l(B,P,x,D,_,17,c[6]),D=l(D,B,P,x,b,22,c[7]),x=l(x,D,B,P,w,7,c[8]),P=l(P,x,D,B,S,12,c[9]),B=l(B,P,x,D,E,17,c[10]),D=l(D,B,P,x,k,22,c[11]),x=l(x,D,B,P,I,7,c[12]),P=l(P,x,D,B,A,12,c[13]),B=l(B,P,x,D,C,17,c[14]),x=d(x,D=l(D,B,P,x,T,22,c[15]),B,P,p,5,c[16]),P=d(P,x,D,B,_,9,c[17]),B=d(B,P,x,D,k,14,c[18]),D=d(D,B,P,x,u,20,c[19]),x=d(x,D,B,P,g,5,c[20]),P=d(P,x,D,B,E,9,c[21]),B=d(B,P,x,D,T,14,c[22]),D=d(D,B,P,x,y,20,c[23]),x=d(x,D,B,P,S,5,c[24]),P=d(P,x,D,B,C,9,c[25]),B=d(B,P,x,D,v,14,c[26]),D=d(D,B,P,x,w,20,c[27]),x=d(x,D,B,P,A,5,c[28]),P=d(P,x,D,B,m,9,c[29]),B=d(B,P,x,D,b,14,c[30]),x=h(x,D=d(D,B,P,x,I,20,c[31]),B,P,g,4,c[32]),P=h(P,x,D,B,w,11,c[33]),B=h(B,P,x,D,k,16,c[34]),D=h(D,B,P,x,C,23,c[35]),x=h(x,D,B,P,p,4,c[36]),P=h(P,x,D,B,y,11,c[37]),B=h(B,P,x,D,b,16,c[38]),D=h(D,B,P,x,E,23,c[39]),x=h(x,D,B,P,A,4,c[40]),P=h(P,x,D,B,u,11,c[41]),B=h(B,P,x,D,v,16,c[42]),D=h(D,B,P,x,_,23,c[43]),x=h(x,D,B,P,S,4,c[44]),P=h(P,x,D,B,I,11,c[45]),B=h(B,P,x,D,T,16,c[46]),x=f(x,D=h(D,B,P,x,m,23,c[47]),B,P,u,6,c[48]),P=f(P,x,D,B,b,10,c[49]),B=f(B,P,x,D,C,15,c[50]),D=f(D,B,P,x,g,21,c[51]),x=f(x,D,B,P,I,6,c[52]),P=f(P,x,D,B,v,10,c[53]),B=f(B,P,x,D,E,15,c[54]),D=f(D,B,P,x,p,21,c[55]),x=f(x,D,B,P,w,6,c[56]),P=f(P,x,D,B,T,10,c[57]),B=f(B,P,x,D,_,15,c[58]),D=f(D,B,P,x,A,21,c[59]),x=f(x,D,B,P,y,6,c[60]),P=f(P,x,D,B,k,10,c[61]),B=f(B,P,x,D,m,15,c[62]),D=f(D,B,P,x,S,21,c[63]),a[0]=a[0]+x|0,a[1]=a[1]+D|0,a[2]=a[2]+B|0,a[3]=a[3]+P|0},_doFinalize:function(){var e=r,n=this[e(158)],i=n[e(151)],s=8*this._nDataBytes,o=8*n[e(141)];i[o>>>5]|=128<<24-o%32;var a=t[e(138)](s/4294967296),c=s;i[15+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),i[14+(o+64>>>9<<4)]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),n[e(141)]=4*(i[e(136)]+1),this[e(146)]();for(var u=this[e(153)],l=u[e(151)],d=0;d<4;d++){var h=l[d];l[d]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}return u},clone:function(){var e=r,t=o.clone[e(142)](this);return t[e(153)]=this[e(153)][e(172)](),t}});function l(e,t,r,n,i,s,o){var a=e+(t&r|~t&n)+i+o;return(a<>>32-s)+t}function d(e,t,r,n,i,s,o){var a=e+(t&n|r&~n)+i+o;return(a<>>32-s)+t}function h(e,t,r,n,i,s,o){var a=e+(t^r^n)+i+o;return(a<>>32-s)+t}function f(e,t,r,n,i,s,o){var a=e+(r^(t|~n))+i+o;return(a<>>32-s)+t}n[r(155)]=o._createHelper(u),n.HmacMD5=o[r(160)](u)}(Math),e[t(155)]},"object"===(i=Wi)(164)?e[i(148)]=n(Ti):n(r[i(154)])}));function Wi(e,t){var r=$i();return(Wi=function(e,t){return r[e-=135]})(e,t)}function $i(){var e=["_hash","CryptoJS","MD5","8fMMnhm","Hasher","_data","7227269fQTGPl","_createHmacHelper","165rnMwgu","177462BsexoK","1291989YPEelW","object","./core","413245JPpsPS","algo","2784360TJdajc","createCommonjsModule","commonjsGlobal","amd","clone","init","length","110VGdOjK","floor","712668qLOwcZ","extend","sigBytes","call","5ZUIrTX","sin","WordArray","_process","lib","exports","abs","4NvYNSt","words","3717006yyxInk"];return($i=function(){return e})()}var Gi=qi;function qi(e,t){var r=Ki();return(qi=function(e,t){return r[e-=249]})(e,t)}function Ki(){var e=["1506043GSTIqm","2648388bIqRPD","4859828JGGNSt","init","SHA1","_data","words","750589LMGmiT","./core","amd","13473801HwoHKI","41422yCDuOe","createCommonjsModule","clone","_createHelper","call","exports","function","HmacSHA1","Hasher","19951140GNEKlT","commonjsGlobal","_nDataBytes","WordArray","5SnlLTT","_process","CryptoJS","sigBytes","floor","8mmzLuN","_createHmacHelper","_hash","object","192ACbrLO"];return(Ki=function(){return e})()}!function(e,t){for(var r=qi,n=e();;)try{if(798564===parseInt(r(260))/1+parseInt(r(264))/2*(-parseInt(r(252))/3)+-parseInt(r(255))/4*(-parseInt(r(277))/5)+parseInt(r(254))/6+parseInt(r(253))/7+parseInt(r(282))/8*(parseInt(r(263))/9)+-parseInt(r(273))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ki);tt[Gi(265)]((function(e,t){var r,n,i,s=Gi;r=tt[s(274)],n=function(e){var t,r,n,i,o,a,c,u,l=s;return t=qi,n=(r=e).lib,i=n[t(276)],o=n[t(272)],a=r.algo,c=[],u=a[t(257)]=o.extend({_doReset:function(){var e=t;this._hash=new(i[e(256)])([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,r){for(var n=t,i=this[n(250)][n(259)],s=i[0],o=i[1],a=i[2],u=i[3],l=i[4],d=0;d<80;d++){if(d<16)c[d]=0|e[r+d];else{var h=c[d-3]^c[d-8]^c[d-14]^c[d-16];c[d]=h<<1|h>>>31}var f=(s<<5|s>>>27)+l+c[d];f+=d<20?1518500249+(o&a|~o&u):d<40?1859775393+(o^a^u):d<60?(o&a|o&u|a&u)-1894007588:(o^a^u)-899497514,l=u,u=a,a=o<<30|o>>>2,o=s,s=f}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+a|0,i[3]=i[3]+u|0,i[4]=i[4]+l|0},_doFinalize:function(){var e=t,r=this[e(258)],n=r[e(259)],i=8*this[e(275)],s=8*r.sigBytes;return n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=Math[e(281)](i/4294967296),n[15+(s+64>>>9<<4)]=i,r[e(280)]=4*n.length,this[e(278)](),this[e(250)]},clone:function(){var e=t,r=o[e(266)][e(268)](this);return r[e(250)]=this._hash[e(266)](),r}}),r[t(257)]=o[t(267)](u),r[t(271)]=o[t(249)](u),e[l(257)]},(i=qi)(251)==i(251)?e[i(269)]=n(Ti):"undefined"===i(270)&&(void 0)[i(262)]?(void 0)([i(261)],n):n(r[i(279)])}));var Xi=Yi;!function(e,t){for(var r=Yi,n=e();;)try{if(677184===-parseInt(r(173))/1*(parseInt(r(200))/2)+-parseInt(r(193))/3+-parseInt(r(197))/4*(-parseInt(r(180))/5)+-parseInt(r(181))/6+-parseInt(r(164))/7*(parseInt(r(187))/8)+parseInt(r(178))/9+parseInt(r(165))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ji);tt[Xi(175)]((function(e,t){var r,n,i;r=Qe,n=function(e){var t=Yi;return function(t){var r=Yi,n=e,i=n[r(174)],s=i[r(189)],o=i[r(198)],a=n[r(186)],c=[],u=[];!function(){var e=r;function n(e){for(var r=t[Yi(168)](e),n=2;n<=r;n++)if(!(e%n))return!1;return!0}function i(e){return 4294967296*(e-(0|e))|0}for(var s=2,o=0;o<64;)n(s)&&(o<8&&(c[o]=i(t[e(167)](s,.5))),u[o]=i(t[e(167)](s,1/3)),o++),s++}();var l=[],d=a[r(176)]=o[r(199)]({_doReset:function(){var e=r;this._hash=new(s[e(163)])(c[e(183)](0))},_doProcessBlock:function(e,t){for(var n=r,i=this._hash[n(171)],s=i[0],o=i[1],a=i[2],c=i[3],d=i[4],h=i[5],f=i[6],p=i[7],m=0;m<64;m++){if(m<16)l[m]=0|e[t+m];else{var v=l[m-15],y=(v<<25|v>>>7)^(v<<14|v>>>18)^v>>>3,g=l[m-2],_=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;l[m]=y+l[m-7]+_+l[m-16]}var b=s&o^s&a^o&a,w=(s<<30|s>>>2)^(s<<19|s>>>13)^(s<<10|s>>>22),S=p+((d<<26|d>>>6)^(d<<21|d>>>11)^(d<<7|d>>>25))+(d&h^~d&f)+u[m]+l[m];p=f,f=h,h=d,d=c+S|0,c=a,a=o,o=s,s=S+(w+b)|0}i[0]=i[0]+s|0,i[1]=i[1]+o|0,i[2]=i[2]+a|0,i[3]=i[3]+c|0,i[4]=i[4]+d|0,i[5]=i[5]+h|0,i[6]=i[6]+f|0,i[7]=i[7]+p|0},_doFinalize:function(){var e=r,n=this[e(194)],i=n[e(171)],s=8*this[e(196)],o=8*n[e(191)];return i[o>>>5]|=128<<24-o%32,i[14+(o+64>>>9<<4)]=t[e(166)](s/4294967296),i[15+(o+64>>>9<<4)]=s,n.sigBytes=4*i.length,this[e(170)](),this[e(184)]},clone:function(){var e=r,t=o[e(169)][e(190)](this);return t._hash=this._hash.clone(),t}});n[r(176)]=o[r(188)](d),n[r(172)]=o[r(192)](d)}(Math),e[t(176)]},(i=Yi)(185)==i(185)?e[i(179)]=n(Ti):n(r[i(177)])}));function Yi(e,t){var r=Ji();return(Yi=function(e,t){return r[e-=163]})(e,t)}function Ji(){var e=["1669116WFZlvk","amd","slice","_hash","object","algo","933048LPJLCR","_createHelper","WordArray","call","sigBytes","_createHmacHelper","3256530yeyvUU","_data","./core","_nDataBytes","2155056ODWUPU","Hasher","extend","64004PMhBNp","init","56uZZkih","10211020cqAsFI","floor","pow","sqrt","clone","_process","words","HmacSHA256","11ApWLYF","lib","createCommonjsModule","SHA256","CryptoJS","11045880sjBdOn","exports","10RXJZnU"];return(Ji=function(){return e})()}var Zi=es;function Qi(){var e=["308iZkQIV","828536IrKJhW","SHA224","11994PsRCAP","./core","exports","lib","SHA256","_createHmacHelper","3706195JtGvaO","1142124ppQwSx","call","_doFinalize","_createHelper","HmacSHA224","10724120htZuDy","commonjsGlobal","3086876yEJjqw","CryptoJS","algo","createCommonjsModule","620023XGNtwt","sigBytes","init","WordArray","object","function","./sha256"];return(Qi=function(){return e})()}function es(e,t){var r=Qi();return(es=function(e,t){return r[e-=492]})(e,t)}!function(e,t){for(var r=es,n=e();;)try{if(393184===parseInt(r(506))/1+parseInt(r(514))/2+-parseInt(r(495))/3+-parseInt(r(502))/4+-parseInt(r(494))/5+-parseInt(r(516))/6*(parseInt(r(513))/7)+parseInt(r(500))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Qi);tt[Zi(505)]((function(e,t){var r,n,i,s=Zi;r=tt[s(501)],n=function(e){var t,r,n,i,o,a,c=s;return n=(r=e)[(t=es)(519)][t(509)],i=r[t(504)],o=i[t(492)],a=i[t(515)]=o.extend({_doReset:function(){var e=t;this._hash=new(n[e(508)])([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=t,r=o[e(497)][e(496)](this);return r[e(507)]-=4,r}}),r[t(515)]=o[t(498)](a),r[t(499)]=o[t(493)](a),e[c(515)]},(i=es)(510)==i(510)?e[i(518)]=n(Ti):"undefined"===i(511)&&(void 0).amd?(void 0)([i(517),i(512)],n):n(r[i(503)])}));var ts=ns;function rs(){var e=["Word","1AvLnJO","object","_data","262874cpaHbv","function","HmacSHA512","sigBytes","326178HTTRYd","./core","_createHelper","amd","low","508450nomXgY","clone","length","7jtfCZt","769467uyysYd","3732300aRHVND","6094856elaaix","extend","words","_process","261furcqa","x64","./x64-core","init","_hash","4986568uCrjUU","call","high","exports","_nDataBytes","createCommonjsModule","lib","toX32","Hasher","create","SHA512","WordArray"];return(rs=function(){return e})()}!function(e,t){for(var r=ns,n=e();;)try{if(685549===-parseInt(r(130))/1*(-parseInt(r(133))/2)+parseInt(r(106))/3+-parseInt(r(117))/4+-parseInt(r(107))/5+-parseInt(r(137))/6*(-parseInt(r(145))/7)+parseInt(r(108))/8+-parseInt(r(112))/9*(-parseInt(r(142))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(rs);tt[ts(122)]((function(e,t){var r,n,i;r=Qe,n=function(e){var t=ns;return function(){var t=ns,r=e,n=r[t(123)][t(125)],i=r[t(113)],s=i[t(129)],o=i[t(128)],a=r.algo;function c(){var e=t;return s[e(126)].apply(s,arguments)}var u=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=c()}();var d=a.SHA512=n[t(109)]({_doReset:function(){var e=t;this[e(116)]=new(o[e(115)])([new s.init(1779033703,4089235720),new(s[e(115)])(3144134277,2227873595),new(s[e(115)])(1013904242,4271175723),new s.init(2773480762,1595750129),new(s[e(115)])(1359893119,2917565137),new s.init(2600822924,725511199),new(s[e(115)])(528734635,4215389547),new(s[e(115)])(1541459225,327033209)])},_doProcessBlock:function(e,r){for(var n=t,i=this._hash[n(110)],s=i[0],o=i[1],a=i[2],c=i[3],d=i[4],h=i[5],f=i[6],p=i[7],m=s.high,v=s[n(141)],y=o.high,g=o[n(141)],_=a.high,b=a[n(141)],w=c[n(119)],S=c[n(141)],E=d[n(119)],k=d.low,I=h[n(119)],A=h[n(141)],C=f[n(119)],T=f[n(141)],x=p[n(119)],D=p.low,B=m,P=v,M=y,F=g,U=_,R=b,L=w,O=S,z=E,N=k,H=I,j=A,V=C,W=T,$=x,G=D,q=0;q<80;q++){var K,X,Y=l[q];if(q<16)X=Y.high=0|e[r+2*q],K=Y.low=0|e[r+2*q+1];else{var J=l[q-15],Z=J.high,Q=J[n(141)],ee=(Z>>>1|Q<<31)^(Z>>>8|Q<<24)^Z>>>7,te=(Q>>>1|Z<<31)^(Q>>>8|Z<<24)^(Q>>>7|Z<<25),re=l[q-2],ne=re[n(119)],ie=re[n(141)],se=(ne>>>19|ie<<13)^(ne<<3|ie>>>29)^ne>>>6,oe=(ie>>>19|ne<<13)^(ie<<3|ne>>>29)^(ie>>>6|ne<<26),ae=l[q-7],ce=ae[n(119)],ue=ae.low,le=l[q-16],de=le[n(119)],he=le[n(141)];X=(X=(X=ee+ce+((K=te+ue)>>>0>>0?1:0))+se+((K+=oe)>>>0>>0?1:0))+de+((K+=he)>>>0>>0?1:0),Y.high=X,Y[n(141)]=K}var fe,pe=z&H^~z&V,me=N&j^~N&W,ve=B&M^B&U^M&U,ye=P&F^P&R^F&R,ge=(B>>>28|P<<4)^(B<<30|P>>>2)^(B<<25|P>>>7),_e=(P>>>28|B<<4)^(P<<30|B>>>2)^(P<<25|B>>>7),be=(z>>>14|N<<18)^(z>>>18|N<<14)^(z<<23|N>>>9),we=(N>>>14|z<<18)^(N>>>18|z<<14)^(N<<23|z>>>9),Se=u[q],Ee=Se.high,ke=Se.low,Ie=$+be+((fe=G+we)>>>0>>0?1:0),Ae=_e+ye;$=V,G=W,V=H,W=j,H=z,j=N,z=L+(Ie=(Ie=(Ie=Ie+pe+((fe+=me)>>>0>>0?1:0))+Ee+((fe+=ke)>>>0>>0?1:0))+X+((fe+=K)>>>0>>0?1:0))+((N=O+fe|0)>>>0>>0?1:0)|0,L=U,O=R,U=M,R=F,M=B,F=P,B=Ie+(ge+ve+(Ae>>>0<_e>>>0?1:0))+((P=fe+Ae|0)>>>0>>0?1:0)|0}v=s[n(141)]=v+P,s.high=m+B+(v>>>0

>>0?1:0),g=o.low=g+F,o[n(119)]=y+M+(g>>>0>>0?1:0),b=a[n(141)]=b+R,a[n(119)]=_+U+(b>>>0>>0?1:0),S=c[n(141)]=S+O,c[n(119)]=w+L+(S>>>0>>0?1:0),k=d.low=k+N,d[n(119)]=E+z+(k>>>0>>0?1:0),A=h[n(141)]=A+j,h[n(119)]=I+H+(A>>>0>>0?1:0),T=f.low=T+W,f.high=C+V+(T>>>0>>0?1:0),D=p.low=D+G,p.high=x+$+(D>>>0>>0?1:0)},_doFinalize:function(){var e=t,r=this[e(132)],n=r[e(110)],i=8*this[e(121)],s=8*r[e(136)];return n[s>>>5]|=128<<24-s%32,n[30+(s+128>>>10<<5)]=Math.floor(i/4294967296),n[31+(s+128>>>10<<5)]=i,r.sigBytes=4*n[e(144)],this[e(111)](),this._hash[e(124)]()},clone:function(){var e=t,r=n[e(143)][e(118)](this);return r[e(116)]=this[e(116)][e(143)](),r},blockSize:32});r[t(127)]=n[t(139)](d),r[t(135)]=n._createHmacHelper(d)}(),e[t(127)]},"object"===(i=ns)(131)?e[i(120)]=n(Ti):"undefined"===i(134)&&(void 0)[i(140)]?(void 0)([i(138),i(114)],n):n(r.CryptoJS)}));function ns(e,t){var r=rs();return(ns=function(e,t){return r[e-=106]})(e,t)}function is(e,t){var r=ss();return(is=function(e,t){return r[e-=307]})(e,t)}!function(e,t){for(var r=is,n=e();;)try{if(265790===parseInt(r(317))/1+parseInt(r(323))/2*(parseInt(r(307))/3)+parseInt(r(309))/4*(-parseInt(r(310))/5)+-parseInt(r(331))/6+parseInt(r(312))/7+-parseInt(r(325))/8+parseInt(r(330))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ss);et((function(e,t){var r,n,i;r=tt[is(324)],n=function(e){return t=is,n=(r=e).x64,i=n.Word,s=n[t(318)],o=r.algo,a=o[t(327)],c=o.SHA384=a.extend({_doReset:function(){var e=t;this[e(313)]=new(s[e(308)])([new i.init(3418070365,3238371032),new(i[e(308)])(1654270250,914150663),new i.init(2438529370,812702999),new i.init(355462360,4144912697),new(i[e(308)])(1731405415,4290775857),new(i[e(308)])(2394180231,1750603025),new i.init(3675008525,1694076839),new(i[e(308)])(1203062813,3204075428)])},_doFinalize:function(){var e=t,r=a[e(314)][e(329)](this);return r[e(328)]-=16,r}}),r[t(320)]=a[t(321)](c),r.HmacSHA384=a[t(322)](c),e.SHA384;var t,r,n,i,s,o,a,c},(i=is)(316)==i(316)?e[i(319)]=n(Ti):n(r[i(311)])}));function ss(){var e=["4845312HhlrEJ","2301774hhDdcO","57Vnrxxh","init","20ObgPDR","227845tZneLI","CryptoJS","3129784bHpepT","_hash","_doFinalize","./core","object","41599FwnxhB","WordArray","exports","SHA384","_createHelper","_createHmacHelper","33910ncwphB","commonjsGlobal","3775680rroWWr","./x64-core","SHA512","sigBytes","call"];return(ss=function(){return e})()}!function(e,t){for(var r=os,n=e();;)try{if(910314===-parseInt(r(239))/1+-parseInt(r(223))/2*(-parseInt(r(242))/3)+parseInt(r(235))/4*(-parseInt(r(236))/5)+-parseInt(r(240))/6+-parseInt(r(237))/7+parseInt(r(241))/8+parseInt(r(232))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(as);et((function(e,t){var r,n;r=tt[os(227)],n=function(e){return function(t){var r=os,n=e,i=n[r(225)],s=i.WordArray,o=i.Hasher,a=n[r(231)].Word,c=n[r(254)],u=[],l=[],d=[];!function(){for(var e=1,t=0,r=0;r<24;r++){u[e+5*t]=(r+1)*(r+2)/2%64;var n=(2*e+3*t)%5;e=t%5,t=n}for(e=0;e<5;e++)for(t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var i=1,s=0;s<24;s++){for(var o=0,c=0,h=0;h<7;h++){if(1&i){var f=(1<>>24)|4278255360&(a<<24|a>>>8),c=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),(D=i[o]).high^=c,D[n(229)]^=a}for(var f=0;f<24;f++){for(var p=0;p<5;p++){for(var m=0,v=0,y=0;y<5;y++)m^=(D=i[p+5*y])[n(228)],v^=D.low;var g=h[p];g[n(228)]=m,g[n(229)]=v}for(p=0;p<5;p++){var _=h[(p+4)%5],b=h[(p+1)%5],w=b[n(228)],S=b[n(229)];for(m=_[n(228)]^(w<<1|S>>>31),v=_[n(229)]^(S<<1|w>>>31),y=0;y<5;y++)(D=i[p+5*y])[n(228)]^=m,D[n(229)]^=v}for(var E=1;E<25;E++){var k=(D=i[E])[n(228)],I=D[n(229)],A=u[E];A<32?(m=k<>>32-A,v=I<>>32-A):(m=I<>>64-A,v=k<>>64-A);var C=h[l[E]];C[n(228)]=m,C[n(229)]=v}var T=h[0],x=i[0];for(T[n(228)]=x.high,T[n(229)]=x[n(229)],p=0;p<5;p++)for(y=0;y<5;y++){var D=i[E=p+5*y],B=h[E],P=h[(p+1)%5+5*y],M=h[(p+2)%5+5*y];D[n(228)]=B[n(228)]^~P.high&M[n(228)],D.low=B[n(229)]^~P.low&M[n(229)]}D=i[0];var F=d[f];D.high^=F[n(228)],D[n(229)]^=F[n(229)]}},_doFinalize:function(){var e=r,n=this._data,i=n[e(247)];this._nDataBytes;var o=8*n[e(224)],a=32*this.blockSize;i[o>>>5]|=1<<24-o%32,i[(t[e(230)]((o+1)/a)*a>>>5)-1]|=128,n.sigBytes=4*i[e(234)],this[e(252)]();for(var c=this[e(243)],u=this[e(250)][e(245)]/8,l=u/8,d=[],h=0;h>>24)|4278255360&(p<<24|p>>>8),m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),d[e(256)](m),d[e(256)](p)}return new(s[e(248)])(d,u)},clone:function(){for(var e=r,t=o[e(251)][e(255)](this),n=t[e(243)]=this[e(243)][e(226)](0),i=0;i<25;i++)n[i]=n[i][e(251)]();return t}});n[r(253)]=o[r(244)](f),n[r(249)]=o._createHmacHelper(f)}(Math),e.SHA3},"object"===os(246)?e.exports=n(Ti):n(r.CryptoJS)}));function os(e,t){var r=as();return(os=function(e,t){return r[e-=222]})(e,t)}function as(){var e=["_process","SHA3","algo","call","push","blockSize","./core","extend","74068OFbyiR","sigBytes","lib","slice","commonjsGlobal","high","low","ceil","x64","41637753WxGsVM","./x64-core","length","4cbvDJZ","5049810FmzdPp","6862065sHFvCE","create","1399563pgWuSH","8363004zomhJb","3207512FXktdd","54CVUkVB","_state","_createHelper","outputLength","object","words","init","HmacSHA3","cfg","clone"];return(as=function(){return e})()}var cs=us;function us(e,t){var r=ls();return(us=function(e,t){return r[e-=263]})(e,t)}function ls(){var e=["amd","exports","967355NtQABN","220740VsRDWh","RIPEMD160","30zUnbzk","7lYXnwZ","CryptoJS","create","HmacRIPEMD160","_hash","Hasher","485064FMFVwD","sigBytes","words","function","1652840ayLdLe","extend","lib","algo","117604qWNjgC","./core","_nDataBytes","createCommonjsModule","length","6LkjWXz","object","398430khtKEQ","clone","472130WEOYSH"];return(ls=function(){return e})()}!function(e,t){for(var r=us,n=e();;)try{if(213920===parseInt(r(290))/1+parseInt(r(284))/2+parseInt(r(292))/3*(-parseInt(r(277))/4)+parseInt(r(289))/5*(parseInt(r(282))/6)+-parseInt(r(263))/7*(parseInt(r(273))/8)+parseInt(r(269))/9+parseInt(r(286))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ls);tt[cs(280)]((function(e,t){var r,n,i;r=Qe,n=function(e){var t=us;return function(t){var r=us,n=e,i=n[r(275)],s=i.WordArray,o=i[r(268)],a=n[r(276)],c=s[r(265)]([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=s[r(265)]([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=s.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=s[r(265)]([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=s[r(265)]([0,1518500249,1859775393,2400959708,2840853838]),f=s.create([1352829926,1548603684,1836072691,2053994217,0]),p=a.RIPEMD160=o[r(274)]({_doReset:function(){this[r(267)]=s.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=r,i=0;i<16;i++){var s=t+i,o=e[s];e[s]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a,p,w,S,E,k,I,A,C,T,x,D=this[n(267)][n(271)],B=h.words,P=f[n(271)],M=c[n(271)],F=u.words,U=l[n(271)],R=d[n(271)];for(k=a=D[0],I=p=D[1],A=w=D[2],C=S=D[3],T=E=D[4],i=0;i<80;i+=1)x=a+e[t+M[i]]|0,x+=i<16?m(p,w,S)+B[0]:i<32?v(p,w,S)+B[1]:i<48?y(p,w,S)+B[2]:i<64?g(p,w,S)+B[3]:_(p,w,S)+B[4],x=(x=b(x|=0,U[i]))+E|0,a=E,E=S,S=b(w,10),w=p,p=x,x=k+e[t+F[i]]|0,x+=i<16?_(I,A,C)+P[0]:i<32?g(I,A,C)+P[1]:i<48?y(I,A,C)+P[2]:i<64?v(I,A,C)+P[3]:m(I,A,C)+P[4],x=(x=b(x|=0,R[i]))+T|0,k=T,T=C,C=b(A,10),A=I,I=x;x=D[1]+w+C|0,D[1]=D[2]+S+T|0,D[2]=D[3]+E+k|0,D[3]=D[4]+a+I|0,D[4]=D[0]+p+A|0,D[0]=x},_doFinalize:function(){var e=r,t=this._data,n=t[e(271)],i=8*this[e(279)],s=8*t[e(270)];n[s>>>5]|=128<<24-s%32,n[14+(s+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t[e(270)]=4*(n[e(281)]+1),this._process();for(var o=this[e(267)],a=o.words,c=0;c<5;c++){var u=a[c];a[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return o},clone:function(){var e=r,t=o[e(285)].call(this);return t[e(267)]=this[e(267)].clone(),t}});function m(e,t,r){return e^t^r}function v(e,t,r){return e&t|~e&r}function y(e,t,r){return(e|~t)^r}function g(e,t,r){return e&r|t&~r}function _(e,t,r){return e^(t|~r)}function b(e,t){return e<>>32-t}n[r(291)]=o._createHelper(p),n[r(266)]=o._createHmacHelper(p)}(),e[t(291)]},(i=us)(283)==i(283)?e[i(288)]=n(Ti):"undefined"===i(272)&&(void 0)[i(287)]?(void 0)([i(278)],n):n(r[i(264)])}));var ds=hs;function hs(e,t){var r=fs();return(hs=function(e,t){return r[e-=453]})(e,t)}!function(e,t){for(var r=hs,n=e();;)try{if(351245===-parseInt(r(468))/1+parseInt(r(475))/2+-parseInt(r(460))/3+-parseInt(r(458))/4*(-parseInt(r(479))/5)+parseInt(r(481))/6*(parseInt(r(472))/7)+parseInt(r(484))/8+-parseInt(r(483))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fs);tt[ds(464)]((function(e,t){var r,n,i;r=tt[ds(457)],n=function(e){var t,r,n,i;t=hs,n=(r=e).lib[t(453)],i=r.enc[t(478)],r[t(459)][t(455)]=n[t(461)]({init:function(e,r){var n=t;e=this._hasher=new(e[n(482)]),"string"==typeof r&&(r=i.parse(r));var s=e[n(471)],o=4*s;r[n(466)]>o&&(r=e[n(454)](r)),r.clamp();for(var a=this[n(474)]=r.clone(),c=this[n(465)]=r[n(473)](),u=a[n(480)],l=c[n(480)],d=0;d>>2];e[t(300)]-=r}};s[n(274)]=h[n(282)]({cfg:h[n(286)][n(282)]({mode:m,padding:v}),reset:function(){var e,t=n;h.reset[t(323)](this);var r=this[t(286)],i=r.iv,s=r[t(349)];this[t(270)]==this._ENC_XFORM_MODE?e=s[t(317)]:(e=s[t(294)],this[t(335)]=1),this[t(319)]&&this[t(319)][t(326)]==e?this._mode[t(347)](this,i&&i.words):(this[t(319)]=e.call(s,this,i&&i[t(328)]),this[t(319)][t(326)]=e)},_doProcessBlock:function(e,t){var r=n;this[r(319)][r(287)](e,t)},_doFinalize:function(){var e,t=n,r=this.cfg[t(344)];return this._xformMode==this[t(341)]?(r[t(332)](this[t(309)],this.blockSize),e=this[t(268)](!!t(283))):(e=this[t(268)](!0),r[t(333)](e)),e},blockSize:4});var y=s[n(272)]=o[n(282)]({init:function(e){this[n(306)](e)},toString:function(e){var t=n;return(e||this[t(273)])[t(311)](this)}}),g=(i[n(356)]={})[n(315)]={stringify:function(e){var t=n,r=e[t(308)],i=e[t(288)];return(i?a[t(351)]([1398893684,1701076831])[t(329)](i)[t(329)](r):r)[t(339)](l)},parse:function(e){var t,r=n,i=l[r(291)](e),s=i.words;return 1398893684==s[0]&&1701076831==s[1]&&(t=a.create(s[r(324)](2,4)),s[r(285)](0,4),i.sigBytes-=16),y[r(351)]({ciphertext:i,salt:t})}},_=s[n(296)]=o[n(282)]({cfg:o[n(282)]({format:g}),encrypt:function(e,t,r,i){var s=n;i=this[s(286)].extend(i);var o=e[s(317)](r,i),a=o[s(302)](t),c=o[s(286)];return y[s(351)]({ciphertext:a,key:r,iv:c.iv,algorithm:e,mode:c[s(349)],padding:c[s(344)],blockSize:e[s(310)],formatter:i[s(356)]})},decrypt:function(e,t,r,i){var s=n;return i=this.cfg[s(282)](i),t=this[s(353)](t,i.format),e[s(294)](r,i).finalize(t[s(308)])},_parse:function(e,t){return"string"==typeof e?t[n(291)](e,this):e}}),b=(i[n(275)]={})[n(315)]={execute:function(e,t,r,i,s){var o=n;if(!i&&(i=a[o(298)](8)),s)c=d[o(351)]({keySize:t+r,hasher:s})[o(337)](e,i);else var c=d.create({keySize:t+r})[o(337)](e,i);var u=a[o(351)](c.words[o(324)](t),4*r);return c[o(300)]=4*t,y[o(351)]({key:c,iv:u,salt:i})}},w=s[n(330)]=_.extend({cfg:_.cfg[n(282)]({kdf:b}),encrypt:function(e,t,r,i){var s=n,o=(i=this[s(286)][s(282)](i))[s(275)][s(331)](r,e.keySize,e.ivSize,i.salt,i.hasher);i.iv=o.iv;var a=_[s(271)][s(323)](this,e,t,o[s(325)],i);return a[s(306)](o),a},decrypt:function(e,t,r,i){var s=n;i=this[s(286)].extend(i),t=this[s(353)](t,i[s(356)]);var o=i[s(275)][s(331)](r,e[s(293)],e[s(357)],t[s(288)],i[s(355)]);return i.iv=o.iv,_[s(297)][s(323)](this,e,t,o.key,i)}})}()},(i=ws)(316)==i(316)?e[i(318)]=n(Ti):n(r[i(313)])}));var Es=ks;function ks(e,t){var r=Is();return(ks=function(e,t){return r[e-=279]})(e,t)}function Is(){var e=["104eDpqfV","466327JsBwcC","createCommonjsModule","Encryptor","1001550iwBoHh","303hGtLrf","9700ajugJs","blockSize","3694710uoEjio","203373rbigxW","6844556WTDtfg","_cipher","34934690nqsYsa","Decryptor","BlockCipherMode","./cipher-core","amd","CryptoJS","commonjsGlobal","slice","extend","mode","object","./core","call","function","lib","CFB","49XBVhyj"];return(Is=function(){return e})()}!function(e,t){for(var r=ks,n=e();;)try{if(961925===-parseInt(r(300))/1+parseInt(r(305))/2*(-parseInt(r(304))/3)+-parseInt(r(280))/4+-parseInt(r(307))/5+-parseInt(r(303))/6*(-parseInt(r(298))/7)+parseInt(r(299))/8*(-parseInt(r(279))/9)+parseInt(r(282))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Is);tt[Es(301)]((function(e,t){var r,n,i,s=Es;r=tt[s(288)],n=function(e){var t=s;return e[t(291)][t(297)]=function(){var r=t,n=e[r(296)][r(284)][r(290)]();function i(e,t,n,i){var s,o=r,a=this._iv;a?(s=a[o(289)](0),this._iv=void 0):s=this._prevBlock,i.encryptBlock(s,0);for(var c=0;c>24&255)){var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}else e+=1<<24;return e}var s=n[r(212)]=n[r(222)]({processBlock:function(e,t){var n,s=r,o=this._cipher,a=o.blockSize,c=this._iv,u=this[s(199)];c&&(u=this[s(199)]=c[s(220)](0),this[s(211)]=void 0),0===((n=u)[0]=i(n[0]))&&(n[1]=i(n[1]));var l=u[s(220)](0);o[s(209)](l,0);for(var d=0;d>>2]|=o<<24-a%4*8,e.sigBytes+=o},unpad:function(e){var r=t,n=255&e[r(192)][e.sigBytes-1>>>2];e[r(200)]-=n}},e[t(181)][t(199)]},(i=Os)(197)==i(197)?e[i(186)]=n(Ti):"undefined"===i(185)&&(void 0).amd?(void 0)([i(203),i(198)],n):n(r.CryptoJS)}));function Ns(e,t){var r=Hs();return(Ns=function(e,t){return r[e-=187]})(e,t)}function Hs(){var e=["lib","amd","599491jkKWGy","create","words","concat","sigBytes","5385792RQwkMY","random","WordArray","exports","Iso10126","2384270wuHTgZ","139252tCJzDo","3418323seymgK","1177617RzVBub","130untYSI","19833160nsFqZC","./core","object","function","commonjsGlobal","9jWRyyP"];return(Hs=function(){return e})()}!function(e,t){for(var r=Ns,n=e();;)try{if(612647===parseInt(r(208))/1+parseInt(r(195))/2+parseInt(r(197))/3+-parseInt(r(196))/4*(parseInt(r(199))/5)+parseInt(r(190))/6+parseInt(r(198))/7+parseInt(r(200))/8*(-parseInt(r(205))/9))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Hs);et((function(e,t){var r,n,i,s=Ns;r=tt[s(204)],n=function(e){var t=s;return e.pad[t(194)]={pad:function(r,n){var i=t,s=4*n,o=s-r.sigBytes%s;r[i(188)](e[i(206)][i(192)][i(191)](o-1)).concat(e.lib[i(192)][i(209)]([o<<24],1))},unpad:function(e){var r=t,n=255&e[r(187)][e[r(189)]-1>>>2];e[r(189)]-=n}},e.pad[t(194)]},"object"===(i=Ns)(202)?e[i(193)]=n(Ti):"undefined"===i(203)&&(void 0)[i(207)]?(void 0)([i(201),"./cipher-core"],n):n(r.CryptoJS)}));function js(){var e=["exports","1224808dMqXCB","amd","5122930TSXMKz","./core","202KsfjpL","./cipher-core","CryptoJS","ZeroPadding","concat","268245TjEXfA","object","create","pad","617646uZQWsX","1142NeAXda","Iso97971","unpad","18SSLzaW","sigBytes","4065285KfGrIf","function","1771848hyIMvL","7cGsgCV","lib"];return(js=function(){return e})()}function Vs(e,t){var r=js();return(Vs=function(e,t){return r[e-=453]})(e,t)}!function(e,t){for(var r=Vs,n=e();;)try{if(431514===parseInt(r(457))/1*(-parseInt(r(467))/2)+-parseInt(r(462))/3+parseInt(r(453))/4+-parseInt(r(472))/5+parseInt(r(466))/6*(-parseInt(r(475))/7)+parseInt(r(474))/8+parseInt(r(470))/9*(parseInt(r(455))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(js);et((function(e,t){var r,n,i;r=Qe,n=function(e){var t=Vs;return e[t(465)][t(468)]={pad:function(r,n){var i=t;r[i(461)](e[i(476)].WordArray[i(464)]([2147483648],1)),e.pad[i(460)][i(465)](r,n)},unpad:function(r){var n=t;e.pad[n(460)][n(469)](r),r[n(471)]--}},e[t(465)][t(468)]},(i=Vs)(463)==i(463)?e[i(477)]=n(Ti):"undefined"===i(473)&&(void 0)[i(454)]?(void 0)([i(456),i(458)],n):n(r[i(459)])}));var Ws=$s;function $s(e,t){var r=Gs();return($s=function(e,t){return r[e-=289]})(e,t)}function Gs(){var e=["177112fTyJup","object","words","12YJItad","exports","130JOiTAS","function","98bYmGee","65364FKfhyI","./cipher-core","./core","createCommonjsModule","pad","ZeroPadding","155538kbrByA","clamp","1534488fovwPi","534785hvcMVn","537318CioHdW","sigBytes","991410VJqAVk"];return(Gs=function(){return e})()}!function(e,t){for(var r=$s,n=e();;)try{if(191388===-parseInt(r(305))/1+parseInt(r(290))/2+-parseInt(r(296))/3+-parseInt(r(300))/4*(parseInt(r(293))/5)+-parseInt(r(292))/6+parseInt(r(304))/7*(parseInt(r(297))/8)+parseInt(r(294))/9*(parseInt(r(302))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Gs);tt[Ws(308)]((function(e,t){var r,n,i;r=Qe,n=function(e){var t=$s;return e[t(309)][t(289)]={pad:function(e,r){var n=t,i=4*r;e[n(291)](),e.sigBytes+=i-(e[n(295)]%i||i)},unpad:function(e){var r=t,n=e[r(299)],i=e[r(295)]-1;for(i=e[r(295)]-1;i>=0;i--)if(n[i>>>2]>>>24-i%4*8&255){e[r(295)]=i+1;break}}},e.pad[t(289)]},(i=$s)(298)==i(298)?e[i(301)]=n(Ti):"undefined"===i(303)&&(void 0).amd?(void 0)([i(307),i(306)],n):n(r.CryptoJS)}));var qs=Xs;function Ks(){var e=["./core","30aSFWFg","1044065ljqHlD","35806CzVRwC","8xMoBhk","./cipher-core","12EwuIWk","NoPadding","387255tDPnnt","91tCbNvs","createCommonjsModule","5MBOkKi","2840159eOUwav","1624248SFxGSz","commonjsGlobal","exports","68gadJqj","object","854127KcEHEH","pad","216690nrUPUP","amd"];return(Ks=function(){return e})()}function Xs(e,t){var r=Ks();return(Xs=function(e,t){return r[e-=116]})(e,t)}!function(e,t){for(var r=Xs,n=e();;)try{if(439694===parseInt(r(122))/1*(parseInt(r(136))/2)+parseInt(r(119))/3+parseInt(r(127))/4*(parseInt(r(131))/5)+-parseInt(r(117))/6*(-parseInt(r(123))/7)+parseInt(r(137))/8*(-parseInt(r(129))/9)+parseInt(r(134))/10*(-parseInt(r(135))/11)+-parseInt(r(124))/12*(parseInt(r(120))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ks);tt[qs(121)]((function(e,t){var r,n,i,s=qs;r=tt[s(125)],n=function(e){var t=s;return e[t(130)][t(118)]={pad:function(){},unpad:function(){}},e[t(130)][t(118)]},(i=Xs)(128)==i(128)?e[i(126)]=n(Ti):n(r.CryptoJS)}));function Ys(){var e=["./cipher-core","exports","4564136ncANIc","enc","format","Hex","978LDaCgf","72342qqThXT","2126ZJOctF","2584785ltFhai","amd","create","196PaZEjk","./core","function","715570jjnGtM","6881560QNWLRt","4175541HYhAcF","CryptoJS","parse","object","45gckRYA"];return(Ys=function(){return e})()}!function(e,t){for(var r=Js,n=e();;)try{if(967378===parseInt(r(216))/1*(parseInt(r(218))/2)+parseInt(r(205))/3+-parseInt(r(212))/4+parseInt(r(219))/5+-parseInt(r(217))/6*(parseInt(r(200))/7)+-parseInt(r(204))/8+-parseInt(r(209))/9*(-parseInt(r(203))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ys);et((function(e,t){var r,n,i;r=Qe,n=function(e){var t,r,n,i,s=Js;return t=Js,n=(r=e).lib.CipherParams,i=r[t(213)][t(215)],r[t(214)][t(215)]={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var r=t,s=i[r(207)](e);return n[r(199)]({ciphertext:s})}},e.format[s(215)]},"object"===(i=Js)(208)?e[i(211)]=n(Ti):"undefined"===i(202)&&(void 0)[i(220)]?(void 0)([i(201),i(210)],n):n(r[i(206)])}));function Js(e,t){var r=Ys();return(Js=function(e,t){return r[e-=199]})(e,t)}var Zs=Qs;function Qs(e,t){var r=eo();return(Qs=function(e,t){return r[e-=288]})(e,t)}!function(e,t){for(var r=Qs,n=e();;)try{if(693644===-parseInt(r(314))/1+parseInt(r(303))/2+parseInt(r(309))/3*(parseInt(r(306))/4)+parseInt(r(291))/5*(parseInt(r(313))/6)+parseInt(r(305))/7*(-parseInt(r(302))/8)+parseInt(r(292))/9+-parseInt(r(307))/10*(parseInt(r(295))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(eo);tt[Zs(296)]((function(e,t){var r,n,i,s=Zs;r=tt[s(301)],n=function(e){var t=s;return function(){var t=Qs,r=e,n=r[t(293)][t(298)],i=r.algo,s=[],o=[],a=[],c=[],u=[],l=[],d=[],h=[],f=[],p=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var i=n^n<<1^n<<2^n<<3^n<<4;i=i>>>8^255&i^99,s[r]=i,o[i]=r;var m=e[r],v=e[m],y=e[v],g=257*e[i]^16843008*i;a[r]=g<<24|g>>>8,c[r]=g<<16|g>>>16,u[r]=g<<8|g>>>24,l[r]=g,g=16843009*y^65537*v^257*m^16843008*r,d[i]=g<<24|g>>>8,h[i]=g<<16|g>>>16,f[i]=g<<8|g>>>24,p[i]=g,r?(r=m^e[e[e[y^m]]],n^=e[e[n]]):r=n=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],v=i[t(299)]=n[t(304)]({_doReset:function(){var e=t;if(!this._nRounds||this[e(289)]!==this[e(310)]){for(var r=this._keyPriorReset=this[e(310)],n=r.words,i=r[e(312)]/4,o=4*((this._nRounds=i+6)+1),a=this._keySchedule=[],c=0;c6&&c%i==4&&(v=s[v>>>24]<<24|s[v>>>16&255]<<16|s[v>>>8&255]<<8|s[255&v]):(v=s[(v=v<<8|v>>>24)>>>24]<<24|s[v>>>16&255]<<16|s[v>>>8&255]<<8|s[255&v],v^=m[c/i|0]<<24),a[c]=a[c-i]^v);for(var u=this._invKeySchedule=[],l=0;l>>24]]^h[s[v>>>16&255]]^f[s[v>>>8&255]]^p[s[255&v]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,c,u,l,s)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,d,h,f,p,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,r,n,i,s,o,a,c){for(var u=this[t(318)],l=e[r]^n[0],d=e[r+1]^n[1],h=e[r+2]^n[2],f=e[r+3]^n[3],p=4,m=1;m>>24]^s[d>>>16&255]^o[h>>>8&255]^a[255&f]^n[p++],y=i[d>>>24]^s[h>>>16&255]^o[f>>>8&255]^a[255&l]^n[p++],g=i[h>>>24]^s[f>>>16&255]^o[l>>>8&255]^a[255&d]^n[p++],_=i[f>>>24]^s[l>>>16&255]^o[d>>>8&255]^a[255&h]^n[p++];l=v,d=y,h=g,f=_}v=(c[l>>>24]<<24|c[d>>>16&255]<<16|c[h>>>8&255]<<8|c[255&f])^n[p++],y=(c[d>>>24]<<24|c[h>>>16&255]<<16|c[f>>>8&255]<<8|c[255&l])^n[p++],g=(c[h>>>24]<<24|c[f>>>16&255]<<16|c[l>>>8&255]<<8|c[255&d])^n[p++],_=(c[f>>>24]<<24|c[l>>>16&255]<<16|c[d>>>8&255]<<8|c[255&h])^n[p++],e[r]=v,e[r+1]=y,e[r+2]=g,e[r+3]=_},keySize:8});r[t(299)]=n[t(288)](v)}(),e[t(299)]},(i=Qs)(308)==i(308)?e[i(297)]=n(Ti):"undefined"===i(315)&&(void 0)[i(300)]?(void 0)([i(317),i(294),i(290),"./evpkdf",i(316)],n):n(r[i(311)])}));function eo(){var e=["105AydOgb","51148Lyajzk","10NZbTpb","object","87wZvmAi","_key","CryptoJS","sigBytes","78OKBXZh","1332361TqDgRO","function","./cipher-core","./core","_nRounds","_createHelper","_keyPriorReset","./md5","382880okoCsQ","2494224TwGsbD","lib","./enc-base64","3769491WLJmWW","createCommonjsModule","exports","BlockCipher","AES","amd","commonjsGlobal","294312rZLYXu","2554148iuedXE","extend"];return(eo=function(){return e})()}var to=ro;function ro(e,t){var r=no();return(ro=function(e,t){return r[e-=284]})(e,t)}function no(){var e=["_key","create","_lBlock","Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.","696005wIdEiL","TripleDES","createCommonjsModule","_subKeys","call","./enc-base64","_des3","237176zNrlHP","_rBlock","_createHelper","function","_doCryptBlock","13iYhgGr","lib","7752807KUYkBb","6PHFTlf","BlockCipher","encryptBlock","words","7549248hoDxTP","./cipher-core","_des2","exports","./evpkdf","./md5","9yPCrTZ","78PcbdHG","commonjsGlobal","slice","2992524cUpBlg","28098heWDku","10JcQUav","length","22NdDPKK","decryptBlock","createEncryptor","CryptoJS","231nooDOz","DES","2113204DRSyLB","object"];return(no=function(){return e})()}!function(e,t){for(var r=ro,n=e();;)try{if(919844===parseInt(r(309))/1*(-parseInt(r(314))/2)+parseInt(r(299))/3*(parseInt(r(323))/4)+parseInt(r(284))/5*(-parseInt(r(310))/6)+-parseInt(r(321))/7*(-parseInt(r(291))/8)+-parseInt(r(298))/9*(-parseInt(r(315))/10)+-parseInt(r(317))/11*(-parseInt(r(313))/12)+parseInt(r(296))/13*(-parseInt(r(303))/14))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(no);tt[to(286)]((function(e,t){var r,n,i,s=to;r=tt[s(311)],n=function(e){var t=s;return function(){var t=ro,r=e,n=r[t(297)],i=n.WordArray,s=n[t(300)],o=r.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o[t(322)]=s.extend({_doReset:function(){for(var e=t,r=this[e(325)][e(302)],n=[],i=0;i<56;i++){var s=a[i]-1;n[i]=r[s>>>5]>>>31-s%32&1}for(var o=this[e(287)]=[],l=0;l<16;l++){var d=o[l]=[],h=u[l];for(i=0;i<24;i++)d[i/6|0]|=n[(c[i]-1+h)%28]<<31-i%6,d[4+(i/6|0)]|=n[28+(c[i+24]-1+h)%28]<<31-i%6;for(d[0]=d[0]<<1|d[0]>>>31,i=1;i<7;i++)d[i]=d[i]>>>4*(i-1)+3;d[7]=d[7]<<5|d[7]>>>27}var f=this._invSubKeys=[];for(i=0;i<16;i++)f[i]=o[15-i]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,r){this[t(295)](e,r,this._invSubKeys)},_doCryptBlock:function(e,r,n){var i=t;this[i(327)]=e[r],this._rBlock=e[r+1],f.call(this,4,252645135),f.call(this,16,65535),p[i(288)](this,2,858993459),p.call(this,8,16711935),f[i(288)](this,1,1431655765);for(var s=0;s<16;s++){for(var o=n[s],a=this[i(327)],c=this[i(292)],u=0,h=0;h<8;h++)u|=l[h][((c^o[h])&d[h])>>>0];this[i(327)]=c,this[i(292)]=a^u}var m=this[i(327)];this[i(327)]=this[i(292)],this[i(292)]=m,f[i(288)](this,1,1431655765),p[i(288)](this,8,16711935),p.call(this,2,858993459),f[i(288)](this,16,65535),f[i(288)](this,4,252645135),e[r]=this._lBlock,e[r+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(e,r){var n=t,i=(this[n(327)]>>>e^this[n(292)])&r;this[n(292)]^=i,this[n(327)]^=i<>>e^this._lBlock)&r;this._lBlock^=i,this[n(292)]^=i<>>2]>>>24-c%4*8&255;a=(a+s[o]+u)%256;var l=s[o];s[o]=s[a],s[a]=l}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var s=e[t];e[t]=e[r],e[r]=s,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}r[t(370)]=n[t(372)](s);var a=i[t(344)]=s[t(349)]({cfg:s[t(352)][t(349)]({drop:192}),_doReset:function(){var e=t;s[e(365)].call(this);for(var r=this[e(352)][e(369)];r>0;r--)o.call(this)}});r.RC4Drop=n[t(372)](a)}(),e.RC4},(i=io)(348)==i(348)?e[i(346)]=n(Ti):"undefined"===i(359)&&(void 0)[i(361)]?(void 0)([i(357),"./enc-base64",i(360),"./evpkdf",i(350)],n):n(r[i(368)])}));function so(){var e=["exports","1216626RTnXYT","object","extend","./cipher-core","65XNKahe","cfg","2586goSsEL","_key","510579SAjybA","sigBytes","./core","1438419Civekb","function","./md5","amd","algo","11MbcwrG","StreamCipher","_doReset","35PnFspv","10DfBceh","CryptoJS","drop","RC4","12HIrOBZ","_createHelper","commonjsGlobal","2316589sWoYeM","107624UqjAkR","words","RC4Drop","12244XHlezE"];return(so=function(){return e})()}var oo=co;function ao(){var e=["cfg","CryptoJS","StreamCipher","commonjsGlobal","object","8017300ZoPDLX","words","42FzorCn","./cipher-core","1174120rYFlPq","942991mEHUVa","Rabbit","40454504iTdvAc","./md5","exports","./evpkdf","amd","algo","lib","5479428NQimKH","call","./core","3194178GJctoX","_key","function","createCommonjsModule","4528428TaJBnu"];return(ao=function(){return e})()}function co(e,t){var r=ao();return(co=function(e,t){return r[e-=363]})(e,t)}!function(e,t){for(var r=co,n=e();;)try{if(930766===-parseInt(r(383))/1+-parseInt(r(369))/2+-parseInt(r(366))/3+parseInt(r(373))/4+-parseInt(r(379))/5+-parseInt(r(381))/6*(-parseInt(r(384))/7)+parseInt(r(386))/8)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ao);tt[oo(372)]((function(e,t){var r,n,i,s=oo;r=tt[s(377)],n=function(e){var t=s;return function(){var t=co,r=e,n=r[t(365)][t(376)],i=r[t(364)],s=[],o=[],a=[],c=i[t(385)]=n.extend({_doReset:function(){for(var e=t,r=this[e(370)].words,n=this[e(374)].iv,i=0;i<4;i++)r[i]=16711935&(r[i]<<8|r[i]>>>24)|4278255360&(r[i]<<24|r[i]>>>8);var s=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],o=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];for(this._b=0,i=0;i<4;i++)u[e(367)](this);for(i=0;i<8;i++)o[i]^=s[i+4&7];if(n){var a=n[e(380)],c=a[0],l=a[1],d=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=d>>>16|4294901760&h,p=h<<16|65535&d;for(o[0]^=d,o[1]^=f,o[2]^=h,o[3]^=p,o[4]^=d,o[5]^=f,o[6]^=h,o[7]^=p,i=0;i<4;i++)u[e(367)](this)}},_doProcessBlock:function(e,t){var r=this._X;u.call(this),s[0]=r[0]^r[5]>>>16^r[3]<<16,s[1]=r[2]^r[7]>>>16^r[5]<<16,s[2]=r[4]^r[1]>>>16^r[7]<<16,s[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)s[n]=16711935&(s[n]<<8|s[n]>>>24)|4278255360&(s[n]<<24|s[n]>>>8),e[t+n]^=s[n]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}r[t(385)]=n._createHelper(c)}(),e[t(385)]},"object"===(i=co)(378)?e[i(388)]=n(Ti):"undefined"===i(371)&&(void 0)[i(363)]?(void 0)([i(368),"./enc-base64",i(387),i(389),i(382)],n):n(r[i(375)])}));var uo=lo;!function(e,t){for(var r=lo,n=e();;)try{if(802760===-parseInt(r(122))/1*(parseInt(r(114))/2)+parseInt(r(120))/3*(parseInt(r(116))/4)+-parseInt(r(115))/5*(parseInt(r(123))/6)+-parseInt(r(129))/7*(-parseInt(r(109))/8)+-parseInt(r(117))/9*(-parseInt(r(104))/10)+parseInt(r(130))/11+-parseInt(r(105))/12*(parseInt(r(121))/13))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ho);tt[uo(110)]((function(e,t){var r,n,i;r=Qe,n=function(e){return function(){var t=lo,r=e,n=r[t(128)][t(119)],i=r[t(108)],s=[],o=[],a=[],c=i[t(107)]=n[t(112)]({_doReset:function(){var e=t,r=this._key.words,n=this[e(106)].iv,i=this._X=[r[0],r[3]<<16|r[2]>>>16,r[1],r[0]<<16|r[3]>>>16,r[2],r[1]<<16|r[0]>>>16,r[3],r[2]<<16|r[1]>>>16],s=this._C=[r[2]<<16|r[2]>>>16,4294901760&r[0]|65535&r[1],r[3]<<16|r[3]>>>16,4294901760&r[1]|65535&r[2],r[0]<<16|r[0]>>>16,4294901760&r[2]|65535&r[3],r[1]<<16|r[1]>>>16,4294901760&r[3]|65535&r[0]];this._b=0;for(var o=0;o<4;o++)u.call(this);for(o=0;o<8;o++)s[o]^=i[o+4&7];if(n){var a=n[e(125)],c=a[0],l=a[1],d=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),h=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),f=d>>>16|4294901760&h,p=h<<16|65535&d;for(s[0]^=d,s[1]^=f,s[2]^=h,s[3]^=p,s[4]^=d,s[5]^=f,s[6]^=h,s[7]^=p,o=0;o<4;o++)u[e(127)](this)}},_doProcessBlock:function(e,r){var n=t,i=this._X;u[n(127)](this),s[0]=i[0]^i[5]>>>16^i[3]<<16,s[1]=i[2]^i[7]>>>16^i[5]<<16,s[2]=i[4]^i[1]>>>16^i[7]<<16,s[3]=i[6]^i[3]>>>16^i[1]<<16;for(var o=0;o<4;o++)s[o]=16711935&(s[o]<<8|s[o]>>>24)|4278255360&(s[o]<<24|s[o]>>>8),e[r+o]^=s[o]},blockSize:4,ivSize:2});function u(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0>>0?1:0)|0,this._b=t[7]>>>0>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}r[t(107)]=n[t(103)](c)}(),e.RabbitLegacy},(i=lo)(102)==i(102)?e[i(118)]=n(Ti):"undefined"===i(111)&&(void 0).amd?(void 0)([i(126),i(113),i(131),i(124),"./cipher-core"],n):n(r.CryptoJS)}));function lo(e,t){var r=ho();return(lo=function(e,t){return r[e-=102]})(e,t)}function ho(){var e=["57393JhRhPs","166348ARyKce","139dqpQMo","2084418AdPUUm","./evpkdf","words","./core","call","lib","2254pqzxAz","13872815AzcWBO","./md5","object","_createHelper","48670erCpdI","312HcyoGg","cfg","RabbitLegacy","algo","18032iPUhlJ","createCommonjsModule","function","extend","./enc-base64","21058TlqhLc","20PnywHN","100kPCcgt","2817BWWBzg","exports","StreamCipher"];return(ho=function(){return e})()}const fo=po;function po(e,t){const r=mo();return(po=function(e,t){return r[e-=447]})(e,t)}!function(e,t){const r=po,n=e();for(;;)try{if(783550===-parseInt(r(460))/1*(-parseInt(r(476))/2)+parseInt(r(458))/3+-parseInt(r(462))/4*(parseInt(r(455))/5)+-parseInt(r(473))/6*(parseInt(r(475))/7)+-parseInt(r(478))/8+parseInt(r(467))/9+-parseInt(r(470))/10*(parseInt(r(457))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(mo);tt[fo(454)]((function(e,t){const r=fo;!function(t,r,n){const i=po;"object"===i(474)?e.exports=r(Ti):"undefined"===i(468)&&(void 0)[i(472)]?(void 0)([i(448),i(461),i(450),i(449),i(465)],r):r(t[i(466)])}(tt[r(469)],(function(e){const t=r;return function(){const t=po;var r=e,n=r.lib.BlockCipher,i=r.algo;const s=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var c={pbox:[],sbox:[]};function u(e,t){const r=po;let n=t>>24&255,i=t>>16&255,s=t>>8&255,o=255&t,a=e.sbox[0][n]+e.sbox[1][i];return a^=e[r(452)][2][s],a+=e[r(452)][3][o],a}function l(e,t,r){const n=po;let i,o=t,a=r;for(let t=0;t=r&&(i=0);let s=0,c=0,u=0;for(let t=0;t<18;t+=2)u=l(e,s,c),s=u[n(453)],c=u[n(447)],e.pbox[t]=s,e[n(456)][t+1]=c;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)u=l(e,s,c),s=u[n(453)],c=u[n(447)],e[n(452)][t][r]=s,e[n(452)][t][r+1]=c}(c,n,i)}},encryptBlock:function(e,r){const n=t;var i=l(c,e[r],e[r+1]);e[r]=i[n(453)],e[r+1]=i[n(447)]},decryptBlock:function(e,r){const n=t;var i=function(e,t,r){const n=po;let i,s=t,o=r;for(let t=17;t>1;--t)s^=e[n(456)][t],o=u(e,s)^o,i=s,s=o,o=i;return i=s,s=o,o=i,o^=e[n(456)][1],s^=e[n(456)][0],{left:s,right:o}}(c,e[r],e[r+1]);e[r]=i[n(453)],e[r+1]=i[n(447)]},blockSize:2,keySize:4,ivSize:2});r[t(451)]=n[t(463)](d)}(),e[t(451)]}))}));function mo(){const e=["_createHelper","extend","./cipher-core","CryptoJS","3219624pivIJH","function","commonjsGlobal","10KAiayK","words","amd","14844MGoHHn","object","1106NDbVuF","12aBWRJE","_key","8511888pjRNoo","_keyPriorReset","right","./core","./evpkdf","./md5","Blowfish","sbox","left","createCommonjsModule","175HRHoTV","pbox","5017892hPlBHz","4437633xZTQKZ","sigBytes","190198dVcPkl","./enc-base64","32404MDTwdm"];return(mo=function(){return e})()}function vo(e,t){var r=yo();return(vo=function(e,t){return r[e-=298]})(e,t)}function yo(){var e=["amd","./mode-cfb","./pad-nopadding","./pad-ansix923","1XqFkJz","36vpQgzi","./aes","./mode-ecb","1566xUIwoz","./cipher-core","1216094pBZsyz","./enc-base64","720474iKnnMs","./sha224","exports","./mode-ctr-gladman","./x64-core","./sha1","./rc4","./core","./ripemd160","435456uabaWT","724190PXahrH","./pad-zeropadding","231964McmEhF","./mode-ctr","./md5","./rabbit","./pbkdf2","object","./enc-base64url","./pad-iso97971","./pad-iso10126","./tripledes","commonjsGlobal","7UCLjiK","./sha3","./enc-utf16","./rabbit-legacy","1230480yGUlJD","./lib-typedarrays","./evpkdf","14060yzZhQj","./mode-ofb","4dAPtza","./sha384"];return(yo=function(){return e})()}function go(e,t){const r=bo();return(go=function(e,t){return r[e-=371]})(e,t)}function _o(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}function bo(){const e=["Counter","288999euZLql","974712nCQezc","882ZzCqzy","744ddVQrH","includes","ctr","10jTtjJe","toString","22vYQkhN","set","2605296LKdTHx","4DmOmJs","12483mFwSBi","decrypt","6ZYikRN","get","slice","byteLength","516005UNSeJb","lib","length","460820TZfdHZ"];return(bo=function(){return e})()}function wo(e,t,r){const n=go;let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),r=new Uint8Array(r);const s=e[n(386)];let o=5;for(;os)break;let c=e[o+4],u=!1;if(i?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(373)](c)):(c&=31,u=1===c||5===c),u){const i=e[n(385)](o+4+2,o+4+a);let s=new(ki.ModeOfOperation[n(374)])(t,new ki.Counter(r));const c=s[n(382)](i);s=null,e[n(378)](c,o+4+2)}o=o+4+a}return e}function So(e,t,r){const n=go;if(e[n(386)]<=30)return e;const i=e[n(385)](32);let s=new(ki.ModeOfOperation[n(374)])(t,new(ki[n(391)])(r));const o=s[n(382)](i);return s=null,e.set(o,32),e}!function(e,t){for(var r=vo,n=e();;)try{if(285223===parseInt(r(337))/1*(parseInt(r(311))/2)+-parseInt(r(308))/3*(-parseInt(r(331))/4)+parseInt(r(309))/5+-parseInt(r(299))/6*(-parseInt(r(322))/7)+-parseInt(r(326))/8+-parseInt(r(341))/9*(-parseInt(r(329))/10)+parseInt(r(343))/11*(-parseInt(r(338))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(yo),et((function(e,t){var r,n;r=tt[vo(321)],(n=vo)(316)==n(316)?e[n(301)]=Ti:r.CryptoJS=r.CryptoJS})),function(e,t){const r=go,n=e();for(;;)try{if(152582===-parseInt(r(392))/1+-parseInt(r(371))/2*(-parseInt(r(372))/3)+parseInt(r(380))/4*(parseInt(r(390))/5)+parseInt(r(383))/6*(-parseInt(r(387))/7)+-parseInt(r(393))/8+-parseInt(r(381))/9*(-parseInt(r(375))/10)+parseInt(r(377))/11*(parseInt(r(379))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(bo);var Eo=Ao;function ko(){var e=["btrt","setAllUsedBytes","entity_ids","Not enough bytes left in the parent box to parse a new box","hasMoov","sync_sample_numbers","item_infos","ptl_multilayer_enabled_flag","getSampleSize","general_constraint_indicator","buildSampleLists","SAMPLE_ENTRY_TYPE_SYSTEM","releaseUsedSamples","printHeader","extension_type","clap","sample_has_redundancy","AVCLevelIndication","mvex","sample_delta","iaug","field_size","general_level_idc","reduceBuffer","data","initializeSegmentation","quat_x","grouping_type","tx3g","readString","schm","bit_rate_code","itemListBuilt","unpack","general_profile_space","u16stringle","number_in_traf","_self","float32be","version:","traf","Subtitle","rinf","position","SEEKTABLE","processItems","Not enough data in stream to parse the type and size of the box","extent_length","creation_time: ","join","isEof","getTrackSamplesInfo","modification_time: ","nump","minf","sublayer_level_idc","duration: ","video","writeInt16","createEntityToGroupCtor","reserved_2","createElement","vipr","rtpmap_string","pad_unknown","chroma_subsampling_x","component_index","audio","urn Box","getSampleRate","item_id","totl","avgBitRate","elst","sequence_number","subBoxNames","component_count","durationFlag","dependency","num_channels","createCommonjsModule","payl","getBoxes","modified","ctts","colourPrimaries","seq_tier_0","SAMPLE_ENTRY_TYPE_TEXT","stbl","metadataTracks","creation_time","base_offset_size","av01","getAudioConfig","info","AudioSampleEntry","ec-3","forEach","hvc1","ipro","ccst","elngBox","ext","ChannelMappingFamily","default_isProtected","configurationVersion","seq_level_idx_0","media_rate_fraction","free",'application/mp4; codecs="',"CoupledCount","sample_count","SmDm","length_size_of_trun_num","mapFloat64Array","writeUint8Array","OCR_ES_ID","readInt32","parseFromString","adjustUint32","float64le","size","URL","isProtected","schemeURI","first_sample_flags","function","TFHD_FLAG_BASE_DATA_OFFSET","XMLSubtitlein4Parser","horizresolution","sbgpBox","tfdtBox","presentation_time_delta","lfeon","Log","appendBuffer","createFile","stri","whitePointChromaticity_y","sdtp","vvc1","description_length","first_chunk","Needs an array buffer","parseOneBox","general_tier_flag","Descriptor","indexOf","vvs1","mp4aSampleEntry","bits_per_channels","getUint32","sgpdBox","stereo_indication_type","vvnC","MultiBufferStream","tref","PICTURE","clef","name","writeString","fragment_duration","encode","default_AlgorithmID","createSampleGroupCtor","has_redundancy","num_dep_sub","SAMPLE_ENTRY_TYPE_METADATA","quat_z","traks","6d1d9b0542d544e680e2141daff757b2","xml ","hev1","media_time","entity_groups","createFragment","skip","uint8","padding_flag","numMetadataBlocks","tfhd","tfdt","nalu_type","shadowed_sample_numbers","trexBox","TFHD_FLAG_DUR_EMPTY","onSegment","movie_duration","nb_SPS_nalus","hasIncompleteMdat","call","colour_primaries","sample_rate","ipmas","first_dts","sttsBox","initSampleGroups","primary","createSingleSampleMoof","getTrackDuration","stssBox","sample_sizes","codec_specific_parameters","mhm2","end","isFragmented","stco","chromaSubsampling","block_size","undefined","sidx","readUint32Array","TFHD_FLAG_DEFAULT_BASE_IS_MOOF","SubtitleSampleEntry","index_size","createBoxCtor","DIFF_PRIMITIVE_ARRAY_PROP_NAMES","No method for reading signed 64 bits values","num_total_samples","sample_info_size","hasIOD","segment_duration","writeStruct","set","sample_duration","channel_indexes","sample_offsets","readFloat64Array","balance","scheme_version","vvcC","layer","tags","setUint8","rash","txtC","whitePointChromaticity_x","cstring","isMetadata","getFloat64","min_display_mastering_luminance","sample_depends_on","ranges","sbpm","Appending new buffer (fileStart: ","flattenItemInfo","vertical_justification","period","ftyp","description_index","encs","trexs","uint32be","[row: ","dinf","getDurationString"," v=","ptl_frame_only_constraint","length_size","language","tsyn","timescale: ","SAP_delta_time","num_ind_sub","setNextSeekPositionFromSample","idat","references","strd","equal","sinf","num_bad_cols","data_rate",">","sdp ","ref_track_id","addSample","level","rate: ","avgBitrate","elstBox","pmax","auxC","Descriptor ","constant_frame_rate","NAL_unit_type","referenced_size","getPosition","fileStart","mapUint32Array"," at position ","last_sample_in_run","iso4","dependsOn_ES_ID","tenc","prft","mfra","avc2SampleEntry","write","a2394f525a9b4f14a2446c427c648df4","flags","vp08","moofs","smhd","MPEG4DescriptorParser","mskC","default_Per_Sample_IV_Size","getTrackById","tag","cleanApertureHeightN","log",'video/mp4; codecs="',"mapInt32Array","&","seekLists","first_traf_merged","CoLL","Textin4Parser","volume","Hint","onError","descs","u16stringbe","5300415pYommK","protection","readUint8","readInt method not implemented for size: ","height","getInt16","group_description_index",".CA","decimalToHex","SLConfigDescriptor","reference_ID","d4807ef2ca3946958e5426cb9e46a79f","readInt8","correction_applied","slid","TRUN_FLAGS_CTS_OFFSET"," full size: ","component_bit_depth_minus_one","mvhdBox","item_uri_type","ABCDEFGHIJKLMNOPQRSTUVWXYZ234567","OutputGain","FULL_BOXES","sbgp","parseUUID","ssix","vmhdBox","getBox","mdia","defineProperty","general_sub_profile_idc","num_leading_samples_known","major_brand","is_leading","endianness","hdlr","Box","writeInitializationSegment","<","getFloat32","KID","tfra","compatible_brands","setInt8","max_picture_width","vertresolution","readInt32Array","data_offset_position","'","esd","albc","saveParsePosition","reserved_1","readUint","maxFALL","altr","message_data","item_protection_index","bad_pixels","hdr_size","lastMoofIndex","chroma_format_idc","a1op","baseMediaDecodeTime","isHint","object","Exporting on track #","cslg","createTrackGroupCtor","minimum_bitrate","pow","uint32","writeCString","seq_profile",'"; profiles="',"sample_composition_time_offset","createObjectURL","ref_to","avcC","findEndContiguousBuf","extended_language","cmpd","toString","writeUint64","av1C","display_primaries","initialized","bufferSize","samples","item_name","chroma_subsampling_y","component_align_size","profile","url Box","int16be","Adjusting box ","type","depth","tsas","clli","num_sublayers","matrixCoefficients","readAnyInt","warn","subSeqDirectionFlag","add","int16","location","default_sample_duration","width","attribute_list","FullBox","text","length","opcolor","ChannelMapping","subsegments","1582930xfjmla","14868027yzQTft","nb_samples","discard_priority","fobr","encu","greatestDecodeToDisplayDelta","ptl_frame_only_constraint_flag","hintTracks","Generating initialization segment","uint16","error","writeFloat32Array",", column: ","chunk_offsets","quat_y","prototype","parallelismType","dec3","trex","buildTrakSampleLists","scheme_uri","getInt8"," for sample ","trak","stsz","_buffer","prof","wvtt","isVideo","bit_depth_luma_minus8","nmhd","3PrTCsW","_size","trep","initial_presentation_delay_minus_one","byteOffset","boxes","addTrack","2801336rQVRMN","avcCBox","ES_ID","dmed","component_type_urls","VisualSampleEntry","readySent","UUIDs","default_length","releaseItem","edts","sgpd","Found 'mdat' end in buffered data","avs3","component_little_endian","mergeNextBuffer","code","split","readInt16","extent_index","primaryRChromaticity_x","leva","etyp","protections","readInt8Array","stsa","user","starts_with_SAP","mapUint16Array","ISOFile","setFloat32","readFloat64","492676crNryy","av01SampleEntry","nb_PPS_nalus","cttsBox","block_little_endian","aux_info_type"," full item size: ","pixi","vttC","chroma_sample_position","has_unparsed_data","tkhdBox","default_constant_IV_size","packetssent","source","image_height","schema_location","luminanceMax","sample_description_index","updateUsedBytes","num_output_samples","component_format","processIncompleteBox","descriptionformat","onReady","mdhd","System","ind_subs","DecoderConfigDescriptor","vertOffN","mehd","uncC","num_tile_cols_minus_one","Audio","ipco","readUint16Array","SAMPLE_ENTRY_TYPE_HINT","charCodeAt","tsel","layer_size","readInt16Array","tile_align_size"," --\x3e ","offset_size","int32be","print","aux_type"," of size ","ispe","int8","TRUN_FLAGS_DATA_OFFSET","getUint16","boxEqual","data_format","extract_bits","segmentStream","stsh","ipma","metx","mha1","Not enough bytes left in the parent box to parse a UUID box","buffer","stts","2349756WcyYaQ","itemId","frame_count"," sample #","pos_y","dataview","grouping_type_parameter","mdats","revokeObjectURL","indent","samplesDataSize","item_ID","discardMdatData","StreamCount","writeInt8","cleanApertureHeightD","BIG_ENDIAN","initial_delay","mfhd","kid","mvhd","sample_offset","streamType","is_fragment","parseHeader","mapInt8Array","concat","bits_per_pixel"," f=","readCString","uri ","sub_track_id","compressorname","mfro","trpy","seek","parse","numTemporalLayers","base_offset","initialize","writeHeader","max_content_light_level","used","sampleProcessingStarted","stream","' and size ","bufferIndex","avc1","auxiliary_mime_types","createFullBoxCtor","sizePosition","codecIntializationData","seekTrack","ICC_profile","moovStartSent","num_held_bits","brst","default_skip_byte_block","aux_subtype","getTime","writeFloat32","samplesize","bad_pixel_row","matrix","stream_read_1_bytes","parseLanguage","_byteOffset","Allocating item #","j2ki","getLength","videoFullRangeFlag","nextSample","destroy","subs"," (total: ","BoxWriter","setFloat64","findPosition","bitrate","TRUN_FLAGS_FIRST_FLAG","CUESHEET","alternate_group","APPLICATION","channel_count","writeUint16","stxtSampleEntry","timescale","bad_columns","co64"," - Length: ","VORBIS_COMMENT","parsingMdat","checkBuffer","unsetSegmentOptions","base_data_offset","nclx","TKHD_FLAG_IN_MOVIE","is_depended_on","bsid","moov","setSegmentOptions","max_display_mastering_luminance","SAMPLE_ENTRY_TYPE_SUBTITLE","high_bitdepth","avg_frame_rate","save","], [","construction_method","seekPoints","resources","cts","data_offset","mapFloat32Array","priority","getCodecs","hSpacing","schi","layerNumber"," partial data (alreadyRead: ","tpyl","constant_IV","styp","writeInt32","readUint8Array","media_duration","cleanApertureWidthN"," bytes), continuous ranges: ","fscod","brands","switch_group","is_sync","default_constant_IV","hev1SampleEntry","extractedTracks","DIFF_BOXES_PROP_NAMES","esds","addBox","minor_version","Metadata","enct","TKHD_FLAG_ENABLED","reserved","mehdBox","available_bitrate"," data (alreadyRead: ","trun","version of iloc box not supported","matrix: ","system_id","d08a4f1810f34a82b6c832d8aba183d3","Found ","writeUCS2String","upStream","earliest_presentation_time","ntp_timestamp","otherTracks","created","writeUint24","bytes","tpay","rate","Position ","getTrackSample","configOBUs","writeType","traf_number","num_bad_pixels","from_item_ID","constant_IV_size","colr","emsg","bit_depth_minus8","vertOffD","cleanBuffers","num_bytes_constraint_info","onItem","dts","vpcC","group_id","sample_deltas","displayFlags","avll","general_constraint_info","general_profile_compatibility","parseOneDescriptor","computeSize","nextMoofNumber","Repositioning parser at buffer position: ","num_entities_in_group","nalu_arrays","hmhd","sthd","entry_count","memcpy","skip_byte_block","addUsedBytes","setUint32","body","media_rate_integer","mdat","cdef","ptl_sublayer_present_mask","BoxParser","decode","onMoovStart","readInt64","test","isAudio","writeUint8","a5d40b30e81411ddba2f0800200c9a66","track_height","stop","wbbr","uint16be","avgRateFlag","num_bad_rows","TFHD_FLAG_SAMPLE_SIZE","stsg","slice","trun_number","codec","TRUN_FLAGS_SIZE","sampleListBuilt","CONTAINER_BOXES","isSubtitle","vp09SampleEntry","mdhdBox","logBufferLevel","depends_on","bytessent","substring","drefBox","iprp","data_reference_index","findDescriptor","SampleGroupEntry","fragment_count","value","alreadyRead"," of size: ","stz2","first_offset","Getting sample #","nextParsePosition","moofBox","lastValidSample","audioTracks","string","sbgps"," extent #","replace","step_count","parseDataAndRewind","kinds","leastDecodeToDisplayDelta","mvif","sampleEntryCodes","BASIC_BOXES","image_width","SAMPLE_ENTRY_TYPE_AUDIO","MetadataSampleEntry","isProgressive","onSamples","writeUint32Array","_byteLength","prol","entry_index","stsdBox","style_record","iref","track_id: ","content_type","msg","eqiv","time","MP4BoxStream","encm","props","initial_presentation_delay_present","version","lsel","acmod","stppSampleEntry","senc","int32le","colour_type","parseSample","grpl","samplerate","associations","subSequenceIdentifier","SampleEntry","first_sample_index","addSubBoxArrays","document","Not enough bytes in buffer","avc4","getAllocatedSampleDataSize","all_ref_pics_intra","iinf","parseRemainingDescriptors","tkhd","LITTLE_ENDIAN","avcDecoderConfigRecord","TFHD_FLAG_SAMPLE_FLAGS","smhdBox","Getting item #","stxt","writeInt32Array","pos_z","pitm","general_profile_idc","min","No method for reading signed 24 bits values","protection_index","entries","dac3","(empty)","stscBox","edits","readUint16","boxEqualFields","parseFullHeader","sent","getInt32","SingleItemTypeReferenceBoxLarge","favc","alternate_group: ","default_IV_size","lhe1","usedBytes","kind","focal_length_x","sampling_type","pano","onSidx","next_track_id: ","languageString","compositionToDTSShift","boxCodes","ptl_multilayer_enabled","padb","bsmod","createUUIDBox","TRUN_FLAGS_FLAGS","sample_numbers","moovBox","avc1SampleEntry","to_item_ID","int16le","processSamples","getCodec","infe","held_bits","flush","getHeight","codecIntializationDataSize","rapAlignement","mime","emsgBox","sidxSent","max_ref_per_pic","constantFrameRate","item_count","elng","float32le","extents","matrix_coefficients","UUIDBoxes","updateSampleLists","properties","readUint32","Error accessing position in the MultiBufferStream","TrackGroupTypeBox","channel_types","moovStartFound","default_sample_size","stss","hvt1","createContainerBoxCtor","pixel_size"," Compressor","splice","horizontal_justification","uncv","subtitleTracks","maxBitrate","dobr","track_ID","op_index","Error reading extent index","twelve_bit","createMediaSampleEntryCtor","default_group_description_index","hdlrBox","cslgBox","track_ids","getChannelCount","compositionEndTime","completeness","subsamples","stshBox","length_size_of_sample_num","RESERVED","profile_compatibility","primaryRChromaticity_y","track_id","modification_time","sample_flags","ster","enca","getPrimaryItem","sample_size","writeUint32","PPS","insertBuffer","has_fragment_subsamples","mett","flipArrayEndianness","component_types","SingleItemTypeReferenceBox","getPerformanceInfo","setAttribute","sample_number","releaseSample","createEncryptedSampleEntryCtor"," offset: ","getItem","1904-01-01T00:00:00Z","horizOffD","start","writeFooter","layer: ","stsc","TFHD_FLAG_SAMPLE_DESC","1593218bFGJXn","type:","dav1","trafs","Adjusting data_offset with new value ","AVCProfileIndication","itemsDataSize","assignment_type","debug","single_view_allowed","length_size_of_traf_num","TKHD_FLAG_IN_PREVIEW"," read size: ","stszBox","getEndPosition","setSampleGroupProperties","sample_groups","createSampleEntryCtor","mhm1","mime_format","_realloc","getTrexById","documentString","scheme_id_uri","iods","vvcN","tracks","getStreamBufferSize","operation_point_count","moof","height: ","ArrayBuffer","mapInt16Array","bit_depth_chroma_minus8","Opus","Text","encv","buffers","TFHD_FLAG_SAMPLE_DUR","truns","TrackReferenceTypeBox","readUint24","avc3SampleEntry","setExtractionOptions","default_KID","dataView","getInfo","hvcCBox"," not found in buffered data","metadata","iloc","payloadID","ptl_present_flag","initial_duration","getWidth","fromCharCode","enof","arrayToNative","writeInt16Array","msrc","meta","lengthSizeMinusOne","box","parseConfig","nalu","Allocating sample #","channel_associations","scnm","Visual","float32","click","chunk_run_index","udes","PADDING","Writing box ","addEntry","vvi1","chunk_index","ASCII","items","kindBox","transfer_characteristics","degradation_priority","byteLength","track_group_id","samples_per_chunk","nbSamples","udta","samples_size","tapt","vp09","dvh1","Stream ready for parsing","full_range_flag","writeUint16Array","axis","subsegment_duration","target","mjp2","BYTES_PER_ELEMENT","uuid","primaryBChromaticity_y"," full extent size: ","handler","ftypBox","rICC","bad_pixel_column","DataStream","Found position in existing buffer #","graphicsmode","offset","strk","readUint64","compositionStartTime","LiveServerManifest","TRUN_FLAGS_DURATION","reference_type","aux_info_type_parameter","notice","chan_loc","vmhd","default_sample_info_size","Concatenating buffer for box parsing (length: ","fragment_description","ERR_NOT_ENOUGH_DATA","oti","getDescriptorName","InputSampleRate","trefBox","fragmentedTracks","dvhe","ac-4","floor","absolute_time","sample_counts","stsd","processIncompleteMdat","avc2","min_spatial_segmentation_idc","tyco","subtitles","DecoderSpecificInfo","sample_groups_info","dmax","shift","sgpds","stream_read_2_bytes","pts","row_align_size","default_sample_description_index","_dataView","mapUint8Array","und","fromCharCodeUint8","description_boxes","samples_duration","ES_Descriptor","size:","imir","lastBoxStartPosition","getUint8","uint32le","SPS","Track created with MP4Box.js","download","vSpacing","videoTracks","nextSeekPosition","push","namespace","avgFrameRate","SAMPLE_ENTRY_TYPE_VISUAL","sidxBox","num_tile_rows_minus_one","level_independently_decodable","levels","target_rate_share","SAP_type","item_type","Found box of type '","restoreParsePosition","getEndFilePositionAfter","isEos","mha2","hvcC",", size ","rtp ","roll","No more buffer in memory","parseHex16"," with new size ","writeFloat64","max","lang","extent_offset","dynamicSize","saiz","ContainerBox","default_sample_flags","property_index","accurateStatisticsFlag","_trimAlloc","next_track_id","number","nonamespace","sample_is_depended_on","getSample","_dynamicSize","bitDepth","7mWhEhx","description","volume: ","parseFooter","block_reversed","roll_distance","flags:","ptl_num_sub_profiles","hvc1SampleEntry","apply","duration","getMetaHandler","resetTables","bxml","content_encoding","isFragmentationInitialized","colorSpace"];return(ko=function(){return e})()}!function(e,t){for(var r=Ao,n=e();;)try{if(927801===parseInt(r(954))/1+parseInt(r(385))/2+parseInt(r(417))/3*(-parseInt(r(456))/4)+parseInt(r(268))/5+parseInt(r(519))/6*(-parseInt(r(1163))/7)+-parseInt(r(424))/8+-parseInt(r(386))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ko);var Io=tt[Eo(1260)]((function(e,t){var r,n,s=Eo,o=(r=new Date,n=4,{setLogLevel:function(e){var t=Ao;n=e==this[t(962)]?1:e==this.info?2:e==this[t(371)]?3:(this[t(396)],4)},debug:function(e,t){var i=Ao;void 0===console[i(962)]&&(console[i(962)]=console[i(255)]),1>=n&&console[i(962)]("["+o[i(201)](new Date-r,1e3)+"]","["+e+"]",t)},log:function(e,t){var r=Ao;this[r(962)](e[r(791)])},info:function(e,t){var i=Ao;2>=n&&console[i(1274)]("["+o[i(201)](new Date-r,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=n&&console[Ao(371)]("["+o.getDurationString(new Date-r,1e3)+"]","["+e+"]",t)},error:function(e,t){var i=Ao;4>=n&&console[i(396)]("["+o[i(201)](new Date-r,1e3)+"]","["+e+"]",t)}});o[s(201)]=function(e,t){var r,n=s;function i(e,t){for(var r=Ao,n=(""+e)[r(441)](".");n[0][r(381)]0){for(var n="",i=0;i0&&(n+=","),n+="["+o[t(201)](e[t(949)](i))+","+o[t(201)](e[t(1384)](i))+"]";return n}return t(836)},t[s(1314)]=o;var a=function(e){var t=s;if(!(e instanceof ArrayBuffer))throw t(1323);this[t(517)]=e,this[t(524)]=new DataView(e),this[t(1223)]=0};a[s(401)][s(232)]=function(){return this[s(1223)]},a[s(401)][s(968)]=function(){var e=s;return this[e(517)][e(1037)]},a[s(401)][s(588)]=function(){var e=s;return this[e(517)][e(1037)]},a.prototype[s(554)]=function(e){var t=s,r=Math.max(0,Math.min(this[t(517)].byteLength,e));return this.position=isNaN(r)||!isFinite(r)?0:r,!0},a.prototype[s(1136)]=function(){var e=s;return this[e(232)]()>=this[e(968)]()},a[s(401)][s(370)]=function(e,t){var r=s,n=0;if(this[r(1223)]+e<=this[r(517)][r(1037)]){switch(e){case 1:n=t?this[r(524)][r(407)](this[r(1223)]):this[r(524)][r(1114)](this[r(1223)]);break;case 2:n=t?this[r(524)].getInt16(this[r(1223)]):this[r(524)].getUint16(this.position);break;case 3:if(t)throw r(832);n=this[r(524)][r(1114)](this[r(1223)])<<16,n|=this[r(524)][r(1114)](this.position+1)<<8,n|=this.dataview[r(1114)](this.position+2);break;case 4:n=t?this.dataview.getInt32(this[r(1223)]):this.dataview[r(1331)](this[r(1223)]);break;case 8:if(t)throw r(1397);n=this[r(524)][r(1331)](this[r(1223)])<<32,n|=this.dataview[r(1331)](this[r(1223)]+4);break;default:throw r(271)+e}return this.position+=e,n}throw r(814)},a[s(401)][s(270)]=function(){return this[s(370)](1,!1)},a[s(401)].readUint16=function(){return this.readAnyInt(2,!1)},a[s(401)][s(995)]=function(){return this[s(370)](3,!1)},a.prototype[s(890)]=function(){return this[s(370)](4,!1)},a[s(401)][s(1066)]=function(){return this[s(370)](8,!1)},a[s(401)].readString=function(e){var t=s;if(this[t(1223)]+e<=this[t(517)][t(1037)]){for(var r="",n=0;nthis[t(783)]&&(this[t(783)]=r);else{for(n<1&&(n=1);r>n;)n*=2;var i=new ArrayBuffer(n),o=new Uint8Array(this[t(411)]);new Uint8Array(i,0,o[t(381)])[t(1403)](o),this[t(517)]=i,this[t(783)]=r}}},c[s(401)][s(1155)]=function(){var e=s;if(this[e(783)]!=this[e(411)][e(1037)]){var t=new ArrayBuffer(this[e(783)]),r=new Uint8Array(t),n=new Uint8Array(this[e(411)],0,r[e(381)]);r[e(1403)](n),this[e(517)]=t}},c.BIG_ENDIAN=!1,c[s(821)]=!0,c.prototype[s(783)]=0,Object[s(297)](c.prototype,s(1037),{get:function(){return this[s(783)]-this._byteOffset}}),Object.defineProperty(c.prototype,s(517),{get:function(){var e=s;return this._trimAlloc(),this[e(411)]},set:function(e){var t=s;this[t(411)]=e,this[t(1104)]=new DataView(this._buffer,this[t(585)]),this[t(783)]=this._buffer[t(1037)]}}),Object[s(297)](c[s(401)],s(421),{get:function(){return this._byteOffset},set:function(e){var t=s;this._byteOffset=e,this._dataView=new DataView(this[t(411)],this[t(585)]),this[t(783)]=this[t(411)][t(1037)]}}),Object[s(297)](c[s(401)],s(999),{get:function(){return this[s(1104)]},set:function(e){var t=s;this[t(585)]=e[t(421)],this[t(411)]=e.buffer,this._dataView=new DataView(this[t(411)],this._byteOffset),this._byteLength=this._byteOffset+e[t(1037)]}}),c[s(401)][s(554)]=function(e){var t=s,r=Math.max(0,Math[t(831)](this[t(1037)],e));this.position=isNaN(r)||!isFinite(r)?0:r},c[s(401)][s(1230)]=function(){var e=s;return this[e(1223)]>=this[e(783)]},c[s(401)].mapUint8Array=function(e){var t=s;this[t(974)](1*e);var r=new Uint8Array(this[t(411)],this[t(421)]+this[t(1223)],e);return this[t(1223)]+=1*e,r},c[s(401)].readInt32Array=function(e,t){var r=s;e=null==e?this[r(1037)]-this.position/4:e;var n=new Int32Array(e);return c[r(712)](n[r(517)],0,this[r(517)],this[r(421)]+this[r(1223)],e*n.BYTES_PER_ELEMENT),c[r(1011)](n,null==t?this[r(302)]:t),this[r(1223)]+=n[r(1037)],n},c[s(401)].readInt16Array=function(e,t){var r=s;e=null==e?this.byteLength-this[r(1223)]/2:e;var n=new Int16Array(e);return c[r(712)](n.buffer,0,this[r(517)],this.byteOffset+this[r(1223)],e*n.BYTES_PER_ELEMENT),c[r(1011)](n,null==t?this[r(302)]:t),this[r(1223)]+=n.byteLength,n},c[s(401)][s(448)]=function(e){var t=s;e=null==e?this[t(1037)]-this[t(1223)]:e;var r=new Int8Array(e);return c[t(712)](r.buffer,0,this[t(517)],this.byteOffset+this.position,e*r[t(1053)]),this[t(1223)]+=r[t(1037)],r},c[s(401)][s(1391)]=function(e,t){var r=s;e=null==e?this.byteLength-this[r(1223)]/4:e;var n=new Uint32Array(e);return c[r(712)](n.buffer,0,this.buffer,this[r(421)]+this[r(1223)],e*n[r(1053)]),c[r(1011)](n,null==t?this.endianness:t),this[r(1223)]+=n[r(1037)],n},c[s(401)][s(491)]=function(e,t){var r=s;e=null==e?this.byteLength-this[r(1223)]/2:e;var n=new Uint16Array(e);return c[r(712)](n[r(517)],0,this.buffer,this[r(421)]+this[r(1223)],e*n[r(1053)]),c[r(1011)](n,null==t?this[r(302)]:t),this[r(1223)]+=n[r(1037)],n},c[s(401)][s(642)]=function(e){var t=s;e=null==e?this[t(1037)]-this[t(1223)]:e;var r=new Uint8Array(e);return c[t(712)](r[t(517)],0,this[t(517)],this[t(421)]+this[t(1223)],e*r.BYTES_PER_ELEMENT),this.position+=r[t(1037)],r},c[s(401)][s(1407)]=function(e,t){var r=s;e=null==e?this[r(1037)]-this[r(1223)]/8:e;var n=new Float64Array(e);return c.memcpy(n[r(517)],0,this.buffer,this.byteOffset+this[r(1223)],e*n[r(1053)]),c[r(1011)](n,null==t?this[r(302)]:t),this.position+=n[r(1037)],n},c[s(401)].readFloat32Array=function(e,t){var r=s;e=null==e?this.byteLength-this[r(1223)]/4:e;var n=new Float32Array(e);return c[r(712)](n[r(517)],0,this[r(517)],this[r(421)]+this[r(1223)],e*n.BYTES_PER_ELEMENT),c[r(1011)](n,null==t?this[r(302)]:t),this[r(1223)]+=n.byteLength,n},c.prototype[s(1297)]=function(e){var t=s,r=this[t(1104)][t(843)](this.position,null==e?this[t(302)]:e);return this[t(1223)]+=4,r},c.prototype[s(442)]=function(e){var t=s,r=this._dataView[t(273)](this.position,null==e?this[t(302)]:e);return this[t(1223)]+=2,r},c[s(401)].readInt8=function(){var e=s,t=this._dataView[e(407)](this.position);return this.position+=1,t},c[s(401)][s(890)]=function(e){var t=s,r=this._dataView[t(1331)](this[t(1223)],null==e?this.endianness:e);return this.position+=4,r},c[s(401)][s(839)]=function(e){var t=s,r=this._dataView[t(507)](this[t(1223)],null==e?this[t(302)]:e);return this.position+=2,r},c[s(401)][s(270)]=function(){var e=s,t=this[e(1104)].getUint8(this.position);return this[e(1223)]+=1,t},c.prototype.readFloat32=function(e){var t=s,r=this._dataView[t(307)](this[t(1223)],null==e?this[t(302)]:e);return this[t(1223)]+=4,r},c[s(401)][s(455)]=function(e){var t=s,r=this._dataView[t(1419)](this[t(1223)],null==e?this.endianness:e);return this.position+=8,r},c[s(302)]=new Int8Array(new Int16Array([1]).buffer)[0]>0,c.memcpy=function(e,t,r,n,i){var s=new Uint8Array(e,t,i),o=new Uint8Array(r,n,i);s.set(o)},c[s(1011)]=function(e,t){var r=s;return t==this[r(302)]?e:this[r(937)](e)},c.nativeToEndian=function(e,t){var r=s;return this.endianness==t?e:this[r(937)](e)},c.flipArrayEndianness=function(e){for(var t=s,r=new Uint8Array(e[t(517)],e.byteOffset,e[t(1037)]),n=0;no;i--,o++){var a=r[o];r[o]=r[i],r[i]=a}return e},c.prototype.failurePosition=0,String[s(1107)]=function(e){for(var t=s,r=[],n=0;n>16),this[t(727)]((65280&e)>>8),this.writeUint8(255&e)},c.prototype.adjustUint32=function(e,t){var r=s,n=this[r(1223)];this.seek(e),this[r(932)](t),this[r(554)](n)},c.prototype[s(257)]=function(e,t){var r=s;this[r(974)](4*e);var n=new Int32Array(this[r(411)],this[r(421)]+this[r(1223)],e);return c[r(1011)](n,null==t?this.endianness:t),this[r(1223)]+=4*e,n},c[s(401)][s(986)]=function(e,t){var r=s;this[r(974)](2*e);var n=new Int16Array(this[r(411)],this[r(421)]+this[r(1223)],e);return c[r(1011)](n,null==t?this.endianness:t),this[r(1223)]+=2*e,n},c.prototype[s(544)]=function(e){var t=s;this._realloc(1*e);var r=new Int8Array(this._buffer,this[t(421)]+this[t(1223)],e);return this[t(1223)]+=1*e,r},c[s(401)].mapUint32Array=function(e,t){var r=s;this[r(974)](4*e);var n=new Uint32Array(this._buffer,this[r(421)]+this[r(1223)],e);return c[r(1011)](n,null==t?this.endianness:t),this.position+=4*e,n},c[s(401)][s(452)]=function(e,t){var r=s;this[r(974)](2*e);var n=new Uint16Array(this[r(411)],this[r(421)]+this[r(1223)],e);return c[r(1011)](n,null==t?this[r(302)]:t),this[r(1223)]+=2*e,n},c.prototype[s(1294)]=function(e,t){var r=s;this[r(974)](8*e);var n=new Float64Array(this[r(411)],this[r(421)]+this[r(1223)],e);return c[r(1011)](n,null==t?this[r(302)]:t),this[r(1223)]+=8*e,n},c[s(401)][s(631)]=function(e,t){var r=s;this[r(974)](4*e);var n=new Float32Array(this[r(411)],this[r(421)]+this[r(1223)],e);return c[r(1011)](n,null==t?this[r(302)]:t),this[r(1223)]+=4*e,n};var l=function(e){var t=s;this[t(991)]=[],this.bufferIndex=-1,e&&(this[t(934)](e),this[t(565)]=0)};l.prototype=new c(new ArrayBuffer,0,c[s(535)]),l[s(401)][s(354)]=function(){var e,t=s;return this[t(565)]>-1||(this[t(991)][t(381)]>0?0===(e=this[t(991)][0])[t(233)]?(this[t(517)]=e,this[t(565)]=0,o.debug(t(1335),t(1046)),!0):(this[t(746)](),!1):(this[t(746)](),!1))},ArrayBuffer[s(545)]=function(e,t){var r=s;o[r(962)](r(985),"Trying to create a new buffer of size: "+(e[r(1037)]+t.byteLength));var n=new Uint8Array(e.byteLength+t.byteLength);return n[r(1403)](new Uint8Array(e),0),n[r(1403)](new Uint8Array(t),e[r(1037)]),n.buffer},l[s(401)][s(1203)]=function(e,t,r){var n,i=s;return(n=new Uint8Array(r))[i(1403)](new Uint8Array(e,t,r)),n.buffer.fileStart=e.fileStart+t,n.buffer.usedBytes=0,n[i(517)]},l[s(401)][s(934)]=function(e){for(var t=s,r=!0,n=0;ni[t(1037)]){this[t(991)][t(901)](n,1),n--;continue}}else e.fileStart+e[t(1037)]<=i[t(233)]||(e=this.reduceBuffer(e,0,i[t(233)]-e.fileStart)),o.debug("MultiBufferStream","Appending new buffer (fileStart: "+e[t(233)]+" - Length: "+e[t(1037)]+")"),this[t(991)][t(901)](n,0,e),0===n&&(this.buffer=e);r=!1;break}if(e[t(233)]0)){r=!1;break}e=this.reduceBuffer(e,a,c)}}r&&(o[t(962)]("MultiBufferStream",t(1424)+e[t(233)]+t(608)+e[t(1037)]+")"),this[t(991)][t(1122)](e),0===n&&(this[t(517)]=e))},l[s(401)][s(746)]=function(e){var t,r,n,i,a,c=s,u=[],l="";for(n=0,i=0,t=0;t0&&(l+=a[c(1384)]-1+"]");var d=e?o[c(1274)]:o[c(962)];0===this.buffers[c(381)]?d("MultiBufferStream",c(1142)):d(c(1335),this[c(991)][c(381)]+" stored buffer(s) ("+n+"/"+i+c(645)+l)},l[s(401)].cleanBuffers=function(){var e,t,r=s;for(e=0;e"+this[t(517)].byteLength+")"),!0}return!1}return!1},l.prototype[s(596)]=function(e,t,r){var n,i=s,a=null,c=-1;for(n=!0===e?0:this[i(565)];n=t?(o[i(962)](i(1335),i(1062)+c),c):-1:-1},l[s(401)][s(347)]=function(e){var t,r,n,i=s,o=void 0!==e?e:this[i(565)];if(r=this[i(991)][o],this[i(991)][i(381)]>o+1)for(t=o+1;t>3;return 31===s&&i[r(1204)][r(381)]>=2&&(s=32+((7&i[r(1204)][0])<<3)+((224&i[r(1204)][1])>>5)),s}return null},n[e(484)]=function(t){var r=e;n[r(1326)][r(1370)](this,4,t)},n[e(484)][e(401)]=new(n[e(1326)]),n[e(484)][e(401)][e(555)]=function(t){var r=e;this.oti=t[r(270)](),this[r(541)]=t[r(270)](),this[r(671)]=0!=(this.streamType>>1&1),this[r(541)]=this.streamType>>>2,this[r(355)]=t.readUint24(),this[r(905)]=t[r(890)](),this.avgBitrate=t.readUint32(),this[r(1301)]-=13,this[r(819)](t)},n[e(1095)]=function(t){var r=e;n[r(1326)][r(1370)](this,5,t)},n[e(1095)].prototype=new(n[e(1326)]),n[e(277)]=function(t){var r=e;n[r(1326)][r(1370)](this,6,t)},n.SLConfigDescriptor[e(401)]=new n.Descriptor,this};s(333)!==s(1389)&&(t[s(249)]=d);var h={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:[s(718),s(211),s(1288),s(1356),"meco",s(1065)],FULL_BOXES:[s(709),s(416),s(978),s(1351),s(1176),s(1279),"mere"],CONTAINER_BOXES:[[s(618),["trak","pssh"]],[s(409)],[s(434)],[s(296)],["minf"],["dinf"],["stbl",[s(435),s(291)]],[s(1198),[s(404)]],[s(983),[s(1220)]],[s(1220),[s(664),s(435),"sbgp"]],["vttc"],[s(1336)],[s(788)],[s(241),[s(309)]],["meco"],["hnti"],["hinf"],[s(1065)],[s(213)],[s(215)],[s(1222)],[s(635)],["trgr"],[s(1041),[s(850)]],["iprp",[s(513)]],[s(490)],["grpl"],["j2kH"],[s(446),[s(1093)]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){var e=s;h[e(379)][e(401)]=new h.Box,h.ContainerBox[e(401)]=new(h[e(304)]),h.SampleEntry[e(401)]=new(h[e(304)]),h.TrackGroupTypeBox[e(401)]=new h.FullBox,h[e(776)].forEach((function(t){h[e(1395)](t)})),h[e(290)][e(1277)]((function(t){h[e(568)](t)})),h[e(742)].forEach((function(t){h[e(898)](t[0],null,t[1])}))},Box:function(e,t,r){var n=s;this[n(364)]=e,this[n(1301)]=t,this.uuid=r},FullBox:function(e,t,r){var n=s;h[n(304)][n(1370)](this,e,t,r),this[n(245)]=0,this[n(798)]=0},ContainerBox:function(e,t,r){var n=s;h.Box.call(this,e,t,r),this[n(422)]=[]},SampleEntry:function(e,t,r,n){var i=s;h[i(1151)][i(1370)](this,e,t),this[i(327)]=r,this.start=n},SampleGroupEntry:function(e){this[s(1207)]=e},TrackGroupTypeBox:function(e,t){var r=s;h[r(379)][r(1370)](this,e,t)},createBoxCtor:function(e,t){var r=s;h[r(858)].push(e),h[e+r(304)]=function(t){var n=r;h[n(304)][n(1370)](this,e,t)},h[e+r(304)][r(401)]=new(h[r(304)]),t&&(h[e+"Box"][r(401)].parse=t)},createFullBoxCtor:function(e,t){var r=s;h[e+r(304)]=function(t){var n=r;h[n(379)][n(1370)](this,e,t)},h[e+r(304)][r(401)]=new h.FullBox,h[e+"Box"].prototype.parse=function(e){var n=r;this.parseFullHeader(e),t&&t[n(1370)](this,e)}},addSubBoxArrays:function(e){if(e){this[s(1255)]=e;for(var t=e.length,r=0;rr?{code:h[c(1078)],type:f,size:d,hdr_size:l,start:u}:0!==d&&u+d>e[c(968)]()?(e[c(554)](u),{code:h[c(1078)],type:f,size:d,hdr_size:l,start:u}):t?{code:h.OK,type:f,size:d,hdr_size:l,start:u}:(h[f+c(304)]?n=new(h[f+c(304)])(d):"uuid"!==f?(n=new h.Box(f,d))[c(466)]=!0:h[c(887)][a]?n=new(h[c(887)][a])(d):((n=new(h[c(304)])(f,d))[c(1054)]=a,n[c(466)]=!0),n[c(327)]=l,n[c(949)]=u,n[c(243)]===h.Box[c(401)][c(243)]&&n[c(364)]!==c(718)&&n[c(771)](e),n[c(555)](e),(i=e[c(232)]()-(n[c(949)]+n[c(1301)]))<0?e[c(554)](n[c(949)]+n[c(1301)]):i>0&&0!==n[c(1301)]&&e[c(554)](n[c(949)]+n.size),{code:h.OK,box:n,size:n[c(1301)]})},h[s(304)][s(401)][s(555)]=function(e){var t=s;this.type!=t(718)?this.data=e[t(642)](this[t(1301)]-this[t(327)]):0===this[t(1301)]?e[t(554)](e[t(968)]()):e[t(554)](this[t(949)]+this[t(1301)])},h[s(304)][s(401)].parseDataAndRewind=function(e){var t=s;this[t(1204)]=e.readUint8Array(this[t(1301)]-this[t(327)]),e[t(1223)]-=this[t(1301)]-this[t(327)]},h.FullBox[s(401)][s(771)]=function(e){var t=s;this[t(841)](e),this[t(1204)]=e.readUint8Array(this[t(1301)]-this[t(327)]),this[t(327)]-=4,e.position-=this[t(1301)]-this[t(327)]},h[s(379)][s(401)][s(841)]=function(e){var t=s;this[t(798)]=e[t(270)](),this[t(245)]=e.readUint24(),this[t(327)]+=4},h[s(379)][s(401)][s(555)]=function(e){var t=s;this[t(841)](e),this[t(1204)]=e[t(642)](this[t(1301)]-this[t(327)])},h.ContainerBox[s(401)][s(555)]=function(e){for(var t,r,n=s;e[n(232)]()>10&31,r[1]=this[t(205)]>>5&31,r[2]=31&this[t(205)],this[t(856)]=String[t(1009)](r[0]+96,r[1]+96,r[2]+96)},h[s(1125)]=s(1022),h[s(778)]=s(489),h[s(492)]=s(264),h.SAMPLE_ENTRY_TYPE_METADATA=s(657),h[s(621)]=s(1221),h[s(1191)]="System",h.SAMPLE_ENTRY_TYPE_TEXT=s(989),h[s(810)][s(401)][s(543)]=function(e){var t=s;e[t(642)](6),this[t(752)]=e[t(839)](),this[t(327)]+=8},h[s(810)][s(401)][s(555)]=function(e){var t=s;this[t(543)](e),this[t(1204)]=e[t(642)](this[t(1301)]-this[t(327)])},h[s(810)][s(401)][s(771)]=function(e){var t=s;this[t(543)](e),this.data=e.readUint8Array(this[t(1301)]-this[t(327)]),this[t(327)]-=8,e[t(1223)]-=this[t(1301)]-this[t(327)]},h.SampleEntry.prototype[s(1166)]=function(e){var t=s;h.ContainerBox.prototype[t(555)].call(this,e)},h[s(911)](h[s(492)]),h.createMediaSampleEntryCtor(h[s(1347)]),h[s(911)](h[s(621)]),h[s(911)](h[s(1191)]),h.createMediaSampleEntryCtor(h.SAMPLE_ENTRY_TYPE_TEXT),h[s(911)](h[s(1125)],(function(e){var t,r=s;this.parseHeader(e),e[r(839)](),e[r(839)](),e[r(1391)](3),this[r(377)]=e.readUint16(),this[r(272)]=e.readUint16(),this[r(1309)]=e.readUint32(),this[r(313)]=e.readUint32(),e.readUint32(),this[r(521)]=e[r(839)](),t=Math[r(831)](31,e[r(270)]()),this.compressorname=e[r(1209)](t),t<31&&e[r(1209)](31-t),this[r(365)]=e[r(839)](),e[r(839)](),this[r(1166)](e)})),h[s(911)](h[s(778)],(function(e){var t=s;this.parseHeader(e),e[t(1391)](2),this[t(602)]=e[t(839)](),this[t(580)]=e[t(839)](),e[t(839)](),e[t(839)](),this.samplerate=e.readUint32()/65536,this[t(1166)](e)})),h[s(971)](h[s(1125)],s(566)),h[s(971)](h[s(1125)],s(1091)),h[s(971)](h[s(1125)],"avc3"),h[s(971)](h[s(1125)],s(815)),h[s(971)](h[s(1125)],s(1272)),h[s(971)](h[s(1125)],s(956)),h[s(971)](h[s(1125)],s(1278)),h[s(971)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(1352)),h.createSampleEntryCtor(h[s(1125)],s(897)),h[s(971)](h[s(1125)],s(848)),h[s(971)](h[s(1125)],s(1045)),h[s(971)](h[s(1125)],s(1084)),h[s(971)](h[s(1125)],s(1320)),h[s(971)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(1030)),h[s(971)](h[s(1125)],s(1328)),h[s(971)](h[s(1125)],s(979)),h[s(971)](h[s(1125)],s(246)),h[s(971)](h[s(1125)],s(1044)),h.createSampleEntryCtor(h[s(1125)],s(437)),h[s(971)](h.SAMPLE_ENTRY_TYPE_VISUAL,s(587)),h[s(971)](h[s(1125)],s(1052)),h[s(971)](h[s(1125)],"mjpg"),h[s(971)](h[s(1125)],s(903)),h[s(971)](h.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),h[s(971)](h[s(778)],"ac-3"),h[s(971)](h[s(778)],s(1085)),h[s(971)](h.SAMPLE_ENTRY_TYPE_AUDIO,s(1276)),h[s(971)](h[s(778)],s(988)),h[s(971)](h.SAMPLE_ENTRY_TYPE_AUDIO,s(515)),h[s(971)](h[s(778)],s(1137)),h.createSampleEntryCtor(h[s(778)],s(972)),h.createSampleEntryCtor(h[s(778)],s(1383)),h[s(944)](h[s(1125)],s(990)),h[s(944)](h[s(778)],s(929)),h[s(944)](h[s(621)],s(390)),h[s(944)](h[s(1191)],s(196)),h[s(944)](h[s(1267)],s(658)),h[s(944)](h[s(1347)],s(795)),h.createBoxCtor("a1lx",(function(e){var t=s,r=16*(1+(1&(1&e[t(270)]())));this[t(495)]=[];for(var n=0;n<3;n++)16==r?this.layer_size[n]=e[t(839)]():this[t(495)][n]=e[t(890)]()})),h[s(1395)](s(330),(function(e){var t=s;this[t(908)]=e[t(270)]()})),h[s(568)](s(227),(function(e){var t=s;this[t(502)]=e[t(548)]();var r=this[t(1301)]-this[t(327)]-(this[t(502)][t(381)]+1);this[t(577)]=e[t(642)](r)})),h.createBoxCtor(s(352),(function(e){var t=s,r=e[t(270)]();if(!(r>>7&!1)&&(this[t(798)]=127&r,1===this[t(798)]&&(r=e[t(270)](),this[t(341)]=r>>5&7,this[t(1286)]=31&r,r=e[t(270)](),this[t(1266)]=r>>7&1,this.high_bitdepth=r>>6&1,this[t(910)]=r>>5&1,this.monochrome=r>>4&1,this[t(1245)]=r>>3&1,this[t(358)]=r>>2&1,this[t(465)]=3&r,r=e[t(270)](),this[t(320)]=r>>5&7,0===this.reserved_1))){if(this[t(797)]=r>>4&1,1===this[t(797)])this[t(420)]=15&r;else if(this[t(1240)]=15&r,0!==this.reserved_2)return;var n=this.size-this[t(327)]-4;this[t(682)]=e.readUint8Array(n)}})),h[s(1395)](s(346),(function(e){var t,r,n=s;for(this.configurationVersion=e[n(270)](),this[n(959)]=e.readUint8(),this[n(923)]=e[n(270)](),this[n(1197)]=e[n(270)](),this[n(1015)]=3&e.readUint8(),this.nb_SPS_nalus=31&e[n(270)](),r=this[n(1301)]-this.hdr_size-6,this.SPS=[],t=0;t0&&(this[n(1282)]=e[n(642)](r))})),h[s(1395)](s(1180),(function(e){var t=s;this.bufferSizeDB=e[t(890)](),this.maxBitrate=e[t(890)](),this[t(224)]=e[t(890)]()})),h[s(568)](s(1280),(function(e){var t=s,r=e[t(270)]();this[t(817)]=128==(128&r),this.intra_pred_used=64==(64&r),this[t(880)]=(63&r)>>2,e.readUint24()})),h.createBoxCtor(s(719),(function(e){var t,r=s;for(this[r(602)]=e.readUint16(),this.channel_indexes=[],this[r(893)]=[],this[r(1020)]=[],t=0;t=32768&&this[t(428)][t(1122)](e[t(548)]())}})),h[s(568)](s(607),(function(e){var t,r,n=s;if(t=e[n(890)](),this[n(399)]=[],0===this[n(798)])for(r=0;r>7}else this.colour_type===t(1059)?this[t(572)]=e[t(642)](this.size-4):this[t(804)]===t(412)&&(this.ICC_profile=e[t(642)](this[t(1301)]-4))})),h[s(568)]("cprt",(function(e){var t=s;this[t(584)](e),this[t(1072)]=e[t(548)]()})),h[s(568)](s(335),(function(e){var t=s;0===this.version&&(this[t(857)]=e[t(1297)](),this[t(773)]=e[t(1297)](),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e[t(1297)](),this[t(917)]=e[t(1297)]())})),h[s(568)](s(1264),(function(e){var t,r,n=s;if(t=e[n(890)](),this[n(1088)]=[],this[n(1406)]=[],0===this[n(798)])for(r=0;r>6,this[t(617)]=r>>1&31,this[t(861)]=(1&r)<<2|n>>6&3,this[t(800)]=n>>3&7,this[t(1313)]=n>>2&1,this[t(1211)]=3&n|i>>5&7})),h.createBoxCtor(s(403),(function(e){var t=s,r=e.readUint16();this[t(217)]=r>>3,this[t(209)]=7&r,this[t(483)]=[];for(var n=0;n>6,i.bsid=o>>1&31,i.bsmod=(1&o)<<4|a>>4&15,i.acmod=a>>1&7,i[t(1313)]=1&a,i[t(1346)]=c>>1&15,i[t(1346)]>0&&(i[t(1073)]=(1&c)<<8|e[t(270)]())}})),h.createFullBoxCtor("dfLa",(function(e){var t=s,r=[],n=["STREAMINFO",t(1027),t(601),t(1224),t(609),t(599),t(1337),t(922)];for(this.parseFullHeader(e);;){var i=e[t(270)](),o=Math[t(831)](127&i,n[t(381)]-1);if(o?e[t(642)](e[t(995)]()):(e[t(642)](13),this[t(807)]=e[t(890)]()>>12,e[t(642)](20)),r[t(1122)](n[o]),128&i)break}this[t(1359)]=r[t(381)]+" ("+r[t(1229)](", ")+")"})),h[s(1395)]("dimm",(function(e){var t=s;this.bytessent=e[t(1066)]()})),h.createBoxCtor(s(1097),(function(e){this[s(793)]=e.readUint32()})),h.createBoxCtor(s(427),(function(e){var t=s;this[t(748)]=e[t(1066)]()})),h[s(1395)]("dOps",(function(e){var t=s;if(this.Version=e.readUint8(),this.OutputChannelCount=e[t(270)](),this.PreSkip=e[t(839)](),this[t(1081)]=e[t(890)](),this[t(289)]=e.readInt16(),this.ChannelMappingFamily=e[t(270)](),0!==this[t(1283)]){this[t(532)]=e.readUint8(),this[t(1290)]=e[t(270)](),this[t(383)]=[];for(var r=0;r=4;)this[t(310)][n]=e[t(1209)](4),r-=4,n++})),h.createFullBoxCtor("hdlr",(function(e){var t=s;0===this[t(798)]&&(e[t(890)](),this[t(1057)]=e.readString(4),e[t(1391)](3),this[t(1339)]=e[t(1209)](this[t(1301)]-this[t(327)]-20),"\0"===this.name[this.name[t(381)]-1]&&(this[t(1339)]=this[t(1339)][t(737)](0,-1)))})),h.createBoxCtor("hvcC",(function(e){var t,r,n,i,o=s;this.configurationVersion=e[o(270)](),i=e[o(270)](),this[o(1214)]=i>>6,this[o(1325)]=(32&i)>>5,this[o(830)]=31&i,this[o(702)]=e[o(890)](),this[o(1189)]=e[o(642)](6),this.general_level_idc=e[o(270)](),this.min_spatial_segmentation_idc=4095&e[o(839)](),this[o(402)]=3&e[o(270)](),this.chroma_format_idc=3&e[o(270)](),this[o(415)]=7&e.readUint8(),this[o(987)]=7&e[o(270)](),this[o(1124)]=e.readUint16(),i=e.readUint8(),this[o(881)]=i>>6,this[o(556)]=(13&i)>>3,this.temporalIdNested=(4&i)>>2,this[o(1015)]=3&i,this[o(708)]=[];var a=e[o(270)]();for(t=0;t>7,c[o(1362)]=63&i;var u=e[o(839)]();for(r=0;r>4&15,this[r(204)]=15&t,t=e[r(270)](),this[r(1271)]=t>>4&15,1===this[r(798)]||2===this[r(798)]?this[r(1394)]=15&t:this[r(1394)]=0,this[r(1033)]=[];var n=0;if(this.version<2)n=e.readUint16();else{if(2!==this[r(798)])throw r(665);n=e.readUint32()}for(var i=0;i>7,this[t(1049)]=1&r})),h[s(568)](s(871),(function(e){var t=s;if((0===this.version||1===this[t(798)])&&(this[t(530)]=e[t(839)](),this[t(325)]=e[t(839)](),this[t(357)]=e[t(548)](),this.content_type=e.readCString(),this[t(1177)]=e[t(548)]()),1===this[t(798)])return this[t(1194)]=e.readString(4),void e[t(554)](this[t(949)]+this[t(1301)]);this.version>=2&&(2===this.version?this[t(530)]=e.readUint16():3===this[t(798)]&&(this[t(530)]=e.readUint32()),this[t(325)]=e[t(839)](),this.item_type=e.readString(4),this[t(357)]=e[t(548)](),this.item_type===t(877)?(this[t(790)]=e[t(548)](),this[t(1177)]=e[t(548)]()):this[t(1132)]===t(549)&&(this[t(287)]=e[t(548)]()))})),h.createFullBoxCtor(s(513),(function(e){var t,r,n=s;for(entry_count=e.readUint32(),this[n(808)]=[],t=0;t>7==1,1&this[n(245)]?c[n(1153)]=(127&a)<<8|e[n(270)]():c[n(1153)]=127&a}}})),h.createFullBoxCtor(s(788),(function(e){var t,r,n=s;for(this.references=[];e[n(232)]()>7,i[t(961)]=127&o,i[t(961)]){case 0:i[t(1207)]=e[t(1209)](4);break;case 1:i[t(1207)]=e[t(1209)](4),i.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:i.sub_track_id=e[t(890)]()}}})),h[s(1395)](s(799),(function(e){var t=s;this.layer_id=e[t(839)]()})),h[s(1395)]("maxr",(function(e){var t=s;this[t(1427)]=e[t(890)](),this[t(677)]=e[t(890)]()})),f.prototype.toString=function(){return"("+this.x+","+this.y+")"},h[s(1395)]("mdcv",(function(e){var t=s;this[t(353)]=[],this[t(353)][0]=new f(e[t(839)](),e[t(839)]()),this[t(353)][1]=new f(e.readUint16(),e.readUint16()),this[t(353)][2]=new f(e[t(839)](),e[t(839)]()),this.white_point=new f(e[t(839)](),e[t(839)]()),this[t(620)]=e[t(890)](),this[t(1420)]=e[t(890)]()})),h[s(568)](s(481),(function(e){var t=s;1==this[t(798)]?(this.creation_time=e.readUint64(),this.modification_time=e[t(1066)](),this.timescale=e[t(890)](),this[t(1173)]=e[t(1066)]()):(this[t(1270)]=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e[t(890)](),this.duration=e.readUint32()),this[t(584)](e),e[t(839)]()})),h[s(568)](s(486),(function(e){var t=s;1&this.flags&&(this[t(798)]=1),1==this[t(798)]?this[t(1341)]=e[t(1066)]():this.fragment_duration=e[t(890)]()})),h[s(568)](s(1014),(function(e){var t=s;this[t(422)]=[],h[t(1151)][t(401)][t(555)][t(1370)](this,e)})),h[s(568)](s(537),(function(e){var t=s;this.sequence_number=e[t(890)]()})),h[s(568)](s(552),(function(e){var t=s;this[t(418)]=e[t(890)]()})),h[s(568)](s(250),(function(e){var t=s;this[t(546)]=e[t(270)]()})),h.createFullBoxCtor(s(539),(function(e){var t=s;1==this[t(798)]?(this[t(1270)]=e[t(1066)](),this[t(926)]=e[t(1066)](),this[t(605)]=e[t(890)](),this[t(1173)]=e[t(1066)]()):(this[t(1270)]=e[t(890)](),this[t(926)]=e[t(890)](),this.timescale=e[t(890)](),this[t(1173)]=e[t(890)]()),this.rate=e[t(890)](),this[t(263)]=e[t(839)]()>>8,e[t(839)](),e[t(1391)](2),this[t(582)]=e[t(1391)](9),e[t(1391)](6),this.next_track_id=e.readUint32()})),h[s(1395)]("npck",(function(e){var t=s;this[t(469)]=e[t(890)]()})),h[s(1395)](s(1233),(function(e){var t=s;this[t(469)]=e[t(1066)]()})),h.createFullBoxCtor(s(860),(function(e){var t=s,r=e[t(890)]();this.padbits=[];for(var n=0;n0){var r=e[t(890)]();this.kid=[];for(var n=0;n0&&(this.data=e.readUint8Array(i))})),h[s(568)]("clef",(function(e){var t=s;this[t(377)]=e[t(890)](),this.height=e[t(890)]()})),h.createFullBoxCtor(s(1010),(function(e){var t=s;this[t(377)]=e[t(890)](),this[t(272)]=e[t(890)]()})),h[s(568)]("prof",(function(e){var t=s;this[t(377)]=e[t(890)](),this[t(272)]=e[t(890)]()})),h[s(898)](s(1043),null,[s(1338),s(412),s(1010)]),h[s(1395)](s(1140),(function(e){var t=s;this[t(479)]=e.readString(4),this.sdptext=e[t(1209)](this[t(1301)]-this[t(327)]-4)})),h[s(568)]("saio",(function(e){var t=s;1&this[t(245)]&&(this[t(461)]=e[t(890)](),this[t(1071)]=e[t(890)]());var r=e[t(890)]();this[t(1064)]=[];for(var n=0;n>7,this[t(733)]=r>>6&1,this[t(1257)]&&(this.duration=e.readUint32()),this[t(733)]&&(this[t(1154)]=e[t(270)](),this[t(1252)]=e[t(839)](),this[t(1124)]=e.readUint16()),this[t(1258)]=[];for(var n=e[t(270)](),i=0;i>7,this.num_leading_samples=127&r})),h[s(1344)](s(1414),(function(e){var t=s;if(this.operation_point_count=e.readUint16(),this[t(1321)]!==2+(1===this.operation_point_count?2:6*this[t(982)])+9)this[t(1204)]=e[t(642)](this[t(1321)]-2);else{if(1===this[t(982)])this[t(1130)]=e[t(839)]();else{this[t(1130)]=[],this[t(662)]=[];for(var r=0;r>4,this[t(713)]=15&r,this[t(1303)]=e.readUint8(),this.Per_Sample_IV_Size=e[t(270)](),this[t(308)]=h.parseHex16(e),this[t(687)]=0,this[t(639)]=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this[t(687)]=e[t(270)](),this[t(639)]=e[t(642)](this[t(687)]))})),h[s(1344)](s(449),(function(e){})),h[s(1344)]("sync",(function(e){var t=s,r=e[t(270)]();this[t(230)]=63&r})),h[s(1344)]("tele",(function(e){var t=s,r=e[t(270)]();this[t(1128)]=r>>7})),h[s(1344)](s(366),(function(e){})),h.createSampleGroupCtor("tscl",(function(e){})),h[s(1344)](s(1242),(function(e){})),h.createFullBoxCtor(s(291),(function(e){var t=s;this[t(1207)]=e[t(1209)](4),1===this[t(798)]?this[t(525)]=e[t(890)]():this[t(525)]=0,this[t(834)]=[];for(var r=e.readUint32(),n=0;n>6,this[r(1421)][i]=t>>4&3,this[r(1159)][i]=t>>2&3,this[r(1196)][i]=3&t})),h[s(568)](s(802)),h[s(568)]("sgpd",(function(e){var t=s;this[t(1207)]=e.readString(4),o[t(962)](t(721),"Found Sample Groups of type "+this.grouping_type),1===this[t(798)]?this.default_length=e[t(890)]():this[t(432)]=0,this[t(798)]>=2&&(this[t(912)]=e[t(890)]()),this[t(834)]=[];for(var r=e.readUint32(),n=0;n>31&1,i[t(231)]=2147483647&o,i.subsegment_duration=e[t(890)](),o=e[t(890)](),i[t(451)]=o>>31&1,i[t(1131)]=o>>28&7,i[t(208)]=268435455&o}})),h[s(939)]=function(e,t,r,n){var i=s;h[i(304)].call(this,e,t),this[i(327)]=r,this[i(949)]=n},h[s(939)][s(401)]=new(h[s(304)]),h.SingleItemTypeReferenceBox[s(401)][s(555)]=function(e){var t=s;this[t(686)]=e[t(839)]();var r=e[t(839)]();this[t(212)]=[];for(var n=0;n>4&15,this[n(1381)][t+1]=15&i}else if(8===this[n(1201)])for(t=0;t0)for(r=0;r>4&15,this[t(576)]=15&r}this[t(1284)]=e[t(270)](),this[t(251)]=e[t(270)](),this[t(998)]=h[t(1143)](e),1===this[t(1284)]&&0===this[t(251)]&&(this.default_constant_IV_size=e[t(270)](),this[t(650)]=e.readUint8Array(this[t(468)]))})),h[s(568)](s(1361),(function(e){var t=s;1==this[t(798)]?this[t(331)]=e[t(1066)]():this.baseMediaDecodeTime=e[t(890)]()})),h[s(568)](s(1360),(function(e){var t=s,r=0;this[t(925)]=e[t(890)](),this[t(1301)]-this[t(327)]>r&&this[t(245)]&h[t(1307)]?(this[t(613)]=e.readUint64(),r+=8):this.base_data_offset=0,this.size-this[t(327)]>r&&this[t(245)]&h.TFHD_FLAG_SAMPLE_DESC?(this[t(1103)]=e[t(890)](),r+=4):this[t(1103)]=0,this[t(1301)]-this[t(327)]>r&&this.flags&h[t(992)]?(this[t(376)]=e[t(890)](),r+=4):this[t(376)]=0,this.size-this.hdr_size>r&&this[t(245)]&h.TFHD_FLAG_SAMPLE_SIZE?(this[t(895)]=e[t(890)](),r+=4):this[t(895)]=0,this[t(1301)]-this[t(327)]>r&&this.flags&h[t(823)]?(this.default_sample_flags=e.readUint32(),r+=4):this[t(1152)]=0})),h.createFullBoxCtor(s(309),(function(e){var t=s;this.track_ID=e.readUint32(),e[t(995)]();var r=e[t(270)]();this[t(964)]=r>>4&3,this[t(1293)]=r>>2&3,this[t(921)]=3&r,this.entries=[];for(var n=e[t(890)](),i=0;i>8,e[t(839)](),this[t(582)]=e[t(314)](9),this[t(377)]=e[t(890)](),this.height=e[t(890)]()})),h[s(1395)]("tmax",(function(e){var t=s;this[t(793)]=e[t(890)]()})),h[s(1395)]("tmin",(function(e){var t=s;this.time=e[t(890)]()})),h[s(1395)](s(1251),(function(e){var t=s;this[t(748)]=e[t(890)]()})),h[s(1395)](s(678),(function(e){var t=s;this.bytessent=e[t(890)]()})),h[s(1395)](s(638),(function(e){this[s(748)]=e.readUint64()})),h.TrackGroupTypeBox[s(401)][s(555)]=function(e){var t=s;this.parseFullHeader(e),this[t(1038)]=e[t(890)]()},h[s(336)](s(1013)),h[s(994)]=function(e,t,r,n){var i=s;h[i(304)][i(1370)](this,e,t),this[i(327)]=r,this[i(949)]=n},h.TrackReferenceTypeBox[s(401)]=new(h[s(304)]),h.TrackReferenceTypeBox[s(401)][s(555)]=function(e){var t=s;this[t(915)]=e[t(1391)]((this[t(1301)]-this.hdr_size)/4)},h[s(1082)][s(401)][s(555)]=function(e){for(var t,r,n=s;e[n(232)]()r&&this[t(245)]&h[t(506)]?(this[t(630)]=e[t(1297)](),r+=4):this[t(630)]=0,this[t(1301)]-this.hdr_size>r&&this[t(245)]&h[t(598)]?(this[t(1305)]=e[t(890)](),r+=4):this[t(1305)]=0,this[t(1404)]=[],this[t(931)]=[],this[t(927)]=[],this[t(343)]=[],this.size-this[t(327)]>r)for(var n=0;n>7&1,this.block_pad_lsb=n>>6&1,this[r(460)]=n>>5&1,this[r(1167)]=n>>4&1,this[r(1244)]=n>>3&1,this[r(899)]=e.readUint32(),this[r(1102)]=e[r(890)](),this[r(497)]=e[r(890)](),this[r(488)]=e[r(890)](),this[r(1127)]=e[r(890)]()}})),h.createFullBoxCtor("url ",(function(e){var t=s;1!==this[t(245)]&&(this.location=e[t(548)]())})),h[s(568)]("urn ",(function(e){var t=s;this[t(1339)]=e.readCString(),this[t(1301)]-this[t(327)]-this.name.length-1>0&&(this[t(375)]=e[t(548)]())})),h[s(862)](s(728),!0,!1,(function(e){var t=s;this[t(1068)]=e[t(1209)](this.size-this[t(327)])[t(769)](/&/g,t(258))[t(769)](//g,t(218))[t(769)](/"/g,""")[t(769)](/'/g,t(316))})),h[s(862)](s(668),!0,!1,(function(e){var t=s;this[t(667)]=h[t(1143)](e);var r=e.readUint32();r>0&&(this.data=e[t(642)](r))})),h[s(862)](s(244),!0,!1),h[s(862)]("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){var t=s;this[t(1343)]=e.readUint24(),this[t(847)]=e.readUint8(),this[t(998)]=h[t(1143)](e)})),h.createUUIDBox(s(279),!0,!1,(function(e){var t=s;this.fragment_count=e[t(270)](),this[t(834)]=[];for(var r=0;r>4,this[r(1387)]=t>>1&7,this.videoFullRangeFlag=1&t,this[r(1265)]=e[r(270)](),this.transferCharacteristics=e.readUint8(),this[r(369)]=e[r(270)](),this[r(875)]=e[r(839)](),this[r(570)]=e[r(642)](this[r(875)])):(this[r(360)]=e[r(270)](),this[r(222)]=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this[r(1179)]=15&t,t=e[r(270)](),this[r(1387)]=t>>4&15,this.transferFunction=t>>1&7,this[r(589)]=1&t,this[r(875)]=e[r(839)](),this[r(570)]=e[r(642)](this.codecIntializationDataSize))})),h[s(1395)](s(464),(function(e){var t=s;this[t(380)]=e[t(1209)](this.size-this.hdr_size)})),h[s(568)]("vvcC",(function(e){var t,r,n=s,i={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){var t=Ao;this.held_bits=e[t(270)](),this[t(574)]=8},stream_read_2_bytes:function(e){var t=Ao;this[t(872)]=e[t(839)](),this[t(574)]=16},extract_bits:function(e){var t=Ao,r=this.held_bits>>this[t(574)]-e&(1<1){for(i[n(583)](e),this[n(720)]=0,r=this[n(368)]-2;r>=0;--r){var c=i[n(510)](1);this[n(720)]|=c<1;++r)i[n(510)](1);for(this[n(1235)]=[],r=this[n(368)]-2;r>=0;--r)this[n(720)]&1<>=1;r+=h[t(276)](i,0),r+=".",0===this.hvcC.general_tier_flag?r+="L":r+="H",r+=this[t(1138)][t(1202)];var o=!1,a="";for(e=5;e>=0;e--)(this[t(1138)][t(1189)][e]||o)&&(a="."+h.decimalToHex(this.hvcC[t(1189)][e],0)+a,o=!0);r+=a}return r},h.vvc1SampleEntry.prototype[s(870)]=h.vvi1SampleEntry.prototype[s(870)]=function(){var e,t=s,r=h[t(810)].prototype[t(870)][t(1370)](this);if(this[t(1410)]){r+="."+this[t(1410)].general_profile_idc,this.vvcC.general_tier_flag?r+=".H":r+=".L",r+=this[t(1410)][t(1202)];var n="";if(this[t(1410)][t(701)]){var i,o=[],a=0;for(a|=this[t(1410)][t(203)]<<7,a|=this[t(1410)][t(859)]<<6,e=0;e>2&63,o[t(1122)](a),a&&(i=e),a=this[t(1410)].general_constraint_info[e]>>2&3;if(void 0===i)n=t(275);else{n=".C";var c=t(288),u=0,l=0;for(e=0;e<=i;++e)for(u=u<<8|o[e],l+=8;l>=5;){n+=c[u>>l-5&31],u&=(1<<(l-=5))-1}l&&(n+=c[31&(u<<=5-l)])}}r+=n}return r},h[s(1329)][s(401)][s(870)]=function(){var e=s,t=h.SampleEntry[e(401)].getCodec[e(1370)](this);if(this.esds&&this[e(654)][e(317)]){var r=this.esds.esd.getOTI(),n=this[e(654)].esd[e(1273)]();return t+"."+h[e(276)](r)+(n?"."+n:"")}return t},h[s(604)][s(401)][s(870)]=function(){var e=s,t=h[e(810)][e(401)][e(870)][e(1370)](this);return this[e(973)]?t+"."+this[e(973)]:t},h.vp08SampleEntry[s(401)][s(870)]=h[s(744)][s(401)][s(870)]=function(){var e=s,t=h[e(810)].prototype[e(870)][e(1370)](this),r=this[e(696)][e(222)];0==r&&(r="00");var n=this[e(696)].bitDepth;return 8==n&&(n="08"),t+".0"+this[e(696)][e(360)]+"."+r+"."+n},h[s(457)][s(401)].getCodec=function(){var e,t=s,r=h[t(810)][t(401)].getCodec[t(1370)](this),n=this[t(352)].seq_level_idx_0;return n<10&&(n="0"+n),2===this[t(352)][t(341)]&&1===this.av1C[t(622)]?e=1===this[t(352)][t(910)]?"12":"10":this[t(352)][t(341)]<=2&&(e=1===this[t(352)][t(622)]?"10":"08"),r+"."+this[t(352)][t(341)]+"."+n+(this[t(352)][t(1266)]?"H":"M")+"."+e},h[s(304)].prototype[s(559)]=function(e,t){var r=s;this.size+=8,this[r(1301)]>u&&(this[r(1301)]+=8),this.type===r(1054)&&(this[r(1301)]+=16),o[r(962)](r(594),r(1028)+this[r(364)]+r(758)+this[r(1301)]+r(235)+e[r(232)]()+(t||"")),this[r(1301)]>u?e.writeUint32(1):(this[r(569)]=e.getPosition(),e[r(932)](this[r(1301)])),e.writeString(this[r(364)],null,4),this.type===r(1054)&&e[r(1295)](this[r(1054)]),this[r(1301)]>u&&e[r(351)](this[r(1301)])},h[s(379)].prototype[s(559)]=function(e){var t=s;this[t(1301)]+=4,h[t(304)][t(401)].writeHeader[t(1370)](this,e,t(202)+this[t(798)]+t(547)+this[t(245)]),e[t(727)](this[t(798)]),e[t(676)](this[t(245)])},h[s(304)].prototype.write=function(e){var t=s;"mdat"===this[t(364)]?this[t(1204)]&&(this[t(1301)]=this.data[t(381)],this[t(559)](e),e[t(1295)](this[t(1204)])):(this[t(1301)]=this.data?this.data[t(381)]:0,this[t(559)](e),this[t(1204)]&&e.writeUint8Array(this.data))},h[s(1151)][s(401)][s(243)]=function(e){var t=s;this.size=0,this[t(559)](e);for(var r=0;r=2&&e[n(932)](this[n(1103)]),e[n(932)](this[n(834)][n(381)]),t=0;t0)for(t=0;t+1r?1:0,this[t(245)]=0,this[t(1301)]=4,1===this[t(798)]&&(this[t(1301)]+=4),this.writeHeader(e),1===this.version?e[t(351)](this.baseMediaDecodeTime):e[t(932)](this.baseMediaDecodeTime)},h.tfhdBox[s(401)][s(243)]=function(e){var t=s;this[t(798)]=0,this[t(1301)]=4,this[t(245)]&h[t(1307)]&&(this[t(1301)]+=8),this.flags&h[t(953)]&&(this[t(1301)]+=4),this[t(245)]&h[t(992)]&&(this[t(1301)]+=4),this[t(245)]&h[t(735)]&&(this.size+=4),this[t(245)]&h[t(823)]&&(this[t(1301)]+=4),this.writeHeader(e),e[t(932)](this[t(925)]),this[t(245)]&h[t(1307)]&&e.writeUint64(this[t(613)]),this[t(245)]&h.TFHD_FLAG_SAMPLE_DESC&&e[t(932)](this[t(1103)]),this[t(245)]&h[t(992)]&&e[t(932)](this.default_sample_duration),this[t(245)]&h[t(735)]&&e[t(932)](this[t(895)]),this.flags&h[t(823)]&&e[t(932)](this.default_sample_flags)},h[s(467)].prototype.write=function(e){var t=s;this.version=0,this.size=80,this[t(559)](e),e[t(932)](this.creation_time),e[t(932)](this[t(926)]),e[t(932)](this[t(925)]),e.writeUint32(0),e[t(932)](this[t(1173)]),e.writeUint32(0),e[t(932)](0),e[t(1238)](this[t(1411)]),e[t(1238)](this[t(600)]),e[t(1238)](this[t(263)]<<8),e[t(603)](0),e.writeInt32Array(this.matrix),e[t(932)](this[t(377)]),e[t(932)](this[t(272)])},h[s(1364)].prototype[s(243)]=function(e){var t=s;this.version=0,this.flags=0,this[t(1301)]=20,this[t(559)](e),e[t(932)](this[t(925)]),e[t(932)](this[t(1103)]),e[t(932)](this[t(376)]),e[t(932)](this[t(895)]),e.writeUint32(this[t(1152)])},h.trunBox.prototype[s(243)]=function(e){var t=s;this[t(798)]=0,this.size=4,this[t(245)]&h[t(506)]&&(this[t(1301)]+=4),this[t(245)]&h[t(598)]&&(this[t(1301)]+=4),this.flags&h[t(1069)]&&(this[t(1301)]+=4*this.sample_duration[t(381)]),this[t(245)]&h[t(740)]&&(this.size+=4*this[t(931)][t(381)]),this[t(245)]&h[t(863)]&&(this[t(1301)]+=4*this[t(927)][t(381)]),this[t(245)]&h[t(283)]&&(this[t(1301)]+=4*this[t(343)].length),this[t(559)](e),e[t(932)](this[t(1291)]),this[t(245)]&h[t(506)]&&(this[t(315)]=e[t(232)](),e[t(641)](this[t(630)])),this.flags&h[t(598)]&&e[t(932)](this[t(1305)]);for(var r=0;r-1||e[r]instanceof h[n(304)]||t[r]instanceof h.Box||typeof e[r]===n(1389)||typeof t[r]===n(1389)||typeof e[r]===n(1306)||typeof t[r]===n(1306)||e[n(1255)]&&e[n(1255)][n(1327)](r[n(737)](0,4))>-1||t[n(1255)]&&t.subBoxNames[n(1327)](r[n(737)](0,4))>-1||r===n(1204)||"start"===r||r===n(1301)||r===n(1270)||"modification_time"===r||h[n(1396)][n(1327)](r)>-1||e[r]===t[r]))return!1;return!0},h[s(508)]=function(e,t){var r=s;if(!h.boxEqualFields(e,t))return!1;for(var n=0;n=t?e:new Array(t-e[n(381)]+1)[n(1229)](r)+e}function o(e){var t=Ao,r=Math[t(1086)](e/3600),n=Math[t(1086)]((e-3600*r)/60),s=Math.floor(e-3600*r-60*n),o=Math[t(1086)](1e3*(e-3600*r-60*n-s));return i(r,2)+":"+i(n,2)+":"+i(s,2)+"."+i(o,3)}for(var a=this[n(805)](r),c="",u=0;u1)for(t=1;t-1&&this[t(1083)][t(901)](r,1)},g.prototype[s(997)]=function(e,t,r){var n=s,i=this.getTrackById(e);if(i){var o={};this[n(652)][n(1122)](o),o.id=e,o[n(450)]=t,o[n(409)]=i,i[n(590)]=0,o.nb_samples=1e3,o[n(356)]=[],r&&r[n(1040)]&&(o[n(387)]=r[n(1040)])}},g.prototype.unsetExtractionOptions=function(e){for(var t=s,r=-1,n=0;n-1&&this[t(652)][t(901)](r,1)},g.prototype[s(555)]=function(){var e,t,r=s;if(!this[r(1134)]||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this[r(1369)]()){if(this.processIncompleteMdat())continue;return}if(this[r(319)]&&this[r(319)](),(e=h[r(1324)](this[r(563)],false)).code===h[r(1078)]){if(this[r(478)]){if(this.processIncompleteBox(e))continue;return}return}var n;switch(n=(t=e[r(1016)])[r(364)]!==r(1054)?t[r(364)]:t[r(1054)],this[r(422)][r(1122)](t),n){case r(718):this[r(526)][r(1122)](t);break;case r(983):this[r(247)][r(1122)](t);break;case r(618):this.moovStartFound=!0,0===this[r(526)][r(381)]&&(this[r(780)]=!0);default:this[n],this[n]=t}this[r(475)]&&this[r(475)](t,e)}},g.prototype[s(611)]=function(e){var t=s;if(null==e)throw"Buffer must be defined and non empty";if(void 0===e[t(233)])throw"Buffer must have a fileStart property";return 0===e[t(1037)]?(this[t(563)][t(746)](),!1):(e[t(849)]=0,this[t(563)][t(934)](e),this[t(563)][t(746)](),!!this.stream[t(354)]())},g.prototype[s(1315)]=function(e,t){var r,n=s;if(this[n(611)](e))return this[n(555)](),this.moovStartFound&&!this.moovStartSent&&(this[n(573)]=!0,this.onMoovStart&&this[n(723)]()),this.moov?(!this.sampleListBuilt&&(this.buildSampleLists(),this[n(741)]=!0),this[n(888)](),this.onReady&&!this[n(430)]&&(this[n(430)]=!0,this[n(480)](this[n(1e3)]())),this.processSamples(t),this[n(1121)]?(r=this.nextSeekPosition,this[n(1121)]=void 0):r=this[n(762)],this[n(563)].getEndFilePositionAfter&&(r=this[n(563)].getEndFilePositionAfter(r))):r=this[n(762)]?this.nextParsePosition:0,this[n(1390)]&&this[n(854)]&&!this[n(879)]&&(this[n(854)](this[n(1390)]),this[n(879)]=!0),this.meta&&(this[n(1425)]&&!this[n(1212)]&&(this[n(1425)](),this.itemListBuilt=!0),this[n(1225)]&&this[n(1225)](this[n(694)])),this[n(563)][n(692)]&&(this.stream[n(746)](),this[n(563)][n(692)](),this[n(563)].logBufferLevel(!0)),r},g[s(401)][s(1e3)]=function(){var e,t,r,n,i,o,a=s,c={},u=new Date(a(947))[a(578)]();if(this[a(618)])for(c[a(1184)]=!0,c[a(1173)]=this[a(618)].mvhd[a(1173)],c[a(605)]=this[a(618)].mvhd[a(605)],c.isFragmented=null!=this[a(618)][a(1198)],c[a(1385)]&&this[a(618)][a(1198)].mehd&&(c[a(1341)]=this[a(618)].mvex.mehd.fragment_duration),c[a(780)]=this[a(780)],c[a(1400)]=null!=this.moov[a(978)],c[a(647)]=[],c[a(647)].push(this.ftyp[a(300)]),c.brands=c[a(647)][a(545)](this[a(194)].compatible_brands),c[a(675)]=new Date(u+1e3*this[a(618)].mvhd[a(1270)]),c[a(1263)]=new Date(u+1e3*this[a(618)][a(539)][a(926)]),c.tracks=[],c[a(765)]=[],c[a(1120)]=[],c.subtitleTracks=[],c[a(1269)]=[],c.hintTracks=[],c[a(674)]=[],e=0;e0?c[a(877)]+=a(256):c[a(765)]&&c[a(765)].length>0?c[a(877)]+='audio/mp4; codecs="':c[a(877)]+=a(1289),e=0;e=r[n(356)][n(381)])&&(this.onSegment&&this.onSegment(i.id,i.user,i[n(511)].buffer,r[n(590)],e||r.nextSample>=r[n(356)][n(381)]),i[n(511)]=null,i!==this[n(1083)][t]))break}}if(null!==this[n(781)])for(t=0;t=r[n(356)].length)&&(o.debug("ISOFile","Sending samples on track #"+c.id+n(408)+r[n(590)]),this[n(781)]&&this.onSamples(c.id,c.user,c[n(356)]),c[n(356)]=[],c!==this[n(652)][t]))break}}}},g[s(401)][s(295)]=function(e){var t=s,r=this[t(1262)](e,!0);return r[t(381)]?r[0]:null},g.prototype[s(1262)]=function(e,t){var r=[];return g._sweep[s(1370)](this,e,r,t),r},g._sweep=function(e,t,r){var n=s;for(var i in this[n(364)]&&this.type==e&&t[n(1122)](this),this[n(422)]){if(t[n(381)]&&r)return;g._sweep[n(1370)](this[n(422)][i],e,t,r)}},g.prototype[s(1231)]=function(e){var t=s,r=this[t(252)](e);return r?r[t(356)]:void 0},g[s(401)][s(681)]=function(e,t){var r=s,n=this[r(252)](e);return this[r(1160)](n,t)},g.prototype[s(1192)]=function(e,t,r){var n=s,i=this[n(252)](e);i[n(764)]||(i[n(764)]=0);for(var o=i[n(764)];oe*i.timescale){u=n-1;break}t&&i[a(649)]&&(c=n)}for(t&&(u=c),e=r[a(356)][u][a(629)],r[a(590)]=u;r[a(356)][u][a(757)]===r[a(356)][u][a(1301)]&&r[a(356)][u+1];)u++;return{offset:r.samples[u][a(1064)]+r[a(356)][u][a(757)],time:e/o}},g[s(401)].getTrackDuration=function(e){var t,r=s;return e[r(356)]?((t=e.samples[e[r(356)][r(381)]-1])[r(629)]+t.duration)/t.timescale:1/0},g.prototype.seek=function(e,t){var r,n,i,o=s,a=this[o(618)],c={offset:1/0,time:1/0};if(this[o(618)]){for(i=0;ithis[o(1379)](r)||((n=this[o(571)](e,t,r))[o(1064)]-1){u=l;break}switch(u){case t(1022):if(o[t(373)](t(1074))[t(1403)]("graphicsmode",0)[t(1403)](t(382),[0,0,0]),c.set(t(377),r.width)[t(1403)](t(272),r[t(272)]).set("horizresolution",72<<16).set("vertresolution",72<<16)[t(1403)](t(521),1)[t(1403)](t(551),r.type+t(900))[t(1403)](t(365),24),r[t(822)]){var p=new(h[t(425)]);p[t(555)](new a(r.avcDecoderConfigRecord)),c[t(655)](p)}else if(r.hevcDecoderConfigRecord){var m=new h.hvcCBox;m[t(555)](new a(r.hevcDecoderConfigRecord)),c[t(655)](m)}break;case t(489):o.add(t(248))[t(1403)](t(1408),r[t(1408)]||0),c[t(1403)]("channel_count",r[t(602)]||2)[t(1403)]("samplesize",r.samplesize||16)[t(1403)]("samplerate",r[t(807)]||65536);break;case t(264):o.add("hmhd");break;case"Subtitle":if(o[t(373)](t(710)),"stpp"===r[t(364)])c[t(1403)]("namespace",r[t(1123)]||t(1158))[t(1403)](t(472),r[t(472)]||"")[t(1403)]("auxiliary_mime_types",r[t(567)]||"");break;case"Metadata":o.add("nmhd");break;case t(482):o.add(t(416));break;default:o[t(373)](t(416))}r[t(1164)]&&c[t(655)](r[t(1164)]),r[t(1108)]&&r[t(1108)][t(1277)]((function(e){c[t(655)](e)})),o[t(373)](t(200))[t(373)]("dref")[t(1029)]((new(h[t(361)]))[t(1403)]("flags",1));var v=o[t(373)](t(1268));return v[t(373)](t(1089))[t(1029)](c),v[t(373)](t(518))[t(1403)](t(1088),[])[t(1403)]("sample_deltas",[]),v.add("stsc")[t(1403)](t(1322),[])[t(1403)](t(1039),[]).set(t(474),[]),v[t(373)](t(1386)).set("chunk_offsets",[]),v[t(373)](t(410))[t(1403)](t(1381),[]),this[t(618)][t(1198)][t(373)]("trex")[t(1403)](t(925),r.id)[t(1403)](t(1103),r.default_sample_description_index||1)[t(1403)]("default_sample_duration",r.default_sample_duration||0).set(t(895),r[t(895)]||0)[t(1403)]("default_sample_flags",r[t(1152)]||0),this[t(405)](n),r.id}},h[s(304)][s(401)][s(704)]=function(e){var t=s,r=e||new c;r[t(302)]=c[t(535)],this.write(r)},g.prototype[s(221)]=function(e,t,r){var n=s,i=r||{},o={},a=this.getTrackById(e);if(null!==a){o[n(1157)]=a[n(356)][n(381)],o[n(925)]=a[n(820)][n(925)],o.timescale=a[n(296)][n(481)].timescale,o[n(195)]=i.sample_description_index?i.sample_description_index-1:0,o[n(1164)]=a.mdia[n(1234)][n(1268)][n(1089)][n(834)][o[n(195)]],o[n(1204)]=t,o[n(1301)]=t.byteLength,o.alreadyRead=o.size,o[n(1173)]=i.duration||1,o.cts=i[n(629)]||0,o[n(695)]=i.dts||0,o[n(649)]=i[n(649)]||!1,o[n(301)]=i[n(301)]||0,o[n(747)]=i[n(747)]||0,o[n(616)]=i[n(616)]||0,o[n(1345)]=i[n(1345)]||0,o[n(1036)]=i[n(1036)]||0,o.offset=0,o.subsamples=i[n(919)],a[n(356)].push(o),a[n(1042)]+=o[n(1301)],a.samples_duration+=o[n(1173)],void 0===a[n(1374)]&&(a.first_dts=i[n(695)]),this[n(869)]();var c=this[n(1378)](o);return this[n(655)](c),c[n(704)](),c.trafs[0].truns[0][n(630)]=c[n(1301)]+8,this.add("mdat")[n(1204)]=new Uint8Array(t),o}},g.prototype[s(1378)]=function(e){var t=s,r=0;r=e[t(649)]?1<<25:65536;var n=new(h[t(763)]);n[t(373)]("mfhd")[t(1403)]("sequence_number",this.nextMoofNumber),this[t(705)]++;var i=n[t(373)](t(1220)),o=this.getTrackById(e[t(925)]);return i[t(373)](t(1360)).set(t(925),e.track_id)[t(1403)](t(245),h.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),i[t(373)](t(1361))[t(1403)]("baseMediaDecodeTime",e[t(695)]-(o[t(1374)]||0)),i[t(373)]("trun")[t(1403)]("flags",h[t(506)]|h[t(1069)]|h[t(740)]|h[t(863)]|h[t(283)])[t(1403)]("data_offset",0).set(t(1305),0)[t(1403)](t(1291),1)[t(1403)](t(1404),[e.duration])[t(1403)](t(931),[e[t(1301)]]).set(t(927),[r])[t(1403)]("sample_composition_time_offset",[e[t(629)]-e[t(695)]]),n},g[s(401)].lastMoofIndex=0,g.prototype[s(529)]=0,g[s(401)][s(1175)]=function(){var e,t,r,n,i,o,a=s;for(this[a(1007)]=this[a(618)][a(539)].duration,this[a(618)][a(539)].duration=0,e=0;e=2&&(u=i[a][l(1207)]+"/0",(c=new d(i[a][l(1207)],0)).is_fragment=!0,!t.sample_groups_info[u]&&(t.sample_groups_info[u]=c))}else for(a=0;a=2&&(u=n[a][l(1207)]+"/0",c=new d(n[a][l(1207)],0),!e[l(1096)][u]&&(e[l(1096)][u]=c))},g.setSampleGroupProperties=function(e,t,r,n){var i,o,a=s;for(i in t[a(970)]=[],n){var c;if(t[a(970)][i]={},t[a(970)][i].grouping_type=n[i][a(1207)],t[a(970)][i].grouping_type_parameter=n[i][a(525)],r>=n[i][a(236)]&&(n[i][a(236)]<0&&(n[i][a(236)]=0),n[i][a(785)]++,n[i][a(785)]<=n[i].sbgp[a(834)][a(381)]-1&&(n[i].last_sample_in_run+=n[i].sbgp[a(834)][n[i].entry_index][a(1291)])),n[i][a(785)]<=n[i][a(291)][a(834)][a(381)]-1?t[a(970)][i].group_description_index=n[i][a(291)][a(834)][n[i][a(785)]][a(274)]:t[a(970)][i][a(274)]=-1,0!==t[a(970)][i][a(274)])c=n[i][a(1077)]?n[i][a(1077)]:n[i][a(1164)],t.sample_groups[i].group_description_index>0?(o=t.sample_groups[i].group_description_index>65535?(t[a(970)][i].group_description_index>>16)-1:t[a(970)][i].group_description_index-1,c&&o>=0&&(t[a(970)][i].description=c[a(834)][o])):c&&c[a(798)]>=2&&c[a(912)]>0&&(t[a(970)][i][a(1164)]=c[a(834)][c[a(912)]-1])}},g.process_sdtp=function(e,t,r){var n=s;t&&(e?(t.is_leading=e[n(301)][r],t.depends_on=e[n(1421)][r],t[n(616)]=e[n(1159)][r],t[n(1345)]=e[n(1196)][r]):(t.is_leading=0,t[n(747)]=0,t[n(616)]=0,t[n(1345)]=0))},g.prototype[s(1190)]=function(){var e,t,r=s;for(e=0;eb&&(w++,b<0&&(b=0),b+=o[C(1088)][w]),t>0?(e[C(356)][t-1][C(1173)]=o.sample_deltas[w],e[C(1109)]+=e[C(356)][t-1][C(1173)],T[C(695)]=e[C(356)][t-1][C(695)]+e.samples[t-1][C(1173)]):T.dts=0,a?(t>=S&&(E++,S<0&&(S=0),S+=a[C(1088)][E]),T.cts=e[C(356)][t][C(695)]+a[C(1406)][E]):T[C(629)]=T.dts,c?(t==c[C(864)][k]-1?(T[C(649)]=!0,k++):(T.is_sync=!1,T[C(1036)]=0),l&&l.entries[I][C(1199)]+A==t+1&&(T[C(919)]=l[C(834)][I][C(919)],A+=l[C(834)][I].sample_delta,I++)):T[C(649)]=!0,g.process_sdtp(e[C(296)][C(1234)][C(1268)][C(1319)],T,T[C(1157)]),f?T.degradation_priority=f[C(632)][t]:T[C(1036)]=0,l&&l.entries[I][C(1199)]+A==t&&(T[C(919)]=l[C(834)][I][C(919)],A+=l[C(834)][I].sample_delta),(d[C(381)]>0||h.length>0)&&g[C(969)](e,T,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math[C(1146)](e[C(296)].mdhd[C(1173)]-e[C(356)][t-1][C(695)],0),e[C(1109)]+=e.samples[t-1].duration)}},g.prototype[s(888)]=function(){var e,t,r,n,i,o,a,c,u,l,d,f,p,m,v,y=s;if(void 0!==this.moov)for(;this[y(328)]0&&g[y(1376)](f,d,d[y(767)],f[y(296)].minf.stbl[y(1099)],d.sgpds),t=0;t0?m[y(695)]=f.samples[f[y(356)][y(381)]-2][y(695)]+f[y(356)][f[y(356)][y(381)]-2][y(1173)]:(d[y(1361)]?m[y(695)]=d.tfdt[y(331)]:m[y(695)]=0,f[y(260)]=!0),m.cts=m[y(695)],_[y(245)]&h.TRUN_FLAGS_CTS_OFFSET&&(m[y(629)]=m[y(695)]+_.sample_composition_time_offset[r]),v=a,_[y(245)]&h.TRUN_FLAGS_FLAGS?v=_[y(927)][r]:0===r&&_.flags&h[y(598)]&&(v=_[y(1305)]),m[y(649)]=!(v>>16&1),m[y(301)]=v>>26&3,m.depends_on=v>>24&3,m.is_depended_on=v>>22&3,m[y(1345)]=v>>20&3,m[y(1036)]=65535&v;var b=!!(d.tfhd[y(245)]&h[y(1307)]),w=!!(d[y(1360)][y(245)]&h[y(1392)]),S=!!(_[y(245)]&h[y(506)]),E=0;E=b?d.tfhd[y(613)]:w||0===t?l[y(949)]:c,0===t&&0===r?S?m[y(1064)]=E+_[y(630)]:m.offset=E:m[y(1064)]=c,c=m[y(1064)]+m[y(1301)],(d[y(767)][y(381)]>0||d[y(1099)].length>0||f[y(296)][y(1234)][y(1268)].sbgps[y(381)]>0||f[y(296)][y(1234)][y(1268)][y(1099)][y(381)]>0)&&g[y(969)](f,m,m[y(1216)],d[y(1096)])}}if(d.subs){f[y(935)]=!0;var k=d[y(811)];for(t=0;t-1))return null;var u=(r=this[n(563)][n(991)][a])[n(1037)]-(i[n(1064)]+i[n(757)]-r[n(233)]);if(i[n(1301)]-i[n(757)]<=u)return o[n(962)](n(453),"Getting sample #"+t+n(663)+i[n(757)]+n(945)+(i[n(1064)]+i[n(757)]-r[n(233)])+n(966)+(i[n(1301)]-i[n(757)])+n(284)+i.size+")"),c.memcpy(i.data.buffer,i.alreadyRead,r,i[n(1064)]+i[n(757)]-r[n(233)],i.size-i[n(757)]),r[n(849)]+=i[n(1301)]-i[n(757)],this.stream[n(746)](),i[n(757)]=i[n(1301)],i;if(0===u)return null;o[n(962)]("ISOFile",n(761)+t+" partial data (alreadyRead: "+i[n(757)]+n(945)+(i.offset+i[n(757)]-r[n(233)])+n(966)+u+n(284)+i[n(1301)]+")"),c[n(712)](i[n(1204)].buffer,i[n(757)],r,i[n(1064)]+i[n(757)]-r[n(233)],u),i.alreadyRead+=u,r[n(849)]+=u,this[n(563)][n(746)]()}},g[s(401)][s(943)]=function(e,t){var r=s,n=e[r(356)][t];return n.data?(this.samplesDataSize-=n[r(1301)],n[r(1204)]=null,n[r(1164)]=null,delete n.degradation_priority,delete n.depends_on,delete n[r(195)],delete n[r(1345)],delete n[r(616)],delete n[r(301)],delete n[r(649)],delete n.moof_number,delete n[r(1216)],delete n[r(605)],delete n.cts,delete n[r(695)],delete n.offset,delete n.size,delete n.track_id,delete n.duration,n.alreadyRead=0,n[r(1301)]):0},g[s(401)][s(816)]=function(){return this[s(529)]},g[s(401)][s(981)]=function(){var e=s;const t=this[e(563)][e(991)]||[];let r=0;return t[e(1277)]((t=>{const n=t[e(1037)];r+=n})),r},g[s(401)][s(633)]=function(){var e,t=s,r="";for(e=0;e0&&(r+=","),r+=this[t(618)].traks[e].mdia[t(1234)].stbl[t(1089)][t(834)][0][t(870)]()}return r},g.prototype[s(975)]=function(e){var t,r=s;if(!this.moov||!this.moov[r(1198)])return null;for(t=0;t0&&(r[n(269)]=a[n(1279)][n(447)][a.iinf.item_infos[e][n(833)]-1]),a[n(818)][n(1186)][e].item_type?r.type=a[n(818)].item_infos[e][n(1132)]:r[n(364)]=n(877),r[n(790)]=a[n(818)][n(1186)][e].content_type,r[n(1177)]=a[n(818)].item_infos[e].content_encoding;if(a[n(806)])for(e=0;e0&&f.property_index-1-1))return null;var l=(t=this[n(563)][n(991)][u]).byteLength-(a[n(1064)]+a.alreadyRead-t.fileStart);if(!(a[n(381)]-a[n(757)]<=l))return o[n(962)](n(453),n(825)+e+n(768)+i+n(637)+a[n(757)]+n(945)+(a[n(1064)]+a[n(757)]-t[n(233)])+" read size: "+l+n(1056)+a[n(381)]+n(462)+r[n(1301)]+")"),c[n(712)](r[n(1204)][n(517)],r.alreadyRead,t,a[n(1064)]+a.alreadyRead-t[n(233)],l),a.alreadyRead+=l,r[n(757)]+=l,t[n(849)]+=l,this[n(563)][n(746)](),null;o.debug(n(453),n(825)+e+n(768)+i+n(663)+a[n(757)]+n(945)+(a[n(1064)]+a[n(757)]-t[n(233)])+n(966)+(a[n(381)]-a[n(757)])+" full extent size: "+a[n(381)]+" full item size: "+r.size+")"),c[n(712)](r[n(1204)][n(517)],r[n(757)],t,a[n(1064)]+a[n(757)]-t[n(233)],a[n(381)]-a.alreadyRead),t[n(849)]+=a[n(381)]-a[n(757)],this[n(563)].logBufferLevel(),r.alreadyRead+=a.length-a[n(757)],a.alreadyRead=a[n(381)]}}return r[n(757)]===r[n(1301)]?r:null},g.prototype[s(433)]=function(e){var t=s,r=this[t(1033)][e];if(r[t(1204)]){this[t(960)]-=r[t(1301)],r[t(1204)]=null,r.alreadyRead=0;for(var n=0;n0?this[i(618)][i(1349)][e][i(356)][0][i(1173)]:0),t[i(1122)](n)}return t},g[s(401)][s(940)]=function(){var e=s,t={};return t.moov=this[e(618)],this.moov&&this[e(618)][e(1349)]&&this[e(618)][e(1349)][e(381)]>1&&(t.moovAudioNum=this[e(618)][e(1349)][0][e(356)].length,t.moovVideoNum=this[e(618)][e(1349)][1].samples.length),t},h[s(304)][s(401)][s(1193)]=function(e){var t=s;this[t(1301)]+=8,this[t(1301)]>u&&(this.size+=8),"uuid"===this[t(364)]&&(this[t(1301)]+=16),e[t(255)](e[t(528)]+t(1111)+this[t(1301)]),e[t(255)](e[t(528)]+t(955)+this[t(364)])},h[s(379)].prototype[s(1193)]=function(e){var t=s;this[t(1301)]+=4,h[t(304)][t(401)][t(1193)][t(1370)](this,e),e[t(255)](e[t(528)]+t(1219)+this[t(798)]),e[t(255)](e[t(528)]+t(1169)+this[t(245)])},h[s(304)][s(401)].print=function(e){this[s(1193)](e)},h.ContainerBox.prototype.print=function(e){var t=s;this.printHeader(e);for(var r=0;r>8)),e[t(255)](e.indent+t(666)+this[t(582)].join(", ")),e[t(255)](e[t(528)]+t(855)+this[t(1156)])},h[s(467)].prototype[s(501)]=function(e){var t=s;h[t(379)][t(401)][t(1193)].call(this,e),e[t(255)](e[t(528)]+t(1228)+this.creation_time),e[t(255)](e.indent+t(1232)+this.modification_time),e.log(e[t(528)]+t(789)+this.track_id),e[t(255)](e[t(528)]+"duration: "+this[t(1173)]),e.log(e[t(528)]+t(1165)+(this[t(263)]>>8)),e[t(255)](e.indent+t(666)+this[t(582)][t(1229)](", ")),e.log(e[t(528)]+t(951)+this[t(1411)]),e[t(255)](e[t(528)]+t(846)+this[t(600)]),e[t(255)](e.indent+"width: "+this[t(377)]),e[t(255)](e.indent+t(984)+this[t(272)])};var _={};_[s(1316)]=function(e,t){var r=s,n=void 0===e||e,i=new g(t);return i[r(531)]=!n,i},s(333)!==s(1389)&&(t[s(1316)]=_[s(1316)])}));function Ao(e,t){var r=ko();return(Ao=function(e,t){return r[e-=194]})(e,t)}Io[Eo(1314)],Io[Eo(794)],Io.DataStream,Io[Eo(1335)],Io[Eo(249)],Io[Eo(721)],Io.XMLSubtitlein4Parser,Io[Eo(262)],Io[Eo(453)],Io.createFile;const Co=To;function To(e,t){const r=Bo();return(To=function(e,t){return r[e-=226]})(e,t)}function xo(e){return e[To(265)](((e,t)=>256*e+t))}function Do(e){const t=To,r=[101,103,119,99],n=e[t(254)]-28,i=e[t(234)](n,n+r[t(254)]);return r[t(233)](((e,t)=>e===i[t]))}!function(e,t){const r=To,n=e();for(;;)try{if(318080===-parseInt(r(256))/1*(parseInt(r(266))/2)+-parseInt(r(247))/3+parseInt(r(230))/4*(-parseInt(r(226))/5)+-parseInt(r(235))/6*(parseInt(r(250))/7)+-parseInt(r(241))/8+parseInt(r(258))/9+-parseInt(r(244))/10*(-parseInt(r(238))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Bo);Co(248),Co(255);function Bo(){const e=["map","length","transport","3HcXYrc","instance","46260sKTkyD","init","reverse","stack overflow","exports","Module","debugWarn","reduce","300552iCeUHL","player","catch","TransportDescrambler","905qbFrOw","debuglog","Instance","parse","13304AtjmbO","TAG_NAME","function","every","slice","4752OVaHCp","memory","wasm not supported","24424103hezmll","then","set","1381672kSxrWc","init error","byteLength","10uOOpwH","not support wasm","debugLog","1853214lIAccC","destroy","Memory","567gZtyvR","message","object"];return(Bo=function(){return e})()}function Po(){const e=Fo;for(var t=arguments[e(308)],r=new Array(t),n=0;n{const n=e,s=new i((0|t[n(305)])+(0|r[n(305)]));return s[n(312)](t,0),s[n(312)](r,0|t[n(305)]),s}),new i)}function Mo(){const e=["substr","reduce","234lHyMZx","1413hNPmMz","8848XGJlWN","constructor","28744XrSNpn","100621NYtlxW","4883448CmsvFr","byteLength","6853VyAKPf","5960EqlLXE","length","14940dGifBm","error","230ZAYxNB","set","replace","201425CONHlB","267gTdlIx"];return(Mo=function(){return e})()}function Fo(e,t){const r=Mo();return(Fo=function(e,t){return r[e-=300]})(e,t)}function Uo(){const e=["cbc","length","join","1075086PjWULa","fromCodePoint","none","push","slice","error","24060TFBzJp","array","includes","pkcs#5","splice","33mYBKrw","toString","codePointAt","pkcs#7","345544RtaSon","key is invalid","7605925NKZUvF","set","byteLength","substr","470kOBAsb","padding is invalid","map","string","8416614dmaBUH","arrayBuffer.length","146547rvsnxg","6475273ytyYKd","8yRSHgg"];return(Uo=function(){return e})()}!function(e,t){const r=Fo,n=e();for(;;)try{if(986981===-parseInt(r(303))/1+parseInt(r(309))/2*(-parseInt(r(315))/3)+-parseInt(r(300))/4*(-parseInt(r(311))/5)+-parseInt(r(318))/6*(-parseInt(r(314))/7)+-parseInt(r(302))/8*(-parseInt(r(319))/9)+-parseInt(r(307))/10*(-parseInt(r(306))/11)+-parseInt(r(304))/12)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Mo),function(e,t){const r=Wo,n=e();for(;;)try{if(779614===-parseInt(r(269))/1+parseInt(r(242))/2*(parseInt(r(247))/3)+-parseInt(r(251))/4+parseInt(r(253))/5+-parseInt(r(261))/6+parseInt(r(264))/7*(parseInt(r(265))/8)+-parseInt(r(263))/9*(-parseInt(r(257))/10))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Uo);const Ro=16,Lo=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],Oo=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function zo(e){const t=Wo,r=[];for(let n=0,i=e[t(267)];n{const r=t;return 1===(e=e[r(248)](16))[r(267)]?"0"+e:e}))[t(268)]("")}function Ho(e){const t=Wo,r=[];for(let n=0,i=e[t(267)];n>>6),r.push(128|63&i);else if(i<=55295||i>=57344&&i<=65535)r[t(239)](224|i>>>12),r.push(128|i>>>6&63),r[t(239)](128|63&i);else{if(!(i>=65536&&i<=1114111))throw r.push(i),new Error("input is not supported");n++,r[t(239)](240|i>>>18&28),r[t(239)](128|i>>>12&63),r[t(239)](128|i>>>6&63),r[t(239)](128|63&i)}}return r}function jo(e){const t=Wo,r=[];for(let n=0,i=e[t(267)];n=240&&e[n]<=247?(r[t(239)](String.fromCodePoint(((7&e[n])<<18)+((63&e[n+1])<<12)+((63&e[n+2])<<6)+(63&e[n+3]))),n+=3):e[n]>=224&&e[n]<=239?(r[t(239)](String[t(237)](((15&e[n])<<12)+((63&e[n+1])<<6)+(63&e[n+2]))),n+=2):e[n]>=192&&e[n]<=223?(r[t(239)](String.fromCodePoint(((31&e[n])<<6)+(63&e[n+1]))),n++):r.push(String[t(237)](e[n]));return r.join("")}function Vo(e,t){const r=31&t;return e<>>32-r}function Wo(e,t){const r=Uo();return(Wo=function(e,t){return r[e-=237]})(e,t)}function $o(e){return(255&Lo[e>>>24&255])<<24|(255&Lo[e>>>16&255])<<16|(255&Lo[e>>>8&255])<<8|255&Lo[255&e]}function Go(e){return e^Vo(e,2)^Vo(e,10)^Vo(e,18)^Vo(e,24)}function qo(e){return e^Vo(e,13)^Vo(e,23)}function Ko(e,t,r){const n=new Array(4),i=new Array(4);for(let t=0;t<4;t++)i[0]=255&e[4*t],i[1]=255&e[4*t+1],i[2]=255&e[4*t+2],i[3]=255&e[4*t+3],n[t]=i[0]<<24|i[1]<<16|i[2]<<8|i[3];for(let e,t=0;t<32;t+=4)e=n[1]^n[2]^n[3]^r[t+0],n[0]^=Go($o(e)),e=n[2]^n[3]^n[0]^r[t+1],n[1]^=Go($o(e)),e=n[3]^n[0]^n[1]^r[t+2],n[2]^=Go($o(e)),e=n[0]^n[1]^n[2]^r[t+3],n[3]^=Go($o(e));for(let e=0;e<16;e+=4)t[e]=n[3-e/4]>>>24&255,t[e+1]=n[3-e/4]>>>16&255,t[e+2]=n[3-e/4]>>>8&255,t[e+3]=255&n[3-e/4]}function Xo(e,t,r){const n=new Array(4),i=new Array(4);for(let t=0;t<4;t++)i[0]=255&e[0+4*t],i[1]=255&e[1+4*t],i[2]=255&e[2+4*t],i[3]=255&e[3+4*t],n[t]=i[0]<<24|i[1]<<16|i[2]<<8|i[3];n[0]^=2746333894,n[1]^=1453994832,n[2]^=1736282519,n[3]^=2993693404;for(let e,r=0;r<32;r+=4)e=n[1]^n[2]^n[3]^Oo[r+0],t[r+0]=n[0]^=qo($o(e)),e=n[2]^n[3]^n[0]^Oo[r+1],t[r+1]=n[1]^=qo($o(e)),e=n[3]^n[0]^n[1]^Oo[r+2],t[r+2]=n[2]^=qo($o(e)),e=n[0]^n[1]^n[2]^Oo[r+3],t[r+3]=n[3]^=qo($o(e));if(0===r)for(let e,r=0;r<16;r++)e=t[r],t[r]=t[31-r],t[31-r]=e}function Yo(e,t,r){const n=Wo;let{padding:i=n(250),mode:s,iv:o=[],output:a=n(260)}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(s===n(266)&&("string"==typeof o&&(o=zo(o)),16!==o[n(267)]))throw new Error("iv is invalid");if(typeof t===n(260)&&(t=zo(t)),16!==t.length)throw new Error(n(252));if(e=typeof e===n(260)?0!==r?Ho(e):zo(e):[...e],(i===n(245)||i===n(250))&&0!==r){const t=Ro-e.length%Ro;for(let r=0;r=Ro;){const t=e.slice(h,h+16),i=new Array(16);if(s===n(266))for(let e=0;e2&&void 0!==arguments[2]&&arguments[2],i=arguments[r(267)]>3&&void 0!==arguments[3]&&arguments[3];const s=e[r(255)];let o=new Uint8Array(e[r(240)](0,5)),a=5;for(;as){const t=new Uint8Array(o[r(267)]+e.length-a);t.set(o,0),t.set(e[r(240)](a),o.length),o=t;break}let l=e[a+4],d=!1,h=2;if(n?(i&&(h=3),l=l>>>1&63,d=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(l)):(l&=31,d=1===l||5===l),d){const n=Yo(e[r(240)](a+4+h,a+4+u),t,0,{padding:r(238),output:r(243)});let i=n[n[r(267)]-1];if(i>0&&i<16){let e=!0;for(let t=1;t<=i;t++)if(n[n[r(267)]-t]!==i){e=!1;break}e&&n[r(246)](n[r(267)]-i,i)}const s=new Uint8Array(h);s[r(254)](e[r(240)](a+4,a+4+h),0);const c=At(Po(s,new Uint8Array(n))),l=new Uint8Array(o[r(267)]+c.length);l.set(o,0),l[r(254)](c,o[r(267)]),o=l}else{const t=e[r(240)](a+4,a+4+u),n=new Uint8Array(o[r(267)]+4+t.length);n[r(254)](o,0),n.set(c,o[r(267)]),n.set(t,o[r(267)]+4),o=n}a=a+4+u}return o}function Qo(e,t){const r=ta();return(Qo=function(e,t){return r[e-=490]})(e,t)}const ea=Qo;function ta(){const e=["345010UBaPKk","1036902qaIWKP","587265jsmXXd","4125rwyBMS","slice","1067cOEiTH","376KnfdcS","keys","length","off","1604EDtNKa","push","2392965liFPDL","apply","11530wPNqtM","8667mfkxOi","emit","ctx","3oFigAy"];return(ta=function(){return e})()}!function(e,t){const r=Qo,n=e();for(;;)try{if(412843===-parseInt(r(496))/1*(parseInt(r(497))/2)+-parseInt(r(500))/3*(-parseInt(r(507))/4)+parseInt(r(490))/5+-parseInt(r(498))/6+-parseInt(r(499))/7+parseInt(r(503))/8*(parseInt(r(493))/9)+-parseInt(r(492))/10*(-parseInt(r(502))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ta);class ra{on(e,t,r){const n=Qo,i=this.e||(this.e={});return(i[e]||(i[e]=[]))[n(508)]({fn:t,ctx:r}),this}once(e,t,r){const n=this;function i(){const s=Qo;n[s(506)](e,i);for(var o=arguments.length,a=new Array(o),c=0;c1?n-1:0),s=1;s{delete n[e]})),void delete this.e;const i=n[e],s=[];if(i&&t)for(let e=0,n=i[r(505)];e=2&&!this[r(130)];)if(255==this.tempBuffer[this[r(157)]]){if(!(!1&this[r(131)][this.parsedOffset+1])){this[r(158)]=this[r(131)][this.parsedOffset+1],this[r(132)]=sa[r(155)],this[r(156)]=this[r(157)],this[r(157)]+=2,e=!0;break}this.parsedOffset++}else this[r(157)]++;if(e)continue;break}if(this[r(132)]==sa[r(155)]){let e=!1;for(;this[r(131)].length-this.parsedOffset>=2&&!this[r(130)];)if(255==this.tempBuffer[this[r(157)]]){if(this.tempBuffer[this[r(157)]+1]==this[r(158)]){this[r(132)]=sa[r(150)],this.secondStartCodeOffset=this.parsedOffset,this[r(157)]+=2,e=!0;break}this.parsedOffset++}else this[r(157)]++;if(e)continue;break}if(this[r(132)]==sa[r(150)]){let e=this.tempBuffer[r(152)](this[r(156)],this[r(134)]);this.emit(r(140),e,t),this.tempBuffer=this[r(131)][r(152)](this[r(134)]),this[r(156)]=0,this.parsedOffset=2,this.state=sa.findFirstStartCode}}}}function ca(e,t){const r=fa();return(ca=function(e,t){return r[e-=329]})(e,t)}function ua(e,t,r){const n=ca;for(let i=2;i3&&void 0!==arguments[3]&&arguments[3];const s=e[n(335)];let o=5;for(;os)break;let c=e[o+4],u=!1;if(i?(c=c>>>1&63,u=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(c)):(c&=31,u=1===c||5===c),u){const i=ua(e[n(336)](o+4,o+4+a),t,r);e[n(332)](i,o+4)}o=o+4+a}return e}function ha(e,t,r){const n=ca;if(e[n(335)]<=30)return e;const i=ua(e[n(336)](30),t,r);return e[n(332)](i,30),e}function fa(){const e=["523145gfQGIe","1291130oOjEPF","2484052hRgiDd","set","11206wttAbE","514982xjOLFv","byteLength","slice","1391360XqIqlK","324hkziwm","length","78TlBfkk","1297350ysWoFK"];return(fa=function(){return e})()}function pa(e,t){var r=ma();return(pa=function(e,t){return r[e-=470]})(e,t)}function ma(){var e=["6974574cpXHUP","362088BFvqvF","6350160ziyOee","filter","length","set","5852PcEAKN","reduce","byteLength","13QMSGbU","3416BZWaTa","4192047RksuVj","209140VbeogJ","715316ZofRYM","forEach"];return(ma=function(){return e})()}function va(){for(var e=pa,t=arguments.length,r=new Array(t),n=0;ne+t.byteLength),0));let s=0;return r[e(484)]((t=>{var r=e;i[r(475)](t,s),s+=t[r(478)]})),i}!function(e,t){const r=ca,n=e();for(;;)try{if(488856===parseInt(r(334))/1+parseInt(r(333))/2*(-parseInt(r(338))/3)+-parseInt(r(331))/4+parseInt(r(330))/5+-parseInt(r(340))/6*(-parseInt(r(329))/7)+-parseInt(r(337))/8+parseInt(r(341))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(fa),function(e,t){for(var r=pa,n=e();;)try{if(721575===parseInt(r(479))/1*(-parseInt(r(482))/2)+parseInt(r(481))/3+parseInt(r(483))/4+parseInt(r(472))/5+-parseInt(r(470))/6+parseInt(r(476))/7*(parseInt(r(480))/8)+parseInt(r(471))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ma);const ya=_a;function ga(){const e=["map","proxy","1GkXXaC","bind","30952755njzBrO","6769455MiRCsL","7861MyiyUc","addEventListener","forEach","debugLog","1971588MweoaL","destroy","destroys","master","Events","2411367uyLNvf","length","13772672rRTnIr","8628BgGatG","5205160dlrAdc"];return(ga=function(){return e})()}function _a(e,t){const r=ga();return(_a=function(e,t){return r[e-=245]})(e,t)}!function(e,t){const r=_a,n=e();for(;;)try{if(968335===parseInt(r(262))/1*(-parseInt(r(250))/2)+-parseInt(r(255))/3+parseInt(r(259))/4+parseInt(r(245))/5+parseInt(r(258))/6*(-parseInt(r(246))/7)+-parseInt(r(257))/8+parseInt(r(264))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(ga);class ba{constructor(e){const t=_a;this[t(252)]=[],this.proxy=this[t(261)][t(263)](this),this[t(253)]=e}[ya(261)](e,t,r){const n=ya;let i=arguments[n(256)]>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array.isArray(t))return t[n(260)]((t=>this[n(261)](e,t,r,i)));e[n(247)](t,r,i);const s=()=>{jt(e.removeEventListener)&&e.removeEventListener(t,r,i)};return this[n(252)].push(s),s}[ya(251)](){const e=ya;this[e(253)][e(249)](e(254),e(251)),this[e(252)][e(248)]((e=>e())),this[e(252)]=[]}}const wa=ka;!function(e,t){const r=ka,n=e();for(;;)try{if(979346===-parseInt(r(190))/1+-parseInt(r(258))/2*(parseInt(r(207))/3)+parseInt(r(204))/4*(parseInt(r(213))/5)+parseInt(r(211))/6+parseInt(r(210))/7*(-parseInt(r(188))/8)+parseInt(r(223))/9+parseInt(r(273))/10)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ea);class Sa{static[wa(247)](){const e=wa;Sa.types={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(let t in Sa[e(259)])Sa[e(259)][e(216)](t)&&(Sa[e(259)][t]=[t[e(230)](0),t[e(230)](1),t.charCodeAt(2),t[e(230)](3)]);let t=Sa[e(263)]={};t.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),t.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),t[e(194)]=new Uint8Array([0,0,0,0,0,0,0,0]),t[e(193)]=t[e(205)]=t[e(194)],t[e(217)]=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t[e(189)]=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),t[e(255)]=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),t.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),t[e(267)]=new Uint8Array([0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static[wa(268)](e){const t=wa;let r=8,n=null,i=Array[t(274)][t(232)].call(arguments,1),s=i[t(262)];for(let e=0;e>>24&255,n[1]=r>>>16&255,n[2]=r>>>8&255,n[3]=255&r,n[t(200)](e,4);let o=8;for(let e=0;e>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static[wa(237)](e){const t=wa;return Sa.box(Sa[t(259)][t(237)],Sa[t(214)](e),Sa[t(272)](e))}static[wa(214)](e){const t=wa;let r=e.id,n=e[t(212)],i=e.presentWidth,s=e.presentHeight;return Sa.box(Sa[t(259)].tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>>8&255,255&i,0,0,s>>>8&255,255&s,0,0]))}static[wa(272)](e){const t=wa;return Sa[t(268)](Sa.types[t(272)],Sa.mdhd(e),Sa[t(266)](e),Sa[t(265)](e))}static[wa(219)](e){const t=wa;let r=e[t(264)],n=e[t(212)];return Sa.box(Sa[t(259)][t(219)],new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,85,196,0,0]))}static[wa(266)](e){const t=wa;let r=null;return r="audio"===e[t(249)]?Sa.constants[t(255)]:Sa.constants[t(189)],Sa[t(268)](Sa[t(259)][t(266)],r)}static[wa(265)](e){const t=wa;let r=null;return r="audio"===e[t(249)]?Sa[t(268)](Sa[t(259)][t(221)],Sa[t(263)][t(267)]):Sa[t(268)](Sa[t(259)][t(271)],Sa.constants[t(236)]),Sa[t(268)](Sa[t(259)][t(265)],r,Sa[t(252)](),Sa[t(203)](e))}static[wa(252)](){const e=wa;return Sa[e(268)](Sa[e(259)][e(252)],Sa[e(268)](Sa.types[e(196)],Sa[e(263)][e(191)]))}static[wa(203)](e){const t=wa;return Sa[t(268)](Sa[t(259)][t(203)],Sa[t(208)](e),Sa[t(268)](Sa[t(259)].stts,Sa[t(263)][t(194)]),Sa[t(268)](Sa[t(259)][t(226)],Sa[t(263)][t(193)]),Sa[t(268)](Sa.types[t(246)],Sa[t(263)][t(217)]),Sa[t(268)](Sa.types.stco,Sa[t(263)].STCO))}static stsd(e){const t=wa;return e[t(249)]===t(242)?"mp3"===e.audioType?Sa[t(268)](Sa[t(259)].stsd,Sa[t(263)].STSD_PREFIX,Sa[t(251)](e)):Sa[t(268)](Sa[t(259)][t(208)],Sa[t(263)][t(260)],Sa.mp4a(e)):e[t(253)]===t(248)?Sa[t(268)](Sa[t(259)].stsd,Sa[t(263)][t(260)],Sa[t(192)](e)):Sa[t(268)](Sa.types.stsd,Sa[t(263)][t(260)],Sa[t(234)](e))}static[wa(251)](e){const t=wa;let r=e[t(231)],n=e[t(215)],i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return Sa[t(268)](Sa.types[".mp3"],i)}static mp4a(e){const t=wa;let r=e[t(231)],n=e[t(215)],i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,r,0,16,0,0,0,0,n>>>8&255,255&n,0,0]);return Sa[t(268)](Sa[t(259)][t(240)],i,Sa[t(256)](e))}static[wa(256)](e){const t=wa;let r=e[t(198)]||[],n=r.length,i=new Uint8Array([0,0,0,0,3,23+n,0,1,0,4,15+n,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([n])[t(257)](r)[t(257)]([6,1,2]));return Sa[t(268)](Sa[t(259)][t(256)],i)}static avc1(e){const t=wa;let r=e[t(197)];const n=e[t(201)],i=e[t(206)];let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Sa[t(268)](Sa.types.avc1,s,Sa[t(268)](Sa[t(259)][t(220)],r))}static[wa(234)](e){const t=wa;let r=e[t(197)];const n=e.codecWidth,i=e.codecHeight;let s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>>8&255,255&n,i>>>8&255,255&i,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Sa[t(268)](Sa.types.hvc1,s,Sa[t(268)](Sa[t(259)][t(238)],r))}static[wa(224)](e){const t=wa;return Sa.box(Sa.types[t(224)],Sa[t(270)](e))}static trex(e){const t=wa;let r=e.id,n=new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Sa[t(268)](Sa[t(259)][t(270)],n)}static moof(e,t){const r=wa;return Sa.box(Sa.types[r(245)],Sa[r(225)](e[r(195)]),Sa[r(222)](e,t))}static[wa(225)](e){const t=wa;let r=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return Sa[t(268)](Sa.types[t(225)],r)}static[wa(222)](e,t){const r=wa;let n=e.id,i=Sa[r(268)](Sa[r(259)][r(239)],new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),s=Sa[r(268)](Sa[r(259)][r(250)],new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),o=Sa.sdtp(e),a=Sa[r(244)](e,o[r(228)]+16+16+8+16+8+8);return Sa.box(Sa[r(259)][r(222)],i,s,a,o)}static[wa(261)](e){const t=wa;let r=new Uint8Array(5),n=e.flags;return r[4]=n[t(233)]<<6|n[t(269)]<<4|n[t(202)]<<2|n[t(254)],Sa.box(Sa.types[t(261)],r)}static[wa(244)](e,t){const r=wa;let n=new Uint8Array(28);t+=36,n[r(200)]([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let i=e.duration,s=e[r(199)],o=e[r(243)],a=e[r(227)];return n.set([i>>>24&255,i>>>16&255,i>>>8&255,255&i,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o[r(233)]<<2|o.dependsOn,o.isDependedOn<<6|o[r(254)]<<4|o[r(235)],0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12),Sa[r(268)](Sa[r(259)][r(244)],n)}static mdat(e){return Sa.box(Sa.types.mdat,e)}}function Ea(){const e=["FTYP","15834VnAVPQ","2944674TLPRpP","duration","3477305qSCCun","tkhd","audioSampleRate","hasOwnProperty","STSZ","ftyp","mdhd","avcC","smhd","traf","10541511QqKCxK","mvex","mfhd","stsc","cts","byteLength","generateInitSegment","charCodeAt","channelCount","slice","isLeading","hvc1","isNonSync","VMHD","trak","hvcC","tfhd","mp4a","mvhd","audio","flags","trun","moof","stsz","init","avc","type","tfdt","mp3","dinf","videoType","hasRedundancy","HDLR_AUDIO","esds","concat","24994mZrpsM","types","STSD_PREFIX","sdtp","length","constants","timescale","minf","hdlr","SMHD","box","dependsOn","trex","vmhd","mdia","19049330NIQKPO","prototype","moov","5416UOeGmZ","HDLR_VIDEO","364565TXeJfc","DREF","avc1","STSC","STTS","sequenceNumber","dref","avcc","config","size","set","codecWidth","isDependedOn","stbl","4VIumTY","STCO","codecHeight","333UMCUyg","stsd"];return(Ea=function(){return e})()}function ka(e,t){const r=Ea();return(ka=function(e,t){return r[e-=187]})(e,t)}Sa.init();var Ia=Ca;!function(e,t){for(var r=Ca,n=e();;)try{if(761965===parseInt(r(489))/1*(-parseInt(r(482))/2)+-parseInt(r(480))/3*(-parseInt(r(481))/4)+-parseInt(r(479))/5+parseInt(r(487))/6+-parseInt(r(486))/7+parseInt(r(478))/8+-parseInt(r(483))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ta);var Aa=tt[Ia(484)]((function(e){var t=Ia;e[t(485)]=function(e,t,r){return t in e?Object[Ca(477)](e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e[t(485)][t(491)]=!0,e[t(485)][t(488)]=e[t(485)]}));function Ca(e,t){var r=Ta();return(Ca=function(e,t){return r[e-=477]})(e,t)}function Ta(){var e=["unwrapExports","__esModule","defineProperty","5637256jrmUXN","2004970DmfXrC","1317PhGwCx","10484vuubqC","18274ZpfOye","10000602ZgJeYU","createCommonjsModule","exports","6131034GIBkdH","8042448HAaUru","default","5Avdxhe"];return(Ta=function(){return e})()}function xa(){const e=["12YjaqFj","277930wgGurE","9qNagHt","length","85FgiYRr","519232deiYmd","21188ruHrCH","error","463922wegGON","48296UWKEnL","set","2878323gKssQr","913xiekHV","417228zGjvUg","sample_rate","mp3"];return(xa=function(){return e})()}function Da(e,t){const r=xa();return(Da=function(e,t){return r[e-=304]})(e,t)}tt[Ia(490)](Aa),function(e,t){const r=Da,n=e();for(;;)try{if(475102===-parseInt(r(318))/1+parseInt(r(305))/2*(-parseInt(r(313))/3)+parseInt(r(319))/4*(parseInt(r(317))/5)+-parseInt(r(310))/6+-parseInt(r(308))/7+-parseInt(r(306))/8*(-parseInt(r(315))/9)+-parseInt(r(314))/10*(-parseInt(r(309))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(xa);const Ba=[44100,48e3,32e3,0],Pa=[22050,24e3,16e3,0],Ma=[11025,12e3,8e3,0],Fa=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],Ua=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],Ra=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1];function La(e){const t=Da;if(e.length<4)return void console[t(304)]("Invalid MP3 packet, header missing!");let r=new Uint8Array(e.buffer),n=null;if(255!==r[0])return void console[t(304)]("Invalid MP3 packet, first byte != 0xFF ");let i=r[1]>>>3&3,s=(6&r[1])>>1,o=(240&r[2])>>>4,a=(12&r[2])>>>2,c=3!==(r[3]>>>6&3)?2:1,u=0,l=0,d=t(312);switch(i){case 0:u=Ma[a];break;case 2:u=Pa[a];break;case 3:u=Ba[a]}switch(s){case 1:o=e[s]&&t=6?(i=5,r=new Array(4),a=s-3):(i=2,r=new Array(2),a=s):-1!==c[t(276)](t(268))?(i=2,r=new Array(2),a=s):(i=5,a=s,r=new Array(4),s>=6?a=s-3:1===o&&(i=2,r=new Array(2),a=s)),r[0]=i<<3,r[0]|=(15&s)>>>1,r[1]=(15&s)<<7,r[1]|=(15&o)<<3,5===i&&(r[1]|=(15&a)>>>1,r[2]=(1&a)<<7,r[2]|=8,r[3]=0),this[t(314)]=r,this[t(284)]=$a[s],this[t(277)]=s,this[t(272)]=o,this[t(269)]=i,this[t(320)]=n,this[t(297)]=t(305)+i,this.original_codec_mimetype=t(305)+n}}function Ka(){const e=["skipLZ","readBoolean","readUShort","2010664jtpMUR","byteLength","bitLength","readUEG","readUByte","96epAZuf","length","11922tNNoGy","2567TKIFku","16kNGNsz","index","skipBits","readUInt","125660xaOtCf","130647AuSNGW","798318YKGtTV","readBits","42CEmhEe","899459zyrbUL","bitsAvailable","readEG","getBits","50PUvhSI"];return(Ka=function(){return e})()}function Xa(e,t){const r=Ka();return(Xa=function(e,t){return r[e-=447]})(e,t)}const Ya=Xa;!function(e,t){const r=Xa,n=e();for(;;)try{if(146969===parseInt(r(455))/1*(parseInt(r(452))/2)+parseInt(r(461))/3+-parseInt(r(456))/4*(parseInt(r(460))/5)+parseInt(r(454))/6*(parseInt(r(464))/7)+-parseInt(r(447))/8+-parseInt(r(462))/9+parseInt(r(469))/10*(parseInt(r(465))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(Ka);class Ja{constructor(e){const t=Xa;this.data=e,this[t(457)]=0,this[t(449)]=8*e[t(448)]}get bitsAvailable(){const e=Xa;return this[e(449)]-this[e(457)]}[Ya(458)](e){if(this[Ya(466)]1&&void 0!==arguments[1])||arguments[1];return this[Ya(468)](e,this.index,t)}[Ya(468)](e,t){const r=Ya;let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(this[r(466)]>>i,o=8-i;if(o>=e)return n&&(this[r(457)]+=e),s>>o-e;{n&&(this[r(457)]+=o);const i=e-o;return s<>>1:-1*(e>>>1)}[Ya(471)](){return 1===this.readBits(1)}[Ya(451)](){const e=Ya;let t=arguments[e(453)]>0&&void 0!==arguments[0]?arguments[0]:1;return this[e(463)](8*t)}[Ya(472)](){return this.readBits(16)}[Ya(459)](){return this[Ya(463)](32)}}function Za(e){return e[3]|e[2]<<8|e[1]<<16|e[0]<<24}!function(e,t){for(var r=uc,n=e();;)try{if(305127===-parseInt(r(503))/1*(-parseInt(r(491))/2)+parseInt(r(488))/3+-parseInt(r(495))/4+parseInt(r(492))/5+parseInt(r(502))/6+-parseInt(r(506))/7*(-parseInt(r(493))/8)+-parseInt(r(490))/9)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(lc);const Qa=new Array(214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72),ec=new Array(2746333894,1453994832,1736282519,2993693404),tc=new Array(462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257);function rc(e,t,r,n,i){var s=uc,o=i;o=t+i>e[s(499)]&&n+i<=r[s(499)]?e[s(499)]-t:n+i>r[s(499)]&&t+i<=e[s(499)]?r[s(499)]-n:t+i<=e[s(499)]&&n+i<=r[s(499)]?i:r[s(499)]>24&255,e>>16&255,e>>8&255,255&e)}function ic(e,t){var r=uc;return t+3>>19)^(n<<23|n>>>9)}function ac(e,t){var r=new Array(36);r[0]=ic(t,0),r[1]=ic(t,4),r[2]=ic(t,8),r[3]=ic(t,12);for(var n=0;n<32;n++)r[n+4]=r[n]^cc(r[n+1]^r[n+2]^r[n+3]^e[n]);var i=new Array(4);for(n=35;n>=32;n--)i[35-n]=r[n];return function(e){for(var t=new Array(4*e[uc(499)]),r=0;r>>30)^(n<<10|n>>>22)^(n<<18|n>>>14)^(n<<24|n>>>8)}function uc(e,t){var r=lc();return(uc=function(e,t){return r[e-=488]})(e,t)}function lc(){var e=["400806bjdNXI","18FVpkjp","sm4 key is error!","set","371guSNeB","308475qLUcgb","ceil","6558678tlpZNn","58914LhjpDm","1937150VCmRlO","68568VTubmi","iv is error!","2030704RdpfXJ","min","data is error!","slice","length","includes","log"];return(lc=function(){return e})()}function dc(e,t,r){var n=uc;if(null==e||null==e||e[n(499)]%16!=0)return console[n(501)]("sm4 key is error!"),null;if(null==r||null==r||r[n(499)]<=0)return console[n(501)]("cipher is error!"),null;if(null==t||null==t||t[n(499)]%16!=0)return console[n(501)](n(494)),null;for(var i=sc(e),s=Math[n(489)](r[n(499)]/16),o=new Array(r[n(499)]),a=t.slice(),c=0;c3&&void 0!==arguments[3]&&arguments[3],s=arguments[n(499)]>4&&void 0!==arguments[4]&&arguments[4];t=new Uint8Array(t),r=new Uint8Array(r);const o=e.byteLength;let a=5;for(;ao)break;let u=e[a+4],l=!1,d=2;if(i?(s&&(d=3),u=u>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][n(500)](u)):(u&=31,l=1===u||5===u),l){const i=dc(t,r,e[n(498)](a+4+d,a+4+c));e[n(505)](i,a+4+d)}a=a+4+c}return e}const fc=pc;function pc(e,t){const r=mc();return(pc=function(e,t){return r[e-=298]})(e,t)}function mc(){const e=["_initSourceBuffer and mseDecoder.isStateOpen is ","debugLevel","getNearestTimestampMilliseconds",", diff is ","parseChunks","writableStream abort() and e.name is AbortError so return","H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment","getUint8","audioSequenceNumber"," and return","parsePAT: table_id ","decodeVideo() and decoder is destroyed",", pts=","sequenceHeader","1506080gskUJa"," ,delay is ","units","decodeVideo\n local dts is < 0 , ts is "," less than bufferStartDts is ","Client disconnecting",";codecs="," isIFrame is ","kSliceNonIDR","setExtractionOptions","flvScriptData","parseVPS","clearSlices","playbackFps","demuxTs"," null","videoBuffer","dispatchVideoInitSegment","random_access_indicator","endOfStream()","isIFrame","249002OpnLeB","presentHeight","timeInit set false , cacheTrack = {} now dts is ","firstRenderTime is ","opt","mseCorrectTimeDuration","_initSourceBuffer() appendBuffer mseDecoder.mediaSource.addSourceBuffer()","streamRate","videoBufferDelay","player","debugWarn","parseSynchronousKLVMetadataPayload","clearPlaybackCacheLoop","fps","parseOpusPayload"," and isDestroyed is true, so return","pes_private_data_pids","mseDecoder.audioSourceBuffer.appendBuffer()","codec",",\n and resetAllDelay","currentTime","offscreenCanvas","writableStream close()","width: ","_decodeConfigurationRecord"," and mseCorrectTimeDuration is ","sync_byte = ","_doDecodeVideo"," is not H264 or H265",'writableStream write() and value is "',"mseWidthOrHeightChange","kSliceIDR",", bufferList is ","isPlayUseMSE","9474fDnoIn","hvcC","length","parseLOASAACPayload","BIG_ENDIAN","onError","Synchronous KLV Metadata: pid=","getReader","cryptoKey","kMPEG1Audio","decodeVideo","AAC: SamplingFrequencyIndex changed from ","sampling_index","videoInfo","sampleRate","_doAppendSegments","websocketOpen","videoTrackId","sourceClose","delete","onMediaSourceSourceOpen() audioSourceBuffer is null and next init","worker MediaSource","mediaSource is not attached to video or mediaSource is closed","isPlayer","AAC: Detected pts overlapped, ","loas_aac","isPlaybackPause","program_pmt_map_","close() and audioDecoder.clear error: ","videoDecode","onerror","localDts","videoMeta","bitDepth","mseFirstRenderTime","getNaluDts","scriptData","presentWidth"," and has iIframe and next decoder.dropBuffer$2()","fetchStream, WebsocketStream on error and isDestroyed is true, so return","AC3: Sampling Frequency changed from ","AudioDecoder"," and tempDelay is ","readUByte","options:","fps_den","websocketError","clearBuffer","codecWidth","mdia",",\n and prevPayloadBufferSize is ","handleSectionSlice","descriptor","setCodecAudio","mseDecodeAudio","doDecode","MULAW","Timed ID3 Metadata: pid="," and ignore"," or cryptoIV.length is ","kH265","complete","1884FyawGU","delay is ","isPlaybackOnlyDecodeIFrame","_decodeVideo payload bytes is 0 and return","playbackCacheBeforeDecodeForFpsRender, calc streamVideoFps is ","dispatchPESPrivateDataDescriptor"," and height is ","then","protocol","readyState","offset","dts","isWorkerFetch","decodeVideo and payload is video sequence header so drop this frame","_opt","websocket error","recordType","vps","codec_mimetype","getContext"," ,\n and now ts is ","audioNalu","toString","onMediaSourceSourceOpen() sourceBuffer is null and next init","removeSourceBuffer() sourceBuffer error","getDelay() and preDelayTimestamp is ","type","mpeg4","ms and fragDuration is "," and is Trial Version[试用版本]","mediaSourceAppendBufferFull","abort catch","pendingSegments","LOG_NAME","decodeVideo has not init , isIframe is ","useSIMD","flvBufferData","prevTimestamp","handleVideoH264NaluList list size is ","\n decodeAudio dts is less than(or equal) prev dts ,\n dts is ","lastBuffer","parseTimedID3MetadataPayload","debug"," ,\n and diff is ","status","handleVideoH265Frames","adts_aac",", old height is ","isWidthOrHeightChanged","mediaSourceError","tsPacketSize","FT_KEY",", stream_id=","_initPmt","stringify"," ,\n and now ts is ","timed_id3_pids"," and prev ts is ","parsePESPrivateDataPayload","isFirefox","options","codecHeight","width is ","32mUGDZk","setCodecVideo: videoDecoder or videoDecoder.setCodec is null","configure","fetchStream, WebsocketStream socket close and requestAbort is true so return","decodeAudio and has already initialized and payload is aac codec packet so drop this frame","appendAudioBuffer() player is destroyed","audio_init_segment_dispatched_","mp3"," and\n payloadBufferSize is ","pat_","cryptoPayloadAudio","fetch","request abort and run res.body.cancel()","start","offscreenCanvasCtx","checkFirstIFrame","undefined","hasAudioInit","supportVideoFrameCallbackHandle","events","parseVideo264Header","stop","decode","handleVideoH264Frames","onSamples","avc","sample_rate","setCodecVideo: hasInitVideoCodec is false, codecId is ","AC3: Low Frequency Effects Channel On changed from ","openWebglAlignment","sync_offset","hasAudio","Asynchronous KLV Metadata: pid=","mseSourceBufferError mseDecoder.audioSourceBuffer","isDestroyed","ID3 ","isEmitSEI","_initAudioSourceBuffer() addSourceBuffer mseDecoder.mediaSource.addSourceBuffer()","isAAC","streamFps","pmt_","getVideoBufferLength","close() and writableStream.close() error","mp4","demuxNakedFlow",", bufferListLength is ","mediaSourceDecoderConfigurationError","value","slices","playback and playbackIsCacheBeforeDecodeForFpsRender is true","audioBufferSize","HEAPF32"," ,\n and diff is ","fileStart","isStateEnded","playbackRate","pushBuffer",", not 0x47","present_size","destroy","subarray","videoMimeType","url","pushBuffer() and isIFrame is ","kSliceIDR_W_RADL"," , message is ","_doRemoveRanges","aacSequenceHeader","demuxM7s() type is video and arrayBuffer length is ","parseAsynchronousKLVMetadataPayload",", and set streamFps is 25","mp4Box","object_type","JbPro Worker Version is ","preDelayTimestamp","VANC","low_frequency_effects_channel_on","handleVideoH264Nalu","KLVA","handleAddNaluStartCode","debugLog","dispatchAudioInitSegment","yuvData, transferToImageBitmap error is","playbackStreamVideoFps",'" string so return',"loop() common dumex delay is -1 ,data.ts is","demuxFmp4"," > maxDelay ","push","parse","mediaSourceFull","refSampleDuration","autoCalcFps"," ms","now","_isEnhancedH265Header","audio","decodeAudio() and decoder is destroyed"," and emit error and next abort()","webglcontextlost","nakedFlowH265DemuxUseNew"," and diff is ","fetchStatus","TAG","setCodecAudio: audioDecoder or audioDecoder.setCodec is null","ac-3","sendWsMessage","abort",", and ts is ","calcIframeIntervalTimestamp","timeInit","close() and socket.readyState is ","onReady","_initAudioSourceBuffer and mseDecoder.isStateOpen is ","fetchErrorWorker","pushLatestDelay","_doCleanUpSourceBuffer"," ts is ","generateInitSegment","readUEG","parseVideo265Header","profile_string","Generated first AudioSpecificConfig for mimeType: ","readBits","match","clearBuffer,bufferList length is ","audioTrackId","useWCS","videoType","streamAbps","isPlayUseMSEAndDecoderInWorker","fetchStream","streamStats","handleOffscreenCanvasWebglContextLost and next try to create webgl","kSliceVPS"," > ","streamEnd","AAC: Channel configuration changed from "," and isVideoSqeHeader is "," and bufferList length is ","isPushDropping","common_pids","mseAutoCleanupMinBackwardDuration","closeEnd","decodeAudio\n local dts is < 0 , ts is ","parseH264Payload","fetch().catch() and e is ","config","endOfStream() has pending eos","VideoDecoder configure error","onOffscreenCanvasWebglContextLost","file_position","len","emitError","895kjVtVP","endOfStream","_doRemoveRanges() sourceBuffer error","dispatch","getDelayNotUpdateDelay() and preDelayTimestamp is ","isNakedFlow",", start dts is ","getIncompleteData"," and preTsDuration is ","pushBuffer video and isIFrame is ","decodeVideo and payload is too small , payload length is ","fetchNext().then() and requestAbort is true so return","video_metadata_changed_","ms and diffFps is ","playbackForwardMaxRateDecodeIFrame","streamVideoType","cacheAudioTrack"," so drop this frame","createFile","bit_stream_mode","set","MP3: AudioObjectType changed from ","initVideo","_stopCheckWsOpenTimeout","video","last_pcr_","floor","getNotDroppingDelayTs","updateConfig","DataStream","some","sarRatio",",\n firstRenderTime is ","aborted","kADTSAAC","kMPEG2Audio","flags","getTime","audioCodec","mediaSourceTsIsMaxDiff","handleVideoH265NaluList list size is ","isPlayback"," and update next dts increase 5ms","websocket","extractNALu","websocket Open Timeout form ","videoSEI","hev","isFmp4","pendingUnits","sequenceNumber","body","hasIncompleteData","sampling_freq_index","removeSourceBuffer() audioSourceBuffer error"," and,\n options.ts is ","mseAutoCleanupSourceBuffer","timescale","writableStream abort() and e is ","firstStartCodeOffset","MP3","detectVideoMetadataChange","removeSourceBuffer() sourceBuffer","videoNalu","idle","socketStatus",'video/mp4; codecs="',"prevPayloadBufferSize",",\n and emit change event","decodeAudio, decoder is destroyed and return","suffixSei","getStreamBufferSize","prevAudioTs","mediaSourceAddSourceBufferError","version_number","types","arraybuffer","removeUsedSamples","dispatchAudioMediaSegment","key","playbackCacheLoop fragDuration is "," to ","startTimestamp","isSm4CryptoH265V2","offscreenCanvasGL","isAllIframeInBufferList","socket is not open and state is","tempStream","mp4a.40.","appendBuffer","render"," and prevTs is ","listenMp4Box","timescale_","isWasmMp4","calcNetworkDelay","current_program_","fromCharCode","isPlayVod"," and firstRenderTime is ","isXorCrypto cryptoKey.length is ","socket is null","Video: Coded Resolution changed from ","worker fmp4Demuxer","section_slice_queues_","buffered","isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio","fetchNext().catch() and abortController.signal.aborted is true so return","pcr_pid","parseSPS$2","audioSourceNoDataCheckTimeout","profile","asynchronous_klv_pids","extractH264SEI","s and status is ","streamAudioFps","write","4418433HYiiOW","pipeTo","decodeNext","iFrame","_doRemoveRanges() audioSourceBuffer error","audioSourceBuffer","dropBuffer$2() isAllIframeInBufferList() is true, and index is ","parseSPS","firstAudioTime is ","getAudioBufferLength"," and nalUnitSize is ","G711A","pushBuffer video ts is ","pid_stream_type","addSourceBuffer","dispatchVideoMediaSegment","signal","pes_slice_queues_","mp3Demuxer"," package length is ","demuxMpeg4","cryptoPayload","kLOASAAC","TAG_NAME","playbackCacheLoop sync frame duration is ","clear","Generated first AVCDecoderConfigurationRecord for mimeType: "," and next dropBuffer","log"," and bufferlist is ","shift","handleOffscreenCanvasWebglContextRestored","mseDecoder.mediaSourceAppendBufferFull is true","isDropping","playVod","isFlv","ts_packet_size","onmessage:","mdat","binaryType","Not Supported Opus channel count.","kAC3","onReady()"," and emit replay","AC3: Bit Stream Identification changed from ","sm4CryptoKey","mediaSourceAppendBufferError","parsedOffset","mseUpdateVideoTimestamp","getUint32",",\n firstAudioTime is ","state","onopen","hasIframeInBufferList","level_string","PACKET_TYPE_FRAMES","sendWebsocketMessage","audioSampleRateIndex","kSliceSPS","scte_35_pids","isCryptoAudio",",local diff is ",", isVideoSequenceHeader is true","setCodecVideo: SIMD H264 decode video width is too large, width is ","details","websocketOpenTimeout","Jb pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng","isKeyframe","kSCTE35","loop() is dropping = false, is iFrame","video_init_segment_dispatched_","samples","_bindMediaSourceEvents","workerEnd","playAudio","refFrames","original_codec_mimetype","initAudio"," and decoder.delay is ","$video","websocketFirstMessage","sarNum","width","dropping","isStateClosed","chroma_format_string","isStateOpen","videoPayload","createImageBitmap","send","ms and return ","decodeVideo is max diff , ts is ","decodeVideo first frame is not iFrame","streamDts","decodeVideo dts is equal to prev dts and payload size is equal to prev payload size so drop this frame"," , payload is ","audioSourceBuffer updateend and hasPendingEos is true, next endOfStream()"," and payload size is ","parsePMT",'fetchNext().then() and value "',"vcl","updatePlaybackIsPause, isPause is ","isDecodeFirstIIframe","_preDoDecode","_resetInIt",", need clear is ","aacADTSHeader","onclose","getBuildTime","notConnect","HEAPU32","getStreamBufferLength","hasPendingEos","mediaSource","Malformed PES: PES_packet_length < 3 + PES_header_data_length","Video: Present resolution width changed from ","audioMimeType","isSm4Crypto","cts","mseCorrectAudioTimeDuration","getAudioSourceBufferUpdating","mpeg","debugError","payload_unit_start_indicator","frameRate","mediaSource video sourceBuffer error","decoder","decodeAudio","mseHandle","removeSourceBuffer","sendWebsocketMessage, message is",", isAacCodecPacket is true","handleVideoH265Nalu","_hasPendingRemoveRanges","Parsed first PMT: ","parseEAC3Payload"," and has iFrame, set dropping is true",", dts is ","iframeIntervalTs","payload","audioAACSequenceHeader","decode data type is ","prefixSei","ms, PES pts: ","simdDecodeError","demuxFlv() type is ","total_length","isPlaybackCacheBeforeDecodeForFpsRender","open","message","readNextAACFrame","findSecondStartCode","channel_mode","kMetadata","isM7sCrypto cryptoKey.length is ","codec_size","parseMP3Payload"," vs start is ","isAudioInitInfo","_clearAudioSourceBufferCheckTimeout","demuxM7s","h265","playType","pendingAudioRemoveRanges","loop() isPushDropping is true and bufferList length is ","playbackIsCacheBeforeDecodeForFpsRender","fetch().catch() and e.name is AbortError so return","byteLength","parseSCTE35","isAvc","kH264","duration_","SMPTE 2038 Metadata: pid=","streamVbps","mseDecoder.mediaSourceAddSourceBufferError is true",",\n diff is ","parseAC3Payload","videoCode","streamEndInner","height","6680322AhvPVO","loop() do not decode and delay is ","mp4Box onError","delay","buffering","appendBuffer() player is destroyed","\n decodeVideo dts is less than(or equal) prev dts ,\n dts is "," ant auto wasm decode","isFirstDispatch and tsPacketSize = ","sarDen","eac3","pts","drawImage","_decodeAudioConfigurationRecord audio codec is not support , codecId is ","string","1guqKJc"," and isIframe is ","hasInit","videoSequenceHeader","firstAudioTime","avcc","yuvData ts ",",nalu type is ","_decodeEnhancedH265Video","parseSection","kSliceCRA_NUT","loop demux diff time is ","handlePESSlice: packet_start_code_prefix should be 1 but with value ","abortSourceBuffer() abort sourceBuffer","video_track_","fetchStream, url is ","setCodecAudio: hasInitAudioCodec is false, codecId is ","mediaSourceAudioNoDataTimeout","mseSourceBufferError","getState","demuxFlv","isRecordTypeFlv",", dts=","pid"," create uint8Array error :","fetchStream, WebsocketStream socket close and code is ","draw, decoder is destroyed and return","ac3","init","kSlicePPS","ended","code is "," next data type is ","bit_stream_identification"," and forOldVersion is ","nearest_pts"," more than ","cryptoIV","warn","chromaFormat","has not init video codec","loas_previous_frame","emitPESSlices","kEAC3","sampling_frequency","Opus: Channel count changed from ","isEmitInfo","_decodeConfigurationRecord error","has_video_","webglcontextrestored","PACKET_TYPE_FRAMESX","audio_metadata_","decodeVideo and webcodecs configure is","lastBuf","kSliceSEI","elementary_stream_priority_indicator","updateend","removeEventListener","fetchStream, WebsocketStream on error and requestAbort is true so return","code","read","audio_object_type","doPlaybackCacheLoop() and isPlaybackOnlyDecodeIFrame is true and isIFrame is true, and ts is"," is not corresponded to PAT!","video_metadata_","network_pid","parseH265Payload","correctSamplePts","_hasPendingSegments","fetchStream, WebsocketStream socket error","prevDts","channelCount","pps","isVideoInited","VideoDecoder","data","program_pmt_pid","mseAutoCleanupMaxBackwardDuration","opus","catch"," and maxDiff is ","handleOffscreenCanvasWebglContextLost, stencil is false","demuxFlv() type is video and payload.byteLength is ","ref_frames","pendingRemoveRanges","worker mpeg4Demuxer","isCacheBeforeDecodeForFpsRender","Generated first HEVCDecoderConfigurationRecord for mimeType: ","isDropSameTimestampGop","g711a","_onMediaSourceSourceOpen","resetDelay","concat","supportMSEDecodeHevc","onOffscreenCanvasWebglContextRestored",", syncOffset = ","handle",", options.ts is ","_initSourceBuffer","audioDecode","fetchError","frame_rate","first_parse_","56FCOTFZ",", next dts: ","channel_config","playbackConfig","playbackCacheBeforeDecodeForFpsRender, bufferListLength is ","webgl","isSm4Crypto opt.sm4CryptoKey is null","abs","hasVideo","decodeVideo, decoder is destroyed and return","pushBuffer,\n preTimestamp is ","emitSectionSlices","dropBuffer$2","_decodeAudioConfigurationRecord","getDelayNotUpdateDelay","Unsupported stream. type: ","_checkTsIsMaxDiff","fps_num","getDelay","isMpeg4","_needCleanupSourceBuffer","forEach"," and isIFrame is ","sort","videoCodec","firstRenderTime","AAC: AudioObjectType changed from ","pushBuffer, isDropSameTimestampGop is true and\n hasIframe is ","smpte2038_pids"," _opt.sampleRate is ","error","moof"," and mseDecoder.audioMimeType is ","audioPayload","writableStream write() and abortController.signal.aborted is true so return","webglObj"," and prev dts is ","chroma_format","sourceBuffer","codedHeight","nakedFlowDemuxUseNew","audio_last_sample_pts_","has_audio_","streamVideoFps","calcPlaybackStreamFps","onmessage","audio_track_","writableStream pipeTo() and e is","websocket user aborted","program_number","wcsDecodeAudio","locked","fetchNext().catch() and e is ","_initAudioSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()","\n maybe trigger black screen or flower screen\n ","from","appendAudioBuffer","mseDecoder.sourceBuffer.appendBuffer()","mseSourceBufferError mseDecoder.sourceBuffer","probe","parsePMT: table_id ","hasInitVideoCodec","media_info_","init and forHardDecode is ","ms and return -1","sps","expected: ","writableStream abort() and abortController.signal.aborted is true so return","end","codedWidth","handleVideoNalu","isfms","Audio: Audio Codecs changed from ","\n isVideoSqeHeader is ","playbackTF",", height is ","addEventListener","setCodecAudio: mp3 is not support for old version","secondStartCodeOffset","VideoDecoder error: "," and prev time is ","h264","decodeVideo: video width or height is changed, and return","extractH265SEI","handleVideoFrames","detectAudioMetadataChange",",\n and mseCorrectTimeDuration is ","renderYUV","is_sync","streamType","kPESPrivateData",", height: ","avcC","closed","MP3: SamplingFrequencyIndex changed from ","pendingAudioSegments","isTs","handlePESSlice","resetAllDelay","findFirstStartCode","g711u","finally","AAC: Unknown pts","decodeDiffTimestamp","handleVideoH265NaluList","fetchNext().then() and done is true","checkStreamEnd","decodeVideo: hasInitVideoCodec is false, codecId is ","findIndex","minf","transferToImageBitmap","hvcc","reduce","sourceOpen","networkDelay","name","audioSampleRate","fetchStream, WebsocketStream socket close abnormally and code is ","handleVideoH264NaluList","pushBuffer(), pushLatestDelay is ","buffer","remove"," and ok is ","pcmData, decoder is destroyed and return","nakedFlowFps","getSourceBufferUpdating","demux() isIFrame is false and unit type is IDR and update to true","prevAudioDts","audioSourceBufferCheckTimeout","fetch response status is ","slice","loop() dropBuffer is dropping and isIFrame ","AAC","isPause","updatePlaybackIsPause","setCodec","eventListenList","streamVideoType is null","worker","extractNALu$3",", pid: ","originalCodec","level","yuvData, decoder is destroyed and return","cacheTrack","mseDecoder.mediaSourceBufferError is true","mediaSource is end","duration","pcmData ts ","sourceended","stopId","isM7sCrypto","close","h264 naluList.length === 0","stbl","useMSE","decodeAudio first frame is not iFrame","mediaSourceBufferError","h265 naluList.length === 0","isSendSeqHeader","writableStream","demuxFlv() isVideoSequenceHeader(enhancedH265) is true and isHevc is ","errorInfo() emit simdDecodeError and\n iframeIntervalTimestamp is "," ,new bufferList is ","isXorCrypto","worker wcsDecoder","VideoDecoder configure has not init , isIframe is ","setInterval()",", preTs is ","mseWorkerAddSourceBufferError","isHevc","original_object_type","firstTimestamp","demuxFlv() type is audio and payload.byteLength is "," and opt is","map","isTrusted","syncOffset",", and ts list is ","aac_last_incomplete_data_","workerFetch","_remainingPacketData","headers","HEAPU8","stream_type","useOffscreen","isInitSegmentDispatched","updating","readNextNaluPayload","mediaSourceAudioInitTimeout","replace"," and prevPayloadBufferSize is ","parseG711Payload","stsd","mseDecoder.mediaSourceAppendBufferError is true",'" is string so return',"synchronous_klv_pids","dispatch naluArray length is 0","channel_count","size","decodeVideo: simd decode error, and return","worker TsLoaderV2","fetchStream, WebsocketStream socket open","213899rYnjAy","fetch done","playbackCacheLoop","expected_length","G711U","prevTs","abortSourceBuffer","audioCode","assign","min","wasmWidthOrHeightChange","current_pmt_pid_","endOfStream() error","streamSuccess"," > timestamp is ","aac","firstStartCodeOffset -14 is"," and\n ts is "];return(mc=function(){return e})()}!function(e,t){const r=pc,n=e();for(;;)try{if(274901===parseInt(r(564))/1*(-parseInt(r(923))/2)+parseInt(r(957))/3*(-parseInt(r(1082))/4)+-parseInt(r(1236))/5*(parseInt(r(1019))/6)+-parseInt(r(870))/7*(-parseInt(r(667))/8)+-parseInt(r(369))/9+parseInt(r(902))/10+parseInt(r(549))/11)break;n.push(n.shift())}catch(e){n.push(n.shift())}}(mc),Date[fc(1176)]||(Date[fc(1176)]=function(){return(new Date).getTime()}),console[fc(397)](fc(1155)+Rt+":"+Ut+fc(1048));const vc=yc;function yc(e,t){const r=gc();return(yc=function(e,t){return r[e-=200]})(e,t)}function gc(){const e=["178500MAhXTG","catch","115lhnhoo","then","319fkKKBj","6322329aXPKnN","2478000ABCCxg","JbPro[❌❌❌][video wasm]","240jXBvju","push","6224LJGwDh","4382ZoSnwe","1290mrrBWb","JbPro[❌❌❌][audio wasm]:","31kixWcS","warn","16620jTXuFg","all","130902QBEhRG","toString"];return(gc=function(){return e})()}!function(e,t){const r=yc,n=e();for(;;)try{if(386173===parseInt(r(200))/1*(parseInt(r(202))/2)+-parseInt(r(218))/3*(-parseInt(r(214))/4)+-parseInt(r(208))/5*(-parseInt(r(204))/6)+parseInt(r(217))/7*(parseInt(r(216))/8)+-parseInt(r(211))/9+parseInt(r(212))/10+parseInt(r(210))/11*(-parseInt(r(206))/12))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(gc);const _c=[];_c[vc(215)](o({printErr:function(e){const t=vc;(function(e){const t=xt;return!(!e||-1===e[t(596)]("not compiled with thread support")&&-1===e[t(596)](t(537))&&-1===e[t(596)](t(654))&&-1===e.indexOf("Reserved SBR extensions is not implemented"))})(e)||console[t(201)](t(219),e)}}),s({printErr:function(e){const t=vc;(function(e){const t=xt;return!(!e||-1===e.indexOf(t(628)))})(e)||(console.warn(t(213),e),Jt(function(e){const t=xt;let r=!0;return e&&-1!==e[t(596)](t(543))&&(r=!1),r}(e))&&postMessage({cmd:Ee.notSupportNewWasm,value:e}))}})),Promise[vc(203)](_c)[vc(209)]((e=>{const t=e[0];!function(){const e=fc;let t=arguments[e(959)]>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[e(959)]>2&&void 0!==arguments[2]&&arguments[2],i=arguments[e(959)]>3&&void 0!==arguments[3]&&arguments[3],s=[],o=[],a=null,c=null,u=null,l=null,d=null,h=null,f=!1,p=null,m=null,v=!1,y=!1,g=!!Yt(n),_=0,b=0,w=!1,S=null,E=null,k=null,I=[],A=null,C=null,T=0,x=0,D=null,B=null,P=0,M=0,F=null,U=!1,R=!1,L=!1,O=null,z=null,N=!1,H=!0,j=0,V=0,W=null,$=null,G=null,q=()=>{const t=e,r=Kt();return{debug:r[t(1061)],debugLevel:r[t(889)],debugUuid:r.debugUuid,useOffscreen:r.useOffscreen,useWCS:r.useWCS,useMSE:r[t(822)],videoBuffer:r[t(918)],videoBufferDelay:r[t(931)],openWebglAlignment:r[t(1111)],playType:r[t(531)],hasAudio:r.hasAudio,hasVideo:r.hasVideo,playbackRate:1,playVodRate:1,playbackFps:r.playbackConfig.fps,playbackDefaultFps:r[t(915)],playbackAutoCalcFps:r[t(670)][t(1174)],playbackForwardMaxRateDecodeIFrame:r[t(1250)],playbackIsCacheBeforeDecodeForFpsRender:r[t(670)][t(650)],sampleRate:0,networkDelay:r.networkDelay,visibility:!0,useSIMD:r[t(1054)],isRecording:!1,recordType:r[t(1035)],isNakedFlow:r[t(1241)],checkFirstIFrame:r[t(1097)],audioBufferSize:1024,isM7sCrypto:r[t(818)],isCryptoAudio:r[t(429)],cryptoKey:r[t(965)],cryptoIV:r[t(601)],isSm4Crypto:r.isSm4Crypto,isSm4CryptoH265V2:r.isSm4CryptoH265V2,sm4CryptoKey:r[t(414)],isXorCrypto:r[t(831)],isHls265:!1,isFlv:r[t(404)],isFmp4:r.isFmp4,isMpeg4:r[t(686)],isTs:r[t(763)],isEmitSEI:r[t(1118)],isRecordTypeFlv:!1,isWasmMp4:!1,isChrome:!1,isFirefox:!1,isDropSameTimestampGop:r[t(652)],mseDecodeAudio:r.mseDecodeAudio,wcsDecodeAudio:r[t(717)],nakedFlowH265DemuxUseNew:r[t(1182)],mseDecoderUseWorker:r.mseDecoderUseWorker,mseAutoCleanupSourceBuffer:r[t(308)],mseAutoCleanupMaxBackwardDuration:r[t(641)],mseAutoCleanupMinBackwardDuration:r[t(1224)],mseCorrectTimeDuration:r[t(928)],mseCorrectAudioTimeDuration:r[t(488)],nakedFlowDemuxUseNew:r.nakedFlowDemuxUseNew,nakedFlowFps:r[t(791)],supportMSEDecodeHevc:!1,checkStreamEnd:!0,websocketOpenTimeout:r[t(434)]}};"VideoEncoder"in self&&(a={TAG_NAME:e(832),hasInit:!1,isEmitInfo:!1,offscreenCanvas:null,offscreenCanvasCtx:null,decoder:null,init(){const t=e;a[t(495)]=new VideoDecoder({output:function(e){const r=t;if(jt(e[r(457)]))e[r(457)]()[r(1026)]((t=>{const n=r;a[n(1096)][n(561)](t,0,0,e[n(736)],e[n(706)]);let i=a[n(944)][n(777)]();postMessage({cmd:Ee.render,buffer:i,delay:ee.delay,ts:0},[i]),$t(e)}));else{a[r(1096)][r(561)](e,0,0,e.codedWidth,e[r(706)]);let t=a[r(944)][r(777)]();postMessage({cmd:Ee[r(342)],buffer:t,delay:ee[r(552)],ts:0},[t]),$t(e)}},error:function(e){const r=t;ee.debugError(r(805),r(746),e,e[r(1041)]())}}),ee[t(1162)](a[t(392)],t(592))},destroy(){const t=e;a.reset(),a[t(495)]&&a.decoder[t(420)]!==t(760)&&(a[t(495)][t(819)](),a[t(495)]=null),ee.debugLog(a.TAG_NAME,t(1141))},decode:function(t,r,n){const i=e,s=t[0]>>4==1;if(a[i(566)]){const e=new EncodedVideoChunk({data:t.slice(5),timestamp:r,type:s?Le[i(331)]:Le.delta});try{a.decoder[i(1104)](e)}catch(e){}}else if(s&&t[1]===Ve.sequenceHeader){const e=15&t[0];postMessage({cmd:Ee.videoCode,code:e});const r=new Uint8Array(t);postMessage({cmd:Ee[i(691)],buffer:r,codecId:e},[r[i(787)]]);let n=null,s=null;const o=t.slice(5);if(e===Pe.h264?(s=Ar(o),n={codec:s[i(941)],description:o}):e===Pe[i(530)]&&(s=tn(o),n={codec:s[i(941)],description:o}),!n||n&&!n[i(941)]||s&&0===s[i(1005)]&&0===s[i(1080)])return void ee[i(933)](a[i(392)],i(616),JSON[i(1073)](n));s&&s.codecWidth&&s[i(1080)]&&(n[i(706)]=s.codecHeight,n[i(736)]=s.codecWidth),!a.isEmitInfo&&(ee.debugLog(i(805),"Webcodecs Video Decoder initSize"),postMessage({cmd:Ee[i(1258)],w:s[i(1005)],h:s[i(1080)]}),a[i(610)]=!0,a[i(944)]=new OffscreenCanvas(s[i(1005)],s[i(1080)]),a[i(1096)]=a.offscreenCanvas[i(1038)]("2d")),ee[i(1033)][i(1035)],i(1125);try{a[i(495)][i(1084)](n),a[i(566)]=!0}catch(e){ee[i(491)]("worker",i(1231),e[i(623)],e,e[i(1041)]()),e.toString()}}else ee[i(933)]("worker",i(833)+s+" , payload is "+t[1]+i(1253))},reset(){const t=e;a.hasInit=!1,a[t(610)]=!1,a.offscreenCanvas=null,a[t(1096)]=null}});let K=function(){const t=e;if(N=!0,c)try{c[t(1189)](),c=null,ee[t(1162)](t(805),"abort success")}catch(e){c=null,ee.debugLog(t(805),t(1050),e)}},X={TAG_NAME:"worker nakedFlow",init(){const t=e;X[t(617)]=null,X.vps=null,X[t(732)]=null,X[t(636)]=null,X[t(756)]=null,X[t(988)]=0,X[t(301)]={},X.isSendSeqHeader=!1,ee.debugLog(X[t(392)],t(592))},destroy(){const t=e;X[t(617)]=null,X[t(1036)]=null,X[t(732)]=null,X.pps=null,X[t(756)]=null,X[t(988)]=0,X[t(301)]={},X[t(826)]=!1,ee[t(1162)](X[t(392)],t(1141))},dispatch(t){const r=e,n=new Uint8Array(t);if(ee[r(1033)][r(707)]){const e=X[r(806)](n);if(0===e[r(959)])return void ee[r(1162)](X[r(392)],r(864));X[r(751)](e)}else X.extractNALu$2(n)},getNaluDts(){const t=e,r=ee[t(1033)][t(791)];let n=X[t(988)];return X.localDts=X[t(988)]+parseInt(1e3/r,10),n},getNaluAudioDts(){const t=e,r=ee[t(1033)][t(971)],n=ee[t(1033)].audioBufferSize;return X[t(988)]+parseInt(n/r*1e3)},extractNALu(t){const r=e;let n,i,s=0,o=t.byteLength,a=0,c=[];for(;s1)for(let e=0;e{const t=r,n=Pr(e);n===Ue[t(636)]||n===Ue[t(732)]?X[t(1159)](e):Fr(n)&&i.push(e)})),1===i[r(959)])X[r(1159)](i[0]);else if(Rr(i)){const e=Pr(i[0]),t=Ur(e);X[r(785)](i,t,e)}else i[r(688)]((e=>{X[r(1159)](e)}))}else if(X[r(756)]===Me[r(530)])if(ee[r(1033)].nakedFlowH265DemuxUseNew){const e=X[r(1161)](t),n=X[r(1280)](e);if(0===n.length)return void ee[r(933)](r(805),r(737),r(825));const i=[];if(n.forEach((e=>{const t=r,n=an(e);n===Re.pps||n===Re.sps||n===Re[t(1036)]?X[t(501)](e):ln(n)&&i.push(e)})),1===i[r(959)])X.handleVideoH265Nalu(i[0]);else if(hn(i)){const e=an(i[0]),t=dn(e);X[r(771)](i,t,e)}else i[r(688)]((e=>{X[r(501)](e)}))}else an(t)===Re.pps?X.extractH265PPS(t):X[r(501)](t)},extractH264PPS(t){const r=e,n=X[r(1161)](t);X[r(1280)](n).forEach((e=>{const t=r;Mr(Pr(e))?X[t(365)](e):X[t(1159)](e)}))},extractH265PPS(t){const r=e,n=X[r(1161)](t);X.extractNALu(n)[r(688)]((e=>{const t=r;un(an(e))?X[t(750)](e):X[t(501)](e)}))},extractH264SEI(t){const r=e,n=X[r(1161)](t);X[r(1280)](n)[r(688)]((e=>{X[r(1159)](e)}))},extractH265SEI(t){const r=e,n=X[r(1161)](t);X.extractNALu(n)[r(688)]((e=>{X.handleVideoH265Nalu(e)}))},handleAddNaluStartCode(t){const r=e,n=[0,0,0,1],i=new Uint8Array(t[r(959)]+n[r(959)]);return i[r(1256)](n),i[r(1256)](t,n[r(959)]),i},handleVideoH264Nalu(t){const r=e,n=Pr(t);switch(n){case Ue[r(732)]:X.sps=t;break;case Ue[r(636)]:X[r(636)]=t}if(X[r(826)]){if(X.sps&&X[r(636)]){const e=Tr({sps:X[r(732)],pps:X[r(636)]}),t=X[r(988)];ee[r(1104)](e,{type:ke.video,ts:t,isIFrame:!0,cts:0}),X[r(732)]=null,X[r(636)]=null}if(Fr(n)){const e=Ur(n),i=X[r(992)](),s=Dr(t,e);X[r(1012)](s,{type:ke[r(1260)],ts:i,isIFrame:e,cts:0})}}else if(X[r(732)]&&X[r(636)]){X[r(826)]=!0;const e=Tr({sps:X[r(732)],pps:X[r(636)]});ee.decode(e,{type:ke[r(1260)],ts:0,isIFrame:!0,cts:0}),X[r(732)]=null,X[r(636)]=null}},handleVideoH264NaluList(t,r,n){const i=e;if(X[i(826)]){const e=X.getNaluDts(),s=Br(t.reduce(((e,t)=>{const r=i,n=At(e),s=At(t),o=new Uint8Array(n.byteLength+s[r(536)]);return o[r(1256)](n,0),o[r(1256)](s,n.byteLength),o})),r);X[i(1012)](s,{type:ke[i(1260)],ts:e,isIFrame:r,cts:0}),ee[i(1162)](i(805),i(1057)+t[i(959)]+i(388)+s.byteLength+i(909)+r+i(571)+n+i(506)+e)}},handleVideoH265Nalu(t){const r=e,n=an(t);switch(n){case Re[r(1036)]:X[r(1036)]=t;break;case Re[r(732)]:X.sps=t;break;case Re[r(636)]:X[r(636)]=t}if(X[r(826)]){if(X[r(1036)]&&X.sps&&X.pps){const e=nn({vps:X[r(1036)],sps:X.sps,pps:X[r(636)]}),t=X[r(988)];ee[r(1104)](e,{type:ke[r(1260)],ts:t,isIFrame:!0,cts:0}),X.vps=null,X[r(732)]=null,X[r(636)]=null}if(ln(n)){const e=dn(n),i=X[r(992)](),s=sn(t,e);X[r(1012)](s,{type:ke.video,ts:i,isIFrame:e,cts:0})}}else if(X[r(1036)]&&X[r(732)]&&X[r(636)]){X[r(826)]=!0;const e=nn({vps:X[r(1036)],sps:X[r(732)],pps:X.pps});ee[r(1104)](e,{type:ke[r(1260)],ts:0,isIFrame:!0,cts:0}),X[r(1036)]=null,X.sps=null,X[r(636)]=null}},handleVideoH265NaluList(t,r,n){const i=e;if(X.isSendSeqHeader){const e=X[i(992)](),s=on(t[i(779)](((e,t)=>{const r=i,n=At(e),s=At(t),o=new Uint8Array(n[r(536)]+s[r(536)]);return o[r(1256)](n,0),o[r(1256)](s,n[r(536)]),o})),r);X.doDecode(s,{type:ke.video,ts:e,isIFrame:r,cts:0}),ee.debugLog(i(805),i(1276)+t[i(959)]+" package length is "+s.byteLength+i(909)+r+i(571)+n+i(506)+e)}},doDecode(t,r){const n=e;ee[n(347)](r.ts),r[n(922)]&&ee[n(1191)](r.ts),ee[n(1104)](t,r)},handleVideoFrames(t){const r=e;if(!X[r(1251)])for(let e of t)if(X[r(1251)]=Vt(e),X[r(1251)])break;X[r(1251)]?X.streamVideoType===Me[r(748)]?X[r(1105)](t):X[r(1251)]===Me[r(530)]&&X[r(1064)](t):ee[r(933)]("worker","handleVideoFrames",r(804))},handleVideoH264Frames(t){const r=e;let n=[],i=[],s=!1,o=!1;X[r(301)][r(904)]&&(n=X[r(301)][r(904)],o=X[r(301)].vcl,s=X[r(301)][r(372)],X[r(301)]={});let a={};for(let e of t){if(e.byteLength<4)continue;const t=Pr(e);let c=!1,u=t===Ue[r(954)];(t===Ue[r(910)]||t===Ue[r(954)])&&(a=X[r(1102)](e),c=!0),n[r(959)]&&o&&(a[r(738)]||!c)&&(i[r(1170)]({units:n,isIFrame:s}),n=[],s=!1,o=!1),n[r(1170)](e),s=s||u,o=o||c}n[r(959)]&&(X[r(301)]={units:n,vcl:o,iFrame:s}),i[r(688)]((e=>{const t=r,n=e[t(904)],i=e.isIFrame;let s=null,o=null;if(n[t(688)]((e=>{const r=t,n=31&e[0];switch(n){case Ue[r(636)]:X[r(636)]=e;break;case Ue[r(732)]:X[r(732)]=e;break;case Ue[r(618)]:o=e}if(Fr(n)){const t=At(e);if(s){const e=new Uint8Array(s[r(536)]+t[r(536)]);e[r(1256)](s,0),e[r(1256)](t,s[r(536)]),s=e}else s=t}})),!X[t(826)]&&X[t(732)]&&X[t(636)]){X.isSendSeqHeader=!0;const e=xr({sps:X[t(732)],pps:X.pps});ee[t(1104)](e,{type:ke.video,ts:0,isIFrame:!0,cts:0}),X.sps=null,X[t(636)]=null}if(X[t(826)]){if(X[t(732)]&&X[t(636)]){const e=xr({sps:X[t(732)],pps:X[t(636)]}),r=X[t(988)];ee[t(1104)](e,{type:ke[t(1260)],ts:r,isIFrame:!0,cts:0}),X[t(732)]=null,X.pps=null}if(s){const e=X[t(992)](),r=Br(s,i);if(ee[t(1033)][t(1118)]&&o){const r=It(o,!1);postMessage({cmd:Ee[t(298)],buffer:r[t(508)],ts:e},[r.payload.buffer])}X[t(1012)](r,{type:ke.video,ts:e,isIFrame:i,cts:0})}}}))},handleVideoH265Frames(t){const r=e;let n=[],i=[],s=!1,o=!1;X.pendingUnits.units&&(n=X[r(301)][r(904)],o=X[r(301)][r(469)],s=X[r(301)][r(372)],X[r(301)]={});let a={};for(let e of t){if(e[r(536)]<4)continue;const t=an(e);let c=!1,u=dn(t);ln(t)&&(a=X[r(1202)](e),c=!0),n[r(959)]&&o&&(a.isfms||!c)&&(i.push({units:n,isIFrame:s}),n=[],s=!1,o=!1),n.push(e),s=s||u,o=o||c}n[r(959)]&&(X.pendingUnits={units:n,vcl:o,iFrame:s}),i[r(688)]((e=>{const t=r,n=e[t(904)],i=e[t(922)];let s=null,o=null;if(n.forEach((e=>{const r=t,n=e[0]>>>1&63;switch(n){case Re[r(636)]:X[r(636)]=e;break;case Re.sps:X[r(732)]=e;break;case Re[r(1036)]:X.vps=e;break;case Re[r(322)]:case Re.prefixSei:o=e}if(ln(n)){const t=At(e);if(s){const e=new Uint8Array(s[r(536)]+t[r(536)]);e[r(1256)](s,0),e[r(1256)](t,s[r(536)]),s=e}else s=t}})),!X.isSendSeqHeader&&X[t(732)]&&X[t(636)]&&X[t(1036)]){X.isSendSeqHeader=!0;const e=nn({sps:X[t(732)],pps:X.pps,vps:X.vps});ee[t(1104)](e,{type:ke[t(1260)],ts:0,isIFrame:!0,cts:0}),X[t(732)]=null,X[t(636)]=null,X.vps=null}if(X[t(826)]){if(X[t(732)]&&X[t(636)]&&X[t(1036)]){const e=nn({sps:X[t(732)],pps:X.pps,vps:X.vps}),r=X[t(988)];ee[t(1104)](e,{type:ke[t(1260)],ts:r,isIFrame:!0,cts:0}),X[t(732)]=null,X[t(636)]=null,X.vps=null}if(s){const e=X[t(992)](),r=on(s,i);if(ee._opt.isEmitSEI&&o){const r=It(o,!0);postMessage({cmd:Ee[t(298)],buffer:r.payload,ts:e},[r[t(508)].buffer])}X[t(1012)](r,{type:ke[t(1260)],ts:e,isIFrame:i,cts:0})}}}))},handleVideoH265Frames_1(t){const r=e;t[r(688)]((e=>{X[r(737)](e)}))},parseVideo264Header(t){const r=e,n=new Ja(t);return n[r(1e3)](),{isfms:0===n[r(1201)](),sType:n[r(1201)]()}},parseVideo265Header(t){const r=e,n=new Ja(t);return n.readUByte(),{nalType:n[r(1205)](6),isfms:0===n[r(1205)](1),sType:n.readBits(3)}}},Y={LOG_NAME:e(355),mp4Box:null,offset:0,videoTrackId:null,audioTrackId:null,isHevc:!1,listenMp4Box(){const t=e;Y[t(1153)]=Io[t(1254)](),Y[t(1153)][t(1194)]=Y[t(1194)],Y[t(1153)][t(962)]=Y.onError,Y[t(1153)].onSamples=Y[t(1106)],ee[t(1162)](Y[t(1052)],t(592))},destroy(){const t=e;Y[t(1153)]&&(Y[t(1153)].stop(),Y[t(1153)].flush(),Y[t(1153)][t(1141)](),Y[t(1153)]=null),Y[t(1029)]=0,Y[t(974)]=null,Y[t(1208)]=null,Y[t(837)]=!1,ee[t(1162)](Y.LOG_NAME,"destroy")},_getSeqHeader(t){const r=e,n=Y[r(1153)].getTrackById(t.id);for(const e of n[r(1006)][r(776)][r(821)][r(860)].entries)if(e.avcC||e[r(958)]){const t=new(Io[r(1265)])(void 0,0,Io.DataStream[r(961)]);let n=[];e[r(759)]?(e[r(759)][r(368)](t),n=[23,0,0,0,0]):(Y.isHevc=!0,ee[r(837)]=!0,e[r(958)].write(t),n=[28,0,0,0,0]);const i=new Uint8Array(t[r(787)],8),s=new Uint8Array(n.length+i[r(959)]);return s.set(n,0),s[r(1256)](i,n[r(959)]),s}return null},onReady(t){const r=e;ee[r(1162)](Y[r(1052)],r(411));const n=t.videoTracks[0],i=t.audioTracks[0];if(n){Y.videoTrackId=n.id;const e=Y._getSeqHeader(n);e&&(ee[r(1162)](Y[r(1052)],"seqHeader"),ee[r(967)](e,0,!0,0)),Y.mp4Box[r(911)](n.id)}if(i&&ee[r(1033)].hasAudio){Y[r(1208)]=i.id;const e=i[r(1178)]||{},t=ft.indexOf(e[r(1108)]),n=i[r(941)][r(857)](r(340),"");Y[r(1153)].setExtractionOptions(i.id);const s=pt({profile:parseInt(n,10),sampleRate:t,channel:e[r(865)]});ee[r(1162)](Y[r(1052)],r(475)),ee[r(496)](s,0)}Y.mp4Box[r(1095)]()},onError(t){const r=e;ee[r(491)](Y[r(1052)],r(551),t)},onSamples(t,r,n){const i=e;if(t===Y[i(974)]){for(const e of n){const t=e.data,r=e[i(755)],n=1e3*e[i(487)]/e[i(309)];e[i(814)],e[i(309)],r&&ee.calcIframeIntervalTimestamp(n);let s=null;s=Y[i(837)]?on(t,r):Br(t,r),ee[i(1104)](s,{type:ke.video,ts:n,isIFrame:r,cts:0})}Y[i(1153)].removeUsedSamples(t)}else if(t===Y[i(1208)]){if(ee[i(1033)][i(1113)]){for(const e of n){const t=e.data,r=1e3*e[i(487)]/e[i(309)];e[i(814)],e[i(309)];const n=new Uint8Array(t[i(536)]+2);n[i(1256)]([175,1],0),n[i(1256)](t,2),ee.decode(n,{type:ke[i(1178)],ts:r,isIFrame:!1,cts:0})}Y[i(1153)][i(329)](t)}}else ee.debugWarn(Y[i(1052)],"onSamples() trackId error",t)},dispatch(t){const r=e;let n=new Uint8Array(t);n[r(787)][r(1135)]=Y.offset,Y[r(1029)]+=n[r(536)],Y.mp4Box[r(341)](n[r(787)])}},J={LOG_NAME:e(649),lastBuffer:new Uint8Array(0),parsedOffset:0,firstStartCodeOffset:0,secondStartCodeOffset:0,state:"init",hasInitVideoCodec:!1,localDts:0,dispatch(t){const r=e,n=new Uint8Array(t);J[r(1280)](n)},destroy(){const t=e;J[t(1059)]=new Uint8Array(0),J.parsedOffset=0,J[t(311)]=0,J.secondStartCodeOffset=0,J[t(420)]="init",J[t(728)]=!1,J[t(988)]=0,ee[t(1162)](J[t(1052)],t(1141))},extractNALu(t){const r=e;if(!t||t.byteLength<1)return void ee[r(933)](J.LOG_NAME,"extractNALu() buffer error",t);const n=new Uint8Array(J[r(1059)][r(959)]+t.length);for(n[r(1256)](J[r(1059)],0),n[r(1256)](new Uint8Array(t),J[r(1059)][r(959)]),J[r(1059)]=n;;){if(J[r(420)]===r(592)){let e=!1;for(;J.lastBuffer[r(959)]-J[r(416)]>=4;)if(0===J[r(1059)][J.parsedOffset])if(0===J[r(1059)][J.parsedOffset+1])if(1===J[r(1059)][J[r(416)]+2]){if(182===J[r(1059)][J.parsedOffset+3]){J[r(420)]=r(766),J.firstStartCodeOffset=J.parsedOffset,J[r(416)]+=4,e=!0;break}J.parsedOffset++}else J.parsedOffset++;else J[r(416)]++;else J[r(416)]++;if(e)continue;break}if(J.state===r(766)){let e=!1;for(;J[r(1059)][r(959)]-J.parsedOffset>=4;)if(0===J.lastBuffer[J[r(416)]])if(0===J[r(1059)][J.parsedOffset+1])if(1===J[r(1059)][J.parsedOffset+2]){if(182===J[r(1059)][J[r(416)]+3]){J.state="findSecondStartCode",J.secondStartCodeOffset=J[r(416)],J[r(416)]+=4,e=!0;break}J[r(416)]++}else J[r(416)]++;else J[r(416)]++;else J[r(416)]++;if(e)continue;break}if(J[r(420)]===r(520)){if(!(J[r(1059)][r(959)]-J.parsedOffset>0))break;{let e,t=192&J.lastBuffer[J[r(416)]];e=0==t?J[r(745)]-14:J[r(745)];let n,i=0==(192&J[r(1059)][J[r(311)]+4]);if(i){if(J[r(311)]-14<0)return void ee[r(933)](J.LOG_NAME,r(886),J[r(311)]-14);!J.hasInitVideoCodec&&(J[r(728)]=!0,ee[r(1162)](J[r(1052)],"setCodec"),ne[r(802)](Pe[r(1046)],"",ee[r(477)]())),n=J[r(1059)][r(1142)](J.firstStartCodeOffset-14,e)}else n=J.lastBuffer[r(1142)](J[r(311)],e);let s=J[r(992)]();J[r(728)]?(postMessage({cmd:Ee[r(847)],type:Ce[r(542)],value:n[r(536)]}),postMessage({cmd:Ee[r(847)],type:Ce[r(462)],value:s}),_=s,ne[r(1104)](n,i?1:0,s)):ee[r(933)](J.LOG_NAME,r(604)),J[r(1059)]=J[r(1059)][r(1142)](e),J[r(311)]=0==t?14:0,J[r(416)]=J.firstStartCodeOffset+4,J[r(420)]=r(766)}}}},getNaluDts(){const t=e;let r=J[t(988)];return J[t(988)]=J[t(988)]+40,r}},Z={TAG_NAME:e(868),first_parse_:!0,tsPacketSize:0,syncOffset:0,pmt_:null,config_:null,media_info_:new Ga,timescale_:90,duration_:0,pat_:{version_number:0,network_pid:0,program_map_pid:{}},current_program_:null,current_pmt_pid_:-1,program_pmt_map_:{},pes_slice_queues_:{},section_slice_queues_:{},video_metadata_:{vps:null,sps:null,pps:null,details:null},audio_metadata_:{codec:null,audio_object_type:null,sampling_freq_index:null,sampling_frequency:null,channel_config:null},last_pcr_:null,audio_last_sample_pts_:void 0,aac_last_incomplete_data_:null,has_video_:!1,has_audio_:!1,video_init_segment_dispatched_:!1,audio_init_segment_dispatched_:!1,video_metadata_changed_:!1,audio_metadata_changed_:!1,loas_previous_frame:null,video_track_:{type:e(1260),id:1,sequenceNumber:0,samples:[],length:0},audio_track_:{type:e(1178),id:2,sequenceNumber:0,samples:[],length:0},_remainingPacketData:null,init(){},destroy(){const t=e;Z.media_info_=null,Z[t(386)]=null,Z[t(356)]=null,Z[t(628)]=null,Z.audio_metadata_=null,Z[t(846)]=null,Z[t(578)]=null,Z[t(713)]=null,Z[t(848)]=null,ee[t(1162)](Z[t(392)],"destroy")},probe(t){const r=e;let n=new Uint8Array(t),i=-1,s=188;if(n[r(536)]<=3*s)return{needMoreData:!0};for(;-1===i;){let e=Math[r(879)](1e3,n[r(536)]-3*s);for(let t=0;t=4&&(i-=4),{match:!0,consumed:0,ts_packet_size:s,sync_offset:i})},_initPmt:()=>({program_number:0,version_number:0,pcr_pid:0,pid_stream_type:{},common_pids:{h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0,g711a:void 0,g711u:void 0},pes_private_data_pids:{},timed_id3_pids:{},synchronous_klv_pids:{},asynchronous_klv_pids:{},scte_35_pids:{},smpte2038_pids:{}}),dispatch(t){const r=e;Z._remainingPacketData&&(t=va(Z[r(848)],t),Z[r(848)]=null);let n=t[r(787)];const i=Z[r(892)](n);i?Z[r(848)]=t[r(1142)](i):t[r(959)]>>6;e[1];let o=(31&e[1])<<8|e[2],a=(48&e[3])>>>4,c=15&e[3],u=!(!Z[r(1122)]||Z[r(1122)][r(360)]!==o),l={},d=4;if(2==a||3==a){let t=e[4];if(t>0&&(u||3==a)&&(l.discontinuity_indicator=(128&e[5])>>>7,l.random_access_indicator=(64&e[5])>>>6,l[r(619)]=(32&e[5])>>>5,(16&e[5])>>>4)){let t=300*(e[6]<<25|e[7]<<17|e[8]<<9|e[9]<<1|e[10]>>>7)+((1&e[10])<<8|e[11]);Z[r(1261)]=t}if(2==a||5+t===188){n+=188,204===Z[r(1069)]&&(n+=16);continue}d=5+t}if(1==a||3==a)if(0===o||o===Z[r(881)]||null!=Z[r(1122)]&&Z[r(1122)][r(382)][o]===za[r(437)]){let e=188-d;Z[r(1008)](t,n+d,e,{pid:o,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l.random_access_indicator})}else if(null!=Z[r(1122)]&&null!=Z[r(1122)][r(382)][o]){let e=188-d,i=Z[r(1122)].pid_stream_type[o];(o===Z[r(1122)].common_pids[r(748)]||o===Z[r(1122)][r(1223)][r(530)]||o===Z[r(1122)][r(1223)][r(1065)]||o===Z[r(1122)][r(1223)][r(982)]||o===Z[r(1122)][r(1223)][r(591)]||o===Z[r(1122)][r(1223)][r(559)]||o===Z[r(1122)][r(1223)][r(642)]||o===Z[r(1122)].common_pids[r(1089)]||o===Z[r(1122)][r(1223)][r(653)]||o===Z.pmt_[r(1223)][r(767)]||!0===Z[r(1122)].pes_private_data_pids[o]||!0===Z.pmt_[r(1075)][o]||!0===Z[r(1122)][r(863)][o]||!0===Z[r(1122)][r(364)][o])&&Z[r(764)](t,n+d,e,{pid:o,stream_type:i,payload_unit_start_indicator:s,continuity_conunter:c,random_access_indicator:l[r(920)]})}n+=188,204===Z[r(1069)]&&(n+=16)}return Z.dispatchAudioVideoMediaSegment(),n},handleSectionSlice(t,r,n,i){const s=e;let o=new Uint8Array(t,r,n),a=Z[s(356)][i[s(587)]];if(i.payload_unit_start_indicator){let e=o[0];if(null!=a&&0!==a[s(515)]){let o=new Uint8Array(t,r+1,Math[s(879)](n,e));a.slices[s(1170)](o),a.total_length+=o[s(536)],a[s(515)]===a[s(873)]?Z[s(678)](a,i):Z[s(914)](a,i)}for(let c=1+e;c=a[s(873)]&&Z[s(914)](a,i),c+=u[s(536)]}}else if(null!=a&&0!==a.total_length){let e=new Uint8Array(t,r,Math[s(879)](n,a[s(873)]-a[s(515)]));a.slices.push(e),a[s(515)]+=e[s(536)],a[s(515)]===a[s(873)]?Z[s(678)](a,i):a.total_length>=a.expected_length&&Z[s(914)](a,i)}},handlePESSlice(t,r,n,i){const s=e;let o=new Uint8Array(t,r,n),a=o[0]<<16|o[1]<<8|o[2];o[3];let c=o[4]<<8|o[5];if(i[s(492)]){if(1!==a)return void ee[s(933)](Z[s(392)],s(576)+a);let e=Z[s(386)][i[s(587)]];e&&(0===e[s(873)]||e[s(873)]===e[s(515)]?Z.emitPESSlices(e,i):Z.clearSlices(e,i)),Z.pes_slice_queues_[i.pid]=new Na,Z.pes_slice_queues_[i[s(587)]].random_access_indicator=i[s(920)]}if(null==Z.pes_slice_queues_[i[s(587)]])return;let u=Z.pes_slice_queues_[i[s(587)]];u[s(1130)].push(o),i[s(492)]&&(u[s(873)]=0===c?0:c+6),u.total_length+=o[s(536)],u[s(873)]>0&&u.expected_length===u[s(515)]?Z[s(606)](u,i):u[s(873)]>0&&u[s(873)]>>6,c=n[8];(2===a||3===a)&&(e=536870912*(14&n[9])+4194304*(255&n[10])+16384*(254&n[11])+128*(255&n[12])+(254&n[13])/2,i=3===a?536870912*(14&n[14])+4194304*(255&n[15])+16384*(254&n[16])+128*(255&n[17])+(254&n[18])/2:e);let u,l=9+c;if(0!==o){if(o<3+c)return void ee[r(933)](Z[r(392)],r(483));u=o-3-c}else u=n[r(536)]-l;let d=n[r(1142)](l,l+u);switch(t[r(851)]){case za[r(966)]:case za[r(1271)]:Z[r(525)](d,e);break;case za[r(757)]:Z.pmt_.common_pids[r(642)]===t[r(587)]?Z[r(937)](d,e):Z[r(1122)][r(1223)][r(591)]===t[r(587)]?Z[r(545)](d,e):Z[r(1122)].common_pids[r(559)]===t[r(587)]?Z.parseEAC3Payload(d,e):Z[r(1122)][r(364)][t.pid]?Z[r(1151)](d,t[r(587)],s):Z[r(1122)][r(695)][t[r(587)]]?Z.parseSMPTE2038MetadataPayload(d,e,i,t.pid,s):Z[r(1077)](d,e,i,t.pid,s);break;case za[r(1270)]:Z.parseADTSAACPayload(d,e);break;case za[r(391)]:Z[r(960)](d,e);break;case za[r(410)]:Z[r(545)](d,e);break;case za[r(607)]:Z[r(504)](d,e);break;case za[r(522)]:Z[r(1122)][r(1075)][t[r(587)]]?Z[r(1060)](d,e,i,t[r(587)],s):Z[r(1122)][r(863)][t[r(587)]]&&Z[r(934)](d,e,i,t[r(587)],s);break;case za.kH264:Z[r(1227)](d,e,i,t[r(920)]);break;case za[r(1017)]:Z[r(630)](d,e,i,t[r(920)]);break;case za[r(380)]:Z[r(859)](d,e,!0);break;case za[r(874)]:Z.parseG711Payload(d,e,!1);break;default:ee[r(1162)](Z[r(392)],r(682)+t.stream_type+r(807)+t[r(587)])}}else if((188===s||191===s||240===s||241===s||255===s||242===s||248===s)&&t.stream_type===za.kPESPrivateData){let e,i=6;e=0!==o?o:n[r(536)]-i;let a=n.subarray(i,i+e);Z[r(1077)](a,void 0,void 0,t[r(587)],s)}}else ee[r(491)](Z[r(392)],"parsePES: packet_start_code_prefix should be 1 but with value "+i)},parsePAT(t){const r=e;let n=t[0];if(0!==n)return void Log.e(Z[r(1185)],r(898)+n+r(627));let i=(15&t[1])<<8|t[2];t[3],t[4];let s=(62&t[5])>>>1,o=1&t[5],a=t[6];t[7];let c=null;if(1===o&&0===a)c={version_number:0,network_pid:0,program_pmt_pid:{}},c[r(326)]=s;else if(c=Z[r(1091)],null==c)return;let u=i-5-4,l=-1,d=-1;for(let e=8;e<8+u;e+=4){let n=t[e]<<8|t[e+1],i=(31&t[e+2])<<8|t[e+3];0===n?c[r(629)]=i:(c[r(640)][n]=i,-1===l&&(l=n),-1===d&&(d=i))}1===o&&0===a&&(null==Z.pat_&&ee[r(1162)](Z[r(392)],"Parsed first PAT: "+JSON[r(1073)](c)),Z[r(1091)]=c,Z.current_program_=l,Z.current_pmt_pid_=d)},parsePMT(t){const r=e;let n=t[0];if(2!==n)return void ee[r(491)](Z[r(392)],r(727)+n+" is not corresponded to PMT!");let i,s=(15&t[1])<<8|t[2],o=t[3]<<8|t[4],a=(62&t[5])>>>1,c=1&t[5],u=t[6];if(t[7],1===c&&0===u)i=Z[r(1072)](),i[r(716)]=o,i[r(326)]=a,Z[r(984)][o]=i;else if(i=Z[r(984)][o],null==i)return;i.pcr_pid=(31&t[8])<<8|t[9];let l=(15&t[10])<<8|t[11],d=12+l,h=s-9-l-4;for(let e=d;e0){for(let n=e+5;n0)for(let n=e+5;n1&&(ee.debugWarn(Z[n(392)],n(981)+"expected: "+e+n(512)+s+"ms"),s=e)}}let o,a=new bt(t),c=null,u=s;for(;null!=(c=a.readNextAACFrame());){i=1024/c[n(608)]*1e3;const e={codec:n(885),data:c};0==Z.audio_init_segment_dispatched_?(Z[n(615)]={codec:n(885),audio_object_type:c.audio_object_type,sampling_freq_index:c[n(305)],sampling_frequency:c[n(608)],channel_config:c[n(669)]},Z[n(1163)](e)):Z[n(752)](e)&&(Z[n(330)](),Z[n(1163)](e)),o=u;let t=Math[n(1262)](u);const r=new Uint8Array(c.data[n(959)]+2);r[n(1256)]([175,1],0),r.set(c[n(639)],2);let s={payload:r,length:r.byteLength,pts:t,dts:t,type:ke[n(1178)]};Z.audio_track_[n(440)][n(1170)](s),Z[n(713)][n(959)]+=r[n(536)],u+=i}a.hasIncompleteData()&&(Z[n(846)]=a[n(1243)]()),o&&(Z[n(708)]=o)},parseLOASAACPayload(t,r){const n=e;if(Z[n(612)]&&!Z[n(439)])return;if(Z[n(846)]){let e=new Uint8Array(t[n(536)]+Z[n(846)][n(536)]);e[n(1256)](Z[n(846)],0),e[n(1256)](t,Z[n(846)][n(536)]),t=e}let i,s;if(null!=r&&(s=r/Z[n(345)]),Z.audio_metadata_[n(941)]===n(885)){if(null==r&&null!=Z[n(708)])i=1024/Z[n(615)][n(608)]*1e3,s=Z[n(708)]+i;else if(null==r)return void ee[n(933)](Z[n(392)],n(769));if(Z.aac_last_incomplete_data_&&Z[n(708)]){i=1024/Z[n(615)].sampling_frequency*1e3;let e=Z[n(708)]+i;Math.abs(e-s)>1&&(ee[n(933)](Z[n(1185)],n(981)+(n(733)+e+n(512)+s+"ms")),s=e)}}let o,a=new wt(t),c=null,u=s;for(;null!=(c=a[n(519)](Ot(Z.loas_previous_frame)?void 0:Z[n(605)]));){Z[n(605)]=c,i=1024/c[n(608)]*1e3;const e={codec:n(885),data:c};0==Z[n(1088)]?(Z.audio_metadata_={codec:n(885),audio_object_type:c.audio_object_type,sampling_freq_index:c.sampling_freq_index,sampling_frequency:c[n(608)],channel_config:c[n(669)]},Z[n(1163)](e)):Z[n(752)](e)&&(Z[n(330)](),Z[n(1163)](e)),o=u;let t=Math[n(1262)](u);const r=new Uint8Array(c[n(639)].length+2);r[n(1256)]([175,1],0),r[n(1256)](c[n(639)],2);let s={payload:r,length:r[n(536)],pts:t,dts:t,type:ke[n(1178)]};Z[n(713)][n(440)].push(s),Z[n(713)][n(959)]+=r[n(536)],u+=i}a[n(304)]()&&(Z[n(846)]=a[n(1243)]()),o&&(Z[n(708)]=o)},parseAC3Payload(e,t){},parseEAC3Payload(e,t){},parseOpusPayload(e,t){},parseMP3Payload(t,r){const n=e;if(Z[n(612)]&&!Z.video_init_segment_dispatched_)return;let i=[44100,48e3,32e3,0],s=[22050,24e3,16e3,0],o=[11025,12e3,8e3,0],a=t[1]>>>3&3,c=(6&t[1])>>1,u=(t[2],(12&t[2])>>>2),l=3!=(t[3]>>>6&3)?2:1,d=0,h=34;switch(a){case 0:d=o[u];break;case 2:d=s[u];break;case 3:d=i[u]}switch(c){case 1:h=34,n(959);break;case 2:h=33,n(959);break;case 3:h=32,n(959)}const f={};f.object_type=h,f[n(1108)]=d,f[n(865)]=l,f.data=t;const p={codec:"mp3",data:f};0==Z[n(1088)]?(Z[n(615)]={codec:"mp3",object_type:h,sample_rate:d,channel_count:l},Z[n(1163)](p)):Z[n(752)](p)&&(Z[n(330)](),Z.dispatchAudioInitSegment(p));const m=new Uint8Array(t[n(959)]+1);m[n(1256)]([32],0),m[n(1256)](t,1);let v={payload:m,length:m[n(536)],pts:r/Z[n(345)],dts:r/Z[n(345)],type:ke[n(1178)]};Z[n(713)].samples[n(1170)](v),Z[n(713)][n(959)]+=m.byteLength},parseG711Payload(t,r,n){const i=e;if(Z.has_video_&&!Z[i(439)])return;const s={};s[i(1108)]=8e3,s[i(865)]=1;const o={codec:i(n?653:767)};0==Z[i(1088)]?(Z[i(615)]={codec:o[i(941)],sample_rate:s[i(1108)],channel_count:s[i(865)]},Z[i(1163)](o)):Z[i(752)](o)&&(Z[i(330)](),Z[i(1163)](o));const a=new Uint8Array(t[i(959)]+1),c=n?[114]:[130];a[i(1256)](c,0),a[i(1256)](t,1);let u={payload:a,length:a.byteLength,pts:r/Z[i(345)],dts:r/Z[i(345)],type:ke[i(1178)]};Z[i(713)][i(440)][i(1170)](u),Z.audio_track_[i(959)]+=a[i(536)]},detectAudioMetadataChange(t){const r=e;if(t[r(941)]!==Z.audio_metadata_.codec)return ee[r(1162)](Z.TAG_NAME,r(739)+(Z[r(615)][r(941)]+" to ")+t[r(941)]),!0;if(t.codec===r(885)&&Z.audio_metadata_.codec===r(885)){const e=t[r(639)];if(e[r(625)]!==Z.audio_metadata_[r(625)])return ee[r(1162)](Z[r(392)],r(693)+(Z[r(615)][r(625)]+r(333)+e.audio_object_type)),!0;if(e.sampling_freq_index!==Z[r(615)][r(305)])return ee.debugLog(Z[r(392)],r(968)+(Z[r(615)][r(305)]+r(333)+e[r(305)])),!0;if(e[r(669)]!==Z[r(615)][r(669)])return ee[r(1162)](Z.TAG_NAME,r(1219)+(Z[r(615)][r(669)]+r(333)+e[r(669)])),!0}else if(t[r(941)]===r(1187)&&Z[r(615)].codec===r(1187)){const e=t.data;if(e.sampling_frequency!==Z[r(615)][r(608)])return ee[r(1162)](Z[r(392)],r(997)+(Z.audio_metadata_[r(608)]+r(333)+e[r(608)])),!0;if(e[r(597)]!==Z.audio_metadata_[r(597)])return ee[r(1162)](Z[r(392)],r(413)+(Z[r(615)].bit_stream_identification+r(333)+e[r(597)])),!0;if(e[r(1255)]!==Z.audio_metadata_[r(1255)])return ee.debugLog(Z[r(392)],"AC3: BitStream Mode changed from "+Z[r(615)][r(1255)]+" to "+e[r(1255)]),!0;if(e[r(521)]!==Z.audio_metadata_.channel_mode)return ee[r(1162)](Z.TAG_NAME,"AC3: Channel Mode changed from "+Z[r(615)][r(521)]+" to "+e[r(521)]),!0;if(e[r(1158)]!==Z[r(615)][r(1158)])return ee[r(1162)](Z.TAG_NAME,r(1110)+(Z.audio_metadata_[r(1158)]+" to ")+e.low_frequency_effects_channel_on),!0}else if(t[r(941)]===r(642)&&Z[r(615)][r(941)]===r(642)){const e=t.meta;if(e[r(1108)]!==Z[r(615)][r(1108)])return ee.debugLog(Z[r(392)],"Opus: SamplingFrequencyIndex changed from "+(Z[r(615)].sample_rate+r(333)+e[r(1108)])),!0;if(e[r(865)]!==Z.audio_metadata_[r(865)])return ee.debugLog(Z[r(392)],r(609)+(Z[r(615)][r(865)]+" to ")+e[r(865)]),!0}else if(t[r(941)]===r(1089)&&Z.audio_metadata_[r(941)]===r(1089)){const e=t[r(639)];if(e[r(1154)]!==Z[r(615)].object_type)return ee[r(1162)](Z[r(392)],r(1257)+(Z[r(615)].object_type+" to ")+e[r(1154)]),!0;if(e[r(1108)]!==Z.audio_metadata_.sample_rate)return ee[r(1162)](Z[r(392)],r(761)+(Z[r(615)][r(1108)]+r(333)+e[r(1108)])),!0;if(e[r(865)]!==Z[r(615)][r(865)])return ee.debugLog(Z.TAG_NAME,"MP3: Channel count changed from "+(Z[r(615)][r(865)]+r(333)+e.channel_count)),!0}return!1},dispatchAudioInitSegment(t){const r=e;let n={};if(n[r(1045)]=r(1178),n.id=Z[r(713)].id,n[r(309)]=1e3,n[r(814)]=Z[r(540)],Z.audio_metadata_[r(941)]===r(885)){let e="aac"===t[r(941)]?t[r(639)]:null,i=new qa(e);n[r(783)]=i.sampling_rate,n.audioSampleRateIndex=i[r(969)],n[r(635)]=i.channel_count,n[r(941)]=i.codec_mimetype,n[r(808)]=i[r(445)],n[r(1229)]=i[r(1229)],n[r(1173)]=1024/n[r(783)]*n[r(309)],r(799);const s=pt({profile:ee[r(1033)][r(1011)]?i[r(1154)]:i[r(838)],sampleRate:n[r(426)],channel:n.channelCount});ee[r(496)](s,0)}else Z.audio_metadata_[r(941)]===r(1187)||"ec-3"===Z[r(615)][r(941)]||Z[r(615)].codec===r(642)||(Z[r(615)][r(941)]===r(1089)?(n[r(783)]=Z[r(615)].sample_rate,n.channelCount=Z[r(615)][r(865)],n[r(941)]=r(1089),n[r(808)]="mp3",n.config=void 0,r(312)):Z[r(615)][r(941)]===r(653)?(n.audioSampleRate=Z[r(615)][r(1108)],n[r(635)]=Z.audio_metadata_[r(865)],n[r(941)]=r(653),n.originalCodec=r(653),n[r(1229)]=void 0,r(380)):Z[r(615)].codec===r(767)&&(n[r(783)]=Z[r(615)][r(1108)],n[r(635)]=Z[r(615)].channel_count,n[r(941)]="g711u",n[r(808)]=r(767),n[r(1229)]=void 0,r(874)));0==Z.audio_init_segment_dispatched_&&ee[r(1162)](Z.TAG_NAME,r(1204)+n[r(941)]),Z.audio_init_segment_dispatched_=!0,Z[r(1248)]=!1},dispatchPESPrivateDataDescriptor(t,r,n){const i=e;let s={};s[i(587)]=t,s.stream_type=r,s[i(1009)]=n},parsePESPrivateDataPayload(t,r,n,i,s){const o=e;let a=new Wa;if(a[o(587)]=i,a.stream_id=s,a[o(1234)]=t.byteLength,a[o(639)]=t,null!=r){let e=Math[o(1262)](r/Z[o(345)]);a[o(560)]=e}else a[o(599)]=Z[o(890)]();if(null!=n){let e=Math[o(1262)](n/Z.timescale_);a.dts=e}},parseTimedID3MetadataPayload(t,r,n,i,s){const o=e;ee[o(1162)](Z[o(392)],o(1014)+i+o(900)+r+", dts="+n+o(1071)+s)},parseSynchronousKLVMetadataPayload(t,r,n,i,s){const o=e;ee[o(1162)](Z.TAG_NAME,o(963)+i+o(900)+r+o(586)+n+o(1071)+s)},parseAsynchronousKLVMetadataPayload(t,r,n){const i=e;ee[i(1162)](Z[i(392)],i(1114)+r+i(1071)+n)},parseSMPTE2038MetadataPayload(t,r,n,i,s){const o=e;ee[o(1162)](Z[o(392)],o(541)+i+o(900)+r+o(586)+n+o(1071)+s)},getNearestTimestampMilliseconds(){const t=e;return null!=Z[t(708)]?Math[t(1262)](Z[t(708)]):null!=Z[t(1261)]?Math[t(1262)](Z[t(1261)]/300/Z[t(345)]):void 0},_preDoDecode(){const t=e,r=Z.video_track_,n=Z[t(713)];let i=r[t(440)];Z[t(631)](r),Z[t(631)](n),n[t(440)][t(959)]>0&&(i=r.samples[t(656)](n.samples),i=i[t(690)](((e,r)=>{const n=t;return e.dts-r[n(1030)]}))),i[t(688)]((e=>{const r=t,n=new Uint8Array(e[r(508)]);delete e[r(508)],e[r(1045)]===ke[r(1260)]?Z[r(950)]({...e,payload:n}):e[r(1045)]===ke[r(1178)]&&Z._doDecodeAudio({...e,payload:n})})),r[t(440)]=[],r[t(959)]=0,n[t(440)]=[],n[t(959)]=0},_doDecodeVideo(t){const r=e,n=new Uint8Array(t[r(508)]);let i=null;i=t[r(837)]?on(n,t[r(922)]):Br(n,t[r(922)]),t[r(922)]&&ee[r(1191)](t.dts);const s=ee[r(390)](i,t[r(922)]);ee[r(1104)](s,{type:ke[r(1260)],ts:t.dts,isIFrame:t[r(922)],cts:t.cts})},_doDecodeAudio(t){const r=e,n=new Uint8Array(t[r(508)]),i=ee[r(1092)](n);ee[r(1104)](i,{type:ke.audio,ts:t[r(1030)],isIFrame:!1,cts:0})},correctSamplePts(t){const r=e;let n=arguments[r(959)]>1&&void 0!==arguments[1]?arguments[1]:5;const i=t[r(440)]||[];for(let e=0;e=s[r(1030)]&&(ee[r(933)](Z[r(392)],"correctSamplePts dts, dts: "+t.dts+r(668)+s.dts+r(1278)),s.dts=t[r(1030)]+n)}}},Q=null;Zt()&&(Q={TAG_NAME:e(978),_resetInIt(){const t=e;Q[t(538)]=null,Q[t(1120)]=null,Q[t(970)]={},Q[t(989)]={},Q.audioMeta={},Q[t(705)]=null,Q[t(374)]=null,Q[t(566)]=!1,Q.hasAudioInit=!1,Q[t(527)]=!1,Q[t(1143)]="",Q.audioMimeType="",Q[t(811)]={},Q[t(1252)]={},Q.timeInit=!1,Q[t(302)]=0,Q[t(896)]=0,Q[t(692)]=null,Q[t(568)]=null,Q.mediaSourceAppendBufferFull=!1,Q.mediaSourceAppendBufferError=!1,Q[t(325)]=!1,Q[t(824)]=!1,Q[t(1068)]=!1,Q[t(1056)]=null,Q[t(770)]=null,Q.prevDts=null,Q.prevAudioDts=null,Q.prevPayloadBufferSize=0,Q.isWidthOrHeightChanged=!1,Q[t(875)]=null,Q[t(324)]=null,Q[t(803)]=[],Q[t(648)]=[],Q.pendingSegments=[],Q[t(532)]=[],Q[t(762)]=[],Q[t(1100)]=null,Q.audioSourceBufferCheckTimeout=null,Q[t(362)]=null,Q[t(481)]=!1,Q[t(448)]={currentTime:0,readyState:0}},init(){const t=e;Q[t(1101)]=new ba,Q._resetInIt(),Q[t(482)]=new self.MediaSource,Q[t(471)]=!!Jt(ee[t(1033)][t(1097)]),Q[t(441)](),ee[t(1162)](Q[t(392)],t(592))},destroy(){const t=e;Q.stop(),Q._clearAudioSourceBufferCheckTimeout(),Q[t(803)]&&Q.eventListenList[t(959)]&&(Q[t(803)][t(688)]((e=>e())),Q[t(803)]=[]),Q[t(473)](),Q[t(482)]=null,ee[t(1162)](Q.TAG_NAME,t(1141))},getState(){const t=e;return Q[t(482)]&&Q[t(482)].readyState},isStateOpen(){const t=e;return Q[t(583)]()===ze[t(517)]},isStateClosed(){const t=e;return Q[t(583)]()===ze[t(760)]},isStateEnded(){const t=e;return Q[t(583)]()===ze[t(594)]},_bindMediaSourceEvents(){const t=e,{proxy:r}=Q[t(1101)],n=r(Q[t(482)],Ne[t(780)],(()=>{const e=t;ee.debugLog(Q[e(392)],"sourceOpen"),Q[e(654)]()})),i=r(Q[t(482)],Ne[t(975)],(()=>{const e=t;ee[e(1162)](Q[e(392)],"sourceClose")})),s=r(Q[t(482)],Ne[t(816)],(()=>{const e=t;ee[e(1162)](Q[e(392)],"sourceended")}));Q.eventListenList[t(1170)](n,i,s)},_onMediaSourceSourceOpen(){const t=e;!Q[t(705)]&&(ee.debugLog(Q[t(392)],t(1042)),Q[t(662)]()),!Q.audioSourceBuffer&&(ee.debugLog(Q[t(392)],t(977)),Q._initAudioSourceBuffer()),Q[t(632)]()&&Q[t(972)]()},decodeVideo(t,r,n,i){const s=e;if(ee[s(1116)])ee[s(933)](Q.TAG_NAME,s(899));else if(Jt(Q.hasInit))if(n&&t[1]===Ve[s(901)]){const e=15&t[0];if(e===Pe.h265&&Jt(ee[s(1033)][s(657)]))return void Q[s(1235)](xe.mediaSourceH265NotSupport);Q[s(970)][s(941)]=e,postMessage({cmd:Ee[s(546)],code:e});const i=new Uint8Array(t);postMessage({cmd:Ee[s(691)],buffer:i,codecId:e},[i[s(787)]]),Q[s(566)]=Q[s(947)](t,r,n,e)}else ee.debugWarn(Q.TAG_NAME,s(1053)+n+s(464)+t[1]+s(1253));else if(!Q[s(471)]&&n&&(Q[s(471)]=!0),Q[s(471)]){if(n&&0===t[1]){const e=15&t[0];let r={};e===Pe[s(748)]?r=Ar(t[s(797)](5)):e===Pe[s(530)]&&(r=en(t));const n=Q[s(970)];n&&n[s(451)]&&n[s(548)]&&r&&r[s(1005)]&&r[s(1080)]&&(r.codecWidth!==n[s(451)]||r.codecHeight!==n.height)&&(ee.debugWarn(Q.TAG_NAME,"\n decodeVideo: video width or height is changed,\n old width is "+n[s(451)]+", old height is "+n[s(548)]+",\n new width is "+r[s(1005)]+", new height is "+r.codecHeight+s(320)),Q[s(1067)]=!0,Q[s(1235)](xe[s(953)],s(946)+n[s(451)]+"->"+r[s(1005)]+s(758)+n[s(548)]+"->"+r[s(1080)]))}if(Q.isWidthOrHeightChanged)return void ee.debugWarn(Q[s(392)],"decodeVideo: video width or height is changed, and return");if(Xt(t))return void ee.debugLog(Q.TAG_NAME,s(1032));if(t[s(536)]0&&tge},_decodeConfigurationRecord(t,r,n,i){const s=e;let o=t[s(797)](5),a={};if(i===Pe[s(748)]?a=Ar(o):i===Pe[s(530)]&&(a=tn(o)),Q.videoInfo[s(451)]=a[s(1005)],Q[s(970)][s(548)]=a.codecHeight,0===a[s(1005)]&&0===a[s(1080)])return ee[s(933)](Q[s(392)],s(611),JSON[s(1073)](a)),Q[s(1235)](xe[s(1128)],s(1081)+(0===a.codecWidth)+s(1025)+a.codecHeight),!1;const c={id:Ke.video,type:s(1260),timescale:1e3,duration:0,avcc:o,codecWidth:a[s(1005)],codecHeight:a[s(1080)],videoType:a[s(1210)]},u=Sa[s(1200)](c);return Q.isAvc=i===Pe[s(748)],a[s(941)]?Q.videoMimeType=s(318)+a[s(941)]+'"':Q[s(1143)]=Q[s(538)]?Oe[s(1107)]:Oe[s(299)],postMessage({cmd:Ee[s(1258)],w:a.codecWidth,h:a[s(1080)]}),Q[s(662)](),Q.appendBuffer(u[s(787)]),Q[s(302)]=0,Q[s(811)]={},Q[s(1192)]=!1,!0},_decodeAudioConfigurationRecord(t,r){const n=e,i=t[0]>>4&15,s=t[0]>>1&1,o=i===Fe[n(312)],a=i===Fe[n(799)];if(Jt(a||o))return ee[n(933)](Q.TAG_NAME,n(562)+i+n(556)),Q[n(1235)](xe.mediaSourceAudioG711NotSupport),!1;const c={id:Ke[n(1178)],type:n(1178),timescale:1e3};let u={};if(mt(t)){if(u=gt(t[n(797)](2)),!u)return!1;c.audioSampleRate=u.sampleRate,c.channelCount=u.channelCount,c.config=u[n(1229)],c[n(1173)]=1024/c.audioSampleRate*c[n(309)]}else{if(!o)return!1;if(u=La(t[n(797)](1)),!u)return!1;c[n(783)]=u[n(971)],c.channelCount=u[n(635)],c[n(1173)]=1152/c[n(783)]*c[n(309)]}c[n(941)]=u[n(941)],c[n(814)]=0;let l=n(1125),d=u.codec,h=null;o&&Jt(ee[n(1033)][n(1078)])?(l=n(490),d="",h=new Uint8Array):h=Sa[n(1200)](c);let f=c[n(1045)]+"/"+l;return d&&d.length>0&&(f+=n(908)+d),Jt(Q[n(527)])&&(z=i===Fe[n(799)]?s?16:8:0===s?8:16,postMessage({cmd:Ee[n(877)],code:i}),postMessage({cmd:Ee[n(446)],sampleRate:c[n(783)],channels:c[n(635)],depth:z}),Q[n(527)]=!0),Q[n(485)]=f,Q[n(1120)]=a,Q._initAudioSourceBuffer(),Q[n(723)](h[n(787)]),!0},_initSourceBuffer(){const t=e,{proxy:r}=Q[t(1101)];if(null===Q.sourceBuffer&&null!==Q[t(482)]&&Q[t(455)]()&&Q[t(1143)]){try{ee[t(1162)](Q[t(392)],"_initSourceBuffer() mseDecoder.mediaSource.addSourceBuffer()",Q[t(1143)]),Q[t(705)]=Q[t(482)][t(383)](Q[t(1143)])}catch(e){return ee[t(491)](Q.TAG_NAME,t(929),e[t(623)],e.toString(),e),Q.emitError(xe.mseWorkerAddSourceBufferError,e.code),void(Q.mediaSourceAddSourceBufferError=!0)}if(Q[t(705)]){const e=r(Q[t(705)],t(697),(e=>{const r=t;Q[r(824)]=!0,ee[r(491)](Q.TAG_NAME,r(725),e),Q.emitError(xe[r(582)],r(494))})),n=r(Q[t(705)],t(620),(()=>{const e=t;Q[e(502)]()?Q[e(1148)]():Q[e(632)]()?Q[e(972)]():Q[e(481)]&&(ee.debugLog(Q.TAG_NAME,"videoSourceBuffer updateend and hasPendingEos is true, next endOfStream()"),Q[e(1237)]())}));Q[t(803)][t(1170)](e,n)}}else ee[t(1162)](Q[t(392)],t(888)+Q[t(455)]()+" and mseDecoder.isAvc === null is "+(null===Q[t(538)]))},_initAudioSourceBuffer(){const t=e,{proxy:r}=Q[t(1101)];if(null===Q.audioSourceBuffer&&null!==Q[t(482)]&&Q[t(455)]()&&Q[t(485)]){try{ee[t(1162)](Q[t(392)],t(720),Q.audioMimeType),Q[t(528)](),Q[t(374)]=Q.mediaSource[t(383)](Q[t(485)])}catch(e){return ee[t(491)](Q[t(392)],t(1119),e.code,e[t(1041)](),e),Q[t(1235)](xe[t(836)],e[t(623)]),void(Q.mediaSourceAddSourceBufferError=!0)}if(Q[t(374)]){const e=r(Q[t(374)],t(697),(e=>{const r=t;Q[r(824)]=!0,ee[r(491)](Q[r(392)],r(1115),e),Q[r(1235)](xe[r(582)],"mediaSource audio sourceBuffer error")})),n=r(Q[t(374)],t(620),(()=>{const e=t;Q._hasPendingRemoveRanges()?Q[e(1148)]():Q._hasPendingSegments()?Q._doAppendSegments():Q[e(481)]&&(ee[e(1162)](Q[e(392)],e(465)),Q[e(1237)]())}));Q[t(803)][t(1170)](e,n),null===Q[t(362)]&&(Q[t(362)]=setTimeout((()=>{const e=t;Q._clearAudioNoDataCheckTimeout(),Q[e(1235)](xe[e(581)])}),1e3))}}else ee.debugLog(Q[t(392)],t(1195)+Q[t(455)]()+t(699)+Q[t(485)])},_decodeVideo(t,r,n,i,s){const o=e;let a=t[o(797)](5),c=a[o(536)];if(0===c)return void ee.debugWarn(Q[o(392)],o(1022));let u=(new Date).getTime(),l=!1;!Q.prevTimestamp&&(Q[o(1056)]=u,l=!0);const d=u-Q[o(1056)];if(Q[o(770)]=d,d>1e3&&!l&&ee[o(980)]&&ee[o(1162)](Q[o(392)],"_decodeVideo now time is "+u+o(747)+Q.prevTimestamp+", diff time is "+d+o(1175)),Q[o(811)].id&&r>=Q.cacheTrack.dts){let e=8+Q[o(811)].size,t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t.set(Sa[o(327)][o(407)],4),t[o(1256)](Q.cacheTrack[o(639)],8),Q[o(811)].duration=r-Q[o(811)][o(1030)];let n=Sa[o(698)](Q[o(811)],Q[o(811)][o(1030)]);Q[o(811)]={};let i=new Uint8Array(n[o(536)]+t[o(536)]);i[o(1256)](n,0),i[o(1256)](t,n[o(536)]),Q[o(341)](i.buffer)}else ee[o(1162)](Q[o(392)],o(925)+r+o(1190)+s+" cacheTrack dts is "+(Q[o(811)]&&Q[o(811)].dts)),Q[o(1192)]=!1,Q[o(811)]={};!Q.cacheTrack&&(Q[o(811)]={}),Q[o(811)].id=Ke.video,Q[o(811)][o(302)]=++Q.sequenceNumber,Q[o(811)][o(866)]=c,Q[o(811)][o(1030)]=r,Q[o(811)][o(487)]=i,Q[o(811)][o(436)]=n,Q[o(811)][o(639)]=a,Q[o(811)][o(1272)]={isLeading:0,dependsOn:n?2:1,isDependedOn:n?1:0,hasRedundancy:0,isNonSync:n?0:1},Q[o(1056)]=(new Date)[o(1273)]()},_decodeAudio(t,r,n){const i=e;let s=Q[i(1120)]?t.slice(2):t[i(797)](1),o=s[i(536)];if(Q[i(1252)].id&&r>=Q[i(1252)][i(1030)]){let e=8+Q[i(1252)].size,t=new Uint8Array(e);t[0]=e>>>24&255,t[1]=e>>>16&255,t[2]=e>>>8&255,t[3]=255&e,t.set(Sa.types[i(407)],4),t[i(1256)](Q[i(1252)][i(639)],8),Q[i(1252)][i(814)]=r-Q[i(1252)][i(1030)];let n=Sa.moof(Q.cacheAudioTrack,Q[i(1252)].dts);Q[i(1252)]={};let s=new Uint8Array(n[i(536)]+t[i(536)]);s[i(1256)](n,0),s[i(1256)](t,n[i(536)]),Q[i(723)](s.buffer)}else Q[i(1252)]={};!Q[i(1252)]&&(Q[i(1252)]={}),Q[i(1252)].id=Ke[i(1178)],Q[i(1252)].sequenceNumber=++Q.audioSequenceNumber,Q[i(1252)][i(866)]=o,Q[i(1252)][i(1030)]=r,Q.cacheAudioTrack[i(487)]=0,Q[i(1252)][i(639)]=s,Q[i(1252)][i(1272)]={isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}},appendBuffer(t){const r=e;ee[r(1116)]?ee.debugWarn(Q[r(392)],r(554)):Q[r(325)]?ee[r(933)](Q[r(392)],r(543)):Q[r(1049)]?ee.debugWarn(Q.TAG_NAME,r(401)):Q[r(415)]?ee[r(933)](Q[r(392)],r(861)):Q.mediaSourceBufferError?ee[r(933)](Q[r(392)],"mseDecoder.mediaSourceBufferError is true"):(Q[r(1051)].push(t),Q[r(705)]&&(ee[r(1033)][r(308)]&&Q[r(687)]()&&Q[r(1198)](),Jt(Q[r(792)]())&&Q.isStateOpen()&&Jt(Q[r(502)]()))?Q[r(972)]():Q.isStateClosed()?(Q[r(824)]=!0,Q.emitError(xe[r(582)],r(979))):Q.isStateEnded()&&(Q.mediaSourceBufferError=!0,Q[r(1235)](xe[r(582)],"mediaSource is end")))},appendAudioBuffer(t){const r=e;ee[r(1116)]?ee[r(933)](Q[r(392)],r(1087)):Q.mediaSourceAddSourceBufferError?ee[r(933)](Q.TAG_NAME,"mseDecoder.mediaSourceAddSourceBufferError is true"):Q.mediaSourceAppendBufferFull?ee[r(933)](Q[r(392)],r(401)):Q[r(415)]?ee[r(933)](Q[r(392)],"mseDecoder.mediaSourceAppendBufferError is true"):Q[r(824)]?ee[r(933)](Q[r(392)],r(812)):(Q[r(762)][r(1170)](t),Q.audioSourceBuffer&&(ee[r(1033)][r(308)]&&Q[r(687)]()&&Q._doCleanUpSourceBuffer(),Jt(Q[r(489)]())&&Q.isStateOpen()&&Jt(Q[r(502)]()))?Q[r(972)]():Q[r(453)]()?(Q[r(824)]=!0,Q[r(1235)](xe[r(582)],r(979))):Q.isStateEnded()&&(Q[r(824)]=!0,Q[r(1235)](xe.mseSourceBufferError,r(813))))},getSourceBufferUpdating(){const t=e;return Q[t(705)]&&Q[t(705)][t(854)]},getAudioSourceBufferUpdating(){const t=e;return Q[t(374)]&&Q[t(374)][t(854)]},stop(){const t=e;Q[t(876)](),Q[t(498)](),Q[t(1237)]()},clearUpAllSourceBuffer(){const t=e;if(Q[t(705)]){const e=Q[t(705)][t(357)];for(let r=0;r0||Q.pendingAudioSegments[t(959)]>0},getPendingSegmentsLength(){const t=e;return Q.pendingSegments[t(959)]},_doAppendSegments(){const t=e;if(Q[t(453)]()||Q[t(1136)]())ee[t(1162)](Q[t(392)],"_doAppendSegments() mediaSource is closed or ended and return");else if(null!==Q[t(705)]){if(Q.needInitAudio()&&null===Q[t(374)])return ee[t(1162)](Q.TAG_NAME,"_doAppendSegments() audioSourceBuffer is null and need init audio source buffer"),void(null===Q[t(795)]&&(Q[t(795)]=setTimeout((()=>{const e=t;Q[e(528)](),Q[e(1235)](xe[e(856)])}),1e3)));if(Jt(Q[t(792)]())&&Q[t(1051)][t(959)]>0){const e=Q[t(1051)].shift();try{Q[t(705)].appendBuffer(e)}catch(e){ee[t(491)](Q[t(392)],t(724),e[t(623)],e),22===e[t(623)]?(Q[t(1103)](),Q.mediaSourceAppendBufferFull=!0,Q.emitError(xe[t(1172)],"code is "+e[t(623)]+" , message is "+e[t(518)])):11===e[t(623)]?(Q[t(1103)](),Q[t(415)]=!0,Q[t(1235)](xe.mediaSourceAppendBufferError,"code is "+e.code+t(1147)+e[t(518)])):(Q.stop(),Q.mediaSourceBufferError=!0,Q.emitError(xe[t(582)],t(595)+e[t(623)]+" , message is "+e.message))}}if(Jt(Q[t(489)]())&&Q[t(762)][t(959)]>0){const e=Q[t(762)][t(399)]();try{Q[t(374)][t(341)](e)}catch(e){ee.debugError(Q.TAG_NAME,t(940),e[t(623)],e),22===e[t(623)]?(Q[t(1103)](),Q[t(1049)]=!0,Q[t(1235)](xe[t(1172)],t(595)+e[t(623)]+t(1147)+e[t(518)])):11===e[t(623)]?(Q[t(1103)](),Q[t(415)]=!0,Q[t(1235)](xe[t(415)],t(595)+e[t(623)]+t(1147)+e[t(518)])):(Q[t(1103)](),Q[t(824)]=!0,Q[t(1235)](xe[t(582)],e[t(623)],t(595)+e.code+t(1147)+e.message))}}}else ee[t(1162)](Q[t(392)],"_doAppendSegments() sourceBuffer is null and wait init and return")},_doCleanUpSourceBuffer(){const t=e,r=Q[t(448)].currentTime;if(Q[t(705)]){const e=Q[t(705)][t(357)];let n=!1;for(let i=0;i=ee[t(1033)][t(641)]){n=!0;let e=r-ee[t(1033)][t(1224)];Q.pendingRemoveRanges[t(1170)]({start:s,end:e})}}else o=ee[t(1033)][t(641)]){n=!0;let e=r-ee._opt.mseAutoCleanupMinBackwardDuration;Q[t(532)][t(1170)]({start:s,end:e})}}else o0||Q[t(532)][t(959)]>0},needInitAudio(){const t=e;return ee[t(1033)][t(1113)]&&ee[t(1033)].mseDecodeAudio},_doRemoveRanges(){const t=e;if(Q[t(705)]&&Jt(Q[t(792)]())){let e=Q[t(648)];for(;e[t(959)]&&Jt(Q[t(792)]());){let r=e[t(399)]();try{Q[t(705)][t(788)](r[t(1095)],r[t(735)])}catch(e){ee[t(933)](Q[t(392)],t(1238),e,e.toString())}}}if(Q[t(374)]&&Jt(Q[t(489)]())){let e=Q[t(532)];for(;e[t(959)]&&Jt(Q[t(489)]());){let r=e[t(399)]();try{Q[t(374)][t(788)](r.start,r[t(735)])}catch(e){ee[t(933)](Q[t(392)],t(373),e,e[t(1041)]())}}}},_getPlaybackRate(){},_needCleanupSourceBuffer(){const t=e;if(Jt(ee[t(1033)][t(308)]))return!1;const r=Q[t(448)][t(943)];if(Q[t(705)]){let e=Q[t(705)][t(357)];if(e[t(959)]>=1&&r-e[t(1095)](0)>=ee[t(1033)][t(641)])return!0}if(Q.audioSourceBuffer){let e=Q[t(374)][t(357)];if(e.length>=1&&r-e[t(1095)](0)>=ee[t(1033)][t(641)])return!0}return!1},_clearAudioSourceBufferCheckTimeout(){const t=e;Q.audioSourceBufferCheckTimeout&&(clearTimeout(Q[t(795)]),Q[t(795)]=null)},_clearAudioNoDataCheckTimeout(){const t=e;Q[t(362)]&&(clearTimeout(Q[t(362)]),Q[t(362)]=null)},getHandle(){const t=e;return Q[t(482)][t(660)]},emitError(e){postMessage({cmd:Ee.mseError,value:e,msg:arguments.length>1&&void 0!==arguments[1]?arguments[1]:""})}});let ee={isPlayer:!0,isHevc:null,isPlayVod:!1,isPlayback:!1,isPlaybackPause:!1,dropping:!1,isPushDropping:!1,isWorkerFetch:!1,isDestroyed:!1,fetchStatus:qe[e(316)],_opt:q(),mp3Demuxer:null,delay:-1,pushLatestDelay:-1,firstTimestamp:null,startTimestamp:null,preDelayTimestamp:null,stopId:null,streamFps:null,streamAudioFps:null,streamVideoFps:null,writableStream:null,networkDelay:0,webglObj:null,socketStatus:De.notConnect,startStreamRateAndStatsInterval:function(){ee.stopStreamRateAndStatsInterval(),d=setInterval((()=>{const e=pc;l&&l(0);const t=JSON[e(1073)]({demuxBufferDelay:ee.getVideoBufferLength(),audioDemuxBufferDelay:ee[e(378)](),streamBufferByteLength:ee[e(480)](),netBuf:ee[e(781)]||0,pushLatestDelay:ee.pushLatestDelay||0,latestDelay:ee[e(552)],isStreamTsMoreThanLocal:w,wasmDecodeDelay:_-b});postMessage({cmd:Ee[e(847)],type:Ce[e(1214)],value:t}),er()&&(null===W&&(W=Dt()),tr(Dt()-W)&&ee[e(819)]())}),1e3)},stopStreamRateAndStatsInterval:function(){d&&(clearInterval(d),d=null)},_startCheckWsOpenTimeout:function(){const t=e;ee[t(1259)](),$=setTimeout((()=>{const e=t;if(ee[e(317)]===De[e(478)]){const t=e(1281)+ee[e(1033)][e(434)]+e(366)+ee.socketStatus;ee.debugError("worker",t),postMessage({cmd:Ee[e(847)],type:xe.websocketOpenTimeout,value:se[e(1279)],msg:t})}}),1e3*ee[t(1033)][t(434)])},_stopCheckWsOpenTimeout:function(){$&&(clearTimeout($),$=null)},useOffscreen:function(){const t=e;return ee[t(1033)].useOffscreen&&typeof OffscreenCanvas!=t(1098)},getDelay:function(t,r){const n=e;if(!t||ee[n(1033)][n(675)]&&!g)return-1;if(r===ke.audio)return ee.delay;if(ee.preDelayTimestamp&&ee[n(1156)]>t)return ee[n(1156)]-t>1e3&&ee[n(933)]("worker",n(1044)+ee[n(1156)]+n(884)+t+n(600)+(ee[n(1156)]-t)+n(459)+ee.delay),ee[n(1156)]=t,ee.delay;if(ee[n(839)]){if(t){const e=Date[n(1176)]()-ee[n(334)],r=t-ee.firstTimestamp;e>=r?(w=!1,ee[n(552)]=e-r):(w=!0,ee.delay=r-e)}}else ee[n(839)]=t,ee[n(334)]=Date[n(1176)](),ee[n(552)]=-1;return ee[n(1156)]=t,ee[n(552)]},getDelayNotUpdateDelay:function(t,r){const n=e;if(!t||ee[n(1033)][n(675)]&&!g)return-1;if(r===ke.audio)return ee[n(1197)];if(ee.preDelayTimestamp&&ee[n(1156)]-t>1e3)return ee.debugWarn(n(805),n(1240)+ee[n(1156)]+n(884)+t+n(600)+(ee.preDelayTimestamp-t)+n(731)),-1;if(ee[n(839)]){let e=-1;if(t){const r=Date[n(1176)]()-ee[n(334)],i=t-ee[n(839)];r>=i?(w=!1,e=r-i):(w=!0,e=i-r)}return e}return-1},resetDelay:function(){const t=e;ee[t(839)]=null,ee[t(334)]=null,ee[t(552)]=-1,ee.dropping=!1},resetAllDelay:function(){ee[e(655)](),ee.preDelayTimestamp=null},doDecode:function(t){const r=e;ee._opt[r(1118)]&&t.type===ke[r(1260)]&&ee[r(1031)]&&ee.findSei(t[r(508)],t.ts),ee[r(1212)]()?t.type===ke[r(1178)]?ee[r(1033)][r(1011)]?Q.decodeAudio(t[r(508)],t.ts):t[r(495)].decode(t[r(508)],t.ts):t[r(1045)]===ke[r(1260)]&&Q[r(967)](t.payload,t.ts,t[r(922)],t.cts):ee[r(1033)][r(1209)]&&ee[r(852)]()&&t[r(1045)]===ke[r(1260)]&&a[r(1104)]?a.decode(t[r(508)],t.ts,t[r(487)]):t.decoder.decode(t[r(508)],t.ts,t[r(922)],t.cts)},decodeNext(t){const r=e;if(0===s[r(959)])return;const i=t.ts,o=s[0],a=t[r(1045)]===ke[r(1260)]&&Xt(t[r(508)]);if(Jt(n))a&&(ee[r(1162)](r(805),r(510)+t.type+r(887)+i+" next data type is "+o[r(1045)]+r(1199)+o.ts+r(740)+a),s[r(399)](),ee[r(1012)](o));else{const e=o.ts-i,n=o[r(1045)]===ke[r(1178)]&&t[r(1045)]===ke[r(1260)];(e<=20||n||a)&&(ee.debugLog("worker","decode data type is "+t[r(1045)]+r(887)+i+r(596)+o[r(1045)]+" ts is "+o.ts+"\n diff is "+e+" and isVideoAndNextAudio is "+n+r(1220)+a),s.shift(),ee[r(1012)](o))}},init:function(){const t=e;ee[t(1162)](t(805),t(730)+n+t(598)+i+t(841),JSON[t(1073)](ee[t(1033)]));const r=ee[t(1033)].playType===oe[t(932)],o=ee._opt.playType===oe[t(741)],c=ee[t(1033)][t(531)]===oe[t(403)];if(ee._opt.isNakedFlow&&X.init(),ee[t(980)]=r,ee[t(1277)]=o,ee[t(350)]=c,ee[t(1212)]()&&Q&&Q[t(592)](),a&&ee[t(1033)][t(1209)]&&ee[t(852)]()&&a[t(592)](),Jt(ee.isPlaybackCacheBeforeDecodeForFpsRender())){ee[t(1162)](t(805),t(834));const e=()=>{const e=t,n=ee[e(1033)][e(918)]+ee._opt[e(931)];let i=null;if(s[e(959)]){if(ee[e(1222)])return void ee[e(933)](e(805),e(533)+s.length);if(ee[e(452)]){for(i=s.shift(),ee[e(933)](e(805),e(798)+i[e(922)]+" and delay is "+ee[e(552)]+e(398)+s[e(959)]);!i[e(922)]&&s[e(959)];)i=s.shift();const t=ee[e(681)](i.ts,i[e(1045)]);i[e(922)]&&t<=ee[e(1263)]()&&(ee.debugLog("worker",e(438)),ee[e(452)]=!1,ee[e(1012)](i),ee[e(371)](i))}else if(ee[e(1277)]||ee[e(956)]()||0===ee[e(1033)][e(918)])for(;s[e(959)];)i=s[e(399)](),ee[e(1012)](i);else if(i=s[0],-1===ee[e(685)](i.ts,i.type))ee.debugLog(e(805),e(1167),i.ts),s[e(399)](),ee.doDecode(i),ee[e(371)](i);else if(ee.delay>n&&r)ee[e(422)]()?(ee[e(1162)](e(805),e(1020)+ee[e(552)]+e(1169)+n+e(505)),ee[e(765)](),ee[e(452)]=!0,postMessage({cmd:Ee[e(402)]})):(s.shift(),ee[e(1012)](i),ee[e(371)](i));else for(;s[e(959)];){if(i=s[0],!(ee[e(685)](i.ts,i.type)>ee._opt[e(918)])){ee[e(552)]<0&&ee[e(933)](e(805),e(550)+ee.delay+e(955)+s[e(959)]);break}s[e(399)](),ee.doDecode(i)}}else-1!==ee[e(552)]&&ee[e(1162)](e(805),"loop() bufferList is empty and reset delay"),ee[e(765)]()};ee[t(817)]=setInterval((()=>{const r=t;let n=(new Date)[r(1273)]();!S&&(S=n);const i=n-S;i>100&&ee[r(933)]("worker",r(575)+i),e(),S=(new Date).getTime()}),20)}else ee[t(1162)](t(805),t(1131));if(Jt(ee[t(1033)][t(1097)])&&(g=!0),ee[t(1212)]()&&Q){const e=Q.getHandle();e&&postMessage({cmd:Ee[t(497)],mseHandle:e},[e])}},playbackCacheLoop:function(){const t=e;ee[t(935)]();for(let e=0;e{const e=t,n=(new Date)[e(1273)]();!G&&(G=n);for(let t=0;t1&&s.length>0&&ee[e(933)](e(805),e(393)+i+e(1047)+r+e(1249)+o+e(1221)+s[e(959)]),G=n}),r)},doPlaybackCacheLoop:function(){const t=e;let r=null;if(s[t(959)])if(r=s[t(399)](),r.type===ke[t(1260)]){ee[t(1021)]()?r.isIFrame&&(ee.debugLog(t(805),"doPlaybackCacheLoop() and isPlaybackOnlyDecodeIFrame is true and isIFrame is true, and ts is",r.ts),ee[t(1012)](r)):ee[t(1012)](r);let e=s[0];for(;e&&e[t(1045)]===ke[t(1178)];)s[t(399)](),ee[t(1021)]()||ee[t(1012)](e),e=s[0]}else if(r[t(1045)]===ke.audio){ee[t(1021)]()||ee[t(1012)](r);let e=s[0];for(;e;){if(r=s[t(399)](),r[t(1045)]===ke[t(1260)]){ee.isPlaybackOnlyDecodeIFrame()?r[t(922)]&&(ee[t(1162)](t(805),t(626),r.ts),ee[t(1012)](r)):ee[t(1012)](r),e=null;break}r[t(1045)]===ke[t(1178)]&&(ee[t(1021)]()||ee[t(1012)](r),e=s[0])}}},clearPlaybackCacheLoop:function(){const t=e;ee[t(817)]&&(clearInterval(ee[t(817)]),ee[t(817)]=null),G=null},startPlaybackCacheLoop:function(){ee.playbackCacheLoop()},close:function(){const t=e;if(ee[t(1162)](t(805),"close"),ee[t(1116)]=!0,K(),!u||1!==u[t(1028)]&&2!==u[t(1028)]?u&&ee.debugLog(t(805),t(1193)+u.readyState):(N=!0,u[t(819)](1e3,t(907))),u&&(u[t(421)]=null,u[t(712)]=null,u[t(476)]=null,u.onerror=null,ee[t(317)]=De.notConnect),u=null,ee.stopStreamRateAndStatsInterval(),ee[t(1259)](),ee[t(935)](),ee[t(817)]&&(clearInterval(ee.stopId),ee[t(817)]=null),ee[t(387)]&&(ee.mp3Demuxer[t(1141)](),ee.mp3Demuxer=null),ee[t(827)]&&(jt(ee[t(827)][t(819)])&&Jt(ee[t(827)][t(718)])?ee[t(827)][t(819)]()[t(643)]((e=>{const r=t;ee[r(1162)](r(805),r(1124),e[r(1041)](),e)}))[t(768)]((()=>{ee.writableStream=null})):ee.writableStream=null),re)try{jt(re[t(394)])&&re[t(394)](),jt(re.delete)&&re[t(976)](),re=null}catch(e){ee[t(1162)](t(805),t(985)+e.toString()+" and ignore")}if(ne)try{jt(ne[t(394)])&&ne[t(394)](),jt(ne.delete)&&ne.delete(),ne=null}catch(e){ee.debugLog("worker","close() and videoDecoder.clear error: "+e.toString()+t(1015))}l=null,S=null,w=!1,_=0,b=0,a&&(a.destroy&&a[t(1141)](),a=null),Q&&(Q[t(1141)](),Q=null),ee[t(839)]=null,ee[t(334)]=null,ee[t(781)]=0,ee[t(1121)]=null,ee[t(367)]=null,ee[t(710)]=null,ee[t(552)]=-1,ee[t(1197)]=-1,ee[t(1156)]=null,ee[t(452)]=!1,ee[t(1222)]=!1,ee[t(980)]=!0,ee[t(1277)]=!1,ee[t(983)]=!1,ee.isPlayVod=!1,ee.isWorkerFetch=!1,ee.isHevc=null,ee[t(1033)]=q(),ee[t(702)]&&(ee[t(702)][t(1141)](),ee[t(944)][t(621)](t(1181),ee.onOffscreenCanvasWebglContextLost),ee.offscreenCanvas[t(621)]("webglcontextrestored",ee.onOffscreenCanvasWebglContextRestored),ee[t(944)]=null,ee[t(336)]=null,ee[t(1096)]=null),s=[],o=[],h&&(h.close(),h=null),p=null,m=null,v=!1,y=!1,g=!1,U=!1,R=!1,L=!1,O=null,I=[],T=0,x=0,E=null,k=null,D=null,B=null,z=null,P=0,M=0,F=null,A=null,C=null,ee[t(1184)]=qe[t(316)],H=!0,X[t(1141)](),Y[t(1141)](),J[t(1141)](),Z[t(1141)](),ee[t(1061)]=null,ee[t(1033)]={},postMessage({cmd:Ee[t(1225)]})},pushBuffer:function(t,r){const i=e;if(r[i(1045)]===ke[i(1178)]&&mt(t)){if(ee[i(1162)](i(805),"pushBuffer audio ts is "+r.ts+i(500)),ee._opt[i(585)]){const e=new Uint8Array(t);postMessage({cmd:Ee[i(1149)],buffer:e},[e[i(787)]])}ee[i(496)](t,r.ts)}else if(r.type===ke.video&&r[i(922)]&&Xt(t)){if(ee[i(1162)](i(805),i(381)+r.ts+i(431)),ee[i(1033)].isRecordTypeFlv){const e=new Uint8Array(t);postMessage({cmd:Ee[i(567)],buffer:e},[e[i(787)]])}ee.decodeVideo(t,r.ts,r[i(922)],r[i(487)])}else{if(ee[i(1033)].isRecording)if(ee[i(1033)][i(585)]){const e=new Uint8Array(t);postMessage({cmd:Ee[i(1055)],type:r.type,buffer:e,ts:r.ts},[e[i(787)]])}else if(ee[i(1033)].recordType===ae[i(1125)])if(r[i(1045)]===ke.video){const e=new Uint8Array(t)[i(797)](5);postMessage({cmd:Ee[i(315)],buffer:e,isIFrame:r.isIFrame,ts:r.ts,cts:r[i(487)]},[e[i(787)]])}else if(r[i(1045)]===ke[i(1178)]&&ee[i(1033)][i(346)]){const e=new Uint8Array(t),n=vt(e)?e.slice(2):e.slice(1);postMessage({cmd:Ee[i(1040)],buffer:n,ts:r.ts},[n[i(787)]])}if(ee[i(980)]){if(r[i(1045)]===ke[i(1260)]){if(P>0){const e=r.ts-B,t=2*P;e>=t&&ee[i(1162)](i(805),i(1245)+r.isIFrame+" and\n ts is "+r.ts+i(835)+B+i(544)+e+i(1244)+P+i(644)+t+i(721))}if(null!==B&&B>=r.ts&&(ee[i(933)](i(805),i(1145)+r[i(922)]+i(307)+r.ts+" less than (or equal) preTs is "+B+i(1090)+t[i(536)]+i(858)+M),B-r.ts>ge&&(ee[i(933)](i(805),i(677)+B+i(661)+r.ts+i(544)+(B-r.ts)+i(600)+ge+i(942)),ee.resetAllDelay(),B=null,P=0),ee._opt.isDropSameTimestampGop&&Jt(r[i(922)])&&g)){const e=ee.hasIframeInBufferList(),t=Jt(ee[i(1222)]);return ee[i(1162)](i(805),i(694)+e+" and isNotPushDropping is "+t+i(396)),void(e&&t?ee.dropBuffer$2():(ee[i(1004)](!0),Yt(ee._opt[i(1097)])&&Yt(n)&&(ee[i(1212)]()?Q[i(471)]=!1:postMessage({cmd:Ee.checkFirstIFrame}))))}B>0&&(P=r.ts-B),M=t[i(536)],B=r.ts}if(g){const e=ee[i(1033)][i(918)]+ee._opt.videoBufferDelay,t=ee[i(681)](r.ts,r[i(1045)]);ee.pushLatestDelay=t,ee.delay>0&&t>e&&ee[i(552)]({type:e.type,ts:e.ts})));ee[t(1162)]("worker",t(1023)+e+t(1127)+s.length+t(845)+JSON[t(1073)](r));const n=100;s[t(959)]>=n&&(ee[t(933)](t(805),t(671)+s[t(959)]+t(600)+n+t(1152)),ee[t(710)]=25,postMessage({cmd:Ee.playbackStreamVideoFps,value:ee[t(710)]}),ee[t(1121)]=ee[t(710)],ee[t(872)]())}}},getVideoBufferLength(){const t=e;let r=0;return s[t(688)]((e=>{const n=t;e.type===ke[n(1260)]&&(r+=1)})),r},hasIframeInBufferList(){const t=e;return s[t(1266)]((e=>{const r=t;return e[r(1045)]===ke[r(1260)]&&e[r(922)]}))},isAllIframeInBufferList(){const t=e,r=ee[t(1123)]();let n=0;return s[t(688)]((e=>{const r=t;e[r(1045)]===ke[r(1260)]&&e.isIFrame&&(n+=1)})),r===n},getNotDroppingDelayTs(){const t=e;return ee[t(1033)][t(918)]+ee[t(1033)][t(931)]/2},getAudioBufferLength(){const t=e;let r=0;return s[t(688)]((e=>{const n=t;e.type===ke[n(1178)]&&(r+=1)})),r},getStreamBufferLength(){const t=e;let r=0;return h&&h[t(787)]&&(r=h.buffer[t(536)]),ee[t(1033)].isNakedFlow?X.lastBuf&&(r=X[t(617)][t(536)]):ee[t(1033)][t(763)]?Z._remainingPacketData&&(r=Z[t(848)][t(536)]):ee[t(1033)][t(300)]&&Y[t(1153)]&&(r=Y[t(1153)][t(323)]()),r},fetchStream:function(t){const r=e;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(ee.debugLog(r(805),r(579)+t,r(1001),JSON.stringify(n)),ee.isWorkerFetch=!0,n[r(404)]?ee[r(1033)][r(404)]=!0:n.isFmp4?ee[r(1033)][r(300)]=!0:n.isMpeg4?ee._opt.isMpeg4=!0:n[r(1241)]?ee[r(1033)][r(1241)]=!0:n.isTs&&(ee[r(1033)][r(763)]=!0),l=Mt((e=>{postMessage({cmd:Ee.workerFetch,type:Ce[r(930)],value:e})})),ee[r(592)](),ee.startStreamRateAndStatsInterval(),n[r(300)]&&Y[r(344)](),n.protocol===ie.fetch){n[r(404)]&&(h=new ar(ee[r(584)]())),c=new AbortController;const e=Object[r(878)]({signal:c.signal},{headers:n[r(1079)]&&n[r(1079)][r(849)]||{}});fetch(t,e)[r(1026)]((e=>{const t=r;if(Yt(N))return ee[t(1162)](t(805),t(1094)),ee[t(1184)]=qe[t(316)],void e[t(303)].cancel();if(!qt(e))return ee.debugWarn(t(805),"fetch response status is "+e.status+" and ok is "+e.ok+t(1180)),K(),void postMessage({cmd:Ee.workerFetch,type:xe.fetchError,value:t(796)+e[t(1063)]+t(789)+e.ok});if(postMessage({cmd:Ee[t(847)],type:Ce[t(883)]}),Wt())ee.writableStream=new WritableStream({write:e=>{const r=t;return c&&c[r(385)]&&c.signal[r(1269)]?(ee[r(1162)](r(805),r(701)),void(ee.fetchStatus=qe[r(1018)])):Yt(N)?(ee[r(1162)](r(805),"writableStream write() and requestAbort is true so return"),ee[r(1184)]=qe[r(1018)],void K()):void("string"!=typeof e?(ee.fetchStatus=qe.buffering,l(e[r(536)]),n[r(404)]?h[r(368)](e):n[r(300)]?ee[r(1168)](e):n[r(686)]?ee.demuxMpeg4(e):n[r(763)]?ee.demuxTs(e):n.isNakedFlow&&ee[r(1126)](e)):ee[r(933)]("worker",r(952)+e+r(1166)))},close:()=>{const e=t;ee.debugLog(e(805),e(945)),ee[e(1184)]=qe.complete,K(),ee[e(1033)].checkStreamEnd?(h&&(h[e(819)](),h=null),postMessage({cmd:Ee[e(847)],type:Ce[e(1218)],value:se[e(1093)],msg:e(871)})):postMessage({cmd:Ee[e(847)],type:Ce[e(547)]})},abort:e=>{const r=t;if(c&&c.signal&&c[r(385)][r(1269)])return ee.debugLog(r(805),r(734)),void(ee.fetchStatus=qe.complete);h&&(h[r(819)](),h=null),e[r(782)]!==je[r(1189)]?(ee.debugLog(r(805),r(310)+e.toString()),K(),postMessage({cmd:Ee[r(847)],type:xe[r(1196)],value:e.toString()})):ee[r(1162)](r(805),r(893))}}),e[t(303)][t(370)](ee.writableStream)[t(643)]((e=>{const r=t;"AbortError"!==e.name&&ee[r(1162)]("worker",r(714),e.name,e[r(1041)]())}));else{const r=e.body[t(964)](),i=()=>{const e=t;r[e(624)]().then((t=>{const r=e;let{done:s,value:o}=t;return s?(ee.debugLog(r(805),r(772)),ee.fetchStatus=qe.complete,K(),void(ee[r(1033)][r(773)]?(h&&(h.close(),h=null),postMessage({cmd:Ee[r(847)],type:Ce[r(1218)],value:se[r(1093)],msg:r(871)})):postMessage({cmd:Ee[r(847)],type:Ce.streamEndInner}))):c&&c[r(385)]&&c[r(385)][r(1269)]?(ee[r(1162)](r(805),"fetchNext().then() and abortController.signal.aborted is true so return"),void(ee[r(1184)]=qe[r(1018)])):Yt(N)?(ee.debugLog(r(805),r(1247)),ee.fetchStatus=qe[r(1018)],void K()):void(typeof o!==r(563)?(ee.fetchStatus=qe[r(553)],l(o[r(536)]),n[r(404)]?h[r(368)](o):n.isFmp4?ee[r(1168)](o):n[r(686)]?ee[r(389)](o):n[r(763)]?ee[r(916)](o):n[r(1241)]&&ee.demuxNakedFlow(o),i()):ee[r(933)](r(805),r(468)+o+r(862)))}))[e(643)]((t=>{const r=e;if(c&&c.signal&&c.signal.aborted)return ee[r(1162)](r(805),r(359)),void(ee[r(1184)]=qe[r(1018)]);h&&(h[r(819)](),h=null),t[r(782)]!==je[r(1189)]?(ee.debugLog(r(805),r(719)+t[r(1041)]()),K(),postMessage({cmd:Ee[r(847)],type:xe[r(1196)],value:t[r(1041)]()})):ee[r(1162)](r(805),"fetchNext().catch() and e.name is AbortError so return")}))};i()}})).catch((e=>{const t=r;c&&c[t(385)]&&c[t(385)][t(1269)]?ee[t(1162)](t(805),"fetch().catch() and abortController.signal.aborted is true so return"):e[t(782)]!==je[t(1189)]?(ee.debugLog(t(805),t(1228)+e[t(1041)]()),K(),postMessage({cmd:Ee[t(847)],type:xe[t(664)],value:e.toString()}),h&&(h[t(819)](),h=null)):ee.debugLog("worker",t(535))}))}else n[r(1027)]===ie[r(1279)]&&(n[r(404)]&&(h=new ar(ee[r(584)]())),u=new WebSocket(t,i),u[r(408)]=r(328),u[r(421)]=()=>{const e=r;ee.debugLog("worker",e(869)),ee[e(317)]=De[e(517)],ee._stopCheckWsOpenTimeout(),postMessage({cmd:Ee.workerFetch,type:Ce[e(883)]}),postMessage({cmd:Ee[e(847)],type:Ce[e(973)]}),n[e(1079)]&&n.options[e(449)]&&ee[e(425)](n.options[e(449)])},u[r(476)]=e=>{const t=r;if(ee[t(1116)])return void ee[t(1162)](t(805),"fetchStream, WebsocketStream socket close and code is "+e[t(623)]+t(938));if(f)return void ee.debugLog("worker",t(589)+e.code+" but isSocketError is true , so return");if(ee[t(1162)](t(805),t(589)+e.code),Yt(N))return void ee[t(1162)]("worker",t(1085));let n=!1;1006===e[t(623)]&&(ee[t(491)](t(805),t(784)+e[t(623)]),n=!0),ee.socketStatus=De[t(819)],ee[t(1033)].checkStreamEnd||n?(h&&(h[t(819)](),h=null),postMessage({cmd:Ee[t(847)],type:Ce[t(1218)],value:se.websocket,msg:e[t(623)]})):postMessage({cmd:Ee[t(847)],type:Ce[t(547)]})},u[r(987)]=e=>{const t=r;ee[t(491)](t(805),t(633),e,e[t(1041)]()),f=!0,ee.socketStatus=De[t(697)],h&&(h[t(819)](),h=null),ee[t(1116)]?ee[t(1162)](t(805),t(996)):Yt(N)?ee.debugLog(t(805),t(622)):postMessage({cmd:Ee[t(847)],type:xe[t(1003)],value:e[t(843)]?t(715):t(1034)})},u[r(712)]=e=>{const t=r;typeof e[t(639)]!==t(563)?(l(e[t(639)][t(536)]),n[t(404)]?h.write(e[t(639)]):n[t(300)]?ee.demuxFmp4(e[t(639)]):n[t(686)]?ee[t(389)](e.data):ee[t(1033)][t(1241)]?ee.demuxNakedFlow(e[t(639)]):ee[t(1033)][t(763)]?ee.demuxTs(e[t(639)]):ee[t(529)](e[t(639)])):postMessage({cmd:Ee.websocketStringMsg,value:e[t(639)]})})},demuxFlv:function*(){const t=e;yield 9;const r=new ArrayBuffer(4),n=new Uint8Array(r),i=new Uint32Array(r);for(;;){n[3]=0;const e=yield 15,r=e[4];n[0]=e[7],n[1]=e[6],n[2]=e[5];const s=i[0];n[0]=e[10],n[1]=e[9],n[2]=e[8],n[3]=e[11];let o=i[0];const a=(yield s)[t(797)]();switch(r){case Ie[t(1178)]:if(a[t(536)]>0){const e=ee[t(1092)](a);ee.decode(e,{type:ke[t(1178)],ts:o})}else ee.debugWarn(t(805),t(840)+a[t(536)]+t(897));break;case Ie[t(1260)]:if(a[t(536)]>=6){const e=a[0];if(ee[t(1177)](e))ee[t(572)](a,o);else{const e=15&a[0];let r=a[0]>>4===Ge;const n=e===Pe[t(530)];if(t(748),Jt(r)&&Yt(Qt(a,n))&&(ee[t(1162)](t(805),t(793)),r=!0),r&&Xt(a)&&null===ee[t(837)]){const e=15&a[0];ee.isHevc=e===Pe[t(530)],O=Tt(a,ee[t(837)]),ee[t(1162)](t(805),"demuxFlv() isVideoSequenceHeader is true and isHevc is "+ee[t(837)]+t(379)+O)}r&&ee.calcIframeIntervalTimestamp(o),ee[t(980)]&&ee.calcNetworkDelay(o),i[0]=a[4],i[1]=a[3],i[2]=a[2],i[3]=0;let s=i[0],c=ee.cryptoPayload(a,r);ee[t(1104)](c,{type:ke[t(1260)],ts:o,isIFrame:r,cts:s})}}else ee[t(933)](t(805),t(646)+a.byteLength+" and return");break;case Ie[t(993)]:postMessage({cmd:Ee[t(912)],buffer:a},[a[t(787)]]);break;default:ee.debugLog("worker",t(514)+r)}}},decode:function(t,r){const n=e;r[n(1045)]===ke[n(1178)]?ee[n(1033)].hasAudio&&(postMessage({cmd:Ee[n(847)],type:Ce[n(1211)],value:t.byteLength}),ee[n(980)]?ee[n(1138)](t,{type:r.type,ts:r.ts,cts:r.cts}):ee[n(1277)]&&(ee.isPlaybackOnlyDecodeIFrame()||(ee[n(516)]()?ee[n(1138)](t,{type:r[n(1045)],ts:r.ts,cts:r[n(487)]}):ee.pushBuffer(t,{type:r[n(1045)],ts:r.ts,cts:r[n(487)]})))):r[n(1045)]===ke.video&&ee[n(1033)].hasVideo&&(postMessage({cmd:Ee[n(847)],type:Ce[n(542)],value:t.byteLength}),postMessage({cmd:Ee[n(847)],type:Ce.streamDts,value:r.ts}),ee.isPlayer?ee[n(1138)](t,{type:r[n(1045)],ts:r.ts,isIFrame:r.isIFrame,cts:r.cts}):ee[n(1277)]&&(ee[n(516)]()?ee[n(1138)](t,{type:r[n(1045)],ts:r.ts,cts:r[n(487)],isIFrame:r.isIFrame}):ee[n(1021)]()?r[n(922)]&&ee.pushBuffer(t,{type:r.type,ts:r.ts,cts:r[n(487)],isIFrame:r[n(922)]}):ee.pushBuffer(t,{type:r[n(1045)],ts:r.ts,cts:r.cts,isIFrame:r[n(922)]})))},cryptoPayload:function(t,r){const n=e;let i=t;return ee[n(1033)][n(818)]?ee[n(1033)].cryptoIV&&ee._opt.cryptoIV.byteLength>0&&ee[n(1033)][n(965)]&&ee[n(1033)].cryptoKey[n(536)]>0?i=wo(t,ee[n(1033)][n(965)],ee[n(1033)][n(601)],ee[n(837)]):ee[n(491)](n(805),n(523)+(ee[n(1033)][n(965)]&&ee[n(1033)][n(965)][n(536)])+n(1016)+(ee[n(1033)][n(601)]&&ee[n(1033)][n(601)].byteLength)+" null"):ee[n(1033)][n(486)]?ee[n(1033)][n(414)]?i=ee[n(1033)][n(601)]&&ee._opt[n(601)][n(536)]>0&&ee._opt[n(965)]&&ee[n(1033)].cryptoKey[n(536)]>0?hc(t,ee[n(1033)][n(965)],ee[n(1033)][n(601)],ee[n(837)],ee._opt[n(335)]):Zo(t,ee[n(1033)][n(414)],ee[n(837)],ee[n(1033)][n(335)]):!ee[n(1033)][n(414)]&&ee[n(491)]("worker",n(673)):ee[n(1033)][n(831)]&&(ee[n(1033)][n(601)]&&ee[n(1033)][n(601)][n(536)]>0&&ee._opt.cryptoKey&&ee[n(1033)][n(965)][n(536)]>0?i=da(t,ee._opt.cryptoKey,ee[n(1033)].cryptoIV,ee[n(837)]):ee.debugError(n(805),n(352)+(ee[n(1033)][n(965)]&&ee[n(1033)][n(965)][n(536)])+" or cryptoIV.length is "+(ee._opt[n(601)]&&ee[n(1033)].cryptoIV.byteLength)+" null")),i},cryptoPayloadAudio:function(t){const r=e;if(Jt(ee[r(1033)][r(429)]))return t;let n=t;return ee._opt[r(818)]?ee[r(1033)].cryptoIV&&ee[r(1033)][r(601)][r(536)]>0&&ee[r(1033)].cryptoKey&&ee._opt[r(965)][r(536)]>0?t[0]>>4===Fe[r(799)]&&(n=So(t,ee[r(1033)].cryptoKey,ee._opt.cryptoIV)):ee[r(491)](r(805),r(523)+(ee._opt[r(965)]&&ee[r(1033)].cryptoKey.byteLength)+" or cryptoIV.length is "+(ee[r(1033)].cryptoIV&&ee._opt[r(601)].byteLength)+" null"):ee[r(1033)][r(831)]&&(ee[r(1033)][r(601)]&&ee[r(1033)].cryptoIV[r(536)]>0&&ee[r(1033)].cryptoKey&&ee[r(1033)][r(965)][r(536)]>0?t[0]>>4===Fe.AAC&&(n=ha(t,ee[r(1033)].cryptoKey,ee[r(1033)][r(601)])):ee[r(491)]("worker",r(352)+(ee[r(1033)].cryptoKey&&ee[r(1033)][r(965)][r(536)])+r(1016)+(ee[r(1033)][r(601)]&&ee[r(1033)][r(601)][r(536)])+r(917))),n},setCodecAudio:function(t,r){const n=e,s=t[0]>>4,o=t[0]>>1&1;if(z=s===Fe.AAC?o?16:8:0===o?8:16,re&&re.setCodec||!Jt(i))if(mt(t)||s===Fe.ALAW||s===Fe[n(1013)]||s===Fe[n(312)]){ee[n(1162)]("worker","setCodecAudio: init audio codec, codeId is "+s+n(696)+ee[n(1033)][n(971)]);const e=s===Fe[n(799)]?t[n(797)](2):new Uint8Array(0);if(i){if(s===Fe[n(312)])return void ee[n(491)]("worker",n(744));re[n(1108)]=ee[n(1033)][n(971)],re[n(1104)](t,r)}else re[n(802)](s,ee[n(1033)][n(971)],e,ee[n(477)]());if(s===Fe[n(799)]&&postMessage({cmd:Ee[n(509)],buffer:e},[e.buffer]),y=!0,s!==Fe.AAC&&(s===Fe.MP3?(!ee[n(387)]&&(ee[n(387)]=new aa(ee),ee[n(387)].on("data",((e,t)=>{re[n(1104)](e,t)}))),ee[n(387)][n(1239)](t[n(797)](1),r)):re[n(1104)](t[n(797)](1),r)),er()){const e=Number("1")||1;setTimeout((()=>{const e=n;ee.debugError(e(805),"Jb pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),ee[e(819)](),postMessage({cmd:Ee.workerEnd})}),60*e*60*1e3)}}else ee.debugWarn(n(805),n(580),s);else ee[n(491)](n(805),n(1186))},decodeAudio:function(t,r){const s=e;if(ee[s(1116)])ee.debugLog(s(805),s(321));else if(ee[s(358)]())Q[s(496)](t,r);else if(Yt(n)&&Yt(ee[s(1033)].mseDecodeAudio))postMessage({cmd:Ee[s(700)],payload:t,ts:r,cts:r},[t[s(787)]]);else{const e=t[0]>>4;if(y){if(mt(t))return void ee[s(1162)](s(805),s(1086));i?re[s(1104)](t,r):e===Fe.MP3?ee[s(387)][s(1239)](t.slice(1),r):re[s(1104)](e===Fe[s(799)]?t.slice(2):t[s(797)](1),r)}else ee[s(1010)](t,r)}},setCodecVideo:function(t,r){const n=e,s=15&t[0];if(ne&&ne[n(802)]||!Jt(i))if(Xt(t))if(s===Pe.h264||s===Pe[n(530)]){ee.debugLog(n(805),"setCodecVideo: init video codec , codecId is "+s);const e=t.slice(5);if(s===Pe[n(748)]&&ee[n(1033)][n(1054)]){const t=Ar(e);if(t[n(1005)]>_e||t.codecHeight>_e)return postMessage({cmd:Ee.simdH264DecodeVideoWidthIsTooLarge,value:n(946)+t[n(1005)]+" > 4080, height: "+t.codecHeight+n(1217)+_e}),void ee[n(933)](n(805),n(432)+t.codecWidth+n(742)+t[n(1080)])}const r=new Uint8Array(t);v=!0,i?ne[n(1104)](t,0):ne[n(802)](s,e,ee[n(477)]()),postMessage({cmd:Ee.videoCode,code:s}),postMessage({cmd:Ee[n(691)],buffer:r,codecId:s},[r[n(787)]])}else ee[n(933)](n(805),n(1109)+s+n(951));else ee[n(933)](n(805),n(774)+s+n(689)+r+" and packetType is "+t[1]);else ee.debugError(n(805),n(1083))},decodeVideo:function(t,r,s){const o=e;let a=arguments[o(959)]>3&&void 0!==arguments[3]?arguments[3]:0;if(ee.isDestroyed)ee.debugLog("worker",o(676));else if(ee.isPlayUseMSEAndDecoderInWorker())Q[o(967)](t,r,s,a);else if(Yt(n))postMessage({cmd:Ee[o(456)],payload:t,isIFrame:s,ts:r,cts:a,delay:ee[o(552)]},[t.buffer]);else if(v)if(!g&&s&&(g=!0),g){if(s&&Xt(t)){const e=15&t[0];let r={};e===Pe[o(748)]?r=Ar(t.slice(5)):e===Pe[o(530)]&&(r=en(t)),r[o(1005)]&&r[o(1080)]&&p&&m&&(r[o(1005)]!==p||r[o(1080)]!==m)&&(ee.debugWarn(o(805),"\n decodeVideo: video width or height is changed,\n old width is "+p+o(1066)+m+",\n new width is "+r[o(1005)]+", new height is "+r[o(1080)]+",\n and emit change event"),R=!0,postMessage({cmd:Ee[o(880)],value:o(946)+p+"->"+r.codecWidth+o(758)+m+"->"+r.codecHeight}))}if(R)return void ee.debugWarn(o(805),o(749));if(L)return void ee[o(933)](o(805),o(867));if(Xt(t))return void ee[o(1162)](o(805),o(1032));if(t[o(536)]0&&void 0!==arguments[0]&&arguments[0];ee[t(1162)](t(805),t(1207)+s.length+t(474)+r),r&&(s=[]),ee.isPlayer&&(ee[t(765)](),Yt(ee[t(1033)][t(1097)])&&(ee.dropping=!0,postMessage({cmd:Ee[t(402)]}))),Yt(ee[t(1033)][t(1097)])&&Jt(n)&&(g=!1)},dropBuffer$2:function(){const t=e;if(s[t(959)]>0){let e=s[t(775)]((e=>{const r=t;return Yt(e[r(922)])&&e.type===ke[r(1260)]}));if(ee[t(337)]())for(let r=0;r=ee[t(1263)]()){ee[t(1162)](t(805),t(375)+r+t(999)+i+" and notDroppingDelayTs is "+ee[t(1263)]()),e=r;break}}if(e>=0){ee[t(1222)]=!0,postMessage({cmd:Ee[t(402)]});const r=s[t(959)];s=s[t(797)](e);const n=s.shift();ee[t(765)](),ee[t(685)](n.ts,n[t(1045)]),ee[t(1012)](n),ee[t(1222)]=!1,ee[t(1162)](t(805),"dropBuffer$2() iFrameIndex is "+e+",and old bufferList length is "+r+t(830)+s.length+" and new delay is "+ee.delay+" ")}else ee[t(1222)]=!1}0===s.length&&(ee[t(1222)]=!1)},demuxM7s:function(t){const r=e,n=new DataView(t),i=n[r(418)](1,!1),s=n[r(895)](0),o=new ArrayBuffer(4),a=new Uint32Array(o);switch(s){case ke[r(1178)]:const e=ee[r(1092)](new Uint8Array(t,5));ee[r(1104)](e,{type:ke[r(1178)],ts:i});break;case ke[r(1260)]:if(n[r(536)]>=11){const e=new Uint8Array(t,5),s=e[0];if(ee._isEnhancedH265Header(s))ee[r(572)](e,i);else{const t=n[r(895)](5)>>4==1;if(t&&(ee[r(1191)](i),Xt(e)&&null===ee[r(837)])){const t=15&e[0];ee.isHevc=t===Pe[r(530)]}ee[r(980)]&&ee.calcNetworkDelay(i),a[0]=e[4],a[1]=e[3],a[2]=e[2],a[3]=0;let s=a[0],o=ee[r(390)](e,t);ee.decode(o,{type:ke[r(1260)],ts:i,isIFrame:t,cts:s})}}else ee[r(933)](r(805),r(1150)+t.byteLength+r(897))}},demuxNakedFlow:function(e){X.dispatch(e)},demuxFmp4:function(t){Y[e(1239)](t)},demuxMpeg4:function(t){J[e(1239)](t)},demuxTs:function(t){Z[e(1239)](t)},_decodeEnhancedH265Video:function(t,r){const n=e,i=t[0],s=48&i,o=15&i,a=t.slice(1,5),c=new ArrayBuffer(4),u=new Uint32Array(c),l="a"==String[n(349)](a[0]);if(ee[n(837)]=Jt(l),o===Ye.PACKET_TYPE_SEQ_START){if(s===Je.FT_KEY){const e=t[n(797)](5);if(l);else{const i=new Uint8Array(5+e.length);i[n(1256)]([28,0,0,0,0],0),i.set(e,5),O=Tt(t,ee[n(837)]),ee[n(1162)](n(805),n(828)+ee[n(837)]+" and nalUnitSize is "+O),ee[n(1104)](i,{type:ke[n(1260)],ts:r,isIFrame:!0,cts:0})}}}else if(o===Ye[n(424)]){let e=t,i=0;const o=s===Je.FT_KEY;o&&ee[n(1191)](r),l||(u[0]=t[4],u[1]=t[3],u[2]=t[2],u[3]=0,i=u[0],e=on(t[n(797)](8),o),e=ee.cryptoPayload(e,o),ee[n(1104)](e,{type:ke[n(1260)],ts:r,isIFrame:o,cts:i}))}else if(o===Ye[n(614)]){const e=s===Je[n(1070)];e&&ee.calcIframeIntervalTimestamp(r);let i=on(t[n(797)](5),e);i=ee[n(390)](i,e),ee.decode(i,{type:ke[n(1260)],ts:r,isIFrame:e,cts:0})}},_isEnhancedH265Header:function(e){return(e&Xe)===Xe},findSei:function(t,r){const n=e;let i=4;zt(O)&&(i=O),kt(t[n(797)](5),i)[n(688)]((e=>{const t=n,i=ee[t(837)]?e[0]>>>1&63:31&e[0],s=ee.isHevc&&(i===Re[t(322)]||i===Re[t(511)]),o=Jt(ee[t(837)])&&i===Ue[t(618)];if(s||o){const n=It(e,ee[t(837)]);postMessage({cmd:Ee[t(298)],buffer:n[t(508)],ts:r},[n[t(508)][t(787)]])}}))},calcNetworkDelay:function(t){const r=e;if(!(g&&t>0))return;null===E?(E=t,k=Dt()):tn?i-n:0;if(ee.networkDelay=s,s>ee._opt[r(781)]&&ee._opt.playType===oe[r(932)]){let e=!1;null===F&&(e=!0,F=Dt());const o=Dt();(o-F>=1e3||e)&&(ee[r(933)]("worker","calcNetworkDelay now dts:"+t+r(1242)+E+r(526)+n+r(430)+i+r(903)+s),postMessage({cmd:Ee[r(847)],type:Ce.networkDelayTimeout,value:s}),F=o)}},calcIframeIntervalTimestamp:function(t){null===D?D=t:D=ee[t(1033)][t(1250)]&&!(ee[t(1033)][t(822)]&&ee._opt[t(1011)])},isPlayUseMSE:function(){const t=e;return ee[t(980)]&&ee._opt[t(822)]&&Yt(n)},isPlayUseMSEAndDecoderInWorker:function(){const t=e;return ee[t(956)]()&&ee[t(1033)].mseDecoderUseWorker},isPlayUseMSEAndDecoderInWorkerAndMseDecodeAudio:function(){return ee[e(1212)]()&&ee._opt.mseDecodeAudio},playbackUpdatePlaybackRate:function(){},onOffscreenCanvasWebglContextLost:function(t){const r=e;ee.debugError(r(805),r(1215)),t.preventDefault(),U=!0,ee[r(702)][r(1141)](),ee.webglObj=null,ee[r(336)]=null,setTimeout((()=>{const e=r;ee[e(336)]=ee.offscreenCanvas[e(1038)](e(672)),ee[e(336)]&&ee[e(336)].getContextAttributes().stencil?(ee.webglObj=te(ee[e(336)],ee[e(1033)].openWebglAlignment),U=!1):ee[e(491)](e(805),e(645))}),500)},onOffscreenCanvasWebglContextRestored:function(t){const r=e;ee[r(1162)]("worker",r(400)),t.preventDefault()},videoInfo:function(t,r,n){const i=e;postMessage({cmd:Ee[i(546)],code:t}),postMessage({cmd:Ee[i(1258)],w:r,h:n}),p=r,m=n,ee[i(852)]()&&(ee.offscreenCanvas=new OffscreenCanvas(r,n),ee.offscreenCanvasGL=ee[i(944)][i(1038)](i(672)),ee[i(702)]=te(ee[i(336)],ee[i(1033)].openWebglAlignment),ee.offscreenCanvas[i(743)](i(1181),ee[i(1232)],!1),ee.offscreenCanvas[i(743)](i(613),ee[i(658)],!1))},audioInfo:function(e,t,r){postMessage({cmd:Ee.audioCode,code:e}),postMessage({cmd:Ee.initAudio,sampleRate:t,channels:r,depth:z}),x=r},yuvData:function(r,n){const i=e;if(ee.isDestroyed)return void ee[i(1162)](i(805),i(810));if(Jt(g))return void ee.debugLog(i(805),"yuvData, isVideoFirstIFrame is false and return");const s=p*m*3/2;try{let e=t.HEAPU8.subarray(r,r+s),o=new Uint8Array(e);if(A=null,b=n,ee[i(852)]())try{if(U)return;ee.webglObj[i(754)](p,m,o);let e=ee[i(944)][i(777)]();postMessage({cmd:Ee[i(342)],buffer:e,delay:ee[i(552)],ts:n},[e])}catch(e){ee[i(491)](i(805),i(1164),e,e[i(1041)]())}else postMessage({cmd:Ee[i(342)],output:o,delay:ee.delay,ts:n},[o[i(787)]])}catch(e){ee[i(933)]("worker",i(570)+n+i(588),e,e[i(1041)]())}},pcmData:function(t,n,i){const s=e;if(ee[s(1116)])return void ee[s(1162)](s(805),"pcmData, decoder is destroyed and return");let a=n,c=[],u=0;try{let e=ee[s(1033)][s(1132)];for(let e=0;e<2;e++){let n=r[s(479)][(t>>2)+e]>>2;c[e]=r[s(1133)][s(1142)](n,n+a)}if(T){if(!(a>=(n=e-T)))return T+=a,o[0]=Float32Array.of(...o[0],...c[0]),void(2==x&&(o[1]=Float32Array.of(...o[1],...c[1])));I[0]=Float32Array.of(...o[0],...c[0][s(1142)](0,n)),2==x&&(I[1]=Float32Array.of(...o[1],...c[1][s(1142)](0,n))),postMessage({cmd:Ee.playAudio,buffer:I,ts:i},I.map((e=>e.buffer))),u=n,a-=n}for(T=a;T>=e;T-=e)I[0]=c[0][s(797)](u,u+=e),2==x&&(I[1]=c[1][s(797)](u-e,u)),postMessage({cmd:Ee[s(443)],buffer:I,ts:i},I[s(842)]((e=>e[s(787)])));T&&(o[0]=c[0].slice(u),2==x&&(o[1]=c[1][s(797)](u))),c=[]}catch(e){ee[s(933)](s(805),s(815)+i+" create uint8Array error :",e,e[s(1041)]())}},errorInfo:function(t){const r=e;null===A&&(A=Dt());const n=Dt(),i=Bt(C>0?2*C:5e3,1e3,5e3),s=n-A;s>i&&(ee[r(933)](r(805),r(829)+C+r(1183)+s+r(644)+i+"\n and replay"),L=!0,postMessage({cmd:Ee[r(513)]}))},sendWebsocketMessage:function(t){const r=e;u?u.readyState===Be[r(517)]?(ee[r(1162)](r(805),r(499),t),u[r(458)](t)):ee.debugError(r(805),r(338),u.readyState):ee[r(491)](r(805),r(353))},timeEnd(){const t=e;ee.debugError("worker",t(435)),ee.close(),postMessage({cmd:Ee[t(442)]})},postStreamToMain(t,r){const n=e;postMessage({cmd:Ee[n(339)],type:r,buffer:t},[t[n(787)]])},updatePlaybackIsPause(t){const r=e;ee.debugLog("worker",r(470)+t),ee[r(983)]=t,Yt(t)?ee.clearPlaybackCacheLoop():ee.startPlaybackCacheLoop()},getBuildTime:()=>me+"-"+ye,validatedFailed(){const t=e;ee.debugError(t(805),"validatedFailed, please contact the author to get the correct license")},debugLog(t){const r=e;if(ee[r(1033)][r(1061)]&&ee[r(1061)]){for(var n=arguments[r(959)],i=new Array(n>1?n-1:0),s=1;s1?n-1:0),s=1;s1?n-1:0),s=1;s>2,p=t,m=r,postMessage({cmd:Ee.initVideo,w:t,h:r}),ee[n(852)]()&&(ee.offscreenCanvas=new OffscreenCanvas(t,r),ee[n(336)]=ee.offscreenCanvas[n(1038)]("webgl"),ee[n(702)]=te(ee[n(336)],ee._opt.openWebglAlignment),ee[n(944)][n(743)](n(1181),ee.onOffscreenCanvasWebglContextLost,!1),ee[n(944)][n(743)]("webglcontextrestored",ee[n(658)],!1))},initAudioPlanar:function(t,r){x=t,postMessage({cmd:Ee[e(446)],sampleRate:r,channels:t,depth:z})},playAudioPlanar:function(t,n,i){const s=e;if(ee.isDestroyed)return void ee[s(1162)](s(805),s(790));let a=n,c=[],u=0,l=ee[s(1033)][s(1132)];for(let e=0;e<2;e++){let n=r.HEAPU32[(t>>2)+e]>>2;c[e]=r[s(1133)][s(1142)](n,n+a)}if(T){if(!(a>=(n=l-T)))return T+=a,o[0]=Float32Array.of(...o[0],...c[0]),void(2==x&&(o[1]=Float32Array.of(...o[1],...c[1])));I[0]=Float32Array.of(...o[0],...c[0][s(1142)](0,n)),2==x&&(I[1]=Float32Array.of(...o[1],...c[1][s(1142)](0,n))),postMessage({cmd:Ee[s(443)],buffer:I,ts:i},I[s(842)]((e=>e[s(787)]))),u=n,a-=n}for(T=a;T>=l;T-=l)I[0]=c[0].slice(u,u+=l),2==x&&(I[1]=c[1][s(797)](u-l,u)),postMessage({cmd:Ee[s(443)],buffer:I,ts:i},I[s(842)]((e=>e.buffer)));T&&(o[0]=c[0][s(797)](u),2==x&&(o[1]=c[1][s(797)](u))),c=[]},draw:function(r,n,i,s){const o=e;if(ee[o(1116)])return void ee[o(1162)]("worker",o(590));const a=t[o(850)][o(1142)](n,n+j),c=t[o(850)][o(1142)](i,i+V),u=t[o(850)][o(1142)](s,s+V),l=new Uint8Array(j+V+V);if(l[o(1256)](a),l.set(c,j),l[o(1256)](u,j+V),A=null,b=r,ee[o(852)]())try{if(U)return;ee[o(702)][o(754)](p,m,l);let e=ee[o(944)][o(777)]();postMessage({cmd:Ee.render,buffer:e,delay:ee[o(552)],ts:r},[e])}catch(e){ee[o(491)]("worker",o(1164),e,e[o(1041)]())}else postMessage({cmd:Ee.render,output:l,delay:ee[o(552)],ts:r},[l[o(787)]])}}));let re=null;r[e(998)]&&(re=new(r[e(998)])(ee));let ne=null;t[e(638)]&&(ne=new(t[e(638)])(ee)),postMessage({cmd:Ee.init}),self[e(712)]=function(t){const r=e;let n=t[r(639)];switch(n.cmd){case Ae[r(592)]:try{ee[r(1033)]=Object[r(878)](ee[r(1033)],JSON[r(1171)](n[r(927)]))}catch(e){}ee.debugLog(r(805),r(406)+Ae[r(592)],n.opt);break;case Ae[r(1104)]:ee[r(1138)](n[r(787)],n[r(1079)]);break;case Ae[r(663)]:ee[r(496)](n[r(787)],n.ts);break;case Ae[r(986)]:ee.decodeVideo(n[r(787)],n.ts,n[r(922)]);break;case Ae.clearBuffer:ee.clearBuffer(n.needClear);break;case Ae[r(1213)]:ee[r(1213)](n[r(1144)],JSON[r(1171)](n[r(927)]),n.protocols);break;case Ae[r(819)]:ee[r(1162)](r(805),"onmessage:"+Ae[r(819)],JSON[r(1073)](n[r(1079)])),n[r(1079)]&&Jt(n.options[r(637)])&&(H=n[r(1079)][r(637)]),ee[r(819)]();break;case Ae[r(1264)]:ee[r(1162)]("worker",r(406)+Ae[r(1264)],n[r(331)],n[r(1129)]),ee[r(1033)][n[r(331)]]=n[r(1129)],n.key===r(1137)&&(ee.playbackUpdatePlaybackRate(),ee[r(516)]()&&Jt(ee[r(983)]));break;case Ae[r(1188)]:ee[r(425)](n[r(518)]);break;case Ae[r(417)]:Q[r(448)].currentTime=Number(n.message);break;case Ae.playbackIsPause:ee[r(801)](n[r(800)])}}}(e[1],t)}))[vc(207)]((e=>{const t=vc;console[t(201)]("JbPro[❌❌❌][wasm]:",e,e[t(205)]())}))})); diff --git a/ui/decoder-pro.wasm b/ui/decoder-pro.wasm index 1fc2b89..94d6383 100755 Binary files a/ui/decoder-pro.wasm and b/ui/decoder-pro.wasm differ diff --git a/ui/demo.html b/ui/demo.html index 7009e98..b25594f 100644 --- a/ui/demo.html +++ b/ui/demo.html @@ -40,7 +40,7 @@ } .container-shell:before { - content: "preview powered by jessibuca pro"; + content: "preview powered by jessibuca pro (v2.1.4)"; position: absolute; color: darkgray; top: 4px; @@ -109,9 +109,18 @@

-
MediaSource - Webcodec - SIMD +
+
+ 硬解码: + MediaSource + Webcodec +
+
+ 软解码: + WASM(默认) + WASM SIMD + WASM SIMD(V2) +
@@ -325,6 +334,8 @@ var $destroy = document.getElementById('destroy'); var $useMSE = document.getElementById('useMSE'); var $useSIMD = document.getElementById('useSIMD'); + var $useSIMDV2 = document.getElementById('useSIMDV2'); + var $useWASM = document.getElementById('useWASM'); var $useWCS = document.getElementById('useWCS'); var $videoBuffer = document.getElementById('videoBuffer'); var $videoBufferDelay = document.getElementById('videoBufferDelay'); @@ -413,6 +424,7 @@ useMSE: $useMSE.checked === true, useSIMD: $useSIMD.checked === true, useWCS: $useWCS.checked === true, + isFFmpegSIMD: $useSIMDV2.checked === true, showBandwidth: showOperateBtns, // 显示网速 showPerformance: showOperateBtns, // 显示性能 operateBtns: { @@ -464,7 +476,6 @@ $fps.textContent = ''; } - create(); function play() { @@ -521,6 +532,7 @@ const checked = $useMSE.checked; if (checked) { $useSIMD.checked = false; + $useSIMDV2.checked = false; $useWCS.checked = false; } replay(); @@ -532,6 +544,19 @@ $useMSE.checked = false; $useWCS.checked = false; } + else { + $useSIMDV2.checked = false; + } + replay(); + }); + + $useSIMDV2.addEventListener('click', function () { + const checked = $useSIMDV2.checked; + if (checked) { + $useSIMD.checked = true; + $useMSE.checked = false; + $useWCS.checked = false; + } replay(); }); @@ -540,6 +565,7 @@ if (checked) { $useMSE.checked = false; $useSIMD.checked = false; + $useSIMDV2.checked = false; } replay(); }); @@ -554,4 +580,4 @@ - \ No newline at end of file + diff --git a/ui/jessibuca-pro-demo.js b/ui/jessibuca-pro-demo.js index 47fa195..8b1e0ff 100644 --- a/ui/jessibuca-pro-demo.js +++ b/ui/jessibuca-pro-demo.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self)["jessibuca-demo"]=t()}(this,(function(){"use strict";const t=1,s=2,r=3,a=4,o=5,n=6,l="fetch",h="hls",d="websocket",c="webrtc",u="webTransport",p="worker",f="aliyunRtc",m="player",g="playerAudio",y="playbackTF",A="mp4",b="webm",v="flv",_="mov",w="flv",S="m7s",T="hls",E="webrtc",k="webTransport",C="nakedFlow",R="fmp4",x="mpeg4",D="aliyunRtc",L={flv:"FLV",m7s:"m7s",hls:"HLS",fmp4:"FMP4",mpeg4:"MPEG4",webrtc:"Webrtc",webTransport:"WebTransport",nakedFlow:"裸流",aliyunRtc:"aliyunRtc"},I="mse",P="wcs",B="offscreen",M="wasm",U="simd",F="mt",O="webrtc",N="hls",j="aliyunRtc",z="canvas",G="video",V="debug",H="warn",W="click",$="mouseDownAndUp",J={normal:"normal",simple:"simple"},K=36e5,q="/crypto/",Y="jbprov",Q=1e4,X={url:"",playbackConfig:{},fullscreenWatermarkConfig:{},playType:m,playbackForwardMaxRateDecodeIFrame:4,playOptions:{},isLive:!0,isMulti:!0,isM7sCrypto:!1,supportHls265:!0,playFailedUseLastFrameShow:!0,playFailedAndPausedShowMessage:!0,pauseAndNextPlayUseLastFrameShow:!1},Z={playType:m,container:"",videoBuffer:1e3,videoBufferDelay:1e3,networkDelay:1e4,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isFmp4:!1,isFmp4Private:!1,isWebrtc:!1,isWebrtcForZLM:!1,isWebrtcForSRS:!1,isWebrtcForOthers:!1,isNakedFlow:!1,isMpeg4:!1,isAliyunRtc:!1,debug:!1,debugLevel:H,debugUuid:"",isMulti:!0,multiIndex:-1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,pageVisibilityHiddenTimeout:300,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,heartTimeoutReplayUseLastFrameShow:!0,replayUseLastFrameShow:!0,replayShowLoadingIcon:!1,supportDblclickFullscreen:!1,showBandwidth:!1,showPerformance:!1,mseCorrectTimeDuration:20,keepScreenOn:!0,isNotMute:!1,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1,ptz:!1,quality:!1,zoom:!1,close:!1,scale:!1,performance:!1,logSave:!1,aiFace:!1,aiObject:!1,aiOcclusion:!1,fullscreenFn:null,fullscreenExitFn:null,screenshotFn:null,playFn:null,pauseFn:null,recordFn:null,recordStopFn:null},extendOperateBtns:[],contextmenuBtns:[],watermarkConfig:{},controlAutoHide:!1,hasControl:!1,loadingIcon:!0,loadingIconStyle:{},loadingText:"",background:"",backgroundLoadingShow:!1,loadingBackground:"",loadingBackgroundWidth:0,loadingBackgroundHeight:0,decoder:"decoder-pro.js",decoderAudio:"decoder-pro-audio.js",decoderHard:"decoder-pro-hard.js",wasmMp4RecorderDecoder:"jessibuca-pro-mp4-recorder-decoder.js",decoderWASM:"",isDecoderUseCDN:!1,url:"",rotate:0,mirrorRotate:"none",aspectRatio:"default",playbackConfig:{playList:[],fps:"",showControl:!0,controlType:J.normal,duration:0,startTime:"",showRateBtn:!1,rateConfig:[],showPrecision:"",showPrecisionBtn:!0,isCacheBeforeDecodeForFpsRender:!1,uiUsePlaybackPause:!1,isPlaybackPauseClearCache:!0,isUseFpsRender:!1,isUseLocalCalculateTime:!1,localOneFrameTimestamp:40,supportWheel:!1,useWCS:!1,useMSE:!1},qualityConfig:[],defaultStreamQuality:"",scaleConfig:["拉伸","缩放","正常"],forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:s,demuxType:w,useWasm:!1,useMSE:!1,useWCS:!1,useSIMD:!0,useMThreading:!1,wcsUseVideoRender:!0,wcsUseWebgl2Render:!0,wasmUseVideoRender:!0,mseUseCanvasRender:!1,hlsUseCanvasRender:!1,webrtcUseCanvasRender:!1,useOffscreen:!1,useWebGPU:!1,mseDecodeErrorReplay:!0,wcsDecodeErrorReplay:!0,wasmDecodeErrorReplay:!0,simdDecodeErrorReplay:!0,simdDecodeErrorReplayType:M,autoWasm:!0,decoderErrorAutoWasm:!0,hardDecodingNotSupportAutoWasm:!0,webglAlignmentErrorReplay:!0,webglContextLostErrorReplay:!0,openWebglAlignment:!1,syncAudioAndVideo:!0,syncAudioAndVideoDiff:400,playbackDelayTime:1e3,playbackFps:25,playbackForwardMaxRateDecodeIFrame:4,playbackCurrentTimeMove:!0,useVideoRender:!0,useCanvasRender:!1,networkDelayTimeoutReplay:!1,recordType:A,checkFirstIFrame:!0,nakedFlowFps:25,audioEngine:null,isShowRecordingUI:!0,isShowZoomingUI:!0,useFaceDetector:!1,useObjectDetector:!1,useImageDetector:!1,useOcclusionDetector:!1,ptzClickType:W,ptzStopEmitDelay:.3,ptzZoomShow:!1,ptzApertureShow:!1,ptzFocusShow:!1,ptzMoreArrowShow:!1,weiXinInAndroidAudioBufferSize:4800,isM7sCrypto:!1,m7sCryptoAudio:!1,isSm4Crypto:!1,isXorCrypto:!1,sm4CryptoKey:"",m7sCryptoKey:"",xorCryptoKey:"",cryptoKey:"",cryptoIV:"",cryptoKeyUrl:"",autoResize:!1,useWebFullScreen:!1,ptsMaxDiff:3600,aiFaceDetectLevel:2,aiFaceDetectWidth:240,aiFaceDetectShowRect:!0,aiFaceDetectInterval:1e3,aiFaceDetectRectConfig:{},aiObjectDetectLevel:2,aiObjectDetectWidth:240,aiObjectDetectShowRect:!0,aiObjectDetectInterval:1e3,aiObjectDetectRectConfig:{},aiOcclusionDetectInterval:1e3,aiImageDetectDrop:!1,aiImageDetectActive:!1,videoRenderSupportScale:!0,mediaSourceTsIsMaxDiffReplay:!0,controlHtml:"",isH265:!1,isWebrtcH265:!1,supportLockScreenPlayAudio:!0,supportHls265:!0,isEmitSEI:!1,pauseAndNextPlayUseLastFrameShow:!1,demuxUseWorker:!0,playFailedAndReplay:!0,showMessageConfig:{webglAlignmentError:"Webgl 渲染失败",webglContextLostError:"webgl 上下文丢失",mediaSourceH265NotSupport:"不支持硬解码H265",mediaSourceFull:"缓冲区已满",mediaSourceAppendBufferError:"初始化解码器失败",mseSourceBufferError:"解码失败",mseAddSourceBufferError:"初始化解码器失败",mediaSourceDecoderConfigurationError:"初始化解码器失败",mediaSourceTsIsMaxDiff:"流异常",mseWidthOrHeightChange:"流异常",mediaSourceAudioG711NotSupport:"硬解码不支持G711a/u音频格式",mediaSourceUseCanvasRenderPlayFailed:"MediaSource解码使用canvas渲染失败",webcodecsH265NotSupport:"不支持硬解码H265",webcodecsUnsupportedConfigurationError:"初始化解码器失败",webcodecsDecodeConfigureError:"初始化解码器失败",webcodecsDecodeError:"解码失败",wcsWidthOrHeightChange:"解码失败",wasmDecodeError:"解码失败",simdDecodeError:"解码失败",wasmWidthOrHeightChange:"流异常",wasmUseVideoRenderError:"video自动渲染失败",videoElementPlayingFailed:"video自动渲染失败",simdH264DecodeVideoWidthIsTooLarge:"不支持该分辨率的视频",networkDelayTimeout:"网络超时重播失败",fetchError:"请求失败",streamEnd:"请求结束",websocketError:"请求失败",webrtcError:"请求失败",hlsError:"请求失败",decoderWorkerInitError:"初始化worker失败",videoElementPlayingFailedForWebrtc:"video自动渲染失败",videoInfoError:"解析视频分辨率失败",webrtcStreamH265:"webrtc不支持H265",hlsV2Mp4NotSupport:"Hls解码器不支持解码",delayTimeout:"播放超时重播失败",loadingTimeout:"加载超时重播失败",loadingTimeoutRetryEnd:"加载超时重播失败",delayTimeoutRetryEnd:"播放超时重播失败"},videoElementPlayingFailedReplay:!0,mp4RecordUseWasm:!0,mseAutoCleanupSourceBuffer:!0,mseAutoCleanupMaxBackwardDuration:30,mseAutoCleanupMinBackwardDuration:10,widthOrHeightChangeReplay:!0,simdH264DecodeVideoWidthIsTooLargeReplay:!0,mediaSourceAudioG711NotSupportReplay:!0,mediaSourceAudioInitTimeoutReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplayType:G,ghostWatermarkConfig:{on:5,off:5,content:"",fontSize:12,color:"white",opacity:.15,speed:.2},dynamicWatermarkConfig:{content:"",speed:.2,fontSize:12,color:"white",opacity:.15},isDropSameTimestampGop:!1,mseDecodeAudio:!0,nakedFlowH265DemuxUseNew:!0},ee="init",te="initVideo",ie="render",se="playAudio",re="initAudio",ae="audioCode",oe="audioNalu",ne="audioAACSequenceHeader",le="videoCode",he="videoCodec",de="videoNalu",ce="videoPayload",ue="audioPayload",pe="wasmError",fe="workerFetch",me="iframeIntervalTs",ge="isDropping",ye="workerEnd",Ae="playbackStreamVideoFps",be="wasmDecodeVideoNoResponseError",ve="wasmWidthOrHeightChange",_e="simdDecodeError",we="simdH264DecodeVideoWidthIsTooLarge",Se="closeEnd",Te="tempStream",Ee="videoSEI",ke="flvScriptData",Ce="aacSequenceHeader",Re="videoSequenceHeader",xe="flvBufferData",De="checkFirstIFrame",Le="Invalid NAL unit size",Ie=1,Pe=2,Be=8,Me=9,Ue=18,Fe="init",Oe="decode",Ne="audioDecode",je="videoDecode",ze="close",Ge="updateConfig",Ve="clearBuffer",He="fetchStream",We="sendWsMessage",$e="fetch",Je="destroy",Ke="buffer",qe="fetchError",Ye="fetchClose",Qe="fetchSuccess",Xe={fullscreen:"fullscreen$2",webFullscreen:"webFullscreen",decoderWorkerInit:"decoderWorkerInit",play:"play",playing:"playing",pause:"pause",mute:"mute",load:"load",loading:"loading",zooming:"zooming",videoInfo:"videoInfo",timeUpdate:"timeUpdate",audioInfo:"audioInfo",log:"log",error:"error",kBps:"kBps",timeout:"timeout",delayTimeout:"delayTimeout",delayTimeoutRetryEnd:"delayTimeoutRetryEnd",loadingTimeout:"loadingTimeout",loadingTimeoutRetryEnd:"loadingTimeoutRetryEnd",stats:"stats",performance:"performance",videoSmooth:"videoSmooth",faceDetectActive:"faceDetectActive",objectDetectActive:"objectDetectActive",occlusionDetectActive:"occlusionDetectActive",imageDetectActive:"imageDetectActive",record:"record",recording:"recording",recordingTimestamp:"recordingTimestamp",recordStart:"recordStart",recordEnd:"recordEnd",recordCreateError:"recordCreateError",recordBlob:"recordBlob",buffer:"buffer",videoFrame:"videoFrame",videoSEI:"videoSEI",start:"start",metadata:"metadata",resize:"resize",volumechange:"volumechange",destroy:"destroy",beforeDestroy:"beforeDestroy",streamEnd:"streamEnd",streamRate:"streamRate",streamAbps:"streamAbps",streamVbps:"streamVbps",streamDts:"streamDts",streamSuccess:"streamSuccess",streamMessage:"streamMessage",streamError:"streamError",streamStats:"streamStats",mseSourceOpen:"mseSourceOpen",mseSourceClose:"mseSourceClose",mseSourceended:"mseSourceended",mseSourceBufferError:"mseSourceBufferError",mseAddSourceBufferError:"mseAddSourceBufferError",mseSourceBufferBusy:"mseSourceBufferBusy",mseSourceBufferFull:"mseSourceBufferFull",videoWaiting:"videoWaiting",videoTimeUpdate:"videoTimeUpdate",videoSyncAudio:"videoSyncAudio",playToRenderTimes:"playToRenderTimes",playbackTime:"playbackTime",playbackTimestamp:"playbackTimestamp",playbackTimeScroll:"playbackTimeScroll",playbackPrecision:"playbackPrecision",playbackShowPrecisionChange:"playbackShowPrecisionChange",playbackJustTime:"playbackJustTime",playbackStats:"playbackStats",playbackSeek:"playbackSeek",playbackPause:"playbackPause",playbackPauseOrResume:"playbackPauseOrResume",playbackRateChange:"playbackRateChange",playbackPreRateChange:"playbackPreRateChange",ptz:"ptz",streamQualityChange:"streamQualityChange",visibilityChange:"visibilityChange",netBuf:"netBuf",close:"close",networkDelayTimeout:"networkDelayTimeout",togglePerformancePanel:"togglePerformancePanel",viewResizeChange:"viewResizeChange",flvDemuxBufferSizeTooLarge:"flvDemuxBufferSizeTooLarge",talkGetUserMediaSuccess:"talkGetUserMediaSuccess",talkGetUserMediaFail:"talkGetUserMediaFail",talkGetUserMediaTimeout:"talkGetUserMediaTimeout",talkStreamStart:"talkStreamStart",talkStreamOpen:"talkStreamOpen",talkStreamClose:"talkStreamClose",talkStreamError:"talkStreamError",talkStreamInactive:"talkStreamInactive",webrtcDisconnect:"webrtcDisconnect",webrtcFailed:"webrtcFailed",webrtcClosed:"webrtcClosed",webrtcOnConnectionStateChange:"webrtcOnConnectionStateChange",webrtcOnIceConnectionStateChange:"webrtcOnIceConnectionStateChange",crashLog:"crashLog",focus:"focus",blur:"blur",visibilityHiddenTimeout:"visibilityHiddenTimeout",websocketOpen:"websocketOpen",websocketClose:"websocketClose",websocketError:"websocketError",websocketMessage:"websocketMessage",aiObjectDetectorInfo:"aiObjectDetectorInfo",aiFaceDetectorInfo:"aiFaceDetectorInfo",aiOcclusionDetectResult:"aiOcclusionDetectResult",aiImageDetectResult:"aiImageDetectResult",playFailedAndPaused:"playFailedAndPaused",audioResumeState:"audioResumeState",webrtcStreamH265:"webrtcStreamH265",flvMetaData:"flvMetaData",talkFailedAndStop:"talkFailedAndStop",removeLoadingBgImage:"removeLoadingBgImage",memoryLog:"memoryLog",downloadMemoryLog:"downloadMemoryLog",pressureObserverCpu:"pressureObserverCpu",currentPts:"currentPts"},Ze={load:Xe.load,timeUpdate:Xe.timeUpdate,videoInfo:Xe.videoInfo,audioInfo:Xe.audioInfo,error:Xe.error,kBps:Xe.kBps,start:Xe.start,timeout:Xe.timeout,loadingTimeout:Xe.loadingTimeout,loadingTimeoutRetryEnd:Xe.loadingTimeoutRetryEnd,delayTimeout:Xe.delayTimeout,delayTimeoutRetryEnd:Xe.delayTimeoutRetryEnd,fullscreen:"fullscreen",multiFullscreen:"multiFullscreen",webFullscreen:Xe.webFullscreen,play:Xe.play,pause:Xe.pause,mute:Xe.mute,stats:Xe.stats,performance:Xe.performance,recordingTimestamp:Xe.recordingTimestamp,recordStart:Xe.recordStart,recordCreateError:Xe.recordCreateError,recordEnd:Xe.recordEnd,recordBlob:Xe.recordBlob,playToRenderTimes:Xe.playToRenderTimes,playbackSeek:Xe.playbackSeek,playbackStats:Xe.playbackStats,playbackTimestamp:Xe.playbackTimestamp,playbackPauseOrResume:Xe.playbackPauseOrResume,playbackPreRateChange:Xe.playbackPreRateChange,playbackRateChange:Xe.playbackRateChange,playbackShowPrecisionChange:Xe.playbackShowPrecisionChange,ptz:Xe.ptz,streamQualityChange:Xe.streamQualityChange,zooming:Xe.zooming,crashLog:Xe.crashLog,focus:Xe.focus,blur:Xe.blur,visibilityHiddenTimeout:Xe.visibilityHiddenTimeout,visibilityChange:Xe.visibilityChange,websocketOpen:Xe.websocketOpen,websocketClose:Xe.websocketClose,networkDelayTimeout:Xe.networkDelayTimeout,aiObjectDetectorInfo:Xe.aiObjectDetectorInfo,aiFaceDetectorInfo:Xe.aiFaceDetectorInfo,aiOcclusionDetectResult:Xe.aiOcclusionDetectResult,aiImageDetectResult:Xe.aiImageDetectResult,playFailedAndPaused:Xe.playFailedAndPaused,streamEnd:Xe.streamEnd,audioResumeState:Xe.audioResumeState,videoSEI:Xe.videoSEI,flvMetaData:Xe.flvMetaData,webrtcOnConnectionStateChange:Xe.webrtcOnConnectionStateChange,webrtcOnIceConnectionStateChange:Xe.webrtcOnIceConnectionStateChange,currentPts:Xe.currentPts,videoSmooth:Xe.videoSmooth},et={talkStreamClose:Xe.talkStreamClose,talkStreamError:Xe.talkStreamError,talkStreamInactive:Xe.talkStreamInactive,talkGetUserMediaTimeout:Xe.talkGetUserMediaTimeout,talkFailedAndStop:Xe.talkFailedAndStop},tt={playError:"playIsNotPauseOrUrlIsNull",fetchError:"fetchError",websocketError:"websocketError",webcodecsH265NotSupport:"webcodecsH265NotSupport",webcodecsDecodeError:"webcodecsDecodeError",webcodecsUnsupportedConfigurationError:"webcodecsUnsupportedConfigurationError",webcodecsDecodeConfigureError:"webcodecsDecodeConfigureError",mediaSourceH265NotSupport:"mediaSourceH265NotSupport",mediaSourceAudioG711NotSupport:"mediaSourceAudioG711NotSupport",mediaSourceAudioInitTimeout:"mediaSourceAudioInitTimeout",mediaSourceDecoderConfigurationError:"mediaSourceDecoderConfigurationError",mediaSourceFull:Xe.mseSourceBufferFull,mseSourceBufferError:Xe.mseSourceBufferError,mseAddSourceBufferError:Xe.mseAddSourceBufferError,mediaSourceAppendBufferError:"mediaSourceAppendBufferError",mediaSourceTsIsMaxDiff:"mediaSourceTsIsMaxDiff",mediaSourceUseCanvasRenderPlayFailed:"mediaSourceUseCanvasRenderPlayFailed",mediaSourceBufferedIsZeroError:"mediaSourceBufferedIsZeroError",wasmDecodeError:"wasmDecodeError",wasmUseVideoRenderError:"wasmUseVideoRenderError",hlsError:"hlsError",hlsV2Mp4NotSupport:"hlsV2Mp4NotSupport",webrtcError:"webrtcError",webrtcClosed:Xe.webrtcClosed,webrtcIceCandidateError:"webrtcIceCandidateError",webglAlignmentError:"webglAlignmentError",wasmWidthOrHeightChange:"wasmWidthOrHeightChange",mseWidthOrHeightChange:"mseWidthOrHeightChange",wcsWidthOrHeightChange:"wcsWidthOrHeightChange",widthOrHeightChange:"widthOrHeightChange",tallWebsocketClosedByError:"tallWebsocketClosedByError",flvDemuxBufferSizeTooLarge:Xe.flvDemuxBufferSizeTooLarge,wasmDecodeVideoNoResponseError:"wasmDecodeVideoNoResponseError",audioChannelError:"audioChannelError",simdH264DecodeVideoWidthIsTooLarge:"simdH264DecodeVideoWidthIsTooLarge",simdDecodeError:"simdDecodeError",webglContextLostError:"webglContextLostError",videoElementPlayingFailed:"videoElementPlayingFailed",videoElementPlayingFailedForWebrtc:"videoElementPlayingFailedForWebrtc",decoderWorkerInitError:"decoderWorkerInitError",videoInfoError:"videoInfoError",videoCodecIdError:"videoCodecIdError",streamEnd:Xe.streamEnd,delayTimeout:Xe.delayTimeout,loadingTimeout:Xe.loadingTimeout,networkDelayTimeout:Xe.networkDelayTimeout,aliyunRtcError:"aliyunRtcError",...{talkStreamError:Xe.talkStreamError,talkStreamClose:Xe.talkStreamClose}},it="notConnect",st="open",rt="close",at="error",ot={download:"download",base64:"base64",blob:"blob"},nt="download",lt="blob",ht={7:"H264(AVC)",12:"H265(HEVC)",99:"MPEG4"},dt=7,ct=12,ut="H264(AVC)",pt="H265(HEVC)",ft=10,mt=7,gt=8,yt=2,At={AAC:"AAC",ALAW:"ALAW(g711a)",MULAW:"MULAW(g711u)",MP3:"MP3"},bt={10:"AAC",7:"ALAW",8:"MULAW",2:"MP3"},vt=7,_t=8,wt=5,St=6,Tt=19,Et=20,kt=32,Ct=33,Rt=34,xt=39,Dt=39,Lt=40,It=38,Pt=48,Bt=0,Mt=1,Ut=2,Ft="webcodecs",Ot="webgl",Nt="webgl2",jt="webgpu",zt="offscreen",Gt="mse",Vt="hls",Ht="webrtc",Wt="key",$t="delta",Jt='video/mp4; codecs="avc1.64002A"',Kt='video/mp4; codecs="hev1.1.6.L123.b0"',qt="ended",Yt="open",Qt="closed",Xt=27,Zt=38,ei=40,ti="oneHour",ii="halfHour",si="tenMin",ri="fiveMin",ai={oneHour:"one-hour",halfHour:"half-hour",tenMin:"ten-min",fiveMin:"five-min"},oi=["oneHour","halfHour","tenMin","fiveMin"],ni=["up","right","down","left","left-up","right-up","left-down","right-down"],li="stop",hi="fiStop",di="zoomExpand",ci="zoomNarrow",ui="apertureFar",pi="apertureNear",fi="focusFar",mi="focusNear",gi="g711a",yi="g711u",Ai="pcm",bi="opus",vi={png:"image/png",jpeg:"image/jpeg",webp:"image/webp"},_i="sourceclose",wi="sourceopen",Si="sourceended",Ti="canplay",Ei="waiting",ki="timeupdate",Ci="ratechange",Ri="hevc",xi="A key frame is required after configure() or flush()",Di="Cannot call 'decode' on a closed codec",Li="Unsupported configuration",Ii="Decoder failure",Pi="Decoding error",Bi="Decoder error",Mi="HEVC decoding is not supported",Ui="loading",Fi="playing",Oi="paused",Ni="destroy",ji=0,zi=1,Gi=8,Vi=0,Hi=98,Wi="empty",$i="rtp",Ji="tcp",Ki="open",qi="close",Yi="error",Qi="message",Xi="worklet",Zi="script",es={encType:gi,packetType:$i,packetTcpSendType:Ji,rtpSsrc:"0000000000",numberChannels:1,sampleRate:8e3,sampleBitsWidth:16,sendInterval:20,debug:!1,debugLevel:H,testMicrophone:!1,saveRtpToFile:!1,audioBufferLength:160,engine:Xi,checkGetUserMediaTimeout:!1,getUserMediaTimeout:1e4,audioConstraints:{latency:!0,noiseSuppression:!0,autoGainControl:!0,echoCancellation:!0,sampleRate:48e3,channelCount:1}},ts="worklet",is="script",ss="active",rs={name:"",index:0,icon:"",iconHover:"",iconTitle:"",activeIcon:"",activeIconHover:"",activeIconTitle:"",click:null,activeClick:null},as={content:"",click:null,index:0},os=1,ns="subtitle-segments",ls="hls-manifest-loaded",hs="hls-level-loaded",ds="demuxed-track",cs="flv-script-data",us="metadata-parsed",ps="ttfb",fs="load-retry",ms="load-start",gs="speed",ys="load-complete",As="load-response-headers",bs="sei",vs="sei-in-time",_s="switch-url-failed",ws="switch-url-success",Ss="subtitle-playlist",Ts="stream-parsed",Es="error",ks=[0,160,240,320,480,640],Cs=[0,160,240,320,480,640],Rs=["轻松","正常","较高","高"],xs={1:"MEDIA_ERR_ABORTED",2:"MEDIA_ERR_NETWORK",3:"MEDIA_ERR_DECODE",4:"MEDIA_ERR_SRC_NOT_SUPPORTED"},Ds=1,Ls=2,Is=0,Ps=1,Bs=3,Ms=16;class Us{constructor(e){this.log=function(t){if(e._opt.debug&&e._opt.debugLevel==V){const a=e._opt.debugUuid?`[${e._opt.debugUuid}]`:"";for(var i=arguments.length,s=new Array(i>1?i-1:0),r=1;r1?i-1:0),r=1;r1?s-1:0),a=1;a>1,(1&i)<<7|s<<3])}function zs(e){return Gs(e)&&e[1]===ji}function Gs(e){return e[0]>>4===ft}Ns.isEnabled;const Vs=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Hs=Vs;function Ws(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}function $s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4;return 1024*t/e}const Js=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];class Ks{constructor(e){this.buffer=e,this.buflen=e.length,this.bufpos=0,this.bufoff=0,this.iserro=!1}read(e){let t=0,i=0;for(;e;){if(e<0||this.bufpos>=this.buflen)return this.iserro=!0,0;this.iserro=!1,i=this.bufoff+e>8?8-this.bufoff:e,t<<=i,t+=this.buffer[this.bufpos]>>8-this.bufoff-i&255>>8-i,this.bufoff+=i,e-=i,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,i=this.bufoff,s=this.read(e);return this.bufpos=t,this.bufoff=i,s}read_golomb(){let e;for(e=0;0==this.read(1)&&!this.iserro;e++);return(1<0&&void 0!==arguments[0]?arguments[0]:"";const t=e.split(","),i=atob(t[1]),s=t[0].replace("data:","").replace(";base64","");let r=i.length,a=new Uint8Array(r);for(;r--;)a[r]=i.charCodeAt(r);return new File([a],"file",{type:s})}function sr(){return(new Date).getTime()}function rr(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}function ar(e,t,i){if(e)return"object"==typeof t&&Object.keys(t).forEach((i=>{ar(e,i,t[i])})),e.style[t]=i,e}function or(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e)return 0;const s=getComputedStyle(e,null).getPropertyValue(t);return i?parseFloat(s):s}function nr(){return performance&&"function"==typeof performance.now?performance.now():Date.now()}function lr(e){let t=0,i=nr();return s=>{if(!Tr(s))return;t+=s;const r=nr(),a=r-i;a>=1e3&&(e(t/a*1e3),i=r,t=0)}}(()=>{try{if("object"==typeof WebAssembly&&"function"==typeof WebAssembly.instantiate){const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly.Instance}}catch(e){}})();const hr='"12-25-2023"',dr=!1;function cr(){return/iphone|ipod|android.*mobile|windows.*phone|blackberry.*mobile/i.test(window.navigator.userAgent.toLowerCase())}function ur(){return!(cr()||/ipad|android(?!.*mobile)|tablet|kindle|silk/i.test(window.navigator.userAgent.toLowerCase()))}function pr(){const e=window.navigator.userAgent.toLowerCase();return/android/i.test(e)}function fr(){const e=window.navigator.userAgent.toLowerCase();return/firefox/i.test(e)}function mr(){const e=window.navigator.userAgent.toLowerCase()||"",t={type:"",version:""},i={IE:window.ActiveXObject||"ActiveXObject"in window,Chrome:e.indexOf("chrome")>-1&&e.indexOf("safari")>-1,Firefox:e.indexOf("firefox")>-1,Opera:e.indexOf("opera")>-1,Safari:e.indexOf("safari")>-1&&-1==e.indexOf("chrome"),Edge:e.indexOf("edge")>-1,QQBrowser:/qqbrowser/.test(e),WeixinBrowser:/MicroMessenger/i.test(e)};for(let s in i)if(i[s]){let i="";if("IE"===s){const t=e.match(/(msie\s|trident.*rv:)([\w.]+)/);t&&t.length>2&&(i=e.match(/(msie\s|trident.*rv:)([\w.]+)/)[2])}else if("Chrome"===s){for(let e in navigator.mimeTypes)"application/360softmgrplugin"===navigator.mimeTypes[e].type&&(s="360");const t=e.match(/chrome\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Firefox"===s){const t=e.match(/firefox\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Opera"===s){const t=e.match(/opera\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Safari"===s){const t=e.match(/version\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("Edge"===s){const t=e.match(/edge\/([\d.]+)/);t&&t.length>1&&(i=t[1])}else if("QQBrowser"===s){const t=e.match(/qqbrowser\/([\d.]+)/);t&&t.length>1&&(i=t[1])}t.type=s,t.version=parseInt(i)}return t}function gr(){const e=window.navigator.userAgent.toLowerCase();return e&&/iphone|ipad|ipod|ios/.test(e)}function yr(){const e=window.navigator.userAgent;return!e.match(/Chrome/gi)&&!!e.match(/Safari/gi)}function Ar(e,t){if(0===arguments.length)return null;var i,s=t||"{y}-{m}-{d} {h}:{i}:{s}";"object"==typeof e?i=e:(10===(""+e).length&&(e=1e3*parseInt(e)),e=+e,i=new Date(e));var r={y:i.getFullYear(),m:i.getMonth()+1,d:i.getDate(),h:i.getHours(),i:i.getMinutes(),s:i.getSeconds(),a:i.getDay()},a=s.replace(/{(y|m|d|h|i|s|a)+}/g,((e,t)=>{var i=r[t];return"a"===t?["一","二","三","四","五","六","日"][i-1]:(e.length>0&&i<10&&(i="0"+i),i||0)}));return a}function br(){return"VideoFrame"in window}function vr(e){if("string"!=typeof e)return e;var t=Number(e);return isNaN(t)?e:t}function _r(){return"xxxxxxxxxxxx4xxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}function wr(e,t){let i,s,r=!1;return function a(){for(var o=arguments.length,n=new Array(o),l=0;l{r=!1,i&&(a.apply(s,i),i=null,s=null)}),t)}}function Sr(e){if(null==e||""==e)return"0 Bytes";const t=new Array("Bytes","KB","MB","GB","TB","PB","EB","ZB","YB");let i=0;const s=parseFloat(e);i=Math.floor(Math.log(s)/Math.log(1024));var r=s/Math.pow(1024,i);return(r=r.toFixed(2))+t[i]}function Tr(e){return"[object Number]"===Object.prototype.toString.call(e)}function Er(){let e=!1;return"MediaSource"in window&&window.MediaSource.isTypeSupported(Kt)&&(e=!0),e}function kr(){const e=mr();return"chrome"===e.type.toLowerCase()&&e.version>=107}function Cr(){let e=!1;return"MediaStreamTrackGenerator"in window&&(e=!0),e}function Rr(){let e=!1;return"MediaStream"in window&&(e=!0),e}function xr(e,t){let i=window.URL.createObjectURL(t),s=window.document.createElement("a");s.download=e,s.href=i;let r=window.document.createEvent("MouseEvents");r.initEvent("click",!0,!0),s.dispatchEvent(r),setTimeout((()=>{window.URL.revokeObjectURL(i)}),gr()?1e3:0)}function Dr(e){return null==e}function Lr(e){return!0===e||!1===e}function Ir(e){return!Dr(e)}function Pr(e){let t={left:"",right:"",top:"",bottom:"",opacity:1,backgroundColor:"",image:{src:"",width:"100",height:"60"},text:{content:"",fontSize:"14",color:"#000",width:"",height:""},rect:{color:"green",lineWidth:2,width:"",height:"",fill:"",fillOpacity:.2},line:{x1:"",y1:"",x2:"",y2:"",color:"green",lineWidth:2},polygon:{color:"green",lineWidth:2,list:[],fill:"",fillOpacity:.2},html:""};const i=Object.assign(t.image,e.image||{}),s=Object.assign(t.text,e.text||{}),r=Object.assign(t.rect,e.rect||{}),a=Object.assign(t.line,e.line||{});return t=Object.assign(t,e,{image:i,text:s,rect:r,line:a}),t}function Br(e,t){let i={container:e||"",text:"",opacity:"",angle:"",color:"",fontSize:"",fontFamily:""};return i=Object.assign(i,t),{watermark_parent_node:i.container,watermark_alpha:i.opacity,watermark_angle:i.angle,watermark_fontsize:i.fontSize,watermark_color:i.color,watermark_font:i.fontFamily,watermark_txt:i.text}}function Mr(e,t){return new Promise(((i,s)=>{let r=Pr(t);if(!r.image.src&&!r.text.content)return i(e);let a=document.createElement("canvas");a.width=t.width,a.height=t.height;let o=a.getContext("2d"),n=0,l=0;Tr(r.left)?n=r.left:Tr(r.right)&&(n=a.width-r.right),Tr(r.top)?l=r.top:Tr(r.bottom)&&(l=a.height-r.bottom);const h=new Image;h.src=e,h.onload=()=>{if(o.drawImage(h,0,0),r.image&&r.image.src){const e=new Image;e.src=r.image.src,e.setAttribute("crossOrigin","Anonymous"),e.onload=()=>{n-=r.image.width,o.drawImage(e,n,l,r.image.width,r.image.height),i(a.toDataURL(t.format,t.quality))},e.onerror=e=>{s()}}else r.text&&r.text.content&&(o.font=r.text.fontSize+"px 宋体",o.fillStyle=r.text.color,o.textAlign="right",o.fillText(r.text.content,n,l),i(a.toDataURL(t.format,t.quality)))},h.onerror=e=>{s(e)}}))}function Ur(e){var t;if(e>-1){var i=Math.floor(e/3600),s=Math.floor(e/60)%60,r=e%60;t=i<10?"0"+i+":":i+":",s<10&&(t+="0"),t+=s+":",(r=Math.round(r))<10&&(t+="0"),t+=r.toFixed(0)}return t}function Fr(e,t){let i="";if(e>-1){const s=Math.floor(e/60)%60;let r=e%60;r=Math.round(r),i=s<10?"0"+s+":":s+":",r<10&&(i+="0"),i+=r,Dr(t)||(t<10&&(t="0"+t),i+=":"+t)}return i}function Or(e){let t="";if(e>-1){const i=Math.floor(e/60/60)%60;let s=Math.floor(e/60)%60,r=e%60;s=Math.round(s),t=i<10?"0"+i+":":i+":",s<10&&(t+="0"),t+=s+":",r<10&&(t+="0"),t+=r}return t}function Nr(e,t){const i=Math.floor(t/60)%60,s=Math.floor(t%60);return new Date(e).setHours(i,s,0,0)}function jr(e,t){const i=Math.floor(t/60/60)%60,s=Math.floor(t/60)%60,r=t%60;return new Date(e).setHours(i,s,r,0)}function zr(e){return(""+e).length}function Gr(e){return!function(e){return e&&0===Object.keys(e).length}(e)}function Vr(e){return"string"==typeof e}const Hr=()=>{const e=window.navigator.userAgent;return/MicroMessenger/i.test(e)},Wr=()=>{const e=window.navigator.userAgent;return/Chrome/i.test(e)};function $r(e){const t=e||window.event;return t.target||t.srcElement}function Jr(){return fr()&&function(){const e=navigator.userAgent.toLowerCase();return/macintosh|mac os x/i.test(e)}()}function Kr(e){return"function"==typeof e}function qr(e){if(cr()){let t=0,i=0;if(1===e.touches.length){let s=e.touches[0];t=s.clientX,i=s.clientY}return{posX:t,posY:i}}let t=0,i=0;const s=e||window.event;return s.pageX||s.pageY?(t=s.pageX,i=s.pageY):(s.clientX||s.clientY)&&(t=e.clientX+document.documentElement.scrollLeft+document.body.scrollLeft,i=e.clientY+document.documentElement.scrollTop+document.body.scrollTop),{posX:t,posY:i}}function Yr(){let e=document.createElement("video"),t=e.canPlayType("application/vnd.apple.mpegurl");return e=null,t}function Qr(e){let t=da(e.hasAudio)&&(e.useMSE||e.useWCS&&!e.useOffscreen)&&da(e.demuxUseWorker);return!!(da(t)&&e.useMSE&&e.mseDecodeAudio&&da(e.demuxUseWorker))||t}function Xr(e){const t=e.toString().trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1];const i=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(i)}function Zr(e){e.close()}function ea(){return"https:"===window.location.protocol||"localhost"===window.location.hostname}function ta(e){const t=Object.prototype.toString;return function(e){switch(t.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:try{return e instanceof Error}catch(e){return!1}}}(e)?e.message:null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function ia(e,t){t&&(e=e.filter((e=>e.type&&e.type===t)));let i=e[0],s=null,r=1;if(e.length>0){let t=e[1];t&&t.ts-i.ts>1e5&&(i=t,r=2)}if(i)for(let a=r;a=1e3){e[a-1].ts-i.ts<1e3&&(s=a+1)}}}return s}function sa(e){for(var t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),i=window.atob(t),s=new Uint8Array(i.length),r=0;r>4===zi&&e[1]===ji}function ha(e){return!0===e||"true"===e}function da(e){return!0!==e&&"true"!==e}function ca(e){return e.replace(/-([a-z])/g,(function(e,t){return t.toUpperCase()}))}function ua(){return/iphone/i.test(navigator.userAgent)}function pa(){return window.performance&&window.performance.memory?window.performance.memory:null}function fa(){try{var e=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!e.getContext("webgl2"))}catch(e){return!1}}function ma(e){return e.trim().match(/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1]}function ga(){let e=!1;return"requestVideoFrameCallback"in HTMLVideoElement.prototype&&(e=!0),e}function ya(){let e=!1;return"PressureObserver"in window&&(e=!0),e}class Aa{constructor(e){this.destroys=[],this.proxy=this.proxy.bind(this),this.master=e}proxy(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)return;if(Array.isArray(t))return t.map((t=>this.proxy(e,t,i,s)));e.addEventListener(t,i,s);const r=()=>{Kr(e.removeEventListener)&&e.removeEventListener(t,i,s)};return this.destroys.push(r),r}destroy(){this.master.debug&&this.master.debug.log("Events","destroy"),this.destroys.forEach((e=>e())),this.destroys=[]}}class ba{on(e,t,i){const s=this.e||(this.e={});return(s[e]||(s[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){const s=this;function r(){s.off(e,r);for(var a=arguments.length,o=new Array(a),n=0;n1?i-1:0),r=1;r{delete i[e]})),void delete this.e;const s=i[e],r=[];if(s&&t)for(let e=0,i=s.length;e0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),i=this.gl.createProgram();return this.gl.attachShader(i,e),this.gl.attachShader(i,t),this.gl.linkProgram(i),this.gl.getProgramParameter(i,this.gl.LINK_STATUS)?i:(console.log("Unable to initialize the shader program: "+this.gl.getProgramInfoLog(i)),null)}_loadShader(e,t){const i=this.gl,s=i.createShader(e);return i.shaderSource(s,t),i.compileShader(s),i.getShaderParameter(s,i.COMPILE_STATUS)?s:(console.log("An error occurred compiling the shaders: "+i.getShaderInfoLog(s)),i.deleteShader(s),null)}_initBuffers(){const e=this.gl,t=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,t);const i=[-1,-1,1,-1,1,1,-1,1];e.bufferData(e.ARRAY_BUFFER,new Float32Array(i),e.STATIC_DRAW);var s=[];s=s.concat([0,1],[1,1],[1,0],[0,0]);const r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,new Float32Array(s),e.STATIC_DRAW);const a=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,a);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{positions:i,position:t,texPosition:r,indices:a}}_createTexture(){let e=this.gl.createTexture();return this.gl.bindTexture(this.gl.TEXTURE_2D,e),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),e}_drawScene(e,t,i){this.gl.viewport(0,0,e,t),this.gl.enable(this.gl.BLEND),this.gl.blendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this._buffers.position),this.gl.bufferData(this.gl.ARRAY_BUFFER,new Float32Array(this._buffers.positions),this.gl.STATIC_DRAW),this.gl.vertexAttribPointer(this._programInfo.attribLocations.vertexPosition,2,this.gl.FLOAT,!1,0,0),this.gl.enableVertexAttribArray(this._programInfo.attribLocations.vertexPosition),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this._buffers.texPosition),this.gl.vertexAttribPointer(this._programInfo.attribLocations.texturePosition,2,this.gl.FLOAT,!1,0,0),this.gl.enableVertexAttribArray(this._programInfo.attribLocations.texturePosition),this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this._buffers.indices);i?(this.gl.activeTexture(this.gl.TEXTURE0+3),this.gl.bindTexture(this.gl.TEXTURE_2D,this._ytexture),this.gl.activeTexture(this.gl.TEXTURE0+4),this.gl.bindTexture(this.gl.TEXTURE_2D,this._utexture),this.gl.activeTexture(this.gl.TEXTURE0+5),this.gl.bindTexture(this.gl.TEXTURE_2D,this._vtexture)):(this.gl.activeTexture(this.gl.TEXTURE0+2),this.gl.bindTexture(this.gl.TEXTURE_2D,this._rgbatexture)),this.gl.useProgram(this._programInfo.program),this.gl.uniform1i(this._programInfo.uniformLocations.rgbatexture,2),this.gl.uniform1i(this._programInfo.uniformLocations.ytexture,3),this.gl.uniform1i(this._programInfo.uniformLocations.utexture,4),this.gl.uniform1i(this._programInfo.uniformLocations.vtexture,5),this.gl.uniform1i(this._programInfo.uniformLocations.isyuv,i?1:0),this.gl.drawElements(this.gl.TRIANGLES,6,this.gl.UNSIGNED_SHORT,0)}_calRect(e,t,i,s,r,a){let o=2*e/r-1,n=2*(a-t-s)/a-1,l=2*(e+i)/r-1,h=2*(a-t)/a-1;return[o,n,l,n,l,h,o,h]}_clear(){this.gl.clearColor(0,0,0,1),this.gl.clearDepth(1),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}render(e,t,i,s,r){const a=this.gl;this._clear(),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this._ytexture),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e,t,0,a.LUMINANCE,a.UNSIGNED_BYTE,i),a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,this._utexture),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e/2,t/2,0,a.LUMINANCE,a.UNSIGNED_BYTE,s),a.activeTexture(a.TEXTURE2),a.bindTexture(a.TEXTURE_2D,this._vtexture),a.texImage2D(a.TEXTURE_2D,0,a.LUMINANCE,e/2,t/2,0,a.LUMINANCE,a.UNSIGNED_BYTE,r),this._buffers.positions=[-1,-1,1,-1,1,1,-1,1],this._drawScene(e,t,!0)}renderYUV(e,t,i){let s=i.slice(0,e*t),r=i.slice(e*t,e*t*5/4),a=i.slice(e*t*5/4,e*t*3/2);const o=this.gl;this._clear(),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,this._ytexture),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,e,t,0,o.LUMINANCE,o.UNSIGNED_BYTE,s),o.activeTexture(o.TEXTURE1),o.bindTexture(o.TEXTURE_2D,this._utexture),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,e/2,t/2,0,o.LUMINANCE,o.UNSIGNED_BYTE,r),o.activeTexture(o.TEXTURE2),o.bindTexture(o.TEXTURE_2D,this._vtexture),o.texImage2D(o.TEXTURE_2D,0,o.LUMINANCE,e/2,t/2,0,o.LUMINANCE,o.UNSIGNED_BYTE,a),this._buffers.positions=[-1,-1,1,-1,1,1,-1,1],this._drawScene(e,t,!0)}drawDom(e,t,i,s,r){const a=this.gl;a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this._rgbatexture),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,r),this._buffers.positions=this._calRect(i,s,r.width,r.height,e,t),this._drawScene(e,t,!1)}}class Ra{constructor(e){this.gpu=e,this.pipeline=null,this.matrixGroupInfo=null,this.depthTexture=null,this.textureGroupInfo=null,this.hasInited=!1,this.buffers=this._initBuffer(),this._initPipeline().then((e=>{this.pipeline=e,this.matrixGroupInfo=this._initMatrixGroupInfo(),this.hasInited=!0}))}destroy(){this.gpu&&(this.gpu.device.destroy(),this.gpu=null),this.hasInited=!1,this.pipeline=null,this.matrixGroupInfo=null,this.depthTexture=null,this.textureGroupInfo=null}_initBuffer(){const e=this.gpu.device,t=new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),i=e.createBuffer({size:t.byteLength,usage:window.GPUBufferUsage.VERTEX|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(i,0,t);const s=new Float32Array([0,1,1,1,1,0,0,0]),r=e.createBuffer({size:s.byteLength,usage:window.GPUBufferUsage.VERTEX|window.GPUBufferUsage.COPY_DST});e.queue.writeBuffer(r,0,s);const a=new Uint16Array([0,1,2,0,2,3]),o=e.createBuffer({size:a.byteLength,usage:window.GPUBufferUsage.INDEX|window.GPUBufferUsage.COPY_DST});return e.queue.writeBuffer(o,0,a),{positionBuffer:i,texpositionBuffer:r,indexBuffer:o}}_initPipeline(){return new Promise(((e,t)=>{const i=this.gpu.device,s=this.gpu.format,r={layout:"auto",vertex:{module:i.createShaderModule({code:"\n\n @binding(0) @group(0) var uModelMatrix : mat4x4;\n @binding(1) @group(0) var uViewMatrix : mat4x4;\n @binding(2) @group(0) var uProjectionMatrix : mat4x4;\n\n struct VertexOutput {\n @builtin(position) Position : vec4,\n @location(0) vTexturePosition : vec2,\n }\n\n @vertex\n fn main(\n @location(0) aVertexPosition : vec4,\n @location(1) aTexturePosition : vec2\n ) -> VertexOutput {\n var output : VertexOutput;\n var tmppos : vec4 = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n output.Position = vec4(tmppos.x, tmppos.y, (tmppos.z+1.)/2., tmppos.w); // webgl z [-1, 1], webgpu z [0, 1], 这里z做下调整 z-webgpu = (z-webgl+1)/2\n output.vTexturePosition = aTexturePosition;\n return output;\n }\n\n "}),entryPoint:"main",buffers:[{arrayStride:12,attributes:[{shaderLocation:0,offset:0,format:"float32x3"}]},{arrayStride:8,attributes:[{shaderLocation:1,offset:0,format:"float32x2"}]}]},primitive:{topology:"triangle-list"},fragment:{module:i.createShaderModule({code:"\n @group(1) @binding(0) var mySampler: sampler;\n @group(1) @binding(1) var yTexture: texture_2d;\n @group(1) @binding(2) var uTexture: texture_2d;\n @group(1) @binding(3) var vTexture: texture_2d;\n\n const YUV2RGB : mat4x4 = mat4x4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n @fragment\n fn main(\n @location(0) vTexturePosition: vec2\n ) -> @location(0) vec4 {\n\n var y : f32= textureSample(yTexture, mySampler, vTexturePosition).r;\n var u : f32 = textureSample(uTexture, mySampler, vTexturePosition).r;\n var v : f32 = textureSample(vTexture, mySampler, vTexturePosition).r;\n\n return vec4(y, u, v, 1.0)*YUV2RGB;\n }\n\n "}),entryPoint:"main",targets:[{format:s}]},depthStencil:{depthWriteEnabled:!0,depthCompare:"less",format:"depth24plus"}};i.createRenderPipelineAsync(r).then((t=>{e(t)})).catch((e=>{t(e)}))}))}_initMatrixGroupInfo(){const e=this.gpu.device,t=this.pipeline,i=wa();Ea(i,-1,1,-1,1,.1,100);const s=wa();Sa(s);const r=wa();!function(e,t,i,s){var r,a,o,n,l,h,d,c,u,p,f=t[0],m=t[1],g=t[2],y=s[0],A=s[1],b=s[2],v=i[0],_=i[1],w=i[2];Math.abs(f-v)Pr(e)));this.configList=i,this._updateDom()}_resizeDomForVideo(){const e=this.player.width,t=this.player.height,i=this.player.getVideoInfo();if(!(i&&i.height>0&&i.width>0))return;let s=i.width,r=i.height;const a=this.player._opt;let o=t,n=e;if(a.hasControl&&!a.controlAutoHide){const e=a.playType===y?Pt:It;cr()&&this.player.fullscreen&&a.useWebFullScreen?n-=e:o-=e}const l=a.rotate;let h=(n-s)/2,d=(o-r)/2;270!==l&&90!==l||(s=i.height,r=i.width);const c=n/s,u=o/r;let p=c>u?u:c;a.isResize||c!==u&&(p=c+","+u),a.isFullResize&&(p=c>u?c:u);let f="scale("+p+")";"none"===a.mirrorRotate&&l&&(f+=" rotate("+l+"deg)"),"level"===a.mirrorRotate?f+=" rotateY(180deg)":"vertical"===a.mirrorRotate&&(f+=" rotateX(180deg)"),this.scale=-1!==(""+p).indexOf(",")?c:p,this.shadowRootInnerDom.style.transform=f,this.shadowRootInnerDom.style.left=h+"px",this.shadowRootInnerDom.style.top=d+"px",this.shadowRootInnerDom.style.width=i.width+"px",this.shadowRootInnerDom.style.height=i.height+"px",this.shadowRootInnerDom.style.display="block"}_resizeDomForCanvas(){const e=this.player.getVideoInfo();if(!(e&&e.height>0&&e.width>0))return;const t=this.player._opt;let i=this.player.width,s=this.player.height;if(t.hasControl&&!t.controlAutoHide){const e=t.playType===y?Pt:It;cr()&&this.player.fullscreen&&t.useWebFullScreen?i-=e:s-=e}let r=e.width,a=e.height;const o=t.rotate;let n=(i-r)/2,l=(s-a)/2;270!==o&&90!==o||(r=e.height,a=e.width);const h=i/r,d=s/a;let c=h>d?d:h;t.isResize||h!==d&&(c=h+","+d),t.isFullResize&&(c=h>d?h:d);let u="scale("+c+")";"none"===t.mirrorRotate&&o&&(u+=" rotate("+o+"deg)"),"level"===t.mirrorRotate?u+=" rotateY(180deg)":"vertical"===t.mirrorRotate&&(u+=" rotateX(180deg)"),this.shadowRootInnerDom.style.height=e.height+"px",this.shadowRootInnerDom.style.width=e.width+"px",this.shadowRootInnerDom.style.padding="0",this.shadowRootInnerDom.style.transform=u,this.shadowRootInnerDom.style.left=n+"px",this.shadowRootInnerDom.style.top=l+"px",this.shadowRootInnerDom.style.display="block"}_resizeDomRatio(){const e=this.player.getVideoInfo();if(!(e&&e.height>0&&e.width>0))return;const t=this.player._opt.aspectRatio.split(":").map(Number);let i=this.player.width,s=this.player.height;const r=this.player._opt;let a=0;r.hasControl&&!r.controlAutoHide&&(a=r.playType===y?Pt:It,s-=a);const o=e.width/e.height,n=t[0]/t[1];if(o>n){const t=n*e.height/e.width;this.shadowRootInnerDom.style.width=100*t+"%",this.shadowRootInnerDom.style.height=`calc(100% - ${a}px)`,this.shadowRootInnerDom.style.padding=`0 ${(i-i*t)/2}px`}else{const t=e.width/n/e.height;this.shadowRootInnerDom.style.width="100%",this.shadowRootInnerDom.style.height=`calc(${100*t}% - ${a}px)`,this.shadowRootInnerDom.style.padding=(s-s*t)/2+"px 0"}this.shadowRootInnerDom.style.display="block"}_updateDom(){this.shadowRoot&&this.configList.forEach((e=>{const t=document.createElement("div");let i=null;if(e.image&&e.image.src?(i=document.createElement("img"),i.style.height="100%",i.style.width="100%",i.style.objectFit="contain",i.src=e.image.src):e.text&&e.text.content?i=document.createTextNode(e.text.content):(e.rect&&e.rect.color&&e.rect.width||e.html||e.line&&e.line.x1&&e.line.y1&&e.line.x2&&e.line.y2||e.polygon&&e.polygon.list&&e.polygon.list.length>=3)&&(i=document.createElement("div")),i){if(t.appendChild(i),t.style.visibility="",t.style.position="absolute",t.style.display="block",t.style["-ms-user-select"]="none",t.style["-moz-user-select"]="none",t.style["-webkit-user-select"]="none",t.style["-o-user-select"]="none",t.style["user-select"]="none",t.style["-webkit-touch-callout"]="none",t.style["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",t.style["-webkit-text-size-adjust"]="none",t.style["-webkit-touch-callout"]="none",t.style.opacity=e.opacity,Tr(e.left)&&(t.style.left=e.left+"px"),Tr(e.right)&&(t.style.right=e.right+"px"),Tr(e.top)&&(t.style.top=e.top+"px"),Tr(e.bottom)&&(t.style.bottom=e.bottom+"px"),e.backgroundColor&&(t.style.backgroundColor=e.backgroundColor),t.style.overflow="hidden",t.style.zIndex="9999999",e.image&&e.image.src)t.style.width=e.image.width+"px",t.style.height=e.image.height+"px";else if(e.text&&e.text.content)t.style.fontSize=e.text.fontSize+"px",t.style.color=e.text.color,e.text.width&&(t.style.width=e.text.width+"px"),e.text.height&&(t.style.height=e.text.height+"px");else if(e.rect&&e.rect.color&&e.rect.width){if(t.style.width=e.rect.width+"px",t.style.height=e.rect.height+"px",t.style.borderWidth=e.rect.lineWidth+"px",t.style.borderStyle="solid",t.style.borderColor=e.rect.color,e.rect.fill){const i=document.createElement("div");i.style.position="absolute",i.style.width="100%",i.style.height="100%",i.style.backgroundColor=e.rect.fill,e.rect.fillOpacity&&(i.style.opacity=e.rect.fillOpacity),t.appendChild(i)}}else if(e.html)t.style.width="100%",t.style.height="100%",t.innerHTML=e.html;else if(e.line&&e.line.x1&&e.line.y1&&e.line.x2&&e.line.y2)this.settingLine(t,e.line);else if(e.polygon&&e.polygon.list&&e.polygon.list.length>=3){t.style.width="100%",t.style.height="100%";let i=e.polygon.list;const s=e.polygon.color,r=e.polygon.lineWidth;if(i=i.sort(((e,t)=>(e.index||0)-(t.index||0))),e.polygon.fill){const s=document.createElement("div");s.style.position="absolute",s.style.width="100%",s.style.height="100%";const r="polygon("+i.map((e=>`${e.x}px ${e.y}px`)).join(", ")+")";s.style.clipPath=r,s.style.backgroundColor=e.polygon.fill,e.polygon.fillOpacity&&(s.style.opacity=e.polygon.fillOpacity),t.appendChild(s)}i.forEach(((e,a)=>{const o=document.createElement("div");if(a===i.length-1){const a=i[0],n={x1:e.x,y1:e.y,x2:a.x,y2:a.y,color:s,lineWidth:r};return this.settingLine(o,n),void t.appendChild(o)}const n=i[a+1],l={x1:e.x,y1:e.y,x2:n.x,y2:n.y,color:s,lineWidth:r};this.settingLine(o,l),t.appendChild(o)}))}this.isDynamic&&(this.shadowRootDynamicDom=t),this.shadowRootInnerDom.appendChild(t)}}))}settingLine(e,t){const i=t.x1,s=t.y1,r=t.x2,a=t.y2;var o=Math.sqrt((i-r)**2+(s-a)**2),n=180*Math.atan2(a-s,r-i)/Math.PI;e.style.backgroundColor=t.color,e.style.width=o+"px",e.style.height=t.lineWidth+"px",e.style.position="absolute",e.style.top=s+"px",e.style.left=i+"px",e.style.transform="rotate("+n+"deg)",e.style.transformOrigin="0 0"}remove(){this._removeDom()}_removeDom(){this.shadowRootInnerDom&&(this.shadowRootInnerDom.innerHTML="")}}class Da extends ba{constructor(){super(),this.videoInfo={width:null,height:null,encType:null,encTypeCode:null},this.init=!1,this.prevAiFaceDetectTime=null,this.prevAiObjectDetectTime=null,this.prevOcclusionDetectTime=null,this.contentWatermark=null,this.aiContentWatermark=null,this.tempContentList=[],this.tempAiContentList=[],this.streamFps=0,this.isDestroyed=!1}destroy(){this.isDestroyed=!0,this.resetInit(),this.contentWatermark&&(this.contentWatermark.destroy(),this.contentWatermark=null),this.tempContentList=[],this.aiContentWatermark&&(this.aiContentWatermark.destroy(),this.aiContentWatermark=null),this.tempAiContentList=[],this.prevAiFaceDetectTime=null,this.prevAiObjectDetectTime=null,this.streamFps=0,this.off()}resetInit(){this.videoInfo={width:null,height:null,encType:null,encTypeCode:null},this.init=!1}getHasInit(){return this.init}updateVideoInfo(e){Ir(e.encTypeCode)&&(this.videoInfo.encType=ht[e.encTypeCode],this.videoInfo.encTypeCode=e.encTypeCode),Ir(e.encType)&&(this.videoInfo.encType=e.encType),Ir(e.width)&&(this.videoInfo.width=e.width),Ir(e.height)&&(this.videoInfo.height=e.height),Ir(this.videoInfo.encType)&&Ir(this.videoInfo.height)&&Ir(this.videoInfo.width)&&!this.init&&(this.player.emit(Xe.videoInfo,this.videoInfo),this.init=!0)}getVideoInfo(){return this.videoInfo}clearView(){this.tempContentList=[],this.tempAiContentList=[]}resize(){if(this.player.debug.log("CommonVideo","resize()"),"default"===this.player._opt.aspectRatio||cr()?this._resize():this._resizeRatio(),this.contentWatermark&&this.contentWatermark.resize(),this.aiContentWatermark&&this.aiContentWatermark.resize(),this.player.singleWatermark&&this.player.singleWatermark.resize(),this.player.ghostWatermark&&this.player.ghostWatermark.resize(),this.player.dynamicWatermark&&this.player.dynamicWatermark.resize(),this.player.zoom&&this.player.zooming){const e=this._getStyleScale();this.player.zoom.updatePrevVideoElementStyleScale(e),this.player.zoom.updateVideoElementScale()}}_resizeRatio(){this.player.debug.log("CommonVideo","_resizeRatio()");const e=this.player._opt.aspectRatio.split(":").map(Number);let t=this.player.width,i=this.player.height;const s=this.player._opt;let r=0;s.hasControl&&!s.controlAutoHide&&(r=s.playType===y?Pt:It,i-=r);const a=this.videoInfo,o=a.width/a.height,n=e[0]/e[1];if(this.getType()===z&&(this.$videoElement.style.left="0",this.$videoElement.style.top="0",this.$videoElement.style.transform="none"),this.getType()===G&&this.player._opt.videoRenderSupportScale&&(this.$videoElement.style.objectFit="fill"),o>n){const e=n*a.height/a.width;this.$videoElement.style.width=100*e+"%",this.$videoElement.style.height=`calc(100% - ${r}px)`,this.$videoElement.style.padding=`0 ${(t-t*e)/2}px`}else{const e=a.width/n/a.height;this.$videoElement.style.width="100%",this.$videoElement.style.height=`calc(${100*e}% - ${r}px)`,this.$videoElement.style.padding=(i-i*e)/2+"px 0"}}play(){}pause(){}setRate(e){}getType(){return""}getCanvasType(){return""}getCurrentTime(){return 0}getStreamFps(){return this.streamFps}isPlaying(){return!0}getPlaybackQuality(){return null}setStreamFps(e){this.player.debug.log("CommonVideo","setStreamFps",e),this.streamFps=e}addContentToCanvas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.tempContentList=e}addAiContentToCanvas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.tempAiContentList=e}doAddContentToWatermark(){if(this.tempContentList.length>0){this.contentWatermark||(this.contentWatermark=new xa(this.player),this.contentWatermark.resize());const e=[];this.tempContentList.forEach((t=>{let i={left:t.x||0,top:t.y||0};"text"===t.type?i.text={content:t.text,fontSize:t.fontSize||"14",color:t.color||"#000"}:"rect"===t.type?i.rect={width:t.width,height:t.height,color:t.color||"green",lineWidth:t.lineWidth||2,fill:t.fill||"",fillOpacity:t.fillOpacity||.2}:"polygon"===t.type?i.polygon={list:t.list,color:t.color||"green",lineWidth:t.lineWidth||2,fill:t.fill,fillOpacity:t.fillOpacity||.2}:"line"===t.type&&(i.line={color:t.color||"green",lineWidth:t.lineWidth||2,x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}),e.push(i)})),this.contentWatermark.update(e)}else this.contentWatermark&&this.contentWatermark.remove()}doAddAiContentToWatermark(){if(this.tempAiContentList.length>0){this.aiContentWatermark||(this.aiContentWatermark=new xa(this.player),this.aiContentWatermark.resize());const e=this.tempAiContentList.map((e=>{let t={left:e.x,top:e.y};return"text"===e.type?t.text={content:e.text,fontSize:e.fontSize,color:e.color}:"rect"===e.type&&(t.rect={width:e.width,height:e.height,color:e.color,lineWidth:e.lineWidth}),t}));this.aiContentWatermark.update(e)}else this.aiContentWatermark&&this.aiContentWatermark.remove()}_getStyleScale(){let e=this.$videoElement.style.transform.match(/scale\([0-9., ]*\)/g),t="";if(e&&e[0]){t=e[0].replace("scale(","").replace(")","").split(",")}return t}}var La="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0;function Ia(e,t,i){var s=new XMLHttpRequest;s.open("GET",e),s.responseType="blob",s.onload=function(){Ua(s.response,t,i)},s.onerror=function(){console.error("could not download file")},s.send()}function Pa(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function Ba(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(i){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var Ma=La.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),Ua="object"!=typeof window||window!==La?function(){}:"download"in HTMLAnchorElement.prototype&&!Ma?function(e,t,i){var s=La.URL||La.webkitURL,r=document.createElementNS("http://www.w3.org/1999/xhtml","a");t=t||e.name||"download",r.download=t,r.rel="noopener","string"==typeof e?(r.href=e,r.origin!==location.origin?Pa(r.href)?Ia(e,t,i):Ba(r,r.target="_blank"):Ba(r)):(r.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(r.href)}),4e4),setTimeout((function(){Ba(r)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,i){if(t=t||e.name||"download","string"==typeof e)if(Pa(e))Ia(e,t,i);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){Ba(s)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,i),t)}:function(e,t,i,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),"string"==typeof e)return Ia(e,t,i);var r="application/octet-stream"===e.type,a=/constructor/i.test(La.HTMLElement)||La.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||r&&a||Ma)&&"undefined"!=typeof FileReader){var n=new FileReader;n.onloadend=function(){var e=n.result;e=o?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=e:location=e,s=null},n.readAsDataURL(e)}else{var l=La.URL||La.webkitURL,h=l.createObjectURL(e);s?s.location=h:location.href=h,s=null,setTimeout((function(){l.revokeObjectURL(h)}),4e4)}};class Fa{constructor(e,t){this.canvas=e,this.gl=t;const i=t.createShader(t.VERTEX_SHADER);if(t.shaderSource(i,"\n attribute vec2 xy;\n varying highp vec2 uv;\n void main(void) {\n gl_Position = vec4(xy, 0.0, 1.0);\n // Map vertex coordinates (-1 to +1) to UV coordinates (0 to 1).\n // UV coordinates are Y-flipped relative to vertex coordinates.\n uv = vec2((1.0 + xy.x) / 2.0, (1.0 - xy.y) / 2.0);\n }\n "),t.compileShader(i),!t.getShaderParameter(i,t.COMPILE_STATUS))throw t.getShaderInfoLog(i);const s=t.createShader(t.FRAGMENT_SHADER);if(t.shaderSource(s,"\n varying highp vec2 uv;\n uniform sampler2D texture;\n void main(void) {\n gl_FragColor = texture2D(texture, uv);\n }\n "),t.compileShader(s),!t.getShaderParameter(s,t.COMPILE_STATUS))throw t.getShaderInfoLog(s);const r=t.createProgram();if(t.attachShader(r,i),t.attachShader(r,s),t.linkProgram(r),!t.getProgramParameter(r,t.LINK_STATUS))throw t.getProgramInfoLog(r);t.useProgram(r);const a=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,a),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),t.STATIC_DRAW);const o=t.getAttribLocation(r,"xy");t.vertexAttribPointer(o,2,t.FLOAT,!1,0,0),t.enableVertexAttribArray(o);const n=t.createTexture();t.bindTexture(t.TEXTURE_2D,n),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),this.program=r,this.buffer=a,this.vertexShader=i,this.fragmentShader=s,this.texture=n}destroy(){this.gl.deleteProgram(this.program),this.gl.deleteBuffer(this.buffer),this.gl.deleteTexture(this.texture),this.gl.deleteShader(this.vertexShader),this.gl.deleteShader(this.fragmentShader),this.program=null,this.buffer=null,this.vertexShader=null,this.fragmentShader=null,this.texture=null}render(e){this.canvas.width=e.displayWidth,this.canvas.height=e.displayHeight;const t=this.gl;t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),t.viewport(0,0,t.drawingBufferWidth,t.drawingBufferHeight),t.clearColor(1,0,0,1),t.clear(t.COLOR_BUFFER_BIT),t.drawArrays(t.TRIANGLE_FAN,0,4)}}class Oa extends Da{constructor(e){super(),this.player=e;const t=document.createElement("canvas");t.style.position="absolute",t.style.top=0,t.style.left=0,this.$videoElement=t,e.$container.appendChild(this.$videoElement),this.context2D=null,this.contextGl=null,this.webglRender=null,this.webglRectRender=null,this.webGPURender=null,this.isWebglContextLost=!1,this.isWcsWebgl2=!1,this.bitmaprenderer=null,this.renderType=null,this.controlHeight=0,this.proxyDestroyList=[],this._initCanvasRender()}destroy(){super.destroy(),this.proxyDestroyList.length>0&&(this.proxyDestroyList.forEach((e=>{e&&e()})),this.proxyDestroyList=[]),this.contextGl&&(this.contextGl=null),this.context2D&&(this.context2D=null),this.webglRender&&(this.webglRender.destroy(),this.webglRender=null),this.webglRectRender&&(this.webglRectRender.destroy(),this.webglRectRender=null),this.webGPURender&&(this.webGPURender.destroy(),this.webGPURender=null),this.bitmaprenderer&&(this.bitmaprenderer=null),this.renderType=null,this.isWebglContextLost=!1,this.videoInfo={width:"",height:"",encType:""},this.player.$container.removeChild(this.$videoElement),this.init=!1,this.off()}_initContext2D(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.context2D=this.$videoElement.getContext("2d",e)}_initContextGl(){this.player.events,this.contextGl=er(this.$videoElement),this.contextGl?(this._bindContextGlEvents(),this.webglRender=new Ca(this.contextGl,this.player._opt.openWebglAlignment)):this.player.debug.error("CommonCanvasLoader","_initContextGl() createContextGL error")}_initContextGl2(){if(this.contextGl=tr(this.$videoElement),this.contextGl){this._bindContextGlEvents(2);try{this.webglRender=new Fa(this.$videoElement,this.contextGl)}catch(e){this.player.debug.error("CommonCanvasLoader",`create webgl2Render error is ${e} and next use context2d.draw render`),this.contextGl=null,this.webglRender=null,this._initContext2D()}}else this.player.debug.error("CommonCanvasLoader","_initContextGl2() createContextGL2 error")}_bindContextGlEvents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const{proxy:t}=this.player.events,i=t(this.$videoElement,"webglcontextlost",(t=>{t.preventDefault(),this.player.debug.error("canvasVideo","webglcontextlost error",t),this.isWebglContextLost=!0,this.webglRender&&(this.player.debug.log("CommonCanvasLoader","webglcontextlost error and destroy webglRender"),this.webglRender.destroy(),this.webglRender=null),this.webglRectRender&&(this.player.debug.log("CommonCanvasLoader","webglcontextlost error and destroy webglRectRender"),this.webglRectRender.destroy(),this.webglRectRender=null),this.contextGl=null,setTimeout((()=>{if(this.player.debug.log("CommonCanvasLoader",`createContextGL() version ${e}`),1===e?this.contextGl=er(this.$videoElement):2===e&&(this.contextGl=tr(this.$videoElement)),this.player.debug.log("CommonCanvasLoader","createContextGL success"),this.contextGl&&this.contextGl.getContextAttributes){const t=this.contextGl.getContextAttributes();t&&t.stencil?(1===e?this.webglRender=new Ca(this.contextGl,this.player._opt.openWebglAlignment):2===e&&(this.webglRender=new Fa(this.$videoElement,this.contextGl)),this.isWebglContextLost=!1,this.player.debug.log("CommonCanvasLoader","webglcontextlost error reset and getContextAttributes().stencil is true")):(this.player.debug.error("CommonCanvasLoader","webglcontextlost error, getContextAttributes().stencil is false"),this.player.emitError(tt.webglContextLostError))}else this.player.debug.error("CommonCanvasLoader","webglcontextlost error, getContextAttributes().stencil is false"),this.player.emitError(tt.webglContextLostError)}),500)})),s=t(this.$videoElement,"webglcontextrestored",(e=>{e.preventDefault(),this.player.debug.log("CommonCanvasLoader","webglcontextrestored ",e)}));this.proxyDestroyList.push(i,s)}_initContextGPU(){var t;(t=this.$videoElement,new Promise(((e,i)=>{navigator.gpu?navigator.gpu.requestAdapter().then((s=>{s?s.requestDevice().then((r=>{if(r){const a=t.getContext("webgpu");if(a){const t=navigator.gpu.getPreferredCanvasFormat();a.configure({device:r,format:t,alphaMode:"opaque"}),e({adapter:s,device:r,context:a,format:t})}else i('WebGPU "context" create fail')}else i('WebGPU "device" request fail')})).catch((e=>{i('WebGPU "adapter.requestDevice()" fail')})):i('WebGPU "adapter" request fail is empty')})).catch((e=>{i('WebGPU "navigator.gpu.requestAdapter()" fail')})):i("WebGPU not support!!")}))).then((t=>{t?(this.webGPURender=new Ra(t),this.player.debug.log("CommonCanvasLoader","webGPURender init success")):(this.player.debug.warn("CommonCanvasLoader",`createWebGPUContext error is ${e} and next use webgl render`),this.renderType=Ot,this._initContextGl())})).catch((e=>{this.player.debug.warn("CommonCanvasLoader",`createWebGPUContext error is ${e} and next use webgl render`),this.renderType=Ot,this._initContextGl()}))}initCanvasViewSize(){this.$videoElement.width=this.videoInfo.width,this.$videoElement.height=this.videoInfo.height,this.resize()}screenshot(e,t,i,s){e=e||sr(),s=s||ot.download;let r=.92;!vi[t]&&ot[t]&&(s=t,t="png",i=void 0),"string"==typeof i&&(s=i,i=void 0),void 0!==i&&(r=Number(i));const a=vi[t]||vi.png,o=this.$videoElement.toDataURL(a,r);if(s===ot.base64)return o;{const t=ir(o);if(s===ot.blob)return t;if(s===ot.download){const i=a.split("/")[1];Ua(t,e+"."+i)}}}screenshotWatermark(e){return new Promise(((t,i)=>{Vr(e)&&(e={filename:e}),(e=e||{}).width=this.videoInfo.width,e.height=this.videoInfo.height,e.filename=e.filename||sr(),e.format=e.format?vi[e.format]:vi.png,e.quality=Number(e.quality)||.92,e.type=e.type||ot.download;const s=this.$videoElement.toDataURL(e.format,e.quality);Mr(s,e).then((i=>{if(e.type===ot.base64)t(s);else{const s=ir(i);if(e.type===ot.blob)t(s);else if(e.type===ot.download){t();const i=e.format.split("/")[1];Ua(s,e.filename+"."+i)}}})).catch((e=>{i(e)}))}))}render(){}clearView(){super.clearView()}play(){}pause(){}_resize(){this.player.debug.log("canvasVideo","_resize()");const e=this.player._opt;let t=this.player.width,i=this.player.height;if(e.hasControl&&!e.controlAutoHide){const s=this.controlHeight;cr()&&this.player.fullscreen&&e.useWebFullScreen?t-=s:i-=s}let s=this.$videoElement.width,r=this.$videoElement.height;const a=e.rotate;let o=(t-s)/2,n=(i-r)/2;270!==a&&90!==a||(s=this.$videoElement.height,r=this.$videoElement.width);const l=t/s,h=i/r;let d=l>h?h:l;da(e.isResize)&&l!==h&&(d=l+","+h),e.isFullResize&&(d=l>h?l:h);let c="scale("+d+")";"none"===e.mirrorRotate&&a&&(c+=" rotate("+a+"deg)"),"level"===e.mirrorRotate?c+=" rotateY(180deg)":"vertical"===e.mirrorRotate&&(c+=" rotateX(180deg)"),this.$videoElement.style.height=this.videoInfo.height+"px",this.$videoElement.style.width=this.videoInfo.width+"px",this.$videoElement.style.padding="0",this.$videoElement.style.transform=c,this.$videoElement.style.left=o+"px",this.$videoElement.style.top=n+"px"}initFps(){}setStreamFps(e){}getStreamFps(){return 25}getType(){return z}getCanvasType(){let e=this.renderType===jt?jt:Ot;return this.isWcsWebgl2&&(e=Nt),e}}class Na extends Oa{constructor(e){super(e),this.yuvList=[],this.controlHeight=It,this.tempTextCanvas=null,this.tempTextCanvasCtx=null,this.player.debug.log("CanvasVideo","init")}destroy(){super.destroy(),this.yuvList=[],this.tempTextCanvas&&(this.tempTextCanvasCtx.clearRect(0,0,this.tempTextCanvas.width,this.tempTextCanvas.height),this.tempTextCanvas.width=0,this.tempTextCanvas.height=0,this.tempTextCanvas=null),this.player.debug.log("CanvasVideoLoader","destroy")}_initCanvasRender(){this.player._opt.useWCS&&!this._supportOffscreen()?(this.renderType=Ft,fa()&&this.player._opt.wcsUseWebgl2Render?(this._initContextGl2(),this.webglRender&&(this.isWcsWebgl2=!0)):this._initContext2D()):this.player._opt.useMSE&&this.player._opt.mseUseCanvasRender?(this.renderType=Gt,this._initContext2D()):this.player.isOldHls()&&this.player._opt.useCanvasRender?(this.renderType=Vt,this._initContext2D()):this.player.isWebrtcH264()&&this.player._opt.webrtcUseCanvasRender?(this.renderType=Ht,this._initContext2D()):this._supportOffscreen()?(this.renderType=zt,this._bindOffscreen()):this.player._opt.useWebGPU?(this.renderType=jt,this._initContextGPU()):(this.renderType=Ot,this._initContextGl())}_supportOffscreen(){return"function"==typeof this.$videoElement.transferControlToOffscreen&&this.player._opt.useOffscreen}_bindOffscreen(){this.bitmaprenderer=this.$videoElement.getContext("bitmaprenderer")}render(e){this.yuvList.push(e),this.startRender()}startRender(){for(;!(this.yuvList.length<=0);){const e=this.yuvList.shift();this.doRender(e)}}doRender(e){if(this.renderType!==Gt){const t={ts:e.ts||0,fps:!0};this.player.updateStats(t)}switch(this.renderType){case zt:this.bitmaprenderer.transferFromImageBitmap(e.buffer);break;case Ot:case jt:if(this.isWebglContextLost)return void this.player.debug.warn("CanvasVideoLoader","doRender() and webgl context is lost");let t=e.output;if(this.player.faceDetectActive&&this.player.ai&&this.player.ai.faceDetector){null===this.prevAiFaceDetectTime&&(this.prevAiFaceDetectTime=sr());const i=sr();i-this.prevAiFaceDetectTime>=this.player._opt.aiFaceDetectInterval&&(t=this.player.ai.faceDetector.detect({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output,ts:e.ts||0}),this.prevAiFaceDetectTime=i)}if(this.player.objectDetectActive&&this.player.ai&&this.player.ai.objectDetector){null===this.prevAiObjectDetectTime&&(this.prevAiObjectDetectTime=sr());const i=sr();i-this.prevAiObjectDetectTime>=this.player._opt.aiObjectDetectInterval&&(t=this.player.ai.objectDetector.detect({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output,ts:e.ts||0}),this.prevAiObjectDetectTime=i)}if(this.player.occlusionDetectActive&&this.player.ai&&this.player.ai.occlusionDetector){null===this.prevAiOcclusionDetectTime&&(this.prevAiOcclusionDetectTime=sr());const t=sr();if(t-this.prevAiOcclusionDetectTime>=this.player._opt.aiOcclusionDetectInterval){const i=this.player.ai.occlusionDetector.check({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output});this.prevAiOcclusionDetectTime=t,i&&this.player.emit(Xe.aiOcclusionDetectResult,{ts:e.ts||0})}}if(this.player.imageDetectActive&&this.player.ai&&this.player.ai.imageDetector){const t=this.player.ai.imageDetector.check({width:this.$videoElement.width,height:this.$videoElement.height,data:e.output});if(t&&t.data&&(this.player.emit(Xe.aiOcclusionDetectResult,{type:t.type,ts:e.ts||0}),this.player._opt.aiImageDetectDrop))return void this.player.debug.log("CanvasVideoLoader",`doRender() and ai image detect result type is ${t.type} and drop`)}if(this.renderType===jt)try{if(!this.webGPURender)return void this.player.debug.warn("CanvasVideoLoader","doRender webgpu render is not init");this.webGPURender.renderYUV(this.$videoElement.width,this.$videoElement.height,t)}catch(e){this.player.debug.error("CanvasVideoLoader",`doRender webgpu render and error: ${e.toString()}`)}else if(this.renderType===Ot)try{this.webglRender.renderYUV(this.$videoElement.width,this.$videoElement.height,t)}catch(e){this.player.debug.error("CanvasVideoLoader",`doRender webgl render context is lost ${this.contextGl&&this.contextGl.isContextLost()} and error: ${e.toString()}`)}break;case Ft:if(this.webglRender)this.webglRender.render(e.videoFrame),Zr(e.videoFrame);else if(this.context2D)if(Kr(e.videoFrame.createImageBitmap))try{e.videoFrame.createImageBitmap().then((t=>{this.context2D.drawImage(t,0,0,this.$videoElement.width,this.$videoElement.height),Zr(e.videoFrame)}))}catch(e){}else this.context2D.drawImage(e.videoFrame,0,0,this.$videoElement.width,this.$videoElement.height),Zr(e.videoFrame);else this.player.debug.warn("CanvasVideoLoader","doRender() and webcodecs context is lost");break;case Gt:case Vt:case Ht:this.context2D.drawImage(e.$video,0,0,this.$videoElement.width,this.$videoElement.height)}let t=e.ts||0;this.renderType===Gt&&(t=parseInt(1e3*e.$video.currentTime,10)+(this.player.mseDecoder.firstRenderTime||0)),this.player.updateCurrentPts(t),this.doAddContentToWatermark(),this.doAddAiContentToWatermark()}clearView(){switch(super.clearView(),this.renderType){case zt:(function(e,t){const i=document.createElement("canvas");i.width=e,i.height=t;const s=window.createImageBitmap(i,0,0,e,t);return i.width=0,i.height=0,s})(this.$videoElement.width,this.$videoElement.height).then((e=>{this.bitmaprenderer.transferFromImageBitmap(e)}));break;case Ot:this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT);break;case jt:this.webGPURender.clear();break;case Ft:this.contextGl?this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT):this.context2D&&this.context2D.clearRect(0,0,this.$videoElement.width,this.$videoElement.height);break;case Gt:case Vt:case Ht:this.context2D.clearRect(0,0,this.$videoElement.width,this.$videoElement.height)}}_initTempTextCanvas(){this.tempTextCanvas=document.createElement("canvas"),this.tempTextCanvasCtx=this.tempTextCanvas.getContext("2d"),this.tempTextCanvas.width=600,this.tempTextCanvas.height=20}doAddContentToCanvas(){this.tempContentList.length>0&&this.context2D&&function(e){let{ctx:t,list:i}=e;t.save(),(i||[]).forEach((e=>{"text"===e.type?(t.font=`${e.fontSize||12}px Arial`,t.fillStyle=e.color||"green",t.fillText(e.text,e.x,e.y)):"rect"===e.type&&(t.strokeStyle=e.color||"green",t.lineWidth=e.lineWidth||2,t.strokeRect(e.x,e.y,e.width,e.height))})),t.restore()}({ctx:this.context2D,list:this.tempContentList})}doAddContentToWebGlCanvas(){this.tempContentList.length>0&&this.contextGl&&this.webglRectRender&&this.tempContentList.forEach((e=>{const t=e.x,i=e.y;if("rect"===e.type){const r=e.width,a=e.height,o=(s=e.color||"#008000",[parseInt(s.substring(1,3),16)/255,parseInt(s.substring(3,5),16)/255,parseInt(s.substring(5,7),16)/255,1]),n=e.lineWidth||4;if(!r||!a)return;this.webglRectRender.drawBox({x:t,y:i,width:r,height:a,lineColor:o,lineWidth:n,canvasWidth:this.$videoElement.width,canvasHeight:this.$videoElement.height})}else if("text"===e.type){const s=e.text||"";if(!s)return;const r=e.fontSize||20,a=e.color||"#008000";this.tempTextCanvas||this._initTempTextCanvas(),this.tempTextCanvasCtx.clearRect(0,0,this.tempTextCanvas.width,this.tempTextCanvas.height),this.tempTextCanvasCtx.font=`${r}px Arial`,this.tempTextCanvasCtx.fillStyle=a,this.tempTextCanvasCtx.textBaseline="top",this.tempTextCanvasCtx.fillText(s,0,0),this.webglRender.drawDom(this.$videoElement.width,this.$videoElement.height,t,i,this.tempTextCanvas)}var s}))}}class ja extends Da{constructor(e){super(),this.player=e,this.TAG_NAME="Video";const t=document.createElement("video"),i=document.createElement("canvas");t.muted=!0,t.style.position="absolute",t.style.top=0,t.style.left=0,this._delayPlay=!1,e.$container.appendChild(t),this.$videoElement=t,this.$canvasElement=i,this.canvasContext=i.getContext("2d"),this.mediaStream=null,this.vwriter=null,e.canVideoTrackWritter()&&Cr()&&Rr()&&(this.trackGenerator=new MediaStreamTrackGenerator({kind:"video"}),this.mediaStream=new MediaStream([this.trackGenerator]),t.srcObject=this.mediaStream,this.vwriter=this.trackGenerator.writable.getWriter()),this.fixChromeVideoFlashBug(),this.fixMobileAutoFullscreen(),this.resize(),this.eventListenList=[],this.isRenderRetryPlaying=!1,this.isRenderRetryPlayingTimes=0,this.isRetryPlaying=!1,this.isRetryPlayingTimes=0,this.checkVideoCanplayTimeout=null;const s=ga();this.supportVideoFrameCallbackHandle=null;const{proxy:r}=this.player.events,a=r(this.$videoElement,"canplay",(()=>{this.player.debug.log("Video","canplay"),this._delayPlay&&(this.clearCheckVideoCanplayTimeout(),this._play())})),o=r(this.$videoElement,"waiting",(()=>{this.player.debug.log("Video","waiting")})),n=r(this.$videoElement,"loadedmetadata",(()=>{this.player.debug.log("Video","loadedmetadata")})),l=r(this.$videoElement,"timeupdate",(t=>{if(da(s)){const i=parseInt(1e3*t.timeStamp,10);(e.isWebrtcH264()||this.player.isOldHls()||this.player.isAliyunRtc())&&(this.player.emit(Xe.timeUpdate,i),e.handleRender(),e.updateStats({fps:!0,ts:i,dts:i}))}})),h=r(this.$videoElement,"error",(()=>{this.player.debug.error("Video","Error Code "+this.$videoElement.error.code+" "+xs[this.$videoElement.error.code]+"; Details: "+this.$videoElement.error.message),this.player.isHlsCanVideoPlay()}));this.eventListenList.push(a,o,l,h,n),ga()?this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)):this.player.debug.warn("Video","not support requestVideoFrameCallback and use timeupdate event to update stats"),this.player.debug.log("Video","init")}destroy(){if(super.destroy(),this.clearCheckVideoCanplayTimeout(),this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.eventListenList&&(this.eventListenList.forEach((e=>{e()})),this.eventListenList=[]),this.isRenderRetryPlaying=!1,this.isRenderRetryPlayingTimes=0,this.isRetryPlaying=!1,this.isRetryPlayingTimes=0,this.player._opt.videoRenderSupportScale&&this._isNeedAddBackDropFilter()){const e=this.player.$container;e.style.backdropFilter="none",e.style.transform="none"}if(this.$canvasElement.height=0,this.$canvasElement.width=0,this.$canvasElement=null,this.canvasContext=null,this.$videoElement){this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.srcObject&&(this.$videoElement.srcObject=null,this.$videoElement.removeAttribute("srcObject")),this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src"));try{this.$videoElement.load()}catch(e){}this.player.$container.removeChild(this.$videoElement),this.$videoElement=null}this.trackGenerator&&(this.trackGenerator.stop(),this.trackGenerator=null),this.vwriter&&(this.vwriter.close(),this.vwriter=null),this._delayPlay=!1,this.mediaStream&&(this.mediaStream.getTracks().forEach((e=>e.stop())),this.mediaStream=null),this.off(),this.player.debug.log("Video","destroy")}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isDestroyed)this.player.debug.log("Video","videoFrameCallback() and isDestroyed");else{if(this.player.isWebrtcH264()||this.player.isOldHls()||this.player.isAliyunRtc()){this.player.emit(Xe.timeUpdate,t.mediaTime),da(this.getHasInit())&&t.width&&t.height&&this.updateVideoInfo({width:t.width,height:t.height,encTypeCode:dt}),this.player.handleRender();const e=parseInt(1e3*(t.mediaTime||this.getCurrentTime()),10)||0;this.player.updateStats({fps:!0,ts:e,dts:e}),this.player.updateCurrentPts(e),this.doAddContentToWatermark()}else if(ha(this.player._opt.useMSE)&&da(this.player._opt.mseUseCanvasRender)){if(this.player.mseDecoder){let e=parseInt(1e3*(t.mediaTime||this.getCurrentTime()),10)+(this.player.mseDecoder.firstRenderTime||0);this.player.updateCurrentPts(e)}this.doAddContentToWatermark()}this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))}}fixChromeVideoFlashBug(){if(this.player._opt.videoRenderSupportScale&&this._isNeedAddBackDropFilter()){const e=this.player.$container;e.style.backdropFilter="blur(0px)",e.style.transform="translateZ(0)"}}fixMobileAutoFullscreen(){const e=gr(),t=pr();(e||t)&&(this.player.debug.log("Video",`fixMobileAutoFullscreen and isIOS ${e} and isAndroid ${t}`),this.$videoElement.setAttribute("webkit-playsinline","true"),this.$videoElement.setAttribute("playsinline","true"),this.$videoElement.setAttribute("x5-video-player-type","h5-page"))}_isNeedAddBackDropFilter(){const e=mr().type.toLowerCase();return"chrome"===e||"edge"===e}isPaused(){let e=!0;return this.$videoElement&&(e=this.$videoElement.paused),e}isPause(){return this.isPaused()}_getVideoReadyState(){let e=0;return this.$videoElement&&(e=this.$videoElement.readyState),e}_getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}play(){if(this.$videoElement){const e=this._getVideoReadyState();if(this.player.debug.log("Video",`play and readyState: ${e}`),0===e)return this.player.debug.log("Video","readyState is 0 and set _delayPlay to true and listen canplay event to play"),this._delayPlay=!0,void(null===this.checkVideoCanplayTimeout&&(this.checkVideoCanplayTimeout=setTimeout((()=>{this.clearCheckVideoCanplayTimeout(),da(this.isPlaying())&&(this.player.debug.warn("Video","checkVideoCanplayTimeout and video is not playing and retry play"),this._replay())}),1e3)));this._play()}}_play(){this.$videoElement&&this.$videoElement.play().then((()=>{this._delayPlay=!1,this.player.debug.log("Video","_play success"),this.isPlaying()?(this.player.emit(Xe.removeLoadingBgImage),this.isRetryPlayingTimes=0,this.isRetryPlaying=!1):setTimeout((()=>{this._replay()}),100)})).catch((e=>{this.player.debug.error("Video","_play error",e),this.isRetryPlaying=!1,setTimeout((()=>{this._replay()}),100)}))}_replay(){if(!this.isPlaying()&&da(this.isRetryPlaying)){if(this.isRetryPlaying=!0,this.isRetryPlayingTimes>=3)return void(this.player.isWebrtcH264()?(this.player.debug.error("Video",`_replay(webrtc H264) then but not playing and retry play times is ${this.isRetryPlayingTimes} and emit error`),this.player.emitError(tt.videoElementPlayingFailedForWebrtc)):(this.player.debug.error("Video",`_replay then but not playing and retry play times is ${this.isRetryPlayingTimes} and emit error to use canvas render`),this.player.emitError(tt.videoElementPlayingFailed)));this.player.debug.warn("Video",`_play then but not playing and retry play and isRetryPlayingTimes is ${this.isRetryPlayingTimes}`),this._play(),this.isRetryPlayingTimes++}}pause(e){this.isPlaying()&&(e?this.$videoElement&&this.$videoElement.pause():setTimeout((()=>{this.$videoElement&&this.$videoElement.pause()}),100))}clearView(){super.clearView(),this.$videoElement&&(this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.$videoElement.srcObject&&(this.$videoElement.srcObject=null,this.$videoElement.removeAttribute("srcObject")))}screenshot(e,t,i,s){if(!this._canScreenshot())return this.player.debug.warn("Video","screenshot failed, video is not ready"),null;e=e||sr(),s=s||ot.download;let r=.92;!vi[t]&&ot[t]&&(s=t,t="png",i=void 0),"string"==typeof i&&(s=i,i=void 0),void 0!==i&&(r=Number(i));const a=this.$videoElement;let o=this.$canvasElement;o.width=a.videoWidth,o.height=a.videoHeight,this.canvasContext.drawImage(a,0,0,o.width,o.height);const n=vi[t]||vi.png,l=o.toDataURL(n,r);if(this.canvasContext.clearRect(0,0,o.width,o.height),o.width=0,o.height=0,s===ot.base64)return l;{const t=ir(l);if(s===ot.blob)return t;if(s===ot.download){const i=n.split("/")[1];Ua(t,e+"."+i)}}}screenshotWatermark(e){return new Promise(((t,i)=>{if(Vr(e)&&(e={filename:e}),!this._canScreenshot())return this.player.debug.warn("Video","screenshot failed, video is not ready"),i("screenshot failed, video is not ready");const s=this.$videoElement;(e=e||{}).width=s.videoWidth,e.height=s.videoHeight,e.filename=e.filename||sr(),e.format=e.format?vi[e.format]:vi.png,e.quality=Number(e.quality)||.92,e.type=e.type||ot.download;let r=this.$canvasElement;r.width=s.videoWidth,r.height=s.videoHeight,this.canvasContext.drawImage(s,0,0,r.width,r.height);const a=r.toDataURL(e.format,e.quality);this.canvasContext.clearRect(0,0,r.width,r.height),r.width=0,r.height=0,Mr(a,e).then((i=>{if(e.type===ot.base64)t(a);else{const s=ir(i);if(e.type===ot.blob)t(s);else if(e.type===ot.download){t();const i=e.format.split("/")[1];Ua(s,e.filename+"."+i)}}})).catch((e=>{i(e)}))}))}initCanvasViewSize(){this.resize()}clear(){const e=this.$videoElement,t=e.buffered,i=t.length?t.end(t.length-1):0;e.currentTime=i}render(e){if(this.vwriter){if(this.$videoElement.srcObject||(this.$videoElement.srcObject=this.mediaStream),this.isPaused()){const e=this._getVideoReadyState();if(this.player.debug.warn("Video","render() error, video is paused and readyState is "+e),4===e&&da(this.isRenderRetryPlaying)){if(this.isRenderRetryPlaying=!0,this.isRenderRetryPlayingTimes>3)return this.player.debug.error("Video","render() error, video is paused and readyState is "+e+", retry times is "+this.isRenderRetryPlayingTimes+", emit error and use canvas render"),void this.player.emitError(tt.videoElementPlayingFailed);this.$videoElement.play().then((()=>{this.isRenderRetryPlayingTimes=0,this.isRenderRetryPlaying=!1,this.player.debug.log("Video","render() video is paused and replay success")})).catch((e=>{this.isRenderRetryPlaying=!1,this.isRenderRetryPlayingTimes++,this.player.debug.warn("Video","render() error, video is paused and replay error ",e)}))}}if(this.player.updateStats({fps:!0,ts:e.ts||0}),e.videoFrame)this.vwriter.write(e.videoFrame),Zr(e.videoFrame);else if(e.output){let s=e.output;if(this.player.faceDetectActive&&this.player.ai&&this.player.ai.faceDetector){null===this.prevAiFaceDetectTime&&(this.prevAiFaceDetectTime=sr());const t=sr();t-this.prevAiFaceDetectTime>this.player._opt.aiFaceDetectInterval&&(s=this.player.ai.faceDetector.detect({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0}),this.prevAiFaceDetectTime=t)}if(this.player.objectDetectActive&&this.player.ai&&this.player.ai.objectDetector){null===this.prevAiObjectDetectTime&&(this.prevAiObjectDetectTime=sr());const t=sr();t-this.prevAiObjectDetectTime>this.player._opt.aiObjectDetectInterval&&(s=this.player.ai.objectDetector.detect({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0}),this.prevAiObjectDetectTime=t)}if(this.player.occlusionDetectActive&&this.player.ai&&this.player.ai.occlusionDetector){null===this.prevAiOcclusionDetectTime&&(this.prevAiOcclusionDetectTime=sr());const t=sr();if(t-this.prevAiOcclusionDetectTime>=this.player._opt.aiOcclusionDetectInterval){const i=this.player.ai.occlusionDetector.check({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0});this.prevAiOcclusionDetectTime=t,i&&(this.player.debug.log("Video","render() and ai occlusion detect result is true"),this.player.emit(Xe.aiOcclusionDetectResult,{ts:e.ts||0}))}}if(this.player.imageDetectActive&&this.player.ai&&this.player.ai.imageDetector){const t=this.player.ai.imageDetector.check({width:this.videoInfo.width,height:this.videoInfo.height,data:e.output,ts:e.ts||0});if(t&&t.data&&(this.player.emit(Xe.aiOcclusionDetectResult,{type:t.type,ts:e.ts||0}),this.player._opt.aiImageDetectDrop))return void this.player.debug.log("Video",`render() and ai image detect result type is ${t.type} and drop`)}try{const r=(t=s,i={format:"I420",codedWidth:this.videoInfo.width,codedHeight:this.videoInfo.height,timestamp:e.ts},new VideoFrame(t,i));this.vwriter.write(r),Zr(r)}catch(e){this.player.debug.error("Video","render error",e),this.player.emitError(tt.wasmUseVideoRenderError,e)}}this.player.updateCurrentPts(e.ts||0),this.doAddContentToWatermark(),this.doAddAiContentToWatermark()}else this.player.debug.warn("Video","render and this.vwriter is null");var t,i}_resize(){this.player.debug.log("Video","_resize()");let e=this.player.width,t=this.player.height;const i=this.player._opt,s=i.rotate;if(i.hasControl&&!i.controlAutoHide){const s=i.playType===y?Pt:It;cr()&&this.player.fullscreen&&i.useWebFullScreen?e-=s:t-=s}this.$videoElement.width=e,this.$videoElement.height=t,this.$videoElement.style.width=e+"px",this.$videoElement.style.height=t+"px",270!==s&&90!==s||(this.$videoElement.width=t,this.$videoElement.height=e,this.$videoElement.style.width=t+"px",this.$videoElement.style.height=e+"px");let r=(e-this.$videoElement.width)/2,a=(t-this.$videoElement.height)/2,o="contain";da(i.isResize)&&(o="fill"),i.isFullResize&&(o="none");let n="";"none"===i.mirrorRotate&&s&&(n+=" rotate("+s+"deg)"),"level"===i.mirrorRotate?n+=" rotateY(180deg)":"vertical"===i.mirrorRotate&&(n+=" rotateX(180deg)"),this.player._opt.videoRenderSupportScale&&(this.$videoElement.style.objectFit=o),this.$videoElement.style.transform=n,this.$videoElement.style.padding="0",this.$videoElement.style.left=r+"px",this.$videoElement.style.top=a+"px"}getType(){return G}getCurrentTime(){return this.$videoElement.currentTime}isPlaying(){return this.$videoElement&&da(this.$videoElement.paused)&&da(this.$videoElement.ended)&&0!==this.$videoElement.playbackRate&&0!==this.$videoElement.readyState}_canScreenshot(){return this.$videoElement&&this.$videoElement.readyState>=2}getPlaybackQuality(){let e=null;if(this.$videoElement){if(Kr(this.$videoElement.getVideoPlaybackQuality)){const t=this.$videoElement.getVideoPlaybackQuality();e={droppedVideoFrames:t.droppedVideoFrames||t.corruptedVideoFrames,totalVideoFrames:t.totalVideoFrames,creationTime:t.creationTime}}else e={droppedVideoFrames:this.$videoElement.webkitDroppedFrameCount,totalVideoFrames:this.$videoElement.webkitDecodedFrameCount,creationTime:sr()};e&&(e.renderedVideoFrames=e.totalVideoFrames-e.droppedVideoFrames)}return e}setRate(e){this.$videoElement&&(this.$videoElement.playbackRate=e)}get rate(){let e=1;return this.$videoElement&&(e=this.$videoElement.playbackRate),e}clearCheckVideoCanplayTimeout(){this.checkVideoCanplayTimeout&&(clearTimeout(this.checkVideoCanplayTimeout),this.checkVideoCanplayTimeout=null)}}class za extends Oa{constructor(e){super(e),this.controlHeight=Pt,this.bufferList=[],this.playing=!1,this.playInterval=null,this.fps=1,this.preFps=1,this.streamFps=0,this.playbackRate=1,this._firstTimestamp=null,this._renderFps=0,this._startfpsTime=null,this._startFpsTimestamp=null,this._hasCalcFps=!1,this.player.on(Xe.playbackPause,(e=>{e?(this.pause(),this.player.playback.isPlaybackPauseClearCache&&this.clear()):this.resume()})),this.player.debug.log("CanvasPlaybackLoader","init")}destroy(){this._stopSync(),this._firstTimestamp=null,this.playing=!1,this.playbackRate=1,this.fps=1,this.preFps=1,this.bufferList=[],this._renderFps=0,this._startfpsTime=null,this._startFpsTimestamp=null,this._hasCalcFps=!1,super.destroy(),this.player.debug.log("CanvasPlaybackLoader","destroy")}_initCanvasRender(){this.player._opt.useWCS?(this.renderType=Ft,fa()&&this.player._opt.wcsUseWebgl2Render?(this._initContextGl2(),this.webglRender&&(this.isWcsWebgl2=!0)):this._initContext2D()):this.player._opt.useWebGPU?(this.renderType=jt,this._initContextGPU()):(this.renderType=Ot,this._initContextGl())}_sync(){this._stopSync(),this._doPlay(),this.playInterval=setInterval((()=>{this._doPlay()}),this.fragDuration)}_doPlay(){if(this.bufferList.length>0&&!this.player.seeking){const e=this.bufferList.shift();e&&e.buffer&&(this._doRender(e.buffer),this.player.handleRender(),this.player.playback.updateStats({ts:e.ts,tfTs:e.tfTs}))}}_stopSync(){this.playInterval&&(clearInterval(this.playInterval),this.playInterval=null)}_doRender(e){if(this.player._opt.useWCS)if(this.webglRender)this.webglRender.render(e),Zr(e);else if(Kr(e.createImageBitmap))try{e.createImageBitmap().then((t=>{this.context2D.drawImage(t,0,0,this.$videoElement.width,this.$videoElement.height),Zr(e)}))}catch(e){}else this.context2D.drawImage(e,0,0,this.$videoElement.width,this.$videoElement.height),Zr(e);else if(this.getCanvasType()===Ot)try{this.webglRender.renderYUV(this.$videoElement.width,this.$videoElement.height,e)}catch(e){this.player.debug.error("CanvasPlaybackLoader",`doRender webgl render context is lost ${this.contextGl&&this.contextGl.isContextLost()} and error: ${e.toString()}`)}else if(this.getCanvasType()===jt)try{if(!this.webGPURender)return void this.player.debug.warn("CanvasVideoLoader","doRender webgpu render is not init");this.webGPURender.renderYUV(this.$videoElement.width,this.$videoElement.height,e)}catch(e){this.player.debug.error("CanvasPlaybackLoader",`doRender webgpu render and error: ${e.toString()}`)}}get rate(){return this.playbackRate}get fragDuration(){return Math.ceil(1e3/(this.fps*this.playbackRate))}get bufferSize(){return this.bufferList.length}getStreamFps(){return this.streamFps}initFps(){this._hasCalcFps?this.player.debug.log("CanvasPlaybackLoader","initFps, has calc fps"):(this.preFps=rr(this.player.playback.fps,1,100),this.fps=this.preFps)}setFps(e){e!==this.fps?(e>100&&this.player.debug.warn("CanvasPlaybackLoader","setFps max",e),e<0&&this.player.debug.warn("CanvasPlaybackLoader","setFps min",e),this.fps=rr(e,1,100),this.player.debug.log("CanvasPlaybackLoader",`setFps ${this.preFps} -> ${this.fps}`),this.player.playback.isUseFpsRender&&this._sync()):this.player.debug.log("CanvasPlaybackLoader",`setFps, same fps ${e}`)}setStreamFps(e){this.player.debug.log("CanvasPlaybackLoader","setStreamFps",e),this._hasCalcFps=!0,this.streamFps=e,this.preFps=e,this.setFps(e)}setRate(e){e!==this.playbackRate&&(this.playbackRate=e,this.player.playback.isUseFpsRender&&this._sync())}render$2(e){null===this._firstTimestamp&&(this._firstTimestamp=e.ts);const t={tfTs:e.ts-this._firstTimestamp,ts:e.ts};e.videoFrame?t.buffer=e.videoFrame:t.buffer=e.output,this.bufferList.push(t),this.startRender(),this.player.handleRender(),this.player.playback.updateStats({ts:e.ts,tfTs:t.tfTs})}startRender(){for(;!(this.bufferList.length<=0);){const e=this.bufferList.shift();this._doRender(e.buffer)}}pushData(e){null===this._firstTimestamp&&(this._firstTimestamp=e.ts);const t={tfTs:e.ts-this._firstTimestamp,ts:e.ts};e.videoFrame?t.buffer=e.videoFrame:t.buffer=e.output;const i=this.player._opt.playbackConfig.isCacheBeforeDecodeForFpsRender;if(i||this.bufferSize>this.fps*this.playbackRate*2&&(this.player.debug.warn("CanvasPlaybackLoader",`buffer size is ${this.bufferSize}`),this._doPlay()),this.bufferList.push(t),!this._hasCalcFps){const e=ia(this.bufferList);null!==e&&e!==this.preFps&&(this.player.debug.log("CanvasPlaybackLoader",`calc fps is ${e} pre fps is ${this.preFps} and updatePreFps`),this.setStreamFps(e))}if(!i){const e=this.bufferList.length,t=e/(this.fps*this.playbackRate);this.player.debug.log("CanvasPlaybackLoader","rate is",t),t<=1?this.setFps(this.preFps):(this.setFps(this.fps+Math.floor(t*this.playbackRate)),this.player.debug.warn("CanvasPlaybackLoader","rate is",t,"fps is",this.fps,"bufferListLength is",e))}}initVideo(){this.player.playback&&this.player.playback.isUseFpsRender&&this._sync(),this.playing=!0}initVideoDelay(){const e=this.player._opt.playbackDelayTime;e>0?this.delayTimeout=setTimeout((()=>{this.initVideo()}),e):this.initVideo()}clearView(){super.clearView(),this.contextGl.clear(this.contextGl.COLOR_BUFFER_BIT)}clear(){this.player._opt.useWCS&&this.bufferList.forEach((e=>{e.buffer&&Zr(e.buffer)})),this.bufferList=[]}resume(){this.player.playback.isUseFpsRender&&this._sync(),this.playing=!0}pause(){this.player.playback.isUseFpsRender&&this._stopSync(),this.playing=!1}}class Ga{constructor(e){return new(Ga.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){return e.useMSE?e.mseUseCanvasRender?Na:ja:e.isHls&&da(e.supportHls265)||e.isWebrtc&&da(e.isWebrtcH265)?e.useCanvasRender?Na:ja:e.isAliyunRtc?ja:e.useWCS?e.playType===y?za:!e.useOffscreen&&e.wcsUseVideoRender?ja:Na:e.playType===y?za:e.wasmUseVideoRender&&!e.useOffscreen?ja:Na}}class Va extends ba{constructor(e){super(),this.bufferList=[],this.player=e,this.$audio=null,this.scriptNode=null,this.workletProcessorNode=null,this.hasInitScriptNode=!1,this.audioContext=new(window.AudioContext||window.webkitAudioContext)({sampleRate:48e3}),this.gainNode=this.audioContext.createGain();const t=this.audioContext.createBufferSource();t.buffer=this.audioContext.createBuffer(1,1,22050),t.connect(this.audioContext.destination),t.noteOn?t.noteOn(0):t.start(0),this.audioBufferSourceNode=t,this.mediaStreamAudioDestinationNode=this.audioContext.createMediaStreamDestination(),this.gainNode.gain.value=0,this.playing=!1,this.audioInfo={encType:"",channels:"",sampleRate:"",depth:""},this.init=!1,this.hasAudio=!1,this.audioResumeStateTimeout=null}destroy(){this.closeAudio(),this.resetInit(),this.audioContext&&(this.audioContext.close(),this.audioContext=null),this.gainNode=null,this.hasAudio=!1,this.playing=!1,this.scriptNode&&(this.scriptNode.onaudioprocess=Zs,this.scriptNode=null),this.workletProcessorNode&&(this.workletProcessorNode.port.onmessage=Zs,this.workletProcessorNode=null),this.clearAudioResumeStateTimeout(),this.audioBufferSourceNode=null,this.mediaStreamAudioDestinationNode=null,this.hasInitScriptNode=!1,this.off()}resetInit(){this.audioInfo={encType:"",channels:"",sampleRate:"",depth:""},this.init=!1}getAudioInfo(){return this.audioInfo}updateAudioInfo(e){e.encTypeCode&&(this.audioInfo.encTypeCode=e.encTypeCode,this.audioInfo.encType=bt[e.encTypeCode]),e.channels&&(this.audioInfo.channels=e.channels),e.sampleRate&&(this.audioInfo.sampleRate=e.sampleRate),e.depth&&(this.audioInfo.depth=e.depth),this.audioInfo.sampleRate&&this.audioInfo.channels&&this.audioInfo.encType&&!this.init&&(this.player.emit(Xe.audioInfo,this.audioInfo),this.init=!0)}get isPlaying(){return this.playing}get isMute(){return 0===this.gainNode.gain.value}get volume(){return this.gainNode.gain.value}get bufferSize(){return this.bufferList.length}get audioContextState(){let e=null;return this.audioContext&&(e=this.audioContext.state),e}initScriptNode(){}initMobileScriptNode(){}initWorkletScriptNode(){}getEngineType(){return""}mute(e){e?(this.isMute||this.player.emit(Xe.mute,e),this.setVolume(0),this.clear()):(this.isMute&&this.player.emit(Xe.mute,e),this.setVolume(this.player.lastVolume||.5))}setVolume(e){e=parseFloat(e).toFixed(2),isNaN(e)||(this.audioEnabled(!0),e=rr(e,0,1),this.gainNode.gain.value=e,this.player.emit(Xe.volumechange,this.player.volume))}closeAudio(){this.hasInitScriptNode&&(this.scriptNode&&this.scriptNode.disconnect(this.gainNode),this.workletProcessorNode&&this.workletProcessorNode.disconnect(this.gainNode),this.gainNode&&(this.gainNode.disconnect(this.mediaStreamAudioDestinationNode),this.$audio||this.gainNode.disconnect(this.audioContext.destination))),this.clear()}audioEnabled(e){e?this.isStateSuspended()&&(this.audioContext.resume().then((()=>{this.player.emit(Xe.audioResumeState,{state:this.audioContextState,isRunning:this.isStateRunning()})})),this.audioResumeStateTimeout=setTimeout((()=>{this.clearAudioResumeStateTimeout(),this.isStateSuspended()&&this.player.emit(Xe.audioResumeState,{state:this.audioContextState,isRunning:this.isStateRunning()})}),1e3)):this.isStateRunning()&&this.audioContext.suspend()}isStateRunning(){return"running"===this.audioContextState}isStateSuspended(){return"suspended"===this.audioContextState}clearAudioResumeStateTimeout(){this.audioResumeStateTimeout&&(clearTimeout(this.audioResumeStateTimeout),this.audioResumeStateTimeout=null)}clear(){this.bufferList=[]}play(e,t){}pause(){this.playing=!1}resume(){this.playing=!0}setRate(e){}getAudioBufferSize(){return 0}}class Ha{constructor(e,t,i,s){this.player=e,this.audio=t,this.channel=i,this.bufferSize=s}extract(e,t){let i=this.provide(t);for(let t=0;t=o){try{for(let e=0;e2&&void 0!==arguments[2]?arguments[2]:0;const s=2*(t=t||0);i>=0||(i=(e.length-s)/2);const r=2*i;this.ensureCapacity(i+this._frameCount);const a=this.endIndex;this.vector.set(e.subarray(s,s+r),a),this._frameCount+=i}putBuffer(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t=t||0,i>=0||(i=e.frameCount-t),this.putSamples(e.vector,e.position+t,i)}receive(e){e>=0&&!(e>this._frameCount)||(e=this.frameCount),this._frameCount-=e,this._position+=e}receiveSamples(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=2*t,s=this.startIndex;e.set(this._vector.subarray(s,s+i)),this.receive(t)}extract(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=this.startIndex+2*t,r=2*i;e.set(this._vector.subarray(s,s+r))}ensureCapacity(){const e=parseInt(2*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0));if(this._vector.length0&&void 0!==arguments[0]?arguments[0]:0;this.ensureCapacity(this._frameCount+e)}rewind(){this._position>0&&(this._vector.set(this._vector.subarray(this.startIndex,this.endIndex)),this._position=0)}}class $a{constructor(e){e?(this._inputBuffer=new Wa,this._outputBuffer=new Wa):this._inputBuffer=this._outputBuffer=null}get inputBuffer(){return this._inputBuffer}set inputBuffer(e){this._inputBuffer=e}get outputBuffer(){return this._outputBuffer}set outputBuffer(e){this._outputBuffer=e}clear(){this._inputBuffer.clear(),this._outputBuffer.clear()}}class Ja extends $a{constructor(e){super(e),this.reset(),this._rate=1}set rate(e){this._rate=e}reset(){this.slopeCount=0,this.prevSampleL=0,this.prevSampleR=0}clone(){const e=new Ja;return e.rate=this._rate,e}process(){const e=this._inputBuffer.frameCount;this._outputBuffer.ensureAdditionalCapacity(e/this._rate+1);const t=this.transpose(e);this._inputBuffer.receive(),this._outputBuffer.put(t)}transpose(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(0===e)return 0;const t=this._inputBuffer.vector,i=this._inputBuffer.startIndex,s=this._outputBuffer.vector,r=this._outputBuffer.endIndex;let a=0,o=0;for(;this.slopeCount<1;)s[r+2*o]=(1-this.slopeCount)*this.prevSampleL+this.slopeCount*t[i],s[r+2*o+1]=(1-this.slopeCount)*this.prevSampleR+this.slopeCount*t[i+1],o+=1,this.slopeCount+=this._rate;if(this.slopeCount-=1,1!==e)e:for(;;){for(;this.slopeCount>1;)if(this.slopeCount-=1,a+=1,a>=e-1)break e;const n=i+2*a;s[r+2*o]=(1-this.slopeCount)*t[n]+this.slopeCount*t[n+2],s[r+2*o+1]=(1-this.slopeCount)*t[n+1]+this.slopeCount*t[n+3],o+=1,this.slopeCount+=this._rate}return this.prevSampleL=t[i+2*e-2],this.prevSampleR=t[i+2*e-1],o}}const Ka=function(){};class qa extends class{constructor(e){this._pipe=e}get pipe(){return this._pipe}get inputBuffer(){return this._pipe.inputBuffer}get outputBuffer(){return this._pipe.outputBuffer}fillInputBuffer(){throw new Error("fillInputBuffer() not overridden")}fillOutputBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;for(;this.outputBuffer.frameCount2&&void 0!==arguments[2]?arguments[2]:Ka;super(t),this.callback=i,this.sourceSound=e,this.historyBufferSize=22050,this._sourcePosition=0,this.outputBufferPosition=0,this._position=0}get position(){return this._position}set position(e){if(e>this._position)throw new RangeError("New position may not be greater than current position");const t=this.outputBufferPosition-(this._position-e);if(t<0)throw new RangeError("New position falls outside of history buffer");this.outputBufferPosition=t,this._position=e}get sourcePosition(){return this._sourcePosition}set sourcePosition(e){this.clear(),this._sourcePosition=e}onEnd(){this.callback()}fillInputBuffer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=new Float32Array(2*e),i=this.sourceSound.extract(t,e,this._sourcePosition);this._sourcePosition+=i,this.inputBuffer.putSamples(t,0,i)}extract(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.fillOutputBuffer(this.outputBufferPosition+t);const i=Math.min(t,this.outputBuffer.frameCount-this.outputBufferPosition);this.outputBuffer.extract(e,this.outputBufferPosition,i);const s=this.outputBufferPosition+i;return this.outputBufferPosition=Math.min(this.historyBufferSize,s),this.outputBuffer.receive(Math.max(s-this.historyBufferSize,0)),this._position+=i,i}handleSampleData(e){this.extract(e.data,4096)}clear(){super.clear(),this.outputBufferPosition=0}}const Ya=[[124,186,248,310,372,434,496,558,620,682,744,806,868,930,992,1054,1116,1178,1240,1302,1364,1426,1488,0],[-100,-75,-50,-25,25,50,75,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-20,-15,-10,-5,5,10,15,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-4,-3,-2,-1,1,2,3,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],Qa=-10/1.5;class Xa extends $a{constructor(e){super(e),this._quickSeek=!0,this.midBufferDirty=!1,this.midBuffer=null,this.overlapLength=0,this.autoSeqSetting=!0,this.autoSeekSetting=!0,this._tempo=1,this.setParameters(44100,0,0,8)}clear(){super.clear(),this.clearMidBuffer()}clearMidBuffer(){this.midBufferDirty&&(this.midBufferDirty=!1,this.midBuffer=null)}setParameters(e,t,i,s){e>0&&(this.sampleRate=e),s>0&&(this.overlapMs=s),t>0?(this.sequenceMs=t,this.autoSeqSetting=!1):this.autoSeqSetting=!0,i>0?(this.seekWindowMs=i,this.autoSeekSetting=!1):this.autoSeekSetting=!0,this.calculateSequenceParameters(),this.calculateOverlapLength(this.overlapMs),this.tempo=this._tempo}set tempo(e){let t;this._tempo=e,this.calculateSequenceParameters(),this.nominalSkip=this._tempo*(this.seekWindowLength-this.overlapLength),this.skipFract=0,t=Math.floor(this.nominalSkip+.5),this.sampleReq=Math.max(t+this.overlapLength,this.seekWindowLength)+this.seekLength}get tempo(){return this._tempo}get inputChunkSize(){return this.sampleReq}get outputChunkSize(){return this.overlapLength+Math.max(0,this.seekWindowLength-2*this.overlapLength)}calculateOverlapLength(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;e=this.sampleRate*t/1e3,e=e<16?16:e,e-=e%8,this.overlapLength=e,this.refMidBuffer=new Float32Array(2*this.overlapLength),this.midBuffer=new Float32Array(2*this.overlapLength)}checkLimits(e,t,i){return ei?i:e}calculateSequenceParameters(){let e,t;this.autoSeqSetting&&(e=150+-50*this._tempo,e=this.checkLimits(e,50,125),this.sequenceMs=Math.floor(e+.5)),this.autoSeekSetting&&(t=28.333333333333332+Qa*this._tempo,t=this.checkLimits(t,15,25),this.seekWindowMs=Math.floor(t+.5)),this.seekWindowLength=Math.floor(this.sampleRate*this.sequenceMs/1e3),this.seekLength=Math.floor(this.sampleRate*this.seekWindowMs/1e3)}set quickSeek(e){this._quickSeek=e}clone(){const e=new Xa;return e.tempo=this._tempo,e.setParameters(this.sampleRate,this.sequenceMs,this.seekWindowMs,this.overlapMs),e}seekBestOverlapPosition(){return this._quickSeek?this.seekBestOverlapPositionStereoQuick():this.seekBestOverlapPositionStereo()}seekBestOverlapPositionStereo(){let e,t,i,s=0;for(this.preCalculateCorrelationReferenceStereo(),e=0,t=Number.MIN_VALUE;st&&(t=i,e=s);return e}seekBestOverlapPositionStereoQuick(){let e,t,i,s,r,a=0;for(this.preCalculateCorrelationReferenceStereo(),t=Number.MIN_VALUE,e=0,s=0,r=0;a<4;a+=1){let o=0;for(;Ya[a][o]&&(r=s+Ya[a][o],!(r>=this.seekLength));)i=this.calculateCrossCorrelationStereo(2*r,this.refMidBuffer),i>t&&(t=i,e=r),o+=1;s=e}return e}preCalculateCorrelationReferenceStereo(){let e,t,i=0;for(;i=this.sampleReq;){e=this.seekBestOverlapPosition(),this._outputBuffer.ensureAdditionalCapacity(this.overlapLength),this.overlap(Math.floor(e)),this._outputBuffer.put(this.overlapLength),t=this.seekWindowLength-2*this.overlapLength,t>0&&this._outputBuffer.putBuffer(this._inputBuffer,e+this.overlapLength,t);const s=this._inputBuffer.startIndex+2*(e+this.seekWindowLength-this.overlapLength);this.midBuffer.set(this._inputBuffer.vector.subarray(s,s+2*this.overlapLength)),this.skipFract+=this.nominalSkip,i=Math.floor(this.skipFract),this.skipFract-=i,this._inputBuffer.receive(i)}}}const Za=function(e,t){return(e>t?e-t:t-e)>1e-10};class eo{constructor(){this.transposer=new Ja(!1),this.stretch=new Xa(!1),this._inputBuffer=new Wa,this._intermediateBuffer=new Wa,this._outputBuffer=new Wa,this._rate=0,this._tempo=0,this.virtualPitch=1,this.virtualRate=1,this.virtualTempo=1,this.calculateEffectiveRateAndTempo()}clear(){this.transposer.clear(),this.stretch.clear()}clone(){const e=new eo;return e.rate=this.rate,e.tempo=this.tempo,e}get rate(){return this._rate}set rate(e){this.virtualRate=e,this.calculateEffectiveRateAndTempo()}set rateChange(e){this._rate=1+.01*e}get tempo(){return this._tempo}set tempo(e){this.virtualTempo=e,this.calculateEffectiveRateAndTempo()}set tempoChange(e){this.tempo=1+.01*e}set pitch(e){this.virtualPitch=e,this.calculateEffectiveRateAndTempo()}set pitchOctaves(e){this.pitch=Math.exp(.69314718056*e),this.calculateEffectiveRateAndTempo()}set pitchSemitones(e){this.pitchOctaves=e/12}get inputBuffer(){return this._inputBuffer}get outputBuffer(){return this._outputBuffer}calculateEffectiveRateAndTempo(){const e=this._tempo,t=this._rate;this._tempo=this.virtualTempo/this.virtualPitch,this._rate=this.virtualRate*this.virtualPitch,Za(this._tempo,e)&&(this.stretch.tempo=this._tempo),Za(this._rate,t)&&(this.transposer.rate=this._rate),this._rate>1?this._outputBuffer!=this.transposer.outputBuffer&&(this.stretch.inputBuffer=this._inputBuffer,this.stretch.outputBuffer=this._intermediateBuffer,this.transposer.inputBuffer=this._intermediateBuffer,this.transposer.outputBuffer=this._outputBuffer):this._outputBuffer!=this.stretch.outputBuffer&&(this.transposer.inputBuffer=this._inputBuffer,this.transposer.outputBuffer=this._intermediateBuffer,this.stretch.inputBuffer=this._intermediateBuffer,this.stretch.outputBuffer=this._outputBuffer)}process(){this._rate>1?(this.stretch.process(),this.transposer.process()):(this.transposer.process(),this.stretch.process())}}class to{constructor(e,t,i){this.player=e,this.audio=t,this.soundTouch=new eo,this.soundTouch.tempo=1,this.soundTouch.rate=1,this.filter=new qa(i,this.soundTouch)}setRate(e){e!==this.soundTouch.rate&&(this.soundTouch.tempo=e)}provide(e){let t=new Float32Array(2*e),i=this.filter.extract(t,e),s=new Float32Array(i),r=new Float32Array(i);for(let e=0;e{e()})),this.eventListenList=[]),this.$audio&&(this.$audio.pause(),this.$audio.srcObject=null,this.$audio.parentNode&&this.$audio.parentNode.removeChild(this.$audio),this.$audio=null),this.processor&&(this.processor.destroy(),this.processor=null),this.rateProcessor&&(this.rateProcessor.destroy(),this.rateProcessor=null),this.scriptNodeInterval&&(clearInterval(this.scriptNodeInterval),this.scriptNodeInterval=null),this.defaultPlaybackRate=1,this.playbackRate=1,this.scriptStartTime=0,this.audioBufferSize=0,this.engineType=is,this.player.debug.log("AudioContext","destroy")}isAudioPlaying(){return this.$audio&&da(this.$audio.paused)&&da(this.$audio.ended)&&0!==this.$audio.playbackRate&&0!==this.$audio.readyState}_bindAudioProxy(){const{proxy:e}=this.player.events,t=e(this.$audio,"canplay",(()=>{this.player.debug.log("AudioContext","canplay"),this._delayPlay&&this._audioElementPlay()}));this.eventListenList.push(t)}_getAudioElementReadyState(){let e=0;return this.$audio&&(e=this.$audio.readyState),e}audioElementPlay(){if(this.$audio){const e=this._getAudioElementReadyState();if(this.player.debug.log("AudioContext",`play and readyState: ${e}`),!(0!==e||Hr()&&gr()))return this.player.debug.warn("AudioContext","readyState is 0 and set _delayPlay to true"),void(this._delayPlay=!0);this._audioElementPlay()}}_audioElementPlay(){this.$audio&&this.$audio.play().then((()=>{this._delayPlay=!1,this.player.debug.log("AudioContext","_audioElementPlay success"),setTimeout((()=>{this.isAudioPlaying()||(this.player.debug.warn("AudioContext","play failed and retry play"),this._audioElementPlay())}),100),this.isAudioPlaying()&&(this.player.debug.log("AudioContext","play success and remove document click event listener"),document.removeEventListener("click",this._audioElementPlay.bind(this)))})).catch((e=>{this.player.debug.error("AudioContext","_audioElementPlay error",e),document.addEventListener("click",this._audioElementPlay.bind(this))}))}getAudioBufferSize(){return this.audioBufferSize}get oneBufferDuration(){return this.audioBufferSize/this.audioContext.sampleRate*1e3}get isActiveEngineType(){return this.engineType===ss}initProcessor(){this.processor=new Ha(this.player,this,this.audioInfo.channels,this.audioBufferSize),this.rateProcessor=new to(this.player,this,this.processor)}getAutoAudioEngineType(){let e=this.player._opt.audioEngine||is;const t=()=>{e=Hr()&&pr()?ss:gr()&&this.player._opt.supportLockScreenPlayAudio?is:ea()?ts:is};return this.player._opt.audioEngine?this.player._opt.audioEngine===ts&&ea()?e=ts:this.player._opt.audioEngine===ss?e=ss:this.player._opt.audioEngine===is?e=is:t():t(),e}getAudioBufferSizeByType(){const e=this.engineType;this.player._opt.hasVideo;const t=this.player._opt.weiXinInAndroidAudioBufferSize;return e===ts?1024:e===ss?t||4800:1024}initScriptNode(){this.playing=!0,this.hasInitScriptNode||(this.initProcessor(),this.engineType===ts?this.initWorkletScriptNode():this.engineType===ss?this.initIntervalScriptNode():this.engineType===is&&this.initProcessScriptNode(),this.audioElementPlay())}getEngineType(){return this.engineType}isPlaybackRateSpeed(){return this.playbackRate>this.defaultPlaybackRate}initProcessScriptNode(){const e=this.audioContext.createScriptProcessor(this.audioBufferSize,0,this.audioInfo.channels);e.onaudioprocess=e=>{const t=e.outputBuffer;this.handleScriptNodeCallback(t)},e.connect(this.gainNode),this.scriptNode=e,this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.$audio?this.$audio.srcObject=this.mediaStreamAudioDestinationNode.stream:this.gainNode.connect(this.audioContext.destination),this.hasInitScriptNode=!0}initIntervalScriptNode(){this.scriptStartTime=0;const e=1e3*this.audioBufferSize/this.audioContext.sampleRate;this.scriptNodeInterval=setInterval((()=>{if(0===this.bufferList.length||da(this.playing)||this.isMute)return void(this.playing&&da(this.isMute)&&this.player.debug.log("AudioContext",`interval script node and bufferList is ${this.bufferList.length} or playing is ${this.playing}`));const e=this.audioContext.createBufferSource(),t=this.audioContext.createBuffer(this.audioInfo.channels,this.audioBufferSize,this.audioContext.sampleRate);this.handleScriptNodeCallback(t,(()=>{this.scriptStartTime{"init"===e.data.message?(this.audioBufferSize=e.data.audioBufferSize,this.start=e.data.start,this.channels=e.data.channels,this.state=0,this.offset=0,this.samplesArray=[]):"stop"===e.data.message?(this.state=0,this.start=!1,this.offset=0,this.samplesArray=[]):"data"===e.data.message?this.samplesArray.push(e.data.buffer):"zero"===e.data.message&&this.samplesArray.push({left:new Float32Array(this.audioBufferSize).fill(0),right:new Float32Array(this.audioBufferSize).fill(0)})}}process(e,t,i){const s=t[0][0],r=t[0][1];if(0===this.offset&&this.port.postMessage({message:"beep"}),0===this.state)this.state=1;else if(1===this.state&&this.samplesArray.length>=4)this.state=2;else if(2===this.state){const e=this.samplesArray[0];for(let t=0;t{if(this.player.isDestroyed())return void this.player.debug.log("AudioContext","initWorkletScriptNode() player is destroyed");if(!this.audioContext)return void this.player.debug.warn("AudioContext","initWorkletScriptNode audioContext is null");let e=[1];2===this.audioInfo.channels&&(e=[1,1]);try{this.workletProcessorNode=new AudioWorkletNode(this.audioContext,"worklet-processor",{numberOfOutputs:this.audioInfo.channels,outputChannelCount:e})}catch(e){this.player.debug.error("AudioContext","initWorkletScriptNode error",e),this.workletProcessorNode=null,this.tierDownToProcessScript()}this.workletProcessorNode&&(this.workletProcessorNode.connect(this.gainNode),this.gainNode.connect(this.mediaStreamAudioDestinationNode),this.$audio?this.$audio.srcObject=this.mediaStreamAudioDestinationNode.stream:this.gainNode.connect(this.audioContext.destination),this.hasInitScriptNode=!0,this.workletProcessorNode.port.postMessage({message:"init",audioBufferSize:this.audioBufferSize,start:!0,channels:this.audioInfo.channels}),this.workletProcessorNode.port.onmessage=e=>{this.workletProcessorNode?this.audioContext?this.handleScriptNodeCallback(this.workletProcessorNode,null,!0):this.workletProcessorNode.port.postMessage({message:"zero"}):this.player.debug.error("AudioContext","workletProcessorNode is null")})})),this.clearWorkletUrlTimeout=setTimeout((()=>{URL.revokeObjectURL(this.workletUrl),this.workletUrl=null,this.clearWorkletUrlTimeout=null}),Q)}tierDownToProcessScript(){this.player.debug.log("AudioContext","tierDownToProcessScript"),this.engineType=is,this.audioBufferSize=this.getAudioBufferSizeByType(),this.initProcessScriptNode(),this.audioElementPlay()}handleScriptNodeCallback(e,t){let i,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];t=t||Zs;let r=e.length;s&&(i=e,r=this.audioBufferSize);const a=this.audioInfo.channels;if(this.bufferList.length&&this.playing){if(this.player._opt,this.player.openSyncAudioAndVideo()&&ha(this.player.visibility)){this.calcPlaybackRateBySync();const r=this.player.getAudioSyncVideoDiff();if(r>this.player._opt.syncAudioAndVideoDiff)return this.player.debug.warn("AudioContext",`audioSyncVideoOption more than diff :${r}, waiting and bufferList is ${this.bufferList.length}`),s?i.port.postMessage({message:"zero"}):this.fillScriptNodeOutputBuffer(e,a),void t()}let o=this._provide(r);if(0===o.size)return this.player.debug.warn("AudioContext",`bufferList size is ${this.bufferList.length} outputBufferLength is ${r},and bufferItem.size is 0`),s?i.port.postMessage({message:"zero"}):this.fillScriptNodeOutputBuffer(e,a),void t();o&&o.ts&&(this.player.audioTimestamp=o.ts),s?i.port.postMessage({message:"data",buffer:o}):this.fillScriptNodeOutputBuffer(e,a,o),t()}else 0===this.bufferList.length&&this.playing&&da(this.isMute)&&this.player.debug.warn("AudioContext",`bufferList size is 0 and outputBufferLength is ${r}`),s?i.port.postMessage({message:"zero"}):this.fillScriptNodeOutputBuffer(e,a),t()}fillScriptNodeOutputBuffer(e,t,i){if(1===t){const t=e.getChannelData(0);i?0===i.size?t.fill(0):t.set(i.left):t.fill(0)}else if(2===t){const t=e.getChannelData(0),s=e.getChannelData(1);i?0===i.size?(t.fill(0),s.fill(0)):(t.set(i.left),s.set(i.right)):(t.fill(0),s.fill(0))}}play(e,t){this.isMute||(this.hasInitScriptNode?(this.hasAudio=!0,this.player.latestAudioTimestamp=t,this.bufferList.push({buffer:e,ts:t}),da(this.player.openSyncAudioAndVideo())&&this.calcPlaybackRateByBuffer()):this.player.debug.warn("AudioContext","play has not init script node"))}calcPlaybackRateBySync(){if(this.isMute)return;if(!this.playing)return;const e=Math.floor(2e3/this.oneBufferDuration);if(this.bufferList.length>e)return this.player.debug.warn("AudioContext",`bufferList length ${this.bufferList.length} more than ${e}, and drop`),void this.clear();const t=this.player.getAudioSyncVideoDiff();if(this.getEngineType()===ss){if(t<-this.player._opt.syncAudioAndVideoDiff){this.player.debug.warn("AudioContext",`engine active , audioSyncVideoOption ${-this.player._opt.syncAudioAndVideoDiff} less than diff :${t},\n and bufferlist is ${this.bufferList.length}`);const e=this.player.getRenderCurrentPts();for(;this.bufferList.length>0;){const t=this.bufferList[0],i=t.ts-e;if(i>-this.player._opt.syncAudioAndVideoDiff/2){this.player.audioTimestamp=t.ts,this.player.debug.log("AudioContext",`engine active , audioSyncVideoOption\n item.ts is ${t.ts} and currentVideoTimestamp is ${e}, diff is ${i} > -${this.player._opt.syncAudioAndVideoDiff/2} and end`);break}this.bufferList.shift(),this.player.audioTimestamp=t.ts}}}else{let e=this.playbackRate;t<-this.player._opt.syncAudioAndVideoDiff?e===this.defaultPlaybackRate&&(this.player.debug.log("AudioContext",`audioSyncVideoOption ${-this.player._opt.syncAudioAndVideoDiff} less than diff :${t},\n speed up, playbackRate is ${e},\n and bufferList is ${this.bufferList.length}`),e=this.defaultPlaybackRate+.2):t>-this.player._opt.syncAudioAndVideoDiff/2&&e!==this.defaultPlaybackRate&&(this.player.debug.log("AudioContext",`diff is ${t} > -${this.player._opt.syncAudioAndVideoDiff/2} and speed to 1`),e=this.defaultPlaybackRate),this.updatePlaybackRate(e)}}calcPlaybackRateByBuffer(){if(this.isMute)return;if(!this.playing)return;let e=this.playbackRate,t=1e3,i=5e3;this.isAudioPlayer&&(t=this.player._opt.videoBufferDelay,i=this.player._opt.videoBufferMax);const s=Math.floor(t/this.oneBufferDuration),r=Math.floor(i/this.oneBufferDuration);if(this.bufferList.length>r)return this.player.debug.warn("AudioContext",`bufferList length ${this.bufferList.length} more than ${r}, and drop`),void this.clear();this.getEngineType()!==ss&&(this.bufferList.length>s?(e=this.defaultPlaybackRate+.2,this.player.debug.log("AudioContext",`bufferList length ${this.bufferList.length} more than ${s}, speed up, playbackRate is ${e}`)):this.bufferList.length{this.listenPlaybackPause(e)})),this.player.debug.log("AudioPlaybackContext","init")}destroy(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),super.destroy(),this.player.debug.log("AudioPlaybackLoader","destroy")}listenPlaybackPause(e){e?(this.pause(),this.player.playback.isPlaybackPauseClearCache&&this.clear()):this.resume()}initScriptNodeDelay(){const e=this.player._opt.playbackDelayTime;e>0?this.delayTimeout=setTimeout((()=>{this.initScriptNode()}),e):this.initScriptNode()}setRate(e){e!==this.defaultPlaybackRate&&this.rateProcessor&&(this.player.debug.log("AudioPlaybackContext","setRate",e),this.defaultPlaybackRate=e,this.updatePlaybackRate(e))}}class ao extends io{constructor(e){super(e),this.TAG_NAME="AudioPlayerLoader",this.isAudioPlayer=!0,this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}play(e,t){da(this.playing)||super.play(e,t)}pause(){this.player.debug.log(this.TAG_NAME,"pause"),this.playing=!1,this.clear()}resume(){this.player.debug.log(this.TAG_NAME,"resume"),this.playing=!0}}class oo{constructor(e){return new(oo.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){return e.playType===y?ro:e.playType===g?ao:e.isHls&&da(e.supportHls265)||e.isWebrtc&&da(e.isWebrtcH265)||e.useMSE&&e.mseDecodeAudio||e.isAliyunRtc?so:io}}class no extends ba{constructor(e){super(),this.TAG_NAME="FetchWorkerLoader",this.player=e,this.playing=!1,this.fetchWorker=null,this.workerClearTimeout=null,this.workerUrl=null,this.abortController=new AbortController,this.streamRate=lr((t=>{e.emit(Xe.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,this._initFetchWorker(),e.debug.log(this.TAG_NAME,"init")}destroy(){this.off(),this.workerUrl&&(window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.fetchWorker&&(this.fetchWorker.postMessage({cmd:Je}),this.fetchWorker.terminate(),this.fetchWorker=null),this._stopStreamRateInterval(),this.streamRate=null,this.player.debug.log(this.TAG_NAME,"destroy")}_initFetchWorker(){const e=ma(function(){function e(e){return!0===e||"true"===e}function t(e){return!1===e||"false"===e}const i="The user aborted a request",s="AbortError",r="AbortError",a="fetch",o="destroy",n="buffer",l="fetchError",h="fetchClose",d="fetchSuccess",c="idle",u="buffering",p="complete";let f=new class{constructor(){this._requestAbort=!1,this._status=c,this.writableStream=null,this.isChrome=!1,this.abortController=new AbortController}destroy(){this.abort(),this.writableStream&&t(this.writableStream.locked)&&this.writableStream.close().catch((e=>{})),this.writableStream=null,this._status=c}fetchStream(t){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=Object.assign({signal:this.abortController.signal},{headers:a.headers||{}});fetch(t,o).then((t=>{if(this._requestAbort)return this._status=c,void t.body.cancel();if(!function(e){return e.ok&&e.status>=200&&e.status<=299}(t))return this.abort(),void postMessage({cmd:l,message:`fetch response status is ${t.status} and ok is ${t.ok}`});if(postMessage({cmd:d}),"undefined"!=typeof WritableStream)this.writableStream=new WritableStream({write:t=>{this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||e(this._requestAbort)?this._status=p:(this._status=u,postMessage({cmd:n,buffer:t},[t.buffer]))},close:()=>{this._status=p,postMessage({cmd:h})},abort:e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return void(this._status=p);const t=e.toString();-1===t.indexOf(i)&&-1===t.indexOf(s)&&e.name!==r&&(this.abort(),postMessage({cmd:l,message:e.toString()}))}}),t.body.pipeTo(this.writableStream);else{const a=t.body.getReader(),o=()=>{a.read().then((t=>{let{done:i,value:s}=t;if(i)return this._status=p,void postMessage({cmd:h});this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||e(this._requestAbort)?this._status=p:(this._status=u,postMessage({cmd:n,buffer:s},[s.buffer]),o())})).catch((e=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return void(this._status=p);const t=e.toString();-1===t.indexOf(i)&&-1===t.indexOf(s)&&e.name!==r&&(this.abort(),postMessage({cmd:l,message:e.toString()}))}))};o()}})).catch((e=>{this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||"AbortError"!==e.name&&(this.abort(),postMessage({cmd:l,message:e.toString()}))}))}abort(){if(this._requestAbort=!0,this._status!==u||t(f.isChrome)){if(this.abortController){try{this.abortController.abort()}catch(e){}this.abortController=null}}else this.abortController=null}};self.onmessage=t=>{const i=t.data;switch(i.cmd){case a:f.isChrome=e(i.isChrome),f.fetchStream(i.url,JSON.parse(i.options));break;case o:f.destroy(),f=null}}}.toString()),t=new Blob([e],{type:"text/javascript"});let i=URL.createObjectURL(t);const s=new Worker(i);this.workerUrl=i,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),Q),s.onmessage=e=>{const{demux:t}=this.player,i=e.data;switch(i.cmd){case Ke:this.streamRate&&this.streamRate(i.buffer.byteLength),t.dispatch(i.buffer);break;case Qe:this.emit(Xe.streamSuccess),this._startStreamRateInterval();break;case Ye:t.close(),this.emit(Xe.streamEnd);break;case qe:t.close(),this.emit(tt.fetchError,i.message)}},this.fetchWorker=s}_startStreamRateInterval(){this._stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}_stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}fetchStream(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player._times.streamStart=sr(),this.fetchWorker.postMessage({cmd:$e,url:e,isChrome:Wr(),options:JSON.stringify(t)})}getStreamType(){return l}}class lo extends ba{constructor(e){super(),this.player=e,this.socket=null,this.socketStatus=it,this.wsUrl=null,this.requestAbort=!1,this.socketDestroyFnList=[],this.streamRate=lr((t=>{e.emit(Xe.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,e.debug.log("WebsocketStream","init")}destroy(){this._closeWebSocket(),this.stopStreamRateInterval(),this.wsUrl=null,this.off(),this.player.debug.log("WebsocketStream","destroy")}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}_createWebSocket(){const e=this.player,{debug:t,events:{proxy:i},demux:s}=e;this.socket=new WebSocket(this.wsUrl),this.socket.binaryType="arraybuffer";const r=i(this.socket,"open",(()=>{t.log("WebsocketStream","socket open"),this.socketStatus=st,this.emit(Xe.streamSuccess),this.player.emit(Xe.websocketOpen),this.startStreamRateInterval()})),a=i(this.socket,"message",(e=>{this.streamRate&&this.streamRate(e.data.byteLength),this._handleMessage(e.data)})),o=i(this.socket,"close",(e=>{if(t.log("WebsocketStream",`socket close and code is ${e.code}`),1006===e.code&&t.error("WebsocketStream",`socket close abnormally and code is ${e.code}`),ha(this.requestAbort))return this.requestAbort=!1,void t.log("WebsocketStream","socket close and requestAbort is true");s.close(),this.socketStatus=rt,this.player.emit(Xe.websocketClose),this.emit(Xe.streamEnd)})),n=i(this.socket,"error",(e=>{t.error("WebsocketStream","socket error",e),this.socketStatus=at,this.emit(tt.websocketError,e),s.close(),t.log("WebsocketStream","socket error:",e.isTrusted?"websocket user aborted":"websocket error")}));this.socketDestroyFnList.push(r,a,o,n)}_closeWebSocket(){this.socketDestroyFnList.forEach((e=>e())),!this.socket||0!==this.socket.readyState&&1!==this.socket.readyState?this.socket&&this.player.debug.log("WebsocketStream",`_closeWebSocket() socket is null or socket status is ${this.socket&&this.socket.readyState}`):(this.requestAbort=!0,this.socket.close(1e3,"Client disconnecting")),this.socket=null,this.socketStatus=it,this.streamRate=null}_handleMessage(e){const{demux:t}=this.player;t?t.dispatch(e):this.player.debug.warn("WebsocketStream","websocket handle message demux is null")}fetchStream(e,t){this.player._times.streamStart=sr(),this.wsUrl=e,this._createWebSocket()}sendMessage(e){this.socket?this.socketStatus===st?this.socket.send(e):this.player.debug.error("WebsocketStream",`websocket send message error and socket status is ${this.socketStatus}`):this.player.debug.error("WebsocketStream","websocket send message socket is null")}resetFetchStream(){this._closeWebSocket(),this._createWebSocket()}getStreamType(){return d}}class ho extends ba{constructor(e){super(),this.player=e,e.debug.log("HlsStream","init")}destroy(){this.off(),this.player.debug.log("HlsStream","destroy")}fetchStream(e){const{hlsDecoder:t,debug:i}=this.player;this.player._times.streamStart=sr(),t.loadSource(e).then((()=>{this.player.debug.log("HlsStream","loadSource success"),this.emit(Xe.streamSuccess)})).catch((e=>{this.emit(tt.hlsError,e)}))}getStreamType(){return h}}class co extends ba{constructor(e){super(),this.player=e,this.webrctUrl=null,e.debug.log("WebrtcStream","init")}destroy(){this.webrctUrl=null,this.off(),this.player.debug.log("WebrtcStream","destroy")}fetchStream(e){const{webrtc:t,debug:i}=this.player;if(this.player._times.streamStart=sr(),this.webrctUrl=e.replace("webrtc:",window.location.protocol),-1===this.webrctUrl.indexOf("/webrtc/play")&&this.player.isWebrtcForM7S()){const t=new URL(this.webrctUrl),i="/webrtc/play"+t.pathname;this.webrctUrl=t.origin+i+t.search,this.player.debug.log("WebrtcStream",`original url is ${e}, and new url is: ${this.webrctUrl}`)}t.loadSource(this.webrctUrl).then((()=>{this.player.debug.log("WebrtcStream","loadSource success"),this.emit(Xe.streamSuccess)})).catch((e=>{this.player.debug.error("WebrtcStream","loadSource error",e),this.emit(tt.webrtcError,e)}))}getStreamType(){return c}}class uo extends ba{constructor(e){super(),this.player=e,this.transport=null,this.wtUrl=null,this.streamRate=lr((t=>{e.emit(Xe.kBps,(t/1024).toFixed(2))})),this.streamRateInterval=null,e.debug.log("WebTransportLoader","init")}destroy(){this.abort(),this.off(),this.player.debug.log("WebTransportLoader","destroy")}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}_createWebTransport(){const e=this.player,{debug:t,events:{proxy:i},demux:s}=e;try{this.transport=new WebTransport(this.wtUrl),this.transport.ready.then((()=>{this.emit(Xe.streamSuccess),this.startStreamRateInterval(),this.transport.createBidirectionalStream().then((e=>{e.readable.pipeTo(new WritableStream(s.input))}))})).catch((e=>{this.player.debug.warn("WebTransportLoader","_createWebTransport-ready",e)}))}catch(e){this.player.debug.warn("WebTransportLoader","_createWebTransport",e)}}fetchStream(e){this.player._times.streamStart=sr(),this.wtUrl=e.replace(/^wt:/,"https:"),this._createWebTransport()}abort(){if(this.transport)try{this.transport.close(),this.transport=null}catch(e){this.transport=null}}getStreamType(){return u}}class po extends ba{constructor(e){super(),this.player=e,this.workUrl=null,e.debug.log("WorkerStream","init")}destroy(){this.workUrl=null,this.off(),this.player.debug.log("WorkerStream","destroy")}sendMessage(e){this.player.decoderWorker.workerSendMessage(e)}fetchStream(e){this.workUrl=e,this.player._times.streamStart=sr(),this.player.decoderWorker.workerFetchStream(e)}getStreamType(){const e=this.player._opt.protocol;return p+" "+(e===s?l:d)}}class fo extends ba{constructor(e){super(),this.TAG_NAME="AliyunRtcLoader",this.player=e,e.debug.log(this.TAG_NAME,"init")}destroy(){this.off(),this.player.debug.log(this.TAG_NAME,"destroy")}fetchStream(e){const{aliyunRtcDecoder:t}=this.player;this.player._times.streamStart=sr(),t.loadSource(e).then((()=>{this.player.debug.log(this.TAG_NAME,"loadSource success"),this.emit(Xe.streamSuccess)})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource error",e),this.emit(tt.aliyunRtcError,e)}))}getStreamType(){return f}}class mo{constructor(e){return new(mo.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){const{protocol:i,useWasm:l,playType:h,useWCS:d,useMSE:c,demuxUseWorker:u}=e;return i===s?h===g?po:h===m?l&&!Qr(e)||u?po:no:d||c?u?po:no:po:i===t?h===g?po:h===m?l&&!Qr(e)||u?po:lo:d||c?u?po:lo:po:i===r?ho:i===a?co:i===o?uo:i===n?fo:void 0}}var go=Os((function(e){function t(e,r){if(!e)throw"First parameter is required.";r=new i(e,r=r||{type:"video"});var a=this;function o(t){t&&(r.initCallback=function(){t(),t=r.initCallback=null});var i=new s(e,r);(p=new i(e,r)).record(),u("recording"),r.disableLogs||console.log("Initialized recorderType:",p.constructor.name,"for output-type:",r.type)}function n(e){if(e=e||function(){},p){if("paused"===a.state)return a.resumeRecording(),void setTimeout((function(){n(e)}),1);"recording"===a.state||r.disableLogs||console.warn('Recording state should be: "recording", however current state is: ',a.state),r.disableLogs||console.log("Stopped recording "+r.type+" stream."),"gif"!==r.type?p.stop(t):(p.stop(),t()),u("stopped")}else m();function t(t){if(p){Object.keys(p).forEach((function(e){"function"!=typeof p[e]&&(a[e]=p[e])}));var i=p.blob;if(!i){if(!t)throw"Recording failed.";p.blob=i=t}if(i&&!r.disableLogs&&console.log(i.type,"->",y(i.size)),e){var s;try{s=d.createObjectURL(i)}catch(e){}"function"==typeof e.call?e.call(a,s):e(s)}r.autoWriteToDisk&&h((function(e){var t={};t[r.type+"Blob"]=e,x.Store(t)}))}else"function"==typeof e.call?e.call(a,""):e("")}}function l(e){postMessage((new FileReaderSync).readAsDataURL(e))}function h(e,t){if(!e)throw"Pass a callback function over getDataURL.";var i=t?t.blob:(p||{}).blob;if(!i)return r.disableLogs||console.warn("Blob encoder did not finish its job yet."),void setTimeout((function(){h(e,t)}),1e3);if("undefined"==typeof Worker||navigator.mozGetUserMedia){var s=new FileReader;s.readAsDataURL(i),s.onload=function(t){e(t.target.result)}}else{var a=function(e){try{var t=d.createObjectURL(new Blob([e.toString(),"this.onmessage = function (eee) {"+e.name+"(eee.data);}"],{type:"application/javascript"})),i=new Worker(t);return d.revokeObjectURL(t),i}catch(e){}}(l);a.onmessage=function(t){e(t.data)},a.postMessage(i)}}function c(e){e=e||0,"paused"!==a.state?"stopped"!==a.state&&(e>=a.recordingDuration?n(a.onRecordingStopped):(e+=1e3,setTimeout((function(){c(e)}),1e3))):setTimeout((function(){c(e)}),1e3)}function u(e){a&&(a.state=e,"function"==typeof a.onStateChanged.call?a.onStateChanged.call(a,e):a.onStateChanged(e))}var p,f='It seems that recorder is destroyed or "startRecording" is not invoked for '+r.type+" recorder.";function m(){!0!==r.disableLogs&&console.warn(f)}var g={startRecording:function(t){return r.disableLogs||console.log("RecordRTC version: ",a.version),t&&(r=new i(e,t)),r.disableLogs||console.log("started recording "+r.type+" stream."),p?(p.clearRecordedData(),p.record(),u("recording"),a.recordingDuration&&c(),a):(o((function(){a.recordingDuration&&c()})),a)},stopRecording:n,pauseRecording:function(){p?"recording"===a.state?(u("paused"),p.pause(),r.disableLogs||console.log("Paused recording.")):r.disableLogs||console.warn("Unable to pause the recording. Recording state: ",a.state):m()},resumeRecording:function(){p?"paused"===a.state?(u("recording"),p.resume(),r.disableLogs||console.log("Resumed recording.")):r.disableLogs||console.warn("Unable to resume the recording. Recording state: ",a.state):m()},initRecorder:o,setRecordingDuration:function(e,t){if(void 0===e)throw"recordingDuration is required.";if("number"!=typeof e)throw"recordingDuration must be a number.";return a.recordingDuration=e,a.onRecordingStopped=t||function(){},{onRecordingStopped:function(e){a.onRecordingStopped=e}}},clearRecordedData:function(){p?(p.clearRecordedData(),r.disableLogs||console.log("Cleared old recorded data.")):m()},getBlob:function(){if(p)return p.blob;m()},getDataURL:h,toURL:function(){if(p)return d.createObjectURL(p.blob);m()},getInternalRecorder:function(){return p},save:function(e){p?A(p.blob,e):m()},getFromDisk:function(e){p?t.getFromDisk(r.type,e):m()},setAdvertisementArray:function(e){r.advertisement=[];for(var t=e.length,i=0;i-1&&"netscape"in window&&/ rv:/.test(navigator.userAgent),f=!u&&!c&&!!navigator.webkitGetUserMedia||b()||-1!==navigator.userAgent.toLowerCase().indexOf("chrome/"),m=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);m&&!f&&-1!==navigator.userAgent.indexOf("CriOS")&&(m=!1,f=!0);var g=window.MediaStream;function y(e){if(0===e)return"0 Bytes";var t=parseInt(Math.floor(Math.log(e)/Math.log(1e3)),10);return(e/Math.pow(1e3,t)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB"][t]}function A(e,t){if(!e)throw"Blob object is required.";if(!e.type)try{e.type="video/webm"}catch(e){}var i=(e.type||"video/webm").split("/")[1];if(-1!==i.indexOf(";")&&(i=i.split(";")[0]),t&&-1!==t.indexOf(".")){var s=t.split(".");t=s[0],i=s[1]}var r=(t||Math.round(9999999999*Math.random())+888888888)+"."+i;if(void 0!==navigator.msSaveOrOpenBlob)return navigator.msSaveOrOpenBlob(e,r);if(void 0!==navigator.msSaveBlob)return navigator.msSaveBlob(e,r);var a=document.createElement("a");a.href=d.createObjectURL(e),a.download=r,a.style="display:none;opacity:0;color:transparent;",(document.body||document.documentElement).appendChild(a),"function"==typeof a.click?a.click():(a.target="_blank",a.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))),d.revokeObjectURL(a.href)}function b(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||(!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}function v(e,t){return e&&e.getTracks?e.getTracks().filter((function(e){return e.kind===(t||"audio")})):[]}function _(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}void 0===g&&"undefined"!=typeof webkitMediaStream&&(g=webkitMediaStream),void 0!==g&&void 0===g.prototype.stop&&(g.prototype.stop=function(){this.getTracks().forEach((function(e){e.stop()}))}),t.invokeSaveAsDialog=A,t.getTracks=v,t.getSeekableBlob=function(e,t){if("undefined"==typeof EBML)throw new Error("Please link: https://www.webrtc-experiment.com/EBML.js");var i=new EBML.Reader,s=new EBML.Decoder,r=EBML.tools,a=new FileReader;a.onload=function(e){s.decode(this.result).forEach((function(e){i.read(e)})),i.stop();var a=r.makeMetadataSeekable(i.metadatas,i.duration,i.cues),o=this.result.slice(i.metadataSize),n=new Blob([a,o],{type:"video/webm"});t(n)},a.readAsArrayBuffer(e)},t.bytesToSize=y,t.isElectron=b;var w={};function S(){if(p||m||c)return!0;var e,t,i=navigator.userAgent,s=""+parseFloat(navigator.appVersion),r=parseInt(navigator.appVersion,10);return(f||u)&&(e=i.indexOf("Chrome"),s=i.substring(e+7)),-1!==(t=s.indexOf(";"))&&(s=s.substring(0,t)),-1!==(t=s.indexOf(" "))&&(s=s.substring(0,t)),r=parseInt(""+s,10),isNaN(r)&&(s=""+parseFloat(navigator.appVersion),r=parseInt(navigator.appVersion,10)),r>=49}function T(e,t){var i=this;if(void 0===e)throw'First argument "MediaStream" is required.';if("undefined"==typeof MediaRecorder)throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";if("audio"===(t=t||{mimeType:"video/webm"}).type){var s;if(v(e,"video").length&&v(e,"audio").length)navigator.mozGetUserMedia?(s=new g).addTrack(v(e,"audio")[0]):s=new g(v(e,"audio")),e=s;t.mimeType&&-1!==t.mimeType.toString().toLowerCase().indexOf("audio")||(t.mimeType=f?"audio/webm":"audio/ogg"),t.mimeType&&"audio/ogg"!==t.mimeType.toString().toLowerCase()&&navigator.mozGetUserMedia&&(t.mimeType="audio/ogg")}var r,a=[];function o(){i.timestamps.push((new Date).getTime()),"function"==typeof t.onTimeStamp&&t.onTimeStamp(i.timestamps[i.timestamps.length-1],i.timestamps)}function n(e){return r&&r.mimeType?r.mimeType:e.mimeType||"video/webm"}function l(){a=[],r=null,i.timestamps=[]}this.getArrayOfBlobs=function(){return a},this.record=function(){i.blob=null,i.clearRecordedData(),i.timestamps=[],h=[],a=[];var s=t;t.disableLogs||console.log("Passing following config over MediaRecorder API.",s),r&&(r=null),f&&!S()&&(s="video/vp8"),"function"==typeof MediaRecorder.isTypeSupported&&s.mimeType&&(MediaRecorder.isTypeSupported(s.mimeType)||(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",s.mimeType),s.mimeType="audio"===t.type?"audio/webm":"video/webm"));try{r=new MediaRecorder(e,s),t.mimeType=s.mimeType}catch(t){r=new MediaRecorder(e)}s.mimeType&&!MediaRecorder.isTypeSupported&&"canRecordMimeType"in r&&!1===r.canRecordMimeType(s.mimeType)&&(t.disableLogs||console.warn("MediaRecorder API seems unable to record mimeType:",s.mimeType)),r.ondataavailable=function(e){if(e.data&&h.push("ondataavailable: "+y(e.data.size)),"number"!=typeof t.timeSlice)!e.data||!e.data.size||e.data.size<100||i.blob?i.recordingCallback&&(i.recordingCallback(new Blob([],{type:n(s)})),i.recordingCallback=null):(i.blob=t.getNativeBlob?e.data:new Blob([e.data],{type:n(s)}),i.recordingCallback&&(i.recordingCallback(i.blob),i.recordingCallback=null));else if(e.data&&e.data.size&&(a.push(e.data),o(),"function"==typeof t.ondataavailable)){var r=t.getNativeBlob?e.data:new Blob([e.data],{type:n(s)});t.ondataavailable(r)}},r.onstart=function(){h.push("started")},r.onpause=function(){h.push("paused")},r.onresume=function(){h.push("resumed")},r.onstop=function(){h.push("stopped")},r.onerror=function(e){e&&(e.name||(e.name="UnknownError"),h.push("error: "+e),t.disableLogs||(-1!==e.name.toString().toLowerCase().indexOf("invalidstate")?console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.",e):-1!==e.name.toString().toLowerCase().indexOf("notsupported")?console.error("MIME type (",s.mimeType,") is not supported.",e):-1!==e.name.toString().toLowerCase().indexOf("security")?console.error("MediaRecorder security error",e):"OutOfMemory"===e.name?console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"IllegalStreamModification"===e.name?console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"OtherRecordingError"===e.name?console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.",e):"GenericError"===e.name?console.error("The UA cannot provide the codec or recording option that has been requested.",e):console.error("MediaRecorder Error",e)),function(e){if(!i.manuallyStopped&&r&&"inactive"===r.state)return delete t.timeslice,void r.start(6e5);setTimeout(void 0,1e3)}(),"inactive"!==r.state&&"stopped"!==r.state&&r.stop())},"number"==typeof t.timeSlice?(o(),r.start(t.timeSlice)):r.start(36e5),t.initCallback&&t.initCallback()},this.timestamps=[],this.stop=function(e){e=e||function(){},i.manuallyStopped=!0,r&&(this.recordingCallback=e,"recording"===r.state&&r.stop(),"number"==typeof t.timeSlice&&setTimeout((function(){i.blob=new Blob(a,{type:n(t)}),i.recordingCallback(i.blob)}),100))},this.pause=function(){r&&"recording"===r.state&&r.pause()},this.resume=function(){r&&"paused"===r.state&&r.resume()},this.clearRecordedData=function(){r&&"recording"===r.state&&i.stop(l),l()},this.getInternalRecorder=function(){return r},this.blob=null,this.getState=function(){return r&&r.state||"inactive"};var h=[];this.getAllStates=function(){return h},void 0===t.checkForInactiveTracks&&(t.checkForInactiveTracks=!1);i=this;!function s(){if(r&&!1!==t.checkForInactiveTracks)return!1===function(){if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}()?(t.disableLogs||console.log("MediaStream seems stopped."),void i.stop()):void setTimeout(s,1e3)}(),this.name="MediaStreamRecorder",this.toString=function(){return this.name}}function E(e,i){if(!v(e,"audio").length)throw"Your stream has no audio tracks.";var s,r=this,a=[],o=[],n=!1,l=0,h=2,c=(i=i||{}).desiredSampRate;function u(){if(!1===i.checkForInactiveTracks)return!0;if("active"in e){if(!e.active)return!1}else if("ended"in e&&e.ended)return!1;return!0}function p(e,t){function i(e,t){var i,s=e.numberOfAudioChannels,r=e.leftBuffers.slice(0),a=e.rightBuffers.slice(0),o=e.sampleRate,n=e.internalInterleavedLength,l=e.desiredSampRate;function h(e,t,i){var s=Math.round(e.length*(t/i)),r=[],a=Number((e.length-1)/(s-1));r[0]=e[0];for(var o=1;o96e3)&&(i.disableLogs||console.log("sample-rate must be under range 22050 and 96000.")),i.disableLogs||i.desiredSampRate&&console.log("Desired sample-rate: "+i.desiredSampRate);var b=!1;function _(){a=[],o=[],l=0,S=!1,n=!1,b=!1,f=null,r.leftchannel=a,r.rightchannel=o,r.numberOfAudioChannels=h,r.desiredSampRate=c,r.sampleRate=A,r.recordingLength=l,T={left:[],right:[],recordingLength:0}}function w(){s&&(s.onaudioprocess=null,s.disconnect(),s=null),m&&(m.disconnect(),m=null),_()}this.pause=function(){b=!0},this.resume=function(){if(!1===u())throw"Please make sure MediaStream is active.";if(!n)return i.disableLogs||console.log("Seems recording has been restarted."),void this.record();b=!1},this.clearRecordedData=function(){i.checkForInactiveTracks=!1,n&&this.stop(w),w()},this.name="StereoAudioRecorder",this.toString=function(){return this.name};var S=!1;s.onaudioprocess=function(e){if(!b)if(!1===u()&&(i.disableLogs||console.log("MediaStream seems stopped."),s.disconnect(),n=!1),n){S||(S=!0,i.onAudioProcessStarted&&i.onAudioProcessStarted(),i.initCallback&&i.initCallback());var t=e.inputBuffer.getChannelData(0),d=new Float32Array(t);if(a.push(d),2===h){var c=e.inputBuffer.getChannelData(1),p=new Float32Array(c);o.push(p)}l+=y,r.recordingLength=l,void 0!==i.timeSlice&&(T.recordingLength+=y,T.left.push(d),2===h&&T.right.push(p))}else m&&(m.disconnect(),m=null)},f.createMediaStreamDestination?s.connect(f.createMediaStreamDestination()):s.connect(f.destination),this.leftchannel=a,this.rightchannel=o,this.numberOfAudioChannels=h,this.desiredSampRate=c,this.sampleRate=A,r.recordingLength=l;var T={left:[],right:[],recordingLength:0};function E(){n&&"function"==typeof i.ondataavailable&&void 0!==i.timeSlice&&(T.left.length?(p({desiredSampRate:c,sampleRate:A,numberOfAudioChannels:h,internalInterleavedLength:T.recordingLength,leftBuffers:T.left,rightBuffers:1===h?[]:T.right},(function(e,t){var s=new Blob([t],{type:"audio/wav"});i.ondataavailable(s),setTimeout(E,i.timeSlice)})),T={left:[],right:[],recordingLength:0}):setTimeout(E,i.timeSlice))}}function k(e,t){if("undefined"==typeof html2canvas)throw"Please link: https://www.webrtc-experiment.com/screenshot.js";(t=t||{}).frameInterval||(t.frameInterval=10);var i=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach((function(e){e in document.createElement("canvas")&&(i=!0)}));var s,r,a,o=!(!window.webkitRTCPeerConnection&&!window.webkitGetUserMedia||!window.chrome),n=50,l=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);if(o&&l&&l[2]&&(n=parseInt(l[2],10)),o&&n<52&&(i=!1),t.useWhammyRecorder&&(i=!1),i)if(t.disableLogs||console.log("Your browser supports both MediRecorder API and canvas.captureStream!"),e instanceof HTMLCanvasElement)s=e;else{if(!(e instanceof CanvasRenderingContext2D))throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";s=e.canvas}else navigator.mozGetUserMedia&&(t.disableLogs||console.error("Canvas recording is NOT supported in Firefox."));this.record=function(){if(a=!0,i&&!t.useWhammyRecorder){var e;"captureStream"in s?e=s.captureStream(25):"mozCaptureStream"in s?e=s.mozCaptureStream(25):"webkitCaptureStream"in s&&(e=s.webkitCaptureStream(25));try{var o=new g;o.addTrack(v(e,"video")[0]),e=o}catch(e){}if(!e)throw"captureStream API are NOT available.";(r=new T(e,{mimeType:t.mimeType||"video/webm"})).record()}else p.frames=[],u=(new Date).getTime(),c();t.initCallback&&t.initCallback()},this.getWebPImages=function(i){if("canvas"===e.nodeName.toLowerCase()){var s=p.frames.length;p.frames.forEach((function(e,i){var r=s-i;t.disableLogs||console.log(r+"/"+s+" frames remaining"),t.onEncodingCallback&&t.onEncodingCallback(r,s);var a=e.image.toDataURL("image/webp",1);p.frames[i].image=a})),t.disableLogs||console.log("Generating WebM"),i()}else i()},this.stop=function(e){a=!1;var s=this;i&&r?r.stop(e):this.getWebPImages((function(){p.compile((function(i){t.disableLogs||console.log("Recording finished!"),s.blob=i,s.blob.forEach&&(s.blob=new Blob([],{type:"video/webm"})),e&&e(s.blob),p.frames=[]}))}))};var h=!1;function d(){p.frames=[],a=!1,h=!1}function c(){if(h)return u=(new Date).getTime(),setTimeout(c,500);if("canvas"===e.nodeName.toLowerCase()){var i=(new Date).getTime()-u;return u=(new Date).getTime(),p.frames.push({image:(s=document.createElement("canvas"),r=s.getContext("2d"),s.width=e.width,s.height=e.height,r.drawImage(e,0,0),s),duration:i}),void(a&&setTimeout(c,t.frameInterval))}var s,r;html2canvas(e,{grabMouse:void 0===t.showMousePointer||t.showMousePointer,onrendered:function(e){var i=(new Date).getTime()-u;if(!i)return setTimeout(c,t.frameInterval);u=(new Date).getTime(),p.frames.push({image:e.toDataURL("image/webp",1),duration:i}),a&&setTimeout(c,t.frameInterval)}})}this.pause=function(){h=!0,r instanceof T&&r.pause()},this.resume=function(){h=!1,r instanceof T?r.resume():a||this.record()},this.clearRecordedData=function(){a&&this.stop(d),d()},this.name="CanvasRecorder",this.toString=function(){return this.name};var u=(new Date).getTime(),p=new R.Video(100)}function C(e,t){function i(e){e=void 0!==e?e:10;var t=(new Date).getTime()-l;return t?a?(l=(new Date).getTime(),setTimeout(i,100)):(l=(new Date).getTime(),n.paused&&n.play(),c.drawImage(n,0,0,d.width,d.height),h.frames.push({duration:t,image:d.toDataURL("image/webp")}),void(r||setTimeout(i,e,e))):setTimeout(i,e,e)}function s(e,t,i,s,r){var a=document.createElement("canvas");a.width=d.width,a.height=d.height;var o=a.getContext("2d"),n=[],l=-1===t,h=t&&t>0&&t<=e.length?t:e.length,c=0,u=0,p=0,f=Math.sqrt(Math.pow(255,2)+Math.pow(255,2)+Math.pow(255,2)),m=i&&i>=0&&i<=1?i:0,g=s&&s>=0&&s<=1?s:0,y=!1;!function(e){var t=-1,i=e.length;!function s(){++t!==i?setTimeout((function(){e.functionToLoop(s,t)}),1):e.callback()}()}({length:h,functionToLoop:function(t,i){var s,r,a,h=function(){!y&&a-s<=a*g||(l&&(y=!0),n.push(e[i])),t()};if(y)h();else{var A=new Image;A.onload=function(){o.drawImage(A,0,0,d.width,d.height);var e=o.getImageData(0,0,d.width,d.height);s=0,r=e.data.length,a=e.data.length/4;for(var t=0;t127)throw"TrackNumber > 127 not supported";return[128|e.trackNum,e.timecode>>8,255&e.timecode,t].map((function(e){return String.fromCharCode(e)})).join("")+e.frame}({discardable:0,frame:e.data.slice(4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math.round(t)});return t+=e.duration,{data:i,id:163}})))}function i(e){for(var t=[];e>0;)t.push(255&e),e>>=8;return new Uint8Array(t.reverse())}function s(e){var t=[];e=(e.length%8?new Array(9-e.length%8).join("0"):"")+e;for(var i=0;i1?2*a[0].width:a[0].width;var n=1;3!==e&&4!==e||(n=2),5!==e&&6!==e||(n=3),7!==e&&8!==e||(n=4),9!==e&&10!==e||(n=5),r.height=a[0].height*n}else r.width=o.width||360,r.height=o.height||240;t&&t instanceof HTMLVideoElement&&u(t),a.forEach((function(e,t){u(e,t)})),setTimeout(c,o.frameInterval)}}function u(e,t){if(!s){var i=0,r=0,o=e.width,n=e.height;1===t&&(i=e.width),2===t&&(r=e.height),3===t&&(i=e.width,r=e.height),4===t&&(r=2*e.height),5===t&&(i=e.width,r=2*e.height),6===t&&(r=3*e.height),7===t&&(i=e.width,r=3*e.height),void 0!==e.stream.left&&(i=e.stream.left),void 0!==e.stream.top&&(r=e.stream.top),void 0!==e.stream.width&&(o=e.stream.width),void 0!==e.stream.height&&(n=e.stream.height),a.drawImage(e,i,r,o,n),"function"==typeof e.stream.onRender&&e.stream.onRender(a,i,r,o,n,t)}}function p(e){var i=document.createElement("video");return function(e,t){"srcObject"in t?t.srcObject=e:"mozSrcObject"in t?t.mozSrcObject=e:t.srcObject=e}(e,i),i.className=t,i.muted=!0,i.volume=0,i.width=e.width||o.width||360,i.height=e.height||o.height||240,i.play(),i}function f(t){i=[],(t=t||e).forEach((function(e){if(e.getTracks().filter((function(e){return"video"===e.kind})).length){var t=p(e);t.stream=e,i.push(t)}}))}void 0!==n?d.AudioContext=n:"undefined"!=typeof webkitAudioContext&&(d.AudioContext=webkitAudioContext),this.startDrawingFrames=function(){c()},this.appendStreams=function(t){if(!t)throw"First parameter is required.";t instanceof Array||(t=[t]),t.forEach((function(t){var s=new h;if(t.getTracks().filter((function(e){return"video"===e.kind})).length){var r=p(t);r.stream=t,i.push(r),s.addTrack(t.getTracks().filter((function(e){return"video"===e.kind}))[0])}if(t.getTracks().filter((function(e){return"audio"===e.kind})).length){var a=o.audioContext.createMediaStreamSource(t);o.audioDestination=o.audioContext.createMediaStreamDestination(),a.connect(o.audioDestination),s.addTrack(o.audioDestination.stream.getTracks().filter((function(e){return"audio"===e.kind}))[0])}e.push(s)}))},this.releaseStreams=function(){i=[],s=!0,o.gainNode&&(o.gainNode.disconnect(),o.gainNode=null),o.audioSources.length&&(o.audioSources.forEach((function(e){e.disconnect()})),o.audioSources=[]),o.audioDestination&&(o.audioDestination.disconnect(),o.audioDestination=null),o.audioContext&&o.audioContext.close(),o.audioContext=null,a.clearRect(0,0,r.width,r.height),r.stream&&(r.stream.stop(),r.stream=null)},this.resetVideoStreams=function(e){!e||e instanceof Array||(e=[e]),f(e)},this.name="MultiStreamsMixer",this.toString=function(){return this.name},this.getMixedStream=function(){s=!1;var t=function(){var e;f(),"captureStream"in r?e=r.captureStream():"mozCaptureStream"in r?e=r.mozCaptureStream():o.disableLogs||console.error("Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features");var t=new h;return e.getTracks().filter((function(e){return"video"===e.kind})).forEach((function(e){t.addTrack(e)})),r.stream=t,t}(),i=function(){d.AudioContextConstructor||(d.AudioContextConstructor=new d.AudioContext);o.audioContext=d.AudioContextConstructor,o.audioSources=[],!0===o.useGainNode&&(o.gainNode=o.audioContext.createGain(),o.gainNode.connect(o.audioContext.destination),o.gainNode.gain.value=0);var t=0;if(e.forEach((function(e){if(e.getTracks().filter((function(e){return"audio"===e.kind})).length){t++;var i=o.audioContext.createMediaStreamSource(e);!0===o.useGainNode&&i.connect(o.gainNode),o.audioSources.push(i)}})),!t)return;return o.audioDestination=o.audioContext.createMediaStreamDestination(),o.audioSources.forEach((function(e){e.connect(o.audioDestination)})),o.audioDestination.stream}();return i&&i.getTracks().filter((function(e){return"audio"===e.kind})).forEach((function(e){t.addTrack(e)})),e.forEach((function(e){e.fullcanvas})),t}}function I(e,t){e=e||[];var i,s,r=this;(t=t||{elementClass:"multi-streams-mixer",mimeType:"video/webm",video:{width:360,height:240}}).frameInterval||(t.frameInterval=10),t.video||(t.video={}),t.video.width||(t.video.width=360),t.video.height||(t.video.height=240),this.record=function(){var r;i=new L(e,t.elementClass||"multi-streams-mixer"),(r=[],e.forEach((function(e){v(e,"video").forEach((function(e){r.push(e)}))})),r).length&&(i.frameInterval=t.frameInterval||10,i.width=t.video.width||360,i.height=t.video.height||240,i.startDrawingFrames()),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(i.getMixedStream()),(s=new T(i.getMixedStream(),t)).record()},this.stop=function(e){s&&s.stop((function(t){r.blob=t,e(t),r.clearRecordedData()}))},this.pause=function(){s&&s.pause()},this.resume=function(){s&&s.resume()},this.clearRecordedData=function(){s&&(s.clearRecordedData(),s=null),i&&(i.releaseStreams(),i=null)},this.addStreams=function(r){if(!r)throw"First parameter is required.";r instanceof Array||(r=[r]),e.concat(r),s&&i&&(i.appendStreams(r),t.previewStream&&"function"==typeof t.previewStream&&t.previewStream(i.getMixedStream()))},this.resetVideoStreams=function(e){i&&(!e||e instanceof Array||(e=[e]),i.resetVideoStreams(e))},this.getMixer=function(){return i},this.name="MultiStreamRecorder",this.toString=function(){return this.name}}function P(e,t){var i,s,r;function a(){return new ReadableStream({start:function(s){var r=document.createElement("canvas"),a=document.createElement("video"),o=!0;a.srcObject=e,a.muted=!0,a.height=t.height,a.width=t.width,a.volume=0,a.onplaying=function(){r.width=t.width,r.height=t.height;var e=r.getContext("2d"),n=1e3/t.frameRate,l=setInterval((function(){if(i&&(clearInterval(l),s.close()),o&&(o=!1,t.onVideoProcessStarted&&t.onVideoProcessStarted()),e.drawImage(a,0,0),"closed"!==s._controlledReadableStream.state)try{s.enqueue(e.getImageData(0,0,t.width,t.height))}catch(e){}}),n)},a.play()}})}function o(e,l){if(!t.workerPath&&!l)return i=!1,void fetch("https://unpkg.com/webm-wasm@latest/dist/webm-worker.js").then((function(t){t.arrayBuffer().then((function(t){o(e,t)}))}));if(!t.workerPath&&l instanceof ArrayBuffer){var h=new Blob([l],{type:"text/javascript"});t.workerPath=d.createObjectURL(h)}t.workerPath||console.error("workerPath parameter is missing."),(s=new Worker(t.workerPath)).postMessage(t.webAssemblyPath||"https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"),s.addEventListener("message",(function(e){"READY"===e.data?(s.postMessage({width:t.width,height:t.height,bitrate:t.bitrate||1200,timebaseDen:t.frameRate||30,realtime:t.realtime}),a().pipeTo(new WritableStream({write:function(e){i?console.error("Got image, but recorder is finished!"):s.postMessage(e.data.buffer,[e.data.buffer])}}))):e.data&&(r||n.push(e.data))}))}"undefined"!=typeof ReadableStream&&"undefined"!=typeof WritableStream||console.error("Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js"),(t=t||{}).width=t.width||640,t.height=t.height||480,t.frameRate=t.frameRate||30,t.bitrate=t.bitrate||1200,t.realtime=t.realtime||!0,this.record=function(){n=[],r=!1,this.blob=null,o(e),"function"==typeof t.initCallback&&t.initCallback()},this.pause=function(){r=!0},this.resume=function(){r=!1};var n=[];this.stop=function(e){i=!0;var t=this;!function(e){s?(s.addEventListener("message",(function(t){null===t.data&&(s.terminate(),s=null,e&&e())})),s.postMessage(null)):e&&e()}((function(){t.blob=new Blob(n,{type:"video/webm"}),e(t.blob)}))},this.name="WebAssemblyRecorder",this.toString=function(){return this.name},this.clearRecordedData=function(){n=[],r=!1,this.blob=null},this.blob=null}t.DiskStorage=x,t.GifRecorder=D,t.MultiStreamRecorder=I,t.RecordRTCPromisesHandler=function(e,i){if(!this)throw'Use "new RecordRTCPromisesHandler()"';if(void 0===e)throw'First argument "MediaStream" is required.';var s=this;s.recordRTC=new t(e,i),this.startRecording=function(){return new Promise((function(e,t){try{s.recordRTC.startRecording(),e()}catch(e){t(e)}}))},this.stopRecording=function(){return new Promise((function(e,t){try{s.recordRTC.stopRecording((function(i){s.blob=s.recordRTC.getBlob(),s.blob&&s.blob.size?e(i):t("Empty blob.",s.blob)}))}catch(e){t(e)}}))},this.pauseRecording=function(){return new Promise((function(e,t){try{s.recordRTC.pauseRecording(),e()}catch(e){t(e)}}))},this.resumeRecording=function(){return new Promise((function(e,t){try{s.recordRTC.resumeRecording(),e()}catch(e){t(e)}}))},this.getDataURL=function(e){return new Promise((function(e,t){try{s.recordRTC.getDataURL((function(t){e(t)}))}catch(e){t(e)}}))},this.getBlob=function(){return new Promise((function(e,t){try{e(s.recordRTC.getBlob())}catch(e){t(e)}}))},this.getInternalRecorder=function(){return new Promise((function(e,t){try{e(s.recordRTC.getInternalRecorder())}catch(e){t(e)}}))},this.reset=function(){return new Promise((function(e,t){try{e(s.recordRTC.reset())}catch(e){t(e)}}))},this.destroy=function(){return new Promise((function(e,t){try{e(s.recordRTC.destroy())}catch(e){t(e)}}))},this.getState=function(){return new Promise((function(e,t){try{e(s.recordRTC.getState())}catch(e){t(e)}}))},this.blob=null,this.version="5.6.2"},t.WebAssemblyRecorder=P}));class yo{constructor(e){this._buffer=e,this._buffer_index=0,this._total_bytes=e.byteLength,this._total_bits=8*e.byteLength,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let e=this._total_bytes-this._buffer_index;if(e<=0)return void console.error("ExpGolomb: _fillCurrentWord() but no bytes available",this._total_bytes,this._buffer_index);let t=Math.min(4,e),i=new Uint8Array(4);i.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(i.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}readBits(e){if(e>32&&console.error("ExpGolomb: readBits() bits exceeded max 32bits!"),e<=this._current_word_bits_left){let t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}let t=this._current_word_bits_left?this._current_word:0;t>>>=32-this._current_word_bits_left;let i=e-this._current_word_bits_left;this._fillCurrentWord();let s=Math.min(i,this._current_word_bits_left),r=this._current_word>>>32-s;return this._current_word<<=s,this._current_word_bits_left-=s,t=t<>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}readUEG(){let e=this._skipLeadingZero();return this.readBits(e+1)-1}readSEG(){let e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}class Ao{static _ebsp2rbsp(e){let t=e,i=t.byteLength,s=new Uint8Array(i),r=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[r]=t[e],r++);return new Uint8Array(s.buffer,0,r)}static parseSPS(e){let t=Ao._ebsp2rbsp(e),i=new yo(t);i.readByte();let s=i.readByte();i.readByte();let r=i.readByte();i.readUEG();let a=Ao.getProfileString(s),o=Ao.getLevelString(r),n=1,l=420,h=[0,420,422,444],d=8;if((100===s||110===s||122===s||244===s||44===s||83===s||86===s||118===s||128===s||138===s||144===s)&&(n=i.readUEG(),3===n&&i.readBits(1),n<=3&&(l=h[n]),d=i.readUEG()+8,i.readUEG(),i.readBits(1),i.readBool())){let e=3!==n?8:12;for(let t=0;t0&&e<16?(v=t[e-1],_=s[e-1]):255===e&&(v=i.readByte()<<8|i.readByte(),_=i.readByte()<<8|i.readByte())}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(4),i.readBool()&&i.readBits(24)),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool()){let e=i.readBits(32),t=i.readBits(32);S=i.readBool(),T=t,E=2*e,w=T/E}}let k=1;1===v&&1===_||(k=v/_);let C=0,R=0;if(0===n)C=1,R=2-m;else{C=3===n?1:2,R=(1===n?2:1)*(2-m)}let x=16*(p+1),D=16*(f+1)*(2-m);x-=(g+y)*C,D-=(A+b)*R;let L=Math.ceil(x*k);return i.destroy(),i=null,{profile_string:a,level_string:o,bit_depth:d,ref_frames:u,chroma_format:l,chroma_format_string:Ao.getChromaFormatString(l),frame_rate:{fixed:S,fps:w,fps_den:E,fps_num:T},sar_ratio:{width:v,height:_},codec_size:{width:x,height:D},present_size:{width:L,height:D}}}static parseSPS$2(e){let t=e.subarray(1,4),i="avc1.";for(let e=0;e<3;e++){let s=t[e].toString(16);s.length<2&&(s="0"+s),i+=s}let s=Ao._ebsp2rbsp(e),r=new yo(s);r.readByte();let a=r.readByte();r.readByte();let o=r.readByte();r.readUEG();let n=Ao.getProfileString(a),l=Ao.getLevelString(o),h=1,d=420,c=[0,420,422,444],u=8,p=8;if((100===a||110===a||122===a||244===a||44===a||83===a||86===a||118===a||128===a||138===a||144===a)&&(h=r.readUEG(),3===h&&r.readBits(1),h<=3&&(d=c[h]),u=r.readUEG()+8,p=r.readUEG()+8,r.readBits(1),r.readBool())){let e=3!==h?8:12;for(let t=0;t0&&e<16?(S=t[e-1],T=i[e-1]):255===e&&(S=r.readByte()<<8|r.readByte(),T=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){let e=r.readBits(32),t=r.readBits(32);k=r.readBool(),C=t,R=2*e,E=C/R}}let x=1;1===S&&1===T||(x=S/T);let D=0,L=0;if(0===h)D=1,L=2-A;else{D=3===h?1:2,L=(1===h?2:1)*(2-A)}let I=16*(g+1),P=16*(y+1)*(2-A);I-=(b+v)*D,P-=(_+w)*L;let B=Math.ceil(I*x);return r.destroy(),r=null,{codec_mimetype:i,profile_idc:a,level_idc:o,profile_string:n,level_string:l,chroma_format_idc:h,bit_depth:u,bit_depth_luma:u,bit_depth_chroma:p,ref_frames:m,chroma_format:d,chroma_format_string:Ao.getChromaFormatString(d),frame_rate:{fixed:k,fps:E,fps_den:R,fps_num:C},sar_ratio:{width:S,height:T},codec_size:{width:I,height:P},present_size:{width:B,height:P}}}static _skipScalingList(e,t){let i=8,s=8,r=0;for(let a=0;a=this.buflen)return this.iserro=!0,0;this.iserro=!1,i=this.bufoff+e>8?8-this.bufoff:e,t<<=i,t+=this.buffer[this.bufpos]>>8-this.bufoff-i&255>>8-i,this.bufoff+=i,e-=i,8==this.bufoff&&(this.bufpos++,this.bufoff=0)}return t}look(e){let t=this.bufpos,i=this.bufoff,s=this.read(e);return this.bufpos=t,this.bufoff=i,s}read_golomb(){let e;for(e=0;0===this.read(1)&&!this.iserro;e++);return(1<>>24&255,e>>>16&255,e>>>8&255,255&e]),s=new Uint8Array(e+4);s.set(i,0),s.set(t.sps,4),t.sps=s}if(t.pps){const e=t.pps.byteLength,i=new Uint8Array([e>>>24&255,e>>>16&255,e>>>8&255,255&e]),s=new Uint8Array(e+4);s.set(i,0),s.set(t.pps,4),t.pps=s}return t}function _o(e){let{sps:t,pps:i}=e,s=8+t.byteLength+1+2+i.byteLength,r=!1;const a=Ao.parseSPS$2(t);66!==t[3]&&77!==t[3]&&88!==t[3]&&(r=!0,s+=4);let o=new Uint8Array(s);o[0]=1,o[1]=t[1],o[2]=t[2],o[3]=t[3],o[4]=255,o[5]=225;let n=t.byteLength;o[6]=n>>>8,o[7]=255&n;let l=8;o.set(t,8),l+=n,o[l]=1;let h=i.byteLength;o[l+1]=h>>>8,o[l+2]=255&h,o.set(i,l+3),l+=3+h,r&&(o[l]=252|a.chroma_format_idc,o[l+1]=248|a.bit_depth_luma-8,o[l+2]=248|a.bit_depth_chroma-8,o[l+3]=0,l+=4);const d=[23,0,0,0,0],c=new Uint8Array(d.length+o.byteLength);return c.set(d,0),c.set(o,d.length),c}function wo(e,t){let i=[];i[0]=t?23:39,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}function So(e){return 31&e[0]}function To(e){return e===St}function Eo(e){return!function(e){return e===vt||e===_t}(e)&&!To(e)}function ko(e){return e===wt}const Co=e=>{let t=e,i=t.byteLength,s=new Uint8Array(i),r=0;for(let e=0;e=2&&3===t[e]&&0===t[e-1]&&0===t[e-2]||(s[r]=t[e],r++);return new Uint8Array(s.buffer,0,r)},Ro=e=>{switch(e){case 0:return"4:0:0";case 1:return"4:2:0";case 2:return"4:2:2";case 3:return"4:4:4";default:return"Unknown"}};function xo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function Do(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;if(e.length<4)return;const i=e.length,s=[];let r,a=0;for(;a+t>>=8),a+=t,r){if(a+r>i)break;s.push(e.subarray(a,a+r)),a+=r}return s}function Lo(e){const t=e.byteLength,i=new Uint8Array(4);i[0]=t>>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t;const s=new Uint8Array(t+4);return s.set(i,0),s.set(e,4),s}function Io(e){let t={width:0,height:0,profile:0,level:0};e=e.slice(5);do{let i={};if(e.length<23){console.warn("parseHEVCDecoderConfigurationRecord$2",`arrayBuffer.length ${e.length} < 23`);break}if(i.configurationVersion=e[0],1!=i.configurationVersion)break;i.general_profile_space=e[1]>>6&3,i.general_tier_flag=e[1]>>5&1,i.general_profile_idc=31&e[1],i.general_profile_compatibility_flags=e[2]<<24|e[3]<<16|e[4]<<8|e[5],i.general_constraint_indicator_flags=e[6]<<24|e[7]<<16|e[8]<<8|e[9],i.general_constraint_indicator_flags=i.general_constraint_indicator_flags<<16|e[10]<<8|e[11],i.general_level_idc=e[12],i.min_spatial_segmentation_idc=(15&e[13])<<8|e[14],i.parallelismType=3&e[15],i.chromaFormat=3&e[16],i.bitDepthLumaMinus8=7&e[17],i.bitDepthChromaMinus8=7&e[18],i.avgFrameRate=e[19]<<8|e[20],i.constantFrameRate=e[21]>>6&3,i.numTemporalLayers=e[21]>>3&7,i.temporalIdNested=e[21]>>2&1,i.lengthSizeMinusOne=3&e[21];let s=e[22],r=e.slice(23);for(let e=0;e0)for(let t=i;t<8;t++)e.read(2);s.sub_layer_profile_space=[],s.sub_layer_tier_flag=[],s.sub_layer_profile_idc=[],s.sub_layer_profile_compatibility_flag=[],s.sub_layer_progressive_source_flag=[],s.sub_layer_interlaced_source_flag=[],s.sub_layer_non_packed_constraint_flag=[],s.sub_layer_frame_only_constraint_flag=[],s.sub_layer_level_idc=[];for(let t=0;t{let t=Co(e),i=new yo(t);return i.readByte(),i.readByte(),i.readBits(4),i.readBits(2),i.readBits(6),{num_temporal_layers:i.readBits(3)+1,temporal_id_nested:i.readBool()}})(t),o=(e=>{let t=Co(e),i=new yo(t);i.readByte(),i.readByte();let s=0,r=0,a=0,o=0;i.readBits(4);let n=i.readBits(3);i.readBool();let l=i.readBits(2),h=i.readBool(),d=i.readBits(5),c=i.readByte(),u=i.readByte(),p=i.readByte(),f=i.readByte(),m=i.readByte(),g=i.readByte(),y=i.readByte(),A=i.readByte(),b=i.readByte(),v=i.readByte(),_=i.readByte(),w=[],S=[];for(let e=0;e0)for(let e=n;e<8;e++)i.readBits(2);for(let e=0;e1&&i.readSEG();for(let e=0;e0&&e<16?(B=t[e-1],M=s[e-1]):255===e&&(B=i.readBits(16),M=i.readBits(16))}if(i.readBool()&&i.readBool(),i.readBool()&&(i.readBits(3),i.readBool(),i.readBool()&&(i.readByte(),i.readByte(),i.readByte())),i.readBool()&&(i.readUEG(),i.readUEG()),i.readBool(),i.readBool(),i.readBool(),I=i.readBool(),I&&(s+=i.readUEG(),r+=i.readUEG(),a+=i.readUEG(),o+=i.readUEG()),i.readBool()&&(F=i.readBits(32),O=i.readBits(32),i.readBool()&&(i.readUEG(),i.readBool()))){let e=!1,t=!1,s=!1;e=i.readBool(),t=i.readBool(),(e||t)&&(s=i.readBool(),s&&(i.readByte(),i.readBits(5),i.readBool(),i.readBits(5)),i.readBits(4),i.readBits(4),s&&i.readBits(4),i.readBits(5),i.readBits(5),i.readBits(5));for(let r=0;r<=n;r++){let r=i.readBool();U=r;let a=!1,o=1;r||(a=i.readBool());let n=!1;if(a?i.readSEG():n=i.readBool(),n||(cpbcnt=i.readUEG()+1),e)for(let e=0;e{let t=Co(e),i=new yo(t);i.readByte(),i.readByte(),i.readUEG(),i.readUEG(),i.readBool(),i.readBool(),i.readBits(3),i.readBool(),i.readBool(),i.readUEG(),i.readUEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool()&&i.readUEG(),i.readSEG(),i.readSEG(),i.readBool(),i.readBool(),i.readBool(),i.readBool();let s=i.readBool(),r=i.readBool(),a=1;return r&&s?a=0:r?a=3:s&&(a=2),{parallelismType:a}})(i);r=Object.assign(r,a,o,n);let l=23+(5+t.byteLength)+(5+s.byteLength)+(5+i.byteLength),h=new Uint8Array(l);h[0]=1,h[1]=(3&r.general_profile_space)<<6|(r.general_tier_flag?1:0)<<5|31&r.general_profile_idc,h[2]=r.general_profile_compatibility_flags_1||0,h[3]=r.general_profile_compatibility_flags_2||0,h[4]=r.general_profile_compatibility_flags_3||0,h[5]=r.general_profile_compatibility_flags_4||0,h[6]=r.general_constraint_indicator_flags_1||0,h[7]=r.general_constraint_indicator_flags_2||0,h[8]=r.general_constraint_indicator_flags_3||0,h[9]=r.general_constraint_indicator_flags_4||0,h[10]=r.general_constraint_indicator_flags_5||0,h[11]=r.general_constraint_indicator_flags_6||0,h[12]=60,h[13]=240|(3840&r.min_spatial_segmentation_idc)>>8,h[14]=255&r.min_spatial_segmentation_idc,h[15]=252|3&r.parallelismType,h[16]=252|3&r.chroma_format_idc,h[17]=248|7&r.bit_depth_luma_minus8,h[18]=248|7&r.bit_depth_chroma_minus8,h[19]=0,h[20]=0,h[21]=(3&r.constant_frame_rate)<<6|(7&r.num_temporal_layers)<<3|(r.temporal_id_nested?1:0)<<2|3,h[22]=3,h[23]=128|kt,h[24]=0,h[25]=1,h[26]=(65280&t.byteLength)>>8,h[27]=(255&t.byteLength)>>0,h.set(t,28),h[23+(5+t.byteLength)+0]=128|Ct,h[23+(5+t.byteLength)+1]=0,h[23+(5+t.byteLength)+2]=1,h[23+(5+t.byteLength)+3]=(65280&s.byteLength)>>8,h[23+(5+t.byteLength)+4]=(255&s.byteLength)>>0,h.set(s,23+(5+t.byteLength)+5),h[23+(5+t.byteLength+5+s.byteLength)+0]=128|Rt,h[23+(5+t.byteLength+5+s.byteLength)+1]=0,h[23+(5+t.byteLength+5+s.byteLength)+2]=1,h[23+(5+t.byteLength+5+s.byteLength)+3]=(65280&i.byteLength)>>8,h[23+(5+t.byteLength+5+s.byteLength)+4]=(255&i.byteLength)>>0,h.set(i,23+(5+t.byteLength+5+s.byteLength)+5);const d=[28,0,0,0,0],c=new Uint8Array(d.length+h.byteLength);return c.set(d,0),c.set(h,d.length),c}function Mo(e,t){let i=[];i[0]=t?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}function Uo(e){return(126&e[0])>>1}function Fo(e){return!function(e){return e>=32&&e<=40}(e)}function Oo(e){return e>=16&&e<=21}class No extends ba{constructor(e){super(),this.TAG_NAME="recorderCommon",this.player=e,this.fileName="",this._isRecording=!1,this._recordingTimestamp=0,this.recordingInterval=null,this.sps=null,this.pps=null,this.vps=null,this.codecId=null,this.audioCodeId=null,this.metaInfo={codecWidth:0,codecHeight:0,presentWidth:0,presentHeight:0,refSampleDuration:0,timescale:1e3,avcc:null,videoType:""},this.audioMetaInfo={timescale:1e3,sampleRate:0,refSampleDuration:0,channelCount:0,codec:"",originalCodec:"",audioType:"",extraData:new Uint8Array(0)}}destroy(){this._reset(),this.sps=null,this.pps=null,this.vps=null,this.codecId=null,this.audioCodeId=null,this.metaInfo=null,this.audioMetaInfo=null}get isH264(){return this.codecId===dt}get isH265(){return this.codecId===ct}setFileName(e){this.fileName=e}get isRecording(){return this._isRecording}get recording(){return this._isRecording}get recordTime(){return this._recordingTimestamp}startRecord(){}handleAddNaluTrack(e,t,i,s){}handleAddAudioTrack(e,t){}handleAddTrack(e){}stopRecordAndSave(){}startRecordingInterval(){}isWasmMp4(){return!1}stopRecordingInterval(){this.recordingInterval&&clearInterval(this.recordingInterval),this.recordingInterval=null}getToTalByteLength(){return 0}_reset(){this.fileName="",this._isRecording=!1,this._recordingTimestamp=0,this.stopRecordingInterval()}initMetaData(e,t){let i;const s=e.slice(5);if(this.codecId=t,this.metaInfo.avcc=s,t===dt)i=vo(s);else if(t===ct){i=function(e){let t=23;const i=e[t];if((63&i)!==kt)return console.warn(`parseHEVCDecoderVPSAndSPSAndPPS and vpsTag is ${i}`),{};t+=2,t+=1;const s=e[t+1]|e[t]<<8;t+=2;const r=e.slice(t,t+s);t+=s;const a=e[t];if((63&a)!==Ct)return console.warn(`parseHEVCDecoderVPSAndSPSAndPPS and sps tag is ${a}`),{};t+=2,t+=1;const o=e[t+1]|e[t]<<8;t+=2;const n=e.slice(t,t+o);t+=o;const l=e[t];if((63&l)!==Rt)return console.warn(`parseHEVCDecoderVPSAndSPSAndPPS and pps tag is ${l}`),{};t+=2,t+=1;const h=e[t+1]|e[t]<<8;t+=2;const d=e.slice(t,t+h),c=new Uint8Array([o>>>24&255,o>>>16&255,o>>>8&255,255&o]),u=new Uint8Array([h>>>24&255,h>>>16&255,h>>>8&255,255&h]),p=new Uint8Array([s>>>24&255,s>>>16&255,s>>>8&255,255&s]),f=new Uint8Array(o+4);f.set(c,0),f.set(n,4);const m=new Uint8Array(h+4);m.set(u,0),m.set(d,4);const g=new Uint8Array(s+4);return g.set(p,0),g.set(r,4),{sps:f,pps:m,vps:g}}(s);const t=Io(e);i=Object.assign(i,t)}i&&(i.vps&&(this.vps=i.vps),i.pps&&(this.pps=i.pps),i.sps&&(this.sps=i.sps),i.presentWidth&&(this.metaInfo.presentWidth=i.presentWidth),i.presentHeight&&(this.metaInfo.presentHeight=i.presentHeight),i.codecWidth&&(this.metaInfo.codecWidth=i.codecWidth),i.codecHeight&&(this.metaInfo.codecHeight=i.codecHeight),i.timescale&&(this.metaInfo.timescale=i.timescale),i.refSampleDuration&&(this.metaInfo.refSampleDuration=i.refSampleDuration),i.videoType&&(this.metaInfo.videoType=i.videoType))}initAudioMetaData(e,t){this.audioCodeId=t;const i=e[0]>>1&1;let s=null;t===ft?(s=function(e){let t={},i=new Ks(e);return i.read(16),t.object_type=qs(i),t.sample_rate=Ys(i,t),t.chan_config=i.read(4),t.chan_config{r.onload=function(e){i.decode(this.result).forEach((function(e){t.read(e)})),t.stop();const r=s.makeMetadataSeekable(t.metadatas,t.duration,t.cues),o=this.result.slice(t.metadataSize),n=new Blob([r,o],{type:"video/webm"});a(n)},r.readAsArrayBuffer(e)}))}startRecord(){const e=this.player.debug,t={type:"video",mimeType:"video/webm;codecs=h264",timeSlice:1e3,onTimeStamp:t=>{e.log("RecorderRTC","record timestamp :"+t),null===this._startRecordingTimestamp&&(this._startRecordingTimestamp=t),this._recordingTimestamp=(t-this._startRecordingTimestamp)/1e3},ondataavailable:t=>{this.totalByteLength+=t.size,e.log("RecorderRTC","ondataavailable",t.size)},disableLogs:!this.player._opt.debug};try{let i=null;if(this.player.getRenderType()===z?i=this.player.video.$videoElement.captureStream(25):this.player.video.mediaStream?i=this.player.video.mediaStream:this.player.isOldHls()||this.player._opt.useMSE||this.player._opt.useWCS?i=this.player.video.$videoElement.captureStream(25):this.player.isWebrtcH264()?i=this.player.webrtc.videoStream:this.player.isAliyunRtc()&&(i=this.player.video.$videoElement.captureStream(25)),!i)return e.error("RecorderRTC","startRecord error and can not create stream"),void this.player.emitError(Xe.recordCreateError,"can not create stream");if(this.player.audio&&this.player.audio.mediaStreamAudioDestinationNode&&this.player.audio.mediaStreamAudioDestinationNode.stream&&!this.player.audio.isStateSuspended()&&this.player.audio.hasAudio&&this.player._opt.hasAudio){const e=this.player.audio.mediaStreamAudioDestinationNode.stream;if(e.getAudioTracks().length>0){const t=e.getAudioTracks()[0];t&&t.enabled&&i.addTrack(t)}}this.recorder=go(i,t)}catch(t){return e.error("RecorderRTC","startRecord error",t),void this.player.emitError(Xe.recordCreateError,t)}this.recorder&&(this._isRecording=!0,this.player.emit(Xe.recording,!0),this.recorder.startRecording(),e.log("RecorderRTC","start recording"),this.player.emit(Xe.recordStart),this.startRecordingInterval())}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(Xe.recordingTimestamp,this._recordingTimestamp)}),1e3)}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nt,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{this.recorder&&this._isRecording||s("recorder is not ready"),t&&this.setFileName(t),this.recorder.stopRecording((()=>{this.player.debug.log("RecorderRTC","stop recording");const t=(this.fileName||sr())+"."+b;if(this.recorder.getBlob(),e===lt){const e=this.recorder.getBlob();i(e),this.player.emit(Xe.recordBlob,e)}else i(),this.recorder.save(t);this.player.emit(Xe.recordEnd),this._reset(),this.player.emit(Xe.recording,!1)}))}))}getToTalByteLength(){return this.totalByteLength}getTotalDuration(){return this.recordTime}getType(){return b}initMetaData(){}}class zo{static init(){zo.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],free:[],edts:[],elst:[],stss:[]};for(let e in zo.types)zo.types.hasOwnProperty(e)&&(zo.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);let e=zo.constants={};e.FTYP=new Uint8Array([105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,97,118,99,49,109,112,52,49,0,0,0,0]),e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSC=e.STCO=e.STTS,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(e){let t=8,i=null,s=Array.prototype.slice.call(arguments,1),r=s.length;for(let e=0;e>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);let a=8;for(let e=0;e=Math.pow(2,32)-1?(a=16,o=new Uint8Array(i+a),o.set(new Uint8Array([0,0,0,1]),0),o.set(zo.types.mdat,4),o.set(new Uint8Array([i+8>>>56&255,i+8>>>48&255,i+8>>>40&255,i+8>>>32&255,i+8>>>24&255,i+8>>>16&255,i+8>>>8&255,i+8&255]),8)):(o=new Uint8Array(i+a),o[0]=i+8>>>24&255,o[1]=i+8>>>16&255,o[2]=i+8>>>8&255,o[3]=i+8&255,o.set(zo.types.mdat,4));for(let e=0;e>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3]))}static trak(e){return zo.box(zo.types.trak,zo.tkhd(e),zo.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,s=e.presentWidth,r=e.presentHeight;return"video"===e.type?zo.box(zo.types.tkhd,new Uint8Array([0,0,0,15,206,186,253,168,206,186,253,168,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>>8&255,255&s,0,0,r>>>8&255,255&r,0,0])):"audio"===e.type?zo.box(zo.types.tkhd,new Uint8Array([0,0,0,15,206,186,253,168,206,186,253,168,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0])):void 0}static edts(e,t){return zo.box(zo.types.edts,zo.elst(e,t))}static elst(e,t){let i=0;for(let s=0;s>>24&255,i>>>16&255,i>>>8&255,255&i,255,255,255,255,0,1,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,0,0,0,0,0,1,0,0]))}static mdia(e){return zo.box(zo.types.mdia,zo.mdhd(e),zo.hdlr(e),zo.minf(e))}static mdhd(e){let t=e.timescale/e.refSampleDuration,i=t*e.duration/e.timescale;return zo.box(zo.types.mdhd,new Uint8Array([0,0,0,0,206,186,253,168,206,186,253,168,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(e){let t=null;return t="audio"===e.type?zo.constants.HDLR_AUDIO:zo.constants.HDLR_VIDEO,zo.box(zo.types.hdlr,t)}static minf(e){let t=null;return t="audio"===e.type?zo.box(zo.types.smhd,zo.constants.SMHD):zo.box(zo.types.vmhd,zo.constants.VMHD),zo.box(zo.types.minf,t,zo.dinf(),zo.stbl(e))}static dinf(){return zo.box(zo.types.dinf,zo.box(zo.types.dref,zo.constants.DREF))}static stbl(e){let t=e.samples,i=[{No:1,num:0,sampleDelte:1,chunkNo:1,duration:t[0].duration}],s=[t[0].duration],r=t.length;for(let e=0;e>>24&255,t>>>16&255,t>>>8&255,255&t]),s=i.byteLength,r=new Uint8Array(s+8*t);r.set(i,0);for(let i=0;i>>24&255,e[i].num>>>16&255,e[i].num>>>8&255,255&e[i].num,e[i].sampleDelte>>>24&255,e[i].sampleDelte>>>16&255,e[i].sampleDelte>>>8&255,255&e[i].sampleDelte]),s),s+=8;return zo.box(zo.types.stts,r)}static stss(e){let t=[],i=e.length;for(let s=0;s>>24&255,s>>>16&255,s>>>8&255,255&s]),a=r.byteLength,o=new Uint8Array(a+4*s);o.set(r,0);for(let e=0;e>>24&255,t[e]>>>16&255,t[e]>>>8&255,255&t[e]]),a),a+=4;return zo.box(zo.types.stss,o)}static stsc(e){let t=e.length,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s=i.byteLength,r=new Uint8Array(s+12*t);r.set(i,0);for(let i=0;i>>24&255,t>>>16&255,t>>>8&255,255&t,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o]),s),s+=12}return zo.box(zo.types.stsc,r)}static stsz(e){let t=e.length,i=new Uint8Array([0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]),s=i.byteLength,r=new Uint8Array(s+4*t);r.set(i,0);for(let i=0;i>>24&255,t>>>16&255,t>>>8&255,255&t]),s),s+=4}return zo.box(zo.types.stsz,r)}static stco(e,t){let i=t[0].chunkOffset;return zo.box(zo.types.stco,new Uint8Array([0,0,0,0,0,0,0,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i]))}static stsd(e){return"audio"===e.type?"mp3"===e.codec?zo.box(zo.types.stsd,zo.constants.STSD_PREFIX,zo.mp3(e)):zo.box(zo.types.stsd,zo.constants.STSD_PREFIX,zo.mp4a(e)):"avc"===e.videoType?zo.box(zo.types.stsd,zo.constants.STSD_PREFIX,zo.avc1(e)):zo.box(zo.types.stsd,zo.constants.STSD_PREFIX,zo.hvc1(e))}static mp3(e){let t=e.channelCount,i=e.sampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return zo.box(zo.types[".mp3"],s)}static mp4a(e){let t=e.channelCount,i=e.sampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return zo.box(zo.types.mp4a,s,zo.esds(e))}static esds(e){let t=e.config||[],i=t.length,s=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t).concat([6,1,2]));return zo.box(zo.types.esds,s)}static avc1(e){let t=e.avcc,i=e.codecWidth,s=e.codecHeight,r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,13,106,101,115,115,105,98,117,99,97,45,112,114,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return zo.box(zo.types.avc1,r,zo.box(zo.types.avcC,t))}static hvc1(e){let t=e.avcc;const i=e.codecWidth,s=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,13,106,101,115,115,105,98,117,99,97,45,112,114,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return zo.box(zo.types.hvc1,r,zo.box(zo.types.hvcC,t))}static mvex(e){return zo.box(zo.types.mvex,zo.trex(e))}static trex(e){let t=e.id,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return zo.box(zo.types.trex,i)}static moof(e,t){return zo.box(zo.types.moof,zo.mfhd(e.sequenceNumber),zo.traf(e,t))}static mfhd(e){let t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return zo.box(zo.types.mfhd,t)}static traf(e,t){let i=e.id,s=zo.box(zo.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),r=zo.box(zo.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),a=zo.sdtp(e),o=zo.trun(e,a.byteLength+16+16+8+16+8+8);return zo.box(zo.types.traf,s,r,o,a)}static sdtp(e){let t=e.samples||[],i=t.length,s=new Uint8Array(4+i);for(let e=0;e>>24&255,s>>>16&255,s>>>8&255,255&s,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);for(let e=0;e>>24&255,t>>>16&255,t>>>8&255,255&t,s>>>24&255,s>>>16&255,s>>>8&255,255&s,r.isLeading<<2|r.dependsOn,r.isDependedOn<<6|r.hasRedundancy<<4|r.isNonSync,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o],12+16*e)}return zo.box(zo.types.trun,a)}static mdat(e){return zo.box(zo.types.mdat,e)}}zo.init();class Go extends No{constructor(e){super(e),this.TAG_NAME="recorderMP4",this._reset(),e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this._reset(),this.player.debug.log(this.TAG_NAME,"destroy")}_reset(){super._reset(),this.totalDuration=0,this.totalAudioDuration=0,this.totalByteLength=0,this.totalAudioByteLength=0,this.bufferList=[],this.audioBufferList=[],this.cacheTrack={},this.audioCacheTrack={},this.sequenceNumber=0,this.audioSequenceNumber=0}startRecord(){const e=this.player.debug;this._isRecording=!0,this.player.emit(Xe.recording,!0),e.log(this.TAG_NAME,"start recording"),this.player.emit(Xe.recordStart),this.startRecordingInterval()}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(Xe.recordingTimestamp,this.getTotalDuration())}),1e3)}formatFmp4Track(e,t,i,s){return{id:1,sequenceNumber:++this.sequenceNumber,size:e.byteLength,dts:i,cts:s,isKeyframe:t,data:e,duration:0,flags:{isLeading:0,dependsOn:t?2:1,isDependedOn:t?1:0,hasRedundancy:0,isNonSync:t?0:1}}}formatAudioFmp4Track(e,t){return{id:2,sequenceNumber:++this.audioSequenceNumber,size:e.byteLength,dts:t,pts:t,cts:0,data:new Uint8Array(e),duration:0,originalDts:t,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}}handleAddNaluTrack(e,t,i,s){this.cacheTrack.id&&i>=this.cacheTrack.dts?(this.cacheTrack.duration=i-this.cacheTrack.dts,this.handleAddFmp4Track(this.cacheTrack)):this.cacheTrack={},this.cacheTrack=this.formatFmp4Track(e,t,i,s)}handleAddAudioTrack(e,t){}handleAddFmp4Track(e){if(!this.isRecording)return void this.player.debug.error(this.TAG_NAME,"handleAddFmp4Track, isRecording is false ");if((null===this.sps||null===this.pps)&&this.isH264)return void this.player.debug.error(this.TAG_NAME,"handleAddFmp4Track, is h264 and this.sps or this.pps is null ");if((null===this.sps||null===this.pps||null===this.vps)&&this.isH265)return void this.player.debug.error(this.TAG_NAME,"handleAddFmp4Track, is h265 and this.sps or this.pps or this.vps is null ");const t=Object.assign({},e);t.pts=t.dts+t.cts;const i=t.data;if(t.isKeyframe)if(this.isH264){const e=new Uint8Array(this.sps.byteLength+this.pps.byteLength);e.set(this.sps,0),e.set(this.pps,this.sps.byteLength);const s=new Uint8Array(e.byteLength+i.byteLength);s.set(e,0),s.set(i,e.byteLength),t.data=s}else if(this.isH265){const e=new Uint8Array(this.sps.byteLength+this.pps.byteLength+this.vps.byteLength);e.set(this.vps,0),e.set(this.sps,this.vps.byteLength),e.set(this.pps,this.vps.byteLength+this.sps.byteLength);const s=new Uint8Array(e.byteLength+i.byteLength);s.set(e,0),s.set(i,e.byteLength),t.data=s}t.size=t.data.byteLength,this.totalDuration+=t.duration,this.totalByteLength+=t.data.byteLength,t.duration=0,t.originalDts=t.dts,delete t.id,delete t.sequenceNumber,this.bufferList.push(t)}handleAddFmp4AudioTrack(e){const t=Object.assign({},e);t.pts=t.dts+t.cts,t.size=t.data.byteLength,this.totalAudioDuration+=t.duration,this.totalAudioByteLength+=t.data.byteLength,t.duration=0,t.originalDts=t.dts,delete t.id,delete t.sequenceNumber,this.audioBufferList.push(t)}getTotalDuration(){return this.totalDuration/1e3}getType(){return A}getToTalByteLength(){return this.totalByteLength+this.totalAudioByteLength}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nt,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{if(!this.isRecording)return this.player.debug.error(this.TAG_NAME,"stop recording fail, isRecording is false "),s("stop recording fail, isRecording is false ");if(0===this.bufferList.length)return this.player.debug.error(this.TAG_NAME,"stop recording fail, this.bufferList.length is 0 "),s("stop recording fail, this.bufferList.length is 0 ");t&&this.setFileName(t);const r={id:1,type:"video",sps:this.sps,pps:this.pps,samples:this.bufferList,sequenceNumber:this.bufferList.length,length:0,addSampleNum:1,duration:0,...this.metaInfo},a={id:2,type:"audio",sequenceNumber:this.audioBufferList.length,samples:this.audioBufferList,...this.audioMetaInfo},o=[r];a.samples.length>0&&o.push(a),this.player.debug.log(this.TAG_NAME,`trackList length is ${o.length}`);const n=zo.generateInitSegment({timescale:1e3,duration:this.totalDuration},o,this.totalByteLength+this.totalAudioByteLength);this.player.debug.log(this.TAG_NAME,"stop recording");const l=new Blob([n],{type:"application/octet-stream"});if(e===lt)i(l),this.player.emit(Xe.recordBlob,l);else{i();xr((this.fileName||sr())+"."+A,l)}this._reset(),this.player.emit(Xe.recording,!1)}))}}class Vo extends No{constructor(e){super(e),this.TAG_NAME="FlvRecorderLoader",this.player=e,this._init(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this._init(),this.player.debug.log(this.TAG_NAME,"destroy")}_init(){this.hasAudio=!1,this.hasVideo=!1,this.startTime=null,this.currentTime=0,this.prevTimestamp=0,this.totalByteLength=0,this.totalDuration=0,this.flvMetaData=null,this.aacSequenceHeader=null,this.videoSequenceHeader=null,this.bufferList=[]}_reset(){super._reset(),this._init()}startRecord(){const e=this.player.debug;this._isRecording=!0,this.player.emit(Xe.recording,!0),e.log(this.TAG_NAME,"start recording"),this.player.emit(Xe.recordStart),this.startRecordingInterval()}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(Xe.recordingTimestamp,this.getTotalDuration())}),1e3)}addMetaData(e){this.flvMetaData=e}addAACSequenceHeader(e){this.aacSequenceHeader=e}addVideoSequenceHeader(e){this.videoSequenceHeader=e}addVideo(e,t){this._setStartTime(t);const i=this._getBufferTs(t);this.hasVideo=!0,this._createBufferItem(e,Me,i)}addAudio(e,t){this._setStartTime(t);const i=this._getBufferTs(t);this.hasAudio=!0,this._createBufferItem(e,Be,i)}_setStartTime(e){null===this.startTime&&this._isRecording&&(this.startTime=e,this.player.debug.log(this.TAG_NAME,`_setStartTime is ${e}`))}_getBufferTs(e){e>this.currentTime&&(this.currentTime=e);let t=0;return this.startTime&&e>=this.startTime&&(t=e-this.startTime),t>this.prevTimestamp?this.prevTimestamp=t:t=this.prevTimestamp,t}_createBufferItem(e,t,i){const s=this._createFlvPacket(e,t,i),r=this._createFlvTag(s);this.totalByteLength+=r.byteLength,this.bufferList.push(r)}_createFlvTag(e){let t=11+e.header.length,i=new Uint8Array(t+4);i[0]=e.header.type;let s=new DataView(i.buffer);return i[1]=e.header.length>>16&255,i[2]=e.header.length>>8&255,i[3]=255&e.header.length,i[4]=e.header.timestamp>>16&255,i[5]=e.header.timestamp>>8&255,i[6]=255&e.header.timestamp,i[7]=e.header.timestamp>>24&255,i[8]=0,i[9]=0,i[10]=0,s.setUint32(t,t),i.set(e.payload.subarray(0,e.header.length),11),i}_createFlvPacket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{header:{length:e?e.length:0,timestamp:i,type:t},payload:e}}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nt,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>{if(!this.isRecording)return this.player.debug.error(this.TAG_NAME,"stop recording fail, isRecording is false "),s("stop recording fail, isRecording is false ");if(0===this.bufferList.length)return this.player.debug.error(this.TAG_NAME,"stop recording fail, this.bufferList.length is 0 "),s("stop recording fail, this.bufferList.length is 0 ");t&&this.setFileName(t);const r=new Uint8Array([70,76,86,1,0,0,0,0,9,0,0,0,0]);this.hasVideo&&(r[4]|=1),this.hasAudio&&(r[4]|=4);let a=[r];if(this.flvMetaData){const e=this._createFlvPacket(this.flvMetaData,Ue),t=this._createFlvTag(e);a.push(t)}if(this.videoSequenceHeader){const e=this._createFlvPacket(this.videoSequenceHeader,Me),t=this._createFlvTag(e);a.push(t)}if(this.aacSequenceHeader){const e=this._createFlvPacket(this.aacSequenceHeader,Be),t=this._createFlvTag(e);a.push(t)}const o=function(e){const t=e[0].constructor;return e.reduce(((e,i)=>{const s=new t((0|e.byteLength)+(0|i.byteLength));return s.set(e,0),s.set(i,0|e.byteLength),s}),new t)}(a.concat(this.bufferList));this.player.debug.log(this.TAG_NAME,"stop recording");const n=new Blob([o],{type:"application/octet-stream"});if(e===lt)i(n),this.player.emit(Xe.recordBlob,n);else{i();xr((this.fileName||sr())+"."+v,n)}this._reset(),this.player.emit(Xe.recording,!1)}))}getTotalDuration(){let e=0;return null!==this.startTime&&null!==this.currentTime&&(e=this.currentTime-this.startTime),Math.round(e/1e3)}getType(){return v}getToTalByteLength(){return this.totalByteLength}}const Ho={init:0,findFirstStartCode:1,findSecondStartCode:2};class Wo extends ba{constructor(e){super(),this.player=e,this.isDestroyed=!1,this.reset()}destroy(){this.isDestroyed=!1,this.off(),this.reset()}reset(){this.stats=Ho.init,this.tempBuffer=new Uint8Array(0),this.parsedOffset=0,this.versionLayer=0}dispatch(e,t){let i=new Uint8Array(this.tempBuffer.length+e.length);for(i.set(this.tempBuffer,0),i.set(e,this.tempBuffer.length),this.tempBuffer=i;!this.isDestroyed;){if(this.state==Ho.Init){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(!(!1&this.tempBuffer[this.parsedOffset+1])){this.versionLayer=this.tempBuffer[this.parsedOffset+1],this.state=Ho.findFirstStartCode,this.fisrtStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==Ho.findFirstStartCode){let e=!1;for(;this.tempBuffer.length-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this.parsedOffset]){if(this.tempBuffer[this.parsedOffset+1]==this.versionLayer){this.state=Ho.findSecondStartCode,this.secondStartCodeOffset=this.parsedOffset,this.parsedOffset+=2,e=!0;break}this.parsedOffset++}else this.parsedOffset++;if(e)continue;break}if(this.state==Ho.findSecondStartCode){let e=this.tempBuffer.slice(this.fisrtStartCodeOffset,this.secondStartCodeOffset);this.emit("data",e,t),this.tempBuffer=this.tempBuffer.slice(this.secondStartCodeOffset),this.fisrtStartCodeOffset=0,this.parsedOffset=2,this.state=Ho.findFirstStartCode}}}}class $o extends No{constructor(e){super(e),this.TAG_NAME="recorderWasmMP4",this._reset(),this.wasmMp4Recorder=new window.JessibucaProMp4Recorder({debug:e._opt.debug,debugLevel:e._opt.debugLevel,debugUuid:e._opt.debugUuid,decoder:e._opt.wasmMp4RecorderDecoder}),this.mp3Demuxer=null,this.isG711=!1,e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.mp3Demuxer&&(this.mp3Demuxer.destroy(),this.mp3Demuxer=null),this.isG711=!1,this._reset(),this.player.debug.log(this.TAG_NAME,"destroy")}_reset(){super._reset(),this.cacheTrack={},this.audioCacheTrack={},this.totalDuration=0,this.totalAudioDuration=0,this.totalByteLength=0,this.totalAudioByteLength=0,this.hasAudio=!1,this.hasVideo=!1}getType(){return A}isWasmMp4(){return!0}getTotalDuration(){return this.totalDuration/1e3}getToTalByteLength(){return this.totalByteLength+this.totalAudioByteLength}startRecord(){const e=this.player.debug,t=this.player.getAudioInfo(),i=this.player.getVideoInfo(),s={};if(this.codecId){const e={type:this.codecId,width:i.width,height:i.height,extraData:this.metaInfo.avcc};s.video=e,this.hasVideo=!0}if(t.encTypeCode){this.isG711=t.encTypeCode===mt||t.encTypeCode===gt;const e={type:t.encTypeCode,sampleRate:t.sampleRate,channels:t.channels,extraData:this.audioMetaInfo.extraData,depth:t.depth};this.audioCodeId=t.encTypeCode,s.audio=e,this.hasAudio=!0}this.wasmMp4Recorder.startRecord(s).then((()=>{this._isRecording=!0,this.player.emit(Xe.recording,!0),e.log(this.TAG_NAME,"start recording"),this.player.emit(Xe.recordStart),this.startRecordingInterval()})).catch((t=>{e.error(this.TAG_NAME,"startRecord error",t),this.player.emitError(Xe.recordCreateError,t)}))}startRecordingInterval(){this.stopRecordingInterval(),this.recordingInterval=window.setInterval((()=>{this.player.emit(Xe.recordingTimestamp,this.getTotalDuration())}),1e3)}stopRecordAndSave(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nt,t=arguments.length>1?arguments[1]:void 0;return new Promise(((i,s)=>this.isRecording?0===this.totalDuration?(this.player.debug.error(this.TAG_NAME,"stop recording fail, totalDuration is 0 "),s("stop recording fail, totalDuration is 0 ")):(t&&this.setFileName(t),void this.wasmMp4Recorder.stopRecord().then((t=>{if(e===lt)i(t),this.player.emit(Xe.recordBlob,t);else{i();const e=this.isG711?_:A;xr((this.fileName||sr())+"."+e,t)}})).catch((e=>{this.player.debug.error(this.TAG_NAME,"stopRecord error",e),s(e)})).finally((()=>{this._reset(),this.player.emit(Xe.recording,!1)}))):(this.player.debug.error(this.TAG_NAME,"stop recording fail, isRecording is false "),s("stop recording fail, isRecording is false "))))}handleAddAudioTrack(e,t){this.audioCodeId===yt?(this.mp3Demuxer||(this.mp3Demuxer=new Wo(this.player),this.mp3Demuxer.on("data",((e,t)=>{this._handleAddAudioTrack(e,t)}))),this.mp3Demuxer.dispatch(e,t)):this._handleAddAudioTrack(e,t)}_handleAddAudioTrack(e,t){da(this.hasAudio)||(this.audioCacheTrack.id&&t>=this.audioCacheTrack.dts?(this.audioCacheTrack.duration=t-this.audioCacheTrack.dts,this.totalAudioDuration+=this.audioCacheTrack.duration,this.totalAudioByteLength+=this.audioCacheTrack.payload.byteLength,this.wasmMp4Recorder.sendAudioFrame(this.audioCacheTrack.payload,this.audioCacheTrack.dts)):this.audioCacheTrack={},this.audioCacheTrack={id:2,payload:e,dts:t})}handleAddNaluTrack(e,t,i,s){da(this.hasVideo)||(this.cacheTrack.id&&i>=this.cacheTrack.dts?(this.cacheTrack.duration=i-this.cacheTrack.dts,this.totalDuration+=this.cacheTrack.duration,this.totalByteLength+=this.cacheTrack.payload.byteLength,this.wasmMp4Recorder.sendVideoFrame(this.cacheTrack.payload,this.cacheTrack.isIFrame,this.cacheTrack.dts,this.cacheTrack.cts)):this.cacheTrack={},this.cacheTrack={id:1,payload:e,isIFrame:t,dts:i,cts:s})}}class Jo{constructor(e){return new(Jo.getLoaderFactory(e._opt))(e)}static getLoaderFactory(e){if(e.recordType===A){if(e.useWasm||e.useMSE||e.useWCS)return window.JessibucaProMp4Recorder&&e.mp4RecordUseWasm?$o:Go}else if(e.recordType===v)return Vo;return jo}}function Ko(e,t,i){let s=e;if(t+i=128){t.push(String.fromCharCode(65535&e)),s+=2;continue}}}else if(i[s]<240){if(Ko(i,s,2)){let e=(15&i[s])<<12|(63&i[s+1])<<6|63&i[s+2];if(e>=2048&&55296!=(63488&e)){t.push(String.fromCharCode(65535&e)),s+=3;continue}}}else if(i[s]<248&&Ko(i,s,3)){let e=(7&i[s])<<18|(63&i[s+1])<<12|(63&i[s+2])<<6|63&i[s+3];if(e>65536&&e<1114112){e-=65536,t.push(String.fromCharCode(e>>>10|55296)),t.push(String.fromCharCode(1023&e|56320)),s+=4;continue}}t.push(String.fromCharCode(65533)),++s}return t.join("")}let Yo=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}();class Qo{static parseScriptData(e,t,i){let s={};try{let r=Qo.parseValue(e,t,i),a=Qo.parseValue(e,t+r.size,i-r.size);s[r.data]=a.data}catch(e){console.error("AMF",e.toString())}return s}static parseObject(e,t,i){let s=Qo.parseString(e,t,i),r=Qo.parseValue(e,t+s.size,i-s.size),a=r.objectEnd;return{data:{name:s.data,value:r.data},size:s.size+r.size,objectEnd:a}}static parseVariable(e,t,i){return Qo.parseObject(e,t,i)}static parseString(e,t,i){let s,r=new DataView(e,t,i).getUint16(0,!Yo);return s=r>0?qo(new Uint8Array(e,t+2,r)):"",{data:s,size:2+r}}static parseLongString(e,t,i){let s,r=new DataView(e,t,i).getUint32(0,!Yo);return s=r>0?qo(new Uint8Array(e,t+4,r)):"",{data:s,size:4+r}}static parseDate(e,t,i){let s=new DataView(e,t,i),r=s.getFloat64(0,!Yo);return r+=60*s.getInt16(8,!Yo)*1e3,{data:new Date(r),size:10}}static parseValue(e,t,i){let s,r=new DataView(e,t,i),a=1,o=r.getUint8(0),n=!1;try{switch(o){case 0:s=r.getFloat64(1,!Yo),a+=8;break;case 1:s=!!r.getUint8(1),a+=1;break;case 2:{let r=Qo.parseString(e,t+1,i-1);s=r.data,a+=r.size;break}case 3:{s={};let o=0;for(9==(16777215&r.getUint32(i-4,!Yo))&&(o=3);a{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),Q)}this.decoderWorker=new Worker(t),this._initDecoderWorker(),e.debug.log("decoderWorker",`init and decoder url is ${t}`),e.on(Xe.visibilityChange,(()=>{this.updateWorkConfig({key:"visibility",value:e.visibility})}))}destroy(){return new Promise(((e,t)=>{this.player.loaded?(this.player.debug.log("decoderWorker","has loaded and post message to destroy"),this.decoderWorker?(this.decoderWorker.postMessage({cmd:ze}),this.destroyResolve=e,this.decoderWorkerCloseTimeout=setTimeout((()=>{this.player.debug.warn("decoderWorker","send close but not response and destroy directly"),this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this._destroy(),setTimeout((()=>{e()}),0)}),2e3)):(this.player.debug.warn("decoderWorker","has loaded but decoderWorker is null and destroy directly"),this._destroy(),setTimeout((()=>{e()}),0))):(this.player.debug.log("decoderWorker","has not loaded and destroy directly"),this._destroy(),setTimeout((()=>{e()}),0))}))}_destroy(){this.decoderWorkerCloseTimeout&&(clearTimeout(this.decoderWorkerCloseTimeout),this.decoderWorkerCloseTimeout=null),this.workerUrl&&(window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.decoderWorker&&(this.decoderWorker.terminate(),this.decoderWorker.onerror=null,this.decoderWorker.onmessageerror=null,this.decoderWorker.onmessage=null,this.decoderWorker=null),this.player.debug.log("decoderWorker","destroy"),this.destroyResolve&&(this.destroyResolve(),this.destroyResolve=null)}_initDecoderWorker(){const{debug:e,events:{proxy:t}}=this.player;this.decoderWorker.onerror=e=>{this.player.debug.error("decoderWorker","onerror",e),this.player.emitError(tt.decoderWorkerInitError,e)},this.decoderWorker.onmessageerror=e=>{this.player.debug.error("decoderWorker","onmessageerror",e)},this.decoderWorker.onmessage=t=>{const i=t.data;switch(i.cmd){case ee:e.log("decoderWorker","onmessage:",ee),this.decoderWorker&&this._initWork(),this.player.loaded||this.player.emit(Xe.load),this.player.emit(Xe.decoderWorkerInit);break;case le:e.log("decoderWorker","onmessage:",le,i.code),this.player._times.decodeStart||(this.player._times.decodeStart=sr()),this.player.video.updateVideoInfo({encTypeCode:i.code});break;case he:e.log("decoderWorker","onmessage:",he,i.codecId),this.player.recorder&&this.player.recorder.initMetaData(i.buffer,i.codecId);break;case ae:e.log("decoderWorker","onmessage:",ae,i.code),this.player.audio&&this.player.audio.updateAudioInfo({encTypeCode:i.code});break;case ne:e.log("decoderWorker","onmessage:",ne),this.player.recorder&&this.player.recorder.initAudioAacExtraData(i.buffer);break;case te:if(e.log("decoderWorker","onmessage:",te,`width:${i.w},height:${i.h}`),Dr(i.w)||Dr(i.h))return void this.player.emitError(tt.videoInfoError,`video width ${i.w} or height ${i.h} is empty`);if(this.player.video.updateVideoInfo({width:i.w,height:i.h}),!this.player._opt.openWebglAlignment&&i.w/2%4!=0&&this.player.getRenderType()===z)return void this.player.emitError(tt.webglAlignmentError);this.player.video.initCanvasViewSize(),this.player._opt.playType===y&&(this.player.video.initFps(),this.player.video.initVideoDelay());break;case re:if(e.log("decoderWorker","onmessage:",re,`channels:${i.channels},sampleRate:${i.sampleRate}`),i.channels>2)return void this.player.emitError(tt.audioChannelError,`audio channel is ${i.channels}, max is 2`);this.player.audio&&(this.player.audio.updateAudioInfo(i),this.player._opt.playType===m?this.player.audio.initScriptNode():this.player._opt.playType===y&&this.player.audio.initScriptNodeDelay());break;case ie:if(!this.player.video)return void e.warn("decoderWorker","onmessage render but video is null");if(this.player.isPlayer()){if(da(this.player.video.getHasInit()))return void e.warn("decoderWorker","onmessage render but video has not init");this.player.video.render(i),this.player.handleRender(),this.player.emit(Xe.timeUpdate,i.ts),this.player.updateStats({dfps:!0,buf:i.delay}),this.player._times.videoStart||(this.player._times.videoStart=sr(),this.player.handlePlayToRenderTimes())}else this.player.isPlayback()&&(this.player.updateStats({dfps:!0}),da(this.player.playbackPause)?(this.player.playback.isUseLocalCalculateTime&&this.player.playback.increaseLocalTimestamp(),this.player.playback.isUseFpsRender?this.player.video.pushData(i):this.player.video.render$2(i)):!this.player.playback.isPlaybackPauseClearCache&&this.player.playback.isCacheBeforeDecodeForFpsRender&&this.player.playback.isUseFpsRender&&this.player.video.pushData(i));break;case de:this.player.recorder&&this.player.recorder.isRecording&&this.player._opt.recordType===A&&this.player.recorder.handleAddNaluTrack(i.buffer,i.isIFrame,i.ts,i.cts);break;case oe:this.player.recorder&&this.player.recorder.isRecording&&this.player._opt.recordType===A&&this.player.recorder.isWasmMp4()&&this.player.recorder.handleAddAudioTrack(i.buffer,i.ts);break;case ce:const{webcodecsDecoder:t,mseDecoder:s}=this.player;this.player.updateStats({buf:i.delay});const r=new Uint8Array(i.payload);this.player._opt.useWCS&&!this.player._opt.useOffscreen?t.decodeVideo(r,i.ts,i.isIFrame,i.cts):this.player._opt.useMSE&&s.decodeVideo(r,i.ts,i.isIFrame,i.cts);break;case ue:if(this.player._opt.useMSE){const e=new Uint8Array(i.payload);this.player.mseDecoder.decodeAudio(e,i.ts,i.cts)}break;case se:if(!this.player.audio)return void e.warn("decoderWorker","onmessage playAudio but audio is null");(this.player.playing&&this.player.audio||!this.player.video)&&(this.player._opt.hasVideo||this.player.handleRender(),(this.player._opt.playType===m||this.player._opt.playType===y&&(da(this.player.playbackPause)||!this.player.playback.isPlaybackPauseClearCache&&this.player.playback.isCacheBeforeDecodeForFpsRender&&this.player.playback.isUseFpsRender))&&this.player.audio.play(i.buffer,i.ts));break;case fe:if(i.type===Xe.streamSuccess)this.player.stream?this.player.stream.emit(Xe.streamSuccess):e.warn("decoderWorker","onmessage and workerFetch response stream success but stream is null");else if(i.type===Xe.streamRate)this.player.emit(Xe.kBps,(i.value/1024).toFixed(2));else if(i.type===Xe.streamEnd)this.player?(i.value===d&&this.player.emit(Xe.websocketClose),this.player.stream?this.player.stream.emit(Xe.streamEnd):e&&e.warn("decoderWorker","onmessage and workerFetch response stream end but player.stream is null")):e&&e.warn("decoderWorker","onmessage and workerFetch response stream end but player is null");else if(i.type===tt.websocketError)this.player&&this.player.stream?this.player.stream.emit(tt.websocketError,i.value):e&&e.warn("decoderWorker","onmessage and workerFetch response websocket error but stream is null");else if(i.type===tt.fetchError)this.player&&this.player.stream?this.player.stream.emit(tt.fetchError,i.value):e&&e.warn("decoderWorker","onmessage and workerFetch response fetch error but stream is null");else if(i.type===Xe.streamAbps)this.player.updateStats({abps:i.value});else if(i.type===Xe.streamVbps)this.player._times.demuxStart||(this.player._times.demuxStart=sr()),this.player.updateStats({vbps:i.value});else if(i.type===Xe.streamDts)this.player.updateStats({dts:i.value});else if(i.type===Xe.netBuf)this.player.updateStats({netBuf:i.value});else if(i.type===Xe.networkDelayTimeout)this.player.emit(Xe.networkDelayTimeout,i.value);else if(i.type===Xe.streamStats){const e=JSON.parse(i.value);this.player.updateStats({workerStats:e})}else i.type===Xe.websocketOpen&&this.player.emit(Xe.websocketOpen);break;case me:this.player&&(this.player.videoIframeIntervalTs=i.value);break;case ge:this.player&&this.player.updateStats({isDropping:!0});break;case De:this.player.decoderCheckFirstIFrame();break;case Ae:this.player&&this.player.video&&this.player.video.setStreamFps(i.value);break;case pe:i.message&&-1!==i.message.indexOf(Le)&&this.player.emitError(tt.wasmDecodeError,"");break;case be:this.player.emitError(tt.wasmDecodeVideoNoResponseError);break;case we:this.player.emitError(tt.simdH264DecodeVideoWidthIsTooLarge);break;case ve:this.player.emitError(tt.wasmWidthOrHeightChange);break;case _e:this.player.emitError(tt.simdDecodeError);break;case ye:e.log("decoderWorker","onmessage:",ye),this.player.destroy(),console.error("jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码),如需要购买商业授权,可以联系微信:bosswancheng"),alert("jessibuca pro 体验结束,请刷新页面再次体验,如需要购买商业授权,可以联系微信:bosswancheng"),window.location.reload();break;case Se:e.log("decoderWorker","onmessage:",Se),this._destroy();break;case Te:this.player&&this.player.pushTempStream(i.buffer);break;case Ee:this.player&&this.player.emit(Xe.videoSEI,{ts:i.ts,data:new Uint8Array(i.buffer)});break;case ke:if(this.player){if(this.player.isRecordTypeFlv()){const e=new Uint8Array(i.buffer);this.player.recorder.addMetaData(e)}const e=Xo(new Uint8Array(i.buffer));e&&e.onMetaData&&this.player.updateMetaData(e.onMetaData)}break;case Ce:if(this.player&&this.player.isRecordTypeFlv()){const e=new Uint8Array(i.buffer);this.player.recorder.addAACSequenceHeader(e,i.ts)}break;case Re:if(this.player&&this.player.isRecordTypeFlv()){const e=new Uint8Array(i.buffer);this.player.recorder.addVideoSequenceHeader(e,i.ts)}break;case xe:if(this.player&&this.player.isRecordTypeFlv()&&this.player.recording){const e=new Uint8Array(i.buffer);i.type===Pe?this.player.recorder.addVideo(e,i.ts):i.type===Ie&&this.player.recorder.addAudio(e,i.ts)}break;default:this.player[i.cmd]&&this.player[i.cmd](i)}}}_initWork(){const e={debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid,useOffscreen:this.player._opt.useOffscreen,useWCS:this.player._opt.useWCS,useMSE:this.player._opt.useMSE,videoBuffer:this.player._opt.videoBuffer,videoBufferDelay:this.player._opt.videoBufferDelay,openWebglAlignment:this.player._opt.openWebglAlignment,playType:this.player._opt.playType,hasAudio:this.player._opt.hasAudio,hasVideo:this.player._opt.hasVideo,playbackRate:1,playbackForwardMaxRateDecodeIFrame:this.player._opt.playbackForwardMaxRateDecodeIFrame,playbackIsCacheBeforeDecodeForFpsRender:this.player._opt.playbackConfig.isCacheBeforeDecodeForFpsRender,sampleRate:this.player.audio&&this.player.audio.audioContext&&this.player.audio.audioContext.sampleRate||0,audioBufferSize:this.player.audio&&this.player.audio.getAudioBufferSize()||1024,networkDelay:this.player._opt.networkDelay,visibility:this.player.visibility,useSIMD:this.player._opt.useSIMD,recordType:this.player._opt.recordType,checkFirstIFrame:this.player._opt.checkFirstIFrame,isM7sCrypto:this.player._opt.isM7sCrypto,isXorCrypto:this.player._opt.isXorCrypto,isSm4Crypto:this.player._opt.isSm4Crypto,sm4CryptoKey:this.player._opt.sm4CryptoKey,m7sCryptoAudio:this.player._opt.m7sCryptoAudio,isFlv:this.player._opt.isFlv,isFmp4:this.player._opt.isFmp4,isMpeg4:this.player._opt.isMpeg4,isNakedFlow:this.player._opt.isNakedFlow,isHls265:this.player.isUseHls265(),isFmp4Private:this.player._opt.isFmp4Private,isEmitSEI:this.player._opt.isEmitSEI,isRecordTypeFlv:this.player.isRecordTypeFlv(),isWasmMp4:this.player.recorder&&this.player.recorder.isWasmMp4()||!1,isChrome:Wr(),isDropSameTimestampGop:this.player._opt.isDropSameTimestampGop,mseDecodeAudio:this.player._opt.mseDecodeAudio,nakedFlowH265DemuxUseNew:this.player._opt.nakedFlowH265DemuxUseNew};this.decoderWorker.postMessage({cmd:Fe,opt:JSON.stringify(e)}),this.player._opt.isM7sCrypto&&(this.updateWorkConfig({key:"cryptoKey",value:this.player._opt.cryptoKey}),this.updateWorkConfig({key:"cryptoIV",value:this.player._opt.cryptoIV}))}decodeVideo(e,t,i){this.player._opt.playType===m?this.player.isUseHls265()?this._decodeVideoNoDelay(e,t,i):this._decodeVideo(e,t,i):this.player._opt.playType===y&&(this.player.video.rate>=this.player._opt.playbackForwardMaxRateDecodeIFrame?i&&(this.player.debug.log("decoderWorker",`current rate is ${this.player.video.rate},only decode i frame`),this._decodeVideoNoDelay(e,t,i)):1===this.player.video.rate?this._decodeVideo(e,t,i):this._decodeVideoNoDelay(e,t,i))}_decodeVideo(e,t,i){const s={type:Pe,ts:Math.max(t,0),isIFrame:i};this.decoderWorker.postMessage({cmd:Oe,buffer:e,options:s},[e.buffer])}_decodeVideoNoDelay(e,t,i){this.decoderWorker.postMessage({cmd:je,buffer:e,ts:Math.max(t,0),isIFrame:i},[e.buffer])}decodeAudio(e,t){this.player._opt.playType===m?this.player._opt.useWCS||this.player._opt.useMSE||this.player.isUseHls265()?this._decodeAudioNoDelay(e,t):this._decodeAudio(e,t):this.player._opt.playType===y&&(1===this.player.video.rate?this._decodeAudio(e,t):this._decodeAudioNoDelay(e,t))}_decodeAudio(e,t){const i={type:Ie,ts:Math.max(t,0)};this.decoderWorker.postMessage({cmd:Oe,buffer:e,options:i},[e.buffer])}_decodeAudioNoDelay(e,t){this.decoderWorker.postMessage({cmd:Ne,buffer:e,ts:Math.max(t,0)},[e.buffer])}updateWorkConfig(e){this.decoderWorker&&this.decoderWorker.postMessage({cmd:Ge,key:e.key,value:e.value})}workerFetchStream(e){const{_opt:t}=this.player,i={protocol:t.protocol,isFlv:t.isFlv,isFmp4:t.isFmp4,isMpeg4:t.isMpeg4,isNakedFlow:t.isNakedFlow};this.decoderWorker.postMessage({cmd:He,url:e,opt:JSON.stringify(i)})}clearWorkBuffer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.decoderWorker.postMessage({cmd:Ve,needClear:e})}workerSendMessage(e){this.decoderWorker.postMessage({cmd:We,message:e})}}var en,tn="application/json, text/javascript",sn="text/html",rn=/^(?:text|application)\/xml/i,an=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,on=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nn=/^\s*$/,ln={},hn={},dn="",cn={type:"GET",beforeSend:un,success:un,error:un,complete:un,context:null,xhr:function(){return new window.XMLHttpRequest},accepts:{json:tn,xml:"application/xml, text/xml",html:sn,text:"text/plain","*":"*/".concat("*")},crossDomain:!1,timeout:0,username:null,password:null,processData:!0,promise:un,contentType:"application/x-www-form-urlencoded; charset=UTF-8"};function un(){}var pn=function(e,t){"object"==typeof e&&(t=e,e=void 0);var i=_n({},t=t||{});for(var s in cn)void 0===i[s]&&(i[s]=cn[s]);try{var r={},a=new Promise((function(e,t){r.resolve=e,r.reject=t}));a.resolve=r.resolve,a.reject=r.reject,i.promise=a}catch(e){i.promise={resolve:un,reject:un}}var o=on.exec(window.location.href.toLowerCase())||[];i.url=((e||i.url||window.location.href)+"").replace(/#.*$/,"").replace(/^\/\//,o[1]+"//");var n=i.url;i.crossDomain||(i.crossDomain=/^([\w-]+:)?\/\/([^\/]+)/.test(i.url)&&RegExp.$2!==window.location.href);var l=i.dataType;if("jsonp"===l){if(!/=\?/.test(i.url)){var h=(i.jsonp||"callback")+"=?";i.url=An(i.url,h)}return function(e){var t,i=e.jsonpCallback||"jsonp"+Tn(),s=window.document.createElement("script"),r={abort:function(){i in window&&(window[i]=un)}},a=window.document.getElementsByTagName("head")[0]||window.document.documentElement;function o(i){window.clearTimeout(t),r.abort(),gn(i.type,r,i.type,e),n()}s.onerror=function(e){o(e)},window[i]=function(i){window.clearTimeout(t),fn(i,r,e),n()},bn(e),s.src=e.url.replace(/=\?/,"="+i),s.src=An(s.src,"_="+(new Date).getTime()),s.async=!0,e.scriptCharset&&(s.charset=e.scriptCharset);a.insertBefore(s,a.firstChild),e.timeout>0&&(t=window.setTimeout((function(){r.abort(),gn("timeout",r,"timeout",e),n()}),e.timeout));function n(){s.clearAttributes?s.clearAttributes():s.onload=s.onreadystatechange=s.onerror=null,s.parentNode&&s.parentNode.removeChild(s),s=null,delete window[i]}return e.promise.abort=function(){r.abort()},e.promise.xhr=r,e.promise}(i)}bn(i);var d=i.accepts[l]||i.accepts["*"],c={};/^([\w-]+:)\/\//.test(i.url)?RegExp.$1:window.location.protocol;var u,p=cn.xhr();i.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest"),i.ifModified&&(ln[n]&&(c["If-Modified-Since"]=ln[n]),hn[n]&&(c["If-None-Match"]=hn[n])),d&&(c.Accept=d,d.indexOf(",")>-1&&(d=d.split(",",2)[0]),p.overrideMimeType&&p.overrideMimeType(d));var f=!/^(?:GET|HEAD)$/.test(i.type.toUpperCase());if((i.data&&f&&!1!==i.contentType||t.contentType)&&(c["Content-Type"]=i.contentType),!1===i.cache&&!f){var m=/([?&])_=[^&]*/;i.url=m.test(n)?n.replace(m,"$1_="+Tn()):n+(/\?/.test(n)?"&":"?")+"_="+Tn()}i.headers=_n(c,i.headers||{}),p.onreadystatechange=function(){if(4===p.readyState){var e;clearTimeout(u);var t=!1;if(p.status>=200&&p.status<300||304===p.status){if(dn=p.getAllResponseHeaders(),i.ifModified){var s=yn("Last-Modified");s&&(ln[n]=s),(s=yn("etag"))&&(hn[n]=s)}l=l||function(e){return e&&(e===sn?"html":e===tn?"json":rn.test(e)&&"xml")||"text"}(p.getResponseHeader("content-type")),e=p.responseText;try{"xml"===l?e=p.responseXML:"json"===l&&(e=nn.test(e)?null:JSON.parse(e))}catch(e){t=e}t?gn(t,"parseerror",p,i):fn(e,p,i)}else gn(null,"error",p,i)}};var g=!("async"in i)||i.async;if(p.open(i.type,i.url,g,i.username,i.password),i.xhrFields)for(var y in i.xhrFields)p[y]=i.xhrFields[y];for(var y in i.mimeType&&p.overrideMimeType&&p.overrideMimeType(i.mimeType),i.headers)void 0!==i.headers[y]&&p.setRequestHeader(y,i.headers[y]+"");return!1===function(e,t){var i=t.context;if(!1===t.beforeSend.call(i,e,t))return!1}(p,i)?(p.abort(),!1):(i.timeout>0&&(u=window.setTimeout((function(){p.onreadystatechange=un,p.abort(),gn(null,"timeout",p,i)}),i.timeout)),p.send(i.data?i.data:null),i.promise.abort=function(){p.abort()},i.promise)};function fn(e,t,i){var s=i.context,r="success";i.success.call(s,e,r,t),i.promise.resolve(e,r,t),mn(r,t,i)}function mn(e,t,i){var s=i.context;i.complete.call(s,t,e)}function gn(e,t,i,s){var r=s.context;s.error.call(r,i,t,e),s.promise.reject(i,t,e),mn(t,i,s)}function yn(e){var t;if(!en){for(en={};t=an.exec(dn);)en[t[1].toLowerCase()]=t[2];t=en[e.toLowerCase()]}return null===t?null:t}function An(e,t){return(e+"&"+t).replace(/[&?]{1,2}/,"?")}function bn(e){!wn(e)||e.data instanceof FormData||!e.processData||(e.data=function(e,t){var i=[];return i.add=function(e,t){this.push(encodeURIComponent(e)+"="+encodeURIComponent(t))},vn(i,e,t),i.join("&").replace("%20","+")}(e.data)),!e.data||e.type&&"GET"!==e.type.toUpperCase()||(e.url=An(e.url,e.data))}function vn(e,t,i,s){var r=function(e){return"[object Array]"===Object.prototype.toString.call(e)}(t);for(var a in t){var o=t[a];s&&(a=i?s:s+"["+(r?"":a)+"]"),!s&&r?e.add(o.name,o.value):(i?r(o):wn(o))?vn(e,o,i,a):e.add(a,o)}}function _n(e){for(var t=Array.prototype.slice,i=t.call(arguments,1),s=0,r=i.length;s255)return!1;return!0}function Cn(e,t){if(e.buffer&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!kn(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(En(e.length)&&kn(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function Rn(e){return new Uint8Array(e)}function xn(e,t,i,s,r){null==s&&null==r||(e=e.slice?e.slice(s,r):Array.prototype.slice.call(e,s,r)),t.set(e,i)}pn.get=function(e,t,i,s){return Sn(t)&&(s=s||i,i=t,t=void 0),pn({url:e,data:t,success:i,dataType:s})},pn.post=function(e,t,i,s){return Sn(t)&&(s=s||i,i=t,t=void 0),pn({type:"POST",url:e,data:t,success:i,dataType:s})},pn.getJSON=function(e,t,i){return Sn(t)&&(i=t,t=void 0),pn({url:e,data:t,success:i,dataType:"json"})},pn.ajaxSetup=function(e,t){return t?_n(_n(e,cn),t):_n(cn,e)};var Dn={toBytes:function(e){var t=[],i=0;for(e=encodeURI(e);i191&&s<224?(t.push(String.fromCharCode((31&s)<<6|63&e[i+1])),i+=2):(t.push(String.fromCharCode((15&s)<<12|(63&e[i+1])<<6|63&e[i+2])),i+=3)}return t.join("")}},Ln=function(){var e="0123456789abcdef";return{toBytes:function(e){for(var t=[],i=0;i>4]+e[15&r])}return i.join("")}}}(),In={16:10,24:12,32:14},Pn=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],Bn=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],Mn=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],Un=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],Fn=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],On=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],Nn=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],jn=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],zn=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],Gn=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Vn=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Hn=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Wn=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],$n=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Jn=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Kn(e){for(var t=[],i=0;i>2,this._Ke[i][t%4]=a[t],this._Kd[e-i][t%4]=a[t];for(var o,n=0,l=r;l>16&255]<<24^Bn[o>>8&255]<<16^Bn[255&o]<<8^Bn[o>>24&255]^Pn[n]<<24,n+=1,8!=r)for(t=1;t>8&255]<<8^Bn[o>>16&255]<<16^Bn[o>>24&255]<<24;for(t=r/2+1;t>2,d=l%4,this._Ke[h][d]=a[t],this._Kd[e-h][d]=a[t++],l++}for(var h=1;h>24&255]^Wn[o>>16&255]^$n[o>>8&255]^Jn[255&o]},qn.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,i=[0,0,0,0],s=Kn(e),r=0;r<4;r++)s[r]^=this._Ke[0][r];for(var a=1;a>24&255]^Fn[s[(r+1)%4]>>16&255]^On[s[(r+2)%4]>>8&255]^Nn[255&s[(r+3)%4]]^this._Ke[a][r];s=i.slice()}var o,n=Rn(16);for(r=0;r<4;r++)o=this._Ke[t][r],n[4*r]=255&(Bn[s[r]>>24&255]^o>>24),n[4*r+1]=255&(Bn[s[(r+1)%4]>>16&255]^o>>16),n[4*r+2]=255&(Bn[s[(r+2)%4]>>8&255]^o>>8),n[4*r+3]=255&(Bn[255&s[(r+3)%4]]^o);return n},qn.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,i=[0,0,0,0],s=Kn(e),r=0;r<4;r++)s[r]^=this._Kd[0][r];for(var a=1;a>24&255]^zn[s[(r+3)%4]>>16&255]^Gn[s[(r+2)%4]>>8&255]^Vn[255&s[(r+1)%4]]^this._Kd[a][r];s=i.slice()}var o,n=Rn(16);for(r=0;r<4;r++)o=this._Kd[t][r],n[4*r]=255&(Mn[s[r]>>24&255]^o>>24),n[4*r+1]=255&(Mn[s[(r+3)%4]>>16&255]^o>>16),n[4*r+2]=255&(Mn[s[(r+2)%4]>>8&255]^o>>8),n[4*r+3]=255&(Mn[255&s[(r+1)%4]]^o);return n};var Yn=function(e){if(!(this instanceof Yn))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new qn(e)};Yn.prototype.encrypt=function(e){if((e=Cn(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=Rn(e.length),i=Rn(16),s=0;sNumber.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var t=15;t>=0;--t)this._counter[t]=e%256,e=parseInt(e/256)},el.prototype.setBytes=function(e){if(16!=(e=Cn(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},el.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var tl=function(e,t){if(!(this instanceof tl))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof el||(t=new el(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new qn(e)};tl.prototype.encrypt=function(e){for(var t=Cn(e,!0),i=0;i16)throw new Error("PKCS#7 padding byte out of range");for(var i=e.length-t,s=0;s1===(e=e.toString(16)).length?"0"+e:e)).join("")}function hl(e){const t=[];for(let i=0,s=e.length;i>>6),t.push(128|63&s);else if(s<=55295||s>=57344&&s<=65535)t.push(224|s>>>12),t.push(128|s>>>6&63),t.push(128|63&s);else{if(!(s>=65536&&s<=1114111))throw t.push(s),new Error("input is not supported");i++,t.push(240|s>>>18&28),t.push(128|s>>>12&63),t.push(128|s>>>6&63),t.push(128|63&s)}}return t}function dl(e){const t=[];for(let i=0,s=e.length;i=240&&e[i]<=247?(t.push(String.fromCodePoint(((7&e[i])<<18)+((63&e[i+1])<<12)+((63&e[i+2])<<6)+(63&e[i+3]))),i+=3):e[i]>=224&&e[i]<=239?(t.push(String.fromCodePoint(((15&e[i])<<12)+((63&e[i+1])<<6)+(63&e[i+2]))),i+=2):e[i]>=192&&e[i]<=223?(t.push(String.fromCodePoint(((31&e[i])<<6)+(63&e[i+1]))),i++):t.push(String.fromCodePoint(e[i]));return t.join("")}function cl(e,t){const i=31&t;return e<>>32-i}function ul(e){return(255&al[e>>>24&255])<<24|(255&al[e>>>16&255])<<16|(255&al[e>>>8&255])<<8|255&al[255&e]}function pl(e){return e^cl(e,2)^cl(e,10)^cl(e,18)^cl(e,24)}function fl(e){return e^cl(e,13)^cl(e,23)}function ml(e,t,i){const s=new Array(4),r=new Array(4);for(let t=0;t<4;t++)r[0]=255&e[4*t],r[1]=255&e[4*t+1],r[2]=255&e[4*t+2],r[3]=255&e[4*t+3],s[t]=r[0]<<24|r[1]<<16|r[2]<<8|r[3];for(let e,t=0;t<32;t+=4)e=s[1]^s[2]^s[3]^i[t+0],s[0]^=pl(ul(e)),e=s[2]^s[3]^s[0]^i[t+1],s[1]^=pl(ul(e)),e=s[3]^s[0]^s[1]^i[t+2],s[2]^=pl(ul(e)),e=s[0]^s[1]^s[2]^i[t+3],s[3]^=pl(ul(e));for(let e=0;e<16;e+=4)t[e]=s[3-e/4]>>>24&255,t[e+1]=s[3-e/4]>>>16&255,t[e+2]=s[3-e/4]>>>8&255,t[e+3]=255&s[3-e/4]}function gl(e,t,i){const s=new Array(4),r=new Array(4);for(let t=0;t<4;t++)r[0]=255&e[0+4*t],r[1]=255&e[1+4*t],r[2]=255&e[2+4*t],r[3]=255&e[3+4*t],s[t]=r[0]<<24|r[1]<<16|r[2]<<8|r[3];s[0]^=2746333894,s[1]^=1453994832,s[2]^=1736282519,s[3]^=2993693404;for(let e,i=0;i<32;i+=4)e=s[1]^s[2]^s[3]^ol[i+0],t[i+0]=s[0]^=fl(ul(e)),e=s[2]^s[3]^s[0]^ol[i+1],t[i+1]=s[1]^=fl(ul(e)),e=s[3]^s[0]^s[1]^ol[i+2],t[i+2]=s[2]^=fl(ul(e)),e=s[0]^s[1]^s[2]^ol[i+3],t[i+3]=s[3]^=fl(ul(e));if(0===i)for(let e,i=0;i<16;i++)e=t[i],t[i]=t[31-i],t[31-i]=e}function yl(e,t,i){let{padding:s="pkcs#7",mode:r,iv:a=[],output:o="string"}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if("cbc"===r&&("string"==typeof a&&(a=nl(a)),16!==a.length))throw new Error("iv is invalid");if("string"==typeof t&&(t=nl(t)),16!==t.length)throw new Error("key is invalid");if(e="string"==typeof e?0!==i?hl(e):nl(e):[...e],("pkcs#5"===s||"pkcs#7"===s)&&0!==i){const t=rl-e.length%rl;for(let i=0;i=rl;){const t=e.slice(c,c+16),s=new Array(16);if("cbc"===r)for(let e=0;ee)return this.preDelayTimestamp-e>1e3&&this.player.debug.warn("CommonDemux",`getDelay() and preDelayTimestamp is ${this.preDelayTimestamp} > timestamp is ${e} more than ${this.preDelayTimestamp-e}ms and return ${this.delay}`),this.preDelayTimestamp=e,this.delay;if(this.firstTimestamp){if(e){const t=Date.now()-this.startTimestamp,i=e-this.firstTimestamp;t>=i?(this.isStreamTsMoreThanLocal=!1,this.delay=t-i):(this.isStreamTsMoreThanLocal=!0,this.delay=i-t)}}else this.firstTimestamp=e,this.startTimestamp=Date.now(),this.delay=-1;return this.preDelayTimestamp=e,this.delay}getDelayNotUpdateDelay(e,t){if(!e||!this.player.isDemuxDecodeFirstIIframeInit())return-1;if(t===Ie)return this.pushLatestDelay;if(this.preDelayTimestamp&&this.preDelayTimestamp-e>1e3)return this.player.debug.warn("CommonDemux",`getDelayNotUpdateDelay() and preDelayTimestamp is ${this.preDelayTimestamp} > timestamp is ${e} more than ${this.preDelayTimestamp-e}ms and return -1`),-1;if(this.firstTimestamp){let t=-1;if(e){const i=Date.now()-this.startTimestamp,s=e-this.firstTimestamp;t=i>=s?i-s:s-i}return t}return-1}resetDelay(){this.firstTimestamp=null,this.startTimestamp=null,this.delay=-1,this.dropping=!1}resetAllDelay(){this.resetDelay(),this.preDelayTimestamp=null}initInterval(){this.player.isUseHls265()?this.player.debug.log("CommonDemux","initInterval() and is hls and support hls265 so return"):-1===this.player.getStreamType().indexOf(p)?this.player.isPlaybackCacheBeforeDecodeForFpsRender()?this.player.debug.log("CommonDemux","initInterval() and playback and playbackIsCacheBeforeDecodeForFpsRender is true so return"):(this.player.debug.log("CommonDemux","initInterval()"),this._loop(),this.stopId=setInterval((()=>{let e=(new Date).getTime();this.preLoopTimestamp||(this.preLoopTimestamp=e);const t=e-this.preLoopTimestamp;this.updateHistoryIntervalDiffTimeList(t),t>100&&this.player.debug.warn("CommonDemux",`loop demux diff time is ${t}`),this._loop(),this.preLoopTimestamp=(new Date).getTime()}),20)):this.player.debug.log("CommonDemux","initInterval() and is worker stream so return")}clearStopInterval(){this.stopId&&(clearInterval(this.stopId),this.stopId=null)}updateHistoryIntervalDiffTimeList(e){this.historyIntervalDiffTimeList.length>5&&this.historyIntervalDiffTimeList.shift(),this.historyIntervalDiffTimeList.push(e)}isHistoryIntervalDiffTimeAllLarge(){if(this.historyIntervalDiffTimeList.length<5)return!1;for(let e=0;e{let e=null;this.bufferList.length&&(e=this.bufferList.shift(),this._doDecoderDecode(e))};e();const t=Math.ceil(1e3/(this.playbackStreamFps*this.player.getPlaybackRate()));this.player.debug.log("CommonDemux",`initPlaybackCacheLoop() and fragDuration is ${t}, playbackStreamFps is ${this.playbackStreamFps}, playbackRate is ${this.player.getPlaybackRate()}`),this.stopId=setInterval(e,t)}_loop(){let e;const t=this.player._opt.videoBuffer,i=this.player._opt.videoBufferDelay,s=this.player._opt.playType===m;if(this.bufferList.length){if(this.isPushDropping)return void this.player.debug.warn("CommonDemux",`_loop isPushDropping is true and bufferList length is ${this.bufferList.length}`);if(this.dropping){for(e=this.bufferList.shift(),this.player.debug.warn("CommonDemux",`_loop is dropping and data.ts is ${e.ts}, data.type is ${e.type}, data.isIFrame is ${e.isIFrame}, delay is ${this.delay} ,buffer list is ${this.bufferList.length}`);!e.isIFrame&&this.bufferList.length;)e=this.bufferList.shift();const t=this.getDelayNotUpdateDelay(e.ts,e.type);e.isIFrame&&t<=this.getNotDroppingDelayTs()&&(this.player.debug.log("CommonDemux",`_loop data isIFrame is true and delay is ${this.delay}`),this.dropping=!1,this._doDecoderDecode(e),this._decodeNext(e))}else if(this.player.isPlayback()||this.player.isPlayUseMSE())for(;this.bufferList.length;)e=this.bufferList.shift(),this._doDecoderDecode(e);else if(e=this.bufferList[0],-1===this.getDelay(e.ts,e.type))this.player.debug.log("CommonDemux",`delay is -1 and data.ts is ${e.ts} data.type is ${e.type}`),this.bufferList.shift(),this._doDecoderDecode(e),this._decodeNext(e);else if(this.delay>i+t&&s)this.hasIframeInBufferList()?(this.player.debug.warn("CommonDemux",`_loop delay is ${this.delay}, set dropping is true`),this.resetAllDelay(),this.dropping=!0,this.player.updateStats({isDropping:!0})):(this.bufferList.shift(),this._doDecoderDecode(e),this._decodeNext(e));else for(;this.bufferList.length;){if(e=this.bufferList[0],!(this.getDelay(e.ts,e.type)>t)){this.delay<0&&this.player.debug.warn("CommonDemux",`_loop delay is ${this.delay} bufferList is ${this.bufferList}`);break}this.bufferList.shift(),this._doDecoderDecode(e)}}else-1!==this.delay&&this.player.debug.log("CommonDemux","loop() bufferList is empty and reset delay"),this.resetAllDelay()}_doDecode(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;const a=this.player;let o={ts:i,cts:r,type:t,isIFrame:!1};this.player.isPlayer()?(t===Pe&&a._opt.playType===m&&this.calcNetworkDelay(i),a._opt.useWCS&&!a._opt.useOffscreen||a._opt.useMSE?(t===Pe&&(o.isIFrame=s),this.pushBuffer(e,o)):t===Pe?a.decoderWorker&&a.decoderWorker.decodeVideo(e,i,s):t===Ie&&a._opt.hasAudio&&a.decoderWorker&&a.decoderWorker.decodeAudio(e,i)):this.player.isPlayback()&&(t===Pe&&(o.isIFrame=s),this.player.isPlaybackOnlyDecodeIFrame()?t===Pe&&s&&this.pushBuffer(e,o):this.player.isPlaybackCacheBeforeDecodeForFpsRender()||1===this.player.getPlaybackRate()?this.pushBuffer(e,o):this.pushBuffer(e,o,!1))}_doDecodeByHls(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=!1;if(t===Ie&&zs(e)&&(this.player.debug.log("CommonDemux",`hls pushBuffer audio ts is ${i}, isAacCodecPacket is true`),a=!0,this.player.isRecordTypeFlv())){const t=new Uint8Array(e);this.player.recorder.addAACSequenceHeader(t,i)}let o=!1;if(t===Pe&&s&&la(e)&&(this.player.debug.log("CommonDemux",`hls pushBuffer video ts is ${i}, isVideoSequenceHeader is true`),o=!0,this.player.isRecordTypeFlv())){const t=new Uint8Array(e);this.player.recorder.addVideoSequenceHeader(t,i)}this.player.recording&&da(o)&&da(a)&&this.handleRecording(e,t,i,s,r),t===Pe?this._doDecoderDecode({ts:i,cts:r,payload:e,type:Pe,isIFrame:s}):t===Ie&&this._doDecoderDecode({ts:i,payload:e,type:Ie})}_doDecodeByFmp4(e,t,i,s){let r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this._doDecode(e,t,i,s,r)}_decodeNext(e){const t=e.ts;if(0===this.bufferList.length)return;let i=this.bufferList[0];const s=i.ts-t,r=e.type===Pe&&i.type===Ie,a=e.type===Pe&&la(e.payload);(s<=20||r||a)&&(this.player.debug.log("CommonDemux",`decode data type is ${e.type} and\n ts is ${t} next data type is ${i.type} ts is ${i.ts}\n diff is ${s} and isVideoAndNextAudio is ${r} and isVideoSqeHeader is ${a}`),this.bufferList.shift(),this._doDecoderDecode(i))}_doDecoderDecode(e){const t=this.player,{webcodecsDecoder:i,mseDecoder:s}=t;this.player.isPlayer()&&this.player.updateStats({buf:this.delay}),e.type===Ie?t._opt.hasAudio&&(t._opt.useMSE&&t._opt.mseDecodeAudio?s.decodeAudio(e.payload,e.ts):t.decoderWorker&&t.decoderWorker.decodeAudio(e.payload,e.ts)):e.type===Pe&&(t._opt.isEmitSEI&&this.findSei(e.payload,e.ts),t._opt.useWCS&&!t._opt.useOffscreen?i.decodeVideo(e.payload,e.ts,e.isIFrame,e.cts):t._opt.useMSE?s.decodeVideo(e.payload,e.ts,e.isIFrame,e.cts):t.decoderWorker&&t.decoderWorker.decodeVideo(e.payload,e.ts,e.isIFrame))}pushBuffer(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=this.player._opt.videoBuffer,r=this.player._opt.videoBufferDelay,a=this.player.isPlayer();if(t.type===Ie&&zs(e)){if(this.player.debug.log("CommonDemux",`pushBuffer() audio ts is ${t.ts}, isAacCodecPacket is true`),this.player.isRecordTypeFlv()){const i=new Uint8Array(e);this.player.recorder.addAACSequenceHeader(i,t.ts)}this._doDecoderDecode({ts:t.ts,payload:e,type:Ie})}else if(t.type===Pe&&t.isIFrame&&la(e)){if(this.player.debug.log("CommonDemux",`pushBuffer() video ts is ${t.ts}, isVideoSequenceHeader is true`),this.player.isRecordTypeFlv()){const i=new Uint8Array(e);this.player.recorder.addVideoSequenceHeader(i,t.ts)}this._doDecoderDecode({ts:t.ts,payload:e,type:Pe,isIFrame:t.isIFrame,cts:t.cts})}else{if(this.player.recording&&this.handleRecording(e,t.type,t.ts,t.isIFrame,t.cts),a){if(this.preTimestampDuration>0&&this.preTimestamp>0&&t.type===Pe){const e=t.ts-this.preTimestamp,i=this.preTimestampDuration+this.preTimestampDuration/2;e>=i&&this.player.debug.log("CommonDemux",`pushBuffer() video\n ts is ${t.ts}, preTimestamp is ${this.preTimestamp},\n diff is ${e} and preTimestampDuration is ${this.preTimestampDuration} and maxDiff is ${i}\n maybe trigger black screen or flower screen`)}if(this.preTimestamp>0&&t.tsK&&(this.player.debug.warn("CommonDemux",`pushBuffer() video\n ts is ${t.ts}, preTimestamp is ${this.preTimestamp},\n diff is ${this.preTimestamp-t.ts} more than 3600000\n and resetAllDelay()`),this.resetAllDelay()),t.ts<=this.preTimestamp&&this.preTimestamp>0&&t.type===Pe&&(this.player.debug.warn("CommonDemux",`pushBuffer() video\n ts is ${t.ts} less than (or equal) preTimestamp is ${this.preTimestamp} and\n payloadBufferSize is ${e.byteLength} and prevPayloadBufferSize is ${this.prevPayloadBufferSize}`),this.player._opt.isDropSameTimestampGop&&this.player.isDemuxDecodeFirstIIframeInit())){const e=this.hasIframeInBufferList(),t=da(this.isPushDropping);return this.player.debug.log("CommonDemux",`pushBuffer(), isDropSameTimestampGop is true and\n hasIframe is ${e} and isNotPushDropping is ${t} and next drop buffer`),void(e&&t?this.dropBuffer$2():this.clearBuffer(!0))}if(this.player.isDemuxDecodeFirstIIframeInit()){let e=this.getDelayNotUpdateDelay(t.ts,t.type);this.pushLatestDelay=e;const i=r+s;this.player._opt.useMSE?e>i&&this.delay0&&this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useMSE, pushLatestDelay is ${e} > ${r+s}, bufferList is ${this.bufferList.length}, delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()):e>i&&this.delay0&&this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useWCS, pushLatestDelay is ${e} > ${r+s},bufferList is ${this.bufferList.length}, delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()),this.isHistoryIntervalDiffTimeAllLarge()&&da(this.player.visibility)&&(this.player._opt.useMSE?this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useMSE, page visibility is false and\n history interval diff is ${this.historyIntervalDiffTimeList.join(",")} and\n bufferList is ${this.bufferList.length},\n delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()):this.hasIframeInBufferList()&&!1===this.isPushDropping&&(this.player.debug.warn("CommonDemux",`useWCS, page visibility is false and\n history interval diff is ${this.historyIntervalDiffTimeList.join(",")} and\n bufferList is ${this.bufferList.length},\n delay is ${this.delay} and dropBuffer$2()`),this.dropBuffer$2()))}t.type===Pe&&(this.preTimestamp>0&&(this.preTimestampDuration=t.ts-this.preTimestamp),this.prevPayloadBufferSize=e.byteLength,this.preTimestamp=t.ts)}if(i?t.type===Ie?this.bufferList.push({ts:t.ts,payload:e,type:Ie}):t.type===Pe&&this.bufferList.push({ts:t.ts,cts:t.cts,payload:e,type:Pe,isIFrame:t.isIFrame}):t.type===Pe?this._doDecoderDecode({ts:t.ts,cts:t.cts,payload:e,type:Pe,isIFrame:t.isIFrame}):t.type===Ie&&this._doDecoderDecode({ts:t.ts,payload:e,type:Ie}),this.player.isPlaybackCacheBeforeDecodeForFpsRender()&&(Dr(this.playbackStreamVideoFps)||Dr(this.playbackStreamAudioFps))){let e=this.playbackStreamVideoFps,t=this.playbackStreamAudioFps;if(Dr(this.playbackStreamVideoFps)&&(e=ia(this.bufferList,Pe),e>0&&(this.playbackStreamVideoFps=e,this.player.video&&this.player.video.setStreamFps(this.playbackStreamVideoFps),this.playbackStreamFps=t?e+t:e,da(this.player._opt.hasAudio)&&(this.player.debug.log(this.TAG_NAME,"playbackCacheBeforeDecodeForFpsRender,_opt.hasAudio is false and set streamAudioFps is 0"),this.playbackStreamAudioFps=0),this.initPlaybackCacheLoop())),Dr(this.playbackStreamAudioFps)&&(t=ia(this.bufferList,Ie),t>0&&(this.playbackStreamAudioFps=t,this.playbackStreamFps=e?e+t:t,this.initPlaybackCacheLoop())),Dr(this.playbackStreamVideoFps)&&Dr(this.playbackStreamAudioFps)){const i=this.bufferList.map((e=>({type:e.type,ts:e.ts})));this.player.debug.log("CommonDemux",`playbackCacheBeforeDecodeForFpsRender, calc streamAudioFps is ${t}, streamVideoFps is ${e}, bufferListLength is ${this.bufferList.length} and ts list is ${JSON.stringify(i)}`)}const i=this.getAudioBufferLength()>0,s=i?60:40;this.bufferList.length>=s&&(this.debug.warn("CommonDemux",`playbackCacheBeforeDecodeForFpsRender, bufferListLength is ${this.bufferList.length} more than ${s}, and hasAudio is ${i} an set streamFps is 25`),this.playbackStreamVideoFps=e,this.player.video&&this.player.video.setStreamFps(this.playbackStreamVideoFps),i?(this.playbackStreamAudioFps=25,this.playbackStreamFps=this.playbackStreamVideoFps+this.playbackStreamAudioFps):this.playbackStreamFps=this.playbackStreamVideoFps,this.initPlaybackCacheLoop())}}}dropBuffer$2(){if(this.bufferList.length>0){let e=this.bufferList.findIndex((e=>ha(e.isIFrame)&&e.type===Pe));if(this.isAllIframeInBufferList())for(let t=0;t=this.getNotDroppingDelayTs()){this.player.debug.log("CommonDemux",`dropBuffer$2() isAllIframeInBufferList() is true, and index is ${t} and tempDelay is ${s} and notDroppingDelayTs is ${this.getNotDroppingDelayTs()}`),e=t;break}}if(e>=0){this.isPushDropping=!0,this.player.updateStats({isDropping:!0});const t=this.bufferList.length;this.bufferList=this.bufferList.slice(e);const i=this.bufferList.shift();this.resetAllDelay(),this.getDelay(i.ts,i.type),this._doDecoderDecode(i),this.isPushDropping=!1,this.player.debug.log("CommonDemux",`dropBuffer$2() iFrameIndex is ${e},and old bufferList length is ${t} ,and new bufferList length is ${this.bufferList.length} and new delay is ${this.delay} `)}else this.isPushDropping=!1}0===this.bufferList.length&&(this.isPushDropping=!1)}clearBuffer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.player.debug.log("CommonDemux",`clearBuffer,buffer length is ${this.bufferList.length}, need clear is ${e} and _opt.checkFirstIFrame is ${this.player._opt.checkFirstIFrame}`),e&&(this.bufferList=[]),this.player.isPlayer()&&(this.resetAllDelay(),ha(this.player._opt.checkFirstIFrame)&&(this.dropping=!0,this.player.updateStats({isDropping:!0}))),this.player.decoderCheckFirstIFrame()}calcNetworkDelay(e){if(!(this.player.isDemuxDecodeFirstIIframeInit()&&e>0))return;null===this.bufferStartDts?(this.bufferStartDts=e,this.bufferStartLocalTs=sr()):et?i-t:0;s>this.player._opt.networkDelay&&this.player._opt.playType===m&&(this.player.debug.warn("CommonDemux",`delay is more than networkDelay and now dts:${e},start dts is ${this.bufferStartDts}, vs start is ${t},local diff is ${i} ,delay is ${s}, _opt.networkDelay is ${this.player._opt.networkDelay}`),this.player.emit(Xe.networkDelayTimeout,s)),this.player.updateStats({netBuf:s})}calcIframeIntervalTimestamp(e){if(null===this.preIframeTs)this.preIframeTs=e;else if(this.preIframeTs{t.type===Pe&&(e+=1)})),e}getAudioBufferLength(){let e=0;return this.bufferList.forEach((t=>{t.type===Ie&&(e+=1)})),e}hasIframeInBufferList(){return this.bufferList.some((e=>e.type===Pe&&e.isIFrame))}isAllIframeInBufferList(){const e=this.getVideoBufferLength();let t=0;return this.bufferList.forEach((e=>{e.type===Pe&&e.isIFrame&&(t+=1)})),e===t}getInputByteLength(){return 0}getIsStreamTsMoreThanLocal(){return this.isStreamTsMoreThanLocal}close(){}reset(){}findSei(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=4;Ir(this.nalUnitSize)&&(s=this.nalUnitSize);const r=Do(e.slice(5),s);if(da(i)){const e=this.player.getVideoInfo();e&&e.encType&&(i=e.encType===pt)}r.forEach((e=>{const s=i?e[0]>>>1&63:31&e[0];(i&&(s===Lt||s===Dt)||da(i)&&s===St)&&this.player.emit(Xe.videoSEI,{ts:t,data:e})}))}handleRecording(e,t,i,s,r){if(this.player.isRecordTypeFlv()){const s=new Uint8Array(e);t===Pe?this.player.recorder.addVideo(s,i):t===Ie&&this.player.recorder.addAudio(s,i)}else if(this.player.isRecordTypeMp4()){const a=new Uint8Array(e);if(this.player.recorder.isWasmMp4()){if(t===Pe)this.player.recorder.handleAddNaluTrack(a.slice(5),s,i,r);else if(t===Ie){const t=new Uint8Array(e);this.player.recorder.handleAddAudioTrack(Gs(t)?t.slice(2):t.slice(1),i)}}else t===Pe&&this.player.recorder.handleAddNaluTrack(a.slice(5),s,i,r)}}updateNalUnitSize(e){const t=15&e[0];this.player.video.updateVideoInfo({encTypeCode:t});const i=t===ct;this.nalUnitSize=function(e,t){let i=null;return t?e.length>=28&&(i=1+(3&e[26])):e.length>=12&&(i=1+(3&e[9])),i}(e,i),this.player.debug.log(this.TAG_NAME,`demux() isVideoSequenceHeader is true and isHevc is ${i} and nalUnitSize is ${this.nalUnitSize}`)}cryptoPayload(e,t){let i=e,s=this.player;if(s._opt.isM7sCrypto)if(s._opt.cryptoKey&&s._opt.cryptoKey.byteLength>0&&s._opt.cryptoIV&&s._opt.cryptoIV.byteLength>0){const t=this.player.video.getVideoInfo();t.encTypeCode?i=function(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t=new Uint8Array(t),i=new Uint8Array(i);const r=e.byteLength;let a=5;for(;ar)break;let n=e[a+4],l=!1;if(s?(n=n>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(n)):(n&=31,l=1===n||5===n),l){const s=e.slice(a+4+2,a+4+o);let r=new il.ModeOfOperation.ctr(t,new il.Counter(i));const n=r.decrypt(s);r=null,e.set(n,a+4+2)}a=a+4+o}return e}(e,s._opt.cryptoKey,s._opt.cryptoIV,t.encTypeCode===ct):s.debug.warn(this.TAG_NAME,`videoInfo.encTypeCode is ${t.encTypeCode}`)}else s.debug.error(this.TAG_NAME,`isM7sCrypto cryptoKey.length is ${s._opt.cryptoKey&&s._opt.cryptoKey.byteLength} or cryptoIV.length is ${s._opt.cryptoIV&&s._opt.cryptoIV.byteLength} null`);else if(s._opt.isSm4Crypto)s._opt.sm4CryptoKey&&t?i=function(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=e.byteLength;let r=5;for(;rs)break;let o=e[r+4],n=!1;if(i?(o=o>>>1&63,n=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(o)):(o&=31,n=1===o||5===o),n){const i=yl(e.slice(r+4+2,r+4+a),t,0,{padding:"none",output:"array"});e.set(i,r+4+2)}r=r+4+a}return e}(e,s._opt.sm4CryptoKey):s._opt.sm4CryptoKey||s.debug.error(this.TAG_NAME,"isSm4Crypto opt.sm4CryptoKey is null");else if(s._opt.isXorCrypto)if(s._opt.cryptoKey&&s._opt.cryptoKey.byteLength>0&&s._opt.cryptoIV&&s._opt.cryptoIV.byteLength>0){const t=this.player.video.getVideoInfo();i=function(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=e.byteLength;let a=5;for(;ar)break;let n=e[a+4],l=!1;if(s?(n=n>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(n)):(n&=31,l=1===n||5===n),l){const s=bl(e.slice(a+4,a+4+o),t,i);e.set(s,a+4)}a=a+4+o}return e}(e,s._opt.cryptoKey,s._opt.cryptoIV,t.encTypeCode===ct)}else s.debug.error(this.TAG_NAME,"isXorCrypto opt.xorCryptoKey is null");return i}cryptoPayloadAudio(e){let t=e,i=this.player;if(i._opt.isM7sCrypto)if(i._opt.cryptoKey&&i._opt.cryptoKey.byteLength>0&&i._opt.cryptoIV&&i._opt.cryptoIV.byteLength>0){e[0]>>4===ft&&(t=function(e,t,i){if(e.byteLength<=30)return e;const s=e.slice(32);let r=new il.ModeOfOperation.ctr(t,new il.Counter(i));const a=r.decrypt(s);return r=null,e.set(a,32),e}(e,i._opt.cryptoKey,i._opt.cryptoIV))}else i.debug.error(this.TAG_NAME,`isM7sCrypto cryptoKey.length is ${i._opt.cryptoKey&&i._opt.cryptoKey.byteLength} or cryptoIV.length is ${i._opt.cryptoIV&&i._opt.cryptoIV.byteLength} null`);return t}_decodeEnhancedH265Video(e,t){const i=e[0],s=48&i,r=15&i,a=e.slice(1,5),o=new ArrayBuffer(4),n=new Uint32Array(o),l="a"==String.fromCharCode(a[0]);if(r===Is){if(s===Ms){const t=e.slice(5);if(l);else{const e=new Uint8Array(5+t.length);e.set([28,0,0,0,0],0),e.set(t,5),this.updateNalUnitSize(e),this.player.debug.log(this.TAG_NAME,`demux() isVideoSequenceHeader(enhancedH265) is true and nalUnitSize is ${this.nalUnitSize}`),this._doDecode(e,Pe,0,!0,0)}}}else if(r===Ps){let i=e,r=0;const a=s===Ms;if(a&&this.calcIframeIntervalTimestamp(t),l);else{n[0]=e[4],n[1]=e[3],n[2]=e[2],n[3]=0,r=n[0];i=Mo(e.slice(8),a),i=this.cryptoPayload(i,a),this._doDecode(i,Pe,t,a,r)}}else if(r===Bs){const i=s===Ms,r=e.slice(5);i&&this.calcIframeIntervalTimestamp(t);let a=Mo(r,i);a=this.cryptoPayload(a,i),this._doDecode(a,Pe,t,i,0)}}_isEnhancedH265Header(e){return 128==(128&e)}}var wl=function(e,t,i,s){return new(i||(i=Promise))((function(r,a){function o(e){try{l(s.next(e))}catch(e){a(e)}}function n(e){try{l(s.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,n)}l((s=s.apply(e,t||[])).next())}))};const Sl=Symbol(32),Tl=Symbol(16),El=Symbol(8);class kl{constructor(e){this.g=e,this.consumed=0,e&&(this.need=e.next().value)}setG(e){this.g=e,this.demand(e.next().value,!0)}consume(){this.buffer&&this.consumed&&(this.buffer.copyWithin(0,this.consumed),this.buffer=this.buffer.subarray(0,this.buffer.length-this.consumed),this.consumed=0)}demand(e,t){return t&&this.consume(),this.need=e,this.flush()}read(e){return wl(this,void 0,void 0,(function*(){return this.lastReadPromise&&(yield this.lastReadPromise),this.lastReadPromise=new Promise(((t,i)=>{var s;this.reject=i,this.resolve=e=>{delete this.lastReadPromise,delete this.resolve,delete this.need,t(e)};this.demand(e,!0)||null===(s=this.pull)||void 0===s||s.call(this,e)}))}))}readU32(){return this.read(Sl)}readU16(){return this.read(Tl)}readU8(){return this.read(El)}close(){var e;this.g&&this.g.return(),this.buffer&&this.buffer.subarray(0,0),null===(e=this.reject)||void 0===e||e.call(this,new Error("EOF")),delete this.lastReadPromise}flush(){if(!this.buffer||!this.need)return;let e=null;const t=this.buffer.subarray(this.consumed);let i=0;const s=e=>t.length<(i=e);if("number"==typeof this.need){if(s(this.need))return;e=t.subarray(0,i)}else if(this.need===Sl){if(s(4))return;e=t[0]<<24|t[1]<<16|t[2]<<8|t[3]}else if(this.need===Tl){if(s(2))return;e=t[0]<<8|t[1]}else if(this.need===El){if(s(1))return;e=t[0]}else if("buffer"in this.need){if("byteOffset"in this.need){if(s(this.need.byteLength-this.need.byteOffset))return;new Uint8Array(this.need.buffer,this.need.byteOffset).set(t.subarray(0,i)),e=this.need}else if(this.g)return void this.g.throw(new Error("Unsupported type"))}else{if(s(this.need.byteLength))return;new Uint8Array(this.need).set(t.subarray(0,i)),e=this.need}return this.consumed+=i,this.g?this.demand(this.g.next(e).value,!0):this.resolve&&this.resolve(e),e}write(e){if(e instanceof Uint8Array?this.malloc(e.length).set(e):"buffer"in e?this.malloc(e.byteLength).set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):this.malloc(e.byteLength).set(new Uint8Array(e)),!this.g&&!this.resolve)return new Promise((e=>this.pull=e));this.flush()}writeU32(e){this.malloc(4).set([e>>24&255,e>>16&255,e>>8&255,255&e]),this.flush()}writeU16(e){this.malloc(2).set([e>>8&255,255&e]),this.flush()}writeU8(e){this.malloc(1)[0]=e,this.flush()}malloc(e){if(this.buffer){const t=this.buffer.length,i=t+e;if(i<=this.buffer.buffer.byteLength-this.buffer.byteOffset)this.buffer=new Uint8Array(this.buffer.buffer,this.buffer.byteOffset,i);else{const e=new Uint8Array(i);e.set(this.buffer),this.buffer=e}return this.buffer.subarray(t,i)}return this.buffer=new Uint8Array(e),this.buffer}}kl.U32=Sl,kl.U16=Tl,kl.U8=El;class Cl extends _l{constructor(e){super(e),this.TAG_NAME="FlvDemux",this.input=new kl(this.demux()),e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.input=null,this.player.debug.log(this.TAG_NAME,"destroy")}dispatch(e){this.input?this.input.write(e):this.player&&this.player.debug.warn(this.TAG_NAME,"dispatch() this.input is null")}*demux(){yield 9;const e=new ArrayBuffer(4),t=new Uint8Array(e),i=new Uint32Array(e),s=this.player;for(;;){if(!this.input)return;t[3]=0;const e=yield 15,r=e[4];t[0]=e[7],t[1]=e[6],t[2]=e[5];const a=i[0];t[0]=e[10],t[1]=e[9],t[2]=e[8],t[3]=e[11];let o=i[0];const n=(yield a).slice();if(!s)return;switch(r){case Be:if(s._opt.hasAudio&&(s.updateStats({abps:n.byteLength}),n.byteLength>0)){let e=n;ha(this.player._opt.m7sCryptoAudio)&&(e=this.cryptoPayloadAudio(n)),this._doDecode(e,Ie,o)}break;case Me:if(s._opt.hasVideo&&n.length>=6){let e=o;s.updateStats({vbps:n.byteLength,dts:e}),s._times.demuxStart||(s._times.demuxStart=sr());const t=n[0];if(this._isEnhancedH265Header(t))this._decodeEnhancedH265Video(n,e);else{const e=15&t,s=(t>>4&15)===os;if(da(e===ct||e===dt))return void this.player.debug.warn(this.TAG_NAME,`demux() codecId is ${e} and ignore`);s&&(this.calcIframeIntervalTimestamp(o),null===this.nalUnitSize&&la(n)&&this.updateNalUnitSize(n)),i[0]=n[4],i[1]=n[3],i[2]=n[2],i[3]=0;let r=i[0],a=this.cryptoPayload(n,s);this._doDecode(a,Pe,o,s,r)}}else n.length<6&&s.debug.warn(this.TAG_NAME,`payload.length is ${n.length} less than 6 and ignore`);break;case Ue:if(this.player.isRecordTypeFlv()){const e=new Uint8Array(n);this.player.recorder.addMetaData(e)}const e=Xo(n);e&&e.onMetaData&&s.updateMetaData(e.onMetaData);break;default:s.debug.log(this.TAG_NAME,`demux() type is ${r}`)}}}close(){this.input=null}getInputByteLength(){let e=0;return this.input&&this.input.buffer&&(e=this.input.buffer.byteLength),e}hasUnitTypeIDR(e,t){const i=Do(e.slice(5));let s=!1;return i.forEach((e=>{const i=t?e[0]>>>1&63:31&e[0];(t&&(i===Tt||i===Et)||da(t)&&i===wt)&&(s=!0)})),s}}class Rl extends _l{constructor(e){super(e),this.TAG_NAME="M7sDemux",e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}dispatch(e){const t=this.player,i=new DataView(e),s=i.getUint8(0),r=i.getUint32(1,!1),a=new ArrayBuffer(4),o=new Uint32Array(a);switch(s){case Ie:if(t._opt.hasAudio){const i=new Uint8Array(e,5);t.updateStats({abps:i.byteLength}),i.byteLength>0&&this._doDecode(i,s,r)}break;case Pe:if(t._opt.hasVideo)if(t._times.demuxStart||(t._times.demuxStart=sr()),i.byteLength>=11){const a=new Uint8Array(e,5);let n=r;t.updateStats({vbps:a.byteLength,dts:n});const l=a[0];if(this._isEnhancedH265Header(l))this._decodeEnhancedH265Video(a,r);else{const e=i.getUint8(5)>>4==1;e&&this.calcIframeIntervalTimestamp(r),o[0]=a[4],o[1]=a[3],o[2]=a[2],o[3]=0;let t=o[0],n=this.cryptoPayload(a,e);this._doDecode(n,s,r,e,t)}}else this.player.debug.warn(this.TAG_NAME,"dispatch","dv byteLength is",i.byteLength,"and return")}}}class xl extends Cl{constructor(e){super(e),e.debug.log("WebTransportDemux","init")}destroy(){this.player.debug.log("WebTransportDemux","destroy"),super.destroy()}}var Dl,Ll=Os((function(e){e.exports=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},e.exports.__esModule=!0,e.exports.default=e.exports})),Il=(Dl=Ll)&&Dl.__esModule&&Object.prototype.hasOwnProperty.call(Dl,"default")?Dl.default:Dl;class Pl extends _l{constructor(e){super(e),Il(this,"TAG_NAME","NakedFlowDemux"),this.lastBuf=null,this.vps=null,this.sps=null,this.pps=null,this.streamVideoType=null,this.streamAudioType=null,this.tempNaluBufferList=new Uint8Array(0),this.localDts=0,this.isSendSeqHeader=!1,this.isSendAACSeqHeader=!1,e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.lastBuf=null,this.vps=null,this.sps=null,this.pps=null,this.streamVideoType=null,this.streamAudioType=null,this.tempNaluBufferList=new Uint8Array(0),this.localDts=0,this.localAudioDts=0,this.isSendSeqHeader=!1,this.isSendAACSeqHeader=!1,this.player.debug.log(this.TAG_NAME,"destroy")}dispatch(e){this.player;const t=new Uint8Array(e);this.extractNALu$2(t)}addNaluToBuffer(e){const t=e.byteLength+this.tempNaluBufferList.byteLength,i=new Uint8Array(t);i.set(this.tempNaluBufferList,0),i.set(e,this.tempNaluBufferList.byteLength),this.tempNaluBufferList=i}downloadNakedFlowFile(){const e=new Blob([this.tempNaluBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".h264",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadTempNalu",e)}}getNaluDts(){const e=this.player._opt.nakedFlowFps;return this.localDts=this.localDts+parseInt(1e3/e),this.localDts}getNaluAudioDts(){const e=this.player.audio.audioContext.sampleRate,t=this.player.audio.audioBufferSize;return this.localDts+parseInt(t/e*1e3)}extractNALu(e){let t,i,s=0,r=e.byteLength,a=0,o=[];for(;s1)for(let e=0;e>1,i!==kt&&i!==Ct&&i!==Rt||(t=pt)),t}(t)),this.streamVideoType===ut){const e=this.handleAddNaluStartCode(t),i=this.extractNALu(e);if(0===i.length)return void this.player.debug.warn(this.TAG_NAME,"handleVideoNalu","naluList.length === 0");const s=[];if(i.forEach((e=>{const t=So(e);t===_t||t===vt?this.handleVideoH264Nalu(e):Eo(t)&&s.push(e)})),1===s.length)this.handleVideoH264Nalu(s[0]);else{const e=function(e){if(0===e.length)return!1;const t=So(e[0]);for(let i=1;i{this.handleVideoH264Nalu(e)}))}}else if(this.streamVideoType===pt)if(this.player._opt.nakedFlowH265DemuxUseNew){const e=this.handleAddNaluStartCode(t),i=this.extractNALu(e);if(0===i.length)return void this.player.debug.warn(this.TAG_NAME,"handleVideoNalu","h265 naluList.length === 0");const s=[];if(i.forEach((e=>{const t=Uo(e);t===Rt||t===Ct||t===kt?this.handleVideoH265Nalu(e):Fo(t)&&s.push(e)})),1===s.length)this.handleVideoH265Nalu(s[0]);else{const e=function(e){if(0===e.length)return!1;const t=Uo(e[0]);for(let i=1;i{this.handleVideoH265Nalu(e)}))}}else{Uo(t)===Rt?this.extractH265PPS(t):this.handleVideoH265Nalu(t)}else this.player.debug.error(this.TAG_NAME," this.streamVideoType is null")}extractH264PPS(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{To(So(e))?this.extractH264SEI(e):this.handleVideoH264Nalu(e)}))}extractH265PPS(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{const t=Uo(e);t===xt?this.extractH265SEI(e):this.handleVideoH265Nalu(e)}))}extractH264SEI(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{this.handleVideoH264Nalu(e)}))}extractH265SEI(e){const t=this.handleAddNaluStartCode(e);this.extractNALu(t).forEach((e=>{this.handleVideoH265Nalu(e)}))}handleAddNaluStartCode(e){const t=[0,0,0,1],i=new Uint8Array(e.length+t.length);return i.set(t),i.set(e,t.length),i}handleAudioAACNalu(e){if(!e||e.byteLength<1)return;this.streamAudioType||(this.streamAudioType=At.AAC);let t=new Uint8Array(e);const i=t.slice(0,7);if(t=t.slice(7),!this.isSendAACSeqHeader){const e=(192&i[2])>>6,t=(60&i[2])>>2,s=(1&i[2])<<2|(192&i[3])>>6,r=new Uint8Array([175,0,e<<3|(14&t)>>1,(1&t)<<7|s<<3]);this.isSendAACSeqHeader=!0,this._doDecode(r,Ie,0,!1,0)}const s=this.getNaluAudioDts(),r=new Uint8Array(t.length+2);r.set([175,1],0),r.set(t,2),this._doDecode(r,Ie,s,!1,0)}handleAudioG711ANalu(e){if(!e||e.byteLength<1)return;this.streamAudioType||(this.streamAudioType=At.ALAW);let t=new Uint8Array(e);const i=this.getNaluAudioDts(),s=new Uint8Array(t.length+1);s.set([114],0),s.set(t,1),this._doDecode(s,Ie,i,!1,0)}handleAudioG711UNalu(e){if(!e||e.byteLength<1)return;this.streamAudioType||(this.streamAudioType=At.MULAW);let t=new Uint8Array(e);const i=this.getNaluAudioDts(),s=new Uint8Array(t.length+1);s.set([130],0),s.set(t,1),this._doDecode(s,Ie,i,!1,0)}handleVideoH264Nalu(e){const t=So(e);switch(t){case vt:this.sps=e;break;case _t:this.pps=e}if(this.isSendSeqHeader){if(this.sps&&this.pps){const e=_o({sps:this.sps,pps:this.pps}),t=this.getNaluDts();this._doDecode(e,Pe,t,!0,0),this.sps=null,this.pps=null}if(Eo(t)){this.player._times.demuxStart||(this.player._times.demuxStart=sr());const i=ko(t),s=this.getNaluDts(),r=function(e,t){let i=[];i[0]=t?23:39,i[1]=1,i[2]=0,i[3]=0,i[4]=0,i[5]=e.byteLength>>24&255,i[6]=e.byteLength>>16&255,i[7]=e.byteLength>>8&255,i[8]=255&e.byteLength;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}(e,i);this._preDoDecode(r,Pe,s,i,0)}else this.player.debug.warn(this.TAG_NAME,`handleVideoH264Nalu is avc seq head nalType is ${t}`)}else if(this.sps&&this.pps){this.isSendSeqHeader=!0;const e=_o({sps:this.sps,pps:this.pps});this._doDecode(e,Pe,0,!0,0),this.sps=null,this.pps=null}}handleVideoH264NaluList(e,t,i){if(this.isSendSeqHeader){this.player._times.demuxStart||(this.player._times.demuxStart=sr());const i=this.getNaluDts(),s=wo(e.reduce(((e,t)=>{const i=Lo(e),s=Lo(t),r=new Uint8Array(i.byteLength+s.byteLength);return r.set(i,0),r.set(s,i.byteLength),r})),t);this._preDoDecode(s,Pe,i,t,0)}else this.player.debug.warn(this.TAG_NAME,"handleVideoH264NaluList isSendSeqHeader is false")}handleVideoH265Nalu(e){const t=Uo(e);switch(t){case kt:this.vps=e;break;case Ct:this.sps=e;break;case Rt:this.pps=e}if(this.isSendSeqHeader){if(this.vps&&this.sps&&this.pps){const e=Bo({vps:this.vps,sps:this.sps,pps:this.pps}),t=this.getNaluDts();this._doDecode(e,Pe,t,!0,0),this.vps=null,this.sps=null,this.pps=null}if(Fo(t)){this.player._times.demuxStart||(this.player._times.demuxStart=sr());const i=Oo(t),s=this.getNaluDts(),r=function(e,t){let i=[];i[0]=t?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0,i[5]=e.byteLength>>24&255,i[6]=e.byteLength>>16&255,i[7]=e.byteLength>>8&255,i[8]=255&e.byteLength;const s=new Uint8Array(i.length+e.byteLength);return s.set(i,0),s.set(e,i.length),s}(e,i);this._preDoDecode(r,Pe,s,i,0)}}else if(this.vps&&this.sps&&this.pps){this.isSendSeqHeader=!0;const e=Bo({vps:this.vps,sps:this.sps,pps:this.pps});this._doDecode(e,Pe,0,!0,0),this.vps=null,this.sps=null,this.pps=null}}handleVideoH265NaluList(e,t,i){if(this.isSendSeqHeader){this.player._times.demuxStart||(this.player._times.demuxStart=sr());const i=this.getNaluDts(),s=Mo(e.reduce(((e,t)=>{const i=Lo(e),s=Lo(t),r=new Uint8Array(i.byteLength+s.byteLength);return r.set(i,0),r.set(s,i.byteLength),r})),t);this._preDoDecode(s,Pe,i,t,0)}else this.player.debug.warn(this.TAG_NAME,"handleVideoH265NaluList isSendSeqHeader is false")}_preDoDecode(e,t,i,s,r){this.player.updateStats({vbps:e.byteLength,dts:i}),s&&this.calcIframeIntervalTimestamp(i),this._doDecode(e,Pe,i,s,r)}getInputByteLength(){let e=0;return this.lastBuf&&(e=this.lastBuf.byteLength),e}}class Bl extends _l{constructor(e){super(e),this.player=e,e.debug.log("EmptyDemux","init")}destroy(){super.destroy(),this.player.debug.log("EmptyDemux","destroy")}}var Ml=Os((function(e,t){var s,r,a,o=(s=new Date,r=4,a={setLogLevel:function(e){r=e==this.debug?1:e==this.info?2:e==this.warn?3:(this.error,4)},debug:function(e,t){void 0===console.debug&&(console.debug=console.log),1>=r&&console.debug("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)},log:function(e,t){this.debug(e.msg)},info:function(e,t){2>=r&&console.info("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)},warn:function(e,t){3>=r&&console.warn("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)},error:function(e,t){4>=r&&console.error("["+o.getDurationString(new Date-s,1e3)+"]","["+e+"]",t)}},a);o.getDurationString=function(e,t){var i;function s(e,t){for(var i=(""+e).split(".");i[0].length0){for(var i="",s=0;s0&&(i+=","),i+="["+o.getDurationString(e.start(s))+","+o.getDurationString(e.end(s))+"]";return i}return"(empty)"},t.Log=o;var n=function(e){if(!(e instanceof ArrayBuffer))throw"Needs an array buffer";this.buffer=e,this.dataview=new DataView(e),this.position=0};n.prototype.getPosition=function(){return this.position},n.prototype.getEndPosition=function(){return this.buffer.byteLength},n.prototype.getLength=function(){return this.buffer.byteLength},n.prototype.seek=function(e){var t=Math.max(0,Math.min(this.buffer.byteLength,e));return this.position=isNaN(t)||!isFinite(t)?0:t,!0},n.prototype.isEos=function(){return this.getPosition()>=this.getEndPosition()},n.prototype.readAnyInt=function(e,t){var i=0;if(this.position+e<=this.buffer.byteLength){switch(e){case 1:i=t?this.dataview.getInt8(this.position):this.dataview.getUint8(this.position);break;case 2:i=t?this.dataview.getInt16(this.position):this.dataview.getUint16(this.position);break;case 3:if(t)throw"No method for reading signed 24 bits values";i=this.dataview.getUint8(this.position)<<16,i|=this.dataview.getUint8(this.position+1)<<8,i|=this.dataview.getUint8(this.position+2);break;case 4:i=t?this.dataview.getInt32(this.position):this.dataview.getUint32(this.position);break;case 8:if(t)throw"No method for reading signed 64 bits values";i=this.dataview.getUint32(this.position)<<32,i|=this.dataview.getUint32(this.position+4);break;default:throw"readInt method not implemented for size: "+e}return this.position+=e,i}throw"Not enough bytes in buffer"},n.prototype.readUint8=function(){return this.readAnyInt(1,!1)},n.prototype.readUint16=function(){return this.readAnyInt(2,!1)},n.prototype.readUint24=function(){return this.readAnyInt(3,!1)},n.prototype.readUint32=function(){return this.readAnyInt(4,!1)},n.prototype.readUint64=function(){return this.readAnyInt(8,!1)},n.prototype.readString=function(e){if(this.position+e<=this.buffer.byteLength){for(var t="",i=0;ithis._byteLength&&(this._byteLength=t);else{for(i<1&&(i=1);t>i;)i*=2;var s=new ArrayBuffer(i),r=new Uint8Array(this._buffer);new Uint8Array(s,0,r.length).set(r),this.buffer=s,this._byteLength=t}}},l.prototype._trimAlloc=function(){if(this._byteLength!=this._buffer.byteLength){var e=new ArrayBuffer(this._byteLength),t=new Uint8Array(e),i=new Uint8Array(this._buffer,0,t.length);t.set(i),this.buffer=e}},l.BIG_ENDIAN=!1,l.LITTLE_ENDIAN=!0,l.prototype._byteLength=0,Object.defineProperty(l.prototype,"byteLength",{get:function(){return this._byteLength-this._byteOffset}}),Object.defineProperty(l.prototype,"buffer",{get:function(){return this._trimAlloc(),this._buffer},set:function(e){this._buffer=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"byteOffset",{get:function(){return this._byteOffset},set:function(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}}),Object.defineProperty(l.prototype,"dataView",{get:function(){return this._dataView},set:function(e){this._byteOffset=e.byteOffset,this._buffer=e.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}}),l.prototype.seek=function(e){var t=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(t)||!isFinite(t)?0:t},l.prototype.isEof=function(){return this.position>=this._byteLength},l.prototype.mapUint8Array=function(e){this._realloc(1*e);var t=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.readInt32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Int32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Int16Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Int8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readUint32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Uint32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readUint16Array=function(e,t){e=null==e?this.byteLength-this.position/2:e;var i=new Uint16Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readUint8Array=function(e){e=null==e?this.byteLength-this.position:e;var t=new Uint8Array(e);return l.memcpy(t.buffer,0,this.buffer,this.byteOffset+this.position,e*t.BYTES_PER_ELEMENT),this.position+=t.byteLength,t},l.prototype.readFloat64Array=function(e,t){e=null==e?this.byteLength-this.position/8:e;var i=new Float64Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readFloat32Array=function(e,t){e=null==e?this.byteLength-this.position/4:e;var i=new Float32Array(e);return l.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),l.arrayToNative(i,null==t?this.endianness:t),this.position+=i.byteLength,i},l.prototype.readInt32=function(e){var t=this._dataView.getInt32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readInt16=function(e){var t=this._dataView.getInt16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readInt8=function(){var e=this._dataView.getInt8(this.position);return this.position+=1,e},l.prototype.readUint32=function(e){var t=this._dataView.getUint32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readUint16=function(e){var t=this._dataView.getUint16(this.position,null==e?this.endianness:e);return this.position+=2,t},l.prototype.readUint8=function(){var e=this._dataView.getUint8(this.position);return this.position+=1,e},l.prototype.readFloat32=function(e){var t=this._dataView.getFloat32(this.position,null==e?this.endianness:e);return this.position+=4,t},l.prototype.readFloat64=function(e){var t=this._dataView.getFloat64(this.position,null==e?this.endianness:e);return this.position+=8,t},l.endianness=new Int8Array(new Int16Array([1]).buffer)[0]>0,l.memcpy=function(e,t,i,s,r){var a=new Uint8Array(e,t,r),o=new Uint8Array(i,s,r);a.set(o)},l.arrayToNative=function(e,t){return t==this.endianness?e:this.flipArrayEndianness(e)},l.nativeToEndian=function(e,t){return this.endianness==t?e:this.flipArrayEndianness(e)},l.flipArrayEndianness=function(e){for(var t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i=0;ir;s--,r++){var a=t[r];t[r]=t[s],t[s]=a}return e},l.prototype.failurePosition=0,String.fromCharCodeUint8=function(e){for(var t=[],i=0;i>16),this.writeUint8((65280&e)>>8),this.writeUint8(255&e)},l.prototype.adjustUint32=function(e,t){var i=this.position;this.seek(e),this.writeUint32(t),this.seek(i)},l.prototype.mapInt32Array=function(e,t){this._realloc(4*e);var i=new Int32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},l.prototype.mapInt16Array=function(e,t){this._realloc(2*e);var i=new Int16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},l.prototype.mapInt8Array=function(e){this._realloc(1*e);var t=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=1*e,t},l.prototype.mapUint32Array=function(e,t){this._realloc(4*e);var i=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i},l.prototype.mapUint16Array=function(e,t){this._realloc(2*e);var i=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=2*e,i},l.prototype.mapFloat64Array=function(e,t){this._realloc(8*e);var i=new Float64Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=8*e,i},l.prototype.mapFloat32Array=function(e,t){this._realloc(4*e);var i=new Float32Array(this._buffer,this.byteOffset+this.position,e);return l.arrayToNative(i,null==t?this.endianness:t),this.position+=4*e,i};var d=function(e){this.buffers=[],this.bufferIndex=-1,e&&(this.insertBuffer(e),this.bufferIndex=0)};(d.prototype=new l(new ArrayBuffer,0,l.BIG_ENDIAN)).initialized=function(){var e;return this.bufferIndex>-1||(this.buffers.length>0?0===(e=this.buffers[0]).fileStart?(this.buffer=e,this.bufferIndex=0,o.debug("MultiBufferStream","Stream ready for parsing"),!0):(o.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1):(o.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1))},ArrayBuffer.concat=function(e,t){o.debug("ArrayBuffer","Trying to create a new buffer of size: "+(e.byteLength+t.byteLength));var i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),e.byteLength),i.buffer},d.prototype.reduceBuffer=function(e,t,i){var s;return(s=new Uint8Array(i)).set(new Uint8Array(e,t,i)),s.buffer.fileStart=e.fileStart+t,s.buffer.usedBytes=0,s.buffer},d.prototype.insertBuffer=function(e){for(var t=!0,i=0;is.byteLength){this.buffers.splice(i,1),i--;continue}o.warn("MultiBufferStream","Buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+") already appended, ignoring")}else e.fileStart+e.byteLength<=s.fileStart||(e=this.reduceBuffer(e,0,s.fileStart-e.fileStart)),o.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.splice(i,0,e),0===i&&(this.buffer=e);t=!1;break}if(e.fileStart0)){t=!1;break}e=this.reduceBuffer(e,r,a)}}t&&(o.debug("MultiBufferStream","Appending new buffer (fileStart: "+e.fileStart+" - Length: "+e.byteLength+")"),this.buffers.push(e),0===i&&(this.buffer=e))},d.prototype.logBufferLevel=function(e){var t,i,s,r,a,n=[],l="";for(s=0,r=0,t=0;t0&&(l+=a.end-1+"]");var h=e?o.info:o.debug;0===this.buffers.length?h("MultiBufferStream","No more buffer in memory"):h("MultiBufferStream",this.buffers.length+" stored buffer(s) ("+s+"/"+r+" bytes), continuous ranges: "+l)},d.prototype.cleanBuffers=function(){var e,t;for(e=0;e"+this.buffer.byteLength+")"),!0}return!1}return!1},d.prototype.findPosition=function(e,t,i){var s,r=null,a=-1;for(s=!0===e?0:this.bufferIndex;s=t?(o.debug("MultiBufferStream","Found position in existing buffer #"+a),a):-1},d.prototype.findEndContiguousBuf=function(e){var t,i,s,r=void 0!==e?e:this.bufferIndex;if(i=this.buffers[r],this.buffers.length>r+1)for(t=r+1;t>3;return 31===s&&i.data.length>=2&&(s=32+((7&i.data[0])<<3)+((224&i.data[1])>>5)),s}return null},i.DecoderConfigDescriptor=function(e){i.Descriptor.call(this,4,e)},i.DecoderConfigDescriptor.prototype=new i.Descriptor,i.DecoderConfigDescriptor.prototype.parse=function(e){this.oti=e.readUint8(),this.streamType=e.readUint8(),this.upStream=0!=(this.streamType>>1&1),this.streamType=this.streamType>>>2,this.bufferSize=e.readUint24(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32(),this.size-=13,this.parseRemainingDescriptors(e)},i.DecoderSpecificInfo=function(e){i.Descriptor.call(this,5,e)},i.DecoderSpecificInfo.prototype=new i.Descriptor,i.SLConfigDescriptor=function(e){i.Descriptor.call(this,6,e)},i.SLConfigDescriptor.prototype=new i.Descriptor,this};t.MPEG4DescriptorParser=c;var u={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:["mdat","idat","free","skip","meco","strk"],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml","ipro","mere"],CONTAINER_BOXES:[["moov",["trak","pssh"]],["trak"],["edts"],["mdia"],["minf"],["dinf"],["stbl",["sgpd","sbgp"]],["mvex",["trex"]],["moof",["traf"]],["traf",["trun","sgpd","sbgp"]],["vttc"],["tref"],["iref"],["mfra",["tfra"]],["meco"],["hnti"],["hinf"],["strk"],["strd"],["sinf"],["rinf"],["schi"],["trgr"],["udta",["kind"]],["iprp",["ipma"]],["ipco"],["grpl"],["j2kH"],["etyp",["tyco"]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){u.FullBox.prototype=new u.Box,u.ContainerBox.prototype=new u.Box,u.SampleEntry.prototype=new u.Box,u.TrackGroupTypeBox.prototype=new u.FullBox,u.BASIC_BOXES.forEach((function(e){u.createBoxCtor(e)})),u.FULL_BOXES.forEach((function(e){u.createFullBoxCtor(e)})),u.CONTAINER_BOXES.forEach((function(e){u.createContainerBoxCtor(e[0],null,e[1])}))},Box:function(e,t,i){this.type=e,this.size=t,this.uuid=i},FullBox:function(e,t,i){u.Box.call(this,e,t,i),this.flags=0,this.version=0},ContainerBox:function(e,t,i){u.Box.call(this,e,t,i),this.boxes=[]},SampleEntry:function(e,t,i,s){u.ContainerBox.call(this,e,t),this.hdr_size=i,this.start=s},SampleGroupEntry:function(e){this.grouping_type=e},TrackGroupTypeBox:function(e,t){u.FullBox.call(this,e,t)},createBoxCtor:function(e,t){u.boxCodes.push(e),u[e+"Box"]=function(t){u.Box.call(this,e,t)},u[e+"Box"].prototype=new u.Box,t&&(u[e+"Box"].prototype.parse=t)},createFullBoxCtor:function(e,t){u[e+"Box"]=function(t){u.FullBox.call(this,e,t)},u[e+"Box"].prototype=new u.FullBox,u[e+"Box"].prototype.parse=function(e){this.parseFullHeader(e),t&&t.call(this,e)}},addSubBoxArrays:function(e){if(e){this.subBoxNames=e;for(var t=e.length,i=0;ii?(o.error("BoxParser","Box of type '"+d+"' has a size "+h+" greater than its container size "+i),{code:u.ERR_NOT_ENOUGH_DATA,type:d,size:h,hdr_size:l,start:n}):0!==h&&n+h>e.getEndPosition()?(e.seek(n),o.info("BoxParser","Not enough data in stream to parse the entire '"+d+"' box"),{code:u.ERR_NOT_ENOUGH_DATA,type:d,size:h,hdr_size:l,start:n}):t?{code:u.OK,type:d,size:h,hdr_size:l,start:n}:(u[d+"Box"]?s=new u[d+"Box"](h):"uuid"!==d?(o.warn("BoxParser","Unknown box type: '"+d+"'"),(s=new u.Box(d,h)).has_unparsed_data=!0):u.UUIDBoxes[a]?s=new u.UUIDBoxes[a](h):(o.warn("BoxParser","Unknown uuid type: '"+a+"'"),(s=new u.Box(d,h)).uuid=a,s.has_unparsed_data=!0),s.hdr_size=l,s.start=n,s.write===u.Box.prototype.write&&"mdat"!==s.type&&(o.info("BoxParser","'"+c+"' box writing not yet implemented, keeping unparsed data in memory for later write"),s.parseDataAndRewind(e)),s.parse(e),(r=e.getPosition()-(s.start+s.size))<0?(o.warn("BoxParser","Parsing of box '"+c+"' did not read the entire indicated box data size (missing "+-r+" bytes), seeking forward"),e.seek(s.start+s.size)):r>0&&(o.error("BoxParser","Parsing of box '"+c+"' read "+r+" more bytes than the indicated box data size, seeking backwards"),0!==s.size&&e.seek(s.start+s.size)),{code:u.OK,box:s,size:s.size})},u.Box.prototype.parse=function(e){"mdat"!=this.type?this.data=e.readUint8Array(this.size-this.hdr_size):0===this.size?e.seek(e.getEndPosition()):e.seek(this.start+this.size)},u.Box.prototype.parseDataAndRewind=function(e){this.data=e.readUint8Array(this.size-this.hdr_size),e.position-=this.size-this.hdr_size},u.FullBox.prototype.parseDataAndRewind=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,e.position-=this.size-this.hdr_size},u.FullBox.prototype.parseFullHeader=function(e){this.version=e.readUint8(),this.flags=e.readUint24(),this.hdr_size+=4},u.FullBox.prototype.parse=function(e){this.parseFullHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},u.ContainerBox.prototype.parse=function(e){for(var t,i;e.getPosition()>10&31,t[1]=this.language>>5&31,t[2]=31&this.language,this.languageString=String.fromCharCode(t[0]+96,t[1]+96,t[2]+96)},u.SAMPLE_ENTRY_TYPE_VISUAL="Visual",u.SAMPLE_ENTRY_TYPE_AUDIO="Audio",u.SAMPLE_ENTRY_TYPE_HINT="Hint",u.SAMPLE_ENTRY_TYPE_METADATA="Metadata",u.SAMPLE_ENTRY_TYPE_SUBTITLE="Subtitle",u.SAMPLE_ENTRY_TYPE_SYSTEM="System",u.SAMPLE_ENTRY_TYPE_TEXT="Text",u.SampleEntry.prototype.parseHeader=function(e){e.readUint8Array(6),this.data_reference_index=e.readUint16(),this.hdr_size+=8},u.SampleEntry.prototype.parse=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size)},u.SampleEntry.prototype.parseDataAndRewind=function(e){this.parseHeader(e),this.data=e.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,e.position-=this.size-this.hdr_size},u.SampleEntry.prototype.parseFooter=function(e){u.ContainerBox.prototype.parse.call(this,e)},u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_HINT),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SYSTEM),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_TEXT),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,(function(e){var t;this.parseHeader(e),e.readUint16(),e.readUint16(),e.readUint32Array(3),this.width=e.readUint16(),this.height=e.readUint16(),this.horizresolution=e.readUint32(),this.vertresolution=e.readUint32(),e.readUint32(),this.frame_count=e.readUint16(),t=Math.min(31,e.readUint8()),this.compressorname=e.readString(t),t<31&&e.readString(31-t),this.depth=e.readUint16(),e.readUint16(),this.parseFooter(e)})),u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,(function(e){this.parseHeader(e),e.readUint32Array(2),this.channel_count=e.readUint16(),this.samplesize=e.readUint16(),e.readUint16(),e.readUint16(),this.samplerate=e.readUint32()/65536,this.parseFooter(e)})),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc2"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avc4"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"av01"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"dav1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"hvc1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"hev1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"lhe1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"dvh1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"dvhe"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvc1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvi1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvs1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vvcN"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vp08"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"vp09"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"avs3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"j2ki"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"mjp2"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"mjpg"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"uncv"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mp4a"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"ac-3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"ac-4"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"ec-3"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"Opus"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mha1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mha2"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mhm1"),u.createSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"mhm2"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_VISUAL,"encv"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_AUDIO,"enca"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SUBTITLE,"encu"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_SYSTEM,"encs"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_TEXT,"enct"),u.createEncryptedSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_METADATA,"encm"),u.createBoxCtor("a1lx",(function(e){var t=16*(1+(1&(1&e.readUint8())));this.layer_size=[];for(var i=0;i<3;i++)this.layer_size[i]=16==t?e.readUint16():e.readUint32()})),u.createBoxCtor("a1op",(function(e){this.op_index=e.readUint8()})),u.createFullBoxCtor("auxC",(function(e){this.aux_type=e.readCString();var t=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=e.readUint8Array(t)})),u.createBoxCtor("av1C",(function(e){var t=e.readUint8();if(t>>7&!1)o.error("av1C marker problem");else if(this.version=127&t,1===this.version)if(t=e.readUint8(),this.seq_profile=t>>5&7,this.seq_level_idx_0=31&t,t=e.readUint8(),this.seq_tier_0=t>>7&1,this.high_bitdepth=t>>6&1,this.twelve_bit=t>>5&1,this.monochrome=t>>4&1,this.chroma_subsampling_x=t>>3&1,this.chroma_subsampling_y=t>>2&1,this.chroma_sample_position=3&t,t=e.readUint8(),this.reserved_1=t>>5&7,0===this.reserved_1){if(this.initial_presentation_delay_present=t>>4&1,1===this.initial_presentation_delay_present)this.initial_presentation_delay_minus_one=15&t;else if(this.reserved_2=15&t,0!==this.reserved_2)return void o.error("av1C reserved_2 parsing problem");var i=this.size-this.hdr_size-4;this.configOBUs=e.readUint8Array(i)}else o.error("av1C reserved_1 parsing problem");else o.error("av1C version "+this.version+" not supported")})),u.createBoxCtor("avcC",(function(e){var t,i;for(this.configurationVersion=e.readUint8(),this.AVCProfileIndication=e.readUint8(),this.profile_compatibility=e.readUint8(),this.AVCLevelIndication=e.readUint8(),this.lengthSizeMinusOne=3&e.readUint8(),this.nb_SPS_nalus=31&e.readUint8(),i=this.size-this.hdr_size-6,this.SPS=[],t=0;t0&&(this.ext=e.readUint8Array(i))})),u.createBoxCtor("btrt",(function(e){this.bufferSizeDB=e.readUint32(),this.maxBitrate=e.readUint32(),this.avgBitrate=e.readUint32()})),u.createFullBoxCtor("ccst",(function(e){var t=e.readUint8();this.all_ref_pics_intra=128==(128&t),this.intra_pred_used=64==(64&t),this.max_ref_per_pic=(63&t)>>2,e.readUint24()})),u.createBoxCtor("cdef",(function(e){var t;for(this.channel_count=e.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[],t=0;t=32768&&this.component_type_urls.push(e.readCString())}})),u.createFullBoxCtor("co64",(function(e){var t,i;if(t=e.readUint32(),this.chunk_offsets=[],0===this.version)for(i=0;i>7}else("rICC"===this.colour_type||"prof"===this.colour_type)&&(this.ICC_profile=e.readUint8Array(this.size-4))})),u.createFullBoxCtor("cprt",(function(e){this.parseLanguage(e),this.notice=e.readCString()})),u.createFullBoxCtor("cslg",(function(e){0===this.version&&(this.compositionToDTSShift=e.readInt32(),this.leastDecodeToDisplayDelta=e.readInt32(),this.greatestDecodeToDisplayDelta=e.readInt32(),this.compositionStartTime=e.readInt32(),this.compositionEndTime=e.readInt32())})),u.createFullBoxCtor("ctts",(function(e){var t,i;if(t=e.readUint32(),this.sample_counts=[],this.sample_offsets=[],0===this.version)for(i=0;i>6,this.bsid=t>>1&31,this.bsmod=(1&t)<<2|i>>6&3,this.acmod=i>>3&7,this.lfeon=i>>2&1,this.bit_rate_code=3&i|s>>5&7})),u.createBoxCtor("dec3",(function(e){var t=e.readUint16();this.data_rate=t>>3,this.num_ind_sub=7&t,this.ind_subs=[];for(var i=0;i>6,s.bsid=r>>1&31,s.bsmod=(1&r)<<4|a>>4&15,s.acmod=a>>1&7,s.lfeon=1&a,s.num_dep_sub=o>>1&15,s.num_dep_sub>0&&(s.chan_loc=(1&o)<<8|e.readUint8())}})),u.createFullBoxCtor("dfLa",(function(e){var t=[],i=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];for(this.parseFullHeader(e);;){var s=e.readUint8(),r=Math.min(127&s,i.length-1);if(r?e.readUint8Array(e.readUint24()):(e.readUint8Array(13),this.samplerate=e.readUint32()>>12,e.readUint8Array(20)),t.push(i[r]),128&s)break}this.numMetadataBlocks=t.length+" ("+t.join(", ")+")"})),u.createBoxCtor("dimm",(function(e){this.bytessent=e.readUint64()})),u.createBoxCtor("dmax",(function(e){this.time=e.readUint32()})),u.createBoxCtor("dmed",(function(e){this.bytessent=e.readUint64()})),u.createBoxCtor("dOps",(function(e){if(this.Version=e.readUint8(),this.OutputChannelCount=e.readUint8(),this.PreSkip=e.readUint16(),this.InputSampleRate=e.readUint32(),this.OutputGain=e.readInt16(),this.ChannelMappingFamily=e.readUint8(),0!==this.ChannelMappingFamily){this.StreamCount=e.readUint8(),this.CoupledCount=e.readUint8(),this.ChannelMapping=[];for(var t=0;t=4;)this.compatible_brands[i]=e.readString(4),t-=4,i++})),u.createFullBoxCtor("hdlr",(function(e){0===this.version&&(e.readUint32(),this.handler=e.readString(4),e.readUint32Array(3),this.name=e.readString(this.size-this.hdr_size-20),"\0"===this.name[this.name.length-1]&&(this.name=this.name.slice(0,-1)))})),u.createBoxCtor("hvcC",(function(e){var t,i,s,r;this.configurationVersion=e.readUint8(),r=e.readUint8(),this.general_profile_space=r>>6,this.general_tier_flag=(32&r)>>5,this.general_profile_idc=31&r,this.general_profile_compatibility=e.readUint32(),this.general_constraint_indicator=e.readUint8Array(6),this.general_level_idc=e.readUint8(),this.min_spatial_segmentation_idc=4095&e.readUint16(),this.parallelismType=3&e.readUint8(),this.chroma_format_idc=3&e.readUint8(),this.bit_depth_luma_minus8=7&e.readUint8(),this.bit_depth_chroma_minus8=7&e.readUint8(),this.avgFrameRate=e.readUint16(),r=e.readUint8(),this.constantFrameRate=r>>6,this.numTemporalLayers=(13&r)>>3,this.temporalIdNested=(4&r)>>2,this.lengthSizeMinusOne=3&r,this.nalu_arrays=[];var a=e.readUint8();for(t=0;t>7,o.nalu_type=63&r;var n=e.readUint16();for(i=0;i>4&15,this.length_size=15&t,t=e.readUint8(),this.base_offset_size=t>>4&15,1===this.version||2===this.version?this.index_size=15&t:this.index_size=0,this.items=[];var i=0;if(this.version<2)i=e.readUint16();else{if(2!==this.version)throw"version of iloc box not supported";i=e.readUint32()}for(var s=0;s>7,this.axis=1&t})),u.createFullBoxCtor("infe",(function(e){if(0!==this.version&&1!==this.version||(this.item_ID=e.readUint16(),this.item_protection_index=e.readUint16(),this.item_name=e.readCString(),this.content_type=e.readCString(),this.content_encoding=e.readCString()),1===this.version)return this.extension_type=e.readString(4),o.warn("BoxParser","Cannot parse extension type"),void e.seek(this.start+this.size);this.version>=2&&(2===this.version?this.item_ID=e.readUint16():3===this.version&&(this.item_ID=e.readUint32()),this.item_protection_index=e.readUint16(),this.item_type=e.readString(4),this.item_name=e.readCString(),"mime"===this.item_type?(this.content_type=e.readCString(),this.content_encoding=e.readCString()):"uri "===this.item_type&&(this.item_uri_type=e.readCString()))})),u.createFullBoxCtor("ipma",(function(e){var t,i;for(entry_count=e.readUint32(),this.associations=[],t=0;t>7==1,1&this.flags?o.property_index=(127&a)<<8|e.readUint8():o.property_index=127&a}}})),u.createFullBoxCtor("iref",(function(e){var t,i;for(this.references=[];e.getPosition()>7,s.assignment_type=127&r,s.assignment_type){case 0:s.grouping_type=e.readString(4);break;case 1:s.grouping_type=e.readString(4),s.grouping_type_parameter=e.readUint32();break;case 2:case 3:break;case 4:s.sub_track_id=e.readUint32();break;default:o.warn("BoxParser","Unknown leva assignement type")}}})),u.createBoxCtor("lsel",(function(e){this.layer_id=e.readUint16()})),u.createBoxCtor("maxr",(function(e){this.period=e.readUint32(),this.bytes=e.readUint32()})),p.prototype.toString=function(){return"("+this.x+","+this.y+")"},u.createBoxCtor("mdcv",(function(e){this.display_primaries=[],this.display_primaries[0]=new p(e.readUint16(),e.readUint16()),this.display_primaries[1]=new p(e.readUint16(),e.readUint16()),this.display_primaries[2]=new p(e.readUint16(),e.readUint16()),this.white_point=new p(e.readUint16(),e.readUint16()),this.max_display_mastering_luminance=e.readUint32(),this.min_display_mastering_luminance=e.readUint32()})),u.createFullBoxCtor("mdhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.parseLanguage(e),e.readUint16()})),u.createFullBoxCtor("mehd",(function(e){1&this.flags&&(o.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),1==this.version?this.fragment_duration=e.readUint64():this.fragment_duration=e.readUint32()})),u.createFullBoxCtor("meta",(function(e){this.boxes=[],u.ContainerBox.prototype.parse.call(this,e)})),u.createFullBoxCtor("mfhd",(function(e){this.sequence_number=e.readUint32()})),u.createFullBoxCtor("mfro",(function(e){this._size=e.readUint32()})),u.createFullBoxCtor("mskC",(function(e){this.bits_per_pixel=e.readUint8()})),u.createFullBoxCtor("mvhd",(function(e){1==this.version?(this.creation_time=e.readUint64(),this.modification_time=e.readUint64(),this.timescale=e.readUint32(),this.duration=e.readUint64()):(this.creation_time=e.readUint32(),this.modification_time=e.readUint32(),this.timescale=e.readUint32(),this.duration=e.readUint32()),this.rate=e.readUint32(),this.volume=e.readUint16()>>8,e.readUint16(),e.readUint32Array(2),this.matrix=e.readUint32Array(9),e.readUint32Array(6),this.next_track_id=e.readUint32()})),u.createBoxCtor("npck",(function(e){this.packetssent=e.readUint32()})),u.createBoxCtor("nump",(function(e){this.packetssent=e.readUint64()})),u.createFullBoxCtor("padb",(function(e){var t=e.readUint32();this.padbits=[];for(var i=0;i0){var t=e.readUint32();this.kid=[];for(var i=0;i0&&(this.data=e.readUint8Array(s))})),u.createFullBoxCtor("clef",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),u.createFullBoxCtor("enof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),u.createFullBoxCtor("prof",(function(e){this.width=e.readUint32(),this.height=e.readUint32()})),u.createContainerBoxCtor("tapt",null,["clef","prof","enof"]),u.createBoxCtor("rtp ",(function(e){this.descriptionformat=e.readString(4),this.sdptext=e.readString(this.size-this.hdr_size-4)})),u.createFullBoxCtor("saio",(function(e){1&this.flags&&(this.aux_info_type=e.readUint32(),this.aux_info_type_parameter=e.readUint32());var t=e.readUint32();this.offset=[];for(var i=0;i>7,this.avgRateFlag=t>>6&1,this.durationFlag&&(this.duration=e.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=e.readUint8(),this.avgBitRate=e.readUint16(),this.avgFrameRate=e.readUint16()),this.dependency=[];for(var i=e.readUint8(),s=0;s>7,this.num_leading_samples=127&t})),u.createSampleGroupCtor("rash",(function(e){if(this.operation_point_count=e.readUint16(),this.description_length!==2+(1===this.operation_point_count?2:6*this.operation_point_count)+9)o.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=e.readUint8Array(this.description_length-2);else{if(1===this.operation_point_count)this.target_rate_share=e.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(var t=0;t>4,this.skip_byte_block=15&t,this.isProtected=e.readUint8(),this.Per_Sample_IV_Size=e.readUint8(),this.KID=u.parseHex16(e),this.constant_IV_size=0,this.constant_IV=0,1===this.isProtected&&0===this.Per_Sample_IV_Size&&(this.constant_IV_size=e.readUint8(),this.constant_IV=e.readUint8Array(this.constant_IV_size))})),u.createSampleGroupCtor("stsa",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("sync",(function(e){var t=e.readUint8();this.NAL_unit_type=63&t})),u.createSampleGroupCtor("tele",(function(e){var t=e.readUint8();this.level_independently_decodable=t>>7})),u.createSampleGroupCtor("tsas",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("tscl",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createSampleGroupCtor("vipr",(function(e){o.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")})),u.createFullBoxCtor("sbgp",(function(e){this.grouping_type=e.readString(4),1===this.version?this.grouping_type_parameter=e.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var t=e.readUint32(),i=0;i>6,this.sample_depends_on[s]=t>>4&3,this.sample_is_depended_on[s]=t>>2&3,this.sample_has_redundancy[s]=3&t})),u.createFullBoxCtor("senc"),u.createFullBoxCtor("sgpd",(function(e){this.grouping_type=e.readString(4),o.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),1===this.version?this.default_length=e.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=e.readUint32()),this.entries=[];for(var t=e.readUint32(),i=0;i>31&1,s.referenced_size=2147483647&r,s.subsegment_duration=e.readUint32(),r=e.readUint32(),s.starts_with_SAP=r>>31&1,s.SAP_type=r>>28&7,s.SAP_delta_time=268435455&r}})),u.SingleItemTypeReferenceBox=function(e,t,i,s){u.Box.call(this,e,t),this.hdr_size=i,this.start=s},u.SingleItemTypeReferenceBox.prototype=new u.Box,u.SingleItemTypeReferenceBox.prototype.parse=function(e){this.from_item_ID=e.readUint16();var t=e.readUint16();this.references=[];for(var i=0;i>4&15,this.sample_sizes[t+1]=15&s}else if(8===this.field_size)for(t=0;t0)for(i=0;i>4&15,this.default_skip_byte_block=15&t}this.default_isProtected=e.readUint8(),this.default_Per_Sample_IV_Size=e.readUint8(),this.default_KID=u.parseHex16(e),1===this.default_isProtected&&0===this.default_Per_Sample_IV_Size&&(this.default_constant_IV_size=e.readUint8(),this.default_constant_IV=e.readUint8Array(this.default_constant_IV_size))})),u.createFullBoxCtor("tfdt",(function(e){1==this.version?this.baseMediaDecodeTime=e.readUint64():this.baseMediaDecodeTime=e.readUint32()})),u.createFullBoxCtor("tfhd",(function(e){var t=0;this.track_id=e.readUint32(),this.size-this.hdr_size>t&&this.flags&u.TFHD_FLAG_BASE_DATA_OFFSET?(this.base_data_offset=e.readUint64(),t+=8):this.base_data_offset=0,this.size-this.hdr_size>t&&this.flags&u.TFHD_FLAG_SAMPLE_DESC?(this.default_sample_description_index=e.readUint32(),t+=4):this.default_sample_description_index=0,this.size-this.hdr_size>t&&this.flags&u.TFHD_FLAG_SAMPLE_DUR?(this.default_sample_duration=e.readUint32(),t+=4):this.default_sample_duration=0,this.size-this.hdr_size>t&&this.flags&u.TFHD_FLAG_SAMPLE_SIZE?(this.default_sample_size=e.readUint32(),t+=4):this.default_sample_size=0,this.size-this.hdr_size>t&&this.flags&u.TFHD_FLAG_SAMPLE_FLAGS?(this.default_sample_flags=e.readUint32(),t+=4):this.default_sample_flags=0})),u.createFullBoxCtor("tfra",(function(e){this.track_ID=e.readUint32(),e.readUint24();var t=e.readUint8();this.length_size_of_traf_num=t>>4&3,this.length_size_of_trun_num=t>>2&3,this.length_size_of_sample_num=3&t,this.entries=[];for(var i=e.readUint32(),s=0;s>8,e.readUint16(),this.matrix=e.readInt32Array(9),this.width=e.readUint32(),this.height=e.readUint32()})),u.createBoxCtor("tmax",(function(e){this.time=e.readUint32()})),u.createBoxCtor("tmin",(function(e){this.time=e.readUint32()})),u.createBoxCtor("totl",(function(e){this.bytessent=e.readUint32()})),u.createBoxCtor("tpay",(function(e){this.bytessent=e.readUint32()})),u.createBoxCtor("tpyl",(function(e){this.bytessent=e.readUint64()})),u.TrackGroupTypeBox.prototype.parse=function(e){this.parseFullHeader(e),this.track_group_id=e.readUint32()},u.createTrackGroupCtor("msrc"),u.TrackReferenceTypeBox=function(e,t,i,s){u.Box.call(this,e,t),this.hdr_size=i,this.start=s},u.TrackReferenceTypeBox.prototype=new u.Box,u.TrackReferenceTypeBox.prototype.parse=function(e){this.track_ids=e.readUint32Array((this.size-this.hdr_size)/4)},u.trefBox.prototype.parse=function(e){for(var t,i;e.getPosition()t&&this.flags&u.TRUN_FLAGS_DATA_OFFSET?(this.data_offset=e.readInt32(),t+=4):this.data_offset=0,this.size-this.hdr_size>t&&this.flags&u.TRUN_FLAGS_FIRST_FLAG?(this.first_sample_flags=e.readUint32(),t+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>t)for(var i=0;i>7&1,this.block_pad_lsb=i>>6&1,this.block_little_endian=i>>5&1,this.block_reversed=i>>4&1,this.pad_unknown=i>>3&1,this.pixel_size=e.readUint32(),this.row_align_size=e.readUint32(),this.tile_align_size=e.readUint32(),this.num_tile_cols_minus_one=e.readUint32(),this.num_tile_rows_minus_one=e.readUint32()}})),u.createFullBoxCtor("url ",(function(e){1!==this.flags&&(this.location=e.readCString())})),u.createFullBoxCtor("urn ",(function(e){this.name=e.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=e.readCString())})),u.createUUIDBox("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(e){this.LiveServerManifest=e.readString(this.size-this.hdr_size).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")})),u.createUUIDBox("d08a4f1810f34a82b6c832d8aba183d3",!0,!1,(function(e){this.system_id=u.parseHex16(e);var t=e.readUint32();t>0&&(this.data=e.readUint8Array(t))})),u.createUUIDBox("a2394f525a9b4f14a2446c427c648df4",!0,!1),u.createUUIDBox("8974dbce7be74c5184f97148f9882554",!0,!1,(function(e){this.default_AlgorithmID=e.readUint24(),this.default_IV_size=e.readUint8(),this.default_KID=u.parseHex16(e)})),u.createUUIDBox("d4807ef2ca3946958e5426cb9e46a79f",!0,!1,(function(e){this.fragment_count=e.readUint8(),this.entries=[];for(var t=0;t>4,this.chromaSubsampling=t>>1&7,this.videoFullRangeFlag=1&t,this.colourPrimaries=e.readUint8(),this.transferCharacteristics=e.readUint8(),this.matrixCoefficients=e.readUint8(),this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize)):(this.profile=e.readUint8(),this.level=e.readUint8(),t=e.readUint8(),this.bitDepth=t>>4&15,this.colorSpace=15&t,t=e.readUint8(),this.chromaSubsampling=t>>4&15,this.transferFunction=t>>1&7,this.videoFullRangeFlag=1&t,this.codecIntializationDataSize=e.readUint16(),this.codecIntializationData=e.readUint8Array(this.codecIntializationDataSize))})),u.createBoxCtor("vttC",(function(e){this.text=e.readString(this.size-this.hdr_size)})),u.createFullBoxCtor("vvcC",(function(e){var t,i,s={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(e){this.held_bits=e.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(e){this.held_bits=e.readUint16(),this.num_held_bits=16},extract_bits:function(e){var t=this.held_bits>>this.num_held_bits-e&(1<1){for(s.stream_read_1_bytes(e),this.ptl_sublayer_present_mask=0,i=this.num_sublayers-2;i>=0;--i){var o=s.extract_bits(1);this.ptl_sublayer_present_mask|=o<1;++i)s.extract_bits(1);for(this.sublayer_level_idc=[],i=this.num_sublayers-2;i>=0;--i)this.ptl_sublayer_present_mask&1<>=1;t+=u.decimalToHex(s,0),t+=".",0===this.hvcC.general_tier_flag?t+="L":t+="H",t+=this.hvcC.general_level_idc;var r=!1,a="";for(e=5;e>=0;e--)(this.hvcC.general_constraint_indicator[e]||r)&&(a="."+u.decimalToHex(this.hvcC.general_constraint_indicator[e],0)+a,r=!0);t+=a}return t},u.vvc1SampleEntry.prototype.getCodec=u.vvi1SampleEntry.prototype.getCodec=function(){var e,t=u.SampleEntry.prototype.getCodec.call(this);if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;var i="";if(this.vvcC.general_constraint_info){var s,r=[],a=0;for(a|=this.vvcC.ptl_frame_only_constraint<<7,a|=this.vvcC.ptl_multilayer_enabled<<6,e=0;e>2&63,r.push(a),a&&(s=e),a=this.vvcC.general_constraint_info[e]>>2&3;if(void 0===s)i=".CA";else{i=".C";var o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",n=0,l=0;for(e=0;e<=s;++e)for(n=n<<8|r[e],l+=8;l>=5;){i+=o[n>>l-5&31],n&=(1<<(l-=5))-1}l&&(i+=o[31&(n<<=5-l)])}}t+=i}return t},u.mp4aSampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this);if(this.esds&&this.esds.esd){var t=this.esds.esd.getOTI(),i=this.esds.esd.getAudioConfig();return e+"."+u.decimalToHex(t)+(i?"."+i:"")}return e},u.stxtSampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this);return this.mime_format?e+"."+this.mime_format:e},u.vp08SampleEntry.prototype.getCodec=u.vp09SampleEntry.prototype.getCodec=function(){var e=u.SampleEntry.prototype.getCodec.call(this),t=this.vpcC.level;0==t&&(t="00");var i=this.vpcC.bitDepth;return 8==i&&(i="08"),e+".0"+this.vpcC.profile+"."+t+"."+i},u.av01SampleEntry.prototype.getCodec=function(){var e,t=u.SampleEntry.prototype.getCodec.call(this),i=this.av1C.seq_level_idx_0;return i<10&&(i="0"+i),2===this.av1C.seq_profile&&1===this.av1C.high_bitdepth?e=1===this.av1C.twelve_bit?"12":"10":this.av1C.seq_profile<=2&&(e=1===this.av1C.high_bitdepth?"10":"08"),t+"."+this.av1C.seq_profile+"."+i+(this.av1C.seq_tier_0?"H":"M")+"."+e},u.Box.prototype.writeHeader=function(e,t){this.size+=8,this.size>h&&(this.size+=8),"uuid"===this.type&&(this.size+=16),o.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+e.getPosition()+(t||"")),this.size>h?e.writeUint32(1):(this.sizePosition=e.getPosition(),e.writeUint32(this.size)),e.writeString(this.type,null,4),"uuid"===this.type&&e.writeUint8Array(this.uuid),this.size>h&&e.writeUint64(this.size)},u.FullBox.prototype.writeHeader=function(e){this.size+=4,u.Box.prototype.writeHeader.call(this,e," v="+this.version+" f="+this.flags),e.writeUint8(this.version),e.writeUint24(this.flags)},u.Box.prototype.write=function(e){"mdat"===this.type?this.data&&(this.size=this.data.length,this.writeHeader(e),e.writeUint8Array(this.data)):(this.size=this.data?this.data.length:0,this.writeHeader(e),this.data&&e.writeUint8Array(this.data))},u.ContainerBox.prototype.write=function(e){this.size=0,this.writeHeader(e);for(var t=0;t=2&&e.writeUint32(this.default_sample_description_index),e.writeUint32(this.entries.length),t=0;t0)for(t=0;t+1t?1:0,this.flags=0,this.size=4,1===this.version&&(this.size+=4),this.writeHeader(e),1===this.version?e.writeUint64(this.baseMediaDecodeTime):e.writeUint32(this.baseMediaDecodeTime)},u.tfhdBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&u.TFHD_FLAG_BASE_DATA_OFFSET&&(this.size+=8),this.flags&u.TFHD_FLAG_SAMPLE_DESC&&(this.size+=4),this.flags&u.TFHD_FLAG_SAMPLE_DUR&&(this.size+=4),this.flags&u.TFHD_FLAG_SAMPLE_SIZE&&(this.size+=4),this.flags&u.TFHD_FLAG_SAMPLE_FLAGS&&(this.size+=4),this.writeHeader(e),e.writeUint32(this.track_id),this.flags&u.TFHD_FLAG_BASE_DATA_OFFSET&&e.writeUint64(this.base_data_offset),this.flags&u.TFHD_FLAG_SAMPLE_DESC&&e.writeUint32(this.default_sample_description_index),this.flags&u.TFHD_FLAG_SAMPLE_DUR&&e.writeUint32(this.default_sample_duration),this.flags&u.TFHD_FLAG_SAMPLE_SIZE&&e.writeUint32(this.default_sample_size),this.flags&u.TFHD_FLAG_SAMPLE_FLAGS&&e.writeUint32(this.default_sample_flags)},u.tkhdBox.prototype.write=function(e){this.version=0,this.size=80,this.writeHeader(e),e.writeUint32(this.creation_time),e.writeUint32(this.modification_time),e.writeUint32(this.track_id),e.writeUint32(0),e.writeUint32(this.duration),e.writeUint32(0),e.writeUint32(0),e.writeInt16(this.layer),e.writeInt16(this.alternate_group),e.writeInt16(this.volume<<8),e.writeUint16(0),e.writeInt32Array(this.matrix),e.writeUint32(this.width),e.writeUint32(this.height)},u.trexBox.prototype.write=function(e){this.version=0,this.flags=0,this.size=20,this.writeHeader(e),e.writeUint32(this.track_id),e.writeUint32(this.default_sample_description_index),e.writeUint32(this.default_sample_duration),e.writeUint32(this.default_sample_size),e.writeUint32(this.default_sample_flags)},u.trunBox.prototype.write=function(e){this.version=0,this.size=4,this.flags&u.TRUN_FLAGS_DATA_OFFSET&&(this.size+=4),this.flags&u.TRUN_FLAGS_FIRST_FLAG&&(this.size+=4),this.flags&u.TRUN_FLAGS_DURATION&&(this.size+=4*this.sample_duration.length),this.flags&u.TRUN_FLAGS_SIZE&&(this.size+=4*this.sample_size.length),this.flags&u.TRUN_FLAGS_FLAGS&&(this.size+=4*this.sample_flags.length),this.flags&u.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(e),e.writeUint32(this.sample_count),this.flags&u.TRUN_FLAGS_DATA_OFFSET&&(this.data_offset_position=e.getPosition(),e.writeInt32(this.data_offset)),this.flags&u.TRUN_FLAGS_FIRST_FLAG&&e.writeUint32(this.first_sample_flags);for(var t=0;t-1||e[i]instanceof u.Box||t[i]instanceof u.Box||void 0===e[i]||void 0===t[i]||"function"==typeof e[i]||"function"==typeof t[i]||e.subBoxNames&&e.subBoxNames.indexOf(i.slice(0,4))>-1||t.subBoxNames&&t.subBoxNames.indexOf(i.slice(0,4))>-1||"data"===i||"start"===i||"size"===i||"creation_time"===i||"modification_time"===i||u.DIFF_PRIMITIVE_ARRAY_PROP_NAMES.indexOf(i)>-1||e[i]===t[i]))return!1;return!0},u.boxEqual=function(e,t){if(!u.boxEqualFields(e,t))return!1;for(var i=0;i1)for(t=1;t-1&&this.fragmentedTracks.splice(t,1)},y.prototype.setExtractionOptions=function(e,t,i){var s=this.getTrackById(e);if(s){var r={};this.extractedTracks.push(r),r.id=e,r.user=t,r.trak=s,s.nextSample=0,r.nb_samples=1e3,r.samples=[],i&&i.nbSamples&&(r.nb_samples=i.nbSamples)}},y.prototype.unsetExtractionOptions=function(e){for(var t=-1,i=0;i-1&&this.extractedTracks.splice(t,1)},y.prototype.parse=function(){var e,t;if(!this.restoreParsePosition||this.restoreParsePosition())for(;;){if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}if(this.saveParsePosition&&this.saveParsePosition(),(e=u.parseOneBox(this.stream,false)).code===u.ERR_NOT_ENOUGH_DATA){if(this.processIncompleteBox){if(this.processIncompleteBox(e))continue;return}return}var i;switch(i="uuid"!==(t=e.box).type?t.type:t.uuid,this.boxes.push(t),i){case"mdat":this.mdats.push(t);break;case"moof":this.moofs.push(t);break;case"moov":this.moovStartFound=!0,0===this.mdats.length&&(this.isProgressive=!0);default:void 0!==this[i]&&o.warn("ISOFile","Duplicate Box of type: "+i+", overriding previous occurrence"),this[i]=t}this.updateUsedBytes&&this.updateUsedBytes(t,e)}},y.prototype.checkBuffer=function(e){if(null==e)throw"Buffer must be defined and non empty";if(void 0===e.fileStart)throw"Buffer must have a fileStart property";return 0===e.byteLength?(o.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(o.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),!!this.stream.initialized()||(o.warn("ISOFile","Not ready to start parsing"),!1))},y.prototype.appendBuffer=function(e,t){var i;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(t),this.nextSeekPosition?(i=this.nextSeekPosition,this.nextSeekPosition=void 0):i=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(i=this.stream.getEndFilePositionAfter(i))):i=this.nextParsePosition?this.nextParsePosition:0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(o.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+i),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),i},y.prototype.getInfo=function(){var e,t,i,s,r,a,o={},n=new Date("1904-01-01T00:00:00Z").getTime();if(this.moov)for(o.hasMoov=!0,o.duration=this.moov.mvhd.duration,o.timescale=this.moov.mvhd.timescale,o.isFragmented=null!=this.moov.mvex,o.isFragmented&&this.moov.mvex.mehd&&(o.fragment_duration=this.moov.mvex.mehd.fragment_duration),o.isProgressive=this.isProgressive,o.hasIOD=null!=this.moov.iods,o.brands=[],o.brands.push(this.ftyp.major_brand),o.brands=o.brands.concat(this.ftyp.compatible_brands),o.created=new Date(n+1e3*this.moov.mvhd.creation_time),o.modified=new Date(n+1e3*this.moov.mvhd.modification_time),o.tracks=[],o.audioTracks=[],o.videoTracks=[],o.subtitleTracks=[],o.metadataTracks=[],o.hintTracks=[],o.otherTracks=[],e=0;e0?o.mime+='video/mp4; codecs="':o.audioTracks&&o.audioTracks.length>0?o.mime+='audio/mp4; codecs="':o.mime+='application/mp4; codecs="',e=0;e=i.samples.length)&&(o.info("ISOFile","Sending fragmented data on track #"+s.id+" for samples ["+Math.max(0,i.nextSample-s.nb_samples)+","+(i.nextSample-1)+"]"),o.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(s.id,s.user,s.segmentStream.buffer,i.nextSample,e||i.nextSample>=i.samples.length),s.segmentStream=null,s!==this.fragmentedTracks[t]))break}}if(null!==this.onSamples)for(t=0;t=i.samples.length)&&(o.debug("ISOFile","Sending samples on track #"+a.id+" for sample "+i.nextSample),this.onSamples&&this.onSamples(a.id,a.user,a.samples),a.samples=[],a!==this.extractedTracks[t]))break}}}},y.prototype.getBox=function(e){var t=this.getBoxes(e,!0);return t.length?t[0]:null},y.prototype.getBoxes=function(e,t){var i=[];return y._sweep.call(this,e,i,t),i},y._sweep=function(e,t,i){for(var s in this.type&&this.type==e&&t.push(this),this.boxes){if(t.length&&i)return;y._sweep.call(this.boxes[s],e,t,i)}},y.prototype.getTrackSamplesInfo=function(e){var t=this.getTrackById(e);return t?t.samples:void 0},y.prototype.getTrackSample=function(e,t){var i=this.getTrackById(e);return this.getSample(i,t)},y.prototype.releaseUsedSamples=function(e,t){var i=0,s=this.getTrackById(e);s.lastValidSample||(s.lastValidSample=0);for(var r=s.lastValidSample;re*r.timescale){h=s-1;break}t&&r.is_sync&&(l=s)}for(t&&(h=l),e=i.samples[h].cts,i.nextSample=h;i.samples[h].alreadyRead===i.samples[h].size&&i.samples[h+1];)h++;return a=i.samples[h].offset+i.samples[h].alreadyRead,o.info("ISOFile","Seeking to "+(t?"RAP":"")+" sample #"+i.nextSample+" on track "+i.tkhd.track_id+", time "+o.getDurationString(e,n)+" and offset: "+a),{offset:a,time:e/n}},y.prototype.getTrackDuration=function(e){var t;return e.samples?((t=e.samples[e.samples.length-1]).cts+t.duration)/t.timescale:1/0},y.prototype.seek=function(e,t){var i,s,r,a=this.moov,n={offset:1/0,time:1/0};if(this.moov){for(r=0;rthis.getTrackDuration(i)||((s=this.seekTrack(e,t,i)).offset-1){o=l;break}switch(o){case"Visual":if(r.add("vmhd").set("graphicsmode",0).set("opcolor",[0,0,0]),a.set("width",t.width).set("height",t.height).set("horizresolution",72<<16).set("vertresolution",72<<16).set("frame_count",1).set("compressorname",t.type+" Compressor").set("depth",24),t.avcDecoderConfigRecord){var c=new u.avcCBox;c.parse(new n(t.avcDecoderConfigRecord)),a.addBox(c)}else if(t.hevcDecoderConfigRecord){var p=new u.hvcCBox;p.parse(new n(t.hevcDecoderConfigRecord)),a.addBox(p)}break;case"Audio":r.add("smhd").set("balance",t.balance||0),a.set("channel_count",t.channel_count||2).set("samplesize",t.samplesize||16).set("samplerate",t.samplerate||65536);break;case"Hint":r.add("hmhd");break;case"Subtitle":if(r.add("sthd"),"stpp"===t.type)a.set("namespace",t.namespace||"nonamespace").set("schema_location",t.schema_location||"").set("auxiliary_mime_types",t.auxiliary_mime_types||"");break;default:r.add("nmhd")}t.description&&a.addBox(t.description),t.description_boxes&&t.description_boxes.forEach((function(e){a.addBox(e)})),r.add("dinf").add("dref").addEntry((new u["url Box"]).set("flags",1));var f=r.add("stbl");return f.add("stsd").addEntry(a),f.add("stts").set("sample_counts",[]).set("sample_deltas",[]),f.add("stsc").set("first_chunk",[]).set("samples_per_chunk",[]).set("sample_description_index",[]),f.add("stco").set("chunk_offsets",[]),f.add("stsz").set("sample_sizes",[]),this.moov.mvex.add("trex").set("track_id",t.id).set("default_sample_description_index",t.default_sample_description_index||1).set("default_sample_duration",t.default_sample_duration||0).set("default_sample_size",t.default_sample_size||0).set("default_sample_flags",t.default_sample_flags||0),this.buildTrakSampleLists(i),t.id}},u.Box.prototype.computeSize=function(e){var t=e||new l;t.endianness=l.BIG_ENDIAN,this.write(t)},y.prototype.addSample=function(e,t,i){var s=i||{},r={},a=this.getTrackById(e);if(null!==a){r.number=a.samples.length,r.track_id=a.tkhd.track_id,r.timescale=a.mdia.mdhd.timescale,r.description_index=s.sample_description_index?s.sample_description_index-1:0,r.description=a.mdia.minf.stbl.stsd.entries[r.description_index],r.data=t,r.size=t.byteLength,r.alreadyRead=r.size,r.duration=s.duration||1,r.cts=s.cts||0,r.dts=s.dts||0,r.is_sync=s.is_sync||!1,r.is_leading=s.is_leading||0,r.depends_on=s.depends_on||0,r.is_depended_on=s.is_depended_on||0,r.has_redundancy=s.has_redundancy||0,r.degradation_priority=s.degradation_priority||0,r.offset=0,r.subsamples=s.subsamples,a.samples.push(r),a.samples_size+=r.size,a.samples_duration+=r.duration,void 0===a.first_dts&&(a.first_dts=s.dts),this.processSamples();var o=this.createSingleSampleMoof(r);return this.addBox(o),o.computeSize(),o.trafs[0].truns[0].data_offset=o.size+8,this.add("mdat").data=new Uint8Array(t),r}},y.prototype.createSingleSampleMoof=function(e){var t=0;t=e.is_sync?1<<25:65536;var i=new u.moofBox;i.add("mfhd").set("sequence_number",this.nextMoofNumber),this.nextMoofNumber++;var s=i.add("traf"),r=this.getTrackById(e.track_id);return s.add("tfhd").set("track_id",e.track_id).set("flags",u.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),s.add("tfdt").set("baseMediaDecodeTime",e.dts-(r.first_dts||0)),s.add("trun").set("flags",u.TRUN_FLAGS_DATA_OFFSET|u.TRUN_FLAGS_DURATION|u.TRUN_FLAGS_SIZE|u.TRUN_FLAGS_FLAGS|u.TRUN_FLAGS_CTS_OFFSET).set("data_offset",0).set("first_sample_flags",0).set("sample_count",1).set("sample_duration",[e.duration]).set("sample_size",[e.size]).set("sample_flags",[t]).set("sample_composition_time_offset",[e.cts-e.dts]),i},y.prototype.lastMoofIndex=0,y.prototype.samplesDataSize=0,y.prototype.resetTables=function(){var e,t,i,s,r,a;for(this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0,e=0;e=2&&(l=r[o].grouping_type+"/0",(n=new h(r[o].grouping_type,0)).is_fragment=!0,t.sample_groups_info[l]||(t.sample_groups_info[l]=n))}else for(o=0;o=2&&(l=s[o].grouping_type+"/0",n=new h(s[o].grouping_type,0),e.sample_groups_info[l]||(e.sample_groups_info[l]=n))},y.setSampleGroupProperties=function(e,t,i,s){var r,a;for(r in t.sample_groups=[],s){var o;if(t.sample_groups[r]={},t.sample_groups[r].grouping_type=s[r].grouping_type,t.sample_groups[r].grouping_type_parameter=s[r].grouping_type_parameter,i>=s[r].last_sample_in_run&&(s[r].last_sample_in_run<0&&(s[r].last_sample_in_run=0),s[r].entry_index++,s[r].entry_index<=s[r].sbgp.entries.length-1&&(s[r].last_sample_in_run+=s[r].sbgp.entries[s[r].entry_index].sample_count)),s[r].entry_index<=s[r].sbgp.entries.length-1?t.sample_groups[r].group_description_index=s[r].sbgp.entries[s[r].entry_index].group_description_index:t.sample_groups[r].group_description_index=-1,0!==t.sample_groups[r].group_description_index)o=s[r].fragment_description?s[r].fragment_description:s[r].description,t.sample_groups[r].group_description_index>0?(a=t.sample_groups[r].group_description_index>65535?(t.sample_groups[r].group_description_index>>16)-1:t.sample_groups[r].group_description_index-1,o&&a>=0&&(t.sample_groups[r].description=o.entries[a])):o&&o.version>=2&&o.default_group_description_index>0&&(t.sample_groups[r].description=o.entries[o.default_group_description_index-1])}},y.process_sdtp=function(e,t,i){t&&(e?(t.is_leading=e.is_leading[i],t.depends_on=e.sample_depends_on[i],t.is_depended_on=e.sample_is_depended_on[i],t.has_redundancy=e.sample_has_redundancy[i]):(t.is_leading=0,t.depends_on=0,t.is_depended_on=0,t.has_redundancy=0))},y.prototype.buildSampleLists=function(){var e,t;for(e=0;eb&&(v++,b<0&&(b=0),b+=a.sample_counts[v]),t>0?(e.samples[t-1].duration=a.sample_deltas[v],e.samples_duration+=e.samples[t-1].duration,k.dts=e.samples[t-1].dts+e.samples[t-1].duration):k.dts=0,o?(t>=_&&(w++,_<0&&(_=0),_+=o.sample_counts[w]),k.cts=e.samples[t].dts+o.sample_offsets[w]):k.cts=k.dts,n?(t==n.sample_numbers[S]-1?(k.is_sync=!0,S++):(k.is_sync=!1,k.degradation_priority=0),h&&h.entries[T].sample_delta+E==t+1&&(k.subsamples=h.entries[T].subsamples,E+=h.entries[T].sample_delta,T++)):k.is_sync=!0,y.process_sdtp(e.mdia.minf.stbl.sdtp,k,k.number),k.degradation_priority=u?u.priority[t]:0,h&&h.entries[T].sample_delta+E==t&&(k.subsamples=h.entries[T].subsamples,E+=h.entries[T].sample_delta),(d.length>0||c.length>0)&&y.setSampleGroupProperties(e,k,t,e.sample_groups_info)}t>0&&(e.samples[t-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[t-1].dts,0),e.samples_duration+=e.samples[t-1].duration)}},y.prototype.updateSampleLists=function(){var e,t,i,s,r,a,o,n,l,h,d,c,p,f,m;if(void 0!==this.moov)for(;this.lastMoofIndex0&&y.initSampleGroups(c,d,d.sbgps,c.mdia.minf.stbl.sgpds,d.sgpds),t=0;t0?f.dts=c.samples[c.samples.length-2].dts+c.samples[c.samples.length-2].duration:(d.tfdt?f.dts=d.tfdt.baseMediaDecodeTime:f.dts=0,c.first_traf_merged=!0),f.cts=f.dts,g.flags&u.TRUN_FLAGS_CTS_OFFSET&&(f.cts=f.dts+g.sample_composition_time_offset[i]),m=o,g.flags&u.TRUN_FLAGS_FLAGS?m=g.sample_flags[i]:0===i&&g.flags&u.TRUN_FLAGS_FIRST_FLAG&&(m=g.first_sample_flags),f.is_sync=!(m>>16&1),f.is_leading=m>>26&3,f.depends_on=m>>24&3,f.is_depended_on=m>>22&3,f.has_redundancy=m>>20&3,f.degradation_priority=65535&m;var A=!!(d.tfhd.flags&u.TFHD_FLAG_BASE_DATA_OFFSET),b=!!(d.tfhd.flags&u.TFHD_FLAG_DEFAULT_BASE_IS_MOOF),v=!!(g.flags&u.TRUN_FLAGS_DATA_OFFSET),_=0;_=A?d.tfhd.base_data_offset:b||0===t?h.start:n,f.offset=0===t&&0===i?v?_+g.data_offset:_:n,n=f.offset+f.size,(d.sbgps.length>0||d.sgpds.length>0||c.mdia.minf.stbl.sbgps.length>0||c.mdia.minf.stbl.sgpds.length>0)&&y.setSampleGroupProperties(c,f,f.number_in_traf,d.sample_groups_info)}}if(d.subs){c.has_fragment_subsamples=!0;var w=d.first_sample_index;for(t=0;t-1))return null;var a=(i=this.stream.buffers[r]).byteLength-(s.offset+s.alreadyRead-i.fileStart);if(s.size-s.alreadyRead<=a)return o.debug("ISOFile","Getting sample #"+t+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-i.fileStart)+" read size: "+(s.size-s.alreadyRead)+" full size: "+s.size+")"),l.memcpy(s.data.buffer,s.alreadyRead,i,s.offset+s.alreadyRead-i.fileStart,s.size-s.alreadyRead),i.usedBytes+=s.size-s.alreadyRead,this.stream.logBufferLevel(),s.alreadyRead=s.size,s;if(0===a)return null;o.debug("ISOFile","Getting sample #"+t+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-i.fileStart)+" read size: "+a+" full size: "+s.size+")"),l.memcpy(s.data.buffer,s.alreadyRead,i,s.offset+s.alreadyRead-i.fileStart,a),s.alreadyRead+=a,i.usedBytes+=a,this.stream.logBufferLevel()}},y.prototype.releaseSample=function(e,t){var i=e.samples[t];return i.data?(this.samplesDataSize-=i.size,i.data=null,i.alreadyRead=0,i.size):0},y.prototype.getAllocatedSampleDataSize=function(){return this.samplesDataSize},y.prototype.getCodecs=function(){var e,t="";for(e=0;e0&&(t+=","),t+=this.moov.traks[e].mdia.minf.stbl.stsd.entries[0].getCodec()}return t},y.prototype.getTrexById=function(e){var t;if(!this.moov||!this.moov.mvex)return null;for(t=0;t0&&(i.protection=a.ipro.protections[a.iinf.item_infos[e].protection_index-1]),a.iinf.item_infos[e].item_type?i.type=a.iinf.item_infos[e].item_type:i.type="mime",i.content_type=a.iinf.item_infos[e].content_type,i.content_encoding=a.iinf.item_infos[e].content_encoding;if(a.grpl)for(e=0;e0&&u.property_index-1-1))return null;var n=(t=this.stream.buffers[a]).byteLength-(r.offset+r.alreadyRead-t.fileStart);if(!(r.length-r.alreadyRead<=n))return o.debug("ISOFile","Getting item #"+e+" extent #"+s+" partial data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-t.fileStart)+" read size: "+n+" full extent size: "+r.length+" full item size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,t,r.offset+r.alreadyRead-t.fileStart,n),r.alreadyRead+=n,i.alreadyRead+=n,t.usedBytes+=n,this.stream.logBufferLevel(),null;o.debug("ISOFile","Getting item #"+e+" extent #"+s+" data (alreadyRead: "+r.alreadyRead+" offset: "+(r.offset+r.alreadyRead-t.fileStart)+" read size: "+(r.length-r.alreadyRead)+" full extent size: "+r.length+" full item size: "+i.size+")"),l.memcpy(i.data.buffer,i.alreadyRead,t,r.offset+r.alreadyRead-t.fileStart,r.length-r.alreadyRead),t.usedBytes+=r.length-r.alreadyRead,this.stream.logBufferLevel(),i.alreadyRead+=r.length-r.alreadyRead,r.alreadyRead=r.length}}return i.alreadyRead===i.size?i:null},y.prototype.releaseItem=function(e){var t=this.items[e];if(t.data){this.itemsDataSize-=t.size,t.data=null,t.alreadyRead=0;for(var i=0;i0?this.moov.traks[e].samples[0].duration:0),t.push(s)}return t},u.Box.prototype.printHeader=function(e){this.size+=8,this.size>h&&(this.size+=8),"uuid"===this.type&&(this.size+=16),e.log(e.indent+"size:"+this.size),e.log(e.indent+"type:"+this.type)},u.FullBox.prototype.printHeader=function(e){this.size+=4,u.Box.prototype.printHeader.call(this,e),e.log(e.indent+"version:"+this.version),e.log(e.indent+"flags:"+this.flags)},u.Box.prototype.print=function(e){this.printHeader(e)},u.ContainerBox.prototype.print=function(e){this.printHeader(e);for(var t=0;t>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"next_track_id: "+this.next_track_id)},u.tkhdBox.prototype.print=function(e){u.FullBox.prototype.printHeader.call(this,e),e.log(e.indent+"creation_time: "+this.creation_time),e.log(e.indent+"modification_time: "+this.modification_time),e.log(e.indent+"track_id: "+this.track_id),e.log(e.indent+"duration: "+this.duration),e.log(e.indent+"volume: "+(this.volume>>8)),e.log(e.indent+"matrix: "+this.matrix.join(", ")),e.log(e.indent+"layer: "+this.layer),e.log(e.indent+"alternate_group: "+this.alternate_group),e.log(e.indent+"width: "+this.width),e.log(e.indent+"height: "+this.height)};var A={createFile:function(e,t){var i=void 0===e||e,s=new y(t);return s.discardMdatData=!i,s}};t.createFile=A.createFile}));function Ul(e){return e.reduce(((e,t)=>256*e+t))}function Fl(e){const t=[101,103,119,99],i=e.length-28,s=e.slice(i,i+t.length);return t.every(((e,t)=>e===s[t]))}Ml.Log,Ml.MP4BoxStream,Ml.DataStream,Ml.MultiBufferStream,Ml.MPEG4DescriptorParser,Ml.BoxParser,Ml.XMLSubtitlein4Parser,Ml.Textin4Parser,Ml.ISOFile,Ml.createFile;class Ol{constructor(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=new Uint8Array([30,158,90,33,244,57,83,165,2,70,35,87,215,231,226,108]),this.t=this.n.slice().reverse()}destroy(){this.s=null,this.a=null,this.l=0,this.c=0,this.u=1/0,this.A=!1,this.d=!1,this.r=4194304,this.n=null,this.t=null}transport(e){if(!this.s&&this.l>50)return e;if(this.l++,this.d)return e;const t=new Uint8Array(e);if(this.A){if(!(this.c~e))}(e.slice(i+32,i+32+t))]}return null}(t,this.t);if(!i)return e;const s=function(e){try{if("object"!=typeof WebAssembly||"function"!=typeof WebAssembly.instantiate)throw null;{const e=new WebAssembly.Module(Uint8Array.of(0,97,115,109,1,0,0,0));if(!(e instanceof WebAssembly.Module&&new WebAssembly.Instance(e)instanceof WebAssembly.Instance))throw null}}catch(e){return new Error("video_error_4")}let t;try{t={env:{__handle_stack_overflow:()=>e(new Error("video_error_1")),memory:new WebAssembly.Memory({initial:256,maximum:256})}}}catch(e){return new Error("video_error_5")}return t}(e);if(s instanceof Error)return console.error(s.message),this.d=!0,e;this.A=!0,this.u=i[1],Fl(t)&&this.c++,WebAssembly.instantiate(i[2],s).then((e=>{if(!function(e){return"function"==typeof e.parse&&"object"==typeof e.memory}(e.instance.exports))return this.d=!0,void console.error("video_error_3");this.s=e.instance.exports,this.a=new Uint8Array(this.s.memory.buffer)})).catch((e=>{this.d=!0,console.error("video_error_6")}))}return e}}class Nl extends _l{constructor(e){super(e),this.TAG_NAME="Fmp4Loader",this.player=e,this.mp4Box=Ml.createFile(),this.tempFmp4List=[],this.offset=0,this.videoTrackId=null,this.audioTrackId=null,this.isHevc=!1,this.transportDescarmber=null,this.player._opt.isFmp4Private&&(this.transportDescarmber=new Ol),this._listenMp4Box(),e.debug.log(this.TAG_NAME,"init")}destroy(){this.mp4Box&&(this.mp4Box.flush(),this.mp4Box=null),this.transportDescarmber&&(this.transportDescarmber.destroy(),this.transportDescarmber=null),this.tempFmp4List=[],this.offset=0,this.videoTrackId=null,this.audioTrackId=null,this.isHevc=!1,this.player.debug.log(this.TAG_NAME,"destroy")}_listenMp4Box(){this.mp4Box.onReady=this.onReady.bind(this),this.mp4Box.onError=this.onError.bind(this),this.mp4Box.onSamples=this.onSamples.bind(this)}onReady(e){this.player.debug.log(this.TAG_NAME,"onReady",e);const t=e.videoTracks[0],i=e.audioTracks[0];if(t){this.videoTrackId=t.id;const e=this.getSeqHeader(t);e&&(this.player.debug.log(this.TAG_NAME,"seqHeader",e),this._doDecodeByFmp4(e,Pe,0,!0,0)),this.mp4Box.setExtractionOptions(t.id)}if(i&&this.player._opt.hasAudio){this.audioTrackId=i.id;const e=i.audio||{},t=Hs.indexOf(e.sample_rate),s=i.codec.replace("mp4a.40.","");this.mp4Box.setExtractionOptions(i.id);const r={profile:parseInt(s,10),sampleRate:t,channel:e.channel_count},a=js(r);this.player.debug.log(this.TAG_NAME,"aacADTSHeader",a,"config",r),this._doDecodeByFmp4(a,Ie,0,!1,0)}this.mp4Box.start()}onError(e){this.player.debug.error(this.TAG_NAME,"mp4Box onError",e)}onSamples(e,t,i){if(e===this.videoTrackId)for(const e of i){const t=e.data,i=e.is_sync,s=1e3*e.cts/e.timescale;e.duration,e.timescale,this.player.updateStats({vbps:t.byteLength,dts:s}),i&&this.calcIframeIntervalTimestamp(s);let r=null;r=this.isHevc?Mo(t,i):wo(t,i),this._doDecodeByFmp4(r,Pe,s,i,0)}else if(e===this.audioTrackId){if(this.player._opt.hasAudio)for(const e of i){const t=e.data;this.player.updateStats({abps:t.byteLength});const i=1e3*e.cts/e.timescale;e.duration,e.timescale;const s=new Uint8Array(t.byteLength+2);s.set([175,1],0),s.set(t,2),this._doDecodeByFmp4(s,Ie,i,!1,0)}}else this.player.debug.warn(this.TAG_NAME,"onSamples() trackId error",e)}getSeqHeader(e){const t=this.mp4Box.getTrackById(e.id);for(const e of t.mdia.minf.stbl.stsd.entries)if(e.avcC||e.hvcC){const t=new Ml.DataStream(void 0,0,Ml.DataStream.BIG_ENDIAN);let i=[];e.avcC?(e.avcC.write(t),i=[23,0,0,0,0]):(this.isHevc=!0,e.hvcC.write(t),i=[28,0,0,0,0]);const s=new Uint8Array(t.buffer,8),r=new Uint8Array(i.length+s.length);return r.set(i,0),r.set(s,i.length),r}return null}dispatch(e){let t=new Uint8Array(e);"string"!=typeof e?"object"==typeof e?(this.transportDescarmber&&(t=this.transportDescarmber.transport(t)),t.buffer.fileStart=this.offset,this.offset+=t.byteLength,this.mp4Box.appendBuffer(t.buffer)):this.player.debug.warn(this.TAG_NAME,"dispatch()","data is not object",e):this.player.debug.warn(this.TAG_NAME,"dispatch()","data is string",e)}downloadFmp4File(){const e=new Blob(this.tempFmp4List,{type:'video/mp4; codecs="avc1.640028,mp4a.40.2"'}),t=URL.createObjectURL(e),i=document.createElement("a");i.href=t,i.download=sr()+".fmp4",i.click(),URL.revokeObjectURL(t)}}class jl extends _l{constructor(e){super(e),Il(this,"LOG_NAME","Mpeg4Loader"),this.player=e,this.player.debug.log(this.LOG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.LOG_NAME,"destroy")}}class zl{constructor(e){return new(zl.getLoaderFactory(e))(e)}static getLoaderFactory(e){const t=e._opt.demuxType;return t===S?Rl:t===w||e.isWebrtcH265()?Cl:t===k?xl:t===C?Pl:t===R?Nl:t===x?jl:Bl}}class Gl extends ba{constructor(e){super(),this.player=e,this.hasInit=!1,this.isDecodeFirstIIframe=!!da(e._opt.checkFirstIFrame),this.isInitInfo=!1,this.prevTimestamp=null,this.decodeDiffTimestamp=null,this.prevDts=null,this.decoder=null,this.isWidthOrHeightChanged=!1,this.initDecoder(),e.debug.log("Webcodecs","init")}destroy(){this.decoder&&(da(this.isDecodeStateClosed())&&this.decoder.close(),this.decoder=null),this.prevTimestamp=null,this.decodeDiffTimestamp=null,this.prevDts=null,this.hasInit=!1,this.isInitInfo=!1,this.isDecodeFirstIIframe=!1,this.isWidthOrHeightChanged=!1,this.off(),this.player.debug.log("Webcodecs","destroy")}initDecoder(){const e=this;this.decoder=new VideoDecoder({output(t){e.handleDecode(t)},error(t){e.handleError(t)}})}handleDecode(e){this.isInitInfo||(this.player.video.updateVideoInfo({width:e.codedWidth,height:e.codedHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0),this.player.isPlayer()?(this.player.updateStats({dfps:!0}),this.player._times.videoStart||(this.player._times.videoStart=sr(),this.player.handlePlayToRenderTimes()),this.player.video.render({videoFrame:e,ts:e.timestamp}),this.player.handleRender()):this.player.isPlayback()&&(this.player.updateStats({dfps:!0}),da(this.player.playbackPause)?(this.player.playback.isUseLocalCalculateTime&&this.player.playback.increaseLocalTimestamp(),this.player.playback.isUseFpsRender?this.player.video.pushData({videoFrame:e,ts:e.timestamp}):this.player.video.render$2({videoFrame:e,ts:e.timestamp})):da(this.player.playback.isPlaybackPauseClearCache)&&this.player.playback.isCacheBeforeDecodeForFpsRender&&this.player.playback.isUseFpsRender&&this.player.video.pushData({videoFrame:e,ts:e.timestamp}))}handleError(e){this.player.debug.error("Webcodecs","VideoDecoder handleError:",e.code,e);const t=e.toString();-1!==t.indexOf(Li)?this.player.emitError(tt.webcodecsUnsupportedConfigurationError,t):(-1!==t.indexOf(Ii)||-1!==t.indexOf(Pi)||-1!==t.indexOf(Bi))&&this.player.emitError(tt.webcodecsDecodeError,t)}decodeVideo(e,t,i,s){var r;if(this.player)if(this.player.isDestroyed())this.player.debug.warn("Webcodecs","decodeVideo() player is destroyed");else if(this.hasInit)if(!this.isDecodeFirstIIframe&&i&&(this.isDecodeFirstIIframe=!0),this.isDecodeFirstIIframe){if(this.isDecodeStateClosed())return void this.player.debug.warn("Webcodecs","VideoDecoder isDecodeStateClosed true");if(i&&0===e[1]){const t=15&e[0];let i={};if(t===dt){i=vo(e.slice(5))}else t===ct&&(i=Io(e));const s=this.player.video.videoInfo;s&&s.width&&s.height&&i&&i.codecWidth&&i.codecHeight&&(i.codecWidth!==s.width||i.codecHeight!==s.height)&&(this.player.debug.warn("Webcodecs",`decodeVideo: video width or height is changed,\n old width is ${s.width}, old height is ${s.height},\n new width is ${i.codecWidth}, new height is ${i.codecHeight},\n and emit change event`),this.isWidthOrHeightChanged=!0,this.player.emitError(tt.wcsWidthOrHeightChange))}if(this.isWidthOrHeightChanged)return void this.player.debug.warn("Webcodecs","decodeVideo: video width or height is changed, and return");if(la(e))return void this.player.debug.warn("Webcodecs","decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void this.player.debug.warn("Webcodecs",`decodeVideo and payload is too small , payload length is ${e.byteLength}`);let s=!1,r=(new Date).getTime();this.prevTimestamp||(this.prevTimestamp=r,s=!0);const a=r-this.prevTimestamp;this.decodeDiffTimestamp=a,a>500&&!s&&this.player.isPlayer()&&this.player.debug.warn("Webcodecs","decodeVideo diff time is ",a);const o=e.slice(5),n=new EncodedVideoChunk({data:o,timestamp:t,type:i?Wt:$t});this.player.emit(Xe.timeUpdate,t);try{this.decoder.decode(n)}catch(e){this.player.debug.error("Webcodecs","VideoDecoder",e);const t=e.toString();(-1!==t.indexOf(xi)||-1!==t.indexOf(Di))&&this.player.emitError(tt.webcodecsDecodeError)}this.prevTimestamp=(new Date).getTime()}else this.player.debug.log("Webcodecs","VideoDecoder first frame is not iFrame");else if(i&&e[1]===ji){const t=15&e[0];if(this.player.video.updateVideoInfo({encTypeCode:t}),t===ct&&!kr()){const e=mr();return this.player.debug.warn("Webcodecs","WebcodecsDecoder not support hevc decode",e.type,e.version),void this.player.emitError(tt.webcodecsH265NotSupport)}this.player._times.decodeStart||(this.player._times.decodeStart=sr());let i=null,s=null;const a=e.slice(5);t===dt?(i=function(e){let t=e.subarray(1,4),i="avc1.";for(let e=0;e<3;e++){let s=t[e].toString(16);s.length<2&&(s="0"+s),i+=s}return{codec:i,description:e}}(a),s=vo(a)):t===ct&&((r=a).subarray(1,4),i={codec:"hev1.1.6.L120.90",description:r},s=Io(e)),s&&s.codecWidth&&s.codecHeight&&(i.codedHeight=s.codecHeight,i.codedWidth=s.codecWidth),this.player.recorder&&this.player._opt.recordType===A&&this.player.recorder.initMetaData(e,t);try{this.decoder.configure(i),this.hasInit=!0}catch(e){this.player.debug.log("Webcodecs","configure error",e.code,e);-1!==e.toString().indexOf(Mi)?this.emit(tt.webcodecsH265NotSupport):this.player.emitError(tt.webcodecsDecodeConfigureError)}}}getDecodeDiffTimes(){return this.decodeDiffTimestamp}isDecodeStateClosed(){return"closed"===this.decoder.state}isDecodeStateConfigured(){return"configured"===this.decoder.state}isDecodeStateUnConfigured(){return"unconfigured"===this.decoder.state}}const Vl={play:"播放",pause:"暂停",audio:"",mute:"",screenshot:"截图",loading:"",fullscreen:"全屏",fullscreenExit:"退出全屏",record:"录制",recordStop:"停止录制",narrow:"缩小",expand:"放大",ptz:"操作盘",ptzActive:"操作盘激活",zoom:"电子放大",zoomStop:"关闭电子放大",close:"关闭",performance:"性能面板",performanceActive:"性能面板激活",face:"人脸识别",faceActive:"人脸识别激活",object:"物品识别",objectActive:"物品识别激活",occlusion:"遮挡物检查",occlusionActive:"遮挡物检查激活",logSave:"保存日志"};var Hl=Object.keys(Vl).reduce(((e,t)=>(e[t]=`\n \n ${Vl[t]?`${Vl[t]}`:""}\n`,e)),{});function Wl(e,t){let i=!1;return e.forEach((e=>{i||e.startTimestamp<=t&&e.endTimestamp>t&&(i=!0)})),i}function $l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;const s=e.length,r=t.length,a=Math.max(s,r),o=2e3,n=Math.ceil(a/o);let l=0,h=0;function d(){let r="",a="";for(let i=0;i\n ${i.title}\n
\n `);const o=t[h];o&&(a+=`\n
${o.title}
\n `),h+=1}r&&i.$playbackTimeListOne.insertAdjacentHTML("beforeend",r),a&&i.$playbackTimeListSecond.insertAdjacentHTML("beforeend",a),l+=1,l0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<1440;s++){const r=s%60==0;let a=!1;i&&(a=Wl(e,Nr(i,s))),t.push({title:Fr(s),timestamp:s,dataType:"min",hasRecord:a,isStart:r})}return t}(e);$l(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00";t<10&&(i="0"+i),e.push({title:i,hour:t,min:0,second:0})}return e}(),t)}function Kl(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<1440;s++){let r=60*s,a=r%1800==0,o=!1;i&&(o=Wl(e,jr(i,r))),t.push({title:Or(r),timestamp:r,dataType:"second",hasRecord:o,isStart:a});let n=60*s+30;a=n%1800==0,i&&(o=Wl(e,jr(i,n))),t.push({title:Or(n),timestamp:n,dataType:"second",hasRecord:o,isStart:a})}return t}(e);$l(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00",s=t+":30";t<10&&(i="0"+i,s="0"+s),e.push({title:i,hour:t,min:0,second:0}),e.push({title:s,hour:t,min:30,second:0})}return e}(),t)}function ql(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<144;s++)for(let r=0;r<60;r++){let a=10*r+600*s,o=a%600==0,n=!1;i&&(n=Wl(e,jr(i,a))),t.push({title:Or(a),timestamp:a,dataType:"second",isStart:o,hasRecord:n})}return t}(e);$l(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00";t<10&&(i="0"+i),e.push({title:i,hour:t,min:0,second:0});for(let s=1;s<6;s++){let r=s+"0";e.push({title:i.replace(":00",":"+r),hour:t,min:10*s,second:0})}}return e}(),t)}function Yl(e,t){const i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[];const i=(e[0]||{}).startTimestamp;for(let s=0;s<288;s++)for(let r=0;r<60;r++){let a=5*r+300*s,o=a%300==0,n=!1;i&&(n=Wl(e,jr(i,a))),t.push({title:Or(a),timestamp:a,dataType:"second",isStart:o,hasRecord:n})}return t}(e);$l(i,function(){let e=[];for(let t=0;t<24;t++){let i=t+":00";t<10&&(i="0"+i),e.push({title:i,hour:t,min:0,second:0}),e.push({title:i.replace(":00",":05"),hour:t,min:5,second:0});for(let s=1;s<6;s++){let r=s+"0",a=s+"5";e.push({title:i.replace(":00",":"+r),hour:t,min:10*s,second:0}),e.push({title:i.replace(":00",":"+a),hour:t,min:10*s+5,second:0})}}return e}(),t)}function Ql(e){const t=Math.floor(e/3600),i=Math.floor((e-3600*t)/60),s=Math.floor(e-3600*t-60*i);return(t>0?[t,i,s]:[i,s]).map((e=>e<10?`0${e}`:String(e))).join(":")}function Xl(e,t,i){const s=e.$playbackProgress,{left:r}=s.getBoundingClientRect(),a=rr((cr()?i.touches[0].clientX:i.pageX)-r,0,s.clientWidth),o=parseInt(a/s.clientWidth*t,10);return{second:o,time:Ql(o),width:a,percentage:rr(a/s.clientWidth,0,1)}}function Zl(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild||e.lastChild}function eh(e,t,i){return e&&e.style&&Ir(t)&&(e.style[t]=i),e}function th(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function ih(e){let t=!1;return e&&e.parentNode&&(e.parentNode.removeChild(e),t=!0),t}var sh=(e,t)=>{const{events:{proxy:i}}=e,s=document.createElement("object");s.setAttribute("aria-hidden","true"),s.setAttribute("tabindex",-1),s.type="text/html",s.data="about:blank",ar(s,{display:"block",position:"absolute",top:"0",left:"0",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:"-1"});let r=e.width,a=e.height;const o=wr((()=>{e.width===r&&e.height===a||(r=e.width,a=e.height,e.emit(Xe.resize),c())}),500);i(s,"load",(()=>{i(s.contentDocument.defaultView,"resize",(()=>{o()}))})),e.$container.appendChild(s),e.on(Xe.destroy,(()=>{e.$container.removeChild(s)})),e.on(Xe.volumechange,(()=>{!function(e){if(0===e)ar(t.$volumeOn,"display","none"),ar(t.$volumeOff,"display","flex"),ar(t.$volumeHandle,"top","48px");else if(t.$volumeHandle&&t.$volumePanel){const i=or(t.$volumePanel,"height")||60,s=or(t.$volumeHandle,"height"),r=i-(i-s)*e-s;ar(t.$volumeHandle,"top",`${r}px`),ar(t.$volumeOn,"display","flex"),ar(t.$volumeOff,"display","none")}t.$volumePanelText&&(t.$volumePanelText.innerHTML=parseInt(100*e))}(e.volume)})),e.on(Xe.loading,(i=>{ar(t.$loading,"display",i?"flex":"none"),(da(e._opt.backgroundLoadingShow)&&ha(i)||da(i))&&ar(t.$poster,"display","none"),i&&(ar(t.$playBig,"display","none"),ar(t.$tipsMessage,"display","none")),cr()||i||e.getRenderType()===z&&da(e._opt.useMSE)&&n()})),e.on(Xe.removeLoadingBgImage,(()=>{cr()||n()}));const n=()=>{t.$loadingBgImage&&t.$loadingBg&&t.$loadingBgImage.src&&(e.debug&&e.debug.log("Control","remove loading bg image"),t.$loadingBgImage.width=0,t.$loadingBgImage.height=0,t.$loadingBgImage.src="",ar(t.$loadingBg,"display","none"))},l=t=>{e.fullscreen?$r(t)===e.$container&&h():h()},h=i=>{let s=Lr(i)?i:e.fullscreen;ar(t.$fullscreenExit,"display",s?"flex":"none"),ar(t.$fullscreen,"display",s?"none":"flex")},d=()=>e._opt.playType===y&&e._opt.playbackConfig.showControl,c=i=>{cr()&&t.$controls&&e._opt.useWebFullScreen&&setTimeout((()=>{if(e.fullscreen){const i=d()?Pt:It;let s=e.height/2-e.width+i/2,r=e.height/2-i/2;if(t.$controls.style.transform=`translateX(${-s}px) translateY(-${r}px) rotate(-90deg)`,t.$zoomControls){const i=156,s=30,r=e.width/2+i/2-s/2;t.$zoomControls.style.transform=`translateX(${-r}px) translateY(${e.height/2}px) rotate(-90deg)`}if(t.$recording){const i=101,s=20,r=e.width/2+i/2-s/2;t.$recording.style.transform=`translateX(${-r}px) translateY(${e.height/2}px) rotate(-90deg)`}}else t.$controls.style.transform="translateX(0) translateY(0) rotate(0)",t.$zoomControls&&(t.$zoomControls.style.transform="translateX(-50%) translateY(0) rotate(0)"),t.$recording&&(t.$recording.style.transform="translateX(-50%) translateY(0) rotate(0)");i&&i()}),10)};try{Ns.on("change",l),e.events.destroys.push((()=>{Ns.off("change",l)}))}catch(e){}e.on(Xe.webFullscreen,(e=>{cr()&&(h(e),c((()=>{p()})))})),e.on(Xe.recording,(()=>{e.playing&&(ar(t.$record,"display",e.recording?"none":"flex"),ar(t.$recordStop,"display",e.recording?"flex":"none"),(e._opt.hasControl||e._opt.isShowRecordingUI)&&(ar(t.$recording,"display",e.recording?"flex":"none"),da(e.recording)&&t.$recordingTime&&(t.$recordingTime.innerHTML=Ur(0))))})),e.on(Xe.recordingTimestamp,(e=>{t.$recordingTime&&(t.$recordingTime.innerHTML=Ur(e))})),e.on(Xe.zooming,(()=>{e.playing&&(ar(t.$zoom,"display",e.zooming?"none":"flex"),ar(t.$zoomStop,"display",e.zooming?"flex":"none"),(e._opt.hasControl||e._opt.isShowZoomingUI)&&ar(t.$zoomControls,"display",e.zooming?"flex":"none"))})),e.on(Xe.playing,(e=>{u(e)}));const u=i=>{ar(t.$play,"display",i?"none":"flex"),ar(t.$playBig,"display",i?"none":"block"),ar(t.$pause,"display",i?"flex":"none"),ar(t.$screenshot,"display",i?"flex":"none"),ar(t.$record,"display",i?"flex":"none"),ar(t.$qualityMenu,"display",i?"flex":"none"),ar(t.$volume,"display",i?"flex":"none"),ar(t.$ptz,"display",i?"flex":"none"),ar(t.$zoom,"display",i?"flex":"none"),ar(t.$scaleMenu,"display",i?"flex":"none"),ar(t.$faceDetect,"display",i?"flex":"none"),ar(t.$objectDetect,"display",i?"flex":"none"),ar(t.$occlusionDetect,"display",i?"flex":"none"),ar(t.$controlHtml,"display",i?"flex":"none"),e.isPlayback()&&ar(t.$speedMenu,"display",i?"flex":"none"),h(),t.extendBtnList.forEach((e=>{e.$iconWrap&&ar(e.$iconWrap,"display",i?"flex":"none"),e.$activeIconWrap&&ar(e.$activeIconWrap,"display","none")})),e._opt.showPerformance?ar(t.$performanceActive,"display",i?"flex":"none"):(ar(t.$performance,"display",i?"flex":"none"),ar(t.$performanceActive,"display","none")),ar(t.$poster,"display","none"),ar(t.$ptzActive,"display","none"),ar(t.$recordStop,"display","none"),ar(t.$zoomStop,"display","none"),ar(t.$faceDetectActive,"display","none"),ar(t.$objectDetectActive,"display","none"),i||(t.$speed&&(t.$speed.innerHTML=function(e){if(null==e||""===e)return"0 KB/s";let t=parseFloat(e);return t=t.toFixed(2),t+"KB/s"}("")),ar(t.$zoomControls,"display","none"),ar(t.$recording,"display","none"),t.$ptzControl&&t.$ptzControl.classList.remove("jessibuca-ptz-controls-show")),p(),i&&f()};e.on(Xe.playbackPause,(e=>{u(!e)})),e.on(Xe.kBps,(i=>{const s=function(e){if(null==e||""===e||0===parseFloat(e)||"NaN"===e)return"0 KB/s";const t=["KB/s","MB/s","GB/s","TB/s","PB/s","EB/s","ZB/s","YB/s"];let i=0;const s=parseFloat(e);i=Math.floor(Math.log(s)/Math.log(1024));let r=s/Math.pow(1024,i);return r=r.toFixed(2),r+(t[i]||t[0])}(i);t.kbpsShow=s,e._opt.showBandwidth&&(t.$speed&&(t.$speed.innerHTML=s),p())}));const p=()=>{if(d()&&e._opt.playbackConfig.controlType===J.normal){let i=t.controlsInnerRect.width-t.controlsLeftRect.width-t.controlsRightRect.width-t.controlsPlaybackBtnsRect.width;cr()&&e.webFullscreen&&(i=t.controlsInnerRect.height-t.controlsLeftRect.height-t.controlsRightRect.height-t.controlsPlaybackBtnsRect.height),t.$playbackTimeInner.style.width=i+"px"}},f=()=>{if(!d()||e._opt.playbackConfig.controlType!==J.normal)return;const i=t.$playbackCurrentTime.style.left;let s=parseInt(i,10);const r=t.controlsPlaybackTimeInner.width;s=s-r/2>0?parseInt(s-r/2,10):0,t.$playbackTimeInner.scrollLeft=s};if(d()){const i=()=>{if(d()){let i=0;const s=e.playback&&e.playback.playingTimestamp;if(s){const r=new Date(s),a=r.getHours(),o=r.getMinutes(),n=r.getSeconds();e.playback.is60Min?i=60*a+o:e.playback.is30Min?i=2*(60*a+o)+parseInt(n/30,10):e.playback.is10Min?i=6*(60*a+o)+parseInt(n/10,10):e.playback.is5Min?i=12*(60*a+o)+parseInt(n/5,10):e.playback.is1Min&&(i=60*(60*a+o)+parseInt(n,10)),t.$playbackCurrentTime.style.left=i+"px"}}},s=e=>{t.$playbackNarrow.classList.remove("disabled"),t.$playbackExpand.classList.remove("disabled"),e===ti&&t.$playbackNarrow.classList.add("disabled"),e===ri&&t.$playbackExpand.classList.add("disabled")};e.on(Xe.playbackTime,(s=>{if(e._opt.playbackConfig.controlType===J.normal)t.$playbackCurrentTimeText&&(t.$playbackCurrentTimeText.innerText=Ar(s,"{h}:{i}:{s}")),i();else if(e._opt.playbackConfig.controlType===J.simple){const i=(r=s,a=e.playback.totalDuration,rr(r/a,0,1));t.$playbackProgressPlayed.style.width=100*i+"%",t.$playbackProgressIndicator.style.left=`calc(${100*i}% - 7px)`,t.$playbackProgressTime.innerText=`${Ql(s)} / ${Ql(e.playback.totalDuration)}`}var r,a})),e.on(Xe.playbackPrecision,((r,a)=>{d()&&e._opt.playbackConfig.controlType===J.normal&&(t.$playbackTimeScroll.classList.remove(ai.oneHour,ai.halfHour,ai.fiveMin,ai.tenMin),t.$playbackTimeScroll.classList.add(ai[r]),t.rafId&&(window.cancelAnimationFrame(t.rafId),t.rafId=null),t.changePercisitionInterval&&(clearTimeout(t.changePercisitionInterval),t.changePercisitionInterval=null),t.$playbackTimeListOne.innerHTML="",t.$playbackTimeListSecond.innerHTML="",t.changePercisitionInterval=setTimeout((()=>{switch(t.$playbackTimeListOne.innerHTML="",t.$playbackTimeListSecond.innerHTML="",r){case ti:Jl(a,t);break;case ii:Kl(a,t);break;case si:ql(a,t);break;case ri:Yl(a,t)}i(),e._opt.playbackConfig.showPrecisionBtn&&s(r),f()}),16))})),e.on(Xe.resize,(()=>{p()})),e.on(Xe.playbackTimeScroll,(()=>{f()})),p()}if(e._opt.operateBtns.quality&&e._opt.qualityConfig.length>0){e.on(Xe.streamQualityChange,(e=>{i(e)}));const i=e=>{t.$qualityText.innerText=e,t.$qualityMenuItems.forEach((t=>{const i=t.dataset.quality;t.classList.remove("jessibuca-quality-menu-item-active"),i===e&&t.classList.add("jessibuca-quality-menu-item-active")}))};(()=>{const i=e._opt.qualityConfig||[];let s="";i.forEach((e=>{s+=`\n
${e}
\n `})),s&&(t.$qualityMenuList.insertAdjacentHTML("beforeend",s),Object.defineProperty(t,"$qualityMenuItems",{value:e.$container.querySelectorAll(".jessibuca-quality-menu-item")}),setTimeout((()=>{const t=i[0];e.streamQuality=t}),0))})(),e.streamQuality&&i(e.streamQuality)}if(e._opt.operateBtns.scale&&e._opt.scaleConfig.length>0){e.on(Xe.viewResizeChange,(e=>{i(e)}));const i=i=>{const s=e._opt.scaleConfig[i];t.$scaleText.innerText=s,t.$scaleMenuItems.forEach((e=>{const t=e.dataset.scale;e.classList.remove("jessibuca-scale-menu-item-active"),vr(t)===vr(i)&&e.classList.add("jessibuca-scale-menu-item-active")}))};(()=>{const i=e._opt.scaleConfig||[];let s="";i.forEach(((e,t)=>{s+=`\n
${e}
\n `})),s&&(t.$scaleMenuList.insertAdjacentHTML("beforeend",s),Object.defineProperty(t,"$scaleMenuItems",{value:e.$container.querySelectorAll(".jessibuca-scale-menu-item")}))})(),i(e.scaleType)}if(e.isPlayback()&&e._opt.playbackConfig.showRateBtn&&e._opt.playbackConfig.rateConfig.length>0){e.on(Xe.playbackRateChange,(e=>{i(e)}));const i=i=>{const s=e._opt.playbackConfig.rateConfig.find((e=>vr(e.value)===vr(i)));s&&(t.$speedText.innerText=s.label,t.$speedMenuItems.forEach((e=>{const t=e.dataset.speed;e.classList.remove("jessibuca-speed-menu-item-active"),vr(t)===vr(i)&&e.classList.add("jessibuca-speed-menu-item-active")})))};(()=>{const i=e._opt.playbackConfig.rateConfig;let s="";i.forEach(((e,t)=>{s+=`\n
${e.label}
\n `})),s&&(t.$speedMenuList.insertAdjacentHTML("beforeend",s),Object.defineProperty(t,"$speedMenuItems",{value:e.$container.querySelectorAll(".jessibuca-speed-menu-item")}))})();const s=e.playback?e.playback.playbackRate:1;i(s)}e.on(Xe.stats,(function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e._opt.showPerformance){ar(t.$performancePanel,"display","block"),t.$performancePanel.innerHTML="";const s=hr,r=pa(),a=e.getCpuLevel(),o=Ir(a)&&-1!==a?`${Rs[a]}`:"",n=e.video&&e.video.videoInfo||{},l=e.audio&&e.audio.audioInfo||{},h=e._times||{},d=e.getRenderType(),c=e.getCanvasRenderType(),u=e.getDecodeType(),p=e.getDemuxType(),f=e.getStreamType(),m=e.getAudioEngineType();let g=e.getRecordingDuration(),y=e.getRecordingByteLength();const A=e.isAudioPlaybackRateSpeed(),b=e.videoIframeIntervalTs;g=Ur(g),y=Sr(y);const v=e.isPlayback()?"录播":"直播";let _=i.isDropping;const w=e._opt.useMSE&&e._opt.mseDecodeAudio,S=e.control?e.control.kbpsShow:"0 KB/s",T=e.getVideoPlaybackQuality(),E=`\n
\n 版本 ${s}\n
\n ${e._opt.isMulti?`\n
\n UUid ${e._opt.debugUuid}\n
\n `:""}\n ${e.isInMulti()?`\n
\n 窗口下标 ${e._opt.multiIndex}\n
\n `:""}\n ${r?`\n
\n 内存大小限制 ${Sr(r.jsHeapSizeLimit)}\n
\n
\n 可使用的内存 ${Sr(r.totalJSHeapSize)}\n
\n
\n 已使用的内存 ${Sr(r.usedJSHeapSize)}\n
\n `:""}\n ${o?`\n
\n CPU压力情况 ${o}\n
\n `:""}\n\n ${r&&r.usedJSHeapSize>r.totalJSHeapSize?'\n
\n 可能内存泄漏 是}\n
\n ':""}\n
\n 播放模式 ${v}\n
\n ${e.isPlayback()?`\n
\n 播放倍率 ${e.playback.rate}倍\n
\n
\n 播放模式 ${e.playback.isUseFpsRender?"固定FPS":"动态FPS"}\n
\n ${e.playback.isUseFpsRender?`\n
\n 固定FPS ${e.video.getStreamFps()}\n
\n `:""}\n `:""}\n
\n 解封装模式 ${L[p]}\n
\n
\n 解码模式 ${u}\n
\n
\n 渲染组件 ${d}\n
\n ${d===z?`\n
\n 渲染引擎 ${c}\n
\n `:""}\n
\n 网络请求组件 ${f}\n
\n
\n 视频格式 ${n.encType||"-"}\n
\n
\n 视频(宽x高) ${n.width||"-"}x${n.height||"-"}\n
\n ${e.isPlayer()?`\n
\n 视频GOP(ms) ${b||"-"}\n
\n `:""}\n
\n 音频格式 ${At[l.encType]||"-"}\n
\n
\n 音频引擎 ${m||"-"}\n
\n
\n 音频通道 ${l.channels||"-"}\n
\n
\n 音频采样率 ${l.sampleRate||"-"}\n
\n ${e.isPlayer()?`\n
\n 播放器初始化(ms) ${h.playTimestamp}\n
\n
\n 开始请求地址(ms) ${h.streamTimestamp}\n
\n
\n 请求响应(ms) ${h.streamResponseTimestamp}\n
\n
\n 解封装(ms) ${h.demuxTimestamp}\n
\n
\n 解码(ms) ${h.decodeTimestamp}\n
\n
\n 页面开始渲染(ms) ${h.videoTimestamp}\n
\n
\n 初始化到页面渲染(ms) ${h.allTimestamp}\n
\n ${e.recording?`\n
\n 视频录制时间 ${g}\n
\n
\n 视频录制大小 ${y}\n
\n `:""}\n `:""}\n
\n 音频码率(bit) ${i.abps}\n
\n
\n 视频码率(bit) ${i.vbps}\n
\n
\n 视频帧率(fps) ${i.fps}\n
\n
\n 视频峰值帧率(fps) ${i.maxFps}\n
\n
\n 解码帧率(fps) ${i.dfps}\n
\n
\n 音频缓冲帧 ${i.audioBuffer}\n
\n
\n 音频缓冲时长(ms) ${i.audioBufferDelayTs}\n
\n ${e.isPlayer()?`\n
\n 视频待解码帧 ${i.demuxBuffer}\n
\n `:`\n
\n 缓存时长(ms) ${i.playbackCacheDataDuration}\n
\n
\n 视频待渲染帧 ${i.playbackVideoBuffer}\n
\n
\n 视频待解码帧 ${i.demuxBuffer}\n
\n
\n 音频待解码帧 ${i.audioDemuxBuffer}\n
\n `}\n
\n 待解封装数据(byte) ${i.flvBuffer}\n
\n ${e._opt.useMSE?`\n
\n MSE缓冲时长(ms) ${i.mseDelay}\n
\n
\n MSE缓存时长(s) ${i.mseStore}\n
\n
\n MSE解码间隔(ms) ${i.mseDecodeDiffTimes}\n
\n
\n MSE解码时间(ms) ${i.mseTs}\n
\n
\n MSE播放模式 ${i.mseDecodePlaybackRate>1?"加速":"正常"}\n
\n `:""}\n ${e._opt.useWCS?`\n
\n WCS解码间隔(ms) ${i.wcsDecodeDiffTimes}\n
\n `:""}\n ${e.isOldHls()?`
\n HLS缓冲时长(ms) ${i.hlsDelay}\n
\n `:""}\n ${e.isUseHls265()?`
\n HLS缓冲时长(ms) ${i.hlsDelay}\n
\n
\n HLS待解码帧 ${i.hlsDemuxLength}\n
\n
\n HLS待解码视频帧 ${i.hlsDemuxVideoLength}\n
\n
\n HLS待解码音频帧 ${i.hlsDemuxAudioLength}\n
\n `:""}\n ${e.isPlayer()&&T?`\n
\n 已渲染帧 ${T.renderedVideoFrames}\n
\n
\n 已丢弃帧 ${T.droppedVideoFrames}\n
\n `:""}\n ${e.isPlayer()?`\n
\n 网络延迟(ms) ${i.netBuf}\n
\n
\n 缓冲时长(ms) ${i.buf}\n
\n
\n 最新缓冲时长(ms) ${i.pushLatestDelay}\n
\n `:""}\n ${e._opt.useMSE||e.isWebrtcH264()||e.isAliyunRtc()?`\n
\n video显示时间(s) ${i.videoCurrentTime}\n
\n
\n video间隔时间(s) ${i.videoCurrentTimeDiff}\n
\n
\n videoBuffer缓存时间(ms) ${i.mseVideoBufferDelayTime}\n
\n `:""}\n
\n 视频显示时间(ms) ${i.currentPts||i.ts}\n
\n ${e._opt.hasAudio&&e.isAudioNotMute()&&da(w)?`\n
\n 音频显示时间(ms) ${i.audioTs}\n
\n ${e._opt.hasVideo?`\n
\n 音视频同步时间戳(ms) ${i.audioSyncVideo}\n
\n `:""}\n
\n 音频播放模式 ${A?"加速":"正常"}\n
\n `:""}\n
\n 视频解码时间(ms) ${i.dts}\n
\n ${e.isPlayer()?`\n
\n 解码前-解码后延迟(ms) ${i.delayTs}\n
\n
\n 总延迟(网络+解码)(ms) ${i.totalDelayTs}\n
\n `:""}\n ${e.isPlayer()&&i.isStreamTsMoreThanLocal?'
\n 是否超过一倍率推流 是\n
\n ':""}\n ${e.isPlayer()?`\n
\n 是否播放流畅 ${i.videoSmooth}\n
\n `:""}\n ${e.isPlayer()?`\n
\n 是否在丢帧 ${_}\n
\n `:""}\n
\n 网速 ${S}\n
\n
\n 播放时长(s) ${Ur(i.pTs)}\n
\n
\n `;t.$performancePanel.insertAdjacentHTML("beforeend",E)}else t.$performancePanel.innerHTML="",ar(t.$performancePanel,"display","none")})),e.on(Xe.togglePerformancePanel,(e=>{ar(t.$performance,"display",e?"none":"flex"),ar(t.$performanceActive,"display",e?"flex":"none")})),e.on(Xe.faceDetectActive,(e=>{ar(t.$faceDetect,"display",e?"none":"flex"),ar(t.$faceDetectActive,"display",e?"flex":"none")})),e.on(Xe.objectDetectActive,(e=>{ar(t.$objectDetect,"display",e?"none":"flex"),ar(t.$objectDetectActive,"display",e?"flex":"none")})),e.on(Xe.occlusionDetectActive,(e=>{ar(t.$occlusionDetect,"display",e?"none":"flex"),ar(t.$occlusionDetectActive,"display",e?"flex":"none")}))};function rh(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===i&&s.firstChild?s.insertBefore(r,s.firstChild):s.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}rh('@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@-webkit-keyframes magentaPulse{0%{background-color:#630030;-webkit-box-shadow:0 0 9px #333}50%{background-color:#a9014b;-webkit-box-shadow:0 0 18px #a9014b}to{background-color:#630030;-webkit-box-shadow:0 0 9px #333}}@keyframes magentaPulse{0%{background-color:#630030;-webkit-box-shadow:0 0 9px #333}50%{background-color:#a9014b;-webkit-box-shadow:0 0 18px #a9014b}to{background-color:#630030;-webkit-box-shadow:0 0 9px #333}}.jessibuca-container .jessibuca-icon{cursor:pointer;width:16px;height:16px;display:inline-block}.jessibuca-container .jessibuca-ptz-controls{position:absolute;width:156px;height:156px;visibility:hidden;opacity:0;border-radius:78px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAE4BAMAAAA9UfJZAAAAMFBMVEUAAABHcEy0tLRZWVmysrKoqKi1tbWvr6+2traBgYG1tbWWlpa1tbW1tbVUVFS1tbVGCHqkAAAAD3RSTlMzAO9U3LSWySp3aZcVRDUDw823AAAJYUlEQVR42u3d32sbVxYH8EPHxgg/lBsa7SBkukmpSbwLI2KbEPpgZ5MQtwmM0wRMmgdhP6RgEuwlSVnYlmGMYaEvMU1KKX4QNq0pocVmm7CYfRBaQguFpbgPKRSC/4V2LGliO+bulWKrkvVrftyZ+WbxeTRG+nDnnnNmRjP3EpMR6tMH18du/0Xj1tGz5+9cf/DUlPKx5PsTkr8s3eZ1cX7ym1zkuI/f1wTFunNt9fP+FIno7/98/tFY+Y8ffBUlLrmkl2Cr96guTv27BMxP5iLCqUvi68+tpqhJKPNXBH3SjACnfimm/7Wmsl3fI/FP75lh457oPH+1Da3M+1T8481QcT0T7UetevR618LDPdH4hTlyHLGH3LoZEk6d4PlvyVW8pfNeMwzcDwa/kCKXoTzk9tfB455o1mXyEIOa+0PrFvcFt+fIU8QM/k6guOQifzNFHkN5l/flgsOJVHibfMR9l2nhBqem+VXyFZ/xghkMTp3il8lnDPKiGQROhs2lzjEuKcVW1uWk4ybk2Eq63pxk3CK/RZLiJO+Ti/vZXw3ZX1E+kon7jv+JJMY/+Q15uIRWIKmRthZk4VTDTsnFKYZtSsItWiskObq1Pjm4f8gqIrUF5W8ycAl+nAKIT/iCf1zSKFAgkW4/7drifrLmgsHF2k87alvhblFAcbJttWuDU/VtCiyyedMXbjGfCg6n6H1+cHE+TQFGFx/3jksa2xRoZO2cZ9xsUJn6e8aOeMX1aGco4Biw1jzilm0KPNJb3nBxvhI8rrtVTlCLK5ptCiEyBS+474POhr2c+NA9Lqm/QaHEiXzONW42yN5Q2ydG3OLU4MvI7+XEdImbCWvgSkN3zB1O1YYptOhoNnRNcDM2hRjGMTc4VZsOE9fVZOioyYyjUKPJrKPGNW44XFxX41rXEPc4vFTdS9iLTnFJ4wyFHAO2U1zcSoWNU7RLDnFTb1DocaLoDJfgc+HjYo3uTjTArW9TBJHdcYJTtdEocJ0NCnE97nGBIon0RQc4YzgaXIfdHhdBHdmrJuNtceubFFFkdtrhVG0lKlx3XUrsxz22KbIwLrbBTQ1Hhxsotsb18FR0OIWvtcT9Z5sijOyfW+KM6ShxXXYrXMJKRYlTtIUWuLubFGlknrXAGaPR4jrt5riERRFH7XGtwc1sRo3LHGuKi/qo7j+uhJOr9flKMBW4QR2uxk1NR4/rKjbGRdpXG/bXKtxrAEdVHNfTDXHLf0TAvbLVCJfU5hBwMSvXABfPE0To4w1wP25i4DLPG+CmRjFwncV6nIpQSF4UE7MOd7hAIJG+VIe7u4GCG3pWh0uPouA6C/txMFOuetIR3JSrmnQEN+WqJh2BVbmaSreLS+JMudKky9Xg4jYBRXq8BndoEwmXOVKDWx5GwnVs1eD0OSRcLF+N67EIKrS1Klx8GwuXHa/C/biBhRt6XoVbnsbCdW1V4bDyoZIRZZwKlg8iI8wKLl5Aw73oEWXcoQ003NCRCm59GA3XsVPBTa2g4bqLFZyWQsMp1h6uJ09woa/t4tCaV6WBEWSy7qYrQSbrbroS2MVNzUUOAXbWSnel0sU+AUbpsl/gEjYizlgo4w5vI+Kyl8o4xEryopYI3N1hRFzHszJueRQR17lVxqXnEHGxQhmHd06yd15CgBcQlcsIYokCJi69IHDxbUycOGki9toGJm7otMC9/ism7tXfBA6zBperMIHW4HIVJsDrwsrVIYE2CNEibIHDbBDlFkFJ0AYhWkSOemxUnLFGqN2r1L8ItXuV+hfFN1FxmXH6wwYqbuivdAgXd4RQ+36p8xNq3y91flqfRsV17dD6KCquc4eWcXFbtLyCiusu0hQ0bg4VFytSGhdXICOFilNs0nFx+QOcZ5xGsGEd4DzjOC6OH+A847QD3P9jtuJ2CGjcQeP3gYM+2YQ+TYe+wMG+NETGQd+OgL6RA30LDPrm4eu/ouJe/Q37hjX0rX7oH0mgf16C/mEO+idN6B+DoX9Gx34AAfrRDeiHXqAfF0Lt/OUHrVAfUcucRn+4D/qxSOgHSqEfxcV+iBn68W/EV3AqD85Dv3IA/bIG9GsumC8IaSb+q1XYL6VBv84H/SIk9Cuk0C/fQr+2jP3CN/Sr8tCLDEAvzwC9sAX0kiDYi6lAL0MDvYAP9NJH0ItGYS+3Bb1QGVaP2LfEG/TieNDLCmIvyAi9lCX0IqDQy6diLzwLvWQv9GLH0MtER76rRqWxPgdemtwYf9kWdYdeDh97IwHoLRigN6/A3vYDesMU6K1msDfpgd7eiOmjSEf1ZdpSC3ozMuht3LA3wIPeOjDSTRdfKb7M21VCb/QJvUUq9uay0NvyYm9oHFFKdDvaChp6E23s7cehN25nh5G3vE8aZ8LGDdjMIY49zoc9dPpFx7ikHnIh7sjnHOPYTMj36oxjzDlO1UI9Xe9oUICb49iMDTBwzXCqFuKsG2gycM1wYtaFlrCK3mTgmuJU7UzkA9cUx2bDGjpFH2FucUk9pA57onGNa4lj31uhnJzEtA+ZexxLh3KpkykwL7g4D+GUuJuPe8Kx5RCuJtJbzBuuJ/hyMmCtecSx2aBzIqaNMK+4pBHwtU7WznnGiZwI9Oykq1U2tMWxxSD7hKL3MT84VQ/wwGbzpi8c+47fCsp2kt9g/nDsp6AyNqb1Mb+4pBFQKU7bpm8cS/DjQdg+aXT/wTWOzfLL8m2DfITJwLFFS/oZQHf7CecQpxq25GqnGO0nnEMcS2iSq13WWmCycKLaHZebDDeYPBz7mb8tz3aff8Rk4tiivJQd5H1MLo5NyNIN8t6cbJw6ZV2WYys6tTnHCZ2MsRM2k8nHSdG5srnBMTXNr/qzfcYLLmyucEyd8FdR7vNeNzZ3OJZc5G967mTKu7wvx4LDMfYFtz2efMYM/o7LL3OLY080byVlULNusqBx7AeDX3B9aJWH3P6aBY8rpUX+W3e2t3SXqeAZVzq0/JyLmRe7wt0fUs849t8Jzv/u8Ngq/+K8d42FhxODp/P8VQc85VPxjzc9folXHFO/1Lh1rc3BjT0S//SeycLGCd6Sxvm51abDp8xf4dyaNL1/gw+caBhLuvj6O6v36mWn5scEPe+H5hMn4uP3hUEAr63e6y+PYX//qflHY+U/fvCVzw/3ixPD98vSbV4X5ye/yfn+aP+4MvDpg+tjZ4+K8bKOnr1z/cFTU8rH/g92biFxn2S73AAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;transition:visibility .3s,opacity .3s;right:43px;bottom:135px}.jessibuca-container .jessibuca-ptz-controls.jessibuca-ptz-controls-show{visibility:visible;opacity:1}.jessibuca-container .jessibuca-ptz-bg-active{visibility:hidden;opacity:0;width:156px;height:156px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAE4CAMAAAD4oR9YAAAAM1BMVEX///////////////////////////9HcEz///////////////////////////////////85yRS0AAAAEXRSTlO5DCgVgZBxAK2fQDRkBR5XTPLKM/gAABnnSURBVHja7F0Jkqs6DGQPO9z/tD8Jq6WWbCCvIjKfzAGmulrW3ooedr6ui+M4TdP++SXPr1l/SdL3aRrHhv7ZyA5qb9xe0L3Am+DrkzeCL/BeX908MezTuPsfOArdgl3KsZuhq99fk/Tx3waum+ByAHua5QbYilkzY1aP728YhrH5InrfBa57OLAtVjpRbYaumex04dq4APeC7vnVSfo/45bXLe33jGscMx3f0A1vyg3t69e2dRL/NeA6wrgdcCvjyPM2U25mXDt9xVD3f/qN0yi3Mm6P20S54vlXtGPS/R3GPSbYOsC4ZAvmJtiaGiL3Zlzx/Ht+Y/KXTJXbqmaqe9za1VYn3N7YpX/OVGev2qduOLIiB7xqOzGuWCiXFVmWtU3368A5lkqeOJI21I5XXaORxVRnxmUTdNnY/4U3riNvHMJts9XRtdXVUttipdzrK/4x7UyY6sK4Gbo+nU21T1zKcd9AGJetlMvyLKvj3zXVfeqQElMljINx3MK4xVQ3xj2Ry7N/6CiMOIfYyVUXWxUyBx7HuZRbcHt9bf/Lb9zsHlzKzabauJaK47iVcC7jJujS33/joKkmxDnM4QiJ4xDjZuT+DXQW3jgxV012qcPuiePhCGfchlv1/P0D6Czmqmuq2gPGkbIS8Q4ZsNU3dGP3Y2+cW1RyKpkrbAnwqhi3iXHFHrU3bFVV5c3vBsCsOALjkXErAW85F3rjFvBm5Kos+TngCOXYG7fA1ojFER7GPUHbmer0tfGPANeROM6pjvDMQSkrsWQ1d564Fbr61964TvSqDa6O0ELmAtvGuc2rrpQrn/aa/qCpYq+6mSpOVhnjWBy38u2JXFl9yL8acg6CV3Ur5yxVZfW4AsRxG+XKssz6n3njVMYR4Eg8sj1yi3tgtroxrpyhG38gc+h8PYddPQ551dVQW5jju2/cG7kXdB946Uy9cbDnQOpxuCCHcq5dHDcht8D2/K67VxPNGtLJd7qDTcgb1zLGbXEcY9z0Fd39GReTzIH1B/2lcxrGTYxjXnXyqxNyef8zpipVlfDsyCCmDkuumhGvWq6W+vyisqxvDJwwOxJQO6fNmjaQcRt0ZdR2dwWOFZViuculNWtgBZjk+DNq1cq45y+Lf5NxE25B3oEyLueFJWqtT+Ciqr8r48jsCAyAG+2Na53MAdQxX16VhHEL4Z7Ilc2dGad28pskaULiEdDlyijjdqa6gBeNtwSu63AnP3V6NUnAG9cu1RHOuL2hVi5qr6+9Za4qV0dCGcfCEfDIufWRFbsZvKy7KeNgW7XHvRqxWfOGLhO6XCrjoiiPb/rGdZ75uGRfj9u3B1sWAEtdLuxVF/Cq9HaMe4A4TptkZYwLqI44rmGDbUe5E8hZcg54zquRbHXu5NN6HKuO7N84YqwbdGV/Q8YF5arUN7CJTNLkgplD5T5xG+OOI2ehAhxv00ocOlpWwhHwljns5uNg6bxCb9wbueSupip6VTnj2jGudSvnOeqrVo6h7vl2nHM2K8AkV1WyfDYDvHUcWF+1VBl3EDlLKdc2dQ6aNbhXw2eAt14Nf+MqFse5rDuS8tucHUmhqaJppYF6B8440h7E8cjhqMTiLtcaAL+ga9jWZb35hpbHceyNI9WRSmHcE7n4jqbqTp2D2nnzgm154mB1hJQy1cwBIpd3twCOrjnEoDsoTZ2jepybb2VKrhpx3zB92Z29Khpl1ZN8MHWzJV1CdYQHJEeqTMbqcfEMW+obLBwES83w7AgvY0YlMNT3N96GcXEHGQdxG2t3CQ5kDkoFeO8esHd4fc193jinAtxvXhUN3Ywz5VAFGM3cENfgVM4x5YICYRumqu5yIVMdJuhaLXMAFWBKOIhbWFBiO44Dg4Usxx/cCrDyxqESMIYuu4lX1fYcGnVaaVmtKXZxHOzW5Bvfqtk3iLAFuVaLew4HluDUzIH1VYMZF+AgLMZxcAYY1uNYBTgrwPDIaqxOQ1p540IchBFTJW9c2ofNAO99Q+sYaugbJ35Vd4sKsPbGqVM33KsWmdpXLeXqufsVNwhH8FyhOh8n74foKb5WVDr0zFky1Rgt+iaJZyJTWErKMynpqsqgVy4q0xv0VTvZq0pJPq5jzn41zzzVET0aCYjmTO05OLaaBEwWqhvSenUkKtVw5P0N96mOpNr2YCPuh4AJCGEAoioDver7628Sx8WAcU2i1eM259AWhZBzuQEJieN07JR6sCHgXoSLnepI7yo9NqgCLE5A6K4hjHGKsVqK49JYEGyBg4XIq2b7FREUx5Xu2LkXOtmz2pJBW5sOqdjJF3sOjHG5fz7OT7n8DtURwjjPtBKtx7VLOa6Q4zh5Wkn8xhvU4xbG9al/s2bAbxwYkJO7XCGME43VIuMc56Dnqi7hpPE4cVopBLnibozTp5X4DHAQ49iwfsCX3IhxYFoJB8C0y7Xr1iwBSZXDulIUjF11G6+qr5aPALlCmTrfyWfQzCEK49xoPMnnjFMaq3QlX9tzQPuq0QFbLeNbMU6cHRn3Sb60HwJ6NXAhKQi61nzpPAbtQaY8jUUgQnRHSodxZSjjoig161W7HePIRGZDJzJHQXiEzE4DpRtSjotCHzkUkhj2qqJi4V54T1S6cWwVp/nhjAP1JQuDhbs4TtFW0spKTgW4UHJVFv4GQpcZA64jkt1xDNS8lDEv9Y3z5KpRGY4biIINMC7e2lxKNFJDqUfQquGZA2yrHoINUM7G6ZX1iVM2RKDUI08dssVUfduDRyI5QDkbFWCnscrWVWV1/RZ2uaRc9UyKL1LO0r7q1qwBm761WsmEUjdge9ApAB9iHHWslq4kMalHTbHQieO0zXKljHmIc4XdOE695yCpsg7eOE7t5B/4Uqv1uDSGKhDYq0r6yQWYj5NnRw5BNxjOHJAKRJB+nJqr4jcuOki4qOzs5qrgulSDJzJHUcyrCNMdOc44ty5nel815KDZ4HTypeoILAEfZJxbCjYkSpVKgZx/IpOfXgnarDkKXWIrHAm7kiTqxw1er+oQzg2Bj32FTcYJ2kpCIx9PK2XMq1ZCz+EM46LYZK4qaCsdmo+TqiOV5FWPITdYLZ2jOqYa/6LN8kJSZT1dxkSTJEYKmZ2/OuI5aIYYh+UzKn3TN9A9mLjL1cl6LexKkqof575xVJWVx3HRefdgUbGQNGs2U2Ul4HYQ60o+HeBzjCtt9VXVqXMpc3DEzh2NzEJSnr7OuG35wUTpPGjqXN3lQgdE0AWRA2sOHls1eO2yh/uqWM1LbUgvQzeatOhR5NZM39QIBNyQbviBVajYItbOYa56knCbrRrUj0vxTn5QVQlOnUtdrjKKztuqpbMEJ27WtCG3BzX9uMPfYqsmlW7SPnRfFeSqwTrAp9641VZtXi1PlX1VN44THzlvPe4k45aZLys9h+7cvuqsAqEpBAm6I9HJN24pZ9oIRzp5XzVUsVCZOnd0Ry4zbu52GdMBDn7j+NVyYXaEneW6+sbNrQcjtwdJCTh4WmlrSLcF3axRZ4AvMC6zxjj9annty1X9M8BoefBMQGKudB5UjnMnMltQV1JuD5JK5jnGTUU52zeke+4cfMJ7ygxwSZuDJ6EbzDEuZF+VNLnczCETlPdkdf3Tj5yhAHhNVdV9VXgJGV9JyqWjjRdS1fWRs6vmRctK1KuiLD/b22q2KyvlWJT1HOPeo3IWqyNwlwtrxJNrlwW69ZNr0qKnoBsfNrWVcH+w9gzIFXxDeisr5cxSrzCusFVWkpVukH7coF/0zQRt0a2QGZ1HLrfAuIfDOL/uiLOTz9UMMiTmtXMOVXmxW/P+OqM6wPBKEmLcbuiGMw4lq9cmIPbewa5iIb3LdYxxKHMouYDcSeRqcxd9+dS5VFWCGZd3e9DtR5+21dbYRd/1EAaagUC6IzDLV7YHj4pSKbmDkZRLnmRNcHeQ3azZdvLJ9qCUOVyhXGVmQUSpx9GWAzNW6Y0DmYMzrbTeHjzxxTeI41zktugXtQezAsRxon7caUt9VZZMMQ7pAPMnjnTyB5lxJHPgU+enGTeajONUHWB46wfW41jmAE79nHerNiYyFeXpBu/keycyM8983CWv+sxWLe2rsgpwH7qRxPuqb7pl6IKe61RPYpcbvefQy3e58LSSbwY4B071CuNKk31VtswlTyuJ+6oZuss1h3HVCTEDluZb7Ks6prqrjijlOLTLxRlXUhng85RLo+77por7qp5c1fUN8I1Tbw9eqce9ArkvA6eqxOOr5UQGgrdVC1l5GszHnYSuNsC4OKgeF6au73S5Mt983IU3bvwqcN3jAe9y9VgkvvHPskp7DuI9h7PfYOGNw3EcH7rx91XRPbNPT2TOEbCNNw7uJOGhG+naD8+5PG/cJcI9gYu/CxuYVuqd+6reHbgBWqrvavlV5LLvAqfdc6AFYElcyW1IS0eScqg7ch65/MvABXW5ElWvZXDiOL2Tz3VHzn7Vt4F7iNuDobMjwp7DUh3hfKs+EQCbAs43O9KgG9KDrK6vMe5qIPdd4NS7XFLi4NxzADf0eEPa8aqX1lV35REjb5zac1geuYVwtfjGbTmXsJH0qf7g14Hz9xzE9iD0qigewTv5F71qaeKNwz0HXI+jb5zLODABQWaAP+MbXA2SbxdH9KlzMjw9jvAUMr72o6363hQ4VyQ+lU+vkH70ALVFM2cnP8f1uOojhLPgVZnWI7y9Enjtcr+TT/qDJdj0LW9tqlgFQtUdYQfNQupxnHE3dw5aripmDgOcOt90gHOpOvKRF85EOCJKPSrVEa/y9D9QLDQEXKco3UiqVPtdrjZIIxNuSEeX+qomc9U+3S/WUIUgvD2o7nJ9UnfECnAPWQUiSOu8HYKERz6oO2IDuE7THcHOATIO9xzQhnT1IcblVhjnagRp8QjZVw1gHOFb9ZnSuY1OvutVe3/86w4Be7XOc6GvetsuF47jAq5dElFWn9a5oJF5YUDOBHCdds9BzRw2xrWy1jl946qrC6tfb0i7uWoKZ0eaoJs1e8LR+6pQPy66GMiNhqaV4ljbc/DqjrTC1fL8n/RVa0ummiI1r0a/yyUPT2dcXBR08s9Cl9gVpdKvEvgO00LB7qta585g4eP7jIuDxEXdaSV87TID91WdiUx67uf011lkHBTea/R6HN1XhTdr0AmROw9Pd1h5euurJvxKEh2e9uyrfnYn38q4vnp7cLchXXuVbtxdLoFx1UVtpWnv0uLNGudquTCROXj2HHI6riRK791zJakjIxDKRGatMI5fu8z81y4vzU5bE2yJmYLyFsc1jaythPcc+CW4j2grGVi71GTQgnLV1tFrQduDUj3uWvwb27p2Sefjel/PAXXy+QywoFh4IZKrTF67lC6I1H6NTHEGOBeWB88LoVm6dimoGaxO1a+RiafOpX3V8r7yGayOuZfPgGsOQhy3V4Fgew7wSlJ5hXG1aY1Msj2IK8B0BAK8cYIIxBXG9bZuD6ZUlCqk5zC0x/Yczh9YtSVK9ZA3pAN6Dqq6vnAo9ANx3Ndl0LazXPK0kq/n4J06F+45XMkc7Ajv0Sy/VzZrpAsiLUnyhZ38fQX4vOqIOXX9o9cutRlgfZfrSuZgTVxU9KrKPQdQOgd3CZB7OO9VzcnZ4pYDHddnkoVSrprlAXe5ynN5gxF1/Vi7ocenp7XdcueJyxSt8wtjhRYku2EcB3Hb1LxqHMb9192VJTmuw7DxSsfxdv/Tvn7TSceiAEpylqYnH/lWsWBRXABMVLHQ8B4cjvWUfN1xTYU6wJEqqy7y1ynBEIGt8ycqBxe2BGh3JEt3hO3HtXjm0KFJ/kHIOTDCmEUM2RFMH9ygn8N+WoNmDpcLZEgfFuz2pQPMKof7eHBME0RsxAVX3OFS1Y/Zj77jtGQ34nLRWjVeHtFF/pOIc2EvRdf1m/2UKy11s+8qtXzmAKQMhiNNTDefqiWtFIlkQqEbNJFuO7g6oqr84p8PC710IxN0R0bK5VIFV2svTx9CnCPTxspm1iiGiBKeptmh26tAYOXpp+y3HSGuqUwnONzIZN7bRAdYp4bDZpee5qq5OsAKcdTQISjykUjmM/aq3lRZK3rH6a5SOMmPZw5BQ47yQ05rvm3NVVXhkLCs0YqF2EN60A4iw8Ev1dtcNXvmsGK+qukh/QIRtEHE06cK1fXtKRfLqoTLRadcw8Ev1ZkTXBXzVdkdt5k1PvtQo/24I604520lvq0EFAvxXLXlytPHpjUXcRU4tTuiJvkx4EbugxHojrRJTn4p5jY3gcspucLQKW0lVnNhFQhF5ir+VhsvgZsN/Tji9cOcVybD6wcOuQ5MuXpxirhyt0tTea9NTPKLEVf7CdzMaZdZbpd0Pw6LZ1wiN7PhWGpwk1Uz/BzQDsSEnOB6vXT+cLscntoB3sQZ4qiaV/qOixjSJYgrBNwwu0OcSYKzzbe1ExwYrF6InFdpVp3EG+IIJSlsnWv9uEQ/DrMH497IcOgt4hNxC9vXv2b5ElhU32fuuF78IQ4r3XyreV3NST5V86K16uG6YRF3iIt1gJscxRbgE9oG88E2oa5fdMu14h9x5pZX2I9DuaGn+nGXmOdw6PHrvh+X9OWagGdNbzCkI5uk7NhpwHliSDf2sIY4wQHl6ZysWvoaqcUz4hLyGUrsfF85QIZIvASsh1zZsYsA54qTDyuHSAViM7wH+x6NarDWeRHiFpHT3HE1g5zldsk6wEDOdiiwJejFJeKYvaqtWEhFqShfFSkWHikaPHZH0qJUxEOvnK9a4CE9ibvACVQsbMLKwWTWGP6qMeKOAW6o3AWOXHHZ/TiD55BGXHZW3UScfqqPVdbGMjSLa1VVcRG+KmRI53fOOxGnn2piedpgSK9GB5h0MssBVzsM3AwdfXPuuFh3ZGLaonBUk3/J9eIfcXDmcC1RLEwotgTvuDzIDY3LwM1z0kMam/1gjcyWjQePq7VscjrE2YuFxNHMLFWB1vlwKDO4rlX1tj7ROidZNc1XzZJPZh/q73O5BPBVo90R5PaTyKqYPVhcdK3iGXHxJB8RRLT14KZYl1FW7RJa5zkf6uw2cJJ8x5kbmcDsx+yO6NglQreInO+Oy9oBNry348qh2M5hFTkH4sysihA3WXNVvAIciQSVtH2d745kdZUYQ9pa1o8QNxzLqO4m+eFcNRk6BLmWiHZ3gK+a+FZH8Y444q9qbuuTmcMLlad7Ee+Iq9gOcNJ7cFqZDjCXOs98AV9m8Y84OFitI7fLK0VcwHPoqZ+Dks+wPtRhEf+IS4kZ1ElqOZrW3CBH+ar2O24U34GT8rmqntWsif24jjFrrCtuEjkD4qC2kpqrjrQ9cpDLZXlIt+I+cEl/VernsB7Zj9PTQZIYKjkX4iCz5go7mYpZY2qdI77qH+M9MtRyGsQZXC5rrzBWnt77OQCNzKB2YIi7ipwDcZXJ5YJS54p32UM/h84WAmZZdZMTBE435LLt3sm2foajbyqtTnKCwCkVCFMlHnKSpkhev4UdYHDHke5IK2cIXKACYbuWm7UqVp7uzDsOI66bzxE4ogKBZg5ZtWqCIR2+4wDiLtl2s84m+VW8ra+YNXZ3BHaA4VwVvn8vjcipEJezr8/UDOgOMDeYYv24ZGXvtzuS0Y9jO8AT3QHmnPzhz9G4OZs5QKIvFgJW40FYqraAWRP4OQSRK4qbM55Dxpeqd4B/uiNTmj1oVg5ZhZbvKZdi1mBHMyIuanPydXdk97GW4U28GZqFSjdL8h2nkgN+x7E7bo+40rj50AHOkTq3NYIQ4tpolRXKi36/Q0rj5m2uWkV81ZS6/hRvK/XRyIHRHIby95v/d1y9WEk1lmW1uVx4XekWua4SOSHiKuZnZu3HYXV9yh6EPIc74NojBuQe9uMqUz+ujp4jI+2dt6w7Qp3ghuw+krNaNctBrwYqaNB7MHgAdyk/h5K+pdfx4GzusoafKujHRR3gDu/HhfpxfxF3lTMGbrZtCdB+XIi4KDegmQPagbh1zsufIY4QV2ltJcVXDTn5EeKKuFyqcmgrOWng9g05pZG5RFvnd8SNtDuiPKRbw9H3/ztumkVOjrg5ra2kEIe7IxBx4e7IA3DjMwf3eMfhh9xovH/73dZ5n9cBHrpFzhs4hbhgB5iqeaH5IGDWtCazZuhnOXHg5jmdVX9mDte0u9TjAQz9HB6Iu4zPHt2v7kgNe+cb3FbqeVa9qBfw39C1jZw9cMBDmr7jwqHDylzL+5Sfw2V9wcn9Iy5qZFoTaZRV9b7+k1nB55Sr2gEOaysFiFO+tCSrhqsj2yzyjyAu3lYCHnojyap85gAdfV9wu3l+x2V0R36INSvWAUbvuMvzydRprWogTmfVO+AI4uB+XF/JvxK4UHekMZRucHdkQhsQvdqPuwGurV95cl+LhUR3hPfjTN5lkFa78bUH97StdEdcOJC277h0bvgO24ty6RkQV5OtG5Pn0GIy19S8/OCeKofojlu47gjVT+4/EjZvdu9grnq1uVxAB1il1beEzRtBJJQICv1VMeKU93a0OzItbzq5k90RgLhl+XGCqy3ERdYrO0fftXnb2T3VqjfE5aigMbf3YANirN54co93XMjJT20rhWteP5Hrr/NbT+7xjoPMctOzJkqq6/Luk3u84+7vuGUBSzeBweoE3yPTm8Hm444LiA5gyMXuuJU56G3NR07uAXHVwwo5fgBTf1Xo2rjVnzq7r6yK1LwSr5HHHTdt9fy5k5/R7XLcJdX7FbeOy2dP7trPweQ57FRZx7r6+Mndq3ldEzrAY938ysl9uiQ1cJNVa2SO16X6tZP/dj8uDqJW2VfM/O/ftf7FmPkK3OMZ3MAu8G3T6ytiTTU7OK8jxMlfuN1idg/X91/9VUZ81WOVo8P+Bw+0DogP6NDPAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-ptz-bg-active.jessibuca-ptz-bg-active-up{transform:rotate(-90deg)}.jessibuca-container .jessibuca-ptz-bg-active.jessibuca-ptz-bg-active-left{transform:rotate(180deg)}.jessibuca-container .jessibuca-ptz-bg-active.jessibuca-ptz-bg-active-down{transform:rotate(90deg)}.jessibuca-container .jessibuca-ptz-bg-active.jessibuca-ptz-bg-active-left-up{transform:rotate(-135deg)}.jessibuca-container .jessibuca-ptz-bg-active.jessibuca-ptz-bg-active-right-up{transform:rotate(-45deg)}.jessibuca-container .jessibuca-ptz-bg-active.jessibuca-ptz-bg-active-left-down{transform:rotate(135deg)}.jessibuca-container .jessibuca-ptz-bg-active.jessibuca-ptz-bg-active-right-down{transform:rotate(45deg)}.jessibuca-container .jessibuca-ptz-bg-active.jessibuca-ptz-bg-active-show{visibility:visible;opacity:1}.jessibuca-container .jessibuca-ptz-control{position:absolute;left:53px;top:53px;width:50px;height:50px;background:#fff;border-radius:50%;transition:left .3s,top .3s}.jessibuca-container .jessibuca-ptz-control.jessibuca-ptz-control-left{left:33px}.jessibuca-container .jessibuca-ptz-control.jessibuca-ptz-control-up{top:33px}.jessibuca-container .jessibuca-ptz-control.jessibuca-ptz-control-right{left:73px}.jessibuca-container .jessibuca-ptz-control.jessibuca-ptz-control-down{top:73px}.jessibuca-container .jessibuca-ptz-control.jessibuca-ptz-control-left-up{top:39px;left:39px}.jessibuca-container .jessibuca-ptz-control.jessibuca-ptz-control-left-down{left:39px;top:67px}.jessibuca-container .jessibuca-ptz-control.jessibuca-ptz-control-right-up{top:39px;left:67px}.jessibuca-container .jessibuca-ptz-control.jessibuca-ptz-control-right-down{top:67px;left:67px}.jessibuca-container .jessibuca-ptz-icon{position:relative}.jessibuca-container .jessibuca-ptz-icon:hover .icon-title-tips{visibility:visible;opacity:1}.jessibuca-container .jessibuca-ptz-btns{display:block;position:absolute;left:0;top:156px;width:156px;box-sizing:border-box;padding:0 30px}.jessibuca-container .jessibuca-ptz-btns .jessibuca-ptz-btn{display:flex;justify-content:space-between}.jessibuca-container .jessibuca-ptz-expand .jessibuca-ptz-expand-icon{display:inline-block;width:28px;height:28px;cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAANlBMVEVfX19fX19fX19fX19fX19fX19fX19HcExfX19fX19fX1/////Pz8+oqKjCwsKhoaHn5+eWlpaOqTaDAAAAC3RSTlP/3CaKxwJiAELtp4ri/s4AAACuSURBVCjPfZPREoUgCERXBdPRyv7/Z6/Z1aQp9oWJMyYLiKUrOIpAJBdGCldgbzBkPM/QEoTI3jBEPBRDhwEvChe08Q1Ge0ImvIq4Qj8ljrLdH77CyQPWlCdHC0Q1e9rmmuC+oQN9Q4LwcQg40L6eyqm0uEpXSUqe3fKpkkqL+Y/o+07SrahNEO0T0LBsvOitf4xsLqiNTB32wtqaVKosGLO2mhUrS93+PZ4D99wPqzMJVcbEyA8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-ptz-expand:hover .jessibuca-ptz-expand-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn////i4uLZ2dnIyMjExMS8vLy+iXNeAAAACnRSTlMAYomLxwEm9+NCLo6DKwAAALNJREFUKM99k9kWgyAMRIMmEMLm/39tKaVKFJkXl3sYJ4sAXeQ3ZOcYd0+gRYblFBuFLYoS2ot5lpvYn8zJQ65TO2GVNmdCmQq/qczw4gjpejD14BgmhziEIvCjVRlPioftHW6A7xBB1a8CCUMvsuSqEkPM7eZX6h8GrQ67bYpNIbRL6rb4/k2EfVXKsgmqfQrW9qnGq96a28jGQG1ky2HXpVysyYyeDIhWq7le6ua9P36HD6+2GRi8iBZBAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-ptz-narrow .jessibuca-ptz-narrow-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1/9/f2/v7/y8vLUObqxAAAADXRSTlMA3IrE6SZi9wI+y0gNXAn3CgAAAI5JREFUKM+Fk1kOwyAMBQ04bJHT3P+0JVUMNMWv8zvSk1cipfjAKXHwhR7k6KTjYp7dVuWLug1XWB5wz96T/JD2O3Phmv0k5ypL6lVVFIPYpLOka5WKSSFvS0/BloHYlkza5HkMzrvVLo8ZlRr7mtFYWBBsBQ4BjC//GTxcGVw2PpOVHQ6fJj7qS4936OoN2K4e5yE6N1UAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jessibuca-container .jessibuca-ptz-narrow:hover .jessibuca-ptz-narrow-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcBAMAAACAI8KnAAAAJ1BMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn+/v7X19ckk9ihAAAACnRSTlMA9+NCAsuKJsRiPv/2GwAAAJlJREFUGNNjYAAC5gxFoTYDBijw1FoFBIumQHjsUavAYGkBmGu0CgqUwRqlYNyFIO2Fq+BAnIGBJQrBXerAwLkKCUxgYELmKjBYIXMXM2Qhc5cxdCFzVzBoIXMXMYAcsRsMdgEdgs4FKT4DBqdAitGMQrMIzRkojlRB9wKaB9G8z+CMGjgshjCuMCjoWNxRAxYt2KGRYgJiAQAnZcjElaB/xwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-ptz-aperture-far .jessibuca-ptz-aperture-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAASFBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////9fX1+kpKRzc3ODg4PFxcW1tbXW1tbk5OT29vaVlZVmZmZ8vCMFAAAADHRSTlMAxGJ5Mssm9+NCiYtiH91SAAABAklEQVQoz41T7Q6DIAyEJQooUL55/zddhVazzZjdHyqXXo8DhWCYTWqltNyN+MZLuxP69UGti/vAsl6c0e4L+tQ2yv1AEbvecMhO5cXdYhk+6aO3WGrNAMwentlMz/ZAKIlNoRsqY2wtFWu9t8wasc0iYVN0LkQfrG1zbxNyrIBcntOQrH1Ukkb60QcxYF1xMA2dh8zWj6ZDsLCsIrL4Ds5Hm9FMbCEROWUB0COaLXEIZJKV7CKybGO7UuxjxY2C/TkMbxboKBQCxgMN6MCJQ6Ch/QjOZg/B13LGx8FDTe3IFvl+Bc9XBi3UWoex68qeL/vxmdyxyvz3NJ8f9dDef36HN7koIK2LjxB0AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jessibuca-container .jessibuca-ptz-aperture-far:hover .jessibuca-ptz-aperture-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAOVBMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn+/v6cnJzr6+u/v7+xsbGlpaXNzc3b29vqh7uRAAAAC3RSTlMAyRjKA59J/3PzPhe1wxwAAAD2SURBVCjPjZPrssMgCIR1mkYtisD7P+zBCyZpM5mzv5hs0M8VnZvaok9BlXzc3FXbO5z0vtifFC5Kn8OL4UfxwVvuHm61d5Z0b6ZGZZwZpQAUosWsjVZntVS1sH3ZFo1IRVYfGXgx+VGwNkkIVbhq9/jm3cAhaNv1Uk3IA8mNn7D3kbQeWK3TLH2jCthrDFcTMwUWaKiClc9mJtJWhS3SF5BpJqMQW1b3xwnkDahMoHYomkeJRgSENA/MFsKML7fgoCBVbGvM+Cx4JcKWbWHKK/h1ZYS1Jy/nK3u8bB3KhzG5deMxtfv3aO7/Heq+9ms8h9fxHP4AHzAWU9zlWNgAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-ptz-aperture-near .jessibuca-ptz-aperture-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAQlBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////9fX1+FhYWbm5vz8/Nzc3OwsLDi4uLDw8PW1tZmZmYgm6a+AAAAC3RSTlMAYmOLx4kn9+NCIVJiPGAAAAD+SURBVCjPjVPttoMgDMOJAqOU8uH7v+qKFN2c597lF5LTJg1VqQG3aGuM1bNTV0wWDtjpg3pq+IB+npyzcIE9ejsDXzDCrjccs+tOariF3n2OLyw5xko0vh9MDjNb9Q0hp2GK3cixlIApe4/JD9appR8SFxWAUFLg6n63iB1irnY1Jv0mlrok7nUdcZRa1YeshxBA9iijChlxI6iZEaBgSEL2tkRcymPGGJpqlbZ6uDg0WR/F0DwuMpxDkYwiIXA8hO2uMJdGCCK6teB8RQoY8xGfevQjxYQt25qoRwDT25MRBjZ7GtP/P/afa3LHmrflXa+ruf661Hvv+et3eAF6Fh3v+sSUGgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jessibuca-container .jessibuca-ptz-aperture-near:hover .jessibuca-ptz-aperture-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEWZmZmZmZmZmZmZmZmZmZmZmZmZmZlHcEyZmZmZmZn///+qqqq9vb3z8/PMzMzo6Oja2tpXGg+mAAAACnRSTlP/JomLxwJiAONCr+rW2wAAAOtJREFUKM99U9sWhCAInEpLBS///7WLEWy7p9O8qEzCMBIOQ15DAlLYsoegS9yFMKQ93skl4Adh+ZI54Q8pG5nxgKzkgkcsk4zhmQxRyN1OPHqtncjOu5AuppcJ6s1EHTA1YzC3Wgq3YmzGqpsmlwZAo7F8oLEVKoeE6+TbSxK0JJ/3FLOwFnUxzXuoltYDDMLoAlmYXLAWIrkqbdZKs+q4KBfkNV1uwGaBim9TdLWS3R7iGRvCNTPB7JvGlc5EXK8cKbrxooint73RzXh7Msl6Oj/uT/b62O9j8sj6gMXX0Xwf6jP3Zr9DtNAHTYMMXrXSK0YAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-ptz-focus-far .jessibuca-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAPFBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////92dnbs7OyFhYWjo6Pe3t7Ly8uxsbG8vLyG+Q0EAAAAC3RSTlMAiWJjx9wm/0Lti7mfpe0AAADaSURBVCjPfVMJDoQgDERFC/bg8P9/XUSO6CqTqA0TptNDpSrMpC2A1btRT8wrNKzzjdo03KC3zhkLD9imbeAFhd3sG2kvZQ2v0NknfGBJZKkhBM9MxOxDKBV1N4iHi0TRHYjN01Qi7/kK2PtyNDU7DAEJgDAAN0u1jsQEFEkcVVmrqjeXrkWRmC67eqbgG7bJyvkQSQkvUvec7szpek6t9ubWJSK/uJVSm+APzHKCh++DWWuH4plQKNYOpfappcjy2VvJn9744cjGwx6uyXjBxqs5Xuqsvf/9Dj8rLhRg+bQ5VAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jessibuca-container .jessibuca-ptz-focus-far:hover .jessibuca-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAOVBMVEWZmZmZmZmZmZmZmZmZmZmZmZmZmZlHcEyZmZmZmZmZmZn///+xsbGoqKjt7e309PTExMTQ0NDe3t774OlGAAAAC3RSTlP/itxixwImAELtp8B2gZgAAADmSURBVCjPjZMLjsUgCEVpq60G8Lf/xQ62gvNeOmZuUiWeKHC1cKnC5iJAdFuwJXgmf+xg2g//G54OPuTOCUOEL8WgMMCLwgPP+Abj2aF38CrnBR7whw6Bo4fWUk7MMrQ2OrpAq0GspTLLgKg1wTailNITZA0EaTkZGjIAY5NwlATah5CGRMJYj50tFtlWiapsLvAPRdtL/WOmET7QzZyl5ywzp7NWsjBJ1odsragJqeJ9HGFNZoLaJw71hMTm0O7NeDE1Z6YsU5rGL69sedmXXz0ToW8PzA/oV09T8OJR32fb7+B17Qe3WwtC9PVbHAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-ptz-focus-near .jessibuca-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAARVBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1/////t7e2dnZ3W1tbGxsa3t7eDg4Oqqqri4uKTk5NImu/5AAAADXRSTlMAYieJ3MvE/0Lti4oh87zNagAAAOtJREFUKM+NU1sOwyAMY30FtoWS8Lj/UZe2gWpVh2aJH1wcO0mNqbDj4gDc8rLmiscEDdPji3rP8IX5fXLWwQWuaVu4gbKDuyPdsJMz3GLefcIPbJ6PDCEAFDlUAJiORM3NigQFAXAFlqOeRhWJyFFIHxNGvRrN0mp470U++3axGM2RAmXcXqKnkDSN0a9WIk5Sa01MpDXBQAdVtrA8lBhFnnKpsmoo5VBrhszV0KuJ5N2tP92O50iQjpzcctravoihdoi0Q1NrfN56m0VWzFBoje+OrD/s7pr0F0yUr6s5/LvUu/bz+B2ep+IHdMIV2SUZfCsAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jessibuca-container .jessibuca-ptz-focus-near:hover .jessibuca-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAQlBMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn////c3Nz09PTp6enR0dHFxcW7u7uwsLAUKT0cAAAADXRSTlMA3IrE6WIm9wI+y0gNQZpqdwAAAOdJREFUKM99U9GShCAMQ8BF3Cmlpfz/r15dAe88l8zwQiQkoRrTEa3zIXhno7lhWxcYWNbtN/fa4Q/218VFDzf4of0O8A/h3TQfOGU/ytsOj9gPVyt8warkmYEQQAgABYDxTKROz88koS6AVIB1fRCNbSI1cVUy15Jq27LGjTtyzipPeWw40/IXQkrHyZSRmqw3LaQgctFNKYzYyGACfEXossLMojFEj7J0WfdwJ3dD9uY2X25tL0Hj45mTR87Y66u9IQFsDS1bL57o7JbUDNIofvpk08eej8kTe3Hz0ZwP9UFfv8OgfgBUByCEUZhYtAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-ptz-arrow{cursor:pointer;position:absolute;width:0;height:0}.jessibuca-container .jessibuca-ptz-arrow-up{left:71px;top:15px;border:7px solid transparent;border-bottom:10px solid #fff}.jessibuca-container .jessibuca-ptz-arrow-right{top:71px;right:15px;border:7px solid transparent;border-left:10px solid #fff}.jessibuca-container .jessibuca-ptz-arrow-left{left:15px;top:71px;border:7px solid transparent;border-right:10px solid #fff}.jessibuca-container .jessibuca-ptz-arrow-down{left:71px;bottom:15px;border:7px solid transparent;border-top:10px solid #fff}.jessibuca-container .jessibuca-ptz-arrow-left-up{transform:rotate(45deg);left:32px;top:33px;border:7px solid transparent;border-right:10px solid #fff}.jessibuca-container .jessibuca-ptz-arrow-right-up{transform:rotate(-45deg);right:32px;top:33px;border:7px solid transparent;border-left:10px solid #fff}.jessibuca-container .jessibuca-ptz-arrow-left-down{transform:rotate(45deg);left:32px;bottom:33px;border:7px solid transparent;border-top:10px solid #fff}.jessibuca-container .jessibuca-ptz-arrow-right-down{transform:rotate(-45deg);right:32px;bottom:33px;border:7px solid transparent;border-top:10px solid #fff}.jessibuca-container .jessibuca-loading-bg{display:none}.jessibuca-container .jessibuca-loading-bg,.jessibuca-container .jessibuca-poster{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;height:100%;width:100%;background-position:50%;background-repeat:no-repeat;background-size:contain;pointer-events:none}.jessibuca-container .jessibuca-play-big{position:absolute;display:none;height:100%;width:100%;background:rgba(0,0,0,.4)}.jessibuca-container .jessibuca-play-big:after{cursor:pointer;content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:48px;height:48px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzMzMzMzMzNzc3MzMzPz8/Nzc3MzMzMzMzMzMzMzMzLVn6fAAAACnRSTlMA+duduRUwSGSD8toSsAAAAI9JREFUOMvV07ENgzAQhWG3lLSp6MwCViYIRSpG8AiM4FWMaPymDBKESMF/cQ0S136F353vnLuo3gp1kOYEoCXW4LFKIZAnqAXYICeASoAdzgG+cApwgF4EfwF+oDkCqIwA6gnyAKA8AaizQhsBAjzuqUHofInGIQbjRxXjMrTJuHDestR4Bng4eGrN0929PqNfzC6h06weAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:50%}.jessibuca-container .jessibuca-play-big:hover:after{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEz///////////////////////////////////////////8Uel1nAAAAC3RSTlMA+rbVFUecgC7rYhEEz+4AAACbSURBVDjL1dMhDsJAEIXhdeiGpKYWQVKDWc8ReojFc4ReAlPFFQazad7lIGkb0jK/WEPSsZ+YN5mZEP5UrZIP0vgE0Kv3oPlIJlAk8AJM4ASYwAkww2+ABfQg0ImgugPYsfNBVl99kA0AsjOArAPQpRTGHiBB8whxM0y+3skXNltsvMYriIWrpWPA80mFJ5qL3gAfB1/tcAt7rzdiV+HEgs1oBgAAAABJRU5ErkJggg==")}.jessibuca-container .jessibuca-recording{display:none;position:absolute;box-sizing:border-box;left:50%;top:0;padding:0 3px;transform:translateX(-50%);justify-content:space-around;align-items:center;width:101px;height:20px;background:#000;opacity:1;border-radius:0 0 8px 8px;z-index:1}.jessibuca-container .jessibuca-recording .jessibuca-recording-red-point{width:8px;height:8px;background:#ff1f1f;border-radius:50%;-webkit-animation:magentaPulse 1s linear infinite;animation:magentaPulse 1s linear infinite}.jessibuca-container .jessibuca-recording .jessibuca-recording-time{font-size:14px;font-weight:500;color:#ddd}.jessibuca-container .jessibuca-recording .jessibuca-recording-stop{height:100%}.jessibuca-container .jessibuca-recording .jessibuca-icon-recordStop{width:16px;height:16px;cursor:pointer}.jessibuca-container .jessibuca-zoom-controls{display:none;position:absolute;box-sizing:border-box;left:50%;top:0;padding:0 3px;transform:translateX(-50%);justify-content:space-around;align-items:center;width:156px;height:30px;background:#000;opacity:1;border-radius:0 0 8px 8px;z-index:1}.jessibuca-container .jessibuca-zoom-controls .jessibuca-icon{vertical-align:top}.jessibuca-container .jessibuca-zoom-controls .jessibuca-zoom-narrow{width:16px;height:16px;cursor:pointer}.jessibuca-container .jessibuca-zoom-controls .jessibuca-zoom-tips{font-size:14px;font-weight:500;color:#ddd}.jessibuca-container .jessibuca-zoom-controls .jessibuca-zoom-expand,.jessibuca-container .jessibuca-zoom-controls .jessibuca-zoom-stop2{width:16px;height:16px;cursor:pointer}.jessibuca-container .jessibuca-loading{display:none;flex-direction:column;justify-content:center;align-items:center;position:absolute;z-index:20;left:0;top:0;right:0;bottom:0;width:100%;height:100%;pointer-events:none}.jessibuca-container .jessibuca-loading-text{line-height:20px;font-size:13px;color:#fff;margin-top:10px}.jessibuca-container .jessibuca-controls{background-color:#161616;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;position:absolute;z-index:40;left:0;right:0;bottom:0;height:38px;width:100%;padding-left:13px;padding-right:13px;font-size:14px;color:#fff;opacity:0;visibility:hidden;transition:all .2s ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:width .5s ease-in}.jessibuca-container .jessibuca-controls .jessibuca-controls-item{position:relative;display:flex;justify-content:center;padding:0 8px}.jessibuca-container .jessibuca-controls .jessibuca-controls-item:hover .icon-title-tips{visibility:visible;opacity:1}.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-face,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-face-active,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-fullscreen,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-fullscreen-exit,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-icon-audio,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-microphone-close,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-object,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-object-active,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-occlusion,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-occlusion-active,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-pause,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-performance,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-performance-active,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-play,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-ptz,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-ptz-active,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-quality-menu,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-record,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-record-stop,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-scale-menu,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-screenshot,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-speed-menu,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-template-menu,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-volume,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-zoom,.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-zoom-stop{display:none}.jessibuca-container .jessibuca-controls .jessibuca-controls-item.jessibuca-speed{padding:0}.jessibuca-container .jessibuca-controls .jessibuca-controls-item-html{position:relative;display:none;justify-content:center}.jessibuca-container .jessibuca-controls .jessibuca-playback-control-time{position:relative;justify-content:center;padding:0 8px}.jessibuca-container .jessibuca-controls .jessibuca-icon-audio,.jessibuca-container .jessibuca-controls .jessibuca-icon-mute{z-index:1}.jessibuca-container .jessibuca-controls .jessibuca-controls-bottom{display:flex;justify-content:space-between;height:100%}.jessibuca-container .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-left,.jessibuca-container .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-right{display:flex;align-items:center}.jessibuca-container.jessibuca-controls-show .jessibuca-controls{opacity:1;visibility:visible}.jessibuca-container.jessibuca-controls-show-auto-hide .jessibuca-controls{opacity:.8;visibility:visible;display:none}.jessibuca-container.jessibuca-hide-cursor *{cursor:none!important}.jessibuca-container .jessibuca-icon-loading{width:50px;height:50px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8BAMAAADI0sRBAAAAIVBMVEVHcEx4eHh4eHh4eHh4eHh3d3d4eHh4eHh4eHh4eHh4eHiqaCaRAAAACnRSTlMAikwX3CxpwZ7zIGi5xgAAAZ9JREFUOMt9lb9Lw0AUx2Njqm4iGEqmEnBxslKUdhJctFMVcW5wKZ0CLpJJQRw6iVqQbg3FtPdX+l5+XHJ3796bQj557773fe8ujtOI+6jz5p84dHjTkYD4+RhT9CIRZWRPJr1bChnbY532GhT4oUpbI6HEuqvgIH9544dh9J4/rpr0Ms8oV3zMNT7X1MXSmaznzfHjM4n72moe5n8ryYrW9rKRvgf0S93JA7yKa9lbzUg3keJb8OVCtwkrFmoO4MnsAuj5rGqnZg+GZXUXkl9NjEui9n3YA9XgpMgakLXz6ujMTIgrCkPVv0Jil8KgKQN/wRN69hLcb1vrbR2nQkxwiZTGQ5Teb7TO8PUaS8Q03sE+zkjP8qbjzgJtEhRbV4gnlkOFeM7hDYNdxPbiYFvKSHN6L2NmY5WzMYPtplZdTxncRvn2sI+DHIoug22jWMaA12Y7BrXzrG8BX32XPMDKWVzw1bdMOnH1KNqNi8toqn7JGumZnStXLi0e4tcP6R3I635Nc/mzsMxl9aux9b78UVmn2pve8u6eR50j9c0/ywzyVl5+z84AAAAASUVORK5CYII=");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;-webkit-animation-name:rotation;animation-name:rotation;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.jessibuca-container .jessibuca-icon-screenshot{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEzMzMzMzMzMzMzMzMzNzc3MzMzMzMzNzc3Nzc3MzMzMzMwv5ahDAAAAC3RSTlMAW+8S2UGVwyyZnOTRhEMAAAEfSURBVDjLzZKxbsJADIYdBQpsSCyVMlXAdEuQYGKpWFk6dWHJgsQ7sMDSpUv3PgITAQT0f7ly57ucQ45KXRAZot+/89k+X4ju9KzL4XOhlm3pR0enYrWViSRPXQIQSASkRSkIJEFRimYCuQAHSW89IOv6SH5TCsuAj68Ab1wDzqkAzqoC7AUAPtgsABgkBBgkCJiNHehGok//KRVsHqd+3Dj1/vukt3AH/Jj05s5/AmyZhFVWXDls44iVvfQWkCvgxU6g9ZdJfCLvjJbYaT3GvjOY4mQSG3SJGjhr/Y1Xohp+TGKqqzexZ/1GVGdNCitt6R8zVvb9d+JmKdl8o5sPWbtxT6zFuJcDQtk92MNmYiXHquYlZlVt1j4P6cd7fgHFW7Nhqu29TwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-screenshot:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEVHcEz////////////////////////////////////////////////////////NXt0CAAAADnRSTlMAWe+X2TINXUYZvctoYyuS2NgAAAEVSURBVDjLzZKhDsJADIZLCAsEg8WgEGCWGSwCgZxB4MgEAonB8wQEXoBH4BEWXgPJgEBG0mdgR3u77raRYAgnlq+9+/t3TQF+dKbZcJXSYSnzlViT457lRScKmBqILSFA3GoO8S4E+Ex5JiSJ4CbVdyOQdZNomX9D4dl+ko3NC8vFFmhPy8FIsi0ZlwLBW/LY5BxYYreUSgoFAEmhB5Rc9OCbUoXmTmDadQKTn4y6A/XTaoSKdb6KyGU6RJ7eHgpb3ABinAoil303xB6vQnRahNhXvMdre+fzOgxVrokX4jHAnBh8PALU8Eq8BqgTg/vePF8tpuPy9/NFaalSc273RizarYqfkswjifNMQ/TyTGMv4v87L+ks5gqDbc9OAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-play{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzMzMzMzMzNzc3MzMzPz8/Nzc3MzMzMzMzMzMzMzMzLVn6fAAAACnRSTlMA+duduRUwSGSD8toSsAAAAI9JREFUOMvV07ENgzAQhWG3lLSp6MwCViYIRSpG8AiM4FWMaPymDBKESMF/cQ0S136F353vnLuo3gp1kOYEoCXW4LFKIZAnqAXYICeASoAdzgG+cApwgF4EfwF+oDkCqIwA6gnyAKA8AaizQhsBAjzuqUHofInGIQbjRxXjMrTJuHDestR4Bng4eGrN0929PqNfzC6h06weAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-play:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEz///////////////////////////////////////////8Uel1nAAAAC3RSTlMA+rbVFUecgC7rYhEEz+4AAACbSURBVDjL1dMhDsJAEIXhdeiGpKYWQVKDWc8ReojFc4ReAlPFFQazad7lIGkb0jK/WEPSsZ+YN5mZEP5UrZIP0vgE0Kv3oPlIJlAk8AJM4ASYwAkww2+ABfQg0ImgugPYsfNBVl99kA0AsjOArAPQpRTGHiBB8whxM0y+3skXNltsvMYriIWrpWPA80mFJ5qL3gAfB1/tcAt7rzdiV+HEgs1oBgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-pause{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEVHcEzMzMzHx8fMzMzMzMzOzs7MzMz4IlKVAAAABnRSTlMA6xIU1hVqIuOVAAAAMUlEQVQ4y2NgGFYgLS3RAEQziQFZoxKjEqMSaBJpEAkgIw1ZQlBQRAEs4QhkDeIMDgAWx1gMHyIL4wAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-pause:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEVHcEz///////////////////////+3ygHaAAAABnRSTlMA7OgSFBXMmAA4AAAAM0lEQVQ4y2NgGFYgLS3JAUQzi6WlJY5KjEqMSqBJpEEkgIw0ZAklJSUDsISikpLQIM7gAJjhWp6XcaOxAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-record{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEVHcEzGxsbMzMzMzMzLy8vMzMzMzMzNzc3MzMzMzMxEZ/aQAAAACXRSTlMADPKKKeBxlV6neZ4mAAAArUlEQVQ4y2NgGDZgJhpowCURAJeYpIQENJEkCgWRgCeShAGyjfgl2EqwS7BFToZJiLg4ICTEImdOh0pwRM6cDJcIjpw5E6aDFeh8B5gECBCUYAkKCoMbNXNSOlyCgUEQ4apJJmxIEkjOVWFgxi4RgEsikGQJnEYp4pLA6VxUDyJLIAUJcRLIwY7qXKSIQvOHWCQODzKIleBPPjgTHM4kijNR48oGkajiYUMykwMAAfmZhUjBISQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-record:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMA8gyMLeRw1x2DBpWGN2QDAAAAt0lEQVQ4y2NgGDbgDBpIwCVRAJc4KIgEZM4EwCU2KSEBHySJCcg29iBJGCBLgHUs24FdYlnNYZiESksDXKJALebMaagES8yZw3CJypgzZ2A6WIHOd4BJgABMgh2XBEtpaBjcqDMHs+ESDFyLEK46aMGGkEB2rgQDJ3aJAFwSUSRL4DQKp+VHcTkXxYMoEkhBQpwEcrCjSCBHFJo/1GIO408MOJMPzgSHM4niTNS4skENqnjYkMzkAEgzyFpeX6L3AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-recordStop{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAOVBMVEVHcEz///////////////////////////////////////////////////////////////////////99PJZNAAAAEnRSTlMAMPndsnZj1CSYPcmL6wsdoU80pOJLAAABu0lEQVRIx5VV26KEIAhMA++p9f8fezatFDPr8LSrjMxwiWlqzRuMYKW0ENH46c3WuGyVLXEduuO83UyK59fl1jX5EEUXD9DOaSh43XEP5zUIdZ4pAecTofVnWSt3ip4rx7N61vjnY1D30CpH4QQR8vsP+RA5Rs3KpjfMU/pMim/LgbvH7DF2F8sU0owqapKLqgnhuGWwImUagn2zhUX6WQQoYkXG9WxSAJd700/ygsCpAoliaDsPiG48GM1X5Ft/06sfp8DrDE+3DpekWjxM6366fgEcnklC+AIIWYQmPEeAaUmjFOnhCLDfxZRH+w1gU5b/DYjfNcyJ0p7dxX8B+FwxQVtvAGB5ig0d5gFA5KbzS91hI8CenvlHflfN/XvzJQnxbBEko1gbvVnPii+FadSVRUEaYylQfJtpLB+aRG4LY/80yKdUbCraM0lozGR4ewZ0Wtnj1iC7hjWKNnjYmR62W15cLlL3+2pyMR09jccyuyUrHKsvthc5xsY1iWJ0Xk3t+2XP7AnWwrAQmBH6asXubmL1Z5Lz6o992jWiu9lnMSiQsK27FS9NxhCumZgB2fTBPFsFolhZr5B/D3o9sJAI6skAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-recordStop:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVHcEwimP0imPwimP8imPwimP0imPsimP0imfsimPwimP0imPwimf8imPwimPwimPxLmg1rAAAAD3RSTlMA15sisGUvdz3szYwMT8H+hDJEAAABx0lEQVQ4y3WUO08CQRCADxBQchBiMDE24KswFlw0Wtig/oHzUWglJBZWio3GDjUxlhhrEzT+ABMrO2iptLLVRluDggI+xtmdXW73LkxxNzvfzuzszNwZhhDzdOxqaPGgYrgkOgFczh90ezAJQmpL2v6OHYnqk2aWxOTtAnu/O/Y5XNZXmTZjo3ot7aESwLdFeqAM0MoJkMf9ltwVQJ9PcQN0UFIJogvdJgLQVFMsAlxyBaPmVBDCE8W7qd+2SDsx0q4OwhSrCG134W54jDfKLjDNxaL8/9AAMM/solptRnoALBbwEPWYrOEzLnrZsTGoMW+fBHG2SiLPUNI6KMOH8QS/XsCMBYQekIEv7NGZF/Rht2yqmA4i3UG9O0iTqgMfhirDhRdU8XJZqqEO8tDAqje8IIt1r+I5HmBjfD9AxQ1MgJQRpc6GJRALHOAS1WRlhMs4VaSFzwIWzCUF3op71kdNsNs/FDCuA58YqCQl7IhN3WbDnlLtfjnuON515WM17c7w41QPOuBIzDT5wqi0T4ESGV3gjtTjkuPATwHoX9+cPRlmmvJ57YAir2qKy459QL/UhrS/uAu3xf8KiX3DI+b22t6jc9F/qfaum9E1pJ4AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-fullscreen{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEVHcEzMzMzOzs7Pz8/MzMzMzMzNzc3MzMzMzMzMzMzMzMzMzMzNzc3MzMzMzMxdHBitAAAADnRSTlMA8AwGYt0aUcg+til5kgmZywUAAAGWSURBVDjL1VM9SwNBEB12IcGkMagxNktQSZFCYimIJAqKpZ3Vco3YBYs0NkKQgBg4ECtLFSFVCGgQrERBsLayPE0Ip7n5De73BdKLTrE3ezPvze6+GYDfsAQKy/Rz0i/OZJjY9XREuohTKulS+ZFGiADfyZXU5uHktI44VH5apDx554aXwJqloiIwiEsStAjCAsRNF1jCmGqa4Vc+BvS4JkjwzyPE6xiwzsxxeTbZxqjkANSWZFkoIj5bQBl4aBDfkPDNpeRRialB+SRAFz8UU1sAaEUjSCDoJ7iukZJ1V+c01bFczM1pWaa+a0Rp7MHn4V8Z1R9vLLCv9WjKdVFfk77JP+bZdz35YAfKXx6KhKp93abUYVbrj49g9aAYSuFCLbPUwzdCsYEWTloXgw1oGwQbENeuKwxzXhxwAADRMFd+zzRc6AAASY6RH8VjUHaXTrlOpDgCUP3gelc01e2d+f16cWbnQ46BGCRNVsWAWQJVw2xGfUXVv2k1OsLfazXqblzS99u1FwKFvBJioXBY2+r82U75Ab7O0ypVV0wKAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-fullscreen:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEz///////////////////////////////////////////////////////////////////+GUsxbAAAAEXRSTlMA3clDHfdfDQbsVG00u4Cqkr04dRsAAAGaSURBVEjH7VXLdsQgCPUBAROdjP//s1UTDUxsz3TRTc+wC94bHsLVmP9hkE8LIdvgupt2tFhcpy2CMZyVxNePEoqDp4hwEGz5PTqWoZNzLrmD9riltBEYzzpZQ8bweXy56Qy6Tivsp5JQYtawuMH3eJlSxIJtdSSa4xer4lMB89pK23mKrwjZVpsRzLq35vEE3+r26h6w5EKppcp3fP2lIpTPWJvoXoobeNI1sM3haHvx56tu2sdElJ54GbnPQ7RZ1sCpl8qPEMXBNQ8vN82jNbzLCPzGSDOZj/2Bqd19R1rELIEbDFrUJfKYdlALbDuDMko/hz7t8DqtCfr8h1Vt4rn7eh/6Ph37ch20aW8McsfGCOXzcr+GOlQG1rJ2HSHUDO/4Mu01qVAqTCpCJfgZ3phTS2pKm5aZOMUbs7Q6nk6L8UzRh6W78jH+gD/VRxHokPuNgUGTaPPR+zDR1mrlvcGgwkAVacSbeoN4Z0rb5/6XLrW/2GTLk2NhXHRKzrqAt9cD4rr4ddvae0NAYgOICdZyvPj4UYRf2BdfbB8iWvnTUwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-fullscreenExit{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEVHcEzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxi4XDRAAAACHRSTlMAf3WqJmy+7azWNnMAAADNSURBVDjLxZQ9E4IwDIaLfMzCOTDSOz07OjLir5CR0dmJFVHIzzZtnMzbOzcyZHnuaXpJWmO2ji4GhpAzzZeQzw8FKCj1pMHss9OgpwsGOS0YGOcVUMPsfBVkmJoVCBJW0FFB6SFIaMKAlRGDnEiDkuM00lP3SmL6H5QSh+iIr9ZWVWntUV9Z4qWbHAWrhcUYNLC4Wwm3xb1r2mOQYoVn2EKFAVb81KHiQQq6L3vSUoMBUmSzgCKbVeiL3eTp3Odf8H1sxRAZZNZt/Vt8AHcPQbiQQVF+AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-fullscreenExit:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAe4Fzh7MZbKPtN8gpX19xAAAA3klEQVQ4y8XUIQ7CQBAF0CWhKQHDGtQKQFcURUgqEARBED0Aoqp3IKnoATAEW8MNOACmhQYKcyi6uyjmr+aLqXj56bSbVoh/J3HBxcw0ZfA2c3FiQLGeQcWh1lOVDDJTAeCbCgAR6QqCDj0xCEU5Bl2BIALKMwhdKjGILRUYfCIOEynlvABANk64M5jabJxHfJY2I76yzYu/ZCc0s1WbNYAQ3jxqwMoGHoqWGHpUQajEgcYYcKWFtjLE4FGJQewoxODRDQOqKPPcHl9sfzSXa/0L349tEDsOsp/8+2/xAY+BZBY9KhM5AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-audio{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzKysrMzMzMzMzMzMzMzMzMzMzMzMzMzMzNzc3MzMz8gU00AAAACnRSTlMAL0jMZKt96hGJsSKv1QAAAJ9JREFUOMvN078KQFAYBfCbJEw2q6SUyWxTnsJT2JTJ6D38Gb6n5PpT6BwbuaNfTnz3fEp9fZwAP7czD0MsGCzBYJcEYsGwBEHQQRB0EII1CMAWdAOzyJUvJ4jyDVyZVHKGpj9guEI2IuhaDFadYnCkIm9I+kPgn8t+kI7kOsT72HcwQnJR9Gofy8DrwwtHK8pLzdeALg5fNb6cdJ1fOjOGYrl5CLFcggAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-audio:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAL0TQf2frEaZYt8E+idL4AAAAnUlEQVQ4y2NgoDdgUcAuzr4Hh4TaGQHsBp3BLsG+BoeE2hnsEkCDsEqADMIqATIImwTYICwSEIPQJFhnBjKInUGSUA2CSPCcOcIwB1ki5xRM4iiDDrKEzQlsEuUF2CVY0jbgkDhjMLQkEkj0IM4gQQ1EHMHOOXMiakRpTiQQtXgTA+7kgzvB4UyiuBM17myAM+Pgzmq4MyfO7EwjAAAEf+BAxqI/agAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-mute{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVHcEzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMztXryaAAAAD3RSTlMAHd4P7ztyiy1OnKhdx7uY2gyAAAAB8ElEQVQ4y72Uu0vDQBzHE45C3SJFaSGjUEiRpJRCBifXokkpSv0DfOBrEKxUUSoFH9ClFAUfU7c4OARRCs5WjThIsJuDlLo4ldvPe8SYxGyCt1zgw+dev+8vHPcvYybvfCR2OgUv2CoLdI62bUn3gq5UJxOomZofXPUNrIChJRklfcDSiKK2bYQ6PiCaREk0EQoYPFYa3F73F+DGsBJLmAjBAMBKakG15KAxqIhd2KuK5reRccBDNbqGJhfSlnNc/kBh4OY+vaoR5QrRC0afKgxMrKdXNKI8yxRENpyd+i0VA6wMm5IOBmORCwfAFjGwolofevbuPrvpGhRgpVaqiJflrLuUQQFRToS9l894EMDe7q6yL7/G5wMATc5mQCiAvQo3HAbwLtyYHQZgTxhohgGUa/CP12EA16W2/Ou4ZEj1dNG9oPMkZGiwJWQ8j+huPoJy9Z/XHTfUFSbAURveCtE5px5vs7hQDKS25FSDn2KR5Up1/lRmIHne7BvKd82LMRJbSjr5M40lmaYZ5/PRpiCpizjJyk+CwOGOzACLpSdz02QxkiuRhd8dNOwkV7zl2YX1mcySKJrQiPkXY9klSt6rkJPRwIlmzrcWSGyzHuTb11V/N0y/S6SdwdCR4m/47OIN7XOQCfwJwHGp8IcfyRdBLEZK4Uxp6wAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-mute:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAP1BMVEVHcEz///////////////////////////////////////////////////////////////////////////////9KjZoYAAAAFHRSTlMAbk2o8o0P5TsGnVojFi/XHcV9urLaq0oAAAIQSURBVEjH3ZZZkqswDEXxLM8T+1/rkw0BuwM0f131+IvDyZVk6SrL8p88QCHp8UAnWmoWoG8AwQRN4/vOiqwUuwWqiob646MMhEW+KnMLMIXffgiZoODBusb7kCzjByF7OOszkOyp4amJ7fWVPwCN6BpyWRypvANPCvi7u4aTXe13YI+KkYA5bMRTSMlLnSyGwisSH40B0FJOrKVB6iAw2U7sGgPgQ/DTPQjitCOZT4Q6gWCtGwGFbSM34ENUNSpAKTACmC31rnRgJwjDdkFAJpfkAsZcAJvCSVQB2FaWWKdB/ATMAHwIUYL21lRBZRDiC5AnsBHBUqxEyaraFMoz0AnvHNa6xDWS34FGgNf6PYAEZoCt+BroUWFVbeb5HbCqSvB2cToyca+Adjlycdawt0C/HeyScl1W/w3gsU3aAd7JF8AuAN6isr7NAogXAFeq59Ec7ifAm49hF8wCMWfVNXAeCAkjEGuBr6R5ZGJzBrl4gGniBME+w8aMMyCsNZtfaemnmYaAQ6I3Rz0fnDhHJxc93Vrr7sHWjP3XRtTba2L3EkdFVaPC6YmXxKI9DGF1YPLdiwfD2r37cL5nDVw+uKzU5K27hsXCXPtyC2uyyl0D0p2TY7VaIvFYWU0Dm8TdOXmrVp52HG4lU4K/N38PpS/Kw70dbmb/sC0WCcQwNNzzjrzUj7veUyIIyL/4m/EP8V829O8zh5EAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-ptz{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAM1BMVEVHcEzMzMzMzMzMzMzMzMzMzMzNzc3MzMzNzc3MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxDm1AzAAAAEXRSTlMAHqw+E8It/gjxc03jhGDTlgAjE2kAAAI6SURBVEjHpVbZkoQgDBwg3Of/f+12gtfMbK1Yy4NampCju4Ov1y8ruNyyo9fyCibVlNW6vUu29GpWQwTVdPTernqwffHex0WP4Nro3k+PrMKCvew/PcZ95aoNsY9yua+cGxTZsnf2K7ch4CAdGnWwYx/5LgKZCgxGdrhH3BeqNmnwviFXPZbQJmcM25HJ5n7/Pczr2QqksMJfO7BJOHLKLWFdMiL1QXYRwFagMklb4GB1zS7s8Le3fqH7Q28tVLkKdIzeaOJB2OKtY8KfTQCUa4++dNsLbrqpTR7xguHGt8hfg8P+seuaEkNdBjahzOD7g1cHP21SL2LtMNBKMdTRJjffTX1wVgrsEb1ITJU6QknwYJAcQky2cE02NbzPp70KyKggtpu9xM7Ik+CBIqY+8FrYyRUkrs+MEm1TG6tG9LZxNDNFGDue63TYGgIHqUUcuNhvhyZtn5LnlDq3Juxa4noCuX0scErOpNMDCrVcHPCS5rFGuQR9KZpxnB6CQ0ZO+AIBcTPk3UdbTx1L7jLEEHsMW7ZYm8NlIFyxn8+xdL7MURYEhzd5k2N2TabxIAORwC2r00QQfNSgrnqTJfh7cDmDu9ggtV0EZFr7kGu4KAxtNDln406TLwF9iZCIwn9EfjPuncRHYm5x3NfK3cFAS5kWxljSnTFlPHBAUFg5HsCCVOd9cdwXq+027un2QJlMjqISJutCDceRtTTuT4+1Q3HWHR8cu0fh9sGvADTYH9iLah/9nPz5+/MDJnQfoIVoAnQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-ptz:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAQlBMVEVHcEz////////////////////////////////////////////////////////////////////////////////////1bZCPAAAAFXRSTlMAeVoYDS1pBiPv4/g6lkzO2qSxvoixscijAAACi0lEQVRIx51W2ZLcIAwcLnPf+P9/NS2wp5xkq0ziF3ZRC3R0i/l8fvi04oxx89n+RBi1sqB38TKw7lw7lNzDa3U0e57bHhJ4d567HlqGC08eLAj9Gv8XD4/OwtsdhlfCW2s9LfWtuNrMhG1uLWP17Xh14LF4m8dx1OJ9jkm85YCYch5JzDVy81on3MFYkpTNYGmHHloYI+aqlNhlh5ZSvmH1AyBUwPcMX+u/clW3XYvA2YgRGXyZIZX6PXv0l3GlV9Jp9FKcK7mytJIg8xEeBdaBtV4P8tAixexnp73tY7ZBkrk9WEL8t7ZUDqtIA3jXa8sODSeUVqw5aztT+g4QeNAgM0PGTA0+EmfVeUvU0CEW4hX+lt/zseE7jJKDSmi0EUKBhr7EAMKPvNjOA9Fz4Yk/CFgcGRSdkYOHCLRxQfzKRN5SB/b5Ot8SzzQiKqcb6ipFdCfi1JI84OBdxzarhJ8RkpxHOQszl7bpn0GpmnXq6R4OfTkwwlyUWzeQg7rSLNhNUzEUEqJF3DMHeeXgqRIaYwHimLKipK8hMZOYVfJ5oKtIFSgXk5z4KcNx3GOIPGYfPigh9YGHBNQKVKbZhxMnqq+OHfWBHARZfWm1dnfSXfJuXInplse8wy39zkisdQ5kuLY+Bpc5hwGiH8Mx1rE24DFaLqXkfrNVkjk+8JPTPF0bUw+R9MCVuA8ks/xDyF/9orMqpBQeiob5RbIbmv7/TxvoX1Oqa914TsYg7QUWx8Y7R89JQY8mY6Dat1G5GARuMOgYHY9cbL1vNvc++fk67olLk4nrQSl7457OPqdeKn+vEwm4LPzW87DyXvqIyei9znHS+cZz9SxV+Qf8nNbjn37NkDx4+PmCXzHOLUMtjgmUAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-ptzActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwgmv8imPwimPwhmP8imP8imPwimPwmmf8imPwimPwhmP0imPwimPwimPwimPsimP0imPoLqfILAAAAEnRSTlMADprCJBnU/gXwh3LiUKxAXjJ/ELXKAAACbklEQVRIx5VW2bbjIAwLa1jM9v8/O7Iht+09MwPlpS2VwLZkJ9f1lxVG1joPdZ0u1ZIxurhv8DH6dMpQI5t439GAEc7xYPgTRnAtV7plReRhd5kDP8+fd+wzt70yPhIJzWT7/6DCJCAYLReZPMIuJC4pClSktHqbNpJO1aTmmAme3cvtWs9NSfq52CPhnJNjlbVHwgmWSWGHeQHcKFjj7fygwidf2fa4mbVOuladcnsoDn9/CKKAWf6HEtpANiJvUp9Fgr0SvocPP/sqjOCK9ktpyCAo4Kt/d4n4/6baseNKAt5XrauPN1A4ZLAd30RUI4kNfELVx+yd3lrXYIg1Bp/B/dGs5N8mPsJoVyiwkofQSlm+K9aiwmoQMDoI4wefoK/rhkESrSuV+BR2i6HZH9juLzxCtBmn6rFmB66gNJQwBOSxncT/N3FAlxAoLQfJDy2+6rMLI3aznl9fhOcGSdZzoNhex2K3TXJEVe3M4Zb6QhHuJc5BWakYIqqietcPw6FK+EHofUHRqtLEQ5X8dKVENXXgEpLOpcjwkFI30YFVHE8fyx2ShZJ/ydTKlZwZ4BCOv/af9uMi0DILe4kieynScgPbhai+DRDckTT6N6zJpI3HMghM3BMg+q9pHmwrbR0Q0D5wc0JHPy0E5Ur7Nf3Rk68LnR0NHfO28/T5P4cNr+uLFR7eEdiNxvMRbd5Onlqsis4iIVdme4di3akWOz+3T0aUnFWHa8QZrO51NO69MeLPafrNuBenxel/3d21j8k/jyxf+75OQabFxOtuT94G3Lpjzb0zBn2Dl0ep/waPidQ/p/XB60Dp7e8F/QO7WSJg4zEzdwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-ptzActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcExru/9ru/9qu/9ru/9ru/9ru/9ru/9svP9ruv9ru/9ru/9ru/9ru/9ru/9ru/9ru/9ru/+3uxEqAAAAEnRSTlMA5q0cR/PC/ggSKtN5OIhaa5izIOiAAAACV0lEQVRIx5VW2ZLjMAiMToNu/f/PboNsJ5PaKWv8kKRkWkDTQF6v/zyUfO+JX9sP1dKKd/v2acQcm992kbo1R4il7iHIif0BRNtCUOozH4cikAdt2YfjRLTnzN15/8I85wFCI2xDzlnyMLO7R0aFoTzbFGB+jIkYLkyePvmW8d2fs2ZfZuv8It9s6zvV5uSr2LmKb9oVh37QvpjYOcf8fcO3Cb1jGqOU0SvTTd6X2KUBLgKdLzaiDtE2n+isTh8/+AX7E6/Vh/NNSyfVm10RXIe1nxXRapmsDQB7SMnkmE0IxgqvUn0jteEf1T2CHXgr0gjZllGk1HoJL7lD7fRpD20CgJcwQ6EdSh3lLK0zVfuqz2WvPlPJh7HqnCQ4MysxoAYQE0vHub/toRuqzRy5pEUvbg62MzlJQn1MHBe1x7WSAddpNDSN1c9wRMhKfi2jrICwAIsQvHkD7Al41bOrBNC1Y7QdmSg15LDokGETJB/imxYJKfmFMDqI3FjUkDS3NSEDjBaxknRYSb+4nj4kC43W2OKrkqGB8jV2Fq03YiWbhHQTpUV1mMHXWYf8HlNX7ZUQRC6iwBAIK0r0ILr1UxqKsPattAkhwSIiMl76bT/Ft/TbTy2jHQoM7Cz9isHVMb6GILl0H4DGivbw7xNc8rAtiJn3O/qvD6JT/wgs7Y370ZSdWmbZWEKiG1lXImldW7Q1jGMbZW9tUVKZmGjjGvf+EXAqzWiX5OfFSHVp/zjbfGPc3whdcbTF67V2N1e79qYMru2/AnzVYFsdWFt/+nOypv8vQvoHou4gOtSrG5EAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-performance{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTM7OzszMzM3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3NzW8hQDoAAAAMdFJOUwC/gO8ra6tUQNmVEKtAA1gAAAE4SURBVDjLzZMhT8RAEIWnpS3tXcWdQ6wgOJIKfFdUICv6AyruB5w4EuSJCwRXgUBWkGArLsEi6JVuaZkfxawguSWz/p7azLdtdt97C3ASagp+PpeXPDjHVx7McMWDCBc8qPCZB4m44YFIeOBh+ckCf9z+sCCYqi8WvA/5Nwu26cfA+JRBs4h7WmX/tr9AXcQHAPdgzEPZh5idTQBOZ3zyiModISKQGxZ7dd85E0SKfMGjM7vXeI/5AE5LvrwpcK9IOrQYB5BlCsFIvjzgrkaSjsBZbmC9XsGsAxfn8gKXpL9sSlnQFBwFTTuaKWXgI5Ar+sfHTrW6DUDO+2jEEtCNQ9wL6gNujMvvdFS3eugxGT51fBXxTvF1wLLngbT0BGphKalAy0MQ3Z4Ha2V7UoMFJKkFVAWcvH4B0OJfd9YsTl0AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-performance:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwD2qdfrViyAwW2XORBGtSCsD6SyAAABN0lEQVRIx+2VzQ7DIAyDYfxToH7/p10CbQ+T2s33Rb1MijM3/qDG/EurolD9zSNRggBU0hFelMABmenfADhGkJDhGUFGgiX6I1AAQlDgZK/td8ELtQORiTmIq42I2bYdCD8NjzPmYQxO+rbn2S5qzEUF6YjkgcJude56X3s0SoL7LRAeylyaVPiFq0Jyx230mpeXmXVOHssRbhackhCq25Sny++xcBW1n6Snqw6BTgrqRP6kzfDcgmRLGonDWSf2OecwB491dOrEVZpNsxiyiHzWJ0Z+BbBwzaoWVb49HrqVfSkxHen7WNznLhzl8xpQlT3E9oHUtYaufB+7NY9g9ctbjFfj/h1DwXUrzDltMn1Ql9M814EQWPLmEBg4R7JSzpFQxTmSBMkLvJKOhFHfKEEnv3L/+qw3DuMPzAFH9pIAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-performanceActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAtUExURUdwTBGW2xKV2hKW3BKW2xGW3BKW2xGW3BGW2xKW2xKV3RGW2xGW2xGW3BKW2+P2IvgAAAAOdFJOUwC/gCvzq1RAleURc9VmrA9rXAAAAT9JREFUOMvNkzFLw1AUhU+SxtTahnZyC+IsIeAenDuE/oJQcS/FTYTi6hKcHYpDZ/EXBME95BeURpM0Me39Db4Mgk/u23umcL8kvHfOucBBKEr5eW95xoMjeuBBlyY86NOQBwt654HrPPHAca/YuUHrDQsG9eybBWa1+GLBqvS3LJiNX0vGJw/R0N6LJ+/f6x9I3uwG0D+luRU0FnmdCtBy6ZM7KvQdjgXwJYuNZVNrFfqF8IX+nFm/oBvyS2iZ8OWxgH4u1IZmU4kgfoa5E77c0jwhoTYCbTRFGE7QrXFCveCURkK/2cRBCp2gFYiyWk7Jw4AgXOmQZMAqa9uAeCP+JsViihtb9OKIPtBUuvy8jeqyHRpMhvc5X0W6Lvg60HrPg0DREySOoqQJKRbByRWbExaqlSoVwB0rwCLFwesHquttxhcsa64AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-performanceActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTH3G63zE6n3G7H3F633G7H3F633G633F7H3F7HvG7H3G7H3F6xOzy+EAAAAMdFJOUwC/hKbvK0BT2XURZct0z00AAAE3SURBVDjLzZMhU8NAEIX3LiSUNqI1qBMMChFRgYxAd07E4CI6HQwzEUXgKjC4CH5ABAKJyA+oaHqBJO3+KPaYYSZh9nyfyuyXu7l77x3ASSgu+flYX/HgHOc8kC4wwikPMnzhQaTueKAiHvi43bFg0m4OLPBM9sWCjyb9ZsHm8NkwPiUQT8MjfSX/fn+F/C3syJf9YB7oLsDkjIaiHix5QCNbGBmAFPve+3lXi/0viLB3ZnmDz5g2ICry5daAvCbZhSE2oIsFeC35ssJljiQbgZitIY7nIGu4wLG+xBnpL5tClxQhCANR1Q5TSmCCQK7YjftOVbYNUOxot0EsHl0uwHdFfcD14PJLG9W9HfpMho81X0V8MnwdcHvkgS4cBcqVo6QKHQ9B1a6XY1zAcSiIFg6QlXDy+gEd714RcAqEowAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-face{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTL+/v76+vsDAwL+/v7+/v7+/v8DAwL+/v7+/v96T4QgAAAAJdFJOUwBAgSCbs9hZap+hQJoAAADvSURBVDjLY2AYRkAJCAygbEZBQUEBKJtpJhDAOJpA9kSYxESgKphuIaBuhASqyYzESjC2hDRilQBZ64BFgm2qMLPYNCwSkQpAwlMBWYIRzJsKYrKCxZSRncKSDFYzBSNY2MD2MqRhSFgqgClPAwwJBxwSbAk4jGKZDCKZp2JIsEOcOx0ztjQDYL5ENwsYJKrTsMSvGSgepzVg2pE5qSikPRPT8sopBuDod0ATZ54JsbZyBrJgAVAp1Ax2oPXMykjxYQaLA2CMoERUZQDMrgBUCc8CKIdzAvHJhyQJpLQLSu0TCaV2lPwBSu0KQy+LAwBuJj5UbruNggAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-face:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTP///////////////////////////////////////////////w2imYoAAAAMdFJOUwBAgBvfrFmcw4wrbtGliFoAAAD2SURBVDjLY2AYRkAJCAygbEZBQUEBKJvpDBDAODpA9kGYxEGgKphuIaBuhASqyYzESjBu79yIVWIP0NoCLBIsR4WZJY5gkYiZACRqFJAlGMG8EyAmK1hMGdkp7M4gkus4RrCwBIApFwwJmwlgqsYAQ6IAIrEAwygHHEaxngJbfhRDgg0sxHoMM7Z0AmC+RAPsJ4S5NE5gid8VoHg8sgHTDh/PzM60HkzLc44bgKMf3RKuMwoQ+dNIgswJDAycUDPYjhgwMCsjxYcJLA6AMYISUTkBMLsaUCVqEqAcngPEJx+SJJDSLii1HySU2lHyByi1Kwy9LA4AqflRBKNSA88AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-faceActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAhUExURUdwTBCT2xKV2hGY2hKW2xGW2xGW2xGW2xKX3BGX3BKW23povfoAAAAKdFJOUwBAgRybs9hZLG6hrV9tAAAA80lEQVQ4y2NgGEZACQgMoGxGQUFBASibaRUQwDhaQPZCmMRCoCqYbiGgboQEqsmMxEowTgmZiFViFtBaBywSbEuFmcWWYZGIUgASXgrIEoxg3lIQkxUspozsFJZkEMmxBCNY2MD2MqRhSFgpgCkvAwwJBxwSbAk4jGJZAbZ8KYYEO8S5yzFjSysA5kt0s5YKc6guwxK/baB4XDYB045Vi4pCyrMwLa9aYgCOfgc0cY5VEGurViIJMhcAlULNYF9mwMCsjBQfZrA4AMYISkRVBcDsCkCV8CqAcrgWEJ98SJJASrug1L6QUGpHyR+g1K4w9LI4ALk0RHtSETFcAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-faceActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAhUExURUdwTHzD63zE6n7H7H3F7H3F633G63zF7H3G7H3F7H3F68TinBIAAAAKdFJOUwBAgR+Z31ipwW4yAjb9AAAA+UlEQVQ4y2NgGEZACQgMoGxGQUFBASibaRUQwDhaQPZCmMRCoCqYbiGgboQEqsmMxEowTmmZiFViFtBaBywSrMuFmSWWYpGoUgASXgrIEowgHtsKEJMDLKaM7BSWYLCaJRjBwloAploxJKwUwJSXAYYE2KUMVRgSrAFgKhTDKPbFIJJ5OYYEG1iIfRlmbGkVwHyJBlhWCDNrrMASvxageFw6AdOOqKCklrQuTMuzlhiAo98BTZx5FcTarJXIgglApVBr2ZYaMDArI8WHKSwOgDGCElFZBTC7GlAlvBKgHK4FxCcfkiSQ0i4otS8klNpR8gcotSsMvSwOAIs+RIlIrewIAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-object{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA51JREFUaEPtmT1oFEEUx9/bnRALGxE70btkZjcR7QMiRisRbCzEQvxCLGyEhCDRBC/RoNaWFgYLFUSwUBAUDKKFFqIQ3OzNJpfCyspS8HaejNyG87J7t7N3l03gttydefP/vbcz8+YNwhZ/cIvrhx5A3hFMjEAQBDwMwzOmAi3LWhBCLDTr5/t+ycSubdtLnPOncX1iAfQAlmXdNBmkru2RVgBSSspg+5kQ4lRjv1iAIAgqRFTIMIju0i2AWNvrAKSUowDwLqP4tACm9rWmbABCiFxXKimlhu0BtPFHtdc19wj4vn/Wtu3XnPOfWVByA5BSngCAuwCwryb8Hud8EhGNltANB/B9/5BlWXcA4GCMx/8g4jjn/H7aaGwYgOd5BxhjcwCgPd/0QcRVAJhM2l3rO3cdQEq5GxFvEdH5VsLX7aKIH8MwLLmu+zapb9cAFhcXt/f3988AwJip8Jj2L2zbLg0MDHxr/NY1gCAIpohIJ2V2BwC0iUd9fX2lQqFQ6cQvtJbICSGOxHhlVOdKjuPMl8vlqzrxI6IdWUAQ8Um1Wp0ZGhryiYghYrUtgDQionxJT0al1IwGkVJeBAANvieNDQB4joglzvmilHIXAIwrpX67rmuUamfKcxoTvnoQ3/dP27Z9g4j2J4C81KBCiC9LS0suY2yMiC7rttoZuQBEQhsiopfT6wAwUvv+hjE2XSwWP0kpRxBxgohO1kPmDhAHEgTBUaVU1XGc98vLy8eVUhoqbpPLPwIx6/wqEV2ovX8AALzZ/Ng0EWgQGa1iLQ8xPYCUyx8YHjt7EWjm2I7sAy0it7ERqNWEDkeiklIJg8pFWwC1ZC6SM9NYc1oXgcaiVlxVYmVlZW8YhlMAcCnFvOkEQPqqRBqASLTneTsZY3pjapZSpwF4Y1nW7ODg4Ie202kTgGiwSqWyrVqtXgOA6Zj0OhGAiF4R0azrup87dqDJAlA/eLlcnkDESQCI0us4gOdEdNtxnK+tfkHjA027AJEgKeUVANBROVd7p3fixwAwJ4T43kp4nR2zylynAOoE/JuAiPiDcx6kFb5pAEwF5zKJ2xXZrH9uc6BTUD0AAGh639Xo6bjUI+G/NglS+p3Y87wCY+y/2ozJSGkuRDLekQFjbEexWPxVryfpjuxhllKhNtwtAESc55xHx9M1hsR0WlcOlFLHTLyv26Ypi5hesyql5oeHh3VBeN2T6TxgCtXN9j2Abno3je0tH4G/KbtRT7VUKs8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-object:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAwdJREFUaEPtmTuIFTEUhv8fLSxsFrET3UIQRHtBRNdKBBsLsRBfiIWNoIisD1xfqLWlhYuFCiJYKAgKLqKFFqIgoiBoYWVlKbjwy4HMJXs3M5Nk7tzZCzfdvZPk/F9OHicnxIgXjrh+jAG69mCpByStB3AgQ+AcybmqdpJmEvv9SvJhqE0QwBm4lGikqD4VAaCMvh+R3NffrgzgB4DJDCPWpC2AYN+LACTtAPAqU3wsQGr/pikPgGSnO5Ukgx0DNJhRzZp27gFJBwE8J/k7B6UzAEl7ANwEsNEJvwVgmmTSFjp0AEnbANwAsDUw4v8AnCZ5O9YbQwOQtBnAdQA28nXlp/NG8HT1G7cOIGkNgKsADtepDnx/C2CG5Muytq0BSFoJ4DKAUxnC+5s8cSCf+j+0CXDBjAJYNgAA6+Keg7AwpldyAXqBHMmpwKjYyThJclbSSQBWfyIT5IF5kuQ3SctJzjcCiBHhxUu2GM24gRx1IGtj+gDw2I34Z0mrbXcC8JdkUqidFecEAj4fZD+A8wA2lYA8NVCSHyRtcGvouKtrg9EJQKHVB7Ht9ByALe7jCwAXSb6TZP+dAbC3D7JzgBDITgDzJF9L2u2gQoectV0yAD7IEffjDgC7plaVJQdgYotdLOYSMwaI2gETr51jD1SN6qDOgSobw/WAywltLxRVhBIxi7LxInaxUCHHFvmCpFkorWInoR8LheqsA2DB3LGIRdPIAznBXC1AIVrSKncwVYXUMQB2Sl8h+SYQOCanVaIBPJAVAM5aqBAIr6sAnjnh78s82aoHQkYlWYwz7YXXIQCLRK+R/Fg3BYcO4HnlhPPKIfefTYX7dm8m+aVOuNdP+1OoSow79KzKL5LfY4UvGYBUwZ0s4qYiazzY7RRqCtfZIm4qfGBrAEDle1e/0FDoUTKvUxiT3gfsaWlBbibFUsyDiKSkBK9nf4LkH19P2RvZ3cxUIVoEmCVZXE97DFXPrJY52JUy+lY3Ji2S8cxq4i3jsahk3QdSodqsPwZoc3Rj+h55D/wH5CHfQHNA9EUAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-objectActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA9JJREFUaEPtmU+IE1ccx7+/N7O0BwUn24UeRKOd7LalvS+I6HoSwYsH8SCtLf1jEqWoyLJVMfEP6nlNIgi6eFChCB4UChaU0h7aQ1GQrnFSdw9e/JNs9LTFzPvJZI27m8xk5k02m13I3sK+33vfz/u9N+/7fo+wzP9ometHF6DTGfTMQF+mYNqwd6sKlFLcK++P3WsWF8nkUyr9stAeTcXN624xrgDVAUgcVxmk1lbaGPIFyFocou9fSonYzvo4d4BsYQLgaIhB0EYA174bAFaNWpuFhrthxDsxQQCMrKXUPwGbvfr2BSglYh39UjmwXYCwy2kh4jqegd5M/itdaL8+i5vPwwB1DMDIWNuJcBbA545wAs4V4+YIiJQ+oYsOYGTzGwniDIANLjP+hkCHiglzNGg2Fg3AGB3/Ugj9NBO2+4ujSSaMeJ2uc+PbDhC5aK1GhU6CeY+/8IZz9E+CnSomBn7zim0bQF/m4QqbPkgDOKgufH4EAzdZaKny3vUP6vtqG0BvtnCUwY4p01oFcOIZuCJ7elKvvo9OtLyESMN7IzeViA3VC3TshiY4Wkz2j0Uyj3+aMX5shAIhuia4kn6Z+DSPu6xjiCotAQQRMeuXaJJYpqsgOetbcBV8TZA+ANxgotRU3Hz48SWr7800DjHL6VJyQMlqh/I5jYZvFsTI5XcRa0cA/sLDv98iieMv98X++Sj7aEBCPwjwD9W2LNMdAqhJnQMyc5D9DGBwRhzukK4fK/647q9I1hoE6DDAO+ZBdh6gEaQ3V9hi27JS3tf/u3Hhv20kpQPldsgthQw0fOcnpc3fVK2EhosEmE33x9LJwKxM54Lj/Ap0SeoCBPz+qVw7uxnwmdQFOge8R1n0DDg1ISaxqSbJy0oE2pTvqhStbOK5FQy2ka6vOTVkoL6o5VaVWHX+yVoh7KMAvvPbNq1mQNmNBgGoiV55fry3R+jOweRpqQMBMO4wxImp5Cd/tGynVQBqg0UvT3z4eroyDMaxenvdHIBvE/GJYnzgb69MtjUDboMa2ceHCTQCoGqvPQBuSOZT5WT/fb8luOgANUFGxkoQYVja+Lq2iQm4ygKnS3tj//oJf9+PamUuzBJqJsY59Jz/9wh6+iJpFoIKXzIAqoI7solbFdksvmN7YKGgugAMNH3vqp9pN+vhtq5VMqT2PpAbjwrW59VmVAYL8iASCfdGBvm/bpQPrCvP1eP+RpYrXA5XKgTaBkA0Voqb1eupL4DToFo5YLlVZfadtkHKIqrPrFLIsXL8s0k3LaHuA6pQ7WzfBWjn7Abpe9ln4C11Qo9Pmb2aMgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-objectActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA8hJREFUaEPtmU1oU1kUx//nvthx4cJqX3RgGLsQBNG1tq8Z7axkwM0sxIX4hbhwIygibfPMeyapunY5iymzGAURZjEDAwoVm8SPhSiIKAjtQtAmiooLiyb3yEtNm76+5L37kjQp5C2Te879/+65H+eeS1jlH61y/egCtDuCNSOQyH3cWirNHVIXKO6kYvqdenbxqVlLxS8J8Txp6Ne9bDwBnA5IiIRKJ5W2LDHsB2BmC6zqmxk3UkP6AbedJ4CZfTsNcL9qJ077VgHU8r0MID5V2EsCk2HEBwbIFdT8M/aGBkgaelt3KtOB7QKEnU9NsGt7BMyp2cOa4P8tY3M+DE/bAC7cK+xnxmUwtjvCCXzFHtRHiEhpC11xADOTjwG4BCLDY8S/MvhsyoheDRqNFQMwc292QmppEPb7i6MZgEdqna7V9i0HSNx/95MscRLgo/7CXS0IWS6VrFRs8+1ati0DSEzm18kesgGcURa+3OAfSGklY5ueuP9qGYCZzceZySKC1gQAgPkvXtNjpXatn258CmlYSOSSg/qwW+B8usH9SSM6Ec/lTxM7iR/3hgEh4Jpk2Kkh/UVikiP2MBUbAggiYjFfchajtB0QM/fuOFg64D8H8QHQTQ3CsowNT8cffdLnPn8+KyXPpWKb1FLtYJ0tbbU84asCyRYOEmiMwTtq+P63JJAYH9AfxTOFbUTlNXRyPlmTdpsAKlIXQZyDDJJGGbx7/l++BSHM5EDfg7HMm91CRM6B+fdqyA4AWA5iZd/++hWymDaid+OZ/G8EGgXB65DrhAi4Jw3NsORj5VRC4A8AW+tN2Q6KwKJM54b2HcD3EtMFCLojqVw7uxHwGdVQ992OjkC5JqSJPRXw2qlEsMpFo1OonMx9/7gE211z8iirLC1qeVUlxrLvtwgU4wBO+K2bpgCoVSX8ASqiRx682hgp/jBaL6UOBsC3pMTFdCyaaUI6HRyg0llicnptqWfdeTBMd3pdH4D/kyQupgf7HtaKZIj7gDpAdefxzOw5IjECoJxeewEQ6CZBpmwj+thvCq44QEWQmZ09BYjzLHFk4SQm/C2KIm3/svGZn/AFP+qVucYi4BbmbLnOb5rGr+zB6MugwjsGQFVwWxZxoyLr2bdtDTQLqgsAQt33LvdIe6UenvNaJUQqJ3Hi3ut+KSNLajMqfQV5EAnzRuZoEF8ivfZw74dqPbXeyP4MVSoE0DoAmkgafeXrqS+A08CpHBDTPpXRd9oGKYuoPrNqETlhD/w446Ul1H1AFaqV7bsArRzdIL5XfQS+AaeCtE+rbksUAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-occlusion{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACCVJREFUaEO9Wn2MXFUVP+e96X5oa9UoYpUszrzzZlqLKDYhgAFaaKU2+M2W9Q8TNUQSQEsiRUjFVaHGNmoBMTUmaPwD2iIhqKR8WEBFGkLFUjbtzDtvpjYrVhpCXAtm1867x5zxvnXm9c28mR13b7LpdO65557fveeez0GYp1Gr1d4VRdF7lL3rui/n8/lX5mMr/H8wDcPwIgC4QkQuAwAVWv9eA4BJy/8sAHg7ALysf4i4DwAe9Tzvj/3uP2cA5XL5CsdxNiLi5QBwUkQeQcRHrNB/JaKZZuGYeRAA3gsAZ4nIBkTcAABLROS3xpjdpVLp0bmA6RlApVI5FxE3OY4zGkXRdkTc6/v+c3PZPAiC80Vkveu6Nxlj9ojIjmKx+GIvvLoGcODAgTctXbp0CwBsEpGHEXEbEf25l83a0TLzh0RkMyJ+AgB2TE1N3b5q1ap/dcO7KwC6AQDsRMQhAPiu53m7umHeK00YhlcDwC0iMg0A13ZzQJkAlKmI3A8ADyDi9Z7nnehVsF7owzA8Q0R+BABXIeJY1mF1BMDM3wSAcRHZ5Pv+nb0I0i9tEARfRcQdxphvFYvF8Xb82gJg5gsA4FkiyrylfoQVEScIgttyudxLhULhwSQvZhYAuJCI9qftkyrckSNHzs7lckdFZJ3v+0/0I2CntRMTEwNDQ0P3i8inAeCUPmLP8/Y2rwmCYC0iPl6v19+3fPnyvyT5nQZAmQ4ODv5aRF70fX/zfAk/OTk5PD09rcbg4/EeiPgPEfkUET2dALENEc+dmZm5cuXKlf9unjsNADNvBYD1AHAJEf1zPgCUy+UljuPsQsSPpfD/m95Is29h5rcAwO8AYC8R3doWgDopx3H2I+IXs17/XIEdOnTobcPDw3ry6zrwCKMo+kypVDoU01hreK8x5oJmZ9dyA0EQ/AwAhnzfH5urgJ3WVSqVd7iuu8vGTB23SLM+QRCoOZ/2ff8Ls2oXf9DYJpfLPSgiH+nGgfQKcGJi4szBwUE9+Uuy1orIQREZKxaL5WZadaiI+Ey9XtfbacROszfAzL8wxtQ62dysjdvNM7MGcSq8Rq1ZY/+pU6fGVqxYcSyNsFKpjDuOkyeizycBHBeRjb7v/z5rh17ma7XaSBRFuwHg/C7WPYWIV3fy9kEQXIyIu4no3bMAqtXqZcaYnUREXWzSNQkzFwBAhf9wF4v2RlG0sVQqncyiZWZ2HOfaQqGwr6FCYRhuE5E3E9F1WYuT83qluVzu74VCYWfzXLlcLuqDBYAPZvEUkYeIaBQR61m0Os/M9yDiG57nbW4AYOZnAeDWpAPJYsbMNwLAD5TOdd2L8/n8Hyy/FfbkV2bxaKgB4s89z5u1LFlrmPlSANhKRBfGAPTBrCGiatbieN7GSpoaDut3IvLa4sWLi8uWLXvVbvBUFi+NchFR00/V6+16ollr7AGpaj5JRCMxAL06VaGWNLATM2ZW4dc00yDinZ7nbdLvrLXQaDZ1iMi9vu9/ySb/BwHgTAC4kYh2ZIGw6ekbRJRDy+AlIjoja2E8X6vVilEUtdhoOzdBROdY4fcYY0Ydx0kDcQ8RXd90m+qVH9P/qwPTf9WcK5+YJmnemfmE67rnIDOfBwA/JaJuLEWDHzNrAPZwGmCNGnO53HYAWA4Aoykgvk9EX0uuDcPwBhG5KwahAjOzqqHqewNYMwhm/hMAXDMnAEEQaP76vTY39v4oiiZd1/0VALyzGYSI3OH7vubVqYOZ9fE3NEENin1LDdqkgZkFMBcVqlarG4wxv0mR4nUiWqLfHz58eGTRokXfdl33tnw+n+pVu1XZNLpZFbIq0fKIm6yIOhX10K8g4t1E9IDSa84wMDBwHBG1WNU8NIObDReY+RYA0EqDhhJqbQ4SkRYI+hotj9gCaDGj1Wp1lTHm+ZRdvk5EDdVh5h9qiaWZBhHXe57XCLKYWVXoygSPk0SksX1fw3r4FjPa4shsVqanP5DcyRhzebFY3Hf06NG31ut1fWQNT4uIWzzPu0M/d3gjTxPR6r6k/+/htDqyMAy/Y4zRPOCmmLn1zprYJ8eriLja87yJSqXyScdxHtKSi4YCVvgxRLyvjZCpFqhXQEEQbHccZ9rzvG/EsdBFIqKmVK1AYzQJl8Z/NH4PzHxV/NkCuAsRb0hb1C4x7xUAMx9GxGu0ONycD0yKyGcTuegLAJD26K4joh+nbczMe7QolZwTkZt939/Wq7BJeq2nIuIviUgr3v9LaDSdFJFjKR7vtMcYOxXVRWPMpY7jCBE1PGiz84k3F5G7fd//Sr/CW80YR8SROK2cvYFOKSUzr0PED2hGZYw5ISLHrafUx9QI2uICmFY1RORsx3FmEPE5EXne8zz1mn2Pjiml1d+ekvrmqHO+K3hWvvZJvb2ensoqCwmgq7KK1eGttnuyNqsSvVAAtGINAE9oF6hjYUsB2EaG6vWx2La3U96FAmAt28jU1NTqZOMjtbhrGxovZJXVFwJAXGYHgPPS6lVtS+dxY6PT41wIAFpe79To6Fj7j9PCdmX2TvF6vzYzLqtrgyX2MWk8M5sXcaNDRLQjeft8Vaxj4bQSLSJbEFHjsraNjZg+E4AS2obHTzRb0kxsvirXVm1vBoAT9Xr9y2kNjeQtdAVAF9kQW5PseW+zzszMjCcbGe1UsmsAMYOURveTc62nap1TRNYsSKM7eQIaO7mu+zkAWAsArwPA45oXdPNTAxutaillsTqoKIruW7CfGqRdpRaHReSj2lvo8scezyDiY1qc7dda9axC3W64UD+3+Q/fZENVhTDr2gAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-occlusion:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABphJREFUaEO9WmnIVVUUXSuiuahopOLLIqTBBgtCC01Ty8JmS/sRVESBNgiVJVZaaag0WBlGYNEPrSyiQdTKskEjpNKSCBqlzAqJSAsbYMV67vt13/3uffe+93pvw+Mb7rn77HXOPntY5xEdEkkHAjgk1G8k+VMnpuL/oVTSaQDOBnBmGG3DfwHwXeg/DMC+ADbGZwWAZSRXtTt/ywAk2eDLAIwAsAXAkvjY6O9J/pk2TtLOAA4FYDDnxmdPAG8AeJbkslbANA1A0gkAbgJwKYA5AJaS/KCVySWdCmA0gFsAPAfgIZLrmtFVGYCk3QBMDeNfAjCb5MfNTFY0VtJJAG4FcL5BALiX5B9VdFcCEBPMB7ALgPtIPlNFebNjJI0DcDuAbQCuq7JApQBC6SIAiwFMJPlzs4Y1M17SAQAeBTAWwPiyxWoIQNJdAKbZbUjObcaQdsdKujHcaTpJ25ArhQAkDQKwmmTpLrVjrKQdANwJ4FOSL2R1SRKAwSTfz5sn1zhJhwP4BsAokq+3Y2CjdyXtBMDueRGAv32ISS7NhN+RAF4D0I/kt1l9fQCE0lcArCPpyNARkbQrAAeD81IT/ArgQpIrMyBmA3D4HkPyr/SzPAAzIzYPJflbJ6yX5ARm48/J0f+DdySdWyTtBeDtyDlTCgFEkrKvXVV2+lsFJmmfMH5UAx1fAriY5CfJmIiGCwAMSie7uh2Q9KRjPcnxrRpY4vP7hfGumcqkT/SR5POyjeSVycu9AKK2cRQ4vUoCKZs9J5ocFMYPrfDu2sgBn2fOgjP2e7E7tdopDeBpAF83irkVJs4dIslFnH3eVWuZ2IWdwDbkDZTknHAEySuyADa5uiT5TtkMzTyX1ONqE4ALtzJ5C8C4Rtle0pCoXg/uBSDJPjmf5FFlMzTzXNKRYfzJFd5z/PcCujRvKJK+iFppRc2FJDnO7k5yQtnLOb7tLf2RpIu9XpHUP9zmxAo6X3R5TvKfCmNt7zwAvztPJQBWA5iSTSBlyiRNAvBAjBtC8t1YkGNi5Y8r0xHPn0pHlrJ3JJ0BYCbJwQkAH5jhJL8qezl5HrWSW0NnVItbyP4kN8cE9ucycVh0+2m/nlM184drvkmyJwHgrbML1bWBjWaXZOOHZ8bMJeluzdts13I1WyQLSF4dzb/DpsPsJJJuaBpKtKd2oR0ZClwJug6vJOHfdTE6XlxPckAY7xbRbWceiHkkJ6Z201l5efw93T8dzkNP7d/Z8C7JfckAAxgI4AmSVSJFTZkkF2BuK/OkX/TKRweALIj7Sd6cfVHS9QAeTkAEALuh/d1Sl5klfQjgmlYBuEqdVQDg2KBTXgawfwbEDJLuq3NFkg9/zRMcUOIsJTuQrVB7AZiAataFTIu8mmPFVpKuNL1LTmB3u1kpyqqV/LUY7HYXisnqDnEqijipOEObVXuEpPtiG+dGxP83WZUWd3C95YIkN+hmGlxKONqsJel6pi2pO8RhUF0YlXQKgDU5s9xGsuY6kh4MiiU9bHRCUEmyC43J6NhC0rV9W5IXRusSWaywV98rnZURJFdI2huAD1mSaaeSnBHgis7ISpLD2rJ+++L1SWT3RB9ghqwmkgzKjX1WNgMYRnK9pAsAuAxYTNLRxu+5l1hYYGRuBGoWkCQzgu4L7kjOgP3WodRRIAGQGJen33VLch7GJr8HAIdCh8Q8yW3MWwDwWS2EkqvS/YBJ2UsyvehHAPIO3QSSj+VNLMkJzKRUViaTdNHYlgSf+jxJk8R1DY3byQ05GS/vMNaSSvii/VEkaxlUUjr5JMY6gt3QluX/eYZLlJ6k+KvUUkpyqj8+OirH300pALWiLSHAJJnVMK/kusqs9RqSTjptS3C0+S1lrF5TTX266uw0gxf2FTf1McDkUWVapZsAKtEqAcIu4FJhZBkT3S0AwVib4lxCspjYCgC+yLBf+0DXYnuRdBGAI5trK+efuouPInLXodMhtCGt3g0AKZp9YB5f1Yhe923JokaHs0sATK8XXnSUXXAkbWEuzd6oXm83ZkpKaPVpSY7J01l6eZFcdESX5cu3jjDWiXHBRLvpcV1WeLGRjC8FEAfbienx6JZmdZC5tttOBuBkeW3ehUZ2FyoBCBAurWv3ZdEPd/Ka1W5Td5FR5JKVAaS2OHvRbX6mJT41eE5TM52/6M6uQNDxlzvhAdga91gusat81cDVquurPQA4QS3s2lcN8rYyyOGzfLdQ8cseLsiWu7NrN1o17UJVJ+zW123+BfogD+TkdLQFAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-occlusionActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACItJREFUaEO9Wn+MVNUV/s59+wOqyM7bFaxAsDBvFqnWak0MYhBQUEqUVssi/aNJawg7bxaKScFqqKyt0gip4sK8XUKqjX/IL43RlqBSxLZWYqwWdWNh3oIlFClkebMUaXfZefc0983MMjv7Zt7MLrvvn93MPec753v33HPuPfcRhukZt+3YeCndCQpeCO3kmWVTTg+HKbocoKHWjpnEuBfMd4GgnJ7ADAcCJzx8iUlE0AGcBOMkiPYz4c1kNPzXodofNAE9fvheQCyBoLvBOA/wHunSHq7CiXM9+BdWGj39nGuxq8dWYyJdxCSh8UKAFoIwBpL/CMidTmzam4MhUzaBmpYjNwmNVoFEA9jdSEx7zzZFPhiM8dotiduYeAFIWw2Wu6TLm7pW1n9SDlbJBK7d+rev/c8du5aAVQC/Lok2dEWNv5djrJBsTat9s2BeA9AiBjaN1s499eXyW/9bCnZJBNIG0AbQKCb8OhkN7ygFvFyZUGvHQ8R4DOBuSWgs5QUFEkiD8nYAuyuJmk5Hw2fKdawc+fGtHeN6mbcAWMxES4NeVlECequ9DoxmMK9yYpHny3FkqLJ6PPFTEG0CyyedWH1zIbyCBPQ2ewYk3ndMI3CWhuTsOhb6uMQTEBWfOdGpr+Zj6ZbNELjdaTQO+tnxda6m9R/XCa74AoLnO42RfUNysJjyuvYqffyo7QA/AKCXQYuSZnhvrorelpgHSW9LSn2jK3r9P/PhBhLY1V6ld1b/HuBPHDOyZricn/jsidEXRnXvIOD+SzaoS7r8/a4Vxrv9SFiJDQDd5NT13IeGGy7mjg0gELLs9QQsQAp3OiuN/wwHgbrfHh4ju8UOEH3XB/9LkvxAbm3RW+yrUIE/MbA3aRqPFyTgFakKcZCJfhK0+gdLbKz1aUjDaJWG5xfCYKADcB9MmtM+zcpksuELMiVn5Ba7fjOgxxMvgjDKMSNLB+tgMb0xW4/UVUpth7dnCnp8so9uJbaD0e3EIj/OqvcR8PY2VPGqJL6jlAISZD9//Op4+zWSqncwcGewLh8il5eeXVF/OFc2XVDpPXDqwezeqY9AyLJfIpbHiuXcYMP+EnqLPREVUGEzMxCDcFC6vUu7mqYf95PV40eamcSUpGn8SI1fmgHLPiUFL+lqjPw50EgZAjVbjk0Wwt0J4LYgNQYOVBE9VKza17QlZglJOx3T+Hofgdq2o3dJKduSpmEEGSlnfOxWe6pwsZOA75Sgt1dUu0s6H552Pkg2ZNm2EKLxbOPU/d4M6FbHBma+IhkzYkHK+ePpKa34d9Kc2pY7VmcdrpfQVNh8OxCT+TVnutGAOZQKlAUQittxIrrgmOE1aQJx+30p8Xh+AQkC01vtR8B4VskxtFlJc8pfPLw2ezokVNjcEIThjRP9zomG+zJLkE7NZnu2EFjvxIzbMzNgH3c1zD233DgapJwd17fYM0DYD8Lo9G/s9GpX1p9ffm2nZ0DDgUAstcsVNAGMWQBtVG80UAeACk3NxTuOaUzOEkg5KVwx4BhYBE237P0A5vYTIXreiYZXpWf1SDNIrCsIwfyCE4s8rA7/qV73EIBrADzimMamQBItdrVegQuOaVSQAui96H6WjBnjAhUzAnXWsXoJt1+Ozgy1O6Zxo+e8JnbBlQ1+JBiIJ02jqW824/Z8EN5KT6R8Uv1R6dzDyTz56T0Ut89UVmk3Ut1W+xZXYlsyapSSKTy4Osu+XwKv+xFWu0aBio1gXA+BhgEkGL9xYsbP8nVrrY4VDG7JklAOhyz7AAGzc3/L6oVa7Y80gWWDIhCKJ9YQ0TO+MybwTVHpnnB7tDcIuDqXBDM/nYxF1haaabX4ZS+8SFAJRa2lrGx+gukjMJgQCllHFxLkH3wc+coxjTHq95otn08mUflLltoTXU1TfKtqqSHrJ9cXQt6Cs+x+izgni6iicgrg0wBtdkxjtwfmHUSqTgGkmlW5jzrB9W0Xai37MQYWAZioml0ADjmmcfNQHPd0cxdxhkC/NFrXdvRWKeWH+YYY+HnSNLzQ0S37OXgtlpyHaYETC3sNqlrLfoOB+/IwzjumcdVQCQxMo/mFzHvD1ertV+UbIynvPttUv7/muS9qRHVK5Xqv0hLT2rOx8NPq/0JrhIF3k6YxZ6gEfApZx68Aqc4Bq7PgqjqDMMPHWCcTzUlGw+211pHvMcRrquXimEZDxvmlRPSyr5MFMlC5hHQrsREQ3Y4Z/oVXyNLNWd7mmMb0LFiOc374Ddn1oFv24r61obCsRAuBVvgpFTqYl0/A/pyJlqnm8KXtdKt9glz+Qe5ZtNayP2ZgwKJjRiwZMyw/w7pl71JNqQHrh/nRZCyyoVxn8+W9fqpGrzhRY5IXupdCJvEiwMfzK57vYswc99KxKGdDCHaihldB+xWfDDiDNyfNyMqhOu8lD6860+TssbKkI6WuSj3oW0yYSZBnwHxKEc3dtGUbYF5Xg/k6CNHDTB9o4A87zfBHl8P5okfKNLvyDvV+BC6Ho4Uwih7qlVK5bZWRJFBSWyUTw+sJtLCSMC+oEz1SBNIda+xj8J6ijS1FQF1kdLtjVYE6ns3thaZ0pAhkMtvkUdq5OfkXHwWau96FxsdBbfWRIJBts0vCLX79qoKt8+zFRrH2+ogQsGwudtFR/IIjeyws0GYvtl8fajbKttVBaM7WGD/MwMuL7EUHwBuRoqeGq2PdV1C9TjSvBWh1sYuNrHwgAS+9pi88tgIYx0TPDFfnOhO2jwI4Iym13O9CI38WSiLgKe1qrwp1VjePxDVrsq6nOf8io1BIlk4gg5B/0S01emew/VSvz+ny3BG56M5/A6odz6T9kIB5DHwFxtsssbuUTw1IYDEI8wm4koF9xO7LI/apgd9UquYwS74HzHeU+LHHeyToLdWcHWq2KjuESjU4Up/b/B9u0kgtWdqPkwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-occlusionActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACJpJREFUaEO9WntsW9UZ/33HaZJCX7S5TmhalQ1NaAzGYJUgvk7pe5QKusGa0v0xaZvQkKBbK60BWl/b8XWKaLWtUJg6IcG0P+hrCMHWlcdK2OLrFPFYGdU0ac+q9BHfFPoC2sQ+33SufVPXvfa1kyaWolg+3+t3zznfd87vu4Qx+nQfONc8yF+0KvP1NPHoxjsm9Y+FK7oSRo2+fh0I3AUpFwHUyoxWIv6EiI4o+8w8m5mmE+EowEchxH4g95rZ1myN1v+IAUR6M3eRwCqAFgM4C8ZeZuyFmHDk9OmpH2+7my4UB7fmj9wwderpWZBDs4mwHOoPmAzwn1hiV7I9+NpIwNQMwOjtvwWC1gLUwVJuIfA+s73lnZE4N3pP3M6gZSTEeoB3Q/JWs735w1psVQ0g/t6xq+T5uogkrCXQKyDebIaCf63FWTlZI525FUydDF4hGFtFYzYZnzvz82psVwVAOSCI7QA3MuMJU9d2VmO8VhnDsh8gwuMAnWfIh6p5QL4AlFEAO5ixp45yj8T1lkytgdUiH7dOBLMceIYIKwGs9ntYFQFELDtGQJyJ1yZDwadqCWS0spF05qfEtJWl7Eq2N8fL2SsLwLBOtgEybeqa7yyNJthYjEVucSYqRN1HCX3GS6W2DMtmQIRMfUaflx/P4GJ9x6+Tsu6/xGJpIjzjzdEEWEk3tvtQvZzVsgPM9zEwJJhXJMLBfcU60dTJJUzyDSGyX+pqu/Z/pfYuAxA7xPXytP17YvowEdY6xyr4dekjEydxo0oG9170QadY8neS7drbl4KwNzPxLWKqdk/XTTRYPHYZgGgqs0kSLQsExJ1dd8w4MxYAOlP25AaCCv5uD/vHIHP3FdeW2IGTU3I5+WfBvC8RDm4oC0AVKRbUR6Af+u3+kQJ7rPfwNXVi4k4CLS1vg/+Vy/H9m+Y1/82VUdmQwc+T5LbiYnfJDBhW5gWAGk1dWz3SACvpxd8705QbHNwJ5kV+9r2yj2HZOwA+b+rBH7j6wwDyZxt6CcThagqIXwCl47GeTIusJ7Vs7vTTZfDBHGVXPxGa+Y9i2ULFTrHk+92z00UAlv1bSPmfSjnXz3G58c6ej2c1TGjYCYLub4P6JAZXd+szD3vJRnr74xDiy0ld+74aHwZgpOzjknhVtx78i7+T6iU2Wp/OEZzdBcLtVWj1BJB7oFK132hl5gmmXWZYu3YYQDQ9sIiZt5u69pUqnFQtErH6rycWKvhv+ioR9l2QWLU5rJ31kzUs+59E9FAi1LTfmYFo2t7MzFebevBhP+XScTWlVCdOmG3a9uKxSMq+QRB2MvANX5vML4shraNrAWV9ZQEYVuZZIvosEdI6HQCGlUmzpA2lBcTPWLTPXscSv3DkmOeZ4WCv+ho7cPLGXC63i0A3+dnIj9NvTL1pOLP46UR67fkkeJOpB0MFAPZhxoSFSX3av/2U3XHD6m9j0H4CTSz89kmgoeGG+NwpA3kH6PGzxcAOAbQyMI8IW9QT9dNR4xHr1PWEobdMXZvjAIik7OzpM01Xl14DKxkzLHs/gIXFMgR6KqE3rXVsqqUlRKy8DX7e1IM/2nCgvzmQFQdBaAFjnRnWtvqBcK6nUwY+S4a1OlLswfnc5x+ZejDop+iOq/VNhEtytLOKwIeSevBmFXxgQt3u3FC2wwsEMT+bCAcfGbZn9S8liNcdG1J2qf8qnTsps/ApTe+Glck0Bq66mWJ99m3MeC4R0vwzRcFYpM++lyRe8QKsTo1STtgC4KsiQB2lIAj4eULXflaqG7UG1jD4aReECthI2z1gzC/+zdWLpu33ifDgiAAYVn8nIJ70BBAQX/siK480CLwKJq0YBIG7E3owUm6mnc0/JJ2VoBKK2ksXZ6DkhOoCGMkSilr2cgb+4BHIOVPXJqvfN1rH5giqT0gORLv1azyrarVL1ktueAl5beKiLKL4nuMg9BPxtkQouEfJOxeR1ubjAKaXbOJ0Qm8aPi5E0gOPE7ACzLMAtBJwMKFrt44mcKV7ySZWPxjWpWk0lrLnSsK7pY4Y9FhSb3KWjpG2fwmGk3HcD5NYlgzNcAgqI22/CsY9JTbOmro2ZbQALkujpYWs8IRVSa8vdUa53OLEvJb9sZ5Pp3F9tsettAyKJPWm7vwDKbNHCG+bIW3BqAFcVsj6BkzkuNEMa+td4woUQG0ezgYCCCyI69MPRdL93yYWLyvKJRnWOpy1n7ZXC8aLXkGWy0C1AjJS9hYE6LzZ1mTkK7EiZ6V4ztS1G11jbnCegRB3uPshms6sdL87+8nKPE2gNV565S7mNQOw7L9DyAcVOXzxOG3ZRyBz3y2+ixqW/QEAj01HD5t606+8HEdS9u4CKVUyLB819ebNtQZbKq/4VIjA70xdm63GigBkXmDJhy+reB6b0b3u5fO0nA8hOKlrTgUtLj7Dmxu8LakHfzLa4J0Zdo4oNMe9VlZ1pYyoUk/i62DSAc6wlMfzpf7ioc0lwAqsxnUEugDB7yCLd8127f0rEXzFK2U+e9R2qfcCcCUCLWej4qXeAVAjrTKeAKqiVRQItQQgaLng3BI/Jnq8ACjGWlLgTUjeW5HYUgCcRsZgfY9UG7qQ28tN6XgBUJlNCJoj6gcXlDY+PMndwmb5wI9WHw8ALs0O4tu8+KoK9Hq+sVGJXh8PAHl6vXyjo3KDo3AtLEezVzqvjzYbubQ6A3G3xpQ5nlR25TY6iLGF6kRyrBhrNwrFRHNWRpiwvlJjw5WvqvuSb3gEfs2gIAFPjhVznU+VeJTAGSFyP/ZqaJQ+7qoAKCXV+OBTdnw82qw0TYuXNjLKrZOqAbgGShvdLOitkfKpiuckyQvHpdFd+gQUHQ9B3yPGEhDOAfwGS9pT1asGgldCNTgYk5igCtSL4/aqgddUKnIY4G8xc7ialz2IKAXQ64qcHW22qnkJVetwvF63+T9nAHfjRfzL0gAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-logSave{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA1RJREFUaEPtmT1oFEEUx9/bFLFKJzG2WiknZObFxlO8RtFC8SuFWlrYGBtRRNCghV9YmFQWgoVaaAS1ULRRRKvbmYBBQezVYBOIGFMkT0ZuYXPufOxdspuDO7jibmfe/H/z3sy8eYvQ4R/scP3QBSjbg8EemJyc3La4uHgUETcx82YAWNum+N8A8IWZrxLR41ZtBQForUeY+Xarg/j6MfMVIrroa5f13AuglOJWDLfQ56aU8mzefk4ApdR9ADiW12ir7RFxXAgxkqe/FUBrvYeZXzQbY+bh3t7ed5VKZTrPQM2eNHYQ8VGGjTtSypOhtq0AcRyPIeKptCEppTfkbAM3AxhbcRwfyYJg5nEiCvKEVZBS6hUA7EoEIeJ+IcTz0JlpbpcFYNrYIBDxlhDijG88lwd+IGJ/YoCZ1xPRd5/BUA/Mzc31VavVWRcEM18jovOuMV0eWLL7tBM+RoBS6isAbEzERFFUHRwc/JD8dnjishDikg2iSIAJADiU8uhdIjqRFuZYEweI6Gmuc8AWs6EhVK/XR3t6eg4zMyKiEQ/MvOSwQsS3iHhhZmbmY61W++UIp/dSyu2FAmit3zDzTjMoItaFEFuVUt8AYCB0ElLtZqWUfYUCZHlQKXUQAJ60AAC2Nbhia8AWglprAoB7jYQwmGXVACSKzRqJomgLAJjvBh/JqgPwCQ7dRAoPIZ/w5HkXIHQGQlOHvCd56PjdEOpoD6TShT/MfD19OXeFQCPnOYeIaxYWFiaGhoZGQ9Pv5nZthVA6XWjkOsMJRGj+b/IhIURtVQCkIUJvYKUCONLf/+67tjuw+T+rLlTYLmSDCDmwbOIbF6CgC1Vba8B3m3JBuMQXDuC4iGQy+MSXAhAKESK+NAAfRKj4UgFsEHnElw5gBGit9wFAUqy9kbco1vY2Gsfxsha2QrbV1K42gIimAPDvw8zTRLQuy0ZhpcU8AMZ7zPws1ee1lHJ3LoDlLu7mAcioZFuLvYWV130AU1NT/fPz8zuyqtWIuFcI8TKXBxo7QaEvOCyQD6SUx20T4K33F/iKKVOj7yrqBWhsiSv6ki8zNBBPCyHGfKEXBGCMrMBr1mZtPxHxEzN/jqLoYbr07oIIBvDNRFnPuwBlzXwybsd74C95KWhPrxIhsgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-logSave:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAthJREFUaEPtmTuMTUEYx3//TrWdeLRUJCrReISGUBCvLVAqNGiEiASh8IoClUKyBQqPBAWhsREqnYRE9NgoV0T3yci5m9mzc2bmnHvvOXuTO8ktbs7MN//ffPP45hsx4kUjrp8xQNcezPaAmW0EDgFrgLXA0j7F/wG+AlckPW5qKwvAzE4At5p2ktHusqTzGfUWVEkCmJk1MdygzQ1Jp+u2iwKY2X3gcF2jfdS/I8l5O7tUApjZTuBlwNIk8E7STHYvQMCTzs6jgI27ko7l2o4B3AaO+4YkJadcVcdlAGfLzA5WQGR7IgbwGtjuCdoj6UXuyJTrhQBcnQjETUmnUv3FAH4CyzwDKyX9SBnM9QAwIWk2AXFV0tlYnzGAebtPP9OnEPkNWO2J2STpQ+9/xBOXJF2ogmgT4Amw3xNyT9JRX1gEYq+kZyGIoQGY2UXgAPyPt5x4V8qH1TRwDvgk6XdkOr2XtLltgLfA1qLTj5I2mNl3YEWDdTQraaJtgAVryMz2AU8bAFC1Boc5hYKbgJmtB6aKgDCbZdEAeLuOWyPrit+qFMmiA0gJrjr4yu1an0Ip4Z6Hss6hMUBu6FD3JB9PodwRGGkPeOHCX+CafzmPDUAR85wBlrgwQ5LbUueV3AHsaxGbmR8uOAGTPYga8f+0pG2LBWAOosYNrFOAqith6L5bdQee81optG7nHIjE8DlnVlB8EVa3AxCJ4VMAleJbB2gAERXfCUANiKT4zgAyILLEdwoQgcgW3zlAIWA30EvWXq+bFBvESTzQxFZqSyqdAe7i7xIAvTIjaXnIRmupxZoAznvPvTZvJO2oCzDQ5G5NgPKbRGWyt7X0egrAzFwedktFtnqXpFe1PFAsxLYfOEIaH0g6UjUAyXx/i09MQY2pq2gSoPDEsB/5QuJPSnLrMFqyAAqIQT+zloX9Aj4DX4CHfuo9RpANkBqJrr6PAboa+V6/I++Bf0in3kCazcMZAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-zoom{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAkUExURUdwTMDAwL+/v7+/v7+/v76+vr+/v7+/v7+/v7+/v7+/v7+/vxtcv/AAAAALdFJOUwBVdZCpGdZE7C3B0wnY6AAAAV9JREFUOMt1lDtPwzAQx20ghGwVsHVJhQRDlsywWKqEULsw8FhRJ2iWiglGGJvFCw8xIVVCSEwkKU25L4ftpOHs2Cclsu7v370smxCLecRh+xOH8Ja5kGEs/6dtYf1XONcWZurbwwRCQjYZ9l7uHAPAOBHpI1QC/QSY9g84ldmnAn7Z3htwsfZnvSe54eJd5hlcC7gccxTwSETZEr5+714vLRdfkFraVNtetXLpR7ha+mkHCV1Y/q8ZOW8AgDkecsIaAEIcGbIGyLUq4KcBYl0o7QAB4FZACBMrQKpaJOCZQqyAIhgayYEpgD1DZghXCvBTNJFKmCvgzmhcCEsBwMjSRx6BslYftRX0JLYKrAsLqzDC54EFMwvy58QhMM8hFNq0UpwET+sLC9/4BmEBTytyRCIbDoAEiR1Qp1dbRxfoyv9g3ogaKVuXhVZZbtqX6Ez6H23PxG4CM259QDwt/h8ABfK8nDqSAAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-zoom:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwCCyreU7KZVRCDaZnETLwj6WaYVAAABUUlEQVRIx5WV2Q6EIAxFoVBWxf7/184AOnGUsvTBqDmXrqRCzNou1kwGtyZIQNuiD0P6evWTURFUMtIoPO+iVoGIZPkMqkdKA0jZgoJ6suQc2EoiGBldOoQ9HSDk5+GTs1Fqo9IlcEpvNv3qv0MBhSalIFSv3+MCJCY8fUaCxasycrMu9dp5VTUhubXZ6CqsAvn66ZAsx+e8fON37oT3bZ4aiRU0kDlavGSrQI95HPBZACt8FuCL16IruBVkzBeBW+CLYHvyfiDQd96IpHpOMqP++fAq9VMQ7rwrM5+6gjwG/3y/D/m8ylPYpvpAeqO7DfvwMPO9D6jnBabG56YFZx77fEjD+9AyLdYEhp8nxoNh5wmJtfY8AS+wzIZZrJNcC4h3wV8IH1p87Iyfnc6XVaAd7ICHAsebw97zgDSxZ/yvViiPuYUfTe650knM2+7Ywz9yOCklzohLOwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-zoomStop{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwDjmTC6Y0KBVakX8s8iC3JYR1wyAAABVUlEQVRIx62V2baFIAiGcwJRS97/aU/Zbtht0VzrcJOuvl/AAabpXy1RF0F/m2h2PX5mzucEuO9gMon1MY7KlG8w4LImC1XFQmxDGVkm1DYpXi0qS1gXTEGzKoqNS1ajAxPqJDikFLcFS+aukYJffRfXnAj9kYUXFVi86wzzPjuCFRXBwS3KaC/Pt02Ww7uf1jz3BVYtX/OsyDQFDn7yswPXb+Ovs39eJJWwxrOXV4thgC+//QBf/uMAXwAa4AuRBvgdWR58CB2B+eaRG5e8QO7Jn2sIAvzhbdsDnXzev8q0BengGXv8EciH3y1CY5++yI/BRNx82g/La7lc7b0Am/tUC6n3HoZ4SbDyy5BgzSNivV6wbPXeIPOpHlOU+CjkTQKvQOpXdRdJvn+5xttWQa4EZUOzluonT6+q72X6Zb0+T/lNhQd7hg9vm8LWUhW5gT4iN7c/0ZUo8Q3AttYAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-zoomStop:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAqUExURUdwTBKV2hGW2xKW2xKW2xKW2xGV3BGW2xGW3BGX2xKW3BKW2xCX2xKW2yDN61kAAAANdFJOUwCAVKxm3T/DmhrxKw97YQBGAAABaklEQVQ4y2NgIA6wGqCLMCqAqV4HdIm9F0Ek22UMM9hiG4AkVzQDA+cmx+YyJJnDlw8wMNQaNpfevbu0QgxJgrN3JQPD3VvhjU57kESnOZqvvXuJgcEXxVFMEkDt1w11gZYwoVgue3d5SzaQSgCydZG1TMkBU8vBuq9guBcqNBNDgj0GQrMEb0CVYEmA2ViANRQZ795tQPZduADciXcVUNSthGu4hGrAJawagBIXsWoAClzGqgEocRWrBqDIrQNQDTPRXZ8A0cB41wBNQgGiQfbubTQJAagGDB0GIA0OsnevbkCTCADiu4J374ahW34JqAEIbiXMRJOAgkvMKJYgJBx6717AKiF4F4eOu+jxgQCXGHBIKPDgkBC8JYCURJDtQHYWN4oEcvpZiyR+C9lZtkgSKKG1CyGOGrxItleixjrcLFBWRAYcMIkG9NQMiY67N7AlcxAQwMwA6SBxM2xZQ3jtVRPsRQ83sg8ACMIUxzzE8wsAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-close{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTM3Nzc7Ozs7Ozs3Nzc3NzcrKys3Nzc3Nzc3NzePZJxkAAAAJdFJOUwCtKdPBGAmNTt3jdDcAAADfSURBVDjL1dOxDoIwEADQgwR07GTCZtI/IGHgAzBhM9EPkMTB0Y3V0ZXIcn/rtRR6pefgSKeSu3ellyvA9lZ/5F9p/3K7PZY8oPG5BD6MpPUSgIITzdIStifAshjRQV1PCFT8TxaicTzzwEwINOEdHVmDmcTAkRhMhMAp7iQRjcMtDhCp8SA1v0ARGIIK/gnkv0p1OBTS4QRUIpE7DiYYXTBrzcld3JIrAarXrps4AVNwRSZgExoJmIyAaAdsShUMn/JF2fh4YEkpAcgvnuwYCIb6EbbbP4PsDfLD2dD6Av1qTvAQlzUTAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-close:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTP///////////////////////////////////8kBMKEAAAAJdFJOUwCt0igUwJdJePGbgLgAAADcSURBVDjL1ZMxEoIwFESTCaOWFDapqeicnAALTiANnaWlnVewDTMW/7b+aCAb8jkAVIHN2/lsNkrt73lf8M08nnF1pAYFR/dFmAAx7SIoi4iDbRrWDMAuQFzmmxAGbjjJgjj6dCjMCAND/o8RWQMzUgIRKYE/wsC5TJIRR74rBUZaqqXwLZEXT0WTDGwLW1aavJWQir9qadw++NgykWoMNtcykh8Q5EECgr5C+jjpGjHjPGhPU5eVzyfPJitfnUyhPg6ywMKZ7BygcYcsPCj1Kc8uXYPqpeSLs6PnC4w8S+8OJ9MLAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-narrow{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABm1JREFUaEPVWWuIVVUUXmvfYRosHzUZUUqKjkSXSe5Z+5qJhfawLELCR5ohPhKjjB4EWgkpkopRSWEPS1Mqy7Gkd0iPGaKy6ey9Z3z0opwEQytSMiS5NZ4Ve7j3dubMOfecO96buf/cx17rW+vba52919oH4RQfeIr7DxUjoLW+BhHHAsAAZh5gPwGghpl/TKVSHZ7n7T9+/Ph+ANg/atQo+1mRcUIEtNYzAWAiM09ExLPK8KgNADYw8wYp5Z9l6PUQ7RWBvON3AMClJ2Kcmb9DxAKR33qDVRYBrfUNzLwQESf0xliUDjPvR8T1RLSsXNzEBIwxc5l5fYSBnxGxxfO8bQCwN5VKHc7lcofr6+tzR44cGcTMg4UQgxDRfp8IAJdH4KwlooXlkEhEQGv9EAAsDQF+GwDWEdE75Rg1xlwFADcx83QAOCOg29SvX79ZDQ0NuSSYsQS01h8BwBUBsF45HnTIGHMBM9uFmR2Ya0bEWxzHORBHoiQBY8xmZp4RAFlNRIvigMuZN8asYOb7Azq7hBCTMpnMvlJYkQSMMUuYeblf2fO8ZdlsNiyVyvE3VNZ13XFCiGb/JCK+6DjOrLIJ2N0GAN4KKG4hIpuzVRtKqf6I+HvAwAIiWhdlNDQCSqntga3yUyK6rGqe+4Db2tqu8zzv3cJfiPiLfQYdx/k6zH4PAvlD6iWf8B7P8yZls9mO/4KAtaG1fhgAHvCReN1xnClJCXweOGFLhrAapJqamlLDhg372H9eMPNMKeXmoL1uEVBKTUXEJp+QJiJZDSfjMIOZgIibHMcJbrfdq1Gt9WMAcI8P/D9f/YJtpVQfW7n6isSDRHReyQhorXcCwMV5oWN1dXWD0un04bjVqta81to+i7bi7RpCiAmZTOYDv71iCu3cuXNQZ2env07fRkSTq+VcEtyQ7XwNEfkz5N8Ucl13khDiDR/b+ZlM5vkkhqopo5Q65Euj74loRGgElFJ3IuIThUnP8xqz2eyeajqXBFtrvR0AiuU7EXXbeIo/tNaPAMB9BVBmrpVS/l3KiDFmBjNPKbMbK0A+6zjOq3EktNavAUAxlUsR2AIA0ywgM3dIKYfFgRtjmph5apxc2Dwz/ySlHBynq7V+wV+tliLwPgBcmwdsJaLRceDGmD3MnI6Ti5j/g4j6x+lqrZ8EgGKTE0nAGPM0M9+Wj8BhKWV9HLjrukuFEPMBoMf+HKdrm3oimhcnFyy1IwkopRYj4soCYF1dXf3JPAMKfiilNiFisaSOJOC67nQhxCu+h3i0lLI1boWqPW+M6WDmoXk7+4io8L3rr+IuZIwZycztPocWEdHqajtYCl8pdSEifuOT2UhEc/w63fZUrfWvADCwixlii+M4408mAa31AgB4xufDHCLaGElAKbUZEf09cAMR/XCySGit7TXO3IJ9IcTQYI8cLKfvQsQ1BYVq9sBxi9La2jqipqbmMwA4Oy8bWtoHCTiIaBua0/JKB5hZSikPxhms9LxSah0i2i26MHoUct0eYt+2tRIRF5/MKGit7YFqD9auYU9tRBwfls49emJjzEBm3gEAxVKCmadJKbdWepWj8LTWHwLAlb75hUS0Nkw+6lbidkTspoCI6aibgUoSU0otR8QlBUxE3Oo4TleNlpiAFQwWUfa/XC7XZ8yYMccq6bAfS2v9OADcHUidqUT0RdkE8iS+BIBsQHkkEe2qNAml1HOIeGsA914isqQiR5LL3aMAcHoAYTIR2av0Ex7t7e3ne563mplvDoIh4le2xC+VurEE8pGwh1m3/sBec3ie96iUcndvWLS3t4/o7OycK4SYw8znRKZIDIlEBPIk7IrfGDB01JIAgJZsNtuShIjruplUKmWdtidsMLK2lFmFiPP8fUapSCQmYJ2L6cDsNfh7iLiXme1VjG3GOwFguOd5DYg4HAAa7O/Q3QTRXiavchxnhzHmIgCw3V6xWYoiURYBa9h13atTqdTssJxNEoEImQeJaIV/LimJsgkUjCilLrGXToho33mFrmoMod2I+LLneW9KKb8Nk01CotcE/AaVUmOFENcz8zgAGAIA54Y4dAgADiCifejtjcQnSSIWRgIAniIi+5q3cm/q/c40NzfX9e3bd4gQ4kxEPFhbW3sgnU7/lcThJJHwV8kViUBvHStHz0aCme2qe7W1tasbGxu7rkFPGQKR50Q5q/B/lP0HjgOoT/ydvaYAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-narrow:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABS1JREFUaEPVmgmoVVUUhr+fosKC5ogGSsqIpKQwMqjIBpsICdMGQ7ISo4wGApugJCoxLClssElpNEuaI5okKjOI5onKhEQrSiKiaKA/Vu3zOu+8c88593qvj7fgcO99e6/h33udtdda+4khThri9tM1ALaPAQ4Btso9GwNfAyuBb7JHUnzvCq0XANuTgePSs00bFr0L3BuPpF/b4BswtSMAyfDzgYPXRznweQ7ID53IaguA7ROBGcC4TpRV8IRL3SNpVrtyGwOwfVYoaaHgW2AZsBT4CliXnt+BXYBd02d8D5c7rIWc+ZJigRpTIwC2rwauKZH6NLBA0jONNQK2jwJOAU4FtijwPgpMkRTga6kWgO2XgSMKkjoyvGiN7d3SwpxZGHsVOEPSmjoElQBsPwScVhAyR9LMOsHtjNu+Hri8wPMBMF7SqipZLQHYvgq4tsA8S1KZK7Vjb+lc24cDsfJ5ul/SlLYBpGjzVIFxsaTw2Z6R7S2BnwoKpkta0Epp6Q7YfqEQKl+XdGjPLM8Jtn088GzuT9/FOyjpkzL9AwCkQ+qB3OSPki9GOrBByPZ1wBU5ZY9LOrkpgDcLJ2zlFvYCke2NgFcK58VkSRFU+lG/HbA9EYg4nNE7kkb3wsg6mSWesEhSMdz2z0Zt3wRcnBO+wVc/0217WMpesyRxraSd6nbgfWC/NOm3OP4lRVowKGQ73sXIeDMaJ+nFvDF9LmQ78pR8nr5U0oRBsTwpLQnn8yTlPeR/F7I9HngiZ/A0SXcPJoDQbftHIHOjLyTt1WoHLgBuyQ3uKylC6KBS8UyS1C/w5F3oRuDSnLWbSPqzynrbkSdFfG6nGstE3inpkbrVsf0Y0OfKVQAWA5OSwJWS9mggPEJuhN5OaLWkqBMqyfZ9QF/4rALwPHBskrZC0pgGwsPFRtbNazH+s6TIfeoA3JqqwH/nVQG4HTg3SVsnadsGwiMznQYMiM91vKmgP7tuXjHVrgJwGXBDTuC2g3kGZHbYXhQVWva7CkCkyg/nAIyRtKJuhXo9bjuSyOFJzypJ2ff/XCqHdBTwXs6gmZLm9NrAKvm29wY+zc1ZKGlqnqeYzH0PbJ8mLJM0dpABTAfuyNkwVdLCKgDFGniEpC8HC4TtaONEOyej4cUaubgDFwLzcgw9q4HrFsV2pAxvANuluaWpfRHAAUAUNJsmpmhrjJa0tk5ht8dtRx0cITqjAYlcv5c49zJHKI2QmtEG3wXbcaDGwZrRamBsmTuX1cTxEi8H8qnEJElLur3KreTZfgk4Mjc+Q9L8svmtuhLnAUWGka06A90EZjt6UdGTymiJpCxHG6CqqrHVL4lKnMMkRaXWE7J9M3BRwXUmSnqrlcK61uLbwIEF5lGSou3XVbJ9F3BOQeglkgJUS2rS3P0F2LwgYYKkaKWvN9neGYgT//QSYR9Hil/lurUAQqjtOMyK9UEkWXMlfdgJihTn45CK1GCHChmVIBoBSCBixU8qKIrdmRuXG5LigqOWbO+fjA7jizsbqcxsINLsfJ3REkRjAAlEVQUWbfDncjc0UYz/BewJjCh8lgGNZvJsSctt75MabLUg2gKQQBydSrwyn63dgRYTrpQUdwR91BRE2wAyDbYPSk2nuPOKVW6X4t15EHhS0mdlzE1AdAygsFpxwX0CEJcUuwM7lhgULhW5VRgeHYnXmiBuAeI2SXHN272b+gKgzRKQrYFIBNdI+qOJwQ13oi8/68oOdGpYO3xpJ2LV/45zI/t3hSEDoBXYIQ/gH99H3EBePlczAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-expand{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABvJJREFUaEPVWWmIXEUQrnqzZseYxGM9QBNF4hrJEDfzqieuAY/gFRXPyMYbzUHwQBQUzx+KeBAJKhrRqEhEQWMU75AYXREPlunu3bjxIDGraIwiuJpFkL26pMK84eXtm3lvZieGFAzsTtf1VVd3V9Ug7OOE+7j/0BAAnZ2d2UmTJl2cyWTaAOBA+TDzgYjYDAB/y4eZ5fNjc3Pze7NmzfqlUYEbFwBr7TUAcAEzXwAA2bROIeKnzrkNALBeKWXTysXx1QXAGHMVANwEACePxzgzjyLi057nrczn81vr0VUTAGOMRPtmRDy7HmOVZBDxL+fcyr6+vgc7OjqGatGdGoC19hZmfrKC8t9LafEWAGzLZDL9g4OD/S0tLYM7d+6cyszTPM+biojy97kAcGoFPV8ODw8vbG9v354WRCoAxpiXAUDyPUrvAcAqIno/rUHhs9aeCQALmflyAJgUlkXEf5xzp6U9G4kAjDHcKMejeqy1xzDz/QBwXYyNViL6ISkwVQEYY74AgLkRJcuJ6M4kxbWsW2sfZua7ozJNTU1HtLW1/VFNV0UAxpjlAHBHWNg590ChUJCINZyKxeLpnud1RhSvmzJlyiWtra2DFS+AuAW5bQDg3cja60QkObvHSGstj588fGVi5heVUktqAqC1Xh+5Kj8nolP2mOchxd3d3ec55z6I2JpPROvj7I9JodIj9UqIebNz7qJCodD3fwAQG8aYhwDgnpC99UQ0Py2ALyMv7DIiWvV/OS921qxZk5k+ffon4fcCEZf4vv9i1I/ddkBrfSUivhpiMkSkanXeWnsFAFwCADNHR0fX1nPwYzJhAxGdkwTgJUQM38l1Rd8Y8yYAXFoytoOIjqo1CFrriQDwCyIeEsh6nndsPp//KayrvANbt25tHhgY+AsA9i8x/JvNZqfmcrn+Wo1bazuZ+fRAjogSH8w4G8YYOYtSOAZ0GxE9EQvAGCMRk8gF9BYRLajVeeFvIIDdrnOpt3zfnxcLwFr7CDPfFdqupfl8/oW9CUBsa63/DKXRz0R0TCUAzzDzDcGic25WoVDYvLcBGGPk/i+X7wMDA/vNmzdvJPCrnJvW2leZ+cpggZknKKWGqwGw1l7IzOcg4swoX/gMyNbH6HnO9/3XkgJkjFkLAOVUzmQyM2bPnr1lDABjjJTE58sCM/cppaanUK4BgJL44taZebtSalqSrDHmpXC1ysynKKU+j9uBj5hZ6nShLiJqT1Jurd3MzLkkvgrrfxPRwUmyxpinAODmSqkdTqE3mPmy0g70K6VakpQXi8X7Pc9bCgBHJvHGrEsjtCxJLlpqDw8PTwt3bGEAzzNzuerLZrMt9bwB4lCjrtHSLbQaEa8NgGaz2cm5XO6fuDPwGADcHjrE7UqprqQIxa03EoC1to+Zjy3ZGZN25R3QWt+IiCtDDt1JRNLU1EyNAqC1PgERvws58DYRSY1VpjKA3t7eaUNDQz+Xtybm1UuLpFEAjDFyRp4N2a1cSsTlLgCkaqyjwBoIQMrnRYH+0dHR/Jw5c3pid6B0YO5GxIdDV1ZdPbC19nLn3GOIOAUA1hLR4rS7F/B1dXUd39TUJEOFQ+U7RNzo+/5ZUT3RfsBHRGloZCgrtIOZlVLqt1odGC+/1noVIsoVHdAiIpJHbTcaU+ZqrR9BxHJRtycnEZVAGmOkfVwXOo9bJk+efGLcdGIMAGvtYcz8FQCUSwlm7lBKvTHeqKaVN8ZsBIAz0qRybKMRc6VKDuZ83/82rRP18mmtH0TE+0LyHxNRUOKMUVuxU7LWlkuLQGpwcHDi3Llz/63XuSQ5Y8zjAHBrwMfM/cy8oFAoxFWzu9iSRou/xtQ5bUT0dZIzta5rrZ+XyUNYDhFv931/RTVdVQF0d3e3OufKtXdI0QIiklH6uKmnp+co59zycC8SOrzfAEBHtdRNbLaLxeIMz/O+H3N9Ia52zq1QSvXWg6Knp+f4kZGRRZ7nXc/Mh1fSgYhVQSQCEMW9vb1HDA0NyS0UHS/KLF+2+NNqeRp2rlgs5jOZjDgtL+wBEcdlEv0oIi4O9xnVQKQCIEZkTuN53uqgZ4iJmMxrPkTEbXL4AECaceldj3POtSLicVKayP9x0UZEGSY/6vv+V9ZaaVHXpAGRGkBgtFgsnpXJZK6Ly9l6Uqkkcy8RlUsY+S4tiJoBBE5qrU9CxKvlZ1YA2G3UkRJIr4wxnXPvKKXGnLG0IOoGEHZSnn5EvIiZTwKAowEgrh39U2orRJRDLxOJz9IAjdsJAHiGiORn3sb8Uh91ZNOmTQeMjIwcjYgHIeJvEyZM2JHL5Wr6+TSsMwoCEVf4vr+re2zIDqSJ5Hh5BAQzS9R/IiJpf3fRPgOg4jsx3sjsbfn/AH37LF5g3/BiAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-icon-expand:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABYZJREFUaEPVmXmoVVUUxn8f0WRzVkJlIWVGUmIJWWADTVaUldFclCnSQBQYNv1RSCWGVFRSlkRh0GBS2YBmJWGJUBHNNJiYWQSZfwTRxBfrce5jv/3Ovefc++4z3oKLD/fea61v7bXXdMQQJw1x/ekKANs7AOcA44Ddkt/2wJbk9z2wTNIP3TLcgADYvhw4q/gFiLq0ClgBLJf0Ud1DZfs6AmD7UuA64JiBCAf+BR4GHpH0TSe82gJgO6x9PXBqJ8JanPktQABzJP3VDu/aAGzfADzYhPnPQLjFUuA7YHPx+xPYHxhZ/Bt/nw4c14TP+8CFkjbWBVELgO2ngfD3nJYBCyW9Wldg7LN9cigKXATsnJ39HTi+7tuoBGDb3VI852P7QOBO4MoSGaMlfVtlmJYAbL8HHJsxmSdpdhXjdtZt3wPcWnJmhKRfWvFqCsD2PODm7PBdksJiXSfbJwDvZIzfAM6VFG+plEoBFNHmlezEc5LCZweNbEcSjMSX0iJJ09sFsDwLlaslTRo0zRPGts8AXstkTZYUOvWjfjdQJKnFyc7PgCmS1m0NACHD9t3AbYm8yNiT6wKIWJxm2JmSFm4t5QsA2wBvZ/liuqRFuR59bsD2JcAzyaYPJU1oV3nbF8fjAw4DlnTy8Es8YYWk06oAPJnF5I6sb/tF4LxC2CZJ+3VghGFAVK17JmdHSVqf8uq9AdtR+kZNsmOx4Y9I/5KiLGiLbEc4jLDYQ5IqE2aZANvxFqNwbNBNkh5oBiAsFpZr0FJJU9vSvNjcRQBRPKbhfJWkE5sBuBe4JVmcIemJ/xNAyLb9a+JGGyRF+dFLqQstAK5J1g6XFCG0berWDRQA8py0raR/et2z8YftiD4RhRq0naS/W2lv+2wgIkNEm5x630BRaufrj0l6tso6tpcAqSuPkfR1GYAoic8sFtZJOqgG8w+Ao6r2NVnfKCn6hJZkO4+MkyStLgPwJhB1etBaSRNrMA8XG1u1r8n6Fkl7VJ21/VDRBTa29nHt9A28AJxf7NosaXgN5lGZzgD2rdpbsh6N0MyqcyWl9si0Y0sBPA6kVd/wTnJAKNTlR/wUcEUCdBdJ0bX1UArgPmBWsnGipLVVFipb7zKAKCJHFXL6uV0K4NpiMtDQabakaGrapm4BsH0o8GWiwEuSosbqpRRARIQNyVq/rFcXSRcBxBt5NJHbvJQo812gVmOdA+sigCifpyX8x0v6uPQGCgDRWEeD3aCOemDb0XrGm9q1KKevrnt7jX22DwFiqLBX8X8rJZ2S88n7gSOBaGiiMg3aBEyQ9FO7Cgx0v+1ooiJEN2iapEhqfaispcyLuo5uYSAAbEf7GBOJBkXpcETZdKIMwN7AGiAtJS6QFIluq5DtlcBJdVy52VglD6nBa6ykLwYbge05wB2JnLckNUqcfuJbDbbS0qJxcJik6NQGhWzfD9yYMI9ucKqkGByXUtVo8ceSOmecpE+6jcB2XsqEiFmS5reSVQVgNNBbeyeMwioxSh8w2Y6GPzJ+2os0+H4OxPtr6rqVzbbtMcBXJZpGkTVf0qedoCjifCSpq4B9WvBoCaISQDC2PQKIN5GPF6MqjCuOsqOpn6bK2R5fKB3K75QpHpPouUAkvrTPaAqiFoACRMxpwuqNniE3WsxrXk++0EQzHr3rwVGSZP+WGTymD3MlrbEdLerzdUDUBtCQaDvSeXyQKPPZTrwpztwuKS1h4tZrgWgbQALkaOCy4hNrn1FHTRTxdmKQ8LKksjdWC0THADK/jtQ/BQhQBwBl7Wi4VNRWoXhMJN6tA7TJTSyQFJ95u/OlPlfEdjzOALI7EIVgzEfb+nyaGSh3p4h+Pd1jV26gjiUHuqe4ibD6eklRqvfQkAHQzABDHsB/7aMVT352GH8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jessibuca-container .jessibuca-menu-icon-text,.jessibuca-container .jessibuca-quality-icon-text,.jessibuca-container .jessibuca-scale-icon-text,.jessibuca-container .jessibuca-speed-icon-text{font-size:14px;min-width:30px;height:20px;line-height:20px;cursor:pointer;text-align:center}.jessibuca-container .jessibuca-speed{box-sizing:border-box;text-align:center;font-size:14px;color:#fff;width:90px}.jessibuca-container .jessibuca-menu-list,.jessibuca-container .jessibuca-quality-menu-list,.jessibuca-container .jessibuca-scale-menu-list,.jessibuca-container .jessibuca-speed-menu-list{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px;overflow:hidden;width:-webkit-max-content;width:-moz-max-content;width:max-content}.jessibuca-container .jessibuca-menu-list.jessibuca-menu-shown,.jessibuca-container .jessibuca-menu-list.jessibuca-quality-menu-shown,.jessibuca-container .jessibuca-menu-list.jessibuca-scale-menu-shown,.jessibuca-container .jessibuca-menu-list.jessibuca-speed-menu-shown,.jessibuca-container .jessibuca-quality-menu-list.jessibuca-menu-shown,.jessibuca-container .jessibuca-quality-menu-list.jessibuca-quality-menu-shown,.jessibuca-container .jessibuca-quality-menu-list.jessibuca-scale-menu-shown,.jessibuca-container .jessibuca-quality-menu-list.jessibuca-speed-menu-shown,.jessibuca-container .jessibuca-scale-menu-list.jessibuca-menu-shown,.jessibuca-container .jessibuca-scale-menu-list.jessibuca-quality-menu-shown,.jessibuca-container .jessibuca-scale-menu-list.jessibuca-scale-menu-shown,.jessibuca-container .jessibuca-scale-menu-list.jessibuca-speed-menu-shown,.jessibuca-container .jessibuca-speed-menu-list.jessibuca-menu-shown,.jessibuca-container .jessibuca-speed-menu-list.jessibuca-quality-menu-shown,.jessibuca-container .jessibuca-speed-menu-list.jessibuca-scale-menu-shown,.jessibuca-container .jessibuca-speed-menu-list.jessibuca-speed-menu-shown{visibility:visible;opacity:1}.jessibuca-container .icon-title-tips{pointer-events:none;position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s ease 0s,opacity .3s ease 0s;background-color:rgba(0,0,0,.5);border-radius:4px}.jessibuca-container .icon-title{display:inline-block;padding:5px 10px;font-size:12px;white-space:nowrap;color:#fff}.jessibuca-container .jessibuca-quality-menu{padding:8px 0}.jessibuca-container .jessibuca-menu-item,.jessibuca-container .jessibuca-quality-menu-item,.jessibuca-container .jessibuca-scale-menu-item,.jessibuca-container .jessibuca-speed-menu-item{display:block;height:25px;line-height:25px;margin:0;padding:0 10px;cursor:pointer;font-size:14px;text-align:center;width:50px;color:hsla(0,0%,100%,.5);transition:color .3s,background-color .3s}.jessibuca-container .jessibuca-menu-item:hover,.jessibuca-container .jessibuca-quality-menu-item:hover,.jessibuca-container .jessibuca-scale-menu-item:hover,.jessibuca-container .jessibuca-speed-menu-item:hover{background-color:hsla(0,0%,100%,.2)}.jessibuca-container .jessibuca-menu-item:focus,.jessibuca-container .jessibuca-quality-menu-item:focus,.jessibuca-container .jessibuca-scale-menu-item:focus,.jessibuca-container .jessibuca-speed-menu-item:focus{outline:none}.jessibuca-container .jessibuca-menu-item.jessibuca-menu-item-active,.jessibuca-container .jessibuca-menu-item.jessibuca-quality-menu-item-active,.jessibuca-container .jessibuca-menu-item.jessibuca-scale-menu-item-active,.jessibuca-container .jessibuca-menu-item.jessibuca-speed-menu-item-active,.jessibuca-container .jessibuca-quality-menu-item.jessibuca-menu-item-active,.jessibuca-container .jessibuca-quality-menu-item.jessibuca-quality-menu-item-active,.jessibuca-container .jessibuca-quality-menu-item.jessibuca-scale-menu-item-active,.jessibuca-container .jessibuca-quality-menu-item.jessibuca-speed-menu-item-active,.jessibuca-container .jessibuca-scale-menu-item.jessibuca-menu-item-active,.jessibuca-container .jessibuca-scale-menu-item.jessibuca-quality-menu-item-active,.jessibuca-container .jessibuca-scale-menu-item.jessibuca-scale-menu-item-active,.jessibuca-container .jessibuca-scale-menu-item.jessibuca-speed-menu-item-active,.jessibuca-container .jessibuca-speed-menu-item.jessibuca-menu-item-active,.jessibuca-container .jessibuca-speed-menu-item.jessibuca-quality-menu-item-active,.jessibuca-container .jessibuca-speed-menu-item.jessibuca-scale-menu-item-active,.jessibuca-container .jessibuca-speed-menu-item.jessibuca-speed-menu-item-active{color:#2298fc}.jessibuca-container .jessibuca-volume-panel-wrap{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%) translateY(22%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px;height:120px;width:50px;overflow:hidden}.jessibuca-container .jessibuca-volume-panel-wrap.jessibuca-volume-panel-wrap-show{visibility:visible;opacity:1}.jessibuca-container .jessibuca-volume-panel{cursor:pointer;position:absolute;top:21px;height:60px;width:50px;overflow:hidden}.jessibuca-container .jessibuca-volume-panel-text{position:absolute;left:0;top:0;width:50px;height:20px;line-height:20px;text-align:center;color:#fff;font-size:12px}.jessibuca-container .jessibuca-volume-panel-handle{position:absolute;top:48px;left:50%;width:12px;height:12px;border-radius:12px;margin-left:-6px;background:#fff}.jessibuca-container .jessibuca-volume-panel-handle:before{bottom:-54px;background:#fff}.jessibuca-container .jessibuca-volume-panel-handle:after{bottom:6px;background:hsla(0,0%,100%,.2)}.jessibuca-container .jessibuca-volume-panel-handle:after,.jessibuca-container .jessibuca-volume-panel-handle:before{content:"";position:absolute;display:block;left:50%;width:3px;margin-left:-1px;height:60px}.jessibuca-container.jessibuca-fullscreen-web .jessibuca-controls{width:100vh}.jessibuca-container.jessibuca-fullscreen-web .jessibuca-play-big:after{transform:translate(-50%,-50%) rotate(270deg)}.jessibuca-container.jessibuca-fullscreen-web .jessibuca-loading{flex-direction:row}.jessibuca-container.jessibuca-fullscreen-web .jessibuca-loading-text{transform:rotate(270deg)}.jessibuca-container .jessibuca-contextmenus{display:none;flex-direction:column;position:absolute;z-index:120;left:10px;top:10px;min-width:200px;padding:5px 0;background-color:rgba(0,0,0,.9);border-radius:3px}.jessibuca-container .jessibuca-contextmenus .jessibuca-contextmenu{cursor:pointer;font-size:12px;display:block;color:#fff;padding:10px 15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px rgba(0,0,0,.5);border-bottom:1px solid hsla(0,0%,100%,.1)}.jessibuca-container .jessibuca-contextmenus .jessibuca-contextmenu a{color:#fff;text-decoration:none}.jessibuca-container .jessibuca-contextmenus .jessibuca-contextmenu span{display:inline-block;padding:0 7px}.jessibuca-container .jessibuca-contextmenus .jessibuca-contextmenu span.art-current,.jessibuca-container .jessibuca-contextmenus .jessibuca-contextmenu span:hover{color:var(--theme)}.jessibuca-container .jessibuca-contextmenus .jessibuca-contextmenu:hover{background-color:hsla(0,0%,100%,.1)}.jessibuca-container .jessibuca-contextmenus .jessibuca-contextmenu:last-child{border-bottom:none}.jessibuca-container.jessibuca-contextmenus-show .jessibuca-contextmenus{display:flex}.jessibuca-container-playback .jessibuca-controls{height:48px}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center{flex:1;display:flex;box-sizing:border-box;justify-content:space-between;font-size:12px}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-controls-playback-time{box-sizing:border-box;flex:1;position:relative;height:100%}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-controls-playback-time-inner{width:300px;height:100%;overflow-y:hidden;overflow-x:auto}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-controls-playback-current-time{position:absolute;left:0;top:0;height:15px;width:1px;background-color:red;text-align:center;z-index:1}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-controls-playback-current-time-text{position:absolute;box-sizing:border-box;padding:0 5px;width:60px;left:-25px;top:15px;border:1px solid red;height:15px;line-height:15px;cursor:move;background-color:#fff;color:#000;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-controls-playback-time-scroll{position:relative;width:1440px;margin:0 auto}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-controls-playback-time-scroll.one-hour{width:1440px}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-controls-playback-time-scroll.half-hour{width:2880px}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-controls-playback-time-scroll.ten-min{width:8640px}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-controls-playback-time-scroll.five-min{width:17280px}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-controls-playback-time-scroll.one-min{width:86400px}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-controls-playback-time-list{position:relative;background-color:#ccc;height:48px}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-day{height:100%;overflow:hidden}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-one-wrap{height:8px;z-index:1}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-second-wrap{height:25px}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-controls-playback-btns{display:flex;align-items:center}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-minute-one,.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-second-one{float:left;width:1px;height:8px;margin:0;cursor:default;position:relative;z-index:1}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-minute-one.active,.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-second-one.active{background-color:orange;cursor:pointer}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-minute-one.start,.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-second-one.start{background-color:#999}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-minute-one:hover .jessibuca-playback-time-title-tips,.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-second-one:hover .jessibuca-playback-time-title-tips{visibility:visible;opacity:1}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-title-tips{pointer-events:none;position:absolute;left:0;top:100%;visibility:hidden;opacity:0;transform:translateX(13%);transition:visibility .3s ease 0s,opacity .3s ease 0s;background-color:#000;border-radius:4px;z-index:1}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-title-tips.jessibuca-playback-time-title-tips-left{transform:translateX(-100%)}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-title-tips .jessibuca-playback-time-title{display:inline-block;padding:2px 5px;font-size:12px;white-space:nowrap;color:#fff}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-hour,.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-minute{float:left;position:relative;width:60px;box-sizing:border-box;border-top:1px solid #999;-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:left;height:25px;line-height:25px}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-hour:first-child,.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-minute:first-child{border-left:0}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-hour:first-child .jessibuca-playback-time-hour-text,.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-minute:first-child .jessibuca-playback-time-hour-text{left:0}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-hour:after,.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-minute:after{content:"";position:absolute;left:0;top:-8px;width:1px;height:14px;background-color:#999}.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-hour-text,.jessibuca-container-playback .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-center .jessibuca-playback-time-minute-text{position:absolute;left:-13px}.jessibuca-container-playback .jessibuca-playback-expand.disabled .jessibuca-icon-expand,.jessibuca-container-playback .jessibuca-playback-narrow.disabled .jessibuca-icon-narrow{cursor:no-drop}.jessibuca-container-playback .jessibuca-control-progress-simple{position:absolute;box-sizing:border-box;left:0;top:-2px;width:100%;display:flex;flex-direction:row;align-items:center;height:8px;cursor:pointer}.jessibuca-container-playback .jessibuca-control-progress-simple:hover{top:0;align-items:flex-start}.jessibuca-container-playback .jessibuca-control-progress-simple:hover .jessibuca-control-progress-inner{height:100%}.jessibuca-container-playback .jessibuca-control-progress-simple:hover .jessibuca-control-progress-inner .jessibuca-progress-indicator{transform:scale(1);visibility:visible}.jessibuca-container-playback .jessibuca-control-progress-inner{display:flex;align-items:center;position:relative;height:50%;width:100%;transition:all .2s ease;background:hsla(0,0%,100%,.5)}.jessibuca-container-playback .jessibuca-progress-hover{display:none;width:0}.jessibuca-container-playback .jessibuca-progress-played{position:absolute;left:0;top:0;right:0;bottom:0;height:100%;width:0;background-color:orange}.jessibuca-container-playback .jessibuca-progress-indicator{visibility:hidden;align-items:center;justify-content:center;position:absolute;z-index:40;border-radius:50%;transform:scale(.1);transition:transform .1s ease-in-out}.jessibuca-container-playback .jessibuca-progress-indicator .jessibuca-icon{width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jessibuca-container-playback .jessibuca-progress-indicator:hover{transform:scale(1.2)!important}.jessibuca-container-playback .jessibuca-progress-tip{display:none;position:absolute;z-index:50;top:-25px;left:0;height:20px;padding:0 5px;line-height:20px;color:#fff;font-size:12px;text-align:center;background:rgba(0,0,0,.7);border-radius:3px;font-weight:700;white-space:nowrap}.jessibuca-container-playback.jessibuca-fullscreen-web .jessibuca-controls .jessibuca-controls-bottom .jessibuca-controls-playback-time-inner{overflow-y:auto}.jessibuca-zoom-control{cursor:-webkit-grab;cursor:grab}.jessibuca-performance-panel{position:absolute;box-sizing:border-box;z-index:10000;left:0;top:0;padding:5px;font-size:10px;background:rgba(0,0,0,.2);color:#fff;max-height:100%;overflow-y:auto;display:none}.jessibuca-performance-panel .jessibuca-performance-item{display:flex;align-items:center;margin-top:3px;color:#fff}.jessibuca-performance-panel .jessibuca-performance-item-block{height:10px}.jessibuca-tips-message{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto;box-sizing:content-box;display:none}.jessibuca-tips-message:before{color:hsla(0,0%,100%,.3);content:"X";font-family:Arial,Helvetica,sans-serif;font-size:40px;left:0;line-height:1;margin-top:-20px;position:absolute;text-shadow:2em 2em 4em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.jessibuca-tips-message .jessibuca-tips-message-close{position:absolute;z-index:99999;right:0;top:0;width:40px;height:40px;display:flex;align-items:center;justify-content:center}.jessibuca-tips-message .jessibuca-tips-message-close .jessibuca-tips-message-close-icon{width:20px;height:20px;border-radius:10px;cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTM3Nzc7Ozs7Ozs3Nzc3NzcrKys3Nzc3Nzc3NzePZJxkAAAAJdFJOUwCtKdPBGAmNTt3jdDcAAADfSURBVDjL1dOxDoIwEADQgwR07GTCZtI/IGHgAzBhM9EPkMTB0Y3V0ZXIcn/rtRR6pefgSKeSu3ellyvA9lZ/5F9p/3K7PZY8oPG5BD6MpPUSgIITzdIStifAshjRQV1PCFT8TxaicTzzwEwINOEdHVmDmcTAkRhMhMAp7iQRjcMtDhCp8SA1v0ARGIIK/gnkv0p1OBTS4QRUIpE7DiYYXTBrzcld3JIrAarXrps4AVNwRSZgExoJmIyAaAdsShUMn/JF2fh4YEkpAcgvnuwYCIb6EbbbP4PsDfLD2dD6Av1qTvAQlzUTAAAAAElFTkSuQmCC") no-repeat 50%;background-color:#fff;background-size:100% 100%}.jessibuca-tips-message .jessibuca-tips-message-content{overflow:auto;padding:35px;box-sizing:border-box;width:100%;height:100%}.jessibuca-tips-message .jessibuca-tips-message-content .jessibuca-tips-message-content-item{font-size:14px;color:#fff;text-align:center;line-height:1.5}');class ah{constructor(e){var t;this.player=e,this.extendBtnList=[],((e,t)=>{e._opt.hasControl&&e._opt.controlAutoHide?e.$container.classList.add("jessibuca-controls-show-auto-hide"):e.$container.classList.add("jessibuca-controls-show");const i=e._opt,s=i.operateBtns,r=`\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
00:00:00
\n
\n
\n
\n
\n ${i.playbackConfig.showPrecisionBtn?`\n
\n
${Hl.narrow}
\n
${Hl.expand}
\n
\n `:""}\n
\n `;e.$container.insertAdjacentHTML("beforeend",`\n ${i.background?`
`:""}\n
\n \n
\n ${i.loadingIcon?`\n
\n ${Hl.loading}\n
${i.loadingText}
\n
\n `:""}\n ${i.hasControl&&s.play?'
':""}\n ${i.hasControl&&s.ptz?`\n
\n
\n
\n
\n
\n
\n ${i.ptzMoreArrowShow?'\n
\n
\n
\n
\n ':""}\n
\n
\n ${i.ptzZoomShow?'\n
\n
\n \n \n 缩放+\n \n
\n
\n \n \n 缩放-\n \n
\n
\n ':""}\n ${i.ptzApertureShow?'\n
\n
\n \n \n 光圈+\n \n
\n
\n \n \n 光圈-\n \n
\n
\n ':""}\n ${i.ptzFocusShow?'\n
\n
\n \n \n 聚焦+\n \n
\n
\n \n \n 聚焦-\n \n
\n
\n ':""}\n
\n
\n `:""}\n ${i.hasVideo?`\n
\n
${Hl.narrow}
\n
电子放大
\n
${Hl.expand}
\n
${Hl.zoomStop}
\n
\n
\n
\n
00:00:00
\n
${Hl.recordStop}
\n
\n `:""}\n\n ${i.hasControl?`\n
\n
\n
\n ${i.showBandwidth?'
':""}\n
\n
${i.controlHtml}
\n
\n ${i.playType===y&&i.playbackConfig.showControl&&i.playbackConfig.controlType===J.normal?r:""}\n ${i.playType===y&&i.playbackConfig.showControl&&i.playbackConfig.controlType===J.simple?'\n
\n
\n
\n
\n
\n
00:00
\n
\n
\n ':""}\n
\n ${i.playType===y&&i.playbackConfig.showRateBtn?'\n
\n
\n
\n
\n
\n
\n ':""}\n ${s.close?`
${Hl.close}
`:""}\n ${s.logSave?`
${Hl.logSave}
`:""}\n ${s.performance?`
${Hl.performance}
${Hl.performanceActive}
`:""}\n ${s.aiFace?`
${Hl.face}
${Hl.faceActive}
`:""}\n ${s.aiObject?`
${Hl.object}
${Hl.objectActive}
`:""}\n ${s.aiOcclusion?`
${Hl.occlusion}
${Hl.occlusionActive}
`:""}\n ${s.quality?'\n
\n
\n
\n
\n
\n
\n ':""}\n ${s.scale?'\n
\n
\n
\n
\n
\n
\n ':""}\n ${s.audio?`\n
\n
\n ${Hl.audio}\n ${Hl.mute}\n
\n
\n
\n
\n
\n
\n
\n
\n `:""}\n ${s.play?`
${Hl.play}
${Hl.pause}
`:""}\n ${s.screenshot?`
${Hl.screenshot}
`:""}\n ${s.record?`
${Hl.record}
${Hl.recordStop}
`:""}\n ${s.ptz?`
${Hl.ptz}
${Hl.ptzActive}
`:""}\n ${s.zoom?`
${Hl.zoom}
${Hl.zoomStop}
`:""}\n ${s.fullscreen?`
${Hl.fullscreen}
${Hl.fullscreenExit}
`:""}\n
\n
\n
\n `:""}\n
\n
\n
\n
\n
\n
\n
\n
\n `),Object.defineProperty(t,"$poster",{value:e.$container.querySelector(".jessibuca-poster")}),Object.defineProperty(t,"$loadingBg",{value:e.$container.querySelector(".jessibuca-loading-bg")}),Object.defineProperty(t,"$loadingBgImage",{value:e.$container.querySelector(".jessibuca-loading-bg-image")}),Object.defineProperty(t,"$loading",{value:e.$container.querySelector(".jessibuca-loading")}),Object.defineProperty(t,"$loadingText",{value:e.$container.querySelector(".jessibuca-loading-text")}),Object.defineProperty(t,"$play",{value:e.$container.querySelector(".jessibuca-play")}),Object.defineProperty(t,"$playBig",{value:e.$container.querySelector(".jessibuca-play-big")}),Object.defineProperty(t,"$recording",{value:e.$container.querySelector(".jessibuca-recording")}),Object.defineProperty(t,"$recordingTime",{value:e.$container.querySelector(".jessibuca-recording-time")}),Object.defineProperty(t,"$recordingStop",{value:e.$container.querySelector(".jessibuca-recording-stop")}),Object.defineProperty(t,"$pause",{value:e.$container.querySelector(".jessibuca-pause")}),Object.defineProperty(t,"$controls",{value:e.$container.querySelector(".jessibuca-controls")}),Object.defineProperty(t,"$controlsInner",{value:e.$container.querySelector(".jessibuca-controls-bottom")}),Object.defineProperty(t,"$controlsLeft",{value:e.$container.querySelector(".jessibuca-controls-left")}),Object.defineProperty(t,"$controlsRight",{value:e.$container.querySelector(".jessibuca-controls-right")}),Object.defineProperty(t,"$volume",{value:e.$container.querySelector(".jessibuca-volume")}),Object.defineProperty(t,"$volumePanelWrap",{value:e.$container.querySelector(".jessibuca-volume-panel-wrap")}),Object.defineProperty(t,"$volumePanelText",{value:e.$container.querySelector(".jessibuca-volume-panel-text")}),Object.defineProperty(t,"$volumePanel",{value:e.$container.querySelector(".jessibuca-volume-panel")}),Object.defineProperty(t,"$volumeHandle",{value:e.$container.querySelector(".jessibuca-volume-panel-handle")}),Object.defineProperty(t,"$volumeOn",{value:e.$container.querySelector(".jessibuca-icon-audio")}),Object.defineProperty(t,"$volumeOff",{value:e.$container.querySelector(".jessibuca-icon-mute")}),Object.defineProperty(t,"$fullscreen",{value:e.$container.querySelector(".jessibuca-fullscreen")}),Object.defineProperty(t,"$fullscreenExit",{value:e.$container.querySelector(".jessibuca-fullscreen-exit")}),Object.defineProperty(t,"$record",{value:e.$container.querySelector(".jessibuca-record")}),Object.defineProperty(t,"$recordStop",{value:e.$container.querySelector(".jessibuca-record-stop")}),Object.defineProperty(t,"$screenshot",{value:e.$container.querySelector(".jessibuca-screenshot")}),Object.defineProperty(t,"$speed",{value:e.$container.querySelector(".jessibuca-speed")}),Object.defineProperty(t,"$controlHtml",{value:e.$container.querySelector(".jessibuca-controls-item-html")}),Object.defineProperty(t,"$playbackTime",{value:e.$container.querySelector(".jessibuca-controls-playback-time")}),Object.defineProperty(t,"$playbackTimeInner",{value:e.$container.querySelector(".jessibuca-controls-playback-time-inner")}),Object.defineProperty(t,"$playbackTimeScroll",{value:e.$container.querySelector(".jessibuca-controls-playback-time-scroll")}),Object.defineProperty(t,"$playbackTimeList",{value:e.$container.querySelector(".jessibuca-controls-playback-time-list")}),Object.defineProperty(t,"$playbackTimeListOne",{value:e.$container.querySelector(".jessibuca-playback-time-one-wrap")}),Object.defineProperty(t,"$playbackTimeListSecond",{value:e.$container.querySelector(".jessibuca-playback-time-second-wrap")}),Object.defineProperty(t,"$playbackCurrentTime",{value:e.$container.querySelector(".jessibuca-controls-playback-current-time")}),Object.defineProperty(t,"$playbackCurrentTimeText",{value:e.$container.querySelector(".jessibuca-controls-playback-current-time-text")}),Object.defineProperty(t,"$controlsPlaybackBtns",{value:e.$container.querySelector(".jessibuca-controls-playback-btns")}),Object.defineProperty(t,"$playbackNarrow",{value:e.$container.querySelector(".jessibuca-playback-narrow")}),Object.defineProperty(t,"$playbackExpand",{value:e.$container.querySelector(".jessibuca-playback-expand")}),Object.defineProperty(t,"$ptz",{value:e.$container.querySelector(".jessibuca-ptz")}),Object.defineProperty(t,"$ptzActive",{value:e.$container.querySelector(".jessibuca-ptz-active")}),Object.defineProperty(t,"$ptzControl",{value:e.$container.querySelector(".jessibuca-ptz-controls")}),Object.defineProperty(t,"$ptzBgActive",{value:e.$container.querySelector(".jessibuca-ptz-bg-active")}),Object.defineProperty(t,"$ptzControlCircular",{value:e.$container.querySelector(".jessibuca-ptz-control")}),Object.defineProperty(t,"$ptzArrows",{value:e.$container.querySelectorAll(".jessibuca-ptz-arrow")}),Object.defineProperty(t,"$ptzExpand",{value:e.$container.querySelector(".jessibuca-ptz-expand")}),Object.defineProperty(t,"$ptzNarrow",{value:e.$container.querySelector(".jessibuca-ptz-narrow")}),Object.defineProperty(t,"$ptzApertureFar",{value:e.$container.querySelector(".jessibuca-ptz-aperture-far")}),Object.defineProperty(t,"$ptzApertureNear",{value:e.$container.querySelector(".jessibuca-ptz-aperture-near")}),Object.defineProperty(t,"$ptzFocusFar",{value:e.$container.querySelector(".jessibuca-ptz-focus-far")}),Object.defineProperty(t,"$ptzFocusNear",{value:e.$container.querySelector(".jessibuca-ptz-focus-near")}),Object.defineProperty(t,"$qualityText",{value:e.$container.querySelector(".jessibuca-quality-icon-text")}),Object.defineProperty(t,"$qualityMenu",{value:e.$container.querySelector(".jessibuca-quality-menu")}),Object.defineProperty(t,"$qualityMenuList",{value:e.$container.querySelector(".jessibuca-quality-menu-list")}),Object.defineProperty(t,"$scaleText",{value:e.$container.querySelector(".jessibuca-scale-icon-text")}),Object.defineProperty(t,"$scaleMenu",{value:e.$container.querySelector(".jessibuca-scale-menu")}),Object.defineProperty(t,"$scaleMenuList",{value:e.$container.querySelector(".jessibuca-scale-menu-list")}),Object.defineProperty(t,"$zoom",{value:e.$container.querySelector(".jessibuca-zoom")}),Object.defineProperty(t,"$zoomStop",{value:e.$container.querySelector(".jessibuca-zoom-stop")}),Object.defineProperty(t,"$zoomNarrow",{value:e.$container.querySelector(".jessibuca-zoom-narrow")}),Object.defineProperty(t,"$zoomExpand",{value:e.$container.querySelector(".jessibuca-zoom-expand")}),Object.defineProperty(t,"$zoomStop2",{value:e.$container.querySelector(".jessibuca-zoom-stop2")}),Object.defineProperty(t,"$close",{value:e.$container.querySelector(".jessibuca-close")}),Object.defineProperty(t,"$zoomControls",{value:e.$container.querySelector(".jessibuca-zoom-controls")}),Object.defineProperty(t,"$performancePanel",{value:e.$container.querySelector(".jessibuca-performance-panel")}),Object.defineProperty(t,"$performance",{value:e.$container.querySelector(".jessibuca-performance")}),Object.defineProperty(t,"$performanceActive",{value:e.$container.querySelector(".jessibuca-performance-active")}),Object.defineProperty(t,"$faceDetect",{value:e.$container.querySelector(".jessibuca-face")}),Object.defineProperty(t,"$faceDetectActive",{value:e.$container.querySelector(".jessibuca-face-active")}),Object.defineProperty(t,"$objectDetect",{value:e.$container.querySelector(".jessibuca-object")}),Object.defineProperty(t,"$objectDetectActive",{value:e.$container.querySelector(".jessibuca-object-active")}),Object.defineProperty(t,"$occlusionDetect",{value:e.$container.querySelector(".jessibuca-occlusion")}),Object.defineProperty(t,"$occlusionDetectActive",{value:e.$container.querySelector(".jessibuca-occlusion-active")}),Object.defineProperty(t,"$contextmenus",{value:e.$container.querySelector(".jessibuca-contextmenus")}),Object.defineProperty(t,"$speedText",{value:e.$container.querySelector(".jessibuca-speed-icon-text")}),Object.defineProperty(t,"$speedMenu",{value:e.$container.querySelector(".jessibuca-speed-menu")}),Object.defineProperty(t,"$speedMenuList",{value:e.$container.querySelector(".jessibuca-speed-menu-list")}),Object.defineProperty(t,"$logSave",{value:e.$container.querySelector(".jessibuca-logSave")}),Object.defineProperty(t,"$playbackProgress",{value:e.$container.querySelector(".jessibuca-control-progress-simple")}),Object.defineProperty(t,"$playbackProgressTip",{value:e.$container.querySelector(".jessibuca-progress-tip")}),Object.defineProperty(t,"$playbackProgressHover",{value:e.$container.querySelector(".jessibuca-progress-hover")}),Object.defineProperty(t,"$playbackProgressPlayed",{value:e.$container.querySelector(".jessibuca-progress-played")}),Object.defineProperty(t,"$playbackProgressIndicator",{value:e.$container.querySelector(".jessibuca-progress-indicator")}),Object.defineProperty(t,"$playbackProgressTime",{value:e.$container.querySelector(".jessibuca-playback-control-time")}),Object.defineProperty(t,"$tipsMessage",{value:e.$container.querySelector(".jessibuca-tips-message")}),Object.defineProperty(t,"$tipsMessageClose",{value:e.$container.querySelector(".jessibuca-tips-message-close")}),Object.defineProperty(t,"$tipsMessageContent",{value:e.$container.querySelector(".jessibuca-tips-message-content")})})(e,this),e._opt.extendOperateBtns.length>0&&e._opt.extendOperateBtns.forEach((e=>{this.addExtendBtn(e)})),t=this,Object.defineProperty(t,"controlsRect",{get:()=>t.$controls.getBoundingClientRect()}),Object.defineProperty(t,"controlsInnerRect",{get:()=>t.$controlsInner.getBoundingClientRect()}),Object.defineProperty(t,"controlsLeftRect",{get:()=>t.$controlsLeft.getBoundingClientRect()}),Object.defineProperty(t,"controlsRightRect",{get:()=>t.$controlsRight.getBoundingClientRect()}),Object.defineProperty(t,"controlsPlaybackTimeInner",{get:()=>t.$playbackTimeInner&&t.$playbackTimeInner.getBoundingClientRect()||{}}),Object.defineProperty(t,"controlsPlaybackBtnsRect",{get:()=>t.$controlsPlaybackBtns&&t.$controlsPlaybackBtns.getBoundingClientRect()||{width:0}}),sh(e,this),((e,t)=>{const{events:{proxy:i},debug:s}=e,r=e._opt,a=r.operateBtns;function o(e){const{bottom:i,height:s}=t.$volumePanel.getBoundingClientRect(),{height:r}=t.$volumeHandle.getBoundingClientRect();return rr(i-e.y-r/2,0,s-r/2)/(s-r)}if(ur()&&i(window,["click","contextmenu"],(i=>{i.composedPath().indexOf(e.$container)>-1?t.isFocus=!0:t.isFocus=!1})),i(t.$controls,"click",(e=>{e.stopPropagation()})),a.play&&(i(t.$pause,"click",(t=>{r.playType===y&&r.playbackConfig.uiUsePlaybackPause?e.playbackPause=!0:Kr(a.pauseFn)?a.pauseFn():e.pauseForControl()})),i(t.$play,"click",(t=>{r.playType===y&&e.playbackPause?e.playbackPause=!1:Kr(a.playFn)?a.playFn():e.playForControl().then((()=>{e.resumeAudioAfterPause()}))}))),i(t.$playBig,"click",(t=>{r.playType===y&&e.playbackPause?e.playbackPause=!1:Kr(a.playFn)?a.playFn():e.playForControl().then((()=>{e.resumeAudioAfterPause()}))})),a.screenshot&&i(t.$screenshot,"click",(t=>{t.stopPropagation(),Kr(a.screenshotFn)?a.screenshotFn():e.video.screenshot()})),a.audio&&(ur()&&(i(t.$volume,"mouseover",(()=>{t.$volumePanelWrap.classList.add("jessibuca-volume-panel-wrap-show")})),i(t.$volume,"mouseout",(()=>{t.$volumePanelWrap.classList.remove("jessibuca-volume-panel-wrap-show")})),i(t.$volumePanel,"click",(t=>{t.stopPropagation(),e.volume=o(t)})),i(t.$volumeHandle,"mousedown",(()=>{t.isVolumeDroging=!0})),i(t.$volumeHandle,"mousemove",(i=>{t.isVolumeDroging&&(e.volume=o(i))})),i(document,"mouseup",(()=>{t.isVolumeDroging&&(t.isVolumeDroging=!1)}))),i(t.$volumeOn,"click",(i=>{i.stopPropagation(),ar(t.$volumeOn,"display","none"),ar(t.$volumeOff,"display","block");const s=e.volume;e.volume=0,e._lastVolume=ur()?s:1})),i(t.$volumeOff,"click",(i=>{i.stopPropagation(),ar(t.$volumeOn,"display","block"),ar(t.$volumeOff,"display","none"),e.volume=ur()?e.lastVolume||.5:1}))),a.record&&(i(t.$record,"click",(t=>{t.stopPropagation(),Kr(a.recordFn)?a.recordFn():e.recording=!0})),i(t.$recordStop,"click",(t=>{t.stopPropagation(),Kr(a.recordStopFn)?a.recordStopFn():e.recording=!1}))),i(t.$recordingStop,"click",(t=>{t.stopPropagation(),Kr(a.recordStopFn)?a.recordStopFn():e.recording=!1})),a.fullscreen&&(i(t.$fullscreen,"click",(t=>{t.stopPropagation(),Kr(a.fullscreenFn)?a.fullscreenFn():e.fullscreen=!0})),i(t.$fullscreenExit,"click",(t=>{t.stopPropagation(),Kr(a.fullscreenExitFn)?a.fullscreenExitFn():e.fullscreen=!1}))),a.ptz){if(i(t.$ptz,"click",(e=>{e.stopPropagation(),ar(t.$ptzActive,"display","flex"),ar(t.$ptz,"display","none"),t.$ptzControl.classList.add("jessibuca-ptz-controls-show")})),i(t.$ptzActive,"click",(e=>{e.stopPropagation(),ar(t.$ptz,"display","flex"),ar(t.$ptzActive,"display","none"),t.$ptzControl.classList.remove("jessibuca-ptz-controls-show")})),t.$ptzArrows.forEach((s=>{if(r.ptzClickType===W)i(s,"click",(i=>{i.stopPropagation();const s=i.currentTarget.dataset.arrow;t.$ptzBgActive.classList.add("jessibuca-ptz-bg-active-show"),t.$ptzBgActive.classList.add(`jessibuca-ptz-bg-active-${s}`),t.$ptzControlCircular.classList.add(`jessibuca-ptz-control-${s}`),e.emit(Xe.ptz,ca(s)),setTimeout((()=>{t.$ptzBgActive.classList.remove("jessibuca-ptz-bg-active-show"),ni.forEach((e=>{t.$ptzBgActive.classList.remove(`jessibuca-ptz-bg-active-${e}`),t.$ptzControlCircular.classList.remove(`jessibuca-ptz-control-${e}`)})),e.emit(Xe.ptz,li)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===$){let r=!1;i(s,"mousedown",(i=>{i.stopPropagation(),r=!0;const s=i.currentTarget.dataset.arrow;t.$ptzBgActive.classList.add("jessibuca-ptz-bg-active-show"),t.$ptzBgActive.classList.add(`jessibuca-ptz-bg-active-${s}`),t.$ptzControlCircular.classList.add(`jessibuca-ptz-control-${s}`),e.emit(Xe.ptz,ca(s))}));const a=()=>{r=!1,t.$ptzBgActive.classList.remove("jessibuca-ptz-bg-active-show"),ni.forEach((e=>{t.$ptzBgActive.classList.remove(`jessibuca-ptz-bg-active-${e}`),t.$ptzControlCircular.classList.remove(`jessibuca-ptz-control-${e}`)})),e.emit(Xe.ptz,li)};i(s,"mouseup",(e=>{e.stopPropagation(),r&&a()})),i(window,"mouseup",(e=>{e.stopPropagation(),r&&a()}))}})),r.ptzZoomShow)if(r.ptzClickType===W)i(t.$ptzExpand,"click",(t=>{t.stopPropagation(),e.emit(Xe.ptz,di),setTimeout((()=>{e.emit(Xe.ptz,li)}),1e3*r.ptzStopEmitDelay)})),i(t.$ptzNarrow,"click",(t=>{t.stopPropagation(),e.emit(Xe.ptz,ci),setTimeout((()=>{e.emit(Xe.ptz,li)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===$){let s=!1,r=!1;i(t.$ptzExpand,"mousedown",(t=>{t.stopPropagation(),s=!0,e.emit(Xe.ptz,di)})),i(t.$ptzNarrow,"mousedown",(t=>{t.stopPropagation(),r=!0,e.emit(Xe.ptz,ci)}));const a=()=>{s=!1,r=!1,e.emit(Xe.ptz,li)};i(t.$ptzExpand,"mouseup",(e=>{e.stopPropagation(),s&&a()})),i(t.$ptzNarrow,"mouseup",(e=>{e.stopPropagation(),r&&a()})),i(window,"mouseup",(e=>{e.stopPropagation(),(s||r)&&a()}))}if(r.ptzApertureShow)if(r.ptzClickType===W)i(t.$ptzApertureFar,"click",(t=>{t.stopPropagation(),e.emit(Xe.ptz,ui),setTimeout((()=>{e.emit(Xe.ptz,hi)}),1e3*r.ptzStopEmitDelay)})),i(t.$ptzApertureNear,"click",(t=>{t.stopPropagation(),e.emit(Xe.ptz,pi),setTimeout((()=>{e.emit(Xe.ptz,hi)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===$){let s=!1,r=!1;i(t.$ptzApertureFar,"mousedown",(t=>{t.stopPropagation(),s=!0,e.emit(Xe.ptz,ui)})),i(t.$ptzApertureNear,"mousedown",(t=>{t.stopPropagation(),r=!0,e.emit(Xe.ptz,pi)}));const a=()=>{s=!1,r=!1,e.emit(Xe.ptz,hi)};i(t.$ptzApertureFar,"mouseup",(e=>{e.stopPropagation(),s&&a()})),i(t.$ptzApertureNear,"mouseup",(e=>{e.stopPropagation(),r&&a()})),i(window,"mouseup",(e=>{e.stopPropagation(),(s||r)&&a()}))}if(r.ptzFocusShow)if(r.ptzClickType===W)i(t.$ptzFocusFar,"click",(t=>{t.stopPropagation(),e.emit(Xe.ptz,fi),setTimeout((()=>{e.emit(Xe.ptz,hi)}),1e3*r.ptzStopEmitDelay)})),i(t.$ptzFocusNear,"click",(t=>{t.stopPropagation(),e.emit(Xe.ptz,mi),setTimeout((()=>{e.emit(Xe.ptz,hi)}),1e3*r.ptzStopEmitDelay)}));else if(r.ptzClickType===$){let s=!1,r=!1;i(t.$ptzFocusFar,"mousedown",(t=>{t.stopPropagation(),s=!0,e.emit(Xe.ptz,fi)})),i(t.$ptzFocusNear,"mousedown",(t=>{t.stopPropagation(),r=!0,e.emit(Xe.ptz,mi)}));const a=()=>{s=!1,r=!1,e.emit(Xe.ptz,hi)};i(t.$ptzFocusFar,"mouseup",(e=>{e.stopPropagation(),s&&a()})),i(t.$ptzFocusNear,"mouseup",(e=>{e.stopPropagation(),r&&a()})),i(window,"mouseup",(e=>{e.stopPropagation(),(s||r)&&a()}))}}if(a.performance&&(i(t.$performance,"click",(t=>{t.stopPropagation(),e.togglePerformancePanel(!0)})),i(t.$performanceActive,"click",(t=>{t.stopPropagation(),e.togglePerformancePanel(!1)}))),a.logSave&&i(t.$logSave,"click",(t=>{t.stopPropagation(),e.downloadMemoryLog()})),a.aiFace&&(i(t.$faceDetect,"click",(t=>{t.stopPropagation(),e.faceDetect(!0)})),i(t.$faceDetectActive,"click",(t=>{t.stopPropagation(),e.faceDetect(!1)}))),a.aiObject&&(i(t.$objectDetect,"click",(t=>{t.stopPropagation(),e.objectDetect(!0)})),i(t.$objectDetectActive,"click",(t=>{t.stopPropagation(),e.objectDetect(!1)}))),a.aiOcclusion&&(i(t.$occlusionDetect,"click",(t=>{t.stopPropagation(),e.occlusionDetect(!0)})),i(t.$occlusionDetectActive,"click",(t=>{t.stopPropagation(),e.occlusionDetect(!1)}))),e._opt.hasControl&&e._opt.controlAutoHide){i(e.$container,"mouseover",(()=>{e.fullscreen||(ar(t.$controls,"display","block"),r())})),i(e.$container,"mousemove",(()=>{e.$container&&t.$controls&&(e.fullscreen,"none"===t.$controls.style.display&&(ar(t.$controls,"display","block"),r()))})),i(e.$container,"mouseout",(()=>{a(),ar(t.$controls,"display","none")}));let s=null;const r=()=>{a(),s=setTimeout((()=>{ar(t.$controls,"display","none")}),5e3)},a=()=>{s&&(clearTimeout(s),s=null)}}if(e._opt.playType===y){let s=e._opt.playbackConfig.controlType;e._opt.playbackConfig.showRateBtn&&(i(t.$speedMenu,"mouseover",(()=>{t.$speedMenuList.classList.add("jessibuca-speed-menu-shown")})),i(t.$speedMenu,"mouseout",(()=>{t.$speedMenuList.classList.remove("jessibuca-speed-menu-shown")})),i(t.$speedMenuList,"click",(t=>{const i=$r(t);if(i.matches("div.jessibuca-speed-menu-item")){const t=i.dataset;e.emit(Xe.playbackPreRateChange,t.speed)}}))),s===J.normal?(i(t.$playbackNarrow,"click",(t=>{t.stopPropagation(),e.playback&&e.playback.narrowPrecision()})),i(t.$playbackExpand,"click",(t=>{t.stopPropagation(),e.playback&&e.playback.expandPrecision()})),i(t.$playbackTimeList,"click",(t=>{const i=$r(t);i.matches("div.jessibuca-playback-time-minute-one")&&e.playback&&e.playback.seek(i.dataset)})),e._opt.playbackConfig.supportWheel&&i(t.$playbackTimeInner,"wheel",(t=>{t.preventDefault(),(t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3)>0?e.playback&&e.playback.expandPrecision():e.playback&&e.playback.narrowPrecision()}))):s===J.simple&&(t.isDroging=!1,i(t.$playbackProgress,"click",(i=>{if(i.target!==t.$playbackProgressIndicator){let s=0,r=0;if(e.isInWebFullscreen())s=i.touches[0].clientY/e.height,r=s*e.playback.totalDuration;else{const a=Xl(t,e.playback.totalDuration,i);s=a.percentage,r=a.second}e.playback&&e.playback.seek({time:r})}})),i(t.$playbackProgress,"mousemove",(i=>{ar(t.$playbackProgressTip,"display","block");const{width:s,time:r}=Xl(t,e.playback.totalDuration,i);t.$playbackProgressTip.innerHTML=r;const a=t.$playbackProgressTip.clientWidth;s<=a/2?ar(t.$playbackProgressTip,"left",0):s>t.$playbackProgress.clientWidth-a/2?ar(t.$playbackProgressTip,"left",t.$playbackProgress-a+"px"):ar(t.$playbackProgressTip,"left",s-a/2+"px")})),i(t.$playbackProgress,"mouseout",(()=>{ar(t.$playbackProgressTip,"display","none")})),i(t.$playbackProgressIndicator,"mousedown",(e=>{t.isDroging=!0})),i(t.$playbackProgress,"mousemove",(i=>{if(t.isDroging){const{second:s,percentage:r}=Xl(t,e.playback.totalDuration,i);e.playback&&e.playback.seek({time:s})}})),i(t.$playbackProgress,"mouseup",(e=>{t.isDroging&&(t.isDroging=!1)})))}a.quality&&(i(t.$qualityMenu,"mouseover",(()=>{t.$qualityMenuList.classList.add("jessibuca-quality-menu-shown")})),i(t.$qualityMenu,"mouseout",(()=>{t.$qualityMenuList.classList.remove("jessibuca-quality-menu-shown")})),i(t.$qualityMenuList,"click",(t=>{const i=$r(t);if(i.matches("div.jessibuca-quality-menu-item")){const t=i.dataset;e.streamQuality=t.quality}}))),a.scale&&(i(t.$scaleMenu,"mouseover",(()=>{t.$scaleMenuList.classList.add("jessibuca-scale-menu-shown")})),i(t.$scaleMenu,"mouseout",(()=>{t.$scaleMenuList.classList.remove("jessibuca-scale-menu-shown")})),i(t.$scaleMenuList,"click",(t=>{const i=$r(t);if(i.matches("div.jessibuca-scale-menu-item")){const t=i.dataset;e.setScaleMode(t.scale)}}))),a.zoom&&(i(t.$zoom,"click",(t=>{t.stopPropagation(),e.zooming=!0})),i(t.$zoomStop,"click",(t=>{t.stopPropagation(),e.zooming=!1}))),i(t.$zoomExpand,"click",(t=>{t.stopPropagation(),e.zoom&&e.zoom.expandPrecision()})),i(t.$zoomNarrow,"click",(t=>{t.stopPropagation(),e.zoom&&e.zoom.narrowPrecision()})),i(t.$zoomStop2,"click",(t=>{t.stopPropagation(),e.zooming=!1})),a.close&&i(t.$close,"click",(t=>{t.stopPropagation(),e.doDestroy()})),i(t.$tipsMessageClose,"click",(e=>{e.stopPropagation(),t.$tipsMessageContent.innerHTML="",ar(t.$tipsMessage,"display","none")}))})(e,this),e._opt.hotKey&&((e,t)=>{const{events:{proxy:i}}=e,s={};function r(e,t){s[e]?s[e].push(t):s[e]=[t]}r(Xt,(()=>{e.fullscreen&&(e.fullscreen=!1)})),r(Zt,(()=>{e.volume+=.05})),r(ei,(()=>{e.volume-=.05})),i(window,"keydown",(e=>{if(t.isFocus){const t=document.activeElement.tagName.toUpperCase(),i=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==i&&"true"!==i){const t=s[e.keyCode];t&&(e.preventDefault(),t.forEach((e=>e())))}}}))})(e,this),this.btnIndex=0,this.initLoadingBackground(),Gr(e._opt.loadingIconStyle)&&this.initLoadingIconStyle(e._opt.loadingIconStyle),this.kbpsShow="0 KB/s",this.player.debug.log("Control","init")}destroy(){if(this.$performancePanel){this.$performancePanel.innerHTML="";if(!ih(this.$performancePanel)){const e=this.player.$container.querySelector(".jessibuca-performance-panel");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$poster){if(!ih(this.$poster)){const e=this.player.$container.querySelector(".jessibuca-poster");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$loading){if(!ih(this.$loading)){const e=this.player.$container.querySelector(".jessibuca-loading");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$loadingBg){if(!ih(this.$loadingBg)){const e=this.player.$container.querySelector(".jessibuca-loading-bg");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$controls){if(!ih(this.$controls)){const e=this.player.$container.querySelector(".jessibuca-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$playBig){if(!ih(this.$playBig)){const e=this.player.$container.querySelector(".jessibuca-play-big");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$recording){if(!ih(this.$recording)){const e=this.player.$container.querySelector(".jessibuca-recording");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$ptzControl){if(!ih(this.$ptzControl)){const e=this.player.$container.querySelector(".jessibuca-ptz-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$zoomControls){if(!ih(this.$zoomControls)){const e=this.player.$container.querySelector(".jessibuca-zoom-controls");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$contextmenus){this.$contextmenus.innerHTML="";if(!ih(this.$contextmenus)){const e=this.player.$container.querySelector(".jessibuca-contextmenus");e&&this.player.$container&&this.player.$container.removeChild(e)}}if(this.$tipsMessage){if(!ih(this.$tipsMessage)){const e=this.player.$container.querySelector(".jessibuca-tips-message");e&&this.player.$container&&this.player.$container.removeChild(e)}}this.btnIndex=0,this.extendBtnList=[],this.kbpsShow="0 KB/s",this.player.$container&&(this.player.$container.classList.remove("jessibuca-controls-show-auto-hide"),this.player.$container.classList.remove("jessibuca-controls-show")),this.player.debug.log("Control","destroy")}getBtnIndex(){return this.btnIndex++}autoSize(){const e=this.player;e.$container.style.padding="0 0";const t=e.width,i=e.height,s=t/i,r=e.video.$videoElement.width/e.video.$videoElement.height;if(s>r){const s=(t-i*r)/2;e.$container.style.padding=`0 ${s}px`}else{const s=(i-t/r)/2;e.$container.style.padding=`${s}px 0`}}initLoadingBackground(){const e=this.player;e._opt.loadingBackground&&e._opt.loadingBackgroundWidth&&e._opt.loadingBackgroundHeight&&(e.debug.log("Control","initLoadingBackground()"),"default"===this.player._opt.aspectRatio||cr()?(e.getRenderType()===z||e.getRenderType()===G)&&this._initLoadingBackground():this._initLoadingBackgroundForRatio(),eh(this.$loadingBg,"display","block"),e._opt.loadingBackground="",e._opt.loadingBackgroundWidth=0,e._opt.loadingBackgroundHeight=0)}initLoadingIconStyle(e){const t=this.player.$container.querySelector(".jessibuca-icon-loading");t&&(e.width&&eh(t,"width",`${e.width}px`),e.height&&eh(t,"height",`${e.height}px`),e.background&&eh(t,"backgroundImage",`url("${e.background}")`),!1===e.hasAnimation&&(eh(t,"animationName","none"),eh(t,"animationDuration",0),eh(t,"animationTimingFunction","ease"),eh(t,"animationIterationCount",1)))}_initLoadingBackgroundForRatio(){const e=this.player._opt.aspectRatio.split(":").map(Number);let t=this.player.width,i=this.player.height;const s=this.player._opt;let r=0;s.hasControl&&!s.controlAutoHide&&(r=s.playType===y?Pt:It,i-=r);const a=this.player._opt.loadingBackgroundWidth,o=this.player._opt.loadingBackgroundHeight,n=a/o,l=e[0]/e[1];if(this.$loadingBgImage.src=this.player._opt.loadingBackground,n>l){const e=l*o/a;this.$loadingBgImage.style.width=100*e+"%",this.$loadingBgImage.style.height=`calc(100% - ${r}px)`,this.$loadingBgImage.style.padding=`0 ${(t-t*e)/2}px`}else{const e=a/l/o;this.$loadingBgImage.style.width="100%",this.$loadingBgImage.style.height=`calc(${100*e}% - ${r}px)`,this.$loadingBgImage.style.padding=(i-i*e)/2+"px 0"}}_initLoadingBackgroundForCanvas(){const e=this.player._opt;let t=this.player.width,i=this.player.height;if(e.hasControl&&!e.controlAutoHide){const s=e.playType===y?Pt:It;cr()&&this.player.fullscreen&&e.useWebFullScreen?t-=s:i-=s}let s={width:this.player._opt.loadingBackgroundWidth,height:this.player._opt.loadingBackgroundHeight},r=s.width,a=s.height;const o=e.rotate;let n=(t-r)/2,l=(i-a)/2;270!==o&&90!==o||(r=s.height,a=s.width);const h=t/r,d=i/a;let c=h>d?d:h;e.isResize||h!==d&&(c=h+","+d),e.isFullResize&&(c=h>d?h:d);let u="scale("+c+")";"none"===e.mirrorRotate&&o&&(u+=" rotate("+o+"deg)"),"level"===e.mirrorRotate?u+=" rotateY(180deg)":"vertical"===e.mirrorRotate&&(u+=" rotateX(180deg)"),this.$loadingBgImage.src=this.player._opt.loadingBackground,this.$loadingBgImage.style.height=s.height+"px",this.$loadingBgImage.style.width=s.width+"px",this.$loadingBgImage.style.padding="0",this.$loadingBgImage.style.transform=u,this.$loadingBgImage.style.left=n+"px",this.$loadingBgImage.style.top=l+"px",this.$loadingBgImage.style.display="block"}_initLoadingBackground(){const e=this.player;let t=e.height;const i=e._opt;if(i.hasControl&&!i.controlAutoHide){t-=i.playType===y?Pt:It}let s=e.width,r=t;const a=i.rotate;270!==a&&90!==a||(s=t,r=e.width),this.$loadingBgImage.width=s,this.$loadingBgImage.height=r,this.$loadingBgImage.src=e._opt.loadingBackground;let o=(e.width-s)/2,n=(t-r)/2,l="contain";i.isResize||(l="fill"),i.isFullResize&&(l="none");let h="";"none"===i.mirrorRotate&&a&&(h+=" rotate("+a+"deg)"),"level"===i.mirrorRotate?h+=" rotateY(180deg)":"vertical"===i.mirrorRotate&&(h+=" rotateX(180deg)"),this.player._opt.videoRenderSupportScale&&(this.$loadingBgImage.style.objectFit=l),this.$loadingBgImage.style.transform=h,this.$loadingBgImage.style.padding="0",this.$loadingBgImage.style.left=o+"px",this.$loadingBgImage.style.top=n+"px"}_validateExtendBtn(e){let t=!0;if(e.name||(this.player.debug.warn("Control","extend button name is required"),t=!1),t){-1!==this.extendBtnList.findIndex((t=>t.name===e.name))&&(this.player.debug.warn("Control",`extend button name: ${e.name} is already exist`),t=!1)}return t&&(e.icon||(this.player.debug.warn("Control","extend button icon is required"),t=!1)),t}addExtendBtn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=aa(rs);if(e=Object.assign({},t,e),!this._validateExtendBtn(e))return;const i=e.name||"",s=this.$controlsRight,r=e.activeIcon&&e.activeClick,a=`\n
\n ${e.icon?`
\n \n ${e.iconTitle?`\n ${e.iconTitle}\n `:""}\n
`:""}\n ${e.activeIcon?`
\n \n ${e.activeIconTitle?`\n ${e.activeIconTitle}\n `:""}\n
`:""}\n
\n `,o=Array.from(s.children)[e.index];o?o.insertAdjacentHTML("beforebegin",a):Zl(s,a);const n=s.querySelector(`.jessibuca-controls-item-wrap-${i}`),l=e.icon?s.querySelector(`.jessibuca-icon-extend-${i}`):null,h=e.icon?s.querySelector(`.jessibuca-control-extend-${i}`):null,d=e.activeIcon?s.querySelector(`.jessibuca-icon-extend-${i}-active`):null,c=e.activeIcon?s.querySelector(`.jessibuca-control-extend-${i}-active`):null,{events:{proxy:u},debug:p}=this.player;e.icon&&(eh(l,"background",`url(${e.icon}) no-repeat center`),eh(l,"background-size","100% 100%"),eh(h,"display","none"),e.iconHover&&(u(l,"mouseover",(()=>{eh(l,"background",`url(${e.iconHover}) no-repeat center`),eh(l,"background-size","100% 100%")})),u(l,"mouseout",(()=>{eh(l,"background",`url(${e.icon}) no-repeat center`),eh(l,"background-size","100% 100%")})))),e.activeIcon&&(eh(d,"background",`url(${e.activeIcon}) no-repeat center`),eh(d,"background-size","100% 100%"),eh(c,"display","none"),e.activeIconHover&&(u(d,"mouseover",(()=>{eh(d,"background",`url(${e.activeIconHover}) no-repeat center`),eh(d,"background-size","100% 100%")})),u(d,"mouseout",(()=>{eh(d,"background",`url(${e.activeIcon}) no-repeat center`),eh(d,"background-size","100% 100%")})))),e.click&&l&&u(l,"click",(t=>{t.preventDefault(),r&&(eh(h,"display","none"),eh(c,"display","flex")),this.player.isInMulti()?e.click.call(this.player,t,this.player._opt.multiIndex):e.click.call(this.player,t)})),e.activeClick&&d&&u(d,"click",(t=>{t.preventDefault(),eh(h,"display","flex"),eh(c,"display","none"),this.player.isInMulti()?e.activeClick.call(this.player,t,this.player._opt.multiIndex):e.activeClick.call(this.player,t)})),this.extendBtnList.push({name:i,$iconContainer:n,$iconWrap:h,$activeIconWrap:c})}updateLoadingText(e){this.$loadingText&&(this.$loadingText.innerText=e)}getExtendBtnList(){return this.extendBtnList}showTipsMessage(e,t){const i=this.$tipsMessage,s=this.$tipsMessageContent;if(i){const r=`\n
${e}
\n ${t?`
Error Type:${t}
`:""}\n `;s.innerHTML=r,eh(i,"display","block")}}hideTipsMessage(){const e=this.$tipsMessage;e&&($tipsMessageContent.innerHTML="",eh(e,"display","none"))}}rh(".jessibuca-container{position:relative;width:100%;height:100%;overflow:hidden}.jessibuca-container.jessibuca-fullscreen-web{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;width:100vw!important;height:100vh!important;background:#000}");class oh{static init(){oh.types={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(let e in oh.types)oh.types.hasOwnProperty(e)&&(oh.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);let e=oh.constants={};e.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),e.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSC=e.STCO=e.STTS,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(e){let t=8,i=null,s=Array.prototype.slice.call(arguments,1),r=s.length;for(let e=0;e>>24&255,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i.set(e,4);let a=8;for(let e=0;e>>24&255,e>>>16&255,e>>>8&255,255&e,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(e){return oh.box(oh.types.trak,oh.tkhd(e),oh.mdia(e))}static tkhd(e){let t=e.id,i=e.duration,s=e.presentWidth,r=e.presentHeight;return oh.box(oh.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>>8&255,255&s,0,0,r>>>8&255,255&r,0,0]))}static mdia(e){return oh.box(oh.types.mdia,oh.mdhd(e),oh.hdlr(e),oh.minf(e))}static mdhd(e){let t=e.timescale,i=e.duration;return oh.box(oh.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(e){let t=null;return t="audio"===e.type?oh.constants.HDLR_AUDIO:oh.constants.HDLR_VIDEO,oh.box(oh.types.hdlr,t)}static minf(e){let t=null;return t="audio"===e.type?oh.box(oh.types.smhd,oh.constants.SMHD):oh.box(oh.types.vmhd,oh.constants.VMHD),oh.box(oh.types.minf,t,oh.dinf(),oh.stbl(e))}static dinf(){return oh.box(oh.types.dinf,oh.box(oh.types.dref,oh.constants.DREF))}static stbl(e){return oh.box(oh.types.stbl,oh.stsd(e),oh.box(oh.types.stts,oh.constants.STTS),oh.box(oh.types.stsc,oh.constants.STSC),oh.box(oh.types.stsz,oh.constants.STSZ),oh.box(oh.types.stco,oh.constants.STCO))}static stsd(e){return"audio"===e.type?"mp3"===e.audioType?oh.box(oh.types.stsd,oh.constants.STSD_PREFIX,oh.mp3(e)):oh.box(oh.types.stsd,oh.constants.STSD_PREFIX,oh.mp4a(e)):"avc"===e.videoType?oh.box(oh.types.stsd,oh.constants.STSD_PREFIX,oh.avc1(e)):oh.box(oh.types.stsd,oh.constants.STSD_PREFIX,oh.hvc1(e))}static mp3(e){let t=e.channelCount,i=e.audioSampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return oh.box(oh.types[".mp3"],s)}static mp4a(e){let t=e.channelCount,i=e.audioSampleRate,s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return oh.box(oh.types.mp4a,s,oh.esds(e))}static esds(e){let t=e.config||[],i=t.length,s=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t).concat([6,1,2]));return oh.box(oh.types.esds,s)}static avc1(e){let t=e.avcc;const i=e.codecWidth,s=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return oh.box(oh.types.avc1,r,oh.box(oh.types.avcC,t))}static hvc1(e){let t=e.avcc;const i=e.codecWidth,s=e.codecHeight;let r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,s>>>8&255,255&s,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return oh.box(oh.types.hvc1,r,oh.box(oh.types.hvcC,t))}static mvex(e){return oh.box(oh.types.mvex,oh.trex(e))}static trex(e){let t=e.id,i=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return oh.box(oh.types.trex,i)}static moof(e,t){return oh.box(oh.types.moof,oh.mfhd(e.sequenceNumber),oh.traf(e,t))}static mfhd(e){let t=new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e]);return oh.box(oh.types.mfhd,t)}static traf(e,t){let i=e.id,s=oh.box(oh.types.tfhd,new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),r=oh.box(oh.types.tfdt,new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t])),a=oh.sdtp(e),o=oh.trun(e,a.byteLength+16+16+8+16+8+8);return oh.box(oh.types.traf,s,r,o,a)}static sdtp(e){let t=new Uint8Array(5),i=e.flags;return t[4]=i.isLeading<<6|i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy,oh.box(oh.types.sdtp,t)}static trun(e,t){let i=new Uint8Array(28);t+=36,i.set([0,0,15,1,0,0,0,1,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0);let s=e.duration,r=e.size,a=e.flags,o=e.cts;return i.set([s>>>24&255,s>>>16&255,s>>>8&255,255&s,r>>>24&255,r>>>16&255,r>>>8&255,255&r,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.isNonSync,0,0,o>>>24&255,o>>>16&255,o>>>8&255,255&o],12),oh.box(oh.types.trun,i)}static mdat(e){return oh.box(oh.types.mdat,e)}}oh.init();const nh=[44100,48e3,32e3,0],lh=[22050,24e3,16e3,0],hh=[11025,12e3,8e3,0],dh=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],ch=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],uh=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1];class ph extends ba{constructor(e){super(),this.TAG_NAME="MediaSource",this.player=e,this._resetInIt(),this.mediaSource=new window.MediaSource,this.isDecodeFirstIIframe=!!da(e._opt.checkFirstIFrame),this.mediaSourceObjectURL=window.URL.createObjectURL(this.mediaSource),this.isSupportVideoFrameCallback=ga(),e._opt.mseUseCanvasRender?(this.$videoElement=document.createElement("video"),this.$videoElement.src=this.mediaSourceObjectURL,this.initVideoEvents()):(this.player.video.$videoElement.src=this.mediaSourceObjectURL,this.$videoElement=this.player.video.$videoElement),this._bindMediaSourceEvents(),this.audioSourceBufferCheckTimeout=null,this.player.isPlayback()&&this.player.on(Xe.playbackPause,(t=>{da(t)?(ha(e._opt.checkFirstIFrame)&&(this.player.debug.log(this.TAG_NAME,"playbackPause is false and _opt.checkFirstIFrame is true so set isDecodeFirstIIframe = false"),this.isDecodeFirstIIframe=!1),this.clearUpAllSourceBuffer(),this.$videoElement.play()):(this.$videoElement.pause(),this.cacheTrack={})})),this.player.on(Xe.visibilityChange,(e=>{e&&setTimeout((()=>{if(this.player.isPlaying()&&this.$videoElement){const e=this.getVideoBufferLastTime();e>this.$videoElement.currentTime&&(this.player.debug.log(this.TAG_NAME,`visibilityChange is true and lastTime is ${e} and currentTime is ${this.$videoElement.currentTime} so set currentTime to lastTime`),this.$videoElement.currentTime=e)}}),300)}))}destroy(){this.stop(),this._clearAudioSourceBufferCheckTimeout(),this.eventListenList.length&&(this.eventListenList.forEach((e=>e())),this.eventListenList=[]),this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.$videoElement&&(this.player._opt.mseUseCanvasRender&&this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.$videoElement=null),this.mediaSourceObjectURL&&(window.URL.revokeObjectURL(this.mediaSourceObjectURL),this.mediaSourceObjectURL=null),this._resetInIt(),this.off()}needInitAudio(){return this.player._opt.hasAudio&&this.player._opt.mseDecodeAudio}_resetInIt(){this.isAvc=null,this.isAAC=null,this.videoMeta={},this.audioMeta={},this.sourceBuffer=null,this.audioSourceBuffer=null,this.hasInit=!1,this.hasAudioInit=!1,this.isInitInfo=!1,this.isAudioInitInfo=!1,this.audioMimeType="",this.cacheTrack={},this.cacheAudioTrack={},this.timeInit=!1,this.sequenceNumber=0,this.audioSequenceNumber=0,this.firstRenderTime=null,this.firstAudioTime=null,this.$videoElement=null,this.mediaSourceAppendBufferFull=!1,this.mediaSourceAppendBufferError=!1,this.mediaSourceAddSourceBufferError=!1,this.mediaSourceBufferError=!1,this.mediaSourceError=!1,this.prevTimestamp=null,this.decodeDiffTimestamp=null,this.prevDts=null,this.prevAudioDts=null,this.prevPayloadBufferSize=0,this.isWidthOrHeightChanged=!1,this.prevTs=null,this.prevAudioTs=null,this.eventListenList=[],this.tempFmp4List=[],this.pendingRemoveRanges=[],this.pendingSegments=[],this.pendingAudioRemoveRanges=[],this.pendingAudioSegments=[],this.supportVideoFrameCallbackHandle=null}get state(){return this.mediaSource&&this.mediaSource.readyState}get isStateOpen(){return this.state===Yt}get isStateClosed(){return this.state===Qt}get isStateEnded(){return this.state===qt}get duration(){return this.mediaSource&&this.mediaSource.duration||-1}set duration(e){this.mediaSource.duration=e}_bindMediaSourceEvents(){const{debug:e,events:{proxy:t}}=this.player,i=t(this.mediaSource,wi,(()=>{this.player.debug.log(this.TAG_NAME,"sourceOpen"),this._onMediaSourceSourceOpen(),this.player&&this.player.emit(Xe.mseSourceOpen)})),s=t(this.mediaSource,_i,(()=>{this.player.debug.log(this.TAG_NAME,"sourceClose"),this.player&&this.player.emit(Xe.mseSourceClose)})),r=t(this.mediaSource,Si,(()=>{this.player.debug.log(this.TAG_NAME,"sourceended"),this.player&&this.player.emit(Xe.mseSourceended)}));this.eventListenList.push(i,s,r);const a=t(this.$videoElement,ki,(e=>{if(this.player.checkIsInRender())this.player.handleRender();else{const t=parseInt(e.timeStamp,10);this.player.debug.log(this.TAG_NAME,`mseUseCanvasRender is ${this.player._opt.mseUseCanvasRender} and\n $videoElement ts is ${t}, but not in render and vbps is ${this.player._stats.vbps} and fps is ${this.player._stats.fps}`)}})),o=t(this.$videoElement,Ci,(()=>{this.player.debug.log(this.TAG_NAME,"video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate),this.$videoElement&&this.$videoElement.paused&&(this.player.debug.log(this.TAG_NAME,"video is paused and next try to replay"),this.$videoElement.play())}));this.eventListenList.push(a,o)}_onMediaSourceSourceOpen(){this.sourceBuffer||(this.player.debug.log("MediaSource","onMediaSourceSourceOpen() sourceBuffer is null and next init"),this._initSourceBuffer()),this.audioSourceBuffer||(this.player.debug.log("MediaSource","onMediaSourceSourceOpen() audioSourceBuffer is null and next init"),this._initAudioSourceBuffer()),this._hasPendingSegments()&&this._doAppendSegments()}initVideoEvents(){const{proxy:e}=this.player.events,t=e(this.$videoElement,Ti,(()=>{this.player.debug.log(this.TAG_NAME,"video canplay"),this.$videoElement.play().then((()=>{this.player.emit(Xe.removeLoadingBgImage),ga()&&(this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this))),this.player.debug.log(this.TAG_NAME,"video play")})).catch((e=>{this.player.debug.error(this.TAG_NAME,"video play error ",e),this.player.emitError(tt.mediaSourceUseCanvasRenderPlayFailed,e)}))})),i=e(this.$videoElement,Ei,(()=>{this.player.debug.log(this.TAG_NAME,"video waiting")})),s=e(this.$videoElement,ki,(e=>{parseInt(e.timeStamp,10),this.$videoElement.paused&&(this.player.debug.warn(this.TAG_NAME,"video is paused and next try to replay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video is paused and replay success")})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video is paused and replay error ",e)})))}));this.eventListenList.push(t,i,s)}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player.isDestroyed()?this.player.debug.log(this.TAG_NAME,"videoFrameCallback() player is destroyed"):(this.player.video.render({$video:this.$videoElement,ts:t.mediaTime||0}),this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)))}decodeVideo(e,t,i,s){const r=this.player;if(r)if(this.player.isDestroyed())this.player.debug.warn(this.TAG_NAME,"decodeVideo() player is destroyed");else if(this.hasInit)if(!this.isDecodeFirstIIframe&&i&&(this.isDecodeFirstIIframe=!0),this.isDecodeFirstIIframe){if(i&&0===e[1]){const t=15&e[0];let i={};if(t===dt){i=vo(e.slice(5))}else t===ct&&(i=Io(e));const s=this.player.video.videoInfo;s&&s.width&&s.height&&i&&i.codecWidth&&i.codecHeight&&(i.codecWidth!==s.width||i.codecHeight!==s.height)&&(this.player.debug.warn(this.TAG_NAME,`\n decodeVideo: video width or height is changed,\n old width is ${s.width}, old height is ${s.height},\n new width is ${i.codecWidth}, new height is ${i.codecHeight},\n and emit change event`),this.isWidthOrHeightChanged=!0,this.player.emitError(tt.mseWidthOrHeightChange))}if(this.isWidthOrHeightChanged)return void this.player.debug.warn(this.TAG_NAME,"decodeVideo: video width or height is changed, and return");if(la(e))return void this.player.debug.warn(this.TAG_NAME,"decodeVideo and payload is video sequence header so drop this frame");if(e.byteLength<12)return void this.player.debug.warn(this.TAG_NAME,`decodeVideo and payload is too small , payload length is ${e.byteLength}`);let r=t;if(this.player.isPlayer()){if(null===this.firstRenderTime&&(this.firstRenderTime=t),r=t-this.firstRenderTime,r<0&&(this.player.debug.warn(this.TAG_NAME,`decodeVideo\n local dts is < 0 , ts is ${t} and prevTs is ${this.prevTs},\n firstRenderTime is ${this.firstRenderTime} and mseCorrectTimeDuration is ${this.player._opt.mseCorrectTimeDuration}`),r=null===this.prevDts?0:this.prevDts+this.player._opt.mseCorrectTimeDuration,this._checkTsIsMaxDiff(t)))return this.player.debug.warn(this.TAG_NAME,`decodeVideo is max diff , ts is ${t} and prevTs is ${this.prevTs}, diff is ${this.prevTs-t}`),void this.player.emitError(tt.mediaSourceTsIsMaxDiff);if(null!==this.prevDts&&r<=this.prevDts){if(this.player.debug.warn(this.TAG_NAME,`\n decodeVideo dts is less than(or equal) prev dts ,\n dts is ${r} and prev dts is ${this.prevDts} ,\n and now ts is ${t} and prev ts is ${this.prevTs} ,\n and diff is ${t-this.prevTs} and firstRenderTime is ${this.firstRenderTime} and isIframe is ${i},\n and mseCorrectTimeDuration is ${this.player._opt.mseCorrectTimeDuration},\n and prevPayloadBufferSize is ${this.prevPayloadBufferSize} and payload size is ${e.byteLength}`),r===this.prevDts&&this.prevPayloadBufferSize===e.byteLength)return void this.player.debug.warn(this.TAG_NAME,"decodeVideo dts is equal to prev dts and payload size is equal to prev payload size so drop this frame");if(r=this.prevDts+this.player._opt.mseCorrectTimeDuration,this._checkTsIsMaxDiff(t))return this.player.debug.warn(this.TAG_NAME,`decodeVideo is max diff , ts is ${t} and prevTs is ${this.prevTs}, diff is ${this.prevTs-t} and emit replay`),void this.emit(tt.mediaSourceTsIsMaxDiff)}}this.player.isPlayer()?this._decodeVideo(e,r,i,s,t):this.player.isPlayback()&&da(this.player.playbackPause)&&(this.player.playback.isUseLocalCalculateTime&&this.player.playback.increaseLocalTimestamp(),this._decodeVideo(e,r,i,s,t)),this.prevDts=r,this.prevPayloadBufferSize=e.byteLength,this.prevTs=t,this.player.getRenderType()===G&&this.player.video&&this.player.video.doAddContentToWatermark()}else this.player.debug.log(this.TAG_NAME,"decodeVideo first frame is not iFrame");else if(i&&e[1]===ji){const s=15&e[0];if(r.video.updateVideoInfo({encTypeCode:s}),s===ct&&da(Er()))return void this.player.emitError(tt.mediaSourceH265NotSupport);r._times.decodeStart||(r._times.decodeStart=sr()),this.hasInit=this._decodeConfigurationRecord(e,t,i,s)}else this.player.debug.warn(this.TAG_NAME,`decodeVideo has not init , isIframe is ${i} , payload is ${e[1]}`)}decodeAudio(e,t){if(this.player)if(this.player.isDestroyed())this.player.debug.warn(this.TAG_NAME,"decodeAudio() player is destroyed");else if(da(this.hasAudioInit))this.hasAudioInit=this._decodeAudioConfigurationRecord(e,t);else{let i=t;if(this.player.isPlayer()){if(null===this.firstAudioTime&&(this.firstAudioTime=t,null!==this.firstRenderTime&&null!==this.prevTs)){const e=Math.abs(this.firstRenderTime-this.prevTs);e>300&&(this.firstAudioTime-=e,this.player.debug.warn(this.TAG_NAME,`video\n firstAudioTime is ${this.firstRenderTime} and current time is ${this.prevTs}\n play time is ${e} and firstAudioTime ${t} - ${e} = ${this.firstAudioTime}`))}if(i=t-this.firstAudioTime,i<0)return void this.player.debug.warn(this.TAG_NAME,`decodeAudio\n local dts is < 0 , ts is ${t} and prevTs is ${this.prevAudioTs},\n firstAudioTime is ${this.firstAudioTime}`);if(null!==this.prevAudioTs&&i<=this.prevAudioDts)return void this.player.debug.warn(this.TAG_NAME,`\n decodeAudio dts is less than(or equal) prev dts ,\n dts is ${i} and prev dts is ${this.prevAudioDts} ,\n and now ts is ${t} and prev ts is ${this.prevAudioTs} ,\n and diff is ${t-this.prevAudioTs}`)}(this.player.isPlayer()||this.player.isPlayback()&&da(this.player.playbackPause))&&this._decodeAudio(e,i,t),this.prevAudioTs=t,this.prevAudioDts=i}}_checkTsIsMaxDiff(e){return this.prevTs>0&&eK}_decodeConfigurationRecord(e,t,i,s){let r=e.slice(5),a={};if(s===dt?a=vo(r):s===ct&&(a=Io(e)),this.player.recorder&&this.player._opt.recordType===A&&this.player.recorder.initMetaData(e,s),0===a.codecWidth&&0===a.codecHeight)return this.player.debug.warn(this.TAG_NAME,"_decodeConfigurationRecord",a),this.player.emitError(tt.mediaSourceDecoderConfigurationError),!1;const o={id:Ds,type:"video",timescale:1e3,duration:0,avcc:r,codecWidth:a.codecWidth,codecHeight:a.codecHeight,videoType:a.videoType},n=oh.generateInitSegment(o);return this.isAvc=s===dt,this.player.debug.log(this.TAG_NAME,`_decodeConfigurationRecord mimeType is ${this.isAvc?Jt:Kt} and isAvc is ${this.isAvc}`),this._initSourceBuffer(),this.appendBuffer(n.buffer),this.sequenceNumber=0,this.cacheTrack={},this.timeInit=!1,!0}_decodeAudioConfigurationRecord(e,t){const i=e[0]>>4,s=i===yt,r=i===ft;if(da(r||s))return this.player.debug.warn(this.TAG_NAME,`_decodeAudioConfigurationRecord audio codec is not support , codecId is ${i} ant auto wasm decode`),this.player.emit(tt.mediaSourceAudioG711NotSupport),!1;const a={id:Ls,type:"audio",timescale:1e3};let o={};if(zs(e)){o=function(e){let t=new Uint8Array(e),i=null,s=0,r=0,a=0,o=null;if(s=r=t[0]>>>3,a=(7&t[0])<<1|t[1]>>>7,a<0||a>=Js.length)return void console.error("Flv: AAC invalid sampling frequency index!");let n=Js[a],l=(120&t[1])>>>3;if(l<0||l>=8)return void console.log("Flv: AAC invalid channel configuration");5===s&&(o=(7&t[1])<<1|t[2]>>>7,t[2]);let h=self.navigator.userAgent.toLowerCase();return-1!==h.indexOf("firefox")?a>=6?(s=5,i=new Array(4),o=a-3):(s=2,i=new Array(2),o=a):-1!==h.indexOf("android")?(s=2,i=new Array(2),o=a):(s=5,o=a,i=new Array(4),a>=6?o=a-3:1===l&&(s=2,i=new Array(2),o=a)),i[0]=s<<3,i[0]|=(15&a)>>>1,i[1]=(15&a)<<7,i[1]|=(15&l)<<3,5===s&&(i[1]|=(15&o)>>>1,i[2]=(1&o)<<7,i[2]|=8,i[3]=0),{audioType:"aac",config:i,sampleRate:n,channelCount:l,objectType:s,codec:"mp4a.40."+s,originalCodec:"mp4a.40."+r}}(e.slice(2)),a.audioSampleRate=o.sampleRate,a.channelCount=o.channelCount,a.config=o.config,a.refSampleDuration=1024/a.audioSampleRate*a.timescale}else o=function(e){if(e.length<4)return void console.error("Invalid MP3 packet, header missing!");let t=new Uint8Array(e.buffer),i=null;if(255!==t[0])return void console.error("Invalid MP3 packet, first byte != 0xFF ");let s=t[1]>>>3&3,r=(6&t[1])>>1,a=(240&t[2])>>>4,o=(12&t[2])>>>2,n=3!=(t[3]>>>6&3)?2:1,l=0,h=0;switch(s){case 0:l=hh[o];break;case 2:l=lh[o];break;case 3:l=nh[o]}switch(r){case 1:a0&&(d+=`;codecs=${l}`),da(this.isAudioInitInfo)&&(this.player.audio.updateAudioInfo({encTypeCode:i,channels:a.channelCount,sampleRate:a.audioSampleRate}),this.isAudioInitInfo=!0),this.audioMimeType=d,this.isAAC=r,this.player.debug.log(this.TAG_NAME,`_decodeAudioConfigurationRecord mimeType is ${d} and isAAC is ${r}`),this._initAudioSourceBuffer(),this.appendAudioBuffer(h.buffer),!0}_initSourceBuffer(){const{debug:e,events:{proxy:t}}=this.player;if(null===this.sourceBuffer&&null!==this.mediaSource&&this.isStateOpen&&null!==this.isAvc){let i=this.isAvc?Jt:Kt;try{this.sourceBuffer=this.mediaSource.addSourceBuffer(i),e.log(this.TAG_NAME,"_initSourceBuffer() this.mediaSource.addSourceBuffer()",i)}catch(t){return e.error(this.TAG_NAME,"appendBuffer() this.mediaSource.addSourceBuffer()",t.code,t),this.player.emitError(tt.mseAddSourceBufferError,t),void(this.mediaSourceAddSourceBufferError=!0)}if(this.sourceBuffer){const i=t(this.sourceBuffer,"error",(t=>{this.mediaSourceBufferError=!0,e.error(this.TAG_NAME,"mseSourceBufferError this.sourceBuffer",t),this.player.emitError(tt.mseSourceBufferError,t)})),s=t(this.sourceBuffer,"updateend",(()=>{this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()&&this._doAppendSegments()}));this.eventListenList.push(i,s)}}else e.log(this.TAG_NAME,`_initSourceBuffer and this.isStateOpen is ${this.isStateOpen} and this.isAvc === null is ${null===this.isAvc}`)}_initAudioSourceBuffer(){const{debug:e,events:{proxy:t}}=this.player;if(null===this.audioSourceBuffer&&null!==this.mediaSource&&this.isStateOpen&&this.audioMimeType){try{this.audioSourceBuffer=this.mediaSource.addSourceBuffer(this.audioMimeType),this._clearAudioSourceBufferCheckTimeout(),e.log(this.TAG_NAME,"_initAudioSourceBuffer() this.mediaSource.addSourceBuffer()",this.audioMimeType)}catch(t){return e.error(this.TAG_NAME,"appendAudioBuffer() this.mediaSource.addSourceBuffer()",t.code,t),this.player.emitError(tt.mseAddSourceBufferError,t),void(this.mediaSourceAddSourceBufferError=!0)}if(this.audioSourceBuffer){const i=t(this.audioSourceBuffer,"error",(t=>{this.mediaSourceBufferError=!0,e.error(this.TAG_NAME,"mseSourceBufferError this.audioSourceBuffer",t),this.player.emitError(tt.mseSourceBufferError,t)})),s=t(this.audioSourceBuffer,"updateend",(()=>{this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()&&this._doAppendSegments()}));this.eventListenList.push(i,s)}}else e.log(this.TAG_NAME,`_initAudioSourceBuffer and this.isStateOpen is ${this.isStateOpen} and this.audioMimeType is ${this.audioMimeType}`)}_decodeVideo(e,t,i,s,r){const a=this.player;let o=e.slice(5),n=o.byteLength;if(0===n)return void a.debug.warn(this.TAG_NAME,"_decodeVideo payload bytes is 0 and return");let l=(new Date).getTime(),h=!1;this.prevTimestamp||(this.prevTimestamp=l,h=!0);const d=l-this.prevTimestamp;this.decodeDiffTimestamp=d,d>500&&!h&&this.player.isPlayer()&&a.debug.warn(this.TAG_NAME,`_decodeVideo now time is ${l} and prev time is ${this.prevTimestamp}, diff time is ${d} ms`);const c=this.$videoElement;if(this.cacheTrack.id&&t>=this.cacheTrack.dts){let e=8+this.cacheTrack.size,i=new Uint8Array(e);i[0]=e>>>24&255,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=255&e,i.set(oh.types.mdat,4),i.set(this.cacheTrack.data,8),this.cacheTrack.duration=t-this.cacheTrack.dts;let s=oh.moof(this.cacheTrack,this.cacheTrack.dts);this.cacheTrack={};let o=new Uint8Array(s.byteLength+i.byteLength);o.set(s,0),o.set(i,s.byteLength),this.appendBuffer(o.buffer),a.emit(Xe.timeUpdate,r),a.isPlayer()?a.updateStats({fps:!0,dfps:!0,ts:r,mseTs:t}):a.isPlayback()&&a.playback.updateStats({ts:r}),a._times.videoStart||(a._times.videoStart=sr(),a.handlePlayToRenderTimes())}else a.debug.log(this.TAG_NAME,`timeInit set false , cacheTrack = {} now dts is ${t}, and ts is ${r} cacheTrack dts is ${this.cacheTrack&&this.cacheTrack.dts}`),this.timeInit=!1,this.cacheTrack={};this.cacheTrack||(this.cacheTrack={}),this.cacheTrack.id=Ds,this.cacheTrack.sequenceNumber=++this.sequenceNumber,this.cacheTrack.size=n,this.cacheTrack.dts=t,this.cacheTrack.cts=s,this.cacheTrack.isKeyframe=i,this.cacheTrack.data=o,this.cacheTrack.flags={isLeading:0,dependsOn:i?2:1,isDependedOn:i?1:0,hasRedundancy:0,isNonSync:i?0:1},!this.isInitInfo&&c.videoWidth>0&&c.videoHeight>0&&(a.debug.log(this.TAG_NAME,`updateVideoInfo: ${c.videoWidth},${c.videoHeight}`),a.video.updateVideoInfo({width:c.videoWidth,height:c.videoHeight}),a.video.initCanvasViewSize(),this.isInitInfo=!0),a._opt.mseUseCanvasRender&&da(this.isSupportVideoFrameCallback)&&a.video.render({$video:c,ts:t}),this.prevTimestamp=(new Date).getTime()}_decodeAudio(e,t,i){this.player;let s=this.isAAC?e.slice(2):e.slice(1),r=s.byteLength;if(this.cacheAudioTrack.id&&t>=this.cacheAudioTrack.dts){let e=8+this.cacheAudioTrack.size,i=new Uint8Array(e);i[0]=e>>>24&255,i[1]=e>>>16&255,i[2]=e>>>8&255,i[3]=255&e,i.set(oh.types.mdat,4),i.set(this.cacheAudioTrack.data,8),this.cacheAudioTrack.duration=t-this.cacheAudioTrack.dts;let s=oh.moof(this.cacheAudioTrack,this.cacheAudioTrack.dts);this.cacheAudioTrack={};let r=new Uint8Array(s.byteLength+i.byteLength);r.set(s,0),r.set(i,s.byteLength),this.appendAudioBuffer(r.buffer)}else this.cacheAudioTrack={};this.cacheAudioTrack||(this.cacheAudioTrack={}),this.cacheAudioTrack.id=Ls,this.cacheAudioTrack.sequenceNumber=++this.audioSequenceNumber,this.cacheAudioTrack.size=r,this.cacheAudioTrack.dts=t,this.cacheAudioTrack.cts=0,this.cacheAudioTrack.data=s,this.cacheAudioTrack.flags={isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}appendBuffer(e){if(this.player.isDestroyed())return void this.player.debug.warn(this.TAG_NAME,"appendBuffer() player is destroyed");const{debug:t,events:{proxy:i}}=this.player;this.mediaSourceAddSourceBufferError?t.warn(this.TAG_NAME,"this.mediaSourceAddSourceBufferError is true"):this.mediaSourceAppendBufferFull?t.warn(this.TAG_NAME,"this.mediaSourceAppendBufferFull is true"):this.mediaSourceAppendBufferError?t.warn(this.TAG_NAME,"this.mediaSourceAppendBufferError is true"):this.mediaSourceBufferError?t.warn(this.TAG_NAME,"this.mediaSourceBufferError is true"):(this.pendingSegments.push(e),this.sourceBuffer&&(this.player.isPlayer()&&this._handleUpdatePlaybackRate(),this.player.isPlayback()&&this._handleUpdateBufferDelayTime(),this.player._opt.mseAutoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanUpSourceBuffer(),da(this.getSourceBufferUpdating())&&this.isStateOpen&&da(this._hasPendingRemoveRanges()))?this._doAppendSegments():this.isStateClosed?(this.mediaSourceBufferError=!0,this.player.emitError(tt.mseSourceBufferError,"mediaSource is not attached to video or mediaSource is closed")):this.isStateEnded?(this.mediaSourceBufferError=!0,this.player.emitError(tt.mseSourceBufferError,"mediaSource is end")):this._hasPendingRemoveRanges()&&t.log(this.TAG_NAME,"video has pending remove ranges"))}appendAudioBuffer(e){if(this.player.isDestroyed())return void this.player.debug.warn(this.TAG_NAME,"appendAudioBuffer() player is destroyed");const{debug:t,events:{proxy:i}}=this.player;this.mediaSourceAddSourceBufferError?t.warn(this.TAG_NAME,"this.mediaSourceAddSourceBufferError is true"):this.mediaSourceAppendBufferFull?t.warn(this.TAG_NAME,"this.mediaSourceAppendBufferFull is true"):this.mediaSourceAppendBufferError?t.warn(this.TAG_NAME,"this.mediaSourceAppendBufferError is true"):this.mediaSourceBufferError?t.warn(this.TAG_NAME,"this.mediaSourceBufferError is true"):(this.pendingAudioSegments.push(e),this.audioSourceBuffer&&(this.player.isPlayer()&&this._handleUpdatePlaybackRate(),this.player.isPlayback()&&this._handleUpdateBufferDelayTime(),this.player._opt.mseAutoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanUpSourceBuffer(),da(this.getAudioSourceBufferUpdating())&&this.isStateOpen&&da(this._hasPendingRemoveRanges()))?this._doAppendSegments():this.isStateClosed?(this.mediaSourceBufferError=!0,this.player.emitError(tt.mseSourceBufferError,"mediaSource is not attached to video or mediaSource is closed")):this.isStateEnded?(this.mediaSourceBufferError=!0,this.player.emitError(tt.mseSourceBufferError,"mediaSource is end")):this._hasPendingRemoveRanges()&&t.log(this.TAG_NAME,"audio has pending remove ranges"))}getSourceBufferUpdating(){return this.sourceBuffer&&this.sourceBuffer.updating}getAudioSourceBufferUpdating(){return this.audioSourceBuffer&&this.audioSourceBuffer.updating}stop(){this.removeSourceBuffer(),this.endOfStream(),this.abortSourceBuffer()}checkSourceBufferDelay(){const e=this.$videoElement;let t=0;return e.buffered.length>0&&(t=e.buffered.end(e.buffered.length-1)-e.currentTime),t<0&&(this.player.debug.warn(this.TAG_NAME,`checkSourceBufferDelay end(0) is ${e.buffered.end(0)} - currentTime is ${e.currentTime} and result < 0 and result is ${t}`),t=0),t}checkSourceBufferStore(){const e=this.$videoElement;let t=0;return e.buffered.length>0&&(t=e.currentTime-e.buffered.start(0)),t}getDecodeDiffTimes(){return this.decodeDiffTimestamp}removeBuffer(e,t){const i=Jr();if(this.player.debug.log(this.TAG_NAME,`removeBuffer() start is ${e} and end is ${t} and _isMacOsFirefox is ${i}`),this.isStateOpen&&da(i)){if(da(this.getSourceBufferUpdating()))try{this.sourceBuffer.remove(e,t)}catch(e){this.player.debug.warn(this.TAG_NAME,"removeBuffer() sourceBuffer error",e)}if(da(this.getAudioSourceBufferUpdating()))try{this.audioSourceBuffer.remove(e,t)}catch(e){this.player.debug.warn(this.TAG_NAME,"removeBuffer() audioSourceBuffer error",e)}}}clearUpAllSourceBuffer(){if(this.sourceBuffer){const e=this.sourceBuffer.buffered;for(let t=0;t=1)try{this.player.debug.log(this.TAG_NAME,"endOfStream()"),this.mediaSource.endOfStream()}catch(e){this.player.debug.warn(this.TAG_NAME,"endOfStream() error",e)}}abortSourceBuffer(){if(this.isStateOpen){if(this.sourceBuffer)try{this.player.debug.log(this.TAG_NAME,"abortSourceBuffer() abort sourceBuffer"),this.sourceBuffer.abort()}catch(e){}if(this.audioSourceBuffer)try{this.player.debug.log(this.TAG_NAME,"abortSourceBuffer() abort audioSourceBuffer"),this.audioSourceBuffer.abort()}catch(e){}}this.sourceBuffer=null,this.audioSourceBuffer=null}removeSourceBuffer(){if(!this.isStateClosed&&this.mediaSource){if(this.sourceBuffer)try{this.player.debug.log(this.TAG_NAME,"removeSourceBuffer() sourceBuffer"),this.mediaSource.removeSourceBuffer(this.sourceBuffer)}catch(e){this.player.debug.warn(this.TAG_NAME,"removeSourceBuffer() sourceBuffer error",e)}if(this.audioSourceBuffer)try{this.player.debug.log(this.TAG_NAME,"removeSourceBuffer() audioSourceBuffer"),this.mediaSource.removeSourceBuffer(this.audioSourceBuffer)}catch(e){this.player.debug.warn(this.TAG_NAME,"removeSourceBuffer() audioSourceBuffer error",e)}}}_hasPendingSegments(){return this.pendingSegments.length>0||this.pendingAudioSegments.length>0}_handleUpdatePlaybackRate(){if(!this.$videoElement)return;const e=this.$videoElement;let t=(this.player._opt.videoBuffer+this.player._opt.videoBufferDelay)/1e3;const i=e.buffered;i.length&&i.start(0);const s=i.length?i.end(i.length-1):0;let r=e.currentTime;const a=s-r,o=Math.max(5,t+3);if(this.player.updateStats({mseVideoBufferDelayTime:a}),a>o)this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${s} and current is ${r} , delay buffer is more than ${o} is ${a} and new time is ${s}`),e.currentTime=s,r=e.currentTime;else if(a<0){if(this.player.debug.warn(this.TAG_NAME,`handleUpdatePlaybackRate and delay buffer is ${s} - current is ${r} = ${a} < 0 and check video is paused : ${e.paused} `),0===s)return void this.player.emit(tt.mediaSourceBufferedIsZeroError,"video.buffered is empty");e.paused&&e.play()}const n=this._getPlaybackRate(s-r);e.playbackRate!==n&&(this.player.debug.log(this.TAG_NAME,`handleUpdatePlaybackRate and buffered is ${s} and current time is ${r} and delay is ${s-r} set playbackRate is ${n} `),e.playbackRate=n)}_handleUpdateBufferDelayTime(){const e=this.getVideoBufferDelayTime();this.player.updateStats({mseVideoBufferDelayTime:e})}_doAppendSegments(){if(!this.isStateClosed&&!this.isStateEnded){if(this.needInitAudio()&&null===this.audioSourceBuffer)return this.player.debug.log(this.TAG_NAME,"_doAppendSegments() audioSourceBuffer is null and need init audio source buffer"),void(null===this.audioSourceBufferCheckTimeout&&(this.audioSourceBufferCheckTimeout=setTimeout((()=>{this._clearAudioSourceBufferCheckTimeout(),this.player.emit(tt.mediaSourceAudioInitTimeout)}),1e3)));if(da(this.getSourceBufferUpdating())&&this.pendingSegments.length>0){const e=this.pendingSegments.shift();try{this.sourceBuffer.appendBuffer(e)}catch(e){this.player.debug.error(this.TAG_NAME,"this.sourceBuffer.appendBuffer()",e.code,e),22===e.code?(this.stop(),this.mediaSourceAppendBufferFull=!0,this.player.emitError(tt.mediaSourceFull)):11===e.code?(this.stop(),this.mediaSourceAppendBufferError=!0,this.player.emitError(tt.mediaSourceAppendBufferError)):(this.stop(),this.mediaSourceBufferError=!0,this.player.debug.error(this.TAG_NAME,"appendBuffer error",e),this.player.emitError(Xe.mseSourceBufferError,e))}}if(da(this.getAudioSourceBufferUpdating())&&this.pendingAudioSegments.length>0){const e=this.pendingAudioSegments.shift();try{this.audioSourceBuffer.appendBuffer(e)}catch(e){this.player.debug.error(this.TAG_NAME,"this.audioSourceBuffer.appendBuffer()",e.code,e),22===e.code?(this.stop(),this.mediaSourceAppendBufferFull=!0,this.player.emitError(tt.mediaSourceFull)):11===e.code?(this.stop(),this.mediaSourceAppendBufferError=!0,this.player.emitError(tt.mediaSourceAppendBufferError)):(this.stop(),this.mediaSourceBufferError=!0,this.player.debug.error(this.TAG_NAME,"appendBuffer error",e),this.player.emitError(Xe.mseSourceBufferError,e))}}}}_doCleanUpSourceBuffer(){if(!this.$videoElement)return;const e=this.$videoElement.currentTime;if(this.sourceBuffer){const t=this.sourceBuffer.buffered;let i=!1;for(let s=0;s=this.player._opt.mseAutoCleanupMaxBackwardDuration){i=!0;let t=e-this.player._opt.mseAutoCleanupMinBackwardDuration;this.pendingRemoveRanges.push({start:r,end:t})}}else a=this.player._opt.mseAutoCleanupMaxBackwardDuration){i=!0;let t=e-this.player._opt.mseAutoCleanupMinBackwardDuration;this.pendingAudioRemoveRanges.push({start:r,end:t})}}else a0||this.pendingAudioRemoveRanges.length>0}_doRemoveRanges(){if(this.sourceBuffer&&da(this.getSourceBufferUpdating())){let e=this.pendingRemoveRanges;for(;e.length&&da(this.getSourceBufferUpdating());){let t=e.shift();try{this.sourceBuffer.remove(t.start,t.end)}catch(e){this.player.debug.warn(this.TAG_NAME,"removeBuffer() sourceBuffer error",e)}}}if(this.audioSourceBuffer&&da(this.getAudioSourceBufferUpdating())){let e=this.pendingAudioRemoveRanges;for(;e.length&&da(this.getAudioSourceBufferUpdating());){let t=e.shift();try{this.audioSourceBuffer.remove(t.start,t.end)}catch(e){this.player.debug.warn(this.TAG_NAME,"removeBuffer() audioSourceBuffer error",e)}}}}getDecodePlaybackRate(){let e=0;const t=this.$videoElement;return t&&(e=t.playbackRate),e}_getPlaybackRate(e){const t=this.$videoElement;let i=this.player._opt.videoBufferDelay;const s=Math.max(i,1e3),r=s/2;return e*=1e3,1===t.playbackRate?e>s?1.2:1:e<=r?1:t.playbackRate}_needCleanupSourceBuffer(){if(da(this.player._opt.mseAutoCleanupSourceBuffer)||!this.$videoElement)return!1;const e=this.$videoElement,t=e.buffered,i=e.currentTime;return t.length>=1&&i-t.start(0)>=this.player._opt.mseAutoCleanupMaxBackwardDuration}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}getVideoBufferLastTime(){const e=this.$videoElement;let t=0;if(e){const i=e.buffered;i.length&&i.start(0);t=i.length?i.end(i.length-1):0}return t}getVideoBufferDelayTime(){const e=this.$videoElement;const t=this.getVideoBufferLastTime()-e.currentTime;return t>0?t:0}_clearAudioSourceBufferCheckTimeout(){this.audioSourceBufferCheckTimeout&&(clearTimeout(this.audioSourceBufferCheckTimeout),this.audioSourceBufferCheckTimeout=null)}}const fh=()=>"wakeLock"in navigator&&-1===window.navigator.userAgent.indexOf("Samsung")&&da(gr());class mh{constructor(e){this.player=e,this.enabled=!1,fh()?(this.player.debug.log("NoSleep","Native Wake Lock API supported."),this._wakeLock=null,this.handleVisibilityChange=()=>{null!==this._wakeLock&&"visible"===document.visibilityState&&this.enable()},document.addEventListener("visibilitychange",this.handleVisibilityChange),document.addEventListener("fullscreenchange",this.handleVisibilityChange)):(this.player.debug.log("NoSleep","Native Wake Lock API not supported. so use video element."),this.noSleepVideo=document.createElement("video"),this.noSleepVideo.setAttribute("title","No Sleep"),this.noSleepVideo.setAttribute("playsinline",""),this._addSourceToVideo(this.noSleepVideo,"webm","data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwEAAAAAABLfEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHYTbuMU6uEElTDZ1OsggGXTbuMU6uEHFO7a1OsghLJ7AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmsirXsYMPQkBNgI1MYXZmNTguNDUuMTAwV0GNTGF2ZjU4LjQ1LjEwMESJiECzmgAAAAAAFlSua0C5rgEAAAAAAABO14EBc8WI9UhIq9EDJPCcgQAitZyDdW5khoVWX1ZQOIOBASPjg4QF9eEA4AEAAAAAAAAbsIIBQLqB8FSwggElVLqB8FWwiFW3gQFVuIECrgEAAAAAAABZ14ECc8WIUEWPA9J/iJ6cgQAitZyDdW5khoZBX09QVVNWqoNjLqBWu4QExLQAg4EC4ZGfgQG1iEDncAAAAAAAYmSBIGOik09wdXNIZWFkAQE4AYC7AAAAAAASVMNnQcJzcwEAAAAAAACXY8CAZ8gBAAAAAAAAFUWji01BSk9SX0JSQU5ERIeEaXNvbWfIAQAAAAAAABZFo41NSU5PUl9WRVJTSU9ORIeDNTEyZ8gBAAAAAAAAJ0WjkUNPTVBBVElCTEVfQlJBTkRTRIeQaXNvbWlzbzJhdmMxbXA0MWfIAQAAAAAAABpFo4dFTkNPREVSRIeNTGF2ZjU4LjQ1LjEwMHNzAQAAAAAAAIZjwItjxYj1SEir0QMk8GfIAQAAAAAAAB5Fo4xIQU5ETEVSX05BTUVEh4xWaWRlb0hhbmRsZXJnyAEAAAAAAAAhRaOHRU5DT0RFUkSHlExhdmM1OC45MS4xMDAgbGlidnB4Z8iiRaOIRFVSQVRJT05Eh5QwMDowMDowNS4wMDcwMDAwMDAAAHNzAQAAAAAAAIdjwItjxYhQRY8D0n+InmfIAQAAAAAAAB5Fo4xIQU5ETEVSX05BTUVEh4xTb3VuZEhhbmRsZXJnyAEAAAAAAAAiRaOHRU5DT0RFUkSHlUxhdmM1OC45MS4xMDAgbGlib3B1c2fIokWjiERVUkFUSU9ORIeUMDA6MDA6MDUuMDE4MDAwMDAwAAAfQ7Z1T2TngQCjh4IAAID4//6jQKSBAAeAMBIAnQEqQAHwAABHCIWFiIWEiAICAAYWBPcGgWSfa9ubJzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh69AD+/6tQgKOHggAVgPj//qOHggApgPj//qOHggA9gPj//qOHggBRgPj//qOHggBlgPj//qOegQBrANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCAHmA+P/+o4eCAI2A+P/+o4eCAKGA+P/+o4eCALWA+P/+o4eCAMmA+P/+o56BAM8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IA3YD4//6jh4IA8YD4//6jh4IBBYD4//6jh4IBGYD4//6jh4IBLYD4//6jnoEBMwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggFBgPj//qOHggFVgPj//qOHggFpgPj//qOHggF9gPj//qOHggGRgPj//qOegQGXANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCAaWA+P/+o4eCAbmA+P/+o4eCAc2A+P/+o4eCAeGA+P/+o4eCAfWA+P/+o56BAfsA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4ICCYD4//6jh4ICHYD4//6jh4ICMYD4//6jh4ICRYD4//6jh4ICWYD4//6jnoECXwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggJtgPj//qOHggKBgPj//qOHggKVgPj//qOHggKpgPj//qOHggK9gPj//qOegQLDANECAAUQEBRgAGFgv9AAIgAQzX61yT5xzAAAo4eCAtGA+P/+o4eCAuWA+P/+o4eCAvmA+P/+o4eCAw2A+P/+o4eCAyGA+P/+o56BAycA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IDNYD4//6jh4IDSYD4//6jh4IDXYD4//6jh4IDcYD4//6jh4IDhYD4//6jnoEDiwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggOZgPj//qOHggOtgPj//qOHggPBgPj//qOHggPVgPj//qOHggPpgPj//qOegQPvANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCA/2A+P/+o4eCBBGA+P/+o4eCBCWA+P/+o4eCBDmA+P/+o4eCBE2A+P/+o56BBFMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IEiID4//6jh4IEnID4//6jh4IEsID4//6jnoEEtwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggTEgPj//qOHggTYgPj//qOHggTsgPj//qOHggUAgPj//qOHggUUgPj//qOegQUbANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCBSiA+P/+o4eCBTyA+P/+o4eCBVCA+P/+o4eCBWSA+P/+o4eCBXiA+P/+o56BBX8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IFjID4//6jh4IFoID4//6jh4IFtID4//6jh4IFyID4//6jh4IF3ID4//6jnoEF4wDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggXwgPj//qOHggYEgPj//qOHggYYgPj//qOHggYsgPj//qOHggZAgPj//qOegQZHANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCBlSA+P/+o4eCBmiA+P/+o4eCBnyA+P/+o4eCBpCA+P/+o4eCBqSA+P/+o56BBqsA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IGuID4//6jh4IGzID4//6jh4IG4ID4//6jh4IG9ID4//6jh4IHCID4//6jnoEHDwDRAgAFEBAUYABhYL/QACIAEM1+tck+ccwAAKOHggccgPj//qOHggcwgPj//qOHggdEgPj//qOHggdYgPj//qOHggdsgPj//qOegQdzANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCB4CA+P/+o4eCB5SA+P/+o4eCB6iA+P/+o4eCB7yA+P/+o4eCB9CA+P/+o56BB9cA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IH5ID4//6jh4IH+ID4//6jh4IIDID4//6jh4IIIID4//6jh4IINID4//6jnoEIOwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgghIgPj//qOHgghcgPj//qOHgghwgPj//qOHggiEgPj//qOegQifANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCMCA+P/+o4eCCNSA+P/+o4eCCOiA+P/+o4eCCPyA+P/+o56BCQMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IJEID4//6jh4IJJID4//6jh4IJOID4//6jh4IJTID4//6jh4IJYID4//6jnoEJZwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggl0gPj//qOHggmIgPj//qOHggmcgPj//qOHggmwgPj//qOHggnEgPj//qOegQnLANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCdiA+P/+o4eCCeyA+P/+o4eCCgCA+P/+o4eCChSA+P/+o4eCCiiA+P/+o56BCi8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IKPID4//6jh4IKUID4//6jh4IKZID4//6jh4IKeID4//6jh4IKjID4//6jnoEKkwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggqggPj//qOHggq0gPj//qOHggrIgPj//qOHggrcgPj//qOHggrwgPj//qOegQr3ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCwSA+P/+o4eCCxiA+P/+o4eCCyyA+P/+o4eCC0CA+P/+o4eCC1SA+P/+o56BC1sA0QIABRAQFGAAYWC/0AAiABDNfrXJPnHMAACjh4ILaID4//6jh4ILfID4//6jh4ILkID4//6jh4ILpID4//6jh4ILuID4//6jnoELvwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggvMgPj//qOHggvggPj//qOHggv0gPj//qOHggwIgPj//qOHggwcgPj//qOegQwjANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCDDCA+P/+o4eCDESA+P/+o4eCDFiA+P/+o4eCDGyA+P/+o4eCDICA+P/+o56BDIcA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IMlID4//6jh4IMqID4//6jh4IMvID4//6jh4IM0ID4//6jnoEM6wDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgg0MgPj//qOHgg0ggPj//qOHgg00gPj//qOHgg1IgPj//qOegQ1PANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCDVyA+P/+o4eCDXCA+P/+o4eCDYSA+P/+o4eCDZiA+P/+o4eCDayA+P/+o56BDbMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4INwID4//6jh4IN1ID4//6jh4IN6ID4//6jh4IN/ID4//6jh4IOEID4//6jnoEOFwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgg4kgPj//qOHgg44gPj//qOHgg5MgPj//qOHgg5ggPj//qOHgg50gPj//qOegQ57ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCDoiA+P/+o4eCDpyA+P/+o4eCDrCA+P/+o4eCDsSA+P/+o4eCDtiA+P/+o56BDt8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IO7ID4//6jh4IPAID4//6jh4IPFID4//6jh4IPKID4//6jh4IPPID4//6jnoEPQwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgg9QgPj//qOHgg9kgPj//qOHgg94gPj//qOHgg+MgPj//qOHgg+ggPj//qOegQ+nANECAAUQEBRgAGFgv9AAIgAQzX61yT5xzAAAo4eCD7SA+P/+o4eCD8iA+P/+o4eCD9yA+P/+o4eCD/CA+P/+o4eCEASA+P/+o56BEAsA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IQGID4//6jh4IQLID4//6jh4IQQID4//6jh4IQVID4//6jh4IQaID4//6jnoEQbwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghB8gPj//qOHghCQgPj//qOHghCkgPj//qOHghC4gPj//qOHghDMgPj//qOegRDTANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEOCA+P/+o4eCEPSA+P/+o4eCEQiA+P/+o56BETcA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IRQ4D4//6jh4IRV4D4//6jh4IRa4D4//6jh4IRf4D4//6jh4IRk4D4//6jnoERmwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghGngPj//qOHghG7gPj//qOHghHPgPj//qOHghHjgPj//qOHghH3gPj//qOegRH/ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEguA+P/+o4eCEh+A+P/+o4eCEjOA+P/+o4eCEkeA+P/+o4eCEluA+P/+o56BEmMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4ISb4D4//6jh4ISg4D4//6jh4ISl4D4//6jh4ISq4D4//6jh4ISv4D4//6jnoESxwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghLTgPj//qOHghLngPj//qOHghL7gPj//qOHghMPgPj//qOHghMjgPj//qOegRMrANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEzeA+P/+o4eCE0uA+P/+o4eCE1+A+P/+o4eCE3OA+P/+oAEAAAAAAAAPoYeCE4cA+P/+daKDB/KBHFO7a5G7j7OBB7eK94EB8YIDX/CBDA=="),this._addSourceToVideo(this.noSleepVideo,"mp4","data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACORtZGF03gIATGF2YzU4LjM1LjEwMAACMEAOAAACcQYF//9t3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MSByMzAyNyA0MTIxMjc3IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTAgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0wIHdlaWdodHA9MCBrZXlpbnQ9MjUwIGtleWludF9taW49MTAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD00MCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIzLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAADvZYiED/JigADD7JycnJycnJycnJycnJycnJycnJ11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111114BGCAHARggBwEYIAcBGCAHARggBwAAAAdBmjgf4BLYARggBwEYIAcBGCAHARggBwAAAAdBmlQH+AS2ARggBwEYIAcBGCAHARggBwAAAAdBmmA/wCWwARggBwEYIAcBGCAHARggBwEYIAcAAAAHQZqAP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZqgP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZrAP8AlsAEYIAcBGCAHARggBwEYIAcBGCAHAAAAB0Ga4D/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GbAD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GbID/AJbABGCAHARggBwEYIAcBGCAHARggBwAAAAdBm0A/wCWwARggBwEYIAcBGCAHAAAAB0GbYD/AJbABGCAHARggBwEYIAcAAAAHQZuAP8AlsAEYIAcBGCAHARggBwEYIAcBGCAHAAAAB0GboD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GbwD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0Gb4D/AJbABGCAHARggBwEYIAcBGCAHARggBwAAAAdBmgA/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmiA/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmkA/wCWwARggBwEYIAcBGCAHARggBwEYIAcAAAAHQZpgP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZqAP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZqgP8AlsAEYIAcBGCAHARggBwAAAAdBmsA/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmuA/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmwA/wCWwARggBwEYIAcBGCAHARggBwEYIAcAAAAHQZsgP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZtAP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZtgP8AlsAEYIAcBGCAHARggBwEYIAcBGCAHAAAAB0GbgD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GboD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GbwD/AJbABGCAHARggBwEYIAcBGCAHARggBwAAAAdBm+A/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmgA/wCWwARggBwEYIAcAAAAHQZogP8AlsAEYIAcBGCAHARggBwEYIAcBGCAHAAAAB0GaQD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GaYD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GagD/AJbABGCAHARggBwEYIAcBGCAHARggBwAAAAdBmqA/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmsA/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmuA/wCWwARggBwEYIAcBGCAHARggBwEYIAcAAAAHQZsAP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZsgP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZtAP8AlsAEYIAcBGCAHARggBwEYIAcBGCAHAAAAB0GbYD/AJbABGCAHARggBwAAAAdBm4A/wCWwARggBwEYIAcBGCAHARggBwAAAAdBm6A/wCWwARggBwEYIAcBGCAHARggBwEYIAcAAAAHQZvAP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZvgP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZoAO8AlsAEYIAcBGCAHARggBwEYIAcBGCAHAAAAB0GaIDfAJbABGCAHARggBwEYIAcBGCAHAAAMxm1vb3YAAABsbXZoZAAAAAAAAAAAAAAAAAAAA+gAABOgAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAPLdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAQAAAAAAABOIAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAElVVUA8AAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAATiAAAAAAAAQAAAAADQ21kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAKAAAAMgAVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAAAu5taW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAKuc3RibAAAAKpzdHNkAAAAAAAAAAEAAACaYXZjMQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAFAAPAASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAADRhdmNDAULAC//hABxnQsAL2QFB+/8ACwAMEAAAAwAQAAADAUDxQqSAAQAFaMuDyyAAAAAQcGFzcAAAAAsAAAAMAAAAGHN0dHMAAAAAAAAAAQAAADIAAAQAAAAAFHN0c3MAAAAAAAAAAQAAAAEAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAA3HN0c3oAAAAAAAAAAAAAADIAAANoAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAANhzdGNvAAAAAAAAADIAAABFAAADwQAAA9wAAAP3AAAEFgAABDEAAARMAAAEawAABIYAAAShAAAEwAAABNcAAATuAAAFDQAABSgAAAVDAAAFYgAABX0AAAWYAAAFtwAABdIAAAXtAAAGBAAABh8AAAY6AAAGWQAABnQAAAaPAAAGrgAABskAAAbkAAAHAwAABx4AAAcxAAAHUAAAB2sAAAeGAAAHpQAAB8AAAAfbAAAH+gAACBUAAAgwAAAITwAACGIAAAh9AAAInAAACLcAAAjSAAAI8QAACCV0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAAE6AAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAABOIAAAEAAABAAAAAAedbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAACsRAADYVRVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAAHSG1pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAHDHN0YmwAAABqc3RzZAAAAAAAAAABAAAAWm1wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAACsRAAAAAAANmVzZHMAAAAAA4CAgCUAAgAEgICAF0AVAAAAAAENiAAABVQFgICABRIIVuUABoCAgAECAAAAYHN0dHMAAAAAAAAACgAAAC8AAAQAAAAAAQAACtUAAAAsAAAEAAAAAAEAAArWAAAALAAABAAAAAABAAAK1QAAACwAAAQAAAAAAQAACtUAAAAaAAAEAAAAAAEAAAH/AAABzHN0c2MAAAAAAAAAJQAAAAEAAAABAAAAAQAAAAIAAAAFAAAAAQAAAAMAAAAEAAAAAQAAAAUAAAAFAAAAAQAAAAYAAAAEAAAAAQAAAAgAAAAFAAAAAQAAAAkAAAAEAAAAAQAAAAsAAAAFAAAAAQAAAAwAAAADAAAAAQAAAA4AAAAFAAAAAQAAAA8AAAAEAAAAAQAAABEAAAAFAAAAAQAAABIAAAAEAAAAAQAAABQAAAAFAAAAAQAAABUAAAAEAAAAAQAAABcAAAADAAAAAQAAABgAAAAEAAAAAQAAABoAAAAFAAAAAQAAABsAAAAEAAAAAQAAAB0AAAAFAAAAAQAAAB4AAAAEAAAAAQAAACAAAAAFAAAAAQAAACEAAAAEAAAAAQAAACIAAAACAAAAAQAAACMAAAAFAAAAAQAAACQAAAAEAAAAAQAAACYAAAAFAAAAAQAAACcAAAAEAAAAAQAAACkAAAAFAAAAAQAAACoAAAAEAAAAAQAAACwAAAAFAAAAAQAAAC0AAAACAAAAAQAAAC4AAAAEAAAAAQAAAC8AAAAFAAAAAQAAADAAAAAEAAAAAQAAADIAAAAFAAAAAQAAADMAAAAEAAAAAQAAA1xzdHN6AAAAAAAAAAAAAADSAAAAFQAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAA3HN0Y28AAAAAAAAAMwAAADAAAAOtAAADzAAAA+cAAAQCAAAEIQAABDwAAARXAAAEdgAABJEAAASsAAAEywAABOIAAAT5AAAFGAAABTMAAAVOAAAFbQAABYgAAAWjAAAFwgAABd0AAAX4AAAGDwAABioAAAZFAAAGZAAABn8AAAaaAAAGuQAABtQAAAbvAAAHDgAABykAAAc8AAAHWwAAB3YAAAeRAAAHsAAAB8sAAAfmAAAIBQAACCAAAAg7AAAIWgAACG0AAAiIAAAIpwAACMIAAAjdAAAI/AAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAADSAAAAAQAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTguMjAuMTAw"),Object.assign(this.noSleepVideo.style,{position:"absolute",left:"-100%",top:"-100%"}),document.querySelector("body").append(this.noSleepVideo),this.handleNoSleepVideoTimeUpdate=()=>{this.noSleepVideo&&this.noSleepVideo.currentTime>4&&(this.noSleepVideo.currentTime=1)},this.noSleepVideo.addEventListener("timeupdate",this.handleNoSleepVideoTimeUpdate))}destroy(){if(this._wakeLock&&(this._wakeLock.release(),this._wakeLock=null),this.noSleepVideo){this.handleNoSleepVideoTimeUpdate&&this.noSleepVideo.removeEventListener("timeupdate",this.handleNoSleepVideoTimeUpdate);try{this.noSleepVideo.parentNode&&this.noSleepVideo.parentNode.removeChild(this.noSleepVideo)}catch(e){this.player.debug.warn("NoSleep","Failed to remove noSleepVideo element.")}this.noSleepVideo=null}this.handleVisibilityChange&&(document.removeEventListener("visibilitychange",this.handleVisibilityChange),document.removeEventListener("fullscreenchange",this.handleVisibilityChange))}_addSourceToVideo(e,t,i){var s=document.createElement("source");s.src=i,s.type=`video/${t}`,e.appendChild(s)}get isEnabled(){return this.enabled}enable(){const e=this.player.debug;if(fh())return navigator.wakeLock.request("screen").then((t=>{this._wakeLock=t,this.enabled=!0,e.log("wakeLock","Wake Lock active."),this._wakeLock.addEventListener("release",(()=>{e.log("wakeLock","Wake Lock released.")}))})).catch((t=>{throw this.enabled=!1,e.warn("wakeLock",`${t.name}, ${t.message}`),t}));return this.noSleepVideo.play().then((t=>(e.log("wakeLock","noSleepVideo Wake Lock active."),this.enabled=!0,t))).catch((t=>{throw e.warn("wakeLock",`noSleepVideo ${t.name}, ${t.message}`),this.enabled=!1,t}))}disable(){fh()?(this._wakeLock&&this._wakeLock.release(),this._wakeLock=null):this.noSleepVideo&&this.noSleepVideo.pause(),this.enabled=!1,this.player.debug.log("wakeLock","Disabling wake lock.")}}function gh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yh={exports:{}};!function(e,t){var i,s,r,a,o;i=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,s=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(e,t,i){if(i=i||{},e=e.trim(),!(t=t.trim())){if(!i.alwaysNormalize)return e;var r=o.parseURL(e);if(!r)throw new Error("Error trying to parse base URL.");return r.path=o.normalizePath(r.path),o.buildURLFromParts(r)}var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return i.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):t;var n=o.parseURL(e);if(!n)throw new Error("Error trying to parse base URL.");if(!n.netLoc&&n.path&&"/"!==n.path[0]){var l=s.exec(n.path);n.netLoc=l[1],n.path=l[2]}n.netLoc&&!n.path&&(n.path="/");var h={scheme:n.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(h.netLoc=n.netLoc,"/"!==a.path[0]))if(a.path){var d=n.path,c=d.substring(0,d.lastIndexOf("/")+1)+a.path;h.path=o.normalizePath(c)}else h.path=n.path,a.params||(h.params=n.params,a.query||(h.query=n.query));return null===h.path&&(h.path=i.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(h)},parseURL:function(e){var t=i.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=o}(yh);var Ah=yh.exports;function bh(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function vh(e){for(var t=1;t`):Ch}(t)}))}const Lh=xh,Ih=/^(\d+)x(\d+)$/,Ph=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Bh{constructor(e){"string"==typeof e&&(e=Bh.parseAttrList(e));for(const t in e)e.hasOwnProperty(t)&&("X-"===t.substring(0,2)&&(this.clientAttrs=this.clientAttrs||[],this.clientAttrs.push(t)),this[t]=e[t])}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;const i=new Uint8Array(t.length/2);for(let e=0;eNumber.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const i=this[e];return i?parseFloat(i):t}enumeratedString(e){return this[e]}bool(e){return"YES"===this[e]}decimalResolution(e){const t=Ih.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const i={};for(Ph.lastIndex=0;null!==(t=Ph.exec(e));){let e=t[2];0===e.indexOf('"')&&e.lastIndexOf('"')===e.length-1&&(e=e.slice(1,-1));i[t[1].trim()]=e}return i}}function Mh(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e}class Uh{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const i=t.attr;for(const t in i)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t]!==i[t]){Lh.warn(`DATERANGE tag attribute: "${t}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=t;break}e=wh(new Bh({}),i,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const e=new Date(this.attr["END-DATE"]);Sh(e.getTime())&&(this._endDate=e)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(Sh(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&Sh(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class Fh{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var Oh="audio",Nh="video",jh="audiovideo";class zh{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[Oh]:null,[Nh]:null,[jh]:null},this.baseurl=e}setByteRange(e,t){const i=e.split("@",2),s=[];1===i.length?s[0]=t?t.byteRangeEndOffset:0:s[0]=parseInt(i[1]),s[1]=parseInt(i[0])+s[0],this._byteRange=s}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Ah.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class Gh extends zh{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new Fh,this.urlId=0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{const e=Object.keys(this.levelkeys);if(1===e.length)return this._decryptdata=this.levelkeys[e[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(null===this.programDateTime)return null;if(!Sh(this.programDateTime))return null;const e=Sh(this.duration)?this.duration:0;return this.programDateTime+1e3*e}get encrypted(){var e;if(null!=(e=this._decryptdata)&&e.encrypted)return!0;if(this.levelkeys){const e=Object.keys(this.levelkeys),t=e.length;if(t>1||1===t&&this.levelkeys[e[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;null==(e=this.loader)||e.abort(),null==(t=this.keyLoader)||t.abort()}setElementaryStreamInfo(e,t,i,s,r,a=!1){const{elementaryStreams:o}=this,n=o[e];n?(n.startPTS=Math.min(n.startPTS,t),n.endPTS=Math.max(n.endPTS,i),n.startDTS=Math.min(n.startDTS,s),n.endDTS=Math.max(n.endDTS,r)):o[e]={startPTS:t,endPTS:i,startDTS:s,endDTS:r,partial:a}}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[Oh]=null,e[Nh]=null,e[jh]=null}}class Vh extends zh{constructor(e,t,i,s,r){super(i),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new Fh,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=s;const a=e.enumeratedString("BYTERANGE");a&&this.setByteRange(a,r),r&&(this.fragOffset=r.fragOffset+r.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}class Hh{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e)return this.advanced=!0,void(this.updated=!0);const t=this.lastPartSn-e.lastPartSn,i=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!i||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||0===t&&i>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return!!this.fragments.length&&Sh(this.fragments[this.fragments.length-1].programDateTime)}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||10}get drift(){const e=this.driftEndTime-this.driftStartTime;if(e>0){return 1e3*(this.driftEnd-this.driftStart)/e}return 1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return null!=(e=this.fragments)&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function Wh(e){return Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))}function $h(e){const t=e.split(":");let i=null;if("data"===t[0]&&2===t.length){const e=t[1].split(";"),s=e[e.length-1].split(",");if(2===s.length){const t="base64"===s[0],r=s[1];t?(e.splice(-1,1),i=Wh(r)):i=function(e){const t=Jh(e).subarray(0,16),i=new Uint8Array(16);return i.set(t,16-t.length),i}(r)}}return i}function Jh(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(e=>e.charCodeAt(0)))}var Kh={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},qh="org.w3.clearkey",Yh="com.apple.streamingkeydelivery",Qh="com.microsoft.playready",Xh="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function Zh(e){switch(e){case Yh:return Kh.FAIRPLAY;case Qh:return Kh.PLAYREADY;case Xh:return Kh.WIDEVINE;case qh:return Kh.CLEARKEY}}var ed="edef8ba979d64acea3c827dcd51d21ed";function td(e){switch(e){case Kh.FAIRPLAY:return Yh;case Kh.PLAYREADY:return Qh;case Kh.WIDEVINE:return Xh;case Kh.CLEARKEY:return qh}}function id(e){const{drmSystems:t,widevineLicenseUrl:i}=e,s=t?[Kh.FAIRPLAY,Kh.WIDEVINE,Kh.PLAYREADY,Kh.CLEARKEY].filter((e=>!!t[e])):[];return!s[Kh.WIDEVINE]&&i&&s.push(Kh.WIDEVINE),s}const sd="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;function rd(e,t,i){return Uint8Array.prototype.slice?e.slice(t,i):new Uint8Array(Array.prototype.slice.call(e,t,i))}const ad=(e,t)=>t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,od=(e,t)=>t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128,nd=(e,t)=>{const i=t;let s=0;for(;ad(e,t);){s+=10;s+=ld(e,t+6),od(e,t+10)&&(s+=10),t+=s}if(s>0)return e.subarray(i,i+s)},ld=(e,t)=>{let i=0;return i=(127&e[t])<<21,i|=(127&e[t+1])<<14,i|=(127&e[t+2])<<7,i|=127&e[t+3],i},hd=(e,t)=>ad(e,t)&&ld(e,t+6)+10<=e.length-t,dd=e=>e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info,cd=e=>{const t=String.fromCharCode(e[0],e[1],e[2],e[3]),i=ld(e,4);return{type:t,size:i,data:e.subarray(10,10+i)}},ud=e=>{let t=0;const i=[];for(;ad(e,t);){const s=ld(e,t+6);t+=10;const r=t+s;for(;t+8"PRIV"===e.type?fd(e):"W"===e.type[0]?gd(e):md(e),fd=e=>{if(e.size<2)return;const t=Ad(e.data,!0),i=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:i.buffer}},md=e=>{if(e.size<2)return;if("TXXX"===e.type){let t=1;const i=Ad(e.data.subarray(t),!0);t+=i.length+1;const s=Ad(e.data.subarray(t));return{key:e.type,info:i,data:s}}const t=Ad(e.data.subarray(1));return{key:e.type,data:t}},gd=e=>{if("WXXX"===e.type){if(e.size<2)return;let t=1;const i=Ad(e.data.subarray(t),!0);t+=i.length+1;const s=Ad(e.data.subarray(t));return{key:e.type,info:i,data:s}}const t=Ad(e.data);return{key:e.type,data:t}},yd=e=>{if(8===e.data.byteLength){const t=new Uint8Array(e.data),i=1&t[3];let s=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return s/=45,i&&(s+=47721858.84),Math.round(s)}},Ad=(e,t=!1)=>{const i=vd();if(i){const s=i.decode(e);if(t){const e=s.indexOf("\0");return-1!==e?s.substring(0,e):s}return s.replace(/\0/g,"")}const s=e.length;let r,a,o,n="",l=0;for(;l>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=String.fromCharCode(r);break;case 12:case 13:a=e[l++],n+=String.fromCharCode((31&r)<<6|63&a);break;case 14:a=e[l++],o=e[l++],n+=String.fromCharCode((15&r)<<12|(63&a)<<6|(63&o)<<0)}}return n};let bd;function vd(){return bd||void 0===self.TextDecoder||(bd=new self.TextDecoder("utf-8")),bd}const _d=function(e){let t="";for(let i=0;i>24,e[t+1]=i>>16&255,e[t+2]=i>>8&255,e[t+3]=255&i}function Dd(e,t){const i=[];if(!t.length)return i;const s=e.byteLength;for(let r=0;r1?r+a:s;if(Ed(e.subarray(r+4,r+8))===t[0])if(1===t.length)i.push(e.subarray(r+8,o));else{const s=Dd(e.subarray(r+8,o),t.slice(1));s.length&&Sd.apply(i,s)}r=o}return i}function Ld(e){const t=[],i=e[0];let s=8;const r=Cd(e,s);s+=4;s+=0===i?8:16,s+=2;let a=e.length+0;const o=kd(e,s);s+=2;for(let i=0;i>>31)return Lh.warn("SIDX has hierarchical references (not supported)"),null;const l=Cd(e,i);i+=4,t.push({referenceSize:n,subsegmentDuration:l,info:{duration:l/r,start:a,end:a+n-1}}),a+=n,i+=4,s=i}return{earliestPresentationTime:0,timescale:r,version:i,referencesCount:o,references:t}}function Id(e){const t=[],i=Dd(e,["moov","trak"]);for(let e=0;e{const i=Cd(e,4),s=t[i];s&&(s.default={duration:Cd(e,12),flags:Cd(e,20)})})),t}function Pd(e){const t=Dd(e,["schm"])[0];if(t){const i=Ed(t.subarray(4,8));if("cbcs"===i||"cenc"===i)return Dd(e,["schi","tenc"])[0]}return Lh.error("[eme] missing 'schm' box"),null}function Bd(e){const t=Cd(e,0);let i=8;1&t&&(i+=4),4&t&&(i+=4);let s=0;const r=Cd(e,4);for(let a=0;a{const l=n.byteOffset-8;Dd(n,["traf"]).map((n=>{const h=Dd(n,["tfdt"]).map((e=>{const t=e[0];let i=Cd(e,4);return 1===t&&(i*=Math.pow(2,32),i+=Cd(e,8)),i/r}))[0];return void 0!==h&&(e=h),Dd(n,["tfhd"]).map((h=>{const d=Cd(h,4),c=16777215&Cd(h,0);let u=0;const p=0!=(16&c);let f=0;const m=0!=(32&c);let g=8;d===a&&(0!=(1&c)&&(g+=8),0!=(2&c)&&(g+=4),0!=(8&c)&&(u=Cd(h,g),g+=4),p&&(f=Cd(h,g),g+=4),m&&(g+=4),"video"===t.type&&(o=function(e){if(!e)return!1;const t=e.indexOf("."),i=t<0?e:e.substring(0,t);return"hvc1"===i||"hev1"===i||"dvh1"===i||"dvhe"===i}(t.codec)),Dd(n,["trun"]).map((a=>{const n=a[0],h=16777215&Cd(a,0),d=0!=(1&h);let c=0;const p=0!=(4&h),m=0!=(256&h);let g=0;const y=0!=(512&h);let A=0;const b=0!=(1024&h),v=0!=(2048&h);let _=0;const w=Cd(a,4);let S=8;d&&(c=Cd(a,S),S+=4),p&&(S+=4);let T=c+l;for(let l=0;l>1&63;return 39===e||40===e}return 6===(31&t)}function Od(e,t,i,s){const r=Nd(e);let a=0;a+=t;let o=0,n=0,l=!1,h=0;for(;a=r.length)break;h=r[a++],o+=h}while(255===h);n=0;do{if(a>=r.length)break;h=r[a++],n+=h}while(255===h);const e=r.length-a;if(!l&&4===o&&a16){const e=[];for(let t=0;t<16;t++){const i=r[a++].toString(16);e.push(1==i.length?"0"+i:i),3!==t&&5!==t&&7!==t&&9!==t||e.push("-")}const t=n-16,l=new Uint8Array(t);for(let e=0;ee)break}}function Nd(e){const t=e.byteLength,i=[];let s=1;for(;s0?(a=new Uint8Array(4),t.length>0&&new DataView(a.buffer).setUint32(0,t.length,!1)):a=new Uint8Array;const o=new Uint8Array(4);return i&&i.byteLength>0&&new DataView(o.buffer).setUint32(0,i.byteLength,!1),function(e,...t){const i=t.length;let s=8,r=i;for(;r--;)s+=t[r].byteLength;const a=new Uint8Array(s);for(a[0]=s>>24&255,a[1]=s>>16&255,a[2]=s>>8&255,a[3]=255&s,a.set(e,4),r=0,s=8;r>8*(15-i)&255;return t}(e);return new Gd(this.method,this.uri,"identity",this.keyFormatVersions,t)}const t=$h(this.uri);if(t)switch(this.keyFormat){case Xh:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case Qh:{const e=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=jd(e,null,t);const i=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),s=String.fromCharCode.apply(null,Array.from(i)),r=s.substring(s.indexOf("<"),s.length),a=(new DOMParser).parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(a){const e=a.childNodes[0]?a.childNodes[0].nodeValue:a.getAttribute("VALUE");if(e){const t=Wh(e).subarray(0,16);!function(e){const t=function(e,t,i){const s=e[t];e[t]=e[i],e[i]=s};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}(t),this.keyId=t}}break}default:{let e=t.subarray(0,16);if(16!==e.length){const t=new Uint8Array(16);t.set(e,16-e.length),e=t}this.keyId=e;break}}if(!this.keyId||16!==this.keyId.byteLength){let e=zd[this.uri];if(!e){const t=Object.keys(zd).length%Number.MAX_SAFE_INTEGER;e=new Uint8Array(16);new DataView(e.buffer,12,4).setUint32(0,t),zd[this.uri]=e}this.keyId=e}return this}}const Vd=/\{\$([a-zA-Z0-9-_]+)\}/g;function Hd(e){return Vd.test(e)}function Wd(e,t,i){if(null!==e.variableList||e.hasVariableRefs)for(let s=i.length;s--;){const r=i[s],a=t[r];a&&(t[r]=$d(e,a))}}function $d(e,t){if(null!==e.variableList||e.hasVariableRefs){const i=e.variableList;return t.replace(Vd,(t=>{const s=t.substring(2,t.length-1),r=null==i?void 0:i[s];return void 0===r?(e.playlistParsingError||(e.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${s}"`)),t):r}))}return t}function Jd(e,t,i){let s,r,a=e.variableList;if(a||(e.variableList=a={}),"QUERYPARAM"in t){s=t.QUERYPARAM;try{const e=new self.URL(i).searchParams;if(!e.has(s))throw new Error(`"${s}" does not match any query parameter in URI: "${i}"`);r=e.get(s)}catch(t){e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${t.message}`))}}else s=t.NAME,r=t.VALUE;s in a?e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${s}"`)):a[s]=r||""}function Kd(e,t,i){const s=t.IMPORT;if(i&&s in i){let t=e.variableList;t||(e.variableList=t={}),t[s]=i[s]}else e.playlistParsingError||(e.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${s}"`))}function qd(){if("undefined"!=typeof self)return self.MediaSource||self.WebKitMediaSource}const Yd={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}},Qd=qd();function Xd(e,t){var i;return null!=(i=null==Qd?void 0:Qd.isTypeSupported(`${t||"video"}/mp4;codecs="${e}"`))&&i}const Zd=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,ec=/#EXT-X-MEDIA:(.*)/g,tc=/^#EXT(?:INF|-X-TARGETDURATION):/m,ic=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),sc=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class rc{static findGroup(e,t){for(let i=0;i2){let e=t.shift()+".";return e+=parseInt(t.shift()).toString(16),e+=("000"+parseInt(t.shift()).toString(16)).slice(-4),e}return e}static resolve(e,t){return Ah.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return tc.test(e)}static parseMasterPlaylist(e,t){const i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:Hd(e)},s=[];let r;for(Zd.lastIndex=0;null!=(r=Zd.exec(e));)if(r[1]){var a;const e=new Bh(r[1]);Wd(i,e,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const o=$d(i,r[2]),n={attrs:e,bitrate:e.decimalInteger("AVERAGE-BANDWIDTH")||e.decimalInteger("BANDWIDTH"),name:e.NAME,url:rc.resolve(o,t)},l=e.decimalResolution("RESOLUTION");l&&(n.width=l.width,n.height=l.height),nc((e.CODECS||"").split(/[ ,]+/).filter((e=>e)),n),n.videoCodec&&-1!==n.videoCodec.indexOf("avc1")&&(n.videoCodec=rc.convertAVC1ToAVCOTI(n.videoCodec)),null!=(a=n.unknownCodecs)&&a.length||s.push(n),i.levels.push(n)}else if(r[3]){const e=r[3],s=r[4];switch(e){case"SESSION-DATA":{const e=new Bh(s);Wd(i,e,["DATA-ID","LANGUAGE","VALUE","URI"]);const t=e["DATA-ID"];t&&(null===i.sessionData&&(i.sessionData={}),i.sessionData[t]=e);break}case"SESSION-KEY":{const e=ac(s,t,i);e.encrypted&&e.isSupported()?(null===i.sessionKeys&&(i.sessionKeys=[]),i.sessionKeys.push(e)):Lh.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${s}"`);break}case"DEFINE":{const e=new Bh(s);Wd(i,e,["NAME","VALUE","QUERYPARAM"]),Jd(i,e,t)}break;case"CONTENT-STEERING":{const e=new Bh(s);Wd(i,e,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:rc.resolve(e["SERVER-URI"],t),pathwayId:e["PATHWAY-ID"]||"."};break}case"START":i.startTimeOffset=oc(s)}}const o=s.length>0&&s.length({id:e.attrs.AUDIO,audioCodec:e.audioCodec}))),SUBTITLES:a.map((e=>({id:e.attrs.SUBTITLES,textCodec:e.textCodec}))),"CLOSED-CAPTIONS":[]};let n=0;for(ec.lastIndex=0;null!==(s=ec.exec(e));){const e=new Bh(s[1]),a=e.TYPE;if(a){const s=o[a],l=r[a]||[];r[a]=l,Wd(i,e,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const h={attrs:e,bitrate:0,id:n++,groupId:e["GROUP-ID"]||"",instreamId:e["INSTREAM-ID"],name:e.NAME||e.LANGUAGE||"",type:a,default:e.bool("DEFAULT"),autoselect:e.bool("AUTOSELECT"),forced:e.bool("FORCED"),lang:e.LANGUAGE,url:e.URI?rc.resolve(e.URI,t):""};if(null!=s&&s.length){const e=rc.findGroup(s,h.groupId)||s[0];lc(h,e,"audioCodec"),lc(h,e,"textCodec")}l.push(h)}}return r}static parseLevelPlaylist(e,t,i,s,r,a){const o=new Hh(t),n=o.fragments;let l,h,d,c=null,u=0,p=0,f=0,m=0,g=null,y=new Gh(s,t),A=-1,b=!1;for(ic.lastIndex=0,o.m3u8=e,o.hasVariableRefs=Hd(e);null!==(l=ic.exec(e));){b&&(b=!1,y=new Gh(s,t),y.start=f,y.sn=u,y.cc=m,y.level=i,c&&(y.initSegment=c,y.rawProgramDateTime=c.rawProgramDateTime,c.rawProgramDateTime=null));const e=l[1];if(e){y.duration=parseFloat(e);const t=(" "+l[2]).slice(1);y.title=t||null,y.tagList.push(t?["INF",e,t]:["INF",e])}else if(l[3]){if(Sh(y.duration)){y.start=f,d&&cc(y,d,o),y.sn=u,y.level=i,y.cc=m,y.urlId=r,n.push(y);const e=(" "+l[3]).slice(1);y.relurl=$d(o,e),hc(y,g),g=y,f+=y.duration,u++,p=0,b=!0}}else if(l[4]){const e=(" "+l[4]).slice(1);g?y.setByteRange(e,g):y.setByteRange(e)}else if(l[5])y.rawProgramDateTime=(" "+l[5]).slice(1),y.tagList.push(["PROGRAM-DATE-TIME",y.rawProgramDateTime]),-1===A&&(A=n.length);else{if(l=l[0].match(sc),!l){Lh.warn("No matches on slow regex match for level playlist!");continue}for(h=1;h0&&e.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=e.optionalFloat("PART-HOLD-BACK",0),o.holdBack=e.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const e=new Bh(r);o.partTarget=e.decimalFloatingPoint("PART-TARGET");break}case"PART":{let e=o.partList;e||(e=o.partList=[]);const i=p>0?e[e.length-1]:void 0,s=p++,a=new Bh(r);Wd(o,a,["BYTERANGE","URI"]);const n=new Vh(a,y,t,s,i);e.push(n),y.duration+=n.duration;break}case"PRELOAD-HINT":{const e=new Bh(r);Wd(o,e,["URI"]),o.preloadHint=e;break}case"RENDITION-REPORT":{const e=new Bh(r);Wd(o,e,["URI"]),o.renditionReports=o.renditionReports||[],o.renditionReports.push(e);break}default:Lh.warn(`line parsed but not handled: ${l}`)}}}g&&!g.relurl?(n.pop(),f-=g.duration,o.partList&&(o.fragmentHint=g)):o.partList&&(hc(y,g),y.cc=m,o.fragmentHint=y,d&&cc(y,d,o));const v=n.length,_=n[0],w=n[v-1];if(f+=o.skippedSegments*o.targetduration,f>0&&v&&w){o.averagetargetduration=f/v;const e=w.sn;o.endSN="initSegment"!==e?e:0,o.live||(w.endList=!0),_&&(o.startCC=_.cc)}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(f+=o.fragmentHint.duration),o.totalduration=f,o.endCC=m,A>0&&function(e,t){let i=e[t];for(let s=t;s--;){const t=e[s];if(!t)return;t.programDateTime=i.programDateTime-1e3*t.duration,i=t}}(n,A),o}}function ac(e,t,i){var s,r;const a=new Bh(e);Wd(i,a,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const o=null!=(s=a.METHOD)?s:"",n=a.URI,l=a.hexadecimalInteger("IV"),h=a.KEYFORMATVERSIONS,d=null!=(r=a.KEYFORMAT)?r:"identity";n&&a.IV&&!l&&Lh.error(`Invalid IV: ${a.IV}`);const c=n?rc.resolve(n,t):"",u=(h||"1").split("/").map(Number).filter(Number.isFinite);return new Gd(o,c,d,u,l)}function oc(e){const t=new Bh(e).decimalFloatingPoint("TIME-OFFSET");return Sh(t)?t:null}function nc(e,t){["video","audio","text"].forEach((i=>{const s=e.filter((e=>function(e,t){const i=Yd[t];return!!i&&!0===i[e.slice(0,4)]}(e,i)));if(s.length){const r=s.filter((e=>0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)));t[`${i}Codec`]=r.length>0?r[0]:s[0],e=e.filter((e=>-1===s.indexOf(e)))}})),t.unknownCodecs=e}function lc(e,t,i){const s=t[i];s&&(e[i]=s)}function hc(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),Sh(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function dc(e,t,i,s){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=i,e.sn="initSegment",s&&(e.levelkeys=s),e.initSegment=null}function cc(e,t,i){e.levelkeys=t;const{encryptedFragments:s}=i;s.length&&s[s.length-1].levelkeys===t||!Object.keys(t).some((e=>t[e].isCommonEncryption))||s.push(e)}var uc="manifest",pc="level",fc="audioTrack",mc="subtitleTrack",gc="main",yc="audio",Ac="subtitle";function bc(e){const{type:t}=e;switch(t){case fc:return yc;case mc:return Ac;default:return gc}}function vc(e,t){let i=e.url;return void 0!==i&&0!==i.indexOf("data:")||(i=t.url),i}class _c{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Th.LEVEL_LOADING,this.onLevelLoading,this),e.on(Th.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(Th.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Th.LEVEL_LOADING,this.onLevelLoading,this),e.off(Th.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(Th.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,i=t.pLoader,s=t.loader,r=new(i||s)(t);return this.loaders[e.type]=r,r}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:i}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:uc,url:i,deliveryDirectives:null})}onLevelLoading(e,t){const{id:i,level:s,url:r,deliveryDirectives:a}=t;this.load({id:i,level:s,responseType:"text",type:pc,url:r,deliveryDirectives:a})}onAudioTrackLoading(e,t){const{id:i,groupId:s,url:r,deliveryDirectives:a}=t;this.load({id:i,groupId:s,level:null,responseType:"text",type:fc,url:r,deliveryDirectives:a})}onSubtitleTrackLoading(e,t){const{id:i,groupId:s,url:r,deliveryDirectives:a}=t;this.load({id:i,groupId:s,level:null,responseType:"text",type:mc,url:r,deliveryDirectives:a})}load(e){var t;const i=this.hls.config;let s,r=this.getInternalLoader(e);if(r){const t=r.context;if(t&&t.url===e.url)return void Lh.trace("[playlist-loader]: playlist request ongoing");Lh.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}if(s=e.type===uc?i.manifestLoadPolicy.default:wh({},i.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),null!=(t=e.deliveryDirectives)&&t.part){let t;if(e.type===pc&&null!==e.level?t=this.hls.levels[e.level].details:e.type===fc&&null!==e.id?t=this.hls.audioTracks[e.id].details:e.type===mc&&null!==e.id&&(t=this.hls.subtitleTracks[e.id].details),t){const e=t.partTarget,i=t.targetduration;if(e&&i){const t=1e3*Math.max(3*e,.8*i);s=wh({},s,{maxTimeToFirstByteMs:Math.min(t,s.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(t,s.maxTimeToFirstByteMs)})}}}const a=s.errorRetry||s.timeoutRetry||{},o={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},n={onSuccess:(e,t,i,s)=>{const r=this.getInternalLoader(i);this.resetInternalLoader(i.type);const a=e.data;0===a.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),rc.isMediaPlaylist(a)?this.handleTrackOrLevelPlaylist(e,t,i,s||null,r):this.handleMasterPlaylist(e,t,i,s)):this.handleManifestParsingError(e,i,new Error("no EXTM3U delimiter"),s||null,t)},onError:(e,t,i,s)=>{this.handleNetworkError(t,i,!1,e,s)},onTimeout:(e,t,i)=>{this.handleNetworkError(t,i,!0,void 0,e)}};r.load(e,o,n)}handleMasterPlaylist(e,t,i,s){const r=this.hls,a=e.data,o=vc(e,i),n=rc.parseMasterPlaylist(a,o);if(n.playlistParsingError)return void this.handleManifestParsingError(e,i,n.playlistParsingError,s,t);const{contentSteering:l,levels:h,sessionData:d,sessionKeys:c,startTimeOffset:u,variableList:p}=n;this.variableList=p;const{AUDIO:f=[],SUBTITLES:m,"CLOSED-CAPTIONS":g}=rc.parseMasterPlaylistMedia(a,o,n);if(f.length){f.some((e=>!e.url))||!h[0].audioCodec||h[0].attrs.AUDIO||(Lh.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Bh({}),bitrate:0,url:""}))}r.trigger(Th.MANIFEST_LOADED,{levels:h,audioTracks:f,subtitles:m,captions:g,contentSteering:l,url:o,stats:t,networkDetails:s,sessionData:d,sessionKeys:c,startTimeOffset:u,variableList:p})}handleTrackOrLevelPlaylist(e,t,i,s,r){const a=this.hls,{id:o,level:n,type:l}=i,h=vc(e,i),d=Sh(o)?o:0,c=Sh(n)?n:d,u=bc(i),p=rc.parseLevelPlaylist(e.data,h,c,u,d,this.variableList);if(l===uc){const e={attrs:new Bh({}),bitrate:0,details:p,name:"",url:h};a.trigger(Th.MANIFEST_LOADED,{levels:[e],audioTracks:[],url:h,stats:t,networkDetails:s,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),i.levelDetails=p,this.handlePlaylistLoaded(p,e,t,i,s,r)}handleManifestParsingError(e,t,i,s,r){this.hls.trigger(Th.ERROR,{type:Eh.NETWORK_ERROR,details:kh.MANIFEST_PARSING_ERROR,fatal:t.type===uc,url:e.url,err:i,error:i,reason:i.message,response:e,context:t,networkDetails:s,stats:r})}handleNetworkError(e,t,i=!1,s,r){let a=`A network ${i?"timeout":"error"+(s?" (status "+s.code+")":"")} occurred while loading ${e.type}`;e.type===pc?a+=`: ${e.level} id: ${e.id}`:e.type!==fc&&e.type!==mc||(a+=` id: ${e.id} group-id: "${e.groupId}"`);const o=new Error(a);Lh.warn(`[playlist-loader]: ${a}`);let n=kh.UNKNOWN,l=!1;const h=this.getInternalLoader(e);switch(e.type){case uc:n=i?kh.MANIFEST_LOAD_TIMEOUT:kh.MANIFEST_LOAD_ERROR,l=!0;break;case pc:n=i?kh.LEVEL_LOAD_TIMEOUT:kh.LEVEL_LOAD_ERROR,l=!1;break;case fc:n=i?kh.AUDIO_TRACK_LOAD_TIMEOUT:kh.AUDIO_TRACK_LOAD_ERROR,l=!1;break;case mc:n=i?kh.SUBTITLE_TRACK_LOAD_TIMEOUT:kh.SUBTITLE_LOAD_ERROR,l=!1}h&&this.resetInternalLoader(e.type);const d={type:Eh.NETWORK_ERROR,details:n,fatal:l,url:e.url,loader:h,context:e,error:o,networkDetails:t,stats:r};if(s){const i=(null==t?void 0:t.url)||e.url;d.response=vh({url:i,data:void 0},s)}this.hls.trigger(Th.ERROR,d)}handlePlaylistLoaded(e,t,i,s,r,a){const o=this.hls,{type:n,level:l,id:h,groupId:d,deliveryDirectives:c}=s,u=vc(t,s),p=bc(s),f="number"==typeof s.level&&p===gc?l:void 0;if(!e.fragments.length){const e=new Error("No Segments found in Playlist");return void o.trigger(Th.ERROR,{type:Eh.NETWORK_ERROR,details:kh.LEVEL_EMPTY_ERROR,fatal:!1,url:u,error:e,reason:e.message,response:t,context:s,level:f,parent:p,networkDetails:r,stats:i})}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const m=e.playlistParsingError;if(m)o.trigger(Th.ERROR,{type:Eh.NETWORK_ERROR,details:kh.LEVEL_PARSING_ERROR,fatal:!1,url:u,error:m,reason:m.message,response:t,context:s,level:f,parent:p,networkDetails:r,stats:i});else switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),a.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),n){case uc:case pc:o.trigger(Th.LEVEL_LOADED,{details:e,level:f||0,id:h||0,stats:i,networkDetails:r,deliveryDirectives:c});break;case fc:o.trigger(Th.AUDIO_TRACK_LOADED,{details:e,id:h||0,groupId:d||"",stats:i,networkDetails:r,deliveryDirectives:c});break;case mc:o.trigger(Th.SUBTITLE_TRACK_LOADED,{details:e,id:h||0,groupId:d||"",stats:i,networkDetails:r,deliveryDirectives:c})}}}function wc(e,t){let i;try{i=new Event("addtrack")}catch(e){i=document.createEvent("Event"),i.initEvent("addtrack",!1,!1)}i.track=e,t.dispatchEvent(i)}function Sc(e,t){const i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error(`addCue is failed for: ${t}`)}catch(i){Lh.debug(`[texttrack-utils]: ${i}`);try{const i=new self.TextTrackCue(t.startTime,t.endTime,t.text);i.id=t.id,e.addCue(i)}catch(e){Lh.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${e}`)}}"disabled"===i&&(e.mode=i)}function Tc(e){const t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(let t=e.cues.length;t--;)e.removeCue(e.cues[t]);"disabled"===t&&(e.mode=t)}function Ec(e,t,i,s){const r=e.mode;if("disabled"===r&&(e.mode="hidden"),e.cues&&e.cues.length>0){const r=function(e,t,i){const s=[],r=function(e,t){if(te[i].endTime)return-1;let s=0,r=i;for(;s<=r;){const a=Math.floor((r+s)/2);if(te[a].startTime&&s-1)for(let a=r,o=e.length;a=t&&r.endTime<=i)s.push(r);else if(r.startTime>i)return s}return s}(e.cues,t,i);for(let t=0;t{const e=xc();try{new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Lc(e,t){return e.getTime()/1e3-t}class Ic{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(Th.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Th.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Th.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(Th.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Th.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(Th.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Th.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Th.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(Th.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Th.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(Tc(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;tDc&&(s=Dc);s-i<=0&&(s=i+.25);for(let e=0;ee.type===kc&&n:"video"===s?e=>e.type===Rc&&o:e=>e.type===kc&&n||e.type===Rc&&o,Ec(r,t,i,e)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:i,id3Track:s}=this,{dateRanges:r}=t,a=Object.keys(r);if(s){const e=Object.keys(i).filter((e=>!a.includes(e)));for(let t=e.length;t--;){const r=e[t];Object.keys(i[r].cues).forEach((e=>{s.removeCue(i[r].cues[e])})),delete i[r]}}const o=t.fragments[t.fragments.length-1];if(0===a.length||!Sh(null==o?void 0:o.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const n=o.programDateTime/1e3-o.start,l=xc();for(let e=0;e{const i=r[t];return i.class===s.class&&i.id!==t&&i.startDate>s.startDate&&e.push(i),e}),[]).sort(((e,t)=>e.startDate.getTime()-t.startDate.getTime()))[0];e&&(f=Lc(e.startDate,n),u=!0)}const g=Object.keys(s.attr);for(let e=0;ethis.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(null===e)return null;const{holdBack:t,partHoldBack:i,targetduration:s}=e,{liveSyncDuration:r,liveSyncDurationCount:a,lowLatencyMode:o}=this.config,n=this.hls.userConfig;let l=o&&i||t;(n.liveSyncDuration||n.liveSyncDurationCount||0===l)&&(l=void 0!==r?r:a*s);const h=s;return l+Math.min(1*this.stallCount,h)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,i=this.levelDetails;if(null===e||null===t||null===i)return null;const s=i.edge,r=e-t-this.edgeStalled,a=s-i.totalduration,o=s-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(a,r),o)}get drift(){const{levelDetails:e}=this;return null===e?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(null===e)return 0;const t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const i=e.buffered.length;return(i?e.buffered.end(i-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(Th.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Th.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(Th.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(Th.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(Th.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(Th.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Th.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(Th.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(Th.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(Th.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var i;t.details===kh.BUFFER_STALLED_ERROR&&(this.stallCount++,null!=(i=this.levelDetails)&&i.live&&Lh.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const i=this.computeLatency();if(null===i)return;this._latency=i;const{lowLatencyMode:s,maxLiveSyncPlaybackRate:r}=this.config;if(!s||1===r)return;const a=this.targetLatency;if(null===a)return;const o=i-a,n=o.05&&this.forwardBufferLength>1){const t=Math.min(2,Math.max(1,r)),i=Math.round(2/(1+Math.exp(-.75*o-this.edgeStalled))*20)/20;e.playbackRate=Math.min(t,Math.max(1,i))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return null===e?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return null===e?null:e-this.currentTime}}const Bc=["NONE","TYPE-0","TYPE-1",null];var Mc="",Uc="YES",Fc="v2";class Oc{constructor(e,t,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=i}addDirectives(e){const t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Nc{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.unknownCodecs=e.unknownCodecs,this.codecSet=[e.videoCodec,e.audioCodec].filter((e=>e)).join(",").replace(/\.[^.,]+/g,"")}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get attrs(){return this._attrs[this._urlId]}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get uri(){return this.url[this._urlId]||""}get urlId(){return this._urlId}set urlId(e){const t=e%this.url.length;this._urlId!==t&&(this.fragmentError=0,this.loadError=0,this.details=void 0,this._urlId=t)}get audioGroupId(){var e;return null==(e=this.audioGroupIds)?void 0:e[this.urlId]}get textGroupId(){var e;return null==(e=this.textGroupIds)?void 0:e[this.urlId]}addFallback(e){this.url.push(e.url),this._attrs.push(e.attrs)}}function jc(e,t){const i=t.startPTS;if(Sh(i)){let s,r=0;t.sn>e.sn?(r=i-e.start,s=e):(r=e.start-i,s=t),s.duration!==r&&(s.duration=r)}else if(t.sn>e.sn){e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration}else t.start=Math.max(e.start-t.duration,0)}function zc(e,t,i,s,r,a){s-i<=0&&(Lh.warn("Fragment should have a positive duration",t),s=i+t.duration,a=r+t.duration);let o=i,n=s;const l=t.startPTS,h=t.endPTS;if(Sh(l)){const e=Math.abs(l-i);Sh(t.deltaPTS)?t.deltaPTS=Math.max(e,t.deltaPTS):t.deltaPTS=e,o=Math.max(i,l),i=Math.min(i,l),r=Math.min(r,t.startDTS),n=Math.min(s,h),s=Math.max(s,h),a=Math.max(a,t.endDTS)}const d=i-t.start;0!==t.start&&(t.start=i),t.duration=s-t.start,t.startPTS=i,t.maxStartPTS=o,t.startDTS=r,t.endPTS=s,t.minEndPTS=n,t.endDTS=a;const c=t.sn;if(!e||ce.endSN)return 0;let u;const p=c-e.startSN,f=e.fragments;for(f[p]=t,u=p;u>0;u--)jc(f[u],f[u-1]);for(u=p;u=0;e--){const t=s[e].initSegment;if(t){i=t;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;let r,a=0;if(function(e,t,i){const s=t.skippedSegments,r=Math.max(e.startSN,t.startSN)-t.startSN,a=(e.fragmentHint?1:0)+(s?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,o=t.startSN-e.startSN,n=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments;for(let e=r;e<=a;e++){const r=l[o+e];let a=n[e];s&&!a&&e{e.relurl&&(a=e.cc-s.cc),Sh(e.startPTS)&&Sh(e.endPTS)&&(s.start=s.startPTS=e.startPTS,s.startDTS=e.startDTS,s.maxStartPTS=e.maxStartPTS,s.endPTS=e.endPTS,s.endDTS=e.endDTS,s.minEndPTS=e.minEndPTS,s.duration=e.endPTS-e.startPTS,s.duration&&(r=s),t.PTSKnown=t.alignedSliding=!0),s.elementaryStreams=e.elementaryStreams,s.loader=e.loader,s.stats=e.stats,s.urlId=e.urlId,e.initSegment&&(s.initSegment=e.initSegment,i=e.initSegment)})),i){(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((e=>{var t;e.initSegment&&e.initSegment.relurl!==(null==(t=i)?void 0:t.relurl)||(e.initSegment=i)}))}if(t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some((e=>!e)),t.deltaUpdateFailed){Lh.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let e=t.skippedSegments;e--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=function(e,t,i){const s=wh({},e);i&&i.forEach((e=>{delete s[e]}));return Object.keys(t).forEach((e=>{const i=new Uh(t[e].attr,s[e]);i.isValid?s[e]=i:Lh.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(t[e].attr)}"`)})),s}(e.dateRanges,t.dateRanges,t.recentlyRemovedDateranges));const o=t.fragments;if(a){Lh.warn("discontinuity sliding from playlist, take drift into account");for(let e=0;e{t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),r?zc(t,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):Vc(e,t),o.length&&(t.totalduration=t.edge-o[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;const n=t.advancedDateTime;if(t.advanced&&n){const e=t.edge;t.driftStart||(t.driftStartTime=n,t.driftStart=e),t.driftEndTime=n,t.driftEnd=e}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function Vc(e,t){const i=t.startSN+t.skippedSegments-e.startSN,s=e.fragments;i<0||i>=s.length||Hc(t,s[i].start)}function Hc(e,t){if(t){const i=e.fragments;for(let s=e.skippedSegments;s499)}(s)||!!i)}const Xc=function(e,t){let i=0,s=e.length-1,r=null,a=null;for(;i<=s;){r=(i+s)/2|0,a=e[r];const o=t(a);if(o>0)i=r+1;else{if(!(o<0))return a;s=r-1}}return null};function Zc(e,t,i=0,s=0){let r=null;if(e?r=t[e.sn-t[0].sn+1]||null:0===i&&0===t[0].start&&(r=t[0]),r&&0===eu(i,s,r))return r;const a=Xc(t,eu.bind(null,i,s));return!a||a===e&&r?r:a}function eu(e=0,t=0,i){if(i.start<=e&&i.start+i.duration>e)return 0;const s=Math.min(t,i.duration+(i.deltaPTS?i.deltaPTS:0));return i.start+i.duration-s<=e?1:i.start-s>e&&i.start?-1:0}function tu(e,t,i){const s=1e3*Math.min(t,i.duration+(i.deltaPTS?i.deltaPTS:0));return(i.endProgramDateTime||0)-s>e}var iu=0,su=2,ru=5,au=0,ou=1,nu=2;function lu(e,t,i){if(performance.now()-e.lastErrorPerfMs>3e5)return!0;const s=e.details;if(t.details===kh.FRAG_GAP&&s&&t.frag){const e=t.frag.start,i=Zc(null,s.fragments,e);if(i&&!i.gap)return!0}if(i&&e.errors.length3*s.targetduration)return!0}return!1}class hu{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=Lh.log.bind(Lh,`${t}:`),this.warn=Lh.warn.bind(Lh,`${t}:`),this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){clearTimeout(this.timer),this.timer=-1}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t){const i=null==t?void 0:t.renditionReports;if(i){let s=-1;for(let r=0;r=0&&e>t.partTarget&&(a+=1)}return new Oc(r,a>=0?a:void 0,Mc)}}}loadPlaylist(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return-1===this.timer&&-1===this.requestScheduled&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,i){const{details:s,stats:r}=t,a=self.performance.now(),o=r.loading.first?Math.max(0,a-r.loading.first):0;if(s.advancedDateTime=Date.now()-o,s.live||null!=i&&i.live){if(s.reloaded(i),i&&this.log(`live playlist ${e} ${s.advanced?"REFRESHED "+s.lastPartSn+"-"+s.lastPartIndex:s.updated?"UPDATED":"MISSED"}`),i&&s.fragments.length>0&&Gc(i,s),!this.canLoad||!s.live)return;let o,n,l;if(s.canBlockReload&&s.endSN&&s.advanced){const e=this.hls.config.lowLatencyMode,r=s.lastPartSn,a=s.endSN,h=s.lastPartIndex,d=r===a,c=e?0:h;-1!==h?(n=d?a+1:r,l=d?c:h+1):n=a+1;const u=s.age,p=u+s.ageHeader;let f=Math.min(p-s.partTarget,1.5*s.targetduration);if(f>0){if(i&&f>i.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${i.tuneInGoal} to: ${f} with playlist age: ${s.age}`),f=0;else{const e=Math.floor(f/s.targetduration);if(n+=e,void 0!==l){l+=Math.round(f%s.targetduration/s.partTarget)}this.log(`CDN Tune-in age: ${s.ageHeader}s last advanced ${u.toFixed(2)}s goal: ${f} skip sn ${e} to part ${l}`)}s.tuneInGoal=f}if(o=this.getDeliveryDirectives(s,t.deliveryDirectives,n,l),e||!d)return void this.loadPlaylist(o)}else(s.canBlockReload||s.canSkipUntil)&&(o=this.getDeliveryDirectives(s,t.deliveryDirectives,n,l));const h=this.hls.mainForwardBufferInfo,d=h?h.end-h.len:0,c=function(e,t=1/0){let i=1e3*e.targetduration;if(e.updated){const s=e.fragments,r=4;if(s.length&&i*r>t){const e=1e3*s[s.length-1].duration;ethis.requestScheduled+c&&(this.requestScheduled=r.loading.start),void 0!==n&&s.canBlockReload?this.requestScheduled=r.loading.first+c-(1e3*s.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+cthis.loadPlaylist(o)),u)}else this.clearTimer()}getDeliveryDirectives(e,t,i,s){let r=function(e,t){const{canSkipUntil:i,canSkipDateRanges:s,endSN:r}=e;return i&&(void 0!==t?t-r:0)=o.maxNumRetry)return!1;if(i&&null!=(l=e.context)&&l.deliveryDirectives)this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const e=qc(o,a);this.timer=self.setTimeout((()=>this.loadPlaylist()),e),this.warn(`Retrying playlist loading ${a+1}/${o.maxNumRetry} after "${t}" in ${e}ms`)}e.levelRetry=!0,s.resolved=!0}return n}}let du;class cu extends hu{constructor(e,t){super(e,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Th.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(Th.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Th.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(Th.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(Th.FRAG_LOADED,this.onFragLoaded,this),e.on(Th.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Th.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(Th.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Th.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(Th.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(Th.FRAG_LOADED,this.onFragLoaded,this),e.off(Th.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}startLoad(){this._levels.forEach((e=>{e.loadError=0,e.fragmentError=0})),super.startLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[]}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const i=[],s={};let r;t.levels.forEach((e=>{var t;const a=e.attrs;-1!==(null==(t=e.audioCodec)?void 0:t.indexOf("mp4a.40.34"))&&(du||(du=/chrome|firefox/i.test(navigator.userAgent)),du&&(e.audioCodec=void 0));const{AUDIO:o,CODECS:n,"FRAME-RATE":l,"PATHWAY-ID":h,RESOLUTION:d,SUBTITLES:c}=a,u=`${`${h||"."}-`}${e.bitrate}-${d}-${l}-${n}`;r=s[u],r?r.addFallback(e):(r=new Nc(e),s[u]=r,i.push(r)),uu(r,"audio",o),uu(r,"text",c)})),this.filterAndSortMediaOptions(i,t)}filterAndSortMediaOptions(e,t){let i=[],s=[],r=!1,a=!1,o=!1,n=e.filter((({audioCodec:e,videoCodec:t,width:i,height:s,unknownCodecs:n})=>(r||(r=!(!i||!s)),a||(a=!!t),o||(o=!!e),!(null!=n&&n.length)&&(!e||Xd(e,"audio"))&&(!t||Xd(t,"video")))));if((r||a)&&o&&(n=n.filter((({videoCodec:e,width:t,height:i})=>!!e||!(!t||!i)))),0===n.length)return void Promise.resolve().then((()=>{if(this.hls){const e=new Error("no level with compatible codecs found in manifest");this.hls.trigger(Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:e,reason:e.message})}}));t.audioTracks&&(i=t.audioTracks.filter((e=>!e.audioCodec||Xd(e.audioCodec,"audio"))),pu(i)),t.subtitles&&(s=t.subtitles,pu(s));const l=n.slice(0);n.sort(((e,t)=>e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"]?(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1:e.bitrate!==t.bitrate?e.bitrate-t.bitrate:e.attrs["FRAME-RATE"]!==t.attrs["FRAME-RATE"]?e.attrs.decimalFloatingPoint("FRAME-RATE")-t.attrs.decimalFloatingPoint("FRAME-RATE"):e.attrs.SCORE!==t.attrs.SCORE?e.attrs.decimalFloatingPoint("SCORE")-t.attrs.decimalFloatingPoint("SCORE"):r&&e.height!==t.height?e.height-t.height:0));let h=l[0];if(this.steering&&(n=this.steering.filterParsedLevels(n),n.length!==l.length))for(let e=0;e!!e.url))};this.hls.trigger(Th.MANIFEST_PARSED,c),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return 0===this._levels.length?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(0===t.length)return;if(e<0||e>=t.length){const i=new Error("invalid level idx"),s=e<0;if(this.hls.trigger(Th.ERROR,{type:Eh.OTHER_ERROR,details:kh.LEVEL_SWITCH_ERROR,level:e,fatal:s,error:i,reason:i.message}),s)return;e=Math.min(e,t.length-1)}const i=this.currentLevelIndex,s=this.currentLevel,r=s?s.attrs["PATHWAY-ID"]:void 0,a=t[e],o=a.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=a,i===e&&a.details&&s&&r===o)return;this.log(`Switching to level ${e}${o?" with Pathway "+o:""} from level ${i}${r?" with Pathway "+r:""}`);const n=wh({},a,{level:e,maxBitrate:a.maxBitrate,attrs:a.attrs,uri:a.uri,urlId:a.urlId});delete n._attrs,delete n._urlId,this.hls.trigger(Th.LEVEL_SWITCHING,n);const l=a.details;if(!l||l.live){const e=this.switchParams(a.uri,null==s?void 0:s.details);this.loadPlaylist(e)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(void 0===this._startLevel){const e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel}set startLevel(e){this._startLevel=e}onError(e,t){!t.fatal&&t.context&&t.context.type===pc&&t.context.level===this.level&&this.checkRetry(t)}onFragLoaded(e,{frag:t}){if(void 0!==t&&t.type===gc){const e=this._levels[t.level];void 0!==e&&(e.loadError=0)}}onLevelLoaded(e,t){var i;const{level:s,details:r}=t,a=this._levels[s];var o;if(!a)return this.warn(`Invalid level index ${s}`),void(null!=(o=t.deliveryDirectives)&&o.skip&&(r.deltaUpdateFailed=!0));s===this.currentLevelIndex?(0===a.fragmentError&&(a.loadError=0),this.playlistLoaded(s,t,a.details)):null!=(i=t.deliveryDirectives)&&i.skip&&(r.deltaUpdateFailed=!0)}onAudioTrackSwitched(e,t){const i=this.currentLevel;if(!i)return;const s=this.hls.audioTracks[t.id].groupId;if(i.audioGroupIds&&i.audioGroupId!==s){let e=-1;for(let t=0;ti!==t,s=this._levels.filter(((s,r)=>r!==e||(s.url.length>1&&void 0!==t?(s.url=s.url.filter(i),s.audioGroupIds&&(s.audioGroupIds=s.audioGroupIds.filter(i)),s.textGroupIds&&(s.textGroupIds=s.textGroupIds.filter(i)),s.urlId=0,!0):(this.steering&&this.steering.removeLevel(s),!1))));this.hls.trigger(Th.LEVELS_UPDATED,{levels:s})}onLevelsUpdated(e,{levels:t}){t.forEach(((e,t)=>{const{details:i}=e;null!=i&&i.fragments&&i.fragments.forEach((e=>{e.level=t}))})),this._levels=t}}function uu(e,t,i){i&&("audio"===t?(e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds[e.url.length-1]=i):"text"===t&&(e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds[e.url.length-1]=i))}function pu(e){const t={};e.forEach((e=>{const i=e.groupId||"";e.id=t[i]=t[i]||0,t[i]++}))}var fu="NOT_LOADED",mu="APPENDING",gu="PARTIAL",yu="OK";class Au{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(Th.BUFFER_APPENDED,this.onBufferAppended,this),e.on(Th.FRAG_BUFFERED,this.onFragBuffered,this),e.on(Th.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(Th.BUFFER_APPENDED,this.onBufferAppended,this),e.off(Th.FRAG_BUFFERED,this.onFragBuffered,this),e.off(Th.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const i=this.activePartLists[t];if(i)for(let t=i.length;t--;){const s=i[t];if(!s)break;const r=s.end;if(s.start<=e&&null!==r&&e<=r)return s}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){const{fragments:i}=this,s=Object.keys(i);for(let r=s.length;r--;){const a=i[s[r]];if((null==a?void 0:a.body.type)===t&&a.buffered){const t=a.body;if(t.start<=e&&e<=t.end)return t}}return null}detectEvictedFragments(e,t,i,s){this.timeRanges&&(this.timeRanges[e]=t);const r=(null==s?void 0:s.fragment.sn)||-1;Object.keys(this.fragments).forEach((s=>{const a=this.fragments[s];if(!a)return;if(r>=a.body.sn)return;if(!a.buffered&&!a.loaded)return void(a.body.type===i&&this.removeFragment(a.body));const o=a.range[e];o&&o.time.some((e=>{const i=!this.isTimeBuffered(e.startPTS,e.endPTS,t);return i&&this.removeFragment(a.body),i}))}))}detectPartialFragments(e){const t=this.timeRanges,{frag:i,part:s}=e;if(!t||"initSegment"===i.sn)return;const r=vu(i),a=this.fragments[r];if(!a||a.buffered&&i.gap)return;const o=!i.relurl;if(Object.keys(t).forEach((e=>{const r=i.elementaryStreams[e];if(!r)return;const n=t[e],l=o||!0===r.partial;a.range[e]=this.getBufferedTimes(i,s,l,n)})),a.loaded=null,Object.keys(a.range).length){a.buffered=!0;(a.body.endList=i.endList||a.body.endList)&&(this.endListFragments[a.body.type]=a),bu(a)||this.removeParts(i.sn-1,i.type)}else this.removeFragment(a.body)}removeParts(e,t){const i=this.activePartLists[t];i&&(this.activePartLists[t]=i.filter((t=>t.fragment.sn>=e)))}fragBuffered(e,t){const i=vu(e);let s=this.fragments[i];!s&&t&&(s=this.fragments[i]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),s&&(s.loaded=null,s.buffered=!0)}getBufferedTimes(e,t,i,s){const r={time:[],partial:i},a=e.start,o=e.end,n=e.minEndPTS||o,l=e.maxStartPTS||a;for(let e=0;e=t&&n<=i){r.time.push({startPTS:Math.max(a,s.start(e)),endPTS:Math.min(o,s.end(e))});break}if(at)r.partial=!0,r.time.push({startPTS:Math.max(a,s.start(e)),endPTS:Math.min(o,s.end(e))});else if(o<=t)break}return r}getPartialFragment(e){let t,i,s,r=null,a=0;const{bufferPadding:o,fragments:n}=this;return Object.keys(n).forEach((l=>{const h=n[l];h&&bu(h)&&(i=h.body.start-o,s=h.body.end+o,e>=i&&e<=s&&(t=Math.min(e-i,s-e),a<=t&&(r=h.body,a=t)))})),r}isEndListAppended(e){const t=this.endListFragments[e];return void 0!==t&&(t.buffered||bu(t))}getState(e){const t=vu(e),i=this.fragments[t];return i?i.buffered?bu(i)?gu:yu:mu:fu}isTimeBuffered(e,t,i){let s,r;for(let a=0;a=s&&t<=r)return!0;if(t<=s)return!1}return!1}onFragLoaded(e,t){const{frag:i,part:s}=t;if("initSegment"===i.sn||i.bitrateTest)return;const r=s?null:t,a=vu(i);this.fragments[a]={body:i,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:i,part:s,timeRanges:r}=t;if("initSegment"===i.sn)return;const a=i.type;if(s){let e=this.activePartLists[a];e||(this.activePartLists[a]=e=[]),e.push(s)}this.timeRanges=r,Object.keys(r).forEach((e=>{const t=r[e];this.detectEvictedFragments(e,t,a,s)}))}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=vu(e);return!!this.fragments[t]}hasParts(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)}removeFragmentsInRange(e,t,i,s,r){s&&!this.hasGaps||Object.keys(this.fragments).forEach((a=>{const o=this.fragments[a];if(!o)return;const n=o.body;n.type!==i||s&&!n.gap||n.starte&&(o.buffered||r)&&this.removeFragment(n)}))}removeFragment(e){const t=vu(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const i=this.activePartLists[e.type];if(i){const t=e.sn;this.activePartLists[e.type]=i.filter((e=>e.fragment.sn!==t))}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function bu(e){var t,i,s;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(i=e.range.audio)?void 0:i.partial)||(null==(s=e.range.audiovideo)?void 0:s.partial))}function vu(e){return`${e.type}_${e.level}_${e.urlId}_${e.sn}`}const _u=Math.pow(2,17);class wu{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const i=e.url;if(!i)return Promise.reject(new Eu({type:Eh.NETWORK_ERROR,details:kh.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(i?"part list":"url")),networkDetails:null}));this.abort();const s=this.config,r=s.fLoader,a=s.loader;return new Promise(((o,n)=>{if(this.loader&&this.loader.destroy(),e.gap){if(e.tagList.some((e=>"GAP"===e[0])))return void n(Tu(e));e.gap=!1}const l=this.loader=e.loader=r?new r(s):new a(s),h=Su(e),d=Yc(s.fragLoadPolicy.default),c={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:_u};e.stats=l.stats,l.load(h,c,{onSuccess:(t,i,s,r)=>{this.resetLoader(e,l);let a=t.data;s.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(a.slice(0,16)),a=a.slice(16)),o({frag:e,part:null,payload:a,networkDetails:r})},onError:(t,s,r,a)=>{this.resetLoader(e,l),n(new Eu({type:Eh.NETWORK_ERROR,details:kh.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:vh({url:i,data:void 0},t),error:new Error(`HTTP Error ${t.code} ${t.text}`),networkDetails:r,stats:a}))},onAbort:(t,i,s)=>{this.resetLoader(e,l),n(new Eu({type:Eh.NETWORK_ERROR,details:kh.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:s,stats:t}))},onTimeout:(t,i,s)=>{this.resetLoader(e,l),n(new Eu({type:Eh.NETWORK_ERROR,details:kh.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${c.timeout}ms`),networkDetails:s,stats:t}))},onProgress:(i,s,r,a)=>{t&&t({frag:e,part:null,payload:r,networkDetails:a})}})}))}loadPart(e,t,i){this.abort();const s=this.config,r=s.fLoader,a=s.loader;return new Promise(((o,n)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap)return void n(Tu(e,t));const l=this.loader=e.loader=r?new r(s):new a(s),h=Su(e,t),d=Yc(s.fragLoadPolicy.default),c={loadPolicy:d,timeout:d.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:_u};t.stats=l.stats,l.load(h,c,{onSuccess:(s,r,a,n)=>{this.resetLoader(e,l),this.updateStatsFromPart(e,t);const h={frag:e,part:t,payload:s.data,networkDetails:n};i(h),o(h)},onError:(i,s,r,a)=>{this.resetLoader(e,l),n(new Eu({type:Eh.NETWORK_ERROR,details:kh.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:vh({url:h.url,data:void 0},i),error:new Error(`HTTP Error ${i.code} ${i.text}`),networkDetails:r,stats:a}))},onAbort:(i,s,r)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,l),n(new Eu({type:Eh.NETWORK_ERROR,details:kh.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:r,stats:i}))},onTimeout:(i,s,r)=>{this.resetLoader(e,l),n(new Eu({type:Eh.NETWORK_ERROR,details:kh.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${c.timeout}ms`),networkDetails:r,stats:i}))}})}))}updateStatsFromPart(e,t){const i=e.stats,s=t.stats,r=s.total;if(i.loaded+=s.loaded,r){const s=Math.round(e.duration/t.duration),a=Math.min(Math.round(i.loaded/r),s),o=(s-a)*Math.round(i.loaded/a);i.total=i.loaded+o}else i.total=Math.max(i.loaded,i.total);const a=i.loading,o=s.loading;a.start?a.first+=o.first-o.start:(a.start=o.start,a.first=o.first),a.end=o.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Su(e,t=null){const i=t||e,s={frag:e,part:t,responseType:"arraybuffer",url:i.url,headers:{},rangeStart:0,rangeEnd:0},r=i.byteRangeStartOffset,a=i.byteRangeEndOffset;if(Sh(r)&&Sh(a)){var o;let t=r,i=a;if("initSegment"===e.sn&&"AES-128"===(null==(o=e.decryptdata)?void 0:o.method)){const e=a-r;e%16&&(i=a+(16-e%16)),0!==r&&(s.resetIV=!0,t=r-16)}s.rangeStart=t,s.rangeEnd=i}return s}function Tu(e,t){const i=new Error(`GAP ${e.gap?"tag":"attribute"} found`),s={type:Eh.MEDIA_ERROR,details:kh.FRAG_GAP,fatal:!1,frag:e,error:i,networkDetails:null};return t&&(s.part=t),(t||e).stats.aborted=!0,new Eu(s)}class Eu extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class ku{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const t in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[t].loader;if(i){if(e&&e!==i.context.frag.type)return;i.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=kh.KEY_LOAD_ERROR,i,s,r){return new Eu({type:Eh.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:r,error:i,networkDetails:s})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:i,cc:s}=e;for(let e=0;e{r.setKeyFormat(e)}));break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then((t=>this.loadInternal(e,t))):this.loadInternal(e)}loadInternal(e,t){var i,s;t&&e.setKeyFormat(t);const r=e.decryptdata;if(!r){const i=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,kh.KEY_LOAD_ERROR,i))}const a=r.uri;if(!a)return Promise.reject(this.createKeyLoadError(e,kh.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${a}"`)));let o=this.keyUriToKeyInfo[a];if(null!=(i=o)&&i.decryptdata.key)return r.key=o.decryptdata.key,Promise.resolve({frag:e,keyInfo:o});var n;if(null!=(s=o)&&s.keyLoadPromise)switch(null==(n=o.mediaKeySessionContext)?void 0:n.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then((t=>(r.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:o})))}switch(o=this.keyUriToKeyInfo[a]={decryptdata:r,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},r.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===r.keyFormat?this.loadKeyHTTP(o,e):this.loadKeyEME(o,e);case"AES-128":return this.loadKeyHTTP(o,e);default:return Promise.reject(this.createKeyLoadError(e,kh.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${r.method}"`)))}}loadKeyEME(e,t){const i={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const t=this.emeController.loadKey(i);if(t)return(e.keyLoadPromise=t.then((t=>(e.mediaKeySessionContext=t,i)))).catch((t=>{throw e.keyLoadPromise=null,t}))}return Promise.resolve(i)}loadKeyHTTP(e,t){const i=this.config,s=new(0,i.loader)(i);return t.keyLoader=e.loader=s,e.keyLoadPromise=new Promise(((r,a)=>{const o={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},n=i.keyLoadPolicy.default,l={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},h={onSuccess:(e,t,i,s)=>{const{frag:o,keyInfo:n,url:l}=i;if(!o.decryptdata||n!==this.keyUriToKeyInfo[l])return a(this.createKeyLoadError(o,kh.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),s));n.decryptdata.key=o.decryptdata.key=new Uint8Array(e.data),o.keyLoader=null,n.loader=null,r({frag:o,keyInfo:n})},onError:(e,i,s,r)=>{this.resetLoader(i),a(this.createKeyLoadError(t,kh.KEY_LOAD_ERROR,new Error(`HTTP Error ${e.code} loading key ${e.text}`),s,vh({url:o.url,data:void 0},e)))},onTimeout:(e,i,s)=>{this.resetLoader(i),a(this.createKeyLoadError(t,kh.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),s))},onAbort:(e,i,s)=>{this.resetLoader(i),a(this.createKeyLoadError(t,kh.INTERNAL_ABORTED,new Error("key loading aborted"),s))}};s.load(o,l,h)}))}resetLoader(e){const{frag:t,keyInfo:i,url:s}=e,r=i.loader;t.keyLoader===r&&(t.keyLoader=null,i.loader=null),delete this.keyUriToKeyInfo[s],r&&r.destroy()}}const Cu={length:0,start:()=>0,end:()=>0};class Ru{static isBuffered(e,t){try{if(e){const i=Ru.getBuffered(e);for(let e=0;e=i.start(e)&&t<=i.end(e))return!0}}catch(e){}return!1}static bufferInfo(e,t,i){try{if(e){const s=Ru.getBuffered(e),r=[];let a;for(a=0;aa&&(s[r-1].end=e[t].end):s.push(e[t])}else s.push(e[t])}else s=e;let r,a=0,o=t,n=t;for(let e=0;e=l&&ti.startCC||e&&e.cc>>8^255&i^99,e[p]=i,t[i]=p;const n=u[p],m=u[n],g=u[m];let y=257*u[i]^16843008*i;s[p]=y<<24|y>>>8,r[p]=y<<16|y>>>16,a[p]=y<<8|y>>>24,o[p]=y,y=16843009*g^65537*m^257*n^16843008*p,l[i]=y<<24|y>>>8,h[i]=y<<16|y>>>16,d[i]=y<<8|y>>>24,c[i]=y,p?(p=n^u[u[u[g^n]]],f^=u[u[f]]):p=f=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let i=!0,s=0;for(;s{if(!s)return Promise.reject(new Error("web crypto not initialized"));this.logOnce("WebCrypto AES decrypt");return new Mu(s,new Uint8Array(i)).decrypt(e.buffer,t)})).catch((s=>(Lh.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${s.name}: ${s.message}`),this.onWebCryptoError(e,t,i))))}onWebCryptoError(e,t,i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,i);const s=this.flush();if(s)return s.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const i=e.length-e.length%16;return i!==e.length&&(t=rd(e,0,i),this.remainderData=rd(e,i)),t}logOnce(e){this.logEnabled&&(Lh.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const Nu=function(e){let t="";const i=e.length;for(let s=0;s1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}{constructor(e,t,i,s,r){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=ju,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=r,this.logPrefix=s,this.log=Lh.log.bind(Lh,`${s}:`),this.warn=Lh.warn.bind(Lh,`${s}:`),this.hls=e,this.fragmentLoader=new wu(e.config),this.keyLoader=i,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Ou(e.config),e.on(Th.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=ju}_streamEnded(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;const i=t.partList;if(null!=i&&i.length){const e=i[i.length-1];return Ru.isBuffered(this.media,e.start+e.duration/2)}const s=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(s)}getLevelDetails(){var e;if(this.levels&&null!==this.levelLastLoaded)return null==(e=this.levels[this.levelLastLoaded])?void 0:e.details}onMediaAttached(e,t){const i=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),i.addEventListener("seeking",this.onvseeking),i.addEventListener("ended",this.onvended);const s=this.config;this.levels&&s.autoStartLoad&&this.state===ju&&this.startLoad(s.startPosition)}onMediaDetaching(){const e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:e,fragCurrent:t,media:i,mediaBuffer:s,state:r}=this,a=i?i.currentTime:0,o=Ru.bufferInfo(s||i,a,e.maxBufferHole);if(this.log(`media seeking to ${Sh(a)?a.toFixed(3):a}, state: ${r}`),this.state===Ku)this.resetLoadingState();else if(t){const i=e.maxFragLookUpTolerance,s=t.start-i,r=t.start+t.duration+i;if(!o.len||ro.end){const e=a>r;(a{if(this.fragContextChanged(e))return this.warn(`Fragment ${e.sn}${t.part?" p: "+t.part.index:""} of level ${e.level} was dropped during download.`),void this.fragmentTracker.removeFragment(e);e.stats.chunkCount++,this._handleFragmentLoadProgress(t)})).then((t=>{if(!t)return;const i=this.state;this.fragContextChanged(e)?(i===Vu||!this.fragCurrent&&i===$u)&&(this.fragmentTracker.removeFragment(e),this.state=zu):("payload"in t&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(Th.FRAG_LOADED,t)),this._handleFragmentLoadComplete(t))})).catch((t=>{this.state!==ju&&this.state!==qu&&(this.warn(t),this.resetFragmentLoading(e))}))}clearTrackerIfNeeded(e){var t;const{fragmentTracker:i}=this;if(i.getState(e)===mu){const t=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,t),r=Math.max(e.duration,s?s.len:this.config.maxBufferLength);this.reduceMaxBufferLength(r)&&i.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?i.removeAllFragments():i.hasParts(e.type)&&(i.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),i.getState(e)===gu&&i.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,t,i=null){if(!(e-t))return;const s={startOffset:e,endOffset:t,type:i};this.hls.trigger(Th.BUFFER_FLUSHING,s)}_loadInitSegment(e,t){this._doFragLoad(e,t).then((t=>{if(!t||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return t})).then((t=>{const{hls:i}=this,{payload:s}=t,r=e.decryptdata;if(s&&s.byteLength>0&&r&&r.key&&r.iv&&"AES-128"===r.method){const a=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),r.key.buffer,r.iv.buffer).catch((t=>{throw i.trigger(Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.FRAG_DECRYPT_ERROR,fatal:!1,error:t,reason:t.message,frag:e}),t})).then((s=>{const r=self.performance.now();return i.trigger(Th.FRAG_DECRYPTED,{frag:e,payload:s,stats:{tstart:a,tdecrypt:r}}),t.payload=s,t}))}return t})).then((i=>{const{fragCurrent:s,hls:r,levels:a}=this;if(!a)throw new Error("init load aborted, missing levels");const o=e.stats;this.state=zu,t.fragmentError=0,e.data=new Uint8Array(i.payload),o.parsing.start=o.buffering.start=self.performance.now(),o.parsing.end=o.buffering.end=self.performance.now(),i.frag===s&&r.trigger(Th.FRAG_BUFFERED,{stats:o,frag:s,part:null,id:e.type}),this.tick()})).catch((t=>{this.state!==ju&&this.state!==qu&&(this.warn(t),this.resetFragmentLoading(e))}))}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId}fragBufferedComplete(e,t){var i,s,r,a;const o=this.mediaBuffer?this.mediaBuffer:this.media;this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===gc?"level":"track"} ${e.level} (frag:[${(null!=(i=e.startPTS)?i:NaN).toFixed(3)}-${(null!=(s=e.endPTS)?s:NaN).toFixed(3)}] > buffer:${o?Nu(Ru.getBuffered(o)):"(detached)"})`),this.state=zu,o&&(!this.loadedmetadata&&e.type==gc&&o.buffered.length&&(null==(r=this.fragCurrent)?void 0:r.sn)===(null==(a=this.fragPrevious)?void 0:a.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:i,part:s,partsLoaded:r}=e,a=!r||0===r.length||r.some((e=>!e)),o=new xu(i.level,i.sn,i.stats.chunkCount+1,0,s?s.index:-1,!a);t.flush(o)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,i=null,s){var r;const a=null==t?void 0:t.details;if(!this.levels||!a)throw new Error(`frag load aborted, missing level${a?"":" detail"}s`);let o=null;if(!e.encrypted||null!=(r=e.decryptdata)&&r.key?!e.encrypted&&a.encryptedFragments.length&&this.keyLoader.loadClear(e,a.encryptedFragments):(this.log(`Loading key for ${e.sn} of [${a.startSN}-${a.endSN}], ${"[stream-controller]"===this.logPrefix?"level":"track"} ${e.level}`),this.state=Gu,this.fragCurrent=e,o=this.keyLoader.load(e).then((e=>{if(!this.fragContextChanged(e.frag))return this.hls.trigger(Th.KEY_LOADED,e),this.state===Gu&&(this.state=zu),e})),this.hls.trigger(Th.KEY_LOADING,{frag:e}),null===this.fragCurrent&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))),i=Math.max(e.start,i||0),this.config.lowLatencyMode&&"initSegment"!==e.sn){const r=a.partList;if(r&&s){i>e.end&&a.fragmentHint&&(e=a.fragmentHint);const n=this.getNextPart(r,e,i);if(n>-1){const l=r[n];let h;return this.log(`Loading part sn: ${e.sn} p: ${l.index} cc: ${e.cc} of playlist [${a.startSN}-${a.endSN}] parts [0-${n}-${r.length-1}] ${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(i.toFixed(3))}`),this.nextLoadPosition=l.start+l.duration,this.state=Vu,h=o?o.then((i=>!i||this.fragContextChanged(i.frag)?null:this.doFragPartsLoad(e,l,t,s))).catch((e=>this.handleFragLoadError(e))):this.doFragPartsLoad(e,l,t,s).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(Th.FRAG_LOADING,{frag:e,part:l,targetBufferTime:i}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):h}if(!e.url||this.loadedEndOfParts(r,i))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${a?"of ["+a.startSN+"-"+a.endSN+"] ":""}${"[stream-controller]"===this.logPrefix?"level":"track"}: ${e.level}, target: ${parseFloat(i.toFixed(3))}`),Sh(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Vu;const n=this.config.progressive;let l;return l=n&&o?o.then((t=>!t||this.fragContextChanged(null==t?void 0:t.frag)?null:this.fragmentLoader.load(e,s))).catch((e=>this.handleFragLoadError(e))):Promise.all([this.fragmentLoader.load(e,n?s:void 0),o]).then((([e])=>(!n&&e&&s&&s(e),e))).catch((e=>this.handleFragLoadError(e))),this.hls.trigger(Th.FRAG_LOADING,{frag:e,targetBufferTime:i}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):l}doFragPartsLoad(e,t,i,s){return new Promise(((r,a)=>{var o;const n=[],l=null==(o=i.details)?void 0:o.partList,h=t=>{this.fragmentLoader.loadPart(e,t,s).then((s=>{n[t.index]=s;const a=s.part;this.hls.trigger(Th.FRAG_LOADED,s);const o=Wc(i,e.sn,t.index+1)||$c(l,e.sn,t.index+1);if(!o)return r({frag:e,part:a,partsLoaded:n});h(o)})).catch(a)};h(t)}))}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===kh.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(Th.ERROR,t)}else this.hls.trigger(Th.ERROR,{type:Eh.OTHER_ERROR,details:kh.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==$u)return void(this.fragCurrent||this.state===ju||this.state===qu||(this.state=zu));const{frag:i,part:s,level:r}=t,a=self.performance.now();i.stats.parsing.end=a,s&&(s.stats.parsing.end=a),this.updateLevelTiming(i,s,r,e.partial)}getCurrentContext(e){const{levels:t,fragCurrent:i}=this,{level:s,sn:r,part:a}=e;if(null==t||!t[s])return this.warn(`Levels object was unset while buffering fragment ${r} of level ${s}. The current chunk will not be buffered.`),null;const o=t[s],n=a>-1?Wc(o,r,a):null,l=n?n.fragment:function(e,t,i){if(null==e||!e.details)return null;const s=e.details;let r=s.fragments[t-s.startSN];return r||(r=s.fragmentHint,r&&r.sn===t?r:ta&&this.flushMainBuffer(o,e.start)}getFwdBufferInfo(e,t){const i=this.getLoadPosition();return Sh(i)?this.getFwdBufferInfoAtPos(e,i,t):null}getFwdBufferInfoAtPos(e,t,i){const{config:{maxBufferHole:s}}=this,r=Ru.bufferInfo(e,t,s);if(0===r.len&&void 0!==r.nextStart){const a=this.fragmentTracker.getBufferedFrag(t,i);if(a&&r.nextStart=i&&(t.maxMaxBufferLength/=2,this.warn(`Reduce max buffer length to ${t.maxMaxBufferLength}s`),!0)}getAppendedFrag(e,t=gc){const i=this.fragmentTracker.getAppendedFrag(e,gc);return i&&"fragment"in i?i.fragment:i}getNextFragment(e,t){const i=t.fragments,s=i.length;if(!s)return null;const{config:r}=this,a=i[0].start;let o;if(t.live){const a=r.initialLiveManifestSize;if(st}getNextFragmentLoopLoading(e,t,i,s,r){const a=e.gap,o=this.getNextFragment(this.nextLoadPosition,t);if(null===o)return o;if(e=o,a&&e&&!e.gap&&i.nextStart){const t=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,i.nextStart,s);if(null!==t&&i.len+t.len>=r)return this.log(`buffer full after gaps in "${s}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment}getNextPart(e,t,i){let s=-1,r=!1,a=!0;for(let o=0,n=e.length;o-1&&ii.start&&i.loaded}getInitialLiveFragment(e,t){const i=this.fragPrevious;let s=null;if(i){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${i.programDateTime}`),s=function(e,t,i){if(null===t||!Array.isArray(e)||!e.length||!Sh(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;i=i||0;for(let s=0;s=e.startSN&&r<=e.endSN){const a=t[r-e.startSN];i.cc===a.cc&&(s=a,this.log(`Live playlist, switching playlist, load frag with next SN: ${s.sn}`))}s||(s=function(e,t){return Xc(e,(e=>e.cct?-1:0))}(t,i.cc),s&&this.log(`Live playlist, switching playlist, load frag with same CC: ${s.sn}`))}}else{const t=this.hls.liveSyncPosition;null!==t&&(s=this.getFragmentAtPosition(t,this.bitrateTest?e.fragmentEnd:e.edge,e))}return s}getFragmentAtPosition(e,t,i){const{config:s}=this;let{fragPrevious:r}=this,{fragments:a,endSN:o}=i;const{fragmentHint:n}=i,l=s.maxFragLookUpTolerance,h=i.partList,d=!!(s.lowLatencyMode&&null!=h&&h.length&&n);let c;if(d&&n&&!this.bitrateTest&&(a=a.concat(n),o=n.sn),et-l?0:l)}else c=a[a.length-1];if(c){const e=c.sn-i.startSN,t=this.fragmentTracker.getState(c);if((t===yu||t===gu&&c.gap)&&(r=c),r&&c.sn===r.sn&&(!d||h[0].fragment.sn>c.sn)){if(r&&c.level===r.level){const t=a[e+1];c=c.sn=a-t.maxFragLookUpTolerance&&r<=o;if(null!==s&&i.duration>s&&(r${e.startSN} prev-sn: ${r?r.sn:"na"} fragments: ${o}`),i}return n}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)}setStartPosition(e,t){let i=this.startPosition;if(i ${null==(s=this.fragCurrent)?void 0:s.url}`);const r=t.details===kh.FRAG_GAP;r&&this.fragmentTracker.fragBuffered(i,!0);const a=t.errorAction,{action:o,retryCount:n=0,retryConfig:l}=a||{};if(a&&o===ru&&l){var h;this.resetStartWhenNotLoaded(null!=(h=this.levelLastLoaded)?h:i.level);const s=qc(l,n);this.warn(`Fragment ${i.sn} of ${e} ${i.level} errored with ${t.details}, retrying loading ${n+1}/${l.maxNumRetry} in ${s}ms`),a.resolved=!0,this.retryDate=self.performance.now()+s,this.state=Hu}else l&&a?(this.resetFragmentErrors(e),n.5;s&&this.reduceMaxBufferLength(i.len);const r=!s;return r&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${t} buffer`),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),r}return!1}resetFragmentErrors(e){e===yc&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==ju&&(this.state=zu)}afterBufferFlushed(e,t,i){if(!e)return;const s=Ru.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,s,i),this.state===Ku&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=zu}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=this.levels?this.levels[e].details:null;null!=t&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){var t;this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(null!=(t=this.levelLastLoaded)?t:e.level),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,i,s){var r;const a=i.details;if(!a)return void this.warn("level.details undefined");if(Object.keys(e.elementaryStreams).reduce(((t,r)=>{const o=e.elementaryStreams[r];if(o){const n=o.endPTS-o.startPTS;if(n<=0)return this.warn(`Could not parse fragment ${e.sn} ${r} duration reliably (${n})`),t||!1;const l=s?0:zc(a,e,o.startPTS,o.endPTS,o.startDTS,o.endDTS);return this.hls.trigger(Th.LEVEL_PTS_UPDATED,{details:a,level:i,drift:l,type:r,frag:e,start:o.startPTS,end:o.endPTS}),!0}return t}),!1))i.fragmentError=0;else if(null===(null==(r=this.transmuxer)?void 0:r.error)){const t=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(0===i.fragmentError&&(i.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(t.message),this.hls.trigger(Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.FRAG_PARSING_ERROR,fatal:!1,error:t,frag:e,reason:`Found no media in msn ${e.sn} of level "${i.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=Ju,this.hls.trigger(Th.FRAG_PARSED,{frag:e,part:t})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){var t,i,s;"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(null!=(t=null!=(i=this.levelLastLoaded)?i:null==(s=this.fragCurrent)?void 0:s.level)?t:0),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function Zu(){return self.SourceBuffer||self.WebKitSourceBuffer}function ep(e="",t=9e4){return{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}class tp{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,i,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,i){}demux(e,t){this.cachedData&&(e=Md(this.cachedData,e),this.cachedData=null);let i,s=nd(e,0),r=s?s.length:0;const a=this._audioTrack,o=this._id3Track,n=s?(e=>{const t=ud(e);for(let e=0;e0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:kc,duration:Number.POSITIVE_INFINITY});r{if(Sh(e))return 90*e;return 9e4*t+(i?9e4*i.baseTime/i.timescale:0)};function sp(e,t){return 255===e[t]&&240==(246&e[t+1])}function rp(e,t){return 1&e[t+1]?7:9}function ap(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function op(e,t){return t+1=e.length)return!1;const s=ap(e,t);if(s<=i)return!1;const r=t+s;return r===e.length||op(e,r)}return!1}function lp(e,t,i,s,r){if(!e.samplerate){const a=function(e,t,i,s){let r,a,o,n;const l=navigator.userAgent.toLowerCase(),h=s,d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];r=1+((192&t[i+2])>>>6);const c=(60&t[i+2])>>>2;if(!(c>d.length-1))return o=(1&t[i+2])<<2,o|=(192&t[i+3])>>>6,Lh.log(`manifest codec:${s}, ADTS type:${r}, samplingIndex:${c}`),/firefox/i.test(l)?c>=6?(r=5,n=new Array(4),a=c-3):(r=2,n=new Array(2),a=c):-1!==l.indexOf("android")?(r=2,n=new Array(2),a=c):(r=5,n=new Array(4),s&&(-1!==s.indexOf("mp4a.40.29")||-1!==s.indexOf("mp4a.40.5"))||!s&&c>=6?a=c-3:((s&&-1!==s.indexOf("mp4a.40.2")&&(c>=6&&1===o||/vivaldi/i.test(l))||!s&&1===o)&&(r=2,n=new Array(2)),a=c)),n[0]=r<<3,n[0]|=(14&c)>>1,n[1]|=(1&c)<<7,n[1]|=o<<3,5===r&&(n[1]|=(14&a)>>1,n[2]=(1&a)<<7,n[2]|=8,n[3]=0),{config:n,samplerate:d[c],channelCount:o,codec:"mp4a.40."+r,manifestCodec:h};e.trigger(Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.FRAG_PARSING_ERROR,fatal:!0,reason:`invalid ADTS sampling index:${c}`})}(t,i,s,r);if(!a)return;e.config=a.config,e.samplerate=a.samplerate,e.channelCount=a.channelCount,e.codec=a.codec,e.manifestCodec=a.manifestCodec,Lh.log(`parsed codec:${e.codec}, rate:${a.samplerate}, channels:${a.channelCount}`)}}function hp(e){return 9216e4/e}function dp(e,t,i,s,r){const a=s+r*hp(e.samplerate),o=function(e,t){const i=rp(e,t);if(t+i<=e.length){const s=ap(e,t)-i;if(s>0)return{headerLength:i,frameLength:s}}}(t,i);let n;if(o){const{frameLength:s,headerLength:r}=o,l=r+s,h=Math.max(0,i+l-t.length);h?(n=new Uint8Array(l-r),n.set(t.subarray(i+r,t.length),0)):n=t.subarray(i+r,i+l);const d={unit:n,pts:a};return h||e.samples.push(d),{sample:d,length:l,missing:h}}const l=t.length-i;n=new Uint8Array(l),n.set(t.subarray(i,t.length),0);return{sample:{unit:n,pts:a},length:l,missing:-1}}const cp=/\/emsg[-/]ID3/i;let up=null;const pp=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],fp=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],mp=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],gp=[0,1,1,4];function yp(e,t,i,s,r){if(i+24>t.length)return;const a=Ap(t,i);if(a&&i+a.frameLength<=t.length){const o=s+r*(9e4*a.samplesPerFrame/a.sampleRate),n={unit:t.subarray(i,i+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(n),{sample:n,length:a.frameLength,missing:0}}}function Ap(e,t){const i=e[t+1]>>3&3,s=e[t+1]>>1&3,r=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==i&&0!==r&&15!==r&&3!==a){const o=e[t+2]>>1&1,n=e[t+3]>>6,l=1e3*pp[14*(3===i?3-s:3===s?3:4)+r-1],h=fp[3*(3===i?0:2===i?1:2)+a],d=3===n?1:2,c=mp[i][s],u=gp[s],p=8*c*u,f=Math.floor(c*l/h+o)*u;if(null===up){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);up=e?parseInt(e[1]):0}return!!up&&up<=87&&2===s&&l>=224e3&&0===n&&(e[t+3]=128|e[t+3]),{sampleRate:h,channelCount:d,frameLength:f,samplesPerFrame:p}}}function bp(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function vp(e,t){return t+1e?(this.word<<=e,this.bitsAvailable-=e):(t=(e-=this.bitsAvailable)>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const i=this.word>>>32-t;if(e>32&&Lh.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return t=e-t,t>0&&this.bitsAvailable?i<>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return 1===this.readBits(1)}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(e){let t,i=8,s=8;for(let r=0;r{const a=new Uint8Array(r);s.set(a,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,i)}))}decryptAacSamples(e,t,i){for(;;t++){if(t>=e.length)return void i();if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,i),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=16*Math.floor((e.length-48)/160)+16,i=new Int8Array(t);let s=0;for(let t=32;t{r.data=this.getAvcDecryptedUnit(a,o),this.decrypter.isSync()||this.decryptAvcSamples(e,t,i+1,s)}))}decryptAvcSamples(e,t,i,s){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,i=0){if(t>=e.length)return void s();const r=e[t].units;for(;!(i>=r.length);i++){const a=r[i];if(!(a.data.length<=48||1!==a.type&&5!==a.type||(this.decryptAvcSample(e,t,i,s,a),this.decrypter.isSync())))return}}}}const Tp=188;class Ep{constructor(e,t,i){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=e,this.config=t,this.typeSupported=i}static probe(e){const t=Ep.syncOffset(e);return t>0&&Lh.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`),-1!==t}static syncOffset(e){const t=e.length;let i=Math.min(940,e.length-Tp)+1,s=0;for(;s1&&(0===a&&o>2||n+Tp>i))return a}s++}return-1}static createTrack(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:Td[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}}resetInitSegment(e,t,i,s){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=Ep.createTrack("video"),this._audioTrack=Ep.createTrack("audio",s),this._id3Track=Ep.createTrack("id3"),this._txtTrack=Ep.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=i,this._duration=s}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_avcTrack:t,_id3Track:i}=this;e&&(e.pesData=null),t&&(t.pesData=null),i&&(i.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null}demux(e,t,i=!1,s=!1){let r;i||(this.sampleAes=null);const a=this._avcTrack,o=this._audioTrack,n=this._id3Track,l=this._txtTrack;let h=a.pid,d=a.pesData,c=o.pid,u=n.pid,p=o.pesData,f=n.pesData,m=null,g=this.pmtParsed,y=this._pmtId,A=e.length;if(this.remainderData&&(A=(e=Md(this.remainderData,e)).length,this.remainderData=null),A>4>1){if(v=t+5+e[t+4],v===t+Tp)continue}else v=t+4;switch(A){case h:s&&(d&&(r=Dp(d))&&this.parseAVCPES(a,l,r,!1),d={data:[],size:0}),d&&(d.data.push(e.subarray(v,t+Tp)),d.size+=t+Tp-v);break;case c:if(s){if(p&&(r=Dp(p)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,r);break;case"mp3":this.parseMPEGPES(o,r)}p={data:[],size:0}}p&&(p.data.push(e.subarray(v,t+Tp)),p.size+=t+Tp-v);break;case u:s&&(f&&(r=Dp(f))&&this.parseID3PES(n,r),f={data:[],size:0}),f&&(f.data.push(e.subarray(v,t+Tp)),f.size+=t+Tp-v);break;case 0:s&&(v+=e[v]+1),y=this._pmtId=Rp(e,v);break;case y:{s&&(v+=e[v]+1);const r=xp(e,v,this.typeSupported,i);h=r.avc,h>0&&(a.pid=h),c=r.audio,c>0&&(o.pid=c,o.segmentCodec=r.segmentCodec),u=r.id3,u>0&&(n.pid=u),null===m||g||(Lh.warn(`MPEG-TS PMT found at ${t} after unknown PID '${m}'. Backtracking to sync byte @${b} to parse all TS packets.`),m=null,t=b-188),g=this.pmtParsed=!0;break}case 17:case 8191:break;default:m=A}}else v++;if(v>0){const e=new Error(`Found ${v} TS packet/s that do not start with 0x47`);this.observer.emit(Th.ERROR,Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message})}a.pesData=d,o.pesData=p,n.pesData=f;const _={audioTrack:o,videoTrack:a,id3Track:n,textTrack:l};return s&&this.extractRemainingSamples(_),_}flush(){const{remainderData:e}=this;let t;return this.remainderData=null,t=e?this.demux(e,-1,!1,!0):{videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:i,id3Track:s,textTrack:r}=e,a=i.pesData,o=t.pesData,n=s.pesData;let l;if(a&&(l=Dp(a))?(this.parseAVCPES(i,r,l,!0),i.pesData=null):i.pesData=a,o&&(l=Dp(o))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,l);break;case"mp3":this.parseMPEGPES(t,l)}t.pesData=null}else null!=o&&o.size&&Lh.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=o;n&&(l=Dp(n))?(this.parseID3PES(s,l),s.pesData=null):s.pesData=n}demuxSampleAes(e,t,i){const s=this.demux(e,i,!0,!this.config.progressive),r=this.sampleAes=new Sp(this.observer,this.config,t);return this.decrypt(s,r)}decrypt(e,t){return new Promise((i=>{const{audioTrack:s,videoTrack:r}=e;s.samples&&"aac"===s.segmentCodec?t.decryptAacSamples(s.samples,0,(()=>{r.samples?t.decryptAvcSamples(r.samples,0,0,(()=>{i(e)})):i(e)})):r.samples&&t.decryptAvcSamples(r.samples,0,0,(()=>{i(e)}))}))}destroy(){this._duration=0}parseAVCPES(e,t,i,s){const r=this.parseAVCNALu(e,i.data);let a,o=this.avcSample,n=!1;i.data=null,o&&r.length&&!e.audFound&&(Lp(o,e),o=this.avcSample=kp(!1,i.pts,i.dts,"")),r.forEach((s=>{var r;switch(s.type){case 1:{let t=!1;a=!0;const r=s.data;if(n&&r.length>4){const e=new wp(r).readSliceType();2!==e&&4!==e&&7!==e&&9!==e||(t=!0)}var l;if(t)null!=(l=o)&&l.frame&&!o.key&&(Lp(o,e),o=this.avcSample=null);o||(o=this.avcSample=kp(!0,i.pts,i.dts,"")),o.frame=!0,o.key=t;break}case 5:a=!0,null!=(r=o)&&r.frame&&!o.key&&(Lp(o,e),o=this.avcSample=null),o||(o=this.avcSample=kp(!0,i.pts,i.dts,"")),o.key=!0,o.frame=!0;break;case 6:a=!0,Od(s.data,1,i.pts,t.samples);break;case 7:if(a=!0,n=!0,!e.sps){const t=s.data,i=new wp(t).readSPS();e.width=i.width,e.height=i.height,e.pixelRatio=i.pixelRatio,e.sps=[t],e.duration=this._duration;const r=t.subarray(1,4);let a="avc1.";for(let e=0;e<3;e++){let t=r[e].toString(16);t.length<2&&(t="0"+t),a+=t}e.codec=a}break;case 8:a=!0,e.pps||(e.pps=[s.data]);break;case 9:a=!1,e.audFound=!0,o&&Lp(o,e),o=this.avcSample=kp(!1,i.pts,i.dts,"");break;case 12:a=!0;break;default:a=!1,o&&(o.debug+="unknown NAL "+s.type+" ")}if(o&&a){o.units.push(s)}})),s&&o&&(Lp(o,e),this.avcSample=null)}getLastNalUnit(e){var t;let i,s=this.avcSample;if(s&&0!==s.units.length||(s=e[e.length-1]),null!=(t=s)&&t.units){const e=s.units;i=e[e.length-1]}return i}parseAVCNALu(e,t){const i=t.byteLength;let s=e.naluState||0;const r=s,a=[];let o,n,l,h=0,d=-1,c=0;for(-1===s&&(d=0,c=31&t[0],s=0,h=1);h=0){const e={data:t.subarray(d,h-s-1),type:c};a.push(e)}else{const i=this.getLastNalUnit(e.samples);if(i&&(r&&h<=4-r&&i.state&&(i.data=i.data.subarray(0,i.data.byteLength-r)),n=h-s-1,n>0)){const e=new Uint8Array(i.data.byteLength+n);e.set(i.data,0),e.set(t.subarray(0,n),i.data.byteLength),i.data=e,i.state=0}}h=0&&s>=0){const e={data:t.subarray(d,i),type:c,state:s};a.push(e)}if(0===a.length){const i=this.getLastNalUnit(e.samples);if(i){const e=new Uint8Array(i.data.byteLength+t.byteLength);e.set(i.data,0),e.set(t,i.data.byteLength),i.data=e}}return e.naluState=s,a}parseAACPES(e,t){let i=0;const s=this.aacOverFlow;let r,a,o,n=t.data;if(s){this.aacOverFlow=null;const t=s.missing,r=s.sample.unit.byteLength;if(-1===t){const e=new Uint8Array(r+n.byteLength);e.set(s.sample.unit,0),e.set(n,r),n=e}else{const a=r-t;s.sample.unit.set(n.subarray(0,t),a),e.samples.push(s.sample),i=s.missing}}for(r=i,a=n.length;r1;){const e=new Uint8Array(n[0].length+n[1].length);e.set(n[0]),e.set(n[1],n[0].length),n[0]=e,n.splice(1,1)}t=n[0];if(1===(t[0]<<16)+(t[1]<<8)+t[2]){if(i=(t[4]<<8)+t[5],i&&i>e.size-6)return null;const l=t[7];192&l&&(r=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&l?(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,r-a>54e5&&(Lh.warn(`${Math.round((r-a)/9e4)}s delta between PTS and DTS, align them`),r=a)):a=r),s=t[8];let h=s+9;if(e.size<=h)return null;e.size-=h;const d=new Uint8Array(e.size);for(let e=0,i=n.length;ei){h-=i;continue}t=t.subarray(h),i-=h,h=0}d.set(t,o),o+=i}return i&&(i-=s+3),{data:d,pts:r,dts:a,len:i}}return null}function Lp(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){const i=t.samples,s=i.length;if(!s)return void t.dropped++;{const t=i[s-1];e.pts=t.pts,e.dts=t.dts}}t.samples.push(e)}e.debug.length&&Lh.log(e.pts+"/"+e.dts+":"+e.debug)}class Ip{static getSilentFrame(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}const Pp=Math.pow(2,32)-1;class Bp{static init(){let e;for(e in Bp.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},Bp.types)Bp.types.hasOwnProperty(e)&&(Bp.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),i=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);Bp.HDLR_TYPES={video:t,audio:i};const s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),r=new Uint8Array([0,0,0,0,0,0,0,0]);Bp.STTS=Bp.STSC=Bp.STCO=r,Bp.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Bp.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Bp.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Bp.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const a=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),n=new Uint8Array([0,0,0,1]);Bp.FTYP=Bp.box(Bp.types.ftyp,a,n,a,o),Bp.DINF=Bp.box(Bp.types.dinf,Bp.box(Bp.types.dref,s))}static box(e,...t){let i=8,s=t.length;const r=s;for(;s--;)i+=t[s].byteLength;const a=new Uint8Array(i);for(a[0]=i>>24&255,a[1]=i>>16&255,a[2]=i>>8&255,a[3]=255&i,a.set(e,4),s=0,i=8;s>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,85,196,0,0]))}static mdia(e){return Bp.box(Bp.types.mdia,Bp.mdhd(e.timescale,e.duration),Bp.hdlr(e.type),Bp.minf(e))}static mfhd(e){return Bp.box(Bp.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))}static minf(e){return"audio"===e.type?Bp.box(Bp.types.minf,Bp.box(Bp.types.smhd,Bp.SMHD),Bp.DINF,Bp.stbl(e)):Bp.box(Bp.types.minf,Bp.box(Bp.types.vmhd,Bp.VMHD),Bp.DINF,Bp.stbl(e))}static moof(e,t,i){return Bp.box(Bp.types.moof,Bp.mfhd(e),Bp.traf(i,t))}static moov(e){let t=e.length;const i=[];for(;t--;)i[t]=Bp.trak(e[t]);return Bp.box.apply(null,[Bp.types.moov,Bp.mvhd(e[0].timescale,e[0].duration)].concat(i).concat(Bp.mvex(e)))}static mvex(e){let t=e.length;const i=[];for(;t--;)i[t]=Bp.trex(e[t]);return Bp.box.apply(null,[Bp.types.mvex,...i])}static mvhd(e,t){t*=e;const i=Math.floor(t/(Pp+1)),s=Math.floor(t%(Pp+1)),r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,i>>24,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return Bp.box(Bp.types.mvhd,r)}static sdtp(e){const t=e.samples||[],i=new Uint8Array(4+t.length);let s,r;for(s=0;s>>8&255),r.push(255&s),r=r.concat(Array.prototype.slice.call(i));for(t=0;t>>8&255),a.push(255&s),a=a.concat(Array.prototype.slice.call(i));const o=Bp.box(Bp.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|e.sps.length].concat(r).concat([e.pps.length]).concat(a))),n=e.width,l=e.height,h=e.pixelRatio[0],d=e.pixelRatio[1];return Bp.box(Bp.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,n>>8&255,255&n,l>>8&255,255&l,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,Bp.box(Bp.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),Bp.box(Bp.types.pasp,new Uint8Array([h>>24,h>>16&255,h>>8&255,255&h,d>>24,d>>16&255,d>>8&255,255&d])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static mp4a(e){const t=e.samplerate;return Bp.box(Bp.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0]),Bp.box(Bp.types.esds,Bp.esds(e)))}static mp3(e){const t=e.samplerate;return Bp.box(Bp.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,255&t,0,0]))}static stsd(e){return"audio"===e.type?"mp3"===e.segmentCodec&&"mp3"===e.codec?Bp.box(Bp.types.stsd,Bp.STSD,Bp.mp3(e)):Bp.box(Bp.types.stsd,Bp.STSD,Bp.mp4a(e)):Bp.box(Bp.types.stsd,Bp.STSD,Bp.avc1(e))}static tkhd(e){const t=e.id,i=e.duration*e.timescale,s=e.width,r=e.height,a=Math.floor(i/(Pp+1)),o=Math.floor(i%(Pp+1));return Bp.box(Bp.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,s>>8&255,255&s,0,0,r>>8&255,255&r,0,0]))}static traf(e,t){const i=Bp.sdtp(e),s=e.id,r=Math.floor(t/(Pp+1)),a=Math.floor(t%(Pp+1));return Bp.box(Bp.types.traf,Bp.box(Bp.types.tfhd,new Uint8Array([0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s])),Bp.box(Bp.types.tfdt,new Uint8Array([1,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,a>>24,a>>16&255,a>>8&255,255&a])),Bp.trun(e,i.length+16+20+8+16+8+8),i)}static trak(e){return e.duration=e.duration||4294967295,Bp.box(Bp.types.trak,Bp.tkhd(e),Bp.mdia(e))}static trex(e){const t=e.id;return Bp.box(Bp.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const i=e.samples||[],s=i.length,r=12+16*s,a=new Uint8Array(r);let o,n,l,h,d,c;for(t+=8+r,a.set(["video"===e.type?1:0,0,15,1,s>>>24&255,s>>>16&255,s>>>8&255,255&s,t>>>24&255,t>>>16&255,t>>>8&255,255&t],0),o=0;o>>24&255,l>>>16&255,l>>>8&255,255&l,h>>>24&255,h>>>16&255,h>>>8&255,255&h,d.isLeading<<2|d.dependsOn,d.isDependedOn<<6|d.hasRedundancy<<4|d.paddingValue<<1|d.isNonSync,61440&d.degradPrio,15&d.degradPrio,c>>>24&255,c>>>16&255,c>>>8&255,255&c],12+16*o);return Bp.box(Bp.types.trun,a)}static initSegment(e){Bp.types||Bp.init();const t=Bp.moov(e),i=new Uint8Array(Bp.FTYP.byteLength+t.byteLength);return i.set(Bp.FTYP),i.set(t,Bp.FTYP.byteLength),i}}Bp.types=void 0,Bp.HDLR_TYPES=void 0,Bp.STTS=void 0,Bp.STSC=void 0,Bp.STCO=void 0,Bp.STSZ=void 0,Bp.VMHD=void 0,Bp.SMHD=void 0,Bp.STSD=void 0,Bp.FTYP=void 0,Bp.DINF=void 0;function Mp(e,t,i=1,s=!1){const r=e*t*i;return s?Math.round(r):r}function Up(e,t=!1){return Mp(e,1e3,1/9e4,t)}let Fp,Op=null,Np=null;class jp{constructor(e,t,i,s=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=e,this.config=t,this.typeSupported=i,this.ISGenerated=!1,null===Op){const e=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Op=e?parseInt(e[1]):0}if(null===Np){const e=navigator.userAgent.match(/Safari\/(\d+)/i);Np=e?parseInt(e[1]):0}}destroy(){}resetTimeStamp(e){Lh.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){Lh.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){Lh.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1}getVideoStartPts(e){let t=!1;const i=e.reduce(((e,i)=>{const s=i.pts-e;return s<-4294967296?(t=!0,zp(e,i.pts)):s>0?e:i.pts}),e[0].pts);return t&&Lh.debug("PTS rollover detected"),i}remux(e,t,i,s,r,a,o,n){let l,h,d,c,u,p,f=r,m=r;const g=e.pid>-1,y=t.pid>-1,A=t.samples.length,b=e.samples.length>0,v=o&&A>0||A>1;if((!g||b)&&(!y||v)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(e,t,r,a));const i=this.isVideoContiguous;let s,o=-1;if(v&&(o=function(e){for(let t=0;t0){Lh.warn(`[mp4-remuxer]: Dropped ${o} out of ${A} video samples due to a missing keyframe`);const e=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(o),t.dropped+=o,m+=(t.samples[0].pts-e)/t.inputTimeScale,s=m}else-1===o&&(Lh.warn(`[mp4-remuxer]: No keyframe found out of ${A} video samples`),p=!1);if(this.ISGenerated){if(b&&v){const i=this.getVideoStartPts(t.samples),s=(zp(e.samples[0].pts,i)-i)/t.inputTimeScale;f+=Math.max(0,s),m+=Math.max(0,-s)}if(b){if(e.samplerate||(Lh.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(e,t,r,a)),h=this.remuxAudio(e,f,this.isAudioContiguous,a,y||v||n===yc?m:void 0),v){const s=h?h.endPTS-h.startPTS:0;t.inputTimeScale||(Lh.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(e,t,r,a)),l=this.remuxVideo(t,m,i,s)}}else v&&(l=this.remuxVideo(t,m,i,0));l&&(l.firstKeyFrame=o,l.independent=-1!==o,l.firstKeyFramePTS=s)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(i.samples.length&&(u=Gp(i,r,this._initPTS,this._initDTS)),s.samples.length&&(c=Vp(s,r,this._initPTS))),{audio:h,video:l,initSegment:d,independent:p,text:c,id3:u}}generateIS(e,t,i,s){const r=e.samples,a=t.samples,o=this.typeSupported,n={},l=this._initPTS;let h,d,c,u=!l||s,p="audio/mp4";if(u&&(h=d=1/0),e.config&&r.length){if(e.timescale=e.samplerate,"mp3"===e.segmentCodec)o.mpeg?(p="audio/mpeg",e.codec=""):o.mp3&&(e.codec="mp3");n.audio={id:"audio",container:p,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&o.mpeg?new Uint8Array(0):Bp.initSegment([e]),metadata:{channelCount:e.channelCount}},u&&(c=e.inputTimeScale,l&&c===l.timescale?u=!1:h=d=r[0].pts-Math.round(c*i))}if(t.sps&&t.pps&&a.length&&(t.timescale=t.inputTimeScale,n.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Bp.initSegment([t]),metadata:{width:t.width,height:t.height}},u))if(c=t.inputTimeScale,l&&c===l.timescale)u=!1;else{const e=this.getVideoStartPts(a),t=Math.round(c*i);d=Math.min(d,zp(a[0].dts,e)-t),h=Math.min(h,e-t)}if(Object.keys(n).length)return this.ISGenerated=!0,u?(this._initPTS={baseTime:h,timescale:c},this._initDTS={baseTime:d,timescale:c}):h=c=void 0,{tracks:n,initPTS:h,timescale:c}}remuxVideo(e,t,i,s){const r=e.inputTimeScale,a=e.samples,o=[],n=a.length,l=this._initPTS;let h,d,c=this.nextAvcDts,u=8,p=this.videoSampleDuration,f=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,g=!1;if(!i||null===c){c=t*r-(a[0].pts-zp(a[0].dts,a[0].pts))}const y=l.baseTime*r/l.timescale;for(let e=0;e0?e-1:e].dts&&(g=!0)}g&&a.sort((function(e,t){const i=e.dts-t.dts,s=e.pts-t.pts;return i||s})),h=a[0].dts,d=a[a.length-1].dts;const A=d-h,b=A?Math.round(A/(n-1)):p||e.inputTimeScale/30;if(i){const e=h-c,t=e>b,i=e<-1;if((t||i)&&(t?Lh.warn(`AVC: ${Up(e,!0)} ms (${e}dts) hole between fragments detected, filling it`):Lh.warn(`AVC: ${Up(-e,!0)} ms (${e}dts) overlapping between fragments detected`),!i||c>=a[0].pts)){h=c;const t=a[0].pts-e;a[0].dts=h,a[0].pts=t,Lh.log(`Video: First PTS/DTS adjusted: ${Up(t,!0)}/${Up(h,!0)}, delta: ${Up(e,!0)} ms`)}}h=Math.max(0,h);let v=0,_=0;for(let e=0;e0?t.dts-a[e-1].dts:b;if(l=e>0?t.pts-a[e-1].pts:b,i.stretchShortVideoTrack&&null!==this.nextAudioPts){const e=Math.floor(i.maxBufferHole*r),a=(s?f+s*r:this.nextAudioPts)-t.pts;a>e?(p=a-o,p<0?p=o:E=!0,Lh.log(`[mp4-remuxer]: It is approximately ${a/90} ms to the next segment; using duration ${p/90} ms for the last video frame.`)):p=o}else p=o}const d=Math.round(t.pts-t.dts);k=Math.min(k,p),R=Math.max(R,p),C=Math.min(C,l),x=Math.max(x,l),o.push(new Hp(t.key,p,h,d))}if(o.length)if(Op){if(Op<70){const e=o[0].flags;e.dependsOn=2,e.isNonSync=0}}else if(Np&&x-C0&&(s&&Math.abs(g-m)<9e3||Math.abs(zp(p[0].pts-y,g)-m)<20*l),p.forEach((function(e){e.pts=zp(e.pts-y,g)})),!i||m<0){if(p=p.filter((e=>e.pts>=0)),!p.length)return;m=0===r?0:s&&!u?Math.max(0,g):p[0].pts}if("aac"===e.segmentCodec){const t=this.config.maxAudioFramesDrift;for(let i=0,s=m;i=t*l&&h<1e4&&u){let t=Math.round(n/l);s=o-t*l,s<0&&(t--,s+=l),0===i&&(this.nextAudioPts=m=s),Lh.warn(`[mp4-remuxer]: Injecting ${t} audio frame @ ${(s/a).toFixed(3)}s due to ${Math.round(1e3*n/a)} ms gap.`);for(let a=0;a0))return;_+=f;try{A=new Uint8Array(_)}catch(e){return void this.observer.emit(Th.ERROR,Th.ERROR,{type:Eh.MUX_ERROR,details:kh.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:_,reason:`fail allocating audio mdat ${_}`})}if(!d){new DataView(A.buffer).setUint32(0,_),A.set(Bp.types.mdat,4)}}A.set(r,f);const l=r.byteLength;f+=l,c.push(new Hp(!0,n,l,0)),v=a}const S=c.length;if(!S)return;const T=c[c.length-1];this.nextAudioPts=m=v+o*T.duration;const E=d?new Uint8Array(0):Bp.moof(e.sequenceNumber++,b/o,wh({},e,{samples:c}));e.samples=[];const k=b/a,C=m/a,R={data1:E,data2:A,startPTS:k,endPTS:C,startDTS:k,endDTS:C,type:"audio",hasAudio:!0,hasVideo:!1,nb:S};return this.isAudioContiguous=!0,R}remuxEmptyAudio(e,t,i,s){const r=e.inputTimeScale,a=r/(e.samplerate?e.samplerate:r),o=this.nextAudioPts,n=this._initDTS,l=9e4*n.baseTime/n.timescale,h=(null!==o?o:s.startDTS*r)+l,d=s.endDTS*r+l,c=1024*a,u=Math.ceil((d-h)/c),p=Ip.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(Lh.warn("[mp4-remuxer]: remux empty Audio"),!p)return void Lh.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");const f=[];for(let e=0;e4294967296;)e+=i;return e}function Gp(e,t,i,s){const r=e.samples.length;if(!r)return;const a=e.inputTimeScale;for(let o=0;oe.pts-t.pts));const a=e.samples;return e.samples=[],{samples:a}}class Hp{constructor(e,t,i,s){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=i,this.cts=s,this.flags=new Wp(e)}}class Wp{constructor(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}}function $p(e,t){const i=null==e?void 0:e.codec;return i&&i.length>4?i:"hvc1"===i||"hev1"===i?"hvc1.1.6.L120.90":"av01"===i?"av01.0.04M.08":"avc1"===i||t===Nh?"avc1.42e01e":"mp4a.40.5"}try{Fp=self.performance.now.bind(self.performance)}catch(e){Lh.debug("Unable to use Performance API on this environment"),Fp="undefined"!=typeof self&&self.Date.now}const Jp=[{demux:class{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,i,s){const r=this.videoTrack=ep("video",1),a=this.audioTrack=ep("audio",1),o=this.txtTrack=ep("text",1);if(this.id3Track=ep("id3",1),this.timeOffset=0,null==e||!e.byteLength)return;const n=Id(e);if(n.video){const{id:e,timescale:t,codec:i}=n.video;r.id=e,r.timescale=o.timescale=t,r.codec=i}if(n.audio){const{id:e,timescale:t,codec:i}=n.audio;a.id=e,a.timescale=t,a.codec=i}o.id=Td.text,r.sampleDuration=0,r.duration=a.duration=s}resetContiguity(){this.remainderData=null}static probe(e){return Dd(e=e.length>16384?e.subarray(0,16384):e,["moof"]).length>0}demux(e,t){this.timeOffset=t;let i=e;const s=this.videoTrack,r=this.txtTrack;if(this.config.progressive){this.remainderData&&(i=Md(this.remainderData,e));const t=function(e){const t={valid:null,remainder:null},i=Dd(e,["moof"]);if(!i)return t;if(i.length<2)return t.remainder=e,t;const s=i[i.length-1];return t.valid=rd(e,0,s.byteOffset-8),t.remainder=rd(e,s.byteOffset-8),t}(i);this.remainderData=t.remainder,s.samples=t.valid||new Uint8Array}else s.samples=i;const a=this.extractID3Track(s,t);return r.samples=Ud(t,s),{videoTrack:s,audioTrack:this.audioTrack,id3Track:a,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,i=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const s=this.extractID3Track(t,this.timeOffset);return i.samples=Ud(e,t),{videoTrack:t,audioTrack:ep(),id3Track:s,textTrack:ep()}}extractID3Track(e,t){const i=this.id3Track;if(e.samples.length){const s=Dd(e.samples,["emsg"]);s&&s.forEach((e=>{const s=function(e){const t=e[0];let i="",s="",r=0,a=0,o=0,n=0,l=0,h=0;if(0===t){for(;"\0"!==Ed(e.subarray(h,h+1));)i+=Ed(e.subarray(h,h+1)),h+=1;for(i+=Ed(e.subarray(h,h+1)),h+=1;"\0"!==Ed(e.subarray(h,h+1));)s+=Ed(e.subarray(h,h+1)),h+=1;s+=Ed(e.subarray(h,h+1)),h+=1,r=Cd(e,12),a=Cd(e,16),n=Cd(e,20),l=Cd(e,24),h=28}else if(1===t){h+=4,r=Cd(e,h),h+=4;const t=Cd(e,h);h+=4;const a=Cd(e,h);for(h+=4,o=2**32*t+a,Number.isSafeInteger(o)||(o=Number.MAX_SAFE_INTEGER,Lh.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),n=Cd(e,h),h+=4,l=Cd(e,h),h+=4;"\0"!==Ed(e.subarray(h,h+1));)i+=Ed(e.subarray(h,h+1)),h+=1;for(i+=Ed(e.subarray(h,h+1)),h+=1;"\0"!==Ed(e.subarray(h,h+1));)s+=Ed(e.subarray(h,h+1)),h+=1;s+=Ed(e.subarray(h,h+1)),h+=1}return{schemeIdUri:i,value:s,timeScale:r,presentationTime:o,presentationTimeDelta:a,eventDuration:n,id:l,payload:e.subarray(h,e.byteLength)}}(e);if(cp.test(s.schemeIdUri)){const e=Sh(s.presentationTime)?s.presentationTime/s.timeScale:t+s.presentationTimeDelta/s.timeScale;let r=4294967295===s.eventDuration?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;r<=.001&&(r=Number.POSITIVE_INFINITY);const a=s.payload;i.samples.push({data:a,len:a.byteLength,dts:e,pts:e,type:Rc,duration:r})}}))}return i}demuxSampleAes(e,t,i){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}},remux:class{constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,i,s){this.audioCodec=t,this.videoCodec=i,this.generateInitSegment(function(e,t){if(!e||!t)return e;const i=t.keyId;i&&t.isCommonEncryption&&Dd(e,["moov","trak"]).forEach((e=>{const t=Dd(e,["mdia","minf","stbl","stsd"])[0].subarray(8);let s=Dd(t,["enca"]);const r=s.length>0;r||(s=Dd(t,["encv"])),s.forEach((e=>{Dd(r?e.subarray(28):e.subarray(78),["sinf"]).forEach((e=>{const t=Pd(e);if(t){const e=t.subarray(8,24);e.some((e=>0!==e))||(Lh.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${_d(e)} -> ${_d(i)}`),t.set(i,8))}}))}))}));return e}(e,s)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:i}=this;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);const s=this.initData=Id(e);t||(t=$p(s.audio,Oh)),i||(i=$p(s.video,Nh));const r={};s.audio&&s.video?r.audiovideo={container:"video/mp4",codec:t+","+i,initSegment:e,id:"main"}:s.audio?r.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:s.video?r.video={container:"video/mp4",codec:i,initSegment:e,id:"main"}:Lh.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=r}remux(e,t,i,s,r,a){var o,n;let{initPTS:l,lastEndTime:h}=this;const d={audio:void 0,video:void 0,text:s,id3:i,initSegment:void 0};Sh(h)||(h=this.lastEndTime=r||0);const c=t.samples;if(null==c||!c.length)return d;const u={initPTS:void 0,timescale:1};let p=this.initData;if(null!=(o=p)&&o.length||(this.generateInitSegment(c),p=this.initData),null==(n=p)||!n.length)return Lh.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),d;this.emitInitSegment&&(u.tracks=this.initTracks,this.emitInitSegment=!1);const f=function(e,t){let i=0,s=0,r=0;const a=Dd(e,["moof","traf"]);for(let e=0;ee+t.info.duration||0),0))}return t}return s||r}(c,p),m=function(e,t){return Dd(t,["moof","traf"]).reduce(((t,i)=>{const s=Dd(i,["tfdt"])[0],r=s[0],a=Dd(i,["tfhd"]).reduce(((t,i)=>{const a=Cd(i,4),o=e[a];if(o){let e=Cd(s,4);if(1===r){if(e===wd)return Lh.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),t;e*=wd+1,e+=Cd(s,8)}const i=e/(o.timescale||9e4);if(isFinite(i)&&(null===t||ir}(l,g,r,f)||u.timescale!==l.timescale&&a)&&(u.initPTS=g-r,l&&1===l.timescale&&Lh.warn("Adjusting initPTS by "+(u.initPTS-l.baseTime)),this.initPTS=l={baseTime:u.initPTS,timescale:1});const y=e?g-l.baseTime/l.timescale:h,A=y+f;!function(e,t,i){Dd(t,["moof","traf"]).forEach((t=>{Dd(t,["tfhd"]).forEach((s=>{const r=Cd(s,4),a=e[r];if(!a)return;const o=a.timescale||9e4;Dd(t,["tfdt"]).forEach((e=>{const t=e[0];let s=Cd(e,4);if(0===t)s-=i*o,s=Math.max(s,0),xd(e,4,s);else{s*=Math.pow(2,32),s+=Cd(e,8),s-=i*o,s=Math.max(s,0);const t=Math.floor(s/(wd+1)),r=Math.floor(s%(wd+1));xd(e,4,t),xd(e,8,r)}}))}))}))}(p,c,l.baseTime/l.timescale),f>0?this.lastEndTime=A:(Lh.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const b=!!p.audio,v=!!p.video;let _="";b&&(_+="audio"),v&&(_+="video");const w={data1:c,startPTS:y,startDTS:y,endPTS:A,endDTS:A,type:_,hasAudio:b,hasVideo:v,nb:1,dropped:0};return d.audio="audio"===w.type?w:void 0,d.video="audio"!==w.type?w:void 0,d.initSegment=u,d.id3=Gp(i,r,l,l),s.samples.length&&(d.text=Vp(s,r,l)),d}}},{demux:Ep,remux:jp},{demux:class extends tp{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,i,s){super.resetInitSegment(e,t,i,s),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:s,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;let t=(nd(e,0)||[]).length;for(let i=e.length;t0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(i=t);return i}(a,t);if(b&&"AES-128"===b.method){const e=this.getDecrypter();if(!e.isSync())return this.decryptionPromise=e.webCryptoDecrypt(a,b.key.buffer,b.iv.buffer).then((e=>{const t=this.push(e,null,i);return this.decryptionPromise=null,t})),this.decryptionPromise;{let t=e.softwareDecrypt(a,b.key.buffer,b.iv.buffer);if(i.part>-1&&(t=e.flush()),!t)return r.executeEnd=Fp(),qp(i);a=new Uint8Array(t)}}const v=this.needsProbing(h,d);if(v){const e=this.configureTransmuxer(a);if(e)return Lh.warn(`[transmuxer] ${e.message}`),this.observer.emit(Th.ERROR,Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.FRAG_PARSING_ERROR,fatal:!1,error:e,reason:e.message}),r.executeEnd=Fp(),qp(i)}(h||d||p||v)&&this.resetInitSegment(A,f,m,y,t),(h||p||v)&&this.resetInitialTimestamp(g),l||this.resetContiguity();const _=this.transmux(a,b,u,c,i),w=this.currentTransmuxState;return w.contiguous=!0,w.discontinuity=!1,w.trackSwitch=!1,r.executeEnd=Fp(),_}flush(e){const t=e.transmuxing;t.executeStart=Fp();const{decrypter:i,currentTransmuxState:s,decryptionPromise:r}=this;if(r)return r.then((()=>this.flush(e)));const a=[],{timeOffset:o}=s;if(i){const t=i.flush();t&&a.push(this.push(t,null,e))}const{demuxer:n,remuxer:l}=this;if(!n||!l)return t.executeEnd=Fp(),[qp(e)];const h=n.flush(o);return Yp(h)?h.then((t=>(this.flushRemux(a,t,e),a))):(this.flushRemux(a,h,e),a)}flushRemux(e,t,i){const{audioTrack:s,videoTrack:r,id3Track:a,textTrack:o}=t,{accurateTimeOffset:n,timeOffset:l}=this.currentTransmuxState;Lh.log(`[transmuxer.ts]: Flushed fragment ${i.sn}${i.part>-1?" p: "+i.part:""} of level ${i.level}`);const h=this.remuxer.remux(s,r,a,o,l,n,!0,this.id);e.push({remuxResult:h,chunkMeta:i}),i.transmuxing.executeEnd=Fp()}resetInitialTimestamp(e){const{demuxer:t,remuxer:i}=this;t&&i&&(t.resetTimeStamp(e),i.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,i,s,r){const{demuxer:a,remuxer:o}=this;a&&o&&(a.resetInitSegment(e,t,i,s),o.resetInitSegment(e,t,i,r))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,i,s,r){let a;return a=t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,i,s,r):this.transmuxUnencrypted(e,i,s,r),a}transmuxUnencrypted(e,t,i,s){const{audioTrack:r,videoTrack:a,id3Track:o,textTrack:n}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(r,a,o,n,t,i,!1,this.id),chunkMeta:s}}transmuxSampleAes(e,t,i,s,r){return this.demuxer.demuxSampleAes(e,t,i).then((e=>({remuxResult:this.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,i,s,!1,this.id),chunkMeta:r})))}configureTransmuxer(e){const{config:t,observer:i,typeSupported:s,vendor:r}=this;let a;for(let t=0,i=Jp.length;t({remuxResult:{},chunkMeta:e});function Yp(e){return"then"in e&&e.then instanceof Function}class Qp{constructor(e,t,i,s,r){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=i,this.duration=s,this.defaultInitPts=r||null}}class Xp{constructor(e,t,i,s,r,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=i,this.trackSwitch=s,this.timeOffset=r,this.initSegmentChange=a}}var Zp={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,i="~";function s(){}function r(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function a(e,t,s,a,o){if("function"!=typeof s)throw new TypeError("The listener must be a function");var n=new r(s,a||e,o),l=i?i+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],n]:e._events[l].push(n):(e._events[l]=n,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new s:delete e._events[t]}function n(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(i=!1)),n.prototype.eventNames=function(){var e,s,r=[];if(0===this._eventsCount)return r;for(s in e=this._events)t.call(e,s)&&r.push(i?s.slice(1):s);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},n.prototype.listeners=function(e){var t=i?i+e:e,s=this._events[t];if(!s)return[];if(s.fn)return[s.fn];for(var r=0,a=s.length,o=new Array(a);r!1};class sf{constructor(e,t,i,s){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const r=e.config;this.hls=e,this.id=t,this.useWorker=!!r.enableWorker,this.onTransmuxComplete=i,this.onFlush=s;const a=(e,t)=>{(t=t||{}).frag=this.frag,t.id=this.id,e===Th.ERROR&&(this.error=t.error),this.hls.trigger(e,t)};this.observer=new ef,this.observer.on(Th.FRAG_DECRYPTED,a),this.observer.on(Th.ERROR,a);const o={mp4:tf.isTypeSupported("video/mp4"),mpeg:tf.isTypeSupported("audio/mpeg"),mp3:tf.isTypeSupported('audio/mp4; codecs="mp3"')},n=navigator.vendor;if(this.useWorker&&"undefined"!=typeof Worker){if(r.workerPath||"function"==typeof __HLS_WORKER_BUNDLE__){try{r.workerPath?(Lh.log(`loading Web Worker ${r.workerPath} for "${t}"`),this.workerContext=function(e){const t=new self.URL(e,self.location.href).href;return{worker:new self.Worker(t),scriptURL:t}}(r.workerPath)):(Lh.log(`injecting Web Worker for "${t}"`),this.workerContext=function(){const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e);return{worker:new self.Worker(t),objectURL:t}}()),this.onwmsg=e=>this.onWorkerMessage(e);const{worker:e}=this.workerContext;e.addEventListener("message",this.onwmsg),e.onerror=e=>{const i=new Error(`${e.message} (${e.filename}:${e.lineno})`);r.enableWorker=!1,Lh.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(Th.ERROR,{type:Eh.OTHER_ERROR,details:kh.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:i})},e.postMessage({cmd:"init",typeSupported:o,vendor:n,id:t,config:JSON.stringify(r)})}catch(e){Lh.warn(`Error setting up "${t}" Web Worker, fallback to inline`,e),this.resetWorker(),this.error=null,this.transmuxer=new Kp(this.observer,o,r,n,t)}return}}this.transmuxer=new Kp(this.observer,o,r,n,t)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:t}=this.workerContext;t&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,t,i,s,r,a,o,n,l,h){var d,c;l.transmuxing.start=self.performance.now();const{transmuxer:u}=this,p=a?a.start:r.start,f=r.decryptdata,m=this.frag,g=!(m&&r.cc===m.cc),y=!(m&&l.level===m.level),A=m?l.sn-m.sn:-1,b=this.part?l.part-this.part.index:-1,v=0===A&&l.id>1&&l.id===(null==m?void 0:m.stats.chunkCount),_=!y&&(1===A||0===A&&(1===b||v&&b<=0)),w=self.performance.now();(y||A||0===r.stats.parsing.start)&&(r.stats.parsing.start=w),!a||!b&&_||(a.stats.parsing.start=w);const S=!(m&&(null==(d=r.initSegment)?void 0:d.url)===(null==(c=m.initSegment)?void 0:c.url)),T=new Xp(g,_,n,y,p,S);if(!_||g||S){Lh.log(`[transmuxer-interface, ${r.type}]: Starting new transmux session for sn: ${l.sn} p: ${l.part} level: ${l.level} id: ${l.id}\n discontinuity: ${g}\n trackSwitch: ${y}\n contiguous: ${_}\n accurateTimeOffset: ${n}\n timeOffset: ${p}\n initSegmentChange: ${S}`);const e=new Qp(i,s,t,o,h);this.configureTransmuxer(e)}if(this.frag=r,this.part=a,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:f,chunkMeta:l,state:T},e instanceof ArrayBuffer?[e]:[]);else if(u){const t=u.push(e,f,l,T);Yp(t)?(u.async=!0,t.then((e=>{this.handleTransmuxComplete(e)})).catch((e=>{this.transmuxerError(e,l,"transmuxer-interface push error")}))):(u.async=!1,this.handleTransmuxComplete(t))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let i=t.flush(e);Yp(i)||t.async?(Yp(i)||(i=Promise.resolve(i)),i.then((t=>{this.handleFlushResult(t,e)})).catch((t=>{this.transmuxerError(t,e,"transmuxer-interface flush error")}))):this.handleFlushResult(i,e)}}transmuxerError(e,t,i){this.hls&&(this.error=e,this.hls.trigger(Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:i}))}handleFlushResult(e,t){e.forEach((e=>{this.handleTransmuxComplete(e)})),this.onFlush(t)}onWorkerMessage(e){const t=e.data,i=this.hls;switch(t.event){case"init":{var s;const e=null==(s=this.workerContext)?void 0:s.objectURL;e&&self.URL.revokeObjectURL(e);break}case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":Lh[t.data.logType]&&Lh[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,i.trigger(t.event,t.data)}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}class rf{constructor(e,t,i,s){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=i,this.hls=s}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:i,media:s,stalled:r}=this;if(null===s)return;const{currentTime:a,seeking:o}=s,n=this.seeking&&!o,l=!this.seeking&&o;if(this.seeking=o,a!==e){if(this.moved=!0,null!==r){if(this.stallReported){const e=self.performance.now()-r;Lh.warn(`playback not stuck anymore @${a}, after ${Math.round(e)}ms`),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if(l||n)return void(this.stalled=null);if(s.paused&&!o||s.ended||0===s.playbackRate||!Ru.getBuffered(s).length)return;const h=Ru.bufferInfo(s,a,0),d=h.len>0,c=h.nextStart||0;if(!d&&!c)return;if(o){const e=h.len>2,i=!c||t&&t.start<=a||c-a>2&&!this.fragmentTracker.getPartialFragment(a);if(e||i)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var u;const e=Math.max(c,h.start||0)-a,t=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,i=(null==t||null==(u=t.details)?void 0:u.live)?2*t.details.targetduration:2,s=this.fragmentTracker.getPartialFragment(a);if(e>0&&(e<=i||s))return void this._trySkipBufferHole(s)}const p=self.performance.now();if(null===r)return void(this.stalled=p);const f=p-r;if(!o&&f>=250&&(this._reportStall(h),!this.media))return;const m=Ru.bufferInfo(s,a,i.maxBufferHole);this._tryFixBufferStall(m,f)}_tryFixBufferStall(e,t){const{config:i,fragmentTracker:s,media:r}=this;if(null===r)return;const a=r.currentTime,o=s.getPartialFragment(a);if(o){if(this._trySkipBufferHole(o)||!this.media)return}(e.len>i.maxBufferHole||e.nextStart&&e.nextStart-a1e3*i.highBufferWatchdogPeriod&&(Lh.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:i,stallReported:s}=this;if(!s&&i){this.stallReported=!0;const s=new Error(`Playback stalling at @${i.currentTime} due to low buffer (${JSON.stringify(e)})`);Lh.warn(s.message),t.trigger(Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:i,media:s}=this;if(null===s)return 0;const r=s.currentTime,a=Ru.bufferInfo(s,r,0),o=r0&&a.len<1&&s.readyState<3,h=o-r;if(h>0&&(n||l)){if(h>t.maxBufferHole){const{fragmentTracker:t}=this;let i=!1;if(0===r){const e=t.getAppendedFrag(0,gc);e&&o1?(e=0,this.bitrateTest=!0):e=i.nextAutoLevel),this.level=i.nextLoadLevel=e,this.loadedmetadata=!1}t>0&&-1===e&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=zu,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=ju}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Qu:{var e;const{levels:t,level:i}=this,s=null==t||null==(e=t[i])?void 0:e.details;if(s&&(!s.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(s))break;this.state=zu;break}if(this.hls.nextLoadLevel!==this.level){this.state=zu;break}break}case Hu:{var t;const e=self.performance.now(),i=this.retryDate;(!i||e>=i||null!=(t=this.media)&&t.seeking)&&(this.resetStartWhenNotLoaded(this.level),this.state=zu)}}this.state===zu&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:i,media:s}=this,{config:r,nextLoadLevel:a}=e;if(null===t||!s&&(this.startFragRequested||!r.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(null==i||!i[a])return;const o=i[a],n=this.getMainFwdBufferInfo();if(null===n)return;const l=this.getLevelDetails();if(l&&this._streamEnded(n,l)){const e={};return this.altAudio&&(e.type="video"),this.hls.trigger(Th.BUFFER_EOS,e),void(this.state=Ku)}e.loadLevel!==a&&-1===e.manualLevel&&this.log(`Adapting to level ${a} from level ${this.level}`),this.level=e.nextLoadLevel=a;const h=o.details;if(!h||this.state===Qu||h.live&&this.levelLastLoaded!==a)return this.level=a,void(this.state=Qu);const d=n.len,c=this.getMaxBufferLength(o.maxBitrate);if(d>=c)return;this.backtrackFragment&&this.backtrackFragment.start>n.end&&(this.backtrackFragment=null);const u=this.backtrackFragment?this.backtrackFragment.start:n.end;let p=this.getNextFragment(u,h);if(this.couldBacktrack&&!this.fragPrevious&&p&&"initSegment"!==p.sn&&this.fragmentTracker.getState(p)!==yu){var f;const e=(null!=(f=this.backtrackFragment)?f:p).sn-h.startSN,t=h.fragments[e-1];t&&p.cc===t.cc&&(p=t,this.fragmentTracker.removeFragment(t))}else this.backtrackFragment&&n.len&&(this.backtrackFragment=null);if(p&&this.isLoopLoading(p,u)){if(!p.gap){const e=this.audioOnly&&!this.altAudio?Oh:Nh,t=(e===Nh?this.videoBuffer:this.mediaBuffer)||this.media;t&&this.afterBufferFlushed(t,e,gc)}p=this.getNextFragmentLoopLoading(p,h,n,gc,c)}p&&(!p.initSegment||p.initSegment.data||this.bitrateTest||(p=p.initSegment),this.loadFragment(p,o,u))}loadFragment(e,t,i){const s=this.fragmentTracker.getState(e);this.fragCurrent=e,s===fu||s===gu?"initSegment"===e.sn?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):(this.startFragRequested=!0,super.loadFragment(e,t,i)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,gc)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(null!=t&&t.readyState){let i;const s=this.getAppendedFrag(t.currentTime);s&&s.start>1&&this.flushMainBuffer(0,s.start-1);const r=this.getLevelDetails();if(null!=r&&r.live){const e=this.getMainFwdBufferInfo();if(!e||e.len<2*r.targetduration)return}if(!t.paused&&e){const t=e[this.hls.nextLoadLevel],s=this.fragLastKbps;i=s&&this.fragCurrent?this.fragCurrent.duration*t.maxBitrate/(1e3*s)+1:0}else i=0;const a=this.getBufferedFrag(t.currentTime+i);if(a){const e=this.followingBufferedFrag(a);if(e){this.abortCurrentFrag();const t=e.maxStartPTS?e.maxStartPTS:e.start,i=e.duration,s=Math.max(a.end,t+Math.min(Math.max(i-this.config.maxFragLookUpTolerance,.5*i),.75*i));this.flushMainBuffer(s,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Gu:case Vu:case Hu:case $u:case Ju:this.state=zu}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const i=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),i.addEventListener("playing",this.onvplaying),i.addEventListener("seeked",this.onvseeked),this.gapController=new rf(this.config,i,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;Sh(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const i=this.getMainFwdBufferInfo();null!==i&&0!==i.len?this.tick():this.warn(`Main forward buffer length on "seeked" event ${i?i.len:"empty"})`)}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(Th.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.levels=this.fragPlaying=this.backtrackFragment=null,this.altAudio=this.audioOnly=!1}onManifestParsed(e,t){let i,s=!1,r=!1;t.levels.forEach((e=>{i=e.audioCodec,i&&(-1!==i.indexOf("mp4a.40.2")&&(s=!0),-1!==i.indexOf("mp4a.40.5")&&(r=!0))})),this.audioCodecSwitch=s&&r&&!function(){var e;const t=Zu();return"function"==typeof(null==t||null==(e=t.prototype)?void 0:e.changeType)}(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:i}=this;if(!i||this.state!==zu)return;const s=i[t.level];(!s.details||s.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(s.details))&&(this.state=Qu)}onLevelLoaded(e,t){var i;const{levels:s}=this,r=t.level,a=t.details,o=a.totalduration;if(!s)return void this.warn(`Levels were reset while loading level ${r}`);this.log(`Level ${r} loaded [${a.startSN},${a.endSN}]${a.lastPartSn?`[part-${a.lastPartSn}-${a.lastPartIndex}]`:""}, cc [${a.startCC}, ${a.endCC}] duration:${o}`);const n=s[r],l=this.fragCurrent;!l||this.state!==Vu&&this.state!==Hu||l.level===t.level&&l.urlId===n.urlId||!l.loader||this.abortCurrentFrag();let h=0;if(a.live||null!=(i=n.details)&&i.live){if(this.checkLiveUpdate(a),a.deltaUpdateFailed)return;h=this.alignPlaylists(a,n.details)}if(n.details=a,this.levelLastLoaded=r,this.hls.trigger(Th.LEVEL_UPDATED,{details:a,level:r}),this.state===Qu){if(this.waitForCdnTuneIn(a))return;this.state=zu}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,h),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:i,part:s,payload:r}=e,{levels:a}=this;if(!a)return void this.warn(`Levels were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);const o=a[i.level],n=o.details;if(!n)return this.warn(`Dropping fragment ${i.sn} of level ${i.level} after level details were reset`),void this.fragmentTracker.removeFragment(i);const l=o.videoCodec,h=n.PTSKnown||!n.live,d=null==(t=i.initSegment)?void 0:t.data,c=this._getAudioCodec(o),u=this.transmuxer=this.transmuxer||new sf(this.hls,gc,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),p=s?s.index:-1,f=-1!==p,m=new xu(i.level,i.sn,i.stats.chunkCount,r.byteLength,p,f),g=this.initPTS[i.cc];u.push(r,d,c,l,i,s,n.totalduration,h,m,g)}onAudioTrackSwitching(e,t){const i=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const e=this.fragCurrent;e&&(this.log("Switching to main audio track, cancel main fragment load"),e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const e=this.hls;i&&(e.trigger(Th.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),e.trigger(Th.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const i=t.id,s=!!this.hls.audioTracks[i].url;if(s){const e=this.videoBuffer;e&&this.mediaBuffer!==e&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=e)}this.altAudio=s,this.tick()}onBufferCreated(e,t){const i=t.tracks;let s,r,a=!1;for(const e in i){const t=i[e];if("main"===t.id){if(r=e,s=t,"video"===e){const t=i[e];t&&(this.videoBuffer=t.buffer)}}else a=!0}a&&s?(this.log(`Alternate track found, use ${r}.buffered to schedule main fragment loading`),this.mediaBuffer=s.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:i,part:s}=t;if(i&&i.type!==gc)return;if(this.fragContextChanged(i))return this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}`),void(this.state===Ju&&(this.state=zu));const r=s?s.stats:i.stats;this.fragLastKbps=Math.round(8*r.total/(r.buffering.end-r.loading.first)),"initSegment"!==i.sn&&(this.fragPrevious=i),this.fragBufferedComplete(i,s)}onError(e,t){var i;if(t.fatal)this.state=qu;else switch(t.details){case kh.FRAG_GAP:case kh.FRAG_PARSING_ERROR:case kh.FRAG_DECRYPT_ERROR:case kh.FRAG_LOAD_ERROR:case kh.FRAG_LOAD_TIMEOUT:case kh.KEY_LOAD_ERROR:case kh.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(gc,t);break;case kh.LEVEL_LOAD_ERROR:case kh.LEVEL_LOAD_TIMEOUT:case kh.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==Qu||(null==(i=t.context)?void 0:i.type)!==pc||(this.state=zu);break;case kh.BUFFER_FULL_ERROR:if(!t.parent||"main"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case kh.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}checkBuffer(){const{media:e,gapController:t}=this;if(e&&t&&e.readyState){if(this.loadedmetadata||!Ru.getBuffered(e).length){const e=this.state!==zu?this.fragCurrent:null;t.poll(this.lastCurrentTime,e)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=zu,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==Oh||this.audioOnly&&!this.altAudio){const e=(t===Nh?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(e,t,gc)}}onLevelsUpdated(e,t){this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let i=this.startPosition;if(i>=0&&t0&&(r{const{hls:s}=this;if(!i||this.fragContextChanged(e))return;t.fragmentError=0,this.state=zu,this.startFragRequested=!1,this.bitrateTest=!1;const r=e.stats;r.parsing.start=r.parsing.end=r.buffering.start=r.buffering.end=self.performance.now(),s.trigger(Th.FRAG_LOADED,i),e.bitrateTest=!1}))}_handleTransmuxComplete(e){var t;const i="main",{hls:s}=this,{remuxResult:r,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o)return void this.resetWhenMissingContext(a);const{frag:n,part:l,level:h}=o,{video:d,text:c,id3:u,initSegment:p}=r,{details:f}=h,m=this.altAudio?void 0:r.audio;if(this.fragContextChanged(n))this.fragmentTracker.removeFragment(n);else{if(this.state=$u,p){if(null!=p&&p.tracks){const e=n.initSegment||n;this._bufferInitSegment(h,p.tracks,e,a),s.trigger(Th.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:i,tracks:p.tracks})}const e=p.initPTS,t=p.timescale;Sh(e)&&(this.initPTS[n.cc]={baseTime:e,timescale:t},s.trigger(Th.INIT_PTS_FOUND,{frag:n,id:i,initPTS:e,timescale:t}))}if(d&&f&&"initSegment"!==n.sn){const e=f.fragments[n.sn-1-f.startSN],t=n.sn===f.startSN,i=!e||n.cc>e.cc;if(!1!==r.independent){const{startPTS:e,endPTS:s,startDTS:r,endDTS:o}=d;if(l)l.elementaryStreams[d.type]={startPTS:e,endPTS:s,startDTS:r,endDTS:o};else if(d.firstKeyFrame&&d.independent&&1===a.id&&!i&&(this.couldBacktrack=!0),d.dropped&&d.independent){const r=this.getMainFwdBufferInfo(),a=(r?r.end:this.getLoadPosition())+this.config.maxBufferHole,l=d.firstKeyFramePTS?d.firstKeyFramePTS:e;if(!t&&a{const r=t[e].initSegment;null!=r&&r.byteLength&&this.hls.trigger(Th.BUFFER_APPENDING,{type:e,data:r,frag:i,part:null,chunkMeta:s,parent:i.type})})),this.tick()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,gc)}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=zu}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&!1===e.seeking){const i=e.currentTime;if(Ru.isBuffered(e,i)?t=this.getAppendedFrag(i):Ru.isBuffered(e,i+.1)&&(t=this.getAppendedFrag(i+.1)),t){this.backtrackFragment=null;const e=this.fragPlaying,i=t.level;e&&t.sn===e.sn&&e.level===i&&t.urlId===e.urlId||(this.fragPlaying=t,this.hls.trigger(Th.FRAG_CHANGED,{frag:t}),e&&e.level===i||this.hls.trigger(Th.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,i=this.currentFrag;if(i&&Sh(t)&&Sh(i.programDateTime)){const e=i.programDateTime+1e3*(t-i.start);return new Date(e)}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class of{constructor(e,t=0,i=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=i}sample(e,t){const i=Math.pow(this.alpha_,e);this.estimate_=t*(1-i)+i*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class nf{constructor(e,t,i,s=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=i,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new of(e),this.fast_=new of(t),this.defaultTTFB_=s,this.ttfb_=new of(e)}update(e,t){const{slow_:i,fast_:s,ttfb_:r}=this;i.halfLife!==e&&(this.slow_=new of(e,i.getEstimate(),i.getTotalWeight())),s.halfLife!==t&&(this.fast_=new of(t,s.getEstimate(),s.getTotalWeight())),r.halfLife!==e&&(this.ttfb_=new of(e,r.getEstimate(),r.getTotalWeight()))}sample(e,t){const i=(e=Math.max(e,this.minDelayMs_))/1e3,s=8*t/i;this.fast_.sample(i,s),this.slow_.sample(i,s)}sampleTTFB(e){const t=e/1e3,i=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(i,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}class lf{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let i;return e.length?(i=1===e.length?e[0]:function(e,t){const i=new Uint8Array(t);let s=0;for(let t=0;te[i]!==t[i]))}class cf{constructor(e){this.buffered=void 0;const t=(t,i,s)=>{if((i>>>=0)>s-1)throw new DOMException(`Failed to execute '${t}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${s})`);return e[i][t]};this.buffered={get length(){return e.length},end:i=>t("end",i,e.length),start:i=>t("start",i,e.length)}}}function uf(e){const t=[];for(let i=0;i{t=e})),s={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(s,e),i}executeNext(e){const{buffers:t,queues:i}=this,s=t[e],r=i[e];if(r.length){const t=r[0];try{t.execute()}catch(i){Lh.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),t.onError(i),null!=s&&s.updating||(r.shift(),this.executeNext(e))}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const ff=qd(),mf=/([ha]vc.)(?:\.[^.,]+)+/;const gf={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},yf=function(e){let t=e;return gf.hasOwnProperty(e)&&(t=gf[e]),String.fromCharCode(t)},Af=15,bf=100,vf={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},_f={17:2,18:4,21:6,22:8,23:10,19:13,20:15},wf={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Sf={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Tf=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Ef{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const i="function"==typeof t?t():t;Lh.log(`${this.time} [${e}] ${i}`)}}}const kf=function(e){const t=[];for(let i=0;ibf&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=bf)}moveCursor(e){const t=this.pos+e;if(e>1)for(let e=this.pos+1;e=144&&this.backSpace();const t=yf(e);this.pos>=bf?this.logger.log(0,(()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!")):(this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1))}clearFromPos(e){let t;for(t=e;t"pacData = "+JSON.stringify(e)));let t=e.row-1;if(this.nrRollUpRows&&t"bkgData = "+JSON.stringify(e))),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(null===this.nrRollUpRows)return void this.logger.log(3,"roll_up but nrRollUpRows not set yet");this.logger.log(1,(()=>this.getDisplayText()));const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let i="",s=-1;for(let i=0;i0&&(i=e?"["+t.join(" | ")+"]":t.join("\n")),i}getTextAndFormat(){return this.rows}}class Lf{constructor(e,t,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Df(i),this.nonDisplayedMemory=new Df(i),this.lastOutputScreen=new Df(i),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,(()=>"MODE="+e)),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let t=0;tt+": "+this.writeScreen.getDisplayText(!0))),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,(()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0))),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(()=>"DISP: "+this.displayedMemory.getDisplayText()))}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{const i=Math.floor(e/2)-16,s=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=s[i]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class If{constructor(e,t,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;const s=new Ef;this.channels=[null,new Lf(e,t,s),new Lf(e+1,i,s)],this.cmdHistory={a:null,b:null},this.logger=s}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){let i,s,r,a=!1;this.logger.time=e;for(let e=0;e ("+kf([s,r])+")"),i=this.parseCmd(s,r),i||(i=this.parseMidrow(s,r)),i||(i=this.parsePAC(s,r)),i||(i=this.parseBackgroundAttributes(s,r)),!i&&(a=this.parseChars(s,r),a)){const e=this.currentChannel;if(e&&e>0){this.channels[e].insertChars(a)}else this.logger.log(2,"No channel found yet. TEXT-MODE?")}i||a||this.logger.log(2,"Couldn't parse cleaned data "+kf([s,r])+" orig: "+kf([t[e],t[e+1]]))}}parseCmd(e,t){const{cmdHistory:i}=this;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=33&&t<=35))return!1;if(Bf(e,t,i))return Pf(null,null,i),this.logger.log(3,"Repeated command ("+kf([e,t])+") is dropped"),!0;const s=20===e||21===e||23===e?1:2,r=this.channels[s];return 20===e||21===e||28===e||29===e?32===t?r.ccRCL():33===t?r.ccBS():34===t?r.ccAOF():35===t?r.ccAON():36===t?r.ccDER():37===t?r.ccRU(2):38===t?r.ccRU(3):39===t?r.ccRU(4):40===t?r.ccFON():41===t?r.ccRDC():42===t?r.ccTR():43===t?r.ccRTD():44===t?r.ccEDM():45===t?r.ccCR():46===t?r.ccENM():47===t&&r.ccEOC():r.ccTO(t-32),Pf(e,t,i),this.currentChannel=s,!0}parseMidrow(e,t){let i=0;if((17===e||25===e)&&t>=32&&t<=47){if(i=17===e?1:2,i!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const s=this.channels[i];return!!s&&(s.ccMIDROW(t),this.logger.log(3,"MIDROW ("+kf([e,t])+")"),!0)}return!1}parsePAC(e,t){let i;const s=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127)&&!((16===e||24===e)&&t>=64&&t<=95))return!1;if(Bf(e,t,s))return Pf(null,null,s),!0;const r=e<=23?1:2;i=t>=64&&t<=95?1===r?vf[e]:wf[e]:1===r?_f[e]:Sf[e];const a=this.channels[r];return!!a&&(a.setPAC(this.interpretPAC(i,t)),Pf(e,t,s),this.currentChannel=r,!0)}interpretPAC(e,t){let i;const s={color:null,italics:!1,indent:null,underline:!1,row:e};return i=t>95?t-96:t-64,s.underline=1==(1&i),i<=13?s.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(s.italics=!0,s.color="white"):s.indent=4*Math.floor((i-16)/2),s}parseChars(e,t){let i,s=null,r=null;if(e>=25?(i=2,r=e-8):(i=1,r=e),r>=17&&r<=19){let e;e=17===r?t+80:18===r?t+112:t+144,this.logger.log(2,"Special char '"+yf(e)+"' in channel "+i),s=[e]}else e>=32&&e<=127&&(s=0===t?[e]:[e,t]);if(s){const i=kf(s);this.logger.log(3,"Char codes = "+i.join(",")),Pf(e,t,this.cmdHistory)}return s}parseBackgroundAttributes(e,t){if(!((16===e||24===e)&&t>=32&&t<=47)&&!((23===e||31===e)&&t>=45&&t<=47))return!1;let i;const s={};16===e||24===e?(i=Math.floor((t-32)/2),s.background=Tf[i],t%2==1&&(s.background=s.background+"_semi")):45===t?s.background="transparent":(s.foreground="black",47===t&&(s.underline=!0));const r=e<=23?1:2;return this.channels[r].setBkgData(s),Pf(e,t,this.cmdHistory),!0}reset(){for(let e=0;ee)&&(this.startTime=e),this.endTime=t,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var Uf=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;const e=["","lr","rl"],t=["start","middle","end","left","right"];function i(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;const i=t.toLowerCase();return!!~e.indexOf(i)&&i}function s(e){return i(t,e)}function r(e,...t){let i=1;for(;i100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"positionAlign",r({},l,{get:function(){return v},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");v=t,this.hasBeenReset=!0}})),Object.defineProperty(n,"size",r({},l,{get:function(){return _},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");_=e,this.hasBeenReset=!0}})),Object.defineProperty(n,"align",r({},l,{get:function(){return w},set:function(e){const t=s(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");w=t,this.hasBeenReset=!0}})),n.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();class Ff{decode(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Of(e){function t(e,t,i,s){return 3600*(0|e)+60*(0|t)+(0|i)+parseFloat(s||0)}const i=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return i?parseFloat(i[2])>59?t(i[2],i[3],0,i[4]):t(i[1],i[2],i[3],i[4]):null}class Nf{constructor(){this.values=Object.create(null)}set(e,t){this.get(e)||""===t||(this.values[e]=t)}get(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,i){for(let s=0;s=0&&i<=100)return this.set(e,i),!0}return!1}}function jf(e,t,i,s){const r=s?e.split(s):[e];for(const e in r){if("string"!=typeof r[e])continue;const s=r[e].split(i);if(2!==s.length)continue;t(s[0],s[1])}}const zf=new Uf(0,0,""),Gf="middle"===zf.align?"middle":"center";function Vf(e,t,i){const s=e;function r(){const t=Of(e);if(null===t)throw new Error("Malformed timestamp: "+s);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=r(),a(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+s);e=e.slice(3),a(),t.endTime=r(),a(),function(e,t){const s=new Nf;jf(e,(function(e,t){let r;switch(e){case"region":for(let r=i.length-1;r>=0;r--)if(i[r].id===t){s.set(e,i[r].region);break}break;case"vertical":s.alt(e,t,["rl","lr"]);break;case"line":r=t.split(","),s.integer(e,r[0]),s.percent(e,r[0])&&s.set("snapToLines",!1),s.alt(e,r[0],["auto"]),2===r.length&&s.alt("lineAlign",r[1],["start",Gf,"end"]);break;case"position":r=t.split(","),s.percent(e,r[0]),2===r.length&&s.alt("positionAlign",r[1],["start",Gf,"end","line-left","line-right","auto"]);break;case"size":s.percent(e,t);break;case"align":s.alt(e,t,["start",Gf,"end","left","right"])}}),/:/,/\s/),t.region=s.get("region",null),t.vertical=s.get("vertical","");let r=s.get("line","auto");"auto"===r&&-1===zf.line&&(r=-1),t.line=r,t.lineAlign=s.get("lineAlign","start"),t.snapToLines=s.get("snapToLines",!0),t.size=s.get("size",100),t.align=s.get("align",Gf);let a=s.get("position","auto");"auto"===a&&50===zf.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function Hf(e){return e.replace(//gi,"\n")}class Wf{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new Ff,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;function i(){let e=t.buffer,i=0;for(e=Hf(e);i>>0).toString()};function qf(e,t,i){return Kf(e.toString())+Kf(t.toString())+Kf(i)}function Yf(e,t,i,s,r,a,o){const n=new Wf,l=Ad(new Uint8Array(e)).trim().replace($f,"\n").split("\n"),h=[],d=t?function(e,t=1){return Mp(e,9e4,1/t)}(t.baseTime,t.timescale):0;let c,u="00:00.000",p=0,f=0,m=!0;n.oncue=function(e){const a=i[s];let o=i.ccOffset;const n=(p-d)/9e4;if(null!=a&&a.new&&(void 0!==f?o=i.ccOffset=a.start:function(e,t,i){let s=e[t],r=e[s.prevCC];if(!r||!r.new&&s.new)return e.ccOffset=e.presentationOffset=s.start,void(s.new=!1);for(;null!=(a=r)&&a.new;){var a;e.ccOffset+=s.start-r.start,s.new=!1,s=r,r=e[s.prevCC]}e.presentationOffset=i}(i,s,n)),n){if(!t)return void(c=new Error("Missing initPTS for VTT MPEGTS"));o=n-i.presentationOffset}const l=e.endTime-e.startTime,u=zp(9e4*(e.startTime+o-f),9e4*r)/9e4;e.startTime=Math.max(u,0),e.endTime=Math.max(u+l,0);const m=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(m)),e.id||(e.id=qf(e.startTime,e.endTime,m)),e.endTime>0&&h.push(e)},n.onparsingerror=function(e){c=e},n.onflush=function(){c?o(c):a(h)},l.forEach((e=>{if(m){if(Jf(e,"X-TIMESTAMP-MAP=")){m=!1,e.slice(16).split(",").forEach((e=>{Jf(e,"LOCAL:")?u=e.slice(6):Jf(e,"MPEGTS:")&&(p=parseInt(e.slice(7)))}));try{f=function(e){let t=parseInt(e.slice(-3));const i=parseInt(e.slice(-6,-4)),s=parseInt(e.slice(-9,-7)),r=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!(Sh(t)&&Sh(i)&&Sh(s)&&Sh(r)))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*i,t+=6e4*s,t+=36e5*r,t}(u)/1e3}catch(e){c=e}return}""===e&&(m=!1)}n.parse(e+"\n")})),n.flush()}const Qf="stpp.ttml.im1t",Xf=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Zf=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,em={left:"start",center:"center",right:"end",start:"start",end:"end"};function tm(e,t,i,s){const r=Dd(new Uint8Array(e),["mdat"]);if(0===r.length)return void s(new Error("Could not parse IMSC1 mdat"));const a=r.map((e=>Ad(e))),o=function(e,t,i=1,s=!1){return Mp(e,t,1/i,s)}(t.baseTime,1,t.timescale);try{a.forEach((e=>i(function(e,t){const i=new DOMParser,s=i.parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!s)throw new Error("Invalid ttml");const r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},a=Object.keys(r).reduce(((e,t)=>(e[t]=s.getAttribute(`ttp:${t}`)||r[t],e)),{}),o="preserve"!==s.getAttribute("xml:space"),n=sm(im(s,"styling","style")),l=sm(im(s,"layout","region")),h=im(s,"body","[begin]");return[].map.call(h,(e=>{const i=rm(e,o);if(!i||!e.hasAttribute("begin"))return null;const s=nm(e.getAttribute("begin"),a),r=nm(e.getAttribute("dur"),a);let h=nm(e.getAttribute("end"),a);if(null===s)throw om(e);if(null===h){if(null===r)throw om(e);h=s+r}const d=new Uf(s-t,h-t,i);d.id=qf(d.startTime,d.endTime,d.text);const c=function(e,t,i){const s="http://www.w3.org/ns/ttml#styling";let r=null;const a=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],o=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;o&&i.hasOwnProperty(o)&&(r=i[o]);return a.reduce(((i,a)=>{const o=am(t,s,a)||am(e,s,a)||am(r,s,a);return o&&(i[a]=o),i}),{})}(l[e.getAttribute("region")],n[e.getAttribute("style")],n),{textAlign:u}=c;if(u){const e=em[u];e&&(d.lineAlign=e),d.align=u}return wh(d,c),d})).filter((e=>null!==e))}(e,o))))}catch(e){s(e)}}function im(e,t,i){const s=e.getElementsByTagName(t)[0];return s?[].slice.call(s.querySelectorAll(i)):[]}function sm(e){return e.reduce(((e,t)=>{const i=t.getAttribute("xml:id");return i&&(e[i]=t),e}),{})}function rm(e,t){return[].slice.call(e.childNodes).reduce(((e,i,s)=>{var r;return"br"===i.nodeName&&s?e+"\n":null!=(r=i.childNodes)&&r.length?rm(i,t):t?e+i.textContent.trim().replace(/\s+/g," "):e+i.textContent}),"")}function am(e,t,i){return e&&e.hasAttributeNS(t,i)?e.getAttributeNS(t,i):null}function om(e){return new Error(`Could not parse ttml timestamp ${e}`)}function nm(e,t){if(!e)return null;let i=Of(e);return null===i&&(Xf.test(e)?i=function(e,t){const i=Xf.exec(e),s=(0|i[4])+(0|i[5])/t.subFrameRate;return 3600*(0|i[1])+60*(0|i[2])+(0|i[3])+s/t.frameRate}(e,t):Zf.test(e)&&(i=function(e,t){const i=Zf.exec(e),s=Number(i[1]);switch(i[2]){case"h":return 3600*s;case"m":return 60*s;case"ms":return 1e3*s;case"f":return s/t.frameRate;case"t":return s/t.tickRate}return s}(e,t))),i}function lm(e,t){return!!e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}class hm{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(Th.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(Th.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(Th.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Th.BUFFER_CODECS,this.onBufferCodecs,this),e.on(Th.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(Th.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(Th.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Th.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Th.BUFFER_CODECS,this.onBufferCodecs,this),e.off(Th.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const i=this.hls.levels[t.droppedLevel];this.isLevelAllowed(i)&&this.restrictedLevels.push({bitrate:i.bitrate,height:i.height,width:i.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null}onManifestParsed(e,t){const i=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,i.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){const e=this.hls.levels;if(e.length){const t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const i=t.filter(((t,i)=>this.isLevelAllowed(t)&&i<=e));return this.clientRect=null,hm.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const i=e.getBoundingClientRect();t.width=i.width,t.height=i.height,t.width||t.height||(t.width=i.right-i.left||e.width||0,t.height=i.bottom-i.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return e}isLevelAllowed(e){return!this.restrictedLevels.some((t=>e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height))}static getMaxLevelByMediaSize(e,t,i){if(null==e||!e.length)return-1;let s=e.length-1;for(let o=0;o=t||n.height>=i)&&(r=n,!(a=e[o+1])||r.width!==a.width||r.height!==a.height)){s=o;break}}var r,a;return s}}const dm="[eme]";class cm{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=cm.CDMCleanupPromise?[cm.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=Lh.debug.bind(Lh,dm),this.log=Lh.log.bind(Lh,dm),this.warn=Lh.warn.bind(Lh,dm),this.error=Lh.error.bind(Lh,dm),this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(Th.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Th.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(Th.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(Th.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(Th.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Th.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(Th.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(Th.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:i}=this.config,s=t[e];if(s)return s.licenseUrl;if(e===Kh.WIDEVINE&&i)return i;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:t}=this.config,i=t[e];if(i)return i.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,i=(e,t,i)=>!!e&&i.indexOf(e)===t,s=t.map((e=>e.audioCodec)).filter(i),r=t.map((e=>e.videoCodec)).filter(i);return s.length+r.length===0&&r.push("avc1.42e01e"),new Promise(((t,i)=>{const a=e=>{const o=e.shift();this.getMediaKeysPromise(o,s,r).then((e=>t({keySystem:o,mediaKeys:e}))).catch((t=>{e.length?a(e):i(t instanceof um?t:new um({type:Eh.KEY_SYSTEM_ERROR,details:kh.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))};a(e)}))}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:i}=this.config;if("function"!=typeof i){let e=`Configured requestMediaKeySystemAccess is not a function ${i}`;return null===sd&&"http:"===self.location.protocol&&(e=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(e))}return i(e,t)}getMediaKeysPromise(e,t,i){const s=function(e,t,i,s){let r;switch(e){case Kh.FAIRPLAY:r=["cenc","sinf"];break;case Kh.WIDEVINE:case Kh.PLAYREADY:r=["cenc"];break;case Kh.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${e}`)}return function(e,t,i,s){return[{initDataTypes:e,persistentState:s.persistentState||"not-allowed",distinctiveIdentifier:s.distinctiveIdentifier||"not-allowed",sessionTypes:s.sessionTypes||[s.sessionType||"temporary"],audioCapabilities:t.map((e=>({contentType:`audio/mp4; codecs="${e}"`,robustness:s.audioRobustness||"",encryptionScheme:s.audioEncryptionScheme||null}))),videoCapabilities:i.map((e=>({contentType:`video/mp4; codecs="${e}"`,robustness:s.videoRobustness||"",encryptionScheme:s.videoEncryptionScheme||null})))}]}(r,t,i,s)}(e,t,i,this.config.drmSystemOptions),r=this.keySystemAccessPromises[e];let a=null==r?void 0:r.keySystemAccess;if(!a){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(s)}`),a=this.requestMediaKeySystemAccess(e,s);const t=this.keySystemAccessPromises[e]={keySystemAccess:a};return a.catch((t=>{this.log(`Failed to obtain access to key-system "${e}": ${t}`)})),a.then((i=>{this.log(`Access for key-system "${i.keySystem}" obtained`);const s=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),t.mediaKeys=i.createMediaKeys().then((t=>(this.log(`Media-keys created for "${e}"`),s.then((i=>i?this.setMediaKeysServerCertificate(t,e,i):t))))),t.mediaKeys.catch((t=>{this.error(`Failed to create media-keys for "${e}"}: ${t}`)})),t.mediaKeys}))}return a.then((()=>r.mediaKeys))}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:i}){this.log(`Creating key-system session "${t}" keyId: ${_d(e.keyId||[])}`);const s=i.createSession(),r={decryptdata:e,keySystem:t,mediaKeys:i,mediaKeysSession:s,keyStatus:"status-pending"};return this.mediaKeySessions.push(r),r}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const i=this.createMediaKeySessionContext(e),s=this.getKeyIdString(t),r="cenc";this.keyIdToKeySessionPromise[s]=this.generateRequestWithPreferredKeySession(i,r,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return _d(e.keyId)}updateKeySession(e,t){var i;const s=e.mediaKeysSession;return this.log(`Updating key-session "${s.sessionId}" for keyID ${_d((null==(i=e.decryptdata)?void 0:i.keyId)||[])}\n } (data length: ${t?t.byteLength:t})`),s.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise(((t,i)=>{const s=id(this.config),r=e.map(Zh).filter((e=>!!e&&-1!==s.indexOf(e)));return this.getKeySystemSelectionPromise(r).then((({keySystem:e})=>{const s=td(e);s?t(s):i(new Error(`Unable to find format for key-system "${e}"`))})).catch(i)}))}loadKey(e){const t=e.keyInfo.decryptdata,i=this.getKeyIdString(t),s=`(keyId: ${i} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${s}`);let r=this.keyIdToKeySessionPromise[i];return r||(r=this.keyIdToKeySessionPromise[i]=this.getKeySystemForKeyPromise(t).then((({keySystem:i,mediaKeys:r})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${s}`),this.attemptSetMediaKeys(i,r).then((()=>{this.throwIfDestroyed();const e=this.createMediaKeySessionContext({keySystem:i,mediaKeys:r,decryptdata:t});return this.generateRequestWithPreferredKeySession(e,"cenc",t.pssh,"playlist-key")}))))),r.catch((e=>this.handleError(e)))),r}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof um?this.hls.trigger(Th.ERROR,e.data):this.hls.trigger(Th.ERROR,{type:Eh.KEY_SYSTEM_ERROR,details:kh.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),i=this.keyIdToKeySessionPromise[t];if(!i){const t=Zh(e.keyFormat),i=t?[t]:id(this.config);return this.attemptKeySystemAccess(i)}return i}getKeySystemSelectionPromise(e){if(e.length||(e=id(this.config)),0===e.length)throw new um({type:Eh.KEY_SYSTEM_ERROR,details:kh.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}_onMediaEncrypted(e){const{initDataType:t,initData:i}=e;if(this.debug(`"${e.type}" event: init data type: "${t}"`),null===i)return;let s,r;if("sinf"===t&&this.config.drmSystems[Kh.FAIRPLAY]){const e=Ed(new Uint8Array(i));try{const t=Wh(JSON.parse(e).sinf),i=Pd(new Uint8Array(t));if(!i)return;s=i.subarray(8,24),r=Kh.FAIRPLAY}catch(e){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{const e=function(e){if(!(e instanceof ArrayBuffer)||e.byteLength<32)return null;const t={version:0,systemId:"",kids:null,data:null},i=new DataView(e),s=i.getUint32(0);if(e.byteLength!==s&&s>44)return null;if(1886614376!==i.getUint32(4))return null;if(t.version=i.getUint32(8)>>>24,t.version>1)return null;t.systemId=_d(new Uint8Array(e,12,16));const r=i.getUint32(28);if(0===t.version){if(s-32this.generateRequestWithPreferredKeySession(r,t,i,"encrypted-event-key-match")));break}}l||(l=o[a]=this.getKeySystemSelectionPromise([r]).then((({keySystem:e,mediaKeys:r})=>{var o;this.throwIfDestroyed();const n=new Gd("ISO-23001-7",a,null!=(o=td(e))?o:"");return n.pssh=new Uint8Array(i),n.keyId=s,this.attemptSetMediaKeys(e,r).then((()=>{this.throwIfDestroyed();const s=this.createMediaKeySessionContext({decryptdata:n,keySystem:e,mediaKeys:r});return this.generateRequestWithPreferredKeySession(s,t,i,"encrypted-event-no-match")}))}))),l.catch((e=>this.handleError(e)))}_onWaitingForKey(e){this.log(`"${e.type}" event`)}attemptSetMediaKeys(e,t){const i=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const s=Promise.all(i).then((()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)}));return this.setMediaKeysQueue.push(s),s.then((()=>{this.log(`Media-keys set for "${e}"`),i.push(s),this.setMediaKeysQueue=this.setMediaKeysQueue.filter((e=>-1===i.indexOf(e)))}))}generateRequestWithPreferredKeySession(e,t,i,s){var r,a;const o=null==(r=this.config.drmSystems)||null==(a=r[e.keySystem])?void 0:a.generateRequest;if(o)try{const s=o.call(this.hls,t,i,e);if(!s)throw new Error("Invalid response from configured generateRequest filter");t=s.initDataType,i=e.decryptdata.pssh=s.initData?new Uint8Array(s.initData):null}catch(e){var n;if(this.warn(e.message),null!=(n=this.hls)&&n.config.debug)throw e}if(null===i)return this.log(`Skipping key-session request for "${s}" (no initData)`),Promise.resolve(e);const l=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${s}": ${l} (init data type: ${t} length: ${i?i.byteLength:null})`);const h=new ef;e.mediaKeysSession.onmessage=t=>{const i=e.mediaKeysSession;if(!i)return void h.emit("error",new Error("invalid state"));const{messageType:s,message:r}=t;this.log(`"${s}" message event for session "${i.sessionId}" message size: ${r.byteLength}`),"license-request"===s||"license-renewal"===s?this.renewLicense(e,r).catch((e=>{this.handleError(e),h.emit("error",e)})):"license-release"===s?e.keySystem===Kh.FAIRPLAY&&(this.updateKeySession(e,Jh("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${s}"`)},e.mediaKeysSession.onkeystatuseschange=t=>{if(!e.mediaKeysSession)return void h.emit("error",new Error("invalid state"));this.onKeyStatusChange(e);const i=e.keyStatus;h.emit("keyStatus",i),"expired"===i&&(this.warn(`${e.keySystem} expired for key ${l}`),this.renewKeySession(e))};const d=new Promise(((e,t)=>{h.on("error",t),h.on("keyStatus",(i=>{i.startsWith("usable")?e():"output-restricted"===i?t(new um({type:Eh.KEY_SYSTEM_ERROR,details:kh.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===i?t(new um({type:Eh.KEY_SYSTEM_ERROR,details:kh.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${i}"`)):"expired"===i?t(new Error("key expired while generating request")):this.warn(`unhandled key status change "${i}"`)}))}));return e.mediaKeysSession.generateRequest(t,i).then((()=>{var t;this.log(`Request generated for key-session "${null==(t=e.mediaKeysSession)?void 0:t.sessionId}" keyId: ${l}`)})).catch((e=>{throw new um({type:Eh.KEY_SYSTEM_ERROR,details:kh.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},`Error generating key-session request: ${e}`)})).then((()=>d)).catch((t=>{throw h.removeAllListeners(),this.removeSession(e),t})).then((()=>(h.removeAllListeners(),e)))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach(((t,i)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${_d("buffer"in i?new Uint8Array(i.buffer,i.byteOffset,i.byteLength):new Uint8Array(i))} session keyId: ${_d(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t}))}fetchServerCertificate(e){const t=this.config,i=new(0,t.loader)(t),s=this.getServerCertificateUrl(e);return s?(this.log(`Fetching serverCertificate for "${e}"`),new Promise(((r,a)=>{const o={responseType:"arraybuffer",url:s},n=t.certLoadPolicy.default,l={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},h={onSuccess:(e,t,i,s)=>{r(e.data)},onError:(t,i,r,n)=>{a(new um({type:Eh.KEY_SYSTEM_ERROR,details:kh.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:r,response:vh({url:o.url,data:void 0},t)},`"${e}" certificate request failed (${s}). Status: ${t.code} (${t.text})`))},onTimeout:(t,i,r)=>{a(new um({type:Eh.KEY_SYSTEM_ERROR,details:kh.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:r,response:{url:o.url,data:void 0}},`"${e}" certificate request timed out (${s})`))},onAbort:(e,t,i)=>{a(new Error("aborted"))}};i.load(o,l,h)}))):Promise.resolve()}setMediaKeysServerCertificate(e,t,i){return new Promise(((s,r)=>{e.setServerCertificate(i).then((r=>{this.log(`setServerCertificate ${r?"success":"not supported by CDM"} (${null==i?void 0:i.byteLength}) on "${t}"`),s(e)})).catch((e=>{r(new um({type:Eh.KEY_SYSTEM_ERROR,details:kh.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))}))}))}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then((t=>this.updateKeySession(e,new Uint8Array(t)).catch((e=>{throw new um({type:Eh.KEY_SYSTEM_ERROR,details:kh.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)}))))}setupLicenseXHR(e,t,i,s){const r=this.config.licenseXhrSetup;return r?Promise.resolve().then((()=>{if(!i.decryptdata)throw new Error("Key removed");return r.call(this.hls,e,t,i,s)})).catch((a=>{if(!i.decryptdata)throw a;return e.open("POST",t,!0),r.call(this.hls,e,t,i,s)})).then((i=>{e.readyState||e.open("POST",t,!0);return{xhr:e,licenseChallenge:i||s}})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:s}))}requestLicense(e,t){const i=this.config.keyLoadPolicy.default;return new Promise(((s,r)=>{const a=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${a}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return r(new Error("invalid state"));if(4===o.readyState)if(200===o.status){this._requestLicenseFailureCount=0;let t=o.response;this.log(`License received ${t instanceof ArrayBuffer?t.byteLength:t}`);const i=this.config.licenseResponseCallback;if(i)try{t=i.call(this.hls,o,a,e)}catch(e){this.error(e)}s(t)}else{const n=i.errorRetry,l=n?n.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>l||o.status>=400&&o.status<500)r(new um({type:Eh.KEY_SYSTEM_ERROR,details:kh.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:a,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${a}). Status: ${o.status} (${o.statusText})`));else{const i=l-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${i} attempts left`),this.requestLicense(e,t).then(s,r)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,this.setupLicenseXHR(o,a,e,t).then((({xhr:e,licenseChallenge:t})=>{e.send(t)}))}))}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const i=t.media;this.media=i,i.addEventListener("encrypted",this.onMediaEncrypted),i.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Gd.clearKeyUriToKeyIdMap();const i=t.length;cm.CDMCleanupPromise=Promise.all(t.map((e=>this.removeSession(e))).concat(null==e?void 0:e.setMediaKeys(null).catch((t=>{this.log(`Could not clear media keys: ${t}. media.src: ${null==e?void 0:e.src}`)})))).then((()=>{i&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)})).catch((t=>{this.log(`Could not close sessions and clear media keys: ${t}. media.src: ${null==e?void 0:e.src}`)}))}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(t&&this.config.emeEnabled&&!this.keyFormatPromise){const e=t.reduce(((e,t)=>(-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e)),[]);this.log(`Selecting key-system from session-keys ${e.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(e)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:i}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),t.onmessage=null,t.onkeystatuseschange=null,i&&i.readyState!==XMLHttpRequest.DONE&&i.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const s=this.mediaKeySessions.indexOf(e);return s>-1&&this.mediaKeySessions.splice(s,1),t.remove().catch((e=>{this.log(`Could not remove session: ${e}`)})).then((()=>t.close())).catch((e=>{this.log(`Could not close session: ${e}`)}))}}}cm.CDMCleanupPromise=void 0;class um extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var pm="m",fm="a",mm="v",gm="av",ym="i",Am="tt";class bm{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=e=>{try{this.apply(e,{ot:pm,su:!this.initialized})}catch(e){Lh.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=e=>{try{const t=e.frag,i=this.hls.levels[t.level],s=this.getObjectType(t),r={d:1e3*t.duration,ot:s};s!==mm&&s!==fm&&s!=gm||(r.br=i.bitrate/1e3,r.tb=this.getTopBandwidth(s)/1e3,r.bl=this.getBufferLength(s)),this.apply(e,r)}catch(e){Lh.warn("Could not generate segment CMCD data.",e)}},this.hls=e;const t=this.config=e.config,{cmcd:i}=t;null!=i&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||bm.uuid(),this.cid=i.contentId,this.useHeaders=!0===i.useHeaders,this.registerListeners())}registerListeners(){const e=this.hls;e.on(Th.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Th.MEDIA_DETACHED,this.onMediaDetached,this),e.on(Th.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(Th.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Th.MEDIA_DETACHED,this.onMediaDetached,this),e.off(Th.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var i,s;this.audioBuffer=null==(i=t.tracks.audio)?void 0:i.buffer,this.videoBuffer=null==(s=t.tracks.video)?void 0:s.buffer}createData(){var e;return{v:1,sf:"h",sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){wh(t,this.createData());const i=t.ot===ym||t.ot===mm||t.ot===gm;if(this.starved&&i&&(t.bs=!0,t.su=!0,this.starved=!1),null==t.su&&(t.su=this.buffering),this.useHeaders){const i=bm.toHeaders(t);if(!Object.keys(i).length)return;e.headers||(e.headers={}),wh(e.headers,i)}else{const i=bm.toQuery(t);if(!i)return;e.url=bm.appendQueryToUri(e.url,i)}}getObjectType(e){const{type:t}=e;return"subtitle"===t?Am:"initSegment"===e.sn?ym:"audio"===t?fm:"main"===t?this.hls.audioTracks.length?mm:gm:void 0}getTopBandwidth(e){let t,i=0;const s=this.hls;if(e===fm)t=s.audioTracks;else{const e=s.maxAutoLevel,i=e>-1?e+1:s.levels.length;t=s.levels.slice(0,i)}for(const e of t)e.bitrate>i&&(i=e.bitrate);return i>0?i:NaN}getBufferLength(e){const t=this.hls.media,i=e===fm?this.audioBuffer:this.videoBuffer;if(!i||!t)return NaN;return 1e3*Ru.bufferInfo(i,t.currentTime,this.config.maxBufferHole).len}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,i=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new i(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,i,s){t(e),this.loader.load(e,i,s)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,i=e||this.config.loader;return class{constructor(e){this.loader=void 0,this.loader=new i(e)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(e,i,s){t(e),this.loader.load(e,i,s)}}}static uuid(){const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}static serialize(e){const t=[],i=e=>!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e,s=e=>Math.round(e),r=e=>100*s(e/100),a={br:s,d:s,bl:r,dl:r,mtp:r,nor:e=>encodeURIComponent(e),rtp:r,tb:s},o=Object.keys(e||{}).sort();for(const s of o){let r=e[s];if(!i(r))continue;if("v"===s&&1===r)continue;if("pr"==s&&1===r)continue;const o=a[s];o&&(r=o(r));const n=typeof r;let l;l="ot"===s||"sf"===s||"st"===s?`${s}=${r}`:"boolean"===n?s:"number"===n?`${s}=${r}`:`${s}=${JSON.stringify(r)}`,t.push(l)}return t.join(",")}static toHeaders(e){const t=Object.keys(e),i={},s=["Object","Request","Session","Status"],r=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3};for(const i of t){r[null!=a[i]?a[i]:1][i]=e[i]}for(let e=0;e{const a=e.filter((e=>e.groupId===r)).map((e=>{const a=wh({},e);return a.details=void 0,a.attrs=new Bh(a.attrs),a.url=a.attrs.URI=_m(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",i),a.groupId=a.attrs["GROUP-ID"]=t[r],a.attrs["PATHWAY-ID"]=s,a}));e.push(...a)}))}function _m(e,t,i,s){const{HOST:r,PARAMS:a,[i]:o}=s;let n;t&&(n=null==o?void 0:o[t],n&&(e=n));const l=new self.URL(e);return r&&!n&&(l.host=r),a&&Object.keys(a).sort().forEach((e=>{e&&l.searchParams.set(e,a[e])})),l.href}const wm=/^age:\s*[\d.]+\s*$/im;class Sm{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new Fh,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,i){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=i,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e)return;const i=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0,s.aborted=!1;const r=this.xhrSetup;r?Promise.resolve().then((()=>{if(!this.stats.aborted)return r(i,t.url)})).catch((e=>(i.open("GET",t.url,!0),r(i,t.url)))).then((()=>{this.stats.aborted||this.openAndSendXhr(i,t,e)})).catch((e=>{this.callbacks.onError({code:i.status,text:e.message},t,i,s)})):this.openAndSendXhr(i,t,e)}openAndSendXhr(e,t,i){e.readyState||e.open("GET",t.url,!0);const s=this.context.headers,{maxTimeToFirstByteMs:r,maxLoadTimeMs:a}=i.loadPolicy;if(s)for(const t in s)e.setRequestHeader(t,s[t]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),i.timeout=r&&Sh(r)?r:a,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:i}=this;if(!e||!t)return;const s=t.readyState,r=this.config;if(!i.aborted&&s>=2&&(0===i.loading.first&&(i.loading.first=Math.max(self.performance.now(),i.loading.start),r.timeout!==r.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),r.timeout=r.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.loadPolicy.maxLoadTimeMs-(i.loading.first-i.loading.start)))),4===s)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const s=t.status,a="text"!==t.responseType;if(s>=200&&s<300&&(a&&t.response||null!==t.responseText)){i.loading.end=Math.max(self.performance.now(),i.loading.first);const r=a?t.response:t.responseText,o="arraybuffer"===t.responseType?r.byteLength:r.length;if(i.loaded=i.total=o,i.bwEstimate=8e3*i.total/(i.loading.end-i.loading.first),!this.callbacks)return;const n=this.callbacks.onProgress;if(n&&n(i,e,r,t),!this.callbacks)return;const l={url:t.responseURL,data:r,code:s};this.callbacks.onSuccess(l,i,e,t)}else{const a=r.loadPolicy.errorRetry;Qc(a,i.retry,!1,s)?this.retry(a):(Lh.error(`${s} while loading ${e.url}`),this.callbacks.onError({code:s,text:t.statusText},e,t,i))}}}loadtimeout(){var e;const t=null==(e=this.config)?void 0:e.loadPolicy.timeoutRetry;if(Qc(t,this.stats.retry,!0))this.retry(t);else{Lh.warn(`timeout while loading ${this.context.url}`);const e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:i}=this;this.retryDelay=qc(e,i.retry),i.retry++,Lh.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t.url}, retrying ${i.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&wm.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const Tm=/(\d+)-(\d+)\/(\d+)/;class Em{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||km,this.controller=new self.AbortController,this.stats=new Fh}destroy(){this.loader=this.callbacks=null,this.abortInternal()}abortInternal(){const e=this.response;null!=e&&e.ok||(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),null!=(e=this.callbacks)&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,i){const s=this.stats;if(s.loading.start)throw new Error("Loader can only be used once.");s.loading.start=self.performance.now();const r=function(e,t){const i={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(wh({},e.headers))};e.rangeEnd&&i.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1));return i}(e,this.controller.signal),a=i.onProgress,o="arraybuffer"===e.responseType,n=o?"byteLength":"length",{maxTimeToFirstByteMs:l,maxLoadTimeMs:h}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=i,this.request=this.fetchSetup(e,r),self.clearTimeout(this.requestTimeout),t.timeout=l&&Sh(l)?l:h,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),i.onTimeout(s,e,this.response)}),t.timeout),self.fetch(this.request).then((r=>{this.response=this.loader=r;const n=Math.max(self.performance.now(),s.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=h,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),i.onTimeout(s,e,this.response)}),h-(n-s.loading.start)),!r.ok){const{status:e,statusText:t}=r;throw new Cm(t||"fetch, bad network response",e,r)}return s.loading.first=n,s.total=function(e){const t=e.get("Content-Range");if(t){const e=function(e){const t=Tm.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}(t);if(Sh(e))return e}const i=e.get("Content-Length");if(i)return parseInt(i)}(r.headers)||s.total,a&&Sh(t.highWaterMark)?this.loadProgressively(r,s,e,t.highWaterMark,a):o?r.arrayBuffer():"json"===e.responseType?r.json():r.text()})).then((r=>{const{response:o}=this;self.clearTimeout(this.requestTimeout),s.loading.end=Math.max(self.performance.now(),s.loading.first);const l=r[n];l&&(s.loaded=s.total=l);const h={url:o.url,data:r,code:o.status};a&&!Sh(t.highWaterMark)&&a(s,e,r,o),i.onSuccess(h,s,e,o)})).catch((t=>{if(self.clearTimeout(this.requestTimeout),s.aborted)return;const r=t&&t.code||0,a=t?t.message:null;i.onError({code:r,text:a},e,t?t.details:null,s)}))}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,i,s=0,r){const a=new lf,o=e.body.getReader(),n=()=>o.read().then((o=>{if(o.done)return a.dataLength&&r(t,i,a.flush(),e),Promise.resolve(new ArrayBuffer(0));const l=o.value,h=l.length;return t.loaded+=h,h=s&&r(t,i,a.flush(),e)):r(t,i,l,e),n()})).catch((()=>Promise.reject()));return n()}}function km(e,t){return new self.Request(e.url,t)}class Cm extends Error{constructor(e,t,i){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=i}}const Rm=/\s/,xm={newCue(e,t,i,s){const r=[];let a,o,n,l,h;const d=self.VTTCue||self.TextTrackCue;for(let u=0;u=16?l--:l++;const s=Hf(h.trim()),p=qf(t,i,s);null!=e&&null!=(c=e.cues)&&c.getCueById(p)||(o=new d(t,i,s),o.id=p,o.line=u+1,o.align="left",o.position=10+Math.min(80,10*Math.floor(8*l/32)),r.push(o))}return e&&r.length&&(r.sort(((e,t)=>"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line)),r.forEach((t=>Sc(e,t)))),r}},Dm=vh(vh({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:Sm,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:class{constructor(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=-1,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e;const t=e.config;this.bwEstimator=new nf(t.abrEwmaSlowVoD,t.abrEwmaFastVoD,t.abrEwmaDefaultEstimate),this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(Th.FRAG_LOADING,this.onFragLoading,this),e.on(Th.FRAG_LOADED,this.onFragLoaded,this),e.on(Th.FRAG_BUFFERED,this.onFragBuffered,this),e.on(Th.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(Th.LEVEL_LOADED,this.onLevelLoaded,this)}unregisterListeners(){const{hls:e}=this;e.off(Th.FRAG_LOADING,this.onFragLoading,this),e.off(Th.FRAG_LOADED,this.onFragLoaded,this),e.off(Th.FRAG_BUFFERED,this.onFragBuffered,this),e.off(Th.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(Th.LEVEL_LOADED,this.onLevelLoaded,this)}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null}onFragLoading(e,t){var i;const s=t.frag;this.ignoreFragment(s)||(this.fragCurrent=s,this.partCurrent=null!=(i=t.part)?i:null,this.clearTimer(),this.timer=self.setInterval(this.onCheck,100))}onLevelSwitching(e,t){this.clearTimer()}getTimeToLoadFrag(e,t,i,s){return e+i/t+(s?this.lastLevelLoadSec:0)}onLevelLoaded(e,t){const i=this.hls.config,{total:s,bwEstimate:r}=t.stats;Sh(s)&&Sh(r)&&(this.lastLevelLoadSec=8*s/r),t.details.live?this.bwEstimator.update(i.abrEwmaSlowLive,i.abrEwmaFastLive):this.bwEstimator.update(i.abrEwmaSlowVoD,i.abrEwmaFastVoD)}_abandonRulesCheck(){const{fragCurrent:e,partCurrent:t,hls:i}=this,{autoLevelEnabled:s,media:r}=i;if(!e||!r)return;const a=performance.now(),o=t?t.stats:e.stats,n=t?t.duration:e.duration,l=a-o.loading.start;if(o.aborted||o.loaded&&o.loaded===o.total||0===e.level)return this.clearTimer(),void(this._nextAutoLevel=-1);if(!s||r.paused||!r.playbackRate||!r.readyState)return;const h=i.mainForwardBufferInfo;if(null===h)return;const d=this.bwEstimator.getEstimateTTFB(),c=Math.abs(r.playbackRate);if(l<=Math.max(d,n/(2*c)*1e3))return;const u=h.len/c;if(u>=2*n/c)return;const p=o.loading.first?o.loading.first-o.loading.start:-1,f=o.loaded&&p>-1,m=this.bwEstimator.getEstimate(),{levels:g,minAutoLevel:y}=i,A=g[e.level],b=o.total||Math.max(o.loaded,Math.round(n*A.maxBitrate/8));let v=l-p;v<1&&f&&(v=Math.min(l,8*o.loaded/m));const _=f?1e3*o.loaded/v:0,w=_?(b-o.loaded)/_:8*b/m+d/1e3;if(w<=u)return;const S=_?8*_:m;let T,E=Number.POSITIVE_INFINITY;for(T=e.level-1;T>y;T--){const e=g[T].maxBitrate;if(E=this.getTimeToLoadFrag(d/1e3,S,n*e,!g[T].details),E=w||E>10*n||(i.nextLoadLevel=T,f?this.bwEstimator.sample(l-Math.min(d,p),o.loaded):this.bwEstimator.sampleTTFB(l),this.clearTimer(),Lh.warn(`[abr] Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} is loading too slowly;\n Time to underbuffer: ${u.toFixed(3)} s\n Estimated load time for current fragment: ${w.toFixed(3)} s\n Estimated load time for down switch fragment: ${E.toFixed(3)} s\n TTFB estimate: ${p}\n Current BW estimate: ${Sh(m)?(m/1024).toFixed(3):"Unknown"} Kb/s\n New BW estimate: ${(this.bwEstimator.getEstimate()/1024).toFixed(3)} Kb/s\n Aborting and switching to level ${T}`),e.loader&&(this.fragCurrent=this.partCurrent=null,e.abortRequests()),i.trigger(Th.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:o}))}onFragLoaded(e,{frag:t,part:i}){const s=i?i.stats:t.stats;if(t.type===gc&&this.bwEstimator.sampleTTFB(s.loading.first-s.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),this.lastLoadedFragLevel=t.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){const e=i?i.duration:t.duration,r=this.hls.levels[t.level],a=(r.loaded?r.loaded.bytes:0)+s.loaded,o=(r.loaded?r.loaded.duration:0)+e;r.loaded={bytes:a,duration:o},r.realBitrate=Math.round(8*a/o)}if(t.bitrateTest){const e={stats:s,frag:t,part:i,id:t.type};this.onFragBuffered(Th.FRAG_BUFFERED,e),t.bitrateTest=!1}}}onFragBuffered(e,t){const{frag:i,part:s}=t,r=null!=s&&s.stats.loaded?s.stats:i.stats;if(r.aborted)return;if(this.ignoreFragment(i))return;const a=r.parsing.end-r.loading.start-Math.min(r.loading.first-r.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,r.loaded),r.bwEstimate=this.bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==gc||"initSegment"===e.sn}clearTimer(){self.clearInterval(this.timer)}get nextAutoLevel(){const e=this._nextAutoLevel,t=this.bwEstimator;if(-1!==e&&!t.canEstimate())return e;let i=this.getNextABRAutoLevel();if(-1!==e){const t=this.hls.levels;if(t.length>Math.max(e,i)&&t[e].loadError<=t[i].loadError)return e}return-1!==e&&(i=Math.min(e,i)),i}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:i}=this,{maxAutoLevel:s,config:r,minAutoLevel:a,media:o}=i,n=t?t.duration:e?e.duration:0,l=o&&0!==o.playbackRate?Math.abs(o.playbackRate):1,h=this.bwEstimator?this.bwEstimator.getEstimate():r.abrEwmaDefaultEstimate,d=i.mainForwardBufferInfo,c=(d?d.len:0)/l;let u=this.findBestLevel(h,a,s,c,r.abrBandWidthFactor,r.abrBandWidthUpFactor);if(u>=0)return u;Lh.trace(`[abr] ${c?"rebuffering expected":"buffer is empty"}, finding optimal quality level`);let p=n?Math.min(n,r.maxStarvationDelay):r.maxStarvationDelay,f=r.abrBandWidthFactor,m=r.abrBandWidthUpFactor;if(!c){const e=this.bitrateTestDelay;if(e){p=(n?Math.min(n,r.maxLoadingDelay):r.maxLoadingDelay)-e,Lh.trace(`[abr] bitrate test took ${Math.round(1e3*e)}ms, set first fragment max fetchDuration to ${Math.round(1e3*p)} ms`),f=m=1}}return u=this.findBestLevel(h,a,s,c+p,f,m),Math.max(u,0)}findBestLevel(e,t,i,s,r,a){var o;const{fragCurrent:n,partCurrent:l,lastLoadedFragLevel:h}=this,{levels:d}=this.hls,c=d[h],u=!(null==c||null==(o=c.details)||!o.live),p=null==c?void 0:c.codecSet,f=l?l.duration:n?n.duration:0,m=this.bwEstimator.getEstimateTTFB()/1e3;let g=t,y=-1;for(let o=i;o>=t;o--){const t=d[o];if(!t||p&&t.codecSet!==p){t&&(g=Math.min(o,g),y=Math.max(o,y));continue}-1!==y&&Lh.trace(`[abr] Skipped level(s) ${g}-${y} with CODECS:"${d[y].attrs.CODECS}"; not compatible with "${c.attrs.CODECS}"`);const i=t.details,n=(l?null==i?void 0:i.partTarget:null==i?void 0:i.averagetargetduration)||f;let A;A=o<=h?r*e:a*e;const b=d[o].maxBitrate,v=this.getTimeToLoadFrag(m,A,b*n,void 0===i);if(Lh.trace(`[abr] level:${o} adjustedbw-bitrate:${Math.round(A-b)} avgDuration:${n.toFixed(1)} maxFetchDuration:${s.toFixed(1)} fetchDuration:${v.toFixed(1)}`),A>b&&(0===v||!Sh(v)||u&&!this.bitrateTestDelay||v{const{media:e,mediaSource:t}=this;Lh.log("[buffer-controller]: Media source opened"),e&&(e.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(Th.MEDIA_ATTACHED,{media:e})),t&&t.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{Lh.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=()=>{Lh.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=()=>{const{media:e,_objectUrl:t}=this;e&&e.src!==t&&Lh.error(`Media element src was set while attaching MediaSource (${t} > ${e.src})`)},this.hls=e,this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null}registerListeners(){const{hls:e}=this;e.on(Th.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(Th.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Th.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Th.BUFFER_RESET,this.onBufferReset,this),e.on(Th.BUFFER_APPENDING,this.onBufferAppending,this),e.on(Th.BUFFER_CODECS,this.onBufferCodecs,this),e.on(Th.BUFFER_EOS,this.onBufferEos,this),e.on(Th.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Th.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(Th.FRAG_PARSED,this.onFragParsed,this),e.on(Th.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(Th.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(Th.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Th.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Th.BUFFER_RESET,this.onBufferReset,this),e.off(Th.BUFFER_APPENDING,this.onBufferAppending,this),e.off(Th.BUFFER_CODECS,this.onBufferCodecs,this),e.off(Th.BUFFER_EOS,this.onBufferEos,this),e.off(Th.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Th.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(Th.FRAG_PARSED,this.onFragParsed,this),e.off(Th.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new pf(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let i=2;(t.audio&&!t.video||!t.altAudio)&&(i=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=i,Lh.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,t){const i=this.media=t.media;if(i&&ff){const e=this.mediaSource=new ff;e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),i.src=self.URL.createObjectURL(e),this._objectUrl=i.src,i.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:i}=this;if(t){if(Lh.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){Lh.warn(`[buffer-controller]: onMediaDetaching: ${e.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(e.removeEventListener("emptied",this._onMediaEmptied),i&&self.URL.revokeObjectURL(i),e.src===i?(e.removeAttribute("src"),e.load()):Lh.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(Th.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach((e=>{const t=this.sourceBuffer[e];try{t&&(this.removeBufferListeners(e),this.mediaSource&&this.mediaSource.removeSourceBuffer(t),this.sourceBuffer[e]=void 0)}catch(t){Lh.warn(`[buffer-controller]: Failed to reset the ${e} buffer`,t)}})),this._initSourceBuffer()}onBufferCodecs(e,t){const i=this.getSourceBufferTypes().length;Object.keys(t).forEach((e=>{if(i){const i=this.tracks[e];if(i&&"function"==typeof i.buffer.changeType){const{id:s,codec:r,levelCodec:a,container:o,metadata:n}=t[e],l=(i.levelCodec||i.codec).replace(mf,"$1"),h=(a||r).replace(mf,"$1");if(l!==h){const t=`${o};codecs=${a||r}`;this.appendChangeType(e,t),Lh.log(`[buffer-controller]: switching codec ${l} to ${h}`),this.tracks[e]={buffer:i.buffer,codec:r,container:o,levelCodec:a,metadata:n,id:s}}}}else this.pendingTracks[e]=t[e]})),i||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())}appendChangeType(e,t){const{operationQueue:i}=this,s={execute:()=>{const s=this.sourceBuffer[e];s&&(Lh.log(`[buffer-controller]: changing ${e} sourceBuffer type to ${t}`),s.changeType(t)),i.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:t=>{Lh.warn(`[buffer-controller]: Failed to change ${e} SourceBuffer type`,t)}};i.append(s,e)}onBufferAppending(e,t){const{hls:i,operationQueue:s,tracks:r}=this,{data:a,type:o,frag:n,part:l,chunkMeta:h}=t,d=h.buffering[o],c=self.performance.now();d.start=c;const u=n.stats.buffering,p=l?l.stats.buffering:null;0===u.start&&(u.start=c),p&&0===p.start&&(p.start=c);const f=r.audio;let m=!1;"audio"===o&&"audio/mpeg"===(null==f?void 0:f.container)&&(m=!this.lastMpegAudioChunk||1===h.id||this.lastMpegAudioChunk.sn!==h.sn,this.lastMpegAudioChunk=h);const g=n.start,y={execute:()=>{if(d.executeStart=self.performance.now(),m){const e=this.sourceBuffer[o];if(e){const t=g-e.timestampOffset;Math.abs(t)>=.1&&(Lh.log(`[buffer-controller]: Updating audio SourceBuffer timestampOffset to ${g} (delta: ${t}) sn: ${n.sn})`),e.timestampOffset=g)}}this.appendExecutor(a,o)},onStart:()=>{},onComplete:()=>{const e=self.performance.now();d.executeEnd=d.end=e,0===u.first&&(u.first=e),p&&0===p.first&&(p.first=e);const{sourceBuffer:t}=this,i={};for(const e in t)i[e]=Ru.getBuffered(t[e]);this.appendError=0,this.hls.trigger(Th.BUFFER_APPENDED,{type:o,frag:n,part:l,chunkMeta:h,parent:n.type,timeRanges:i})},onError:e=>{Lh.error(`[buffer-controller]: Error encountered while trying to append to the ${o} SourceBuffer`,e);const t={type:Eh.MEDIA_ERROR,parent:n.type,details:kh.BUFFER_APPEND_ERROR,frag:n,part:l,chunkMeta:h,error:e,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=kh.BUFFER_FULL_ERROR:(this.appendError++,t.details=kh.BUFFER_APPEND_ERROR,this.appendError>i.config.appendErrorMaxRetry&&(Lh.error(`[buffer-controller]: Failed ${i.config.appendErrorMaxRetry} times to append segment in sourceBuffer`),t.fatal=!0)),i.trigger(Th.ERROR,t)}};s.append(y,o)}onBufferFlushing(e,t){const{operationQueue:i}=this,s=e=>({execute:this.removeExecutor.bind(this,e,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(Th.BUFFER_FLUSHED,{type:e})},onError:t=>{Lh.warn(`[buffer-controller]: Failed to remove from ${e} SourceBuffer`,t)}});t.type?i.append(s(t.type),t.type):this.getSourceBufferTypes().forEach((e=>{i.append(s(e),e)}))}onFragParsed(e,t){const{frag:i,part:s}=t,r=[],a=s?s.elementaryStreams:i.elementaryStreams;a[jh]?r.push("audiovideo"):(a[Oh]&&r.push("audio"),a[Nh]&&r.push("video"));0===r.length&&Lh.warn(`Fragments must have at least one ElementaryStreamType set. type: ${i.type} level: ${i.level} sn: ${i.sn}`),this.blockBuffers((()=>{const e=self.performance.now();i.stats.buffering.end=e,s&&(s.stats.buffering.end=e);const t=s?s.stats:i.stats;this.hls.trigger(Th.FRAG_BUFFERED,{frag:i,part:s,stats:t,id:i.type})}),r)}onFragChanged(e,t){this.flushBackBuffer()}onBufferEos(e,t){this.getSourceBufferTypes().reduce(((e,i)=>{const s=this.sourceBuffer[i];return!s||t.type&&t.type!==i||(s.ending=!0,s.ended||(s.ended=!0,Lh.log(`[buffer-controller]: ${i} sourceBuffer now EOS`))),e&&!(s&&!s.ended)}),!0)&&(Lh.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers((()=>{this.getSourceBufferTypes().forEach((e=>{const t=this.sourceBuffer[e];t&&(t.ending=!1)}));const{mediaSource:e}=this;e&&"open"===e.readyState?(Lh.log("[buffer-controller]: Calling mediaSource.endOfStream()"),e.endOfStream()):e&&Lh.info(`[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: ${e.readyState}`)})))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}flushBackBuffer(){const{hls:e,details:t,media:i,sourceBuffer:s}=this;if(!i||null===t)return;const r=this.getSourceBufferTypes();if(!r.length)return;const a=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if(!Sh(a)||a<0)return;const o=i.currentTime,n=t.levelTargetDuration,l=Math.max(a,n),h=Math.floor(o/n)*n-l;r.forEach((i=>{const r=s[i];if(r){const s=Ru.getBuffered(r);if(s.length>0&&h>s.start(0)){if(e.trigger(Th.BACK_BUFFER_REACHED,{bufferEnd:h}),t.live)e.trigger(Th.LIVE_BACK_BUFFER_REACHED,{bufferEnd:h});else if(r.ended&&s.end(s.length-1)-o<2*n)return void Lh.info(`[buffer-controller]: Cannot flush ${i} back buffer while SourceBuffer is in ended state`);e.trigger(Th.BUFFER_FLUSHING,{startOffset:0,endOffset:h,type:i})}}}))}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||"open"!==this.mediaSource.readyState)return;const{details:e,hls:t,media:i,mediaSource:s}=this,r=e.fragments[0].start+e.totalduration,a=i.duration,o=Sh(s.duration)?s.duration:0;e.live&&t.config.liveDurationInfinity?(Lh.log("[buffer-controller]: Media Source duration is set to Infinity"),s.duration=1/0,this.updateSeekableRange(e)):(r>o&&r>a||!Sh(a))&&(Lh.log(`[buffer-controller]: Updating Media Source duration to ${r.toFixed(3)}`),s.duration=r)}updateSeekableRange(e){const t=this.mediaSource,i=e.fragments;if(i.length&&e.live&&null!=t&&t.setLiveSeekableRange){const s=Math.max(0,i[0].start),r=Math.max(s,s+e.totalduration);t.setLiveSeekableRange(s,r)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:i}=this,s=Object.keys(i).length;if(s&&!e||2===s){this.createSourceBuffers(i),this.pendingTracks={};const e=this.getSourceBufferTypes();if(e.length)this.hls.trigger(Th.BUFFER_CREATED,{tracks:this.tracks}),e.forEach((e=>{t.executeNext(e)}));else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:i}=this;if(!i)throw Error("createSourceBuffers called when mediaSource was null");for(const s in e)if(!t[s]){const r=e[s];if(!r)throw Error(`source buffer exists for track ${s}, however track does not`);const a=r.levelCodec||r.codec,o=`${r.container};codecs=${a}`;Lh.log(`[buffer-controller]: creating sourceBuffer(${o})`);try{const e=t[s]=i.addSourceBuffer(o),n=s;this.addBufferListener(n,"updatestart",this._onSBUpdateStart),this.addBufferListener(n,"updateend",this._onSBUpdateEnd),this.addBufferListener(n,"error",this._onSBUpdateError),this.tracks[s]={buffer:e,codec:a,container:r.container,levelCodec:r.levelCodec,metadata:r.metadata,id:r.id}}catch(e){Lh.error(`[buffer-controller]: error while trying to add sourceBuffer: ${e.message}`),this.hls.trigger(Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:o})}}}_onSBUpdateStart(e){const{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){const{operationQueue:t}=this;t.current(e).onComplete(),t.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){const i=new Error(`${e} SourceBuffer error`);Lh.error(`[buffer-controller]: ${i}`,t),this.hls.trigger(Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.BUFFER_APPENDING_ERROR,error:i,fatal:!1});const s=this.operationQueue.current(e);s&&s.onError(t)}removeExecutor(e,t,i){const{media:s,mediaSource:r,operationQueue:a,sourceBuffer:o}=this,n=o[e];if(!s||!r||!n)return Lh.warn(`[buffer-controller]: Attempting to remove from the ${e} SourceBuffer, but it does not exist`),void a.shiftAndExecuteNext(e);const l=Sh(s.duration)?s.duration:1/0,h=Sh(r.duration)?r.duration:1/0,d=Math.max(0,t),c=Math.min(i,l,h);c>d&&!n.ending?(n.ended=!1,Lh.log(`[buffer-controller]: Removing [${d},${c}] from the ${e} SourceBuffer`),n.remove(d,c)):a.shiftAndExecuteNext(e)}appendExecutor(e,t){const{operationQueue:i,sourceBuffer:s}=this,r=s[t];if(!r)return Lh.warn(`[buffer-controller]: Attempting to append to the ${t} SourceBuffer, but it does not exist`),void i.shiftAndExecuteNext(t);r.ended=!1,r.appendBuffer(e)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length)return Lh.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);const{operationQueue:i}=this,s=t.map((e=>i.appendBlocker(e)));Promise.all(s).then((()=>{e(),t.forEach((e=>{const t=this.sourceBuffer[e];null!=t&&t.updating||i.shiftAndExecuteNext(e)}))}))}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,i){const s=this.sourceBuffer[e];if(!s)return;const r=i.bind(this,e);this.listeners[e].push({event:t,listener:r}),s.addEventListener(t,r)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach((e=>{t.removeEventListener(e.event,e.listener)}))}},capLevelController:hm,errorController:class{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=Lh.log.bind(Lh,"[info]:"),this.warn=Lh.warn.bind(Lh,"[warning]:"),this.error=Lh.error.bind(Lh,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(Th.ERROR,this.onError,this),e.on(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Th.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(Th.ERROR,this.onError,this),e.off(Th.ERROR,this.onErrorOut,this),e.off(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Th.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){this.playlistError=0}stopLoad(){}getVariantLevelIndex(e){return(null==e?void 0:e.type)===gc?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var i,s;if(t.fatal)return;const r=this.hls,a=t.context;switch(t.details){case kh.FRAG_LOAD_ERROR:case kh.FRAG_LOAD_TIMEOUT:case kh.KEY_LOAD_ERROR:case kh.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case kh.FRAG_PARSING_ERROR:if(null!=(i=t.frag)&&i.gap)return void(t.errorAction={action:iu,flags:au});case kh.FRAG_GAP:case kh.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=su);case kh.LEVEL_EMPTY_ERROR:case kh.LEVEL_PARSING_ERROR:{var o,n;const e=t.parent===gc?t.level:r.loadLevel;t.details===kh.LEVEL_EMPTY_ERROR&&null!=(o=t.context)&&null!=(n=o.levelDetails)&&n.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,e):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,e))}return;case kh.LEVEL_LOAD_ERROR:case kh.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==a?void 0:a.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a.level)));case kh.AUDIO_TRACK_LOAD_ERROR:case kh.AUDIO_TRACK_LOAD_TIMEOUT:case kh.SUBTITLE_LOAD_ERROR:case kh.SUBTITLE_TRACK_LOAD_TIMEOUT:if(a){const e=r.levels[r.loadLevel];if(e&&(a.type===fc&&a.groupId===e.audioGroupId||a.type===mc&&a.groupId===e.textGroupId))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=su,void(t.errorAction.flags=ou)}return;case kh.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const e=r.levels[r.loadLevel],i=null==e?void 0:e.attrs["HDCP-LEVEL"];i&&(t.errorAction={action:su,flags:nu,hdcpLevel:i})}return;case kh.BUFFER_ADD_CODEC_ERROR:case kh.REMUX_ALLOC_ERROR:return void(t.errorAction=this.getLevelSwitchAction(t,null!=(s=t.level)?s:r.loadLevel));case kh.INTERNAL_EXCEPTION:case kh.BUFFER_APPENDING_ERROR:case kh.BUFFER_APPEND_ERROR:case kh.BUFFER_FULL_ERROR:case kh.LEVEL_SWITCH_ERROR:case kh.BUFFER_STALLED_ERROR:case kh.BUFFER_SEEK_OVER_HOLE:case kh.BUFFER_NUDGE_ON_STALL:return void(t.errorAction={action:iu,flags:au})}if(t.type===Eh.KEY_SYSTEM_ERROR){const e=this.getVariantLevelIndex(t.frag);return t.levelRetry=!1,void(t.errorAction=this.getLevelSwitchAction(t,e))}}getPlaylistRetryOrSwitchAction(e,t){var i;const s=Kc(this.hls.config.playlistLoadPolicy,e),r=this.playlistError++,a=null==(i=e.response)?void 0:i.code;if(Qc(s,r,Jc(e),a))return{action:ru,flags:au,retryConfig:s,retryCount:r};const o=this.getLevelSwitchAction(e,t);return s&&(o.retryConfig=s,o.retryCount=r),o}getFragRetryOrSwitchAction(e){const t=this.hls,i=this.getVariantLevelIndex(e.frag),s=t.levels[i],{fragLoadPolicy:r,keyLoadPolicy:a}=t.config,o=Kc(e.details.startsWith("key")?a:r,e),n=t.levels.reduce(((e,t)=>e+t.fragmentError),0);if(s){var l;e.details!==kh.FRAG_GAP&&s.fragmentError++;const t=null==(l=e.response)?void 0:l.code;if(Qc(o,n,Jc(e),t))return{action:ru,flags:au,retryConfig:o,retryCount:n}}const h=this.getLevelSwitchAction(e,i);return o&&(h.retryConfig=o,h.retryCount=n),h}getLevelSwitchAction(e,t){const i=this.hls;null==t&&(t=i.loadLevel);const s=this.hls.levels[t];if(s&&(s.loadError++,i.autoLevelEnabled)){var r,a;let t=-1;const{levels:o,loadLevel:n,minAutoLevel:l,maxAutoLevel:h}=i,d=null==(r=e.frag)?void 0:r.type,{type:c,groupId:u}=null!=(a=e.context)?a:{};for(let i=o.length;i--;){const r=(i+n)%o.length;if(r!==n&&r>=l&&r<=h&&0===o[r].loadError){const i=o[r];if(e.details===kh.FRAG_GAP&&e.frag){const t=o[r].details;if(t){const i=Zc(e.frag,t.fragments,e.frag.start);if(null!=i&&i.gap)continue}}else{if(c===fc&&u===i.audioGroupId||c===mc&&u===i.textGroupId)continue;if(d===yc&&s.audioGroupId===i.audioGroupId||d===Ac&&s.textGroupId===i.textGroupId)continue}t=r;break}}if(t>-1&&i.loadLevel!==t)return e.levelRetry=!0,this.playlistError=0,{action:su,flags:au,nextAutoLevel:t}}return{action:su,flags:ou}}onErrorOut(e,t){var i;switch(null==(i=t.errorAction)?void 0:i.action){case iu:break;case su:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===kh.FRAG_GAP||(t.fatal=!0)}t.fatal&&this.hls.stopLoad()}sendAlternateToPenaltyBox(e){const t=this.hls,i=e.errorAction;if(!i)return;const{flags:s,hdcpLevel:r,nextAutoLevel:a}=i;switch(s){case au:this.switchLevel(e,a);break;case ou:i.resolved||(i.resolved=this.redundantFailover(e));break;case nu:r&&(t.maxHdcpLevel=Bc[Bc.indexOf(r)-1],i.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`)}i.resolved||this.switchLevel(e,a)}switchLevel(e,t){void 0!==t&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}redundantFailover(e){const{hls:t,penalizedRenditions:i}=this,s=e.parent===gc?e.level:t.loadLevel,r=t.levels[s],a=r.url.length,o=e.frag?e.frag.urlId:r.urlId;r.urlId!==o||e.frag&&!r.details||this.penalizeRendition(r,e);for(let n=1;n{e.urlId=l})),t.nextLoadLevel=s,!0}return!1}penalizeRendition(e,t){const{penalizedRenditions:i}=this,s=i[e.urlId]||{lastErrorPerfMs:0,errors:[],details:void 0};s.lastErrorPerfMs=performance.now(),s.errors.push(t),s.details=e.details,i[e.urlId]=s}},fpsController:class{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(Th.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(Th.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const i=this.hls.config;if(i.capLevelOnFPSDrop){const e=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=e,e&&"function"==typeof e.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,i){const s=performance.now();if(t){if(this.lastTime){const e=s-this.lastTime,r=i-this.lastDroppedFrames,a=t-this.lastDecodedFrames,o=1e3*r/e,n=this.hls;if(n.trigger(Th.FPS_DROP,{currentDropped:r,currentDecoded:a,totalDroppedFrames:i}),o>0&&r>n.config.fpsDroppedMonitoringThreshold*a){let e=n.currentLevel;Lh.warn("drop FPS ratio greater than max allowed value for currentLevel: "+e),e>0&&(-1===n.autoLevelCapping||n.autoLevelCapping>=e)&&(e-=1,n.trigger(Th.FPS_DROP_LEVEL_CAPPING,{level:e,droppedLevel:n.currentLevel}),n.autoLevelCapping=e,this.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=i,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}},stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:sd,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:xm,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:class extends Xu{constructor(e,t,i){super(e,t,i,"[subtitle-stream-controller]",Ac),this.levels=[],this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;e.on(Th.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Th.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Th.LEVEL_LOADED,this.onLevelLoaded,this),e.on(Th.ERROR,this.onError,this),e.on(Th.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(Th.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(Th.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(Th.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(Th.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(Th.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(Th.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Th.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Th.LEVEL_LOADED,this.onLevelLoaded,this),e.off(Th.ERROR,this.onError,this),e.off(Th.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(Th.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(Th.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(Th.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(Th.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(Th.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=zu,this.setInterval(500),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:i,success:s}=t;if(this.fragPrevious=i,this.state=zu,!s)return;const r=this.tracksBuffered[this.currentTrackId];if(!r)return;let a;const o=i.start;for(let e=0;e=r[e].start&&o<=r[e].end){a=r[e];break}const n=i.start+i.duration;a?a.end=n:(a={start:o,end:n},r.push(a)),this.fragmentTracker.fragBuffered(i)}onBufferFlushing(e,t){const{startOffset:i,endOffset:s}=t;if(0===i&&s!==Number.POSITIVE_INFINITY){const e=s-1;if(e<=0)return;t.endOffsetSubtitles=Math.max(0,e),this.tracksBuffered.forEach((t=>{for(let i=0;inew Nc(e))):(this.tracksBuffered=[],this.levels=t.map((e=>{const t=new Nc(e);return this.tracksBuffered[t.id]=[],t})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,Ac),this.fragPrevious=null,this.mediaBuffer=null)}onSubtitleTrackSwitch(e,t){if(this.currentTrackId=t.id,!this.levels.length||-1===this.currentTrackId)return void this.clearInterval();const i=this.levels[this.currentTrackId];null!=i&&i.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,i&&this.setInterval(500)}onSubtitleTrackLoaded(e,t){var i;const{details:s,id:r}=t,{currentTrackId:a,levels:o}=this;if(!o.length)return;const n=o[a];if(r>=o.length||r!==a||!n)return;this.mediaBuffer=this.mediaBufferTimeRanges;let l=0;if(s.live||null!=(i=n.details)&&i.live){const e=this.mainDetails;if(s.deltaUpdateFailed||!e)return;const t=e.fragments[0];n.details?(l=this.alignPlaylists(s,n.details),0===l&&t&&(l=t.start,Hc(s,l))):s.hasProgramDateTime&&e.hasProgramDateTime?(Bu(s,e),l=s.fragments[0].start):t&&(l=t.start,Hc(s,l))}if(n.details=s,this.levelLastLoaded=r,this.startFragRequested||!this.mainDetails&&s.live||this.setStartPosition(n.details,l),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===zu){Zc(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),n.details=void 0)}}_handleFragmentLoadComplete(e){const{frag:t,payload:i}=e,s=t.decryptdata,r=this.hls;if(!this.fragContextChanged(t)&&i&&i.byteLength>0&&s&&s.key&&s.iv&&"AES-128"===s.method){const e=performance.now();this.decrypter.decrypt(new Uint8Array(i),s.key.buffer,s.iv.buffer).catch((e=>{throw r.trigger(Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:t}),e})).then((i=>{const s=performance.now();r.trigger(Th.FRAG_DECRYPTED,{frag:t,payload:i,stats:{tstart:e,tdecrypt:s}})})).catch((e=>{this.warn(`${e.name}: ${e.message}`),this.state=zu}))}}doTick(){if(this.media){if(this.state===zu){const{currentTrackId:e,levels:t}=this,i=t[e];if(!t.length||!i||!i.details)return;const{config:s}=this,r=this.getLoadPosition(),a=Ru.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],r,s.maxBufferHole),{end:o,len:n}=a,l=this.getFwdBufferInfo(this.media,gc),h=i.details;if(n>this.getMaxBufferLength(null==l?void 0:l.len)+h.levelTargetDuration)return;const d=h.fragments,c=d.length,u=h.edge;let p=null;const f=this.fragPrevious;if(ou-e?0:e;p=Zc(f,d,Math.max(d[0].start,o),t),!p&&f&&f.startthis.onTextTracksChanged(),this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes(this.trackId)}registerListeners(){const{hls:e}=this;e.on(Th.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(Th.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Th.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Th.LEVEL_LOADING,this.onLevelLoading,this),e.on(Th.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(Th.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(Th.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(Th.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(Th.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Th.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Th.LEVEL_LOADING,this.onLevelLoading,this),e.off(Th.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(Th.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(Th.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);uf(this.media.textTracks).forEach((e=>{Tc(e)})),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:i,details:s}=t,{trackId:r}=this,a=this.tracksInGroup[r];if(!a)return void this.warn(`Invalid subtitle track id ${i}`);const o=a.details;a.details=t.details,this.log(`subtitle track ${i} loaded [${s.startSN}-${s.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(null==t||!t.textGroupIds)return;const i=t.textGroupIds[t.urlId],s=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;if(this.groupId!==i){const e=this.tracks.filter((e=>!i||e.groupId===i));this.tracksInGroup=e;const t=this.findTrackId(null==s?void 0:s.name)||this.findTrackId();this.groupId=i||null;const r={subtitleTracks:e};this.log(`Updating subtitle tracks, ${e.length} track(s) found in "${i}" group-id`),this.hls.trigger(Th.SUBTITLE_TRACKS_UPDATED,r),-1!==t&&this.setSubtitleTrack(t,s)}else this.shouldReloadPlaylist(s)&&this.setSubtitleTrack(this.trackId,s)}findTrackId(e){const t=this.tracksInGroup;for(let i=0;ie.groupId===this.groupId));if(-1===e)[].slice.call(s).forEach((e=>{e.mode="disabled"}));else{const e=r[i];e&&(e.mode="disabled")}const a=r[e];a&&(a.mode=this.subtitleDisplay?"showing":"hidden")}setSubtitleTrack(e,t){var i;const s=this.tracksInGroup;if(!this.media)return void(this.queuedDefaultTrack=e);if(this.trackId!==e&&this.toggleTrackModes(e),this.trackId===e&&(-1===e||null!=(i=s[e])&&i.details)||e<-1||e>=s.length)return;this.clearTimer();const r=s[e];if(this.log(`Switching to subtitle-track ${e}`+(r?` "${r.name}" lang:${r.lang} group:${r.groupId}`:"")),this.trackId=e,r){const{id:e,groupId:i="",name:s,type:a,url:o}=r;this.hls.trigger(Th.SUBTITLE_TRACK_SWITCH,{id:e,groupId:i,name:s,type:a,url:o});const n=this.switchParams(r.url,null==t?void 0:t.details);this.loadPlaylist(n)}else this.hls.trigger(Th.SUBTITLE_TRACK_SWITCH,{id:e})}onTextTracksChanged(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let e=-1;const t=uf(this.media.textTracks);for(let i=0;i=0&&(s[0]=Math.min(s[0],t),s[1]=Math.max(s[1],i),a=!0,d/(i-t)>.5))return}var o,n,l,h;if(a||r.push([t,i]),this.config.renderTextTracksNatively){const r=this.captionsTracks[e];this.Cues.newCue(r,t,i,s)}else{const r=this.Cues.newCue(null,t,i,s);this.hls.trigger(Th.CUES_PARSED,{type:"captions",cues:r,track:e})}}onInitPtsFound(e,{frag:t,id:i,initPTS:s,timescale:r}){const{unparsedVttFrags:a}=this;"main"===i&&(this.initPTS[t.cc]={baseTime:s,timescale:r}),a.length&&(this.unparsedVttFrags=[],a.forEach((e=>{this.onFragLoaded(Th.FRAG_LOADED,e)})))}getExistingTrack(e){const{media:t}=this;if(t)for(let i=0;i{Tc(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let e=0;ee.textCodec===Qf));if(this.config.enableWebVTT||s&&this.config.enableIMSC1){if(hf(this.tracks,i))return void(this.tracks=i);if(this.textTracks=[],this.tracks=i,this.config.renderTextTracksNatively){const e=this.media?this.media.textTracks:null;this.tracks.forEach(((t,i)=>{let s;if(e&&i({label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e})));this.hls.trigger(Th.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:e})}}}_captionsOrSubtitlesFromCharacteristics(e){if(e.attrs.CHARACTERISTICS){const t=/transcribes-spoken-dialog/gi.test(e.attrs.CHARACTERISTICS),i=/describes-music-and-sound/gi.test(e.attrs.CHARACTERISTICS);if(t&&i)return"captions"}return"subtitles"}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((e=>{const t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(!t)return;const i=`textTrack${t[1]}`,s=this.captionsProperties[i];s&&(s.label=e.name,e.lang&&(s.languageCode=e.lang),s.media=e)}))}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){const{cea608Parser1:i,cea608Parser2:s,lastSn:r,lastPartIndex:a}=this;if(this.enabled&&i&&s&&t.frag.type===gc){var o,n;const e=t.frag.sn,l=null!=(o=null==t||null==(n=t.part)?void 0:n.index)?o:-1;e===r+1||e===r&&l===a+1||(i.reset(),s.reset()),this.lastSn=e,this.lastPartIndex=l}}onFragLoaded(e,t){const{frag:i,payload:s}=t;if(i.type===Ac)if(s.byteLength){const e=i.decryptdata,r="stats"in t;if(null==e||!e.encrypted||r){const e=this.tracks[i.level],r=this.vttCCs;r[i.cc]||(r[i.cc]={start:i.start,prevCC:this.prevCC,new:!0},this.prevCC=i.cc),e&&e.textCodec===Qf?this._parseIMSC1(i,s):this._parseVTTs(t)}}else this.hls.trigger(Th.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const i=this.hls;tm(t,this.initPTS[e.cc],(t=>{this._appendCues(t,e.level),i.trigger(Th.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(t=>{Lh.log(`Failed to parse IMSC1: ${t}`),i.trigger(Th.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))}_parseVTTs(e){var t;const{frag:i,payload:s}=e,{initPTS:r,unparsedVttFrags:a}=this,o=r.length-1;if(!r[i.cc]&&-1===o)return void a.push(e);const n=this.hls;Yf(null!=(t=i.initSegment)&&t.data?Md(i.initSegment.data,new Uint8Array(s)):s,this.initPTS[i.cc],this.vttCCs,i.cc,i.start,(e=>{this._appendCues(e,i.level),n.trigger(Th.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:i})}),(t=>{const r="Missing initPTS for VTT MPEGTS"===t.message;r?a.push(e):this._fallbackToIMSC1(i,s),Lh.log(`Failed to parse VTT cue: ${t}`),r&&o>i.cc||n.trigger(Th.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:i,error:t})}))}_fallbackToIMSC1(e,t){const i=this.tracks[e.level];i.textCodec||tm(t,this.initPTS[e.cc],(()=>{i.textCodec=Qf,this._parseIMSC1(e,t)}),(()=>{i.textCodec="wvtt"}))}_appendCues(e,t){const i=this.hls;if(this.config.renderTextTracksNatively){const i=this.textTracks[t];if(!i||"disabled"===i.mode)return;e.forEach((e=>Sc(i,e)))}else{const s=this.tracks[t];if(!s)return;const r=s.default?"default":"subtitles"+t;i.trigger(Th.CUES_PARSED,{type:"subtitles",cues:e,track:r})}}onFragDecrypted(e,t){const{frag:i}=t;i.type===Ac&&this.onFragLoaded(Th.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){const{cea608Parser1:i,cea608Parser2:s}=this;if(!this.enabled||!i||!s)return;const{frag:r,samples:a}=t;if(r.type!==gc||"NONE"!==this.closedCaptionsForLevel(r))for(let e=0;eEc(e[s],t,i)))}if(this.config.renderTextTracksNatively&&0===t&&void 0!==s){const{textTracks:e}=this;Object.keys(e).forEach((i=>Ec(e[i],t,s)))}}}extractCea608Data(e){const t=[[],[]],i=31&e[0];let s=2;for(let r=0;r0&&-1===e?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=zu):(this.loadedmetadata=!1,this.state=Wu),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case zu:this.doTickIdle();break;case Wu:{var e;const{levels:t,trackId:i}=this,s=null==t||null==(e=t[i])?void 0:e.details;if(s){if(this.waitForCdnTuneIn(s))break;this.state=Yu}break}case Hu:{var t;const e=performance.now(),i=this.retryDate;(!i||e>=i||null!=(t=this.media)&&t.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=zu);break}case Yu:{const e=this.waitingData;if(e){const{frag:t,part:i,cache:s,complete:r}=e;if(void 0!==this.initPTS[t.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=Vu;const e={frag:t,part:i,payload:s.flush(),networkDetails:null};this._handleFragmentLoadProgress(e),r&&super._handleFragmentLoadComplete(e)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${t.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const e=this.getLoadPosition(),i=Ru.bufferInfo(this.mediaBuffer,e,this.config.maxBufferHole);eu(i.end,this.config.maxFragLookUpTolerance,t)<0&&(this.log(`Waiting fragment cc (${t.cc}) @ ${t.start} cancelled because another fragment at ${i.end} is needed`),this.clearWaitingFragment())}}else this.state=zu}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=zu)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:t,media:i,trackId:s}=this,r=e.config;if(null==t||!t[s])return;if(!i&&(this.startFragRequested||!r.startFragPrefetch))return;const a=t[s],o=a.details;if(!o||o.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(o))return void(this.state=Wu);const n=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&n&&(this.bufferFlushed=!1,this.afterBufferFlushed(n,Oh,yc));const l=this.getFwdBufferInfo(n,yc);if(null===l)return;const{bufferedTrack:h,switchingTrack:d}=this;if(!d&&this._streamEnded(l,o))return e.trigger(Th.BUFFER_EOS,{type:"audio"}),void(this.state=Ku);const c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,gc),u=l.len,p=this.getMaxBufferLength(null==c?void 0:c.len);if(u>=p&&!d)return;const f=o.fragments[0].start;let m=l.end;if(d&&i){const e=this.getLoadPosition();h&&d.attrs!==h.attrs&&(m=e),o.PTSKnown&&ef||l.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),i.currentTime=f+.05)}let g=this.getNextFragment(m,o),y=!1;if(g&&this.isLoopLoading(g,m)&&(y=!!g.gap,g=this.getNextFragmentLoopLoading(g,o,l,gc,p)),!g)return void(this.bufferFlushed=!0);const A=c&&g.start>c.end+o.targetduration;if(A||(null==c||!c.len)&&l.len){const e=this.getAppendedFrag(g.start,gc);if(null===e)return;if(y||(y=!!e.gap||!!A&&0===c.len),A&&!y||y&&l.nextStart&&l.nextStartnew Nc(e)))}onAudioTrackSwitching(e,t){const i=!!t.url;this.trackId=t.id;const{fragCurrent:s}=this;s&&(s.abortRequests(),this.removeUnbufferedFrags(s.start)),this.resetLoadingState(),i?this.setInterval(100):this.resetTransmuxer(),i?(this.switchingTrack=t,this.state=zu):(this.switchingTrack=null,this.bufferedTrack=t,this.state=ju),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(Th.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var i;if(null==this.mainDetails)return void(this.cachedTrackLoadedData=t);const{levels:s}=this,{details:r,id:a}=t;if(!s)return void this.warn(`Audio tracks were reset while loading level ${a}`);this.log(`Track ${a} loaded [${r.startSN},${r.endSN}]${r.lastPartSn?`[part-${r.lastPartSn}-${r.lastPartIndex}]`:""},duration:${r.totalduration}`);const o=s[a];let n=0;if(r.live||null!=(i=o.details)&&i.live){this.checkLiveUpdate(r);const e=this.mainDetails;if(r.deltaUpdateFailed||!e)return;!o.details&&r.hasProgramDateTime&&e.hasProgramDateTime?(Bu(r,e),n=r.fragments[0].start):n=this.alignPlaylists(r,o.details)}o.details=r,this.levelLastLoaded=a,this.startFragRequested||!this.mainDetails&&r.live||this.setStartPosition(o.details,n),this.state!==Wu||this.waitForCdnTuneIn(r)||(this.state=zu),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:i,part:s,payload:r}=e,{config:a,trackId:o,levels:n}=this;if(!n)return void this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${i.sn} of level ${i.level} will not be buffered`);const l=n[o];if(!l)return void this.warn("Audio track is undefined on fragment load progress");const h=l.details;if(!h)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(i.start);const d=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2";let c=this.transmuxer;c||(c=this.transmuxer=new sf(this.hls,yc,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const u=this.initPTS[i.cc],p=null==(t=i.initSegment)?void 0:t.data;if(void 0!==u){const e=!1,t=s?s.index:-1,a=-1!==t,o=new xu(i.level,i.sn,i.stats.chunkCount,r.byteLength,t,a);c.push(r,p,d,"",i,s,h.totalduration,e,o,u)}else{this.log(`Unknown video PTS for cc ${i.cc}, waiting for video PTS before demuxing audio frag ${i.sn} of [${h.startSN} ,${h.endSN}],track ${o}`);const{cache:e}=this.waitingData=this.waitingData||{frag:i,part:s,cache:new lf,complete:!1};e.push(new Uint8Array(r)),this.waitingVideoCC=this.videoTrackCC,this.state=Yu}}_handleFragmentLoadComplete(e){this.waitingData?this.waitingData.complete=!0:super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const i=t.tracks.audio;i&&(this.mediaBuffer=i.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)}onFragBuffered(e,t){const{frag:i,part:s}=t;if(i.type===yc)if(this.fragContextChanged(i))this.warn(`Fragment ${i.sn}${s?" p: "+s.index:""} of level ${i.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);else{if("initSegment"!==i.sn){this.fragPrevious=i;const e=this.switchingTrack;e&&(this.bufferedTrack=e,this.switchingTrack=null,this.hls.trigger(Th.AUDIO_TRACK_SWITCHED,vh({},e)))}this.fragBufferedComplete(i,s)}else if(!this.loadedmetadata&&i.type===gc){const e=this.videoBuffer||this.media;if(e){Ru.getBuffered(e).length&&(this.loadedmetadata=!0)}}}onError(e,t){var i;if(t.fatal)this.state=qu;else switch(t.details){case kh.FRAG_GAP:case kh.FRAG_PARSING_ERROR:case kh.FRAG_DECRYPT_ERROR:case kh.FRAG_LOAD_ERROR:case kh.FRAG_LOAD_TIMEOUT:case kh.KEY_LOAD_ERROR:case kh.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(yc,t);break;case kh.AUDIO_TRACK_LOAD_ERROR:case kh.AUDIO_TRACK_LOAD_TIMEOUT:case kh.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==Wu||(null==(i=t.context)?void 0:i.type)!==fc||(this.state=zu);break;case kh.BUFFER_FULL_ERROR:if(!t.parent||"audio"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case kh.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}}onBufferFlushed(e,{type:t}){t===Oh&&(this.bufferFlushed=!0,this.state===Ku&&(this.state=zu))}_handleTransmuxComplete(e){var t;const i="audio",{hls:s}=this,{remuxResult:r,chunkMeta:a}=e,o=this.getCurrentContext(a);if(!o)return void this.resetWhenMissingContext(a);const{frag:n,part:l,level:h}=o,{details:d}=h,{audio:c,text:u,id3:p,initSegment:f}=r;if(!this.fragContextChanged(n)&&d){if(this.state=$u,this.switchingTrack&&c&&this.completeAudioSwitch(this.switchingTrack),null!=f&&f.tracks){const e=n.initSegment||n;this._bufferInitSegment(f.tracks,e,a),s.trigger(Th.FRAG_PARSING_INIT_SEGMENT,{frag:e,id:i,tracks:f.tracks})}if(c){const{startPTS:e,endPTS:t,startDTS:i,endDTS:s}=c;l&&(l.elementaryStreams[Oh]={startPTS:e,endPTS:t,startDTS:i,endDTS:s}),n.setElementaryStreamInfo(Oh,e,t,i,s),this.bufferFragmentData(c,n,l,a)}if(null!=p&&null!=(t=p.samples)&&t.length){const e=wh({id:i,frag:n,details:d},p);s.trigger(Th.FRAG_PARSING_METADATA,e)}if(u){const e=wh({id:i,frag:n,details:d},u);s.trigger(Th.FRAG_PARSING_USERDATA,e)}}else this.fragmentTracker.removeFragment(n)}_bufferInitSegment(e,t,i){if(this.state!==$u)return;e.video&&delete e.video;const s=e.audio;if(!s)return;s.levelCodec=s.codec,s.id="audio",this.log(`Init audio buffer, container:${s.container}, codecs[parsed]=[${s.codec}]`),this.hls.trigger(Th.BUFFER_CODECS,e);const r=s.initSegment;if(null!=r&&r.byteLength){const e={type:"audio",frag:t,part:null,chunkMeta:i,parent:t.type,data:r};this.hls.trigger(Th.BUFFER_APPENDING,e)}this.tick()}loadFragment(e,t,i){const s=this.fragmentTracker.getState(e);var r;(this.fragCurrent=e,this.switchingTrack||s===fu||s===gu)?"initSegment"===e.sn?this._loadInitSegment(e,t):null!=(r=t.details)&&r.live&&!this.initPTS[e.cc]?(this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=Yu):(this.startFragRequested=!0,super.loadFragment(e,t,i)):this.clearTrackerIfNeeded(e)}completeAudioSwitch(e){const{hls:t,media:i,bufferedTrack:s}=this,r=null==s?void 0:s.attrs,a=e.attrs;i&&r&&(r.CHANNELS!==a.CHANNELS||r.NAME!==a.NAME||r.LANGUAGE!==a.LANGUAGE)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio")),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(Th.AUDIO_TRACK_SWITCHED,vh({},e))}},audioTrackController:class extends hu{constructor(e){super(e,"[audio-track-controller]"),this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.on(Th.MANIFEST_PARSED,this.onManifestParsed,this),e.on(Th.LEVEL_LOADING,this.onLevelLoading,this),e.on(Th.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(Th.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(Th.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(Th.MANIFEST_LOADING,this.onManifestLoading,this),e.off(Th.MANIFEST_PARSED,this.onManifestParsed,this),e.off(Th.LEVEL_LOADING,this.onLevelLoading,this),e.off(Th.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(Th.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(Th.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:i,groupId:s,details:r}=t,a=this.tracksInGroup[i];if(!a||a.groupId!==s)return void this.warn(`Track with id:${i} and group:${s} not found in active group ${a.groupId}`);const o=a.details;a.details=t.details,this.log(`audio-track ${i} "${a.name}" lang:${a.lang} group:${s} loaded [${r.startSN}-${r.endSN}]`),i===this.trackId&&this.playlistLoaded(i,t,o)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(null==t||!t.audioGroupIds)return;const i=t.audioGroupIds[t.urlId];if(this.groupId!==i){this.groupId=i||null;const e=this.tracks.filter((e=>!i||e.groupId===i));this.selectDefaultTrack&&!e.some((e=>e.default))&&(this.selectDefaultTrack=!1),this.tracksInGroup=e;const t={audioTracks:e};this.log(`Updating audio tracks, ${e.length} track(s) found in group:${i}`),this.hls.trigger(Th.AUDIO_TRACKS_UPDATED,t),this.selectInitialTrack()}else this.shouldReloadPlaylist(this.currentTrack)&&this.setAudioTrack(this.trackId)}onError(e,t){!t.fatal&&t.context&&t.context.type===fc&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&(this.requestScheduled=-1,this.checkRetry(t))}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length)return void this.warn("Invalid id passed to audio-track controller");this.clearTimer();const i=this.currentTrack;t[this.trackId];const s=t[e],{groupId:r,name:a}=s;if(this.log(`Switching to audio-track ${e} "${a}" lang:${s.lang} group:${r}`),this.trackId=e,this.currentTrack=s,this.selectDefaultTrack=!1,this.hls.trigger(Th.AUDIO_TRACK_SWITCHING,vh({},s)),s.details&&!s.details.live)return;const o=this.switchParams(s.url,null==i?void 0:i.details);this.loadPlaylist(o)}selectInitialTrack(){const e=this.tracksInGroup,t=this.findTrackId(this.currentTrack)|this.findTrackId(null);if(-1!==t)this.setAudioTrack(t);else{const t=new Error(`No track found for running audio group-ID: ${this.groupId} track count: ${e.length}`);this.warn(t.message),this.hls.trigger(Th.ERROR,{type:Eh.MEDIA_ERROR,details:kh.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:t})}}findTrackId(e){const t=this.tracksInGroup;for(let i=0;it!==e)))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:i}=t;null!==i&&(this.pathwayId=i.pathwayId,this.uri=i.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:i}=t;if((null==i?void 0:i.action)===su&&i.flags===ou){let e=this.pathwayPriority;const t=this.pathwayId;this.penalizedPathways[t]||(this.penalizedPathways[t]=performance.now()),!e&&this.levels&&(e=this.levels.reduce(((e,t)=>(-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e)),[])),e&&e.length>1&&(this.updatePathwayPriority(e),i.resolved=this.pathwayId!==t)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){const i=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${i}"`),t=this.getLevelsForPathway(i),this.pathwayId=i}return t.length!==e.length?(this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t):e}getLevelsForPathway(e){return null===this.levels?[]:this.levels.filter((t=>e===t.pathwayId))}updatePathwayPriority(e){let t;this.pathwayPriority=e;const i=this.penalizedPathways,s=performance.now();Object.keys(i).forEach((e=>{s-i[e]>3e5&&delete i[e]}));for(let s=0;s0){this.log(`Setting Pathway to "${r}"`),this.pathwayId=r,this.hls.trigger(Th.LEVELS_UPDATED,{levels:t});const e=this.hls.levels[a];o&&e&&this.levels&&(e.attrs["STABLE-VARIANT-ID"]!==o.attrs["STABLE-VARIANT-ID"]&&e.bitrate!==o.bitrate&&this.log(`Unstable Pathways change from bitrate ${o.bitrate} to ${e.bitrate}`),this.hls.nextLoadLevel=a);break}}}clonePathways(e){const t=this.levels;if(!t)return;const i={},s={};e.forEach((e=>{const{ID:r,"BASE-ID":a,"URI-REPLACEMENT":o}=e;if(t.some((e=>e.pathwayId===r)))return;const n=this.getLevelsForPathway(a).map((e=>{const t=wh({},e);t.details=void 0,t.url=_m(e.uri,e.attrs["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",o);const a=new Bh(e.attrs);a["PATHWAY-ID"]=r;const n=a.AUDIO&&`${a.AUDIO}_clone_${r}`,l=a.SUBTITLES&&`${a.SUBTITLES}_clone_${r}`;n&&(i[a.AUDIO]=n,a.AUDIO=n),l&&(s[a.SUBTITLES]=l,a.SUBTITLES=l),t.attrs=a;const h=new Nc(t);return uu(h,"audio",n),uu(h,"text",l),h}));t.push(...n),vm(this.audioTracks,i,o,r),vm(this.subtitleTracks,s,o,r)}))}loadSteeringManifest(e){const t=this.hls.config,i=t.loader;let s;this.loader&&this.loader.destroy(),this.loader=new i(t);try{s=new self.URL(e)}catch(t){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest URI: ${e}`)}if("data:"!==s.protocol){const e=0|(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate);s.searchParams.set("_HLS_pathway",this.pathwayId),s.searchParams.set("_HLS_throughput",""+e)}const r={responseType:"json",url:s.href},a=t.steeringManifestLoadPolicy.default,o=a.errorRetry||a.timeoutRetry||{},n={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},l={onSuccess:(e,t,i,r)=>{this.log(`Loaded steering manifest: "${s}"`);const a=e.data;if(1!==a.VERSION)return void this.log(`Steering VERSION ${a.VERSION} not supported!`);this.updated=performance.now(),this.timeToLoad=a.TTL;const{"RELOAD-URI":o,"PATHWAY-CLONES":n,"PATHWAY-PRIORITY":l}=a;if(o)try{this.uri=new self.URL(o,s).href}catch(e){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest RELOAD-URI: ${o}`)}this.scheduleRefresh(this.uri||i.url),n&&this.clonePathways(n),l&&this.updatePathwayPriority(l)},onError:(e,t,i,s)=>{if(this.log(`Error loading steering manifest: ${e.code} ${e.text} (${t.url})`),this.stopLoad(),410===e.code)return this.enabled=!1,void this.log(`Steering manifest ${t.url} no longer available`);let r=1e3*this.timeToLoad;if(429!==e.code)this.scheduleRefresh(this.uri||t.url,r);else{const e=this.loader;if("function"==typeof(null==e?void 0:e.getResponseHeader)){const t=e.getResponseHeader("Retry-After");t&&(r=1e3*parseFloat(t))}this.log(`Steering manifest ${t.url} rate limited`)}},onTimeout:(e,t,i)=>{this.log(`Timeout loading steering manifest (${t.url})`),this.scheduleRefresh(this.uri||t.url)}};this.log(`Requesting steering manifest: ${s}`),this.loader.load(r,n,l)}scheduleRefresh(e,t=1e3*this.timeToLoad){self.clearTimeout(this.reloadTimer),this.reloadTimer=self.setTimeout((()=>{this.loadSteeringManifest(e)}),t)}}});function Lm(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(Lm):Object.keys(e).reduce(((t,i)=>(t[i]=Lm(e[i]),t)),{}):e}function Im(e){const t=e.loader;if(t!==Em&&t!==Sm)Lh.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1;else{(function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1})()&&(e.loader=Em,e.progressive=!0,e.enableSoftwareAES=!0,Lh.log("[config]: Progressive streaming enabled, using FetchLoader"))}}class Pm{static get version(){return"1.4.12"}static isSupported(){return function(){const e=qd();if(!e)return!1;const t=Zu(),i=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),s=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!i&&!!s}()}static get Events(){return Th}static get ErrorTypes(){return Eh}static get ErrorDetails(){return kh}static get DefaultConfig(){return Pm.defaultConfig?Pm.defaultConfig:Dm}static set DefaultConfig(e){Pm.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new ef,this._autoLevelCapping=void 0,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,function(e,t){if(self.console&&!0===e||"object"==typeof e){Dh(e,"debug","log","info","warn","error");try{xh.log(`Debug logs enabled for "${t}" in hls.js version 1.4.12`)}catch(e){xh=Rh}}else xh=Rh}(e.debug||!1,"Hls instance");const t=this.config=function(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const i=Lm(e),s=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((e=>{const r=`${"level"===e?"playlist":e}LoadPolicy`,a=void 0===t[r],o=[];s.forEach((s=>{const n=`${e}Loading${s}`,l=t[n];if(void 0!==l&&a){o.push(n);const e=i[r].default;switch(t[r]={default:e},s){case"TimeOut":e.maxLoadTimeMs=l,e.maxTimeToFirstByteMs=l;break;case"MaxRetry":e.errorRetry.maxNumRetry=l,e.timeoutRetry.maxNumRetry=l;break;case"RetryDelay":e.errorRetry.retryDelayMs=l,e.timeoutRetry.retryDelayMs=l;break;case"MaxRetryTimeout":e.errorRetry.maxRetryDelayMs=l,e.timeoutRetry.maxRetryDelayMs=l}}})),o.length&&Lh.warn(`hls.js config: "${o.join('", "')}" setting(s) are deprecated, use "${r}": ${JSON.stringify(t[r])}`)})),vh(vh({},i),t)}(Pm.DefaultConfig,e);this.userConfig=e,this._autoLevelCapping=-1,t.progressive&&Im(t);const{abrController:i,bufferController:s,capLevelController:r,errorController:a,fpsController:o}=t,n=new a(this),l=this.abrController=new i(this),h=this.bufferController=new s(this),d=this.capLevelController=new r(this),c=new o(this),u=new _c(this),p=new Ic(this),f=t.contentSteeringController,m=f?new f(this):null,g=this.levelController=new cu(this,m),y=new Au(this),A=new ku(this.config),b=this.streamController=new af(this,y,A);d.setStreamController(b),c.setStreamController(b);const v=[u,g,b];m&&v.splice(1,0,m),this.networkControllers=v;const _=[l,h,d,c,p,y];this.audioTrackController=this.createController(t.audioTrackController,v);const w=t.audioStreamController;w&&v.push(new w(this,y,A)),this.subtitleTrackController=this.createController(t.subtitleTrackController,v);const S=t.subtitleStreamController;S&&v.push(new S(this,y,A)),this.createController(t.timelineController,_),A.emeController=this.emeController=this.createController(t.emeController,_),this.cmcdController=this.createController(t.cmcdController,_),this.latencyController=this.createController(Pc,_),this.coreComponents=_,v.push(n);const T=n.onErrorOut;"function"==typeof T&&this.on(Th.ERROR,T,n)}createController(e,t){if(e){const i=new e(this);return t&&t.push(i),i}return null}on(e,t,i=this){this._emitter.on(e,t,i)}once(e,t,i=this){this._emitter.once(e,t,i)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,i=this,s){this._emitter.off(e,t,i,s)}listeners(e){return this._emitter.listeners(e)}emit(e,t,i){return this._emitter.emit(e,t,i)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){Lh.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.trigger(Th.ERROR,{type:Eh.OTHER_ERROR,details:kh.INTERNAL_EXCEPTION,fatal:!1,event:e,error:t})}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){Lh.log("destroy"),this.trigger(Th.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((e=>e.destroy())),this.networkControllers.length=0,this.coreComponents.forEach((e=>e.destroy())),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){Lh.log("attachMedia"),this._media=e,this.trigger(Th.MEDIA_ATTACHING,{media:e})}detachMedia(){Lh.log("detachMedia"),this.trigger(Th.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,i=this.url,s=this.url=Ah.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});Lh.log(`loadSource:${s}`),t&&i&&(i!==s||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(Th.MANIFEST_LOADING,{url:e})}startLoad(e=-1){Lh.log(`startLoad(${e})`),this.networkControllers.forEach((t=>{t.startLoad(e)}))}stopLoad(){Lh.log("stopLoad"),this.networkControllers.forEach((e=>{e.stopLoad()}))}swapAudioCodec(){Lh.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){Lh.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e,t=0){this.levelController.removeLevel(e,t)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){Lh.log(`set currentLevel:${e}`),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){Lh.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){Lh.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){Lh.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){return this.levelController.startLevel}set startLevel(e){Lh.log(`set startLevel:${e}`),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(Lh.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e)}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){Bc.indexOf(e)>-1&&(this._maxHdcpLevel=e)}get autoLevelEnabled(){return-1===this.levelController.manualLevel}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const i=e.length;for(let s=0;s=t)return s;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:i}=this;let s;if(s=-1===t&&e&&e.length?e.length-1:t,i)for(let t=s;t--;){const s=e[t].attrs["HDCP-LEVEL"];if(s&&s<=i)return t}return s}get nextAutoLevel(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)}set nextAutoLevel(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return!!e&&e.subtitleDisplay}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}Pm.defaultConfig=void 0;class Bm extends ba{constructor(e){super(),this.player=e,e._opt,this.canVideoPlay=!1,this.$videoElement=null,this.canvasRenderInterval=null,this.bandwidthEstimateInterval=null,this.fpsInterval=null,this.hlsFps=0,this.hlsPrevFrams=0,this.isInitInfo=!1,this.eventsDestroy=[],this.supportVideoFrameCallbackHandle=null,this.player.isHlsCanVideoPlay()?(this.$videoElement=this.player.video.$videoElement,this.canVideoPlay=!0):Pm.isSupported()?(this.$videoElement=this.player.video.$videoElement,this.hls=new Pm({}),this._initHls(),this._bindEvents()):this.player.debug.error("HlsDecoder","init hls error ,not support "),this.player.debug.log("HlsDecoder","init")}destroy(){return new Promise(((e,t)=>{this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.hls&&(this.hls.destroy(),this.hls=null),this.eventsDestroy.length&&(this.eventsDestroy.forEach((e=>e())),this.eventsDestroy=[]),this.isInitInfo=!1,this._stopCanvasRender(),this._stopBandwidthEstimateInterval(),this._stopFpsInterval(),this.$videoElement=null,this.hlsFps=0,this.player.debug.log("HlsDecoder","destroy"),setTimeout((()=>{e()}),0)}))}checkHlsBufferedDelay(){const e=this.$videoElement;let t=0;const i=e.buffered,s=i.length?i.end(i.length-1):0;return t=s-e.currentTime,t<0&&(this.player.debug.warn("HlsDecoder","checkHlsBufferedDelay result < 0",t,s,e.currentTime),t=0),t}getFps(){return this.hlsFps}_startCanvasRender(){ga()?this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)):(this._stopCanvasRender(),this.canvasRenderInterval=setInterval((()=>{this.player.video.render({$video:this.$videoElement,ts:0})}),40))}_stopCanvasRender(){this.canvasRenderInterval&&(clearInterval(this.canvasRenderInterval),this.canvasRenderInterval=null)}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player.isDestroyed()?this.player.debug.log("HlsDecoder","videoFrameCallback() player is destroyed"):(this.player.video.render({$video:this.$videoElement,ts:t.mediaTime||0}),this.player.handleRender(),this.player.updateStats({dts:t.mediaTime||0}),this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)))}_startBandwidthEstimateInterval(){this._stopBandwidthEstimateInterval(),this.bandwidthEstimateInterval=setInterval((()=>{let e=0;this.hls.bandwidthEstimate&&(e=this.hls.bandwidthEstimate),this.player.emit(Xe.kBps,(e/1024/8/10).toFixed(2))}),1e3)}_stopBandwidthEstimateInterval(){this.bandwidthEstimateInterval&&(clearInterval(this.bandwidthEstimateInterval),this.bandwidthEstimateInterval=null)}_startFpsInterval(){this._stopCanvasRender(),this.fpsInterval=setInterval((()=>{if(this.$videoElement)if(Kr(this.$videoElement.getVideoPlaybackQuality)){const e=this.$videoElement.getVideoPlaybackQuality();this.hlsFps=e.totalVideoFrames-this.hlsPrevFrams,this.hlsPrevFrams=e.totalVideoFrames}else{const e=this.$videoElement.webkitDecodedFrameCount||0;this.hlsFps=e-this.hlsPrevFrams,this.hlsPrevFrams=e}}),1e3)}_stopFpsInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null)}_initHls(){this.player._opt.useCanvasRender&&(this.$videoElement=document.createElement("video"),this.$videoElement.muted=!0,yr()&&(this.$videoElement.style.position="absolute"),this.initVideoEvents()),this.hls.attachMedia(this.$videoElement)}_bindEvents(){const e=this.player,{proxy:t}=this.player.events;this.hls;const i=this.$videoElement,s=ga(),r=t(i,ki,(t=>{if(this.hls){const i=parseInt(t.timeStamp,10);this.player._opt.useCanvasRender&&da(s)&&e.updateStats({ts:i,dts:i})}}));this.eventsDestroy.push(r),this._startBandwidthEstimateInterval(),this._startFpsInterval(),this.hls.on(Pm.Events.ERROR,((e,t)=>{if(t.fatal)switch(t.type){case Pm.ErrorTypes.NETWORK_ERROR:this.player.debug.warn("HlsDecoder","fatal network error encountered, try to recover"),this.hls.startLoad();break;case Pm.ErrorTypes.MEDIA_ERROR:this.player.debug.warn("HlsDecoder","fatal media error encountered, try to recover"),this.hls.recoverMediaError()}})),this.hls.on(Pm.Events.MEDIA_ATTACHING,(()=>{})),this.hls.on(Pm.Events.MEDIA_ATTACHED,(()=>{})),this.hls.on(Pm.Events.MEDIA_DETACHING,(()=>{})),this.hls.on(Pm.Events.MEDIA_DETACHED,(()=>{})),this.hls.on(Pm.Events.BUFFER_RESET,(()=>{})),this.hls.on(Pm.Events.BUFFER_CODECS,(()=>{})),this.hls.on(Pm.Events.BUFFER_CREATED,(()=>{})),this.hls.on(Pm.Events.BUFFER_APPENDING,((e,t)=>{this.player.debug.log("HlsDecoder","BUFFER_APPENDING",t.type)})),this.hls.on(Pm.Events.BUFFER_APPENDED,(()=>{})),this.hls.on(Pm.Events.BUFFER_EOS,(()=>{})),this.hls.on(Pm.Events.BUFFER_FLUSHING,(()=>{})),this.hls.on(Pm.Events.BUFFER_FLUSHED,(()=>{})),this.hls.on(Pm.Events.MANIFEST_LOADING,(()=>{this.player.debug.log("HlsDecoder","MANIFEST_LOADING 开始加载playlist m3u8资源")})),this.hls.on(Pm.Events.MANIFEST_LOADED,((e,t)=>{this.player.debug.log("HlsDecoder","MANIFEST_LOADED playlist m3u8文件加载完成",t.url)})),this.hls.on(Pm.Events.MANIFEST_PARSED,(()=>{this.player.debug.log("HlsDecoder","MANIFEST_PARSED playlist m3u8解析完成"),e._times.demuxStart||(e._times.demuxStart=sr())})),this.hls.on(Pm.Events.LEVEL_LOADING,(()=>{})),this.hls.on(Pm.Events.LEVEL_LOADED,((e,t)=>{})),this.hls.on(Pm.Events.FRAG_LOADING,(()=>{})),this.hls.on(Pm.Events.FRAG_LOADED,((t,i)=>{e._times.decodeStart||(e._times.decodeStart=sr())})),this.hls.on(Pm.Events.BUFFER_APPENDING,(()=>{e._times.videoStart||(e._times.videoStart=sr(),e.handlePlayToRenderTimes())})),this.hls.on(Pm.Events.FRAG_DECRYPTED,(()=>{})),this.hls.on(Pm.Events.KEY_LOADING,(()=>{})),this.hls.on(Pm.Events.KEY_LOADING,(()=>{})),this.hls.on(Pm.Events.FPS_DROP,(e=>{})),this.hls.on(Pm.Events.FPS_DROP_LEVEL_CAPPING,(e=>{})),this.hls.on(Pm.Events.FRAG_PARSING_INIT_SEGMENT,((e,t)=>{this.player.debug.log("HlsDecoder","FRAG_PARSING_INIT_SEGMENT",t);const i=!!(t&&t.tracks&&t.tracks.audio),s=!!(t&&t.tracks&&t.tracks.video);if(i&&t.tracks.audio){let e=t.tracks.audio;const i=e.metadata&&e.metadata.channelCount?e.metadata.channelCount:0,s=e.codec;this.player.audio&&this.player.audio.updateAudioInfo({encType:s,channels:i,sampleRate:44100})}if(s&&t.tracks.video){let e=t.tracks.video,i=e.codec,s=e.metadata&&e.metadata.width?e.metadata.width:0,r=e.metadata&&e.metadata.height?e.metadata.height:0;this.player.video&&this.player.video.updateVideoInfo({encTypeCode:-1!==i.indexOf("avc")?dt:ct,width:s,height:r})}}))}initVideoPlay(e){this.player._opt.useCanvasRender&&(this.$videoElement=document.createElement("video"),this.initVideoEvents()),this.$videoElement.autoplay=!0,this.$videoElement.muted=!0,this.$videoElement.src=e}_initRenderSize(){this.isInitInfo||(this.player.video.updateVideoInfo({width:this.$videoElement.videoWidth,height:this.$videoElement.videoHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0)}initVideoEvents(){const{proxy:e}=this.player.events,t=e(this.$videoElement,Ti,(()=>{this.player.debug.log("HlsDecoder","video canplay"),this.$videoElement.play().then((()=>{this.player.debug.log("HlsDecoder","video play"),this._startCanvasRender(),this._initRenderSize()})).catch((e=>{this.player.debug.warn("HlsDecoder","video play error ",e)}))})),i=e(this.$videoElement,Ei,(()=>{this.player.debug.log("HlsDecoder","video waiting")})),s=e(this.$videoElement,ki,(e=>{const t=parseInt(e.timeStamp,10);this.player.handleRender(),this.player.updateStats({ts:t}),this.$videoElement.paused&&(this.player.debug.warn("HlsDecoder","video is paused and next try to replay"),this.$videoElement.play().then((()=>{this.player.debug.log("HlsDecoder","video is paused and replay success")})).catch((e=>{this.player.debug.warn("HlsDecoder","video is paused and replay error ",e)})))})),r=e(this.$videoElement,Ci,(()=>{this.player.debug.log("HlsDecoder","video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate)}));this.eventsDestroy.push(t,i,s,r)}loadSource(e){return new Promise(((t,i)=>{this.canVideoPlay?(this.initVideoPlay(e),t()):this.hls.on(Pm.Events.MEDIA_ATTACHED,(()=>{this.hls.loadSource(e),t()}))}))}}const Mm=2097152,Um="fetch",Fm="xhr",Om="arraybuffer",Nm="text",jm="json",zm="real_time_speed",Gm=Object.prototype.toString;function Vm(e){if("[object Object]"!==Gm.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function Hm(e){if(!e||null===e[0]||void 0===e[0]||0===e[0]&&(null===e[1]||void 0===e[1]))return;let t="bytes="+e[0]+"-";return e[1]&&(t+=e[1]),t}function Wm(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $m(e,t){if(!e)return;if(!t)return e;let i;const s=Object.keys(t).map((e=>{if(i=t[e],null!=i)return Array.isArray(i)?e+="[]":i=[i],i.map((t=>{var i;return i=t,"[object Date]"===Gm.call(i)?t=t.toISOString():function(e){return null!==e&&"object"==typeof e}(t)&&(t=JSON.stringify(t)),`${Wm(e)}=${Wm(t)}`})).join("&")})).filter(Boolean).join("&");if(s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}function Jm(e,t,i,s,r,a,o,n,l,h,d){r=null!=r?parseFloat(r):null,s=parseInt(s||"0",10),Number.isNaN(s)&&(s=0);return{data:e,done:t,option:{range:l,vid:h,index:n,contentLength:s,age:r,startTime:a,firstByteTime:o,endTime:Date.now(),priOptions:d},response:i}}function Km(e,t){return Math.round(8*e*1e3/t/1024)}class qm extends Error{constructor(e,t,i,s){super(s),Il(this,"retryCount",0),Il(this,"isTimeout",!1),Il(this,"loaderType",Um),Il(this,"startTime",0),Il(this,"endTime",0),Il(this,"options",{}),this.url=e,this.request=t,this.response=i}}class Ym extends ba{constructor(e){super(),Il(this,"_abortController",null),Il(this,"_timeoutTimer",null),Il(this,"_reader",null),Il(this,"_response",null),Il(this,"_aborted",!1),Il(this,"_index",-1),Il(this,"_range",null),Il(this,"_receivedLength",0),Il(this,"_running",!1),Il(this,"_logger",null),Il(this,"_vid",""),Il(this,"_onProcessMinLen",0),Il(this,"_onCancel",null),Il(this,"_priOptions",null),Il(this,"TAG_NAME","FetchLoader"),this.player=e}load(e){var t;let{url:i,vid:s,timeout:r,responseType:a,onProgress:o,index:n,onTimeout:l,onCancel:h,range:d,transformResponse:c,request:u,params:p,logger:f,method:m,headers:g,body:y,mode:A,credentials:b,cache:v,redirect:_,referrer:w,referrerPolicy:S,onProcessMinLen:T,priOptions:E}=e;this._aborted=!1,this._onProcessMinLen=T,this._onCancel=h,this._abortController="undefined"!=typeof AbortController&&new AbortController,this._running=!0,this._index=n,this._range=d||[0,0],this._vid=s||i,this._priOptions=E||{};const k={method:m,headers:g,body:y,mode:A,credentials:b,cache:v,redirect:_,referrer:w,referrerPolicy:S,signal:null===(t=this._abortController)||void 0===t?void 0:t.signal};let C=!1;clearTimeout(this._timeoutTimer),i=$m(i,p);const R=Hm(d);R&&(g=u?u.headers:k.headers=k.headers||(Headers?new Headers:{}),Headers&&g instanceof Headers?g.append("Range",R):g.Range=R),r&&(this._timeoutTimer=setTimeout((()=>{if(C=!0,this.cancel(),l){const e=new qm(i,k,null,"timeout");e.isTimeout=!0,l(e,{index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions})}}),r));const x=Date.now();return(Ir(n)||Ir(d))&&this.player.debug.log(this.TAG_NAME,"[fetch load start], index,",n,",range,",d),new Promise(((e,t)=>{fetch(u||i,u?void 0:k).then((async s=>{if(clearTimeout(this._timeoutTimer),this._response=s,this._aborted||!this._running)return;if(c&&(s=c(s,i)||s),!s.ok)throw new qm(i,k,s,"bad network response");const r=Date.now();let l;if(a===Nm)l=await s.text(),this._running=!1;else if(a===jm)l=await s.json(),this._running=!1;else{if(o)return this.resolve=e,this.reject=t,void this._loadChunk(s,o,x,r);{l=await s.arrayBuffer(),l=new Uint8Array(l),this._running=!1;const e=Date.now()-x,t=Km(l.byteLength,e);this.emit(zm,{speed:t,len:l.byteLength,time:e,vid:this._vid,index:this._index,range:this._range,priOptions:this._priOptions})}}(Ir(n)||Ir(d))&&this.player.debug.log(this.TAG_NAME,"[fetch load end], index,",n,",range,",d),e(Jm(l,!0,s,s.headers.get("Content-Length"),s.headers.get("age"),x,r,n,d,this._vid,this._priOptions))})).catch((e=>{var s;clearTimeout(this._timeoutTimer),this._running=!1,this._aborted&&!C||((e=e instanceof qm?e:new qm(i,k,null,null===(s=e)||void 0===s?void 0:s.message)).startTime=x,e.endTime=Date.now(),e.isTimeout=C,e.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},t(e))}))}))}async cancel(){if(!this._aborted){if(this._aborted=!0,this._running=!1,this._response){try{this._reader&&await this._reader.cancel()}catch(e){}this._response=this._reader=null}if(this._abortController){try{this._abortController.abort()}catch(e){}this._abortController=null}this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions})}}_loadChunk(e,t,i,s){if(!e.body||!e.body.getReader){this._running=!1;const t=new qm(e.url,"",e,"onProgress of bad response.body.getReader");return t.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},void this.reject(t)}this._onProcessMinLen>0&&(this._cache=new Uint8Array(Mm),this._writeIdx=0);const r=this._reader=e.body.getReader();let a,o,n;const l=async()=>{var h;o=Date.now();try{a=await r.read(),n=Date.now()}catch(e){return n=Date.now(),void(this._aborted||(this._running=!1,e.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this.reject(e)))}const d=(null===(h=this._range)||void 0===h?void 0:h.length)>0?this._range[0]:0,c=d+this._receivedLength;if(this._aborted)return this._running=!1,void t(void 0,!1,{range:[c,c],vid:this._vid,index:this._index,startTime:o,endTime:n,st:i,firstByteTime:s,priOptions:this._priOptions},e);const u=a.value?a.value.byteLength:0;let p;if(this._receivedLength+=u,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress call】,task,",this._range,", start,",c,", end,",d+this._receivedLength,", done,",a.done),this._onProcessMinLen>0){if(this._writeIdx+u>=this._onProcessMinLen||a.done)p=new Uint8Array(this._writeIdx+u),p.set(this._cache.slice(0,this._writeIdx),0),u>0&&p.set(a.value,this._writeIdx),this._writeIdx=0,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress enough】,done,",a.done,",len,",p.byteLength,", writeIdx,",this._writeIdx);else if(u>0&&this._writeIdx+u0){const e=new Uint8Array(this._writeIdx+u+2048);this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress extra start】,size,",this._writeIdx+u+2048,", datalen,",u,", writeIdx,",this._writeIdx),e.set(this._cache.slice(0,this._writeIdx),0),u>0&&e.set(a.value,this._writeIdx),this._writeIdx+=u,delete this._cache,this._cache=e,this.player.debug.log(this.TAG_NAME,"【fetchLoader,onProgress extra end】,len,",u,", writeIdx,",this._writeIdx)}}else p=a.value;if((p&&p.byteLength>0||a.done)&&t(p,a.done,{range:[this._range[0]+this._receivedLength-(p?p.byteLength:0),this._range[0]+this._receivedLength],vid:this._vid,index:this._index,startTime:o,endTime:n,st:i,firstByteTime:s,priOptions:this._priOptions},e),a.done){const t=Date.now()-i,r=Km(this._receivedLength,t);this.emit(zm,{speed:r,len:this._receivedLength,time:t,vid:this._vid,index:this._index,range:this._range,priOptions:this._priOptions}),this._running=!1,this.player.debug.log(this.TAG_NAME,"[fetchLoader onProgress end],task,",this._range,",done,",a.done),this.resolve(Jm(a,!0,e,e.headers.get("Content-Length"),e.headers.get("age"),i,s,this._index,this._range,this._vid,this._priOptions))}else l()};l()}get receiveLen(){return this._receivedLength}get running(){return this._running}set running(e){this._running=e}static isSupported(){return!("undefined"==typeof fetch)}}class Qm{constructor(e,t,i){Il(this,"TAG_NAME","Task"),this.promise=function(){let e,t;const i=new Promise(((i,s)=>{e=i,t=s}));return i.used=!1,i.resolve=function(){return i.used=!0,e(...arguments)},i.reject=function(){return i.used=!0,t(...arguments)},i}(),this.alive=!!t.onProgress,this._loaderType=e,this.player=i,this._loader=e===Um&&window.fetch?new Ym(i):new Xm(i),this._config=t,this._retryCount=0,this._retryTimer=null,this._canceled=!1,this._retryCheckFunc=t.retryCheckFunc}exec(){const{retry:e,retryDelay:t,onRetryError:i,transformError:s,...r}=this._config,a=async()=>{try{const e=await this._loader.load(r);this.promise.resolve(e)}catch(o){if(this._loader.running=!1,this.player.debug.log(this.TAG_NAME,"[task request catch err]",o),this._canceled)return;o.loaderType=this._loaderType,o.retryCount=this._retryCount;let n=o;s&&(n=s(n)||n),i&&this._retryCount>0&&i(n,this._retryCount,{index:r.index,vid:r.vid,range:r.range,priOptions:r.priOptions}),this._retryCount++;let l=!0;if(this._retryCheckFunc&&(l=this._retryCheckFunc(o)),l&&this._retryCount<=e)return clearTimeout(this._retryTimer),this.player.debug.log(this.TAG_NAME,"[task request setTimeout],retry",this._retryCount,",retry range,",r.range),void(this._retryTimer=setTimeout(a,t));this.promise.reject(n)}};return a(),this.promise}async cancel(){return clearTimeout(this._retryTimer),this._canceled=!0,this._loader.running=!1,this._loader.cancel()}get running(){return this._loader&&this._loader.running}get loader(){return this._loader}}class Xm extends ba{constructor(e){super(),Il(this,"_xhr",null),Il(this,"_aborted",!1),Il(this,"_timeoutTimer",null),Il(this,"_range",null),Il(this,"_receivedLength",0),Il(this,"_url",null),Il(this,"_onProgress",null),Il(this,"_index",-1),Il(this,"_headers",null),Il(this,"_currentChunkSizeKB",384),Il(this,"_timeout",null),Il(this,"_xhr",null),Il(this,"_withCredentials",null),Il(this,"_startTime",-1),Il(this,"_loadCompleteResolve",null),Il(this,"_loadCompleteReject",null),Il(this,"_runing",!1),Il(this,"_logger",!1),Il(this,"_vid",""),Il(this,"_responseType",void 0),Il(this,"_credentials",void 0),Il(this,"_method",void 0),Il(this,"_transformResponse",void 0),Il(this,"_firstRtt",void 0),Il(this,"_onCancel",null),Il(this,"_priOptions",null),Il(this,"TAG_NAME","XhrLoader"),this.player=e}load(e){clearTimeout(this._timeoutTimer),this._range=e.range,this._onProgress=e.onProgress,this._index=e.index,this._headers=e.headers,this._withCredentials="include"===e.credentials||"same-origin"===e.credentials,this._body=e.body||null,e.method&&(this._method=e.method),this._timeout=e.timeout||null,this._runing=!0,this._vid=e.vid||e.url,this._responseType=e.responseType,this._firstRtt=-1,this._onTimeout=e.onTimeout,this._onCancel=e.onCancel,this._request=e.request,this._priOptions=e.priOptions||{},this.player.debug.log(this.TAG_NAME,"【xhrLoader task】, range",this._range),this._url=$m(e.url,e.params);const t=Date.now();return new Promise(((e,t)=>{this._loadCompleteResolve=e,this._loadCompleteReject=t,this._startLoad()})).catch((e=>{if(clearTimeout(this._timeoutTimer),this._runing=!1,!this._aborted)throw(e=e instanceof qm?e:new qm(this._url,this._request)).startTime=t,e.endTime=Date.now(),e.options={index:this._index,vid:this._vid,priOptions:this._priOptions},e}))}_startLoad(){let e=null;if(this._responseType===Om&&this._range&&this._range.length>1)if(this._onProgress){this._firstRtt=-1;const t=1024*this._currentChunkSizeKB,i=this._range[0]+this._receivedLength;let s=this._range[1];t],tast :",this._range,", SubRange, ",e)}else e=this._range,this.player.debug.log(this.TAG_NAME,"[xhr_loader->],tast :",this._range,", allRange, ",e);this._internalOpen(e)}_internalOpen(e){try{this._startTime=Date.now();const t=this._xhr=new XMLHttpRequest;t.open(this._method||"GET",this._url,!0),t.responseType=this._responseType,this._timeout&&(t.timeout=this._timeout),t.withCredentials=this._withCredentials,t.onload=this._onLoad.bind(this),t.onreadystatechange=this._onReadyStatechange.bind(this),t.onerror=e=>{var t,i,s;this._running=!1;const r=new qm(this._url,this._request,null==e||null===(t=e.currentTarget)||void 0===t?void 0:t.response,"xhr.onerror.status:"+(null==e||null===(i=e.currentTarget)||void 0===i?void 0:i.status)+",statusText,"+(null==e||null===(s=e.currentTarget)||void 0===s?void 0:s.statusText));r.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(r)},t.ontimeout=e=>{this.cancel();const t=new qm(this._url,this._request,{status:408},"timeout");this._onTimeout&&(t.isTimeout=!0,this._onTimeout(t,{index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions})),t.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)};const i=this._headers||{},s=Hm(e);s&&(i.Range=s),i&&Object.keys(i).forEach((e=>{t.setRequestHeader(e,i[e])})),this.player.debug.log(this.TAG_NAME,"[xhr.send->] tast,",this._range,",load sub range, ",e),t.send(this._body)}catch(t){t.options={index:this._index,range:e,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)}}_onReadyStatechange(e){2===e.target.readyState&&this._firstRtt<0&&(this._firstRtt=Date.now())}_onLoad(e){var t;const i=e.target.status;if(i<200||i>299){const t=new qm(this._url,null,{...e.target.response,status:i},"bad response,status:"+i);return t.options={index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions},this._loadCompleteReject(t)}let s,r=null,a=!1;const o=(null===(t=this._range)||void 0===t?void 0:t.length)>0?this._range[0]:0;if(this._responseType===Om){var n;const t=new Uint8Array(e.target.response);if(s=o+this._receivedLength,t&&t.byteLength>0){this._receivedLength+=t.byteLength;const e=Date.now()-this._startTime,i=Km(this._receivedLength,e);this.emit(zm,{speed:i,len:this._receivedLength,time:e,vid:this._vid,index:this._index,range:[s,o+this._receivedLength],priOptions:this._priOptions})}r=t,a=!((null===(n=this._range)||void 0===n?void 0:n.length)>1&&this._range[1]&&this._receivedLength], tast :",this._range,", start",s,"end ",o+this._receivedLength,",dataLen,",t?t.byteLength:0,",receivedLength",this._receivedLength,",index,",this._index,", done,",a)}else a=!0,r=e.target.response;let l={ok:i>=200&&i<300,status:i,statusText:this._xhr.statusText,url:this._xhr.responseURL,headers:this._getHeaders(this._xhr),body:this._xhr.response};this._transformResponse&&(l=this._transformResponse(l,this._url)||l),this._onProgress&&this._onProgress(r,a,{index:this._index,vid:this._vid,range:[s,o+this._receivedLength],startTime:this._startTime,endTime:Date.now(),priOptions:this._priOptions},l),a?(this._runing=!1,this._loadCompleteResolve&&this._loadCompleteResolve(Jm(this._onProgress?null:r,a,l,l.headers["content-length"],l.headers.age,this._startTime,this._firstRtt,this._index,this._range,this._vid,this._priOptions))):this._startLoad()}cancel(){if(!this._aborted)return this._aborted=!0,this._runing=!1,super.removeAllListeners(),this._onCancel&&this._onCancel({index:this._index,range:this._range,vid:this._vid,priOptions:this._priOptions}),this._xhr?this._xhr.abort():void 0}static isSupported(){return"undefined"!=typeof XMLHttpRequest}get receiveLen(){return this._receivedLength}get running(){return this._running}set running(e){this._running=e}_getHeaders(e){const t=e.getAllResponseHeaders().trim().split("\r\n"),i={};for(const e of t){const t=e.split(": ");i[t[0].toLowerCase()]=t.slice(1).join(": ")}return i}}class Zm extends ba{constructor(e,t){super(),Il(this,"type",Um),Il(this,"_queue",[]),Il(this,"_alive",[]),Il(this,"_currentTask",null),Il(this,"_config",void 0),this.player=t,this._config=function(e){return{loaderType:Um,retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:Nm,range:void 0,url:"",params:void 0,method:"GET",headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0,...e}}(e),this._config.loaderType!==Fm&&Ym.isSupported()||(this.type=Fm)}destroy(){this._queue=[],this._alive=[],this._currentTask=null}isFetch(){return this.type===Um}static isFetchSupport(){return Ym.isSupported()}load(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"!=typeof e&&e?t=e:t.url=e||t.url||this._config.url,t=Object.assign({},this._config,t),t.params&&(t.params=Object.assign({},t.params)),t.headers&&Vm(t.headers)&&(t.headers=Object.assign({},t.headers)),t.body&&Vm(t.body)&&(t.body=Object.assign({},t.body)),t.transformRequest&&(t=t.transformRequest(t)||t);const i=new Qm(this.type,t,this.player);return i.loader.on(zm,(e=>{this.emit(zm,e)})),this._queue.push(i),1!==this._queue.length||this._currentTask&&this._currentTask.running||this._processTask(),i.promise}async cancel(){const e=this._queue.map((e=>e.cancel())).concat(this._alive.map((e=>e.cancel())));this._currentTask&&e.push(this._currentTask.cancel()),this._queue=[],this._alive=[],await Promise.all(e),await function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((t=>setTimeout(t,e)))}()}_processTask(){if(this._currentTask=this._queue.shift(),!this._currentTask)return;this._currentTask.alive&&this._alive.push(this._currentTask);const e=this._currentTask.exec().catch((e=>{}));e&&"function"==typeof e.finally&&e.finally((()=>{var e,t;null!==(e=this._currentTask)&&void 0!==e&&e.alive&&(null===(t=this._alive)||void 0===t?void 0:t.length)>0&&(this._alive=this._alive.filter((e=>e&&e!==this._currentTask))),this._processTask()}))}}const eg="network",tg="network_timeout",ig="other",sg="manifest",rg="hls",ag="demux";class og extends Error{constructor(e,t,i,s,r){super(r||(null==i?void 0:i.message)),this.errorType=e===tg?eg:e,this.originError=i,this.ext=s,this.errorMessage=this.message}static create(e,t,i,s,r){return e instanceof og?e:(e instanceof Error&&(i=e,e=""),e||(e=ig),new og(e,t,i,s,r))}static network(e){var t;return new og(null!=e&&e.isTimeout?tg:eg,null,e instanceof Error?e:null,{url:null==e?void 0:e.url,response:null==e?void 0:e.response,httpCode:null==e||null===(t=e.response)||void 0===t?void 0:t.status})}}const ng=/^#(EXT[^:]*)(?::(.*))?$/,lg=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g,hg=/^(?:[a-zA-Z0-9+\-.]+:)?\/\//,dg=/^((?:[a-zA-Z0-9+\-.]+:)?\/\/[^/?#]*)?([^?#]*\/)?/;function cg(e){const t=e.match(ng);if(t&&t[1])return[t[1].replace("EXT-X-",""),t[2]]}function ug(e){const t={};let i=lg.exec(e);for(;i;)t[i[1]]=i[2]||i[3],i=lg.exec(e);return t}function pg(e,t){if(!t||!e||hg.test(e))return e;const i=dg.exec(t);return i?"/"===e[0]?i[1]+e:i[1]+i[2]+e:e}const fg={audio:[/^mp4a/,/^vorbis$/,/^opus$/,/^flac$/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function mg(e,t){const i=fg[e];if(i&&t&&t.length)for(let e=0;e>8*(15-t)&255}}}class kg{static parse(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!e.includes("#EXTM3U"))throw new Error("Invalid m3u8 file");const i=function(e){return e.split(/[\r\n]/).map((e=>e.trim())).filter(Boolean)}(e);return kg.isMediaPlaylist(e)?function(e,t){const i=new Sg;i.url=t;let s,r=new Tg,a=null,o=null,n=0,l=0,h=0,d=0,c=!1;for(;(s=e[d++])&&!c;){if("#"!==s[0]){r.sn=l,r.cc=h,r.url=pg(s,t),o&&(r.key=o.clone(l)),a&&(r.initSegment=a),i.segments.push(r),r=new Tg,l++;continue}const e=cg(s);if(!e)continue;const[d,u]=e;switch(d){case"VERSION":i.version=parseInt(u);break;case"PLAYLIST-TYPE":i.type=null==u?void 0:u.toUpperCase();break;case"TARGETDURATION":i.targetDuration=parseFloat(u);break;case"ENDLIST":{const e=i.segments[i.segments.length-1];e&&(e.isLast=!0),i.live=!1,c=!0}break;case"MEDIA-SEQUENCE":l=i.startSN=parseInt(u);break;case"DISCONTINUITY-SEQUENCE":h=i.startCC=parseInt(u);break;case"DISCONTINUITY":h++;break;case"BYTERANGE":r.setByteRange(u,i.segments[i.segments.length-1]);break;case"EXTINF":{const[e,t]=u.split(",");r.start=n,r.duration=parseFloat(e),n+=r.duration,r.title=t}break;case"KEY":{const e=ug(u);if("NONE"===e.METHOD){o=null;break}if("AES-128"!==e.METHOD)throw new Error(`encrypt ${e.METHOD}/${e.KEYFORMAT} is not supported`);if(o=new Eg,o.method=e.METHOD,o.url=/^blob:/.test(e.URI)?e.URI:pg(e.URI,t),o.keyFormat=e.KEYFORMAT||"identity",o.keyFormatVersions=e.KEYFORMATVERSIONS,e.IV){let t=e.IV.slice(2);t=(1&t.length?"0":"")+t,o.iv=new Uint8Array(t.length/2);for(let e=0,i=t.length/2;e{e.id=t})),a.length&&(a.forEach(((e,t)=>{e.id=t})),i.streams.forEach((e=>{e.audioGroup&&(e.audioStreams=a.filter((t=>t.group===e.audioGroup)))}))),o.length&&(o.forEach(((e,t)=>{e.id=t})),i.streams.forEach((e=>{e.subtitleGroup&&(e.subtitleStreams=o.filter((t=>t.group===e.subtitleGroup)))}))),i}(i,t)}static isMediaPlaylist(e){return e.includes("#EXTINF:")||e.includes("#EXT-X-TARGETDURATION:")}}class Cg{constructor(e){Il(this,"_onLoaderRetry",((e,t)=>{this.hls.emit(fs,{error:og.network(e),retryTime:t})})),this.hls=e,this.player=e.player,this.TAG_NAME="HlsManifestLoader",this._timer=null;const{retryCount:t,retryDelay:i,loadTimeout:s,fetchOptions:r}=this.hls.config;this._loader=new Zm({...r,responseType:"text",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._audioLoader=new Zm({...r,responseType:"text",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._subtitleLoader=new Zm({...r,responseType:"text",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player)}async destroy(){await this.stopPoll(),this._audioLoader&&(this._audioLoader.destroy(),this._audioLoader=null),this._subtitleLoader&&(this._subtitleLoader.destroy(),this._subtitleLoader=null),this._loader&&(this._loader.destroy(),this._loader=null)}async load(e,t,i){this.player.debug.log(this.TAG_NAME,"load()",e,t,i);const s=[this._loader.load(e)];let r,a,o,n,l,h;t&&s.push(this._audioLoader.load(t)),i&&s.push(this._subtitleLoader.load(i));try{const[e,i,n]=await Promise.all(s);if(!e)return[];r=e.data,t?(a=null==i?void 0:i.data,o=null==n?void 0:n.data):o=null==i?void 0:i.data}catch(e){throw og.network(e)}try{var d;if(n=kg.parse(r,e),!1===(null===(d=n)||void 0===d?void 0:d.live)&&n.segments&&!n.segments.length)throw new Error("empty segments list");a&&(l=kg.parse(a,t)),o&&(h=kg.parse(o,i))}catch(e){throw new og(sg,rg,e)}return n&&(n.isMaster?this.hls.emit(ls,{playlist:n}):this.hls.emit(hs,{playlist:n})),[n,l,h]}poll(e,t,i,s,r,a){clearTimeout(this._timer),a=a||3e3;let o=this.hls.config.pollRetryCount;const n=async()=>{clearTimeout(this._timer);try{const r=await this.load(e,t,i);if(!r[0])return;o=this.hls.config.pollRetryCount,s(r[0],r[1],r[2])}catch(e){o--,o<=0&&r(e)}this._timer=setTimeout(n,a)};this._timer=setTimeout(n,a)}stopPoll(){return clearTimeout(this._timer),this.cancel()}cancel(){return Promise.all([this._loader.cancel(),this._audioLoader.cancel()])}}class Rg{constructor(){Il(this,"_chunkSpeeds",[]),Il(this,"_speeds",[])}addRecord(e,t){e&&t&&(this._speeds.push(8e3*e/t),this._speeds=this._speeds.slice(-3))}addChunkRecord(e,t){e&&t&&(this._chunkSpeeds.push(8e3*e/t),this._chunkSpeeds=this._chunkSpeeds.slice(-100))}getAvgSpeed(){return this._chunkSpeeds.length||this._speeds.length?this._speeds.length?this._speeds.reduce(((e,t)=>e+t))/this._speeds.length:this._chunkSpeeds.reduce(((e,t)=>e+t))/this._chunkSpeeds.length:0}getLatestSpeed(){return this._chunkSpeeds.length||this._speeds.length?this._speeds.length?this._speeds[this._speeds.length-1]:this._chunkSpeeds[this._chunkSpeeds.length-1]:0}reset(){this._chunkSpeeds=[],this._speeds=[]}}class xg{constructor(e){Il(this,"_emitOnLoaded",((e,t)=>{const{data:i,response:s,option:r}=e,{firstByteTime:a,startTime:o,endTime:n,contentLength:l}=r||{},h=n-o;this._bandwidthService.addRecord(l||i.byteLength,h),this.hls.emit(gs,{time:h,byteLength:l,url:t}),this.hls.emit(ys,{url:t,elapsed:h||0}),this.hls.emit(ps,{url:t,responseUrl:s.url,elapsed:a-o}),this.hls.emit(As,{headers:s.headers})})),Il(this,"_onLoaderRetry",((e,t)=>{this.hls.emit(fs,{error:og.network(e),retryTime:t})})),this.hls=e,this.player=e.player,this._bandwidthService=new Rg;const{retryCount:t,retryDelay:i,loadTimeout:s,fetchOptions:r}=this.hls.config;this._segmentLoader=new Zm({...r,responseType:"arraybuffer",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._audioSegmentLoader=new Zm({...r,responseType:"arraybuffer",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player),this._keyLoader=new Zm({...r,responseType:"arraybuffer",retry:t,retryDelay:i,timeout:s,onRetryError:this._onLoaderRetry},this.player)}destroy(){this.reset(),this._keyLoader&&(this._keyLoader.destroy(),this._keyLoader=null),this._audioSegmentLoader&&(this._audioSegmentLoader.destroy(),this._audioSegmentLoader=null),this._segmentLoader&&(this._segmentLoader.destroy(),this._segmentLoader=null)}speedInfo(){return{speed:this._bandwidthService.getLatestSpeed(),avgSpeed:this._bandwidthService.getAvgSpeed()}}load(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:i;const r=[];return e&&(r[0]=this.loadVideoSegment(e,i)),t&&(r[1]=this.loadAudioSegment(t,s)),Promise.all(r)}loadVideoSegment(e,t){return this._loadSegment(this._segmentLoader,e,t)}loadAudioSegment(e,t){return this._loadSegment(this._audioSegmentLoader,e,t)}async _loadSegment(e,t,i){var s;let r,a,o,n,l;const h=[];if(this.hls.emit(ms,{url:t.url}),h[0]=e.load(t.url),i&&t.initSegment){var d;const i=t.initSegment.url;r=this._mapCache[i],r||(this.hls.emit(ms,{url:i}),h[1]=e.load(i).then((e=>{if(e){Object.keys(this._mapCache)>30&&(this._mapCache={}),r=this._mapCache[i]=e.data,this._emitOnLoaded(e,i)}})));const s=null===(d=t.initSegment.key)||void 0===d?void 0:d.url;s&&(l=t.initSegment.key.iv,n=this._keyCache[s],n||(this.hls.emit(ms,{url:s}),h[2]=this._keyLoader.load(s).then((e=>{e&&(n=this._keyCache[s]=e.data,this._emitOnLoaded(e,s))}))))}const c=null===(s=t.key)||void 0===s?void 0:s.url;c&&(o=t.key.iv,a=this._keyCache[c],a||(this.hls.emit(ms,{url:c}),h[3]=this._keyLoader.load(c).then((e=>{e&&(a=this._keyCache[c]=e.data,this._emitOnLoaded(e,c))}))));const[u]=await Promise.all(h);if(!u)return;const p=u.data;return this._emitOnLoaded(u,t.url),{data:p,map:r,key:a,mapKey:n,keyIv:o,mapKeyIv:l}}reset(){this.error=null,this._mapCache={},this._keyCache={},this._bandwidthService.reset()}async cancel(){await Promise.all([this._keyLoader.cancel(),this._segmentLoader.cancel(),this._audioSegmentLoader.cancel()])}}class Dg{constructor(e,t,i){this.live=void 0,this.id=0,this.bitrate=0,this.width=0,this.height=0,this.name="",this.url="",this.audioCodec="",this.videoCodec="",this.textCodec="",this.startCC=0,this.endCC=0,this.startSN=0,this.endSN=-1,this.totalDuration=0,this.targetDuration=0,this.snDiff=null,this.segments=[],this.audioStreams=[],this.subtitleStreams=[],this.closedCaptions=[],this.currentAudioStream=null,this.currentSubtitleStream=null,this.TAG_NAME="HlsStream",this.update(e,t,i)}get lastSegment(){return this.segments.length?this.segments[this.segments.length-1]:null}get segmentDuration(){var e;return this.targetDuration||(null===(e=this.segments[0])||void 0===e?void 0:e.duration)||0}get liveEdge(){return this.endTime}get endTime(){var e;return(null===(e=this.lastSegment)||void 0===e?void 0:e.end)||0}get currentSubtitleEndSn(){var e;return(null===(e=this.currentSubtitleStream)||void 0===e?void 0:e.endSN)||0}clearOldSegment(e,t){return this._clearSegments(e,t)}getAudioSegment(e){if(!e||!this.currentAudioStream)return;const t=e.sn-this.snDiff;return this.currentAudioStream.segments.find((e=>e.sn===t))}update(e,t){this.url=e.url,Array.isArray(e.segments)?(null!==this.live&&void 0!==this.live||(this.live=e.live),this._updateSegments(e,this),this.startCC=e.startCC,this.endCC=e.endCC,this.startSN=e.startSN,this.endSN=e.endSN||-1,this.totalDuration=e.totalDuration,this.targetDuration=e.targetDuration,this.live=e.live,t&&this.currentAudioStream&&Array.isArray(t.segments)&&(this._updateSegments(t,this.currentAudioStream),(null===this.snDiff||void 0===this.snDiff)&&e.segments.length&&t.segments.length&&(this.snDiff=e.segments[0].sn-t.segments[0].sn))):(this.id=e.id,this.bitrate=e.bitrate,this.width=e.width,this.height=e.height,this.name=e.name,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.textCodec=e.textCodec,this.audioStreams=e.audioStreams,this.subtitleStreams=e.subtitleStreams,!this.currentAudioStream&&this.audioStreams.length&&(this.currentAudioStream=this.audioStreams.find((e=>e.default))||this.audioStreams[0]),!this.currentSubtitleStream&&this.subtitleStreams.length&&(this.currentSubtitleStream=this.subtitleStreams.find((e=>e.default))||this.subtitleStreams[0]))}updateSubtitle(e){if(!(e&&this.currentSubtitleStream&&Array.isArray(e.segments)))return;const t=this._updateSegments(e,this.currentSubtitleStream),i=this.currentSubtitleStream.segments;return i.length>100&&(this.currentSubtitleStream.segments=i.slice(100)),t?t.map((e=>({sn:e.sn,url:e.url,duration:e.duration,start:e.start,end:e.end,lang:this.currentSubtitleStream.lang}))):void 0}switchSubtitle(e){const t=this.subtitleStreams.find((t=>t.lang===e)),i=this.currentSubtitleStream;t&&(this.currentSubtitleStream=t,i.segments=[])}_clearSegments(e,t){let i=0;const s=this.segments;for(let t=0,r=s.length;t=e){i=t;break}return i>t&&(i=t),i&&(this.segments=this.segments.slice(i),this.currentAudioStream&&(this.currentAudioStream.segments=this.currentAudioStream.segments.slice(i))),t-i}_updateSegments(e,t){const i=t.segments;if(this.live){const s=i[i.length-1],r=(null==s?void 0:s.sn)||-1;if(re.sn===r)),o=a<0?e.segments:e.segments.slice(a+1);if(i.length&&o.length){let e=s.end;o.forEach((t=>{t.start=e,e=t.end}));const t=(null==s?void 0:s.cc)||-1;t>o[0].cc&&o.forEach((e=>e.cc+=t))}return t.endSN=e.endSN,t.segments=i.concat(o),o}}else t.segments=e.segments}}class Lg{constructor(e){this.hls=e,this.player=e.player,this.streams=[],this.currentStream=null,this.dvrWindow=0,this._segmentPointer=-1,this.TAG_NAME="HlsPlaylist"}destroy(){this.reset()}get lastSegment(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.lastSegment}get currentSegment(){var e;return null===(e=this.currentSegments)||void 0===e?void 0:e[this._segmentPointer]}get nextSegment(){var e;return null===(e=this.currentSegments)||void 0===e?void 0:e[this._segmentPointer+1]}get currentSegments(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.segments}get currentSubtitleEndSn(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.currentSubtitleEndSn}get liveEdge(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.liveEdge}get totalDuration(){var e;return(null===(e=this.currentStream)||void 0===e?void 0:e.totalDuration)||0}get seekRange(){const e=this.currentSegments;if(e&&e.length)return[e[0].start,e[e.length-1].end]}get isEmpty(){var e;return!(null!==(e=this.currentSegments)&&void 0!==e&&e.length)}get isLive(){var e;return null===(e=this.currentStream)||void 0===e?void 0:e.live}get hasSubtitle(){var e;return!(null===(e=this.currentStream)||void 0===e||!e.currentSubtitleStream)}getAudioSegment(e){var t;return null===(t=this.currentStream)||void 0===t?void 0:t.getAudioSegment(e)}moveSegmentPointer(e){var t;null==e&&(e=this._segmentPointer+1),this._segmentPointer=rr(e,-1,null===(t=this.currentSegments)||void 0===t?void 0:t.length),this.player.debug.log(this.TAG_NAME,"moveSegmentPointer()",e,this._segmentPointer)}reset(){this.streams=[],this.currentStream=null,this.dvrWindow=0,this._segmentPointer=-1}getSegmentByIndex(e){var t;return null===(t=this.currentSegments)||void 0===t?void 0:t[e]}setNextSegmentByIndex(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._segmentPointer=e-1,this.player.debug.log(this.TAG_NAME,"setNextSegmentByIndex()",e,this._segmentPointer)}findSegmentIndexByTime(e){const t=this.currentSegments;if(t){for(let i,s=0,r=t.length;s=i.start&&ee.url)).forEach(((e,t)=>{this.streams[t]?this.streams[t].update(e):this.streams[t]=new Dg(e)})),this.currentStream=this.streams[0];else if(Array.isArray(e.segments)){const s=this.currentStream;if(s){s.update(e,t,i);const r=s.updateSubtitle(i);r&&this.hls.emit(ns,{list:r})}else this.reset(),this.currentStream=this.streams[0]=new Dg(e,t,i)}this.currentStream&&this.hls.isLive&&!this.dvrWindow&&(this.dvrWindow=this.currentSegments.reduce(((e,t)=>e+=t.duration),0))}switchSubtitle(e){var t;null===(t=this.currentStream)||void 0===t||t.switchSubtitle(e)}clearOldSegment(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;const t=this.currentStream;if(!this.dvrWindow||!t)return;const i=t.endTime-this.dvrWindow;if(i<=0)return void this.player.debug.log(this.TAG_NAME,`clearOldSegment() stream.endTime:${t.endTime}, this.dvrWindow:${this.dvrWindow} startTime <= 0`);const s=t.segments;if(s.length<=e)return void this.player.debug.log(this.TAG_NAME,`clearOldSegment() segments.length:${s.length} <= maxPlaylistSize:${e}`);const r=this._segmentPointer;this._segmentPointer=t.clearOldSegment(i,r),this.player.debug.log(this.TAG_NAME,"clearOldSegment() update _segmentPointer:",r,this._segmentPointer),this.player.debug.log(this.TAG_NAME,"currentSegments",this.currentSegments)}checkSegmentTrackChange(e,t){const i=this.findSegmentIndexByTime(e),s=this.getSegmentByIndex(i);if(!s)return;if(!s.hasAudio&&!s.hasVideo)return;if(2!==t&&s.hasAudio&&s.hasVideo)return s;if(s.end-e>.3)return;const r=this.getSegmentByIndex(i+1);return r&&(r.hasAudio||r.hasVideo)&&(r.hasAudio!==s.hasAudio||r.hasVideo!==s.hasVideo)?r:void 0}}function Ig(){for(var e=arguments.length,t=new Array(e),i=0;ie+t.byteLength),0));let r=0;return t.forEach((e=>{s.set(e,r),r+=e.byteLength})),s}class Pg{constructor(e,t){this.hls=e,this.player=t;const i=window.crypto||window.msCrypto;this.subtle=i&&(i.subtle||i.webkitSubtle),this.externalDecryptor=null}decrypt(e,t){if(!e&&!t)return;const i=[];return e&&(i[0]=this._decryptSegment(e)),t&&(i[1]=this._decryptSegment(t)),Promise.all(i)}async _decryptSegment(e){let t=e.data;return e.key&&(t=await this._decryptData(e.data,e.key,e.keyIv)),e.map?Ig(e.map,t):t}async _decryptData(e,t,i){if(this.externalDecryptor)return await this.externalDecryptor.decrypt(e,t,i);{if(!this.subtle)throw new Error("crypto is not defined");const s=await this.subtle.importKey("raw",t,{name:"AES-CBC"},!1,["encrypt","decrypt"]);return new Uint8Array(await this.subtle.decrypt({name:"AES-CBC",iv:i},s,e))}}}const Bg=9e4,Mg=45e4,Ug=9e4;class Fg extends _l{constructor(e){super(e),this.player=e,this._pmtId=-1,this._remainingPacketData=null,this._videoPesData=[],this._audioPesData=[],this._gopId=0,this._videoPid=-1,this._audioPid=-1,this._codecType=dt,this._audioCodecType=ft,this._vps=null,this._sps=null,this._pps=null,this.TAG_NAME="TsLoader",this.videoTrack=Fg.initVideoTrack(),this.audioTrack=Fg.initAudioTrack(),this._baseDts=-1,this._baseDtsInited=!1,this._basefps=25,this._baseFpsInterval=null,this._tempSampleTsList=[],this._hasAudio=!1,this._hasVideo=!1,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=!1,this._videoTimestampBreak=!1,this._lastAudioExceptionGapDot=0,this._lastAudioExceptionOverlapDot=0,this._lastAudioExceptionLargeGapDot=0,this._isSendAACSeqHeader=!1,this.workerClearTimeout=null,this.workerUrl=null,this.loopWorker=null,this.tempSampleListInfo={},this._initLoopWorker(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.workerUrl&&(URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.loopWorker&&(this.loopWorker.postMessage({cmd:"destroy"}),this.loopWorker.terminate(),this.loopWorker=null),this._stopDecodeLoopInterval(),this.videoTrack=null,this.audioTrack=null,this.tempSampleListInfo={},this._baseDts=-1,this._baseDtsInited=!1,this._basefps=50,this._hasCalcFps=!1,this._audioNextPts=void 0,this._videoNextDts=void 0,this._audioTimestampBreak=!1,this._videoTimestampBreak=!1,this._lastAudioExceptionGapDot=0,this._lastAudioExceptionOverlapDot=0,this._lastAudioExceptionLargeGapDot=0,this._isSendAACSeqHeader=!1,this.player.debug.log(this.TAG_NAME,"destroy")}static initVideoTrack(){return{samples:[]}}static initAudioTrack(){return{samples:[]}}static probe(e){return!!e.length&&(71===e[0]&&71===e[188]&&71===e[376])}static _parsePES(e){const t=e[8];if(null==t||e.lengthe.length-6)return;let s,r;const a=e[7];return 192&a&&(s=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&a?(r=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,s-r>54e5&&(s=r)):r=s),{data:e.subarray(9+t),pts:s,dts:r,originalPts:s,originalDts:r}}_demux(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t&&(this._pmtId=-1,this.videoTrack=Fg.initVideoTrack(),this.audioTrack=Fg.initAudioTrack()),!i||t?(this._remainingPacketData=null,this._videoPesData=[],this._audioPesData=[]):(this.videoTrack.samples=[],this.audioTrack.samples=[],this._remainingPacketData&&(e=Ig(this._remainingPacketData,e),this._remainingPacketData=null));let s=e.length;const r=s%188;r&&(this._remainingPacketData=e.subarray(s-r),s-=r);for(let t=0;t>4>1){if(r=t+5+e[t+4],r===t+188)continue}else r=t+4;switch(s){case 0:i&&(r+=e[r]+1),this._pmtId=(31&e[r+10])<<8|e[r+11];break;case this._pmtId:{i&&(r+=e[r]+1);const t=r+3+((15&e[r+1])<<8|e[r+2])-4;for(r+=12+((15&e[r+10])<<8|e[r+11]);r=t)return[];const r=[];for(;s{const t=s?e[0]>>>1&63:31&e[0];switch(t){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!s&&5!==t||s&&5===t)break;r.isIFrame=!0,this._gopId++;break;case 6:case 39:case 40:if(!s&&6!==t||s&&6===t)break;return void function(e,t){const i=e.length;let s=t?2:1,r=0,a=0,o="";for(;255===e[s];)r+=255,s++;for(r+=e[s++];255===e[s];)a+=255,s++;if(a+=e[s++],5===r&&i>s+16)for(let t=0;t<16;t++)o+=e[s].toString(16),s++;e.subarray(s)}(function(e){const t=e.byteLength,i=[];let s=1;for(;s=i)return;const r=s,a=[],o=(60&e[s+2])>>>2,n=Vs[o];if(!n)throw new Error(`Invalid sampling index: ${o}`);const l=1+((192&e[s+2])>>>6),h=(1&e[s+2])<<2|(192&e[s+3])>>>6;let d,c,u=0;const p=$s(n);for(;s+7>5,i-s=i?void 0:e.subarray(s),frames:a,samplingFrequencyIndex:o,sampleRate:n,objectType:l,channelCount:h,originCodec:`mp4a.40.${l}`}}(e.data,e.originalPts);if(t){if(this.audioTrack.codec=t.codec,this.audioTrack.sampleRate=t.sampleRate,this.audioTrack.channelCount=t.channelCount,!this._isSendAACSeqHeader){const e=js({profile:t.objectType,sampleRate:t.samplingFrequencyIndex,channel:t.channelCount});this._isSendAACSeqHeader=!0,this.player.debug.log(this.TAG_NAME,"aac seq header",`profile: ${t.objectType}, sampleRate:${t.sampleRate},sampleRateIndex: ${t.samplingFrequencyIndex}, channel: ${t.channelCount}`),this._doDecodeByHls(e,Ie,0,!1,0)}if(this._isSendAACSeqHeader){const e=[];t.frames.forEach((t=>{const i=t.pts,s=new Uint8Array(t.data.length+2);s.set([175,1],0),s.set(t.data,2);const r={type:Ie,pts:i,dts:i,payload:s};e.push(r)})),this.audioTrack.samples=this.audioTrack.samples.concat(e)}else this.player.debug.warn(this.TAG_NAME,"aac seq header not send")}else this.player.debug.warn(this.TAG_NAME,"aac parseADTS error")}this._audioPesData=[]}}else this.player.debug.warn(this.TAG_NAME,"Cannot parse audio pes",this._audioPesData)}_fix(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=Math.round(9e4*e);const s=this.videoTrack,r=this.audioTrack,a=s.samples,o=r.samples;if(!a.length&&!o.length)return;const n=a[0],l=o[0];let h=0;if(a.length&&o.length&&(h=n.dts-l.pts),this._baseDtsInited||this._calculateBaseDts(),t&&(this._calculateBaseDts(),this._baseDts-=e),!i){this._videoNextDts=h>0?e+h:e,this._audioNextPts=h>0?e:e-h;const t=n?n.dts-this._baseDts-this._videoNextDts:0,i=l?l.pts-this._baseDts-this._audioNextPts:0;Math.abs(t||i)>Ug&&(this._calculateBaseDts(this.audioTrack,this.videoTrack),this._baseDts-=e)}this._resetBaseDtsWhenStreamBreaked(),this._fixAudio(r),this._fixVideo(s);let d=s.samples.concat(r.samples);d=d.map((e=>(e.dts=e.dts/90,e.pts=e.pts/90,e.cts=e.pts-e.dts,e))).sort(((e,t)=>e.dts-t.dts)),d.forEach((e=>{const t=new Uint8Array(e.payload);delete e.payload,this.loopWorker.postMessage({...e,payload:t,cmd:"sample"},[t.buffer])})),da(this._hasCalcFps)&&(this._hasCalcFps=!0,this._calcDecodeFps(d))}_calculateBaseDts(){const e=this.audioTrack,t=this.videoTrack,i=e.samples,s=t.samples;if(!i.length&&!s.length)return!1;let r=1/0,a=1/0;i.length&&(e.baseDts=r=i[0].pts),s.length&&(t.baseDts=a=s[0].dts),this._baseDts=Math.min(r,a);const o=a-r;return Number.isFinite(o)&&Math.abs(o)>45e3&&this.player.debug.warn(this.TAG_NAME,`large av first frame gap,\n video pts: ${a},\n audio pts: ${r},\n base dts: ${this._baseDts},\n detect is: ${o}`),this._baseDtsInited=!0,!0}_resetBaseDtsWhenStreamBreaked(){if(this._baseDtsInited&&this._videoTimestampBreak&&this._audioTimestampBreak){if(!this._calculateBaseDts(this.audioTrack,this.videoTrack))return;this._baseDts-=Math.min(this._audioNextPts,this._videoNextDts),this._audioLastSample=null,this._videoLastSample=null,this._videoTimestampBreak=!1,this._audioTimestampBreak=!1}}_fixAudio(e){const t=e.samples;t.length&&(t.forEach((e=>{e.pts-=this._baseDts,e.dts=e.pts})),this._doFixAudioInternal(e,t,9e4))}_fixVideo(e){const t=e.samples;if(!t.length)return;if(t.forEach((e=>{e.dts-=this._baseDts,e.pts-=this._baseDts})),void 0===this._videoNextDts){const e=t[0];this._videoNextDts=e.dts}const i=t.length;let s=0;const r=t[0],a=t[1],o=this._videoNextDts-r.dts;let n;Math.abs(o)>45e3&&(r.dts+=o,r.pts+=o,this.player.debug.warn(this.TAG_NAME,`large video gap between chunk,\n next dts is ${this._videoNextDts},\n first dts is ${r.dts},\n next dts is ${a.dts},\n duration is ${o}`),a&&Math.abs(a.dts-r.dts)>Ug&&(this._videoTimestampBreak=!0,t.forEach(((e,t)=>{0!==t&&(e.dts+=o,e.pts+=o)}))));const l=e.samples[0],h=e.samples[i-1];n=1===i?9e3:Math.floor((h.dts-l.dts)/(i-1));for(let r=0;rUg||s<0){this._videoTimestampBreak=!0,s=this._audioTimestampBreak?n:Math.max(s,2700);const i=this._audioNextPts||0;o&&o.dts>i&&(s=n),this.player.debug.warn(this.TAG_NAME,`large video gap between frames,\n time is ${a/e.timescale},\n dts is ${a},\n origin dts is ${t[r].originalDts},\n next dts is ${this._videoNextDts},\n sample Duration is ${s} ,\n ref Sample DurationInt is ${n}`)}t[r].duration=s,this._videoNextDts+=s}}_doFixAudioInternal(e,t,i){e.sampleDuration||(e.sampleDuration=$s(e.timescale,i));const s=e.sampleDuration;if(void 0===this._audioNextPts){const e=t[0];this._audioNextPts=e.pts}for(let i=0;i=3*s&&o<=Bg&&!yr()){Ws(e.codec,e.channelCount)||t[0].data.subarray();const n=Math.floor(o/s);Math.abs(a.pts-this._lastAudioExceptionGapDot)>Mg&&(this._lastAudioExceptionGapDot=a.pts),this.player.debug.warn(this.TAG_NAME,`audio gap detected,\n pts is ${t.pts},\n originPts is ${t.originalPts},\n count is ${n},\n nextPts is ${r},\n ref sample duration is ${s}`);for(let e=0;e=-9e4?(Math.abs(a.pts-this._lastAudioExceptionOverlapDot)>Mg&&(this._lastAudioExceptionOverlapDot=a.pts,this.player.debug.warn(this.TAG_NAME,`audio overlap detected,\n pts is ${a.pts},\n originPts is ${a.originalPts},\n nextPts is ${r},\n ref sample duration is ${s}`)),t.splice(i,1),i--):(Math.abs(o)>=Bg&&(this._audioTimestampBreak=!0,Math.abs(a.pts-this._lastAudioExceptionLargeGapDot)>Mg&&(this._lastAudioExceptionLargeGapDot=a.pts,this.player.debug.warn(this.TAG_NAME,`large audio gap detected,\n time is ${a.pts/1e3}\n pts is ${a.pts},\n originPts is ${a.originalPts},\n nextPts is ${r},\n sample duration is ${o}\n ref sample duration is ${s}`))),a.dts=a.pts=r,this._audioNextPts+=s)}}_calcDecodeFps(e){const t=ia(e.map((e=>({ts:e.dts||e.pts,type:e.type}))),Pe);t&&(this._basefps=t,this._postMessageToLoopWorker("updateBaseFps",{baseFps:this._basefps}),this.player.debug.log(this.TAG_NAME,`_calcDecodeFps() video fps is ${t}, update base fps is ${this._basefps}`))}_initLoopWorker(){const e=ma(function(){const e=1,t=2;let i=new class{constructor(){this.baseFps=0,this.fpsInterval=null,this.preLoopTimestamp=null,this.startBpsTime=null,this.allSampleList=[]}destroy(){this._clearInterval(),this.baseFps=0,this.allSampleList=[],this.preLoopTimestamp=null,this.startBpsTime=null}updateBaseFps(e){this.baseFps=e,this._clearInterval(),this._startInterval()}pushSample(e){delete e.cmd,this.allSampleList.push(e)}_startInterval(){const e=Math.ceil(1e3/this.baseFps);this.fpsInterval=setInterval((()=>{let t=(new Date).getTime();this.preLoopTimestamp||(this.preLoopTimestamp=t),this.startBpsTime||(this.startBpsTime=t);const i=t-this.preLoopTimestamp;if(i>2*e&&console.warn(`JbPro:[TsLoader LoopWorker] loop interval is ${i}ms, more than ${e} * 2ms`),this._loop(),this.preLoopTimestamp=(new Date).getTime(),this.startBpsTime){t-this.startBpsTime>=1e3&&(this._calcSampleList(),this.startBpsTime=t)}}),e)}_clearInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null)}_calcSampleList(){const i={buferredDuration:0,allListLength:this.allSampleList.length,audioListLength:0,videoListLength:0};this.allSampleList.forEach((s=>{s.type===t?(i.videoListLength++,s.duration&&(i.buferredDuration+=s.duration/90)):s.type===e&&i.audioListLength++})),postMessage({cmd:"sampleListInfo",...i})}_loop(){let i=null;if(this.allSampleList.length)if(i=this.allSampleList.shift(),i.type===t){postMessage({cmd:"decodeVideo",...i},[i.payload.buffer]);let t=this.allSampleList[0];for(;t&&t.type===e;)i=this.allSampleList.shift(),postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),t=this.allSampleList[0]}else i.type===e&&(postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),this.allSampleList.length&&this.allSampleList[0].type===t&&(i=this.allSampleList.shift(),postMessage({cmd:"decodeVideo",...i},[i.payload.buffer])))}};self.onmessage=e=>{const t=e.data;switch(t.cmd){case"updateBaseFps":i.updateBaseFps(t.baseFps);break;case"sample":i.pushSample(t);break;case"destroy":i.destroy(),i=null}}}.toString()),t=new Blob([e],{type:"text/javascript"}),i=URL.createObjectURL(t);let s=new Worker(i);this.workerUrl=i,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),Q),s.onmessage=e=>{const t=e.data;switch(t.cmd){case"decodeVideo":this._doDecodeVideo(t);break;case"decodeAudio":this._doDecodeAudio(t);break;case"sampleListInfo":this.tempSampleListInfo=t}},this.loopWorker=s}_postMessageToLoopWorker(e,t){this.loopWorker?this.loopWorker.postMessage({cmd:e,...t}):this.player.debug.warn(this.TAG_NAME,"loop worker is not init, can not post message")}_doDecodeAudio(e){const t=new Uint8Array(e.payload);this.player.updateStats({abps:t.byteLength});let i=t;ha(this.player._opt.m7sCryptoAudio)&&(i=this.cryptoPayloadAudio(t)),this._doDecodeByHls(i,Ie,e.dts,!1,0)}_doDecodeVideo(e){const t=new Uint8Array(e.payload);let i=null;i=e.isHevc?Mo(t,e.isIFrame):wo(t,e.isIFrame),this.player.updateStats({dts:e.dts,vbps:i.byteLength});const s=e.pts-e.dts;let r=this.cryptoPayload(i,e.isIFrame);this._doDecodeByHls(r,Pe,e.dts,e.isIFrame,s)}_stopDecodeLoopInterval(){this._baseFpsInterval&&(clearInterval(this._baseFpsInterval),this._baseFpsInterval=null)}getBuferredDuration(){return this.tempSampleListInfo.buferredDuration||0}getSampleListLength(){return this.tempSampleListInfo.allListLength||0}getSampleAudioListLength(){return this.tempSampleListInfo.audioListLength||0}getSampleVideoListLength(){return this.tempSampleListInfo.videoListLength||0}}function Og(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<8)+(e[t+1]||0)}function Ng(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<24>>>0)+(e[t+1]<<16)+(e[t+2]<<8)+(e[t+3]||0)}function jg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const i=Math.pow(2,32);return Ng(e,t)*i+Ng(e,t+4)}const zg="aac",Gg="g7110a",Vg="g7110m",Hg="avc",Wg="hevc";class $g{static getFrameDuration(e){return 1024*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:9e4)/e}static getRateIndexByRate(e){return $g.FREQ.indexOf(e)}}function Jg(e,t,i,s,r,a){const o=[],n=null==r?void 0:r.entries,l=t.entries,h=s.entries,d=i.entrySizes,c=null==a?void 0:a.entries;let u,p,f;c&&(u={},c.forEach((e=>{u[e-1]=!0}))),n&&(p=[],n.forEach((e=>{let{count:t,offset:i}=e;for(let e=0;e{let{count:t,delta:s}=e;for(let e=0;e=w&&(b++,w=l[b+1]?l[b+1].firstChunk-1:1/0),_+=l[b].samplesPerChunk)})),o}function Kg(e,t){return e.dataReferenceIndex=Og(t,6),e.width=Og(t,24),e.height=Og(t,26),e.horizresolution=Ng(t,28),e.vertresolution=Ng(t,32),e.frameCount=Og(t,40),e.depth=Og(t,74),78}function qg(e,t){return e.dataReferenceIndex=Og(t,6),e.channelCount=Og(t,16),e.sampleSize=Og(t,18),e.sampleRate=Ng(t,24)/65536,28}function Yg(e,t,i){if(!e)return;if(e.size!==e.data.length)throw new Error(`box ${e.type} size !== data.length`);const s={start:e.start,size:e.size,headerSize:e.headerSize,type:e.type};return t&&(s.version=e.data[e.headerSize],s.flags=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(e[t]<<16)+(e[t+1]<<8)+(e[t+2]||0)}(e.data,e.headerSize+1),s.headerSize+=4),i(s,e.data.subarray(s.headerSize),s.start+s.headerSize),s}Il($g,"FREQ",[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350]);const Qg=function(e,t,i){const s=String(i),r=t>>0;let a=Math.ceil(r/s.length);const o=[],n=String(e);for(;a--;)o.push(s);return o.join("").substring(0,r-n.length)+n},Xg=function(){const e=[];for(var t=arguments.length,i=new Array(t),s=0;s{e.push(Qg(Number(t).toString(16),2,0))})),e[0]};class Zg{static probe(e){return!!Zg.findBox(e,["ftyp"])}static findBox(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=[];if(!e)return s;let r=0,a="",o=0;for(;e.length>7;){if(r=Ng(e),a=String.fromCharCode.apply(null,e.subarray(4,8)),o=8,1===r?(r=jg(e,8),o+=8):r||(r=e.length),!t[0]||a===t[0]){const n=e.subarray(0,r);if(!(t.length<2))return Zg.findBox(n.subarray(o),t.slice(1),i+o);s.push({start:i,size:r,headerSize:o,type:a,data:n})}i+=r,e=e.subarray(r)}return s}static tfhd(e){return Yg(e,!0,((e,t)=>{e.trackId=Ng(t);let i=4;const s=1&e.flags,r=2&e.flags,a=8&e.flags,o=16&e.flags,n=32&e.flags;s&&(i+=4,e.baseDataOffset=Ng(t,i),i+=4),r&&(e.sampleDescriptionIndex=Ng(t,i),i+=4),a&&(e.defaultSampleDuration=Ng(t,i),i+=4),o&&(e.defaultSampleSize=Ng(t,i),i+=4),n&&(e.defaultSampleFlags=Ng(t,i))}))}static sidx(e){return Yg(e,!0,((e,t)=>{let i=0;e.reference_ID=Ng(t,i),i+=4,e.timescale=Ng(t,i),i+=4,0===e.version?(e.earliest_presentation_time=Ng(t,i),i+=4,e.first_offset=Ng(t,i),i+=4):(e.earliest_presentation_time=jg(t,i),i+=8,e.first_offset=jg(t,i),i+=8),i+=2,e.references=[];const s=Og(t,i);i+=2;for(let r=0;r>31&1,s.referenced_size=2147483647&r,s.subsegment_duration=Ng(t,i),i+=4,r=Ng(t,i),i+=4,s.starts_with_SAP=r>>31&1,s.SAP_type=r>>28&7,s.SAP_delta_time=268435455&r}}))}static moov(e){return Yg(e,!1,((e,t,i)=>{e.mvhd=Zg.mvhd(Zg.findBox(t,["mvhd"],i)[0]),e.trak=Zg.findBox(t,["trak"],i).map((e=>Zg.trak(e))),e.pssh=Zg.pssh(Zg.findBox(t,["pssh"],i)[0])}))}static mvhd(e){return Yg(e,!0,((e,t)=>{let i=0;1===e.version?(e.timescale=Ng(t,16),e.duration=jg(t,20),i+=28):(e.timescale=Ng(t,8),e.duration=Ng(t,12),i+=16),e.nextTrackId=Ng(t,i+76)}))}static trak(e){return Yg(e,!1,((e,t,i)=>{e.tkhd=Zg.tkhd(Zg.findBox(t,["tkhd"],i)[0]),e.mdia=Zg.mdia(Zg.findBox(t,["mdia"],i)[0])}))}static tkhd(e){return Yg(e,!0,((e,t)=>{let i=0;1===e.version?(e.trackId=Ng(t,16),e.duration=jg(t,24),i+=32):(e.trackId=Ng(t,8),e.duration=Ng(t,16),i+=20),e.width=Ng(t,i+52),e.height=Ng(t,i+56)}))}static mdia(e){return Yg(e,!1,((e,t,i)=>{e.mdhd=Zg.mdhd(Zg.findBox(t,["mdhd"],i)[0]),e.hdlr=Zg.hdlr(Zg.findBox(t,["hdlr"],i)[0]),e.minf=Zg.minf(Zg.findBox(t,["minf"],i)[0])}))}static mdhd(e){return Yg(e,!0,((e,t)=>{let i=0;1===e.version?(e.timescale=Ng(t,16),e.duration=jg(t,20),i+=28):(e.timescale=Ng(t,8),e.duration=Ng(t,12),i+=16);const s=Og(t,i);e.language=String.fromCharCode(96+(s>>10&31),96+(s>>5&31),96+(31&s))}))}static hdlr(e){return Yg(e,!0,((e,t)=>{0===e.version&&(e.handlerType=String.fromCharCode.apply(null,t.subarray(4,8)))}))}static minf(e){return Yg(e,!1,((e,t,i)=>{e.vmhd=Zg.vmhd(Zg.findBox(t,["vmhd"],i)[0]),e.smhd=Zg.smhd(Zg.findBox(t,["smhd"],i)[0]),e.stbl=Zg.stbl(Zg.findBox(t,["stbl"],i)[0])}))}static vmhd(e){return Yg(e,!0,((e,t)=>{e.graphicsmode=Og(t),e.opcolor=[Og(t,2),Og(t,4),Og(t,6)]}))}static smhd(e){return Yg(e,!0,((e,t)=>{e.balance=Og(t)}))}static stbl(e){return Yg(e,!1,((e,t,i)=>{var s,r,a;e.stsd=Zg.stsd(Zg.findBox(t,["stsd"],i)[0]),e.stts=Zg.stts(Zg.findBox(t,["stts"],i)[0]),e.ctts=Zg.ctts(Zg.findBox(t,["ctts"],i)[0]),e.stsc=Zg.stsc(Zg.findBox(t,["stsc"],i)[0]),e.stsz=Zg.stsz(Zg.findBox(t,["stsz"],i)[0]),e.stco=Zg.stco(Zg.findBox(t,["stco"],i)[0]),e.stco||(e.co64=Zg.co64(Zg.findBox(t,["co64"],i)[0]),e.stco=e.co64);const o=null===(s=e.stsd.entries[0])||void 0===s||null===(r=s.sinf)||void 0===r||null===(a=r.schi)||void 0===a?void 0:a.tenc.default_IV_size;e.stss=Zg.stss(Zg.findBox(t,["stss"],i)[0]),e.senc=Zg.senc(Zg.findBox(t,["senc"],i)[0],o)}))}static senc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return Yg(e,!0,((e,i)=>{let s=0;const r=Ng(i,s);s+=4,e.samples=[];for(let a=0;a{const i=[],s=[];let r=0;for(let e=0;e<16;e++)s.push(Xg(t[r+e]));if(r+=16,e.version>0){const e=Ng(t,r);r+=4;for(let s=0;s<(""+e).length;s++)for(let e=0;e<16;e++){const e=t[r];r+=1,i.push(Xg(e))}}const a=Ng(t,r);e.data_size=a,r+=4,e.kid=i,e.system_id=s,e.buffer=t}))}static stsd(e){return Yg(e,!0,((e,t,i)=>{e.entryCount=Ng(t),e.entries=Zg.findBox(t.subarray(4),[],i+4).map((e=>{switch(e.type){case"avc1":case"avc2":case"avc3":case"avc4":return Zg.avc1(e);case"hvc1":case"hev1":return Zg.hvc1(e);case"mp4a":return Zg.mp4a(e);case"alaw":case"ulaw":return Zg.alaw(e);case"enca":return Yg(e,!1,((e,t,i)=>{e.channelCount=Og(t,16),e.samplesize=Og(t,18),e.sampleRate=Ng(t,24)/65536,t=t.subarray(28),e.sinf=Zg.sinf(Zg.findBox(t,["sinf"],i)[0]),e.esds=Zg.esds(Zg.findBox(t,["esds"],i)[0])}));case"encv":return Yg(e,!1,((e,t,i)=>{e.width=Og(t,24),e.height=Og(t,26),e.horizresolution=Ng(t,28),e.vertresolution=Ng(t,32),t=t.subarray(78),e.sinf=Zg.sinf(Zg.findBox(t,["sinf"],i)[0]),e.avcC=Zg.avcC(Zg.findBox(t,["avcC"],i)[0]),e.hvcC=Zg.hvcC(Zg.findBox(t,["hvcC"],i)[0]),e.pasp=Zg.pasp(Zg.findBox(t,["pasp"],i)[0])}))}})).filter(Boolean)}))}static tenc(e){return Yg(e,!1,((e,t)=>{let i=6;e.default_IsEncrypted=t[i],i+=1,e.default_IV_size=t[i],i+=1,e.default_KID=[];for(let s=0;s<16;s++)e.default_KID.push(Xg(t[i])),i+=1}))}static schi(e){return Yg(e,!1,((e,t,i)=>{e.tenc=Zg.tenc(Zg.findBox(t,["tenc"],i)[0])}))}static sinf(e){return Yg(e,!1,((e,t,i)=>{e.schi=Zg.schi(Zg.findBox(t,["schi"],i)[0]),e.frma=Zg.frma(Zg.findBox(t,["frma"],i)[0])}))}static frma(e){return Yg(e,!1,((e,t)=>{e.data_format="";for(let i=0;i<4;i++)e.data_format+=String.fromCharCode(t[i])}))}static avc1(e){return Yg(e,!1,((e,t,i)=>{const s=Kg(e,t),r=t.subarray(s);i+=s,e.avcC=Zg.avcC(Zg.findBox(r,["avcC"],i)[0]),e.pasp=Zg.pasp(Zg.findBox(r,["pasp"],i)[0])}))}static avcC(e){return Yg(e,!1,((e,t)=>{e.configurationVersion=t[0],e.AVCProfileIndication=t[1],e.profileCompatibility=t[2],e.AVCLevelIndication=t[3],e.codec=function(e){let t,i="avc1.";for(let s=0;s<3;s++)t=e[s].toString(16),t.length<2&&(t=`0${t}`),i+=t;return i}([t[1],t[2],t[3]]),e.lengthSizeMinusOne=3&t[4],e.spsLength=31&t[5],e.sps=[];let i=6;for(let s=0;s{const s=Kg(e,t),r=t.subarray(s);i+=s,e.hvcC=Zg.hvcC(Zg.findBox(r,["hvcC"],i)[0]),e.pasp=Zg.pasp(Zg.findBox(r,["pasp"],i)[0])}))}static hvcC(e){return Yg(e,!1,((t,i)=>{t.data=e.data,t.codec="hev1.1.6.L93.B0",t.configurationVersion=i[0];const s=i[1];t.generalProfileSpace=s>>6,t.generalTierFlag=(32&s)>>5,t.generalProfileIdc=31&s,t.generalProfileCompatibility=Ng(i,2),t.generalConstraintIndicatorFlags=i.subarray(6,12),t.generalLevelIdc=i[12],t.avgFrameRate=Og(i,19),t.numOfArrays=i[22],t.vps=[],t.sps=[],t.pps=[];let r=23,a=0,o=0,n=0;for(let e=0;e{e.hSpacing=Ng(t),e.vSpacing=Ng(t,4)}))}static mp4a(e){return Yg(e,!1,((e,t,i)=>{const s=qg(e,t);e.esds=Zg.esds(Zg.findBox(t.subarray(s),["esds"],i+s)[0])}))}static esds(e){return Yg(e,!0,((e,t)=>{e.codec="mp4a.";let i=0,s=0,r=0,a=0;for(;t.length;){for(i=0,a=t[i],s=t[i+1],i+=2;128&s;)r=(127&s)<<7,s=t[i],i+=1;if(r+=127&s,3===a)t=t.subarray(i+3);else{if(4!==a){if(5===a){const s=e.config=t.subarray(i,i+r);let a=(248&s[0])>>3;return 31===a&&s.length>=2&&(a=32+((7&s[0])<<3)+((224&s[1])>>5)),e.objectType=a,e.codec+=a.toString(16),void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}return void("."===e.codec[e.codec.length-1]&&(e.codec=e.codec.substring(0,e.codec.length-1)))}e.codec+=(t[i].toString(16)+".").padStart(3,"0"),t=t.subarray(i+13)}}}))}static alaw(e){return Yg(e,!1,((e,t)=>{qg(e,t)}))}static stts(e){return Yg(e,!0,((e,t)=>{const i=Ng(t),s=[];let r=4;for(let e=0;e{const i=Ng(t),s=[];let r=4;if(1===e.version)for(let e=0;e{const i=Ng(t),s=[];let r=4;for(let e=0;e{const i=Ng(t),s=Ng(t,4),r=[];if(!i){let e=8;for(let i=0;i{const i=Ng(t),s=[];let r=4;for(let e=0;e{const i=Ng(t),s=[];let r=4;for(let e=0;e{const i=Ng(t),s=[];let r=4;for(let e=0;e{e.mfhd=Zg.mfhd(Zg.findBox(t,["mfhd"],i)[0]),e.traf=Zg.findBox(t,["traf"],i).map((e=>Zg.traf(e)))}))}static mfhd(e){return Yg(e,!0,((e,t)=>{e.sequenceNumber=Ng(t)}))}static traf(e){return Yg(e,!1,((e,t,i)=>{e.tfhd=Zg.tfhd(Zg.findBox(t,["tfhd"],i)[0]),e.tfdt=Zg.tfdt(Zg.findBox(t,["tfdt"],i)[0]),e.trun=Zg.trun(Zg.findBox(t,["trun"],i)[0])}))}static trun(e){return Yg(e,!0,((e,t)=>{const{version:i,flags:s}=e,r=t.length,a=e.sampleCount=Ng(t);let o=4;if(r>o&&1&s&&(e.dataOffset=-(1+~Ng(t,o)),o+=4),r>o&&4&s&&(e.firstSampleFlags=Ng(t,o),o+=4),e.samples=[],r>o){let r;for(let n=0;n{1===e.version?e.baseMediaDecodeTime=jg(t):e.baseMediaDecodeTime=Ng(t)}))}static probe(e){return!!Zg.findBox(e,["ftyp"])}static parseSampleFlags(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}static moovToTrack(e,t,i){var s,r;const a=e.trak;if(!a||!a.length)return;const o=a.find((e=>{var t,i;return"vide"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)})),n=a.find((e=>{var t,i;return"soun"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)}));if(o&&t){var l,h,d,c,u,p,f;const i=t,s=null===(l=o.tkhd)||void 0===l?void 0:l.trackId;null!=s&&(i.id=o.tkhd.trackId),i.tkhdDuration=o.tkhd.duration,i.mvhdDurtion=e.mvhd.duration,i.mvhdTimecale=e.mvhd.timescale,i.timescale=i.formatTimescale=o.mdia.mdhd.timescale,i.duration=o.mdia.mdhd.duration||i.mvhdDurtion/i.mvhdTimecale*i.timescale;const r=o.mdia.minf.stbl.stsd.entries[0];if(i.width=r.width,i.height=r.height,r.pasp&&(i.sarRatio=[r.pasp.hSpacing,r.pasp.vSpacing]),r.hvcC)i.codecType=Wg,i.codec=r.hvcC.codec,i.vps=r.hvcC.vps,i.sps=r.hvcC.sps,i.pps=r.hvcC.pps,i.hvcC=r.hvcC.data;else{if(!r.avcC)throw new Error("unknown video stsd entry");i.codecType=Hg,i.codec=r.avcC.codec,i.sps=r.avcC.sps,i.pps=r.avcC.pps}var m,g,y,A,b,v,_,w;if(i.present=!0,i.ext={},i.ext.stss=null===(h=o.mdia)||void 0===h||null===(d=h.minf)||void 0===d||null===(c=d.stbl)||void 0===c?void 0:c.stss,i.ext.ctts=null===(u=o.mdia)||void 0===u||null===(p=u.minf)||void 0===p||null===(f=p.stbl)||void 0===f?void 0:f.ctts,r&&"encv"===r.type)i.isVideoEncryption=!0,r.default_KID=null===(m=r.sinf)||void 0===m||null===(g=m.schi)||void 0===g?void 0:g.tenc.default_KID,r.default_IsEncrypted=null===(y=r.sinf)||void 0===y||null===(A=y.schi)||void 0===A?void 0:A.tenc.default_IsEncrypted,r.default_IV_size=null===(b=r.sinf)||void 0===b||null===(v=b.schi)||void 0===v?void 0:v.tenc.default_IV_size,i.videoSenc=o.mdia.minf.stbl.senc&&o.mdia.minf.stbl.senc.samples,r.data_format=null===(_=r.sinf)||void 0===_||null===(w=_.frma)||void 0===w?void 0:w.data_format,i.useEME=e.useEME,i.kidValue=e.kidValue,i.pssh=e.pssh,i.encv=r}if(n&&i){var S,T,E,k,C,R,x,D,L;const t=i,a=null===(S=n.tkhd)||void 0===S?void 0:S.trackId;null!=a&&(t.id=n.tkhd.trackId),t.tkhdDuration=n.tkhd.duration,t.mvhdDurtion=e.mvhd.duration,t.mvhdTimecale=e.mvhd.timescale,t.timescale=t.formatTimescale=n.mdia.mdhd.timescale,t.duration=n.mdia.mdhd.duration||t.mvhdDurtion/t.mvhdTimecale*t.timescale;const o=n.mdia.minf.stbl.stsd.entries[0];switch(t.sampleSize=o.sampleSize,t.sampleRate=o.sampleRate,t.channelCount=o.channelCount,t.present=!0,o.type){case"alaw":t.codecType=t.codec=Gg,t.sampleRate=8e3;break;case"ulaw":t.codecType=t.codec=Vg,t.sampleRate=8e3;break;default:t.codecType=zg,t.sampleDuration=$g.getFrameDuration(t.sampleRate,t.timescale),t.sampleRateIndex=$g.getRateIndexByRate(t.sampleRate),t.objectType=(null===(s=o.esds)||void 0===s?void 0:s.objectType)||2,o.esds&&(t.config=Array.from(o.esds.config)),t.codec=(null===(r=o.esds)||void 0===r?void 0:r.codec)||"mp4a.40.2"}var I,P,B,M,U,F,O,N;if(t.sampleDuration=$g.getFrameDuration(t.sampleRate,t.timescale),t.objectType=(null===(T=o.esds)||void 0===T?void 0:T.objectType)||2,o.esds&&(o.esds.config?t.config=Array.from(o.esds.config):console.warn("esds config is null")),t.codec=(null===(E=o.esds)||void 0===E?void 0:E.codec)||"mp4a.40.2",t.sampleRateIndex=$g.getRateIndexByRate(t.sampleRate),t.ext={},t.ext.stss=null===(k=n.mdia)||void 0===k||null===(C=k.minf)||void 0===C||null===(R=C.stbl)||void 0===R?void 0:R.stss,t.ext.ctts=null===(x=n.mdia)||void 0===x||null===(D=x.minf)||void 0===D||null===(L=D.stbl)||void 0===L?void 0:L.ctts,t.present=!0,o&&"enca"===o.type)t.isAudioEncryption=!0,o.data_format=null===(I=o.sinf)||void 0===I||null===(P=I.frma)||void 0===P?void 0:P.data_format,o.default_KID=null===(B=o.sinf)||void 0===B||null===(M=B.schi)||void 0===M?void 0:M.tenc.default_KID,o.default_IsEncrypted=null===(U=o.sinf)||void 0===U||null===(F=U.schi)||void 0===F?void 0:F.tenc.default_IsEncrypted,o.default_IV_size=null===(O=o.sinf)||void 0===O||null===(N=O.schi)||void 0===N?void 0:N.tenc.default_IV_size,t.audioSenc=n.mdia.minf.stbl.senc&&n.mdia.minf.stbl.senc.samples,t.useEME=e.useEME,t.kidValue=e.kidValue,t.enca=o}if(i&&(i.isVideoEncryption=!!t&&t.isVideoEncryption),t&&(t.isAudioEncryption=!!i&&i.isAudioEncryption),null!=t&&t.encv||null!=i&&i.enca){var j,z;const e=null==t||null===(j=t.encv)||void 0===j?void 0:j.default_KID,s=null==i||null===(z=i.enca)||void 0===z?void 0:z.default_KID,r=e||s?(e||s).join(""):null;t&&(t.kid=r),i&&(i.kid=r)}return t&&(t.flags=3841),i&&(i.flags=1793),{videoTrack:t,audioTrack:i}}static evaluateDefaultDuration(e,t,i){var s;const r=null==t||null===(s=t.samples)||void 0===s?void 0:s.length;if(!r)return 1024;return 1024*r/t.timescale*e.timescale/i}static moofToSamples(e,t,i){const s={};return e.mfhd&&(t&&(t.sequenceNumber=e.mfhd.sequenceNumber),i&&(i.sequenceNumber=e.mfhd.sequenceNumber)),e.traf.forEach((e=>{let{tfhd:r,tfdt:a,trun:o}=e;if(!r||!o)return;a&&(t&&t.id===r.trackId&&(t.baseMediaDecodeTime=a.baseMediaDecodeTime),i&&i.id===r.trackId&&(i.baseMediaDecodeTime=a.baseMediaDecodeTime));const n=r.defaultSampleSize||0,l=r.defaultSampleDuration||Zg.evaluateDefaultDuration(t,i,o.samples.length||o.sampleCount);let h=o.dataOffset||0,d=0,c=-1;if(!o.samples.length&&o.sampleCount){s[r.trackId]=[];for(let e=0;e((e={offset:h,dts:d,pts:d+(e.cts||0),duration:e.duration||l,size:e.size||n,gopId:c,keyframe:0===t||null!==e.flags&&void 0!==e.flags&&(65536&e.flags)>>>0!=65536}).keyframe&&(c++,e.gopId=c),d+=e.duration,h+=e.size,e)))})),s}static moovToSamples(e){const t=e.trak;if(!t||!t.length)return;const i=t.find((e=>{var t,i;return"vide"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)})),s=t.find((e=>{var t,i;return"soun"===(null===(t=e.mdia)||void 0===t||null===(i=t.hdlr)||void 0===i?void 0:i.handlerType)}));if(!i&&!s)return;let r,a;if(i){var o,n;const e=null===(o=i.mdia)||void 0===o||null===(n=o.minf)||void 0===n?void 0:n.stbl;if(!e)return;const{stts:t,stsc:s,stsz:a,stco:l,stss:h,ctts:d}=e;if(!(t&&s&&a&&l&&h))return;r=Jg(t,s,a,l,d,h)}if(s){var l,h,d;const e=null===(l=s.mdia)||void 0===l||null===(h=l.minf)||void 0===h?void 0:h.stbl;if(!e)return;const t=null===(d=s.mdia.mdhd)||void 0===d?void 0:d.timescale,{stts:i,stsc:r,stsz:o,stco:n}=e;if(!(t&&i&&r&&o&&n))return;a=Jg(i,r,o,n)}return{videoSamples:r,audioSamples:a}}}class ey extends _l{constructor(e){super(e),this.player=e,this.TAG_NAME="HlsFmp4Loader",this.tempSampleListInfo={},this.isInitVideo=!1,this.isInitAudio=!1,this.videoTrack={id:1,samples:[],sps:[],pps:[],vps:[],codec:""},this.audioTrack={id:2,samples:[],sampleRate:0,channelCount:0,codec:"",codecType:""},this.workerClearTimeout=null,this.workerUrl=null,this.loopWorker=null,this._hasCalcFps=!1,this._initLoopWorker(),e.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.workerUrl&&(URL.revokeObjectURL(this.workerUrl),this.workerUrl=null),this.workerClearTimeout&&(clearTimeout(this.workerClearTimeout),this.workerClearTimeout=null),this.loopWorker&&(this.loopWorker.postMessage({cmd:"destroy"}),this.loopWorker.terminate(),this.loopWorker=null),this._hasCalcFps=!1,this.videoTrack=null,this.audioTrack=null,this.isInitVideo=!1,this.isInitAudio=!1,this.player.debug.log(this.TAG_NAME,"destroy")}demux(e,t){let i=this.audioTrack,s=this.videoTrack;if(this.checkInitAudio(),this.checkInitVideo(),i.samples=[],s.samples=[],t){if(this.player.updateStats({abps:t.byteLength}),da(this.isInitAudio)){const e=Zg.findBox(t,["moov"])[0];if(!e)return void this.player.debug.error(this.TAG_NAME,"cannot found moov box");Zg.moovToTrack(Zg.moov(e),null,i),this.checkInitAudio()&&(this.player.debug.log(this.TAG_NAME,"audioData audio init success"),this._sendAccADTSHeader(i))}const e=Zg.findBox(t,["moof"])[0];if(e){const s=Zg.moofToSamples(Zg.moof(e),null,i)[i.id],r=i.baseMediaDecodeTime;if(s){const a=e.start;s.map((e=>{e.offset+=a;const s=t.subarray(e.offset,e.offset+e.size),o=e.dts+r,n=new Uint8Array(s.length+2);n.set([175,1],0),n.set(s,2),i.samples.push({type:Ie,pts:o,dts:o,payload:n,duration:e.duration,size:n.byteLength})}))}}}if(e){if(this.player.updateStats({vbps:e.byteLength}),da(this.isInitVideo)&&da(this.isInitAudio)){const t=Zg.findBox(e,["moov"])[0];if(!t)throw new Error("cannot found moov box");if(Zg.moovToTrack(Zg.moov(t),s,i),da(this.isInitAudio)&&this.checkInitAudio()&&(this.player.debug.log(this.TAG_NAME,"videoData audio init success",i),this._sendAccADTSHeader(i)),this.checkInitVideo()){this.player.debug.log(this.TAG_NAME,"video init success");let e=null;s.codecType===Ri?s.sps.length&&s.vps.length&&s.pps.length&&(e=Bo({sps:s.sps[0],pps:s.pps[0],vps:s.vps[0]})):s.sps.length&&s.pps.length&&(e=_o({sps:s.sps[0],pps:s.pps[0]})),e&&(this.player.debug.log(this.TAG_NAME,"seqHeader"),this._doDecodeByHls(e,Pe,0,!0,0))}}const t=Zg.findBox(e,["moof"])[0];if(t){const r=Zg.moofToSamples(Zg.moof(t),s,i),a=s.baseMediaDecodeTime,o=i.baseMediaDecodeTime,n=t.start;Object.keys(r).forEach((t=>{s.id==t?r[t].map((t=>{t.offset+=n;const i={type:Pe,pts:(t.pts||t.dts)+a,dts:t.dts+a,units:[],payload:null,isIFrame:!1};i.duration=t.duration,i.gopId=t.gopId,t.keyframe&&(i.isIFrame=!0);const r=e.subarray(t.offset,t.offset+t.size);i.payload=r,s.samples.push(i)})):i.id==t&&r[t].map((t=>{t.offset+=n;const s=e.subarray(t.offset,t.offset+t.size),r=t.dts+o,a=new Uint8Array(s.length+2);a.set([175,1],0),a.set(s,2),i.samples.push({type:Ie,pts:r,dts:r,payload:a,duration:t.duration,size:a.byteLength})}))}))}}const r=s.samples.concat(i.samples);r.sort(((e,t)=>e.dts-t.dts)),r.forEach((e=>{const t=new Uint8Array(e.payload);delete e.payload,this.loopWorker.postMessage({...e,payload:t,cmd:"sample"},[t.buffer])})),da(this._hasCalcFps)&&(this._hasCalcFps=!0,this._calcDecodeFps(r))}checkInitAudio(){return this.isInitAudio=!!(this.audioTrack.sampleRate&&this.audioTrack.channelCount&&this.audioTrack.codec&&"aac"===this.audioTrack.codecType),this.isInitAudio}checkInitVideo(){return this.isInitVideo=!!(this.videoTrack.pps.length&&this.videoTrack.sps.length&&this.videoTrack.codec),this.isInitVideo}_sendAccADTSHeader(e){const t=js({profile:e.objectType,sampleRate:e.sampleRateIndex,channel:e.channelCount});this._doDecodeByHls(t,Ie,0,!0,0)}_calcDecodeFps(e){const t=ia(e.map((e=>({ts:e.dts||e.pts,type:e.type}))),Pe);t&&(this._basefps=t,this._postMessageToLoopWorker("updateBaseFps",{baseFps:this._basefps}),this.player.debug.log(this.TAG_NAME,`_calcDecodeFps() video fps is ${t}, update base fps is ${this._basefps}`))}_initLoopWorker(){const e=ma(function(){const e=1,t=2;let i=new class{constructor(){this.baseFps=0,this.fpsInterval=null,this.preLoopTimestamp=null,this.startBpsTime=null,this.allSampleList=[]}destroy(){this._clearInterval(),this.baseFps=0,this.allSampleList=[],this.preLoopTimestamp=null,this.startBpsTime=null}updateBaseFps(e){this.baseFps=e,this._clearInterval(),this._startInterval()}pushSample(e){delete e.cmd,this.allSampleList.push(e)}_startInterval(){const e=Math.ceil(1e3/this.baseFps);this.fpsInterval=setInterval((()=>{let t=(new Date).getTime();this.preLoopTimestamp||(this.preLoopTimestamp=t),this.startBpsTime||(this.startBpsTime=t);const i=t-this.preLoopTimestamp;if(i>2*e&&console.warn(`JbPro:[TsLoader LoopWorker] loop interval is ${i}ms, more than ${e} * 2ms`),this._loop(),this.preLoopTimestamp=(new Date).getTime(),this.startBpsTime){t-this.startBpsTime>=1e3&&(this._calcSampleList(),this.startBpsTime=t)}}),e)}_clearInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null)}_calcSampleList(){const i={buferredDuration:0,allListLength:this.allSampleList.length,audioListLength:0,videoListLength:0};this.allSampleList.forEach((s=>{s.type===t?(i.videoListLength++,s.duration&&(i.buferredDuration+=s.duration)):s.type===e&&i.audioListLength++})),postMessage({cmd:"sampleListInfo",...i})}_loop(){let i=null;if(this.allSampleList.length)if(i=this.allSampleList.shift(),i.type===t){postMessage({cmd:"decodeVideo",...i},[i.payload.buffer]);let t=this.allSampleList[0];for(;t&&t.type===e;)i=this.allSampleList.shift(),postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),t=this.allSampleList[0]}else i.type===e&&(postMessage({cmd:"decodeAudio",...i},[i.payload.buffer]),this.allSampleList.length&&this.allSampleList[0].type===t&&(i=this.allSampleList.shift(),postMessage({cmd:"decodeVideo",...i},[i.payload.buffer])))}};self.onmessage=e=>{const t=e.data;switch(t.cmd){case"updateBaseFps":i.updateBaseFps(t.baseFps);break;case"sample":i.pushSample(t);break;case"destroy":i.destroy(),i=null}}}.toString()),t=new Blob([e],{type:"text/javascript"}),i=URL.createObjectURL(t);let s=new Worker(i);this.workerUrl=i,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),Q),s.onmessage=e=>{const t=e.data;switch(t.cmd){case"decodeVideo":this._doDecodeVideo(t);break;case"decodeAudio":this._doDecodeAudio(t);break;case"sampleListInfo":this.tempSampleListInfo=t}},this.loopWorker=s}_postMessageToLoopWorker(e,t){this.loopWorker?this.loopWorker.postMessage({cmd:e,...t}):this.player.debug.warn(this.TAG_NAME,"loop worker is not init, can not post message")}_doDecodeAudio(e){const t=new Uint8Array(e.payload);this._doDecodeByHls(t,Ie,e.dts,!1,0)}_doDecodeVideo(e){const t=new Uint8Array(e.payload);let i=null;i=e.isHevc?Mo(t,e.isIFrame):wo(t,e.isIFrame),this.player.updateStats({dts:e.dts});const s=e.pts-e.dts;this._doDecodeByHls(i,Pe,e.dts,e.isIFrame,s)}getBuferredDuration(){return this.tempSampleListInfo.buferredDuration||0}getSampleListLength(){return this.tempSampleListInfo.allListLength||0}getSampleAudioListLength(){return this.tempSampleListInfo.audioListLength||0}getSampleVideoListLength(){return this.tempSampleListInfo.videoListLength||0}}class ty{constructor(e,t){this.hls=e,this.player=this.hls.player,this.isMP4=t,this._initSegmentId="",this.TAG_NAME="HlsTransmuxer",this.hlsV2Mp4NotSupport=!1,this._demuxer=t?new ey(this.hls.player):new Fg(this.hls.player),this.player.debug.log(this.TAG_NAME,`init and isMP4 is ${t}`)}destroy(){this.hlsV2Mp4NotSupport=!1,this._demuxer&&(this._demuxer.destroy(),this._demuxer=null)}transmux(e,t,i,s,r,a){this.player.debug.log(this.TAG_NAME,`transmux videoChunk:${e&&e.byteLength}, audioChunk:${t&&t.byteLength}, discontinuity:${i}, contiguous:${s}, startTime:${r}, needInit:${a}`);const o=this._demuxer;try{this.isMP4?o.demux(e,t):o.demuxAndFix(Ig(e,t),i,s,r)}catch(e){throw new og(ag,rg,e)}}}class iy{constructor(e){this.hls=e,this.player=e.player,this._decryptor=new Pg(this.hls,this.player),this._transmuxer=null,this._mse=null,this._softVideo=null,this._sourceCreated=!1,this._needInitSegment=!0,this._directAppend=!1,this.TAG_NAME="HlsBufferService"}async destroy(){this._softVideo=null,this._transmuxer&&(this._transmuxer.destroy(),this._transmuxer=null)}get baseDts(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t._baseDts}get nbSb(){return 0}async updateDuration(e){this.player.debug.log(this.TAG_NAME,"updateDuration()",e)}getBuferredDuration(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getBuferredDuration()}getBufferedSegments(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getSampleListLength()}getBufferedAudioSegments(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getSampleAudioListLength()}getBufferedVideoSegments(){var e,t;return null===(e=this._transmuxer)||void 0===e||null===(t=e._demuxer)||void 0===t?void 0:t.getSampleVideoListLength()}createSource(e,t,i,s){if(this._sourceCreated)return;const r=e||t;r&&(Fg.probe(r)?this._transmuxer||(this._transmuxer=new ty(this.hls,!1)):Zg.probe(r)?this._transmuxer||(this._transmuxer=new ty(this.hls,!0)):this.player.debug.error(this.TAG_NAME,"createSource error: chunk is not ts"))}async appendBuffer(e,t,i,s,r,a,o){if(null!=i&&i.length||null!=s&&s.length)return this._needInitSegment,this._transmuxer.transmux(i,s,r,a,o,this._needInitSegment||r),!0}async clearAllBuffer(){this.player.debug.log(this.TAG_NAME,"clearAllBuffer")}decryptBuffer(e,t){return this._decryptor.decrypt(e,t)}async reset(){this._transmuxer=null,this._needInitSegment=!0,this._directAppend=!1}async endOfStream(){this._softVideo&&this._softVideo.endOfStream()}async setLiveSeekableRange(e,t){}seamlessSwitch(){this._needInitSegment=!0}}class sy{constructor(e){this.emitter=e,this._seiSet=new Set,e.on(bs,(e=>{e&&this._seiSet.add(e)}))}throw(e){if(null==e||!this._seiSet.size)return;const t=e-.2,i=e+.2,s=[];this._seiSet.forEach((e=>{e.time>=t&&e.time<=i&&s.push(e)})),s.forEach((e=>{this._seiSet.delete(e),this.emitter.emit(vs,e)}))}reset(){this._seiSet.clear()}}class ry{constructor(e){this._timescale=e,this.encodeType="",this.audioCodec="",this.videoCodec="",this.domain="",this.fps=0,this.bitrate=0,this.width=0,this.height=0,this.samplerate=0,this.channelCount=0,this.gop=0,this._bitsAccumulateSize=0,this._bitsAccumulateDuration=0}getStats(){return{encodeType:this.encodeType,audioCodec:this.audioCodec,videoCodec:this.videoCodec,domain:this.domain,fps:this.fps,bitrate:this.bitrate,width:this.width,height:this.height,samplerate:this.samplerate,channelCount:this.channelCount,gop:this.gop}}setEncodeType(e){this.encodeType=e}setFpsFromScriptData(e){var t;let{data:i}=e;const s=null==i||null===(t=i.onMetaData)||void 0===t?void 0:t.framerate;s&&s>0&&s<100&&(this.fps=s)}setVideoMeta(e){if(this.width=e.width,this.height=e.height,this.videoCodec=e.codec,this.encodeType=e.codecType,e.fpsNum&&e.fpsDen){const t=e.fpsNum/e.fpsDen;t>0&&t<100&&(this.fps=t)}}setAudioMeta(e){this.audioCodec=e.codec,this.samplerate=e.sampleRate,this.channelCount=e.channelCount}setDomain(e){this.domain=e.split("/").slice(2,3)[0]}updateBitrate(e){if((!this.fps||this.fps>=100)&&e.length){const t=e.reduce(((e,t)=>e+t.duration),0)/e.length;this.fps=Math.round(this._timescale/t)}e.forEach((e=>{1===e.gopId&&this.gop++,this._bitsAccumulateDuration+=e.duration/(this._timescale/1e3),this._bitsAccumulateSize+=e.units.reduce(((e,t)=>e+t.length),0),this._bitsAccumulateDuration>=1e3&&(this.bitrate=8*this._bitsAccumulateSize,this._bitsAccumulateDuration=0,this._bitsAccumulateSize=0)}))}}class ay{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3;Il(this,"_core",null),Il(this,"_samples",[]),this._core=e,this._timescale=t,this._stats=new ry(t),this._bindEvents()}getStats(){var e,t,i,s,r,a,o;const{currentTime:n=0,decodeFps:l=0}=(null===(e=this._core)||void 0===e?void 0:e.media)||{};return{...this._stats.getStats(),downloadSpeed:(null===(t=this._core)||void 0===t||null===(i=t.speedInfo)||void 0===i?void 0:i.call(t).speed)||0,avgSpeed:(null===(s=this._core)||void 0===s||null===(r=s.speedInfo)||void 0===r?void 0:r.call(s).avgSpeed)||0,currentTime:n,bufferEnd:(null===(a=this._core)||void 0===a||null===(o=a.bufferInfo())||void 0===o?void 0:o.remaining)||0,decodeFps:l}}_bindEvents(){this._core.on(ds,(e=>this._stats.updateBitrate(e.samples))),this._core.on(cs,(e=>{this._stats.setFpsFromScriptData(e)})),this._core.on(us,(e=>{"video"===e.type?this._stats.setVideoMeta(e.track):this._stats.setAudioMeta(e.track)})),this._core.on(ps,(e=>{this._stats.setDomain(e.responseUrl)}))}reset(){this._samples=[],this._stats=new ry(this._timescale)}}class oy extends ba{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),Il(this,"_loadSegment",(async()=>{if(this.player.debug.log(this.TAG_NAME,"_loadSegment()","_segmentProcessing",this._segmentProcessing),this._segmentProcessing)return void this.player.debug.warn("_loadSegment()","_segmentProcessing is ture and return");const e=this._playlist.currentSegment,t=this._playlist.nextSegment;if(this.player.debug.log(this.TAG_NAME,"_loadSegment()","curSeg",e,"nextSeg",t),t)return this._loadSegmentDirect();this.player.debug.log(this.TAG_NAME,"nextSeg is null and return")})),this.player=e,this.config=null,this._manifestLoader=null,this._segmentLoader=null,this._playlist=null,this._bufferService=null,this._seiService=null,this._stats=null,this._prevSegSn=null,this._prevSegCc=null,this._tickTimer=null,this._tickInterval=500,this._segmentProcessing=!1,this._reloadOnPlay=!1,this._switchUrlOpts=null,this._disconnectTimer=null,this.TAG_NAME="Hls256",this.canVideoPlay=!1,this.$videoElement=null,this.config=t=function(e){return{isLive:!0,maxPlaylistSize:50,retryCount:3,retryDelay:1e3,pollRetryCount:2,loadTimeout:1e4,preloadTime:30,softDecode:!1,bufferBehind:10,maxJumpDistance:3,startTime:0,targetLatency:10,maxLatency:20,allowedStreamTrackChange:!0,...e}}(t),this._manifestLoader=new Cg(this),this._segmentLoader=new xg(this),this._playlist=new Lg(this),this._bufferService=new iy(this),this._seiService=new sy(this),this._stats=new ay(this,9e4),this.player.debug.log(this.TAG_NAME,"init")}async destroy(){this.player.debug.log(this.TAG_NAME,"destroy()"),this._playlist.reset(),this._segmentLoader.reset(),this._seiService.reset(),await Promise.all([this._clear(),this._bufferService.destroy()]),this._manifestLoader&&(await this._manifestLoader.destroy(),this._manifestLoader=null),this._segmentLoader&&(this._segmentLoader.destroy(),this._segmentLoader=null),this._playlist&&(this._playlist.destroy(),this._playlist=null),this.player.debug.log(this.TAG_NAME,"destroy end")}_startTick(){this._stopTick(),this._tickTimer=setTimeout((()=>{this._tick()}),this._tickInterval)}_stopTick(){this._tickTimer&&clearTimeout(this._tickTimer),this._tickTimer=null}_tick(){this._startTick(),this._loadSegment()}get isLive(){return this._playlist.isLive}get streams(){return this._playlist.streams}get currentStream(){return this._playlist.currentStream}get hasSubtitle(){return this._playlist.hasSubtitle}get baseDts(){var e;return null===(e=this._bufferService)||void 0===e?void 0:e.baseDts}speedInfo(){return this._segmentLoader.speedInfo()}getStats(){return this._stats.getStats()}async loadSource(e){return this.player.debug.log(this.TAG_NAME,`loadSource() ${e}`),await this._reset(),await this._loadData(e),this._startTick(),!0}async _loadData(e){this.player.debug.log(this.TAG_NAME,`_loadData() ${e}`);try{e&&(e=e.trim())}catch(e){}if(!e)throw this._emitError(new og(ig,ig,null,null,"m3u8 url is missing"));const t=await this._loadM3U8(e),{currentStream:i}=this._playlist;if(this._urlSwitching){var s,r;if(0===i.bitrate&&null!==(s=this._switchUrlOpts)&&void 0!==s&&s.bitrate)i.bitrate=null===(r=this._switchUrlOpts)||void 0===r?void 0:r.bitrate;const e=this._getSeamlessSwitchPoint();this.config.startTime=e;const t=this._playlist.findSegmentIndexByTime(e),a=this._playlist.getSegmentByIndex(t+1);if(a){const e=a.start;this.player.debug.warn(this.TAG_NAME,`clear buffer from ${e}`)}}t&&(this.isLive?(this.player.debug.log(this.TAG_NAME,"is live"),this._bufferService.setLiveSeekableRange(0,4294967295),this.config.targetLatency{let[t,i,o]=e;t?(this._playlist.upsertPlaylist(t,i,o),this.isLive&&this._pollM3U8(s,r,a)):this.player.debug.warn(this.TAG_NAME,"_refreshM3U8() mediaPlaylist is empty")})).catch((e=>{throw this._emitError(og.create(e))}))}_pollM3U8(e,t,i){var s;let r=this._playlist.isEmpty;this._manifestLoader.poll(e,t,i,((e,t,i)=>{this._playlist.upsertPlaylist(e,t,i),this._playlist.clearOldSegment(),e&&r&&!this._playlist.isEmpty&&this._loadSegment(),r&&(r=this._playlist.isEmpty)}),(e=>{this._emitError(og.create(e))}),1e3*((null===(s=this._playlist.lastSegment)||void 0===s?void 0:s.duration)||0))}async _loadSegmentDirect(){this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()");const e=this._playlist.nextSegment;if(!e)return void this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect() !seg");let t=!1,i=null;try{this._segmentProcessing=!0,t=await this._reqAndBufferSegment(e,this._playlist.getAudioSegment(e))}catch(e){i=e}finally{this._segmentProcessing=!1}return i?this._emitError(og.create(i)):(t?(this._urlSwitching&&(this._urlSwitching=!1,this.emit(ws,{url:this.config.url})),this._playlist.moveSegmentPointer(),this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()","seg.isLast",e.isLast),e.isLast?(this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()","seg.isLast"),this._end()):(this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect()","and next _loadSegment()"),this._loadSegment())):this.player.debug.log(this.TAG_NAME,"_loadSegmentDirect() not appended"),t)}async _reqAndBufferSegment(e,t){this.player.debug.log(this.TAG_NAME,"video seg",e&&e.url,"audio seg",t&&t.url);const i=e?e.cc:t.cc,s=this._prevSegCc!==i;let r=[];try{r=await this._segmentLoader.load(e,t,s)}catch(e){throw e.fatal=!1,this._segmentLoader.error=e,e}if(!r[0])return;const a=await this._bufferService.decryptBuffer(...r);if(!a)return void this.player.debug.log(this.TAG_NAME,"decryptBuffer return null");const o=e?e.sn:t.sn,n=e?e.start:t.start,l=this._playlist.currentStream;return this._bufferService.createSource(a[0],a[1],null==l?void 0:l.videoCodec,null==l?void 0:l.audioCodec),await this._bufferService.appendBuffer(e,t,a[0],a[1],s,this._prevSegSn===o-1,n),this._prevSegCc=i,this._prevSegSn=o,!0}async _clear(){this.player.debug.log(this.TAG_NAME,"_clear()"),clearTimeout(this._disconnectTimer),this._stopTick(),await Promise.all([this._segmentLoader.cancel(),this._manifestLoader.stopPoll()]),this._segmentProcessing=!1}async _reset(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.player.debug.log(this.TAG_NAME,"_reset()"),this._reloadOnPlay=!1,this._prevSegSn=null,this._prevSegCc=null,this._switchUrlOpts=null,this._playlist.reset(),this._segmentLoader.reset(),this._seiService.reset(),this._stats.reset(),await this._clear(),this._bufferService.reset(e)}_end(){this.player.debug.log(this.TAG_NAME,"_end()"),this._clear()}_emitError(e){var t;let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];var s;!1===(null===(t=e.originError)||void 0===t?void 0:t.fatal)?console.warn(e):(console.table(e),console.error(e),console.error(null===(s=this.media)||void 0===s?void 0:s.error),this._stopTick(),this._urlSwitching&&(this._urlSwitching=!1,this.emit(_s,e)),i&&this._end(),this._seiService.reset(),this.emit(Es,e));return e}_getSeamlessSwitchPoint(){const{media:e}=this;let t=e.currentTime;if(!e.paused){var i;const s=this._playlist.findSegmentIndexByTime(e.currentTime),r=this._playlist.getSegmentByIndex(s),a=null===(i=this._stats)||void 0===i?void 0:i.getStats().downloadSpeed;if(a&&r){t+=r.duration*this._playlist.currentStream.bitrate/a+1}else t+=5}return t}getDemuxBuferredDuration(){return this._bufferService.getBuferredDuration()||0}getDemuxBufferedListLength(){return this._bufferService.getBufferedSegments()||0}getDemuxAudioBufferedListLength(){return this._bufferService.getBufferedAudioSegments()||0}getDemuxVideoBufferedListLength(){return this._bufferService.getBufferedVideoSegments()||0}}class ny extends ba{constructor(e){super(),Il(this,"TAG_NAME","Hls256Decoder"),this.player=e,this.$videoElement=this.player.video.$videoElement,this.hls=null,this.eventsDestroy=[],this.bandwidthEstimateInterval=null,this.hls=new oy(e),this._bindEvents()}async destroy(){return this._stopBandwidthEstimateInterval(),this.hls&&(await this.hls.destroy(),this.hls=null),this.eventsDestroy.length&&(this.eventsDestroy.forEach((e=>e())),this.eventsDestroy=[]),this.$videoElement=null,this.player.debug.log(this.TAG_NAME,"destroy"),!0}_bindEvents(){this.hls.on(Es,(e=>{this.player.emitError(tt.hlsError,e)})),this._startBandwidthEstimateInterval()}_startBandwidthEstimateInterval(){this._stopBandwidthEstimateInterval(),this.bandwidthEstimateInterval=setInterval((()=>{const e=this.hls.speedInfo();this.player.emit(Xe.kBps,(e.avgSpeed/1024/8).toFixed(2))}),1e3)}_stopBandwidthEstimateInterval(){this.bandwidthEstimateInterval&&(clearInterval(this.bandwidthEstimateInterval),this.bandwidthEstimateInterval=null)}async loadSource(e){return this.player.debug.log(this.TAG_NAME,`loadSource() ${e}`),this.url=e,await this.hls.loadSource(e),!0}checkHlsBufferedDelay(){let e=0;return this.hls&&(e=this.hls.getDemuxBuferredDuration()),e}getDemuxBufferedListLength(){let e=0;return this.hls&&(e=this.hls.getDemuxBufferedListLength()),e}getDemuxAudioBufferedListLength(){let e=0;return this.hls&&(e=this.hls.getDemuxAudioBufferedListLength()),e}getDemuxVideoBufferedListLength(){let e=0;return this.hls&&(e=this.hls.getDemuxVideoBufferedListLength()),e}}class ly extends ba{constructor(e){super(),this.player=e,this.TAG_NAME="CommonWebrtc",this.rtcPeerConnection=null,this.videoStream=null,this.isDisconnected=!1,this.isH264=this.player.isWebrtcH264(),this.eventsDestroy=[],this.supportVideoFrameCallbackHandle=null,this.isInitInfo=!1,this.$videoElement=this.player.video.$videoElement,this.player._opt.webrtcUseCanvasRender&&this.isH264&&(this.$videoElement=document.createElement("video"),yr()&&(this.$videoElement.style.position="absolute"),this._initVideoEvents()),this.$videoElement.muted=!0,this._initRtcPeerConnection()}destroy(){this.isDisconnected=!1,this.isInitInfo=!1,this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null),this.eventsDestroy.length&&(this.eventsDestroy.forEach((e=>e())),this.eventsDestroy=[]),this.isH264&&(this.videoStream&&(this.videoStream.getTracks().forEach((e=>e.stop())),this.videoStream=null),this.$videoElement.srcObject=null),this.rtcPeerConnection&&(this.rtcPeerConnection.onicecandidate=Zs,this.rtcPeerConnection.ontrack=Zs,this.rtcPeerConnection.onconnectionstatechange=Zs,this.rtcPeerConnection.ondatachannel=Zs,this.rtcPeerConnection.close(),this.rtcPeerConnection=null)}_initVideoEvents(){const{proxy:e}=this.player.events,t=e(this.$videoElement,Ti,(()=>{this.player.debug.log(this.TAG_NAME,"video canplay"),this.$videoElement.play().then((()=>{this.player.debug.log(this.TAG_NAME,"video play"),this._startCanvasRender(),this._initRenderSize()})).catch((e=>{this.player.debug.warn(this.TAG_NAME,"video play error ",e)}))})),i=e(this.$videoElement,Ei,(()=>{this.player.debug.log("HlsDecoder","video waiting")})),s=e(this.$videoElement,ki,(e=>{const t=parseInt(e.timeStamp,10);this.player.handleRender(),this.player.updateStats({ts:t}),this.$videoElement.paused&&(this.player.debug.warn("HlsDecoder","video is paused and next try to replay"),this.$videoElement.play().then((()=>{this.player.debug.log("HlsDecoder","video is paused and replay success")})).catch((e=>{this.player.debug.warn("HlsDecoder","video is paused and replay error ",e)})))})),r=e(this.$videoElement,Ci,(()=>{this.player.debug.log("HlsDecoder","video playback Rate change",this.$videoElement&&this.$videoElement.playbackRate)}));this.eventsDestroy.push(t,i,s,r)}_initRtcPeerConnection(){const e=new RTCPeerConnection,t=this.player;e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"}),e.onsignalingstatechange=e=>{this.player.debug.log(this.TAG_NAME,"onsignalingstatechange",e)},e.oniceconnectionstatechange=i=>{this.player.debug.log(this.TAG_NAME,"oniceconnectionstatechange",e.iceConnectionState);const s=e.iceConnectionState;switch(this.player.emit(Xe.webrtcOnIceConnectionStateChange,s),this.isDisconnected="disconnected"===s,e.iceConnectionState){case"new":case"checking":case"closed":case"connected":case"completed":break;case"failed":t.emit(Xe.webrtcFailed);break;case"disconnected":t.emit(Xe.webrtcDisconnect);break;case"closed":t.emit(Xe.webrtcClosed)}},e.onicecandidate=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidate",e),e.candidate&&this.player.debug.log(this.TAG_NAME,"Remote ICE candidate: ",e.candidate.candidate)},e.ontrack=e=>{if(this.player.debug.log(this.TAG_NAME,"ontrack",e),"video"===e.track.kind){this.player.debug.log(this.TAG_NAME,"ontrack audio");let t=e.streams[0];this.$videoElement.autoplay=!0,this.$videoElement.srcObject=t,this.videoStream=t}},e.onicecandidateerror=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidateerror",e),this.player.emitError(tt.webrtcIceCandidateError,e)},e.onconnectionstatechange=i=>{switch(this.player.debug.log(this.TAG_NAME,"onconnectionstatechange",i),this.player.emit(Xe.webrtcOnConnectionStateChange,e.connectionState),e.connectionState){case"new":case"connecting":case"connected":case"disconnected":break;case"failed":this.isDisconnected&&t.emit(Xe.webrtcFailed)}},this.rtcPeerConnection=e}_startCanvasRender(){ga()?this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)):(this._stopCanvasRender(),this.canvasRenderInterval=setInterval((()=>{this.player.video.render({$video:this.$videoElement,ts:0})}),40))}_stopCanvasRender(){this.canvasRenderInterval&&(clearInterval(this.canvasRenderInterval),this.canvasRenderInterval=null)}videoFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player.isDestroyed()?this.player.debug.log(this.TAG_NAME,"videoFrameCallback() player is destroyed"):(this.player.video.render({$video:this.$videoElement,ts:t.mediaTime||0}),this.player.updateStats({dts:t.mediaTime||0}),this.supportVideoFrameCallbackHandle=this.$videoElement.requestVideoFrameCallback(this.videoFrameCallback.bind(this)))}_initRenderSize(){this.isInitInfo||(this.player.video.updateVideoInfo({width:this.$videoElement.videoWidth,height:this.$videoElement.videoHeight}),this.player.video.initCanvasViewSize(),this.isInitInfo=!0)}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}}class hy extends ly{constructor(e){super(e),this.rtcPeerConnectionDataChannel=null,this.player.isWebrtcH265()&&(this.streamRate=lr((t=>{e.emit(Xe.kBps,(t/1024).toFixed(2))}))),this.TAG_NAME="WebrtcForM7SDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.stopStreamRateInterval(),this.rtcPeerConnectionDataChannel&&(this.rtcPeerConnectionDataChannel.onopen=Zs,this.rtcPeerConnectionDataChannel.onclose=Zs,this.rtcPeerConnectionDataChannel.onmessage=Zs,this.rtcPeerConnectionDataChannel.close(),this.rtcPeerConnectionDataChannel=null),this.player.debug.log(this.TAG_NAME,"destroy")}_initRtcPeerConnection(){const e=new RTCPeerConnection,t=this.player;e.addTransceiver("video",{direction:"recvonly"}),e.addTransceiver("audio",{direction:"recvonly"}),e.onsignalingstatechange=e=>{this.player.debug.log(this.TAG_NAME,"onsignalingstatechange",e)},e.oniceconnectionstatechange=i=>{this.player.debug.log(this.TAG_NAME,"oniceconnectionstatechange",e.iceConnectionState);const s=e.iceConnectionState;switch(this.player.emit(Xe.webrtcOnIceConnectionStateChange,s),this.isDisconnected="disconnected"===s,e.iceConnectionState){case"new":case"checking":case"closed":case"connected":case"completed":break;case"failed":t.emit(Xe.webrtcFailed);break;case"disconnected":t.emit(Xe.webrtcDisconnect);break;case"closed":t.emit(Xe.webrtcClosed)}},e.onicecandidate=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidate",e),e.candidate&&this.player.debug.log(this.TAG_NAME,"Remote ICE candidate: ",e.candidate.candidate)},e.ontrack=e=>{this.player.debug.log(this.TAG_NAME,"ontrack",e);const i=t.video.$videoElement;if("video"===e.track.kind&&t.isWebrtcH264()){let t=e.streams[0];i.autoplay=!0,i.srcObject=t,this.videoStream=t}},e.onicecandidateerror=e=>{this.player.debug.log(this.TAG_NAME,"onicecandidateerror",e),this.player.emitError(tt.webrtcIceCandidateError,e)},e.onconnectionstatechange=i=>{switch(t.debug.log(this.TAG_NAME,`sdp connect status ${e.connectionState}`),e.connectionState){case"new":case"connecting":case"connected":case"disconnected":break;case"failed":this.isDisconnected&&t.emit(Xe.webrtcFailed)}},e.ondatachannel=e=>{const t=e.channel;this.player.debug.log(this.TAG_NAME,"ondatachannel"),t.onopen=()=>{this.player.debug.log(this.TAG_NAME,"ondatachannel and onopen")},t.onmessage=e=>{const t=e.data;if(this.player.isWebrtcH264())return this.player.debug.warn(this.TAG_NAME,"ondatachannel is H265 but decode is h264 so emit webrtcStreamH265 "),void this.player.emit(Xe.webrtcStreamH265);this.player.isDestroyed()?this.player.debug.warn(this.TAG_NAME,"ondatachannel and player is destroyed"):(this.streamRate&&this.streamRate(t.byteLength),this.player.demux&&this.player.demux.dispatch(t))},t.onclose=()=>{this.player.debug.warn(this.TAG_NAME,"ondatachannel and onclose")},this.rtcPeerConnectionDataChannel=t};e.createDataChannel("signal").onmessage=e=>{this.player.debug.log(this.TAG_NAME,"signalChannel,onmessage",e);JSON.parse(e.data).type},this.rtcPeerConnection=e}startStreamRateInterval(){this.stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/sdp"},body:t})}(e,r.sdp).then((e=>{e.text().then((e=>{this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp response"),s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:e})).then((()=>{this.player.isWebrtcH265()&&this.startStreamRateInterval(),t()})).catch((e=>{i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource response.text() error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class dy extends ly{constructor(e){super(e),this.TAG_NAME="WebrtcForZLMDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return pn({url:e,type:"POST",data:t,contentType:"text/plain;charset=utf-8",processData:!1,dataType:"json"})}(e,r.sdp).then((e=>{this.player.debug.log(this.TAG_NAME,`getWebRtcRemoteSdp response and code is ${e.code}`);const r=e;if(0!==r.code)return i(r.msg);s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:r.sdp})).then((()=>{t()})).catch((e=>{i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class cy extends ba{constructor(e,t){if(super(),this.player=e,this.player.$container.classList.add("jessibuca-container-playback"),this._showPrecision=null,this._startTime=null,this._playStartTime=null,this._playingTimestamp=null,this._fps=parseInt(t.fps,10)||e._opt.playbackFps,this._isUseFpsRender=!!ha(t.isUseFpsRender),this._rate=1,this._audioTimestamp=0,this._videoTimestamp=0,this.controlType=t.controlType||J.normal,t.controlType&&-1===[J.normal,J.simple].indexOf(t.controlType)&&(this.player.debug.warn("Playback","constructor()","controlType is not in [normal,simple]",t.controlType),this.controlType=J.normal),this._currentLocalTimestamp=0,this._localOneFrameTimestamp=t.localOneFrameTimestamp||40,this._localCalculateTimeInterval=null,this._isUseLocalCalculateTime=!!ha(t.isUseLocalCalculateTime),this._isPlaybackPauseClearCache=!da(t.isPlaybackPauseClearCache),this._isCacheBeforeDecodeForFpsRender=!!ha(t.isCacheBeforeDecodeForFpsRender),this._startfpsTime=null,this._startFpsTimestamp=null,this._checkStatsInterval=null,this._playbackTs=0,this._renderFps=0,this._isUseLocalCalculateTime?this._startLocalCalculateTime():this._listen(),this.playbackList=[],this._playbackListStartTimestamp=null,this._totalDuration=0,t.controlType===J.normal)this.initPlaybackList(t.playList,t.showPrecision,t.startTime);else if(t.controlType===J.simple){t.duration&&(this._totalDuration=1e3*t.duration);let e=t.startTime||0;e>this.totalDuration&&(e=this.totalDuration),this.setStartTime(e)}this.player.on(Xe.playbackPause,(e=>{e?this.pause():this.resume()}));const i={fps:this._fps,isUseFpsRender:this._isUseFpsRender,localOneFrameTimestamp:this._localOneFrameTimestamp,isUseLocalCalculateTime:this._isUseLocalCalculateTime,uiUsePlaybackPause:t.uiUsePlaybackPause,showControl:t.showControl};e.debug.log("Playback","init",JSON.stringify(i))}destroy(){this._startTime=null,this._showPrecision=null,this._playStartTime=null,this._playingTimestamp=null,this._totalDuration=0,this._audioTimestamp=0,this._videoTimestamp=0,this._fps=null,this._isUseFpsRender=!1,this._rate=1,this.playbackList=[],this._playbackListStartTimestamp=null,this._localCalculateTimeInterval=null,this._currentLocalTimestamp=0,this._startfpsTime=null,this._startFpsTimestamp=null,this._renderFps=0,this._playbackTs=0,this._stopLocalCalculateTime(),this.clearStatsInterval(),this.player.$container&&this.player.$container.classList.remove("jessibuca-container-playback"),this.off(),this.player.debug.log("Playback","destroy")}_listen(){this.player.on(Xe.stats,(e=>{const t=e.ts;this._playStartTime||(this._playStartTime=t-1e3);let i=t-this._playStartTime;this.setPlayingTimestamp(i)}))}pause(){this.clearStatsInterval()}resume(){this.startCheckStatsInterval()}updateStats(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._startFpsTimestamp||(this._startFpsTimestamp=sr()),Ir(e.ts)&&(this.player.updateStats({fps:!0,ts:e.ts}),this._playbackTs=e.ts,this._startfpsTime||(this._startfpsTime=e.ts),this._renderFps+=1);const t=sr(),i=t-this._startFpsTimestamp;if(i<1e3)return;let s=null;this._startfpsTime&&(s=this._playbackTs-this._startfpsTime),this.player.emit(Xe.playbackStats,{fps:this._renderFps,rate:this.rate,start:this._startfpsTime,end:this._playbackTs,timestamp:i,dataTimestamp:s,audioBufferSize:this.player.audio?this.player.audio.bufferSize:0,videoBufferSize:this.player.video?this.player.video.bufferSize:0,ts:this._playbackTs}),this._renderFps=0,this._startfpsTime=this._playbackTs,this._startFpsTimestamp=t}updateLocalOneFrameTimestamp(e){this._localOneFrameTimestamp=e}_startLocalCalculateTime(){this._stopLocalCalculateTime(),this._localCalculateTimeInterval=setInterval((()=>{const e=this._currentLocalTimestamp;this._playStartTime||(this._playStartTime=e-1e3);let t=e-this._playStartTime;this.setPlayingTimestamp(t)}),1e3)}startCheckStatsInterval(){this.clearStatsInterval(),this._checkStatsInterval=setInterval((()=>{this.updateStats()}),1e3)}_stopLocalCalculateTime(){this._localCalculateTimeInterval&&(clearInterval(this._localCalculateTimeInterval),this._localCalculateTimeInterval=null)}clearStatsInterval(){this._checkStatsInterval&&(clearInterval(this._checkStatsInterval),this._checkStatsInterval=null)}increaseLocalTimestamp(){this._isUseLocalCalculateTime&&(this._currentLocalTimestamp+=this._localOneFrameTimestamp)}initPlaybackList(e,t,i){this.playbackList=e||[];let s=0;if(this.playbackList.forEach(((e,t)=>{10===zr(e.start)&&(e.startTimestamp=1e3*e.start,e.startTime=Ar(e.startTimestamp)),10===zr(e.end)&&(e.endTimestamp=1e3*e.end,e.endTime=Ar(e.endTimestamp)),e.duration=e.end-e.start,s+=e.duration})),this._totalDuration=s,this.player.debug.log("Playback",this.playbackList),this.playbackList.length>0){const e=this.playbackList[0].startTimestamp;this._playbackListStartTimestamp=e;let t=e;i&&(10===zr(i)&&(i*=1e3),this._isTimeInPlaybackList(i)&&(t=i)),this.setStartTime(t)}const r=t||ti;this.setShowPrecision(r)}get totalDuration(){return(this._totalDuration||0)/1e3}get startTime(){return this._startTime||0}setStartTime(e){this._startTime=e,this._playingTimestamp=e,this._playStartTime=null}setRate(e){this._rate=e,this.player.emit(Xe.playbackRateChange,e)}get fps(){return this._fps}get rate(){return this._rate}get isUseFpsRender(){return this._isUseFpsRender}get isUseLocalCalculateTime(){return this._isUseLocalCalculateTime}get showPrecision(){return this._showPrecision}get is60Min(){return this.showPrecision===ti}get is30Min(){return this.showPrecision===ii}get is10Min(){return this.showPrecision===si}get is5Min(){return this.showPrecision===ri}get is1Min(){return this.showPrecision===ri}get isPlaybackPauseClearCache(){return this._isPlaybackPauseClearCache}get isCacheBeforeDecodeForFpsRender(){return this._isCacheBeforeDecodeForFpsRender}setShowPrecision(e){oi.includes(e)||(this.player.debug.warn("Playback","setShowPrecision()","type is not in PLAYBACK_CONTROL_TIME_PRECISION_ARRAY",e),e=ti),this._showPrecision&&this._showPrecision===e||(this._showPrecision=e,this.player.emit(Xe.playbackPrecision,this._showPrecision,this.playbackList),this.player.emit(Xe.playbackShowPrecisionChange,this._showPrecision))}setPlayingTimestamp(e){let t;if(this.controlType===J.normal){t=this.startTime+e,this._playingTimestamp=t,this.player.emit(Xe.playbackTime,t);const i=new Date(t);this.player.emit(Xe.playbackTimestamp,{ts:t,hour:i.getHours(),min:i.getMinutes(),second:i.getSeconds()})}else this.controlType===J.simple&&(t=this.startTime+Math.round(e/1e3),t>this.totalDuration&&(this.player.debug.log("Playback","setPlayingTimestamp()",`timestamp ${t} > this.totalDuration ${this.totalDuration}`),t=this.totalDuration),this._playingTimestamp=t,this.player.emit(Xe.playbackTime,t),this.player.emit(Xe.playbackTimestamp,{ts:t}))}get playingTimestamp(){return this._playingTimestamp}narrowPrecision(){const e=oi.indexOf(this.showPrecision)-1;if(e>=0){const t=oi[e];this.setShowPrecision(t)}}expandPrecision(){const e=oi.indexOf(this.showPrecision)+1;if(e<=oi.length-1){const t=oi[e];this.setShowPrecision(t)}}seek(e){if(this.player.debug.log("Playback","seek()",e),this.controlType===J.normal){if("true"===e.hasRecord){let t=e.time;"min"===e.type&&(t=60*e.time);let i=function(e){let t={};e>-1&&(t={hour:Math.floor(e/60/60)%60,min:Math.floor(e/60)%60,second:e%60});return t}(t);if(this._playbackListStartTimestamp){const e=new Date(this._playbackListStartTimestamp).setHours(i.hour,i.min,i.second,0);i.timestamp=e;const t=this._findMoreInfoByTimestamp(e);i&&t.more&&(i.more=t.more)}this.player.emit(Xe.playbackSeek,i)}}else if(this.controlType===J.simple){let t=e.time;this.player.emit(Xe.playbackSeek,{ts:t})}}currentTimeScroll(){this.player.emit(Xe.playbackTimeScroll)}_findMoreInfoByTimestamp(e){let t=null;return this.playbackList.forEach(((i,s)=>{i.startTimestamp<=e&&i.endTimestamp>=e&&(t=i)})),t}_isTimeInPlaybackList(e){let t=!1;return this.playbackList.forEach(((i,s)=>{i.startTimestamp<=e&&i.endTimestamp>=e&&(t=!0)})),t}getControlType(){return this.controlType}isControlTypeNormal(){return this.controlType===J.normal}isControlTypeSimple(){return this.controlType===J.simple}}class uy extends ba{constructor(e){super(),this.player=e,this.TAG_NAME="zoom",this.bindEvents=[],this.isDragging=!1,this.currentZoom=1,this.prevVideoElementStyleTransform=null,this.prevVideoElementStyleScale=null,this.maxScale=5,this.tempPosition={x:0,y:0},this.videoPosition={left:0,top:0};const{events:{proxy:t},debug:i}=this.player;this.player.on(Xe.zooming,(e=>{if(e){this.player.$container.classList.add("jessibuca-zoom-control"),this._bindEvents();const e=this.player.video.$videoElement.style.transform;let t=this.player.video.$videoElement.style.left,i=this.player.video.$videoElement.style.top;t=parseFloat(t),i=parseFloat(i),t&&(this.videoPosition.left=t),i&&(this.videoPosition.top=i),this.prevVideoElementStyleTransform=e;let s=e.match(/scale\([0-9., ]*\)/g);if(s&&s[0]){let e=s[0].replace("scale(","").replace(")","");this.prevVideoElementStyleScale=e.split(",")}}else{this.player.$container.classList.remove("jessibuca-zoom-control"),this._unbindEvents(),this._resetVideoPosition(),this.player.$container.style.cursor="auto";let e=this.prevVideoElementStyleTransform;this.player.video.$videoElement.style.transform=e,this.prevVideoElementStyleTransform=null,this.prevVideoElementStyleScale=null,cr()&&this.player._opt.useWebFullScreen&&this.player.resize()}}));const s=t(window,cr()?"touchend":"mouseup",(e=>{this.handleMouseUp(e)}));this.bindEvents.push(s),e.debug.log("zoom","init")}destroy(){this.bindEvents=[],this.isDragging=!1,this.currentZoom=1,this.prevVideoElementStyleTransform=null,this.prevVideoElementStyleScale=null,this.tempPosition={x:0,y:0},this.videoPosition={left:0,top:0},this.off(),this.player.debug.log("zoom","destroy")}_bindEvents(){const{events:{proxy:e},debug:t}=this.player,i=e(this.player.$container,cr()?"touchmove":"mousemove",(e=>{this.handleMouseMove(e)}));this.bindEvents.push(i);const s=e(this.player.$container,cr()?"touchstart":"mousedown",(e=>{this.handleMouseDown(e)}));this.bindEvents.push(s);const r=e(window,cr()?"touchend":"mouseup",(e=>{this.handleMouseUp(e)}));this.bindEvents.push(r)}_unbindEvents(){this.bindEvents.forEach((e=>{e&&e()}))}handleMouseMove(e){if(e.stopPropagation(),this.isDragging&&this.player.zooming){e.preventDefault();const{posX:t,posY:i}=qr(e),s=this.tempPosition.x-t,r=this.tempPosition.y-i;this.videoPosition.left=this.videoPosition.left-s,this.videoPosition.top=this.videoPosition.top-r,this.tempPosition.x=t,this.tempPosition.y=i,this.updateVideoPosition()}}handleMouseDown(e){e.stopPropagation();const t=$r(e);if(this.player.zooming&&(t.matches("video")||t.matches("canvas"))){e.preventDefault();const{posX:t,posY:i}=qr(e);this.player.$container.style.cursor="grabbing",this.tempPosition.x=t,this.tempPosition.y=i,this.isDragging=!0,this.player.debug.log("zoom","handleMouseDown is dragging true")}}handleMouseUp(e){e.stopPropagation(),this.isDragging&&this.player.zooming&&(e.preventDefault(),this.tempPosition={x:0,y:0},this.isDragging=!1,this.player.$container.style.cursor="grab",this.player.debug.log("zoom","handleMouseUp is dragging false"))}updateVideoPosition(){const e=this.player.video.$videoElement;e.style.left=this.videoPosition.left+"px",e.style.top=this.videoPosition.top+"px"}_resetVideoPosition(){this.player.resize(),this.tempPosition={x:0,y:0},this.videoPosition={left:0,top:0},this.currentZoom=1,this.isDragging=!1}narrowPrecision(){this.currentZoom<=1||(this.currentZoom-=1,this.updateVideoElementScale())}expandPrecision(){this.currentZoom>=this.maxScale||(this.currentZoom+=1,this.updateVideoElementScale())}updatePrevVideoElementStyleScale(e){this.prevVideoElementStyleScale=e}updateVideoElementScale(){const e=this.player.video.$videoElement;let t=e.style.transform,i=1,s=1;if(this.prevVideoElementStyleScale){const e=this.prevVideoElementStyleScale[0];void 0!==e&&(i=e,s=e);const t=this.prevVideoElementStyleScale[1];void 0!==t&&(s=t)}s=vr(s),i=vr(i);const r=.5*i*(this.currentZoom-1)+i,a=.5*s*(this.currentZoom-1)+s;let o;o=-1===t.indexOf("scale(")?t+` scale(${r},${a})`:t.replace(/scale\([0-9., ]*\)/,`scale(${r},${a})`),this.player.debug.log("zoom",`updateVideoElementScale end is ${r}, ${a} style is ${o}`),e.style.transform=o}}class py extends ba{constructor(e){super(),this.player=e,this.faceDetector=null,this.objectDetector=null,this.imageDetector=null,this.occlusionDetector=null,this.initFaceDetector(),this.initObjectDetector(),this.initImageDetector(),this.initOcclusionDetector();let t="init";this.faceDetector&&(t+=" and use faceDetector"),this.objectDetector&&(t+=" and use objectDetector"),this.imageDetector&&(t+=" and use imageDetector"),this.occlusionDetector&&(t+=" and use occlusionDetector"),this.player.debug.log("AiLoader",t)}destroy(){this.off(),this.faceDetector&&(this.faceDetector.destroy(),this.faceDetector=null),this.objectDetector&&(this.objectDetector.destroy(),this.objectDetector=null),this.imageDetector&&(this.imageDetector.destroy(),this.imageDetector=null),this.occlusionDetector&&(this.occlusionDetector.destroy(),this.occlusionDetector=null),this.player.debug.log("AiLoader","destroy")}initFaceDetector(){if(this.player._opt.useFaceDetector&&window.JessibucaProFaceDetector){const e=new JessibucaProFaceDetector({detectWidth:this.player._opt.aiFaceDetectWidth,showRect:!1,debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init face detector success"),this.faceDetector=e,this.faceDetector.on("jessibuca-pro-face-detector-info",(e=>{if(this.player.emit(Xe.aiFaceDetectorInfo,e),this.player._opt.aiFaceDetectShowRect){const t=this.player._opt.aiFaceDetectRectConfig||{},i=(e.list||[]).map((e=>(e.type="rect",e.color=t.borderColor||"#0000FF",e.lineWidth=t.borderWidth||2,e)));this.player.video&&this.player.video.addAiContentToCanvas(i)}}))}))}}initObjectDetector(){if(this.player._opt.useObjectDetector&&window.JessibucaProObjectDetector){const e=new JessibucaProObjectDetector({detectWidth:this.player._opt.aiObjectDetectWidth,showRect:!1,debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init object detector success"),this.objectDetector=e,this.objectDetector.on("jessibuca-pro-object-detector-info",(e=>{if(this.player.emit(Xe.aiObjectDetectorInfo,e),this.player._opt.aiObjectDetectShowRect){const t=[],i=this.player._opt.aiObjectDetectRectConfig||{};(e.list||[]).forEach((e=>{const s={type:"rect",color:i.borderColor||"#0000FF",lineWidth:i.borderWidth||2,x:e.rect.x,y:e.rect.y,width:e.rect.width,height:e.rect.height},r={type:"text",color:i.color||"#000",fontSize:i.fontSize||14,text:e.zh,x:e.rect.x,y:e.rect.y-25};t.push(s,r)})),this.player.video&&this.player.video.addAiContentToCanvas(t)}}))}))}}initImageDetector(){if(this.player._opt.useImageDetector&&window.JessibucaProImageDetector){const e=new JessibucaProImageDetector({debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init image detector success"),this.imageDetector=e}))}}initOcclusionDetector(){if(this.player._opt.useOcclusionDetector&&window.JessibucaProOcclusionDetector){const e=new JessibucaProOcclusionDetector({debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid});e.load().then((()=>{this.player.debug.log("AiLoader","init occlusion detector success"),this.occlusionDetector=e}))}}updateFaceDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.faceDetector&&this.faceDetector.updateConfig(e)}updateObjectDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.objectDetector&&this.objectDetector.updateConfig(e)}updateImageDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.imageDetector&&this.imageDetector.updateConfig(e)}updateOcclusionDetectorConfig(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.occlusionDetector&&this.occlusionDetector.updateConfig(e)}}class fy extends ba{constructor(e){super(),this.player=e,this.LOG_NAME="Contextmenu",this.menuList=[],this.$contextmenus=e.control.$contextmenus,cr()?this.player.debug.warn(this.LOG_NAME,"not support mobile"):this.init(),e.debug.log(this.LOG_NAME,"init")}destroy(){this.menuList=[],this.player.debug.log(this.LOG_NAME,"destroy")}get isShow(){return e=this.player.$container,t="jessibuca-contextmenus-show",e.classList.contains(t);var e,t}show(){var e,t;e=this.player.$container,t="jessibuca-contextmenus-show",e.classList.add(t)}hide(){var e,t;e=this.player.$container,t="jessibuca-contextmenus-show",e.classList.remove(t)}init(){const{events:{proxy:e},debug:t}=this.player;this.player._opt.contextmenuBtns.length>0&&this.player._opt.contextmenuBtns.forEach((e=>{this.addMenuItem(e)})),e(this.player.$container,"contextmenu",(e=>{e.preventDefault(),this.show();const t=e.clientX,i=e.clientY,{height:s,width:r,left:a,top:o}=this.player.$container.getBoundingClientRect(),{height:n,width:l}=this.$contextmenus.getBoundingClientRect();let h=t-a,d=i-o;t+l>a+r&&(h=r-l),i+n>o+s&&(d=s-n),ar(this.$contextmenus,{left:`${h}px`,top:`${d}px`})})),e(this.player.$container,"click",(e=>{th(e,this.$contextmenus)||this.hide()})),this.player.on(Xe.blur,(()=>{this.hide()}))}_validateMenuItem(e){let t=!0;return e.content||(this.player.debug.warn(this.LOG_NAME,"content is required"),t=!1),t}addMenuItem(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=aa(as);if(e=Object.assign({},t,e),!this._validateMenuItem(e))return;const{events:{proxy:i},debug:s}=this.player,r=_r(),a=`\n
\n ${e.content}\n
\n `,o=Array.from(this.$contextmenus.children)[e.index];o?o.insertAdjacentHTML("beforebegin",a):Zl(this.$contextmenus,a);const n=this.$contextmenus.querySelector(`.jessibuca-contextmenu-${r}`);e.click&&i(n,"click",(t=>{t.preventDefault(),e.click.call(this.player,this,t),this.hide()})),this.menuList.push({uuid:r,$menuItem:n})}}class my extends ly{constructor(e){super(e),this.TAG_NAME="WebrtcForSRSDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/sdp"},body:t})}(e,r.sdp).then((e=>{this.player.debug.log(this.TAG_NAME,`getWebRtcRemoteSdp response and code is ${e.code}`);const r=e;if(0!==r.code)return i(r.msg);s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:r})).then((()=>{t()})).catch((e=>{i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class gy extends ly{constructor(e){super(e),this.TAG_NAME="WebrtcForOthersDecoder",this.player.debug.log(this.TAG_NAME,"init")}destroy(){super.destroy(),this.player.debug.log(this.TAG_NAME,"destroy")}loadSource(e){return new Promise(((t,i)=>{const s=this.rtcPeerConnection;s.createOffer().then((r=>{s.setLocalDescription(r),this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp loadSource"),function(e,t){return fetch(e,{method:"POST",mode:"cors",cache:"no-cache",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/sdp"},body:t})}(e,r.sdp).then((e=>{this.player.debug.log(this.TAG_NAME,`getWebRtcRemoteSdp response and code is ${e.code}`),e.text().then((e=>{this.player.debug.log(this.TAG_NAME,"getWebRtcRemoteSdp response"),s.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:e})).then((()=>{t()})).catch((e=>{i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource response.text() error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",e),i(e)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource rtcPeerConnection.createOffer() error",e),i(e)}))}))}}class yy extends ba{constructor(e){if(super(),this.TAG_NAME="AliyunRtc",this.player=e,!window.AliRTS)throw new Error("AliyunRtc is not defined");this.aliyunRtc=window.AliRTS.createClient(),this.aliyunRtcRemoteStream=null,this.$videoElement=this.player.video.$videoElement,this.listenEvents(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.aliyunRtc&&(this.aliyunRtcRemoteStream&&(this.aliyunRtcRemoteStream=null),this.aliyunRtc.unsubscribe(),this.aliyunRtc=null),this.off(),this.player.debug.log(this.TAG_NAME,"destroy")}listenEvents(){this.aliyunRtc.on("onError",(e=>{if(this.player.debug.error(this.TAG_NAME,`onError and code is ${e.errorCode} and message: ${e.message}`),10410===e.errorCode)this.player.debug.log(this.TAG_NAME,"onError and code is 10410 and message: ",e.message,"and emit aliyunRtcError"),this.player.emit(tt.aliyunRtcError,e)})),this.aliyunRtc.on("reconnect",(e=>{this.player.debug.log(this.TAG_NAME,"reconnect",e)}));const e="canplay",t="waiting",i="playing",s="media";this.aliyunRtc.on("onPlayEvent",(r=>{if(r.event===e)this.player.debug.log(this.TAG_NAME,"onPlayEvent and canplay");else if(r.event===t)this.player.debug.log(this.TAG_NAME,"onPlayEvent and playing - > waiting");else if(r.event===i)this.player.debug.log(this.TAG_NAME,"onPlayEvent and waiting -> playing");else if(r.event===s){const e=r.data;let t={},i=0;if(e.audio){const s=parseInt(e.audio.bytesReceivedPerSecond,10);i+=s,t.abps=s}if(e.video){const s=parseInt(e.video.bytesReceivedPerSecond,10);i+=s,t.vbps=s}this.player.updateStats(t),this.player.emit(Xe.kBps,(i/1024).toFixed(2))}}))}loadSource(e){return new Promise(((t,i)=>{this.aliyunRtc.isSupport({isReceiveVideo:!0}).then((()=>{this.aliyunRtc.subscribe(e,{}).then((e=>{this.aliyunRtcRemoteStream=e,e.play(this.$videoElement),t()})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource and subscribe is not success: ",e.message),i(e.message)}))})).catch((e=>{this.player.debug.error(this.TAG_NAME,"loadSource and is not support: ",e.message),i(e.message)}))}))}getVideoCurrentTime(){let e=0;return this.$videoElement&&(e=this.$videoElement.currentTime),e}}class Ay{constructor(e){this.player=e,this.TAG_NAME="PressureObserverCpu",this.observer=null,this.latestCpuInfo=null,this.currentLevel=-1,this._init(),this.player.debug.log(this.TAG_NAME,"init")}destroy(){this.observer&&(this.observer.disconnect(),this.observer=null),this.latestCpuInfo=null,this.currentLevel=-1,this.player.debug.log(this.TAG_NAME,"destroy")}getCurrentCpuState(){return this.currentLevel}_init(){da(ya())?this.player.debug.log(this.TAG_NAME,"not support PressureObserver"):(this.observer=new PressureObserver((e=>{const t=(e||[]).find((e=>"cpu"===e.source));if(t){switch(this.latestCpuInfo=t,t.state){case"nominal":this.currentLevel=0;break;case"fair":this.currentLevel=1;break;case"serious":this.currentLevel=2;break;case"critical":this.currentLevel=3;break;default:this.currentLevel=-1}this.player.emit(Xe.pressureObserverCpu,this.currentLevel)}})),this.observer&&this.observer.observe("cpu"))}}class by extends xa{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.TAG_NAME="DynamicWatermark",this.isPauseAnimation=!1,this.isStopAnimation=!1,this.rafID=null,this.speed=t.speed||.2,this.isDynamic=!0,this.shadowRootDynamicDom=null,this.isGhost=!0===t.isGhost,this.ghostConfig={on:t.on||5,off:t.off||5},this.waterMarkWillRemove=!1,this.waterMarkWillAdd=!1,this.player.once(Xe.start,(()=>{const e=da(dr)?decodeURIComponent("JessibucaPro%20%E4%BD%93%E9%AA%8C"):t.content;let i=this.player.getVideoInfo();i||(i={width:200,height:200}),this.update({text:{content:e,fontSize:t.fontSize||18,color:t.color||"white"},left:i.width*Math.random(),top:i.height*Math.random(),opacity:t.opacity||.15}),this.startAnimation()})),this.player.debug.log(this.TAG_NAME,"int")}destroy(){super.destroy(),this.rafID&&(cancelAnimationFrame(this.rafID),this.rafID=null)}startAnimation(){if(!this.rafID){let e=1,t=1,i=Math.random(),s={width:0,height:0};const r=()=>{try{if(da(this.isPauseAnimation)&&this.shadowRootDynamicDom&&this.shadowRootInnerDom){const a=this.shadowRootInnerDom,o=this.shadowRootDynamicDom,n=a.getBoundingClientRect(),l=o.getBoundingClientRect();if(l.width&&l.height&&(s.width=l.width,s.height=l.height),!this.shadowRootInnerDom.contains(this.shadowRootDynamicDom))return this.isGhost?da(this.waterMarkWillAdd)&&(this.waterMarkWillAdd=!0,setTimeout((()=>{this._addDom(n,s),this.waterMarkWillAdd=!1}),1e3*this.ghostConfig.off)):this._addDom(n,s),void(0!==this.speed&&requestAnimationFrame(r));const h=Math.min(1,0===this.speed?0:this.speed?this.speed:.2);let d=l.left-n.left,c=l.top-n.top;d+=h*t*i,c+=h*e*(1-i),d+s.width>n.width?(t=-1,i=Math.random()):d<0&&(t=1,i=Math.random()),c+s.height>n.height?(e=-1,i=Math.random()):c<0&&(e=1,i=Math.random()),d=Math.min(n.width-s.width,d),c=Math.min(n.height-s.height,c);const u=d/n.width*100,p=c/n.height*100;this.shadowRootDynamicDom.style.left=`${u}%`,this.shadowRootDynamicDom.style.top=`${p}%`,da(this.waterMarkWillRemove)&&this.isGhost&&(this.waterMarkWillRemove=!0,setTimeout((()=>{this._removeDom(),this.waterMarkWillRemove=!1}),1e3*this.ghostConfig.on))}}catch(e){}if(this.isStopAnimation)return this.isStopAnimation=!1,cancelAnimationFrame(this.rafID),void(this.rafID=null);0!==this.speed&&requestAnimationFrame(r)};this.rafID=requestAnimationFrame(r)}}_addDom(e,t){if(this.shadowRootInnerDom&&this.shadowRootDynamicDom){this.shadowRootInnerDom.appendChild(this.shadowRootDynamicDom);let i=e.width*Math.random(),s=e.height*Math.random();i=Math.min(e.width-2*t.width,i),s=Math.min(e.height-2*t.height,s),this.shadowRootDynamicDom.style.left=`${i}px`,this.shadowRootDynamicDom.style.top=`${s}px`}}resumeAnimation(){this.isPauseAnimation=!1}pauseAnimation(){this.isPauseAnimation=!0}stopAnimation(){this.isStopAnimation=!0}}class vy extends ba{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this._opt={},this.TAG_NAME="Player",this.$container=e;const i=na();if(this._opt=Object.assign({},i,t),this.debug=new Us(this),this._opt.forceNoOffscreen=!0,this._canPlayAppleMpegurl=!1,(yr()||gr())&&(this._canPlayAppleMpegurl=Yr(),this.debug.log(this.TAG_NAME,"isIOS or isSafari and canPlayAppleMpegurl",this._canPlayAppleMpegurl)),cr()&&(this._opt.controlAutoHide=!1),ua()&&(this.debug.log(this.TAG_NAME,"isIphone and set _opt.videoRenderSupportScale false"),this._opt.videoRenderSupportScale=!1),da(this._opt.playFailedAndReplay)&&(this.debug.log(this.TAG_NAME,"_opt.playFailedAndReplay is false and set others replay params false"),this._opt.webglAlignmentErrorReplay=!1,this._opt.webglContextLostErrorReplay=!1,this._opt.autoWasm=!1,this._opt.mseDecodeErrorReplay=!1,this._opt.mediaSourceTsIsMaxDiffReplay=!1,this._opt.wcsDecodeErrorReplay=!1,this._opt.wasmDecodeErrorReplay=!1,this._opt.simdDecodeErrorReplay=!1,this._opt.videoElementPlayingFailedReplay=!1,this._opt.networkDelayTimeoutReplay=!1,this._opt.widthOrHeightChangeReplay=!1,this._opt.simdH264DecodeVideoWidthIsTooLargeReplay=!1,this._opt.mediaSourceUseCanvasRenderPlayFailedReplay=!1,this._opt.heartTimeoutReplay=!1,this._opt.loadingTimeoutReplay=!1),this._opt.watermarkConfig={image:{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAS4AAABgCAYAAACjZZ/rAAAK4mlDQ1BJQ0MgUHJvZmlsZQAASImVlwdUU1kagO976SEhkIQISAm9SW8BpIQeivQqKiEJJJQQE4KCDZXBERwVRESwDOCoiIKjIyBjQSxYUWzYB2RQUNbBgg2VfcASZmbP7p7937nvfufPf/9yz705/wOAHMKVSDJhFQCyxDnSyABvZnxCIhP3DOAAA9CBA7Dm8mQSdnh4CEBkev6rvL8LoIn5luWEr3///b8KlS+Q8QCAkhBO4ct4WQi3I2OEJ5HmAIA6jOgNluRIJvg2wnQpkiDCgxOcNsVfJjhlktEqkzbRkT4IGwKAJ3G50jQASDaInpnLS0P8kMIRthHzRWKECxD24Am5fISRuGBOVlb2BA8jbIrYSwAg0xFmpfzJZ9pf/Kco/HO5aQqeqmtS8L4imSSTm/d/bs3/lqxM+XQMY2SQhNLASGRWR/bvXkZ2sILFKfPCplnEn7SfZKE8MGaaeTKfxGnmc32DFWsz54VMc6rIn6Pwk8OJnmaBzC9qmqXZkYpYqVIf9jRzpTNx5RkxCr1QwFH4zxdGx01zrih23jTLMqKCZ2x8FHqpPFKRv0Ac4D0T119Re5bsT/WKOIq1OcLoQEXt3Jn8BWL2jE9ZvCI3vsDXb8YmRmEvyfFWxJJkhivsBZkBCr0sN0qxNgc5nDNrwxV7mM4NCp9m4Av8QAjyMEEMsAPOwBawQAQIzREszZkoxidbkicVpQlzmGzkxgmYHDHPag7TzsbODoCJ+zt1JN5GTt5LiHFqRpe9BznK75E7UzqjSykHoKUICf1gRme4CwBKIQDNHTy5NHdKh554YQARUJB/Bg2gAwyAKbBE8nMCbsALyTgIhIFokAAWAh4QgiwgBUvAcrAaFIESsBlsBVVgN6gD+8EhcAS0gBPgDLgAroAb4A54CHrBAHgJRsB7MAZBEA4iQzRIA9KFjCALyA5iQR6QHxQCRUIJUDKUBokhObQcWguVQGVQFVQD1UM/Q8ehM9AlqBu6D/VBQ9Ab6DOMgkkwHdaGjWFrmAWz4WA4Gl4Ap8GL4Xy4EN4IV8K18EG4GT4DX4HvwL3wS3gUBVBKKAZKD2WJYqF8UGGoRFQqSopaiSpGVaBqUY2oNlQn6haqFzWM+oTGomloJtoS7YYORMegeejF6JXoDegq9H50M/oc+ha6Dz2C/oYhY7QwFhhXDAcTj0nDLMEUYSowezHHMOcxdzADmPdYLJaBNcE6YwOxCdh07DLsBuxObBO2HduN7ceO4nA4DZwFzh0XhuPicnBFuO24g7jTuJu4AdxHvBJeF2+H98cn4sX4NfgK/AH8KfxN/HP8GEGFYERwJYQR+IQ8wibCHkIb4TphgDBGVCWaEN2J0cR04mpiJbGReJ74iPhWSUlJX8lFKUJJpFSgVKl0WOmiUp/SJxKVZE7yISWR5KSNpH2kdtJ90lsymWxM9iInknPIG8n15LPkJ+SPyjRlK2WOMl95lXK1crPyTeVXFALFiMKmLKTkUyooRynXKcMqBBVjFR8VrspKlWqV4yo9KqOqNFVb1TDVLNUNqgdUL6kOUnFUY6oflU8tpNZRz1L7aSiaAc2HxqOtpe2hnacN0LF0EzqHnk4voR+id9FH1KhqDmqxakvVqtVOqvUyUAxjBoeRydjEOMK4y/g8S3sWe5Zg1vpZjbNuzvqgPlvdS12gXqzepH5H/bMGU8NPI0OjVKNF47EmWtNcM0JzieYuzfOaw7Pps91m82YXzz4y+4EWrGWuFam1TKtO66rWqLaOdoC2RHu79lntYR2GjpdOuk65zimdIV2aroeuSLdc97TuC6Yak83MZFYyzzFH9LT0AvXkejV6XXpj+ib6Mfpr9Jv0HxsQDVgGqQblBh0GI4a6hqGGyw0bDB8YEYxYRkKjbUadRh+MTYzjjNcZtxgPmqibcEzyTRpMHpmSTT1NF5vWmt42w5qxzDLMdprdMIfNHc2F5tXm1y1gCycLkcVOi+45mDkuc8Rzauf0WJIs2Za5lg2WfVYMqxCrNVYtVq+sDa0TrUutO62/2TjaZNrssXloS7UNsl1j22b7xs7cjmdXbXfbnmzvb7/KvtX+tYOFg8Bhl8M9R5pjqOM6xw7Hr07OTlKnRqchZ0PnZOcdzj0sOiuctYF10QXj4u2yyuWEyydXJ9cc1yOuf7hZumW4HXAbnGsyVzB3z9x+d313rnuNe68H0yPZ40ePXk89T65nredTLwMvvtder+dsM3Y6+yD7lbeNt9T7mPcHH1efFT7tvijfAN9i3y4/ql+MX5XfE399/zT/Bv+RAMeAZQHtgZjA4MDSwB6ONofHqeeMBDkHrQg6F0wKjgquCn4aYh4iDWkLhUODQreEPppnNE88ryUMhHHCtoQ9DjcJXxz+awQ2IjyiOuJZpG3k8sjOKFrUoqgDUe+jvaM3RT+MMY2Rx3TEUmKTYutjP8T5xpXF9cZbx6+Iv5KgmSBKaE3EJcYm7k0cne83f+v8gSTHpKKkuwtMFixdcGmh5sLMhScXURZxFx1NxiTHJR9I/sIN49ZyR1M4KTtSRng+vG28l3wvfjl/SOAuKBM8T3VPLUsdTHNP25I2JPQUVgiHRT6iKtHr9MD03ekfMsIy9mWMZ8ZlNmXhs5Kzjoup4gzxuWyd7KXZ3RILSZGkd7Hr4q2LR6TB0r0ySLZA1ppDRxqlq3JT+XfyvlyP3Orcj0tilxxdqrpUvPRqnnne+rzn+f75Py1DL+Mt61iut3z18r4V7BU1K6GVKSs7VhmsKlw1UBBQsH81cXXG6mtrbNaUrXm3Nm5tW6F2YUFh/3cB3zUUKRdJi3rWua3b/T36e9H3Xevt129f/62YX3y5xKakouTLBt6Gyz/Y/lD5w/jG1I1dm5w27dqM3SzefLfUs3R/mWpZfln/ltAtzeXM8uLyd1sXbb1U4VCxextxm3xbb2VIZet2w+2bt3+pElbdqfaubtqhtWP9jg87+Ttv7vLa1bhbe3fJ7s8/in68VxNQ01xrXFtRh63LrXu2J3ZP50+sn+r3au4t2ft1n3hf7/7I/efqnevrD2gd2NQAN8gbhg4mHbxxyPdQa6NlY00To6nkMDgsP/zi5+Sf7x4JPtJxlHW08RejX3Ycox0rboaa85pHWoQtva0Jrd3Hg453tLm1HfvV6td9J/ROVJ9UO7npFPFU4anx0/mnR9sl7cNn0s70dyzqeHg2/uztcxHnus4Hn794wf/C2U525+mL7hdPXHK9dPwy63LLFacrzVcdrx675njtWJdTV/N15+utN1xutHXP7T510/PmmVu+ty7c5ty+cmfene67MXfv9ST19N7j3xu8n3n/9YPcB2MPCx5hHhU/Vnlc8UTrSe1vZr819Tr1nuzz7bv6NOrpw35e/8vfZb9/GSh8Rn5W8Vz3ef2g3eCJIf+hGy/mvxh4KXk5Nlz0D9V/7Hhl+uqXP7z+uDoSPzLwWvp6/M2Gtxpv971zeNcxGj765H3W+7EPxR81Pu7/xPrU+Tnu8/OxJV9wXyq/mn1t+xb87dF41vi4hCvlTrYCKGTAqakAvNmH9McJANBuAECcP9VfTwo09U0wSeA/8VQPPilOANT1ABC9DICQawBsr0JaWsQ/BfkuCKcgejcA29srxr9ElmpvN+WL5Im0Jo/Hx9+aAoArBeBr6fj4WN34+Nc6JNmHALTnTfX1E6JyEIAacxtH+5D7VPMC8DeZ6vn/VOPfZzCRgQP4+/xPeFgcU9phDh8AAABsZVhJZk1NACoAAAAIAAQBGgAFAAAAAQAAAD4BGwAFAAAAAQAAAEYBKAADAAAAAQACAACHaQAEAAAAAQAAAE4AAAAAAAAAkAAAAAEAAACQAAAAAQACoAIABAAAAAEAAAEuoAMABAAAAAEAAABgAAAAADApncsAAAAJcEhZcwAAFiUAABYlAUlSJPAAAB1BSURBVHgB7V0HeBTVFj6b3fRCAgSQ3qSKIuoDRESx8OzloaIIiqhYUIEHiIJIU6QpVkRRwMaTp4INBBsoRZQiIFhACL1DQtpusuWdf8IsM7Ozu0nYDQzvnO/bzMyd2+a/N/+ce+65d2w+FhIRBAQBQcBCCMRYqK5SVUFAEBAEFASEuKQjCAKCgOUQEOKyXJNJhQUBQUCIS/qAICAIWA4BIS7LNZlUWBAQBIS4pA8IAoKA5RAQ4rJck0mFBQFBQIhL+oAgIAhYDgEhLss1mVRYEBAEhLikDwgCgoDlEBDislyTSYUFAUFAiEv6gCAgCFgOASEuyzWZVFgQEASEuKQPCAKCgOUQEOKyXJNJhQUBQUCIS/qAICAIWA4BIS7LNZlUWBAQBIS4pA8IAoKA5RAQ4rJck0mFBQFBQIhL+oAgIAhYDgEhLss1mVRYEBAEhLikDwgCgoDlEBDislyTSYUFAUFAiEv6gCAgCFgOASEuyzWZVFgQEASEuKQPCAKCgOUQEOKyXJNJhQUBQcBxqkDgK8gmT+5+Ik8RuTYvJtefC6l430YiO9fQxj+mWHvluhTX4GJKaNKFYhLSKSaRf8nV+L7w76nSjlIPQaAiELD5WCqioGBlFGetJOfGb8nNJFW07RciX3EJUamEpR7BTfgdIzGcO6o1pbja7Siu1gUU37BLsCIkXBAQBE4zBE4qcR2adDV5cnYxVxWUkJKWnFTCUo/ae+r5saMtLoHsabUordMzFFvjvNOsieRxBAFBwIhAhROXz5VPBd+/SfmLppHP42LC8lGMzcOjPS/5mIhsdi+H8bmdL2LwYyUsxkY+W2yJtqXRuBQNjO9rNbHElt0piX+O9DONzyrX/0cIbNuxm5yuImrcoA7Z7Xj7iZxOCFQocRVvX0f5C14h18bvFdtVrLeQSctNNlsx2RwgK4bWwSNXPvrY+uaz8zkfvUxiIC6fL5a8nqQSolIJSz1qCM2eXo/SLhxJcTU7nE5tJc9SCgQKCp3Ub9hztHzlWiV2g7q16OWxQ6le7TN0qQ8dyaZNW7bpwtIrpVGzxg10YXJxaiJQYcTlWruQjr4/mLxF+WRnO1a8O5e1K59CVipBBSMukBgnUjQyctjI40xnEovTE5iGuFRNLLXdcEpqdicnxk1ryr4Dh2jjn3/rKp+YGE/tzjtHFyYXJQhMmjKTZvxnrg6O885pSTNeGqMLm//tEho8apIu7KK2bWjK+Kd0YXJxaiIASoi6OFfNY9J6nMhdSHFuF8V62KYFzapc4iN78mHyulOYBJM5h+CklLvqObaf5VByy/uZ5JjoLCi/rPmNnnhmsq7mdWrWoHmzpujC5KIEgdXreCbaIGs3/MEvOh9r9sH7iiGJXJ7iCGCgFVVxrf2ajr43hMhVQPGF+RTHx0iILSGPbMk5nFUIAmTXivyNb5Nrz5JIFCl5WACB2mdUD6hlzerVhLQCULF2QFSJy5t7iPK/eZt8RYUU73KSw10UHi28FRPSKCa1JtmrNKH4s3tRUscxFN+sO9krNWK/rZqsrSUq+djinGRLyg2Zp68ol7IX9yFPwb6Q8eTm6YHAQ/fcThlsq1IlNtZBg/r2Ui/leJogENWhYt6ciVS8eSVrWYUUW+xSDO6hcLMlVaa49veQo3FnctRtx1FNVHufh1xbPqaiXQvIuX022RLz2XDP1nwnho3B5ch3d1LGJdPInlIveCS5Y3kEYISfM/NFgg3LxbOKl3S4gBrVr2P555IH0CMQNeJy78uiwmUfM2k5FW1L8YDXl627sjfqRAk3jCM7O5WGFCap+Ea3Uly9aym+8W2Us+QORevyFUELC65AevK2k2vvckpqLMQVEt/T4GaVjHS6s+u1p8GTyCMEQyD4f3qwFKUI97F2dWRsV7J5veQoYk/4MGKvfS4l3zc3PGlp8rE5ktjd4UpKa/8G2eIqkS0t21RB8yfxeSl39Qj2HSv0B8mJICAIWBOBqGhczhWfk4+N8Ha3mxzF7pBDxNhzb6aEnm+WG734OjdTWoydcpb3YNsX29A8IWYPeZiZt34SpbYeVu7yrJgwNy+fdu7ZR3v2HqD8wkKqnlmFzqieSbVqVGMf3/K/u5xOF/35dxYdPpJD2UdzKSU5iapkVKKGPDRLT0stF1TRyLNcFTmWyOv10a69+2jrtl38fIlUu2Z1yqxS+ZQ29hcVF9PuPftp74GDtO/AYUpMiKeqVTKobq0zqGrl9HLDgZnZv7N2cL6H6Eh2DhtybFSZ27ta1crKcLwiZ20jTlw+1mzcO34nn7uY7EXukCDFZDaiuC7sJmFmywqZUn8zvtYNlNZ2KuUsGsTEpb9nvCrY9M7/BXGhky395Vea9cmXtGTFasI/oFHQ4bped6Xyy+SOXVpZ+vMaev/jL+nn1evIZaJRx/BKh3NaNqV/XXMFXdflUiZHE1ulobBI5Tn70wU04bXputxv/GdnGtqfXWLKIAcPZ9Pz7BO2cPEyxVamTVqtahXqeet1Cm7JSSUTRdr76vnAERNp8fKV6qVyHDnoIbr68ot1YcaLT7/6nsa8MFUXfPnF7Wjs0H66MOPF739toY++WEhffv0D5RcEjixALGiXa6/sRF2vvaLUKwqwCmHa+5/QDz+tVF5SxnJxDUK8pMM/6L4eXakmvxSjLREnLu/BXeRa841S74RCNsiHWG1hb345xVSPzNIcR/q55Khcm9x7DoXBzEcuNuzH1zp9F2VDw8I/zTImrlCy/+Bhem36f2j6rLk0dthjdFlHTIgEF/wzPDFmMn2/9OfgkfgOSHLN+j+U3wdz5tGLY4ZQjWpVTdNEOk+3x03Q2rQCDaQsMu+bH2j081MpL9/cdWf/wUM08bUZCnm/OWkE1avDM90mgnKNdXF7wrxZOR83j1SM6YpMXhBqkR7OE/V576Mv1CDTI15mv/72h/L7+POv6ZknH6UzGwa3+SL+5Knv0szZnxHKCCUg+o8+X0hffL2YBjxwF91+01Whop/wvfKPE4IU7XPmk+fwbnavCnzDG5PEXTvUGFTua0dqM3LUaFmq9M6d80oVz4qRdu87QN0ffDwsaWmfrdDppP5PjVcITBuuPcc/0oODR4UlLW0anMPrv9djwwgd2yjRyNNYRlmvUd+nnnslKGlp89vDWPfo+wRt3rpdG1yh52i7ewc8HZa0jJX6fdMWuvvRYbRl207jLf/10GdfordnzQlLWv4EfII2fXbyGzRn3rfa4IifR5y4irPWK5W0u0MztK1SDbIlpET0gRJq3liq/HxerhsPaU83gaYzZPTztHX7roBHgy0Lw4TrrrzEVJVX3q5vvENmnufIDENDaFFGObdVM+rT8xYa9XhfuvWGLooNyBhn5+59/OZ+xxgclTwDCilDAJZXDXh6Amk1NIfDTkmJCUFzOZJ9lIaPe0XxzA8aKYo3oGmt/HWDaQkYsrVt04qan9nQ9BmO5ubRg4NGBWh3yOyr75bQ5wsXmeabkZ5Gl/KwsGO786iWicMvEo1hjRW2z2hJxIeKzqVzlLrGeEITQ8Jdr0f8meKqdipVnl7nAfK6DvFmhNEfi5eqQhGK9P7HX5iSC1T3rtddQakpx33dtu3cw8O+F2j975v8pYP4ho19mT6ZPpkS2KCrlZkffqq9VM773d+Dene/2R9+09WXKeewVz02dKzO/oV/gn59euqMw9HI01+ZcpxoF11f0am9Yq9p2qi+MoFx4NAR+viLr9nW83GAzQsYQsO4+ZrLy1Fq+ZMAZ9j0jAIj/MjBD9P5rY+PQGCLfO+/n9Or02dRMU+YqQINfdac+dTrdv1Lf8qMD9Uo/iPyGzHwId3QGC+8+Uxyw8a+pMsX5D/7swX0wF23+tNH8iTiGlfR5jVK/Xj1dsh62ng300iLLfa4x3SovD1528hbwMPZ00jcrOFOfWd2wBPdc/tNSqfUkhYiwVHzpWefVGYXtYl27N5L3/64QhtEsIUdyTmqC8Nb9+5uN+jC1IsO/ziXut10tXqpHEGK6zb86Q+LRp7+zE/wpHPHtvT8qMGKpqLOumLyAv+ETw14wDR3aKQVLW+xwdwo8XGxSt21pIU4CMdL5ul/P2hMEjDMhA3POITETPSkEYN0pIWMYPC/+rKOdH+PWwLyXbP+94CwSAVEXOMiNo7C2dQTbg8kdmE4WQJty+M6gh1zThv5iWf4co7m6Z4HuyL069NDF6a9wEzQ+OEDqMfDT2iDlWHCNVccn/mCsd8oCfHxIWelHul9R4ATaFrqcdNANPI01rE81yD0Z554NGjSG/55KWu1vyvalzbSX+wWsnf/waCTENq4kTiHzXDVug0BWQ3u25uaNq4fEK4G3HBVZ8KEiXbHERDVLnaXUYd9aSkpitatpsERbg/4BRO8rF59e5bu9q69+3XXkbyI2v+u1xFGmeMF0CKRQ2DBd0sDMmt//jlh/Y3ObsHrQfltrHVrWPrLGmU4FB9f4hPXoG5tZZipJRsYpqfOnE19ggwFkDbYTCIqGo08AwAoR0D/B3oq/mihkg55pDfNnf9dgNH6x59W0S3XV8xs9XesFUOL1QrWaMLOGE7688sMu45oRTt8hJkg1GyjNp16Dtcao+Tlmc/KGuOV5zpqxOUL49joO/A3UbVG5amzpDFBQGufUW9XYY0KQ7JwUomdRbXx0In38VsYthII/LBghP9h+SpdVq/wG/YLdh3AUAFvXBiBsai5NBKNPEtTbrg4zZuE75P4x67PLhBwxtQK7IYVJVk7Aidg4PhbGsFebpHaz83Lq2NymaCgsVWklK6XlaFGtvgEdj51Kim8TF687Z9p6sKZD1PK+OOGYdNIUQq0J9XkLwRVj1LuJydbGI+NMnLCa8agUl8f5PxU4kKi3nfczG/pDYTpd61k8QwmfMHwi4uNpeZNGlLrs5oRtL3zW5+laHPa+NrzaOSpzb+s5/D8L63zZOMGdQOICzOMFSUHDwe2d+NSEldZ64jZ1kXLfqE/N2cpBIVrkFVePm/DzjvOngyJOHHFt76MnCtLDJXO5ARKLAi0jygPmn+IvHk8s5dSpcKf255Sl0Bep4tgyICtiCMpRr+rNme3oNcnPMW+XKODdlbMJK1lAzx+mDGEVzlm2u7t/i9T+0g08jwRDJqEcMY05ouh1ILv9cPzwxFuA2OZ2muzF1Wkd8GAFj/+len006q12qJPifMwhqiy1zGxY1d/IuwVD60rmLhm3hfsVlTDbXEZvCFqcENjVAuPSua8rXWE/dLMPLxBNLOmTqDu/7pGt+dVsEeCV/y7PAUP4z+m3c0kGnmalVOaMFuIvmpMb7YuT29xMqaI7HWMybdEuRdErBD4cXXtPeCUJC08ZMQ1rpi0qn7wPA4HudlIG1tsrk569/5F3m0rKabe+f40FXFi1ukqotxolYEp+8rplQK808fxjKF2U72ylB/MONuwXm0a8ui9NPChXgRjNNbiQcPasm1HgLFYLW/7rj10V98n6d1Xx5oa7KORp1p2WY5mdsJg6Tdv3RZwC21QUWK2WNpocytvXTb8uVnZLhz2K63AGfcCHv5Ds8N6zdTUZEpj30C42hTw4v1+w8Zpo0f1POLEZUvJ4E0AW/BC641KxV1syAxGXL4c/oTU7AGUNHARO4QE18zCIVC46UNKPPO2cNFO+n34WsFhTyvhjNlGmxLSqrN92nyqVs4IIC6QFmxN0RB04ksv+ofyQ/5Y17du419swF9J8775McDvC64CXy9eTj1uuS5odaKRZ9DCTG7AkxyuAfinDCebtmwPiBLKXUCNXGhYR6mGa4+wL4YT7PZglL+zdhqDynX9xrsf8XpJvW0as88TRwwM8PtTC4DdqyKl/GwRpJb2jOq8zXJ7/13MLuamp8NTzR+mPfHs/o2ODqrC2zuXferUx9vU5K8ZzYurW2mzLMW5eV1KkfCEolx9x4PU5vJbdD/1M1rBMsZyGaOY7eRQnz/DZRSsR6sogWH7wgtaK9rYlx+8xt8zDHQwXrW25GVW2jpFI89wZf+xKStcFMV1xGxWTzuZgUxiecRhFLiRhJOsneGdo/HZNaNsMcxyGu+r1/DhwioA7U9br+W/BNq04O+HrZCCSUWv14w4ceHB4pq3I1usZn0Xk1ZBcjJvsRy8uIIpXaj41w+D4RIQ7snfRQVrx1LeL7wdcxmX7sSwjetkSKvmZwYUiy1nQskqk6/WmPnMYImKUcw6oDEOrjGVjc6MIcJvf2xWlgFp/XqghYBAtT/tej5jnhg6GJeQIM4fm7f6o0YjT3/mJ3DyAq+pNNNytVlOfHV6gEaC+x3btdFGU/Ym0wXwBfANJfCVW/JT6D6B9J0vaqssRdLmhdUNHzEhhRI822P83ckRPOOs/akjAcyMGp8fLxDVOTVY3kZXmWDxIhUe+EqIQM5xZ3WimPRM8hw67uficcRSoT2VkgpzTEvw7PmNCub2I8eqt3nf+YcotsX1HC9QM/J53VS4bhK5smZT0W72UcL3Fcso3uLcMqaITHQscl64aJkus8947yWs8TPTUDC0gv3IKDBoG+ViXvCamJCg63SYDXp52vv0yL3djdH91/A9uvXeAbqZQnTSeR9M8ceZ8OoMxZveH8AnqDMWVgcTh4m2gWUjqkQjTzXvEzlCcxgx/jWCfdBM5n37I/1n7vyAW/BWN2okZkPOFavWKS8Gs5cYMkV7YVPGcIJh6QW8dnDF6vW6qM+9NI1acz8z60+I+PqM2YqHvzYRXEBq8qaSELMF5TADYCiobT9tetgG5zMuFSnBVaATqQVrWFXGLOQPWRxf4oHsvLwMKD8lnWca7ea5sxHfvX0FFXx0F2U/m0HZL9Sm/C96UQFvEJg793o6PK0m/ypTwc/jqWgH2wE85eRd/iDtyZDzeQmOUdBJ7+3/NH224HtF84FrA4zZr7NXuvGDpUgLL/crL7nQmI2yKNpsn3XYK/CBVLO9pRYvW0n38ZYoRl+cbjf+U3E6VQvBDgNGwaJi7FtlJujkM3iPL6PATqJKNPJU8z7RI8gJ37KEsVvVRNBO2OIFpGYmd9x8TUBw+wvM7YsPsUsJXmCq1oo2x44ejzzxrLLgOSCjIAH3sG+dUfCBkP7Dx+sWzyMO9tPC0PCd/35mTEK333x8XSnsp2YE9eQzL5rODGPPt5488WJcyxpQSIQDovol6/yveDO2TyeWfMMCFIkflCibj2J9Lr4sIrutmDcbZIM1c1C4L1l7KY47Ujx/DDaR8+KMjuWZefcy/mxZyfh73zQejqllqeWBJ1HusfCEuldTpbYvckDFC9RzdKBgYmdyD7VpG1wRMKtnJhjedesziLBuziiYeWzBzqFnt2hKBw4dpr/4LYmdLY2CGb73p4zTLXvBP8P1PfqadlzEx0zTua2a01Ee5sDOgs3kjEQJb/P5s1737w4RjTzxLB/wjq9jX5ymeyz4kmG3BK2YfckadsI8fgatDxv+kRP4Z1wHqs0L2hMwM5utvur2B5Qhtja+eo42qVkjkw4dztFpylgvafTCx8tq0shBalL/ceTEKcoGfv4AzQnapk6tGtwWhUyMO023mYGW+Pl7r+ochaH14YVnJphRbNvmbEUDw6aEqv8gNDXjCxAfLVk0d7pZNiccVk6VpXTlJl12FxX9vZKKNi7SJ2CNrNjONjBbPE8m8pepyUUOG4zz+hk3JPL52Pe+OJGN9/yDjQxGfhCQRpxbF1DSWXcqITZHPG+15dLcPbVOBz3ci31j1gVdIhGKtJo0qk/9eYuaYIIZShhR+wwcqXQsbTxMbcO+EsrGgjft1IlP60gLeeCfd9SQR+jhIWMCtnTBLgL4ffjpV9ridOf4B8WWxdop/GjkqSu0HBf4mOw9d9ykaMCqKwAIFr9ggplbDJnNSAtphva7X3HaNUuPMoyTLxfx0qnL2F5Z2lUP6E94Waw22YlBbRuzshEGW+Rr44bpSAvhPW69XlnepbVJIhwCLdTodoF8Xhj9OOM2vCRSBfw1UEBkS4SBPr33CxRbu3mQjG1MVTHkjkkkZ0wV/lUlJ2WS05tJLk8mq9LVeI+fTNawUpjAVLUpMKvcJaPBcMqNytfPCYxgCPHk7yRvYeBsnSFaVC7hTY6tjEOt4DcrGPaxV58bGtDJjHHxRvzwzYnUhjWgsgjWrr31wihTPyvkg6Hd1AnDlQ8jlCVf2GKeHzXIdJ/1aORZlrqZxYX2CI02nJsK0oLoZ77ybFB7EuJc1LYN9eWdMoIRG+KoglnJ0bwzBQYHpRVoOm9NHl2qxdXaPNFP0N5mtjB86GTGy89Q2/PO1iYxPUf5aF+s3axIsY9giWaBNkccxbfqTO79W8hzMKtkyIaWCfcDpSKOegwZn7W2lBoUm9mS1yBWJnf2ZvLk8OyNmsaQh6/oIMVV73DSPg4LzQMfqUjntzXUbdXWwU8bIDCcwpaBoY52W5iAiJoAdKbru1xC0NDgm7SLv/hiJvCbAiGOYW3qwV63cX1SzaL5w2DA7XbjVcpSHgynDmebT7QgAYYp3XjfcWiAzRo38OdhPIl0ntjUzzhTi/WT2LFTKzDCY/JDK3V5iHbtFZ0IQ7+reOH4Tt6bDPuTGVzveLYwnfef6kpjmGTM7EHaPHEO22bLpo2V/Mz8nbDGEx+ZGDf834pDJz56gbWBWgHRdLm0gzbIfw6NtlP78xV3FGhxWWwCCKa544V592030Ghu8+rVjk+W+DM7doI6XdW5IzlZ29zOEzhOl34Ug76DPjyZX8JNGtZXPs7xDu9NrxX0w7u73agNith5VG1c2lrCT+vIy3dS8Q6eBQGRqGSinmuPIBxVwVKP6n3cU881x7ha7Sjj2rf5XizPNi6hnMX9yFvM/1javNT4HJbSaiAlN+2jreJJOcce3TDMlqj1O9gB8oiyrg++Wi2aNqJzecFyad7WoSoPOwSGJHACzWYjM8gQH3jA58lgUyuvYEcJzChl5+QqBJnMn++C9zhIS52lKmve0cizrHXQxsd2P7APwR4It4DaNWsouOEftzyCfLbyzg77+bNhldJSFKzQFiCKSAlsTdvYFwztDTwT4uKUz5PVq13TdGvtcOWCBGETRZ29vLSsfp1aVIdxKC8G4corzf0KIy61MtnT+1LRX0vJV5x3XKNSCUU9asmmlMQFgko6525KbT9UKSp/w9uU9+vzPJXJb4ogeWRes5xi4o8vUVLrKEdBQBA4tRGocOLyuYuoOGsN5cz6N3mPsp1JJSvtsZzEFZOUQZk9f/Yj7tr5PeWtnUzunI16kkT+XF5c9Qspo8NMf3w5EQQEAWsgUOHEpYXFufozyp03lrzObDauu4+TWFmIi4c6MUmVKK5+Z6rUaTQTVOBEac6ygeTau5iLYMc+G6/BOkZccKlIOrMXpbYYzGHlU/21zyPngoAgUDEInFTiUh6RPxVWsGIWf4sxi4p3r6finatLiEUd3qlHVSM7Rjr2Kg0pvkEnsqeeQYln3c58pVliZIKdj73lC7d+wiS5l5z8QVhP4Q6FKG3xaZTS7BFKanC3SSoJEgQEgVMRgZNPXCoqbPTz5rPxL++gEuIpOMhLhrbwcHKXsqNqTEZtcmQ24ZnAkp1LbfGpZE/DFCyYrGwCdwifO4/c/LWfgi1v8Ycz9lHm5YvLlonEFgQEgZOGwKlDXCcNAilYEBAErIYABmAigoAgIAhYCgEhLks1l1RWEBAEgIAQl/QDQUAQsBwCQlyWazKpsCAgCAhxSR8QBAQByyEgxGW5JpMKCwKCgBCX9AFBQBCwHAJCXJZrMqmwICAICHFJHxAEBAHLISDEZbkmkwoLAoKAEJf0AUFAELAcAkJclmsyqbAgIAgIcUkfEAQEAcshIMRluSaTCgsCgoAQl/QBQUAQsBwCQlyWazKpsCAgCAhxSR8QBAQByyEgxGW5JpMKCwKCgBCX9AFBQBCwHAJCXJZrMqmwICAICHFJHxAEBAHLISDEZbkmkwoLAoKAEJf0AUFAELAcAkJclmsyqbAgIAgIcUkfEAQEAcshIMRluSaTCgsCgsD/AFt/MVAlcetCAAAAAElFTkSuQmCC",width:75,height:24},opacity:.1,right:10,top:10},this._opt.forceNoOffscreen||("undefined"==typeof OffscreenCanvas?(this._opt.forceNoOffscreen=!0,this._opt.useOffscreen=!1):this._opt.useOffscreen=!0),this._opt.isMpeg4&&(this.debug.log(this.TAG_NAME,"isMpeg4 is true, so set _opt.useWasm true and others params false"),this._opt.useWCS=!1,this._opt.useMSE=!1,this._opt.isNakedFlow=!1,this._opt.useSIMD=!1,this._opt.isFmp4=!1,this._opt.useWasm=!0),(this.isOldHls()||this.isWebrtcH264()||this.isAliyunRtc())&&(this.debug.log(this.TAG_NAME,"isOldHls or isWebrtcH264 or isAliyunRtc is true, so set some params false and _opt.recordType is webm"),this._opt.useWCS=!1,this._opt.useMSE=!1,this._opt.isNakedFlow=!1,this._opt.useSIMD=!1,this._opt.isFmp4=!1,this._opt.useWasm=!1,this._opt.recordType=b),this._opt.isNakedFlow&&(this.debug.log(this.TAG_NAME,"isNakedFlow is true, so set _opt.mseDecodeAudio false"),this._opt.mseDecodeAudio=!1),!this.isOldHls()&&!this.isWebrtcH264()){if(this._opt.useWCS){const e="VideoEncoder"in window,t=kr();this._opt.useWCS=e,this._opt.useWCS&&this._opt.isH265&&(this._opt.useWCS=t),this._opt.useWCS||this.debug.warn(this.TAG_NAME,`\n useWCS is true,\n and supportWCS is ${e}, supportHevcWCS is ${t} , _opt.isH265 is ${this._opt.isH265}\n so set useWCS false`),this._opt.useWCS&&(this._opt.useOffscreen?this._opt.wcsUseVideoRender=!1:this._opt.wcsUseVideoRender&&(this._opt.wcsUseVideoRender=Cr()&&Rr(),this._opt.wcsUseVideoRender||this.debug.warn(this.TAG_NAME,"wcsUseVideoRender is true, but not support so set wcsUseVideoRender false")))}if(this._opt.useMSE){const e=function(){let e=!1;return"MediaSource"in window&&window.MediaSource.isTypeSupported(Jt)&&(e=!0),e}(),t=Er();this._opt.useMSE=e,this._opt.useMSE&&this._opt.isH265&&(this._opt.useMSE=t),this._opt.useMSE||this.debug.warn(this.TAG_NAME,`\n useMSE is true,\n and supportMSE is ${e}, supportHevcMSE is ${t} , _opt.isH265 is ${this._opt.isH265}\n so set useMSE false`)}}if(da(this._opt.useMSE)&&(this._opt.mseDecodeAudio=!1),this._opt.useMSE?(this._opt.useWCS&&this.debug.warn(this.TAG_NAME,"useMSE is true and useWCS is true then useWCS set true->false"),this._opt.forceNoOffscreen||this.debug.warn(this.TAG_NAME,"useMSE is true and forceNoOffscreen is false then forceNoOffscreen set false->true"),this._opt.useWCS=!1,this._opt.forceNoOffscreen=!0):this._opt.useWCS,this._opt.isWebrtc&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"isWebrtc is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this._opt.isHls&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"isHls is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this._opt.isAliyunRtc&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"isAliyunRtc is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this.isStreamWebTransport()&&this._opt.demuxUseWorker&&(this.debug.warn(this.TAG_NAME,"is stream use webTransport is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt.demuxUseWorker=!1),this._opt.useMThreading&&(this._opt.useMThreading="undefined"!=typeof SharedArrayBuffer,this._opt.useMThreading||this.debug.warn(this.TAG_NAME,"useMThreading is true, but not support so set useMThreading false")),this._opt.useSIMD||-1!==this._opt.decoder.indexOf("-simd")){const e=WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),t=ua();this._opt.useSIMD=e&&da(t),this._opt.useSIMD||this.debug.warn(this.TAG_NAME,`useSIMD is true, but not support(isSupportSimd is ${e} ,isIphone is ${t}) so set useSIMD false`)}var s;if(this._opt.useSIMD?-1===this._opt.decoder.indexOf("-simd")?this._opt.useMThreading?this._opt.decoder=this._opt.decoder.replace("decoder-pro.js","decoder-pro-simd-mt.js"):this._opt.decoder=this._opt.decoder.replace("decoder-pro.js","decoder-pro-simd.js"):this._opt.useMThreading&&(this._opt.decoder=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-simd-mt.js")):-1!==this._opt.decoder.indexOf("-simd")?this._opt.useMThreading?this._opt.decoder=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-mt.js"):this._opt.decoder=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro.js"):this._opt.useMThreading&&(this._opt.decoder=this._opt.decoder.replace("decoder-pro.js","decoder-pro-mt.js")),-1!==this._opt.decoder.indexOf("-simd")?this._opt.useMThreading?(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro-simd-mt.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro-simd-mt.js","decoder-pro-hard.js")):(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro-simd.js","decoder-pro-hard.js")):this._opt.useMThreading?(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro-mt.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro-mt.js","decoder-pro-hard.js")):(this._opt.decoderAudio=this._opt.decoder.replace("decoder-pro.js","decoder-pro-audio.js"),this._opt.decoderHard=this._opt.decoder.replace("decoder-pro.js","decoder-pro-hard.js")),da(this._opt.hasAudio)&&(this._opt.operateBtns.audio=!1),da(this._opt.hasVideo)&&(this._opt.operateBtns.fullscreen=!1,this._opt.operateBtns.screenshot=!1,this._opt.operateBtns.record=!1,this._opt.operateBtns.ptz=!1,this._opt.operateBtns.quality=!1,this._opt.operateBtns.zoom=!1),this._opt.qualityConfig&&0===this._opt.qualityConfig.length&&this._opt.operateBtns.quality&&(this._opt.operateBtns.quality=!1,this.debug.warn(this.TAG_NAME,"_opt.qualityConfig is empty, so set operateBtns.quality false")),ha(this._opt.useWebGPU)&&(this._opt.useWebGPU=function(){let e=!1;return"gpu"in navigator&&(e=!0),e}(),da(this._opt.useWebGPU)&&this.debug.warn(this.TAG_NAME,"useWebGPU is true, but not support so set useWebGPU false")),this._opt.hasControl=this._hasControl(),this._loading=!1,this._playing=!1,this._playbackPause=!1,this._hasLoaded=!1,this._zooming=!1,this._destroyed=!1,this._closed=!1,this._checkHeartTimeout=null,this._checkLoadingTimeout=null,this._checkStatsInterval=null,this._checkVisibleHiddenTimeout=null,this._startBpsTime=null,this._isPlayingBeforePageHidden=!1,this._stats={buf:0,netBuf:0,fps:0,maxFps:0,dfps:0,abps:0,vbps:0,ts:0,mseTs:0,currentPts:0,pTs:0,dts:0,mseVideoBufferDelayTime:0,isDropping:!1},this._allStatsData={},this._faceDetectActive=!1,this._objectDetectActive=!1,this._occlusionDetectActive=!1,this._imageDetectActive=!1,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this._videoTimestamp=0,this._audioTimestamp=0,this._latestAudioTimestamp=0,this._videoIframeIntervalTs=0,this._streamQuality=this._opt.defaultStreamQuality||"",this._visibility=!0,this._lastestVisibilityChangeTimestamp=null,this._tempWorkerStats=null,this._historyFpsList=[],this._tempStreamList=[],this._tempInnerPlayBgobj=null,this._flvMetaData=null,this._flvMetaDataFps=null,da(this._opt.useMSE)&&da(this._opt.useWCS)&&!this.isWebrtcH264()&&!this.isOldHls()&&(this._opt.useWasm=!0),(this.isOldHls()||this.isWebrtcH264())&&(this._opt.hasVideo=!0,this._opt.hasAudio=!0),this._opt.hasVideo||(this._opt.useMSE=!1,this._opt.useWCS=!1),this._opt.useWasm&&(this._opt.useOffscreen?this._opt.wasmUseVideoRender=!1:this._opt.wasmUseVideoRender&&(this._opt.wasmUseVideoRender=br()&&Cr()&&Rr(),this._opt.wasmUseVideoRender||this.debug.warn(this.TAG_NAME,"use wasm video render, but not support so set wasmUseVideoRender false")),this._opt.useSIMD?this.debug.log(this.TAG_NAME,"use simd wasm"):this.debug.log(this.TAG_NAME,"use wasm")),this._opt.useWasm&&(this._opt.useFaceDetector&&window.JessibucaProFaceDetector||this._opt.useObjectDetector&&window.JessibucaProObjectDetector||this._opt.useOcclusionDetector&&window.JessibucaProOcclusionDetector||this._opt.useImageDetector&&window.JessibucaProImageDetector)?(this.ai=new py(this),this._opt.useFaceDetector&&window.JessibucaProFaceDetector||(this._opt.operateBtns.aiFace=!1),this._opt.useObjectDetector&&window.JessibucaProObjectDetector||(this._opt.operateBtns.aiObject=!1),this._opt.useOcclusionDetector&&window.JessibucaProOcclusionDetector||(this._opt.operateBtns.aiOcclusion=!1),this._opt.useImageDetector&&this._opt.aiImageDetectActive&&window.JessibucaProImageDetector&&(this.imageDetectActive=!0)):(this._opt.operateBtns.aiObject=!1,this._opt.operateBtns.aiFace=!1,this._opt.operateBtns.aiOcclusion=!1),this._opt.useFaceDetector&&(this._opt.useWasm&&window.JessibucaProFaceDetector||this.debug.warn(this.TAG_NAME,`use face detector, useWasm is ${this._opt.useWasm} and window.JessibucaProFaceDetector is null`)),this._opt.useObjectDetector&&(this._opt.useWasm&&window.JessibucaProObjectDetector||this.debug.warn(this.TAG_NAME,`use object detector, useWasm is ${this._opt.useWasm} and window.JessibucaProObjectDetector is null`)),this._opt.useOcclusionDetector&&(this._opt.useWasm&&window.JessibucaProOcclusionDetector||this.debug.warn(this.TAG_NAME,`use occlusion detector, useWasm is ${this._opt.useWasm} and window.JessibucaProOcclusionDetector is null`)),this._opt.useImageDetector&&(this._opt.useWasm&&window.JessibucaProImageDetector||this.debug.warn(this.TAG_NAME,`use image detector, useWasm is ${this._opt.useWasm} and window.JessibucaProImageDetector is null`)),this._opt.useVideoRender&&(this._opt.useWasm&&!this._opt.useOffscreen?(this._opt.wasmUseVideoRender=br()&&Cr()&&Rr(),this._opt.wasmUseVideoRender||this.debug.warn(this.TAG_NAME,"use wasm video render, but not support so set wasmUseVideoRender false")):this._opt.useWCS&&!this._opt.useOffscreen&&(this._opt.wcsUseVideoRender=Cr()&&Rr(),this._opt.wcsUseVideoRender||this.debug.warn(this.TAG_NAME,"use wcs video render, but not support so set wcsUseVideoRender false"))),this._opt.useCanvasRender&&(this._opt.useMSE&&(this._opt.mseUseCanvasRender=!0),this._opt.useWasm&&(this._opt.wasmUseVideoRender=!1),this._opt.useWCS&&(this._opt.wcsUseVideoRender=!1),this.isOldHls()&&!yr()&&(this._opt.hlsUseCanvasRender=!0),this.isWebrtcH264()&&(this._opt.webrtcUseCanvasRender=!0)),this._opt.useVideoRender=!1,this._opt.useCanvasRender=!1,this._opt.useWasm?this._opt.wasmUseVideoRender?this._opt.useVideoRender=!0:this._opt.useCanvasRender=!0:this._opt.useWCS?this._opt.wcsUseVideoRender?this._opt.useVideoRender=!0:this._opt.useCanvasRender=!0:this._opt.useMSE?this._opt.mseUseCanvasRender?this._opt.useCanvasRender=!0:this._opt.useVideoRender=!0:this.isOldHls()?this._opt.hlsUseCanvasRender?this._opt.useCanvasRender=!0:this._opt.useVideoRender=!0:this.isWebrtcH264()&&(this._opt.webrtcUseCanvasRender?this._opt.useCanvasRender=!0:this._opt.useVideoRender=!0),s=this,Object.defineProperty(s,"rect",{get:()=>{let e={};return s.$container&&(e=s.$container.getBoundingClientRect(),e.width=Math.max(e.width,s.$container.clientWidth),e.height=Math.max(e.height,s.$container.clientHeight)),e}}),["bottom","height","left","right","top","width"].forEach((e=>{Object.defineProperty(s,e,{get:()=>s.rect[e]||0})})),this.events=new Aa(this),this._opt.hasVideo&&(this.video=new Ga(this),this.recorder=new Jo(this)),this.isOldHls()?(this.hlsDecoder=new Bm(this),this.loaded=!0):this.isWebrtcH264()?(this._opt.isWebrtcForZLM?this.webrtc=new dy(this):this._opt.isWebrtcForSRS?this.webrtc=new my(this):this._opt.isWebrtcForOthers?this.webrtc=new gy(this):this.webrtc=new hy(this),this.loaded=!0):this.isAliyunRtc()?(this.aliyunRtcDecoder=new yy(this),this.loaded=!0):(this.isUseHls265()&&(this.hlsDecoder=new ny(this)),this.isWebrtcH265()&&(this.webrtc=new hy(this)),da(Qr(this._opt))?this.decoderWorker=new Zo(this):this.loaded=!0),this._opt.hasAudio&&(this.audio=new oo(this)),this.stream=null,this.demux=null,this._lastVolume=null,this._isInZoom=!1,this._playingStartTimestamp=null,this._opt.useWCS&&(this.webcodecsDecoder=new Gl(this),!this._opt.hasAudio&&da(this._opt.demuxUseWorker)&&(this.loaded=!0)),this._opt.useMSE&&(this.mseDecoder=new ph(this),!this._opt.hasAudio&&da(this._opt.demuxUseWorker)&&(this.loaded=!0)),this.control=new ah(this),this._opt.contextmenuBtns.length>0&&ur()&&(this.contextmenu=new fy(this)),this.isPlayback()&&(this.playback=new cy(this,this._opt.playbackConfig)),this._opt.operateBtns.zoom&&(this.zoom=new uy(this)),/(iphone|ipad|ipod|ios|android)/i.test(window.navigator.userAgent.toLowerCase())&&da(this._opt.supportLockScreenPlayAudio&&gr())&&(this.keepScreenOn=new mh(this)),(e=>{try{const t=t=>{$r(t)===e.$container&&(e.emit(Ze.fullscreen,e.fullscreen),e.fullscreen?e._opt.useMSE&&e.resize():e.resize())};Ns.on("change",t),e.events.destroys.push((()=>{Ns.off("change",t)}))}catch(e){}if(e.on(Xe.decoderWorkerInit,(()=>{e.debug.log("player","listen decoderWorkerInit and set loaded true"),e.loaded=!0})),e.on(Xe.play,(()=>{e.loading=!1})),e.on(Xe.fullscreen,(t=>{if(t)try{Ns.request(e.$container).then((()=>{})).catch((t=>{e.debug.error("player","fullscreen request error",t),cr()&&e._opt.useWebFullScreen&&(e.webFullscreen=!0)}))}catch(t){cr()&&e._opt.useWebFullScreen&&(e.webFullscreen=!0)}else try{Ns.exit().then((()=>{e.webFullscreen&&(e.webFullscreen=!1)})).catch((t=>{e.debug.error("player","fullscreen exit error",t),e.webFullscreen&&(e.webFullscreen=!1)}))}catch(t){e.webFullscreen&&(e.webFullscreen=!1)}})),cr()&&e.on(Xe.webFullscreen,(t=>{t?e.$container.classList.add("jessibuca-fullscreen-web"):e.$container.classList.remove("jessibuca-fullscreen-web"),e.emit(Ze.fullscreen,e.fullscreen)})),e.on(Xe.resize,(()=>{e.video&&e.video.resize()})),e._opt.debug){const t=[Xe.timeUpdate,Xe.currentPts,Xe.videoSEI],i=[Xe.stats,Xe.playbackStats,Xe.playbackTimestamp,Xe.flvMetaData,Xe.playToRenderTimes,Xe.audioInfo,Xe.videoInfo];Object.keys(Xe).forEach((s=>{e.on(Xe[s],(function(r){if(!t.includes(s)){i.includes(s)&&(r=JSON.stringify(r));for(var a=arguments.length,o=new Array(a>1?a-1:0),n=1;n{e.on(tt[t],(function(){for(var i=arguments.length,s=new Array(i),r=0;r{const{_opt:t,debug:i,events:{proxy:s}}=e;if(t.supportDblclickFullscreen&&s(e.$container,"dblclick",(t=>{const i=$r(t).nodeName.toLowerCase();"canvas"!==i&&"video"!==i||(e.fullscreen=!e.fullscreen)})),s(document,"visibilitychange",(()=>{e.visibility="visible"===document.visibilityState,i.log("visibilitychange",document.visibilityState),t.hiddenAutoPause&&(i.log("visibilitychange","hiddenAutoPause is true ",document.visibilityState,e._isPlayingBeforePageHidden),"visible"===document.visibilityState?e._isPlayingBeforePageHidden&&e.play():(e._isPlayingBeforePageHidden=e.playing,e.playing&&e.pause()))})),ur()&&s(document,["click","contextmenu"],(t=>{th(t,e.$container)?(e.isInput="INPUT"===t.target.tagName,e.isFocus=!0,e.emit(Xe.focus)):(e.isInput=!1,e.isFocus=!1,e.emit(Xe.blur))})),t.autoResize){const t=wr((()=>{e.resize()}),500);s(window,["resize","orientationchange"],(()=>{t()})),screen&&screen.orientation&&screen.orientation.onchange&&s(screen.orientation,"change",(()=>{t()}))}})(this),this.singleWatermark=new xa(this),this._opt.ghostWatermarkConfig.content||da(dr)){const e=Object.assign({},this._opt.ghostWatermarkConfig,{isGhost:!0});this.ghostWatermark=new by(this,e)}(this._opt.dynamicWatermarkConfig.content||da(dr))&&(this.dynamicWatermark=new by(this,this._opt.dynamicWatermarkConfig)),this._opt.watermarkConfig&&this.updateWatermark(this._opt.watermarkConfig),ya()&&(this.pressureObserverCpu=new Ay(this)),this._opt.useWCS&&this.debug.log(this.TAG_NAME,"use WCS"),this._opt.useMSE&&this.debug.log(this.TAG_NAME,"use MSE"),this._opt.useOffscreen&&this.debug.log(this.TAG_NAME,"use offscreen"),this._opt.isHls&&(this._opt.supportHls265?this.debug.log(this.TAG_NAME,"use hls 265"):this.debug.log(this.TAG_NAME,"use hls")),this._opt.isWebrtc&&(this._opt.isWebrtcH265?this.debug.log(this.TAG_NAME,"use webrtc h265"):this._opt.isWebrtcForZLM?this.debug.log(this.TAG_NAME,"use webrtc for ZLM"):this._opt.isWebrtcForSRS?this.debug.log(this.TAG_NAME,"use webrtc for SRS"):this._opt.isWebrtcForOthers?this.debug.log(this.TAG_NAME,"use webrtc for Others"):this.debug.log(this.TAG_NAME,"use webrtc for M7S")),this.isAliyunRtc()&&this.debug.log(this.TAG_NAME,"use aliyun rtc"),this._opt.isFmp4&&this.debug.log(this.TAG_NAME,"use fmp4"),this._opt.isMpeg4&&this.debug.log(this.TAG_NAME,"use mpeg4"),this.isPlayback()&&this.debug.log(this.TAG_NAME,"use playback"),this._opt.hasVideo&&(0===this.width&&this.debug.warn(this.TAG_NAME,"container width is 0, please check the container width"),0===this.height&&this.debug.warn(this.TAG_NAME,"container height is 0, please check the container height")),this.debug.log("Player options",JSON.stringify(this._opt))}async destroy(){this._destroyed=!0,this.emit("destroy"),this.off(),this.events&&(this.events.destroy(),this.events=null),this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.clearVisibilityHiddenTimeout(),this.decoderWorker&&(await this.decoderWorker.destroy(),this.decoderWorker=null),await this._destroy()}async _destroy(){this._loading=!1,this._playing=!1,this._playbackPause=!1,this._hasLoaded=!1,this._lastVolume=null,this._zooming=!1,this._faceDetectActive=!1,this._objectDetectActive=!1,this._occlusionDetectActive=!1,this._imageDetectActive=!1,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this.singleWatermark&&(this.singleWatermark.destroy(),this.singleWatermark=null),this.ghostWatermark&&(this.ghostWatermark.destroy(),this.ghostWatermark=null),this.dynamicWatermark&&(this.dynamicWatermark.destroy(),this.dynamicWatermark=null),this.pressureObserverCpu&&(this.pressureObserverCpu.destroy(),this.pressureObserverCpu=null),this.stream&&(this.stream.destroy(),this.stream=null),this.hlsDecoder&&(await this.hlsDecoder.destroy(),this.hlsDecoder=null),this.mseDecoder&&(this.mseDecoder.destroy(),this.mseDecoder=null),this.webrtc&&(this.webrtc.destroy(),this.webrtc=null),this.aliyunRtcDecoder&&(this.aliyunRtcDecoder.destroy(),this.aliyunRtcDecoder=null),this.video&&(this.video.destroy(),this.video=null),this.audio&&(this.audio.destroy(),this.audio=null),this.recorder&&(this.recorder.destroy(),this.recorder=null),this.control&&(this.control.destroy(),this.control=null),this.webcodecsDecoder&&(this.webcodecsDecoder.destroy(),this.webcodecsDecoder=null),this.demux&&(this.demux.destroy(),this.demux=null),this.playback&&(this.playback.destroy(),this.playback=null),this.zoom&&(this.zoom.destroy(),this.zoom=null),this.ai&&(this.ai.destroy(),this.ai=null),this.keepScreenOn&&(this.releaseWakeLock(),this.keepScreenOn.destroy(),this.keepScreenOn=null),this.resetStats(),this._audioTimestamp=0,this._latestAudioTimestamp=0,this._videoTimestamp=0,this._streamQuality="",this._visibility=!0,this._isInZoom=!1,this._playingStartTimestamp=null,this._lastestVisibilityChangeTimestamp=null,this._videoIframeIntervalTs=null,this._tempWorkerStats=null,this._tempStreamList=[],this._tempInnerPlayBgobj={},this._flvMetaData=null,this._flvMetaDataFps=null,this.debug.log("play","destroy end"),this._opt=na(),this.$container=null}set fullscreen(e){cr()&&this._opt.useWebFullScreen?this.webFullscreen=e:this.emit(Xe.fullscreen,e)}get fullscreen(){return Ns.isFullscreen||this.webFullscreen}set webFullscreen(e){this.emit(Xe.webFullscreen,e),setTimeout((()=>{this.updateOption({rotate:e?270:0}),this.resize()}),10)}get webFullscreen(){return this.$container.classList.contains("jessibuca-fullscreen-web")}set loaded(e){this._hasLoaded=e}get loaded(){return this._hasLoaded||this.isOldHls()||this.isWebrtcH264()||this._opt.useMSE&&da(this._opt.hasAudio)&&da(this._opt.demuxUseWorker)||this._opt.useWCS&&!this._opt.hasAudio&&da(this._opt.demuxUseWorker)}set playing(e){this.isClosed()&&e?this.debug.log(this.TAG_NAME,"player is closed, so can not play"):(e&&ha(this.loading)&&(this.loading=!1),this.playing!==e&&(this._playing=e,this.emit(Xe.playing,e),this.emit(Xe.volumechange,this.volume),e?this.emit(Xe.play):this.emit(Xe.pause)))}get playing(){return this._playing}get volume(){return this.audio&&this.audio.volume||0}set volume(e){e!==this.volume&&(this.audio?(this.audio.setVolume(e),this._lastVolume=this.volume):this.debug.warn(this.TAG_NAME,"set volume error, audio is null"))}get lastVolume(){return this._lastVolume}set loading(e){this.loading!==e&&(this._loading=e,this.emit(Xe.loading,this._loading))}get loading(){return this._loading}set zooming(e){this.zooming!==e&&(this.zoom||(this.zoom=new uy(this)),this._zooming=e,this.emit(Xe.zooming,this.zooming))}get zooming(){return this._zooming}set recording(e){e?this.playing&&!this.recording&&(this.recorder&&this.recorder.startRecord(),this.isDemuxInWorker()&&this.decoderWorker.updateWorkConfig({key:"isRecording",value:!0})):this.recording&&(this.isDemuxInWorker()&&this.decoderWorker.updateWorkConfig({key:"isRecording",value:!1}),this.recorder&&this.recorder.stopRecordAndSave().then((()=>{})).catch((e=>{})))}get recording(){return!!this.recorder&&this.recorder.isRecording}set audioTimestamp(e){null!==e&&(this._audioTimestamp=e)}get audioTimestamp(){return this._audioTimestamp}set latestAudioTimestamp(e){null!==e&&(this._latestAudioTimestamp=e)}get latestAudioTimestamp(){return this._latestAudioTimestamp}get videoTimestamp(){return this._stats.currentPts||this._stats.ts}set streamQuality(e){this.streamQuality!==e&&(this._streamQuality=e,this.emit(Xe.streamQualityChange,e))}get streamQuality(){return this._streamQuality}get isDebug(){return ha(this._opt.debug)}get scaleType(){const e=this._opt,t=e.isResize,i=e.isFullResize;let s=Bt;return da(i)&&da(t)?s=Bt:da(i)&&ha(t)?s=Mt:ha(i)&&ha(t)&&(s=Ut),s}set visibility(e){this._visibility!==e&&(this._visibility=e,this.emit(Xe.visibilityChange,e),this._lastestVisibilityChangeTimestamp=sr(),e?this.clearVisibilityHiddenTimeout():this.startVisibilityHiddenTimeout())}get visibility(){return this._visibility}set playbackPause(e){this._playbackPause!==e&&(this._playbackPause=e,this.emit(Xe.playbackPause,e),this.emit(Xe.playbackPauseOrResume,e))}get playbackPause(){return this.isPlayback()&&this._playbackPause}set videoIframeIntervalTs(e){this._videoIframeIntervalTs=e}get videoIframeIntervalTs(){return this._videoIframeIntervalTs}set faceDetectActive(e){this._faceDetectActive!==e&&(this._faceDetectActive=e,this.emit(Xe.faceDetectActive,e))}get faceDetectActive(){return this._faceDetectActive}set objectDetectActive(e){this._objectDetectActive!==e&&(this._objectDetectActive=e,this.emit(Xe.objectDetectActive,e))}get objectDetectActive(){return this._objectDetectActive}set occlusionDetectActive(e){this._occlusionDetectActive!==e&&(this._occlusionDetectActive=e,this.emit(Xe.occlusionDetectActive,e))}get occlusionDetectActive(){return this._occlusionDetectActive}set imageDetectActive(e){this._imageDetectActive!==e&&(this._imageDetectActive=e)}get imageDetectActive(){return this._imageDetectActive}get isUseWorkerDemuxAndDecode(){return this.stream&&this.stream.getStreamType()===p}isDestroyed(){return this._destroyed}isClosed(){return this._closed}isPlaying(){let e=!1;return this._opt.playType===m?e=this.playing:this._opt.playType===y&&(e=da(this.playbackPause)&&this.playing),e}updateOption(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._opt=Object.assign({},this._opt,e),ha(t)&&this.decoderWorker&&Object.keys(e).forEach((t=>{this.decoderWorker.updateWorkConfig({key:t,value:e[t]})}))}init(){return new Promise(((e,t)=>{this.video||this._opt.hasVideo&&(this.video=new Ga(this)),this.audio||this._opt.hasAudio&&(this.audio=new oo(this)),this.stream||(this.stream=new mo(this)),this.isOldHls()?(this.hlsDecoder||(this.hlsDecoder=new Bm(this),this.loaded=!0),e()):this.isWebrtcH264()?(this.webrtc||(this._opt.isWebrtcForZLM?this.webrtc=new dy(this):this._opt.isWebrtcForSRS?this.webrtc=new my(this):this._opt.isWebrtcForOthers?this.webrtc=new gy(this):this.webrtc=new hy(this),this.loaded=!0),e()):this.isAliyunRtc()?(this.aliyunRtcDecoder||(this.aliyunRtcDecoder=new yy(this),this.loaded=!0),e()):(this.demux||this._opt.hasVideo&&!this.isUseWorkerDemuxAndDecode&&(this.demux=new zl(this)),this._opt.useWCS&&(this.webcodecsDecoder||(this.webcodecsDecoder=new Gl(this))),this._opt.useMSE&&(this.mseDecoder||(this.mseDecoder=new ph(this))),this.isUseHls265()&&(this.hlsDecoder||(this.hlsDecoder=new ny(this))),this.isWebrtcH265()&&(this.webrtc||(this.webrtc=new hy(this))),this.decoderWorker?this.loaded?e():this.once(Xe.decoderWorkerInit,(()=>{this.isDestroyed()?(this.debug.error(this.TAG_NAME,"init() failed and player is destroyed"),t("init() failed and player is destroyed")):(this.loaded=!0,e())})):Qr(this._opt)?e():(this.decoderWorker=new Zo(this),this.once(Xe.decoderWorkerInit,(()=>{this.isDestroyed()?(this.debug.error(this.TAG_NAME,"init() failed and player is destroyed"),t("init() failed and player is destroyed")):(this.loaded=!0,e())}))))}))}play(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{if(!e&&!this._opt.url)return s("url is empty");this._closed=!1,this.loading=!0,this.playing=!1,this._times.playInitStart=sr(),e||(e=this._opt.url),this._opt.url=e,this.control&&this._opt.loadingBackground&&this.control.initLoadingBackground(),this.init().then((()=>{this.debug.log(this.TAG_NAME,"play() init and next fetch stream"),this._times.playStart=sr(),this._opt.isNotMute&&this.mute(!1),this.enableWakeLock(),this.checkLoadingTimeout(),this.stream?(this.stream.once(tt.fetchError,(e=>{this.emitError(tt.fetchError,e)})),this.stream.once(tt.websocketError,(e=>{this.emitError(tt.websocketError,e)})),this.stream.once(Xe.streamEnd,(()=>{this.emit(Xe.streamEnd)})),this.stream.once(tt.hlsError,(e=>{this.emitError(tt.hlsError,e)})),this.stream.once(tt.webrtcError,(e=>{this.emitError(tt.webrtcError,e)})),this.stream.once(Xe.streamSuccess,(()=>{i(),this._times.streamResponse=sr(),this.video&&this.video.play(),this.checkStatsInterval(),this.isPlayback()&&this.playback&&this.playback.startCheckStatsInterval();{const e=Number("1")||1;setTimeout((()=>{this.destroy(),console.error("jessibuca pro 体验结束,请刷新页面再次体验(wasm内部会暂停解码)"),alert("jessibuca pro 体验结束,请刷新页面再次体验,如需要购买商业授权,可以联系微信:bosswancheng"),window.location.reload()}),60*e*60*1e3)}})),this.stream.fetchStream(e,t)):(this.debug.warn(this.TAG_NAME,`play() this.stream is null and is destroy is ${this.isDestroyed()}`),s("this.stream is null"))})).catch((e=>{s(e)}))}))}playForControl(){return new Promise(((e,t)=>{this.debug.log(this.TAG_NAME,`playForControl() and pauseAndNextPlayUseLastFrameShow is ${this._opt.pauseAndNextPlayUseLastFrameShow}`),this._opt.pauseAndNextPlayUseLastFrameShow&&this._tempInnerPlayBgobj&&this._tempInnerPlayBgobj.loadingBackground&&this.updateOption({loadingBackground:this._tempInnerPlayBgobj.loadingBackground,loadingBackgroundWidth:this._tempInnerPlayBgobj.loadingBackgroundWidth,loadingBackgroundHeight:this._tempInnerPlayBgobj.loadingBackgroundHeight}),this.play().then((t=>{e(t)})).catch((e=>{t(e)}))}))}close(){return new Promise(((e,t)=>{this._close().then((()=>{this.video&&this.video.clearView(),e()})).catch((e=>{t(e)}))}))}resumeAudioAfterPause(){this.lastVolume&&(this.volume=this.lastVolume)}_close(){return new Promise(((e,t)=>{this._closed=!0,this.video&&(this.video.resetInit(),this.video.pause(!0)),this.loading=!1,this.recording=!1,this.zooming=!1,this.playing=!1,this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this.isPlayback()&&this.playback&&this.playback.clearStatsInterval(),this.releaseWakeLock(),this.resetStats(),this._audioTimestamp=0,this._videoTimestamp=0,this._times={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""};const i=()=>{this.stream&&(this.stream.destroy(),this.stream=null),this.demux&&(this.demux.destroy(),this.demux=null),this.webcodecsDecoder&&(this.webcodecsDecoder.destroy(),this.webcodecsDecoder=null),this.mseDecoder&&(this.mseDecoder.destroy(),this.mseDecoder=null),this.hlsDecoder&&(this.hlsDecoder.destroy(),this.hlsDecoder=null),this.webrtc&&(this.webrtc.destroy(),this.webrtc=null),this.audio&&(this.audio.destroy(),this.audio=null)};this.decoderWorker?this.decoderWorker.destroy().then((()=>{this.decoderWorker=null,i(),setTimeout((()=>{e()}),0)})).catch((e=>{this.debug&&this.debug.error(this.TAG_NAME,"close() decoderWorker.destroy() error",e),t()})):(i(),setTimeout((()=>{e()}),0))}))}pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((t,i)=>{e?this.close().then((()=>{t()})).catch((e=>{i(e)})):this._close().then((()=>{t()})).catch((e=>{i(e)}))}))}pauseForControl(){return new Promise(((e,t)=>{if(this.debug.log(this.TAG_NAME,"_pauseInner()"),this._opt.pauseAndNextPlayUseLastFrameShow&&this.video){const e=this.video.screenshot("","png",.92,"base64");if(e){const t=this.getVideoInfo();t?(this.debug.log(this.TAG_NAME,`pauseForControl() and loadingBackground width is ${t.width} and height is ${t.height}`),this._tempInnerPlayBgobj={loadingBackground:e,loadingBackgroundWidth:t.width,loadingBackgroundHeight:t.height}):this.debug.warn(this.TAG_NAME,"pauseForControl() and videoInfo is null")}else this.debug.warn(this.TAG_NAME,"pauseForControl() and loadingBackground is null")}this.pause().then((t=>{e(t)})).catch((e=>{t(e)}))}))}isAudioMute(){let e=!0;return this.audio&&(e=this.audio.isMute),e}isAudioNotMute(){return!this.isAudioMute()}mute(e){this.audio&&this.audio.mute(e)}resize(){this.video&&this.video.resize()}startRecord(e,t){this.recording||(this.recorder.setFileName(e,t),this.recording=!0)}stopRecordAndSave(e,t){return new Promise(((i,s)=>{this.recorder||s("recorder is null"),this.recording?(this._opt.useWasm&&this.decoderWorker.updateWorkConfig({key:"isRecording",value:!1}),this.recorder.stopRecordAndSave(e,t).then((e=>{i(e)})).catch((e=>{s(e)}))):s("recorder is not recording")}))}_hasControl(){let e=!1,t=!1;return Object.keys(this._opt.operateBtns).forEach((e=>{this._opt.operateBtns[e]&&-1===(""+e).indexOf("Fn")&&(t=!0)})),(this._opt.showBandwidth||t)&&(e=!0),this.isPlayback()&&this._opt.playbackConfig.showControl&&(e=!0),e}useWasmDecode(){return da(this._opt.useMSE)&&da(this._opt.useWCS)}canVideoTrackWritter(){const e=this._opt;return!this.isOldHls()&&!this.isWebrtcH264()&&da(e.useMSE)&&!this.isAliyunRtc()&&(e.useWCS&&da(e.useOffscreen)&&e.wcsUseVideoRender||this.useWasmDecode())}checkHeartTimeout$2(){if(da(this.playbackPause)&&this.playing){if(this.isDestroyed())return void(this.debug&&this.debug.warn(this.TAG_NAME,"checkHeartTimeout$2 but player is destroyed"));if(da(this.isHistoryFpsListAllZero()))return void(this.debug&&this.debug.warn(this.TAG_NAME,"checkHeartTimeout$2 but fps is not all zero"));if(0!==this._stats.fps)return void(this.debug&&this.debug.warn(this.TAG_NAME,`checkHeartTimeout$2 but fps is ${this._stats.fps}`));if(da(this.visibility)&&0!==this._stats.vbps)return void(this.debug&&this.debug.warn(this.TAG_NAME,`checkHeartTimeout$2 but page is not visibility and vbps is ${this._stats.vbps}`));const e=this._historyFpsList.join(",");this.debug.warn(this.TAG_NAME,`checkHeartTimeout$2 and\n pause and emit delayTimeout event and\n current vbps is ${this._stats.vbps} and\n current fps is ${this._stats.fps} and\n history FpsList is ${e} and\n current visibility is ${this.visibility} and`),this.emit(Xe.timeout,Xe.delayTimeout),this.emit(Xe.delayTimeout)}else this.debug.log(this.TAG_NAME,`checkHeartTimeout$2 playbackPause is ${this.playbackPause}, playing is ${this.playing}`)}checkStatsInterval(){this._checkStatsInterval=setInterval((()=>{this.updateStats()}),1e3)}checkLoadingTimeout(){this._checkLoadingTimeout=setTimeout((()=>{this.playing?this.debug.warn(this.TAG_NAME,`checkLoadingTimeout but loading is ${this.loading} and playing is ${this.playing}`):this.isDestroyed()?this.debug&&this.debug.warn(this.TAG_NAME,"checkLoadingTimeout but player is destroyed"):(this.debug.warn(this.TAG_NAME,"checkLoadingTimeout and pause and emit loadingTimeout event"),this.emit(Xe.timeout,Xe.loadingTimeout),this.emit(Xe.loadingTimeout))}),1e3*this._opt.loadingTimeout)}clearCheckLoadingTimeout(){this._checkLoadingTimeout&&(this.debug.log(this.TAG_NAME,"clearCheckLoadingTimeout"),clearTimeout(this._checkLoadingTimeout),this._checkLoadingTimeout=null)}clearStatsInterval(){this._checkStatsInterval&&(clearInterval(this._checkStatsInterval),this._checkStatsInterval=null)}handleRender(){this.isDestroyed()?this.debug&&this.debug.warn(this.TAG_NAME,"handleRender but player is destroyed"):(this.loading&&(this.clearCheckLoadingTimeout(),this.loading=!1,this.emit(Xe.start)),this.playing||(this.playing=!0))}updateStats(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this._startBpsTime||(this._startBpsTime=sr()),Ir(e.ts)){const t=parseInt(e.ts,10);this._stats.ts=t,null===this._playingStartTimestamp&&t>0&&(this._playingStartTimestamp=t)}Ir(e.dts)&&(this._stats.dts=parseInt(e.dts,10)),Ir(e.mseTs)&&(this._stats.mseTs=e.mseTs),Ir(e.buf)&&(this._stats.buf=e.buf),Ir(e.netBuf)&&(this._stats.netBuf=e.netBuf),Ir(e.currentPts)&&(this._stats.currentPts=e.currentPts),e.fps&&(this._stats.fps+=1),e.dfps&&(this._stats.dfps+=1),e.abps&&(this._stats.abps+=e.abps),e.vbps&&(this._stats.vbps+=e.vbps),e.workerStats&&(this._tempWorkerStats=e.workerStats),e.isDropping&&(this._stats.isDropping=e.isDropping),e.mseVideoBufferDelayTime&&(this._stats.mseVideoBufferDelayTime=parseInt(1e3*e.mseVideoBufferDelayTime,10));const t=sr();if(t-this._startBpsTime<1e3)return;null!==this._playingStartTimestamp&&this._stats.fps>0&&(this._stats.pTs+=1);let i=0,s=0,r=0,a=0;this._opt.useMSE&&this.mseDecoder&&(i=this.mseDecoder.checkSourceBufferDelay(),i=parseInt(1e3*i,10),s=this.mseDecoder.checkSourceBufferStore(),s=s.toFixed(2),r=this.mseDecoder.getDecodeDiffTimes(),a=this.mseDecoder.getDecodePlaybackRate()),this._opt.useWCS&&this.webcodecsDecoder&&(r=this.webcodecsDecoder.getDecodeDiffTimes()),this.isOldHls()&&this.hlsDecoder&&(i=this.hlsDecoder.checkHlsBufferedDelay(),i=parseInt(1e3*i,10));let o=0,n=0,l=0;this.isUseHls265()&&this.hlsDecoder&&(i=this.hlsDecoder.checkHlsBufferedDelay(),i=i.toFixed(2),o=this.hlsDecoder.getDemuxBufferedListLength(),l=this.hlsDecoder.getDemuxVideoBufferedListLength(),n=this.hlsDecoder.getDemuxAudioBufferedListLength());let h=0,d=0,c=0,u=!1,p=0;this._opt.useWasm||this._opt.demuxUseWorker?this._tempWorkerStats&&(d=this._tempWorkerStats.demuxBufferDelay,c=this._tempWorkerStats.audioDemuxBufferDelay,h=this._tempWorkerStats.flvBufferByteLength,this._stats.netBuf=this._tempWorkerStats.netBuf,p=this._tempWorkerStats.pushLatestDelay,u=this._tempWorkerStats.isStreamTsMoreThanLocal):this.demux&&(h=this.demux.getInputByteLength(),p=this.demux.getPushLatestDelay(),u=this.demux.getIsStreamTsMoreThanLocal(),this.demux.bufferList&&(d=this.demux.bufferList.length));let f=0,m=0;this.audio&&this.audio.bufferList&&(f=this.audio.bufferList.length,m=parseInt(f*this.audio.oneBufferDuration,10));let g=0,y=0;if(this.isPlayback()&&this.video){this._opt.playbackConfig.isUseFpsRender&&(g=this.video.bufferList&&this.video.bufferList.length||0);let e=this.video.getStreamFps();const t=e>0?1e3/e:0;y=parseInt(t*g+t*d,10)}const A=this._stats.dts-this.videoTimestamp,b=A+this._stats.netBuf;this.isOldHls()&&(this._stats.fps=this.hlsDecoder.getFps()),this._stats.fps>this._stats.maxFps&&(this._stats.maxFps=this._stats.fps);let v=this.getVideoCurrentTime();const _=this._stats.videoCurrentTime;let w=-1;_&&v&&(w=(v-_).toFixed(2),v=v.toFixed(2));let S=0;this.audioTimestamp>0&&(S=this.audioTimestamp-this.getRenderCurrentPts()),this._allStatsData=Object.assign(this._stats,{audioBuffer:f,audioBufferDelayTs:m,audioTs:this.audioTimestamp,latestAudioTs:this.latestAudioTimestamp,playbackVideoBuffer:g,playbackVideoWaitingBuffer:0,playbackAudioWaitingBuffer:0,playbackCacheDataDuration:y,demuxBuffer:d,pushLatestDelay:p,audioDemuxBuffer:c,flvBuffer:h,mseDelay:i,mseStore:s,mseDecodeDiffTimes:r,mseDecodePlaybackRate:a,wcsDecodeDiffTimes:r,hlsDelay:i,hlsDemuxLength:o,hlsDemuxAudioLength:n,hlsDemuxVideoLength:l,delayTs:A,totalDelayTs:b,isStreamTsMoreThanLocal:u,videoCurrentTime:v,videoCurrentTimeDiff:w,audioSyncVideo:S});let T=null,E=null,k="";if(this.isPlayer()&&this._opt.hasVideo&&this.playing){T=function(e,t){let i=3;const s=t||25;return e<.33*s?i=0:e<.5*s?i=1:e<.83*s&&(i=2),i}(this._stats.fps,this._flvMetaDataFps),this._allStatsData.performance=T;const e=this.checkVideoSmooth(this._allStatsData);k=e.reason,E=e.result,this._allStatsData.videoSmooth=E}this.emit(Xe.stats,this._allStatsData),this._allStatsData.flvBuffer>1048576&&this.emit(tt.flvDemuxBufferSizeTooLarge,this._allStatsData.flvBuffer),this._opt.hasVideo?(this.updateHistoryFpsList(this._stats.fps),Ir(T)&&this.emit(Xe.performance,T),Ir(E)&&this.emit(Xe.videoSmooth,E,k)):this._opt.hasAudio&&this.updateHistoryFpsList(this._stats.abps),this._stats.fps=0,this._stats.dfps=0,this._stats.abps=0,this._stats.vbps=0,this._stats.isDropping=!1,this._startBpsTime=t}resetStats(){this._startBpsTime=null,this._playingStartTimestamp=null,this._historyFpsList=[],this._stats={buf:0,netBuf:0,fps:0,maxFps:0,dfps:0,abps:0,vbps:0,ts:0,mseTs:0,currentPts:0,pTs:0,dts:0,mseVideoBufferDelayTime:0,isDropping:!1},this._allStatsData={}}checkVideoSmooth(e){let t=!0,i="";if(this._opt.videoBuffer,this._opt.videoBufferDelay,this.isWebrtcH264()||this.isOldHls())return{result:t,reason:i};if(0===e.vbps&&(i="vbpsIsZero",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because ${i}`),t=!1),t&&e.isDropping&&(i="isDroppingIsTrue",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because ${i}`),t=!1),t&&this.visibility&&this._historyFpsList.length>=this._opt.heartTimeout){const s=function(e){const t=Math.max(...e),i=Math.min(...e);return e.filter((e=>e!==t&&e!==i))}(this._historyFpsList),r=s.reduce(((e,t)=>e+t),0)/s.length,a=.83*r;e.fps=1.5||e.videoCurrentTimeDiff<=.5)&&-1!==e.videoCurrentTimeDiff&&(i="videoCurrentTimeDiffIsNotNormal",this.debug.log(this.TAG_NAME,`checkVideoSmooth false because videoCurrentTimeDiff is ${e.videoCurrentTimeDiff}`),t=!1),{result:t,reason:i}}enableWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.enable()}releaseWakeLock(){this._opt.keepScreenOn&&this.keepScreenOn&&this.keepScreenOn.disable()}clearBufferDelay(){this._opt.useWasm?this.decoderWorker&&this.decoderWorker.clearWorkBuffer(!0):this.demux&&this.demux.clearBuffer(!0)}doDestroy(){this.emit(Xe.beforeDestroy)}handlePlayToRenderTimes(){const e=this.getPlayToRenderTimes();this.emit(Xe.playToRenderTimes,e)}getPlayToRenderTimes(){const e=this._times;return e.playTimestamp=e.playStart-e.playInitStart,e.streamTimestamp=e.streamStart-e.playStart,e.streamResponseTimestamp=e.streamResponse-e.streamStart,e.demuxTimestamp=e.demuxStart-e.streamResponse>0?e.demuxStart-e.streamResponse:0,e.decodeTimestamp=e.decodeStart-e.demuxStart>0?e.decodeStart-e.demuxStart:0,e.videoTimestamp=e.videoStart-e.decodeStart,e.allTimestamp=e.videoStart-e.playInitStart,e}getOption(){return this._opt}getPlayType(){return this._opt.playType}isPlayer(){return this._opt.playType===m}isPlayback(){return this._opt.playType===y}isDemuxSetCodecInit(){let e=!0,t=this._opt;return t.useWCS&&!t.useOffscreen?e=!!this.webcodecsDecoder&&this.webcodecsDecoder.hasInit:t.useMSE&&(e=!!this.mseDecoder&&this.mseDecoder.hasInit),e}isDemuxDecodeFirstIIframeInit(){let e=!0,t=this._opt;return t.useWCS&&!t.useOffscreen?e=!!this.webcodecsDecoder&&this.webcodecsDecoder.isDecodeFirstIIframe:t.useMSE&&(e=!!this.mseDecoder&&this.mseDecoder.isDecodeFirstIIframe),e}isAudioPlaybackRateSpeed(){let e=!1;return this.audio&&(e=this.audio.isPlaybackRateSpeed()),e}getPlayingTimestamp(){return this._stats.pTs}getRecordingType(){let e=null;return this.recorder&&(e=this.recorder.getType()),e}getRecordingByteLength(){let e=0;return this.recording&&(e=this.recorder.getToTalByteLength()),e}getRecordingDuration(){let e=0;return this.recording&&(e=this.recorder.getTotalDuration()),e}getDecodeType(){let e="";const t=this.getOption();return this.isWebrtcH264()?O:this.isAliyunRtc()?j:this.isOldHls()?N:(t.useMSE&&(e+=I+" "),t.useWCS&&(e+=P+" "),t.useWasm&&(e+=M+" ",t.useSIMD&&(e+=U+" "),t.useMThreading&&(e+=F+" ")),t.useOffscreen&&(e+=B+" "),e)}getDemuxType(){let e="";return e=this.getOption().demuxType,e}getRenderType(){let e="";return this.video&&(e=this.video.getType()),e}getCanvasRenderType(){let e="";return this.video&&(e=this.video.getCanvasType()),e}getAudioEngineType(){let e="";return this.audio&&(e=this.audio.getEngineType()),e}getStreamType(){let e="";return this.stream&&(e=this.stream.getStreamType()),e}getAllStatsData(){return this._allStatsData}togglePerformancePanel(e){this.updateOption({showPerformance:e}),this.emit(Xe.togglePerformancePanel,e)}setScaleMode(e){let t={isFullResize:!1,isResize:!1,aspectRatio:"default"};switch(e=Number(e)){case Bt:t.isFullResize=!1,t.isResize=!1;break;case Mt:t.isFullResize=!1,t.isResize=!0;break;case Ut:t.isFullResize=!0,t.isResize=!0}this.updateOption(t),this.resize(),this.emit(Xe.viewResizeChange,e)}startVisibilityHiddenTimeout(){this.clearVisibilityHiddenTimeout(),this._opt.pageVisibilityHiddenTimeout>0&&(this.visibilityHiddenTimeout=setTimeout((()=>{this.emit(Xe.visibilityHiddenTimeout)}),1e3*this._opt.pageVisibilityHiddenTimeout))}clearVisibilityHiddenTimeout(){this._checkVisibleHiddenTimeout&&(clearTimeout(this._checkVisibleHiddenTimeout),this._checkVisibleHiddenTimeout=null)}faceDetect(e){this.faceDetectActive=e}objectDetect(e){this.objectDetectActive=e}occlusionDetect(e){this.occlusionDetectActive=e}downloadNakedFlowFile(){this.demux&&this.demux.downloadNakedFlowFile&&this.demux.downloadNakedFlowFile()}downloadFmp4File(){this.demux&&this.demux.downloadFmp4File&&this.demux.downloadFmp4File()}downloadMpeg4File(){const e=new Blob([this._tempStreamList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".mpeg4",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadMpeg4File",e)}}hasCacheOnGopBuffer(){const e=this.videoIframeIntervalTs,t=this._allStatsData.demuxBuffer,i=this._allStatsData.maxFps;let s=!1;if(e&&t&&i){s=1e3/i*t>e}return s}addContentToCanvas(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.video&&this.video.addContentToCanvas(e)}sendWebsocketMessage(e){const t=this.getStreamType();t===d||t===p+" "+d?this.stream.sendMessage(e):this.debug.warn(this.TAG_NAME,`sendWebsocketMessage: stream type is not websocket, current stream type is ${this.getStreamType()}`)}checkIsInRender(){const e=this._stats;return e.vbps>0&&e.fps>0}setControlHtml(e){this.control&&this.control.$controlHtml&&(this.control.$controlHtml.innerHTML=e)}clearControlHtml(){this.control&&this.control.$controlHtml&&(this.control.$controlHtml.innerHTML="")}updateWatermark(e){this.singleWatermark&&this.singleWatermark.update(e)}removeWatermark(){this.singleWatermark&&this.singleWatermark.remove()}getVideoInfo(){let e=null;return this.video&&(e=this.video.getVideoInfo()),e}getAudioInfo(){let e=null;return this.audio&&(e=this.audio.getAudioInfo()),e}getVideoPlaybackQuality(){let e=null;return this.video&&(e=this.video.getPlaybackQuality()),e}emitError(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.emit(Xe.error,e,t),this.emit(e,t)}updateHistoryFpsList(e){this.playbackPause||(this._historyFpsList.length>this._opt.heartTimeout&&this._historyFpsList.shift(),this._historyFpsList.push(e),this.isHistoryFpsListAllZero()&&this.checkHeartTimeout$2())}isHistoryFpsListAllZero(){let e=!0;if(this._historyFpsList.length0){e=!1;break}return e}isUseHls265(){return ha(this._opt.isHls)&&ha(this._opt.supportHls265)}isOldHls(){return ha(this._opt.isHls)&&da(this._opt.supportHls265)}isWebrtcNotH265(){return ha(this._opt.isWebrtc)&&da(this._opt.isWebrtcH265)}isWebrtcH264(){return ha(this._opt.isWebrtc)&&da(this._opt.isWebrtcH265)}isWebrtcH265(){return ha(this._opt.isWebrtc)&&ha(this._opt.isWebrtcH265)}isAliyunRtc(){return ha(this._opt.isAliyunRtc)}isStreamWebTransport(){return this.getStreamType()===u}isPlaybackCacheBeforeDecodeForFpsRender(){return this.isPlayback()&&ha(this._opt.playbackConfig.isCacheBeforeDecodeForFpsRender)&&ha(this._opt.useWCS)}isPlaybackUseWCS(){return this.isPlayback()&&ha(this._opt.useWCS)}isPlaybackUseMSE(){return this.isPlayback()&&ha(this._opt.useMSE)}isPlayUseMSE(){return this.isPlayer()&&ha(this._opt.useMSE)}isInWebFullscreen(){return this._opt.useWebFullScreen&&cr()&&this.fullscreen}getPlaybackRate(){let e=1;return ha(this.isPlayback())&&this.playback&&(e=this.playback.rate),e}isPlaybackOnlyDecodeIFrame(){return ha(this.isPlayback())&&this.getPlaybackRate()>=this._opt.playbackForwardMaxRateDecodeIFrame}pushTempStream(e){const t=new Uint8Array(e);this._tempStreamList.push(t)}updateLoadingText(e){this.loading&&this.control&&this.control.updateLoadingText(e)}getVideoCurrentTime(){let e=0;return this.video&&(this._opt.useMSE&&this.mseDecoder?e=this.mseDecoder.getVideoCurrentTime():this.isWebrtcH264()&&this.webrtc?e=this.webrtc.getVideoCurrentTime():this.isAliyunRtc()&&this.aliyunRtcDecoder&&(e=this.aliyunRtcDecoder.getVideoCurrentTime())),e}addMemoryLog(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),s=1;s0){const e=t/1e3;this._flvMetaDataFps=e}}Lr(e.hasAudio)&&da(e.hasAudio)&&(this.debug.log("updateMetaData","hasAudio",e.hasAudio,"and update _opt.hasAudio"),this._opt.hasAudio=e.hasAudio),Lr(e.hasVideo)&&da(e.hasVideo)&&(this.debug.log("updateMetaData","hasVideo",e.hasVideo,"and update _opt.hasVideo"),this._opt.hasVideo=e.hasVideo)}this.emit(Xe.flvMetaData,e)}getMetaData(){return this._flvMetaData}getExtendBtnList(){return this.control.getExtendBtnList().map((e=>({name:e.name,$container:e.$iconContainer,$btn:e.$iconWrap,$activeBtn:e.$activeIconWrap})))}getCpuLevel(){let e=null;return this.pressureObserverCpu&&(e=this.pressureObserverCpu.getCurrentCpuState()),e}isRecordTypeFlv(){return this.recorder&&this._opt.recordType===v}isRecordTypeMp4(){return this.recorder&&this._opt.recordType===A}isRecordTypeWebm(){return this.recorder&&this._opt.recordType===b}isDemuxInWorker(){return this._opt.useWasm||this._opt.demuxUseWorker}getAudioSyncVideoDiff(){return this.audioTimestamp-this.getRenderCurrentPts()}getMseVideoBufferDelayTime(){let e=0;return this._opt.useMSE&&this.mseDecoder&&(e=this.mseDecoder.getVideoBufferDelayTime(),e=parseInt(1e3*e,10)),e}updateCurrentPts(e){this.updateStats({currentPts:e}),this.emit(Xe.currentPts,e)}getRenderCurrentPts(){let e=0;return e=this._stats.currentPts?this._stats.currentPts:this.videoTimestamp-this.getMseVideoBufferDelayTime(),e}openSyncAudioAndVideo(){return this._opt.syncAudioAndVideo&&this._opt.hasVideo}showTipsMessageByCode(e){if(this.control){const t=this._opt.showMessageConfig[e]||"未知异常";this.control.showTipsMessage(t,e)}}showTipsMessageByContent(e){this.control&&e&&this.control.showTipsMessage(e)}hideTipsMessage(){this.control&&this.control.hideTipsMessage()}decoderCheckFirstIFrame(){ha(this._opt.checkFirstIFrame)&&(this.mseDecoder?this.mseDecoder.isDecodeFirstIIframe=!1:this.webcodecsDecoder&&(this.webcodecsDecoder.isDecodeFirstIIframe=!1))}isHlsCanVideoPlay(){return this._canPlayAppleMpegurl&&this.isOldHls()}}class _y{constructor(e){const{fromSampleRate:t,toSampleRate:i,channels:s,inputBufferSize:r}=e;if(!t||!i||!s)throw new Error("Invalid settings specified for the resampler.");this.resampler=null,this.fromSampleRate=t,this.toSampleRate=i,this.channels=s||0,this.inputBufferSize=r,this.initialize()}initialize(){this.fromSampleRate==this.toSampleRate?(this.resampler=e=>e,this.ratioWeight=1):(this.fromSampleRate{let t,i,s,r,a,o,n,l,h,d=e.length,c=this.channels;if(d%c!=0)throw new Error("Buffer was of incorrect sample length.");if(d<=0)return[];for(t=this.outputBufferSize,i=this.ratioWeight,s=this.lastWeight,r=0,a=0,o=0,n=0,l=this.outputBuffer;s<1;s+=i)for(a=s%1,r=1-a,this.lastWeight=s%1,h=0;h0?h:0)]*r+e[o+(c+h)]*a;s+=i,o=Math.floor(s)*c}for(h=0;h{let t,i,s,r,a,o,n,l,h,d,c,u=e.length,p=this.channels;if(u%p!=0)throw new Error("Buffer was of incorrect sample length.");if(u<=0)return[];for(t=this.outputBufferSize,i=[],s=this.ratioWeight,r=0,o=0,n=0,l=!this.tailExists,this.tailExists=!1,h=this.outputBuffer,d=0,c=0,a=0;a0&&o=n)){for(a=0;a0?a:0)]*r;c+=r,r=0;break}for(a=0;a{t[i]=function(e){let t,i,s;return e>=0?t=213:(t=85,(e=-e-1)<0&&(e=32767)),i=Sy(e,wy,8),i>=8?127^t:(s=i<<4,s|=i<2?e>>4&15:e>>i+3&15,s^t)}(e)})),t}function Ey(e){const t=[];return Array.prototype.slice.call(e).forEach(((e,i)=>{t[i]=function(e){let t=0;e<0?(e=132-e,t=127):(e+=132,t=255);let i=Sy(e,wy,8);return i>=8?127^t:(i<<4|e>>i+3&15)^t}(e)})),t}class ky extends ba{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this._opt={},e&&(this.player=e),this.tag="talk";const i=aa(es);this._opt=Object.assign({},i,t),this._opt.sampleRate=parseInt(this._opt.sampleRate,10),this._opt.sampleBitsWidth=parseInt(this._opt.sampleBitsWidth,10),this.audioContext=null,this.gainNode=null,this.recorder=null,this.workletRecorder=null,this.biquadFilter=null,this.userMediaStream=null,this.clearWorkletUrlTimeout=null,this.bufferSize=512,this._opt.audioBufferLength=this.calcAudioBufferLength(),this.audioBufferList=[],this.socket=null,this.socketStatus=it,this.mediaStreamSource=null,this.heartInterval=null,this.checkGetUserMediaTimeout=null,this.wsUrl=null,this.startTimestamp=0,this.sequenceId=0,this.tempTimestamp=null,this.tempRtpBufferList=[],this.events=new Aa(this),this._initTalk(),this.player||(this.debug=new Us(this)),this._opt.encType!==gi&&this._opt.encType!==yi||8e3===this._opt.sampleRate&&16===this._opt.sampleBitsWidth||this.warn(this.tag,`\n encType is ${this._opt.encType} and sampleBitsWidth is ${this._opt.sampleBitsWidth}, set sampleBitsWidth to ${this._opt.sampleBitsWidth}。\n ${this._opt.encType} only support sampleRate 8000 and sampleBitsWidth 16`),this.log(this.tag,"init",JSON.stringify(this._opt))}destroy(){this.clearWorkletUrlTimeout&&(clearTimeout(this.clearWorkletUrlTimeout),this.clearWorkletUrlTimeout=null),this.userMediaStream&&(this.userMediaStream.getTracks&&this.userMediaStream.getTracks().forEach((e=>{e.stop()})),this.userMediaStream=null),this.mediaStreamSource&&(this.mediaStreamSource.disconnect(),this.mediaStreamSource=null),this.recorder&&(this.recorder.disconnect(),this.recorder.onaudioprocess=null,this.recorder=null),this.biquadFilter&&(this.biquadFilter.disconnect(),this.biquadFilter=null),this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),this.workletRecorder&&(this.workletRecorder.disconnect(),this.workletRecorder=null),this.socket&&(this.socketStatus===st&&this._sendClose(),this.socket.close(),this.socket=null),this._stopHeartInterval(),this._stopCheckGetUserMediaTimeout(),this.audioContext=null,this.gainNode=null,this.recorder=null,this.audioBufferList=[],this.sequenceId=0,this.wsUrl=null,this.tempTimestamp=null,this.tempRtpBufferList=[],this.startTimestamp=0,this.log("talk","destroy")}addRtpToBuffer(e){const t=e.length+this.tempRtpBufferList.length,i=new Uint8Array(t);i.set(this.tempRtpBufferList,0),i.set(e,this.tempRtpBufferList.length),this.tempRtpBufferList=i}downloadRtpFile(){const e=new Blob([this.tempRtpBufferList]);try{const t=document.createElement("a");t.href=window.URL.createObjectURL(e),t.download=Date.now()+".rtp",t.click(),window.URL.revokeObjectURL(t.href)}catch(e){console.error("downloadRtpFile",e)}}calcAudioBufferLength(){const{sampleRate:e,sampleBitsWidth:t}=this._opt;return 8*e*.02/8}get socketStatusOpen(){return this.socketStatus===st}log(){for(var e=arguments.length,t=new Array(e),i=0;i1?t-1:0),s=1;s{const i=this.events.proxy;this.socket=new WebSocket(this.wsUrl),this.socket.binaryType="arraybuffer",this.emit(Xe.talkStreamStart),i(this.socket,Ki,(()=>{this.socketStatus=st,this.log(this.tag,"websocket open -> do talk"),this.emit(Xe.talkStreamOpen),e(),this._doTalk()})),i(this.socket,Qi,(e=>{this.log(this.tag,"websocket message",e.data)})),i(this.socket,qi,(e=>{this.socketStatus=rt,this.warn(this.tag,"websocket close -> reject",e),this.emit(Xe.talkStreamClose),t(e)})),i(this.socket,Yi,(e=>{this.socketStatus=at,this.error(this.tag,"websocket error -> reject",e),this.emit(Xe.talkStreamError,e),t(e)}))}))}_sendClose(){}_initTalk(){this._initMethods(),this._opt.engine===Xi?this._initWorklet():this._opt.engine===Zi&&this._initScriptProcessor(),this.log(this.tag,"audioContext samplerate",this.audioContext.sampleRate)}_initMethods(){this.audioContext=new(window.AudioContext||window.webkitAudioContext)({sampleRate:48e3}),this.gainNode=this.audioContext.createGain(),this.gainNode.gain.value=1,this.biquadFilter=this.audioContext.createBiquadFilter(),this.biquadFilter.type="lowpass",this.biquadFilter.frequency.value=3e3,this.resampler=new _y({fromSampleRate:this.audioContext.sampleRate,toSampleRate:this._opt.sampleRate,channels:this._opt.numberChannels,inputBufferSize:this.bufferSize})}_initScriptProcessor(){const e=this.audioContext.createScriptProcessor||this.audioContext.createJavaScriptNode;this.recorder=e.apply(this.audioContext,[this.bufferSize,this._opt.numberChannels,this._opt.numberChannels]),this.recorder.onaudioprocess=e=>this._onaudioprocess(e)}_initWorklet(){const e=Xr((function(){class e extends AudioWorkletProcessor{constructor(e){super(),this._cursor=0,this._bufferSize=e.processorOptions.bufferSize,this._buffer=new Float32Array(this._bufferSize)}process(e,t,i){if(!e.length||!e[0].length)return!0;for(let t=0;t{const e=new AudioWorkletNode(this.audioContext,"talk-processor",{processorOptions:{bufferSize:this.bufferSize}});e.connect(this.gainNode),e.port.onmessage=e=>{"data"===e.data.eventType&&this._encodeAudioData(e.data.buffer)},this.workletRecorder=e})),this.clearWorkletUrlTimeout=setTimeout((()=>{URL.revokeObjectURL(e),this.clearWorkletUrlTimeout=null}),Q)}_onaudioprocess(e){const t=e.inputBuffer.getChannelData(0);this._encodeAudioData(new Float32Array(t))}_encodeAudioData(e){if(0===e[0]&&0===e[1])return void this.log(this.tag,"empty audio data");const t=this.resampler.resample(e);let i=t;if(16===this._opt.sampleBitsWidth?i=function(e){let t=e.length,i=new Int16Array(t);for(;t--;){let s=Math.max(-1,Math.min(1,e[t]));i[t]=s<0?32768*s:32767*s}return i}(t):8===this._opt.sampleBitsWidth&&(i=function(e){let t=e.length,i=new Int8Array(t);for(;t--;){let s=Math.max(-1,Math.min(1,e[t]));const r=s<0?32768*s:32767*s;i[t]=parseInt(255/(65535/(32768+r)),10)}return i}(t)),null!==i.buffer){let e=null;this._opt.encType===gi?e=Ty(i):this._opt.encType===yi?e=Ey(i):this._opt.encType===Ai&&(e=i);const t=new Uint8Array(e);for(let e=0;e>8,t[n++]=255&e>>0}t[n++]=128,t[n++]=128+i,t[n++]=s/256,t[n++]=s%256,t[n++]=r/65536/256,t[n++]=r/65536%256,t[n++]=r%65536/256,t[n++]=r%65536%256,t[n++]=a/65536/256,t[n++]=a/65536%256,t[n++]=a%65536/256,t[n++]=a%65536%256;let l=t.concat([...e]),h=new Uint8Array(l.length);for(let e=0;e{this.log(this.tag,"getUserMedia success"),this.userMediaStream=e,this.mediaStreamSource=this.audioContext.createMediaStreamSource(e),this.mediaStreamSource.connect(this.biquadFilter),this.recorder?(this.biquadFilter.connect(this.recorder),this.recorder.connect(this.gainNode)):this.workletRecorder&&(this.biquadFilter.connect(this.workletRecorder),this.workletRecorder.connect(this.gainNode)),this.gainNode.connect(this.audioContext.destination),this.emit(Xe.talkGetUserMediaSuccess),null===e.oninactive&&(e.oninactive=e=>{this._handleStreamInactive(e)})})).catch((e=>{this.error(this.tag,"getUserMedia error",e.toString()),this.emit(Xe.talkGetUserMediaFail,e.toString())})).finally((()=>{this.log(this.tag,"getUserMedia finally"),this._stopCheckGetUserMediaTimeout()}))}_getUserMedia2(){this.log(this.tag,"getUserMedia"),navigator.mediaDevices?navigator.mediaDevices.getUserMedia({audio:!0}).then((e=>{this.log(this.tag,"getUserMedia2 success")})):navigator.getUserMedia({audio:!0},this.log(this.tag,"getUserMedia2 success"),this.log(this.tag,"getUserMedia2 fail"))}async _getUserMedia3(){this.log(this.tag,"getUserMedia3");try{const e=await navigator.mediaDevices.getUserMedia({audio:{latency:!0,noiseSuppression:!0,autoGainControl:!0,echoCancellation:!0,sampleRate:48e3,channelCount:1},video:!1});console.log("getUserMedia() got stream:",e),this.log(this.tag,"getUserMedia3 success")}catch(e){this.log(this.tag,"getUserMedia3 fail")}}_handleStreamInactive(e){this.userMediaStream&&(this.warn(this.tag,"stream oninactive",e),this.emit(Xe.talkStreamInactive))}_startCheckGetUserMediaTimeout(){this._stopCheckGetUserMediaTimeout(),this.checkGetUserMediaTimeout=setTimeout((()=>{this.log(this.tag,"check getUserMedia timeout"),this.emit(Xe.talkGetUserMediaTimeout)}),this._opt.getUserMediaTimeout)}_stopCheckGetUserMediaTimeout(){this.checkGetUserMediaTimeout&&(this.log(this.tag,"stop checkGetUserMediaTimeout"),clearTimeout(this.checkGetUserMediaTimeout),this.checkGetUserMediaTimeout=null)}_startHeartInterval(){this.heartInterval=setInterval((()=>{this.log(this.tag,"heart interval");let e=[35,36,0,0,0,0,0,0];e=new Uint8Array(e),this.socket.send(e.buffer)}),15e3)}_stopHeartInterval(){this.heartInterval&&(this.log(this.tag,"stop heart interval"),clearInterval(this.heartInterval),this.heartInterval=null)}startTalk(e){return new Promise(((t,i)=>{if(!function(){let e=!1;const t=window.navigator;return t&&(e=!(!t.mediaDevices||!t.mediaDevices.getUserMedia),e||(e=!!(t.getUserMedia||t.webkitGetUserMedia||t.mozGetUserMedia||t.msGetUserMedia))),e}())return i("not support getUserMedia");if(this.wsUrl=e,this._opt.testMicrophone)this._doTalk();else{if(!this.wsUrl)return i("wsUrl is null");this._createWebSocket().catch((e=>{i(e)}))}this.once(Xe.talkGetUserMediaFail,(()=>{i("getUserMedia fail")})),this.once(Xe.talkGetUserMediaSuccess,(()=>{t()}))}))}setVolume(e){e=parseFloat(e).toFixed(2),isNaN(e)||(e=rr(e,0,1),this.gainNode.gain.value=e)}getOption(){return this._opt}get volume(){return this.gainNode?parseFloat(100*this.gainNode.gain.value).toFixed(0):null}}class Cy{constructor(e){this.player=e,this.globalSetting=null;const t=_r();this.defaultSettings={watermark_id:`JessibucaPro_${t}`,watermark_prefix:`JessibucaPro_mask_${t}`,watermark_txt:"JessibucaPro 测试水印",watermark_x:0,watermark_y:0,watermark_rows:0,watermark_cols:0,watermark_x_space:0,watermark_y_space:0,watermark_font:"微软雅黑",watermark_color:"black",watermark_fontsize:"18px",watermark_alpha:.15,watermark_width:150,watermark_height:100,watermark_angle:15,watermark_parent_width:0,watermark_parent_height:0,watermark_parent_node:null},this.load({text:decodeURIComponent("JessibucaPro%20%E4%BD%93%E9%AA%8C"),color:"white"}),this.player.debug.log("Watermark","int")}destroy(){this._removeMark(),this.globalSetting=null,this.defaultSettings={watermark_id:"",watermark_prefix:"",watermark_txt:"JessibucaPro 测试水印",watermark_x:0,watermark_y:0,watermark_rows:0,watermark_cols:0,watermark_x_space:0,watermark_y_space:0,watermark_font:"微软雅黑",watermark_color:"black",watermark_fontsize:"18px",watermark_alpha:.15,watermark_width:150,watermark_height:100,watermark_angle:15,watermark_parent_width:0,watermark_parent_height:0,watermark_parent_node:null},this.player.debug.log("Watermark","destroy")}remove(){}load(e){this.globalSetting=e,this._loadMark(e)}resize(){this.player.debug.log("Watermark","resize()"),this.globalSetting&&this._loadMark(this.globalSetting)}_loadMark(){let e=this.defaultSettings;if(1===arguments.length&&"object"==typeof arguments[0]){var t=arguments[0]||{};for(let i in t)t[i]&&e[i]&&t[i]===e[i]||(t[i]||0===t[i])&&(e[i]=t[i])}var i=document.getElementById(e.watermark_id);i&&i.parentNode&&i.parentNode.removeChild(i);var s="string"==typeof e.watermark_parent_node?document.getElementById(e.watermark_parent_node):e.watermark_parent_node,r=s||document.body;const a=r.getBoundingClientRect();var o=Math.max(r.scrollWidth,r.clientWidth,a.width),n=Math.max(r.scrollHeight,r.clientHeight,a.height),l=arguments[0]||{},h=r;(l.watermark_parent_width||l.watermark_parent_height)&&h&&(e.watermark_x=e.watermark_x+0,e.watermark_y=e.watermark_y+0);var d=document.getElementById(e.watermark_id),c=null;if(d)d.shadowRoot&&(c=d.shadowRoot);else{(d=document.createElement("div")).id=e.watermark_id,d.setAttribute("style","pointer-events: none !important; display: block !important"),c="function"==typeof d.attachShadow?d.attachShadow({mode:"open"}):d;var u=r.children,p=Math.floor(Math.random()*(u.length-1))+1;u[p]?r.insertBefore(d,u[p]):r.appendChild(d)}e.watermark_cols=parseInt((o-e.watermark_x)/(e.watermark_width+e.watermark_x_space));var f,m=parseInt((o-e.watermark_x-e.watermark_width*e.watermark_cols)/e.watermark_cols);e.watermark_x_space=m?e.watermark_x_space:m,e.watermark_rows=parseInt((n-e.watermark_y)/(e.watermark_height+e.watermark_y_space));var g,y,A,b=parseInt((n-e.watermark_y-e.watermark_height*e.watermark_rows)/e.watermark_rows);e.watermark_y_space=b?e.watermark_y_space:b,s?(f=e.watermark_x+e.watermark_width*e.watermark_cols+e.watermark_x_space*(e.watermark_cols-1),g=e.watermark_y+e.watermark_height*e.watermark_rows+e.watermark_y_space*(e.watermark_rows-1)):(f=0+e.watermark_x+e.watermark_width*e.watermark_cols+e.watermark_x_space*(e.watermark_cols-1),g=0+e.watermark_y+e.watermark_height*e.watermark_rows+e.watermark_y_space*(e.watermark_rows-1));for(var v=0;vt)){for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i===t?s[r]=Zy(e[r]):"object"==typeof e[r]?s[r]=eA(e[r],t,i+1):s[r]=e[r]);return s}}function tA(){return(new Date).toLocaleString()}class iA{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player=e,this.logMaxSize=(null==t?void 0:t.logMaxSize)||204800,this.logSize=0,this.logTextArray=[]}destroy(){this.clear()}clear(){this.logSize=0,this.logTextArray=[]}logCache(){let e="";try{for(var t=arguments.length,i=new Array(t),s=0;seA(e)));e="[JbPro] "+tA()+JSON.stringify(r)}catch(e){return}if(this.logSize+=e.length,this.logTextArray.push(e),this.logSize>this.logMaxSize){const e=this.logTextArray.shift();this.logSize-=e.length}}download(){const e=this.logTextArray.join("\n");this.clear();const t=new Blob([e],{type:"text/plain"});Ua(t,"JbPro-"+tA()+".log")}}class sA extends ba{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._opt={},this.$container=null,Object.keys(e).forEach((t=>{if(void 0===e[t])throw new Error(`JbPro option "${t}" can not be undefined`)})),this.originalOptions=e;const t=oa();let i=Object.assign({},t,e);i.url="",i.isMulti&&(i.debugUuid="xxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))),this.debug=new Us(this);let s=e.container;if("string"==typeof e.container&&(s=document.querySelector(e.container)),!s)throw this.debug.error("JbPro","JbPro need container option and now container is",e.container),new Error("JbPro need container option");if(i.decoder&&da(-1!==i.decoder.indexOf("decoder-pro.js")||-1!==i.decoder.indexOf("decoder-pro-simd.js")))throw this.debug.error("JbPro",`JbPro decoder ${i.decoder} must be decoder-pro.js or decoder-pro-simd.js`),new Error(`JbPro decoder ${i.decoder} must be decoder-pro.js or decoder-pro-simd.js`);if("CANVAS"===s.nodeName||"VIDEO"===s.nodeName)throw this.debug.error("JbPro",`JbPro container type can not be ${s.nodeName} type`),new Error(`JbPro container type can not be ${s.nodeName} type`);if(i.videoBuffer>=i.heartTimeout)throw this.debug.error("JbPro",`JbPro videoBuffer ${i.videoBuffer}s must be less than heartTimeout ${i.heartTimeout}s`),new Error(`JbPro videoBuffer ${i.videoBuffer}s must be less than heartTimeout ${i.heartTimeout}s`);if(this._checkHasCreated(s))throw this.debug.error("JbPro","JbPro container has been created and can not be created again",s),new Error("JbPro container has been created and can not be created again",s);var r,a,o;if(s.classList.add("jessibuca-container"),r=s,a=Y,o=_r(),r&&(r.dataset?r.dataset[a]=o:r.setAttribute("data-"+a,o)),da(i.isLive)){const e=document.createElement("video");return e.muted=!0,e.setAttribute("controlsList","nodownload"),e.disablePictureInPicture="disablePictureInPicture",e.style.position="absolute",e.style.top=0,e.style.left=0,e.style.height="100%",e.style.width="100%",s.appendChild(e),this.$videoElement=e,this.$container=s,void(this._opt=i)}if(delete i.container,Ir(i.videoBuffer)&&(i.videoBuffer=1e3*Number(i.videoBuffer)),Ir(i.videoBufferDelay)&&(i.videoBufferDelay=1e3*Number(i.videoBufferDelay)),Ir(i.networkDelay)&&(i.networkDelay=1e3*Number(i.networkDelay)),Ir(i.aiFaceDetectInterval)&&(i.aiFaceDetectInterval=1e3*Number(i.aiFaceDetectInterval)),Ir(i.aiObjectDetectInterval)&&(i.aiObjectDetectInterval=1e3*Number(i.aiObjectDetectInterval)),Ir(i.timeout)&&(Dr(i.loadingTimeout)&&(i.loadingTimeout=i.timeout),Dr(i.heartTimeout)&&(i.heartTimeout=i.timeout)),Ir(i.autoWasm)&&(Dr(i.decoderErrorAutoWasm)&&(i.decoderErrorAutoWasm=i.autoWasm),Dr(i.hardDecodingNotSupportAutoWasm)&&(i.hardDecodingNotSupportAutoWasm=i.autoWasm)),Ir(i.aiFaceDetectLevel)&&Dr(i.aiFaceDetectWidth)){const e=ks[i.aiFaceDetectLevel];e&&(i.aiFaceDetectWidth=e)}if(Ir(i.aiObjectDetectLevel)&&Dr(i.aiObjectDetectWidth)){const e=Cs[i.aiObjectDetectLevel];e&&(i.aiObjectDetectWidth=e)}ha(i.isCrypto)&&(i.isM7sCrypto=!0),this._opt=i,this._destroyed=!1,this.$container=s,this._tempPlayBgObj={},this._loadingTimeoutReplayTimes=0,this._heartTimeoutReplayTimes=0,this.events=new Aa(this),this.watermark=new Cy(this),this.memoryLogger=new iA(this),this._initPlayer(s,i),this._initWatermark(),this.debug.log("JbPro",'init success and version is "12-25-2023"'),console.log('JbPro Version is "12-25-2023" '+(da(dr)?"and is Trial Version[试用版本]":""))}destroy(){return new Promise(((e,t)=>{this.debug.log("JbPro","destroy()"),this._destroyed=!0,this.off(),this.$videoElement&&(this.$videoElement.pause(),this.$videoElement.currentTime=0,this.$videoElement.srcObject&&(this.$videoElement.srcObject=null,this.$videoElement.removeAttribute("srcObject")),this.$videoElement.src&&(this.$videoElement.src="",this.$videoElement.removeAttribute("src")),this.$container&&this.$container.removeChild(this.$videoElement),this.$videoElement=null),this.player?this.player.destroy().then((()=>{this.player=null,this._destroy(),setTimeout((()=>{e()}),0)})).catch((()=>{t()})):(this._destroy(),setTimeout((()=>{e()}),0))}))}_destroy(){var e,t;this.events&&(this.events.destroy(),this.events=null),this.talk&&(this.talk.destroy(),this.talk=null),this.watermark&&(this.watermark.destroy(),this.watermark=null),this.memoryLogger&&(this.memoryLogger.destroy(),this.memoryLogger=null),this.$container&&(this.$container.classList.remove("jessibuca-container"),this.$container.classList.remove("jessibuca-fullscreen-web"),e=this.$container,t=Y,e&&(e.dataset?delete e.dataset[t]:e.removeAttribute("data-"+t)),this.$container=null),this.debug&&this.debug.log("JbPro","destroy end"),this._resetOpt(),this._tempPlayBgObj=null,this._loadingTimeoutReplayTimes=0,this._heartTimeoutReplayTimes=0}_resetOpt(){this._opt=oa()}_getOriginalOpt(){const e=oa();return Object.assign({},e,this.originalOptions)}_initPlayer(e,t){this.player=new vy(e,t),this._bindEvents()}_initTalk(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.talk&&(this.talk.destroy(),this.talk=null),this.player&&(e.debug=this.player._opt.debug),this.talk=new ky(this.player,e),this.debug.log("JbPro","_initTalk",this.talk.getOption()),this._bindTalkEvents()}_resetPlayer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((t,i)=>{const s=()=>{this._opt.url="",this._opt.playOptions={},this._opt=Object.assign(this._opt,e),this._initPlayer(this.$container,this._opt)};this.player?this.player.destroy().then((()=>{this.player=null,s(),setTimeout((()=>{t()}),0)})):(s(),setTimeout((()=>{t()}),0))}))}_bindEvents(){var e=this;Object.keys(Ze).forEach((t=>{this.player.on(Ze[t],(function(){for(var i=arguments.length,s=new Array(i),r=0;r{this.player&&this.player.showTipsMessageByCode(e)})),this.player.once(Xe.beforeDestroy,(()=>{this.emit(Xe.close),this.destroy().then((()=>{})).catch((e=>{}))})),this.player.on(Xe.resize,(()=>{this.watermark&&this.watermark.resize()})),this.player.on(Xe.fullscreen,(()=>{this.watermark&&this.watermark.resize()})),this.player.on(Xe.videoInfo,(()=>{this.player&&(this.player.singleWatermark&&this.player.singleWatermark.resize(),this.player.ghostWatermark&&this.player.ghostWatermark.resize(),this.player.dynamicWatermark&&this.player.dynamicWatermark.resize())})),this.player.on(Xe.memoryLog,(function(){e.memoryLogger.logCache(...arguments)})),this.player.on(Xe.downloadMemoryLog,(()=>{this.downloadMemoryLog()}))}_bindTalkEvents(){Object.keys(et).forEach((e=>{this.player.on(et[e],(t=>{this.emit(e,t)}))}))}_initWatermark(){if(this._opt.fullscreenWatermarkConfig.text=decodeURIComponent("JessibucaPro%20%E4%BD%93%E9%AA%8C"),this._opt.fullscreenWatermarkConfig.color="white",Gr(this._opt.fullscreenWatermarkConfig)){const e=Br(this.$container,this._opt.fullscreenWatermarkConfig);if(!e.watermark_txt)return void this.debug.warn("JbPro","fullscreenWatermarkConfig text is empty");this.watermark.load(e)}}_checkHasCreated(e){if(!e)return!1;const t=function(e,t){return e?e.dataset?e.dataset[t]:e.getAttribute("data-"+t):""}(e,Y);return!!t}isDestroyed(){return this._destroyed}getOption(){return this.player?this.player.getOption():{}}setDebug(e){this.debug.log("JbPro",`setDebug() ${e}`),this._opt.debug=!!e,this.player?this.player.updateOption({debug:!!e},!0):this.debug.warn("JbPro","player is not init")}getIsDebug(){let e=!1;return this.player&&(e=this.player._opt.debug),e}mute(){this.debug.log("JbPro","mute()"),this.player&&this.player.mute(!0)}cancelMute(){this.debug.log("JbPro","cancelMute()"),this.player&&this.player.mute(!1)}setVolume(e){this.debug.log("JbPro",`setVolume() ${e}`),this.player&&(this.player.volume=e)}getVolume(){let e=null;return this.player&&(e=this.player.volume,e=parseFloat(e).toFixed(2)),e}audioResume(){this.debug.log("JbPro","audioResume()"),this.player&&this.player.audio?this.player.audio.audioEnabled(!0):this.debug.warn("JbPro","audioResume error")}setTimeout(e){this.debug.log("JbPro",`setTimeout() ${e}`),e=Number(e),isNaN(e)?this.debug.warn("JbPro",`setTimeout error: ${e} is not a number`):(this._opt.timeout=e,this._opt.loadingTimeout=e,this._opt.heartTimeout=e,this.player&&this.player.updateOption({timeout:e,loadingTimeout:e,heartTimeout:e}))}setScaleMode(e){this.debug.log("JbPro",`setScaleMode() ${e}`),this.player?this.player.setScaleMode(e):this.debug.warn("JbPro","setScaleMode() player is null")}pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((t,i)=>{this.debug.log("JbPro",`pause() ${e}`),this._opt.pauseAndNextPlayUseLastFrameShow&&(this._tempPlayBgObj=this._getVideoLastIframeInfo()),this._pause(e).then((e=>{t(e)})).catch((e=>{i(e)}))}))}_pause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((t,i)=>{if(this.debug.log("JbPro",`_pause() ${e}`),this.isDestroyed())return i("JbPro is destroyed");this.player?this.player.pause(e).then((e=>{t(e)})).catch((e=>{i(e)})):i("player is null")}))}close(){return new Promise(((e,t)=>{this.debug.log("JbPro","close()"),this._opt.url="",this._loadingTimeoutReplayTimes=0,this._heartTimeoutReplayTimes=0,this.player?this.player.close().then((()=>{e()})).catch((e=>{t(e)})):t("player is null")}))}clearView(){this.debug.log("JbPro","clearView()"),this.player&&this.player.video?this.getRenderType()===z?this.player.video.clearView():this.debug.warn("JbPro","clearView","render type is video, not support clearView, please use canvas render type"):this.debug.warn("JbPro","clearView","player is null")}play(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{if(this.debug.log("JbPro",`play() ${e}`,JSON.stringify(t)),!e&&!this._opt.url)return this.emit(Xe.error,tt.playError),void s("url is null and this._opt.url is null");if(e&&(e=(""+e).trim(),-1===e.indexOf("http:")&&-1===e.indexOf("https:")&&-1===e.indexOf("webrtc:")&&-1===e.indexOf("ws:")&&-1===e.indexOf("wss:")&&-1===e.indexOf("wt:")&&-1===e.indexOf("artc:")))return s(`url ${e} must be "http:" or "https:" or "webrtc:" or "ws:" or "wss:" or "wt:" or "artc:" protocol`);if(da(this._opt.isLive))return this.$videoElement.controls="controls",this.$videoElement.muted=!1,this.$videoElement.src=e,this.$videoElement.play(),void i(this.$videoElement);if(this._opt.isM7sCrypto){let r=t.cryptoKey||this._opt.playOptions.cryptoKey,a=t.cryptoIV||this._opt.playOptions.cryptoIV;if(this._opt.m7sCryptoKey&&(!r||!a)){const e=this._opt.m7sCryptoKey.split(".");r=sa(e[0]),a=sa(e[1])}if(!r||!a){const r=e||this._opt.url;return void this._cryptoPlay(r).then((r=>{let{cryptoIV:a,cryptoKey:o}=r;this._opt.playOptions.cryptoKey=o,this._opt.playOptions.cryptoIV=a,t.cryptoIV=a,t.cryptoKey=o,this._playBefore(e,t).then((()=>{i()})).catch((e=>{s(e)}))})).catch((e=>{s(e)}))}this._opt.playOptions.cryptoKey=r,this._opt.playOptions.cryptoIV=a,t.cryptoIV=a,t.cryptoKey=r}else if(this._opt.isXorCrypto){let e=t.cryptoKey||this._opt.playOptions.cryptoKey,i=t.cryptoIV||this._opt.playOptions.cryptoIV;if(this._opt.xorCryptoKey&&(!e||!i)){const t=this._opt.xorCryptoKey.split(".");e=sa(t[0]),i=sa(t[1])}e&&i&&(this._opt.playOptions.cryptoKey=e,this._opt.playOptions.cryptoIV=i,t.cryptoIV=i,t.cryptoKey=e)}this._playBefore(e,t).then((()=>{i()})).catch((e=>{s(e)}))}))}_playBefore(e,t){return new Promise(((i,s)=>{if(this.player)if(e)if(this._opt.url)if(e===this._opt.url)if(this.player.playing)this.debug.log("JbPro","_playBefore","playing and resolve()"),i();else{this.debug.log("JbPro","_playBefore","this._opt.url === url and pause -> play and destroy play");let e=this._getOriginalOpt();this._opt.pauseAndNextPlayUseLastFrameShow&&this._tempPlayBgObj&&this._tempPlayBgObj.loadingBackground&&(e=Object.assign(e,this._tempPlayBgObj));const t=this._opt.url,r=this._opt.playOptions;this._resetPlayer(e).then((()=>{this._play(t,r).then((()=>{this.player.resumeAudioAfterPause(),i()})).catch((e=>{this.debug.error("JbPro","_playBefore this.player.play error",e),this.emit(Xe.crashLog,this.getCrashLog("this.player.play 1",e)),s(e)}))})).catch((e=>{this.debug.error("JbPro","_resetPlayer error",e)}))}else{this.debug.log("JbPro","_playBefore",`\n this._url.url is ${this._opt.url}\n and new url is ${e}\n and destroy and play new url`);const r=this._getOriginalOpt();this._resetPlayer(r).then((()=>{this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(Xe.crashLog,this.getCrashLog("this.player.play 2",e)),s(e)}))})).catch((e=>{this.debug.error("JbPro","_resetPlayer error",e)}))}else this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(Xe.crashLog,this.getCrashLog("this.player.play 3",e)),s(e)}));else{let e=this._getOriginalOpt();this._opt.pauseAndNextPlayUseLastFrameShow&&this._tempPlayBgObj&&this._tempPlayBgObj.loadingBackground&&(e=Object.assign(e,this._tempPlayBgObj));const t=this._opt.url,r=this._opt.playOptions;this._resetPlayer(e).then((()=>{this._play(t,r).then((()=>{this.player.resumeAudioAfterPause(),i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(Xe.crashLog,this.getCrashLog("this.player.play 4",e)),s(e)}))})).catch((e=>{this.debug.error("JbPro","_resetPlayer error",e)}))}else e?this._play(e,t).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(Xe.crashLog,this.getCrashLog("this.player.play 5",e)),s(e)})):this._play(this._opt.url,this._opt.playOptions).then((()=>{i()})).catch((e=>{this.debug.error("JbPro","_playBefore _play error",e),this.emit(Xe.crashLog,this.getCrashLog("this.player.play 6",e)),s(e)}))}))}_cryptoPlay(e){return new Promise(((t,i)=>{const s=function(e){const t=(e||document.location.toString()).split("//"),i=t[1].indexOf("/");let s=t[1].substring(i);return-1!=s.indexOf("?")&&(s=s.split("?")[0]),s}(e);let r=this._opt.cryptoKeyUrl,a="";const o=ra(e);if(r){if(a=r,this._opt.isM7sCrypto&&-1===a.indexOf("/crypto/?stream=")){const e=ra(r);a=e.origin+q+`?stream=${s}`}}else r=o.origin+q,a=r+`?stream=${s}`;var n;this.player.debug.log("JbPro",`_cryptoPlay() cryptoKeyUrl: ${a} and opt.cryptoKeyUrl: ${this._opt.cryptoKeyUrl}`),(n=a,new Promise(((e,t)=>{pn.get(n).then((t=>{e(t)})).catch((e=>{t(e)}))}))).then((e=>{if(e){const s=e.split("."),r=sa(s[0]),a=sa(s[1]);a&&r?t({cryptoIV:a,cryptoKey:r}):i("get cryptoIV or cryptoKey error")}else i(`cryptoKeyUrl: getM7SCryptoStreamKey ${a} res is null`)})).catch((e=>{i(e)}))}))}playback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{if(this.debug.log("JbPro",`playback() ${e}, options: ${JSON.stringify(t)}`),da(this._opt.isLive))return s("this._opt.isLive is false, can not playback");const r=na(),a=Object.assign({},r.playbackConfig,this._opt.playbackConfig,t);a.isUseFpsRender||a.isCacheBeforeDecodeForFpsRender&&(a.isCacheBeforeDecodeForFpsRender=!1,this.debug.warn("JbPro","playbackConfig.isUseFpsRender is false, isCacheBeforeDecodeForFpsRender can not be ture, isCacheBeforeDecodeForFpsRender is set to false")),0===a.rateConfig.length&&a.showRateBtn&&(a.showRateBtn=!1,this.debug.warn("JbPro","playbackConfig.rateConfig.length is 0, showRateBtn can not be ture, showRateBtn is set to false")),a.controlType,J.simple,this._resetPlayer({videoBuffer:0,playbackConfig:a,playType:y,openWebglAlignment:!0,useMSE:a.useMSE,useWCS:a.useWCS,useSIMD:!0}).then((()=>{this.play(e,t).then((()=>{i()})).catch((e=>{s(e)}))})).catch((e=>{s(e)}))}))}playbackPause(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.debug.log("JbPro",`playbackPause() ${e}`),this._opt.playType===m?Promise.reject("playType is player, can not call playbackPause method"):new Promise(((t,i)=>{if(!this.player)return i("player is null");ha(e)?this._pause().then((()=>{t()})).catch((e=>{i(e)})):(this.player.playbackPause=!0,t())}))}playbackResume(){return this.debug.log("JbPro","playbackResume()"),this._opt.playType===m?Promise.reject("playType is player, can not call playbackResume method"):new Promise(((e,t)=>{if(!this.player)return t();this.player.playbackPause=!1,e()}))}forward(e){return this.debug.log("JbPro",`forward() ${e}`),da(this._opt.isLive)||this._opt.playType===m?Promise.reject("forward() method only just for playback type"):Tr(Number(e))?new Promise(((t,i)=>{this.player?(e=rr(Number(e),.1,32),this.player.decoderWorker&&this.player.decoderWorker.updateWorkConfig({key:"playbackRate",value:e}),this.player.playback.setRate(e),this.player.video&&this.player.video.setRate(e),this.player.audio&&this.player.audio.setRate(e),(this.player.isPlaybackUseWCS()||this.player.isPlaybackUseMSE())&&(this.player.demux.dropBuffer$2(),this.player.isPlaybackCacheBeforeDecodeForFpsRender()&&this.player.demux.initPlaybackCacheLoop()),t()):i("player is not playing")})):Promise.reject(`forward() params "rate": ${e} must be number type`)}playbackForward(e){return this.forward(e)}normal(){return this.forward(1)}playbackNormal(){return this.normal()}updatePlaybackForwardMaxRateDecodeIFrame(e){this.debug.log("JbPro",`updatePlaybackForwardMaxRateDecodeIFrame() ${e}`),e=Number(e),e=rr(e=parseInt(e,10),1,8),this._opt.playbackForwardMaxRateDecodeIFrame=e,this.player?this.player.updateOption({playbackForwardMaxRateDecodeIFrame:e},!0):this.debug.warn("JbPro","updatePlaybackForwardMaxRateDecodeIFrame() player is null")}setPlaybackStartTime(e){this.debug.log("JbPro",`setPlaybackStartTime() ${e}`);const t=zr(e);this.player?this.player.isPlayback()?t<10&&0!==e&&this.player.playback.isControlTypeNormal()?this.debug.warn("JbPro",`setPlaybackStartTime() control type is normal and timestamp: ${e} is not valid`):this.player.playback.isControlTypeSimple()&&e>this.player.playback.totalDuration?this.debug.warn("JbPro",`setPlaybackStartTime() control type is simple and timestamp: ${e} is more than ${this.player.playback.totalDuration}`):this.player.playing&&(this.player.playback.isControlTypeNormal()&&10===t&&(e*=1e3),this.player.playback.setStartTime(e),this.playbackClearCacheBuffer()):this.debug.warn("JbPro","setPlaybackStartTime() playType is not playback"):this.debug.warn("JbPro","setPlaybackStartTime() player is null")}setPlaybackShowPrecision(e){this.debug.log("JbPro",`setPlaybackShowPrecision() ${e}`),this.player?this.player.isPlayback()?this.player.playback.isControlTypeNormal()?this.player.playback.setShowPrecision(e):this.debug.warn("JbPro","control type is not normal , not support!"):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}playbackCurrentTimeScroll(){this.debug.log("JbPro","playbackCurrentTimeScroll()"),this.player?this.player.isPlayback()?this.player.playback.isControlTypeNormal()?this.player.playback.currentTimeScroll():this.debug.warn("JbPro","control type is not normal , not support!"):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}playbackClearCacheBuffer(){this.debug.log("JbPro","playbackClearCacheBuffer()"),this.player?this.player.isPlayback()?(this.player.video&&this.player.video.clear(),this.player.audio&&this.player.audio.clear(),this.clearBufferDelay()):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}getPlaybackCurrentRate(){if(this.player){if(this.player.isPlayback())return this.player.getPlaybackRate();this.debug.warn("JbPro","playType is not playback")}else this.debug.warn("JbPro","player is null")}updatePlaybackLocalOneFrameTimestamp(e){this.debug.log("JbPro",`updatePlaybackLocalOneFrameTimestamp() ${e}`),this.player?this.player.isPlayback()?this.player.playback.updateLocalOneFrameTimestamp(e):this.debug.warn("JbPro","playType is not playback"):this.debug.warn("JbPro","player is null")}setStreamQuality(e){if(this.debug.log("JbPro",`setStreamQuality() ${e}`),!this.player)return void this.debug.warn("JbPro","player is null");if(!this.player._opt.operateBtns.quality)return void this.debug.warn("JbPro","player._opt.operateBtns.quality is false");(this.player._opt.qualityConfig||[]).includes(e)?this.player.streamQuality=e:this.debug.warn("JbPro",`quality: ${e} is not in qualityList`)}_play(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((h,d)=>{if(!this.player)return d("player is null");let c=!1;this._opt.url&&this._opt.url!==i&&(c=!0),this._opt.url=i,this._opt.playOptions=l;const u=0===i.indexOf("http"),p=0===i.indexOf("webrtc"),f=0===i.indexOf("artc:"),m=0===i.indexOf("wt:"),g=!p&&-1!==i.indexOf(".m3u8"),y=!p&&-1!==i.indexOf(".flv"),A=!p&&-1!==i.indexOf(".fmp4")||!p&&-1!==i.indexOf(".mp4"),b=!p&&-1!==i.indexOf(".mpeg4"),v=!p&&-1!==i.indexOf(".h264")||!p&&-1!==i.indexOf(".h265");let _=this._opt.isWebrtcForZLM||!1,L=this._opt.isWebrtcForSRS||!1,I=this._opt.isWebrtcForOthers||!1;p&&(-1!==i.indexOf("/index/api/webrtc")?(_=!0,L=!1,I=!1):-1!==i.indexOf("/rtc/v1/play/")&&(L=!0,_=!1,I=!1));let P=null,B=null;if(y&&!this._opt.isFlv&&this._resetDemuxType("isFlv"),A&&!this._opt.isFmp4&&this._resetDemuxType("isFmp4"),b&&!this._opt.isMpeg4&&this._resetDemuxType("isMpeg4"),v&&!this._opt.isNakedFlow&&this._resetDemuxType("isNakedFlow"),P=u?g?r:s:m?o:p?a:f?n:t,B=this._opt.isNakedFlow?C:this._opt.isFmp4?R:this._opt.isMpeg4?x:u&&!g||y||this._opt.isFlv?w:g?T:p?E:f?D:m?k:S,!P||!B)return d(`play protocol is ${P}, demuxType is ${B}`);const U=()=>{this.player.once(tt.webglAlignmentError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webglAlignmentError but player is destroyed");else if(this.emit(Xe.crashLog,this.getCrashLog(tt.webglAlignmentError,e)),this.player&&this.player._opt.webglAlignmentErrorReplay){this.debug.log("JbPro","webglAlignmentError");const e=this._opt.url,t=this._opt.playOptions;this._resetPlayer({openWebglAlignment:!0}).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","webglAlignmentError and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webglAlignmentError),this.debug.error("JbPro","webglAlignmentError and play error",e)}))})).catch((e=>{this.debug.error("JbPro","webglAlignmentError and _resetPlayer error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.webglAlignmentError),this.debug.log("JbPro","webglAlignmentError and webglAlignmentErrorReplay is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webglAlignmentError),this.debug.error("JbPro","webglAlignmentError and pause error",e)}))}})),this.player.once(tt.webglContextLostError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webglContextLostError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.webglContextLostError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.webglContextLostErrorReplay){this.debug.log("JbPro","webglContextLostError");const e=this._opt.url,i=this._opt.playOptions;let s={};this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),this._resetPlayer(s).then((()=>{this.play(e,i).then((()=>{this.debug.log("JbPro","webglContextLostError and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webglContextLostError,t),this.debug.error("JbPro","webglContextLostError and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webglContextLostError,t),this.debug.error("JbPro","webglContextLostError and _resetPlayer error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.webglContextLostError,t),this.debug.log("JbPro","webglContextLostError and webglContextLostErrorReplay is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webglContextLostError,t),this.debug.error("JbPro","webglAlignmentError and pause error",e)}))}})),this.player.once(tt.mediaSourceH265NotSupport,(e=>{if(this.isDestroyed())this.debug.log("JbPro","mediaSourceH265NotSupport but player is destroyed");else if(this.emit(Xe.crashLog,this.getCrashLog(tt.mediaSourceH265NotSupport,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play");const e=this._opt.url,t=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceH265NotSupport),this.debug.error("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceH265NotSupport),this.debug.error("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] _resetPlayer error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceH265NotSupport),this.debug.log("JbPro","mediaSourceH265NotSupport and autoWasm is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceH265NotSupport),this.debug.error("JbPro","mediaSourceH265NotSupport and pause error",e)}))}})),this.player.once(tt.mediaSourceFull,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceFull but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.mediaSourceFull,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const e=this._opt.url,i=this._opt.playOptions;let s={};this.player._opt.decoderErrorAutoWasm&&(s={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mediaSourceFull and auto wasm [mse-> ${this.player._opt.decoderErrorAutoWasm?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),this._resetPlayer(s).then((()=>{this.play(e,i).then((()=>{this.debug.log("JbPro","mediaSourceFull and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceFull,t),this.debug.error("JbPro","mediaSourceFull and reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceFull,t),this.debug.error("JbPro","mediaSourceFull and _resetPlayer error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceFull,t),this.debug.log("JbPro","mediaSourceFull and autoWasm is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceFull,t),this.debug.error("JbPro","mediaSourceFull and pause error",e)}))}})),this.player.once(tt.mediaSourceAppendBufferError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAppendBufferError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.mediaSourceAppendBufferError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const e=this._opt.url,i=this._opt.playOptions;let s={};this.player._opt.decoderErrorAutoWasm&&(s={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mediaSourceAppendBufferError and auto wasm [mse-> ${this.player._opt.decoderErrorAutoWasm?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),this._resetPlayer(s).then((()=>{this.play(e,i).then((()=>{this.debug.log("JbPro","mediaSourceAppendBufferError and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceAppendBufferError,t),this.debug.error("JbPro","mediaSourceAppendBufferError and reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceAppendBufferError,t),this.debug.error("JbPro","mediaSourceAppendBufferError and _resetPlayer error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceAppendBufferError,t),this.debug.log("JbPro","mediaSourceAppendBufferError and autoWasm is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceAppendBufferError,t),this.debug.error("JbPro","mediaSourceAppendBufferError and pause error",e)}))}})),this.player.once(tt.mseSourceBufferError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mseSourceBufferError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.mseSourceBufferError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const e=this._opt.url,i=this._opt.playOptions;let s={};this.player._opt.decoderErrorAutoWasm&&(s={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mseSourceBufferError auto wasm [mse-> ${this.player._opt.decoderErrorAutoWasm?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),this._resetPlayer(s).then((()=>{this.play(e,i).then((()=>{this.debug.log("JbPro","mseSourceBufferError reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mseSourceBufferError,t),this.debug.error("JbPro","mseSourceBufferError reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mseSourceBufferError,t),this.debug.error("JbPro","mseSourceBufferError _resetPlayer and play error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.mseSourceBufferError,t),this.debug.log("JbPro","mseSourceBufferError and autoWasm is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mseSourceBufferError,t),this.debug.error("JbPro","mseSourceBufferError and pause error:",e)}))}})),this.player.once(tt.mediaSourceBufferedIsZeroError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceBufferedIsZeroError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.mediaSourceBufferedIsZeroError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mseDecodeErrorReplay){const e=this._opt.url,i=this._opt.playOptions;let s={};this.player._opt.decoderErrorAutoWasm&&(s={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`mediaSourceBufferedIsZeroError auto wasm [mse-> ${this.player._opt.decoderErrorAutoWasm?"wasm":"mse"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),this._resetPlayer(s).then((()=>{this.play(e,i).then((()=>{this.debug.log("JbPro","mediaSourceBufferedIsZeroError reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceBufferedIsZeroError,t),this.debug.error("JbPro","mediaSourceBufferedIsZeroError reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceBufferedIsZeroError,t),this.debug.error("JbPro","mediaSourceBufferedIsZeroError _resetPlayer and play error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceBufferedIsZeroError,t),this.debug.log("JbPro","mediaSourceBufferedIsZeroError and autoWasm is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceBufferedIsZeroError,t),this.debug.error("JbPro","mediaSourceBufferedIsZeroError and pause error:",e)}))}})),this.player.once(tt.mseAddSourceBufferError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mseAddSourceBufferError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.mseAddSourceBufferError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play");const e=this._opt.url,i=this._opt.playOptions;let s={useMSE:!1,useWCS:!1};this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),this._resetPlayer(s).then((()=>{this.play(e,i).then((()=>{this.debug.log("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mseAddSourceBufferError,t),this.debug.error("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mseAddSourceBufferError,t),this.debug.error("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] _resetPlayer and play error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.mseAddSourceBufferError,t),this.debug.log("JbPro","mseAddSourceBufferError and autoWasm is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mseAddSourceBufferError,t),this.debug.error("JbPro","mseAddSourceBufferError and pause error",e)}))}})),this.player.once(tt.mediaSourceDecoderConfigurationError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","mediaSourceDecoderConfigurationError but player is destroyed");else if(this.emit(Xe.crashLog,this.getCrashLog(tt.mediaSourceDecoderConfigurationError,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play");const e=this._opt.url,t=this._opt.playOptions;let i={useMSE:!1,useWCS:!1};this._resetPlayer(i).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceDecoderConfigurationError),this.debug.error("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceDecoderConfigurationError),this.debug.error("JbPro","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] _resetPlayer and play error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceDecoderConfigurationError),this.debug.log("JbPro","mediaSourceDecoderConfigurationError and autoWasm is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceDecoderConfigurationError),this.debug.error("JbPro","mediaSourceDecoderConfigurationError and pause error",e)}))}})),this.player.once(tt.mediaSourceTsIsMaxDiff,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceTsIsMaxDiff but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.mediaSourceTsIsMaxDiff,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceTsIsMaxDiffReplay){this.debug.log("JbPro","mediaSourceTsIsMaxDiff reset player and play");const e=this._opt.url,i=this._opt.playOptions;let s={};s=Object.assign({},s,t),this._resetPlayer(s).then((()=>{this.play(e,i).then((()=>{this.debug.log("JbPro","mediaSourceTsIsMaxDiff replay success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceTsIsMaxDiff,t),this.debug.error("JbPro","mediaSourceTsIsMaxDiff replay error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceTsIsMaxDiff,t),this.debug.error("JbPro","mediaSourceTsIsMaxDiff _resetPlayer error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceTsIsMaxDiff,t),this.debug.log("JbPro","mediaSourceTsIsMaxDiff and replay is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceTsIsMaxDiff,t),this.debug.error("JbPro","mediaSourceTsIsMaxDiff and pause error",e)}))}})),this.player.once(tt.mseWidthOrHeightChange,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mseWidthOrHeightChange but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.mseWidthOrHeightChange,t));const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.widthOrHeightChangeReplay){this.debug.log("JbPro","mseWidthOrHeightChange and reset player and play");const e=this._opt.url,t=this._opt.playOptions;let s={};s=Object.assign({},s,i),this._resetPlayer(s).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","mseWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mseWidthOrHeightChange,i),this.debug.error("JbPro","mseWidthOrHeightChange and reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mseWidthOrHeightChange,i),this.debug.error("JbPro","mseWidthOrHeightChange and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this._pause(t).then((()=>{this.emit(Xe.playFailedAndPaused,tt.mseWidthOrHeightChange,i),this.debug.error("JbPro","mseWidthOrHeightChange and _resetPlayer error",e)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mseWidthOrHeightChange,i),this.debug.error("JbPro","mseWidthOrHeightChange error and pause error",e)}))}})),this.player.once(tt.mediaSourceAudioG711NotSupport,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAudioG711NotSupport but player is destroyed");const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceAudioG711NotSupportReplay){this.debug.log("JbPro","mediaSourceAudioG711NotSupport and reset player and play");const e=this._opt.url,t=this._opt.playOptions;let s={mseDecodeAudio:!1};s=Object.assign({},s,i),this._resetPlayer(s).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","mediaSourceAudioG711NotSupport and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceAudioG711NotSupport,i),this.debug.error("JbPro","mediaSourceAudioG711NotSupport and reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceAudioG711NotSupport,i),this.debug.error("JbPro","mediaSourceAudioG711NotSupport and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this._pause(t).then((()=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceAudioG711NotSupport,i),this.debug.error("JbPro","mediaSourceAudioG711NotSupport and _resetPlayer error",e)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceAudioG711NotSupport,i),this.debug.error("JbPro","mediaSourceAudioG711NotSupport error and pause error",e)}))}})),this.player.once(tt.mediaSourceAudioInitTimeout,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","mediaSourceAudioInitTimeout but player is destroyed");const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.mediaSourceAudioInitTimeoutReplay){this.debug.log("JbPro","mediaSourceAudioInitTimeout and reset player and play");const e=this._opt.url,t=this._opt.playOptions;let s={mseDecodeAudio:!1};s=Object.assign({},s,i),this._resetPlayer(s).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","mediaSourceAudioInitTimeout and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceAudioInitTimeout,i),this.debug.error("JbPro","mediaSourceAudioInitTimeout and reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceAudioInitTimeout,i),this.debug.error("JbPro","mediaSourceAudioInitTimeout and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this._pause(t).then((()=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceAudioInitTimeout,i),this.debug.error("JbPro","mediaSourceAudioInitTimeout and _resetPlayer error",e)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceAudioInitTimeout,i),this.debug.error("JbPro","mediaSourceAudioInitTimeout error and pause error",e)}))}})),this.player.once(tt.mediaSourceUseCanvasRenderPlayFailed,(e=>{if(this.isDestroyed())this.debug.log("JbPro","mediaSourceUseCanvasRenderPlayFailed but player is destroyed");else if(this.emit(Xe.crashLog,this.getCrashLog(tt.mediaSourceUseCanvasRenderPlayFailed,e)),this.player&&this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplay&&this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplayType){this.debug.log("JbPro",`mediaSourceUseCanvasRenderPlayFailed relayType is ${this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplayType} and reset player and play`);const e=this._opt.url,t=this._opt.playOptions;let i={};const s=this.player._opt.mediaSourceUseCanvasRenderPlayFailedReplayType;s===z?i={useMSE:!1,useWCS:!1}:s===G&&(i={useVideoRender:!0,useCanvasRender:!1}),this._resetPlayer(i).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","mediaSourceUseCanvasRenderPlayFailed and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceUseCanvasRenderPlayFailed),this.debug.error("JbPro","mediaSourceUseCanvasRenderPlayFailed and reset player and play error",e)}))})).catch((e=>{this.debug.error("JbPro","mediaSourceUseCanvasRenderPlayFailed auto and _resetPlayer and play error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.debug.log("JbPro","mediaSourceUseCanvasRenderPlayFailed and pause player success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.mediaSourceUseCanvasRenderPlayFailed),this.debug.error("JbPro","mediaSourceUseCanvasRenderPlayFailed and pause",e)}))}})),this.player.once(tt.webcodecsH265NotSupport,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webcodecsH265NotSupport but player is destroyed");else if(this.emit(Xe.crashLog,this.getCrashLog(tt.webcodecsH265NotSupport,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play");const e=this._opt.url,t=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsH265NotSupport),this.debug.error("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play error",e)}))})).catch((e=>{this.debug.error("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] _resetPlayer and play error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsH265NotSupport),this.debug.log("JbPro","webcodecsH265NotSupport and autoWasm is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsH265NotSupport),this.debug.error("JbPro","webcodecsH265NotSupport and pause error",e)}))}})),this.player.once(tt.webcodecsUnsupportedConfigurationError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webcodecsUnsupportedConfigurationError but player is destroyed");else if(this.emit(Xe.crashLog,this.getCrashLog(tt.webcodecsUnsupportedConfigurationError,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play");const e=this._opt.url,t=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsUnsupportedConfigurationError),this.debug.error("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsUnsupportedConfigurationError),this.debug.error("JbPro","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] _resetPlayer and play error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsUnsupportedConfigurationError),this.debug.log("JbPro","webcodecsUnsupportedConfigurationError and autoWasm is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsUnsupportedConfigurationError),this.debug.error("JbPro","webcodecsUnsupportedConfigurationError and pause error",e)}))}})),this.player.once(tt.webcodecsDecodeConfigureError,(e=>{if(this.isDestroyed())this.debug.log("JbPro","webcodecsDecodeConfigureError but player is destroyed");else if(this.emit(Xe.crashLog,this.getCrashLog(tt.webcodecsDecodeConfigureError,e)),this.player&&this.player._opt.hardDecodingNotSupportAutoWasm){this.debug.log("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play");const e=this._opt.url,t=this._opt.playOptions;this._resetPlayer({useMSE:!1,useWCS:!1}).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsDecodeConfigureError),this.debug.error("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsDecodeConfigureError),this.debug.error("JbPro","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] _resetPlayer and play error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsDecodeConfigureError),this.debug.log("JbPro","webcodecsDecodeConfigureError and autoWasm is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsDecodeConfigureError),this.debug.error("JbPro","webcodecsDecodeConfigureError and pause error",e)}))}})),this.player.once(tt.webcodecsDecodeError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webcodecsDecodeError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.webcodecsDecodeError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.wcsDecodeErrorReplay){const e=this._opt.url,i=this._opt.playOptions;let s={};this.player._opt.decoderErrorAutoWasm&&(s={useMSE:!1,useWCS:!1}),this.debug.log("JbPro",`webcodecs decode error autoWasm [wcs-> ${this.player._opt.decoderErrorAutoWasm?"wasm":"wcs"}] reset player and play`),this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),this._resetPlayer(s).then((()=>{this.play(e,i).then((()=>{this.debug.log("JbPro","webcodecs decode error reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsDecodeError,t),this.debug.error("JbPro","webcodecs decode error reset player and play error",e)}))})).catch((()=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsDecodeError,t),this.debug.error("JbPro","webcodecs decode error _resetPlayer error")}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsDecodeError,t),this.debug.log("JbPro","webcodecs decode error and autoWasm is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webcodecsDecodeError,t),this.debug.error("JbPro","webcodecs decode error and pause error",e)}))}})),this.player.once(tt.wcsWidthOrHeightChange,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","wcsWidthOrHeightChange but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.wcsWidthOrHeightChange,t));const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.widthOrHeightChangeReplay){this.debug.log("JbPro","wcsWidthOrHeightChange and reset player and play");const e=this._opt.url,t=this._opt.playOptions;let s={};s=Object.assign({},s,i),this._resetPlayer(s).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","wcsWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.wcsWidthOrHeightChange,i),this.debug.error("JbPro","wcsWidthOrHeightChange and reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.wcsWidthOrHeightChange,i),this.debug.error("JbPro","wcsWidthOrHeightChange and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this._pause(t).then((()=>{this.emit(Xe.playFailedAndPaused,tt.wcsWidthOrHeightChange,i),this.debug.error("JbPro","wcsWidthOrHeightChange and _resetPlayer error",e)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.wcsWidthOrHeightChange,i),this.debug.error("JbPro","wcsWidthOrHeightChange error and pause error",e)}))}})),this.player.once(tt.wasmDecodeError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","wasmDecodeError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.wasmDecodeError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.wasmDecodeErrorReplay){this.debug.log("JbPro","wasm decode error and reset player and play");const e=this._opt.url,i=this._opt.playOptions;let s={};this.player._opt.replayUseLastFrameShow&&(s=Object.assign({},s,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),this._resetPlayer(s).then((()=>{this.play(e,i).then((()=>{this.debug.log("JbPro","wasm decode error and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.wasmDecodeError,t),this.debug.error("JbPro","wasm decode error and reset player and play error",e)}))})).catch((()=>{this.emit(Xe.playFailedAndPaused,tt.wasmDecodeError,t),this.debug.error("JbPro","wasm decode error and _resetPlayer error")}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.wasmDecodeError,t),this.debug.log("JbPro","wasm decode error and wasmDecodeErrorReplay is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.wasmDecodeError,t),this.debug.error("JbPro","wasm decode error and pause error",e)}))}})),this.player.once(tt.simdDecodeError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","simdDecodeError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.simdDecodeError,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.simdDecodeErrorReplay){this.debug.log("JbPro",`simdDecodeError error simdDecodeErrorReplayType is ${this.player._opt.simdDecodeErrorReplayType} and reset player and play`);const e=this._opt.url,i=this._opt.playOptions;let s={};this.player._opt.simdDecodeErrorReplayType===M&&(s={useSIMD:!1}),s=Object.assign({},s,t),this._resetPlayer(s).then((()=>{this.play(e,i).then((()=>{this.debug.log("JbPro","simdDecodeError and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.simdDecodeError,t),this.debug.error("JbPro","simdDecodeError and reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.simdDecodeError,t),this.debug.error("JbPro","simdDecodeError and _resetPlayer error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.simdDecodeError,t),this.debug.error("JbPro","simdDecodeError and simdDecodeErrorReplay is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.simdDecodeError,t),this.debug.error("JbPro","simdDecodeError error and pause error",e)}))}})),this.player.once(tt.wasmWidthOrHeightChange,(t=>{if(this.isDestroyed())return void this.debug.log("JbPro","wasmWidthOrHeightChange but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.wasmWidthOrHeightChange,t));const i=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.widthOrHeightChangeReplay){this.debug.log("JbPro","wasmWidthOrHeightChange and reset player and play");const e=this._opt.url,t=this._opt.playOptions;let s={};s=Object.assign({},s,i),this._resetPlayer(s).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","wasmWidthOrHeightChange and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.wasmWidthOrHeightChange,i),this.debug.error("JbPro","wasmWidthOrHeightChange and reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.wasmWidthOrHeightChange,i),this.debug.error("JbPro","wasmWidthOrHeightChange and _resetPlayer error",e)}))}else{const t=!1===this._opt.playFailedUseLastFrameShow;this._pause(t).then((()=>{this.emit(Xe.playFailedAndPaused,tt.wasmWidthOrHeightChange,i),this.debug.error("JbPro","wasmWidthOrHeightChange and _resetPlayer error",e)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.wasmWidthOrHeightChange,i),this.debug.error("JbPro","wasmWidthOrHeightChange error and pause error",e)}))}})),this.player.once(tt.wasmUseVideoRenderError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","wasmUseVideoRenderError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.wasmUseVideoRenderError,e)),this.debug.log("JbPro","wasmUseVideoRenderError and reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({useVideoRender:!1,useCanvasRender:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","wasmUseVideoRenderError and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.wasmUseVideoRenderError),this.debug.error("JbPro","wasmUseVideoRenderError and reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.wasmUseVideoRenderError),this.debug.error("JbPro","wasmUseVideoRenderError and _resetPlayer error",e)}))})),this.player.once(tt.videoElementPlayingFailed,(e=>{if(this.isDestroyed())this.debug.log("JbPro","videoElementPlayingFailed but player is destroyed");else if(this.emit(Xe.crashLog,this.getCrashLog(tt.videoElementPlayingFailed,e)),this.player&&this.player._opt.videoElementPlayingFailedReplay){this.debug.log("JbPro",`videoElementPlayingFailed and useMSE is ${this._opt.useMSE} and reset player and play`);const e=this._opt.url,t=this._opt.playOptions;this._resetPlayer({useMSE:!1,useVideoRender:!1,useCanvasRender:!0}).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","videoElementPlayingFailed and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.videoElementPlayingFailed),this.debug.error("JbPro","videoElementPlayingFailed and reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.videoElementPlayingFailed),this.debug.error("JbPro","videoElementPlayingFailed and _resetPlayer error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.videoElementPlayingFailed),this.debug.error("JbPro","videoElementPlayingFailed and videoElementPlayingFailedReplay is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.videoElementPlayingFailed),this.debug.error("JbPro","videoElementPlayingFailed and _pause error",e)}))}})),this.player.once(tt.simdH264DecodeVideoWidthIsTooLarge,(e=>{if(this.isDestroyed())this.debug.log("JbPro","simdH264DecodeVideoWidthIsTooLarge but player is destroyed");else if(this.emit(Xe.crashLog,this.getCrashLog(tt.simdH264DecodeVideoWidthIsTooLarge,e)),this.player&&this.player._opt.simdH264DecodeVideoWidthIsTooLargeReplay){this.debug.log("JbPro","simdH264DecodeVideoWidthIsTooLarge and reset player and play");const e=this._opt.url,t=this._opt.playOptions;this._resetPlayer({useSIMD:!1}).then((()=>{this.play(e,t).then((()=>{this.debug.log("JbPro","simdH264DecodeVideoWidthIsTooLarge and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.simdH264DecodeVideoWidthIsTooLarge),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and reset player and play error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.simdH264DecodeVideoWidthIsTooLarge),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and _resetPlayer error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,tt.simdH264DecodeVideoWidthIsTooLarge,lastFrameInfo),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and simdDecodeErrorReplay is false")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.simdH264DecodeVideoWidthIsTooLarge,lastFrameInfo),this.debug.error("JbPro","simdH264DecodeVideoWidthIsTooLarge and pause error",e)}))}})),this.player.once(Xe.networkDelayTimeout,(e=>{if(this.player._opt.networkDelayTimeoutReplay){if(this.isDestroyed())return void this.debug.log("JbPro","networkDelayTimeout but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(Xe.networkDelayTimeout,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","network delay time out and reset player and play");const i=this._opt.url,s=this._opt.playOptions;let r={};this.player&&this.player._opt.replayUseLastFrameShow&&(r=Object.assign({},r,t,{loadingIcon:this.player._opt.replayShowLoadingIcon})),this._resetPlayer(r).then((()=>{this.play(i,s).then((()=>{this.debug.log("JbPro","wasm decode error and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,Xe.networkDelayTimeout,t),this.debug.error("JbPro","wasm decode error and reset player and play error",e)}))})).catch((()=>{this.emit(Xe.playFailedAndPaused,Xe.networkDelayTimeout,t),this.debug.error("JbPro","wasm decode error and _resetPlayer error")}))}})),this.player.once(tt.fetchError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","fetchError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.fetchError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","fetch error and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this._pause(i).then((()=>{this.emit(Xe.playFailedAndPaused,tt.fetchError,t)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.fetchError,t),this.debug.error("JbPro","fetch error and pause",e)}))})),this.player.once(Xe.streamEnd,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","streamEnd but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(Xe.streamEnd,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","streamEnd pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this._pause(i).then((()=>{this.emit(Xe.playFailedAndPaused,Xe.streamEnd,t)})).catch((e=>{this.emit(Xe.playFailedAndPaused,Xe.streamEnd,t),this.debug.error("JbPro","streamEnd pause",e)}))})),this.player.once(tt.websocketError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","websocketError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.websocketError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","websocketError and reset player");const i=!1===this._opt.playFailedUseLastFrameShow;this._pause(i).then((()=>{this.emit(Xe.playFailedAndPaused,tt.websocketError,t)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.websocketError,t),this.debug.error("JbPro","websocketError and pause",e)}))})),this.player.once(tt.webrtcError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webrtcError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.webrtcError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","webrtcError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this._pause(i).then((()=>{this.emit(Xe.playFailedAndPaused,tt.webrtcError,t)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.webrtcError,t),this.debug.error("JbPro","webrtcError and pause",e)}))})),this.player.once(tt.hlsError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","hlsError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.hlsError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","hlsError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this._pause(i).then((()=>{this.emit(Xe.playFailedAndPaused,tt.hlsError,t)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.hlsError,t),this.debug.error("JbPro","hlsError and pause",e)}))})),this.player.once(tt.aliyunRtcError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","aliyunRtcError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.aliyunRtcError,e));const t=this._getVideoLastIframeInfo();this.debug.log("JbPro","aliyunRtcError and pause player");const i=!1===this._opt.playFailedUseLastFrameShow;this._pause(i).then((()=>{this.emit(Xe.playFailedAndPaused,tt.aliyunRtcError,t)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.aliyunRtcError,t),this.debug.error("JbPro","aliyunRtcError and pause",e)}))})),this.player.once(tt.decoderWorkerInitError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","decoderWorkerInitError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.decoderWorkerInitError,e)),this.debug.log("JbPro","decoderWorkerInitError and pause player");const t=!1===this._opt.playFailedUseLastFrameShow;this._pause(t).then((()=>{this.emit(Xe.playFailedAndPaused,tt.decoderWorkerInitError)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.decoderWorkerInitError),this.debug.error("JbPro","decoderWorkerInitError and pause",e)}))})),this.player.once(tt.videoElementPlayingFailedForWebrtc,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","videoElementPlayingFailedForWebrtc but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.videoElementPlayingFailedForWebrtc,e)),this.debug.log("JbPro","videoElementPlayingFailedForWebrtc and pause player");const t=!1===this._opt.playFailedUseLastFrameShow;this._pause(t).then((()=>{this.emit(Xe.playFailedAndPaused,tt.videoElementPlayingFailedForWebrtc)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.videoElementPlayingFailedForWebrtc),this.debug.error("JbPro","videoElementPlayingFailedForWebrtc and pause",e)}))})),this.player.once(tt.videoInfoError,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","videoInfoError but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(tt.videoInfoError,e)),this.debug.log("JbPro","videoInfoError and pause player");const t=!1===this._opt.playFailedUseLastFrameShow;this._pause(t).then((()=>{this.emit(Xe.playFailedAndPaused,tt.videoInfoError)})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.videoInfoError),this.debug.error("JbPro","videoInfoError and pause",e)}))})),this.player.once(Xe.webrtcStreamH265,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","webrtcStreamH265 but player is destroyed");this.debug.log("JbPro","webrtcStreamH265 and reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({isWebrtcH265:!0}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","webrtcStreamH265 and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,Xe.webrtcStreamH265),this.debug.error("JbPro","webrtcStreamH265 and reset player and play error",e)}))})).catch((()=>{this.emit(Xe.playFailedAndPaused,Xe.webrtcStreamH265),this.debug.error("JbPro","webrtcStreamH265 and _resetPlayer error")}))})),this.player.once(tt.hlsV2Mp4NotSupport,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","hlsV2Mp4NotSupport but player is destroyed");this.debug.log("JbPro","hlsV2Mp4NotSupport and reset player and play");const t=this._opt.url,i=this._opt.playOptions;this._resetPlayer({supportHls265:!1}).then((()=>{this.play(t,i).then((()=>{this.debug.log("JbPro","hlsV2Mp4NotSupport and reset player and play success")})).catch((e=>{this.emit(Xe.playFailedAndPaused,tt.hlsV2Mp4NotSupport),this.debug.error("JbPro","hlsV2Mp4NotSupport and reset player and play error",e)}))})).catch((()=>{this.emit(Xe.playFailedAndPaused,tt.hlsV2Mp4NotSupport),this.debug.error("JbPro","hlsV2Mp4NotSupport and _resetPlayer error")}))})),this.player.on(Xe.delayTimeout,(e=>{if(this.isDestroyed())return void this.debug.log("JbPro","delay timeout but player is destroyed");this.emit(Xe.crashLog,this.getCrashLog(Xe.delayTimeout,e));const t=this._getVideoLastIframeInfo();if(this.player&&this.player._opt.heartTimeoutReplay&&(this._heartTimeoutReplayTimes{this.play(e,i).then((()=>{})).catch((e=>{this.emit(Xe.playFailedAndPaused,Xe.delayTimeout,t),this.debug.error("JbPro","delay timeout replay error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,Xe.delayTimeout,t),this.debug.error("JbPro","delay timeout _resetPlayer error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,Xe.delayTimeout,t),this.player&&(this.emit(Xe.delayTimeoutRetryEnd),this.emit(Xe.playFailedAndPaused,Xe.delayTimeoutRetryEnd)),this.debug.warn("JbPro",`delayTimeoutRetryEnd and\n opt.heartTimeout is ${this.player&&this.player._opt.heartTimeout} and\n opt.heartTimeoutReplay is ${this.player&&this.player._opt.heartTimeoutReplay} and\n opt.heartTimeoutReplayTimes is ${this.player&&this.player._opt.heartTimeoutReplayTimes},and\n local._heartTimeoutReplayTimes is ${this._heartTimeoutReplayTimes}`)})).catch((e=>{this.emit(Xe.playFailedAndPaused,Xe.delayTimeout,t),this.debug.error("JbPro","delay timeout and pause error",e)}))}})),this.player.on(Xe.loadingTimeout,(e=>{if(this.emit(Xe.crashLog,this.getCrashLog(Xe.loadingTimeout,e)),this.isDestroyed())this.debug.log("JbPro","loading timeout but player is destroyed");else if(this.player&&this.player._opt.loadingTimeoutReplay&&(this._loadingTimeoutReplayTimes{this.play(e,t).then((()=>{})).catch((e=>{this.emit(Xe.playFailedAndPaused,Xe.loadingTimeout),this.debug.error("JbPro","loading timeout replay error",e)}))})).catch((e=>{this.emit(Xe.playFailedAndPaused,Xe.loadingTimeout),this.debug.error("JbPro","loading timeout _resetPlayer error",e)}))}else{const e=!1===this._opt.playFailedUseLastFrameShow;this._pause(e).then((()=>{this.emit(Xe.playFailedAndPaused,Xe.loadingTimeout),this.player&&(this.emit(Xe.loadingTimeoutRetryEnd),this.emit(Xe.playFailedAndPaused,Xe.loadingTimeoutRetryEnd)),this.debug.log("JbPro",`loadingTimeoutRetryEnd and\n opt.loadingTimeout is ${this.player&&this.player._opt.loadingTimeout} and\n opt.loadingTimeoutReplay is ${this.player&&this.player._opt.loadingTimeoutReplay} and\n local._loadingTimeoutReplayTimes time is ${this._loadingTimeoutReplayTimes} and\n opt.loadingTimeoutReplayTimes is ${this.player&&this.player._opt.loadingTimeoutReplayTimes}`)})).catch((e=>{this.emit(Xe.playFailedAndPaused,Xe.loadingTimeout),this.debug.error("JbPro","loading timeout and pause error",e)}))}})),this._hasLoaded()?this.player.play(i,l).then((()=>{h()})).catch((e=>{this.debug.error("JbPro","_hasLoaded() and play error",e),this.emit(Xe.crashLog,this.getCrashLog("_hasLoaded() and play error",e)),this.player&&this.player.pause().then((()=>{d(e)})).catch((e=>{d(e),this.debug.error("JbPro","_hasLoaded() and play error and next pause error",e)}))})):this.player.once(Xe.decoderWorkerInit,(()=>{this.player.play(i,l).then((()=>{h()})).catch((e=>{this.debug.error("JbPro","decoderWorkerInit and play error",e),this.emit(Xe.crashLog,this.getCrashLog("decoderWorkerInit and play error",e)),this.player&&this.player.pause().then((()=>{d(e)})).catch((e=>{d(e),this.debug.error("JbPro","decoderWorkerInit and play error and next pause error",e)}))}))}))},F=g&&da(this._opt.supportHls265),O=p&&da(this._opt.isWebrtcH265),N=g&&!!Yr();if(F||O||f||c||b||N)this.debug.log("JbPro",`need reset player and\n isOldHls is ${F} and isOldWebrtc is ${O} and isAliyunRtc is ${f} and needResetPlayer(url change) is ${c} and isMpeg4 is ${b} and isHlsCanVideoPlay is ${N}`),this._resetPlayer({protocol:P,demuxType:B,isHls:g,isWebrtc:p,isWebrtcForZLM:_,isWebrtcForSRS:L,isWebrtcForOthers:I,isAliyunRtc:f,cryptoKey:l.cryptoKey||"",cryptoIV:l.cryptoIV||"",url:i}).then((()=>{U()})).catch((e=>{d("reset player error")}));else{const e={protocol:P,demuxType:B,isHls:g,isWebrtc:p,isAliyunRtc:f,isFlv:this._opt.isFlv,isFmp4:this._opt.isFmp4,isMpeg4:this._opt.isMpeg4,isNakedFlow:this._opt.isNakedFlow,cryptoKey:l.cryptoKey||"",cryptoIV:l.cryptoIV||""};this._opt.isNakedFlow&&(e.mseDecodeAudio=!1),this.player.updateOption(e),l.cryptoKey&&l.cryptoIV&&this.player.decoderWorker&&(this.player.decoderWorker.updateWorkConfig({key:"cryptoKey",value:l.cryptoKey}),this.player.decoderWorker.updateWorkConfig({key:"cryptoIV",value:l.cryptoIV})),U()}}))}_resetDemuxType(e){this._opt.isFlv=!1,this._opt.isFmp4=!1,this._opt.isMpeg4=!1,this._opt.isNakedFlow=!1,this._opt.isHls=!1,this._opt.isWebrtc=!1,this._opt.isWebrtcForZLM=!1,this._opt.isWebrtcForSRS=!1,this._opt.isWebrtcForOthers=!1,this._opt.isAliyunRtc=!1,e&&(this._opt[e]=!0),"isFmp4"!==e&&(this._opt.isFmp4Private=!1)}resize(){this.debug.log("JbPro","resize()"),this.player&&this.player.resize()}setBufferTime(e){this.debug.log("JbPro",`setBufferTime() ${e}`),(e=Number(e))>10&&this.debug.warn("JbPro",`setBufferTime() buffer time is ${e} second, is too large, video will show blank screen until cache ${e} second buffer data`);const t=1e3*e;this._opt.videoBuffer=t,this.player?this.player.updateOption({videoBuffer:t},!0):this.debug.warn("JbPro","setBufferTime() player is null")}setBufferDelayTime(e){this.debug.log("JbPro",`setBufferDelayTime() ${e}`),(e=Number(e))<.2&&this.debug.warn("JbPro",`setBufferDelayTime() buffer time delay is ${e} second, is too small`);const t=1e3*(e=rr(e,.2,100));this._opt.videoBufferDelay=t,this.player?this.player.updateOption({videoBufferDelay:t},!0):this.debug.warn("JbPro","setBufferDelayTime() player is null")}setRotate(e){this.debug.log("JbPro",`setRotate() ${e}`),e=parseInt(e,10);this._opt.rotate!==e&&-1!==[0,90,180,270].indexOf(e)?(this._opt.rotate=e,this.player?(this.player.updateOption({rotate:e}),this.resize()):this.debug.warn("JbPro","setRotate() player is null")):this.debug.warn("JbPro",`setRotate() rotate is ${e} and this._opt.rotate is ${this._opt.rotate}`)}setMirrorRotate(e){this.debug.log("JbPro",`setMirrorRotate() ${e}`);e||(e="none"),this._opt.mirrorRotate!==e&&-1!==["none","level","vertical"].indexOf(e)?(this._opt.mirrorRotate=e,this.player?(this.player.updateOption({mirrorRotate:e}),this.resize()):this.debug.warn("JbPro","setMirrorRotate() player is null")):this.debug.warn("JbPro",`setMirrorRotate() mirrorRotate is ${e} and this._opt.mirrorRotate is ${this._opt.mirrorRotate}`)}setAspectRatio(e){this.debug.log("JbPro",`setAspectRatio() ${e}`);e||(e="default"),this._opt.aspectRatio!==e&&-1!==["default","4:3","16:9"].indexOf(e)?(this._opt.aspectRatio=e,this.player?(this.player.updateOption({aspectRatio:e}),this.resize()):this.debug.warn("JbPro","setAspectRatio() player is null")):this.debug.warn("JbPro",`setAspectRatio() aspectRatio is ${e} and this._opt.aspectRatio is ${this._opt.mirrorRotate}`)}hasLoaded(){return!0}_hasLoaded(){return this.player&&this.player.loaded||!1}setKeepScreenOn(){this.debug.log("JbPro","setKeepScreenOn()"),this._opt.keepScreenOn=!0,this.player?this.player.updateOption({keepScreenOn:!0}):this.debug.warn("JbPro","setKeepScreenOn() player is not ready")}setFullscreen(e){this.debug.log("JbPro",`setFullscreen() ${e}`);const t=!!e;this.player?this.player.fullscreen!==t?this.player.fullscreen=t:this.debug.warn("JbPro",`setFullscreen() fullscreen is ${t} and this.player.fullscreen is ${this.player.fullscreen}`):this.debug.warn("JbPro","setFullscreen() player is not ready")}setWebFullscreen(e){this.debug.log("JbPro",`setWebFullscreen() ${e}`);const t=!!e;this.player?this.player.webFullscreen=t:this.debug.warn("JbPro","setWebFullscreen() player is not ready")}screenshot(e,t,i,s){return this.debug.log("JbPro",`screenshot() ${e} ${t} ${i} ${s}`),this.player&&this.player.video?this.player.video.screenshot(e,t,i,s):(this.debug.warn("JbPro","screenshot() player is not ready"),null)}screenshotWatermark(e){return new Promise(((t,i)=>{this.debug.log("JbPro","screenshotWatermark()",e),this.player&&this.player.video?this.player.video.screenshotWatermark(e).then((e=>{t(e)})).catch((e=>{i(e)})):(this.debug.warn("JbPro","screenshotWatermark() player is not ready"),i("player is not ready"))}))}startRecord(e,t){return new Promise(((i,s)=>{if(this.debug.log("JbPro",`startRecord() ${e} ${t}`),!this.player)return this.debug.warn("JbPro","startRecord() player is not ready"),s("player is not ready");this.player.playing?(this.player.startRecord(e,t),i()):(this.debug.warn("JbPro","startRecord() player is not playing"),s("not playing"))}))}stopRecordAndSave(e,t){return new Promise(((i,s)=>{this.debug.log("JbPro",`stopRecordAndSave() ${e} ${t}`),this.player&&this.player.recording?this.player.stopRecordAndSave(e,t).then((e=>{i(e)})).catch((e=>{s(e)})):s("not recording")}))}isPlaying(){let e=!1;return this.player&&(e=this.player.isPlaying()),e}isLoading(){return!!this.player&&this.player.loading}isPause(){let e=!1;return this._opt.playType===m?e=!this.isPlaying()&&!this.isLoading():this._opt.playType===y&&this.player&&(e=this.player.playbackPause),e}isPaused(){return this.isPause()}isPlaybackPause(){let e=!1;return this._opt.playType===y&&this.player&&(e=this.player.playbackPause),e}isMute(){let e=!0;return this.player&&(e=this.player.isAudioMute()),e}isRecording(){return this.player&&this.player.recorder&&this.player.recorder.recording||!1}isFullscreen(){let e=!1;return this.player&&(e=this.player.fullscreen),e}isWebFullscreen(){let e=!1;return this.player&&(e=this.player.webFullscreen),e}clearBufferDelay(){this.debug.log("JbPro","clearBufferDelay()"),this.player?this.player.clearBufferDelay():this.debug.warn("JbPro","clearBufferDelay() player is not init")}setNetworkDelayTime(e){this.debug.log("JbPro",`setNetworkDelayTime() ${e}`),(e=Number(e))<1&&this.debug.warn("JbPro",`setNetworkDelayTime() network delay is ${e} second, is too small`);const t=1e3*(e=rr(e,1,100));this._opt.networkDelay=t,this.player?this.player.updateOption({networkDelay:t},!0):this.debug.warn("JbPro","setNetworkDelayTime() player is null")}getDecodeType(){let e="";return this.player&&(e=this.player.getDecodeType()),e}getRenderType(){let e="";return this.player&&(e=this.player.getRenderType()),e}getAudioEngineType(){let e="";return this.player&&(e=this.player.getAudioEngineType()),e}getPlayingTimestamp(){let e=0;return this.player&&(e=this.player.getPlayingTimestamp()),e}getStatus(){let e=Ni;return this.player&&(e=this.player.loading?Ui:this.player.playing?Fi:Oi),e}getPlayType(){return this.player?this.player._opt.playType:m}togglePerformancePanel(e){this.debug.log("JbPro",`togglePerformancePanel() ${e}`);const t=this.player._opt.showPerformance;let i=!t;Lr(e)&&(i=e),i!==t?this.player?this.player.togglePerformancePanel(i):this.debug.warn("JbPro","togglePerformancePanel() failed, this.player is not init"):this.debug.warn("JbPro",`togglePerformancePanel() failed, showPerformance is prev: ${t} === now: ${i}`)}openZoom(){this.debug.log("JbPro","openZoom()"),this.player?this.player.zooming=!0:this.debug.warn("JbPro","openZoom() failed, this.player is not init")}closeZoom(){this.debug.log("JbPro","closeZoom()"),this.player?this.player.zooming=!1:this.debug.warn("JbPro","closeZoom() failed, this.player is not init")}isZoomOpen(){let e=!1;return this.player&&(e=this.player.zooming),e}expandZoom(){this.debug.log("JbPro","expandZoom()"),this.player&&this.player.zoom&&this.player.zooming?this.player.zoom.expandPrecision():this.debug.warn("JbPro","expandZoom() failed, zoom is not open or not init")}narrowZoom(){this.debug.log("JbPro","narrowZoom()"),this.player&&this.player.zoom&&this.player.zooming?this.player.zoom.narrowPrecision():this.debug.warn("JbPro","narrowZoom failed, zoom is not open or not init")}getCurrentZoomIndex(){let e=1;return this.player&&this.player.zoom&&(e=this.player.zoom.currentZoom),e}startTalk(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,s)=>{this.debug.log("JbPro","startTalk()",e,t),this._initTalk(t),this.talk.startTalk(e).then((()=>{i(),this.talk.once(Xe.talkStreamClose,(()=>{this.debug.warn("JbPro","talk stream close"),this.stopTalk().catch((e=>{}))})),this.talk.once(Xe.talkStreamError,(e=>{this.debug.warn("JbPro","talk stream error",e),this.stopTalk().catch((e=>{}))})),this.talk.once(Xe.talkStreamInactive,(()=>{this.debug.warn("JbPro","talk stream inactive"),this.stopTalk().catch((e=>{}))}))})).catch((e=>{s(e)}))}))}stopTalk(){return new Promise(((e,t)=>{if(this.debug.log("JbPro","stopTalk()"),!this.talk)return t("stopTalk() talk is not init");this.talk.destroy(),e()}))}getTalkVolume(){return new Promise(((e,t)=>{if(!this.talk)return t("getTalkVolume() talk is not init");e(this.talk.volume)}))}setTalkVolume(e){return new Promise(((t,i)=>{if(this.debug.log("JbPro","setTalkVolume()",e),!this.talk)return i("setTalkVolume() talk is not init");this.talk.setVolume(e/100),t()}))}setNakedFlowFps(e){return new Promise(((t,i)=>{if(this.debug.log("JbPro","setNakedFlowFps()",e),Dr(e))return i("setNakedFlowFps() fps is empty");let s=Number(e);s=rr(s,1,100),this._opt.nakedFlowFps=s,this.player?this.player.updateOption({nakedFlowFps:s}):this.debug.warn("JbPro","setNakedFlowFps() player is null"),t()}))}getCrashLog(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!this.player)return;const i=this.player.getAllStatsData(),s=this.player;let r={url:this._opt.url,playType:s.isPlayback()?"playback":"live",demuxType:s.getDemuxType(),decoderType:s.getDecodeType(),renderType:s.getRenderType(),videoInfo:{encType:"",width:"",height:""},audioInfo:{encType:"",sampleRate:"",channels:""},audioEngine:s.getAudioEngineType(),allTimes:i.pTs,timestamp:sr(),type:e,error:ta(t)||e};if(s.video){const e=s.video.videoInfo||{};r.videoInfo={encType:e.encType||"",width:e.width||"",height:e.height||""}}if(s.audio){const e=s.audio.audioInfo||{};r.audioInfo={encType:e.encType||"",sampleRate:e.sampleRate||"",channels:e.channels||""}}return r}updateDebugLevel(e){this.debug.log("JbPro","updateDebugLevel()",e),e===V||e===H?e!==this.player._opt.debugLevel?(this._opt.debugLevel=e,this.player?this.player.updateOption({debugLevel:e},!0):this.debug.warn("JbPro","updateDebugLevel() player is null")):this.debug.warn("JbPro",`updateDebugLevel() level is same, level: ${e}`):this.debug.warn("JbPro",`updateDebugLevel() level is not valid, level: ${e}`)}updateWatermark(e){this.debug.log("JbPro","updateWatermark()",e),this.player?this.player.updateWatermark(e):this.debug.warn("JbPro","updateWatermark() player is not init")}removeWatermark(){this.debug.log("JbPro","removeWatermark()"),this.player?this.player.removeWatermark():this.debug.warn("JbPro","removeWatermark() player is not init")}updateFullscreenWatermark(e){if(this.debug.log("JbPro","updateFullscreenWatermark()",e),Gr(e)){this._opt.fullscreenWatermarkConfig=e;const t=Br(this.$container,e);if(!t.watermark_txt)return void this.debug.warn("JbPro","fullscreenWatermarkConfig text is empty");this.watermark.load(t)}else this.debug.warn("JbPro",`updateFullscreenWatermark() config is not valid, config: ${e}`)}removeFullscreenWatermark(){this.debug.log("JbPro","removeFullscreenWatermark()"),this.watermark?this.watermark.remove():this.debug.warn("JbPro","removeFullscreenWatermark() watermark is not init")}faceDetectOpen(){this.debug.log("JbPro","faceDetectOpen()"),this.player?this.player.faceDetect(!0):this.debug.warn("JbPro","faceDetectOpen() player is not init")}faceDetectClose(){this.debug.log("JbPro","faceDetectClose()"),this.player?this.player.faceDetect(!1):this.debug.warn("JbPro","faceDetectClose() player is not init")}objectDetectOpen(){this.debug.log("JbPro","objectDetectOpen()"),this.player?this.player.objectDetect(!0):this.debug.warn("JbPro","objectDetectOpen() player is not init")}objectDetectClose(){this.debug.log("JbPro","objectDetectClose()"),this.player?this.player.objectDetect(!1):this.debug.warn("JbPro","objectDetectClose() player is not init")}sendWebsocketMessage(e){this.debug.log("JbPro","sendWebsocketMessage()",e),this.player?this.player.sendWebsocketMessage(e):this.debug.warn("JbPro","sendWebsocketMessage() player is not init")}addContentToCanvas(e){this.debug.log("JbPro","addContentToCanvas()"),this.player?this.player.addContentToCanvas(e):this.debug.warn("JbPro","addContentToCanvas() player is not init")}clearContentToCanvas(){this.debug.log("JbPro","clearContentToCanvas()"),this.player?this.player.addContentToCanvas([]):this.debug.warn("JbPro","clearContentToCanvas() player is not init")}setControlHtml(e){this.debug.log("JbPro","setControlHtml()",e),this.player?this.player.setControlHtml(e):this.debug.warn("JbPro","setControlHtml() player is not init")}clearControlHtml(){this.debug.log("JbPro","clearControlHtml()"),this.player?this.player.clearControlHtml():this.debug.warn("JbPro","clearControlHtml() player is not init")}getVideoInfo(){let e=null;return this.player&&(e=this.player.getVideoInfo()),e}getAudioInfo(){let e=null;return this.player&&(e=this.player.getAudioInfo()),e}setSm4CryptoKey(e){this.debug.log("JbPro","setSm4CryptoKey()",e),32===(e=""+e).length?(this._opt.sm4CryptoKey=e,this.player?this.player.updateOption({sm4CryptoKey:e},!0):this.debug.warn("JbPro","setSm4CryptoKey() player is null")):this.debug.warn("JbPro",`setSm4CryptoKey() key is invalid and length is ${e.length} !== 32`)}setM7sCryptoKey(e){this.debug.log("JbPro","setM7sCryptoKey()",e),e=""+e,this._opt.m7sCryptoKey=e,this.player?this.player.updateOption({m7sCryptoKey:e},!0):this.debug.warn("JbPro","setM7sCryptoKey() player is null")}setXorCryptoKey(e){this.debug.log("JbPro","setXorCryptoKey()",e),e=""+e,this._opt.xorCryptoKey=e,this.player?this.player.updateOption({xorCryptoKey:e},!0):this.debug.warn("JbPro","setXorCryptoKey() player is null")}updateLoadingText(e){this.debug.log("JbPro","updateLoadingText()",e),this.player?this.player.updateLoadingText(e):this.debug.warn("JbPro","updateLoadingText() player is null")}updateIsEmitSEI(e){this.debug.log("JbPro","updateIsEmitSEI()",e),this._opt.isEmitSEI=e,this.player?this.player.updateOption({isEmitSEI:e},!0):this.debug.warn("JbPro","updateIsEmitSEI() player is null")}getPTZCmd(e,t){if(this.debug.log("JbPro","getPTZCmd()",e),e)return this.player?Qy({type:e,index:0,speed:t}):void this.debug.warn("JbPro","getPTZCmd() player is null");this.debug.warn("JbPro","getPTZCmd() ptz is null")}downloadTempNakedFlowFile(){return new Promise(((e,t)=>{this.player?(this.player.downloadNakedFlowFile(),e()):t("player is not init")}))}downloadTempFmp4File(){return new Promise(((e,t)=>{this.player?(this.player.downloadFmp4File(),e()):t("player is not init")}))}downloadTempMpeg4File(){return new Promise(((e,t)=>{this.player?(this.player.downloadMpeg4File(),e()):t("player is not init")}))}downloadTempRtpFile(){return new Promise(((e,t)=>{this.talk?(this.talk.downloadRtpFile(),e()):t("talk is not init")}))}downloadMemoryLog(){this.memoryLogger&&this.memoryLogger.download()}_getVideoLastIframeInfo(){const e=this.getVideoInfo()||{};return{loadingBackground:this.screenshot("","png",.92,"base64"),loadingBackgroundWidth:e.width||0,loadingBackgroundHeight:e.height||0}}getExtendBtnList(){this.debug.log("JbPro","getExtendBtnList()");let e=[];return this.player?e=this.player.getExtendBtnList():this.debug.warn("JbPro","getExtendBtnList() player is null"),e}getFlvMetaData(){this.debug.log("JbPro","getFlvMetaData()");let e=null;return this.player?e=this.player.getMetaData():this.debug.warn("JbPro","getFlvMetaData() player is null"),e}updateAiFaceDetectInterval(e){this.debug.log("JbPro","updateAiFaceDetectInterval()",e);const t=1e3*(e=Number(e));this._opt.aiFaceDetectInterval=t,this.player?this.player.updateOption({aiFaceDetectInterval:t}):this.debug.warn("JbPro","updateAiFaceDetectInterval() player is null")}updateAiFaceDetectLevel(e){if(this.debug.log("JbPro","updateAiFaceDetectLevel()",e),!ks[e])return void this.debug.warn("JbPro",`'updateAiFaceDetectLevel() level ${e} is invalid'`);const t=ks[e];this._opt.aiFaceDetectWidth=t,this.player?(this.player.updateOption({aiFaceDetectWidth:t}),this.player.ai&&this.player.ai.updateFaceDetectorConfig({detectWidth:t})):this.debug.warn("JbPro","updateAiFaceDetectLevel() player is null")}updateAiObjectDetectInterval(e){this.debug.log("JbPro","updateAiObjectDetectInterval()",e);const t=1e3*(e=Number(e));this._opt.aiObjectDetectInterval=t,this.player?this.player.updateOption({aiObjectDetectInterval:t}):this.debug.warn("JbPro","updateAiObjectDetectInterval() player is null")}updateAiObjectDetectLevel(e){if(this.debug.log("JbPro","updateAiObjectDetectLevel()",e),!Cs[e])return void this.debug.warn("JbPro",`'updateAiObjectDetectLevel() level ${e} is invalid'`);const t=Cs[e];this._opt.aiObjectDetectWidth=t,this.player?(this.player.updateOption({aiObjectDetectWidth:t}),this.player.ai&&this.player.ai.updateObjectDetectorConfig({detectWidth:t})):this.debug.warn("JbPro","updateAiObjectDetectLevel() player is null")}setCryptoKeyUrl(e){this.debug.log("JbPro","setCryptoKeyUrl()",e),e&&(this._opt.cryptoKeyUrl=e)}showErrorMessageTips(e){this.debug.log("JbPro","showErrorMessageTips()",e),e&&(this.player?this.player.showTipsMessageByContent(e):this.debug.warn("JbPro","showErrorMessageTips() player is null"))}hideErrorMessageTips(){this.debug.log("JbPro","hideErrorMessageTips()"),this.player?this.player.hideTipsMessage():this.debug.warn("JbPro","hideErrorMessageTips() player is null")}}return sA.ERROR=tt,sA.EVENTS=Ze,window.JessibucaPro=sA,window.WebPlayerPro=sA,sA})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],e):(t="undefined"!=typeof globalThis?globalThis:t||self)["jessibuca-demo"]=e(t.crypto$1)}(this,(function(t){"use strict";function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=s(t);const n=Wt;!function(t,e){const s=Wt,i=t();for(;;)try{if(996551===parseInt(s(214))/1*(parseInt(s(471))/2)+-parseInt(s(248))/3+-parseInt(s(392))/4*(-parseInt(s(427))/5)+parseInt(s(606))/6*(parseInt(s(200))/7)+parseInt(s(436))/8+-parseInt(s(246))/9+-parseInt(s(524))/10*(parseInt(s(295))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(S);const o={websocket:1,fetch:2,hls:3,webrtc:4,webTransport:5,aliyunRtc:6,ts:7},a=["",n(632),n(329),n(372),n(474),n(273),n(260),"ts"],h={fetch:n(329),hls:"hls",websocket:n(632),webrtc:n(474),webTransport:"webTransport",worker:n(543),aliyunRtc:n(260),mp4:n(365)},c={player:"player",playerAudio:n(665),playbackTF:n(655),talk:"talk",playVod:n(322)},l={mp4:n(365),webm:n(480),flv:n(224),mov:n(656)},d={flv:n(224),m7s:n(299),hls:"hls",webrtc:"webrtc",webTransport:n(273),nakedFlow:n(284),fmp4:n(327),mpeg4:n(314),aliyunRtc:n(260),ts:"ts",g711:n(374),pcm:n(504)},u={flv:"FLV",m7s:n(213),hls:n(231),fmp4:n(439),mpeg4:"MPEG4",webrtc:n(563),webTransport:n(349),nakedFlow:"裸流",aliyunRtc:n(239),ts:"TS"},p={mse:"mse",wcs:"wcs",offscreen:n(221),wasm:n(321),simd:n(556),mt:"mt",webrtc:n(474),hls:n(372),aliyunRtc:"aliyunRtc"},f={canvas:n(396),video:n(592)},m={debug:"debug",warn:"warn"},g={click:"click",mouseDownAndUp:"mouseDownAndUp"},A={normal:n(590),simple:n(205)},y={normal:"normal",small:n(398)},b=n(212),v=n(386);function S(){const t=["notConnect","H264(AVC)","memory access out of bounds","tcp","talkGetUserMediaTimeout","性能面板","playVodWaiting","playVodStats","ALAW","videoCodec","videoNalu","webrtc-completed","currentPts","webcodecsUnsupportedConfigurationError","audioNalu","error","flvMetaData","mp3","no-audio-track","isTs","data-channel","The user aborted a request","fetchClose","online","aiOcclusionDetectResult","加载超时重播失败","recording","1-1","multiMousemove","34aBSQVH","mute","webrtc-disconnected","webrtc","audioPayload","audioInfo","resetDecode","metadata-parsed","closeEnd","webm","playbackSeek","clickInitPlayer","metadata","open","load-retry","playVodVideoSeekingByMse","decoderWorkerInitError","mseWorkerAddSourceBufferError","leftDown","removeLoadingBgImage","dynamicWatermarkConfig","流异常","delayTimeoutRetryEnd","playVodSeekEnd","playing","保存日志","decode","outbound-rtp","playbackStreamVideoFps","操作盘","talkGetUserMediaFail","apertureFar","webrtc-closed","pcm","videoDecode","streamError","focusNear","人脸识别激活","crashLog","networkState","multiMousedown","A key frame is required after configure() or flush()","hlsError","playbackPause","inView","right-down","videoInfo","viewResizeChange","streamEnd","talkStreamInactive","self","wcsWidthOrHeightChange","emptied","510PRhEcs","ptz","volume","isM7sCrypto","buffereos","streamQualityChange","playVodRateChange","jessibuca-pro-mp4-recorder-decoder.js","mseSourceStartStreaming","created","aiObjectDetectorInfo","sourceended","webcodecsAudioNoDataTimeout","playType","closed","codec","isWebrtc","playFailedAndPaused","mediaSourceH265NotSupport","worker","left","webgl","mseWidthOrHeightChange","occlusionDetectActive","resetAudioDecode","drawingRect","videoSEI","streamVbps","init","focusFar","left-down","fetchError","simd","stop","volumechange","videoRenderSupportScale","multiDrop","seeked","音频通道错误","Webrtc","script","mediaSourceAudioInitTimeout","playbackForwardMaxRateDecodeIFrame","tenMin","性能面板激活","candidate-pair","ceil","udp","ALAW(g711a)","websocketOpenTimeout","initVideo","/crypto/","mediaSourceAudioNoDataTimeout","初始化音频解码器失败","workerEnd","audioChannelError","replayUseLastFrameShow","playToRenderTimes","stream","playIsNotPauseOrUrlIsNull","zooming","webcodecsH265NotSupport","multiFullscreen","download","load-response-headers","ws1006","normal","AbortError","video","objectDetectActive","durationchange","3-4","warn","sourceopen","mseDecodeError","switch-url-failed","networkDelay","videoPayload","websocketStringMsg",'video/mp4;codecs="hev1.3.E.L120.90"',"mseSourceended","streamDts","6XLZUUR","streamMessage","mediaSourceUseCanvasRenderPlayFailed","Decoding error","stream-parsed","decoder-pro-audio.js","timeUpdate","videoInfoError","playbackRateChange","drawingRectInfo","不支持硬解码H265","loadingTimeoutRetryEnd","multiDblSelected","网络超时重播失败","iframeIntervalTs","streamEndInner","fetchErrorWorker","kBps","webFullscreen","mediaSourceDecoderConfigurationError","visibilityHiddenTimeout","right-up","playbackJustTime","videoCode","multiMouseover","start","websocket","解码失败","talkStreamMsg","mseSourceBufferBusy","MediaSource解码使用canvas渲染失败","decoder-pro-hard-not-wasm.js","mediaSourceTsIsMaxDiff","mseWaitVideoCanplayTimeout","mseAddSourceBufferError","multiDragleave","red","wasmUseVideoRenderError","togglePerformancePanel","faceDetectActive","right","playVodSeek","关闭电子放大","heartTimeout","playVodTime","webcodecsDecodeConfigureError","AAC","webgl2","playbackTimeScroll","playbackTF","mov","websocketClose","fogClose","buffer","demuxed-track","wasm解码失败","delayTimeout","isWebrtcForOthers","speed","playerAudio","loadedmetadata","playback","notSupportNewWasm","webcodecsAudioInitTimeout","fullscreen","isDropping","操作盘激活","isMpeg4","player","load-complete","beforeDestroy","multiSelected","videoWaiting","decoderWorkerInit","streamSuccess","playVodPause","load","endstreaming","playVodTimeCache","webrtcStreamH265","performance","mp4Error","H265(HEVC)","streamAbps","stats","Simd","isWebrtcForZLM","five-min","recordBlob",'video/mp4;codecs="hev1.1.6.L120.90"',"6965308PbycAy","webrtcOnConnectionStateChange","progress","decoder-pro-audio-player.js","playbackIsPause","simple","mseSourceBufferFull","play","initAudio","ratechange","videoSEISyncPts","NotAllowedError","JessibucaPro","M7S","103183bKQlyV","wasmWidthOrHeightChange","blob","flvDemuxBufferSizeTooLarge","canplaythrough","解析视频分辨率失败","flv-script-data","offscreen","widthOrHeightChange","empty","flv","clearBuffer","webrtcChecking","talkStreamError","等待音频数据超时","supportHls265","white","HLS","canplay","video自动渲染失败","remote-candidate","multiIndex","webrtcConnected","mse","人脸识别","AliyunRtc","fiveMin","videoTimeUpdate","sendMessage","waiting","ended","watermarkConfig","7595820NNgQyh","close","5893287VsdHeA","default","destroy","webrtcDisconnect","webrtcClosed","decoder-pro-old.js","HEVC decoding is not supported","one-hour","simdH264DecodeVideoWidthIsTooLarge","recordCancel","av1","playbackPreRateChange","aliyunRtc","ghostWatermarkConfig","playAudio","Wasm","recordingTimestamp","image/webp","defaultStreamQuality","mseSourceBufferError","videoSequenceHeader","decoderWorkerWasmError","mseFirstRenderTime","netBuf","buffering","webTransport","loadingTimeout","初始化解码器失败","硬解码不支持G711a/u音频格式","widthOrHeightChangeReplayDelayTime","jbprovm","videoSmooth","csrc","playVodPauseOrResume","startstreaming","recordEnd","nakedFlow","webgl 上下文丢失","fiStop","image/jpeg",'video/mp4;codecs="hev1.2.4.L120.90"',"downloadMemoryLog","sei","focus","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C(wasm%E5%86%85%E9%83%A8%E4%BC%9A%E6%9A%82%E5%81%9C%E8%A7%A3%E7%A0%81)%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","multiMouseout","audioCode","178970eiJbns","destroyEnd","Jb%20pro%20%E4%BD%93%E9%AA%8C%E7%BB%93%E6%9D%9F%2C%E8%AF%B7%E5%88%B7%E6%96%B0%E9%A1%B5%E9%9D%A2%E5%86%8D%E6%AC%A1%E4%BD%93%E9%AA%8C%EF%BC%8C%E5%A6%82%E9%9C%80%E8%A6%81%E8%B4%AD%E4%B9%B0%E5%95%86%E4%B8%9A%E6%8E%88%E6%9D%83%EF%BC%8C%E5%8F%AF%E4%BB%A5%E8%81%94%E7%B3%BB%E5%BE%AE%E4%BF%A1%EF%BC%9Abosswancheng","wasmError","m7s","streamRate","streamStats","isFlv","talkStreamClose","MP3","apertureNear","aiImageDetectResult","webgpu","playbackShowPrecisionChange","loadeddata","initDecoderWorkerTimeout","object","aliyunRtcError","aacSequenceHeader","mpeg4","sourcebuffer-created","oneHour","paused","record","mseSourceEndStreaming","play() failed because the user didn't interact with the document first","wasm","playVod","videoElementPlayingFailed","playbackStats","30min","inbound-rtp","fmp4","isMulti","fetch","jbprov","cruiseStop","readystatechange","audioResumeState","left-up","active","playbackPrecision","local-candidate","transport","playbackEnd","video decoder initialization failed","webrtcOnIceConnectionStateChange",'video/mp4; codecs="hev1.1.6.L123.b0"',"请求失败","window","MULAW(g711u)","networkDelayTimeout","worklet","audioDecode","WebTransport","fetchSuccess","websocketError","hls-manifest-loaded","webrtc-connected","websocketOpen","webrtc-checking","jtt","Decoder failure","container","playbackPauseOrResume","timeupdate","pressureObserverCpu","isFmp4","mseHandle","opus","mp4","suspend","talkStreamStart","ulaw","loading","MEDIA_ERR_SRC_NOT_SUPPORTED","flvScriptData","hls","退出全屏","g711","recordCreateError","不支持该分辨率的视频","isAliyunRtc","rtp","Webgl 渲染失败","decoder-pro-hard.js","Decoder error","failedToAsynchronouslyPrepareWasm","sendWsMessage","pause","subtitle-segments","20251201","updateConfig","请求结束","fullscreenError","aiFaceDetectorInfo","MEDIA_ERR_NETWORK","104THwJil","global","遮挡物检查激活","audio packet","canvas","缓冲区已满","small","playbackTime","down","webglAlignmentError","0000000000","mediaSourceAudioG711NotSupport","base64","subtitle-playlist","stalled","timeout","webcodecs","qualitychange","remote-inbound-rtp","videoElementPlayingFailedForWebrtc","FLV待解封装buffer过大","playVodMp4Error","image/png","#FFCC00","complete","idle","zoomNarrow","visibilityChange",'video/mp4; codecs="avc1.64002A"',"videoFrame","播放地址不能为空","delta","webrtcIceCandidateError","g711u","ten-min","201220URlNzg","Cannot call 'decode' on a closed codec","ttfb","receiver","MULAW","memoryLog","#343434","flvBufferData","物品识别","6713848uXWCLB","遮挡物检查","rightDown","FMP4","simdDecodeError","videoSyncAudio"];return(S=function(){return t})()}const w=36e5,E=n(575),I=n(330);n(278);const T=1e4,k={playIsNotPauseOrUrlIsNull:n(422),webglAlignmentError:n(379),webglContextLostError:n(285),mediaSourceH265NotSupport:n(616),mseSourceBufferFull:n(397),mediaSourceAppendBufferError:n(275),mseSourceBufferError:n(633),mseAddSourceBufferError:n(275),mseWorkerAddSourceBufferError:n(275),mediaSourceDecoderConfigurationError:"初始化解码器失败",mediaSourceTsIsMaxDiff:n(492),mseWidthOrHeightChange:n(492),mediaSourceAudioG711NotSupport:n(276),mediaSourceAudioInitTimeout:n(577),mediaSourceAudioNoDataTimeout:n(228),mediaSourceUseCanvasRenderPlayFailed:n(636),mediaSourceBufferedIsZeroError:n(492),webcodecsH265NotSupport:"不支持硬解码H265",webcodecsUnsupportedConfigurationError:n(275),webcodecsDecodeConfigureError:"初始化解码器失败",webcodecsDecodeError:n(633),webcodecsAudioInitTimeout:n(577),webcodecsAudioNoDataTimeout:n(228),wcsWidthOrHeightChange:n(633),wasmDecodeError:n(633),simdDecodeError:n(633),wasmWidthOrHeightChange:"流异常",wasmUseVideoRenderError:n(233),videoElementPlayingFailed:n(233),simdH264DecodeVideoWidthIsTooLarge:n(376),networkDelayTimeout:n(619),fetchError:n(343),streamEnd:n(388),websocket1006Error:"流异常结束",websocketError:n(343),webrtcError:n(343),hlsError:"请求失败",decoderWorkerInitError:"初始化worker失败",decoderWorkerWasmError:n(661),videoElementPlayingFailedForWebrtc:n(233),videoInfoError:n(219),webrtcStreamH265:"webrtc不支持H265",delayTimeout:"播放超时重播失败",loadingTimeout:n(467),loadingTimeoutRetryEnd:n(467),delayTimeoutRetryEnd:"播放超时重播失败",flvDemuxBufferSizeTooLarge:n(412),audioChannelError:n(562),aliyunRtcError:n(343),mseWaitVideoCanplayTimeout:n(492),initDecoderWorkerTimeout:"初始化解码worker超时"},_={playType:c[n(674)],videoBuffer:1e3,videoBufferDelay:1e3,networkDelay:1e4,isResize:!0,isFullResize:!1,isFlv:!1,isHls:!1,isFmp4:!1,isWebrtc:!1,isWebrtcForZLM:!1,isWebrtcForSRS:!1,webrtcForSRSBySDK:!1,isWebrtcForOthers:!1,isNakedFlow:!1,isMpeg4:!1,isAliyunRtc:!1,isTs:!1,debug:!1,debugLevel:m.warn,debugUuid:"",isMulti:!0,multiIndex:-1,hotKey:!1,loadingTimeout:10,heartTimeout:10,timeout:10,pageVisibilityHiddenTimeout:300,loadingTimeoutReplay:!0,heartTimeoutReplay:!0,loadingTimeoutReplayTimes:3,heartTimeoutReplayTimes:3,heartTimeoutReplayUseLastFrameShow:!0,replayUseLastFrameShow:!0,replayShowLoadingIcon:!1,supportDblclickFullscreen:!1,showBandwidth:!1,showPerformance:!1,mseCorrectTimeDuration:20,mseCorrectAudioTimeDuration:20,keepScreenOn:!0,isNotMute:!1,muted:!0,hasAudio:!0,hasVideo:!0,operateBtns:{fullscreen:!1,screenshot:!1,play:!1,audio:!1,record:!1,ptz:!1,quality:!1,zoom:!1,close:!1,scale:!1,performance:!1,logSave:!1,aiFace:!1,aiObject:!1,aiOcclusion:!1,fullscreenFn:null,fullscreenExitFn:null,screenshotFn:null,playFn:null,pauseFn:null,recordFn:null,recordStopFn:null},extendOperateBtns:[],contextmenuBtns:[],watermarkConfig:{},controlAutoHide:!1,controlAutoHideDelayTime:5,hasControl:!1,controlSize:y[n(590)],loadingIcon:!0,loadingIconStyle:{},loadingText:"",background:"",poster:"",backgroundLoadingShow:!0,loadingBackground:"",loadingBackgroundWidth:0,loadingBackgroundHeight:0,decoder:"decoder-pro.js",decoderOld:n(253),decoderAudio:n(611),decoderHard:n(380),decoderHardNotWasm:n(637),wasmMp4RecorderDecoder:n(531),decoderWASM:"",isDecoderUseCDN:!1,url:"",rotate:0,mirrorRotate:"none",aspectRatio:n(249),playbackConfig:{playList:[],fps:"",autoCalcFps:!0,showControl:!0,controlType:A[n(590)],duration:0,startTime:"",showRateBtn:!1,rateConfig:[],showPrecision:"",showPrecisionBtn:!0,isCacheBeforeDecodeForFpsRender:!1,uiUsePlaybackPause:!1,isPlaybackPauseClearCache:!0,isUseFpsRender:!1,isUseLocalCalculateTime:!1,localOneFrameTimestamp:40,supportWheel:!1,useWCS:!1,useMSE:!1,useSIMD:!0},qualityConfig:[],defaultStreamQuality:"",scaleConfig:["拉伸","缩放","正常"],forceNoOffscreen:!0,hiddenAutoPause:!1,protocol:o[n(329)],demuxType:d[n(224)],useWasm:!1,useOldWasm:!1,useMSE:!1,useWCS:!1,useSIMD:!0,isFFmpegSIMD:!1,useMThreading:!1,preferredHardDecode:!1,wcsUseVideoRender:!0,wcsUseWebgl2Render:!1,wasmUseVideoRender:!0,mseUseCanvasRender:!1,hlsUseCanvasRender:!1,webrtcUseCanvasRender:!1,useOffscreen:!1,useWebGPU:!1,useWebCanvas:!1,mseDecodeErrorReplay:!0,wcsDecodeErrorReplay:!0,wasmDecodeErrorReplay:!0,simdDecodeErrorReplay:!0,simdDecodeErrorReplayType:p[n(321)],autoWasm:!0,decoderErrorAutoWasm:!1,hardDecodingNotSupportAutoWasm:!0,webglAlignmentErrorReplay:!0,webglContextLostErrorReplay:!0,openWebglAlignment:!1,syncAudioAndVideo:!0,syncAudioAndVideoDiff:400,playbackDelayTime:1e3,playbackFps:25,playVodFps:25,playbackForwardMaxRateDecodeIFrame:4,playbackCurrentTimeMove:!0,useVideoRender:!0,useCanvasRender:!1,videoRenderType:"",networkDelayTimeoutReplay:!1,recordType:l[n(365)],checkFirstIFrame:!0,nakedFlowFps:25,audioEngine:null,isShowRecordingUI:!0,isShowZoomingUI:!0,useFaceDetector:!1,useObjectDetector:!1,useImageDetector:!1,useOcclusionDetector:!1,ptzPositionConfig:{},ptzShowType:"vertical",ptzClickType:g.click,ptzStopEmitDelay:.3,ptzZoomShow:!1,ptzApertureShow:!1,ptzFocusShow:!1,ptzMoreArrowShow:!1,ptzCruiseShow:!1,ptzFogShow:!1,ptzWiperShow:!1,ptzSupportDraggable:!1,weiXinInAndroidAudioBufferSize:4800,isCryptoAudio:!1,isM7sCrypto:!1,isSm4Crypto:!1,isSm4CryptoH265V2:!1,isXorCrypto:!1,sm4CryptoKey:"",m7sCryptoKey:"",xorCryptoKey:"",cryptoKey:"",cryptoIV:"",cryptoKeyUrl:"",listenWindowResizeAuoResize:!0,orientationChangeResize:!1,useWebFullScreen:!1,ptsMaxDiff:3600,aiFaceDetectLevel:2,aiFaceDetectWidth:240,aiFaceDetectEmitBase64:!1,aiFaceDetectShowRect:!0,aiFaceDetectInterval:1e3,aiFaceDetectRectConfig:{},aiObjectDetectLevel:2,aiObjectDetectWidth:240,aiObjectDetectShowRect:!0,aiObjectDetectInterval:1e3,aiObjectDetectRectConfig:{},aiObjectDetectTarget:"",aiOcclusionDetectInterval:1e3,aiImageDetectDrop:!1,aiImageDetectActive:!1,videoRenderSupportScale:!0,mediaSourceTsIsMaxDiffReplay:!0,controlHtml:"",isH265:!1,isWebrtcH265:!1,supportLockScreenPlayAudio:!0,supportHls265:!0,hls265ForceFixLargeGap:!0,isEmitSEI:!1,pauseAndNextPlayUseLastFrameShow:!1,demuxUseWorker:!0,playFailedAndReplay:!0,showMessageConfig:k,videoElementPlayingFailedReplay:!0,mp4RecordUseWasm:!0,mseAutoCleanupSourceBuffer:!0,mseAutoCleanupMaxBackwardDuration:30,mseAutoCleanupMinBackwardDuration:10,widthOrHeightChangeReplay:!0,simdH264DecodeVideoWidthIsTooLargeReplay:!0,mediaSourceAudioG711NotSupportReplay:!0,mediaSourceAudioInitTimeoutReplay:!0,mediaSourceAudioNoDataTimeoutReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplay:!0,mediaSourceUseCanvasRenderPlayFailedReplayType:f[n(592)],webcodecsAudioInitTimeoutReplay:!0,webcodecsAudioNoDataTimeoutReplay:!0,widthOrHeightChangeReplayDelayTime:0,ghostWatermarkConfig:{on:5,off:5,content:"",fontSize:12,color:n(230),opacity:.15,speed:.2},dynamicWatermarkConfig:{content:"",speed:.2,fontSize:12,color:n(230),opacity:.15},isDropSameTimestampGop:!1,mseDecodeAudio:!0,wcsDecodeAudio:!0,nakedFlowH265DemuxUseNew:!0,nakedFlowDemuxUseNew:!0,extendDomConfig:{html:"",showBeforePlay:!1,showAfterLoading:!0},disableContextmenu:!1,mseDecoderUseWorker:!0,openMemoryLog:!1,mainThreadFetchUseWorker:!0,playFailedAndPausedShowPlayBtn:!0,mseCorrectionTimestamp:!0,flvDemuxBufferSizeTooLargeReplay:!1,flvDemuxBufferSizeTooLargeEmitFailed:!1,flvDemuxBufferSizeMaxLarge:1048576,isCheckInView:!1,hiddenControl:!1,androidMobileFullscreenRotate:!0,disableModule:{ptz:!1,record:!1,zoom:!1,watermark:!1,playback:!1},recordWebMSupportSeek:!1,wasmPlayAudioUseVideoRender:!1,mseWaitVideoCanplayTimeout:6,mseWaitVideoCanplayAutoWasm:!0,zoomMaxScale:5,zoomSupportGestureInMobile:!1,zoomSupportGestureInMobileSpeed:.2,drawingRectColor:n(642),drawingRectLineWidth:1,drawingRectEndRemoveDom:!0,videoSEISyncPtsDiff:.2,initShowPlayBtn:!1,playbackCheckStreamEnd:!0,autoUseSystemFullScreen:!0,playVodConfig:{showRateBtn:!1,rateConfig:[],useWCS:!1,useMSE:!0,useSIMD:!0,startTime:null},playVodForwardMaxRateDecodeIFrame:8,playVodEndedAndAutoReplay:!1,playVodEndedAndShowPlayBtn:!0,hotKeyVolumeStep:.05,hotKeySeekStep:5,websocketOpenTimeout:8,i18n:{},screenshotUseHighQuality:!1,requestAnimationFrameMaxDiff:800,isUseFileProtocol:!1},C={playType:_[n(537)],playbackForwardMaxRateDecodeIFrame:_[n(566)],isMulti:_[n(328)],isM7sCrypto:_[n(527)],supportHls265:_[n(229)],pauseAndNextPlayUseLastFrameShow:_.pauseAndNextPlayUseLastFrameShow,replayUseLastFrameShow:_[n(580)],widthOrHeightChangeReplayDelayTime:_[n(277)],controlSize:_.controlSize,multiIndex:_[n(235)],isFlv:_[n(302)],isFmp4:_[n(362)],isMpeg4:_[n(673)],isNakedFlow:_.isNakedFlow,isHls:_.isHls,isWebrtc:_[n(540)],isWebrtcForZLM:_[n(196)],isWebrtcForSRS:_.isWebrtcForSRS,isWebrtcForOthers:_[n(663)],isAliyunRtc:_[n(377)],isTs:_[n(461)],ghostWatermarkConfig:_[n(261)],dynamicWatermarkConfig:_[n(491)],watermarkConfig:_[n(245)],defaultStreamQuality:_[n(266)],videoRenderSupportScale:_[n(559)],timeout:_.timeout,loadingTimeout:_[n(274)],heartTimeout:_[n(649)],url:"",container:"",playbackConfig:{},playVodConfig:{},fullscreenWatermarkConfig:{},playbackForwardMaxRatePlayAudio:!1,playOptions:{},isLive:!0,playFailedUseLastFrameShow:!0,playFailedAndPausedShowMessage:!0,isUseNewFullscreenWatermark:!0,websocket1006ErrorReplay:!0,websocket1006ErrorReplayDelayTime:1,streamErrorReplay:!1,streamErrorReplayDelayTime:1,streamEndReplay:!1,streamEndReplayDelayTime:1,networkDisconnectReplay:!0,loadingTimeoutRetryEndShowPlayBtn:!0,initDecoderWorkerTimeout:10,checkIsMeaningfulRetryTimes:5,isPlayFailedAndPausedSaveLastIframeInfo:!0},R={init:n(552),initVideo:n(574),render:"render",playAudio:n(262),initAudio:n(208),kBps:"kBps",decode:n(497),audioCode:n(294),audioNalu:n(456),audioAACSequenceHeader:"audioAACSequenceHeader",videoCode:n(629),videoCodec:n(451),videoNalu:n(452),videoPayload:n(601),audioPayload:n(475),wasmError:n(298),workerFetch:"workerFetch",iframeIntervalTs:n(620),isDropping:n(671),workerEnd:n(578),networkDelay:n(600),playbackStreamVideoFps:n(499),wasmWidthOrHeightChange:n(215),simdDecodeError:n(440),simdH264DecodeVideoWidthIsTooLarge:"simdH264DecodeVideoWidthIsTooLarge",websocketOpen:n(354),websocketStringMsg:"websocketStringMsg",closeEnd:n(479),tempStream:"tempStream",videoSEI:n(550),flvScriptData:n(371),aacSequenceHeader:n(313),videoSequenceHeader:n(268),flvBufferData:n(434),checkFirstIFrame:"checkFirstIFrame",mseHandle:n(363),mseFirstRenderTime:n(270),mseError:"mseError",notSupportNewWasm:n(668),failedToAsynchronouslyPrepareWasm:n(382)},D={audio:1,video:2},L={audio:8,video:9,scriptData:18},x={init:n(552),decode:"decode",audioDecode:n(348),videoDecode:n(505),initAudioCodec:"initAudioCodec",initVideoCodec:"initVideoCodec",close:n(247),updateConfig:n(387),resetDecode:n(477),clearBuffer:n(225),resetAudioDecode:n(548),resetVideoDecode:"resetVideoDecode",fetchStream:"fetchStream",sendWsMessage:n(383),mseUpdateVideoTimestamp:"mseUpdateVideoTimestamp",playbackIsPause:n(204)},P={fetch:"fetch",destroy:n(250),destroyEnd:n(296),buffer:"buffer",fetchError:n(555),fetchErrorWorker:n(622),fetchClose:n(464),fetchSuccess:n(350),init:n(552)},B={fetch:n(329),sendMessage:n(242),destroy:n(250),destroyEnd:n(296),buffer:"buffer",websocketError:"websocketError",websocketClose:n(657),websocketOpen:n(354),websocketStringMsg:n(602),init:"init"},M={fullscreen:"fullscreen$2",fullScreenByStart:"fullScreenByStart",webFullscreen:n(624),decoderWorkerInit:n(183),play:n(207),playing:n(495),pause:n(384),mute:n(472),load:n(186),loading:n(369),zooming:"zooming",drawingRect:n(549),drawingRectInfo:"drawingRectInfo",videoInfo:n(517),timeUpdate:"timeUpdate",audioInfo:n(476),log:"log",error:"error",kBps:n(623),timeout:n(407),delayTimeout:n(662),delayTimeoutRetryEnd:n(493),loadingTimeout:"loadingTimeout",loadingTimeoutRetryEnd:n(617),stats:n(194),performance:"performance",videoSmooth:n(279),faceDetectActive:n(645),objectDetectActive:n(593),occlusionDetectActive:n(547),imageDetectActive:"imageDetectActive",record:n(318),recording:n(468),recordingTimestamp:n(264),recordStart:"recordStart",recordEnd:n(283),recordCreateError:n(375),recordBlob:n(198),recordCancel:"recordCancel",buffer:n(659),videoFrame:n(421),videoSEI:n(550),videoSEISyncPts:n(210),start:n(631),metadata:n(483),resize:"resize",volumechange:n(558),volume:n(526),destroy:"destroy",beforeDestroy:n(180),streamEnd:n(519),streamRate:n(300),streamAbps:n(193),streamVbps:n(551),streamDts:n(605),streamSuccess:n(184),streamMessage:n(607),streamError:n(506),streamStats:n(301),streamEndInner:n(621),mseSourceOpen:"mseSourceOpen",mseSourceClose:"mseSourceClose",mseSourceended:n(604),mseSourceStartStreaming:n(532),mseSourceEndStreaming:n(319),mseSourceBufferError:n(267),mseAddSourceBufferError:"mseAddSourceBufferError",mseWorkerAddSourceBufferError:n(488),mseSourceBufferBusy:n(635),mseSourceBufferFull:"mseSourceBufferFull",videoWaiting:n(182),videoTimeUpdate:n(241),videoSyncAudio:n(441),playToRenderTimes:"playToRenderTimes",playbackTime:n(399),playbackTimestamp:"playbackTimestamp",playbackTimeScroll:n(654),playbackPrecision:n(336),playbackShowPrecisionChange:n(308),playbackJustTime:n(628),playbackStats:n(324),playbackSeek:n(481),playbackPause:n(514),playbackPauseOrResume:"playbackPauseOrResume",playbackRateChange:n(614),playbackPreRateChange:n(259),playbackEndInner:"playbackEndInner",playbackEnd:n(339),playVodStats:n(449),playVodPause:n(185),playVodPauseOrResume:n(281),playVodRateChange:n(530),playVodTime:"playVodTime",playVodTimeCache:n(188),playVodSeek:n(647),playVodSeekEnd:n(494),playVodVideoSeekingByMse:n(486),playVodVideoSeekedByMse:"playVodVideoSeekedByMse",playVodCanplay:"playVodCanplay",playVodWaiting:n(448),playVodEndedAndReplay:"playVodEndedAndReplay",playVodEnded:"playVodEnded",ptz:n(525),streamQualityChange:n(529),visibilityChange:n(419),netBuf:n(271),close:n(247),networkDelayTimeout:n(346),togglePerformancePanel:n(644),viewResizeChange:n(518),flvDemuxBufferSizeTooLarge:n(217),talkGetUserMediaSuccess:"talkGetUserMediaSuccess",talkGetUserMediaFail:n(501),talkGetUserMediaTimeout:n(446),talkStreamStart:n(367),talkStreamOpen:"talkStreamOpen",talkStreamClose:n(303),talkStreamError:n(227),talkStreamInactive:n(520),talkStreamMsg:n(634),webrtcDisconnect:n(251),webrtcFailed:"webrtcFailed",webrtcClosed:n(252),webrtcChecking:n(226),webrtcConnected:n(236),webrtcCompleted:"webrtcCompleted",webrtcOnConnectionStateChange:n(201),webrtcOnIceConnectionStateChange:n(341),crashLog:n(509),focus:n(291),blur:"blur",inView:n(515),visibilityHiddenTimeout:n(626),websocketOpen:n(354),websocketClose:"websocketClose",websocketError:n(351),websocketStringMsg:n(602),aiObjectDetectorInfo:n(534),aiFaceDetectorInfo:n(390),aiOcclusionDetectResult:"aiOcclusionDetectResult",aiImageDetectResult:n(306),playFailedAndPaused:n(541),audioResumeState:n(333),webrtcStreamH265:n(189),flvMetaData:n(458),talkFailedAndStop:"talkFailedAndStop",removeLoadingBgImage:n(490),memoryLog:n(432),downloadMemoryLog:n(289),pressureObserverCpu:n(361),currentPts:n(454),online:n(465),offline:"offline",networkState:n(510),clickInitPlayer:n(482)},F={load:M.load,timeUpdate:M.timeUpdate,videoInfo:M[n(517)],audioInfo:M[n(476)],error:M[n(457)],kBps:M[n(623)],start:M[n(631)],timeout:M[n(407)],loadingTimeout:M[n(274)],loadingTimeoutRetryEnd:M.loadingTimeoutRetryEnd,delayTimeout:M[n(662)],delayTimeoutRetryEnd:M.delayTimeoutRetryEnd,fullscreen:n(670),webFullscreen:M[n(624)],play:M.play,pause:M[n(384)],mute:M[n(472)],stats:M[n(194)],performance:M[n(190)],recordingTimestamp:M[n(264)],recordStart:M.recordStart,recordCreateError:M.recordCreateError,recordEnd:M[n(283)],recordBlob:M[n(198)],recordCancel:M[n(257)],playToRenderTimes:M[n(581)],playbackSeek:M.playbackSeek,playbackStats:M[n(324)],playbackTimestamp:M.playbackTimestamp,playbackPauseOrResume:M[n(359)],playbackPreRateChange:M.playbackPreRateChange,playbackRateChange:M[n(614)],playbackShowPrecisionChange:M[n(308)],playbackEnd:M[n(339)],playVodEnded:M.playVodEnded,playVodPauseOrResume:M[n(281)],playVodRateChange:M[n(530)],playVodTime:M[n(650)],playVodSeek:M[n(647)],playVodSeekEnd:M.playVodSeekEnd,ptz:M[n(525)],streamQualityChange:M.streamQualityChange,zooming:M[n(584)],crashLog:M[n(509)],focus:M[n(291)],blur:M.blur,visibilityHiddenTimeout:M.visibilityHiddenTimeout,visibilityChange:M[n(419)],websocketOpen:M[n(354)],websocketClose:M[n(657)],websocketStringMsg:M[n(602)],networkDelayTimeout:M[n(346)],aiObjectDetectorInfo:M.aiObjectDetectorInfo,aiFaceDetectorInfo:M.aiFaceDetectorInfo,aiOcclusionDetectResult:M[n(466)],aiImageDetectResult:M[n(306)],playFailedAndPaused:M[n(541)],streamEnd:M[n(519)],audioResumeState:M[n(333)],videoSEI:M[n(550)],videoSEISyncPts:M[n(210)],flvMetaData:M[n(458)],webrtcOnConnectionStateChange:M[n(201)],webrtcOnIceConnectionStateChange:M[n(341)],currentPts:M[n(454)],videoSmooth:M[n(279)],networkState:M[n(510)],volume:M.volume,drawingRectInfo:M[n(615)],clickInitPlayer:M.clickInitPlayer};n(303),n(520),n(634),n(186),n(612),n(476),n(457),n(623),n(407),n(274),n(617),n(493),n(384),n(472),n(194),n(581),n(354),n(657),n(541),n(333);const O={talkStreamError:M.talkStreamError,talkStreamClose:M.talkStreamClose},U={playError:n(583),fetchError:n(555),fetchErrorWorker:n(622),websocketError:"websocketError",websocketOpenTimeout:n(573),webcodecsH265NotSupport:n(585),webcodecsDecodeError:"webcodecsDecodeError",webcodecsUnsupportedConfigurationError:n(455),webcodecsDecodeConfigureError:n(651),webcodecsAudioInitTimeout:n(669),webcodecsAudioNoDataTimeout:n(536),mediaSourceH265NotSupport:n(542),mediaSourceAudioG711NotSupport:n(403),mediaSourceAudioInitTimeout:n(565),mediaSourceAudioNoDataTimeout:n(576),mediaSourceDecoderConfigurationError:n(625),mediaSourceFull:M[n(206)],mseSourceBufferError:M[n(267)],mseAddSourceBufferError:M[n(640)],mseWorkerAddSourceBufferError:M[n(488)],mediaSourceAppendBufferError:"mediaSourceAppendBufferError",mediaSourceTsIsMaxDiff:n(638),mediaSourceUseCanvasRenderPlayFailed:n(608),mediaSourceBufferedIsZeroError:"mediaSourceBufferedIsZeroError",wasmDecodeError:"wasmDecodeError",wasmUseVideoRenderError:n(643),simdH264DecodeVideoWidthIsTooLarge:n(256),simdDecodeError:n(440),hlsError:n(513),webrtcError:"webrtcError",webrtcClosed:M[n(252)],webrtcIceCandidateError:n(424),webglAlignmentError:n(401),wasmWidthOrHeightChange:"wasmWidthOrHeightChange",mseWidthOrHeightChange:n(546),wcsWidthOrHeightChange:n(522),widthOrHeightChange:n(222),tallWebsocketClosedByError:"tallWebsocketClosedByError",flvDemuxBufferSizeTooLarge:M.flvDemuxBufferSizeTooLarge,audioChannelError:n(579),webglContextLostError:"webglContextLostError",videoElementPlayingFailed:n(323),videoElementPlayingFailedForWebrtc:n(411),decoderWorkerInitError:n(487),decoderWorkerWasmError:n(269),videoInfoError:n(613),streamEnd:M[n(519)],websocket1006Error:"websocket1006Error",delayTimeout:M[n(662)],loadingTimeout:M[n(274)],networkDelayTimeout:M[n(346)],fullscreenError:n(389),aliyunRtcError:n(312),mseWaitVideoCanplayTimeout:n(639),initDecoderWorkerTimeout:n(310),notSupportNewWasm:n(668),failedToAsynchronouslyPrepareWasm:n(382),playVodMp4Error:n(413),mp4Error:n(191),...O},N={notConnect:n(442),open:n(484),close:"close",error:n(457)};n(223),n(272);const j={download:"download",base64:n(404),blob:"blob"},V={download:n(587),blob:n(216)},z={7:n(443),12:n(192),99:"MPEG4"},G={h264:7,h265:12,mpeg4:99},W={h264:"H264(AVC)",h265:n(192)},H={AAC:10,ALAW:7,MULAW:8,MP3:2,OPUS:13,G711A:7,G711U:8},K={AAC:"AAC",ALAW:n(572),MULAW:n(345),MP3:"MP3"},Q={10:n(652),7:n(450),8:n(431),2:n(304)},Y={sps:7,pps:8,iFrame:5,kUnspecified:0,kSliceNonIDR:1,kSliceDPA:2,kSliceDPB:3,kSliceDPC:4,kSliceIDR:5,kSliceSEI:6,kSliceSPS:7,kSlicePPS:8,kSliceAUD:9,kEndOfSequence:10,kEndOfStream:11,kFiller:12,kSPSExt:13,kReserved0:14},q={pFrame:1,kSliceBLA_W_LP:16,kSliceBLA_W_RADL:17,kSliceBLA_N_LP:18,iFrame:19,kSliceIDR_W_RADL:19,nLp:20,kSliceIDR_N_LP:20,craNut:21,kSliceCRA_NUT:21,kSliceRSV_IRAP_VCL22:22,kSliceRSV_IRAP_VCL23:23,vps:32,kSliceVPS:32,sps:33,kSliceSPS:33,pps:34,kSlicePPS:34,kSliceAUD:35,sei:39,prefixSei:39,suffixSei:40},J={full:0,auto:1,fullAuto:2},X={webcodecs:n(408),webgl:n(545),webgl2:n(653),webgpu:n(307),offscreen:n(221),mse:n(237),hls:n(372),webrtc:n(474),canvas:n(396)},Z={key:"key",delta:n(423)},$={avc:n(420),hev:n(342),hev2:n(199),hev3:n(288),hev4:n(603),hev5:'video/mp4;codecs="hev1.4.10.L120.90"'},tt={ended:n(244),open:n(484),closed:n(538)};Math[n(570)](40);const et={esc:27,arrowUp:38,arrowDown:40,arrowLeft:37,arrowRight:39},st={oneHour:n(316),halfHour:"halfHour",tenMin:n(567),fiveMin:n(240)},it={oneHour:n(255),halfHour:"half-hour",tenMin:n(426),fiveMin:n(197)};n(325);const rt=[n(316),"halfHour",n(567),"fiveMin"],nt=["up",n(646),n(400),n(544),n(334),n(627),n(554),n(516)],ot={up:"up",right:n(646),down:n(400),left:n(544),leftUp:"leftUp",leftDown:n(489),rightUp:"rightUp",rightDown:n(438),stop:n(557),fiStop:n(286),zoomExpand:"zoomExpand",zoomNarrow:n(418),apertureFar:n(502),apertureNear:n(305),focusFar:n(553),focusNear:n(507),cruiseStart:"cruiseStart",cruiseStop:n(331),fogOpen:"fogOpen",fogClose:n(658),wiperOpen:"wiperOpen",wiperClose:"wiperClose"},at=(n(425),n(364),{png:n(414),jpeg:n(287),webp:n(265)}),ht={sourceClose:"sourceclose",sourceOpen:n(597),sourceended:n(535),startstreaming:n(282),endstreaming:n(187),qualitychange:n(409)},ct={canplay:n(232),waiting:n(243),timeUpdate:n(360),ratechange:n(209),stalled:n(406),progress:n(202),loadedmetadata:n(666)},lt={h264:"avc",h265:"hevc",av1:n(258)},dt={keyframeIsRequiredError:n(512),canNotDecodeClosedCodec:n(428),unsupportedConfiguration:"Unsupported configuration",decoderFailure:n(357),decodingError:n(609),decoderError:n(381),hevcDecodingIsNotSupported:n(254)},ut={abortError:n(463),abortError2:n(591),abort:n(591)},pt={loading:n(369),playing:n(495),paused:n(317),destroy:n(250)},ft=0,mt={keyFrame:1,interFrame:2};n(223),n(378),n(356),n(445),n(571);n(582),n(667),n(484),n(247),n(457);n(347),n(564);n(378),n(445),n(402),n(596);const gt={worklet:"worklet",script:"script",active:n(335)},At={name:"",index:0,icon:"",iconHover:"",iconTitle:"",activeIcon:"",activeIconHover:"",activeIconTitle:"",click:null,activeClick:null},yt={content:"",click:null,index:0};n(433),n(415),n(586),n(618),n(181),n(630),n(293),n(511),n(470),n(641),n(560),n(469),n(595),n(358),n(592);const bt={keyFrame:1,interFrame:2};n(665),n(596),n(329),n(224),n(203);const vt={SUBTITLE_SEGMENTS:n(385),HLS_MANIFEST_LOADED:n(352),HLS_LEVEL_LOADED:"hls-level-loaded",DEMUXED_TRACK:n(660),FLV_SCRIPT_DATA:n(220),METADATA_PARSED:n(478),TTFB:n(429),LOAD_RETRY:n(485),LOAD_START:"load-start",SPEED:n(664),LOAD_COMPLETE:n(179),LOAD_RESPONSE_HEADERS:n(588),SEI:n(290),SEI_IN_TIME:"sei-in-time",NO_AUDIO_TRACK:n(460),REMOVE_BUFFER:"remove-buffer",BUFFEREOS:n(528),SOURCEBUFFER_CREATED:n(315),SWITCH_URL_FAILED:n(599),SWITCH_URL_SUCCESS:"switch-url-success",SUBTITLE_PLAYLIST:n(405),STREAM_PARSED:n(610),ERROR:n(457)},St=[0,160,240,320,480,640],wt=[0,160,240,320,480,640],Et=["轻松","正常","较高","高"],It={idle:n(417),connecting:"connecting",buffering:n(272),error:n(457),complete:n(416)},Tt={1:"MEDIA_ERR_ABORTED",2:n(391),3:"MEDIA_ERR_DECODE",4:n(370)},kt={videoDecoderInitializationFailed:n(340),audioDecoderError:n(395),notSupportAudioFormat:"Unsupported audio format",playFailedBecauseNotNotInteractWithTheDocumentFirst:n(320)};n(211);const _t={memoryAccessOutOfBounds:n(444)},Ct={video:1,audio:2},Rt={PACKET_TYPE_SEQ_START:0,PACKET_TYPE_FRAMES:1,PACKET_TYPE_SEQ_END:2,PACKET_TYPE_FRAMESX:3,PACKET_TYPE_METADATA:4},Dt={FT_KEY:16,FT_INTER:32},Lt={CandidatePair:n(569),Certificate:"certificate",Codec:n(539),Csrc:n(280),DataCahnnel:n(462),InboundRtp:n(326),LocalCandidate:n(337),OutboundRtp:n(498),PeerConnection:"peer-connection",Receiver:n(430),RemoteCandidate:n(234),RemoteInboundRtp:n(410),RemoteOutboundRtp:"remote-outbound-rtp",Sender:"sender",Stream:"stream",Track:"track",Transport:n(338),MediaSource:"media-source"},xt=9e4,Pt=45e4,Bt=9e4,Mt={ws1006:n(589),mseDecodeError:n(598),wcsDecodeError:"wcsDecodeError",streamError:n(506)},Ft={ulaw:n(368),alaw:"alaw",mp3:n(459),opus:n(364)},Ot=48e3;n(355),n(353),n(453),n(473),n(503);const Ut={created:n(533),loading:n(369),playing:n(495)},Nt=typeof window===n(311)&&window[n(344)]===window?window:typeof self===n(311)&&self[n(521)]===self?self:typeof global===n(311)&&global[n(393)]===global?global:void 0,jt={canplay:n(232),canplaythrough:n(218),complete:n(416),durationchange:n(594),emptied:n(523),ended:"ended",error:n(457),loadeddata:n(309),loadedmetadata:n(666),loadstart:"loadstart",pause:n(384),play:"play",playing:n(495),progress:n(202),ratechange:n(209),seeked:n(561),seeking:"seeking",stalled:n(406),suspend:n(366),timeupdate:n(360),volumechange:n(558),waiting:"waiting",readystatechange:n(332)},Vt={error:n(457)},zt={play:"播放",pause:"暂停",audio:"",mute:"",screenshot:"截图",loading:"",fullscreen:"全屏",fullscreenExit:n(373),record:"录制",recordStop:"停止录制",narrow:"缩小",expand:"放大",ptz:n(500),ptzActive:n(672),zoom:"电子放大",zoomStop:n(648),close:"关闭",performance:n(447),performanceActive:n(568),face:n(238),faceActive:n(508),object:n(435),objectActive:"物品识别激活",occlusion:n(437),occlusionActive:n(394),logSave:n(496)},Gt={wasm:n(263),simd:n(195),fSimd:"FSimd"};function Wt(t,e){const s=S();return(Wt=function(t,e){return s[t-=179]})(t,e)}const Ht=n(297),Kt=n(292);!function(t,e){const s=Yt,i=t();for(;;)try{if(307308===parseInt(s(406))/1+parseInt(s(397))/2*(-parseInt(s(417))/3)+-parseInt(s(408))/4*(-parseInt(s(411))/5)+parseInt(s(401))/6+-parseInt(s(407))/7*(parseInt(s(413))/8)+-parseInt(s(412))/9*(parseInt(s(416))/10)+parseInt(s(404))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(qt);class Qt{constructor(t){const e=Yt;this[e(398)]=function(s){const i=e;if(t[i(409)].debugLevel==m[i(414)]){const e=t._opt[i(405)]?"["+t[i(409)][i(405)]+"]":"";for(var r=arguments[i(399)],n=new Array(r>1?r-1:0),o=1;o1?r-1:0),o=1;o1?n-1:0),a=1;a32&&console[e(448)](e(450)),t<=this._current_word_bits_left){let s=this[e(462)]>>>32-t;return this[e(462)]<<=t,this[e(454)]-=t,s}let s=this._current_word_bits_left?this[e(462)]:0;s>>>=32-this[e(454)];let i=t-this[e(454)];this._fillCurrentWord();let r=Math[e(459)](i,this[e(454)]),n=this._current_word>>>32-r;return this[e(462)]<<=r,this[e(454)]-=r,s=s<>>e))return this[t(462)]<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this[t(439)]()}readUEG(){const t=re;let e=this[t(439)]();return this[t(437)](e+1)-1}[re(452)](){let t=this[re(447)]();return 1&t?t+1>>>1:-1*(t>>>1)}}function ae(){const t=["_current_word","buffer","_buffer_index","189963LNcmoF","set","_buffer","readBits","_total_bits","_skipLeadingZero","_total_bytes","byteLength","14544PQlSgk","readBool","_fillCurrentWord","99PzBTJO","readByte","readUEG","error","subarray","ExpGolomb: readBits() bits exceeded max 32bits!","1240pbvxsS","readSEG","4611344tSTKQw","_current_word_bits_left","1605898exSxmM","6KAswta","ExpGolomb: _fillCurrentWord() but no bytes available","140612rtjgLa","min","1302580xbXhlh","1055110VrwYZf"];return(ae=function(){return t})()}const he=ke;!function(t,e){const s=ke,i=t();for(;;)try{if(350956===-parseInt(s(531))/1+-parseInt(s(533))/2+-parseInt(s(501))/3+-parseInt(s(497))/4+-parseInt(s(479))/5*(parseInt(s(500))/6)+parseInt(s(508))/7*(parseInt(s(532))/8)+-parseInt(s(520))/9*(-parseInt(s(542))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ge);const ce=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350,-1,-1,-1],le=ce,de=ce;function ue(t){let{profile:e,sampleRate:s,channel:i}=t;return new Uint8Array([175,0,e<<3|(14&s)>>1,(1&s)<<7|i<<3])}function pe(t){return fe(t)&&t[1]===ft}function fe(t){const e=ke;return t[0]>>4===H[e(529)]}function me(t,e){if("mp4a.40.2"===t){if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}function ge(){const t=["Flv: AAC invalid sampling frequency index!","log","27TnMYGY","hasIncompleteData","readNextAACFrame","warn","data_","look","channel_config","data","aac","AAC","sampling_frequency","397813mssKLd","72exKFmH","542028urNeTl","readBool","sbr","object_type","aacEncoderConfigurationRecord","current_syncword_offset_","readBits","more than 2 numSubFrames Not Supported","channels","4158500XBZPqt","getLATMValue","sampling_index","read_golomb","iserro","indexOf","read","5315qvtsDC","more than 2 numProgram Not Supported","set","other_data_present","StreamMuxConfig Missing","Could not found ADTS syncword until payload end","readByte","destroy","audio_object_type","has_last_incomplete_data","allStreamsSameTimeFraming zero is Not Supported","mp4a.40.","error","findNextSyncwordOffset","eof_flag_","slice","buffer","length","1647028naoHga","getIncompleteData","firefox","1818YyyTUK","288630cqSmkq","ext_object_type","bufoff","sample_rate","audioMuxVersionA is Not Supported","chan_config","buflen","468447KNCLjk",". Only frameLengthType = 0 Supported","unshift","sampleRate: ","Flv: AAC invalid channel configuration","more than 2 numLayer Not Supported","byteLength","subarray","bufpos","sampling_freq_index"];return(ge=function(){return t})()}function Ae(t){const e=ke;let s=arguments[e(496)]>1&&void 0!==arguments[1]?arguments[1]:9e4;return 1024*s/t}const ye=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];function be(t){const e=ke;let s=new Uint8Array(t),i=null,r=0,n=0,o=0,a=null;if(r=n=s[0]>>>3,o=(7&s[0])<<1|s[1]>>>7,o<0||o>=ye.length)return void console[e(491)](e(518));let h=ye[o],c=(120&s[1])>>>3;if(c<0||c>=8)return void console.log(e(512));5===r&&(a=(7&s[1])<<1|s[2]>>>7,s[2]);let l=Nt.navigator.userAgent.toLowerCase();return-1!==l[e(477)](e(499))?o>=6?(r=5,i=new Array(4),a=o-3):(r=2,i=new Array(2),a=o):-1!==l[e(477)]("android")?(r=2,i=new Array(2),a=o):(r=5,a=o,i=new Array(4),o>=6?a=o-3:1===c&&(r=2,i=new Array(2),a=o)),i[0]=r<<3,i[0]|=(15&o)>>>1,i[1]=(15&o)<<7,i[1]|=(15&c)<<3,5===r&&(i[1]|=(15&a)>>>1,i[2]=(1&a)<<7,i[2]|=8,i[3]=0),{audioType:e(528),config:i,sampleRate:h,channelCount:c,objectType:r,codec:e(490)+r,originalCodec:e(490)+n}}class ve{constructor(t){const e=ke;this[e(495)]=t,this[e(507)]=t[e(496)],this.bufpos=0,this[e(503)]=0,this.iserro=!1}read(t){const e=ke;let s=0,i=0;for(;t;){if(t<0||this[e(516)]>=this[e(507)])return this[e(476)]=!0,0;this[e(476)]=!1,i=this[e(503)]+t>8?8-this[e(503)]:t,s<<=i,s+=this[e(495)][this[e(516)]]>>8-this[e(503)]-i&255>>8-i,this[e(503)]+=i,t-=i,8==this[e(503)]&&(this[e(516)]++,this[e(503)]=0)}return s}[he(525)](t){const e=he;let s=this[e(516)],i=this.bufoff,r=this.read(t);return this.bufpos=s,this[e(503)]=i,r}[he(545)](){const t=he;let e;for(e=0;0==this[t(478)](1)&&!this[t(476)];e++);return(1<=i.byteLength)return this[e(493)]=!0,i[e(514)];if(4095===(i[s+0]<<8|i[s+1])>>>4)return s;s++}}[he(522)](){const t=he;let e=this[t(524)],s=null;for(;null==s&&!this.eof_flag_;){let i=this[t(538)],r=(8&e[i+1])>>>3,n=(6&e[i+1])>>>1,o=1&e[i+1],a=(192&e[i+2])>>>6,h=(60&e[i+2])>>>2,c=(1&e[i+2])<<2|(192&e[i+3])>>>6,l=(3&e[i+3])<<11|e[i+4]<<3|(224&e[i+5])>>>5;if(e[i+6],i+l>this[t(524)].byteLength){this.eof_flag_=!0,this[t(488)]=!0;break}let d=1===o?7:9,u=l-d;i+=d;let p=this[t(492)](i+u);if(this[t(538)]=p,0!==r&&1!==r||0!==n)continue;let f=e[t(515)](i,i+u);s={},s[t(487)]=a+1,s[t(517)]=h,s[t(530)]=le[h],s.channel_config=c,s[t(527)]=f}return s}[he(521)](){return this.has_last_incomplete_data}[he(498)](){const t=he;return this[t(488)]?this.data_[t(515)](this[t(538)]):null}}function ke(t,e){const s=ge();return(ke=function(t,e){return s[t-=476]})(t,e)}class _e{constructor(t){const e=he;this[e(524)]=t,this.eof_flag_=!1,this[e(538)]=this[e(492)](0),this[e(493)]&&console[e(491)](e(484))}[he(492)](t){const e=he;let s=t,i=this[e(524)];for(;;){if(s+1>=i.byteLength)return this[e(493)]=!0,i[e(514)];if(695===(i[s+0]<<3|i[s+1]>>>5))return s;s++}}getLATMValue(t){let e=t.readBits(2),s=0;for(let i=0;i<=e;i++)s<<=8,s|=t.readByte();return s}[he(522)](t){const e=he;let s=this[e(524)],i=null;for(;null==i&&!this[e(493)];){let r=this[e(538)],n=(31&s[r+1])<<8|s[r+2];if(r+3+n>=this[e(524)][e(514)]){this[e(493)]=!0,this[e(488)]=!0;break}let o=new oe(s[e(515)](r+3,r+3+n)),a=null;if(o.readBool()){if(null==t){console[e(523)](e(483)),this[e(538)]=this[e(492)](r+3+n),o[e(486)]();continue}a=t}else{let t=o[e(534)]();if(t&&o[e(534)]()){console[e(491)](e(505)),o.destroy();break}if(t&&this.getLATMValue(o),!o[e(534)]()){console[e(491)](e(489)),o[e(486)]();break}if(0!==o[e(539)](6)){console[e(491)](e(540)),o[e(486)]();break}if(0!==o[e(539)](4)){console[e(491)](e(480)),o[e(486)]();break}if(0!==o[e(539)](3)){console[e(491)](e(513)),o.destroy();break}let s=t?this[e(543)](o):0,i=o[e(539)](5);s-=5;let r=o[e(539)](4);s-=4;let n=o[e(539)](4);s-=4,o[e(539)](3),s-=3,s>0&&o.readBits(s);let h=o[e(539)](3);if(0!==h){console.error("frameLengthType = "+h+e(509)),o.destroy();break}o.readByte();let c=o[e(534)]();if(c)if(t)this.getLATMValue(o);else{let t=0;for(;;){t<<=8;let s=o[e(534)]();if(t+=o[e(485)](),!s)break}console[e(519)](t)}o[e(534)]()&&o[e(485)](),a={},a[e(487)]=i,a[e(517)]=r,a[e(530)]=le[a[e(517)]],a[e(526)]=n,a[e(482)]=c}let h=0;for(;;){let t=o.readByte();if(h+=t,255!==t)break}let c=new Uint8Array(h);for(let t=0;t1&&void 0!==arguments[1]?arguments[1]:0;return(t[s]<<24>>>0)+(t[s+1]<<16)+(t[s+2]<<8)+(t[s+3]||0)}function De(t){const e=Ce,s=t[e(202)];let i=2,r=0;for(;null!==t[i]&&void 0!==t[i]&&1!==t[i];)i++;if(i++,r=i+2,r>=s)return[];const n=[];for(;r1&&void 0!==arguments[1]?arguments[1]:4;if(t[e(202)]<4)return[];const i=t[e(202)],r=[];let n,o=0;for(;o+s>>=8),o+=s,n){if(o+n>i)break;r[e(210)](t.subarray(o,o+n)),o+=n}return r}function xe(t){const e=Ce;let s=arguments[e(202)]>1&&void 0!==arguments[1]&&arguments[1];const i=t[e(202)];let r=s?2:1,n=0,o=0,a="";for(;255===t[r];)n+=255,r++;for(n+=t[r++];255===t[r];)o+=255,r++;if(o+=t[r++],5===n&&i>r+16)for(let e=0;e<16;e++)a+=t[r].toString(16),r++;return{payload:t[e(207)](r),type:n,size:o,uuid:a}}function Pe(t){const e=Ce,s=t[e(214)],i=new Uint8Array(4);i[0]=s>>>24&255,i[1]=s>>>16&255,i[2]=s>>>8&255,i[3]=255&s;const r=new Uint8Array(s+4);return r.set(i,0),r[e(217)](t,4),r}function Be(){const t=["3664dqGFeS","32236InJkBK","2379040SPepzK","byteLength","1gUFaUa","108kSNCHK","set","6NFpSPm","2955096dSzAtm","length","5786SXbTUh","576301hgHeCv","buffer","3080290lYCVXd","subarray","84rNpZCI","7532XuTlUL","push"];return(Be=function(){return t})()}!function(t,e){const s=Ce,i=t();for(;;)try{if(327511===parseInt(s(215))/1*(parseInt(s(203))/2)+-parseInt(s(216))/3*(-parseInt(s(212))/4)+-parseInt(s(213))/5*(parseInt(s(200))/6)+-parseInt(s(209))/7*(parseInt(s(211))/8)+parseInt(s(201))/9+parseInt(s(206))/10+-parseInt(s(204))/11*(-parseInt(s(208))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Be);const Me=oi;function Fe(){}function Oe(t){const e=oi;let s=null;const i=[e(596),"experimental-webgl",e(495),e(465)];let r=0;for(;!s&&r0&&void 0!==arguments[0]?arguments[0]:"";const s=e.split(","),i=atob(s[1]),r=s[0][t(416)](t(514),"")[t(416)](t(442),"");let n=i[t(641)],o=new Uint8Array(n);for(;n--;)o[n]=i[t(315)](n);return new File([o],t(483),{type:r})}function je(){const t=oi;return(new Date)[t(570)]()}function Ve(t,e,s){const i=oi;return Math[i(588)](Math[i(589)](t,Math.max(e,s)),Math[i(589)](e,s))}function ze(t,e,s){const i=oi;if(t)return typeof e===i(552)&&Object.keys(e)[i(611)]((s=>{ze(t,s,e[s])})),t[i(438)][e]=s,t}function Ge(t,e){let s=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t)return 0;const i=getComputedStyle(t,null).getPropertyValue(e);return s?parseFloat(i):i}function We(){const t=oi;return performance&&typeof performance[t(554)]===t(579)?performance.now():Date[t(554)]()}function He(t){let e=0,s=We();return i=>{if(!us(i))return;e+=i;const r=We(),n=r-s;n>=1e3&&(t(e/n*1e3),s=r,e=0)}}!function(t,e){const s=oi,i=t();for(;;)try{if(358520===-parseInt(s(508))/1*(parseInt(s(529))/2)+parseInt(s(601))/3*(parseInt(s(340))/4)+-parseInt(s(572))/5+parseInt(s(478))/6*(parseInt(s(618))/7)+parseInt(s(380))/8+-parseInt(s(402))/9*(-parseInt(s(458))/10)+parseInt(s(623))/11*(-parseInt(s(418))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(yi),(()=>{const t=oi;try{if(typeof WebAssembly===t(552)&&typeof WebAssembly[t(474)]===t(579)){const e=new(WebAssembly[t(450)])(Uint8Array.of(0,97,115,109,1,0,0,0));if(e instanceof WebAssembly.Module)return new WebAssembly.Instance(e)instanceof WebAssembly[t(463)]}}catch(t){}})();const Ke=Me(501),Qe=Me(445);Me(592),Me(334);const Ye=Me(568),qe=Me(444);function Je(){const t=Me;return/iphone|ipod|android.*mobile|windows.*phone|blackberry.*mobile/i.test(window.navigator[t(339)].toLowerCase())}function Xe(){return!(Je()||function(){const t=Me;return/ipad|android(?!.*mobile)|tablet|kindle|silk/i[t(396)](window.navigator[t(339)].toLowerCase())}())}function Ze(){const t=Me,e=window[t(436)][t(339)][t(357)]();return/android/i.test(e)}function $e(){const t=Me,e=window[t(436)][t(339)][t(357)]();return/firefox/i[t(396)](e)}function ts(){const t=Me,e=window[t(436)][t(339)][t(357)]()||"",s={type:"",version:""},i={IE:window[t(355)]||t(355)in window,Chrome:e[t(419)](t(378))>-1&&e.indexOf(t(583))>-1,Firefox:e.indexOf(t(324))>-1,Opera:e[t(419)]("opera")>-1,Safari:e[t(419)](t(583))>-1&&-1==e[t(419)]("chrome"),Edge:e[t(419)]("edge")>-1,QQBrowser:/qqbrowser/[t(396)](e),WeixinBrowser:/MicroMessenger/i[t(396)](e)};for(let r in i)if(i[r]){let i="";if("IE"===r){const s=e.match(/(msie\s|trident.*rv:)([\w.]+)/);s&&s.length>2&&(i=e[t(461)](/(msie\s|trident.*rv:)([\w.]+)/)[2])}else if(r===t(321)){for(let e in navigator.mimeTypes)navigator.mimeTypes[e].type===t(548)&&(r="360");const s=e.match(/chrome\/([\d.]+)/);s&&s[t(641)]>1&&(i=s[1])}else if("Firefox"===r){const s=e[t(461)](/firefox\/([\d.]+)/);s&&s[t(641)]>1&&(i=s[1])}else if(r===t(360)){const s=e.match(/opera\/([\d.]+)/);s&&s[t(641)]>1&&(i=s[1])}else if(r===t(628)){const s=e[t(461)](/version\/([\d.]+)/);s&&s[t(641)]>1&&(i=s[1])}else if(r===t(426)){const s=e[t(461)](/edge\/([\d.]+)/);s&&s.length>1&&(i=s[1])}else if(r===t(333)){const s=e[t(461)](/qqbrowser\/([\d.]+)/);s&&s[t(641)]>1&&(i=s[1])}s[t(383)]=r,s[t(408)]=parseInt(i)}return s}function es(){const t=Me,e=window.navigator[t(339)][t(357)]();return e&&/iphone|ipad|ipod|ios/[t(396)](e)}function ss(){const t=Me,e=window.navigator[t(339)];return!e[t(461)](/Chrome/gi)&&!!e[t(461)](/Safari/gi)}function is(t,e){const s=Me;if(0===arguments[s(641)])return null;var i,r=e||s(462);"object"==typeof t?i=t:(10===(""+t)[s(641)]&&(t=1e3*parseInt(t)),t=+t,i=new Date(t));var n={y:i[s(566)](),m:i[s(356)]()+1,d:i[s(312)](),h:i[s(467)](),i:i[s(425)](),s:i.getSeconds(),a:i[s(381)]()},o=r[s(416)](/{(y|m|d|h|i|s|a)+}/g,((t,e)=>{const i=s;var r=n[e];return"a"===e?["一","二","三","四","五","六","日"][r-1]:(t[i(641)]>0&&r<10&&(r="0"+r),r||0)}));return o}function rs(){return ns()}function ns(){const t=Me;let e=!1;return t(489)in Nt&&typeof Nt.VideoFrame===t(579)&&(e=!0),e}function os(t){if(typeof t!==Me(632))return t;var e=Number(t);return isNaN(e)?t:e}function as(){const t=Me;return t(540)[t(416)](/[xy]/g,(function(e){const s=t;var i=16*Math[s(502)]()|0;return("x"==e?i:3&i|8)[s(323)](16)}))}function hs(t,e){let s,i,r=!1;return function n(){const o=oi;for(var a=arguments[o(641)],h=new Array(a),c=0;c{r=!1,s&&(n[o(526)](i,s),s=null,i=null)}),e)}}function cs(){return ee[Me(567)]}function ls(t){return cs()&&ee[Me(415)]===t}function ds(t){const e=Me;if(null==t||""==t)return"0 Bytes";const s=new Array(e(524),"KB","MB","GB","TB","PB","EB","ZB","YB");let i=0;const r=parseFloat(t);i=Math[e(384)](Math[e(587)](r)/Math.log(1024));var n=r/Math[e(423)](1024,i);return(n=n[e(513)](2))+s[i]}function us(t){const e=Me;return Object.prototype[e(323)].call(t)===e(528)}function ps(){const t=Me;let e=!1;return t(379)in Nt&&Nt.MediaSource&&(Nt[t(379)][t(609)]($[t(309)])||Nt[t(379)][t(609)]($[t(612)])||Nt[t(379)][t(609)]($[t(353)])||Nt[t(379)][t(609)]($.hev4)||Nt.MediaSource.isTypeSupported($[t(395)]))&&(e=!0),e}function fs(){const t=Me,e=ts();return e[t(383)][t(357)]()===t(378)&&e[t(408)]>=107}function ms(){let t=!1;return Me(326)in window&&(t=!0),t}function gs(){let t=!1;return Me(621)in window&&(t=!0),t}function As(t,e){const s=Me;let i=window[s(354)][s(427)](e),r=window[s(412)].createElement("a");r[s(481)]=t,r[s(433)]=i;let n=window[s(412)].createEvent(s(473));n[s(620)](s(633),!0,!0),r[s(374)](n),setTimeout((()=>{const t=s;window[t(354)][t(452)](i)}),es()?1e3:0)}function ys(t){return null==t}function bs(t){return!0===t||!1===t}function vs(t){return!ys(t)}function Ss(t){const e=Me;let s={left:"",right:"",top:"",bottom:"",opacity:1,backgroundColor:"",image:{src:"",width:"100",height:"60"},text:{content:"",fontSize:"14",color:e(497),width:"",height:""},rect:{color:e(537),lineWidth:2,width:"",height:"",fill:"",fillOpacity:.2},line:{x1:"",y1:"",x2:"",y2:"",color:e(537),lineWidth:2},polygon:{color:e(537),lineWidth:2,list:[],fill:"",fillOpacity:.2},html:""};const i=Object[e(407)](s[e(533)],t[e(533)]||{}),r=Object[e(407)](s.text,t[e(435)]||{}),n=Object[e(407)](s[e(451)],t.rect||{}),o=Object[e(407)](s[e(373)],t.line||{});return s=Object[e(407)](s,t,{image:i,text:r,rect:n,line:o}),s}function ws(t,e){const s=Me;let i={container:t||"",text:"",opacity:"",angle:"",color:"",fontSize:"",fontFamily:""};return i=Object[s(407)](i,e),{watermark_parent_node:i[s(413)],watermark_alpha:i[s(644)],watermark_angle:i.angle,watermark_fontsize:i[s(364)],watermark_color:i[s(645)],watermark_font:i[s(361)],watermark_txt:i[s(435)]}}function Es(t,e,s){return new Promise(((i,r)=>{const n=oi;let o=Ss(e);if(!o[n(533)].src&&!o[n(435)].content)return i(t);let a=document[n(553)](n(428));a[n(401)]=e[n(401)],a[n(417)]=e.height;let h=a[n(499)]("2d");s&&(h[n(317)]=!0,h.imageSmoothingEnabled&&(h.imageSmoothingQuality=n(541)));let c=0,l=0;us(o[n(535)])?c=o.left:us(o[n(503)])&&(c=a[n(401)]-o[n(503)]),us(o[n(362)])?l=o[n(362)]:us(o[n(630)])&&(l=a[n(417)]-o[n(630)]);const d=new Image;d[n(504)]=t,d.onload=()=>{const t=n;if(h[t(531)](d,0,0),o[t(533)]&&o[t(533)][t(504)]){const s=new Image;s[t(504)]=o.image.src,s.setAttribute(t(649),t(591)),s.onload=()=>{const r=t;c-=o.image.width,h[r(531)](s,c,l,o.image[r(401)],o[r(533)][r(417)]),i(a[r(468)](e[r(493)],e[r(308)]))},s[t(598)]=t=>{r()}}else o[t(435)]&&o[t(435)][t(564)]&&(h[t(600)]=o[t(435)][t(364)]+t(399),h[t(492)]=o[t(435)][t(645)],h.textAlign="right",h.fillText(o[t(435)].content,c,l),i(a[t(468)](e[t(493)],e[t(308)])))},d[n(598)]=t=>{r(t)}}))}function Is(t){const e=Me;var s,i=0;if(0===t[e(641)])return i;for(s=0;s{const n=oi;if(!e[n(576)])return i(t);let o=document.createElement("canvas");o[n(401)]=e[n(401)],o[n(417)]=e[n(417)];let a=o.getContext("2d");s&&(a.imageSmoothingEnabled=!0,a[n(317)]&&(a.imageSmoothingQuality=n(541)));const h=new Image;h.src=t,h[n(547)]=()=>{const t=n;a.drawImage(h,0,0);const s=Is(e[t(576)]),r=a[t(500)](0,0,o[t(401)],o[t(417)]);(function(t,e){for(var s=t[Me(519)],i=0,r=0;r<32;r++){var n=e>>r&1,o=254&s[i]|n;s[i]=o,i+=4}})(r,s),a[t(316)](r,0,0),i(o[t(468)](e[t(493)],e[t(308)]))},h[n(598)]=t=>{r(t)}}))}function ks(t){const e=Me;var s;if(t>-1){var i=Math.floor(t/3600),r=Math[e(384)](t/60)%60,n=t%60;s=i<10?"0"+i+":":i+":",r<10&&(s+="0"),s+=r+":",(n=Math.round(n))<10&&(s+="0"),s+=n.toFixed(0)}return s}function _s(t,e){return new VideoFrame(t,e)}function Cs(t,e){let s="";if(t>-1){const i=Math[Me(384)](t/60)%60;let r=t%60;r=Math.round(r),s=i<10?"0"+i+":":i+":",r<10&&(s+="0"),s+=r,!ys(e)&&(e<10&&(e="0"+e),s+=":"+e)}return s}function Rs(t){let e="";if(t>-1){const s=Math[Me(384)](t/60/60)%60;let i=Math.floor(t/60)%60,r=t%60;i=Math.round(i),e=s<10?"0"+s+":":s+":",i<10&&(e+="0"),e+=i+":",r<10&&(e+="0"),e+=r}return e}function Ds(t,e){const s=Me,i=Math.floor(e/60)%60,r=Math.floor(e%60);return new Date(t)[s(454)](i,r,0,0)}function Ls(t,e){const s=Me,i=Math[s(384)](e/60/60)%60,r=Math[s(384)](e/60)%60,n=e%60;return new Date(t)[s(454)](i,r,n,0)}function xs(t){return(""+t)[Me(641)]}function Ps(t){const e=Me;return t&&0===Object[e(574)](t)[e(641)]}function Bs(t){return!Ps(t)}function Ms(t){return typeof t===Me(632)}const Fs=()=>{const t=Me,e=window[t(436)][t(339)];return/MicroMessenger/i.test(e)},Os=()=>{const t=Me,e=window[t(436)][t(339)];return/Chrome/i.test(e)},Us=()=>Fs()&&Ze();function Ns(t){const e=Me,s=t||window[e(516)];return s[e(389)]||s[e(403)]}function js(){return $e()&&function(){const t=Me,e=navigator[t(339)][t(357)]();return/macintosh|mac os x/i[t(396)](e)}()}function Vs(t){return t&&typeof t===Me(579)}function zs(t){return t/2%4==0}function Gs(t){const e=Me;if(Je()){let s=0,i=0;if(1===t[e(518)][e(641)]){let r=t.touches[0];s=r[e(311)],i=r[e(327)]}return{posX:s,posY:i}}let s=0,i=0;const r=t||window[e(516)];return r[e(639)]||r[e(449)]?(s=r[e(639)],i=r.pageY):(r[e(311)]||r[e(327)])&&(s=t[e(311)]+document[e(319)][e(520)]+document[e(366)][e(520)],i=t[e(327)]+document[e(319)][e(367)]+document[e(366)][e(367)]),{posX:s,posY:i}}function Ws(){const t=Me;let e=document.createElement(t(590)),s=e.canPlayType("application/vnd.apple.mpegurl");return e=null,s}function Hs(t){const e=Me;let s=ci(t[e(313)])&&(t.useMSE||t.useWCS&&!t[e(517)])&&ci(t[e(558)]);return!!(ci(s)&&t[e(441)]&&t[e(556)]&&ci(t[e(558)]))||(!!(ci(s)&&t[e(448)]&&t[e(335)])||s)}function Ks(t){const e=Me;let s=null,i=31&t[0];return(i===Y[e(559)]||i===Y[e(490)])&&(s=W[e(643)]),!s&&(i=(126&t[0])>>1,(i===q.vps||i===q[e(559)]||i===q.pps)&&(s=W.h265)),s}function Qs(t){const e=Me;const s=function(t){const e=oi;return t[e(472)]()[e(461)](/^function\s*\w*\s*\([\w\s,]*\)\s*{([\w\W]*?)}$/)[1]}(t[e(323)]()),i=new Blob([s],{type:e(629)});return URL[e(427)](i)}function Ys(t){return Qs(t)}function qs(t){t.close()}function Js(t){t.close()}function Xs(){const t=Me;return window.location[t(607)]===t(414)||window[t(496)][t(349)]===t(420)}function Zs(t){const e=Me,s=Object[e(385)][e(323)];return function(t){const i=e;switch(s[i(470)](t)){case i(625):case"[object Exception]":case i(439):return!0;default:try{return t instanceof Error}catch(t){return!1}}}(t)?t[e(534)]:null==t?"":typeof t===e(552)?JSON[e(342)](t,null,2):String(t)}function $s(t,e){const s=Me;e&&(t=t[s(372)]((t=>t[s(383)]&&t[s(383)]===e)));let i=t[0],r=null,n=1;if(t[s(641)]>0){let e=t[1];e&&e.ts-i.ts>1e5&&(i=e,n=2)}if(i)for(let o=n;o=1e3){t[o-1].ts-i.ts<1e3&&(r=o+1)}}}return r}function ti(t){const e=Me;for(var s=(t+"=".repeat((4-t[e(641)]%4)%4))[e(416)](/\-/g,"+")[e(416)](/_/g,"/"),i=window[e(457)](s),r=new Uint8Array(i.length),n=0;n>4===mt[e(595)]&&t[1]===ft}function hi(t){return!0===t||t===Me(391)}function ci(t){return!0!==t&&t!==Me(391)}function li(t){const e=Me;return t[e(416)](/-([a-z])/g,(function(t,s){return s[e(409)]()}))}function di(){return/iphone/i.test(navigator.userAgent)}function ui(){const t=Me;return window[t(560)]&&window[t(560)].memory?window[t(560)][t(635)]:null}function pi(){const t=Me;try{var e=document[t(553)](t(428));return!(!window[t(542)]||!e[t(499)](t(392)))}catch(t){return!1}}function fi(){const t=Me;let e=!1;return t(608)in HTMLVideoElement[t(385)]&&(e=!0),e}function mi(){const t=Me;let e=!1;return t(440)in Nt&&"function"==typeof Nt[t(440)]&&(e=!0),e}function gi(t,e){const s=Me,i=Le(t[s(434)](5));let r=!1;return i[s(611)]((t=>{const i=s,n=e?t[0]>>>1&63:31&t[0];(e&&(n===q[i(432)]||n===q[i(398)]||n===q.kSliceBLA_N_LP||n===q[i(539)]||n===q[i(577)]||i(642),i(314),n===q.kSliceRSV_IRAP_VCL23)||ci(e)&&n===Y[i(539)])&&(r=!0)})),r}function Ai(){const t=Me;let e={down:"mousedown",move:"mousemove",up:t(460),click:t(633)};return Je()&&(e={down:t(515),move:"touchmove",up:"touchend",click:t(633)}),e}function yi(){const t=["resume","keys","borderColor","copyright","nLp","isEnabled","function","readyState","application/asx","msGetUserMedia","safari","innerHTML","9999999","fromCharCode","log","max","min","video","Anonymous",'"development"',"appendChild","fullscreenElement","keyFrame","webgl","setUint16","onerror","destination","font","1101Unjzfq","createTextNode","setInt32","absolute","parse","application/vnd.chromium.remoting-viewer","protocol","requestVideoFrameCallback","isTypeSupported","createImageBitmap","forEach","hev2","numberOfFrames","clearRect","user-select","charAt","hour","7pEMcrU","VideoDecoder","initEvent","MediaStream","WAVE","3608TQqsWY","not compiled with thread support, using thread emulation","[object Error]","getAttribute","green yuv","Safari","application/javascript","bottom","error","string","click",'video/mp4; codecs="',"memory","removeChild","substr","PB/s","pageX","px Arial","length","craNut","h264","opacity","color","none","avc1.","setUint8","crossOrigin","EB/s","quality","hev","backgroundColor","clientX","getDate","hasAudio","kSliceRSV_IRAP_VCL22","charCodeAt","putImageData","imageSmoothingEnabled","hash","documentElement","mimeTypes","Chrome","createBuffer","toString","firefox","NaN","MediaStreamTrackGenerator","clientY","setInt16","join","status","rgba(0,0,0,0)","RIFF","QQBrowser",'"production"',"wcsDecodeAudio","illegal icc","canConstructInDedicatedWorker","validate","userAgent","688JmjJRy","port","stringify","playbackRate","win32","0 KB/s","100%","data-","noteOn","hostname","AudioDecoder","div","f32-planar","hev3","URL","ActiveXObject","getMonth","toLowerCase","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","isConfigSupported","Opera","fontFamily","top","sampleRate","fontSize","VideoEncoder.isConfigSupported() result is not supported","body","scrollTop","buffer","YB/s","ZB/s","transferControlToOffscreen","filter","line","dispatchEvent","pointer-events: none !important; display: block !important","WebGLRenderingContext","createBufferSource","chrome","MediaSource","3852304dolBsG","getDay","setUint32","type","floor","prototype","insertBefore","audioWorklet","hidden","target","-moz-user-select","true","webgl2","borderStyle","application/hwepass2001.installepass2001","hev5","test","VideoEncoder.isConfigSupported is not a function","kSliceBLA_W_RADL","px 宋体","split","width","9MvUfiQ","srcElement","restore","removeAttribute","start","assign","version","toUpperCase","save","push","document","container","https:","element","replace","height","24144HHSNRn","indexOf","localhost","endsWith","lineWidth","pow","ALAW","getMinutes","Edge","createObjectURL","canvas","strokeRect","contain","ended","kSliceBLA_W_LP","href","slice","text","navigator","webkitGetUserMedia","style","[object DOMException]","PressureObserver","useMSE",";base64","-webkit-touch-callout","1738339200000",'"1-2-2025"',"QihooBrowser","attachShadow","useWCS","pageY","Module","rect","revokeObjectURL","QHBrowser","setHours","-o-user-select","-webkit-text-size-adjust","atob","6343630gosndB","getUserMedia","mouseup","match","{y}-{m}-{d} {h}:{i}:{s}","Instance","hev4","webkit-3d","subarray","getHours","toDataURL","GB/s","call","showModalDialog","trim","MouseEvents","instantiate","not compiled with thread support","setAttribute","msFullscreenElement","867618rQylXb","gpu","img","download","win64","file","pathname","Worker","search","360SE","result","VideoFrame","pps","undefined","fillStyle","format","failed to asynchronously prepare wasm","moz-webgl","location","#000","fillText","getContext","getImageData",'"2.1.3"',"random","right","src","repeat","-webkit-user-select","KB/s","5046CMkVfa","substring","webm","connect","solid","toFixed","data:","touchstart","event","useOffscreen","touches","data","scrollLeft","dataset","paused","VideoEncoder is not supported","Bytes","mediaDevices","apply","AAC","[object Number]","40CgmioJ","experimental-webgl","drawImage","ManagedMediaSource","image","message","left","-webkit-tap-highlight-color","green","getElementById","iFrame","xxxxxxxxxxxx4xxx","high","WebGL2RenderingContext","position","second","host","then","onload","application/360softmgrplugin","Reserved SBR extensions is not implemented","shadowRoot","numberOfChannels","object","createElement","now","visibility","mseDecodeAudio","byteLength","demuxUseWorker","sps","performance","If you want to help, upload a sample of this file to","borderWidth","origin","content","set","getFullYear","isFullscreen",'"2025-2-1"',"AudioData","getTime","setInt8","1021260IHMSyE"];return(yi=function(){return t})()}function bi(t){const e=Me;return t&&!t[e(522)]&&!t[e(431)]&&0!==t[e(343)]&&0!==t[e(580)]}function vi(){return hi(false)}function Si(){return ci(false)}function wi(){return je()>=Number(qe)}const Ei=Ii;function Ii(t,e){const s=Ti();return(Ii=function(t,e){return s[t-=376]})(t,e)}function Ti(){const t=["422340kvqdHX","destroys","destroy","1043CLjLNB","push","1213080hAQhwM","isArray","master","map","length","proxy","110npSZNK","1899818gOFzTv","forEach","addEventListener","debugLog","20fRsoXl","890508bGrLPw","24342EsrhMb","1764860oRjiaJ","2170593BEIcUQ","removeEventListener","Events"];return(Ti=function(){return t})()}!function(t,e){const s=Ii,i=t();for(;;)try{if(511786===-parseInt(s(394))/1+-parseInt(s(389))/2+parseInt(s(377))/3*(-parseInt(s(393))/4)+-parseInt(s(396))/5+-parseInt(s(395))/6*(-parseInt(s(380))/7)+parseInt(s(382))/8+parseInt(s(397))/9*(parseInt(s(388))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Ti);class ki{constructor(t){const e=Ii;this[e(378)]=[],this[e(387)]=this[e(387)].bind(this),this[e(384)]=t}proxy(t,e,s){const i=Ii;let r=arguments[i(386)]>3&&void 0!==arguments[3]?arguments[3]:{};if(!t)return;if(Array[i(383)](e))return e[i(385)]((e=>this[i(387)](t,e,s,r)));t[i(391)](e,s,r);const n=()=>{Vs(t[i(398)])&&t.removeEventListener(e,s,r)};return this.destroys[i(381)](n),n}[Ei(379)](){const t=Ei;this[t(384)][t(392)](t(376),t(379)),this[t(378)][t(390)]((t=>t())),this[t(378)]=[]}}function _i(t,e){const s=Ci();return(_i=function(t,e){return s[t-=197]})(t,e)}function Ci(){const t=["getBoundingClientRect","2696370VMPDrG","left","right","$container","9609304HgLBEK","bottom","6QxPDlQ","height","max","rect","defineProperty","clientWidth","width","3002741oYbvxe","1432344somIHX","1861852bvaZVv","top","forEach","886289brAmNP","306924vTqkAI"];return(Ci=function(){return t})()}!function(t,e){const s=_i,i=t();for(;;)try{if(476729===-parseInt(s(199))/1+parseInt(s(216))/2+parseInt(s(208))/3*(parseInt(s(217))/4)+parseInt(s(202))/5+-parseInt(s(200))/6+parseInt(s(215))/7+-parseInt(s(206))/8)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Ci);function Ri(){const t=["resize","videoInfo","3504681FrumZf","emitError","request","useMSE","currentPts","fullscreen request success","fullscreen request error","16Veuugy","_opt","8487966ugDDzw","destroys","change","81274JEKtGu","fullscreen exit success","4018779DxIdwW","audioInfo","player events","5eFRUQu","videoSEISyncPts","decoderWorkerInit","2011750ytpmFA","catch","debugError","classList","debug","debugLog","length","flvMetaData","events","playbackStats","toString","player","43521621AStxKG","timeUpdate","stringify","off","webFullscreen","includes","forEach","23Ndxrap","add","performance","remove","useWebFullScreen","play","loading","fullscreen","debugWarn","fullscreen exit error","stats","$container","647944SDcWns","playToRenderTimes","jb-pro-fullscreen-web","then","fullscreenError","keys","emit","7dbBAad"];return(Ri=function(){return t})()}function Di(t,e){const s=Ri();return(Di=function(t,e){return s[t-=191]})(t,e)}!function(t,e){const s=Di,i=t();for(;;)try{if(994929===parseInt(s(196))/1*(parseInt(s(230))/2)+-parseInt(s(232))/3+parseInt(s(208))/4*(-parseInt(s(235))/5)+parseInt(s(227))/6*(-parseInt(s(215))/7)+parseInt(s(225))/8*(-parseInt(s(218))/9)+-parseInt(s(238))/10+parseInt(s(250))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Ri);function Li(t,e){const s=xi();return(Li=function(t,e){return s[t-=260]})(t,e)}function xi(){const t=["forEach","2420480EHYJUE","push","length","7743324GLvosx","15412oyRUjm","30qJBfyl","835751eyOnGG","1176918NwMGym","off","emit","459BvuWDt","2685552mGAysK","slice","keys","16Dlajqc","ctx","9346887XHgKQN","apply"];return(xi=function(){return t})()}const Pi=Li;!function(t,e){const s=Li,i=t();for(;;)try{if(827992===parseInt(s(276))/1+parseInt(s(261))/2+-parseInt(s(260))/3*(parseInt(s(273))/4)+parseInt(s(269))/5+parseInt(s(272))/6+-parseInt(s(275))/7*(-parseInt(s(264))/8)+-parseInt(s(266))/9*(parseInt(s(274))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(xi);class Bi{on(t,e,s){const i=Li,r=this.e||(this.e={});return(r[t]||(r[t]=[]))[i(270)]({fn:e,ctx:s}),this}once(t,e,s){const i=this;function r(){const n=Li;i[n(277)](t,r);for(var o=arguments[n(271)],a=new Array(o),h=0;h1?i-1:0),n=1;n{delete i[t]})),void delete this.e;const r=i[t],n=[];if(r&&e)for(let t=0,i=r[s(271)];t0?(s[0]=2*(a*o+l*i+h*n-c*r)/d,s[1]=2*(h*o+l*r+c*i-a*n)/d,s[2]=2*(c*o+l*n+a*r-h*i)/d):(s[0]=2*(a*o+l*i+h*n-c*r),s[1]=2*(h*o+l*r+c*i-a*n),s[2]=2*(c*o+l*n+a*r-h*i)),Ki(t,e,s),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},getScaling:Qi,getRotation:function(t,e){var s=Zi,i=new Ni(3);Qi(i,e);var r=1/i[0],n=1/i[1],o=1/i[2],a=e[0]*r,h=e[1]*n,c=e[2]*o,l=e[4]*r,d=e[5]*n,u=e[6]*o,p=e[8]*r,f=e[9]*n,m=e[10]*o,g=a+d+m,A=0;return g>0?(A=2*Math[s(434)](g+1),t[3]=.25*A,t[0]=(u-f)/A,t[1]=(p-c)/A,t[2]=(h-l)/A):a>d&&a>m?(A=2*Math.sqrt(1+a-d-m),t[3]=(u-f)/A,t[0]=.25*A,t[1]=(h+l)/A,t[2]=(p+c)/A):d>m?(A=2*Math[s(434)](1+d-a-m),t[3]=(p-c)/A,t[0]=(h+l)/A,t[1]=.25*A,t[2]=(u+f)/A):(A=2*Math[s(434)](1+m-a-d),t[3]=(h-l)/A,t[0]=(p+c)/A,t[1]=(u+f)/A,t[2]=.25*A),t},fromRotationTranslationScale:function(t,e,s,i){var r=e[0],n=e[1],o=e[2],a=e[3],h=r+r,c=n+n,l=o+o,d=r*h,u=r*c,p=r*l,f=n*c,m=n*l,g=o*l,A=a*h,y=a*c,b=a*l,v=i[0],S=i[1],w=i[2];return t[0]=(1-(f+g))*v,t[1]=(u+b)*v,t[2]=(p-y)*v,t[3]=0,t[4]=(u-b)*S,t[5]=(1-(d+g))*S,t[6]=(m+A)*S,t[7]=0,t[8]=(p+y)*w,t[9]=(m-A)*w,t[10]=(1-(d+f))*w,t[11]=0,t[12]=s[0],t[13]=s[1],t[14]=s[2],t[15]=1,t},fromRotationTranslationScaleOrigin:function(t,e,s,i,r){var n=e[0],o=e[1],a=e[2],h=e[3],c=n+n,l=o+o,d=a+a,u=n*c,p=n*l,f=n*d,m=o*l,g=o*d,A=a*d,y=h*c,b=h*l,v=h*d,S=i[0],w=i[1],E=i[2],I=r[0],T=r[1],k=r[2],_=(1-(m+A))*S,C=(p+v)*S,R=(f-b)*S,D=(p-v)*w,L=(1-(u+A))*w,x=(g+y)*w,P=(f+b)*E,B=(g-y)*E,M=(1-(u+m))*E;return t[0]=_,t[1]=C,t[2]=R,t[3]=0,t[4]=D,t[5]=L,t[6]=x,t[7]=0,t[8]=P,t[9]=B,t[10]=M,t[11]=0,t[12]=s[0]+I-(_*I+D*T+P*k),t[13]=s[1]+T-(C*I+L*T+B*k),t[14]=s[2]+k-(R*I+x*T+M*k),t[15]=1,t},fromQuat:function(t,e){var s=e[0],i=e[1],r=e[2],n=e[3],o=s+s,a=i+i,h=r+r,c=s*o,l=i*o,d=i*a,u=r*o,p=r*a,f=r*h,m=n*o,g=n*a,A=n*h;return t[0]=1-d-f,t[1]=l+A,t[2]=u-g,t[3]=0,t[4]=l-A,t[5]=1-c-f,t[6]=p+m,t[7]=0,t[8]=u+g,t[9]=p-m,t[10]=1-c-d,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,s,i,r,n,o){var a=1/(s-e),h=1/(r-i),c=1/(n-o);return t[0]=2*n*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*n*h,t[6]=0,t[7]=0,t[8]=(s+e)*a,t[9]=(r+i)*h,t[10]=(o+n)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*n*2*c,t[15]=0,t},perspectiveNO:Yi,perspective:qi,perspectiveZO:function(t,e,s,i,r){var n,o=1/Math.tan(e/2);return t[0]=o/s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=r&&r!==1/0?(n=1/(i-r),t[10]=r*n,t[14]=r*i*n):(t[10]=-1,t[14]=-i),t},perspectiveFromFieldOfView:function(t,e,s,i){var r=Zi,n=Math[r(435)](e[r(438)]*Math.PI/180),o=Math[r(435)](e[r(443)]*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),h=Math[r(435)](e[r(447)]*Math.PI/180),c=2/(a+h),l=2/(n+o);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(a-h)*c*.5,t[9]=(n-o)*l*.5,t[10]=i/(s-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*s/(s-i),t[15]=0,t},orthoNO:Ji,ortho:Xi,orthoZO:function(t,e,s,i,r,n,o){var a=1/(e-s),h=1/(i-r),c=1/(n-o);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*h,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=c,t[11]=0,t[12]=(e+s)*a,t[13]=(r+i)*h,t[14]=n*c,t[15]=1,t},lookAt:function(t,e,s,i){var r,n,o,a,h,c,l,d,u,p,f=Zi,m=e[0],g=e[1],A=e[2],y=i[0],b=i[1],v=i[2],S=s[0],w=s[1],E=s[2];return Math[f(450)](m-S)0&&(d*=f=1/Math[r(434)](f),u*=f,p*=f);var m=c*p-l*u,g=l*d-h*p,A=h*u-c*d;return(f=m*m+g*g+A*A)>0&&(m*=f=1/Math[r(434)](f),g*=f,A*=f),t[0]=m,t[1]=g,t[2]=A,t[3]=0,t[4]=u*A-p*g,t[5]=p*m-d*A,t[6]=d*g-u*m,t[7]=0,t[8]=d,t[9]=u,t[10]=p,t[11]=0,t[12]=n,t[13]=o,t[14]=a,t[15]=1,t},str:function(t){return Zi(446)+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t[2]=e[2]+s[2],t[3]=e[3]+s[3],t[4]=e[4]+s[4],t[5]=e[5]+s[5],t[6]=e[6]+s[6],t[7]=e[7]+s[7],t[8]=e[8]+s[8],t[9]=e[9]+s[9],t[10]=e[10]+s[10],t[11]=e[11]+s[11],t[12]=e[12]+s[12],t[13]=e[13]+s[13],t[14]=e[14]+s[14],t[15]=e[15]+s[15],t},subtract:tr,multiplyScalar:function(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t[2]=e[2]*s,t[3]=e[3]*s,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12]*s,t[13]=e[13]*s,t[14]=e[14]*s,t[15]=e[15]*s,t},multiplyScalarAndAdd:function(t,e,s,i){return t[0]=e[0]+s[0]*i,t[1]=e[1]+s[1]*i,t[2]=e[2]+s[2]*i,t[3]=e[3]+s[3]*i,t[4]=e[4]+s[4]*i,t[5]=e[5]+s[5]*i,t[6]=e[6]+s[6]*i,t[7]=e[7]+s[7]*i,t[8]=e[8]+s[8]*i,t[9]=e[9]+s[9]*i,t[10]=e[10]+s[10]*i,t[11]=e[11]+s[11]*i,t[12]=e[12]+s[12]*i,t[13]=e[13]+s[13]*i,t[14]=e[14]+s[14]*i,t[15]=e[15]+s[15]*i,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var s=Zi,i=t[0],r=t[1],n=t[2],o=t[3],a=t[4],h=t[5],c=t[6],l=t[7],d=t[8],u=t[9],p=t[10],f=t[11],m=t[12],g=t[13],A=t[14],y=t[15],b=e[0],v=e[1],S=e[2],w=e[3],E=e[4],I=e[5],T=e[6],k=e[7],_=e[8],C=e[9],R=e[10],D=e[11],L=e[12],x=e[13],P=e[14],B=e[15];return Math.abs(i-b)<=zi[s(448)]*Math.max(1,Math[s(450)](i),Math.abs(b))&&Math[s(450)](r-v)<=zi[s(448)]*Math[s(431)](1,Math[s(450)](r),Math[s(450)](v))&&Math[s(450)](n-S)<=zi[s(448)]*Math[s(431)](1,Math[s(450)](n),Math[s(450)](S))&&Math[s(450)](o-w)<=zi[s(448)]*Math[s(431)](1,Math[s(450)](o),Math[s(450)](w))&&Math.abs(a-E)<=zi[s(448)]*Math[s(431)](1,Math.abs(a),Math[s(450)](E))&&Math[s(450)](h-I)<=zi[s(448)]*Math[s(431)](1,Math[s(450)](h),Math.abs(I))&&Math[s(450)](c-T)<=zi[s(448)]*Math.max(1,Math[s(450)](c),Math[s(450)](T))&&Math[s(450)](l-k)<=zi[s(448)]*Math.max(1,Math[s(450)](l),Math[s(450)](k))&&Math[s(450)](d-_)<=zi[s(448)]*Math[s(431)](1,Math[s(450)](d),Math.abs(_))&&Math[s(450)](u-C)<=Oi*Math[s(431)](1,Math[s(450)](u),Math[s(450)](C))&&Math[s(450)](p-R)<=zi[s(448)]*Math.max(1,Math[s(450)](p),Math[s(450)](R))&&Math[s(450)](f-D)<=zi[s(448)]*Math[s(431)](1,Math[s(450)](f),Math[s(450)](D))&&Math.abs(m-L)<=zi[s(448)]*Math.max(1,Math[s(450)](m),Math[s(450)](L))&&Math[s(450)](g-x)<=zi[s(448)]*Math.max(1,Math[s(450)](g),Math[s(450)](x))&&Math[s(450)](A-P)<=zi[s(448)]*Math[s(431)](1,Math[s(450)](A),Math.abs(P))&&Math[s(450)](y-B)<=zi[s(448)]*Math.max(1,Math.abs(y),Math[s(450)](B))},mul:er,sub:sr});function rr(){var t=new(zi[dr(339)])(3);return Ni!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function nr(t){var e=t[0],s=t[1],i=t[2];return Math.hypot(e,s,i)}function or(t,e,s){var i=new(zi[dr(339)])(3);return i[0]=t,i[1]=e,i[2]=s,i}function ar(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t[2]=e[2]-s[2],t}function hr(t,e,s){return t[0]=e[0]*s[0],t[1]=e[1]*s[1],t[2]=e[2]*s[2],t}function cr(t,e,s){return t[0]=e[0]/s[0],t[1]=e[1]/s[1],t[2]=e[2]/s[2],t}function lr(){var t=["sqrt","floor","sin","RANDOM","11715040gHHOAq","cos","8832348AFULCk","round","EPSILON","217962pEVAQC","vec3(","52gzdTZj","hypot","4203344SOErIq","2226320JgDsWQ","445504VsCITT","min","acos","length","56dljmmE","abs","ceil","2tsTfqn","max","168495mTSaDk","ARRAY_TYPE"];return(lr=function(){return t})()}function dr(t,e){var s=lr();return(dr=function(t,e){return s[t-=318]})(t,e)}function ur(t,e){var s=dr,i=e[0]-t[0],r=e[1]-t[1],n=e[2]-t[2];return Math[s(326)](i,r,n)}function pr(t,e){var s=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return s*s+i*i+r*r}function fr(t){var e=t[0],s=t[1],i=t[2];return e*e+s*s+i*i}function mr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}!function(t,e){for(var s=dr,i=t();;)try{if(766765===parseInt(s(336))/1*(-parseInt(s(329))/2)+-parseInt(s(338))/3*(parseInt(s(325))/4)+-parseInt(s(328))/5+-parseInt(s(323))/6*(parseInt(s(333))/7)+parseInt(s(327))/8+parseInt(s(320))/9+parseInt(s(318))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(lr);var gr,Ar,yr,br=ar,vr=hr,Sr=cr,wr=ur,Er=pr,Ir=nr,Tr=fr,kr=(gr=rr(),function(t,e,s,i,r,n){var o,a,h=dr;for(!e&&(e=3),!s&&(s=0),a=i?Math[h(330)](i*e+s,t[h(332)]):t[h(332)],o=s;o0&&(o=1/Math[s(340)](o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t},dot:mr,cross:function(t,e,s){var i=e[0],r=e[1],n=e[2],o=s[0],a=s[1],h=s[2];return t[0]=r*h-n*a,t[1]=n*o-i*h,t[2]=i*a-r*o,t},lerp:function(t,e,s,i){var r=e[0],n=e[1],o=e[2];return t[0]=r+i*(s[0]-r),t[1]=n+i*(s[1]-n),t[2]=o+i*(s[2]-o),t},hermite:function(t,e,s,i,r,n){var o=n*n,a=o*(2*n-3)+1,h=o*(n-2)+n,c=o*(n-1),l=o*(3-2*n);return t[0]=e[0]*a+s[0]*h+i[0]*c+r[0]*l,t[1]=e[1]*a+s[1]*h+i[1]*c+r[1]*l,t[2]=e[2]*a+s[2]*h+i[2]*c+r[2]*l,t},bezier:function(t,e,s,i,r,n){var o=1-n,a=o*o,h=n*n,c=a*o,l=3*n*a,d=3*h*o,u=h*n;return t[0]=e[0]*c+s[0]*l+i[0]*d+r[0]*u,t[1]=e[1]*c+s[1]*l+i[1]*d+r[1]*u,t[2]=e[2]*c+s[2]*l+i[2]*d+r[2]*u,t},random:function(t,e){var s=dr;e=e||1;var i=2*ji()*Math.PI,r=2*zi[s(343)]()-1,n=Math[s(340)](1-r*r)*e;return t[0]=Math[s(319)](i)*n,t[1]=Math[s(342)](i)*n,t[2]=r*e,t},transformMat4:function(t,e,s){var i=e[0],r=e[1],n=e[2],o=s[3]*i+s[7]*r+s[11]*n+s[15];return o=o||1,t[0]=(s[0]*i+s[4]*r+s[8]*n+s[12])/o,t[1]=(s[1]*i+s[5]*r+s[9]*n+s[13])/o,t[2]=(s[2]*i+s[6]*r+s[10]*n+s[14])/o,t},transformMat3:function(t,e,s){var i=e[0],r=e[1],n=e[2];return t[0]=i*s[0]+r*s[3]+n*s[6],t[1]=i*s[1]+r*s[4]+n*s[7],t[2]=i*s[2]+r*s[5]+n*s[8],t},transformQuat:function(t,e,s){var i=s[0],r=s[1],n=s[2],o=s[3],a=e[0],h=e[1],c=e[2],l=r*c-n*h,d=n*a-i*c,u=i*h-r*a,p=r*u-n*d,f=n*l-i*u,m=i*d-r*l,g=2*o;return l*=g,d*=g,u*=g,p*=2,f*=2,m*=2,t[0]=a+l+p,t[1]=h+d+f,t[2]=c+u+m,t},rotateX:function(t,e,s,i){var r=dr,n=[],o=[];return n[0]=e[0]-s[0],n[1]=e[1]-s[1],n[2]=e[2]-s[2],o[0]=n[0],o[1]=n[1]*Math.cos(i)-n[2]*Math[r(342)](i),o[2]=n[1]*Math[r(342)](i)+n[2]*Math.cos(i),t[0]=o[0]+s[0],t[1]=o[1]+s[1],t[2]=o[2]+s[2],t},rotateY:function(t,e,s,i){var r=dr,n=[],o=[];return n[0]=e[0]-s[0],n[1]=e[1]-s[1],n[2]=e[2]-s[2],o[0]=n[2]*Math[r(342)](i)+n[0]*Math[r(319)](i),o[1]=n[1],o[2]=n[2]*Math.cos(i)-n[0]*Math[r(342)](i),t[0]=o[0]+s[0],t[1]=o[1]+s[1],t[2]=o[2]+s[2],t},rotateZ:function(t,e,s,i){var r=dr,n=[],o=[];return n[0]=e[0]-s[0],n[1]=e[1]-s[1],n[2]=e[2]-s[2],o[0]=n[0]*Math[r(319)](i)-n[1]*Math.sin(i),o[1]=n[0]*Math[r(342)](i)+n[1]*Math.cos(i),o[2]=n[2],t[0]=o[0]+s[0],t[1]=o[1]+s[1],t[2]=o[2]+s[2],t},angle:function(t,e){var s=dr,i=t[0],r=t[1],n=t[2],o=e[0],a=e[1],h=e[2],c=Math[s(340)](i*i+r*r+n*n)*Math[s(340)](o*o+a*a+h*h),l=c&&mr(t,e)/c;return Math[s(331)](Math[s(330)](Math[s(337)](l,-1),1))},zero:function(t){return t[0]=0,t[1]=0,t[2]=0,t},str:function(t){return dr(324)+t[0]+", "+t[1]+", "+t[2]+")"},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},equals:function(t,e){var s=dr,i=t[0],r=t[1],n=t[2],o=e[0],a=e[1],h=e[2];return Math[s(334)](i-o)<=zi[s(322)]*Math.max(1,Math[s(334)](i),Math.abs(o))&&Math.abs(r-a)<=Oi*Math[s(337)](1,Math[s(334)](r),Math[s(334)](a))&&Math[s(334)](n-h)<=Oi*Math[s(337)](1,Math[s(334)](n),Math[s(334)](h))},sub:br,mul:vr,div:Sr,dist:wr,sqrDist:Er,len:Ir,sqrLen:Tr,forEach:kr});function Cr(t,e){var s=Rr();return(Cr=function(t,e){return s[t-=321]})(t,e)}function Rr(){var t=["round","1041174VDgzDo","16cQTDzy","114NwDiDW","16529612yzdlPI","21348pxAUZp","60dAlndv","1874126xddOMM","5976935BLgxSk","hypot","vec4(","max","RANDOM","ceil","min","floor","181517Rforsk","10xOgpFW","717894QzFxSk","sqrt","abs","length","ARRAY_TYPE","EPSILON"];return(Rr=function(){return t})()}function Dr(){var t=["624305PdfXDU","17790120yNYLzT","178GEiMsZ","36xxmsIx","6875225IXopyb","4574580AJdvjT","35248TrkGec","56565pfCEIQ","2274280vcfRbi","9FCbays"];return(Dr=function(){return t})()}function Lr(t,e){var s=Dr();return(Lr=function(t,e){return s[t-=179]})(t,e)}function xr(t,e){const s=Pr();return(xr=function(t,e){return s[t-=161]})(t,e)}function Pr(){const t=["UNSIGNED_SHORT","ARRAY_BUFFER","DEPTH_BUFFER_BIT","338052AIQBiu","bindBuffer","vertexPosition","texPosition","deleteBuffer","COLOR_BUFFER_BIT","TEXTURE1","TRIANGLES","deleteTexture","linkProgram","pixelStorei","LUMINANCE","uProjectionMatrix","UNSIGNED_BYTE","activeTexture","texSubImage2D","attachShader","width","_createTexture","rgbatexture","bufferData","4mhdfWj","_vtexture","createShader","getUniformLocation","getProgramInfoLog","createProgram","_programInfo","RGBA","_loadShader","CLAMP_TO_EDGE","SRC_ALPHA","BLEND","VERTEX_SHADER","13210840FzTSeG","TEXTURE2","getAttribLocation","_initShaderProgram","_initBuffers","ELEMENT_ARRAY_BUFFER","TEXTURE_2D","TEXTURE0","shaderSource","_drawScene","drawDom","1984551sTESXq","slice","992054YQWvTW","aTexturePosition","COMPILE_STATUS","attribLocations","uniformLocations","clearColor","createTexture","render","indices","texImage2D","positions","compileShader","_rgbatexture","utexture","height","226246lRToxm","ONE_MINUS_SRC_ALPHA","uViewMatrix","3741111vwuILi","8kQeQzf","log","UNPACK_ALIGNMENT","yTexture","texParameteri","FLOAT","TEXTURE_WRAP_S","_clear","concat","viewport","blendFunc","312826vaFAYS","deleteShader","isyuv","isDomInited","getShaderInfoLog","bindTexture","_buffers","Unable to initialize the shader program: ","10LoIbHE","LINEAR","TEXTURE_MAG_FILTER","uModelMatrix","isInited","deleteProgram","vertexAttribPointer","TEXTURE_WRAP_T","FRAGMENT_SHADER","program","uniform1i","_utexture","texturePosition","vTexture","TEXTURE_MIN_FILTER","_ytexture","renderYUV","rgbaTexture","position","An error occurred compiling the shaders: ","destroy","createBuffer"];return(Pr=function(){return t})()}!function(t,e){for(var s=Cr,i=t();;)try{if(637833===parseInt(s(330))/1+-parseInt(s(336))/2+-parseInt(s(334))/3*(parseInt(s(335))/4)+-parseInt(s(337))/5+parseInt(s(332))/6*(parseInt(s(321))/7)+parseInt(s(331))/8*(-parseInt(s(323))/9)+-parseInt(s(322))/10*(-parseInt(s(333))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Rr),yr=new(zi[(Ar=Cr)(327)])(4),zi[Ar(327)]!=Float32Array&&(yr[0]=0,yr[1]=0,yr[2]=0,yr[3]=0),function(t,e){for(var s=Lr,i=t();;)try{if(908286===parseInt(s(187))/1+parseInt(s(183))/2*(parseInt(s(188))/3)+parseInt(s(184))/4*(-parseInt(s(181))/5)+-parseInt(s(186))/6+-parseInt(s(185))/7+parseInt(s(179))/8+-parseInt(s(180))/9*(-parseInt(s(182))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Dr);const Br=xr;!function(t,e){const s=xr,i=t();for(;;)try{if(393177===parseInt(s(215))/1+parseInt(s(230))/2+-parseInt(s(198))/3*(-parseInt(s(174))/4)+parseInt(s(238))/5*(parseInt(s(263))/6)+parseInt(s(200))/7*(parseInt(s(219))/8)+parseInt(s(218))/9+-parseInt(s(187))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Pr);class Mr{constructor(t,e){const s=xr;this.gl=t,this[s(242)]=!1,this.isDomInited=!1,e&&this.gl[s(163)](this.gl[s(221)],1);const i=this._initShaderProgram();this[s(180)]={program:i,attribLocations:{vertexPosition:t.getAttribLocation(i,"aVertexPosition"),texturePosition:t[s(189)](i,s(201))},uniformLocations:{projectionMatrix:t[s(177)](i,s(165)),modelMatrix:t[s(177)](i,s(241)),viewMatrix:t[s(177)](i,s(217)),rgbatexture:t.getUniformLocation(i,s(255)),ytexture:t[s(177)](i,s(222)),utexture:t[s(177)](i,"uTexture"),vtexture:t[s(177)](i,s(251)),isyuv:t[s(177)](i,s(232))}},this[s(236)]=this[s(191)](),this[s(212)]=this._createTexture(),this[s(253)]=this[s(171)](),this[s(249)]=this[s(171)](),this[s(175)]=this[s(171)]()}[Br(258)](){const t=Br;this.gl[t(243)](this[t(180)].program),this.gl.deleteBuffer(this[t(236)][t(256)]),this.gl[t(267)](this[t(236)][t(266)]),this.gl[t(267)](this._buffers[t(208)]),this.gl.deleteTexture(this[t(212)]),this.gl[t(161)](this._ytexture),this.gl[t(161)](this._utexture),this.gl.deleteTexture(this[t(175)]),this[t(180)]=null,this._buffers=null,this._rgbatexture=null,this[t(253)]=null,this[t(249)]=null,this[t(175)]=null,this.gl=null,this[t(242)]=!1,this[t(233)]=!1}[Br(190)](){const t=Br,e=this[t(182)](this.gl[t(186)],"\n attribute vec4 aVertexPosition;\n attribute vec2 aTexturePosition;\n varying lowp vec2 vTexturePosition;\n void main(void) {\n gl_Position = aVertexPosition;\n vTexturePosition = aTexturePosition;\n }\n "),s=this._loadShader(this.gl[t(246)],"\n precision highp float;\n varying highp vec2 vTexturePosition;\n uniform int isyuv;\n uniform sampler2D rgbaTexture;\n uniform sampler2D yTexture;\n uniform sampler2D uTexture;\n uniform sampler2D vTexture;\n\n const mat4 YUV2RGB = mat4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n\n void main(void) {\n\n if (isyuv>0) {\n\n highp float y = texture2D(yTexture, vTexturePosition).r;\n highp float u = texture2D(uTexture, vTexturePosition).r;\n highp float v = texture2D(vTexture, vTexturePosition).r;\n gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;\n\n } else {\n gl_FragColor = texture2D(rgbaTexture, vTexturePosition);\n }\n }\n "),i=this.gl[t(179)]();return this.gl[t(169)](i,e),this.gl[t(169)](i,s),this.gl[t(162)](i),this.gl.getProgramParameter(i,this.gl.LINK_STATUS)?i:(console[t(220)](t(237)+this.gl[t(178)](i)),null)}[Br(182)](t,e){const s=Br,i=this.gl,r=i[s(176)](t);return i[s(195)](r,e),i[s(211)](r),i.getShaderParameter(r,i[s(202)])?r:(console[s(220)](s(257)+i[s(234)](r)),i[s(231)](r),null)}[Br(191)](){const t=Br,e=this.gl,s=e[t(259)]();e.bindBuffer(e[t(261)],s);const i=[-1,-1,1,-1,1,1,-1,1];e.bufferData(e[t(261)],new Float32Array(i),e.STATIC_DRAW);var r=[];r=r[t(227)]([0,1],[1,1],[1,0],[0,0]);const n=e[t(259)]();e[t(264)](e[t(261)],n),e.bufferData(e.ARRAY_BUFFER,new Float32Array(r),e.STATIC_DRAW);const o=e.createBuffer();e[t(264)](e[t(192)],o);return e[t(173)](e.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),e.STATIC_DRAW),{positions:i,position:s,texPosition:n,indices:o}}[Br(171)](){const t=Br;let e=this.gl[t(206)]();return this.gl[t(235)](this.gl[t(193)],e),this.gl[t(223)](this.gl[t(193)],this.gl[t(240)],this.gl[t(239)]),this.gl[t(223)](this.gl.TEXTURE_2D,this.gl[t(252)],this.gl.LINEAR),this.gl[t(223)](this.gl[t(193)],this.gl[t(225)],this.gl[t(183)]),this.gl[t(223)](this.gl[t(193)],this.gl[t(245)],this.gl[t(183)]),e}[Br(196)](t,e,s){const i=Br;this.gl[i(228)](0,0,t,e),this.gl.enable(this.gl[i(185)]),this.gl[i(229)](this.gl[i(184)],this.gl[i(216)]),this.gl[i(264)](this.gl.ARRAY_BUFFER,this[i(236)][i(256)]),this.gl[i(173)](this.gl.ARRAY_BUFFER,new Float32Array(this[i(236)].positions),this.gl.STATIC_DRAW),this.gl.vertexAttribPointer(this[i(180)][i(203)].vertexPosition,2,this.gl[i(224)],!1,0,0),this.gl.enableVertexAttribArray(this[i(180)][i(203)][i(265)]),this.gl[i(264)](this.gl[i(261)],this[i(236)][i(266)]),this.gl[i(244)](this._programInfo[i(203)][i(250)],2,this.gl[i(224)],!1,0,0),this.gl.enableVertexAttribArray(this._programInfo[i(203)][i(250)]),this.gl.bindBuffer(this.gl[i(192)],this[i(236)][i(208)]);s?(this.gl.activeTexture(this.gl[i(194)]+3),this.gl[i(235)](this.gl.TEXTURE_2D,this._ytexture),this.gl.activeTexture(this.gl.TEXTURE0+4),this.gl[i(235)](this.gl[i(193)],this[i(249)]),this.gl[i(167)](this.gl[i(194)]+5),this.gl[i(235)](this.gl[i(193)],this[i(175)])):(this.gl.activeTexture(this.gl[i(194)]+2),this.gl[i(235)](this.gl[i(193)],this[i(212)])),this.gl.useProgram(this[i(180)][i(247)]),this.gl[i(248)](this._programInfo.uniformLocations[i(172)],2),this.gl[i(248)](this[i(180)][i(204)].ytexture,3),this.gl[i(248)](this._programInfo.uniformLocations[i(213)],4),this.gl[i(248)](this[i(180)][i(204)].vtexture,5),this.gl[i(248)](this[i(180)][i(204)][i(232)],s?1:0),this.gl.drawElements(this.gl[i(270)],6,this.gl[i(260)],0)}_calRect(t,e,s,i,r,n){let o=2*t/r-1,a=2*(n-e-i)/n-1,h=2*(t+s)/r-1,c=2*(n-e)/n-1;return[o,a,h,a,h,c,o,c]}[Br(226)](){const t=Br;this.gl[t(205)](0,0,0,1),this.gl.clearDepth(1),this.gl.clear(this.gl[t(268)]|this.gl[t(262)])}[Br(207)](t,e,s,i,r){const n=Br,o=this.gl;this[n(226)](),this[n(242)]?(o[n(167)](o[n(194)]),o[n(235)](o[n(193)],this[n(253)]),o[n(168)](o[n(193)],0,0,0,t,e,o[n(164)],o[n(166)],s),o[n(167)](o.TEXTURE1),o[n(235)](o.TEXTURE_2D,this[n(249)]),o.texSubImage2D(o[n(193)],0,0,0,t/2,e/2,o[n(164)],o.UNSIGNED_BYTE,i),o[n(167)](o.TEXTURE2),o[n(235)](o[n(193)],this._vtexture),o.texSubImage2D(o[n(193)],0,0,0,t/2,e/2,o[n(164)],o[n(166)],r),this[n(236)][n(210)]=[-1,-1,1,-1,1,1,-1,1],this[n(196)](t,e,!0)):(this[n(242)]=!0,o[n(167)](o[n(194)]),o[n(235)](o.TEXTURE_2D,this[n(253)]),o[n(209)](o[n(193)],0,o[n(164)],t,e,0,o.LUMINANCE,o[n(166)],s),o[n(167)](o[n(269)]),o[n(235)](o[n(193)],this[n(249)]),o[n(209)](o[n(193)],0,o[n(164)],t/2,e/2,0,o[n(164)],o[n(166)],i),o[n(167)](o[n(188)]),o[n(235)](o[n(193)],this._vtexture),o[n(209)](o[n(193)],0,o[n(164)],t/2,e/2,0,o[n(164)],o.UNSIGNED_BYTE,r),this[n(236)].positions=[-1,-1,1,-1,1,1,-1,1],this[n(196)](t,e,!0))}[Br(254)](t,e,s){const i=Br;let r=s[i(199)](0,t*e),n=s.slice(t*e,t*e*5/4),o=s[i(199)](t*e*5/4,t*e*3/2);this.render(t,e,r,n,o)}[Br(197)](t,e,s,i,r){const n=Br,o=this.gl;o.activeTexture(o[n(194)]),o[n(235)](o[n(193)],this._rgbatexture),this.isDomInited?o[n(168)](o[n(193)],0,0,0,o[n(181)],o[n(166)],r):(o[n(209)](o.TEXTURE_2D,0,o[n(181)],o[n(181)],o[n(166)],r),this.isDomInited=!0),this[n(236)][n(210)]=this._calRect(s,i,r[n(170)],r[n(214)],t,e),this[n(196)](t,e,!1)}}const Fr=Ur;function Or(){const t=["slice","30ynXSnN","group0","INDEX","createShaderModule","rgbaTexture","displayHeight","hasInited","GPUTextureUsage","getCurrentTexture","GPUBufferUsage","positionBuffer","\n\n @binding(0) @group(0) var uModelMatrix : mat4x4;\n @binding(1) @group(0) var uViewMatrix : mat4x4;\n @binding(2) @group(0) var uProjectionMatrix : mat4x4;\n\n struct VertexOutput {\n @builtin(position) Position : vec4,\n @location(0) vTexturePosition : vec2,\n }\n\n @vertex\n fn main(\n @location(0) aVertexPosition : vec4,\n @location(1) aTexturePosition : vec2\n ) -> VertexOutput {\n var output : VertexOutput;\n var tmppos : vec4 = uProjectionMatrix * uViewMatrix * uModelMatrix * aVertexPosition;\n output.Position = vec4(tmppos.x, tmppos.y, (tmppos.z+1.)/2., tmppos.w); // webgl z [-1, 1], webgpu z [0, 1], 这里z做下调整 z-webgpu = (z-webgl+1)/2\n output.vTexturePosition = aTexturePosition;\n return output;\n }\n\n ","532158IIhyeS","8450706EretvF","createBindGroup","copyExternalImageToTexture","linear","store","COPY_DST","create","RENDER_ATTACHMENT","matrixGroupInfo","less","DOM","UNIFORM","buffers","r8unorm","writeTexture","createRenderPipelineAsync","pixelTypeBuffer","470441dvseoG","uTexture","textureGroupInfo","createBuffer","122744mcBxEj","YUV_NV12","106211igGpGj","12vnDdGW","_initTextureGroupInfo","main","displayWidth","identity","2586412OplAeQ","_drawScene","createCommandEncoder","clear","45bbevJc","ortho","beginRenderPass","renderYUV_NV12","isDestroyed","indexBuffer","VERTEX","fromValues","setPipeline","setVertexBuffer","_initPipeline","depth24plus","device","_initMatrixGroupInfo","yTexture","auto","finish","group1","float32x3","createSampler","232fmSUKd","depthTexture","destroy","writeBuffer","triangle-list","getBindGroupLayout","lookAt","setIndexBuffer","1962117FywpLE","drawIndexed","pipeline","queue","createTexture","\n @group(1) @binding(0) var mySampler: sampler;\n @group(1) @binding(1) var pixelType: i32;\n @group(1) @binding(2) var yTexture: texture_2d;\n @group(1) @binding(3) var uTexture: texture_2d;\n @group(1) @binding(4) var vTexture: texture_2d;\n @group(1) @binding(5) var uvTexture: texture_2d;\n @group(1) @binding(6) var rgbaTexture: texture_2d;\n\n const YUV2RGB : mat4x4 = mat4x4( 1.1643828125, 0, 1.59602734375, -.87078515625,\n 1.1643828125, -.39176171875, -.81296875, .52959375,\n 1.1643828125, 2.017234375, 0, -1.081390625,\n 0, 0, 0, 1);\n\n @fragment\n fn main(\n @location(0) vTexturePosition: vec2\n ) -> @location(0) vec4 {\n if(pixelType == 1){\n var y : f32= textureSample(yTexture, mySampler, vTexturePosition).r;\n var u : f32 = textureSample(uTexture, mySampler, vTexturePosition).r;\n var v : f32 = textureSample(vTexture, mySampler, vTexturePosition).r;\n\n return vec4(y, u, v, 1.0)*YUV2RGB;\n } else if (pixelType == 2) {\n\n var y : f32= textureSample(yTexture, mySampler, vTexturePosition).r;\n var u : f32 = textureSample(uvTexture, mySampler, vTexturePosition).r;\n var v : f32 = textureSample(uvTexture, mySampler, vTexturePosition).g;\n\n return vec4(y, u, v, 1.0)*YUV2RGB;\n } else {\n\n return textureSample(rgbaTexture, mySampler, vTexturePosition);\n }\n\n }\n\n ","texpositionBuffer","setBindGroup","gpu","byteLength","uint16","TEXTURE_BINDING","vTexture","rg8unorm","createView","format","then"];return(Or=function(){return t})()}function Ur(t,e){const s=Or();return(Ur=function(t,e){return s[t-=153]})(t,e)}!function(t,e){const s=Ur,i=t();for(;;)try{if(761478===-parseInt(s(187))/1+parseInt(s(199))/2+-parseInt(s(194))/3*(-parseInt(s(191))/4)+parseInt(s(203))/5*(parseInt(s(169))/6)+-parseInt(s(193))/7*(-parseInt(s(223))/8)+-parseInt(s(231))/9*(parseInt(s(157))/10)+-parseInt(s(170))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Or);const Nr={YUV_I420:1,YUV_NV12:2,RGBA:3,DOM:4};class jr{constructor(t){const e=Ur;this[e(239)]=t,this.pipeline=null,this[e(178)]=null,this.depthTexture=null,this[e(189)]=null,this[e(163)]=!1,this[e(182)]=this._initBuffer(),this[e(207)]=!1,this[e(213)]()[e(155)]((t=>{const s=e;this[s(207)]||(this[s(233)]=t,this[s(178)]=this._initMatrixGroupInfo(),this[s(178)]&&(this[s(163)]=!0))}))}[Fr(225)](){const t=Fr;this[t(207)]=!1,this.gpu&&(this.gpu[t(215)].destroy(),this[t(239)]=null),this[t(163)]=!1,this[t(233)]=null,this.matrixGroupInfo=null,this[t(224)]=null,this.textureGroupInfo=null}_initBuffer(){const t=Fr,e=this[t(239)][t(215)],s=new Float32Array([-1,-1,-1,1,-1,-1,1,1,-1,-1,1,-1]),i=e[t(190)]({size:s[t(240)],usage:window[t(166)][t(209)]|window[t(166)][t(175)]});e[t(234)][t(226)](i,0,s);const r=new Float32Array([0,1,1,1,1,0,0,0]),n=e[t(190)]({size:r[t(240)],usage:window[t(166)][t(209)]|window.GPUBufferUsage.COPY_DST});e[t(234)][t(226)](n,0,r);const o=new Uint16Array([0,1,2,0,2,3]),a=e[t(190)]({size:o[t(240)],usage:window[t(166)][t(159)]|window.GPUBufferUsage[t(175)]});return e[t(234)][t(226)](a,0,o),{positionBuffer:i,texpositionBuffer:n,indexBuffer:a}}[Fr(213)](){return new Promise(((t,e)=>{const s=Ur,i=this[s(239)].device,r=this.gpu[s(154)],n=s(168),o=s(236),a={layout:s(218),vertex:{module:i.createShaderModule({code:n}),entryPoint:s(196),buffers:[{arrayStride:12,attributes:[{shaderLocation:0,offset:0,format:s(221)}]},{arrayStride:8,attributes:[{shaderLocation:1,offset:0,format:"float32x2"}]}]},primitive:{topology:s(227)},fragment:{module:i[s(160)]({code:o}),entryPoint:s(196),targets:[{format:r}]},depthStencil:{depthWriteEnabled:!0,depthCompare:s(179),format:"depth24plus"}};i[s(185)](a)[s(155)]((e=>{t(e)})).catch((t=>{e(t)}))}))}[Fr(216)](){const t=Fr;if(!this[t(239)])return null;const e=this[t(239)][t(215)],s=this[t(233)],i=ir[t(176)]();ir[t(204)](i,-1,1,-1,1,.1,100);const r=Gi();ir[t(198)](r);const n=ir[t(176)]();ir[t(229)](n,or(0,0,0),_r[t(210)](0,0,-1),or(0,1,0));const o=e.createBuffer({size:64,usage:window[t(166)].UNIFORM|window.GPUBufferUsage[t(175)]});e[t(234)][t(226)](o,0,r);const a=e[t(190)]({size:64,usage:window.GPUBufferUsage.UNIFORM|window[t(166)][t(175)]});e[t(234)][t(226)](a,0,n);const h=e[t(190)]({size:64,usage:window[t(166)][t(181)]|window[t(166)].COPY_DST});e.queue[t(226)](h,0,i);return{modelMatrixBuffer:o,viewMatrixBuffer:a,projectMatrixBuffer:h,group:e.createBindGroup({label:t(158),layout:s[t(228)](0),entries:[{binding:0,resource:{buffer:o}},{binding:1,resource:{buffer:a}},{binding:2,resource:{buffer:h}}]})}}[Fr(195)](t,e){const s=Fr,i=this[s(239)][s(215)],r=this.pipeline,n=i[s(235)]({size:[t,e],format:s(183),usage:window[s(164)][s(242)]|window[s(164)][s(175)]|window[s(164)][s(177)]}),o=i[s(235)]({size:[t/2,e/2],format:s(183),usage:window[s(164)].TEXTURE_BINDING|window.GPUTextureUsage[s(175)]|window[s(164)][s(177)]}),a=i.createTexture({size:[t/2,e/2],format:"r8unorm",usage:window[s(164)][s(242)]|window[s(164)][s(175)]|window[s(164)][s(177)]}),h=i[s(235)]({size:[t/2,e/2],format:s(244),usage:window[s(164)][s(242)]|window.GPUTextureUsage[s(175)]|window[s(164)][s(177)]}),c=i[s(235)]({size:[t,e],format:"rgba8unorm",usage:window.GPUTextureUsage[s(242)]|window[s(164)].COPY_DST|window[s(164)].RENDER_ATTACHMENT}),l=i[s(190)]({size:4,usage:window[s(166)][s(181)]|window[s(166)].COPY_DST}),d=i[s(222)]({magFilter:s(173),minFilter:"linear"}),u=i[s(171)]({label:s(220),layout:r[s(228)](1),entries:[{binding:0,resource:d},{binding:1,resource:{buffer:l}},{binding:2,resource:n[s(153)]()},{binding:3,resource:o[s(153)]()},{binding:4,resource:a[s(153)]()},{binding:5,resource:h[s(153)]()},{binding:6,resource:c.createView()}]});return{yTexture:n,uTexture:o,vTexture:a,uvTexture:h,rgbaTexture:c,pixelTypeBuffer:l,group:u}}[Fr(200)](){const t=Fr,e=this[t(239)].device,s=this.gpu.context,i=e[t(201)](),r={colorAttachments:[{view:s[t(165)]().createView(),clearValue:{r:0,g:0,b:0,a:0},loadOp:t(202),storeOp:"store"}],depthStencilAttachment:{view:this[t(224)][t(153)](),depthClearValue:1,depthLoadOp:"clear",depthStoreOp:t(174)}},n=i[t(205)](r);n[t(211)](this.pipeline),n[t(238)](0,this[t(178)].group),n[t(238)](1,this[t(189)].group),n.setVertexBuffer(0,this[t(182)][t(167)]),n[t(212)](1,this.buffers[t(237)]),n[t(230)](this.buffers[t(208)],t(241)),n[t(232)](6),n.end(),e.queue.submit([i[t(219)]()])}renderYUV(t,e,s){const i=Fr;if(!this[i(163)])return;let r=s[i(156)](0,t*e),n=s.slice(t*e,t*e*5/4),o=s.slice(t*e*5/4,t*e*3/2);const a=this.gpu[i(215)];!this[i(224)]&&(this[i(224)]=this[i(239)][i(215)][i(235)]({size:[t,e],format:i(214),usage:window.GPUTextureUsage[i(177)]})),!this.textureGroupInfo&&(this[i(189)]=this[i(195)](t,e)),a[i(234)][i(226)](this[i(189)][i(186)],0,new Uint32Array([Nr.YUV_I420])),a[i(234)][i(184)]({texture:this[i(189)].yTexture},r,{bytesPerRow:t,rowsPerImage:e},[t,e]),a[i(234)].writeTexture({texture:this[i(189)][i(188)]},n,{bytesPerRow:t/2,rowsPerImage:e/2},[t/2,e/2]),a[i(234)].writeTexture({texture:this[i(189)][i(243)]},o,{bytesPerRow:t/2,rowsPerImage:e/2},[t/2,e/2]),this[i(200)]()}[Fr(206)](t,e,s){const i=Fr;if(!this[i(163)])return;const r=this[i(239)][i(215)];!this.depthTexture&&(this.depthTexture=this[i(239)].device[i(235)]({size:[t,e],format:"depth24plus",usage:window[i(164)].RENDER_ATTACHMENT})),!this[i(189)]&&(this.textureGroupInfo=this[i(195)](t,e));let n=s[i(156)](0,t*e),o=s[i(156)](t*e,t*e*3/2);r[i(234)][i(226)](this[i(189)].pixelTypeBuffer,0,new Uint32Array([Nr[i(192)]])),r[i(234)].writeTexture({texture:this[i(189)][i(217)]},n,{bytesPerRow:t,rowsPerImage:e},[t,e]),r.queue[i(184)]({texture:this[i(189)].uvTexture},o,{bytesPerRow:t,rowsPerImage:e/2},[t/2,e/2]),this[i(200)]()}render(t){const e=Fr;if(!this[e(163)])return;const s=this[e(239)].device,i=t[e(197)],r=t[e(162)];!this[e(224)]&&(this[e(224)]=this[e(239)][e(215)][e(235)]({size:[i,r],format:e(214),usage:window[e(164)][e(177)]})),!this[e(189)]&&(this.textureGroupInfo=this[e(195)](i,r)),s[e(234)].writeBuffer(this[e(189)][e(186)],0,new Uint32Array([Nr[e(180)]])),s[e(234)][e(172)]({source:t},{texture:this[e(189)][e(161)]},[i,r]),this[e(200)]()}[Fr(202)](){}}const Vr=Gr;function zr(){const t=["fontSize","setAttribute","lineWidth","removeChild","sqrt","px)","103288ZRJVzO","width","attachShadow","configList","rotate(","image","text","shadowRootDynamicDom","resize","right","scale(","objectFit","absolute","351704LXVUCy","shadowRoot","appendChild","getRenderType","145835xDqPfU","-webkit-touch-callout","top","-o-user-select","-moz-user-select","_resizeDomRatio","isResize","function","_resizeDomForCanvas","shadowRootRealDom","borderWidth","destroy","aspectRatio","84KQjVNt","opacity","atan2","fill","createElement","left","block","backgroundColor","position: absolute; top: 0; left: 0; width: 0; height: 0;display: none;","forEach","hidden","split"," rotateY(180deg)","open","scale","getVideoInfo","position","fillOpacity","none","update","rgba(0,0,0,0)","calc(100% - ","zIndex","padding","isFullResize","mirrorRotate","_opt","height","33ZZJGTe","children","overflow","line","bottom","push","vertical","TAG_NAME","floor","transform","rect","player","deg)","_updateDom","shadowRootInnerDom","img"," rotate(","length","2517848NUQYXd","-ms-user-select","display","getShowVideoRect","isDynamic","style","div","video","polygon","color","content","map","src","getControlHeight","borderColor","html","px 0","debugLog","4109157WijAzZ","createTextNode","visibility","resize()","-webkit-tap-highlight-color","index","isArray","innerHTML","join","clipPath","0 0","100%","canvas"," rotateX(180deg)","rotate","1953399loiBrQ","insertBefore","level","-webkit-text-size-adjust","list","calc(","607962CNrCVs"];return(zr=function(){return t})()}function Gr(t,e){const s=zr();return(Gr=function(t,e){return s[t-=168]})(t,e)}!function(t,e){const s=Gr,i=t();for(;;)try{if(270380===-parseInt(s(234))/1+-parseInt(s(214))/2+parseInt(s(279))/3*(parseInt(s(221))/4)+parseInt(s(238))/5*(-parseInt(s(251))/6)+parseInt(s(208))/7+parseInt(s(175))/8+parseInt(s(193))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(zr);class Wr{constructor(t){const e=Gr;this[e(168)]=t,this[e(286)]="SingleWatermark",this[e(224)]=[],this[e(235)]=null,this[e(247)]=null,this[e(171)]=null,this[e(265)]=1,this[e(179)]=!1,this._initDom(),this[e(168)][e(192)](this[e(286)],"int")}[Vr(249)](){const t=Vr;this[t(224)]=[],this[t(171)]=null,this[t(179)]=!1,this.scale=1,this[t(235)]&&(this[t(168)].$container[t(218)](this[t(247)]),this.shadowRoot=null,this.shadowRootRealDom=null),this[t(168)].debugLog(this[t(286)],"destroy")}[Vr(229)](){const t=Vr;this.player[t(192)](this.TAG_NAME,t(196)),"default"===this[t(168)]._opt[t(250)]||Je()?this.player[t(237)]()===f[t(205)]?this[t(246)]():this[t(168)][t(237)]()===f[t(182)]&&this._resizeDomForVideo():this[t(243)]()}_initDom(){const t=Vr,e=this[t(168)].$container;let s=null;const i=document.createElement(t(181));i[t(216)](t(180),"pointer-events: none !important;display: block !important;"),s=typeof i[t(223)]===t(245)?i.attachShadow({mode:t(264)}):i[t(235)]?i[t(235)]:i;const r=document[t(255)](t(181));r.setAttribute(t(180),t(259)),s[t(236)](r);const n=e[t(280)],o=Math[t(287)](Math.random()*(n[t(174)]-1))+1;n[o]?e[t(209)](i,n[o]):e.appendChild(i),this[t(171)]=r,this[t(247)]=i,this[t(235)]=s}[Vr(270)](t){const e=Vr;this._removeDom();let s=[];Array[e(199)](t)?s=t:Bs(t)&&s[e(284)](t);let i=s[e(186)]((t=>Ss(t)));this.configList=i,this._updateDom()}_resizeDomForVideo(){const t=Vr,e=this[t(168)][t(266)]();if(!(e&&e[t(278)]>0&&e.width>0))return;let s=e[t(222)],i=e.height;const r=this[t(168)]._opt,n=this[t(168)][t(178)]();let o=n[t(278)],a=n[t(222)];const h=r.rotate;let c=(a-s)/2,l=(o-i)/2;(270===h||90===h)&&(s=e[t(278)],i=e.width);const d=a/s,u=o/i;let p=d>u?u:d;!r[t(244)]&&d!==u&&(p=d+","+u),r.isFullResize&&(p=d>u?d:u);let f="scale("+p+")";r[t(276)]===t(269)&&h&&(f+=t(173)+h+t(169)),r[t(276)]===t(210)?f+=t(263):r[t(276)]===t(285)&&(f+=t(206)),this[t(265)]=-1!==(""+p).indexOf(",")?d:p,this[t(171)][t(180)][t(288)]=f,this[t(171)][t(180)][t(256)]=c+"px",this[t(171)][t(180)][t(240)]=l+"px",this[t(171)][t(180)][t(222)]=e[t(222)]+"px",this[t(171)].style[t(278)]=e[t(278)]+"px",this.shadowRootInnerDom[t(180)].display="block"}[Vr(246)](){const t=Vr,e=this[t(168)][t(266)]();if(!(e&&e[t(278)]>0&&e[t(222)]>0))return;const s=this.player[t(277)],i=this[t(168)][t(178)]();let r=i[t(222)],n=i.height,o=e[t(222)],a=e[t(278)];const h=s[t(207)];let c=(r-o)/2,l=(n-a)/2;(270===h||90===h)&&(o=e[t(278)],a=e[t(222)]);const d=r/o,u=n/a;let p=d>u?u:d;!s[t(244)]&&d!==u&&(p=d+","+u),s[t(275)]&&(p=d>u?d:u);let f=t(231)+p+")";s[t(276)]===t(269)&&h&&(f+=t(173)+h+"deg)"),s[t(276)]===t(210)?f+=" rotateY(180deg)":s.mirrorRotate===t(285)&&(f+=t(206)),this[t(171)][t(180)].height=e[t(278)]+"px",this.shadowRootInnerDom[t(180)][t(222)]=e[t(222)]+"px",this[t(171)][t(180)][t(274)]="0",this[t(171)][t(180)][t(288)]=f,this[t(171)][t(180)][t(256)]=c+"px",this[t(171)][t(180)].top=l+"px",this[t(171)][t(180)][t(177)]=t(257)}[Vr(243)](){const t=Vr,e=this[t(168)][t(266)]();if(!(e&&e[t(278)]>0&&e[t(222)]>0))return;const s=this[t(168)][t(277)][t(250)][t(262)](":").map(Number),i=this[t(168)][t(178)]();let r=i[t(222)],n=i[t(278)],o=this.player[t(188)]();const a=e.width/e[t(278)],h=s[0]/s[1];if(a>h){const s=h*e.height/e.width;this.shadowRootInnerDom.style[t(222)]=100*s+"%",this[t(171)][t(180)][t(278)]=t(272)+o+t(220),this.shadowRootInnerDom[t(180)][t(274)]="0 "+(r-r*s)/2+"px"}else{const s=e[t(222)]/h/e[t(278)];this[t(171)][t(180)][t(222)]="100%",this[t(171)].style[t(278)]=t(213)+100*s+"% - "+o+"px)",this[t(171)][t(180)][t(274)]=(n-n*s)/2+t(191)}this[t(171)].style[t(177)]=t(257)}[Vr(170)](){const t=Vr;this[t(235)]&&this[t(224)][t(260)]((e=>{const s=t,i=document.createElement(s(181));let r=null;if(e[s(226)]&&e[s(226)][s(187)]?(r=document[s(255)](s(172)),r[s(180)][s(278)]="100%",r.style[s(222)]=s(204),r[s(180)][s(232)]="contain",r[s(187)]=e.image[s(187)]):e[s(227)]&&e[s(227)][s(185)]?r=document[s(194)](e[s(227)][s(185)]):e[s(289)]&&e[s(289)][s(184)]&&e.rect[s(222)]||e[s(190)]?r=document[s(255)](s(181)):e.line&&e[s(282)].x1&&e.line.y1&&e.line.x2&&e[s(282)].y2?r=document.createElement(s(181)):e[s(183)]&&e.polygon.list&&e[s(183)][s(212)][s(174)]>=3&&(r=document[s(255)]("div")),r){if(i[s(236)](r),i[s(180)][s(195)]="",i[s(180)][s(267)]=s(233),i[s(180)][s(177)]="block",i[s(180)][s(176)]="none",i.style[s(242)]="none",i[s(180)]["-webkit-user-select"]=s(269),i[s(180)][s(241)]="none",i[s(180)]["user-select"]=s(269),i[s(180)][s(239)]=s(269),i[s(180)][s(197)]=s(271),i[s(180)][s(211)]=s(269),i[s(180)][s(239)]=s(269),i.style.opacity=e[s(252)],vs(e[s(256)])&&(us(e[s(256)])?i[s(180)][s(256)]=e[s(256)]+"px":i.style[s(256)]=e[s(256)]),vs(e[s(230)])&&(us(e[s(230)])?i[s(180)][s(230)]=e.right+"px":i.style.right=e.right),vs(e[s(240)])&&(us(e[s(240)])?i[s(180)].top=e[s(240)]+"px":i[s(180)][s(240)]=e.top),vs(e.bottom)&&(us(e[s(283)])?i[s(180)].bottom=e[s(283)]+"px":i[s(180)][s(283)]=e[s(283)]),e[s(258)]&&(i[s(180)][s(258)]=e[s(258)]),i[s(180)][s(281)]=s(261),i[s(180)][s(273)]="9999999",e.image&&e[s(226)][s(187)])i[s(180)][s(222)]=e.image[s(222)]+"px",i[s(180)][s(278)]=e.image[s(278)]+"px";else if(e[s(227)]&&e[s(227)][s(185)])i[s(180)].fontSize=e.text[s(215)]+"px",i.style[s(184)]=e[s(227)][s(184)],e.text[s(222)]&&(i.style[s(222)]=e.text.width+"px"),e[s(227)][s(278)]&&(i[s(180)][s(278)]=e[s(227)][s(278)]+"px");else if(e[s(289)]&&e.rect[s(184)]&&e.rect[s(222)]){if(i[s(180)][s(222)]=e[s(289)][s(222)]+"px",i[s(180)][s(278)]=e[s(289)].height+"px",i[s(180)][s(248)]=e[s(289)][s(217)]+"px",i.style.borderStyle="solid",i.style[s(189)]=e[s(289)].color,e[s(289)][s(254)]){const t=document[s(255)](s(181));t[s(180)][s(267)]=s(233),t[s(180)].width=s(204),t.style.height=s(204),t[s(180)][s(258)]=e[s(289)][s(254)],e[s(289)][s(268)]&&(t[s(180)].opacity=e.rect.fillOpacity),i[s(236)](t)}}else if(e[s(190)])i[s(180)][s(222)]="100%",i[s(180)].height=s(204),i[s(200)]=e[s(190)];else if(e.line&&e[s(282)].x1&&e[s(282)].y1&&e[s(282)].x2&&e[s(282)].y2)this.settingLine(i,e[s(282)]);else if(e[s(183)]&&e[s(183)][s(212)]&&e[s(183)][s(212)][s(174)]>=3){i[s(180)].width="100%",i[s(180)][s(278)]=s(204);let t=e[s(183)][s(212)];const r=e[s(183)][s(184)],n=e.polygon[s(217)];if(t=t.sort(((t,e)=>(t[s(198)]||0)-(e.index||0))),e.polygon[s(254)]){const r=document[s(255)](s(181));r[s(180)].position=s(233),r.style.width=s(204),r[s(180)][s(278)]=s(204);const n="polygon("+t.map((t=>t.x+"px "+t.y+"px"))[s(201)](", ")+")";r[s(180)][s(202)]=n,r.style[s(258)]=e[s(183)][s(254)],e[s(183)][s(268)]&&(r[s(180)][s(252)]=e.polygon.fillOpacity),i[s(236)](r)}t[s(260)](((e,o)=>{const a=s,h=document[a(255)](a(181));if(o===t[a(174)]-1){const s=t[0],o={x1:e.x,y1:e.y,x2:s.x,y2:s.y,color:r,lineWidth:n};return this.settingLine(h,o),void i.appendChild(h)}const c=t[o+1],l={x1:e.x,y1:e.y,x2:c.x,y2:c.y,color:r,lineWidth:n};this.settingLine(h,l),i[a(236)](h)}))}this[s(179)]&&(this[s(228)]=i),this[s(171)][s(236)](i)}}))}settingLine(t,e){const s=Vr,i=e.x1,r=e.y1,n=e.x2,o=e.y2;var a=Math[s(219)]((i-n)**2+(r-o)**2),h=180*Math[s(253)](o-r,n-i)/Math.PI;t[s(180)][s(258)]=e[s(184)],t[s(180)][s(222)]=a+"px",t[s(180)][s(278)]=e[s(217)]+"px",t[s(180)][s(267)]=s(233),t[s(180)].top=r+"px",t[s(180)][s(256)]=i+"px",t[s(180)].transform=s(225)+h+s(169),t.style.transformOrigin=s(203)}remove(){this._removeDom()}_removeDom(){const t=Vr;this.shadowRootInnerDom&&(this[t(171)][t(200)]="")}}const Hr=Kr;function Kr(t,e){const s=Yr();return(Kr=function(t,e){return s[t-=239]})(t,e)}!function(t,e){const s=Kr,i=t();for(;;)try{if(768090===parseInt(s(330))/1+parseInt(s(292))/2*(parseInt(s(300))/3)+-parseInt(s(278))/4+-parseInt(s(255))/5+parseInt(s(283))/6+-parseInt(s(279))/7+parseInt(s(259))/8)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Yr);class Qr extends Bi{constructor(){const t=Kr;super(),this[t(250)]="",this.videoInfo={width:null,height:null,encType:null,encTypeCode:null},this[t(241)]=!1,this[t(324)]=null,this[t(312)]=null,this[t(281)]=null,this.contentWatermark=null,this.aiContentWatermark=null,this[t(266)]=[],this.tempAiContentList=[],this[t(240)]=[],this.streamFps=0}[Hr(328)](){const t=Hr;this[t(305)](),this[t(264)]={width:null,height:null,encType:null,encTypeCode:null},this.contentWatermark&&(this[t(252)][t(328)](),this[t(252)]=null),this[t(266)]=[],this[t(306)]&&(this.aiContentWatermark[t(328)](),this.aiContentWatermark=null),this[t(282)]=[],this.prevAiFaceDetectTime=null,this.prevAiObjectDetectTime=null,this[t(281)]=null,this.streamFps=0,this[t(317)]()}[Hr(305)](){this[Hr(241)]=!1}[Hr(274)](){return this.init}[Hr(320)](t){const e=Hr;vs(t.encTypeCode)&&(this[e(264)][e(251)]=z[t[e(291)]],this.videoInfo[e(291)]=t[e(291)]),vs(t[e(251)])&&(this[e(264)][e(251)]=t.encType),vs(t.width)&&(this[e(264)][e(327)]=t[e(327)]),vs(t[e(286)])&&(this[e(264)].height=t[e(286)]),vs(this.videoInfo.encType)&&vs(this[e(264)][e(286)])&&vs(this.videoInfo[e(327)])&&!this[e(241)]&&(this.player[e(323)](M[e(264)],this[e(264)]),this[e(241)]=!0)}[Hr(284)](){return this[Hr(264)]}[Hr(256)](){const t=Hr;this[t(266)]=[],this[t(282)]=[]}[Hr(276)](){const t=Hr;if(this[t(271)][t(261)](t(315),"resize()"),this[t(271)][t(258)][t(297)]===t(267)||Je()?this[t(316)]():this[t(321)](),this[t(252)]&&this[t(252)].resize(),this.aiContentWatermark&&this[t(306)][t(276)](),this.player[t(290)]&&this.player[t(290)].resize(),this[t(271)].ghostWatermark&&this[t(271)][t(260)][t(276)](),this[t(271)].dynamicWatermark&&this[t(271)].dynamicWatermark[t(276)](),this[t(271)].zoom&&this[t(271)][t(272)]){const e=this[t(322)]();this[t(271)].zoom[t(307)](e),this[t(271)][t(318)].updateVideoElementScale()}this.player[t(288)]&&this[t(271)][t(288)][t(246)]()}[Hr(321)](){const t=Hr;this[t(271)].debugLog(t(315),"_resizeRatio()");const e=this[t(271)][t(258)].aspectRatio[t(254)](":")[t(304)](Number),s=this[t(271)][t(247)]();let i=s.width,r=s[t(286)],n=this.player[t(244)]();const o=this[t(264)],a=o.width/o[t(286)],h=e[0]/e[1];if(this[t(263)]()===f.canvas&&(this[t(311)][t(331)].left="0",this.$videoElement.style[t(268)]="0",this[t(311)][t(331)][t(289)]=t(243)),this.getType()===f.video&&this.player[t(258)][t(257)]&&(this[t(311)][t(331)].objectFit=t(301)),a>h){const e=h*o.height/o[t(327)];this[t(311)][t(331)].width=100*e+"%",this.$videoElement[t(331)].height=t(287)+n+t(269),this.$videoElement[t(331)].padding="0 "+(i-i*e)/2+"px"}else{const e=o[t(327)]/h/o[t(286)];this.$videoElement[t(331)][t(327)]=t(249),this.$videoElement.style[t(286)]=t(280)+100*e+t(275)+n+t(269),this[t(311)][t(331)].padding=(r-r*e)/2+t(295)}}[Hr(262)](){}[Hr(245)](){}setRate(t){}[Hr(263)](){return""}[Hr(242)](){return""}[Hr(332)](){return 0}getStreamFps(){return this[Hr(314)]}[Hr(298)](){return!0}[Hr(309)](){return this[Hr(298)]()}[Hr(277)](){return null}[Hr(299)](t){const e=Hr;this[e(271)][e(261)](e(315),e(299),t),this[e(314)]=t}[Hr(334)](){const t=Hr;let e=arguments[t(270)]>0&&void 0!==arguments[0]?arguments[0]:[];this[t(266)]=e,this[t(265)]()}addAiContentToCanvas(){const t=Hr;let e=arguments[t(270)]>0&&void 0!==arguments[0]?arguments[0]:[];this[t(282)]=e,this.doAddAiContentToWatermark()}[Hr(265)](){const t=Hr;if(this[t(266)][t(270)]>0){!this[t(252)]&&(this.contentWatermark=new Wr(this[t(271)]),this.contentWatermark[t(276)]());const e=[];this[t(266)].forEach((s=>{const i=t;let r={left:s.x||0,top:s.y||0};s[i(333)]===i(308)?r.text={content:s[i(308)],fontSize:s.fontSize||"14",color:s[i(293)]||"#000"}:s[i(333)]===i(325)?r[i(325)]={width:s.width,height:s[i(286)],color:s[i(293)]||i(248),lineWidth:s.lineWidth||2,fill:s[i(301)]||"",fillOpacity:s.fillOpacity||.2}:s.type===i(239)?r[i(239)]={list:s.list,color:s[i(293)]||i(248),lineWidth:s[i(273)]||2,fill:s[i(301)],fillOpacity:s.fillOpacity||.2}:s.type===i(303)&&(r[i(303)]={color:s[i(293)]||i(248),lineWidth:s[i(273)]||2,x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2}),e[i(296)](r)})),this[t(252)].update(e)}else this[t(252)]&&this[t(252)].remove()}doAddAiContentToWatermark(){const t=Hr;if(this[t(282)][t(270)]>0){!this[t(306)]&&(this.aiContentWatermark=new Wr(this[t(271)]),this[t(306)][t(276)]());const e=this.tempAiContentList[t(304)]((e=>{const s=t;let i={left:e.x,top:e.y};return e[s(333)]===s(308)?i[s(308)]={content:e[s(308)],fontSize:e.fontSize,color:e.color}:"rect"===e.type&&(i[s(325)]={width:e.width,height:e[s(286)],color:e.color,lineWidth:e[s(273)]}),i}));this[t(306)][t(294)](e)}else this[t(306)]&&this[t(306)][t(329)]()}[Hr(322)](){const t=Hr;let e=this[t(311)][t(331)][t(289)][t(302)](/scale\([0-9., ]*\)/g),s="";if(e&&e[0]){s=e[0][t(285)]("scale(","")[t(285)](")","")[t(254)](",")}return s}getReadyStateInited(){return!0}[Hr(326)](){}[Hr(310)](){}[Hr(335)](){}[Hr(253)](){return this[Hr(250)]}[Hr(319)](){const t=Hr;let e=0;return this[t(240)]&&(e=this[t(240)][t(270)]),e}screenshotByRect(t){return null}[Hr(313)](){}}function Yr(){const t=["line","map","resetInit","aiContentWatermark","updatePrevVideoElementStyleScale","text","isVideoPlaying","initCanvasViewSize","$videoElement","prevAiObjectDetectTime","initFps","streamFps","CommonVideo","_resize","off","zoom","getBufferListLength","updateVideoInfo","_resizeRatio","_getStyleScale","emit","prevAiFaceDetectTime","rect","screenshotByCurrentWatermark","width","destroy","remove","362670dMNeHv","style","getCurrentTime","type","addContentToCanvas","bindMediaStream","polygon","bufferList","init","getCanvasType","none","getControlHeight","pause","resizeLoadingBackground","getShowVideoRect","green","100%","TAG_NAME","encType","contentWatermark","getName","split","2978695GFjXhc","clearView","videoRenderSupportScale","_opt","9165968Pnsmwh","ghostWatermark","debugLog","play","getType","videoInfo","doAddContentToWatermark","tempContentList","default","top","px)","length","player","zooming","lineWidth","getHasInit","% - ","resize","getPlaybackQuality","4755676owyKsp","9061682zUHecM","calc(","prevAiOcclusionDetectTime","tempAiContentList","5025414KUeTmD","getVideoInfo","replace","height","calc(100% - ","control","transform","singleWatermark","encTypeCode","11162Octmtg","color","update","px 0","push","aspectRatio","isPlaying","setStreamFps","807eUHmTN","fill","match"];return(Yr=function(){return t})()}var qr=en;!function(t,e){for(var s=en,i=t();;)try{if(733521===parseInt(s(257))/1+-parseInt(s(228))/2*(-parseInt(s(260))/3)+-parseInt(s(224))/4*(parseInt(s(270))/5)+parseInt(s(251))/6+parseInt(s(266))/7+parseInt(s(263))/8*(parseInt(s(220))/9)+-parseInt(s(253))/10*(parseInt(s(267))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(tn);var Jr=typeof window===qr(227)&&window.window===window?window:typeof self===qr(227)&&self.self===self?self:typeof global===qr(227)&&global[qr(252)]===global?global:void 0;function Xr(t,e,s){var i=qr,r=new XMLHttpRequest;r[i(250)](i(239),t),r[i(229)]=i(262),r[i(232)]=function(){rn(r[i(240)],e,s)},r[i(261)]=function(){var t=i;console[t(236)](t(276))},r[i(278)]()}function Zr(t){var e=qr,s=new XMLHttpRequest;s.open(e(223),t,!1);try{s[e(278)]()}catch(t){}return s[e(271)]>=200&&s[e(271)]<=299}function $r(t){var e=qr;try{t[e(226)](new MouseEvent(e(254)))}catch(i){var s=document.createEvent(e(221));s[e(265)](e(254),!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t[e(226)](s)}}function tn(){var t=["warn","http://www.w3.org/1999/xhtml","createObjectURL","target","open","4781286eNCPZD","global","150AVPjyT","click","origin","rel","893136WuyxCi","downloading...","test","1143EdXZRk","onerror","blob","488MPhlUw","type","initMouseEvent","8662815UzFSyd","2396339OesSll","createElementNS","userAgent","1594030YtaXCY","status","URL","string","result","HTMLElement","could not download file","href","send","readAsDataURL","noopener","28773crxupx","MouseEvents","webkitURL","HEAD","4fmeWnJ","replace","dispatchEvent","object","6286ErUDuC","responseType","prototype","download","onload","Deprecated: Expected third argument to be a object","name","fromCharCode","error","revokeObjectURL","msSaveOrOpenBlob","GET","response","safari","_blank","navigator","onloadend","createElement"];return(tn=function(){return t})()}function en(t,e){var s=tn();return(en=function(t,e){return s[t-=218]})(t,e)}var sn=Jr[qr(243)]&&/Macintosh/[qr(259)](navigator[qr(269)])&&/AppleWebKit/[qr(259)](navigator[qr(269)])&&!/Safari/[qr(259)](navigator[qr(269)]),rn=typeof window!==qr(227)||window!==Jr?function(){}:qr(231)in HTMLAnchorElement[qr(230)]&&!sn?function(t,e,s){var i=qr,r=Jr[i(272)]||Jr[i(222)],n=document[i(268)](i(247),"a");e=e||t.name||"download",n[i(231)]=e,n[i(256)]=i(219),typeof t===i(273)?(n[i(277)]=t,n[i(255)]!==location[i(255)]?Zr(n[i(277)])?Xr(t,e,s):$r(n,n[i(249)]=i(242)):$r(n)):(n[i(277)]=r[i(248)](t),setTimeout((function(){var t=i;r[t(237)](n[t(277)])}),4e4),setTimeout((function(){$r(n)}),0))}:qr(238)in navigator?function(t,e,s){var i,r,n,o=qr;if(e=e||t[o(234)]||o(231),"string"==typeof t)if(Zr(t))Xr(t,e,s);else{var a=document[o(245)]("a");a.href=t,a[o(249)]=o(242),setTimeout((function(){$r(a)}))}else navigator.msSaveOrOpenBlob((i=t,n=qr,void 0===(r=s)?r={autoBom:!1}:typeof r!==n(227)&&(console[n(246)](n(233)),r={autoBom:!r}),r.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i[n(264)])?new Blob([String[n(235)](65279),i],{type:i.type}):i),e)}:function(t,e,s,i){var r=qr;if((i=i||open("",r(242)))&&(i.document.title=i.document.body.innerText=r(258)),"string"==typeof t)return Xr(t,e,s);var n="application/octet-stream"===t[r(264)],o=/constructor/i[r(259)](Jr[r(275)])||Jr[r(241)],a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||n&&o||sn)&&"undefined"!=typeof FileReader){var h=new FileReader;h[r(244)]=function(){var t=r,e=h[t(274)];e=a?e:e[t(225)](/^data:[^;]*;/,"data:attachment/file;"),i?i.location[t(277)]=e:location=e,i=null},h[r(218)](t)}else{var c=Jr.URL||Jr[r(222)],l=c.createObjectURL(t);i?i.location=l:location.href=l,i=null,setTimeout((function(){c.revokeObjectURL(l)}),4e4)}};const nn=on;function on(t,e){const s=an();return(on=function(t,e){return s[t-=376]})(t,e)}!function(t,e){const s=on,i=t();for(;;)try{if(766664===-parseInt(s(457))/1+parseInt(s(451))/2*(parseInt(s(433))/3)+-parseInt(s(379))/4+-parseInt(s(432))/5*(parseInt(s(382))/6)+parseInt(s(389))/7+parseInt(s(422))/8*(parseInt(s(412))/9)+parseInt(s(384))/10*(parseInt(s(424))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(an);nn(408),nn(404),nn(437),nn(445),nn(395),nn(391),nn(409);function an(){const t=["useProgram","uResolution","SRC_ALPHA","destroy","drawBox","ONE_MINUS_SRC_ALPHA","bindBuffer","3879rWhKJN","aVertexPosition","LINK_STATUS","uLineColor","\n precision highp float;\n uniform float uLineWidth;\n uniform vec4 uRect;\n uniform vec3 uLineColor;\n uniform vec2 uResolution;\n\n\n float inBox(vec2 st, vec4 rect){\n\n vec2 bl = step(rect.xy,st);\n float pct = bl.x * bl.y;\n\n vec2 tr = step(st, rect.zw);\n pct *= tr.x * tr.y;\n\n return pct;\n }\n\n void main(void) {\n\n vec2 cur = gl_FragCoord.xy/uResolution;\n\n float xlinewidth = uLineWidth/uResolution.x;\n float ylinewidth = uLineWidth/uResolution.y;\n\n // vec4 outRect = uRect + vec4(-1.*xlinewidth/2., -1.*ylinewidth/2., xlinewidth/2., ylinewidth/2.);\n // vec4 inRect = uRect + vec4(xlinewidth/2., ylinewidth/2., -1.*xlinewidth/2., -1.*ylinewidth/2.);\n\n vec4 outRect = uRect + vec4(-1.*xlinewidth/2., -1.*ylinewidth/2., xlinewidth/2., ylinewidth/2.);\n vec4 inRect = uRect;\n\n float a = inBox(cur, outRect);\n float b = inBox(cur, inRect);\n\n gl_FragColor = mix(vec4(0., 0., 0., 0.), vec4(uLineColor.rgb, 1.0), a-b);\n\n }\n ","CLAMP_TO_EDGE","TEXTURE_WRAP_T","FRAGMENT_SHADER","BLEND","getShaderInfoLog","704NCdunX","ARRAY_BUFFER","11jCqwSl","bindTexture","uniformLocations","log","uLineWidth","linecolor","createShader","position","166075wdkeOo","662691XPdKUQ","fromValues","LINEAR","blendFunc","_loadShader","\n attribute vec4 aVertexPosition;\n void main(void) {\n gl_Position = aVertexPosition;\n }\n ","TEXTURE_WRAP_S","STATIC_DRAW","program","attachShader","TEXTURE_MIN_FILTER","deleteBuffer","_createTexture","COMPILE_STATUS","VERTEX_SHADER","vertexPosition","programInfo","ELEMENT_ARRAY_BUFFER","2OgIcod","attribLocations","getAttribLocation","uniform4f","createBuffer","pixelStorei","306212gqTUFK","deleteShader","TEXTURE_MAG_FILTER","Unable to initialize the shader program: ","createProgram","linewidth","texParameteri","uRect","5533696bRbLgI","getUniformLocation","enableVertexAttribArray","228mcWBcP","getProgramInfoLog","31126190qYTrrP","TRIANGLES","FLOAT","bufferData","buffers","2429182XtUYVt","getProgramParameter","_drawScene","resolution","uniform3f","compileShader","_initBuffers","shaderProgram","UNSIGNED_SHORT","indices","rect","uniform1f","An error occurred compiling the shaders: ","shaderSource","TEXTURE_2D","_initShaderProgram"];return(an=function(){return t})()}function hn(t,e){const s=ln();return(hn=function(t,e){return s[t-=377]})(t,e)}function cn(t){return new Promise(((e,s)=>{const i=hn;navigator[i(392)]?navigator[i(392)][i(381)]()[i(386)]((r=>{const n=i;r?r[n(389)]()[n(386)]((i=>{const o=n;if(i){const n=t[o(388)](o(395));if(n){const t=navigator[o(392)].getPreferredCanvasFormat();n[o(378)]({device:i,format:t,alphaMode:o(387)}),e({adapter:r,device:i,context:n,format:t})}else s(o(380))}else s(o(394))}))[n(396)]((t=>{s(n(399))})):s(n(383))})).catch((t=>{s(i(377))})):s(i(382))}))}function ln(){const t=["314573VndaPL",'WebGPU "adapter.requestDevice()" fail',"853515vHxgXb","199984xIvBEM",'WebGPU "navigator.gpu.requestAdapter()" fail',"configure","28522DWoalm",'WebGPU "context" create fail',"requestAdapter","WebGPU not support!!",'WebGPU "adapter" request fail is empty',"10Tufslw","335460UqypRf","then","opaque","getContext","requestDevice","1362978bMdApN","60wdKeIz","gpu","2585000aUhCPo",'WebGPU "device" request fail',"webgpu","catch","96DSlwQc"];return(ln=function(){return t})()}function dn(){const t=["RGBA","2378628TMgrjk","126XjvSRy","TEXTURE_MIN_FILTER","5369637WqAMhy","vertexShader","getProgramParameter","texture","width","bindBuffer","isInited","displayWidth","getShaderParameter","createTexture","UNSIGNED_BYTE","4wtZolN","buffer","COMPILE_STATUS","TEXTURE_WRAP_T","FLOAT","bindTexture","attachShader","1159yMOgvu","deleteBuffer","texImage2D","TEXTURE_MAG_FILTER","drawArrays","linkProgram","createShader","ARRAY_BUFFER","2497720ShECRS","enableVertexAttribArray","height","texParameteri","LINK_STATUS","getShaderInfoLog","350848aduzHX","vertexAttribPointer","550HWaLLj","displayHeight","drawingBufferHeight","deleteShader","COLOR_BUFFER_BIT","getProgramInfoLog","createBuffer","deleteProgram","NEAREST","texSubImage2D","1781601jzkWzd","program","destroy","VERTEX_SHADER","TEXTURE_2D","2436090LTPvgO","canvas","clear","33enJhkV","\n varying highp vec2 uv;\n uniform sampler2D texture;\n void main(void) {\n gl_FragColor = texture2D(texture, uv);\n }\n ","shaderSource","clearColor","\n attribute vec2 xy;\n varying highp vec2 uv;\n void main(void) {\n gl_Position = vec4(xy, 0.0, 1.0);\n // Map vertex coordinates (-1 to +1) to UV coordinates (0 to 1).\n // UV coordinates are Y-flipped relative to vertex coordinates.\n uv = vec2((1.0 + xy.x) / 2.0, (1.0 - xy.y) / 2.0);\n }\n ","render","STATIC_DRAW","deleteTexture","createProgram"];return(dn=function(){return t})()}!function(t,e){const s=hn,i=t();for(;;)try{if(279507===-parseInt(s(401))/1+parseInt(s(379))/2*(parseInt(s(397))/3)+-parseInt(s(385))/4+-parseInt(s(400))/5+parseInt(s(391))/6*(parseInt(s(398))/7)+-parseInt(s(393))/8+parseInt(s(390))/9*(parseInt(s(384))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ln);const un=pn;function pn(t,e){const s=dn();return(pn=function(t,e){return s[t-=484]})(t,e)}!function(t,e){const s=pn,i=t();for(;;)try{if(405684===parseInt(s(521))/1*(parseInt(s(537))/2)+-parseInt(s(547))/3*(parseInt(s(514))/4)+parseInt(s(529))/5+-parseInt(s(500))/6+-parseInt(s(503))/7+parseInt(s(535))/8*(parseInt(s(501))/9)+-parseInt(s(487))/10*(-parseInt(s(490))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(dn);class fn{constructor(t,e){const s=pn;this.canvas=t,this.gl=e,this[s(509)]=!1;const i=s(494),r=s(491),n=e.createShader(e[s(485)]);if(e[s(492)](n,i),e.compileShader(n),!e[s(511)](n,e[s(516)]))throw e[s(534)](n);const o=e[s(527)](e.FRAGMENT_SHADER);if(e[s(492)](o,r),e.compileShader(o),!e[s(511)](o,e[s(516)]))throw e.getShaderInfoLog(o);const a=e[s(498)]();if(e[s(520)](a,n),e[s(520)](a,o),e[s(526)](a),!e[s(505)](a,e[s(533)]))throw e[s(542)](a);e.useProgram(a);const h=e[s(543)]();e[s(508)](e[s(528)],h),e.bufferData(e[s(528)],new Float32Array([-1,-1,-1,1,1,1,1,-1]),e[s(496)]);const c=e.getAttribLocation(a,"xy");e[s(536)](c,2,e[s(518)],!1,0,0),e[s(530)](c);const l=e[s(512)]();e[s(519)](e[s(486)],l),e[s(532)](e.TEXTURE_2D,e[s(524)],e[s(545)]),e[s(532)](e[s(486)],e[s(502)],e[s(545)]),e[s(532)](e[s(486)],e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e[s(517)],e.CLAMP_TO_EDGE),this[s(548)]=a,this.buffer=h,this[s(504)]=n,this.fragmentShader=o,this[s(506)]=l}[un(484)](){const t=un;this.gl[t(544)](this[t(548)]),this.gl[t(522)](this[t(515)]),this.gl[t(497)](this[t(506)]),this.gl[t(540)](this[t(504)]),this.gl.deleteShader(this.fragmentShader),this.program=null,this[t(515)]=null,this.vertexShader=null,this.fragmentShader=null,this[t(506)]=null,this.gl=null,this[t(509)]=!1}[un(495)](t){const e=un;this.canvas[e(507)]=t[e(510)],this[e(488)][e(531)]=t[e(538)];const s=this.gl;this.isInited?s[e(546)](s[e(486)],0,0,0,s.RGBA,s[e(513)],t):(s[e(523)](s[e(486)],0,s[e(499)],s.RGBA,s[e(513)],t),this[e(509)]=!0),s.viewport(0,0,s.drawingBufferWidth,s[e(539)]),s[e(493)](1,0,0,1),s[e(489)](s[e(541)]),s[e(525)](s.TRIANGLE_FAN,0,4)}}const mn=An;function gn(){const t=["off"," and next use webgl render","447152tFzSOI","webglcontextrestored ","render","getContext","webgl","webglContextLostError","then","renderType","string","style","1100197ZLptkU","mirrorRotate","_bindContextGlEvents","destroy","5337DuIHhX","drawImage","height","top","debugWarn","webGPURender","_initContextGl2() createContextGL2 error","appendChild","debugError","17042890cvpPqQ","$videoElement","initFps","contextGl","getType","getCanvasType","filename","block","webgl2","webGPURender init success","isResize","getStreamFps","rotate","vertical","clearView","isDestroyedOrClosed","266136adwYdG"," rotateY(180deg)","webgpu","_createScreenShotCanvas","blob","webglcontextlost error and destroy webglRectRender","webglcontextlost error, getContextAttributes().stencil is false","emitError","openWebglAlignment","base64","png","width","isWebglContextLost","transform"," rotate(","getShowVideoRect","isFullResize","length","canvas","format","padding","toDataURL","webglRender","webglcontextlost error","screenshotCopyrightWatermark","webglRectRender"," rotateX(180deg)","forEach","stencil","preventDefault","deg)","canvasVideo","CommonCanvasLoader and _initContextGl createContextGL error","absolute","high","$screenshotCanvasElement","webglcontextrestored","imageSmoothingEnabled","createContextGL() version ","play","type","player","quality","704TRxhrK","initCanvasViewSize","webglcontextlost error reset and getContextAttributes().stencil is true","setStreamFps","$container","screenshotByRect","_initContextGl","_resize()","debugLog","1517156uRqpuK","_initContextGl() createContextGL error","none","bitmaprenderer","11TmBLZT","screenshotUseHighQuality","catch","_initContextGl2","_opt","split","createWebGPUContext error is ","videoInfo","proxyDestroyList","screenshotCanvasContext","display","init","left","events","6BEzCmA","push","screenshotByCurrentWatermark","5512150bOUlAh","207fryELI","createElement","context2D","isWcsWebgpu","resize","isWcsWebgl2","download","getContextAttributes","clearRect","pause","createContextGL success","CommonCanvasLoader","_initCanvasRender"];return(gn=function(){return t})()}function An(t,e){const s=gn();return(An=function(t,e){return s[t-=346]})(t,e)}!function(t,e){const s=An,i=t();for(;;)try{if(630641===-parseInt(s(431))/1+parseInt(s(394))/2+parseInt(s(445))/3*(parseInt(s(385))/4)+parseInt(s(415))/5+parseInt(s(412))/6*(-parseInt(s(441))/7)+parseInt(s(470))/8*(parseInt(s(416))/9)+-parseInt(s(454))/10*(parseInt(s(398))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(gn);class yn extends Qr{constructor(t){const e=An;super(),this[e(383)]=t;const s=document[e(417)](e(360));s[e(440)].position=e(375),s[e(440)][e(448)]=0,s[e(440)].left=0,s[e(440)][e(408)]=e(396),this[e(455)]=s,this[e(377)]=null,this[e(407)]=null,t.$container[e(452)](this[e(455)]),this.context2D=null,this[e(457)]=null,this[e(364)]=null,this[e(367)]=null,this[e(450)]=null,this.isWebglContextLost=!1,this[e(421)]=!1,this[e(419)]=!1,this[e(397)]=null,this[e(438)]=null,this[e(406)]=[],this[e(428)]()}[mn(444)](){const t=mn;super[t(444)](),this[t(377)]&&(this[t(377)].height=0,this[t(377)].width=0,this[t(377)]=null),this.screenshotCanvasContext=null,this[t(406)][t(359)]>0&&(this[t(406)][t(369)]((t=>{t&&t()})),this[t(406)]=[]),this.webglRender&&(this.webglRender[t(444)](),this[t(364)]=null),this.webglRectRender&&(this[t(367)].destroy(),this.webglRectRender=null),this[t(450)]&&(this.webGPURender[t(444)](),this[t(450)]=null),this[t(397)]&&(this[t(397)]=null),this.contextGl&&(this[t(457)]=null),this[t(418)]&&(this.context2D[t(424)](0,0,this[t(455)][t(353)],this[t(455)][t(447)]),this[t(418)]=null),this[t(438)]=null,this[t(354)]=!1,this[t(419)]=!1,this[t(421)]=!1,this[t(405)]={width:"",height:"",encType:""},this[t(455)].width=0,this[t(455)][t(447)]=0,this.player[t(389)].removeChild(this[t(455)]),this.$videoElement=null,this[t(409)]=!1,this[t(429)]()}[mn(473)](){const t=mn,e=document[t(417)](t(360));this[t(377)]=e,this.screenshotCanvasContext=e[t(434)]("2d"),this.player[t(402)][t(399)]&&(this[t(407)][t(379)]=!0,this.screenshotCanvasContext[t(379)]&&(this.screenshotCanvasContext.imageSmoothingQuality=t(376)))}_initContext2D(){const t=mn;let e=arguments[t(359)]>0&&void 0!==arguments[0]?arguments[0]:{};this[t(418)]=this[t(455)].getContext("2d",e)}_initContextGl(){const t=mn;if(this[t(383)][t(411)],this[t(457)]=Oe(this[t(455)]),!this[t(457)])throw this[t(383)][t(453)](t(427),t(395)),new Error(t(374));this[t(443)](),this.webglRender=new Mr(this[t(457)],this[t(383)][t(402)][t(350)])}[mn(401)](){const t=mn;if(this.contextGl=Ue(this[t(455)]),this.contextGl){this[t(443)](2);try{this.webglRender=new fn(this[t(455)],this.contextGl)}catch(e){this[t(383)][t(453)](t(427),"create webgl2Render error is "+e+" and next use context2d.draw render"),this[t(457)]=null,this[t(364)]=null,this._initContext2D()}}else this.player.debugError(t(427),t(451))}[mn(443)](){const t=mn;let e=arguments[t(359)]>0&&void 0!==arguments[0]?arguments[0]:1;const{proxy:s}=this[t(383)].events,i=s(this.$videoElement,"webglcontextlost",(s=>{const i=t;s[i(371)](),this[i(383)].debugError(i(373),i(365),s),this[i(354)]=!0,this[i(364)]&&(this[i(383)][i(393)]("CommonCanvasLoader","webglcontextlost error and destroy webglRender"),this[i(364)][i(444)](),this[i(364)]=null),this[i(367)]&&(this[i(383)][i(393)](i(427),i(347)),this[i(367)][i(444)](),this[i(367)]=null),this[i(457)]=null,setTimeout((()=>{const t=i;if(this.player[t(393)](t(427),t(380)+e),1===e?this[t(457)]=Oe(this.$videoElement):2===e&&(this.contextGl=Ue(this.$videoElement)),this[t(383)].debugLog(t(427),t(426)),this[t(457)]&&this[t(457)][t(423)]){const s=this[t(457)][t(423)]();s&&s[t(370)]?(1===e?this.webglRender=new Mr(this[t(457)],this[t(383)][t(402)].openWebglAlignment):2===e&&(this[t(364)]=new fn(this[t(455)],this[t(457)])),this[t(354)]=!1,this[t(383)][t(393)](t(427),t(387))):(this[t(383)][t(453)](t(427),"webglcontextlost error, getContextAttributes().stencil is false"),this[t(383)][t(349)](U[t(436)]))}else this[t(383)].debugError(t(427),t(348)),this.player.emitError(U.webglContextLostError)}),500)})),r=s(this[t(455)],t(378),(e=>{const s=t;e[s(371)](),this.player[s(393)](s(427),s(432),e)}));this[t(406)][t(413)](i,r)}_initContextGPU(){const t=mn;cn(this[t(455)])[t(437)]((e=>{const s=t;this.player[s(469)]()||(e?(this[s(450)]=new jr(e),this[s(383)][s(393)](s(427),s(463))):(this[s(383)][s(449)]("CommonCanvasLoader","webGPURender init failed because context is null and next use webgl render"),this[s(438)]=X.webgl,this[s(391)]()))}))[t(400)]((e=>{const s=t;this[s(383)].isDestroyedOrClosed()||(this[s(383)][s(449)](s(427),s(404)+e+s(430)),this[s(438)]=X[s(435)],this[s(391)]())}))}[mn(386)](){const t=mn;this[t(455)][t(440)].display=t(461),this[t(455)][t(353)]=this[t(405)][t(353)],this.$videoElement[t(447)]=this[t(405)][t(447)],this[t(420)]()}screenshot(t,e,s,i){const r=mn;t=t||je(),i=i||j.download;let n=.92;!at[e]&&j[e]&&(i=e,e=r(352),s=void 0),typeof s===r(439)&&(i=s,s=void 0),void 0!==s&&(n=Number(s));const o=at[e]||at[r(352)],a=this.$videoElement[r(363)](o,n);if(i===j[r(351)])return a;{const e=Ne(a);if(i===j[r(346)])return e;if(i===j.download){const s=o[r(403)]("/")[1];rn(e,t+"."+s)}}}screenshotWatermark(t){return new Promise(((e,s)=>{const i=An;Ms(t)&&(t={filename:t}),(t=t||{}).width=this[i(405)][i(353)],t[i(447)]=this.videoInfo[i(447)],t.filename=t[i(460)]||je(),t.format=t[i(361)]?at[t.format]:at[i(352)],t[i(384)]=Number(t[i(384)])||.92,t.type=t[i(382)]||j.download;const r=this[i(455)].toDataURL(t[i(361)],t[i(384)]),n=this[i(383)][i(402)].screenshotUseHighQuality;Es(r,t,n)[i(437)]((s=>{const n=i;if(t[n(382)]===j[n(351)])e(r);else{const i=Ne(s);if(t[n(382)]===j.blob)e(i);else if(t.type===j.download){e();const s=t[n(361)][n(403)]("/")[1];rn(i,t.filename+"."+s)}}}))[i(400)]((t=>{s(t)}))}))}[mn(366)](t){return new Promise(((e,s)=>{const i=An;if(Ms(t)){(t=(t={filename:t})||{}).width=this[i(405)][i(353)],t.height=this.videoInfo[i(447)],t[i(460)]=t.filename||je(),t[i(361)]=t[i(361)]?at[t.format]:at[i(352)],t[i(384)]=Number(t[i(384)])||.92,t[i(382)]=t[i(382)]||j[i(422)];const r=this.$videoElement[i(363)](t[i(361)],t[i(384)]),n=this[i(383)][i(402)][i(399)];Ts(r,t,n)[i(437)]((s=>{const n=i;if(t[n(382)]===j[n(351)])e(r);else{const i=Ne(s);if(t[n(382)]===j[n(346)])e(i);else if(t[n(382)]===j[n(422)]){e();const s=t[n(361)][n(403)]("/")[1];rn(i,t.filename+"."+s)}}}))[i(400)]((t=>{s(t)}))}}))}[mn(414)](t){}[mn(390)](t){const e=mn;!this[e(377)]&&this[e(473)]();const s=this[e(455)];let i=this[e(377)];i[e(353)]=parseInt(t[e(353)],10),i[e(447)]=parseInt(t[e(447)],10),this[e(407)][e(446)](s,t.x,t.y,i[e(353)],i[e(447)],0,0,i[e(353)],i.height);const r=at.png,n=i.toDataURL(r,.92);return this[e(407)][e(424)](0,0,i[e(353)],i[e(447)]),i[e(353)]=0,i.height=0,n}[mn(433)](){}[mn(468)](){super[mn(468)]()}[mn(381)](){}[mn(425)](){}_resize(){const t=mn;this[t(383)][t(393)](t(373),t(392));const e=this[t(383)]._opt,s=this[t(383)][t(357)]();let i=s[t(353)],r=s[t(447)],n=this[t(455)][t(353)],o=this[t(455)].height;const a=e[t(466)];let h=(i-n)/2,c=(r-o)/2;(270===a||90===a)&&(n=this[t(455)][t(447)],o=this[t(455)][t(353)]);const l=i/n,d=r/o;let u=l>d?d:l;ci(e[t(464)])&&l!==d&&(u=l+","+d),e[t(358)]&&(u=l>d?l:d);let p="scale("+u+")";e.mirrorRotate===t(396)&&a&&(p+=t(356)+a+t(372)),"level"===e.mirrorRotate?p+=t(471):e[t(442)]===t(467)&&(p+=t(368)),this[t(455)].style.height=this.videoInfo[t(447)]+"px",this[t(455)][t(440)][t(353)]=this[t(405)].width+"px",this.$videoElement.style[t(362)]="0",this[t(455)][t(440)][t(355)]=p,this[t(455)][t(440)][t(410)]=h+"px",this[t(455)].style[t(448)]=c+"px"}[mn(456)](){}[mn(388)](t){}[mn(465)](){return 25}[mn(458)](){return f[mn(360)]}[mn(459)](){const t=mn;let e=X.webgl;return this[t(438)]===X.webgpu?e=X[t(472)]:this[t(438)]===X.canvas&&(e=X[t(360)]),this[t(421)]?e=X[t(462)]:this[t(419)]&&(e=X[t(472)]),e}}const bn=Sn;function vn(){const t=["42NGKrwv","_initWebglRenderForWCS","aiObjectDetectInterval","doAddAiContentToWatermark","init","doRender webgpu render and error: ","destroy","drawDom","then","prevAiOcclusionDetectTime","$video","TAG_NAME","imageDetectActive","debugError","webGPURender","renderType","_initContextGl","render","isWebglContextLost","check","CanvasVideo","px Arial","yuvList","webgpu","webcodecs","mseUseCanvasRender","text"," and next use webgl render","doRender() and webgl context is lost","1178UXoFMK","fillText","clearView","333628eGjXOn","2050110RRvOYL","forEach","lineWidth","useMSE","_initContext2D","isDestroyedOrClosed","buffer","occlusionDetectActive","context2D","fontSize","useWebGPU","isOldHls","COLOR_BUFFER_BIT","renderYUV","I420","player","occlusionDetector","videoFrame","isContextLost"," and error: ","catch","useWebCanvas","35095730emKclo","toString","offscreen","_supportOffscreen","webglRectRender","currentTime","debugLog","_initContextGPU","webgl","canvas","faceDetectActive","$videoElement","rect","11664944njpHAB","tempContentList","faceDetector","6JgCZvG","output","createWebGPUContext error is ","prevAiFaceDetectTime","updateCurrentPts","clearRect","height","4829877VAMzZE","aiImageDetectResult","1366HIFVVi","webGPURender init success","_initTempTextCanvas","aiOcclusionDetectInterval","textBaseline","useCanvasRender","drawImage","doAddContentToWebGlCanvas","60263rPqZvF","doRender() and ai image detect result type is ","debugWarn","bitmaprenderer","doRender webgpu render is not init","getContext","imageDetector","videoInfo","width","prevAiObjectDetectTime","tempTextCanvasCtx","isWcsWebgpu","length","_opt","clear","#008000"," and drop","emit","top","useOffscreen","startRender","color","hls","CanvasVideoLoader","webrtc","transferFromImageBitmap","useWCS","tempTextCanvas","doRender","wcsUseWebgl2Render","type","_initCanvasRender","webGPURender init failed because context is null and next use webgl render","webglRender","contextGl","mse","doRender() and webcodecs context is lost"];return(vn=function(){return t})()}function Sn(t,e){const s=vn();return(Sn=function(t,e){return s[t-=486]})(t,e)}!function(t,e){const s=Sn,i=t();for(;;)try{if(733047===-parseInt(s(598))/1*(-parseInt(s(524))/2)+-parseInt(s(569))/3*(parseInt(s(601))/4)+-parseInt(s(602))/5+-parseInt(s(515))/6*(parseInt(s(532))/7)+-parseInt(s(512))/8+-parseInt(s(522))/9+parseInt(s(499))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(vn);class wn extends yn{constructor(t){const e=Sn;super(t),this.TAG_NAME="CanvasVideo",this[e(591)]=[],this[e(559)]=null,this[e(542)]=null,this[e(492)][e(505)](e(589),e(573))}async[bn(575)](){const t=bn;super[t(575)](),this[t(591)]=[],this.tempTextCanvas&&(this[t(542)][t(520)](0,0,this.tempTextCanvas[t(540)],this[t(559)][t(521)]),this[t(559)][t(540)]=0,this.tempTextCanvas.height=0,this[t(559)]=null),this[t(492)].debugLog(t(555),"destroy")}[bn(563)](){const t=bn;this[t(492)][t(545)][t(558)]&&!this[t(502)]()?(this[t(584)]=X[t(593)],this[t(492)][t(545)][t(487)]?cn(this[t(510)])[t(577)]((e=>{const s=t;this[s(492)][s(607)]()||(e?(this.webGPURender=new jr(e),this[s(543)]=!0,this[s(492)][s(505)](this[s(580)],s(525))):(this[s(492)][s(534)](this[s(580)],s(564)),this._initWebglRenderForWCS()))}))[t(497)]((()=>{const s=t;this.player[s(607)]()||(this[s(492)].debugWarn(this[s(580)],s(517)+e+s(596)),this[s(570)]())})):this._initWebglRenderForWCS()):this[t(492)]._opt[t(605)]&&this.player[t(545)][t(594)]?(this[t(584)]=X[t(567)],this._initContext2D()):this[t(492)][t(488)]()&&this[t(492)][t(545)][t(529)]?(this[t(584)]=X[t(554)],this._initContext2D()):this[t(492)].isWebrtcH264()&&this[t(492)][t(545)].webrtcUseCanvasRender?(this[t(584)]=X.webrtc,this[t(606)]()):this[t(502)]()?(this[t(584)]=X.offscreen,this._bindOffscreen()):this[t(492)][t(545)][t(487)]?(this[t(584)]=X[t(592)],this[t(506)]()):this[t(492)][t(545)][t(498)]?(this.renderType=X.canvas,this._initContext2D()):(this[t(584)]=X[t(507)],this[t(585)]())}[bn(570)](){const t=bn;this[t(492)][t(545)][t(561)]&&pi()?(this._initContextGl2(),this[t(565)]&&(this.isWcsWebgl2=!0)):this[t(606)]()}[bn(502)](){const t=bn;return function(t){const e=oi;return typeof t[e(371)]===e(579)}(this[t(510)])&&this.player._opt[t(551)]}_bindOffscreen(){this[bn(535)]=this.$videoElement.getContext("bitmaprenderer")}[bn(586)](t){const e=bn;this.yuvList.push(t),this[e(552)]()}[bn(552)](){const t=bn;for(;!(this.yuvList.length<=0);){const e=this[t(591)].shift();this[t(560)](e)}}[bn(560)](t){const e=bn;if(this.renderType!==X.mse){const s={ts:t.ts||0,fps:!0};this[e(492)].updateStats(s)}switch(this.renderType){case X[e(501)]:this[e(535)][e(557)](t[e(608)]);break;case X.webgl:case X[e(592)]:case X[e(508)]:if(this[e(587)])return void this[e(492)][e(534)](e(555),e(597));let s=t[e(516)];if(this[e(492)][e(509)]&&this[e(492)].ai&&this[e(492)].ai[e(514)]){null===this[e(518)]&&(this[e(518)]=je());const i=je();i-this[e(518)]>=this[e(492)][e(545)].aiFaceDetectInterval&&(s=this.player.ai[e(514)].detect({width:this[e(510)][e(540)],height:this[e(510)].height,data:t[e(516)],ts:t.ts||0}),this[e(518)]=i)}if(this[e(492)].objectDetectActive&&this.player.ai&&this[e(492)].ai.objectDetector){null===this[e(541)]&&(this.prevAiObjectDetectTime=je());const i=je();i-this[e(541)]>=this.player._opt[e(571)]&&(s=this[e(492)].ai.objectDetector.detect({width:this[e(510)][e(540)],height:this.$videoElement[e(521)],data:t[e(516)],ts:t.ts||0}),this.prevAiObjectDetectTime=i)}if(this.player[e(609)]&&this.player.ai&&this[e(492)].ai[e(493)]){null===this[e(578)]&&(this[e(578)]=je());const s=je();if(s-this[e(578)]>=this[e(492)][e(545)][e(527)]){const i=this.player.ai[e(493)][e(588)]({width:this[e(510)][e(540)],height:this.$videoElement[e(521)],data:t[e(516)]});this[e(578)]=s,i&&this[e(492)][e(549)](M.aiOcclusionDetectResult,{ts:t.ts||0})}}if(this[e(492)][e(581)]&&this[e(492)].ai&&this[e(492)].ai[e(538)]){const s=this[e(492)].ai.imageDetector[e(588)]({width:this[e(510)][e(540)],height:this.$videoElement.height,data:t[e(516)]});if(s&&s.data&&(this[e(492)].emit(M[e(523)],{type:s.type,ts:t.ts||0}),this[e(492)][e(545)].aiImageDetectDrop))return void this[e(492)][e(505)](e(555),e(533)+s[e(562)]+e(548))}if(this[e(584)]===X.webgpu)try{if(!this[e(583)])return void this[e(492)][e(534)](e(555),e(536));this[e(583)][e(490)](this[e(510)].width,this[e(510)][e(521)],s)}catch(t){this[e(492)][e(582)](e(555),e(574)+t[e(500)]())}else if(this[e(584)]===X[e(507)])try{this[e(565)][e(490)](this[e(510)][e(540)],this.$videoElement.height,s)}catch(t){this[e(492)].debugError(e(555),"doRender webgl render context is lost "+(this[e(566)]&&this[e(566)][e(495)]())+e(496)+t[e(500)]())}else if(this.renderType===X[e(508)]){const i=_s(s,{format:e(491),codedWidth:this[e(539)][e(540)],codedHeight:this[e(539)][e(521)],timestamp:1e3*t.ts});this[e(610)][e(530)](i,0,0,this[e(510)].width,this[e(510)][e(521)]),qs(i)}break;case X[e(593)]:this.webGPURender?(this[e(583)][e(586)](t[e(494)]),qs(t.videoFrame)):this[e(565)]?(this.webglRender.render(t[e(494)]),qs(t[e(494)])):this.context2D?(this.context2D.drawImage(t[e(494)],0,0,this[e(510)][e(540)],this[e(510)].height),qs(t.videoFrame)):this[e(492)][e(534)](e(555),e(568));break;case X[e(567)]:this[e(610)][e(530)](t.$video,0,0,this[e(510)].width,this[e(510)][e(521)]);break;case X[e(554)]:this[e(610)][e(530)](t.$video,0,0,this.$videoElement[e(540)],this[e(510)][e(521)]);break;case X[e(556)]:this[e(610)][e(530)](t.$video,0,0,this[e(510)][e(540)],this.$videoElement[e(521)])}let s=t.ts||0;this[e(584)]===X[e(567)]&&(s=parseInt(1e3*t[e(579)][e(504)],10)+(this[e(492)].mseDecoder.firstRenderTime||0)),this[e(492)][e(519)](s),this.doAddContentToWatermark(),this[e(572)]()}[bn(600)](){const t=bn;switch(super[t(600)](),this[t(584)]){case X.offscreen:(function(t,e){const s=Me,i=document[s(553)]("canvas");i[s(401)]=t,i[s(417)]=e;const r=window[s(610)](i,0,0,t,e);return i[s(401)]=0,i.height=0,r})(this.$videoElement[t(540)],this[t(510)][t(521)])[t(577)]((e=>{this[t(535)].transferFromImageBitmap(e)}));break;case X.webgl:this[t(566)].clear(this[t(566)][t(489)]);break;case X[t(592)]:this[t(583)][t(546)]();break;case X[t(508)]:this[t(610)].clearRect(0,0,this[t(510)][t(540)],this[t(510)].height);break;case X[t(593)]:this[t(583)]?this[t(583)][t(546)]():this[t(566)]?this[t(566)][t(546)](this[t(566)].COLOR_BUFFER_BIT):this.context2D&&this[t(610)].clearRect(0,0,this[t(510)].width,this[t(510)].height);break;case X[t(567)]:this[t(610)][t(520)](0,0,this[t(510)][t(540)],this[t(510)][t(521)]);break;case X[t(554)]:this.context2D[t(520)](0,0,this.$videoElement[t(540)],this.$videoElement[t(521)]);break;case X.webrtc:this.context2D[t(520)](0,0,this[t(510)][t(540)],this[t(510)][t(521)])}}[bn(526)](){const t=bn;this.tempTextCanvas=document.createElement("canvas"),this[t(542)]=this[t(559)][t(537)]("2d"),this[t(559)][t(540)]=600,this[t(559)][t(521)]=20}doAddContentToCanvas(){const t=bn;this[t(513)][t(544)]>0&&this[t(610)]&&function(t){const e=Me;let{ctx:s,list:i}=t;s[e(410)](),(i||[])[e(611)]((t=>{const i=e;"text"===t[i(383)]?(s[i(600)]=(t[i(364)]||12)+i(640),s[i(492)]=t[i(645)]||"green",s[i(498)](t[i(435)],t.x,t.y)):t[i(383)]===i(451)&&(s.strokeStyle=t[i(645)]||i(537),s.lineWidth=t[i(422)]||2,s[i(429)](t.x,t.y,t[i(401)],t[i(417)]))})),s.restore()}({ctx:this[t(610)],list:this[t(513)]})}[bn(531)](){const t=bn;this[t(513)][t(544)]>0&&this.contextGl&&this[t(503)]&&this[t(513)][t(603)]((e=>{const s=t,i=e.x,r=e.y;if(e[s(562)]===s(511)){const t=e.width,n=e[s(521)],o=function(t){const e=Me;return[parseInt(t[e(509)](1,3),16)/255,parseInt(t[e(509)](3,5),16)/255,parseInt(t[e(509)](5,7),16)/255,1]}(e[s(553)]||s(547)),a=e[s(604)]||4;if(!t||!n)return;this.webglRectRender.drawBox({x:i,y:r,width:t,height:n,lineColor:o,lineWidth:a,canvasWidth:this[s(510)][s(540)],canvasHeight:this[s(510)][s(521)]})}else if(e[s(562)]===s(595)){const t=e[s(595)]||"";if(!t)return;const n=e[s(486)]||20,o=e[s(553)]||s(547);!this.tempTextCanvas&&this[s(526)](),this[s(542)][s(520)](0,0,this[s(559)].width,this[s(559)][s(521)]),this[s(542)].font=n+s(590),this[s(542)].fillStyle=o,this[s(542)][s(528)]=s(550),this.tempTextCanvasCtx[s(599)](t,0,0),this[s(565)][s(576)](this[s(510)][s(540)],this.$videoElement.height,i,r,this[s(559)])}}))}}function En(t,e){const s=Cn();return(En=function(t,e){return s[t-=126]})(t,e)}function In(t,e){const s=En;return t[s(152)][s(142)](e)}function Tn(t,e){const s=En;return t[s(152)][s(159)](e)}function kn(t,e){const s=En;return t.classList[s(143)](e)}function _n(t,e){const s=En;return e instanceof Element?t[s(149)](e):t[s(151)](s(174),String(e)),t[s(157)]||t[s(170)]}function Cn(){const t=["getBoundingClientRect","afterbegin","querySelector","top","from","add","contains","querySelectorAll","clientHeight","documentElement","8798436kxYNmH","data-balloon-pos","appendChild","setAttribute","insertAdjacentHTML","classList","6PbMVab","height","1025450shsiyy","1238748iwxyhN","lastElementChild","2yjkNKe","remove","removeChild","filter","max","parentNode","left","style","12FQOkGT","length","52900yPiFnz","26832256qVSKBI","lastChild","innerHeight","innerWidth","clientWidth","beforeend","5032800vwdHdi","width","parentElement","8fWIgvY","forEach","composedPath","children","indexOf","firstChild","getComputedStyle","keys","4361007ihxLiO"];return(Cn=function(){return t})()}function Rn(t,e,s){return t&&t[En(165)]&&vs(e)&&(t.style[e]=s),t}function Dn(t,e){const s=En;return t.composedPath&&t[s(130)]()[s(132)](e)>-1}function Ln(t){const e=En;let s=!1;return t&&t.parentNode&&(t[e(163)].removeChild(t),s=!0),s}!function(t,e){const s=En,i=t();for(;;)try{if(668141===-parseInt(s(156))/1*(parseInt(s(158))/2)+parseInt(s(153))/3*(parseInt(s(168))/4)+parseInt(s(155))/5*(-parseInt(s(166))/6)+-parseInt(s(136))/7*(parseInt(s(128))/8)+parseInt(s(147))/9+-parseInt(s(175))/10+parseInt(s(169))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Cn);const xn=Bn;function Pn(){const t=["getMseMineType","supportVideoFrameCallbackHandle","fixMobileAutoFullscreen","_getBufferStore","updateCurrentPts","prevAiOcclusionDetectTime","_replay(webrtc H264) then but not playing and retry play times is ","write","display"," and drop","floor","webkitDecodedFrameCount","doAddAiContentToWatermark","eventListenList","video","src"," and delay is "," and message is ","left","1000YmWBOg","level","toString","deg)","getVideoPlaybackQuality","videoRenderSupportScale","toDataURL","drawImage","data","isMSECurrentMoreThanBufferedPause","none"," set playbackRate is ","videoElementPlayingFailed","getVideoBufferTimeRange","base64","progress","stop","handleRender","video.buffered is empty","isPlayer","_mseWorkerData","_replay","top","screenshotWatermark","blur(0px)","loadedmetadata","position","videoBufferDelay","transform","geLoadedTime","2769291nCJXhU","_opt","removeLoadingBgImage","451TObqyZ","string","currentTime","videoBuffer","type","checkSourceBufferStore","8004888gJUoOs","objectDetector","TAG_NAME","render() error, video is paused and readyState is ","encTypeCode","waiting","playVodVideoSeekingByMse","render() video is paused and replay success","videoStart","download"," ,currentTime is ","getVideoBufferRangeList","firstRenderTime"," < 0 and check video is paused : ","name","waiting and currentTime is ","_detectAndFixStuckPlayback","backdropFilter"," and currentTime is ","undefined","isRenderRetryPlayingTimes","filename","webkit-playsinline","videoDecoderInitializationFailed","prevAiFaceDetectTime","videoWidth","playsinline","isMseDecoderUseWorker","totalVideoFrames","_isNeedAddBackDropFilter","destroy","I420","removeChild","screenshotCopyrightWatermark","ratechange","imageDetectActive","aiImageDetectResult","faceDetectActive","Video","_play then but not playing and retry play and isRetryPlayingTimes is ","updateStats","useVideoPlayAudio","close","objectDetectActive","then","split","updateVideoTimestamp","decoderWorker","isFullResize","_delayEmitVodVideoWaitingInterval","indexOf","max","doAddContentToWatermark","_play","$videoElement","clearVisibilityChangePlayTimeout"," ,seek to ","trackGenerator","setRate","_getPlaybackRate","videoFrameCallback() and isDestroyedOrClosed and return"," ,canplayReceived is ","_getVideoReadyState","detect","canplay and video is paused and try to play","getVideoBufferLastTime",", emit error and use canvas render","canplay","_clearDelayEmitVodVideoWaiting","video playback Rate change"," and current time is "," rotate(","corruptedVideoFrames","stringify","mediaTime","play","render() and ai occlusion detect result is true","screenshot failed, video is not ready","canplay and video is paused and isMSECurrentMoreThanBufferedPause is "," and emit error to use canvas render","isWebrtcH264","vwriter","videoFrameCallback","mseDecoderUseWorker","_checkVodVideoWaiting and player is destroyed or closed and return","removeAttribute","height"," - current is ","screenshotUseHighQuality","29038640giPnSD","bind","mseDecoder","debugWarn","16DtrDHq","getType","objectFit","_checkVodVideoWaiting","paused","_replay then but not playing and retry play times is ","wasmUseVideoRenderError","canplay and isPlayVodUseMSE an isPaused , next call $videoElement.play() success","_detectAndFixStuckPlayback() set detectAndFixStuckPlaybackStartTime is ","videoHeight"," and retry play","isOldHls","fixMobileAutoFullscreen and isIOS ","format","30712NsupEM","render","$container","replayTimeout","visibilityChangePlayTimeout","playVodWaiting","clearReplayTimeout"," to ","_detectAndFixStuckPlayback() and isStalled is ","off"," ,videoReadyState is ","render() and ai image detect result type is ","aiOcclusionDetectInterval","_play error and player is isDestroyedOrClosed and return","vertical","stalled","2338dwpfcJ","Mse Mine Type: ","screenshotByCurrentWatermark"," and emit error","getHasInit","on error","not support requestVideoFrameCallback and use timeupdate event to update stats","length","h264","canplay and video is paused and isMSEPlaybackRateChangePause is ","isPaused","_handleUpdatePlaybackRate","isUseHls265UseMse","isRetryPlaying","videoElementPlayingFailedForWebrtc"," is ","requestVideoFrameCallback","_removeProgressProxyDestroy()","appendChild","debugLog","initCanvasViewSize","isDestroyedOrClosed","resize","forEach",", retry times is ","emit","getWriter","mseUseCanvasRender","writable","check","audio","getDuration","imageDetector"," and timeout","canplayReceived","translateZ(0)","rate","_getVideoCurrentTime","checkSourceBufferDelay","isRetryPlayingTimes","end","catch","isMSEPlaybackRateChangePause","canplay and isPlayVodUseMSE an isPaused , next call $videoElement.play()","getLastBufferDelayEndTime"," so next try to play"," = ","style","ended","_cancelVideoFrameCallback","videoFrame","getLoadedPercent","clearCheckVideoCanplayTimeout","push","occlusionDetector","isRenderRetryPlaying","faceDetector","_canScreenshot","mediaStream","_resize","_resize()","screenshotCanvasContext","audioTrackGenerator","_checkVodVideoWaitingInterval","code","canplay and isPlayVodUseMSE and isEnded","Video Info: ","visibilityChange is true and lastTime is ","cancelVideoFrameCallback","imageSmoothingQuality","setAttribute","getPlaybackQuality","droppedVideoFrames","$screenshotCanvasElement","aiObjectDetectInterval","_checkVodVideoWaiting and currentTime is ","imageSmoothingEnabled","play and readyState: ","bindMediaStream","srcObject","timeupdate","checkVideoCanplayTimeout and video is not playing and buffer store is ",",\n e.message is ","png","progressProxyDestroy","buffered","Error Code ","true","handleUpdatePlaybackRate and buffered is ","mirrorRotate","clearRect","error","Details: ","pauseDelayTimeout","blob","clear","visibilityChange","detectAndFixStuckPlaybackStartTime","width","emit playVodWaiting","videoInfo","readyState","player"," and isAndroid ","_delayEmitVodVideoWaitingInterval and player is destroyed or closed and return","_times","isPlayVodUseMSE","_play error render() error, video is paused and replay error and\n e.name is "," rotateY(180deg)","getContext","isEnded","useMSE","x5-video-player-type","_createScreenShotCanvas","muted"," , try to seek ","isMSENotSupportAudioFormat","quality","playbackRate","isAliyunRtc","598266xNOQSI"," and current is ","playVod","seeked","output","fixChromeVideoFlashBug","noposter","_clearCheckVodVideoWaiting","_play error","playVodCanplay","_cancelVideoFrameCallback() cancelVideoFrameCallback","_play error and\n e.name is ","checkVideoCanplayTimeout","null","isUseMSE","clearPauseDelayTimeout","isPlaying","waiting and isDestroyedOrClosed,so return","code is ","mseWaitVideoCanplayTimeout","getBufferMaxDelayTime","render and this.vwriter is null","clearView","prevAiObjectDetectTime","_detectAndFixStuckPlayback() and video is stuck and currentTime is ","screenshotByRect failed, video is not ready and stats is ","poster","getVideoBufferDelayTime"," and startTime is ","pause","support requestVideoFrameCallback and use videoFrameCallback","getShowVideoRect","getDecodePlaybackRate","querySelector","message",",\n e.message is ","block","aiFaceDetectInterval","isPause","debugError","contain","h5-page","getCurrentTime","absolute","disablePictureInPicture","canplay and isDestroyedOrClosed,so return","emitError","events","webkitDroppedFrameCount","playVodTimeCache","_startVideoFrameCallback","5157565cWiCmo","_removeProgressProxyDestroy","mediaSourceBufferedIsZeroError","_delayPlay"," and isDestroyedOrClosed is ","start","aiImageDetectDrop","_play success","isCurrentTimeInBufferEnd","awriter","load","_delayEmitVodVideoWaiting"];return(Pn=function(){return t})()}function Bn(t,e){const s=Pn();return(Bn=function(t,e){return s[t-=305]})(t,e)}!function(t,e){const s=Bn,i=t();for(;;)try{if(809880===parseInt(s(379))/1*(-parseInt(s(508))/2)+-parseInt(s(628))/3+-parseInt(s(492))/4*(parseInt(s(346))/5)+parseInt(s(385))/6+-parseInt(s(315))/7*(parseInt(s(478))/8)+parseInt(s(376))/9+parseInt(s(474))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Pn);class Mn extends Qr{constructor(t){const e=Bn;super(),this[e(610)]=t,this[e(387)]=e(423);const s=document.createElement("video");s[e(622)]=!0,s[e(308)]=!0,Ze()&&(s[e(654)]=e(634)),s[e(555)][e(372)]=e(307),s[e(555)][e(368)]=0,s[e(555)][e(345)]=0,s[e(555)][e(335)]=e(356),this[e(318)]=!1,t[e(494)][e(526)](s),this[e(439)]=s,this[e(581)]=null,this[e(569)]=null,this[e(566)]=null,this[e(466)]=null,this[e(324)]=null,this.trackGenerator=null,this.audioTrackGenerator=null,this[e(633)](),this[e(329)](),this[e(340)]=[],this[e(563)]=!1,this[e(405)]=0,this[e(521)]=!1,this[e(547)]=0,this[e(542)]=!1,this[e(592)]=null,this[e(640)]=null,this.visibilityChangePlayTimeout=null,this[e(601)]=null,this[e(495)]=null,this[e(605)]=null;const i=fi();this[e(328)]=null,this[e(571)]=null,this[e(434)]=null;const{proxy:r}=this.player[e(311)],n=r(this[e(439)],"canplay",(()=>{const t=e;if(this[t(610)].isDestroyedOrClosed())this[t(610)][t(527)](this[t(387)],t(309));else if(this[t(610)][t(527)](this[t(387)],t(452)),this.canplayReceived=!0,this[t(610)][t(614)]()){if(this[t(610)][t(630)][t(618)]())return void this[t(610)][t(527)](this[t(387)],t(573));this[t(453)](),this._clearCheckVodVideoWaiting(),this[t(610)][t(533)](M[t(637)]),this[t(518)]()&&(this[t(610)][t(527)](this[t(387)],t(551)),this[t(439)]&&this.$videoElement.play().then((()=>{const e=t;this[e(610)][e(527)](this.TAG_NAME,e(485)),this[e(314)]()})))}else this[t(318)]?(this[t(560)](),this._play()):this[t(439)].paused&&(this[t(610)][t(550)]?(this[t(610)][t(527)](this[t(387)],t(517)+this[t(610)][t(550)]+t(553)),this.player.isMSEPlaybackRateChangePause=!1,this[t(438)]()):this[t(610)][t(355)]?(this[t(610)][t(527)](this[t(387)],t(463)+this[t(610)].isMSECurrentMoreThanBufferedPause+t(553)),this[t(610)][t(355)]=!1,this[t(438)]()):(this[t(610)][t(477)](this[t(387)],t(449)),this[t(438)]()))})),o=r(this[e(439)],e(390),(()=>{const t=e;this[t(610)].isDestroyedOrClosed()?this.player[t(527)](this.TAG_NAME,t(645)):(this.player[t(527)](this[t(387)],t(400)+this[t(306)]()),this.player[t(614)]()&&ci(this[t(610)][t(476)][t(323)]())&&(this[t(326)](),this[t(481)]()))})),a=r(this[e(439)],e(371),(()=>{const t=e;this[t(610)].debugLog(this[t(387)],t(371))})),h=r(this[e(439)],e(588),(s=>{const r=e;if(!this[r(610)].isDestroyedOrClosed()){if(ci(i)){const e=parseInt(1e3*this.getCurrentTime(),10);if(t.isWebrtcH264()||this.player.isOldHls()||this[r(610)].isAliyunRtc())this.player[r(533)](M.timeUpdate,e),t[r(363)](),t[r(425)]({fps:!0,ts:e,dts:e}),this.player.updateCurrentPts(e);else if(hi(this[r(610)][r(377)].useMSE)&&ci(this.player[r(377)][r(535)]))if(this[r(610)][r(476)]){let t=parseInt(1e3*this.getCurrentTime(),10)+(this.player[r(476)].firstRenderTime||0);this[r(610)][r(331)](t)}else if(this[r(610)][r(377)][r(468)]){let t=parseInt(1e3*this[r(306)](),10)+(this[r(610)]._mseWorkerData.firstRenderTime||0);this[r(610)][r(331)](t)}this[r(437)]()}this[r(610)][r(412)]()&&(this.player[r(432)][r(431)](this[r(306)]()),this._handleUpdatePlaybackRate())}})),c=r(this.$videoElement,e(599),(t=>{const s=e;if(!this[s(439)][s(599)])return void this[s(610)][s(477)](this.TAG_NAME,s(513),t);let i={};if(this[s(610)][s(642)]()&&(i=this[s(610)][s(327)]()),this[s(610)][s(667)](this.TAG_NAME,s(594)+this[s(439)].error.code+" "+Tt[this[s(439)].error[s(572)]]+"; "+s(600)+this[s(439)][s(599)].message+"; "+s(574)+JSON[s(458)](this[s(608)])+"; "+s(509)+i[s(341)]+"; "),this[s(610)][s(642)]()){this[s(439)][s(599)][s(572)];const t=this.$videoElement.error.message;-1!==t[s(435)](kt[s(408)])?this[s(610)].isMSEVideoDecoderInitializationFailedNotSupportHevc=!0:-1!==t[s(435)](kt.audioDecoderError)?this[s(610)].isMSEAudioDecoderError=!0:-1!==t[s(435)](kt.notSupportAudioFormat)&&(this.player[s(624)]=!0)}this[s(610)].isHlsCanVideoPlay()})),l=r(this[e(439)],e(507),(()=>{this[e(401)](!0)}));if(this[e(592)]=r(this[e(439)],"progress",(()=>{this[e(401)]()})),this[e(340)][e(561)](n,o,h,c,a,l),this.player[e(642)]()){const t=r(this[e(439)],ct[e(419)],(()=>{const t=e;this[t(610)][t(527)](this[t(387)],t(454),this[t(439)]&&this.$videoElement[t(626)]),this[t(439)]&&this[t(439)][t(482)]&&(this.player[t(477)](this[t(387)],"ratechange and video is paused and sent isMSEPlaybackRateChangePause true"),this.player[t(550)]=!0)}));this.eventListenList.push(t),hi(this.player[e(365)]())&&this.player.on(M[e(604)],(t=>{t&&(this.visibilityChangePlayTimeout=setTimeout((()=>{const t=Bn;if(this[t(440)](),this[t(610)][t(644)]()&&this[t(439)]){const e=this.getVideoBufferLastTime();if(e-this.$videoElement[t(381)]>this[t(648)]()){const s=this[t(552)](1);this[t(610)][t(527)](this[t(387)],t(575)+e+t(403)+this[t(439)][t(381)]+" so set currentTime to "+s),this[t(439)][t(381)]=s}}}),300))}))}if(this[e(610)][e(614)]()){const t=r(this.$videoElement,jt.progress,(()=>{const t=e;this[t(610)][t(527)](this[t(387)],t(361)),this[t(610)][t(533)](M[t(313)],this[t(559)]())})),s=r(this[e(439)],"seeking",(()=>{const t=e;this[t(610)][t(527)](this[t(387)],"seeking",this[t(439)][t(381)]),this[t(610)][t(533)](M[t(391)],this.$videoElement.currentTime)})),i=r(this.$videoElement,e(631),(()=>{const t=e;this.player[t(527)](this[t(387)],"seeked",this[t(439)][t(381)]),this[t(610)][t(630)].isSeeking()&&this[t(610)][t(630)].removeSeekingTimestamp(),this.player[t(533)](M.playVodVideoSeekedByMse,this[t(439)].currentTime)}));this.eventListenList.push(t,s,i)}this[e(314)](),this[e(610)][e(527)](this[e(387)],"init")}async[xn(415)](){const t=xn;if(super.destroy(),this[t(560)](),this[t(498)](),this[t(440)](),this[t(643)](),this[t(557)](),this[t(316)](),this[t(340)][t(515)]&&(this[t(340)][t(531)]((t=>{t()})),this[t(340)]=[]),this.isRenderRetryPlaying=!1,this[t(405)]=0,this.isRetryPlaying=!1,this[t(547)]=0,this[t(542)]=!1,this.player[t(377)].videoRenderSupportScale&&this[t(414)]()){const e=this[t(610)][t(494)];e[t(555)][t(402)]=t(356),e[t(555)].transform="none"}if(this[t(581)]&&(this[t(581)][t(471)]=0,this[t(581)][t(606)]=0,this[t(581)]=null),this[t(569)]=null,this[t(439)]){this[t(439)].pause&&(this[t(439)][t(657)](),this[t(439)][t(622)]=!0),this[t(439)].currentTime=0,this[t(439)][t(587)]&&(this.$videoElement[t(587)]=null,this[t(439)][t(470)](t(587))),this.$videoElement.src&&(this[t(439)].src="",this.$videoElement[t(470)]("src"));try{this.$videoElement[t(325)]()}catch(t){}if(!Ln(this[t(439)])){this.player[t(494)][t(661)]("video")&&this[t(610)][t(494)]&&this.player.$container[t(417)](this[t(439)])}this[t(439)]=null}if(this[t(442)]&&(this[t(442)][t(362)](),this[t(442)]=null),this[t(570)]&&(this[t(570)][t(362)](),this[t(570)]=null),this[t(466)]){try{await this.vwriter[t(427)]()}catch(t){}this[t(466)]=null}if(this[t(324)]){try{await this[t(324)][t(427)]()}catch(t){}this[t(324)]=null}this[t(318)]=!1,this.mediaStream&&(this[t(566)].getTracks()[t(531)]((e=>e[t(362)]())),this[t(566)]=null),this[t(501)](),this[t(610)][t(527)](this[t(387)],t(415))}[xn(621)](){const t=xn,e=document.createElement("canvas");this[t(581)]=e,this.screenshotCanvasContext=e[t(617)]("2d"),this[t(610)]._opt[t(473)]&&(this[t(569)].imageSmoothingEnabled=!0,this.screenshotCanvasContext[t(584)]&&(this[t(569)][t(577)]="high"))}[xn(586)](){const t=xn;if(this[t(610)].canVideoTrackWritter()&&ms()&&gs()&&!this[t(566)]){this[t(610)][t(527)](this.TAG_NAME,"bindMediaStream"),this[t(442)]=new MediaStreamTrackGenerator({kind:t(341)}),this[t(610)][t(426)]()&&(this[t(570)]=new MediaStreamTrackGenerator({kind:t(538)}),this[t(324)]=this[t(570)][t(536)][t(534)]());const e=[this[t(442)]];this[t(570)]&&e[t(561)](this[t(570)]),this.mediaStream=new MediaStream(e),this[t(439)][t(587)]=this[t(566)],this[t(466)]=this[t(442)][t(536)].getWriter()}}[xn(467)](t){const e=xn;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.player.isDestroyedOrClosed())return void this[e(610)][e(527)](this[e(387)],e(445));this[e(610)][e(363)]();const i=parseInt(1e3*Math[e(436)](s.mediaTime,this[e(306)]()),10)||0;if(this[e(610)][e(520)]())this[e(610)].updateStats({fps:!0,ts:i});else if(this.player[e(412)]()){!this.player[e(613)][e(393)]&&(this[e(610)][e(613)][e(393)]=je(),this[e(610)].handlePlayToRenderTimes());const t=i+(this[e(610)][e(366)][e(397)]||0);if(this[e(610)].updateStats({fps:!0,dfps:!0,ts:t,mseTs:i}),this[e(610)][e(533)](M.timeUpdate,t),ci(this.getHasInit())&&s.width&&s[e(471)]){const t={width:s[e(606)],height:s[e(471)]};this.updateVideoInfo(t),this[e(528)]()}}if(this[e(610)][e(465)]()||this[e(610)][e(489)]()||this.player[e(627)]()){if(this[e(610)][e(533)](M.timeUpdate,i),ci(this[e(512)]())&&s[e(606)]&&s[e(471)]){const t={width:s.width,height:s[e(471)]};!this[e(608)][e(389)]&&!this[e(610)].isOldHls()&&(t[e(389)]=G[e(516)]),this.updateVideoInfo(t),this.initCanvasViewSize()}this[e(610)][e(425)]({fps:!0,ts:i,dts:i}),this.player[e(331)](i),this[e(437)]()}else if(hi(this[e(610)]._opt[e(619)])&&ci(this.player._opt.mseUseCanvasRender)){if(this[e(610)][e(476)]){let t=parseInt(1e3*Math[e(436)](s[e(459)],this[e(306)]()),10)+(this[e(610)][e(476)][e(397)]||0);this[e(610)][e(331)](t)}else if(this[e(610)][e(377)][e(468)]){let t=parseInt(1e3*Math[e(436)](s[e(459)],this[e(306)]()),10)+(this[e(610)][e(366)][e(397)]||0);this[e(610)][e(331)](t)}this[e(437)]()}this.supportVideoFrameCallbackHandle=this[e(439)][e(524)](this[e(467)].bind(this))}fixChromeVideoFlashBug(){const t=xn;if(this[t(610)][t(377)][t(351)]&&this._isNeedAddBackDropFilter()){const e=this[t(610)][t(494)];e[t(555)][t(402)]=t(370),e[t(555)][t(374)]=t(543)}}[xn(329)](){const t=xn,e=es(),s=Ze();(e||s)&&(this[t(610)][t(527)](this.TAG_NAME,t(490)+e+t(611)+s),this[t(439)][t(578)](t(407),t(595)),this.$videoElement.setAttribute(t(411),t(595)),this[t(439)][t(578)](t(620),t(305)))}[xn(401)](t){const e=xn,s=this.$videoElement,i=s[e(593)],r=s[e(609)];if(this.player.debugLog(this[e(387)],e(500)+t+e(446)+this[e(542)]+e(502)+r+" and bufferedLength is "+i[e(515)]+e(656)+(i.length>0?i[e(320)](0):e(641))+" and currentTime is "+s[e(381)]),t||ci(this[e(542)])||r<2){if(i[e(515)]>0&&s.currentTime=1e3*this[e(610)]._opt.mseWaitVideoCanplayTimeout&&(this[e(610)][e(477)](this[e(387)],e(652)+s[e(381)]+" , diff is "+t+e(541)),this.player[e(533)](U[e(647)],t))}}else this[e(316)]()}[xn(316)](){const t=xn;this[t(592)]&&(this[t(610)][t(527)](this[t(387)],t(525)),this[t(592)](),this[t(592)]=null),this.detectAndFixStuckPlaybackStartTime=null}[xn(414)](){const t=ts().type.toLowerCase();return"chrome"===t||"edge"===t}[xn(518)](){let t=!0;return this[xn(439)]&&(t=this.$videoElement.paused),t}[xn(666)](){return this[xn(518)]()}[xn(447)](){const t=xn;let e=0;return this[t(439)]&&(e=this.$videoElement[t(609)]),e}[xn(545)](){const t=xn;let e=0;return this[t(439)]&&(e=this[t(439)][t(381)]),e}[xn(460)](){const t=xn;if(this[t(439)]){const e=this[t(447)]();if(this[t(610)][t(527)](this.TAG_NAME,t(585)+e),0===e)return this[t(610)][t(527)](this.TAG_NAME,"readyState is 0 and set _delayPlay to true and listen canplay event to play"),this[t(318)]=!0,void(null===this[t(640)]&&(this[t(640)]=setTimeout((()=>{const e=t;if(this[e(560)](),!this.player[e(529)]()&&ci(this[e(644)]())){const t=this._getBufferStore();this[e(610)][e(477)](this[e(387)],e(589)+t+e(488)),this[e(439)].currentTime=t,this._replay()}}),1e3)));this[t(438)]()}}_play(){const t=xn;this[t(439)]&&this.$videoElement[t(460)]()[t(429)]((()=>{const e=t;this[e(318)]=!1,this.player[e(527)](this[e(387)],e(322)),this.isPlaying()?(this.player[e(533)](M[e(378)]),this[e(314)](),this[e(547)]=0,this.isRetryPlaying=!1):this.replayTimeout=setTimeout((()=>{this[e(498)](),this._replay()}),100)}))[t(549)]((e=>{const s=t;this[s(610)][s(529)]()?this[s(610)].debugLog(this[s(387)],s(505)):(this[s(610)][s(527)](this.TAG_NAME,s(639)+e[s(399)]+s(663)+e[s(662)]+",\n e.toString() is "+e[s(348)]()),this[s(610)][s(667)](this[s(387)],s(636),e),this[s(521)]=!1,this[s(495)]=setTimeout((()=>{this[s(498)](),this._replay()}),100))}))}[xn(367)](){const t=xn;if(!this[t(644)]()&&ci(this[t(610)][t(529)]())&&ci(this[t(521)])){if(this[t(521)]=!0,this[t(547)]>=3){let e="";return void(this[t(610)][t(465)]()?(e=t(333)+this[t(547)]+t(511),this[t(610)][t(667)](this.TAG_NAME,e),this[t(610)][t(310)](U[t(522)],e)):(e=t(483)+this.isRetryPlayingTimes+t(464),this[t(610)][t(667)](this[t(387)],e),this[t(610)].emitError(U[t(358)],e)))}this[t(610)].debugWarn(this[t(387)],t(424)+this.isRetryPlayingTimes),this[t(438)](),this.isRetryPlayingTimes++}else this[t(610)][t(527)](this.TAG_NAME,"_replay() and isPlaying is "+this.isPlaying()+" and isRetryPlaying is "+this[t(521)]+t(319)+this[t(610)][t(529)]()+" and return;")}[xn(657)](t){const e=xn;this[e(610)].debugLog(this[e(387)],"pause and isNow is "+t),this[e(644)]()&&(t?(this.$videoElement&&this[e(439)][e(657)](),this[e(557)]()):this[e(601)]=setTimeout((()=>{const t=e;this.clearPauseDelayTimeout(),this[t(439)]&&this[t(439)][t(657)](),this[t(557)]()}),100))}[xn(650)](){const t=xn;super[t(650)](),this.$videoElement&&(this[t(439)][t(657)](),this[t(439)][t(381)]=0,this[t(439)].src&&(this[t(439)][t(342)]="",this.$videoElement.removeAttribute("src")),this.$videoElement[t(587)]&&(this[t(439)][t(587)]=null,this.$videoElement[t(470)](t(587))))}screenshot(t,e,s,i){const r=xn;if(!this[r(565)]())return this[r(610)][r(477)](this[r(387)],"screenshot failed, video is not ready and stats is "+this[r(447)]()),null;t=t||je(),i=i||j.download;let n=.92;!at[e]&&j[e]&&(i=e,e=r(591),s=void 0),typeof s===r(380)&&(i=s,s=void 0),typeof s!==r(404)&&(n=Number(s));const o=this[r(439)];!this[r(581)]&&this._createScreenShotCanvas();let a=this[r(581)];a[r(606)]=o.videoWidth,a[r(471)]=o[r(487)],this[r(569)][r(353)](o,0,0,a[r(606)],a[r(471)]);const h=at[e]||at[r(591)],c=a[r(352)](h,n);if(this[r(569)][r(598)](0,0,a[r(606)],a[r(471)]),a[r(606)]=0,a[r(471)]=0,i===j[r(360)])return c;{const e=Ne(c);if(i===j[r(602)])return e;if(i===j[r(394)]){const s=h[r(430)]("/")[1];rn(e,t+"."+s)}}}[xn(369)](t){return new Promise(((e,s)=>{const i=Bn;if(Ms(t)&&(t={filename:t}),!this[i(565)]())return this[i(610)][i(477)](this[i(387)],i(462)),s("screenshot failed, video is not ready");const r=this[i(439)];(t=t||{}).width=r.videoWidth,t[i(471)]=r[i(487)],t[i(406)]=t[i(406)]||je(),t.format=t.format?at[t[i(491)]]:at[i(591)],t[i(625)]=Number(t[i(625)])||.92,t.type=t[i(383)]||j[i(394)],!this[i(581)]&&this._createScreenShotCanvas();let n=this.$screenshotCanvasElement;n[i(606)]=r[i(410)],n[i(471)]=r[i(487)],this[i(569)].drawImage(r,0,0,n[i(606)],n.height);const o=n[i(352)](t[i(491)],t[i(625)]);this.screenshotCanvasContext.clearRect(0,0,n[i(606)],n.height),n[i(606)]=0,n[i(471)]=0;const a=this[i(610)][i(377)][i(473)];Es(o,t,a)[i(429)]((s=>{const r=i;if(t[r(383)]===j[r(360)])e(o);else{const i=Ne(s);if(t[r(383)]===j[r(602)])e(i);else if(t[r(383)]===j[r(394)]){e();const s=t.format[r(430)]("/")[1];rn(i,t[r(406)]+"."+s)}}})).catch((t=>{s(t)}))}))}[xn(418)](t){return new Promise(((e,s)=>{const i=Bn;if(Ms(t)&&(t={filename:t}),!this[i(565)]())return this[i(610)].debugWarn(this[i(387)],i(462)),s(i(462));const r=this[i(439)];(t=t||{}).width=r[i(410)],t.height=r[i(487)],t.filename=t[i(406)]||je(),t[i(491)]=t.format?at[t[i(491)]]:at[i(591)],t.quality=Number(t.quality)||.92,t[i(383)]=t[i(383)]||j.download,!this[i(581)]&&this[i(621)]();let n=this[i(581)];n.width=r[i(410)],n[i(471)]=r[i(487)],this[i(569)][i(353)](r,0,0,n.width,n[i(471)]);const o=n[i(352)](t.format,t[i(625)]);this[i(569)][i(598)](0,0,n.width,n[i(471)]),n[i(606)]=0,n.height=0;const a=this[i(610)][i(377)][i(473)];Ts(o,t,a)[i(429)]((s=>{const r=i;if(t[r(383)]===j[r(360)])e(o);else{const i=Ne(s);if(t[r(383)]===j[r(602)])e(i);else if(t[r(383)]===j.download){e();const s=t.format[r(430)]("/")[1];rn(i,t[r(406)]+"."+s)}}})).catch((t=>{s(t)}))}))}[xn(510)](t){}screenshotByRect(t){const e=xn;if(!this[e(565)]())return this[e(610)][e(477)](this[e(387)],e(653)+this[e(447)]()),null;const s=this[e(439)];!this.$screenshotCanvasElement&&this[e(621)]();let i=this[e(581)];i[e(606)]=parseInt(t[e(606)],10),i[e(471)]=parseInt(t[e(471)],10),this[e(569)][e(353)](s,t.x,t.y,i[e(606)],i[e(471)],0,0,i.width,i[e(471)]);const r=at[e(591)],n=i.toDataURL(r,.92);return this.screenshotCanvasContext[e(598)](0,0,i[e(606)],i[e(471)]),i[e(606)]=0,i[e(471)]=0,n}initCanvasViewSize(){const t=xn;this[t(439)].style.display=t(664),this[t(530)]()}[xn(603)](){const t=xn,e=this[t(439)],s=e[t(593)],i=s[t(515)]?s[t(548)](s[t(515)]-1):0;e[t(381)]=i}[xn(493)](t){const e=xn;if(this[e(466)]){if(!this[e(439)][e(587)]&&(this[e(439)][e(587)]=this[e(566)]),this.isPaused()){const s=this[e(447)]();if(this[e(610)][e(477)](this[e(387)],e(388)+s),4===s&&ci(this[e(563)])){if(this[e(563)]=!0,this.isRenderRetryPlayingTimes>3){const i="render() error, video is paused and readyState is "+s+e(532)+this.isRenderRetryPlayingTimes+e(451);return this[e(610)][e(667)](this[e(387)],i),this[e(610)][e(310)](U[e(358)],i),void(t[e(558)]&&qs(t[e(558)]))}this.$videoElement.play()[e(429)]((()=>{const t=e;this[t(405)]=0,this.isRenderRetryPlaying=!1,this[t(314)](),this.player[t(527)](this[t(387)],t(392))}))[e(549)]((t=>{const s=e;this[s(563)]=!1,this[s(405)]++,this.player[s(527)](this[s(387)],s(615)+t[s(399)]+s(590)+t[s(662)]+",\n e.toString() is "+t[s(348)]()),this[s(610)][s(667)](this[s(387)],"render() error, video is paused and replay error ",t)}))}}if(this[e(610)][e(425)]({fps:!0,ts:t.ts||0}),t[e(558)])this[e(466)][e(334)](t[e(558)])[e(429)]((()=>{qs(t[e(558)])}));else if(t.output){let s=t[e(632)];if(this[e(610)][e(422)]&&this[e(610)].ai&&this.player.ai[e(564)]){null===this.prevAiFaceDetectTime&&(this.prevAiFaceDetectTime=je());const i=je();i-this.prevAiFaceDetectTime>this[e(610)]._opt[e(665)]&&(s=this.player.ai[e(564)][e(448)]({width:this[e(608)][e(606)],height:this[e(608)].height,data:t.output,ts:t.ts||0}),this[e(409)]=i)}if(this[e(610)][e(428)]&&this.player.ai&&this[e(610)].ai[e(386)]){null===this.prevAiObjectDetectTime&&(this[e(651)]=je());const i=je();i-this[e(651)]>this[e(610)][e(377)][e(582)]&&(s=this[e(610)].ai[e(386)][e(448)]({width:this[e(608)].width,height:this[e(608)][e(471)],data:t[e(632)],ts:t.ts||0}),this[e(651)]=i)}if(this.player.occlusionDetectActive&&this[e(610)].ai&&this[e(610)].ai[e(562)]){null===this.prevAiOcclusionDetectTime&&(this[e(332)]=je());const s=je();if(s-this[e(332)]>=this[e(610)][e(377)][e(504)]){const i=this[e(610)].ai[e(562)][e(537)]({width:this[e(608)].width,height:this[e(608)][e(471)],data:t[e(632)],ts:t.ts||0});this[e(332)]=s,i&&(this[e(610)][e(527)](this[e(387)],e(461)),this[e(610)].emit(M.aiOcclusionDetectResult,{ts:t.ts||0}))}}if(this[e(610)][e(420)]&&this[e(610)].ai&&this.player.ai[e(540)]){const s=this[e(610)].ai[e(540)][e(537)]({width:this.videoInfo[e(606)],height:this[e(608)][e(471)],data:t[e(632)],ts:t.ts||0});if(s&&s[e(354)]&&(this[e(610)][e(533)](M[e(421)],{type:s[e(383)],ts:t.ts||0}),this[e(610)]._opt[e(321)]))return void this[e(610)][e(527)](this.TAG_NAME,e(503)+s.type+e(336))}try{const i=_s(s,{format:e(416),codedWidth:this.videoInfo[e(606)],codedHeight:this[e(608)][e(471)],timestamp:1e3*t.ts});this.vwriter[e(334)](i)[e(429)]((()=>{qs(i)}))}catch(t){this[e(610)].debugError(this.TAG_NAME,"render error",t),this[e(610)][e(310)](U[e(484)],e(646)+t[e(572)]+e(344)+t[e(662)])}}this[e(610)][e(331)](t.ts||0),this[e(437)](),this[e(339)]()}else this[e(610)][e(477)](this[e(387)],e(649))}[xn(567)](){const t=xn;this[t(610)].debugLog(this.TAG_NAME,t(568));const e=this[t(610)]._opt,s=e.rotate,i=this[t(610)][t(659)]();let r=i[t(606)],n=i.height;this[t(439)][t(606)]=r,this[t(439)][t(471)]=n,this.$videoElement[t(555)][t(606)]=r+"px",this[t(439)].style[t(471)]=n+"px",(270===s||90===s)&&(this[t(439)][t(606)]=n,this[t(439)][t(471)]=r,this.$videoElement[t(555)][t(606)]=n+"px",this.$videoElement[t(555)][t(471)]=r+"px");let o=this.$videoElement.width,a=this[t(439)][t(471)],h=Math.floor((r-o)/2),c=Math[t(337)]((n-a)/2),l=t(668);ci(e.isResize)&&(l="fill"),e[t(433)]&&(l="cover");let d="";"none"===e.mirrorRotate&&s&&(d+=t(456)+s+t(349)),e[t(597)]===t(347)?d+=t(616):e[t(597)]===t(506)&&(d+=" rotateX(180deg)"),this[t(610)][t(377)][t(351)]&&(this.$videoElement[t(555)][t(480)]=l),this[t(439)][t(555)][t(374)]=d,this[t(439)][t(555)].padding="0",this[t(439)][t(555)][t(345)]=h+"px",this[t(439)][t(555)][t(368)]=c+"px"}[xn(479)](){return f[xn(341)]}getCurrentTime(){const t=xn;return this[t(439)][t(381)]}[xn(644)](){const t=xn;return this[t(439)]&&ci(this[t(439)][t(482)])&&ci(this[t(439)][t(556)])&&0!==this.$videoElement[t(626)]&&0!==this[t(439)].readyState}isVideoPlaying(){return this[xn(644)]()}[xn(565)](){const t=xn;return this[t(439)]&&this[t(439)][t(609)]>=1}[xn(579)](){const t=xn;let e=null;if(this[t(439)]){if(Vs(this.$videoElement.getVideoPlaybackQuality)){const s=this[t(439)][t(350)]();e={droppedVideoFrames:s[t(580)]||s[t(457)],totalVideoFrames:s[t(413)],creationTime:s.creationTime}}else e={droppedVideoFrames:this.$videoElement[t(312)],totalVideoFrames:this[t(439)][t(338)],creationTime:je()};e&&(e.renderedVideoFrames=e[t(413)]-e[t(580)])}return e}[xn(443)](t){const e=xn;this[e(439)]&&(this[e(439)][e(626)]=t)}get[xn(544)](){let t=1;return this[xn(439)]&&(t=this.$videoElement.playbackRate),t}[xn(560)](){const t=xn;this.checkVideoCanplayTimeout&&(clearTimeout(this[t(640)]),this[t(640)]=null)}[xn(498)](){const t=xn;this[t(495)]&&(clearTimeout(this[t(495)]),this.replayTimeout=null)}[xn(440)](){const t=xn;this[t(496)]&&(clearTimeout(this[t(496)]),this[t(496)]=null)}[xn(643)](){const t=xn;this.pauseDelayTimeout&&(clearTimeout(this[t(601)]),this[t(601)]=null)}[xn(557)](){const t=xn;this.supportVideoFrameCallbackHandle&&this.$videoElement&&(this[t(610)][t(527)](this[t(387)],t(638)),this[t(439)][t(576)](this.supportVideoFrameCallbackHandle),this.supportVideoFrameCallbackHandle=null)}_startVideoFrameCallback(){const t=xn;fi()?!this[t(328)]&&(this[t(610)][t(527)](this[t(387)],t(658)),this[t(328)]=this[t(439)].requestVideoFrameCallback(this.videoFrameCallback[t(475)](this))):this[t(610)][t(477)](this[t(387)],t(514))}[xn(330)](){const t=xn,e=this.$videoElement;let s=0;return e[t(593)][t(515)]>0&&(s=e[t(593)][t(320)](0)),s}[xn(519)](){const t=xn,e=this.$videoElement,s=e.buffered;s.length&&s[t(320)](0);const i=s[t(515)]?s[t(548)](s[t(515)]-1):0;let r=e[t(381)];const n=i-r,o=this[t(648)]();if(this[t(610)][t(425)]({mseVideoBufferDelayTime:n}),n>o){const s=this[t(552)](1);this[t(610)][t(527)](this[t(387)],"handleUpdatePlaybackRate and buffered is "+i+t(629)+r+" , delay buffer is more than "+o+t(523)+n+" and new time is "+s),e[t(381)]=s,r=e.currentTime}else if(n<0&&0===i)return this.player.debugWarn(this.TAG_NAME,"handleUpdatePlaybackRate and delay buffer is "+i+t(472)+r+t(554)+n+t(398)+e[t(482)]+" "),void this.player.emit(U[t(317)],t(364));if(r>1){const s=this._getPlaybackRate(i-r);e[t(626)]!==s&&(this[t(610)].debugLog(this[t(387)],t(596)+i+t(455)+r+t(343)+(i-r)+t(357)+s+" "),e[t(626)]=s)}}[xn(444)](t){const e=xn,s=this[e(439)];let i=this.player._opt[e(373)]+this.player[e(377)][e(382)];const r=Math[e(436)](i,1e3),n=r/2;return t*=1e3,1===s[e(626)]?t>r?1.2:1:t<=n?1:s.playbackRate}getVideoCurrentTime(){const t=xn;let e=0;return this[t(439)]&&(e=this[t(439)][t(381)]),e}getVideoBufferLastTime(){const t=xn,e=this[t(439)];let s=0;if(e){const i=e[t(593)];i[t(515)]&&i[t(320)](0);s=i[t(515)]?i.end(i[t(515)]-1):0}return s}[xn(655)](){const t=xn,e=this[t(439)];const s=this[t(450)]()-e[t(381)];return s>0?s:0}[xn(546)](){const t=xn,e=this[t(439)];let s=0,i=0;return e[t(593)][t(515)]>0&&(i=e[t(593)].end(e[t(593)][t(515)]-1),s=i-e[t(381)]),s<0&&(this[t(610)][t(477)](this[t(387)],"checkVideoSourceBufferDelay "+s+" < 0, and buffered is "+i+t(395)+e[t(381)]+t(623)+e.currentTime+t(499)+i),e[t(381)]=i,e[t(482)]&&(this[t(610)][t(477)](this.TAG_NAME,"checkSourceBufferDelay and video is paused and sent isMSECurrentMoreThanBufferedPause true"),this[t(610)][t(355)]=!0),s=0),s}[xn(384)](){const t=xn,e=this.$videoElement;let s=0;return e.buffered.length>0&&(s=e[t(381)]-e.buffered[t(320)](0)),s}[xn(359)](){const t=xn,e=this[t(439)];let s=null;if(e){const i=e[t(593)],r=i[t(515)]?i.start(0):0,n=i.length?i[t(548)](i[t(515)]-1):0;s={start:r,end:n,diff:n-r}}return s}[xn(396)](){const t=xn,e=this[t(439)];let s=[];if(e){const i=e[t(593)];for(let e=0;e=1}_clearDelayEmitVodVideoWaiting(){const t=xn;this[t(434)]&&(clearTimeout(this[t(434)]),this[t(434)]=null)}[xn(635)](){this[xn(571)]&&(clearTimeout(this._checkVodVideoWaitingInterval),this._checkVodVideoWaitingInterval=null)}[xn(326)](){const t=xn;this[t(453)](),this[t(434)]=setTimeout((()=>{const e=t;this[e(610)][e(529)]()?this[e(610)][e(527)](this[e(387)],e(612)):(this[e(610)][e(527)](this.TAG_NAME,e(607)),this[e(610)][e(533)](M[e(497)]))}),100)}[xn(481)](){const t=xn;this[t(635)](),this[t(571)]=setTimeout((()=>{const e=t;this.player.isDestroyedOrClosed()?this[e(610)][e(527)](this[e(387)],e(469)):this[e(439)]&&(this[e(610)][e(527)](this[e(387)],e(583)+this[e(439)].currentTime+" and update currentTime to "+(this[e(439)][e(381)]+.1)),this[e(439)][e(381)]=this[e(439)][e(381)]+.1)}),4e3)}setCurrentTime(t){const e=xn;this.$videoElement&&(this[e(439)][e(381)]=t)}[xn(618)](){const t=xn;let e=!1;return this[t(439)]&&(e=this[t(439)][t(556)]),e}[xn(375)](){const t=xn;let e=0;return this.$videoElement&&this.$videoElement.buffered[t(515)]>0&&(e=this[t(439)].buffered[t(548)](this[t(439)].buffered[t(515)]-1)),e}[xn(539)](){let t=0;return this[xn(439)]&&(t=this.$videoElement.duration),t}[xn(559)](){const t=xn;let e=0;if(this.$videoElement){const s=this.getDuration();s&&(e=this[t(375)]()/s)}return e}[xn(552)](){const t=xn;let e=arguments[t(515)]>0&&void 0!==arguments[0]?arguments[0]:1,s=this[t(439)][t(381)];const i=this[t(396)]();if(0===i[t(515)])return s;const r=i[i[t(515)]-1];return s=r.end-r.start<1?r[t(320)]:r[t(548)]-(e||1),s}}const Fn=On;function On(t,e){const s=Un();return(On=function(t,e){return s[t-=481]})(t,e)}function Un(){const t=["sync frame duration is ","bufferSize","_doRender","183780LaNdKV","CanvasVideoPlayback","canvas","contextGl","isPlaybackPauseClearCache","cancelRequestAnimationFrameRequest","doRender webgl render context is lost ","_initContext2D","init","_renderFps","webglRender","96HkBJhu","isUseFpsRender","playInterval","render","initVideo","playbackDelayTime","136nUTZIP","_sync","fps","2265688bEyjiQ"," and bufferList length is ","setFps min","then","startRender$2","debugWarn","debugLog","webgpu","ceil","height","shift","_requestAnimationFrameRequest","_startfpsTime","doRender webgpu render and error: ","toString","destroy","bufferList","drawImage","updateStats","43554kBEgHN","4816431biBPcp","useWCS","buffer size is ","webgl","handleRender","CanvasVideoPlayVod","startRender","playbackRate","_startFpsTimestamp","length","render animation frame duration is ","ms and fps is ","clearView","doRender webgpu render is not init","context2D","fps is","videoInfo","_initCanvasRender","isPlayback","player","preSyncTimestamp","_opt"," and use startRender() instead","width","setStreamFps","getStreamFps","requestAnimationFrameMaxDiff","ms more than ","calc fps is ","resume","_updateSync","buffer","setFps","bind","TAG_NAME","initFps, has calc fps","_initContextGPU","createImageBitmap","setFps "," and updatePreFps"," and playbackRate is ","wcsUseWebgl2Render","setRate","renderType","listenPlaybackPause","_hasCalcFps"," and error: ","playVod","playback","getCanvasType","streamFps","playbackConfig","render$2","webGPURender","tfTs","isPlaybackOnlyDecodeIFrame","221928NNpKfr","debugError"," pre fps is ","COLOR_BUFFER_BIT","preFps","listenPlayVodPause","pause","delayTimeout","playbackPause","clear","bufferListLength is","useWebGPU","playVodPause","_firstTimestamp","_stopSync","initFps","useWebCanvas","renderYUV","210028YcHANI","_doPlay","videoFrame","1034598HeLEVw","isPlayVod","$videoElement","isWcsWebgl2","_requestAnimationFramePrevTs"];return(Un=function(){return t})()}!function(t,e){const s=On,i=t();for(;;)try{if(296306===-parseInt(s(486))/1+parseInt(s(489))/2+parseInt(s(536))/3+parseInt(s(517))/4+parseInt(s(497))/5*(-parseInt(s(508))/6)+parseInt(s(593))/7*(-parseInt(s(514))/8)+parseInt(s(537))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Un);class Nn extends yn{constructor(t){const e=On;super(t),this.TAG_NAME=t.isPlayVod()?e(542):e(498),this[e(533)]=[],this.playInterval=null,this[e(516)]=1,this[e(597)]=1,t[e(490)]()&&(this[e(516)]=25,this[e(597)]=25),this[e(587)]=0,this[e(544)]=1,this[e(481)]=null,this[e(506)]=0,this[e(529)]=null,this[e(545)]=null,this[e(582)]=!1,this._requestAnimationFrameRequest=null,this[e(493)]=null,this.preSyncTimestamp=null,this[e(556)].isPlayback()?this[e(556)].on(M[e(601)],this[e(581)][e(570)](this)):this.player[e(490)]()&&this[e(556)].on(M[e(605)],this[e(598)][e(570)](this)),this[e(556)][e(523)](this.TAG_NAME,e(505))}async[Fn(532)](){const t=Fn;this.clear(),this._stopSync(),this[t(502)](),this[t(481)]=null,this[t(544)]=1,this[t(516)]=1,this[t(597)]=1,this._renderFps=0,this[t(529)]=null,this._startFpsTimestamp=null,this[t(582)]=!1,super[t(532)](),this[t(556)].debugLog(this[t(571)],t(532))}listenPlaybackPause(t){const e=Fn;t?(this[e(599)](),this[e(556)][e(585)][e(501)]&&this[e(602)]()):this.resume()}[Fn(598)](t){t?this.pause():this.resume()}[Fn(554)](){const t=Fn;this.player[t(558)].useWCS?(this[t(580)]=X.webcodecs,pi()&&this[t(556)]._opt[t(578)]?(this._initContextGl2(),this[t(507)]&&(this[t(492)]=!0)):this[t(504)]()):this[t(556)][t(558)][t(604)]?(this[t(580)]=X[t(524)],this[t(573)]()):this[t(556)][t(558)][t(484)]?(this[t(580)]=X.canvas,this[t(504)]()):(this[t(580)]=X[t(540)],this._initContextGl())}[Fn(515)](){const t=Fn;this[t(482)]();for(let e=0;e{const s=t;let i=(new Date).getTime();!this[s(557)]&&(this.preSyncTimestamp=i);for(let t=0;t1&&this[s(533)][s(546)]>0&&this.player.debugWarn(this[s(571)],"sync frame duration is "+r+"ms and fragDuration is "+e+"ms and diffFps is "+n+s(518)+this[s(533)][s(546)]),this[s(557)]=i}),e)}[Fn(487)](){const t=Fn;if(this[t(533)].length>0){const e=this[t(533)][t(527)]();e&&e[t(568)]&&(this[t(496)](e[t(568)]),this[t(556)].handleRender(),this[t(556)][t(555)]()&&this.player[t(585)][t(535)]({ts:e.ts,tfTs:e[t(591)]}))}}_stopSync(){const t=Fn;this[t(510)]&&(clearInterval(this.playInterval),this.playInterval=null),this[t(557)]=null}[Fn(496)](t){const e=Fn;if(this[e(556)][e(558)][e(538)])if(this[e(507)])this[e(507)][e(511)](t),qs(t);else if(Vs(t[e(574)]))try{t[e(574)]()[e(520)]((s=>{const i=e;this[i(551)][i(534)](s,0,0,this[i(491)][i(560)],this[i(491)][i(526)]),qs(t)}))}catch(t){}else this[e(551)][e(534)](t,0,0,this.$videoElement[e(560)],this[e(491)][e(526)]),qs(t);else if(this[e(586)]()===X[e(540)])try{this.webglRender.renderYUV(this[e(491)][e(560)],this.$videoElement[e(526)],t)}catch(s){this[e(556)].debugError(this[e(571)],e(503)+(this[e(500)]&&this.contextGl.isContextLost())+" and buffer length is "+t[e(546)]+e(583)+s[e(531)]())}else if(this[e(586)]()===X[e(524)])try{if(!this.webGPURender)return void this.player[e(522)](this[e(571)],e(550));this[e(590)][e(485)](this[e(491)][e(560)],this[e(491)][e(526)],t)}catch(t){this[e(556)][e(594)](this[e(571)],e(530)+t.toString())}else if(this[e(586)]()===X[e(499)]){const s=_s(t,{format:"I420",codedWidth:this[e(553)][e(560)],codedHeight:this[e(553)].height,timestamp:0});this[e(551)][e(534)](s,0,0,this[e(491)][e(560)],this[e(491)][e(526)]),qs(s)}}get rate(){return this[Fn(544)]}get[Fn(495)](){const t=Fn;return this[t(533)][t(546)]}[Fn(562)](){return this[Fn(587)]}[Fn(483)](){const t=Fn;this._hasCalcFps?this.player.debugLog(this[t(571)],t(572)):this[t(556)].isPlayback()?(this[t(597)]=Ve(this[t(556)][t(585)][t(516)],1,100),this[t(516)]=this.preFps):this.player.isPlayVod()&&(this[t(597)]=Ve(this[t(556)].playVod[t(516)],1,100),this.fps=this[t(597)])}setFps(t){const e=Fn;t!==this[e(516)]&&(t>100&&this[e(556)][e(522)](this[e(571)],"setFps max",t),t<0&&this[e(556)][e(522)](this[e(571)],e(519),t),this[e(516)]=Ve(t,1,100),this[e(556)].debugLog(this[e(571)],e(575)+this[e(597)]+" -> "+this.fps),this[e(556)][e(555)]()&&this[e(556)][e(585)][e(509)]&&this._sync(),this[e(597)]=this[e(516)])}setStreamFps(t){const e=Fn;this[e(556)].debugLog(this[e(571)],"setStreamFps",t),this[e(582)]=!0,this[e(587)]=t,this[e(569)](t)}[Fn(579)](t){const e=Fn;t!==this[e(544)]&&(this.player[e(523)](this[e(571)],e(579),t),this.playbackRate=t)}[Fn(589)](t){const e=Fn;null===this[e(481)]&&(this[e(481)]=t.ts);const s={tfTs:t.ts-this[e(481)],ts:t.ts};t.videoFrame?s.buffer=t.videoFrame:s[e(568)]=t.output,this[e(533)].push(s),this.startRender()}[Fn(543)](){const t=Fn;if(0===this[t(533)][t(546)])return;let e=null;for(;0!==this[t(533)].length;){const s=this.bufferList[t(527)]();this[t(496)](s[t(568)]),e=s}this.player[t(541)](),this[t(556)][t(555)]()?this[t(556)][t(585)][t(535)]({ts:e.ts,tfTs:e[t(591)]}):this[t(556)][t(490)]()&&this[t(556)][t(584)][t(535)]({ts:e.ts,tfTs:e[t(591)]})}[Fn(521)](){const t=Fn;if(this[t(533)][t(546)]<=0)return void this[t(502)]();null===this[t(493)]&&(this._requestAnimationFramePrevTs=je());const e=je()-this[t(493)];if(e>=this.player._opt[t(563)])return this[t(556)].debugWarn(this[t(571)],t(547)+e+t(564)+this[t(556)][t(558)][t(563)]+t(559)),this.startRender(),void this[t(502)]();const s=this.bufferList.shift();this[t(496)](s.buffer),this.player[t(541)](),this[t(556)][t(555)]()?this.player.playback[t(535)]({ts:s.ts,tfTs:s[t(591)]}):this[t(556)].isPlayVod()&&this[t(556)].playVod.updateStats({ts:s.ts,tfTs:s[t(591)]}),this[t(493)]=je(),this._requestAnimationFrameRequest=requestAnimationFrame(this.startRender$2[t(570)](this))}[Fn(502)](){const t=Fn;this[t(528)]&&(cancelAnimationFrame(this[t(528)]),this[t(528)]=null),this[t(493)]=null}pushData(t){const e=Fn;null===this[e(481)]&&(this[e(481)]=t.ts);const s={tfTs:t.ts-this[e(481)],ts:t.ts};if(t[e(488)]?s[e(568)]=t[e(488)]:s.buffer=t.output,this[e(556)][e(592)]())return this[e(556)][e(523)](this[e(571)],"pushData, isPlaybackOnlyDecodeIFrame only decode iframe and ts is ",s.ts),this[e(496)](s.buffer),this[e(556)].handleRender(),void(this[e(556)][e(555)]()&&this[e(556)][e(585)][e(535)]({ts:s.ts,tfTs:s.tfTs}));if(this[e(556)].isPlayback()){const t=this.player[e(558)][e(588)].isCacheBeforeDecodeForFpsRender;if(!t&&this.bufferSize>this[e(516)]*this.playbackRate*2&&(this[e(556)][e(522)](this[e(571)],e(539)+this[e(495)]),this[e(487)]()),this[e(533)].push(s),!this[e(582)]){const t=$s(this[e(533)]);null!==t&&t!==this[e(597)]&&(this.player.debugLog(this[e(571)],e(565)+t+e(595)+this[e(597)]+e(576)),this[e(561)](t))}if(!t){const t=this[e(533)].length,s=t/(this[e(516)]*this[e(544)]);s<=1?this.setFps(this.preFps):(this[e(569)](this[e(516)]+Math.floor(s*this.playbackRate)),this.player[e(522)](this[e(571)],"rate is",s,e(552),this[e(516)],e(603),t))}}}[Fn(512)](){this[Fn(567)]()}initVideoDelay(){const t=Fn,e=this[t(556)][t(558)][t(513)];e>0?this[t(600)]=setTimeout((()=>{this[t(512)]()}),e):this[t(512)]()}[Fn(549)](){const t=Fn;super.clearView(),this[t(500)].clear(this[t(500)][t(596)])}clear(){const t=Fn;this[t(556)][t(558)][t(538)]&&this[t(533)].forEach((e=>{const s=t;e[s(568)]&&qs(e[s(568)])})),this[t(533)]=[]}_updateSync(){const t=Fn;this[t(556)].isPlayback()&&this[t(556)][t(585)].isUseFpsRender&&this[t(515)]()}[Fn(566)](){this[Fn(567)]()}[Fn(599)](){this[Fn(556)].isPlayback()&&this.player.playback.isUseFpsRender&&this._stopSync()}}var jn=Vn;function Vn(t,e){var s=zn();return(Vn=function(t,e){return s[t-=184]})(t,e)}function zn(){var t=["9ldvVQR","6058598KKdEPg","739385qnerci","VideoPlayback","pushData","destroy","50196530JibmdR","render","render$2","39245sqRBLx","2836320Tnhhod","1274481OABnfg","4aUXtYV","isPlayback","942WPMUrm","VideoPlayVod","10551752ZBtBjz"];return(zn=function(){return t})()}!function(t,e){for(var s=Vn,i=t();;)try{if(783528===parseInt(s(197))/1+parseInt(s(190))/2*(-parseInt(s(189))/3)+-parseInt(s(188))/4+parseInt(s(187))/5*(-parseInt(s(192))/6)+-parseInt(s(196))/7+parseInt(s(194))/8*(-parseInt(s(195))/9)+parseInt(s(184))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(zn);class Gn extends Mn{constructor(t){var e=Vn;super(t),this.TAG_NAME=t[e(191)]()?e(198):e(193)}async[jn(200)](){super[jn(200)]()}[jn(199)](t){this[jn(185)](t)}[jn(186)](t){this.render(t)}}function Wn(){const t=["useWCS","getLoaderFactory","mseUseCanvasRender","_opt","10VYpqJJ","wcsUseVideoRender","273383BTNCsD","supportHls265","useOffscreen","isWebrtc","useMSE","12092054UYfNgX","5949HIwalE","isAliyunRtc","388084NsRTzP","1257717zIHHdl","8YZrGJA","isHls","24eDezXe","5EErnab","792068WpokCp","playVod","146952VRzvLU","playType","2296NcCebJ","useCanvasRender","isWebrtcH265","playbackTF","63dnwlEI"];return(Wn=function(){return t})()}const Hn=Kn;function Kn(t,e){const s=Wn();return(Kn=function(t,e){return s[t-=275]})(t,e)}!function(t,e){const s=Kn,i=t();for(;;)try{if(872539===parseInt(s(288))/1+parseInt(s(284))/2*(-parseInt(s(283))/3)+parseInt(s(282))/4*(-parseInt(s(287))/5)+-parseInt(s(290))/6*(parseInt(s(296))/7)+parseInt(s(292))/8*(parseInt(s(280))/9)+-parseInt(s(301))/10*(-parseInt(s(303))/11)+-parseInt(s(286))/12*(-parseInt(s(279))/13))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Wn);class Qn{constructor(t){const e=Kn;return new(Qn[e(298)](t[e(300)]))(t)}static[Hn(298)](t){const e=Hn;return t[e(278)]?t[e(299)]?wn:Mn:t[e(285)]&&ci(t[e(275)])||t[e(277)]&&ci(t[e(294)])?t[e(293)]?wn:Mn:t[e(281)]?Mn:t[e(297)]?t[e(291)]===c[e(295)]?Nn:t.playType===c[e(289)]?!t[e(276)]&&t[e(302)]?Gn:Nn:!t.useOffscreen&&t[e(302)]?Mn:wn:t[e(291)]===c[e(295)]||t.playType===c.playVod?Nn:t.wasmUseVideoRender?Mn:wn}}const Yn=qn;function qn(t,e){const s=Jn();return(qn=function(t,e){return s[t-=402]})(t,e)}function Jn(){const t=["audioResumeStateTimeout","closeAudio","TAG_NAME","channels","356lpluaD","send close and wait 10ms destroy directly","4492647uHKQNf","gainNode","isStateSuspended","destroy","getEngineType","destination","hasAudio","hasInitScriptNode","mediaStreamAudioDestinationNode","181122OXzolq","close","playing","player","finally","emit","audioEnabled","sampleRate","length","2471194jpYnRS","encType","_destroyWorklet","createMediaStreamDestination","bufferList","off","depth","audioBufferSourceNode","setVolume","gain","270CCOMEg","getAudioBufferSize","state","audioContextState","setRate","_prevVolume","noteOn","encTypeCode","port","30mWgtKx","onmessage","84SfoYHC","play","disconnect","bufferSize","updateAudioInfo","stop","4433560TIEGoE","createGain","value","507610aXkDuP","isMute","init","volumechange","2526gdgQnq","clearAudioResumeStateTimeout","toFixed","clear","then","audioContextContextResumeLock","925eHlJOy","audioContext","scriptNode","mute","resume","audioResumeState","initScriptNode","AudioContext","resetInit","volume","workletWorkerCloseTimeout","pause","audioInfo","suspended","workletProcessorNode","lastVolume","postMessage","isStateRunning","$audio","connect","start"];return(Jn=function(){return t})()}!function(t,e){const s=qn,i=t();for(;;)try{if(393233===parseInt(s(481))/1+parseInt(s(461))/2*(-parseInt(s(485))/3)+parseInt(s(431))/4*(parseInt(s(406))/5)+parseInt(s(442))/6*(parseInt(s(472))/7)+-parseInt(s(478))/8+-parseInt(s(433))/9+parseInt(s(470))/10*(parseInt(s(451))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Jn);class Xn extends Bi{constructor(t){const e=qn;super(),this[e(455)]=[],this.player=t,this[e(424)]=null,this[e(408)]=null,this[e(420)]=null,this[e(416)]=null,this[e(440)]=!1,this[e(407)]=new(window[e(413)]||window.webkitAudioContext)({sampleRate:Ot}),this[e(434)]=this[e(407)][e(479)]();const s=this[e(407)].createBufferSource();s.buffer=this.audioContext.createBuffer(1,1,22050),s[e(425)](this[e(407)][e(438)]),s[e(467)]?s.noteOn(0):s[e(426)](0),this[e(458)]=s,this[e(441)]=this[e(407)][e(454)](),this.gainNode[e(460)][e(480)]=0,this._prevVolume=null,this[e(444)]=!1,this[e(418)]={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""},this.init=!1,this.hasAudio=!1,this.audioResumeStateTimeout=null,this.audioContextContextResumeLock=!1}async[Yn(436)](){const t=Yn;return this[t(428)](),this[t(414)](),this.clearAudioResumeStateTimeout(),this[t(407)]&&(await this.audioContext[t(443)](),this[t(407)]=null),this[t(434)]&&(this[t(434)][t(474)](),this.gainNode=null),this[t(439)]=!1,this[t(444)]=!1,this.scriptNode&&(this[t(408)][t(474)](),this.scriptNode.onaudioprocess=Fe,this[t(408)]=null),await this[t(453)](),this[t(420)]&&(this[t(420)].disconnect(),this.workletProcessorNode[t(469)][t(471)]=Fe,this[t(420)]=null),this[t(458)]&&(this[t(458)][t(477)](),this[t(458)]=null),this[t(441)]&&(this[t(441)][t(474)](),this.mediaStreamAudioDestinationNode=null),this[t(440)]=!1,this[t(466)]=null,this[t(405)]=!1,this[t(456)](),!0}[Yn(453)](){return new Promise(((t,e)=>{const s=qn;this[s(420)]?(this.workletProcessorNode[s(469)][s(422)]({type:"destroy"}),this[s(416)]=setTimeout((()=>{const e=s;this[e(445)].debugLog(this[e(429)],e(432)),this[e(416)]&&(clearTimeout(this[e(416)]),this[e(416)]=null),t()}),10)):t()}))}[Yn(414)](){const t=Yn;this[t(418)]={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""},this[t(483)]=!1}getAudioInfo(){return this[Yn(418)]}[Yn(476)](t){const e=Yn;t.encTypeCode&&(this[e(418)].encTypeCode=t.encTypeCode,this[e(418)][e(452)]=Q[t[e(468)]]),t[e(430)]&&(this[e(418)][e(430)]=t[e(430)]),t.sampleRate&&(this[e(418)][e(449)]=t[e(449)]),t.depth&&(this.audioInfo[e(457)]=t[e(457)]),this[e(418)][e(449)]&&this[e(418)][e(430)]&&this.audioInfo[e(452)]&&!this[e(483)]&&(this[e(445)][e(447)](M[e(418)],this.audioInfo),this[e(483)]=!0)}get isPlaying(){return this[Yn(444)]}get[Yn(482)](){const t=Yn;return 0===this[t(434)][t(460)].value||this[t(435)]()}get volume(){const t=Yn;return this[t(434)].gain[t(480)]}get[Yn(475)](){const t=Yn;return this[t(455)][t(450)]}get audioContextState(){const t=Yn;let e=null;return this[t(407)]&&(e=this[t(407)][t(463)]),e}[Yn(412)](){}initMobileScriptNode(){}initWorkletScriptNode(){}[Yn(437)](){return""}mute(t){const e=Yn;t?(this[e(459)](0),this.clear()):this.setVolume(this[e(445)][e(421)]||.5)}[Yn(459)](t){const e=Yn;t=parseFloat(t)[e(402)](2),isNaN(t)||(this[e(448)](!0),t=Ve(t,0,1),null!==this[e(466)]&&this[e(466)]===t||(null===this[e(466)]?this[e(445)][e(447)](M.mute,0===t):0===this[e(466)]&&t>0?this[e(445)][e(447)](M[e(409)],!1):this[e(466)]>0&&0===t&&this[e(445)][e(447)](M[e(409)],!0),this[e(434)][e(460)][e(480)]=t,this[e(445)][e(447)](M[e(484)],this.player[e(415)]),this[e(445)].emit(M.volume,this[e(445)][e(415)]),this[e(466)]=t))}[Yn(428)](){const t=Yn;this.hasInitScriptNode&&(this[t(408)]&&this[t(408)][t(474)](this[t(434)]),this[t(420)]&&this[t(420)].disconnect(this.gainNode),this[t(434)]&&(this[t(424)]?this[t(434)][t(474)](this[t(441)]):this[t(434)].disconnect(this.audioContext[t(438)]))),this[t(403)]()}[Yn(448)](t){const e=Yn;if(t&&this.isStateSuspended()){if(this[e(405)])return;this[e(405)]=!0,this[e(407)][e(410)]()[e(404)]((()=>{const t=e;this[t(445)].emit(M[t(411)],{state:this[t(464)],isRunning:this.isStateRunning()})}))[e(446)]((()=>{this[e(405)]=!1})),this.audioResumeStateTimeout=setTimeout((()=>{const t=e;this[t(486)](),this[t(405)]=!1,this[t(435)]()&&this[t(445)].emit(M[t(411)],{state:this.audioContextState,isRunning:this[t(423)]()})}),1e3)}}[Yn(423)](){return"running"===this[Yn(464)]}[Yn(435)](){const t=Yn;return this[t(464)]===t(419)}clearAudioResumeStateTimeout(){this[Yn(427)]&&(clearTimeout(this.audioResumeStateTimeout),this.audioResumeStateTimeout=null)}[Yn(403)](){this[Yn(455)]=[]}[Yn(473)](t,e){}[Yn(417)](){this.playing=!1}[Yn(410)](){this[Yn(444)]=!0}[Yn(465)](t){}[Yn(462)](){return 0}}function Zn(t,e){const s=eo();return(Zn=function(t,e){return s[t-=167]})(t,e)}const $n=Zn;!function(t,e){const s=Zn,i=t();for(;;)try{if(366814===-parseInt(s(185))/1*(parseInt(s(182))/2)+-parseInt(s(177))/3*(parseInt(s(189))/4)+-parseInt(s(190))/5+-parseInt(s(172))/6+-parseInt(s(193))/7*(parseInt(s(171))/8)+-parseInt(s(187))/9+parseInt(s(184))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(eo);class to{constructor(t,e,s,i){const r=Zn;this[r(168)]=t,this[r(186)]=e,this.channel=s,this[r(170)]=i}destroy(){const t=Zn;this[t(175)]=null,this[t(179)]=null}[$n(181)](t,e){const s=$n;let i=this[s(188)](e);for(let e=0;e=a){try{for(let t=0;t2&&void 0!==arguments[2]?arguments[2]:0;const r=2*(e=e||0);!(i>=0)&&(i=(t[s(470)]-r)/2);const n=2*i;this[s(453)](i+this._frameCount);const o=this[s(546)];this[s(497)][s(472)](t[s(415)](r,r+n),o),this[s(507)]+=i}[so(484)](t,e){const s=so;let i=arguments[s(470)]>2&&void 0!==arguments[2]?arguments[2]:0;e=e||0,!(i>=0)&&(i=t[s(532)]-e),this[s(454)](t[s(497)],t[s(517)]+e,i)}[so(545)](t){const e=so;(!(t>=0)||t>this[e(507)])&&(t=this.frameCount),this._frameCount-=t,this[e(515)]+=t}[so(448)](t){const e=so;let s=arguments[e(470)]>1&&void 0!==arguments[1]?arguments[1]:0;const i=2*s,r=this.startIndex;t[e(472)](this[e(481)][e(415)](r,r+i)),this.receive(s)}[so(426)](t){const e=so;let s=arguments[e(470)]>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this.startIndex+2*s,n=2*i;t[e(472)](this[e(481)].subarray(r,r+n))}ensureCapacity(){const t=so;let e=arguments[t(470)]>0&&void 0!==arguments[0]?arguments[0]:0;const s=parseInt(2*e);if(this._vector[t(470)]0&&void 0!==arguments[0]?arguments[0]:0;this.ensureCapacity(this._frameCount+t)}rewind(){const t=so;this[t(515)]>0&&(this._vector[t(472)](this[t(481)][t(415)](this[t(475)],this.endIndex)),this[t(515)]=0)}}function ro(t,e){const s=ao();return(ro=function(t,e){return s[t-=413]})(t,e)}class no{constructor(t){const e=so;t?(this[e(458)]=new io,this[e(502)]=new io):this._inputBuffer=this[e(502)]=null}[so(527)](){const t=so;this.clear(),this._outputBuffer&&(this[t(502)][t(527)](),this._outputBuffer=null),this._inputBuffer&&(this[t(458)][t(527)](),this[t(458)]=null)}get[so(414)](){return this._inputBuffer}set[so(414)](t){this[so(458)]=t}get[so(428)](){return this._outputBuffer}set[so(428)](t){this._outputBuffer=t}clear(){const t=so;this._inputBuffer.clear(),this[t(502)][t(491)]()}}class oo extends no{constructor(t){const e=so;super(t),this.reset(),this[e(530)]=1}[so(527)](){super[so(527)]()}set[so(429)](t){this._rate=t}[so(420)](){const t=so;this[t(442)]=0,this[t(447)]=0,this[t(451)]=0}[so(473)](){const t=so,e=new oo;return e[t(429)]=this[t(530)],e}process(){const t=so,e=this[t(458)][t(532)];this._outputBuffer.ensureAdditionalCapacity(e/this._rate+1);const s=this[t(542)](e);this[t(458)][t(545)](),this[t(502)][t(498)](s)}[so(542)](){const t=so;let e=arguments[t(470)]>0&&void 0!==arguments[0]?arguments[0]:0;if(0===e)return 0;const s=this[t(458)][t(497)],i=this[t(458)][t(475)],r=this[t(502)][t(497)],n=this[t(502)][t(546)];let o=0,a=0;for(;this[t(442)]<1;)r[n+2*a]=(1-this.slopeCount)*this[t(447)]+this[t(442)]*s[i],r[n+2*a+1]=(1-this[t(442)])*this[t(451)]+this[t(442)]*s[i+1],a+=1,this[t(442)]+=this[t(530)];if(this.slopeCount-=1,1!==e)t:for(;;){for(;this[t(442)]>1;)if(this[t(442)]-=1,o+=1,o>=e-1)break t;const h=i+2*o;r[n+2*a]=(1-this.slopeCount)*s[h]+this.slopeCount*s[h+2],r[n+2*a+1]=(1-this[t(442)])*s[h+1]+this[t(442)]*s[h+3],a+=1,this[t(442)]+=this[t(530)]}return this.prevSampleL=s[i+2*e-2],this[t(451)]=s[i+2*e-1],a}}function ao(){const t=["11119603bnZMol","fillInputBuffer","outputBufferPosition","sourceSound","max","detail","length","dualChannel","set","clone","ensureAdditionalCapacity","startIndex","seekWindowMs","stretch","13853176JnoXvv","formattedTimePlayed","name","_vector","off","preCalculateCorrelationReferenceStereo","putBuffer","seekBestOverlapPosition","1895ZVflLC","callback","546QWJynB","removeEventListener","calculateOverlapLength","clear","node","join","historyBufferSize","handleSampleData","_soundtouch","vector","put","timePlayed","sequenceMs","quickSeek","_outputBuffer","fillOutputBuffer","exp","seekWindowLength","onaudioprocess","_frameCount","6208750EwUMVb","floor","sampleReq","_sourcePosition","421782ZhNTDl","nominalSkip","overlapMs","_position","skipFract","position","overlap","overlapLength","sampleRate","New position may not be greater than current position","pipe","pitchSemitones","rewind","_quickSeek","_intermediateBuffer","destroy","18cZgBRK","calculateSequenceParameters","_rate","calculateEffectiveRateAndTempo","frameCount","listeners","process","24vvoUeb","_filter","_tempo","calculateCrossCorrelationStereo","_pipe","virtualPitch","min","transpose","fillInputBuffer() not overridden","push","receive","endIndex","seekLength","refMidBuffer","virtualRate","566HaMHGD","inputBuffer","subarray","pitchOctaves","MIN_VALUE","seekBestOverlapPositionStereoQuick","rateChange","reset","transposer","7klkiPz","duration","1137264uWdhUI","sourcePosition","extract","percentagePlayed","outputBuffer","rate","virtualTempo","onEnd","setParameters","numberOfChannels","filter","18YivGZv","call","autoSeqSetting","midBufferDirty","inputChunkSize","autoSeekSetting","connect","slopeCount","tempo","_node","dispatchEvent","seekBestOverlapPositionStereo","prevSampleL","receiveSamples","checkLimits","buffer","prevSampleR","outputChunkSize","ensureCapacity","putSamples","getChannelData","pitch","midBuffer","_inputBuffer","overlapStereo","disconnect","New position falls outside of history buffer","352345RoGabg","clearMidBuffer"];return(ao=function(){return t})()}class ho{constructor(t){this[so(539)]=t}[so(527)](){}get[so(522)](){return this[so(539)]}get[so(414)](){const t=so;return this._pipe[t(414)]}get outputBuffer(){const t=so;return this._pipe[t(428)]}[so(465)](){throw new Error(so(543))}[so(503)](){const t=so;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;for(;this[t(428)][t(532)]2&&void 0!==arguments[2]?arguments[2]:co;super(e),this[s(487)]=i,this[s(467)]=t,this.historyBufferSize=22050,this[s(511)]=0,this[s(466)]=0,this[s(515)]=0}[so(527)](){const t=so;this.clear(),this.sourceSound.destroy(),this[t(467)]=null,this[t(511)]=0,this[t(466)]=0,this[t(515)]=0}get[so(517)](){return this[so(515)]}set[so(517)](t){const e=so;if(t>this[e(515)])throw new RangeError(e(521));const s=this.outputBufferPosition-(this[e(515)]-t);if(s<0)throw new RangeError(e(461));this[e(466)]=s,this[e(515)]=t}get[so(425)](){return this[so(511)]}set[so(425)](t){const e=so;this[e(491)](),this[e(511)]=t}[so(431)](){this.callback()}[so(465)](){const t=so;let e=arguments[t(470)]>0&&void 0!==arguments[0]?arguments[0]:0;const s=new Float32Array(2*e),i=this.sourceSound[t(426)](s,e,this[t(511)]);this._sourcePosition+=i,this[t(414)][t(454)](s,0,i)}[so(426)](t){const e=so;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this[e(503)](this[e(466)]+s);const i=Math.min(s,this[e(428)][e(532)]-this.outputBufferPosition);this[e(428)][e(426)](t,this[e(466)],i);const r=this[e(466)]+i;return this[e(466)]=Math.min(this[e(494)],r),this[e(428)][e(545)](Math[e(468)](r-this.historyBufferSize,0)),this[e(515)]+=i,i}[so(495)](t){this.extract(t.data,4096)}clear(){const t=so;super[t(491)](),this[t(466)]=0}}const uo=[[124,186,248,310,372,434,496,558,620,682,744,806,868,930,992,1054,1116,1178,1240,1302,1364,1426,1488,0],[-100,-75,-50,-25,25,50,75,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-20,-15,-10,-5,5,10,15,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-4,-3,-2,-1,1,2,3,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],po=-10/1.5;class fo extends no{constructor(t){const e=so;super(t),this[e(525)]=!0,this[e(438)]=!1,this.midBuffer=null,this[e(548)]=null,this.overlapLength=0,this[e(437)]=!0,this.autoSeekSetting=!0,this[e(537)]=1,this[e(432)](44100,0,0,8)}[so(527)](){const t=so;this[t(491)](),super[t(527)]()}clear(){const t=so;super[t(491)](),this[t(463)](),this[t(548)]=null}[so(463)](){const t=so;this.midBufferDirty&&(this[t(438)]=!1),this.midBuffer=null}setParameters(t,e,s,i){const r=so;t>0&&(this[r(520)]=t),i>0&&(this[r(514)]=i),e>0?(this[r(500)]=e,this[r(437)]=!1):this.autoSeqSetting=!0,s>0?(this.seekWindowMs=s,this[r(440)]=!1):this[r(440)]=!0,this[r(529)](),this.calculateOverlapLength(this[r(514)]),this[r(443)]=this[r(537)]}set[so(443)](t){const e=so;let s;this._tempo=t,this[e(529)](),this.nominalSkip=this[e(537)]*(this[e(505)]-this[e(519)]),this[e(516)]=0,s=Math[e(509)](this.nominalSkip+.5),this[e(510)]=Math[e(468)](s+this[e(519)],this[e(505)])+this[e(547)]}get[so(443)](){return this[so(537)]}get[so(439)](){return this[so(510)]}get[so(452)](){const t=so;return this.overlapLength+Math[t(468)](0,this[t(505)]-2*this[t(519)])}[so(490)](){const t=so;let e,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;e=this[t(520)]*s/1e3,e=e<16?16:e,e-=e%8,this.overlapLength=e,this[t(548)]=new Float32Array(2*this.overlapLength),this[t(457)]=new Float32Array(2*this[t(519)])}checkLimits(t,e,s){return ts?s:t}[so(529)](){const t=so;let e,s;this.autoSeqSetting&&(e=150+-50*this[t(537)],e=this.checkLimits(e,50,125),this[t(500)]=Math[t(509)](e+.5)),this.autoSeekSetting&&(s=28.333333333333332+po*this._tempo,s=this[t(449)](s,15,25),this[t(476)]=Math.floor(s+.5)),this.seekWindowLength=Math[t(509)](this.sampleRate*this[t(500)]/1e3),this[t(547)]=Math[t(509)](this[t(520)]*this[t(476)]/1e3)}set[so(501)](t){this[so(525)]=t}[so(473)](){const t=so,e=new fo;return e[t(443)]=this._tempo,e[t(432)](this[t(520)],this[t(500)],this.seekWindowMs,this[t(514)]),e}[so(485)](){const t=so;return this[t(525)]?this[t(418)]():this[t(446)]()}[so(446)](){const t=so;let e,s,i,r=0;for(this[t(483)](),e=0,s=Number[t(417)];rs&&(s=i,e=r);return e}seekBestOverlapPositionStereoQuick(){const t=so;let e,s,i,r,n,o=0;for(this.preCalculateCorrelationReferenceStereo(),s=Number[t(417)],e=0,r=0,n=0;o<4;o+=1){let a=0;for(;uo[o][a]&&(n=r+uo[o][a],!(n>=this[t(547)]));)i=this[t(538)](2*n,this[t(548)]),i>s&&(s=i,e=n),a+=1;r=e}return e}[so(483)](){const t=so;let e,s,i=0;for(;i=this[t(510)];){e=this[t(485)](),this[t(502)].ensureAdditionalCapacity(this[t(519)]),this[t(518)](Math[t(509)](e)),this[t(502)].put(this[t(519)]),s=this[t(505)]-2*this.overlapLength,s>0&&this[t(502)].putBuffer(this[t(458)],e+this[t(519)],s);const r=this[t(458)][t(475)]+2*(e+this[t(505)]-this[t(519)]);this.midBuffer[t(472)](this._inputBuffer[t(497)][t(415)](r,r+2*this[t(519)])),this[t(516)]+=this[t(513)],i=Math[t(509)](this[t(516)]),this[t(516)]-=i,this._inputBuffer.receive(i)}}}const mo=function(t,e){return(t>e?t-e:e-t)>1e-10};class go{constructor(){const t=so;this[t(421)]=new oo(!1),this[t(477)]=new fo(!1),this[t(458)]=new io,this[t(526)]=new io,this._outputBuffer=new io,this[t(530)]=0,this[t(537)]=0,this[t(540)]=1,this[t(549)]=1,this[t(430)]=1,this[t(531)]()}[so(527)](){const t=so;this[t(491)](),this[t(458)][t(527)](),this[t(526)][t(527)](),this._outputBuffer[t(527)](),this[t(458)]=null,this[t(526)]=null,this[t(502)]=null}[so(491)](){const t=so;this[t(421)][t(491)](),this[t(477)][t(491)]()}clone(){const t=so,e=new go;return e.rate=this[t(429)],e[t(443)]=this[t(443)],e}get[so(429)](){return this[so(530)]}set rate(t){const e=so;this.virtualRate=t,this[e(531)]()}set[so(419)](t){this[so(530)]=1+.01*t}get[so(443)](){return this._tempo}set[so(443)](t){const e=so;this[e(430)]=t,this[e(531)]()}set tempoChange(t){this.tempo=1+.01*t}set[so(456)](t){const e=so;this[e(540)]=t,this[e(531)]()}set[so(416)](t){const e=so;this.pitch=Math[e(504)](.69314718056*t),this[e(531)]()}set pitchSemitones(t){this[so(416)]=t/12}get inputBuffer(){return this[so(458)]}get[so(428)](){return this._outputBuffer}[so(531)](){const t=so,e=this[t(537)],s=this[t(530)];this[t(537)]=this[t(430)]/this[t(540)],this[t(530)]=this.virtualRate*this[t(540)],mo(this[t(537)],e)&&(this[t(477)].tempo=this[t(537)]),mo(this._rate,s)&&(this[t(421)][t(429)]=this[t(530)]),this[t(530)]>1?this[t(502)]!=this[t(421)][t(428)]&&(this[t(477)][t(414)]=this[t(458)],this[t(477)].outputBuffer=this[t(526)],this[t(421)].inputBuffer=this[t(526)],this[t(421)][t(428)]=this._outputBuffer):this[t(502)]!=this[t(477)][t(428)]&&(this[t(421)].inputBuffer=this[t(458)],this.transposer.outputBuffer=this[t(526)],this[t(477)][t(414)]=this._intermediateBuffer,this.stretch[t(428)]=this._outputBuffer)}[so(534)](){const t=so;this[t(530)]>1?(this[t(477)].process(),this[t(421)][t(534)]()):(this.transposer[t(534)](),this[t(477)][t(534)]())}}so(527),so(471),so(517),so(517),so(426);const Ao=function(t){const e=Math[so(509)](t/60);return e+":"+function(t,e,s){const i=so;return s=s||"0",(t+="").length>=e?t:new Array(e-t[i(470)]+1)[i(493)](s)+t}(parseInt(t-60*e),2)};so(527),so(479),so(427),so(492),so(456),so(523),so(429),so(441),so(460),so(482);const yo=vo;function bo(){const t=["extract","995uOtKUm","2595579sjfzag","1048162nosVRh","tempo","419102NfGMzp","player","audio","provide","destroy","3763188UAHanN","82788jyWJAJ","filter","7914jkBSQt","4467328rofcie","3IbMvra","rate","soundTouch"];return(bo=function(){return t})()}function vo(t,e){const s=bo();return(vo=function(t,e){return s[t-=231]})(t,e)}!function(t,e){const s=vo,i=t();for(;;)try{if(367318===parseInt(s(246))/1+parseInt(s(244))/2*(-parseInt(s(238))/3)+-parseInt(s(234))/4+-parseInt(s(242))/5*(-parseInt(s(236))/6)+parseInt(s(243))/7+-parseInt(s(237))/8+parseInt(s(233))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(bo);class So{constructor(t,e,s){const i=vo;this[i(247)]=t,this[i(248)]=e,this[i(240)]=new go,this[i(240)][i(245)]=1,this[i(240)][i(239)]=1,this.filter=new lo(s,this[i(240)])}[yo(232)](){const t=yo;this[t(235)]&&(this[t(235)].destroy(),this[t(235)]=null),this[t(240)]&&(this[t(240)].destroy(),this[t(240)]=null)}setRate(t){const e=yo;t!==this.soundTouch[e(239)]&&(this[e(240)][e(245)]=t)}[yo(231)](t){const e=yo;let s=new Float32Array(2*t),i=this[e(235)][e(241)](s,t),r=new Float32Array(i),n=new Float32Array(i);for(let t=0;t{"init"===t.data.message?(this.audioBufferSize=t.data.audioBufferSize,this.start=t.data.start,this.channels=t.data.channels,this.state=0,this.offset=0,this.samplesArray=[]):"stop"===t.data.message?(this.state=0,this.start=!1,this.offset=0,this.samplesArray=[]):"data"===t.data.message?this.samplesArray.push(t.data.buffer):"zero"===t.data.message&&this.samplesArray.push({left:new Float32Array(this.audioBufferSize).fill(0),right:new Float32Array(this.audioBufferSize).fill(0)})}}process(t,e,s){const i=e[0][0],r=e[0][1];if(0===this.offset&&this.port.postMessage({message:"beep"}),0===this.state)this.state=1;else if(1===this.state&&this.samplesArray.length>=4)this.state=2;else if(2===this.state){const t=this.samplesArray[0];for(let e=0;e 1000 and update audioTimestamp from ","defaultPlaybackRate","fill","readyState","calcPlaybackRateByBuffer","init","getEngineType"," less than diff :"," and audioTimestamp is ","playing","-100%","workletProcessorNode is null","initIntervalScriptNode","left","getChannelData","createScriptProcessor","engine active , audioSyncVideoOption ","144536FSZDsN","length",", speed up, playbackRate is ","join"," or playing is ","abs","push","stream","videoBufferMax","assign"," ,\n and audio is ","port","removeEventListener","handleScriptNodeCallback","eventListenList",",\n and video is ",",\n and bufferlist is ","buffer","getAutoAudioEngineType","interval script node and bufferList is ","96kjtJSu","absolute","playbackRate",",\n and bufferList is ","audioElementPlay","supportLockScreenPlayAudio","outputBuffer"," > -","debugLog","988105UygWmI","channels","clearWorkletUrlTimeout","addModule",",\n speed up, playbackRate is ","shift","processor","canplay","initProcessor","createBufferSource","play failed and retry play","bufferList length ","fillScriptNodeOutputBuffer","getAudioBufferSizeByType","isPlayVod","video","mediaStreamAudioDestinationNode","volume"," to ","_delayPlay","debugError","audioSyncVideoOption ","weiXinInAndroidAudioBufferSize","start","bufferList size is ","scriptStartTime","player","provide","836384kbFaRJ","revokeObjectURL","initProcessScriptNode","AudioContext"];return(To=function(){return t})()}!function(t,e){const s=Eo,i=t();for(;;)try{if(133972===-parseInt(s(486))/1+-parseInt(s(517))/2+parseInt(s(599))/3*(-parseInt(s(537))/4)+parseInt(s(546))/5+parseInt(s(482))/6*(-parseInt(s(471))/7)+-parseInt(s(574))/8+-parseInt(s(490))/9*(-parseInt(s(597))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(To);class ko extends Xn{constructor(t){const e=Eo;super(t),this[e(581)]=e(577),this.defaultPlaybackRate=1,this[e(539)]=1,this.rateProcessor=null,this.processor=null,this[e(587)]=null,this.engineType=this[e(535)](),this[e(450)]=this[e(559)](),this[e(494)]=null,this[e(565)]=!1,this[e(531)]=[],this[e(467)]=null,this[e(548)]=null,this.player._opt[e(542)]&&es()&&(this[e(494)]=document[e(498)](e(586)),Object[e(526)](this[e(494)].style,{position:e(538),left:e(510),top:e(510)}),t[e(604)]?t.$container.appendChild(this[e(494)]):document.body.appendChild(this[e(494)]),this[e(493)](),this.player[e(545)]("AudioContext",e(497))),this.scriptStartTime=0,this[e(572)][e(545)](e(577),e(505),e(603)+this[e(615)]+e(485)+this.audioBufferSize)}async destroy(){const t=Eo;return await super[t(446)](),this[t(467)]&&(URL[t(575)](this[t(467)]),this[t(467)]=null),this[t(548)]&&(clearTimeout(this.clearWorkletUrlTimeout),this[t(548)]=null),this[t(531)][t(518)]&&(this[t(531)][t(459)]((t=>{t()})),this[t(531)]=[]),this[t(494)]&&(this[t(494)][t(602)](),this[t(494)].srcObject=null,this[t(494)].parentNode&&this[t(494)][t(592)].removeChild(this[t(494)]),this[t(494)]=null),this[t(552)]&&(this[t(552)][t(446)](),this.processor=null),this[t(465)]&&(this[t(465)][t(446)](),this[t(465)]=null),this.scriptNodeInterval&&(clearInterval(this.scriptNodeInterval),this.scriptNodeInterval=null),this[t(501)]=1,this[t(539)]=1,this[t(571)]=0,this[t(450)]=0,this[t(615)]=gt[t(456)],this[t(572)][t(545)]("AudioContext",t(446)),!0}[Io(478)](){const t=Io;return this[t(494)]&&ci(this[t(494)][t(480)])&&ci(this.$audio[t(594)])&&0!==this[t(494)][t(539)]&&0!==this.$audio.readyState}[Io(493)](){const t=Io,{proxy:e}=this[t(572)][t(474)],s=e(this[t(494)],t(553),(()=>{const e=t;this[e(572)].debugLog(e(577),e(553)),this[e(565)]&&this._audioElementPlay()}));this[t(531)][t(523)](s)}[Io(448)](){const t=Io;let e=0;return this[t(494)]&&(e=this.$audio[t(503)]),e}audioElementPlay(){const t=Io;if(this[t(494)]){const e=this[t(448)]();if(this[t(572)].debugLog(t(577),t(488)+e),!(0!==e||Fs()&&es()))return this[t(572)].debugWarn(t(577),t(466)),void(this[t(565)]=!0);this._audioElementPlay()}}_audioElementPlay(){const t=Io;this[t(494)]&&this[t(494)][t(461)]()[t(470)]((()=>{const e=t;this[e(565)]=!1,this[e(572)][e(545)](e(577),"_audioElementPlay success and volume is ",this[e(494)][e(563)]),setTimeout((()=>{const t=e;!this[t(478)]()&&(this[t(572)].debugWarn("AudioContext",t(556)),this._audioElementPlay())}),100),this[e(478)]()&&(this[e(572)][e(545)](e(577),"play success and remove document click event listener"),document[e(529)](e(476),this[e(432)].bind(this)))}))[t(438)]((e=>{const s=t;this[s(572)][s(566)](s(577),s(589),e),this.player.debugLog(s(577),s(595)),document[s(593)]("click",this._audioElementPlay[s(477)](this))}))}[Io(580)](){return this[Io(450)]}get[Io(612)](){const t=Io;return this[t(450)]/this[t(463)][t(451)]*1e3}get[Io(605)](){return this[Io(615)]===gt.active}getBufferListDuration(){const t=Io;return this.bufferList.length*this[t(612)]}[Io(617)](){const t=Io;return this[t(443)]()>=100*this[t(539)]}initProcessor(){const t=Io;this[t(552)]=new to(this[t(572)],this,this[t(600)][t(547)],this[t(450)]),this[t(465)]=new So(this[t(572)],this,this[t(552)])}[Io(535)](){const t=Io;let e=this[t(572)][t(447)][t(578)]||gt.script;const s=()=>{const s=t;e=(Us()||es()&&this.player[s(447)][s(542)]||Xs()&&this[s(613)](),gt[s(456)])};return this.player._opt[t(578)]?this[t(572)]._opt[t(578)]===gt[t(610)]&&Xs()&&this.supportAudioWorklet()?e=gt[t(456)]:this.player[t(447)].audioEngine===gt[t(469)]?e=gt[t(469)]:this.player._opt[t(578)]===gt[t(456)]?e=gt[t(456)]:s():s(),e}[Io(559)](){const t=Io,e=this[t(615)];this[t(572)][t(447)][t(454)];const s=this.player._opt[t(568)];return e===gt[t(610)]?1024:e===gt[t(469)]?s||4800:(t(456),1024)}[Io(613)](){const t=Io;return this[t(463)]&&this[t(463)][t(611)]&&typeof this[t(463)][t(611)][t(549)]===t(439)}[Io(496)](){const t=Io;this[t(509)]=!0,this[t(462)]||(this[t(554)](),this[t(615)]===gt[t(610)]?this[t(453)]():this[t(615)]===gt[t(469)]?this[t(512)]():this[t(615)]===gt[t(456)]&&this[t(576)](),this[t(541)]())}[Io(506)](){return this[Io(615)]}[Io(437)](){const t=Io;return this[t(539)]>this[t(501)]}[Io(576)](){const t=Io,e=this[t(463)][t(515)](this[t(450)],0,this.audioInfo[t(547)]);e.onaudioprocess=e=>{const s=e[t(543)];this.handleScriptNodeCallback(s)},e[t(583)](this.gainNode),this.scriptNode=e,this.$audio?(this.gainNode[t(583)](this[t(562)]),this.$audio[t(590)]=this.mediaStreamAudioDestinationNode[t(524)]):this[t(473)][t(583)](this[t(463)][t(455)]),this.hasInitScriptNode=!0}[Io(512)](){const t=Io;this[t(571)]=0;const e=1e3*this.audioBufferSize/this[t(463)][t(451)];this[t(587)]=setInterval((()=>{const e=t;if(0===this[e(609)][e(518)]||ci(this.playing)||this[e(584)])return void(this[e(509)]&&ci(this[e(584)])&&this.player[e(545)](e(577),e(536)+this[e(609)][e(518)]+e(521)+this[e(509)]));const s=this.audioContext[e(555)](),i=this[e(463)][e(492)](this.audioInfo[e(547)],this[e(450)],this[e(463)][e(451)]);this[e(530)](i,(()=>{const t=e;this[t(571)]{const e=t;if(this[e(572)][e(475)]())return void this.player[e(545)](e(577),e(585));if(!this.audioContext)return void this[e(572)][e(445)]("AudioContext","initWorkletScriptNode audioContext is null");let s=[1];2===this[e(600)][e(547)]&&(s=[1,1]);try{this[e(606)]=new AudioWorkletNode(this[e(463)],e(436),{numberOfOutputs:this[e(600)].channels,outputChannelCount:s})}catch(t){this[e(572)][e(566)](e(577),"initWorkletScriptNode error",t),this[e(606)]=null,this[e(495)]()}this[e(606)]&&(this[e(606)][e(583)](this[e(473)]),this[e(494)]?(this[e(473)][e(583)](this.mediaStreamAudioDestinationNode),this[e(494)].srcObject=this[e(562)].stream):this[e(473)][e(583)](this.audioContext[e(455)]),this[e(462)]=!0,this[e(606)][e(528)][e(598)]({message:e(505),audioBufferSize:this[e(450)],start:!0,channels:this[e(600)][e(547)]}),this[e(606)][e(528)].onmessage=t=>{const s=e;this[s(606)]?this[s(463)]?this.handleScriptNodeCallback(this[s(606)],null,!0):this.workletProcessorNode.port[s(598)]({message:"zero"}):this.player[s(566)](s(577),s(511))})})),this[t(548)]=setTimeout((()=>{const e=t;URL[e(575)](this.workletUrl),this[e(467)]=null,this[e(548)]=null}),T)}[Io(495)](){const t=Io;this[t(572)][t(545)]("AudioContext","tierDownToProcessScript"),this[t(615)]=gt.script,this[t(450)]=this[t(559)](),this[t(576)](),this[t(541)]()}[Io(530)](t,e){const s=Io;let i=arguments[s(518)]>2&&void 0!==arguments[2]&&arguments[2];e=e||Fe;let r,n=t[s(518)];i&&(r=t,n=this.audioBufferSize);const o=this.audioInfo[s(547)];if(this[s(509)]&&this[s(617)]()){if(this[s(572)][s(447)],this.player.isDestroyedOrClosed())return this[s(572)].debugLog(this[s(581)],"handleScriptNodeCallback() player is destroyed or closed"),i?r[s(528)][s(598)]({message:"zero"}):this[s(558)](t,o),void e();if(this[s(572)][s(472)]()&&hi(this.player[s(491)])){this[s(608)]();const n=this[s(572)][s(441)]();if(n>this[s(572)][s(447)].syncAudioAndVideoDiff){const a=this.player.getCurrentVideoAndAudio(),h=this[s(614)]();return this[s(572)][s(445)](s(577),"audioSyncVideoOption more than diff :"+n+s(532)+a[s(561)]+s(527)+a[s(586)]+s(444)+this[s(609)][s(518)]+s(434)+h[s(520)](",")+s(619)),i?r[s(528)].postMessage({message:s(601)}):this[s(558)](t,o),void e()}}let a=this._provide(n);if(0===a[s(588)])return ci(this[s(572)][s(591)]())&&this[s(572)][s(445)](s(577),s(570)+this[s(609)][s(518)]+s(484)+n+s(499)+this[s(539)]+", fill zero"),i?r[s(528)][s(598)]({message:s(601)}):this[s(558)](t,o),void e();a&&a.ts&&(this[s(572)].audioTimestamp=a.ts),i?r.port[s(598)]({message:s(452),buffer:a}):this[s(558)](t,o,a),e()}else 0===this[s(609)][s(518)]&&this.playing&&ci(this[s(584)])&&ci(this.player[s(591)]())&&ci(this[s(572)][s(618)]())&&this[s(572)][s(445)]("AudioContext",s(457)+n+s(607)),i?r.port[s(598)]({message:s(601)}):this.fillScriptNodeOutputBuffer(t,o),e()}[Io(558)](t,e,s){const i=Io;if(1===e){const e=t[i(514)](0);s?0===s[i(588)]?e[i(502)](0):e[i(440)](s[i(513)]):e[i(502)](0)}else if(2===e){const e=t[i(514)](0),r=t[i(514)](1);s?0===s[i(588)]?(e[i(502)](0),r[i(502)](0)):(e[i(440)](s[i(513)]),r[i(440)](s.right)):(e[i(502)](0),r[i(502)](0))}}[Io(461)](t,e){const s=Io;if(!this[s(584)])if(this.hasInitScriptNode){if(this.hasAudio=!0,this.player.latestAudioTimestamp=e,this[s(609)].push({buffer:t,ts:e}),this.player[s(560)]()){const t=this.bufferList[0],e=this.player.audioTimestamp,i=Math[s(522)](t.ts-e);i>1e3&&(this.player[s(483)]=t.ts,this[s(572)].debugLog(this[s(581)],s(460)+t.ts+s(508)+e+", diff is "+i+s(500)+e+s(564)+t.ts))}ci(this[s(572)][s(472)]())&&hi(this[s(572)].isPlayStream())&&this[s(504)]()}else this[s(572)][s(445)]("AudioContext","play has not init script node")}[Io(608)](){const t=Io;if(this[t(584)])return;if(!this.playing)return;const e=Math.floor(2e3/this.oneBufferDuration);if(this[t(609)].length>e)return this[t(572)].debugWarn(t(577),t(557)+this.bufferList[t(518)]+t(579)+e+t(616)),void this[t(596)]();const s=this[t(572)][t(441)]();if(this[t(506)]()===gt[t(469)]){if(s<-this[t(572)]._opt.syncAudioAndVideoDiff){this[t(572)][t(445)]("AudioContext",t(516)+-this[t(572)][t(447)][t(464)]+" less than diff :"+s+t(533)+this[t(609)][t(518)]);const e=this[t(572)][t(489)]();for(;this[t(609)][t(518)]>0;){const s=this[t(609)][0],i=s.ts-e;if(i>-this[t(572)]._opt[t(464)]/2){this[t(572)][t(483)]=s.ts,this[t(572)].debugLog(t(577),t(442)+s.ts+t(458)+e+", diff is "+i+" > -"+this[t(572)][t(447)][t(464)]/2+" and end");break}this[t(609)][t(551)](),this[t(572)][t(483)]=s.ts}}}else{let e=this[t(539)];s<-this[t(572)][t(447)].syncAudioAndVideoDiff?e===this[t(501)]&&(this[t(572)][t(545)]("AudioContext",t(567)+-this[t(572)][t(447)].syncAudioAndVideoDiff+t(507)+s+t(550)+e+t(540)+this[t(609)][t(518)]),e=this[t(501)]+.2):s<-this[t(572)][t(447)].syncAudioAndVideoDiff/2?e===this[t(501)]&&(this[t(572)].debugLog(t(577),"audioSyncVideoOption "+-this[t(572)][t(447)][t(464)]+t(507)+s+t(550)+e+",\n and bufferList is "+this.bufferList[t(518)]),e=this[t(501)]+.1):s>-this[t(572)][t(447)][t(464)]/2&&e!==this.defaultPlaybackRate&&(this[t(572)].debugLog(t(577),"diff is "+s+t(544)+this.player[t(447)].syncAudioAndVideoDiff/2+t(481)),e=this.defaultPlaybackRate),this[t(479)](e)}}[Io(504)](){const t=Io;if(this[t(584)])return;if(!this.playing)return;let e=this[t(539)],s=1e3,i=5e3;this[t(435)]&&(s=this[t(572)][t(447)][t(487)],i=this[t(572)][t(447)][t(525)]);const r=Math[t(449)](s/this[t(612)]),n=Math[t(449)](i/this[t(612)]);if(this[t(609)][t(518)]>n)return this[t(572)].debugWarn("AudioContext","bufferList length "+this.bufferList.length+t(579)+n+", and drop"),void this[t(596)]();this.getEngineType()!==gt[t(469)]&&(this.bufferList[t(518)]>2*r?(e=this[t(501)]+.2,this[t(572)][t(545)](t(577),t(557)+this[t(609)][t(518)]+" more than "+r+t(519)+e)):this[t(609)][t(518)]>r?(e=this[t(501)]+.1,this[t(572)][t(545)]("AudioContext",t(557)+this[t(609)][t(518)]+t(579)+r+t(519)+e)):this[t(609)][t(518)]t.ts))}}function _o(t,e){const s=Co();return(_o=function(t,e){return s[t-=145]})(t,e)}function Co(){const t=["encTypeCode","sampleRate","webrtc","mute","isMute","initScriptNodeDelay","setVolume","AudioContext","isPlaybackRateSpeed","play and this.awriter is null","hlsUseCanvasRender","808863FsVzWo","getEngineType","encType","2874122KYnCFm","TAG_NAME","video","debugWarn","webkitAudioContext","debugError","audio","Video","aliyunRtcRemoteStream","resume","muted","_prevVolume","850437wLdftg","channels","awriter","play","hlsDecoder","13956JmOnpy","lastVolume","updateAudioInfo","off","1206OIKvoc","120khRrNn","isAliyunRtc","291050dCAMfh","11869128ZQxVic","debugLog","player","initScriptNode","audioInfo","emit","isWasmPlayAudioUseVideoRender","close","setRate","isPlaying","$videoElement","destroy","depth","Audio","write","volume","clear","play audio error","getAudioBufferSize","init","$video","resetInit","audioContext","13747689XIiNII","aliyunRtcDecoder","_opt"];return(Co=function(){return t})()}const Ro=_o;!function(t,e){const s=_o,i=t();for(;;)try{if(788965===-parseInt(s(157))/1+parseInt(s(160))/2+parseInt(s(181))/3*(parseInt(s(177))/4)+-parseInt(s(184))/5*(parseInt(s(182))/6)+-parseInt(s(172))/7+-parseInt(s(185))/8+parseInt(s(208))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Co);class Do extends Bi{constructor(t){const e=_o;super(),this[e(187)]=t,this[e(161)]=e(198),this[e(205)]=t[e(162)][e(195)],this.init=!1,this[e(187)][e(145)][e(156)]&&(this.$video=this[e(187)][e(176)][e(195)]),this.player[e(145)].webrtcUseCanvasRender&&(this[e(205)]=this[e(187)][e(148)][e(195)]),this[e(189)]={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""},this[e(171)]=null,this[e(207)]=null,this.player[e(191)]()&&(this[e(207)]=new(window[e(153)]||window[e(164)])({sampleRate:Ot})),this[e(187)].debugLog(e(198),"init")}async[Ro(196)](){const t=Ro;return this[t(206)](),this[t(180)](),this[t(207)]&&(await this[t(207)][t(192)](),this.audioContext=null),this[t(171)]=null,this[t(187)][t(186)](t(198),"destroy"),!0}[Ro(206)](){const t=Ro;this[t(204)]=!1,this[t(189)]={encTypeCode:"",encType:"",channels:"",sampleRate:"",depth:""}}getAudioInfo(){return this[Ro(189)]}[Ro(179)](t){const e=Ro;t[e(146)]&&(this[e(189)].encTypeCode=t[e(146)],this[e(189)].encType=Q[t[e(146)]]),t[e(159)]&&(this[e(189)][e(159)]=t[e(159)]),t.channels&&(this[e(189)][e(173)]=t.channels),t[e(147)]&&(this[e(189)][e(147)]=t[e(147)]),t.depth&&(this[e(189)][e(197)]=t[e(197)]),this[e(189)][e(147)]&&this[e(189)][e(173)]&&this[e(189)].encType&&!this[e(204)]&&(this.player.debugLog("Audio","audioInfo",JSON.stringify(this.audioInfo)),this[e(187)][e(190)](M.audioInfo,this[e(189)]),this[e(204)]=!0)}get[Ro(194)](){return!0}get[Ro(200)](){const t=Ro;return hi(this[t(205)][t(170)])?0:this[t(205)][t(200)]}get[Ro(150)](){const t=Ro;return 0===this[t(205)][t(200)]||hi(this[t(205)][t(170)])}[Ro(149)](t){const e=Ro;this[e(152)](t?0:this[e(187)][e(178)]||.5)}setVolume(t){const e=Ro;t=parseFloat(t),isNaN(t)||(this.$video[e(170)]&&(this.$video.muted=!1),t=Ve(t,0,1),es()&&(this[e(205)][e(170)]=0===t),this.player[e(183)]()&&this.player[e(209)]&&this[e(187)][e(209)][e(168)]&&(this[e(187)][e(209)].aliyunRtcRemoteStream.muted=0===t),null!==this._prevVolume&&this._prevVolume===t||(null===this[e(171)]?this.player[e(190)](M[e(149)],0===t):0===this[e(171)]&&t>0?this.player[e(190)](M[e(149)],!1):this[e(171)]>0&&0===t&&this[e(187)][e(190)](M[e(149)],!0),this[e(205)][e(200)]=t,this.player.emit(M.volumechange,this[e(187)].volume),this.player[e(190)](M[e(200)],this[e(187)][e(200)]),this[e(171)]=t))}[Ro(201)](){}[Ro(175)](t,e){const s=Ro,i=this[s(187)][s(162)][s(174)];if(i)if(t.close)try{i.write(t),Js(t)}catch(t){this[s(187)][s(165)](s(167),s(202),t)}else try{this[s(187)].audioTimestamp=e;const r=function(t,e,s){const i=Me,r={...e,format:i(352)};r[i(613)]=t[0][i(641)];const n=s[i(322)](r[i(551)],r[i(613)],r[i(363)]);for(let e=0;e0?this.delayTimeout=setTimeout((()=>{this.initScriptNode()}),e):this[t(250)]()}setRate(t){const e=Lo;t!==this[e(242)]&&this[e(249)]&&(this[e(247)][e(267)](this[e(258)],e(228),t),this[e(242)]=t,this[e(237)](t))}[Lo(251)](t,e){const s=Lo;this[s(247)].isPlayVod()&&this.player[s(244)][s(260)]()?this[s(247)][s(267)](this[s(258)],s(225)):super[s(251)](t,e)}}var Mo=Oo;function Fo(){var t=["debugLog","4285479lGqKCq","434245rHcgUZ","24904noeROZ","init","isAudioPlayer","1662580iALXmc","21218mUqNqN","47236sKzHPp","36ytvuYj","play","528225NTPrvU","27yLuvjq","AudioPlayerLoader","destroy","TAG_NAME","clear","1603yqXxGi","player","playing","resume","36wiTzwW","111ewNbRs","pause"];return(Fo=function(){return t})()}function Oo(t,e){var s=Fo();return(Oo=function(t,e){return s[t-=335]})(t,e)}!function(t,e){for(var s=Oo,i=t();;)try{if(390571===parseInt(s(338))/1+-parseInt(s(358))/2+parseInt(s(349))/3*(parseInt(s(335))/4)+-parseInt(s(353))/5*(parseInt(s(336))/6)+-parseInt(s(344))/7*(parseInt(s(354))/8)+-parseInt(s(339))/9*(parseInt(s(357))/10)+-parseInt(s(352))/11*(-parseInt(s(348))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Fo);class Uo extends ko{constructor(t){var e=Oo;super(t),this[e(342)]=e(340),this[e(356)]=!0,this[e(345)][e(351)](this[e(342)],e(355))}async[Mo(341)](){var t=Mo;return await super[t(341)](),this[t(345)][t(351)](this[t(342)],"destroy"),!0}play(t,e){var s=Mo;ci(this[s(346)])||super[s(337)](t,e)}pause(){var t=Mo;this.player[t(351)](this.TAG_NAME,t(350)),this.playing=!1,this[t(343)]()}[Mo(347)](){var t=Mo;this.player.debugLog(this.TAG_NAME,t(347)),this[t(346)]=!0}}const No=jo;function jo(t,e){const s=Vo();return(jo=function(t,e){return s[t-=194]})(t,e)}function Vo(){const t=["addEventListener","838QrrMTg","isMute","2114335qxharv","5452531kcwLlQ","mute","resume","forEach","srcObject","muted","1714330iwmzRe","handleRender","2702VMVrYJ","lastVolume","875298paxNwu","117sPyTdC","_initAudioEvents","188728OhtObd","debugLog","bind","TAG_NAME","AudioWebrtcPlayerLoader","_prevVolume","volume","timeupdate","init","1361514OiEflt","timeStamp","play","$video","audio","click","12wKotxZ","events","resetInit","_handleDocumentClickPlay","_handleClickPlay","volumechange","length","setVolume","destroy","getEngineType","audioEnabled","eventsDestroy","isPlaying","emit","bindStream","debugWarn","player","updateStats","off","audio play error","pause"];return(Vo=function(){return t})()}!function(t,e){const s=jo,i=t();for(;;)try{if(745235===parseInt(s(239))/1*(-parseInt(s(197))/2)+parseInt(s(211))/3+-parseInt(s(217))/4*(-parseInt(s(241))/5)+-parseInt(s(199))/6+parseInt(s(242))/7+-parseInt(s(202))/8*(parseInt(s(200))/9)+-parseInt(s(195))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Vo);class zo extends Bi{constructor(t){const e=jo;super(),this[e(205)]=e(206),this[e(214)]=new Audio,this[e(233)]=t,this[e(210)]=!1,this[e(207)]=null,this.eventsDestroy=[],this[e(220)]=this[e(221)][e(204)](this),this._initAudioEvents(),this.player[e(203)](this[e(205)],e(210))}async[No(225)](){const t=No;return this[t(219)](),this[t(235)](),this.eventsDestroy[t(223)]&&(this[t(228)][t(245)]((t=>t())),this[t(228)]=[]),this[t(207)]=null,this.$video&&(this[t(214)][t(237)](),this[t(214)][t(246)]=null,this[t(214)]=null),this[t(233)][t(203)](this[t(205)],t(225)),!0}[No(201)](){const t=No,{proxy:e}=this[t(233)][t(218)],s=e(this[t(214)],t(209),(e=>{const s=t,i=parseInt(e[s(212)],10);this[s(233)][s(196)](),this.player[s(234)]({ts:i})}));this.eventsDestroy.push(s)}resetInit(){this[No(210)]=!1}[No(221)](){const t=No;this[t(214)]&&(this[t(214)][t(213)](),document.removeEventListener(t(216),this[t(220)]))}[No(231)](t){const e=No;this[e(214)][e(246)]=t,this[e(214)][e(208)]=1,this.$video[e(213)]().catch((t=>{const s=e;this[s(233)][s(232)](this[s(205)],s(236),t),document[s(238)](s(216),this[s(220)])}))}[No(226)](){return No(215)}get[No(229)](){return!0}get volume(){const t=No;return hi(this[t(214)][t(194)])?0:this.$video[t(208)]}get[No(240)](){const t=No;return 0===this[t(214)][t(208)]||hi(this.$video.muted)}[No(243)](t){const e=No;this[e(224)](t?0:this[e(233)][e(198)]||.5)}[No(224)](t){const e=No;t=parseFloat(t),isNaN(t)||null===this[e(214)]||(this[e(214)][e(194)]&&(this[e(214)][e(194)]=!1),t=Ve(t,0,1),es()&&(this[e(214)][e(194)]=0===t),null!==this[e(207)]&&this[e(207)]===t||(null===this[e(207)]?this[e(233)][e(230)](M.mute,0===t):0===this[e(207)]&&t>0?this[e(233)][e(230)](M.mute,!1):this[e(207)]>0&&0===t&&this[e(233)][e(230)](M[e(243)],!0),this[e(214)][e(208)]=t,this[e(233)].emit(M[e(222)],this[e(233)][e(208)]),this[e(233)][e(230)](M[e(208)],this.player[e(208)]),this._prevVolume=t))}[No(237)](){}[No(244)](){}[No(227)](){this[No(243)](!1)}}const Go=Ho;function Wo(){const t=["758648oyrWok","useWCS","21aHwoOL","wcsDecodeAudio","736720RThNgL","isHls","useMSE","14IkMuYk","_opt","getLoaderFactory","playbackTF","939300GGSHCj","isWebrtcH265","wasmPlayAudioUseVideoRender","playType","useWasm","19906AUcTcu","10EKZoQv","110yJPrlm","isWebrtc","275958dKNZlW","8776999vuQVVa","49779COHlUJ","isAliyunRtc","playerAudio","mseDecodeAudio"];return(Wo=function(){return t})()}function Ho(t,e){const s=Wo();return(Ho=function(t,e){return s[t-=126]})(t,e)}!function(t,e){const s=Ho,i=t();for(;;)try{if(199486===parseInt(s(126))/1*(parseInt(s(140))/2)+-parseInt(s(135))/3+-parseInt(s(128))/4*(parseInt(s(141))/5)+parseInt(s(144))/6*(-parseInt(s(131))/7)+-parseInt(s(150))/8+parseInt(s(146))/9*(parseInt(s(142))/10)+parseInt(s(145))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Wo);class Ko{constructor(t){const e=Ho;return new(Ko[e(133)](t[e(132)]))(t)}static[Go(133)](t){const e=Go;return t[e(138)]===c[e(134)]?t[e(130)]&&t[e(149)]||t[e(151)]&&t.wcsDecodeAudio?Do:Bo:t.playType===c.playVod?t.useMSE&&t[e(149)]||t.useWCS&&t[e(127)]?Do:Bo:t[e(138)]===c[e(148)]?t[e(143)]?zo:Uo:t[e(129)]&&ci(t.supportHls265)||t[e(143)]&&ci(t[e(136)])||t[e(130)]&&t.mseDecodeAudio||t[e(147)]||t[e(151)]&&t[e(127)]||t[e(139)]&&t[e(137)]?Do:ko}}function Qo(t,e){const s=Jo();return(Qo=function(t,e){return s[t-=271]})(t,e)}const Yo=Qo;!function(t,e){const s=Qo,i=t();for(;;)try{if(732469===parseInt(s(353))/1*(-parseInt(s(334))/2)+parseInt(s(294))/3*(parseInt(s(277))/4)+-parseInt(s(322))/5+-parseInt(s(298))/6+parseInt(s(342))/7+parseInt(s(307))/8*(parseInt(s(349))/9)+-parseInt(s(275))/10*(parseInt(s(355))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Jo);class qo extends Bi{constructor(t){const e=Qo;super(),this.player=t,this[e(288)]="FetchStream",this[e(274)]=!1,this[e(344)]=!1,this._status=It[e(347)],this[e(346)]=null,this[e(343)]=new AbortController,this[e(326)]=He((s=>{const i=e;t[i(335)](M[i(309)],(s/1024)[i(311)](2))})),this.streamRateInterval=null,t[e(318)](this[e(288)],e(273))}async[Yo(310)](){const t=Yo;return this[t(336)](),await this[t(291)](),this[t(323)](),this[t(319)]=It[t(347)],this.streamRate=null,this[t(276)](),this[t(337)][t(318)](this[t(288)],t(310)),!0}[Yo(299)](){const t=Yo;this[t(276)](),this[t(338)]=setInterval((()=>{const e=t;this[e(326)]&&this[e(326)](0)}),1e3)}[Yo(276)](){const t=Yo;this.streamRateInterval&&(clearInterval(this[t(338)]),this[t(338)]=null)}async _closeWritableStream(){const t=Yo;if(this[t(346)])if(Vs(this.writableStream[t(290)])&&ci(this[t(346)].locked))try{await this[t(346)][t(290)](),this[t(346)]=null,this[t(337)][t(318)](this[t(288)],t(340))}catch(e){this[t(337)][t(318)](this.TAG_NAME,t(354),e)}else this.writableStream=null}[Yo(320)](t){const e=Yo;let s=arguments[e(295)]>1&&void 0!==arguments[1]?arguments[1]:{};const{demux:i}=this.player;this[e(337)][e(300)][e(293)]=je();const r=Object[e(306)]({signal:this.abortController[e(289)]},{headers:s[e(305)]||{}});fetch(t,r)[e(272)]((t=>{const s=e;if(this._requestAbort)return this[s(319)]=It[s(347)],void t.body[s(287)]();if(!function(t){const e=Me;return t.ok&&t[e(330)]>=200&&t[e(330)]<=299}(t))return this[s(337)][s(296)](this[s(288)],s(278)+t[s(284)]+s(285)+t.ok+s(279)),this[s(336)](),void this.emit(U[s(314)],s(278)+t[s(284)]+s(285)+t.ok);if(this[s(335)](M[s(352)]),this[s(299)](),"undefined"!=typeof WritableStream)this[s(337)][s(318)](this.TAG_NAME,s(316)),this[s(346)]=new WritableStream({write:t=>{const e=s;return this.abortController&&this[e(343)][e(289)]&&this[e(343)].signal[e(325)]?(this.player[e(318)](this.TAG_NAME,e(271)),void(this[e(319)]=It[e(317)])):hi(this._requestAbort)?(this[e(337)][e(318)](this[e(288)],"writableStream.write() and this._requestAbort is true so return"),this._status=It[e(317)],void this.abort()):"string"!=typeof t?(this[e(319)]=It[e(312)],this[e(326)]&&this[e(326)](t[e(286)]),i[e(315)](t)):void this.player[e(351)](this[e(288)],'writableStream.write() and value is "'+t+e(350))},close:()=>{const t=s;this[t(319)]=It[t(317)],this[t(337)][t(280)]()?(i[t(290)](),this[t(337)][t(335)](M[t(332)],t(283))):this[t(337)].updateStreamEndInner()},abort:t=>{const e=s;if(this[e(343)]&&this[e(343)][e(289)]&&this.abortController[e(289)][e(325)])return this.player[e(318)](this[e(288)],e(308)),void(this._status=It[e(317)]);i.close();const r=t[e(330)]();-1===r[e(282)](ut[e(331)])&&-1===r[e(282)](ut[e(324)])&&t.name!==ut[e(336)]&&(this.abort(),this[e(337)][e(328)](U[e(314)],t))}}),t[s(345)].pipeTo(this.writableStream).catch((t=>{const e=s;t[e(303)]!==e(292)&&this[e(337)][e(318)](this[e(288)],e(313),t[e(303)],t[e(330)]())}));else{this.player.debugLog(this[s(288)],s(304));const e=t.body[s(302)](),r=()=>{const t=s;e[t(297)]()[t(272)]((e=>{const s=t;let{done:n,value:o}=e;return n?(this[s(319)]=It[s(317)],this.abort(),void(this[s(337)][s(280)]()?(i[s(290)](),this.player[s(335)](M.streamEnd,s(283))):this[s(337)][s(327)]())):this.abortController&&this[s(343)][s(289)]&&this[s(343)][s(289)].aborted?(this[s(337)][s(318)](this[s(288)],"reader.read() and this.abortController.signal.aborted so return"),void(this[s(319)]=It[s(317)])):hi(this[s(344)])?(this.player[s(318)](this.TAG_NAME,s(281)),this[s(319)]=It[s(317)],void this[s(336)]()):void(typeof o!==s(339)?(this._status=It.buffering,this[s(326)]&&this.streamRate(o[s(286)]),i[s(315)](o),r()):this.player[s(351)](this[s(288)],'reader.read() and value is "'+o+'" string so return'))}))[t(301)]((e=>{const s=t;if(this[s(343)]&&this[s(343)][s(289)]&&this[s(343)][s(289)][s(325)])return this[s(337)].debugLog(this[s(288)],s(329)),void(this[s(319)]=It[s(317)]);i[s(290)]();const r=e[s(330)]();-1===r[s(282)](ut.abortError)&&-1===r[s(282)](ut[s(324)])&&e.name!==ut[s(336)]&&(this[s(336)](),this[s(337)].emitError(U.fetchError,e))}))};r()}})).catch((t=>{const s=e;this[s(343)]&&this[s(343)][s(289)]&&this[s(343)].signal.aborted||"AbortError"!==t[s(303)]&&(i[s(290)](),this[s(336)](),this[s(335)](U[s(314)],t))}))}[Yo(336)](){const t=Yo;if(this[t(344)]=!0,this.abortController)try{this.abortController[t(336)](),this[t(343)]=null,this[t(337)].debugLog(this[t(288)],t(333))}catch(e){this[t(343)]=null,this[t(337)].debugLog(this[t(288)],t(341),e)}}[Yo(321)](){return h[Yo(348)]}}function Jo(){const t=["debugLog","_status","fetchStream","getStreamType","1743835JAnIsh","off","abortError2","aborted","streamRate","updateStreamEndInner","emitError","reader.read().catch() and this.abortController.signal.aborted so return","toString","abortError","streamEnd","abortController.abort() success","342626rbuMxK","emit","abort","player","streamRateInterval","string","close writableStream success","abortController.abort() error","8752975miHouj","abortController","_requestAbort","body","writableStream","idle","fetch","3949092YghNUs",'" string so return',"debugWarn","streamSuccess","1TbWLHH","destroy and writableStream.close()","25729QkvNBP","writableStream.write() and this.abortController.signal.aborted so return","then","init","playing","900IBtKbV","stopStreamRateInterval","116972xBxbTD","fetch response status is "," and emit error and next abort()","isCheckStreamEnd","reader.read() and this._requestAbort is true so return","indexOf","fetch done","status"," and ok is ","byteLength","cancel","TAG_NAME","signal","close","_closeWritableStream","AbortError","streamStart","51ujLZrH","length","debugError","read","4339710eZIizn","startStreamRateInterval","_times","catch","getReader","name","not support WritableStream and use getReader() to read stream","headers","assign","8ecUIKF","writableStream.abort() and this.abortController.signal.aborted so return","kBps","destroy","toFixed","buffering","res.body.pipeTo() error","fetchError","dispatch","use WritableStream() to read stream","complete"];return(Jo=function(){return t})()}function Xo(){function t(t){return!0===t||"true"===t}const e="The user aborted a request",s="AbortError",i="AbortError",r="fetch",n="destroy",o="destroyEnd",a="buffer",h="fetchError",c="fetchErrorWorker",l="fetchClose",d="fetchSuccess",u="init",p="idle",f="buffering",m="complete";let g=new class{constructor(){this.TAG_NAME="FetchWorker",this._requestAbort=!1,this._status=p,this.writableStream=null,this.isChrome=!1,this.abortController=new AbortController,this.debug=!1,this.debugLevel="warn",this.debugUuid=null}destroy(){var t;this.abort(),this.writableStream&&("function"==typeof this.writableStream.close&&(!1===(t=this.writableStream.locked)||"false"===t)?this.writableStream.close().catch((t=>{})).finally((()=>{this.writableStream=null})):this.writableStream=null),this._status=p}fetchStream(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=Object.assign({signal:this.abortController.signal},{headers:n.headers||{}});fetch(r,o).then((r=>{if(this._requestAbort)return this._status=p,void r.body.cancel();if(!function(t){return t.ok&&t.status>=200&&t.status<=299}(r))return this.abort(),void postMessage({cmd:h,message:`fetch response status is ${r.status} and ok is ${r.ok}`});if(postMessage({cmd:d}),"undefined"!=typeof WritableStream)this.debugLog(this.TAG_NAME,"use WritableStream() to read stream"),this.writableStream=new WritableStream({write:e=>this.abortController&&this.abortController.signal&&this.abortController.signal.aborted?(this.debugLog(this.TAG_NAME,"writableStream.write() and this.abortController.signal.aborted so return"),void(this._status=m)):t(this._requestAbort)?(this.debugLog(this.TAG_NAME,"writableStream.write() and this._requestAbort is true so return"),this._status=m,void this.abort()):void("string"!=typeof e?(this._status=f,postMessage({cmd:a,buffer:e},[e.buffer])):this.debugWarn(this.TAG_NAME,`writableStream.write() and value is "${e}" string so return`)),close:()=>{this._status=m,postMessage({cmd:l})},abort:t=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return this.debugLog(this.TAG_NAME,"writableStream.abort() and this.abortController.signal.aborted so return"),void(this._status=m);const r=t.toString();-1===r.indexOf(e)&&-1===r.indexOf(s)&&t.name!==i&&(this.abort(),postMessage({cmd:c,message:t.toString()}))}}),r.body.pipeTo(this.writableStream).catch((t=>{"AbortError"!==t.name&&this.debugLog(this.TAG_NAME,"res.body.pipeTo() error",t.name,t.toString())}));else{const n=r.body.getReader(),o=()=>{n.read().then((e=>{let{done:s,value:i}=e;return s?(this._status=m,void postMessage({cmd:l})):this.abortController&&this.abortController.signal&&this.abortController.signal.aborted?(this.debugLog(this.TAG_NAME,"reader.read() and this.abortController.signal.aborted so return"),void(this._status=m)):t(this._requestAbort)?(this.debugLog(this.TAG_NAME,"reader.read() and this._requestAbort is true so return"),this._status=m,void this.abort()):void("string"!=typeof i?(this._status=f,postMessage({cmd:a,buffer:i},[i.buffer]),o()):this.debugWarn(this.TAG_NAME,`reader.read() and value is "${i}" string so return`))})).catch((t=>{if(this.abortController&&this.abortController.signal&&this.abortController.signal.aborted)return this.debugLog(this.TAG_NAME,"reader.read().catch() and this.abortController.signal.aborted so return"),void(this._status=m);const r=t.toString();-1===r.indexOf(e)&&-1===r.indexOf(s)&&t.name!==i&&(this.abort(),postMessage({cmd:c,message:t.toString()}))}))};o()}})).catch((t=>{this.abortController&&this.abortController.signal&&this.abortController.signal.aborted||"AbortError"!==t.name&&(this.abort(),postMessage({cmd:h,message:t.toString()}))}))}abort(){if(this._requestAbort=!0,this.abortController)try{this.abortController.abort(),this.abortController=null,this.debugLog(this.TAG_NAME,"abortController.abort() success")}catch(t){this.abortController=null,this.player.debugLog(this.TAG_NAME,"abortController.abort() error",t,t.toString())}}debugLog(t){if(this.debug&&"debug"==this.debugLevel){const r=this.debugUuid?`[${this.debugUuid}]`:"";for(var e=arguments.length,s=new Array(e>1?e-1:0),i=1;i1?e-1:0),i=1;i1?s-1:0),r=1;r{const s=e.data;switch(s.cmd){case u:g.debug=t(s.debug),g.debugLevel=s.debugLevel,g.debugUuid=s.debugUuid;break;case r:g.isChrome=t(s.isChrome),g.fetchStream(s.url,JSON.parse(s.options));break;case n:g.destroy(),g=null,postMessage({cmd:o})}}}function Zo(t,e){const s=$o();return(Zo=function(t,e){return s[t-=207]})(t,e)}function $o(){const t=["100tPuFcJ","postMessage","send close but not response and destroy directly","destroy","FetchStreamWorker","2exUhtA","decoderWorkerCloseTimeout","debugWarn","streamRate","54bPfikD","fetchWorker","_initFetchWorker","emit","toFixed","7892170TlywTR","35651bBUVXt","player","1545051HyvuNN","URL","701778uqaGRM","destroyResolve","45088wtFxEO","workerClearTimeout","playing","92915GRyQdc","486872VPvWJg","debugLog","revokeObjectURL","off","_destroy","workerUrl","1176KuBBBH","TAG_NAME","send destroy"];return($o=function(){return t})()}!function(t,e){const s=Zo,i=t();for(;;)try{if(515721===-parseInt(s(225))/1*(parseInt(s(207))/2)+parseInt(s(237))/3+parseInt(s(220))/4*(-parseInt(s(210))/5)+-parseInt(s(217))/6*(-parseInt(s(235))/7)+parseInt(s(211))/8*(parseInt(s(229))/9)+-parseInt(s(234))/10+-parseInt(s(239))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}($o);class ta extends Bi{constructor(t){const e=Zo;super(),this.TAG_NAME=e(224),this[e(236)]=t,this[e(209)]=!1,this[e(230)]=null,this.workerClearTimeout=null,this[e(216)]=null,this[e(240)]=null,this[e(226)]=null,this[e(228)]=He((s=>{const i=e;t[i(232)](M.kBps,(s/1024)[i(233)](2))})),this.streamRateInterval=null,this[e(231)](),t[e(212)](this[e(218)],"init")}destroy(){return new Promise(((t,e)=>{const s=Zo;this[s(230)]?(this.player[s(212)](this.TAG_NAME,s(219)),this[s(230)][s(221)]({cmd:P.destroy}),this.destroyResolve=t,this[s(226)]=setTimeout((()=>{const e=s;this[e(236)][e(227)](this[e(218)],e(222)),this[e(226)]&&(clearTimeout(this.decoderWorkerCloseTimeout),this[e(226)]=null),this._destroy(),setTimeout((()=>{t()}),0)}),2e3)):(this[s(215)](),setTimeout((()=>{t()}),0))}))}_destroy(){const t=Zo;this[t(214)](),this[t(226)]&&(clearTimeout(this.decoderWorkerCloseTimeout),this[t(226)]=null),this[t(216)]&&(window[t(238)][t(213)](this[t(216)]),this.workerUrl=null),this[t(208)]&&(clearTimeout(this.workerClearTimeout),this[t(208)]=null),this._stopStreamRateInterval(),this[t(228)]=null,this[t(230)]&&(this[t(230)].terminate(),this[t(230)].onmessage=null,this[t(230)]=null),this.destroyResolve&&(this[t(240)](),this.destroyResolve=null),this.player.debugLog(this.TAG_NAME,t(223))}_initFetchWorker(){let t=Ys(Xo);const e=new Worker(t);this.workerUrl=t,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),T),e.postMessage({cmd:P.init,debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid}),e.onmessage=t=>{const{demux:e}=this.player,s=t.data;switch(s.cmd){case P.buffer:this.streamRate&&this.streamRate(s.buffer.byteLength),e.dispatch(s.buffer);break;case P.fetchSuccess:this.emit(M.streamSuccess),this._startStreamRateInterval();break;case P.fetchClose:this.player.isCheckStreamEnd()?(e.close(),this.player.emit(M.streamEnd,"fetch done")):this.player.updateStreamEndInner();break;case P.fetchError:e.close(),this.emit(U.fetchError,s.message);break;case P.fetchErrorWorker:e.close(),this.player.emitError(U.fetchError,s.message);break;case P.destroyEnd:this._destroy()}},this.fetchWorker=e}_startStreamRateInterval(){this._stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}_stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}fetchStream(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.player._times.streamStart=je(),this.fetchWorker.postMessage({cmd:P.fetch,url:t,isChrome:Os(),options:JSON.stringify(e)})}getStreamType(){return h.fetch}}function ea(t,e){const s=ia();return(ea=function(t,e){return s[t-=496]})(t,e)}const sa=ea;function ia(){const t=["_startStreamRateInterval","websocketStringMsg","byteLength","onmessage","protocols","63328UvGQyO","3453951RuKhjz","8423608TSnUSM","streamRate","3890JSpAls","emit","readyState","socket close and requestAbort is true","close","_opt","8662830XZkOVS","debugError","wsUrl","binaryType","debugLog","_stopCheckWsOpenTimeout","3530048zJfaGL","open","_times","websocketError","websocket user aborted","socket","isDestroyedOrClosed","data","fetchStream","arraybuffer","_closeWebSocket() socket is null or socket status is ","WebsocketStream","websocketFirstMsg","sendMessage","TAG_NAME","streamStart","socket open","isTrusted","notConnect","117225jaamyx","player","requestAbort","message","websocketOpen","socketDestroyFnList","websocket handle message demux is null so return","socket error","kBps","_startCheckWsOpenTimeout","destroy","36fJzARm","socketStatus","dispatch","_createWebSocket","checkWsOpenTimeout","isCheckStreamEnd","debugWarn","forEach","websocket error","toFixed","websocketClose","1085sZfTTO","websocket send message is","_stopStreamRateInterval","updateStreamEndInner","error","67734vooPGm","websocket Open Timeout form ","_closeWebSocket","socket error:","websocket send message socket is null","init","string","websocket send message error and socket status is ","code","streamEnd","streamRateInterval","socket close and requestAbort is true, so return","websocketOpenTimeout","streamSuccess","_handleMessage","off","websocket","s and status is "];return(ia=function(){return t})()}!function(t,e){const s=ea,i=t();for(;;)try{if(877296===parseInt(s(558))/1*(parseInt(s(519))/2)+parseInt(s(559))/3+-parseInt(s(574))/4+parseInt(s(568))/5+-parseInt(s(535))/6*(-parseInt(s(530))/7)+parseInt(s(560))/8+parseInt(s(508))/9*(-parseInt(s(562))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ia);class ra extends Bi{constructor(t){const e=ea;super(),this[e(509)]=t,this.TAG_NAME=e(500),this[e(579)]=null,this[e(520)]=N[e(507)],this[e(570)]=null,this[e(510)]=!1,this[e(513)]=[],this[e(561)]=He((s=>{const i=e;t[i(563)](M[i(516)],(s/1024)[i(528)](2))})),this[e(545)]=null,this.checkWsOpenTimeout=null,t[e(572)](this[e(503)],e(540))}async[sa(518)](){const t=sa;this._closeWebSocket(),this._stopStreamRateInterval(),this[t(573)](),this[t(570)]=null,this[t(550)](),this.player[t(572)](this.TAG_NAME,t(518))}[sa(553)](){this._stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{const t=ea;this.streamRate&&this[t(561)](0)}),1e3)}[sa(532)](){const t=sa;this[t(545)]&&(clearInterval(this[t(545)]),this[t(545)]=null)}[sa(517)](){const t=sa;this[t(573)](),this[t(523)]=setTimeout((()=>{const e=t;if(this.socketStatus===N[e(507)]){const t=e(536)+this[e(509)][e(567)][e(547)]+e(552)+this[e(520)];this[e(509)][e(569)](this[e(503)],t),this.emit(U.websocketOpenTimeout,t)}}),1e3*this.player[t(567)][t(547)])}_stopCheckWsOpenTimeout(){const t=sa;this.checkWsOpenTimeout&&(clearTimeout(this[t(523)]),this[t(523)]=null)}[sa(522)](){const t=sa;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s=this[t(509)],{events:{proxy:i},demux:r}=s,n=e[t(557)]||[];this.socket=new WebSocket(this[t(570)],n),this.socket[t(571)]=t(498);const o=i(this[t(579)],t(575),(()=>{const s=t;this[s(509)][s(572)](this[s(503)],s(505)),this[s(573)](),this[s(520)]=N[s(575)],this.emit(M[s(548)]),this[s(509)][s(563)](M[s(512)]),this[s(553)](),e.websocketFirstMessage&&this[s(502)](e[s(501)])})),a=i(this[t(579)],t(511),(e=>{const s=t;typeof e[s(496)]!==s(541)?(this[s(561)]&&this[s(561)](e[s(496)][s(555)]),this._handleMessage(e.data)):this[s(509)][s(563)](M[s(554)],e[s(496)])})),h=i(this[t(579)],t(566),(e=>{const s=t;if(this[s(509)][s(580)]())return;if(hi(this[s(510)]))return this.requestAbort=!1,void this[s(509)][s(572)](this[s(503)],s(546));if(this.socketStatus===N.error)return void this[s(509)].debugLog(this[s(503)],"socket close and status is error, so return");this.player[s(572)](this[s(503)],"socket close and code is "+e[s(543)]);let i=!1;1006===e[s(543)]&&(this[s(509)][s(569)](this[s(503)],"socket close abnormally and code is "+e.code),i=!0),this[s(520)]=N[s(566)],this[s(509)][s(524)]()||i?(r[s(566)](),this.player.emit(M[s(529)],e.code),this[s(509)].emit(M[s(544)],e[s(543)])):this[s(509)][s(533)]()})),c=i(this[t(579)],"error",(e=>{const s=t;if(this[s(509)][s(580)]())return;if(hi(this[s(510)]))return this[s(510)]=!1,void this.player[s(572)](this.TAG_NAME,s(565));this[s(509)][s(569)](this[s(503)],s(515),e),this[s(520)]=N[s(534)];const i=e[s(506)]?s(578):s(527);this[s(509)].emitError(U[s(577)],i),r[s(566)](),this[s(509)].debugLog(this[s(503)],s(538),i)}));this.socketDestroyFnList.push(o,a,h,c)}[sa(537)](){const t=sa;!this[t(579)]||0!==this.socket[t(564)]&&1!==this[t(579)].readyState?this.socket&&this[t(509)][t(572)](this[t(503)],t(499)+(this[t(579)]&&this[t(579)].readyState)):(this[t(510)]=!0,this.socket.close(1e3,"Client disconnecting")),this.socketDestroyFnList[t(526)]((t=>t())),this[t(579)].onopen=null,this[t(579)][t(556)]=null,this[t(579)].onclose=null,this.socket.onerror=null,this[t(579)]=null,this[t(520)]=N[t(507)],this.streamRate=null}[sa(549)](t){const e=sa,{demux:s}=this[e(509)];s?s[e(521)](t):this[e(509)][e(525)](this[e(503)],e(514))}[sa(497)](t,e){const s=sa;this[s(509)][s(576)][s(504)]=je(),this[s(570)]=t,this[s(522)](e)}[sa(502)](t){const e=sa;this.socket?this[e(520)]===N[e(575)]?(this[e(509)].debugLog(this[e(503)],e(531),t),this[e(579)].send(t)):this.player[e(569)](this.TAG_NAME,e(542)+this[e(520)]):this[e(509)][e(569)](this[e(503)],e(539))}getStreamType(){return h[sa(551)]}}function na(){function t(t){return!0===t||"true"===t}const e={fetch:"fetch",sendMessage:"sendMessage",destroy:"destroy",destroyEnd:"destroyEnd",buffer:"buffer",websocketError:"websocketError",websocketClose:"websocketClose",websocketOpen:"websocketOpen",websocketStringMsg:"websocketStringMsg",init:"init"};let s=new class{constructor(){this.TAG_NAME="WebsocketWorker",this.socket=null,this.wsUrl=null,this.requestAbort=!1,this.options={},this.debug=!1,this.debugLevel="warn",this.debugUuid=null}destroy(){!this.socket||0!==this.socket.readyState&&1!==this.socket.readyState||(this.requestAbort=!0,this.socket.close(1e3,"Client disconnecting")),this.socket.onopen=null,this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket=null}fetchStream(t,e){this.wsUrl=t,this.options=e||{},this._createWebSocket(e)}sendMessage(t){this.socket?1===this.socket.readyState?(this.debugLog(this.TAG_NAME,"send message",t),this.socket.send(t)):this.debugError(this.TAG_NAME,`send message error and socket status is ${this.socket.readyState}`):this.debugError(this.TAG_NAME,"send message socket is null")}_createWebSocket(t){const e=t.protocols||[];this.socket=new WebSocket(this.wsUrl,e),this.socket.binaryType="arraybuffer",this.socket.onopen=this._handleWebsocketOpen.bind(this),this.socket.onclose=this._handleWebsocketClose.bind(this),this.socket.onerror=this._handleWebsocketError.bind(this),this.socket.onmessage=this._handleWebsocketMessage.bind(this)}_handleWebsocketOpen(){postMessage({cmd:e.websocketOpen}),this.options&&this.options.websocketFirstMessage&&(this.debugLog(this.TAG_NAME,"send first message",this.options.websocketFirstMessage),this.sendMessage(this.options.websocketFirstMessage))}_handleWebsocketClose(s){if(t(this.requestAbort))return this.requestAbort=!1,void this.debugLog(this.TAG_NAME,"socket close and requestAbort is true, so return");postMessage({cmd:e.websocketClose,code:s.code})}_handleWebsocketError(s){t(this.requestAbort)?this.requestAbort=!1:postMessage({cmd:e.websocketError,isTrusted:s.isTrusted})}_handleWebsocketMessage(t){if("string"==typeof t.data)return void postMessage({cmd:e.websocketStringMsg,value:t.data});const s=new Uint8Array(t.data);postMessage({cmd:e.buffer,buffer:s},[s.buffer])}debugLog(t){if(this.debug&&"debug"==this.debugLevel){const r=this.debugUuid?`[${this.debugUuid}]`:"";for(var e=arguments.length,s=new Array(e>1?e-1:0),i=1;i1?e-1:0),i=1;i1?s-1:0),r=1;r{const r=i.data;switch(r.cmd){case e.init:s.debug=t(r.debug),s.debugLevel=r.debugLevel,s.debugUuid=r.debugUuid;break;case e.fetch:s.fetchStream(r.url,r.options);break;case e.destroy:s.destroy(),s=null,postMessage({cmd:e.destroyEnd});break;case e.send:s.sendMessage(r.message)}}}const oa=ha;function aa(){const t=["send destroy","561554pmgrrG","websocketWorker","streamRate","wsUrl","1375956qysEgD","debugWarn","_initWebsocketWorker","TAG_NAME","5JVaGqE","4903656NuulUB","player","notConnect","streamRateInterval","workerClearTimeout","init","847385KuGjcU","1614226NjMqsh","workerUrl","1743268MQjGjk","URL","destroyResolve","_closeWebSocket","decoderWorkerCloseTimeout","off","debugLog","socketStatus","toFixed","destroy","1941060IvvLcG","_destroy","terminate","WebsocketStreamWorker","emit","revokeObjectURL","kBps"];return(aa=function(){return t})()}function ha(t,e){const s=aa();return(ha=function(t,e){return s[t-=477]})(t,e)}!function(t,e){const s=ha,i=t();for(;;)try{if(435398===-parseInt(s(498))/1+-parseInt(s(478))/2+parseInt(s(490))/3+parseInt(s(480))/4*(parseInt(s(506))/5)+parseInt(s(502))/6+-parseInt(s(477))/7+parseInt(s(507))/8)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(aa);class ca extends Bi{constructor(t){const e=ha;super(),this.player=t,this[e(505)]=e(493),this[e(501)]=null,this[e(487)]=N[e(509)],this[e(499)]=null,this[e(511)]=null,this[e(479)]=null,this.destroyResolve=null,this[e(484)]=null,this[e(500)]=He((s=>{const i=e;t[i(494)](M[i(496)],(s/1024)[i(488)](2))})),this[e(510)]=null,this.checkWsOpenTimeout=null,this[e(504)](),this.player[e(486)](this[e(505)],e(512))}[oa(489)](){return new Promise(((t,e)=>{const s=ha;this.websocketWorker?(this[s(508)][s(486)](this.TAG_NAME,s(497)),this[s(483)](),this.destroyResolve=t,this[s(484)]=setTimeout((()=>{const e=s;this[e(508)][e(503)](this.TAG_NAME,"send close but not response and destroy directly"),this[e(484)]&&(clearTimeout(this.decoderWorkerCloseTimeout),this[e(484)]=null),this[e(491)](),t()}),2e3)):(this[s(491)](),t())}))}[oa(491)](){const t=oa;this[t(485)](),this._stopCheckWsOpenTimeout(),this[t(484)]&&(clearTimeout(this[t(484)]),this[t(484)]=null),this.workerUrl&&(window[t(481)][t(495)](this.workerUrl),this[t(479)]=null),this[t(511)]&&(clearTimeout(this[t(511)]),this.workerClearTimeout=null),this._stopStreamRateInterval(),this[t(500)]=null,this.websocketWorker&&(this[t(499)][t(492)](),this[t(499)].onmessage=null,this.websocketWorker=null),this.destroyResolve&&(this[t(482)](),this[t(482)]=null),this[t(501)]=null,this[t(508)][t(486)](this[t(505)],"destroy")}[oa(504)](){let t=Ys(na);const e=new Worker(t);this.workerUrl=t,this.workerClearTimeout=setTimeout((()=>{window.URL.revokeObjectURL(this.workerUrl),this.workerUrl=null,this.workerClearTimeout=null}),T),e.postMessage({cmd:B.init,debug:this.player._opt.debug,debugLevel:this.player._opt.debugLevel,debugUuid:this.player._opt.debugUuid}),e.onmessage=t=>{const{demux:e}=this.player,s=t.data;switch(s.cmd){case B.buffer:this.streamRate&&this.streamRate(s.buffer.byteLength),e.dispatch(s.buffer);break;case B.websocketOpen:this.player.debugLog(this.TAG_NAME,"socket open"),this._stopCheckWsOpenTimeout(),this.socketStatus=N.open,this.emit(M.streamSuccess),this.player.emit(M.websocketOpen),this._startStreamRateInterval();break;case B.websocketClose:if(this.player.isDestroyedOrClosed())return;if(this.socketStatus===N.error)return void this.player.debugLog(this.TAG_NAME,"socket close and status is error, so return");this.player.debugLog(this.TAG_NAME,`socket close and code is ${s.code}`);let t=!1;1006===s.code&&(this.player.debugError(this.TAG_NAME,`socket close abnormally and code is ${s.code}`),t=!0),this.socketStatus=N.close,this.player.isCheckStreamEnd()||t?(e.close(),this.player.emit(M.websocketClose,s.code),this.player.emit(M.streamEnd,s.code)):this.player.updateStreamEndInner();break;case B.websocketError:if(this.player.isDestroyedOrClosed())return;this.player.debugError(this.TAG_NAME,"socket error"),this.socketStatus=N.error;const i=s.isTrusted?"websocket user aborted":"websocket error";this.player.emitError(U.websocketError,i),e.close(),this.player.debugLog(this.TAG_NAME,"socket error:",i);break;case B.destroyEnd:this._destroy();break;case B.websocketStringMsg:this.player.emit(M.websocketStringMsg,s.value)}},this.websocketWorker=e}_startStreamRateInterval(){this._stopStreamRateInterval(),this.streamRateInterval=setInterval((()=>{this.streamRate&&this.streamRate(0)}),1e3)}_stopStreamRateInterval(){this.streamRateInterval&&(clearInterval(this.streamRateInterval),this.streamRateInterval=null)}_startCheckWsOpenTimeout(){this._stopCheckWsOpenTimeout(),this.checkWsOpenTimeout=setTimeout((()=>{if(this.socketStatus===N.notConnect){const t=`websocket Open Timeout form ${this.player._opt.websocketOpenTimeout}s and status is ${this.socketStatus}`;this.player.debugError(this.TAG_NAME,t),this.emit(U.websocketOpenTimeout,t)}}),1e3*this.player._opt.websocketOpenTimeout)}_stopCheckWsOpenTimeout(){this.checkWsOpenTimeout&&(clearTimeout(this.checkWsOpenTimeout),this.checkWsOpenTimeout=null)}_closeWebSocket(){this.websocketWorker&&this.websocketWorker.postMessage({cmd:B.destroy})}fetchStream(t,e){this.player._times.streamStart=je(),this.wsUrl=t,this.websocketWorker&&this.websocketWorker.postMessage({cmd:B.fetch,url:t,options:e})}sendMessage(t){this.websocketWorker&&this.websocketWorker.postMessage({cmd:B.sendMessage,message:t})}getStreamType(){return h.websocket}}function la(){const t=["hls","loadSource","542095fTgPPs","16bMLAGo","hlsError","339728RSIvSV","592018QnUZCv","then","debugLog","4806520fywXqY","HlsStream","emit","2261076ZbpUWL","9KzPNxz","streamSuccess","520431PJnVLl","player","6408336YxbiOL","6PknVmt","destroy","init","loadSource success","catch","off"];return(la=function(){return t})()}function da(t,e){const s=la();return(da=function(t,e){return s[t-=426]})(t,e)}const ua=da;!function(t,e){const s=da,i=t();for(;;)try{if(431837===-parseInt(s(427))/1+parseInt(s(441))/2+parseInt(s(448))/3+-parseInt(s(439))/4*(-parseInt(s(438))/5)+parseInt(s(430))/6*(-parseInt(s(442))/7)+-parseInt(s(429))/8+-parseInt(s(449))/9*(-parseInt(s(445))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(la);class pa extends Bi{constructor(t){const e=da;super(),this[e(428)]=t,t[e(444)](e(446),e(432))}async[ua(431)](){const t=ua;return this[t(435)](),this.player.debugLog("HlsStream",t(431)),!0}fetchStream(t){const e=ua,{hlsDecoder:s,debug:i}=this[e(428)];this[e(428)]._times.streamStart=je(),s[e(437)](t)[e(443)]((()=>{const t=e;this[t(428)].debugLog("HlsStream",t(433)),this[t(447)](M[t(426)])}))[e(434)]((t=>{const s=e;this[s(447)](U[s(440)],t)}))}getStreamType(){return h[ua(436)]}}const fa=ma;function ma(t,e){const s=ga();return(ma=function(t,e){return s[t-=340]})(t,e)}function ga(){const t=["webrtc:","destroy","emit","loadSource","1hnVPWO","290025mBVlog","pathname","getStreamType","1527435EciSrz","/webrtc/play","catch","debugLog","webrctUrl","location","streamSuccess","webrtc","_times","debugError","6BsKsDG","WebrtcStream","replace","protocol","64334gzdQRF","init","indexOf","2200630PDeFuQ","8472XYfroa","1081880CWpKGq","loadSource error",", and new url is: ","streamStart","165lduDFL","player","fetchStream","981845GEhecw","then","off","length","webrtcError"];return(ga=function(){return t})()}!function(t,e){const s=ma,i=t();for(;;)try{if(121606===-parseInt(s(353))/1*(-parseInt(s(371))/2)+-parseInt(s(341))/3*(-parseInt(s(375))/4)+-parseInt(s(344))/5*(parseInt(s(367))/6)+-parseInt(s(357))/7+parseInt(s(376))/8+parseInt(s(354))/9+parseInt(s(374))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ga);class Aa extends Bi{constructor(t){const e=ma;super(),this[e(342)]=t,this[e(361)]=null,t[e(360)](e(368),e(372))}async[fa(350)](){const t=fa;return this[t(361)]=null,this[t(346)](),this[t(342)].debugLog(t(368),t(350)),!0}[fa(343)](t){const e=fa;let s=arguments[e(347)]>1&&void 0!==arguments[1]?arguments[1]:{};const{webrtc:i,debug:r}=this.player;if(this.player[e(365)][e(340)]=je(),this[e(361)]=t[e(369)](e(349),window[e(362)][e(370)]),this[e(342)].isWebrtcForM7S()&&-1===this[e(361)][e(373)](e(358))){const s=new URL(this[e(361)]),i="/webrtc/play"+s[e(355)];this[e(361)]=s.origin+i+s.search,this[e(342)][e(360)](e(368),"original url is "+t+e(378)+this[e(361)])}i[e(352)](this[e(361)],s)[e(345)]((()=>{const t=e;this[t(342)][t(360)]("WebrtcStream","loadSource success"),this[t(351)](M[t(363)])}))[e(359)]((t=>{const s=e;this[s(342)][s(366)](s(368),s(377),t),this[s(351)](U[s(348)],t)}))}[fa(356)](){return h[fa(364)]}}const ya=ba;function ba(t,e){const s=Sa();return(ba=function(t,e){return s[t-=332]})(t,e)}!function(t,e){const s=ba,i=t();for(;;)try{if(480023===parseInt(s(348))/1+parseInt(s(347))/2*(parseInt(s(343))/3)+parseInt(s(352))/4*(-parseInt(s(336))/5)+parseInt(s(354))/6*(-parseInt(s(350))/7)+parseInt(s(334))/8*(-parseInt(s(339))/9)+parseInt(s(356))/10+-parseInt(s(353))/11*(parseInt(s(358))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Sa);class va extends Bi{constructor(t){const e=ba;super(),this[e(364)]=t,this[e(363)]=null,this[e(366)]=null,this.streamRate=He((s=>{const i=e;t.emit(M[i(341)],(s/1024)[i(349)](2))})),this[e(346)]=null,t[e(371)](e(337),"init")}async[ya(369)](){const t=ya;return this[t(357)](),this[t(367)](),this[t(364)].debugLog(t(337),t(369)),!0}startStreamRateInterval(){const t=ya;this[t(335)](),this[t(346)]=setInterval((()=>{const e=t;this[e(333)]&&this[e(333)](0)}),1e3)}[ya(335)](){const t=ya;this.streamRateInterval&&(clearInterval(this[t(346)]),this[t(346)]=null)}_createWebTransport(){const t=ya,e=this.player,{debug:s,events:{proxy:i},demux:r}=e;try{this[t(363)]=new WebTransport(this[t(366)]),this[t(363)][t(332)][t(345)]((()=>{const e=t;this.emit(M[e(373)]),this[e(351)](),this.transport[e(368)]().then((t=>{const s=e;t[s(365)][s(359)](new WritableStream(r.input))}))}))[t(342)]((e=>{const s=t;this[s(364)].debugWarn(s(337),s(361),e)}))}catch(e){this.player[t(355)]("WebTransportLoader","_createWebTransport",e)}}[ya(344)](t){const e=ya;this[e(364)][e(338)][e(360)]=je(),this[e(366)]=t[e(340)](/^wt:/,"https:"),this[e(372)]()}[ya(357)](){const t=ya;if(this[t(363)])try{this.transport[t(370)](),this[t(363)]=null}catch(t){this.transport=null}}getStreamType(){return h[ya(362)]}}function Sa(){const t=["627153wkJmXR","toFixed","25354HsWhgU","startStreamRateInterval","22808vpdfDY","55XkFlpv","78xlhcgW","debugWarn","127720naNJCB","abort","966228QYjLKG","pipeTo","streamStart","_createWebTransport-ready","webTransport","transport","player","readable","wtUrl","off","createBidirectionalStream","destroy","close","debugLog","_createWebTransport","streamSuccess","ready","streamRate","14712JJROXc","stopStreamRateInterval","325zWFQSE","WebTransportLoader","_times","810zzXTen","replace","kBps","catch","2477757bLslhV","fetchStream","then","streamRateInterval","2CMFutP"];return(Sa=function(){return t})()}const wa=Ia;function Ea(){const t=["39hMhrxN","websocket","player","9322548IAwZFg","sendMessage","132972kGvMWm","protocol","workUrl","_opt","worker","9757HBtoSX","1242731yGLgKR","streamStart","9gfWcPr","1456244rxRtfZ","10PlBKjz","18vQCQyc","WorkerStream","workerSendMessage","length","6110TtcuQy","_times","debugLog","getStreamType","fetch","destroy","decoderWorker","4669432omsgFy","init","off","10Mqnbas","180487TTZkbA"];return(Ea=function(){return t})()}function Ia(t,e){const s=Ea();return(Ia=function(t,e){return s[t-=160]})(t,e)}!function(t,e){const s=Ia,i=t();for(;;)try{if(457827===parseInt(s(161))/1+parseInt(s(177))/2*(parseInt(s(167))/3)+parseInt(s(176))/4*(parseInt(s(160))/5)+-parseInt(s(178))/6*(-parseInt(s(173))/7)+-parseInt(s(189))/8*(-parseInt(s(175))/9)+-parseInt(s(182))/10*(-parseInt(s(172))/11)+-parseInt(s(165))/12*(parseInt(s(162))/13))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Ea);class Ta extends Bi{constructor(t){const e=Ia;super(),this[e(164)]=t,this[e(169)]=null,t[e(184)](e(179),e(190))}async destroy(){const t=Ia;return this.workUrl=null,this[t(191)](),this[t(164)][t(184)](t(179),t(187)),!0}[wa(166)](t){const e=wa;this[e(164)][e(188)][e(180)](t)}fetchStream(t){const e=wa;let s=arguments[e(181)]>1&&void 0!==arguments[1]?arguments[1]:{};this[e(169)]=t,this[e(164)][e(183)][e(174)]=je(),this[e(164)].decoderWorker.workerFetchStream(t,s)}[wa(185)](){const t=wa,e=this.player[t(170)][t(168)]===o[t(186)]?h[t(186)]:h[t(163)];return h[t(171)]+" "+e}}function ka(){const t=["debugError","_times","9VtDYIn","streamStart","emit","then","off","4559916QXDezq","42182Mgtxza","4185135etjfGt","AliyunRtcLoader","32448834OMGkDI","loadSource","player","10146184vifbkz","loadSource success","440055avBExg","debugLog","init","destroy","235740StSoBH","catch","streamSuccess","TAG_NAME","fetchStream","2ykhchU","loadSource error","aliyunRtc"];return(ka=function(){return t})()}const _a=Ca;function Ca(t,e){const s=ka();return(Ca=function(t,e){return s[t-=464]})(t,e)}!function(t,e){const s=Ca,i=t();for(;;)try{if(937628===-parseInt(s(483))/1*(parseInt(s(472))/2)+-parseInt(s(477))/3*(-parseInt(s(467))/4)+-parseInt(s(484))/5+-parseInt(s(482))/6+parseInt(s(491))/7+-parseInt(s(489))/8+parseInt(s(486))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ka);class Ra extends Bi{constructor(t){const e=Ca;super(),this[e(470)]=e(485),this[e(488)]=t,t[e(464)](this[e(470)],e(465))}async destroy(){const t=Ca;return this[t(481)](),this.player.debugLog(this[t(470)],t(466)),!0}[_a(471)](t){const e=_a,{aliyunRtcDecoder:s}=this[e(488)];this[e(488)][e(476)][e(478)]=je(),s[e(487)](t)[e(480)]((()=>{const t=e;this[t(488)][t(464)](this[t(470)],t(490)),this[t(479)](M[t(469)])}))[e(468)]((t=>{const s=e;this[s(488)][s(475)](this[s(470)],s(473),t),this[s(479)](U.aliyunRtcError,t)}))}getStreamType(){return h[_a(474)]}}const Da=La;function La(t,e){const s=Pa();return(La=function(t,e){return s[t-=320]})(t,e)}!function(t,e){const s=La,i=t();for(;;)try{if(150411===-parseInt(s(321))/1+-parseInt(s(343))/2+parseInt(s(346))/3*(parseInt(s(330))/4)+-parseInt(s(326))/5*(-parseInt(s(327))/6)+parseInt(s(344))/7*(parseInt(s(345))/8)+-parseInt(s(320))/9+parseInt(s(331))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Pa);class xa extends Bi{constructor(t){const e=La;super(),this[e(332)]="MP4StreamLoader",this[e(337)]=t,t[e(334)][e(329)](this[e(332)],e(333))}[Da(339)](){const t=Da;this[t(338)](),this[t(337)][t(334)].log(this[t(332)],t(339))}[Da(323)](t){const e=Da,{mp4Decoder:s}=this.player;this[e(337)][e(325)].streamStart=je(),s[e(322)](t)[e(328)]((()=>{const t=e;this[t(337)][t(341)](this[t(332)],"loadSource success"),this[t(324)](M[t(340)])}))[e(336)]((t=>{this[e(324)](U.playVodMp4Error,t)}))}[Da(335)](){return h[Da(342)]}}function Pa(){const t=["mp4","556948kTEeoO","7MraSah","203384bbMiNv","8157DqrtSW","1596132kHLuyy","176150FqdPBl","loadSource","fetchStream","emit","_times","13985NIDvfz","354ubffLg","then","log","236XbfEXH","4315160XGIfWN","TAG_NAME","init","debug","getStreamType","catch","player","off","destroy","streamSuccess","debugLog"];return(Pa=function(){return t})()}function Ba(t,e){var s=Ma();return(Ba=function(t,e){return s[t-=379]})(t,e)}function Ma(){var t=["EmptyLoader","TAG_NAME","6YTLapL","fetchStream","destroy","3420455OMNSEF","4015914XvLznd","debugLog","507YveZlv","376983khBxHW","20236Dupaaw","953172OziXCz","player","63791SFeHOv","1210oefDzq","8287552wBXUlK"];return(Ma=function(){return t})()}var Fa=Ba;!function(t,e){for(var s=Ba,i=t();;)try{if(890146===parseInt(s(391))/1+parseInt(s(388))/2*(-parseInt(s(386))/3)+-parseInt(s(389))/4+-parseInt(s(383))/5+parseInt(s(380))/6*(-parseInt(s(384))/7)+-parseInt(s(393))/8+parseInt(s(387))/9*(parseInt(s(392))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Ma);class Oa{constructor(t){var e=Ba;this[e(390)]=t,this[e(379)]=e(394),this[e(390)][e(385)](this[e(379)],"init")}[Fa(382)](){var t=Fa;this[t(390)][t(385)](this.TAG_NAME,t(382))}[Fa(381)](){}}function Ua(t,e){const s=Na();return(Ua=function(t,e){return s[t-=145]})(t,e)}function Na(){const t=["119449CbBRmE","player","140952yXXbgF","980NlVUNK","2986917HhDfiF","3hwsUGd","2672433AdqBJO","_opt","webrtc","playerAudio","5784126nOucHO","websocket","12GCvpiy","24qpjbKx","getLoaderFactory","hls","691715dZOGci","playVod","webTransport","79578HzsvLX","aliyunRtc","fetch"];return(Na=function(){return t})()}!function(t,e){const s=Ua,i=t();for(;;)try{if(520787===-parseInt(s(162))/1*(parseInt(s(154))/2)+parseInt(s(161))/3+-parseInt(s(147))/4*(-parseInt(s(151))/5)+-parseInt(s(145))/6+parseInt(s(159))/7+-parseInt(s(148))/8*(parseInt(s(163))/9)+parseInt(s(160))/10*(parseInt(s(157))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Na);class ja{constructor(t){const e=Ua;return new(ja[e(149)](t[e(164)]))(t)}static getLoaderFactory(t){const e=Ua,{protocol:s,useWasm:i,playType:r,useWCS:n,useMSE:a,demuxUseWorker:h,mainThreadFetchUseWorker:l,isFmp4:d,isUseFileProtocol:u,useMThreading:p}=t;return wi()?Oa:r===c[e(152)]&&d?xa:s===o[e(150)]?pa:s===o[e(165)]?Aa:s===o[e(153)]?va:s===o[e(155)]?Ra:s===o[e(156)]?r===c[e(166)]?Ta:r===c[e(158)]?i&&!Hs(t)?u?qo:p?ta:Ta:h?Ta:l?ta:qo:n||a?h?Ta:l?ta:qo:u?qo:p?ta:Ta:s===o[e(146)]?r===c[e(166)]?Ta:r===c[e(158)]?i&&!Hs(t)?u?ra:p?ca:Ta:h?Ta:l?ca:ra:n||a?h?Ta:l?ca:ra:u?ra:p?ca:Ta:void 0}}function Va(){var t=["onStateChanged","fullcanvas","Writing recorded blob(s) to disk!","volume","stream","image/webp","WebAudio API has no support on this browser.","createObjectURL","Generating WebM","Edge","started recording ","onEncodingCallback","AudioContextConstructor","get","filter","offsetHeight","OutOfMemory","compile","fmt ","indexOf","leftBuffers","ceil","Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45","appendChild","multi-streams-mixer","The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.","keyframe","https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm","DiskStorage","leftChannel","21EVFEvU","Empty blob.","*","setQuality","getNativeBlob","security","READY","chrome","1472573nKcpum","Storage","GifRecorder","quality","body","rightBuffers","ended","RIFF","width","charCodeAt","Pass a callback function over getDataURL.","video","elementClass",") is not supported.","Passing following config over MediaRecorder API.","MRecordRTC","prototype","onGifRecordingStarted","timestamps","22472724HqUhei","getMixedStream","gif","slice","0 Bytes","AudioContext","mozGetUserMedia","trackNum","href","mozCaptureStream","11icMNKA","4yknszp","blobs","sqrt","transaction","whammy","Input must be formatted properly as a base64 encoded DataURI of type image/webp","type","onerror","dataStoreName","pauseRecording","MultiStreamRecorder","forEach","IllegalStreamModification","terminate","Fetch","postMessage",'First argument "MediaStream" is required.',"video/webm","onstop","webkitCaptureStream","round","data","all","onVideoProcessStarted","onError","useWhammyRecorder","sample-rate must be under range 22050 and 96000.","initCallback","7048UxiRhx","releaseStreams","audioContext","buffer","save","onRecordingStopped","workerURL","videoRecorder","750948XBYluX","duration","createScriptProcessor","webkitGetUserMedia","RecordRTC","makeMetadataSeekable","createJavaScriptNode","cues","recordingLength","Chrome","start","onplaying","document","captureStream","cloneNode","arrayBuffer","getBlob","onTimeStamp","opacity","getTracks","readAsDataURL","exports","setUint16","left","replace","screen","audioDestination","image","call","audioBlob","for output-type:","onmessage","realtime","commonjsGlobal","Please link: https://www.webrtc-experiment.com/screenshot.js","audio/wav","test","URL","getChannelData","timeslice","className","name",'Use "new RecordRTCPromisesHandler()"',"getWebPImages","requestAnimationFrame","Canvas recording is NOT supported in Firefox.","Blob object is required.","disableLogs","click","audio/ogg","audioRecorder","versions","closed","play","display:none;opacity:0;color:transparent;","Please make sure MediaStream is active.","onstart","Whammy","map","connect","getAllStates","error","keys","Please link: https://www.webrtc-experiment.com/EBML.js","now","position","onresume","bin","Video","VP8","Neither URL nor webkitURL detected.","StereoAudioRecorder","record","set","string","webAssemblyPath","getTime","numberOfAudioChannels","zIndex","reset","script","warn","onGifPreview","Recorder state changed:","recordingDuration must be a number.","view","split","RecordRTC is destroyed.","WAVE","manuallyStopped","frameRate","webkitAudioContext","amd","tools","5.6.2","target","frames","onload","createMediaStreamDestination","push","console","size","inactive","MIME type (","OtherRecordingError","style","getContext","clearRecordedData","canvas","bitsPerSecond","drawImage","message","getDataURL","fromCharCode","mediaType","noWorker","setInt16","decode","recordingDuration","showMousePointer","value","addFrame","text/javascript","substr","OPR/","createGain","https://unpkg.com/webm-wasm@latest/dist/webm-worker.js","invokeSaveAsDialog","toString","timeSlice","appVersion","Legal values for buffer-size are ","WhammyRecorder","gifBlob","getState","frameInterval","onRender","workerPath","srcObject","userAgent","callback","navigator","recordingDuration is required.","MediaRecorder security error","MediaStreamRecorder","sampleRate","substring","MediaStream seems stopped.","startRecording","audioSources","MediaRecorder API seems unable to record mimeType:","recordRTC","Seems recording has been restarted.","toLowerCase","number","error: ","state","startDrawingFrames","setVersion","onAudioProcessStarted","addEventListener","kind","The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.","gainNode","getSeekableBlob","version","playsInline","bitrate","active","window","resetVideoStreams","8019vUHsVB","1440183sIzOzJ","_blank","clearedRecordedData","stringify","HTMLVideoElement","gifRecorder","muted","getUserMedia","UnknownError","createMediaStreamSource","WEBP","pause","pow","V_VP8","onaudioprocess","createElement","firefox","destination","revokeObjectURL","Unable to resume the recording. Recording state: ","Initialized recorderType:","this.onmessage = function (eee) {"," frames remaining","Reader","captureStream API are NOT available.","electron","readAsArrayBuffer","undefined","Got image, but recorder is finished!","invalidstate","Resumed recording.","then","constructor","Stopped recording ","disconnect","toDataURL","destroy","Upgrade to latest Chrome or otherwise enable this flag: chrome://flags/#enable-experimental-web-platform-features","objectStore","requestData","functionToLoop","recording","notsupported","1377685iiYfHn","process","setDelay","Stop an active recorder.","toFixed","stopped","random","The UA cannot provide the codec or recording option that has been requested.","concat","getMixer","GenericError","Following polyfill is strongly recommended: https://unpkg.com/@mattiasbuelens/web-streams-polyfill/dist/polyfill.min.js","LIST","Cleared old recorded data.","height","result","(eee.data);}","28gLSwcx","leftchannel","video/vp8","object","getArrayOfBlobs","read","Recording failed.","und","resumed","-1000em",";this.onmessage = function (eee) {"," stream.","9494440EWVYGP","Blob encoder did not finish its job yet.","close","started","autoWriteToDisk","documentElement","internalInterleavedLength","webkitRTCPeerConnection","stop","isTypeSupported","bufferSize","Bytes","gain","desiredSampRate","recordingCallback","videoBlob","previewStream","writeToDisk","setUint8","Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.","rightchannel","addStreams","advertisement","Desired sample-rate: ","stopRecording","First parameter is required.","resumeRecording","initRecorder","toPrecision","top","Blob","addTrack","canRecordMimeType","WebAssemblyRecorder","paused","renderer","audio/webm","blob","onupgradeneeded","getFromDisk","nodeName","reverse","ondataavailable","webm","byteLength","inputBuffer","dispatchEvent","lacing","getInternalRecorder","checkForInactiveTracks","timecode","isElectron","readwrite","CanvasRecorder","discardable","match","recorderType","Electron","mimeType","resume","StereoAudioRecorder is set to record number of channels: ","Store","onsuccess","src","location","getImageData","msSaveOrOpenBlob","application/javascript",'It seems that recorder is destroyed or "startRecording" is not invoked for ',"function","autoplay","log","mozSrcObject","Decoder","msSaveBlob","audio","join","onloadedmetadata","MediaRecorder Error","setUint32","length","video width/height","cancelAnimationFrame","Recording finished!"," from disk!","appendStreams","https://www.webrtc-experiment.com/gif-recorder.js","MultiStreamsMixer","opera","right"];return(Va=function(){return t})()}function za(t,e){var s=Va();return(za=function(t,e){return s[t-=167]})(t,e)}!function(t,e){for(var s=za,i=t();;)try{if(996366===parseInt(s(181))/1+-parseInt(s(211))/2*(parseInt(s(419))/3)+-parseInt(s(479))/4*(parseInt(s(462))/5)+parseInt(s(247))/6*(parseInt(s(173))/7)+parseInt(s(239))/8*(-parseInt(s(418))/9)+parseInt(s(491))/10+parseInt(s(210))/11*(parseInt(s(200))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Va);var Ga=Zt((function(t){var e=za;function s(t,e){var n=za;if(!t)throw n(516);e=new i(t,e=e||{type:"video"});var o=this;function a(s){var i=n;s&&(e[i(238)]=function(){var t=i;s(),s=e[t(238)]=null});var o=new r(t,e);(g=new o(t,e))[i(319)](),u(i(460)),!e.disableLogs&&console[i(562)](i(439),g[i(451)][i(288)],i(277),e.type)}function h(t){var s=n;if(t=t||function(){},g){if(o[s(403)]===s(525))return o[s(517)](),void setTimeout((function(){h(t)}),1);o[s(403)]!==s(460)&&!e[s(294)]&&console[s(328)]('Recording state should be: "recording", however current state is: ',o.state),!e[s(294)]&&console.log(s(452)+e[s(217)]+s(490)),"gif"!==e[s(217)]?g[s(499)](i):(g[s(499)](),i()),u(s(467))}else m();function i(i){var r=s;if(g){Object[r(309)](g)[r(222)]((function(t){var e=r;typeof g[t]!==e(560)&&(o[t]=g[t])}));var n=g[r(528)];if(!n){if(!i)throw r(485);g.blob=n=i}if(n&&!e[r(294)]&&console[r(562)](n[r(217)],"->",v(n[r(348)])),t){var a;try{a=p.createObjectURL(n)}catch(t){}"function"==typeof t[r(275)]?t.call(o,a):t(a)}e[r(495)]&&l((function(t){var s={};s[e[r(217)]+"Blob"]=t,x.Store(s)}))}else typeof t[r(275)]===r(560)?t[r(275)](o,""):t("")}}function c(t){var e=n;postMessage((new FileReaderSync)[e(267)](t))}function l(t,s){var i=n;if(!t)throw i(191);var r=s?s[i(528)]:(g||{}).blob;if(!r)return!e[i(294)]&&console[i(328)](i(492)),void setTimeout((function(){l(t,s)}),1e3);if(typeof Worker===i(446)||navigator[i(206)]){var o=new FileReader;o[i(267)](r),o[i(344)]=function(e){var s=i;t(e[s(342)][s(477)])}}else{var a=function(t){var e=i;try{var s=p[e(588)](new Blob([t[e(375)](),e(440)+t[e(288)]+e(478)],{type:e(558)})),r=new Worker(s);return p[e(437)](s),r}catch(t){}}(c);a.onmessage=function(e){t(e[i(232)])},a[i(226)](r)}}function d(t){var e=n;t=t||0,o[e(403)]!==e(525)?o[e(403)]!==e(467)&&(t>=o[e(365)]?h(o[e(244)]):(t+=1e3,setTimeout((function(){d(t)}),1e3))):setTimeout((function(){d(t)}),1e3)}function u(t){var e=n;o&&(o[e(403)]=t,typeof o[e(581)][e(275)]===e(560)?o[e(581)][e(275)](o,t):o[e(581)](t))}var f=n(559)+e[n(217)]+" recorder.";function m(){var t=n;!0!==e.disableLogs&&console[t(328)](f)}var g,A={startRecording:function(s){var r=n;return!e.disableLogs&&console.log("RecordRTC version: ",o[r(412)]),s&&(e=new i(t,s)),!e[r(294)]&&console[r(562)](r(591)+e[r(217)]+" stream."),g?(g.clearRecordedData(),g[r(319)](),u(r(460)),o.recordingDuration&&d(),o):(a((function(){o[r(365)]&&d()})),o)},stopRecording:h,pauseRecording:function(){var t=n;g?"recording"===o.state?(u("paused"),g[t(430)](),!e[t(294)]&&console[t(562)]("Paused recording.")):!e[t(294)]&&console[t(328)]("Unable to pause the recording. Recording state: ",o[t(403)]):m()},resumeRecording:function(){var t=n;g?o[t(403)]===t(525)?(u(t(460)),g.resume(),!e[t(294)]&&console[t(562)](t(449))):!e[t(294)]&&console[t(328)](t(438),o[t(403)]):m()},initRecorder:a,setRecordingDuration:function(t,e){var s=n;if(typeof t===s(446))throw s(389);if(typeof t!==s(401))throw s(331);return o.recordingDuration=t,o[s(244)]=e||function(){},{onRecordingStopped:function(t){o[s(244)]=t}}},clearRecordedData:function(){var t=n;g?(g[t(354)](),!e[t(294)]&&console[t(562)](t(475))):m()},getBlob:function(){if(g)return g[n(528)];m()},getDataURL:l,toURL:function(){var t=n;if(g)return p[t(588)](g[t(528)]);m()},getInternalRecorder:function(){return g},save:function(t){g?S(g[n(528)],t):m()},getFromDisk:function(t){var i=n;g?s[i(530)](e[i(217)],t):m()},setAdvertisementArray:function(t){var s=n;e.advertisement=[];for(var i=t[s(571)],r=0;r-1&&"netscape"in window&&/ rv:/[e(283)](navigator[e(386)]),A=!m&&!f&&!!navigator[e(250)]||w()||-1!==navigator[e(386)][e(400)]()[e(600)]("chrome/"),y=/^((?!chrome|android).)*safari/i[e(283)](navigator[e(386)]);y&&!A&&-1!==navigator.userAgent[e(600)]("CriOS")&&(y=!1,A=!0);var b=window.MediaStream;function v(t){var s=e,i=[s(502),"KB","MB","GB","TB"];if(0===t)return s(204);var r=parseInt(Math.floor(Math[s(562)](t)/Math.log(1e3)),10);return(t/Math[s(431)](1e3,r))[s(519)](3)+" "+i[r]}function S(t,s){var i=e;if(!t)throw i(293);if(!t.type)try{t[i(217)]="video/webm"}catch(t){}var r=(t[i(217)]||i(228)).split("/")[1];if(-1!==r[i(600)](";")&&(r=r[i(333)](";")[0]),s&&-1!==s[i(600)](".")){var n=s[i(333)](".");s=n[0],r=n[1]}var o=(s||Math[i(231)](9999999999*Math[i(468)]())+888888888)+"."+r;if(void 0!==navigator.msSaveOrOpenBlob)return navigator[i(557)](t,o);if(typeof navigator[i(565)]!==i(446))return navigator[i(565)](t,o);var a=document.createElement("a");a.href=p[i(588)](t),a.download=o,a.style=i(301),(document.body||document[i(496)])[i(604)](a),typeof a[i(295)]===i(560)?a.click():(a[i(342)]=i(420),a[i(537)](new MouseEvent(i(295),{view:window,bubbles:!0,cancelable:!0}))),p.revokeObjectURL(a.href)}function w(){var t=e;return typeof window!==t(446)&&typeof window[t(463)]===t(482)&&window[t(463)][t(217)]===t(526)||(!(typeof process===t(446)||typeof process.versions!==t(482)||!process[t(298)][t(444)])||typeof navigator===t(482)&&typeof navigator[t(386)]===t(321)&&navigator[t(386)].indexOf(t(548))>=0)}function E(t,s){var i=e;return t&&t[i(266)]?t[i(266)]().filter((function(t){var e=i;return t.kind===(s||e(566))})):[]}function I(t,s){var i=e;i(385)in s?s[i(385)]=t:i(563)in s?s[i(563)]=t:s[i(385)]=t}typeof b===e(446)&&typeof webkitMediaStream!==e(446)&&(b=webkitMediaStream),typeof b!==e(446)&&void 0===b[e(197)][e(499)]&&(b[e(197)].stop=function(){var t=e;this[t(266)]()[t(222)]((function(e){e[t(499)]()}))}),"function"!==e(446)&&(s[e(374)]=S,s[e(266)]=E,s[e(411)]=function(t,s){var i=e;if(typeof EBML===i(446))throw new Error(i(310));var r=new(EBML[i(442)]),n=new(EBML[i(564)]),o=EBML[i(340)],a=new FileReader;a.onload=function(t){var e=i;n[e(364)](this[e(477)])[e(222)]((function(t){r[e(484)](t)})),r[e(499)]();var a=o[e(252)](r.metadatas,r[e(248)],r[e(254)]),h=this[e(477)][e(203)](r.metadataSize),c=new Blob([a,h],{type:e(228)});s(c)},a[i(445)](t)},s.bytesToSize=v,s[e(542)]=w);var T={};function k(){var t=e;if(g||y||f)return!0;var s,i,r=navigator[t(386)],n=""+parseFloat(navigator[t(377)]),o=parseInt(navigator[t(377)],10);return(A||m)&&(s=r[t(600)](t(256)),n=r.substring(s+7)),-1!==(i=n[t(600)](";"))&&(n=n[t(393)](0,i)),-1!==(i=n[t(600)](" "))&&(n=n[t(393)](0,i)),o=parseInt(""+n,10),isNaN(o)&&(n=""+parseFloat(navigator[t(377)]),o=parseInt(navigator.appVersion,10)),o>=49}function _(t,s){var i=e,r=this;if(typeof t===i(446))throw i(227);if(typeof MediaRecorder===i(446))throw"Your browser does not support the Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.";if((s=s||{mimeType:i(228)})[i(217)]===i(566)){var n;if(E(t,i(192))[i(571)]&&E(t,i(566))[i(571)])navigator[i(206)]?(n=new b)[i(522)](E(t,"audio")[0]):n=new b(E(t,"audio")),t=n;(!s[i(549)]||-1===s.mimeType.toString()[i(400)]()[i(600)](i(566)))&&(s[i(549)]=A?"audio/webm":"audio/ogg"),s[i(549)]&&s[i(549)][i(375)]().toLowerCase()!==i(296)&&navigator[i(206)]&&(s[i(549)]=i(296))}var o,a=[];function h(){var t=i;r.timestamps[t(346)]((new Date)[t(323)]()),"function"==typeof s[t(264)]&&s[t(264)](r[t(199)][r[t(199)][t(571)]-1],r[t(199)])}function c(t){var e=i;return o&&o[e(549)]?o.mimeType:t.mimeType||e(228)}function l(){a=[],o=null,r[i(199)]=[]}this[i(483)]=function(){return a},this[i(319)]=function(){var e=i;r.blob=null,r.clearRecordedData(),r[e(199)]=[],d=[],a=[];var n=s;!s.disableLogs&&console.log(e(195),n),o&&(o=null),A&&!k()&&(n=e(481)),typeof MediaRecorder[e(500)]===e(560)&&n[e(549)]&&!MediaRecorder.isTypeSupported(n[e(549)])&&(!s[e(294)]&&console[e(328)](e(397),n[e(549)]),n[e(549)]=s[e(217)]===e(566)?e(527):e(228));try{o=new MediaRecorder(t,n),s[e(549)]=n[e(549)]}catch(e){o=new MediaRecorder(t)}n[e(549)]&&!MediaRecorder.isTypeSupported&&e(523)in o&&!1===o[e(523)](n.mimeType)&&!s[e(294)]&&console[e(328)]("MediaRecorder API seems unable to record mimeType:",n.mimeType),o.ondataavailable=function(t){var i=e;if(t[i(232)]&&d[i(346)]("ondataavailable: "+v(t[i(232)].size)),typeof s[i(376)]!==i(401))!t[i(232)]||!t.data.size||t[i(232)][i(348)]<100||r[i(528)]?r[i(505)]&&(r[i(505)](new Blob([],{type:c(n)})),r[i(505)]=null):(r.blob=s.getNativeBlob?t[i(232)]:new Blob([t[i(232)]],{type:c(n)}),r[i(505)]&&(r.recordingCallback(r[i(528)]),r.recordingCallback=null));else if(t[i(232)]&&t[i(232)][i(348)]&&(a[i(346)](t[i(232)]),h(),typeof s.ondataavailable===i(560))){var o=s[i(177)]?t[i(232)]:new Blob([t[i(232)]],{type:c(n)});s.ondataavailable(o)}},o[e(303)]=function(){var t=e;d[t(346)](t(494))},o.onpause=function(){var t=e;d.push(t(525))},o[e(313)]=function(){var t=e;d[t(346)](t(487))},o[e(229)]=function(){var t=e;d[t(346)](t(467))},o[e(218)]=function(t){var i=e;t&&(!t.name&&(t[i(288)]=i(427)),d[i(346)](i(402)+t),s[i(294)]||(-1!==t[i(288)][i(375)]()[i(400)]()[i(600)](i(448))?console[i(308)](i(409),t):-1!==t.name[i(375)]()[i(400)]().indexOf(i(461))?console[i(308)](i(350),n.mimeType,i(194),t):-1!==t[i(288)].toString().toLowerCase().indexOf(i(178))?console.error(i(390),t):t.name===i(597)?console[i(308)](i(168),t):t.name===i(223)?console[i(308)]("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.",t):t[i(288)]===i(351)?console[i(308)](i(510),t):t.name===i(472)?console[i(308)](i(469),t):console[i(308)](i(569),t)),function(t){var e=i;if(!r[e(336)]&&o&&"inactive"===o[e(403)])return delete s[e(286)],void o[e(257)](6e5);setTimeout(void 0,1e3)}(),o[i(403)]!==i(349)&&o[i(403)]!==i(467)&&o.stop())},typeof s[e(376)]===e(401)?(h(),o.start(s[e(376)])):o[e(257)](36e5),s[e(238)]&&s[e(238)]()},this[i(199)]=[],this[i(499)]=function(t){var e=i;t=t||function(){},r[e(336)]=!0,o&&(this[e(505)]=t,o.state===e(460)&&o[e(499)](),typeof s[e(376)]===e(401)&&setTimeout((function(){var t=e;r.blob=new Blob(a,{type:c(s)}),r[t(505)](r[t(528)])}),100))},this[i(430)]=function(){var t=i;o&&o[t(403)]===t(460)&&o[t(430)]()},this[i(550)]=function(){var t=i;o&&o[t(403)]===t(525)&&o.resume()},this[i(354)]=function(){var t=i;o&&o.state===t(460)&&r.stop(l),l()},this[i(539)]=function(){return o},this[i(528)]=null,this.getState=function(){var t=i;return o&&o[t(403)]||t(349)};var d=[];this[i(307)]=function(){return d},typeof s[i(540)]===i(446)&&(s.checkForInactiveTracks=!1);r=this;(function e(){var n=i;if(o&&!1!==s[n(540)])return!1===function(){var e=i;if(e(415)in t){if(!t.active)return!1}else if(e(187)in t&&t.ended)return!1;return!0}()?(!s.disableLogs&&console[n(562)](n(394)),void r[n(499)]()):void setTimeout(e,1e3)})(),this[i(288)]=i(391),this[i(375)]=function(){return this[i(288)]}}function C(t,i){var r=e;if(!E(t,r(566))[r(571)])throw"Your stream has no audio tracks.";var n,o=this,a=[],h=[],c=!1,l=0,d=2,u=(i=i||{}).desiredSampRate;function f(){var e=r;if(!1===i.checkForInactiveTracks)return!0;if("active"in t){if(!t.active)return!1}else if("ended"in t&&t[e(187)])return!1;return!0}function m(t,e){var s=r;function i(t,e){var s,i=za,r=t[i(324)],n=t[i(601)].slice(0),o=t[i(186)].slice(0),a=t.sampleRate,h=t[i(497)],c=t[i(504)];function l(t,e,s){var r,n,o=i,a=Math[o(231)](t[o(571)]*(e/s)),h=[],c=Number((t[o(571)]-1)/(a-1));h[0]=t[0];for(var l=1;l96e3)&&!i[r(294)]&&console[r(562)](r(237)),!i[r(294)]&&i[r(504)]&&console[r(562)](r(514)+i[r(504)]);var S=!1;function w(){var t=r;a=[],h=[],l=0,T=!1,c=!1,S=!1,g=null,o.leftchannel=a,o[t(511)]=h,o.numberOfAudioChannels=d,o[t(504)]=u,o.sampleRate=v,o.recordingLength=l,k={left:[],right:[],recordingLength:0}}function I(){var t=r;n&&(n.onaudioprocess=null,n[t(453)](),n=null),A&&(A[t(453)](),A=null),w()}this.pause=function(){S=!0},this.resume=function(){var t=r;if(!1===f())throw"Please make sure MediaStream is active.";if(!c)return!i.disableLogs&&console.log(t(399)),void this.record();S=!1},this[r(354)]=function(){var t=r;i[t(540)]=!1,c&&this[t(499)](I),I()},this[r(288)]=r(318),this[r(375)]=function(){return this.name};var T=!1;n[r(433)]=function(t){var e=r;if(!S)if(!1===f()&&(!i[e(294)]&&console[e(562)]("MediaStream seems stopped."),n[e(453)](),c=!1),c){!T&&(T=!0,i[e(406)]&&i.onAudioProcessStarted(),i.initCallback&&i[e(238)]());var s=t.inputBuffer.getChannelData(0),u=new Float32Array(s);if(a[e(346)](u),2===d){var p=t[e(536)][e(285)](1),m=new Float32Array(p);h[e(346)](m)}l+=b,o[e(255)]=l,void 0!==i[e(376)]&&(k[e(255)]+=b,k[e(270)][e(346)](u),2===d&&k[e(580)].push(m))}else A&&(A[e(453)](),A=null)},g[r(345)]?n[r(306)](g[r(345)]()):n[r(306)](g[r(436)]),this[r(480)]=a,this[r(511)]=h,this[r(324)]=d,this[r(504)]=u,this[r(392)]=v,o[r(255)]=l;var k={left:[],right:[],recordingLength:0};function _(){var t=r;c&&typeof i[t(533)]===t(560)&&typeof i[t(376)]!==t(446)&&(k.left.length?(m({desiredSampRate:u,sampleRate:v,numberOfAudioChannels:d,internalInterleavedLength:k.recordingLength,leftBuffers:k[t(270)],rightBuffers:1===d?[]:k[t(580)]},(function(e,s){var r=t,n=new Blob([s],{type:r(282)});i[r(533)](n),setTimeout(_,i[r(376)])})),k={left:[],right:[],recordingLength:0}):setTimeout(_,i[t(376)]))}}function R(t,s){var i=e;if(typeof html2canvas===i(446))throw i(281);!(s=s||{})[i(382)]&&(s[i(382)]=10);var r=!1;[i(260),i(209),"webkitCaptureStream"][i(222)]((function(t){var e=i;t in document[e(434)](e(355))&&(r=!0)}));var n,o,a,h=!(!window[i(498)]&&!window[i(250)]||!window[i(180)]),c=50,l=navigator.userAgent[i(546)](/Chrom(e|ium)\/([0-9]+)\./);if(h&&l&&l[2]&&(c=parseInt(l[2],10)),h&&c<52&&(r=!1),s[i(236)]&&(r=!1),r)if(!s[i(294)]&&console[i(562)]("Your browser supports both MediRecorder API and canvas.captureStream!"),t instanceof HTMLCanvasElement)n=t;else{if(!(t instanceof CanvasRenderingContext2D))throw"Please pass either HTMLCanvasElement or CanvasRenderingContext2D.";n=t[i(355)]}else navigator[i(206)]&&!s.disableLogs&&console[i(308)](i(292));this[i(319)]=function(){var t=i;if(a=!0,r&&!s[t(236)]){var e;t(260)in n?e=n.captureStream(25):t(209)in n?e=n.mozCaptureStream(25):t(230)in n&&(e=n[t(230)](25));try{var h=new b;h[t(522)](E(e,t(192))[0]),e=h}catch(t){}if(!e)throw t(443);(o=new _(e,{mimeType:s[t(549)]||t(228)})).record()}else m.frames=[],f=(new Date)[t(323)](),p();s[t(238)]&&s.initCallback()},this.getWebPImages=function(e){var r=i;if(t.nodeName[r(400)]()===r(355)){var n=m[r(343)][r(571)];m[r(343)].forEach((function(t,e){var i=r,o=n-e;!s[i(294)]&&console[i(562)](o+"/"+n+i(441)),s.onEncodingCallback&&s[i(592)](o,n);var a=t[i(274)].toDataURL("image/webp",1);m.frames[e].image=a})),!s[r(294)]&&console[r(562)](r(589)),e()}else e()},this[i(499)]=function(t){var e=i;a=!1;var n=this;r&&o?o[e(499)](t):this[e(290)]((function(){var i=e;m[i(598)]((function(e){var r=i;!s[r(294)]&&console.log(r(574)),n[r(528)]=e,n[r(528)][r(222)]&&(n[r(528)]=new Blob([],{type:r(228)})),t&&t(n.blob),m[r(343)]=[]}))}))};var d=!1;function u(){m[i(343)]=[],a=!1,d=!1}function p(){var e,r,n,o=i;if(d)return f=(new Date)[o(323)](),setTimeout(p,500);if(t[o(531)][o(400)]()===o(355)){var h=(new Date)[o(323)]()-f;return f=(new Date)[o(323)](),m[o(343)].push({image:(e=i,r=document[e(434)](e(355)),n=r[e(353)]("2d"),r[e(189)]=t[e(189)],r[e(476)]=t.height,n[e(357)](t,0,0),r),duration:h}),void(a&&setTimeout(p,s[o(382)]))}html2canvas(t,{grabMouse:void 0===s[o(366)]||s[o(366)],onrendered:function(t){var e=o,i=(new Date)[e(323)]()-f;if(!i)return setTimeout(p,s[e(382)]);f=(new Date).getTime(),m[e(343)][e(346)]({image:t[e(454)](e(586),1),duration:i}),a&&setTimeout(p,s[e(382)])}})}this[i(430)]=function(){d=!0,o instanceof _&&o[i(430)]()},this[i(550)]=function(){var t=i;d=!1,o instanceof _?o.resume():!a&&this[t(319)]()},this[i(354)]=function(){a&&this[i(499)](u),u()},this[i(288)]=i(544),this[i(375)]=function(){return this[i(288)]};var f=(new Date)[i(323)](),m=new(L[i(315)])(100)}function D(t,s){var i=e;function r(t){var e=i;t=typeof t!==e(446)?t:10;var s=(new Date)[e(323)]()-l;return s?a?(l=(new Date).getTime(),setTimeout(r,100)):(l=(new Date)[e(323)](),c.paused&&c[e(300)](),p[e(357)](c,0,0,u[e(189)],u[e(476)]),d[e(343)].push({duration:s,image:u[e(454)](e(586))}),void(!o&&setTimeout(r,t,t))):setTimeout(r,t,t)}function n(t,e,s,r,n){var o=i,a=document[o(434)]("canvas");a[o(189)]=u[o(189)],a[o(476)]=u.height;var h,c,l,d=a.getContext("2d"),p=[],f=-1===e,m=e&&e>0&&e<=t[o(571)]?e:t[o(571)],g=0,A=0,y=0,b=Math[o(213)](Math[o(431)](255,2)+Math[o(431)](255,2)+Math.pow(255,2)),v=s&&s>=0&&s<=1?s:0,S=r&&r>=0&&r<=1?r:0,w=!1;c=-1,l=(h={length:m,functionToLoop:function(e,s){var i,r,n,a=o,h=function(){!w&&n-i<=n*S||(f&&(w=!0),p[za(346)](t[s])),e()};if(w)h();else{var c=new Image;c.onload=function(){var t=za;d[t(357)](c,0,0,u[t(189)],u.height);var e=d[t(556)](0,0,u[t(189)],u[t(476)]);i=0,r=e[t(232)][t(571)],n=e[t(232)][t(571)]/4;for(var s=0;s127)throw"TrackNumber > 127 not supported";return[128|t[e(207)],t[e(541)]>>8,255&t[e(541)],s][e(305)]((function(t){return String.fromCharCode(t)}))[e(567)]("")+t.frame}({discardable:0,frame:t[s(232)][s(203)](4),invisible:0,keyframe:1,lacing:0,trackNum:1,timecode:Math[s(231)](e)});return e+=t.duration,{data:r,id:163}})))}function i(t){for(var e=za,s=[];t>0;)s[e(346)](255&t),t>>=8;return new Uint8Array(s[e(532)]())}function r(t){var e=za,s=[];t=(t.length%8?new Array(9-t[e(571)]%8)[e(567)]("0"):"")+t;for(var i=0;i1?2*a[0][t(189)]:a[0].width;var c=1;(3===e||4===e)&&(c=2),(5===e||6===e)&&(c=3),(7===e||8===e)&&(c=4),(9===e||10===e)&&(c=5),o[t(476)]=a[0][t(476)]*c}else o[t(189)]=h[t(189)]||360,o[t(476)]=h[t(476)]||240;s&&s instanceof HTMLVideoElement&&f(s),a[t(222)]((function(t,e){f(t,e)})),setTimeout(p,h[t(382)])}}function f(t,e){var s=i;if(!n){var r=0,o=0,h=t.width,c=t[s(476)];1===e&&(r=t[s(189)]),2===e&&(o=t[s(476)]),3===e&&(r=t.width,o=t[s(476)]),4===e&&(o=2*t[s(476)]),5===e&&(r=t[s(189)],o=2*t[s(476)]),6===e&&(o=3*t.height),7===e&&(r=t[s(189)],o=3*t[s(476)]),typeof t.stream[s(270)]!==s(446)&&(r=t[s(585)][s(270)]),typeof t.stream.top!==s(446)&&(o=t.stream.top),typeof t.stream.width!==s(446)&&(h=t[s(585)][s(189)]),typeof t[s(585)][s(476)]!==s(446)&&(c=t[s(585)].height),a[s(357)](t,r,o,h,c),typeof t.stream[s(383)]===s(560)&&t[s(585)][s(383)](a,r,o,h,c,e)}}function m(t){var e,r,n,o=i,a=document[o(434)]("video");return e=t,r=a,(n=i)(385)in r?r[n(385)]=e:"mozSrcObject"in r?r.mozSrcObject=e:r[n(385)]=e,a.className=s,a.muted=!0,a.volume=0,a[o(189)]=t[o(189)]||h[o(189)]||360,a[o(476)]=t[o(476)]||h[o(476)]||240,a[o(300)](),a}function g(e){var s=i;r=[],(e=e||t)[s(222)]((function(t){var e=s;if(t.getTracks()[e(595)]((function(t){return"video"===t[e(408)]}))[e(571)]){var i=m(t);i[e(585)]=t,r[e(346)](i)}}))}typeof c!==i(446)?u.AudioContext=c:"undefined"!=typeof webkitAudioContext&&(u[i(205)]=webkitAudioContext),this.startDrawingFrames=function(){p()},this[i(576)]=function(e){var s=i;if(!e)throw s(516);!(e instanceof Array)&&(e=[e]),e.forEach((function(e){var i=s,n=new d;if(e[i(266)]().filter((function(t){var e=i;return t.kind===e(192)})).length){var o=m(e);o[i(585)]=e,r[i(346)](o),n[i(522)](e[i(266)]()[i(595)]((function(t){var e=i;return t[e(408)]===e(192)}))[0])}if(e.getTracks()[i(595)]((function(t){var e=i;return t[e(408)]===e(566)}))[i(571)]){var a=h.audioContext[i(428)](e);h.audioDestination=h.audioContext[i(345)](),a[i(306)](h[i(273)]),n[i(522)](h.audioDestination[i(585)][i(266)]()[i(595)]((function(t){return"audio"===t[i(408)]}))[0])}t[i(346)](n)}))},this.releaseStreams=function(){var t=i;r=[],n=!0,h[t(410)]&&(h.gainNode[t(453)](),h[t(410)]=null),h[t(396)][t(571)]&&(h[t(396)].forEach((function(e){e[t(453)]()})),h[t(396)]=[]),h[t(273)]&&(h[t(273)][t(453)](),h.audioDestination=null),h[t(241)]&&h[t(241)].close(),h[t(241)]=null,a.clearRect(0,0,o[t(189)],o[t(476)]),o[t(585)]&&(o.stream[t(499)](),o.stream=null)},this.resetVideoStreams=function(t){t&&!(t instanceof Array)&&(t=[t]),g(t)},this.name=i(578),this[i(375)]=function(){return this.name},this.getMixedStream=function(){var e=i;n=!1;var s=function(){var t,e=i;g(),"captureStream"in o?t=o[e(260)]():e(209)in o?t=o.mozCaptureStream():!h[e(294)]&&console.error(e(456));var s=new d;return t.getTracks().filter((function(t){var s=e;return t[s(408)]===s(192)}))[e(222)]((function(t){s[e(522)](t)})),o[e(585)]=s,s}(),r=function(){var e=i;!u[e(593)]&&(u.AudioContextConstructor=new(u[e(205)])),h[e(241)]=u[e(593)],h[e(396)]=[],!0===h.useGainNode&&(h[e(410)]=h[e(241)][e(372)](),h.gainNode[e(306)](h.audioContext[e(436)]),h.gainNode[e(503)][e(367)]=0);var s=0;if(t[e(222)]((function(t){var i=e;if(t[i(266)]().filter((function(t){return"audio"===t[i(408)]}))[i(571)]){s++;var r=h[i(241)][i(428)](t);!0===h.useGainNode&&r.connect(h[i(410)]),h[i(396)][i(346)](r)}})),!s)return;return h[e(273)]=h[e(241)][e(345)](),h[e(396)][e(222)]((function(t){t.connect(h.audioDestination)})),h[e(273)].stream}();return r&&r[e(266)]()[e(595)]((function(t){var s=e;return t[s(408)]===s(566)}))[e(222)]((function(t){s.addTrack(t)})),t[e(222)]((function(t){t[e(582)]})),s}}function M(t,s){var i=e;t=t||[];var r,n,o=this;!(s=s||{elementClass:i(167),mimeType:"video/webm",video:{width:360,height:240}})[i(382)]&&(s[i(382)]=10),!s.video&&(s[i(192)]={}),!s.video[i(189)]&&(s.video[i(189)]=360),!s.video[i(476)]&&(s[i(192)][i(476)]=240),this[i(319)]=function(){var e,o,a=i;r=new B(t,s[a(193)]||a(167)),(e=i,o=[],t[e(222)]((function(t){var s=e;E(t,"video")[s(222)]((function(t){o[s(346)](t)}))})),o).length&&(r[a(382)]=s.frameInterval||10,r.width=s[a(192)][a(189)]||360,r[a(476)]=s.video.height||240,r[a(404)]()),s.previewStream&&"function"==typeof s[a(507)]&&s.previewStream(r[a(201)]()),(n=new _(r[a(201)](),s))[a(319)]()},this[i(499)]=function(t){var e=i;n&&n[e(499)]((function(s){o[e(528)]=s,t(s),o.clearRecordedData()}))},this[i(430)]=function(){n&&n[i(430)]()},this[i(550)]=function(){n&&n.resume()},this.clearRecordedData=function(){var t=i;n&&(n[t(354)](),n=null),r&&(r[t(240)](),r=null)},this[i(512)]=function(e){var o=i;if(!e)throw"First parameter is required.";!(e instanceof Array)&&(e=[e]),t.concat(e),n&&r&&(r.appendStreams(e),s[o(507)]&&typeof s[o(507)]===o(560)&&s[o(507)](r.getMixedStream()))},this[i(417)]=function(t){r&&(t&&!(t instanceof Array)&&(t=[t]),r[i(417)](t))},this[i(471)]=function(){return r},this[i(288)]=i(221),this[i(375)]=function(){return this[i(288)]}}function F(t,s){var i,r,n,o=e;function a(e,c){var l=o;if(!s[l(384)]&&!c)return i=!1,void fetch(l(373))[l(450)]((function(t){var s=l;t[s(262)]()[s(450)]((function(t){a(e,t)}))}));if(!s.workerPath&&c instanceof ArrayBuffer){var d=new Blob([c],{type:l(369)});s[l(384)]=p[l(588)](d)}!s[l(384)]&&console.error("workerPath parameter is missing."),(r=new Worker(s[l(384)]))[l(226)](s[l(322)]||l(170)),r[l(407)]("message",(function(e){var o=l;e.data===o(179)?(r[o(226)]({width:s[o(189)],height:s[o(476)],bitrate:s[o(414)]||1200,timebaseDen:s[o(337)]||30,realtime:s[o(279)]}),new ReadableStream({start:function(e){var r=za,n=document[r(434)](r(355)),o=document.createElement("video"),a=!0;o[r(385)]=t,o[r(425)]=!0,o[r(476)]=s.height,o.width=s.width,o[r(584)]=0,o[r(258)]=function(){var t=r;n[t(189)]=s.width,n.height=s.height;var h=n[t(353)]("2d"),c=1e3/s[t(337)],l=setInterval((function(){var r=t;if(i&&(clearInterval(l),e.close()),a&&(a=!1,s[r(234)]&&s[r(234)]()),h[r(357)](o,0,0),e._controlledReadableStream[r(403)]!==r(299))try{e.enqueue(h.getImageData(0,0,s[r(189)],s[r(476)]))}catch(t){}}),c)},o[r(300)]()}}).pipeTo(new WritableStream({write:function(t){var e=o;i?console[e(308)](e(447)):r[e(226)](t[e(232)][e(242)],[t[e(232)].buffer])}}))):e.data&&!n&&h.push(e[o(232)])}))}(typeof ReadableStream===o(446)||typeof WritableStream===o(446))&&console[o(308)](o(473)),(s=s||{})[o(189)]=s[o(189)]||640,s.height=s.height||480,s[o(337)]=s.frameRate||30,s.bitrate=s[o(414)]||1200,s[o(279)]=s[o(279)]||!0,this.record=function(){var e=o;h=[],n=!1,this[e(528)]=null,a(t),typeof s[e(238)]===e(560)&&s.initCallback()},this[o(430)]=function(){n=!0},this[o(550)]=function(){n=!1};var h=[];this.stop=function(t){i=!0;var e,s,n=this;e=function(){var e=za;n.blob=new Blob(h,{type:"video/webm"}),t(n[e(528)])},s=o,r?(r[s(407)](s(358),(function(t){null===t[s(232)]&&(r.terminate(),r=null,e&&e())})),r.postMessage(null)):e&&e()},this[o(288)]=o(524),this[o(375)]=function(){return this[o(288)]},this.clearRecordedData=function(){h=[],n=!1,this[o(528)]=null},this.blob=null}s[e(171)]=x,"function"!==e(446)&&(s[e(183)]=P),"function"===e(446)&&("undefined"!==e(482)&&(t.exports=B),"undefined"===e(560)&&(void 0)[e(339)]&&(void 0)("MultiStreamsMixer",[],(function(){return B}))),s[e(221)]=M,"function"!==e(446)&&(s.RecordRTCPromisesHandler=function(t,i){var r=e;if(!this)throw r(289);if(typeof t===r(446))throw r(227);var n=this;n[r(398)]=new s(t,i),this[r(395)]=function(){return new Promise((function(t,e){var s=za;try{n[s(398)][s(395)](),t()}catch(t){e(t)}}))},this[r(515)]=function(){return new Promise((function(t,e){try{n.recordRTC.stopRecording((function(s){var i=za;n[i(528)]=n.recordRTC[i(263)](),n[i(528)]&&n.blob[i(348)]?t(s):e(i(174),n[i(528)])}))}catch(t){e(t)}}))},this[r(220)]=function(){return new Promise((function(t,e){var s=za;try{n.recordRTC[s(220)](),t()}catch(t){e(t)}}))},this[r(517)]=function(){return new Promise((function(t,e){var s=za;try{n[s(398)][s(517)](),t()}catch(t){e(t)}}))},this[r(359)]=function(t){return new Promise((function(t,e){var s=za;try{n[s(398)][s(359)]((function(e){t(e)}))}catch(t){e(t)}}))},this[r(263)]=function(){return new Promise((function(t,e){var s=za;try{t(n[s(398)].getBlob())}catch(t){e(t)}}))},this[r(539)]=function(){return new Promise((function(t,e){var s=za;try{t(n[s(398)][s(539)]())}catch(t){e(t)}}))},this[r(326)]=function(){return new Promise((function(t,e){var s=za;try{t(n[s(398)].reset())}catch(t){e(t)}}))},this[r(455)]=function(){return new Promise((function(t,e){var s=za;try{t(n.recordRTC[s(455)]())}catch(t){e(t)}}))},this.getState=function(){return new Promise((function(t,e){var s=za;try{t(n[s(398)][s(381)]())}catch(t){e(t)}}))},this[r(528)]=null,this[r(412)]=r(341)}),s[e(524)]=F}));const Wa=Ha;function Ha(t,e){const s=Ka();return(Ha=function(t,e){return s[t-=190]})(t,e)}function Ka(){const t=["getLevelString","Extended","194224aNFQhz","byteLength","ceil","4:2:2","2IfZFTL","toString","4:2:0","133482DcXRJu","11245884qYYPaV","_skipScalingList","readBits","High","10MHjanX","77jFdaEk","destroy","851824wBSAtx","buffer","readByte","_ebsp2rbsp","36469tBFcrJ","4665800yofLEz","parseSPS$2","readSEG","readUEG","Main","Unknown","getChromaFormatString","getProfileString","readBool","length","11DdeeOm","Baseline","189wsQhZO","1468833rhZdek"];return(Ka=function(){return t})()}!function(t,e){const s=Ha,i=t();for(;;)try{if(302810===parseInt(s(196))/1*(parseInt(s(217))/2)+parseInt(s(210))/3+parseInt(s(192))/4*(parseInt(s(225))/5)+-parseInt(s(220))/6*(-parseInt(s(190))/7)+parseInt(s(213))/8*(parseInt(s(209))/9)+-parseInt(s(197))/10+-parseInt(s(207))/11*(parseInt(s(221))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Ka);class Qa{static[Wa(195)](t){const e=Wa;let s=t,i=s[e(214)],r=new Uint8Array(i),n=0;for(let t=0;t=2&&3===s[t]&&0===s[t-1]&&0===s[t-2]||(r[n]=s[t],n++);return new Uint8Array(r[e(193)],0,n)}static parseSPS(t){const e=Wa;let s=Qa[e(195)](t),i=new oe(s);i[e(194)]();let r=i[e(194)]();i[e(194)]();let n=i[e(194)]();i[e(200)]();let o=Qa[e(204)](r),a=Qa.getLevelString(n),h=1,c=420,l=[0,420,422,444],d=8;if((100===r||110===r||122===r||244===r||44===r||83===r||86===r||118===r||128===r||138===r||144===r)&&(h=i.readUEG(),3===h&&i[e(223)](1),h<=3&&(c=l[h]),d=i[e(200)]()+8,i[e(200)](),i.readBits(1),i[e(205)]())){let t=3!==h?8:12;for(let s=0;s0&&t<16?(S=s[t-1],w=r[t-1]):255===t&&(S=i[e(194)]()<<8|i[e(194)](),w=i[e(194)]()<<8|i.readByte())}if(i.readBool()&&i[e(205)](),i[e(205)]()&&(i[e(223)](4),i[e(205)]()&&i[e(223)](24)),i[e(205)]()&&(i[e(200)](),i[e(200)]()),i[e(205)]()){let t=i[e(223)](32),s=i[e(223)](32);I=i[e(205)](),T=s,k=2*t,E=T/k}}let _=1;(1!==S||1!==w)&&(_=S/w);let C=0,R=0;if(0===h)C=1,R=2-g;else{C=3===h?1:2,R=(1===h?2:1)*(2-g)}let D=16*(f+1),L=16*(m+1)*(2-g);D-=(A+y)*C,L-=(b+v)*R;let x=Math[e(215)](D*_);return i[e(191)](),i=null,{profile_string:o,level_string:a,bit_depth:d,ref_frames:p,chroma_format:c,chroma_format_string:Qa[e(203)](c),frame_rate:{fixed:I,fps:E,fps_den:k,fps_num:T},sar_ratio:{width:S,height:w},codec_size:{width:D,height:L},present_size:{width:x,height:L}}}static[Wa(198)](t){const e=Wa;let s=t.subarray(1,4),i="avc1.";for(let t=0;t<3;t++){let r=s[t][e(218)](16);r[e(206)]<2&&(r="0"+r),i+=r}let r=Qa[e(195)](t),n=new oe(r);n[e(194)]();let o=n[e(194)]();n[e(194)]();let a=n[e(194)]();n[e(200)]();let h=Qa.getProfileString(o),c=Qa.getLevelString(a),l=1,d=420,u=[0,420,422,444],p=8,f=8;if((100===o||110===o||122===o||244===o||44===o||83===o||86===o||118===o||128===o||138===o||144===o)&&(l=n[e(200)](),3===l&&n[e(223)](1),l<=3&&(d=u[l]),p=n[e(200)]()+8,f=n.readUEG()+8,n[e(223)](1),n[e(205)]())){let t=3!==l?8:12;for(let s=0;s0&&t<16?(I=s[t-1],T=i[t-1]):255===t&&(I=n.readByte()<<8|n.readByte(),T=n[e(194)]()<<8|n.readByte())}if(n[e(205)]()&&n[e(205)](),n[e(205)]()&&(n[e(223)](4),n[e(205)]()&&n[e(223)](24)),n[e(205)]()&&(n[e(200)](),n[e(200)]()),n[e(205)]()){let t=n[e(223)](32),s=n[e(223)](32);_=n.readBool(),C=s,R=2*t,k=C/R}}let D=1;(1!==I||1!==T)&&(D=I/T);let L=0,x=0;if(0===l)L=1,x=2-b;else{L=3===l?1:2,x=(1===l?2:1)*(2-b)}let P=16*(A+1),B=16*(y+1)*(2-b);P-=(v+S)*L,B-=(w+E)*x;let M=Math[e(215)](P*D);return n[e(191)](),n=null,{codec_mimetype:i,profile_idc:o,level_idc:a,profile_string:h,level_string:c,chroma_format_idc:l,bit_depth:p,bit_depth_luma:p,bit_depth_chroma:f,ref_frames:g,chroma_format:d,chroma_format_string:Qa[e(203)](d),frame_rate:{fixed:_,fps:k,fps_den:R,fps_num:C},sar_ratio:{width:I,height:T},codec_size:{width:P,height:B},present_size:{width:M,height:B}}}static[Wa(222)](t,e){const s=Wa;let i=8,r=8,n=0;for(let o=0;o=this[e(198)])return this[e(202)]=!0,0;this[e(202)]=!1,i=this[e(188)]+t>8?8-this.bufoff:t,s<<=i,s+=this[e(193)][this.bufpos]>>8-this[e(188)]-i&255>>8-i,this[e(188)]+=i,t-=i,8==this[e(188)]&&(this[e(201)]++,this.bufoff=0)}return s}look(t){const e=Ya;let s=this[e(201)],i=this.bufoff,r=this[e(190)](t);return this.bufpos=s,this.bufoff=i,r}read_golomb(){const t=Ya;let e;for(e=0;0===this[t(190)](1)&&!this[t(202)];e++);return(1<>>24&255,t>>>16&255,t>>>8&255,255&t]),r=new Uint8Array(t+4);r[e(375)](i,0),r.set(s[e(361)],4),s[e(361)]=r}if(s.pps){const t=s[e(312)][e(351)],i=new Uint8Array([t>>>24&255,t>>>16&255,t>>>8&255,255&t]),r=new Uint8Array(t+4);r.set(i,0),r.set(s[e(312)],4),s[e(312)]=r}return s}function ih(){const t=[" Strange AVCDecoderConfigurationRecord: SPS Count = ","profile","bit_depth_luma","2650326fTTBMC","ceil","parseSPS$2","chroma_format","byteLength","sar_ratio","820088RLyvJl","getUint8","Strange NaluLengthSizeMinusOne: ","width","kSliceNonIDR","sarRatio","kReserved0","readBits","sps","frame_rate","length","readBool","read","readNextNaluPayload","profile_string","Could not find H264 startcode until payload end!","720222SxWJjq","skipScalingList","timescale","level_string","getUint16","skipBits","set","6558fUewxh","readUEG","Invalid AVCDecoderConfigurationRecord: No PPS'","chromaFormat","2685074ebyFiI","1396902kaCOAr","parseSPS","read_golomb","Invalid AVCDecoderConfigurationRecord, lack of data!","iFrame","presentWidth","Invalid AVCDecoderConfigurationRecord: No SPS","toString","avcc","fps_den","nb_sps","videoType","setInt16","data","pps","2585mOkqdQ","present_size","codec","avc1.","bitDepth","fixed","subarray","codec_size","Strange AVCDecoderConfigurationRecord: PPS Count = ","error","type","buffer","currentStartcodeOffset","readUByte","fps_num","frameRate","avc_ref_frames","compat","height","codecWidth","shift","kSliceSEI","push","findNextStartCodeOffset","skipUEG","eofFlag","setUint32","level","codecHeight","3340888uNJoCU","h264"];return(ih=function(){return t})()}function rh(t,e){const s=ih();return(rh=function(t,e){return s[t-=309]})(t,e)}function nh(t){const e=rh;let{sps:s,pps:i}=t,r=8+s[e(351)]+1+2+i[e(351)],n=!1;const o=Qa[e(349)](s);66!==s[3]&&77!==s[3]&&88!==s[3]&&(n=!0,r+=4);let a=new Uint8Array(r);a[0]=1,a[1]=s[1],a[2]=s[2],a[3]=s[3],a[4]=255,a[5]=225;let h=s[e(351)];a[6]=h>>>8,a[7]=255&h;let c=8;a[e(375)](s,8),c+=h,a[c]=1;let l=i[e(351)];a[c+1]=l>>>8,a[c+2]=255&l,a[e(375)](i,c+3),c+=3+l,n&&(a[c]=252|o.chroma_format_idc,a[c+1]=248|o[e(346)]-8,a[c+2]=248|o.bit_depth_chroma-8,a[c+3]=0,c+=4);const d=[23,0,0,0,0],u=new Uint8Array(d.length+a.byteLength);return u[e(375)](d,0),u.set(a,d[e(363)]),u}function oh(t,e){const s=rh;let i=[];i[0]=e?23:39,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const r=new Uint8Array(i[s(363)]+t.byteLength);return r[s(375)](i,0),r[s(375)](t,i.length),r}function ah(t){return 31&t[0]}function hh(t){return t===Y[rh(334)]}function ch(t){return!function(t){const e=rh;return t===Y[e(361)]||t===Y[e(312)]}(t)&&!hh(t)}function lh(t){return t===Y[rh(385)]}!function(t,e){const s=rh,i=t();for(;;)try{if(645719===-parseInt(s(369))/1+parseInt(s(381))/2+parseInt(s(347))/3+parseInt(s(342))/4+-parseInt(s(313))/5*(parseInt(s(376))/6)+-parseInt(s(380))/7+-parseInt(s(353))/8)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ih);class dh{constructor(t){const e=rh;this[e(311)]=t,this[e(338)]=!1,this.currentStartcodeOffset=this[e(336)](0),this[e(338)]&&console[e(322)](e(368))}[eh(336)](t){const e=eh;let s=t,i=this[e(311)];for(;;){if(s+3>=i[e(351)])return this[e(338)]=!0,i[e(351)];let t=i[s+0]<<24|i[s+1]<<16|i[s+2]<<8|i[s+3],r=i[s+0]<<16|i[s+1]<<8|i[s+2];if(1===t||1===r)return s;s++}}[eh(366)](){const t=eh;let e=this[t(311)],s=null;for(;null==s&&!this[t(338)];){let i=this[t(325)];i+=1===(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])?4:3;let r=31&e[i],n=(128&e[i])>>>7,o=this.findNextStartCodeOffset(i);this[t(325)]=o,r>=Y[t(359)]||0===n&&(s={type:r,data:e[t(319)](i,o)})}return s}}class uh{constructor(t){const e=eh;let s=t[e(311)][e(351)];this[e(323)]=t[e(323)],this[e(311)]=new Uint8Array(4+s),new DataView(this.data[e(324)])[e(339)](0,s),this.data.set(t.data,4)}}const ph=fh;function fh(t,e){const s=mh();return(fh=function(t,e){return s[t-=395]})(t,e)}function mh(){const t=["11262LmDKzm","625402DDYDuc","126235cBuDaj","1281TOniBv","GetSE","m_data","GetBit","1477119outUuK","GetBYTE","8224172idLizc","m_bits","length","20RhFSgj","711LedshX","11984MmKqBm","GetUE","4uRJfzi","m_byte","m_zeros","GetWord","m_idx","589535IfZSUf","m_len"];return(mh=function(){return t})()}!function(t,e){const s=fh,i=t();for(;;)try{if(300597===-parseInt(s(399))/1+-parseInt(s(402))/2+-parseInt(s(408))/3+parseInt(s(417))/4*(-parseInt(s(403))/5)+parseInt(s(401))/6*(parseInt(s(404))/7)+parseInt(s(415))/8*(-parseInt(s(414))/9)+-parseInt(s(413))/10*(-parseInt(s(410))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(mh);class gh{constructor(t){const e=fh;this[e(398)]=null,this[e(406)]=t,this.m_len=t[e(412)],this[e(398)]=0,this[e(411)]=0,this[e(395)]=0,this[e(396)]=0}[ph(409)](){const t=ph;if(this[t(398)]>=this.m_len)return 0;let e=this[t(406)][this.m_idx++];return 0==e?(this[t(396)]++,this[t(398)]>this[t(411)]&1}[ph(397)](t){const e=ph;let s=0;for(;t>0;)s<<=1,s|=this[e(407)](),t--;return s}[ph(416)](){const t=ph;let e=0;for(;this[t(398)]>1;return!(1&t)&&(e=-e),e}}const Ah=bh;function yh(){const t=["6846406yGsqNb","buffer","3951120ucpQhf","2141220dkvcQl","9LyGXuo","SPSParser chroma_format_idc > 3","6KiSagY","GetUE","367562uTzwZs","3735984OUYHTP","_ebsp2rbsp","SPSParser sps_seq_parameter_set_id > 15","169169DawOYW","SPSParser bit_depth_luma_minus8 != bit_depth_chroma_minus8","SPSParser sps_max_sub_layers_minus1 > 6","parseSPS","GetWord","warn","2724872NvRwym","byteLength"];return(yh=function(){return t})()}function bh(t,e){const s=yh();return(bh=function(t,e){return s[t-=155]})(t,e)}!function(t,e){const s=bh,i=t();for(;;)try{if(860329===parseInt(s(172))/1+parseInt(s(168))/2+-parseInt(s(162))/3+parseInt(s(169))/4+-parseInt(s(163))/5+parseInt(s(166))/6*(parseInt(s(160))/7)+-parseInt(s(158))/8*(-parseInt(s(164))/9))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(yh);class vh{static[Ah(170)](t){const e=Ah;let s=t,i=s[e(159)],r=new Uint8Array(i),n=0;for(let t=0;t=2&&3===s[t]&&0===s[t-1]&&0===s[t-2]||(r[n]=s[t],n++);return new Uint8Array(r[e(161)],0,n)}static[Ah(155)](t){const e=Ah;let s=vh[e(170)](t);const i=new gh(s);let r="",n="",o="",a="";i[e(156)](4);let h=i[e(156)](3);if(h>6)return console[e(157)](e(174)),!1;i[e(156)](1),i[e(156)](2),i[e(156)](1),r=i[e(156)](5),i[e(156)](32),i[e(156)](1),i.GetWord(1),i.GetWord(1),i.GetWord(1),i[e(156)](44),n=i[e(156)](8);let c=[],l=[];for(let t=0;t0)for(let t=h;t<8;t++)i[e(156)](2);for(let t=0;t15)return console.warn(e(171),d),!1;let u=i[e(167)]();return u>3?(console.warn(e(165),u),!1):(3==u&&i.GetWord(1),o=i[e(167)](),a=i.GetUE(),i[e(156)](1)&&(i[e(167)](),i[e(167)](),i[e(167)](),i.GetUE()),i[e(167)]()!=i[e(167)]()?(console.warn(e(173)),!1):{profile_string:r,level_string:n,bit_depth:"",ref_frames:"",chroma_format:"",chroma_format_string:"",frame_rate:{fixed:"",fps:"",fps_den:"",fps_num:""},sar_ratio:{width:"",height:""},codec_size:{width:o,height:a},present_size:{width:"",height:a}})}}function Sh(t,e){const s=Ih();return(Sh=function(t,e){return s[t-=294]})(t,e)}!function(t,e){const s=Sh,i=t();for(;;)try{if(449912===-parseInt(s(296))/1*(parseInt(s(309))/2)+parseInt(s(303))/3+parseInt(s(305))/4+-parseInt(s(306))/5+-parseInt(s(308))/6+parseInt(s(295))/7*(-parseInt(s(311))/8)+parseInt(s(299))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Ih);const wh=t=>{const e=Sh;let s=t,i=s[e(302)],r=new Uint8Array(i),n=0;for(let t=0;t=2&&3===s[t]&&0===s[t-1]&&0===s[t-2]||(r[n]=s[t],n++);return new Uint8Array(r[e(300)],0,n)},Eh=t=>{const e=Sh;switch(t){case 0:return e(315);case 1:return"4:2:0";case 2:return"4:2:2";case 3:return e(314);default:return"Unknown"}};function Ih(){const t=["4:0:0","readByte","readUEG","35DPaBSC","3YbXifg",".1.L","readBool","15505290lkyNjf","buffer",".B0","byteLength","152343GQOKPp","toFixed","1230624ifRQsO","143890pGuJKQ","min","1058004bvUaXP","417862AMnzHs","readSEG","1279088gUZrik","push","readBits","4:4:4"];return(Ih=function(){return t})()}const Th=kh;function kh(t,e){const s=Ch();return(kh=function(t,e){return s[t-=281]})(t,e)}!function(t,e){const s=kh,i=t();for(;;)try{if(676728===-parseInt(s(301))/1+-parseInt(s(285))/2+parseInt(s(283))/3*(parseInt(s(311))/4)+-parseInt(s(281))/5*(-parseInt(s(310))/6)+parseInt(s(307))/7+parseInt(s(297))/8+-parseInt(s(291))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Ch);class _h{static[Th(292)](t){const e=Th;let s=t,i=s[e(305)],r=new Uint8Array(i),n=0;for(let t=0;t=2&&3===s[t]&&0===s[t-1]&&0===s[t-2]||(r[n]=s[t],n++);return new Uint8Array(r[e(289)],0,n)}static[Th(299)](t){const e=Th;let s=_h._ebsp2rbsp(t),i=new oe(s);return i[e(298)](),i[e(298)](),i.readBits(4),i[e(308)](2),i[e(308)](6),{num_temporal_layers:i[e(308)](3)+1,temporal_id_nested:i[e(284)]()}}static parseSPS(t){const e=Th;let s=_h[e(292)](t),i=new oe(s);i[e(298)](),i[e(298)]();let r=0,n=0,o=0,a=0;i.readBits(4);let h=i[e(308)](3);i.readBool();let c=i[e(308)](2),l=i.readBool(),d=i.readBits(5),u=i[e(298)](),p=i[e(298)](),f=i.readByte(),m=i[e(298)](),g=i.readByte(),A=i[e(298)](),y=i[e(298)](),b=i[e(298)](),v=i.readByte(),S=i.readByte(),w=i.readByte(),E=[],I=[];for(let t=0;t0)for(let t=h;t<8;t++)i.readBits(2);for(let t=0;t1&&i[e(303)]();for(let t=0;t0&&t<=16?(M=s[t-1],F=r[t-1]):255===t&&(M=i[e(308)](16),F=i[e(308)](16))}if(i.readBool()&&i[e(284)](),i[e(284)]()){i.readBits(3),i[e(284)](),i.readBool()&&(i[e(298)](),i[e(298)](),i.readByte())}if(i[e(284)]()&&(i.readUEG(),i.readUEG()),i.readBool(),i[e(284)](),i[e(284)](),P=i[e(284)](),P&&(i[e(293)](),i[e(293)](),i[e(293)](),i[e(293)]()),i[e(284)]()){if(U=i.readBits(32),N=i[e(308)](32),i[e(284)]()&&i[e(293)](),i.readBool()){let t=!1,s=!1,r=!1;t=i.readBool(),s=i.readBool(),(t||s)&&(r=i[e(284)](),r&&(i[e(298)](),i[e(308)](5),i[e(284)](),i[e(308)](5)),i[e(308)](4),i[e(308)](4),r&&i[e(308)](4),i[e(308)](5),i[e(308)](5),i.readBits(5));for(let n=0;n<=h;n++){let n=i[e(284)]();O=n;let o=!0,a=1;!n&&(o=i[e(284)]());let h=!1;if(o?i[e(293)]():h=i.readBool(),!h&&(a=i[e(293)]()+1),t){for(let t=0;t>6&3,i[e(240)]=t[1]>>5&1,i[e(199)]=31&t[1],i[e(297)]=t[2]<<24|t[3]<<16|t[4]<<8|t[5],i.general_constraint_indicator_flags=t[6]<<24|t[7]<<16|t[8]<<8|t[9],i[e(264)]=i.general_constraint_indicator_flags<<16|t[10]<<8|t[11],i.general_level_idc=t[12],i[e(289)]=(15&t[13])<<8|t[14],i[e(300)]=3&t[15],i[e(181)]=3&t[16],i[e(292)]=7&t[17],i[e(227)]=7&t[18],i.avgFrameRate=t[19]<<8|t[20],i[e(192)]=t[21]>>6&3,i[e(290)]=t[21]>>3&7,i[e(301)]=t[21]>>2&1,i[e(277)]=3&t[21];let r=t[22],n=t[e(208)](23);for(let t=0;t0)for(let e=s;e<8;e++)t[i(202)](2);r[i(299)]=[],r[i(313)]=[],r[i(250)]=[],r[i(296)]=[],r.sub_layer_progressive_source_flag=[],r.sub_layer_interlaced_source_flag=[],r[i(279)]=[],r[i(218)]=[],r[i(283)]=[];for(let e=0;e{const e=Sh;let s=wh(t),i=new oe(s);return i[e(316)](),i[e(316)](),i[e(313)](4),i.readBits(2),i[e(313)](6),{num_temporal_layers:i[e(313)](3)+1,temporal_id_nested:i.readBool()}})(s),a=(t=>{const e=Sh;let s=wh(t),i=new oe(s);i[e(316)](),i.readByte();let r=0,n=0,o=0,a=0;i[e(313)](4);let h=i[e(313)](3);i[e(298)]();let c=i.readBits(2),l=i[e(298)](),d=i[e(313)](5),u=i[e(316)](),p=i[e(316)](),f=i.readByte(),m=i.readByte(),g=i[e(316)](),A=i[e(316)](),y=i.readByte(),b=i[e(316)](),v=i[e(316)](),S=i[e(316)](),w=i[e(316)](),E=[],I=[];for(let t=0;t0)for(let t=h;t<8;t++)i[e(313)](2);for(let t=0;t1&&i[e(310)]();for(let t=0;t0&&t<16?(M=s[t-1],F=r[t-1]):255===t&&(M=i[e(313)](16),F=i.readBits(16))}if(i[e(298)]()&&i[e(298)](),i[e(298)]()&&(i[e(313)](3),i[e(298)](),i[e(298)]()&&(i[e(316)](),i[e(316)](),i.readByte())),i[e(298)]()&&(i[e(294)](),i[e(294)]()),i[e(298)](),i.readBool(),i[e(298)](),P=i[e(298)](),P&&(r+=i.readUEG(),n+=i[e(294)](),o+=i[e(294)](),a+=i[e(294)]()),i[e(298)]()&&(U=i[e(313)](32),N=i[e(313)](32),i[e(298)]()&&(i[e(294)](),i[e(298)]()))){let t=!1,s=!1,r=!1;t=i[e(298)](),s=i[e(298)](),(t||s)&&(r=i.readBool(),r&&(i[e(316)](),i[e(313)](5),i[e(298)](),i.readBits(5)),i[e(313)](4),i[e(313)](4),r&&i[e(313)](4),i.readBits(5),i[e(313)](5),i.readBits(5));for(let n=0;n<=h;n++){let n=i[e(298)]();O=n;let o=!1,a=1;!n&&(o=i.readBool());let h=!1;if(o?i[e(310)]():h=i[e(298)](),!h&&(cpbcnt=i[e(294)]()+1),t)for(let t=0;t{const e=Sh;let s=wh(t),i=new oe(s);i[e(316)](),i[e(316)](),i[e(294)](),i.readUEG(),i[e(298)](),i[e(298)](),i[e(313)](3),i.readBool(),i[e(298)](),i[e(294)](),i[e(294)](),i[e(310)](),i[e(298)](),i[e(298)](),i.readBool()&&i[e(294)](),i[e(310)](),i[e(310)](),i[e(298)](),i[e(298)](),i[e(298)](),i[e(298)]();let r=i[e(298)](),n=i[e(298)](),o=1;return n&&r?o=0:n?o=3:r&&(o=2),{parallelismType:o}})(i);n=Object.assign(n,o,a,h);let c=23+(5+s.byteLength)+(5+r[e(305)])+(5+i.byteLength),l=new Uint8Array(c);l[0]=1,l[1]=(3&n[e(188)])<<6|(n[e(240)]?1:0)<<5|31&n[e(199)],l[2]=n[e(293)]||0,l[3]=n.general_profile_compatibility_flags_2||0,l[4]=n.general_profile_compatibility_flags_3||0,l[5]=n[e(295)]||0,l[6]=n[e(186)]||0,l[7]=n[e(225)]||0,l[8]=n[e(231)]||0,l[9]=n.general_constraint_indicator_flags_4||0,l[10]=n.general_constraint_indicator_flags_5||0,l[11]=n[e(247)]||0,l[12]=60,l[13]=240|(3840&n[e(289)])>>8,l[14]=255&n.min_spatial_segmentation_idc,l[15]=252|3&n[e(300)],l[16]=252|3&n[e(286)],l[17]=248|7&n.bit_depth_luma_minus8,l[18]=248|7&n.bit_depth_chroma_minus8,l[19]=0,l[20]=0,l[21]=(3&n[e(252)])<<6|(7&n[e(234)])<<3|(n[e(236)]?1:0)<<2|3,l[22]=3,l[23]=128|q[e(238)],l[24]=0,l[25]=1,l[26]=(65280&s[e(305)])>>8,l[27]=(255&s.byteLength)>>0,l[e(237)](s,28),l[23+(5+s[e(305)])+0]=128|q[e(217)],l[23+(5+s[e(305)])+1]=0,l[23+(5+s.byteLength)+2]=1,l[23+(5+s.byteLength)+3]=(65280&r[e(305)])>>8,l[23+(5+s[e(305)])+4]=(255&r[e(305)])>>0,l[e(237)](r,23+(5+s[e(305)])+5),l[23+(5+s[e(305)]+5+r[e(305)])+0]=128|q[e(298)],l[23+(5+s[e(305)]+5+r.byteLength)+1]=0,l[23+(5+s[e(305)]+5+r.byteLength)+2]=1,l[23+(5+s[e(305)]+5+r[e(305)])+3]=(65280&i[e(305)])>>8,l[23+(5+s[e(305)]+5+r.byteLength)+4]=(255&i.byteLength)>>0,l.set(i,23+(5+s.byteLength+5+r[e(305)])+5);const d=[28,0,0,0,0],u=new Uint8Array(d[e(258)]+l[e(305)]);return u[e(237)](d,0),u[e(237)](l,d[e(258)]),u}function Bh(t,e){const s=Oh;let i=[];i[0]=e?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0;const r=new Uint8Array(i[s(258)]+t[s(305)]);return r[s(237)](i,0),r[s(237)](t,i[s(258)]),r}function Mh(){const t=["Invalid HEVCDecoderConfigurationRecord, lack of data! ","6565668AnNFfi","getUint16","Invalid HEVCDecoderConfigurationRecord, Strange NaluLengthSizeMinusOne: ","profile_tier_level","general_frame_only_constraint_flag","sub_layer_tier_flag","general_level_idc","chromaFormat","max","codec_size","readUByte","separate_colour_plane_flag","general_constraint_indicator_flags_1","parseHEVCDecoderConfigurationRecord$3","general_profile_space","bitDepth","error","pic_width_in_luma_samples","constantFrameRate","tier_flag","13767792RheglR","general_non_packed_constraint_flag","generalTierFlag","setUint32","generalLevelIdc","general_profile_idc","sps_max_sub_layers_minus1","Could not find H265 startcode until payload end!","read","generalProfileSpace","sub_layer_profile_present_flag","conf_win_left_offset","parseHEVCDecoderVPSAndSPSAndPPS and sps tag is ","readUEG","slice","hvcc","level_string","from","parseHEVCDecoderConfigurationRecord$2","chromaFormatIdc","type","presentHeight","76605rgmkoW","sps","sub_layer_frame_only_constraint_flag",", hevcProfile is ","bit_depth","configurationVersion","frameRate","subarray","setInt16","general_constraint_indicator_flags_2","sar_ratio","bitDepthChromaMinus8","width","present_size","buffer","general_constraint_indicator_flags_3","codecHeight","chroma_format","num_temporal_layers","6888785iCJvPY","temporal_id_nested","set","vps","codec_mimetype","general_tier_flag","general_progressive_source_flag","codec","sps_temporal_id_nesting_flag","codecWidth","hev1.1.6.L93.B0","conf_win_right_offset","general_constraint_indicator_flags_6","read_golomb","level","sub_layer_profile_idc","height","constant_frame_rate","arrayBuffer.length ","122665iNxvFk","parseHEVCDecoderVPSAndSPSAndPPS and vpsTag is ","conf_win_top_offset","currentStartcodeOffset","length","general_interlaced_source_flag","readBits","push","Invalid HEVCDecoderConfigurationRecord,version is ","getUint8","general_constraint_indicator_flags","sub_layer_interlaced_source_flag","conformance_window_flag","generalProfileIdc","5460188nWGcaL","parseSPS","warn","6599236wmCCiG","sarRatio"," < 22","profile","psps","parseHEVCDecoderVPSAndSPSAndPPS and pps tag is ","lengthSizeMinusOne","presentWidth","sub_layer_non_packed_constraint_flag","18DTzcau","findNextStartCodeOffset","generalConstraintIndicatorFlags","sub_layer_level_idc","readNextNaluPayload","h265","chroma_format_idc","sub_layer_progressive_source_flag","data","min_spatial_segmentation_idc","numTemporalLayers","sub_layer_level_present_flag","bitDepthLumaMinus8","general_profile_compatibility_flags_1","pic_height_in_luma_samples","general_profile_compatibility_flags_4","sub_layer_profile_compatibility_flag","general_profile_compatibility_flags","pps","sub_layer_profile_space","parallelismType","temporalIdNested","eofFlag","sps_video_parameter_set_id","conf_win_bottom_offset","byteLength","frame_rate"];return(Mh=function(){return t})()}function Fh(t){return(126&t[0])>>1}function Oh(t,e){const s=Mh();return(Oh=function(t,e){return s[t-=181]})(t,e)}function Uh(t){return!((e=t)>=32&&e<=40);var e}function Nh(t){return t>=16&&t<=21}!function(t,e){const s=Oh,i=t();for(;;)try{if(908046===parseInt(s(254))/1+-parseInt(s(280))/2*(parseInt(s(216))/3)+-parseInt(s(268))/4+-parseInt(s(235))/5+parseInt(s(308))/6+parseInt(s(271))/7+parseInt(s(194))/8)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Mh);class jh{constructor(t){const e=Oh;this[e(288)]=t,this[e(302)]=!1,this[e(257)]=this.findNextStartCodeOffset(0),this[e(302)]&&console[e(190)](e(201))}[Rh(281)](t){const e=Rh;let s=t,i=this.data;for(;;){if(s+3>=i.byteLength)return this.eofFlag=!0,i[e(305)];let t=i[s+0]<<24|i[s+1]<<16|i[s+2]<<8|i[s+3],r=i[s+0]<<16|i[s+1]<<8|i[s+2];if(1===t||1===r)return s;s++}}[Rh(284)](){const t=Rh;let e=this[t(288)],s=null;for(;null==s&&!this[t(302)];){let i=this[t(257)];i+=1===(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3])?4:3;let r=e[i]>>1&63,n=(128&e[i])>>>7,o=this.findNextStartCodeOffset(i);this[t(257)]=o,0===n&&(s={type:r,data:e.subarray(i,o)})}return s}}class Vh{constructor(t){const e=Rh;let s=t.data[e(305)];this[e(214)]=t[e(214)],this[e(288)]=new Uint8Array(4+s),new DataView(this[e(288)][e(230)])[e(197)](0,s),this.data[e(237)](t[e(288)],4)}}const zh=Wh;function Gh(){const t=["3171234ViWRyc","25lASoIu","recording","presentWidth","sampleRate","depth","recorderCommon","h264","audioCodeId","handleAddNaluTrack","audioMetaInfo","4NVFBtY","h265","setFileName","403338uKKRyy","8Oibxeo","fileName","destroy","startRecord","codecHeight","stopRecordAndSave","timescale","isH264","isH265","1570510tqkrro","AAC","player","438546RIaNWn","initMetaData","sps","initAudioMetaData","382892WEkDBL","refSampleDuration","recordingInterval","metaInfo","initAudioAacExtraData","165431lNgwGG","11eidxEk","stopRecordingInterval","avcc","codecId","assign","9jTLSVQ","_recordingTimestamp","TAG_NAME","extraData","codec","originalCodec","getToTalByteLength","codecWidth","channelCount","handleAddAudioTrack","isWasmMp4","vps","_isRecording","presentHeight","slice","8879676nkgXOA","handleAddTrack","pps","startRecordingInterval","config","_reset","videoType","isRecording"];return(Gh=function(){return t})()}function Wh(t,e){const s=Gh();return(Wh=function(t,e){return s[t-=184]})(t,e)}!function(t,e){const s=Wh,i=t();for(;;)try{if(274879===-parseInt(s(245))/1+parseInt(s(242))/2*(-parseInt(s(193))/3)+parseInt(s(197))/4*(-parseInt(s(232))/5)+parseInt(s(231))/6+parseInt(s(202))/7*(parseInt(s(246))/8)+-parseInt(s(208))/9*(-parseInt(s(190))/10)+-parseInt(s(203))/11*(-parseInt(s(223))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Gh);class Hh extends Bi{constructor(t){const e=Wh;super(),this[e(210)]=e(237),this[e(192)]=t,this.fileName="",this[e(220)]=!1,this._recordingTimestamp=0,this[e(199)]=null,this.sps=null,this.pps=null,this[e(219)]=null,this[e(206)]=null,this.audioCodeId=null,this[e(200)]={codecWidth:0,codecHeight:0,presentWidth:0,presentHeight:0,refSampleDuration:0,timescale:1e3,avcc:null,videoType:""},this[e(241)]={timescale:1e3,sampleRate:0,refSampleDuration:0,channelCount:0,codec:"",originalCodec:"",audioType:"",extraData:new Uint8Array(0)}}[zh(248)](){const t=zh;this[t(228)](),this[t(195)]=null,this[t(225)]=null,this[t(219)]=null,this[t(206)]=null,this[t(239)]=null,this[t(200)]=null,this[t(241)]=null}get[zh(188)](){const t=zh;return this[t(206)]===G[t(238)]}get[zh(189)](){return this[zh(206)]===G.h265}[zh(244)](t){this[zh(247)]=t}get[zh(230)](){return this[zh(220)]}get[zh(233)](){return this._isRecording}get recordTime(){return this[zh(209)]}[zh(184)](){}[zh(240)](t,e,s,i){}[zh(217)](t,e){}[zh(224)](t){}[zh(186)](){}[zh(226)](){}[zh(218)](){return!1}stopRecordingInterval(){const t=zh;this[t(199)]&&clearInterval(this[t(199)]),this[t(199)]=null}[zh(214)](){return 0}_reset(){const t=zh;this[t(247)]="",this[t(220)]=!1,this._recordingTimestamp=0,this[t(204)]()}[zh(194)](t,e){const s=zh;let i;const r=t[s(222)](5);if(this[s(206)]=e,this[s(200)][s(205)]=r,e===G[s(238)])i=sh(r);else if(e===G[s(243)]){i=function(t){const e=Oh;let s=23;const i=t[s];if((63&i)!==q.vps)return console[e(270)](e(255)+i),{};s+=2,s+=1;const r=t[s+1]|t[s]<<8;s+=2;const n=t[e(208)](s,s+r);s+=r;const o=t[s];if((63&o)!==q[e(217)])return console.warn(e(206)+o),{};s+=2,s+=1;const a=t[s+1]|t[s]<<8;s+=2;const h=t[e(208)](s,s+a);s+=a;const c=t[s];if((63&c)!==q[e(298)])return console.warn(e(276)+c),{};s+=2,s+=1;const l=t[s+1]|t[s]<<8;s+=2;const d=t[e(208)](s,s+l),u=new Uint8Array([a>>>24&255,a>>>16&255,a>>>8&255,255&a]),p=new Uint8Array([l>>>24&255,l>>>16&255,l>>>8&255,255&l]),f=new Uint8Array([r>>>24&255,r>>>16&255,r>>>8&255,255&r]),m=new Uint8Array(a+4);m.set(u,0),m[e(237)](h,4);const g=new Uint8Array(l+4);g.set(p,0),g[e(237)](d,4);const A=new Uint8Array(r+4);return A.set(f,0),A[e(237)](n,4),{sps:m,pps:g,vps:A}}(r);const e=Dh(t);i=Object[s(207)](i,e)}i&&(i.vps&&(this.vps=i[s(219)]),i[s(225)]&&(this.pps=i[s(225)]),i.sps&&(this[s(195)]=i[s(195)]),i[s(234)]&&(this[s(200)][s(234)]=i.presentWidth),i[s(221)]&&(this[s(200)][s(221)]=i[s(221)]),i[s(215)]&&(this.metaInfo[s(215)]=i[s(215)]),i[s(185)]&&(this[s(200)][s(185)]=i[s(185)]),i[s(187)]&&(this[s(200)][s(187)]=i.timescale),i[s(198)]&&(this[s(200)][s(198)]=i[s(198)]),i.videoType&&(this[s(200)].videoType=i[s(229)]))}[zh(196)](t,e){const s=zh;this[s(239)]=e;const i=t[0]>>1&1;let r=null;e===H[s(191)]?(r=function(t){const e=he;let s={},i=new ve(t);return i[e(478)](16),s[e(536)]=Se(i),s.sample_rate=we(i,s),s[e(506)]=i[e(478)](4),s[e(506)]{const h=e;n[h(339)]=function(t){const e=h;i[e(281)](this[e(374)]).forEach((function(t){s.read(t)})),s[e(311)]();const n=r.makeMetadataSeekable(s[e(382)],s[e(375)],s[e(303)]),a=this[e(374)][e(397)](s[e(388)]),c=new Blob([n,a],{type:"video/webm"});o(c)},n[h(291)](t)}))}[Kh(306)](){const t=Kh,e={type:t(316),mimeType:"video/webm;codecs=h264",timeSlice:1e3,onTimeStamp:e=>{const s=t;this.player&&this[s(304)][s(305)](s(347),s(363)+e),null===this._startRecordingTimestamp&&(this._startRecordingTimestamp=e),this[s(290)]=(e-this[s(346)])/1e3},ondataavailable:e=>{const s=t;this[s(369)]+=e[s(389)],this[s(304)]&&this[s(304)][s(305)]("RecorderRTC",s(298),e[s(389)])},disableLogs:!this[t(304)][t(348)][t(352)]};try{let s=null;if(this[t(304)][t(343)]()===f[t(350)])s=this.player[t(316)][t(324)][t(379)](25),this[t(304)].debugLog(this[t(312)],t(335));else if(this[t(304)][t(316)][t(362)])s=this[t(304)][t(316)].mediaStream,this[t(304)][t(305)](this[t(312)],t(315));else{if(ci(this[t(345)]()))return void this[t(304)][t(391)](M[t(358)],t(300));this.player[t(318)]()||this[t(304)][t(348)][t(373)]||this[t(304)][t(348)][t(286)]?s=this[t(357)][t(379)](25):this[t(304)].isWebrtcH264()?s=this[t(304)][t(308)].videoStream:this[t(304)][t(396)]()&&(s=this[t(357)][t(379)](25)),this.player[t(305)](this.TAG_NAME,t(390))}if(!s)return this[t(304)][t(366)]("RecorderRTC",t(285)),void this[t(304)].emitError(M[t(358)],t(321));if(this[t(304)][t(378)]&&this[t(304)][t(378)].mediaStreamAudioDestinationNode&&this[t(304)][t(378)].mediaStreamAudioDestinationNode[t(288)]&&!this[t(304)].audio[t(320)]()&&this[t(304)].audio.hasAudio&&this[t(304)][t(348)][t(323)]){const e=this.player[t(378)][t(398)].stream;if(e[t(367)]()[t(314)]>0){const i=e[t(367)]()[0];i&&i[t(334)]&&s[t(327)](i)}}this[t(340)]=Ga(s,e)}catch(e){return this[t(304)].debugError(t(347),t(301),e),void this[t(304)][t(391)](M.recordCreateError,e)}this.recorder&&(this[t(384)]=!0,this[t(304)].emit(M.recording,!0),this[t(340)].startRecording(),this[t(304)][t(305)](t(347),"start recording"),this[t(304)][t(361)](M[t(383)]),this.startRecordingInterval())}[Kh(284)](){const t=Kh;this[t(387)](),this[t(294)]=window[t(310)]((()=>{const e=t;this[e(304)][e(361)](M[e(351)],this._recordingTimestamp)}),1e3)}stopRecordAndSave(){const t=Kh;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V[t(395)],s=arguments.length>1?arguments[1]:void 0;return new Promise(((i,r)=>{const n=t;(!this.recorder||!this._isRecording)&&r("recorder is not ready"),s&&this.setFileName(s),this[n(340)][n(341)]((()=>{const t=n;this[t(304)][t(305)](t(347),t(353));const s=(this[t(282)]||je())+"."+l[t(309)];if(this[t(304)]._opt[t(371)]);else{if(e===V[t(325)]){const e=this[t(340)][t(297)]();i(e),this[t(304)][t(361)](M[t(399)],e)}else i(),this[t(340)][t(302)](s);this.player[t(361)](M[t(394)]),this[t(338)](),this[t(304)][t(361)](M[t(283)],!1)}}))}))}[Kh(385)](){return new Promise(((t,e)=>{const s=Yh;if(this[s(304)][s(305)](this[s(312)],s(364)),!this[s(340)]||!this[s(384)])return t();this[s(340)].stopRecording((()=>{const e=s;this[e(338)](),this[e(304)][e(361)](M[e(283)],!1),this[e(304)][e(361)](M[e(287)]),t()}))}))}getToTalByteLength(){return this.totalByteLength}[Kh(356)](){return this.recordTime}[Kh(376)](){return l[Kh(309)]}initMetaData(){}[Kh(345)](){const t=Kh;return this._initCanvasRender(),this[t(357)]?(fi()?(this[t(304)].debugLog(this[t(312)],t(292)),this.supportVideoFrameCallbackHandle=this[t(304)].video[t(324)][t(360)](this[t(331)][t(329)](this))):(this[t(304)][t(305)](this[t(312)],t(293)),this._stopCanvasRender(),this[t(330)]=setInterval((()=>{const e=t;this[e(370)]&&this[e(370)].drawImage(this[e(304)][e(316)][e(324)],0,0,this.canvasElement[e(354)],this[e(357)][e(295)])}),40)),!0):(this[t(304)][t(366)](this[t(312)],t(368)),!1)}[Kh(307)](){const t=Kh,e=this[t(304)][t(336)]();!this.canvasElement&&e&&(this[t(357)]=document[t(365)](t(350)),this.canvasElementCtx=this[t(357)].getContext("2d"),e[t(354)]&&e[t(295)]&&(this.canvasElement.width=e[t(354)],this.canvasElement.height=e[t(295)]))}[Kh(393)](){const t=Kh;this[t(370)]&&(this[t(370)][t(377)](0,0,this[t(357)][t(354)],this[t(357)][t(295)]),this[t(370)]=null),this[t(357)]&&(this[t(357)][t(354)]=0,this.canvasElement[t(295)]=0,this.canvasElement=null)}[Kh(313)](){this[Kh(330)]&&(clearInterval(this.canvasRenderInterval),this.canvasRenderInterval=null)}[Kh(386)](){const t=Kh;this[t(319)]&&this.player[t(316)][t(324)]&&(this.player[t(316)][t(324)][t(381)](this[t(319)]),this[t(319)]=null)}[Kh(331)](){const t=Kh;this[t(304)][t(359)]()?this[t(304)][t(305)](this.TAG_NAME,t(355)):(this.canvasElementCtx&&this[t(370)][t(349)](this[t(304)].video[t(324)],0,0,this.canvasElement.width,this[t(357)][t(295)]),this[t(319)]=this.player.video.$videoElement[t(360)](this[t(331)][t(329)](this)))}}const Jh=Zh;function Xh(){const t=["stsd","isLeading","sdtp","18nyoHsN","mdhd","stts","HDLR_VIDEO","HDLR_AUDIO","dependsOn","avc1","mp3","size","mfhd","tfhd","stss","edts","1456128WwsGac","byteLength","presentHeight","prototype","trex","STSC","data","box","concat","set","stco","audio","codecWidth","slice","21657520YjHXYG","stsz","343608pIxYxh","sampleRate","avcc","mdia","hdlr","isDependedOn","STSD_PREFIX","cts","call","80GgacLg","sequenceNumber","chunkNo","num","moov","indexOf","369691jNqDRg","mp4a","push","channelCount","duration","charCodeAt","trun","chunkOffset","1860920rBpXfI","types","video","mvhd","dinf","esds","avcC","flags","moof","hasRedundancy","elst","STCO","hvc1","276fulPvo","minf","stbl","trak","refSampleDuration","constants","type","46760QOkBpb","tfdt","codecHeight","FTYP","vmhd","mdat","samples","DREF","sampleDelte","2114901ZwfYej","timescale","SMHD","pow","tkhd","traf","ftyp","length","hvcC","config"];return(Xh=function(){return t})()}function Zh(t,e){const s=Xh();return(Zh=function(t,e){return s[t-=210]})(t,e)}!function(t,e){const s=Zh,i=t();for(;;)try{if(826690===-parseInt(s(228))/1+-parseInt(s(236))/2+-parseInt(s(265))/3+parseInt(s(213))/4*(-parseInt(s(222))/5)+parseInt(s(249))/6*(-parseInt(s(256))/7)+parseInt(s(291))/8+-parseInt(s(278))/9*(-parseInt(s(211))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Xh);class $h{static init(){const t=Zh;$h[t(237)]={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],free:[],edts:[],elst:[],stss:[]};for(let e in $h[t(237)])$h[t(237)].hasOwnProperty(e)&&($h[t(237)][e]=[e[t(233)](0),e.charCodeAt(1),e[t(233)](2),e.charCodeAt(3)]);let e=$h[t(254)]={};e[t(259)]=new Uint8Array([105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,97,118,99,49,109,112,52,49,0,0,0,0]),e[t(219)]=new Uint8Array([0,0,0,0,0,0,0,1]),e.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),e[t(296)]=e[t(247)]=e.STTS,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e[t(281)]=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e[t(282)]=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e[t(263)]=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e[t(267)]=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static[Jh(298)](t){const e=Jh;let s=8,i=null,r=Array[e(294)][e(210)][e(221)](arguments,1),n=r[e(272)];for(let t=0;t>>24&255,i[1]=s>>>16&255,i[2]=s>>>8&255,i[3]=255&s,i[e(300)](t,4);let o=8;for(let t=0;t=Math[i(268)](2,32)-1?(o=16,a=new Uint8Array(s+o),a.set(new Uint8Array([0,0,0,1]),0),a[i(300)]($h.types.mdat,4),a[i(300)](new Uint8Array([s+8>>>56&255,s+8>>>48&255,s+8>>>40&255,s+8>>>32&255,s+8>>>24&255,s+8>>>16&255,s+8>>>8&255,s+8&255]),8)):(a=new Uint8Array(s+o),a[0]=s+8>>>24&255,a[1]=s+8>>>16&255,a[2]=s+8>>>8&255,a[3]=s+8&255,a[i(300)]($h[i(237)].mdat,4));for(let t=0;t>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3]))}static[Jh(252)](t){const e=Jh;return $h[e(298)]($h[e(237)][e(252)],$h[e(269)](t),$h[e(216)](t))}static tkhd(t){const e=Jh;let s=t.id,i=t[e(232)],r=t.presentWidth,n=t[e(293)];return"video"===t[e(255)]?$h[e(298)]($h.types[e(269)],new Uint8Array([0,0,0,15,206,186,253,168,206,186,253,168,s>>>24&255,s>>>16&255,s>>>8&255,255&s,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,n>>>8&255,255&n,0,0])):t[e(255)]===e(302)?$h.box($h.types[e(269)],new Uint8Array([0,0,0,15,206,186,253,168,206,186,253,168,s>>>24&255,s>>>16&255,s>>>8&255,255&s,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0])):void 0}static[Jh(290)](t,e){const s=Jh;return $h[s(298)]($h[s(237)][s(290)],$h[s(246)](t,e))}static[Jh(246)](t,e){const s=Jh;let i=0;for(let r=0;r>>24&255,i>>>16&255,i>>>8&255,255&i,255,255,255,255,0,1,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,0,0,0,0,0,1,0,0]))}static[Jh(216)](t){const e=Jh;return $h[e(298)]($h[e(237)][e(216)],$h.mdhd(t),$h[e(217)](t),$h[e(250)](t))}static[Jh(279)](t){const e=Jh;let s=t[e(266)]/t[e(253)],i=s*t.duration/t[e(266)];return $h[e(298)]($h.types.mdhd,new Uint8Array([0,0,0,0,206,186,253,168,206,186,253,168,s>>>24&255,s>>>16&255,s>>>8&255,255&s,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static[Jh(217)](t){const e=Jh;let s=null;return s=t[e(255)]===e(302)?$h[e(254)][e(282)]:$h[e(254)][e(281)],$h[e(298)]($h[e(237)][e(217)],s)}static[Jh(250)](t){const e=Jh;let s=null;return s=t[e(255)]===e(302)?$h.box($h[e(237)].smhd,$h[e(254)][e(267)]):$h[e(298)]($h[e(237)][e(260)],$h.constants.VMHD),$h[e(298)]($h[e(237)].minf,s,$h[e(240)](),$h[e(251)](t))}static[Jh(240)](){const t=Jh;return $h[t(298)]($h.types[t(240)],$h.box($h[t(237)].dref,$h[t(254)][t(263)]))}static[Jh(251)](t){const e=Jh;let s=t[e(262)],i=[{No:1,num:0,sampleDelte:1,chunkNo:1,duration:s[0][e(232)]}],r=[s[0][e(232)]],n=s[e(272)];for(let t=0;t>>24&255,s>>>16&255,s>>>8&255,255&s]),r=i[e(292)],n=new Uint8Array(r+8*s);n[e(300)](i,0);for(let i=0;i>>24&255,t[i][e(225)]>>>16&255,t[i][e(225)]>>>8&255,255&t[i].num,t[i][e(264)]>>>24&255,t[i][e(264)]>>>16&255,t[i][e(264)]>>>8&255,255&t[i][e(264)]]),r),r+=8;return $h.box($h[e(237)][e(280)],n)}static[Jh(289)](t){const e=Jh;let s=[],i=t[e(272)];for(let r=0;r>>24&255,r>>>16&255,r>>>8&255,255&r]),o=n[e(292)],a=new Uint8Array(o+4*r);a.set(n,0);for(let t=0;t>>24&255,s[t]>>>16&255,s[t]>>>8&255,255&s[t]]),o),o+=4;return $h[e(298)]($h[e(237)][e(289)],a)}static stsc(t){const e=Jh;let s=t[e(272)],i=new Uint8Array([0,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s]),r=i.byteLength,n=new Uint8Array(r+12*s);n[e(300)](i,0);for(let i=0;i>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o,a>>>24&255,a>>>16&255,a>>>8&255,255&a]),r),r+=12}return $h.box($h[e(237)].stsc,n)}static stsz(t){const e=Jh;let s=t[e(272)],i=new Uint8Array([0,0,0,0,0,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s]),r=i.byteLength,n=new Uint8Array(r+4*s);n.set(i,0);for(let i=0;i>>24&255,s>>>16&255,s>>>8&255,255&s]),r),r+=4}return $h[e(298)]($h.types.stsz,n)}static[Jh(301)](t,e){const s=Jh;let i=e[0][s(235)];return $h[s(298)]($h[s(237)][s(301)],new Uint8Array([0,0,0,0,0,0,0,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i]))}static stsd(t){const e=Jh;return t.type===e(302)?t.codec===e(285)?$h[e(298)]($h[e(237)][e(275)],$h.constants[e(219)],$h[e(285)](t)):$h[e(298)]($h[e(237)].stsd,$h[e(254)][e(219)],$h[e(229)](t)):"avc"===t.videoType?$h[e(298)]($h[e(237)].stsd,$h[e(254)][e(219)],$h[e(284)](t)):$h[e(298)]($h.types[e(275)],$h[e(254)][e(219)],$h[e(248)](t))}static mp3(t){const e=Jh;let s=t[e(231)],i=t[e(214)],r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,s,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return $h.box($h[e(237)][".mp3"],r)}static[Jh(229)](t){const e=Jh;let s=t[e(231)],i=t[e(214)],r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,s,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return $h[e(298)]($h[e(237)][e(229)],r,$h[e(241)](t))}static[Jh(241)](t){const e=Jh;let s=t[e(274)]||[],i=s.length,r=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5][e(299)]([i]).concat(s)[e(299)]([6,1,2]));return $h[e(298)]($h[e(237)][e(241)],r)}static avc1(t){const e=Jh;let s=t.avcc,i=t[e(303)],r=t[e(258)],n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,13,106,101,115,115,105,98,117,99,97,45,112,114,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return $h[e(298)]($h[e(237)][e(284)],n,$h.box($h.types[e(242)],s))}static hvc1(t){const e=Jh;let s=t[e(215)];const i=t[e(303)],r=t.codecHeight;let n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,13,106,101,115,115,105,98,117,99,97,45,112,114,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return $h[e(298)]($h[e(237)][e(248)],n,$h[e(298)]($h[e(237)][e(273)],s))}static mvex(t){const e=Jh;return $h.box($h[e(237)].mvex,$h[e(295)](t))}static[Jh(295)](t){const e=Jh;let s=t.id,i=new Uint8Array([0,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return $h[e(298)]($h[e(237)][e(295)],i)}static[Jh(244)](t,e){const s=Jh;return $h[s(298)]($h[s(237)][s(244)],$h[s(287)](t.sequenceNumber),$h[s(270)](t,e))}static[Jh(287)](t){const e=Jh;let s=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return $h[e(298)]($h[e(237)].mfhd,s)}static[Jh(270)](t,e){const s=Jh;let i=t.id,r=$h[s(298)]($h[s(237)][s(288)],new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),n=$h[s(298)]($h[s(237)][s(257)],new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])),o=$h.sdtp(t),a=$h[s(234)](t,o[s(292)]+16+16+8+16+8+8);return $h[s(298)]($h[s(237)][s(270)],r,n,a,o)}static[Jh(277)](t){const e=Jh;let s=t.samples||[],i=s[e(272)],r=new Uint8Array(4+i);for(let t=0;t>>24&255,r>>>16&255,r>>>8&255,255&r,e>>>24&255,e>>>16&255,e>>>8&255,255&e],0);for(let t=0;t>>24&255,e>>>16&255,e>>>8&255,255&e,r>>>24&255,r>>>16&255,r>>>8&255,255&r,n.isLeading<<2|n[s(283)],n.isDependedOn<<6|n[s(245)]<<4|n.isNonSync,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12+16*t)}return $h.box($h[s(237)][s(234)],o)}static mdat(t){const e=Jh;return $h.box($h.types[e(261)],t)}}$h.init();const tc=ec;function ec(t,e){const s=ic();return(ec=function(t,e){return s[t-=428]})(t,e)}!function(t,e){const s=ec,i=t();for(;;)try{if(367552===-parseInt(s(497))/1+-parseInt(s(439))/2+-parseInt(s(436))/3*(parseInt(s(457))/4)+parseInt(s(471))/5+-parseInt(s(453))/6+parseInt(s(446))/7*(parseInt(s(428))/8)+parseInt(s(450))/9*(parseInt(s(482))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ic);class sc extends Hh{constructor(t){const e=ec;super(t),this[e(477)]=e(443),this[e(460)](),t.debugLog(this[e(477)],"init")}[tc(430)](){const t=tc;super[t(430)](),this[t(460)](),this[t(481)][t(484)](this[t(477)],t(430))}[tc(460)](){const t=tc;super[t(460)](),this[t(483)]=0,this[t(474)]=0,this.totalByteLength=0,this[t(504)]=0,this.bufferList=[],this.audioBufferList=[],this[t(493)]={},this.audioCacheTrack={},this[t(489)]=0,this[t(432)]=0}[tc(501)](){const t=tc;this[t(486)]=!0,this[t(481)][t(503)](M[t(433)],!0),this[t(481)].debugLog(this.TAG_NAME,"start recording"),this[t(481)].emit(M[t(462)]),this[t(456)]()}[tc(456)](){const t=tc;this[t(500)](),this.recordingInterval=window[t(461)]((()=>{const e=t;this[e(481)][e(503)](M[e(445)],this[e(505)]())}),1e3)}[tc(437)](t,e,s,i){return{id:1,sequenceNumber:++this[tc(489)],size:t.byteLength,dts:s,cts:i,isKeyframe:e,data:t,duration:0,flags:{isLeading:0,dependsOn:e?2:1,isDependedOn:e?1:0,hasRedundancy:0,isNonSync:e?0:1}}}_formatAudioFmp4Track(t,e){const s=tc;return{id:2,sequenceNumber:++this[s(432)],size:t[s(487)],dts:e,pts:e,cts:0,data:new Uint8Array(t),duration:0,originalDts:e,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}}handleAddNaluTrack(t,e,s,i){const r=tc;this[r(493)].id&&s>=this[r(493)][r(498)]?(this[r(493)][r(507)]=s-this.cacheTrack[r(498)],this[r(492)](this.cacheTrack)):this.cacheTrack={},this[r(493)]=this[r(437)](t,e,s,i)}[tc(470)](t,e){}[tc(492)](t){const e=tc;if(!this[e(464)])return void this[e(481)][e(495)](this[e(477)],e(454));if((null===this.sps||null===this[e(441)])&&this[e(485)])return void this[e(481)][e(495)](this[e(477)],e(494));if((null===this.sps||null===this[e(441)]||null===this[e(435)])&&this[e(468)])return void this[e(481)][e(495)](this[e(477)],e(431));const s=Object[e(491)]({},t);s[e(455)]=s[e(498)]+s[e(475)];const i=s[e(440)];if(s[e(452)])if(this.isH264){const t=new Uint8Array(this[e(458)][e(487)]+this[e(441)][e(487)]);t[e(476)](this[e(458)],0),t[e(476)](this[e(441)],this[e(458)][e(487)]);const r=new Uint8Array(t.byteLength+i[e(487)]);r.set(t,0),r[e(476)](i,t[e(487)]),s.data=r}else if(this[e(468)]){const t=new Uint8Array(this.sps[e(487)]+this[e(441)][e(487)]+this.vps[e(487)]);t[e(476)](this[e(435)],0),t[e(476)](this[e(458)],this[e(435)][e(487)]),t[e(476)](this[e(441)],this[e(435)][e(487)]+this[e(458)].byteLength);const r=new Uint8Array(t.byteLength+i[e(487)]);r[e(476)](t,0),r.set(i,t[e(487)]),s[e(440)]=r}s.size=s[e(440)][e(487)],this[e(483)]+=s.duration,this[e(429)]+=s[e(440)][e(487)],s[e(507)]=0,s.originalDts=s[e(498)],delete s.id,delete s[e(489)],this[e(499)].push(s)}_handleAddFmp4AudioTrack(t){const e=tc,s=Object[e(491)]({},t);s[e(455)]=s[e(498)]+s[e(475)],s.size=s[e(440)].byteLength,this[e(474)]+=s[e(507)],this[e(504)]+=s.data[e(487)],s.duration=0,s[e(496)]=s.dts,delete s.id,delete s[e(489)],this.audioBufferList[e(479)](s)}[tc(505)](){return this[tc(483)]/1e3}[tc(466)](){return l[tc(490)]}[tc(488)](){const t=tc;return this[t(429)]+this[t(504)]}stopRecordAndSave(){const t=tc;let e=arguments[t(447)]>0&&void 0!==arguments[0]?arguments[0]:V[t(449)],s=arguments[t(447)]>1?arguments[1]:void 0;return new Promise(((i,r)=>{const n=t;if(!this[n(464)])return this[n(481)][n(495)](this[n(477)],n(478)),r(n(478));if(0===this[n(499)][n(447)])return this[n(481)][n(495)](this[n(477)],"stop recording fail, this.bufferList.length is 0 "),r(n(465));s&&this[n(480)](s);const o={id:1,type:"video",sps:this[n(458)],pps:this.pps,samples:this[n(499)],sequenceNumber:this[n(499)].length,length:0,addSampleNum:1,duration:0,...this[n(467)]},a={id:2,type:"audio",sequenceNumber:this[n(459)][n(447)],samples:this[n(459)],...this[n(469)]},h=[o];a[n(502)].length>0&&h.push(a),this[n(481)].debugLog(this[n(477)],n(442)+h.length);const c=$h[n(506)]({timescale:1e3,duration:this[n(483)]},h,this[n(429)]+this.totalAudioByteLength);this.player[n(484)](this[n(477)],n(438));const d=new Blob([c],{type:n(444)});if(e===V[n(463)])i(d),this.player[n(503)](M[n(472)],d);else{i();As((this[n(473)]||je())+"."+l[n(490)],d)}this[n(481)][n(503)](M[n(434)]),this[n(460)](),this[n(481)][n(503)](M[n(433)],!1)}))}[tc(451)](){return new Promise(((t,e)=>{const s=ec;if(this[s(481)].debugLog(this.TAG_NAME,s(448)),!this[s(464)])return t();this[s(460)](),this.player[s(503)](M[s(433)],!1),this[s(481)][s(503)](M.recordCancel),t()}))}_getBufferTs(t){}}function ic(){const t=["getToTalByteLength","sequenceNumber","mp4","assign","_handleAddFmp4Track","cacheTrack","_handleAddFmp4Track, is h264 and this.sps or this.pps is null ","debugError","originalDts","699730xorJwv","dts","bufferList","stopRecordingInterval","startRecord","samples","emit","totalAudioByteLength","getTotalDuration","generateInitSegment","duration","32JsfsxW","totalByteLength","destroy","_handleAddFmp4Track, is h265 and this.sps or this.pps or this.vps is null ","audioSequenceNumber","recording","recordEnd","vps","344382GlDQsk","_formatFmp4Track","stop recording","1199066fHsbyZ","data","pps","trackList length is ","recorderMP4","application/octet-stream","recordingTimestamp","864388TNYJNQ","length","cancel recording","download","15928155lifYNQ","cancelRecord","isKeyframe","1411794OOSwrH","_handleAddFmp4Track, isRecording is false ","pts","_startRecordingInterval","20bAlCDm","sps","audioBufferList","_reset","setInterval","recordStart","blob","isRecording","stop recording fail, this.bufferList.length is 0 ","getType","metaInfo","isH265","audioMetaInfo","handleAddAudioTrack","1061765AvcNNL","recordBlob","fileName","totalAudioDuration","cts","set","TAG_NAME","stop recording fail, isRecording is false ","push","setFileName","player","10dtojHQ","totalDuration","debugLog","isH264","_isRecording","byteLength"];return(ic=function(){return t})()}function rc(t,e){const s=nc();return(rc=function(t,e){return s[t-=122]})(t,e)}function nc(){const t=["1383336LFhmLw","length","56756ajRMXU","7448230ybegXV","toString","constructor","hexStringToUint8Array: invalid hexString length, must be even and bexString length is: ","2357612HQMFqb","19236FxyjhR","replace","12owKboa","3008600HuFjKM","2AoOvag","9BXAXBz","1918543mdOQia","5moOrlT","set","substr","byteLength","917IXTLGS","error","reduce"];return(nc=function(){return t})()}function oc(){const t=rc;for(var e=arguments[t(143)],s=new Array(e),i=0;i{const i=t,n=new r((0|e[i(138)])+(0|s[i(138)]));return n[i(136)](e,0),n[i(136)](s,0|e[i(138)]),n}),new r)}function ac(t){const e=rc;if((t=t[e(129)](/\s/g,""))[e(143)]%2!=0)return console[e(140)](e(126),t[e(143)]),null;const s=new Uint8Array(t[e(143)]/2);for(let i=0;i{const e=t;this[e(358)].emit(M.recordingTimestamp,this[e(369)]())}),1e3)}addMetaData(t){this[hc(415)]=t}addAACSequenceHeader(t){this[hc(379)]=t}[hc(381)](t){this[hc(365)]=t}[hc(417)](t,e){const s=hc;this[s(390)](e);const i=this[s(377)](e);this.hasVideo=!0,this[s(363)](t,L[s(402)],i)}addAudio(t,e){const s=hc;this[s(390)](e);const i=this[s(377)](e);this[s(408)]=!0,this[s(363)](t,L[s(360)],i)}_setStartTime(t){const e=hc;null===this[e(394)]&&this[e(353)]&&(this.startTime=t,this[e(358)][e(374)](this[e(420)],"_setStartTime is "+t))}[hc(377)](t){const e=hc;t>this[e(403)]&&(this[e(403)]=t);let s=0;return this[e(394)]&&t>=this[e(394)]&&(s=t-this[e(394)]),s>this[e(375)]?this[e(375)]=s:s=this[e(375)],s}[hc(363)](t,e,s){const i=hc,r=this[i(425)](t,e,s),n=this._createFlvTag(r);this[i(386)]+=n.byteLength,this[i(411)][i(380)](n)}_createFlvTag(t){const e=hc;let s=11+t[e(387)][e(407)],i=new Uint8Array(s+4),r=new DataView(i[e(355)]);return i[0]=t[e(387)][e(405)],i[1]=t[e(387)][e(407)]>>16&255,i[2]=t.header[e(407)]>>8&255,i[3]=255&t[e(387)][e(407)],i[4]=t[e(387)][e(424)]>>16&255,i[5]=t[e(387)].timestamp>>8&255,i[6]=255&t[e(387)][e(424)],i[7]=t[e(387)][e(424)]>>24&255,i[8]=0,i[9]=0,i[10]=0,r.setUint32(s,s),i.set(t[e(406)][e(414)](0,t.header[e(407)]),11),i}_createFlvPacket(){const t=hc;let e=arguments[t(407)]>0&&void 0!==arguments[0]?arguments[0]:null,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{header:{length:e?e[t(407)]:0,timestamp:i,type:s},payload:e}}[hc(393)](){const t=hc;let e=arguments[t(407)]>0&&void 0!==arguments[0]?arguments[0]:V[t(413)],s=arguments[t(407)]>1?arguments[1]:void 0;return new Promise(((i,r)=>{const n=t;if(!this[n(423)])return this[n(358)].debugError(this.TAG_NAME,n(400)),r(n(400));if(0===this[n(411)][n(407)])return this[n(358)][n(410)](this[n(420)],n(362)),r(n(362));s&&this[n(397)](s);const o=new Uint8Array([70,76,86,1,0,0,0,0,9,0,0,0,0]);this.hasVideo&&(o[4]|=1),this.hasAudio&&(o[4]|=4);let a=[o];if(this[n(415)]){const t=this[n(425)](this[n(415)],L[n(373)]),e=this._createFlvTag(t);a[n(380)](e)}if(this.videoSequenceHeader){const t=this[n(425)](this.videoSequenceHeader,L[n(402)]),e=this[n(404)](t);a[n(380)](e)}if(this.aacSequenceHeader){const t=this._createFlvPacket(this.aacSequenceHeader,L[n(360)]),e=this[n(404)](t);a[n(380)](e)}const h=function(t){const e=rc,s=t[0][e(125)];return t[e(141)](((t,i)=>{const r=e,n=new s((0|t.byteLength)+(0|i[r(138)]));return n.set(t,0),n[r(136)](i,0|t[r(138)]),n}),new s)}(a[n(421)](this[n(411)]));this.player.debugLog(this[n(420)],n(356));const c=new Blob([h],{type:n(372)});if(e===V[n(399)])i(c),this[n(358)][n(416)](M[n(378)],c);else{i();As((this.fileName||je())+"."+l[n(382)],c)}this.player.emit(M[n(419)]),this._reset(),this[n(358)].emit(M.recording,!1)}))}[hc(396)](){return new Promise(((t,e)=>{const s=cc;if(this[s(358)].debugLog(this[s(420)],s(367)),!this.isRecording)return t();this[s(357)](),this[s(358)][s(416)](M.recording,!1),this[s(358)].emit(M[s(401)]),t()}))}getTotalDuration(){const t=hc;let e=0;return null!==this.startTime&&null!==this.currentTime&&(e=this[t(403)]-this.startTime),Math[t(422)](e/1e3)}[hc(361)](){return l[hc(382)]}getToTalByteLength(){return this[hc(386)]}}const uc=pc;function pc(t,e){const s=fc();return(pc=function(t,e){return s[t-=194]})(t,e)}function fc(){const t=["2521764pgZKJb","player","isDestroyed","slice","5XZkcap","5885190WblSFn","fisrtStartCodeOffset","length","238778VsohgT","tempBuffer","state","init","1281573hegAql","findFirstStartCode","Init","dispatch","335WzWYak","stats","parsedOffset","50370SgfbnN","destroy","reset","off","5443568vzZMvB","findSecondStartCode","set","7EzLAZL","secondStartCodeOffset","687846teBLni","versionLayer"];return(fc=function(){return t})()}!function(t,e){const s=pc,i=t();for(;;)try{if(350157===parseInt(s(221))/1*(parseInt(s(195))/2)+-parseInt(s(215))/3+-parseInt(s(217))/4+-parseInt(s(203))/5*(-parseInt(s(206))/6)+-parseInt(s(213))/7*(parseInt(s(210))/8)+parseInt(s(199))/9+parseInt(s(222))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(fc);const mc={init:0,findFirstStartCode:1,findSecondStartCode:2};class gc extends Bi{constructor(t){const e=pc;super(),this[e(218)]=t,this[e(219)]=!1,this[e(208)]()}[uc(207)](){const t=uc;this[t(219)]=!1,this[t(209)](),this.reset()}[uc(208)](){const t=uc;this[t(204)]=mc[t(198)],this.tempBuffer=new Uint8Array(0),this[t(205)]=0,this[t(216)]=0}[uc(202)](t,e){const s=uc;let i=new Uint8Array(this.tempBuffer[s(194)]+t[s(194)]);for(i[s(212)](this.tempBuffer,0),i.set(t,this[s(196)][s(194)]),this[s(196)]=i;!this[s(219)];){if(this.state==mc[s(201)]){let t=!1;for(;this[s(196)][s(194)]-this[s(205)]>=2&&!this.isDestroyed;)if(255==this[s(196)][this.parsedOffset]){if(!(!1&this[s(196)][this[s(205)]+1])){this.versionLayer=this.tempBuffer[this[s(205)]+1],this[s(197)]=mc[s(200)],this.fisrtStartCodeOffset=this[s(205)],this.parsedOffset+=2,t=!0;break}this[s(205)]++}else this.parsedOffset++;if(t)continue;break}if(this.state==mc[s(200)]){let t=!1;for(;this[s(196)][s(194)]-this.parsedOffset>=2&&!this.isDestroyed;)if(255==this.tempBuffer[this[s(205)]]){if(this[s(196)][this.parsedOffset+1]==this[s(216)]){this[s(197)]=mc[s(211)],this[s(214)]=this.parsedOffset,this[s(205)]+=2,t=!0;break}this[s(205)]++}else this[s(205)]++;if(t)continue;break}if(this.state==mc[s(211)]){let t=this[s(196)][s(220)](this[s(223)],this[s(214)]);this.emit("data",t,e),this[s(196)]=this.tempBuffer[s(220)](this[s(214)]),this[s(223)]=0,this[s(205)]=2,this[s(197)]=mc[s(200)]}}}}const Ac=yc;function yc(t,e){const s=bc();return(yc=function(t,e){return s[t-=269]})(t,e)}function bc(){const t=["fileName","blob","1284368TURuvQ","audio","mp4","debugError","isRecording","catch","216GdVvmX","player","pendingVideoFrames","dts","startRecord","byteLength","getAudioInfo","336190TcOCCd","debugUuid","then","metaInfo","stopRecord error","wasmMp4RecorderStarted","forEach","recordCancel","channels","video","codecId","duration","totalByteLength","length","4424841RkPKgt","TAG_NAME","getType","audioCodeId","destroy","start recording","avcc","debugLog","6549000LLhBUz","init","stopRecordingInterval","stop recording fail, isRecording is false ","JessibucaProMp4Recorder","854653khwRji","startRecord error","hasAudio","cts","MP3","recordStart","audioMetaInfo","6jWganL","recordEnd","_isRecording","recording","_reset","hasVideo","5861245iybKng","getVideoInfo","recordBlob","stopRecordAndSave","setFileName","isIFrame","sendVideoFrame","wasmMp4RecorderDecoder","_handleAddAudioTrack","sampleRate","pendingAudioFrames","_recordingTimestamp","emit","depth","totalAudioDuration","width","payload","round","2429tIlQjk","19896herDYS","setInterval","mp3Demuxer","audioCacheTrack","totalAudioByteLength","stop recording fail, recording time is 0 ","cacheTrack","encTypeCode","wasmMp4Recorder","_opt","push","cancelRecord","finally","cancel recording","recordingTimestamp","handleAddAudioTrack","stopRecord","_prevHandleAddNaluTrack","_prevHandleAddAudioTrack"];return(bc=function(){return t})()}!function(t,e){const s=yc,i=t();for(;;)try{if(853610===-parseInt(s(342))/1+parseInt(s(302))/2+parseInt(s(329))/3+-parseInt(s(337))/4+-parseInt(s(355))/5*(-parseInt(s(349))/6)+parseInt(s(280))/7*(parseInt(s(281))/8)+-parseInt(s(308))/9*(parseInt(s(315))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(bc);class vc extends Hh{constructor(t){const e=yc;super(t),this[e(330)]="recorderWasmMP4",this[e(353)](),this[e(289)]=null,this[e(283)]=null,this[e(320)]=!1,this[e(272)]=[],this[e(310)]=[],t[e(336)](this[e(330)],e(338))}[Ac(333)](){const t=Ac;super[t(333)](),this[t(283)]&&(this.mp3Demuxer[t(333)](),this[t(283)]=null),this[t(353)](),this[t(309)][t(336)](this[t(330)],t(333))}_reset(){const t=Ac;super[t(353)](),this[t(287)]={},this[t(284)]={},this[t(276)]=0,this.totalByteLength=0,this[t(285)]=0,this.hasAudio=!1,this[t(354)]=!1}[Ac(331)](){return l.mp4}isWasmMp4(){return!0}getTotalDuration(){return this[Ac(273)]/1e3}getToTalByteLength(){const t=Ac;return this[t(327)]+this[t(285)]}[Ac(312)](){const t=Ac,e=this[t(309)],s=this.player[t(314)](),i=this[t(309)][t(356)](),r={};if(this.codecId){const e={type:this[t(325)],width:i[t(277)],height:i.height,extraData:this[t(318)][t(335)]};r[t(324)]=e,this.hasVideo=!0}if(s[t(288)]){const e={type:s[t(288)],sampleRate:s[t(271)],channels:s[t(323)],extraData:this[t(348)].extraData,depth:s[t(275)]};this[t(332)]=s.encTypeCode,r[t(303)]=e,this[t(344)]=!0}this.wasmMp4Recorder=new(window[t(341)])({debug:e[t(290)].debug,debugLevel:e._opt.debugLevel,debugUuid:e[t(290)][t(316)],decoder:e[t(290)][t(269)],name:b,buildTime:v}),this[t(289)].on(t(295),(e=>{const s=t;this[s(273)]=Math[s(279)](e/1e3)})),this._isRecording=!0,this[t(289)][t(312)](r)[t(317)]((()=>{const e=t;this.player[e(274)](M.recording,!0),this[e(320)]=!0,this.player[e(336)](this[e(330)],e(334)),this.player[e(274)](M[e(347)]),this.startRecordingInterval()}))[t(307)]((e=>{const s=t;this[s(351)]=!1,this[s(309)][s(305)](this[s(330)],s(343),e),this[s(309)].emitError(M.recordCreateError,e)}))}startRecordingInterval(){const t=Ac;this[t(339)](),this.recordingInterval=window[t(282)]((()=>{const e=t;this[e(309)][e(274)](M[e(295)],this.recordTime)}),1e3)}[Ac(358)](){const t=Ac;let e=arguments[t(328)]>0&&void 0!==arguments[0]?arguments[0]:V.download,s=arguments[t(328)]>1?arguments[1]:void 0;return new Promise(((i,r)=>{const n=t;return this[n(306)]?0===this[n(273)]?(this[n(309)][n(305)](this[n(330)],n(286)),r(n(286))):(s&&this[n(359)](s),void this[n(289)].stopRecord().then((t=>{const s=n;if(e===V[s(301)])i(t),this[s(309)][s(274)](M[s(357)],t);else{i();As((this[s(300)]||je())+"."+l[s(304)],t)}}))[n(307)]((t=>{const e=n;this[e(309)].debugError(this[e(330)],e(319),t),r(t)}))[n(293)]((()=>{const t=n;this.player.emit(M[t(350)]),this._reset(),this[t(309)][t(274)](M[t(352)],!1)}))):(this.player.debugError(this[n(330)],"stop recording fail, isRecording is false "),r(n(340)))}))}[Ac(292)](){return new Promise(((t,e)=>{const s=yc;if(this[s(309)][s(336)](this[s(330)],s(294)),!this[s(306)]||0===this._recordingTimestamp)return t();this[s(289)][s(297)]()[s(317)]((e=>{t()}))[s(307)]((t=>{const i=s;this.player[i(305)](this[i(330)],i(319),t),e(t)})).finally((()=>{const t=s;this._reset(),this[t(309)].emit(M[t(352)],!1),this[t(309)].emit(M[t(322)])}))}))}[Ac(296)](t,e){const s=Ac;ci(this.hasAudio)||(this.wasmMp4RecorderStarted?(this[s(272)].length>0&&(this[s(272)][s(321)]((t=>{const e=s;this[e(299)](t[e(278)],t[e(311)])})),this.pendingAudioFrames=[]),this[s(299)](t,e)):this[s(272)][s(291)]({payload:t,dts:e}))}[Ac(299)](t,e){const s=Ac;this.audioCodeId===H[s(346)]?(!this[s(283)]&&(this.mp3Demuxer=new gc(this[s(309)]),this.mp3Demuxer.on("data",((t,e)=>{this[s(270)](t,e)}))),this[s(283)].dispatch(t,e)):this[s(270)](t,e)}[Ac(270)](t,e){const s=Ac;this[s(284)].id&&e>=this[s(284)][s(311)]?(this[s(284)][s(326)]=e-this[s(284)][s(311)],this.totalAudioDuration+=this[s(284)].duration,this[s(285)]+=this[s(284)][s(278)].byteLength,this[s(289)].sendAudioFrame(this[s(284)][s(278)],this[s(284)].dts)):this[s(284)]={},this[s(284)]={id:2,payload:t,dts:e}}handleAddNaluTrack(t,e,s,i){const r=Ac;ci(this[r(354)])||(this[r(320)]?(this[r(310)][r(328)]>0&&(this[r(310)].forEach((t=>{const e=r;this[e(298)](t[e(278)],t[e(360)],t[e(311)],t[e(345)])})),this.pendingVideoFrames=[]),this[r(298)](t,e,s,i)):this[r(310)][r(291)]({payload:t,isIFrame:e,dts:s,cts:i}))}[Ac(298)](t,e,s,i){const r=Ac;this.cacheTrack.id&&s>=this[r(287)].dts?(this.cacheTrack[r(326)]=s-this[r(287)][r(311)],this[r(327)]+=this[r(287)][r(278)][r(313)],this[r(289)][r(361)](this[r(287)][r(278)],this[r(287)][r(360)],this[r(287)][r(311)],this[r(287)][r(345)])):this.cacheTrack={},this[r(287)]={id:1,payload:t,isIFrame:e,dts:s,cts:i}}}function Sc(){const t=["_opt","296027RbdlzG","15823512QgyCvD","recordType","getLoaderFactory","useWasm","93822tVysQB","39790OeBYWV","4308766kDXqbE","36TRVQBi","flv","5451136xeTenN","2216600irrgyc","12JwDfBg","mp4","isAliyunRtc","JessibucaProMp4Recorder"];return(Sc=function(){return t})()}function wc(t,e){const s=Sc();return(wc=function(t,e){return s[t-=453]})(t,e)}!function(t,e){const s=wc,i=t();for(;;)try{if(343011===parseInt(s(468))/1+parseInt(s(456))/2*(parseInt(s(463))/3)+-parseInt(s(462))/4+-parseInt(s(457))/5*(parseInt(s(459))/6)+-parseInt(s(458))/7+-parseInt(s(461))/8+parseInt(s(469))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Sc);class Ec{constructor(t){const e=wc;return new(Ec[e(454)](t,t[e(467)]))(t)}static getLoaderFactory(t,e){const s=wc;if(t.isOldHls()||t.isWebrtcH264()||t[s(465)]())return qh;if(e.recordType===l[s(464)]){if(e[s(455)]||e.useMSE||e.useWCS)return window[s(466)]&&e.mp4RecordUseWasm?vc:sc}else if(e[s(453)]===l[s(460)])return dc;return qh}}function Ic(t,e){const s=kc();return(Ic=function(t,e){return s[t-=170]})(t,e)}function Tc(t,e,s){let i=t;if(e+s=128){s.push(String.fromCharCode(65535&t)),r+=2;continue}}}else if(i[r]<240){if(Tc(i,r,2)){let t=(15&i[r])<<12|(63&i[r+1])<<6|63&i[r+2];if(t>=2048&&55296!=(63488&t)){s[e(172)](String[e(177)](65535&t)),r+=3;continue}}}else if(i[r]<248&&Tc(i,r,3)){let t=(7&i[r])<<18|(63&i[r+1])<<12|(63&i[r+2])<<6|63&i[r+3];if(t>65536&&t<1114112){t-=65536,s.push(String[e(177)](t>>>10|55296)),s[e(172)](String[e(177)](1023&t|56320)),r+=4;continue}}s[e(172)](String[e(177)](65533)),++r}return s.join("")}function Cc(){const t=["82873HKxnAu","591364QeKuHQ","getInt16","parseValue","toString","parseDate","10574729twCxNh","push","size","Unsupported AMF value type ","374780abUstH","parseString","name","parseScriptData","value","objectEnd","6Cqrede","parseVariable","parseObject","330554vaDBvK","getFloat64","data","getUint16","getUint32","setInt16","10gvyMXE","getUint8","3954tZKZSf","2095RnsmEd","error","1673145lZRLzr","AMF","8xKsdSI"];return(Cc=function(){return t})()}!function(t,e){const s=Ic,i=t();for(;;)try{if(714928===parseInt(s(181))/1*(parseInt(s(180))/2)+-parseInt(s(170))/3+-parseInt(s(176))/4+parseInt(s(171))/5+parseInt(s(175))/6*(-parseInt(s(174))/7)+parseInt(s(178))/8+parseInt(s(173))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(kc);const Rc=Dc;function Dc(t,e){const s=Cc();return(Dc=function(t,e){return s[t-=148]})(t,e)}!function(t,e){const s=Dc,i=t();for(;;)try{if(174767===parseInt(s(180))/1+-parseInt(s(166))/2+parseInt(s(163))/3*(-parseInt(s(148))/4)+-parseInt(s(175))/5*(parseInt(s(174))/6)+parseInt(s(157))/7+parseInt(s(179))/8*(-parseInt(s(177))/9)+-parseInt(s(172))/10*(-parseInt(s(153))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Cc);let Lc=function(){const t=Dc;let e=new ArrayBuffer(2);return new DataView(e)[t(171)](0,256,!0),256===new Int16Array(e)[0]}();class xc{static[Rc(160)](t,e,s){const i=Rc;let r={};try{let n=xc[i(150)](t,e,s),o=xc[i(150)](t,e+n[i(155)],s-n[i(155)]);r[n[i(168)]]=o[i(168)]}catch(t){console[i(176)](i(178),t[i(151)]())}return r}static[Rc(165)](t,e,s){const i=Rc;let r=xc.parseString(t,e,s),n=xc[i(150)](t,e+r[i(155)],s-r[i(155)]),o=n[i(162)];return{data:{name:r[i(168)],value:n[i(168)]},size:r[i(155)]+n[i(155)],objectEnd:o}}static[Rc(164)](t,e,s){return xc[Rc(165)](t,e,s)}static[Rc(158)](t,e,s){const i=Rc;let r,n=new DataView(t,e,s)[i(169)](0,!Lc);return r=n>0?_c(new Uint8Array(t,e+2,n)):"",{data:r,size:2+n}}static parseLongString(t,e,s){const i=Rc;let r,n=new DataView(t,e,s)[i(170)](0,!Lc);return r=n>0?_c(new Uint8Array(t,e+4,n)):"",{data:r,size:4+n}}static[Rc(152)](t,e,s){const i=Rc;let r=new DataView(t,e,s),n=r.getFloat64(0,!Lc);return n+=60*r[i(149)](8,!Lc)*1e3,{data:new Date(n),size:10}}static[Rc(150)](t,e,s){const i=Rc;let r,n=new DataView(t,e,s),o=1,a=n[i(173)](0),h=!1;try{switch(a){case 0:r=n[i(167)](1,!Lc),o+=8;break;case 1:r=!!n[i(173)](1),o+=1;break;case 2:{let n=xc.parseString(t,e+1,s-1);r=n[i(168)],o+=n[i(155)];break}case 3:{r={};let a=0;for(9==(16777215&n[i(170)](s-4,!Lc))&&(a=3);o{const t=e;window[t(165)].revokeObjectURL(this[t(243)]),this[t(243)]=null,this.workerClearTimeout=null}),T)}this.decoderWorker=new Worker(s),this[e(309)](),this[e(302)](),t.debugLog(e(360),e(307)+this[e(225)]),t.on(M[e(175)],(()=>{const s=e;this.updateWorkConfig({key:s(341),value:t.visibility})}))}destroy(){return new Promise(((t,e)=>{const s=Oc;if(this[s(344)]=!0,this.player[s(292)])if(this[s(374)][s(216)](s(360),"has loaded and post message to destroy"),this[s(360)]){const e={};this[s(374)][s(329)]()&&(e[s(159)]=this[s(374)][s(340)]()),this[s(360)][s(308)]({cmd:x.close,options:e}),this[s(395)]=t,this[s(191)](),this[s(169)]=setTimeout((()=>{const e=s;this[e(374)][e(337)](e(360),e(154)),this[e(187)](),setTimeout((()=>{t()}),0)}),2e3)}else this[s(374)][s(337)](s(360),s(108)),this._destroy(),setTimeout((()=>{t()}),0);else this[s(374)][s(216)](s(360),s(295)),this._destroy(),setTimeout((()=>{t()}),0)}))}[Fc(126)](){return this[Fc(344)]}[Fc(188)](){return this[Fc(242)]}_destroy(){const t=Fc;this[t(191)](),this[t(243)]&&(window[t(165)][t(288)](this.workerUrl),this[t(243)]=null),this.workerClearTimeout&&(clearTimeout(this[t(238)]),this.workerClearTimeout=null),this[t(360)]&&(this[t(360)][t(204)](),this.decoderWorker.onerror=null,this[t(360)].onmessageerror=null,this[t(360)].onmessage=null,this[t(360)]=null),this[t(374)].debugLog(t(360),t(167)),this[t(395)]&&(this[t(395)](),this[t(395)]=null),this[t(242)]=!0,this[t(344)]=!1}_listenPlaybackEvents(){const t=Fc;this.player[t(271)]()&&(this[t(374)][t(216)](this[t(222)],t(281)),this[t(374)].on(M[t(221)],(e=>{this[t(140)](e)})))}[Fc(309)](){const t=Fc;this[t(374)],this[t(360)][t(276)]=e=>{const s=t,i=e[s(331)]||"",r=e[s(142)]||"",n=i&&(-1!==i[s(178)](s(323))||-1!==i[s(178)](s(255))),o=i&&-1!==i[s(178)](s(339));n&&o&&-1!==r[s(178)](_t[s(342)])?this[s(374)][s(216)](s(360),s(264)+i+s(277)+r,e):(this[s(374)][s(145)](s(360),s(109)+this[s(225)]+", and filename: "+i+s(277)+r,e),n?this[s(374)][s(274)](U[s(379)],"filename: "+i+",message: "+r):this[s(374)][s(274)](U[s(127)],"filename: "+i+s(277)+r))},this.decoderWorker[t(220)]=e=>{const s=t;this.player.debugError("decoderWorker",s(220),e)},this[t(360)][t(156)]=e=>{const s=t,i=e[s(305)];switch(i.cmd){case R[s(312)]:this.player.debugLog(s(360),s(318),R[s(312)]),this[s(360)]&&this[s(202)](),!this[s(374)][s(292)]&&this[s(374)][s(166)](M[s(287)]),this[s(374)][s(166)](M[s(205)]);break;case R[s(244)]:this.player[s(216)]("decoderWorker","onmessage:",R.videoCode,i[s(310)]),!this[s(374)][s(348)][s(380)]&&(this[s(374)][s(348)][s(380)]=je()),this[s(374)].video[s(251)]({encTypeCode:i[s(310)]});break;case R.videoCodec:this.player[s(216)](s(360),s(318),R.videoCodec,i[s(253)]),this.player[s(289)]&&this[s(374)].recorder[s(157)](i[s(352)],i[s(253)]),this.player[s(110)][s(251)]({encTypeCode:i[s(253)]});break;case R.audioCode:this[s(374)][s(216)](s(360),s(318),R[s(280)],i[s(310)]),this[s(374)].audio&&this[s(374)][s(177)][s(262)]({encTypeCode:i[s(310)]});break;case R[s(153)]:this[s(374)][s(216)](s(360),s(318),R[s(153)]),this[s(374)][s(289)]&&this[s(374)][s(289)][s(217)](i.buffer);break;case R[s(218)]:if(this[s(374)][s(216)](s(360),"onmessage:",R[s(218)],s(233)+i.w+s(135)+i.h),ys(i.w)||ys(i.h))return void this[s(374)].emitError(U[s(116)],s(268)+i.w+s(325)+i.h+s(387));if(this[s(374)][s(110)][s(117)](),this[s(374)].video[s(251)]({width:i.w,height:i.h}),!(this[s(374)][s(368)].openWebglAlignment||zs(i.w)||this[s(374)][s(358)]()!==X[s(122)]&&this[s(374)].getCanvasRenderType()!==X[s(250)]))return void this[s(374)][s(274)](U[s(316)]);this[s(374)][s(110)][s(194)](),this.player[s(173)]()?(this[s(374)].video[s(211)](),this[s(374)][s(110)][s(138)]()):this[s(374)][s(347)]();break;case R.initAudio:if(this[s(374)][s(216)]("decoderWorker","onmessage:",R[s(335)],s(357)+i[s(314)]+s(172)+i[s(155)]),i.channels>2)return void this.player[s(274)](U[s(148)],s(362)+i[s(314)]+", max is 2");this[s(374)][s(177)]&&(this[s(374)][s(177)][s(262)](i),this[s(374)][s(368)][s(327)]===c.player?this[s(374)].audio[s(248)]():this[s(374)]._opt[s(327)]===c[s(223)]?this.player.audio[s(248)]():this.player[s(347)]()&&this[s(374)][s(177)].initScriptNode());break;case R[s(114)]:if(this.player[s(389)]())return;if(!this[s(374)][s(110)])return void this[s(374)][s(337)]("decoderWorker",s(158));if(this[s(374)][s(252)]()){if(ci(this.player.video[s(247)]()))return void this.player[s(337)](s(360),s(260));this[s(374)].video[s(114)](i),this[s(374)][s(179)](),this.player[s(166)](M[s(203)],i.ts),this[s(374)][s(390)]({dfps:!0,buf:i.delay}),!this[s(374)]._times.videoStart&&(this[s(374)]._times[s(144)]=je(),this[s(374)][s(192)]())}else if(this.player[s(173)]())this[s(374)][s(390)]({dfps:!0}),ci(this.player.playbackPause)?(this.player.playback.isUseLocalCalculateTime&&this[s(374)].playback[s(364)](),this[s(374)][s(333)].isUseFpsRender?this[s(374)][s(110)][s(332)](i):this[s(374)].video.render$2(i)):this[s(374)].playback[s(392)]()&&this[s(374)].playback[s(198)]&&this[s(374)][s(110)][s(332)](i);else if(this[s(374)].isPlayVod())if(this[s(374)][s(121)][s(214)]()){const t=this.player.playVod[s(286)];Math[s(350)](i.ts-t)<500&&(this[s(374)][s(121)][s(128)](),this[s(374)][s(390)]({dfps:!0}),this.player.video.render$2(i))}else this.player.updateStats({dfps:!0}),this[s(374)].video.render$2(i);break;case R[s(266)]:this[s(374)][s(289)]&&this.player[s(289)].isRecording&&this.player[s(368)][s(137)]===l[s(235)]&&this[s(374)][s(289)][s(123)](i[s(352)],i[s(254)],i.ts,i[s(245)]);break;case R[s(228)]:this[s(374)][s(289)]&&this[s(374)].recorder.isRecording&&this.player[s(368)][s(137)]===l[s(235)]&&this[s(374)][s(289)][s(375)]()&&this[s(374)].recorder[s(136)](i[s(352)],i.ts);break;case R[s(232)]:const{webcodecsDecoder:t,mseDecoder:e}=this[s(374)];this.player[s(390)]({buf:i[s(275)]});const r=new Uint8Array(i[s(272)]);this[s(374)][s(368)].useWCS&&!this[s(374)][s(368)][s(239)]?t[s(146)](r,i.ts,i[s(254)],i.cts):this[s(374)][s(368)][s(278)]&&e.decodeVideo(r,i.ts,i.isIFrame,i[s(245)]);break;case R.audioPayload:if(this[s(374)][s(368)][s(278)]){const t=new Uint8Array(i[s(272)]);this[s(374)][s(361)][s(118)](t,i.ts,i[s(245)])}break;case R[s(201)]:if(this.player.isDestroyedOrClosed())return;if(!this[s(374)][s(177)])return void this[s(374)][s(337)](s(360),s(209));if(this[s(374)][s(139)]&&this[s(374)][s(177)]||!this.player[s(110)])if(!this[s(374)][s(368)][s(168)]&&this[s(374)].handleRender(),this[s(374)][s(368)].playType===c.player)this[s(374)][s(177)][s(301)](i[s(352)],i.ts);else if(this.player._opt[s(327)]===c.playbackTF)ci(this.player.playbackPause)?this[s(374)][s(177)][s(301)](i[s(352)],i.ts):this.player[s(333)][s(392)]()&&this.player[s(333)][s(198)]&&this[s(374)][s(177)][s(301)](i.buffer,i.ts);else if(this[s(374)][s(347)]()&&ci(this[s(374)].playVodPause)){if(this[s(374)][s(121)][s(214)]())return;this[s(374)].audio[s(301)](i[s(352)],i.ts)}break;case R[s(393)]:if(i[s(229)]===M[s(298)])this[s(374)][s(227)]?this.player[s(227)][s(166)](M[s(298)]):this.player[s(337)](s(360),s(213));else if(i.type===M[s(370)])this[s(374)][s(166)](M.kBps,(i[s(210)]/1024)[s(212)](2));else if(i[s(229)]===M[s(182)])this[s(374)]?(i.value===h[s(186)]&&this.player[s(166)](M[s(304)],i[s(330)]),this[s(374)][s(166)](M[s(182)],i[s(330)])):this[s(374)][s(337)]("decoderWorker",s(193));else if(i[s(229)]===M[s(324)])this[s(374)][s(185)]();else if(i.type===U[s(215)])this[s(374)][s(274)](U.websocketError,i[s(210)]);else if(i[s(229)]===U[s(183)])this[s(374)]&&this[s(374)][s(227)]?this.player[s(227)][s(166)](U[s(183)],i.msg):this.player[s(337)](s(360),s(129));else if(i.type===U[s(246)])this[s(374)]&&this[s(374)][s(227)]?this[s(374)][s(227)][s(166)](U.fetchError,i[s(210)]):this[s(374)][s(337)](s(360),s(317));else if(i[s(229)]===U.fetchErrorWorker)this[s(374)][s(274)](U[s(246)],i[s(210)]);else if(i[s(229)]===M[s(257)])this.player.updateStats({abps:i[s(210)]});else if(i[s(229)]===M[s(190)])!this.player._times[s(236)]&&(this.player[s(348)][s(236)]=je()),this.player.updateStats({vbps:i[s(210)]});else if(i[s(229)]===M.streamDts)this[s(374)][s(390)]({dts:i.value});else if(i.type===M[s(132)])this[s(374)][s(390)]({netBuf:i.value});else if(i.type===M[s(394)])this[s(374)].emit(M[s(394)],i[s(210)]);else if(i[s(229)]===M.streamStats){const t=JSON[s(297)](i[s(210)]);this[s(374)].updateStats({workerStats:t})}else i.type===M[s(363)]&&this[s(374)][s(166)](M[s(363)]);break;case R[s(125)]:this[s(374)]&&(this[s(374)][s(134)]=i[s(210)]);break;case R[s(372)]:this.player&&this.player[s(390)]({isDropping:!0});break;case R.checkFirstIFrame:this[s(374)][s(124)]();break;case R[s(241)]:this[s(374)]&&this.player.video&&this.player[s(110)][s(207)](i[s(210)]);break;case R[s(353)]:this[s(374)][s(274)](U[s(353)],i.value);break;case R.wasmWidthOrHeightChange:this[s(374)][s(274)](U[s(320)],i[s(210)]);break;case R[s(359)]:this.player[s(274)](U[s(359)]);break;case R[s(300)]:this[s(374)][s(216)](s(360),s(318),R[s(300)]),Si()&&(this.player[s(167)](),console[s(160)](decodeURIComponent(Kt)),alert(decodeURIComponent(Ht)),window.location[s(326)]());break;case R.closeEnd:this[s(374)][s(216)](s(360),s(318),R[s(237)]),this[s(187)]();break;case R[s(133)]:this[s(374)]&&this[s(374)][s(369)](i[s(352)]);break;case R[s(112)]:this[s(374)]&&this[s(374)][s(366)]({ts:i.ts,data:new Uint8Array(i[s(352)])});break;case R.flvScriptData:if(this.player){if(this[s(374)].isRecordTypeFlv()){const t=new Uint8Array(i.buffer);this[s(374)][s(289)][s(120)](t)}const t=Bc(new Uint8Array(i[s(352)]));t&&t[s(270)]&&this[s(374)].updateMetaData(t[s(270)])}break;case R[s(195)]:if(this[s(374)]&&this.player.isRecordTypeFlv()){const t=new Uint8Array(i[s(352)]);this[s(374)][s(289)][s(267)](t,i.ts)}break;case R[s(226)]:if(this[s(374)]&&this[s(374)][s(256)]()){const t=new Uint8Array(i[s(352)]);this.player[s(289)].addVideoSequenceHeader(t,i.ts)}break;case R[s(174)]:if(this[s(374)]&&this.player[s(256)]()&&this[s(374)][s(263)]){const t=new Uint8Array(i[s(352)]);i[s(229)]===D[s(110)]?this[s(374)][s(289)][s(147)](t,i.ts):i.type===D.audio&&this[s(374)][s(289)][s(171)](t,i.ts)}break;case R.mseHandle:this.player&&(this.player[s(216)](s(360),"onmessage:",R[s(279)]),this[s(374)][s(110)][s(384)][s(151)]=i.mseHandle);break;case R.mseFirstRenderTime:this[s(374)]&&(this[s(374)][s(216)]("decoderWorker","onmessage:",R.mseFirstRenderTime,i[s(210)]),this.player[s(111)][s(141)]=Number(i[s(210)]));break;case R[s(115)]:this[s(374)]&&(this[s(374)][s(216)](s(360),s(318),R[s(115)],i[s(210)],i.msg),this.player[s(274)](i.value,i[s(330)]));break;case R[s(208)]:this[s(374)]&&(this.player[s(216)](this.TAG_NAME,s(318),R[s(208)]),this[s(374)][s(274)](U.notSupportNewWasm));break;case R[s(382)]:this[s(374)]&&(this[s(374)][s(216)](this.TAG_NAME,s(318),R.failedToAsynchronouslyPrepareWasm),this[s(374)].emitError(U[s(382)]));break;case R[s(378)]:this.player&&this.player[s(166)](M[s(378)],i[s(210)]);break;default:this[s(374)][i.cmd]&&this.player[i[s(196)]](i)}}}[Fc(202)](){const t=Fc,e={debug:this[t(374)]._opt.debug,debugLevel:this[t(374)][t(368)].debugLevel,debugUuid:this[t(374)][t(368)][t(321)],useOffscreen:this.player._opt.useOffscreen,useWCS:this[t(374)][t(368)].useWCS,useMSE:this[t(374)]._opt[t(278)],videoBuffer:this[t(374)][t(368)][t(162)],videoBufferDelay:this.player[t(368)][t(354)],openWebglAlignment:this[t(374)][t(368)].openWebglAlignment,playType:this.player[t(368)][t(327)],hasAudio:this[t(374)][t(368)][t(371)],hasVideo:this.player[t(368)][t(168)],playbackRate:1,playVodRate:1,playbackFps:this[t(374)][t(368)][t(131)][t(259)],playbackAutoCalcFps:this[t(374)]._opt[t(131)].autoCalcFps,playbackForwardMaxRateDecodeIFrame:this[t(374)][t(368)][t(170)],playbackIsCacheBeforeDecodeForFpsRender:this[t(374)][t(368)][t(131)].isCacheBeforeDecodeForFpsRender,sampleRate:this[t(374)][t(177)]&&this[t(374)].audio[t(176)]&&this[t(374)][t(177)][t(176)][t(155)]||Ot,audioBufferSize:this[t(374)][t(177)]&&this.player[t(177)].getAudioBufferSize()||1024,networkDelay:this[t(374)]._opt[t(283)],visibility:this[t(374)][t(341)],useSIMD:this[t(374)][t(368)].useSIMD,recordType:this[t(374)][t(368)][t(137)],checkFirstIFrame:this[t(374)][t(368)][t(381)],isM7sCrypto:this[t(374)][t(368)][t(291)],isXorCrypto:this[t(374)]._opt[t(265)],isSm4Crypto:this.player[t(368)].isSm4Crypto,isSm4CryptoH265V2:this[t(374)]._opt[t(367)],sm4CryptoKey:this[t(374)][t(368)][t(130)],isCryptoAudio:this[t(374)]._opt[t(349)],isFlv:this[t(374)][t(368)].isFlv,isFmp4:this[t(374)][t(368)][t(273)],isMpeg4:this[t(374)][t(368)].isMpeg4,isTs:this.player[t(368)][t(290)],isNakedFlow:this[t(374)][t(368)][t(150)],isHls265:this[t(374)].isUseHls265(),isEmitSEI:this[t(374)][t(368)][t(282)],isRecordTypeFlv:this[t(374)][t(256)](),isWasmMp4:this[t(374)][t(289)]&&this[t(374)][t(289)][t(375)]()||!1,isChrome:Os(),isFirefox:$e(),supportMSEDecodeHevc:ps(),isDropSameTimestampGop:this[t(374)]._opt.isDropSameTimestampGop,mseDecodeAudio:this[t(374)]._opt[t(113)],wcsDecodeAudio:this[t(374)][t(368)][t(385)],nakedFlowH265DemuxUseNew:this[t(374)]._opt[t(365)],mseDecoderUseWorker:this[t(374)][t(368)][t(180)],mseAutoCleanupMinBackwardDuration:this[t(374)][t(368)][t(334)],mseAutoCleanupMaxBackwardDuration:this[t(374)][t(368)][t(351)],mseCorrectTimeDuration:this[t(374)][t(368)][t(234)],mseCorrectAudioTimeDuration:this[t(374)][t(368)][t(285)],nakedFlowDemuxUseNew:this[t(374)]._opt[t(293)],nakedFlowFps:this[t(374)]._opt[t(240)],checkStreamEnd:this[t(374)][t(269)](),websocketOpenTimeout:this[t(374)][t(368)][t(183)]};this[t(360)][t(308)]({cmd:x.init,opt:JSON[t(303)](e)}),this[t(374)][t(368)][t(200)]&&this.player[t(368)][t(200)][t(258)]>0&&this[t(374)][t(368)].cryptoIV&&this[t(374)][t(368)].cryptoIV[t(258)]>0&&(this[t(164)]({key:t(200),value:this.player._opt[t(200)]}),this[t(164)]({key:"cryptoIV",value:this[t(374)][t(368)][t(184)]}))}[Fc(146)](t,e,s){const i=Fc;this[i(374)][i(252)]()?this[i(391)](t,e,s):this[i(374)][i(173)]()?this[i(374)].isPlaybackOnlyDecodeIFrame()?s&&this[i(391)](t,e,s):this[i(391)](t,e,s):this[i(374)].isPlayVod()&&this[i(391)](t,e,s)}[Fc(149)](t,e,s){const i=Fc,r={type:D[i(110)],ts:Math[i(345)](e,0),isIFrame:s};this[i(360)].postMessage({cmd:x[i(119)],buffer:t,options:r},[t[i(352)]])}[Fc(391)](t,e,s){const i=Fc;this[i(360)][i(308)]({cmd:x[i(346)],buffer:t,ts:Math[i(345)](e,0),isIFrame:s},[t[i(352)]])}[Fc(118)](t,e){const s=Fc;this[s(374)].isPlayer()?this[s(231)](t,e):this[s(374)][s(173)]()?this[s(374)][s(261)]()||this[s(231)](t,e):this.player[s(347)]()&&this._decodeAudioNoDelay(t,e)}[Fc(377)](t,e){const s=Fc,i={type:D.audio,ts:Math[s(345)](e,0)};this[s(360)][s(308)]({cmd:x.decode,buffer:t,options:i},[t.buffer])}[Fc(231)](t,e){const s=Fc;this[s(360)][s(308)]({cmd:x[s(328)],buffer:t,ts:Math[s(345)](e,0)},[t[s(352)]])}[Fc(164)](t){const e=Fc;this.decoderWorker&&this.decoderWorker[e(308)]({cmd:x[e(206)],key:t[e(189)],value:t[e(210)]})}workerFetchStream(t){const e=Fc;let s=arguments[e(306)]>1&&void 0!==arguments[1]?arguments[1]:{};const{_opt:i}=this.player;let r=[];s[e(319)]&&(r=s[e(319)],delete s[e(319)]);const n={protocol:i[e(315)],isFlv:i[e(143)],isFmp4:i[e(273)],isMpeg4:i[e(386)],isNakedFlow:i.isNakedFlow,isTs:i.isTs,options:s};this[e(360)].postMessage({cmd:x.fetchStream,url:t,protocols:r,opt:JSON[e(303)](n)})}[Fc(338)](){const t=Fc;let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this[t(360)][t(308)]({cmd:x[t(383)],needClear:e})}workerSendMessage(t){const e=Fc;this[e(360)][e(308)]({cmd:x[e(388)],message:t})}[Fc(219)](t){const e=Fc;this[e(360)][e(308)]({cmd:x[e(199)],message:t})}[Fc(140)](t){const e=Fc;this[e(360)][e(308)]({cmd:x[e(284)],isPause:t})}[Fc(191)](){const t=Fc;this[t(169)]&&(clearTimeout(this[t(169)]),this[t(169)]=null)}}function Nc(){const t=["isPlaybackOnlyDecodeIFrame","updateAudioInfo","recording","onerror and ignore filename: ","isXorCrypto","videoNalu","addAACSequenceHeader","video width ","isCheckStreamEnd","onMetaData","isPlaybackPauseNotClearCacheAndCacheBeforeDecodeAndUseFpsRender","payload","isFmp4","emitError","delay","onerror",",message: ","useMSE","mseHandle","audioCode","listenPlaybackEvents","isEmitSEI","networkDelay","playbackIsPause","mseCorrectAudioTimeDuration","seekingTimestamp","load","revokeObjectURL","recorder","isTs","isM7sCrypto","loaded","nakedFlowDemuxUseNew","12TxPhaK","has not loaded and destroy directly","7GrineX","parse","streamSuccess","1400RBSWKa","workerEnd","play","_listenPlaybackEvents","stringify","websocketClose","data","length","init and decoder url is ","postMessage","_initDecoderWorker","code","12826554kBUkzh","init","5511KiwsKz","channels","protocol","webglAlignmentError","onmessage and workerFetch response fetch error but stream is null","onmessage:","protocols","wasmWidthOrHeightChange","debugUuid","3009768reDFPc",".wasm","streamEndInner"," or height ","reload","playType","audioDecode","isMseDecoderUseWorker","msg","filename","pushData","playback","mseAutoCleanupMinBackwardDuration","initAudio","12EgzxTG","debugWarn","clearWorkBuffer","decoder-pro-audio.wasm","isMseVideoStateInited","visibility","memoryAccessOutOfBounds","106592NtsKbk","destroyLock","max","videoDecode","isPlayVod","_times","isCryptoAudio","abs","mseAutoCleanupMaxBackwardDuration","buffer","simdH264DecodeVideoWidthIsTooLarge","videoBufferDelay","2244215cpShaa","decoderHard","channels:","getCanvasRenderType","simdDecodeError","decoderWorker","mseDecoder","audio channel is ","websocketOpen","increaseLocalTimestamp","nakedFlowH265DemuxUseNew","emitVideoSei","isSm4CryptoH265V2","_opt","pushTempStream","streamRate","hasAudio","isDropping","477tSAczF","player","isWasmMp4","useOldWasm","_decodeAudio","websocketStringMsg","decoderWorkerWasmError","decodeStart","checkFirstIFrame","failedToAsynchronouslyPrepareWasm","clearBuffer","$videoElement","wcsDecodeAudio","isMpeg4"," is empty","sendWsMessage","isDestroyedOrClosed","updateStats","_decodeVideoNoDelay","isPlaybackPauseNotClearCacheAndCacheBeforeDecode","workerFetch","networkDelayTimeout","destroyResolve","decoder","has loaded but decoderWorker is null and destroy directly","onerror and decoder url is ","video","_mseWorkerData","videoSEI","mseDecodeAudio","render","mseError","videoInfoError","bindMediaStream","decodeAudio","decode","addMetaData","playVod","webgl","handleAddNaluTrack","decoderCheckFirstIFrame","iframeIntervalTs","isDestroying","decoderWorkerInitError","removeSeekingTimestamp","onmessage and workerFetch response websocketOpenTimeout but stream is null","sm4CryptoKey","playbackConfig","netBuf","tempStream","videoIframeIntervalTs",",height:","handleAddAudioTrack","recordType","initVideoDelay","playing","updatePlaybackIsPause","firstRenderTime","message","isFlv","videoStart","debugError","decodeVideo","addVideo","audioChannelError","_decodeVideo","isNakedFlow","srcObject","4586HBYvGn","audioAACSequenceHeader","send close but not response and destroy directly","sampleRate","onmessage","initMetaData","onmessage render but video is null","isVideoInited","error","51420MtDduY","videoBuffer","decoderOld","updateWorkConfig","URL","emit","destroy","hasVideo","decoderWorkerCloseTimeout","playbackForwardMaxRateDecodeIFrame","addAudio",",sampleRate:","isPlayback","flvBufferData","visibilityChange","audioContext","audio","indexOf","handleRender","mseDecoderUseWorker","application/javascript","streamEnd","websocketOpenTimeout","cryptoIV","updateStreamEndInner","websocket","_destroy","isDestroyed","key","streamVbps","_clearCloseTimeout","handlePlayToRenderTimes","onmessage and workerFetch response stream end but player is null","initCanvasViewSize","aacSequenceHeader","cmd","decoderAudio","isUseFpsRender","mseUpdateVideoTimestamp","cryptoKey","playAudio","_initWork","timeUpdate","terminate","decoderWorkerInit","updateConfig","setStreamFps","notSupportNewWasm","onmessage playAudio but audio is null","value","initFps","toFixed","onmessage and workerFetch response stream success but stream is null","isSeeking","websocketError","debugLog","initAudioAacExtraData","initVideo","updateVideoTimestamp","onmessageerror","playbackPause","TAG_NAME","playbackTF","decoderHardNotWasm","decoderUrl","videoSequenceHeader","stream","audioNalu","type","demuxUseWorker","_decodeAudioNoDelay","videoPayload","width:","mseCorrectTimeDuration","mp4","demuxStart","closeEnd","workerClearTimeout","useOffscreen","nakedFlowFps","playbackStreamVideoFps","_isDestroyed","workerUrl","videoCode","cts","fetchError","getHasInit","initScriptNode","299CfFkuX","webgl2","updateVideoInfo","isPlayer","codecId","isIFrame","wasm://","isRecordTypeFlv","streamAbps","byteLength","fps","onmessage render but video has not init"];return(Nc=function(){return t})()}const jc=Vc;function Vc(t,e){const s=zc();return(Vc=function(t,e){return s[t-=344]})(t,e)}function zc(){const t=["_decodeVideoNoDelay","decoder","simdH264DecodeVideoWidthIsTooLarge","code","init and decoder is ","playing","sampleRate",",height:","decoderWorker","updateStats","loaded","3405652ABjiiy","initVideo","location","audioChannelError","video width ","channels:","isDestroyedOrClosed","_handleSimdDecodeError","_handleAudioCode","emit","playbackTF","timeUpdate","_newDecoderWorker","buffer","270DTzazN","_listenPlaybackEvents","pushData","bind","isUseFpsRender","videoCode","initAudio","_initDecoderWorker","updateAudioInfo","wasmWidthOrHeightChange","initVideoDelay","updateVideoTimestamp","_handleSimdH264DecodeVideoWidthIsTooLarge","indexOf"," and mtType is ","_opt"," and decoder is not loaded next load it","recorder","abs","isDestroying","bindMediaStream","19467oVrfSd","windiwDecoderName","error","notSupportNewWasm","MtDecoderWorker","isPlayVod","play","destroy","render","isPlaybackOnlyDecodeIFrame","decoder-pro-f-simd-mt.js","load","_handlePlayAudio"," has loaded,init and decoder is ","workerFetchStream","removeSeekingTimestamp","onmessage render but video is null","reload"," and decoder is loaded","updateWorkConfig","_handleWasmWidthOrHeightChange","initFps","visibility","videoCodec","visibilityChange","46379TliYWN","_handleInitVideo","webgl2","init and window decoder name is ","handleRender","_decodeAudioNoDelay","_handleWorkerEnd"," and decoder is not loaded","playback","playType","debugError","playVodPause","script ","simd","video","TAG_NAME","62896vwIBhU","Decoder","isPlayer","simdDecodeError","_handleAudioAACSequenceHeader","playVod","debugLog","isUseLocalCalculateTime","initMetaData","videoStart","workerEnd","channels","_handleNotSupportNewWasm","getAudioBufferSize","_isDestroyed","checkInterval","176815lMVGxf"," is empty","onmessage:","fSimd","render$2","_handleVideoCodec","emitError","webglAlignmentError","delay","handlePlayToRenderTimes","playbackPause"," and decoderScriptId is ","_startCheckDecoder","isDestroyed","_stopCheckDecoder","_handleInitAudio","audioAACSequenceHeader","toString","increaseLocalTimestamp","hasVideo","JessibucaProMt","audio","codecId","_handleRender","2601KPKlxn","decoderWorkerInit","decoderScriptId","getCanvasRenderType","player","load decoder error ","initScriptNode","decodeVideo",", max is ","1925564CzfoTH","_handleVideoCode","updateVideoInfo","audioCode","debugWarn","initCanvasViewSize","webgl","70218brNyXZ","getElementById","init","onmessage playAudio but audio is null","_times",",sampleRate:","videoInfoError","decoderScript init ,has not load decoder and next start interval check","decodeAudio","isPlaybackPauseNotClearCacheAndCacheBeforeDecode","isSeeking","decodeStart","catch","_handleDecoderInit","isPlayback","audioContext"];return(zc=function(){return t})()}!function(t,e){const s=Vc,i=t();for(;;)try{if(548646===-parseInt(s(380))/1+-parseInt(s(445))/2+-parseInt(s(452))/3+-parseInt(s(479))/4+parseInt(s(412))/5+-parseInt(s(493))/6*(-parseInt(s(355))/7)+-parseInt(s(396))/8*(-parseInt(s(436))/9))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(zc);class Gc{constructor(t){const e=Vc;this[e(440)]=t,this.TAG_NAME=e(359),this[e(476)]=null,this.checkInterval=null,this[e(410)]=!1;let s=t._opt[e(469)],i=Gt.wasm;s[e(347)](e(365))>-1?i=Gt[e(415)]:s[e(347)]("decoder-pro-simd-mt.js")>-1&&(i=Gt[e(393)]);const r=e(432)+i+e(397);if(this.windiwDecoderName=r,this.decoderScriptId=r+"Id",this.player[e(402)](this[e(395)],"init and decoder window name is "+r+e(423)+this[e(438)]),r in window)this[e(491)](),this.player[e(402)](this[e(395)],e(472)+s+e(348)+i+e(373));else{document[e(453)](this[e(438)])?(this[e(440)][e(402)](this[e(395)],e(392)+this[e(438)]+e(368)+s+" and mtType is "+i+e(387)),r in window?this[e(491)]():(this[e(440)][e(402)](this[e(395)],e(459)),this._startCheckDecoder())):(this[e(440)][e(402)](this[e(395)],e(472)+s+e(348)+i+e(350)),(n=s,o=this[e(438)],new Promise(((t,e)=>{const s=oi,i=document[s(553)]("script");if(i[s(383)]="text/javascript",i[s(504)]=n,i[s(547)]=t,i.onerror=e,o){i.id=o;const t=document.getElementById(o);t&&document[s(366)][s(636)](t)}document[s(366)][s(593)](i)}))).then((()=>{const t=e;r in window?this._newDecoderWorker():(this[t(440)].debugLog(this[t(395)],"loadScript init , has not load decoder and next start interval check"),this._startCheckDecoder())}))[e(464)]((t=>{const s=e;this[s(440)][s(390)](this[s(395)],s(441)+t,t),this[s(440)][s(418)](U.decoderWorkerInitError,t[s(429)]())})))}var n,o;this[e(494)](),t.on(M[e(379)],(()=>{const s=e;this[s(374)]({key:s(377),value:t.visibility})}))}async[jc(362)](){const t=jc;this[t(426)](),this[t(476)]&&this.decoderWorker.destroy(),this[t(356)]=null,this[t(438)]=null,this[t(410)]=!0}_newDecoderWorker(){const t=jc;this[t(476)]=new(window[this[t(356)]])(this[t(440)],{sampleRate:this.player[t(433)]&&this[t(440)][t(433)][t(467)]&&this[t(440)][t(433)][t(467)][t(474)]||Ot,audioBufferSize:this.player[t(433)]&&this[t(440)].audio[t(409)]()||1024}),this[t(500)]()}[jc(424)](){const t=jc;this[t(411)]=setInterval((()=>{const e=t;this[e(356)]in window&&(this[e(440)].debugLog(this[e(395)],e(383)+this[e(356)]+e(373)),this[e(426)](),this[e(491)]())}),200)}[jc(426)](){this[jc(411)]&&(clearInterval(this.checkInterval),this.checkInterval=null)}[jc(353)](){return!1}[jc(425)](){return this._isDestroyed}[jc(494)](){}[jc(500)](){const t=jc;this[t(476)].on(R[t(454)],this[t(465)][t(496)](this)),this.decoderWorker.on(R[t(498)],this._handleVideoCode[t(496)](this)),this[t(476)].on(R[t(378)],this[t(417)][t(496)](this)),this.decoderWorker.on(R[t(448)],this._handleAudioCode[t(496)](this)),this.decoderWorker.on(R.audioAACSequenceHeader,this[t(400)].bind(this)),this[t(476)].on(R[t(480)],this[t(381)][t(496)](this)),this[t(476)].on(R[t(499)],this[t(427)].bind(this)),this.decoderWorker.on(R[t(363)],this._handleRender.bind(this)),this[t(476)].on(R.playAudio,this._handlePlayAudio[t(496)](this)),this.decoderWorker.on(R[t(470)],this._handleSimdH264DecodeVideoWidthIsTooLarge[t(496)](this)),this[t(476)].on(R[t(502)],this[t(375)][t(496)](this)),this[t(476)].on(R[t(399)],this[t(486)].bind(this)),this[t(476)].on(R[t(406)],this[t(386)].bind(this)),this.decoderWorker.on(R.notSupportNewWasm,this[t(408)][t(496)](this))}[jc(443)](t,e,s){const i=jc;this[i(440)][i(398)]()?this[i(468)](t,e,s):this[i(440)].isPlayback()?this.player[i(364)]()?s&&this._decodeVideoNoDelay(t,e,s):this[i(468)](t,e,s):this[i(440)][i(360)]()&&this._decodeVideoNoDelay(t,e,s)}[jc(468)](t,e,s){this[jc(476)].decodeVideo(t,e,s)}[jc(460)](t,e){const s=jc;this[s(440)][s(398)]()?this[s(385)](t,e):this.player[s(466)]()?this[s(440)][s(364)]()||this[s(385)](t,e):this[s(440)][s(360)]()&&this[s(385)](t,e)}_decodeAudioNoDelay(t,e){const s=jc;this[s(476)][s(460)](t,e)}[jc(374)](t){}[jc(369)](){}clearWorkBuffer(){}[jc(345)](){}[jc(465)](){const t=jc;this[t(440)][t(402)](this[t(395)],t(414),R.init),!this.player[t(478)]&&this[t(440)][t(488)](M[t(366)]),this[t(440)].emit(M[t(437)])}[jc(446)](t){const e=jc;this[e(440)].debugLog(this.TAG_NAME,e(414),R[e(498)],t[e(471)]),!this[e(440)]._times[e(463)]&&(this.player[e(456)][e(463)]=je()),this[e(440)][e(394)][e(447)]({encTypeCode:t[e(471)]})}[jc(417)](t){const e=jc;this[e(440)][e(402)](this[e(395)],e(414),R[e(378)],t[e(434)]),this[e(440)][e(351)]&&this[e(440)][e(351)][e(404)](t.buffer,t[e(434)]),this.player.video[e(447)]({encTypeCode:t[e(434)]})}[jc(487)](t){const e=jc;this.player[e(402)](this[e(395)],e(414),R.audioCode,t.code),this[e(440)].audio&&this[e(440)][e(433)][e(501)]({encTypeCode:t[e(471)]})}[jc(400)](t){const e=jc;this.player.debugLog(this[e(395)],e(414),R[e(428)]),this[e(440)].recorder&&this.player.recorder.initAudioAacExtraData(t.buffer)}[jc(381)](t){const e=jc;this[e(440)].debugLog(this[e(395)],e(414),R[e(480)],"width:"+t.w+e(475)+t.h),ys(t.w)||ys(t.h)?this.player.emitError(U[e(458)],e(483)+t.w+" or height "+t.h+e(413)):(this[e(440)].video[e(354)](),this.player[e(394)].updateVideoInfo({width:t.w,height:t.h}),this[e(440)][e(349)].openWebglAlignment||zs(t.w)||this.player[e(439)]()!==X[e(451)]&&this.player.getCanvasRenderType()!==X[e(382)]?(this[e(440)][e(394)][e(450)](),this[e(440)].isPlayback()?(this[e(440)][e(394)].initFps(),this.player.video[e(344)]()):this.player[e(360)]()&&(this.player[e(394)][e(376)](),this[e(440)][e(394)][e(344)]())):this[e(440)].emitError(U[e(419)]))}[jc(427)](t){const e=jc;this[e(440)][e(402)](this[e(395)],e(414),R[e(499)],e(484)+t.channels+e(457)+t.sampleRate),t[e(407)]>2?this[e(440)][e(418)](U[e(482)],"audio channel is "+t[e(407)]+e(444)+2):this[e(440)][e(433)]&&(this[e(440)][e(433)][e(501)](t),(this[e(440)][e(349)].playType===c[e(440)]||this.player[e(349)][e(389)]===c.playbackTF||this[e(440)][e(360)]())&&this[e(440)][e(433)][e(442)]())}[jc(435)](t){const e=jc;if(!this[e(440)].isDestroyedOrClosed())if(this[e(440)][e(394)]){if(this[e(440)][e(398)]()){if(ci(this[e(440)][e(394)].getHasInit()))return void this[e(440)][e(449)](this[e(395)],"onmessage render but video has not init");this.player[e(394)].render(t),this.player[e(384)](),this[e(440)][e(488)](M[e(490)],t.ts),this[e(440)][e(477)]({dfps:!0,buf:t[e(420)]}),!this[e(440)][e(456)][e(405)]&&(this[e(440)][e(456)][e(405)]=je(),this[e(440)][e(421)]())}else if(this[e(440)].isPlayback())this[e(440)][e(477)]({dfps:!0}),ci(this[e(440)][e(422)])?(this[e(440)].playback[e(403)]&&this.player[e(388)][e(430)](),this[e(440)].playback[e(497)]?this[e(440)][e(394)][e(495)](t):this[e(440)][e(394)].render$2(t)):this[e(440)].playback[e(461)]()&&this[e(440)].playback[e(497)]&&this[e(440)][e(394)][e(495)](t);else if(this.player[e(360)]())if(this[e(440)][e(401)].isSeeking()){const s=this[e(440)].playVod.seekingTimestamp;Math[e(352)](t.ts-s)<500&&(this[e(440)][e(401)][e(370)](),this[e(440)][e(477)]({dfps:!0}),this[e(440)][e(394)][e(416)](t))}else this.player.updateStats({dfps:!0}),this[e(440)].video[e(416)](t)}else this.player[e(449)](this.TAG_NAME,e(371))}[jc(367)](t){const e=jc;if(!this.player[e(485)]())if(this[e(440)][e(433)]){if(this[e(440)][e(473)]&&this[e(440)][e(433)]||!this[e(440)][e(394)])if(!this[e(440)][e(349)][e(431)]&&this[e(440)].handleRender(),this[e(440)]._opt[e(389)]===c[e(440)])this[e(440)][e(433)][e(361)](t[e(492)],t.ts);else if(this[e(440)][e(349)][e(389)]===c[e(489)])ci(this[e(440)][e(422)])?this[e(440)][e(433)][e(361)](t[e(492)],t.ts):this[e(440)][e(388)].isPlaybackPauseNotClearCacheAndCacheBeforeDecode()&&this[e(440)][e(388)][e(497)]&&this[e(440)].audio[e(361)](t[e(492)],t.ts);else if(this.player.isPlayVod()&&ci(this[e(440)][e(391)])){if(this[e(440)][e(401)][e(462)]())return;this[e(440)][e(433)][e(361)](t[e(492)],t.ts)}}else this[e(440)][e(449)](e(476),e(455))}[jc(346)](t){const e=jc;this.player[e(418)](U[e(470)],t)}[jc(375)](t){const e=jc;this[e(440)][e(418)](U[e(502)],t)}[jc(486)](){const t=jc;this.player[t(418)](U[t(399)])}[jc(386)](){const t=jc;this[t(440)][t(402)](this.TAG_NAME,t(414),R[t(406)]),Si()&&(this.player[t(362)](),console[t(357)](decodeURIComponent(Kt)),alert(decodeURIComponent(Ht)),window[t(481)][t(372)]())}[jc(408)](t){const e=jc;this[e(440)]&&(this[e(440)].debugLog(this.TAG_NAME,"onmessage:",R[e(358)]),this[e(440)][e(418)](U[e(358)]))}}var Wc=rl;!function(t,e){for(var s=rl,i=t();;)try{if(738799===parseInt(s(223))/1+-parseInt(s(202))/2*(parseInt(s(239))/3)+parseInt(s(266))/4*(-parseInt(s(249))/5)+parseInt(s(171))/6+-parseInt(s(240))/7+parseInt(s(186))/8*(parseInt(s(176))/9)+-parseInt(s(212))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ml);var Hc,Kc=Wc(204),Qc=Wc(234),Yc=/^(?:text|application)\/xml/i,qc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Jc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Xc=/^\s*$/,Zc={},$c={},tl="",el={type:"GET",beforeSend:sl,success:sl,error:sl,complete:sl,context:null,xhr:function(){return new(window[Wc(195)])},accepts:{json:Kc,xml:"application/xml, text/xml",html:Qc,text:"text/plain","*":"*/"[Wc(225)]("*")},crossDomain:!1,timeout:0,username:null,password:null,processData:!0,promise:sl,contentType:Wc(177)};function sl(){}var il=function(t,e){var s=Wc;"object"==typeof t&&(e=t,t=void 0);var i=ul({},e=e||{});for(var r in el)void 0===i[r]&&(i[r]=el[r]);try{var n={},o=new Promise((function(t,e){var s=rl;n.resolve=t,n[s(248)]=e}));o[s(187)]=n.resolve,o.reject=n[s(248)],i[s(247)]=o}catch(t){i[s(247)]={resolve:sl,reject:sl}}var a=Jc.exec(window[s(216)][s(194)][s(231)]())||[];i.url=((t||i.url||window.location[s(194)])+"")[s(260)](/#.*$/,"")[s(260)](/^\/\//,a[1]+"//");var h=i[s(236)];!i[s(261)]&&(i[s(261)]=/^([\w-]+:)?\/\/([^\/]+)/.test(i[s(236)])&&RegExp.$2!==window[s(216)][s(194)]);var c=i.dataType;if(c===s(272)){if(!/=\?/[s(213)](i[s(236)])){var l=(i[s(272)]||s(207))+"=?";i[s(236)]=cl(i[s(236)],l)}return function(t){var e,s=Wc,i=t[s(167)]||s(272)+gl(),r=window[s(229)][s(245)]("script"),n={abort:function(){i in window&&(window[i]=sl)}},o=window[s(229)][s(180)](s(174))[0]||window.document[s(271)];function a(i){var r=s;window[r(228)](e),n[r(183)](),al(i[r(263)],n,i[r(263)],t),h()}function h(){var t=s;r[t(224)]?r[t(224)]():r[t(241)]=r[t(166)]=r[t(255)]=null,r[t(270)]&&r[t(270)][t(165)](r),r=null,delete window[i]}return r.onerror=function(t){a(t)},window[i]=function(i){window[s(228)](e),nl(i,n,t),h()},ll(t),r[s(246)]=t[s(236)][s(260)](/=\?/,"="+i),r[s(246)]=cl(r[s(246)],"_="+(new Date).getTime()),r[s(232)]=!0,t[s(175)]&&(r[s(199)]=t[s(175)]),o[s(244)](r,o.firstChild),t.timeout>0&&(e=window[s(172)]((function(){var e=s;n[e(183)](),al(e(193),n,"timeout",t),h()}),t[s(193)])),t[s(247)].abort=function(){n.abort()},t[s(247)].xhr=n,t[s(247)]}(i)}ll(i);var d=i.accepts[c]||i[s(214)]["*"],u={};/^([\w-]+:)\/\//[s(213)](i.url)?RegExp.$1:window[s(216)][s(203)];var p,f=el[s(262)]();!i[s(261)]&&!u[s(253)]&&(u[s(253)]="XMLHttpRequest"),i[s(217)]&&(Zc[h]&&(u[s(242)]=Zc[h]),$c[h]&&(u[s(269)]=$c[h])),d&&(u[s(181)]=d,d[s(256)](",")>-1&&(d=d[s(257)](",",2)[0]),f.overrideMimeType&&f[s(184)](d));var m=!/^(?:GET|HEAD)$/[s(213)](i[s(263)][s(169)]());if((i.data&&m&&!1!==i[s(250)]||e[s(250)])&&(u[s(252)]=i[s(250)]),!1===i[s(237)]&&!m){var g=/([?&])_=[^&]*/;i[s(236)]=g[s(213)](h)?h[s(260)](g,s(197)+gl()):h+(/\?/[s(213)](h)?"&":"?")+"_="+gl()}i[s(190)]=ul(u,i[s(190)]||{}),f[s(166)]=function(){var t,e,r=s;if(4===f[r(230)]){clearTimeout(p);var n,o=!1;if(f[r(173)]>=200&&f[r(173)]<300||304===f[r(173)]){if(tl=f.getAllResponseHeaders(),i[r(217)]){var a=hl(r(222));a&&(Zc[h]=a),(a=hl(r(251)))&&($c[h]=a)}c=c||(t=f[r(219)](r(258)),e=Wc,t&&(t===Qc?e(198):t===Kc?e(209):Yc.test(t)&&e(210))||e(168)),n=f[r(264)];try{"xml"===c?n=f.responseXML:c===r(209)&&(n=Xc.test(n)?null:JSON[r(221)](n))}catch(t){o=t}o?al(o,r(200),f,i):nl(n,f,i)}else al(null,r(201),f,i)}};var A=!(s(232)in i)||i[s(232)];if(f[s(259)](i[s(263)],i[s(236)],A,i.username,i[s(265)]),i[s(243)])for(var y in i[s(243)])f[y]=i[s(243)][y];for(var y in i.mimeType&&f[s(184)]&&f[s(184)](i[s(178)]),i[s(190)])void 0!==i[s(190)][y]&&f[s(205)](y,i[s(190)][y]+"");return!1===function(t,e){var s=Wc,i=e[s(226)];if(!1===e[s(179)][s(188)](i,t,e))return!1}(f,i)?(f[s(183)](),!1):(i[s(193)]>0&&(p=window[s(172)]((function(){f[s(166)]=sl,f.abort(),al(null,"timeout",f,i)}),i[s(193)])),f[s(164)](i[s(235)]?i[s(235)]:null),i[s(247)][s(183)]=function(){f[s(183)]()},i.promise)};function rl(t,e){var s=ml();return(rl=function(t,e){return s[t-=164]})(t,e)}function nl(t,e,s){var i=Wc,r=s[i(226)],n=i(170);s.success[i(188)](r,t,n,e),s[i(247)][i(187)](t,n,e),ol(n,e,s)}function ol(t,e,s){var i=Wc,r=s.context;s[i(227)][i(188)](r,e,t)}function al(t,e,s,i){var r=Wc,n=i.context;i.error.call(n,s,e,t),i[r(247)][r(248)](s,e,t),ol(e,s,i)}function hl(t){var e,s=Wc;if(!Hc){for(Hc={};e=qc[s(192)](tl);)Hc[e[1].toLowerCase()]=e[2];e=Hc[t[s(231)]()]}return null===e?null:e}function cl(t,e){return(t+"&"+e).replace(/[&?]{1,2}/,"?")}function ll(t){var e,s,i,r,n=Wc;pl(t)&&!(t[n(235)]instanceof FormData)&&t[n(208)]&&(t.data=(e=t[n(235)],(r=[])[(i=Wc)(182)]=function(t,e){this[i(191)](encodeURIComponent(t)+"="+encodeURIComponent(e))},dl(r,e,s),r[i(254)]("&")[i(260)](i(189),"+"))),t[n(235)]&&(!t[n(263)]||"GET"===t[n(263)].toUpperCase())&&(t[n(236)]=cl(t[n(236)],t[n(235)]))}function dl(t,e,s,i){var r,n,o=Wc,a=(r=e,n=Wc,"[object Array]"===Object[n(233)][n(238)].call(r));for(var h in e){var c=e[h];i&&(h=s?i:i+"["+(a?"":h)+"]"),!i&&a?t[o(182)](c[o(220)],c[o(268)]):(s?a(c):pl(c))?dl(t,c,s,h):t[o(182)](h,c)}}function ul(t){for(var e=Wc,s=Array.prototype.slice,i=s[e(188)](arguments,1),r=0,n=i[e(196)];r255)return!1;return!0}function vl(t,e){var s=Ql;if(t.buffer&&t[s(314)]===s(346))return e&&(t=t[s(291)]?t.slice():Array[s(351)][s(291)][s(308)](t)),t;if(Array[s(343)](t)){if(!bl(t))throw new Error(s(305)+t);return new Uint8Array(t)}if(yl(t[s(356)])&&bl(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function Sl(t){return new Uint8Array(t)}function wl(t,e,s,i,r){var n=Ql;(null!=i||null!=r)&&(t=t[n(291)]?t[n(291)](i,r):Array[n(351)].slice[n(308)](t,i,r)),e[n(349)](t,s)}!function(t,e){for(var s=Ql,i=t();;)try{if(509945===parseInt(s(321))/1*(parseInt(s(335))/2)+parseInt(s(301))/3+parseInt(s(350))/4*(-parseInt(s(303))/5)+parseInt(s(355))/6*(-parseInt(s(309))/7)+parseInt(s(345))/8+-parseInt(s(330))/9+parseInt(s(332))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Wl);var El,Il={toBytes:function(t){var e=Ql,s=[],i=0;for(t=encodeURI(t);i191&&r<224?(s[e(295)](String[e(290)]((31&r)<<6|63&t[i+1])),i+=2):(s[e(295)](String.fromCharCode((15&r)<<12|(63&t[i+1])<<6|63&t[i+2])),i+=3)}return s[e(327)]("")}},Tl=(El="0123456789abcdef",{toBytes:function(t){for(var e=[],s=0;s>4]+El[15&r])}return s[e(327)]("")}}),kl={16:10,24:12,32:14},_l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],Cl=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],Rl=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],Dl=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],Ll=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],xl=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],Pl=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],Bl=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],Ml=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],Fl=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Ol=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Ul=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],Nl=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],jl=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],Vl=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function zl(t){for(var e=Ql,s=[],i=0;i>2,this[t(300)][i][s%4]=o[s],this._Kd[e-i][s%4]=o[s];for(var a,h=0,c=n;c>16&255]<<24^Cl[a>>8&255]<<16^Cl[255&a]<<8^Cl[a>>24&255]^_l[h]<<24,h+=1,8!=n)for(s=1;s>8&255]<<8^Cl[a>>16&255]<<16^Cl[a>>24&255]<<24;for(s=n/2+1;s>2,d=c%4,this[t(300)][l][d]=o[s],this[t(292)][e-l][d]=o[s++],c++}for(var l=1;l>24&255]^Nl[a>>16&255]^jl[a>>8&255]^Vl[255&a]},Gl[Al(351)][Al(297)]=function(t){var e=Al;if(16!=t[e(356)])throw new Error(e(319));for(var s=this[e(300)][e(356)]-1,i=[0,0,0,0],r=zl(t),n=0;n<4;n++)r[n]^=this[e(300)][0][n];for(var o=1;o>24&255]^Ll[r[(n+1)%4]>>16&255]^xl[r[(n+2)%4]>>8&255]^Pl[255&r[(n+3)%4]]^this._Ke[o][n];r=i[e(291)]()}var a,h=Sl(16);for(n=0;n<4;n++)a=this[e(300)][s][n],h[4*n]=255&(Cl[r[n]>>24&255]^a>>24),h[4*n+1]=255&(Cl[r[(n+1)%4]>>16&255]^a>>16),h[4*n+2]=255&(Cl[r[(n+2)%4]>>8&255]^a>>8),h[4*n+3]=255&(Cl[255&r[(n+3)%4]]^a);return h},Gl[Al(351)][Al(341)]=function(t){var e=Al;if(16!=t.length)throw new Error(e(312));for(var s=this[e(292)].length-1,i=[0,0,0,0],r=zl(t),n=0;n<4;n++)r[n]^=this[e(292)][0][n];for(var o=1;o>24&255]^Ml[r[(n+3)%4]>>16&255]^Fl[r[(n+2)%4]>>8&255]^Ol[255&r[(n+1)%4]]^this[e(292)][o][n];r=i.slice()}var a,h=Sl(16);for(n=0;n<4;n++)a=this[e(292)][s][n],h[4*n]=255&(Rl[r[n]>>24&255]^a>>24),h[4*n+1]=255&(Rl[r[(n+3)%4]>>16&255]^a>>16),h[4*n+2]=255&(Rl[r[(n+2)%4]>>8&255]^a>>8),h[4*n+3]=255&(Rl[255&r[(n+1)%4]]^a);return h};var Hl=function(t){var e=Al;if(!(this instanceof Hl))throw Error(e(307));this.description=e(311),this.name=e(320),this[e(302)]=new Gl(t)};Hl[Al(351)][Al(297)]=function(t){var e=Al;if((t=vl(t)).length%16!=0)throw new Error(e(348));for(var s=Sl(t[e(356)]),i=Sl(16),r=0;rNumber.MAX_SAFE_INTEGER)throw new Error(e(324));for(var s=15;s>=0;--s)this[e(328)][s]=t%256,t=parseInt(t/256)},Jl[Al(351)][Al(340)]=function(t){var e=Al;if(16!=(t=vl(t,!0))[e(356)])throw new Error(e(306));this[e(328)]=t},Jl[Al(351)].increment=function(){for(var t=Al,e=15;e>=0;e--){if(255!==this[t(328)][e]){this[t(328)][e]++;break}this[t(328)][e]=0}};var Xl=function(t,e){var s=Al;if(!(this instanceof Xl))throw Error("AES must be instanitated with `new`");this[s(322)]=s(316),this[s(314)]=s(299),!(e instanceof Jl)&&(e=new Jl(e)),this._counter=e,this[s(338)]=null,this[s(313)]=16,this[s(302)]=new Gl(t)};Xl.prototype.encrypt=function(t){for(var e=Al,s=vl(t,!0),i=0;i16)throw new Error(e(294));for(var i=t.length-s,r=0;r>>2]>>>24-a%4*8&255;s[n+a>>>2]|=h<<24-(n+a)%4*8}else for(var c=0;c>>2]=r[c>>>2];return this[e(196)]+=o,this},clamp:function(){var e=i,s=this[e(220)],r=this[e(196)];s[r>>>2]&=4294967295<<32-r%4*8,s[e(225)]=t[e(222)](r/4)},clone:function(){var t=i,e=c[t(188)][t(244)](this);return e[t(220)]=this[t(220)][t(192)](0),e},random:function(t){for(var e=i,s=[],r=0;r>>2]>>>24-o%4*8&255;n.push((a>>>4)[e(223)](16)),n[e(229)]((15&a).toString(16))}return n[e(209)]("")},parse:function(t){for(var e=i,s=t[e(225)],r=[],n=0;n>>3]|=parseInt(t[e(246)](n,2),16)<<24-n%8*4;return new(l[e(182)])(r,s/2)}},p=d[i(238)]={stringify:function(t){for(var e=i,s=t[e(220)],r=t[e(196)],n=[],o=0;o>>2]>>>24-o%4*8&255;n.push(String[e(242)](a))}return n[e(209)]("")},parse:function(t){for(var e=i,s=t[e(225)],r=[],n=0;n>>2]|=(255&t[e(197)](n))<<24-n%4*8;return new l.init(r,s)}},f=d.Utf8={stringify:function(t){var e=i;try{return decodeURIComponent(escape(p[e(239)](t)))}catch(t){throw new Error(e(233))}},parse:function(t){return p[i(203)](unescape(encodeURIComponent(t)))}},m=h[i(240)]=c[i(206)]({reset:function(){var t=i;this._data=new(l[t(182)]),this[t(199)]=0},_append:function(t){var e=i;typeof t==e(226)&&(t=f[e(203)](t)),this[e(250)].concat(t),this[e(199)]+=t[e(196)]},_process:function(e){var s,r=i,n=this[r(250)],o=n[r(220)],a=n[r(196)],h=this[r(216)],c=a/(4*h),d=(c=e?t[r(222)](c):t[r(210)]((0|c)-this[r(200)],0))*h,u=t[r(219)](4*d,a);if(d){for(var p=0;p>>2]|=t[o]<<24-o%4*8;i[s(473)](this,n,r)}else i.apply(this,arguments)};r[e(466)]=s}}(),t[e(474)][e(463)]},(r=nd)(478)==r(478)?t.exports=i(sd):"undefined"===r(468)&&(void 0)[r(476)]?(void 0)(["./core"],i):i(s.CryptoJS)}));function ad(){var t=["58845WwWIML","createCommonjsModule","6943264XOsHJf","59170DwJjIh","call","lib","byteLength","amd","27981yqXzWQ","object","354npAeZH","byteOffset","719670yfLQmv","592dADIRE","5226564VgvAop","WordArray","5791247EnYWPk","init","prototype","11574BUgNGo","function"];return(ad=function(){return t})()}var hd=ld;function cd(){var t=["charCodeAt","fromCharCode","2HLJJZu","sigBytes","CryptoJS","amd","./core","2135082fNqqsc","3832WIfXdZ","230463BMLUtn","392eGWRxY","110StTGeJ","createCommonjsModule","Utf16BE","push","object","words","create","WordArray","enc","8910881wvAunK","6421182Ybuoxe","152613MPoHuU","commonjsGlobal","function","Utf16","724031ezQjaU","exports","8530VTNeIW","length","join"];return(cd=function(){return t})()}function ld(t,e){var s=cd();return(ld=function(t,e){return s[t-=454]})(t,e)}!function(t,e){for(var s=ld,i=t();;)try{if(843469===parseInt(s(471))/1+parseInt(s(464))/2*(-parseInt(s(469))/3)+-parseInt(s(470))/4*(-parseInt(s(459))/5)+parseInt(s(483))/6+-parseInt(s(482))/7+-parseInt(s(472))/8*(parseInt(s(484))/9)+-parseInt(s(473))/10*(-parseInt(s(457))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(cd);$t[hd(474)]((function(t,e){var s,i,r,n=hd;s=$t[n(454)],i=function(t){var e=n;return function(){var e=ld,s=t,i=s.lib[e(480)],r=s[e(481)];function n(t){return t<<8&4278255360|t>>>8&16711935}r[e(456)]=r[e(475)]={stringify:function(t){for(var s=e,i=t[s(478)],r=t[s(465)],n=[],o=0;o>>2]>>>16-o%4*8&65535;n.push(String[s(463)](a))}return n[s(461)]("")},parse:function(t){for(var s=e,r=t[s(460)],n=[],o=0;o>>1]|=t.charCodeAt(o)<<16-o%2*16;return i[s(479)](n,2*r)}},r.Utf16LE={stringify:function(t){for(var s=e,i=t.words,r=t.sigBytes,o=[],a=0;a>>2]>>>16-a%4*8&65535);o[s(476)](String.fromCharCode(h))}return o[s(461)]("")},parse:function(t){for(var s=e,r=t.length,o=[],a=0;a>>1]|=n(t[s(462)](a)<<16-a%2*16);return i[s(479)](o,2*r)}}}(),t[e(481)][e(456)]},(r=ld)(477)==r(477)?t[r(458)]=i(sd):"undefined"===r(455)&&(void 0)[r(467)]?(void 0)([r(468)],i):i(s[r(466)])}));function dd(t,e){var s=ud();return(dd=function(t,e){return s[t-=169]})(t,e)}function ud(){var t=["4BRNLsH","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","create","2487600Jcvhxk","448402hOFzpD","charAt","281835DMswsA","join","8014864ypElIX","4850270vsPKfu","CryptoJS","WordArray","_reverseMap","70QRwMqB","charCodeAt","commonjsGlobal","enc","push","lib","amd","228enNbNn","length","object","_map","exports","indexOf","./core","66jdndJm","words","30027LrevWk","56936pSIMYz"];return(ud=function(){return t})()}!function(t,e){for(var s=dd,i=t();;)try{if(497501===parseInt(s(199))/1*(parseInt(s(172))/2)+-parseInt(s(197))/3*(parseInt(s(188))/4)+-parseInt(s(174))/5*(-parseInt(s(195))/6)+parseInt(s(181))/7*(parseInt(s(198))/8)+-parseInt(s(171))/9+parseInt(s(177))/10+-parseInt(s(176))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ud);Zt((function(t,e){var s,i,r,n=dd;s=$t[n(183)],i=function(t){var e,s,i,r=n;return i=(s=t)[(e=dd)(186)][e(179)],s[e(184)].Base64={stringify:function(t){var s=e,i=t[s(196)],r=t.sigBytes,n=this[s(191)];t.clamp();for(var o=[],a=0;a>>2]>>>24-a%4*8&255)<<16|(i[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|i[a+2>>>2]>>>24-(a+2)%4*8&255,c=0;c<4&&a+.75*c>>6*(3-c)&63));var l=n.charAt(64);if(l)for(;o[s(189)]%4;)o[s(185)](l);return o[s(175)]("")},parse:function(t){var s=e,r=t[s(189)],n=this[s(191)],o=this[s(180)];if(!o){o=this[s(180)]=[];for(var a=0;a>>6-h%4*2;o[a>>>2]|=c<<24-a%4*8,a++}return i[n(170)](o,a)}(t,r,o)},_map:e(169)},t[r(184)].Base64},(r=dd)(190)==r(190)?t[r(192)]=i(sd):i(s[r(178)])}));var pd=fd;function fd(t,e){var s=md();return(fd=function(t,e){return s[t-=283]})(t,e)}!function(t,e){for(var s=fd,i=t();;)try{if(393606===parseInt(s(289))/1*(-parseInt(s(286))/2)+-parseInt(s(312))/3*(-parseInt(s(307))/4)+-parseInt(s(315))/5+parseInt(s(283))/6*(parseInt(s(294))/7)+parseInt(s(303))/8+-parseInt(s(301))/9*(-parseInt(s(309))/10)+-parseInt(s(302))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(md);$t[pd(314)]((function(t,e){var s,i,r,n=pd;s=$t[n(313)],i=function(t){var e,s,i,r=n;return e=fd,i=(s=t).lib[e(306)],s[e(288)][e(304)]={stringify:function(t,s){var i=e;void 0===s&&(s=!0);var r=t[i(293)],n=t[i(305)],o=s?this[i(285)]:this._map;t[i(291)]();for(var a=[],h=0;h>>2]>>>24-h%4*8&255)<<16|(r[h+1>>>2]>>>24-(h+1)%4*8&255)<<8|r[h+2>>>2]>>>24-(h+2)%4*8&255,l=0;l<4&&h+.75*l>>6*(3-l)&63));var d=o[i(298)](64);if(d)for(;a[i(290)]%4;)a.push(d);return a.join("")},parse:function(t,s){var r=e;void 0===s&&(s=!0);var n=t[r(290)],o=s?this[r(285)]:this[r(297)],a=this._reverseMap;if(!a){a=this[r(308)]=[];for(var h=0;h>>6-h%4*2;o[a>>>2]|=c<<24-a%4*8,a++}return i.create(o,a)}(t,n,a)},_map:e(295),_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},t[r(288)].Base64url},(r=fd)(311)==r(311)?t[r(287)]=i(sd):i(s[r(300)])}));function md(){var t=["2142905MAcyli","2943858gBJuav","indexOf","_safe_map","274494jZxEii","exports","enc","1AcUDyZ","length","clamp","amd","words","7VrGdgW","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","./core","_map","charAt","push","CryptoJS","27wmnTMj","17893997GipxSE","6291048AjQNCV","Base64url","sigBytes","WordArray","717128ATvyye","_reverseMap","2570970ydAIyl","charCodeAt","object","9UwrqEG","commonjsGlobal","createCommonjsModule"];return(md=function(){return t})()}function gd(t,e){var s=yd();return(gd=function(t,e){return s[t-=243]})(t,e)}var Ad=gd;!function(t,e){for(var s=gd,i=t();;)try{if(316453===parseInt(s(254))/1+parseInt(s(266))/2*(-parseInt(s(257))/3)+-parseInt(s(250))/4*(-parseInt(s(269))/5)+parseInt(s(251))/6*(parseInt(s(252))/7)+-parseInt(s(253))/8+-parseInt(s(260))/9+parseInt(s(249))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(yd);$t[Ad(261)]((function(t,e){var s,i,r;s=Jt,i=function(t){var e=gd;return function(e){var s=gd,i=t,r=i[s(270)],n=r.WordArray,o=r.Hasher,a=i[s(265)],h=[];!function(){for(var t=s,i=0;i<64;i++)h[i]=4294967296*e[t(247)](e[t(271)](i+1))|0}();var c=a[s(243)]=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var i=s,r=0;r<16;r++){var n=e+r,o=t[n];t[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a=this[i(245)].words,c=t[e+0],f=t[e+1],m=t[e+2],g=t[e+3],A=t[e+4],y=t[e+5],b=t[e+6],v=t[e+7],S=t[e+8],w=t[e+9],E=t[e+10],I=t[e+11],T=t[e+12],k=t[e+13],_=t[e+14],C=t[e+15],R=a[0],D=a[1],L=a[2],x=a[3];R=l(R,D,L,x,c,7,h[0]),x=l(x,R,D,L,f,12,h[1]),L=l(L,x,R,D,m,17,h[2]),D=l(D,L,x,R,g,22,h[3]),R=l(R,D,L,x,A,7,h[4]),x=l(x,R,D,L,y,12,h[5]),L=l(L,x,R,D,b,17,h[6]),D=l(D,L,x,R,v,22,h[7]),R=l(R,D,L,x,S,7,h[8]),x=l(x,R,D,L,w,12,h[9]),L=l(L,x,R,D,E,17,h[10]),D=l(D,L,x,R,I,22,h[11]),R=l(R,D,L,x,T,7,h[12]),x=l(x,R,D,L,k,12,h[13]),L=l(L,x,R,D,_,17,h[14]),R=d(R,D=l(D,L,x,R,C,22,h[15]),L,x,f,5,h[16]),x=d(x,R,D,L,b,9,h[17]),L=d(L,x,R,D,I,14,h[18]),D=d(D,L,x,R,c,20,h[19]),R=d(R,D,L,x,y,5,h[20]),x=d(x,R,D,L,E,9,h[21]),L=d(L,x,R,D,C,14,h[22]),D=d(D,L,x,R,A,20,h[23]),R=d(R,D,L,x,w,5,h[24]),x=d(x,R,D,L,_,9,h[25]),L=d(L,x,R,D,g,14,h[26]),D=d(D,L,x,R,S,20,h[27]),R=d(R,D,L,x,k,5,h[28]),x=d(x,R,D,L,m,9,h[29]),L=d(L,x,R,D,v,14,h[30]),R=u(R,D=d(D,L,x,R,T,20,h[31]),L,x,y,4,h[32]),x=u(x,R,D,L,S,11,h[33]),L=u(L,x,R,D,I,16,h[34]),D=u(D,L,x,R,_,23,h[35]),R=u(R,D,L,x,f,4,h[36]),x=u(x,R,D,L,A,11,h[37]),L=u(L,x,R,D,v,16,h[38]),D=u(D,L,x,R,E,23,h[39]),R=u(R,D,L,x,k,4,h[40]),x=u(x,R,D,L,c,11,h[41]),L=u(L,x,R,D,g,16,h[42]),D=u(D,L,x,R,b,23,h[43]),R=u(R,D,L,x,w,4,h[44]),x=u(x,R,D,L,T,11,h[45]),L=u(L,x,R,D,C,16,h[46]),R=p(R,D=u(D,L,x,R,m,23,h[47]),L,x,c,6,h[48]),x=p(x,R,D,L,v,10,h[49]),L=p(L,x,R,D,_,15,h[50]),D=p(D,L,x,R,y,21,h[51]),R=p(R,D,L,x,T,6,h[52]),x=p(x,R,D,L,g,10,h[53]),L=p(L,x,R,D,E,15,h[54]),D=p(D,L,x,R,f,21,h[55]),R=p(R,D,L,x,S,6,h[56]),x=p(x,R,D,L,C,10,h[57]),L=p(L,x,R,D,b,15,h[58]),D=p(D,L,x,R,k,21,h[59]),R=p(R,D,L,x,A,6,h[60]),x=p(x,R,D,L,I,10,h[61]),L=p(L,x,R,D,m,15,h[62]),D=p(D,L,x,R,w,21,h[63]),a[0]=a[0]+R|0,a[1]=a[1]+D|0,a[2]=a[2]+L|0,a[3]=a[3]+x|0},_doFinalize:function(){var t=s,i=this[t(256)],r=i.words,n=8*this[t(262)],o=8*i.sigBytes;r[o>>>5]|=128<<24-o%32;var a=e[t(244)](n/4294967296),h=n;r[15+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(o+64>>>9<<4)]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),i[t(264)]=4*(r[t(259)]+1),this._process();for(var c=this[t(245)],l=c[t(255)],d=0;d<4;d++){var u=l[d];l[d]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return c},clone:function(){var t=s,e=o[t(268)].call(this);return e[t(245)]=this[t(245)][t(268)](),e}});function l(t,e,s,i,r,n,o){var a=t+(e&s|~e&i)+r+o;return(a<>>32-n)+e}function d(t,e,s,i,r,n,o){var a=t+(e&i|s&~i)+r+o;return(a<>>32-n)+e}function u(t,e,s,i,r,n,o){var a=t+(e^s^i)+r+o;return(a<>>32-n)+e}function p(t,e,s,i,r,n,o){var a=t+(s^(e|~i))+r+o;return(a<>>32-n)+e}i[s(243)]=o[s(272)](c),i[s(258)]=o[s(267)](c)}(Math),t[e(243)]},"object"===(r=gd)(263)?t[r(248)]=i(sd):"undefined"===r(246)&&(void 0).amd?(void 0)(["./core"],i):i(s.CryptoJS)}));function yd(){var t=["4774779uxbDuA","createCommonjsModule","_nDataBytes","object","sigBytes","algo","93794lUvKmp","_createHmacHelper","clone","5VaXewu","lib","sin","_createHelper","MD5","floor","_hash","function","abs","exports","7134810AHBUff","1021416dOYJae","12VJjprg","358687BDzSDM","2461656ZMXDIv","130271UVjfKj","words","_data","3qtUqkD","HmacMD5","length"];return(yd=function(){return t})()}function bd(t,e){var s=Sd();return(bd=function(t,e){return s[t-=291]})(t,e)}var vd=bd;!function(t,e){for(var s=bd,i=t();;)try{if(254316===parseInt(s(305))/1+-parseInt(s(291))/2*(-parseInt(s(318))/3)+-parseInt(s(325))/4*(-parseInt(s(300))/5)+-parseInt(s(317))/6*(-parseInt(s(302))/7)+parseInt(s(311))/8*(parseInt(s(299))/9)+-parseInt(s(307))/10+-parseInt(s(293))/11*(parseInt(s(301))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Sd);$t[vd(298)]((function(t,e){var s,i,r,n=vd;s=$t[n(297)],i=function(t){var e,s,i,r,o,a,h,c,l=n;return e=bd,i=(s=t).lib,r=i[e(316)],o=i[e(308)],a=s[e(303)],h=[],c=a[e(310)]=o[e(295)]({_doReset:function(){this[e(309)]=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,s){for(var i=this[e(309)].words,r=i[0],n=i[1],o=i[2],a=i[3],c=i[4],l=0;l<80;l++){if(l<16)h[l]=0|t[s+l];else{var d=h[l-3]^h[l-8]^h[l-14]^h[l-16];h[l]=d<<1|d>>>31}var u=(r<<5|r>>>27)+c+h[l];u+=l<20?1518500249+(n&o|~n&a):l<40?1859775393+(n^o^a):l<60?(n&o|n&a|o&a)-1894007588:(n^o^a)-899497514,c=a,a=o,o=n<<30|n>>>2,n=r,r=u}i[0]=i[0]+r|0,i[1]=i[1]+n|0,i[2]=i[2]+o|0,i[3]=i[3]+a|0,i[4]=i[4]+c|0},_doFinalize:function(){var t=e,s=this[t(320)],i=s[t(321)],r=8*this[t(315)],n=8*s[t(323)];return i[n>>>5]|=128<<24-n%32,i[14+(n+64>>>9<<4)]=Math[t(314)](r/4294967296),i[15+(n+64>>>9<<4)]=r,s.sigBytes=4*i.length,this[t(313)](),this[t(309)]},clone:function(){var t=e,s=o[t(312)][t(292)](this);return s[t(309)]=this[t(309)][t(312)](),s}}),s[e(310)]=o._createHelper(c),s[e(304)]=o[e(322)](c),t[l(310)]},"object"===(r=bd)(294)?t.exports=i(sd):"undefined"===r(319)&&(void 0)[r(324)]?(void 0)([r(296)],i):i(s[r(306)])}));function Sd(){var t=["SHA1","8jrvRrt","clone","_process","floor","_nDataBytes","WordArray","563928CAnBhV","9Yyxgqm","function","_data","words","_createHmacHelper","sigBytes","amd","131668oYiVWf","319546jJwAxe","call","9930371zpNwfN","object","extend","./core","commonjsGlobal","createCommonjsModule","1017207KuellO","65nxkiVc","12mCoddL","7dSDPci","algo","HmacSHA1","213952DxyXgF","CryptoJS","1711260UXdGOa","Hasher","_hash"];return(Sd=function(){return t})()}var wd=Ed;function Ed(t,e){var s=Id();return(Ed=function(t,e){return s[t-=449]})(t,e)}!function(t,e){for(var s=Ed,i=t();;)try{if(905660===parseInt(s(453))/1+-parseInt(s(476))/2+parseInt(s(472))/3+parseInt(s(480))/4+-parseInt(s(462))/5+parseInt(s(455))/6*(parseInt(s(475))/7)+parseInt(s(464))/8)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Id);$t[wd(477)]((function(t,e){var s,i,r,n=wd;s=$t[n(481)],i=function(t){var e=n;return function(e){var s=Ed,i=t,r=i[s(470)],n=r[s(463)],o=r.Hasher,a=i[s(468)],h=[],c=[];!function(){var t=s;function i(t){for(var s=e.sqrt(t),i=2;i<=s;i++)if(!(t%i))return!1;return!0}function r(t){return 4294967296*(t-(0|t))|0}for(var n=2,o=0;o<64;)i(n)&&(o<8&&(h[o]=r(e[t(458)](n,.5))),c[o]=r(e[t(458)](n,1/3)),o++),n++}();var l=[],d=a.SHA256=o[s(451)]({_doReset:function(){var t=s;this[t(474)]=new(n[t(466)])(h.slice(0))},_doProcessBlock:function(t,e){for(var i=s,r=this[i(474)][i(449)],n=r[0],o=r[1],a=r[2],h=r[3],d=r[4],u=r[5],p=r[6],f=r[7],m=0;m<64;m++){if(m<16)l[m]=0|t[e+m];else{var g=l[m-15],A=(g<<25|g>>>7)^(g<<14|g>>>18)^g>>>3,y=l[m-2],b=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;l[m]=A+l[m-7]+b+l[m-16]}var v=n&o^n&a^o&a,S=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=f+((d<<26|d>>>6)^(d<<21|d>>>11)^(d<<7|d>>>25))+(d&u^~d&p)+c[m]+l[m];f=p,p=u,u=d,d=h+w|0,h=a,a=o,o=n,n=w+(S+v)|0}r[0]=r[0]+n|0,r[1]=r[1]+o|0,r[2]=r[2]+a|0,r[3]=r[3]+h|0,r[4]=r[4]+d|0,r[5]=r[5]+u|0,r[6]=r[6]+p|0,r[7]=r[7]+f|0},_doFinalize:function(){var t=s,i=this[t(471)],r=i.words,n=8*this[t(467)],o=8*i[t(450)];return r[o>>>5]|=128<<24-o%32,r[14+(o+64>>>9<<4)]=e[t(469)](n/4294967296),r[15+(o+64>>>9<<4)]=n,i.sigBytes=4*r[t(478)],this[t(479)](),this[t(474)]},clone:function(){var t=s,e=o[t(473)][t(457)](this);return e[t(474)]=this[t(474)].clone(),e}});i[s(460)]=o[s(452)](d),i[s(465)]=o[s(456)](d)}(Math),t[e(460)]},(r=Ed)(459)==r(459)?t.exports=i(sd):"undefined"===r(461)&&(void 0).amd?(void 0)(["./core"],i):i(s[r(454)])}));function Id(){var t=["init","_nDataBytes","algo","floor","lib","_data","1158351rcxRro","clone","_hash","7bDAoaO","3038082EFuMyZ","createCommonjsModule","length","_process","2359432PvYRUv","commonjsGlobal","words","sigBytes","extend","_createHelper","1556886XaogKY","CryptoJS","279228HvFmkM","_createHmacHelper","call","pow","object","SHA256","function","3327150ccPwFs","WordArray","4085856hMozjJ","HmacSHA256"];return(Id=function(){return t})()}var Td=kd;!function(t,e){for(var s=kd,i=t();;)try{if(830027===-parseInt(s(284))/1*(parseInt(s(282))/2)+parseInt(s(298))/3*(parseInt(s(283))/4)+-parseInt(s(299))/5+parseInt(s(308))/6+parseInt(s(281))/7*(parseInt(s(300))/8)+parseInt(s(296))/9+-parseInt(s(301))/10*(parseInt(s(307))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(_d);$t[Td(295)]((function(t,e){var s,i,r;s=Jt,i=function(t){var e,s,i,r,n,o,a=kd;return i=(s=t)[(e=kd)(303)][e(297)],r=s[e(288)],n=r[e(304)],o=r[e(287)]=n.extend({_doReset:function(){var t=e;this._hash=new(i[t(305)])([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=e,s=n._doFinalize[t(306)](this);return s.sigBytes-=4,s}}),s[e(287)]=n[e(290)](o),s[e(293)]=n[e(289)](o),t[a(287)]},(r=kd)(286)==r(286)?t[r(294)]=i(sd):"undefined"===r(285)&&(void 0)[r(302)]?(void 0)(["./core",r(291)],i):i(s[r(292)])}));function kd(t,e){var s=_d();return(kd=function(t,e){return s[t-=281]})(t,e)}function _d(){var t=["./sha256","CryptoJS","HmacSHA224","exports","createCommonjsModule","12427308YAmETG","WordArray","3MsLuXY","4569105fuGcqO","8BpTMMQ","5179670rtomHB","amd","lib","SHA256","init","call","11QaHWEf","6600132jXgOTM","1037253kYVGWU","548474qGFIIt","1822052ZEEnEI","3UUCBrJ","function","object","SHA224","algo","_createHmacHelper","_createHelper"];return(_d=function(){return t})()}var Cd=Dd;function Rd(){var t=["1523272TTPkGa","4933620wntjla","HmacSHA512","_hash","init","clone","low","_createHelper","extend","_createHmacHelper","./core","_nDataBytes","447792LagBVG","toX32","9090438cYFlSd","54jnlMdz","high","sigBytes","length","_data","lib","apply","1538358IhZMwX","call","831650JExFat","WordArray","12cSwDOa","createCommonjsModule","exports","function","4030614SRVuwI","commonjsGlobal","_process","floor","Hasher","SHA512","object","words","./x64-core","Word"];return(Rd=function(){return t})()}function Dd(t,e){var s=Rd();return(Dd=function(t,e){return s[t-=391]})(t,e)}!function(t,e){for(var s=Dd,i=t();;)try{if(661636===-parseInt(s(404))/1+-parseInt(s(402))/2+-parseInt(s(406))/3*(-parseInt(s(392))/4)+parseInt(s(421))/5+parseInt(s(410))/6+parseInt(s(394))/7+parseInt(s(420))/8*(-parseInt(s(395))/9))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Rd);$t[Cd(407)]((function(t,e){var s,i,r,n=Cd;s=$t[n(411)],i=function(t){var e=n;return function(){var e=Dd,s=t,i=s[e(400)][e(414)],r=s.x64,n=r[e(419)],o=r[e(405)],a=s.algo;function h(){var t=e;return n.create[t(401)](n,arguments)}var c=[h(1116352408,3609767458),h(1899447441,602891725),h(3049323471,3964484399),h(3921009573,2173295548),h(961987163,4081628472),h(1508970993,3053834265),h(2453635748,2937671579),h(2870763221,3664609560),h(3624381080,2734883394),h(310598401,1164996542),h(607225278,1323610764),h(1426881987,3590304994),h(1925078388,4068182383),h(2162078206,991336113),h(2614888103,633803317),h(3248222580,3479774868),h(3835390401,2666613458),h(4022224774,944711139),h(264347078,2341262773),h(604807628,2007800933),h(770255983,1495990901),h(1249150122,1856431235),h(1555081692,3175218132),h(1996064986,2198950837),h(2554220882,3999719339),h(2821834349,766784016),h(2952996808,2566594879),h(3210313671,3203337956),h(3336571891,1034457026),h(3584528711,2466948901),h(113926993,3758326383),h(338241895,168717936),h(666307205,1188179964),h(773529912,1546045734),h(1294757372,1522805485),h(1396182291,2643833823),h(1695183700,2343527390),h(1986661051,1014477480),h(2177026350,1206759142),h(2456956037,344077627),h(2730485921,1290863460),h(2820302411,3158454273),h(3259730800,3505952657),h(3345764771,106217008),h(3516065817,3606008344),h(3600352804,1432725776),h(4094571909,1467031594),h(275423344,851169720),h(430227734,3100823752),h(506948616,1363258195),h(659060556,3750685593),h(883997877,3785050280),h(958139571,3318307427),h(1322822218,3812723403),h(1537002063,2003034995),h(1747873779,3602036899),h(1955562222,1575990012),h(2024104815,1125592928),h(2227730452,2716904306),h(2361852424,442776044),h(2428436474,593698344),h(2756734187,3733110249),h(3204031479,2999351573),h(3329325298,3815920427),h(3391569614,3928383900),h(3515267271,566280711),h(3940187606,3454069534),h(4118630271,4000239992),h(116418474,1914138554),h(174292421,2731055270),h(289380356,3203993006),h(460393269,320620315),h(685471733,587496836),h(852142971,1086792851),h(1017036298,365543100),h(1126000580,2618297676),h(1288033470,3409855158),h(1501505948,4234509866),h(1607167915,987167468),h(1816402316,1246189591)],l=[];!function(){for(var t=0;t<80;t++)l[t]=h()}();var d=a.SHA512=i[e(428)]({_doReset:function(){var t=e;this[t(423)]=new(o[t(424)])([new n.init(1779033703,4089235720),new(n[t(424)])(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new(n[t(424)])(1359893119,2917565137),new(n[t(424)])(2600822924,725511199),new(n[t(424)])(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(t,s){for(var i=e,r=this[i(423)][i(417)],n=r[0],o=r[1],a=r[2],h=r[3],d=r[4],u=r[5],p=r[6],f=r[7],m=n.high,g=n[i(426)],A=o.high,y=o.low,b=a[i(396)],v=a[i(426)],S=h[i(396)],w=h[i(426)],E=d[i(396)],I=d[i(426)],T=u.high,k=u[i(426)],_=p[i(396)],C=p[i(426)],R=f[i(396)],D=f[i(426)],L=m,x=g,P=A,B=y,M=b,F=v,O=S,U=w,N=E,j=I,V=T,z=k,G=_,W=C,H=R,K=D,Q=0;Q<80;Q++){var Y,q,J=l[Q];if(Q<16)q=J[i(396)]=0|t[s+2*Q],Y=J[i(426)]=0|t[s+2*Q+1];else{var X=l[Q-15],Z=X[i(396)],$=X.low,tt=(Z>>>1|$<<31)^(Z>>>8|$<<24)^Z>>>7,et=($>>>1|Z<<31)^($>>>8|Z<<24)^($>>>7|Z<<25),st=l[Q-2],it=st[i(396)],rt=st.low,nt=(it>>>19|rt<<13)^(it<<3|rt>>>29)^it>>>6,ot=(rt>>>19|it<<13)^(rt<<3|it>>>29)^(rt>>>6|it<<26),at=l[Q-7],ht=at.high,ct=at[i(426)],lt=l[Q-16],dt=lt[i(396)],ut=lt.low;q=(q=(q=tt+ht+((Y=et+ct)>>>0>>0?1:0))+nt+((Y+=ot)>>>0>>0?1:0))+dt+((Y+=ut)>>>0>>0?1:0),J[i(396)]=q,J[i(426)]=Y}var pt,ft=N&V^~N&G,mt=j&z^~j&W,gt=L&P^L&M^P&M,At=x&B^x&F^B&F,yt=(L>>>28|x<<4)^(L<<30|x>>>2)^(L<<25|x>>>7),bt=(x>>>28|L<<4)^(x<<30|L>>>2)^(x<<25|L>>>7),vt=(N>>>14|j<<18)^(N>>>18|j<<14)^(N<<23|j>>>9),St=(j>>>14|N<<18)^(j>>>18|N<<14)^(j<<23|N>>>9),wt=c[Q],Et=wt[i(396)],It=wt[i(426)],Tt=H+vt+((pt=K+St)>>>0>>0?1:0),kt=bt+At;H=G,K=W,G=V,W=z,V=N,z=j,N=O+(Tt=(Tt=(Tt=Tt+ft+((pt+=mt)>>>0>>0?1:0))+Et+((pt+=It)>>>0>>0?1:0))+q+((pt+=Y)>>>0>>0?1:0))+((j=U+pt|0)>>>0>>0?1:0)|0,O=M,U=F,M=P,F=B,P=L,B=x,L=Tt+(yt+gt+(kt>>>0>>0?1:0))+((x=pt+kt|0)>>>0>>0?1:0)|0}g=n[i(426)]=g+x,n[i(396)]=m+L+(g>>>0>>0?1:0),y=o[i(426)]=y+B,o[i(396)]=A+P+(y>>>0>>0?1:0),v=a[i(426)]=v+F,a[i(396)]=b+M+(v>>>0>>0?1:0),w=h.low=w+U,h.high=S+O+(w>>>0>>0?1:0),I=d[i(426)]=I+j,d.high=E+N+(I>>>0>>0?1:0),k=u.low=k+z,u[i(396)]=T+V+(k>>>0>>0?1:0),C=p[i(426)]=C+W,p.high=_+G+(C>>>0>>0?1:0),D=f.low=D+K,f[i(396)]=R+H+(D>>>0>>0?1:0)},_doFinalize:function(){var t=e,s=this[t(399)],i=s[t(417)],r=8*this[t(391)],n=8*s.sigBytes;return i[n>>>5]|=128<<24-n%32,i[30+(n+128>>>10<<5)]=Math[t(413)](r/4294967296),i[31+(n+128>>>10<<5)]=r,s[t(397)]=4*i[t(398)],this[t(412)](),this._hash[t(393)]()},clone:function(){var t=e,s=i[t(425)][t(403)](this);return s[t(423)]=this[t(423)][t(425)](),s},blockSize:32});s[e(415)]=i[e(427)](d),s[e(422)]=i[e(429)](d)}(),t[e(415)]},(r=Dd)(416)==r(416)?t[r(408)]=i(sd):"undefined"===r(409)&&(void 0).amd?(void 0)([r(430),r(418)],i):i(s.CryptoJS)}));var Ld=Pd;function xd(){var t=["634275woojvU","12510ShdDGY","6662080fhsCZs","SHA512","9QvLYVx","HmacSHA384","./sha512","SHA384","174652jZeypr","163449uyQmJl","call","1224856fIYKWR","./x64-core","exports","Word","function","1379bLZcSI","25EYJuls","createCommonjsModule","sigBytes","x64","_createHmacHelper","_createHelper","72214mLOtvo","_hash","./core","algo","WordArray","init","object"];return(xd=function(){return t})()}function Pd(t,e){var s=xd();return(Pd=function(t,e){return s[t-=431]})(t,e)}!function(t,e){for(var s=Pd,i=t();;)try{if(205602===-parseInt(s(439))/1+parseInt(s(453))/2*(parseInt(s(434))/3)+parseInt(s(438))/4*(-parseInt(s(447))/5)+-parseInt(s(431))/6*(parseInt(s(446))/7)+parseInt(s(441))/8+parseInt(s(460))/9+parseInt(s(432))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(xd);$t[Ld(448)]((function(t,e){var s,i,r;s=Jt,i=function(t){return i=(s=t)[(e=Pd)(450)],r=i[e(444)],n=i[e(457)],o=s[e(456)],a=o[e(433)],h=o[e(437)]=a.extend({_doReset:function(){var t=e;this[t(454)]=new(n[t(458)])([new r.init(3418070365,3238371032),new(r[t(458)])(1654270250,914150663),new(r[t(458)])(2438529370,812702999),new r.init(355462360,4144912697),new(r[t(458)])(1731405415,4290775857),new r.init(2394180231,1750603025),new(r[t(458)])(3675008525,1694076839),new(r[t(458)])(1203062813,3204075428)])},_doFinalize:function(){var t=e,s=a._doFinalize[t(440)](this);return s[t(449)]-=16,s}}),s[e(437)]=a[e(452)](h),s[e(435)]=a[e(451)](h),t.SHA384;var e,s,i,r,n,o,a,h},(r=Pd)(459)==r(459)?t[r(443)]=i(sd):"undefined"===r(445)&&(void 0).amd?(void 0)([r(455),r(442),r(436)],i):i(s.CryptoJS)}));function Bd(t,e){var s=Md();return(Bd=function(t,e){return s[t-=355]})(t,e)}function Md(){var t=["high","slice","4gsXoIe","_createHelper","9Welvuu","7802CWnYrJ","length","cfg","object","SHA3","_state","lib","WordArray","low","48oXxHlJ","18152156zAlEuv","Word","_data","x64","17hfNrJt","push","words","100723VSZbEL","./core","init","blockSize","call","extend","727700MgmPJx","_process","CryptoJS","amd","6581270QTDZZr","function","11215248ZmHzFs","4432173PObkqE","Hasher","exports","_nDataBytes","clone","create","commonjsGlobal","algo"];return(Md=function(){return t})()}!function(t,e){for(var s=Bd,i=t();;)try{if(740585===-parseInt(s(356))/1*(parseInt(s(385))/2)+parseInt(s(372))/3*(parseInt(s(382))/4)+-parseInt(s(365))/5+-parseInt(s(394))/6*(parseInt(s(359))/7)+-parseInt(s(371))/8+parseInt(s(384))/9*(-parseInt(s(369))/10)+parseInt(s(395))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Md);Zt((function(t,e){var s,i,r,n=Bd;s=$t[n(378)],i=function(t){var e=n;return function(e){var s=Bd,i=t,r=i[s(391)],n=r[s(392)],o=r[s(373)],a=i[s(355)][s(396)],h=i[s(379)],c=[],l=[],d=[];!function(){for(var t=s,e=1,i=0,r=0;r<24;r++){c[e+5*i]=(r+1)*(r+2)/2%64;var n=(2*e+3*i)%5;e=i%5,i=n}for(e=0;e<5;e++)for(i=0;i<5;i++)l[e+5*i]=i+(2*e+3*i)%5*5;for(var o=1,h=0;h<24;h++){for(var u=0,p=0,f=0;f<7;f++){if(1&o){var m=(1<>>24)|4278255360&(a<<24|a>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),(D=r[o])[i(380)]^=h,D[i(393)]^=a}for(var p=0;p<24;p++){for(var f=0;f<5;f++){for(var m=0,g=0,A=0;A<5;A++)m^=(D=r[f+5*A])[i(380)],g^=D[i(393)];var y=u[f];y[i(380)]=m,y[i(393)]=g}for(f=0;f<5;f++){var b=u[(f+4)%5],v=u[(f+1)%5],S=v.high,w=v[i(393)];for(m=b[i(380)]^(S<<1|w>>>31),g=b.low^(w<<1|S>>>31),A=0;A<5;A++)(D=r[f+5*A])[i(380)]^=m,D[i(393)]^=g}for(var E=1;E<25;E++){var I=(D=r[E])[i(380)],T=D.low,k=c[E];k<32?(m=I<>>32-k,g=T<>>32-k):(m=T<>>64-k,g=I<>>64-k);var _=u[l[E]];_.high=m,_.low=g}var C=u[0],R=r[0];for(C[i(380)]=R[i(380)],C[i(393)]=R[i(393)],f=0;f<5;f++)for(A=0;A<5;A++){var D=r[E=f+5*A],L=u[E],x=u[(f+1)%5+5*A],P=u[(f+2)%5+5*A];D[i(380)]=L[i(380)]^~x.high&P[i(380)],D[i(393)]=L[i(393)]^~x[i(393)]&P[i(393)]}D=r[0];var B=d[p];D[i(380)]^=B[i(380)],D[i(393)]^=B.low}},_doFinalize:function(){var t=s,i=this[t(397)],r=i[t(358)];this[t(375)];var o=8*i.sigBytes,a=32*this[t(362)];r[o>>>5]|=1<<24-o%32,r[(e.ceil((o+1)/a)*a>>>5)-1]|=128,i.sigBytes=4*r[t(386)],this[t(366)]();for(var h=this[t(390)],c=this[t(387)].outputLength/8,l=c/8,d=[],u=0;u>>24)|4278255360&(f<<24|f>>>8),m=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),d[t(357)](m),d.push(f)}return new(n[t(361)])(d,c)},clone:function(){for(var t=s,e=o[t(376)][t(363)](this),i=e[t(390)]=this[t(390)][t(381)](0),r=0;r<25;r++)i[r]=i[r].clone();return e}});i[s(389)]=o[s(383)](p),i.HmacSHA3=o._createHmacHelper(p)}(Math),t[e(389)]},"object"===(r=Bd)(388)?t[r(374)]=i(sd):"undefined"===r(370)&&(void 0)[r(368)]?(void 0)([r(360),"./x64-core"],i):i(s[r(367)])}));function Fd(){var t=["1404234znpkmG","_process","words","_createHmacHelper","1336772zjZlIk","call","_hash","algo","RIPEMD160","CryptoJS","lib","47029sgFJga","create","171HDnrdZ","WordArray","242627zcMVMH","10TNLMbi","clone","extend","length","625551ZBWdPF","_createHelper","commonjsGlobal","amd","HmacRIPEMD160","function","1010192HNQJot","_nDataBytes","89720pyqKEy","5GWfIoF","Hasher"];return(Fd=function(){return t})()}function Od(t,e){var s=Fd();return(Od=function(t,e){return s[t-=294]})(t,e)}!function(t,e){for(var s=Od,i=t();;)try{if(210201===-parseInt(s(296))/1*(parseInt(s(301))/2)+parseInt(s(305))/3+-parseInt(s(320))/4*(-parseInt(s(314))/5)+parseInt(s(316))/6+-parseInt(s(300))/7+-parseInt(s(311))/8+-parseInt(s(298))/9*(parseInt(s(313))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Fd);Zt((function(t,e){var s;$t[Od(307)],t.exports=(s=sd,function(t){var e=Od,i=s,r=i[e(295)],n=r[e(299)],o=r[e(315)],a=i[e(323)],h=n[e(297)]([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=n[e(297)]([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=n[e(297)]([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=n[e(297)]([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=n[e(297)]([0,1518500249,1859775393,2400959708,2840853838]),p=n.create([1352829926,1548603684,1836072691,2053994217,0]),f=a[e(324)]=o[e(303)]({_doReset:function(){this[e(322)]=n.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,s){for(var i=e,r=0;r<16;r++){var n=s+r,o=t[n];t[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var a,f,S,w,E,I,T,k,_,C,R,D=this[i(322)].words,L=u[i(318)],x=p[i(318)],P=h[i(318)],B=c[i(318)],M=l[i(318)],F=d[i(318)];for(I=a=D[0],T=f=D[1],k=S=D[2],_=w=D[3],C=E=D[4],r=0;r<80;r+=1)R=a+t[s+P[r]]|0,R+=r<16?m(f,S,w)+L[0]:r<32?g(f,S,w)+L[1]:r<48?A(f,S,w)+L[2]:r<64?y(f,S,w)+L[3]:b(f,S,w)+L[4],R=(R=v(R|=0,M[r]))+E|0,a=E,E=w,w=v(S,10),S=f,f=R,R=I+t[s+B[r]]|0,R+=r<16?b(T,k,_)+x[0]:r<32?y(T,k,_)+x[1]:r<48?A(T,k,_)+x[2]:r<64?g(T,k,_)+x[3]:m(T,k,_)+x[4],R=(R=v(R|=0,F[r]))+C|0,I=C,C=_,_=v(k,10),k=T,T=R;R=D[1]+S+_|0,D[1]=D[2]+w+C|0,D[2]=D[3]+E+I|0,D[3]=D[4]+a+T|0,D[4]=D[0]+f+k|0,D[0]=R},_doFinalize:function(){var t=e,s=this._data,i=s[t(318)],r=8*this[t(312)],n=8*s.sigBytes;i[n>>>5]|=128<<24-n%32,i[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),s.sigBytes=4*(i[t(304)]+1),this[t(317)]();for(var o=this[t(322)],a=o.words,h=0;h<5;h++){var c=a[h];a[h]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return o},clone:function(){var t=e,s=o[t(302)][t(321)](this);return s[t(322)]=this._hash[t(302)](),s}});function m(t,e,s){return t^e^s}function g(t,e,s){return t&e|~t&s}function A(t,e,s){return(t|~e)^s}function y(t,e,s){return t&s|e&~s}function b(t,e,s){return t^(e|~s)}function v(t,e){return t<>>32-e}i[e(324)]=o[e(306)](f),i[e(309)]=o[e(319)](f)}(),s.RIPEMD160)}));var Ud=jd;!function(t,e){for(var s=jd,i=t();;)try{if(428520===-parseInt(s(488))/1*(parseInt(s(489))/2)+-parseInt(s(497))/3+parseInt(s(485))/4+parseInt(s(494))/5+parseInt(s(474))/6*(parseInt(s(493))/7)+parseInt(s(480))/8*(parseInt(s(498))/9)+parseInt(s(468))/10*(-parseInt(s(472))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Nd);$t[Ud(495)]((function(t,e){var s,i,r;s=Jt,i=function(t){var e,s,i,r;i=(s=t)[(e=jd)(475)][e(484)],r=s[e(499)][e(477)],s[e(476)].HMAC=i.extend({init:function(t,s){var i=e;t=this._hasher=new(t[i(473)]),typeof s==i(487)&&(s=r[i(478)](s));var n=t[i(491)],o=4*n;s[i(467)]>o&&(s=t[i(483)](s)),s[i(471)]();for(var a=this[i(482)]=s[i(469)](),h=this._iKey=s[i(469)](),c=a[i(496)],l=h[i(496)],d=0;d>>2];t[e(332)]-=i}};r.BlockCipher=d[s(337)]({cfg:d[s(371)].extend({mode:f,padding:m}),reset:function(){var t,e=s;d[e(305)][e(354)](this);var i=this[e(371)],r=i.iv,n=i[e(348)];this[e(319)]==this[e(358)]?t=n.createEncryptor:(t=n.createDecryptor,this[e(336)]=1),this[e(334)]&&this[e(334)].__creator==t?this[e(334)][e(324)](this,r&&r[e(295)]):(this[e(334)]=t[e(354)](n,this,r&&r.words),this._mode[e(366)]=t)},_doProcessBlock:function(t,e){var i=s;this[i(334)][i(364)](t,e)},_doFinalize:function(){var t,e=s,i=this.cfg[e(301)];return this[e(319)]==this[e(358)]?(i.pad(this._data,this[e(310)]),t=this[e(339)](!0)):(t=this._process(!!e(325)),i[e(353)](t)),t},blockSize:4});var g=r[s(347)]=n[s(337)]({init:function(t){this[s(317)](t)},toString:function(t){var e=s;return(t||this[e(330)])[e(341)](this)}}),A=(i.format={})[s(293)]={stringify:function(t){var e=s,i=t[e(297)],r=t.salt;return(r?o[e(340)]([1398893684,1701076831])[e(367)](r)[e(367)](i):i)[e(313)](c)},parse:function(t){var e,i=s,r=c[i(344)](t),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=o[i(340)](n.slice(2,4)),n[i(359)](0,4),r.sigBytes-=16),g[i(340)]({ciphertext:r,salt:e})}},y=r[s(345)]=n[s(337)]({cfg:n[s(337)]({format:A}),encrypt:function(t,e,i,r){var n=s;r=this[n(371)].extend(r);var o=t.createEncryptor(i,r),a=o[n(357)](e),h=o[n(371)];return g.create({ciphertext:a,key:i,iv:h.iv,algorithm:t,mode:h[n(348)],padding:h[n(301)],blockSize:t.blockSize,formatter:r[n(351)]})},decrypt:function(t,e,i,r){var n=s;return r=this[n(371)][n(337)](r),e=this[n(331)](e,r[n(351)]),t.createDecryptor(i,r)[n(357)](e[n(297)])},_parse:function(t,e){var i=s;return typeof t==i(350)?e[i(344)](t,this):t}}),b=(i[s(335)]={}).OpenSSL={execute:function(t,e,i,r,n){var a=s;if(!r&&(r=o[a(343)](8)),n)h=l[a(340)]({keySize:e+i,hasher:n}).compute(t,r);else var h=l[a(340)]({keySize:e+i}).compute(t,r);var c=o.create(h[a(295)][a(363)](e),4*i);return h[a(332)]=4*e,g.create({key:h,iv:c,salt:r})}},v=r.PasswordBasedCipher=y[s(337)]({cfg:y[s(371)][s(337)]({kdf:b}),encrypt:function(t,e,i,r){var n=s,o=(r=this[n(371)][n(337)](r))[n(335)][n(346)](i,t[n(299)],t[n(368)],r[n(362)],r[n(312)]);r.iv=o.iv;var a=y.encrypt.call(this,t,e,o.key,r);return a[n(317)](o),a},decrypt:function(t,e,i,r){var n=s;r=this[n(371)][n(337)](r),e=this._parse(e,r[n(351)]);var o=r[n(335)].execute(i,t[n(299)],t[n(368)],e[n(362)],r[n(312)]);return r.iv=o.iv,y[n(321)][n(354)](this,t,e,o[n(327)],r)}})}()},(r=Qd)(361)==r(361)?t[r(323)]=i(sd):i(s[r(314)])}));function Yd(){var t=["exports","slice","blockSize","1697150zskyfC","_iv","_prevBlock","function","CryptoJS","4839924mXcXDd","Decryptor","4razUTd","886959wBFlay","amd","call","commonjsGlobal","625500oWFhID","./core","CFB","2635260umEwXa","3188259fRvzgE","_cipher","object","createCommonjsModule","7sgupmv","mode","6921QfGDqz","./cipher-core","lib","Encryptor","extend","5608IGJJoq","BlockCipherMode","44evxGDM"];return(Yd=function(){return t})()}var qd=Jd;function Jd(t,e){var s=Yd();return(Jd=function(t,e){return s[t-=110]})(t,e)}!function(t,e){for(var s=Jd,i=t();;)try{if(604321===-parseInt(s(116))/1+parseInt(s(120))/2+parseInt(s(124))/3*(parseInt(s(115))/4)+parseInt(s(123))/5+-parseInt(s(113))/6*(-parseInt(s(128))/7)+-parseInt(s(135))/8*(parseInt(s(130))/9)+parseInt(s(141))/10*(-parseInt(s(137))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Yd);$t[qd(127)]((function(t,e){var s,i,r,n=qd;s=$t[n(119)],i=function(t){var e=n;return t[e(129)].CFB=function(){var s=e,i=t[s(132)][s(136)][s(134)]();function r(t,e,i,r){var n,o=s,a=this[o(142)];a?(n=a.slice(0),this[o(142)]=void 0):n=this[o(110)],r.encryptBlock(n,0);for(var h=0;h>24&255)){var e=t>>16&255,s=t>>8&255,i=255&t;255===e?(e=0,255===s?(s=0,255===i?i=0:++i):++s):++e,t=0,t+=e<<16,t+=s<<8,t+=i}else t+=1<<24;return t}var n=i.Encryptor=i[s(149)]({processBlock:function(t,e){var i,n=s,o=this[n(156)],a=o[n(172)],h=this[n(164)],c=this[n(161)];h&&(c=this[n(161)]=h.slice(0),this[n(164)]=void 0),0===((i=c)[0]=r(i[0]))&&(i[1]=r(i[1]));var l=c[n(151)](0);o[n(153)](l,0);for(var d=0;d>>2]|=o<<24-a%4*8,t[i(489)]+=o},unpad:function(t){var s=e,i=255&t[s(487)][t[s(489)]-1>>>2];t.sigBytes-=i}},t.pad[e(480)]},(r=hu)(485)==r(485)?t[r(486)]=i(sd):i(s.CryptoJS)}));var cu=du;function lu(){var t=["CryptoJS","createCommonjsModule","535AxKAjk","exports","commonjsGlobal","create","./core","13455zllSwz","pad","81DLnIHj","sigBytes","object","2490vlwtZb","154FUApWX","32lCRgYC","lib","Iso10126","21611400zKNydT","amd","function","11903948dbprlN","15385fPjNMn","713050mfERbB","WordArray","273176HBYErt","concat","1242SblkiZ"];return(lu=function(){return t})()}function du(t,e){var s=lu();return(du=function(t,e){return s[t-=460]})(t,e)}!function(t,e){for(var s=du,i=t();;)try{if(943904===-parseInt(s(482))/1*(-parseInt(s(479))/2)+parseInt(s(462))/3*(parseInt(s(477))/4)+parseInt(s(474))/5*(parseInt(s(465))/6)+-parseInt(s(473))/7+parseInt(s(467))/8*(-parseInt(s(460))/9)+parseInt(s(475))/10*(parseInt(s(466))/11)+-parseInt(s(470))/12)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(lu);$t[cu(481)]((function(t,e){var s,i,r,n=cu;s=$t[n(484)],i=function(t){var e=n;return t[e(461)][e(469)]={pad:function(s,i){var r=e,n=4*i,o=n-s.sigBytes%n;s[r(478)](t.lib[r(476)].random(o-1))[r(478)](t[r(468)].WordArray[r(485)]([o<<24],1))},unpad:function(t){var s=e,i=255&t.words[t[s(463)]-1>>>2];t[s(463)]-=i}},t.pad[e(469)]},"object"===(r=du)(464)?t[r(483)]=i(sd):"undefined"===r(472)&&(void 0)[r(471)]?(void 0)([r(486),"./cipher-core"],i):i(s[r(480)])}));var uu=fu;function pu(){var t=["sigBytes","5494049hrCwGf","10enMqDv","Iso97971","create","3447768jZiFpm","pad","7FsjZHT","790086xZgSqU","function","ZeroPadding","880104cGrgJg","./core","443056QatZRX","25RQDcft","CryptoJS","unpad","concat","amd","lib","createCommonjsModule","WordArray","object","8376471nQyclE","1wEfIhK","232788JzYzFO","./cipher-core"];return(pu=function(){return t})()}!function(t,e){for(var s=fu,i=t();;)try{if(788731===parseInt(s(234))/1*(-parseInt(s(250))/2)+parseInt(s(248))/3+parseInt(s(235))/4+-parseInt(s(251))/5*(-parseInt(s(245))/6)+-parseInt(s(244))/7*(parseInt(s(242))/8)+parseInt(s(233))/9+-parseInt(s(239))/10*(parseInt(s(238))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(pu);$t[uu(230)]((function(t,e){var s,i,r;s=Jt,i=function(t){var e=fu;return t[e(243)][e(240)]={pad:function(s,i){var r=e;s[r(227)](t[r(229)][r(231)][r(241)]([2147483648],1)),t[r(243)][r(247)][r(243)](s,i)},unpad:function(s){var i=e;t[i(243)][i(247)][i(253)](s),s[i(237)]--}},t[e(243)][e(240)]},"object"===(r=fu)(232)?t.exports=i(sd):"undefined"===r(246)&&(void 0)[r(228)]?(void 0)([r(249),r(236)],i):i(s[r(252)])}));function fu(t,e){var s=pu();return(fu=function(t,e){return s[t-=227]})(t,e)}var mu=Au;function gu(){var t=["8676070ohsRKq","createCommonjsModule","195992QNNdKx","2ABLMuW","words","925254OVjzzE","578485dpRneg","CryptoJS","441018QRRdzc","pad","ZeroPadding","942qnUAmX","exports","16226smCqFX","sigBytes","commonjsGlobal","992992jQyJGf","126YdUvNX","amd","function","clamp","object"];return(gu=function(){return t})()}function Au(t,e){var s=gu();return(Au=function(t,e){return s[t-=476]})(t,e)}!function(t,e){for(var s=Au,i=t();;)try{if(229782===parseInt(s(484))/1*(-parseInt(s(489))/2)+-parseInt(s(486))/3+parseInt(s(497))/4+-parseInt(s(487))/5+-parseInt(s(492))/6*(parseInt(s(494))/7)+parseInt(s(483))/8*(parseInt(s(476))/9)+parseInt(s(481))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(gu);$t[mu(482)]((function(t,e){var s,i,r,n=mu;s=$t[n(496)],i=function(t){var e=n;return t.pad[e(491)]={pad:function(t,s){var i=e,r=4*s;t[i(479)](),t[i(495)]+=r-(t[i(495)]%r||r)},unpad:function(t){var s=e,i=t[s(485)],r=t[s(495)]-1;for(r=t[s(495)]-1;r>=0;r--)if(i[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},t[e(490)].ZeroPadding},(r=Au)(480)==r(480)?t[r(493)]=i(sd):"undefined"===r(478)&&(void 0)[r(477)]?(void 0)(["./core","./cipher-core"],i):i(s[r(488)])}));function yu(t,e){var s=bu();return(yu=function(t,e){return s[t-=483]})(t,e)}function bu(){var t=["4zHUAeU","1576725LJIJkk","4304XAqkAx","pad","2572866kfIwgC","commonjsGlobal","CryptoJS","object","./cipher-core","408882eDLobC","4013842BKaPDp","NoPadding","647930QTYAar","amd","13419YQHTwd","208184oBnBLG"];return(bu=function(){return t})()}!function(t,e){for(var s=yu,i=t();;)try{if(291258===-parseInt(s(497))/1+parseInt(s(487))/2+parseInt(s(489))/3+parseInt(s(488))/4*(-parseInt(s(484))/5)+parseInt(s(492))/6+parseInt(s(498))/7+-parseInt(s(490))/8*(parseInt(s(486))/9))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(bu);Zt((function(t,e){var s,i,r,n=yu;s=$t[n(493)],i=function(t){var e=n;return t[e(491)][e(483)]={pad:function(){},unpad:function(){}},t[e(491)].NoPadding},(r=yu)(495)==r(495)?t.exports=i(sd):i(s[r(494)])}));var vu=Su;function Su(t,e){var s=wu();return(Su=function(t,e){return s[t-=244]})(t,e)}function wu(){var t=["createCommonjsModule","amd","13416kreMWl","ciphertext","toString","format","commonjsGlobal","exports","1169872JvOiDX","248yYfQWW","90tsHANq","object","Hex","2200599rJjszF","25rVgGSM","8175200Aapttt","CryptoJS","8909782mJJDDI","./cipher-core","create","1139361bwsZPM","298362hzPPeq"];return(wu=function(){return t})()}!function(t,e){for(var s=Su,i=t();;)try{if(755857===-parseInt(s(244))/1+-parseInt(s(254))/2+parseInt(s(248))/3*(parseInt(s(255))/4)+parseInt(s(260))/5*(-parseInt(s(245))/6)+parseInt(s(263))/7+-parseInt(s(261))/8+-parseInt(s(259))/9*(-parseInt(s(256))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(wu);$t[vu(246)]((function(t,e){var s,i,r,n=vu;s=$t[n(252)],i=function(t){var e,s,i,r,o=n;return e=Su,i=(s=t).lib.CipherParams,r=s.enc[e(258)],s[e(251)][e(258)]={stringify:function(t){var s=e;return t[s(249)][s(250)](r)},parse:function(t){var s=e,n=r.parse(t);return i[s(265)]({ciphertext:n})}},t[o(251)].Hex},(r=Su)(257)==r(257)?t[r(253)]=i(sd):i(s[r(262)])}));var Eu=Iu;function Iu(t,e){var s=Tu();return(Iu=function(t,e){return s[t-=133]})(t,e)}function Tu(){var t=["sigBytes","1322232vvMEdZ","16wovbYA","./evpkdf","655084WqxDRe","_createHelper","function","./enc-base64","_invKeySchedule","_doCryptBlock","createCommonjsModule","_nRounds","extend","2284668CxQGHj","_keyPriorReset","algo","object","_key","2617671HTEKJe","1125624DUfDDd","664165KYmYTT","AES","19589328oFgHHr","words"];return(Tu=function(){return t})()}!function(t,e){for(var s=Iu,i=t();;)try{if(385451===-parseInt(s(147))/1+-parseInt(s(138))/2+parseInt(s(144))/3+-parseInt(s(145))/4*(parseInt(s(139))/5)+-parseInt(s(156))/6+-parseInt(s(137))/7+parseInt(s(141))/8)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Tu);$t[Eu(153)]((function(t,e){var s,i,r;s=Jt,i=function(t){var e=Iu;return function(){var e=Iu,s=t,i=s.lib.BlockCipher,r=s[e(134)],n=[],o=[],a=[],h=[],c=[],l=[],d=[],u=[],p=[],f=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var s=0,i=0;for(e=0;e<256;e++){var r=i^i<<1^i<<2^i<<3^i<<4;r=r>>>8^255&r^99,n[s]=r,o[r]=s;var m=t[s],g=t[m],A=t[g],y=257*t[r]^16843008*r;a[s]=y<<24|y>>>8,h[s]=y<<16|y>>>16,c[s]=y<<8|y>>>24,l[s]=y,y=16843009*A^65537*g^257*m^16843008*s,d[r]=y<<24|y>>>8,u[r]=y<<16|y>>>16,p[r]=y<<8|y>>>24,f[r]=y,s?(s=m^t[t[t[A^m]]],i^=t[t[i]]):s=i=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],g=r[e(140)]=i[e(155)]({_doReset:function(){var t=e;if(!this[t(154)]||this[t(133)]!==this[t(136)]){for(var s=this[t(133)]=this[t(136)],i=s[t(142)],r=s[t(143)]/4,o=4*((this[t(154)]=r+6)+1),a=this._keySchedule=[],h=0;h6&&h%r==4&&(g=n[g>>>24]<<24|n[g>>>16&255]<<16|n[g>>>8&255]<<8|n[255&g]):(g=n[(g=g<<8|g>>>24)>>>24]<<24|n[g>>>16&255]<<16|n[g>>>8&255]<<8|n[255&g],g^=m[h/r|0]<<24),a[h]=a[h-r]^g);for(var c=this[t(151)]=[],l=0;l>>24]]^u[n[g>>>16&255]]^p[n[g>>>8&255]]^f[n[255&g]]}}},encryptBlock:function(t,s){this[e(152)](t,s,this._keySchedule,a,h,c,l,n)},decryptBlock:function(t,s){var i=e,r=t[s+1];t[s+1]=t[s+3],t[s+3]=r,this[i(152)](t,s,this._invKeySchedule,d,u,p,f,o),r=t[s+1],t[s+1]=t[s+3],t[s+3]=r},_doCryptBlock:function(t,s,i,r,n,o,a,h){for(var c=this[e(154)],l=t[s]^i[0],d=t[s+1]^i[1],u=t[s+2]^i[2],p=t[s+3]^i[3],f=4,m=1;m>>24]^n[d>>>16&255]^o[u>>>8&255]^a[255&p]^i[f++],A=r[d>>>24]^n[u>>>16&255]^o[p>>>8&255]^a[255&l]^i[f++],y=r[u>>>24]^n[p>>>16&255]^o[l>>>8&255]^a[255&d]^i[f++],b=r[p>>>24]^n[l>>>16&255]^o[d>>>8&255]^a[255&u]^i[f++];l=g,d=A,u=y,p=b}g=(h[l>>>24]<<24|h[d>>>16&255]<<16|h[u>>>8&255]<<8|h[255&p])^i[f++],A=(h[d>>>24]<<24|h[u>>>16&255]<<16|h[p>>>8&255]<<8|h[255&l])^i[f++],y=(h[u>>>24]<<24|h[p>>>16&255]<<16|h[l>>>8&255]<<8|h[255&d])^i[f++],b=(h[p>>>24]<<24|h[l>>>16&255]<<16|h[d>>>8&255]<<8|h[255&u])^i[f++],t[s]=g,t[s+1]=A,t[s+2]=y,t[s+3]=b},keySize:8});s[e(140)]=i[e(148)](g)}(),t[e(140)]},(r=Iu)(135)==r(135)?t.exports=i(sd):"undefined"===r(149)&&(void 0).amd?(void 0)(["./core",r(150),"./md5",r(146),"./cipher-core"],i):i(s.CryptoJS)}));function ku(t,e){var s=_u();return(ku=function(t,e){return s[t-=162]})(t,e)}function _u(){var t=["object","Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.","421784PFhzol","64871cpuFtg","_doCryptBlock","algo","840165ojXBBz","TripleDES","BlockCipher","_des1","CryptoJS","lib","length","./enc-base64","35hSkjxb","_des3","extend","createEncryptor","WordArray","49770WGqOwY","_key","commonjsGlobal","_rBlock","_lBlock","decryptBlock","./cipher-core","496328NfwMez","DES","_subKeys","words","./evpkdf","139694fpHvJQ","create","./md5","encryptBlock","slice","_createHelper","625116WSiGeN","_des2","call"];return(_u=function(){return t})()}!function(t,e){for(var s=ku,i=t();;)try{if(155046===parseInt(s(185))/1+-parseInt(s(173))/2+parseInt(s(201))/3+parseInt(s(184))/4+-parseInt(s(188))/5+-parseInt(s(179))/6+-parseInt(s(196))/7*(-parseInt(s(168))/8))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(_u);Zt((function(t,e){var s,i,r,n=ku;s=$t[n(163)],i=function(t){var e=n;return function(){var e=ku,s=t,i=s[e(193)],r=i[e(200)],n=i[e(190)],o=s[e(187)],a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],h=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],u=o.DES=n.extend({_doReset:function(){for(var t=e,s=this._key[t(171)],i=[],r=0;r<56;r++){var n=a[r]-1;i[r]=s[n>>>5]>>>31-n%32&1}for(var o=this[t(170)]=[],l=0;l<16;l++){var d=o[l]=[],u=c[l];for(r=0;r<24;r++)d[r/6|0]|=i[(h[r]-1+u)%28]<<31-r%6,d[4+(r/6|0)]|=i[28+(h[r+24]-1+u)%28]<<31-r%6;for(d[0]=d[0]<<1|d[0]>>>31,r=1;r<7;r++)d[r]=d[r]>>>4*(r-1)+3;d[7]=d[7]<<5|d[7]>>>27}var p=this._invSubKeys=[];for(r=0;r<16;r++)p[r]=o[15-r]},encryptBlock:function(t,s){this[e(186)](t,s,this._subKeys)},decryptBlock:function(t,s){this[e(186)](t,s,this._invSubKeys)},_doCryptBlock:function(t,s,i){var r=e;this[r(165)]=t[s],this[r(164)]=t[s+1],p[r(181)](this,4,252645135),p[r(181)](this,16,65535),f[r(181)](this,2,858993459),f.call(this,8,16711935),p[r(181)](this,1,1431655765);for(var n=0;n<16;n++){for(var o=i[n],a=this[r(165)],h=this._rBlock,c=0,u=0;u<8;u++)c|=l[u][((h^o[u])&d[u])>>>0];this._lBlock=h,this[r(164)]=a^c}var m=this._lBlock;this[r(165)]=this[r(164)],this._rBlock=m,p[r(181)](this,1,1431655765),f.call(this,8,16711935),f[r(181)](this,2,858993459),p[r(181)](this,16,65535),p.call(this,4,252645135),t[s]=this[r(165)],t[s+1]=this[r(164)]},keySize:2,ivSize:2,blockSize:2});function p(t,s){var i=e,r=(this[i(165)]>>>t^this[i(164)])&s;this._rBlock^=r,this[i(165)]^=r<>>t^this[i(165)])&s;this[i(165)]^=r,this[i(164)]^=r<>>2]>>>24-h%4*8&255;a=(a+n[o]+c)%256;var l=n[o];n[o]=n[a],n[a]=l}this._i=this._j=0},_doProcessBlock:function(t,s){var i=e;t[s]^=o[i(129)](this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,s=this._j,i=0,r=0;r<4;r++){s=(s+t[e=(e+1)%256])%256;var n=t[e];t[e]=t[s],t[s]=n,i|=t[(t[e]+t[s])%256]<<24-8*r}return this._i=e,this._j=s,i}s.RC4=i._createHelper(n);var a=r[e(110)]=n.extend({cfg:n.cfg[e(111)]({drop:192}),_doReset:function(){var t=e;n[t(132)][t(129)](this);for(var s=this[t(125)][t(130)];s>0;s--)o[t(129)](this)}});s[e(110)]=i._createHelper(a)}(),t[e(119)]},"object"===(r=Du)(124)?t[r(123)]=i(sd):"undefined"===r(109)&&(void 0).amd?(void 0)([r(116),r(120),"./md5",r(103),r(112)],i):i(s[r(114)])}));function Du(t,e){var s=Ru();return(Du=function(t,e){return s[t-=102]})(t,e)}function Lu(t,e){var s=xu();return(Lu=function(t,e){return s[t-=388]})(t,e)}function xu(){var t=["object","126YbwzgX","words","_key","2233236mSRhaV","./cipher-core","3YFEkFP","4386180qiCUVa","494665TslFlX","cfg","33zITuNt","14NvFMtw","exports","call","commonjsGlobal","Rabbit","4441493Adcsbf","_createHelper","4766196xOPqWQ","lib","extend","282000NBZges","amd","function","55435UeYbyF","algo","6IqRicm"];return(xu=function(){return t})()}!function(t,e){for(var s=Lu,i=t();;)try{if(342735===parseInt(s(414))/1*(parseInt(s(401))/2)+parseInt(s(396))/3*(-parseInt(s(394))/4)+-parseInt(s(398))/5+parseInt(s(389))/6*(-parseInt(s(406))/7)+-parseInt(s(411))/8*(-parseInt(s(391))/9)+-parseInt(s(397))/10+-parseInt(s(400))/11*(-parseInt(s(408))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(xu);Zt((function(t,e){var s,i,r;s=$t[Lu(404)],i=function(t){return function(){var e=Lu,s=t,i=s[e(409)].StreamCipher,r=s[e(388)],n=[],o=[],a=[],h=r[e(405)]=i[e(410)]({_doReset:function(){for(var t=e,s=this[t(393)][t(392)],i=this[t(399)].iv,r=0;r<4;r++)s[r]=16711935&(s[r]<<8|s[r]>>>24)|4278255360&(s[r]<<24|s[r]>>>8);var n=this._X=[s[0],s[3]<<16|s[2]>>>16,s[1],s[0]<<16|s[3]>>>16,s[2],s[1]<<16|s[0]>>>16,s[3],s[2]<<16|s[1]>>>16],o=this._C=[s[2]<<16|s[2]>>>16,4294901760&s[0]|65535&s[1],s[3]<<16|s[3]>>>16,4294901760&s[1]|65535&s[2],s[0]<<16|s[0]>>>16,4294901760&s[2]|65535&s[3],s[1]<<16|s[1]>>>16,4294901760&s[3]|65535&s[0]];for(this._b=0,r=0;r<4;r++)c[t(403)](this);for(r=0;r<8;r++)o[r]^=n[r+4&7];if(i){var a=i[t(392)],h=a[0],l=a[1],d=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),u=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),p=d>>>16|4294901760&u,f=u<<16|65535&d;for(o[0]^=d,o[1]^=p,o[2]^=u,o[3]^=f,o[4]^=d,o[5]^=p,o[6]^=u,o[7]^=f,r=0;r<4;r++)c[t(403)](this)}},_doProcessBlock:function(t,s){var i=e,r=this._X;c[i(403)](this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var o=0;o<4;o++)n[o]=16711935&(n[o]<<8|n[o]>>>24)|4278255360&(n[o]<<24|n[o]>>>8),t[s+o]^=n[o]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,s=0;s<8;s++)o[s]=e[s];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,s=0;s<8;s++){var i=t[s]+e[s],r=65535&i,n=i>>>16,h=((r*r>>>17)+r*n>>>15)+n*n,c=((4294901760&i)*i|0)+((65535&i)*i|0);a[s]=h^c}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}s[e(405)]=i[e(407)](h)}(),t.Rabbit},"object"===(r=Lu)(390)?t[r(402)]=i(sd):"undefined"===r(413)&&(void 0)[r(412)]?(void 0)(["./core","./enc-base64","./md5","./evpkdf",r(395)],i):i(s.CryptoJS)}));var Pu=Bu;function Bu(t,e){var s=Mu();return(Bu=function(t,e){return s[t-=259]})(t,e)}function Mu(){var t=["cfg","./evpkdf","7fVCfEa","RabbitLegacy","239620tuMele","2590520gVZMzC","algo","call","11bQTtlU","2001468EyXSSi","words","StreamCipher","commonjsGlobal","extend","2836665tOKaQz","object","function","3015420UUeahg","amd","60zFTOHI","exports","CryptoJS","2Gjqmrw","createCommonjsModule","342977NmeXQS","./md5","972932zsnemK","./enc-base64","3vqSZtF","_key"];return(Mu=function(){return t})()}!function(t,e){for(var s=Bu,i=t();;)try{if(550165===-parseInt(s(267))/1*(parseInt(s(265))/2)+-parseInt(s(271))/3*(-parseInt(s(269))/4)+parseInt(s(277))/5*(parseInt(s(262))/6)+parseInt(s(275))/7*(parseInt(s(278))/8)+parseInt(s(287))/9+-parseInt(s(260))/10*(parseInt(s(281))/11)+-parseInt(s(282))/12)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Mu);$t[Pu(266)]((function(t,e){var s,i,r;s=$t[Pu(285)],i=function(t){return function(){var e=Bu,s=t,i=s.lib[e(284)],r=s[e(279)],n=[],o=[],a=[],h=r[e(276)]=i[e(286)]({_doReset:function(){var t=e,s=this[t(272)][t(283)],i=this[t(273)].iv,r=this._X=[s[0],s[3]<<16|s[2]>>>16,s[1],s[0]<<16|s[3]>>>16,s[2],s[1]<<16|s[0]>>>16,s[3],s[2]<<16|s[1]>>>16],n=this._C=[s[2]<<16|s[2]>>>16,4294901760&s[0]|65535&s[1],s[3]<<16|s[3]>>>16,4294901760&s[1]|65535&s[2],s[0]<<16|s[0]>>>16,4294901760&s[2]|65535&s[3],s[1]<<16|s[1]>>>16,4294901760&s[3]|65535&s[0]];this._b=0;for(var o=0;o<4;o++)c.call(this);for(o=0;o<8;o++)n[o]^=r[o+4&7];if(i){var a=i.words,h=a[0],l=a[1],d=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),u=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),p=d>>>16|4294901760&u,f=u<<16|65535&d;for(n[0]^=d,n[1]^=p,n[2]^=u,n[3]^=f,n[4]^=d,n[5]^=p,n[6]^=u,n[7]^=f,o=0;o<4;o++)c[t(280)](this)}},_doProcessBlock:function(t,s){var i=e,r=this._X;c[i(280)](this),n[0]=r[0]^r[5]>>>16^r[3]<<16,n[1]=r[2]^r[7]>>>16^r[5]<<16,n[2]=r[4]^r[1]>>>16^r[7]<<16,n[3]=r[6]^r[3]>>>16^r[1]<<16;for(var o=0;o<4;o++)n[o]=16711935&(n[o]<<8|n[o]>>>24)|4278255360&(n[o]<<24|n[o]>>>8),t[s+o]^=n[o]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,s=0;s<8;s++)o[s]=e[s];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0,s=0;s<8;s++){var i=t[s]+e[s],r=65535&i,n=i>>>16,h=((r*r>>>17)+r*n>>>15)+n*n,c=((4294901760&i)*i|0)+((65535&i)*i|0);a[s]=h^c}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}s.RabbitLegacy=i._createHelper(h)}(),t.RabbitLegacy},"object"===(r=Bu)(288)?t[r(263)]=i(sd):"undefined"===r(259)&&(void 0)[r(261)]?(void 0)(["./core",r(270),r(268),r(274),"./cipher-core"],i):i(s[r(264)])}));const Fu=Ou;function Ou(t,e){const s=Uu();return(Ou=function(t,e){return s[t-=386]})(t,e)}!function(t,e){const s=Ou,i=t();for(;;)try{if(975659===-parseInt(s(414))/1*(-parseInt(s(386))/2)+parseInt(s(402))/3+parseInt(s(392))/4+parseInt(s(405))/5+parseInt(s(416))/6*(parseInt(s(403))/7)+parseInt(s(396))/8*(-parseInt(s(419))/9)+parseInt(s(388))/10*(-parseInt(s(400))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Uu);$t[Fu(394)]((function(t,e){!function(e,s,i){const r=Ou;"object"===r(412)?t[r(390)]=s(sd):"undefined"===r(411)&&(void 0)[r(395)]?(void 0)([r(406),r(418),r(408),r(387),r(399)],s):s(e[r(397)])}(Jt,(function(t){const e=Ou;return function(){const e=Ou;var s=t,i=s[e(417)].BlockCipher,r=s[e(410)];const n=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var h={pbox:[],sbox:[]};function c(t,s){const i=e;let r=s>>24&255,n=s>>16&255,o=s>>8&255,a=255&s,h=t[i(404)][0][r]+t.sbox[1][n];return h^=t[i(404)][2][o],h+=t.sbox[3][a],h}function l(t,s,i){const r=e;let o,a=s,h=i;for(let e=0;e=i&&(n=0);let h=0,c=0,d=0;for(let e=0;e<18;e+=2)d=l(t,h,c),h=d.left,c=d[r(401)],t[r(415)][e]=h,t[r(415)][e+1]=c;for(let e=0;e<4;e++)for(let s=0;s<256;s+=2)d=l(t,h,c),h=d[r(409)],c=d.right,t[r(404)][e][s]=h,t[r(404)][e][s+1]=c}(h,i,r)}},encryptBlock:function(t,e){var s=l(h,t[e],t[e+1]);t[e]=s.left,t[e+1]=s.right},decryptBlock:function(t,s){const i=e;var r=function(t,s,i){const r=e;let n,o=s,a=i;for(let e=17;e>1;--e)o^=t[r(415)][e],a=c(t,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=t[r(415)][1],o^=t[r(415)][0],{left:o,right:a}}(h,t[s],t[s+1]);t[s]=r[i(409)],t[s+1]=r[i(401)]},blockSize:2,keySize:4,ivSize:2});s[e(413)]=i[e(391)](d)}(),t[e(413)]}))}));function Uu(){const t=["words","./cipher-core","22027753ckfXVT","right","5426967tPZTFQ","7khkHXZ","sbox","3377750CGnQVt","./core","sigBytes","./md5","left","algo","function","object","Blowfish","14oaTuCF","pbox","2158674jNrlSM","lib","./enc-base64","8896086RgUJIt","30950sZAvsk","./evpkdf","10zDScDC","_keyPriorReset","exports","_createHelper","3622672MQcemB","_key","createCommonjsModule","amd","8qAQfpd","CryptoJS"];return(Uu=function(){return t})()}var Nu=ju;function ju(t,e){var s=Vu();return(ju=function(t,e){return s[t-=301]})(t,e)}function Vu(){var t=["8449506qUBcZI","./mode-ctr","./enc-base64url","./format-hex","./mode-cfb","./enc-utf16","./lib-typedarrays","./pad-ansix923","8168570cEFlUm","501760PSpQTn","createCommonjsModule","4mgXajx","./pad-nopadding","./cipher-core","./enc-base64","3647240YjYfQf","CryptoJS","./sha3","commonjsGlobal","1458525sktkLa","./pad-iso97971","10620354MmpbwU","./blowfish","2wpKfee","object","./pad-iso10126","./sha224","./hmac","./md5","./sha512","function","./evpkdf","exports","532146JjpftZ","./sha384","./mode-ofb","./tripledes","./mode-ctr-gladman","./sha256","./sha1","./rc4","./pad-zeropadding","./aes"];return(Vu=function(){return t})()}!function(t,e){for(var s=ju,i=t();;)try{if(919033===-parseInt(s(311))/1+-parseInt(s(301))/2*(parseInt(s(340))/3)+-parseInt(s(332))/4*(-parseInt(s(329))/5)+parseInt(s(342))/6+-parseInt(s(330))/7+-parseInt(s(336))/8+-parseInt(s(321))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Vu);var zu=$t[Nu(331)]((function(t,e){var s,i,r;s=$t[Nu(339)],i=function(t){return t},(r=ju)(302)==r(302)?t[r(310)]=sd:"undefined"===r(308)&&(void 0).amd?(void 0)(["./core","./x64-core",r(327),r(326),r(335),r(323),r(306),r(317),r(316),r(304),r(307),r(312),r(338),"./ripemd160",r(305),"./pbkdf2",r(309),r(334),r(325),r(322),r(315),r(313),"./mode-ecb",r(328),r(303),r(341),r(319),r(333),r(324),r(320),r(314),r(318),"./rabbit","./rabbit-legacy",r(343)],i):s[r(337)]=s[r(337)]}));function Gu(t,e){const s=Wu();return(Gu=function(t,e){return s[t-=482]})(t,e)}function Wu(){const t=["232731ZhknBD","169616WvtdTV","654732PNlTxI","catch","119VADOTP","then","486670MTBURJ","WordArray","ModeOfOperation","get","1873630YZtdYi","slice","toString","144XpstWR","1648230ubmYcn","set","Counter","596475lmWwdw","length","4XoYEtf","create","decrypt"];return(Wu=function(){return t})()}function Hu(t){return t[3]|t[2]<<8|t[1]<<16|t[0]<<24}function Ku(t){const e=Gu,s=[];for(let i=0;i>>2]|=t[i]<<24-i%4*8;return zu.lib[e(499)][e(490)](s,t[e(488)])}!function(t,e){const s=Gu,i=t();for(;;)try{if(232429===-parseInt(s(492))/1+-parseInt(s(489))/2*(-parseInt(s(487))/3)+-parseInt(s(494))/4+parseInt(s(502))/5+parseInt(s(484))/6+-parseInt(s(496))/7*(-parseInt(s(493))/8)+-parseInt(s(483))/9*(parseInt(s(498))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Wu),function(t,e){const s=ip,i=t();for(;;)try{if(483747===-parseInt(s(341))/1+-parseInt(s(344))/2+-parseInt(s(370))/3*(parseInt(s(343))/4)+parseInt(s(363))/5*(-parseInt(s(366))/6)+parseInt(s(356))/7*(-parseInt(s(354))/8)+parseInt(s(371))/9+-parseInt(s(360))/10*(-parseInt(s(364))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(cp);const Qu=16,Yu=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],qu=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function Ju(t){const e=ip,s=[];for(let i=0,r=t[e(345)];i{const s=e;return 1===(t=t[s(355)](16))[s(345)]?"0"+t:t}))[e(357)]("")}function Zu(t){const e=ip,s=[];for(let i=0,r=t[e(345)];i>>6),s[e(365)](128|63&r);else if(r<=55295||r>=57344&&r<=65535)s[e(365)](224|r>>>12),s[e(365)](128|r>>>6&63),s[e(365)](128|63&r);else{if(!(r>=65536&&r<=1114111))throw s.push(r),new Error("input is not supported");i++,s.push(240|r>>>18&28),s.push(128|r>>>12&63),s[e(365)](128|r>>>6&63),s.push(128|63&r)}}return s}function $u(t){const e=ip,s=[];for(let i=0,r=t[e(345)];i=240&&t[i]<=247?(s[e(365)](String[e(350)](((7&t[i])<<18)+((63&t[i+1])<<12)+((63&t[i+2])<<6)+(63&t[i+3]))),i+=3):t[i]>=224&&t[i]<=239?(s.push(String[e(350)](((15&t[i])<<12)+((63&t[i+1])<<6)+(63&t[i+2]))),i+=2):t[i]>=192&&t[i]<=223?(s[e(365)](String.fromCodePoint(((31&t[i])<<6)+(63&t[i+1]))),i++):s[e(365)](String.fromCodePoint(t[i]));return s[e(357)]("")}function tp(t,e){const s=31&e;return t<>>32-s}function ep(t){return(255&Yu[t>>>24&255])<<24|(255&Yu[t>>>16&255])<<16|(255&Yu[t>>>8&255])<<8|255&Yu[255&t]}function sp(t){return t^tp(t,2)^tp(t,10)^tp(t,18)^tp(t,24)}function ip(t,e){const s=cp();return(ip=function(t,e){return s[t-=340]})(t,e)}function rp(t){return t^tp(t,13)^tp(t,23)}function np(t,e,s){const i=new Array(4),r=new Array(4);for(let e=0;e<4;e++)r[0]=255&t[4*e],r[1]=255&t[4*e+1],r[2]=255&t[4*e+2],r[3]=255&t[4*e+3],i[e]=r[0]<<24|r[1]<<16|r[2]<<8|r[3];for(let t,e=0;e<32;e+=4)t=i[1]^i[2]^i[3]^s[e+0],i[0]^=sp(ep(t)),t=i[2]^i[3]^i[0]^s[e+1],i[1]^=sp(ep(t)),t=i[3]^i[0]^i[1]^s[e+2],i[2]^=sp(ep(t)),t=i[0]^i[1]^i[2]^s[e+3],i[3]^=sp(ep(t));for(let t=0;t<16;t+=4)e[t]=i[3-t/4]>>>24&255,e[t+1]=i[3-t/4]>>>16&255,e[t+2]=i[3-t/4]>>>8&255,e[t+3]=255&i[3-t/4]}function op(t,e,s){const i=new Array(4),r=new Array(4);for(let e=0;e<4;e++)r[0]=255&t[0+4*e],r[1]=255&t[1+4*e],r[2]=255&t[2+4*e],r[3]=255&t[3+4*e],i[e]=r[0]<<24|r[1]<<16|r[2]<<8|r[3];i[0]^=2746333894,i[1]^=1453994832,i[2]^=1736282519,i[3]^=2993693404;for(let t,s=0;s<32;s+=4)t=i[1]^i[2]^i[3]^qu[s+0],e[s+0]=i[0]^=rp(ep(t)),t=i[2]^i[3]^i[0]^qu[s+1],e[s+1]=i[1]^=rp(ep(t)),t=i[3]^i[0]^i[1]^qu[s+2],e[s+2]=i[2]^=rp(ep(t)),t=i[0]^i[1]^i[2]^qu[s+3],e[s+3]=i[3]^=rp(ep(t));if(0===s)for(let t,s=0;s<16;s++)t=e[s],e[s]=e[31-s],e[31-s]=t}function ap(t,e,s){const i=ip;let{padding:r=i(351),mode:n,iv:o=[],output:a=i(358)}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(n===i(369)&&(typeof o===i(358)&&(o=Ju(o)),16!==o.length))throw new Error(i(353));if(typeof e===i(358)&&(e=Ju(e)),16!==e[i(345)])throw new Error(i(347));if(t="string"==typeof t?0!==s?Zu(t):Ju(t):[...t],("pkcs#5"===r||r===i(351))&&0!==s){const e=Qu-t[i(345)]%Qu;for(let s=0;s=Qu;){const e=t[i(342)](u,u+16),r=new Array(16);if(n===i(369))for(let t=0;tt[n(449)]&&i+r<=s[n(449)]?t[n(449)]-e:i+r>s[n(449)]&&e+r<=t[n(449)]?s[n(449)]-i:e+r<=t[n(449)]&&i+r<=s.length?r:s[n(449)]>24&255,t>>16&255,t>>8&255,255&t)}function Sp(t,e){var s=fp;return e+3>>19)^(i<<23|i>>>9)}function Ip(t,e){var s=new Array(36);s[0]=Sp(e,0),s[1]=Sp(e,4),s[2]=Sp(e,8),s[3]=Sp(e,12);for(var i=0;i<32;i++)s[i+4]=s[i]^Tp(s[i+1]^s[i+2]^s[i+3]^t[i]);var r=new Array(4);for(i=35;i>=32;i--)r[35-i]=s[i];return function(t){for(var e=fp,s=new Array(4*t.length),i=0;i>>30)^(i<<10|i>>>22)^(i<<18|i>>>14)^(i<<24|i>>>8)}function kp(){var t=["byteLength","iv is error!","1785xeWeJs","set","includes","3PoCuct","length","sm4 key is error!","log","cipher is error!","420miFKoc","38346cscYwa","396qbmiCH","741068krisdu","3350RUisbm","5389116JcYsZN","27248LsKsEX","min","87641wPuAWB","1933191TPodUW","slice","data is error!","8nWArek","ceil"];return(kp=function(){return t})()}function _p(t,e,s){var i=fp;if(null==t||null==t||t[i(449)]%16!=0)return console[i(427)]("sm4 key is error!"),null;if(null==s||null==s||s[i(449)]<=0)return console[i(427)](i(428)),null;if(null==e||null==e||e[i(449)]%16!=0)return console[i(427)](i(444)),null;for(var r=wp(t),n=Math[i(442)](s[i(449)]/16),o=new Array(s[i(449)]),a=e[i(439)](),h=0;ht)return this.preDelayTimestamp-t>1e3&&this[s(409)][s(546)]("CommonDemux",s(361)+this.preDelayTimestamp+" > timestamp is "+t+s(555)+(this[s(556)]-t)+"ms and return "+this[s(432)]),this[s(556)]=t,this.delay;if(this.firstTimestamp){if(t){const e=Date[s(433)]()-this[s(441)],i=t-this[s(434)];e>=i?(this[s(438)]=!1,this[s(432)]=e-i):(this.isStreamTsMoreThanLocal=!0,this[s(432)]=i-e)}}else this[s(434)]=t,this[s(441)]=Date[s(433)](),this[s(432)]=-1;return this[s(556)]=t,this[s(432)]}getDelayNotUpdateDelay(t,e){const s=Cp;if(!t||!this[s(409)][s(578)]())return-1;if(e===D[s(526)])return this[s(390)];if(this[s(556)]&&this[s(556)]-t>1e3)return this[s(409)][s(546)](s(552),s(354)+this[s(556)]+" > timestamp is "+t+s(555)+(this[s(556)]-t)+s(458)),-1;if(this[s(434)]){let e=-1;if(t){const i=Date[s(433)]()-this[s(441)],r=t-this[s(434)];e=i>=r?i-r:r-i}return e}return-1}[Cp(547)](){const t=Cp;this[t(434)]=null,this[t(441)]=null,this[t(432)]=-1,this[t(360)]=!1}[Cp(348)](){const t=Cp;this.resetDelay(),this[t(556)]=null}[Cp(525)](){const t=Cp;this[t(409)].isPlayVodMp4()?this[t(409)][t(423)](t(552),t(346)):this[t(409)][t(333)]()?this[t(409)][t(423)]("CommonDemux",t(331)):-1===this.player[t(336)]().indexOf(h[t(454)])?this.player[t(397)]()?this[t(409)].debugLog(t(552),t(511)):(this[t(409)][t(423)]("CommonDemux",t(570)),this[t(427)](),this.stopId=setInterval((()=>{const e=t;if(this[e(409)][e(429)]())return;let s=(new Date)[e(343)]();!this[e(461)]&&(this[e(461)]=s);const i=s-this[e(461)];this.updateHistoryIntervalDiffTimeList(i),i>100&&this[e(409)][e(546)]("CommonDemux",e(484)+i),this._loop(),this[e(461)]=(new Date)[e(343)]()}),20)):this[t(409)].debugLog("CommonDemux",t(471))}[Cp(384)](){const t=Cp;this.stopId&&(clearInterval(this[t(355)]),this.stopId=null),this[t(510)]=null}[Cp(487)](){this.initPlaybackCacheLoop()}[Cp(464)](t){const e=Cp;this[e(340)][e(554)]>5&&this[e(340)][e(518)](),this.historyIntervalDiffTimeList.push(t)}[Cp(402)](){const t=Cp;if(this[t(340)][t(554)]<5)return!1;for(let e=0;e{const s=t,i=je();!this[s(510)]&&(this[s(510)]=i);for(let t=0;t1&&this[s(534)][s(554)]>0&&this[s(409)].debugWarn(s(552),s(341)+r+"ms and fragDuration is "+e+s(478)+n+s(497)+this.bufferList[s(554)]),this[s(510)]=i}),e)}[Cp(323)](){const t=Cp;let e=null;if(this.bufferList.length)if(e=this[t(534)].shift(),e[t(369)]===D[t(520)]){this.player[t(505)]()?e[t(436)]&&this[t(417)](e):this[t(417)](e);let s=this.bufferList[0];for(;s&&s[t(369)]===D[t(526)];)this[t(534)][t(518)](),this[t(409)][t(505)]()||this[t(417)](s),s=this[t(534)][0]}else if(e[t(369)]===D[t(526)]){this.player[t(505)]()||this._doDecoderDecode(e);let s=this[t(534)][0];for(;s;){if(e=this[t(534)][t(518)](),e.type===D.video){this[t(409)][t(505)]()?e[t(436)]&&this[t(417)](e):this[t(417)](e),s=null;break}e.type===D.audio&&(this[t(417)](e),s=this[t(534)][0])}}}_loop(){const t=Cp;let e;const s=this.player._opt.videoBuffer,i=this[t(409)][t(372)].videoBufferDelay,r=this[t(409)][t(372)][t(583)]===c.player;if(this[t(534)][t(554)]){if(this[t(385)])return void this[t(409)][t(546)](t(552),"_loop isPushDropping is true and bufferList length is "+this[t(534)].length);if(this[t(360)]){for(e=this[t(534)].shift(),this[t(409)][t(546)](t(552),t(325)+e.ts+t(392)+e[t(369)]+", data.isIFrame is "+e[t(436)]+", delay is "+this.delay+t(424)+this[t(534)][t(554)]);!e[t(436)]&&this[t(534)][t(554)];)e=this.bufferList[t(518)]();const s=this.getDelayNotUpdateDelay(e.ts,e[t(369)]);e.isIFrame&&s<=this.getNotDroppingDelayTs()&&(this.player.debugLog("CommonDemux",t(486)+this.delay),this[t(360)]=!1,this[t(417)](e),this._decodeNext(e))}else if(this[t(409)][t(576)]()||this[t(409)][t(377)]()||0===s||this[t(409)][t(514)]())for(;this[t(534)][t(554)];)e=this[t(534)][t(518)](),this._doDecoderDecode(e);else if(e=this[t(534)][0],-1===this[t(387)](e.ts,e[t(369)]))this[t(409)][t(423)](t(552),t(401)+e.ts+" data.type is "+e[t(369)]),this[t(534)][t(518)](),this[t(417)](e),this[t(329)](e);else if(this.delay>i+s&&r)this.hasIframeInBufferList()?(this[t(409)][t(546)](t(552),t(519)+this.delay+", set dropping is true"),this[t(348)](),this[t(360)]=!0,this.player[t(472)]({isDropping:!0})):(this[t(534)][t(518)](),this._doDecoderDecode(e),this[t(329)](e));else for(;this.bufferList.length;){if(e=this.bufferList[0],!(this[t(387)](e.ts,e[t(369)])>s)){this.delay<0&&this.player[t(546)](t(552),t(519)+this.delay+" bufferList is "+this[t(534)]);break}this.bufferList[t(518)](),this._doDecoderDecode(e)}}else-1!==this[t(432)]&&this[t(409)][t(423)]("CommonDemux",t(324)),this.resetAllDelay()}[Cp(422)](t,e,s,i){const r=Cp;let n=arguments[r(554)]>4&&void 0!==arguments[4]?arguments[4]:0;const o=this[r(409)];let a={ts:s,cts:n,type:e,isIFrame:!1};this[r(409)][r(442)]()?(e===D[r(520)]&&o[r(372)].playType===c[r(409)]&&this[r(503)](s),o[r(372)][r(463)]&&!o._opt[r(515)]?(e===D[r(520)]&&(a[r(436)]=i),this[r(496)](t,a)):o[r(372)][r(581)]?(e===D.video&&(a[r(436)]=i),this[r(496)](t,a)):(e===D[r(520)]&&(a.isIFrame=i),this[r(496)](t,a))):this[r(409)][r(576)]()?(e===D[r(520)]&&(a[r(436)]=i),this.player[r(397)]()?this[r(496)](t,a):this.player[r(505)]()?e===D[r(520)]&&i&&this[r(496)](t,a):1===this.player[r(509)]()?this[r(496)](t,a):this[r(496)](t,a,!1)):this[r(409)][r(514)]()&&(e===D.video&&(a[r(436)]=i),this[r(496)](t,a))}[Cp(540)](t,e,s,i){const r=Cp;let n=arguments[r(554)]>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments[r(554)]>5&&void 0!==arguments[5]?arguments[5]:r(431);if(this[r(409)][r(429)]())return void this[r(409)][r(423)](this[r(465)],r(500));let a=!1;if(e===D.audio&&pe(t)&&(this[r(409)].debugLog(r(552),o+r(420)+s+r(468)),a=!0,this[r(409)][r(561)]())){const e=new Uint8Array(t);this[r(409)][r(415)][r(577)](e,s)}let h=!1;if(e===D[r(520)]&&i&&ai(t)&&(this[r(409)][r(423)](r(552),o+r(356)+s+r(416)),h=!0,this[r(409)][r(561)]())){const e=new Uint8Array(t);this[r(409)][r(415)][r(469)](e,s)}this[r(409)][r(408)]&&ci(h)&&ci(a)&&this[r(332)](t,e,s,i,n),e===D[r(520)]?this[r(409)].isPlayVod()&&ci(this[r(409)].isPlayVodUseMSE())&&this[r(409)].playVod&&this[r(409)][r(488)][r(418)]()?i&&this._doDecoderDecode({ts:s,cts:n,payload:t,type:D[r(520)],isIFrame:i}):this[r(417)]({ts:s,cts:n,payload:t,type:D[r(520)],isIFrame:i}):e===D[r(526)]&&(this[r(409)][r(514)]()&&ci(this[r(409)].isPlayVodUseMSE())&&this[r(409)][r(488)]&&this[r(409)][r(488)].isRateMoreThanMaxRate()||this[r(417)]({ts:s,payload:t,type:D[r(526)]}))}[Cp(575)](t,e,s,i){let r=arguments[Cp(554)]>4&&void 0!==arguments[4]?arguments[4]:0;this._doDecode(t,e,s,i,r)}[Cp(351)](t,e,s,i){const r=Cp;let n=arguments[r(554)]>4&&void 0!==arguments[4]?arguments[4]:0;this[r(422)](t,e,s,i,n)}[Cp(456)](t,e,s,i){const r=Cp;let n=arguments[r(554)]>4&&void 0!==arguments[4]?arguments[4]:0;this[r(422)](t,e,s,i,n)}[Cp(538)](t,e,s,i){const r=Cp;let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;this._doDecodeByHls(t,e,s,i,n,r(330))}[Cp(329)](t){const e=Cp,s=t.ts;if(0===this[e(534)][e(554)])return;let i=this[e(534)][0];const r=i.ts-s,n=t[e(369)]===D.video&&i[e(369)]===D[e(526)],o=t[e(369)]===D[e(520)]&&ai(t[e(470)]);(r<=20||n||o)&&(this[e(409)].debugLog(e(552),e(363)+t[e(369)]+" and\n ts is "+s+e(475)+i[e(369)]+e(477)+i.ts+e(459)+r+" and isVideoAndNextAudio is "+n+e(394)+o),this.bufferList.shift(),this[e(417)](i))}_doDecoderDecode(t){const e=Cp,s=this[e(409)],{webcodecsDecoder:i,mseDecoder:r}=s;this[e(409)][e(442)]()&&this[e(409)][e(472)]({buf:this[e(432)]}),t.type===D.audio?s[e(372)].hasAudio&&(s._opt[e(581)]&&s[e(372)][e(564)]?r.decodeAudio(t.payload,t.ts):s._opt[e(463)]&&s[e(372)][e(373)]?i[e(508)](t[e(470)],t.ts):s[e(357)]&&s[e(357)][e(508)](t[e(470)],t.ts)):t[e(369)]===D[e(520)]&&(s._opt.isEmitSEI&&this[e(535)](t[e(470)],t.ts),s[e(372)][e(463)]&&!s[e(372)][e(515)]?i[e(571)](t[e(470)],t.ts,t[e(436)],t[e(370)]):s[e(372)][e(581)]?r[e(571)](t[e(470)],t.ts,t.isIFrame,t[e(370)]):s[e(357)]&&s.decoderWorker[e(571)](t.payload,t.ts,t[e(436)]))}[Cp(496)](t,e){const s=Cp;let i=!(arguments[s(554)]>2&&void 0!==arguments[2])||arguments[2];const r=this.player[s(372)][s(533)],n=this[s(409)][s(372)][s(383)],o=this[s(409)][s(442)]();if(e.type===D[s(526)]&&pe(t)){if(this[s(409)][s(423)](s(552),"pushBuffer() audio ts is "+e.ts+s(468)),this[s(409)][s(561)]()){const i=new Uint8Array(t);this.player[s(415)][s(577)](i,e.ts)}this._doDecoderDecode({ts:e.ts,payload:t,type:D[s(526)]})}else if(e[s(369)]===D[s(520)]&&e[s(436)]&&ai(t)){if(this[s(409)][s(423)](s(552),"pushBuffer() video ts is "+e.ts+", isVideoSequenceHeader is true"),this[s(409)][s(561)]()){const i=new Uint8Array(t);this[s(409)][s(415)][s(469)](i,e.ts)}this[s(417)]({ts:e.ts,payload:t,type:D[s(520)],isIFrame:e.isIFrame,cts:e.cts})}else{if(this[s(409)].recording&&this[s(332)](t,e[s(369)],e.ts,e[s(436)],e[s(370)]),o){if(e[s(369)]===D[s(520)]){if(this[s(452)]>0){const t=e.ts-this[s(558)],i=2*this[s(452)];t>=i&&this.player[s(423)]("CommonDemux",s(367)+e[s(436)]+s(522)+e.ts+s(479)+this[s(558)]+s(494)+t+s(347)+this.preTimestampDuration+s(350)+i+s(328))}if(null!==this.preTimestamp&&this[s(558)]>=e.ts&&(this[s(409)][s(546)]("CommonDemux",s(367)+e.isIFrame+s(395)+e.ts+s(339)+this.preTimestamp+s(374)+t.byteLength+" and prevPayloadBufferSize is "+this[s(529)]),this[s(558)]-e.ts>w&&(this.player[s(546)](s(552),s(489)+e.ts+s(359)+this[s(558)]+s(399)+(this[s(558)]-e.ts)+s(555)+w+s(521)),this[s(348)]()),this[s(409)]._opt[s(455)]&&ci(e[s(436)])&&this[s(409)][s(578)]())){const t=this[s(421)](),e=ci(this[s(385)]);return this[s(409)].debugLog(s(552),s(388)+t+" and isNotPushDropping is "+e+s(349)),void(t&&e?this.dropBuffer$2():this.clearBuffer(!0))}this[s(558)]>0&&(this[s(452)]=e.ts-this[s(558)]),this.prevPayloadBufferSize=t.byteLength,this[s(558)]=e.ts}if(this[s(409)][s(578)]()){let t=this[s(428)](e.ts,e.type);this[s(390)]=t;const i=n+r;this.delay>0&&t>i&&this[s(432)]0)this[t(364)]=e,this[t(409)][t(520)]&&this[t(409)].video[t(449)](this[t(364)]),this[t(411)]=e,this.initPlaybackCacheLoop();else{const s=this[t(534)].map((t=>({type:t.type,ts:t.ts})));this.player.debugLog("CommonDemux",t(498)+e+t(446)+this.bufferList[t(554)]+t(573)+JSON.stringify(s));const i=100;this[t(534)][t(554)]>=i&&(this[t(409)][t(546)](t(552),"playbackCacheBeforeDecodeForFpsRender, bufferListLength is "+this[t(534)][t(554)]+t(555)+i+t(366)),this[t(364)]=25,this[t(409)][t(520)]&&this[t(409)].video[t(449)](this[t(364)]),this[t(411)]=this[t(364)],this[t(389)]())}}}[Cp(528)](){const t=Cp;if(this[t(534)][t(554)]>0){let e=this.bufferList.findIndex((e=>{const s=t;return hi(e.isIFrame)&&e[s(369)]===D[s(520)]}));if(this[t(483)]())for(let s=0;s=this[t(539)]()){this[t(409)].debugLog(t(552),"dropBuffer$2() isAllIframeInBufferList() is true, and index is "+s+t(551)+r+t(499)+this.getNotDroppingDelayTs()),e=s;break}}if(e>=0){this[t(385)]=!0,this[t(409)].updateStats({isDropping:!0});const s=this[t(534)][t(554)];this[t(534)]=this[t(534)][t(451)](e);const i=this[t(534)][t(518)]();this[t(348)](),this[t(387)](i.ts,i[t(369)]),this[t(417)](i),this[t(385)]=!1,this[t(409)][t(423)]("CommonDemux",t(319)+e+t(447)+s+" ,and new bufferList length is "+this[t(534)][t(554)]+t(516)+this[t(432)]+" ")}else this[t(385)]=!1}0===this[t(534)][t(554)]&&(this[t(385)]=!1)}clearBuffer(){const t=Cp;let e=arguments[t(554)]>0&&void 0!==arguments[0]&&arguments[0];this[t(409)][t(423)](t(552),t(405)+this[t(534)][t(554)]+t(386)+e+t(513)+this[t(409)]._opt.checkFirstIFrame),e&&(this.bufferList=[]),this[t(409)][t(442)]()&&(this[t(348)](),hi(this[t(409)][t(372)].checkFirstIFrame)&&(this[t(360)]=!0,this.player[t(472)]({isDropping:!0}))),this.player[t(398)]()}[Cp(503)](t){const e=Cp;if(!(this[e(409)][e(578)]()&&t>0))return;null===this[e(412)]?(this[e(412)]=t,this[e(566)]=je()):ts?i-s:0;if(r>this[e(409)][e(372)].networkDelay&&this[e(409)][e(372)].playType===c[e(409)]){let n=!1;null===this[e(381)]&&(n=!0,this[e(381)]=je());const o=je();(o-this[e(381)]>=1e3||n)&&(this[e(409)][e(546)]("CommonDemux","delay is more than networkDelay and now dts:"+t+e(563)+this[e(412)]+e(440)+s+e(419)+i+" ,delay is "+r+e(474)+this[e(409)]._opt[e(523)]),this[e(409)].emit(M.networkDelayTimeout,r),this.prevEmitNetworkDelayTimestamp=o)}this[e(409)][e(472)]({netBuf:r})}[Cp(553)](t){const e=Cp;if(null===this[e(337)])this.preIframeTs=t;else if(this[e(337)]{s[t(369)]===D.video&&(e+=1)})),e}[Cp(320)](){const t=Cp;let e=0;return this.bufferList[t(460)]((s=>{s[t(369)]===D.audio&&(e+=1)})),e}[Cp(421)](){const t=Cp;return this[t(534)][t(443)]((e=>{const s=t;return e.type===D[s(520)]&&e[s(436)]}))}[Cp(483)](){const t=Cp,e=this[t(568)]();let s=0;return this[t(534)][t(460)]((e=>{const i=t;e.type===D[i(520)]&&e.isIFrame&&(s+=1)})),e===s}getInputByteLength(){return 0}[Cp(466)](){return this[Cp(438)]}[Cp(344)](){}[Cp(537)](){}[Cp(535)](t,e){const s=Cp;let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=4;vs(this.nalUnitSize)&&(r=this[s(414)]);const n=Le(t[s(451)](5),r);if(ci(i)){const t=this.player[s(450)]();t&&t.encType&&(i=t.encType===W[s(557)])}n.forEach((t=>{const r=s,n=i?t[0]>>>1&63:31&t[0],o=i&&(n===q[r(457)]||n===q[r(559)]),a=ci(i)&&n===Y[r(410)];if(o||a){const s=xe(t,i);this.player.emitVideoSei({ts:e,data:s[r(470)]})}}))}handleRecording(t,e,s,i,r){const n=Cp;if(this[n(409)][n(561)]()){const i=new Uint8Array(t);e===D[n(520)]?this[n(409)][n(415)][n(342)](i,s):e===D.audio&&this[n(409)][n(415)].addAudio(i,s)}else if(this[n(409)].isRecordTypeMp4()){const o=new Uint8Array(t);if(this[n(409)][n(415)][n(430)]()){if(e===D[n(520)])this[n(409)][n(415)][n(567)](o[n(451)](5),i,s,r);else if(e===D[n(526)]){const e=new Uint8Array(t);this[n(409)].recorder[n(491)](fe(e)?e[n(451)](2):e[n(451)](1),s)}}else e===D[n(520)]&&this[n(409)].recorder[n(567)](o[n(451)](5),i,s,r)}}[Cp(506)](t){const e=Cp,s=15&t[0];this[e(409)][e(520)][e(490)]({encTypeCode:s});const i=s===G[e(557)];this[e(414)]=function(t,e){let s=null;return e?t[Ce(202)]>=28&&(s=1+(3&t[26])):t.length>=12&&(s=1+(3&t[9])),s}(t,i),this.player[e(423)](this[e(465)],"demux() isVideoSequenceHeader is true and isHevc is "+i+e(543)+this[e(414)])}[Cp(425)](t,e){const s=Cp;let i=this.player,r=t;if(i._opt.isM7sCrypto)if(i[s(372)][s(512)]&&i[s(372)][s(512)].byteLength>0&&i[s(372)].cryptoIV&&i[s(372)][s(541)][s(400)]>0){const e=this.player[s(520)].getVideoInfo();e[s(435)]?r=function(t,e,s){const i=Gu;let r=arguments[i(488)]>3&&void 0!==arguments[3]&&arguments[3];e=new Uint8Array(e),s=new Uint8Array(s);const n=t.byteLength;let o=5;for(;on)break;let h=t[o+4],c=!1;if(r?(h=h>>>1&63,c=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(h)):(h&=31,c=1===h||5===h),c){const r=t[i(503)](o+4+2,o+4+a);let n=new(Zl[i(500)].ctr)(e,new(Zl[i(486)])(s));const h=n[i(491)](r);n=null,t[i(485)](h,o+4+2)}o=o+4+a}return t}(t,i[s(372)][s(512)],i[s(372)].cryptoIV,e[s(435)]===G[s(557)]):i[s(546)](this[s(465)],s(582)+e[s(435)])}else i.debugError(this[s(465)],s(327)+(i[s(372)].cryptoKey&&i[s(372)][s(512)][s(400)])+s(315)+(i._opt[s(541)]&&i._opt[s(541)].byteLength)+s(391));else if(i._opt[s(524)])if(i[s(372)].sm4CryptoKey){const e=this.player[s(520)][s(450)]()[s(435)]===G[s(557)],n=this.player[s(372)].isSm4CryptoH265V2;r=i[s(372)][s(512)]&&i._opt[s(512)][s(400)]>0&&i[s(372)][s(541)]&&i[s(372)].cryptoIV[s(400)]>0?function(t,e,s){var i=fp;let r=arguments[i(449)]>3&&void 0!==arguments[3]&&arguments[3],n=arguments[i(449)]>4&&void 0!==arguments[4]&&arguments[4];e=new Uint8Array(e),s=new Uint8Array(s);const o=t[i(443)];let a=5;for(;ao)break;let c=t[a+4],l=!1,d=2;if(r?(n&&(d=3),c=c>>>1&63,l=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][i(447)](c)):(c&=31,l=1===c||5===c),l){const r=_p(e,s,t[i(439)](a+4+d,a+4+h));t[i(446)](r,a+4+d)}a=a+4+h}return t}(t,i[s(372)][s(512)],i[s(372)].cryptoIV,e,n):function(t,e){const s=ip;let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments[s(345)]>3&&void 0!==arguments[3]&&arguments[3];const n=t[s(348)];let o=new Uint8Array(t.slice(0,5)),a=5;for(;an){const e=new Uint8Array(o.length+t[s(345)]-a);e[s(372)](o,0),e[s(372)](t[s(342)](a),o.length),o=e;break}let l=t[a+4],d=!1,u=2;if(i?(r&&(u=3),l=l>>>1&63,d=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21][s(368)](l)):(l&=31,d=1===l||5===l),d){const i=ap(t.slice(a+4+u,a+4+c),e,0,{padding:s(349),output:s(359)});let r=i[i[s(345)]-1];if(r>0&&r<16){let t=!0;for(let e=1;e<=r;e++)if(i[i[s(345)]-e]!==r){t=!1;break}t&&i[s(367)](i[s(345)]-r,r)}const n=new Uint8Array(u);n[s(372)](t[s(342)](a+4,a+4+u),0);const h=Pe(oc(n,new Uint8Array(i))),l=new Uint8Array(o.length+h[s(345)]);l[s(372)](o,0),l[s(372)](h,o.length),o=l}else{const e=t[s(342)](a+4,a+4+c),i=new Uint8Array(o[s(345)]+4+e[s(345)]);i[s(372)](o,0),i.set(h,o.length),i[s(372)](e,o.length+4),o=i}a=a+4+c}return o}(t,i[s(372)][s(404)],e,n)}else!i[s(372)][s(404)]&&i[s(396)](this.TAG_NAME,s(495));else if(i[s(372)][s(352)])if(i[s(372)].cryptoKey&&i._opt[s(512)][s(400)]>0&&i[s(372)].cryptoIV&&i[s(372)][s(541)][s(400)]>0){const e=this.player.video[s(450)]();r=function(t,e,s){const i=dp;let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const n=t.byteLength;let o=5;for(;on)break;let h=t[o+4],c=!1;if(r?(h=h>>>1&63,c=[0,1,2,3,4,5,6,7,8,9,16,17,18,19,20,21].includes(h)):(h&=31,c=1===h||5===h),c){const r=up(t[i(401)](o+4,o+4+a),e,s);t.set(r,o+4)}o=o+4+a}return t}(t,i[s(372)][s(512)],i[s(372)].cryptoIV,e[s(435)]===G.h265)}else i.debugError(this[s(465)],s(493));return r}cryptoPayloadAudio(t){const e=Cp;let s=this[e(409)];if(ci(s[e(372)][e(322)]))return t;let i=t;if(s[e(372)][e(531)])if(s._opt[e(512)]&&s[e(372)][e(512)][e(400)]>0&&s[e(372)][e(541)]&&s[e(372)][e(541)][e(400)]>0){t[0]>>4===H.AAC&&(i=function(t,e,s){const i=Gu;if(t.byteLength<=30)return t;const r=t.slice(32);let n=new(Zl[i(500)].ctr)(e,new(Zl[i(486)])(s));const o=n[i(491)](r);return n=null,t[i(485)](o,32),t}(t,s[e(372)].cryptoKey,s[e(372)][e(541)]))}else s[e(396)](this[e(465)],"isM7sCrypto cryptoKey.length is "+(s[e(372)][e(512)]&&s[e(372)][e(512)][e(400)])+e(315)+(s[e(372)].cryptoIV&&s[e(372)][e(541)].byteLength)+e(391));else if(s._opt[e(352)])if(s[e(372)][e(512)]&&s._opt[e(512)][e(400)]>0&&s._opt[e(541)]&&s[e(372)].cryptoIV.byteLength>0){t[0]>>4===H.AAC&&(i=function(t,e,s){const i=dp;if(t[i(396)]<=30)return t;const r=up(t[i(401)](30),e,s);return t[i(395)](r,30),t}(t,s._opt[e(512)],s[e(372)][e(541)]))}else s[e(396)](this.TAG_NAME,e(439)+(s._opt[e(512)]&&s[e(372)][e(512)].byteLength)+e(315)+(s[e(372)].cryptoIV&&s._opt[e(541)][e(400)])+" null");return i}[Cp(562)](t,e){const s=Cp,i=t[0],r=48&i,n=15&i,o=t[s(451)](1,5),a=new ArrayBuffer(4),h=new Uint32Array(a),c="a"==String[s(407)](o[0]);if(n===Rt[s(482)]){if(r===Dt.FT_KEY){const e=t[s(451)](5);if(c)this.player.debugError(this[s(465)],"isAV1 is true, not support and can contact author wx:bosswancheng");else{const t=new Uint8Array(5+e[s(554)]);t.set([28,0,0,0,0],0),t[s(467)](e,5),this.updateNalUnitSize(t),this[s(409)][s(423)](this[s(465)],"demux() isVideoSequenceHeader(enhancedH265) is true and nalUnitSize is "+this[s(414)]),this[s(422)](t,D.video,0,!0,0)}}}else if(n===Rt[s(345)]){let i=t,n=0;const o=r===Dt.FT_KEY;if(o&&this.calcIframeIntervalTimestamp(e),c)this.player[s(396)](this[s(465)],"isAV1 is true, not support and can contact author wx:bosswancheng");else{h[0]=t[4],h[1]=t[3],h[2]=t[2],h[3]=0,n=h[0];i=Bh(t[s(451)](8),o),i=this[s(425)](i,o),this[s(422)](i,D[s(520)],e,o,n)}}else if(n===Rt[s(544)]){const i=r===Dt[s(445)],n=t.slice(5);i&&this.calcIframeIntervalTimestamp(e);let o=Bh(n,i);o=this[s(425)](o,i),this[s(422)](o,D[s(520)],e,i,0)}else this[s(409)][s(423)](this[s(465)],"demux() isEnhancedH265Header is true and packetEx is "+n+" and ignore")}[Cp(548)](t){return 128==(128&t)}handlePlaybackPause(t){const e=Cp;hi(t)?this.clearStopInterval():this[e(487)]()}[Cp(527)](t){const e=Cp,s=t[e(580)]((t=>{const s=e;return{ts:t.dts||t[s(502)],type:t[s(369)]}}));this._tempSampleTsList=this._tempSampleTsList[e(501)](s);const i=$s(this._tempSampleTsList,D[e(520)]);if(i)this[e(409)][e(423)](this[e(465)],e(572)+i+e(406)+this._basefps),i<10&&this[e(409)][e(546)](this[e(465)],"_calcDecodeFps() video fps is "+i+e(413)),this[e(362)]=i,this._tempSampleTsList=[],this._postMessageToLoopWorker(e(380),{baseFps:this[e(362)]});else if(this[e(409)].debugLog(this.TAG_NAME,e(317)),this[e(462)][e(554)]>200)return this[e(409)][e(423)](this[e(465)],e(426)+this[e(362)]),this[e(462)]=[],this[e(318)](e(380),{baseFps:this[e(362)]}),!0;return null!==i}[Cp(574)](){const t=Cp;return!this[t(409)][t(378)]()}[Cp(536)](){const t=Cp;return this[t(534)][t(554)]}geVodLoadedTime(){return 0}[Cp(437)](t){const e=Cp;let s=arguments[e(554)]>1&&void 0!==arguments[1]?arguments[1]:5;const i=t[e(485)]||[];for(let t=0;t=n.dts&&(this[e(409)][e(546)](this[e(465)],e(476)+r[e(334)]+e(569)+n.dts+e(316)),n[e(334)]=r[e(334)]+s)}}}function Lp(){const t=["isM7sCrypto cryptoKey.length is ","\n maybe trigger black screen or flower screen","_decodeNext","mp4","initInterval() and is hls and support hls265 so return","handleRecording","isUseHls265","dts","push","getStreamType","preIframeTs","calcNetworkDelay dts is "," less than (or equal) preTs is ","historyIntervalDiffTimeList","playbackCacheLoop sync frame duration is ","addVideo","getTime","close","PACKET_TYPE_FRAMES","initInterval() and is vod mp4 so return"," and preTsDuration is ","resetAllDelay"," and next drop buffer"," and maxDiff is ","_doDecodeByTs","isXorCrypto","useMSE, page visibility is false and\n history interval diff is ","getDelayNotUpdateDelay() and preDelayTimestamp is ","stopId"," pushBuffer video ts is ","decoderWorker","destroy",", preTimestamp is ","dropping","getDelay() and preDelayTimestamp is ","_basefps","decode data type is ","playbackStreamVideoFps","isDropping",", and set streamFps is 25","pushBuffer() video and isIFrame is ","useWCS, page visibility is false and\n history interval diff is ","type","cts","723415AsMRqL","_opt","wcsDecodeAudio"," and\n payloadBufferSize is ","isPlaybackPauseNotClearCacheAndCacheBeforeDecodeAndUseFpsRender"," > ","isPlayUseMSE","isUseMSE",", playbackStreamFps is ","updateBaseFps","prevEmitNetworkDelayTimestamp"," and dropBuffer$2()","videoBufferDelay","clearStopInterval","isPushDropping",", need clear is ","getDelay","pushBuffer(), isDropSameTimestampGop is true and\n hasIframe is ","initPlaybackCacheLoop","pushLatestDelay"," null",", data.type is ","5nfHbbE"," and isVideoSqeHeader is "," and\n ts is ","debugError","isPlaybackCacheBeforeDecodeForFpsRender","decoderCheckFirstIFrame",",\n diff is ","byteLength","delay is -1 and data.ts is ","isHistoryIntervalDiffTimeAllLarge","18cBFSPd","sm4CryptoKey","clearBuffer,buffer length is ",", update base fps is ","fromCharCode","recording","player","kSliceSEI","playbackStreamFps","bufferStartDts"," ,maybe play slowly","nalUnitSize","recorder",", isVideoSequenceHeader is true","_doDecoderDecode","isRateMoreThanMaxRate",",local diff is "," pushBuffer audio ts is ","hasIframeInBufferList","_doDecode","debugLog"," ,buffer list is ","cryptoPayload","_calcDecodeFps() _tempSampleTsList is more than 200, clear and use base fps update ","_loop","getDelayNotUpdateDelay","isDestroyedOrClosed","isWasmMp4","hls","delay","now","firstTimestamp","encTypeCode","isIFrame","correctSamplePts","isStreamTsMoreThanLocal","isXorCrypto cryptoKey.length is ",", vs start is ","startTimestamp","isPlayer","some","2214726dNdELR","FT_KEY",", bufferListLength is ",",and old bufferList length is ","810300feKznD","setStreamFps","getVideoInfo","slice","preTimestampDuration","10jqOWys","worker","isDropSameTimestampGop","_doDecodeByPs","suffixSei","ms and return -1","\n diff is ","forEach","preLoopTimestamp","_tempSampleTsList","useWCS","updateHistoryIntervalDiffTimeList","TAG_NAME","getIsStreamTsMoreThanLocal","set",", isAacCodecPacket is true","addVideoSequenceHeader","payload","initInterval() and is worker stream so return","updateStats","isStreamTypeNotWorker",", _opt.networkDelay is "," next data type is ","correctSamplePts dts, dts: "," ts is ","ms and diffFps is ",", preTs is ","initPlaybackCacheLoop() and fragDuration is ",",\n delay is ","PACKET_TYPE_SEQ_START","isAllIframeInBufferList","loop demux diff time is ","samples","_loop data isIFrame is true and delay is ","startPlaybackLoopInterval","playVod","pushBuffer() video\n ts is ","updateVideoInfo","handleAddAudioTrack","handlePlaybackPause","isXorCrypto opt.xorCryptoKey is null",",\n diff is ","isSm4Crypto opt.sm4CryptoKey is null","pushBuffer",", and bufferList length is ","playbackCacheBeforeDecodeForFpsRender, calc streamVideoFps is "," and notDroppingDelayTs is ","_doDecodeByHls() player is destroyed or closed","concat","pts","calcNetworkDelay","99064chJvTH","isPlaybackOnlyDecodeIFrame","updateNalUnitSize","listenPlaybackEvents","decodeAudio","getPlaybackRate","prevPlaybackCacheLoopTimestamp","initInterval() and playback and playbackIsCacheBeforeDecodeForFpsRender is true so return","cryptoKey"," and _opt.checkFirstIFrame is ","isPlayVod","useOffscreen"," and new delay is "," and\n bufferList is ","shift","_loop delay is ","video","\n and resetAllDelay()"," and\n ts is ","networkDelay","isSm4Crypto","initInterval","audio","_calcDecodeFps","dropBuffer$2","prevPayloadBufferSize","ceil","isM7sCrypto","calcBufferFps","videoBuffer","bufferList","findSei","getBufferListLength","reset","_doDecodeByMp4","getNotDroppingDelayTs","_doDecodeByHls","cryptoIV","playbackStreamAudioFps"," and nalUnitSize is ","PACKET_TYPE_FRAMESX","27734qmkJTv","debugWarn","resetDelay","_isEnhancedH265Header",", bufferList is ","137553JkzAwe"," and tempDelay is ","CommonDemux","calcIframeIntervalTimestamp","length"," more than ","preDelayTimestamp","h265","preTimestamp","prefixSei","join","isRecordTypeFlv","_decodeEnhancedH265Video",",start dts is ","mseDecodeAudio","calcPlaybackStreamFps","bufferStartLocalTs","handleAddNaluTrack","getVideoBufferLength",", next dts: ","setInterval()","decodeVideo","_calcDecodeFps() video fps is "," and ts list is ","_isUseWorker","_doDecodeByFmp4","isPlayback","addAACSequenceHeader","isDemuxDecodeFirstIIframeInit","preFrameTs","map","useMSE","videoInfo.encTypeCode is ","playType"," or cryptoIV.length is "," and update next dts increase 5ms","_calcDecodeFps() streamVideoFps is null","_postMessageToLoopWorker","dropBuffer$2() iFrameIndex is ","getAudioBufferLength","6901884ndypHl","isCryptoAudio","doPlaybackCacheLoop","loop() bufferList is empty and reset delay","_loop is dropping and data.ts is ",", delay is "];return(Lp=function(){return t})()}function xp(t,e){const s=Up();return(xp=function(t,e){return s[t-=258]})(t,e)}const Pp=xp;!function(t,e){const s=xp,i=t();for(;;)try{if(700380===-parseInt(s(264))/1*(-parseInt(s(276))/2)+-parseInt(s(271))/3*(parseInt(s(283))/4)+parseInt(s(285))/5*(-parseInt(s(278))/6)+parseInt(s(265))/7*(-parseInt(s(292))/8)+-parseInt(s(306))/9+parseInt(s(307))/10*(-parseInt(s(295))/11)+parseInt(s(266))/12*(parseInt(s(262))/13))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Up);var Bp=function(t,e,s,i){return new(s||(s=Promise))((function(r,n){const o=xp;function a(t){const e=xp;try{c(i[e(268)](t))}catch(t){n(t)}}function h(t){const e=xp;try{c(i[e(279)](t))}catch(t){n(t)}}function c(t){const e=xp;var i;t[e(301)]?r(t[e(277)]):(i=t.value,i instanceof s?i:new s((function(t){t(i)})))[e(263)](a,h)}c((i=i.apply(t,e||[]))[o(268)]())}))};const Mp=Symbol(32),Fp=Symbol(16),Op=Symbol(8);function Up(){const t=["then","1237TWOjHC","3143OxsEtG","180iMnXlO","byteOffset","next","close","demand","27TkwUnF","set","writeU8","reject","return","1856niSmkI","value","6ZMIDkX","throw","write","Unsupported type","readU16","390308KMMHMF","setG","5518295OQZGpJ","malloc","read","U32","readU32","number","U16","3048bDlqwg","flush","lastReadPromise","551001PWagXL","length","subarray","need","EOF","writeU32","done","call","resolve","consumed","consume","507222IEeUmS","70pFbfbv","buffer","byteLength","writeU16","pull","copyWithin","1830712DDIFCZ"];return(Up=function(){return t})()}class Np{constructor(t){const e=xp;this.g=t,this[e(304)]=0,t&&(this[e(298)]=t[e(268)]()[e(277)])}[Pp(284)](t){const e=Pp;this.g=t,this[e(270)](t[e(268)]()[e(277)],!0)}[Pp(305)](){const t=Pp;this[t(308)]&&this[t(304)]&&(this.buffer[t(261)](0,this[t(304)]),this.buffer=this[t(308)][t(297)](0,this.buffer[t(296)]-this[t(304)]),this[t(304)]=0)}[Pp(270)](t,e){const s=Pp;return e&&this[s(305)](),this[s(298)]=t,this[s(293)]()}read(t){return Bp(this,void 0,void 0,(function*(){const e=xp;return this[e(294)]&&(yield this[e(294)]),this.lastReadPromise=new Promise(((s,i)=>{const r=e;var n;this[r(274)]=i,this.resolve=t=>{const e=r;delete this.lastReadPromise,delete this[e(303)],delete this[e(298)],s(t)};this[r(270)](t,!0)||null===(n=this.pull)||void 0===n||n[r(302)](this,t)}))}))}[Pp(289)](){return this[Pp(287)](Mp)}[Pp(282)](){return this[Pp(287)](Fp)}readU8(){return this.read(Op)}[Pp(269)](){const t=Pp;var e;this.g&&this.g[t(275)](),this.buffer&&this[t(308)][t(297)](0,0),null===(e=this[t(274)])||void 0===e||e.call(this,new Error(t(299))),delete this[t(294)]}[Pp(293)](){const t=Pp;if(!this[t(308)]||!this[t(298)])return;let e=null;const s=this[t(308)].subarray(this[t(304)]);let i=0;const r=e=>s[t(296)]<(i=e);if(typeof this[t(298)]===t(290)){if(r(this[t(298)]))return;e=s[t(297)](0,i)}else if(this[t(298)]===Mp){if(r(4))return;e=s[0]<<24|s[1]<<16|s[2]<<8|s[3]}else if(this[t(298)]===Fp){if(r(2))return;e=s[0]<<8|s[1]}else if(this[t(298)]===Op){if(r(1))return;e=s[0]}else if(t(308)in this.need){if("byteOffset"in this.need){if(r(this[t(298)][t(258)]-this[t(298)].byteOffset))return;new Uint8Array(this[t(298)][t(308)],this[t(298)][t(267)]).set(s[t(297)](0,i)),e=this.need}else if(this.g)return void this.g[t(279)](new Error(t(281)))}else{if(r(this[t(298)].byteLength))return;new Uint8Array(this[t(298)])[t(272)](s.subarray(0,i)),e=this[t(298)]}return this[t(304)]+=i,this.g?this[t(270)](this.g.next(e)[t(277)],!0):this[t(303)]&&this[t(303)](e),e}[Pp(280)](t){const e=Pp;if(t instanceof Uint8Array?this[e(286)](t[e(296)])[e(272)](t):e(308)in t?this[e(286)](t[e(258)])[e(272)](new Uint8Array(t[e(308)],t.byteOffset,t[e(258)])):this[e(286)](t[e(258)]).set(new Uint8Array(t)),!this.g&&!this[e(303)])return new Promise((t=>this[e(260)]=t));this.flush()}[Pp(300)](t){const e=Pp;this[e(286)](4).set([t>>24&255,t>>16&255,t>>8&255,255&t]),this[e(293)]()}[Pp(259)](t){this.malloc(2).set([t>>8&255,255&t]),this.flush()}[Pp(273)](t){const e=Pp;this[e(286)](1)[0]=t,this[e(293)]()}[Pp(286)](t){const e=Pp;if(this[e(308)]){const s=this.buffer[e(296)],i=s+t;if(i<=this[e(308)].buffer[e(258)]-this[e(308)][e(267)])this[e(308)]=new Uint8Array(this.buffer.buffer,this[e(308)][e(267)],i);else{const t=new Uint8Array(i);t[e(272)](this[e(308)]),this[e(308)]=t}return this[e(308)][e(297)](s,i)}return this[e(308)]=new Uint8Array(t),this[e(308)]}}Np[Pp(288)]=Mp,Np[Pp(291)]=Fp,Np.U8=Op;const jp=Vp;function Vp(t,e){const s=zp();return(Vp=function(t,e){return s[t-=267]})(t,e)}function zp(){const t=["4384580oeUErW","updateNalUnitSize","demuxStart","debugLog","FlvDemux","cryptoPayload","90210pHaubO","updateStats","22524DcLfSK","length","slice","_isEnhancedH265Header","player","demux","_doDecode","buffer","audio","input","TAG_NAME","destroy","payload.length is ","keyFrame","_decodeEnhancedH265Video","6876340fCKtnq","182zxeQSg","byteLength"," and ignore","demux() codecId is ","dispatch() this.input is null","debugWarn","scriptData","_opt","hasVideo","isRecordTypeFlv","3416005IGprfa","demux() type is ","1qtqOrg","299952PhsDhp","hasAudio","_times","addMetaData","56gxxeSJ","onMetaData","write","demux() isIFrame is false and unit type is IDR and update to true","video","close","nalUnitSize"," less than 6 and ignore","h264","calcIframeIntervalTimestamp","448582WcfcnZ"];return(zp=function(){return t})()}!function(t,e){const s=Vp,i=t();for(;;)try{if(566299===-parseInt(s(316))/1*(-parseInt(s(279))/2)+-parseInt(s(288))/3+parseInt(s(280))/4+-parseInt(s(314))/5+parseInt(s(286))/6*(parseInt(s(304))/7)+-parseInt(s(269))/8*(-parseInt(s(317))/9)+-parseInt(s(303))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(zp);class Gp extends Dp{constructor(t){const e=Vp;super(t),this.TAG_NAME=e(284),this.input=new Np(this[e(293)]()),t[e(283)](this[e(298)],"init")}[jp(299)](){const t=jp;super[t(299)](),this[t(297)]&&(this[t(297)][t(274)](),this[t(297)]=null),this[t(292)][t(283)](this[t(298)],"destroy")}dispatch(t){const e=jp;this[e(297)]?this[e(297)][e(271)](t):this[e(292)]&&this.player[e(309)](this[e(298)],e(308))}*[jp(293)](){const t=jp;yield 9;const e=new ArrayBuffer(4),s=new Uint8Array(e),i=new Uint32Array(e),r=this.player;for(;;){if(!this.input)return;s[3]=0;const e=yield 15,n=e[4];s[0]=e[7],s[1]=e[6],s[2]=e[5];const o=i[0];s[0]=e[10],s[1]=e[9],s[2]=e[8],s[3]=e[11];let a=i[0];const h=(yield o)[t(290)]();if(!r)return;switch(n){case L.audio:if(r[t(311)][t(318)]&&(r[t(287)]({abps:h[t(305)]}),h[t(305)]>0)){let e=this.cryptoPayloadAudio(h);this[t(294)](e,D[t(296)],a)}break;case L[t(273)]:if(r[t(311)][t(312)]&&h[t(289)]>=6){let e=a;r.updateStats({vbps:h[t(305)],dts:e}),!r[t(267)][t(282)]&&(r[t(267)][t(282)]=je());const s=h[0];if(this[t(291)](s))this[t(302)](h,e);else{const e=15&s;let r=(s>>4&15)===bt[t(301)];const n=e===G.h265,o=e===G[t(277)];if(ci(n||o))return void this[t(292)][t(309)](this[t(298)],t(307)+e+t(306));ci(r)&&hi(gi(h,n))&&(this[t(292)][t(283)](this[t(298)],t(272)),r=!0),r&&(this[t(278)](a),null===this[t(275)]&&ai(h)&&this[t(281)](h)),i[0]=h[4],i[1]=h[3],i[2]=h[2],i[3]=0;let c=i[0],l=this[t(285)](h,r);this[t(294)](l,D[t(273)],a,r,c)}}else h[t(289)]<6&&r[t(309)](this[t(298)],t(300)+h.length+t(276));break;case L[t(310)]:if(this.player[t(313)]()){const e=new Uint8Array(h);this[t(292)].recorder[t(268)](e)}const e=Bc(h);e&&e[t(270)]&&r.updateMetaData(e[t(270)]);break;default:r.debugLog(this[t(298)],t(315)+n)}}}close(){const t=jp;this[t(297)]&&(this.input[t(274)](),this[t(297)]=null)}getInputByteLength(){const t=jp;let e=0;return this[t(297)]&&this[t(297)].buffer&&(e=this[t(297)][t(295)][t(305)]),e}}function Wp(){const t=["video","72620MEvopK","8ruTXed","_isEnhancedH265Header","getUint32","cryptoPayloadAudio","M7sDemux","7514360dLCNrI","debugWarn","init","getUint8","player","and return","_times","10913514SAxGsB","280WggoFf","30129684UCferl","dv byteLength is","14011893aSQaSs","22MeqOuY","_opt","192192cDBQhl","destroy","calcIframeIntervalTimestamp","dispatch","byteLength","393lGsoba","_doDecode","updateStats","7jUWdZE","hasVideo","TAG_NAME","demuxStart","13982ywYLfI"];return(Wp=function(){return t})()}const Hp=Kp;function Kp(t,e){const s=Wp();return(Kp=function(t,e){return s[t-=344]})(t,e)}!function(t,e){const s=Kp,i=t();for(;;)try{if(994416===-parseInt(s(360))/1+parseInt(s(372))/2*(parseInt(s(365))/3)+parseInt(s(354))/4*(parseInt(s(374))/5)+parseInt(s(353))/6*(parseInt(s(368))/7)+parseInt(s(375))/8*(-parseInt(s(357))/9)+-parseInt(s(346))/10*(-parseInt(s(358))/11)+-parseInt(s(355))/12)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Wp);class Qp extends Dp{constructor(t){const e=Kp;super(t),this[e(370)]=e(345),t.debugLog(this[e(370)],e(348))}destroy(){const t=Kp;super[t(361)](),this[t(350)].debugLog(this.TAG_NAME,t(361))}[Hp(363)](t){const e=Hp,s=this.player,i=new DataView(t),r=i[e(349)](0),n=i[e(377)](1,!1),o=new ArrayBuffer(4),a=new Uint32Array(o);switch(r){case D.audio:if(s[e(359)].hasAudio){const i=new Uint8Array(t,5);if(s[e(367)]({abps:i[e(364)]}),i[e(364)]>0){const t=this[e(344)](i);this[e(366)](t,r,n)}}break;case D[e(373)]:if(s[e(359)][e(369)])if(!s[e(352)][e(371)]&&(s._times[e(371)]=je()),i[e(364)]>=11){const o=new Uint8Array(t,5);let h=n;s[e(367)]({vbps:o[e(364)],dts:h});const c=o[0];if(this[e(376)](c))this._decodeEnhancedH265Video(o,n);else{const t=i[e(349)](5)>>4==1;t&&this[e(362)](n),a[0]=o[4],a[1]=o[3],a[2]=o[2],a[3]=0;let s=a[0],h=this.cryptoPayload(o,t);this[e(366)](h,r,n,t,s)}}else this[e(350)][e(347)](this[e(370)],"dispatch",e(356),i[e(364)],e(351))}}}var Yp=qp;function qp(t,e){var s=Jp();return(qp=function(t,e){return s[t-=107]})(t,e)}function Jp(){var t=["debugLog","30uMvbsP","6zPrnME","init","WebTransportDemux","315133PmqcGg","272026PIehoj","3674153niiZhd","3JvWxZZ","235BEseGS","1433333mGQLZO","46908dTJfzD","8014392IDxfIU","TAG_NAME","player","9UCxdAJ","3408880OAbVVA","destroy"];return(Jp=function(){return t})()}!function(t,e){for(var s=qp,i=t();;)try{if(275703===parseInt(s(123))/1+parseInt(s(124))/2*(parseInt(s(108))/3)+-parseInt(s(111))/4*(parseInt(s(109))/5)+parseInt(s(120))/6*(parseInt(s(107))/7)+-parseInt(s(116))/8*(parseInt(s(115))/9)+parseInt(s(119))/10*(-parseInt(s(110))/11)+parseInt(s(112))/12)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Jp);class Xp extends Gp{constructor(t){var e=qp;super(t),this[e(113)]=e(122),t[e(118)](e(122),e(121))}[Yp(117)](){var t=Yp;super.destroy(),this[t(114)][t(118)](t(122),"destroy")}}const Zp=tf;function $p(){const t=["readUShort","index","readEG","2233aTvtVV","byteLength","readBits","4QHOlnH","bitsAvailable","234tIgUkj","19625848GphgFR","27CvZxdK","602590PDiWEN","length","data","readUByte","396354Dyeozp","3889299jeAMtJ","skipLZ","6685704wcbhnz","readBoolean","bitLength","getBits","skipBits","6848wRAjbY","readUEG","8688SVCSZx","10TEroMx","skipEG"];return($p=function(){return t})()}function tf(t,e){const s=$p();return(tf=function(t,e){return s[t-=128]})(t,e)}!function(t,e){const s=tf,i=t();for(;;)try{if(907961===-parseInt(s(134))/1*(parseInt(s(147))/2)+parseInt(s(140))/3*(parseInt(s(130))/4)+parseInt(s(150))/5*(parseInt(s(139))/6)+parseInt(s(155))/7*(parseInt(s(149))/8)+parseInt(s(132))/9*(parseInt(s(135))/10)+-parseInt(s(133))/11+-parseInt(s(142))/12)break;i.push(i.shift())}catch(t){i.push(i.shift())}}($p);class ef{constructor(t){const e=tf;this[e(137)]=t,this.index=0,this[e(144)]=8*t[e(128)]}get[Zp(131)](){const t=Zp;return this[t(144)]-this[t(153)]}skipBits(t){const e=Zp;if(this.bitsAvailable1&&void 0!==arguments[1])||arguments[1];return this[e(145)](t,this[e(153)],s)}[Zp(145)](t,e){const s=Zp;let i=!(arguments[s(136)]>2&&void 0!==arguments[2])||arguments[2];if(this[s(131)]>>r,o=8-r;if(o>=t)return i&&(this[s(153)]+=t),n>>o-t;{i&&(this.index+=o);const r=t-o;return n<>>1:-1*(t>>>1)}[Zp(143)](){return 1===this.readBits(1)}[Zp(138)](){const t=Zp;let e=arguments[t(136)]>0&&void 0!==arguments[0]?arguments[0]:1;return this[t(129)](8*e)}[Zp(152)](){return this.readBits(16)}readUInt(){return this[Zp(129)](32)}}const sf=rf;function rf(t,e){const s=nf();return(rf=function(t,e){return s[t-=170]})(t,e)}function nf(){const t=["parseVideo265Header","reduce","parseVideo264Header","audioContext","handleVideoFrames","1463978EqlIGU","_times","handleVideoH265Frames_1","handleAudioG711ANalu","handleVideoH265NaluList isSendSeqHeader is false","handleVideoH264Nalu","handleVideoH265NaluList","error","h264","vps","pps","kSliceSEI","_opt","readBits","readUByte","AAC","units","isIFrame","pendingUnits","kSliceIDR","534952HSGtcJ","revokeObjectURL","MP3","slice","h265 naluList.length === 0","isfms","forEach","payload","isEmitSEI","extractH264PPS","vcl","destroy","streamAudioType","debugWarn","push","suffixSei","byteLength","12220600jPriNR","readUEG","video","handleVideoH264NaluList isSendSeqHeader is false","extractNALu$3","isSendSeqHeader","MULAW","demuxStart","h265","getNaluDts","dispatch naluArray.length === 0","extractNALu$2","handleAudioAACNalu","ALAW","sps","subarray","handleVideoH264NaluList","download","iFrame","click","8075061WGVBdl","lastBuf","tempNaluBufferList","handleAudioG711UNalu","extractNALu","prefixSei","getNaluAudioDts","handleVideoH265Nalu","240072uEKyVP","streamVideoType","handleVideoFrames streamVideoType is null","_preDoDecode","extractH265PPS","6198175PxtnGY","naluList.length === 0","nakedFlowDemuxUseNew","href","set","debugLog","emitVideoSei","handleVideoH264Frames"," this.streamVideoType is null","handleVideoH265Frames","audio","3032oDRoHo","player","isSendAACSeqHeader","now","localAudioDts","handleAddNaluStartCode","extractH265SEI","TAG_NAME","5766KGapfE","handleNALu","getInputByteLength","localDts","length","handleVideoNalu","updateStats","extractH264SEI","NakedFlowDemux","224LxGCnO","kSliceNonIDR","_doDecode"];return(nf=function(){return t})()}!function(t,e){const s=rf,i=t();for(;;)try{if(811640===parseInt(s(176))/1+-parseInt(s(262))/2+parseInt(s(245))/3*(-parseInt(s(237))/4)+-parseInt(s(226))/5+-parseInt(s(221))/6*(-parseInt(s(254))/7)+parseInt(s(193))/8+parseInt(s(213))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(nf);class of extends Dp{constructor(t){const e=rf;super(t),this[e(244)]=e(253),this.lastBuf=null,this[e(271)]=null,this[e(207)]=null,this.pps=null,this.streamVideoType=null,this[e(188)]=null,this.tempNaluBufferList=new Uint8Array(0),this[e(174)]={},this[e(248)]=0,this[e(198)]=!1,this[e(239)]=!1,t[e(231)](this[e(244)],"init")}[sf(187)](){const t=sf;super.destroy(),this[t(214)]=null,this[t(271)]=null,this[t(207)]=null,this[t(272)]=null,this[t(222)]=null,this[t(188)]=null,this[t(215)]=new Uint8Array(0),this.pendingUnits={},this[t(248)]=0,this[t(241)]=0,this.isSendSeqHeader=!1,this[t(239)]=!1,this.player[t(231)](this.TAG_NAME,"destroy")}dispatch(t){const e=sf;this[e(238)];const s=new Uint8Array(t);if(this.player[e(274)][e(228)]){const t=this[e(197)](s);if(0===t[e(249)])return void this[e(238)][e(231)](this[e(244)],e(203));this[e(261)](t)}else this[e(204)](s)}addNaluToBuffer(t){const e=sf,s=t.byteLength+this.tempNaluBufferList.byteLength,i=new Uint8Array(s);i[e(230)](this[e(215)],0),i[e(230)](t,this[e(215)].byteLength),this[e(215)]=i}downloadNakedFlowFile(){const t=sf,e=new Blob([this.tempNaluBufferList]);try{const s=document.createElement("a");s[t(229)]=window.URL.createObjectURL(e),s[t(210)]=Date[t(240)]()+".h264",s[t(212)](),window.URL[t(177)](s[t(229)])}catch(e){console[t(269)]("downloadTempNalu",e)}}[sf(202)](){const t=sf,e=this.player._opt.nakedFlowFps;return this[t(248)]=this[t(248)]+parseInt(1e3/e,10),this[t(248)]}[sf(219)](){const t=sf,e=this.player[t(236)][t(260)].sampleRate,s=this[t(238)][t(236)].audioBufferSize;return this[t(248)]+parseInt(s/e*1e3)}[sf(217)](t){const e=sf;let s,i,r=0,n=t[e(192)],o=0,a=[];for(;r1)for(let t=0;t{const s=e,i=ah(t);i===Y[s(272)]||i===Y[s(207)]?this.handleVideoH264Nalu(t):ch(i)&&r[s(190)](t)})),1===r[e(249)])this[e(267)](r[0]);else{if(function(t){const e=rh;if(0===t[e(363)])return!1;const s=ah(t[0]);for(let i=1;i{this[e(267)](t)}))}}else if(this.streamVideoType===W.h265)if(this.player[e(274)].nakedFlowH265DemuxUseNew){const t=this[e(242)](s),i=this[e(217)](t);if(0===i[e(249)])return void this[e(238)][e(189)](this.TAG_NAME,"handleVideoNalu",e(180));const r=[];if(i[e(182)]((t=>{const s=e,i=Fh(t);i===q.pps||i===q.sps||i===q[s(271)]?this[s(220)](t):Uh(i)&&r.push(t)})),1===r[e(249)])this[e(220)](r[0]);else{if(function(t){const e=Oh;if(0===t[e(258)])return!1;const s=Fh(t[0]);for(let i=1;i{this[e(220)](t)}))}}else{Fh(s)===q[e(272)]?this.extractH265PPS(s):this[e(220)](s)}else this.player[e(189)](this[e(244)],e(234))}[sf(185)](t){const e=sf,s=this[e(242)](t);this[e(217)](s)[e(182)]((t=>{const s=e;hh(ah(t))?this.extractH264SEI(t):this[s(267)](t)}))}[sf(225)](t){const e=sf,s=this[e(242)](t);this[e(217)](s)[e(182)]((t=>{const s=e,i=Fh(t);i===q.sei?this[s(243)](t):this[s(220)](t)}))}[sf(252)](t){const e=this.handleAddNaluStartCode(t);this.extractNALu(e).forEach((t=>{this[rf(267)](t)}))}[sf(243)](t){const e=sf,s=this[e(242)](t);this[e(217)](s).forEach((t=>{this[e(220)](t)}))}[sf(242)](t){const e=sf,s=[0,0,0,1],i=new Uint8Array(t[e(249)]+s[e(249)]);return i[e(230)](s),i[e(230)](t,s[e(249)]),i}[sf(205)](t){const e=sf;if(!t||t[e(192)]<1)return;!this[e(188)]&&(this[e(188)]=K[e(171)]);let s=new Uint8Array(t);const i=s[e(179)](0,7);if(s=s[e(179)](7),!this[e(239)]){const t=(192&i[2])>>6,s=(60&i[2])>>2,r=(1&i[2])<<2|(192&i[3])>>6,n=new Uint8Array([175,0,t<<3|(14&s)>>1,(1&s)<<7|r<<3]);this[e(239)]=!0,this[e(256)](n,D[e(236)],0,!1,0)}const r=this[e(219)](),n=new Uint8Array(s[e(249)]+2);n.set([175,1],0),n[e(230)](s,2),this[e(256)](n,D[e(236)],r,!1,0)}[sf(265)](t){const e=sf;if(!t||t[e(192)]<1)return;!this.streamAudioType&&(this[e(188)]=K[e(206)]);let s=new Uint8Array(t);const i=this[e(219)](),r=new Uint8Array(s[e(249)]+1);r.set([114],0),r[e(230)](s,1),this[e(256)](r,D[e(236)],i,!1,0)}[sf(216)](t){const e=sf;if(!t||t[e(192)]<1)return;!this.streamAudioType&&(this[e(188)]=K[e(199)]);let s=new Uint8Array(t);const i=this.getNaluAudioDts(),r=new Uint8Array(s[e(249)]+1);r[e(230)]([130],0),r.set(s,1),this[e(256)](r,D.audio,i,!1,0)}handleAudioMp3Nalu(t){const e=sf;if(!t||t[e(192)]<1)return;!this.streamAudioType&&(this.streamAudioType=K[e(178)]);let s=new Uint8Array(t);const i=this[e(219)](),r=new Uint8Array(s[e(249)]+1);r[e(230)]([32],0),r[e(230)](s,1),this[e(256)](r,D[e(236)],i,!1,0)}[sf(267)](t){const e=sf,s=ah(t);switch(s){case Y[e(207)]:this[e(207)]=t;break;case Y.pps:this[e(272)]=t}if(this[e(198)]){if(this.sps&&this[e(272)]){const t=nh({sps:this.sps,pps:this[e(272)]}),s=this[e(248)];this._doDecode(t,D.video,s,!0,0),this[e(207)]=null,this.pps=null}if(ch(s)){!this[e(238)][e(263)][e(200)]&&(this[e(238)][e(263)][e(200)]=je());const i=lh(s),r=this[e(202)](),n=function(t,e){const s=rh;let i=[];i[0]=e?23:39,i[1]=1,i[2]=0,i[3]=0,i[4]=0,i[5]=t[s(351)]>>24&255,i[6]=t[s(351)]>>16&255,i[7]=t[s(351)]>>8&255,i[8]=255&t.byteLength;const r=new Uint8Array(i[s(363)]+t.byteLength);return r[s(375)](i,0),r[s(375)](t,i.length),r}(t,i);this[e(224)](n,D[e(195)],r,i,0)}else this[e(238)][e(189)](this[e(244)],"handleVideoH264Nalu is avc seq head nalType is "+s)}else if(this[e(207)]&&this[e(272)]){this[e(198)]=!0;const t=nh({sps:this[e(207)],pps:this.pps});this._doDecode(t,D[e(195)],0,!0,0),this[e(207)]=null,this[e(272)]=null}}handleVideoH264NaluList(t,e,s){const i=sf;if(this[i(198)]){!this[i(238)][i(263)][i(200)]&&(this[i(238)]._times[i(200)]=je());const s=this[i(202)](),r=oh(t[i(258)](((t,e)=>{const s=i,r=Pe(t),n=Pe(e),o=new Uint8Array(r[s(192)]+n.byteLength);return o[s(230)](r,0),o[s(230)](n,r[s(192)]),o})),e);this[i(224)](r,D[i(195)],s,e,0)}else this.player[i(189)](this[i(244)],i(196))}[sf(220)](t){const e=sf,s=Fh(t);switch(s){case q.vps:this[e(271)]=t;break;case q[e(207)]:this[e(207)]=t;break;case q[e(272)]:this[e(272)]=t}if(this.isSendSeqHeader){if(this.vps&&this[e(207)]&&this.pps){const t=Ph({vps:this[e(271)],sps:this[e(207)],pps:this.pps}),s=this[e(248)];this[e(256)](t,D.video,s,!0,0),this[e(271)]=null,this[e(207)]=null,this[e(272)]=null}if(Uh(s)){!this[e(238)][e(263)][e(200)]&&(this[e(238)][e(263)].demuxStart=je());const i=Nh(s),r=this[e(202)](),n=function(t,e){const s=Oh;let i=[];i[0]=e?28:44,i[1]=1,i[2]=0,i[3]=0,i[4]=0,i[5]=t[s(305)]>>24&255,i[6]=t.byteLength>>16&255,i[7]=t[s(305)]>>8&255,i[8]=255&t.byteLength;const r=new Uint8Array(i.length+t.byteLength);return r.set(i,0),r[s(237)](t,i[s(258)]),r}(t,i);this[e(224)](n,D[e(195)],r,i,0)}}else if(this[e(271)]&&this[e(207)]&&this[e(272)]){this[e(198)]=!0;const t=Ph({vps:this[e(271)],sps:this[e(207)],pps:this.pps});this._doDecode(t,D[e(195)],0,!0,0),this.vps=null,this.sps=null,this[e(272)]=null}}[sf(268)](t,e,s){const i=sf;if(this[i(198)]){!this[i(238)][i(263)].demuxStart&&(this[i(238)]._times[i(200)]=je());const s=this.getNaluDts(),r=Bh(t[i(258)](((t,e)=>{const s=i,r=Pe(t),n=Pe(e),o=new Uint8Array(r[s(192)]+n[s(192)]);return o[s(230)](r,0),o[s(230)](n,r[s(192)]),o})),e);this._preDoDecode(r,D.video,s,e,0)}else this.player[i(189)](this[i(244)],i(266))}[sf(224)](t,e,s,i,r){const n=sf;this[n(238)][n(251)]({vbps:t[n(192)],dts:s}),i&&this.calcIframeIntervalTimestamp(s),this[n(256)](t,D[n(195)],s,i,r)}[sf(247)](){const t=sf;let e=0;return this[t(214)]&&(e=this[t(214)][t(192)]),e}[sf(261)](t){const e=sf;if(!this[e(222)])for(let s of t)if(this[e(222)]=Ks(s),this[e(222)])break;this[e(222)]?this.streamVideoType===W[e(270)]?this[e(233)](t):this.streamVideoType===W[e(201)]&&this[e(235)](t):this.player.debugWarn(this[e(244)],e(223))}handleVideoH264Frames(t){const e=sf;let s=[],i=[],r=!1,n=!1;this.pendingUnits.units&&(s=this[e(174)][e(172)],n=this[e(174)][e(186)],r=this[e(174)][e(211)],this.pendingUnits={});let o={};for(let a of t){if(a[e(192)]<4)continue;const t=ah(a);let h=!1,c=t===Y[e(175)];(t===Y[e(255)]||t===Y.kSliceIDR)&&(o=this.parseVideo264Header(a),h=!0),s[e(249)]&&n&&(o[e(181)]||!h)&&(i[e(190)]({units:s,isIFrame:r}),s=[],r=!1,n=!1),s[e(190)](a),r=r||c,n=n||h}s[e(249)]&&(this[e(174)]={units:s,vcl:n,iFrame:r}),i.forEach((t=>{const s=e,i=t[s(172)],r=t[s(173)];let n=null,o=null;if(i[s(182)]((t=>{const e=s,i=31&t[0];switch(i){case Y.pps:this[e(272)]=t;break;case Y.sps:this.sps=t;break;case Y[e(273)]:o=t}if(ch(i)){const s=Pe(t);if(n){const t=new Uint8Array(n.byteLength+s[e(192)]);t[e(230)](n,0),t[e(230)](s,n[e(192)]),n=t}else n=s}})),!this[s(198)]&&this.sps&&this[s(272)]){this[s(198)]=!0;const t=nh({sps:this.sps,pps:this[s(272)]});this[s(256)](t,D[s(195)],0,!0,0),this[s(207)]=null,this[s(272)]=null}if(this[s(198)]){if(this[s(207)]&&this[s(272)]){const t=nh({sps:this[s(207)],pps:this[s(272)]}),e=this[s(248)];this._doDecode(t,D[s(195)],e,!0,0),this[s(207)]=null,this[s(272)]=null}if(n){!this[s(238)][s(263)][s(200)]&&(this.player[s(263)].demuxStart=je());const t=this[s(202)](),e=oh(n,r);if(this.player[s(274)][s(184)]&&o){const e=xe(o,!1);this[s(238)][s(232)]({ts:t,data:e[s(183)]})}this[s(224)](e,D[s(195)],t,r,0)}}}))}[sf(235)](t){const e=sf;let s=[],i=[],r=!1,n=!1;this.pendingUnits[e(172)]&&(s=this[e(174)].units,n=this[e(174)][e(186)],r=this[e(174)][e(211)],this.pendingUnits={});let o={};for(let a of t){if(a[e(192)]<4)continue;const t=Fh(a);let h=!1,c=Nh(t);Uh(t)&&(o=this[e(257)](a),h=!0),s[e(249)]&&n&&(o[e(181)]||!h)&&(i[e(190)]({units:s,isIFrame:r}),s=[],r=!1,n=!1),s[e(190)](a),r=r||c,n=n||h}s[e(249)]&&(this.pendingUnits={units:s,vcl:n,iFrame:r}),i[e(182)]((t=>{const s=e,i=t[s(172)],r=t[s(173)];let n=null,o=null;if(i.forEach((t=>{const e=s,i=t[0]>>>1&63;switch(i){case q[e(272)]:this[e(272)]=t;break;case q[e(207)]:this.sps=t;break;case q[e(271)]:this[e(271)]=t;break;case q[e(191)]:case q[e(218)]:o=t}if(Uh(i)){const s=Pe(t);if(n){const t=new Uint8Array(n[e(192)]+s[e(192)]);t[e(230)](n,0),t[e(230)](s,n[e(192)]),n=t}else n=s}})),!this[s(198)]&&this.sps&&this[s(272)]&&this[s(271)]){this.isSendSeqHeader=!0;const t=Ph({sps:this[s(207)],pps:this[s(272)],vps:this[s(271)]});this[s(256)](t,D[s(195)],0,!0,0),this[s(207)]=null,this[s(272)]=null,this.vps=null}if(this[s(198)]){if(this[s(207)]&&this.pps&&this.vps){const t=Ph({sps:this[s(207)],pps:this[s(272)],vps:this[s(271)]}),e=this[s(248)];this[s(256)](t,D.video,e,!0,0),this[s(207)]=null,this[s(272)]=null,this[s(271)]=null}if(n){!this[s(238)][s(263)][s(200)]&&(this[s(238)]._times.demuxStart=je());const t=this[s(202)](),e=Bh(n,r);if(this[s(238)][s(274)][s(184)]&&o){const e=xe(o,!0);this[s(238)][s(232)]({ts:t,data:e[s(183)]})}this[s(224)](e,D.video,t,r,0)}}}))}[sf(264)](t){const e=sf;t[e(182)]((t=>{this[e(250)](t)}))}[sf(259)](t){const e=sf,s=new ef(t);s[e(170)]();return{isfms:0===s[e(194)](),sType:s[e(194)]()}}[sf(257)](t){const e=sf,s=new ef(t);return s.readUByte(),{nalType:s[e(275)](6),isfms:0===s[e(275)](1),sType:s[e(275)](3)}}}function af(){var t=["130172qGFgVv","198988RLIYWD","TAG_NAME","65422ZTPkQR","27087XGzRao","player","783792rUzJeL","EmptyDemux","init","548526hXvrpe","destroy","419290ZxwTsZ","debugLog"];return(af=function(){return t})()}var hf=cf;function cf(t,e){var s=af();return(cf=function(t,e){return s[t-=397]})(t,e)}!function(t,e){for(var s=cf,i=t();;)try{if(141878===-parseInt(s(409))/1+-parseInt(s(397))/2+-parseInt(s(400))/3+parseInt(s(402))/4+parseInt(s(407))/5+parseInt(s(405))/6+parseInt(s(399))/7)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(af);class lf extends Dp{constructor(t){var e=cf;super(t),this[e(401)]=t,this[e(398)]=e(403),t[e(408)]("EmptyDemux",e(404))}[hf(406)](){var t=hf;super[t(406)](),this[t(401)][t(408)](t(403),"destroy")}}var df=pf;!function(t,e){for(var s=pf,i=t();;)try{if(229178===-parseInt(s(1228))/1*(-parseInt(s(196))/2)+-parseInt(s(1265))/3+-parseInt(s(1076))/4+parseInt(s(864))/5+parseInt(s(647))/6*(parseInt(s(1109))/7)+parseInt(s(778))/8*(parseInt(s(902))/9)+-parseInt(s(494))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ff);var uf=$t[df(1154)]((function(t,e){var s,r,n=df,o=(s=new Date,r=4,{setLogLevel:function(t){var e=pf;r=t==this[e(485)]?1:t==this[e(508)]?2:t==this.warn?3:(this[e(772)],4)},debug:function(t,e){var i=pf;void 0===console.debug&&(console[i(485)]=console[i(707)]),1>=r&&console[i(485)]("["+o[i(181)](new Date-s,1e3)+"]","["+t+"]",e)},log:function(t,e){var s=pf;this[s(485)](t[s(715)])},info:function(t,e){2>=r&&console.info("["+o.getDurationString(new Date-s,1e3)+"]","["+t+"]",e)},warn:function(t,e){var i=pf;3>=r&&console.warn("["+o[i(181)](new Date-s,1e3)+"]","["+t+"]",e)},error:function(t,e){var i=pf;4>=r&&console[i(772)]("["+o[i(181)](new Date-s,1e3)+"]","["+t+"]",e)}});o.getDurationString=function(t,e){var s,i=pf;function r(t,e){for(var s=pf,i=(""+t)[s(379)](".");i[0].length0){for(var i="",r=0;r0&&(i+=","),i+="["+o.getDurationString(t[e(969)](r))+","+o[e(181)](t[e(1207)](r))+"]";return i}return e(1188)},n(1266)!==n(751)&&(e[n(795)]=o);var a=function(t){var e=n;if(!(t instanceof ArrayBuffer))throw e(182);this[e(753)]=t,this[e(380)]=new DataView(t),this[e(883)]=0};a[n(1262)].getPosition=function(){return this[n(883)]},a[n(1262)][n(445)]=function(){var t=n;return this[t(753)][t(689)]},a[n(1262)][n(825)]=function(){var t=n;return this[t(753)][t(689)]},a[n(1262)][n(979)]=function(t){var e=n,s=Math.max(0,Math[e(496)](this[e(753)][e(689)],t));return this[e(883)]=isNaN(s)||!isFinite(s)?0:s,!0},a[n(1262)][n(416)]=function(){var t=n;return this[t(165)]()>=this[t(445)]()},a[n(1262)][n(602)]=function(t,e){var s=n,i=0;if(this.position+t<=this[s(753)][s(689)]){switch(t){case 1:i=e?this[s(380)][s(507)](this[s(883)]):this[s(380)][s(730)](this.position);break;case 2:i=e?this[s(380)][s(699)](this[s(883)]):this[s(380)][s(673)](this.position);break;case 3:if(e)throw"No method for reading signed 24 bits values";i=this[s(380)][s(730)](this[s(883)])<<16,i|=this[s(380)][s(730)](this.position+1)<<8,i|=this[s(380)].getUint8(this.position+2);break;case 4:i=e?this[s(380)].getInt32(this.position):this[s(380)][s(1023)](this[s(883)]);break;case 8:if(e)throw"No method for reading signed 64 bits values";i=this[s(380)][s(1023)](this[s(883)])<<32,i|=this[s(380)][s(1023)](this[s(883)]+4);break;default:throw s(286)+t}return this[s(883)]+=t,i}throw"Not enough bytes in buffer"},a[n(1262)][n(245)]=function(){return this[n(602)](1,!1)},a[n(1262)].readUint16=function(){return this[n(602)](2,!1)},a[n(1262)][n(400)]=function(){return this[n(602)](3,!1)},a[n(1262)][n(876)]=function(){return this.readAnyInt(4,!1)},a[n(1262)][n(814)]=function(){return this[n(602)](8,!1)},a[n(1262)][n(490)]=function(t){var e=n;if(this[e(883)]+t<=this[e(753)][e(689)]){for(var s="",i=0;ithis[e(897)]&&(this._byteLength=s);else{for(i<1&&(i=1);s>i;)i*=2;var r=new ArrayBuffer(i),o=new Uint8Array(this[e(711)]);new Uint8Array(r,0,o[e(348)]).set(o),this[e(753)]=r,this[e(897)]=s}}},h.prototype[n(408)]=function(){var t=n;if(this[t(897)]!=this[t(711)][t(689)]){var e=new ArrayBuffer(this[t(897)]),s=new Uint8Array(e),i=new Uint8Array(this[t(711)],0,s[t(348)]);s[t(1249)](i),this[t(753)]=e}},h[n(1135)]=!1,h.LITTLE_ENDIAN=!0,h[n(1262)][n(897)]=0,Object[n(266)](h[n(1262)],n(689),{get:function(){var t=n;return this[t(897)]-this[t(1203)]}}),Object[n(266)](h.prototype,n(753),{get:function(){var t=n;return this[t(408)](),this[t(711)]},set:function(t){var e=n;this[e(711)]=t,this[e(568)]=new DataView(this[e(711)],this[e(1203)]),this[e(897)]=this[e(711)][e(689)]}}),Object.defineProperty(h.prototype,"byteOffset",{get:function(){return this[n(1203)]},set:function(t){var e=n;this[e(1203)]=t,this[e(568)]=new DataView(this._buffer,this[e(1203)]),this[e(897)]=this[e(711)][e(689)]}}),Object[n(266)](h.prototype,n(515),{get:function(){return this[n(568)]},set:function(t){var e=n;this[e(1203)]=t[e(637)],this[e(711)]=t.buffer,this._dataView=new DataView(this._buffer,this._byteOffset),this[e(897)]=this[e(1203)]+t[e(689)]}}),h[n(1262)].seek=function(t){var e=n,s=Math[e(382)](0,Math[e(496)](this[e(689)],t));this[e(883)]=isNaN(s)||!isFinite(s)?0:s},h[n(1262)][n(433)]=function(){var t=n;return this[t(883)]>=this[t(897)]},h[n(1262)].mapUint8Array=function(t){var e=n;this[e(1341)](1*t);var s=new Uint8Array(this[e(711)],this.byteOffset+this[e(883)],t);return this.position+=1*t,s},h[n(1262)].readInt32Array=function(t,e){var s=n;t=null==t?this.byteLength-this[s(883)]/4:t;var i=new Int32Array(t);return h[s(1308)](i[s(753)],0,this[s(753)],this[s(637)]+this[s(883)],t*i.BYTES_PER_ELEMENT),h[s(561)](i,null==e?this[s(1025)]:e),this[s(883)]+=i.byteLength,i},h.prototype.readInt16Array=function(t,e){var s=n;t=null==t?this[s(689)]-this[s(883)]/2:t;var i=new Int16Array(t);return h[s(1308)](i[s(753)],0,this[s(753)],this.byteOffset+this[s(883)],t*i[s(546)]),h[s(561)](i,null==e?this[s(1025)]:e),this.position+=i.byteLength,i},h.prototype[n(573)]=function(t){var e=n;t=null==t?this[e(689)]-this.position:t;var s=new Int8Array(t);return h[e(1308)](s[e(753)],0,this[e(753)],this.byteOffset+this[e(883)],t*s[e(546)]),this[e(883)]+=s[e(689)],s},h[n(1262)][n(1310)]=function(t,e){var s=n;t=null==t?this[s(689)]-this[s(883)]/4:t;var i=new Uint32Array(t);return h[s(1308)](i[s(753)],0,this[s(753)],this[s(637)]+this[s(883)],t*i[s(546)]),h[s(561)](i,null==e?this.endianness:e),this[s(883)]+=i.byteLength,i},h[n(1262)][n(1039)]=function(t,e){var s=n;t=null==t?this[s(689)]-this[s(883)]/2:t;var i=new Uint16Array(t);return h[s(1308)](i[s(753)],0,this[s(753)],this[s(637)]+this[s(883)],t*i[s(546)]),h[s(561)](i,null==e?this[s(1025)]:e),this[s(883)]+=i[s(689)],i},h[n(1262)][n(289)]=function(t){var e=n;t=null==t?this[e(689)]-this[e(883)]:t;var s=new Uint8Array(t);return h[e(1308)](s[e(753)],0,this[e(753)],this[e(637)]+this[e(883)],t*s[e(546)]),this.position+=s[e(689)],s},h[n(1262)][n(669)]=function(t,e){var s=n;t=null==t?this[s(689)]-this.position/8:t;var i=new Float64Array(t);return h[s(1308)](i[s(753)],0,this[s(753)],this[s(637)]+this[s(883)],t*i[s(546)]),h.arrayToNative(i,null==e?this.endianness:e),this.position+=i[s(689)],i},h.prototype[n(718)]=function(t,e){var s=n;t=null==t?this[s(689)]-this.position/4:t;var i=new Float32Array(t);return h[s(1308)](i[s(753)],0,this.buffer,this.byteOffset+this[s(883)],t*i[s(546)]),h[s(561)](i,null==e?this[s(1025)]:e),this[s(883)]+=i.byteLength,i},h.prototype[n(155)]=function(t){var e=n,s=this[e(568)][e(1053)](this.position,null==t?this.endianness:t);return this[e(883)]+=4,s},h.prototype[n(977)]=function(t){var e=n,s=this[e(568)][e(699)](this[e(883)],null==t?this[e(1025)]:t);return this[e(883)]+=2,s},h[n(1262)][n(377)]=function(){var t=n,e=this[t(568)][t(507)](this.position);return this.position+=1,e},h[n(1262)].readUint32=function(t){var e=n,s=this[e(568)].getUint32(this[e(883)],null==t?this[e(1025)]:t);return this.position+=4,s},h[n(1262)][n(771)]=function(t){var e=n,s=this[e(568)].getUint16(this[e(883)],null==t?this[e(1025)]:t);return this[e(883)]+=2,s},h.prototype.readUint8=function(){var t=n,e=this[t(568)][t(730)](this[t(883)]);return this[t(883)]+=1,e},h.prototype.readFloat32=function(t){var e=n,s=this[e(568)][e(431)](this.position,null==t?this[e(1025)]:t);return this[e(883)]+=4,s},h[n(1262)].readFloat64=function(t){var e=n,s=this[e(568)].getFloat64(this[e(883)],null==t?this[e(1025)]:t);return this[e(883)]+=8,s},h.endianness=new Int8Array(new Int16Array([1])[n(753)])[0]>0,h[n(1308)]=function(t,e,s,i,r){var n=new Uint8Array(t,e,r),o=new Uint8Array(s,i,r);n.set(o)},h[n(561)]=function(t,e){var s=n;return e==this[s(1025)]?t:this[s(1290)](t)},h[n(942)]=function(t,e){return this[n(1025)]==e?t:this.flipArrayEndianness(t)},h[n(1290)]=function(t){for(var e=n,s=new Uint8Array(t.buffer,t[e(637)],t[e(689)]),i=0;io;r--,o++){var a=s[o];s[o]=s[r],s[r]=a}return t},h[n(1262)].failurePosition=0,String.fromCharCodeUint8=function(t){for(var e=n,s=[],i=0;i>16),this[e(1342)]((65280&t)>>8),this[e(1342)](255&t)},h.prototype.adjustUint32=function(t,e){var s=n,i=this[s(883)];this.seek(t),this.writeUint32(e),this[s(979)](i)},h[n(1262)][n(993)]=function(t,e){var s=n;this._realloc(4*t);var i=new Int32Array(this[s(711)],this[s(637)]+this[s(883)],t);return h[s(561)](i,null==e?this[s(1025)]:e),this[s(883)]+=4*t,i},h[n(1262)][n(811)]=function(t,e){var s=n;this[s(1341)](2*t);var i=new Int16Array(this[s(711)],this[s(637)]+this[s(883)],t);return h[s(561)](i,null==e?this[s(1025)]:e),this.position+=2*t,i},h[n(1262)].mapInt8Array=function(t){var e=n;this[e(1341)](1*t);var s=new Int8Array(this[e(711)],this[e(637)]+this[e(883)],t);return this[e(883)]+=1*t,s},h[n(1262)][n(1074)]=function(t,e){var s=n;this[s(1341)](4*t);var i=new Uint32Array(this._buffer,this[s(637)]+this[s(883)],t);return h[s(561)](i,null==e?this[s(1025)]:e),this[s(883)]+=4*t,i},h[n(1262)].mapUint16Array=function(t,e){var s=n;this._realloc(2*t);var i=new Uint16Array(this[s(711)],this[s(637)]+this[s(883)],t);return h[s(561)](i,null==e?this[s(1025)]:e),this[s(883)]+=2*t,i},h.prototype.mapFloat64Array=function(t,e){var s=n;this[s(1341)](8*t);var i=new Float64Array(this[s(711)],this[s(637)]+this[s(883)],t);return h[s(561)](i,null==e?this[s(1025)]:e),this[s(883)]+=8*t,i},h[n(1262)][n(254)]=function(t,e){var s=n;this[s(1341)](4*t);var i=new Float32Array(this[s(711)],this.byteOffset+this[s(883)],t);return h[s(561)](i,null==e?this[s(1025)]:e),this[s(883)]+=4*t,i};var l=function(t){var e=n;this[e(949)]=[],this[e(299)]=-1,t&&(this[e(831)](t),this[e(299)]=0)};l[n(1262)]=new h(new ArrayBuffer,0,h.BIG_ENDIAN),l[n(1262)][n(646)]=function(){var t,e=n;return this[e(299)]>-1||(this.buffers.length>0?0===(t=this[e(949)][0])[e(164)]?(this[e(753)]=t,this[e(299)]=0,o[e(485)](e(894),e(540)),!0):(this[e(924)](),!1):(this.logBufferLevel(),!1))},ArrayBuffer[n(576)]=function(t,e){var s=n;o[s(485)]("ArrayBuffer",s(851)+(t.byteLength+e.byteLength));var i=new Uint8Array(t.byteLength+e[s(689)]);return i[s(1249)](new Uint8Array(t),0),i.set(new Uint8Array(e),t[s(689)]),i[s(753)]},l[n(1262)][n(1309)]=function(t,e,s){var i,r=n;return(i=new Uint8Array(s))[r(1249)](new Uint8Array(t,e,s)),i[r(753)].fileStart=t[r(164)]+e,i.buffer[r(186)]=0,i[r(753)]},l[n(1262)][n(831)]=function(t){for(var e=n,s=!0,i=0;ir[e(689)]){this[e(949)][e(590)](i,1),i--;continue}}else t[e(164)]+t[e(689)]<=r[e(164)]||(t=this[e(1309)](t,0,r[e(164)]-t[e(164)])),o.debug(e(894),e(635)+t[e(164)]+e(1245)+t[e(689)]+")"),this[e(949)][e(590)](i,0,t),0===i&&(this[e(753)]=t);s=!1;break}if(t[e(164)]0)){s=!1;break}t=this[e(1309)](t,a,h)}}s&&(o[e(485)](e(894),e(635)+t[e(164)]+e(1245)+t[e(689)]+")"),this.buffers[e(1031)](t),0===i&&(this.buffer=t))},l[n(1262)].logBufferLevel=function(t){var e,s,i,r,a,h=n,c=[],l="";for(i=0,r=0,e=0;e0&&(l+=a.end-1+"]");var d=t?o[h(508)]:o[h(485)];0===this[h(949)].length?d(h(894),"No more buffer in memory"):d(h(894),""+this[h(949)][h(348)]+h(1001)+i+"/"+r+" bytes), continuous ranges: "+l)},l[n(1262)][n(569)]=function(){var t,e,s=n;for(t=0;t"+this[e(753)][e(689)]+")"),!0}return!1}return!1},l[n(1262)][n(238)]=function(t,e,s){var i,r=n,a=null,h=-1;for(i=!0===t?0:this.bufferIndex;i=e?(o[r(485)](r(894),r(371)+h),h):-1:-1},l.prototype[n(535)]=function(t){var e,s,i,r=n,o=void 0!==t?t:this[r(299)];if(s=this[r(949)][o],this[r(949)][r(348)]>o+1)for(e=o+1;e>3;return 31===n&&r[s(1080)][s(348)]>=2&&(n=32+((7&r.data[0])<<3)+((224&r[s(1080)][1])>>5)),n}return null},i[t(307)]=function(e){var s=t;i[s(1302)][s(1134)](this,4,e)},i[t(307)][t(1262)]=new(i[t(1302)]),i[t(307)].prototype[t(514)]=function(e){var s=t;this[s(888)]=e[s(245)](),this[s(1256)]=e[s(245)](),this[s(279)]=0!=(this[s(1256)]>>1&1),this[s(1256)]=this[s(1256)]>>>2,this.bufferSize=e.readUint24(),this[s(201)]=e[s(876)](),this.avgBitrate=e[s(876)](),this[s(532)]-=13,this[s(1037)](e)},i.DecoderSpecificInfo=function(e){var s=t;i[s(1302)][s(1134)](this,5,e)},i[t(481)][t(1262)]=new i.Descriptor,i[t(790)]=function(e){var s=t;i[s(1302)][s(1134)](this,6,e)},i.SLConfigDescriptor.prototype=new i.Descriptor,this};e.MPEG4DescriptorParser=d;var u={ERR_INVALID_DATA:-1,ERR_NOT_ENOUGH_DATA:0,OK:1,BASIC_BOXES:[n(1151),n(1329),n(1301),n(728),n(960),n(627)],FULL_BOXES:["hmhd","nmhd","iods","xml ","bxml",n(684),"mere"],CONTAINER_BOXES:[[n(620),["trak",n(841)]],["trak"],[n(1020)],["mdia"],[n(774)],[n(914)],[n(374),[n(520),n(748)]],[n(330),[n(621)]],["moof",[n(210)]],[n(210),[n(242),n(520),"sbgp"]],[n(465)],[n(607)],[n(1351)],[n(1220),["tfra"]],["meco"],[n(296)],[n(834)],["strk"],[n(1264)],[n(740)],[n(567)],[n(716)],[n(517)],[n(1118),[n(994)]],[n(1191),[n(152)]],["ipco"],["grpl"],[n(828)],[n(906),[n(1066)]]],boxCodes:[],fullBoxCodes:[],containerBoxCodes:[],sampleEntryCodes:{},sampleGroupEntryCodes:[],trackGroupTypes:[],UUIDBoxes:{},UUIDs:[],initialize:function(){var t=n;u[t(435)][t(1262)]=new(u[t(919)]),u[t(732)][t(1262)]=new(u[t(919)]),u[t(770)][t(1262)]=new(u[t(919)]),u.TrackGroupTypeBox[t(1262)]=new(u[t(435)]),u.BASIC_BOXES.forEach((function(t){u.createBoxCtor(t)})),u.FULL_BOXES[t(1049)]((function(e){u[t(630)](e)})),u[t(1054)].forEach((function(e){u[t(297)](e[0],null,e[1])}))},Box:function(t,e,s){var i=n;this[i(809)]=t,this[i(532)]=e,this[i(1338)]=s},FullBox:function(t,e,s){var i=n;u[i(919)][i(1134)](this,t,e,s),this.flags=0,this.version=0},ContainerBox:function(t,e,s){var i=n;u[i(919)][i(1134)](this,t,e,s),this[i(1077)]=[]},SampleEntry:function(t,e,s,i){var r=n;u.ContainerBox[r(1134)](this,t,e),this[r(959)]=s,this[r(969)]=i},SampleGroupEntry:function(t){this[n(1312)]=t},TrackGroupTypeBox:function(t,e){u[n(435)].call(this,t,e)},createBoxCtor:function(t,e){var s=n;u[s(721)][s(1031)](t),u[t+s(919)]=function(e){var i=s;u[i(919)][i(1134)](this,t,e)},u[t+s(919)][s(1262)]=new(u[s(919)]),e&&(u[t+s(919)][s(1262)].parse=e)},createFullBoxCtor:function(t,e){var s=n;u[t+s(919)]=function(e){var i=s;u[i(435)][i(1134)](this,t,e)},u[t+s(919)][s(1262)]=new(u[s(435)]),u[t+"Box"].prototype[s(514)]=function(t){var i=s;this[i(601)](t),e&&e[i(1134)](this,t)}},addSubBoxArrays:function(t){if(t){this.subBoxNames=t;for(var e=t.length,s=0;ss?{code:u[h(928)],type:p,size:d,hdr_size:l,start:c}:0!==d&&c+d>t[h(445)]()?(t[h(979)](c),{code:u.ERR_NOT_ENOUGH_DATA,type:p,size:d,hdr_size:l,start:c}):e?{code:u.OK,type:p,size:d,hdr_size:l,start:c}:(u[p+"Box"]?i=new(u[p+h(919)])(d):p!==h(1338)?(i=new u.Box(p,d))[h(378)]=!0:u[h(1090)][a]?i=new(u[h(1090)][a])(d):((i=new(u[h(919)])(p,d))[h(1338)]=a,i.has_unparsed_data=!0),i[h(959)]=l,i[h(969)]=c,i.write===u[h(919)][h(1262)][h(955)]&&i[h(809)]!==h(1151)&&i[h(1059)](t),i.parse(t),(r=t[h(165)]()-(i[h(969)]+i.size))<0?t.seek(i[h(969)]+i[h(532)]):r>0&&0!==i.size&&t[h(979)](i[h(969)]+i[h(532)]),{code:u.OK,box:i,size:i[h(532)]})},u[n(919)][n(1262)][n(514)]=function(t){var e=n;this.type!=e(1151)?this[e(1080)]=t[e(289)](this[e(532)]-this.hdr_size):0===this[e(532)]?t[e(979)](t[e(445)]()):t[e(979)](this[e(969)]+this[e(532)])},u[n(919)][n(1262)][n(1059)]=function(t){var e=n;this[e(1080)]=t[e(289)](this[e(532)]-this.hdr_size),t[e(883)]-=this[e(532)]-this.hdr_size},u[n(435)][n(1262)][n(1059)]=function(t){var e=n;this[e(601)](t),this.data=t[e(289)](this[e(532)]-this[e(959)]),this[e(959)]-=4,t.position-=this[e(532)]-this[e(959)]},u[n(435)].prototype[n(601)]=function(t){var e=n;this[e(513)]=t[e(245)](),this[e(312)]=t[e(400)](),this[e(959)]+=4},u[n(435)][n(1262)].parse=function(t){var e=n;this.parseFullHeader(t),this[e(1080)]=t.readUint8Array(this.size-this[e(959)])},u[n(732)][n(1262)][n(514)]=function(t){for(var e,s,i=n;t[i(165)]()>10&31,s[1]=this.language>>5&31,s[2]=31&this[e(424)],this[e(1183)]=String[e(789)](s[0]+96,s[1]+96,s[2]+96)},u[n(1012)]="Visual",u[n(366)]=n(729),u.SAMPLE_ENTRY_TYPE_HINT=n(151),u[n(403)]=n(399),u[n(1222)]=n(764),u[n(572)]="System",u[n(1196)]=n(910),u[n(770)][n(1262)][n(169)]=function(t){var e=n;t[e(289)](6),this[e(1148)]=t[e(771)](),this[e(959)]+=8},u.SampleEntry[n(1262)][n(514)]=function(t){var e=n;this[e(169)](t),this[e(1080)]=t[e(289)](this[e(532)]-this[e(959)])},u[n(770)].prototype[n(1059)]=function(t){var e=n;this[e(169)](t),this.data=t[e(289)](this[e(532)]-this.hdr_size),this[e(959)]-=8,t[e(883)]-=this[e(532)]-this[e(959)]},u.SampleEntry.prototype[n(963)]=function(t){var e=n;u.ContainerBox.prototype.parse[e(1134)](this,t)},u.createMediaSampleEntryCtor(u.SAMPLE_ENTRY_TYPE_HINT),u[n(800)](u.SAMPLE_ENTRY_TYPE_METADATA),u[n(800)](u[n(1222)]),u.createMediaSampleEntryCtor(u[n(572)]),u[n(800)](u[n(1196)]),u.createMediaSampleEntryCtor(u[n(1012)],(function(t){var e,s=n;this[s(169)](t),t[s(771)](),t[s(771)](),t.readUint32Array(3),this.width=t[s(771)](),this[s(856)]=t[s(771)](),this[s(978)]=t[s(876)](),this[s(694)]=t[s(876)](),t[s(876)](),this.frame_count=t.readUint16(),e=Math[s(496)](31,t[s(245)]()),this[s(988)]=t[s(490)](e),e<31&&t[s(490)](31-e),this[s(1324)]=t[s(771)](),t[s(771)](),this[s(963)](t)})),u[n(800)](u[n(366)],(function(t){var e=n;this[e(169)](t),t.readUint32Array(2),this[e(865)]=t[e(771)](),this[e(281)]=t[e(771)](),t[e(771)](),t[e(771)](),this[e(1240)]=t.readUint32()/65536,this[e(963)](t)})),u.createSampleEntryCtor(u[n(1012)],n(578)),u.createSampleEntryCtor(u[n(1012)],n(1097)),u[n(176)](u[n(1012)],n(477)),u[n(176)](u[n(1012)],n(832)),u[n(176)](u[n(1012)],n(927)),u[n(176)](u[n(1012)],"dav1"),u[n(176)](u.SAMPLE_ENTRY_TYPE_VISUAL,n(810)),u[n(176)](u[n(1012)],"hev1"),u[n(176)](u.SAMPLE_ENTRY_TYPE_VISUAL,"hvt1"),u[n(176)](u[n(1012)],n(293)),u.createSampleEntryCtor(u[n(1012)],n(615)),u[n(176)](u[n(1012)],n(1248)),u[n(176)](u[n(1012)],n(956)),u.createSampleEntryCtor(u[n(1012)],n(1112)),u.createSampleEntryCtor(u[n(1012)],"vvs1"),u[n(176)](u[n(1012)],n(911)),u[n(176)](u[n(1012)],n(869)),u[n(176)](u[n(1012)],n(1149)),u[n(176)](u.SAMPLE_ENTRY_TYPE_VISUAL,n(264)),u[n(176)](u[n(1012)],n(544)),u[n(176)](u.SAMPLE_ENTRY_TYPE_VISUAL,n(859)),u[n(176)](u[n(1012)],"mjpg"),u[n(176)](u.SAMPLE_ENTRY_TYPE_VISUAL,n(1287)),u.createSampleEntryCtor(u[n(366)],"mp4a"),u[n(176)](u.SAMPLE_ENTRY_TYPE_AUDIO,n(921)),u[n(176)](u[n(366)],n(361)),u[n(176)](u[n(366)],n(147)),u[n(176)](u[n(366)],n(551)),u[n(176)](u[n(366)],n(975)),u[n(176)](u[n(366)],"mha2"),u[n(176)](u[n(366)],n(1213)),u[n(176)](u[n(366)],"mhm2"),u[n(1315)](u[n(1012)],"encv"),u[n(1315)](u[n(366)],"enca"),u.createEncryptedSampleEntryCtor(u[n(1222)],n(944)),u[n(1315)](u[n(572)],"encs"),u[n(1315)](u.SAMPLE_ENTRY_TYPE_TEXT,n(257)),u.createEncryptedSampleEntryCtor(u[n(403)],n(622)),u[n(915)](n(218),(function(t){var e=n,s=16*(1+(1&(1&t[e(245)]())));this[e(644)]=[];for(var i=0;i<3;i++)this[e(644)][i]=16==s?t[e(771)]():t[e(876)]()})),u[n(915)](n(643),(function(t){var e=n;this[e(860)]=t[e(245)]()})),u[n(630)](n(672),(function(t){var e=n;this[e(1214)]=t[e(1353)]();var s=this[e(532)]-this[e(959)]-(this[e(1214)][e(348)]+1);this[e(1364)]=t[e(289)](s)})),u[n(915)](n(706),(function(t){var e=n,s=t[e(245)]();if(!(s>>7&!1)&&(this[e(513)]=127&s,1===this.version&&(s=t[e(245)](),this[e(450)]=s>>5&7,this[e(193)]=31&s,s=t[e(245)](),this.seq_tier_0=s>>7&1,this[e(805)]=s>>6&1,this[e(231)]=s>>5&1,this[e(909)]=s>>4&1,this.chroma_subsampling_x=s>>3&1,this.chroma_subsampling_y=s>>2&1,this.chroma_sample_position=3&s,s=t.readUint8(),this[e(886)]=s>>5&7,0===this.reserved_1))){if(this[e(290)]=s>>4&1,1===this[e(290)])this.initial_presentation_delay_minus_one=15&s;else if(this[e(203)]=15&s,0!==this[e(203)])return;var i=this[e(532)]-this[e(959)]-4;this[e(1327)]=t[e(289)](i)}})),u[n(915)](n(739),(function(t){var e,s,i=n;for(this[i(1047)]=t[i(245)](),this[i(618)]=t[i(245)](),this.profile_compatibility=t.readUint8(),this[i(1180)]=t[i(245)](),this[i(288)]=3&t.readUint8(),this[i(368)]=31&t[i(245)](),s=this[i(532)]-this[i(959)]-6,this[i(360)]=[],e=0;e0&&(this.ext=t[i(289)](s))})),u[n(915)](n(783),(function(t){var e=n;this.bufferSizeDB=t[e(876)](),this[e(201)]=t[e(876)](),this[e(913)]=t[e(876)]()})),u[n(630)]("ccst",(function(t){var e=n,s=t[e(245)]();this[e(323)]=128==(128&s),this[e(1010)]=64==(64&s),this.max_ref_per_pic=(63&s)>>2,t.readUint24()})),u.createBoxCtor("cdef",(function(t){var e,s=n;for(this[s(865)]=t.readUint16(),this[s(249)]=[],this[s(459)]=[],this[s(243)]=[],e=0;e=32768&&this.component_type_urls.push(t.readCString())}})),u[n(630)](n(541),(function(t){var e,s,i=n;if(e=t[i(876)](),this[i(191)]=[],0===this[i(513)])for(s=0;s>7}else(this[e(1217)]===e(1307)||"prof"===this[e(1217)])&&(this[e(587)]=t[e(289)](this[e(532)]-4))})),u[n(630)](n(779),(function(t){var e=n;this[e(329)](t),this[e(1048)]=t[e(1353)]()})),u.createFullBoxCtor("cslg",(function(t){var e=n;0===this[e(513)]&&(this[e(595)]=t[e(155)](),this[e(1105)]=t[e(155)](),this.greatestDecodeToDisplayDelta=t[e(155)](),this[e(1040)]=t[e(155)](),this[e(227)]=t[e(155)]())})),u[n(630)]("ctts",(function(t){var e,s,i=n;if(e=t[i(876)](),this[i(396)]=[],this[i(1271)]=[],0===this[i(513)])for(s=0;s>6,this[e(1075)]=s>>1&31,this[e(665)]=(1&s)<<2|i>>6&3,this[e(1060)]=i>>3&7,this[e(852)]=i>>2&1,this[e(346)]=3&i|r>>5&7})),u[n(915)](n(1108),(function(t){var e=n,s=t[e(771)]();this.data_rate=s>>3,this[e(270)]=7&s,this[e(1009)]=[];for(var i=0;i>6,r[e(1075)]=o>>1&31,r.bsmod=(1&o)<<4|a>>4&15,r.acmod=a>>1&7,r[e(852)]=1&a,r[e(612)]=h>>1&15,r[e(612)]>0&&(r[e(1227)]=(1&h)<<8|t.readUint8())}})),u[n(630)]("dfLa",(function(t){var e=n,s=[],i=["STREAMINFO",e(724),e(1211),e(1286),e(967),e(308),e(603),"RESERVED"];for(this[e(601)](t);;){var r=t[e(245)](),o=Math.min(127&r,i.length-1);if(o?t[e(289)](t[e(400)]()):(t[e(289)](13),this.samplerate=t[e(876)]()>>12,t[e(289)](20)),s[e(1031)](i[o]),128&r)break}this[e(462)]=s[e(348)]+" ("+s.join(", ")+")"})),u[n(915)]("dimm",(function(t){var e=n;this[e(1182)]=t[e(814)]()})),u[n(915)]("dmax",(function(t){this[n(274)]=t.readUint32()})),u[n(915)](n(200),(function(t){var e=n;this[e(1182)]=t[e(814)]()})),u[n(915)](n(804),(function(t){var e=n;if(this[e(239)]=t[e(245)](),this.OutputChannelCount=t.readUint8(),this[e(1244)]=t[e(771)](),this[e(1313)]=t.readUint32(),this[e(503)]=t[e(977)](),this[e(305)]=t[e(245)](),0!==this.ChannelMappingFamily){this[e(943)]=t.readUint8(),this[e(743)]=t[e(245)](),this.ChannelMapping=[];for(var s=0;s=4;)this[e(1086)][i]=t[e(490)](4),s-=4,i++})),u[n(630)](n(398),(function(t){var e=n;0===this[e(513)]&&(t[e(876)](),this.handler=t[e(490)](4),t[e(1310)](3),this.name=t.readString(this[e(532)]-this.hdr_size-20),"\0"===this[e(463)][this.name.length-1]&&(this[e(463)]=this[e(463)].slice(0,-1)))})),u[n(915)]("hvcC",(function(t){var e,s,i,r,o=n;this[o(1047)]=t[o(245)](),r=t[o(245)](),this[o(1044)]=r>>6,this[o(957)]=(32&r)>>5,this[o(1155)]=31&r,this[o(838)]=t[o(876)](),this[o(519)]=t.readUint8Array(6),this[o(889)]=t[o(245)](),this[o(972)]=4095&t.readUint16(),this[o(304)]=3&t[o(245)](),this.chroma_format_idc=3&t[o(245)](),this[o(918)]=7&t[o(245)](),this[o(429)]=7&t[o(245)](),this.avgFrameRate=t[o(771)](),r=t.readUint8(),this[o(1173)]=r>>6,this.numTemporalLayers=(13&r)>>3,this[o(600)]=(4&r)>>2,this[o(288)]=3&r,this[o(1117)]=[];var a=t[o(245)]();for(e=0;e>7,h[o(697)]=63&r;var c=t[o(771)]();for(s=0;s>4&15,this[s(300)]=15&e,e=t[s(245)](),this[s(405)]=e>>4&15,1===this[s(513)]||2===this.version?this[s(1344)]=15&e:this[s(1344)]=0,this[s(796)]=[];var i=0;if(this[s(513)]<2)i=t[s(771)]();else{if(2!==this.version)throw s(504);i=t[s(876)]()}for(var r=0;r>7,this[e(754)]=1&s})),u[n(630)]("infe",(function(t){var e=n;if((0===this[e(513)]||1===this[e(513)])&&(this.item_ID=t[e(771)](),this[e(693)]=t[e(771)](),this[e(345)]=t[e(1353)](),this[e(1175)]=t[e(1353)](),this[e(768)]=t[e(1353)]()),1===this[e(513)])return this[e(1316)]=t[e(490)](4),void t[e(979)](this.start+this[e(532)]);this[e(513)]>=2&&(2===this.version?this.item_ID=t[e(771)]():3===this[e(513)]&&(this.item_ID=t.readUint32()),this[e(693)]=t[e(771)](),this.item_type=t[e(490)](4),this.item_name=t[e(1353)](),"mime"===this[e(917)]?(this[e(1175)]=t[e(1353)](),this[e(768)]=t[e(1353)]()):"uri "===this.item_type&&(this.item_uri_type=t[e(1353)]()))})),u.createFullBoxCtor(n(152),(function(t){var e,s,i=n;for(entry_count=t.readUint32(),this[i(755)]=[],e=0;e>7==1,1&this[i(312)]?h[i(1354)]=(127&a)<<8|t[i(245)]():h[i(1354)]=127&a}}})),u[n(630)](n(1351),(function(t){var e,s,i=n;for(this[i(848)]=[];t.getPosition()>7,r[e(1330)]=127&o,r[e(1330)]){case 0:r[e(1312)]=t.readString(4);break;case 1:r[e(1312)]=t[e(490)](4),r[e(714)]=t[e(876)]();break;case 2:case 3:break;case 4:r[e(664)]=t[e(876)]()}}})),u[n(915)](n(1073),(function(t){var e=n;this.layer_id=t[e(771)]()})),u[n(915)](n(369),(function(t){var e=n;this[e(1288)]=t[e(876)](),this.bytes=t[e(876)]()})),p[n(1262)][n(1210)]=function(){return"("+this.x+","+this.y+")"},u[n(915)](n(1032),(function(t){var e=n;this[e(1165)]=[],this.display_primaries[0]=new p(t[e(771)](),t[e(771)]()),this.display_primaries[1]=new p(t[e(771)](),t[e(771)]()),this.display_primaries[2]=new p(t[e(771)](),t[e(771)]()),this[e(1140)]=new p(t[e(771)](),t[e(771)]()),this[e(628)]=t[e(876)](),this[e(1094)]=t.readUint32()})),u[n(630)](n(649),(function(t){var e=n;1==this[e(513)]?(this[e(198)]=t.readUint64(),this[e(206)]=t.readUint64(),this[e(866)]=t[e(876)](),this[e(256)]=t[e(814)]()):(this[e(198)]=t.readUint32(),this[e(206)]=t[e(876)](),this.timescale=t[e(876)](),this[e(256)]=t[e(876)]()),this[e(329)](t),t[e(771)]()})),u.createFullBoxCtor("mehd",(function(t){var e=n;1&this[e(312)]&&(this[e(513)]=1),1==this[e(513)]?this.fragment_duration=t[e(814)]():this[e(757)]=t.readUint32()})),u[n(630)](n(1221),(function(t){var e=n;this[e(1077)]=[],u[e(732)][e(1262)][e(514)].call(this,t)})),u[n(630)](n(658),(function(t){var e=n;this[e(863)]=t[e(876)]()})),u[n(630)]("mfro",(function(t){var e=n;this[e(1088)]=t[e(876)]()})),u.createFullBoxCtor(n(1050),(function(t){var e=n;this[e(985)]=t[e(245)]()})),u.createFullBoxCtor(n(717),(function(t){var e=n;1==this.version?(this[e(198)]=t.readUint64(),this[e(206)]=t[e(814)](),this[e(866)]=t.readUint32(),this[e(256)]=t[e(814)]()):(this[e(198)]=t[e(876)](),this.modification_time=t.readUint32(),this[e(866)]=t.readUint32(),this[e(256)]=t[e(876)]()),this[e(442)]=t[e(876)](),this[e(813)]=t[e(771)]()>>8,t[e(771)](),t[e(1310)](2),this[e(212)]=t[e(1310)](9),t[e(1310)](6),this[e(1163)]=t[e(876)]()})),u.createBoxCtor("npck",(function(t){var e=n;this[e(1204)]=t[e(876)]()})),u[n(915)](n(777),(function(t){this[n(1204)]=t.readUint64()})),u.createFullBoxCtor("padb",(function(t){var e=n,s=t[e(876)]();this[e(878)]=[];for(var i=0;i0){var s=t[e(876)]();this[e(589)]=[];for(var i=0;i0&&(this[e(1080)]=t[e(289)](r))})),u[n(630)](n(195),(function(t){var e=n;this[e(528)]=t[e(876)](),this[e(856)]=t[e(876)]()})),u[n(630)](n(550),(function(t){var e=n;this[e(528)]=t[e(876)](),this[e(856)]=t[e(876)]()})),u.createFullBoxCtor(n(679),(function(t){var e=n;this[e(528)]=t[e(876)](),this[e(856)]=t[e(876)]()})),u[n(297)](n(916),null,["clef",n(679),"enof"]),u[n(915)](n(962),(function(t){var e=n;this[e(251)]=t[e(490)](4),this.sdptext=t[e(490)](this[e(532)]-this[e(959)]-4)})),u.createFullBoxCtor(n(310),(function(t){var e=n;1&this[e(312)]&&(this[e(335)]=t[e(876)](),this[e(1121)]=t[e(876)]());var s=t[e(876)]();this[e(737)]=[];for(var i=0;i>7,this.avgRateFlag=s>>6&1,this[e(453)]&&(this.duration=t.readUint32()),this[e(776)]&&(this.accurateStatisticsFlag=t[e(245)](),this[e(837)]=t[e(771)](),this[e(709)]=t[e(771)]()),this.dependency=[];for(var i=t[e(245)](),r=0;r>7,this[e(478)]=127&s})),u[n(846)](n(1051),(function(t){var e=n;if(this[e(1123)]=t[e(771)](),this[e(895)]!==2+(1===this[e(1123)]?2:6*this.operation_point_count)+9)this[e(1080)]=t[e(289)](this[e(895)]-2);else{if(1===this[e(1123)])this[e(1279)]=t[e(771)]();else{this[e(1279)]=[],this.available_bitrate=[];for(var s=0;s>4,this[e(875)]=15&s,this[e(273)]=t[e(245)](),this[e(1153)]=t[e(245)](),this.KID=u[e(1230)](t),this[e(457)]=0,this[e(219)]=0,1===this.isProtected&&0===this[e(1153)]&&(this[e(457)]=t.readUint8(),this[e(219)]=t.readUint8Array(this[e(457)]))})),u[n(846)]("stsa",(function(t){})),u[n(846)](n(1150),(function(t){var e=n,s=t[e(245)]();this[e(1321)]=63&s})),u[n(846)](n(501),(function(t){var e=n,s=t[e(245)]();this[e(599)]=s>>7})),u.createSampleGroupCtor("tsas",(function(t){})),u.createSampleGroupCtor("tscl",(function(t){})),u[n(846)](n(1152),(function(t){})),u[n(630)](n(748),(function(t){var e=n;this[e(1312)]=t.readString(4),1===this.version?this[e(714)]=t.readUint32():this.grouping_type_parameter=0,this.entries=[];for(var s=t[e(876)](),i=0;i>6,this[s(492)][r]=e>>4&3,this.sample_is_depended_on[r]=e>>2&3,this[s(920)][r]=3&e})),u.createFullBoxCtor(n(824)),u[n(630)](n(520),(function(t){var e=n;this[e(1312)]=t.readString(4),o[e(485)](e(594),e(1326)+this[e(1312)]),1===this[e(513)]?this[e(1064)]=t.readUint32():this.default_length=0,this[e(513)]>=2&&(this[e(1115)]=t[e(876)]()),this[e(1120)]=[];for(var s=t[e(876)](),i=0;i>31&1,r[e(677)]=2147483647&o,r[e(1274)]=t[e(876)](),o=t[e(876)](),r.starts_with_SAP=o>>31&1,r[e(930)]=o>>28&7,r[e(1306)]=268435455&o}})),u[n(780)]=function(t,e,s,i){var r=n;u[r(919)][r(1134)](this,t,e),this[r(959)]=s,this.start=i},u[n(780)][n(1262)]=new(u[n(919)]),u[n(780)][n(1262)][n(514)]=function(t){var e=n;this[e(295)]=t.readUint16();var s=t[e(771)]();this.references=[];for(var i=0;i>4&15,this[i(784)][e+1]=15&r}else if(8===this.field_size)for(e=0;e0)for(s=0;s>4&15,this[e(375)]=15&s}this.default_isProtected=t[e(245)](),this[e(1139)]=t[e(245)](),this[e(887)]=u[e(1230)](t),1===this[e(801)]&&0===this[e(1139)]&&(this[e(1024)]=t.readUint8(),this[e(803)]=t[e(289)](this.default_constant_IV_size))})),u[n(630)](n(871),(function(t){var e=n;1==this[e(513)]?this[e(1297)]=t.readUint64():this[e(1297)]=t[e(876)]()})),u[n(630)](n(826),(function(t){var e=n,s=0;this.track_id=t[e(876)](),this[e(532)]-this[e(959)]>s&&this[e(312)]&u[e(581)]?(this[e(855)]=t[e(814)](),s+=8):this[e(855)]=0,this.size-this[e(959)]>s&&this.flags&u[e(259)]?(this.default_sample_description_index=t[e(876)](),s+=4):this[e(940)]=0,this[e(532)]-this[e(959)]>s&&this[e(312)]&u[e(591)]?(this[e(613)]=t[e(876)](),s+=4):this[e(613)]=0,this[e(532)]-this.hdr_size>s&&this[e(312)]&u[e(842)]?(this[e(1253)]=t[e(876)](),s+=4):this[e(1253)]=0,this[e(532)]-this.hdr_size>s&&this[e(312)]&u.TFHD_FLAG_SAMPLE_FLAGS?(this[e(436)]=t[e(876)](),s+=4):this[e(436)]=0})),u[n(630)](n(1052),(function(t){var e=n;this[e(1136)]=t.readUint32(),t.readUint24();var s=t[e(245)]();this[e(645)]=s>>4&3,this.length_size_of_trun_num=s>>2&3,this.length_size_of_sample_num=3&s,this[e(1120)]=[];for(var i=t[e(876)](),r=0;r>8,t[e(771)](),this.matrix=t.readInt32Array(9),this[e(528)]=t[e(876)](),this[e(856)]=t[e(876)]()})),u[n(915)](n(1376),(function(t){var e=n;this[e(274)]=t[e(876)]()})),u.createBoxCtor(n(891),(function(t){var e=n;this[e(274)]=t[e(876)]()})),u[n(915)](n(554),(function(t){var e=n;this[e(1182)]=t[e(876)]()})),u[n(915)](n(301),(function(t){var e=n;this.bytessent=t[e(876)]()})),u[n(915)](n(338),(function(t){var e=n;this[e(1182)]=t[e(814)]()})),u[n(1170)][n(1262)][n(514)]=function(t){var e=n;this[e(601)](t),this[e(188)]=t[e(876)]()},u[n(1360)]("msrc"),u[n(493)]=function(t,e,s,i){var r=n;u[r(919)][r(1134)](this,t,e),this.hdr_size=s,this[r(969)]=i},u[n(493)][n(1262)]=new(u[n(919)]),u[n(493)][n(1262)].parse=function(t){var e=n;this[e(276)]=t[e(1310)]((this[e(532)]-this[e(959)])/4)},u[n(1212)][n(1262)][n(514)]=function(t){for(var e,s,i=n;t.getPosition()s&&this.flags&u[e(912)]?(this[e(608)]=t[e(155)](),s+=4):this[e(608)]=0,this[e(532)]-this[e(959)]>s&&this[e(312)]&u.TRUN_FLAGS_FIRST_FLAG?(this[e(1085)]=t[e(876)](),s+=4):this[e(1085)]=0,this[e(623)]=[],this.sample_size=[],this[e(1304)]=[],this[e(220)]=[],this[e(532)]-this[e(959)]>s)for(var i=0;i>7&1,this.block_pad_lsb=i>>6&1,this[s(1337)]=i>>5&1,this[s(1071)]=i>>4&1,this[s(215)]=i>>3&1,this.pixel_size=t[s(876)](),this[s(422)]=t[s(876)](),this[s(284)]=t[s(876)](),this[s(671)]=t.readUint32(),this[s(331)]=t.readUint32()}})),u.createFullBoxCtor(n(1101),(function(t){var e=n;1!==this[e(312)]&&(this[e(474)]=t[e(1353)]())})),u[n(630)]("urn ",(function(t){var e=n;this[e(463)]=t[e(1353)](),this[e(532)]-this[e(959)]-this[e(463)].length-1>0&&(this[e(474)]=t[e(1353)]())})),u[n(686)]("a5d40b30e81411ddba2f0800200c9a66",!0,!1,(function(t){var e=n;this[e(446)]=t[e(490)](this[e(532)]-this[e(959)]).replace(/&/g,e(1189)).replace(//g,">")[e(1008)](/"/g,e(1158))[e(1008)](/'/g,e(482))})),u[n(686)](n(421),!0,!1,(function(t){var e=n;this[e(976)]=u[e(1230)](t);var s=t[e(876)]();s>0&&(this.data=t[e(289)](s))})),u[n(686)](n(746),!0,!1),u[n(686)](n(158),!0,!1,(function(t){var e=n;this[e(626)]=t[e(400)](),this[e(1260)]=t[e(245)](),this[e(887)]=u[e(1230)](t)})),u[n(686)](n(404),!0,!1,(function(t){var e=n;this[e(1355)]=t[e(245)](),this[e(1120)]=[];for(var s=0;s>4,this[s(280)]=e>>1&7,this[s(1069)]=1&e,this.colourPrimaries=t[s(245)](),this.transferCharacteristics=t[s(245)](),this.matrixCoefficients=t[s(245)](),this.codecIntializationDataSize=t.readUint16(),this[s(388)]=t.readUint8Array(this[s(980)])):(this.profile=t.readUint8(),this[s(470)]=t[s(245)](),e=t[s(245)](),this.bitDepth=e>>4&15,this.colorSpace=15&e,e=t.readUint8(),this[s(280)]=e>>4&15,this[s(1041)]=e>>1&7,this[s(1069)]=1&e,this[s(980)]=t.readUint16(),this[s(388)]=t[s(289)](this[s(980)]))})),u[n(915)](n(387),(function(t){var e=n;this[e(287)]=t[e(490)](this[e(532)]-this[e(959)])})),u.createFullBoxCtor("vvcC",(function(t){var e,s,i=n,r={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(t){var e=pf;this[e(964)]=t[e(245)](),this[e(438)]=8},stream_read_2_bytes:function(t){var e=pf;this[e(964)]=t[e(771)](),this.num_held_bits=16},extract_bits:function(t){var e=pf,s=this[e(964)]>>this[e(438)]-t&(1<1){for(r.stream_read_1_bytes(t),this[i(973)]=0,s=this.num_sublayers-2;s>=0;--s){var h=r[i(1233)](1);this[i(973)]|=h<1;++s)r[i(1233)](1);for(this[i(542)]=[],s=this.num_sublayers-2;s>=0;--s)this.ptl_sublayer_present_mask&1<>=1;s+=u[e(932)](r,0),s+=".",0===this[e(1022)][e(957)]?s+="L":s+="H",s+=this.hvcC[e(889)];var o=!1,a="";for(t=5;t>=0;t--)(this[e(1022)][e(519)][t]||o)&&(a="."+u[e(932)](this[e(1022)][e(519)][t],0)+a,o=!0);s+=a}return s},u[n(1289)].prototype[n(1166)]=u[n(149)][n(1262)].getCodec=function(){var t,e=n,s=u.SampleEntry[e(1262)][e(1166)][e(1134)](this);if(this.vvcC){s+="."+this[e(177)][e(1155)],this[e(177)][e(957)]?s+=".H":s+=".L",s+=this[e(177)][e(889)];var i="";if(this.vvcC[e(236)]){var r,o=[],a=0;for(a|=this[e(177)][e(882)]<<7,a|=this[e(177)].ptl_multilayer_enabled<<6,t=0;t>2&63,o.push(a),a&&(r=t),a=this[e(177)][e(236)][t]>>2&3;if(void 0===r)i=".CA";else{i=".C";var h="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",c=0,l=0;for(t=0;t<=r;++t)for(c=c<<8|o[t],l+=8;l>=5;){i+=h[c>>l-5&31],c&=(1<<(l-=5))-1}l&&(i+=h[31&(c<<=5-l)])}}s+=i}return s},u.mp4aSampleEntry[n(1262)][n(1166)]=function(){var t=n,e=u.SampleEntry[t(1262)][t(1166)][t(1134)](this);if(this[t(512)]&&this[t(512)][t(802)]){var s=this[t(512)][t(802)].getOTI(),i=this[t(512)][t(802)].getAudioConfig();return e+"."+u[t(932)](s)+(i?"."+i:"")}return e},u[n(539)][n(1262)][n(1166)]=function(){var t=n,e=u[t(770)][t(1262)].getCodec[t(1134)](this);return this[t(583)]?e+"."+this[t(583)]:e},u[n(1275)][n(1262)][n(1166)]=u[n(574)][n(1262)][n(1166)]=function(){var t=n,e=u[t(770)].prototype.getCodec.call(this),s=this[t(480)][t(470)];0==s&&(s="00");var i=this[t(480)].bitDepth;return 8==i&&(i="08"),e+".0"+this[t(480)][t(570)]+"."+s+"."+i},u[n(468)][n(1262)][n(1166)]=function(){var t,e=n,s=u[e(770)][e(1262)].getCodec[e(1134)](this),i=this[e(706)][e(193)];return i<10&&(i="0"+i),2===this.av1C[e(450)]&&1===this.av1C[e(805)]?t=1===this.av1C[e(231)]?"12":"10":this.av1C[e(450)]<=2&&(t=1===this[e(706)].high_bitdepth?"10":"08"),s+"."+this.av1C[e(450)]+"."+i+(this[e(706)][e(858)]?"H":"M")+"."+t},u[n(919)][n(1262)][n(704)]=function(t,e){var s=n;this[s(532)]+=8,this.size>c&&(this[s(532)]+=8),"uuid"===this[s(809)]&&(this[s(532)]+=16),o[s(485)](s(1130),s(1268)+this[s(809)]+" of size: "+this[s(532)]+s(469)+t[s(165)]()+(e||"")),this.size>c?t[s(763)](1):(this.sizePosition=t.getPosition(),t.writeUint32(this[s(532)])),t.writeString(this.type,null,4),this[s(809)]===s(1338)&&t[s(359)](this[s(1338)]),this[s(532)]>c&&t[s(720)](this.size)},u[n(435)].prototype.writeHeader=function(t){var e=n;this[e(532)]+=4,u.Box[e(1262)][e(704)][e(1134)](this,t,e(611)+this[e(513)]+e(760)+this.flags),t.writeUint8(this.version),t[e(847)](this.flags)},u[n(919)][n(1262)].write=function(t){var e=n;this[e(809)]===e(1151)?this[e(1080)]&&(this.size=this[e(1080)][e(348)],this[e(704)](t),t[e(359)](this[e(1080)])):(this[e(532)]=this[e(1080)]?this.data[e(348)]:0,this[e(704)](t),this[e(1080)]&&t[e(359)](this[e(1080)]))},u[n(732)].prototype[n(955)]=function(t){var e=n;this[e(532)]=0,this[e(704)](t);for(var s=0;s=2&&t[i(763)](this.default_sample_description_index),t[i(763)](this[i(1120)][i(348)]),e=0;e0)for(e=0;e+1s?1:0,this[e(312)]=0,this.size=4,1===this[e(513)]&&(this.size+=4),this[e(704)](t),1===this[e(513)]?t[e(720)](this[e(1297)]):t[e(763)](this[e(1297)])},u.tfhdBox[n(1262)][n(955)]=function(t){var e=n;this[e(513)]=0,this.size=4,this[e(312)]&u[e(581)]&&(this[e(532)]+=8),this.flags&u.TFHD_FLAG_SAMPLE_DESC&&(this[e(532)]+=4),this[e(312)]&u[e(591)]&&(this.size+=4),this[e(312)]&u[e(842)]&&(this.size+=4),this[e(312)]&u[e(1068)]&&(this[e(532)]+=4),this.writeHeader(t),t[e(763)](this[e(1257)]),this[e(312)]&u.TFHD_FLAG_BASE_DATA_OFFSET&&t[e(720)](this.base_data_offset),this[e(312)]&u[e(259)]&&t[e(763)](this[e(940)]),this[e(312)]&u.TFHD_FLAG_SAMPLE_DUR&&t[e(763)](this[e(613)]),this.flags&u[e(842)]&&t[e(763)](this[e(1253)]),this[e(312)]&u[e(1068)]&&t[e(763)](this.default_sample_flags)},u.tkhdBox.prototype[n(955)]=function(t){var e=n;this[e(513)]=0,this[e(532)]=80,this.writeHeader(t),t[e(763)](this[e(198)]),t.writeUint32(this[e(206)]),t[e(763)](this.track_id),t[e(763)](0),t[e(763)](this[e(256)]),t[e(763)](0),t.writeUint32(0),t[e(670)](this[e(234)]),t[e(670)](this.alternate_group),t[e(670)](this[e(813)]<<8),t[e(347)](0),t[e(690)](this[e(212)]),t.writeUint32(this[e(528)]),t[e(763)](this[e(856)])},u[n(1072)][n(1262)][n(955)]=function(t){var e=n;this.version=0,this[e(312)]=0,this.size=20,this[e(704)](t),t.writeUint32(this[e(1257)]),t[e(763)](this.default_sample_description_index),t[e(763)](this.default_sample_duration),t.writeUint32(this[e(1253)]),t[e(763)](this[e(436)])},u[n(830)].prototype[n(955)]=function(t){var e=n;this[e(513)]=0,this[e(532)]=4,this[e(312)]&u[e(912)]&&(this.size+=4),this[e(312)]&u.TRUN_FLAGS_FIRST_FLAG&&(this[e(532)]+=4),this[e(312)]&u.TRUN_FLAGS_DURATION&&(this[e(532)]+=4*this[e(623)][e(348)]),this[e(312)]&u[e(241)]&&(this.size+=4*this.sample_size[e(348)]),this[e(312)]&u[e(471)]&&(this[e(532)]+=4*this[e(1304)][e(348)]),this[e(312)]&u.TRUN_FLAGS_CTS_OFFSET&&(this.size+=4*this[e(220)][e(348)]),this[e(704)](t),t[e(763)](this.sample_count),this.flags&u[e(912)]&&(this[e(199)]=t[e(165)](),t[e(872)](this[e(608)])),this[e(312)]&u[e(970)]&&t[e(763)](this[e(1085)]);for(var s=0;s-1||t[s]instanceof u[i(919)]||e[s]instanceof u[i(919)]||void 0===t[s]||typeof e[s]===i(751)||typeof t[s]===i(350)||typeof e[s]===i(350)||t[i(968)]&&t.subBoxNames[i(904)](s[i(898)](0,4))>-1||e[i(968)]&&e[i(968)][i(904)](s[i(898)](0,4))>-1||"data"===s||"start"===s||s===i(532)||"creation_time"===s||s===i(206)||u[i(320)][i(904)](s)>-1||t[s]===e[s]))return!1;return!0},u[n(1006)]=function(t,e){var s=n;if(!u[s(1058)](t,e))return!1;for(var i=0;i=e?t:new Array(e-t[i(348)]+1)[i(688)](s)+t}function o(t){var e=pf,s=Math[e(1070)](t/3600),i=Math[e(1070)]((t-3600*s)/60),n=Math[e(1070)](t-3600*s-60*i),o=Math[e(1070)](1e3*(t-3600*s-60*i-n));return r(s,2)+":"+r(i,2)+":"+r(n,2)+"."+r(o,3)}for(var a=this[i(662)](s),h="",c=0;c1)for(e=1;e-1&&this[e(315)].splice(s,1)},y[n(1262)][n(1143)]=function(t,e,s){var i=n,r=this[i(659)](t);if(r){var o={};this[i(1061)][i(1031)](o),o.id=t,o.user=e,o[i(1362)]=r,r[i(675)]=0,o[i(1300)]=1e3,o[i(277)]=[],s&&s[i(1138)]&&(o[i(1300)]=s[i(1138)])}},y.prototype[n(633)]=function(t){for(var e=n,s=-1,i=0;i-1&&this[e(1061)][e(590)](s,1)},y[n(1262)][n(514)]=function(){var t,e,s=n;if(!this[s(185)]||this[s(185)]())for(;;){if(this[s(253)]&&this[s(253)]()){if(this[s(598)]())continue;return}if(this.saveParsePosition&&this[s(510)](),(t=u[s(719)](this.stream,false)).code===u[s(928)]){if(this[s(216)]){if(this.processIncompleteBox(t))continue;return}return}var i;switch(i=(e=t.box)[s(809)]!==s(1338)?e[s(809)]:e[s(1338)],this[s(1077)].push(e),i){case s(1151):this[s(373)][s(1031)](e);break;case"moof":this[s(983)].push(e);break;case s(620):this[s(767)]=!0,0===this[s(373)][s(348)]&&(this[s(163)]=!0);default:this[i],this[i]=e}this[s(1303)]&&this.updateUsedBytes(e,t)}},y[n(1262)][n(423)]=function(t){var e=n;if(null==t)throw e(674);if(void 0===t[e(164)])throw"Buffer must have a fileStart property";return 0===t[e(689)]?(this[e(1111)][e(924)](),!1):(t[e(186)]=0,this[e(1111)].insertBuffer(t),this[e(1111)].logBufferLevel(),!!this[e(1111)][e(646)]())},y.prototype[n(386)]=function(t,e){var s,i=n;if(this.checkBuffer(t))return this.parse(),this[i(767)]&&!this[i(786)]&&(this[i(786)]=!0,this[i(563)]&&this.onMoovStart()),this[i(620)]?(!this.sampleListBuilt&&(this.buildSampleLists(),this[i(154)]=!0),this[i(1e3)](),this[i(663)]&&!this.readySent&&(this[i(342)]=!0,this[i(663)](this[i(319)]())),this[i(1270)](e),this[i(1055)]?(s=this[i(1055)],this.nextSeekPosition=void 0):s=this[i(843)],this[i(1111)][i(750)]&&(s=this.stream[i(750)](s))):s=this.nextParsePosition?this[i(843)]:0,this[i(966)]&&this[i(1374)]&&!this.sidxSent&&(this[i(1374)](this.sidx),this[i(1177)]=!0),this[i(1221)]&&(this[i(302)]&&!this[i(401)]&&(this[i(302)](),this.itemListBuilt=!0),this[i(738)]&&this.processItems(this[i(213)])),this.stream[i(569)]&&(this.stream.logBufferLevel(),this.stream.cleanBuffers(),this[i(1111)][i(924)](!0)),s},y[n(1262)][n(319)]=function(){var t,e,s,i,r,o,a=n,h={},c=new Date(a(818))[a(614)]();if(this[a(620)])for(h[a(585)]=!0,h[a(256)]=this[a(620)].mvhd[a(256)],h[a(866)]=this[a(620)].mvhd[a(866)],h[a(1167)]=null!=this.moov.mvex,h[a(1167)]&&this.moov[a(330)][a(1356)]&&(h.fragment_duration=this[a(620)][a(330)][a(1356)].fragment_duration),h.isProgressive=this[a(163)],h[a(156)]=null!=this[a(620)].iods,h[a(1127)]=[],h.brands.push(this.ftyp[a(575)]),h[a(1127)]=h[a(1127)][a(576)](this[a(652)][a(1086)]),h[a(1171)]=new Date(c+1e3*this[a(620)][a(717)].creation_time),h[a(948)]=new Date(c+1e3*this[a(620)].mvhd[a(206)]),h.tracks=[],h[a(1137)]=[],h[a(579)]=[],h.subtitleTracks=[],h[a(1328)]=[],h.hintTracks=[],h.otherTracks=[],t=0;t0?h.mime+=a(1116):h[a(1137)]&&h[a(1137)][a(348)]>0?h.mime+=a(524):h[a(202)]+=a(1016),t=0;t=s[i(277)][i(348)])&&(this[i(1057)]&&this[i(1057)](r.id,r[i(1282)],r[i(233)][i(753)],s[i(675)],t||s[i(675)]>=s[i(277)][i(348)]),r.segmentStream=null,r!==this.fragmentedTracks[e]))break}}if(null!==this[i(1320)])for(e=0;e=s[i(277)].length)&&(o[i(485)](i(167),"Sending samples on track #"+h.id+i(486)+s[i(675)]),this[i(1320)]&&this.onSamples(h.id,h[i(1282)],h[i(277)]),h.samples=[],h!==this.extractedTracks[e]))break}}}},y[n(1262)].getBox=function(t){var e=n,s=this[e(1305)](t,!0);return s[e(348)]?s[0]:null},y.prototype[n(1305)]=function(t,e){var s=n,i=[];return y[s(157)][s(1134)](this,t,i,e),i},y[n(157)]=function(t,e,s){var i=n;for(var r in this[i(809)]&&this[i(809)]==t&&e[i(1031)](this),this[i(1077)]){if(e[i(348)]&&s)return;y[i(157)][i(1134)](this[i(1077)][r],t,e,s)}},y.prototype[n(285)]=function(t){var e=n,s=this[e(659)](t);return s?s[e(277)]:void 0},y[n(1262)][n(303)]=function(t,e){var s=n,i=this[s(659)](t);return this[s(929)](i,e)},y[n(1262)].releaseUsedSamples=function(t,e,s){var i=n,r=this[i(659)](t);r.lastValidSample||(r.lastValidSample=0);for(var o=r.lastValidSample;ot*r[a(866)]){c=i-1;break}e&&r.is_sync&&(h=i)}for(e&&(c=h),t=s[a(277)][c][a(208)],s.nextSample=c;s.samples[c][a(1319)]===s[a(277)][c][a(532)]&&s[a(277)][c+1];)c++;return{offset:s[a(277)][c][a(737)]+s.samples[c][a(1319)],time:t/o}},y[n(1262)][n(324)]=function(t){var e,s=n;return t[s(277)]?((e=t[s(277)][t[s(277)][s(348)]-1])[s(208)]+e[s(256)])/e[s(866)]:1/0},y.prototype[n(979)]=function(t,e){var s,i,r,o=n,a=this[o(620)],h={offset:1/0,time:1/0};if(this.moov){for(r=0;rthis[o(324)](s)||((i=this[o(556)](t,e,s))[o(737)]-1){c=l;break}switch(c){case"Visual":if(o.add(e(148)).set(e(1100),0)[e(1249)](e(935),[0,0,0]),h[e(1249)]("width",s[e(528)])[e(1249)](e(856),s.height)[e(1249)](e(978),72<<16)[e(1249)]("vertresolution",72<<16).set(e(1272),1)[e(1249)](e(988),s[e(809)]+e(207))[e(1249)](e(1324),24),s.avcDecoderConfigRecord){var f=new(u[e(555)]);f[e(514)](new a(s[e(992)])),h[e(441)](f)}else if(s[e(1252)]){var m=new(u[e(527)]);m.parse(new a(s.hevcDecoderConfigRecord)),h.addBox(m)}break;case e(729):o.add("smhd")[e(1249)]("balance",s[e(357)]||0),h[e(1249)](e(865),s.channel_count||2)[e(1249)](e(281),s[e(281)]||16)[e(1249)]("samplerate",s[e(1240)]||65536);break;case e(151):o[e(816)]("hmhd");break;case e(764):if(o[e(816)]("sthd"),s[e(809)]===e(1298))h[e(1249)]("namespace",s[e(407)]||e(511)).set(e(685),s.schema_location||"").set(e(232),s[e(232)]||"");break;case e(399):o[e(816)](e(1352));break;case"System":o.add(e(1352));break;default:o[e(816)]("nmhd")}s[e(641)]&&h[e(441)](s[e(641)]),s[e(953)]&&s[e(953)].forEach((function(t){h.addBox(t)})),o.add(e(914))[e(816)](e(1132))[e(890)]((new(u[e(292)]))[e(1249)]("flags",1));var g=o[e(816)](e(374));return g.add(e(240)).addEntry(h),g.add("stts")[e(1249)](e(396),[])[e(1249)]("sample_deltas",[]),g[e(816)](e(735))[e(1249)](e(1205),[])[e(1249)](e(1172),[])[e(1249)](e(678),[]),g[e(816)](e(363))[e(1249)](e(191),[]),g[e(816)]("stsz")[e(1249)]("sample_sizes",[]),this[e(620)].mvex[e(816)](e(621))[e(1249)]("track_id",s.id)[e(1249)](e(940),s[e(940)]||1)[e(1249)]("default_sample_duration",s.default_sample_duration||0)[e(1249)](e(1253),s.default_sample_size||0)[e(1249)]("default_sample_flags",s[e(436)]||0),this[e(822)](i),s.id}},u[n(919)][n(1262)][n(466)]=function(t){var e=n,s=t||new h;s.endianness=h[e(1135)],this[e(955)](s)},y.prototype[n(325)]=function(t,e,s){var i=n,r=s||{},o={},a=this[i(659)](t);if(null!==a){o[i(159)]=a[i(277)].length,o.track_id=a[i(903)][i(1257)],o.timescale=a[i(1346)][i(649)].timescale,o[i(1239)]=r.sample_description_index?r[i(678)]-1:0,o[i(641)]=a.mdia[i(774)][i(374)].stsd[i(1120)][o[i(1239)]],o.data=e,o[i(532)]=e[i(689)],o[i(1319)]=o.size,o[i(256)]=r[i(256)]||1,o.cts=r[i(208)]||0,o[i(725)]=r.dts||0,o.is_sync=r.is_sync||!1,o.is_leading=r[i(1295)]||0,o.depends_on=r.depends_on||0,o[i(1125)]=r[i(1125)]||0,o[i(1081)]=r[i(1081)]||0,o[i(710)]=r[i(710)]||0,o[i(737)]=0,o.subsamples=r.subsamples,a[i(277)][i(1031)](o),a.samples_size+=o[i(532)],a[i(639)]+=o[i(256)],void 0===a.first_dts&&(a[i(1246)]=r[i(725)]),this[i(1270)]();var h=this[i(648)](o);return this[i(441)](h),h[i(466)](),h[i(939)][0][i(1007)][0][i(608)]=h[i(532)]+8,this[i(816)](i(1151)).data=new Uint8Array(e),o}},y[n(1262)][n(648)]=function(t){var e=n,s=0;s=t[e(1197)]?1<<25:65536;var i=new u.moofBox;i[e(816)](e(658))[e(1249)](e(863),this[e(419)]),this.nextMoofNumber++;var r=i.add(e(210)),o=this[e(659)](t[e(1257)]);return r[e(816)](e(826))[e(1249)](e(1257),t[e(1257)])[e(1249)](e(312),u[e(1206)]),r[e(816)]("tfdt")[e(1249)](e(1297),t.dts-(o[e(1246)]||0)),r[e(816)](e(242))[e(1249)](e(312),u[e(912)]|u[e(938)]|u[e(241)]|u[e(471)]|u.TRUN_FLAGS_CTS_OFFSET)[e(1249)](e(608),0)[e(1249)](e(1085),0)[e(1249)](e(294),1).set(e(623),[t.duration])[e(1249)](e(951),[t[e(532)]]).set(e(1304),[s])[e(1249)]("sample_composition_time_offset",[t[e(208)]-t[e(725)]]),i},y.prototype.lastMoofIndex=0,y.prototype.samplesDataSize=0,y[n(1262)].resetTables=function(){var t,e,s,i,r,o,a=n;for(this[a(1003)]=this[a(620)][a(717)][a(256)],this[a(620)][a(717)][a(256)]=0,t=0;t=2&&(c=r[a].grouping_type+"/0",(h=new d(r[a][l(1312)],0))[l(922)]=!0,!e[l(937)][c]&&(e[l(937)][c]=h))}else for(a=0;a=2&&(c=i[a][l(1312)]+"/0",h=new d(i[a][l(1312)],0),!t[l(937)][c]&&(t.sample_groups_info[c]=h))},y[n(836)]=function(t,e,s,i){var r,o,a=n;for(r in e[a(870)]=[],i){var h;if(e[a(870)][r]={},e[a(870)][r][a(1312)]=i[r][a(1312)],e.sample_groups[r][a(714)]=i[r][a(714)],s>=i[r][a(1104)]&&(i[r][a(1104)]<0&&(i[r].last_sample_in_run=0),i[r][a(543)]++,i[r].entry_index<=i[r][a(748)][a(1120)][a(348)]-1&&(i[r][a(1104)]+=i[r][a(748)][a(1120)][i[r][a(543)]].sample_count)),i[r][a(543)]<=i[r][a(748)].entries[a(348)]-1?e.sample_groups[r][a(1045)]=i[r][a(748)][a(1120)][i[r][a(543)]][a(1045)]:e[a(870)][r][a(1045)]=-1,0!==e[a(870)][r].group_description_index)h=i[r].fragment_description?i[r].fragment_description:i[r][a(641)],e[a(870)][r][a(1045)]>0?(o=e[a(870)][r][a(1045)]>65535?(e[a(870)][r].group_description_index>>16)-1:e[a(870)][r][a(1045)]-1,h&&o>=0&&(e.sample_groups[r][a(641)]=h[a(1120)][o])):h&&h[a(513)]>=2&&h.default_group_description_index>0&&(e.sample_groups[r][a(641)]=h[a(1120)][h.default_group_description_index-1])}},y[n(899)]=function(t,e,s){var i=n;e&&(t?(e[i(1295)]=t.is_leading[s],e[i(411)]=t[i(492)][s],e[i(1125)]=t[i(1241)][s],e.has_redundancy=t[i(920)][s]):(e[i(1295)]=0,e[i(411)]=0,e[i(1125)]=0,e[i(1081)]=0))},y[n(1262)][n(440)]=function(){var t,e,s=n;for(t=0;tv&&(S++,v<0&&(v=0),v+=o.sample_counts[S]),e>0?(t[_(277)][e-1][_(256)]=o[_(150)][S],t.samples_duration+=t.samples[e-1][_(256)],C.dts=t[_(277)][e-1][_(725)]+t[_(277)][e-1][_(256)]):C[_(725)]=0,a?(e>=w&&(E++,w<0&&(w=0),w+=a[_(396)][E]),C.cts=t[_(277)][e][_(725)]+a[_(1271)][E]):C[_(208)]=C[_(725)],h?(e==h[_(248)][I]-1?(C[_(1197)]=!0,I++):(C[_(1197)]=!1,C.degradation_priority=0),l&&l.entries[T][_(793)]+k==e+1&&(C[_(1224)]=l[_(1120)][T][_(1224)],k+=l[_(1120)][T][_(793)],T++)):C[_(1197)]=!0,y[_(899)](t[_(1346)].minf.stbl[_(747)],C,C[_(159)]),p?C.degradation_priority=p[_(965)][e]:C[_(710)]=0,l&&l[_(1120)][T][_(793)]+k==e&&(C[_(1224)]=l[_(1120)][T][_(1224)],k+=l[_(1120)][T][_(793)]),(d.length>0||u[_(348)]>0)&&y[_(836)](t,C,e,t.sample_groups_info)}e>0&&(t[_(277)][e-1][_(256)]=Math[_(382)](t[_(1346)][_(649)][_(256)]-t[_(277)][e-1].dts,0),t.samples_duration+=t.samples[e-1].duration)}},y[n(1262)][n(1e3)]=function(){var t,e,s,i,r,o,a,h,c,l,d,p,f,m,g,A=n;if(void 0!==this[A(620)])for(;this[A(326)]0&&y[A(610)](p,d,d[A(1336)],p.mdia.minf.stbl[A(1375)],d[A(1375)]),e=0;e0?m[A(725)]=p[A(277)][p[A(277)].length-2].dts+p[A(277)][p.samples[A(348)]-2][A(256)]:(d[A(871)]?m.dts=d[A(871)][A(1297)]:m[A(725)]=0,p.first_traf_merged=!0),m[A(208)]=m[A(725)],b[A(312)]&u[A(701)]&&(m[A(208)]=m[A(725)]+b[A(220)][s]),g=a,b[A(312)]&u.TRUN_FLAGS_FLAGS?g=b[A(1304)][s]:0===s&&b.flags&u[A(970)]&&(g=b[A(1085)]),m.is_sync=!(g>>16&1),m[A(1295)]=g>>26&3,m[A(411)]=g>>24&3,m[A(1125)]=g>>22&3,m[A(1081)]=g>>20&3,m.degradation_priority=65535&g;var v=!!(d.tfhd[A(312)]&u[A(581)]),S=!!(d.tfhd.flags&u[A(1206)]),w=!!(b[A(312)]&u[A(912)]),E=0;E=v?d[A(826)][A(855)]:S||0===e?l[A(969)]:h,0===e&&0===s?m[A(737)]=w?E+b.data_offset:E:m.offset=h,h=m[A(737)]+m[A(532)],(d.sbgps.length>0||d[A(1375)][A(348)]>0||p.mdia[A(774)].stbl.sbgps[A(348)]>0||p.mdia[A(774)][A(374)][A(1375)][A(348)]>0)&&y[A(836)](p,m,m[A(901)],d[A(937)])}}if(d[A(278)]){p[A(1156)]=!0;var I=d[A(821)];for(e=0;e-1))return null;var c=(s=this.stream.buffers[a]).byteLength-(r[i(737)]+r[i(1319)]-s[i(164)]);if(r[i(532)]-r[i(1319)]<=c)return o.debug(i(167),i(1187)+e+i(845)+r[i(1319)]+i(722)+(r[i(737)]+r[i(1319)]-s.fileStart)+" read size: "+(r[i(532)]-r[i(1319)])+" full size: "+r[i(532)]+")"),h.memcpy(r[i(1080)][i(753)],r[i(1319)],s,r[i(737)]+r[i(1319)]-s[i(164)],r[i(532)]-r[i(1319)]),s[i(186)]+=r[i(532)]-r[i(1319)],this[i(1111)][i(924)](),r[i(1319)]=r.size,r;if(0===c)return null;o[i(485)](i(167),i(1187)+e+i(523)+r.alreadyRead+i(722)+(r[i(737)]+r[i(1319)]-s.fileStart)+" read size: "+c+i(460)+r[i(532)]+")"),h[i(1308)](r[i(1080)].buffer,r[i(1319)],s,r[i(737)]+r[i(1319)]-s[i(164)],c),r[i(1319)]+=c,s.usedBytes+=c,this[i(1111)][i(924)]()}},y[n(1262)][n(571)]=function(t,e){var s=n,i=t[s(277)][e];return i.data?(this[s(1311)]-=i[s(532)],i[s(1080)]=null,i[s(641)]=null,delete i[s(710)],delete i[s(411)],delete i[s(1239)],delete i[s(1081)],delete i[s(1125)],delete i[s(1295)],delete i[s(1197)],delete i[s(835)],delete i[s(901)],delete i[s(866)],delete i[s(208)],delete i[s(725)],delete i[s(737)],delete i.size,delete i.track_id,delete i[s(256)],i[s(1319)]=0,i[s(532)]):0},y[n(1262)][n(593)]=function(){return this[n(1311)]},y.prototype[n(364)]=function(){var t=n;const e=this[t(1111)].buffers||[];let s=0;return e[t(1049)]((e=>{const i=e[t(689)];s+=i})),s},y[n(1262)][n(1027)]=function(){var t,e=n,s="";for(t=0;t0&&(s+=","),s+=this.moov[e(171)][t][e(1346)].minf.stbl[e(240)].entries[0][e(1166)]()}return s},y.prototype[n(205)]=function(t){var e,s=n;if(!this[s(620)]||!this[s(620)][s(330)])return null;for(e=0;e0&&(s.protection=a[i(684)][i(1369)][a.iinf[i(349)][t][i(1317)]-1]),a[i(1284)][i(349)][t][i(917)]?s.type=a[i(1284)][i(349)][t][i(917)]:s[i(809)]=i(202),s.content_type=a[i(1284)][i(349)][t][i(1175)],s.content_encoding=a.iinf[i(349)][t][i(768)];if(a[i(819)])for(t=0;t0&&p[i(1354)]-1-1))return null;var l=(e=this[i(1111)][i(949)][c]).byteLength-(a[i(737)]+a[i(1319)]-e[i(164)]);if(!(a.length-a[i(1319)]<=l))return o.debug("ISOFile","Getting item #"+t+i(455)+r+i(523)+a[i(1319)]+" offset: "+(a.offset+a[i(1319)]-e[i(164)])+" read size: "+l+i(653)+a[i(348)]+i(211)+s.size+")"),h.memcpy(s[i(1080)][i(753)],s.alreadyRead,e,a[i(737)]+a[i(1319)]-e[i(164)],l),a[i(1319)]+=l,s[i(1319)]+=l,e[i(186)]+=l,this.stream[i(924)](),null;o[i(485)]("ISOFile",i(447)+t+i(455)+r+i(845)+a[i(1319)]+i(722)+(a[i(737)]+a[i(1319)]-e[i(164)])+i(584)+(a[i(348)]-a.alreadyRead)+i(653)+a.length+i(211)+s[i(532)]+")"),h[i(1308)](s.data[i(753)],s[i(1319)],e,a.offset+a[i(1319)]-e[i(164)],a[i(348)]-a[i(1319)]),e[i(186)]+=a[i(348)]-a[i(1319)],this[i(1111)][i(924)](),s[i(1319)]+=a.length-a.alreadyRead,a[i(1319)]=a.length}}return s[i(1319)]===s[i(532)]?s:null},y[n(1262)][n(596)]=function(t){var e=n,s=this[e(796)][t];if(s[e(1080)]){this.itemsDataSize-=s[e(532)],s[e(1080)]=null,s.alreadyRead=0;for(var i=0;i0?this[r(620)].traks[t][r(277)][0][r(256)]:0),e[r(1031)](i)}return e},y.prototype[n(1065)]=function(){var t=n,e={};return e[t(620)]=this[t(620)],this[t(620)]&&this[t(620)][t(171)]&&this[t(620)].traks.length>1&&(e[t(1028)]=this[t(620)].traks[0].samples[t(348)],e[t(1092)]=this.moov[t(171)][1][t(277)][t(348)]),e},u[n(919)].prototype[n(1251)]=function(t){var e=n;this[e(532)]+=8,this[e(532)]>c&&(this[e(532)]+=8),this[e(809)]===e(1338)&&(this[e(532)]+=16),t[e(707)](t[e(498)]+e(467)+this[e(532)]),t[e(707)](t.indent+e(434)+this[e(809)])},u[n(435)][n(1262)].printHeader=function(t){var e=n;this[e(532)]+=4,u.Box[e(1262)][e(1251)][e(1134)](this,t),t[e(707)](t[e(498)]+e(703)+this.version),t[e(707)](t[e(498)]+e(1122)+this[e(312)])},u[n(919)].prototype[n(1280)]=function(t){this.printHeader(t)},u.ContainerBox.prototype[n(1280)]=function(t){var e=n;this.printHeader(t);for(var s=0;s>8)),t[e(707)](t.indent+e(372)+this[e(212)][e(688)](", ")),t.log(t.indent+e(1014)+this[e(1163)])},u[n(588)][n(1262)][n(1280)]=function(t){var e=n;u[e(435)].prototype[e(1251)][e(1134)](this,t),t[e(707)](t.indent+e(1259)+this[e(198)]),t[e(707)](t[e(498)]+e(365)+this.modification_time),t[e(707)](t.indent+"track_id: "+this[e(1257)]),t[e(707)](t[e(498)]+"duration: "+this[e(256)]),t[e(707)](t[e(498)]+"volume: "+(this.volume>>8)),t.log(t[e(498)]+e(372)+this[e(212)][e(688)](", ")),t[e(707)](t[e(498)]+"layer: "+this.layer),t[e(707)](t.indent+e(640)+this[e(1083)]),t.log(t.indent+e(502)+this[e(528)]),t[e(707)](t[e(498)]+e(577)+this[e(856)])};var b={};b[n(1368)]=function(t,e){var s=n,i=void 0===t||t,r=new y(e);return r[s(255)]=!i,r},n(1266)!==n(751)&&(e[n(1368)]=b.createFile)}));function pf(t,e){var s=ff();return(pf=function(t,e){return s[t-=147]})(t,e)}function ff(){var t=["tfdtBox","display_primaries","getCodec","isFragmented","removeUsedSamples","cleanApertureWidthN","TrackGroupTypeBox","created","samples_per_chunk","constantFrameRate","uint32be","content_type","irot","sidxSent","Concatenating buffer for box parsing (length: ","dependency","AVCLevelIndication","props","bytessent","languageString","component_count","scif","trep","Getting sample #","(empty)","&","num_channels","iprp","message_data","ref_to","duration: ","ssix","SAMPLE_ENTRY_TYPE_TEXT","is_sync","subSequenceIdentifier","angle","Found box of type '","codec","Error reading extent index","_byteOffset","packetssent","first_chunk","TFHD_FLAG_DEFAULT_BASE_IS_MOOF","end","audio","avc3SampleEntry","toString","APPLICATION","trefBox","mhm1","aux_type"," of size ","style_record","colour_type","max_content_light_level","setUint32","mfra","meta","SAMPLE_ENTRY_TYPE_SUBTITLE","PPS","subsamples","prgr","itemId","chan_loc","92567kQYXai","media_rate_fraction","parseHex16","absolute_duration","ChannelMapping","extract_bits","ranges","properties","int32","DataStream","ispe","description_index","samplerate","sample_is_depended_on","vSpacing","shift","PreSkip"," - Length: ","first_dts","starts_with_SAP","dvhe","set","resources","printHeader","hevcDecoderConfigRecord","default_sample_size","mapUint8Array","switch_group","streamType","track_id","SubtitleSampleEntry","creation_time: ","default_IV_size","tracks","prototype","apply","strd","1229613NBLeee","object","writeUint32Array","Writing box ","avc2SampleEntry","processSamples","sample_offsets","frame_count","XMLSubtitlein4Parser","subsegment_duration","vp08SampleEntry","profile_compatibility","isFragmentationInitialized","pdin","target_rate_share","print","[row: ","user","entry_count","iinf","getText","SEEKTABLE","uncv","period","vvc1SampleEntry","flipArrayEndianness",'"; profiles="',"interleave_type","printRanges","stsdBox","is_leading","int16le","baseMediaDecodeTime","stpp","skew_factor","nb_samples","free","Descriptor","updateUsedBytes","sample_flags","getBoxes","SAP_delta_time","rICC","memcpy","reduceBuffer","readUint32Array","samplesDataSize","grouping_type","InputSampleRate","readInt64","createEncryptedSampleEntryCtor","extension_type","protection_index","drep","alreadyRead","onSamples","NAL_unit_type","MetadataSampleEntry","sttsBox","depth","chroma_format_idc","Found Sample Groups of type ","configOBUs","metadataTracks","idat","assignment_type","bitrate","matrix_coefficients","createElement","absolute_time","bytes","sbgps","block_little_endian","uuid","correction_applied","writeString","_realloc","writeUint8","completeness","index_size","getPrimaryItem","mdia","getSampleRate","quat_x","payl","first_offset","iref","nmhd","readCString","property_index","fragment_count","mehd","luminanceMax","pts","base_offset","createTrackGroupCtor","sthd","trak","hvc1SampleEntry","aux_subtype","movie_duration","stss","extent_offset","createFile","protections","favc","colour_primaries","createEntityToGroupCtor","dynamicSize","onSidx","sgpds","tmax","ec-3","vmhd","vvi1SampleEntry","sample_deltas","Hint","ipma","hSpacing","sampleListBuilt","readInt32","hasIOD","_sweep","8974dbce7be74c5184f97148f9882554","number","first_traf_merged","isSubtitle","block_size","isProgressive","fileStart","getPosition","subtitleTracks","ISOFile","transfer_characteristics","parseHeader","cttsBox","traks","single_view_allowed","dac3","sample_rate","image_width","createSampleEntryCtor","vvcC","num_bad_cols","component_bit_depth_minus_one","event_duration","getDurationString","Needs an array buffer","max_pic_average_light_level","string","restoreParsePosition","usedBytes","parsingMdat","track_group_id","addSubBoxArrays","pitm","chunk_offsets","component_align_size","seq_level_idx_0","earliest_presentation_time","clef","2jeYzON","adjustUint32","creation_time","data_offset_position","dmed","maxBitrate","mime","reserved_2","getDescriptorName","getTrexById","modification_time"," Compressor","cts","wbbr","traf"," full item size: ","matrix","onItem","isMetadata","pad_unknown","processIncompleteBox","Removing buffer #","a1lx","constant_IV","sample_composition_time_offset","addUsedBytes","discard_priority","primaryRChromaticity_y","cts_shift","extents","kindBox","compositionEndTime","stdp","sgpdBox","handler","twelve_bit","auxiliary_mime_types","segmentStream","layer","schm","general_constraint_info","crypt_byte_block","findPosition","Version","stsd","TRUN_FLAGS_SIZE","trun","channel_associations","stereo_scheme","readUint8"," (total: ","getChannelCount","sample_numbers","channel_indexes","alst","descriptionformat","test","hasIncompleteMdat","mapFloat32Array","discardMdatData","duration","enct","stream_read_2_bytes","TFHD_FLAG_SAMPLE_DESC","trpy","hintTracks","avg_frame_rate","elng","avs3","roll","defineProperty","vvnC","scheme_id_uri","DIFF_BOXES_PROP_NAMES","num_ind_sub","cleanApertureHeightD","AudioSampleEntry","isProtected","time","rtpmap_string","track_ids","samples","subs","upStream","chromaSubsampling","samplesize","tsyn","iaug","tile_align_size","getTrackSamplesInfo","readInt method not implemented for size: ","text","lengthSizeMinusOne","readUint8Array","initial_presentation_delay_present","MP4BoxStream","url Box","lhe1","sample_count","from_item_ID","hnti","createContainerBoxCtor","uint16be","bufferIndex","length_size","tpay","flattenItemInfo","getTrackSample","parallelismType","ChannelMappingFamily","emsgBox","DecoderConfigDescriptor","CUESHEET","avll","saio","sbtt","flags","mdhdBox","luminanceMin","fragmentedTracks","readUint","nalu","mfhdBox","getInfo","DIFF_PRIMITIVE_ARRAY_PROP_NAMES","image_height","length_size_of_trun_num","all_ref_pics_intra","getTrackDuration","addSample","lastMoofIndex","ols_idx","quat_z","parseLanguage","mvex","num_tile_rows_minus_one","u16stringle","sizePosition","encode","aux_info_type","setAllUsedBytes","albc","tpyl","_self","setFloat32","VisualSampleEntry","readySent","getItem","component_type_urls","item_name","bit_rate_code","writeUint16","length","item_infos","function","isHint","item_id"," with new size ","padding_flag","UUIDs","subsegments","balance","ref_track_id","writeUint8Array","SPS","ac-4","chunk_run_index","stco","getStreamBufferSize","modification_time: ","SAMPLE_ENTRY_TYPE_AUDIO","documentString","nb_SPS_nalus","maxr","field_size","Found position in existing buffer #","matrix: ","mdats","stbl","default_skip_byte_block","TKHD_FLAG_IN_PREVIEW","readInt8","has_unparsed_data","split","dataview","sample_offset","max","num_bytes_constraint_info","infe","avc1SampleEntry","appendBuffer","vttC","codecIntializationData","Generating initialization segment","entity_ids","initial_delay","vmhdBox","_dynamicSize","avss","Allocating sample #","sample_counts","bg_color_rgba","hdlr","Metadata","readUint24","itemListBuilt","int16be","SAMPLE_ENTRY_TYPE_METADATA","d4807ef2ca3946958e5426cb9e46a79f","base_offset_size","video","namespace","_trimAlloc","init","prdi","depends_on","Adjusting data_offset with new value ","writeInitializationSegment","initialize","vertOffD","isEos","MPEG4DescriptorParser","edits","nextMoofNumber","onError","d08a4f1810f34a82b6c832d8aba183d3","row_align_size","checkBuffer","language","charCodeAt","SampleGroupEntry","uncC","float64be","bit_depth_chroma_minus8","stz2","getFloat32","Creating media fragment on track #","isEof","type:","FullBox","default_sample_flags","pow","num_held_bits","attribute_list","buildSampleLists","addBox","rate","setUint16","general_sub_profile_idc","getEndPosition","LiveServerManifest","Getting item #","extent_index","resetTables","seq_profile","shadowed_sample_numbers","fromCharCodeUint8","durationFlag","uint16le"," extent #","stsg","constant_IV_size","body","channel_types"," full size: ","descs","numMetadataBlocks","name","writeFloat32Array","vttc","computeSize","size:","av01SampleEntry"," at position ","level","TRUN_FLAGS_FLAGS","setFloat64","primaryBChromaticity_x","location","CoLL","afbr","avc3","num_leading_samples","default_crypt_byte_block","vpcC","DecoderSpecificInfo","'","writeFloat64Array","readInt32Array","debug"," for sample ","layerNumber","getMetaHandler","to_item_ID","readString","payloadID","sample_depends_on","TrackReferenceTypeBox","887740crKNpk","fobr","min","num_sublayers","indent","ftypBox","ctts","tele","width: ","OutputGain","version of iloc box not supported","data_format"," --\x3e ","getInt8","info","essential","saveParsePosition","nonamespace","esds","version","parse","dataView","parseFromString","trgr","iso4","general_constraint_indicator","sgpd","num_bad_pixels","available_bitrate"," partial data (alreadyRead: ",'audio/mp4; codecs="',"writeInt8","component_little_endian","hvcCBox","width","stts","cmin","stsz","size","pixi","sdp ","findEndContiguousBuf","avc4SampleEntry","destroy","track_height","stxtSampleEntry","Stream ready for parsing","co64","sublayer_level_idc","entry_index","j2ki","flush","BYTES_PER_ELEMENT","writeFloat32","writeFloat64","ext","enof","Opus","' and size ","writeCString","totl","avcCBox","seekTrack","primary","mapFloat64Array","Allocating item #","range_size","arrayToNative","minor_version","onMoovStart","extended_language","lastValidSample","focal_length_y","rinf","_dataView","cleanBuffers","profile","releaseSample","SAMPLE_ENTRY_TYPE_SYSTEM","readInt8Array","vp09SampleEntry","major_brand","concat","height: ","avc1","videoTracks","Textin4Parser","TFHD_FLAG_BASE_DATA_OFFSET","scnm","mime_format"," read size: ","hasMoov","stscBox","ICC_profile","tkhdBox","kid","splice","TFHD_FLAG_SAMPLE_DUR","num_output_samples","getAllocatedSampleDataSize","BoxParser","compositionToDTSShift","releaseItem","metx","processIncompleteMdat","level_independently_decodable","temporalIdNested","parseFullHeader","readAnyInt","PICTURE","getBuffer","saiz","clli","tref","data_offset","reference_ID","initSampleGroups"," v=","num_dep_sub","default_sample_duration","getTime","dvh1","substring","altr","AVCProfileIndication","nb_PPS_nalus","moov","trex","encm","sample_duration","fiel","entity_groups","default_AlgorithmID","strk","max_display_mastering_luminance","sent","createFullBoxCtor","track_width","dobr","unsetExtractionOptions","leva","Appending new buffer (fileStart: ","sbgpBox","byteOffset","ipmas","samples_duration","alternate_group: ","description","target","a1op","layer_size","length_size_of_traf_num","initialized","1302jcJTSa","createSingleSampleMoof","mdhd","dependsOn_ES_ID","writeUint16Array","ftyp"," full extent size: ","pos_x","bad_pixels","ES_ID","kinds","mfhd","getTrackById","quat_y","step_count","parseSample","onReady","sub_track_id","bsmod","revokeObjectURL","component_types","moovBox","readFloat64Array","writeInt16","num_tile_cols_minus_one","auxC","getUint16","Buffer must be defined and non empty","nextSample","horizontal_justification","referenced_size","sample_description_index","prof","SingleItemTypeReferenceBoxLarge","href","num_entities_in_group","stream_read_1_bytes","ipro","schema_location","createUUIDBox","und","join","byteLength","writeInt32Array","component_index","full_range_flag","item_protection_index","vertresolution","u16stringbe","ptl_frame_only_constraint_flag","nalu_type","ptl_num_sub_profiles","getInt16","uint32","TRUN_FLAGS_CTS_OFFSET","primaryRChromaticity_x","version:","writeHeader","ipco","av1C","log","metadata","avgFrameRate","degradation_priority","_buffer","mvhdBox","horizOffD","grouping_type_parameter","msg","schi","mvhd","readFloat32Array","parseOneBox","writeUint64","boxCodes"," offset: ","float32be","PADDING","dts","writeUCS2String","download","skip","Audio","getUint8","setAttribute","ContainerBox","tag","offset_size","stsc","nclx","offset","processItems","avcC","sinf","moof_offset","otherTracks","CoupledCount","tx3g","OCR_ES_ID","a2394f525a9b4f14a2446c427c648df4","sdtp","sbgp","component_format","getEndFilePositionAfter","undefined","accurateStatisticsFlag","buffer","axis","associations","stppSampleEntry","fragment_duration","document","length_size_of_sample_num"," f=","sbpm","trexs","writeUint32","Subtitle","bad_rows","ASCII","moovStartFound","content_encoding","whitePointChromaticity_y","SampleEntry","readUint16","error","greatestDecodeToDisplayDelta","minf","createFragment","avgRateFlag","nump","88iYSKYh","cprt","SingleItemTypeReferenceBox","sdptext","fieldCount","btrt","sample_sizes","stssBox","moovStartSent","payt","pano","fromCharCode","SLConfigDescriptor","ster","schemeURI","sample_delta","bits_per_channels","Log","items","aebr","int32be","itemsDataSize","createMediaSampleEntryCtor","default_isProtected","esd","default_constant_IV","dOps","high_bitdepth","levels","mapInt8Array","seig","type","hvc1","mapInt16Array","stvi","volume","readUint64","float64le","add","media_duration","1904-01-01T00:00:00Z","grpl","mehdBox","first_sample_index","buildTrakSampleLists","num_bad_rows","senc","getLength","tfhd","sample_number","j2kH","stcoBox","trunBox","insertBuffer","avc4","bad_columns","hinf","moof_number","setSampleGroupProperties","avgBitRate","general_profile_compatibility","presentation_time","isAudio","pssh","TFHD_FLAG_SAMPLE_SIZE","nextParsePosition","tsel"," data (alreadyRead: ","createSampleGroupCtor","writeUint24","references","box","iloc","Trying to create a new buffer of size: ","lfeon","codec_specific_parameters","parseUUID","base_data_offset","height","samples_size","seq_tier_0","mjp2","op_index","cslgBox","default_sample_info_size","sequence_number","715415mEjdVL","channel_count","timescale","smhdBox","movie_timescale","vp08","sample_groups","tfdt","writeInt32","LITTLE_ENDIAN","whitePointChromaticity_x","skip_byte_block","readUint32","media_rate_integer","padbits","vertOffN","initializeSegmentation","reserved","ptl_frame_only_constraint","position","itemToFragmentedTrackFile","mergeNextBuffer","reserved_1","default_KID","oti","general_level_idc","addEntry","tmin","value","displayFlags","MultiBufferStream","description_length","setInt8","_byteLength","slice","process_sdtp","bad_pixel_column","number_in_traf","361602hBquMH","tkhd","indexOf","subtitles","etyp","getOTI","drefBox","monochrome","Text","vvcN","TRUN_FLAGS_DATA_OFFSET","avgBitrate","dinf","createBoxCtor","tapt","item_type","bit_depth_luma_minus8","Box","sample_has_redundancy","ac-3","is_fragment","source","logBufferLevel","stsh","findDescriptor","av01","ERR_NOT_ENOUGH_DATA","getSample","SAP_type","trun_number","decimalToHex","prft","cmpd","opcolor","readInt16Array","sample_groups_info","TRUN_FLAGS_DURATION","trafs","default_sample_description_index","Adjusting box ","nativeToEndian","StreamCount","encu","segment_duration"," on track #","stszBox","modified","buffers","elngBox","sample_size","constant_frame_rate","description_boxes","construction_method","write","vvc1","general_tier_flag","first_output_sample","hdr_size","meco","media_time","rtp ","parseFooter","held_bits","priority","sidx","VORBIS_COMMENT","subBoxNames","start","TRUN_FLAGS_FIRST_FLAG","wvtt","min_spatial_segmentation_idc","ptl_sublayer_present_mask","unpack","mha1","system_id","readInt16","horizresolution","seek","codecIntializationDataSize","presentation_time_delta","fr-FR","moofs","getWidth","bits_per_pixel","float32le","cleanApertureWidthD","compressorname","sync_sample_numbers","sampleProcessingStarted","ES_Descriptor","avcDecoderConfigRecord","mapInt32Array","kind","OutputChannelCount","URL","code","parseOneDescriptor","principal_point_x","updateSampleLists"," stored buffer(s) (","used","initial_duration","lastBoxStartPosition","elst","boxEqual","truns","replace","ind_subs","intra_pred_used","urn Box","SAMPLE_ENTRY_TYPE_VISUAL","save","next_track_id: ","chunk_index",'application/mp4; codecs="',"setNextSeekPositionFromSample","stereo_indication_type","sample_info_size","edts","getHeight","hvcC","getUint32","default_constant_IV_size","endianness","Track created with MP4Box.js","getCodecs","moovAudioNum","hev1SampleEntry","timescale: ","push","mdcv","stshBox","roll_distance","extent_length","reference_type","parseRemainingDescriptors","minimum_bitrate","readUint16Array","compositionStartTime","transferFunction","<","sidxBox","general_profile_space","group_description_index","emsg","configurationVersion","notice","forEach","mskC","rash","tfra","getInt32","CONTAINER_BOXES","nextSeekPosition","writeInt8Array","onSegment","boxEqualFields","parseDataAndRewind","acmod","extractedTracks","cstring","Found 'mdat' end in buffered data","default_length","getPerformanceInfo","tyco","bit_depth_minus8","TFHD_FLAG_SAMPLE_FLAGS","videoFullRangeFlag","floor","block_reversed","trexBox","lsel","mapUint32Array","bsid","819040VRSFMR","boxes","ptl_present_flag","brst","data","has_redundancy","item_ID","alternate_group","volume: ","first_sample_flags","compatible_brands","getSampleSize","_size","item_count","UUIDBoxes","setInt16","moovVideoNum","num_total_samples","min_display_mastering_luminance","writeFooter","setSegmentOptions","avc2","sampleEntryCodes","TKHD_FLAG_IN_MOVIE","graphicsmode","url ","u16string","addTrack","last_sample_in_run","leastDecodeToDisplayDelta","udes","TKHD_FLAG_ENABLED","dec3","8225nszstW","isVideo","stream","vvi1","mvif","fscod","default_group_description_index",'video/mp4; codecs="',"nalu_arrays","udta","rate: ","entries","aux_info_type_parameter","flags:","operation_point_count","pos_y","is_depended_on","setInt32","brands","rapAlignement","cleanApertureHeightN","BoxWriter","Exporting on track #","dref","scheme_type","call","BIG_ENDIAN","track_ID","audioTracks","nbSamples","default_Per_Sample_IV_Size","white_point","stop","writeType","setExtractionOptions","sampling_type","createObjectURL","bad_pixel_row","scheme_uri","data_reference_index","vp09","sync","mdat","vipr","Per_Sample_IV_Size","createCommonjsModule","general_profile_idc","has_fragment_subsamples","uint8",""","seekPoints","mdatBox","group_id","DataStream.save: Can't create object URL.","next_track_id"];return(ff=function(){return t})()}uf[df(795)],uf[df(291)],uf[df(1237)],uf[df(894)],uf[df(417)],uf[df(594)],uf[df(1273)],uf[df(580)],uf[df(167)],uf.createFile;const mf=gf;function gf(t,e){const s=bf();return(gf=function(t,e){return s[t-=204]})(t,e)}function Af(t){return t.reduce(((t,e)=>256*t+e))}function yf(t){const e=gf,s=[101,103,119,99],i=t.length-28,r=t[e(246)](i,i+s.length);return s[e(232)](((t,e)=>t===r[e]))}function bf(){const t=["slice","1582636aDHGSj","object","1308cppUxv","message","6022660CByniX","player","instantiate","instance","debugLog","function","40566IlpAUw","wasm not supported","length","memory","then","Instance","TransportDescrambler","9885PlOplC","stack overflow","TAG_NAME","catch","transport","3277647UfPaCB","7022280ykobzB","byteLength","reverse","8645wcUtDh","Module","every","exports","5UiXSlg","init error","destroy","not support wasm","set","map","buffer","init","debugWarn","10tWbJWS","parse","Memory"];return(bf=function(){return t})()}!function(t,e){const s=gf,i=t();for(;;)try{if(498445===parseInt(s(234))/1*(parseInt(s(214))/2)+-parseInt(s(221))/3+parseInt(s(204))/4+parseInt(s(230))/5*(-parseInt(s(206))/6)+-parseInt(s(208))/7+parseInt(s(227))/8+parseInt(s(226))/9*(parseInt(s(243))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(bf);mf(236),mf(225);function vf(t,e){const s=wf();return(vf=function(t,e){return s[t-=212]})(t,e)}const Sf=vf;function wf(){const t=["channel_count","bind","videoTrackId","start","dispatch","audio","offset","calcIframeIntervalTimestamp","debugWarn","onSamples","timescale","debugError","92740NhGSHA","click","12838vXcMoK","535267OaSjEJ","destroy","getTrackById","updateStats","hvcC","1807071DupDRY","indexOf","getStreamBufferSize","buffer","7512EnRmMx","_listenMp4Box","removeUsedSamples","cryptoPayload","390ZifZrD","length","_doDecodeByFmp4",'video/mp4; codecs="avc1.640028,mp4a.40.2"',"createElement","mp4Box","DataStream","entries","getSeqHeader","setExtractionOptions","4JpZKlh","video","4567472fuUljx","474YNSnmj","replace","stsd","codec","debugLog","href","audioTrackId","duration","sample_rate","Fmp4Demux","TAG_NAME","revokeObjectURL","getInputByteLength","appendBuffer","_opt","seqHeader","byteLength","write","tempFmp4List","cryptoPayloadAudio","audioTracks","hasAudio","mdia","cts","minf","1657007zRqyFo","onReady","flush","download","set","405927DXUzdw","avcC","config","player","data","mp4Box onError","isHevc","onError","is_sync","downloadFmp4File"];return(wf=function(){return t})()}!function(t,e){const s=vf,i=t();for(;;)try{if(949545===parseInt(s(253))/1*(parseInt(s(276))/2)+parseInt(s(258))/3+parseInt(s(278))/4+-parseInt(s(250))/5*(-parseInt(s(279))/6)+-parseInt(s(252))/7*(parseInt(s(262))/8)+-parseInt(s(228))/9*(parseInt(s(266))/10)+parseInt(s(223))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(wf);class Ef extends Dp{constructor(t){const e=vf;super(t),this[e(289)]=e(288),this[e(231)]=t,this[e(271)]=uf.createFile(),this.tempFmp4List=[],this[e(244)]=0,this.videoTrackId=null,this.audioTrackId=null,this[e(234)]=!1,this[e(263)](),t[e(283)](this[e(289)],"init")}[Sf(254)](){const t=Sf;this[t(271)]&&(this.mp4Box.stop(),this[t(271)][t(225)](),this[t(271)].destroy(),this[t(271)]=null),this.tempFmp4List=[],this[t(244)]=0,this[t(240)]=null,this[t(285)]=null,this.isHevc=!1,this[t(231)].debugLog(this[t(289)],"destroy")}[Sf(263)](){const t=Sf;this[t(271)][t(224)]=this.onReady[t(239)](this),this[t(271)][t(235)]=this[t(235)].bind(this),this[t(271)][t(247)]=this.onSamples[t(239)](this)}[Sf(224)](t){const e=Sf;this[e(231)][e(283)](this[e(289)],e(224),t);const s=t.videoTracks[0],i=t[e(218)][0];if(s){this[e(240)]=s.id;const t=this[e(274)](s);t&&(this[e(231)].debugLog(this[e(289)],e(213),t),this[e(268)](t,D.video,0,!0,0)),this[e(271)][e(275)](s.id)}if(i&&this[e(231)][e(212)][e(219)]){this[e(285)]=i.id;const t=i[e(243)]||{},s=de[e(259)](t[e(287)]),r=i[e(282)][e(280)]("mp4a.40.","");this[e(271)][e(275)](i.id);const n={profile:parseInt(r,10),sampleRate:s,channel:t[e(238)]},o=ue(n);this[e(231)][e(283)](this[e(289)],"aacADTSHeader",o,e(230),n),this[e(268)](o,D[e(243)],0,!1,0)}this.mp4Box[e(241)]()}[Sf(235)](t){const e=Sf;this[e(231)][e(249)](this[e(289)],e(233),t)}[Sf(247)](t,e,s){const i=Sf;if(t===this.videoTrackId){for(const t of s){const e=t[i(232)],s=t[i(236)],r=1e3*t[i(221)]/t.timescale;t[i(286)],t[i(248)],this.player[i(256)]({vbps:e[i(214)],dts:r}),s&&this[i(245)](r);let n=null;n=this[i(234)]?Bh(e,s):oh(e,s);let o=this[i(265)](n,s);this[i(268)](o,D[i(277)],r,s,0)}this[i(271)][i(264)](t)}else if(t===this[i(285)]){if(this.player[i(212)][i(219)]){for(const t of s){const e=t[i(232)];this[i(231)][i(256)]({abps:e[i(214)]});const s=1e3*t[i(221)]/t[i(248)];t[i(286)],t[i(248)];const r=new Uint8Array(e[i(214)]+2);r[i(227)]([175,1],0),r[i(227)](e,2);const n=this[i(217)](r);this[i(268)](n,D[i(243)],s,!1,0)}this[i(271)][i(264)](t)}}else this[i(231)][i(246)](this[i(289)],"onSamples() trackId error",t)}[Sf(274)](t){const e=Sf,s=this.mp4Box[e(255)](t.id);for(const t of s[e(220)][e(222)].stbl[e(281)][e(273)])if(t[e(229)]||t[e(257)]){const s=new(uf[e(272)])(void 0,0,uf[e(272)].BIG_ENDIAN);let i=[];t[e(229)]?(t.avcC[e(215)](s),i=[23,0,0,0,0]):(this[e(234)]=!0,t[e(257)][e(215)](s),i=[28,0,0,0,0]);const r=new Uint8Array(s.buffer,8),n=new Uint8Array(i[e(267)]+r[e(267)]);return n[e(227)](i,0),n[e(227)](r,i[e(267)]),n}return null}[Sf(242)](t){const e=Sf;let s=new Uint8Array(t);s[e(261)].fileStart=this[e(244)],this[e(244)]+=s[e(214)],this[e(271)][e(292)](s[e(261)])}[Sf(237)](){const t=Sf,e=new Blob(this[t(216)],{type:t(269)}),s=URL.createObjectURL(e),i=document[t(270)]("a");i[t(284)]=s,i[t(226)]=je()+".fmp4",i[t(251)](),URL[t(290)](s)}[Sf(291)](){const t=Sf;let e=0;return this[t(271)]&&(e=this.mp4Box[t(260)]()),e}}function If(){var t=["2136036eByzkw","3245913spUvxD","2846934ixmjPY","player","debugLog","init","60CDrZpT","TAG_NAME","destroy","28slyPVd","2480144whHSZL","60SPPkag","Mpeg4Demux","LOG_NAME","158558movqWx","297235Rwccmf","1EtFLUC","2808198GEbhsy"];return(If=function(){return t})()}function Tf(t,e){var s=If();return(Tf=function(t,e){return s[t-=200]})(t,e)}var kf=Tf;!function(t,e){for(var s=Tf,i=t();;)try{if(951865===-parseInt(s(201))/1*(-parseInt(s(217))/2)+-parseInt(s(203))/3+parseInt(s(214))/4*(parseInt(s(200))/5)+parseInt(s(205))/6+parseInt(s(212))/7*(-parseInt(s(213))/8)+-parseInt(s(202))/9+parseInt(s(209))/10*(parseInt(s(204))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(If);class _f extends Dp{constructor(t){var e=Tf;super(t),this[e(206)]=t,this[e(210)]=e(215),this.player[e(207)](this[e(216)],e(208))}[kf(211)](){var t=kf;super[t(211)](),this[t(206)][t(207)](this[t(216)],t(211))}}function Cf(t,e){var s=Rf();return(Cf=function(t,e){return s[t-=347]})(t,e)}function Rf(){var t=["23470lCbYkn","filter","38094FylAnm","238314tWJNYc","forEach","set","byteLength","reduce","4868224eiuMGC","1611yEIwKN","612360DZtlCm","124VuEAgm","1411050OKGBQy","7jrZYyW","303650KXTwPT","length"];return(Rf=function(){return t})()}function Df(){for(var t=Cf,e=arguments.length,s=new Array(e),i=0;ie+s[t(352)]),0));let n=0;return s[t(350)]((e=>{var s=t;r[s(351)](e,n),n+=e[s(352)]})),r}!function(t,e){for(var s=Cf,i=t();;)try{if(304617===-parseInt(s(349))/1+-parseInt(s(360))/2+-parseInt(s(348))/3*(-parseInt(s(357))/4)+-parseInt(s(356))/5+-parseInt(s(358))/6*(-parseInt(s(359))/7)+parseInt(s(354))/8+-parseInt(s(355))/9*(parseInt(s(362))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Rf);const Lf=Of;function xf(){const t=["hasKeyframesIndex","sampling_index","level","channel_count","videoDataRate","channel_config","random_access_indicator","isComplete","times","expected_length","270192afXEFS","hasVideo","slices","dts","stream_id","6000oMquYD","sampling_freq_index","isSeekable","length","chromaFormat","mimeType","len","pid","refFrames","profile","original_codec_mimetype","config","keyframesIndex","39FKCvOh","hasAudio","original_object_type","1IhjqUH","videoCodec","881514yGVOJp","mp4a.40.","floor","_search","sarNum","width","12192lHZUrx","audio_object_type","sarDen","filepositions","stream_type","6111030NtDmod","data","userAgent","806265YQHeuo","codec_mimetype","toLowerCase","duration","audioCodec","audioChannelCount","audioSampleRate","266TLFuuY","3915189AMjMhJ","segmentCount","total_length","android","sampling_rate","firefox"];return(xf=function(){return t})()}!function(t,e){const s=Of,i=t();for(;;)try{if(773562===-parseInt(s(524))/1*(parseInt(s(532))/2)+-parseInt(s(521))/3*(parseInt(s(508))/4)+-parseInt(s(540))/5+-parseInt(s(526))/6+parseInt(s(486))/7*(parseInt(s(503))/8)+parseInt(s(487))/9+-parseInt(s(537))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(xf);const Pf={kMPEG1Audio:3,kMPEG2Audio:4,kPESPrivateData:6,kADTSAAC:15,kLOASAAC:17,kAC3:129,kEAC3:135,kMetadata:21,kSCTE35:134,kH264:27,kH265:36,G711A:144,G711U:145,G722:146,G723:147,G729:153,OPUS:156};class Bf{constructor(){const t=Of;this[t(505)]=[],this[t(489)]=0,this[t(502)]=0,this[t(499)]=0}}class Mf{constructor(){const t=Of;this.pid=null,this[t(538)]=null,this[t(536)]=null,this.random_access_indicator=null}}class Ff{constructor(){const t=Of;this[t(515)]=null,this[t(507)]=null,this[t(514)]=null,this.data=null,this.pts=null,this.nearest_pts=null,this[t(506)]=null}}function Of(t,e){const s=xf();return(Of=function(t,e){return s[t-=480]})(t,e)}const Uf=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];class Nf{constructor(){const t=Of;this[t(513)]=null,this[t(482)]=null,this[t(522)]=null,this[t(504)]=null,this[t(483)]=null,this[t(525)]=null,this.audioDataRate=null,this[t(497)]=null,this[t(485)]=null,this[t(484)]=null,this[t(531)]=null,this.height=null,this.fps=null,this[t(517)]=null,this.level=null,this[t(516)]=null,this[t(512)]=null,this[t(530)]=null,this.sarDen=null,this.metadata=null,this.segments=null,this[t(488)]=null,this[t(493)]=null,this.keyframesIndex=null}[Lf(500)](){const t=Lf;let e=!1===this[t(522)]||!0===this.hasAudio&&null!=this[t(483)]&&null!=this[t(485)]&&null!=this[t(484)],s=!1===this[t(504)]||!0===this[t(504)]&&null!=this.videoCodec&&null!=this[t(531)]&&null!=this.height&&null!=this.fps&&null!=this.profile&&null!=this[t(495)]&&null!=this[t(516)]&&null!=this[t(512)]&&null!=this[t(530)]&&null!=this[t(534)];return null!=this[t(513)]&&e&&s}[Lf(510)](){return!0===this[Lf(493)]}getNearestKeyframe(t){const e=Lf;if(null==this[e(520)])return null;let s=this[e(520)],i=this[e(529)](s[e(501)],t);return{index:i,milliseconds:s[e(501)][i],fileposition:s[e(535)][i]}}[Lf(529)](t,e){const s=Lf;let i=0,r=t[s(511)]-1,n=0,o=0,a=r;for(e=t[n]&&e=6?(r=5,s=new Array(4),a=n-3):(r=2,s=new Array(2),a=n):-1!==h.indexOf(e(490))?(r=2,s=new Array(2),a=n):(r=5,a=n,s=new Array(4),n>=6?a=n-3:1===o&&(r=2,s=new Array(2),a=n)),s[0]=r<<3,s[0]|=(15&n)>>>1,s[1]=(15&n)<<7,s[1]|=(15&o)<<3,5===r&&(s[1]|=(15&a)>>>1,s[2]=(1&a)<<7,s[2]|=8,s[3]=0),this[e(519)]=s,this[e(491)]=Uf[n],this[e(494)]=n,this[e(496)]=o,this.object_type=r,this[e(523)]=i,this[e(480)]=e(527)+r,this[e(518)]=e(527)+i}}const Vf=Gf;function zf(){const t=["AAC: AudioObjectType changed from ","last_pcr_","AAC: Detected pts overlapped, ","handleSectionSlice","hvcc","calcIframeIntervalTimestamp","cts","parseH264Payload","current_pmt_pid_","sampling_freq_index","audio_init_segment_dispatched_","program_number","slices","object_type","floor","codec","_doDecodeAudio","updateStats","parsePES","fps_num","G711A","parseSPS$2","Parsed first PMT: ","kSliceIDR_N_LP","destroy","dispatchAudioVideoMediaSegment","kEAC3","debugLog","kMPEG1Audio","4520144zljxMe","h265","sync_offset","Generated first HEVCDecoderConfigurationRecord for mimeType: ","24BGrlVj","aac","isFirstDispatch and tsPacketSize = ",", syncOffset = ","parseOpusPayload","aacADTSHeader profile: ","sar_ratio","hasIncompleteData","kSliceNonIDR","_doDecodeByTs","handlePESSlice: packet_start_code_prefix should be 1 but with value ","parseSCTE35","frameRate","chroma_format","audio_metadata_","parsePAT: table_id ","low_frequency_effects_channel_on","pmt_","nearest_pts","loas_aac","updateVideoInfo","match","duration_","audio_track_","sort","hasAudio","getInputByteLength","presentHeight","expected_length","frame_rate","kSliceCRA_NUT","program_pmt_pid","readNextNaluPayload","updateAudioInfo","samples","_getPcrBase","parseADTSAACPayload","abs","adts_aac","width","TAG","SMPTE 2038 Metadata: pid=","config_","isIFrame","timescale","loas_previous_frame","kSliceVPS","ac-3","VANC","dispatchAudioMediaSegment","Synchronous KLV Metadata: pid=","channel_mode","1527758suLYXR","dispatchVideoMediaSegment","audioSampleRate","timestamp_offset_","dts","common_pids","originalCodec","bit_depth","1NzmsLI","audio_object_type","fps","video_metadata_","player","bitDepth","h264","level","kPESPrivateData","length","duration",'video/mp2t; codecs="',"first_parse_","127130MHZsyb","parseSection","MP3","presentWidth","kMPEG2Audio","181511phCzDV","pes_slice_queues_","_preDoDecode","Video: Present resolution width changed from ","program_pmt_map_","_getTimestamp","type","mp3","tsPacketSize","parseTimedID3MetadataPayload","MP3: Channel count changed from ","MP3: SamplingFrequencyIndex changed from ","fps_den","profile","bit_stream_mode","discontinuity_indicator"," to ","stream_type","aac_last_incomplete_data_","pts","refSampleDuration","TAG_NAME","dispatchVideoInitSegment","codecHeight","opus","audio_metadata_changed_",", stream_id=","from","set","parsePMT","pps","25842FmcRLS","last_pcr_base_","parsePES: packet_start_code_prefix should be 1 but with value ","codecWidth","stringify","mseDecodeAudio","version_number","getIncompleteData","AAC: SamplingFrequencyIndex changed from ","Not Supported Opus channel count.","parseChunks",", dts=","sarRatio","sampling_frequency","ID3 "," is not corresponded to PMT!","handlePESSlice","video","75catoJs","81936iMnbIL","_doDecodeVideo","detectAudioMetadataChange","cryptoPayloadAudio","eac3","debugWarn","chromaFormat","emitPESSlices","G711U","AC3: Bit Stream Identification changed from ","media_info_","parseH265Payload","pid","Video: Coded Resolution changed from ","isHevc","syncOffset","parsePPS","video_track_","concat","Opus","Malformed PES: PES_packet_length < 3 + PES_header_data_length","audio_last_sample_pts_","descriptor","height","kH264","Video: Codec mimeType changed from ","min","cryptoPayload","isInitSegmentDispatched","Parsed first PAT: ","parseSynchronousKLVMetadataPayload","expected: ","debugError","bit_stream_identification","sample_rate","videoCodec","g711u","pid_stream_type","parsePESPrivateDataPayload","kSliceSPS","ref_frames","parsePAT","elementary_stream_priority_indicator","fromCharCode","video_metadata_changed_","parseSMPTE2038MetadataPayload",", sampleRate: ","audio","AAC: Unknown pts","getNearestTimestampMilliseconds","parseEAC3Payload",", pts=","g711a","parseAC3Payload","total_length","AC3: Channel Mode changed from ","detectVideoMetadataChange","4458167KtVVzl","codec_size","Generated first AudioSpecificConfig for mimeType: ","channel_count","details","kMetadata","ms, PES pts: ",", channel: ","subarray","payload","push","random_access_indicator","sps","1260qGtwTy","parseSPS","channel_config","audioSampleRateIndex","emitSectionSlices","synchronous_klv_pids","len","KLVA","Opus: Channel count changed from ","file_position","byteLength","audioCodec","codec_mimetype","_initPmt","dispatchAudioInitSegment","_remainingPacketData","scte_35_pids","hasVideo","stream_id","refFrames","Timed ID3 Metadata: pid=","vps","Audio: Audio Codecs changed from ","pcr_pid","level_string","probe","forEach","original_codec_mimetype","has_video_","ac3","video_init_segment_dispatched_","dispatchPESPrivateDataDescriptor","present_size","payload_unit_start_indicator","pes_private_data_pids","chroma_format_string","pat_","kLOASAAC","ec-3","timed_id3_pids","dispatch","kAC3","meta","correctSamplePts","kH265","H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment","clearSlices","Asynchronous KLV Metadata: pid=","smpte2038_pids","data","section_slice_queues_","sarNum","parseAsynchronousKLVMetadataPayload","current_program_","timescale_","readNextAACFrame","594TPTBBp","EAC3: Unsupported codec","kSCTE35","AC3: Unsupported codec","config","channelCount","has_audio_","sampling_index","parsePMT: table_id ","parseVPS","AAC","profile_string","MP3: AudioObjectType changed from "];return(zf=function(){return t})()}function Gf(t,e){const s=zf();return(Gf=function(t,e){return s[t-=173]})(t,e)}!function(t,e){const s=Gf,i=t();for(;;)try{if(759041===parseInt(s(401))/1*(-parseInt(s(393))/2)+parseInt(s(450))/3*(-parseInt(s(341))/4)+-parseInt(s(468))/5*(-parseInt(s(469))/6)+-parseInt(s(226))/7+-parseInt(s(337))/8+-parseInt(s(295))/9*(-parseInt(s(414))/10)+parseInt(s(419))/11*(parseInt(s(239))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(zf);class Wf extends Dp{constructor(t){const e=Gf;super(t),this[e(405)]=t,this.TAG_NAME="TsDemux",this[e(413)]=!0,this[e(427)]=0,this.syncOffset=0,this[e(358)]=null,this[e(383)]=null,this[e(179)]=new Nf,this[e(293)]=90,this.duration_=0,this.pat_={version_number:0,network_pid:0,program_map_pid:{}},this[e(292)]=null,this[e(316)]=-1,this[e(423)]={},this[e(420)]={},this.section_slice_queues_={},this.video_metadata_={vps:null,sps:null,pps:null,details:null},this[e(355)]={codec:null,audio_object_type:null,sampling_freq_index:null,sampling_frequency:null,channel_config:null},this[e(309)]=null,this.last_pcr_base_=NaN,this[e(396)]=0,this[e(190)]=void 0,this.aac_last_incomplete_data_=null,this[e(267)]=!1,this[e(301)]=!1,this.video_init_segment_dispatched_=!1,this[e(318)]=!1,this[e(213)]=!1,this[e(444)]=!1,this[e(386)]=null,this[e(186)]={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this[e(364)]={type:e(216),id:2,sequenceNumber:0,samples:[],length:0},this[e(254)]=null,this[e(405)][e(335)](this[e(440)],"init")}destroy(){const t=Gf;this[t(179)]=null,this[t(420)]=null,this[t(289)]=null,this[t(404)]=null,this[t(355)]=null,this[t(437)]=null,this[t(186)]=null,this[t(364)]=null,this[t(254)]=null,super[t(332)]()}[Vf(264)](t){const e=Vf;let s=new Uint8Array(t),i=-1,r=188;if(s[e(249)]<=3*r)return{needMoreData:!0};for(;-1===i;){let t=Math.min(1e3,s.byteLength-3*r);for(let e=0;e=4&&(i-=4),{match:!0,consumed:0,ts_packet_size:r,sync_offset:i})}[Vf(252)](){return{program_number:0,version_number:0,pcr_pid:0,pid_stream_type:{},common_pids:{h264:void 0,h265:void 0,adts_aac:void 0,loas_aac:void 0,opus:void 0,ac3:void 0,eac3:void 0,mp3:void 0,g711a:void 0,g711u:void 0},pes_private_data_pids:{},timed_id3_pids:{},synchronous_klv_pids:{},asynchronous_klv_pids:{},scte_35_pids:{},smpte2038_pids:{}}}[Vf(279)](t){const e=Vf;let s=new Uint8Array(t);this._remainingPacketData&&(s=Df(this[e(254)],s),this[e(254)]=null);let i=s.buffer;const r=this.parseChunks(i);r?this[e(254)]=s[e(234)](r):s[e(410)]>>6;i[1];let o=(31&i[1])<<8|i[2],a=(48&i[3])>>>4,h=15&i[3],c=!(!this[e(358)]||this.pmt_[e(262)]!==o),l={},d=4;if(2==a||3==a){let t=i[4];if(t>0&&(c||3==a)){if(l[e(434)]=(128&i[5])>>>7,l.random_access_indicator=(64&i[5])>>>6,l[e(211)]=(32&i[5])>>>5,(16&i[5])>>>4){let t=300*this[e(376)](i)+((1&i[10])<<8|i[11]);this.last_pcr_=t}}if(2==a||5+t===188){s+=188,204===this[e(427)]&&(s+=16);continue}d=5+t}if(1==a||3==a)if(0===o||o===this.current_pmt_pid_||null!=this[e(358)]&&this[e(358)][e(206)][o]===Pf.kSCTE35){let i=188-d;this[e(311)](t,s+d,i,{pid:o,payload_unit_start_indicator:n,continuity_conunter:h,random_access_indicator:l[e(237)]})}else if(null!=this.pmt_&&null!=this[e(358)][e(206)][o]){let i=188-d,r=this[e(358)][e(206)][o];(o===this[e(358)].common_pids[e(407)]||o===this.pmt_[e(398)].h265||o===this.pmt_[e(398)].adts_aac||o===this[e(358)][e(398)].loas_aac||o===this[e(358)][e(398)][e(268)]||o===this[e(358)][e(398)][e(173)]||o===this.pmt_[e(398)].opus||o===this.pmt_[e(398)][e(426)]||o===this[e(358)][e(398)][e(221)]||o===this.pmt_.common_pids[e(205)]||!0===this.pmt_[e(273)][o]||!0===this[e(358)][e(278)][o]||!0===this[e(358)].synchronous_klv_pids[o]||!0===this[e(358)].asynchronous_klv_pids[o])&&this.handlePESSlice(t,s+d,i,{pid:o,stream_type:r,payload_unit_start_indicator:n,continuity_conunter:h,random_access_indicator:l[e(237)]})}s+=188,204===this[e(427)]&&(s+=16)}return this.dispatchAudioVideoMediaSegment(),s}[Vf(311)](t,e,s,i){const r=Vf;let n=new Uint8Array(t,e,s),o=this.section_slice_queues_[i[r(181)]];if(i[r(272)]){let a=n[0];if(null!=o&&0!==o.total_length){let n=new Uint8Array(t,e+1,Math.min(s,a));o[r(320)].push(n),o[r(223)]+=n[r(249)],o[r(223)]===o[r(369)]?this[r(243)](o,i):this[r(285)](o,i)}for(let h=1+a;h=o[r(369)]&&this[r(285)](o,i),h+=c.byteLength}}else if(null!=o&&0!==o.total_length){let n=new Uint8Array(t,e,Math[r(195)](s,o[r(369)]-o[r(223)]));o.slices[r(236)](n),o[r(223)]+=n[r(249)],o[r(223)]===o[r(369)]?this[r(243)](o,i):o[r(223)]>=o[r(369)]&&this[r(285)](o,i)}}[Vf(466)](t,e,s,i){const r=Vf;let n=new Uint8Array(t,e,s),o=n[0]<<16|n[1]<<8|n[2];n[3];let a=n[4]<<8|n[5];if(i[r(272)]){if(1!==o)return void this[r(405)].debugWarn(this[r(440)],r(351)+o);let t=this[r(420)][i[r(181)]];t&&(0===t[r(369)]||t[r(369)]===t[r(223)]?this[r(176)](t,i):this[r(285)](t,i)),this[r(420)][i[r(181)]]=new Bf,this[r(420)][i[r(181)]][r(237)]=i[r(237)]}if(null==this[r(420)][i.pid])return;let h=this[r(420)][i[r(181)]];h[r(320)][r(236)](n),i.payload_unit_start_indicator&&(h[r(369)]=0===a?0:a+6),h[r(223)]+=n.byteLength,h.expected_length>0&&h[r(369)]===h[r(223)]?this[r(176)](h,i):h[r(369)]>0&&h[r(369)]>>6,h=s[8];(2===a||3===a)&&(i=this[e(424)](s,9),o=3===a?this._getTimestamp(s,14):i);let c,l=9+h;if(0!==n){if(n<3+h)return void this[e(405)][e(174)](this.TAG_NAME,e(189));c=n-3-h}else c=s[e(249)]-l;let d=s[e(234)](l,l+c);switch(t.stream_type){case Pf[e(336)]:case Pf.kMPEG2Audio:this.parseMP3Payload(d,i);break;case Pf[e(409)]:this.pmt_[e(398)][e(443)]===t.pid?this[e(345)](d,i):this[e(358)][e(398)][e(268)]===t[e(181)]?this.parseAC3Payload(d,i):this.pmt_[e(398)][e(173)]===t.pid?this[e(219)](d,i):this.pmt_.asynchronous_klv_pids[t[e(181)]]?this[e(291)](d,t[e(181)],r):this[e(358)].smpte2038_pids[t.pid]?this.parseSMPTE2038MetadataPayload(d,i,o,t[e(181)],r):this[e(207)](d,i,o,t[e(181)],r);break;case Pf.kADTSAAC:this[e(377)](d,i);break;case Pf[e(276)]:this.parseLOASAACPayload(d,i);break;case Pf.kAC3:this[e(222)](d,i);break;case Pf.kEAC3:this[e(219)](d,i);break;case Pf[e(231)]:this[e(358)][e(278)][t[e(181)]]?this[e(428)](d,i,o,t[e(181)],r):this[e(358)][e(244)][t[e(181)]]&&this.parseSynchronousKLVMetadataPayload(d,i,o,t.pid,r);break;case Pf[e(193)]:this.parseH264Payload(d,i,o,t.random_access_indicator);break;case Pf[e(283)]:this.parseH265Payload(d,i,o,t.random_access_indicator);break;case Pf.G711A:this.parseG711Payload(d,i,!0);break;case Pf[e(177)]:this.parseG711Payload(d,i,!1);break;default:this[e(405)][e(174)](this.TAG_NAME,"Unsupported stream. type: "+t[e(436)]+", pid: "+t[e(181)])}}else if((188===r||191===r||240===r||241===r||255===r||242===r||248===r)&&t[e(436)]===Pf.kPESPrivateData){let i,o=6;i=0!==n?n:s[e(249)]-o;let a=s[e(234)](o,o+i);this[e(207)](a,void 0,void 0,t[e(181)],r)}}else this[e(405)][e(201)](this[e(440)],e(452)+i)}[Vf(210)](t){const e=Vf;let s=t[0];if(0!==s)return void Log.e(this.TAG,e(356)+s+" is not corresponded to PAT!");let i=(15&t[1])<<8|t[2];t[3],t[4];let r=(62&t[5])>>>1,n=1&t[5],o=t[6];t[7];let a=null;if(1===n&&0===o)a={version_number:0,network_pid:0,program_pmt_pid:{}},a[e(456)]=r;else if(a=this[e(275)],null==a)return;let h=i-5-4,c=-1,l=-1;for(let s=8;s<8+h;s+=4){let i=t[s]<<8|t[s+1],r=(31&t[s+2])<<8|t[s+3];0===i?a.network_pid=r:(a[e(372)][i]=r,-1===c&&(c=i),-1===l&&(l=r))}1===n&&0===o&&(null==this[e(275)]&&this[e(405)].debugLog(this[e(440)],e(198)+JSON.stringify(a)),this[e(275)]=a,this.current_program_=c,this[e(316)]=l)}[Vf(448)](t){const e=Vf;let s=t[0];if(2!==s)return void this.player.debugError(this[e(440)],e(303)+s+e(465));let i,r=(15&t[1])<<8|t[2],n=t[3]<<8|t[4],o=(62&t[5])>>>1,a=1&t[5],h=t[6];if(t[7],1===a&&0===h)i=this[e(252)](),i[e(319)]=n,i[e(456)]=o,this[e(423)][n]=i;else if(i=this[e(423)][n],null==i)return;i.pcr_pid=(31&t[8])<<8|t[9];let c=(15&t[10])<<8|t[11],l=12+c,d=r-9-c-4;for(let s=l;s0){for(let r=s+5;r0)for(let r=s+5;r1&&(this[s(405)].debugWarn(this.TAG_NAME,"AAC: Detected pts overlapped, "+(s(200)+t)+"ms, PES pts: "+r+"ms"),r=t)}}let n,o=new Te(t),a=null,h=r;for(;null!=(a=o[s(294)]());){i=1024/a[s(463)]*1e3;const t={codec:s(342),data:a};0==this[s(318)]?(this[s(355)]={codec:s(342),audio_object_type:a[s(402)],sampling_freq_index:a[s(317)],sampling_frequency:a.sampling_frequency,channel_config:a[s(241)]},this.dispatchAudioInitSegment(t)):this[s(471)](t)&&(this.dispatchAudioMediaSegment(),this[s(253)](t)),n=h;let e=Math.floor(h);const r=new Uint8Array(a[s(288)][s(410)]+2);r[s(447)]([175,1],0),r.set(a.data,2);let o={payload:r,length:r.byteLength,pts:e,dts:e,type:D[s(216)]};this[s(364)][s(375)][s(236)](o),this.audio_track_[s(410)]+=r[s(249)],h+=i}o.hasIncompleteData()&&(this[s(437)]=o.getIncompleteData()),n&&(this[s(190)]=n)}parseLOASAACPayload(t,e){const s=Vf;if(this[s(267)]&&!this[s(269)])return;if(this.aac_last_incomplete_data_){let e=new Uint8Array(t.byteLength+this.aac_last_incomplete_data_[s(249)]);e[s(447)](this.aac_last_incomplete_data_,0),e[s(447)](t,this[s(437)][s(249)]),t=e}let i,r;if(null!=e&&(r=e/this[s(293)]),"aac"===this.audio_metadata_[s(323)]){if(null==e&&null!=this[s(190)])i=1024/this.audio_metadata_[s(463)]*1e3,r=this[s(190)]+i;else if(null==e)return void this[s(405)][s(174)](this.TAG_NAME,s(217));if(this[s(437)]&&this[s(190)]){i=1024/this[s(355)][s(463)]*1e3;let t=this[s(190)]+i;Math.abs(t-r)>1&&(this.player[s(174)](this[s(381)],s(310)+(s(200)+t+s(232)+r+"ms")),r=t)}}let n,o=new _e(t),a=null,h=r;for(;null!=(a=o.readNextAACFrame(ys(this[s(386)])?void 0:this[s(386)]));){this[s(386)]=a,i=1024/a.sampling_frequency*1e3;const t={codec:s(342),data:a};0==this.audio_init_segment_dispatched_?(this[s(355)]={codec:s(342),audio_object_type:a.audio_object_type,sampling_freq_index:a[s(317)],sampling_frequency:a.sampling_frequency,channel_config:a[s(241)]},this[s(253)](t)):this[s(471)](t)&&(this[s(390)](),this[s(253)](t)),n=h;let e=Math[s(322)](h);const r=new Uint8Array(a[s(288)].length+2);r[s(447)]([175,1],0),r.set(a.data,2);let o={payload:r,length:r.byteLength,pts:e,dts:e,type:D[s(216)]};this.audio_track_[s(375)][s(236)](o),this[s(364)][s(410)]+=r[s(249)],h+=i}o[s(348)]()&&(this[s(437)]=o[s(457)]()),n&&(this[s(190)]=n)}[Vf(222)](t,e){}[Vf(219)](t,e){}[Vf(345)](t,e){}parseMP3Payload(t,e){const s=Vf;if(this.has_video_&&!this.video_init_segment_dispatched_)return;let i=[44100,48e3,32e3,0],r=[22050,24e3,16e3,0],n=[11025,12e3,8e3,0],o=t[1]>>>3&3,a=(6&t[1])>>1,h=(t[2],(12&t[2])>>>2),c=3!==(t[3]>>>6&3)?2:1,l=0,d=34;switch(s(426),o){case 0:l=n[h];break;case 2:l=r[h];break;case 3:l=i[h]}switch(a){case 1:d=34,s(410);break;case 2:d=33,s(410);break;case 3:d=32,s(410)}const u={};u[s(321)]=d,u.sample_rate=l,u.channel_count=c,u.data=t;const p={codec:s(426),data:u};0==this[s(318)]?(this[s(355)]={codec:"mp3",object_type:d,sample_rate:l,channel_count:c},this[s(253)](p)):this[s(471)](p)&&(this[s(390)](),this[s(253)](p));const f=new Uint8Array(t[s(410)]+1);f[s(447)]([32],0),f[s(447)](t,1);let m={payload:f,length:f[s(249)],pts:e/this[s(293)],dts:e/this[s(293)],type:D[s(216)]};this[s(364)].samples[s(236)](m),this[s(364)][s(410)]+=f[s(249)]}parseG711Payload(t,e,s){const i=Vf;if(this[i(267)]&&!this[i(269)])return;const r={};r[i(203)]=8e3,r[i(229)]=1;const n={codec:i(s?221:205)};0==this[i(318)]?(this[i(355)]={codec:n[i(323)],sample_rate:r.sample_rate,channel_count:r.channel_count},this.dispatchAudioInitSegment(n)):this.detectAudioMetadataChange(n)&&(this[i(390)](),this.dispatchAudioInitSegment(n));const o=new Uint8Array(t[i(410)]+1),a=s?[114]:[130];o[i(447)](a,0),o[i(447)](t,1);let h={payload:o,length:o.byteLength,pts:e/this[i(293)],dts:e/this[i(293)],type:D.audio};this[i(364)][i(375)][i(236)](h),this[i(364)].length+=o.byteLength}[Vf(471)](t){const e=Vf;if(t[e(323)]!==this[e(355)][e(323)])return this[e(405)].debugLog(this[e(440)],e(261)+(this[e(355)].codec+" to ")+t.codec),!0;if(t[e(323)]===e(342)&&"aac"===this.audio_metadata_[e(323)]){const s=t[e(288)];if(s.audio_object_type!==this.audio_metadata_.audio_object_type)return this.player[e(335)](this[e(440)],e(308)+(this[e(355)][e(402)]+e(435)+s.audio_object_type)),!0;if(s[e(317)]!==this[e(355)].sampling_freq_index)return this[e(405)].debugLog(this[e(440)],e(458)+(this[e(355)].sampling_freq_index+" to ")+s[e(317)]),!0;if(s[e(241)]!==this[e(355)][e(241)])return this[e(405)][e(335)](this[e(440)],"AAC: Channel configuration changed from "+(this.audio_metadata_.channel_config+e(435)+s[e(241)])),!0}else if(t.codec===e(388)&&this[e(355)][e(323)]===e(388)){const s=t[e(288)];if(s[e(463)]!==this[e(355)][e(463)])return this[e(405)][e(335)](this[e(440)],"AC3: Sampling Frequency changed from "+(this.audio_metadata_[e(463)]+e(435)+s.sampling_frequency)),!0;if(s[e(202)]!==this[e(355)][e(202)])return this[e(405)][e(335)](this[e(440)],e(178)+(this[e(355)][e(202)]+" to ")+s.bit_stream_identification),!0;if(s.bit_stream_mode!==this.audio_metadata_.bit_stream_mode)return this.player[e(335)](this[e(440)],"AC3: BitStream Mode changed from "+(this.audio_metadata_[e(433)]+e(435)+s[e(433)])),!0;if(s.channel_mode!==this[e(355)].channel_mode)return this.player.debugLog(this[e(440)],e(224)+(this[e(355)][e(392)]+e(435)+s[e(392)])),!0;if(s[e(357)]!==this[e(355)][e(357)])return this[e(405)][e(335)](this[e(440)],"AC3: Low Frequency Effects Channel On changed from "+(this[e(355)][e(357)]+e(435)+s.low_frequency_effects_channel_on)),!0}else if(t[e(323)]===e(443)&&this[e(355)][e(323)]===e(443)){const s=t[e(281)];if(s[e(203)]!==this[e(355)][e(203)])return this.player[e(335)](this[e(440)],"Opus: SamplingFrequencyIndex changed from "+this[e(355)][e(203)]+" to "+s.sample_rate),!0;if(s[e(229)]!==this.audio_metadata_.channel_count)return this[e(405)][e(335)](this[e(440)],e(247)+(this[e(355)][e(229)]+" to ")+s[e(229)]),!0}else if(t[e(323)]===e(426)&&this[e(355)].codec===e(426)){const s=t[e(288)];if(s[e(321)]!==this[e(355)][e(321)])return this.player[e(335)](this.TAG_NAME,e(307)+(this[e(355)][e(321)]+e(435)+s[e(321)])),!0;if(s[e(203)]!==this.audio_metadata_[e(203)])return this[e(405)][e(335)](this[e(440)],e(430)+(this[e(355)].sample_rate+e(435)+s.sample_rate)),!0;if(s[e(229)]!==this[e(355)][e(229)])return this[e(405)][e(335)](this[e(440)],e(429)+(this[e(355)][e(229)]+" to ")+s[e(229)]),!0}return!1}[Vf(253)](t){const e=Vf;let s={};s[e(425)]=e(216),s.id=this[e(364)].id,s[e(385)]=1e3,s[e(411)]=this.duration_;let i="";if(this.audio_metadata_.codec===e(342)){let r=t[e(323)]===e(342)?t[e(288)]:null,n=new jf(r);s.audioSampleRate=n.sampling_rate,s[e(242)]=n[e(302)],s[e(300)]=n[e(229)],s[e(323)]=n[e(251)],s[e(399)]=n[e(266)],s[e(299)]=n[e(299)],s.refSampleDuration=1024/s[e(395)]*s.timescale,i=H[e(305)];const o=ue({profile:this[e(405)]._opt[e(455)]?n[e(321)]:n.original_object_type,sampleRate:s[e(242)],channel:s[e(300)]});this[e(405)].debugLog(this[e(440)],e(346)+n.object_type+e(215)+s.audioSampleRateIndex+e(233)+s[e(300)]),this[e(350)](o,D[e(216)],0,!1,0)}else this[e(355)][e(323)]===e(388)?this[e(405)][e(174)](this[e(440)],e(298)):this[e(355)][e(323)]===e(277)?this[e(405)][e(174)](this.TAG_NAME,e(296)):this[e(355)][e(323)]===e(443)?this[e(405)][e(174)](this[e(440)],"Opus: Unsupported codec"):this.audio_metadata_.codec===e(426)?(s[e(395)]=this[e(355)][e(203)],s[e(300)]=this[e(355)][e(229)],s[e(323)]=e(426),s[e(399)]="mp3",s[e(299)]=void 0,i=H[e(416)]):this[e(355)].codec===e(221)?(s[e(395)]=this.audio_metadata_[e(203)],s[e(300)]=this.audio_metadata_[e(229)],s[e(323)]="g711a",s[e(399)]="g711a",s[e(299)]=void 0,i=H.G711A):this[e(355)].codec===e(205)&&(s[e(395)]=this[e(355)][e(203)],s[e(300)]=this.audio_metadata_[e(229)],s.codec=e(205),s[e(399)]=e(205),s[e(299)]=void 0,i=H[e(177)]);0==this[e(318)]&&this[e(405)][e(335)](this.TAG_NAME,e(228)+s[e(323)]),this[e(318)]=!0,this.video_metadata_changed_=!1,i&&this[e(405)][e(216)][e(374)]({encTypeCode:i,channels:s.channelCount,sampleRate:s.audioSampleRate})}[Vf(270)](t,e,s){const i=Vf;let r={};r.pid=t,r[i(436)]=e,r[i(191)]=s}[Vf(207)](t,e,s,i,r){const n=Vf;let o=new Ff;if(o[n(181)]=i,o[n(257)]=r,o[n(245)]=t.byteLength,o[n(288)]=t,null!=e){let t=Math[n(322)](e/this[n(293)]);o[n(438)]=t}else o[n(359)]=this[n(218)]();if(null!=s){let t=Math[n(322)](s/this[n(293)]);o[n(397)]=t}}[Vf(428)](t,e,s,i,r){const n=Vf;this[n(405)][n(335)](this[n(440)],n(259)+i+", pts="+e+n(461)+s+n(445)+r)}[Vf(199)](t,e,s,i,r){const n=Vf;this[n(405)][n(335)](this.TAG_NAME,n(391)+i+n(220)+e+n(461)+s+", stream_id="+r)}[Vf(291)](t,e,s){const i=Vf;this.player.debugLog(this[i(440)],i(286)+e+i(445)+s)}[Vf(214)](t,e,s,i,r){const n=Vf;this.player[n(335)](this[n(440)],n(382)+i+n(220)+e+n(461)+s+", stream_id="+r)}[Vf(218)](){const t=Vf;if(null!=this[t(190)])return Math[t(322)](this[t(190)]);if(null!=this.last_pcr_){return Math[t(322)](this[t(309)]/300/this[t(293)])}}_preDoDecode(){const t=Vf,e=this[t(186)],s=this[t(364)];let i=e.samples;this.correctSamplePts(e),this[t(282)](s),s[t(375)][t(410)]>0&&(i=e[t(375)][t(187)](s[t(375)]),i=i[t(365)](((e,s)=>{const i=t;return e[i(397)]-s[i(397)]}))),i[t(265)]((e=>{const s=t,i=new Uint8Array(e[s(235)]);delete e[s(235)],e[s(425)]===D[s(467)]?this[s(470)]({...e,payload:i}):e[s(425)]===D[s(216)]&&this[s(324)]({...e,payload:i})})),e[t(375)]=[],e.length=0,s.samples=[],s.length=0}[Vf(470)](t){const e=Vf,s=new Uint8Array(t[e(235)]);let i=null;i=t[e(183)]?Bh(s,t.isIFrame):oh(s,t.isIFrame),this[e(405)][e(325)]({dts:t.dts,vbps:i[e(249)]}),t[e(384)]&&this[e(313)](t.dts);let r=this[e(196)](i,t[e(384)]);this[e(350)](r,D[e(467)],t[e(397)],t[e(384)],t[e(314)])}[Vf(324)](t){const e=Vf,s=new Uint8Array(t.payload);this.player.updateStats({abps:s.byteLength});let i=this[e(472)](s);this._doDecodeByTs(i,D[e(216)],t.dts,!1,0)}[Vf(367)](){const t=Vf;return this[t(254)]&&this[t(254)][t(249)]||0}[Vf(376)](t){const e=Vf;let s=33554432*t[6]+131072*t[7]+512*t[8]+2*t[9]+(128&t[10])/128+this[e(396)];return s+4294967296>>3&3,n=(6&s[1])>>1,o=(240&s[2])>>>4,a=(12&s[2])>>>2,h=3!==(s[3]>>>6&3)?2:1,c=0,l=0;switch(r){case 0:c=rm[a];break;case 2:c=im[a];break;case 3:c=sm[a]}switch(n){case 1:o{const t=e;this[t(163)](),this.player[t(105)](U.webcodecsAudioInitTimeout)}),1e3)),void qs(t);if(this[e(228)][e(136)]())this[e(228)][e(140)]({dfps:!0}),!this[e(228)][e(248)].videoStart&&(this.player[e(248)][e(126)]=je(),this[e(228)][e(186)]()),this[e(228)].video[e(152)]({videoFrame:t,ts:t.timestamp}),this[e(228)][e(146)]();else if(this[e(228)][e(203)]())this.player[e(140)]({dfps:!0}),ci(this.player[e(234)])?(this.player[e(161)][e(107)]&&this.player.playback[e(120)](),this[e(228)][e(161)][e(270)]?this[e(228)][e(137)][e(113)]({videoFrame:t,ts:t[e(189)]}):this[e(228)].video[e(116)]({videoFrame:t,ts:t[e(189)]})):this.player[e(161)][e(165)]()&&this.player[e(161)][e(270)]&&this.player[e(137)][e(113)]({videoFrame:t,ts:t[e(189)]});else if(this.player.isPlayVod())if(this[e(228)][e(144)].isSeeking()){const s=this[e(228)][e(144)][e(217)];Math.abs(s-t.timestamp)<500&&(this[e(228)][e(144)][e(187)](),this[e(228)][e(140)]({dfps:!0}),this[e(228)].video.render$2({videoFrame:t,ts:t[e(189)]}))}else this[e(228)][e(140)]({dfps:!0}),this.player.video[e(116)]({videoFrame:t,ts:t[e(189)]})}[um(138)](t){const e=um;this[e(228)][e(174)](this[e(160)],e(123),t[e(262)],t);const s=t[e(257)]();-1!==s[e(205)](dt[e(253)])?this[e(228)][e(178)](U[e(223)],s):-1!==s[e(205)](dt[e(110)])||-1!==s.indexOf(dt[e(207)])||-1!==s.indexOf(dt[e(230)])?this[e(228)][e(178)](U[e(111)],s):-1!==s.indexOf(dt[e(148)])&&this[e(228)][e(178)](U[e(171)],s)}handleDecodeAudio(t){const e=um;return this.player[e(267)]()?(this[e(228)].debugLog(this[e(160)],e(159)),void Js(t)):ci(this[e(231)])?(this[e(228)][e(233)](this.TAG_NAME,e(122)),void Js(t)):void(this[e(228)].isPlayer()?this[e(228)][e(104)][e(130)](t,t.timestamp):this[e(228)][e(203)]()?this[e(228)][e(104)][e(130)](t,t[e(189)]):this.player[e(112)]()&&(this[e(228)][e(144)][e(181)]()?Js(t):this[e(228)][e(104)][e(130)](t,t.timestamp)))}[um(216)](t){const e=um;this.player[e(174)](this[e(160)],e(121),t[e(262)],t)}[um(247)](t,e,s,i){const r=um;if(this.player)if(this[r(228)][r(267)]())this[r(228)][r(106)](this[r(160)],r(102));else if(this[r(145)])if(!this[r(231)]&&s&&(this[r(231)]=!0),this[r(231)]){if(this[r(183)]())return void this.player[r(106)](this[r(160)],r(225));if(s&&0===t[1]){const e=15&t[0];let s={};if(e===G[r(214)]){s=sh(t[r(117)](5))}else e===G[r(168)]&&(s=Dh(t));const i=this[r(228)][r(137)][r(103)];i&&i[r(196)]&&i.height&&s&&s[r(222)]&&s.codecHeight&&(s[r(222)]!==i[r(196)]||s.codecHeight!==i[r(218)])&&(this[r(228)][r(106)](this[r(160)],r(177)+i[r(196)]+r(108)+i[r(218)]+",\n new width is "+s[r(222)]+r(269)+s.codecHeight+r(153)),this[r(252)]=!0,this[r(228)].emitError(U.wcsWidthOrHeightChange,"width "+i[r(196)]+"->"+i[r(218)]+" height "+s[r(222)]+"->"+s[r(190)]))}if(this.isWidthOrHeightChanged)return void this[r(228)][r(106)](this[r(160)],r(254));if(ai(t))return void this[r(228)].debugLog(this[r(160)],r(271));if(t[r(119)]<12)return void this[r(228)][r(106)](this[r(160)],r(242)+t.byteLength+r(211));let i=!1,n=(new Date)[r(195)]();!this[r(166)]&&(this[r(166)]=n,i=!0);const o=n-this[r(166)];this[r(202)]=o,o>500&&!i&&this.player[r(136)]()&&this[r(228)][r(106)](this.TAG_NAME,"decodeVideo diff time is ",o);const a=t[r(117)](5),h=new EncodedVideoChunk({data:a,timestamp:e,type:s?Z[r(151)]:Z[r(185)]});this[r(228)][r(105)](M[r(182)],e);try{this.decoder[r(169)](h)}catch(t){this.player[r(174)](this[r(160)],r(191),t);const e=t[r(257)]();(-1!==e[r(205)](dt[r(251)])||-1!==e[r(205)](dt.canNotDecodeClosedCodec))&&this[r(228)][r(178)](U[r(111)],e)}this[r(166)]=(new Date)[r(195)]()}else this[r(228)].debugLog(this[r(160)],r(147));else if(s&&t[1]===ft){const e=15&t[0];if(this[r(228)][r(137)][r(255)]({encTypeCode:e}),e===G.h265&&!fs()){const t=ts();return this[r(228)].debugWarn(this[r(160)],r(206),t.type,t[r(259)]),void this[r(228)][r(178)](U[r(171)])}!this[r(228)][r(248)][r(154)]&&(this.player[r(248)][r(154)]=je());let s=null,i=null;const n=t[r(117)](5);if(e===G[r(214)]?(i=sh(n),s={codec:i.codec,description:n}):e===G[r(168)]&&(i=Lh(n),s={codec:i[r(131)],description:n}),!s||s&&!s[r(131)]||i&&0===i[r(222)]&&0===i.codecHeight)return this[r(228)].debugWarn(this[r(160)],"decodeVideo and webcodecs configure is",JSON[r(167)](s)),void this[r(228)].emitError(U.webcodecsDecodeConfigureError,r(224));s[r(232)]=i.codecHeight,s[r(210)]=i[r(222)],!this[r(240)]&&(this[r(228)][r(233)](this[r(160)],"updateVideoInfo: "+i[r(222)]+","+i[r(190)]),this.player[r(137)].updateVideoInfo({width:i[r(222)],height:i[r(190)]}),this[r(228)][r(137)][r(265)](),this[r(240)]=!0),this[r(228)][r(245)]&&this[r(228)]._opt[r(170)]===l[r(128)]&&this[r(228)][r(245)][r(164)](t,e),this[r(228)][r(137)][r(226)](),this[r(228)][r(233)](this.TAG_NAME,"decoder.configure() and codec is "+s[r(131)]);try{s.optimizeForLatency=!0,s[r(115)]="prefer-hardware",this[r(133)].configure(s),this[r(145)]=!0}catch(t){this.player[r(174)](this[r(160)],r(175),t[r(262)],t);const e=t[r(257)]();-1!==e[r(205)](dt[r(148)])?this[r(228)].emitError(U[r(171)],e):this.player[r(178)](U.webcodecsDecodeConfigureError,e)}}else this[r(228)].debugWarn(this[r(160)],r(215)+s+" , payload is "+t[1]+r(263))}[um(213)](t,e){const s=um;if(this[s(228)])if(this[s(228)].isDestroyedOrClosed())this[s(228)][s(106)](this.TAG_NAME,s(162));else if(this.hasAudioInit){if(this[s(125)]&&pe(t))return void this[s(228)][s(233)](this[s(160)],s(238));if(this.isOpus&&ci(1===t[1]))return void this.player[s(233)](this.TAG_NAME,"decodeAudio and has already initialized and payload is not opus comment packets and type is "+t[1]+s(263));if(this[s(199)](),this[s(231)]){if(this[s(243)]())return void this[s(228)][s(106)](this[s(160)],"AudioDecoder isDecodeStateClosed true");const i=this[s(125)]||this[s(143)]?t.slice(2):t[s(117)](1),r=i[s(109)]/this.player[s(104)].audioInfo[s(172)]*1e3,n=new EncodedAudioChunk({type:s(151),data:i,timestamp:e,duration:parseInt(r,10)});try{this.decoderAudio[s(169)](n)}catch(t){this[s(228)].debugError(this[s(160)],s(141),t),t[s(257)]()}}}else{const e=t[0]>>4&15,i=t[0]>>1&1,r=e===H[s(114)],n=e===H[s(258)],o=e===H[s(209)],a=e===H[s(249)],h=e===H[s(236)];let c="";c=n||h?i?16:8:0===i?8:16;const d={codec:"",numberOfChannels:"",sampleRate:""};let u=null;if(n||r){let e=null;if(pe(t)){const i=t.slice(2);e=be(i),e&&(d[s(131)]=e.originalCodec,d.numberOfChannels=e[s(124)],d.sampleRate=e[s(172)]),u=i,this.isAAC=n}else if(r){e=hm(t[s(117)](1)),e&&(d[s(131)]=Ft[s(135)],d[s(192)]=e[s(124)],d[s(172)]=e.sampleRate,this.isMp3=!0)}else if(h&&0===t[1]){e=function(t){const e=cm;if(!t[e(355)])return;const s=new DataView(t[e(338)],t[e(351)],t[e(350)]);let i="";for(let s=0;s<8;s++)i+=String[e(339)](t[s]);if(i!==e(345))throw new Error(e(342));const r=t[9],n=s[e(341)](12,!0),o=s.getInt16(16,!0);if(!n)return{};const a=e(349);return{outputGain:o,sampleRate:n,channelCount:r,config:new Uint8Array(t[e(338)],t[e(351)]+8,t[e(350)]-8),codec:"opus",originCodec:a}}(t[s(117)](2)),e&&(d[s(131)]=Ft[s(127)],d[s(192)]=e.channelCount,d[s(172)]=e[s(172)]),this[s(143)]=!0}}else(a||o)&&(d.codec=o?Ft[s(241)]:Ft[s(197)],d[s(192)]=1,d[s(172)]=8e3,this.isG711=!0);if(d[s(131)]&&d.numberOfChannels&&d[s(172)]){!this.isAudioInitInfo&&(this.player[s(104)][s(180)]({encTypeCode:e,channels:d[s(192)],sampleRate:d[s(172)],depth:c}),this[s(176)]=!0),this.player[s(245)]&&this[s(228)][s(244)][s(170)]===l[s(128)]&&u&&this[s(228)][s(245)].initAudioAacExtraData(u),this[s(228)][s(233)](this.TAG_NAME,s(194)+d.codec);try{this[s(208)][s(268)](d),this[s(163)](),this[s(201)]=!0,null===this[s(221)]&&(this[s(221)]=setTimeout((()=>{const t=s;this[t(199)](),this[t(228)][t(105)](U.webcodecsAudioNoDataTimeout)}),1e3))}catch(t){this[s(228)][s(174)](this[s(160)],s(156),t[s(262)],t),t[s(257)]()}}}}[um(134)](t){}[um(163)](){const t=um;this[t(155)]&&(clearTimeout(this[t(155)]),this.audioSourceBufferCheckTimeout=null)}[um(199)](){const t=um;this[t(221)]&&(clearTimeout(this[t(221)]),this[t(221)]=null)}[um(184)](){return this[um(202)]}[um(183)](){const t=um;return"closed"===this[t(133)][t(229)]}[um(118)](){const t=um;return this[t(133)][t(229)]===t(142)}[um(260)](){const t=um;return this[t(133)].state===t(239)}isAudioDecodeStateClosed(){const t=um;return this[t(208)].state===t(204)}isAudioDecodeStateConfigured(){const t=um;return this.decoderAudio.state===t(142)}[um(193)](){const t=um;return this[t(208)][t(229)]===t(239)}}function fm(){const t=["MP3","hardwareAcceleration","render$2","slice","isDecodeStateConfigured","byteLength","increaseLocalTimestamp","AudioDecoder handleError:","handleDecodeAudio() isDecodeFirstIIframe is false and return","VideoDecoder handleError:","channelCount","isAAC","videoStart","opus","mp4","initDecoder","play","codec","351253kNBErf","decoder","updateMediaSourceDuration","mp3","isPlayer","video","handleError","handleDecode","updateStats","AudioDecoder","configured","isOpus","playVod","hasInit","handleRender","VideoDecoder first frame is not iFrame","hevcDecodingIsNotSupported","flush","off","key","render",",\n and emit change event","decodeStart","audioSourceBufferCheckTimeout","configure audio error","1052742qnZgmf","close","handleDecodeAudio() player is destroyed","TAG_NAME","playback","decodeAudio() player is destroyed","_clearAudioSourceBufferCheckTimeout","initMetaData","isPlaybackPauseNotClearCacheAndCacheBeforeDecode","prevTimestamp","stringify","h265","decode","recordType","webcodecsH265NotSupport","sampleRate","420759IoMLGy","debugError","configure error","isAudioInitInfo","decodeVideo: video width or height is changed,\n old width is ","emitError","isG711","updateAudioInfo","isSeeking","timeUpdate","isDecodeStateClosed","getDecodeDiffTimes","delta","handlePlayToRenderTimes","removeSeekingTimestamp","16iovivQ","timestamp","codecHeight","VideoDecoder","numberOfChannels","isAudioDecodeStateUnConfigured","decoderAudio.configure() and codec is ","getTime","width","ulaw","196830kCoRvc","_clearAudioNoDataCheckTimeout","destroy","hasAudioInit","decodeDiffTimestamp","isPlayback","closed","indexOf","WebcodecsDecoder not support hevc decode","decodingError","decoderAudio","ALAW","codedWidth"," and return","isMp3","decodeAudio","h264","decodeVideo has not init , isIframe is ","handleErrorAudio","seekingTimestamp","height","wcsDecodeAudio","initDecoderAudio","audioSourceNoDataCheckTimeout","codecWidth","webcodecsUnsupportedConfigurationError","configure or configure.code is null","VideoDecoder isDecodeStateClosed true","bindMediaStream","prevDts","player","state","decoderError","isDecodeFirstIIframe","codedHeight","debugLog","playbackPause","41536GrzjGY","OPUS","3iOrZeV","decodeAudio and has already initialized and payload is aac codec packet so drop this frame","unconfigured","isInitInfo","alaw","decodeVideo and payload is too small , payload length is ","isAudioDecodeStateClosed","_opt","recorder","needInitAudio","decodeVideo","_times","MULAW","init","keyframeIsRequiredError","isWidthOrHeightChanged","unsupportedConfiguration","decodeVideo: video width or height is changed, and return","updateVideoInfo","149008SKXaOs","toString","AAC","version","isDecodeStateUnConfigured","72939WVbKyA","code"," so drop this frame","handleDecode() isDecodeFirstIIframe is false and return","initCanvasViewSize","Webcodecs","isDestroyedOrClosed","configure",", new height is ","isUseFpsRender","decodeVideo and payload is video sequence header so drop this frame","decodeVideo() player is destroyed","videoInfo","audio","emit","debugWarn","isUseLocalCalculateTime",", old height is ","length","decoderFailure","webcodecsDecodeError","isPlayVod","pushData"];return(fm=function(){return t})()}function mm(){const t=["11555072iOViMv","1829752rveyVW","544311ZtrnhV","keys","3417280zPMtni",'\n ","forEach","8fedCxT"];return(mm=function(){return t})()}function gm(t,e){const s=mm();return(gm=function(t,e){return s[t-=123]})(t,e)}function Am(t,e){const s=ym();return(Am=function(t,e){return s[t-=394]})(t,e)}function ym(){const t=['
',".jb-pro-quality-menu-list",".jb-pro-scale-icon-text",".jb-pro-progress-hover","\n ","$volume",".jb-pro-controls-left",".jb-pro-volume-panel",'
',".jb-pro-ptz-bg-active","\n\n ","$screenshot","29768phZXUB",'\n
\n
\n
\n
\n
\n
\n
\n
\n ',"2198scPWbq","$volumePanelText","playType","$loadingBgImage","$playbackProgressCache",'\n \n
\n
\n \n \n ',"showControl","$objectDetect","$playbackProgressTip",".jb-pro-ptz-narrow","querySelector","background","apertureFar",'\n
\n
\n
\n
\n ','\n
\n
\n \n \n ',"fullscreenExit",'\n
\n ',"i18n",".jb-pro-controls-playback-time-inner","$volumeOff","$recording","$controlsInner",".jb-pro-zoom-narrow","zoomStop","showRateBtn","simple","aiOcclusion","focusFar","performance",".jb-pro-ptz-cruise-play","
\n
\n ","$zoomStop2","$occlusionDetect",".jb-pro-zoom-stop",".jb-pro-ptz-active",".jb-pro-playback-narrow","$recordStop","insertAdjacentHTML","$objectDetectActive",".jb-pro-record",".jb-pro-ptz","$playbackTimeListOne","$pause","$playbackProgressPlayed","showPrecisionBtn","$playbackExpand",".jb-pro-occlusion-active","ptzWiperShow","screenshot","$scaleMenuList","narrow","playbackConfig","fogOpen",'\n
\n
\n
\n
\n
\n
\n
00:00
\n
\n
\n ',".jb-pro-loading-text","ptzCruiseShow",".jb-pro-ptz-fog-close","wiperClose",".jb-pro-quality-menu",".jb-pro-controls-playback-current-time-text","3045279LmIXEj",".jb-pro-recording-stop","$logSave",'
',"$scaleMenu","$volumeOn","classList",".jb-pro-recording-time",'
\n
',"$ptzCruisePlay","
\n
\n ","$playbackProgressTime","$close","$playbackProgressIndicator","defineProperty","_opt","controlType",'\n \n
\n
\n \n \n ',"wiperOpen",".jb-pro-playback-control-time","$record",".jb-pro-recording","hasVideo","audio",'
',".jb-pro-play",".jb-pro-performance-active","$zoom","quality","faceActive",'
',".jb-pro-close","play","recordStop","expandMinus",'
','
',"loading",".jb-pro-zoom-stop2","$recordingStop","$volumePanel",".jb-pro-ptz-focus-near","aiFace",".jb-pro-controls-playback-btns","$ptzExpand","\n ",".jb-pro-controls-bottom","$ptzActive","aiObject","ptzFocusShow","ptzZoomShow",'\n
\n
',"8772190RBZmXH",".jb-pro-ptz-controls",'\n
\n
\n
\n ',".jb-pro-controls-item-html",'
',".jb-pro-fullscreen","21814661SejmbV",'
',"$controlsRight",".jb-pro-speed-menu",".jb-pro-playback-expand","loadingIcon",'
',"scale","$playbackTimeListSecond",'\n
\n ','
\n
',"$occlusionDetectActive",".jb-pro-tips-message-close",".jb-pro-ptz-wiper-open","$ptzFogClose","ptz","playVodConfig",'\n
\n
',"1726413zUshUq",".jb-pro-ptz-cruise-pause",'
','
\n
\n
\n
\n
\n
\n ',"$zoomStop",".jb-pro-record-stop",'\n
\n
\n \n \n ',"$controls",".jb-pro-loading-bg-image","$ptz","face","$playbackCurrentTime","$ptzControl","$qualityText",'
',"\n ","\n \n
\n
\n ",".jb-pro-volume-panel-wrap","$volumePanelWrap","$poster",".jb-pro-object-active",".jb-pro-tips-message","fogClose","hasControl","$playbackTime","$ptzWiperOpen",'
\n
\n
\n
\n \n \n ',".jb-pro-volume",'
\n
\n
\n
\n
00:00:00
\n
','\n
',".jb-pro-controls-playback-time-list","ptzFogShow","$speedText",".jb-pro-play-big",".jb-pro-ptz-expand",".jb-pro-volume-panel-handle","$playbackNarrow","\n ","ptzMoreArrowShow",'
\n
',"$playbackTimeInner","focusNear","9SYJZhi","add","
\n
\n ",".jb-pro-icon-audio",".jb-pro-progress-tip",".jb-pro-zoom","$play",'\n
\n
\n \n \n ',"\n
\n
\n
\n ",".jb-pro-volume-panel-text",".jb-pro-face",".jb-pro-control-progress-simple",".jb-pro-object","$container",".jb-pro-controls-playback-current-time","$scaleText",".jb-pro-controls-playback-time-scroll","$playBig","fullscreen",".jb-pro-performance",'\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
00:00:00
\n
\n
\n
\n
\n ',".jb-pro-icon-mute","getI18n","\n ","close","showBandwidth","expandPlus","cruisePlay","
",'
',"playbackTF",'
',".jb-pro-ptz-wiper-close",".jb-pro-loading-bg","$tipsMessageClose","record",".jb-pro-ptz-arrow","\n \n
\n
\n ",'\n
\n
\n ',".jb-pro-quality-icon-text","$ptzControlCircular","controlAutoHide","object",'\n \n
\n
\n \n \n ','
\n
',"$speed","$ptzFocusFar",'\n
\n
\n
\n
\n
\n
\n ',"performanceActive","$controlHtml","$tipsMessage","ptzApertureShow","ptzShowType","ptzActive","pause",".jb-pro-fullscreen-exit","logSave","operateBtns",'
',".jb-pro-tips-message-content",'
',"playVod",".jb-pro-scale-menu-list",".jb-pro-controls-playback-time","expand","occlusionActive",".jb-pro-progress-cache","\n ","$qualityMenu",".jb-pro-speed-icon-text","$volumeHandle","$speedMenuList","$faceDetectActive","5sfCWKs","mute",".jb-pro-pause","$contextmenus","2IdkXbj",".jb-pro-controls","6544554yBfKPy",'
',"2436868wHXvbb",".jb-pro-loading",'
',"$ptzNarrow","$recordingTime"];return(ym=function(){return t})()}!function(t,e){const s=gm,i=t();for(;;)try{if(975439===-parseInt(s(129))/1+-parseInt(s(127))/2*(parseInt(s(130))/3)+parseInt(s(123))/4+parseInt(s(132))/5+parseInt(s(134))/6+-parseInt(s(124))/7+parseInt(s(128))/8)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(mm),function(t,e){const s=Am,i=t();for(;;)try{if(926194===-parseInt(s(545))/1+parseInt(s(673))/2*(parseInt(s(469))/3)+parseInt(s(677))/4+-parseInt(s(669))/5*(-parseInt(s(675))/6)+parseInt(s(409))/7*(-parseInt(s(407))/8)+parseInt(s(591))/9*(-parseInt(s(521))/10)+parseInt(s(527))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ym);var bm=(t,e)=>{const s=Am,i=function(){const t=gm;let e=arguments[t(136)]>0&&void 0!==arguments[0]?arguments[0]:{};const s={};return Object[t(131)](zt)[t(126)]((i=>{const r=t,n=e[i]||zt[i];s[i]=r(133)+i+'">\n '+(n?''+n+r(125):"")+r(135)})),s}(t[s(484)][s(426)]||{}),r=t[s(613)]();t[s(484)].hasControl&&t[s(484)][s(632)]?t[s(604)][s(475)][s(592)]("jb-pro-controls-show-auto-hide"):t[s(604)][s(475)][s(592)]("jb-pro-controls-show");const n=t[s(484)],o=n[s(653)],a=s(611)+(n[s(460)][s(453)]?s(544)+i[s(459)]+s(635)+i[s(660)]+s(439):"")+"\n
\n ",h=s(462);t[s(604)][s(446)]("beforeend",s(399)+(n.background?s(548)+n[s(420)]+')">
':"")+'\n
\n \n
\n '+(n[s(532)]?s(536)+i[s(506)]+s(578)+n.loadingText+s(439):"")+s(399)+(n[s(572)]&&o[s(501)]?s(676):"")+s(399)+(n[s(572)]&&o[s(542)]?s(638)+n[s(648)]+'">\n
\n
\n
\n
\n
\n '+(n[s(587)]?s(422):"")+s(629)+(n[s(519)]?'\n
\n
\n \n \n '+r[s(617)]+s(414)+r[s(503)]+s(565):"")+"\n "+(n[s(647)]?'\n
\n
\n \n \n '+r[s(421)]+s(486)+r.apertureNear+"\n \n
\n
\n ":"")+"\n "+(n[s(518)]?'\n
\n
\n \n \n '+r[s(436)]+s(634)+r[s(590)]+s(565):"")+s(663)+(n[s(464)]?s(423)+r[s(618)]+'\n \n
\n
\n \n \n '+r.cruisePause+"\n \n
\n
\n ":"")+s(663)+(n[s(580)]?s(555)+r[s(461)]+'
\n
\n
\n
\n \n \n '+r[s(571)]+s(628):"")+"\n\n "+(n[s(456)]?s(598)+r[s(487)]+s(575)+r[s(466)]+s(628):"")+"\n
\n
\n ":"")+s(514)+(n[s(491)]?s(520)+i.narrow+s(537)+r.zoomTips+s(588)+i[s(660)]+s(477)+i[s(432)]+s(577)+i[s(502)]+s(593):"")+s(405)+(n[s(572)]?s(523)+(n[s(616)]?s(403):"")+'\n
\n
'+n[s(549)]+s(479)+(n[s(411)]===c[s(621)]&&n[s(460)].showControl&&n[s(460)][s(485)]===A.normal?a:"")+s(564)+(n[s(411)]===c[s(621)]&&n[s(460)][s(415)]&&n[s(460)].controlType===A[s(434)]?h:"")+s(564)+(n.playType===c[s(657)]?h:"")+s(425)+(n.playType===c[s(621)]&&n[s(460)].showRateBtn||n.playType===c.playVod&&n[s(543)][s(433)]?'\n
\n
\n
\n
\n
\n
\n ':"")+s(614)+(o[s(615)]?s(563)+i[s(615)]+s(619):"")+s(614)+(o[s(652)]?'
'+i[s(652)]+"
":"")+"\n "+(o[s(437)]?s(505)+i[s(437)]+s(656)+i[s(644)]+"
":"")+s(614)+(o[s(511)]?'
'+i[s(559)]+s(654)+i[s(498)]+s(619):"")+s(614)+(o[s(517)]?s(533)+i[s(633)]+s(504)+i.objectActive+s(619):"")+"\n "+(o[s(435)]?s(395)+i.occlusion+'
'+i[s(661)]+s(619):"")+"\n "+(o[s(497)]?s(643):"")+"\n "+(o[s(534)]?s(552):"")+s(614)+(o[s(492)]?'\n
\n
\n '+i[s(492)]+s(586)+i[s(670)]+'\n
\n
\n
\n
\n
\n
\n
\n
\n ':"")+"\n "+(o.play?s(493)+i[s(501)]+s(499)+i[s(650)]+"
":"")+s(614)+(o[s(457)]?s(679)+i.screenshot+"
":"")+s(614)+(o[s(626)]?s(620)+i[s(626)]+'
'+i[s(502)]+s(619):"")+s(614)+(o.ptz?s(622)+i[s(542)]+s(528)+i[s(649)]+s(619):"")+s(614)+(o.zoom?'
'+i[s(551)]+s(472)+i[s(432)]+s(619):"")+"\n "+(o.fullscreen?s(547)+i[s(609)]+s(525)+i[s(424)]+s(619):"")+s(599):"")+s(408)),Object[s(483)](e,s(568),{value:t.$container[s(419)](".jb-pro-poster"),configurable:!0}),Object.defineProperty(e,"$loadingBg",{value:t[s(604)][s(419)](s(624)),configurable:!0}),Object.defineProperty(e,s(412),{value:t[s(604)][s(419)](s(557)),configurable:!0}),Object[s(483)](e,"$loading",{value:t.$container.querySelector(s(678)),configurable:!0}),Object[s(483)](e,"$loadingText",{value:t[s(604)][s(419)](s(463)),configurable:!0}),Object[s(483)](e,s(597),{value:t.$container[s(419)](s(494)),configurable:!0}),Object.defineProperty(e,s(608),{value:t[s(604)][s(419)](s(582)),configurable:!0}),Object[s(483)](e,s(429),{value:t[s(604)][s(419)](s(490)),configurable:!0}),Object[s(483)](e,s(394),{value:t[s(604)][s(419)](s(476)),configurable:!0}),Object.defineProperty(e,s(508),{value:t[s(604)][s(419)](s(470)),configurable:!0}),Object[s(483)](e,s(451),{value:t[s(604)][s(419)](s(671)),configurable:!0}),Object[s(483)](e,s(556),{value:t[s(604)][s(419)](s(674)),configurable:!0}),Object.defineProperty(e,s(430),{value:t[s(604)].querySelector(s(515)),configurable:!0}),Object[s(483)](e,"$controlsLeft",{value:t[s(604)].querySelector(s(401)),configurable:!0}),Object[s(483)](e,s(529),{value:t[s(604)][s(419)](".jb-pro-controls-right"),configurable:!0}),Object[s(483)](e,s(400),{value:t.$container[s(419)](s(576)),configurable:!0}),Object[s(483)](e,s(567),{value:t[s(604)][s(419)](s(566)),configurable:!0}),Object[s(483)](e,s(410),{value:t[s(604)][s(419)](s(600)),configurable:!0}),Object[s(483)](e,s(509),{value:t.$container[s(419)](s(402)),configurable:!0}),Object[s(483)](e,s(666),{value:t[s(604)][s(419)](s(584)),configurable:!0}),Object[s(483)](e,s(474),{value:t.$container[s(419)](s(594)),configurable:!0}),Object[s(483)](e,s(428),{value:t[s(604)].querySelector(s(612)),configurable:!0}),Object.defineProperty(e,"$fullscreen",{value:t[s(604)][s(419)](s(526)),configurable:!0}),Object[s(483)](e,s(550),{value:t[s(604)][s(419)](s(651)),configurable:!0}),Object[s(483)](e,s(489),{value:t[s(604)].querySelector(s(448)),configurable:!0}),Object[s(483)](e,s(445),{value:t[s(604)][s(419)](s(554)),configurable:!0}),Object[s(483)](e,s(406),{value:t[s(604)][s(419)](".jb-pro-screenshot"),configurable:!0}),Object[s(483)](e,s(636),{value:t[s(604)].querySelector(".jb-pro-speed"),configurable:!0}),Object[s(483)](e,s(645),{value:t[s(604)][s(419)](s(524)),configurable:!0}),Object[s(483)](e,s(573),{value:t[s(604)][s(419)](s(659)),configurable:!0}),Object[s(483)](e,s(589),{value:t[s(604)][s(419)](s(427)),configurable:!0}),Object.defineProperty(e,s(641),{value:t[s(604)].querySelector(s(607)),configurable:!0}),Object[s(483)](e,"$playbackTimeList",{value:t[s(604)][s(419)](s(579)),configurable:!0}),Object[s(483)](e,s(450),{value:t.$container[s(419)](".jb-pro-playback-time-one-wrap"),configurable:!0}),Object[s(483)](e,s(535),{value:t[s(604)].querySelector(".jb-pro-playback-time-second-wrap"),configurable:!0}),Object[s(483)](e,s(560),{value:t[s(604)][s(419)](s(605)),configurable:!0}),Object[s(483)](e,"$playbackCurrentTimeText",{value:t[s(604)][s(419)](s(468)),configurable:!0}),Object[s(483)](e,"$controlsPlaybackBtns",{value:t.$container.querySelector(s(512)),configurable:!0}),Object[s(483)](e,s(585),{value:t.$container[s(419)](s(444)),configurable:!0}),Object.defineProperty(e,s(454),{value:t[s(604)][s(419)](s(531)),configurable:!0}),Object.defineProperty(e,s(558),{value:t.$container[s(419)](s(449)),configurable:!0}),Object[s(483)](e,s(516),{value:t.$container[s(419)](s(443)),configurable:!0}),Object[s(483)](e,s(561),{value:t[s(604)].querySelector(s(522)),configurable:!0}),Object[s(483)](e,"$ptzBgActive",{value:t[s(604)][s(419)](s(404)),configurable:!0}),Object[s(483)](e,s(631),{value:t[s(604)].querySelector(".jb-pro-ptz-control"),configurable:!0}),Object[s(483)](e,"$ptzArrows",{value:t[s(604)].querySelectorAll(s(627)),configurable:!0}),Object[s(483)](e,s(513),{value:t[s(604)][s(419)](s(583)),configurable:!0}),Object[s(483)](e,s(680),{value:t[s(604)][s(419)](s(418)),configurable:!0}),Object[s(483)](e,"$ptzApertureFar",{value:t.$container.querySelector(".jb-pro-ptz-aperture-far"),configurable:!0}),Object.defineProperty(e,"$ptzApertureNear",{value:t[s(604)].querySelector(".jb-pro-ptz-aperture-near"),configurable:!0}),Object[s(483)](e,s(637),{value:t[s(604)][s(419)](".jb-pro-ptz-focus-far"),configurable:!0}),Object[s(483)](e,"$ptzFocusNear",{value:t[s(604)][s(419)](s(510)),configurable:!0}),Object[s(483)](e,s(478),{value:t[s(604)][s(419)](s(438)),configurable:!0}),Object[s(483)](e,"$ptzCruisePause",{value:t[s(604)][s(419)](s(546)),configurable:!0}),Object.defineProperty(e,"$ptzFogOpen",{value:t.$container[s(419)](".jb-pro-ptz-fog-open"),configurable:!0}),Object[s(483)](e,s(541),{value:t[s(604)][s(419)](s(465)),configurable:!0}),Object.defineProperty(e,s(574),{value:t.$container[s(419)](s(540)),configurable:!0}),Object.defineProperty(e,"$ptzWiperClose",{value:t[s(604)][s(419)](s(623)),configurable:!0}),Object[s(483)](e,s(562),{value:t[s(604)][s(419)](s(630)),configurable:!0}),Object[s(483)](e,s(664),{value:t.$container[s(419)](s(467)),configurable:!0}),Object[s(483)](e,"$qualityMenuList",{value:t[s(604)].querySelector(s(396)),configurable:!0}),Object.defineProperty(e,s(606),{value:t[s(604)][s(419)](s(397)),configurable:!0}),Object[s(483)](e,s(473),{value:t[s(604)][s(419)](".jb-pro-scale-menu"),configurable:!0}),Object[s(483)](e,s(458),{value:t.$container[s(419)](s(658)),configurable:!0}),Object[s(483)](e,s(496),{value:t[s(604)][s(419)](s(596)),configurable:!0}),Object[s(483)](e,s(553),{value:t.$container[s(419)](s(442)),configurable:!0}),Object[s(483)](e,"$zoomNarrow",{value:t[s(604)].querySelector(s(431)),configurable:!0}),Object[s(483)](e,"$zoomExpand",{value:t[s(604)].querySelector(".jb-pro-zoom-expand"),configurable:!0}),Object.defineProperty(e,s(440),{value:t[s(604)][s(419)](s(507)),configurable:!0}),Object[s(483)](e,s(481),{value:t[s(604)][s(419)](s(500)),configurable:!0}),Object[s(483)](e,"$zoomControls",{value:t.$container[s(419)](".jb-pro-zoom-controls"),configurable:!0}),Object[s(483)](e,"$performancePanel",{value:t[s(604)][s(419)](".jb-pro-performance-panel"),configurable:!0}),Object[s(483)](e,"$performance",{value:t[s(604)][s(419)](s(610)),configurable:!0}),Object[s(483)](e,s(642),{value:t[s(604)][s(419)](s(495)),configurable:!0}),Object[s(483)](e,"$faceDetect",{value:t[s(604)][s(419)](s(601)),configurable:!0}),Object.defineProperty(e,s(668),{value:t[s(604)][s(419)](".jb-pro-face-active"),configurable:!0}),Object[s(483)](e,s(416),{value:t[s(604)].querySelector(s(603)),configurable:!0}),Object[s(483)](e,s(447),{value:t[s(604)][s(419)](s(569)),configurable:!0}),Object[s(483)](e,s(441),{value:t[s(604)][s(419)](".jb-pro-occlusion"),configurable:!0}),Object[s(483)](e,s(538),{value:t[s(604)].querySelector(s(455)),configurable:!0}),Object[s(483)](e,s(672),{value:t[s(604)].querySelector(s(639)),configurable:!0}),Object[s(483)](e,s(581),{value:t[s(604)][s(419)](s(665)),configurable:!0}),Object[s(483)](e,"$speedMenu",{value:t[s(604)][s(419)](s(530)),configurable:!0}),Object.defineProperty(e,s(667),{value:t.$container.querySelector(".jb-pro-speed-menu-list"),configurable:!0}),Object[s(483)](e,s(471),{value:t[s(604)].querySelector(".jb-pro-logSave"),configurable:!0}),Object.defineProperty(e,"$playbackProgress",{value:t[s(604)][s(419)](s(602)),configurable:!0}),Object[s(483)](e,s(417),{value:t[s(604)].querySelector(s(595)),configurable:!0}),Object[s(483)](e,"$playbackProgressHover",{value:t[s(604)][s(419)](s(398)),configurable:!0}),Object[s(483)](e,s(452),{value:t[s(604)][s(419)](".jb-pro-progress-played"),configurable:!0}),Object[s(483)](e,s(413),{value:t[s(604)][s(419)](s(662))}),Object[s(483)](e,s(482),{value:t[s(604)][s(419)](s(640)),configurable:!0}),Object.defineProperty(e,s(480),{value:t[s(604)][s(419)](s(488)),configurable:!0}),Object[s(483)](e,s(646),{value:t[s(604)].querySelector(s(570)),configurable:!0}),Object[s(483)](e,s(625),{value:t[s(604)].querySelector(s(539)),configurable:!0}),Object[s(483)](e,"$tipsMessageContent",{value:t[s(604)][s(419)](s(655)),configurable:!0})};function vm(t,e){const s=wm();return(vm=function(t,e){return s[t-=111]})(t,e)}function Sm(t,e){let s=!1;return t.forEach((t=>{const i=vm;!s&&t.startTimestamp<=e&&t[i(133)]>e&&(s=!0)})),s}function wm(){const t=["dataType",'" data-min="',"push",":05","insertAdjacentHTML","rafId","65103MjsDhU","title","hour","99918OTxwlo","max","beforeend",'">',"51846LqVyop","jb-pro-playback-time-title-tips-left","min","862023RxVoHl","2761218nWmOHf","2205KUCgEH","3620VzYQiU","startTimestamp","endTimestamp",":00",'">\n
\n ","replace","\n
\n ","length","4001070AutEfk",'"\n data-time="',"8ohnsNB","ceil",'">',"7uEAUyO"];return(wm=function(){return t})()}function Em(){const t=vm;let e=arguments[t(146)]>0&&void 0!==arguments[0]?arguments[0]:[],s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;const r=e[t(146)],n=s[t(146)],o=Math[t(122)](r,n),a=2e3,h=Math[t(150)](o/a);let c=0,l=0;function d(){const n=t;let o="",u="";for(let t=0;t0&&void 0!==arguments[0]?arguments[0]:[],s=[];const i=(e[0]||{})[t(132)];for(let r=0;r<1440;r++){const n=r%60==0;let o=!1;i&&(o=Sm(e,Ds(i,r))),s[t(114)]({title:Cs(r),timestamp:r,dataType:t(127),hasRecord:o,isStart:n})}return s}(t);Em(s,function(){const t=vm;let e=[];for(let s=0;s<24;s++){let i=s+t(134);s<10&&(i="0"+i),e[t(114)]({title:i,hour:s,min:0,second:0})}return e}(),e)}function Tm(t,e){const s=function(){const t=vm;let e=arguments[t(146)]>0&&void 0!==arguments[0]?arguments[0]:[],s=[];const i=(e[0]||{}).startTimestamp;for(let r=0;r<1440;r++){let n=60*r,o=n%1800==0,a=!1;i&&(a=Sm(e,Ls(i,n))),s[t(114)]({title:Rs(n),timestamp:n,dataType:t(140),hasRecord:a,isStart:o});let h=60*r+30;o=h%1800==0,i&&(a=Sm(e,Ls(i,h))),s.push({title:Rs(h),timestamp:h,dataType:t(140),hasRecord:a,isStart:o})}return s}(t);Em(s,function(){const t=vm;let e=[];for(let s=0;s<24;s++){let i=s+":00",r=s+":30";s<10&&(i="0"+i,r="0"+r),e[t(114)]({title:i,hour:s,min:0,second:0}),e[t(114)]({title:r,hour:s,min:30,second:0})}return e}(),e)}function km(t,e){const s=function(){const t=vm;let e=arguments[t(146)]>0&&void 0!==arguments[0]?arguments[0]:[],s=[];const i=(e[0]||{})[t(132)];for(let r=0;r<144;r++)for(let n=0;n<60;n++){let o=10*n+600*r,a=o%600==0,h=!1;i&&(h=Sm(e,Ls(i,o))),s[t(114)]({title:Rs(o),timestamp:o,dataType:t(140),isStart:a,hasRecord:h})}return s}(t);Em(s,function(){const t=vm;let e=[];for(let s=0;s<24;s++){let i=s+":00";s<10&&(i="0"+i),e[t(114)]({title:i,hour:s,min:0,second:0});for(let r=1;r<6;r++){let n=r+"0";e[t(114)]({title:i[t(144)](":00",":"+n),hour:s,min:10*r,second:0})}}return e}(),e)}function _m(t,e){const s=function(){const t=vm;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],s=[];const i=(e[0]||{})[t(132)];for(let r=0;r<288;r++)for(let n=0;n<60;n++){let o=5*n+300*r,a=o%300==0,h=!1;i&&(h=Sm(e,Ls(i,o))),s[t(114)]({title:Rs(o),timestamp:o,dataType:"second",isStart:a,hasRecord:h})}return s}(t);Em(s,function(){const t=vm;let e=[];for(let s=0;s<24;s++){let i=s+":00";s<10&&(i="0"+i),e[t(114)]({title:i,hour:s,min:0,second:0}),e.push({title:i[t(144)](t(134),t(115)),hour:s,min:5,second:0});for(let r=1;r<6;r++){let n=r+"0",o=r+"5";e[t(114)]({title:i[t(144)](t(134),":"+n),hour:s,min:10*r,second:0}),e[t(114)]({title:i[t(144)](t(134),":"+o),hour:s,min:10*r+5,second:0})}}return e}(),e)}function Cm(t){const e=Dm,s=Math[e(452)](t/3600),i=Math[e(452)]((t-3600*s)/60),r=Math.floor(t-3600*s-60*i);return(s>0?[s,i,r]:[i,r]).map((t=>t<10?"0"+t:String(t)))[e(459)](":")}function Rm(t,e,s){const i=Dm,r=t.$playbackProgress,{left:n}=r[i(454)](),o=Ve((Je()?s.touches[0][i(457)]:s[i(448)])-n,0,r[i(451)]),a=parseInt(o/r[i(451)]*e,10);return{second:a,time:Cm(a),width:o,percentage:Ve(o/r[i(451)],0,1)}}function Dm(t,e){const s=Lm();return(Dm=function(t,e){return s[t-=446]})(t,e)}function Lm(){const t=["firstElementChild","clientX","630477zcliVO","join","79801trWuYX","444504kbKfom","remove","394905PYSnqF","2sjNnBR","3565854pxMvlN","pageX","559338CoSAxI","5BqXzwk","clientWidth","floor","10wRrhfL","getBoundingClientRect","775796zcMQRw"];return(Lm=function(){return t})()}function xm(t,e){return Ve(t/e,0,1)}function Pm(t,e){const s=Bm();return(Pm=function(t,e){return s[t-=252]})(t,e)}function Bm(){const t=["mseDecodeAudio","$volume","showPerformance","left","lock","px) translateY(","isDropping","$playbackProgressIndicator","orientation","$scaleMenu","isPlayer","60nlawTA",'\n
\n
\n 最新缓冲时长(ms) ',"defineProperty","setRotate","removeChild",'\n
\n
\n MSE播放模式 ','\n
\n
\n 解封装(ms) ',"$recordStop",'\n
\n
\n ",'
\n
\n
\n 缓冲时长(ms) ',"volume",'\n
\n 音频码率(bit) ',"$ptzControl","{h}:{i}:{s}","$screenshot",'\n
\n 视频GOP(ms) ',"extendBtnList","encType","jb-pro-auto-orientation-fullscreen",'\n
\n 缓存时长(ms) ','\n
\n
\n 解码模式 ',"beforeend",'\n
\n
\n video间隔时间(s) ',"jb-pro-object-","rect",'\n
\n 网络请求组件 ',"then","\n
\n ","allTimestamp","audioDemuxBuffer","speed","
\n
\n ",'\n
\n 音频播放模式 ',"playVodEndedAndShowPlayBtn","playVodWaiting","demuxBuffer","isScreenNowRow","value","\n
\n ","playbackPause",'
\n
\n
\n 视频帧率(fps) ',"showAfterLoading","createdMoment",'\n
\n 解码前-解码后延迟(ms) ',"fiveMin","直播流","370792awAhCs",'\n
\n 播放器版本 ',"$playbackTimeListOne","mseDelay","streamResponseTimestamp","insertAdjacentHTML","isUseHls265",'\n
\n
\n 音频待解码帧 ',"6565176xFRsCH","$speed","height","playbackConfig",'\n
\n
\n 视频(宽x高) ',"audio","2VkKHCR","hlsDelay","$pause",'\n
\n 是否播放流畅 ',"usedJSHeapSize","loading","getSeconds","hlsDemuxAudioLength","$speedMenuList","0 KB/s","oneHour","dts",'\n
\n
\n 视频录制大小 ',"isAudioPlaybackRateSpeed","playVodConfig","rate","22lFuKZf",'\n
\n
\n 开始请求地址(ms) ',"msePendingBuffer","playVodPause","$scaleMenuItems","controlsPlaybackBtnsRect","controlsInnerRect","channels","playVodTimeCache","$occlusionDetectActive","translateX(","qualityConfig","playbackTime","isOldHls","wcsDecodeDiffTimes","streamQuality","playVodRateChange","translateX(0) translateY(0) rotate(0)","tenMin","$playbackProgressTime","objectDetectActive","style","add","$tipsMessage","occlusionDetectActive","debugUuid","controlType","currentPts","$volumePanelText","simple","showRateBtn","jb-pro-fullscreen-rotate","_serverInfo","top","normal","jb-pro-ptz-controls-show","$speedMenuItems","\n
\n ","totalDuration",'
\n
\n
\n 渲染组件 ',"playFailedAndPausedShowPlayBtn","videoInfo","getVideoPlaybackQuality","_times","zooming","none","$qualityText","$performanceActive","rafId","togglePerformancePanel","display","useMSE","videoCurrentTimeDiff","setAttribute","halfHour","load","$playbackProgressCache","$objectDetectActive","$zoom","_opt","213064qKTJWe","playbackRateChange","stats","push","$performancePanel","sampleRate","isPlayback","$playbackExpand","$playbackCurrentTimeText",".jb-pro-speed-menu-item",'\n
\n WCS解码间隔(ms) ',"object","transform","playback","changePercisitionInterval","px)","debugLog","$loadingBgImage","listenWindowResizeAuoResize","block",'倍\n
\n
\n 播放模式 ',"$occlusionDetect","streamTimestamp","classList",".jb-pro-quality-menu-item","getControlHeight","
\n ","$recordingTime","width",'
\n
\n
\n 音频缓冲时长(ms) ',"$volumeOn","playVodSeek","\n ","\n
\n ","$activeIconWrap","pushLatestDelay","getCpuLevel","change","jb-pro-quality-menu-item-active","operateBtns","$qualityMenu",'\n
\n 渲染引擎 ',"getRecordingDuration","$scaleMenuList","jb-pro-scale-menu-item-active","showControl","abs","controlsLeftRect","$zoomStop","10tcYbZx","getStreamFps","resize","calc(","hasControl","$ptz","maxFps","dataset","totalJSHeapSize","% - ","isShowRecordingUI","161iwmPDr","$faceDetect","741843NXQWAm",'\n
\n 视频录制时间 ',"destroy","$record","hasAudio","12024Klwywg",'\n
\n
\n 页面开始渲染(ms) ',"playingTimestamp","showPrecisionBtn","$faceDetectActive","documentElement","scaleConfig",'\n
\n 视频显示时间(ms) ',"netBuf","rateConfig","control",'\n
\n
\n Video已丢弃帧 ',"playVod",'\n
\n video显示时间(s) ','\n
\n 待解封装数据(byte) ',"getRenderType","type","mseDecodePlaybackRate","scaleType","playing","emit","recording","isInMulti","events","\n
\n ","$zoomControls",'
\n
\n
\n 总延迟(网络+解码)(ms) ',"$volumePanel","getAudioEngineType","quality","fps","$container","flex","fullscreen","useWebFullScreen","absolute"," / ","$poster","querySelectorAll","appendChild","isStreamTsMoreThanLocal","$playbackTimeScroll","playbackVideoBuffer","streamBuffer","disabled","$play","scale","$playbackProgressPlayed","$performance",'\n
\n
\n
\n 视频码率(bit) ',"getRecordingByteLength","isFullscreen","isUseFpsRender","$iconWrap","$playbackTimeListSecond","text/html","is60Min","volumechange",'\n
\n 音频显示时间(ms) ',"jb-pro-speed-menu-item-active","\n
\n ",'\n
\n 播放器初始化(ms) ',"abps","$playbackNarrow","$playBig","$playbackTimeInner","is1Min","forEach","audioBufferDelayTs",'\n
\n
\n 音频缓冲帧 ',"isMulti",'\n
\n
\n MSE缓存时长(s) ',"controlsRightRect","$fullscreen","innerText","decodeTimestamp","$loadingBg","录播流",'\n
\n
\n MSE待解码帧 ','\n
\n MSE缓冲时长(ms) ',"find","isPlayVod",'\n
\n
\n 解码(ms) '," x ","off",'\n
\n
\n MSE解码时间(ms) ','\n
\n 解封装模式 ',"pTs","playTimestamp","isPlayFailedAndPaused",'\n
\n 服务器信息 ',"isPlaying",'\n
\n
\n 可使用的内存 ',"destroys","$volumeOff",'\n
\n 音频格式 ','\n
\n
\n 已使用的内存 ',"$loading","vbps","$recording","useWCS",'
\n HLS缓冲时长(ms) ',"contentDocument","isWebrtcH264","renderedVideoFrames","getHours","streamQualityChange","recordingTimestamp","androidMobileFullscreenRotate",'\n
\n
\n videoBuffer缓存时间(ms) ',"rotate(-90deg)","totalDelayTs","isAliyunRtc","controlsPlaybackTimeInner","\n
\n ","$controlHtml","$speedText",'
\n
\n
\n 视频峰值帧率(fps) ',"demuxTimestamp",'\n
\n 视频解码时间(ms) ',"webFullscreen","2013291wJATap","playbackTF","$objectDetect","\n ","getDecodeType","defaultView","videoIframeIntervalTs","buf","$fullscreenExit","px) rotate(-90deg)","portrait",'\n
\n 网络延迟(ms) ',"getStreamType","fullScreenByStart",'\n
\n
\n 音频采样率 ',"playType","canvas","100%",'\n
\n
\n 视频格式 ',"innerHTML","isShowZoomingUI",'\n
\n
\n 初始化到页面渲染(ms) ',"isAudioNotMute","$playbackCurrentTime","jsHeapSizeLimit","kBps","label","536556lulSbp","length"];return(Bm=function(){return t})()}!function(t,e){const s=vm,i=t();for(;;)try{if(228854===parseInt(s(118))/1+-parseInt(s(121))/2+-parseInt(s(128))/3+parseInt(s(131))/4*(parseInt(s(130))/5)+parseInt(s(125))/6*(parseInt(s(111))/7)+-parseInt(s(149))/8*(parseInt(s(129))/9)+parseInt(s(147))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(wm),function(t,e){const s=Dm,i=t();for(;;)try{if(117498===parseInt(s(460))/1*(-parseInt(s(446))/2)+-parseInt(s(458))/3+-parseInt(s(455))/4+parseInt(s(450))/5*(parseInt(s(449))/6)+parseInt(s(463))/7+parseInt(s(461))/8+-parseInt(s(447))/9*(-parseInt(s(453))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Lm),function(t,e){const s=Pm,i=t();for(;;)try{if(389048===-parseInt(s(263))/1+-parseInt(s(497))/2*(parseInt(s(389))/3)+parseInt(s(483))/4*(parseInt(s(622))/5)+-parseInt(s(416))/6+parseInt(s(256))/7*(-parseInt(s(573))/8)+-parseInt(s(258))/9*(-parseInt(s(429))/10)+parseInt(s(513))/11*(parseInt(s(491))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Bm);var Mm=(t,e)=>{const s=Pm,{events:{proxy:i}}=t;let r=null,n=null,o=null,a=null;if(t._opt[s(591)]){r=document.createElement(s(584)),n=s(460)+si(),r[s(566)]("aria-hidden","true"),r[s(566)]("tabindex",-1),r[s(566)]("id",n),r[s(279)]=s(323),r.data="about:blank",ze(r,{display:s(592),position:s(298),top:"0",left:"0",height:s(406),width:s(406),overflow:"hidden",pointerEvents:s(558),zIndex:"-1"}),o=t[s(601)],a=t.height;const e=hs((()=>{const e=s;(t.width!==o||t.height!==a)&&(o=t[e(601)],a=t.height,t[e(283)](M[e(624)]))}),500);i(r,s(568),(()=>{const t=s;i(r[t(370)][t(394)],t(624),(()=>{e()}))})),t[s(294)][s(302)](r)}t.on(M[s(260)],(()=>{const e=s;if(r)try{if(!Ln(r)){const s=t[e(294)].querySelector("#"+n);s&&t[e(294)]&&t[e(294)][e(433)](s)}}catch(t){}p&&(clearInterval(p),p=null),m=null,g=null,y=0,r=null,n=null,o=null,a=null})),t.on(M[s(325)],(()=>{!function(t){const i=s;if(0===t)ze(e[i(603)],i(563),i(558)),ze(e[i(362)],i(563),i(295)),ze(e[i(439)],"top","48px");else if(e[i(439)]&&e[i(290)]){const s=Ge(e[i(290)],"height")||60,r=Ge(e.$volumeHandle,"height"),n=s-(s-r)*t-r;ze(e[i(439)],i(546),n+"px"),ze(e.$volumeOn,i(563),i(295)),ze(e[i(362)],i(563),i(558))}e[i(541)]&&(e[i(541)].innerHTML=parseInt(100*t))}(t[s(447)])})),t.on(M[s(502)],(i=>{const r=s;e.isInitPlayer=!1,ze(e.$loading,r(563),i?"flex":r(558)),(ci(t[r(572)].backgroundLoadingShow)&&hi(i)||ci(i))&&ze(e[r(300)],r(563),"none"),i&&(ze(e[r(332)],r(563),r(558)),ze(e[r(536)],r(563),r(558)),e[r(453)][r(335)]((t=>{const e=r;t[e(479)]===Ut[e(502)]&&(t[e(321)]&&ze(t.$iconWrap,e(563),e(295)),t[e(607)]&&ze(t[e(607)],e(563),e(558)))}))),!i&&t[r(572)].extendDomConfig[r(478)]&&e.$extendDom&&ze(e.$extendDom,r(563),r(592)),!i&&t[r(278)]()===f[r(405)]&&ci(t._opt[r(564)])&&h()})),t.on(M.removeLoadingBgImage,(()=>{h()}));const h=()=>{const i=s;e[i(590)]&&e[i(344)]&&e.$loadingBgImage.src&&(t[i(589)]("Control","remove loading bg image"),e.$loadingBgImage[i(601)]=0,e[i(590)].height=0,e.$loadingBgImage.src="",ze(e.$loadingBg,i(563),i(558)))},l=()=>{const e=s;if(t[e(296)],b(),Je())if(t._opt.androidMobileFullscreenRotate)t.fullscreen?t[e(473)]()&&(t[e(294)][e(596)][e(535)](e(544)),t[e(432)](270)):(t[e(294)][e(596)][e(441)]("jb-pro-fullscreen-rotate"),t[e(432)](0)),S((()=>{E()}));else{var i,r;if(null===(i=screen)||void 0===i||null===(r=i.orientation)||void 0===r||!r.lock)return;const s=screen[e(426)][e(279)];if(t.fullscreen){const i=t.width,r=t[e(493)],{clientWidth:n,clientHeight:o}=document[e(268)];if(i>r&&no){const i=s.startsWith(e(399))?"landscape":e(399);screen[e(426)][e(422)](i)[e(463)]((()=>{In(t.$container,"jb-pro-auto-orientation-fullscreen")}))}}else kn(t.$container,e(455))&&screen[e(426)][e(422)](s)[e(463)]((()=>{Tn(t[e(294)],"jb-pro-auto-orientation-fullscreen")}))}},d=e=>{Ns(e)===t.$container&&l()};let p=null,m=null,g=null,y=0;const b=i=>{const r=s;if(ci(t[r(359)]()))return;let n=bs(i)?i:t.fullscreen;ze(e[r(397)],r(563),r(n?295:558)),ze(e[r(341)],r(563),r(n?558:295))},v=()=>{const e=s;return t[e(572)][e(404)]===c[e(390)]&&t._opt.playbackConfig[e(618)]},S=i=>{const r=s;Je()&&e.$controls&&(t._opt[r(297)]||t[r(572)][r(376)])?setTimeout((()=>{const s=r;if(t[s(296)]){const i=t[s(598)](!1);let r=t.height/2-t.width+i/2,n=t.height/2-i/2;if(e.$controls[s(534)][s(585)]=s(523)+-r+"px) translateY(-"+n+s(398),e[s(288)]){const i=156,r=30,n=t[s(601)]/2+i/2-r/2;e[s(288)][s(534)][s(585)]=s(523)+-n+"px) translateY("+t[s(493)]/2+s(398)}if(e.$recording){const i=101,r=20,n=t[s(601)]/2+i/2-r/2;e[s(367)].style[s(585)]="translateX("+-n+s(423)+t[s(493)]/2+s(398)}e.$ptzControl&&(e[s(449)].style[s(585)]=s(378))}else e.$controls[s(534)].transform=s(530),e[s(288)]&&(e.$zoomControls[s(534)][s(585)]=s(314)),e[s(367)]&&(e[s(367)].style[s(585)]=s(314)),e[s(449)]&&(e.$ptzControl[s(534)][s(585)]="rotate(0)");i&&i()}),10):i&&i()};try{ee.on(s(610),d),t[s(286)][s(361)][s(576)]((()=>{ee[s(352)]("change",d)}))}catch(t){}t.on(M.webFullscreen,(t=>{Je()&&(b(t),S((()=>{E()})))})),t.on(M[s(402)],(()=>{l()})),t.on(M.recording,(()=>{const i=s;t[i(282)]&&(ze(e[i(261)],i(563),t[i(284)]?i(558):i(295)),ze(e[i(436)],i(563),t[i(284)]?i(295):"none"),(t[i(572)][i(626)]||t[i(572)][i(255)])&&(ze(e.$recording,i(563),t[i(284)]?"flex":"none"),ci(t[i(284)])&&e[i(600)]&&(e[i(600)].innerHTML=ks(0))))})),t.on(M[s(375)],(t=>{e[s(600)]&&(e.$recordingTime.innerHTML=ks(t))})),t.on(M.zooming,(()=>{const i=s;t[i(282)]&&(ze(e[i(571)],i(563),t.zooming?i(558):i(295)),ze(e[i(621)],i(563),t[i(557)]?i(295):i(558)),(t._opt[i(626)]||t[i(572)][i(409)])&&ze(e[i(288)],i(563),t.zooming?"flex":i(558)))})),t.on(M[s(282)],(t=>{w(t)}));const w=i=>{const r=s;i?(ze(e[r(308)],r(563),r(558)),ze(e.$playBig,r(563),r(558))):(t[r(357)]&&ci(t[r(572)][r(553)])?(ze(e[r(308)],r(563),r(558)),ze(e[r(332)],r(563),r(558))):(ze(e[r(308)],r(563),r(295)),ze(e.$playBig,"display",r(592))),t[r(349)]()&&t._opt[r(470)]&&t[r(275)].isEnded()&&(ze(e[r(308)],r(563),r(295)),ze(e[r(332)],r(563),r(592)))),ze(e[r(499)],r(563),i?r(295):"none"),ze(e[r(451)],r(563),r(i?295:558)),ze(e[r(261)],r(563),r(i?295:558)),ze(e[r(613)],r(563),i?"flex":r(558)),ze(e[r(419)],r(563),i?"flex":r(558)),ze(e[r(627)],r(563),r(i?295:558)),ze(e[r(571)],r(563),i?r(295):"none"),ze(e[r(427)],r(563),r(i?295:558)),ze(e[r(257)],r(563),i?r(295):"none"),ze(e.$objectDetect,r(563),r(i?295:558)),ze(e[r(594)],"display",r(i?295:558)),ze(e[r(383)],r(563),i?"flex":"none"),(t[r(579)]()||t.isPlayVod())&&ze(e.$speedMenu,r(563),r(i?295:558)),b(),e.extendBtnList[r(335)]((t=>{const e=r;t[e(479)]===Ut[e(282)]&&(t[e(321)]&&ze(t[e(321)],"display",i?"flex":e(558)),t[e(607)]&&ze(t[e(607)],"display","none"))})),t[r(572)][r(420)]?ze(e[r(560)],"display",r(i?295:558)):(ze(e[r(311)],"display",r(i?295:558)),ze(e[r(560)],"display","none")),ze(e.$poster,r(563),"none"),ze(e.$ptzActive,r(563),r(558)),ze(e[r(436)],"display",r(558)),ze(e.$zoomStop,r(563),r(558)),ze(e.$faceDetectActive,"display",r(558)),ze(e[r(570)],r(563),"none"),!i&&(e[r(492)]&&(e[r(492)][r(408)]=function(t){const e=Me;if(null==t||""===t)return e(345);let s=parseFloat(t);return s=s[e(513)](2),s+e(507)}("")),ze(e[r(288)],"display",r(558)),ze(e.$recording,"display",r(558)),e.$ptzControl&&e[r(449)].classList[r(441)](r(548))),E(),i&&I()};t[s(579)]()&&t.on(M[s(476)],(t=>{w(!t)})),t.on(M[s(414)],(i=>{const r=s,n=function(t){const e=Me;if(null==t||""===t||0===parseFloat(t)||t===e(325))return e(345);const s=[e(507),"MB/s",e(469),"TB/s",e(638),e(307),e(370),e(369)];let i=0;const r=parseFloat(t/8);i=Math.floor(Math[e(587)](r)/Math[e(587)](1024));let n=r/Math[e(423)](1024,i);return n=n[e(513)](2),n+(s[i]||s[0])}(i);e.kbpsShow=n,t[r(572)].showBandwidth&&e.$speed&&(e.$speed[r(408)]=n),E()}));const E=()=>{const i=s;if(v()&&t[i(572)][i(494)][i(539)]===A.normal){let s=e[i(519)].width-e[i(620)][i(601)]-e[i(340)][i(601)]-e[i(518)][i(601)];Je()&&t[i(388)]&&(s=e[i(519)].height-e[i(620)][i(493)]-e[i(340)].height-e[i(518)][i(493)]),e[i(333)][i(534)].width=s+"px"}},I=()=>{const i=s;if(!v()||t._opt.playbackConfig[i(539)]!==A[i(547)])return;const r=e[i(412)][i(534)][i(421)];let n=parseInt(r,10);const o=e[i(381)][i(601)];n=n-o/2>0?parseInt(n-o/2,10):0,e[i(333)].scrollLeft=n};if(v()){const i=()=>{const i=s;if(v()){let s=0;const r=t[i(586)]&&t[i(586)][i(265)];if(r){const n=new Date(r),o=n[i(373)](),a=n.getMinutes(),h=n[i(503)]();t[i(586)][i(324)]?s=60*o+a:t[i(586)].is30Min?s=2*(60*o+a)+parseInt(h/30,10):t[i(586)][i(438)]?s=6*(60*o+a)+parseInt(h/10,10):t.playback.is5Min?s=12*(60*o+a)+parseInt(h/5,10):t.playback[i(334)]&&(s=60*(60*o+a)+parseInt(h,10)),e[i(412)][i(534)][i(421)]=s+"px"}}},r=t=>{const i=s;e[i(331)][i(596)][i(441)](i(307)),e.$playbackExpand[i(596)].remove(i(307)),t===st.oneHour&&e[i(331)][i(596)].add(i(307)),t===st[i(481)]&&e[i(580)].classList[i(535)](i(307))};t.on(M[s(525)],(r=>{const n=s;if(t._opt.playbackConfig[n(539)]===A[n(547)])e.$playbackCurrentTimeText&&(e[n(581)][n(342)]=is(r,n(450))),i();else if(t[n(572)].playbackConfig.controlType===A[n(542)]){const s=xm(r,t.playback.totalDuration);e[n(310)][n(534)][n(601)]=100*s+"%",e[n(425)].style[n(421)]="calc("+100*s+n(254)+7+n(588),e[n(532)][n(342)]=Cm(r)+n(299)+Cm(t[n(586)][n(551)])}})),t.on(M.playbackPrecision,((n,o)=>{const a=s;v()&&t[a(572)][a(494)].controlType===A[a(547)]&&(e.$playbackTimeScroll[a(596)][a(441)](it.oneHour,it[a(567)],it[a(481)],it[a(531)]),e[a(304)][a(596)][a(535)](it[n]),e[a(561)]&&(window[a(316)](e[a(561)]),e[a(561)]=null),e[a(587)]&&(clearTimeout(e[a(587)]),e[a(587)]=null),e[a(485)].innerHTML="",e[a(322)][a(408)]="",e.changePercisitionInterval=setTimeout((()=>{const s=a;switch(e[s(485)][s(408)]="",e.$playbackTimeListSecond[s(408)]="",n){case st[s(507)]:Im(o,e);break;case st.halfHour:Tm(o,e);break;case st[s(531)]:km(o,e);break;case st[s(481)]:_m(o,e)}i(),t[s(572)][s(494)][s(266)]&&r(n),I()}),16))})),t.on(M[s(624)],(()=>{S((()=>{E()}))})),t.on(M.playbackTimeScroll,(()=>{I()})),E()}if(t[s(349)]()&&(t.on(M[s(516)],(t=>{w(!t)})),t.on(M.playVodTime,(i=>{const r=s,n=xm(i,t.playVod[r(551)]);e.$playbackProgressPlayed[r(534)][r(601)]=100*n+"%",e[r(425)][r(534)][r(421)]=r(625)+100*n+r(254)+7+r(588),e[r(532)][r(342)]=Cm(i)+r(299)+Cm(t[r(275)][r(551)])})),t.on(M[s(521)],(t=>{const i=s;e[i(569)].style[i(601)]=100*t+"%"})),t.on(M[s(471)],(()=>{ze(e.$loading,"display","flex")})),t.on(M.playVodCanplay,(()=>{const t=s;ze(e.$loading,t(563),t(558))})),t.on(M[s(604)],(()=>{const t=s;ze(e.$loading,t(563),t(295))})),t.on(M.playVodSeekEnd,(()=>{const t=s;ze(e[t(365)],t(563),t(558))})),t.on(M.playVodEnded,(()=>{const i=s;e[i(310)].style[i(601)]=i(406),e[i(425)][i(534)].left="calc(100% - 7px)",e.$playbackProgressTime[i(342)]=Cm(t[i(275)][i(551)])+i(299)+Cm(t.playVod.totalDuration)}))),t[s(572)][s(612)].quality&&t[s(572)].qualityConfig[s(417)]>0){t.on(M[s(374)],(t=>{i(t)}));const i=t=>{const i=s;e[i(559)][i(342)]=t,e.$qualityMenuItems.forEach((e=>{const s=i,r=e[s(252)][s(292)];e.classList.remove(s(611)),r===t&&e.classList[s(535)](s(611))}))};(()=>{const i=s,r=t[i(572)][i(524)]||[];let n="";r[i(335)]((t=>{const e=i;n+=e(437)+t+'">'+t+e(599)})),n&&(e.$qualityMenuList.insertAdjacentHTML(i(458),n),Object.defineProperty(e,"$qualityMenuItems",{value:t[i(294)][i(301)](i(597))}))})(),t[s(528)]&&i(t.streamQuality)}if(t[s(572)][s(612)][s(309)]&&t[s(572)][s(269)].length>0){t.on(M.viewResizeChange,(t=>{i(t)}));const i=i=>{const r=s,n=t[r(572)][r(269)][i];e.$scaleText[r(342)]=n,e[r(517)].forEach((t=>{const e=r,s=t.dataset.scale;t[e(596)][e(441)]("jb-pro-scale-menu-item-active"),os(s)===os(i)&&t[e(596)][e(535)](e(617))}))};(()=>{const i=s,r=t[i(572)][i(269)]||[];let n="";r[i(335)](((t,e)=>{n+='\n
'+t+"
\n "})),n&&(e[i(616)][i(488)](i(458),n),Object.defineProperty(e,"$scaleMenuItems",{value:t.$container.querySelectorAll(".jb-pro-scale-menu-item")}))})(),i(t[s(281)])}if(t[s(579)]()&&t._opt[s(494)][s(543)]&&t[s(572)][s(494)].rateConfig[s(417)]>0){t.on(M[s(574)],(t=>{i(t)}));const i=i=>{const r=s,n=t._opt[r(494)].rateConfig.find((t=>os(t[r(474)])===os(i)));n&&(e[r(384)][r(342)]=n[r(415)],e[r(549)].forEach((t=>{const e=r,s=t[e(252)].speed;t[e(596)][e(441)]("jb-pro-speed-menu-item-active"),os(s)===os(i)&&t[e(596)][e(535)](e(327))})))};(()=>{const i=s,r=t._opt.playbackConfig[i(272)];let n="";r[i(335)](((t,e)=>{const s=i;n+=s(312)+t.value+'">'+t[s(415)]+"
\n "})),n&&(e[i(505)][i(488)]("beforeend",n),Object[i(431)](e,i(549),{value:t[i(294)].querySelectorAll(i(582))}))})();const r=t[s(586)]&&t[s(586)][s(512)]||1;i(r)}if(t[s(349)]()&&t[s(572)][s(511)][s(543)]&&t[s(572)][s(511)].rateConfig[s(417)]>0){t.on(M[s(529)],(t=>{i(t)}));const i=i=>{const r=s,n=t[r(572)][r(511)][r(272)][r(348)]((t=>os(t.value)===os(i)));n&&(e[r(384)][r(342)]=n[r(415)],e.$speedMenuItems[r(335)]((t=>{const e=r,s=t.dataset[e(467)];t.classList[e(441)](e(327)),os(s)===os(i)&&t[e(596)][e(535)](e(327))})))};(()=>{const i=s,r=t[i(572)][i(511)].rateConfig;let n="";r[i(335)](((t,e)=>{const s=i;n+=s(312)+t[s(474)]+'">'+t[s(415)]+"
\n "})),n&&(e[i(505)].insertAdjacentHTML("beforeend",n),Object[i(431)](e,"$speedMenuItems",{value:t.$container[i(301)](i(582))}))})();const r=t[s(275)]?t[s(275)].rate:1;i(r)}t.on(M[s(575)],(function(){const i=s;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t[i(572)][i(420)]){ze(e.$performancePanel,"display","block"),e[i(577)][i(408)]="";const s=Qe,n=ui(),o=t[i(609)](),a=vs(o)&&-1!==o?""+Et[o]:"",h=t[i(315)]&&t[i(315)][i(554)]||{},c=t[i(496)]&&t[i(496)][i(442)]||{},l=t[i(556)]||{},d=t[i(278)](),p=t.getCanvasRenderType(),m=t[i(393)](),g=t.getDemuxType(),A=t[i(401)](),y=t[i(291)]();let b=t[i(615)](),v=t[i(318)]();const S=t[i(510)](),w=t[i(395)];b=ks(b),v=ds(v);const E=t[i(428)]()?i(482):t[i(579)]()?i(345):i(443);let I=r[i(424)];const T=t[i(572)][i(564)]&&t._opt[i(418)],k=t[i(273)]?t[i(273)].kbpsShow:i(506),_=t[i(555)](),C=t[i(545)]||"",R=i(484)+s+"
\n
\n "+(C?i(358)+C+i(287):"")+i(392)+(t[i(572)][i(338)]?'\n
\n UUid '+t[i(572)][i(538)]+i(287):"")+i(392)+(t[i(285)]()?'\n
\n 窗口下标 '+t[i(572)].multiIndex+"\n
\n ":"")+i(392)+(n?'\n
\n 内存大小限制 '+ds(n[i(413)])+i(360)+ds(n[i(253)])+i(364)+ds(n[i(501)])+i(287):"")+i(392)+(a?'\n
\n CPU压力情况 '+a+i(550):"")+"\n\n "+(n&&n[i(501)]>n[i(253)]?'\n
\n 可能内存泄漏 是}\n
\n ':"")+'\n\n
\n 播放模式 '+E+'\n
\n
\n 屏幕宽高 '+screen[i(601)]+i(351)+screen[i(493)]+"\n
\n "+(t[i(579)]()?'\n
\n 播放倍率 '+t[i(586)][i(512)]+i(593)+(t[i(586)][i(320)]?"固定FPS":"动态FPS")+i(464)+(t.playback[i(320)]?'\n
\n 固定FPS '+t[i(315)][i(623)]()+i(328):"")+i(605):"")+i(354)+u[g]+i(457)+m+i(552)+d+i(445)+(d===f[i(405)]?i(614)+p+i(287):"")+i(462)+A+i(407)+(h[i(454)]||"-")+i(495)+(h[i(601)]||"-")+"x"+(h[i(493)]||"-")+i(445)+(t[i(428)]()?i(452)+(w||"-")+i(382):"")+i(363)+(K[c[i(454)]]||"-")+'\n
\n
\n 音频引擎 '+(y||"-")+'\n
\n
\n 音频通道 '+(c[i(520)]||"-")+i(403)+(c[i(578)]||"-")+i(445)+(t[i(428)]()?i(329)+l[i(356)]+i(514)+l[i(595)]+'\n
\n
\n 请求响应(ms) '+l[i(487)]+i(435)+l[i(386)]+i(350)+l[i(343)]+i(264)+l.videoTimestamp+i(410)+l[i(465)]+i(287)+(t[i(284)]?i(259)+b+i(509)+v+i(475):"")+i(392):"")+i(448)+r[i(330)]+i(317)+r[i(366)]+i(477)+r[i(293)]+i(385)+r[i(628)]+'\n
\n
\n 解码帧率(fps) '+r.dfps+i(337)+r.audioBuffer+i(602)+r[i(336)]+i(445)+(t.isPlayer()?'\n
\n 视频待解码帧 '+r[i(472)]+i(475):i(456)+r.playbackCacheDataDuration+'\n
\n
\n 视频待渲染帧 '+r[i(305)]+'\n
\n
\n 视频待解码帧 '+r.demuxBuffer+i(490)+r[i(466)]+i(475))+i(277)+r[i(306)]+i(445)+(t[i(572)][i(564)]?i(347)+r[i(486)]+i(346)+r[i(515)]+i(339)+r.mseStore+i(353)+r[i(440)]+i(434)+(r[i(280)]>1?"加速":"正常")+i(287):"")+i(392)+(t[i(572)][i(368)]?i(583)+r[i(527)]+i(287):"")+i(392)+(t[i(526)]()?i(369)+r[i(498)]+i(468):"")+i(392)+(t[i(489)]()?'
\n HLS缓冲时长(ms) '+r[i(498)]+'\n
\n
\n HLS待解码帧 '+r.hlsDemuxLength+'\n
\n
\n HLS待解码视频帧 '+r.hlsDemuxVideoLength+'\n
\n
\n HLS待解码音频帧 '+r[i(504)]+i(468):"")+i(392)+(t[i(428)]()&&_?'\n
\n Video已渲染帧 '+_[i(372)]+i(274)+_.droppedVideoFrames+i(606):"")+i(392)+(t.isPlayer()?i(400)+r[i(271)]+i(446)+r[i(396)]+i(430)+r[i(608)]+i(550):"")+i(392)+(t[i(572)][i(564)]||t[i(371)]()||t[i(380)]()?i(276)+r.videoCurrentTime+i(459)+r[i(565)]+i(377)+r.mseVideoBufferDelayTime+"\n
\n ":"")+i(270)+(r[i(540)]||r.ts)+i(445)+(t[i(572)][i(262)]&&t[i(411)]()&&ci(T)?i(326)+r[i(313)]+i(464)+(t[i(572)][i(444)]?'\n
\n 音视频同步时间戳(ms) '+r.audioSyncVideo+i(328):"")+i(469)+(S?"加速":"正常")+"\n
\n ":"")+i(387)+r[i(508)]+i(445)+(t[i(428)]()?i(480)+r.delayTs+i(289)+r[i(379)]+i(550):"")+"\n "+(t[i(428)]()&&r[i(303)]?'
\n 是否超过一倍率推流 是\n
\n ':"")+i(392)+(t[i(428)]()?i(500)+r.videoSmooth+i(287):"")+"\n "+(t[i(428)]()?'\n
\n 是否在丢帧 '+I+i(287):"")+'\n
\n 网速 '+k+'\n
\n
\n 播放时长(s) '+ks(r[i(355)])+'\n
\n
\n ';e[i(577)][i(488)](i(458),R)}else e.$performancePanel[i(408)]="",ze(e[i(577)],i(563),"none")})),t.on(M[s(562)],(t=>{const i=s;ze(e[i(311)],i(563),i(t?558:295)),ze(e[i(560)],i(563),i(t?295:558))})),t.on(M.faceDetectActive,(t=>{const i=s;ze(e[i(257)],"display",i(t?558:295)),ze(e[i(267)],i(563),i(t?295:558))})),t.on(M[s(533)],(t=>{const i=s;ze(e[i(391)],i(563),t?"none":i(295)),ze(e[i(570)],i(563),t?"flex":i(558))})),t.on(M[s(537)],(t=>{const i=s;ze(e[i(594)],i(563),i(t?558:295)),ze(e[i(522)],i(563),i(t?295:558))}))};function Fm(t,e){var s=Om();return(Fm=function(t,e){return s[t-=293]})(t,e)}!function(t,e){for(var s=Fm,i=t();;)try{if(492954===-parseInt(s(302))/1+-parseInt(s(305))/2+-parseInt(s(294))/3*(parseInt(s(310))/4)+-parseInt(s(311))/5+-parseInt(s(314))/6*(-parseInt(s(293))/7)+-parseInt(s(307))/8+parseInt(s(303))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Om);function Om(){var t=["$playbackTimeInner","controlsRightRect","$controls","defineProperty","$controlsInner","$controlsPlaybackBtns","558257qeUqbO","30593178jnlZrK","controlsPlaybackTimeInner","976456ShVIDc","controlsInnerRect","5044768UGsowj","controlsPlaybackBtnsRect","controlsLeftRect","16uQrMGY","3301135VfycMT","$controlsRight","getBoundingClientRect","48aXnfWu","260953wYqujd","650409BxIuob","$controlsLeft"];return(Om=function(){return t})()}function Um(){const t=["focusFar","152367hCJeoR","jb-pro-scale-menu-shown","cursor","$screenshot","top","mouseover","playType","isInitPlayer","height","$ptzFocusFar","operateBtns","screenshotFn","lastVolume","stop","record","apertureNear","9459312wHzBoP","quality","$ptzFogClose","left","totalDuration","_lastVolume","style","recordStopFn","ptzFogShow","fullscreenFn","$speedMenu","ptzZoomShow","jb-pro-volume-panel-wrap-show","zoom","$zoomStop","$playbackTimeList","streamQuality","$ptzActive","mousedown","$tipsMessage","$zoom","controlAutoHide","expandPrecision","$tipsMessageContent","clientWidth","9vcfBoW","$ptz","$playBig","fiStop","apertureFar","$ptzCruisePause","$volumeOff","speed","fullscreen","performance","cruiseStart","arrow","isPtzControlDroging","faceDetect","matches","uiUsePlaybackPause","currentTarget","narrowPrecision","jb-pro-ptz-bg-active-","$recordStop","$ptzWiperClose","ptzSupportDraggable","47376XFuDxv","display","$occlusionDetectActive","$ptzBgActive","$scaleMenu","seek","$tipsMessageClose","playbackConfig","aiObject","$record","1126696mvpbBl","124runhqW","playbackTF","zoomExpand","mouseout","jb-pro-ptz-controls-show","_opt","forEach","normal","ptzApertureShow","offsetTop","$volume","ptzCruiseShow","percentage","wheel","grab","ptzFocusShow","length","controlType","pauseFn","recording","dataset","clientY","tempPtzPosition","doDestroy","setScaleMode","audio","$faceDetectActive","innerHTML","aiFace","flex","catch","jb-pro-speed-menu-shown","playbackPreRateChange","ptzClickType","$volumePanel","fogClose","click","block","$objectDetectActive","touches","ptzStopEmitDelay","6516830vNqrSV","$qualityMenuList","aiOcclusion","isPlayVod","$ptzExpand","screenshot","scale","$pause","$playbackProgress","playbackPause","$ptzFogOpen","down","recordFn","supportWheel","3423752BTjYns","isInWebFullscreen","playback","div.jb-pro-speed-menu-item","7Ctlbuy","div.jb-pro-scale-menu-item","$performance","div.jb-pro-quality-menu-item","$speedMenuList","$container","detail","zoomNarrow","mouseup","$ptzFocusNear","then","playVodPause","$fullscreenExit","target","$performanceActive","occlusionDetect","fullscreenExitFn","wheelDelta","playVod","jb-pro-ptz-control-","$playbackProgressTip","$ptzArrows","resumeAudioAfterPause","$playbackProgressIndicator","remove","$playbackNarrow","$ptzControl","wiperOpen","7278090UtyskA","showRateBtn","downloadMemoryLog","12848LicKzq","$ptzControlCircular","stopPropagation","$zoomExpand","$ptzApertureFar","$volumeHandle","$volumePanelWrap","1cBiBVM","focusNear","$qualityMenu","$scaleMenuList","$playbackExpand","logSave","isFocus","volume","$ptzApertureNear","$controls","classList","none","emit","isDroging","hasControl","move","clickInitPlayer","getBoundingClientRect","play","ptz","zooming","isVolumeDroging","$close","jb-pro-ptz-bg-active-show","playForControl","$faceDetect","jb-pro-quality-menu-shown","second","video","mouseDownAndUp","close","togglePerformancePanel","playFn","add","$fullscreen","$playbackTimeInner","pauseForControl","fogOpen","$volumeOn","mousemove","div.jb-pro-playback-time-minute-one","contextmenu","playVodForward","playVodSeek","grabbing"];return(Um=function(){return t})()}function Nm(t,e){const s=Um();return(Nm=function(t,e){return s[t-=144]})(t,e)}!function(t,e){const s=Nm,i=t();for(;;)try{if(791697===parseInt(s(316))/1*(parseInt(s(218))/2)+-parseInt(s(145))/3*(parseInt(s(219))/4)+-parseInt(s(306))/5+-parseInt(s(161))/6+parseInt(s(278))/7*(-parseInt(s(274))/8)+parseInt(s(186))/9*(parseInt(s(260))/10)+-parseInt(s(309))/11*(-parseInt(s(208))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Um);function jm(t,e){var s=zm();return(jm=function(t,e){return s[t-=268]})(t,e)}function Vm(t,e){var s=jm;void 0===e&&(e={});var i=e[s(292)];if(t&&"undefined"!=typeof document){var r=document[s(276)]||document[s(275)](s(276))[0],n=document.createElement(s(282));n[s(288)]="text/css",i===s(285)?r.firstChild?r[s(290)](n,r[s(287)]):r.appendChild(n):r[s(284)](n),n.styleSheet?n[s(273)][s(272)]=t:n[s(284)](document[s(283)](t))}}function zm(){var t=["insertAt","133deNGMl","3122mYYGBE","1025937OgtTtd","10XYulqX","cssText","styleSheet","11921508VapGmY","getElementsByTagName","head","2106oiJItl","13zQesQD","101106iiATnu","481385tFegNU","14048WgDhyZ","style","createTextNode","appendChild","top","835041GBhiTZ","firstChild","type","4vXTgHn","insertBefore","146vhVkTl"];return(zm=function(){return t})()}!function(t,e){for(var s=jm,i=t();;)try{if(208935===-parseInt(s(291))/1*(-parseInt(s(269))/2)+parseInt(s(286))/3*(-parseInt(s(289))/4)+-parseInt(s(280))/5+parseInt(s(279))/6*(-parseInt(s(268))/7)+parseInt(s(281))/8*(-parseInt(s(277))/9)+parseInt(s(271))/10*(parseInt(s(270))/11)+parseInt(s(274))/12*(parseInt(s(278))/13))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(zm);function Gm(t,e){const s=Wm();return(Gm=function(t,e){return s[t-=138]})(t,e)}function Wm(){const t=["tagName","true","keyCode","17334cTvcZl","10dpaKgc","3501918fjgSqU","585sgAItd","1elydvC","contenteditable","292188XVqHOR","hotKeyVolumeStep","9vbLhIl","playVodForwardJumping","getAttribute","9VMzwDf","4589068PMftVQ","keydown","1261138wTqupZ","hotKeySeekStep","arrowDown","3647608JucXNB","toUpperCase","arrowRight","volume","keys","isPlayVod","preventDefault","forEach","arrowUp","isFocus","activeElement","9287700tJAUbk","_opt","fullscreen"];return(Wm=function(){return t})()}Vm('@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@-webkit-keyframes magentaPulse{0%{background-color:#630030;-webkit-box-shadow:0 0 9px #333}50%{background-color:#a9014b;-webkit-box-shadow:0 0 18px #a9014b}to{background-color:#630030;-webkit-box-shadow:0 0 9px #333}}@keyframes magentaPulse{0%{background-color:#630030;-webkit-box-shadow:0 0 9px #333}50%{background-color:#a9014b;-webkit-box-shadow:0 0 18px #a9014b}to{background-color:#630030;-webkit-box-shadow:0 0 9px #333}}.jb-pro-container video::-webkit-media-controls{display:none!important}.jb-pro-container .jb-pro-icon{cursor:pointer;width:16px;height:16px;display:inline-block}.jb-pro-container .jb-pro-ptz-controls{position:absolute;width:156px;height:156px;visibility:hidden;opacity:0;border-radius:78px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAE4BAMAAAA9UfJZAAAAMFBMVEUAAABHcEy0tLRZWVmysrKoqKi1tbWvr6+2traBgYG1tbWWlpa1tbW1tbVUVFS1tbVGCHqkAAAAD3RSTlMzAO9U3LSWySp3aZcVRDUDw823AAAJYUlEQVR42u3d32sbVxYH8EPHxgg/lBsa7SBkukmpSbwLI2KbEPpgZ5MQtwmM0wRMmgdhP6RgEuwlSVnYlmGMYaEvMU1KKX4QNq0pocVmm7CYfRBaQguFpbgPKRSC/4V2LGliO+bulWKrkvVrftyZ+WbxeTRG+nDnnnNmRjP3EpMR6tMH18du/0Xj1tGz5+9cf/DUlPKx5PsTkr8s3eZ1cX7ym1zkuI/f1wTFunNt9fP+FIno7/98/tFY+Y8ffBUlLrmkl2Cr96guTv27BMxP5iLCqUvi68+tpqhJKPNXBH3SjACnfimm/7Wmsl3fI/FP75lh457oPH+1Da3M+1T8481QcT0T7UetevR618LDPdH4hTlyHLGH3LoZEk6d4PlvyVW8pfNeMwzcDwa/kCKXoTzk9tfB455o1mXyEIOa+0PrFvcFt+fIU8QM/k6guOQifzNFHkN5l/flgsOJVHibfMR9l2nhBqem+VXyFZ/xghkMTp3il8lnDPKiGQROhs2lzjEuKcVW1uWk4ybk2Eq63pxk3CK/RZLiJO+Ti/vZXw3ZX1E+kon7jv+JJMY/+Q15uIRWIKmRthZk4VTDTsnFKYZtSsItWiskObq1Pjm4f8gqIrUF5W8ycAl+nAKIT/iCf1zSKFAgkW4/7drifrLmgsHF2k87alvhblFAcbJttWuDU/VtCiyyedMXbjGfCg6n6H1+cHE+TQFGFx/3jksa2xRoZO2cZ9xsUJn6e8aOeMX1aGco4Biw1jzilm0KPNJb3nBxvhI8rrtVTlCLK5ptCiEyBS+474POhr2c+NA9Lqm/QaHEiXzONW42yN5Q2ydG3OLU4MvI7+XEdImbCWvgSkN3zB1O1YYptOhoNnRNcDM2hRjGMTc4VZsOE9fVZOioyYyjUKPJrKPGNW44XFxX41rXEPc4vFTdS9iLTnFJ4wyFHAO2U1zcSoWNU7RLDnFTb1DocaLoDJfgc+HjYo3uTjTArW9TBJHdcYJTtdEocJ0NCnE97nGBIon0RQc4YzgaXIfdHhdBHdmrJuNtceubFFFkdtrhVG0lKlx3XUrsxz22KbIwLrbBTQ1Hhxsotsb18FR0OIWvtcT9Z5sijOyfW+KM6ShxXXYrXMJKRYlTtIUWuLubFGlknrXAGaPR4jrt5riERRFH7XGtwc1sRo3LHGuKi/qo7j+uhJOr9flKMBW4QR2uxk1NR4/rKjbGRdpXG/bXKtxrAEdVHNfTDXHLf0TAvbLVCJfU5hBwMSvXABfPE0To4w1wP25i4DLPG+CmRjFwncV6nIpQSF4UE7MOd7hAIJG+VIe7u4GCG3pWh0uPouA6C/txMFOuetIR3JSrmnQEN+WqJh2BVbmaSreLS+JMudKky9Xg4jYBRXq8BndoEwmXOVKDWx5GwnVs1eD0OSRcLF+N67EIKrS1Klx8GwuXHa/C/biBhRt6XoVbnsbCdW1V4bDyoZIRZZwKlg8iI8wKLl5Aw73oEWXcoQ003NCRCm59GA3XsVPBTa2g4bqLFZyWQsMp1h6uJ09woa/t4tCaV6WBEWSy7qYrQSbrbroS2MVNzUUOAXbWSnel0sU+AUbpsl/gEjYizlgo4w5vI+Kyl8o4xEryopYI3N1hRFzHszJueRQR17lVxqXnEHGxQhmHd06yd15CgBcQlcsIYokCJi69IHDxbUycOGki9toGJm7otMC9/ism7tXfBA6zBperMIHW4HIVJsDrwsrVIYE2CNEibIHDbBDlFkFJ0AYhWkSOemxUnLFGqN2r1L8ItXuV+hfFN1FxmXH6wwYqbuivdAgXd4RQ+36p8xNq3y91flqfRsV17dD6KCquc4eWcXFbtLyCiusu0hQ0bg4VFytSGhdXICOFilNs0nFx+QOcZ5xGsGEd4DzjOC6OH+A847QD3P9jtuJ2CGjcQeP3gYM+2YQ+TYe+wMG+NETGQd+OgL6RA30LDPrm4eu/ouJe/Q37hjX0rX7oH0mgf16C/mEO+idN6B+DoX9Gx34AAfrRDeiHXqAfF0Lt/OUHrVAfUcucRn+4D/qxSOgHSqEfxcV+iBn68W/EV3AqD85Dv3IA/bIG9GsumC8IaSb+q1XYL6VBv84H/SIk9Cuk0C/fQr+2jP3CN/Sr8tCLDEAvzwC9sAX0kiDYi6lAL0MDvYAP9NJH0ItGYS+3Bb1QGVaP2LfEG/TieNDLCmIvyAi9lCX0IqDQy6diLzwLvWQv9GLH0MtER76rRqWxPgdemtwYf9kWdYdeDh97IwHoLRigN6/A3vYDesMU6K1msDfpgd7eiOmjSEf1ZdpSC3ozMuht3LA3wIPeOjDSTRdfKb7M21VCb/QJvUUq9uay0NvyYm9oHFFKdDvaChp6E23s7cehN25nh5G3vE8aZ8LGDdjMIY49zoc9dPpFx7ikHnIh7sjnHOPYTMj36oxjzDlO1UI9Xe9oUICb49iMDTBwzXCqFuKsG2gycM1wYtaFlrCK3mTgmuJU7UzkA9cUx2bDGjpFH2FucUk9pA57onGNa4lj31uhnJzEtA+ZexxLh3KpkykwL7g4D+GUuJuPe8Kx5RCuJtJbzBuuJ/hyMmCtecSx2aBzIqaNMK+4pBHwtU7WznnGiZwI9Oykq1U2tMWxxSD7hKL3MT84VQ/wwGbzpi8c+47fCsp2kt9g/nDsp6AyNqb1Mb+4pBFQKU7bpm8cS/DjQdg+aXT/wTWOzfLL8m2DfITJwLFFS/oZQHf7CecQpxq25GqnGO0nnEMcS2iSq13WWmCycKLaHZebDDeYPBz7mb8tz3aff8Rk4tiivJQd5H1MLo5NyNIN8t6cbJw6ZV2WYys6tTnHCZ2MsRM2k8nHSdG5srnBMTXNr/qzfcYLLmyucEyd8FdR7vNeNzZ3OJZc5G967mTKu7wvx4LDMfYFtz2efMYM/o7LL3OLY080byVlULNusqBx7AeDX3B9aJWH3P6aBY8rpUX+W3e2t3SXqeAZVzq0/JyLmRe7wt0fUs849t8Jzv/u8Ngq/+K8d42FhxODp/P8VQc85VPxjzc9folXHFO/1Lh1rc3BjT0S//SeycLGCd6Sxvm51abDp8xf4dyaNL1/gw+caBhLuvj6O6v36mWn5scEPe+H5hMn4uP3hUEAr63e6y+PYX//qflHY+U/fvCVzw/3ixPD98vSbV4X5ye/yfn+aP+4MvDpg+tjZ4+K8bKOnr1z/cFTU8rH/g92biFxn2S73AAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;transition:visibility .3s,opacity .3s;right:43px;bottom:135px}.jb-pro-container .jb-pro-ptz-controls.show-vertical{right:43px}.jb-pro-container .jb-pro-ptz-controls.show-vertical .jb-pro-ptz-btns{left:0;top:156px}.jb-pro-container .jb-pro-ptz-controls.show-level{right:163px}.jb-pro-container .jb-pro-ptz-controls.show-level .jb-pro-ptz-btns{min-height:156px;left:144px;top:0;display:flex;flex-direction:column;justify-content:center}.jb-pro-container .jb-pro-ptz-controls.jb-pro-ptz-controls-show{visibility:visible;opacity:1}.jb-pro-container .jb-pro-ptz-bg-active{visibility:hidden;opacity:0;width:156px;height:156px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATgAAAE4CAMAAAD4oR9YAAAAM1BMVEX///////////////////////////9HcEz///////////////////////////////////85yRS0AAAAEXRSTlO5DCgVgZBxAK2fQDRkBR5XTPLKM/gAABnnSURBVHja7F0Jkqs6DGQPO9z/tD8Jq6WWbCCvIjKfzAGmulrW3ooedr6ui+M4TdP++SXPr1l/SdL3aRrHhv7ZyA5qb9xe0L3Am+DrkzeCL/BeX908MezTuPsfOArdgl3KsZuhq99fk/Tx3waum+ByAHua5QbYilkzY1aP728YhrH5InrfBa57OLAtVjpRbYaumex04dq4APeC7vnVSfo/45bXLe33jGscMx3f0A1vyg3t69e2dRL/NeA6wrgdcCvjyPM2U25mXDt9xVD3f/qN0yi3Mm6P20S54vlXtGPS/R3GPSbYOsC4ZAvmJtiaGiL3Zlzx/Ht+Y/KXTJXbqmaqe9za1VYn3N7YpX/OVGev2qduOLIiB7xqOzGuWCiXFVmWtU3368A5lkqeOJI21I5XXaORxVRnxmUTdNnY/4U3riNvHMJts9XRtdXVUttipdzrK/4x7UyY6sK4Gbo+nU21T1zKcd9AGJetlMvyLKvj3zXVfeqQElMljINx3MK4xVQ3xj2Ry7N/6CiMOIfYyVUXWxUyBx7HuZRbcHt9bf/Lb9zsHlzKzabauJaK47iVcC7jJujS33/joKkmxDnM4QiJ4xDjZuT+DXQW3jgxV012qcPuiePhCGfchlv1/P0D6Czmqmuq2gPGkbIS8Q4ZsNU3dGP3Y2+cW1RyKpkrbAnwqhi3iXHFHrU3bFVV5c3vBsCsOALjkXErAW85F3rjFvBm5Kos+TngCOXYG7fA1ojFER7GPUHbmer0tfGPANeROM6pjvDMQSkrsWQ1d564Fbr61964TvSqDa6O0ELmAtvGuc2rrpQrn/aa/qCpYq+6mSpOVhnjWBy38u2JXFl9yL8acg6CV3Ur5yxVZfW4AsRxG+XKssz6n3njVMYR4Eg8sj1yi3tgtroxrpyhG38gc+h8PYddPQ551dVQW5jju2/cG7kXdB946Uy9cbDnQOpxuCCHcq5dHDcht8D2/K67VxPNGtLJd7qDTcgb1zLGbXEcY9z0Fd39GReTzIH1B/2lcxrGTYxjXnXyqxNyef8zpipVlfDsyCCmDkuumhGvWq6W+vyisqxvDJwwOxJQO6fNmjaQcRt0ZdR2dwWOFZViuculNWtgBZjk+DNq1cq45y+Lf5NxE25B3oEyLueFJWqtT+Ciqr8r48jsCAyAG+2Na53MAdQxX16VhHEL4Z7Ilc2dGad28pskaULiEdDlyijjdqa6gBeNtwSu63AnP3V6NUnAG9cu1RHOuL2hVi5qr6+9Za4qV0dCGcfCEfDIufWRFbsZvKy7KeNgW7XHvRqxWfOGLhO6XCrjoiiPb/rGdZ75uGRfj9u3B1sWAEtdLuxVF/Cq9HaMe4A4TptkZYwLqI44rmGDbUe5E8hZcg54zquRbHXu5NN6HKuO7N84YqwbdGV/Q8YF5arUN7CJTNLkgplD5T5xG+OOI2ehAhxv00ocOlpWwhHwljns5uNg6bxCb9wbueSupip6VTnj2jGudSvnOeqrVo6h7vl2nHM2K8AkV1WyfDYDvHUcWF+1VBl3EDlLKdc2dQ6aNbhXw2eAt14Nf+MqFse5rDuS8tucHUmhqaJppYF6B8440h7E8cjhqMTiLtcaAL+ga9jWZb35hpbHceyNI9WRSmHcE7n4jqbqTp2D2nnzgm154mB1hJQy1cwBIpd3twCOrjnEoDsoTZ2jepybb2VKrhpx3zB92Z29Khpl1ZN8MHWzJV1CdYQHJEeqTMbqcfEMW+obLBwES83w7AgvY0YlMNT3N96GcXEHGQdxG2t3CQ5kDkoFeO8esHd4fc193jinAtxvXhUN3Ywz5VAFGM3cENfgVM4x5YICYRumqu5yIVMdJuhaLXMAFWBKOIhbWFBiO44Dg4Usxx/cCrDyxqESMIYuu4lX1fYcGnVaaVmtKXZxHOzW5Bvfqtk3iLAFuVaLew4HluDUzIH1VYMZF+AgLMZxcAYY1uNYBTgrwPDIaqxOQ1p540IchBFTJW9c2ofNAO99Q+sYaugbJ35Vd4sKsPbGqVM33KsWmdpXLeXqufsVNwhH8FyhOh8n74foKb5WVDr0zFky1Rgt+iaJZyJTWErKMynpqsqgVy4q0xv0VTvZq0pJPq5jzn41zzzVET0aCYjmTO05OLaaBEwWqhvSenUkKtVw5P0N96mOpNr2YCPuh4AJCGEAoioDver7628Sx8WAcU2i1eM259AWhZBzuQEJieN07JR6sCHgXoSLnepI7yo9NqgCLE5A6K4hjHGKsVqK49JYEGyBg4XIq2b7FREUx5Xu2LkXOtmz2pJBW5sOqdjJF3sOjHG5fz7OT7n8DtURwjjPtBKtx7VLOa6Q4zh5Wkn8xhvU4xbG9al/s2bAbxwYkJO7XCGME43VIuMc56Dnqi7hpPE4cVopBLnibozTp5X4DHAQ49iwfsCX3IhxYFoJB8C0y7Xr1iwBSZXDulIUjF11G6+qr5aPALlCmTrfyWfQzCEK49xoPMnnjFMaq3QlX9tzQPuq0QFbLeNbMU6cHRn3Sb60HwJ6NXAhKQi61nzpPAbtQaY8jUUgQnRHSodxZSjjoig161W7HePIRGZDJzJHQXiEzE4DpRtSjotCHzkUkhj2qqJi4V54T1S6cWwVp/nhjAP1JQuDhbs4TtFW0spKTgW4UHJVFv4GQpcZA64jkt1xDNS8lDEv9Y3z5KpRGY4biIINMC7e2lxKNFJDqUfQquGZA2yrHoINUM7G6ZX1iVM2RKDUI08dssVUfduDRyI5QDkbFWCnscrWVWV1/RZ2uaRc9UyKL1LO0r7q1qwBm761WsmEUjdge9ApAB9iHHWslq4kMalHTbHQieO0zXKljHmIc4XdOE695yCpsg7eOE7t5B/4Uqv1uDSGKhDYq0r6yQWYj5NnRw5BNxjOHJAKRJB+nJqr4jcuOki4qOzs5qrgulSDJzJHUcyrCNMdOc44ty5nel815KDZ4HTypeoILAEfZJxbCjYkSpVKgZx/IpOfXgnarDkKXWIrHAm7kiTqxw1er+oQzg2Bj32FTcYJ2kpCIx9PK2XMq1ZCz+EM46LYZK4qaCsdmo+TqiOV5FWPITdYLZ2jOqYa/6LN8kJSZT1dxkSTJEYKmZ2/OuI5aIYYh+UzKn3TN9A9mLjL1cl6LexKkqof575xVJWVx3HRefdgUbGQNGs2U2Ul4HYQ60o+HeBzjCtt9VXVqXMpc3DEzh2NzEJSnr7OuG35wUTpPGjqXN3lQgdE0AWRA2sOHls1eO2yh/uqWM1LbUgvQzeatOhR5NZM39QIBNyQbviBVajYItbOYa56knCbrRrUj0vxTn5QVQlOnUtdrjKKztuqpbMEJ27WtCG3BzX9uMPfYqsmlW7SPnRfFeSqwTrAp9641VZtXi1PlX1VN44THzlvPe4k45aZLys9h+7cvuqsAqEpBAm6I9HJN24pZ9oIRzp5XzVUsVCZOnd0Ry4zbu52GdMBDn7j+NVyYXaEneW6+sbNrQcjtwdJCTh4WmlrSLcF3axRZ4AvMC6zxjj9annty1X9M8BoefBMQGKudB5UjnMnMltQV1JuD5JK5jnGTUU52zeke+4cfMJ7ygxwSZuDJ6EbzDEuZF+VNLnczCETlPdkdf3Tj5yhAHhNVdV9VXgJGV9JyqWjjRdS1fWRs6vmRctK1KuiLD/b22q2KyvlWJT1HOPeo3IWqyNwlwtrxJNrlwW69ZNr0qKnoBsfNrWVcH+w9gzIFXxDeisr5cxSrzCusFVWkpVukH7coF/0zQRt0a2QGZ1HLrfAuIfDOL/uiLOTz9UMMiTmtXMOVXmxW/P+OqM6wPBKEmLcbuiGMw4lq9cmIPbewa5iIb3LdYxxKHMouYDcSeRqcxd9+dS5VFWCGZd3e9DtR5+21dbYRd/1EAaagUC6IzDLV7YHj4pSKbmDkZRLnmRNcHeQ3azZdvLJ9qCUOVyhXGVmQUSpx9GWAzNW6Y0DmYMzrbTeHjzxxTeI41zktugXtQezAsRxon7caUt9VZZMMQ7pAPMnjnTyB5lxJHPgU+enGTeajONUHWB46wfW41jmAE79nHerNiYyFeXpBu/keycyM8983CWv+sxWLe2rsgpwH7qRxPuqb7pl6IKe61RPYpcbvefQy3e58LSSbwY4B071CuNKk31VtswlTyuJ+6oZuss1h3HVCTEDluZb7Ks6prqrjijlOLTLxRlXUhng85RLo+77por7qp5c1fUN8I1Tbw9eqce9ArkvA6eqxOOr5UQGgrdVC1l5GszHnYSuNsC4OKgeF6au73S5Mt983IU3bvwqcN3jAe9y9VgkvvHPskp7DuI9h7PfYOGNw3EcH7rx91XRPbNPT2TOEbCNNw7uJOGhG+naD8+5PG/cJcI9gYu/CxuYVuqd+6reHbgBWqrvavlV5LLvAqfdc6AFYElcyW1IS0eScqg7ch65/MvABXW5ElWvZXDiOL2Tz3VHzn7Vt4F7iNuDobMjwp7DUh3hfKs+EQCbAs43O9KgG9KDrK6vMe5qIPdd4NS7XFLi4NxzADf0eEPa8aqX1lV35REjb5zac1geuYVwtfjGbTmXsJH0qf7g14Hz9xzE9iD0qigewTv5F71qaeKNwz0HXI+jb5zLODABQWaAP+MbXA2SbxdH9KlzMjw9jvAUMr72o6363hQ4VyQ+lU+vkH70ALVFM2cnP8f1uOojhLPgVZnWI7y9Enjtcr+TT/qDJdj0LW9tqlgFQtUdYQfNQupxnHE3dw5aripmDgOcOt90gHOpOvKRF85EOCJKPSrVEa/y9D9QLDQEXKco3UiqVPtdrjZIIxNuSEeX+qomc9U+3S/WUIUgvD2o7nJ9UnfECnAPWQUiSOu8HYKERz6oO2IDuE7THcHOATIO9xzQhnT1IcblVhjnagRp8QjZVw1gHOFb9ZnSuY1OvutVe3/86w4Be7XOc6GvetsuF47jAq5dElFWn9a5oJF5YUDOBHCdds9BzRw2xrWy1jl946qrC6tfb0i7uWoKZ0eaoJs1e8LR+6pQPy66GMiNhqaV4ljbc/DqjrTC1fL8n/RVa0ummiI1r0a/yyUPT2dcXBR08s9Cl9gVpdKvEvgO00LB7qta585g4eP7jIuDxEXdaSV87TID91WdiUx67uf011lkHBTea/R6HN1XhTdr0AmROw9Pd1h5euurJvxKEh2e9uyrfnYn38q4vnp7cLchXXuVbtxdLoFx1UVtpWnv0uLNGudquTCROXj2HHI6riRK791zJakjIxDKRGatMI5fu8z81y4vzU5bE2yJmYLyFsc1jaythPcc+CW4j2grGVi71GTQgnLV1tFrQduDUj3uWvwb27p2Sefjel/PAXXy+QywoFh4IZKrTF67lC6I1H6NTHEGOBeWB88LoVm6dimoGaxO1a+RiafOpX3V8r7yGayOuZfPgGsOQhy3V4Fgew7wSlJ5hXG1aY1Msj2IK8B0BAK8cYIIxBXG9bZuD6ZUlCqk5zC0x/Yczh9YtSVK9ZA3pAN6Dqq6vnAo9ANx3Ndl0LazXPK0kq/n4J06F+45XMkc7Ajv0Sy/VzZrpAsiLUnyhZ38fQX4vOqIOXX9o9cutRlgfZfrSuZgTVxU9KrKPQdQOgd3CZB7OO9VzcnZ4pYDHddnkoVSrprlAXe5ynN5gxF1/Vi7ocenp7XdcueJyxSt8wtjhRYku2EcB3Hb1LxqHMb9192VJTmuw7DxSsfxdv/Tvn7TSceiAEpylqYnH/lWsWBRXABMVLHQ8B4cjvWUfN1xTYU6wJEqqy7y1ynBEIGt8ycqBxe2BGh3JEt3hO3HtXjm0KFJ/kHIOTDCmEUM2RFMH9ygn8N+WoNmDpcLZEgfFuz2pQPMKof7eHBME0RsxAVX3OFS1Y/Zj77jtGQ34nLRWjVeHtFF/pOIc2EvRdf1m/2UKy11s+8qtXzmAKQMhiNNTDefqiWtFIlkQqEbNJFuO7g6oqr84p8PC710IxN0R0bK5VIFV2svTx9CnCPTxspm1iiGiBKeptmh26tAYOXpp+y3HSGuqUwnONzIZN7bRAdYp4bDZpee5qq5OsAKcdTQISjykUjmM/aq3lRZK3rH6a5SOMmPZw5BQ47yQ05rvm3NVVXhkLCs0YqF2EN60A4iw8Ev1dtcNXvmsGK+qukh/QIRtEHE06cK1fXtKRfLqoTLRadcw8Ev1ZkTXBXzVdkdt5k1PvtQo/24I604520lvq0EFAvxXLXlytPHpjUXcRU4tTuiJvkx4EbugxHojrRJTn4p5jY3gcspucLQKW0lVnNhFQhF5ir+VhsvgZsN/Tji9cOcVybD6wcOuQ5MuXpxirhyt0tTea9NTPKLEVf7CdzMaZdZbpd0Pw6LZ1wiN7PhWGpwk1Uz/BzQDsSEnOB6vXT+cLscntoB3sQZ4qiaV/qOixjSJYgrBNwwu0OcSYKzzbe1ExwYrF6InFdpVp3EG+IIJSlsnWv9uEQ/DrMH497IcOgt4hNxC9vXv2b5ElhU32fuuF78IQ4r3XyreV3NST5V86K16uG6YRF3iIt1gJscxRbgE9oG88E2oa5fdMu14h9x5pZX2I9DuaGn+nGXmOdw6PHrvh+X9OWagGdNbzCkI5uk7NhpwHliSDf2sIY4wQHl6ZysWvoaqcUz4hLyGUrsfF85QIZIvASsh1zZsYsA54qTDyuHSAViM7wH+x6NarDWeRHiFpHT3HE1g5zldsk6wEDOdiiwJejFJeKYvaqtWEhFqShfFSkWHikaPHZH0qJUxEOvnK9a4CE9ibvACVQsbMLKwWTWGP6qMeKOAW6o3AWOXHHZ/TiD55BGXHZW3UScfqqPVdbGMjSLa1VVcRG+KmRI53fOOxGnn2piedpgSK9GB5h0MssBVzsM3AwdfXPuuFh3ZGLaonBUk3/J9eIfcXDmcC1RLEwotgTvuDzIDY3LwM1z0kMam/1gjcyWjQePq7VscjrE2YuFxNHMLFWB1vlwKDO4rlX1tj7ROidZNc1XzZJPZh/q73O5BPBVo90R5PaTyKqYPVhcdK3iGXHxJB8RRLT14KZYl1FW7RJa5zkf6uw2cJJ8x5kbmcDsx+yO6NglQreInO+Oy9oBNry348qh2M5hFTkH4sysihA3WXNVvAIciQSVtH2d745kdZUYQ9pa1o8QNxzLqO4m+eFcNRk6BLmWiHZ3gK+a+FZH8Y444q9qbuuTmcMLlad7Ee+Iq9gOcNJ7cFqZDjCXOs98AV9m8Y84OFitI7fLK0VcwHPoqZ+Dks+wPtRhEf+IS4kZ1ElqOZrW3CBH+ar2O24U34GT8rmqntWsif24jjFrrCtuEjkD4qC2kpqrjrQ9cpDLZXlIt+I+cEl/VernsB7Zj9PTQZIYKjkX4iCz5go7mYpZY2qdI77qH+M9MtRyGsQZXC5rrzBWnt77OQCNzKB2YIi7ipwDcZXJ5YJS54p32UM/h84WAmZZdZMTBE435LLt3sm2foajbyqtTnKCwCkVCFMlHnKSpkhev4UdYHDHke5IK2cIXKACYbuWm7UqVp7uzDsOI66bzxE4ogKBZg5ZtWqCIR2+4wDiLtl2s84m+VW8ra+YNXZ3BHaA4VwVvn8vjcipEJezr8/UDOgOMDeYYv24ZGXvtzuS0Y9jO8AT3QHmnPzhz9G4OZs5QKIvFgJW40FYqraAWRP4OQSRK4qbM55Dxpeqd4B/uiNTmj1oVg5ZhZbvKZdi1mBHMyIuanPydXdk97GW4U28GZqFSjdL8h2nkgN+x7E7bo+40rj50AHOkTq3NYIQ4tpolRXKi36/Q0rj5m2uWkV81ZS6/hRvK/XRyIHRHIby95v/d1y9WEk1lmW1uVx4XekWua4SOSHiKuZnZu3HYXV9yh6EPIc74NojBuQe9uMqUz+ujp4jI+2dt6w7Qp3ghuw+krNaNctBrwYqaNB7MHgAdyk/h5K+pdfx4GzusoafKujHRR3gDu/HhfpxfxF3lTMGbrZtCdB+XIi4KDegmQPagbh1zsufIY4QV2ltJcVXDTn5EeKKuFyqcmgrOWng9g05pZG5RFvnd8SNtDuiPKRbw9H3/ztumkVOjrg5ra2kEIe7IxBx4e7IA3DjMwf3eMfhh9xovH/73dZ5n9cBHrpFzhs4hbhgB5iqeaH5IGDWtCazZuhnOXHg5jmdVX9mDte0u9TjAQz9HB6Iu4zPHt2v7kgNe+cb3FbqeVa9qBfw39C1jZw9cMBDmr7jwqHDylzL+5Sfw2V9wcn9Iy5qZFoTaZRV9b7+k1nB55Sr2gEOaysFiFO+tCSrhqsj2yzyjyAu3lYCHnojyap85gAdfV9wu3l+x2V0R36INSvWAUbvuMvzydRprWogTmfVO+AI4uB+XF/JvxK4UHekMZRucHdkQhsQvdqPuwGurV95cl+LhUR3hPfjTN5lkFa78bUH97StdEdcOJC277h0bvgO24ty6RkQV5OtG5Pn0GIy19S8/OCeKofojlu47gjVT+4/EjZvdu9grnq1uVxAB1il1beEzRtBJJQICv1VMeKU93a0OzItbzq5k90RgLhl+XGCqy3ERdYrO0fftXnb2T3VqjfE5aigMbf3YANirN54co93XMjJT20rhWteP5Hrr/NbT+7xjoPMctOzJkqq6/Luk3u84+7vuGUBSzeBweoE3yPTm8Hm444LiA5gyMXuuJU56G3NR07uAXHVwwo5fgBTf1Xo2rjVnzq7r6yK1LwSr5HHHTdt9fy5k5/R7XLcJdX7FbeOy2dP7trPweQ57FRZx7r6+Mndq3ldEzrAY938ysl9uiQ1cJNVa2SO16X6tZP/dj8uDqJW2VfM/O/ftf7FmPkK3OMZ3MAu8G3T6ytiTTU7OK8jxMlfuN1idg/X91/9VUZ81WOVo8P+Bw+0DogP6NDPAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-up{transform:rotate(-90deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-left{transform:rotate(180deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-down{transform:rotate(90deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-left-up{transform:rotate(-135deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-right-up{transform:rotate(-45deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-left-down{transform:rotate(135deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-right-down{transform:rotate(45deg)}.jb-pro-container .jb-pro-ptz-bg-active.jb-pro-ptz-bg-active-show{visibility:visible;opacity:1}.jb-pro-container .jb-pro-ptz-control{position:absolute;left:53px;top:53px;width:50px;height:50px;background:#fff;border-radius:50%;transition:left .3s,top .3s}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-left{left:33px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-up{top:33px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-right{left:73px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-down{top:73px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-left-up{top:39px;left:39px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-left-down{left:39px;top:67px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-right-up{top:39px;left:67px}.jb-pro-container .jb-pro-ptz-control.jb-pro-ptz-control-right-down{top:67px;left:67px}.jb-pro-container .jb-pro-ptz-icon{position:relative}.jb-pro-container .jb-pro-ptz-icon:hover .icon-title-tips{visibility:visible;opacity:1}.jb-pro-container .jb-pro-ptz-btns{display:block;position:absolute;left:0;top:156px;width:156px;box-sizing:border-box;padding:0 30px}.jb-pro-container .jb-pro-ptz-btns .jb-pro-ptz-btn{display:flex;justify-content:space-between}.jb-pro-container .jb-pro-ptz-expand .jb-pro-ptz-expand-icon{display:inline-block;width:28px;height:28px;cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAANlBMVEVfX19fX19fX19fX19fX19fX19fX19HcExfX19fX19fX1/////Pz8+oqKjCwsKhoaHn5+eWlpaOqTaDAAAAC3RSTlP/3CaKxwJiAELtp4ri/s4AAACuSURBVCjPfZPREoUgCERXBdPRyv7/Z6/Z1aQp9oWJMyYLiKUrOIpAJBdGCldgbzBkPM/QEoTI3jBEPBRDhwEvChe08Q1Ge0ImvIq4Qj8ljrLdH77CyQPWlCdHC0Q1e9rmmuC+oQN9Q4LwcQg40L6eyqm0uEpXSUqe3fKpkkqL+Y/o+07SrahNEO0T0LBsvOitf4xsLqiNTB32wtqaVKosGLO2mhUrS93+PZ4D99wPqzMJVcbEyA8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-expand:hover .jb-pro-ptz-expand-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn////i4uLZ2dnIyMjExMS8vLy+iXNeAAAACnRSTlMAYomLxwEm9+NCLo6DKwAAALNJREFUKM99k9kWgyAMRIMmEMLm/39tKaVKFJkXl3sYJ4sAXeQ3ZOcYd0+gRYblFBuFLYoS2ot5lpvYn8zJQ65TO2GVNmdCmQq/qczw4gjpejD14BgmhziEIvCjVRlPioftHW6A7xBB1a8CCUMvsuSqEkPM7eZX6h8GrQ67bYpNIbRL6rb4/k2EfVXKsgmqfQrW9qnGq96a28jGQG1ky2HXpVysyYyeDIhWq7le6ua9P36HD6+2GRi8iBZBAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-narrow .jb-pro-ptz-narrow-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1/9/f2/v7/y8vLUObqxAAAADXRSTlMA3IrE6SZi9wI+y0gNXAn3CgAAAI5JREFUKM+Fk1kOwyAMBQ04bJHT3P+0JVUMNMWv8zvSk1cipfjAKXHwhR7k6KTjYp7dVuWLug1XWB5wz96T/JD2O3Phmv0k5ypL6lVVFIPYpLOka5WKSSFvS0/BloHYlkza5HkMzrvVLo8ZlRr7mtFYWBBsBQ4BjC//GTxcGVw2PpOVHQ6fJj7qS4936OoN2K4e5yE6N1UAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-narrow:hover .jb-pro-ptz-narrow-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcBAMAAACAI8KnAAAAJ1BMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn+/v7X19ckk9ihAAAACnRSTlMA9+NCAsuKJsRiPv/2GwAAAJlJREFUGNNjYAAC5gxFoTYDBijw1FoFBIumQHjsUavAYGkBmGu0CgqUwRqlYNyFIO2Fq+BAnIGBJQrBXerAwLkKCUxgYELmKjBYIXMXM2Qhc5cxdCFzVzBoIXMXMYAcsRsMdgEdgs4FKT4DBqdAitGMQrMIzRkojlRB9wKaB9G8z+CMGjgshjCuMCjoWNxRAxYt2KGRYgJiAQAnZcjElaB/xwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-aperture-far .jb-pro-ptz-aperture-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAASFBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////9fX1+kpKRzc3ODg4PFxcW1tbXW1tbk5OT29vaVlZVmZmZ8vCMFAAAADHRSTlMAxGJ5Mssm9+NCiYtiH91SAAABAklEQVQoz41T7Q6DIAyEJQooUL55/zddhVazzZjdHyqXXo8DhWCYTWqltNyN+MZLuxP69UGti/vAsl6c0e4L+tQ2yv1AEbvecMhO5cXdYhk+6aO3WGrNAMwentlMz/ZAKIlNoRsqY2wtFWu9t8wasc0iYVN0LkQfrG1zbxNyrIBcntOQrH1Ukkb60QcxYF1xMA2dh8zWj6ZDsLCsIrL4Ds5Hm9FMbCEROWUB0COaLXEIZJKV7CKybGO7UuxjxY2C/TkMbxboKBQCxgMN6MCJQ6Ch/QjOZg/B13LGx8FDTe3IFvl+Bc9XBi3UWoex68qeL/vxmdyxyvz3NJ8f9dDef36HN7koIK2LjxB0AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-aperture-far:hover .jb-pro-ptz-aperture-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAOVBMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn+/v6cnJzr6+u/v7+xsbGlpaXNzc3b29vqh7uRAAAAC3RSTlMAyRjKA59J/3PzPhe1wxwAAAD2SURBVCjPjZPrssMgCIR1mkYtisD7P+zBCyZpM5mzv5hs0M8VnZvaok9BlXzc3FXbO5z0vtifFC5Kn8OL4UfxwVvuHm61d5Z0b6ZGZZwZpQAUosWsjVZntVS1sH3ZFo1IRVYfGXgx+VGwNkkIVbhq9/jm3cAhaNv1Uk3IA8mNn7D3kbQeWK3TLH2jCthrDFcTMwUWaKiClc9mJtJWhS3SF5BpJqMQW1b3xwnkDahMoHYomkeJRgSENA/MFsKML7fgoCBVbGvM+Cx4JcKWbWHKK/h1ZYS1Jy/nK3u8bB3KhzG5deMxtfv3aO7/Heq+9ms8h9fxHP4AHzAWU9zlWNgAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-aperture-near .jb-pro-ptz-aperture-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAQlBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////9fX1+FhYWbm5vz8/Nzc3OwsLDi4uLDw8PW1tZmZmYgm6a+AAAAC3RSTlMAYmOLx4kn9+NCIVJiPGAAAAD+SURBVCjPjVPttoMgDMOJAqOU8uH7v+qKFN2c597lF5LTJg1VqQG3aGuM1bNTV0wWDtjpg3pq+IB+npyzcIE9ejsDXzDCrjccs+tOariF3n2OLyw5xko0vh9MDjNb9Q0hp2GK3cixlIApe4/JD9appR8SFxWAUFLg6n63iB1irnY1Jv0mlrok7nUdcZRa1YeshxBA9iijChlxI6iZEaBgSEL2tkRcymPGGJpqlbZ6uDg0WR/F0DwuMpxDkYwiIXA8hO2uMJdGCCK6teB8RQoY8xGfevQjxYQt25qoRwDT25MRBjZ7GtP/P/afa3LHmrflXa+ruf661Hvv+et3eAF6Fh3v+sSUGgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-aperture-near:hover .jb-pro-ptz-aperture-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEWZmZmZmZmZmZmZmZmZmZmZmZmZmZlHcEyZmZmZmZn///+qqqq9vb3z8/PMzMzo6Oja2tpXGg+mAAAACnRSTlP/JomLxwJiAONCr+rW2wAAAOtJREFUKM99U9sWhCAInEpLBS///7WLEWy7p9O8qEzCMBIOQ15DAlLYsoegS9yFMKQ93skl4Adh+ZI54Q8pG5nxgKzkgkcsk4zhmQxRyN1OPHqtncjOu5AuppcJ6s1EHTA1YzC3Wgq3YmzGqpsmlwZAo7F8oLEVKoeE6+TbSxK0JJ/3FLOwFnUxzXuoltYDDMLoAlmYXLAWIrkqbdZKs+q4KBfkNV1uwGaBim9TdLWS3R7iGRvCNTPB7JvGlc5EXK8cKbrxooint73RzXh7Msl6Oj/uT/b62O9j8sj6gMXX0Xwf6jP3Zr9DtNAHTYMMXrXSK0YAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-focus-far .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAPFBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX1////92dnbs7OyFhYWjo6Pe3t7Ly8uxsbG8vLyG+Q0EAAAAC3RSTlMAiWJjx9wm/0Lti7mfpe0AAADaSURBVCjPfVMJDoQgDERFC/bg8P9/XUSO6CqTqA0TptNDpSrMpC2A1btRT8wrNKzzjdo03KC3zhkLD9imbeAFhd3sG2kvZQ2v0NknfGBJZKkhBM9MxOxDKBV1N4iHi0TRHYjN01Qi7/kK2PtyNDU7DAEJgDAAN0u1jsQEFEkcVVmrqjeXrkWRmC67eqbgG7bJyvkQSQkvUvec7szpek6t9ubWJSK/uJVSm+APzHKCh++DWWuH4plQKNYOpfappcjy2VvJn9744cjGwx6uyXjBxqs5Xuqsvf/9Dj8rLhRg+bQ5VAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-focus-far:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAOVBMVEWZmZmZmZmZmZmZmZmZmZmZmZmZmZlHcEyZmZmZmZmZmZn///+xsbGoqKjt7e309PTExMTQ0NDe3t774OlGAAAAC3RSTlP/itxixwImAELtp8B2gZgAAADmSURBVCjPjZMLjsUgCEVpq60G8Lf/xQ62gvNeOmZuUiWeKHC1cKnC5iJAdFuwJXgmf+xg2g//G54OPuTOCUOEL8WgMMCLwgPP+Abj2aF38CrnBR7whw6Bo4fWUk7MMrQ2OrpAq0GspTLLgKg1wTailNITZA0EaTkZGjIAY5NwlATah5CGRMJYj50tFtlWiapsLvAPRdtL/WOmET7QzZyl5ywzp7NWsjBJ1odsragJqeJ9HGFNZoLaJw71hMTm0O7NeDE1Z6YsU5rGL69sedmXXz0ToW8PzA/oV09T8OJR32fb7+B17Qe3WwtC9PVbHAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-focus-near .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAARVBMVEVHcExfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX1/////t7e2dnZ3W1tbGxsa3t7eDg4Oqqqri4uKTk5NImu/5AAAADXRSTlMAYieJ3MvE/0Lti4oh87zNagAAAOtJREFUKM+NU1sOwyAMY30FtoWS8Lj/UZe2gWpVh2aJH1wcO0mNqbDj4gDc8rLmiscEDdPji3rP8IX5fXLWwQWuaVu4gbKDuyPdsJMz3GLefcIPbJ6PDCEAFDlUAJiORM3NigQFAXAFlqOeRhWJyFFIHxNGvRrN0mp470U++3axGM2RAmXcXqKnkDSN0a9WIk5Sa01MpDXBQAdVtrA8lBhFnnKpsmoo5VBrhszV0KuJ5N2tP92O50iQjpzcctravoihdoi0Q1NrfN56m0VWzFBoje+OrD/s7pr0F0yUr6s5/LvUu/bz+B2ep+IHdMIV2SUZfCsAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-focus-near:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAQlBMVEVHcEyZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZn////c3Nz09PTp6enR0dHFxcW7u7uwsLAUKT0cAAAADXRSTlMA3IrE6WIm9wI+y0gNQZpqdwAAAOdJREFUKM99U9GShCAMQ8BF3Cmlpfz/r15dAe88l8zwQiQkoRrTEa3zIXhno7lhWxcYWNbtN/fa4Q/218VFDzf4of0O8A/h3TQfOGU/ytsOj9gPVyt8warkmYEQQAgABYDxTKROz88koS6AVIB1fRCNbSI1cVUy15Jq27LGjTtyzipPeWw40/IXQkrHyZSRmqw3LaQgctFNKYzYyGACfEXossLMojFEj7J0WfdwJ3dD9uY2X25tL0Hj45mTR87Y66u9IQFsDS1bL57o7JbUDNIofvpk08eej8kTe3Hz0ZwP9UFfv8OgfgBUByCEUZhYtAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-cruise-play .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJWSURBVHgBtZe/b9pAFMefbSYWMjCjdOtmYEYqXVC3umMlBFRiT7qxkexITcdKSDUSYna2iqX+E/DG6LCQgcETUiR+5Pv8I3Kc+McF5ysZ3x2++9x79/zuLFEG9Xq9s/1+r8my/AnVJq4z/2LZfB0Oh1tFUQxd1+208aQ0GAa7kCTpMgRJk4kJXk+nU5NEoe12W8PM/wrAotIx2Z+w3MkE7XQ6Q3S4otNlY5zPUZdL7wiMBUsRIK/fDeWvhQ92XS0HrQia83cCsqoIyMug8gQ9Ho/DpF7FYpEajQa9VTBoyIZxWeEfv6IndSqVSjQYDKhcLtNqtaLtdkuigmGSZVn/XKiqqr9wqyZ1YEtbrRZVKhX3zvX1ei0Eh7Ufa7Xan8C9VRIUg9lyQZfzO19VOOugkBpAgaXRtnq97oLZ5ZvNJm0YQkBZ8m63E7YyKl5ntrrf77vlJCF/qzLlKLZ4NBqRpmmuF2LBlLOyBFYBchDKlIeWyyWNx+PUtS2Qtx+eJA6i2WzmQtMEA+8KnA+73a6N+jkJil1pGAbN5/PMfRBIZsGn3+LFvSABMYiBgpnJgZEeFHQD4EzQrOsWI4N/nrY2uPg/eeefV8WvAKfALOsWJ3jzA++rcqjhB25OXAd244nA62AjV4LGxWLhIBk/oPiF8pc9mUy+BZVnyQEzueEZUb5yjyvhBiX6BCw2YTGvdZNyAkYPZsprT/rgO/K2vDcdQQH7jes7gPcv/kvqyCcKbEVX6PxVAG76QWPGPZAIDcEZqGECTQyokpe9wp8VfNqzyA2L9M+KRzm19l1i6ZQBAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-cruise-play:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAJ5SURBVHgBtZe7buJAFIYPjsVFAok3wBUlYcUDLNvQISUSDVVCA0IUYZ8gmzcgBeIiJLwdFau8QToaQKygovI20CJBARKX/Y/jICPAF3B+yRpjZvzNOWfOzLGLLKrZbAaXy+WdKIq32+1WcrlcQe0vZb1e/8XvQT6ff7fyLpdZh0qlEr+5uXne7XZxMpciCIKMSfzGBBSyCwVMAqxpEXYEhzdeAJYtQ2u12h2aJq4gXadSLpf7aQptNBoPm81GJofEsc5ms9/0zwT9j3K5HHUSyEJ4ovV6vXkSyjHEyvxDXyCAHxGy4hEUq+4JjWQ02O/30xV65rTbQ9lKNEWjEYFAgFKpFMViMbpQnOfFPRSKWxnldrtVaDqdpnA4THalefMDinx8sDOYrY7H45RIJOy6PMibjch3F24AJEmSeo3HY+p2u7RYLEzHwNqogOUcpSvFrk4mk5Zcjry9FZCX1+46qj5dzvEOhUKGfQVyWAyPRCLqojsnEYtohpiSE5rP59TpdEhRFMN+Itw7Q3DpGq1WKxqNRurF90YC75+gnXszulBsVbvdpl6vZwpkwasDNWVw9r3BWlu5Op1OVdBkMrEzTD11RO1exmUJytb0+30aDodkV7DyjT2rBpNrG8zg3WwQW9ZqtS4CatASt/sVhAC/GA3glWk1bqcEo+TPwm0P5QeYySt9jRS9UQe54vF4fqEZkMNCdXivrw4PoJlMZoad5IeDYE7F+0KhcPC+syVotVotIQ5PdLm4CD8CGkJZfAIhzlw3SWRdM+T9q9frLbHnTnUwrfBZfPCiecQG8v3MBHj/HvAm4/P55HMwW1C9tG8a/RmsGH1CnNJ/17UakVMOx7kAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-cruise-pause .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAHySURBVHgBxZc7bsJAEIbHdprQJAU1ckln3FM4J4jTIkSMRB9uQDhBlBPECIk2yQ1MSeeIxg0KZQoKKpSCR/4xtsXTNmA7v2ThHe/ut7M7O7sIFEOGYdzO5/OSJEn3KGp4ZDy33ucxP6vVqo86H71ez47qT4iCLZfLJ0EQmhuQKNlo89rtdk06FVqtVjV49kZrr86RicG2TdMcx4LWarUWGjzT5Rqjn7tdsJAi8Ch4C4op1TGl75S8GKwCPOWC6FsRNDKAL5SOZER30HcAhbFFEUFTLBapXC5v2fL5/J7tiOCXofHLlVfikRhRrSqVChUKBXIchyaTiWtrNBruYLjM9jB5jlmup4vFQqMYyuVydKE03vsuVBTFR8pIcFD317REGQlRXBJ5PSl+iktCskgZC57eZA5l/Q/Uy4lTykjYq1++p5EHb1LC9rRdKA7dT8pO64yERG/SmVM8m81OqW7yckr8Ztv2r6Io1whnLawF59fhcLiVY0ejkWsfDAYUJfRfB+snOE85J2KRvym9RGF2Op06vwRbhg9YHgmlIz7E235B2vwC1x1VVdl7jZLT3nVF2q0BsJUg+ODFTDpU0wP3PfC5a2wB+BD7CuqLgws/TQQYn7cyxYfxfdc6ViEUujMAHUlER4cKHfhbATvPjBUG8/UH1xXJDxHoYGQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-cruise-pause:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAH/SURBVHgBxVY7bsJAEJ01CAkJKUhUULmiDSnpoKYINyBuQIgi3AA4QZQKIQq4QaChhhuQCxAXSERUSDSIb944axSS+CPA5kn27o7X+2Z2dz6CXKDT6URXq1UqGAw+Hg6HDB4V4qj8rAsh9N1uN9rv971KpTJ2Wk84kW2322csVv1BYr+gEGMo8Foul7uWc6w+NJvNjKIoHXRVOgMg74K8AXLdFWm73a7BujpdDh3rZH8TCw8JLYlPSFutVh7NG10feigUetA0bcEDxZTiDFU0L+QN1M1mc1z7SBoIBGrkcGkSiQQlk8kTWSQS+SP7D3CzJ76c3A/yi61kodOP6XSaYrEYzWYzWi6XhiybzVI8HjfGLLeDNGxoWpohF8C50CXgwMK+r0gNCuQTENnyitQgRT4BQSOlyFvrKsRdCapC/uPuFqR0G1IZExfkH94NSzkHkk+Ap4wNUiTqPvmH74gUDoe7dOYWr9dr13M5sfNxBnjQ7/dXuVwuDGHG7ieOr9Pp9CTGzudzQz6ZTMgJ2FFtMBh8HvMpx0Ro/UEeBQq2slgsatw/uoxMsBp5A64WG+bgxE9LpVIPpUWDrgv7csUE4nEdlWCNPCC0JJXEF5Wg8MchHs11CWpCVvZVkBfckksyrneHVnMEuQRXitiqPBS4lwpEJYmORkc7Qju0IzPxBZ2t+3mW/JtqAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-fog-open .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKgSURBVHgBtZe/jtpAEMYH28WJioIa+URDF8MTkAalO6cH4YIiFbk8QXS8QO6oUlCAkGjDtTRHJBoa4nQ0KBZdJApoEAV/Mp9jkAF7bXPcJ5ndtdf725nZWdYxiijDMBKr1SqhKIqKNpdms9mcRxkjFqZTsVjMy7J8x1WdL9WjC6D97Xb73G63m0HjxULAvnI1T+FlMfxBBPeEwoW73Q6we7pcViwWe8+utwKhDFQZ+IOrGr1eAH9ksOkLdSz8Rd5xu1RzBmfdFkvupwz8dmUgBENeYNAZtFQqGVwY9DZSnTVi6+Decrn8h0JYWSgUKJfLHdrL5ZKm0ykNBgOazWbCd9nNt3CzgoZjpUohlEqlKJPJHN3DJHRdp16vR51Ox/ddTiVkw70NlSTp7rRDMpmkWq1G4/HYvmANSpHghXg8To1Gw/M5W1oGVEZD07TvXNy4O8Btw+GQFouFbV06nabRaGRbhbaf8AzvTiYTr8c32Wz2p8KrSuMgJ7x6IEa4AIuivau9tNlsNGm9XqsBY9gxhOvCCi728wa7OCHhRzQAZl2pVGyXRZEoBAoFCDGs1+v2QooiUfpIHE+LBEL+VatVezVfDcp/whYJhAWBVHFvCEFCfz8op6cpORuxJRokajz98tSRae+97OJnUS/RanQLkwNQ4FrzsA2yyU0Gf/br2e12A90LlwYAkS5Pdrm/wRs+/rh1ChAshuV7wTqAQoTAarVat6gorll8YWvzXBXmbdTUcY3/sK/L+4ppmnPeF/9SCGsvAXIsH8+gDthkMFyepyuJgS0GHh3w5NNOzO0zeMHVD/R64BMDP53d93vBORW+0GVnpvmpS0NBXXDDSacwR9K5kxaPok+NUJ8VDlzlQucJvKNj63G2/U3/E78fZqx/rk0w4ggu8jUAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-fog-open:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAdCAYAAABWk2cPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAK2SURBVHgBtVa9jtpAEB58/EqArqCBBqehorgTVDQxPVJOiD5QAEJUeYLjniBcgRACKeQJQsQDBBoqkIigookraC1BwT+ZcQBBsNd7Ovgk2LV3vd/M7PyZgBPlclnc7XZPFovFv91uRZPJdL9fktfr9W987udyuRbPWSajDUgm3d3dPSOhBMaQUaAXu93eSKVSCryVtFQqPaBWXznJNMlR8zo3aa1W+7zZbIo4vYd3QBCEQjqdfjEkrVarzyhlAa4EvOt6JpNJ6ZJWKpUnHH7A9VHMZrNfLkjJO9Ecv3Aqwg2A1osevFs4vCQP5SF0Op3g9XrPflar1egzut9vCNVHzPS3j8EkcCAcDkMgELh4PxqNoNvtwmw20/tUXC6XSRyLqqZ7LS80CgaDqiY8IEESiQSIoqi7B53qE40qqVYsolTgdrshEokAeh9IkgRGIDPTPhJYC8SD4eg3k52RQNQi7XQ66txms+kepEUcjUah2Wxqrq9Wq6h5Pp8/4CUzD1osFuqPFwfnIsE1IBKbyDqANIzFYhCPx+EtYPmCGQxAppJlGQaDAVwLaFlBgRtAx7T/SNGNZWCg1WqpoeP3+4EX0+kUJpOJNiEqKWA49HGusA6gwPd4PMCLXq+nu4bpsK+6LVV9YMDlcqnkPKD7JyF1oFD+PSSHV9ZB4/EYQqEQGGE4HEK73dZdR+Ua6nh4gWXtD3AkfCL3+XzHZ4pfyrekIQnHApr2A2oqn4YM1TvDWkr3xbozPVAxJ0KaH1MRFllSvQG3gYztz7FtOct/mLqorZDhulD2BVzWJKW2kTZckVjBnviM8IKUQBtQ40ck/w7vAIUhnvGYz+cvwpHZbGNHkcQMwtXGnICs9YrCF/Q2GHb4e3IJBxLgo44ACsY6afbT4XDUWd09N+kpqOhTDT55Jf9/Z0b4C/UJLQCcLGi1AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-fog-close .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIjSURBVHgBtZe9UsJAEMc3l1Q0WvAA2NEp1MyInVbGnoE8AVrSqW+gT2CY4QGwpTEFNcaOEqksKKiYcYYP/xsSJoRwx8f5n7nRu9u73+7lbu8waAc5jnM6m81sIcQlqhcoOZTTsHvAZT6fv5um2XZdd6Caz1DBMNm9YRgPMYhKHhx8brVaHu0LrVQqNjx/2wOWlAtnn9MiT4VWq9VHDHii4zXAPFdJsPGPwK1gIwHk7/dC+sXgAsBjroioFZsmpznCuHKLxeIxqqwirdVqvGmcbaOy2SyVSqW1tuFwGJTRaES7CEGd8TJbXOEo4YkjG8BQ27ZT+7rdLrXbbSUcx4+P3oOIVQ4Wr0Cj0aBMJiO1Q6Q1PvsirFzSkeKVqNfrKjM+8xeCybRMbUcrn88HRSasqs2R5kijisWitB+reiKm0+mhaS5VvMwqCdIs1WYKoJZljUmj+NwqobS8D7Wp1+tJ+5EPvkWYD33SIE4S/X5faoOHgCdC+jsdKc5GnJUUGiNIzwrpbjwh76tOpxMAJ5OJyjTwKp7wP/CnvM06LeFzdPwNd4AFihL+Chom/U86/HmiAr4CGOR4M2r0fX9cKBR+8e816deg2WzeRJW15ABPXvgxRXoVPFfiDWbSAhF7iJiXvUyagMmHmZlmGYK/aXn7HPSNAWui3AH4s9EnG8ibiy94DL6l3W8jL3zvetsMpNCEAw4cKGPCc9r8WeGj/YuBMlikP+yn3EGZYjlWAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-fog-close:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAI5SURBVHgBxZZLjtpAEIbLjUFih8QFnBUrJCIOEHOCROIACStALBhOMMwJMlkgBCyYnCDMCUJWrJCQYB+zBwkJFiBe+QvZyEz86IEezSc1dj/w76pyV5dGEnS73cR6vf4SiUQ+HY9HE0MJu5GmaSNcFrvd7hn3vXK5bIU9TwsTw8Oqh8PhzhGRoIf1tSBxX9F2u12FVfVXiL3ksVgs1khWtNVqfcfljm7HgtW5l1Zrbyh4Fo7FYh8LhcLCGRDu2U6nc69YkDG22+0v98DZ0mazaQgh/tLbUUOMHy9E8eH8treDJ8lkkgzDuBibz+c0m81otVqRBAu4+QO7WecerDSDBB3RbDbrOTcej2kwGFAIvNc5dPVTTLHpv9INpNNpyufzBEsC1yF81dOVf8KslCHIEy4SjUYjIxDLDDoGKYAtDrNW13VT7Pf7azOOJ6lUKnAeySLB7jVIIezmMAS9A/igxIIUwns3VBQ+HpFCLMsKnGcjhX0CKLF2MpnQcrkMXIPzuX+KKax9phthtw6Hw7BlVqVSGel25wntqqy02WxOFnLj+xB6/HNTwmdXTqdTGTHmfKA7lhKSxAOCbPr9g90n82X6AcGfTgVxUTngtKlD+J4UAw/2S6VSzulfJAe8SZ3fiNRiQbTgHvgvI0H4Gxb9IAVwTexVmHmmQbiCD1suHy26En7xaDSa86p/A4ttrpuIT3ohpLcTxw/tAWJ9vzUaSWCLm3DXZzS+z7hELFzYjX/i8fiTu9T04x9LgQk+PbvDKQAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-wiper-open .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALxSURBVHgBtVYrrBpBFJ0FFAqBqCIrUXRBk5QaUleewBBIlwSDoW1CUlzz0CSlaJJHA8FgqMBg4CWIKkpRuEfQCDAYAvSeYYfsLgss6fYkk5ndmXvP/c1HYjaQTqdjbrf7PQ0VarLWgBW1Cdput3tutVrdW7qka5OZTEZ1uVwfaBhj9jDf7/ePzWazwe4hVFVVPhwOT3cQnRFLkvS20WjMzRMuCzKFyH7/AxkAg18oQp/ME24LsgENfcwBkJfvQqHQejqd/jr905HJGpnMHIYW3iHGp5AS2df/QabpfiKHfCdCVCN1qh1hv9/PIpEIi0ajLBgMskAgcDZfKBTMYjJVL8+nh7MeS/8ioFiQbDYbtlgseA/lXq+Xt9lsxrrdLkulUmw8Hp/poLB+JC+rkpa7FysiKEokEpyo3+/zBiIrr2EU1kKmWCxariMvsy46IRJWZFBSLpf5GApgvZUSYLlcstFoxMfwHnKQN4Mi+cYdDoe/IGpmslKpxJV0Oh223W7ZLcTjcb6uVqtxLxFayJtkfSga2Sycy+X4YnhlBzAQhGI9euTRqnhAaNjkKA5Unl0yALlD0SC0Au12m/fIvx5nRxsEYV2lUrHMgxmiYMwGwmiE1qzDrSiKSv0r8QMxF2Wdz+fZer3mhXAJCP9gMOCGAiBJJpM8h6jqXq9nWO+hLfGH9ohiVoTFIEbxwFqECMoQInwLy4V3mEMe0SB7YWtMJJzoVK7fLnkgKg65BVBM8Bj5gjHwDORoGNfrdUMu9SDnfl7d+HqAEArFCYNQYoxtAODfJSIBimTWpV2Swxt8PLwiRAgjGrwXuEVGmBNXw6MxP5KXMWYTCKs4U+2COH6g59tCu6uG7A7AYxteCcypVU+EmgVZbcJxkO4HcmplIEQuMcGOTz8nyT6T7on4Npw0mMBzgDnkqUZWNfyzWujQM/FB79lVQh2xeudbZ0VE36mvipzdRagjjtFtnSBlr9nxuS9uGCidk1HPdFp1xcvsGv4CcbeEIeSIw9MAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-wiper-open:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAM0SURBVHgBtVa/SyNREJ7dBLVQELU4bdwrtFJOUCxsXEG0Ue4OK6tLKhEb/QsO/4LzChVtvGvE0sPOxtiYJuFyJBBICtOlSSAQCEnIj5tvyC676ybZYPLB4y373ptv5puZt6uQB1xeXup+v/9zs9lc4qHxK621VFAUJYbRaDSeDw4O7rvZUroQBXw+3zcm0ckbMkx8enh4+It6IWQijYlueiByI95g4oxzQXW+OD8/X1JV9e87yACNbbxeXV0dOxcUJxnn6okfx6l/OOHcnr0hhIzsFcg06jNa8obwbErKOfs+CDIhUdUbxrhJiGrknAW8HB4bGyNN02h+fp6mp6dpcnLStj46OkpbW1vOY1q5XJZ8iqTX19dPnYpkZmZGSObm5qharVI+n5cZ5ENDQzKy2SxFIhFaW1ujTCZDqVTKaabA+z4qrdy9uhHB0PLyskSTSCRkVCoV16gRLfYODw/T7e2tOOQE5zKocmRf3Mggzd7eHvEtQnd3dxSNRl3JgGKxaEaE6HEO553gOllXuQ3W3ch2d3fFyMvLS1siKxYXF0XWh4cHOYfzUMgKpE1t3Y026LouhxCVF8DBhYUFcz9m5HF7e9u5VUOV2pp8dnaWpqamPJMBKysrEh2kNRAOh2VG/q14c7XhILzb3993zYMT2IOCcTo4MTEhkqKgrPCx1gGePxgv6vW6EKJYNjc3qVQqSSG0A+RPJpPiKACS1dVVaQ9UdSwWs+33c6n+47ZYchqKx+NCvLOzI80NiWAMEkFyeM75lx5FdFhD4SCXIEJluxRbTLm4uDjmcv3RLgIYgrfILZBOpymXy0m+UImIDLLCATyHQiFbLq1gB/90bHwrcNPAILwGAaREcz8+Pso6CNsRGZDGx0eS8xXqRgh5DYkgIwZuFQPdyGACfwJ+PHGhnHKUOnkEetS4U72Co/uNWdoC3yovUVqBiD1EZW4fGRk5MwkBjjKIBRoAarXa12AwWLARIpdY4McC9RcnR0dHZjPabhosMOkG9S9S2/8MMLDfRKhljawjoYU4wNXby79OgavxJwrEyFlPhBZinasYH+pPPOMaNL4wMJphJZ553Bt/Zp3wHwTYnvHjbDCuAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-wiper-close .jb-pro-ptz-focus-icon{display:inline-block;width:28px;height:28px;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANOSURBVHgBtVc9TCJBFB52r7jYyCXWnhcbO1aru8RErjGXWBxX2BijGG1svNhJo56VhQU2ViQsgdDQYEFDc5rQ0BDoaMgRGhoKaMhdCHDve+6QZVhgMfglm9mdn/e9v3kz6xEusL+/79c0bcvj8fjpc8V6gCY9VXqK3W73MZFIpN3I80wj03X9il79wh2q/X7fJAXvTdNszkQaDAZXaHF0BrIRcvLKERE/OQ3qYwh/06shXg8vRPl8PlEqlZ4nktoIV8QcgBxwItbfitBOvL6+XioWi2XZp8kXIryaN6FNdpSM8spvthRWUmPaJ25vb4vV1VVRqVSGBCwtLYm1tTUeW1hY4KfVak2hFe+J+B+5+QkfnL2Hh4fI1KAq/OLiQlxeXorl5WWxsbEhNjc3RbvdFrVajVvMkcTlclmk02nRaDTGETfJ1Z+wlTxWLP84zQoEAkwEodlslh+QqZDWY36hUGByp3m9Xu88Ho+HNaokfidCCAIh2kgkMlYQAOtyuZy4vb1lBW9ubnidCioa37klkw0nQrgWgpLJJMfXDUAOBbEO66GAAkOS+tSRk5MTXgjr4FIAMXULrIObz87O1CHv8fHxR03thXAkDhbahezt7TlpzkA8sc7uUngIQIhUgNRr70AWQsu7u7uBEPTBdaqboQTcCIUgXL4DUBzjTrHVDcP4BmVlR6fTYVLg9PSU9yC2CIghEG7HHIC2GluJOGYyGR6DYiDCGEKD/iErNS2sU238QnH9rGqDopDP5zm+EIJ3aL6zs8NEUAKCQSiVwxp4BFaHQqGRwkJoRqPRkEZ7tCjGAAJQHED28PDAVkirsX1kUcAc7FEXWc5c7+iQTltnpyMgHNYgUSSZBL5BhqTBHkVMAZnxKsijMbQ6Vf+/FFe/mFLs6/X6IJZ20t3dXXb34uIihwFuTqVSI3Mt0nPia3LtpVLot461V0FWLiiBZwzMWCx2xOSy5+DgIEya/BRvA1xfvlKxr+JjUBwola/Fy81u7iDCX5JwiJSPHNJm3sQWoTnUp06a57XFIrxW+0dug8guutM8EvEHpxPIJRDDH6qFA2UmrSSrg0SO5HJLjhDdUxue+bLtQG7QqR8ggVvC4beCFHumRMSxVJxEJvEfnFm91YrgD/sAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%;cursor:pointer}.jb-pro-container .jb-pro-ptz-wiper-close:hover .jb-pro-ptz-focus-icon{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAcCAYAAACdz7SqAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAANwSURBVHgBtZa/SyNBFMffboJaKAS10SZ7hXqFegGbCyjmUPTAH3eHlZWmULG6u/Kqi/9BLEQRIdoKigf2l1Q2ChGtBLmtFAQloPgL1HvfRyZuJhuzBvOFzezOj/eZee/NZAzyoMXFxYjf7+99enqK8GNxlZVtyhiGYXOZ5vo/MzMzW17sGaVgPp/vN2DkTbZpmqs8wfloNJqh10AZZjEs8QpYAfzx8TE6Ozub9AQFkGf7l55dWLbYTmxqamruRehbAl8CG5UEOvTNmWSmekHCVAgIJVgB9eHHD1bJSTPp7NXe3k68Hejg4CBvdF1dHTU0NFBVVRVdXl7S/f09nZ+fl2BS4Pb29geXMXyIe5eXlxM6FMaHh4dpY2ODGhsbybIsamlpyUFQog/geE5PT2l3d5eurq6KgTPc7x22kpGN5T+3Xl1dXdTa2ipGDw8P5bm7uyvoB3hTU5P0t22b9vb2ZFIu+smxjSOmEbfW2tpaAcJgMpkUQ25ACG4+Ojqi7e1tqq6uprGxMRmvi8P1BaXJLyE34MjIiBja2dmhzs5O8iLAMUGMw3h4yCkOobDYs+YHfXAkEpGBWJ1KJMTUqzAObh4cHNSbAisrK0FTrw0Gg5I4GKiEBAmHwwUzV2pubpZJOV0KD0EIkS6TlxxwViALMcvx8fGcEdQhKzs6OvIGYxLIcEwIxuFSvEP19fXSjpzQ5RsdHf3M5XtV8fDwIFDs0f7+frq+vpYtAjAMwu3oA/X09MgqEcf9/X1pQ/wBQhuyPZ1O56/SNOO+oaGhMAM+6rM5Ozuj4+NjiS+M4B2ZGQqFBHRyckLd3d2USqWor6+Pbm5uZAySqa2tjdbX1+VbU2Z6evoX3JumIoIBHA6ATUxMyCl1cXEhQOxD1ON9c3NT9qjufl2K5a+pqdliA4liHWEc7kOiwMXOvYpvwJA02KOILwS3FoGuoTTlWDKMJJUQ4qwfDmoyAwMDkkiYIBIOsS2iJH7k7MW1JPu3VpbUyYWVw91u4oWtcjyjOSi0tLQU54bvVBnh+vKJry82PnKHAydFDI1UATFwTgHzoIgtZvPW4Cxw1VlX0YtZFhjT6wvOXrgBK+ZnjcqXimHMrbHUZXuSV43kCpE3IUTzvPfjr75s61pYWAgx/Ctndy9/WlxaCsKPzZs+xc8Ww9IvwZT+A8hTw5fcMmXrAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-ptz-arrow{cursor:pointer;position:absolute;width:0;height:0}.jb-pro-container .jb-pro-ptz-arrow-up{left:71px;top:15px;border:7px solid transparent;border-bottom:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-right{top:71px;right:15px;border:7px solid transparent;border-left:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-left{left:15px;top:71px;border:7px solid transparent;border-right:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-down{left:71px;bottom:15px;border:7px solid transparent;border-top:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-left-up{transform:rotate(45deg);left:32px;top:33px;border:7px solid transparent;border-right:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-right-up{transform:rotate(-45deg);right:32px;top:33px;border:7px solid transparent;border-left:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-left-down{transform:rotate(45deg);left:32px;bottom:33px;border:7px solid transparent;border-top:10px solid #fff}.jb-pro-container .jb-pro-ptz-arrow-right-down{transform:rotate(-45deg);right:32px;bottom:33px;border:7px solid transparent;border-top:10px solid #fff}.jb-pro-container .jb-pro-loading-bg{display:none}.jb-pro-container .jb-pro-loading-bg,.jb-pro-container .jb-pro-poster{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;height:100%;width:100%;background-position:50%;background-repeat:no-repeat;background-size:contain;pointer-events:none}.jb-pro-container .jb-pro-play-big{position:absolute;display:none;height:100%;width:100%;z-index:11;background:rgba(0,0,0,.4)}.jb-pro-container .jb-pro-play-big:after{cursor:pointer;content:"";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;width:48px;height:48px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzMzMzMzMzNzc3MzMzPz8/Nzc3MzMzMzMzMzMzMzMzLVn6fAAAACnRSTlMA+duduRUwSGSD8toSsAAAAI9JREFUOMvV07ENgzAQhWG3lLSp6MwCViYIRSpG8AiM4FWMaPymDBKESMF/cQ0S136F353vnLuo3gp1kOYEoCXW4LFKIZAnqAXYICeASoAdzgG+cApwgF4EfwF+oDkCqIwA6gnyAKA8AaizQhsBAjzuqUHofInGIQbjRxXjMrTJuHDestR4Bng4eGrN0929PqNfzC6h06weAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:50%}.jb-pro-container .jb-pro-play-big:hover:after{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEz///////////////////////////////////////////8Uel1nAAAAC3RSTlMA+rbVFUecgC7rYhEEz+4AAACbSURBVDjL1dMhDsJAEIXhdeiGpKYWQVKDWc8ReojFc4ReAlPFFQazad7lIGkb0jK/WEPSsZ+YN5mZEP5UrZIP0vgE0Kv3oPlIJlAk8AJM4ASYwAkww2+ABfQg0ImgugPYsfNBVl99kA0AsjOArAPQpRTGHiBB8whxM0y+3skXNltsvMYriIWrpWPA80mFJ5qL3gAfB1/tcAt7rzdiV+HEgs1oBgAAAABJRU5ErkJggg==")}.jb-pro-container .jb-pro-recording{display:none;position:absolute;box-sizing:border-box;left:50%;top:0;padding:0 3px;transform:translateX(-50%);justify-content:space-around;align-items:center;width:101px;height:20px;background:#000;opacity:1;border-radius:0 0 8px 8px;z-index:1}.jb-pro-container .jb-pro-recording .jb-pro-recording-red-point{width:8px;height:8px;background:#ff1f1f;border-radius:50%;-webkit-animation:magentaPulse 1s linear infinite;animation:magentaPulse 1s linear infinite}.jb-pro-container .jb-pro-recording .jb-pro-recording-time{font-size:14px;font-weight:500;color:#ddd}.jb-pro-container .jb-pro-recording .jb-pro-recording-stop{height:100%}.jb-pro-container .jb-pro-recording .jb-pro-icon-recordStop{width:16px;height:16px;cursor:pointer}.jb-pro-container .jb-pro-zoom-controls{display:none;position:absolute;box-sizing:border-box;left:50%;top:0;padding:0 3px;transform:translateX(-50%);justify-content:space-around;align-items:center;width:156px;height:30px;background:#000;opacity:1;border-radius:0 0 8px 8px;z-index:1}.jb-pro-container .jb-pro-zoom-controls .jb-pro-icon{vertical-align:top}.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-narrow{width:16px;height:16px;cursor:pointer}.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-tips{font-size:14px;font-weight:500;color:#ddd}.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-expand,.jb-pro-container .jb-pro-zoom-controls .jb-pro-zoom-stop2{width:16px;height:16px;cursor:pointer}.jb-pro-container .jb-pro-loading{display:none;flex-direction:column;justify-content:center;align-items:center;position:absolute;z-index:20;left:0;top:0;right:0;bottom:0;width:100%;height:100%;pointer-events:none}.jb-pro-container .jb-pro-loading-text{line-height:20px;font-size:13px;color:#fff;margin-top:10px}.jb-pro-container .jb-pro-controls{background-color:#161616;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;position:absolute;z-index:40;left:0;right:0;bottom:0;height:38px;width:100%;padding-left:13px;padding-right:13px;font-size:14px;color:#fff;opacity:0;visibility:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jb-pro-container .jb-pro-controls.jb-pro-controls-small{height:30px;padding-left:8px;padding-right:8px}.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-controls-item{padding:0 5px}.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-icon{width:14px;height:14px}.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-menu-icon-text,.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-quality-icon-text,.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-scale-icon-text,.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-speed-icon-text{font-size:12px}.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-menu-item,.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-quality-menu-item,.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-scale-menu-item,.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-speed-menu-item{font-size:12px;text-align:center;width:40px}.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-volume-panel,.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-volume-panel-text,.jb-pro-container .jb-pro-controls.jb-pro-controls-small .jb-pro-volume-panel-wrap{width:40px}.jb-pro-container .jb-pro-controls .jb-pro-controls-item{position:relative;display:flex;justify-content:center;padding:0 8px}.jb-pro-container .jb-pro-controls .jb-pro-controls-item:hover .icon-title-tips{visibility:visible;opacity:1}.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-face,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-face-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-fullscreen,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-fullscreen-exit,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-icon-audio,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-microphone-close,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-object,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-object-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-occlusion,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-occlusion-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-pause,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-performance,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-performance-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-play,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-ptz,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-ptz-active,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-quality-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-record,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-record-stop,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-scale-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-screenshot,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-speed-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-template-menu,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-volume,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-zoom,.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-zoom-stop{display:none}.jb-pro-container .jb-pro-controls .jb-pro-controls-item.jb-pro-speed{padding:0}.jb-pro-container .jb-pro-controls .jb-pro-controls-item-html{position:relative;display:none;justify-content:center}.jb-pro-container .jb-pro-controls .jb-pro-playback-control-time{position:relative;justify-content:center;padding:0 8px}.jb-pro-container .jb-pro-controls .jb-pro-icon-audio,.jb-pro-container .jb-pro-controls .jb-pro-icon-mute{z-index:1}.jb-pro-container .jb-pro-controls .jb-pro-controls-bottom{display:flex;justify-content:space-between;height:100%}.jb-pro-container .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-left,.jb-pro-container .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-right{display:flex;align-items:center}.jb-pro-container.jb-pro-controls-show .jb-pro-controls{opacity:1;visibility:visible}.jb-pro-container.jb-pro-controls-show-auto-hide .jb-pro-controls{opacity:.8;visibility:visible;display:none}.jb-pro-container.jb-pro-hide-cursor *{cursor:none!important}.jb-pro-container .jb-pro-icon-loading{width:50px;height:50px;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8BAMAAADI0sRBAAAAIVBMVEVHcEx4eHh4eHh4eHh4eHh3d3d4eHh4eHh4eHh4eHh4eHiqaCaRAAAACnRSTlMAikwX3CxpwZ7zIGi5xgAAAZ9JREFUOMt9lb9Lw0AUx2Njqm4iGEqmEnBxslKUdhJctFMVcW5wKZ0CLpJJQRw6iVqQbg3FtPdX+l5+XHJ3796bQj557773fe8ujtOI+6jz5p84dHjTkYD4+RhT9CIRZWRPJr1bChnbY532GhT4oUpbI6HEuqvgIH9544dh9J4/rpr0Ms8oV3zMNT7X1MXSmaznzfHjM4n72moe5n8ryYrW9rKRvgf0S93JA7yKa9lbzUg3keJb8OVCtwkrFmoO4MnsAuj5rGqnZg+GZXUXkl9NjEui9n3YA9XgpMgakLXz6ujMTIgrCkPVv0Jil8KgKQN/wRN69hLcb1vrbR2nQkxwiZTGQ5Teb7TO8PUaS8Q03sE+zkjP8qbjzgJtEhRbV4gnlkOFeM7hDYNdxPbiYFvKSHN6L2NmY5WzMYPtplZdTxncRvn2sI+DHIoug22jWMaA12Y7BrXzrG8BX32XPMDKWVzw1bdMOnH1KNqNi8toqn7JGumZnStXLi0e4tcP6R3I635Nc/mzsMxl9aux9b78UVmn2pve8u6eR50j9c0/ywzyVl5+z84AAAAASUVORK5CYII=");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;-webkit-animation-name:rotation;animation-name:rotation;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.jb-pro-container .jb-pro-icon-screenshot{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEzMzMzMzMzMzMzMzMzNzc3MzMzMzMzNzc3Nzc3MzMzMzMwv5ahDAAAAC3RSTlMAW+8S2UGVwyyZnOTRhEMAAAEfSURBVDjLzZKxbsJADIYdBQpsSCyVMlXAdEuQYGKpWFk6dWHJgsQ7sMDSpUv3PgITAQT0f7ly57ucQ45KXRAZot+/89k+X4ju9KzL4XOhlm3pR0enYrWViSRPXQIQSASkRSkIJEFRimYCuQAHSW89IOv6SH5TCsuAj68Ab1wDzqkAzqoC7AUAPtgsABgkBBgkCJiNHehGok//KRVsHqd+3Dj1/vukt3AH/Jj05s5/AmyZhFVWXDls44iVvfQWkCvgxU6g9ZdJfCLvjJbYaT3GvjOY4mQSG3SJGjhr/Y1Xohp+TGKqqzexZ/1GVGdNCitt6R8zVvb9d+JmKdl8o5sPWbtxT6zFuJcDQtk92MNmYiXHquYlZlVt1j4P6cd7fgHFW7Nhqu29TwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-screenshot:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEVHcEz////////////////////////////////////////////////////////NXt0CAAAADnRSTlMAWe+X2TINXUYZvctoYyuS2NgAAAEVSURBVDjLzZKhDsJADIZLCAsEg8WgEGCWGSwCgZxB4MgEAonB8wQEXoBH4BEWXgPJgEBG0mdgR3u77raRYAgnlq+9+/t3TQF+dKbZcJXSYSnzlViT457lRScKmBqILSFA3GoO8S4E+Ex5JiSJ4CbVdyOQdZNomX9D4dl+ko3NC8vFFmhPy8FIsi0ZlwLBW/LY5BxYYreUSgoFAEmhB5Rc9OCbUoXmTmDadQKTn4y6A/XTaoSKdb6KyGU6RJ7eHgpb3ABinAoil303xB6vQnRahNhXvMdre+fzOgxVrokX4jHAnBh8PALU8Eq8BqgTg/vePF8tpuPy9/NFaalSc273RizarYqfkswjifNMQ/TyTGMv4v87L+ks5gqDbc9OAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-play{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzMzMzMzMzNzc3MzMzPz8/Nzc3MzMzMzMzMzMzMzMzLVn6fAAAACnRSTlMA+duduRUwSGSD8toSsAAAAI9JREFUOMvV07ENgzAQhWG3lLSp6MwCViYIRSpG8AiM4FWMaPymDBKESMF/cQ0S136F353vnLuo3gp1kOYEoCXW4LFKIZAnqAXYICeASoAdzgG+cApwgF4EfwF+oDkCqIwA6gnyAKA8AaizQhsBAjzuqUHofInGIQbjRxXjMrTJuHDestR4Bng4eGrN0929PqNfzC6h06weAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-play:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEVHcEz///////////////////////////////////////////8Uel1nAAAAC3RSTlMA+rbVFUecgC7rYhEEz+4AAACbSURBVDjL1dMhDsJAEIXhdeiGpKYWQVKDWc8ReojFc4ReAlPFFQazad7lIGkb0jK/WEPSsZ+YN5mZEP5UrZIP0vgE0Kv3oPlIJlAk8AJM4ASYwAkww2+ABfQg0ImgugPYsfNBVl99kA0AsjOArAPQpRTGHiBB8whxM0y+3skXNltsvMYriIWrpWPA80mFJ5qL3gAfB1/tcAt7rzdiV+HEgs1oBgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-pause{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEVHcEzMzMzHx8fMzMzMzMzOzs7MzMz4IlKVAAAABnRSTlMA6xIU1hVqIuOVAAAAMUlEQVQ4y2NgGFYgLS3RAEQziQFZoxKjEqMSaBJpEAkgIw1ZQlBQRAEs4QhkDeIMDgAWx1gMHyIL4wAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-pause:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEVHcEz///////////////////////+3ygHaAAAABnRSTlMA7OgSFBXMmAA4AAAAM0lEQVQ4y2NgGFYgLS3JAUQzi6WlJY5KjEqMSqBJpEEkgIw0ZAklJSUDsISikpLQIM7gAJjhWp6XcaOxAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-record{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEVHcEzGxsbMzMzMzMzLy8vMzMzMzMzNzc3MzMzMzMxEZ/aQAAAACXRSTlMADPKKKeBxlV6neZ4mAAAArUlEQVQ4y2NgGDZgJhpowCURAJeYpIQENJEkCgWRgCeShAGyjfgl2EqwS7BFToZJiLg4ICTEImdOh0pwRM6cDJcIjpw5E6aDFeh8B5gECBCUYAkKCoMbNXNSOlyCgUEQ4apJJmxIEkjOVWFgxi4RgEsikGQJnEYp4pLA6VxUDyJLIAUJcRLIwY7qXKSIQvOHWCQODzKIleBPPjgTHM4kijNR48oGkajiYUMykwMAAfmZhUjBISQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-record:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMA8gyMLeRw1x2DBpWGN2QDAAAAt0lEQVQ4y2NgGDbgDBpIwCVRAJc4KIgEZM4EwCU2KSEBHySJCcg29iBJGCBLgHUs24FdYlnNYZiESksDXKJALebMaagES8yZw3CJypgzZ2A6WIHOd4BJgABMgh2XBEtpaBjcqDMHs+ESDFyLEK46aMGGkEB2rgQDJ3aJAFwSUSRL4DQKp+VHcTkXxYMoEkhBQpwEcrCjSCBHFJo/1GIO408MOJMPzgSHM4niTNS4skENqnjYkMzkAEgzyFpeX6L3AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-recordStop{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAOVBMVEVHcEz///////////////////////////////////////////////////////////////////////99PJZNAAAAEnRSTlMAMPndsnZj1CSYPcmL6wsdoU80pOJLAAABu0lEQVRIx5VV26KEIAhMA++p9f8fezatFDPr8LSrjMxwiWlqzRuMYKW0ENH46c3WuGyVLXEduuO83UyK59fl1jX5EEUXD9DOaSh43XEP5zUIdZ4pAecTofVnWSt3ip4rx7N61vjnY1D30CpH4QQR8vsP+RA5Rs3KpjfMU/pMim/LgbvH7DF2F8sU0owqapKLqgnhuGWwImUagn2zhUX6WQQoYkXG9WxSAJd700/ygsCpAoliaDsPiG48GM1X5Ft/06sfp8DrDE+3DpekWjxM6366fgEcnklC+AIIWYQmPEeAaUmjFOnhCLDfxZRH+w1gU5b/DYjfNcyJ0p7dxX8B+FwxQVtvAGB5ig0d5gFA5KbzS91hI8CenvlHflfN/XvzJQnxbBEko1gbvVnPii+FadSVRUEaYylQfJtpLB+aRG4LY/80yKdUbCraM0lozGR4ewZ0Wtnj1iC7hjWKNnjYmR62W15cLlL3+2pyMR09jccyuyUrHKsvthc5xsY1iWJ0Xk3t+2XP7AnWwrAQmBH6asXubmL1Z5Lz6o992jWiu9lnMSiQsK27FS9NxhCumZgB2fTBPFsFolhZr5B/D3o9sJAI6skAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-recordStop:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVHcEwimP0imPwimP8imPwimP0imPsimP0imfsimPwimP0imPwimf8imPwimPwimPxLmg1rAAAAD3RSTlMA15sisGUvdz3szYwMT8H+hDJEAAABx0lEQVQ4y3WUO08CQRCADxBQchBiMDE24KswFlw0Wtig/oHzUWglJBZWio3GDjUxlhhrEzT+ABMrO2iptLLVRluDggI+xtmdXW73LkxxNzvfzuzszNwZhhDzdOxqaPGgYrgkOgFczh90ezAJQmpL2v6OHYnqk2aWxOTtAnu/O/Y5XNZXmTZjo3ot7aESwLdFeqAM0MoJkMf9ltwVQJ9PcQN0UFIJogvdJgLQVFMsAlxyBaPmVBDCE8W7qd+2SDsx0q4OwhSrCG134W54jDfKLjDNxaL8/9AAMM/solptRnoALBbwEPWYrOEzLnrZsTGoMW+fBHG2SiLPUNI6KMOH8QS/XsCMBYQekIEv7NGZF/Rht2yqmA4i3UG9O0iTqgMfhirDhRdU8XJZqqEO8tDAqje8IIt1r+I5HmBjfD9AxQ1MgJQRpc6GJRALHOAS1WRlhMs4VaSFzwIWzCUF3op71kdNsNs/FDCuA58YqCQl7IhN3WbDnlLtfjnuON515WM17c7w41QPOuBIzDT5wqi0T4ESGV3gjtTjkuPATwHoX9+cPRlmmvJ57YAir2qKy459QL/UhrS/uAu3xf8KiX3DI+b22t6jc9F/qfaum9E1pJ4AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreen{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAALVBMVEVHcEzMzMzOzs7Pz8/MzMzMzMzNzc3MzMzMzMzMzMzMzMzMzMzNzc3MzMzMzMxdHBitAAAADnRSTlMA8AwGYt0aUcg+til5kgmZywUAAAGWSURBVDjL1VM9SwNBEB12IcGkMagxNktQSZFCYimIJAqKpZ3Vco3YBYs0NkKQgBg4ECtLFSFVCGgQrERBsLayPE0Ip7n5De73BdKLTrE3ezPvze6+GYDfsAQKy/Rz0i/OZJjY9XREuohTKulS+ZFGiADfyZXU5uHktI44VH5apDx554aXwJqloiIwiEsStAjCAsRNF1jCmGqa4Vc+BvS4JkjwzyPE6xiwzsxxeTbZxqjkANSWZFkoIj5bQBl4aBDfkPDNpeRRialB+SRAFz8UU1sAaEUjSCDoJ7iukZJ1V+c01bFczM1pWaa+a0Rp7MHn4V8Z1R9vLLCv9WjKdVFfk77JP+bZdz35YAfKXx6KhKp93abUYVbrj49g9aAYSuFCLbPUwzdCsYEWTloXgw1oGwQbENeuKwxzXhxwAADRMFd+zzRc6AAASY6RH8VjUHaXTrlOpDgCUP3gelc01e2d+f16cWbnQ46BGCRNVsWAWQJVw2xGfUXVv2k1OsLfazXqblzS99u1FwKFvBJioXBY2+r82U75Ab7O0ypVV0wKAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreen:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEz///////////////////////////////////////////////////////////////////+GUsxbAAAAEXRSTlMA3clDHfdfDQbsVG00u4Cqkr04dRsAAAGaSURBVEjH7VXLdsQgCPUBAROdjP//s1UTDUxsz3TRTc+wC94bHsLVmP9hkE8LIdvgupt2tFhcpy2CMZyVxNePEoqDp4hwEGz5PTqWoZNzLrmD9riltBEYzzpZQ8bweXy56Qy6Tivsp5JQYtawuMH3eJlSxIJtdSSa4xer4lMB89pK23mKrwjZVpsRzLq35vEE3+r26h6w5EKppcp3fP2lIpTPWJvoXoobeNI1sM3haHvx56tu2sdElJ54GbnPQ7RZ1sCpl8qPEMXBNQ8vN82jNbzLCPzGSDOZj/2Bqd19R1rELIEbDFrUJfKYdlALbDuDMko/hz7t8DqtCfr8h1Vt4rn7eh/6Ph37ch20aW8McsfGCOXzcr+GOlQG1rJ2HSHUDO/4Mu01qVAqTCpCJfgZ3phTS2pKm5aZOMUbs7Q6nk6L8UzRh6W78jH+gD/VRxHokPuNgUGTaPPR+zDR1mrlvcGgwkAVacSbeoN4Z0rb5/6XLrW/2GTLk2NhXHRKzrqAt9cD4rr4ddvae0NAYgOICdZyvPj4UYRf2BdfbB8iWvnTUwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreenExit{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEVHcEzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxi4XDRAAAACHRSTlMAf3WqJmy+7azWNnMAAADNSURBVDjLxZQ9E4IwDIaLfMzCOTDSOz07OjLir5CR0dmJFVHIzzZtnMzbOzcyZHnuaXpJWmO2ji4GhpAzzZeQzw8FKCj1pMHss9OgpwsGOS0YGOcVUMPsfBVkmJoVCBJW0FFB6SFIaMKAlRGDnEiDkuM00lP3SmL6H5QSh+iIr9ZWVWntUV9Z4qWbHAWrhcUYNLC4Wwm3xb1r2mOQYoVn2EKFAVb81KHiQQq6L3vSUoMBUmSzgCKbVeiL3eTp3Odf8H1sxRAZZNZt/Vt8AHcPQbiQQVF+AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-fullscreenExit:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAe4Fzh7MZbKPtN8gpX19xAAAA3klEQVQ4y8XUIQ7CQBAF0CWhKQHDGtQKQFcURUgqEARBED0Aoqp3IKnoATAEW8MNOACmhQYKcyi6uyjmr+aLqXj56bSbVoh/J3HBxcw0ZfA2c3FiQLGeQcWh1lOVDDJTAeCbCgAR6QqCDj0xCEU5Bl2BIALKMwhdKjGILRUYfCIOEynlvABANk64M5jabJxHfJY2I76yzYu/ZCc0s1WbNYAQ3jxqwMoGHoqWGHpUQajEgcYYcKWFtjLE4FGJQewoxODRDQOqKPPcHl9sfzSXa/0L349tEDsOsp/8+2/xAY+BZBY9KhM5AAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-audio{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEVHcEzKysrMzMzMzMzMzMzMzMzMzMzMzMzMzMzNzc3MzMz8gU00AAAACnRSTlMAL0jMZKt96hGJsSKv1QAAAJ9JREFUOMvN078KQFAYBfCbJEw2q6SUyWxTnsJT2JTJ6D38Gb6n5PpT6BwbuaNfTnz3fEp9fZwAP7czD0MsGCzBYJcEYsGwBEHQQRB0EII1CMAWdAOzyJUvJ4jyDVyZVHKGpj9guEI2IuhaDFadYnCkIm9I+kPgn8t+kI7kOsT72HcwQnJR9Gofy8DrwwtHK8pLzdeALg5fNb6cdJ1fOjOGYrl5CLFcggAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-audio:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEVHcEz///////////////////////////////////////////////8NopmKAAAADHRSTlMAL0TQf2frEaZYt8E+idL4AAAAnUlEQVQ4y2NgoDdgUcAuzr4Hh4TaGQHsBp3BLsG+BoeE2hnsEkCDsEqADMIqATIImwTYICwSEIPQJFhnBjKInUGSUA2CSPCcOcIwB1ki5xRM4iiDDrKEzQlsEuUF2CVY0jbgkDhjMLQkEkj0IM4gQQ1EHMHOOXMiakRpTiQQtXgTA+7kgzvB4UyiuBM17myAM+Pgzmq4MyfO7EwjAAAEf+BAxqI/agAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-mute{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVHcEzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMztXryaAAAAD3RSTlMAHd4P7ztyiy1OnKhdx7uY2gyAAAAB8ElEQVQ4y72Uu0vDQBzHE45C3SJFaSGjUEiRpJRCBifXokkpSv0DfOBrEKxUUSoFH9ClFAUfU7c4OARRCs5WjThIsJuDlLo4ldvPe8SYxGyCt1zgw+dev+8vHPcvYybvfCR2OgUv2CoLdI62bUn3gq5UJxOomZofXPUNrIChJRklfcDSiKK2bYQ6PiCaREk0EQoYPFYa3F73F+DGsBJLmAjBAMBKakG15KAxqIhd2KuK5reRccBDNbqGJhfSlnNc/kBh4OY+vaoR5QrRC0afKgxMrKdXNKI8yxRENpyd+i0VA6wMm5IOBmORCwfAFjGwolofevbuPrvpGhRgpVaqiJflrLuUQQFRToS9l894EMDe7q6yL7/G5wMATc5mQCiAvQo3HAbwLtyYHQZgTxhohgGUa/CP12EA16W2/Ou4ZEj1dNG9oPMkZGiwJWQ8j+huPoJy9Z/XHTfUFSbAURveCtE5px5vs7hQDKS25FSDn2KR5Up1/lRmIHne7BvKd82LMRJbSjr5M40lmaYZ5/PRpiCpizjJyk+CwOGOzACLpSdz02QxkiuRhd8dNOwkV7zl2YX1mcySKJrQiPkXY9klSt6rkJPRwIlmzrcWSGyzHuTb11V/N0y/S6SdwdCR4m/47OIN7XOQCfwJwHGp8IcfyRdBLEZK4Uxp6wAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-mute:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAP1BMVEVHcEz///////////////////////////////////////////////////////////////////////////////9KjZoYAAAAFHRSTlMAbk2o8o0P5TsGnVojFi/XHcV9urLaq0oAAAIQSURBVEjH3ZZZkqswDEXxLM8T+1/rkw0BuwM0f131+IvDyZVk6SrL8p88QCHp8UAnWmoWoG8AwQRN4/vOiqwUuwWqiob646MMhEW+KnMLMIXffgiZoODBusb7kCzjByF7OOszkOyp4amJ7fWVPwCN6BpyWRypvANPCvi7u4aTXe13YI+KkYA5bMRTSMlLnSyGwisSH40B0FJOrKVB6iAw2U7sGgPgQ/DTPQjitCOZT4Q6gWCtGwGFbSM34ENUNSpAKTACmC31rnRgJwjDdkFAJpfkAsZcAJvCSVQB2FaWWKdB/ATMAHwIUYL21lRBZRDiC5AnsBHBUqxEyaraFMoz0AnvHNa6xDWS34FGgNf6PYAEZoCt+BroUWFVbeb5HbCqSvB2cToyca+Adjlycdawt0C/HeyScl1W/w3gsU3aAd7JF8AuAN6isr7NAogXAFeq59Ec7ifAm49hF8wCMWfVNXAeCAkjEGuBr6R5ZGJzBrl4gGniBME+w8aMMyCsNZtfaemnmYaAQ6I3Rz0fnDhHJxc93Vrr7sHWjP3XRtTba2L3EkdFVaPC6YmXxKI9DGF1YPLdiwfD2r37cL5nDVw+uKzU5K27hsXCXPtyC2uyyl0D0p2TY7VaIvFYWU0Dm8TdOXmrVp52HG4lU4K/N38PpS/Kw70dbmb/sC0WCcQwNNzzjrzUj7veUyIIyL/4m/EP8V829O8zh5EAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptz{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAM1BMVEVHcEzMzMzMzMzMzMzMzMzMzMzNzc3MzMzNzc3MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMxDm1AzAAAAEXRSTlMAHqw+E8It/gjxc03jhGDTlgAjE2kAAAI6SURBVEjHpVbZkoQgDBwg3Of/f+12gtfMbK1Yy4NampCju4Ov1y8ruNyyo9fyCibVlNW6vUu29GpWQwTVdPTernqwffHex0WP4Nro3k+PrMKCvew/PcZ95aoNsY9yua+cGxTZsnf2K7ch4CAdGnWwYx/5LgKZCgxGdrhH3BeqNmnwviFXPZbQJmcM25HJ5n7/Pczr2QqksMJfO7BJOHLKLWFdMiL1QXYRwFagMklb4GB1zS7s8Le3fqH7Q28tVLkKdIzeaOJB2OKtY8KfTQCUa4++dNsLbrqpTR7xguHGt8hfg8P+seuaEkNdBjahzOD7g1cHP21SL2LtMNBKMdTRJjffTX1wVgrsEb1ITJU6QknwYJAcQky2cE02NbzPp70KyKggtpu9xM7Ik+CBIqY+8FrYyRUkrs+MEm1TG6tG9LZxNDNFGDue63TYGgIHqUUcuNhvhyZtn5LnlDq3Juxa4noCuX0scErOpNMDCrVcHPCS5rFGuQR9KZpxnB6CQ0ZO+AIBcTPk3UdbTx1L7jLEEHsMW7ZYm8NlIFyxn8+xdL7MURYEhzd5k2N2TabxIAORwC2r00QQfNSgrnqTJfh7cDmDu9ggtV0EZFr7kGu4KAxtNDln406TLwF9iZCIwn9EfjPuncRHYm5x3NfK3cFAS5kWxljSnTFlPHBAUFg5HsCCVOd9cdwXq+027un2QJlMjqISJutCDceRtTTuT4+1Q3HWHR8cu0fh9sGvADTYH9iLah/9nPz5+/MDJnQfoIVoAnQAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptz:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAQlBMVEVHcEz////////////////////////////////////////////////////////////////////////////////////1bZCPAAAAFXRSTlMAeVoYDS1pBiPv4/g6lkzO2qSxvoixscijAAACi0lEQVRIx51W2ZLcIAwcLnPf+P9/NS2wp5xkq0ziF3ZRC3R0i/l8fvi04oxx89n+RBi1sqB38TKw7lw7lNzDa3U0e57bHhJ4d567HlqGC08eLAj9Gv8XD4/OwtsdhlfCW2s9LfWtuNrMhG1uLWP17Xh14LF4m8dx1OJ9jkm85YCYch5JzDVy81on3MFYkpTNYGmHHloYI+aqlNhlh5ZSvmH1AyBUwPcMX+u/clW3XYvA2YgRGXyZIZX6PXv0l3GlV9Jp9FKcK7mytJIg8xEeBdaBtV4P8tAixexnp73tY7ZBkrk9WEL8t7ZUDqtIA3jXa8sODSeUVqw5aztT+g4QeNAgM0PGTA0+EmfVeUvU0CEW4hX+lt/zseE7jJKDSmi0EUKBhr7EAMKPvNjOA9Fz4Yk/CFgcGRSdkYOHCLRxQfzKRN5SB/b5Ot8SzzQiKqcb6ipFdCfi1JI84OBdxzarhJ8RkpxHOQszl7bpn0GpmnXq6R4OfTkwwlyUWzeQg7rSLNhNUzEUEqJF3DMHeeXgqRIaYwHimLKipK8hMZOYVfJ5oKtIFSgXk5z4KcNx3GOIPGYfPigh9YGHBNQKVKbZhxMnqq+OHfWBHARZfWm1dnfSXfJuXInplse8wy39zkisdQ5kuLY+Bpc5hwGiH8Mx1rE24DFaLqXkfrNVkjk+8JPTPF0bUw+R9MCVuA8ks/xDyF/9orMqpBQeiob5RbIbmv7/TxvoX1Oqa914TsYg7QUWx8Y7R89JQY8mY6Dat1G5GARuMOgYHY9cbL1vNvc++fk67olLk4nrQSl7457OPqdeKn+vEwm4LPzW87DyXvqIyei9znHS+cZz9SxV+Qf8nNbjn37NkDx4+PmCXzHOLUMtjgmUAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptzActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcEwgmv8imPwimPwhmP8imP8imPwimPwmmf8imPwimPwhmP0imPwimPwimPwimPsimP0imPoLqfILAAAAEnRSTlMADprCJBnU/gXwh3LiUKxAXjJ/ELXKAAACbklEQVRIx5VW2bbjIAwLa1jM9v8/O7Iht+09MwPlpS2VwLZkJ9f1lxVG1joPdZ0u1ZIxurhv8DH6dMpQI5t439GAEc7xYPgTRnAtV7plReRhd5kDP8+fd+wzt70yPhIJzWT7/6DCJCAYLReZPMIuJC4pClSktHqbNpJO1aTmmAme3cvtWs9NSfq52CPhnJNjlbVHwgmWSWGHeQHcKFjj7fygwidf2fa4mbVOuladcnsoDn9/CKKAWf6HEtpANiJvUp9Fgr0SvocPP/sqjOCK9ktpyCAo4Kt/d4n4/6baseNKAt5XrauPN1A4ZLAd30RUI4kNfELVx+yd3lrXYIg1Bp/B/dGs5N8mPsJoVyiwkofQSlm+K9aiwmoQMDoI4wefoK/rhkESrSuV+BR2i6HZH9juLzxCtBmn6rFmB66gNJQwBOSxncT/N3FAlxAoLQfJDy2+6rMLI3aznl9fhOcGSdZzoNhex2K3TXJEVe3M4Zb6QhHuJc5BWakYIqqietcPw6FK+EHofUHRqtLEQ5X8dKVENXXgEpLOpcjwkFI30YFVHE8fyx2ShZJ/ydTKlZwZ4BCOv/af9uMi0DILe4kieynScgPbhai+DRDckTT6N6zJpI3HMghM3BMg+q9pHmwrbR0Q0D5wc0JHPy0E5Ur7Nf3Rk68LnR0NHfO28/T5P4cNr+uLFR7eEdiNxvMRbd5Onlqsis4iIVdme4di3akWOz+3T0aUnFWHa8QZrO51NO69MeLPafrNuBenxel/3d21j8k/jyxf+75OQabFxOtuT94G3Lpjzb0zBn2Dl0ep/waPidQ/p/XB60Dp7e8F/QO7WSJg4zEzdwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-ptzActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAANlBMVEVHcExru/9ru/9qu/9ru/9ru/9ru/9ru/9svP9ruv9ru/9ru/9ru/9ru/9ru/9ru/9ru/9ru/+3uxEqAAAAEnRSTlMA5q0cR/PC/ggSKtN5OIhaa5izIOiAAAACV0lEQVRIx5VW2ZLjMAiMToNu/f/PboNsJ5PaKWv8kKRkWkDTQF6v/zyUfO+JX9sP1dKKd/v2acQcm992kbo1R4il7iHIif0BRNtCUOozH4cikAdt2YfjRLTnzN15/8I85wFCI2xDzlnyMLO7R0aFoTzbFGB+jIkYLkyePvmW8d2fs2ZfZuv8It9s6zvV5uSr2LmKb9oVh37QvpjYOcf8fcO3Cb1jGqOU0SvTTd6X2KUBLgKdLzaiDtE2n+isTh8/+AX7E6/Vh/NNSyfVm10RXIe1nxXRapmsDQB7SMnkmE0IxgqvUn0jteEf1T2CHXgr0gjZllGk1HoJL7lD7fRpD20CgJcwQ6EdSh3lLK0zVfuqz2WvPlPJh7HqnCQ4MysxoAYQE0vHub/toRuqzRy5pEUvbg62MzlJQn1MHBe1x7WSAddpNDSN1c9wRMhKfi2jrICwAIsQvHkD7Al41bOrBNC1Y7QdmSg15LDokGETJB/imxYJKfmFMDqI3FjUkDS3NSEDjBaxknRYSb+4nj4kC43W2OKrkqGB8jV2Fq03YiWbhHQTpUV1mMHXWYf8HlNX7ZUQRC6iwBAIK0r0ILr1UxqKsPattAkhwSIiMl76bT/Ft/TbTy2jHQoM7Cz9isHVMb6GILl0H4DGivbw7xNc8rAtiJn3O/qvD6JT/wgs7Y370ZSdWmbZWEKiG1lXImldW7Q1jGMbZW9tUVKZmGjjGvf+EXAqzWiX5OfFSHVp/zjbfGPc3whdcbTF67V2N1e79qYMru2/AnzVYFsdWFt/+nOypv8vQvoHou4gOtSrG5EAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performance{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTM7OzszMzM3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3NzW8hQDoAAAAMdFJOUwC/gO8ra6tUQNmVEKtAA1gAAAE4SURBVDjLzZMhT8RAEIWnpS3tXcWdQ6wgOJIKfFdUICv6AyruB5w4EuSJCwRXgUBWkGArLsEi6JVuaZkfxawguSWz/p7azLdtdt97C3ASagp+PpeXPDjHVx7McMWDCBc8qPCZB4m44YFIeOBh+ckCf9z+sCCYqi8WvA/5Nwu26cfA+JRBs4h7WmX/tr9AXcQHAPdgzEPZh5idTQBOZ3zyiModISKQGxZ7dd85E0SKfMGjM7vXeI/5AE5LvrwpcK9IOrQYB5BlCsFIvjzgrkaSjsBZbmC9XsGsAxfn8gKXpL9sSlnQFBwFTTuaKWXgI5Ar+sfHTrW6DUDO+2jEEtCNQ9wL6gNujMvvdFS3eugxGT51fBXxTvF1wLLngbT0BGphKalAy0MQ3Z4Ha2V7UoMFJKkFVAWcvH4B0OJfd9YsTl0AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performance:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwD2qdfrViyAwW2XORBGtSCsD6SyAAABN0lEQVRIx+2VzQ7DIAyDYfxToH7/p10CbQ+T2s33Rb1MijM3/qDG/EurolD9zSNRggBU0hFelMABmenfADhGkJDhGUFGgiX6I1AAQlDgZK/td8ELtQORiTmIq42I2bYdCD8NjzPmYQxO+rbn2S5qzEUF6YjkgcJude56X3s0SoL7LRAeylyaVPiFq0Jyx230mpeXmXVOHssRbhackhCq25Sny++xcBW1n6Snqw6BTgrqRP6kzfDcgmRLGonDWSf2OecwB491dOrEVZpNsxiyiHzWJ0Z+BbBwzaoWVb49HrqVfSkxHen7WNznLhzl8xpQlT3E9oHUtYaufB+7NY9g9ctbjFfj/h1DwXUrzDltMn1Ql9M814EQWPLmEBg4R7JSzpFQxTmSBMkLvJKOhFHfKEEnv3L/+qw3DuMPzAFH9pIAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performanceActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAtUExURUdwTBGW2xKV2hKW3BKW2xGW3BKW2xGW3BGW2xKW2xKV3RGW2xGW2xGW3BKW2+P2IvgAAAAOdFJOUwC/gCvzq1RAleURc9VmrA9rXAAAAT9JREFUOMvNkzFLw1AUhU+SxtTahnZyC+IsIeAenDuE/oJQcS/FTYTi6hKcHYpDZ/EXBME95BeURpM0Me39Db4Mgk/u23umcL8kvHfOucBBKEr5eW95xoMjeuBBlyY86NOQBwt654HrPPHAca/YuUHrDQsG9eybBWa1+GLBqvS3LJiNX0vGJw/R0N6LJ+/f6x9I3uwG0D+luRU0FnmdCtBy6ZM7KvQdjgXwJYuNZVNrFfqF8IX+nFm/oBvyS2iZ8OWxgH4u1IZmU4kgfoa5E77c0jwhoTYCbTRFGE7QrXFCveCURkK/2cRBCp2gFYiyWk7Jw4AgXOmQZMAqa9uAeCP+JsViihtb9OKIPtBUuvy8jeqyHRpMhvc5X0W6Lvg60HrPg0DREySOoqQJKRbByRWbExaqlSoVwB0rwCLFwesHquttxhcsa64AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-performanceActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTH3G63zE6n3G7H3F633G7H3F633G633F7H3F7HvG7H3G7H3F6xOzy+EAAAAMdFJOUwC/hKbvK0BT2XURZct0z00AAAE3SURBVDjLzZMhU8NAEIX3LiSUNqI1qBMMChFRgYxAd07E4CI6HQwzEUXgKjC4CH5ABAKJyA+oaHqBJO3+KPaYYSZh9nyfyuyXu7l77x3ASSgu+flYX/HgHOc8kC4wwikPMnzhQaTueKAiHvi43bFg0m4OLPBM9sWCjyb9ZsHm8NkwPiUQT8MjfSX/fn+F/C3syJf9YB7oLsDkjIaiHix5QCNbGBmAFPve+3lXi/0viLB3ZnmDz5g2ICry5daAvCbZhSE2oIsFeC35ssJljiQbgZitIY7nIGu4wLG+xBnpL5tClxQhCANR1Q5TSmCCQK7YjftOVbYNUOxot0EsHl0uwHdFfcD14PJLG9W9HfpMho81X0V8MnwdcHvkgS4cBcqVo6QKHQ9B1a6XY1zAcSiIFg6QlXDy+gEd714RcAqEowAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-face{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTL+/v76+vsDAwL+/v7+/v7+/v8DAwL+/v7+/v96T4QgAAAAJdFJOUwBAgSCbs9hZap+hQJoAAADvSURBVDjLY2AYRkAJCAygbEZBQUEBKJtpJhDAOJpA9kSYxESgKphuIaBuhASqyYzESjC2hDRilQBZ64BFgm2qMLPYNCwSkQpAwlMBWYIRzJsKYrKCxZSRncKSDFYzBSNY2MD2MqRhSFgqgClPAwwJBxwSbAk4jGKZDCKZp2JIsEOcOx0ztjQDYL5ENwsYJKrTsMSvGSgepzVg2pE5qSikPRPT8sopBuDod0ATZ54JsbZyBrJgAVAp1Ax2oPXMykjxYQaLA2CMoERUZQDMrgBUCc8CKIdzAvHJhyQJpLQLSu0TCaV2lPwBSu0KQy+LAwBuJj5UbruNggAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-face:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUdwTP///////////////////////////////////////////////w2imYoAAAAMdFJOUwBAgBvfrFmcw4wrbtGliFoAAAD2SURBVDjLY2AYRkAJCAygbEZBQUEBKJvpDBDAODpA9kGYxEGgKphuIaBuhASqyYzESjBu79yIVWIP0NoCLBIsR4WZJY5gkYiZACRqFJAlGMG8EyAmK1hMGdkp7M4gkus4RrCwBIApFwwJmwlgqsYAQ6IAIrEAwygHHEaxngJbfhRDgg0sxHoMM7Z0AmC+RAPsJ4S5NE5gid8VoHg8sgHTDh/PzM60HkzLc44bgKMf3RKuMwoQ+dNIgswJDAycUDPYjhgwMCsjxYcJLA6AMYISUTkBMLsaUCVqEqAcngPEJx+SJJDSLii1HySU2lHyByi1Kwy9LA4AqflRBKNSA88AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-faceActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAhUExURUdwTBCT2xKV2hGY2hKW2xGW2xGW2xGW2xKX3BGX3BKW23povfoAAAAKdFJOUwBAgRybs9hZLG6hrV9tAAAA80lEQVQ4y2NgGEZACQgMoGxGQUFBASibaRUQwDhaQPZCmMRCoCqYbiGgboQEqsmMxEowTgmZiFViFtBaBywSbEuFmcWWYZGIUgASXgrIEoxg3lIQkxUspozsFJZkEMmxBCNY2MD2MqRhSFgpgCkvAwwJBxwSbAk4jGJZAbZ8KYYEO8S5yzFjSysA5kt0s5YKc6guwxK/baB4XDYB045Vi4pCyrMwLa9aYgCOfgc0cY5VEGurViIJMhcAlULNYF9mwMCsjBQfZrA4AMYISkRVBcDsCkCV8CqAcrgWEJ98SJJASrug1L6QUGpHyR+g1K4w9LI4ALk0RHtSETFcAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-faceActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAhUExURUdwTHzD63zE6n7H7H3F7H3F633G63zF7H3G7H3F7H3F68TinBIAAAAKdFJOUwBAgR+Z31ipwW4yAjb9AAAA+UlEQVQ4y2NgGEZACQgMoGxGQUFBASibaRUQwDhaQPZCmMRCoCqYbiGgboQEqsmMxEowTmmZiFViFtBaBywSrMuFmSWWYpGoUgASXgrIEowgHtsKEJMDLKaM7BSWYLCaJRjBwloAploxJKwUwJSXAYYE2KUMVRgSrAFgKhTDKPbFIJJ5OYYEG1iIfRlmbGkVwHyJBlhWCDNrrMASvxageFw6AdOOqKCklrQuTMuzlhiAo98BTZx5FcTarJXIgglApVBr2ZYaMDArI8WHKSwOgDGCElFZBTC7GlAlvBKgHK4FxCcfkiSQ0i4otS8klNpR8gcotSsMvSwOAIs+RIlIrewIAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-object{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA51JREFUaEPtmT1oFEEUx9/bnRALGxE70btkZjcR7QMiRisRbCzEQvxCLGyEhCDRBC/RoNaWFgYLFUSwUBAUDKKFFqIQ3OzNJpfCyspS8HaejNyG87J7t7N3l03gttydefP/vbcz8+YNwhZ/cIvrhx5A3hFMjEAQBDwMwzOmAi3LWhBCLDTr5/t+ycSubdtLnPOncX1iAfQAlmXdNBmkru2RVgBSSspg+5kQ4lRjv1iAIAgqRFTIMIju0i2AWNvrAKSUowDwLqP4tACm9rWmbABCiFxXKimlhu0BtPFHtdc19wj4vn/Wtu3XnPOfWVByA5BSngCAuwCwryb8Hud8EhGNltANB/B9/5BlWXcA4GCMx/8g4jjn/H7aaGwYgOd5BxhjcwCgPd/0QcRVAJhM2l3rO3cdQEq5GxFvEdH5VsLX7aKIH8MwLLmu+zapb9cAFhcXt/f3988AwJip8Jj2L2zbLg0MDHxr/NY1gCAIpohIJ2V2BwC0iUd9fX2lQqFQ6cQvtJbICSGOxHhlVOdKjuPMl8vlqzrxI6IdWUAQ8Um1Wp0ZGhryiYghYrUtgDQionxJT0al1IwGkVJeBAANvieNDQB4joglzvmilHIXAIwrpX67rmuUamfKcxoTvnoQ3/dP27Z9g4j2J4C81KBCiC9LS0suY2yMiC7rttoZuQBEQhsiopfT6wAwUvv+hjE2XSwWP0kpRxBxgohO1kPmDhAHEgTBUaVU1XGc98vLy8eVUhoqbpPLPwIx6/wqEV2ovX8AALzZ/Ng0EWgQGa1iLQ8xPYCUyx8YHjt7EWjm2I7sAy0it7ERqNWEDkeiklIJg8pFWwC1ZC6SM9NYc1oXgcaiVlxVYmVlZW8YhlMAcCnFvOkEQPqqRBqASLTneTsZY3pjapZSpwF4Y1nW7ODg4Ie202kTgGiwSqWyrVqtXgOA6Zj0OhGAiF4R0azrup87dqDJAlA/eLlcnkDESQCI0us4gOdEdNtxnK+tfkHjA027AJEgKeUVANBROVd7p3fixwAwJ4T43kp4nR2zylynAOoE/JuAiPiDcx6kFb5pAEwF5zKJ2xXZrH9uc6BTUD0AAGh639Xo6bjUI+G/NglS+p3Y87wCY+y/2ozJSGkuRDLekQFjbEexWPxVryfpjuxhllKhNtwtAESc55xHx9M1hsR0WlcOlFLHTLyv26Ypi5hesyql5oeHh3VBeN2T6TxgCtXN9j2Abno3je0tH4G/KbtRT7VUKs8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-object:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAwdJREFUaEPtmTuIFTEUhv8fLSxsFrET3UIQRHtBRNdKBBsLsRBfiIWNoIisD1xfqLWlhYuFCiJYKAgKLqKFFqIgoiBoYWVlKbjwy4HMJXs3M5Nk7tzZCzfdvZPk/F9OHicnxIgXjrh+jAG69mCpByStB3AgQ+AcybmqdpJmEvv9SvJhqE0QwBm4lGikqD4VAaCMvh+R3NffrgzgB4DJDCPWpC2AYN+LACTtAPAqU3wsQGr/pikPgGSnO5Ukgx0DNJhRzZp27gFJBwE8J/k7B6UzAEl7ANwEsNEJvwVgmmTSFjp0AEnbANwAsDUw4v8AnCZ5O9YbQwOQtBnAdQA28nXlp/NG8HT1G7cOIGkNgKsADtepDnx/C2CG5Muytq0BSFoJ4DKAUxnC+5s8cSCf+j+0CXDBjAJYNgAA6+Keg7AwpldyAXqBHMmpwKjYyThJclbSSQBWfyIT5IF5kuQ3SctJzjcCiBHhxUu2GM24gRx1IGtj+gDw2I34Z0mrbXcC8JdkUqidFecEAj4fZD+A8wA2lYA8NVCSHyRtcGvouKtrg9EJQKHVB7Ht9ByALe7jCwAXSb6TZP+dAbC3D7JzgBDITgDzJF9L2u2gQoectV0yAD7IEffjDgC7plaVJQdgYotdLOYSMwaI2gETr51jD1SN6qDOgSobw/WAywltLxRVhBIxi7LxInaxUCHHFvmCpFkorWInoR8LheqsA2DB3LGIRdPIAznBXC1AIVrSKncwVYXUMQB2Sl8h+SYQOCanVaIBPJAVAM5aqBAIr6sAnjnh78s82aoHQkYlWYwz7YXXIQCLRK+R/Fg3BYcO4HnlhPPKIfefTYX7dm8m+aVOuNdP+1OoSow79KzKL5LfY4UvGYBUwZ0s4qYiazzY7RRqCtfZIm4qfGBrAEDle1e/0FDoUTKvUxiT3gfsaWlBbibFUsyDiKSkBK9nf4LkH19P2RvZ3cxUIVoEmCVZXE97DFXPrJY52JUy+lY3Ji2S8cxq4i3jsahk3QdSodqsPwZoc3Rj+h55D/wH5CHfQHNA9EUAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-objectActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA9JJREFUaEPtmU+IE1ccx7+/N7O0BwUn24UeRKOd7LalvS+I6HoSwYsH8SCtLf1jEqWoyLJVMfEP6nlNIgi6eFChCB4UChaU0h7aQ1GQrnFSdw9e/JNs9LTFzPvJZI27m8xk5k02m13I3sK+33vfz/u9N+/7fo+wzP9ometHF6DTGfTMQF+mYNqwd6sKlFLcK++P3WsWF8nkUyr9stAeTcXN624xrgDVAUgcVxmk1lbaGPIFyFocou9fSonYzvo4d4BsYQLgaIhB0EYA174bAFaNWpuFhrthxDsxQQCMrKXUPwGbvfr2BSglYh39UjmwXYCwy2kh4jqegd5M/itdaL8+i5vPwwB1DMDIWNuJcBbA545wAs4V4+YIiJQ+oYsOYGTzGwniDIANLjP+hkCHiglzNGg2Fg3AGB3/Ugj9NBO2+4ujSSaMeJ2uc+PbDhC5aK1GhU6CeY+/8IZz9E+CnSomBn7zim0bQF/m4QqbPkgDOKgufH4EAzdZaKny3vUP6vtqG0BvtnCUwY4p01oFcOIZuCJ7elKvvo9OtLyESMN7IzeViA3VC3TshiY4Wkz2j0Uyj3+aMX5shAIhuia4kn6Z+DSPu6xjiCotAQQRMeuXaJJYpqsgOetbcBV8TZA+ANxgotRU3Hz48SWr7800DjHL6VJyQMlqh/I5jYZvFsTI5XcRa0cA/sLDv98iieMv98X++Sj7aEBCPwjwD9W2LNMdAqhJnQMyc5D9DGBwRhzukK4fK/647q9I1hoE6DDAO+ZBdh6gEaQ3V9hi27JS3tf/u3Hhv20kpQPldsgthQw0fOcnpc3fVK2EhosEmE33x9LJwKxM54Lj/Ap0SeoCBPz+qVw7uxnwmdQFOge8R1n0DDg1ISaxqSbJy0oE2pTvqhStbOK5FQy2ka6vOTVkoL6o5VaVWHX+yVoh7KMAvvPbNq1mQNmNBgGoiV55fry3R+jOweRpqQMBMO4wxImp5Cd/tGynVQBqg0UvT3z4eroyDMaxenvdHIBvE/GJYnzgb69MtjUDboMa2ceHCTQCoGqvPQBuSOZT5WT/fb8luOgANUFGxkoQYVja+Lq2iQm4ygKnS3tj//oJf9+PamUuzBJqJsY59Jz/9wh6+iJpFoIKXzIAqoI7solbFdksvmN7YKGgugAMNH3vqp9pN+vhtq5VMqT2PpAbjwrW59VmVAYL8iASCfdGBvm/bpQPrCvP1eP+RpYrXA5XKgTaBkA0Voqb1eupL4DToFo5YLlVZfadtkHKIqrPrFLIsXL8s0k3LaHuA6pQ7WzfBWjn7Abpe9ln4C11Qo9Pmb2aMgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-objectActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA8hJREFUaEPtmU1oU1kUx//nvthx4cJqX3RgGLsQBNG1tq8Z7axkwM0sxIX4hbhwIygibfPMeyapunY5iymzGAURZjEDAwoVm8SPhSiIKAjtQtAmiooLiyb3yEtNm76+5L37kjQp5C2Te879/+65H+eeS1jlH61y/egCtDuCNSOQyH3cWirNHVIXKO6kYvqdenbxqVlLxS8J8Txp6Ne9bDwBnA5IiIRKJ5W2LDHsB2BmC6zqmxk3UkP6AbedJ4CZfTsNcL9qJ077VgHU8r0MID5V2EsCk2HEBwbIFdT8M/aGBkgaelt3KtOB7QKEnU9NsGt7BMyp2cOa4P8tY3M+DE/bAC7cK+xnxmUwtjvCCXzFHtRHiEhpC11xADOTjwG4BCLDY8S/MvhsyoheDRqNFQMwc292QmppEPb7i6MZgEdqna7V9i0HSNx/95MscRLgo/7CXS0IWS6VrFRs8+1ati0DSEzm18kesgGcURa+3OAfSGklY5ueuP9qGYCZzceZySKC1gQAgPkvXtNjpXatn258CmlYSOSSg/qwW+B8usH9SSM6Ec/lTxM7iR/3hgEh4Jpk2Kkh/UVikiP2MBUbAggiYjFfchajtB0QM/fuOFg64D8H8QHQTQ3CsowNT8cffdLnPn8+KyXPpWKb1FLtYJ0tbbU84asCyRYOEmiMwTtq+P63JJAYH9AfxTOFbUTlNXRyPlmTdpsAKlIXQZyDDJJGGbx7/l++BSHM5EDfg7HMm91CRM6B+fdqyA4AWA5iZd/++hWymDaid+OZ/G8EGgXB65DrhAi4Jw3NsORj5VRC4A8AW+tN2Q6KwKJM54b2HcD3EtMFCLojqVw7uxHwGdVQ992OjkC5JqSJPRXw2qlEsMpFo1OonMx9/7gE211z8iirLC1qeVUlxrLvtwgU4wBO+K2bpgCoVSX8ASqiRx682hgp/jBaL6UOBsC3pMTFdCyaaUI6HRyg0llicnptqWfdeTBMd3pdH4D/kyQupgf7HtaKZIj7gDpAdefxzOw5IjECoJxeewEQ6CZBpmwj+thvCq44QEWQmZ09BYjzLHFk4SQm/C2KIm3/svGZn/AFP+qVucYi4BbmbLnOb5rGr+zB6MugwjsGQFVwWxZxoyLr2bdtDTQLqgsAQt33LvdIe6UenvNaJUQqJ3Hi3ut+KSNLajMqfQV5EAnzRuZoEF8ivfZw74dqPbXeyP4MVSoE0DoAmkgafeXrqS+A08CpHBDTPpXRd9oGKYuoPrNqETlhD/w446Ul1H1AFaqV7bsArRzdIL5XfQS+AaeCtE+rbksUAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusion{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACCVJREFUaEO9Wn2MXFUVP+e96X5oa9UoYpUszrzzZlqLKDYhgAFaaKU2+M2W9Q8TNUQSQEsiRUjFVaHGNmoBMTUmaPwD2iIhqKR8WEBFGkLFUjbtzDtvpjYrVhpCXAtm1867x5zxvnXm9c28mR13b7LpdO65557fveeez0GYp1Gr1d4VRdF7lL3rui/n8/lX5mMr/H8wDcPwIgC4QkQuAwAVWv9eA4BJy/8sAHg7ALysf4i4DwAe9Tzvj/3uP2cA5XL5CsdxNiLi5QBwUkQeQcRHrNB/JaKZZuGYeRAA3gsAZ4nIBkTcAABLROS3xpjdpVLp0bmA6RlApVI5FxE3OY4zGkXRdkTc6/v+c3PZPAiC80Vkveu6Nxlj9ojIjmKx+GIvvLoGcODAgTctXbp0CwBsEpGHEXEbEf25l83a0TLzh0RkMyJ+AgB2TE1N3b5q1ap/dcO7KwC6AQDsRMQhAPiu53m7umHeK00YhlcDwC0iMg0A13ZzQJkAlKmI3A8ADyDi9Z7nnehVsF7owzA8Q0R+BABXIeJY1mF1BMDM3wSAcRHZ5Pv+nb0I0i9tEARfRcQdxphvFYvF8Xb82gJg5gsA4FkiyrylfoQVEScIgttyudxLhULhwSQvZhYAuJCI9qftkyrckSNHzs7lckdFZJ3v+0/0I2CntRMTEwNDQ0P3i8inAeCUPmLP8/Y2rwmCYC0iPl6v19+3fPnyvyT5nQZAmQ4ODv5aRF70fX/zfAk/OTk5PD09rcbg4/EeiPgPEfkUET2dALENEc+dmZm5cuXKlf9unjsNADNvBYD1AHAJEf1zPgCUy+UljuPsQsSPpfD/m95Is29h5rcAwO8AYC8R3doWgDopx3H2I+IXs17/XIEdOnTobcPDw3ry6zrwCKMo+kypVDoU01hreK8x5oJmZ9dyA0EQ/AwAhnzfH5urgJ3WVSqVd7iuu8vGTB23SLM+QRCoOZ/2ff8Ls2oXf9DYJpfLPSgiH+nGgfQKcGJi4szBwUE9+Uuy1orIQREZKxaL5WZadaiI+Ey9XtfbacROszfAzL8wxtQ62dysjdvNM7MGcSq8Rq1ZY/+pU6fGVqxYcSyNsFKpjDuOkyeizycBHBeRjb7v/z5rh17ma7XaSBRFuwHg/C7WPYWIV3fy9kEQXIyIu4no3bMAqtXqZcaYnUREXWzSNQkzFwBAhf9wF4v2RlG0sVQqncyiZWZ2HOfaQqGwr6FCYRhuE5E3E9F1WYuT83qluVzu74VCYWfzXLlcLuqDBYAPZvEUkYeIaBQR61m0Os/M9yDiG57nbW4AYOZnAeDWpAPJYsbMNwLAD5TOdd2L8/n8Hyy/FfbkV2bxaKgB4s89z5u1LFlrmPlSANhKRBfGAPTBrCGiatbieN7GSpoaDut3IvLa4sWLi8uWLXvVbvBUFi+NchFR00/V6+16ollr7AGpaj5JRCMxAL06VaGWNLATM2ZW4dc00yDinZ7nbdLvrLXQaDZ1iMi9vu9/ySb/BwHgTAC4kYh2ZIGw6ekbRJRDy+AlIjoja2E8X6vVilEUtdhoOzdBROdY4fcYY0Ydx0kDcQ8RXd90m+qVH9P/qwPTf9WcK5+YJmnemfmE67rnIDOfBwA/JaJuLEWDHzNrAPZwGmCNGnO53HYAWA4Aoykgvk9EX0uuDcPwBhG5KwahAjOzqqHqewNYMwhm/hMAXDMnAEEQaP76vTY39v4oiiZd1/0VALyzGYSI3OH7vubVqYOZ9fE3NEENin1LDdqkgZkFMBcVqlarG4wxv0mR4nUiWqLfHz58eGTRokXfdl33tnw+n+pVu1XZNLpZFbIq0fKIm6yIOhX10K8g4t1E9IDSa84wMDBwHBG1WNU8NIObDReY+RYA0EqDhhJqbQ4SkRYI+hotj9gCaDGj1Wp1lTHm+ZRdvk5EDdVh5h9qiaWZBhHXe57XCLKYWVXoygSPk0SksX1fw3r4FjPa4shsVqanP5DcyRhzebFY3Hf06NG31ut1fWQNT4uIWzzPu0M/d3gjTxPR6r6k/+/htDqyMAy/Y4zRPOCmmLn1zprYJ8eriLja87yJSqXyScdxHtKSi4YCVvgxRLyvjZCpFqhXQEEQbHccZ9rzvG/EsdBFIqKmVK1AYzQJl8Z/NH4PzHxV/NkCuAsRb0hb1C4x7xUAMx9GxGu0ONycD0yKyGcTuegLAJD26K4joh+nbczMe7QolZwTkZt939/Wq7BJeq2nIuIviUgr3v9LaDSdFJFjKR7vtMcYOxXVRWPMpY7jCBE1PGiz84k3F5G7fd//Sr/CW80YR8SROK2cvYFOKSUzr0PED2hGZYw5ISLHrafUx9QI2uICmFY1RORsx3FmEPE5EXne8zz1mn2Pjiml1d+ekvrmqHO+K3hWvvZJvb2ensoqCwmgq7KK1eGttnuyNqsSvVAAtGINAE9oF6hjYUsB2EaG6vWx2La3U96FAmAt28jU1NTqZOMjtbhrGxovZJXVFwJAXGYHgPPS6lVtS+dxY6PT41wIAFpe79To6Fj7j9PCdmX2TvF6vzYzLqtrgyX2MWk8M5sXcaNDRLQjeft8Vaxj4bQSLSJbEFHjsraNjZg+E4AS2obHTzRb0kxsvirXVm1vBoAT9Xr9y2kNjeQtdAVAF9kQW5PseW+zzszMjCcbGe1UsmsAMYOURveTc62nap1TRNYsSKM7eQIaO7mu+zkAWAsArwPA45oXdPNTAxutaillsTqoKIruW7CfGqRdpRaHReSj2lvo8scezyDiY1qc7dda9axC3W64UD+3+Q/fZENVhTDr2gAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusion:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABphJREFUaEO9WmnIVVUUXSuiuahopOLLIqTBBgtCC01Ty8JmS/sRVESBNgiVJVZaaag0WBlGYNEPrSyiQdTKskEjpNKSCBqlzAqJSAsbYMV67vt13/3uffe+93pvw+Mb7rn77HXOPntY5xEdEkkHAjgk1G8k+VMnpuL/oVTSaQDOBnBmGG3DfwHwXeg/DMC+ADbGZwWAZSRXtTt/ywAk2eDLAIwAsAXAkvjY6O9J/pk2TtLOAA4FYDDnxmdPAG8AeJbkslbANA1A0gkAbgJwKYA5AJaS/KCVySWdCmA0gFsAPAfgIZLrmtFVGYCk3QBMDeNfAjCb5MfNTFY0VtJJAG4FcL5BALiX5B9VdFcCEBPMB7ALgPtIPlNFebNjJI0DcDuAbQCuq7JApQBC6SIAiwFMJPlzs4Y1M17SAQAeBTAWwPiyxWoIQNJdAKbZbUjObcaQdsdKujHcaTpJ25ArhQAkDQKwmmTpLrVjrKQdANwJ4FOSL2R1SRKAwSTfz5sn1zhJhwP4BsAokq+3Y2CjdyXtBMDueRGAv32ISS7NhN+RAF4D0I/kt1l9fQCE0lcArCPpyNARkbQrAAeD81IT/ArgQpIrMyBmA3D4HkPyr/SzPAAzIzYPJflbJ6yX5ARm48/J0f+DdySdWyTtBeDtyDlTCgFEkrKvXVV2+lsFJmmfMH5UAx1fAriY5CfJmIiGCwAMSie7uh2Q9KRjPcnxrRpY4vP7hfGumcqkT/SR5POyjeSVycu9AKK2cRQ4vUoCKZs9J5ocFMYPrfDu2sgBn2fOgjP2e7E7tdopDeBpAF83irkVJs4dIslFnH3eVWuZ2IWdwDbkDZTknHAEySuyADa5uiT5TtkMzTyX1ONqE4ALtzJ5C8C4Rtle0pCoXg/uBSDJPjmf5FFlMzTzXNKRYfzJFd5z/PcCujRvKJK+iFppRc2FJDnO7k5yQtnLOb7tLf2RpIu9XpHUP9zmxAo6X3R5TvKfCmNt7zwAvztPJQBWA5iSTSBlyiRNAvBAjBtC8t1YkGNi5Y8r0xHPn0pHlrJ3JJ0BYCbJwQkAH5jhJL8qezl5HrWSW0NnVItbyP4kN8cE9ucycVh0+2m/nlM184drvkmyJwHgrbML1bWBjWaXZOOHZ8bMJeluzdts13I1WyQLSF4dzb/DpsPsJJJuaBpKtKd2oR0ZClwJug6vJOHfdTE6XlxPckAY7xbRbWceiHkkJ6Z201l5efw93T8dzkNP7d/Z8C7JfckAAxgI4AmSVSJFTZkkF2BuK/OkX/TKRweALIj7Sd6cfVHS9QAeTkAEALuh/d1Sl5klfQjgmlYBuEqdVQDg2KBTXgawfwbEDJLuq3NFkg9/zRMcUOIsJTuQrVB7AZiAataFTIu8mmPFVpKuNL1LTmB3u1kpyqqV/LUY7HYXisnqDnEqijipOEObVXuEpPtiG+dGxP83WZUWd3C95YIkN+hmGlxKONqsJel6pi2pO8RhUF0YlXQKgDU5s9xGsuY6kh4MiiU9bHRCUEmyC43J6NhC0rV9W5IXRusSWaywV98rnZURJFdI2huAD1mSaaeSnBHgis7ISpLD2rJ+++L1SWT3RB9ghqwmkgzKjX1WNgMYRnK9pAsAuAxYTNLRxu+5l1hYYGRuBGoWkCQzgu4L7kjOgP3WodRRIAGQGJen33VLch7GJr8HAIdCh8Q8yW3MWwDwWS2EkqvS/YBJ2UsyvehHAPIO3QSSj+VNLMkJzKRUViaTdNHYlgSf+jxJk8R1DY3byQ05GS/vMNaSSvii/VEkaxlUUjr5JMY6gt3QluX/eYZLlJ6k+KvUUkpyqj8+OirH300pALWiLSHAJJnVMK/kusqs9RqSTjptS3C0+S1lrF5TTX266uw0gxf2FTf1McDkUWVapZsAKtEqAcIu4FJhZBkT3S0AwVib4lxCspjYCgC+yLBf+0DXYnuRdBGAI5trK+efuouPInLXodMhtCGt3g0AKZp9YB5f1Yhe923JokaHs0sATK8XXnSUXXAkbWEuzd6oXm83ZkpKaPVpSY7J01l6eZFcdESX5cu3jjDWiXHBRLvpcV1WeLGRjC8FEAfbienx6JZmdZC5tttOBuBkeW3ehUZ2FyoBCBAurWv3ZdEPd/Ka1W5Td5FR5JKVAaS2OHvRbX6mJT41eE5TM52/6M6uQNDxlzvhAdga91gusat81cDVquurPQA4QS3s2lcN8rYyyOGzfLdQ8cseLsiWu7NrN1o17UJVJ+zW123+BfogD+TkdLQFAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusionActive{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACItJREFUaEO9Wn+MVNUV/s59+wOqyM7bFaxAsDBvFqnWak0MYhBQUEqUVssi/aNJawg7bxaKScFqqKyt0gip4sK8XUKqjX/IL43RlqBSxLZWYqwWdWNh3oIlFClkebMUaXfZefc0983MMjv7Zt7MLrvvn93MPec753v33HPuPfcRhukZt+3YeCndCQpeCO3kmWVTTg+HKbocoKHWjpnEuBfMd4GgnJ7ADAcCJzx8iUlE0AGcBOMkiPYz4c1kNPzXodofNAE9fvheQCyBoLvBOA/wHunSHq7CiXM9+BdWGj39nGuxq8dWYyJdxCSh8UKAFoIwBpL/CMidTmzam4MhUzaBmpYjNwmNVoFEA9jdSEx7zzZFPhiM8dotiduYeAFIWw2Wu6TLm7pW1n9SDlbJBK7d+rev/c8du5aAVQC/Lok2dEWNv5djrJBsTat9s2BeA9AiBjaN1s499eXyW/9bCnZJBNIG0AbQKCb8OhkN7ygFvFyZUGvHQ8R4DOBuSWgs5QUFEkiD8nYAuyuJmk5Hw2fKdawc+fGtHeN6mbcAWMxES4NeVlECequ9DoxmMK9yYpHny3FkqLJ6PPFTEG0CyyedWH1zIbyCBPQ2ewYk3ndMI3CWhuTsOhb6uMQTEBWfOdGpr+Zj6ZbNELjdaTQO+tnxda6m9R/XCa74AoLnO42RfUNysJjyuvYqffyo7QA/AKCXQYuSZnhvrorelpgHSW9LSn2jK3r9P/PhBhLY1V6ld1b/HuBPHDOyZricn/jsidEXRnXvIOD+SzaoS7r8/a4Vxrv9SFiJDQDd5NT13IeGGy7mjg0gELLs9QQsQAp3OiuN/wwHgbrfHh4ju8UOEH3XB/9LkvxAbm3RW+yrUIE/MbA3aRqPFyTgFakKcZCJfhK0+gdLbKz1aUjDaJWG5xfCYKADcB9MmtM+zcpksuELMiVn5Ba7fjOgxxMvgjDKMSNLB+tgMb0xW4/UVUpth7dnCnp8so9uJbaD0e3EIj/OqvcR8PY2VPGqJL6jlAISZD9//Op4+zWSqncwcGewLh8il5eeXVF/OFc2XVDpPXDqwezeqY9AyLJfIpbHiuXcYMP+EnqLPREVUGEzMxCDcFC6vUu7mqYf95PV40eamcSUpGn8SI1fmgHLPiUFL+lqjPw50EgZAjVbjk0Wwt0J4LYgNQYOVBE9VKza17QlZglJOx3T+Hofgdq2o3dJKduSpmEEGSlnfOxWe6pwsZOA75Sgt1dUu0s6H552Pkg2ZNm2EKLxbOPU/d4M6FbHBma+IhkzYkHK+ePpKa34d9Kc2pY7VmcdrpfQVNh8OxCT+TVnutGAOZQKlAUQittxIrrgmOE1aQJx+30p8Xh+AQkC01vtR8B4VskxtFlJc8pfPLw2ezokVNjcEIThjRP9zomG+zJLkE7NZnu2EFjvxIzbMzNgH3c1zD233DgapJwd17fYM0DYD8Lo9G/s9GpX1p9ffm2nZ0DDgUAstcsVNAGMWQBtVG80UAeACk3NxTuOaUzOEkg5KVwx4BhYBE237P0A5vYTIXreiYZXpWf1SDNIrCsIwfyCE4s8rA7/qV73EIBrADzimMamQBItdrVegQuOaVSQAui96H6WjBnjAhUzAnXWsXoJt1+Ozgy1O6Zxo+e8JnbBlQ1+JBiIJ02jqW824/Z8EN5KT6R8Uv1R6dzDyTz56T0Ut89UVmk3Ut1W+xZXYlsyapSSKTy4Osu+XwKv+xFWu0aBio1gXA+BhgEkGL9xYsbP8nVrrY4VDG7JklAOhyz7AAGzc3/L6oVa7Y80gWWDIhCKJ9YQ0TO+MybwTVHpnnB7tDcIuDqXBDM/nYxF1haaabX4ZS+8SFAJRa2lrGx+gukjMJgQCllHFxLkH3wc+coxjTHq95otn08mUflLltoTXU1TfKtqqSHrJ9cXQt6Cs+x+izgni6iicgrg0wBtdkxjtwfmHUSqTgGkmlW5jzrB9W0Xai37MQYWAZioml0ADjmmcfNQHPd0cxdxhkC/NFrXdvRWKeWH+YYY+HnSNLzQ0S37OXgtlpyHaYETC3sNqlrLfoOB+/IwzjumcdVQCQxMo/mFzHvD1ertV+UbIynvPttUv7/muS9qRHVK5Xqv0hLT2rOx8NPq/0JrhIF3k6YxZ6gEfApZx68Aqc4Bq7PgqjqDMMPHWCcTzUlGw+211pHvMcRrquXimEZDxvmlRPSyr5MFMlC5hHQrsREQ3Y4Z/oVXyNLNWd7mmMb0LFiOc374Ddn1oFv24r61obCsRAuBVvgpFTqYl0/A/pyJlqnm8KXtdKt9glz+Qe5ZtNayP2ZgwKJjRiwZMyw/w7pl71JNqQHrh/nRZCyyoVxn8+W9fqpGrzhRY5IXupdCJvEiwMfzK57vYswc99KxKGdDCHaihldB+xWfDDiDNyfNyMqhOu8lD6860+TssbKkI6WuSj3oW0yYSZBnwHxKEc3dtGUbYF5Xg/k6CNHDTB9o4A87zfBHl8P5okfKNLvyDvV+BC6Ho4Uwih7qlVK5bZWRJFBSWyUTw+sJtLCSMC+oEz1SBNIda+xj8J6ijS1FQF1kdLtjVYE6ns3thaZ0pAhkMtvkUdq5OfkXHwWau96FxsdBbfWRIJBts0vCLX79qoKt8+zFRrH2+ogQsGwudtFR/IIjeyws0GYvtl8fajbKttVBaM7WGD/MwMuL7EUHwBuRoqeGq2PdV1C9TjSvBWh1sYuNrHwgAS+9pi88tgIYx0TPDFfnOhO2jwI4Iym13O9CI38WSiLgKe1qrwp1VjePxDVrsq6nOf8io1BIlk4gg5B/0S01emew/VSvz+ny3BG56M5/A6odz6T9kIB5DHwFxtsssbuUTw1IYDEI8wm4koF9xO7LI/apgd9UquYwS74HzHeU+LHHeyToLdWcHWq2KjuESjU4Up/b/B9u0kgtWdqPkwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-occlusionActive:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAACJpJREFUaEO9WntsW9UZ/33HaZJCX7S5TmhalQ1NaAzGYJUgvk7pe5QKusGa0v0xaZvQkKBbK60BWl/b8XWKaLWtUJg6IcG0P+hrCMHWlcdK2OLrFPFYGdU0ac+q9BHfFPoC2sQ+33SufVPXvfa1kyaWolg+3+t3zznfd87vu4Qx+nQfONc8yF+0KvP1NPHoxjsm9Y+FK7oSRo2+fh0I3AUpFwHUyoxWIv6EiI4o+8w8m5mmE+EowEchxH4g95rZ1myN1v+IAUR6M3eRwCqAFgM4C8ZeZuyFmHDk9OmpH2+7my4UB7fmj9wwderpWZBDs4mwHOoPmAzwn1hiV7I9+NpIwNQMwOjtvwWC1gLUwVJuIfA+s73lnZE4N3pP3M6gZSTEeoB3Q/JWs735w1psVQ0g/t6xq+T5uogkrCXQKyDebIaCf63FWTlZI525FUydDF4hGFtFYzYZnzvz82psVwVAOSCI7QA3MuMJU9d2VmO8VhnDsh8gwuMAnWfIh6p5QL4AlFEAO5ixp45yj8T1lkytgdUiH7dOBLMceIYIKwGs9ntYFQFELDtGQJyJ1yZDwadqCWS0spF05qfEtJWl7Eq2N8fL2SsLwLBOtgEybeqa7yyNJthYjEVucSYqRN1HCX3GS6W2DMtmQIRMfUaflx/P4GJ9x6+Tsu6/xGJpIjzjzdEEWEk3tvtQvZzVsgPM9zEwJJhXJMLBfcU60dTJJUzyDSGyX+pqu/Z/pfYuAxA7xPXytP17YvowEdY6xyr4dekjEydxo0oG9170QadY8neS7drbl4KwNzPxLWKqdk/XTTRYPHYZgGgqs0kSLQsExJ1dd8w4MxYAOlP25AaCCv5uD/vHIHP3FdeW2IGTU3I5+WfBvC8RDm4oC0AVKRbUR6Af+u3+kQJ7rPfwNXVi4k4CLS1vg/+Vy/H9m+Y1/82VUdmQwc+T5LbiYnfJDBhW5gWAGk1dWz3SACvpxd8705QbHNwJ5kV+9r2yj2HZOwA+b+rBH7j6wwDyZxt6CcThagqIXwCl47GeTIusJ7Vs7vTTZfDBHGVXPxGa+Y9i2ULFTrHk+92z00UAlv1bSPmfSjnXz3G58c6ej2c1TGjYCYLub4P6JAZXd+szD3vJRnr74xDiy0ld+74aHwZgpOzjknhVtx78i7+T6iU2Wp/OEZzdBcLtVWj1BJB7oFK132hl5gmmXWZYu3YYQDQ9sIiZt5u69pUqnFQtErH6rycWKvhv+ioR9l2QWLU5rJ31kzUs+59E9FAi1LTfmYFo2t7MzFebevBhP+XScTWlVCdOmG3a9uKxSMq+QRB2MvANX5vML4shraNrAWV9ZQEYVuZZIvosEdI6HQCGlUmzpA2lBcTPWLTPXscSv3DkmOeZ4WCv+ho7cPLGXC63i0A3+dnIj9NvTL1pOLP46UR67fkkeJOpB0MFAPZhxoSFSX3av/2U3XHD6m9j0H4CTSz89kmgoeGG+NwpA3kH6PGzxcAOAbQyMI8IW9QT9dNR4xHr1PWEobdMXZvjAIik7OzpM01Xl14DKxkzLHs/gIXFMgR6KqE3rXVsqqUlRKy8DX7e1IM/2nCgvzmQFQdBaAFjnRnWtvqBcK6nUwY+S4a1OlLswfnc5x+ZejDop+iOq/VNhEtytLOKwIeSevBmFXxgQt3u3FC2wwsEMT+bCAcfGbZn9S8liNcdG1J2qf8qnTsps/ApTe+Glck0Bq66mWJ99m3MeC4R0vwzRcFYpM++lyRe8QKsTo1STtgC4KsiQB2lIAj4eULXflaqG7UG1jD4aReECthI2z1gzC/+zdWLpu33ifDgiAAYVn8nIJ70BBAQX/siK480CLwKJq0YBIG7E3owUm6mnc0/JJ2VoBKK2ksXZ6DkhOoCGMkSilr2cgb+4BHIOVPXJqvfN1rH5giqT0gORLv1azyrarVL1ktueAl5beKiLKL4nuMg9BPxtkQouEfJOxeR1ubjAKaXbOJ0Qm8aPi5E0gOPE7ACzLMAtBJwMKFrt44mcKV7ySZWPxjWpWk0lrLnSsK7pY4Y9FhSb3KWjpG2fwmGk3HcD5NYlgzNcAgqI22/CsY9JTbOmro2ZbQALkujpYWs8IRVSa8vdUa53OLEvJb9sZ5Pp3F9tsettAyKJPWm7vwDKbNHCG+bIW3BqAFcVsj6BkzkuNEMa+td4woUQG0ezgYCCCyI69MPRdL93yYWLyvKJRnWOpy1n7ZXC8aLXkGWy0C1AjJS9hYE6LzZ1mTkK7EiZ6V4ztS1G11jbnCegRB3uPshms6sdL87+8nKPE2gNV565S7mNQOw7L9DyAcVOXzxOG3ZRyBz3y2+ixqW/QEAj01HD5t606+8HEdS9u4CKVUyLB819ebNtQZbKq/4VIjA70xdm63GigBkXmDJhy+reB6b0b3u5fO0nA8hOKlrTgUtLj7Dmxu8LakHfzLa4J0Zdo4oNMe9VlZ1pYyoUk/i62DSAc6wlMfzpf7ioc0lwAqsxnUEugDB7yCLd8127f0rEXzFK2U+e9R2qfcCcCUCLWej4qXeAVAjrTKeAKqiVRQItQQgaLng3BI/Jnq8ACjGWlLgTUjeW5HYUgCcRsZgfY9UG7qQ28tN6XgBUJlNCJoj6gcXlDY+PMndwmb5wI9WHw8ALs0O4tu8+KoK9Hq+sVGJXh8PAHl6vXyjo3KDo3AtLEezVzqvjzYbubQ6A3G3xpQ5nlR25TY6iLGF6kRyrBhrNwrFRHNWRpiwvlJjw5WvqvuSb3gEfs2gIAFPjhVznU+VeJTAGSFyP/ZqaJQ+7qoAKCXV+OBTdnw82qw0TYuXNjLKrZOqAbgGShvdLOitkfKpiuckyQvHpdFd+gQUHQ9B3yPGEhDOAfwGS9pT1asGgldCNTgYk5igCtSL4/aqgddUKnIY4G8xc7ialz2IKAXQ64qcHW22qnkJVetwvF63+T9nAHfjRfzL0gAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-logSave{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAA1RJREFUaEPtmT1oFEEUx9/bFLFKJzG2WiknZObFxlO8RtFC8SuFWlrYGBtRRNCghV9YmFQWgoVaaAS1ULRRRKvbmYBBQezVYBOIGFMkT0ZuYXPufOxdspuDO7jibmfe/H/z3sy8eYvQ4R/scP3QBSjbg8EemJyc3La4uHgUETcx82YAWNum+N8A8IWZrxLR41ZtBQForUeY+Xarg/j6MfMVIrroa5f13AuglOJWDLfQ56aU8mzefk4ApdR9ADiW12ir7RFxXAgxkqe/FUBrvYeZXzQbY+bh3t7ed5VKZTrPQM2eNHYQ8VGGjTtSypOhtq0AcRyPIeKptCEppTfkbAM3AxhbcRwfyYJg5nEiCvKEVZBS6hUA7EoEIeJ+IcTz0JlpbpcFYNrYIBDxlhDijG88lwd+IGJ/YoCZ1xPRd5/BUA/Mzc31VavVWRcEM18jovOuMV0eWLL7tBM+RoBS6isAbEzERFFUHRwc/JD8dnjishDikg2iSIAJADiU8uhdIjqRFuZYEweI6Gmuc8AWs6EhVK/XR3t6eg4zMyKiEQ/MvOSwQsS3iHhhZmbmY61W++UIp/dSyu2FAmit3zDzTjMoItaFEFuVUt8AYCB0ElLtZqWUfYUCZHlQKXUQAJ60AAC2Nbhia8AWglprAoB7jYQwmGXVACSKzRqJomgLAJjvBh/JqgPwCQ7dRAoPIZ/w5HkXIHQGQlOHvCd56PjdEOpoD6TShT/MfD19OXeFQCPnOYeIaxYWFiaGhoZGQ9Pv5nZthVA6XWjkOsMJRGj+b/IhIURtVQCkIUJvYKUCONLf/+67tjuw+T+rLlTYLmSDCDmwbOIbF6CgC1Vba8B3m3JBuMQXDuC4iGQy+MSXAhAKESK+NAAfRKj4UgFsEHnElw5gBGit9wFAUqy9kbco1vY2Gsfxsha2QrbV1K42gIimAPDvw8zTRLQuy0ZhpcU8AMZ7zPws1ee1lHJ3LoDlLu7mAcioZFuLvYWV130AU1NT/fPz8zuyqtWIuFcI8TKXBxo7QaEvOCyQD6SUx20T4K33F/iKKVOj7yrqBWhsiSv6ki8zNBBPCyHGfKEXBGCMrMBr1mZtPxHxEzN/jqLoYbr07oIIBvDNRFnPuwBlzXwybsd74C95KWhPrxIhsgAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-logSave:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAthJREFUaEPtmTuMTUEYx3//TrWdeLRUJCrReISGUBCvLVAqNGiEiASh8IoClUKyBQqPBAWhsREqnYRE9NgoV0T3yci5m9mzc2bmnHvvOXuTO8ktbs7MN//ffPP45hsx4kUjrp8xQNcezPaAmW0EDgFrgLXA0j7F/wG+AlckPW5qKwvAzE4At5p2ktHusqTzGfUWVEkCmJk1MdygzQ1Jp+u2iwKY2X3gcF2jfdS/I8l5O7tUApjZTuBlwNIk8E7STHYvQMCTzs6jgI27ko7l2o4B3AaO+4YkJadcVcdlAGfLzA5WQGR7IgbwGtjuCdoj6UXuyJTrhQBcnQjETUmnUv3FAH4CyzwDKyX9SBnM9QAwIWk2AXFV0tlYnzGAebtPP9OnEPkNWO2J2STpQ+9/xBOXJF2ogmgT4Amw3xNyT9JRX1gEYq+kZyGIoQGY2UXgAPyPt5x4V8qH1TRwDvgk6XdkOr2XtLltgLfA1qLTj5I2mNl3YEWDdTQraaJtgAVryMz2AU8bAFC1Boc5hYKbgJmtB6aKgDCbZdEAeLuOWyPrit+qFMmiA0gJrjr4yu1an0Ip4Z6Hss6hMUBu6FD3JB9PodwRGGkPeOHCX+CafzmPDUAR85wBlrgwQ5LbUueV3AHsaxGbmR8uOAGTPYga8f+0pG2LBWAOosYNrFOAqith6L5bdQee81optG7nHIjE8DlnVlB8EVa3AxCJ4VMAleJbB2gAERXfCUANiKT4zgAyILLEdwoQgcgW3zlAIWA30EvWXq+bFBvESTzQxFZqSyqdAe7i7xIAvTIjaXnIRmupxZoAznvPvTZvJO2oCzDQ5G5NgPKbRGWyt7X0egrAzFwedktFtnqXpFe1PFAsxLYfOEIaH0g6UjUAyXx/i09MQY2pq2gSoPDEsB/5QuJPSnLrMFqyAAqIQT+zloX9Aj4DX4CHfuo9RpANkBqJrr6PAboa+V6/I++Bf0in3kCazcMZAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoom{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAkUExURUdwTMDAwL+/v7+/v7+/v76+vr+/v7+/v7+/v7+/v7+/v7+/vxtcv/AAAAALdFJOUwBVdZCpGdZE7C3B0wnY6AAAAV9JREFUOMt1lDtPwzAQx20ghGwVsHVJhQRDlsywWKqEULsw8FhRJ2iWiglGGJvFCw8xIVVCSEwkKU25L4ftpOHs2Cclsu7v370smxCLecRh+xOH8Ja5kGEs/6dtYf1XONcWZurbwwRCQjYZ9l7uHAPAOBHpI1QC/QSY9g84ldmnAn7Z3htwsfZnvSe54eJd5hlcC7gccxTwSETZEr5+714vLRdfkFraVNtetXLpR7ha+mkHCV1Y/q8ZOW8AgDkecsIaAEIcGbIGyLUq4KcBYl0o7QAB4FZACBMrQKpaJOCZQqyAIhgayYEpgD1DZghXCvBTNJFKmCvgzmhcCEsBwMjSRx6BslYftRX0JLYKrAsLqzDC54EFMwvy58QhMM8hFNq0UpwET+sLC9/4BmEBTytyRCIbDoAEiR1Qp1dbRxfoyv9g3ogaKVuXhVZZbtqX6Ez6H23PxG4CM259QDwt/h8ABfK8nDqSAAAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoom:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwCCyreU7KZVRCDaZnETLwj6WaYVAAABUUlEQVRIx5WV2Q6EIAxFoVBWxf7/184AOnGUsvTBqDmXrqRCzNou1kwGtyZIQNuiD0P6evWTURFUMtIoPO+iVoGIZPkMqkdKA0jZgoJ6suQc2EoiGBldOoQ9HSDk5+GTs1Fqo9IlcEpvNv3qv0MBhSalIFSv3+MCJCY8fUaCxasycrMu9dp5VTUhubXZ6CqsAvn66ZAsx+e8fON37oT3bZ4aiRU0kDlavGSrQI95HPBZACt8FuCL16IruBVkzBeBW+CLYHvyfiDQd96IpHpOMqP++fAq9VMQ7rwrM5+6gjwG/3y/D/m8ylPYpvpAeqO7DfvwMPO9D6jnBabG56YFZx77fEjD+9AyLdYEhp8nxoNh5wmJtfY8AS+wzIZZrJNcC4h3wV8IH1p87Iyfnc6XVaAd7ICHAsebw97zgDSxZ/yvViiPuYUfTe650knM2+7Ywz9yOCklzohLOwAAAABJRU5ErkJggg==") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoomStop{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAzUExURUdwTP///////////////////////////////////////////////////////////////8/RimEAAAAQdFJOUwDjmTC6Y0KBVakX8s8iC3JYR1wyAAABVUlEQVRIx62V2baFIAiGcwJRS97/aU/Zbtht0VzrcJOuvl/AAabpXy1RF0F/m2h2PX5mzucEuO9gMon1MY7KlG8w4LImC1XFQmxDGVkm1DYpXi0qS1gXTEGzKoqNS1ajAxPqJDikFLcFS+aukYJffRfXnAj9kYUXFVi86wzzPjuCFRXBwS3KaC/Pt02Ww7uf1jz3BVYtX/OsyDQFDn7yswPXb+Ovs39eJJWwxrOXV4thgC+//QBf/uMAXwAa4AuRBvgdWR58CB2B+eaRG5e8QO7Jn2sIAvzhbdsDnXzev8q0BengGXv8EciH3y1CY5++yI/BRNx82g/La7lc7b0Am/tUC6n3HoZ4SbDyy5BgzSNivV6wbPXeIPOpHlOU+CjkTQKvQOpXdRdJvn+5xttWQa4EZUOzluonT6+q72X6Zb0+T/lNhQd7hg9vm8LWUhW5gT4iN7c/0ZUo8Q3AttYAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-zoomStop:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAqUExURUdwTBKV2hGW2xKW2xKW2xKW2xGV3BGW2xGW3BGX2xKW3BKW2xCX2xKW2yDN61kAAAANdFJOUwCAVKxm3T/DmhrxKw97YQBGAAABaklEQVQ4y2NgIA6wGqCLMCqAqV4HdIm9F0Ek22UMM9hiG4AkVzQDA+cmx+YyJJnDlw8wMNQaNpfevbu0QgxJgrN3JQPD3VvhjU57kESnOZqvvXuJgcEXxVFMEkDt1w11gZYwoVgue3d5SzaQSgCydZG1TMkBU8vBuq9guBcqNBNDgj0GQrMEb0CVYEmA2ViANRQZ795tQPZduADciXcVUNSthGu4hGrAJawagBIXsWoAClzGqgEocRWrBqDIrQNQDTPRXZ8A0cB41wBNQgGiQfbubTQJAagGDB0GIA0OsnevbkCTCADiu4J374ahW34JqAEIbiXMRJOAgkvMKJYgJBx6717AKiF4F4eOu+jxgQCXGHBIKPDgkBC8JYCURJDtQHYWN4oEcvpZiyR+C9lZtkgSKKG1CyGOGrxItleixjrcLFBWRAYcMIkG9NQMiY67N7AlcxAQwMwA6SBxM2xZQ3jtVRPsRQ83sg8ACMIUxzzE8wsAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-close{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTM3Nzc7Ozs7Ozs3Nzc3NzcrKys3Nzc3Nzc3NzePZJxkAAAAJdFJOUwCtKdPBGAmNTt3jdDcAAADfSURBVDjL1dOxDoIwEADQgwR07GTCZtI/IGHgAzBhM9EPkMTB0Y3V0ZXIcn/rtRR6pefgSKeSu3ellyvA9lZ/5F9p/3K7PZY8oPG5BD6MpPUSgIITzdIStifAshjRQV1PCFT8TxaicTzzwEwINOEdHVmDmcTAkRhMhMAp7iQRjcMtDhCp8SA1v0ARGIIK/gnkv0p1OBTS4QRUIpE7DiYYXTBrzcld3JIrAarXrps4AVNwRSZgExoJmIyAaAdsShUMn/JF2fh4YEkpAcgvnuwYCIb6EbbbP4PsDfLD2dD6Av1qTvAQlzUTAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-close:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTP///////////////////////////////////8kBMKEAAAAJdFJOUwCt0igUwJdJePGbgLgAAADcSURBVDjL1ZMxEoIwFESTCaOWFDapqeicnAALTiANnaWlnVewDTMW/7b+aCAb8jkAVIHN2/lsNkrt73lf8M08nnF1pAYFR/dFmAAx7SIoi4iDbRrWDMAuQFzmmxAGbjjJgjj6dCjMCAND/o8RWQMzUgIRKYE/wsC5TJIRR74rBUZaqqXwLZEXT0WTDGwLW1aavJWQir9qadw++NgykWoMNtcykh8Q5EECgr5C+jjpGjHjPGhPU5eVzyfPJitfnUyhPg6ywMKZ7BygcYcsPCj1Kc8uXYPqpeSLs6PnC4w8S+8OJ9MLAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-narrow{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABm1JREFUaEPVWWuIVVUUXmvfYRosHzUZUUqKjkSXSe5Z+5qJhfawLELCR5ohPhKjjB4EWgkpkopRSWEPS1Mqy7Gkd0iPGaKy6ey9Z3z0opwEQytSMiS5NZ4Ve7j3dubMOfecO96buf/cx17rW+vba52919oH4RQfeIr7DxUjoLW+BhHHAsAAZh5gPwGghpl/TKVSHZ7n7T9+/Ph+ANg/atQo+1mRcUIEtNYzAWAiM09ExLPK8KgNADYw8wYp5Z9l6PUQ7RWBvON3AMClJ2Kcmb9DxAKR33qDVRYBrfUNzLwQESf0xliUDjPvR8T1RLSsXNzEBIwxc5l5fYSBnxGxxfO8bQCwN5VKHc7lcofr6+tzR44cGcTMg4UQgxDRfp8IAJdH4KwlooXlkEhEQGv9EAAsDQF+GwDWEdE75Rg1xlwFADcx83QAOCOg29SvX79ZDQ0NuSSYsQS01h8BwBUBsF45HnTIGHMBM9uFmR2Ya0bEWxzHORBHoiQBY8xmZp4RAFlNRIvigMuZN8asYOb7Azq7hBCTMpnMvlJYkQSMMUuYeblf2fO8ZdlsNiyVyvE3VNZ13XFCiGb/JCK+6DjOrLIJ2N0GAN4KKG4hIpuzVRtKqf6I+HvAwAIiWhdlNDQCSqntga3yUyK6rGqe+4Db2tqu8zzv3cJfiPiLfQYdx/k6zH4PAvlD6iWf8B7P8yZls9mO/4KAtaG1fhgAHvCReN1xnClJCXweOGFLhrAapJqamlLDhg372H9eMPNMKeXmoL1uEVBKTUXEJp+QJiJZDSfjMIOZgIibHMcJbrfdq1Gt9WMAcI8P/D9f/YJtpVQfW7n6isSDRHReyQhorXcCwMV5oWN1dXWD0un04bjVqta81to+i7bi7RpCiAmZTOYDv71iCu3cuXNQZ2env07fRkSTq+VcEtyQ7XwNEfkz5N8Ucl13khDiDR/b+ZlM5vkkhqopo5Q65Euj74loRGgElFJ3IuIThUnP8xqz2eyeajqXBFtrvR0AiuU7EXXbeIo/tNaPAMB9BVBmrpVS/l3KiDFmBjNPKbMbK0A+6zjOq3EktNavAUAxlUsR2AIA0ywgM3dIKYfFgRtjmph5apxc2Dwz/ySlHBynq7V+wV+tliLwPgBcmwdsJaLRceDGmD3MnI6Ti5j/g4j6x+lqrZ8EgGKTE0nAGPM0M9+Wj8BhKWV9HLjrukuFEPMBoMf+HKdrm3oimhcnFyy1IwkopRYj4soCYF1dXf3JPAMKfiilNiFisaSOJOC67nQhxCu+h3i0lLI1boWqPW+M6WDmoXk7+4io8L3rr+IuZIwZycztPocWEdHqajtYCl8pdSEifuOT2UhEc/w63fZUrfWvADCwixlii+M4408mAa31AgB4xufDHCLaGElAKbUZEf09cAMR/XCySGit7TXO3IJ9IcTQYI8cLKfvQsQ1BYVq9sBxi9La2jqipqbmMwA4Oy8bWtoHCTiIaBua0/JKB5hZSikPxhms9LxSah0i2i26MHoUct0eYt+2tRIRF5/MKGit7YFqD9auYU9tRBwfls49emJjzEBm3gEAxVKCmadJKbdWepWj8LTWHwLAlb75hUS0Nkw+6lbidkTspoCI6aibgUoSU0otR8QlBUxE3Oo4TleNlpiAFQwWUfa/XC7XZ8yYMccq6bAfS2v9OADcHUidqUT0RdkE8iS+BIBsQHkkEe2qNAml1HOIeGsA914isqQiR5LL3aMAcHoAYTIR2av0Ex7t7e3ne563mplvDoIh4le2xC+VurEE8pGwh1m3/sBec3ie96iUcndvWLS3t4/o7OycK4SYw8znRKZIDIlEBPIk7IrfGDB01JIAgJZsNtuShIjruplUKmWdtidsMLK2lFmFiPP8fUapSCQmYJ2L6cDsNfh7iLiXme1VjG3GOwFguOd5DYg4HAAa7O/Q3QTRXiavchxnhzHmIgCw3V6xWYoiURYBa9h13atTqdTssJxNEoEImQeJaIV/LimJsgkUjCilLrGXToho33mFrmoMod2I+LLneW9KKb8Nk01CotcE/AaVUmOFENcz8zgAGAIA54Y4dAgADiCifejtjcQnSSIWRgIAniIi+5q3cm/q/c40NzfX9e3bd4gQ4kxEPFhbW3sgnU7/lcThJJHwV8kViUBvHStHz0aCme2qe7W1tasbGxu7rkFPGQKR50Q5q/B/lP0HjgOoT/ydvaYAAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-narrow:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABS1JREFUaEPVmgmoVVUUhr+fosKC5ogGSsqIpKQwMqjIBpsICdMGQ7ISo4wGApugJCoxLClssElpNEuaI5okKjOI5onKhEQrSiKiaKA/Vu3zOu+8c88593qvj7fgcO99e6/h33udtdda+4khThri9tM1ALaPAQ4Btso9GwNfAyuBb7JHUnzvCq0XANuTgePSs00bFr0L3BuPpF/b4BswtSMAyfDzgYPXRznweQ7ID53IaguA7ROBGcC4TpRV8IRL3SNpVrtyGwOwfVYoaaHgW2AZsBT4CliXnt+BXYBd02d8D5c7rIWc+ZJigRpTIwC2rwauKZH6NLBA0jONNQK2jwJOAU4FtijwPgpMkRTga6kWgO2XgSMKkjoyvGiN7d3SwpxZGHsVOEPSmjoElQBsPwScVhAyR9LMOsHtjNu+Hri8wPMBMF7SqipZLQHYvgq4tsA8S1KZK7Vjb+lc24cDsfJ5ul/SlLYBpGjzVIFxsaTw2Z6R7S2BnwoKpkta0Epp6Q7YfqEQKl+XdGjPLM8Jtn088GzuT9/FOyjpkzL9AwCkQ+qB3OSPki9GOrBByPZ1wBU5ZY9LOrkpgDcLJ2zlFvYCke2NgFcK58VkSRFU+lG/HbA9EYg4nNE7kkb3wsg6mSWesEhSMdz2z0Zt3wRcnBO+wVc/0217WMpesyRxraSd6nbgfWC/NOm3OP4lRVowKGQ73sXIeDMaJ+nFvDF9LmQ78pR8nr5U0oRBsTwpLQnn8yTlPeR/F7I9HngiZ/A0SXcPJoDQbftHIHOjLyTt1WoHLgBuyQ3uKylC6KBS8UyS1C/w5F3oRuDSnLWbSPqzynrbkSdFfG6nGstE3inpkbrVsf0Y0OfKVQAWA5OSwJWS9mggPEJuhN5OaLWkqBMqyfZ9QF/4rALwPHBskrZC0pgGwsPFRtbNazH+s6TIfeoA3JqqwH/nVQG4HTg3SVsnadsGwiMznQYMiM91vKmgP7tuXjHVrgJwGXBDTuC2g3kGZHbYXhQVWva7CkCkyg/nAIyRtKJuhXo9bjuSyOFJzypJ2ff/XCqHdBTwXs6gmZLm9NrAKvm29wY+zc1ZKGlqnqeYzH0PbJ8mLJM0dpABTAfuyNkwVdLCKgDFGniEpC8HC4TtaONEOyej4cUaubgDFwLzcgw9q4HrFsV2pAxvANuluaWpfRHAAUAUNJsmpmhrjJa0tk5ht8dtRx0cITqjAYlcv5c49zJHKI2QmtEG3wXbcaDGwZrRamBsmTuX1cTxEi8H8qnEJElLur3KreTZfgk4Mjc+Q9L8svmtuhLnAUWGka06A90EZjt6UdGTymiJpCxHG6CqqrHVL4lKnMMkRaXWE7J9M3BRwXUmSnqrlcK61uLbwIEF5lGSou3XVbJ9F3BOQeglkgJUS2rS3P0F2LwgYYKkaKWvN9neGYgT//QSYR9Hil/lurUAQqjtOMyK9UEkWXMlfdgJihTn45CK1GCHChmVIBoBSCBixU8qKIrdmRuXG5LigqOWbO+fjA7jizsbqcxsINLsfJ3REkRjAAlEVQUWbfDncjc0UYz/BewJjCh8lgGNZvJsSctt75MabLUg2gKQQBydSrwyn63dgRYTrpQUdwR91BRE2wAyDbYPSk2nuPOKVW6X4t15EHhS0mdlzE1AdAygsFpxwX0CEJcUuwM7lhgULhW5VRgeHYnXmiBuAeI2SXHN272b+gKgzRKQrYFIBNdI+qOJwQ13oi8/68oOdGpYO3xpJ2LV/45zI/t3hSEDoBXYIQ/gH99H3EBePlczAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-expand{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABvJJREFUaEPVWWmIXEUQrnqzZseYxGM9QBNF4hrJEDfzqieuAY/gFRXPyMYbzUHwQBQUzx+KeBAJKhrRqEhEQWMU75AYXREPlunu3bjxIDGraIwiuJpFkL26pMK84eXtm3lvZieGFAzsTtf1VVd3V9Ug7OOE+7j/0BAAnZ2d2UmTJl2cyWTaAOBA+TDzgYjYDAB/y4eZ5fNjc3Pze7NmzfqlUYEbFwBr7TUAcAEzXwAA2bROIeKnzrkNALBeKWXTysXx1QXAGHMVANwEACePxzgzjyLi057nrczn81vr0VUTAGOMRPtmRDy7HmOVZBDxL+fcyr6+vgc7OjqGatGdGoC19hZmfrKC8t9LafEWAGzLZDL9g4OD/S0tLYM7d+6cyszTPM+biojy97kAcGoFPV8ODw8vbG9v354WRCoAxpiXAUDyPUrvAcAqIno/rUHhs9aeCQALmflyAJgUlkXEf5xzp6U9G4kAjDHcKMejeqy1xzDz/QBwXYyNViL6ISkwVQEYY74AgLkRJcuJ6M4kxbWsW2sfZua7ozJNTU1HtLW1/VFNV0UAxpjlAHBHWNg590ChUJCINZyKxeLpnud1RhSvmzJlyiWtra2DFS+AuAW5bQDg3cja60QkObvHSGstj588fGVi5heVUktqAqC1Xh+5Kj8nolP2mOchxd3d3ec55z6I2JpPROvj7I9JodIj9UqIebNz7qJCodD3fwAQG8aYhwDgnpC99UQ0Py2ALyMv7DIiWvV/OS921qxZk5k+ffon4fcCEZf4vv9i1I/ddkBrfSUivhpiMkSkanXeWnsFAFwCADNHR0fX1nPwYzJhAxGdkwTgJUQM38l1Rd8Y8yYAXFoytoOIjqo1CFrriQDwCyIeEsh6nndsPp//KayrvANbt25tHhgY+AsA9i8x/JvNZqfmcrn+Wo1bazuZ+fRAjogSH8w4G8YYOYtSOAZ0GxE9EQvAGCMRk8gF9BYRLajVeeFvIIDdrnOpt3zfnxcLwFr7CDPfFdqupfl8/oW9CUBsa63/DKXRz0R0TCUAzzDzDcGic25WoVDYvLcBGGPk/i+X7wMDA/vNmzdvJPCrnJvW2leZ+cpggZknKKWGqwGw1l7IzOcg4swoX/gMyNbH6HnO9/3XkgJkjFkLAOVUzmQyM2bPnr1lDABjjJTE58sCM/cppaanUK4BgJL44taZebtSalqSrDHmpXC1ysynKKU+j9uBj5hZ6nShLiJqT1Jurd3MzLkkvgrrfxPRwUmyxpinAODmSqkdTqE3mPmy0g70K6VakpQXi8X7Pc9bCgBHJvHGrEsjtCxJLlpqDw8PTwt3bGEAzzNzuerLZrMt9bwB4lCjrtHSLbQaEa8NgGaz2cm5XO6fuDPwGADcHjrE7UqprqQIxa03EoC1to+Zjy3ZGZN25R3QWt+IiCtDDt1JRNLU1EyNAqC1PgERvws58DYRSY1VpjKA3t7eaUNDQz+Xtybm1UuLpFEAjDFyRp4N2a1cSsTlLgCkaqyjwBoIQMrnRYH+0dHR/Jw5c3pid6B0YO5GxIdDV1ZdPbC19nLn3GOIOAUA1hLR4rS7F/B1dXUd39TUJEOFQ+U7RNzo+/5ZUT3RfsBHRGloZCgrtIOZlVLqt1odGC+/1noVIsoVHdAiIpJHbTcaU+ZqrR9BxHJRtycnEZVAGmOkfVwXOo9bJk+efGLcdGIMAGvtYcz8FQCUSwlm7lBKvTHeqKaVN8ZsBIAz0qRybKMRc6VKDuZ83/82rRP18mmtH0TE+0LyHxNRUOKMUVuxU7LWlkuLQGpwcHDi3Llz/63XuSQ5Y8zjAHBrwMfM/cy8oFAoxFWzu9iSRou/xtQ5bUT0dZIzta5rrZ+XyUNYDhFv931/RTVdVQF0d3e3OufKtXdI0QIiklH6uKmnp+co59zycC8SOrzfAEBHtdRNbLaLxeIMz/O+H3N9Ia52zq1QSvXWg6Knp+f4kZGRRZ7nXc/Mh1fSgYhVQSQCEMW9vb1HDA0NyS0UHS/KLF+2+NNqeRp2rlgs5jOZjDgtL+wBEcdlEv0oIi4O9xnVQKQCIEZkTuN53uqgZ4iJmMxrPkTEbXL4AECaceldj3POtSLicVKayP9x0UZEGSY/6vv+V9ZaaVHXpAGRGkBgtFgsnpXJZK6Ly9l6Uqkkcy8RlUsY+S4tiJoBBE5qrU9CxKvlZ1YA2G3UkRJIr4wxnXPvKKXGnLG0IOoGEHZSnn5EvIiZTwKAowEgrh39U2orRJRDLxOJz9IAjdsJAHiGiORn3sb8Uh91ZNOmTQeMjIwcjYgHIeJvEyZM2JHL5Wr6+TSsMwoCEVf4vr+re2zIDqSJ5Hh5BAQzS9R/IiJpf3fRPgOg4jsx3sjsbfn/AH37LF5g3/BiAAAAAElFTkSuQmCC") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-icon-expand:hover{background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABYZJREFUaEPVmXmoVVUUxn8f0WRzVkJlIWVGUmIJWWADTVaUldFclCnSQBQYNv1RSCWGVFRSlkRh0GBS2YBmJWGJUBHNNJiYWQSZfwTRxBfrce5jv/3Ovefc++4z3oKLD/fea61v7bXXdMQQJw1x/ekKANs7AOcA44Ddkt/2wJbk9z2wTNIP3TLcgADYvhw4q/gFiLq0ClgBLJf0Ud1DZfs6AmD7UuA64JiBCAf+BR4GHpH0TSe82gJgO6x9PXBqJ8JanPktQABzJP3VDu/aAGzfADzYhPnPQLjFUuA7YHPx+xPYHxhZ/Bt/nw4c14TP+8CFkjbWBVELgO2ngfD3nJYBCyW9Wldg7LN9cigKXATsnJ39HTi+7tuoBGDb3VI852P7QOBO4MoSGaMlfVtlmJYAbL8HHJsxmSdpdhXjdtZt3wPcWnJmhKRfWvFqCsD2PODm7PBdksJiXSfbJwDvZIzfAM6VFG+plEoBFNHmlezEc5LCZweNbEcSjMSX0iJJ09sFsDwLlaslTRo0zRPGts8AXstkTZYUOvWjfjdQJKnFyc7PgCmS1m0NACHD9t3AbYm8yNiT6wKIWJxm2JmSFm4t5QsA2wBvZ/liuqRFuR59bsD2JcAzyaYPJU1oV3nbF8fjAw4DlnTy8Es8YYWk06oAPJnF5I6sb/tF4LxC2CZJ+3VghGFAVK17JmdHSVqf8uq9AdtR+kZNsmOx4Y9I/5KiLGiLbEc4jLDYQ5IqE2aZANvxFqNwbNBNkh5oBiAsFpZr0FJJU9vSvNjcRQBRPKbhfJWkE5sBuBe4JVmcIemJ/xNAyLb9a+JGGyRF+dFLqQstAK5J1g6XFCG0berWDRQA8py0raR/et2z8YftiD4RhRq0naS/W2lv+2wgIkNEm5x630BRaufrj0l6tso6tpcAqSuPkfR1GYAoic8sFtZJOqgG8w+Ao6r2NVnfKCn6hJZkO4+MkyStLgPwJhB1etBaSRNrMA8XG1u1r8n6Fkl7VJ21/VDRBTa29nHt9A28AJxf7NosaXgN5lGZzgD2rdpbsh6N0MyqcyWl9si0Y0sBPA6kVd/wTnJAKNTlR/wUcEUCdBdJ0bX1UArgPmBWsnGipLVVFipb7zKAKCJHFXL6uV0K4NpiMtDQabakaGrapm4BsH0o8GWiwEuSosbqpRRARIQNyVq/rFcXSRcBxBt5NJHbvJQo812gVmOdA+sigCifpyX8x0v6uPQGCgDRWEeD3aCOemDb0XrGm9q1KKevrnt7jX22DwFiqLBX8X8rJZ2S88n7gSOBaGiiMg3aBEyQ9FO7Cgx0v+1ooiJEN2iapEhqfaispcyLuo5uYSAAbEf7GBOJBkXpcETZdKIMwN7AGiAtJS6QFIluq5DtlcBJdVy52VglD6nBa6ykLwYbge05wB2JnLckNUqcfuJbDbbS0qJxcJik6NQGhWzfD9yYMI9ucKqkGByXUtVo8ceSOmecpE+6jcB2XsqEiFmS5reSVQVgNNBbeyeMwioxSh8w2Y6GPzJ+2os0+H4OxPtr6rqVzbbtMcBXJZpGkTVf0qedoCjifCSpq4B9WvBoCaISQDC2PQKIN5GPF6MqjCuOsqOpn6bK2R5fKB3K75QpHpPouUAkvrTPaAqiFoACRMxpwuqNniE3WsxrXk++0EQzHr3rwVGSZP+WGTymD3MlrbEdLerzdUDUBtCQaDvSeXyQKPPZTrwpztwuKS1h4tZrgWgbQALkaOCy4hNrn1FHTRTxdmKQ8LKksjdWC0THADK/jtQ/BQhQBwBl7Wi4VNRWoXhMJN6tA7TJTSyQFJ95u/OlPlfEdjzOALI7EIVgzEfb+nyaGSh3p4h+Pd1jV26gjiUHuqe4ibD6eklRqvfQkAHQzABDHsB/7aMVT352GH8AAAAASUVORK5CYII=") no-repeat 50%;background-size:100% 100%}.jb-pro-container .jb-pro-menu-icon-text,.jb-pro-container .jb-pro-quality-icon-text,.jb-pro-container .jb-pro-scale-icon-text,.jb-pro-container .jb-pro-speed-icon-text{font-size:14px;min-width:30px;height:20px;line-height:20px;cursor:pointer;text-align:center}.jb-pro-container .jb-pro-speed{box-sizing:border-box;text-align:center;font-size:14px;color:#fff;width:90px}.jb-pro-container .jb-pro-menu-list,.jb-pro-container .jb-pro-quality-menu-list,.jb-pro-container .jb-pro-scale-menu-list,.jb-pro-container .jb-pro-speed-menu-list{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px;overflow:hidden;width:-webkit-max-content;width:-moz-max-content;width:max-content}.jb-pro-container .jb-pro-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-menu-list.jb-pro-speed-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-quality-menu-list.jb-pro-speed-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-scale-menu-list.jb-pro-speed-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-quality-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-scale-menu-shown,.jb-pro-container .jb-pro-speed-menu-list.jb-pro-speed-menu-shown{visibility:visible;opacity:1}.jb-pro-container .icon-title-tips{pointer-events:none;position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%);transition:visibility .3s ease 0s,opacity .3s ease 0s;background-color:rgba(0,0,0,.5);border-radius:4px}.jb-pro-container .icon-title{display:inline-block;padding:5px 10px;font-size:12px;white-space:nowrap;color:#fff}.jb-pro-container .jb-pro-quality-menu{padding:8px 0}.jb-pro-container .jb-pro-menu-item,.jb-pro-container .jb-pro-quality-menu-item,.jb-pro-container .jb-pro-scale-menu-item,.jb-pro-container .jb-pro-speed-menu-item{display:block;height:25px;line-height:25px;margin:0;padding:0 10px;cursor:pointer;font-size:14px;text-align:center;width:50px;color:hsla(0,0%,100%,.5);transition:color .3s,background-color .3s}.jb-pro-container .jb-pro-menu-item:hover,.jb-pro-container .jb-pro-quality-menu-item:hover,.jb-pro-container .jb-pro-scale-menu-item:hover,.jb-pro-container .jb-pro-speed-menu-item:hover{background-color:hsla(0,0%,100%,.2)}.jb-pro-container .jb-pro-menu-item:focus,.jb-pro-container .jb-pro-quality-menu-item:focus,.jb-pro-container .jb-pro-scale-menu-item:focus,.jb-pro-container .jb-pro-speed-menu-item:focus{outline:none}.jb-pro-container .jb-pro-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-menu-item.jb-pro-speed-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-quality-menu-item.jb-pro-speed-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-scale-menu-item.jb-pro-speed-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-quality-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-scale-menu-item-active,.jb-pro-container .jb-pro-speed-menu-item.jb-pro-speed-menu-item-active{color:#2298fc}.jb-pro-container .jb-pro-volume-panel-wrap{position:absolute;left:50%;bottom:100%;visibility:hidden;opacity:0;transform:translateX(-50%) translateY(22%);transition:visibility .3s,opacity .3s;background-color:rgba(0,0,0,.5);border-radius:4px;height:120px;width:50px;overflow:hidden}.jb-pro-container .jb-pro-volume-panel-wrap.jb-pro-volume-panel-wrap-show{visibility:visible;opacity:1}.jb-pro-container .jb-pro-volume-panel{cursor:pointer;position:absolute;top:21px;height:60px;width:50px;overflow:hidden}.jb-pro-container .jb-pro-volume-panel-text{position:absolute;left:0;top:0;width:50px;height:20px;line-height:20px;text-align:center;color:#fff;font-size:12px}.jb-pro-container .jb-pro-volume-panel-handle{position:absolute;top:48px;left:50%;width:12px;height:12px;border-radius:12px;margin-left:-6px;background:#fff}.jb-pro-container .jb-pro-volume-panel-handle:before{bottom:-54px;background:#fff}.jb-pro-container .jb-pro-volume-panel-handle:after{bottom:6px;background:hsla(0,0%,100%,.2)}.jb-pro-container .jb-pro-volume-panel-handle:after,.jb-pro-container .jb-pro-volume-panel-handle:before{content:"";position:absolute;display:block;left:50%;width:3px;margin-left:-1px;height:60px}.jb-pro-container.jb-pro-fullscreen-rotate .jb-pro-controls,.jb-pro-container.jb-pro-fullscreen-web .jb-pro-controls{width:100vh}.jb-pro-container.jb-pro-fullscreen-rotate .jb-pro-play-big:after,.jb-pro-container.jb-pro-fullscreen-web .jb-pro-play-big:after{transform:translate(-50%,-50%) rotate(270deg)}.jb-pro-container.jb-pro-fullscreen-rotate .jb-pro-loading,.jb-pro-container.jb-pro-fullscreen-web .jb-pro-loading{flex-direction:row}.jb-pro-container.jb-pro-fullscreen-rotate .jb-pro-loading-text,.jb-pro-container.jb-pro-fullscreen-web .jb-pro-loading-text{transform:rotate(270deg)}.jb-pro-container .jb-pro-contextmenus{display:none;flex-direction:column;position:absolute;z-index:120;left:10px;top:10px;min-width:200px;padding:5px 0;background-color:rgba(0,0,0,.9);border-radius:3px}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu{cursor:pointer;font-size:12px;display:block;color:#fff;padding:10px 15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px rgba(0,0,0,.5);border-bottom:1px solid hsla(0,0%,100%,.1)}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu a{color:#fff;text-decoration:none}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu span{display:inline-block;padding:0 7px}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu span.art-current,.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu span:hover{color:var(--theme)}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu:hover{background-color:hsla(0,0%,100%,.1)}.jb-pro-container .jb-pro-contextmenus .jb-pro-contextmenu:last-child{border-bottom:none}.jb-pro-container.jb-pro-contextmenus-show .jb-pro-contextmenus{display:flex}.jb-pro-container .jb-pro-extend-dom{position:relative;width:100%;height:100%;display:none}.jb-pro-container-playback .jb-pro-controls{height:48px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center{flex:1;display:flex;box-sizing:border-box;justify-content:space-between;font-size:12px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time{box-sizing:border-box;flex:1;position:relative;height:100%}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-inner{width:300px;height:100%;overflow-y:hidden;overflow-x:auto}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-inner::-webkit-scrollbar{-webkit-appearance:none;background-color:transparent}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-inner::-webkit-scrollbar:vertical{width:2px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-inner::-webkit-scrollbar:horizontal{height:6px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-inner:hover::-webkit-scrollbar-thumb{border-radius:8px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.1);border:3px solid hsla(0,0%,100%,.4);background-color:rgba(0,0,0,.3)}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-current-time{position:absolute;left:0;top:0;height:15px;width:1px;background-color:red;text-align:center;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-current-time-text{position:absolute;box-sizing:border-box;padding:0 5px;width:60px;left:-25px;top:15px;border:1px solid red;height:15px;line-height:15px;cursor:move;background-color:#fff;color:#000;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll{position:relative;width:1440px;margin:0 auto}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.one-hour{width:1440px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.half-hour{width:2880px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.ten-min{width:8640px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.five-min{width:17280px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-scroll.one-min{width:86400px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-time-list{position:relative;background-color:#ccc;height:48px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-day{height:100%;overflow:hidden}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-one-wrap{height:8px;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-wrap{height:25px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-controls-playback-btns{display:flex;align-items:center}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one{float:left;width:1px;height:8px;margin:0;cursor:default;position:relative;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one.active,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one.active{background-color:orange;cursor:pointer}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one.start,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one.start{background-color:#999}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-one:hover .jb-pro-playback-time-title-tips,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-second-one:hover .jb-pro-playback-time-title-tips{visibility:visible;opacity:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-title-tips{pointer-events:none;position:absolute;left:0;top:100%;visibility:hidden;opacity:0;transform:translateX(13%);transition:visibility .3s ease 0s,opacity .3s ease 0s;background-color:#000;border-radius:4px;z-index:1}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-title-tips.jb-pro-playback-time-title-tips-left{transform:translateX(-100%)}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-title-tips .jb-pro-playback-time-title{display:inline-block;padding:2px 5px;font-size:12px;white-space:nowrap;color:#fff}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute{float:left;position:relative;width:60px;box-sizing:border-box;border-top:1px solid #999;-webkit-user-select:none;-moz-user-select:none;user-select:none;text-align:left;height:25px;line-height:25px}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour:first-child,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute:first-child{border-left:0}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour:first-child .jb-pro-playback-time-hour-text,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute:first-child .jb-pro-playback-time-hour-text{left:0}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour:after,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute:after{content:"";position:absolute;left:0;top:-8px;width:1px;height:14px;background-color:#999}.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-hour-text,.jb-pro-container-playback .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-center .jb-pro-playback-time-minute-text{position:absolute;left:-13px}.jb-pro-container-playback .jb-pro-playback-expand.disabled .jb-pro-icon-expand,.jb-pro-container-playback .jb-pro-playback-narrow.disabled .jb-pro-icon-narrow{cursor:no-drop}.jb-pro-container-playback .jb-pro-control-progress-simple{position:absolute;box-sizing:border-box;left:0;top:-2px;width:100%;display:flex;flex-direction:row;align-items:center;height:8px;cursor:pointer}.jb-pro-container-playback .jb-pro-control-progress-simple:hover{top:0;align-items:flex-start}.jb-pro-container-playback .jb-pro-control-progress-simple:hover .jb-pro-control-progress-inner{height:100%}.jb-pro-container-playback .jb-pro-control-progress-simple:hover .jb-pro-control-progress-inner .jb-pro-progress-indicator{transform:scale(1);visibility:visible}.jb-pro-container-playback .jb-pro-control-progress-inner{display:flex;align-items:center;position:relative;height:50%;width:100%;transition:all .2s ease;background:hsla(0,0%,100%,.5)}.jb-pro-container-playback .jb-pro-progress-hover{display:none;width:0}.jb-pro-container-playback .jb-pro-progress-played{position:absolute;left:0;top:0;right:0;bottom:0;height:100%;width:0;background-color:orange}.jb-pro-container-playback .jb-pro-progress-cache{position:absolute;height:100%;width:0;left:0;top:0;right:0;bottom:0;background-color:hsla(0,0%,100%,.5)}.jb-pro-container-playback .jb-pro-progress-indicator{visibility:hidden;align-items:center;justify-content:center;position:absolute;z-index:40;border-radius:50%;transform:scale(.1);transition:transform .1s ease-in-out}.jb-pro-container-playback .jb-pro-progress-indicator .jb-pro-icon{width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jb-pro-container-playback .jb-pro-progress-indicator:hover{transform:scale(1.2)!important}.jb-pro-container-playback .jb-pro-progress-tip{display:none;position:absolute;z-index:50;top:-25px;left:0;height:20px;padding:0 5px;line-height:20px;color:#fff;font-size:12px;text-align:center;background:rgba(0,0,0,.7);border-radius:3px;font-weight:700;white-space:nowrap}.jb-pro-container-play-vod .jb-pro-control-progress-simple{position:absolute;box-sizing:border-box;left:0;top:-2px;width:100%;display:flex;flex-direction:row;align-items:center;height:8px;cursor:pointer}.jb-pro-container-play-vod .jb-pro-control-progress-simple:hover{top:0;align-items:flex-start}.jb-pro-container-play-vod .jb-pro-control-progress-simple:hover .jb-pro-control-progress-inner{height:100%}.jb-pro-container-play-vod .jb-pro-control-progress-simple:hover .jb-pro-control-progress-inner .jb-pro-progress-indicator{transform:scale(1);visibility:visible}.jb-pro-container-play-vod .jb-pro-control-progress-inner{display:flex;align-items:center;position:relative;height:50%;width:100%;transition:all .2s ease;background:hsla(0,0%,100%,.5)}.jb-pro-container-play-vod .jb-pro-progress-hover{display:none;width:0}.jb-pro-container-play-vod .jb-pro-progress-played{position:absolute;left:0;top:0;right:0;bottom:0;height:100%;width:0;background-color:orange}.jb-pro-container-play-vod .jb-pro-progress-cache{position:absolute;height:100%;width:0;left:0;top:0;right:0;bottom:0;background-color:hsla(0,0%,100%,.5)}.jb-pro-container-play-vod .jb-pro-progress-indicator{visibility:hidden;align-items:center;justify-content:center;position:absolute;z-index:40;border-radius:50%;transform:scale(.1);transition:transform .1s ease-in-out}.jb-pro-container-play-vod .jb-pro-progress-indicator .jb-pro-icon{width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.jb-pro-container-play-vod .jb-pro-progress-indicator:hover{transform:scale(1.2)!important}.jb-pro-container-play-vod .jb-pro-progress-tip{display:none;position:absolute;z-index:50;top:-25px;left:0;height:20px;padding:0 5px;line-height:20px;color:#fff;font-size:12px;text-align:center;background:rgba(0,0,0,.7);border-radius:3px;font-weight:700;white-space:nowrap}.jb-pro-container-playback.jb-pro-fullscreen-web .jb-pro-controls .jb-pro-controls-bottom .jb-pro-controls-playback-time-inner{overflow-y:auto}.jb-pro-zoom-control{cursor:-webkit-grab;cursor:grab}.jb-pro-performance-panel{position:absolute;box-sizing:border-box;z-index:10000;left:0;top:0;padding:5px;font-size:10px;background:rgba(0,0,0,.2);color:#fff;max-height:100%;overflow-y:auto;display:none}.jb-pro-performance-panel .jb-pro-performance-item{display:flex;align-items:center;margin-top:3px;color:#fff}.jb-pro-performance-panel .jb-pro-performance-item-block{height:10px}.jb-pro-tips-message{position:absolute;top:0;left:0;width:100%;height:100%;background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0));overflow:auto;box-sizing:content-box;z-index:10;display:none}.jb-pro-tips-message:before{color:hsla(0,0%,100%,.3);content:"X";font-family:Arial,Helvetica,sans-serif;font-size:40px;left:0;line-height:1;margin-top:-20px;position:absolute;text-shadow:2em 2em 4em #000;text-align:center;top:50%;vertical-align:middle;width:100%}.jb-pro-tips-message .jb-pro-tips-message-close{position:absolute;z-index:99999;right:0;top:0;width:40px;height:40px;display:flex;align-items:center;justify-content:center}.jb-pro-tips-message .jb-pro-tips-message-close .jb-pro-tips-message-close-icon{width:20px;height:20px;border-radius:10px;cursor:pointer;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAeUExURUdwTM3Nzc7Ozs7Ozs3Nzc3NzcrKys3Nzc3Nzc3NzePZJxkAAAAJdFJOUwCtKdPBGAmNTt3jdDcAAADfSURBVDjL1dOxDoIwEADQgwR07GTCZtI/IGHgAzBhM9EPkMTB0Y3V0ZXIcn/rtRR6pefgSKeSu3ellyvA9lZ/5F9p/3K7PZY8oPG5BD6MpPUSgIITzdIStifAshjRQV1PCFT8TxaicTzzwEwINOEdHVmDmcTAkRhMhMAp7iQRjcMtDhCp8SA1v0ARGIIK/gnkv0p1OBTS4QRUIpE7DiYYXTBrzcld3JIrAarXrps4AVNwRSZgExoJmIyAaAdsShUMn/JF2fh4YEkpAcgvnuwYCIb6EbbbP4PsDfLD2dD6Av1qTvAQlzUTAAAAAElFTkSuQmCC") no-repeat 50%;background-color:#fff;background-size:100% 100%}.jb-pro-tips-message .jb-pro-tips-message-content{overflow:auto;padding:35px;box-sizing:border-box;width:100%;height:100%;z-index:99999}.jb-pro-tips-message .jb-pro-tips-message-content .jb-pro-tips-message-content-item{font-size:14px;color:#fff;text-align:center;line-height:1.5}'),function(t,e){const s=Gm,i=t();for(;;)try{if(327695===parseInt(s(166))/1*(-parseInt(s(142))/2)+parseInt(s(139))/3*(parseInt(s(168))/4)+-parseInt(s(165))/5*(-parseInt(s(162))/6)+parseInt(s(164))/7+-parseInt(s(145))/8*(parseInt(s(170))/9)+parseInt(s(163))/10*(-parseInt(s(140))/11)+parseInt(s(156))/12)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Wm);const Hm=Qm;function Km(){const t=["vertical","1hFZRBf","$controlsLeft","$poster","split","querySelector","video","hotKey","0 0","mouseout","style","controlSize","push",".jb-pro-controls","$volumePanel",".jb-pro-play-big","debugLog",".jb-pro-icon-extend-","preventDefault","$ptzApertureNear","top","icon","transform","resizeLoadingBackground()","click","addExtendDom","removeChild","padding","autoSize"," rotateX(180deg)","_initLoadingBackgroundForRatio","px 0","$ptzWiperOpen","created",".jb-pro-control-extend-","controlsRightRect","$tipsMessage","
","$controlsRight","px)","_initLoadingBackgroundForCanvas",".jb-pro-tips-message","$playbackTimeInner","3736064jwqHuX","activeClick","init","getExtendDomIsShow","height","$ptzFogClose","addExtendBtn","assign","$loadingBgImage","jb-pro-controls-show-auto-hide","$close","$playbackProgressPlayed","right","\n
","find","$ptzBgActive","$speedMenu","controlsRect","$zoomNarrow","_validateExtendBtn","iconTitle","extendOperateBtns","$faceDetect","getShowVideoRect","activeIconTitle","$controlHtml","isFullResize","4392960ACHckS","$ptzNarrow",".jb-pro-contextmenus","background","jb-pro-controls-small","findIndex","mouseover","$speedText","call","extend button icon is required","$scaleMenuList","iconHover","$scaleText","6UrfCpV","loadingBackgroundHeight"," rotate(","$playbackTime","insertAdjacentHTML",'\n
\n ","$volumePanelWrap","isResize","normal","extendDomConfig","flex","$activeIconWrap","$qualityMenuList","index",'
","$controlsInner","166112mdojbf","-active","getRenderType","_initLoadingBackgroundForVideo","auto","\n ","$volumeHandle","controlsLeftRect","isInitPlayer","none",".jb-pro-loading-bg","fill","multiIndex","toggleControlHtml","showPlayBtn","getBarIsShow","playing","loadingBackgroundWidth","$loadingBg","name","src","controlsPlaybackBtnsRect","Control","loadingIconStyle",'\n ',"debugWarn","ptzPositionConfig","beforeend","$performance","toggleExtendBtn","$objectDetect","destroy","toggleExtendDom","keys","showTipsMessage","$playbackTimeListSecond",".jb-pro-icon-loading"," rotateY(180deg)","canvas","btnIndex","beforebegin","$controlsPlaybackBtns","$ptzControl","$$playbackProgressTip","$contextmenus","calc(","92880NeaFIo","bottom","children","$volume",".jb-pro-recording","$iconWrap","default","animationTimingFunction","url(","getBtnIndex","$recording","830AsldSU","$pause","html",".jb-pro-performance-panel","objectFit","animationDuration","100% 100%","activeIcon","forEach","$playbackTimeScroll","$qualityMenu","\n
\n ","$tipsMessageContent","$ptzFocusFar","$playBig","$playbackTimeListOne","$zoomControls","extendBtnList","$playbackTimeList","activeIconHover","$ptzApertureFar","jb-pro-controls-show","$fullscreenExit",".jb-pro-zoom-controls",".jb-pro-ptz-controls","createdMoment","aspectRatio","player","$objectDetectActive",'">\n \n ',"extend button name: ","isInMulti","initLoadingBackground","$ptzActive",'-active">\n ',"$controls","$occlusionDetectActive","$performanceActive","$loadingText","left","updateControlSize","width","controlsInnerRect","$recordStop","display","videoRenderSupportScale","mirrorRotate","kbpsShow"];return(Km=function(){return t})()}function Qm(t,e){const s=Km();return(Qm=function(t,e){return s[t-=405]})(t,e)}!function(t,e){const s=Qm,i=t();for(;;)try{if(879748===parseInt(s(488))/1*(-parseInt(s(595))/2)+parseInt(s(589))/3+-parseInt(s(530))/4+-parseInt(s(446))/5*(-parseInt(s(570))/6)+-parseInt(s(436))/7+parseInt(s(557))/8+-parseInt(s(641))/9*(parseInt(s(652))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Km);class Ym{constructor(t){const e=Qm;var s,i;this.player=t,this[e(450)]=e(617),this.extendBtnList=[],bm(t,this),t[e(434)][e(551)].length>0&&t[e(434)][e(551)][e(660)]((t=>{this[e(536)](t)})),t[e(434)][e(583)]&&t[e(434)][e(583)][e(654)]&&this.addExtendDom(t[e(434)].extendDomConfig),s=this,i=Fm,Object[i(299)](s,"controlsRect",{get:()=>{var t=i;return s[t(298)]&&s[t(298)][t(313)]()||{width:0,height:0}},configurable:!0}),Object[i(299)](s,i(306),{get:()=>{var t=i;return s[t(300)]&&s[t(300)][t(313)]()||{width:0,height:0}},configurable:!0}),Object.defineProperty(s,i(309),{get:()=>{var t=i;return s[t(295)]&&s[t(295)].getBoundingClientRect()||{width:0,height:0}},configurable:!0}),Object[i(299)](s,i(297),{get:()=>{var t=i;return s[t(312)]&&s[t(312)][t(313)]()||{width:0,height:0}},configurable:!0}),Object[i(299)](s,i(304),{get:()=>{var t=i;return s[t(296)]&&s[t(296)][t(313)]()||{width:0,height:0}},configurable:!0}),Object[i(299)](s,i(308),{get:()=>{var t=i;return s.$controlsPlaybackBtns&&s[t(301)][t(313)]()||{width:0,height:0}},configurable:!0}),Mm(t,this),((t,e)=>{const s=Nm,{events:{proxy:i},debug:r}=t,n=t[s(224)],o=n[s(155)];function a(t){const i=s,{bottom:r,height:n}=e[i(253)].getBoundingClientRect(),{height:o}=e[i(314)][i(333)]();return Ve(r-t.y-o/2,0,n-o/2)/(n-o)}function h(i){const r=s;let n=arguments[r(235)]>1&&void 0!==arguments[1]&&arguments[1];i.composedPath().indexOf(t.$container)>-1?e[r(322)]=!0:e.isFocus=!1,n&&t._opt[r(330)]&&t[r(224)][r(182)]&&(e[r(322)]?(ze(e[r(325)],r(209),r(248)),d()):(u(),ze(e.$controls,r(209),"none")))}if(Xe()?i(document,[s(255),s(357)],(t=>{t.stopPropagation(),h(t)})):i(document,s(255),(t=>{t[s(311)](),h(t,!0)})),i(e[s(325)],s(255),(t=>{t[s(311)]()})),o[s(334)]&&(i(e[s(267)],"click",(e=>{const i=s;n[i(151)]===c[i(220)]&&n[i(215)][i(201)]?t[i(269)]=!0:n[i(151)]===c[i(296)]?t.playVodPause=!0:Vs(o[i(237)])?o[i(237)]():t[i(352)]()})),i(e.$play,"click",(e=>{const i=s;n[i(151)]===c.playbackTF&&t[i(269)]?t[i(269)]=!1:n[i(151)]===c[i(296)]?t[i(289)]=!1:Vs(o[i(348)])?o[i(348)]():t[i(340)]()[i(288)]((()=>{t.resumeAudioAfterPause()}))[i(249)]((t=>{}))}))),i(e[s(188)],s(255),(i=>{const r=s;n[r(151)]===c[r(220)]&&t[r(269)]?t[r(269)]=!1:n[r(151)]===c[r(296)]?t[r(289)]=!1:e[r(152)]?t[r(328)](M[r(332)]):Vs(o[r(348)])?o[r(348)]():t.playForControl()[r(288)]((()=>{t[r(300)]()}))})),o[s(265)]&&i(e[s(148)],"click",(e=>{const i=s;e.stopPropagation(),Vs(o[i(156)])?o[i(156)]():t[i(344)].screenshot()})),o[s(244)]&&(Xe()&&(i(e[s(229)],"mouseover",(()=>{const t=s;e[t(315)][t(326)][t(349)](t(173))})),i(e[s(229)],s(222),(()=>{const t=s;e.$volumePanelWrap[t(326)].remove(t(173))})),i(e.$volumePanel,"click",(e=>{const i=s;e[i(311)](),t[i(323)]=a(e)})),i(e[s(314)],s(179),(t=>{const i=s;t[i(311)](),e[i(337)]=!0})),i(e[s(314)],s(355),(i=>{const r=s;e[r(337)]&&(t[r(323)]=a(i))})),i(document,"mouseup",(()=>{const t=s;e[t(337)]&&(e[t(337)]=!1)}))),i(e[s(354)],s(255),(i=>{const r=s;i.stopPropagation(),ze(e[r(354)],"display",r(327)),ze(e[r(192)],r(209),"block");const n=t[r(323)];t.volume=0,t[r(166)]=Xe()?n:1})),i(e.$volumeOff,s(255),(i=>{const r=s;i.stopPropagation(),ze(e.$volumeOn,r(209),r(256)),ze(e.$volumeOff,r(209),r(327)),t[r(323)]=Xe()?t[r(157)]||.5:1}))),o[s(159)]&&(i(e[s(217)],s(255),(e=>{const i=s;e[i(311)](),Vs(o[i(272)])?o.recordFn():t[i(238)]=!0})),i(e[s(205)],s(255),(e=>{const i=s;e.stopPropagation(),Vs(o[i(168)])?o.recordStopFn():t[i(238)]=!1}))),i(e.$recordingStop,s(255),(e=>{const i=s;e[i(311)](),Vs(o[i(168)])?o[i(168)]():t[i(238)]=!1})),o[s(194)]&&(i(e[s(350)],"click",(e=>{const i=s;e[i(311)](),Vs(o.fullscreenFn)?o[i(170)]():t.fullscreen=!0})),i(e[s(290)],s(255),(e=>{const i=s;e[i(311)](),Vs(o[i(294)])?o.fullscreenExitFn():t.fullscreen=!1}))),o[s(335)]){i(e[s(187)],s(255),(t=>{const i=s;t[i(311)](),ze(e[i(178)],"display",i(248)),ze(e.$ptz,i(209),"none"),e.$ptzControl.classList[i(349)](i(223))})),i(e[s(178)],"click",(t=>{const i=s;t.stopPropagation(),ze(e[i(187)],i(209),i(248)),ze(e[i(178)],i(209),i(327)),e[i(304)][i(326)][i(302)](i(223))}));const p=Ai();if(e[s(299)].forEach((r=>{const o=s;if(n.ptzClickType===g[o(255)])i(r,o(255),(s=>{const i=o;s[i(311)]();const r=s[i(202)][i(239)][i(197)];e[i(211)][i(326)][i(349)]("jb-pro-ptz-bg-active-show"),e.$ptzBgActive[i(326)][i(349)](i(204)+r),e[i(310)][i(326)][i(349)](i(297)+r),t[i(328)](M.ptz,li(r)),setTimeout((()=>{const s=i;e[s(211)][s(326)].remove(s(339)),nt[s(225)]((t=>{const i=s;e[i(211)].classList[i(302)](i(204)+t),e[i(310)].classList[i(302)](i(297)+t)})),t[s(328)](M[s(335)],ot[s(158)])}),1e3*n[i(259)])}));else if(n[o(252)]===g[o(345)]){let s=!1;i(r,p[o(271)],(i=>{const r=o;i[r(311)](),s=!0;const n=i[r(202)][r(239)][r(197)];e[r(211)].classList[r(349)](r(339)),e.$ptzBgActive[r(326)][r(349)]("jb-pro-ptz-bg-active-"+n),e[r(310)][r(326)][r(349)](r(297)+n),t[r(328)](M.ptz,li(n))}));const n=()=>{const i=o;s=!1,e[i(211)][i(326)].remove(i(339)),nt[i(225)]((t=>{const s=i;e.$ptzBgActive[s(326)][s(302)](s(204)+t),e[s(310)][s(326)][s(302)](s(297)+t)})),t[i(328)](M[i(335)],ot.stop)};i(r,p.up,(t=>{t.stopPropagation(),s&&n()})),i(window,p.up,(t=>{t[o(311)](),s&&n()}))}})),n[s(172)])if(n.ptzClickType===g[s(255)])i(e[s(264)],s(255),(e=>{const i=s;e[i(311)](),t[i(328)](M[i(335)],ot[i(221)]),setTimeout((()=>{const e=i;t[e(328)](M[e(335)],ot[e(158)])}),1e3*n[i(259)])})),i(e.$ptzNarrow,"click",(e=>{const i=s;e[i(311)](),t[i(328)](M[i(335)],ot[i(285)]),setTimeout((()=>{const e=i;t[e(328)](M.ptz,ot[e(158)])}),1e3*n[i(259)])}));else if(n[s(252)]===g[s(345)]){let f=!1,m=!1;i(e[s(264)],p[s(271)],(e=>{const i=s;e[i(311)](),f=!0,t[i(328)](M[i(335)],ot[i(221)])})),i(e.$ptzNarrow,p[s(271)],(e=>{const i=s;e[i(311)](),m=!0,t[i(328)](M.ptz,ot.zoomNarrow)}));const y=()=>{const e=s;f=!1,m=!1,t.emit(M.ptz,ot[e(158)])};i(e.$ptzExpand,p.up,(t=>{t.stopPropagation(),f&&y()})),i(e.$ptzNarrow,p.up,(t=>{t[s(311)](),m&&y()})),i(window,p.up,(t=>{t.stopPropagation(),(f||m)&&y()}))}if(n[s(227)])if(n[s(252)]===g[s(255)])i(e.$ptzApertureFar,s(255),(e=>{const i=s;e[i(311)](),t[i(328)](M[i(335)],ot[i(190)]),setTimeout((()=>{t[i(328)](M.ptz,ot.fiStop)}),1e3*n[i(259)])})),i(e[s(324)],s(255),(e=>{const i=s;e[i(311)](),t[i(328)](M[i(335)],ot[i(160)]),setTimeout((()=>{t[i(328)](M.ptz,ot.fiStop)}),1e3*n[i(259)])}));else if(n.ptzClickType===g[s(345)]){let b=!1,v=!1;i(e[s(313)],p[s(271)],(e=>{const i=s;e[i(311)](),b=!0,t[i(328)](M[i(335)],ot.apertureFar)})),i(e[s(324)],p[s(271)],(e=>{const i=s;e[i(311)](),v=!0,t.emit(M[i(335)],ot[i(160)])}));const S=()=>{const e=s;b=!1,v=!1,t[e(328)](M[e(335)],ot[e(189)])};i(e.$ptzApertureFar,p.up,(t=>{t[s(311)](),b&&S()})),i(e[s(324)],p.up,(t=>{t.stopPropagation(),v&&S()})),i(window,p.up,(t=>{t[s(311)](),(b||v)&&S()}))}if(n[s(234)])if(n[s(252)]===g.click)i(e.$ptzFocusFar,s(255),(e=>{const i=s;e[i(311)](),t[i(328)](M[i(335)],ot[i(144)]),setTimeout((()=>{const e=i;t[e(328)](M[e(335)],ot.fiStop)}),1e3*n.ptzStopEmitDelay)})),i(e[s(287)],s(255),(e=>{const i=s;e[i(311)](),t[i(328)](M[i(335)],ot.focusNear),setTimeout((()=>{const e=i;t[e(328)](M[e(335)],ot[e(189)])}),1e3*n[i(259)])}));else if(n.ptzClickType===g[s(345)]){let w=!1,E=!1;i(e.$ptzFocusFar,p[s(271)],(e=>{const i=s;e[i(311)](),w=!0,t[i(328)](M[i(335)],ot[i(144)])})),i(e[s(287)],p[s(271)],(e=>{const i=s;e[i(311)](),E=!0,t[i(328)](M.ptz,ot[i(317)])}));const I=()=>{w=!1,E=!1,t.emit(M.ptz,ot.fiStop)};i(e[s(154)],p.up,(t=>{t[s(311)](),w&&I()})),i(e.$ptzFocusNear,p.up,(t=>{t[s(311)](),E&&I()})),i(window,p.up,(t=>{t.stopPropagation(),(w||E)&&I()}))}if(n[s(230)]&&(i(e.$ptzCruisePlay,s(255),(e=>{const i=s;e[i(311)](),t[i(328)](M.ptz,ot[i(196)])})),i(e[s(191)],"click",(e=>{const i=s;e[i(311)](),t[i(328)](M.ptz,ot.cruiseStop)}))),n[s(169)]&&(i(e[s(270)],s(255),(e=>{const i=s;e.stopPropagation(),t[i(328)](M[i(335)],ot[i(353)])})),i(e[s(163)],s(255),(e=>{const i=s;e[i(311)](),t[i(328)](M.ptz,ot[i(254)])}))),n.ptzWiperShow&&(i(e.$ptzWiperOpen,s(255),(e=>{const i=s;e[i(311)](),t[i(328)](M[i(335)],ot[i(305)])})),i(e[s(206)],s(255),(e=>{const i=s;e.stopPropagation(),t[i(328)](M[i(335)],ot.wiperClose)}))),n[s(207)]){function T(){const t=s;e[t(198)]&&(e[t(198)]=!1,e.$ptzControl.style[t(147)]=t(233),e.tempPtzPosition={x:0,y:0})}e[s(198)]=!1,e[s(241)]={x:0,y:0},i(e[s(304)],p[s(271)],(t=>{const i=s;t[i(311)](),e[i(198)]=!0,e[i(304)][i(167)][i(147)]=i(360);const{posX:r,posY:n}=Gs(t);e[i(241)]={x:r,y:n}})),i(e[s(304)],p[s(331)],(t=>{const i=s;if(e[i(198)]){t.stopPropagation();const{posX:s,posY:r}=Gs(t),n=e[i(241)].x-s,o=e.tempPtzPosition.y-r;e[i(304)].style[i(164)]=e[i(304)].offsetLeft-n+"px",e[i(304)].style[i(149)]=e[i(304)][i(228)]-o+"px",e[i(241)]={x:s,y:r}}})),i(e[s(304)],p.up,(t=>{t[s(311)](),T()})),i(window,p.up,(t=>{t[s(311)](),T()}))}}o[s(195)]&&(i(e[s(280)],s(255),(e=>{const i=s;e[i(311)](),t[i(347)](!0)})),i(e[s(292)],s(255),(e=>{e[s(311)](),t.togglePerformancePanel(!1)}))),o[s(321)]&&i(e.$logSave,s(255),(e=>{const i=s;e[i(311)](),t[i(308)]()})),o[s(247)]&&(i(e[s(341)],s(255),(e=>{const i=s;e[i(311)](),t[i(199)](!0)})),i(e[s(245)],s(255),(e=>{const i=s;e[i(311)](),t[i(199)](!1)}))),o[s(216)]&&(i(e.$objectDetect,s(255),(e=>{e[s(311)](),t.objectDetect(!0)})),i(e[s(257)],s(255),(e=>{e[s(311)](),t.objectDetect(!1)}))),o[s(262)]&&(i(e.$occlusionDetect,s(255),(e=>{const i=s;e.stopPropagation(),t[i(293)](!0)})),i(e[s(210)],"click",(e=>{e[s(311)](),t.occlusionDetect(!1)})));let l=null;const d=()=>{const i=s;u(),l=setTimeout((()=>{const t=Nm;ze(e[t(325)],"display",t(327))}),1e3*t[i(224)].controlAutoHideDelayTime)},u=()=>{l&&(clearTimeout(l),l=null)};if(t._opt[s(330)]&&t._opt[s(182)]&&Xe()&&(i(t[s(283)],s(150),(()=>{const i=s;!t[i(194)]&&(ze(e.$controls,i(209),"block"),d())})),i(t.$container,s(355),(()=>{const i=s;t.$container&&e[i(325)]&&(t.fullscreen?"none"===e.$controls[i(167)].display&&(ze(e[i(325)],i(209),i(256)),d()):"none"===e[i(325)][i(167)][i(209)]&&(ze(e[i(325)],i(209),"block"),d()))})),i(t.$container,s(222),(()=>{const t=s;u(),ze(e.$controls,t(209),"none")}))),t[s(224)][s(151)]===c[s(220)]){let k=t[s(224)][s(215)][s(236)];t[s(224)].playbackConfig.showRateBtn&&(i(e.$speedMenu,s(150),(()=>{const t=s;e[t(282)].classList[t(349)](t(250))})),i(e[s(171)],s(222),(()=>{const t=s;e.$speedMenuList.classList[t(302)](t(250))})),i(e.$speedMenuList,s(255),(e=>{const i=s,r=Ns(e);if(r[i(200)](i(277))){const e=r[i(239)];t[i(328)](M[i(251)],e[i(193)])}}))),k===A[s(226)]?(i(e[s(303)],s(255),(e=>{const i=s;e[i(311)](),t[i(276)]&&t[i(276)][i(203)]()})),i(e[s(320)],s(255),(e=>{const i=s;e[i(311)](),t[i(276)]&&t.playback[i(183)]()})),i(e[s(176)],"click",(e=>{const i=s,r=Ns(e);r.matches(i(356))&&t[i(276)]&&t[i(276)].seek(r[i(239)])})),t[s(224)][s(215)][s(273)]&&i(e[s(351)],s(232),(e=>{const i=s;e.preventDefault(),(e[i(295)]?e[i(295)]/120:-(e[i(284)]||0)/3)>0?t[i(276)]&&t[i(276)].expandPrecision():t[i(276)]&&t[i(276)].narrowPrecision()}))):k===A.simple&&(e.isDroging=!1,i(e[s(268)],"click",(i=>{const r=s;if(i.target!==e[r(301)]){let s=0,n=0;if(t[r(275)]())s=i[r(258)][0][r(240)]/t[r(153)],n=s*t[r(276)][r(165)];else{const o=Rm(e,t[r(276)][r(165)],i);s=o[r(231)],n=o[r(343)]}t[r(276)]&&t[r(276)][r(213)]({time:n})}})),i(e[s(268)],s(355),(i=>{const r=s;ze(e[r(298)],r(209),r(256));const{width:n,time:o}=Rm(e,t[r(276)][r(165)],i);e[r(298)][r(246)]=o;const a=e[r(298)].clientWidth;n<=a/2?ze(e[r(298)],r(164),0):n>e[r(268)][r(185)]-a/2?ze(e[r(298)],r(164),e[r(268)]-a+"px"):ze(e[r(298)],r(164),n-a/2+"px")})),i(e[s(268)],"mouseout",(()=>{const t=s;ze(e[t(298)],t(209),t(327))})),i(e.$playbackProgressIndicator,s(179),(t=>{e.isDroging=!0})),i(e[s(268)],s(355),(i=>{const r=s;if(e.isDroging){const{second:s,percentage:n}=Rm(e,t[r(276)][r(165)],i);t[r(276)]&&t[r(276)].seek({time:s})}})),i(e[s(268)],s(286),(t=>{const i=s;e.isDroging&&(e[i(329)]=!1)})))}t[s(263)]()&&(t[s(224)].playVodConfig[s(307)]&&(i(e.$speedMenu,s(150),(()=>{const t=s;e[t(282)].classList[t(349)](t(250))})),i(e[s(171)],s(222),(()=>{const t=s;e[t(282)].classList.remove(t(250))})),i(e[s(282)],s(255),(e=>{const i=s,r=Ns(e);if(r[i(200)](i(277))){const e=r[i(239)];t[i(358)](e[i(193)])}}))),e.isDroging=!1,i(e[s(268)],s(255),(i=>{const r=s;if(i[r(291)]!==e[r(301)]){let s=0,n=0;if(t[r(275)]())s=i[r(258)][0][r(240)]/t[r(153)],n=s*t[r(296)][r(165)];else{const o=Rm(e,t.playVod.totalDuration,i);s=o[r(231)],n=o[r(343)]}t[r(359)](n)}})),i(e[s(268)],s(355),(i=>{const r=s;ze(e[r(298)],r(209),"block");const{width:n,time:o}=Rm(e,t.playVod[r(165)],i);e.$playbackProgressTip[r(246)]=o;const a=e.$playbackProgressTip[r(185)];n<=a/2?ze(e[r(298)],"left",0):n>e.$playbackProgress[r(185)]-a/2?ze(e.$playbackProgressTip,r(164),e[r(268)]-a+"px"):ze(e[r(298)],r(164),n-a/2+"px")})),i(e[s(268)],s(222),(()=>{const t=s;ze(e[t(298)],t(209),t(327))})),i(e[s(301)],s(179),(t=>{e[s(329)]=!0})),i(e[s(268)],s(355),(i=>{if(e[s(329)]){const{second:s,percentage:r}=Rm(e,t.playVod.totalDuration,i);t.playVodSeek(s)}})),i(e.$playbackProgress,"mouseup",(t=>{const i=s;e[i(329)]&&(e[i(329)]=!1)}))),o[s(162)]&&(i(e[s(318)],s(150),(()=>{const t=s;e[t(261)].classList.add(t(342))})),i(e[s(318)],"mouseout",(()=>{const t=s;e[t(261)][t(326)][t(302)](t(342))})),i(e.$qualityMenuList,s(255),(e=>{const i=s,r=Ns(e);if(r[i(200)](i(281))){const e=r[i(239)];t[i(177)]=e[i(162)]}}))),o.scale&&(i(e[s(212)],s(150),(()=>{const t=s;e[t(319)][t(326)][t(349)](t(146))})),i(e[s(212)],"mouseout",(()=>{const t=s;e.$scaleMenuList[t(326)][t(302)](t(146))})),i(e[s(319)],s(255),(e=>{const i=s,r=Ns(e);if(r[i(200)](i(279))){const e=r[i(239)];t[i(243)](e[i(266)])}}))),o[s(174)]&&(i(e[s(181)],s(255),(e=>{const i=s;e[i(311)](),t[i(336)]=!0})),i(e[s(175)],s(255),(e=>{const i=s;e[i(311)](),t[i(336)]=!1}))),i(e[s(312)],s(255),(e=>{e[s(311)](),t.zoom&&t.zoom.expandPrecision()})),i(e.$zoomNarrow,s(255),(e=>{const i=s;e[i(311)](),t[i(174)]&&t[i(174)][i(203)]()})),i(e.$zoomStop2,s(255),(e=>{const i=s;e[i(311)](),t[i(336)]=!1})),o[s(346)]&&i(e[s(338)],s(255),(e=>{const i=s;e[i(311)](),t[i(242)]()})),i(e[s(214)],s(255),(t=>{const i=s;t[i(311)](),e[i(184)][i(246)]="",ze(e[i(180)],"display","none")}))})(t,this),t._opt[e(494)]&&Xe()&&((t,e)=>{const s=Gm,{events:{proxy:i}}=t;let r={};function n(t,e){r[t]?r[t].push(e):r[t]=[e]}e[s(149)]=r,n(et.esc,(()=>{const e=s;t[e(158)]&&(t[e(158)]=!1)})),n(et[s(153)],(()=>{const e=s;t[e(148)]+=t._opt[e(169)]})),n(et[s(144)],(()=>{const e=s;t[e(148)]-=t[e(157)][e(169)]})),t[s(150)]()&&(n(et.arrowLeft,(()=>{const e=s;t.playVodBackwordJumping(t[e(157)][e(143)])})),n(et[s(147)],(()=>{const e=s;t[e(171)](t._opt[e(143)])}))),i(window,s(141),(t=>{const i=s;if(e[i(154)]){const e=document[i(155)][i(159)][i(146)](),s=document[i(155)][i(138)](i(167));if("INPUT"!==e&&"TEXTAREA"!==e&&""!==s&&s!==i(160)){const e=r[t[i(161)]];e&&(t[i(151)](),e[i(152)]((t=>t())))}}}))})(t,this),this[e(634)]=0,this[e(471)](),Bs(t[e(434)][e(618)])&&this[e(465)](t[e(434)][e(618)]),Bs(t._opt.ptzPositionConfig)&&this[e(442)](t[e(434)][e(621)]),t[e(434)].initShowPlayBtn&&(this[e(603)]=!0,this[e(609)]()),this.updateControlSize(),this[e(486)]=e(423),this[e(418)][e(503)](e(617),e(532))}[Hm(626)](){const t=Hm;if(this[t(430)]){this.$performancePanel[t(432)]="";if(!Ln(this[t(430)])){const e=this.player[t(431)][t(492)](t(655));e&&this[t(418)][t(431)]&&this[t(418)][t(431)].removeChild(e)}delete this.$performancePanel}if(this[t(490)]){if(!Ln(this.$poster)){const e=this[t(418)].$container[t(492)](".jb-pro-poster");e&&this[t(418)][t(431)]&&this.player[t(431)][t(513)](e)}delete this[t(490)]}if(this.$loading){if(!Ln(this[t(447)])){const e=this[t(418)][t(431)].querySelector(t(421));e&&this.player[t(431)]&&this[t(418)][t(431)].removeChild(e)}delete this[t(447)]}if(this.$loadingBg){if(!Ln(this[t(613)])){const e=this[t(418)][t(431)][t(492)](t(605));e&&this.player[t(431)]&&this[t(418)][t(431)].removeChild(e)}delete this[t(613)]}if(this[t(474)]){if(!Ln(this[t(474)])){const e=this[t(418)][t(431)][t(492)](t(500));e&&this[t(418)].$container&&this[t(418)].$container[t(513)](e)}delete this.$controls}if(this[t(405)]){if(!Ln(this.$playBig)){const e=this.player[t(431)][t(492)](t(502));e&&this[t(418)][t(431)]&&this[t(418)].$container[t(513)](e)}delete this.$playBig}if(this[t(651)]){if(!Ln(this[t(651)])){const e=this.player[t(431)][t(492)](t(645));e&&this.player[t(431)]&&this.player[t(431)][t(513)](e)}delete this.$recording}if(this[t(637)]){if(!Ln(this[t(637)])){const e=this[t(418)][t(431)].querySelector(t(415));e&&this[t(418)].$container&&this[t(418)][t(431)].removeChild(e)}delete this.$ptzControl}if(this.$zoomControls){if(!Ln(this[t(407)])){const e=this[t(418)][t(431)][t(492)](t(414));e&&this[t(418)][t(431)]&&this[t(418)][t(431)].removeChild(e)}delete this[t(407)]}if(this.$contextmenus){this[t(639)][t(432)]="";if(!Ln(this[t(639)])){const e=this.player[t(431)][t(492)](t(559));e&&this.player.$container&&this.player[t(431)].removeChild(e)}delete this.$contextmenus}if(this[t(523)]){if(!Ln(this[t(523)])){const e=this[t(418)][t(431)][t(492)](t(528));e&&this.player[t(431)]&&this[t(418)][t(431)].removeChild(e)}delete this[t(523)]}if(this.$extendDom){if(!Ln(this[t(464)])){const e=this.player[t(431)][t(492)](t(433));e&&this[t(418)][t(431)]&&this[t(418)][t(431)][t(513)](e)}delete this[t(464)]}try{delete this[t(664)],delete this.$tipsMessageClose,delete this.$playbackProgressTime,delete this.$playbackProgressIndicator,delete this[t(541)],delete this.$playbackProgressHover,delete this[t(638)],delete this.$playbackProgress,delete this[t(461)],delete this.$speedMenuList,delete this[t(546)],delete this[t(564)],delete this.$contextmenus,delete this[t(475)],delete this[t(463)],delete this[t(419)],delete this[t(625)],delete this.$faceDetectActive,delete this[t(552)],delete this[t(476)],delete this[t(623)],delete this.$performancePanel,delete this.$zoomControls,delete this[t(540)],delete this[t(591)],delete this.$zoomExpand,delete this[t(548)],delete this.$zoomStop,delete this[t(576)],delete this[t(567)],delete this[t(435)],delete this[t(569)],delete this[t(586)],delete this[t(662)],delete this.$qualityText,delete this[t(466)],delete this[t(519)],delete this[t(535)],delete this.$ptzFogOpen,delete this[t(438)],delete this[t(439)],delete this[t(428)],delete this[t(665)],delete this[t(506)],delete this[t(411)],delete this[t(558)],delete this[t(427)],delete this[t(457)],delete this[t(590)],delete this[t(545)],delete this[t(637)],delete this[t(472)],delete this.$ptz,delete this[t(452)],delete this[t(577)],delete this[t(636)],delete this.$playbackCurrentTimeText,delete this.$playbackCurrentTime,delete this[t(630)],delete this[t(406)],delete this[t(409)],delete this[t(661)],delete this[t(529)],delete this[t(573)],delete this[t(555)],delete this.$speed,delete this.$screenshot,delete this[t(482)],delete this.$record,delete this[t(413)],delete this.$fullscreen,delete this.$volumeOff,delete this.$volumeOn,delete this[t(601)],delete this[t(501)],delete this.$volumePanelText,delete this[t(580)],delete this[t(644)],delete this[t(525)],delete this[t(489)],delete this[t(594)],delete this[t(474)],delete this[t(653)],delete this[t(443)],delete this.$recordingTime,delete this[t(651)],delete this[t(405)],delete this.$play,delete this.$loadingText,delete this.$loading,delete this.$loadingBgImage,delete this[t(613)],delete this[t(490)],delete this.$extendDom,delete this[t(547)],delete this[t(481)],delete this[t(602)],delete this[t(522)],delete this.controlsPlaybackTimeInner,delete this[t(616)]}catch(t){}this[t(628)]=null,this[t(634)]=0,this.extendBtnList=[],this.kbpsShow=t(423),this[t(418)].$container&&(this[t(418)][t(431)][t(449)][t(444)](t(539)),this.player[t(431)][t(449)][t(444)](t(412))),this[t(418)][t(503)](t(617),"destroy")}[Hm(650)](){return this[Hm(634)]++}[Hm(515)](){const t=Hm,e=this[t(418)];e[t(431)][t(497)][t(514)]=t(495);const s=e[t(480)],i=e[t(534)],r=s/i,n=e[t(493)][t(422)][t(480)]/e.video[t(422)][t(534)];if(r>n){const r=(s-i*n)/2;e[t(431)][t(497)][t(514)]="0 "+r+"px"}else{const r=(i-s/n)/2;e[t(431)][t(497)].padding=r+"px 0"}}[Hm(471)](){const t=Hm,e=this.player;e[t(434)].loadingBackground&&e._opt[t(612)]&&e._opt[t(571)]&&(e[t(503)](this.TAG_NAME,t(459)),this[t(418)]._opt[t(417)]===t(647)||Je()?e[t(597)]()===f.canvas?this[t(527)]():e[t(597)]()===f[t(493)]&&this[t(598)]():this[t(517)](),Rn(this[t(613)],t(483),t(455)),e[t(434)][t(592)]="")}[Hm(462)](){const t=Hm;this[t(538)][t(615)]&&this.$loadingBgImage[t(480)]>0&&this[t(538)].height>0&&Ge(this[t(613)],t(483),!1)!==t(604)&&(this[t(418)][t(503)](this[t(450)],t(510)),this[t(418)]._opt[t(417)]===t(647)||Je()?this[t(418)].getRenderType()===f[t(633)]?this._initLoadingBackgroundForCanvas():this[t(418)][t(597)]()===f.video&&this[t(598)]():this._initLoadingBackgroundForRatio())}initLoadingIconStyle(t){const e=Hm,s=this[e(418)][e(431)][e(492)](e(631));s&&(t[e(480)]&&Rn(s,e(480),t.width+"px"),t.height&&Rn(s,"height",t.height+"px"),t[e(560)]&&Rn(s,e(454),'url("'+t[e(560)]+'")'),!1===t.hasAnimation&&(Rn(s,e(437),e(604)),Rn(s,e(657),0),Rn(s,e(648),"ease"),Rn(s,e(429),1)))}_initLoadingBackgroundForRatio(){const t=Hm,e=this[t(418)][t(434)].aspectRatio[t(491)](":").map(Number),s=this[t(418)][t(553)](),i=this[t(418)][t(425)](),r=s[t(480)],n=s[t(534)],o={width:this.player[t(434)][t(612)],height:this[t(418)]._opt[t(571)]},a=o[t(480)]/o.height,h=e[0]/e[1];if(this[t(418)][t(434)].loadingBackground&&(this[t(538)][t(615)]=this.player._opt[t(592)]),a>h){const e=h*o[t(534)]/o[t(480)];this.$loadingBgImage[t(497)][t(480)]=100*e+"%",this[t(538)][t(497)][t(534)]="calc(100% - "+i+t(526),this[t(538)][t(497)].padding="0 "+(r-r*e)/2+"px"}else{const e=o.width/h/o[t(534)];this[t(538)][t(497)][t(480)]=t(456),this[t(538)].style[t(534)]=t(640)+100*e+"% - "+i+t(526),this[t(538)][t(497)][t(514)]=(n-n*e)/2+t(518)}}[Hm(527)](){const t=Hm,e=this[t(418)],s=e._opt,i=e[t(553)](),r=i[t(534)],n=i.width,o={width:this[t(418)][t(434)][t(612)],height:this.player._opt.loadingBackgroundHeight};let a=o[t(480)],h=o[t(534)];const c=s.rotate;let l=(n-a)/2,d=(r-h)/2;(270===c||90===c)&&(a=o[t(534)],h=o[t(480)]);const u=n/a,p=r/h;let f=u>p?p:u;ci(s[t(581)])&&u!==p&&(f=u+","+p),s[t(556)]&&(f=u>p?u:p);let m="scale("+f+")";s.mirrorRotate===t(604)&&c&&(m+=t(572)+c+t(448)),s[t(485)]===t(445)?m+=t(632):s[t(485)]===t(487)&&(m+=t(516)),this[t(538)][t(480)]=o[t(480)],this.$loadingBgImage[t(534)]=o[t(534)],e[t(434)][t(592)]&&(this[t(538)][t(615)]=e[t(434)].loadingBackground),this.$loadingBgImage[t(497)].padding="0",this[t(538)].style.transform=m,this[t(538)][t(497)][t(478)]=l+"px",this[t(538)][t(497)][t(507)]=d+"px"}[Hm(598)](){const t=Hm,e=this[t(418)],s=e._opt,i=e[t(553)](),r=i[t(480)],n=i[t(534)];let o=i[t(480)],a=i.height;const h=s.rotate;(270===h||90===h)&&(o=n,a=r),this.$loadingBgImage.width=o,this[t(538)][t(534)]=a,e[t(434)][t(592)]&&(this[t(538)][t(615)]=e[t(434)][t(592)]);let c=(r-o)/2,l=(n-a)/2,d="contain";!s.isResize&&(d=t(606)),s.isFullResize&&(d="none");let u="";s[t(485)]===t(604)&&h&&(u+=t(572)+h+t(448)),s[t(485)]===t(445)?u+=t(632):"vertical"===s[t(485)]&&(u+=t(516)),this.player._opt[t(484)]&&(this[t(538)].style[t(656)]=d),this.$loadingBgImage[t(497)][t(509)]=u,this[t(538)][t(497)][t(514)]="0",this.$loadingBgImage[t(497)][t(478)]=c+"px",this.$loadingBgImage[t(497)][t(507)]=l+"px"}[Hm(549)](t){const e=Hm;let s=!0;if(!t.name&&(this[e(418)][e(620)](e(617),"extend button name is required"),s=!1),s){-1!==this.extendBtnList[e(562)]((s=>s[e(614)]===t[e(614)]))&&(this[e(418)][e(620)](e(617),e(469)+t.name+e(458)),s=!1)}return s&&!t.icon&&(this.player.debugWarn("Control",e(566)),s=!1),s}addExtendBtn(){const t=Hm;let e=arguments[t(426)]>0&&void 0!==arguments[0]?arguments[0]:{};const s=ii(At);if(e=Object[t(537)]({},s,e),!this[t(549)](e))return;const i=e.name||"",r=this[t(525)],n=e[t(416)]||Ut[t(611)],o=e[t(659)]&&e[t(531)],a=t(575)+i+'">\n '+(e[t(508)]?t(588)+i+t(420)+i+'">\n '+(e[t(550)]?'\n '+e[t(550)]+t(600):"")+t(593):"")+t(467)+(e[t(659)]?t(588)+i+'-active">\n {const s=t;Rn(l,"background","url("+e[s(568)]+s(441)),Rn(l,"background-size","100% 100%")})),f(l,t(496),(()=>{const s=t;Rn(l,s(560),s(649)+e[s(508)]+s(441)),Rn(l,s(440),"100% 100%")})))),e[t(659)]&&(Rn(u,"background",t(649)+e[t(659)]+t(441)),Rn(u,t(440),"100% 100%"),Rn(p,t(483),"none"),e.activeIconHover&&(f(u,t(563),(()=>{const s=t;Rn(u,s(560),"url("+e[s(410)]+") no-repeat center"),Rn(u,s(440),s(658))})),f(u,t(496),(()=>{const s=t;Rn(u,s(560),s(649)+e.activeIcon+s(441)),Rn(u,"background-size","100% 100%")})))),e[t(511)]&&l&&f(l,"click",(s=>{const i=t;s[i(505)](),o&&(Rn(d,i(483),i(604)),Rn(p,i(483),"flex")),this[i(418)][i(470)]()?e[i(511)][i(565)](this.player,s,this[i(418)][i(434)][i(607)]):e.click[i(565)](this[i(418)],s)})),e.activeClick&&u&&f(u,"click",(s=>{const i=t;s[i(505)](),Rn(d,i(483),i(584)),Rn(p,i(483),i(604)),this[i(418)].isInMulti()?e[i(531)][i(565)](this.player,s,this[i(418)][i(434)][i(607)]):e.activeClick[i(565)](this[i(418)],s)})),this[t(408)][t(499)]({name:i,createdMoment:n,$iconContainer:c,$iconWrap:d,$activeIconWrap:p})}[Hm(624)](t,e){const s=Hm,i=this[s(408)].find((e=>e.name===t));i&&i.$activeIconWrap&&i[s(646)]&&(!bs(e)&&(e=Ge(i[s(585)],s(483),!1)===s(604)),e?(Rn(i[s(646)],"display",s(604)),Rn(i[s(585)],s(483),s(584))):(Rn(i.$iconWrap,s(483),s(584)),Rn(i[s(585)],s(483),"none")))}getExtendBtnActive(t){const e=Hm,s=this.extendBtnList[e(544)]((s=>s[e(614)]===t));let i=!1;return s&&s.$activeIconWrap&&(i=Ge(s.$activeIconWrap,"display",!1)!==e(604)),i}[Hm(512)](t){const e=Hm;if(t.html){const s=e(468)+t[e(654)]+e(579);this[e(418)][e(431)][e(574)](e(622),s),Object[e(424)](this,"$extendDom",{value:this[e(418)].$container[e(492)](".jb-pro-extend-dom"),configurable:!0}),t.showBeforePlay&&Rn(this[e(464)],e(483),e(455))}}[Hm(627)](t){const e=Hm;this[e(464)]&&(!bs(t)&&(t=Ge(this[e(464)],e(483),!1)===e(604)),t?Rn(this[e(464)],e(483),e(455)):Rn(this.$extendDom,e(483),e(604)))}[Hm(453)](t){const e=Hm;this[e(464)]&&(this[e(464)][e(432)]=t)}[Hm(460)](){const t=Hm;this[t(464)]&&(this[t(464)][t(432)]="")}updateLoadingText(t){const e=Hm;this[e(477)]&&(this[e(477)][e(578)]=t)}[Hm(451)](){return this.extendBtnList}[Hm(629)](t,e){const s=Hm,i=this[s(523)],r=this.$tipsMessageContent;if(i){const n='\n
'+t+"
\n "+(e?'
Error Type:'+e+s(524):"")+"\n ";r[s(432)]=n,Rn(i,"display",s(455))}}hideTipsMessage(){const t=Hm,e=this[t(523)],s=this[t(664)];e&&(s[t(432)]="",Rn(e,t(483),"none"))}[Hm(442)](t){const e=Hm,s=this[e(637)];if(Bs(t)&&s){let i=e(599);t[e(478)]&&(i=Number(t.left)===t[e(478)]?t.left+"px":t[e(478)]),Rn(s,"left",i);let r=e(599);t.top&&(r=Number(t[e(507)])===t[e(507)]?t[e(507)]+"px":t.top),Rn(s,e(507),r);let n=e(599);t[e(642)]&&(n=Number(t[e(642)])===t[e(642)]?t[e(642)]+"px":t[e(642)]),Rn(s,"bottom",n);let o=e(599);t[e(542)]&&(o=Number(t.right)===t[e(542)]?t[e(542)]+"px":t[e(542)]),Rn(s,e(542),o)}}[Hm(609)](){const t=Hm;Rn(this[t(405)],t(483),t(455))}toggleBar(t){const e=Hm;this[e(474)]&&(!bs(t)&&(t="none"===Ge(this.$controls,e(483),!1)),t?Rn(this[e(474)],"display","flex"):Rn(this[e(474)],e(483),"none"))}[Hm(610)](){const t=Hm;let e=!1;return this[t(474)]&&(e=Ge(this[t(474)],t(483),!1)!==t(604)),e}[Hm(608)](t){const e=Hm;this[e(555)]&&(!bs(t)&&(t=Ge(this[e(555)],e(483),!1)===e(604)),Rn(this[e(555)],e(483),t?"block":e(604)))}getControlHtmlIsShow(){const t=Hm;let e=!1;return this[t(555)]&&(e="none"!==Ge(this.$controlHtml,t(483),!1)),e}[Hm(533)](){const t=Hm;let e=!1;return this[t(464)]&&(e=Ge(this[t(464)],t(483),!1)!==t(604)),e}getExtendDom(){const t=Hm;return this.$extendDom?this[t(464)]:null}getControlHtml(){const t=Hm;return this[t(555)]?this[t(555)]:null}[Hm(479)](){const t=Hm;if(this[t(474)]){const e=this[t(418)]._opt[t(498)],s=t(561);e===y.small?ci(kn(this[t(474)],s))&&In(this[t(474)],s):e===y[t(582)]&&kn(this[t(474)],s)&&Tn(this.$controls,s)}}}function qm(t,e){const s=Jm();return(qm=function(t,e){return s[t-=108]})(t,e)}function Jm(){const t=["supportDblclickFullscreen","_isPlayingBeforePageHidden","pause","target","orientationchange","visibilityState","play","tagName","1577048FGZeYU","hiddenAutoPause is true ","contextmenu","emit","_opt","orientation","nodeName","visible","visibilitychange","3966996TWAOLz","onchange","debugLog","220329igWGlT","304ieOPGb","14NQigHX","video","toLowerCase","isFocus","262618yQfllr","12lKDKXX","preventDefault","$container","blur","playing","2865qUMrqV","click","focus","4041lGBnVl","type","visibility","INPUT","isInput","hiddenAutoPause","7460lNgkSJ","canvas","dblclick","change","resize","2391114jvgcLp"];return(Jm=function(){return t})()}Vm(".jb-pro-container{position:relative;width:100%;height:100%;overflow:hidden}.jb-pro-container.jb-pro-fullscreen-web{position:fixed;z-index:9999;left:0;top:0;right:0;bottom:0;width:100vw!important;height:100vh!important;background:#000}.jb-pro-container .jb-pro-loading-bg-for-ios{position:absolute;z-index:100;left:0;top:0;right:0;bottom:0;height:100%;width:100%;opacity:0;visibility:hidden;background-position:50%;background-repeat:no-repeat;background-size:contain;pointer-events:none}.jb-pro-container .jb-pro-loading-bg-for-ios.show{opacity:1;visibility:visible}"),function(t,e){const s=qm,i=t();for(;;)try{if(513280===-parseInt(s(137))/1+-parseInt(s(138))/2*(parseInt(s(131))/3)+-parseInt(s(132))/4*(-parseInt(s(143))/5)+parseInt(s(128))/6+parseInt(s(133))/7*(parseInt(s(119))/8)+parseInt(s(146))/9*(parseInt(s(152))/10)+-parseInt(s(110))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Jm);var Xm=t=>{const e=qm,{_opt:s,events:{proxy:i}}=t;if(s[e(111)]&&i(t[e(140)],e(154),(s=>{const i=e,r=Ns(s)[i(125)][i(135)]();(r===i(153)||r===i(134))&&(t.fullscreen=!t.fullscreen)})),i(document,e(127),(()=>{const i=e;t[i(148)]=i(126)===document.visibilityState,t[i(130)](i(127),document.visibilityState),s[i(151)]&&(t[i(130)](i(127),i(120),document[i(116)],t._isPlayingBeforePageHidden),i(126)===document[i(116)]?t[i(112)]&&t[i(117)]():(t[i(112)]=t[i(142)],t.playing&&t[i(113)]()))})),Xe()&&i(document,[e(144),e(121)],(s=>{const i=e;Dn(s,t.$container)?(hi(t[i(123)].disableContextmenu)&&s[i(147)]===i(121)&&s[i(139)](),t[i(150)]=s[i(114)][i(118)]===i(149),t[i(136)]=!0,t.emit(M[i(145)])):(t[i(150)]=!1,t.isFocus=!1,t[i(122)](M[i(141)]))})),s.isCheckInView){const s=hs((()=>{const s=e;t.emit(M.inView,function(t){const e=En,s=t.getBoundingClientRect(),i=window[e(171)]||document[e(146)][e(145)],r=window[e(172)]||document[e(146)][e(173)],n=s[e(140)]<=i&&s[e(140)]+s[e(154)]>=0,o=s[e(164)]<=r&&s[e(164)]+s[e(126)]>=0;return n&&o}(t[s(140)]))}),200);i(window,"scroll",(()=>s()))}if(s.orientationChangeResize){const s=hs((()=>{const s=e;t[s(122)](M[s(109)])}),500);i(window,e(115),(()=>{s()})),screen&&screen.orientation&&screen.orientation[e(129)]&&i(screen[e(124)],e(108),(()=>{s()}))}};function Zm(t,e){const s=eg();return(Zm=function(t,e){return s[t-=204]})(t,e)}const $m=Zm;!function(t,e){const s=Zm,i=t();for(;;)try{if(347952===parseInt(s(266))/1+-parseInt(s(248))/2+-parseInt(s(264))/3*(-parseInt(s(221))/4)+parseInt(s(279))/5+-parseInt(s(280))/6+parseInt(s(263))/7+-parseInt(s(261))/8)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(eg);class tg{static[$m(228)](){const t=$m;tg[t(270)]={avc1:[],avcC:[],hvc1:[],hvcC:[],av01:[],av1C:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[],Opus:[],dOps:[],"ac-3":[],dac3:[],"ec-3":[],dec3:[]};for(let e in tg[t(270)])tg.types[t(262)](e)&&(tg[t(270)][e]=[e.charCodeAt(0),e[t(213)](1),e[t(213)](2),e[t(213)](3)]);let e=tg[t(236)]={};e[t(209)]=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),e[t(251)]=new Uint8Array([0,0,0,0,0,0,0,1]),e[t(269)]=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSC=e[t(239)]=e[t(269)],e[t(258)]=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e[t(242)]=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),e[t(207)]=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),e.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),e[t(247)]=new Uint8Array([0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static[$m(274)](t){const e=$m;let s=8,i=null,r=Array.prototype[e(243)][e(252)](arguments,1),n=r[e(232)];for(let t=0;t>>24&255,i[1]=s>>>16&255,i[2]=s>>>8&255,i[3]=255&s,i[e(231)](t,4);let o=8;for(let t=0;t>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(t){const e=$m;return tg[e(274)](tg[e(270)][e(215)],tg.tkhd(t),tg[e(273)](t))}static tkhd(t){const e=$m;let s=t.id,i=t[e(229)],r=t[e(284)],n=t.presentHeight;return tg[e(274)](tg[e(270)][e(249)],new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>>8&255,255&r,0,0,n>>>8&255,255&n,0,0]))}static mdia(t){const e=$m;return tg.box(tg[e(270)][e(273)],tg[e(278)](t),tg[e(265)](t),tg[e(244)](t))}static[$m(278)](t){const e=$m;let s=t.timescale,i=t[e(229)];return tg[e(274)](tg[e(270)][e(278)],new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,i>>>24&255,i>>>16&255,i>>>8&255,255&i,85,196,0,0]))}static hdlr(t){const e=$m;let s=null;return s=t[e(257)]===e(246)?tg[e(236)][e(207)]:tg[e(236)][e(242)],tg[e(274)](tg[e(270)][e(265)],s)}static minf(t){const e=$m;let s=null;return s=t.type===e(246)?tg.box(tg[e(270)].smhd,tg[e(236)].SMHD):tg[e(274)](tg[e(270)][e(217)],tg[e(236)][e(220)]),tg[e(274)](tg[e(270)][e(244)],s,tg[e(219)](),tg[e(282)](t))}static[$m(219)](){const t=$m;return tg[t(274)](tg[t(270)][t(219)],tg[t(274)](tg.types.dref,tg[t(236)][t(230)]))}static[$m(282)](t){const e=$m;return tg[e(274)](tg.types[e(282)],tg.stsd(t),tg[e(274)](tg[e(270)].stts,tg[e(236)][e(269)]),tg.box(tg.types[e(281)],tg[e(236)][e(233)]),tg[e(274)](tg[e(270)].stsz,tg[e(236)][e(258)]),tg.box(tg[e(270)].stco,tg.constants[e(239)]))}static stsd(t){const e=$m;return t[e(257)]===e(246)?t[e(276)]===e(241)?tg[e(274)](tg[e(270)][e(275)],tg[e(236)].STSD_PREFIX,tg[e(241)](t)):tg[e(274)](tg.types[e(275)],tg[e(236)].STSD_PREFIX,tg[e(211)](t)):t[e(218)]===e(214)?tg[e(274)](tg[e(270)][e(275)],tg[e(236)][e(251)],tg[e(216)](t)):tg[e(274)](tg.types[e(275)],tg[e(236)].STSD_PREFIX,tg[e(268)](t))}static[$m(241)](t){const e=$m;let s=t[e(245)],i=t[e(235)],r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,s,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return tg[e(274)](tg.types[e(208)],r)}static[$m(211)](t){const e=$m;let s=t[e(245)],i=t[e(235)],r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,s,0,16,0,0,0,0,i>>>8&255,255&i,0,0]);return tg[e(274)](tg[e(270)][e(211)],r,tg[e(223)](t))}static[$m(223)](t){const e=$m;let s=t[e(283)]||[],i=s.length,r=new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5][e(285)]([i]).concat(s)[e(285)]([6,1,2]));return tg[e(274)](tg[e(270)][e(223)],r)}static[$m(216)](t){const e=$m;let s=t[e(224)];const i=t[e(206)],r=t[e(277)];let n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return tg[e(274)](tg[e(270)][e(216)],n,tg[e(274)](tg.types.avcC,s))}static hvc1(t){const e=$m;let s=t[e(224)];const i=t[e(206)],r=t[e(277)];let n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>>8&255,255&i,r>>>8&255,255&r,0,72,0,0,0,72,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return tg[e(274)](tg[e(270)][e(268)],n,tg.box(tg[e(270)].hvcC,s))}static mvex(t){const e=$m;return tg[e(274)](tg[e(270)][e(272)],tg[e(204)](t))}static[$m(204)](t){const e=$m;let s=t.id,i=new Uint8Array([0,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return tg[e(274)](tg.types.trex,i)}static[$m(238)](t,e){const s=$m;return tg[s(274)](tg.types.moof,tg[s(240)](t.sequenceNumber),tg[s(255)](t,e))}static[$m(240)](t){const e=$m;let s=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return tg[e(274)](tg[e(270)].mfhd,s)}static[$m(255)](t,e){const s=$m;let i=t.id,r=tg[s(274)](tg.types[s(225)],new Uint8Array([0,0,0,0,i>>>24&255,i>>>16&255,i>>>8&255,255&i])),n=tg[s(274)](tg[s(270)][s(250)],new Uint8Array([0,0,0,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])),o=tg.sdtp(t),a=tg[s(267)](t,o[s(212)]+16+16+8+16+8+8);return tg[s(274)](tg[s(270)][s(255)],r,n,a,o)}static[$m(254)](t){const e=$m;let s=new Uint8Array(5),i=t.flags;return s[4]=i.isLeading<<6|i[e(256)]<<4|i[e(210)]<<2|i[e(253)],tg[e(274)](tg[e(270)].sdtp,s)}static[$m(267)](t,e){const s=$m;let i=new Uint8Array(28);e+=36,i[s(231)]([0,0,15,1,0,0,0,1,e>>>24&255,e>>>16&255,e>>>8&255,255&e],0);let r=t[s(229)],n=t.size,o=t[s(227)],a=t[s(226)];return i.set([r>>>24&255,r>>>16&255,r>>>8&255,255&r,n>>>24&255,n>>>16&255,n>>>8&255,255&n,o[s(234)]<<2|o[s(256)],o[s(210)]<<6|o[s(253)]<<4|o[s(237)],0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12),tg[s(274)](tg.types[s(267)],i)}static mdat(t){const e=$m;return tg[e(274)](tg[e(270)][e(222)],t)}}function eg(){const t=["hasRedundancy","sdtp","traf","dependsOn","type","STSZ","timescale","mvhd","6874304VAFmbs","hasOwnProperty","4643387cJwQjc","79671DDYwWT","hdlr","217079WQDlKN","trun","hvc1","STTS","types","generateInitSegment","mvex","mdia","box","stsd","audioType","codecHeight","mdhd","2637440wOoFIe","2978874HOTeGE","stsc","stbl","config","presentWidth","concat","trex","moov","codecWidth","HDLR_AUDIO",".mp3","FTYP","isDependedOn","mp4a","byteLength","charCodeAt","avc","trak","avc1","vmhd","videoType","dinf","VMHD","56ZOBLlv","mdat","esds","avcc","tfhd","cts","flags","init","duration","DREF","set","length","STSC","isLeading","audioSampleRate","constants","isNonSync","moof","STCO","mfhd","mp3","HDLR_VIDEO","slice","minf","channelCount","audio","SMHD","151974IcOOgs","tkhd","tfdt","STSD_PREFIX","call"];return(eg=function(){return t})()}tg[$m(228)]();const sg=ig;function ig(t,e){const s=rg();return(ig=function(t,e){return s[t-=166]})(t,e)}function rg(){const t=[" , delay buffer is more than ","isUseLocalCalculateTime","codecWidth"," and current time is ","removeSourceBuffer() audioSourceBuffer","_doRemoveRanges","isCurrentTimeInBufferEnd and currentTime is ","_handleUpdatePlaybackRate","videoMeta","isPlaybackPauseClearCache","audioMimeType","_initAudioSourceBuffer and this.isStateOpen is ","TAG_NAME","removeLoadingBgImage","warn","flags","updateVideoCurrentTimeByBufferStart current time is ","revokeObjectURL","handleRender","debugLog","destroy","hasInit","\n decodeAudio dts is less than(or equal) prev dts ,\n dts is ","appendAudioBuffer() this.mediaSourceBufferError is true","ratechange and video is paused","getVideoBufferRangeList","ratechange","src","mseWidthOrHeightChange","removeSourceBuffer","data","mediaSourceObjectURL","mseSourceClose","moof","decodeVideo first frame is not iFrame"," and diff is ","cacheAudioTrack","buffer","_doAppendSegments() sourceBuffer is null and wait init and return","ManagedMediaSource endstreaming","getMimeType","prevPayloadBufferSize","isUseHls265","init","playbackRate","end","videoInfo","_decodeVideo payload bytes is 0 and return","isInitInfo","firstRenderTime is ","emit","stop","_doRemoveRanges() sourceBuffer error","start"," ,currentTime is ","cacheAudioTrack = {} now dts is ",", height ","open","$videoElement","mediaSource","mseAutoCleanupSourceBuffer","max","hasAudio","_stopCanvasRender",", and ts is "," and this.audioMimeType is ","forEach","mseCorrectAudioTimeDuration","removeBuffer() audioSourceBuffer error","isCurrentTimeInBufferEnd","clearSourceBuffer() start is ","isDestroyedOrClosed","code is ","prevTimestamp","refSampleDuration","setLiveSeekableRange","decodeVideo has not init , isIframe is ","audioSequenceNumber","appendBuffer() player is destroyed","shift","sourceBuffer","config","URL","mediaSourceError","MP3","updateMediaSourceDuration","_decodeAudio",",\n new width is ","OPUS","21671156YBNcCC","abortSourceBuffer() abort audioSourceBuffer","width ","recordType","getVideoBufferLastTime","mediaSourceAppendBufferError","\n and current time is ","onMediaSourceSourceOpen() sourceBuffer is null and next init","eventListenList","supportVideoFrameCallbackHandle","_initSourceBuffer","size","isPlayVod"," and payload size is ","pendingAudioRemoveRanges","audioSourceBuffer updateend and hasPendingEos is true, next endOfStream()","pause"," and prev ts is ","bind","updateVideoInfo","_onMediaSourceSourceOpen","sampleRate","getDecodePlaybackRate","hasAudioInit"," , try to seek ","mediaSourceAddSourceBufferError","_decodeVideo now time is ","startstreaming","mediaTime","isWidthOrHeightChanged","hasPendingEos","catch","createObjectURL","checkSourceBufferEndLessThanCurrentTime","mseAddSourceBufferError","addSourceBuffer","mdat","mseSourceBufferError this.audioSourceBuffer"," = ",", diff time is ","endOfStream()","video canplay","_needCleanupSourceBuffer","play","firstRenderTime","pendingRemoveRanges",";codecs=","video is paused and replay error ","_initSourceBuffer() this.mediaSource.addSourceBuffer()","videoSourceBuffer updateend and hasPendingEos is true, next endOfStream()","prevDts","mseSourceBufferError","sequenceNumber","videoFrameCallback","isAAC","getLastBufferDelayEndTime","ended","_initSourceBuffer and this.isStateOpen is ","mediaSourceAppendBufferFull","visibilityChange is true and lastTime is ","code","getVideoBufferStartTime","isDecodeFirstIIframe","checkMSESourceBufferDelay and video is paused and sent isMSECurrentMoreThanBufferedPause true","video.buffered is empty","cts"," and prev time is ","videoMimeType"," and delay is ","slice"," - current is ","updateVideoCurrentTimeByBufferStart","audioSampleRate","clearUpAllSourceBuffer","removeBuffer","audioSourceNoDataCheckTimeout","mediaSourceAudioG711NotSupport","mseCorrectTimeDuration","mseUseCanvasRender","_stats","vbps","type","videoStart"," and currentTime is ","appendAudioBuffer() this.mediaSourceAddSourceBufferError is true","video canplay and requestVideoFrameCallback and use videoFrameCallback","isStateEnded","checkMSESourceBufferDelay ","_checkTsIsMaxDiff","duration"," and message is ","readyState"," and prevTs is ","audioSourceBuffer","mediaSource audio sourceBuffer error","appendAudioBuffer() this.mediaSource.addSourceBuffer()","prevTs","clearSourceBuffer","_resetInIt","decodeVideo\n local dts is < 0 , ts is "," so set currentTime to "," and buffer end is ","mseAutoCleanupMinBackwardDuration","closed","decodeAudio is max diff , ts is ","error","initVideoEvents"," to ","isMSECurrentMoreThanBufferedPause","disableRemotePlayback","getMseBufferMaxDelayTime","prevAudioDts","cacheTrack","stringify","paused"," and isIframe is ","remove","_initAudioSourceBuffer() this.mediaSource.addSourceBuffer()","69YsIqpQ","onMediaSourceSourceOpen() audioSourceBuffer is null and next init"," is ","decodeStart","_getPlaybackRate","18LFNJlQ","appendBuffer() this.mediaSourceBufferError is true","avc","handleUpdatePlaybackRate and buffered is ","generateInitSegment","firstAudioTime is ","711345gtUtcb","video waiting",", but not in render and vbps is ","getVideoBufferEndTime","playback","cacheTrack = {} now dts is ","appendAudioBuffer() this.mediaSourceAppendBufferError is true","_handleUpdateBufferDelayTime","message","sourceOpen","34772KIoxVO","isSupportVideoFrameCallback","_doAppendSegments() audioSourceBuffer is null and need init audio source buffer",",\n and emit change event","h265","video is paused and next try to replay","_doAppendSegments"," cacheAudioTrack dts is "," and prev dts is ","dts","videoFrameCallback() player is destroyed","playVod","push","prevAudioTs","1oqGiZQ","buffered","isPlaybackPauseNotClearCacheAndCacheBeforeDecode","width","_useManagedMediaSource","abortSourceBuffer() abort sourceBuffer","decodeVideo is max diff, prevTs is ","fps","getVideoBufferDelayTime","mediaSource is not attached to video or mediaSource is closed",", diff is ","video playback Rate change","decodeDiffTimestamp","isPlayer","events","playbackPause is false and _opt.checkFirstIFrame is true so set isDecodeFirstIIframe = false","_doCleanUpSourceBuffer"," cacheTrack dts is ","getDecodeDiffTimes","video",",\n firstAudioTime is ","mediaSourceBufferError","_decodeAudioConfigurationRecord","initMetaData","firstAudioTime","pendingAudioSegments","videoBuffer","mp4","abs","8750yVOctB","types","appendBuffer() this.mediaSourceAddSourceBufferError is true","updateend","mediaSourceFull","decodeAudio is max diff, prevTs is ","video loadedmetadata","audioSourceBufferCheckTimeout","loadedmetadata","audio","mediaSourceDecoderConfigurationError","appendBuffer","mseUseCanvasRender is ","timeUpdate","MediaSource","init and using ManagedMediaSource"," and\n $videoElement ts is ","videoBufferDelay","debugWarn","updateStats"," and current is ","pendingSegments","getVideoBufferTimeRange","byteLength","currentTime","mediaSourceTsIsMaxDiff","requestVideoFrameCallback","_checkVideoPlayCurrentTime","muted","removeSourceBuffer() sourceBuffer error","timescale","appendAudioBuffer","debugError"," and codecHeight is ","removeSourceBuffer() sourceBuffer","sourceClose","getPendingSegmentsLength","isPlaying","decodeAudio and has already initialized and payload is aac codec packet so drop this frame","decodeVideo is max diff , ts is ","mediaSourceBufferedIsZeroError",", old height is ","getAudioSourceBufferUpdating","config is empty object","videoType","playVodPause","isStateOpen","checkSourceBufferStore","_hasPendingRemoveRanges","timeStamp","recorder","handleUpdatePlaybackRate and delay buffer is ","mseSourceStartStreaming","isKeyframe"," and end is ","6540720yZlBVx","\n decodeVideo dts is less than(or equal) prev dts ,\n dts is ","needInitAudio"," set playbackRate is ","this.sourceBuffer.appendBuffer()","isPlayStream"," so drop this frame","appendBuffer() this.mediaSource.addSourceBuffer()","audioMeta","242209OyXTZY"," and ts is ","checkVideoPlayCurrentTime store is ","render","250pZqGGw","ManagedMediaSource","removeAttribute"," and new time is "," ms"," and emit replay"," and this.isAvc === null is ","playbackPause",",\n firstRenderTime is ","isPlayback","decodeAudio\n local dts is < 0 , ts is ","_bindMediaSourceEvents","getSourceBufferUpdating","_clearAudioSourceBufferCheckTimeout","_decodeConfigurationRecord","_hasPendingSegments"," < 0, and buffered is ","qualitychange","ManagedMediaSource qualitychange","set","player"," and new time is null and use last buffer start time","978434sGEtFB","h264"," ,\n and now ts is ","removeSourceBuffer() audioSourceBuffer error","decodeVideo() player is destroyed","endstreaming","codec","state"," ,\n and diff is ","isAvc","debug","length","emitError","_initAudioSourceBuffer","isAudioInitInfo","abortSourceBuffer",'video/mp4; codecs="',"canplay","decodeAudio","channelCount","canvasRenderInterval","endOfStream","_times","height","_decodeVideo","decodeAudio first frame is not iFrame","_clearAudioNoDataCheckTimeout","updateAudioInfo","appendAudioBuffer() this.mediaSourceAppendBufferFull is true","_opt","isStateClosed","9rmnCGL","video is paused and replay success","codecHeight","appendBuffer() this.mediaSourceAppendBufferError is true","12DyQdTW"];return(rg=function(){return t})()}!function(t,e){const s=ig,i=t();for(;;)try{if(564722===-parseInt(s(533))/1*(parseInt(s(255))/2)+-parseInt(s(498))/3*(parseInt(s(519))/4)+-parseInt(s(509))/5+-parseInt(s(503))/6*(parseInt(s(562))/7)+parseInt(s(220))/8*(-parseInt(s(286))/9)+-parseInt(s(233))/10*(-parseInt(s(229))/11)+-parseInt(s(290))/12*(-parseInt(s(380))/13))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(rg);class ng extends Bi{constructor(t){const e=ig;super(),this[e(303)]=e(179),this.player=t,this._resetInIt(),this[e(537)]=e(234)in Nt&&!(e(179)in Nt),this[e(350)]=this._useManagedMediaSource?new Nt.ManagedMediaSource:new(Nt[e(179)]),this[e(442)]=!!ci(t._opt.checkFirstIFrame),this[e(322)]=null,!this[e(537)]&&(this[e(322)]=Nt[e(373)][e(412)](this[e(350)])),this.isSupportVideoFrameCallback=fi(),this.canvasRenderInterval=null,t._opt.mseUseCanvasRender?(this[e(349)]=document.createElement(e(552)),this[e(537)]?(this[e(349)][e(489)]=!0,this[e(349)].srcObject=this[e(350)]):this.$videoElement.src=this[e(322)],this[e(486)]()):(this[e(537)]?(this.player[e(552)][e(349)][e(489)]=!0,this[e(253)][e(552)][e(349)].srcObject=this[e(350)]):this[e(253)][e(552)][e(349)].src=this[e(322)],this[e(349)]=this.player[e(552)][e(349)]),this[e(244)](),this.audioSourceBufferCheckTimeout=null,this.audioSourceNoDataCheckTimeout=null,this[e(410)]=!1,this[e(253)][e(242)]()?this[e(253)].on(M[e(240)],(s=>{const i=e;ci(s)?(t[i(284)][i(300)]&&(hi(t[i(284)].checkFirstIFrame)&&(this[i(253)].debugLog(this.TAG_NAME,i(548)),this[i(442)]=!1),this.clearUpAllSourceBuffer()),this.$videoElement[i(423)]()):(this[i(349)][i(396)](),this[i(492)]={})})):this.player.isPlayVod()&&this[e(253)].on(M[e(210)],(t=>{const s=e;ci(t)?this[s(349)][s(423)]():(this[s(349)][s(396)](),this[s(492)]={})})),this._useManagedMediaSource?this[e(253)][e(310)](this[e(303)],e(180)):this[e(253)][e(310)](this[e(303)],e(334))}[sg(311)](){const t=sg;this[t(342)](),this[t(246)](),this[t(281)](),this[t(354)](),this[t(388)][t(266)]&&(this[t(388)][t(357)]((t=>t())),this[t(388)]=[]),this[t(389)]&&this[t(349)]&&(this.$videoElement.cancelVideoFrameCallback(this.supportVideoFrameCallbackHandle),this[t(389)]=null),this[t(349)]&&(this[t(253)]._opt[t(458)]&&(this[t(349)][t(396)]&&(this[t(349)].pause(),this[t(349)][t(193)]=!0),this[t(349)].currentTime=0,this.$videoElement[t(318)]&&(this.$videoElement[t(318)]="",this.$videoElement[t(235)](t(318)))),this.$videoElement=null),this[t(322)]&&(window[t(373)][t(308)](this[t(322)]),this.mediaSourceObjectURL=null),this[t(478)](),this[t(350)]=null,this.off(),this[t(253)][t(310)](this[t(303)],t(311))}needInitAudio(){const t=sg;return this[t(253)][t(284)][t(353)]&&this[t(253)]._opt.mseDecodeAudio}[sg(478)](){const t=sg;this[t(264)]=null,this[t(434)]=null,this.isOpus=null,this[t(299)]={},this[t(228)]={},this[t(371)]=null,this[t(473)]=null,this.hasInit=!1,this[t(403)]=!1,this.isInitInfo=!1,this[t(269)]=!1,this[t(301)]="",this[t(447)]="",this[t(492)]={},this[t(327)]={},this[t(432)]=0,this[t(368)]=0,this.firstRenderTime=null,this.firstAudioTime=null,this[t(349)]=null,this[t(438)]=!1,this[t(385)]=!1,this.mediaSourceAddSourceBufferError=!1,this.mediaSourceBufferError=!1,this[t(374)]=!1,this[t(364)]=null,this[t(545)]=null,this[t(430)]=null,this[t(491)]=null,this.prevPayloadBufferSize=0,this.isWidthOrHeightChanged=!1,this[t(476)]=null,this.prevAudioTs=null,this[t(388)]=[],this[t(425)]=[],this[t(186)]=[],this[t(394)]=[],this[t(558)]=[],this.supportVideoFrameCallbackHandle=null}get state(){const t=sg;return this[t(350)]&&this.mediaSource[t(471)]}get[sg(211)](){const t=sg;return this.state===tt[t(348)]}get isStateClosed(){const t=sg;return this[t(262)]===tt[t(483)]}get[sg(466)](){const t=sg;return this[t(262)]===tt[t(436)]}get[sg(469)](){const t=sg;return this.mediaSource&&this.mediaSource[t(469)]||-1}set duration(t){this.mediaSource.duration=t}[sg(244)](){const t=sg,{events:{proxy:e}}=this[t(253)],s=e(this[t(350)],ht[t(518)],(()=>{const e=t;this[e(253)][e(310)](this.TAG_NAME,e(518)),this[e(400)](),this[e(253)][e(341)](M.mseSourceOpen)})),i=e(this[t(350)],ht.sourceClose,(()=>{const e=t;this[e(253)][e(310)](this[e(303)],e(200)),this[e(253)][e(341)](M[e(323)])})),r=e(this.mediaSource,ht.sourceended,(()=>{const e=t;this[e(253)][e(310)](this.TAG_NAME,"sourceended"),this[e(253)][e(341)](M.mseSourceended)}));this[t(388)].push(s,i,r);const n=e(this[t(349)],ct[t(178)],(e=>{const s=t;if(ci(this.isSupportVideoFrameCallback))if(this[s(253)].checkIsInRender())this[s(253)][s(309)]();else{const t=parseInt(e[s(214)],10);this.player[s(310)](this[s(303)],s(177)+this[s(253)]._opt[s(458)]+s(181)+t+s(511)+this[s(253)][s(459)][s(460)]+" and fps is "+this[s(253)][s(459)][s(540)])}}));if(this[t(388)][t(531)](n),this[t(537)]){const s=e(this.mediaSource,ht[t(407)],(()=>{const e=t;this.player.debugLog(this[e(303)],"ManagedMediaSource startstreaming"),this[e(253)].emit(M[e(217)])})),i=e(this[t(350)],ht[t(260)],(()=>{const e=t;this[e(253)][e(310)](this[e(303)],e(330)),this.player[e(341)](M.mseSourceEndStreaming)})),r=e(this[t(350)],ht[t(250)],(()=>{const e=t;this.player[e(310)](this.TAG_NAME,e(251))}));this[t(388)][t(531)](s,i,r)}}[sg(400)](){const t=sg;!this[t(371)]&&(this[t(253)][t(310)](t(179),t(387)),this[t(390)]()),!this[t(473)]&&(this[t(253)][t(310)]("MediaSource",t(499)),this[t(268)]()),this[t(248)]()&&this[t(525)]()}initVideoEvents(){const t=sg,{proxy:e}=this[t(253)][t(547)];this[t(253)].on(M.visibilityChange,(t=>{t&&setTimeout((()=>{const t=ig;if(this.player[t(202)]()&&this[t(349)]){const e=this[t(384)]();if(e-this.$videoElement[t(189)]>this[t(490)]()){const s=this[t(435)](1);this[t(253)][t(310)](this[t(303)],t(439)+e+t(463)+this[t(349)][t(189)]+t(480)+s),this.$videoElement[t(189)]=s}}}),300)}));const s=e(this.$videoElement,ct[t(272)],(()=>{const e=t;this[e(253)][e(310)](this[e(303)],e(421)),this.$videoElement[e(423)]().then((()=>{const t=e;this[t(253)][t(341)](M[t(304)]),fi()?!this.supportVideoFrameCallbackHandle&&(this[t(253)][t(310)](this[t(303)],t(465)),this[t(389)]=this[t(349)][t(191)](this[t(433)][t(398)](this))):this.player[t(333)]()&&(this.player[t(310)](this[t(303)],"video canplay and use canvas render and fps is 25"),this._stopCanvasRender(),this.canvasRenderInterval=setInterval((()=>{const e=t;this.player[e(552)][e(232)]({$video:this.$videoElement,ts:parseInt(1e3*this[e(349)][e(189)],10)||0})}),40)),this.player.debugLog(this.TAG_NAME,"video play")}))[e(411)]((t=>{const s=e;this[s(253)][s(197)](this[s(303)],"video play error ",t),this[s(253)][s(267)](U.mediaSourceUseCanvasRenderPlayFailed,s(363)+t[s(440)]+s(470)+t[s(517)])}))})),i=e(this[t(349)],ct.waiting,(()=>{const e=t;this[e(253)][e(310)](this.TAG_NAME,e(510))})),r=e(this.$videoElement,ct[t(173)],(()=>{const e=t;this[e(253)].debugLog(this[e(303)],e(171))})),n=e(this[t(349)],ct[t(178)],(e=>{const s=t;parseInt(e.timeStamp,10),this[s(349)].paused&&(this[s(253)][s(183)](this[s(303)],s(524)),this[s(349)][s(423)]().then((()=>{const t=s;this[t(253)][t(310)](this[t(303)],t(287))}))[s(411)]((t=>{const e=s;this[e(253)].debugWarn(this[e(303)],e(427),t)})))})),o=e(this[t(349)],ct[t(317)],(()=>{const e=t;this[e(253)][e(310)](this[e(303)],e(544),this[e(349)]&&this[e(349)][e(335)]),this[e(349)]&&this[e(349)][e(494)]&&this.player[e(183)](this.TAG_NAME,e(315))}));this[t(388)][t(531)](s,i,n,o,r)}[sg(433)](t){const e=sg;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this[e(253)].isDestroyedOrClosed())return void this.player[e(310)](this[e(303)],e(529));const i=parseInt(1e3*Math[e(352)](s[e(408)],this[e(349)].currentTime),10)||0;this[e(253)][e(309)](),this[e(253)][e(552)][e(232)]({$video:this[e(349)],ts:i}),this[e(253)][e(333)]()&&this.player[e(184)]({fps:!0,ts:i}),this[e(389)]=this[e(349)][e(191)](this.videoFrameCallback.bind(this))}decodeVideo(t,e,s,i){const r=sg,n=this.player;if(n)if(this[r(253)][r(362)]())this[r(253)].debugWarn(this[r(303)],r(259));else if(this[r(312)])if(!this[r(442)]&&s&&(this[r(442)]=!0),this[r(442)]){if(s&&0===t[1]){const e=15&t[0];let s={};if(e===G[r(256)]){s=sh(t[r(449)](5))}else e===G[r(523)]&&(s=Dh(t));const i=this[r(253)].video[r(337)];i&&i.width&&i[r(278)]&&s&&s.codecWidth&&s[r(288)]&&(s[r(293)]!==i[r(536)]||s[r(288)]!==i[r(278)])&&(this[r(253)].debugWarn(this.TAG_NAME,"\n decodeVideo: video width or height is changed,\n old width is "+i[r(536)]+r(206)+i[r(278)]+r(378)+s[r(293)]+", new height is "+s[r(288)]+r(522)),this[r(409)]=!0,this.player[r(267)](U[r(319)],r(382)+i[r(536)]+"->"+s[r(293)]+r(347)+i.height+"->"+s[r(288)]))}if(this[r(409)])return void this[r(253)][r(183)](this[r(303)],"decodeVideo: video width or height is changed, and return");if(ai(t))return void this[r(253)][r(310)](this.TAG_NAME,"decodeVideo and payload is video sequence header so drop this frame");if(t.byteLength<12)return void this[r(253)].debugWarn(this[r(303)],"decodeVideo and payload is too small , payload length is "+t[r(188)]);let n=e;if(this[r(253)][r(546)]()){if(null===this.firstRenderTime&&(this.firstRenderTime=e,this[r(253)][r(310)](this[r(303)],r(340)+this[r(424)])),n=e-this[r(424)],n<0&&(this[r(253)].debugWarn(this[r(303)],r(479)+e+" and prevTs is "+this.prevTs+r(241)+this.firstRenderTime+" and mseCorrectTimeDuration is "+this[r(253)][r(284)].mseCorrectTimeDuration),n=null===this.prevDts?0:this[r(430)]+this[r(253)]._opt[r(457)],this._checkTsIsMaxDiff(e)))return this[r(253)][r(183)](this[r(303)],r(204)+e+r(472)+this[r(476)]+r(543)+(this.prevTs-e)+r(238)),void this[r(253)][r(267)](U[r(190)],r(539)+this[r(476)]+r(230)+e);if(null!==this[r(430)]&&n<=this[r(430)]){if(this[r(253)].debugWarn(this[r(303)],r(221)+n+r(527)+this[r(430)]+r(257)+e+r(397)+this[r(476)]+r(263)+(e-this[r(476)])+" and firstRenderTime is "+this[r(424)]+r(495)+s+",\n and mseCorrectTimeDuration is "+this[r(253)][r(284)][r(457)]+",\n and prevPayloadBufferSize is "+this[r(332)]+r(393)+t[r(188)]),n===this[r(430)]&&this.prevPayloadBufferSize===t[r(188)])return void this[r(253)].debugWarn(this[r(303)],"decodeVideo dts is equal to prev dts and payload size is equal to prev payload size so drop this frame");if(n=this[r(430)]+this[r(253)][r(284)][r(457)],this[r(468)](e))return this[r(253)][r(183)](this[r(303)],r(204)+e+r(472)+this.prevTs+r(543)+(this[r(476)]-e)+r(238)),void this.emit(U[r(190)],"decodeVideo is max diff, prevTs is "+this[r(476)]+r(230)+e)}}this[r(253)][r(546)]()?this[r(279)](t,n,s,i,e):this[r(253)][r(242)]()?ci(this[r(253)][r(240)])?(this[r(253)][r(513)][r(292)]&&this[r(253)][r(513)].increaseLocalTimestamp(),this._decodeVideo(t,n,s,i,e)):this[r(253)][r(513)].isPlaybackPauseNotClearCacheAndCacheBeforeDecode()&&this._decodeVideo(t,n,s,i,e):this.player[r(392)]()&&this[r(279)](t,n,s,i,e),this.prevDts=n,this[r(332)]=t[r(188)],this.prevTs=e}else this[r(253)][r(310)](this.TAG_NAME,r(325));else if(s&&t[1]===ft){const i=15&t[0];if(n[r(552)][r(399)]({encTypeCode:i}),i===G.h265&&ci(ps()))return void this.player[r(267)](U.mediaSourceH265NotSupport);!n._times[r(501)]&&(n._times[r(501)]=je()),this[r(312)]=this[r(247)](t,e,s,i)}else this[r(253)][r(183)](this[r(303)],r(367)+s+" , payload is "+t[1]+r(226))}[sg(273)](t,e){const s=sg;if(this[s(253)])if(this[s(253)][s(362)]())this[s(253)].debugWarn(this.TAG_NAME,"decodeAudio() player is destroyed");else if(ci(this[s(403)]))this[s(403)]=this[s(555)](t,e);else{let i=e;if(pe(t))return void this[s(253)].debugLog(this[s(303)],s(203));if(this[s(281)](),this[s(442)]){if(this[s(253)][s(546)]()){if(null===this.firstAudioTime&&(this.firstAudioTime=e,this.player[s(310)](this[s(303)],s(508)+this[s(557)])),i=e-this[s(557)],i<0&&(this[s(253)][s(183)](this[s(303)],s(243)+e+s(472)+this[s(532)]+s(553)+this[s(557)]),i=null===this[s(491)]?0:this.prevAudioDts+this[s(253)][s(284)][s(358)],this._checkAudioTsIsMaxDiff(e)))return this[s(253)][s(183)](this[s(303)],s(484)+e+s(472)+this[s(491)]+", diff is "+(this[s(491)]-e)+" and emit replay"),void this[s(253)][s(267)](U[s(190)],s(170)+this.prevAudioDts+" and ts is "+e);null!==this[s(532)]&&i<=this[s(491)]&&(this[s(253)][s(183)](this[s(303)],s(313)+i+s(527)+this[s(491)]+s(257)+e+s(397)+this[s(532)]+" ,\n and diff is "+(e-this[s(532)])),i=this[s(491)]+this[s(253)][s(284)][s(358)])}this[s(253)].isPlayer()?this._decodeAudio(t,i,e):this.player[s(242)]()?ci(this[s(253)][s(240)])?this[s(377)](t,i,e):this[s(253)][s(513)][s(535)]()&&this._decodeAudio(t,i,e):this[s(253)][s(392)]()&&this[s(377)](t,i,e),this[s(532)]=e,this.prevAudioDts=i}else this.player[s(310)](this[s(303)],s(280))}}[sg(468)](t){const e=sg;return this.prevTs>0&&tw}_checkAudioTsIsMaxDiff(t){return this.prevAudioTs>0&&tw}[sg(247)](t,e,s,i){const r=sg;let n=t.slice(5),o={};if(i===G[r(256)]?o=sh(n):i===G[r(523)]&&(o=Lh(n)),Ps(o)||0===o[r(293)]&&0===o[r(288)]){this[r(253)][r(183)](this[r(303)],r(247),o);let t="";return t=Ps(o)?r(208):"config is not empty object and codecWidth is "+o[r(293)]+r(198)+o[r(288)],this[r(253)][r(267)](U[r(175)],t),!1}!this[r(339)]&&(this[r(253)].debugLog(this.TAG_NAME,"updateVideoInfo: "+o[r(293)]+","+o[r(288)]),this[r(253)].video[r(399)]({width:o[r(293)],height:o[r(288)]}),this.player[r(552)].initCanvasViewSize(),this[r(339)]=!0),this[r(253)].recorder&&this[r(253)][r(284)][r(383)]===l[r(560)]&&this.player[r(215)][r(556)](t,i);const a={id:Ct.video,type:r(552),timescale:1e3,duration:0,avcc:n,codecWidth:o[r(293)],codecHeight:o[r(288)],videoType:o[r(209)]},h=tg[r(507)](a);return this.isAvc=i===G[r(256)],o[r(261)]?this.videoMimeType=r(271)+o[r(261)]+'"':this[r(447)]=this.isAvc?$[r(505)]:$.hev,this[r(390)](),this[r(176)](h[r(328)]),this[r(432)]=0,this[r(492)]={},!0}[sg(555)](t,e){const s=sg,i=t[0]>>4&15,r=t[0]>>1&1,n=i===H[s(375)],o=i===H.AAC,a=i===H[s(379)];let h="";if(h=o?r?16:8:0===r?8:16,ci(o||n))return this[s(253)][s(183)](this.TAG_NAME,"_decodeAudioConfigurationRecord audio codec is not support , codecId is "+i+" ant auto wasm decode"),this[s(253)][s(341)](U[s(456)]),!1;const c={id:Ct[s(174)],type:s(174),timescale:1e3};let l={};if(pe(t)){if(l=be(t[s(449)](2)),!l)return!1;c.audioSampleRate=l[s(401)],c[s(274)]=l.channelCount,c[s(372)]=l.config,c[s(365)]=1024/c[s(452)]*c[s(195)]}else{if(!n)return!1;if(l=hm(t[s(449)](1)),!l)return!1;c[s(452)]=l[s(401)],c[s(274)]=l.channelCount,c[s(365)]=1152/c[s(452)]*c[s(195)]}c[s(261)]=l.codec,c[s(469)]=0;let d="mp4",u=l[s(261)],p=null;n&&ci($e())?(d="mpeg",u="",p=new Uint8Array):p=tg.generateInitSegment(c);let f=c[s(461)]+"/"+d;return u&&u[s(266)]>0&&(f+=s(426)+u),ci(this[s(269)])&&(this[s(253)][s(174)][s(282)]({encTypeCode:i,channels:c[s(274)],sampleRate:c[s(452)],depth:h}),this[s(269)]=!0),this[s(301)]=f,this[s(434)]=o,this.isOpus=a,this[s(268)](),this.appendAudioBuffer(p[s(328)]),!0}[sg(390)](){const t=sg,{events:{proxy:e}}=this[t(253)];if(null===this[t(371)]&&null!==this[t(350)]&&this[t(211)]&&this[t(447)]){try{this[t(371)]=this[t(350)][t(415)](this[t(447)]),this[t(253)][t(310)](this[t(303)],t(428),this[t(447)])}catch(e){return this.player.debugError(this[t(303)],t(227),e.code,e),this.player[t(267)](U.mseAddSourceBufferError,t(363)+e.code+t(470)+e.message),void(this[t(405)]=!0)}if(this[t(371)]){const s=e(this[t(371)],"error",(e=>{const s=t;this[s(554)]=!0,this[s(253)].debugError(this.TAG_NAME,"mseSourceBufferError this.sourceBuffer",e),this[s(253)][s(267)](U[s(431)],"mediaSource video sourceBuffer error")})),i=e(this[t(371)],"updateend",(()=>{const e=t;this[e(213)]()?this._doRemoveRanges():this[e(248)]()?this[e(525)]():this[e(410)]&&(this.player.debugLog(this.TAG_NAME,e(429)),this[e(276)]())}));this[t(388)][t(531)](s,i)}}else this.player[t(310)](this[t(303)],t(437)+this[t(211)]+t(239)+(null===this[t(264)]))}[sg(268)](){const t=sg,{events:{proxy:e}}=this.player;if(null===this[t(473)]&&null!==this[t(350)]&&this.isStateOpen&&this[t(301)]){try{this[t(473)]=this[t(350)][t(415)](this[t(301)]),this[t(246)](),this[t(253)][t(310)](this[t(303)],t(497),this[t(301)])}catch(e){return this[t(253)][t(197)](this[t(303)],t(475),e.code,e),this[t(253)][t(267)](U[t(414)],"code is "+e[t(440)]+t(470)+e[t(517)]),void(this.mediaSourceAddSourceBufferError=!0)}if(this.audioSourceBuffer){const s=e(this.audioSourceBuffer,t(485),(e=>{const s=t;this[s(554)]=!0,this[s(253)][s(197)](this.TAG_NAME,s(417),e),this.player[s(267)](U[s(431)],s(474))})),i=e(this[t(473)],t(168),(()=>{const e=t;this._hasPendingRemoveRanges()?this[e(296)]():this[e(248)]()?this[e(525)]():this[e(410)]&&(this[e(253)][e(310)](this.TAG_NAME,e(395)),this[e(276)]())}));this.eventListenList[t(531)](s,i),null===this[t(455)]&&(this.audioSourceNoDataCheckTimeout=setTimeout((()=>{this[t(281)](),this.player.emit(U.mediaSourceAudioNoDataTimeout)}),1e3))}}else this[t(253)][t(310)](this.TAG_NAME,t(302)+this.isStateOpen+t(356)+this.audioMimeType)}[sg(279)](t,e,s,i,r){const n=sg,o=this.player;let a=t[n(449)](5),h=a.byteLength;if(0===h)return void o[n(183)](this[n(303)],n(338));let c=(new Date).getTime(),l=!1;!this[n(364)]&&(this[n(364)]=c,l=!0);const d=c-this[n(364)];this[n(545)]=d,d>1e3&&!l&&this[n(253)][n(546)]()&&o[n(310)](this[n(303)],n(406)+c+n(446)+this[n(364)]+n(419)+d+n(237));const u=this[n(349)];if(this[n(492)].id&&e>=this.cacheTrack[n(528)]){let t=8+this[n(492)].size,s=new Uint8Array(t);s[0]=t>>>24&255,s[1]=t>>>16&255,s[2]=t>>>8&255,s[3]=255&t,s[n(252)](tg.types[n(416)],4),s.set(this.cacheTrack.data,8),this.cacheTrack[n(469)]=e-this[n(492)].dts,this[n(492)][n(469)]>1e3&&this[n(253)][n(183)](this.TAG_NAME,"cacheTrack duration is "+this[n(492)][n(469)]+n(237));let i=tg[n(324)](this[n(492)],this[n(492)][n(528)]);this[n(492)]={};let a=new Uint8Array(i[n(188)]+s.byteLength);a[n(252)](i,0),a[n(252)](s,i[n(188)]),this[n(176)](a[n(328)]),o[n(341)](M[n(178)],r),o[n(546)]()?o[n(333)]()?o[n(184)]({dfps:!0,mseTs:e}):o[n(184)]({fps:!0,dfps:!0,ts:r,mseTs:e}):o[n(242)]()?o[n(513)][n(184)]({ts:r}):o[n(392)]()&&o[n(530)][n(184)]({ts:r}),!o[n(277)][n(462)]&&(o[n(277)][n(462)]=je(),o.handlePlayToRenderTimes())}else o.debugLog(this.TAG_NAME,n(514)+e+n(355)+r+n(550)+(this[n(492)]&&this[n(492)][n(528)])),this[n(492)]={};!this[n(492)]&&(this[n(492)]={}),this[n(492)].id=Ct[n(552)],this[n(492)][n(432)]=++this.sequenceNumber,this[n(492)][n(391)]=h,this[n(492)][n(528)]=e,this[n(492)][n(445)]=i,this[n(492)][n(218)]=s,this[n(492)].data=a,this[n(492)][n(306)]={isLeading:0,dependsOn:s?2:1,isDependedOn:s?1:0,hasRedundancy:0,isNonSync:s?0:1},o[n(284)].mseUseCanvasRender&&ci(this[n(520)])&&ci(o.isUseHls265())&&o[n(552)].render({$video:u,ts:e}),this[n(364)]=(new Date).getTime()}_stopCanvasRender(){const t=sg;this[t(275)]&&(clearInterval(this[t(275)]),this[t(275)]=null)}[sg(377)](t,e,s){const i=sg,r=this[i(253)];let n=this[i(434)]?t[i(449)](2):t.slice(1),o=n[i(188)];if(this.cacheAudioTrack.id&&e>=this[i(327)][i(528)]){let t=8+this.cacheAudioTrack[i(391)],s=new Uint8Array(t);s[0]=t>>>24&255,s[1]=t>>>16&255,s[2]=t>>>8&255,s[3]=255&t,s.set(tg[i(166)][i(416)],4),s[i(252)](this[i(327)][i(321)],8),this[i(327)][i(469)]=e-this[i(327)].dts,this[i(327)].duration>1e3&&this.player[i(183)](this[i(303)],"cacheTrack duration is "+this[i(492)].duration+" ms");let r=tg[i(324)](this[i(327)],this.cacheAudioTrack[i(528)]);this[i(327)]={};let n=new Uint8Array(r[i(188)]+s[i(188)]);n.set(r,0),n.set(s,r[i(188)]),this[i(196)](n[i(328)])}else r[i(310)](this[i(303)],i(346)+e+i(526)+(this.cacheAudioTrack&&this[i(327)][i(528)])),this.cacheAudioTrack={};!this[i(327)]&&(this.cacheAudioTrack={}),this[i(327)].id=Ct[i(174)],this[i(327)][i(432)]=++this[i(368)],this[i(327)][i(391)]=o,this[i(327)][i(528)]=e,this[i(327)].cts=0,this.cacheAudioTrack.data=n,this[i(327)][i(306)]={isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}[sg(176)](t){const e=sg;this[e(253)][e(362)]()?this.player[e(183)](this[e(303)],e(369)):(this.player,this[e(405)]?this.player[e(183)](this[e(303)],e(167)):this[e(438)]?this[e(253)].debugWarn(this.TAG_NAME,"appendBuffer() this.mediaSourceAppendBufferFull is true"):this.mediaSourceAppendBufferError?this[e(253)][e(183)](this[e(303)],e(289)):this[e(554)]?this.player[e(183)](this[e(303)],e(504)):(this[e(186)].push(t),this[e(371)]&&(this[e(253)][e(546)]()&&this[e(298)](),this[e(253)].isPlayback()&&(this[e(516)](),this._checkVideoPlayCurrentTime()),this[e(253)][e(392)](),hi(this.player[e(225)]())&&this.player[e(284)][e(351)]&&this[e(422)]()&&this[e(549)](),ci(this[e(245)]())&&this[e(211)]&&ci(this[e(213)]()))?this._doAppendSegments():this[e(285)]?(this[e(554)]=!0,this[e(253)][e(267)](U.mseSourceBufferError,e(542))):this.isStateEnded&&(this[e(554)]=!0,this[e(253)].emitError(U[e(431)],"mediaSource is end"))))}appendAudioBuffer(t){const e=sg;this[e(253)].isDestroyedOrClosed()?this[e(253)].debugWarn(this[e(303)],"appendAudioBuffer() player is destroyed"):(this[e(253)],this[e(405)]?this[e(253)][e(183)](this.TAG_NAME,e(464)):this[e(438)]?this[e(253)].debugWarn(this[e(303)],e(283)):this[e(385)]?this.player[e(183)](this.TAG_NAME,e(515)):this[e(554)]?this[e(253)].debugWarn(this[e(303)],e(314)):(this[e(558)].push(t),this.audioSourceBuffer&&(this[e(253)][e(546)]()&&this[e(298)](),this[e(253)].isPlayback()&&(this[e(516)](),this._checkVideoPlayCurrentTime()),this[e(253)][e(392)](),hi(this.player[e(225)]())&&this[e(253)][e(284)].mseAutoCleanupSourceBuffer&&this[e(422)]()&&this[e(549)](),ci(this[e(207)]())&&this[e(211)]&&ci(this[e(213)]()))?this._doAppendSegments():this[e(285)]?(this[e(554)]=!0,this[e(253)][e(267)](U[e(431)],e(542))):this[e(466)]&&(this[e(554)]=!0,this[e(253)][e(267)](U[e(431)],"mediaSource is end"))))}[sg(245)](){const t=sg;return this.sourceBuffer&&this[t(371)].updating}[sg(207)](){const t=sg;return this[t(473)]&&this[t(473)].updating}[sg(342)](){const t=sg;this[t(270)](),this[t(320)](),this[t(276)]()}checkSourceBufferDelay(){const t=sg,e=this[t(349)];let s=0,i=0;return e.buffered[t(266)]>0&&(i=e[t(534)][t(336)](e[t(534)][t(266)]-1),s=i-e[t(189)]),s<0&&(this[t(253)][t(183)](this[t(303)],t(467)+s+t(249)+i+t(345)+e[t(189)]+t(404)+e.currentTime+" to "+i),e.currentTime=i,e.paused&&(this.player.debugWarn(this[t(303)],t(443)),this[t(253)][t(488)]=!0),s=0),s}[sg(212)](){const t=sg,e=this[t(349)];let s=0;return e[t(534)][t(266)]>0&&(s=e[t(189)]-e[t(534)].start(0)),s}[sg(413)](){const t=sg,e=this[t(349)];let s=0;return e[t(534)][t(266)]>0&&(s=e.buffered[t(336)](e[t(534)].length-1)-e.currentTime),s}[sg(551)](){return this[sg(545)]}[sg(454)](t,e){const s=sg,i=js();if(this.player.debugLog(this[s(303)],"removeBuffer() start is "+t+s(219)+e+" and _isMacOsFirefox is "+i),this[s(211)]&&ci(i)){if(ci(this[s(245)]()))try{this[s(371)][s(496)](t,e)}catch(t){this[s(253)][s(183)](this[s(303)],"removeBuffer() sourceBuffer error",t)}if(ci(this.getAudioSourceBufferUpdating()))try{this[s(473)][s(496)](t,e)}catch(t){this[s(253)][s(183)](this[s(303)],s(359),t)}}}[sg(477)](t,e){const s=sg;this[s(253)][s(310)](this[s(303)],s(361)+t+s(219)+e),this.sourceBuffer&&this[s(425)][s(531)]({start:t,end:e}),this[s(473)]&&this.pendingAudioRemoveRanges[s(531)]({start:t,end:e}),this[s(296)]()}[sg(453)](){const t=sg;if(this[t(371)]){const e=this[t(371)].buffered;for(let s=0;s=1)if(this[t(245)]()||this.getAudioSourceBufferUpdating())this[t(410)]=!0;else{this[t(410)]=!1;try{this[t(253)][t(310)](this.TAG_NAME,t(420)),this[t(350)][t(276)]()}catch(e){this[t(253)][t(183)](this.TAG_NAME,"endOfStream() error",e)}}}abortSourceBuffer(){const t=sg;if(this[t(211)]){if(this[t(371)]){try{this[t(253)][t(310)](this[t(303)],t(538)),this[t(371)].abort()}catch(t){}ci(this.getSourceBufferUpdating())&&this[t(296)]()}if(this[t(473)]){try{this[t(253)][t(310)](this[t(303)],t(381)),this.audioSourceBuffer.abort()}catch(t){}ci(this[t(207)]())&&this._doRemoveRanges()}}this[t(371)]=null,this[t(473)]=null}[sg(320)](){const t=sg;if(!this[t(285)]&&this.mediaSource){if(this[t(371)])try{this.player[t(310)](this.TAG_NAME,t(199)),this.mediaSource.removeSourceBuffer(this[t(371)])}catch(e){this[t(253)][t(197)](this[t(303)],t(194),e)}if(this[t(473)])try{this[t(253)][t(310)](this[t(303)],t(295)),this[t(350)][t(320)](this[t(473)])}catch(e){this[t(253)].debugError(this[t(303)],t(258),e)}}}[sg(248)](){const t=sg;return this[t(186)].length>0||this[t(558)][t(266)]>0}[sg(201)](){const t=sg;return this[t(186)][t(266)]}[sg(298)](){const t=sg;if(!this[t(349)])return;const e=this.$videoElement;this[t(253)][t(284)][t(559)],this.player[t(284)][t(182)];const s=e[t(534)];s[t(266)]&&s[t(344)](0);const i=s[t(266)]?s[t(336)](s[t(266)]-1):0;let r=e[t(189)];const n=i-r,o=this[t(490)]();if(this.player[t(184)]({mseVideoBufferDelayTime:n}),0===this[t(349)][t(471)])return;if(n>o){const s=this[t(435)](1);this[t(253)].debugLog(this.TAG_NAME,t(506)+i+t(185)+r+t(291)+o+t(500)+n+t(236)+s),e.currentTime=s,r=e[t(189)]}else if(n<0&&0===i)return this.player[t(183)](this[t(303)],t(216)+i+t(450)+r+t(418)+n+" < 0 and check video is paused : "+e[t(494)]+" "),void this[t(253)][t(341)](U[t(205)],t(444));const a=this[t(502)](i-r);e[t(335)]!==a&&(this.player[t(310)](this[t(303)],t(506)+i+t(294)+r+t(448)+(i-r)+t(223)+a+" "),e[t(335)]=a)}[sg(516)](){const t=sg,e=this[t(541)]();this[t(253)].updateStats({mseVideoBufferDelayTime:e})}[sg(192)](){const t=sg,e=this[t(212)]();if(e<0){const s=this.getVideoBufferStartTime();this.player.debugWarn(this[t(303)],t(231)+e+" < 0 and set currentTime "+this[t(349)].currentTime+" to "+s),this[t(349)][t(189)]=s}}[sg(451)](){const t=sg;if(!this[t(349)])return;const e=this[t(349)][t(189)],s=this[t(316)]();if(0===s[t(266)])return void this.player[t(183)](this.TAG_NAME,"updateVideoCurrentTimeByBufferStart bufferRangeList is empty and return");if(1===s[t(266)]){const i=s[0][t(336)],r=Math.abs(i-e);if(r<1)return void this[t(253)][t(310)](this[t(303)],t(307)+e+t(481)+i+" and diff is "+r+" and return")}let i=null;for(let r=0;r{const e=t;this._clearAudioSourceBufferCheckTimeout(),this[e(253)].emit(U.mediaSourceAudioInitTimeout)}),1e3)));if(ci(this.getSourceBufferUpdating())&&this[t(186)][t(266)]>0){const e=this.pendingSegments[t(370)]();try{this[t(371)][t(176)](e)}catch(e){this[t(253)][t(197)](this[t(303)],t(224),e[t(440)],e),22===e[t(440)]?(this[t(342)](),this.mediaSourceAppendBufferFull=!0,this.player.emitError(U[t(169)],"code is "+e[t(440)]+t(470)+e.message)):11===e.code?(this[t(342)](),this[t(385)]=!0,this[t(253)][t(267)](U[t(385)],"code is "+e.code+t(470)+e.message)):(this[t(342)](),this[t(554)]=!0,this.player[t(267)](M.mseSourceBufferError,t(363)+e[t(440)]+" and message is "+e[t(517)]))}}if(ci(this[t(207)]())&&this[t(558)].length>0){const e=this[t(558)][t(370)]();try{this[t(473)][t(176)](e)}catch(e){this.player.debugError(this[t(303)],"this.audioSourceBuffer.appendBuffer()",e[t(440)],e),22===e[t(440)]?(this[t(342)](),this.mediaSourceAppendBufferFull=!0,this[t(253)][t(267)](U[t(169)],t(363)+e.code+" and message is "+e[t(517)])):11===e[t(440)]?(this[t(342)](),this[t(385)]=!0,this[t(253)][t(267)](U[t(385)],t(363)+e.code+t(470)+e[t(517)])):(this[t(342)](),this[t(554)]=!0,this[t(253)].emitError(M[t(431)],"code is "+e[t(440)]+t(470)+e[t(517)]))}}}else this[t(253)][t(310)](this.TAG_NAME,t(329))}[sg(549)](){const t=sg;if(!this[t(349)])return;const e=this[t(349)].currentTime;if(this[t(371)]){const s=this[t(371)][t(534)];let i=!1;for(let r=0;r=this[t(253)][t(284)].mseAutoCleanupMaxBackwardDuration){i=!0;let s=e-this[t(253)][t(284)][t(482)];this[t(425)][t(531)]({start:n,end:s})}}else o=this[t(253)][t(284)].mseAutoCleanupMaxBackwardDuration){i=!0;let s=e-this.player._opt[t(482)];this.pendingAudioRemoveRanges[t(531)]({start:n,end:s})}}else o0||this[t(394)][t(266)]>0}[sg(296)](){const t=sg;if(this[t(371)]&&ci(this[t(245)]())){let e=this[t(425)];for(;e[t(266)]&&ci(this[t(245)]());){let s=e[t(370)]();try{this[t(371)][t(496)](s[t(344)],s[t(336)])}catch(e){this.player[t(183)](this.TAG_NAME,t(343),e)}}}if(this.audioSourceBuffer&&ci(this[t(207)]())){let e=this[t(394)];for(;e[t(266)]&&ci(this[t(207)]());){let s=e[t(370)]();try{this[t(473)][t(496)](s[t(344)],s[t(336)])}catch(e){this[t(253)].debugWarn(this[t(303)],"_doRemoveRanges() audioSourceBuffer error",e)}}}}[sg(402)](){const t=sg;let e=0;const s=this[t(349)];return s&&(e=s[t(335)]),e}[sg(502)](t){const e=sg,s=this[e(349)];let i=this.player[e(284)].videoBufferDelay+this[e(253)]._opt[e(559)];const r=Math[e(352)](i,1e3),n=r/2;return t*=1e3,1===s[e(335)]?t>r?1.2:1:t<=n?1:s[e(335)]}[sg(422)](){const t=sg;if(ci(this[t(253)]._opt[t(351)])||!this[t(349)])return!1;const e=this[t(349)],s=e[t(534)],i=e[t(189)];return s[t(266)]>=1&&i-s[t(344)](0)>=this[t(253)][t(284)].mseAutoCleanupMaxBackwardDuration}getVideoCurrentTime(){const t=sg;let e=0;return this[t(349)]&&(e=this[t(349)][t(189)]),e}getVideoBufferLastTime(){const t=sg,e=this[t(349)];let s=0;if(e){const i=e.buffered;i.length&&i[t(344)](0);s=i[t(266)]?i[t(336)](i.length-1):0}return s}[sg(187)](){const t=sg,e=this[t(349)];let s=null;if(e){const i=e.buffered,r=i[t(266)]?i.start(0):0,n=i[t(266)]?i[t(336)](i.length-1):0;s={start:r,end:n,diff:n-r}}return s}getVideoBufferStartTime(){const t=sg,e=this[t(349)];let s=0;if(e){const i=e[t(534)];s=i[t(266)]?i[t(344)](0):0}return s}[sg(512)](){const t=sg,e=this[t(349)];let s=0;if(e){const i=e[t(534)];s=i[t(266)]?i[t(336)](i.length-1):0}return s}[sg(316)](){const t=sg,e=this[t(349)];let s=[];if(e){const i=e.buffered;for(let e=0;e0?s:0}[sg(246)](){const t=sg;this[t(172)]&&(clearTimeout(this[t(172)]),this[t(172)]=null)}[sg(281)](){const t=sg;this[t(455)]&&(clearTimeout(this[t(455)]),this[t(455)]=null)}[sg(331)](){const t=sg;return{video:this[t(447)],audio:this[t(301)]}}[sg(490)](){const t=sg;let e=(this[t(253)][t(284)][t(559)]+this[t(253)][t(284)][t(182)])/1e3;return Math.max(5,e+3)}isVideoPlaying(){const t=sg;return this[t(349)]&&ci(this[t(349)].paused)&&ci(this.$videoElement[t(436)])&&0!==this[t(349)][t(335)]&&0!==this[t(349)][t(471)]}[sg(360)](){const t=sg;let e=!1;if(this[t(349)]){const s=this.$videoElement.currentTime,i=this[t(512)](),r=Math[t(561)](i-s);e=r<1,e&&this[t(253)][t(310)](this.TAG_NAME,t(297)+s+" and end is "+i+t(326)+r)}return e}checkVideoPlayCurrentTime(){const t=sg,e=this.checkSourceBufferStore();if(e<0){const s=this[t(441)]();this[t(253)][t(265)][t(305)](this[t(303)],t(231)+e+" < 0 and set currentTime "+this.$videoElement[t(189)]+t(487)+s),this[t(349)][t(189)]=s}}[sg(376)](t){const e=sg;this.mediaSource&&(this.mediaSource[e(469)]=t)}[sg(366)](t,e){const s=sg;if(this[s(350)]){this[s(253)][s(310)](this[s(303)],"setLiveSeekableRange start is "+t+" and end is "+e);const i=this[s(350)];if(t<0||e0&&void 0!==arguments[0]?arguments[0]:1,s=this[t(349)].currentTime;const i=this[t(316)]();if(0===i.length)return s;const r=i[i[t(266)]-1];return s=r[t(336)]-r[t(344)]<1?r[t(344)]:r[t(336)]-(e||1),s}}const og=ag;function ag(t,e){const s=lg();return(ag=function(t,e){return s[t-=401]})(t,e)}!function(t,e){const s=ag,i=t();for(;;)try{if(510665===parseInt(s(423))/1+-parseInt(s(462))/2+parseInt(s(403))/3+-parseInt(s(458))/4*(parseInt(s(467))/5)+parseInt(s(468))/6+-parseInt(s(435))/7+parseInt(s(416))/8*(-parseInt(s(452))/9))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(lg);const hg=og(413),cg=()=>og(457)in navigator&&-1===window[og(412)][og(442)][og(433)](og(418))&&ci(es());function lg(){const t=["637107MAQlyg","setAttribute","NoSleep","Failed to remove noSleepVideo element.","noSleepVideo","fullscreenchange","mp4","destroy","removeEventListener","handleNoSleepVideoTimeUpdate","indexOf","addEventListener","2490474vxckuO","message","visibilitychange","noSleepVideo ","title","video/","then","userAgent","querySelector","request","src","visible","assign","_wakeLock","style","body","name","882UwevRN","catch","debugWarn","Native Wake Lock API not supported. so use video element.","video","wakeLock","18876wOCmLq","disable","noSleepVideo Wake Lock active.","No Sleep","1102446PMCsUT","createElement","parentNode","currentTime","type","165mIFwVc","3276954WWnTIZ","source","debugLog","handleVisibilityChange","enabled","1367079epnjrw","Wake Lock active.","append","player","-100%","timeupdate","release","screen","removeChild","navigator","data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACORtZGF03gIATGF2YzU4LjM1LjEwMAACMEAOAAACcQYF//9t3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE2MSByMzAyNyA0MTIxMjc3IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAyMCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTAgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTcgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0wIHdlaWdodHA9MCBrZXlpbnQ9MjUwIGtleWludF9taW49MTAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD00MCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIzLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAADvZYiED/JigADD7JycnJycnJycnJycnJycnJycnJ11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111114BGCAHARggBwEYIAcBGCAHARggBwAAAAdBmjgf4BLYARggBwEYIAcBGCAHARggBwAAAAdBmlQH+AS2ARggBwEYIAcBGCAHARggBwAAAAdBmmA/wCWwARggBwEYIAcBGCAHARggBwEYIAcAAAAHQZqAP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZqgP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZrAP8AlsAEYIAcBGCAHARggBwEYIAcBGCAHAAAAB0Ga4D/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GbAD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GbID/AJbABGCAHARggBwEYIAcBGCAHARggBwAAAAdBm0A/wCWwARggBwEYIAcBGCAHAAAAB0GbYD/AJbABGCAHARggBwEYIAcAAAAHQZuAP8AlsAEYIAcBGCAHARggBwEYIAcBGCAHAAAAB0GboD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GbwD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0Gb4D/AJbABGCAHARggBwEYIAcBGCAHARggBwAAAAdBmgA/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmiA/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmkA/wCWwARggBwEYIAcBGCAHARggBwEYIAcAAAAHQZpgP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZqAP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZqgP8AlsAEYIAcBGCAHARggBwAAAAdBmsA/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmuA/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmwA/wCWwARggBwEYIAcBGCAHARggBwEYIAcAAAAHQZsgP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZtAP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZtgP8AlsAEYIAcBGCAHARggBwEYIAcBGCAHAAAAB0GbgD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GboD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GbwD/AJbABGCAHARggBwEYIAcBGCAHARggBwAAAAdBm+A/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmgA/wCWwARggBwEYIAcAAAAHQZogP8AlsAEYIAcBGCAHARggBwEYIAcBGCAHAAAAB0GaQD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GaYD/AJbABGCAHARggBwEYIAcBGCAHAAAAB0GagD/AJbABGCAHARggBwEYIAcBGCAHARggBwAAAAdBmqA/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmsA/wCWwARggBwEYIAcBGCAHARggBwAAAAdBmuA/wCWwARggBwEYIAcBGCAHARggBwEYIAcAAAAHQZsAP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZsgP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZtAP8AlsAEYIAcBGCAHARggBwEYIAcBGCAHAAAAB0GbYD/AJbABGCAHARggBwAAAAdBm4A/wCWwARggBwEYIAcBGCAHARggBwAAAAdBm6A/wCWwARggBwEYIAcBGCAHARggBwEYIAcAAAAHQZvAP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZvgP8AlsAEYIAcBGCAHARggBwEYIAcAAAAHQZoAO8AlsAEYIAcBGCAHARggBwEYIAcBGCAHAAAAB0GaIDfAJbABGCAHARggBwEYIAcBGCAHAAAMxm1vb3YAAABsbXZoZAAAAAAAAAAAAAAAAAAAA+gAABOgAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAPLdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAQAAAAAAABOIAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAElVVUA8AAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAATiAAAAAAAAQAAAAADQ21kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAKAAAAMgAVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAAAu5taW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAKuc3RibAAAAKpzdHNkAAAAAAAAAAEAAACaYXZjMQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAFAAPAASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAADRhdmNDAULAC//hABxnQsAL2QFB+/8ACwAMEAAAAwAQAAADAUDxQqSAAQAFaMuDyyAAAAAQcGFzcAAAAAsAAAAMAAAAGHN0dHMAAAAAAAAAAQAAADIAAAQAAAAAFHN0c3MAAAAAAAAAAQAAAAEAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAA3HN0c3oAAAAAAAAAAAAAADIAAANoAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAANhzdGNvAAAAAAAAADIAAABFAAADwQAAA9wAAAP3AAAEFgAABDEAAARMAAAEawAABIYAAAShAAAEwAAABNcAAATuAAAFDQAABSgAAAVDAAAFYgAABX0AAAWYAAAFtwAABdIAAAXtAAAGBAAABh8AAAY6AAAGWQAABnQAAAaPAAAGrgAABskAAAbkAAAHAwAABx4AAAcxAAAHUAAAB2sAAAeGAAAHpQAAB8AAAAfbAAAH+gAACBUAAAgwAAAITwAACGIAAAh9AAAInAAACLcAAAjSAAAI8QAACCV0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAAAAE6AAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAABOIAAAEAAABAAAAAAedbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAACsRAADYVRVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEhhbmRsZXIAAAAHSG1pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAHDHN0YmwAAABqc3RzZAAAAAAAAAABAAAAWm1wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAACsRAAAAAAANmVzZHMAAAAAA4CAgCUAAgAEgICAF0AVAAAAAAENiAAABVQFgICABRIIVuUABoCAgAECAAAAYHN0dHMAAAAAAAAACgAAAC8AAAQAAAAAAQAACtUAAAAsAAAEAAAAAAEAAArWAAAALAAABAAAAAABAAAK1QAAACwAAAQAAAAAAQAACtUAAAAaAAAEAAAAAAEAAAH/AAABzHN0c2MAAAAAAAAAJQAAAAEAAAABAAAAAQAAAAIAAAAFAAAAAQAAAAMAAAAEAAAAAQAAAAUAAAAFAAAAAQAAAAYAAAAEAAAAAQAAAAgAAAAFAAAAAQAAAAkAAAAEAAAAAQAAAAsAAAAFAAAAAQAAAAwAAAADAAAAAQAAAA4AAAAFAAAAAQAAAA8AAAAEAAAAAQAAABEAAAAFAAAAAQAAABIAAAAEAAAAAQAAABQAAAAFAAAAAQAAABUAAAAEAAAAAQAAABcAAAADAAAAAQAAABgAAAAEAAAAAQAAABoAAAAFAAAAAQAAABsAAAAEAAAAAQAAAB0AAAAFAAAAAQAAAB4AAAAEAAAAAQAAACAAAAAFAAAAAQAAACEAAAAEAAAAAQAAACIAAAACAAAAAQAAACMAAAAFAAAAAQAAACQAAAAEAAAAAQAAACYAAAAFAAAAAQAAACcAAAAEAAAAAQAAACkAAAAFAAAAAQAAACoAAAAEAAAAAQAAACwAAAAFAAAAAQAAAC0AAAACAAAAAQAAAC4AAAAEAAAAAQAAAC8AAAAFAAAAAQAAADAAAAAEAAAAAQAAADIAAAAFAAAAAQAAADMAAAAEAAAAAQAAA1xzdHN6AAAAAAAAAAAAAADSAAAAFQAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAA3HN0Y28AAAAAAAAAMwAAADAAAAOtAAADzAAAA+cAAAQCAAAEIQAABDwAAARXAAAEdgAABJEAAASsAAAEywAABOIAAAT5AAAFGAAABTMAAAVOAAAFbQAABYgAAAWjAAAFwgAABd0AAAX4AAAGDwAABioAAAZFAAAGZAAABn8AAAaaAAAGuQAABtQAAAbvAAAHDgAABykAAAc8AAAHWwAAB3YAAAeRAAAHsAAAB8sAAAfmAAAIBQAACCAAAAg7AAAIWgAACG0AAAiIAAAIpwAACMIAAAjdAAAI/AAAABpzZ3BkAQAAAHJvbGwAAAACAAAAAf//AAAAHHNiZ3AAAAAAcm9sbAAAAAEAAADSAAAAAQAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTguMjAuMTAw","enable","_addSourceToVideo","5352SSmEUU","webm","Samsung","play","absolute","visibilityState","Wake Lock released."];return(lg=function(){return t})()}class dg{constructor(t){const e=og;this[e(406)]=t,this[e(402)]=!1,cg()?(this.player[e(470)](e(425),"Native Wake Lock API supported."),this[e(448)]=null,this[e(401)]=()=>{const t=e;null!==this[t(448)]&&document[t(421)]===t(446)&&this[t(414)]()},document[e(434)](e(437),this[e(401)]),document[e(434)](e(428),this.handleVisibilityChange)):(this[e(406)].debugLog(e(425),e(455)),this[e(427)]=document[e(463)](e(456)),this.noSleepVideo[e(424)](e(439),e(461)),this[e(427)][e(424)]("playsinline",""),this._addSourceToVideo(this[e(427)],e(417),"data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwEAAAAAABLfEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHYTbuMU6uEElTDZ1OsggGXTbuMU6uEHFO7a1OsghLJ7AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmsirXsYMPQkBNgI1MYXZmNTguNDUuMTAwV0GNTGF2ZjU4LjQ1LjEwMESJiECzmgAAAAAAFlSua0C5rgEAAAAAAABO14EBc8WI9UhIq9EDJPCcgQAitZyDdW5khoVWX1ZQOIOBASPjg4QF9eEA4AEAAAAAAAAbsIIBQLqB8FSwggElVLqB8FWwiFW3gQFVuIECrgEAAAAAAABZ14ECc8WIUEWPA9J/iJ6cgQAitZyDdW5khoZBX09QVVNWqoNjLqBWu4QExLQAg4EC4ZGfgQG1iEDncAAAAAAAYmSBIGOik09wdXNIZWFkAQE4AYC7AAAAAAASVMNnQcJzcwEAAAAAAACXY8CAZ8gBAAAAAAAAFUWji01BSk9SX0JSQU5ERIeEaXNvbWfIAQAAAAAAABZFo41NSU5PUl9WRVJTSU9ORIeDNTEyZ8gBAAAAAAAAJ0WjkUNPTVBBVElCTEVfQlJBTkRTRIeQaXNvbWlzbzJhdmMxbXA0MWfIAQAAAAAAABpFo4dFTkNPREVSRIeNTGF2ZjU4LjQ1LjEwMHNzAQAAAAAAAIZjwItjxYj1SEir0QMk8GfIAQAAAAAAAB5Fo4xIQU5ETEVSX05BTUVEh4xWaWRlb0hhbmRsZXJnyAEAAAAAAAAhRaOHRU5DT0RFUkSHlExhdmM1OC45MS4xMDAgbGlidnB4Z8iiRaOIRFVSQVRJT05Eh5QwMDowMDowNS4wMDcwMDAwMDAAAHNzAQAAAAAAAIdjwItjxYhQRY8D0n+InmfIAQAAAAAAAB5Fo4xIQU5ETEVSX05BTUVEh4xTb3VuZEhhbmRsZXJnyAEAAAAAAAAiRaOHRU5DT0RFUkSHlUxhdmM1OC45MS4xMDAgbGlib3B1c2fIokWjiERVUkFUSU9ORIeUMDA6MDA6MDUuMDE4MDAwMDAwAAAfQ7Z1T2TngQCjh4IAAID4//6jQKSBAAeAMBIAnQEqQAHwAABHCIWFiIWEiAICAAYWBPcGgWSfa9ubJzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh7Jzh69AD+/6tQgKOHggAVgPj//qOHggApgPj//qOHggA9gPj//qOHggBRgPj//qOHggBlgPj//qOegQBrANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCAHmA+P/+o4eCAI2A+P/+o4eCAKGA+P/+o4eCALWA+P/+o4eCAMmA+P/+o56BAM8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IA3YD4//6jh4IA8YD4//6jh4IBBYD4//6jh4IBGYD4//6jh4IBLYD4//6jnoEBMwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggFBgPj//qOHggFVgPj//qOHggFpgPj//qOHggF9gPj//qOHggGRgPj//qOegQGXANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCAaWA+P/+o4eCAbmA+P/+o4eCAc2A+P/+o4eCAeGA+P/+o4eCAfWA+P/+o56BAfsA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4ICCYD4//6jh4ICHYD4//6jh4ICMYD4//6jh4ICRYD4//6jh4ICWYD4//6jnoECXwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggJtgPj//qOHggKBgPj//qOHggKVgPj//qOHggKpgPj//qOHggK9gPj//qOegQLDANECAAUQEBRgAGFgv9AAIgAQzX61yT5xzAAAo4eCAtGA+P/+o4eCAuWA+P/+o4eCAvmA+P/+o4eCAw2A+P/+o4eCAyGA+P/+o56BAycA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IDNYD4//6jh4IDSYD4//6jh4IDXYD4//6jh4IDcYD4//6jh4IDhYD4//6jnoEDiwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggOZgPj//qOHggOtgPj//qOHggPBgPj//qOHggPVgPj//qOHggPpgPj//qOegQPvANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCA/2A+P/+o4eCBBGA+P/+o4eCBCWA+P/+o4eCBDmA+P/+o4eCBE2A+P/+o56BBFMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IEiID4//6jh4IEnID4//6jh4IEsID4//6jnoEEtwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggTEgPj//qOHggTYgPj//qOHggTsgPj//qOHggUAgPj//qOHggUUgPj//qOegQUbANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCBSiA+P/+o4eCBTyA+P/+o4eCBVCA+P/+o4eCBWSA+P/+o4eCBXiA+P/+o56BBX8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IFjID4//6jh4IFoID4//6jh4IFtID4//6jh4IFyID4//6jh4IF3ID4//6jnoEF4wDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggXwgPj//qOHggYEgPj//qOHggYYgPj//qOHggYsgPj//qOHggZAgPj//qOegQZHANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCBlSA+P/+o4eCBmiA+P/+o4eCBnyA+P/+o4eCBpCA+P/+o4eCBqSA+P/+o56BBqsA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IGuID4//6jh4IGzID4//6jh4IG4ID4//6jh4IG9ID4//6jh4IHCID4//6jnoEHDwDRAgAFEBAUYABhYL/QACIAEM1+tck+ccwAAKOHggccgPj//qOHggcwgPj//qOHggdEgPj//qOHggdYgPj//qOHggdsgPj//qOegQdzANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCB4CA+P/+o4eCB5SA+P/+o4eCB6iA+P/+o4eCB7yA+P/+o4eCB9CA+P/+o56BB9cA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IH5ID4//6jh4IH+ID4//6jh4IIDID4//6jh4IIIID4//6jh4IINID4//6jnoEIOwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgghIgPj//qOHgghcgPj//qOHgghwgPj//qOHggiEgPj//qOegQifANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCMCA+P/+o4eCCNSA+P/+o4eCCOiA+P/+o4eCCPyA+P/+o56BCQMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IJEID4//6jh4IJJID4//6jh4IJOID4//6jh4IJTID4//6jh4IJYID4//6jnoEJZwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggl0gPj//qOHggmIgPj//qOHggmcgPj//qOHggmwgPj//qOHggnEgPj//qOegQnLANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCdiA+P/+o4eCCeyA+P/+o4eCCgCA+P/+o4eCChSA+P/+o4eCCiiA+P/+o56BCi8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IKPID4//6jh4IKUID4//6jh4IKZID4//6jh4IKeID4//6jh4IKjID4//6jnoEKkwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggqggPj//qOHggq0gPj//qOHggrIgPj//qOHggrcgPj//qOHggrwgPj//qOegQr3ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCCwSA+P/+o4eCCxiA+P/+o4eCCyyA+P/+o4eCC0CA+P/+o4eCC1SA+P/+o56BC1sA0QIABRAQFGAAYWC/0AAiABDNfrXJPnHMAACjh4ILaID4//6jh4ILfID4//6jh4ILkID4//6jh4ILpID4//6jh4ILuID4//6jnoELvwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHggvMgPj//qOHggvggPj//qOHggv0gPj//qOHggwIgPj//qOHggwcgPj//qOegQwjANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCDDCA+P/+o4eCDESA+P/+o4eCDFiA+P/+o4eCDGyA+P/+o4eCDICA+P/+o56BDIcA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IMlID4//6jh4IMqID4//6jh4IMvID4//6jh4IM0ID4//6jnoEM6wDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgg0MgPj//qOHgg0ggPj//qOHgg00gPj//qOHgg1IgPj//qOegQ1PANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCDVyA+P/+o4eCDXCA+P/+o4eCDYSA+P/+o4eCDZiA+P/+o4eCDayA+P/+o56BDbMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4INwID4//6jh4IN1ID4//6jh4IN6ID4//6jh4IN/ID4//6jh4IOEID4//6jnoEOFwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgg4kgPj//qOHgg44gPj//qOHgg5MgPj//qOHgg5ggPj//qOHgg50gPj//qOegQ57ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCDoiA+P/+o4eCDpyA+P/+o4eCDrCA+P/+o4eCDsSA+P/+o4eCDtiA+P/+o56BDt8A0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IO7ID4//6jh4IPAID4//6jh4IPFID4//6jh4IPKID4//6jh4IPPID4//6jnoEPQwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHgg9QgPj//qOHgg9kgPj//qOHgg94gPj//qOHgg+MgPj//qOHgg+ggPj//qOegQ+nANECAAUQEBRgAGFgv9AAIgAQzX61yT5xzAAAo4eCD7SA+P/+o4eCD8iA+P/+o4eCD9yA+P/+o4eCD/CA+P/+o4eCEASA+P/+o56BEAsA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IQGID4//6jh4IQLID4//6jh4IQQID4//6jh4IQVID4//6jh4IQaID4//6jnoEQbwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghB8gPj//qOHghCQgPj//qOHghCkgPj//qOHghC4gPj//qOHghDMgPj//qOegRDTANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEOCA+P/+o4eCEPSA+P/+o4eCEQiA+P/+o56BETcA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4IRQ4D4//6jh4IRV4D4//6jh4IRa4D4//6jh4IRf4D4//6jh4IRk4D4//6jnoERmwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghGngPj//qOHghG7gPj//qOHghHPgPj//qOHghHjgPj//qOHghH3gPj//qOegRH/ANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEguA+P/+o4eCEh+A+P/+o4eCEjOA+P/+o4eCEkeA+P/+o4eCEluA+P/+o56BEmMA0QIABRCsABgAGFgv9AAIgAQzX61yT5xzAACjh4ISb4D4//6jh4ISg4D4//6jh4ISl4D4//6jh4ISq4D4//6jh4ISv4D4//6jnoESxwDRAgAFEKwAGAAYWC/0AAiABDNfrXJPnHMAAKOHghLTgPj//qOHghLngPj//qOHghL7gPj//qOHghMPgPj//qOHghMjgPj//qOegRMrANECAAUQrAAYABhYL/QACIAEM1+tck+ccwAAo4eCEzeA+P/+o4eCE0uA+P/+o4eCE1+A+P/+o4eCE3OA+P/+oAEAAAAAAAAPoYeCE4cA+P/+daKDB/KBHFO7a5G7j7OBB7eK94EB8YIDX/CBDA=="),this[e(415)](this[e(427)],e(429),hg),Object[e(447)](this[e(427)][e(449)],{position:e(420),left:e(407),top:"-100%"}),document[e(443)](e(450))[e(405)](this[e(427)]),this[e(432)]=()=>{const t=e;this.noSleepVideo&&this[t(427)].currentTime>4&&(this[t(427)][t(465)]=1)},this[e(427)].addEventListener("timeupdate",this[e(432)]))}[og(430)](){const t=og;if(this[t(448)]&&(this._wakeLock[t(409)](),this._wakeLock=null),this[t(427)]){this[t(432)]&&this.noSleepVideo[t(431)](t(408),this[t(432)]);try{this[t(427)].parentNode&&this[t(427)][t(464)][t(411)](this[t(427)])}catch(e){this[t(406)][t(454)]("NoSleep",t(426))}this[t(427)]=null}this[t(401)]&&(document.removeEventListener("visibilitychange",this[t(401)]),document[t(431)]("fullscreenchange",this[t(401)]))}[og(415)](t,e,s){const i=og;var r=document[i(463)](i(469));r[i(445)]=s,r[i(466)]=i(440)+e,t.appendChild(r)}get isEnabled(){return this.enabled}[og(414)](){const t=og;if(cg())return navigator[t(457)][t(444)](t(410)).then((e=>{const s=t;this[s(448)]=e,this[s(402)]=!0,this[s(406)][s(470)]("wakeLock",s(404)),this[s(448)][s(434)](s(409),(()=>{const t=s;this.player[t(470)](t(457),t(422))}))}))[t(453)]((e=>{const s=t;throw this.enabled=!1,this[s(406)].debugWarn(s(457),e[s(451)]+", "+e[s(436)]),e}));return this.noSleepVideo[t(419)]()[t(441)]((e=>{const s=t;return this[s(406)][s(470)]("wakeLock",s(460)),this[s(402)]=!0,e}))[t(453)]((e=>{const s=t;throw this[s(406)][s(454)](s(457),s(438)+e[s(451)]+", "+e[s(436)]),this[s(402)]=!1,e}))}[og(459)](){const t=og;cg()?(this[t(448)]&&this[t(448)][t(409)](),this[t(448)]=null):this[t(427)]&&this[t(427)].pause(),this[t(402)]=!1,this[t(406)][t(470)]("wakeLock","Disabling wake lock.")}}function ug(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var pg={exports:{}};!function(t,e){var s,i,r,n,o;s=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,n=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(t,e,s){if(s=s||{},t=t.trim(),!(e=e.trim())){if(!s.alwaysNormalize)return t;var r=o.parseURL(t);if(!r)throw new Error("Error trying to parse base URL.");return r.path=o.normalizePath(r.path),o.buildURLFromParts(r)}var n=o.parseURL(e);if(!n)throw new Error("Error trying to parse relative URL.");if(n.scheme)return s.alwaysNormalize?(n.path=o.normalizePath(n.path),o.buildURLFromParts(n)):e;var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var h=i.exec(a.path);a.netLoc=h[1],a.path=h[2]}a.netLoc&&!a.path&&(a.path="/");var c={scheme:a.scheme,netLoc:n.netLoc,path:null,params:n.params,query:n.query,fragment:n.fragment};if(!n.netLoc&&(c.netLoc=a.netLoc,"/"!==n.path[0]))if(n.path){var l=a.path,d=l.substring(0,l.lastIndexOf("/")+1)+n.path;c.path=o.normalizePath(d)}else c.path=a.path,n.params||(c.params=a.params,n.query||(c.query=a.query));return null===c.path&&(c.path=s.alwaysNormalize?o.normalizePath(n.path):n.path),o.buildURLFromParts(c)},parseURL:function(t){var e=s.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(r,"");t.length!==(t=t.replace(n,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=o}(pg);var fg=pg.exports;function mg(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function gg(t){for(var e=1;e`):kg}(e)}))}const Dg=Cg,Lg=/^(\d+)x(\d+)$/,xg=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Pg{constructor(t){"string"==typeof t&&(t=Pg.parseAttrList(t)),bg(this,t)}get clientAttrs(){return Object.keys(this).filter((t=>"X-"===t.substring(0,2)))}decimalInteger(t){const e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e}hexadecimalInteger(t){if(this[t]){let e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;const s=new Uint8Array(e.length/2);for(let t=0;tNumber.MAX_SAFE_INTEGER?1/0:e}decimalFloatingPoint(t){return parseFloat(this[t])}optionalFloat(t,e){const s=this[t];return s?parseFloat(s):e}enumeratedString(t){return this[t]}bool(t){return"YES"===this[t]}decimalResolution(t){const e=Lg.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}}static parseAttrList(t){let e;const s={};for(xg.lastIndex=0;null!==(e=xg.exec(t));){let t=e[2];0===t.indexOf('"')&&t.lastIndexOf('"')===t.length-1&&(t=t.slice(1,-1));s[e[1].trim()]=t}return s}}function Bg(t){return"SCTE35-OUT"===t||"SCTE35-IN"===t}class Mg{constructor(t,e){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,e){const s=e.attr;for(const e in s)if(Object.prototype.hasOwnProperty.call(t,e)&&t[e]!==s[e]){Dg.warn(`DATERANGE tag attribute: "${e}" does not match for tags with ID: "${t.ID}"`),this._badValueForSameId=e;break}t=bg(new Pg({}),s,t)}if(this.attr=t,this._startDate=new Date(t["START-DATE"]),"END-DATE"in this.attr){const t=new Date(this.attr["END-DATE"]);vg(t.getTime())&&(this._endDate=t)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const t=this.duration;return null!==t?new Date(this._startDate.getTime()+1e3*t):null}get duration(){if("DURATION"in this.attr){const t=this.attr.decimalFloatingPoint("DURATION");if(vg(t))return t}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isValid(){return!!this.id&&!this._badValueForSameId&&vg(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class Fg{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var Og="audio",Ug="video",Ng="audiovideo";class jg{constructor(t){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[Og]:null,[Ug]:null,[Ng]:null},this.baseurl=t}setByteRange(t,e){const s=t.split("@",2);let i;i=1===s.length?(null==e?void 0:e.byteRangeEndOffset)||0:parseInt(s[1]),this._byteRange=[i,parseInt(s[0])+i]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=fg.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(t){this._url=t}}class Vg extends jg{constructor(t,e){super(e),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new Fg,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=t}get decryptdata(){const{levelkeys:t}=this;if(!t&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const t=Object.keys(this.levelkeys);if(1===t.length)return this._decryptdata=this.levelkeys[t[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(null===this.programDateTime)return null;if(!vg(this.programDateTime))return null;const t=vg(this.duration)?this.duration:0;return this.programDateTime+1e3*t}get encrypted(){var t;if(null!=(t=this._decryptdata)&&t.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),e=t.length;if(e>1||1===e&&this.levelkeys[t[0]].encrypted)return!0}return!1}setKeyFormat(t){if(this.levelkeys){const e=this.levelkeys[t];e&&!this._decryptdata&&(this._decryptdata=e.getDecryptData(this.sn))}}abortRequests(){var t,e;null==(t=this.loader)||t.abort(),null==(e=this.keyLoader)||e.abort()}setElementaryStreamInfo(t,e,s,i,r,n=!1){const{elementaryStreams:o}=this,a=o[t];a?(a.startPTS=Math.min(a.startPTS,e),a.endPTS=Math.max(a.endPTS,s),a.startDTS=Math.min(a.startDTS,i),a.endDTS=Math.max(a.endDTS,r)):o[t]={startPTS:e,endPTS:s,startDTS:i,endDTS:r,partial:n}}clearElementaryStreamInfo(){const{elementaryStreams:t}=this;t[Og]=null,t[Ug]=null,t[Ng]=null}}class zg extends jg{constructor(t,e,s,i,r){super(s),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new Fg,this.duration=t.decimalFloatingPoint("DURATION"),this.gap=t.bool("GAP"),this.independent=t.bool("INDEPENDENT"),this.relurl=t.enumeratedString("URI"),this.fragment=e,this.index=i;const n=t.enumeratedString("BYTERANGE");n&&this.setByteRange(n,r),r&&(this.fragOffset=r.fragOffset+r.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:t}=this;return!!(t.audio||t.video||t.audiovideo)}}class Gg{constructor(t){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=t}reloaded(t){if(!t)return this.advanced=!0,void(this.updated=!0);const e=this.lastPartSn-t.lastPartSn,s=this.lastPartIndex-t.lastPartIndex;this.updated=this.endSN!==t.endSN||!!s||!!e||!this.live,this.advanced=this.endSN>t.endSN||e>0||0===e&&s>0,this.updated||this.advanced?this.misses=Math.floor(.6*t.misses):this.misses=t.misses+1,this.availabilityDelay=t.availabilityDelay}get hasProgramDateTime(){return!!this.fragments.length&&vg(this.fragments[this.fragments.length-1].programDateTime)}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||10}get drift(){const t=this.driftEndTime-this.driftStartTime;if(t>0){return 1e3*(this.driftEnd-this.driftStart)/t}return 1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var t;return null!=(t=this.partList)&&t.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var t;return null!=(t=this.fragments)&&t.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var t;return null!=(t=this.partList)&&t.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var t;return null!=(t=this.partList)&&t.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function Wg(t){return Uint8Array.from(atob(t),(t=>t.charCodeAt(0)))}function Hg(t){const e=t.split(":");let s=null;if("data"===e[0]&&2===e.length){const t=e[1].split(";"),i=t[t.length-1].split(",");if(2===i.length){const e="base64"===i[0],r=i[1];e?(t.splice(-1,1),s=Wg(r)):s=function(t){const e=Kg(t).subarray(0,16),s=new Uint8Array(16);return s.set(e,16-e.length),s}(r)}}return s}function Kg(t){return Uint8Array.from(unescape(encodeURIComponent(t)),(t=>t.charCodeAt(0)))}const Qg="undefined"!=typeof self?self:void 0;var Yg={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},qg="org.w3.clearkey",Jg="com.apple.streamingkeydelivery",Xg="com.microsoft.playready",Zg="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function $g(t){switch(t){case Jg:return Yg.FAIRPLAY;case Xg:return Yg.PLAYREADY;case Zg:return Yg.WIDEVINE;case qg:return Yg.CLEARKEY}}var tA="edef8ba979d64acea3c827dcd51d21ed";function eA(t){switch(t){case Yg.FAIRPLAY:return Jg;case Yg.PLAYREADY:return Xg;case Yg.WIDEVINE:return Zg;case Yg.CLEARKEY:return qg}}function sA(t){const{drmSystems:e,widevineLicenseUrl:s}=t,i=e?[Yg.FAIRPLAY,Yg.WIDEVINE,Yg.PLAYREADY,Yg.CLEARKEY].filter((t=>!!e[t])):[];return!i[Yg.WIDEVINE]&&s&&i.push(Yg.WIDEVINE),i}const iA=null!=Qg&&null!=(rA=Qg.navigator)&&rA.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;var rA;function nA(t,e,s){return Uint8Array.prototype.slice?t.slice(e,s):new Uint8Array(Array.prototype.slice.call(t,e,s))}const oA=(t,e)=>e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128,aA=(t,e)=>e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128,hA=(t,e)=>{const s=e;let i=0;for(;oA(t,e);){i+=10;i+=cA(t,e+6),aA(t,e+10)&&(i+=10),e+=i}if(i>0)return t.subarray(s,s+i)},cA=(t,e)=>{let s=0;return s=(127&t[e])<<21,s|=(127&t[e+1])<<14,s|=(127&t[e+2])<<7,s|=127&t[e+3],s},lA=(t,e)=>oA(t,e)&&cA(t,e+6)+10<=t.length-e,dA=t=>{const e=fA(t);for(let t=0;tt&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info,pA=t=>{const e=String.fromCharCode(t[0],t[1],t[2],t[3]),s=cA(t,4);return{type:e,size:s,data:t.subarray(10,10+s)}},fA=t=>{let e=0;const s=[];for(;oA(t,e);){const i=cA(t,e+6);e+=10;const r=e+i;for(;e+8"PRIV"===t.type?gA(t):"W"===t.type[0]?yA(t):AA(t),gA=t=>{if(t.size<2)return;const e=vA(t.data,!0),s=new Uint8Array(t.data.subarray(e.length+1));return{key:t.type,info:e,data:s.buffer}},AA=t=>{if(t.size<2)return;if("TXXX"===t.type){let e=1;const s=vA(t.data.subarray(e),!0);e+=s.length+1;const i=vA(t.data.subarray(e));return{key:t.type,info:s,data:i}}const e=vA(t.data.subarray(1));return{key:t.type,data:e}},yA=t=>{if("WXXX"===t.type){if(t.size<2)return;let e=1;const s=vA(t.data.subarray(e),!0);e+=s.length+1;const i=vA(t.data.subarray(e));return{key:t.type,info:s,data:i}}const e=vA(t.data);return{key:t.type,data:e}},bA=t=>{if(8===t.data.byteLength){const e=new Uint8Array(t.data),s=1&e[3];let i=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return i/=45,s&&(i+=47721858.84),Math.round(i)}},vA=(t,e=!1)=>{const s=wA();if(s){const i=s.decode(t);if(e){const t=i.indexOf("\0");return-1!==t?i.substring(0,t):i}return i.replace(/\0/g,"")}const i=t.length;let r,n,o,a="",h=0;for(;h>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:a+=String.fromCharCode(r);break;case 12:case 13:n=t[h++],a+=String.fromCharCode((31&r)<<6|63&n);break;case 14:n=t[h++],o=t[h++],a+=String.fromCharCode((15&r)<<12|(63&n)<<6|(63&o)<<0)}}return a};let SA;function wA(){if(!navigator.userAgent.includes("PlayStation 4"))return SA||void 0===self.TextDecoder||(SA=new self.TextDecoder("utf-8")),SA}const EA=function(t){let e="";for(let s=0;s>24,t[e+1]=s>>16&255,t[e+2]=s>>8&255,t[e+3]=255&s}function PA(t,e){const s=[];if(!e.length)return s;const i=t.byteLength;for(let r=0;r1?r+n:i;if(_A(t.subarray(r+4,r+8))===e[0])if(1===e.length)s.push(t.subarray(r+8,o));else{const i=PA(t.subarray(r+8,o),e.slice(1));i.length&&TA.apply(s,i)}r=o}return s}function BA(t){const e=[],s=t[0];let i=8;const r=RA(t,i);i+=4;let n=0,o=0;0===s?(n=RA(t,i),o=RA(t,i+4),i+=8):(n=DA(t,i),o=DA(t,i+8),i+=16),i+=2;let a=t.length+o;const h=CA(t,i);i+=2;for(let s=0;s>>31)return Dg.warn("SIDX has hierarchical references (not supported)"),null;const h=RA(t,s);s+=4,e.push({referenceSize:o,subsegmentDuration:h,info:{duration:h/r,start:a,end:a+o-1}}),a+=o,s+=4,i=s}return{earliestPresentationTime:n,timescale:r,version:s,referencesCount:h,references:e}}function MA(t){const e=[],s=PA(t,["moov","trak"]);for(let t=0;t{const s=RA(t,4),i=e[s];i&&(i.default={duration:RA(t,12),flags:RA(t,20)})})),e}function FA(t){const e=t.subarray(8),s=e.subarray(86),i=_A(e.subarray(4,8));let r=i;const n="enca"===i||"encv"===i;if(n){const t=PA(e,[i])[0];PA(t.subarray("enca"===i?28:78),["sinf"]).forEach((t=>{const e=PA(t,["schm"])[0];if(e){const s=_A(e.subarray(4,8));if("cbcs"===s||"cenc"===s){const e=PA(t,["frma"])[0];e&&(r=_A(e))}}}))}switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const t=PA(s,["avcC"])[0];r+="."+UA(t[1])+UA(t[2])+UA(t[3]);break}case"mp4a":{const t=PA(e,[i])[0],s=PA(t.subarray(28),["esds"])[0];if(s&&s.length>12){let t=4;if(3!==s[t++])break;t=OA(s,t),t+=2;const e=s[t++];if(128&e&&(t+=2),64&e&&(t+=s[t++]),4!==s[t++])break;t=OA(s,t);const i=s[t++];if(64!==i)break;if(r+="."+UA(i),t+=12,5!==s[t++])break;t=OA(s,t);const n=s[t++];let o=(248&n)>>3;31===o&&(o+=1+((7&n)<<3)+((224&s[t])>>5)),r+="."+o}break}case"hvc1":case"hev1":{const t=PA(s,["hvcC"])[0],e=t[1],i=["","A","B","C"][e>>6],n=31&e,o=RA(t,2),a=(32&e)>>5?"H":"L",h=t[12],c=t.subarray(6,12);r+="."+i+n,r+="."+o.toString(16).toUpperCase(),r+="."+a+h;let l="";for(let t=c.length;t--;){const e=c[t];if(e||l){l="."+e.toString(16).toUpperCase()+l}}r+=l;break}case"dvh1":case"dvhe":{const t=PA(s,["dvcC"])[0],e=t[2]>>1&127,i=t[2]<<5&32|t[3]>>3&31;r+="."+NA(e)+"."+NA(i);break}case"vp09":{const t=PA(s,["vpcC"])[0],e=t[4],i=t[5],n=t[6]>>4&15;r+="."+NA(e)+"."+NA(i)+"."+NA(n);break}case"av01":{const t=PA(s,["av1C"])[0],e=t[1]>>>5,i=31&t[1],n=t[2]>>>7?"H":"M",o=(64&t[2])>>6,a=(32&t[2])>>5,h=2===e&&o?a?12:10:o?10:8,c=(16&t[2])>>4,l=(8&t[2])>>3,d=(4&t[2])>>2,u=3&t[2],p=1,f=1,m=1,g=0;r+="."+e+"."+NA(i)+n+"."+NA(h)+"."+c+"."+l+d+u+"."+NA(p)+"."+NA(f)+"."+NA(m)+"."+g;break}}return{codec:r,encrypted:n}}function OA(t,e){const s=e+5;for(;128&t[e++]&&e{const h=a.byteOffset-8;PA(a,["traf"]).map((a=>{const c=PA(a,["tfdt"]).map((t=>{const e=t[0];let s=RA(t,4);return 1===e&&(s*=Math.pow(2,32),s+=RA(t,8)),s/r}))[0];return void 0!==c&&(t=c),PA(a,["tfhd"]).map((c=>{const l=RA(c,4),d=16777215&RA(c,0);let u=0;const p=0!=(16&d);let f=0;const m=0!=(32&d);let g=8;l===n&&(0!=(1&d)&&(g+=8),0!=(2&d)&&(g+=4),0!=(8&d)&&(u=RA(c,g),g+=4),p&&(f=RA(c,g),g+=4),m&&(g+=4),"video"===e.type&&(o=function(t){if(!t)return!1;const e=t.indexOf("."),s=e<0?t:t.substring(0,e);return"hvc1"===s||"hev1"===s||"dvh1"===s||"dvhe"===s}(e.codec)),PA(a,["trun"]).map((n=>{const a=n[0],c=16777215&RA(n,0),l=0!=(1&c);let d=0;const p=0!=(4&c),m=0!=(256&c);let g=0;const A=0!=(512&c);let y=0;const b=0!=(1024&c),v=0!=(2048&c);let S=0;const w=RA(n,4);let E=8;l&&(d=RA(n,E),E+=4),p&&(E+=4);let I=d+h;for(let h=0;h>1&63;return 39===t||40===t}return 6===(31&e)}function HA(t,e,s,i){const r=KA(t);let n=0;n+=e;let o=0,a=0,h=0;for(;n=r.length)break;h=r[n++],o+=h}while(255===h);a=0;do{if(n>=r.length)break;h=r[n++],a+=h}while(255===h);const t=r.length-n;let e=n;if(at){Dg.error(`Malformed SEI payload. ${a} is too small, only ${t} bytes left to parse.`);break}if(4===o){if(181===r[e++]){const t=CA(r,e);if(e+=2,49===t){const t=RA(r,e);if(e+=4,1195456820===t){const t=r[e++];if(3===t){const n=r[e++],a=31&n,h=64&n,c=h?2+3*a:0,l=new Uint8Array(c);if(h){l[0]=n;for(let t=1;t16){const t=[];for(let s=0;s<16;s++){const i=r[e++].toString(16);t.push(1==i.length?"0"+i:i),3!==s&&5!==s&&7!==s&&9!==s||t.push("-")}const n=a-16,h=new Uint8Array(n);for(let t=0;t0?(n=new Uint8Array(4),e.length>0&&new DataView(n.buffer).setUint32(0,e.length,!1)):n=new Uint8Array;const o=new Uint8Array(4);return s&&s.byteLength>0&&new DataView(o.buffer).setUint32(0,s.byteLength,!1),function(t,...e){const s=e.length;let i=8,r=s;for(;r--;)i+=e[r].byteLength;const n=new Uint8Array(i);for(n[0]=i>>24&255,n[1]=i>>16&255,n[2]=i>>8&255,n[3]=255&i,n.set(t,4),r=0,i=8;r>8*(15-s)&255;return e}(t);return new qA(this.method,this.uri,"identity",this.keyFormatVersions,e)}const e=Hg(this.uri);if(e)switch(this.keyFormat){case Zg:this.pssh=e,e.length>=22&&(this.keyId=e.subarray(e.length-22,e.length-6));break;case Xg:{const t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=QA(t,null,e);const s=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2),i=String.fromCharCode.apply(null,Array.from(s)),r=i.substring(i.indexOf("<"),i.length),n=(new DOMParser).parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(n){const t=n.childNodes[0]?n.childNodes[0].nodeValue:n.getAttribute("VALUE");if(t){const e=Wg(t).subarray(0,16);!function(t){const e=function(t,e,s){const i=t[e];t[e]=t[s],t[s]=i};e(t,0,3),e(t,1,2),e(t,4,5),e(t,6,7)}(e),this.keyId=e}}break}default:{let t=e.subarray(0,16);if(16!==t.length){const e=new Uint8Array(16);e.set(t,16-t.length),t=e}this.keyId=t;break}}if(!this.keyId||16!==this.keyId.byteLength){let t=YA[this.uri];if(!t){const e=Object.keys(YA).length%Number.MAX_SAFE_INTEGER;t=new Uint8Array(16);new DataView(t.buffer,12,4).setUint32(0,e),YA[this.uri]=t}this.keyId=t}return this}}const JA=/\{\$([a-zA-Z0-9-_]+)\}/g;function XA(t){return JA.test(t)}function ZA(t,e,s){if(null!==t.variableList||t.hasVariableRefs)for(let i=s.length;i--;){const r=s[i],n=e[r];n&&(e[r]=$A(t,n))}}function $A(t,e){if(null!==t.variableList||t.hasVariableRefs){const s=t.variableList;return e.replace(JA,(e=>{const i=e.substring(2,e.length-1),r=null==s?void 0:s[i];return void 0===r?(t.playlistParsingError||(t.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${i}"`)),e):r}))}return e}function ty(t,e,s){let i,r,n=t.variableList;if(n||(t.variableList=n={}),"QUERYPARAM"in e){i=e.QUERYPARAM;try{const t=new self.URL(s).searchParams;if(!t.has(i))throw new Error(`"${i}" does not match any query parameter in URI: "${s}"`);r=t.get(i)}catch(e){t.playlistParsingError||(t.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${e.message}`))}}else i=e.NAME,r=e.VALUE;i in n?t.playlistParsingError||(t.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${i}"`)):n[i]=r||""}function ey(t,e,s){const i=e.IMPORT;if(s&&i in s){let e=t.variableList;e||(t.variableList=e={}),e[i]=s[i]}else t.playlistParsingError||(t.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${i}"`))}function sy(t=!0){if("undefined"==typeof self)return;return(t||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}const iy={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function ry(t,e,s=!0){return!t.split(",").some((t=>!ny(t,e,s)))}function ny(t,e,s=!0){var i;const r=sy(s);return null!=(i=null==r?void 0:r.isTypeSupported(oy(t,e)))&&i}function oy(t,e){return`${e}/mp4;codecs="${t}"`}function ay(t){if(t){const e=t.substring(0,4);return iy.video[e]}return 2}function hy(t){return t.split(",").reduce(((t,e)=>{const s=iy.video[e];return s?(2*s+t)/(t?3:2):(iy.audio[e]+t)/(t?2:1)}),0)}const cy={};const ly=/flac|opus/i;function dy(t,e=!0){return t.replace(ly,(t=>function(t,e=!0){if(cy[t])return cy[t];const s={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[t];for(let i=0;i0&&i.length({id:t.attrs.AUDIO,audioCodec:t.audioCodec}))),SUBTITLES:n.map((t=>({id:t.attrs.SUBTITLES,textCodec:t.textCodec}))),"CLOSED-CAPTIONS":[]};let a=0;for(fy.lastIndex=0;null!==(i=fy.exec(t));){const t=new Pg(i[1]),n=t.TYPE;if(n){const i=o[n],h=r[n]||[];r[n]=h,ZA(s,t,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const c=t.LANGUAGE,l=t["ASSOC-LANGUAGE"],d=t.CHANNELS,u=t.CHARACTERISTICS,p=t["INSTREAM-ID"],f={attrs:t,bitrate:0,id:a++,groupId:t["GROUP-ID"]||"",name:t.NAME||c||"",type:n,default:t.bool("DEFAULT"),autoselect:t.bool("AUTOSELECT"),forced:t.bool("FORCED"),lang:c,url:t.URI?yy.resolve(t.URI,e):""};if(l&&(f.assocLang=l),d&&(f.channels=d),u&&(f.characteristics=u),p&&(f.instreamId=p),null!=i&&i.length){const t=yy.findGroup(i,f.groupId)||i[0];wy(f,t,"audioCodec"),wy(f,t,"textCodec")}h.push(f)}}return r}static parseLevelPlaylist(t,e,s,i,r,n){const o=new Gg(e),a=o.fragments;let h,c,l,d=null,u=0,p=0,f=0,m=0,g=null,A=new Vg(i,e),y=-1,b=!1,v=null;for(gy.lastIndex=0,o.m3u8=t,o.hasVariableRefs=XA(t);null!==(h=gy.exec(t));){b&&(b=!1,A=new Vg(i,e),A.start=f,A.sn=u,A.cc=m,A.level=s,d&&(A.initSegment=d,A.rawProgramDateTime=d.rawProgramDateTime,d.rawProgramDateTime=null,v&&(A.setByteRange(v),v=null)));const t=h[1];if(t){A.duration=parseFloat(t);const e=(" "+h[2]).slice(1);A.title=e||null,A.tagList.push(e?["INF",t,e]:["INF",t])}else if(h[3]){if(vg(A.duration)){A.start=f,l&&Ty(A,l,o),A.sn=u,A.level=s,A.cc=m,a.push(A);const t=(" "+h[3]).slice(1);A.relurl=$A(o,t),Ey(A,g),g=A,f+=A.duration,u++,p=0,b=!0}}else if(h[4]){const t=(" "+h[4]).slice(1);g?A.setByteRange(t,g):A.setByteRange(t)}else if(h[5])A.rawProgramDateTime=(" "+h[5]).slice(1),A.tagList.push(["PROGRAM-DATE-TIME",A.rawProgramDateTime]),-1===y&&(y=a.length);else{if(h=h[0].match(Ay),!h){Dg.warn("No matches on slow regex match for level playlist!");continue}for(c=1;c0&&t.bool("CAN-SKIP-DATERANGES"),o.partHoldBack=t.optionalFloat("PART-HOLD-BACK",0),o.holdBack=t.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const t=new Pg(r);o.partTarget=t.decimalFloatingPoint("PART-TARGET");break}case"PART":{let t=o.partList;t||(t=o.partList=[]);const s=p>0?t[t.length-1]:void 0,i=p++,n=new Pg(r);ZA(o,n,["BYTERANGE","URI"]);const a=new zg(n,A,e,i,s);t.push(a),A.duration+=a.duration;break}case"PRELOAD-HINT":{const t=new Pg(r);ZA(o,t,["URI"]),o.preloadHint=t;break}case"RENDITION-REPORT":{const t=new Pg(r);ZA(o,t,["URI"]),o.renditionReports=o.renditionReports||[],o.renditionReports.push(t);break}default:Dg.warn(`line parsed but not handled: ${h}`)}}}g&&!g.relurl?(a.pop(),f-=g.duration,o.partList&&(o.fragmentHint=g)):o.partList&&(Ey(A,g),A.cc=m,o.fragmentHint=A,l&&Ty(A,l,o));const S=a.length,w=a[0],E=a[S-1];if(f+=o.skippedSegments*o.targetduration,f>0&&S&&E){o.averagetargetduration=f/S;const t=E.sn;o.endSN="initSegment"!==t?t:0,o.live||(E.endList=!0),w&&(o.startCC=w.cc)}else o.endSN=0,o.startCC=0;return o.fragmentHint&&(f+=o.fragmentHint.duration),o.totalduration=f,o.endCC=m,y>0&&function(t,e){let s=t[e];for(let i=e;i--;){const e=t[i];if(!e)return;e.programDateTime=s.programDateTime-1e3*e.duration,s=e}}(a,y),o}}function by(t,e,s){var i,r;const n=new Pg(t);ZA(s,n,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const o=null!=(i=n.METHOD)?i:"",a=n.URI,h=n.hexadecimalInteger("IV"),c=n.KEYFORMATVERSIONS,l=null!=(r=n.KEYFORMAT)?r:"identity";a&&n.IV&&!h&&Dg.error(`Invalid IV: ${n.IV}`);const d=a?yy.resolve(a,e):"",u=(c||"1").split("/").map(Number).filter(Number.isFinite);return new qA(o,d,l,u,h)}function vy(t){const e=new Pg(t).decimalFloatingPoint("TIME-OFFSET");return vg(e)?e:null}function Sy(t,e){let s=(t||"").split(/[ ,]+/).filter((t=>t));["video","audio","text"].forEach((t=>{const i=s.filter((e=>function(t,e){const s=iy[e];return!!s&&!!s[t.slice(0,4)]}(e,t)));i.length&&(e[`${t}Codec`]=i.join(","),s=s.filter((t=>-1===i.indexOf(t))))})),e.unknownCodecs=s}function wy(t,e,s){const i=e[s];i&&(t[s]=i)}function Ey(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):null!=e&&e.programDateTime&&(t.programDateTime=e.endProgramDateTime),vg(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}function Iy(t,e,s,i){t.relurl=e.URI,e.BYTERANGE&&t.setByteRange(e.BYTERANGE),t.level=s,t.sn="initSegment",i&&(t.levelkeys=i),t.initSegment=null}function Ty(t,e,s){t.levelkeys=e;const{encryptedFragments:i}=s;i.length&&i[i.length-1].levelkeys===e||!Object.keys(e).some((t=>e[t].isCommonEncryption))||i.push(t)}var ky="manifest",_y="level",Cy="audioTrack",Ry="subtitleTrack",Dy="main",Ly="audio",xy="subtitle";function Py(t){const{type:e}=t;switch(e){case Cy:return Ly;case Ry:return xy;default:return Dy}}function By(t,e){let s=t.url;return void 0!==s&&0!==s.indexOf("data:")||(s=e.url),s}class My{constructor(t){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=t,this.registerListeners()}startLoad(t){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:t}=this;t.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.on(Eg.LEVEL_LOADING,this.onLevelLoading,this),t.on(Eg.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(Eg.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:t}=this;t.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.off(Eg.LEVEL_LOADING,this.onLevelLoading,this),t.off(Eg.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(Eg.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(t){const e=this.hls.config,s=e.pLoader,i=e.loader,r=new(s||i)(e);return this.loaders[t.type]=r,r}getInternalLoader(t){return this.loaders[t.type]}resetInternalLoader(t){this.loaders[t]&&delete this.loaders[t]}destroyInternalLoaders(){for(const t in this.loaders){const e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(t,e){const{url:s}=e;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ky,url:s,deliveryDirectives:null})}onLevelLoading(t,e){const{id:s,level:i,pathwayId:r,url:n,deliveryDirectives:o}=e;this.load({id:s,level:i,pathwayId:r,responseType:"text",type:_y,url:n,deliveryDirectives:o})}onAudioTrackLoading(t,e){const{id:s,groupId:i,url:r,deliveryDirectives:n}=e;this.load({id:s,groupId:i,level:null,responseType:"text",type:Cy,url:r,deliveryDirectives:n})}onSubtitleTrackLoading(t,e){const{id:s,groupId:i,url:r,deliveryDirectives:n}=e;this.load({id:s,groupId:i,level:null,responseType:"text",type:Ry,url:r,deliveryDirectives:n})}load(t){var e;const s=this.hls.config;let i,r=this.getInternalLoader(t);if(r){const e=r.context;if(e&&e.url===t.url&&e.level===t.level)return void Dg.trace("[playlist-loader]: playlist request ongoing");Dg.log(`[playlist-loader]: aborting previous loader for type: ${t.type}`),r.abort()}if(i=t.type===ky?s.manifestLoadPolicy.default:bg({},s.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(t),vg(null==(e=t.deliveryDirectives)?void 0:e.part)){let e;if(t.type===_y&&null!==t.level?e=this.hls.levels[t.level].details:t.type===Cy&&null!==t.id?e=this.hls.audioTracks[t.id].details:t.type===Ry&&null!==t.id&&(e=this.hls.subtitleTracks[t.id].details),e){const t=e.partTarget,s=e.targetduration;if(t&&s){const e=1e3*Math.max(3*t,.8*s);i=bg({},i,{maxTimeToFirstByteMs:Math.min(e,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(e,i.maxTimeToFirstByteMs)})}}}const n=i.errorRetry||i.timeoutRetry||{},o={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:n.maxNumRetry||0,retryDelay:n.retryDelayMs||0,maxRetryDelay:n.maxRetryDelayMs||0},a={onSuccess:(t,e,s,i)=>{const r=this.getInternalLoader(s);this.resetInternalLoader(s.type);const n=t.data;0===n.indexOf("#EXTM3U")?(e.parsing.start=performance.now(),yy.isMediaPlaylist(n)?this.handleTrackOrLevelPlaylist(t,e,s,i||null,r):this.handleMasterPlaylist(t,e,s,i)):this.handleManifestParsingError(t,s,new Error("no EXTM3U delimiter"),i||null,e)},onError:(t,e,s,i)=>{this.handleNetworkError(e,s,!1,t,i)},onTimeout:(t,e,s)=>{this.handleNetworkError(e,s,!0,void 0,t)}};r.load(t,o,a)}handleMasterPlaylist(t,e,s,i){const r=this.hls,n=t.data,o=By(t,s),a=yy.parseMasterPlaylist(n,o);if(a.playlistParsingError)return void this.handleManifestParsingError(t,s,a.playlistParsingError,i,e);const{contentSteering:h,levels:c,sessionData:l,sessionKeys:d,startTimeOffset:u,variableList:p}=a;this.variableList=p;const{AUDIO:f=[],SUBTITLES:m,"CLOSED-CAPTIONS":g}=yy.parseMasterPlaylistMedia(n,o,a);if(f.length){f.some((t=>!t.url))||!c[0].audioCodec||c[0].attrs.AUDIO||(Dg.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),f.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Pg({}),bitrate:0,url:""}))}r.trigger(Eg.MANIFEST_LOADED,{levels:c,audioTracks:f,subtitles:m,captions:g,contentSteering:h,url:o,stats:e,networkDetails:i,sessionData:l,sessionKeys:d,startTimeOffset:u,variableList:p})}handleTrackOrLevelPlaylist(t,e,s,i,r){const n=this.hls,{id:o,level:a,type:h}=s,c=By(t,s),l=vg(a)?a:vg(o)?o:0,d=Py(s),u=yy.parseLevelPlaylist(t.data,c,l,d,0,this.variableList);if(h===ky){const t={attrs:new Pg({}),bitrate:0,details:u,name:"",url:c};n.trigger(Eg.MANIFEST_LOADED,{levels:[t],audioTracks:[],url:c,stats:e,networkDetails:i,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}e.parsing.end=performance.now(),s.levelDetails=u,this.handlePlaylistLoaded(u,t,e,s,i,r)}handleManifestParsingError(t,e,s,i,r){this.hls.trigger(Eg.ERROR,{type:Ig.NETWORK_ERROR,details:Tg.MANIFEST_PARSING_ERROR,fatal:e.type===ky,url:t.url,err:s,error:s,reason:s.message,response:t,context:e,networkDetails:i,stats:r})}handleNetworkError(t,e,s=!1,i,r){let n=`A network ${s?"timeout":"error"+(i?" (status "+i.code+")":"")} occurred while loading ${t.type}`;t.type===_y?n+=`: ${t.level} id: ${t.id}`:t.type!==Cy&&t.type!==Ry||(n+=` id: ${t.id} group-id: "${t.groupId}"`);const o=new Error(n);Dg.warn(`[playlist-loader]: ${n}`);let a=Tg.UNKNOWN,h=!1;const c=this.getInternalLoader(t);switch(t.type){case ky:a=s?Tg.MANIFEST_LOAD_TIMEOUT:Tg.MANIFEST_LOAD_ERROR,h=!0;break;case _y:a=s?Tg.LEVEL_LOAD_TIMEOUT:Tg.LEVEL_LOAD_ERROR,h=!1;break;case Cy:a=s?Tg.AUDIO_TRACK_LOAD_TIMEOUT:Tg.AUDIO_TRACK_LOAD_ERROR,h=!1;break;case Ry:a=s?Tg.SUBTITLE_TRACK_LOAD_TIMEOUT:Tg.SUBTITLE_LOAD_ERROR,h=!1}c&&this.resetInternalLoader(t.type);const l={type:Ig.NETWORK_ERROR,details:a,fatal:h,url:t.url,loader:c,context:t,error:o,networkDetails:e,stats:r};if(i){const s=(null==e?void 0:e.url)||t.url;l.response=gg({url:s,data:void 0},i)}this.hls.trigger(Eg.ERROR,l)}handlePlaylistLoaded(t,e,s,i,r,n){const o=this.hls,{type:a,level:h,id:c,groupId:l,deliveryDirectives:d}=i,u=By(e,i),p=Py(i),f="number"==typeof i.level&&p===Dy?h:void 0;if(!t.fragments.length){const t=new Error("No Segments found in Playlist");return void o.trigger(Eg.ERROR,{type:Ig.NETWORK_ERROR,details:Tg.LEVEL_EMPTY_ERROR,fatal:!1,url:u,error:t,reason:t.message,response:e,context:i,level:f,parent:p,networkDetails:r,stats:s})}t.targetduration||(t.playlistParsingError=new Error("Missing Target Duration"));const m=t.playlistParsingError;if(m)o.trigger(Eg.ERROR,{type:Ig.NETWORK_ERROR,details:Tg.LEVEL_PARSING_ERROR,fatal:!1,url:u,error:m,reason:m.message,response:e,context:i,level:f,parent:p,networkDetails:r,stats:s});else switch(t.live&&n&&(n.getCacheAge&&(t.ageHeader=n.getCacheAge()||0),n.getCacheAge&&!isNaN(t.ageHeader)||(t.ageHeader=0)),a){case ky:case _y:o.trigger(Eg.LEVEL_LOADED,{details:t,level:f||0,id:c||0,stats:s,networkDetails:r,deliveryDirectives:d});break;case Cy:o.trigger(Eg.AUDIO_TRACK_LOADED,{details:t,id:c||0,groupId:l||"",stats:s,networkDetails:r,deliveryDirectives:d});break;case Ry:o.trigger(Eg.SUBTITLE_TRACK_LOADED,{details:t,id:c||0,groupId:l||"",stats:s,networkDetails:r,deliveryDirectives:d})}}}function Fy(t,e){let s;try{s=new Event("addtrack")}catch(t){s=document.createEvent("Event"),s.initEvent("addtrack",!1,!1)}s.track=t,e.dispatchEvent(s)}function Oy(t,e){const s=t.mode;if("disabled"===s&&(t.mode="hidden"),t.cues&&!t.cues.getCueById(e.id))try{if(t.addCue(e),!t.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(s){Dg.debug(`[texttrack-utils]: ${s}`);try{const s=new self.TextTrackCue(e.startTime,e.endTime,e.text);s.id=e.id,t.addCue(s)}catch(t){Dg.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${t}`)}}"disabled"===s&&(t.mode=s)}function Uy(t){const e=t.mode;if("disabled"===e&&(t.mode="hidden"),t.cues)for(let e=t.cues.length;e--;)t.removeCue(t.cues[e]);"disabled"===e&&(t.mode=e)}function Ny(t,e,s,i){const r=t.mode;if("disabled"===r&&(t.mode="hidden"),t.cues&&t.cues.length>0){const r=function(t,e,s){const i=[],r=function(t,e){if(et[s].endTime)return-1;let i=0,r=s;for(;i<=r;){const n=Math.floor((r+i)/2);if(et[n].startTime&&i-1)for(let n=r,o=t.length;n=e&&r.endTime<=s)i.push(r);else if(r.startTime>s)return i}return i}(t.cues,e,s);for(let e=0;e{const t=Wy();try{t&&new t(0,Number.POSITIVE_INFINITY,"")}catch(t){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Qy(t,e){return t.getTime()/1e3-e}function Yy(t){return Uint8Array.from(t.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class qy{constructor(t){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=t,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:t}=this;t.on(Eg.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(Eg.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.on(Eg.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.on(Eg.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(Eg.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:t}=this;t.off(Eg.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(Eg.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.off(Eg.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),t.off(Eg.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(Eg.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(t,e){this.media=e.media}onMediaDetaching(){this.id3Track&&(Uy(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(t){const e=this.getID3Track(t.textTracks);return e.mode="hidden",e}getID3Track(t){if(this.media){for(let e=0;eKy&&(i=Ky);i-s<=0&&(i=s+.25);for(let t=0;tt.type===Vy&&a:"video"===i?t=>t.type===Gy&&o:t=>t.type===Vy&&a||t.type===Gy&&o,Ny(r,e,s,t)}}onLevelUpdated(t,{details:e}){if(!this.media||!e.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:s,id3Track:i}=this,{dateRanges:r}=e,n=Object.keys(r);if(i){const t=Object.keys(s).filter((t=>!n.includes(t)));for(let e=t.length;e--;){const r=t[e];Object.keys(s[r].cues).forEach((t=>{i.removeCue(s[r].cues[t])})),delete s[r]}}const o=e.fragments[e.fragments.length-1];if(0===n.length||!vg(null==o?void 0:o.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const a=o.programDateTime/1e3-o.start,h=Wy();for(let t=0;t{if(e!==i.id){const s=r[e];if(s.class===i.class&&s.startDate>i.startDate&&(!t||i.startDatethis.timeupdate(),this.hls=t,this.config=t.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:t,levelDetails:e}=this;return void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:e?t.liveMaxLatencyDurationCount*e.targetduration:0}get targetLatency(){const{levelDetails:t}=this;if(null===t)return null;const{holdBack:e,partHoldBack:s,targetduration:i}=t,{liveSyncDuration:r,liveSyncDurationCount:n,lowLatencyMode:o}=this.config,a=this.hls.userConfig;let h=o&&s||e;(a.liveSyncDuration||a.liveSyncDurationCount||0===h)&&(h=void 0!==r?r:n*i);const c=i;return h+Math.min(1*this.stallCount,c)}get liveSyncPosition(){const t=this.estimateLiveEdge(),e=this.targetLatency,s=this.levelDetails;if(null===t||null===e||null===s)return null;const i=s.edge,r=t-e-this.edgeStalled,n=i-s.totalduration,o=i-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(n,r),o)}get drift(){const{levelDetails:t}=this;return null===t?1:t.drift}get edgeStalled(){const{levelDetails:t}=this;if(null===t)return 0;const e=3*(this.config.lowLatencyMode&&t.partTarget||t.targetduration);return Math.max(t.age-e,0)}get forwardBufferLength(){const{media:t,levelDetails:e}=this;if(!t||!e)return 0;const s=t.buffered.length;return(s?t.buffered.end(s-1):e.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(Eg.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Eg.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(Eg.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(Eg.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(Eg.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Eg.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(Eg.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(Eg.ERROR,this.onError,this)}onMediaAttached(t,e){this.media=e.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(t,{details:e}){this.levelDetails=e,e.advanced&&this.timeupdate(),!e.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(t,e){var s;e.details===Tg.BUFFER_STALLED_ERROR&&(this.stallCount++,null!=(s=this.levelDetails)&&s.live&&Dg.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:t,levelDetails:e}=this;if(!t||!e)return;this.currentTime=t.currentTime;const s=this.computeLatency();if(null===s)return;this._latency=s;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:r}=this.config;if(!i||1===r||!e.live)return;const n=this.targetLatency;if(null===n)return;const o=s-n;if(o.05&&this.forwardBufferLength>1){const e=Math.min(2,Math.max(1,r)),s=Math.round(2/(1+Math.exp(-.75*o-this.edgeStalled))*20)/20;t.playbackRate=Math.min(e,Math.max(1,s))}else 1!==t.playbackRate&&0!==t.playbackRate&&(t.playbackRate=1)}estimateLiveEdge(){const{levelDetails:t}=this;return null===t?null:t.edge+t.age}computeLatency(){const t=this.estimateLiveEdge();return null===t?null:t-this.currentTime}}const Xy=["NONE","TYPE-0","TYPE-1",null];const Zy=["SDR","PQ","HLG"];var $y="",tb="YES",eb="v2";function sb(t){const{canSkipUntil:e,canSkipDateRanges:s,age:i}=t;return e&&i!!t)).map((t=>t.substring(0,4))).join(","),this.addGroupId("audio",t.attrs.AUDIO),this.addGroupId("text",t.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(t){return nb(this._audioGroups,t)}hasSubtitleGroup(t){return nb(this._subtitleGroups,t)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(t,e){if(e)if("audio"===t){let t=this._audioGroups;t||(t=this._audioGroups=[]),-1===t.indexOf(e)&&t.push(e)}else if("text"===t){let t=this._subtitleGroups;t||(t=this._subtitleGroups=[]),-1===t.indexOf(e)&&t.push(e)}}get urlId(){return 0}set urlId(t){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var t;return null==(t=this.audioGroups)?void 0:t[0]}get textGroupId(){var t;return null==(t=this.subtitleGroups)?void 0:t[0]}addFallback(){}}function nb(t,e){return!(!e||!t)&&-1!==t.indexOf(e)}function ob(t,e){const s=e.startPTS;if(vg(s)){let i,r=0;e.sn>t.sn?(r=s-t.start,i=t):(r=t.start-s,i=e),i.duration!==r&&(i.duration=r)}else if(e.sn>t.sn){t.cc===e.cc&&t.minEndPTS?e.start=t.start+(t.minEndPTS-t.start):e.start=t.start+t.duration}else e.start=Math.max(t.start-e.duration,0)}function ab(t,e,s,i,r,n){i-s<=0&&(Dg.warn("Fragment should have a positive duration",e),i=s+e.duration,n=r+e.duration);let o=s,a=i;const h=e.startPTS,c=e.endPTS;if(vg(h)){const t=Math.abs(h-s);vg(e.deltaPTS)?e.deltaPTS=Math.max(t,e.deltaPTS):e.deltaPTS=t,o=Math.max(s,h),s=Math.min(s,h),r=Math.min(r,e.startDTS),a=Math.min(i,c),i=Math.max(i,c),n=Math.max(n,e.endDTS)}const l=s-e.start;0!==e.start&&(e.start=s),e.duration=i-e.start,e.startPTS=s,e.maxStartPTS=o,e.startDTS=r,e.endPTS=i,e.minEndPTS=a,e.endDTS=n;const d=e.sn;if(!t||dt.endSN)return 0;let u;const p=d-t.startSN,f=t.fragments;for(f[p]=e,u=p;u>0;u--)ob(f[u],f[u-1]);for(u=p;u=0;t--){const e=i[t].initSegment;if(e){s=e;break}}t.fragmentHint&&delete t.fragmentHint.endPTS;let r,n=0;if(function(t,e,s){const i=e.skippedSegments,r=Math.max(t.startSN,e.startSN)-e.startSN,n=(t.fragmentHint?1:0)+(i?e.endSN:Math.min(t.endSN,e.endSN))-e.startSN,o=e.startSN-t.startSN,a=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,h=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;for(let t=r;t<=n;t++){const r=h[o+t];let n=a[t];i&&!n&&t{t.relurl&&(n=t.cc-i.cc),vg(t.startPTS)&&vg(t.endPTS)&&(i.start=i.startPTS=t.startPTS,i.startDTS=t.startDTS,i.maxStartPTS=t.maxStartPTS,i.endPTS=t.endPTS,i.endDTS=t.endDTS,i.minEndPTS=t.minEndPTS,i.duration=t.endPTS-t.startPTS,i.duration&&(r=i),e.PTSKnown=e.alignedSliding=!0),i.elementaryStreams=t.elementaryStreams,i.loader=t.loader,i.stats=t.stats,t.initSegment&&(i.initSegment=t.initSegment,s=t.initSegment)})),s){(e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments).forEach((t=>{var e;!t||t.initSegment&&t.initSegment.relurl!==(null==(e=s)?void 0:e.relurl)||(t.initSegment=s)}))}if(e.skippedSegments)if(e.deltaUpdateFailed=e.fragments.some((t=>!t)),e.deltaUpdateFailed){Dg.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let t=e.skippedSegments;t--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}else e.canSkipDateRanges&&(e.dateRanges=function(t,e,s){const i=bg({},t);s&&s.forEach((t=>{delete i[t]}));return Object.keys(e).forEach((t=>{const s=new Mg(e[t].attr,i[t]);s.isValid?i[t]=s:Dg.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(e[t].attr)}"`)})),i}(t.dateRanges,e.dateRanges,e.recentlyRemovedDateranges));const o=e.fragments;if(n){Dg.warn("discontinuity sliding from playlist, take drift into account");for(let t=0;t{e.elementaryStreams=t.elementaryStreams,e.stats=t.stats})),r?ab(e,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):cb(t,e),o.length&&(e.totalduration=e.edge-o[0].start),e.driftStartTime=t.driftStartTime,e.driftStart=t.driftStart;const a=e.advancedDateTime;if(e.advanced&&a){const t=e.edge;e.driftStart||(e.driftStartTime=a,e.driftStart=t),e.driftEndTime=a,e.driftEnd=t}else e.driftEndTime=t.driftEndTime,e.driftEnd=t.driftEnd,e.advancedDateTime=t.advancedDateTime}function cb(t,e){const s=e.startSN+e.skippedSegments-t.startSN,i=t.fragments;s<0||s>=i.length||lb(e,i[s].start)}function lb(t,e){if(e){const s=t.fragments;for(let i=t.skippedSegments;i{const{details:s}=t;null!=s&&s.fragments&&s.fragments.forEach((t=>{t.level=e}))}))}function fb(t){switch(t.details){case Tg.FRAG_LOAD_TIMEOUT:case Tg.KEY_LOAD_TIMEOUT:case Tg.LEVEL_LOAD_TIMEOUT:case Tg.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function mb(t,e){const s=fb(e);return t.default[(s?"timeout":"error")+"Retry"]}function gb(t,e){const s="linear"===t.backoff?1:Math.pow(2,e);return Math.min(s*t.retryDelayMs,t.maxRetryDelayMs)}function Ab(t){return gg(gg({},t),{errorRetry:null,timeoutRetry:null})}function yb(t,e,s,i){if(!t)return!1;const r=null==i?void 0:i.code,n=e499)}(r)||!!s);return t.shouldRetry?t.shouldRetry(t,e,s,i,n):n}const bb=function(t,e){let s=0,i=t.length-1,r=null,n=null;for(;s<=i;){r=(s+i)/2|0,n=t[r];const o=e(n);if(o>0)s=r+1;else{if(!(o<0))return n;i=r-1}}return null};function vb(t,e,s=0,i=0,r=.005){let n=null;if(t){n=e[t.sn-e[0].sn+1]||null;const i=t.endDTS-s;i>0&&i<15e-7&&(s+=15e-7)}else 0===s&&0===e[0].start&&(n=e[0]);if(n&&((!t||t.level===n.level)&&0===Sb(s,i,n)||function(t,e,s){if(e&&0===e.start&&e.level0){const i=e.tagList.reduce(((t,e)=>("INF"===e[0]&&(t+=parseFloat(e[1])),t)),s);return t.start<=i}return!1}(n,t,Math.min(r,i))))return n;const o=bb(e,Sb.bind(null,s,i));return!o||o===t&&n?n:o}function Sb(t=0,e=0,s){if(s.start<=t&&s.start+s.duration>t)return 0;const i=Math.min(e,s.duration+(s.deltaPTS?s.deltaPTS:0));return s.start+s.duration-i<=t?1:s.start-i>t&&s.start?-1:0}function wb(t,e,s){const i=1e3*Math.min(e,s.duration+(s.deltaPTS?s.deltaPTS:0));return(s.endProgramDateTime||0)-i>t}var Eb=0,Ib=2,Tb=3,kb=5,_b=0,Cb=1,Rb=2;class Db{constructor(t,e){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=Dg.log.bind(Dg,`${e}:`),this.warn=Dg.warn.bind(Dg,`${e}:`),this.hls=t}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){-1!==this.timer&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(t,e,s){const i=null==e?void 0:e.renditionReports;if(i){let r=-1;for(let s=0;s=0&&t>e.partTarget&&(o+=1)}const a=s&&sb(s);return new ib(n,o>=0?o:void 0,a)}}}loadPlaylist(t){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(t){return this.canLoad&&!!t&&!!t.url&&(!t.details||t.details.live)}shouldReloadPlaylist(t){return-1===this.timer&&-1===this.requestScheduled&&this.shouldLoadPlaylist(t)}playlistLoaded(t,e,s){const{details:i,stats:r}=e,n=self.performance.now(),o=r.loading.first?Math.max(0,n-r.loading.first):0;if(i.advancedDateTime=Date.now()-o,i.live||null!=s&&s.live){if(i.reloaded(s),s&&this.log(`live playlist ${t} ${i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED"}`),s&&i.fragments.length>0&&hb(s,i),!this.canLoad||!i.live)return;let o,a,h;if(i.canBlockReload&&i.endSN&&i.advanced){const t=this.hls.config.lowLatencyMode,r=i.lastPartSn,n=i.endSN,c=i.lastPartIndex,l=r===n,d=t?0:c;-1!==c?(a=l?n+1:r,h=l?d:c+1):a=n+1;const u=i.age,p=u+i.ageHeader;let f=Math.min(p-i.partTarget,1.5*i.targetduration);if(f>0){if(s&&f>s.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${s.tuneInGoal} to: ${f} with playlist age: ${i.age}`),f=0;else{const t=Math.floor(f/i.targetduration);if(a+=t,void 0!==h){h+=Math.round(f%i.targetduration/i.partTarget)}this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${u.toFixed(2)}s goal: ${f} skip sn ${t} to part ${h}`)}i.tuneInGoal=f}if(o=this.getDeliveryDirectives(i,e.deliveryDirectives,a,h),t||!l)return void this.loadPlaylist(o)}else(i.canBlockReload||i.canSkipUntil)&&(o=this.getDeliveryDirectives(i,e.deliveryDirectives,a,h));const c=this.hls.mainForwardBufferInfo,l=c?c.end-c.len:0,d=function(t,e=1/0){let s=1e3*t.targetduration;if(t.updated){const i=t.fragments,r=4;if(i.length&&s*r>e){const t=1e3*i[i.length-1].duration;tthis.requestScheduled+d&&(this.requestScheduled=r.loading.start),void 0!==a&&i.canBlockReload?this.requestScheduled=r.loading.first+d-(1e3*i.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+dthis.loadPlaylist(o)),u)}else this.clearTimer()}getDeliveryDirectives(t,e,s,i){let r=sb(t);return null!=e&&e.skip&&t.deltaUpdateFailed&&(s=e.msn,i=e.part,r=$y),new ib(s,i,r)}checkRetry(t){const e=t.details,s=fb(t),i=t.errorAction,{action:r,retryCount:n=0,retryConfig:o}=i||{},a=!!i&&!!o&&(r===kb||!i.resolved&&r===Ib);if(a){var h;if(this.requestScheduled=-1,n>=o.maxNumRetry)return!1;if(s&&null!=(h=t.context)&&h.deliveryDirectives)this.warn(`Retrying playlist loading ${n+1}/${o.maxNumRetry} after "${e}" without delivery-directives`),this.loadPlaylist();else{const t=gb(o,n);this.timer=self.setTimeout((()=>this.loadPlaylist()),t),this.warn(`Retrying playlist loading ${n+1}/${o.maxNumRetry} after "${e}" in ${t}ms`)}t.levelRetry=!0,i.resolved=!0}return a}}class Lb{constructor(t,e=0,s=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=t,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=e,this.totalWeight_=s}sample(t,e){const s=Math.pow(this.alpha_,t);this.estimate_=e*(1-s)+s*this.estimate_,this.totalWeight_+=t}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const t=1-Math.pow(this.alpha_,this.totalWeight_);if(t)return this.estimate_/t}return this.estimate_}}class xb{constructor(t,e,s,i=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=s,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Lb(t),this.fast_=new Lb(e),this.defaultTTFB_=i,this.ttfb_=new Lb(t)}update(t,e){const{slow_:s,fast_:i,ttfb_:r}=this;s.halfLife!==t&&(this.slow_=new Lb(t,s.getEstimate(),s.getTotalWeight())),i.halfLife!==e&&(this.fast_=new Lb(e,i.getEstimate(),i.getTotalWeight())),r.halfLife!==t&&(this.ttfb_=new Lb(t,r.getEstimate(),r.getTotalWeight()))}sample(t,e){const s=(t=Math.max(t,this.minDelayMs_))/1e3,i=8*e/s;this.fast_.sample(s,i),this.slow_.sample(s,i)}sampleTTFB(t){const e=t/1e3,s=Math.sqrt(2)*Math.exp(-Math.pow(e,2)/2);this.ttfb_.sample(s,Math.max(t,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const Pb={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},Bb={};function Mb(t,e,s,i,r,n){const o=t.audioCodec?t.audioGroups:null,a=null==n?void 0:n.audioCodec,h=null==n?void 0:n.channels,c=h?parseInt(h):a?1/0:2;let l=null;if(null!=o&&o.length)try{l=1===o.length&&o[0]?e.groups[o[0]].channels:o.reduce(((t,s)=>{if(s){const i=e.groups[s];if(!i)throw new Error(`Audio track group ${s} not found`);Object.keys(i.channels).forEach((e=>{t[e]=(t[e]||0)+i.channels[e]}))}return t}),{2:0})}catch(t){return!0}return void 0!==t.videoCodec&&(t.width>1920&&t.height>1088||t.height>1920&&t.width>1088||t.frameRate>Math.max(i,30)||"SDR"!==t.videoRange&&t.videoRange!==s||t.bitrate>Math.max(r,8e6))||!!l&&vg(c)&&Object.keys(l).some((t=>parseInt(t)>c))}function Fb(t,e,s){const i=t.videoCodec,r=t.audioCodec;if(!i||!r||!s)return Promise.resolve(Pb);const n={width:t.width,height:t.height,bitrate:Math.ceil(Math.max(.9*t.bitrate,t.averageBitrate)),framerate:t.frameRate||30},o=t.videoRange;"SDR"!==o&&(n.transferFunction=o.toLowerCase());const a=i.split(",").map((t=>({type:"media-source",video:gg(gg({},n),{},{contentType:oy(t,"video")})})));return r&&t.audioGroups&&t.audioGroups.forEach((t=>{var s;t&&(null==(s=e.groups[t])||s.tracks.forEach((e=>{if(e.groupId===t){const t=e.channels||"",s=parseFloat(t);vg(s)&&s>2&&a.push.apply(a,r.split(",").map((t=>({type:"media-source",audio:{contentType:oy(t,"audio"),channels:""+s}}))))}})))})),Promise.all(a.map((t=>{const e=function(t){const{audio:e,video:s}=t,i=s||e;if(i){const t=i.contentType.split('"')[1];if(s)return`r${s.height}x${s.width}f${Math.ceil(s.framerate)}${s.transferFunction||"sd"}_${t}_${Math.ceil(s.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${t}`}return""}(t);return Bb[e]||(Bb[e]=s.decodingInfo(t))}))).then((t=>({supported:!t.some((t=>!t.supported)),configurations:a,decodingInfoResults:t}))).catch((t=>({supported:!1,configurations:a,decodingInfoResults:[],error:t})))}function Ob(t,e){let s=!1,i=[];return t&&(s="SDR"!==t,i=[t]),e&&(i=e.allowedVideoRanges||Zy.slice(0),s=void 0!==e.preferHDR?e.preferHDR:function(){if("function"==typeof matchMedia){const t=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(t.media!==e.media)return!0===t.matches}return!1}(),i=s?i.filter((t=>"SDR"!==t)):["SDR"]),{preferHDR:s,allowedVideoRanges:i}}function Ub(t,e){Dg.log(`[abr] start candidates with "${t}" ignored because ${e}`)}function Nb(t,e,s){if("attrs"in t){const s=e.indexOf(t);if(-1!==s)return s}for(let i=0;i-1===i.indexOf(t)))}(a,e.characteristics))&&(void 0===s||s(t,e))}function Vb(t,e){const{audioCodec:s,channels:i}=t;return!(void 0!==s&&(e.audioCodec||"").substring(0,4)!==s.substring(0,4)||void 0!==i&&i!==(e.channels||"2"))}function zb(t,e,s){for(let i=e;i;i--)if(s(t[i]))return i;for(let i=e+1;i{const n=this.fragments[i];if(!n)return;if(r>=n.body.sn)return;if(!n.buffered&&!n.loaded)return void(n.body.type===s&&this.removeFragment(n.body));const o=n.range[t];o&&o.time.some((t=>{const s=!this.isTimeBuffered(t.startPTS,t.endPTS,e);return s&&this.removeFragment(n.body),s}))}))}detectPartialFragments(t){const e=this.timeRanges,{frag:s,part:i}=t;if(!e||"initSegment"===s.sn)return;const r=qb(s),n=this.fragments[r];if(!n||n.buffered&&s.gap)return;const o=!s.relurl;if(Object.keys(e).forEach((t=>{const r=s.elementaryStreams[t];if(!r)return;const a=e[t],h=o||!0===r.partial;n.range[t]=this.getBufferedTimes(s,i,h,a)})),n.loaded=null,Object.keys(n.range).length){n.buffered=!0;(n.body.endList=s.endList||n.body.endList)&&(this.endListFragments[n.body.type]=n),Yb(n)||this.removeParts(s.sn-1,s.type)}else this.removeFragment(n.body)}removeParts(t,e){const s=this.activePartLists[e];s&&(this.activePartLists[e]=s.filter((e=>e.fragment.sn>=t)))}fragBuffered(t,e){const s=qb(t);let i=this.fragments[s];!i&&e&&(i=this.fragments[s]={body:t,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},t.gap&&(this.hasGaps=!0)),i&&(i.loaded=null,i.buffered=!0)}getBufferedTimes(t,e,s,i){const r={time:[],partial:s},n=t.start,o=t.end,a=t.minEndPTS||o,h=t.maxStartPTS||n;for(let t=0;t=e&&a<=s){r.time.push({startPTS:Math.max(n,i.start(t)),endPTS:Math.min(o,i.end(t))});break}if(ne){const e=Math.max(n,i.start(t)),s=Math.min(o,i.end(t));s>e&&(r.partial=!0,r.time.push({startPTS:e,endPTS:s}))}else if(o<=e)break}return r}getPartialFragment(t){let e,s,i,r=null,n=0;const{bufferPadding:o,fragments:a}=this;return Object.keys(a).forEach((h=>{const c=a[h];c&&Yb(c)&&(s=c.body.start-o,i=c.body.end+o,t>=s&&t<=i&&(e=Math.min(t-s,i-t),n<=e&&(r=c.body,n=e)))})),r}isEndListAppended(t){const e=this.endListFragments[t];return void 0!==e&&(e.buffered||Yb(e))}getState(t){const e=qb(t),s=this.fragments[e];return s?s.buffered?Yb(s)?Hb:Kb:Wb:Gb}isTimeBuffered(t,e,s){let i,r;for(let n=0;n=i&&e<=r)return!0;if(e<=i)return!1}return!1}onFragLoaded(t,e){const{frag:s,part:i}=e;if("initSegment"===s.sn||s.bitrateTest)return;const r=i?null:e,n=qb(s);this.fragments[n]={body:s,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(t,e){const{frag:s,part:i,timeRanges:r}=e;if("initSegment"===s.sn)return;const n=s.type;if(i){let t=this.activePartLists[n];t||(this.activePartLists[n]=t=[]),t.push(i)}this.timeRanges=r,Object.keys(r).forEach((t=>{const e=r[t];this.detectEvictedFragments(t,e,n,i)}))}onFragBuffered(t,e){this.detectPartialFragments(e)}hasFragment(t){const e=qb(t);return!!this.fragments[e]}hasParts(t){var e;return!(null==(e=this.activePartLists[t])||!e.length)}removeFragmentsInRange(t,e,s,i,r){i&&!this.hasGaps||Object.keys(this.fragments).forEach((n=>{const o=this.fragments[n];if(!o)return;const a=o.body;a.type!==s||i&&!a.gap||a.startt&&(o.buffered||r)&&this.removeFragment(a)}))}removeFragment(t){const e=qb(t);t.stats.loaded=0,t.clearElementaryStreamInfo();const s=this.activePartLists[t.type];if(s){const e=t.sn;this.activePartLists[t.type]=s.filter((t=>t.fragment.sn!==e))}delete this.fragments[e],t.endList&&delete this.endListFragments[t.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function Yb(t){var e,s,i;return t.buffered&&(t.body.gap||(null==(e=t.range.video)?void 0:e.partial)||(null==(s=t.range.audio)?void 0:s.partial)||(null==(i=t.range.audiovideo)?void 0:i.partial))}function qb(t){return`${t.type}_${t.level}_${t.sn}`}const Jb={length:0,start:()=>0,end:()=>0};class Xb{static isBuffered(t,e){try{if(t){const s=Xb.getBuffered(t);for(let t=0;t=s.start(t)&&e<=s.end(t))return!0}}catch(t){}return!1}static bufferInfo(t,e,s){try{if(t){const i=Xb.getBuffered(t),r=[];let n;for(n=0;nn&&(i[r-1].end=t[e].end):i.push(t[e])}else i.push(t[e])}else i=t;let r,n=0,o=e,a=e;for(let t=0;t=h&&es.startCC||t&&t.cc{if(this.loader&&this.loader.destroy(),t.gap){if(t.tagList.some((t=>"GAP"===t[0])))return void a(av(t));t.gap=!1}const h=this.loader=t.loader=r?new r(i):new n(i),c=ov(t),l=Ab(i.fragLoadPolicy.default),d={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===t.sn?1/0:rv};t.stats=h.stats,h.load(c,d,{onSuccess:(e,s,i,r)=>{this.resetLoader(t,h);let n=e.data;i.resetIV&&t.decryptdata&&(t.decryptdata.iv=new Uint8Array(n.slice(0,16)),n=n.slice(16)),o({frag:t,part:null,payload:n,networkDetails:r})},onError:(e,i,r,n)=>{this.resetLoader(t,h),a(new hv({type:Ig.NETWORK_ERROR,details:Tg.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:gg({url:s,data:void 0},e),error:new Error(`HTTP Error ${e.code} ${e.text}`),networkDetails:r,stats:n}))},onAbort:(e,s,i)=>{this.resetLoader(t,h),a(new hv({type:Ig.NETWORK_ERROR,details:Tg.INTERNAL_ABORTED,fatal:!1,frag:t,error:new Error("Aborted"),networkDetails:i,stats:e}))},onTimeout:(e,s,i)=>{this.resetLoader(t,h),a(new hv({type:Ig.NETWORK_ERROR,details:Tg.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,error:new Error(`Timeout after ${d.timeout}ms`),networkDetails:i,stats:e}))},onProgress:(s,i,r,n)=>{e&&e({frag:t,part:null,payload:r,networkDetails:n})}})}))}loadPart(t,e,s){this.abort();const i=this.config,r=i.fLoader,n=i.loader;return new Promise(((o,a)=>{if(this.loader&&this.loader.destroy(),t.gap||e.gap)return void a(av(t,e));const h=this.loader=t.loader=r?new r(i):new n(i),c=ov(t,e),l=Ab(i.fragLoadPolicy.default),d={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:rv};e.stats=h.stats,h.load(c,d,{onSuccess:(i,r,n,a)=>{this.resetLoader(t,h),this.updateStatsFromPart(t,e);const c={frag:t,part:e,payload:i.data,networkDetails:a};s(c),o(c)},onError:(s,i,r,n)=>{this.resetLoader(t,h),a(new hv({type:Ig.NETWORK_ERROR,details:Tg.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:e,response:gg({url:c.url,data:void 0},s),error:new Error(`HTTP Error ${s.code} ${s.text}`),networkDetails:r,stats:n}))},onAbort:(s,i,r)=>{t.stats.aborted=e.stats.aborted,this.resetLoader(t,h),a(new hv({type:Ig.NETWORK_ERROR,details:Tg.INTERNAL_ABORTED,fatal:!1,frag:t,part:e,error:new Error("Aborted"),networkDetails:r,stats:s}))},onTimeout:(s,i,r)=>{this.resetLoader(t,h),a(new hv({type:Ig.NETWORK_ERROR,details:Tg.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:e,error:new Error(`Timeout after ${d.timeout}ms`),networkDetails:r,stats:s}))}})}))}updateStatsFromPart(t,e){const s=t.stats,i=e.stats,r=i.total;if(s.loaded+=i.loaded,r){const i=Math.round(t.duration/e.duration),n=Math.min(Math.round(s.loaded/r),i),o=(i-n)*Math.round(s.loaded/n);s.total=s.loaded+o}else s.total=Math.max(s.loaded,s.total);const n=s.loading,o=i.loading;n.start?n.first+=o.first-o.start:(n.start=o.start,n.first=o.first),n.end=o.end}resetLoader(t,e){t.loader=null,this.loader===e&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),e.destroy()}}function ov(t,e=null){const s=e||t,i={frag:t,part:e,responseType:"arraybuffer",url:s.url,headers:{},rangeStart:0,rangeEnd:0},r=s.byteRangeStartOffset,n=s.byteRangeEndOffset;if(vg(r)&&vg(n)){var o;let e=r,s=n;if("initSegment"===t.sn&&"AES-128"===(null==(o=t.decryptdata)?void 0:o.method)){const t=n-r;t%16&&(s=n+(16-t%16)),0!==r&&(i.resetIV=!0,e=r-16)}i.rangeStart=e,i.rangeEnd=s}return i}function av(t,e){const s=new Error(`GAP ${t.gap?"tag":"attribute"} found`),i={type:Ig.MEDIA_ERROR,details:Tg.FRAG_GAP,fatal:!1,frag:t,error:s,networkDetails:null};return e&&(i.part=e),(e||t).stats.aborted=!0,new hv(i)}class hv extends Error{constructor(t){super(t.error.message),this.data=void 0,this.data=t}}class cv{constructor(t,e){this.subtle=void 0,this.aesIV=void 0,this.subtle=t,this.aesIV=e}decrypt(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)}}class lv{constructor(t,e){this.subtle=void 0,this.key=void 0,this.subtle=t,this.key=e}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}class dv{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(t){const e=new DataView(t),s=new Uint32Array(4);for(let t=0;t<4;t++)s[t]=e.getUint32(4*t);return s}initTable(){const t=this.sBox,e=this.invSBox,s=this.subMix,i=s[0],r=s[1],n=s[2],o=s[3],a=this.invSubMix,h=a[0],c=a[1],l=a[2],d=a[3],u=new Uint32Array(256);let p=0,f=0,m=0;for(m=0;m<256;m++)u[m]=m<128?m<<1:m<<1^283;for(m=0;m<256;m++){let s=f^f<<1^f<<2^f<<3^f<<4;s=s>>>8^255&s^99,t[p]=s,e[s]=p;const a=u[p],m=u[a],g=u[m];let A=257*u[s]^16843008*s;i[p]=A<<24|A>>>8,r[p]=A<<16|A>>>16,n[p]=A<<8|A>>>24,o[p]=A,A=16843009*g^65537*m^257*a^16843008*p,h[s]=A<<24|A>>>8,c[s]=A<<16|A>>>16,l[s]=A<<8|A>>>24,d[s]=A,p?(p=a^u[u[u[g^a]]],f^=u[u[f]]):p=f=1}}expandKey(t){const e=this.uint8ArrayToUint32Array_(t);let s=!0,i=0;for(;i{if(!this.subtle)return Promise.reject(new Error("web crypto not initialized"));this.logOnce("WebCrypto AES decrypt");return new cv(this.subtle,new Uint8Array(s)).decrypt(t.buffer,e)})).catch((i=>(Dg.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(t,e,s))))}onWebCryptoError(t,e,s){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(t,e,s);const i=this.flush();if(i)return i.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(t){let e=t;const s=t.length-t.length%16;return s!==t.length&&(e=nA(t,0,s),this.remainderData=nA(t,s)),e}logOnce(t){this.logEnabled&&(Dg.log(`[decrypter]: ${t}`),this.logEnabled=!1)}}const pv=function(t){let e="";const s=t.length;for(let i=0;i1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}{constructor(t,e,s,i,r){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=fv,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=r,this.logPrefix=i,this.log=Dg.log.bind(Dg,`${i}:`),this.warn=Dg.warn.bind(Dg,`${i}:`),this.hls=t,this.fragmentLoader=new nv(t.config),this.keyLoader=s,this.fragmentTracker=e,this.config=t.config,this.decrypter=new uv(t.config),t.on(Eg.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(t){}stopLoad(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const t=this.fragCurrent;null!=t&&t.loader&&(t.abortRequests(),this.fragmentTracker.removeFragment(t)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=fv}_streamEnded(t,e){if(e.live||t.nextStart||!t.end||!this.media)return!1;const s=e.partList;if(null!=s&&s.length){const t=s[s.length-1];return Xb.isBuffered(this.media,t.start+t.duration/2)}const i=e.fragments[e.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(i)}getLevelDetails(){var t;if(this.levels&&null!==this.levelLastLoaded)return null==(t=this.levelLastLoaded)?void 0:t.details}onMediaAttached(t,e){const s=this.media=this.mediaBuffer=e.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),s.addEventListener("seeking",this.onvseeking),s.addEventListener("ended",this.onvended);const i=this.config;this.levels&&i.autoStartLoad&&this.state===fv&&this.startLoad(i.startPosition)}onMediaDetaching(){const t=this.media;null!=t&&t.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&this.onvseeking&&this.onvended&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:t,fragCurrent:e,media:s,mediaBuffer:i,state:r}=this,n=s?s.currentTime:0,o=Xb.bufferInfo(i||s,n,t.maxBufferHole);if(this.log(`media seeking to ${vg(n)?n.toFixed(3):n}, state: ${r}`),this.state===wv)this.resetLoadingState();else if(e){const s=t.maxFragLookUpTolerance,i=e.start-s,r=e.start+e.duration+s;if(!o.len||ro.end){const t=n>r;(n{if(this.fragContextChanged(t))return this.warn(`Fragment ${t.sn}${e.part?" p: "+e.part.index:""} of level ${t.level} was dropped during download.`),void this.fragmentTracker.removeFragment(t);t.stats.chunkCount++,this._handleFragmentLoadProgress(e)})).then((e=>{if(!e)return;const s=this.state;this.fragContextChanged(t)?(s===Av||!this.fragCurrent&&s===vv)&&(this.fragmentTracker.removeFragment(t),this.state=mv):("payload"in e&&(this.log(`Loaded fragment ${t.sn} of level ${t.level}`),this.hls.trigger(Eg.FRAG_LOADED,e)),this._handleFragmentLoadComplete(e))})).catch((e=>{this.state!==fv&&this.state!==Ev&&(this.warn(`Frag error: ${(null==e?void 0:e.message)||e}`),this.resetFragmentLoading(t))}))}clearTrackerIfNeeded(t){var e;const{fragmentTracker:s}=this;if(s.getState(t)===Wb){const e=t.type,i=this.getFwdBufferInfo(this.mediaBuffer,e),r=Math.max(t.duration,i?i.len:this.config.maxBufferLength),n=this.backtrackFragment;(1===(n?t.sn-n.sn:0)||this.reduceMaxBufferLength(r,t.duration))&&s.removeFragment(t)}else 0===(null==(e=this.mediaBuffer)?void 0:e.buffered.length)?s.removeAllFragments():s.hasParts(t.type)&&(s.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type}),s.getState(t)===Hb&&s.removeFragment(t))}checkLiveUpdate(t){if(t.updated&&!t.live){const e=t.fragments[t.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type})}t.fragments[0]||(t.deltaUpdateFailed=!0)}flushMainBuffer(t,e,s=null){if(!(t-e))return;const i={startOffset:t,endOffset:e,type:s};this.hls.trigger(Eg.BUFFER_FLUSHING,i)}_loadInitSegment(t,e){this._doFragLoad(t,e).then((e=>{if(!e||this.fragContextChanged(t)||!this.levels)throw new Error("init load aborted");return e})).then((e=>{const{hls:s}=this,{payload:i}=e,r=t.decryptdata;if(i&&i.byteLength>0&&null!=r&&r.key&&r.iv&&"AES-128"===r.method){const n=self.performance.now();return this.decrypter.decrypt(new Uint8Array(i),r.key.buffer,r.iv.buffer).catch((e=>{throw s.trigger(Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:t}),e})).then((i=>{const r=self.performance.now();return s.trigger(Eg.FRAG_DECRYPTED,{frag:t,payload:i,stats:{tstart:n,tdecrypt:r}}),e.payload=i,this.completeInitSegmentLoad(e)}))}return this.completeInitSegmentLoad(e)})).catch((e=>{this.state!==fv&&this.state!==Ev&&(this.warn(e),this.resetFragmentLoading(t))}))}completeInitSegmentLoad(t){const{levels:e}=this;if(!e)throw new Error("init load aborted, missing levels");const s=t.frag.stats;this.state=mv,t.frag.data=new Uint8Array(t.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),this.tick()}fragContextChanged(t){const{fragCurrent:e}=this;return!t||!e||t.sn!==e.sn||t.level!==e.level}fragBufferedComplete(t,e){var s,i,r,n;const o=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${t.type} sn: ${t.sn}${e?" part: "+e.index:""} of ${this.playlistType===Dy?"level":"track"} ${t.level} (frag:[${(null!=(s=t.startPTS)?s:NaN).toFixed(3)}-${(null!=(i=t.endPTS)?i:NaN).toFixed(3)}] > buffer:${o?pv(Xb.getBuffered(o)):"(detached)"})`),"initSegment"!==t.sn){var a;if(t.type!==xy){const e=t.elementaryStreams;if(!Object.keys(e).some((t=>!!e[t])))return void(this.state=mv)}const e=null==(a=this.levels)?void 0:a[t.level];null!=e&&e.fragmentError&&(this.log(`Resetting level fragment error count of ${e.fragmentError} on frag buffered`),e.fragmentError=0)}this.state=mv,o&&(!this.loadedmetadata&&t.type==Dy&&o.buffered.length&&(null==(r=this.fragCurrent)?void 0:r.sn)===(null==(n=this.fragPrevious)?void 0:n.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(t){const{transmuxer:e}=this;if(!e)return;const{frag:s,part:i,partsLoaded:r}=t,n=!r||0===r.length||r.some((t=>!t)),o=new Zb(s.level,s.sn,s.stats.chunkCount+1,0,i?i.index:-1,!n);e.flush(o)}_handleFragmentLoadProgress(t){}_doFragLoad(t,e,s=null,i){var r;const n=null==e?void 0:e.details;if(!this.levels||!n)throw new Error(`frag load aborted, missing level${n?"":" detail"}s`);let o=null;if(!t.encrypted||null!=(r=t.decryptdata)&&r.key?!t.encrypted&&n.encryptedFragments.length&&this.keyLoader.loadClear(t,n.encryptedFragments):(this.log(`Loading key for ${t.sn} of [${n.startSN}-${n.endSN}], ${"[stream-controller]"===this.logPrefix?"level":"track"} ${t.level}`),this.state=gv,this.fragCurrent=t,o=this.keyLoader.load(t).then((t=>{if(!this.fragContextChanged(t.frag))return this.hls.trigger(Eg.KEY_LOADED,t),this.state===gv&&(this.state=mv),t})),this.hls.trigger(Eg.KEY_LOADING,{frag:t}),null===this.fragCurrent&&(o=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))),s=Math.max(t.start,s||0),this.config.lowLatencyMode&&"initSegment"!==t.sn){const r=n.partList;if(r&&i){s>t.end&&n.fragmentHint&&(t=n.fragmentHint);const a=this.getNextPart(r,t,s);if(a>-1){const h=r[a];let c;return this.log(`Loading part sn: ${t.sn} p: ${h.index} cc: ${t.cc} of playlist [${n.startSN}-${n.endSN}] parts [0-${a}-${r.length-1}] ${"[stream-controller]"===this.logPrefix?"level":"track"}: ${t.level}, target: ${parseFloat(s.toFixed(3))}`),this.nextLoadPosition=h.start+h.duration,this.state=Av,c=o?o.then((s=>!s||this.fragContextChanged(s.frag)?null:this.doFragPartsLoad(t,h,e,i))).catch((t=>this.handleFragLoadError(t))):this.doFragPartsLoad(t,h,e,i).catch((t=>this.handleFragLoadError(t))),this.hls.trigger(Eg.FRAG_LOADING,{frag:t,part:h,targetBufferTime:s}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):c}if(!t.url||this.loadedEndOfParts(r,s))return Promise.resolve(null)}}this.log(`Loading fragment ${t.sn} cc: ${t.cc} ${n?"of ["+n.startSN+"-"+n.endSN+"] ":""}${"[stream-controller]"===this.logPrefix?"level":"track"}: ${t.level}, target: ${parseFloat(s.toFixed(3))}`),vg(t.sn)&&!this.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),this.state=Av;const a=this.config.progressive;let h;return h=a&&o?o.then((e=>!e||this.fragContextChanged(null==e?void 0:e.frag)?null:this.fragmentLoader.load(t,i))).catch((t=>this.handleFragLoadError(t))):Promise.all([this.fragmentLoader.load(t,a?i:void 0),o]).then((([t])=>(!a&&t&&i&&i(t),t))).catch((t=>this.handleFragLoadError(t))),this.hls.trigger(Eg.FRAG_LOADING,{frag:t,targetBufferTime:s}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):h}doFragPartsLoad(t,e,s,i){return new Promise(((r,n)=>{var o;const a=[],h=null==(o=s.details)?void 0:o.partList,c=e=>{this.fragmentLoader.loadPart(t,e,i).then((i=>{a[e.index]=i;const n=i.part;this.hls.trigger(Eg.FRAG_LOADED,i);const o=db(s,t.sn,e.index+1)||ub(h,t.sn,e.index+1);if(!o)return r({frag:t,part:n,partsLoaded:a});c(o)})).catch(n)};c(e)}))}handleFragLoadError(t){if("data"in t){const e=t.data;t.data&&e.details===Tg.INTERNAL_ABORTED?this.handleFragLoadAborted(e.frag,e.part):this.hls.trigger(Eg.ERROR,e)}else this.hls.trigger(Eg.ERROR,{type:Ig.OTHER_ERROR,details:Tg.INTERNAL_EXCEPTION,err:t,error:t,fatal:!0});return null}_handleTransmuxerFlush(t){const e=this.getCurrentContext(t);if(!e||this.state!==vv)return void(this.fragCurrent||this.state===fv||this.state===Ev||(this.state=mv));const{frag:s,part:i,level:r}=e,n=self.performance.now();s.stats.parsing.end=n,i&&(i.stats.parsing.end=n),this.updateLevelTiming(s,i,r,t.partial)}getCurrentContext(t){const{levels:e,fragCurrent:s}=this,{level:i,sn:r,part:n}=t;if(null==e||!e[i])return this.warn(`Levels object was unset while buffering fragment ${r} of level ${i}. The current chunk will not be buffered.`),null;const o=e[i],a=n>-1?db(o,r,n):null,h=a?a.fragment:function(t,e,s){if(null==t||!t.details)return null;const i=t.details;let r=i.fragments[e-i.startSN];return r||(r=i.fragmentHint,r&&r.sn===e?r:en&&this.flushMainBuffer(o,t.start)}getFwdBufferInfo(t,e){const s=this.getLoadPosition();return vg(s)?this.getFwdBufferInfoAtPos(t,s,e):null}getFwdBufferInfoAtPos(t,e,s){const{config:{maxBufferHole:i}}=this,r=Xb.bufferInfo(t,e,i);if(0===r.len&&void 0!==r.nextStart){const n=this.fragmentTracker.getBufferedFrag(e,s);if(n&&r.nextStart=i&&(s.maxMaxBufferLength=r,this.warn(`Reduce max buffer length to ${r}s`),!0)}getAppendedFrag(t,e=Dy){const s=this.fragmentTracker.getAppendedFrag(t,Dy);return s&&"fragment"in s?s.fragment:s}getNextFragment(t,e){const s=e.fragments,i=s.length;if(!i)return null;const{config:r}=this,n=s[0].start;let o;if(e.live){const a=r.initialLiveManifestSize;if(ie}getNextFragmentLoopLoading(t,e,s,i,r){const n=t.gap,o=this.getNextFragment(this.nextLoadPosition,e);if(null===o)return o;if(t=o,n&&t&&!t.gap&&s.nextStart){const e=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,s.nextStart,i);if(null!==e&&s.len+e.len>=r)return this.log(`buffer full after gaps in "${i}" playlist starting at sn: ${t.sn}`),null}return t}mapToInitFragWhenRequired(t){return null==t||!t.initSegment||null!=t&&t.initSegment.data||this.bitrateTest?t:t.initSegment}getNextPart(t,e,s){let i=-1,r=!1,n=!0;for(let o=0,a=t.length;o-1&&ss.start&&s.loaded}getInitialLiveFragment(t,e){const s=this.fragPrevious;let i=null;if(s){if(t.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${s.programDateTime}`),i=function(t,e,s){if(null===e||!Array.isArray(t)||!t.length||!vg(e))return null;if(e<(t[0].programDateTime||0))return null;if(e>=(t[t.length-1].endProgramDateTime||0))return null;s=s||0;for(let i=0;i=t.startSN&&r<=t.endSN){const n=e[r-t.startSN];s.cc===n.cc&&(i=n,this.log(`Live playlist, switching playlist, load frag with next SN: ${i.sn}`))}i||(i=function(t,e){return bb(t,(t=>t.cce?-1:0))}(e,s.cc),i&&this.log(`Live playlist, switching playlist, load frag with same CC: ${i.sn}`))}}else{const e=this.hls.liveSyncPosition;null!==e&&(i=this.getFragmentAtPosition(e,this.bitrateTest?t.fragmentEnd:t.edge,t))}return i}getFragmentAtPosition(t,e,s){const{config:i}=this;let{fragPrevious:r}=this,{fragments:n,endSN:o}=s;const{fragmentHint:a}=s,{maxFragLookUpTolerance:h}=i,c=s.partList,l=!!(i.lowLatencyMode&&null!=c&&c.length&&a);let d;if(l&&a&&!this.bitrateTest&&(n=n.concat(a),o=a.sn),te-h?0:h)}else d=n[n.length-1];if(d){const t=d.sn-s.startSN,e=this.fragmentTracker.getState(d);if((e===Kb||e===Hb&&d.gap)&&(r=d),r&&d.sn===r.sn&&(!l||c[0].fragment.sn>d.sn)){if(r&&d.level===r.level){const e=n[t+1];d=d.sn=n-e.maxFragLookUpTolerance&&r<=o;if(null!==i&&s.duration>i&&(r${t.startSN} prev-sn: ${r?r.sn:"na"} fragments: ${i}`),n}return r}waitForCdnTuneIn(t){return t.live&&t.canBlockReload&&t.partTarget&&t.tuneInGoal>Math.max(t.partHoldBack,3*t.partTarget)}setStartPosition(t,e){let s=this.startPosition;if(s ${null==(i=this.fragCurrent)?void 0:i.url}`);const r=e.details===Tg.FRAG_GAP;r&&this.fragmentTracker.fragBuffered(s,!0);const n=e.errorAction,{action:o,retryCount:a=0,retryConfig:h}=n||{};if(n&&o===kb&&h){this.resetStartWhenNotLoaded(this.levelLastLoaded);const i=gb(h,a);this.warn(`Fragment ${s.sn} of ${t} ${s.level} errored with ${e.details}, retrying loading ${a+1}/${h.maxNumRetry} in ${i}ms`),n.resolved=!0,this.retryDate=self.performance.now()+i,this.state=yv}else if(h&&n){if(this.resetFragmentErrors(t),!(a.5;r&&this.reduceMaxBufferLength(i.len,(null==e?void 0:e.duration)||10);const n=!r;return n&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${s} buffer`),e&&(this.fragmentTracker.removeFragment(e),this.nextLoadPosition=e.start),this.resetLoadingState(),n}return!1}resetFragmentErrors(t){t===Ly&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==fv&&(this.state=mv)}afterBufferFlushed(t,e,s){if(!t)return;const i=Xb.getBuffered(t);this.fragmentTracker.detectEvictedFragments(e,i,s),this.state===wv&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=mv}resetStartWhenNotLoaded(t){if(!this.loadedmetadata){this.startFragRequested=!1;const e=t?t.details:null;null!=e&&e.live?(this.startPosition=-1,this.setStartPosition(e,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(t){this.warn(`The loading context changed while buffering fragment ${t.sn} of level ${t.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(t=0){this.fragmentTracker.removeFragmentsInRange(t,1/0,this.playlistType,!1,!0)}updateLevelTiming(t,e,s,i){var r;const n=s.details;if(!n)return void this.warn("level.details undefined");if(!Object.keys(t.elementaryStreams).reduce(((e,r)=>{const o=t.elementaryStreams[r];if(o){const a=o.endPTS-o.startPTS;if(a<=0)return this.warn(`Could not parse fragment ${t.sn} ${r} duration reliably (${a})`),e||!1;const h=i?0:ab(n,t,o.startPTS,o.endPTS,o.startDTS,o.endDTS);return this.hls.trigger(Eg.LEVEL_PTS_UPDATED,{details:n,level:s,drift:h,type:r,frag:t,start:o.startPTS,end:o.endPTS}),!0}return e}),!1)&&null===(null==(r=this.transmuxer)?void 0:r.error)){const e=new Error(`Found no media in fragment ${t.sn} of level ${t.level} resetting transmuxer to fallback to playlist timing`);if(0===s.fragmentError&&(s.fragmentError++,t.gap=!0,this.fragmentTracker.removeFragment(t),this.fragmentTracker.fragBuffered(t,!0)),this.warn(e.message),this.hls.trigger(Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.FRAG_PARSING_ERROR,fatal:!1,error:e,frag:t,reason:`Found no media in msn ${t.sn} of level "${s.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=Sv,this.hls.trigger(Eg.FRAG_PARSED,{frag:t,part:e})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(t){"demuxerWorker"===t.event&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(t){const e=this._state;e!==t&&(this._state=t,this.log(`${e}->${t}`))}get state(){return this._state}}class _v{constructor(){this.chunks=[],this.dataLength=0}push(t){this.chunks.push(t),this.dataLength+=t.length}flush(){const{chunks:t,dataLength:e}=this;let s;return t.length?(s=1===t.length?t[0]:function(t,e){const s=new Uint8Array(e);let i=0;for(let e=0;e0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:i,type:Vy,duration:Number.POSITIVE_INFINITY});r{if(vg(t))return 90*t;return 9e4*e+(s?9e4*s.baseTime/s.timescale:0)};function Lv(t,e){return 255===t[e]&&240==(246&t[e+1])}function xv(t,e){return 1&t[e+1]?7:9}function Pv(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function Bv(t,e){return e+1=t.length)return!1;const i=Pv(t,e);if(i<=s)return!1;const r=e+i;return r===t.length||Bv(t,r)}return!1}function Fv(t,e,s,i,r){if(!t.samplerate){const n=function(t,e,s,i){let r,n,o,a;const h=navigator.userAgent.toLowerCase(),c=i,l=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];r=1+((192&e[s+2])>>>6);const d=(60&e[s+2])>>>2;if(!(d>l.length-1))return o=(1&e[s+2])<<2,o|=(192&e[s+3])>>>6,Dg.log(`manifest codec:${i}, ADTS type:${r}, samplingIndex:${d}`),/firefox/i.test(h)?d>=6?(r=5,a=new Array(4),n=d-3):(r=2,a=new Array(2),n=d):-1!==h.indexOf("android")?(r=2,a=new Array(2),n=d):(r=5,a=new Array(4),i&&(-1!==i.indexOf("mp4a.40.29")||-1!==i.indexOf("mp4a.40.5"))||!i&&d>=6?n=d-3:((i&&-1!==i.indexOf("mp4a.40.2")&&(d>=6&&1===o||/vivaldi/i.test(h))||!i&&1===o)&&(r=2,a=new Array(2)),n=d)),a[0]=r<<3,a[0]|=(14&d)>>1,a[1]|=(1&d)<<7,a[1]|=o<<3,5===r&&(a[1]|=(14&n)>>1,a[2]=(1&n)<<7,a[2]|=8,a[3]=0),{config:a,samplerate:l[d],channelCount:o,codec:"mp4a.40."+r,manifestCodec:c};{const e=new Error(`invalid ADTS sampling index:${d}`);t.emit(Eg.ERROR,Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.FRAG_PARSING_ERROR,fatal:!0,error:e,reason:e.message})}}(e,s,i,r);if(!n)return;t.config=n.config,t.samplerate=n.samplerate,t.channelCount=n.channelCount,t.codec=n.codec,t.manifestCodec=n.manifestCodec,Dg.log(`parsed codec:${t.codec}, rate:${n.samplerate}, channels:${n.channelCount}`)}}function Ov(t){return 9216e4/t}function Uv(t,e,s,i,r){const n=i+r*Ov(t.samplerate),o=function(t,e){const s=xv(t,e);if(e+s<=t.length){const i=Pv(t,e)-s;if(i>0)return{headerLength:s,frameLength:i}}}(e,s);let a;if(o){const{frameLength:i,headerLength:r}=o,h=r+i,c=Math.max(0,s+h-e.length);c?(a=new Uint8Array(h-r),a.set(e.subarray(s+r,e.length),0)):a=e.subarray(s+r,s+h);const l={unit:a,pts:n};return c||t.samples.push(l),{sample:l,length:h,missing:c}}const h=e.length-s;a=new Uint8Array(h),a.set(e.subarray(s,e.length),0);return{sample:{unit:a,pts:n},length:h,missing:-1}}let Nv=null;const jv=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Vv=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],zv=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Gv=[0,1,1,4];function Wv(t,e,s,i,r){if(s+24>e.length)return;const n=Hv(e,s);if(n&&s+n.frameLength<=e.length){const o=i+r*(9e4*n.samplesPerFrame/n.sampleRate),a={unit:e.subarray(s,s+n.frameLength),pts:o,dts:o};return t.config=[],t.channelCount=n.channelCount,t.samplerate=n.sampleRate,t.samples.push(a),{sample:a,length:n.frameLength,missing:0}}}function Hv(t,e){const s=t[e+1]>>3&3,i=t[e+1]>>1&3,r=t[e+2]>>4&15,n=t[e+2]>>2&3;if(1!==s&&0!==r&&15!==r&&3!==n){const o=t[e+2]>>1&1,a=t[e+3]>>6,h=1e3*jv[14*(3===s?3-i:3===i?3:4)+r-1],c=Vv[3*(3===s?0:2===s?1:2)+n],l=3===a?1:2,d=zv[s][i],u=Gv[i],p=8*d*u,f=Math.floor(d*h/c+o)*u;if(null===Nv){const t=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Nv=t?parseInt(t[1]):0}return!!Nv&&Nv<=87&&2===i&&h>=224e3&&0===a&&(t[e+3]=128|t[e+3]),{sampleRate:c,channelCount:l,frameLength:f,samplesPerFrame:p}}}function Kv(t,e){return 255===t[e]&&224==(224&t[e+1])&&0!=(6&t[e+1])}function Qv(t,e){return e+1{let s=0,i=5;e+=i;const r=new Uint32Array(1),n=new Uint32Array(1),o=new Uint8Array(1);for(;i>0;){o[0]=t[e];const a=Math.min(i,8),h=8-a;n[0]=4278190080>>>24+h<>h,s=s?s<e.length)return-1;if(11!==e[s]||119!==e[s+1])return-1;const n=e[s+4]>>6;if(n>=3)return-1;const o=[48e3,44100,32e3][n],a=63&e[s+4],h=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*a+n];if(s+h>e.length)return-1;const c=e[s+6]>>5;let l=0;2===c?l+=2:(1&c&&1!==c&&(l+=2),4&c&&(l+=2));const d=(e[s+6]<<8|e[s+7])>>12-l&1,u=[2,1,2,3,3,4,4,5][c]+d,p=e[s+5]>>3,f=7&e[s+5],m=new Uint8Array([n<<6|p<<1|f>>2,(3&f)<<6|c<<3|d<<2|a>>4,a<<4&224]),g=i+r*(1536/o*9e4),A=e.subarray(s,s+h);return t.config=m,t.channelCount=u,t.samplerate=o,t.samples.push({unit:A,pts:g}),h}class $v{constructor(t){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=t,this.bytesAvailable=t.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const t=this.data,e=this.bytesAvailable,s=t.byteLength-e,i=new Uint8Array(4),r=Math.min(4,e);if(0===r)throw new Error("no bytes available");i.set(t.subarray(s,s+r)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=8*r,this.bytesAvailable-=r}skipBits(t){let e;t=Math.min(t,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(e=(t-=this.bitsAvailable)>>3,t-=e<<3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)}readBits(t){let e=Math.min(this.bitsAvailable,t);const s=this.word>>>32-e;if(t>32&&Dg.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0)this.word<<=e;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return e=t-e,e>0&&this.bitsAvailable?s<>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const t=this.skipLZ();return this.readBits(t+1)-1}readEG(){const t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)}readBoolean(){return 1===this.readBits(1)}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}skipScalingList(t){let e,s=8,i=8;for(let r=0;r{var n;switch(i.type){case 1:{let e=!1;o=!0;const r=i.data;if(h&&r.length>4){const t=new $v(r).readSliceType();2!==t&&4!==t&&7!==t&&9!==t||(e=!0)}var c;if(e)null!=(c=a)&&c.frame&&!a.key&&(this.pushAccessUnit(a,t),a=this.VideoSample=null);a||(a=this.VideoSample=this.createVideoSample(!0,s.pts,s.dts,"")),a.frame=!0,a.key=e;break}case 5:o=!0,null!=(n=a)&&n.frame&&!a.key&&(this.pushAccessUnit(a,t),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,s.pts,s.dts,"")),a.key=!0,a.frame=!0;break;case 6:o=!0,HA(i.data,1,s.pts,e.samples);break;case 7:{var l,d;o=!0,h=!0;const e=i.data,s=new $v(e).readSPS();if(!t.sps||t.width!==s.width||t.height!==s.height||(null==(l=t.pixelRatio)?void 0:l[0])!==s.pixelRatio[0]||(null==(d=t.pixelRatio)?void 0:d[1])!==s.pixelRatio[1]){t.width=s.width,t.height=s.height,t.pixelRatio=s.pixelRatio,t.sps=[e],t.duration=r;const i=e.subarray(1,4);let n="avc1.";for(let t=0;t<3;t++){let e=i[t].toString(16);e.length<2&&(e="0"+e),n+=e}t.codec=n}break}case 8:o=!0,t.pps=[i.data];break;case 9:o=!0,t.audFound=!0,a&&this.pushAccessUnit(a,t),a=this.VideoSample=this.createVideoSample(!1,s.pts,s.dts,"");break;case 12:o=!0;break;default:o=!1,a&&(a.debug+="unknown NAL "+i.type+" ")}if(a&&o){a.units.push(i)}})),i&&a&&(this.pushAccessUnit(a,t),this.VideoSample=null)}parseAVCNALu(t,e){const s=e.byteLength;let i=t.naluState||0;const r=i,n=[];let o,a,h,c=0,l=-1,d=0;for(-1===i&&(l=0,d=31&e[0],i=0,c=1);c=0){const t={data:e.subarray(l,a),type:d};n.push(t)}else{const s=this.getLastNalUnit(t.samples);s&&(r&&c<=4-r&&s.state&&(s.data=s.data.subarray(0,s.data.byteLength-r)),a>0&&(s.data=zA(s.data,e.subarray(0,a)),s.state=0))}c=0&&i>=0){const t={data:e.subarray(l,s),type:d,state:i};n.push(t)}if(0===n.length){const s=this.getLastNalUnit(t.samples);s&&(s.data=zA(s.data,e))}return t.naluState=i,n}}class eS{constructor(t,e,s){this.keyData=void 0,this.decrypter=void 0,this.keyData=s,this.decrypter=new uv(e,{removePKCS7Padding:!1})}decryptBuffer(t){return this.decrypter.decrypt(t,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(t,e,s){const i=t[e].unit;if(i.length<=16)return;const r=i.subarray(16,i.length-i.length%16),n=r.buffer.slice(r.byteOffset,r.byteOffset+r.length);this.decryptBuffer(n).then((r=>{const n=new Uint8Array(r);i.set(n,16),this.decrypter.isSync()||this.decryptAacSamples(t,e+1,s)}))}decryptAacSamples(t,e,s){for(;;e++){if(e>=t.length)return void s();if(!(t[e].unit.length<32)&&(this.decryptAacSample(t,e,s),!this.decrypter.isSync()))return}}getAvcEncryptedData(t){const e=16*Math.floor((t.length-48)/160)+16,s=new Int8Array(e);let i=0;for(let e=32;e{r.data=this.getAvcDecryptedUnit(n,o),this.decrypter.isSync()||this.decryptAvcSamples(t,e,s+1,i)}))}decryptAvcSamples(t,e,s,i){if(t instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;e++,s=0){if(e>=t.length)return void i();const r=t[e].units;for(;!(s>=r.length);s++){const n=r[s];if(!(n.data.length<=48||1!==n.type&&5!==n.type||(this.decryptAvcSample(t,e,s,i,n),this.decrypter.isSync())))return}}}}const sS=188;class iS{constructor(t,e,s){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=t,this.config=e,this.typeSupported=s,this.videoParser=new tS}static probe(t){const e=iS.syncOffset(t);return e>0&&Dg.warn(`MPEG2-TS detected but first sync word found @ offset ${e}`),-1!==e}static syncOffset(t){const e=t.length;let s=Math.min(940,e-sS)+1,i=0;for(;i1&&(0===n&&o>2||a+sS>s))return n}i++}return-1}static createTrack(t,e){return{container:"video"===t||"audio"===t?"video/mp2t":void 0,type:t,id:kA[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===t?e:void 0}}resetInitSegment(t,e,s,i){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=iS.createTrack("video"),this._audioTrack=iS.createTrack("audio",i),this._id3Track=iS.createTrack("id3"),this._txtTrack=iS.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=e,this.videoCodec=s,this._duration=i}resetTimeStamp(){}resetContiguity(){const{_audioTrack:t,_videoTrack:e,_id3Track:s}=this;t&&(t.pesData=null),e&&(e.pesData=null),s&&(s.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(t,e,s=!1,i=!1){let r;s||(this.sampleAes=null);const n=this._videoTrack,o=this._audioTrack,a=this._id3Track,h=this._txtTrack;let c=n.pid,l=n.pesData,d=o.pid,u=a.pid,p=o.pesData,f=a.pesData,m=null,g=this.pmtParsed,A=this._pmtId,y=t.length;if(this.remainderData&&(y=(t=zA(this.remainderData,t)).length,this.remainderData=null),y>4>1){if(v=e+5+t[e+4],v===e+sS)continue}else v=e+4;switch(y){case c:i&&(l&&(r=cS(l))&&this.videoParser.parseAVCPES(n,h,r,!1,this._duration),l={data:[],size:0}),l&&(l.data.push(t.subarray(v,e+sS)),l.size+=e+sS-v);break;case d:if(i){if(p&&(r=cS(p)))switch(o.segmentCodec){case"aac":this.parseAACPES(o,r);break;case"mp3":this.parseMPEGPES(o,r);break;case"ac3":this.parseAC3PES(o,r)}p={data:[],size:0}}p&&(p.data.push(t.subarray(v,e+sS)),p.size+=e+sS-v);break;case u:i&&(f&&(r=cS(f))&&this.parseID3PES(a,r),f={data:[],size:0}),f&&(f.data.push(t.subarray(v,e+sS)),f.size+=e+sS-v);break;case 0:i&&(v+=t[v]+1),A=this._pmtId=nS(t,v);break;case A:{i&&(v+=t[v]+1);const r=oS(t,v,this.typeSupported,s,this.observer);c=r.videoPid,c>0&&(n.pid=c,n.segmentCodec=r.segmentVideoCodec),d=r.audioPid,d>0&&(o.pid=d,o.segmentCodec=r.segmentAudioCodec),u=r.id3Pid,u>0&&(a.pid=u),null===m||g||(Dg.warn(`MPEG-TS PMT found at ${e} after unknown PID '${m}'. Backtracking to sync byte @${b} to parse all TS packets.`),m=null,e=b-188),g=this.pmtParsed=!0;break}case 17:case 8191:break;default:m=y}}else v++;v>0&&aS(this.observer,new Error(`Found ${v} TS packet/s that do not start with 0x47`)),n.pesData=l,o.pesData=p,a.pesData=f;const S={audioTrack:o,videoTrack:n,id3Track:a,textTrack:h};return i&&this.extractRemainingSamples(S),S}flush(){const{remainderData:t}=this;let e;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e}extractRemainingSamples(t){const{audioTrack:e,videoTrack:s,id3Track:i,textTrack:r}=t,n=s.pesData,o=e.pesData,a=i.pesData;let h;if(n&&(h=cS(n))?(this.videoParser.parseAVCPES(s,r,h,!0,this._duration),s.pesData=null):s.pesData=n,o&&(h=cS(o))){switch(e.segmentCodec){case"aac":this.parseAACPES(e,h);break;case"mp3":this.parseMPEGPES(e,h);break;case"ac3":this.parseAC3PES(e,h)}e.pesData=null}else null!=o&&o.size&&Dg.log("last AAC PES packet truncated,might overlap between fragments"),e.pesData=o;a&&(h=cS(a))?(this.parseID3PES(i,h),i.pesData=null):i.pesData=a}demuxSampleAes(t,e,s){const i=this.demux(t,s,!0,!this.config.progressive),r=this.sampleAes=new eS(this.observer,this.config,e);return this.decrypt(i,r)}decrypt(t,e){return new Promise((s=>{const{audioTrack:i,videoTrack:r}=t;i.samples&&"aac"===i.segmentCodec?e.decryptAacSamples(i.samples,0,(()=>{r.samples?e.decryptAvcSamples(r.samples,0,0,(()=>{s(t)})):s(t)})):r.samples&&e.decryptAvcSamples(r.samples,0,0,(()=>{s(t)}))}))}destroy(){this._duration=0}parseAACPES(t,e){let s=0;const i=this.aacOverFlow;let r,n,o,a=e.data;if(i){this.aacOverFlow=null;const e=i.missing,r=i.sample.unit.byteLength;if(-1===e)a=zA(i.sample.unit,a);else{const n=r-e;i.sample.unit.set(a.subarray(0,e),n),t.samples.push(i.sample),s=i.missing}}for(r=s,n=a.length;r0;)a+=n}}parseID3PES(t,e){if(void 0===e.pts)return void Dg.warn("[tsdemuxer]: ID3 PES unknown PTS");const s=bg({},e,{type:this._videoTrack?Gy:Vy,duration:Number.POSITIVE_INFINITY});t.samples.push(s)}}function rS(t,e){return((31&t[e+1])<<8)+t[e+2]}function nS(t,e){return(31&t[e+10])<<8|t[e+11]}function oS(t,e,s,i,r){const n={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},o=e+3+((15&t[e+1])<<8|t[e+2])-4;for(e+=12+((15&t[e+10])<<8|t[e+11]);e0){let i=e+5,r=a;for(;r>2;){if(106===t[i])!0!==s.ac3?Dg.log("AC-3 audio found, not supported in this browser for now"):(n.audioPid=o,n.segmentAudioCodec="ac3");const e=t[i+1]+2;i+=e,r-=e}}break;case 194:case 135:return aS(r,new Error("Unsupported EC-3 in M2TS found")),n;case 36:return aS(r,new Error("Unsupported HEVC in M2TS found")),n}e+=a+5}return n}function aS(t,e,s){Dg.warn(`parsing error: ${e.message}`),t.emit(Eg.ERROR,Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.FRAG_PARSING_ERROR,fatal:!1,levelRetry:s,error:e,reason:e.message})}function hS(t){Dg.log(`${t} with AES-128-CBC encryption found in unencrypted stream`)}function cS(t){let e,s,i,r,n,o=0;const a=t.data;if(!t||0===t.size)return null;for(;a[0].length<19&&a.length>1;)a[0]=zA(a[0],a[1]),a.splice(1,1);e=a[0];if(1===(e[0]<<16)+(e[1]<<8)+e[2]){if(s=(e[4]<<8)+e[5],s&&s>t.size-6)return null;const h=e[7];192&h&&(r=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&h?(n=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2,r-n>54e5&&(Dg.warn(`${Math.round((r-n)/9e4)}s delta between PTS and DTS, align them`),r=n)):n=r),i=e[8];let c=i+9;if(t.size<=c)return null;t.size-=c;const l=new Uint8Array(t.size);for(let t=0,s=a.length;ts){c-=s;continue}e=e.subarray(c),s-=c,c=0}l.set(e,o),o+=s}return s&&(s-=i+3),{data:l,pts:r,dts:n,len:s}}return null}class lS{static getSilentFrame(t,e){if("mp4a.40.2"===t){if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}}}const dS=Math.pow(2,32)-1;class uS{static init(){let t;for(t in uS.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},uS.types)uS.types.hasOwnProperty(t)&&(uS.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);const e=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),s=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);uS.HDLR_TYPES={video:e,audio:s};const i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),r=new Uint8Array([0,0,0,0,0,0,0,0]);uS.STTS=uS.STSC=uS.STCO=r,uS.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),uS.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),uS.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),uS.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const n=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),a=new Uint8Array([0,0,0,1]);uS.FTYP=uS.box(uS.types.ftyp,n,a,n,o),uS.DINF=uS.box(uS.types.dinf,uS.box(uS.types.dref,i))}static box(t,...e){let s=8,i=e.length;const r=i;for(;i--;)s+=e[i].byteLength;const n=new Uint8Array(s);for(n[0]=s>>24&255,n[1]=s>>16&255,n[2]=s>>8&255,n[3]=255&s,n.set(t,4),i=0,s=8;i>24&255,t>>16&255,t>>8&255,255&t,s>>24,s>>16&255,s>>8&255,255&s,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))}static mdia(t){return uS.box(uS.types.mdia,uS.mdhd(t.timescale,t.duration),uS.hdlr(t.type),uS.minf(t))}static mfhd(t){return uS.box(uS.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))}static minf(t){return"audio"===t.type?uS.box(uS.types.minf,uS.box(uS.types.smhd,uS.SMHD),uS.DINF,uS.stbl(t)):uS.box(uS.types.minf,uS.box(uS.types.vmhd,uS.VMHD),uS.DINF,uS.stbl(t))}static moof(t,e,s){return uS.box(uS.types.moof,uS.mfhd(t),uS.traf(s,e))}static moov(t){let e=t.length;const s=[];for(;e--;)s[e]=uS.trak(t[e]);return uS.box.apply(null,[uS.types.moov,uS.mvhd(t[0].timescale,t[0].duration)].concat(s).concat(uS.mvex(t)))}static mvex(t){let e=t.length;const s=[];for(;e--;)s[e]=uS.trex(t[e]);return uS.box.apply(null,[uS.types.mvex,...s])}static mvhd(t,e){e*=t;const s=Math.floor(e/(dS+1)),i=Math.floor(e%(dS+1)),r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,s>>24,s>>16&255,s>>8&255,255&s,i>>24,i>>16&255,i>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return uS.box(uS.types.mvhd,r)}static sdtp(t){const e=t.samples||[],s=new Uint8Array(4+e.length);let i,r;for(i=0;i>>8&255),r.push(255&i),r=r.concat(Array.prototype.slice.call(s));for(e=0;e>>8&255),n.push(255&i),n=n.concat(Array.prototype.slice.call(s));const o=uS.box(uS.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|t.sps.length].concat(r).concat([t.pps.length]).concat(n))),a=t.width,h=t.height,c=t.pixelRatio[0],l=t.pixelRatio[1];return uS.box(uS.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a>>8&255,255&a,h>>8&255,255&h,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,uS.box(uS.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),uS.box(uS.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,l>>24,l>>16&255,l>>8&255,255&l])))}static esds(t){const e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))}static audioStsd(t){const e=t.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,e>>8&255,255&e,0,0])}static mp4a(t){return uS.box(uS.types.mp4a,uS.audioStsd(t),uS.box(uS.types.esds,uS.esds(t)))}static mp3(t){return uS.box(uS.types[".mp3"],uS.audioStsd(t))}static ac3(t){return uS.box(uS.types["ac-3"],uS.audioStsd(t),uS.box(uS.types.dac3,t.config))}static stsd(t){return"audio"===t.type?"mp3"===t.segmentCodec&&"mp3"===t.codec?uS.box(uS.types.stsd,uS.STSD,uS.mp3(t)):"ac3"===t.segmentCodec?uS.box(uS.types.stsd,uS.STSD,uS.ac3(t)):uS.box(uS.types.stsd,uS.STSD,uS.mp4a(t)):uS.box(uS.types.stsd,uS.STSD,uS.avc1(t))}static tkhd(t){const e=t.id,s=t.duration*t.timescale,i=t.width,r=t.height,n=Math.floor(s/(dS+1)),o=Math.floor(s%(dS+1));return uS.box(uS.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,o>>24,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,r>>8&255,255&r,0,0]))}static traf(t,e){const s=uS.sdtp(t),i=t.id,r=Math.floor(e/(dS+1)),n=Math.floor(e%(dS+1));return uS.box(uS.types.traf,uS.box(uS.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),uS.box(uS.types.tfdt,new Uint8Array([1,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,n>>24,n>>16&255,n>>8&255,255&n])),uS.trun(t,s.length+16+20+8+16+8+8),s)}static trak(t){return t.duration=t.duration||4294967295,uS.box(uS.types.trak,uS.tkhd(t),uS.mdia(t))}static trex(t){const e=t.id;return uS.box(uS.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(t,e){const s=t.samples||[],i=s.length,r=12+16*i,n=new Uint8Array(r);let o,a,h,c,l,d;for(e+=8+r,n.set(["video"===t.type?1:0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i,e>>>24&255,e>>>16&255,e>>>8&255,255&e],0),o=0;o>>24&255,h>>>16&255,h>>>8&255,255&h,c>>>24&255,c>>>16&255,c>>>8&255,255&c,l.isLeading<<2|l.dependsOn,l.isDependedOn<<6|l.hasRedundancy<<4|l.paddingValue<<1|l.isNonSync,61440&l.degradPrio,15&l.degradPrio,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*o);return uS.box(uS.types.trun,n)}static initSegment(t){uS.types||uS.init();const e=uS.moov(t);return zA(uS.FTYP,e)}}uS.types=void 0,uS.HDLR_TYPES=void 0,uS.STTS=void 0,uS.STSC=void 0,uS.STCO=void 0,uS.STSZ=void 0,uS.VMHD=void 0,uS.SMHD=void 0,uS.STSD=void 0,uS.FTYP=void 0,uS.DINF=void 0;function pS(t,e,s=1,i=!1){const r=t*e*s;return i?Math.round(r):r}function fS(t,e=!1){return pS(t,1e3,1/9e4,e)}let mS,gS=null,AS=null;class yS{constructor(t,e,s,i=""){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=t,this.config=e,this.typeSupported=s,this.ISGenerated=!1,null===gS){const t=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);gS=t?parseInt(t[1]):0}if(null===AS){const t=navigator.userAgent.match(/Safari\/(\d+)/i);AS=t?parseInt(t[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(t){Dg.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=t}resetNextTimestamp(){Dg.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){Dg.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(t){let e=!1;const s=t.reduce(((t,s)=>{const i=s.pts-t;return i<-4294967296?(e=!0,bS(t,s.pts)):i>0?t:s.pts}),t[0].pts);return e&&Dg.debug("PTS rollover detected"),s}remux(t,e,s,i,r,n,o,a){let h,c,l,d,u,p,f=r,m=r;const g=t.pid>-1,A=e.pid>-1,y=e.samples.length,b=t.samples.length>0,v=o&&y>0||y>1;if((!g||b)&&(!A||v)||this.ISGenerated||o){if(this.ISGenerated){var S,w,E,I;const t=this.videoTrackConfig;!t||e.width===t.width&&e.height===t.height&&(null==(S=e.pixelRatio)?void 0:S[0])===(null==(w=t.pixelRatio)?void 0:w[0])&&(null==(E=e.pixelRatio)?void 0:E[1])===(null==(I=t.pixelRatio)?void 0:I[1])||this.resetInitSegment()}else l=this.generateIS(t,e,r,n);const s=this.isVideoContiguous;let i,o=-1;if(v&&(o=function(t){for(let e=0;e0){Dg.warn(`[mp4-remuxer]: Dropped ${o} out of ${y} video samples due to a missing keyframe`);const t=this.getVideoStartPts(e.samples);e.samples=e.samples.slice(o),e.dropped+=o,m+=(e.samples[0].pts-t)/e.inputTimeScale,i=m}else-1===o&&(Dg.warn(`[mp4-remuxer]: No keyframe found out of ${y} video samples`),p=!1);if(this.ISGenerated){if(b&&v){const s=this.getVideoStartPts(e.samples),i=(bS(t.samples[0].pts,s)-s)/e.inputTimeScale;f+=Math.max(0,i),m+=Math.max(0,-i)}if(b){if(t.samplerate||(Dg.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),l=this.generateIS(t,e,r,n)),c=this.remuxAudio(t,f,this.isAudioContiguous,n,A||v||a===Ly?m:void 0),v){const i=c?c.endPTS-c.startPTS:0;e.inputTimeScale||(Dg.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),l=this.generateIS(t,e,r,n)),h=this.remuxVideo(e,m,s,i)}}else v&&(h=this.remuxVideo(e,m,s,0));h&&(h.firstKeyFrame=o,h.independent=-1!==o,h.firstKeyFramePTS=i)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(s.samples.length&&(u=vS(s,r,this._initPTS,this._initDTS)),i.samples.length&&(d=SS(i,r,this._initPTS))),{audio:c,video:h,initSegment:l,independent:p,text:d,id3:u}}generateIS(t,e,s,i){const r=t.samples,n=e.samples,o=this.typeSupported,a={},h=this._initPTS;let c,l,d,u=!h||i,p="audio/mp4";if(u&&(c=l=1/0),t.config&&r.length){switch(t.timescale=t.samplerate,t.segmentCodec){case"mp3":o.mpeg?(p="audio/mpeg",t.codec=""):o.mp3&&(t.codec="mp3");break;case"ac3":t.codec="ac-3"}a.audio={id:"audio",container:p,codec:t.codec,initSegment:"mp3"===t.segmentCodec&&o.mpeg?new Uint8Array(0):uS.initSegment([t]),metadata:{channelCount:t.channelCount}},u&&(d=t.inputTimeScale,h&&d===h.timescale?u=!1:c=l=r[0].pts-Math.round(d*s))}if(e.sps&&e.pps&&n.length){if(e.timescale=e.inputTimeScale,a.video={id:"main",container:"video/mp4",codec:e.codec,initSegment:uS.initSegment([e]),metadata:{width:e.width,height:e.height}},u)if(d=e.inputTimeScale,h&&d===h.timescale)u=!1;else{const t=this.getVideoStartPts(n),e=Math.round(d*s);l=Math.min(l,bS(n[0].dts,t)-e),c=Math.min(c,t-e)}this.videoTrackConfig={width:e.width,height:e.height,pixelRatio:e.pixelRatio}}if(Object.keys(a).length)return this.ISGenerated=!0,u?(this._initPTS={baseTime:c,timescale:d},this._initDTS={baseTime:l,timescale:d}):c=d=void 0,{tracks:a,initPTS:c,timescale:d}}remuxVideo(t,e,s,i){const r=t.inputTimeScale,n=t.samples,o=[],a=n.length,h=this._initPTS;let c,l,d=this.nextAvcDts,u=8,p=this.videoSampleDuration,f=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,g=!1;if(!s||null===d){const t=e*r,i=n[0].pts-bS(n[0].dts,n[0].pts);gS&&null!==d&&Math.abs(t-i-d)<15e3?s=!0:d=t-i}const A=h.baseTime*r/h.timescale;for(let t=0;t0?t-1:t].dts&&(g=!0)}g&&n.sort((function(t,e){const s=t.dts-e.dts,i=t.pts-e.pts;return s||i})),c=n[0].dts,l=n[n.length-1].dts;const y=l-c,b=y?Math.round(y/(a-1)):p||t.inputTimeScale/30;if(s){const t=c-d,s=t>b,i=t<-1;if((s||i)&&(s?Dg.warn(`AVC: ${fS(t,!0)} ms (${t}dts) hole between fragments detected at ${e.toFixed(3)}`):Dg.warn(`AVC: ${fS(-t,!0)} ms (${t}dts) overlapping between fragments detected at ${e.toFixed(3)}`),!i||d>=n[0].pts||gS)){c=d;const e=n[0].pts-t;if(s)n[0].dts=c,n[0].pts=e;else for(let s=0;se);s++)n[s].dts-=t,n[s].pts-=t;Dg.log(`Video: Initial PTS/DTS adjusted: ${fS(e,!0)}/${fS(c,!0)}, delta: ${fS(t,!0)} ms`)}}c=Math.max(0,c);let v=0,S=0,w=c;for(let t=0;t0?e.dts-n[t-1].dts:b;if(h=t>0?e.pts-n[t-1].pts:b,s.stretchShortVideoTrack&&null!==this.nextAudioPts){const t=Math.floor(s.maxBufferHole*r),n=(i?f+i*r:this.nextAudioPts)-e.pts;n>t?(p=n-o,p<0?p=o:k=!0,Dg.log(`[mp4-remuxer]: It is approximately ${n/90} ms to the next segment; using duration ${p/90} ms for the last video frame.`)):p=o}else p=o}const l=Math.round(e.pts-e.dts);_=Math.min(_,p),R=Math.max(R,p),C=Math.min(C,h),D=Math.max(D,h),o.push(new wS(e.key,p,c,l))}if(o.length)if(gS){if(gS<70){const t=o[0].flags;t.dependsOn=2,t.isNonSync=0}}else if(AS&&D-C0&&(i&&Math.abs(g-m)<9e3||Math.abs(bS(p[0].pts-A,g)-m)<20*h),p.forEach((function(t){t.pts=bS(t.pts-A,g)})),!s||m<0){if(p=p.filter((t=>t.pts>=0)),!p.length)return;m=0===r?0:i&&!u?Math.max(0,g):p[0].pts}if("aac"===t.segmentCodec){const e=this.config.maxAudioFramesDrift;for(let s=0,i=m;s=e*h&&c<1e4&&u){let e=Math.round(a/h);i=o-e*h,i<0&&(e--,i+=h),0===s&&(this.nextAudioPts=m=i),Dg.warn(`[mp4-remuxer]: Injecting ${e} audio frame @ ${(i/n).toFixed(3)}s due to ${Math.round(1e3*a/n)} ms gap.`);for(let n=0;n0))return;S+=f;try{y=new Uint8Array(S)}catch(t){return void this.observer.emit(Eg.ERROR,Eg.ERROR,{type:Ig.MUX_ERROR,details:Tg.REMUX_ALLOC_ERROR,fatal:!1,error:t,bytes:S,reason:`fail allocating audio mdat ${S}`})}if(!l){new DataView(y.buffer).setUint32(0,S),y.set(uS.types.mdat,4)}}y.set(r,f);const h=r.byteLength;f+=h,d.push(new wS(!0,a,h,0)),v=n}const E=d.length;if(!E)return;const I=d[d.length-1];this.nextAudioPts=m=v+o*I.duration;const T=l?new Uint8Array(0):uS.moof(t.sequenceNumber++,b/o,bg({},t,{samples:d}));t.samples=[];const k=b/n,_=m/n,C={data1:T,data2:y,startPTS:k,endPTS:_,startDTS:k,endDTS:_,type:"audio",hasAudio:!0,hasVideo:!1,nb:E};return this.isAudioContiguous=!0,C}remuxEmptyAudio(t,e,s,i){const r=t.inputTimeScale,n=r/(t.samplerate?t.samplerate:r),o=this.nextAudioPts,a=this._initDTS,h=9e4*a.baseTime/a.timescale,c=(null!==o?o:i.startDTS*r)+h,l=i.endDTS*r+h,d=1024*n,u=Math.ceil((l-c)/d),p=lS.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(Dg.warn("[mp4-remuxer]: remux empty Audio"),!p)return void Dg.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");const f=[];for(let t=0;t4294967296;)t+=s;return t}function vS(t,e,s,i){const r=t.samples.length;if(!r)return;const n=t.inputTimeScale;for(let o=0;ot.pts-e.pts));const n=t.samples;return t.samples=[],{samples:n}}class wS{constructor(t,e,s,i){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=e,this.size=s,this.cts=i,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:t?2:1,isNonSync:t?0:1}}}function ES(t,e){const s=null==t?void 0:t.codec;if(s&&s.length>4)return s;if(e===Og){if("ec-3"===s||"ac-3"===s||"alac"===s)return s;if("fLaC"===s||"Opus"===s){return dy(s,!1)}const t="mp4a.40.5";return Dg.info(`Parsed audio codec "${s}" or audio object type not handled. Using "${t}"`),t}return Dg.warn(`Unhandled video codec "${s}"`),"hvc1"===s||"hev1"===s?"hvc1.1.6.L120.90":"av01"===s?"av01.0.04M.08":"avc1.42e01e"}try{mS=self.performance.now.bind(self.performance)}catch(t){Dg.debug("Unable to use Performance API on this environment"),mS=null==Qg?void 0:Qg.Date.now}const IS=[{demux:class{constructor(t,e){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=e}resetTimeStamp(){}resetInitSegment(t,e,s,i){const r=this.videoTrack=Cv("video",1),n=this.audioTrack=Cv("audio",1),o=this.txtTrack=Cv("text",1);if(this.id3Track=Cv("id3",1),this.timeOffset=0,null==t||!t.byteLength)return;const a=MA(t);if(a.video){const{id:t,timescale:e,codec:s}=a.video;r.id=t,r.timescale=o.timescale=e,r.codec=s}if(a.audio){const{id:t,timescale:e,codec:s}=a.audio;n.id=t,n.timescale=e,n.codec=s}o.id=kA.text,r.sampleDuration=0,r.duration=n.duration=i}resetContiguity(){this.remainderData=null}static probe(t){return function(t){const e=t.byteLength;for(let s=0;s8&&109===t[s+4]&&111===t[s+5]&&111===t[s+6]&&102===t[s+7])return!0;s=i>1?s+i:e}return!1}(t)}demux(t,e){this.timeOffset=e;let s=t;const i=this.videoTrack,r=this.txtTrack;if(this.config.progressive){this.remainderData&&(s=zA(this.remainderData,t));const e=function(t){const e={valid:null,remainder:null},s=PA(t,["moof"]);if(s.length<2)return e.remainder=t,e;const i=s[s.length-1];return e.valid=nA(t,0,i.byteOffset-8),e.remainder=nA(t,i.byteOffset-8),e}(s);this.remainderData=e.remainder,i.samples=e.valid||new Uint8Array}else i.samples=s;const n=this.extractID3Track(i,e);return r.samples=GA(e,i),{videoTrack:i,audioTrack:this.audioTrack,id3Track:n,textTrack:this.txtTrack}}flush(){const t=this.timeOffset,e=this.videoTrack,s=this.txtTrack;e.samples=this.remainderData||new Uint8Array,this.remainderData=null;const i=this.extractID3Track(e,this.timeOffset);return s.samples=GA(t,e),{videoTrack:e,audioTrack:Cv(),id3Track:i,textTrack:Cv()}}extractID3Track(t,e){const s=this.id3Track;if(t.samples.length){const i=PA(t.samples,["emsg"]);i&&i.forEach((t=>{const i=function(t){const e=t[0];let s="",i="",r=0,n=0,o=0,a=0,h=0,c=0;if(0===e){for(;"\0"!==_A(t.subarray(c,c+1));)s+=_A(t.subarray(c,c+1)),c+=1;for(s+=_A(t.subarray(c,c+1)),c+=1;"\0"!==_A(t.subarray(c,c+1));)i+=_A(t.subarray(c,c+1)),c+=1;i+=_A(t.subarray(c,c+1)),c+=1,r=RA(t,12),n=RA(t,16),a=RA(t,20),h=RA(t,24),c=28}else if(1===e){c+=4,r=RA(t,c),c+=4;const e=RA(t,c);c+=4;const n=RA(t,c);for(c+=4,o=2**32*e+n,Sg(o)||(o=Number.MAX_SAFE_INTEGER,Dg.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),a=RA(t,c),c+=4,h=RA(t,c),c+=4;"\0"!==_A(t.subarray(c,c+1));)s+=_A(t.subarray(c,c+1)),c+=1;for(s+=_A(t.subarray(c,c+1)),c+=1;"\0"!==_A(t.subarray(c,c+1));)i+=_A(t.subarray(c,c+1)),c+=1;i+=_A(t.subarray(c,c+1)),c+=1}return{schemeIdUri:s,value:i,timeScale:r,presentationTime:o,presentationTimeDelta:n,eventDuration:a,id:h,payload:t.subarray(c,t.byteLength)}}(t);if(qv.test(i.schemeIdUri)){const t=vg(i.presentationTime)?i.presentationTime/i.timeScale:e+i.presentationTimeDelta/i.timeScale;let r=4294967295===i.eventDuration?Number.POSITIVE_INFINITY:i.eventDuration/i.timeScale;r<=.001&&(r=Number.POSITIVE_INFINITY);const n=i.payload;s.samples.push({data:n,len:n.byteLength,dts:t,pts:t,type:Gy,duration:r})}}))}return s}demuxSampleAes(t,e,s){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}},remux:class{constructor(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null}destroy(){}resetTimeStamp(t){this.initPTS=t,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(t,e,s,i){this.audioCodec=e,this.videoCodec=s,this.generateInitSegment(function(t,e){if(!t||!e)return t;const s=e.keyId;s&&e.isCommonEncryption&&PA(t,["moov","trak"]).forEach((t=>{const e=PA(t,["mdia","minf","stbl","stsd"])[0].subarray(8);let i=PA(e,["enca"]);const r=i.length>0;r||(i=PA(e,["encv"])),i.forEach((t=>{PA(r?t.subarray(28):t.subarray(78),["sinf"]).forEach((t=>{const e=jA(t);if(e){const t=e.subarray(8,24);t.some((t=>0!==t))||(Dg.log(`[eme] Patching keyId in 'enc${r?"a":"v"}>sinf>>tenc' box: ${EA(t)} -> ${EA(s)}`),e.set(s,8))}}))}))}));return t}(t,i)),this.emitInitSegment=!0}generateInitSegment(t){let{audioCodec:e,videoCodec:s}=this;if(null==t||!t.byteLength)return this.initTracks=void 0,void(this.initData=void 0);const i=this.initData=MA(t);i.audio&&(e=ES(i.audio,Og)),i.video&&(s=ES(i.video,Ug));const r={};i.audio&&i.video?r.audiovideo={container:"video/mp4",codec:e+","+s,initSegment:t,id:"main"}:i.audio?r.audio={container:"audio/mp4",codec:e,initSegment:t,id:"audio"}:i.video?r.video={container:"video/mp4",codec:s,initSegment:t,id:"main"}:Dg.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=r}remux(t,e,s,i,r,n){var o,a;let{initPTS:h,lastEndTime:c}=this;const l={audio:void 0,video:void 0,text:i,id3:s,initSegment:void 0};vg(c)||(c=this.lastEndTime=r||0);const d=e.samples;if(null==d||!d.length)return l;const u={initPTS:void 0,timescale:1};let p=this.initData;if(null!=(o=p)&&o.length||(this.generateInitSegment(d),p=this.initData),null==(a=p)||!a.length)return Dg.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),l;this.emitInitSegment&&(u.tracks=this.initTracks,this.emitInitSegment=!1);const f=function(t,e){let s=0,i=0,r=0;const n=PA(t,["moof","traf"]);for(let t=0;tt+e.info.duration||0),0);s=Math.max(s,t+n.earliestPresentationTime/n.timescale),i=s-e}}if(i&&vg(i))return i}return i||r}(d,p),m=function(t,e){return PA(e,["moof","traf"]).reduce(((e,s)=>{const i=PA(s,["tfdt"])[0],r=i[0],n=PA(s,["tfhd"]).reduce(((e,s)=>{const n=RA(s,4),o=t[n];if(o){let t=RA(i,4);if(1===r){if(t===IA)return Dg.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),e;t*=IA+1,t+=RA(i,8)}const s=t/(o.timescale||9e4);if(vg(s)&&(null===e||sr}(h,g,r,f)||u.timescale!==h.timescale&&n)&&(u.initPTS=g-r,h&&1===h.timescale&&Dg.warn("Adjusting initPTS by "+(u.initPTS-h.baseTime)),this.initPTS=h={baseTime:u.initPTS,timescale:1});const A=t?g-h.baseTime/h.timescale:c,y=A+f;!function(t,e,s){PA(e,["moof","traf"]).forEach((e=>{PA(e,["tfhd"]).forEach((i=>{const r=RA(i,4),n=t[r];if(!n)return;const o=n.timescale||9e4;PA(e,["tfdt"]).forEach((t=>{const e=t[0],i=s*o;if(i){let s=RA(t,4);if(0===e)s-=i,s=Math.max(s,0),xA(t,4,s);else{s*=Math.pow(2,32),s+=RA(t,8),s-=i,s=Math.max(s,0);const e=Math.floor(s/(IA+1)),r=Math.floor(s%(IA+1));xA(t,4,e),xA(t,8,r)}}}))}))}))}(p,d,h.baseTime/h.timescale),f>0?this.lastEndTime=y:(Dg.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const b=!!p.audio,v=!!p.video;let S="";b&&(S+="audio"),v&&(S+="video");const w={data1:d,startPTS:A,startDTS:A,endPTS:y,endDTS:y,type:S,hasAudio:b,hasVideo:v,nb:1,dropped:0};return l.audio="audio"===w.type?w:void 0,l.video="audio"!==w.type?w:void 0,l.initSegment=u,l.id3=vS(s,r,h,h),i.samples.length&&(l.text=SS(i,r,h)),l}}},{demux:iS,remux:yS},{demux:class extends Rv{constructor(t,e){super(),this.observer=void 0,this.config=void 0,this.observer=t,this.config=e}resetInitSegment(t,e,s,i){super.resetInitSegment(t,e,s,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:e,duration:i,inputTimeScale:9e4,dropped:0}}static probe(t){if(!t)return!1;const e=hA(t,0);let s=(null==e?void 0:e.length)||0;if(Yv(t,s))return!1;for(let e=t.length;s0&&null!=(null==e?void 0:e.key)&&null!==e.iv&&null!=e.method&&(s=e);return s}(n,e);if(b&&"AES-128"===b.method){const t=this.getDecrypter();if(!t.isSync())return this.decryptionPromise=t.webCryptoDecrypt(n,b.key.buffer,b.iv.buffer).then((t=>{const e=this.push(t,null,s);return this.decryptionPromise=null,e})),this.decryptionPromise;{let e=t.softwareDecrypt(n,b.key.buffer,b.iv.buffer);if(s.part>-1&&(e=t.flush()),!e)return r.executeEnd=mS(),kS(s);n=new Uint8Array(e)}}const v=this.needsProbing(c,l);if(v){const t=this.configureTransmuxer(n);if(t)return Dg.warn(`[transmuxer] ${t.message}`),this.observer.emit(Eg.ERROR,Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.FRAG_PARSING_ERROR,fatal:!1,error:t,reason:t.message}),r.executeEnd=mS(),kS(s)}(c||l||p||v)&&this.resetInitSegment(y,f,m,A,e),(c||p||v)&&this.resetInitialTimestamp(g),h||this.resetContiguity();const S=this.transmux(n,b,u,d,s),w=this.currentTransmuxState;return w.contiguous=!0,w.discontinuity=!1,w.trackSwitch=!1,r.executeEnd=mS(),S}flush(t){const e=t.transmuxing;e.executeStart=mS();const{decrypter:s,currentTransmuxState:i,decryptionPromise:r}=this;if(r)return r.then((()=>this.flush(t)));const n=[],{timeOffset:o}=i;if(s){const e=s.flush();e&&n.push(this.push(e,null,t))}const{demuxer:a,remuxer:h}=this;if(!a||!h)return e.executeEnd=mS(),[kS(t)];const c=a.flush(o);return _S(c)?c.then((e=>(this.flushRemux(n,e,t),n))):(this.flushRemux(n,c,t),n)}flushRemux(t,e,s){const{audioTrack:i,videoTrack:r,id3Track:n,textTrack:o}=e,{accurateTimeOffset:a,timeOffset:h}=this.currentTransmuxState;Dg.log(`[transmuxer.ts]: Flushed fragment ${s.sn}${s.part>-1?" p: "+s.part:""} of level ${s.level}`);const c=this.remuxer.remux(i,r,n,o,h,a,!0,this.id);t.push({remuxResult:c,chunkMeta:s}),s.transmuxing.executeEnd=mS()}resetInitialTimestamp(t){const{demuxer:e,remuxer:s}=this;e&&s&&(e.resetTimeStamp(t),s.resetTimeStamp(t))}resetContiguity(){const{demuxer:t,remuxer:e}=this;t&&e&&(t.resetContiguity(),e.resetNextTimestamp())}resetInitSegment(t,e,s,i,r){const{demuxer:n,remuxer:o}=this;n&&o&&(n.resetInitSegment(t,e,s,i),o.resetInitSegment(t,e,s,r))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(t,e,s,i,r){let n;return n=e&&"SAMPLE-AES"===e.method?this.transmuxSampleAes(t,e,s,i,r):this.transmuxUnencrypted(t,s,i,r),n}transmuxUnencrypted(t,e,s,i){const{audioTrack:r,videoTrack:n,id3Track:o,textTrack:a}=this.demuxer.demux(t,e,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(r,n,o,a,e,s,!1,this.id),chunkMeta:i}}transmuxSampleAes(t,e,s,i,r){return this.demuxer.demuxSampleAes(t,e,s).then((t=>({remuxResult:this.remuxer.remux(t.audioTrack,t.videoTrack,t.id3Track,t.textTrack,s,i,!1,this.id),chunkMeta:r})))}configureTransmuxer(t){const{config:e,observer:s,typeSupported:i,vendor:r}=this;let n;for(let e=0,s=IS.length;e({remuxResult:{},chunkMeta:t});function _S(t){return"then"in t&&t.then instanceof Function}class CS{constructor(t,e,s,i,r){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=t,this.videoCodec=e,this.initSegmentData=s,this.duration=i,this.defaultInitPts=r||null}}class RS{constructor(t,e,s,i,r,n){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=t,this.contiguous=e,this.accurateTimeOffset=s,this.trackSwitch=i,this.timeOffset=r,this.initSegmentChange=n}}var DS={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,s="~";function i(){}function r(t,e,s){this.fn=t,this.context=e,this.once=s||!1}function n(t,e,i,n,o){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new r(i,n||t,o),h=s?s+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function o(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(s=!1)),a.prototype.eventNames=function(){var t,i,r=[];if(0===this._eventsCount)return r;for(i in t=this._events)e.call(t,i)&&r.push(s?i.slice(1):i);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},a.prototype.listeners=function(t){var e=s?s+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var r=0,n=i.length,o=new Array(n);r{(e=e||{}).frag=this.frag,e.id=this.id,t===Eg.ERROR&&(this.error=e.error),this.hls.trigger(t,e)};this.observer=new LS,this.observer.on(Eg.FRAG_DECRYPTED,n),this.observer.on(Eg.ERROR,n);const o=sy(r.preferManagedMediaSource)||{isTypeSupported:()=>!1},a={mpeg:o.isTypeSupported("audio/mpeg"),mp3:o.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:o.isTypeSupported('audio/mp4; codecs="ac-3"')};if(this.useWorker&&"undefined"!=typeof Worker){if(r.workerPath||"function"==typeof __HLS_WORKER_BUNDLE__){try{r.workerPath?(Dg.log(`loading Web Worker ${r.workerPath} for "${e}"`),this.workerContext=function(t){const e=new self.URL(t,self.location.href).href;return{worker:new self.Worker(e),scriptURL:e}}(r.workerPath)):(Dg.log(`injecting Web Worker for "${e}"`),this.workerContext=function(){const t=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),e=self.URL.createObjectURL(t);return{worker:new self.Worker(e),objectURL:e}}()),this.onwmsg=t=>this.onWorkerMessage(t);const{worker:t}=this.workerContext;t.addEventListener("message",this.onwmsg),t.onerror=t=>{const s=new Error(`${t.message} (${t.filename}:${t.lineno})`);r.enableWorker=!1,Dg.warn(`Error in "${e}" Web Worker, fallback to inline`),this.hls.trigger(Eg.ERROR,{type:Ig.OTHER_ERROR,details:Tg.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:s})},t.postMessage({cmd:"init",typeSupported:a,vendor:"",id:e,config:JSON.stringify(r)})}catch(t){Dg.warn(`Error setting up "${e}" Web Worker, fallback to inline`,t),this.resetWorker(),this.error=null,this.transmuxer=new TS(this.observer,a,r,"",e)}return}}this.transmuxer=new TS(this.observer,a,r,"",e)}resetWorker(){if(this.workerContext){const{worker:t,objectURL:e}=this.workerContext;e&&self.URL.revokeObjectURL(e),t.removeEventListener("message",this.onwmsg),t.onerror=null,t.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const t=this.observer;t&&t.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(t,e,s,i,r,n,o,a,h,c){var l,d;h.transmuxing.start=self.performance.now();const{transmuxer:u}=this,p=n?n.start:r.start,f=r.decryptdata,m=this.frag,g=!(m&&r.cc===m.cc),A=!(m&&h.level===m.level),y=m?h.sn-m.sn:-1,b=this.part?h.part-this.part.index:-1,v=0===y&&h.id>1&&h.id===(null==m?void 0:m.stats.chunkCount),S=!A&&(1===y||0===y&&(1===b||v&&b<=0)),w=self.performance.now();(A||y||0===r.stats.parsing.start)&&(r.stats.parsing.start=w),!n||!b&&S||(n.stats.parsing.start=w);const E=!(m&&(null==(l=r.initSegment)?void 0:l.url)===(null==(d=m.initSegment)?void 0:d.url)),I=new RS(g,S,a,A,p,E);if(!S||g||E){Dg.log(`[transmuxer-interface, ${r.type}]: Starting new transmux session for sn: ${h.sn} p: ${h.part} level: ${h.level} id: ${h.id}\n discontinuity: ${g}\n trackSwitch: ${A}\n contiguous: ${S}\n accurateTimeOffset: ${a}\n timeOffset: ${p}\n initSegmentChange: ${E}`);const t=new CS(s,i,e,o,c);this.configureTransmuxer(t)}if(this.frag=r,this.part=n,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:t,decryptdata:f,chunkMeta:h,state:I},t instanceof ArrayBuffer?[t]:[]);else if(u){const e=u.push(t,f,h,I);_S(e)?(u.async=!0,e.then((t=>{this.handleTransmuxComplete(t)})).catch((t=>{this.transmuxerError(t,h,"transmuxer-interface push error")}))):(u.async=!1,this.handleTransmuxComplete(e))}}flush(t){t.transmuxing.start=self.performance.now();const{transmuxer:e}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:t});else if(e){let s=e.flush(t);_S(s)||e.async?(_S(s)||(s=Promise.resolve(s)),s.then((e=>{this.handleFlushResult(e,t)})).catch((e=>{this.transmuxerError(e,t,"transmuxer-interface flush error")}))):this.handleFlushResult(s,t)}}transmuxerError(t,e,s){this.hls&&(this.error=t,this.hls.trigger(Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.FRAG_PARSING_ERROR,chunkMeta:e,frag:this.frag||void 0,fatal:!1,error:t,err:t,reason:s}))}handleFlushResult(t,e){t.forEach((t=>{this.handleTransmuxComplete(t)})),this.onFlush(e)}onWorkerMessage(t){const e=t.data;if(null==e||!e.event)return void Dg.warn("worker message received with no "+(e?"event name":"data"));const s=this.hls;if(this.hls)switch(e.event){case"init":{var i;const t=null==(i=this.workerContext)?void 0:i.objectURL;t&&self.URL.revokeObjectURL(t);break}case"transmuxComplete":this.handleTransmuxComplete(e.data);break;case"flush":this.onFlush(e.data);break;case"workerLog":Dg[e.data.logType]&&Dg[e.data.logType](e.data.message);break;default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,s.trigger(e.event,e.data)}}configureTransmuxer(t){const{transmuxer:e}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:t}):e&&e.configure(t)}handleTransmuxComplete(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)}}function PS(t,e){if(t.length!==e.length)return!1;for(let s=0;st[s]!==e[s]))}function MS(t,e){return e.label.toLowerCase()===t.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(t.lang||"").toLowerCase())}class FS{constructor(t){this.buffered=void 0;const e=(e,s,i)=>{if((s>>>=0)>i-1)throw new DOMException(`Failed to execute '${e}' on 'TimeRanges': The index provided (${s}) is greater than the maximum bound (${i})`);return t[s][e]};this.buffered={get length(){return t.length},end:s=>e("end",s,t.length),start:s=>e("start",s,t.length)}}}class OS{constructor(t){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=t}append(t,e,s){const i=this.queues[e];i.push(t),1!==i.length||s||this.executeNext(e)}insertAbort(t,e){this.queues[e].unshift(t),this.executeNext(e)}appendBlocker(t){let e;const s=new Promise((t=>{e=t})),i={execute:e,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(i,t),s}executeNext(t){const e=this.queues[t];if(e.length){const s=e[0];try{s.execute()}catch(e){Dg.warn(`[buffer-operation-queue]: Exception executing "${t}" SourceBuffer operation: ${e}`),s.onError(e);const i=this.buffers[t];null!=i&&i.updating||this.shiftAndExecuteNext(t)}}}shiftAndExecuteNext(t){this.queues[t].shift(),this.executeNext(t)}current(t){return this.queues[t][0]}}const US=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;function NS(t){const e=t.querySelectorAll("source");[].slice.call(e).forEach((e=>{t.removeChild(e)}))}const jS={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},VS=t=>String.fromCharCode(jS[t]||t),zS=15,GS=100,WS={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},HS={17:2,18:4,21:6,22:8,23:10,19:13,20:15},KS={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},QS={25:2,26:4,29:6,30:8,31:10,27:13,28:15},YS=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class qS{constructor(){this.time=null,this.verboseLevel=0}log(t,e){if(this.verboseLevel>=t){const s="function"==typeof e?e():e;Dg.log(`${this.time} [${t}] ${s}`)}}}const JS=function(t){const e=[];for(let s=0;sGS&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=GS)}moveCursor(t){const e=this.pos+t;if(t>1)for(let t=this.pos+1;t=144&&this.backSpace();const e=VS(t);this.pos>=GS?this.logger.log(0,(()=>"Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!")):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))}clearFromPos(t){let e;for(e=t;e"pacData = "+JSON.stringify(t)));let e=t.row-1;if(this.nrRollUpRows&&e"bkgData = "+JSON.stringify(t))),this.backSpace(),this.setPen(t),this.insertChar(32)}setRollUpRows(t){this.nrRollUpRows=t}rollUp(){if(null===this.nrRollUpRows)return void this.logger.log(3,"roll_up but nrRollUpRows not set yet");this.logger.log(1,(()=>this.getDisplayText()));const t=this.currRow+1-this.nrRollUpRows,e=this.rows.splice(t,1)[0];e.clear(),this.rows.splice(this.currRow,0,e),this.logger.log(2,"Rolling up")}getDisplayText(t){t=t||!1;const e=[];let s="",i=-1;for(let s=0;s0&&(s=t?"["+e.join(" | ")+"]":e.join("\n")),s}getTextAndFormat(){return this.rows}}class ew{constructor(t,e,s){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=t,this.outputFilter=e,this.mode=null,this.verbose=0,this.displayedMemory=new tw(s),this.nonDisplayedMemory=new tw(s),this.lastOutputScreen=new tw(s),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=s}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(t){this.outputFilter=t}setPAC(t){this.writeScreen.setPAC(t)}setBkgData(t){this.writeScreen.setBkgData(t)}setMode(t){t!==this.mode&&(this.mode=t,this.logger.log(2,(()=>"MODE="+t)),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)}insertChars(t){for(let e=0;ee+": "+this.writeScreen.getDisplayText(!0))),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,(()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0))),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(t){this.logger.log(2,"RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){const t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,(()=>"DISP: "+this.displayedMemory.getDisplayText()))}this.outputDataUpdate(!0)}ccTO(t){this.logger.log(2,"TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)}ccMIDROW(t){const e={flash:!1};if(e.underline=t%2==1,e.italics=t>=46,e.italics)e.foreground="white";else{const s=Math.floor(t/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];e.foreground=i[s]}this.logger.log(2,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)}outputDataUpdate(t=!1){const e=this.logger.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))}}class sw{constructor(t,e,s){this.channels=void 0,this.currentChannel=0,this.cmdHistory={a:null,b:null},this.logger=void 0;const i=this.logger=new qS;this.channels=[null,new ew(t,e,i),new ew(t+1,s,i)]}getHandler(t){return this.channels[t].getHandler()}setHandler(t,e){this.channels[t].setHandler(e)}addData(t,e){this.logger.time=t;for(let t=0;t"["+JS([e[t],e[t+1]])+"] -> ("+JS([s,i])+")"));const o=this.cmdHistory;if(s>=16&&s<=31){if(rw(s,i,o)){iw(null,null,o),this.logger.log(3,(()=>"Repeated command ("+JS([s,i])+") is dropped"));continue}iw(s,i,this.cmdHistory),r=this.parseCmd(s,i),r||(r=this.parseMidrow(s,i)),r||(r=this.parsePAC(s,i)),r||(r=this.parseBackgroundAttributes(s,i))}else iw(null,null,o);if(!r&&(n=this.parseChars(s,i),n)){const t=this.currentChannel;if(t&&t>0){this.channels[t].insertChars(n)}else this.logger.log(2,"No channel found yet. TEXT-MODE?")}r||n||this.logger.log(2,(()=>"Couldn't parse cleaned data "+JS([s,i])+" orig: "+JS([e[t],e[t+1]])))}}parseCmd(t,e){if(!((20===t||28===t||21===t||29===t)&&e>=32&&e<=47)&&!((23===t||31===t)&&e>=33&&e<=35))return!1;const s=20===t||21===t||23===t?1:2,i=this.channels[s];return 20===t||21===t||28===t||29===t?32===e?i.ccRCL():33===e?i.ccBS():34===e?i.ccAOF():35===e?i.ccAON():36===e?i.ccDER():37===e?i.ccRU(2):38===e?i.ccRU(3):39===e?i.ccRU(4):40===e?i.ccFON():41===e?i.ccRDC():42===e?i.ccTR():43===e?i.ccRTD():44===e?i.ccEDM():45===e?i.ccCR():46===e?i.ccENM():47===e&&i.ccEOC():i.ccTO(e-32),this.currentChannel=s,!0}parseMidrow(t,e){let s=0;if((17===t||25===t)&&e>=32&&e<=47){if(s=17===t?1:2,s!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const i=this.channels[s];return!!i&&(i.ccMIDROW(e),this.logger.log(3,(()=>"MIDROW ("+JS([t,e])+")")),!0)}return!1}parsePAC(t,e){let s;if(!((t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127)&&!((16===t||24===t)&&e>=64&&e<=95))return!1;const i=t<=23?1:2;s=e>=64&&e<=95?1===i?WS[t]:KS[t]:1===i?HS[t]:QS[t];const r=this.channels[i];return!!r&&(r.setPAC(this.interpretPAC(s,e)),this.currentChannel=i,!0)}interpretPAC(t,e){let s;const i={color:null,italics:!1,indent:null,underline:!1,row:t};return s=e>95?e-96:e-64,i.underline=1==(1&s),s<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(s/2)]:s<=15?(i.italics=!0,i.color="white"):i.indent=4*Math.floor((s-16)/2),i}parseChars(t,e){let s,i=null,r=null;if(t>=25?(s=2,r=t-8):(s=1,r=t),r>=17&&r<=19){let t;t=17===r?e+80:18===r?e+112:e+144,this.logger.log(2,(()=>"Special char '"+VS(t)+"' in channel "+s)),i=[t]}else t>=32&&t<=127&&(i=0===e?[t]:[t,e]);return i&&this.logger.log(3,(()=>"Char codes = "+JS(i).join(","))),i}parseBackgroundAttributes(t,e){if(!((16===t||24===t)&&e>=32&&e<=47)&&!((23===t||31===t)&&e>=45&&e<=47))return!1;let s;const i={};16===t||24===t?(s=Math.floor((e-32)/2),i.background=YS[s],e%2==1&&(i.background=i.background+"_semi")):45===e?i.background="transparent":(i.foreground="black",47===e&&(i.underline=!0));const r=t<=23?1:2;return this.channels[r].setBkgData(i),!0}reset(){for(let t=0;tt)&&(this.startTime=t),this.endTime=e,this.screen=s,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var ow=function(){if(null!=Qg&&Qg.VTTCue)return self.VTTCue;const t=["","lr","rl"],e=["start","middle","end","left","right"];function s(t,e){if("string"!=typeof e)return!1;if(!Array.isArray(t))return!1;const s=e.toLowerCase();return!!~t.indexOf(s)&&s}function i(t){return s(e,t)}function r(t,...e){let s=1;for(;s100)throw new Error("Position must be between 0 and 100.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",r({},h,{get:function(){return v},set:function(t){const e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",r({},h,{get:function(){return S},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");S=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",r({},h,{get:function(){return w},set:function(t){const e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");w=e,this.hasBeenReset=!0}})),a.displayState=void 0}return n.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},n}();class aw{decode(t,e){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}function hw(t){function e(t,e,s,i){return 3600*(0|t)+60*(0|e)+(0|s)+parseFloat(i||0)}const s=t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return s?parseFloat(s[2])>59?e(s[2],s[3],0,s[4]):e(s[1],s[2],s[3],s[4]):null}class cw{constructor(){this.values=Object.create(null)}set(t,e){this.get(t)||""===e||(this.values[t]=e)}get(t,e,s){return s?this.has(t)?this.values[t]:e[s]:this.has(t)?this.values[t]:e}has(t){return t in this.values}alt(t,e,s){for(let i=0;i=0&&s<=100)return this.set(t,s),!0}return!1}}function lw(t,e,s,i){const r=i?t.split(i):[t];for(const t in r){if("string"!=typeof r[t])continue;const i=r[t].split(s);if(2!==i.length)continue;e(i[0],i[1])}}const dw=new ow(0,0,""),uw="middle"===dw.align?"middle":"center";function pw(t,e,s){const i=t;function r(){const e=hw(t);if(null===e)throw new Error("Malformed timestamp: "+i);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function n(){t=t.replace(/^\s+/,"")}if(n(),e.startTime=r(),n(),"--\x3e"!==t.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);t=t.slice(3),n(),e.endTime=r(),n(),function(t,e){const i=new cw;lw(t,(function(t,e){let r;switch(t){case"region":for(let r=s.length-1;r>=0;r--)if(s[r].id===e){i.set(t,s[r].region);break}break;case"vertical":i.alt(t,e,["rl","lr"]);break;case"line":r=e.split(","),i.integer(t,r[0]),i.percent(t,r[0])&&i.set("snapToLines",!1),i.alt(t,r[0],["auto"]),2===r.length&&i.alt("lineAlign",r[1],["start",uw,"end"]);break;case"position":r=e.split(","),i.percent(t,r[0]),2===r.length&&i.alt("positionAlign",r[1],["start",uw,"end","line-left","line-right","auto"]);break;case"size":i.percent(t,e);break;case"align":i.alt(t,e,["start",uw,"end","left","right"])}}),/:/,/\s/),e.region=i.get("region",null),e.vertical=i.get("vertical","");let r=i.get("line","auto");"auto"===r&&-1===dw.line&&(r=-1),e.line=r,e.lineAlign=i.get("lineAlign","start"),e.snapToLines=i.get("snapToLines",!0),e.size=i.get("size",100),e.align=i.get("align",uw);let n=i.get("position","auto");"auto"===n&&50===dw.position&&(n="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=n}(t,e)}function fw(t){return t.replace(//gi,"\n")}class mw{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new aw,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(t){const e=this;function s(){let t=e.buffer,s=0;for(t=fw(t);s>>0).toString()};function bw(t,e,s){return yw(t.toString())+yw(e.toString())+yw(s)}function vw(t,e,s,i,r,n,o){const a=new mw,h=vA(new Uint8Array(t)).trim().replace(gw,"\n").split("\n"),c=[],l=e?function(t,e=1){return pS(t,9e4,1/e)}(e.baseTime,e.timescale):0;let d,u="00:00.000",p=0,f=0,m=!0;a.oncue=function(t){const n=s[i];let o=s.ccOffset;const a=(p-l)/9e4;if(null!=n&&n.new&&(void 0!==f?o=s.ccOffset=n.start:function(t,e,s){let i=t[e],r=t[i.prevCC];if(!r||!r.new&&i.new)return t.ccOffset=t.presentationOffset=i.start,void(i.new=!1);for(;null!=(n=r)&&n.new;){var n;t.ccOffset+=i.start-r.start,i.new=!1,i=r,r=t[i.prevCC]}t.presentationOffset=s}(s,i,a)),a){if(!e)return void(d=new Error("Missing initPTS for VTT MPEGTS"));o=a-s.presentationOffset}const h=t.endTime-t.startTime,u=bS(9e4*(t.startTime+o-f),9e4*r)/9e4;t.startTime=Math.max(u,0),t.endTime=Math.max(u+h,0);const m=t.text.trim();t.text=decodeURIComponent(encodeURIComponent(m)),t.id||(t.id=bw(t.startTime,t.endTime,m)),t.endTime>0&&c.push(t)},a.onparsingerror=function(t){d=t},a.onflush=function(){d?o(d):n(c)},h.forEach((t=>{if(m){if(Aw(t,"X-TIMESTAMP-MAP=")){m=!1,t.slice(16).split(",").forEach((t=>{Aw(t,"LOCAL:")?u=t.slice(6):Aw(t,"MPEGTS:")&&(p=parseInt(t.slice(7)))}));try{f=function(t){let e=parseInt(t.slice(-3));const s=parseInt(t.slice(-6,-4)),i=parseInt(t.slice(-9,-7)),r=t.length>9?parseInt(t.substring(0,t.indexOf(":"))):0;if(!(vg(e)&&vg(s)&&vg(i)&&vg(r)))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${t}`);return e+=1e3*s,e+=6e4*i,e+=36e5*r,e}(u)/1e3}catch(t){d=t}return}""===t&&(m=!1)}a.parse(t+"\n")})),a.flush()}const Sw="stpp.ttml.im1t",ww=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Ew=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Iw={left:"start",center:"center",right:"end",start:"start",end:"end"};function Tw(t,e,s,i){const r=PA(new Uint8Array(t),["mdat"]);if(0===r.length)return void i(new Error("Could not parse IMSC1 mdat"));const n=r.map((t=>vA(t))),o=function(t,e,s=1,i=!1){return pS(t,e,1/s,i)}(e.baseTime,1,e.timescale);try{n.forEach((t=>s(function(t,e){const s=new DOMParser,i=s.parseFromString(t,"text/xml").getElementsByTagName("tt")[0];if(!i)throw new Error("Invalid ttml");const r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},n=Object.keys(r).reduce(((t,e)=>(t[e]=i.getAttribute(`ttp:${e}`)||r[e],t)),{}),o="preserve"!==i.getAttribute("xml:space"),a=_w(kw(i,"styling","style")),h=_w(kw(i,"layout","region")),c=kw(i,"body","[begin]");return[].map.call(c,(t=>{const s=Cw(t,o);if(!s||!t.hasAttribute("begin"))return null;const i=Lw(t.getAttribute("begin"),n),r=Lw(t.getAttribute("dur"),n);let c=Lw(t.getAttribute("end"),n);if(null===i)throw Dw(t);if(null===c){if(null===r)throw Dw(t);c=i+r}const l=new ow(i-e,c-e,s);l.id=bw(l.startTime,l.endTime,l.text);const d=function(t,e,s){const i="http://www.w3.org/ns/ttml#styling";let r=null;const n=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],o=null!=t&&t.hasAttribute("style")?t.getAttribute("style"):null;o&&s.hasOwnProperty(o)&&(r=s[o]);return n.reduce(((s,n)=>{const o=Rw(e,i,n)||Rw(t,i,n)||Rw(r,i,n);return o&&(s[n]=o),s}),{})}(h[t.getAttribute("region")],a[t.getAttribute("style")],a),{textAlign:u}=d;if(u){const t=Iw[u];t&&(l.lineAlign=t),l.align=u}return bg(l,d),l})).filter((t=>null!==t))}(t,o))))}catch(t){i(t)}}function kw(t,e,s){const i=t.getElementsByTagName(e)[0];return i?[].slice.call(i.querySelectorAll(s)):[]}function _w(t){return t.reduce(((t,e)=>{const s=e.getAttribute("xml:id");return s&&(t[s]=e),t}),{})}function Cw(t,e){return[].slice.call(t.childNodes).reduce(((t,s,i)=>{var r;return"br"===s.nodeName&&i?t+"\n":null!=(r=s.childNodes)&&r.length?Cw(s,e):e?t+s.textContent.trim().replace(/\s+/g," "):t+s.textContent}),"")}function Rw(t,e,s){return t&&t.hasAttributeNS(e,s)?t.getAttributeNS(e,s):null}function Dw(t){return new Error(`Could not parse ttml timestamp ${t}`)}function Lw(t,e){if(!t)return null;let s=hw(t);return null===s&&(ww.test(t)?s=function(t,e){const s=ww.exec(t),i=(0|s[4])+(0|s[5])/e.subFrameRate;return 3600*(0|s[1])+60*(0|s[2])+(0|s[3])+i/e.frameRate}(t,e):Ew.test(t)&&(s=function(t,e){const s=Ew.exec(t),i=Number(s[1]);switch(s[2]){case"h":return 3600*i;case"m":return 60*i;case"ms":return 1e3*i;case"f":return i/e.frameRate;case"t":return i/e.tickRate}return i}(t,e))),s}function xw(t){return t.characteristics&&/transcribes-spoken-dialog/gi.test(t.characteristics)&&/describes-music-and-sound/gi.test(t.characteristics)?"captions":"subtitles"}function Pw(t,e){return!!t&&t.kind===xw(e)&&MS(e,t)}class Bw{constructor(t){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=t,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(t){this.streamController=t}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:t}=this;t.on(Eg.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.on(Eg.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(Eg.MANIFEST_PARSED,this.onManifestParsed,this),t.on(Eg.LEVELS_UPDATED,this.onLevelsUpdated,this),t.on(Eg.BUFFER_CODECS,this.onBufferCodecs,this),t.on(Eg.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:t}=this;t.off(Eg.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),t.off(Eg.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(Eg.MANIFEST_PARSED,this.onManifestParsed,this),t.off(Eg.LEVELS_UPDATED,this.onLevelsUpdated,this),t.off(Eg.BUFFER_CODECS,this.onBufferCodecs,this),t.off(Eg.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(t,e){const s=this.hls.levels[e.droppedLevel];this.isLevelAllowed(s)&&this.restrictedLevels.push({bitrate:s.bitrate,height:s.height,width:s.width})}onMediaAttaching(t,e){this.media=e.media instanceof HTMLVideoElement?e.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(t,e){const s=this.hls;this.restrictedLevels=[],this.firstLevel=e.firstLevel,s.config.capLevelToPlayerSize&&e.video&&this.startCapping()}onLevelsUpdated(t,e){this.timer&&vg(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(t,e){this.hls.config.capLevelToPlayerSize&&e.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0)return void(this.clientRect=null);const t=this.hls.levels;if(t.length){const e=this.hls,s=this.getMaxLevel(t.length-1);s!==this.autoLevelCapping&&Dg.log(`Setting autoLevelCapping to ${s}: ${t[s].height}p@${t[s].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),e.autoLevelCapping=s,e.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}}getMaxLevel(t){const e=this.hls.levels;if(!e.length)return-1;const s=e.filter(((e,s)=>this.isLevelAllowed(e)&&s<=t));return this.clientRect=null,Bw.getMaxLevelByMediaSize(s,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const t=this.media,e={width:0,height:0};if(t){const s=t.getBoundingClientRect();e.width=s.width,e.height=s.height,e.width||e.height||(e.width=s.right-s.left||t.width||0,e.height=s.bottom-s.top||t.height||0)}return this.clientRect=e,e}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let t=1;if(!this.hls.config.ignoreDevicePixelRatio)try{t=self.devicePixelRatio}catch(t){}return t}isLevelAllowed(t){return!this.restrictedLevels.some((e=>t.bitrate===e.bitrate&&t.width===e.width&&t.height===e.height))}static getMaxLevelByMediaSize(t,e,s){if(null==t||!t.length)return-1;let i=t.length-1;const r=Math.max(e,s);for(let e=0;e=r||s.height>=r)&&(n=s,!(o=t[e+1])||n.width!==o.width||n.height!==o.height)){i=e;break}}var n,o;return i}}const Mw="[eme]";class Fw{constructor(t){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=Fw.CDMCleanupPromise?[Fw.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=Dg.debug.bind(Dg,Mw),this.log=Dg.log.bind(Dg,Mw),this.warn=Dg.warn.bind(Dg,Mw),this.error=Dg.error.bind(Dg,Mw),this.hls=t,this.config=t.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const t=this.config;t.requestMediaKeySystemAccessFunc=null,t.licenseXhrSetup=t.licenseResponseCallback=void 0,t.drmSystems=t.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null}registerListeners(){this.hls.on(Eg.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(Eg.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(Eg.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(Eg.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(Eg.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(Eg.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(t){const{drmSystems:e,widevineLicenseUrl:s}=this.config,i=e[t];if(i)return i.licenseUrl;if(t===Yg.WIDEVINE&&s)return s;throw new Error(`no license server URL configured for key-system "${t}"`)}getServerCertificateUrl(t){const{drmSystems:e}=this.config,s=e[t];if(s)return s.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${t}"]`)}attemptKeySystemAccess(t){const e=this.hls.levels,s=(t,e,s)=>!!t&&s.indexOf(t)===e,i=e.map((t=>t.audioCodec)).filter(s),r=e.map((t=>t.videoCodec)).filter(s);return i.length+r.length===0&&r.push("avc1.42e01e"),new Promise(((e,s)=>{const n=t=>{const o=t.shift();this.getMediaKeysPromise(o,i,r).then((t=>e({keySystem:o,mediaKeys:t}))).catch((e=>{t.length?n(t):s(e instanceof Ow?e:new Ow({type:Ig.KEY_SYSTEM_ERROR,details:Tg.KEY_SYSTEM_NO_ACCESS,error:e,fatal:!0},e.message))}))};n(t)}))}requestMediaKeySystemAccess(t,e){const{requestMediaKeySystemAccessFunc:s}=this.config;if("function"!=typeof s){let t=`Configured requestMediaKeySystemAccess is not a function ${s}`;return null===iA&&"http:"===self.location.protocol&&(t=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(t))}return s(t,e)}getMediaKeysPromise(t,e,s){const i=function(t,e,s,i){let r;switch(t){case Yg.FAIRPLAY:r=["cenc","sinf"];break;case Yg.WIDEVINE:case Yg.PLAYREADY:r=["cenc"];break;case Yg.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${t}`)}return function(t,e,s,i){return[{initDataTypes:t,persistentState:i.persistentState||"optional",distinctiveIdentifier:i.distinctiveIdentifier||"optional",sessionTypes:i.sessionTypes||[i.sessionType||"temporary"],audioCapabilities:e.map((t=>({contentType:`audio/mp4; codecs="${t}"`,robustness:i.audioRobustness||"",encryptionScheme:i.audioEncryptionScheme||null}))),videoCapabilities:s.map((t=>({contentType:`video/mp4; codecs="${t}"`,robustness:i.videoRobustness||"",encryptionScheme:i.videoEncryptionScheme||null})))}]}(r,e,s,i)}(t,e,s,this.config.drmSystemOptions),r=this.keySystemAccessPromises[t];let n=null==r?void 0:r.keySystemAccess;if(!n){this.log(`Requesting encrypted media "${t}" key-system access with config: ${JSON.stringify(i)}`),n=this.requestMediaKeySystemAccess(t,i);const e=this.keySystemAccessPromises[t]={keySystemAccess:n};return n.catch((e=>{this.log(`Failed to obtain access to key-system "${t}": ${e}`)})),n.then((s=>{this.log(`Access for key-system "${s.keySystem}" obtained`);const i=this.fetchServerCertificate(t);return this.log(`Create media-keys for "${t}"`),e.mediaKeys=s.createMediaKeys().then((e=>(this.log(`Media-keys created for "${t}"`),i.then((s=>s?this.setMediaKeysServerCertificate(e,t,s):e))))),e.mediaKeys.catch((e=>{this.error(`Failed to create media-keys for "${t}"}: ${e}`)})),e.mediaKeys}))}return n.then((()=>r.mediaKeys))}createMediaKeySessionContext({decryptdata:t,keySystem:e,mediaKeys:s}){this.log(`Creating key-system session "${e}" keyId: ${EA(t.keyId||[])}`);const i=s.createSession(),r={decryptdata:t,keySystem:e,mediaKeys:s,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(r),r}renewKeySession(t){const e=t.decryptdata;if(e.pssh){const s=this.createMediaKeySessionContext(t),i=this.getKeyIdString(e),r="cenc";this.keyIdToKeySessionPromise[i]=this.generateRequestWithPreferredKeySession(s,r,e.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(t)}getKeyIdString(t){if(!t)throw new Error("Could not read keyId of undefined decryptdata");if(null===t.keyId)throw new Error("keyId is null");return EA(t.keyId)}updateKeySession(t,e){var s;const i=t.mediaKeysSession;return this.log(`Updating key-session "${i.sessionId}" for keyID ${EA((null==(s=t.decryptdata)?void 0:s.keyId)||[])}\n } (data length: ${e?e.byteLength:e})`),i.update(e)}selectKeySystemFormat(t){const e=Object.keys(t.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${t.sn} ${t.type}: ${t.level}) key formats ${e.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(e)),this.keyFormatPromise}getKeyFormatPromise(t){return new Promise(((e,s)=>{const i=sA(this.config),r=t.map($g).filter((t=>!!t&&-1!==i.indexOf(t)));return this.getKeySystemSelectionPromise(r).then((({keySystem:t})=>{const i=eA(t);i?e(i):s(new Error(`Unable to find format for key-system "${t}"`))})).catch(s)}))}loadKey(t){const e=t.keyInfo.decryptdata,s=this.getKeyIdString(e),i=`(keyId: ${s} format: "${e.keyFormat}" method: ${e.method} uri: ${e.uri})`;this.log(`Starting session for key ${i}`);let r=this.keyIdToKeySessionPromise[s];return r||(r=this.keyIdToKeySessionPromise[s]=this.getKeySystemForKeyPromise(e).then((({keySystem:s,mediaKeys:r})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${t.frag.sn} ${t.frag.type}: ${t.frag.level} using key ${i}`),this.attemptSetMediaKeys(s,r).then((()=>{this.throwIfDestroyed();const t=this.createMediaKeySessionContext({keySystem:s,mediaKeys:r,decryptdata:e});return this.generateRequestWithPreferredKeySession(t,"cenc",e.pssh,"playlist-key")}))))),r.catch((t=>this.handleError(t)))),r}throwIfDestroyed(t="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(t){this.hls&&(this.error(t.message),t instanceof Ow?this.hls.trigger(Eg.ERROR,t.data):this.hls.trigger(Eg.ERROR,{type:Ig.KEY_SYSTEM_ERROR,details:Tg.KEY_SYSTEM_NO_KEYS,error:t,fatal:!0}))}getKeySystemForKeyPromise(t){const e=this.getKeyIdString(t),s=this.keyIdToKeySessionPromise[e];if(!s){const e=$g(t.keyFormat),s=e?[e]:sA(this.config);return this.attemptKeySystemAccess(s)}return s}getKeySystemSelectionPromise(t){if(t.length||(t=sA(this.config)),0===t.length)throw new Ow({type:Ig.KEY_SYSTEM_ERROR,details:Tg.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(t)}_onMediaEncrypted(t){const{initDataType:e,initData:s}=t;if(this.debug(`"${t.type}" event: init data type: "${e}"`),null===s)return;let i,r;if("sinf"===e&&this.config.drmSystems[Yg.FAIRPLAY]){const t=_A(new Uint8Array(s));try{const e=Wg(JSON.parse(t).sinf),s=jA(new Uint8Array(e));if(!s)return;i=s.subarray(8,24),r=Yg.FAIRPLAY}catch(t){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{const t=function(t){if(!(t instanceof ArrayBuffer)||t.byteLength<32)return null;const e={version:0,systemId:"",kids:null,data:null},s=new DataView(t),i=s.getUint32(0);if(t.byteLength!==i&&i>44)return null;if(1886614376!==s.getUint32(4))return null;if(e.version=s.getUint32(8)>>>24,e.version>1)return null;e.systemId=EA(new Uint8Array(t,12,16));const r=s.getUint32(28);if(0===e.version){if(i-32this.generateRequestWithPreferredKeySession(r,e,s,"encrypted-event-key-match")));break}}h||(h=o[n]=this.getKeySystemSelectionPromise([r]).then((({keySystem:t,mediaKeys:r})=>{var o;this.throwIfDestroyed();const a=new qA("ISO-23001-7",n,null!=(o=eA(t))?o:"");return a.pssh=new Uint8Array(s),a.keyId=i,this.attemptSetMediaKeys(t,r).then((()=>{this.throwIfDestroyed();const i=this.createMediaKeySessionContext({decryptdata:a,keySystem:t,mediaKeys:r});return this.generateRequestWithPreferredKeySession(i,e,s,"encrypted-event-no-match")}))}))),h.catch((t=>this.handleError(t)))}_onWaitingForKey(t){this.log(`"${t.type}" event`)}attemptSetMediaKeys(t,e){const s=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${t}"`);const i=Promise.all(s).then((()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(e)}));return this.setMediaKeysQueue.push(i),i.then((()=>{this.log(`Media-keys set for "${t}"`),s.push(i),this.setMediaKeysQueue=this.setMediaKeysQueue.filter((t=>-1===s.indexOf(t)))}))}generateRequestWithPreferredKeySession(t,e,s,i){var r,n;const o=null==(r=this.config.drmSystems)||null==(n=r[t.keySystem])?void 0:n.generateRequest;if(o)try{const i=o.call(this.hls,e,s,t);if(!i)throw new Error("Invalid response from configured generateRequest filter");e=i.initDataType,s=t.decryptdata.pssh=i.initData?new Uint8Array(i.initData):null}catch(t){var a;if(this.warn(t.message),null!=(a=this.hls)&&a.config.debug)throw t}if(null===s)return this.log(`Skipping key-session request for "${i}" (no initData)`),Promise.resolve(t);const h=this.getKeyIdString(t.decryptdata);this.log(`Generating key-session request for "${i}": ${h} (init data type: ${e} length: ${s?s.byteLength:null})`);const c=new LS,l=t._onmessage=e=>{const s=t.mediaKeysSession;if(!s)return void c.emit("error",new Error("invalid state"));const{messageType:i,message:r}=e;this.log(`"${i}" message event for session "${s.sessionId}" message size: ${r.byteLength}`),"license-request"===i||"license-renewal"===i?this.renewLicense(t,r).catch((t=>{this.handleError(t),c.emit("error",t)})):"license-release"===i?t.keySystem===Yg.FAIRPLAY&&(this.updateKeySession(t,Kg("acknowledged")),this.removeSession(t)):this.warn(`unhandled media key message type "${i}"`)},d=t._onkeystatuseschange=e=>{if(!t.mediaKeysSession)return void c.emit("error",new Error("invalid state"));this.onKeyStatusChange(t);const s=t.keyStatus;c.emit("keyStatus",s),"expired"===s&&(this.warn(`${t.keySystem} expired for key ${h}`),this.renewKeySession(t))};t.mediaKeysSession.addEventListener("message",l),t.mediaKeysSession.addEventListener("keystatuseschange",d);const u=new Promise(((t,e)=>{c.on("error",e),c.on("keyStatus",(s=>{s.startsWith("usable")?t():"output-restricted"===s?e(new Ow({type:Ig.KEY_SYSTEM_ERROR,details:Tg.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===s?e(new Ow({type:Ig.KEY_SYSTEM_ERROR,details:Tg.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${s}"`)):"expired"===s?e(new Error("key expired while generating request")):this.warn(`unhandled key status change "${s}"`)}))}));return t.mediaKeysSession.generateRequest(e,s).then((()=>{var e;this.log(`Request generated for key-session "${null==(e=t.mediaKeysSession)?void 0:e.sessionId}" keyId: ${h}`)})).catch((t=>{throw new Ow({type:Ig.KEY_SYSTEM_ERROR,details:Tg.KEY_SYSTEM_NO_SESSION,error:t,fatal:!1},`Error generating key-session request: ${t}`)})).then((()=>u)).catch((e=>{throw c.removeAllListeners(),this.removeSession(t),e})).then((()=>(c.removeAllListeners(),t)))}onKeyStatusChange(t){t.mediaKeysSession.keyStatuses.forEach(((e,s)=>{this.log(`key status change "${e}" for keyStatuses keyId: ${EA("buffer"in s?new Uint8Array(s.buffer,s.byteOffset,s.byteLength):new Uint8Array(s))} session keyId: ${EA(new Uint8Array(t.decryptdata.keyId||[]))} uri: ${t.decryptdata.uri}`),t.keyStatus=e}))}fetchServerCertificate(t){const e=this.config,s=new(0,e.loader)(e),i=this.getServerCertificateUrl(t);return i?(this.log(`Fetching server certificate for "${t}"`),new Promise(((r,n)=>{const o={responseType:"arraybuffer",url:i},a=e.certLoadPolicy.default,h={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},c={onSuccess:(t,e,s,i)=>{r(t.data)},onError:(e,s,r,a)=>{n(new Ow({type:Ig.KEY_SYSTEM_ERROR,details:Tg.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:r,response:gg({url:o.url,data:void 0},e)},`"${t}" certificate request failed (${i}). Status: ${e.code} (${e.text})`))},onTimeout:(e,s,r)=>{n(new Ow({type:Ig.KEY_SYSTEM_ERROR,details:Tg.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:r,response:{url:o.url,data:void 0}},`"${t}" certificate request timed out (${i})`))},onAbort:(t,e,s)=>{n(new Error("aborted"))}};s.load(o,h,c)}))):Promise.resolve()}setMediaKeysServerCertificate(t,e,s){return new Promise(((i,r)=>{t.setServerCertificate(s).then((r=>{this.log(`setServerCertificate ${r?"success":"not supported by CDM"} (${null==s?void 0:s.byteLength}) on "${e}"`),i(t)})).catch((t=>{r(new Ow({type:Ig.KEY_SYSTEM_ERROR,details:Tg.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:t,fatal:!0},t.message))}))}))}renewLicense(t,e){return this.requestLicense(t,new Uint8Array(e)).then((e=>this.updateKeySession(t,new Uint8Array(e)).catch((t=>{throw new Ow({type:Ig.KEY_SYSTEM_ERROR,details:Tg.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:t,fatal:!0},t.message)}))))}unpackPlayReadyKeyMessage(t,e){const s=String.fromCharCode.apply(null,new Uint16Array(e.buffer));if(!s.includes("PlayReadyKeyMessage"))return t.setRequestHeader("Content-Type","text/xml; charset=utf-8"),e;const i=(new DOMParser).parseFromString(s,"application/xml"),r=i.querySelectorAll("HttpHeader");if(r.length>0){let e;for(let s=0,i=r.length;s in key message");return Kg(atob(h))}setupLicenseXHR(t,e,s,i){const r=this.config.licenseXhrSetup;return r?Promise.resolve().then((()=>{if(!s.decryptdata)throw new Error("Key removed");return r.call(this.hls,t,e,s,i)})).catch((n=>{if(!s.decryptdata)throw n;return t.open("POST",e,!0),r.call(this.hls,t,e,s,i)})).then((s=>{t.readyState||t.open("POST",e,!0);return{xhr:t,licenseChallenge:s||i}})):(t.open("POST",e,!0),Promise.resolve({xhr:t,licenseChallenge:i}))}requestLicense(t,e){const s=this.config.keyLoadPolicy.default;return new Promise(((i,r)=>{const n=this.getLicenseServerUrl(t.keySystem);this.log(`Sending license request to URL: ${n}`);const o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=()=>{if(!this.hls||!t.mediaKeysSession)return r(new Error("invalid state"));if(4===o.readyState)if(200===o.status){this._requestLicenseFailureCount=0;let e=o.response;this.log(`License received ${e instanceof ArrayBuffer?e.byteLength:e}`);const s=this.config.licenseResponseCallback;if(s)try{e=s.call(this.hls,o,n,t)}catch(t){this.error(t)}i(e)}else{const a=s.errorRetry,h=a?a.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>h||o.status>=400&&o.status<500)r(new Ow({type:Ig.KEY_SYSTEM_ERROR,details:Tg.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o,response:{url:n,data:void 0,code:o.status,text:o.statusText}},`License Request XHR failed (${n}). Status: ${o.status} (${o.statusText})`));else{const s=h-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${s} attempts left`),this.requestLicense(t,e).then(i,r)}}},t.licenseXhr&&t.licenseXhr.readyState!==XMLHttpRequest.DONE&&t.licenseXhr.abort(),t.licenseXhr=o,this.setupLicenseXHR(o,n,t,e).then((({xhr:e,licenseChallenge:s})=>{t.keySystem==Yg.PLAYREADY&&(s=this.unpackPlayReadyKeyMessage(e,s)),e.send(s)}))}))}onMediaAttached(t,e){if(!this.config.emeEnabled)return;const s=e.media;this.media=s,s.addEventListener("encrypted",this.onMediaEncrypted),s.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const t=this.media,e=this.mediaKeySessions;t&&(t.removeEventListener("encrypted",this.onMediaEncrypted),t.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},qA.clearKeyUriToKeyIdMap();const s=e.length;Fw.CDMCleanupPromise=Promise.all(e.map((t=>this.removeSession(t))).concat(null==t?void 0:t.setMediaKeys(null).catch((t=>{this.log(`Could not clear media keys: ${t}`)})))).then((()=>{s&&(this.log("finished closing key sessions and clearing media keys"),e.length=0)})).catch((t=>{this.log(`Could not close sessions and clear media keys: ${t}`)}))}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(t,{sessionKeys:e}){if(e&&this.config.emeEnabled&&!this.keyFormatPromise){const t=e.reduce(((t,e)=>(-1===t.indexOf(e.keyFormat)&&t.push(e.keyFormat),t)),[]);this.log(`Selecting key-system from session-keys ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)}}removeSession(t){const{mediaKeysSession:e,licenseXhr:s}=t;if(e){this.log(`Remove licenses and keys and close session ${e.sessionId}`),t._onmessage&&(e.removeEventListener("message",t._onmessage),t._onmessage=void 0),t._onkeystatuseschange&&(e.removeEventListener("keystatuseschange",t._onkeystatuseschange),t._onkeystatuseschange=void 0),s&&s.readyState!==XMLHttpRequest.DONE&&s.abort(),t.mediaKeysSession=t.decryptdata=t.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(t);return i>-1&&this.mediaKeySessions.splice(i,1),e.remove().catch((t=>{this.log(`Could not remove session: ${t}`)})).then((()=>e.close())).catch((t=>{this.log(`Could not close session: ${t}`)}))}}}Fw.CDMCleanupPromise=void 0;class Ow extends Error{constructor(t,e){super(e),this.data=void 0,t.error||(t.error=new Error(e)),this.data=t,t.err=t.error}}var Uw,Nw,jw;!function(t){t.MANIFEST="m",t.AUDIO="a",t.VIDEO="v",t.MUXED="av",t.INIT="i",t.CAPTION="c",t.TIMED_TEXT="tt",t.KEY="k",t.OTHER="o"}(Uw||(Uw={})),function(t){t.DASH="d",t.HLS="h",t.SMOOTH="s",t.OTHER="o"}(Nw||(Nw={})),function(t){t.OBJECT="CMCD-Object",t.REQUEST="CMCD-Request",t.SESSION="CMCD-Session",t.STATUS="CMCD-Status"}(jw||(jw={}));const Vw={[jw.OBJECT]:["br","d","ot","tb"],[jw.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[jw.SESSION]:["cid","pr","sf","sid","st","v"],[jw.STATUS]:["bs","rtp"]};class zw{constructor(t,e){this.value=void 0,this.params=void 0,Array.isArray(t)&&(t=t.map((t=>t instanceof zw?t:new zw(t)))),this.value=t,this.params=e}}class Gw{constructor(t){this.description=void 0,this.description=t}}function Ww(t,e,s,i){return new Error(`failed to ${t} "${r=e,Array.isArray(r)?JSON.stringify(r):r instanceof Map?"Map{}":r instanceof Set?"Set{}":"object"==typeof r?JSON.stringify(r):String(r)}" as ${s}`,{cause:i});var r}const Hw="Bare Item";const Kw=/[\x00-\x1f\x7f]+/;function Qw(t,e,s){return Ww("serialize",t,e,s)}function Yw(t){if(!1===ArrayBuffer.isView(t))throw Qw(t,"Byte Sequence");return`:${e=t,btoa(String.fromCharCode(...e))}:`;var e}function qw(t){if(function(t){return t<-999999999999999||99999999999999912)throw Qw(t,"Decimal");const s=e.toString();return s.includes(".")?s:`${s}.0`}function Zw(t){const e=(s=t).description||s.toString().slice(7,-1);var s;if(!1===/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e))throw Qw(e,"Token");return e}function $w(t){switch(typeof t){case"number":if(!vg(t))throw Qw(t,Hw);return Number.isInteger(t)?qw(t):Xw(t);case"string":return function(t){if(Kw.test(t))throw Qw(t,"String");return`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}(t);case"symbol":return Zw(t);case"boolean":return function(t){if("boolean"!=typeof t)throw Qw(t,"Boolean");return t?"?1":"?0"}(t);case"object":if(t instanceof Date)return function(t){return`@${qw(t.getTime()/1e3)}`}(t);if(t instanceof Uint8Array)return Yw(t);if(t instanceof Gw)return Zw(t);default:throw Qw(t,Hw)}}function tE(t){if(!1===/^[a-z*][a-z0-9\-_.*]*$/.test(t))throw Qw(t,"Key");return t}function eE(t){return null==t?"":Object.entries(t).map((([t,e])=>!0===e?`;${tE(t)}`:`;${tE(t)}=${$w(e)}`)).join("")}function sE(t){return t instanceof zw?`${$w(t.value)}${eE(t.params)}`:$w(t)}function iE(t,e={whitespace:!0}){if("object"!=typeof t)throw Qw(t,"Dict");const s=t instanceof Map?t.entries():Object.entries(t),i=null!=e&&e.whitespace?" ":"";return Array.from(s).map((([t,e])=>{e instanceof zw==!1&&(e=new zw(e));let s=tE(t);var i;return!0===e.value?s+=eE(e.params):(s+="=",Array.isArray(e.value)?s+=`(${(i=e).value.map(sE).join(" ")})${eE(i.params)}`:s+=sE(e)),s})).join(`,${i}`)}const rE=t=>Math.round(t),nE=t=>100*rE(t/100),oE={br:rE,d:rE,bl:nE,dl:nE,mtp:nE,nor:(t,e)=>(null!=e&&e.baseUrl&&(t=function(t,e){const s=new URL(t),i=new URL(e);if(s.origin!==i.origin)return t;const r=s.pathname.split("/").slice(1),n=i.pathname.split("/").slice(1,-1);for(;r[0]===n[0];)r.shift(),n.shift();for(;n.length;)n.shift(),r.unshift("..");return r.join("/")}(t,e.baseUrl)),encodeURIComponent(t)),rtp:nE,tb:rE};function aE(t,e){const s={};if(null==t||"object"!=typeof t)return s;const i=Object.keys(t).sort(),r=bg({},oE,null==e?void 0:e.formatters),n=null==e?void 0:e.filter;return i.forEach((i=>{if(null!=n&&n(i))return;let o=t[i];const a=r[i];a&&(o=a(o,e)),"v"===i&&1===o||"pr"==i&&1===o||(t=>"number"==typeof t?vg(t):null!=t&&""!==t&&!1!==t)(o)&&((t=>"ot"===t||"sf"===t||"st"===t)(i)&&"string"==typeof o&&(o=new Gw(o)),s[i]=o)})),s}function hE(t,e={}){return t?function(t,e){return iE(t,e)}(aE(t,e),bg({whitespace:!1},e)):""}function cE(t,e,s){return bg(t,function(t,e={}){if(!t)return{};const s=Object.entries(t),i=Object.entries(Vw).concat(Object.entries((null==e?void 0:e.customHeaderMap)||{})),r=s.reduce(((t,e)=>{var s;const[r,n]=e,o=(null==(s=i.find((t=>t[1].includes(r))))?void 0:s[0])||jw.REQUEST;return null!=t[o]||(t[o]={}),t[o][r]=n,t}),{});return Object.entries(r).reduce(((t,[s,i])=>(t[s]=hE(i,e),t)),{})}(e,s))}const lE=/CMCD=[^&#]+/;function dE(t,e,s){const i=function(t,e={}){if(!t)return"";const s=hE(t,e);return`CMCD=${encodeURIComponent(s)}`}(e,s);if(!i)return t;if(lE.test(t))return t.replace(lE,i);const r=t.includes("?")?"&":"?";return`${t}${r}${i}`}function uE(t,e,s,i){t&&Object.keys(e).forEach((r=>{const n=t.filter((t=>t.groupId===r)).map((t=>{const n=bg({},t);return n.details=void 0,n.attrs=new Pg(n.attrs),n.url=n.attrs.URI=pE(t.url,t.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",s),n.groupId=n.attrs["GROUP-ID"]=e[r],n.attrs["PATHWAY-ID"]=i,n}));t.push(...n)}))}function pE(t,e,s,i){const{HOST:r,PARAMS:n,[s]:o}=i;let a;e&&(a=null==o?void 0:o[e],a&&(t=a));const h=new self.URL(t);return r&&!a&&(h.host=r),n&&Object.keys(n).sort().forEach((t=>{t&&h.searchParams.set(t,n[t])})),h.href}const fE=/^age:\s*[\d.]+\s*$/im;class mE{constructor(t){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=t&&t.xhrSetup||null,this.stats=new Fg,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const t=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),t&&(t.onreadystatechange=null,t.onprogress=null,4!==t.readyState&&(this.stats.aborted=!0,t.abort()))}abort(){var t;this.abortInternal(),null!=(t=this.callbacks)&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(t,e,s){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=t,this.config=e,this.callbacks=s,this.loadInternal()}loadInternal(){const{config:t,context:e}=this;if(!t||!e)return;const s=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;const r=this.xhrSetup;r?Promise.resolve().then((()=>{if(this.loader===s&&!this.stats.aborted)return r(s,e.url)})).catch((t=>{if(this.loader===s&&!this.stats.aborted)return s.open("GET",e.url,!0),r(s,e.url)})).then((()=>{this.loader!==s||this.stats.aborted||this.openAndSendXhr(s,e,t)})).catch((t=>{this.callbacks.onError({code:s.status,text:t.message},e,s,i)})):this.openAndSendXhr(s,e,t)}openAndSendXhr(t,e,s){t.readyState||t.open("GET",e.url,!0);const i=e.headers,{maxTimeToFirstByteMs:r,maxLoadTimeMs:n}=s.loadPolicy;if(i)for(const e in i)t.setRequestHeader(e,i[e]);e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=e.responseType,self.clearTimeout(this.requestTimeout),s.timeout=r&&vg(r)?r:n,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout),t.send()}readystatechange(){const{context:t,loader:e,stats:s}=this;if(!t||!e)return;const i=e.readyState,r=this.config;if(!s.aborted&&i>=2&&(0===s.loading.first&&(s.loading.first=Math.max(self.performance.now(),s.loading.start),r.timeout!==r.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),r.timeout=r.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.loadPolicy.maxLoadTimeMs-(s.loading.first-s.loading.start)))),4===i)){self.clearTimeout(this.requestTimeout),e.onreadystatechange=null,e.onprogress=null;const i=e.status,n="text"!==e.responseType;if(i>=200&&i<300&&(n&&e.response||null!==e.responseText)){s.loading.end=Math.max(self.performance.now(),s.loading.first);const r=n?e.response:e.responseText,o="arraybuffer"===e.responseType?r.byteLength:r.length;if(s.loaded=s.total=o,s.bwEstimate=8e3*s.total/(s.loading.end-s.loading.first),!this.callbacks)return;const a=this.callbacks.onProgress;if(a&&a(s,t,r,e),!this.callbacks)return;const h={url:e.responseURL,data:r,code:i};this.callbacks.onSuccess(h,s,t,e)}else{const n=r.loadPolicy.errorRetry;yb(n,s.retry,!1,{url:t.url,data:void 0,code:i})?this.retry(n):(Dg.error(`${i} while loading ${t.url}`),this.callbacks.onError({code:i,text:e.statusText},t,e,s))}}}loadtimeout(){if(!this.config)return;const t=this.config.loadPolicy.timeoutRetry;if(yb(t,this.stats.retry,!0))this.retry(t);else{var e;Dg.warn(`timeout while loading ${null==(e=this.context)?void 0:e.url}`);const t=this.callbacks;t&&(this.abortInternal(),t.onTimeout(this.stats,this.context,this.loader))}}retry(t){const{context:e,stats:s}=this;this.retryDelay=gb(t,s.retry),s.retry++,Dg.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${null==e?void 0:e.url}, retrying ${s.retry}/${t.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(t){const e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total)}getCacheAge(){let t=null;if(this.loader&&fE.test(this.loader.getAllResponseHeaders())){const e=this.loader.getResponseHeader("age");t=e?parseFloat(e):null}return t}getResponseHeader(t){return this.loader&&new RegExp(`^${t}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(t):null}}const gE=/(\d+)-(\d+)\/(\d+)/;class AE{constructor(t){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=t.fetchSetup||yE,this.controller=new self.AbortController,this.stats=new Fg}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var t;this.abortInternal(),null!=(t=this.callbacks)&&t.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(t,e,s){const i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();const r=function(t,e){const s={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(bg({},t.headers))};t.rangeEnd&&s.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1));return s}(t,this.controller.signal),n=s.onProgress,o="arraybuffer"===t.responseType,a=o?"byteLength":"length",{maxTimeToFirstByteMs:h,maxLoadTimeMs:c}=e.loadPolicy;this.context=t,this.config=e,this.callbacks=s,this.request=this.fetchSetup(t,r),self.clearTimeout(this.requestTimeout),e.timeout=h&&vg(h)?h:c,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),s.onTimeout(i,t,this.response)}),e.timeout),self.fetch(this.request).then((r=>{this.response=this.loader=r;const a=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(this.requestTimeout),e.timeout=c,this.requestTimeout=self.setTimeout((()=>{this.abortInternal(),s.onTimeout(i,t,this.response)}),c-(a-i.loading.start)),!r.ok){const{status:t,statusText:e}=r;throw new bE(e||"fetch, bad network response",t,r)}return i.loading.first=a,i.total=function(t){const e=t.get("Content-Range");if(e){const t=function(t){const e=gE.exec(t);if(e)return parseInt(e[2])-parseInt(e[1])+1}(e);if(vg(t))return t}const s=t.get("Content-Length");if(s)return parseInt(s)}(r.headers)||i.total,n&&vg(e.highWaterMark)?this.loadProgressively(r,i,t,e.highWaterMark,n):o?r.arrayBuffer():"json"===t.responseType?r.json():r.text()})).then((r=>{const o=this.response;if(!o)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);const h=r[a];h&&(i.loaded=i.total=h);const c={url:o.url,data:r,code:o.status};n&&!vg(e.highWaterMark)&&n(i,t,r,o),s.onSuccess(c,i,t,o)})).catch((e=>{if(self.clearTimeout(this.requestTimeout),i.aborted)return;const r=e&&e.code||0,n=e?e.message:null;s.onError({code:r,text:n},t,e?e.details:null,i)}))}getCacheAge(){let t=null;if(this.response){const e=this.response.headers.get("age");t=e?parseFloat(e):null}return t}getResponseHeader(t){return this.response?this.response.headers.get(t):null}loadProgressively(t,e,s,i=0,r){const n=new _v,o=t.body.getReader(),a=()=>o.read().then((o=>{if(o.done)return n.dataLength&&r(e,s,n.flush(),t),Promise.resolve(new ArrayBuffer(0));const h=o.value,c=h.length;return e.loaded+=c,c=i&&r(e,s,n.flush(),t)):r(e,s,h,t),a()})).catch((()=>Promise.reject()));return a()}}function yE(t,e){return new self.Request(t.url,e)}class bE extends Error{constructor(t,e,s){super(t),this.code=void 0,this.details=void 0,this.code=e,this.details=s}}const vE=/\s/,SE={newCue(t,e,s,i){const r=[];let n,o,a,h,c;const l=self.VTTCue||self.TextTrackCue;for(let u=0;u=16?h--:h++;const i=fw(c.trim()),p=bw(e,s,i);null!=t&&null!=(d=t.cues)&&d.getCueById(p)||(o=new l(e,s,i),o.id=p,o.line=u+1,o.align="left",o.position=10+Math.min(80,10*Math.floor(8*h/32)),r.push(o))}return t&&r.length&&(r.sort(((t,e)=>"auto"===t.line||"auto"===e.line?0:t.line>8&&e.line>8?e.line-t.line:t.line-e.line)),r.forEach((e=>Oy(t,e)))),r}},wE=gg(gg({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:mE,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:class{constructor(t){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:t,partCurrent:e,hls:s}=this,{autoLevelEnabled:i,media:r}=s;if(!t||!r)return;const n=performance.now(),o=e?e.stats:t.stats,a=e?e.duration:t.duration,h=n-o.loading.start,c=s.minAutoLevel;if(o.aborted||o.loaded&&o.loaded===o.total||t.level<=c)return this.clearTimer(),void(this._nextAutoLevel=-1);if(!i||r.paused||!r.playbackRate||!r.readyState)return;const l=s.mainForwardBufferInfo;if(null===l)return;const d=this.bwEstimator.getEstimateTTFB(),u=Math.abs(r.playbackRate);if(h<=Math.max(d,a/(2*u)*1e3))return;const p=l.len/u,f=o.loading.first?o.loading.first-o.loading.start:-1,m=o.loaded&&f>-1,g=this.getBwEstimate(),A=s.levels,y=A[t.level],b=o.total||Math.max(o.loaded,Math.round(a*y.averageBitrate/8));let v=m?h-f:h;v<1&&m&&(v=Math.min(h,8*o.loaded/g));const S=m?1e3*o.loaded/v:0,w=S?(b-o.loaded)/S:8*b/g+d/1e3;if(w<=p)return;const E=S?8*S:g;let I,T=Number.POSITIVE_INFINITY;for(I=t.level-1;I>c;I--){const t=A[I].maxBitrate;if(T=this.getTimeToLoadFrag(d/1e3,E,a*t,!A[I].details),T=w)return;if(T>10*a)return;s.nextLoadLevel=s.nextAutoLevel=I,m?this.bwEstimator.sample(h-Math.min(d,f),o.loaded):this.bwEstimator.sampleTTFB(h);const k=A[I].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>k&&this.resetEstimator(k),this.clearTimer(),Dg.warn(`[abr] Fragment ${t.sn}${e?" part "+e.index:""} of level ${t.level} is loading too slowly;\n Time to underbuffer: ${p.toFixed(3)} s\n Estimated load time for current fragment: ${w.toFixed(3)} s\n Estimated load time for down switch fragment: ${T.toFixed(3)} s\n TTFB estimate: ${0|f} ms\n Current BW estimate: ${vg(g)?0|g:"Unknown"} bps\n New BW estimate: ${0|this.getBwEstimate()} bps\n Switching to level ${I} @ ${0|k} bps`),s.trigger(Eg.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:e,stats:o})},this.hls=t,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(t){t&&(Dg.log(`setting initial bwe to ${t}`),this.hls.config.abrEwmaDefaultEstimate=t),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const t=this.hls.config;return new xb(t.abrEwmaSlowVoD,t.abrEwmaFastVoD,t.abrEwmaDefaultEstimate)}registerListeners(){const{hls:t}=this;t.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.on(Eg.FRAG_LOADING,this.onFragLoading,this),t.on(Eg.FRAG_LOADED,this.onFragLoaded,this),t.on(Eg.FRAG_BUFFERED,this.onFragBuffered,this),t.on(Eg.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(Eg.LEVEL_LOADED,this.onLevelLoaded,this),t.on(Eg.LEVELS_UPDATED,this.onLevelsUpdated,this),t.on(Eg.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),t.on(Eg.ERROR,this.onError,this)}unregisterListeners(){const{hls:t}=this;t&&(t.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.off(Eg.FRAG_LOADING,this.onFragLoading,this),t.off(Eg.FRAG_LOADED,this.onFragLoaded,this),t.off(Eg.FRAG_BUFFERED,this.onFragBuffered,this),t.off(Eg.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(Eg.LEVEL_LOADED,this.onLevelLoaded,this),t.off(Eg.LEVELS_UPDATED,this.onLevelsUpdated,this),t.off(Eg.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),t.off(Eg.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(t,e){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(t,e){const s=e.frag;if(!this.ignoreFragment(s)){var i;if(!s.bitrateTest)this.fragCurrent=s,this.partCurrent=null!=(i=e.part)?i:null;this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(t,e){this.clearTimer()}onError(t,e){if(!e.fatal)switch(e.details){case Tg.BUFFER_ADD_CODEC_ERROR:case Tg.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case Tg.FRAG_LOAD_TIMEOUT:{const t=e.frag,{fragCurrent:s,partCurrent:i}=this;if(t&&s&&t.sn===s.sn&&t.level===s.level){const e=performance.now(),s=i?i.stats:t.stats,r=e-s.loading.start,n=s.loading.first?s.loading.first-s.loading.start:-1;if(s.loaded&&n>-1){const t=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(r-Math.min(t,n),s.loaded)}else this.bwEstimator.sampleTTFB(r)}break}}}getTimeToLoadFrag(t,e,s,i){return t+s/e+(i?this.lastLevelLoadSec:0)}onLevelLoaded(t,e){const s=this.hls.config,{loading:i}=e.stats,r=i.end-i.start;vg(r)&&(this.lastLevelLoadSec=r/1e3),e.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)}onFragLoaded(t,{frag:e,part:s}){const i=s?s.stats:e.stats;if(e.type===Dy&&this.bwEstimator.sampleTTFB(i.loading.first-i.loading.start),!this.ignoreFragment(e)){if(this.clearTimer(),e.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const t=s?s.duration:e.duration,r=this.hls.levels[e.level],n=(r.loaded?r.loaded.bytes:0)+i.loaded,o=(r.loaded?r.loaded.duration:0)+t;r.loaded={bytes:n,duration:o},r.realBitrate=Math.round(8*n/o)}if(e.bitrateTest){const t={stats:i,frag:e,part:s,id:e.type};this.onFragBuffered(Eg.FRAG_BUFFERED,t),e.bitrateTest=!1}else this.lastLoadedFragLevel=e.level}}onFragBuffered(t,e){const{frag:s,part:i}=e,r=null!=i&&i.stats.loaded?i.stats:s.stats;if(r.aborted)return;if(this.ignoreFragment(s))return;const n=r.parsing.end-r.loading.start-Math.min(r.loading.first-r.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(n,r.loaded),r.bwEstimate=this.getBwEstimate(),s.bitrateTest?this.bitrateTestDelay=n/1e3:this.bitrateTestDelay=0}ignoreFragment(t){return t.type!==Dy||"initSegment"===t.sn}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:t,minAutoLevel:e}=this.hls,s=this.getBwEstimate(),i=this.hls.config.maxStarvationDelay,r=this.findBestLevel(s,e,t,0,i,1,1);if(r>-1)return r;const n=this.hls.firstLevel,o=Math.min(Math.max(n,e),t);return Dg.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${n} clamped to ${o}`),o}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const t=this.forcedAutoLevel,e=this.bwEstimator.canEstimate(),s=this.lastLoadedFragLevel>-1;if(!(-1===t||e&&s&&this.nextAutoLevelKey!==this.getAutoLevelKey()))return t;const i=e&&s?this.getNextABRAutoLevel():this.firstAutoLevel;if(-1!==t){const e=this.hls.levels;if(e.length>Math.max(t,i)&&e[t].loadError<=e[i].loadError)return t}return this._nextAutoLevel=i,this.nextAutoLevelKey=this.getAutoLevelKey(),i}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:t,partCurrent:e,hls:s}=this,{maxAutoLevel:i,config:r,minAutoLevel:n}=s,o=e?e.duration:t?t.duration:0,a=this.getBwEstimate(),h=this.getStarvationDelay();let c=r.abrBandWidthFactor,l=r.abrBandWidthUpFactor;if(h){const t=this.findBestLevel(a,n,i,h,0,c,l);if(t>=0)return t}let d=o?Math.min(o,r.maxStarvationDelay):r.maxStarvationDelay;if(!h){const t=this.bitrateTestDelay;if(t){d=(o?Math.min(o,r.maxLoadingDelay):r.maxLoadingDelay)-t,Dg.info(`[abr] bitrate test took ${Math.round(1e3*t)}ms, set first fragment max fetchDuration to ${Math.round(1e3*d)} ms`),c=l=1}}const u=this.findBestLevel(a,n,i,h,d,c,l);if(Dg.info(`[abr] ${h?"rebuffering expected":"buffer is empty"}, optimal quality level ${u}`),u>-1)return u;const p=s.levels[n],f=s.levels[s.loadLevel];return(null==p?void 0:p.bitrate)<(null==f?void 0:f.bitrate)?n:s.loadLevel}getStarvationDelay(){const t=this.hls,e=t.media;if(!e)return 1/0;const s=e&&0!==e.playbackRate?Math.abs(e.playbackRate):1,i=t.mainForwardBufferInfo;return(i?i.len:0)/s}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(t,e,s,i,r,n,o){var a;const h=i+r,c=this.lastLoadedFragLevel,l=-1===c?this.hls.firstLevel:c,{fragCurrent:d,partCurrent:u}=this,{levels:p,allAudioTracks:f,loadLevel:m,config:g}=this.hls;if(1===p.length)return 0;const A=p[l],y=!(null==A||null==(a=A.details)||!a.live),b=-1===m||-1===c;let v,S="SDR",w=(null==A?void 0:A.frameRate)||0;const{audioPreference:E,videoPreference:I}=g,T=this.audioTracksByGroup||(this.audioTracksByGroup=function(t){return t.reduce(((t,e)=>{let s=t.groups[e.groupId];s||(s=t.groups[e.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),s.tracks.push(e);const i=e.channels||"2";return s.channels[i]=(s.channels[i]||0)+1,s.hasDefault=s.hasDefault||e.default,s.hasAutoSelect=s.hasAutoSelect||e.autoselect,s.hasDefault&&(t.hasDefaultAudio=!0),s.hasAutoSelect&&(t.hasAutoSelectAudio=!0),t}),{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}(f));if(b){if(-1!==this.firstSelection)return this.firstSelection;const i=this.codecTiers||(this.codecTiers=function(t,e,s,i){return t.slice(s,i+1).reduce(((t,s)=>{if(!s.codecSet)return t;const i=s.audioGroups;let r=t[s.codecSet];r||(t[s.codecSet]=r={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!i,fragmentError:0}),r.minBitrate=Math.min(r.minBitrate,s.bitrate);const n=Math.min(s.height,s.width);return r.minHeight=Math.min(r.minHeight,n),r.minFramerate=Math.min(r.minFramerate,s.frameRate),r.maxScore=Math.max(r.maxScore,s.score),r.fragmentError+=s.fragmentError,r.videoRanges[s.videoRange]=(r.videoRanges[s.videoRange]||0)+1,i&&i.forEach((t=>{if(!t)return;const s=e.groups[t];s&&(r.hasDefaultAudio=r.hasDefaultAudio||e.hasDefaultAudio?s.hasDefault:s.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(s.channels).forEach((t=>{r.channels[t]=(r.channels[t]||0)+s.channels[t]})))})),t}),{})}(p,T,e,s)),r=function(t,e,s,i,r){const n=Object.keys(t),o=null==i?void 0:i.channels,a=null==i?void 0:i.audioCodec,h=o&&2===parseInt(o);let c=!0,l=!1,d=1/0,u=1/0,p=1/0,f=0,m=[];const{preferHDR:g,allowedVideoRanges:A}=Ob(e,r);for(let e=n.length;e--;){const s=t[n[e]];c=s.channels[2]>0,d=Math.min(d,s.minHeight),u=Math.min(u,s.minFramerate),p=Math.min(p,s.minBitrate);const i=A.filter((t=>s.videoRanges[t]>0));i.length>0&&(l=!0,m=i)}d=vg(d)?d:0,u=vg(u)?u:0;const y=Math.max(1080,d),b=Math.max(30,u);p=vg(p)?p:s,s=Math.max(p,s),l||(e=void 0,m=[]);const v=n.reduce(((e,i)=>{const r=t[i];if(i===e)return e;if(r.minBitrate>s)return Ub(i,`min bitrate of ${r.minBitrate} > current estimate of ${s}`),e;if(!r.hasDefaultAudio)return Ub(i,"no renditions with default or auto-select sound found"),e;if(a&&i.indexOf(a.substring(0,4))%5!=0)return Ub(i,`audio codec preference "${a}" not found`),e;if(o&&!h){if(!r.channels[o])return Ub(i,`no renditions with ${o} channel sound found (channels options: ${Object.keys(r.channels)})`),e}else if((!a||h)&&c&&0===r.channels[2])return Ub(i,"no renditions with stereo sound found"),e;return r.minHeight>y?(Ub(i,`min resolution of ${r.minHeight} > maximum of ${y}`),e):r.minFramerate>b?(Ub(i,`min framerate of ${r.minFramerate} > maximum of ${b}`),e):m.some((t=>r.videoRanges[t]>0))?r.maxScore=hy(e)||r.fragmentError>t[e].fragmentError)?e:(f=r.maxScore,i):(Ub(i,`no variants with VIDEO-RANGE of ${JSON.stringify(m)} found`),e)}),void 0);return{codecSet:v,videoRanges:m,preferHDR:g,minFramerate:u,minBitrate:p}}(i,S,t,E,I),{codecSet:n,videoRanges:o,minFramerate:a,minBitrate:h,preferHDR:c}=r;v=n,S=c?o[o.length-1]:o[0],w=a,t=Math.max(t,h),Dg.log(`[abr] picked start tier ${JSON.stringify(r)}`)}else v=null==A?void 0:A.codecSet,S=null==A?void 0:A.videoRange;const k=u?u.duration:d?d.duration:0,_=this.bwEstimator.getEstimateTTFB()/1e3,C=[];for(let a=s;a>=e;a--){var R;const e=p[a],d=a>l;if(!e)continue;if(g.useMediaCapabilities&&!e.supportedResult&&!e.supportedPromise){const s=navigator.mediaCapabilities;"function"==typeof(null==s?void 0:s.decodingInfo)&&Mb(e,T,S,w,t,E)?(e.supportedPromise=Fb(e,T,s),e.supportedPromise.then((t=>{if(!this.hls)return;e.supportedResult=t;const s=this.hls.levels,i=s.indexOf(e);t.error?Dg.warn(`[abr] MediaCapabilities decodingInfo error: "${t.error}" for level ${i} ${JSON.stringify(t)}`):t.supported||(Dg.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${i} ${JSON.stringify(t)}`),i>-1&&s.length>1&&(Dg.log(`[abr] Removing unsupported level ${i}`),this.hls.removeLevel(i)))}))):e.supportedResult=Pb}if(v&&e.codecSet!==v||S&&e.videoRange!==S||d&&w>e.frameRate||!d&&w>0&&w=2*k&&0===r?p[a].averageBitrate:p[a].maxBitrate,x=this.getTimeToLoadFrag(_,D,L*I,void 0===f);if(D>=L&&(a===c||0===e.loadError&&0===e.fragmentError)&&(x<=_||!vg(x)||y&&!this.bitrateTestDelay||x${a} adjustedbw(${Math.round(D)})-bitrate=${Math.round(D-L)} ttfb:${_.toFixed(1)} avgDuration:${I.toFixed(1)} maxFetchDuration:${h.toFixed(1)} fetchDuration:${x.toFixed(1)} firstSelection:${b} codecSet:${v} videoRange:${S} hls.loadLevel:${m}`)),b&&(this.firstSelection=a),a}}return-1}set nextAutoLevel(t){const{maxAutoLevel:e,minAutoLevel:s}=this.hls,i=Math.min(Math.max(t,s),e);this._nextAutoLevel!==i&&(this.nextAutoLevelKey="",this._nextAutoLevel=i)}},bufferController:class{constructor(t){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendSource=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this._onEndStreaming=t=>{this.hls&&this.hls.pauseBuffering()},this._onStartStreaming=t=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=()=>{const{media:t,mediaSource:e}=this;this.log("Media source opened"),t&&(t.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(Eg.MEDIA_ATTACHED,{media:t,mediaSource:e})),e&&e.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:t,_objectUrl:e}=this;t!==e&&Dg.error(`Media element src was set while attaching MediaSource (${e} > ${t})`)},this.hls=t;const e="[buffer-controller]";var s;this.appendSource=(s=sy(t.config.preferManagedMediaSource),"undefined"!=typeof self&&s===self.ManagedMediaSource),this.log=Dg.log.bind(Dg,e),this.warn=Dg.warn.bind(Dg,e),this.error=Dg.error.bind(Dg,e),this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null,this.hls=null}registerListeners(){const{hls:t}=this;t.on(Eg.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(Eg.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.on(Eg.MANIFEST_PARSED,this.onManifestParsed,this),t.on(Eg.BUFFER_RESET,this.onBufferReset,this),t.on(Eg.BUFFER_APPENDING,this.onBufferAppending,this),t.on(Eg.BUFFER_CODECS,this.onBufferCodecs,this),t.on(Eg.BUFFER_EOS,this.onBufferEos,this),t.on(Eg.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(Eg.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(Eg.FRAG_PARSED,this.onFragParsed,this),t.on(Eg.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:t}=this;t.off(Eg.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(Eg.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.off(Eg.MANIFEST_PARSED,this.onManifestParsed,this),t.off(Eg.BUFFER_RESET,this.onBufferReset,this),t.off(Eg.BUFFER_APPENDING,this.onBufferAppending,this),t.off(Eg.BUFFER_CODECS,this.onBufferCodecs,this),t.off(Eg.BUFFER_EOS,this.onBufferEos,this),t.off(Eg.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(Eg.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(Eg.FRAG_PARSED,this.onFragParsed,this),t.off(Eg.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new OS(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.appendErrors={audio:0,video:0,audiovideo:0},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(t,e){let s=2;(e.audio&&!e.video||!e.altAudio)&&(s=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=s,this.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(t,e){const s=this.media=e.media,i=sy(this.appendSource);if(s&&i){var r;const t=this.mediaSource=new i;this.log(`created media source: ${null==(r=t.constructor)?void 0:r.name}`),t.addEventListener("sourceopen",this._onMediaSourceOpen),t.addEventListener("sourceended",this._onMediaSourceEnded),t.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(t.addEventListener("startstreaming",this._onStartStreaming),t.addEventListener("endstreaming",this._onEndStreaming));const e=this._objectUrl=self.URL.createObjectURL(t);if(this.appendSource)try{s.removeAttribute("src");const i=self.ManagedMediaSource;s.disableRemotePlayback=s.disableRemotePlayback||i&&t instanceof i,NS(s),function(t,e){const s=self.document.createElement("source");s.type="video/mp4",s.src=e,t.appendChild(s)}(s,e),s.load()}catch(t){s.src=e}else s.src=e;s.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:t,mediaSource:e,_objectUrl:s}=this;if(e){if(this.log("media source detaching"),"open"===e.readyState)try{e.endOfStream()}catch(t){this.warn(`onMediaDetaching: ${t.message} while calling endOfStream`)}this.onBufferReset(),e.removeEventListener("sourceopen",this._onMediaSourceOpen),e.removeEventListener("sourceended",this._onMediaSourceEnded),e.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.removeEventListener("startstreaming",this._onStartStreaming),e.removeEventListener("endstreaming",this._onEndStreaming)),t&&(t.removeEventListener("emptied",this._onMediaEmptied),s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(t.removeAttribute("src"),this.appendSource&&NS(t),t.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(Eg.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach((t=>{this.resetBuffer(t)})),this._initSourceBuffer()}resetBuffer(t){const e=this.sourceBuffer[t];try{var s;if(e)this.removeBufferListeners(t),this.sourceBuffer[t]=void 0,null!=(s=this.mediaSource)&&s.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(e)}catch(e){this.warn(`onBufferReset ${t}`,e)}}onBufferCodecs(t,e){const s=this.getSourceBufferTypes().length,i=Object.keys(e);if(i.forEach((t=>{if(s){const s=this.tracks[t];if(s&&"function"==typeof s.buffer.changeType){var i;const{id:r,codec:n,levelCodec:o,container:a,metadata:h}=e[t],c=uy(s.codec,s.levelCodec),l=null==c?void 0:c.replace(US,"$1");let d=uy(n,o);const u=null==(i=d)?void 0:i.replace(US,"$1");if(d&&l!==u){"audio"===t.slice(0,5)&&(d=dy(d,this.appendSource));const e=`${a};codecs=${d}`;this.appendChangeType(t,e),this.log(`switching codec ${c} to ${d}`),this.tracks[t]={buffer:s.buffer,codec:n,container:a,levelCodec:o,metadata:h,id:r}}}}else this.pendingTracks[t]=e[t]})),s)return;const r=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==r&&(this.log(`${r} bufferCodec event(s) expected ${i.join(",")}`),this.bufferCodecEventsExpected=r),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks()}appendChangeType(t,e){const{operationQueue:s}=this,i={execute:()=>{const i=this.sourceBuffer[t];i&&(this.log(`changing ${t} sourceBuffer type to ${e}`),i.changeType(e)),s.shiftAndExecuteNext(t)},onStart:()=>{},onComplete:()=>{},onError:e=>{this.warn(`Failed to change ${t} SourceBuffer type`,e)}};s.append(i,t,!!this.pendingTracks[t])}onBufferAppending(t,e){const{hls:s,operationQueue:i,tracks:r}=this,{data:n,type:o,frag:a,part:h,chunkMeta:c}=e,l=c.buffering[o],d=self.performance.now();l.start=d;const u=a.stats.buffering,p=h?h.stats.buffering:null;0===u.start&&(u.start=d),p&&0===p.start&&(p.start=d);const f=r.audio;let m=!1;"audio"===o&&"audio/mpeg"===(null==f?void 0:f.container)&&(m=!this.lastMpegAudioChunk||1===c.id||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const g=a.start,A={execute:()=>{if(l.executeStart=self.performance.now(),m){const t=this.sourceBuffer[o];if(t){const e=g-t.timestampOffset;Math.abs(e)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${g} (delta: ${e}) sn: ${a.sn})`),t.timestampOffset=g)}}this.appendExecutor(n,o)},onStart:()=>{},onComplete:()=>{const t=self.performance.now();l.executeEnd=l.end=t,0===u.first&&(u.first=t),p&&0===p.first&&(p.first=t);const{sourceBuffer:e}=this,s={};for(const t in e)s[t]=Xb.getBuffered(e[t]);this.appendErrors[o]=0,"audio"===o||"video"===o?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(Eg.BUFFER_APPENDED,{type:o,frag:a,part:h,chunkMeta:c,parent:a.type,timeRanges:s})},onError:t=>{const e={type:Ig.MEDIA_ERROR,parent:a.type,details:Tg.BUFFER_APPEND_ERROR,sourceBufferName:o,frag:a,part:h,chunkMeta:c,error:t,err:t,fatal:!1};if(t.code===DOMException.QUOTA_EXCEEDED_ERR)e.details=Tg.BUFFER_FULL_ERROR;else{const t=++this.appendErrors[o];e.details=Tg.BUFFER_APPEND_ERROR,this.warn(`Failed ${t}/${s.config.appendErrorMaxRetry} times to append segment in "${o}" sourceBuffer`),t>=s.config.appendErrorMaxRetry&&(e.fatal=!0)}s.trigger(Eg.ERROR,e)}};i.append(A,o,!!this.pendingTracks[o])}onBufferFlushing(t,e){const{operationQueue:s}=this,i=t=>({execute:this.removeExecutor.bind(this,t,e.startOffset,e.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(Eg.BUFFER_FLUSHED,{type:t})},onError:e=>{this.warn(`Failed to remove from ${t} SourceBuffer`,e)}});e.type?s.append(i(e.type),e.type):this.getSourceBufferTypes().forEach((t=>{s.append(i(t),t)}))}onFragParsed(t,e){const{frag:s,part:i}=e,r=[],n=i?i.elementaryStreams:s.elementaryStreams;n[Ng]?r.push("audiovideo"):(n[Og]&&r.push("audio"),n[Ug]&&r.push("video"));0===r.length&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${s.type} level: ${s.level} sn: ${s.sn}`),this.blockBuffers((()=>{const t=self.performance.now();s.stats.buffering.end=t,i&&(i.stats.buffering.end=t);const e=i?i.stats:s.stats;this.hls.trigger(Eg.FRAG_BUFFERED,{frag:s,part:i,stats:e,id:s.type})}),r)}onFragChanged(t,e){this.trimBuffers()}onBufferEos(t,e){this.getSourceBufferTypes().reduce(((t,s)=>{const i=this.sourceBuffer[s];return!i||e.type&&e.type!==s||(i.ending=!0,i.ended||(i.ended=!0,this.log(`${s} sourceBuffer now EOS`))),t&&!(i&&!i.ended)}),!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers((()=>{this.getSourceBufferTypes().forEach((t=>{const e=this.sourceBuffer[t];e&&(e.ending=!1)}));const{mediaSource:t}=this;t&&"open"===t.readyState?(this.log("Calling mediaSource.endOfStream()"),t.endOfStream()):t&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${t.readyState}`)})))}onLevelUpdated(t,{details:e}){e.fragments.length&&(this.details=e,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}trimBuffers(){const{hls:t,details:e,media:s}=this;if(!s||null===e)return;if(!this.getSourceBufferTypes().length)return;const i=t.config,r=s.currentTime,n=e.levelTargetDuration,o=e.live&&null!==i.liveBackBufferLength?i.liveBackBufferLength:i.backBufferLength;if(vg(o)&&o>0){const t=Math.max(o,n),e=Math.floor(r/n)*n-t;this.flushBackBuffer(r,n,e)}if(vg(i.frontBufferFlushThreshold)&&i.frontBufferFlushThreshold>0){const t=Math.max(i.maxBufferLength,i.frontBufferFlushThreshold),e=Math.max(t,n),s=Math.floor(r/n)*n+e;this.flushFrontBuffer(r,n,s)}}flushBackBuffer(t,e,s){const{details:i,sourceBuffer:r}=this;this.getSourceBufferTypes().forEach((n=>{const o=r[n];if(o){const r=Xb.getBuffered(o);if(r.length>0&&s>r.start(0)){if(this.hls.trigger(Eg.BACK_BUFFER_REACHED,{bufferEnd:s}),null!=i&&i.live)this.hls.trigger(Eg.LIVE_BACK_BUFFER_REACHED,{bufferEnd:s});else if(o.ended&&r.end(r.length-1)-t<2*e)return void this.log(`Cannot flush ${n} back buffer while SourceBuffer is in ended state`);this.hls.trigger(Eg.BUFFER_FLUSHING,{startOffset:0,endOffset:s,type:n})}}}))}flushFrontBuffer(t,e,s){const{sourceBuffer:i}=this;this.getSourceBufferTypes().forEach((r=>{const n=i[r];if(n){const i=Xb.getBuffered(n),o=i.length;if(o<2)return;const a=i.start(o-1),h=i.end(o-1);if(s>a||t>=a&&t<=h)return;if(n.ended&&t-h<2*e)return void this.log(`Cannot flush ${r} front buffer while SourceBuffer is in ended state`);this.hls.trigger(Eg.BUFFER_FLUSHING,{startOffset:a,endOffset:1/0,type:r})}}))}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||"open"!==this.mediaSource.readyState)return;const{details:t,hls:e,media:s,mediaSource:i}=this,r=t.fragments[0].start+t.totalduration,n=s.duration,o=vg(i.duration)?i.duration:0;t.live&&e.config.liveDurationInfinity?(i.duration=1/0,this.updateSeekableRange(t)):(r>o&&r>n||!vg(n))&&(this.log(`Updating Media Source duration to ${r.toFixed(3)}`),i.duration=r)}updateSeekableRange(t){const e=this.mediaSource,s=t.fragments;if(s.length&&t.live&&null!=e&&e.setLiveSeekableRange){const i=Math.max(0,s[0].start),r=Math.max(i,i+t.totalduration);this.log(`Media Source duration is set to ${e.duration}. Setting seekable range to ${i}-${r}.`),e.setLiveSeekableRange(i,r)}}checkPendingTracks(){const{bufferCodecEventsExpected:t,operationQueue:e,pendingTracks:s}=this,i=Object.keys(s).length;if(i&&(!t||2===i||"audiovideo"in s)){this.createSourceBuffers(s),this.pendingTracks={};const t=this.getSourceBufferTypes();if(t.length)this.hls.trigger(Eg.BUFFER_CREATED,{tracks:this.tracks}),t.forEach((t=>{e.executeNext(t)}));else{const t=new Error("could not create source buffer for media codec(s)");this.hls.trigger(Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:t,reason:t.message})}}}createSourceBuffers(t){const{sourceBuffer:e,mediaSource:s}=this;if(!s)throw Error("createSourceBuffers called when mediaSource was null");for(const r in t)if(!e[r]){var i;const n=t[r];if(!n)throw Error(`source buffer exists for track ${r}, however track does not`);let o=-1===(null==(i=n.levelCodec)?void 0:i.indexOf(","))?n.levelCodec:n.codec;o&&"audio"===r.slice(0,5)&&(o=dy(o,this.appendSource));const a=`${n.container};codecs=${o}`;this.log(`creating sourceBuffer(${a})`);try{const t=e[r]=s.addSourceBuffer(a),i=r;this.addBufferListener(i,"updatestart",this._onSBUpdateStart),this.addBufferListener(i,"updateend",this._onSBUpdateEnd),this.addBufferListener(i,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(i,"bufferedchange",((t,e)=>{const s=e.removedRanges;null!=s&&s.length&&this.hls.trigger(Eg.BUFFER_FLUSHED,{type:r})})),this.tracks[r]={buffer:t,codec:o,container:n.container,levelCodec:n.levelCodec,metadata:n.metadata,id:n.id}}catch(t){this.error(`error while trying to add sourceBuffer: ${t.message}`),this.hls.trigger(Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:t,sourceBufferName:r,mimeType:a})}}}get mediaSrc(){var t;const e=(null==(t=this.media)?void 0:t.firstChild)||this.media;return null==e?void 0:e.src}_onSBUpdateStart(t){const{operationQueue:e}=this;e.current(t).onStart()}_onSBUpdateEnd(t){var e;if("closed"===(null==(e=this.mediaSource)?void 0:e.readyState))return void this.resetBuffer(t);const{operationQueue:s}=this;s.current(t).onComplete(),s.shiftAndExecuteNext(t)}_onSBUpdateError(t,e){var s;const i=new Error(`${t} SourceBuffer error. MediaSource readyState: ${null==(s=this.mediaSource)?void 0:s.readyState}`);this.error(`${i}`,e),this.hls.trigger(Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.BUFFER_APPENDING_ERROR,sourceBufferName:t,error:i,fatal:!1});const r=this.operationQueue.current(t);r&&r.onError(i)}removeExecutor(t,e,s){const{media:i,mediaSource:r,operationQueue:n,sourceBuffer:o}=this,a=o[t];if(!i||!r||!a)return this.warn(`Attempting to remove from the ${t} SourceBuffer, but it does not exist`),void n.shiftAndExecuteNext(t);const h=vg(i.duration)?i.duration:1/0,c=vg(r.duration)?r.duration:1/0,l=Math.max(0,e),d=Math.min(s,h,c);d>l&&(!a.ending||a.ended)?(a.ended=!1,this.log(`Removing [${l},${d}] from the ${t} SourceBuffer`),a.remove(l,d)):n.shiftAndExecuteNext(t)}appendExecutor(t,e){const s=this.sourceBuffer[e];if(s)s.ended=!1,s.appendBuffer(t);else if(!this.pendingTracks[e])throw new Error(`Attempting to append to the ${e} SourceBuffer, but it does not exist`)}blockBuffers(t,e=this.getSourceBufferTypes()){if(!e.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(t);const{operationQueue:s}=this,i=e.map((t=>s.appendBlocker(t)));Promise.all(i).then((()=>{t(),e.forEach((t=>{const e=this.sourceBuffer[t];null!=e&&e.updating||s.shiftAndExecuteNext(t)}))}))}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(t,e,s){const i=this.sourceBuffer[t];if(!i)return;const r=s.bind(this,t);this.listeners[t].push({event:e,listener:r}),i.addEventListener(e,r)}removeBufferListeners(t){const e=this.sourceBuffer[t];e&&this.listeners[t].forEach((t=>{e.removeEventListener(t.event,t.listener)}))}},capLevelController:Bw,errorController:class{constructor(t){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=t,this.log=Dg.log.bind(Dg,"[info]:"),this.warn=Dg.warn.bind(Dg,"[warning]:"),this.error=Dg.error.bind(Dg,"[error]:"),this.registerListeners()}registerListeners(){const t=this.hls;t.on(Eg.ERROR,this.onError,this),t.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.on(Eg.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const t=this.hls;t&&(t.off(Eg.ERROR,this.onError,this),t.off(Eg.ERROR,this.onErrorOut,this),t.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.off(Eg.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(t){}stopLoad(){this.playlistError=0}getVariantLevelIndex(t){return(null==t?void 0:t.type)===Dy?t.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(t,e){var s,i;if(e.fatal)return;const r=this.hls,n=e.context;switch(e.details){case Tg.FRAG_LOAD_ERROR:case Tg.FRAG_LOAD_TIMEOUT:case Tg.KEY_LOAD_ERROR:case Tg.KEY_LOAD_TIMEOUT:return void(e.errorAction=this.getFragRetryOrSwitchAction(e));case Tg.FRAG_PARSING_ERROR:if(null!=(s=e.frag)&&s.gap)return void(e.errorAction={action:Eb,flags:_b});case Tg.FRAG_GAP:case Tg.FRAG_DECRYPT_ERROR:return e.errorAction=this.getFragRetryOrSwitchAction(e),void(e.errorAction.action=Ib);case Tg.LEVEL_EMPTY_ERROR:case Tg.LEVEL_PARSING_ERROR:{var o,a;const t=e.parent===Dy?e.level:r.loadLevel;e.details===Tg.LEVEL_EMPTY_ERROR&&null!=(o=e.context)&&null!=(a=o.levelDetails)&&a.live?e.errorAction=this.getPlaylistRetryOrSwitchAction(e,t):(e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t))}return;case Tg.LEVEL_LOAD_ERROR:case Tg.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==n?void 0:n.level)&&(e.errorAction=this.getPlaylistRetryOrSwitchAction(e,n.level)));case Tg.AUDIO_TRACK_LOAD_ERROR:case Tg.AUDIO_TRACK_LOAD_TIMEOUT:case Tg.SUBTITLE_LOAD_ERROR:case Tg.SUBTITLE_TRACK_LOAD_TIMEOUT:if(n){const t=r.levels[r.loadLevel];if(t&&(n.type===Cy&&t.hasAudioGroup(n.groupId)||n.type===Ry&&t.hasSubtitleGroup(n.groupId)))return e.errorAction=this.getPlaylistRetryOrSwitchAction(e,r.loadLevel),e.errorAction.action=Ib,void(e.errorAction.flags=Cb)}return;case Tg.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const t=r.levels[r.loadLevel],s=null==t?void 0:t.attrs["HDCP-LEVEL"];s?e.errorAction={action:Ib,flags:Rb,hdcpLevel:s}:this.keySystemError(e)}return;case Tg.BUFFER_ADD_CODEC_ERROR:case Tg.REMUX_ALLOC_ERROR:case Tg.BUFFER_APPEND_ERROR:return void(e.errorAction=this.getLevelSwitchAction(e,null!=(i=e.level)?i:r.loadLevel));case Tg.INTERNAL_EXCEPTION:case Tg.BUFFER_APPENDING_ERROR:case Tg.BUFFER_FULL_ERROR:case Tg.LEVEL_SWITCH_ERROR:case Tg.BUFFER_STALLED_ERROR:case Tg.BUFFER_SEEK_OVER_HOLE:case Tg.BUFFER_NUDGE_ON_STALL:return void(e.errorAction={action:Eb,flags:_b})}e.type===Ig.KEY_SYSTEM_ERROR&&this.keySystemError(e)}keySystemError(t){const e=this.getVariantLevelIndex(t.frag);t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,e)}getPlaylistRetryOrSwitchAction(t,e){const s=mb(this.hls.config.playlistLoadPolicy,t),i=this.playlistError++;if(yb(s,i,fb(t),t.response))return{action:kb,flags:_b,retryConfig:s,retryCount:i};const r=this.getLevelSwitchAction(t,e);return s&&(r.retryConfig=s,r.retryCount=i),r}getFragRetryOrSwitchAction(t){const e=this.hls,s=this.getVariantLevelIndex(t.frag),i=e.levels[s],{fragLoadPolicy:r,keyLoadPolicy:n}=e.config,o=mb(t.details.startsWith("key")?n:r,t),a=e.levels.reduce(((t,e)=>t+e.fragmentError),0);if(i){t.details!==Tg.FRAG_GAP&&i.fragmentError++;if(yb(o,a,fb(t),t.response))return{action:kb,flags:_b,retryConfig:o,retryCount:a}}const h=this.getLevelSwitchAction(t,s);return o&&(h.retryConfig=o,h.retryCount=a),h}getLevelSwitchAction(t,e){const s=this.hls;null==e&&(e=s.loadLevel);const i=this.hls.levels[e];if(i){var r,n;const e=t.details;i.loadError++,e===Tg.BUFFER_APPEND_ERROR&&i.fragmentError++;let h=-1;const{levels:c,loadLevel:l,minAutoLevel:d,maxAutoLevel:u}=s;s.autoLevelEnabled||(s.loadLevel=-1);const p=null==(r=t.frag)?void 0:r.type,f=(p===Ly&&e===Tg.FRAG_PARSING_ERROR||"audio"===t.sourceBufferName&&(e===Tg.BUFFER_ADD_CODEC_ERROR||e===Tg.BUFFER_APPEND_ERROR))&&c.some((({audioCodec:t})=>i.audioCodec!==t)),m="video"===t.sourceBufferName&&(e===Tg.BUFFER_ADD_CODEC_ERROR||e===Tg.BUFFER_APPEND_ERROR)&&c.some((({codecSet:t,audioCodec:e})=>i.codecSet!==t&&i.audioCodec===e)),{type:g,groupId:A}=null!=(n=t.context)?n:{};for(let s=c.length;s--;){const r=(s+l)%c.length;if(r!==l&&r>=d&&r<=u&&0===c[r].loadError){var o,a;const s=c[r];if(e===Tg.FRAG_GAP&&p===Dy&&t.frag){const e=c[r].details;if(e){const s=vb(t.frag,e.fragments,t.frag.start);if(null!=s&&s.gap)continue}}else{if(g===Cy&&s.hasAudioGroup(A)||g===Ry&&s.hasSubtitleGroup(A))continue;if(p===Ly&&null!=(o=i.audioGroups)&&o.some((t=>s.hasAudioGroup(t)))||p===xy&&null!=(a=i.subtitleGroups)&&a.some((t=>s.hasSubtitleGroup(t)))||f&&i.audioCodec===s.audioCodec||!f&&i.audioCodec!==s.audioCodec||m&&i.codecSet===s.codecSet)continue}h=r;break}}if(h>-1&&s.loadLevel!==h)return t.levelRetry=!0,this.playlistError=0,{action:Ib,flags:_b,nextAutoLevel:h}}return{action:Ib,flags:Cb}}onErrorOut(t,e){var s;switch(null==(s=e.errorAction)?void 0:s.action){case Eb:break;case Ib:this.sendAlternateToPenaltyBox(e),e.errorAction.resolved||e.details===Tg.FRAG_GAP?/MediaSource readyState: ended/.test(e.error.message)&&(this.warn(`MediaSource ended after "${e.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError()):e.fatal=!0}e.fatal&&this.hls.stopLoad()}sendAlternateToPenaltyBox(t){const e=this.hls,s=t.errorAction;if(!s)return;const{flags:i,hdcpLevel:r,nextAutoLevel:n}=s;switch(i){case _b:this.switchLevel(t,n);break;case Rb:r&&(e.maxHdcpLevel=Xy[Xy.indexOf(r)-1],s.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${e.maxHdcpLevel}" or lower`)}s.resolved||this.switchLevel(t,n)}switchLevel(t,e){void 0!==e&&t.errorAction&&(this.warn(`switching to level ${e} after ${t.details}`),this.hls.nextAutoLevel=e,t.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}},fpsController:class{constructor(t){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=t,this.registerListeners()}setStreamController(t){this.streamController=t}registerListeners(){this.hls.on(Eg.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(Eg.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(t,e){const s=this.hls.config;if(s.capLevelOnFPSDrop){const t=e.media instanceof self.HTMLVideoElement?e.media:null;this.media=t,t&&"function"==typeof t.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),s.fpsDroppedMonitoringPeriod)}}checkFPS(t,e,s){const i=performance.now();if(e){if(this.lastTime){const t=i-this.lastTime,r=s-this.lastDroppedFrames,n=e-this.lastDecodedFrames,o=1e3*r/t,a=this.hls;if(a.trigger(Eg.FPS_DROP,{currentDropped:r,currentDecoded:n,totalDroppedFrames:s}),o>0&&r>a.config.fpsDroppedMonitoringThreshold*n){let t=a.currentLevel;Dg.warn("drop FPS ratio greater than max allowed value for currentLevel: "+t),t>0&&(-1===a.autoLevelCapping||a.autoLevelCapping>=t)&&(t-=1,a.trigger(Eg.FPS_DROP_LEVEL_CAPPING,{level:t,droppedLevel:a.currentLevel}),a.autoLevelCapping=t,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=s,this.lastDecodedFrames=e}}checkFPSInterval(){const t=this.media;if(t)if(this.isVideoPlaybackQualityAvailable){const e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)}},stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:iA,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:SE,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:class extends kv{constructor(t,e,s){super(t,e,s,"[subtitle-stream-controller]",xy),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}_registerListeners(){const{hls:t}=this;t.on(Eg.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(Eg.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.on(Eg.LEVEL_LOADED,this.onLevelLoaded,this),t.on(Eg.ERROR,this.onError,this),t.on(Eg.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(Eg.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),t.on(Eg.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(Eg.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),t.on(Eg.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(Eg.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:t}=this;t.off(Eg.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(Eg.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.off(Eg.LEVEL_LOADED,this.onLevelLoaded,this),t.off(Eg.ERROR,this.onError,this),t.off(Eg.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(Eg.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),t.off(Eg.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(Eg.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),t.off(Eg.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(Eg.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(t){this.stopLoad(),this.state=mv,this.setInterval(500),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(t,e){this.mainDetails=e.details}onSubtitleFragProcessed(t,e){const{frag:s,success:i}=e;if(this.fragPrevious=s,this.state=mv,!i)return;const r=this.tracksBuffered[this.currentTrackId];if(!r)return;let n;const o=s.start;for(let t=0;t=r[t].start&&o<=r[t].end){n=r[t];break}const a=s.start+s.duration;n?n.end=a:(n={start:o,end:a},r.push(n)),this.fragmentTracker.fragBuffered(s),this.fragBufferedComplete(s,null)}onBufferFlushing(t,e){const{startOffset:s,endOffset:i}=e;if(0===s&&i!==Number.POSITIVE_INFINITY){const t=i-1;if(t<=0)return;e.endOffsetSubtitles=Math.max(0,t),this.tracksBuffered.forEach((e=>{for(let s=0;snew rb(t))):(this.tracksBuffered=[],this.levels=e.map((t=>{const e=new rb(t);return this.tracksBuffered[e.id]=[],e})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,xy),this.fragPrevious=null,this.mediaBuffer=null)}onSubtitleTrackSwitch(t,e){var s;if(this.currentTrackId=e.id,null==(s=this.levels)||!s.length||-1===this.currentTrackId)return void this.clearInterval();const i=this.levels[this.currentTrackId];null!=i&&i.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,i&&this.setInterval(500)}onSubtitleTrackLoaded(t,e){var s;const{currentTrackId:i,levels:r}=this,{details:n,id:o}=e;if(!r)return void this.warn(`Subtitle tracks were reset while loading level ${o}`);const a=r[o];if(o>=r.length||!a)return;this.log(`Subtitle track ${o} loaded [${n.startSN},${n.endSN}]${n.lastPartSn?`[part-${n.lastPartSn}-${n.lastPartIndex}]`:""},duration:${n.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let h=0;if(n.live||null!=(s=a.details)&&s.live){const t=this.mainDetails;if(n.deltaUpdateFailed||!t)return;const e=t.fragments[0];var c;if(a.details)h=this.alignPlaylists(n,a.details,null==(c=this.levelLastLoaded)?void 0:c.details),0===h&&e&&(h=e.start,lb(n,h));else n.hasProgramDateTime&&t.hasProgramDateTime?(iv(n,t),h=n.fragments[0].start):e&&(h=e.start,lb(n,h))}if(a.details=n,this.levelLastLoaded=a,o===i&&(this.startFragRequested||!this.mainDetails&&n.live||this.setStartPosition(this.mainDetails||n,h),this.tick(),n.live&&!this.fragCurrent&&this.media&&this.state===mv)){vb(null,n.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),a.details=void 0)}}_handleFragmentLoadComplete(t){const{frag:e,payload:s}=t,i=e.decryptdata,r=this.hls;if(!this.fragContextChanged(e)&&s&&s.byteLength>0&&null!=i&&i.key&&i.iv&&"AES-128"===i.method){const t=performance.now();this.decrypter.decrypt(new Uint8Array(s),i.key.buffer,i.iv.buffer).catch((t=>{throw r.trigger(Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.FRAG_DECRYPT_ERROR,fatal:!1,error:t,reason:t.message,frag:e}),t})).then((s=>{const i=performance.now();r.trigger(Eg.FRAG_DECRYPTED,{frag:e,payload:s,stats:{tstart:t,tdecrypt:i}})})).catch((t=>{this.warn(`${t.name}: ${t.message}`),this.state=mv}))}}doTick(){if(this.media){if(this.state===mv){const{currentTrackId:t,levels:e}=this,s=null==e?void 0:e[t];if(!s||!e.length||!s.details)return;const{config:i}=this,r=this.getLoadPosition(),n=Xb.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],r,i.maxBufferHole),{end:o,len:a}=n,h=this.getFwdBufferInfo(this.media,Dy),c=s.details;if(a>this.getMaxBufferLength(null==h?void 0:h.len)+c.levelTargetDuration)return;const l=c.fragments,d=l.length,u=c.edge;let p=null;const f=this.fragPrevious;if(ou-t?0:t;p=vb(f,l,Math.max(l[0].start,o),e),!p&&f&&f.startthis.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const e=jy(this.media.textTracks);for(let s=0;s-1&&this.toggleTrackModes()}registerListeners(){const{hls:t}=this;t.on(Eg.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(Eg.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.on(Eg.MANIFEST_PARSED,this.onManifestParsed,this),t.on(Eg.LEVEL_LOADING,this.onLevelLoading,this),t.on(Eg.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(Eg.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(Eg.ERROR,this.onError,this)}unregisterListeners(){const{hls:t}=this;t.off(Eg.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(Eg.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.off(Eg.MANIFEST_PARSED,this.onManifestParsed,this),t.off(Eg.LEVEL_LOADING,this.onLevelLoading,this),t.off(Eg.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(Eg.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(Eg.ERROR,this.onError,this)}onMediaAttached(t,e){this.media=e.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(t){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,t)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);jy(this.media.textTracks).forEach((t=>{Uy(t)})),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(t,e){this.tracks=e.subtitleTracks}onSubtitleTrackLoaded(t,e){const{id:s,groupId:i,details:r}=e,n=this.tracksInGroup[s];if(!n||n.groupId!==i)return void this.warn(`Subtitle track with id:${s} and group:${i} not found in active group ${null==n?void 0:n.groupId}`);const o=n.details;n.details=e.details,this.log(`Subtitle track ${s} "${n.name}" lang:${n.lang} group:${i} loaded [${r.startSN}-${r.endSN}]`),s===this.trackId&&this.playlistLoaded(s,e,o)}onLevelLoading(t,e){this.switchLevel(e.level)}onLevelSwitching(t,e){this.switchLevel(e.level)}switchLevel(t){const e=this.hls.levels[t];if(!e)return;const s=e.subtitleGroups||null,i=this.groupIds;let r=this.currentTrack;if(!s||(null==i?void 0:i.length)!==(null==s?void 0:s.length)||null!=s&&s.some((t=>-1===(null==i?void 0:i.indexOf(t))))){this.groupIds=s,this.trackId=-1,this.currentTrack=null;const t=this.tracks.filter((t=>!s||-1!==s.indexOf(t.groupId)));if(t.length)this.selectDefaultTrack&&!t.some((t=>t.default))&&(this.selectDefaultTrack=!1),t.forEach(((t,e)=>{t.id=e}));else if(!r&&!this.tracksInGroup.length)return;this.tracksInGroup=t;const e=this.hls.config.subtitlePreference;if(!r&&e){this.selectDefaultTrack=!1;const s=Nb(e,t);if(s>-1)r=t[s];else{const t=Nb(e,this.tracks);r=this.tracks[t]}}let i=this.findTrackId(r);-1===i&&r&&(i=this.findTrackId(null));const n={subtitleTracks:t};this.log(`Updating subtitle tracks, ${t.length} track(s) found in "${null==s?void 0:s.join(",")}" group-id`),this.hls.trigger(Eg.SUBTITLE_TRACKS_UPDATED,n),-1!==i&&-1===this.trackId&&this.setSubtitleTrack(i)}else this.shouldReloadPlaylist(r)&&this.setSubtitleTrack(this.trackId)}findTrackId(t){const e=this.tracksInGroup,s=this.selectDefaultTrack;for(let i=0;i-1){const t=this.tracksInGroup[i];return this.setSubtitleTrack(i),t}if(s)return null;{const s=Nb(t,e);if(s>-1)return e[s]}}}return null}loadPlaylist(t){super.loadPlaylist();const e=this.currentTrack;if(this.shouldLoadPlaylist(e)&&e){const s=e.id,i=e.groupId;let r=e.url;if(t)try{r=t.addDirectives(r)}catch(t){this.warn(`Could not construct new URL with HLS Delivery Directives: ${t}`)}this.log(`Loading subtitle playlist for id ${s}`),this.hls.trigger(Eg.SUBTITLE_TRACK_LOADING,{url:r,id:s,groupId:i,deliveryDirectives:t||null})}}toggleTrackModes(){const{media:t}=this;if(!t)return;const e=jy(t.textTracks),s=this.currentTrack;let i;if(s&&(i=e.filter((t=>MS(s,t)))[0],i||this.warn(`Unable to find subtitle TextTrack with name "${s.name}" and language "${s.lang}"`)),[].slice.call(e).forEach((t=>{"disabled"!==t.mode&&t!==i&&(t.mode="disabled")})),i){const t=this.subtitleDisplay?"showing":"hidden";i.mode!==t&&(i.mode=t)}}setSubtitleTrack(t){const e=this.tracksInGroup;if(!this.media)return void(this.queuedDefaultTrack=t);if(t<-1||t>=e.length||!vg(t))return void this.warn(`Invalid subtitle track id: ${t}`);this.clearTimer(),this.selectDefaultTrack=!1;const s=this.currentTrack,i=e[t]||null;if(this.trackId=t,this.currentTrack=i,this.toggleTrackModes(),!i)return void this.hls.trigger(Eg.SUBTITLE_TRACK_SWITCH,{id:t});const r=!!i.details&&!i.details.live;if(t===this.trackId&&i===s&&r)return;this.log(`Switching to subtitle-track ${t}`+(i?` "${i.name}" lang:${i.lang} group:${i.groupId}`:""));const{id:n,groupId:o="",name:a,type:h,url:c}=i;this.hls.trigger(Eg.SUBTITLE_TRACK_SWITCH,{id:n,groupId:o,name:a,type:h,url:c});const l=this.switchParams(i.url,null==s?void 0:s.details,i.details);this.loadPlaylist(l)}},timelineController:class{constructor(t){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=t,this.config=t.config,this.Cues=t.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},t.on(Eg.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(Eg.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.on(Eg.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(Eg.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.on(Eg.FRAG_LOADING,this.onFragLoading,this),t.on(Eg.FRAG_LOADED,this.onFragLoaded,this),t.on(Eg.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.on(Eg.FRAG_DECRYPTED,this.onFragDecrypted,this),t.on(Eg.INIT_PTS_FOUND,this.onInitPtsFound,this),t.on(Eg.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.on(Eg.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:t}=this;t.off(Eg.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(Eg.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.off(Eg.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(Eg.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(Eg.FRAG_LOADING,this.onFragLoading,this),t.off(Eg.FRAG_LOADED,this.onFragLoaded,this),t.off(Eg.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(Eg.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(Eg.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(Eg.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(Eg.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){const t=new nw(this,"textTrack1"),e=new nw(this,"textTrack2"),s=new nw(this,"textTrack3"),i=new nw(this,"textTrack4");this.cea608Parser1=new sw(1,t,e),this.cea608Parser2=new sw(3,s,i)}}addCues(t,e,s,i,r){let n=!1;for(let t=r.length;t--;){const i=r[t],l=(o=i[0],a=i[1],h=e,c=s,Math.min(a,c)-Math.max(o,h));if(l>=0&&(i[0]=Math.min(i[0],e),i[1]=Math.max(i[1],s),n=!0,l/(s-e)>.5))return}var o,a,h,c;if(n||r.push([e,s]),this.config.renderTextTracksNatively){const r=this.captionsTracks[t];this.Cues.newCue(r,e,s,i)}else{const r=this.Cues.newCue(null,e,s,i);this.hls.trigger(Eg.CUES_PARSED,{type:"captions",cues:r,track:t})}}onInitPtsFound(t,{frag:e,id:s,initPTS:i,timescale:r}){const{unparsedVttFrags:n}=this;"main"===s&&(this.initPTS[e.cc]={baseTime:i,timescale:r}),n.length&&(this.unparsedVttFrags=[],n.forEach((t=>{this.onFragLoaded(Eg.FRAG_LOADED,t)})))}getExistingTrack(t,e){const{media:s}=this;if(s)for(let i=0;i{Uy(t[e]),delete t[e]})),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:t}=this;if(!t)return;const e=t.textTracks;if(e)for(let t=0;tt.textCodec===Sw));if(this.config.enableWebVTT||i&&this.config.enableIMSC1){if(PS(this.tracks,s))return void(this.tracks=s);if(this.textTracks=[],this.tracks=s,this.config.renderTextTracksNatively){const t=this.media,e=t?jy(t.textTracks):null;if(this.tracks.forEach(((t,s)=>{let i;if(e){let s=null;for(let i=0;inull!==t)).map((t=>t.label));t.length&&Dg.warn(`Media element contains unused subtitle tracks: ${t.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const t=this.tracks.map((t=>({label:t.name,kind:t.type.toLowerCase(),default:t.default,subtitleTrack:t})));this.hls.trigger(Eg.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:t})}}}onManifestLoaded(t,e){this.config.enableCEA708Captions&&e.captions&&e.captions.forEach((t=>{const e=/(?:CC|SERVICE)([1-4])/.exec(t.instreamId);if(!e)return;const s=`textTrack${e[1]}`,i=this.captionsProperties[s];i&&(i.label=t.name,t.lang&&(i.languageCode=t.lang),i.media=t)}))}closedCaptionsForLevel(t){const e=this.hls.levels[t.level];return null==e?void 0:e.attrs["CLOSED-CAPTIONS"]}onFragLoading(t,e){if(this.enabled&&e.frag.type===Dy){var s,i;const{cea608Parser1:t,cea608Parser2:r,lastSn:n}=this,{cc:o,sn:a}=e.frag,h=null!=(s=null==(i=e.part)?void 0:i.index)?s:-1;t&&r&&(a!==n+1||a===n&&h!==this.lastPartIndex+1||o!==this.lastCc)&&(t.reset(),r.reset()),this.lastCc=o,this.lastSn=a,this.lastPartIndex=h}}onFragLoaded(t,e){const{frag:s,payload:i}=e;if(s.type===xy)if(i.byteLength){const t=s.decryptdata,r="stats"in e;if(null==t||!t.encrypted||r){const t=this.tracks[s.level],r=this.vttCCs;r[s.cc]||(r[s.cc]={start:s.start,prevCC:this.prevCC,new:!0},this.prevCC=s.cc),t&&t.textCodec===Sw?this._parseIMSC1(s,i):this._parseVTTs(e)}}else this.hls.trigger(Eg.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:new Error("Empty subtitle payload")})}_parseIMSC1(t,e){const s=this.hls;Tw(e,this.initPTS[t.cc],(e=>{this._appendCues(e,t.level),s.trigger(Eg.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})}),(e=>{Dg.log(`Failed to parse IMSC1: ${e}`),s.trigger(Eg.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:e})}))}_parseVTTs(t){var e;const{frag:s,payload:i}=t,{initPTS:r,unparsedVttFrags:n}=this,o=r.length-1;if(!r[s.cc]&&-1===o)return void n.push(t);const a=this.hls;vw(null!=(e=s.initSegment)&&e.data?zA(s.initSegment.data,new Uint8Array(i)):i,this.initPTS[s.cc],this.vttCCs,s.cc,s.start,(t=>{this._appendCues(t,s.level),a.trigger(Eg.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})}),(e=>{const r="Missing initPTS for VTT MPEGTS"===e.message;r?n.push(t):this._fallbackToIMSC1(s,i),Dg.log(`Failed to parse VTT cue: ${e}`),r&&o>s.cc||a.trigger(Eg.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:e})}))}_fallbackToIMSC1(t,e){const s=this.tracks[t.level];s.textCodec||Tw(e,this.initPTS[t.cc],(()=>{s.textCodec=Sw,this._parseIMSC1(t,e)}),(()=>{s.textCodec="wvtt"}))}_appendCues(t,e){const s=this.hls;if(this.config.renderTextTracksNatively){const s=this.textTracks[e];if(!s||"disabled"===s.mode)return;t.forEach((t=>Oy(s,t)))}else{const i=this.tracks[e];if(!i)return;const r=i.default?"default":"subtitles"+e;s.trigger(Eg.CUES_PARSED,{type:"subtitles",cues:t,track:r})}}onFragDecrypted(t,e){const{frag:s}=e;s.type===xy&&this.onFragLoaded(Eg.FRAG_LOADED,e)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(t,e){this.initCea608Parsers();const{cea608Parser1:s,cea608Parser2:i}=this;if(!this.enabled||!s||!i)return;const{frag:r,samples:n}=e;if(r.type!==Dy||"NONE"!==this.closedCaptionsForLevel(r))for(let t=0;tNy(t[i],e,s)))}if(this.config.renderTextTracksNatively&&0===e&&void 0!==i){const{textTracks:t}=this;Object.keys(t).forEach((s=>Ny(t[s],e,i)))}}}extractCea608Data(t){const e=[[],[]],s=31&t[0];let i=2;for(let r=0;r0&&-1===t?(this.log(`Override startPosition with lastCurrentTime @${e.toFixed(3)}`),t=e,this.state=mv):(this.loadedmetadata=!1,this.state=bv),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}doTick(){switch(this.state){case mv:this.doTickIdle();break;case bv:{var t;const{levels:e,trackId:s}=this,i=null==e||null==(t=e[s])?void 0:t.details;if(i){if(this.waitForCdnTuneIn(i))break;this.state=Iv}break}case yv:{var e;const t=performance.now(),s=this.retryDate;if(!s||t>=s||null!=(e=this.media)&&e.seeking){const{levels:t,trackId:e}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((null==t?void 0:t[e])||null),this.state=mv}break}case Iv:{const t=this.waitingData;if(t){const{frag:e,part:s,cache:i,complete:r}=t;if(void 0!==this.initPTS[e.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=Av;const t={frag:e,part:s,payload:i.flush(),networkDetails:null};this._handleFragmentLoadProgress(t),r&&super._handleFragmentLoadComplete(t)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${e.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const t=this.getLoadPosition(),s=Xb.bufferInfo(this.mediaBuffer,t,this.config.maxBufferHole);Sb(s.end,this.config.maxFragLookUpTolerance,e)<0&&(this.log(`Waiting fragment cc (${e.cc}) @ ${e.start} cancelled because another fragment at ${s.end} is needed`),this.clearWaitingFragment())}}else this.state=mv}}this.onTickEnd()}clearWaitingFragment(){const t=this.waitingData;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=mv)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:t}=this;null!=t&&t.readyState&&(this.lastCurrentTime=t.currentTime)}doTickIdle(){const{hls:t,levels:e,media:s,trackId:i}=this,r=t.config;if(!s&&(this.startFragRequested||!r.startFragPrefetch)||null==e||!e[i])return;const n=e[i],o=n.details;if(!o||o.live&&this.levelLastLoaded!==n||this.waitForCdnTuneIn(o))return void(this.state=bv);const a=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&a&&(this.bufferFlushed=!1,this.afterBufferFlushed(a,Og,Ly));const h=this.getFwdBufferInfo(a,Ly);if(null===h)return;const{bufferedTrack:c,switchingTrack:l}=this;if(!l&&this._streamEnded(h,o))return t.trigger(Eg.BUFFER_EOS,{type:"audio"}),void(this.state=wv);const d=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,Dy),u=h.len,p=this.getMaxBufferLength(null==d?void 0:d.len),f=o.fragments,m=f[0].start;let g=this.flushing?this.getLoadPosition():h.end;if(l&&s){const t=this.getLoadPosition();c&&!BS(l.attrs,c.attrs)&&(g=t),o.PTSKnown&&tm||h.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),s.currentTime=m+.05)}if(u>=p&&!l&&gd.end+o.targetduration;if(b||(null==d||!d.len)&&h.len){const t=this.getAppendedFrag(A.start,Dy);if(null===t)return;if(y||(y=!!t.gap||!!b&&0===d.len),b&&!y||y&&h.nextStart&&h.nextStartnew rb(t)))}onAudioTrackSwitching(t,e){const s=!!e.url;this.trackId=e.id;const{fragCurrent:i}=this;i&&(i.abortRequests(),this.removeUnbufferedFrags(i.start)),this.resetLoadingState(),s?this.setInterval(100):this.resetTransmuxer(),s?(this.switchingTrack=e,this.state=mv,this.flushAudioIfNeeded(e)):(this.switchingTrack=null,this.bufferedTrack=e,this.state=fv),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=this.flushing=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(t,e){this.mainDetails=e.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(Eg.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(t,e){var s;if(null==this.mainDetails)return void(this.cachedTrackLoadedData=e);const{levels:i}=this,{details:r,id:n}=e;if(!i)return void this.warn(`Audio tracks were reset while loading level ${n}`);this.log(`Audio track ${n} loaded [${r.startSN},${r.endSN}]${r.lastPartSn?`[part-${r.lastPartSn}-${r.lastPartIndex}]`:""},duration:${r.totalduration}`);const o=i[n];let a=0;if(r.live||null!=(s=o.details)&&s.live){this.checkLiveUpdate(r);const t=this.mainDetails;if(r.deltaUpdateFailed||!t)return;var h;if(!o.details&&r.hasProgramDateTime&&t.hasProgramDateTime)iv(r,t),a=r.fragments[0].start;else a=this.alignPlaylists(r,o.details,null==(h=this.levelLastLoaded)?void 0:h.details)}o.details=r,this.levelLastLoaded=o,this.startFragRequested||!this.mainDetails&&r.live||this.setStartPosition(this.mainDetails||r,a),this.state!==bv||this.waitForCdnTuneIn(r)||(this.state=mv),this.tick()}_handleFragmentLoadProgress(t){var e;const{frag:s,part:i,payload:r}=t,{config:n,trackId:o,levels:a}=this;if(!a)return void this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${s.sn} of level ${s.level} will not be buffered`);const h=a[o];if(!h)return void this.warn("Audio track is undefined on fragment load progress");const c=h.details;if(!c)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(s.start);const l=n.defaultAudioCodec||h.audioCodec||"mp4a.40.2";let d=this.transmuxer;d||(d=this.transmuxer=new xS(this.hls,Ly,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const u=this.initPTS[s.cc],p=null==(e=s.initSegment)?void 0:e.data;if(void 0!==u){const t=!1,e=i?i.index:-1,n=-1!==e,o=new Zb(s.level,s.sn,s.stats.chunkCount,r.byteLength,e,n);d.push(r,p,l,"",s,i,c.totalduration,t,o,u)}else{this.log(`Unknown video PTS for cc ${s.cc}, waiting for video PTS before demuxing audio frag ${s.sn} of [${c.startSN} ,${c.endSN}],track ${o}`);const{cache:t}=this.waitingData=this.waitingData||{frag:s,part:i,cache:new _v,complete:!1};t.push(new Uint8Array(r)),this.waitingVideoCC=this.videoTrackCC,this.state=Iv}}_handleFragmentLoadComplete(t){this.waitingData?this.waitingData.complete=!0:super._handleFragmentLoadComplete(t)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(t,e){const s=e.tracks.audio;s&&(this.mediaBuffer=s.buffer||null),e.tracks.video&&(this.videoBuffer=e.tracks.video.buffer||null)}onFragBuffered(t,e){const{frag:s,part:i}=e;if(s.type===Ly)if(this.fragContextChanged(s))this.warn(`Fragment ${s.sn}${i?" p: "+i.index:""} of level ${s.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);else{if("initSegment"!==s.sn){this.fragPrevious=s;const t=this.switchingTrack;t&&(this.bufferedTrack=t,this.switchingTrack=null,this.hls.trigger(Eg.AUDIO_TRACK_SWITCHED,gg({},t)))}this.fragBufferedComplete(s,i)}else if(!this.loadedmetadata&&s.type===Dy){const t=this.videoBuffer||this.media;if(t){Xb.getBuffered(t).length&&(this.loadedmetadata=!0)}}}onError(t,e){var s;if(e.fatal)this.state=Ev;else switch(e.details){case Tg.FRAG_GAP:case Tg.FRAG_PARSING_ERROR:case Tg.FRAG_DECRYPT_ERROR:case Tg.FRAG_LOAD_ERROR:case Tg.FRAG_LOAD_TIMEOUT:case Tg.KEY_LOAD_ERROR:case Tg.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Ly,e);break;case Tg.AUDIO_TRACK_LOAD_ERROR:case Tg.AUDIO_TRACK_LOAD_TIMEOUT:case Tg.LEVEL_PARSING_ERROR:e.levelRetry||this.state!==bv||(null==(s=e.context)?void 0:s.type)!==Cy||(this.state=mv);break;case Tg.BUFFER_APPEND_ERROR:case Tg.BUFFER_FULL_ERROR:if(!e.parent||"audio"!==e.parent)return;if(e.details===Tg.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(e)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case Tg.INTERNAL_EXCEPTION:this.recoverWorkerError(e)}}onBufferFlushing(t,{type:e}){e!==Ug&&(this.flushing=!0)}onBufferFlushed(t,{type:e}){if(e!==Ug){this.flushing=!1,this.bufferFlushed=!0,this.state===wv&&(this.state=mv);const t=this.mediaBuffer||this.media;t&&(this.afterBufferFlushed(t,e,Ly),this.tick())}}_handleTransmuxComplete(t){var e;const s="audio",{hls:i}=this,{remuxResult:r,chunkMeta:n}=t,o=this.getCurrentContext(n);if(!o)return void this.resetWhenMissingContext(n);const{frag:a,part:h,level:c}=o,{details:l}=c,{audio:d,text:u,id3:p,initSegment:f}=r;if(!this.fragContextChanged(a)&&l){if(this.state=vv,this.switchingTrack&&d&&this.completeAudioSwitch(this.switchingTrack),null!=f&&f.tracks){const t=a.initSegment||a;this._bufferInitSegment(c,f.tracks,t,n),i.trigger(Eg.FRAG_PARSING_INIT_SEGMENT,{frag:t,id:s,tracks:f.tracks})}if(d){const{startPTS:t,endPTS:e,startDTS:s,endDTS:i}=d;h&&(h.elementaryStreams[Og]={startPTS:t,endPTS:e,startDTS:s,endDTS:i}),a.setElementaryStreamInfo(Og,t,e,s,i),this.bufferFragmentData(d,a,h,n)}if(null!=p&&null!=(e=p.samples)&&e.length){const t=bg({id:s,frag:a,details:l},p);i.trigger(Eg.FRAG_PARSING_METADATA,t)}if(u){const t=bg({id:s,frag:a,details:l},u);i.trigger(Eg.FRAG_PARSING_USERDATA,t)}}else this.fragmentTracker.removeFragment(a)}_bufferInitSegment(t,e,s,i){if(this.state!==vv)return;e.video&&delete e.video;const r=e.audio;if(!r)return;r.id="audio";const n=t.audioCodec;this.log(`Init audio buffer, container:${r.container}, codecs[level/parsed]=[${n}/${r.codec}]`),n&&1===n.split(",").length&&(r.levelCodec=n),this.hls.trigger(Eg.BUFFER_CODECS,e);const o=r.initSegment;if(null!=o&&o.byteLength){const t={type:"audio",frag:s,part:null,chunkMeta:i,parent:s.type,data:o};this.hls.trigger(Eg.BUFFER_APPENDING,t)}this.tickImmediate()}loadFragment(t,e,s){const i=this.fragmentTracker.getState(t);var r;if(this.fragCurrent=t,this.switchingTrack||i===Gb||i===Hb)if("initSegment"===t.sn)this._loadInitSegment(t,e);else if(null!=(r=e.details)&&r.live&&!this.initPTS[t.cc]){this.log(`Waiting for video PTS in continuity counter ${t.cc} of live stream before loading audio fragment ${t.sn} of level ${this.trackId}`),this.state=Iv;const s=this.mainDetails;s&&s.fragments[0].start!==e.details.fragments[0].start&&iv(e.details,s)}else this.startFragRequested=!0,super.loadFragment(t,e,s);else this.clearTrackerIfNeeded(t)}flushAudioIfNeeded(t){const{media:e,bufferedTrack:s}=this,i=null==s?void 0:s.attrs,r=t.attrs;e&&i&&(i.CHANNELS!==r.CHANNELS||s.name!==t.name||s.lang!==t.lang)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)}completeAudioSwitch(t){const{hls:e}=this;this.flushAudioIfNeeded(t),this.bufferedTrack=t,this.switchingTrack=null,e.trigger(Eg.AUDIO_TRACK_SWITCHED,gg({},t))}},audioTrackController:class extends Db{constructor(t){super(t,"[audio-track-controller]"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:t}=this;t.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.on(Eg.MANIFEST_PARSED,this.onManifestParsed,this),t.on(Eg.LEVEL_LOADING,this.onLevelLoading,this),t.on(Eg.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(Eg.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.on(Eg.ERROR,this.onError,this)}unregisterListeners(){const{hls:t}=this;t.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.off(Eg.MANIFEST_PARSED,this.onManifestParsed,this),t.off(Eg.LEVEL_LOADING,this.onLevelLoading,this),t.off(Eg.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(Eg.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),t.off(Eg.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(t,e){this.tracks=e.audioTracks||[]}onAudioTrackLoaded(t,e){const{id:s,groupId:i,details:r}=e,n=this.tracksInGroup[s];if(!n||n.groupId!==i)return void this.warn(`Audio track with id:${s} and group:${i} not found in active group ${null==n?void 0:n.groupId}`);const o=n.details;n.details=e.details,this.log(`Audio track ${s} "${n.name}" lang:${n.lang} group:${i} loaded [${r.startSN}-${r.endSN}]`),s===this.trackId&&this.playlistLoaded(s,e,o)}onLevelLoading(t,e){this.switchLevel(e.level)}onLevelSwitching(t,e){this.switchLevel(e.level)}switchLevel(t){const e=this.hls.levels[t];if(!e)return;const s=e.audioGroups||null,i=this.groupIds;let r=this.currentTrack;if(!s||(null==i?void 0:i.length)!==(null==s?void 0:s.length)||null!=s&&s.some((t=>-1===(null==i?void 0:i.indexOf(t))))){this.groupIds=s,this.trackId=-1,this.currentTrack=null;const t=this.tracks.filter((t=>!s||-1!==s.indexOf(t.groupId)));if(t.length)this.selectDefaultTrack&&!t.some((t=>t.default))&&(this.selectDefaultTrack=!1),t.forEach(((t,e)=>{t.id=e}));else if(!r&&!this.tracksInGroup.length)return;this.tracksInGroup=t;const e=this.hls.config.audioPreference;if(!r&&e){const s=Nb(e,t,Vb);if(s>-1)r=t[s];else{const t=Nb(e,this.tracks);r=this.tracks[t]}}let i=this.findTrackId(r);-1===i&&r&&(i=this.findTrackId(null));const o={audioTracks:t};this.log(`Updating audio tracks, ${t.length} track(s) found in group(s): ${null==s?void 0:s.join(",")}`),this.hls.trigger(Eg.AUDIO_TRACKS_UPDATED,o);const a=this.trackId;if(-1!==i&&-1===a)this.setAudioTrack(i);else if(t.length&&-1===a){var n;const e=new Error(`No audio track selected for current audio group-ID(s): ${null==(n=this.groupIds)?void 0:n.join(",")} track count: ${t.length}`);this.warn(e.message),this.hls.trigger(Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:e})}}else this.shouldReloadPlaylist(r)&&this.setAudioTrack(this.trackId)}onError(t,e){!e.fatal&&e.context&&(e.context.type!==Cy||e.context.id!==this.trackId||this.groupIds&&-1===this.groupIds.indexOf(e.context.groupId)||(this.requestScheduled=-1,this.checkRetry(e)))}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(t){this.selectDefaultTrack=!1,this.setAudioTrack(t)}setAudioOption(t){const e=this.hls;if(e.config.audioPreference=t,t){const s=this.allAudioTracks;if(this.selectDefaultTrack=!1,s.length){const i=this.currentTrack;if(i&&jb(t,i,Vb))return i;const r=Nb(t,this.tracksInGroup,Vb);if(r>-1){const t=this.tracksInGroup[r];return this.setAudioTrack(r),t}if(i){let i=e.loadLevel;-1===i&&(i=e.firstAutoLevel);const r=function(t,e,s,i,r){const n=e[i],o=e.reduce(((t,e,s)=>{const i=e.uri;return(t[i]||(t[i]=[])).push(s),t}),{})[n.uri];o.length>1&&(i=Math.max.apply(Math,o));const a=n.videoRange,h=n.frameRate,c=n.codecSet.substring(0,4),l=zb(e,i,(e=>{if(e.videoRange!==a||e.frameRate!==h||e.codecSet.substring(0,4)!==c)return!1;const i=e.audioGroups,n=s.filter((t=>!i||-1!==i.indexOf(t.groupId)));return Nb(t,n,r)>-1}));return l>-1?l:zb(e,i,(e=>{const i=e.audioGroups,n=s.filter((t=>!i||-1!==i.indexOf(t.groupId)));return Nb(t,n,r)>-1}))}(t,e.levels,s,i,Vb);if(-1===r)return null;e.nextLoadLevel=r}if(t.channels||t.audioCodec){const e=Nb(t,s);if(e>-1)return s[e]}}}return null}setAudioTrack(t){const e=this.tracksInGroup;if(t<0||t>=e.length)return void this.warn(`Invalid audio track id: ${t}`);this.clearTimer(),this.selectDefaultTrack=!1;const s=this.currentTrack,i=e[t],r=i.details&&!i.details.live;if(t===this.trackId&&i===s&&r)return;if(this.log(`Switching to audio-track ${t} "${i.name}" lang:${i.lang} group:${i.groupId} channels:${i.channels}`),this.trackId=t,this.currentTrack=i,this.hls.trigger(Eg.AUDIO_TRACK_SWITCHING,gg({},i)),r)return;const n=this.switchParams(i.url,null==s?void 0:s.details,i.details);this.loadPlaylist(n)}findTrackId(t){const e=this.tracksInGroup;for(let s=0;s{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=t=>{try{this.apply(t,{ot:Uw.MANIFEST,su:!this.initialized})}catch(t){Dg.warn("Could not generate manifest CMCD data.",t)}},this.applyFragmentData=t=>{try{const e=t.frag,s=this.hls.levels[e.level],i=this.getObjectType(e),r={d:1e3*e.duration,ot:i};i!==Uw.VIDEO&&i!==Uw.AUDIO&&i!=Uw.MUXED||(r.br=s.bitrate/1e3,r.tb=this.getTopBandwidth(i)/1e3,r.bl=this.getBufferLength(i)),this.apply(t,r)}catch(t){Dg.warn("Could not generate segment CMCD data.",t)}},this.hls=t;const e=this.config=t.config,{cmcd:s}=e;null!=s&&(e.pLoader=this.createPlaylistLoader(),e.fLoader=this.createFragmentLoader(),this.sid=s.sessionId||function(){try{return crypto.randomUUID()}catch(t){try{const t=URL.createObjectURL(new Blob),e=t.toString();return URL.revokeObjectURL(t),e.slice(e.lastIndexOf("/")+1)}catch(t){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const s=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?s:3&s|8).toString(16)}))}}}(),this.cid=s.contentId,this.useHeaders=!0===s.useHeaders,this.includeKeys=s.includeKeys,this.registerListeners())}registerListeners(){const t=this.hls;t.on(Eg.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(Eg.MEDIA_DETACHED,this.onMediaDetached,this),t.on(Eg.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const t=this.hls;t.off(Eg.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(Eg.MEDIA_DETACHED,this.onMediaDetached,this),t.off(Eg.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=null}onMediaAttached(t,e){this.media=e.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(t,e){var s,i;this.audioBuffer=null==(s=e.tracks.audio)?void 0:s.buffer,this.videoBuffer=null==(i=e.tracks.video)?void 0:i.buffer}createData(){var t;return{v:1,sf:Nw.HLS,sid:this.sid,cid:this.cid,pr:null==(t=this.media)?void 0:t.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(t,e={}){bg(e,this.createData());const s=e.ot===Uw.INIT||e.ot===Uw.VIDEO||e.ot===Uw.MUXED;this.starved&&s&&(e.bs=!0,e.su=!0,this.starved=!1),null==e.su&&(e.su=this.buffering);const{includeKeys:i}=this;i&&(e=Object.keys(e).reduce(((t,s)=>(i.includes(s)&&(t[s]=e[s]),t)),{})),this.useHeaders?(t.headers||(t.headers={}),cE(t.headers,e)):t.url=dE(t.url,e)}getObjectType(t){const{type:e}=t;return"subtitle"===e?Uw.TIMED_TEXT:"initSegment"===t.sn?Uw.INIT:"audio"===e?Uw.AUDIO:"main"===e?this.hls.audioTracks.length?Uw.VIDEO:Uw.MUXED:void 0}getTopBandwidth(t){let e,s=0;const i=this.hls;if(t===Uw.AUDIO)e=i.audioTracks;else{const t=i.maxAutoLevel,s=t>-1?t+1:i.levels.length;e=i.levels.slice(0,s)}for(const t of e)t.bitrate>s&&(s=t.bitrate);return s>0?s:NaN}getBufferLength(t){const e=this.hls.media,s=t===Uw.AUDIO?this.audioBuffer:this.videoBuffer;if(!s||!e)return NaN;return 1e3*Xb.bufferInfo(s,e.currentTime,this.config.maxBufferHole).len}createPlaylistLoader(){const{pLoader:t}=this.config,e=this.applyPlaylistData,s=t||this.config.loader;return class{constructor(t){this.loader=void 0,this.loader=new s(t)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(t,s,i){e(t),this.loader.load(t,s,i)}}}createFragmentLoader(){const{fLoader:t}=this.config,e=this.applyFragmentData,s=t||this.config.loader;return class{constructor(t){this.loader=void 0,this.loader=new s(t)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(t,s,i){e(t),this.loader.load(t,s,i)}}}},contentSteeringController:class{constructor(t){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=t,this.log=Dg.log.bind(Dg,"[content-steering]:"),this.registerListeners()}registerListeners(){const t=this.hls;t.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.on(Eg.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(Eg.MANIFEST_PARSED,this.onManifestParsed,this),t.on(Eg.ERROR,this.onError,this)}unregisterListeners(){const t=this.hls;t&&(t.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.off(Eg.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(Eg.MANIFEST_PARSED,this.onManifestParsed,this),t.off(Eg.ERROR,this.onError,this))}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const t=1e3*this.timeToLoad-(performance.now()-this.updated);if(t>0)return void this.scheduleRefresh(this.uri,t)}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){-1!==this.reloadTimer&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(t){const e=this.levels;e&&(this.levels=e.filter((e=>e!==t)))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(t,e){const{contentSteering:s}=e;null!==s&&(this.pathwayId=s.pathwayId,this.uri=s.uri,this.started&&this.startLoad())}onManifestParsed(t,e){this.audioTracks=e.audioTracks,this.subtitleTracks=e.subtitleTracks}onError(t,e){const{errorAction:s}=e;if((null==s?void 0:s.action)===Ib&&s.flags===Cb){const t=this.levels;let i=this.pathwayPriority,r=this.pathwayId;if(e.context){const{groupId:s,pathwayId:i,type:n}=e.context;s&&t?r=this.getPathwayForGroupId(s,n,r):i&&(r=i)}r in this.penalizedPathways||(this.penalizedPathways[r]=performance.now()),!i&&t&&(i=t.reduce(((t,e)=>(-1===t.indexOf(e.pathwayId)&&t.push(e.pathwayId),t)),[])),i&&i.length>1&&(this.updatePathwayPriority(i),s.resolved=this.pathwayId!==r),s.resolved||Dg.warn(`Could not resolve ${e.details} ("${e.error.message}") with content-steering for Pathway: ${r} levels: ${t?t.length:t} priorities: ${JSON.stringify(i)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(t){this.levels=t;let e=this.getLevelsForPathway(this.pathwayId);if(0===e.length){const s=t[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${s}"`),e=this.getLevelsForPathway(s),this.pathwayId=s}return e.length!==t.length?(this.log(`Found ${e.length}/${t.length} levels in Pathway "${this.pathwayId}"`),e):t}getLevelsForPathway(t){return null===this.levels?[]:this.levels.filter((e=>t===e.pathwayId))}updatePathwayPriority(t){let e;this.pathwayPriority=t;const s=this.penalizedPathways,i=performance.now();Object.keys(s).forEach((t=>{i-s[t]>3e5&&delete s[t]}));for(let i=0;i0){this.log(`Setting Pathway to "${r}"`),this.pathwayId=r,pb(e),this.hls.trigger(Eg.LEVELS_UPDATED,{levels:e});const t=this.hls.levels[n];o&&t&&this.levels&&(t.attrs["STABLE-VARIANT-ID"]!==o.attrs["STABLE-VARIANT-ID"]&&t.bitrate!==o.bitrate&&this.log(`Unstable Pathways change from bitrate ${o.bitrate} to ${t.bitrate}`),this.hls.nextLoadLevel=n);break}}}getPathwayForGroupId(t,e,s){const i=this.getLevelsForPathway(s).concat(this.levels||[]);for(let s=0;s{const{ID:r,"BASE-ID":n,"URI-REPLACEMENT":o}=t;if(e.some((t=>t.pathwayId===r)))return;const a=this.getLevelsForPathway(n).map((t=>{const e=new Pg(t.attrs);e["PATHWAY-ID"]=r;const n=e.AUDIO&&`${e.AUDIO}_clone_${r}`,a=e.SUBTITLES&&`${e.SUBTITLES}_clone_${r}`;n&&(s[e.AUDIO]=n,e.AUDIO=n),a&&(i[e.SUBTITLES]=a,e.SUBTITLES=a);const h=pE(t.uri,e["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",o),c=new rb({attrs:e,audioCodec:t.audioCodec,bitrate:t.bitrate,height:t.height,name:t.name,url:h,videoCodec:t.videoCodec,width:t.width});if(t.audioGroups)for(let e=1;e{this.log(`Loaded steering manifest: "${i}"`);const n=t.data;if(1!==n.VERSION)return void this.log(`Steering VERSION ${n.VERSION} not supported!`);this.updated=performance.now(),this.timeToLoad=n.TTL;const{"RELOAD-URI":o,"PATHWAY-CLONES":a,"PATHWAY-PRIORITY":h}=n;if(o)try{this.uri=new self.URL(o,i).href}catch(t){return this.enabled=!1,void this.log(`Failed to parse Steering Manifest RELOAD-URI: ${o}`)}this.scheduleRefresh(this.uri||s.url),a&&this.clonePathways(a);const c={steeringManifest:n,url:i.toString()};this.hls.trigger(Eg.STEERING_MANIFEST_LOADED,c),h&&this.updatePathwayPriority(h)},onError:(t,e,s,i)=>{if(this.log(`Error loading steering manifest: ${t.code} ${t.text} (${e.url})`),this.stopLoad(),410===t.code)return this.enabled=!1,void this.log(`Steering manifest ${e.url} no longer available`);let r=1e3*this.timeToLoad;if(429!==t.code)this.scheduleRefresh(this.uri||e.url,r);else{const t=this.loader;if("function"==typeof(null==t?void 0:t.getResponseHeader)){const e=t.getResponseHeader("Retry-After");e&&(r=1e3*parseFloat(e))}this.log(`Steering manifest ${e.url} rate limited`)}},onTimeout:(t,e,s)=>{this.log(`Timeout loading steering manifest (${e.url})`),this.scheduleRefresh(this.uri||e.url)}};this.log(`Requesting steering manifest: ${i}`),this.loader.load(r,a,h)}scheduleRefresh(t,e=1e3*this.timeToLoad){this.clearTimeout(),this.reloadTimer=self.setTimeout((()=>{var e;const s=null==(e=this.hls)?void 0:e.media;!s||s.ended?this.scheduleRefresh(t,1e3*this.timeToLoad):this.loadSteeringManifest(t)}),e)}}});function EE(t){return t&&"object"==typeof t?Array.isArray(t)?t.map(EE):Object.keys(t).reduce(((e,s)=>(e[s]=EE(t[s]),e)),{}):t}function IE(t){const e=t.loader;if(e!==AE&&e!==mE)Dg.log("[config]: Custom loader detected, cannot enable progressive streaming"),t.progressive=!1;else{(function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1})()&&(t.loader=AE,t.progressive=!0,t.enableSoftwareAES=!0,Dg.log("[config]: Progressive streaming enabled, using FetchLoader"))}}let TE;class kE extends Db{constructor(t,e){super(t,"[level-controller]"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=e,this._registerListeners()}_registerListeners(){const{hls:t}=this;t.on(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.on(Eg.MANIFEST_LOADED,this.onManifestLoaded,this),t.on(Eg.LEVEL_LOADED,this.onLevelLoaded,this),t.on(Eg.LEVELS_UPDATED,this.onLevelsUpdated,this),t.on(Eg.FRAG_BUFFERED,this.onFragBuffered,this),t.on(Eg.ERROR,this.onError,this)}_unregisterListeners(){const{hls:t}=this;t.off(Eg.MANIFEST_LOADING,this.onManifestLoading,this),t.off(Eg.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(Eg.LEVEL_LOADED,this.onLevelLoaded,this),t.off(Eg.LEVELS_UPDATED,this.onLevelsUpdated,this),t.off(Eg.FRAG_BUFFERED,this.onFragBuffered,this),t.off(Eg.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach((t=>{t.loadError=0,t.fragmentError=0})),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(t,e){this.resetLevels()}onManifestLoaded(t,e){const s=this.hls.config.preferManagedMediaSource,i=[],r={},n={};let o=!1,a=!1,h=!1;e.levels.forEach((t=>{var e,c;const l=t.attrs;let{audioCodec:d,videoCodec:u}=t;-1!==(null==(e=d)?void 0:e.indexOf("mp4a.40.34"))&&(TE||(TE=/chrome|firefox/i.test(navigator.userAgent)),TE&&(t.audioCodec=d=void 0)),d&&(t.audioCodec=d=dy(d,s)),0===(null==(c=u)?void 0:c.indexOf("avc1"))&&(u=t.videoCodec=function(t){const e=t.split(",");for(let t=0;t2){let i=s.shift()+".";i+=parseInt(s.shift()).toString(16),i+=("000"+parseInt(s.shift()).toString(16)).slice(-4),e[t]=i}}return e.join(",")}(u));const{width:p,height:f,unknownCodecs:m}=t;if(o||(o=!(!p||!f)),a||(a=!!u),h||(h=!!d),null!=m&&m.length||d&&!ry(d,"audio",s)||u&&!ry(u,"video",s))return;const{CODECS:g,"FRAME-RATE":A,"HDCP-LEVEL":y,"PATHWAY-ID":b,RESOLUTION:v,"VIDEO-RANGE":S}=l,w=`${`${b||"."}-`}${t.bitrate}-${v}-${A}-${g}-${S}-${y}`;if(r[w])if(r[w].uri===t.url||t.attrs["PATHWAY-ID"])r[w].addGroupId("audio",l.AUDIO),r[w].addGroupId("text",l.SUBTITLES);else{const e=n[w]+=1;t.attrs["PATHWAY-ID"]=new Array(e+1).join(".");const s=new rb(t);r[w]=s,i.push(s)}else{const e=new rb(t);r[w]=e,n[w]=1,i.push(e)}})),this.filterAndSortMediaOptions(i,e,o,a,h)}filterAndSortMediaOptions(t,e,s,i,r){let n=[],o=[],a=t;if((s||i)&&r&&(a=a.filter((({videoCodec:t,videoRange:e,width:s,height:i})=>{return(!!t||!(!s||!i))&&(!!(r=e)&&Zy.indexOf(r)>-1);var r}))),0===a.length)return void Promise.resolve().then((()=>{if(this.hls){e.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(e.levels[0].attrs)}`);const t=new Error("no level with compatible codecs found in manifest");this.hls.trigger(Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:e.url,error:t,reason:t.message})}}));if(e.audioTracks){const{preferManagedMediaSource:t}=this.hls.config;n=e.audioTracks.filter((e=>!e.audioCodec||ry(e.audioCodec,"audio",t))),_E(n)}e.subtitles&&(o=e.subtitles,_E(o));const h=a.slice(0);a.sort(((t,e)=>{if(t.attrs["HDCP-LEVEL"]!==e.attrs["HDCP-LEVEL"])return(t.attrs["HDCP-LEVEL"]||"")>(e.attrs["HDCP-LEVEL"]||"")?1:-1;if(s&&t.height!==e.height)return t.height-e.height;if(t.frameRate!==e.frameRate)return t.frameRate-e.frameRate;if(t.videoRange!==e.videoRange)return Zy.indexOf(t.videoRange)-Zy.indexOf(e.videoRange);if(t.videoCodec!==e.videoCodec){const s=ay(t.videoCodec),i=ay(e.videoCodec);if(s!==i)return i-s}if(t.uri===e.uri&&t.codecSet!==e.codecSet){const s=hy(t.codecSet),i=hy(e.codecSet);if(s!==i)return i-s}return t.averageBitrate!==e.averageBitrate?t.averageBitrate-e.averageBitrate:0}));let c=h[0];if(this.steering&&(a=this.steering.filterParsedLevels(a),a.length!==h.length))for(let t=0;ts&&s===wE.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=t)}break}const d=r&&!i,u={levels:a,audioTracks:n,subtitleTracks:o,sessionData:e.sessionData,sessionKeys:e.sessionKeys,firstLevel:this._firstLevel,stats:e.stats,audio:r,video:i,altAudio:!d&&n.some((t=>!!t.url))};this.hls.trigger(Eg.MANIFEST_PARSED,u),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return 0===this._levels.length?null:this._levels}get level(){return this.currentLevelIndex}set level(t){const e=this._levels;if(0===e.length)return;if(t<0||t>=e.length){const s=new Error("invalid level idx"),i=t<0;if(this.hls.trigger(Eg.ERROR,{type:Ig.OTHER_ERROR,details:Tg.LEVEL_SWITCH_ERROR,level:t,fatal:i,error:s,reason:s.message}),i)return;t=Math.min(t,e.length-1)}const s=this.currentLevelIndex,i=this.currentLevel,r=i?i.attrs["PATHWAY-ID"]:void 0,n=e[t],o=n.attrs["PATHWAY-ID"];if(this.currentLevelIndex=t,this.currentLevel=n,s===t&&n.details&&i&&r===o)return;this.log(`Switching to level ${t} (${n.height?n.height+"p ":""}${n.videoRange?n.videoRange+" ":""}${n.codecSet?n.codecSet+" ":""}@${n.bitrate})${o?" with Pathway "+o:""} from level ${s}${r?" with Pathway "+r:""}`);const a={level:t,attrs:n.attrs,details:n.details,bitrate:n.bitrate,averageBitrate:n.averageBitrate,maxBitrate:n.maxBitrate,realBitrate:n.realBitrate,width:n.width,height:n.height,codecSet:n.codecSet,audioCodec:n.audioCodec,videoCodec:n.videoCodec,audioGroups:n.audioGroups,subtitleGroups:n.subtitleGroups,loaded:n.loaded,loadError:n.loadError,fragmentError:n.fragmentError,name:n.name,id:n.id,uri:n.uri,url:n.url,urlId:0,audioGroupIds:n.audioGroupIds,textGroupIds:n.textGroupIds};this.hls.trigger(Eg.LEVEL_SWITCHING,a);const h=n.details;if(!h||h.live){const t=this.switchParams(n.uri,null==i?void 0:i.details,h);this.loadPlaylist(t)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}get firstLevel(){return this._firstLevel}set firstLevel(t){this._firstLevel=t}get startLevel(){if(void 0===this._startLevel){const t=this.hls.config.startLevel;return void 0!==t?t:this.hls.firstAutoLevel}return this._startLevel}set startLevel(t){this._startLevel=t}onError(t,e){!e.fatal&&e.context&&e.context.type===_y&&e.context.level===this.level&&this.checkRetry(e)}onFragBuffered(t,{frag:e}){if(void 0!==e&&e.type===Dy){const t=e.elementaryStreams;if(!Object.keys(t).some((e=>!!t[e])))return;const s=this._levels[e.level];null!=s&&s.loadError&&(this.log(`Resetting level error count of ${s.loadError} on frag buffered`),s.loadError=0)}}onLevelLoaded(t,e){var s;const{level:i,details:r}=e,n=this._levels[i];var o;if(!n)return this.warn(`Invalid level index ${i}`),void(null!=(o=e.deliveryDirectives)&&o.skip&&(r.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===n.fragmentError&&(n.loadError=0),this.playlistLoaded(i,e,n.details)):null!=(s=e.deliveryDirectives)&&s.skip&&(r.deltaUpdateFailed=!0)}loadPlaylist(t){super.loadPlaylist();const e=this.currentLevelIndex,s=this.currentLevel;if(s&&this.shouldLoadPlaylist(s)){let i=s.uri;if(t)try{i=t.addDirectives(i)}catch(t){this.warn(`Could not construct new URL with HLS Delivery Directives: ${t}`)}const r=s.attrs["PATHWAY-ID"];this.log(`Loading level index ${e}${void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:""} with${r?" Pathway "+r:""} ${i}`),this.clearTimer(),this.hls.trigger(Eg.LEVEL_LOADING,{url:i,level:e,pathwayId:s.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}}get nextLoadLevel(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}removeLevel(t){var e;const s=this._levels.filter(((e,s)=>s!==t||(this.steering&&this.steering.removeLevel(e),e===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,e.details&&e.details.fragments.forEach((t=>t.level=-1))),!1)));pb(s),this._levels=s,this.currentLevelIndex>-1&&null!=(e=this.currentLevel)&&e.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(Eg.LEVELS_UPDATED,{levels:s})}onLevelsUpdated(t,{levels:e}){this._levels=e}checkMaxAutoUpdated(){const{autoLevelCapping:t,maxAutoLevel:e,maxHdcpLevel:s}=this.hls;this._maxAutoLevel!==e&&(this._maxAutoLevel=e,this.hls.trigger(Eg.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:t,levels:this.levels,maxAutoLevel:e,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:s}))}}function _E(t){const e={};t.forEach((t=>{const s=t.groupId||"";t.id=e[s]=e[s]||0,e[s]++}))}class CE{constructor(t){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=t}abort(t){for(const s in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[s].loader;if(i){var e;if(t&&t!==(null==(e=i.context)?void 0:e.frag.type))return;i.abort()}}}detach(){for(const t in this.keyUriToKeyInfo){const e=this.keyUriToKeyInfo[t];(e.mediaKeySessionContext||e.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[t]}}destroy(){this.detach();for(const t in this.keyUriToKeyInfo){const e=this.keyUriToKeyInfo[t].loader;e&&e.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(t,e=Tg.KEY_LOAD_ERROR,s,i,r){return new hv({type:Ig.NETWORK_ERROR,details:e,fatal:!1,frag:t,response:r,error:s,networkDetails:i})}loadClear(t,e){if(this.emeController&&this.config.emeEnabled){const{sn:s,cc:i}=t;for(let t=0;t{r.setKeyFormat(t)}));break}}}}load(t){return!t.decryptdata&&t.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(t).then((e=>this.loadInternal(t,e))):this.loadInternal(t)}loadInternal(t,e){var s,i;e&&t.setKeyFormat(e);const r=t.decryptdata;if(!r){const s=new Error(e?`Expected frag.decryptdata to be defined after setting format ${e}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(t,Tg.KEY_LOAD_ERROR,s))}const n=r.uri;if(!n)return Promise.reject(this.createKeyLoadError(t,Tg.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${n}"`)));let o=this.keyUriToKeyInfo[n];if(null!=(s=o)&&s.decryptdata.key)return r.key=o.decryptdata.key,Promise.resolve({frag:t,keyInfo:o});var a;if(null!=(i=o)&&i.keyLoadPromise)switch(null==(a=o.mediaKeySessionContext)?void 0:a.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return o.keyLoadPromise.then((e=>(r.key=e.keyInfo.decryptdata.key,{frag:t,keyInfo:o})))}switch(o=this.keyUriToKeyInfo[n]={decryptdata:r,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},r.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===r.keyFormat?this.loadKeyHTTP(o,t):this.loadKeyEME(o,t);case"AES-128":return this.loadKeyHTTP(o,t);default:return Promise.reject(this.createKeyLoadError(t,Tg.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${r.method}"`)))}}loadKeyEME(t,e){const s={frag:e,keyInfo:t};if(this.emeController&&this.config.emeEnabled){const e=this.emeController.loadKey(s);if(e)return(t.keyLoadPromise=e.then((e=>(t.mediaKeySessionContext=e,s)))).catch((e=>{throw t.keyLoadPromise=null,e}))}return Promise.resolve(s)}loadKeyHTTP(t,e){const s=this.config,i=new(0,s.loader)(s);return e.keyLoader=t.loader=i,t.keyLoadPromise=new Promise(((r,n)=>{const o={keyInfo:t,frag:e,responseType:"arraybuffer",url:t.decryptdata.uri},a=s.keyLoadPolicy.default,h={loadPolicy:a,timeout:a.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},c={onSuccess:(t,e,s,i)=>{const{frag:o,keyInfo:a,url:h}=s;if(!o.decryptdata||a!==this.keyUriToKeyInfo[h])return n(this.createKeyLoadError(o,Tg.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),i));a.decryptdata.key=o.decryptdata.key=new Uint8Array(t.data),o.keyLoader=null,a.loader=null,r({frag:o,keyInfo:a})},onError:(t,s,i,r)=>{this.resetLoader(s),n(this.createKeyLoadError(e,Tg.KEY_LOAD_ERROR,new Error(`HTTP Error ${t.code} loading key ${t.text}`),i,gg({url:o.url,data:void 0},t)))},onTimeout:(t,s,i)=>{this.resetLoader(s),n(this.createKeyLoadError(e,Tg.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),i))},onAbort:(t,s,i)=>{this.resetLoader(s),n(this.createKeyLoadError(e,Tg.INTERNAL_ABORTED,new Error("key loading aborted"),i))}};i.load(o,h,c)}))}resetLoader(t){const{frag:e,keyInfo:s,url:i}=t,r=s.loader;e.keyLoader===r&&(e.keyLoader=null,s.loader=null),delete this.keyUriToKeyInfo[i],r&&r.destroy()}}function RE(){return self.SourceBuffer||self.WebKitSourceBuffer}function DE(){if(!sy())return!1;const t=RE();return!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove}class LE{constructor(t,e,s,i){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=t,this.media=e,this.fragmentTracker=s,this.hls=i}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(t,e){const{config:s,media:i,stalled:r}=this;if(null===i)return;const{currentTime:n,seeking:o}=i,a=this.seeking&&!o,h=!this.seeking&&o;if(this.seeking=o,n!==t){if(this.moved=!0,o||(this.nudgeRetry=0),null!==r){if(this.stallReported){const t=self.performance.now()-r;Dg.warn(`playback not stuck anymore @${n}, after ${Math.round(t)}ms`),this.stallReported=!1}this.stalled=null}return}if(h||a)return void(this.stalled=null);if(i.paused&&!o||i.ended||0===i.playbackRate||!Xb.getBuffered(i).length)return void(this.nudgeRetry=0);const c=Xb.bufferInfo(i,n,0),l=c.nextStart||0;if(o){const t=c.len>2,s=!l||e&&e.start<=n||l-n>2&&!this.fragmentTracker.getPartialFragment(n);if(t||s)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var d;if(!(c.len>0)&&!l)return;const t=Math.max(l,c.start||0)-n,e=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,s=(null==e||null==(d=e.details)?void 0:d.live)?2*e.details.targetduration:2,r=this.fragmentTracker.getPartialFragment(n);if(t>0&&(t<=s||r))return void(i.paused||this._trySkipBufferHole(r))}const u=self.performance.now();if(null===r)return void(this.stalled=u);const p=u-r;if(!o&&p>=250&&(this._reportStall(c),!this.media))return;const f=Xb.bufferInfo(i,n,s.maxBufferHole);this._tryFixBufferStall(f,p)}_tryFixBufferStall(t,e){const{config:s,fragmentTracker:i,media:r}=this;if(null===r)return;const n=r.currentTime,o=i.getPartialFragment(n);if(o){if(this._trySkipBufferHole(o)||!this.media)return}(t.len>s.maxBufferHole||t.nextStart&&t.nextStart-n1e3*s.highBufferWatchdogPeriod&&(Dg.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(t){const{hls:e,media:s,stallReported:i}=this;if(!i&&s){this.stallReported=!0;const i=new Error(`Playback stalling at @${s.currentTime} due to low buffer (${JSON.stringify(t)})`);Dg.warn(i.message),e.trigger(Eg.ERROR,{type:Ig.MEDIA_ERROR,details:Tg.BUFFER_STALLED_ERROR,fatal:!1,error:i,buffer:t.len})}}_trySkipBufferHole(t){const{config:e,hls:s,media:i}=this;if(null===i)return 0;const r=i.currentTime,n=Xb.bufferInfo(i,r,0),o=r0&&n.len<1&&i.readyState<3,c=o-r;if(c>0&&(a||h)){if(c>e.maxBufferHole){const{fragmentTracker:e}=this;let s=!1;if(0===r){const t=e.getAppendedFrag(0,Dy);t&&o1?(t=0,this.bitrateTest=!0):t=s.firstAutoLevel),s.nextLoadLevel=t,this.level=s.loadLevel,this.loadedmetadata=!1}e>0&&-1===t&&(this.log(`Override startPosition with lastCurrentTime @${e.toFixed(3)}`),t=e),this.state=mv,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this._forceStartLoad=!0,this.state=fv}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Tv:{const{levels:t,level:e}=this,s=null==t?void 0:t[e],i=null==s?void 0:s.details;if(i&&(!i.live||this.levelLastLoaded===s)){if(this.waitForCdnTuneIn(i))break;this.state=mv;break}if(this.hls.nextLoadLevel!==this.level){this.state=mv;break}break}case yv:{var t;const e=self.performance.now(),s=this.retryDate;if(!s||e>=s||null!=(t=this.media)&&t.seeking){const{levels:t,level:e}=this,s=null==t?void 0:t[e];this.resetStartWhenNotLoaded(s||null),this.state=mv}}}this.state===mv&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:t,levelLastLoaded:e,levels:s,media:i}=this;if(null===e||!i&&(this.startFragRequested||!t.config.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;const r=t.nextLoadLevel;if(null==s||!s[r])return;const n=s[r],o=this.getMainFwdBufferInfo();if(null===o)return;const a=this.getLevelDetails();if(a&&this._streamEnded(o,a)){const t={};return this.altAudio&&(t.type="video"),this.hls.trigger(Eg.BUFFER_EOS,t),void(this.state=wv)}t.loadLevel!==r&&-1===t.manualLevel&&this.log(`Adapting to level ${r} from level ${this.level}`),this.level=t.nextLoadLevel=r;const h=n.details;if(!h||this.state===Tv||h.live&&this.levelLastLoaded!==n)return this.level=r,void(this.state=Tv);const c=o.len,l=this.getMaxBufferLength(n.maxBitrate);if(c>=l)return;this.backtrackFragment&&this.backtrackFragment.start>o.end&&(this.backtrackFragment=null);const d=this.backtrackFragment?this.backtrackFragment.start:o.end;let u=this.getNextFragment(d,h);if(this.couldBacktrack&&!this.fragPrevious&&u&&"initSegment"!==u.sn&&this.fragmentTracker.getState(u)!==Kb){var p;const t=(null!=(p=this.backtrackFragment)?p:u).sn-h.startSN,e=h.fragments[t-1];e&&u.cc===e.cc&&(u=e,this.fragmentTracker.removeFragment(e))}else this.backtrackFragment&&o.len&&(this.backtrackFragment=null);if(u&&this.isLoopLoading(u,d)){if(!u.gap){const t=this.audioOnly&&!this.altAudio?Og:Ug,e=(t===Ug?this.videoBuffer:this.mediaBuffer)||this.media;e&&this.afterBufferFlushed(e,t,Dy)}u=this.getNextFragmentLoopLoading(u,h,o,Dy,l)}u&&(!u.initSegment||u.initSegment.data||this.bitrateTest||(u=u.initSegment),this.loadFragment(u,n,d))}loadFragment(t,e,s){const i=this.fragmentTracker.getState(t);this.fragCurrent=t,i===Gb||i===Hb?"initSegment"===t.sn?this._loadInitSegment(t,e):this.bitrateTest?(this.log(`Fragment ${t.sn} of level ${t.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(t,e)):(this.startFragRequested=!0,super.loadFragment(t,e,s)):this.clearTrackerIfNeeded(t)}getBufferedFrag(t){return this.fragmentTracker.getBufferedFrag(t,Dy)}followingBufferedFrag(t){return t?this.getBufferedFrag(t.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:t,media:e}=this;if(null!=e&&e.readyState){let s;const i=this.getAppendedFrag(e.currentTime);i&&i.start>1&&this.flushMainBuffer(0,i.start-1);const r=this.getLevelDetails();if(null!=r&&r.live){const t=this.getMainFwdBufferInfo();if(!t||t.len<2*r.targetduration)return}if(!e.paused&&t){const e=t[this.hls.nextLoadLevel],i=this.fragLastKbps;s=i&&this.fragCurrent?this.fragCurrent.duration*e.maxBitrate/(1e3*i)+1:0}else s=0;const n=this.getBufferedFrag(e.currentTime+s);if(n){const t=this.followingBufferedFrag(n);if(t){this.abortCurrentFrag();const e=t.maxStartPTS?t.maxStartPTS:t.start,s=t.duration,i=Math.max(n.end,e+Math.min(Math.max(s-this.config.maxFragLookUpTolerance,s*(this.couldBacktrack?.5:.125)),s*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(i,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const t=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,t&&(t.abortRequests(),this.fragmentTracker.removeFragment(t)),this.state){case gv:case Av:case yv:case vv:case Sv:this.state=mv}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(t,e){super.flushMainBuffer(t,e,this.altAudio?"video":null)}onMediaAttached(t,e){super.onMediaAttached(t,e);const s=e.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),s.addEventListener("playing",this.onvplaying),s.addEventListener("seeked",this.onvseeked),this.gapController=new LE(this.config,s,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:t}=this;t&&this.onvplaying&&this.onvseeked&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const t=this.media,e=t?t.currentTime:null;vg(e)&&this.log(`Media seeked to ${e.toFixed(3)}`);const s=this.getMainFwdBufferInfo();null!==s&&0!==s.len?this.tick():this.warn(`Main forward buffer length on "seeked" event ${s?s.len:"empty"})`)}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(Eg.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(t,e){let s=!1,i=!1;e.levels.forEach((t=>{const e=t.audioCodec;e&&(s=s||-1!==e.indexOf("mp4a.40.2"),i=i||-1!==e.indexOf("mp4a.40.5"))})),this.audioCodecSwitch=s&&i&&!function(){var t;const e=RE();return"function"==typeof(null==e||null==(t=e.prototype)?void 0:t.changeType)}(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=e.levels,this.startFragRequested=!1}onLevelLoading(t,e){const{levels:s}=this;if(!s||this.state!==mv)return;const i=s[e.level];(!i.details||i.details.live&&this.levelLastLoaded!==i||this.waitForCdnTuneIn(i.details))&&(this.state=Tv)}onLevelLoaded(t,e){var s;const{levels:i}=this,r=e.level,n=e.details,o=n.totalduration;if(!i)return void this.warn(`Levels were reset while loading level ${r}`);this.log(`Level ${r} loaded [${n.startSN},${n.endSN}]${n.lastPartSn?`[part-${n.lastPartSn}-${n.lastPartIndex}]`:""}, cc [${n.startCC}, ${n.endCC}] duration:${o}`);const a=i[r],h=this.fragCurrent;!h||this.state!==Av&&this.state!==yv||h.level!==e.level&&h.loader&&this.abortCurrentFrag();let c=0;if(n.live||null!=(s=a.details)&&s.live){var l;if(this.checkLiveUpdate(n),n.deltaUpdateFailed)return;c=this.alignPlaylists(n,a.details,null==(l=this.levelLastLoaded)?void 0:l.details)}if(a.details=n,this.levelLastLoaded=a,this.hls.trigger(Eg.LEVEL_UPDATED,{details:n,level:r}),this.state===Tv){if(this.waitForCdnTuneIn(n))return;this.state=mv}this.startFragRequested?n.live&&this.synchronizeToLiveEdge(n):this.setStartPosition(n,c),this.tick()}_handleFragmentLoadProgress(t){var e;const{frag:s,part:i,payload:r}=t,{levels:n}=this;if(!n)return void this.warn(`Levels were reset while fragment load was in progress. Fragment ${s.sn} of level ${s.level} will not be buffered`);const o=n[s.level],a=o.details;if(!a)return this.warn(`Dropping fragment ${s.sn} of level ${s.level} after level details were reset`),void this.fragmentTracker.removeFragment(s);const h=o.videoCodec,c=a.PTSKnown||!a.live,l=null==(e=s.initSegment)?void 0:e.data,d=this._getAudioCodec(o),u=this.transmuxer=this.transmuxer||new xS(this.hls,Dy,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),p=i?i.index:-1,f=-1!==p,m=new Zb(s.level,s.sn,s.stats.chunkCount,r.byteLength,p,f),g=this.initPTS[s.cc];u.push(r,l,d,h,s,i,a.totalduration,c,m,g)}onAudioTrackSwitching(t,e){const s=this.altAudio;if(!!!e.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const t=this.fragCurrent;t&&(this.log("Switching to main audio track, cancel main fragment load"),t.abortRequests(),this.fragmentTracker.removeFragment(t)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const t=this.hls;s&&(t.trigger(Eg.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),t.trigger(Eg.AUDIO_TRACK_SWITCHED,e)}}onAudioTrackSwitched(t,e){const s=e.id,i=!!this.hls.audioTracks[s].url;if(i){const t=this.videoBuffer;t&&this.mediaBuffer!==t&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=t)}this.altAudio=i,this.tick()}onBufferCreated(t,e){const s=e.tracks;let i,r,n=!1;for(const t in s){const e=s[t];if("main"===e.id){if(r=t,i=e,"video"===t){const e=s[t];e&&(this.videoBuffer=e.buffer)}}else n=!0}n&&i?(this.log(`Alternate track found, use ${r}.buffered to schedule main fragment loading`),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media}onFragBuffered(t,e){const{frag:s,part:i}=e;if(s&&s.type!==Dy)return;if(this.fragContextChanged(s))return this.warn(`Fragment ${s.sn}${i?" p: "+i.index:""} of level ${s.level} finished buffering, but was aborted. state: ${this.state}`),void(this.state===Sv&&(this.state=mv));const r=i?i.stats:s.stats;this.fragLastKbps=Math.round(8*r.total/(r.buffering.end-r.loading.first)),"initSegment"!==s.sn&&(this.fragPrevious=s),this.fragBufferedComplete(s,i)}onError(t,e){var s;if(e.fatal)this.state=Ev;else switch(e.details){case Tg.FRAG_GAP:case Tg.FRAG_PARSING_ERROR:case Tg.FRAG_DECRYPT_ERROR:case Tg.FRAG_LOAD_ERROR:case Tg.FRAG_LOAD_TIMEOUT:case Tg.KEY_LOAD_ERROR:case Tg.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Dy,e);break;case Tg.LEVEL_LOAD_ERROR:case Tg.LEVEL_LOAD_TIMEOUT:case Tg.LEVEL_PARSING_ERROR:e.levelRetry||this.state!==Tv||(null==(s=e.context)?void 0:s.type)!==_y||(this.state=mv);break;case Tg.BUFFER_APPEND_ERROR:case Tg.BUFFER_FULL_ERROR:if(!e.parent||"main"!==e.parent)return;if(e.details===Tg.BUFFER_APPEND_ERROR)return void this.resetLoadingState();this.reduceLengthAndFlushBuffer(e)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case Tg.INTERNAL_EXCEPTION:this.recoverWorkerError(e)}}checkBuffer(){const{media:t,gapController:e}=this;if(t&&e&&t.readyState){if(this.loadedmetadata||!Xb.getBuffered(t).length){const t=this.state!==mv?this.fragCurrent:null;e.poll(this.lastCurrentTime,t)}this.lastCurrentTime=t.currentTime}}onFragLoadEmergencyAborted(){this.state=mv,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(t,{type:e}){if(e!==Og||this.audioOnly&&!this.altAudio){const t=(e===Ug?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(t,e,Dy),this.tick()}}onLevelsUpdated(t,e){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=e.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:t}=this;if(!t)return;const e=t.currentTime;let s=this.startPosition;if(s>=0&&e0&&(r{const{hls:i}=this;if(!s||this.fragContextChanged(t))return;e.fragmentError=0,this.state=mv,this.startFragRequested=!1,this.bitrateTest=!1;const r=t.stats;r.parsing.start=r.parsing.end=r.buffering.start=r.buffering.end=self.performance.now(),i.trigger(Eg.FRAG_LOADED,s),t.bitrateTest=!1}))}_handleTransmuxComplete(t){var e;const s="main",{hls:i}=this,{remuxResult:r,chunkMeta:n}=t,o=this.getCurrentContext(n);if(!o)return void this.resetWhenMissingContext(n);const{frag:a,part:h,level:c}=o,{video:l,text:d,id3:u,initSegment:p}=r,{details:f}=c,m=this.altAudio?void 0:r.audio;if(this.fragContextChanged(a))this.fragmentTracker.removeFragment(a);else{if(this.state=vv,p){if(null!=p&&p.tracks){const t=a.initSegment||a;this._bufferInitSegment(c,p.tracks,t,n),i.trigger(Eg.FRAG_PARSING_INIT_SEGMENT,{frag:t,id:s,tracks:p.tracks})}const t=p.initPTS,e=p.timescale;vg(t)&&(this.initPTS[a.cc]={baseTime:t,timescale:e},i.trigger(Eg.INIT_PTS_FOUND,{frag:a,id:s,initPTS:t,timescale:e}))}if(l&&f&&"initSegment"!==a.sn){const t=f.fragments[a.sn-1-f.startSN],e=a.sn===f.startSN,s=!t||a.cc>t.cc;if(!1!==r.independent){const{startPTS:t,endPTS:i,startDTS:r,endDTS:o}=l;if(h)h.elementaryStreams[l.type]={startPTS:t,endPTS:i,startDTS:r,endDTS:o};else if(l.firstKeyFrame&&l.independent&&1===n.id&&!s&&(this.couldBacktrack=!0),l.dropped&&l.independent){const r=this.getMainFwdBufferInfo(),n=(r?r.end:this.getLoadPosition())+this.config.maxBufferHole,h=l.firstKeyFramePTS?l.firstKeyFramePTS:t;if(!e&&n2&&(a.gap=!0);a.setElementaryStreamInfo(l.type,t,i,r,o),this.backtrackFragment&&(this.backtrackFragment=a),this.bufferFragmentData(l,a,h,n,e||s)}else{if(!e&&!s)return void this.backtrack(a);a.gap=!0}}if(m){const{startPTS:t,endPTS:e,startDTS:s,endDTS:i}=m;h&&(h.elementaryStreams[Og]={startPTS:t,endPTS:e,startDTS:s,endDTS:i}),a.setElementaryStreamInfo(Og,t,e,s,i),this.bufferFragmentData(m,a,h,n)}if(f&&null!=u&&null!=(e=u.samples)&&e.length){const t={id:s,frag:a,details:f,samples:u.samples};i.trigger(Eg.FRAG_PARSING_METADATA,t)}if(f&&d){const t={id:s,frag:a,details:f,samples:d.samples};i.trigger(Eg.FRAG_PARSING_USERDATA,t)}}}_bufferInitSegment(t,e,s,i){if(this.state!==vv)return;this.audioOnly=!!e.audio&&!e.video,this.altAudio&&!this.audioOnly&&delete e.audio;const{audio:r,video:n,audiovideo:o}=e;if(r){let e=t.audioCodec;const s=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){e&&(e=-1!==e.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5");const t=r.metadata;t&&"channelCount"in t&&1!==(t.channelCount||1)&&-1===s.indexOf("firefox")&&(e="mp4a.40.5")}e&&-1!==e.indexOf("mp4a.40.5")&&-1!==s.indexOf("android")&&"audio/mpeg"!==r.container&&(e="mp4a.40.2",this.log(`Android: force audio codec to ${e}`)),t.audioCodec&&t.audioCodec!==e&&this.log(`Swapping manifest audio codec "${t.audioCodec}" for "${e}"`),r.levelCodec=e,r.id="main",this.log(`Init audio buffer, container:${r.container}, codecs[selected/level/parsed]=[${e||""}/${t.audioCodec||""}/${r.codec}]`)}n&&(n.levelCodec=t.videoCodec,n.id="main",this.log(`Init video buffer, container:${n.container}, codecs[level/parsed]=[${t.videoCodec||""}/${n.codec}]`)),o&&this.log(`Init audiovideo buffer, container:${o.container}, codecs[level/parsed]=[${t.codecs}/${o.codec}]`),this.hls.trigger(Eg.BUFFER_CODECS,e),Object.keys(e).forEach((t=>{const r=e[t].initSegment;null!=r&&r.byteLength&&this.hls.trigger(Eg.BUFFER_APPENDING,{type:t,data:r,frag:s,part:null,chunkMeta:i,parent:s.type})})),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,Dy)}backtrack(t){this.couldBacktrack=!0,this.backtrackFragment=t,this.resetTransmuxer(),this.flushBufferGap(t),this.fragmentTracker.removeFragment(t),this.fragPrevious=null,this.nextLoadPosition=t.start,this.state=mv}checkFragmentChanged(){const t=this.media;let e=null;if(t&&t.readyState>1&&!1===t.seeking){const s=t.currentTime;if(Xb.isBuffered(t,s)?e=this.getAppendedFrag(s):Xb.isBuffered(t,s+.1)&&(e=this.getAppendedFrag(s+.1)),e){this.backtrackFragment=null;const t=this.fragPlaying,s=e.level;t&&e.sn===t.sn&&t.level===s||(this.fragPlaying=e,this.hls.trigger(Eg.FRAG_CHANGED,{frag:e}),t&&t.level===s||this.hls.trigger(Eg.LEVEL_SWITCHED,{level:s}))}}}get nextLevel(){const t=this.nextBufferedFrag;return t?t.level:-1}get currentFrag(){const t=this.media;return t?this.fragPlaying||this.getAppendedFrag(t.currentTime):null}get currentProgramDateTime(){const t=this.media;if(t){const e=t.currentTime,s=this.currentFrag;if(s&&vg(e)&&vg(s.programDateTime)){const t=s.programDateTime+1e3*(e-s.start);return new Date(t)}}return null}get currentLevel(){const t=this.currentFrag;return t?t.level:-1}get nextBufferedFrag(){const t=this.currentFrag;return t?this.followingBufferedFrag(t):null}get forceStartLoad(){return this._forceStartLoad}}class PE{static get version(){return"1.5.13"}static isMSESupported(){return DE()}static isSupported(){return function(){if(!DE())return!1;const t=sy();return"function"==typeof(null==t?void 0:t.isTypeSupported)&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some((e=>t.isTypeSupported(oy(e,"video"))))||["mp4a.40.2","fLaC"].some((e=>t.isTypeSupported(oy(e,"audio")))))}()}static getMediaSource(){return sy()}static get Events(){return Eg}static get ErrorTypes(){return Ig}static get ErrorDetails(){return Tg}static get DefaultConfig(){return PE.defaultConfig?PE.defaultConfig:wE}static set DefaultConfig(t){PE.defaultConfig=t}constructor(t={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new LS,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,function(t,e){if("object"==typeof console&&!0===t||"object"==typeof t){Rg(t,"debug","log","info","warn","error");try{Cg.log(`Debug logs enabled for "${e}" in hls.js version 1.5.13`)}catch(t){Cg=_g}}else Cg=_g}(t.debug||!1,"Hls instance");const e=this.config=function(t,e){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==e.liveMaxLatencyDurationCount&&(void 0===e.liveSyncDurationCount||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==e.liveMaxLatencyDuration&&(void 0===e.liveSyncDuration||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const s=EE(t),i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((t=>{const r=`${"level"===t?"playlist":t}LoadPolicy`,n=void 0===e[r],o=[];i.forEach((i=>{const a=`${t}Loading${i}`,h=e[a];if(void 0!==h&&n){o.push(a);const t=s[r].default;switch(e[r]={default:t},i){case"TimeOut":t.maxLoadTimeMs=h,t.maxTimeToFirstByteMs=h;break;case"MaxRetry":t.errorRetry.maxNumRetry=h,t.timeoutRetry.maxNumRetry=h;break;case"RetryDelay":t.errorRetry.retryDelayMs=h,t.timeoutRetry.retryDelayMs=h;break;case"MaxRetryTimeout":t.errorRetry.maxRetryDelayMs=h,t.timeoutRetry.maxRetryDelayMs=h}}})),o.length&&Dg.warn(`hls.js config: "${o.join('", "')}" setting(s) are deprecated, use "${r}": ${JSON.stringify(e[r])}`)})),gg(gg({},s),e)}(PE.DefaultConfig,t);this.userConfig=t,e.progressive&&IE(e);const{abrController:s,bufferController:i,capLevelController:r,errorController:n,fpsController:o}=e,a=new n(this),h=this.abrController=new s(this),c=this.bufferController=new i(this),l=this.capLevelController=new r(this),d=new o(this),u=new My(this),p=new qy(this),f=e.contentSteeringController,m=f?new f(this):null,g=this.levelController=new kE(this,m),A=new Qb(this),y=new CE(this.config),b=this.streamController=new xE(this,A,y);l.setStreamController(b),d.setStreamController(b);const v=[u,g,b];m&&v.splice(1,0,m),this.networkControllers=v;const S=[h,c,l,d,p,A];this.audioTrackController=this.createController(e.audioTrackController,v);const w=e.audioStreamController;w&&v.push(new w(this,A,y)),this.subtitleTrackController=this.createController(e.subtitleTrackController,v);const E=e.subtitleStreamController;E&&v.push(new E(this,A,y)),this.createController(e.timelineController,S),y.emeController=this.emeController=this.createController(e.emeController,S),this.cmcdController=this.createController(e.cmcdController,S),this.latencyController=this.createController(Jy,S),this.coreComponents=S,v.push(a);const I=a.onErrorOut;"function"==typeof I&&this.on(Eg.ERROR,I,a)}createController(t,e){if(t){const s=new t(this);return e&&e.push(s),s}return null}on(t,e,s=this){this._emitter.on(t,e,s)}once(t,e,s=this){this._emitter.once(t,e,s)}removeAllListeners(t){this._emitter.removeAllListeners(t)}off(t,e,s=this,i){this._emitter.off(t,e,s,i)}listeners(t){return this._emitter.listeners(t)}emit(t,e,s){return this._emitter.emit(t,e,s)}trigger(t,e){if(this.config.debug)return this.emit(t,t,e);try{return this.emit(t,t,e)}catch(e){if(Dg.error("An internal error happened while handling event "+t+'. Error message: "'+e.message+'". Here is a stacktrace:',e),!this.triggeringException){this.triggeringException=!0;const s=t===Eg.ERROR;this.trigger(Eg.ERROR,{type:Ig.OTHER_ERROR,details:Tg.INTERNAL_EXCEPTION,fatal:s,event:t,error:e}),this.triggeringException=!1}}return!1}listenerCount(t){return this._emitter.listenerCount(t)}destroy(){Dg.log("destroy"),this.trigger(Eg.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((t=>t.destroy())),this.networkControllers.length=0,this.coreComponents.forEach((t=>t.destroy())),this.coreComponents.length=0;const t=this.config;t.xhrSetup=t.fetchSetup=void 0,this.userConfig=null}attachMedia(t){Dg.log("attachMedia"),this._media=t,this.trigger(Eg.MEDIA_ATTACHING,{media:t})}detachMedia(){Dg.log("detachMedia"),this.trigger(Eg.MEDIA_DETACHING,void 0),this._media=null}loadSource(t){this.stopLoad();const e=this.media,s=this.url,i=this.url=fg.buildAbsoluteURL(self.location.href,t,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,Dg.log(`loadSource:${i}`),e&&s&&(s!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(e)),this.trigger(Eg.MANIFEST_LOADING,{url:t})}startLoad(t=-1){Dg.log(`startLoad(${t})`),this.started=!0,this.networkControllers.forEach((e=>{e.startLoad(t)}))}stopLoad(){Dg.log("stopLoad"),this.started=!1,this.networkControllers.forEach((t=>{t.stopLoad()}))}resumeBuffering(){this.started&&this.networkControllers.forEach((t=>{"fragmentLoader"in t&&t.startLoad(-1)}))}pauseBuffering(){this.networkControllers.forEach((t=>{"fragmentLoader"in t&&t.stopLoad()}))}swapAudioCodec(){Dg.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){Dg.log("recoverMediaError");const t=this._media;this.detachMedia(),t&&this.attachMedia(t)}removeLevel(t){this.levelController.removeLevel(t)}get levels(){const t=this.levelController.levels;return t||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(t){Dg.log(`set currentLevel:${t}`),this.levelController.manualLevel=t,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(t){Dg.log(`set nextLevel:${t}`),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(t){Dg.log(`set loadLevel:${t}`),this.levelController.manualLevel=t}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(t){this.levelController.nextLoadLevel=t}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(t){Dg.log(`set firstLevel:${t}`),this.levelController.firstLevel=t}get startLevel(){const t=this.levelController.startLevel;return-1===t&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:t}set startLevel(t){Dg.log(`set startLevel:${t}`),-1!==t&&(t=Math.max(t,this.minAutoLevel)),this.levelController.startLevel=t}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(t){const e=!!t;e!==this.config.capLevelToPlayerSize&&(e?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=e)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:t}=this.abrController;return t?t.getEstimate():NaN}set bandwidthEstimate(t){this.abrController.resetEstimator(t)}get ttfbEstimate(){const{bwEstimator:t}=this.abrController;return t?t.getEstimateTTFB():NaN}set autoLevelCapping(t){this._autoLevelCapping!==t&&(Dg.log(`set autoLevelCapping:${t}`),this._autoLevelCapping=t,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(t){(function(t){return Xy.indexOf(t)>-1})(t)&&this._maxHdcpLevel!==t&&(this._maxHdcpLevel=t,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return-1===this.levelController.manualLevel}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:t,config:{minAutoBitrate:e}}=this;if(!t)return 0;const s=t.length;for(let i=0;i=e)return i;return 0}get maxAutoLevel(){const{levels:t,autoLevelCapping:e,maxHdcpLevel:s}=this;let i;if(i=-1===e&&null!=t&&t.length?t.length-1:e,s)for(let e=i;e--;){const i=t[e].attrs["HDCP-LEVEL"];if(i&&i<=s)return e}return i}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(t){this.abrController.nextAutoLevel=t}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}setAudioOption(t){var e;return null==(e=this.audioTrackController)?void 0:e.setAudioOption(t)}setSubtitleOption(t){var e;return null==(e=this.subtitleTrackController)||e.setSubtitleOption(t),null}get allAudioTracks(){const t=this.audioTrackController;return t?t.allAudioTracks:[]}get audioTracks(){const t=this.audioTrackController;return t?t.audioTracks:[]}get audioTrack(){const t=this.audioTrackController;return t?t.audioTrack:-1}set audioTrack(t){const e=this.audioTrackController;e&&(e.audioTrack=t)}get allSubtitleTracks(){const t=this.subtitleTrackController;return t?t.allSubtitleTracks:[]}get subtitleTracks(){const t=this.subtitleTrackController;return t?t.subtitleTracks:[]}get subtitleTrack(){const t=this.subtitleTrackController;return t?t.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(t){const e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}get subtitleDisplay(){const t=this.subtitleTrackController;return!!t&&t.subtitleDisplay}set subtitleDisplay(t){const e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(t){this.config.lowLatencyMode=t}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}PE.defaultConfig=void 0;const BE=FE;function ME(){const t=["demuxStart","canVideoPlay","events","900600PaeXBE","BUFFER_APPENDED","BUFFER_APPENDING","pause","fpsInterval","timeUpdate","9PDWSKm","then","MANIFEST_LOADED","metadata","938156iaOCRm","2941602dUhMDG","TAG_NAME","updateVideoInfo","paused","currentTime","Events","11764260tIFLbu","244730ailnXP","timeStamp","_bindEvents","ErrorTypes","_startFpsInterval","eventsDestroy","_stopCanvasRender","player","MEDIA_DETACHED"," to ","MEDIA_ATTACHED","getVideoPlaybackQuality","position","bandwidthEstimate","hlsPrevFrams","play","isInitInfo","video play","MANIFEST_LOADING","totalVideoFrames","_stopFpsInterval","mediaTime","FRAG_PARSING_INIT_SEGMENT","isDestroyedOrClosed","videoFrameCallback","end","muted","channelCount","updateStats","bandwidthEstimateInterval","destroy","audio","_stopBandwidthEstimateInterval","MEDIA_ERROR","FPS_DROP","_initRenderSize","handleRender","hlsFps","BUFFER_FLUSHING","useCanvasRender","BUFFER_FLUSHED","video canplay","kBps","codec","url","initCanvasViewSize","4313024uTAsYz","fatal","video play error ","loadSource"," , try to seek ","7uVTAWa","width","isSupported","tracks","MEDIA_ATTACHING","NETWORK_ERROR","hls","catch","_times","debugLog","style","handlePlayToRenderTimes","video playback Rate change","FRAG_LOADED","HlsDecoder","debugWarn","fatal media error encountered, try to recover","BUFFER_CODECS","length","video","push","_startBandwidthEstimateInterval","1292949AopZsE","_initHls","video is paused and replay error ","ratechange","removeAttribute","FRAG_LOADING","supportVideoFrameCallbackHandle","canplay","canvasRenderInterval","decodeStart","startLoad","bind","forEach","initVideoEvents","video waiting","src","absolute","LEVEL_LOADED","recoverMediaError","checkHlsBufferedDelay","init"," ,currentTime is ","3MLgWIL","render","createElement","h264","height","requestVideoFrameCallback","MANIFEST_PARSED","cancelVideoFrameCallback","_opt","type","$videoElement","videoStart","toFixed","_startCanvasRender","updateAudioInfo","videoFrameCallback() player is destroyed","FPS_DROP_LEVEL_CAPPING","videoWidth","MEDIA_DETACHING"];return(ME=function(){return t})()}function FE(t,e){const s=ME();return(FE=function(t,e){return s[t-=261]})(t,e)}!function(t,e){const s=FE,i=t();for(;;)try{if(275068===parseInt(s(346))/1*(-parseInt(s(386))/2)+-parseInt(s(324))/3+-parseInt(s(378))/4+parseInt(s(368))/5+parseInt(s(379))/6*(parseInt(s(302))/7)+-parseInt(s(297))/8*(parseInt(s(374))/9)+parseInt(s(385))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ME);class OE extends Bi{constructor(t){const e=FE;super(),this[e(393)]=t,this[e(380)]=e(316),t[e(354)],this.canVideoPlay=!1,this[e(356)]=null,this[e(332)]=null,this[e(280)]=null,this[e(372)]=null,this[e(288)]=0,this[e(265)]=0,this[e(267)]=!1,this.eventsDestroy=[],this[e(330)]=null,this[e(393)].isHlsCanVideoPlay()?(this.$videoElement=this[e(393)][e(321)][e(356)],this[e(366)]=!0):PE[e(304)]()?(this[e(356)]=this[e(393)][e(321)].$videoElement,this[e(308)]=new PE({}),this[e(325)](),this[e(388)]()):this[e(393)].debugError(this[e(380)],"init hls error ,not support "),this[e(393)][e(311)](this[e(380)],e(344))}[BE(281)](){return new Promise(((t,e)=>{const s=FE;if(this[s(330)]&&this[s(356)]&&(this[s(356)][s(353)](this[s(330)]),this[s(330)]=null),this[s(308)]&&(this[s(308)][s(281)](),this.hls=null),this.eventsDestroy[s(320)]&&(this.eventsDestroy[s(336)]((t=>t())),this.eventsDestroy=[]),this.isInitInfo=!1,this[s(392)](),this[s(283)](),this._stopFpsInterval(),this[s(393)][s(354)].useCanvasRender&&this[s(356)]){this[s(356)][s(371)]&&(this[s(356)].pause(),this[s(356)][s(277)]=!0),this[s(356)][s(383)]=0,this[s(356)][s(339)]&&(this.$videoElement[s(339)]="",this.$videoElement[s(328)](s(339)));try{this[s(356)].load()}catch(t){}}this[s(356)]=null,this[s(288)]=0,this.player[s(311)](this[s(380)],s(281)),setTimeout((()=>{t()}),0)}))}[BE(343)](){const t=BE,e=this[t(356)];let s=0;const i=e.buffered,r=i[t(320)]?i[t(276)](i[t(320)]-1):0;return s=r-e[t(383)],s<0&&(this[t(393)][t(317)](this[t(380)],"checkHlsBufferedDelay "+s+" < 0, and buffered is "+r+t(345)+e[t(383)]+t(301)+e[t(383)]+t(395)+r),e.currentTime=r,s=0),s}getFps(){return this.hlsFps}[BE(359)](){const t=BE;fi()?this[t(330)]=this[t(356)][t(351)](this[t(275)][t(335)](this)):(this[t(392)](),this.canvasRenderInterval=setInterval((()=>{const e=t;this[e(393)][e(321)].render({$video:this[e(356)],ts:parseInt(1e3*this.$videoElement[e(383)],10)||0})}),40))}[BE(392)](){const t=BE;this.canvasRenderInterval&&(clearInterval(this[t(332)]),this[t(332)]=null)}[BE(275)](t){const e=BE;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this[e(393)][e(274)]())return void this[e(393)].debugLog(this[e(380)],e(361));const i=parseInt(1e3*Math.max(s[e(272)],this.$videoElement[e(383)]),10)||0;this[e(393)][e(321)][e(347)]({$video:this[e(356)],ts:i}),this[e(393)].handleRender(),this[e(393)].updateStats({dts:i}),this[e(330)]=this[e(356)][e(351)](this[e(275)][e(335)](this))}[BE(323)](){const t=BE;this[t(283)](),this[t(280)]=setInterval((()=>{const e=t;let s=0;this[e(308)][e(264)]&&(s=this[e(308)][e(264)]),this[e(393)].emit(M[e(293)],(s/1024/8/10)[e(358)](2))}),1e3)}[BE(283)](){const t=BE;this[t(280)]&&(clearInterval(this[t(280)]),this[t(280)]=null)}[BE(390)](){const t=BE;this[t(392)](),this[t(372)]=setInterval((()=>{const e=t;if(this[e(356)])if(Vs(this[e(356)].getVideoPlaybackQuality)){const t=this[e(356)][e(262)]();this[e(288)]=t[e(270)]-this[e(265)],this[e(265)]=t[e(270)]}else{const t=this[e(356)].webkitDecodedFrameCount||0;this[e(288)]=t-this.hlsPrevFrams,this[e(265)]=t}}),1e3)}[BE(271)](){const t=BE;this[t(372)]&&(clearInterval(this[t(372)]),this[t(372)]=null)}[BE(325)](){const t=BE;this.player[t(354)][t(290)]&&(this[t(356)]=document[t(348)]("video"),this[t(356)][t(277)]=!0,ss()&&(this.$videoElement[t(312)][t(263)]=t(340)),this.initVideoEvents()),this[t(308)].attachMedia(this[t(356)])}[BE(388)](){const t=BE,e=this.player,{proxy:s}=this[t(393)].events;this[t(308)];const i=this[t(356)],r=fi(),n=s(i,ct[t(373)],(s=>{const i=t;if(this[i(308)]){const t=parseInt(s[i(387)],10);this[i(393)][i(354)][i(290)]&&ci(r)&&e[i(279)]({ts:t,dts:t})}}));this[t(391)][t(322)](n),this[t(308)].on(PE[t(384)].ERROR,((e,s)=>{const i=t;if(s[i(298)])switch(s[i(355)]){case PE[i(389)][i(307)]:this[i(393)][i(317)](this[i(380)],"fatal network error encountered, try to recover"),this.hls[i(334)]();break;case PE[i(389)][i(284)]:this[i(393)][i(317)](this.TAG_NAME,i(318)),this.hls[i(342)]()}})),this[t(308)].on(PE[t(384)][t(306)],(()=>{})),this[t(308)].on(PE[t(384)][t(261)],(()=>{})),this[t(308)].on(PE[t(384)][t(364)],(()=>{})),this[t(308)].on(PE[t(384)][t(394)],(()=>{})),this[t(308)].on(PE[t(384)].BUFFER_RESET,(()=>{})),this[t(308)].on(PE.Events[t(319)],(()=>{})),this[t(308)].on(PE[t(384)].BUFFER_CREATED,(()=>{})),this[t(308)].on(PE[t(384)][t(370)],((e,s)=>{const i=t;this[i(393)].debugLog(this[i(380)],"BUFFER_APPENDING",s.type)})),this[t(308)].on(PE[t(384)][t(369)],(()=>{})),this[t(308)].on(PE[t(384)].BUFFER_EOS,(()=>{})),this[t(308)].on(PE[t(384)][t(289)],(()=>{})),this.hls.on(PE[t(384)][t(291)],(()=>{})),this[t(308)].on(PE[t(384)][t(269)],(()=>{const e=t;this.player[e(311)](this[e(380)],"MANIFEST_LOADING 开始加载playlist m3u8资源")})),this[t(308)].on(PE[t(384)][t(376)],((e,s)=>{const i=t;this[i(393)][i(311)](this[i(380)],"MANIFEST_LOADED playlist m3u8文件加载完成",s[i(295)])})),this.hls.on(PE[t(384)][t(352)],(()=>{const s=t;this[s(393)][s(311)](this[s(380)],"MANIFEST_PARSED playlist m3u8解析完成"),!e._times[s(365)]&&(e[s(310)][s(365)]=je())})),this[t(308)].on(PE.Events.LEVEL_LOADING,(()=>{})),this[t(308)].on(PE.Events[t(341)],((t,e)=>{})),this.hls.on(PE[t(384)][t(329)],(()=>{})),this[t(308)].on(PE[t(384)][t(315)],((s,i)=>{const r=t;!e[r(310)][r(333)]&&(e[r(310)].decodeStart=je())})),this.hls.on(PE[t(384)][t(370)],(()=>{const s=t;!e._times[s(357)]&&(e[s(310)].videoStart=je(),e[s(313)]())})),this[t(308)].on(PE[t(384)].FRAG_DECRYPTED,(()=>{})),this[t(308)].on(PE.Events.KEY_LOADING,(()=>{})),this[t(308)].on(PE[t(384)].KEY_LOADING,(()=>{})),this[t(308)].on(PE[t(384)][t(285)],(t=>{})),this.hls.on(PE.Events[t(362)],(t=>{})),this[t(308)].on(PE[t(384)][t(273)],((e,s)=>{const i=t;this[i(393)][i(311)](this[i(380)],i(273),s);const r=!!(s&&s[i(305)]&&s.tracks[i(282)]),n=!!(s&&s[i(305)]&&s[i(305)][i(321)]);if(r&&s[i(305)].audio){let t=s.tracks.audio;const e=t[i(377)]&&t[i(377)][i(278)]?t[i(377)].channelCount:0,r=t[i(294)];this[i(393)].audio&&this[i(393)][i(282)][i(360)]({encType:r,channels:e,sampleRate:44100})}if(n&&s[i(305)].video){let t=s.tracks[i(321)];const e={encTypeCode:-1!==t[i(294)].indexOf("avc")?G[i(349)]:G.h265};t[i(377)]&&(e.width=t[i(377)][i(303)],e[i(350)]=t.metadata[i(350)]),this[i(393)][i(321)]&&this[i(393)][i(321)][i(381)](e)}}))}initVideoPlay(t){const e=BE;this[e(393)][e(354)][e(290)]&&(this.$videoElement=document[e(348)](e(321)),this.initVideoEvents()),this.$videoElement.autoplay=!0,this[e(356)][e(277)]=!0,this[e(356)][e(339)]=t}[BE(286)](){const t=BE;!this[t(267)]&&(this[t(393)].video.updateVideoInfo({width:this[t(356)][t(363)],height:this[t(356)].videoHeight}),this[t(393)][t(321)][t(296)](),this[t(267)]=!0)}[BE(337)](){const t=BE,{proxy:e}=this[t(393)][t(367)],s=e(this[t(356)],ct[t(331)],(()=>{const e=t;this.player[e(311)](this[e(380)],e(292)),this[e(356)].play()[e(375)]((()=>{const t=e;this.player[t(311)](this[t(380)],t(268)),this[t(359)](),this._initRenderSize()})).catch((t=>{const s=e;this[s(393)][s(317)](this[s(380)],s(299),t)}))})),i=e(this[t(356)],ct.waiting,(()=>{const e=t;this.player[e(311)](this[e(380)],e(338))})),r=e(this[t(356)],ct[t(373)],(e=>{const s=t,i=parseInt(e[s(387)],10);this[s(393)][s(287)](),this.player[s(279)]({ts:i}),this[s(356)][s(382)]&&(this.player[s(317)](this[s(380)],"video is paused and next try to replay"),this[s(356)][s(266)]()[s(375)]((()=>{const t=s;this[t(393)].debugLog(this[t(380)],"video is paused and replay success")}))[s(309)]((t=>{const e=s;this[e(393)].debugWarn(this[e(380)],e(326),t)})))})),n=e(this[t(356)],ct[t(327)],(()=>{const e=t;this[e(393)][e(311)](this[e(380)],e(314),this[e(356)]&&this.$videoElement.playbackRate)}));this.eventsDestroy[t(322)](s,i,r,n)}[BE(300)](t){return new Promise(((e,s)=>{const i=FE;this[i(366)]?(this.initVideoPlay(t),this[i(323)](),this[i(390)](),e()):this.hls.on(PE.Events.MEDIA_ATTACHED,(()=>{const s=i;this[s(308)][s(300)](t),this[s(323)](),this[s(390)](),e()}))}))}}function UE(t,e){var s=NE();return(UE=function(t,e){return s[t-=477]})(t,e)}function NE(){var t=["1138122yCxPFB","20487XdFxrX","49NtBQuu","123208epsoVw","4014120eSbqSF","268XWHVYw","168229JvQvmC","5fGgECZ","3137322doagLR","434712LNvCHc"];return(NE=function(){return t})()}!function(t,e){for(var s=UE,i=t();;)try{if(283782===parseInt(s(478))/1+parseInt(s(481))/2+-parseInt(s(483))/3*(parseInt(s(477))/4)+parseInt(s(479))/5*(parseInt(s(480))/6)+parseInt(s(484))/7*(parseInt(s(485))/8)+parseInt(s(482))/9+-parseInt(s(486))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(NE);const jE=YE;!function(t,e){const s=YE,i=t();for(;;)try{if(487347===parseInt(s(415))/1+-parseInt(s(487))/2+-parseInt(s(486))/3+parseInt(s(482))/4+parseInt(s(499))/5*(parseInt(s(409))/6)+parseInt(s(373))/7*(parseInt(s(363))/8)+-parseInt(s(388))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ZE);const VE=2097152,zE={FETCH:jE(395),XHR:"xhr"},GE={ARRAY_BUFFER:jE(478),TEXT:jE(392),JSON:jE(305)},WE={REAL_TIME_SPEED:jE(441)},HE=Object[jE(301)][jE(312)];function KE(t){const e=jE;if(HE.call(t)!==e(413))return!1;const s=Object.getPrototypeOf(t);return null===s||s===Object[e(301)]}function QE(t){const e=jE;if(!t||null===t[0]||void 0===t[0]||0===t[0]&&(null===t[1]||void 0===t[1]))return;let s=e(341)+t[0]+"-";return t[1]&&(s+=t[1]),s}function YE(t,e){const s=ZE();return(YE=function(t,e){return s[t-=297]})(t,e)}function qE(t){const e=jE;return encodeURIComponent(t)[e(314)](/%3A/gi,":")[e(314)](/%24/g,"$").replace(/%2C/gi,",")[e(314)](/%20/g,"+")[e(314)](/%5B/gi,"[")[e(314)](/%5D/gi,"]")}function JE(t,e){const s=jE;if(!t)return;if(!e)return t;let i;const r=Object[s(475)](e)[s(461)]((t=>{const r=s;if(i=e[t],null!=i)return Array[r(428)](i)?t+="[]":i=[i],i.map((e=>{const s=r;var i,n;return n=e,"[object Date]"===HE[jE(324)](n)?e=e[s(334)]():null!==(i=e)&&typeof i===jE(494)&&(e=JSON[s(433)](e)),qE(t)+"="+qE(e)}))[r(356)]("&")})).filter(Boolean)[s(356)]("&");if(r){const e=t.indexOf("#");-1!==e&&(t=t[s(302)](0,e)),t+=(-1===t[s(446)]("?")?"?":"&")+r}return t}function XE(t,e,s,i,r,n,o,a,h,c,l){const d=jE;r=null!=r?parseFloat(r):null,i=parseInt(i||"0",10),Number[d(298)](i)&&(i=0);return{data:t,done:e,options:{range:h,vid:c,index:a,contentLength:i,age:r,startTime:n,firstByteTime:o,endTime:Date[d(342)](),priOptions:l},response:s}}function ZE(){const t=["TAG_NAME","isFetchSupport","target","signal","_response","_currentTask",", datalen,",",len,","_currentChunkSizeKB","_onProgress","_index","emit","13934286GbVTje","resolve","include","_onLoad","text","_onReadyStatechange","request","fetch","get","receiveLen","byteLength","timeout","_loadChunk","onTimeout","message","_url","_loadCompleteReject","function","then","player","read","2148aTbMTU","age","vid","alive","[object Object]","XhrLoader","556628DNxTQC","type","concat","toLowerCase","url","finally","_retryCheckFunc","running","string",",receivedLength","_retryCount","responseType","status","isArray","statusText","[xhr_loader->],tast :","_priOptions","_onTimeout","stringify","_firstRtt","_onProcessMinLen","_onCancel","split","_config","all","_startTime","real_time_speed","credentials","xhr.onerror.status:","[task request setTimeout],retry","[xhr load done->], tast :","indexOf","_vid","【fetchLoader,onProgress call】,task,","_aborted","_credentials","trim","_withCredentials","_timeoutTimer","bad response,status:","_loader","isTimeout","_canceled","onProgress","setRequestHeader","options","map","_receivedLength","reject","_startLoad","round",", SubRange, ","used","_loadCompleteResolve","_responseType","open","_getHeaders","content-length","exec","_range","keys",",load sub range, ","_body","arraybuffer","_alive","_reader","_running","2515892pVFDSM","onreadystatechange","done","set","176202nWzXuo","1810796mDLmLz",", writeIdx,","【fetchLoader,onProgress extra end】,len,","length","_transformResponse","ontimeout","readyState","object","_cache","cancel","currentTarget","promise","11785HJYDzK","[xhr.send->] tast,","load","REAL_TIME_SPEED","isNaN","debugLog","index","prototype","slice","params","getReader","json","XHR","【fetchLoader,onProgress enough】,done,","onCancel","isSupported","loaderType","_xhr","toString","Content-Length","replace","value","endTime","body","method","transformRequest","isFetch","onProgress of bad response.body.getReader","_request","_queue","call","Range","retryCheckFunc",",done,","_retryTimer","onerror","_runing",",dataLen,","_writeIdx","range","toISOString",", start,","same-origin","【fetchLoader,onProgress cache】,len,","_internalOpen","responseURL","destroy","bytes=","now","assign",",index,","startTime","_abortController",", done,","TEXT","response","_timeout","_method","number","bind","_processTask","push","join","GET","bad network response","ARRAY_BUFFER",", allRange, ","undefined","_headers","432cWhssq","[task request catch err]","end ","headers","catch","removeAllListeners","JSON","priOptions","[fetchLoader onProgress end],task,","FETCH","125783UFymgr","_loaderType","abort"];return(ZE=function(){return t})()}function $E(t,e){return Math[jE(465)](8*t*1e3/e/1024)}class tI extends Error{constructor(t,e,s,i){const r=jE;super(i),$f(this,"retryCount",0),$f(this,r(456),!1),$f(this,r(310),zE[r(372)]),$f(this,r(345),0),$f(this,"endTime",0),$f(this,r(460),{}),this.url=t,this[r(394)]=e,this[r(349)]=s}}class eI extends Bi{constructor(t){const e=jE;super(),$f(this,e(346),null),$f(this,e(453),null),$f(this,e(480),null),$f(this,e(380),null),$f(this,"_aborted",!1),$f(this,e(386),-1),$f(this,"_range",null),$f(this,e(462),0),$f(this,"_running",!1),$f(this,"_logger",null),$f(this,e(447),""),$f(this,e(435),0),$f(this,e(436),null),$f(this,e(431),null),$f(this,e(376),"FetchLoader"),this[e(407)]=t}[jE(501)](t){const e=jE;var s;let{url:i,vid:r,timeout:n,responseType:o,onProgress:a,index:h,onTimeout:c,onCancel:l,range:d,transformResponse:u,request:p,params:f,logger:m,method:g,headers:A,body:y,mode:b,credentials:v,cache:S,redirect:w,referrer:E,referrerPolicy:I,onProcessMinLen:T,priOptions:k}=t;this[e(449)]=!1,this[e(435)]=T,this._onCancel=l,this._abortController=typeof AbortController!==e(361)&&new AbortController,this[e(481)]=!0,this[e(386)]=h,this[e(474)]=d||[0,0],this[e(447)]=r||i,this[e(431)]=k||{};const _={method:g,headers:A,body:y,mode:b,credentials:v,cache:S,redirect:w,referrer:E,referrerPolicy:I,signal:null===(s=this[e(346)])||void 0===s?void 0:s[e(379)]};let C=!1;clearTimeout(this[e(453)]),i=JE(i,f);const R=QE(d);R&&(A=p?p.headers:_.headers=_[e(366)]||(Headers?new Headers:{}),Headers&&A instanceof Headers?A.append(e(325),R):A.Range=R),n&&(this[e(453)]=setTimeout((()=>{const t=e;if(C=!0,this[t(496)](),c){const e=new tI(i,_,null,t(399));e.isTimeout=!0,c(e,{index:this[t(386)],range:this[t(474)],vid:this[t(447)],priOptions:this._priOptions})}}),n));const D=Date[e(342)]();return new Promise(((t,s)=>{const r=e;fetch(p||i,p?void 0:_)[r(406)]((async e=>{const n=r;if(clearTimeout(this[n(453)]),this[n(380)]=e,this[n(449)]||!this._running)return;if(u&&(e=u(e,i)||e),!e.ok)throw new tI(i,_,e,n(358));const c=Date[n(342)]();let l;if(o===GE[n(348)])l=await e[n(392)](),this[n(481)]=!1;else if(o===GE[n(369)])l=await e[n(305)](),this[n(481)]=!1;else{if(a)return this[n(389)]=t,this.reject=s,void this[n(400)](e,a,D,c);{l=await e.arrayBuffer(),l=new Uint8Array(l),this[n(481)]=!1;const t=Date[n(342)]()-D,s=$E(l[n(398)],t);this.emit(WE[n(297)],{speed:s,len:l[n(398)],time:t,vid:this[n(447)],index:this._index,range:this._range,priOptions:this[n(431)]})}}t(XE(l,!0,e,e[n(366)][n(396)](n(313)),e[n(366)].get(n(410)),D,c,h,d,this._vid,this._priOptions))}))[r(367)]((t=>{const e=r;var n;clearTimeout(this[e(453)]),this._running=!1,this[e(449)]&&!C||((t=t instanceof tI?t:new tI(i,_,null,null===(n=t)||void 0===n?void 0:n[e(402)])).startTime=D,t[e(316)]=Date[e(342)](),t[e(456)]=C,t[e(460)]={index:this[e(386)],range:this[e(474)],vid:this[e(447)],priOptions:this._priOptions},s(t))}))}))}async[jE(496)](){const t=jE;if(!this[t(449)]){if(this[t(449)]=!0,this[t(481)]=!1,this[t(380)]){try{this._reader&&await this[t(480)].cancel()}catch(t){}this[t(380)]=this._reader=null}if(this[t(346)]){try{this._abortController[t(375)]()}catch(t){}this[t(346)]=null}this[t(436)]&&this._onCancel({index:this[t(386)],range:this._range,vid:this[t(447)],priOptions:this[t(431)]})}}[jE(400)](t,e,s,i){const r=jE;if(!t.body||!t[r(317)].getReader){this._running=!1;const e=new tI(t[r(419)],"",t,r(321));return e[r(460)]={index:this[r(386)],range:this[r(474)],vid:this[r(447)],priOptions:this[r(431)]},void this[r(463)](e)}this[r(435)]>0&&(this[r(495)]=new Uint8Array(VE),this._writeIdx=0);const n=this[r(480)]=t[r(317)][r(304)]();let o,a,h;const c=async()=>{const l=r;var d;a=Date.now();try{o=await n[l(408)](),h=Date[l(342)]()}catch(t){return h=Date[l(342)](),void(!this._aborted&&(this[l(481)]=!1,t[l(460)]={index:this[l(386)],range:this[l(474)],vid:this[l(447)],priOptions:this[l(431)]},this[l(463)](t)))}const u=(null===(d=this[l(474)])||void 0===d?void 0:d[l(490)])>0?this[l(474)][0]:0,p=u+this._receivedLength;if(this._aborted)return this[l(481)]=!1,void e(void 0,!1,{range:[p,p],vid:this[l(447)],index:this[l(386)],startTime:a,endTime:h,st:s,firstByteTime:i,priOptions:this[l(431)]},t);const f=o.value?o[l(315)][l(398)]:0;let m;if(this[l(462)]+=f,this[l(407)].debugLog(this[l(376)],l(448),this[l(474)],l(335),p,", end,",u+this[l(462)],", done,",o[l(484)]),this[l(435)]>0){if(this._writeIdx+f>=this[l(435)]||o[l(484)])m=new Uint8Array(this[l(332)]+f),m[l(485)](this[l(495)].slice(0,this[l(332)]),0),f>0&&m[l(485)](o[l(315)],this[l(332)]),this[l(332)]=0,this[l(407)].debugLog(this[l(376)],l(307),o[l(484)],l(383),m.byteLength,l(488),this[l(332)]);else if(f>0&&this[l(332)]+f0){const t=new Uint8Array(this[l(332)]+f+2048);this[l(407)][l(299)](this[l(376)],"【fetchLoader,onProgress extra start】,size,",this[l(332)]+f+2048,l(382),f,l(488),this[l(332)]),t[l(485)](this[l(495)][l(302)](0,this[l(332)]),0),f>0&&t[l(485)](o.value,this[l(332)]),this[l(332)]+=f,delete this[l(495)],this._cache=t,this[l(407)][l(299)](this[l(376)],l(489),f,l(488),this._writeIdx)}}else m=o[l(315)];if((m&&m[l(398)]>0||o.done)&&e(m,o.done,{range:[this[l(474)][0]+this[l(462)]-(m?m[l(398)]:0),this[l(474)][0]+this[l(462)]],vid:this[l(447)],index:this[l(386)],startTime:a,endTime:h,st:s,firstByteTime:i,priOptions:this[l(431)]},t),o.done){const e=Date[l(342)]()-s,r=$E(this[l(462)],e);this[l(387)](WE[l(297)],{speed:r,len:this[l(462)],time:e,vid:this[l(447)],index:this[l(386)],range:this[l(474)],priOptions:this[l(431)]}),this[l(481)]=!1,this[l(407)].debugLog(this[l(376)],l(371),this[l(474)],l(327),o[l(484)]),this.resolve(XE(o,!0,t,t[l(366)][l(396)](l(313)),t[l(366)][l(396)](l(410)),s,i,this[l(386)],this[l(474)],this[l(447)],this[l(431)]))}else c()};c()}get[jE(397)](){return this[jE(462)]}get running(){return this[jE(481)]}set[jE(422)](t){this[jE(481)]=t}static[jE(309)](){return!(typeof fetch===jE(361))}}class sI{constructor(t,e,s){const i=jE;$f(this,i(376),"Task"),this[i(498)]=function(){const t=jE;let e,s;const i=new Promise(((t,i)=>{e=t,s=i}));return i[t(467)]=!1,i[t(389)]=function(){return i[t(467)]=!0,e(...arguments)},i[t(463)]=function(){return i[t(467)]=!0,s(...arguments)},i}(),this[i(412)]=!!e[i(458)],this[i(374)]=t,this[i(407)]=s,this[i(455)]=t===zE[i(372)]&&window[i(395)]?new eI(s):new iI(s),this[i(438)]=e,this[i(425)]=0,this[i(328)]=null,this[i(457)]=!1,this[i(421)]=e[i(326)]}[jE(473)](){const t=jE,{retry:e,retryDelay:s,onRetryError:i,transformError:r,...n}=this[t(438)],o=async()=>{const a=t;try{const t=await this[a(455)][a(501)](n);this.promise.resolve(t)}catch(t){if(this._loader[a(422)]=!1,this[a(407)][a(299)](this[a(376)],a(364),t),this[a(457)])return;t[a(310)]=this[a(374)],t.retryCount=this._retryCount;let h=t;r&&(h=r(h)||h),i&&this._retryCount>0&&i(h,this[a(425)],{index:n.index,vid:n[a(411)],range:n[a(333)],priOptions:n.priOptions}),this[a(425)]++;let c=!0;if(this._retryCheckFunc&&(c=this[a(421)](t)),c&&this[a(425)]<=e)return clearTimeout(this[a(328)]),this.player[a(299)](this[a(376)],a(444),this[a(425)],",retry range,",n[a(333)]),void(this[a(328)]=setTimeout(o,s));this[a(498)][a(463)](h)}};return o(),this[t(498)]}async cancel(){const t=jE;return clearTimeout(this[t(328)]),this[t(457)]=!0,this[t(455)][t(422)]=!1,this[t(455)][t(496)]()}get running(){const t=jE;return this._loader&&this[t(455)][t(422)]}get loader(){return this[jE(455)]}}class iI extends Bi{constructor(t){const e=jE;super(),$f(this,"_xhr",null),$f(this,e(449),!1),$f(this,e(453),null),$f(this,e(474),null),$f(this,e(462),0),$f(this,e(403),null),$f(this,"_onProgress",null),$f(this,"_index",-1),$f(this,e(362),null),$f(this,e(384),384),$f(this,"_timeout",null),$f(this,e(311),null),$f(this,e(452),null),$f(this,e(440),-1),$f(this,e(468),null),$f(this,"_loadCompleteReject",null),$f(this,"_runing",!1),$f(this,"_logger",!1),$f(this,e(447),""),$f(this,e(469),void 0),$f(this,e(450),void 0),$f(this,"_method",void 0),$f(this,"_transformResponse",void 0),$f(this,e(434),void 0),$f(this,e(436),null),$f(this,"_priOptions",null),$f(this,e(376),e(414)),this[e(407)]=t}[jE(501)](t){const e=jE;clearTimeout(this[e(453)]),this[e(474)]=t[e(333)],this[e(385)]=t[e(458)],this[e(386)]=t[e(300)],this[e(362)]=t.headers,this[e(452)]=t[e(442)]===e(390)||t[e(442)]===e(336),this._body=t[e(317)]||null,t.method&&(this[e(351)]=t[e(318)]),this[e(350)]=t[e(399)]||null,this[e(330)]=!0,this._vid=t[e(411)]||t[e(419)],this[e(469)]=t[e(426)],this[e(434)]=-1,this[e(432)]=t[e(401)],this[e(436)]=t[e(308)],this[e(322)]=t[e(394)],this[e(431)]=t[e(370)]||{},this[e(407)][e(299)](this.TAG_NAME,"【xhrLoader task】, range",this[e(474)]),this._url=JE(t.url,t[e(303)]);const s=Date[e(342)]();return new Promise(((t,s)=>{const i=e;this[i(468)]=t,this[i(404)]=s,this[i(464)]()}))[e(367)]((t=>{const i=e;if(clearTimeout(this[i(453)]),this[i(330)]=!1,!this[i(449)])throw(t=t instanceof tI?t:new tI(this._url,this[i(322)])).startTime=s,t.endTime=Date.now(),t[i(460)]={index:this[i(386)],vid:this[i(447)],priOptions:this[i(431)]},t}))}[jE(464)](){const t=jE;let e=null;if(this._responseType===GE[t(359)]&&this[t(474)]&&this[t(474)][t(490)]>1)if(this[t(385)]){this[t(434)]=-1;const s=1024*this._currentChunkSizeKB,i=this[t(474)][0]+this[t(462)];let r=this[t(474)][1];s{const s=e;var i,r,n;this[s(481)]=!1;const o=new tI(this._url,this[s(322)],null==t||null===(i=t[s(497)])||void 0===i?void 0:i[s(349)],s(443)+(null==t||null===(r=t.currentTarget)||void 0===r?void 0:r[s(427)])+",statusText,"+(null==t||null===(n=t.currentTarget)||void 0===n?void 0:n[s(429)]));o[s(460)]={index:this[s(386)],range:this[s(474)],vid:this[s(447)],priOptions:this[s(431)]},this._loadCompleteReject(o)},s[e(492)]=t=>{const s=e;this[s(496)]();const i=new tI(this[s(403)],this[s(322)],{status:408},s(399));this[s(432)]&&(i[s(456)]=!0,this[s(432)](i,{index:this[s(386)],range:this[s(474)],vid:this[s(447)],priOptions:this._priOptions})),i[s(460)]={index:this[s(386)],range:this[s(474)],vid:this._vid,priOptions:this[s(431)]},this[s(404)](i)};const i=this._headers||{},r=QE(t);r&&(i.Range=r),i&&Object[e(475)](i).forEach((t=>{s[e(459)](t,i[t])})),this[e(407)][e(299)](this.TAG_NAME,e(500),this[e(474)],e(476),t),s.send(this[e(477)])}catch(s){s[e(460)]={index:this._index,range:t,vid:this[e(447)],priOptions:this[e(431)]},this[e(404)](s)}}_onReadyStatechange(t){const e=jE;2===t.target[e(493)]&&this[e(434)]<0&&(this[e(434)]=Date[e(342)]())}_onLoad(t){const e=jE;var s;const i=t[e(378)][e(427)];if(i<200||i>299){const s=new tI(this[e(403)],null,{...t[e(378)].response,status:i},e(454)+i);return s[e(460)]={index:this[e(386)],range:this[e(474)],vid:this[e(447)],priOptions:this[e(431)]},this[e(404)](s)}let r,n=null,o=!1;const a=(null===(s=this[e(474)])||void 0===s?void 0:s.length)>0?this[e(474)][0]:0;if(this[e(469)]===GE[e(359)]){var h;const s=new Uint8Array(t[e(378)][e(349)]);if(r=a+this[e(462)],s&&s.byteLength>0){this[e(462)]+=s[e(398)];const t=Date[e(342)]()-this[e(440)],i=$E(this[e(462)],t);this[e(387)](WE[e(297)],{speed:i,len:this[e(462)],time:t,vid:this[e(447)],index:this[e(386)],range:[r,a+this[e(462)]],priOptions:this[e(431)]})}n=s,o=!((null===(h=this._range)||void 0===h?void 0:h[e(490)])>1&&this[e(474)][1]&&this[e(462)]=200&&i<300,status:i,statusText:this[e(311)][e(429)],url:this[e(311)][e(339)],headers:this[e(471)](this[e(311)]),body:this[e(311)].response};this[e(491)]&&(c=this[e(491)](c,this[e(403)])||c),this._onProgress&&this[e(385)](n,o,{index:this[e(386)],vid:this[e(447)],range:[r,a+this[e(462)]],startTime:this[e(440)],endTime:Date[e(342)](),priOptions:this[e(431)]},c),o?(this[e(330)]=!1,this[e(468)]&&this[e(468)](XE(this[e(385)]?null:n,o,c,c[e(366)][e(472)],c.headers[e(410)],this[e(440)],this[e(434)],this[e(386)],this[e(474)],this[e(447)],this._priOptions))):this[e(464)]()}cancel(){const t=jE;if(!this[t(449)])return this[t(449)]=!0,this[t(330)]=!1,super[t(368)](),this._onCancel&&this[t(436)]({index:this[t(386)],range:this._range,vid:this[t(447)],priOptions:this[t(431)]}),this._xhr?this[t(311)][t(375)]():void 0}static[jE(309)](){return typeof XMLHttpRequest!==jE(361)}get[jE(397)](){return this._receivedLength}get running(){return this[jE(481)]}set[jE(422)](t){this._running=t}[jE(471)](t){const e=jE,s=t.getAllResponseHeaders()[e(451)]().split("\r\n"),i={};for(const t of s){const s=t[e(437)](": ");i[s[0][e(418)]()]=s[e(302)](1).join(": ")}return i}}class rI extends Bi{constructor(t,e){const s=jE;super(),$f(this,s(416),zE[s(372)]),$f(this,s(323),[]),$f(this,s(479),[]),$f(this,s(381),null),$f(this,"_config",void 0),this.player=e,this[s(438)]=function(t){const e=jE;return{loaderType:zE[e(372)],retry:0,retryDelay:0,timeout:0,request:null,onTimeout:void 0,onProgress:void 0,onRetryError:void 0,transformRequest:void 0,transformResponse:void 0,transformError:void 0,responseType:GE[e(348)],range:void 0,url:"",params:void 0,method:e(357),headers:{},body:void 0,mode:void 0,credentials:void 0,cache:void 0,redirect:void 0,referrer:void 0,referrerPolicy:void 0,integrity:void 0,onProcessMinLen:0,...t}}(t),(this[s(438)][s(310)]===zE.XHR||!eI[s(309)]())&&(this[s(416)]=zE[s(306)])}[jE(340)](){const t=jE;this[t(323)]=[],this._alive=[],this[t(381)]=null}[jE(320)](){const t=jE;return this[t(416)]===zE[t(372)]}static[jE(377)](){return eI[jE(309)]()}[jE(501)](t){const e=jE;let s=arguments[e(490)]>1&&void 0!==arguments[1]?arguments[1]:{};typeof t!==e(423)&&t?s=t:s[e(419)]=t||s[e(419)]||this[e(438)][e(419)],s=Object.assign({},this[e(438)],s),s[e(303)]&&(s[e(303)]=Object[e(343)]({},s[e(303)])),s[e(366)]&&KE(s[e(366)])&&(s[e(366)]=Object.assign({},s[e(366)])),s[e(317)]&&KE(s.body)&&(s[e(317)]=Object[e(343)]({},s.body)),s[e(319)]&&(s=s[e(319)](s)||s);const i=new sI(this[e(416)],s,this[e(407)]);return i.loader.on(WE.REAL_TIME_SPEED,(t=>{this[e(387)](WE.REAL_TIME_SPEED,t)})),this._queue[e(355)](i),1===this[e(323)][e(490)]&&(!this[e(381)]||!this[e(381)].running)&&this._processTask(),i.promise}async[jE(496)](){const t=jE,e=this._queue[t(461)]((e=>e[t(496)]()))[t(417)](this[t(479)][t(461)]((e=>e[t(496)]())));this[t(381)]&&e.push(this[t(381)].cancel()),this._queue=[],this[t(479)]=[],await Promise[t(439)](e),await function(){let t=arguments[Me(641)]>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((e=>setTimeout(e,t)))}()}_processTask(){const t=jE;if(this[t(381)]=this[t(323)].shift(),!this._currentTask)return;this._currentTask[t(412)]&&this[t(479)][t(355)](this[t(381)]);const e=this._currentTask.exec().catch((t=>{}));e&&typeof e[t(420)]===t(405)&&e.finally((()=>{const e=t;var s,i;null!==(s=this[e(381)])&&void 0!==s&&s[e(412)]&&(null===(i=this._alive)||void 0===i?void 0:i[e(490)])>0&&(this[e(479)]=this._alive.filter((t=>t&&t!==this[e(381)]))),this[e(354)]()}))}}const nI=aI;!function(t,e){const s=aI,i=t();for(;;)try{if(822443===-parseInt(s(448))/1+parseInt(s(465))/2*(parseInt(s(452))/3)+parseInt(s(454))/4*(-parseInt(s(461))/5)+-parseInt(s(460))/6+-parseInt(s(455))/7*(-parseInt(s(468))/8)+-parseInt(s(466))/9+parseInt(s(473))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(hI);const oI={NETWORK:nI(446),NETWORK_TIMEOUT:nI(462),NETWORK_FORBIDDEN:nI(464),OTHER:nI(472),MANIFEST:nI(449),HLS:nI(445),DEMUX:nI(471)};function aI(t,e){const s=hI();return(aI=function(t,e){return s[t-=445]})(t,e)}function hI(){const t=["344LrKhvU","11199951isqlxH","NETWORK","OTHER","originError","ext","1900596nIuiDV","37685rCQARn","network_timeout","response","network_forbidden","1745132gPGloL","7157421nawNSX","NETWORK_TIMEOUT","8FKXlxS","message","status","demux","other","10381730RTBFWR","hls","network","isTimeout","928072ZElWEb","manifest","create","url","3KUVrIR","errorMessage"];return(hI=function(){return t})()}class cI extends Error{constructor(t,e,s,i,r){const n=nI;super(r||(null==s?void 0:s[n(469)])),this.errorType=t===oI[n(467)]?oI.NETWORK:t,this[n(458)]=s,this[n(459)]=i,this[n(453)]=this[n(469)]}static[nI(450)](t,e,s,i,r){return t instanceof cI?t:(t instanceof Error&&(s=t,t=""),t||(t=oI[nI(457)]),new cI(t,e,s,i,r))}static[nI(446)](t){const e=nI;var s;return new cI(null!=t&&t[e(447)]?oI[e(467)]:oI[e(456)],null,t instanceof Error?t:null,{url:null==t?void 0:t[e(451)],response:null==t?void 0:t[e(463)],httpCode:null==t||null===(s=t[e(463)])||void 0===s?void 0:s[e(470)]})}}const lI=bI;function dI(){const t=["isSegmentEncrypted","4082035SpxLGq","hasAudio","isArray","start","8rwCXSL","length","com.microsoft.playready","endPartIndex","PLAYREADY","URL","344450KkXmCH","Audio","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2","partHoldBack","videoCodec","212569EGNbjw","isValidKeySystem","height","channels","com.widevine.alpha","initSegment","url","skippedSegments","5280651UoAvTB","targetDuration","independent","118nzrcES","partIndex","concat","type","name","setIVFromSN","4bfVtOo","segments","isSupported","com.apple.streamingkeydelivery","version","_HLS_skip","end","subtitleStreams","isInitSegment","forced","dataTime","width","VIDEO","clone","startCC","msn","SubTitle","_HLS_msn","endCC","audioCodec","audioGroup","bitrate","SAMPLE-AES-CTR","5089721ooBarn","org.w3.clearkey","endSN","mediaType","Video","textCodec","canBlockReload","lowLatency","indexOf","skip","CLEAR_KEY","totalDuration","SUBTITLE","byteRange","autoSelect","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","isMaster","AES-128","keyFormat","11823nuSslD","set","default","startSN","toString","canSkipDateRanges","198rFRjyd","closedCaptionsStream","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","searchParams","parentUrl","part","2984982qMNKBq","duration","keyFormatVersions","FAIRPLAY","streams","hasVideo","method","setByteRange","WIDEVINE"];return(dI=function(){return t})()}!function(t,e){const s=bI,i=t();for(;;)try{if(573480===-parseInt(s(290))/1+-parseInt(s(301))/2*(-parseInt(s(253))/3)+parseInt(s(211))/4*(parseInt(s(275))/5)+parseInt(s(265))/6+-parseInt(s(234))/7+-parseInt(s(279))/8*(-parseInt(s(298))/9)+parseInt(s(285))/10*(-parseInt(s(259))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(dI);class uI{constructor(){const t=bI;$f(this,t(215),0),$f(this,t(269),[]),$f(this,t(250),!0)}}const pI={Audio:"AUDIO",Video:lI(223),SubTitle:lI(246),ClosedCaptions:"CLOSED-CAPTIONS"},fI={CLEAR_KEY:lI(235),FAIRPLAY:[lI(287),lI(214)],WIDEVINE:[lI(249),lI(294),"com.widevine"],PLAYREADY:[lI(261),lI(281)]};function mI(t){const e=lI;let s=[];for(let i=0;i>8*(15-e)&255}}isSegmentEncrypted(){const t=lI,{method:e}=this;return e===t(251)}[lI(291)](){const t=lI;if(!(mI([fI[t(244)],fI[t(268)],fI[t(273)],fI[t(283)]])[t(242)](this[t(252)])>-1))return!1;return!!(["SAMPLE-AES","SAMPLE-AES-CENC",t(233)].indexOf(this.method)>-1)}[lI(213)](){const t=lI;return!!this[t(271)]&&(!!this[t(274)]()||!!this[t(291)]())}}class II{constructor(t,e,s){const i=lI;this[i(226)]=t,this[i(264)]=e,this[i(243)]=s}addDirectives(t){const e=lI,s=new(self[e(284)])(t);return void 0!==this[e(226)]&&s.searchParams[e(254)](e(228),this[e(226)].toString()),this[e(264)]&&s[e(262)][e(254)]("_HLS_part",this[e(264)][e(257)]()),this[e(243)]&&s[e(262)].set(e(216),this.skip),s.href}}function TI(t,e){const s=kI();return(TI=function(t,e){return s[t-=420]})(t,e)}function kI(){const t=["trim","2440VughAz","4353727oiVzUM","CLASS","call","getTime","test","5226345NZuOMw","filter","replace","pre","X-ASSET-LIST","CUE","_endDate","toLowerCase","post","3816956vwvnDB","length","reduce","DURATION","X-ASSET-URI","split","7776CVLpLV","hasOwnProperty","EXT-X-","END_ON_NEXT","prototype","isFinite","12455130iuRgxA","YES","1718712LcmkCh","8OxDfHa","92aOlpCf","9929MiIpYS","exec","11UrAhnL","_startDate"];return(kI=function(){return t})()}!function(t,e){const s=TI,i=t();for(;;)try{if(514202===-parseInt(s(427))/1*(parseInt(s(426))/2)+-parseInt(s(424))/3+parseInt(s(447))/4+parseInt(s(432))/5*(parseInt(s(453))/6)+parseInt(s(433))/7*(parseInt(s(425))/8)+parseInt(s(438))/9+-parseInt(s(422))/10*(parseInt(s(429))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(kI);const _I=/^#(EXT[^:]*)(?::(.*))?$/,CI=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g,RI=/^(?:[a-zA-Z0-9+\-.]+:)?\/\//,DI=/^((?:[a-zA-Z0-9+\-.]+:)?\/\/[^/?#]*)?([^?#]*\/)?/;function LI(t){const e=TI,s=t.match(_I);if(s&&s[1])return[s[1][e(440)](e(455),""),s[2]]}function xI(t){const e=TI,s={};let i=CI.exec(t);for(;i;)s[i[1]]=i[2]||i[3],i=CI[e(428)](t);return s}function PI(t,e){const s=TI;if(!e||!t||RI[s(437)](t))return t;const i=DI[s(428)](e);return i?"/"===t[0]?i[1]+t:i[1]+i[2]+t:t}const BI={audio:[/^mp4a/,/^vorbis$/,/^opus$/,/^flac$/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function MI(t,e){const s=TI,i=BI[t];if(i&&e&&e[s(448)])for(let t=0;t(t[e[s(445)]()]=!0,t)),e)}(t[s(443)]||t["X-CUE"],{pre:!1,post:!1,once:!1});return!!t.ID&&!i&&Number.isFinite(t[s(430)].getTime())&&(null===r||r>=0)&&(!(t[s(456)]===s(423))||!!t[s(434)])&&(!t[s(443)]||!n[s(441)]&&!n[s(446)]||n[s(441)]!==n.post)&&(!("com.apple.hls.interstitial"===t.CLASS)||s(451)in t||s(442)in t)}function OI(){const t=["push","205LdxqBt","height","LANGUAGE","AUDIO","MEDIA","audioStreams","forEach","lang","26097973VTQkIw","URI","2129155yIoqcL","1075788HGHeHD","isNaN","GROUP-ID","name","10JmzctU","AVERAGE-BANDWIDTH","2362923puBZIt","AUTOSELECT","STREAM-INF","RESOLUTION","subtitleGroup","CHANNELS","default","textCodec","version","76338qCoiin","DEFAULT","bitrate","1841910CHvhIL","TYPE","CODECS","audioGroup","SUBTITLES","autoSelect","streams","url","split","YES","length","511IJNpaP","8BUSSZt","subtitleStreams","channels","NAME","BANDWIDTH","filter","group","1874CMyODF","audioCodec"];return(OI=function(){return t})()}function UI(t,e){const s=OI();return(UI=function(t,e){return s[t-=449]})(t,e)}function NI(t,e){const s=jI();return(NI=function(t,e){return s[t-=252]})(t,e)}function jI(){const t=["toUpperCase","duration","146893jceyeI","154517UKPgbL","50ZsjGtB",".ts","38475oUgfwk","KEYFORMAT","DISCONTINUITY-SEQUENCE","partIndex","preloadHint","version","key","31396qvTKsU","partTargetDuration","SKIPPED-SEGMENTS","CAN-SKIP-UNTIL","live","11372DIxWbR","dataTime","685rsWhkr","canBlockReload","PROGRAM-DATE-TIME","75wzIuvE","independent","partHoldBack","dateRanges","397760Pqxrgm","DATERANGE","push","YES","PART","CAN-SKIP-DATERANGES","isLast","ENDLIST","filter","126QsEMOF","END_DATE","test","clone","type","DURATION","PRELOAD-HINT","isSupported","targetDuration","URI","skippedSegments","setByteRange","_endDate","EXTINF","CAN-BLOCK-RELOAD","segments","KEY","start","split","initSegment","method","_startDate","METHOD","BYTERANGE","startCC","START-DATE","endCC","title","PART-TARGET","SKIP","41964ORoTxf","MEDIA-SEQUENCE","lowLatency"," is not supported","url","totalDuration","TARGETDURATION","nextSN","length","TYPE"];return(jI=function(){return t})()}!function(t,e){const s=UI,i=t();for(;;)try{if(530794===parseInt(s(468))/1*(-parseInt(s(476))/2)+-parseInt(s(457))/3+-parseInt(s(490))/4+-parseInt(s(479))/5*(parseInt(s(454))/6)+-parseInt(s(489))/7*(-parseInt(s(469))/8)+-parseInt(s(496))/9+-parseInt(s(494))/10*(-parseInt(s(487))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(OI),function(t,e){const s=NI,i=t();for(;;)try{if(227434===parseInt(s(299))/1+-parseInt(s(310))/2*(parseInt(s(320))/3)+parseInt(s(315))/4*(parseInt(s(317))/5)+-parseInt(s(287))/6*(-parseInt(s(257))/7)+-parseInt(s(324))/8+-parseInt(s(303))/9*(-parseInt(s(301))/10)+-parseInt(s(300))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(jI);const VI=GI;function zI(){const t=["70101XeUkod","6cTBeoH","includes","256UmAtyT","isMediaPlaylist","55zQpmTz","366737hwFlSM","184mrXmeE","48993ElUbhS","381948CCdxjd","692610FYeEIR","#EXTINF:","#EXTM3U","parse","length","#EXT-X-TARGETDURATION:","1918560VdtwAU","1145505qmdarC"];return(zI=function(){return t})()}function GI(t,e){const s=zI();return(GI=function(t,e){return s[t-=345]})(t,e)}!function(t,e){const s=GI,i=t();for(;;)try{if(552443===parseInt(s(362))/1+-parseInt(s(351))/2+-parseInt(s(361))/3*(-parseInt(s(360))/4)+-parseInt(s(352))/5*(-parseInt(s(354))/6)+parseInt(s(359))/7+-parseInt(s(356))/8*(parseInt(s(353))/9)+parseInt(s(345))/10*(parseInt(s(358))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(zI);class WI{static[VI(348)](){const t=VI;let e=arguments[t(349)]>0&&void 0!==arguments[0]?arguments[0]:"",s=arguments[t(349)]>1?arguments[1]:void 0,i=arguments[t(349)]>2?arguments[2]:void 0;if(!e.includes(t(347)))throw new Error("Invalid m3u8 file");const r=function(t){const e=TI;return t.split(/[\r\n]/).map((t=>t[e(431)]()))[e(439)](Boolean)}(e);return WI[t(357)](e)?function(t,e,s){const i=NI,r=new SI;r[i(291)]=e;let n,o=new wI(e),a=null,h=null,c=0,l=0,d=0,u=0,p=!1,f=0;for(;n=t[u++];){if("#"!==n[0]){if(r[i(289)]){l++;continue}o.sn=l,o.cc=d,o.url=PI(n,e),h&&(o[i(309)]=h[i(260)](l)),a&&(o[i(276)]=a),r.segments[i(326)](o),o=new wI(e),l++;continue}const t=LI(n);if(!t)continue;const[u,m]=t;switch(u){case"VERSION":r[i(308)]=parseInt(m);break;case"PLAYLIST-TYPE":r[i(261)]=null==m?void 0:m[i(297)]();break;case i(293):r[i(265)]=parseFloat(m);break;case"PART-INF":{s&&(r[i(289)]=!0);const t=xI(m);t["PART-TARGET"]&&(r[i(311)]=parseFloat(t[i(285)]))}break;case"SERVER-CONTROL":{const t=xI(m);r[i(318)]="YES"===t[i(271)],r[i(322)]=parseFloat(t["PART-HOLD-BACK"]||0),r.canSkipUntil=parseFloat(t[i(313)]||0),r.canSkipDateRanges=r.canSkipUntil>0&&t[i(253)]===i(327)}break;case i(255):p=!0;break;case i(288):l=r.startSN=parseInt(m);break;case i(305):d=r[i(281)]=parseInt(m);break;case"DISCONTINUITY":d++;break;case i(280):o.setByteRange(m,r[i(272)][r[i(272)][i(295)]-1]);break;case i(252):{if(!r[i(289)])break;const t=xI(m);o.duration=parseFloat(t[i(262)]),o[i(321)]="YES"===t.INDEPENDENT,o.sn=l,o.cc=d,o[i(306)]=f,o[i(274)]=c,o[i(298)]=parseFloat(t.DURATION),c+=o[i(298)],o[i(291)]=PI(t.URI,e),h&&(o[i(309)]=h[i(260)](l)),a&&(o[i(276)]=a),r[i(272)][i(326)](o),o=new wI(e),f++}break;case i(263):{const t=xI(m);if(r[i(307)]=t,t[i(296)]===i(252)&&t.URI){const e=t[i(266)].split(i(302))[0][i(275)]("-");r[i(294)]=e[3],r.nextIndex=e[e[i(295)]-1]}}break;case i(319):o[i(316)]=m;break;case i(270):{if(r.lowLatency){f=0;break}const[t,e]=m[i(275)](",");o.start=c,o.duration=parseFloat(t),c+=o[i(298)],o[i(284)]=e}break;case i(273):{const t=xI(m);if("NONE"===t[i(279)]){h=null;break}if(h=new EI,h[i(277)]=t[i(279)],h[i(291)]=/^blob:/[i(259)](t.URI)?t.URI:PI(t.URI,e),h.keyFormat=t[i(304)]||"identity",h.keyFormatVersions=t.KEYFORMATVERSIONS,!h[i(264)]())throw new Error("encrypt "+t[i(279)]+"/"+t[i(304)]+i(290));if(t.IV){let e=t.IV.slice(2);e=(1&e[i(295)]?"0":"")+e,h.iv=new Uint8Array(e[i(295)]/2);for(let t=0,s=e[i(295)]/2;t0!==t[i(298)]));const m=r[i(272)][r[i(272)][i(295)]-1];return m&&(p&&(m[i(254)]=!0),r.endSN=m.sn,r.endPartIndex=m[i(306)]),p&&(r[i(314)]=!1),r[i(292)]=c,r[i(283)]=d,r}(r,s,i):function(t,e){const s=UI,i=new uI;let r,n=0;const o=[],a=[];for(;r=t[n++];){const h=LI(r);if(!h)continue;const[c,l]=h;if("VERSION"===c)i[s(453)]=parseInt(l);else if(c===s(483)&&l){const t=xI(l);let i;switch(t[s(458)]){case s(482):i=new AI;break;case"SUBTITLES":i=new yI;break;default:i=new gI}i[s(464)]=PI(t[s(488)],e),i[s(451)]=t[s(455)]===s(466),i[s(462)]=t[s(497)]===s(466),i[s(475)]=t[s(492)],i[s(493)]=t[s(472)],i[s(486)]=t[s(481)],t.CHANNELS&&(i.channels=Number(t[s(450)].split("/")[0]),Number[s(491)](i[s(471)])&&(i[s(471)]=0)),t[s(458)]===s(482)&&t.URI&&o[s(478)](i),t[s(458)]===s(461)&&a.push(i)}else if(c===s(498)&&l){const r=new vI,o=xI(l);if(r[s(456)]=parseInt(o[s(495)]||o[s(473)]),r[s(493)]=o.NAME,r[s(464)]=PI(t[n++],e),o[s(499)]){const[t,e]=o[s(499)][s(465)]("x");r.width=parseInt(t),r[s(480)]=parseInt(e)}if(o[s(459)]){const t=o.CODECS.split(/[ ,]+/)[s(474)](Boolean);r.videoCodec=MI("video",t),r[s(477)]=MI("audio",t),r[s(452)]=MI("text",t)}r[s(460)]=o[s(482)],r.subtitleGroup=o[s(461)],i.streams[s(478)](r)}}return i.streams[s(485)](((t,e)=>{t.id=e})),o[s(467)]&&(o.forEach(((t,e)=>{t.id=e})),i[s(463)][s(485)]((t=>{const e=s;t[e(460)]&&(t[e(484)]=o[e(474)]((s=>s[e(475)]===t.audioGroup)))}))),a[s(467)]&&(a[s(485)](((t,e)=>{t.id=e})),i[s(463)][s(485)]((t=>{const e=s;t[e(449)]&&(t[e(470)]=a[e(474)]((s=>s[e(475)]===t[e(449)])))}))),i}(r,s)}static[VI(357)](t){const e=VI;return t[e(355)](e(346))||t[e(355)](e(350))}}const HI=KI;function KI(t,e){const s=YI();return(KI=function(t,e){return s[t-=255]})(t,e)}!function(t,e){const s=KI,i=t();for(;;)try{if(894390===parseInt(s(278))/1+-parseInt(s(257))/2+parseInt(s(269))/3+-parseInt(s(280))/4+-parseInt(s(268))/5*(parseInt(s(260))/6)+parseInt(s(264))/7*(parseInt(s(299))/8)+parseInt(s(288))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(YI);class QI{constructor(t){const e=KI;$f(this,e(287),((t,s)=>{const i=e,{response:r,options:n}=t,{firstByteTime:o,startTime:a,endTime:h,contentLength:c}=n||{},l=h-a;this[i(308)][i(261)](vt[i(297)],{time:l,byteLength:c,url:s}),this[i(308)][i(261)](vt[i(272)],{url:s,elapsed:l||0}),this[i(308)].emit(vt.TTFB,{url:s,responseUrl:r[i(289)],elapsed:o-a}),this[i(308)][i(261)](vt.LOAD_RESPONSE_HEADERS,{headers:r[i(291)],url:s})})),$f(this,"_onLoaderRetry",((t,s)=>{const i=e;this[i(308)][i(261)](vt.LOAD_RETRY,{error:cI[i(273)](t),retryTime:s})})),this.hls=t,this[e(265)]=t[e(265)],this[e(305)]="HlsManifestLoader",this._useLowLatency=t[e(284)][e(307)],this[e(298)]=null;const{retryCount:s,retryDelay:i,manifestLoadTimeout:r,fetchOptions:n}=this.hls[e(284)];this._loader=new rI({...n,responseType:e(286),retry:s,retryDelay:i,timeout:r,onRetryError:this._onLoaderRetry},this[e(265)]),this[e(292)]=new rI({...n,responseType:e(286),retry:s,retryDelay:i,timeout:r,onRetryError:this[e(275)]},this[e(265)]),this[e(290)]=new rI({...n,responseType:e(286),retry:s,retryDelay:i,timeout:r,onRetryError:this._onLoaderRetry},this[e(265)])}async destroy(){const t=KI;await this[t(285)](),this[t(292)]&&(this[t(292)][t(283)](),this._audioLoader=null),this[t(290)]&&(this[t(290)].destroy(),this[t(290)]=null),this[t(274)]&&(this[t(274)][t(283)](),this._loader=null)}async[HI(259)](t,e,s){const i=HI;this[i(265)].debugLog(this[i(305)],"load()",t,e,s);const r=[this[i(274)][i(259)](t)];let n,o,a,h,c,l;e&&r[i(296)](this[i(292)][i(259)](e)),s&&r[i(296)](this._subtitleLoader[i(259)](s));try{const[f,m,g]=await Promise.all(r);if(!f)return[];var d,u,p;if(this[i(287)](f,t),n=f[i(293)],h=f.response[i(289)]||t,e)o=null==m?void 0:m.data,a=null==g?void 0:g[i(293)],c=(null==m||null===(d=m[i(255)])||void 0===d?void 0:d[i(289)])||e,l=(null==g||null===(u=g[i(255)])||void 0===u?void 0:u[i(289)])||s,o&&this._emitOnLoaded(m,e),a&&this[i(287)](g,s);else a=null==m?void 0:m.data,l=(null==m||null===(p=m.response)||void 0===p?void 0:p.url)||s,a&&this[i(287)](m,s)}catch(t){throw cI[i(273)](t)}const{onPreM3U8Parse:f}=this[i(308)][i(284)];let m,g,A;try{var y;if(f&&(n=f(n)||n,o&&(o=f(o,!0)||o),a&&(a=f(a,!0)||a)),m=WI[i(270)](n,h,this[i(300)]),!1===(null===(y=m)||void 0===y?void 0:y[i(303)])&&m[i(277)]&&!m[i(277)][i(282)])throw new Error("empty segments list");o&&(g=WI[i(270)](o,c,this[i(300)])),a&&(A=WI.parse(a,l,this[i(300)]))}catch(t){throw new cI(oI[i(294)],oI[i(262)],t)}return m&&(m[i(302)]?this[i(308)][i(261)](vt[i(258)],{playlist:m}):(this[i(300)]&&(m[i(281)]?this[i(266)]=new II(m[i(304)],m[i(263)],""):this.deliveryDirectives=null),this[i(308)][i(261)](vt[i(306)],{playlist:m}))),[m,g,A]}[HI(301)](t,e){const s=HI,{onPreM3U8Parse:i}=this[s(308)].config;let r;try{var n;if(i&&(t=i(t)||t),r=WI[s(270)](t,e,this._useLowLatency),!1===(null===(n=r)||void 0===n?void 0:n[s(303)])&&r.segments&&!r[s(277)][s(282)])throw new Error(s(279))}catch(t){throw new cI(oI.MANIFEST,oI.HLS,t)}return r&&r[s(302)],[r]}[HI(256)](t,e,s,i,r,n){const o=HI;clearTimeout(this[o(298)]),n=n||3e3;let a=this[o(308)][o(284)][o(276)];const h=async()=>{const c=o;clearTimeout(this[c(298)]);let l=t;try{this.deliveryDirectives&&(l=this[c(266)][c(267)](t));const r=await this[c(259)](l,e,s);if(!r[0])return;a=this.hls[c(284)][c(276)],i(r[0],r[1],r[2])}catch(t){a--,a<=0&&r(t)}this._timer=setTimeout(h,n)};this[o(298)]=setTimeout(h,n)}stopPoll(){const t=HI;return clearTimeout(this[t(298)]),this[t(295)]()}[HI(295)](){const t=HI;return Promise[t(271)]([this[t(274)][t(295)](),this._audioLoader[t(295)]()])}}function YI(){const t=["parse","all","LOAD_COMPLETE","network","_loader","_onLoaderRetry","pollRetryCount","segments","1364039oBRgKU","empty segments list","6677320DhUdFo","canBlockReload","length","destroy","config","stopPoll","text","_emitOnLoaded","1712331DNZhEB","url","_subtitleLoader","headers","_audioLoader","data","MANIFEST","cancel","push","SPEED","_timer","7075952QEhttY","_useLowLatency","parseText","isMaster","live","nextSN","TAG_NAME","HLS_LEVEL_LOADED","useLowLatency","hls","response","poll","349886nLXQxD","HLS_MANIFEST_LOADED","load","5100YviqBF","emit","HLS","nextIndex","14FDqCNK","player","deliveryDirectives","addDirectives","3860yubidR","214731tyLprW"];return(YI=function(){return t})()}var qI=JI;function JI(t,e){var s=ZI();return(JI=function(t,e){return s[t-=399]})(t,e)}!function(t,e){for(var s=JI,i=t();;)try{if(571184===-parseInt(s(420))/1*(-parseInt(s(419))/2)+-parseInt(s(406))/3*(parseInt(s(407))/4)+-parseInt(s(411))/5*(-parseInt(s(414))/6)+parseInt(s(410))/7*(parseInt(s(413))/8)+-parseInt(s(405))/9*(parseInt(s(402))/10)+-parseInt(s(416))/11*(-parseInt(s(399))/12)+-parseInt(s(400))/13)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ZI);class XI{constructor(){var t=JI;$f(this,t(418),[]),$f(this,t(421),[])}[qI(401)](t,e){var s=qI;t&&e&&(this[s(421)][s(403)](8e3*t/e),this[s(421)]=this[s(421)].slice(-3))}[qI(408)](t,e){var s=qI;t&&e&&(this[s(418)][s(403)](8e3*t/e),this._chunkSpeeds=this[s(418)][s(417)](-100))}[qI(412)](){var t=qI;return this[t(418)][t(409)]||this._speeds.length?this[t(421)][t(409)]?this[t(421)][t(415)](((t,e)=>t+e))/this[t(421)][t(409)]:this[t(418)].reduce(((t,e)=>t+e))/this[t(418)][t(409)]:0}[qI(422)](){var t=qI;return this[t(418)][t(409)]||this._speeds[t(409)]?this[t(421)][t(409)]?this[t(421)][this[t(421)].length-1]:this[t(418)][this[t(418)][t(409)]-1]:0}[qI(404)](){var t=qI;this[t(418)]=[],this[t(421)]=[]}}function ZI(){var t=["addChunkRecord","length","14rQLmXE","1281365mISwBp","getAvgSpeed","3836440FgUaNB","6myGBDD","reduce","14157elafYX","slice","_chunkSpeeds","2212674tUVlyL","1mCHfdq","_speeds","getLatestSpeed","5196qQMtfI","17477759DjQtHw","addRecord","1343620ZNfBBH","push","reset","63MpEamE","9ujOJNL","30440RmeejC"];return(ZI=function(){return t})()}const $I=tT;function tT(t,e){const s=sT();return(tT=function(t,e){return s[t-=376]})(t,e)}!function(t,e){const s=tT,i=t();for(;;)try{if(446575===parseInt(s(414))/1*(-parseInt(s(423))/2)+parseInt(s(403))/3+parseInt(s(412))/4*(parseInt(s(384))/5)+parseInt(s(411))/6+parseInt(s(420))/7*(parseInt(s(382))/8)+parseInt(s(383))/9+parseInt(s(389))/10*(-parseInt(s(405))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(sT);class eT{constructor(t){const e=tT;$f(this,e(393),((t,s)=>{const i=e,{data:r,response:n,options:o}=t,{firstByteTime:a,startTime:h,endTime:c,contentLength:l}=o||{},d=c-h;this._bandwidthService.addRecord(l||r[i(376)],d),this[i(379)][i(404)](vt[i(396)],{time:d,byteLength:l,url:s}),this[i(379)][i(404)](vt[i(421)],{url:s,elapsed:d||0}),this[i(379)].emit(vt[i(402)],{url:s,responseUrl:n[i(388)],elapsed:a-h}),this[i(379)].emit(vt.LOAD_RESPONSE_HEADERS,{headers:n.headers,url:s})})),$f(this,"_onLoaderRetry",((t,s)=>{const i=e;this.hls.emit(vt[i(409)],{error:cI.network(t),retryTime:s})})),this.hls=t,this.player=t.player,this[e(387)]=null,this[e(406)]={},this._keyCache={},this[e(385)]=new XI;const{retryCount:s,retryDelay:i,loadTimeout:r,fetchOptions:n}=this[e(379)].config;this._segmentLoader=new rI({...n,responseType:e(408),retry:s,retryDelay:i,timeout:r,onRetryError:this._onLoaderRetry},this[e(415)]),this[e(380)]=new rI({...n,responseType:e(408),retry:s,retryDelay:i,timeout:r,onRetryError:this[e(407)]},this[e(415)]),this[e(378)]=new rI({...n,responseType:e(408),retry:s,retryDelay:i,timeout:r,onRetryError:this[e(407)]},this.player)}[$I(417)](){const t=$I;this.reset(),this[t(378)]&&(this[t(378)][t(417)](),this[t(378)]=null),this[t(380)]&&(this[t(380)][t(417)](),this[t(380)]=null),this._segmentLoader&&(this._segmentLoader.destroy(),this[t(386)]=null)}speedInfo(){const t=$I;return{speed:this[t(385)][t(390)](),avgSpeed:this[t(385)][t(392)]()}}[$I(400)](){this[$I(399)]()}load(t,e,s){const i=$I;let r=arguments[i(397)]>3&&void 0!==arguments[3]?arguments[3]:s;const n=[];return t&&(n[0]=this[i(377)](t,s)),e&&(n[1]=this.loadAudioSegment(e,r)),Promise[i(410)](n)}[$I(377)](t,e){const s=$I;return this[s(394)](this[s(386)],t,e)}loadAudioSegment(t,e){return this[$I(394)](this._audioSegmentLoader,t,e)}async[$I(394)](t,e,s){const i=$I;var r;let n,o,a,h,c;const l=[];this.hls[i(404)](vt.LOAD_START,{url:e[i(388)]});const d={};if(Array.isArray(e[i(395)])&&2===e[i(395)].length&&(d.range=e[i(395)]),l[0]=t.load(e.url,d),s&&e[i(419)]){var u;const s=e.initSegment[i(388)];n=this[i(406)][s],!n&&(this.hls.emit(vt[i(418)],{url:s}),l[1]=t[i(413)](s)[i(416)]((t=>{const e=i;if(t){Object.keys(this[e(406)])>30&&(this[e(406)]={}),n=this[e(406)][s]=t.data,this[e(393)](t,s)}})));const r=null===(u=e[i(419)][i(381)])||void 0===u?void 0:u.url;r&&(c=e[i(419)][i(381)].iv,h=this[i(401)][r],!h&&(this[i(379)][i(404)](vt.LOAD_START,{url:r}),l[2]=this[i(378)][i(413)](r)[i(416)]((t=>{const e=i;t&&(h=this[e(401)][r]=t[e(398)],this._emitOnLoaded(t,r))}))))}const p=null===(r=e.key)||void 0===r?void 0:r.url;p&&e.key[i(422)]()&&(a=e.key.iv,o=this._keyCache[p],!o&&(this[i(379)][i(404)](vt[i(418)],{url:p}),l[3]=this[i(378)][i(413)](p)[i(416)]((t=>{const e=i;t&&(o=this[e(401)][p]=t[e(398)],this[e(393)](t,p))}))));const[f]=await Promise.all(l);if(!f)return;const m=f.data;return this[i(393)](f,e[i(388)]),{data:m,map:n,key:o,mapKey:h,keyIv:a,mapKeyIv:c}}[$I(399)](){const t=$I;this.error=null,this[t(406)]={},this._keyCache={},this[t(385)].reset()}async[$I(391)](){const t=$I;await Promise.all([this[t(378)][t(391)](),this[t(386)][t(391)](),this[t(380)][t(391)]()])}}function sT(){const t=["key","5242192hBqgKi","4645908XlglFz","2345ugWOyp","_bandwidthService","_segmentLoader","error","url","230lWczYx","getLatestSpeed","cancel","getAvgSpeed","_emitOnLoaded","_loadSegment","byteRange","SPEED","length","data","reset","resetBandwidth","_keyCache","TTFB","2284644ZReOal","emit","841577MOIVQa","_mapCache","_onLoaderRetry","arraybuffer","LOAD_RETRY","all","2160810dukhqq","276ARlWEn","load","59647EhdFkC","player","then","destroy","LOAD_START","initSegment","7oZPYCl","LOAD_COMPLETE","isSegmentEncrypted","4gffDPx","byteLength","loadVideoSegment","_keyLoader","hls","_audioSegmentLoader"];return(sT=function(){return t})()}const iT=nT;!function(t,e){const s=nT,i=t();for(;;)try{if(587078===parseInt(s(353))/1*(-parseInt(s(334))/2)+parseInt(s(358))/3*(parseInt(s(365))/4)+parseInt(s(340))/5*(parseInt(s(317))/6)+-parseInt(s(363))/7+-parseInt(s(322))/8*(-parseInt(s(344))/9)+parseInt(s(342))/10*(-parseInt(s(346))/11)+-parseInt(s(328))/12)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(oT);class rT{constructor(t,e,s){const i=nT;this[i(321)]=void 0,this.id=0,this[i(364)]=0,this[i(337)]=0,this[i(372)]=0,this[i(383)]="",this.url="",this[i(350)]="",this[i(382)]="",this[i(366)]="",this[i(336)]=0,this[i(375)]=0,this[i(357)]=0,this[i(348)]=-1,this[i(368)]=0,this[i(355)]=0,this[i(333)]=0,this[i(325)]=0,this[i(359)]=!1,this[i(374)]=0,this[i(332)]=!1,this[i(360)]=0,this[i(379)]=!1,this[i(369)]=0,this[i(329)]=null,this.segments=[],this[i(384)]=[],this[i(347)]=[],this.closedCaptions=[],this[i(320)]=null,this.currentSubtitleStream=null,this.TAG_NAME=i(361),this.update(t,e,s)}get lastSegment(){const t=nT;return this[t(324)][t(323)]?this[t(324)][this[t(324)][t(323)]-1]:null}get[iT(370)](){const t=iT;var e;return this.targetDuration||(null===(e=this[t(324)][0])||void 0===e?void 0:e[t(354)])||0}get[iT(319)](){return this[iT(376)]}set[iT(319)](t){this[iT(376)]=t}get[iT(376)](){const t=iT;var e;return(null===(e=this.lastSegment)||void 0===e?void 0:e[t(338)])||0}set endTime(t){const e=iT,s=this.lastSegment;s&&(s[e(354)]=t-s.start)}get[iT(349)](){var t;return(null===(t=this[iT(345)])||void 0===t?void 0:t.endSN)||0}[iT(356)](t,e){const s=iT;return this[s(320)]&&this[s(327)](t,e),this[s(327)](t,e)}[iT(371)](t){const e=iT;if(!t||!this[e(320)])return;const s=t.sn-this.snDiff;return this[e(320)][e(324)][e(335)]((t=>t.sn===s))}[iT(351)](t,e){const s=iT;this[s(339)]=t[s(339)],Array[s(352)](t[s(324)])?((null===this.live||void 0===this[s(321)])&&(this.live=t[s(321)]),this._updateSegments(t,this),this.startCC=t[s(336)],this[s(375)]=t[s(375)],this[s(357)]=t[s(357)],this[s(348)]=t[s(348)]||-1,this[s(368)]=t[s(368)],this.targetDuration=t.targetDuration,this[s(321)]=t[s(321)],this[s(379)]=t[s(379)],this[s(332)]=t[s(332)],this[s(359)]=t[s(359)],this[s(325)]=t.canSkipUntil,this.partHoldBack=t[s(360)],this[s(333)]=t[s(333)],this[s(374)]=t[s(374)],this.endPartIndex=t.endPartIndex,e&&this[s(320)]&&Array[s(352)](e.segments)&&(this[s(378)](e,this[s(320)]),(null===this[s(329)]||void 0===this[s(329)])&&t[s(324)].length&&e[s(324)][s(323)]&&(this[s(329)]=t.segments[0].sn-e[s(324)][0].sn))):(this.id=t.id,this[s(364)]=t.bitrate,this[s(337)]=t[s(337)],this.height=t[s(372)],this.name=t[s(383)],this.audioCodec=t[s(350)],this[s(382)]=t.videoCodec,this[s(366)]=t[s(366)],this[s(384)]=t[s(384)],this[s(347)]=t[s(347)],!this[s(320)]&&this[s(384)].length&&(this[s(320)]=this[s(384)].find((t=>t[s(331)]))||this[s(384)][0]),!this[s(345)]&&this[s(347)][s(323)]&&(this[s(345)]=this.subtitleStreams[s(335)]((t=>t[s(331)]))||this[s(347)][0]))}[iT(330)](t){const e=iT;if(!(t&&this[e(345)]&&Array[e(352)](t.segments)))return;const s=this[e(378)](t,this.currentSubtitleStream),i=this.currentSubtitleStream[e(324)];return i.length>100&&(this.currentSubtitleStream.segments=i[e(326)](100)),s?s[e(343)]((t=>{const s=e;return{sn:t.sn,url:t[s(339)],duration:t[s(354)],start:t[s(318)],end:t.end,lang:this[s(345)][s(362)]}})):void 0}[iT(373)](t){const e=iT,s=this.subtitleStreams[e(335)]((s=>s[e(362)]===t)),i=this[e(345)];s&&(this[e(345)]=s,i.segments=[])}[iT(377)](t){const e=iT;if(!t[e(379)]||!t[e(324)][e(323)])return t;const s=t[e(368)]-t[e(360)],i=t[e(324)];let r=0;for(let t=0,n=i[e(323)];t{const s=e;t[s(318)]=o,o=t[s(338)]})),t.segments=n,t[e(368)]=o,t[e(357)]=n[0].sn,t[e(336)]=n[0].cc,t}_clearSegments(t,e){const s=iT;let i=0;const r=this[s(324)];for(let e=0,s=r.length;e=t){i=e;break}return i>e&&(i=e),i&&(this[s(324)]=this[s(324)][s(326)](i),this[s(320)]&&(this[s(320)][s(324)]=this[s(320)][s(324)][s(326)](i))),e-i}[iT(378)](t,e){const s=iT,i=e[s(324)];if(this.live){const r=t.lowLatency,n=i[i[s(323)]-1],o=(null==n?void 0:n.sn)??-1,a=(null==n?void 0:n.partIndex)||0;let h=ot.sn===o&&t[s(341)]===a)),h=r<0?t[s(324)]:t[s(324)][s(326)](r+1);if(i[s(323)]&&h.length){let t=n[s(338)];h[s(380)]((e=>{const i=s;e[i(318)]=t,t=e[i(338)]}));const e=(null==n?void 0:n.cc)||-1;e>h[0].cc&&h[s(380)]((t=>t.cc+=e))}return e.endSN=t[s(348)],e[s(324)]=i.concat(h),h}}else e.segments=t[s(324)]}}function nT(t,e){const s=oT();return(nT=function(t,e){return s[t-=317]})(t,e)}function oT(){const t=["duration","targetDuration","clearOldSegment","startSN","25425ZDMaEe","canSkipDateRanges","partHoldBack","HlsStream","lang","2203593yITfGK","bitrate","40dOYHjL","textCodec","findIndex","totalDuration","endPartIndex","segmentDuration","getAudioSegment","height","switchSubtitle","skippedSegments","endCC","endTime","_setLLPlaybackPoint","_updateSegments","lowLatency","forEach","independent","videoCodec","name","audioStreams","114ZQNyzg","start","liveEdge","currentAudioStream","live","8DpqFfk","length","segments","canSkipUntil","slice","_clearSegments","5462244aSCtbW","snDiff","updateSubtitle","default","canBlockReload","partTargetDuration","2Pufdmo","find","startCC","width","end","url","171310Ussurr","partIndex","88440gtBQus","map","7809309BvlZml","currentSubtitleStream","132XhSxPr","subtitleStreams","endSN","currentSubtitleEndSn","audioCodec","update","isArray","140237bhFSlY"];return(oT=function(){return t})()}var aT=hT;function hT(t,e){var s=cT();return(hT=function(t,e){return s[t-=238]})(t,e)}function cT(){var t=["isLive","updateSubtitle","7355488DXTomu","feedbackLiveEdge","currentStream","switchSubtitle","setNextSegmentByIndex"," startTime <= 0","590010QOYyCA","78uqUKaF","seekRange","player","duration","reduce","nbSegments","debugLog","liveEdge","clearOldSegment() segments.length:","updateSegmentsRanges","hls"," and clamp result is ","clearOldSegment() stream.endTime:","checkSegmentTrackChange","upsertPlaylist","hasVideo","maxPlaylistSize","nextSegment","totalDuration","update","start","getSegmentByIndex","lastSegment","SUBTITLE_SEGMENTS","setNextSegmentByIndex()","_segmentPointer","TAG_NAME","6966204UYbjqo","forEach","abs","streams","getAudioSegment","endTime","1121704tPSFgZ","segments","setNextSegmentBySN","isMaster","reset","isArray"," <= maxPlaylistSize:","lowLatency","destroy","currentSubtitleStream","url","clearOldSegment","17067fpnHMC","moveSegmentPointer","1696952vGtGyY","HlsPlaylist","currentSubtitleEndSn","9gFlGAN","187csxinv",", this.dvrWindow:","length","currentSegments","dvrWindow","emit","hasAudio","hadSegmentLoaded","119674wJXRSU","findSegmentIndexByTime","5kvCxJR","end"];return(cT=function(){return t})()}!function(t,e){for(var s=hT,i=t();;)try{if(727045===parseInt(s(286))/1+parseInt(s(299))/2*(-parseInt(s(272))/3)+-parseInt(s(274))/4*(parseInt(s(288))/5)+parseInt(s(254))/6+-parseInt(s(292))/7+parseInt(s(260))/8*(parseInt(s(277))/9)+parseInt(s(298))/10*(parseInt(s(278))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(cT);class lT{constructor(t){var e=hT;this[e(309)]=t,this[e(301)]=t[e(301)],this[e(257)]=[],this[e(294)]=null,this.dvrWindow=0,this[e(252)]=-1,this[e(253)]=e(275)}[aT(268)](){this[aT(264)]()}get lowLatency(){var t,e=aT;return null===(t=this[e(294)])||void 0===t?void 0:t[e(267)]}get[aT(249)](){var t,e=aT;return null===(t=this.currentStream)||void 0===t?void 0:t[e(249)]}get currentSegment(){var t,e=aT;return null===(t=this[e(281)])||void 0===t?void 0:t[this[e(252)]]}get[aT(244)](){var t,e=aT;return null===(t=this.currentSegments)||void 0===t?void 0:t[this[e(252)]+1]}get currentSegments(){var t,e=aT;return null===(t=this[e(294)])||void 0===t?void 0:t[e(261)]}get[aT(276)](){var t,e=aT;return null===(t=this[e(294)])||void 0===t?void 0:t[e(276)]}get[aT(306)](){var t,e=aT;return null===(t=this.currentStream)||void 0===t?void 0:t[e(306)]}set liveEdge(t){var e=aT;this[e(294)]&&(this.currentStream[e(306)]=t)}get[aT(245)](){var t,e=aT;return(null===(t=this[e(294)])||void 0===t?void 0:t[e(245)])||0}get[aT(300)](){var t=aT;const e=this[t(281)];if(e&&e[t(280)])return[e[0].start,e[e[t(280)]-1][t(289)]]}get[aT(304)](){var t,e=aT;return(null===(t=this.currentSegments)||void 0===t?void 0:t[e(280)])||0}get isEmpty(){var t,e=aT;return!(null!==(t=this[e(281)])&&void 0!==t&&t[e(280)])}get[aT(290)](){var t;return null===(t=this[aT(294)])||void 0===t?void 0:t.live}get[aT(285)](){return-1!==this._segmentPointer}get hasSubtitle(){var t,e=aT;return!(null===(t=this.currentStream)||void 0===t||!t[e(269)])}[aT(258)](t){var e,s=aT;return null===(e=this[s(294)])||void 0===e?void 0:e[s(258)](t)}[aT(273)](t){var e,s=aT;null==t&&(t=this[s(252)]+1),this[s(252)]=Ve(t,-1,null===(e=this[s(281)])||void 0===e?void 0:e[s(280)]),this.player[s(305)](this.TAG_NAME,"moveSegmentPointer() and param pos is "+t+s(238)+this[s(252)])}[aT(264)](){var t=aT;this[t(257)]=[],this[t(294)]=null,this[t(282)]=0,this[t(252)]=-1}getSegmentByIndex(t){var e;return null===(e=this[aT(281)])||void 0===e?void 0:e[t]}setNextSegmentByIndex(){var t=aT;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this._segmentPointer=e-1,this[t(301)].debugLog(this[t(253)],t(251),e,this[t(252)])}[aT(262)](){var t,e=aT;let s=arguments[e(280)]>0&&void 0!==arguments[0]?arguments[0]:0;const i=null===(t=this[e(281)])||void 0===t?void 0:t.findIndex((t=>t.sn===s));return-1!==i&&this[e(296)](i+1),i}[aT(287)](t){var e=aT;const s=this[e(281)];if(s){for(let i,r=0,n=s[e(280)];r=i[e(247)]&&tt[i(270)]))[i(255)](((t,e)=>{var s=i;this[s(257)][e]?this.streams[e][s(246)](t):this.streams[e]=new rT(t)})),this[i(294)]=this.streams[0];else if(Array[i(265)](t[i(261)])){const r=this[i(294)];if(r){r.update(t,e,s);const n=r[i(291)](s);n&&this[i(309)][i(283)](vt[i(250)],{list:n})}else this[i(264)](),this[i(294)]=this[i(257)][0]=new rT(t,e,s)}this.currentStream&&this[i(309)][i(290)]&&!this[i(282)]&&(this[i(282)]=this.currentSegments[i(303)](((t,e)=>t+=e[i(302)]),0))}[aT(308)](t,e){var s,i=aT;(null===(s=this[i(281)])||void 0===s?void 0:s.filter((e=>e.sn>=t)))[i(255)]((t=>{var s=i;t.start=e,e=t[s(289)]}))}[aT(295)](t){var e;null===(e=this[aT(294)])||void 0===e||e.switchSubtitle(t)}clearOldSegment(){var t=aT;let e=arguments[t(280)]>0&&void 0!==arguments[0]?arguments[0]:this[t(309)].config[t(243)]||50;const s=this[t(294)];if(!this[t(282)]||!s)return;const i=s[t(259)]-this[t(282)];if(i<=0)return void this[t(301)][t(305)](this[t(253)],t(239)+s[t(259)]+t(279)+this[t(282)]+t(297));const r=s[t(261)];if(r.length<=e)return void this[t(301)][t(305)](this.TAG_NAME,t(307)+r[t(280)]+t(266)+e);const n=this[t(252)];this[t(252)]=s[t(271)](i,n),this[t(301)].debugLog(this.TAG_NAME,"clearOldSegment() update _segmentPointer: old -> new",n,this[t(252)])}[aT(240)](t,e){var s=aT;const i=this[s(287)](t),r=this.getSegmentByIndex(i);if(!r)return;if(!r.hasAudio&&!r[s(242)])return;if(2!==e&&r[s(284)]&&r[s(242)])return r;if(r[s(289)]-t>.3)return;const n=this[s(248)](i+1);return n&&(n[s(284)]||n[s(242)])&&(n[s(284)]!==r[s(284)]||n[s(242)]!==r[s(242)])?n:void 0}[aT(293)](t,e){var s;if(!this[aT(281)])return;(null===(s=this.lastSegment)||void 0===s?void 0:s.sn)===t.sn?this.liveEdge=e:this.updateSegmentsRanges(t.sn+1,e)}}function dT(t,e){const s=pT();return(dT=function(t,e){return s[t-=441]})(t,e)}const uT=dT;function pT(){const t=["importKey","CBC","4084290fANceR","_decryptData","622062WjEPTC","keyIv","AES","player","15956myFPwH","359419fZQdgM","destroy","2wyGekH","74136pcNWTM","32SlfQoV","AES-CBC","all","25hwGlBF","map","key","data","303737UJjBdu","encrypt","raw","_decryptSegment","externalDecryptor","subtle","949vbIhXl","207ocEnSJ","decrypt","3399EhJLXJ","6470NSFisf"];return(pT=function(){return t})()}!function(t,e){const s=dT,i=t();for(;;)try{if(275882===parseInt(s(464))/1*(-parseInt(s(466))/2)+-parseInt(s(451))/3*(-parseInt(s(463))/4)+parseInt(s(471))/5*(-parseInt(s(459))/6)+-parseInt(s(444))/7*(-parseInt(s(468))/8)+parseInt(s(457))/9+-parseInt(s(454))/10*(parseInt(s(453))/11)+parseInt(s(467))/12*(parseInt(s(450))/13))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(pT);class fT{constructor(t,e){const s=dT;this.hls=t,this[s(462)]=e;const i=window.crypto||window.msCrypto;this[s(449)]=i&&(i[s(449)]||i.webkitSubtle),this[s(448)]=null}[uT(465)](){const t=uT;var e;null!==(e=this[t(448)])&&void 0!==e&&e[t(465)]&&this[t(448)].destroy()}[uT(452)](t,e){const s=uT;if(!t&&!e)return;const i=[];return t&&(i[0]=this[s(447)](t)),e&&(i[1]=this[s(447)](e)),Promise[s(470)](i)}async _decryptSegment(t){const e=uT;let s=t[e(443)];return t[e(442)]&&(s=await this[e(458)](t[e(443)],t[e(442)],t[e(460)])),t.map?Df(t[e(441)],s):s}async _decryptData(t,e,s){const i=uT;if(this.externalDecryptor)return await this[i(448)].decrypt(t,e,s);if(this[i(449)]){const r=await this[i(449)][i(455)](i(446),e,{name:i(469)},!1,[i(445),i(452)]),n=await this[i(449)].decrypt({name:i(469),iv:s},r,t);return new Uint8Array(n)}t=Ku(t),e=Ku(e),s=Ku(s);return function(t){const{words:e}=t,{sigBytes:s}=t,i=new Uint8Array(s);for(let t=0;t>>2]>>>24-t%4*8&255;return i}(zu[i(461)][i(452)]({ciphertext:t},e,{iv:s,mode:zu.mode[i(456)]}))}}function mT(){const t=1,e=2,s="hlsTs";class i{constructor(t){this.type=t.type,this.baseFps=0,this.playRate=1,this.fpsInterval=null,this.calcSampleInterval=null,this.preLoopTimestamp=null,this.seekingTime=null,this.seekingMaxDiff=t.seekingMaxDiff||1e4,this.allSampleList=[],this.isDebug=t.debug||!1,this.TAG_NAME=t.type+"LoopWorker",this.debugUuid=t.debugUuid||"xxxx",this.debugLevel=t.debugLevel||"warn",this._startCalcSampleInterval(),this.debugLog(this.TAG_NAME,"init",t)}destroy(){this._clearInterval(),this._clearCalcSampleInterval(),this.baseFps=0,this.playRate=1,this.allSampleList=[],this.preLoopTimestamp=null,this.seekingTime=null}updateBaseFps(t){this.debugLog(this.TAG_NAME,`updateBaseFps() baseFps is ${t}`),this.baseFps=t,this._clearInterval(),this._startInterval()}updatePlayRate(t){this.debugLog(this.TAG_NAME,`updatePlayRate() rate is ${t}`),this.playRate=t}seekSampleRange(t){this.debugLog(this.TAG_NAME,`seekSampleRange() time is ${t}`);const s=1e3*t;let i=0,r=-1;for(let t=0;t{let e=(new Date).getTime();for(let t=0;t1&&this.allSampleList.length>0&&this.debugWarn(this.TAG_NAME,`loop interval is ${s}ms, and fragDuration is ${t}ms, diffFps is ${i}, and allSampleList length is ${this.allSampleList.length}`),this.preLoopTimestamp=(new Date).getTime()}),t)}_clearInterval(){this.fpsInterval&&(clearInterval(this.fpsInterval),this.fpsInterval=null),this.preLoopTimestamp=null}_startCalcSampleInterval(){this.debugLog(this.TAG_NAME,"_startCalcSampleInterval()"),this._clearCalcSampleInterval(),this.calcSampleInterval=setInterval((()=>{this._calcSampleList()}),1e3)}_clearCalcSampleInterval(){this.calcSampleInterval&&(clearInterval(this.calcSampleInterval),this.calcSampleInterval=null)}_calcSampleList(){const i={buferredDuration:0,allListLength:this.allSampleList.length,start:this.allSampleList[0]?this.allSampleList[0].dts:0,end:this.allSampleList[this.allSampleList.length-1]?this.allSampleList[this.allSampleList.length-1].dts:0,audioListLength:0,videoListLength:0};this.allSampleList.forEach((r=>{r.type===e?(i.videoListLength++,r.duration&&(this.type===s?i.buferredDuration+=Math.round(r.duration/90):i.buferredDuration+=r.duration)):r.type===t&&i.audioListLength++})),postMessage({cmd:"sampleListInfo",...i})}_loop(){let s=null;if(this.allSampleList.length)if(s=this.allSampleList.shift(),s.type===e){postMessage({cmd:"decodeVideo",...s},[s.payload.buffer]);let e=this.allSampleList[0];for(;e&&e.type===t;)s=this.allSampleList.shift(),postMessage({cmd:"decodeAudio",...s},[s.payload.buffer]),e=this.allSampleList[0]}else if(s.type===t){postMessage({cmd:"decodeAudio",...s},[s.payload.buffer]);let i=this.allSampleList[0];for(;i;){if(s=this.allSampleList.shift(),s.type===e){postMessage({cmd:"decodeVideo",...s},[s.payload.buffer]),i=null;break}s.type===t&&(postMessage({cmd:"decodeAudio",...s},[s.payload.buffer]),i=this.allSampleList[0])}}}debugLog(t){if(this.isDebug&&"debug"==this.debugLevel){for(var e=arguments.length,s=new Array(e>1?e-1:0),i=1;i1?e-1:0),i=1;i1?e-1:0),i=1;i{const e=t.data;switch(e.cmd){case"init":r=new i(e.options);break;case"updateBaseFps":r.updateBaseFps(e.baseFps);break;case"updatePlayRate":r.updatePlayRate(e.rate);break;case"seekSampleRange":r.seekSampleRange(e.time);break;case"cleanSampleList":r.cleanSampleList();break;case"setSeekingTime":r.setSeekingTime(e.time);break;case"pause":r.pause();break;case"resume":r.resume();break;case"sample":r.pushSample(e);break;case"destroy":r.destroy(),r=null}}}!function(t,e){const s=wT,i=t();for(;;)try{if(890208===-parseInt(s(323))/1+parseInt(s(331))/2+-parseInt(s(330))/3+-parseInt(s(329))/4+-parseInt(s(327))/5*(-parseInt(s(326))/6)+-parseInt(s(320))/7*(-parseInt(s(324))/8)+-parseInt(s(325))/9*(-parseInt(s(321))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(vT);const gT=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],AT=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],yT=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],bT=[0,1,1,4];function vT(){const t=["5343364epqwSO","2135883cxqojU","1747874IovTyP","length","14lFGzoB","15140BlkCaJ","floor","116532lIDEUV","1999728nFraAc","4014HgGRuz","1314DgXcXb","22955KuDACu","match"];return(vT=function(){return t})()}let ST=null;function wT(t,e){const s=vT();return(wT=function(t,e){return s[t-=319]})(t,e)}function ET(t,e){const s=wT,i=t[e+1]>>3&3,r=t[e+1]>>1&3,n=t[e+2]>>4&15,o=t[e+2]>>2&3;if(1!==i&&0!==n&&15!==n&&3!==o){const a=t[e+2]>>1&1,h=t[e+3]>>6,c=1e3*gT[14*(3===i?3-r:3===r?3:4)+n-1],l=AT[3*(3===i?0:2===i?1:2)+o],d=3===h?1:2,u=yT[i][r],p=bT[r],f=8*u*p,m=Math[s(322)](u*c/l+a)*p;if(null===ST){const t=(navigator.userAgent||"")[s(328)](/Chrome\/(\d+)/i);ST=t?parseInt(t[1]):0}return!!ST&&ST<=87&&2===r&&c>=224e3&&0===h&&(t[e+3]=128|t[e+3]),{sampleRate:l,channelCount:d,frameLength:m,samplesPerFrame:f}}}function IT(t,e){const s=kT();return(IT=function(t,e){return s[t-=277]})(t,e)}const TT=IT;function kT(){const t=["getInputByteLength","572448qrQSPu","length",",\n next dts is ","large video gap between frames,\n time is ","Unsupported stream. type: ",", sampleRate:","_basefps","onmessage",",\n ref sample duration is ","isEmitSEI","_opt","video","_initLoopWorker()","round",",sampleRateIndex: ","_initLoopWorker",",\n detect is: ","subarray","allListLength","loop worker is not init, can not post message","forEach","1183986FsIqWi","setSeekingTime","isPlayVodNotUseMSE","channelCount",",\n origin dts is ","_needForceFixLargeGap","_doDecodeVideo","large av first frame gap,\n video pts: ","_fixVideo","_baseDtsInited","decodeAudio","debug","_audioNextPts","seekSampleRange","videoListLength",",\n duration is ","set","workerClearTimeout","playVodTimeCache","_doFixAudioInternal","audio gap detected, silent frame is not support, count is ",", channel: ","correctSamplePts","isPlayVod"," < frameLength ","isUseMSE","sort",",\n next dts is ","large video gap between chunk,\n next dts is ","hlsTs","frameLength","large audio gap detected,\n time is ","_doDecodeAudio","decodeVideo","_calcDecodeFps","_isUseWorker","_resetBaseDtsWhenStreamBreaked","startPrefixError","_calculateBaseDts",",\n base dts: ","updatePlayRate","_hasCalcFps"," > ","h264","_hasVideo","_fixAudio","aac seq header","_parseAudioData() G711 PES unknown PTS","Cannot parse avc units","_audioPesData","_videoPid","originPts","_parsePES","buffer","emit","demuxStart","\n pts is ","profile: ","sampleDuration","init","cryptoPayload","_hasAudio","_demux","metadataTrack","debugLevel","workerUrl","cleanSampleList","getSampleRange","_pmtId","player","destroy","hasAudio","88246IPZQKF","initAudioTrack"," < 0,\n ref Sample DurationInt is ","_createVideoSample","HlsTsDemux","h265","_postMessageToLoopWorker","_parseVideoData","debugUuid",",\n sample duration is ","isIFrame","cts","_largeGapThreshold",",\n dts is ","aac seq header not send","floor","seiSamples",", pid: ","audio","_codecType","codec","buferredDuration","samples","sps","concat","originalPts","_fix","min","audioListLength","_videoLastSample","_remainingPacketData","listen playVodRateChange","URL","TAG_NAME","debugWarn","push","start","isSeeking","sampleListInfo",",\n count is ",",\n sample Duration is ","fpsDen","_lastAudioExceptionOverlapDot",",\n audio pts: ","4223994DUQoRm","resume","_baseVideoDts","getPlayVodDuration","terminate","tempSampleListInfo","getSampleListLength","debugLog","audio gap detected,\n pts is "," || ",",\n originPts is ","aac parseADTS error","baseMediaDecodeTime","_videoPesData","6799205UXHTLY",",\n first dts is ","_baseAudioDts","sampleRate",",\n nextPts is ",",\n ref sample duration is ","_videoTimestampBreak","fpsNum","_times","error","pps","_audioTimestampBreak","type","calcIframeIntervalTimestamp","pause","samplesPerFrame","MP3","loopWorker","updateStats","_prevPlayVodTimeCache","pts","probe","audio overlap detected,\n pts is ","G711U","revokeObjectURL","data","frames","initMetadataTrack","_gopId","abs","demuxAndFix","sample","isFinite","initVideoTrack","cleanSampleListAndSetSeekTime","vps","byteLength","dts","clearBuffer","map","audioTrack","_parseAudioData() MPEG PES unknown PTS","G711A",",\n nextPts is ","_parsePES startPrefix should be 1 but with value ","geVodLoadedTime","timescale","originalDts","_audioCodecType","_baseDts","videoTrack","_lastAudioExceptionLargeGapDot","end","_audioLastSample","_audioPid","pid is 0x1fff and ignore","G711 frameData.length ","_videoNextDts","samplingFrequencyIndex","3753310aBuhks","4rgxChF","TS packet did not start with 0x47","_lastAudioExceptionGapDot","cryptoPayloadAudio","payload","_isSendAACSeqHeader","baseDts","postMessage","formatTimescale","_parseAudioData","no video pes data","9474008mRvMRK","_doDecodeByHls","_pps","playVod","objectType","pid is 17 and ignore","playVodRateChange"];return(kT=function(){return t})()}!function(t,e){const s=IT,i=t();for(;;)try{if(504221===-parseInt(s(348))/1+parseInt(s(485))/2+-parseInt(s(506))/3*(parseInt(s(466))/4)+-parseInt(s(465))/5+-parseInt(s(392))/6+parseInt(s(406))/7+parseInt(s(477))/8)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(kT);class _T extends Dp{constructor(t){const e=IT;super(t),this[e(345)]=t,this[e(344)]=-1,this[e(378)]=null,this._videoPesData=[],this[e(325)]=[],this[e(434)]=0,this[e(326)]=-1,this._audioPid=-1,this[e(367)]=G[e(319)],this[e(454)]=H.AAC,this._vps=null,this._sps=null,this[e(479)]=null,this[e(381)]=e(352),this[e(456)]=_T.initVideoTrack(),this[e(446)]=_T.initAudioTrack(),this[e(339)]=_T[e(433)](),this._baseDts=-1,this[e(394)]=-1,this[e(408)]=-1,this[e(285)]=!1,this[e(491)]=25,this._prevPlayVodTimeCache=0,this[e(337)]=!1,this[e(320)]=!1,this[e(288)]=void 0,this[e(463)]=void 0,this[e(417)]=!1,this[e(412)]=!1,this[e(468)]=0,this[e(390)]=0,this[e(457)]=0,this._needForceFixLargeGap=!0,this[e(360)]=45e4,this[e(471)]=!1,this[e(293)]=null,this[e(341)]=null,this[e(423)]=null,this[e(397)]={},this[e(441)]=null,this[e(371)]=null,this.pps=null,this._isUseWorker()&&this[e(500)](),this[e(345)].isPlayVod()&&this[e(311)]()&&this[e(345)].on(M[e(483)],(t=>{const s=e;this[s(345)][s(399)](this.TAG_NAME,s(379),t),this[s(354)](s(316),{rate:t})})),this[e(345)][e(399)](this.TAG_NAME,e(335))}[TT(346)](){const t=TT;super.destroy(),this.workerUrl&&(URL[t(430)](this.workerUrl),this[t(341)]=null),this.workerClearTimeout&&(clearTimeout(this[t(293)]),this.workerClearTimeout=null),this[t(423)]&&(this[t(423)].postMessage({cmd:t(346)}),this[t(423)][t(396)](),this[t(423)]=null),this[t(456)]=null,this[t(446)]=null,this[t(339)]=null,this[t(397)]={},this[t(455)]=-1,this[t(285)]=!1,this[t(491)]=25,this[t(317)]=!1,this[t(425)]=0,this._audioNextPts=void 0,this._videoNextDts=void 0,this[t(417)]=!1,this[t(412)]=!1,this._lastAudioExceptionGapDot=0,this._lastAudioExceptionOverlapDot=0,this[t(457)]=0,this[t(471)]=!1,this[t(345)][t(399)](this[t(381)],t(346))}static[TT(439)](){return{samples:[]}}static[TT(349)](){return{samples:[]}}static[TT(433)](){return{flvScriptSamples:[],seiSamples:[]}}static[TT(427)](t){return!!t.length&&(71===t[0]&&71===t[188]&&71===t[376])}_parsePES(t){const e=TT,s=t[8];if(null==s||t.lengtht[e(486)]-6)return;let n,o;const a=t[7];return 192&a&&(n=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&a?(o=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,n-o>54e5&&(n=o)):o=n),{data:t[e(502)](9+s),pts:n,dts:o,originalPts:n,originalDts:o}}_demux(t){const e=TT;let s=arguments[e(486)]>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments[e(486)]>2&&void 0!==arguments[2])||arguments[2];s&&(this[e(344)]=-1,this[e(456)]=_T[e(439)](),this[e(446)]=_T[e(349)](),this.metadataTrack=_T[e(433)]()),!i||s?(this._remainingPacketData=null,this._videoPesData=[],this._audioPesData=[],this[e(345)][e(299)]()&&this.player[e(480)][e(385)]()&&(this[e(456)][e(370)]=[],this[e(446)].samples=[],this[e(339)].seiSamples=[])):(this[e(456)].samples=[],this.audioTrack[e(370)]=[],this[e(339)][e(364)]=[],this[e(378)]&&(t=Df(this[e(378)],t),this[e(378)]=null));let r=t.length;const n=r%188;n&&(this._remainingPacketData=t.subarray(r-n),r-=n);for(let s=0;s>4>1){if(n=s+5+t[s+4],n===s+188)continue}else n=s+4;switch(r){case 0:i&&(n+=t[n]+1),this[e(344)]=(31&t[n+10])<<8|t[n+11];break;case this[e(344)]:{i&&(n+=t[n]+1);const s=n+3+((15&t[n+1])<<8|t[n+2])-4;for(n+=12+((15&t[n+10])<<8|t[n+11]);n{const s=i,o=r?t[0]>>>1&63:31&t[0];switch(o){case 5:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:if(!r&&5!==o||r&&5===o)break;n.isIFrame=!0,this[s(434)]++;break;case 6:case 39:case 40:if(!r&&6!==o||r&&6===o)break;const i=xe(function(t){const e=Ce,s=t[e(214)],i=[];let r=1;for(;r=i)return;const n=r,o=[],a=(60&t[r+2])>>>2,h=ce[a];if(!h)throw new Error("Invalid sampling index: "+a);const c=1+((192&t[r+2])>>>6),l=(1&t[r+2])<<2|(192&t[r+3])>>>6;let d,u,p=0;const f=Ae(h);for(;r+7>5,i-r=i?void 0:t[s(515)](r),frames:o,samplingFrequencyIndex:a,sampleRate:h,objectType:c,channelCount:l,originCodec:"mp4a.40."+c}}(e[t(431)],e[t(373)]);if(s){if(this[t(446)][t(368)]=s[t(368)],this.audioTrack[t(409)]=s[t(409)],this.audioTrack[t(279)]=s[t(279)],!this[t(471)]){const e=ue({profile:s.objectType,sampleRate:s[t(464)],channel:s.channelCount});this[t(471)]=!0,this[t(345)][t(399)](this[t(381)],t(322),t(333)+s[t(481)]+t(490)+s[t(409)]+t(499)+s[t(464)]+t(297)+s.channelCount),this[t(478)](e,D.audio,0,!1,0)}if(this._isSendAACSeqHeader){const e=[];s[t(432)].forEach((s=>{const i=t,r=s[i(426)],n=new Uint8Array(s[i(431)][i(486)]+2);n[i(292)]([175,1],0),n[i(292)](s[i(431)],2);const o={type:D[i(366)],pts:r,dts:r,payload:n};e.push(o)})),this[t(446)][t(370)]=this[t(446)][t(370)][t(372)](e)}else this[t(345)][t(382)](this.TAG_NAME,t(362))}else this[t(345)][t(382)](this[t(381)],t(403))}else if(this._audioCodecType===H.MP3){const r=e.data,n=r[t(486)];let o=0,a=0;const h=e[t(426)];if(void 0===h)return void this[t(345)][t(382)](this[t(381)],t(447));const c=[];for(;ar[t(486)])return;const e=ET(r,a);if(!(e&&a+e.frameLength<=r[t(486)]))break;{const s=h+o*(9e4*e[t(421)]/e[t(409)]),i=r[t(502)](a,a+e[t(306)]);this[t(446)].channelCount=e[t(279)],this.audioTrack[t(409)]=e[t(409)];const n=new Uint8Array(i+1);n[t(292)]([32],0),n.set(i,1);const l={type:D.audio,pts:s,dts:s,payload:n};c[t(383)](l),a+=e.frameLength,o++}}else a++;this[t(446)][t(370)]=this[t(446)][t(370)][t(372)](c)}else if(this[t(454)]===H[t(448)]||this[t(454)]===H.G711U){const s=[];this[t(446)][t(279)]=1,this.audioTrack[t(409)]=8e3;const i=320,r=9e4*i/8e3,n=e[t(426)];if(void 0===n)return void this[t(345)][t(382)](this[t(381)],t(323));const o=this[t(454)]===H.G711A;for(let a=0;a0&&void 0!==arguments[0]?arguments[0]:0,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments[t(486)]>2&&void 0!==arguments[2])||arguments[2];e=Math[t(498)](9e4*e);const r=this[t(456)],n=this[t(446)],o=r[t(370)],a=n[t(370)];if(!o[t(486)]&&!a.length)return;const h=o[0],c=a[0];let l=0;if(o.length&&a[t(486)]&&(l=h[t(443)]-c[t(426)]),!this[t(285)]&&this._calculateBaseDts(),s&&(this._calculateBaseDts(),this[t(455)]-=e,this[t(408)]-=e,this._baseVideoDts-=e),!i){this[t(463)]=l>0?e+l:e,this[t(288)]=l>0?e:e-l,this[t(281)]&&(this[t(463)]=0,this[t(288)]=0);const s=h?h[t(443)]-this._baseDts-this[t(463)]:0,i=c?c[t(426)]-this[t(455)]-this._audioNextPts:0;Math[t(435)](s||i)>Bt&&(this[t(314)](this[t(446)],this.videoTrack),this[t(455)]-=e)}this[t(312)](),this[t(321)](n),this[t(284)](r),this[t(339)][t(364)].length&&this[t(345)][t(495)][t(494)]&&this[t(339)][t(364)][t(505)]((e=>{const s=t;this.player.emitVideoSei({ts:(e[s(327)]-this._baseDts)/90,data:e[s(431)]})})),r[t(370)][t(486)]&&(r[t(404)]=r[t(370)][0][t(443)]),n[t(370)].length&&(n.baseMediaDecodeTime=n[t(370)][0][t(426)]*n[t(452)]/9e4),this[t(298)](r,450),this[t(298)](n,450);let d=r[t(370)].concat(n[t(370)]);d=d[t(445)]((e=>{const s=t;return e[s(443)]=Math.round(e[s(443)]/90),e[s(426)]=Math[s(498)](e[s(426)]/90),e[s(359)]=e.pts-e[s(443)],e}))[t(302)](((e,s)=>{const i=t;return e[i(443)]-s[i(443)]})),d.forEach((e=>{const s=t,i=new Uint8Array(e[s(470)]);delete e[s(470)],this[s(311)]()?this[s(423)].postMessage({...e,payload:i,cmd:s(437)},[i[s(329)]]):e[s(418)]===D[s(496)]?this[s(282)]({...e,payload:i}):e[s(418)]===D[s(366)]&&this[s(308)]({...e,payload:i})})),ci(this[t(317)])&&this[t(311)]()&&(this[t(317)]=this[t(310)](d))}_calculateBaseDts(){const t=TT,e=this[t(446)],s=this[t(456)],i=e[t(370)],r=s.samples;if(!i[t(486)]&&!r[t(486)])return!1;let n=1/0,o=1/0;i.length&&(e[t(472)]=n=i[0].pts),r.length&&(s[t(472)]=o=r[0][t(443)]),this[t(455)]=Math[t(375)](n,o);const a=o-n;let h=!1;return Number[t(438)](a)&&Math[t(435)](a)>45e3&&this[t(345)][t(382)](this.TAG_NAME,t(283)+o+t(391)+n+t(315)+this[t(455)]+t(501)+a),Number[t(438)](a)&&Math[t(435)](a)>this._largeGapThreshold*xt&&(h=!0),!this[t(285)]&&(h&&this[t(281)]?this[t(281)]=!0:this[t(281)]=!1),this._baseDtsInited=!0,!0}_resetBaseDtsWhenStreamBreaked(){const t=TT;if(this[t(285)]&&this[t(412)]&&this[t(417)]){if(!this[t(314)](this[t(446)],this[t(456)]))return;this._baseDts-=Math.min(this[t(288)],this._videoNextDts),this[t(459)]=null,this[t(377)]=null,this[t(412)]=!1,this[t(417)]=!1}}_fixAudio(t){const e=TT,s=t[e(370)];s[e(486)]&&(s[e(505)]((t=>{const s=e;t.pts-=this[s(281)]?this[s(408)]:this[s(455)],t.dts=t[s(426)]})),this[e(295)](t,s,9e4))}[TT(284)](t){const e=TT,s=t[e(370)];if(!s[e(486)])return;if(s[e(505)]((t=>{const s=e;t.dts-=this._needForceFixLargeGap?this[s(394)]:this[s(455)],t.pts-=this[s(281)]?this[s(394)]:this[s(455)]})),void 0===this[e(463)]){const t=s[0];this[e(463)]=t[e(443)]}const i=s.length;let r=0;const n=s[0],o=s[1],a=this[e(463)]-n[e(443)];if(Math.abs(a)>45e3)if(n[e(443)]+=a,n[e(426)]+=a,this[e(345)][e(382)](this.TAG_NAME,e(304)+this[e(463)]/90+e(407)+n.dts/90+e(487)+(o&&o[e(443)]||0)/90+e(291)+a/90+e(318)+45e3),n[e(443)]+=a,n.pts+=a,o&&Math[e(435)](o[e(443)]-n.dts)>Bt)this[e(412)]=!0,s[e(505)](((t,s)=>{const i=e;0!==s&&(t[i(443)]+=a,t[i(426)]+=a)}));else for(let t=1;tBt||r<0){this[e(412)]=!0,r=this[e(417)]?c:Math.max(r,2700);const i=this[e(288)]||0;a&&a[e(443)]>i&&(r=c),this.player[e(382)](this[e(381)],e(488)+o/t[e(452)]+e(361)+o+e(280)+s[n][e(453)]+e(303)+this[e(463)]+e(388)+r+e(318)+Bt+e(401)+r+e(350)+c)}s[n].duration=r,this[e(463)]+=r}}[TT(295)](t,e,s){const i=TT;!t[i(334)]&&(t[i(334)]=Ae(t[i(452)],s));const r=t[i(334)];if(void 0===this._audioNextPts){const t=e[0];this[i(288)]=t[i(426)]}for(let s=0;s=3*r&&a<=xt&&!ss()){me(t.codec,t[i(279)])||e[0].data[i(502)]();const h=Math[i(363)](a/r);Math.abs(o.pts-this._lastAudioExceptionGapDot)>Pt&&(this._lastAudioExceptionGapDot=o[i(426)]),this.player[i(382)](this[i(381)],i(400)+e[i(426)]/90+",\n originPts is "+e[i(373)]+i(387)+h+i(410)+n/90+i(493)+r);for(let t=0;t=-9e4?(Math[i(435)](o[i(426)]-this[i(390)])>Pt&&(this[i(390)]=o[i(426)],this[i(345)][i(382)](this[i(381)],i(428)+o.pts/90+i(402)+o[i(373)]+i(449)+n/90+i(411)+r)),e.splice(s,1),s--):(Math.abs(a)>=xt&&(this._audioTimestampBreak=!0,Math[i(435)](o.pts-this[i(457)])>Pt&&(this[i(457)]=o[i(426)],this[i(345)][i(382)](this[i(381)],i(307)+o.pts/1e3+i(332)+o.pts/90+",\n originPts is "+o[i(373)]+",\n nextPts is "+n/90+i(357)+a+"\n ref sample duration is "+r))),o.dts=o[i(426)]=n,this[i(288)]+=r)}}[TT(311)](){const t=TT;return!this[t(345)][t(301)]()}[TT(500)](){const t=TT;this[t(345)][t(399)](this[t(381)],t(497));const e=Ys(mT);let s=new Worker(e);this[t(341)]=e,this[t(293)]=setTimeout((()=>{const e=t;window[e(380)].revokeObjectURL(this.workerUrl),this[e(341)]=null,this.workerClearTimeout=null}),T),s[t(473)]({cmd:t(335),options:{type:t(305),seekingMaxDiff:1e4,debug:this[t(345)]._opt[t(287)],debugUuid:this[t(345)][t(495)][t(356)],debugLevel:this[t(345)][t(495)][t(340)]}}),s[t(492)]=e=>{const s=t,i=e[s(431)];switch(i.cmd){case s(309):this[s(282)](i);break;case s(286):this[s(308)](i);break;case s(386):if(this[s(397)]=i,this.player[s(278)]()){const t=this[s(451)](),e=this[s(345)][s(395)]();if(t&&e){let i=t/(1e3*e);i!==this._prevPlayVodTimeCache&&this.player[s(330)](M[s(294)],i),this[s(425)]=i}}}},this[t(423)]=s}[TT(354)](t,e){const s=TT;this._isUseWorker()&&(this[s(423)]?this[s(423)][s(473)]({cmd:t,...e}):this.player[s(382)](this[s(381)],s(504)))}[TT(308)](t){const e=TT,s=new Uint8Array(t[e(470)]);this[e(345)][e(424)]({abps:s[e(442)]});let i=this[e(469)](s);this._doDecodeByHls(i,D.audio,t[e(443)],!1,0)}[TT(282)](t){const e=TT,s=new Uint8Array(t.payload);let i=null;i=t.isHevc?Bh(s,t.isIFrame):oh(s,t[e(358)]),this[e(345)].updateStats({dts:t[e(443)],vbps:i.byteLength});const r=t.pts-t.dts;let n=this[e(336)](i,t.isIFrame);this[e(478)](n,D.video,t[e(443)],t.isIFrame,r)}getBuferredDuration(){const t=TT;return this[t(397)][t(369)]||0}[TT(398)](){const t=TT;return this[t(397)][t(503)]||0}getSampleAudioListLength(){const t=TT;return this.tempSampleListInfo[t(376)]||0}getSampleVideoListLength(){const t=TT;return this[t(397)][t(290)]||0}[TT(484)](){const t=TT;return this[t(378)]&&this[t(378)][t(442)]||0}[TT(343)](){const t=TT;return{start:this[t(397)][t(384)]||0,end:this[t(397)][t(458)]||0}}[TT(289)](t){const e=TT;this[e(354)](e(289),{time:t})}[TT(440)](t){const e=TT;ci(this[e(345)].isUseMSE())&&(this[e(444)](!0),this._postMessageToLoopWorker(e(342)),this[e(354)](e(277),{time:t}))}[TT(420)](){this[TT(354)]("pause")}[TT(393)](){const t=TT;this[t(354)](t(393))}[TT(451)](){const t=TT;let e=0;return e=this.getSampleRange()[t(458)],e}}const CT=jT;function RT(t){const e=jT;let s=arguments[e(490)]>1&&void 0!==arguments[1]?arguments[1]:0;return(t[s]<<8)+(t[s+1]||0)}function DT(t){const e=jT;let s=arguments[e(490)]>1&&void 0!==arguments[1]?arguments[1]:0;return(t[s]<<24>>>0)+(t[s+1]<<16)+(t[s+2]<<8)+(t[s+3]||0)}function LT(){const t=["kid","enca","getRateIndexByRate","ulaw","evaluateDefaultDuration","avc","co64","reference_ID","avgFrameRate","26594392PHCtqV","esds config is null","smhd","padStart","defaultSampleFlags","stsd","generalProfileSpace","vertresolution","isVideoEncryption","trak","system_id","esds","stbl","sampleSize","height","duration","minf","mfhd","starts_with_SAP","schi","findBox","reference_type","codecType","G711PCMA","balance","tkhdDuration","sarRatio","version","hvc1","sequenceNumber","subarray","entries","4766412TnzJJb","soun","hdlr","entryCount","sampleRate","samples","ext","useEME","SAP_delta_time","BytesOfProtectedData","entrySizes","start","cts","ctts","avc4","avc1","sampleDescriptionIndex","pts","sampleRateIndex","pasp","defaultSampleDuration","earliest_presentation_time","toString","unknown video stsd entry","numOfArrays","map","traf","dataReferenceIndex","vps","mvhdDurtion","85372HipDhA","depth","9zQcbqH","stsc","length","FREQ","default_IV_size","fromCharCode","from","mp4a.40.2","generalLevelIdc","sps","mp4a","dataOffset","config","frma","vSpacing","ceil","firstSampleFlags","nextTrackId","sinf","hev1.1.6.L93.B0","hev1","generalProfileCompatibility","substring","268315qECFKg","keyframe","handlerType","spsLength","size","223SGHvVO","probe","avcC","gopId","8556530OyWdez","headerSize","baseDataOffset","default_KID","samplesPerChunk","HEVC","lengthSizeMinusOne","stts","stco","trun","moofToSamples","first_offset","trackId","horizresolution","baseMediaDecodeTime","timescale","forEach","moovToSamples","channelCount"," size !== data.length","objectType","kidValue","find","present","references","push","BytesOfClearData","firstChunk","graphicsmode","mvhd","ftyp","99phvwoT","flags","subsegment_duration","generalConstraintIndicatorFlags","defaultSampleSize","alaw","sampleCount","mvhdTimecale","profileCompatibility","encv","tkhd","tenc","tfdt","data_format","generalTierFlag","join","mdhd","2940oKpvSO","SAP_type","codec","avc3","ppsLength","default_IsEncrypted","vmhd","stss","moov","isAudioEncryption","pps","AVC","pssh","senc","tfhd","slice","stsz","moof","13480ozOuim","g7110a","width","getFrameDuration","5064wwMPge","filter","samplesize","dts","data","formatTimescale","InitializationVector","mp4a.","configurationVersion","frameCount","hSpacing","mdia","sampleDuration","apply","hvcC","language","avc1.","type"];return(LT=function(){return t})()}function xT(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const s=Math.pow(2,32);return DT(t,e)*s+DT(t,e+4)}!function(t,e){const s=jT,i=t();for(;;)try{if(448605===-parseInt(s(516))/1*(parseInt(s(590))/2)+-parseInt(s(551))/3*(parseInt(s(486))/4)+-parseInt(s(511))/5+-parseInt(s(456))/6+parseInt(s(568))/7*(-parseInt(s(586))/8)+parseInt(s(488))/9*(parseInt(s(520))/10)+parseInt(s(617))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(LT);const PT={AAC:"aac",G711PCMA:CT(587),G711PCMU:"g7110m"},BT={AVC:CT(613),HEVC:"hevc"};class MT{static[CT(589)](t){return 1024*(arguments[CT(490)]>1&&void 0!==arguments[1]?arguments[1]:9e4)/t}static[CT(610)](t){return MT[CT(491)].indexOf(t)}}function FT(t,e,s,i,r,n){const o=CT,a=[],h=null==r?void 0:r.entries,c=e[o(455)],l=i.entries,d=s.entrySizes,u=null==n?void 0:n[o(455)];let p,f;u&&(p={},u.forEach((t=>{p[t-1]=!0}))),h&&(f=[],h[o(536)]((t=>{let{count:e,offset:s}=t;for(let t=0;t{const e=o;let{count:i,delta:r}=t;for(let t=0;t=E&&(v++,E=c[v+1]?c[v+1].firstChunk-1:1/0),w+=c[v][e(524)])})),a}function OT(t,e){const s=CT;return t[s(483)]=RT(e,6),t.width=RT(e,24),t.height=RT(e,26),t[s(533)]=DT(e,28),t[s(624)]=DT(e,32),t[s(599)]=RT(e,40),t[s(487)]=RT(e,74),78}function UT(t,e){const s=CT;return t.dataReferenceIndex=RT(e,6),t.channelCount=RT(e,16),t.sampleSize=RT(e,18),t[s(460)]=DT(e,24)/65536,28}function NT(t,e,s){const i=CT;if(!t)return;if(t[i(515)]!==t[i(594)][i(490)])throw new Error("box "+t.type+i(539));const r={start:t[i(467)],size:t[i(515)],headerSize:t[i(521)],type:t[i(607)]};return e&&(r[i(451)]=t[i(594)][t[i(521)]],r[i(552)]=function(t){let e=arguments[jT(490)]>1&&void 0!==arguments[1]?arguments[1]:0;return(t[e]<<16)+(t[e+1]<<8)+(t[e+2]||0)}(t[i(594)],t.headerSize+1),r[i(521)]+=4),s(r,t[i(594)].subarray(r[i(521)]),r[i(467)]+r[i(521)]),r}function jT(t,e){const s=LT();return(jT=function(t,e){return s[t-=445]})(t,e)}$f(MT,CT(491),[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350]);const VT=function(t,e,s){const i=CT,r=String(s),n=e>>0;let o=Math[i(503)](n/r[i(490)]);const a=[],h=String(t);for(;o--;)a.push(r);return a.join("")[i(510)](0,n-h[i(490)])+h},zT=function(){const t=CT,e=[];for(var s=arguments[t(490)],i=new Array(s),r=0;r{const i=t;e[i(545)](VT(Number(s)[i(478)](16),2,0))})),e[0]};class GT{static[CT(517)](t){const e=CT;return!!GT[e(637)](t,[e(550)])}static[CT(637)](t,e){const s=CT;let i=arguments[s(490)]>2&&void 0!==arguments[2]?arguments[2]:0;const r=[];if(!t)return r;let n=0,o="",a=0;for(;t[s(490)]>7;){if(n=DT(t),o=String[s(493)][s(603)](null,t[s(454)](4,8)),a=8,1===n?(n=xT(t,8),a+=8):!n&&(n=t[s(490)]),!e[0]||o===e[0]){const h=t[s(454)](0,n);if(!(e[s(490)]<2))return GT[s(637)](h[s(454)](a),e[s(583)](1),i+a);r.push({start:i,size:n,headerSize:a,type:o,data:h})}i+=n,t=t[s(454)](n)}return r}static tfhd(t){return NT(t,!0,((t,e)=>{const s=jT;t[s(532)]=DT(e);let i=4;const r=1&t[s(552)],n=2&t[s(552)],o=8&t[s(552)],a=16&t[s(552)],h=32&t[s(552)];r&&(i+=4,t[s(522)]=DT(e,i),i+=4),n&&(t[s(472)]=DT(e,i),i+=4),o&&(t.defaultSampleDuration=DT(e,i),i+=4),a&&(t.defaultSampleSize=DT(e,i),i+=4),h&&(t[s(621)]=DT(e,i))}))}static sidx(t){return NT(t,!0,((t,e)=>{const s=jT;let i=0;t[s(615)]=DT(e,i),i+=4,t.timescale=DT(e,i),i+=4,0===t[s(451)]?(t.earliest_presentation_time=DT(e,i),i+=4,t[s(531)]=DT(e,i),i+=4):(t[s(477)]=xT(e,i),i+=8,t[s(531)]=xT(e,i),i+=8),i+=2,t[s(544)]=[];const r=RT(e,i);i+=2;for(let n=0;n>31&1,r.referenced_size=2147483647&n,r[s(553)]=DT(e,i),i+=4,n=DT(e,i),i+=4,r[s(635)]=n>>31&1,r[s(569)]=n>>28&7,r[s(464)]=268435455&n}}))}static[CT(576)](t){return NT(t,!1,((t,e,s)=>{const i=jT;t[i(549)]=GT.mvhd(GT[i(637)](e,[i(549)],s)[0]),t[i(626)]=GT[i(637)](e,[i(626)],s).map((t=>GT.trak(t))),t[i(580)]=GT[i(580)](GT[i(637)](e,[i(580)],s)[0])}))}static[CT(549)](t){return NT(t,!0,((t,e)=>{const s=jT;let i=0;1===t.version?(t.timescale=DT(e,16),t[s(632)]=xT(e,20),i+=28):(t[s(535)]=DT(e,8),t[s(632)]=DT(e,12),i+=16),t[s(505)]=DT(e,i+76)}))}static trak(t){return NT(t,!1,((t,e,s)=>{const i=jT;t[i(561)]=GT.tkhd(GT[i(637)](e,["tkhd"],s)[0]),t.mdia=GT[i(601)](GT[i(637)](e,[i(601)],s)[0])}))}static tkhd(t){return NT(t,!0,((t,e)=>{const s=jT;let i=0;1===t[s(451)]?(t[s(532)]=DT(e,16),t[s(632)]=xT(e,24),i+=32):(t.trackId=DT(e,8),t[s(632)]=DT(e,16),i+=20),t[s(588)]=DT(e,i+52),t[s(631)]=DT(e,i+56)}))}static[CT(601)](t){return NT(t,!1,((t,e,s)=>{const i=jT;t[i(567)]=GT[i(567)](GT[i(637)](e,[i(567)],s)[0]),t[i(458)]=GT[i(458)](GT[i(637)](e,[i(458)],s)[0]),t[i(633)]=GT.minf(GT[i(637)](e,[i(633)],s)[0])}))}static[CT(567)](t){return NT(t,!0,((t,e)=>{const s=jT;let i=0;1===t[s(451)]?(t[s(535)]=DT(e,16),t.duration=xT(e,20),i+=28):(t.timescale=DT(e,8),t[s(632)]=DT(e,12),i+=16);const r=RT(e,i);t[s(605)]=String[s(493)](96+(r>>10&31),96+(r>>5&31),96+(31&r))}))}static[CT(458)](t){return NT(t,!0,((t,e)=>{const s=jT;0===t[s(451)]&&(t.handlerType=String.fromCharCode[s(603)](null,e.subarray(4,8)))}))}static[CT(633)](t){return NT(t,!1,((t,e,s)=>{const i=jT;t.vmhd=GT.vmhd(GT[i(637)](e,[i(574)],s)[0]),t.smhd=GT.smhd(GT.findBox(e,[i(619)],s)[0]),t[i(629)]=GT[i(629)](GT[i(637)](e,[i(629)],s)[0])}))}static[CT(574)](t){return NT(t,!0,((t,e)=>{t[jT(548)]=RT(e),t.opcolor=[RT(e,2),RT(e,4),RT(e,6)]}))}static[CT(619)](t){return NT(t,!0,((t,e)=>{t[jT(448)]=RT(e)}))}static[CT(629)](t){return NT(t,!1,((t,e,s)=>{const i=jT;var r,n,o;t[i(622)]=GT[i(622)](GT[i(637)](e,[i(622)],s)[0]),t[i(527)]=GT[i(527)](GT[i(637)](e,["stts"],s)[0]),t[i(469)]=GT[i(469)](GT[i(637)](e,[i(469)],s)[0]),t[i(489)]=GT[i(489)](GT[i(637)](e,[i(489)],s)[0]),t[i(584)]=GT.stsz(GT[i(637)](e,["stsz"],s)[0]),t[i(528)]=GT[i(528)](GT[i(637)](e,[i(528)],s)[0]),!t[i(528)]&&(t[i(614)]=GT[i(614)](GT[i(637)](e,[i(614)],s)[0]),t[i(528)]=t[i(614)]);const a=null===(r=t[i(622)].entries[0])||void 0===r||null===(n=r[i(506)])||void 0===n||null===(o=n[i(636)])||void 0===o?void 0:o[i(562)][i(492)];t[i(575)]=GT[i(575)](GT.findBox(e,[i(575)],s)[0]),t[i(581)]=GT[i(581)](GT.findBox(e,[i(581)],s)[0],a)}))}static[CT(581)](t){const e=CT;let s=arguments[e(490)]>1&&void 0!==arguments[1]?arguments[1]:8;return NT(t,!0,((t,i)=>{const r=e;let n=0;const o=DT(i,n);n+=4,t[r(461)]=[];for(let e=0;e{const s=jT,i=[],r=[];let n=0;for(let t=0;t<16;t++)r[s(545)](zT(e[n+t]));if(n+=16,t[s(451)]>0){const t=DT(e,n);n+=4;for(let r=0;r<(""+t)[s(490)];r++)for(let t=0;t<16;t++){const t=e[n];n+=1,i[s(545)](zT(t))}}const o=DT(e,n);t.data_size=o,n+=4,t[s(608)]=i,t[s(627)]=r,t.buffer=e}))}static[CT(622)](t){return NT(t,!0,((t,e,s)=>{const i=jT;t.entryCount=DT(e),t.entries=GT[i(637)](e[i(454)](4),[],s+4)[i(481)]((t=>{const e=i;switch(t[e(607)]){case"avc1":case"avc2":case e(571):case e(470):return GT[e(471)](t);case e(452):case e(508):return GT[e(452)](t);case"mp4a":return GT.mp4a(t);case e(556):case e(611):return GT[e(556)](t);case e(609):return NT(t,!1,((t,s,i)=>{const r=e;t[r(538)]=RT(s,16),t[r(592)]=RT(s,18),t[r(460)]=DT(s,24)/65536,s=s[r(454)](28),t[r(506)]=GT[r(506)](GT[r(637)](s,[r(506)],i)[0]),t[r(628)]=GT[r(628)](GT[r(637)](s,[r(628)],i)[0])}));case e(560):return NT(t,!1,((t,s,i)=>{const r=e;t[r(588)]=RT(s,24),t[r(631)]=RT(s,26),t[r(533)]=DT(s,28),t.vertresolution=DT(s,32),s=s.subarray(78),t[r(506)]=GT[r(506)](GT[r(637)](s,[r(506)],i)[0]),t[r(518)]=GT[r(518)](GT[r(637)](s,[r(518)],i)[0]),t[r(604)]=GT.hvcC(GT[r(637)](s,[r(604)],i)[0]),t[r(475)]=GT.pasp(GT.findBox(s,[r(475)],i)[0])}))}}))[i(591)](Boolean)}))}static[CT(562)](t){return NT(t,!1,((t,e)=>{const s=jT;let i=6;t.default_IsEncrypted=e[i],i+=1,t[s(492)]=e[i],i+=1,t[s(523)]=[];for(let r=0;r<16;r++)t[s(523)][s(545)](zT(e[i])),i+=1}))}static[CT(636)](t){return NT(t,!1,((t,e,s)=>{const i=jT;t[i(562)]=GT.tenc(GT.findBox(e,[i(562)],s)[0])}))}static[CT(506)](t){return NT(t,!1,((t,e,s)=>{const i=jT;t[i(636)]=GT[i(636)](GT.findBox(e,[i(636)],s)[0]),t[i(501)]=GT[i(501)](GT[i(637)](e,["frma"],s)[0])}))}static[CT(501)](t){return NT(t,!1,((t,e)=>{const s=jT;t[s(564)]="";for(let i=0;i<4;i++)t[s(564)]+=String.fromCharCode(e[i])}))}static[CT(471)](t){return NT(t,!1,((t,e,s)=>{const i=jT,r=OT(t,e),n=e[i(454)](r);s+=r,t[i(518)]=GT.avcC(GT[i(637)](n,[i(518)],s)[0]),t[i(475)]=GT[i(475)](GT.findBox(n,[i(475)],s)[0])}))}static[CT(518)](t){return NT(t,!1,((t,e)=>{const s=jT;t.configurationVersion=e[0],t.AVCProfileIndication=e[1],t[s(559)]=e[2],t.AVCLevelIndication=e[3],t[s(570)]=function(t){const e=CT;let s,i=e(606);for(let r=0;r<3;r++)s=t[r][e(478)](16),s[e(490)]<2&&(s="0"+s),i+=s;return i}([e[1],e[2],e[3]]),t[s(526)]=3&e[4],t[s(514)]=31&e[5],t[s(497)]=[];let i=6;for(let r=0;r{const i=jT,r=OT(t,e),n=e[i(454)](r);s+=r,t[i(604)]=GT[i(604)](GT[i(637)](n,[i(604)],s)[0]),t.pasp=GT[i(475)](GT[i(637)](n,[i(475)],s)[0])}))}static[CT(604)](t){return NT(t,!1,((e,s)=>{const i=jT;e[i(594)]=t[i(594)],e.codec=i(507),e[i(598)]=s[0];const r=s[1];e[i(623)]=r>>6,e[i(565)]=(32&r)>>5,e.generalProfileIdc=31&r,e[i(509)]=DT(s,2),e[i(554)]=s[i(454)](6,12),e[i(496)]=s[12],e[i(616)]=RT(s,19),e[i(480)]=s[22],e.vps=[],e.sps=[],e[i(578)]=[];let n=23,o=0,a=0,h=0;for(let t=0;t{const s=jT;t[s(600)]=DT(e),t[s(502)]=DT(e,4)}))}static[CT(498)](t){return NT(t,!1,((t,e,s)=>{const i=jT,r=UT(t,e);t[i(628)]=GT.esds(GT[i(637)](e.subarray(r),[i(628)],s+r)[0])}))}static esds(t){return NT(t,!0,((t,e)=>{const s=jT;t.codec=s(597);let i=0,r=0,n=0,o=0;for(;e.length;){for(i=0,o=e[i],r=e[i+1],i+=2;128&r;)n=(127&r)<<7,r=e[i],i+=1;if(n+=127&r,3===o)e=e[s(454)](i+3);else{if(4!==o){if(5===o){const r=t[s(500)]=e[s(454)](i,i+n);let o=(248&r[0])>>3;return 31===o&&r.length>=2&&(o=32+((7&r[0])<<3)+((224&r[1])>>5)),t[s(540)]=o,t.codec+=o[s(478)](16),void("."===t[s(570)][t[s(570)][s(490)]-1]&&(t.codec=t[s(570)][s(510)](0,t[s(570)].length-1)))}return void("."===t[s(570)][t[s(570)][s(490)]-1]&&(t.codec=t[s(570)][s(510)](0,t[s(570)][s(490)]-1)))}t[s(570)]+=(e[i][s(478)](16)+".")[s(620)](3,"0"),e=e[s(454)](i+13)}}}))}static[CT(556)](t){return NT(t,!1,((t,e)=>{UT(t,e)}))}static[CT(527)](t){return NT(t,!0,((t,e)=>{const s=jT,i=DT(e),r=[];let n=4;for(let t=0;t{const s=jT,i=DT(e),r=[];let n=4;if(1===t.version)for(let t=0;t{const s=jT,i=DT(e),r=[];let n=4;for(let t=0;t{const s=jT,i=DT(e),r=DT(e,4),n=[];if(!i){let t=8;for(let i=0;i{const s=jT,i=DT(e),r=[];let n=4;for(let t=0;t{const s=jT,i=DT(e),r=[];let n=4;for(let t=0;t{const s=jT,i=DT(e),r=[];let n=4;for(let t=0;t{const i=jT;t.mfhd=GT.mfhd(GT[i(637)](e,[i(634)],s)[0]),t.traf=GT[i(637)](e,[i(482)],s)[i(481)]((t=>GT[i(482)](t)))}))}static[CT(634)](t){return NT(t,!0,((t,e)=>{t[jT(453)]=DT(e)}))}static[CT(482)](t){return NT(t,!1,((t,e,s)=>{const i=jT;t[i(582)]=GT[i(582)](GT.findBox(e,[i(582)],s)[0]),t[i(563)]=GT[i(563)](GT[i(637)](e,["tfdt"],s)[0]),t[i(529)]=GT[i(529)](GT[i(637)](e,["trun"],s)[0])}))}static[CT(529)](t){return NT(t,!0,((t,e)=>{const s=jT,{version:i,flags:r}=t,n=e[s(490)],o=t[s(557)]=DT(e);let a=4;if(n>a&&1&r&&(t[s(499)]=-(1+~DT(e,a)),a+=4),n>a&&4&r&&(t[s(504)]=DT(e,a),a+=4),t[s(461)]=[],n>a){let n;for(let h=0;h{const s=jT;1===t.version?t.baseMediaDecodeTime=xT(e):t[s(534)]=DT(e)}))}static[CT(517)](t){return!!GT[CT(637)](t,["ftyp"])}static parseSampleFlags(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}}static moovToTrack(t,e,s){const i=CT;var r,n;const o=t[i(626)];if(!o||!o[i(490)])return;const a=o.find((t=>{const e=i;var s,r;return"vide"===(null===(s=t[e(601)])||void 0===s||null===(r=s[e(458)])||void 0===r?void 0:r.handlerType)})),h=o.find((t=>{const e=i;var s,r;return"soun"===(null===(s=t.mdia)||void 0===s||null===(r=s[e(458)])||void 0===r?void 0:r[e(513)])}));if(a&&e){var c,l,d,u,p,f,m;const s=e,r=null===(c=a.tkhd)||void 0===c?void 0:c[i(532)];null!=r&&(s.id=a[i(561)][i(532)]),s[i(449)]=a[i(561)].duration,s[i(485)]=t[i(549)].duration,s[i(558)]=t[i(549)][i(535)],s.timescale=s[i(595)]=a.mdia[i(567)].timescale,s[i(632)]=a[i(601)][i(567)][i(632)]||s[i(485)]/s.mvhdTimecale*s[i(535)];const n=a.mdia[i(633)][i(629)].stsd[i(455)][0];if(s[i(588)]=n[i(588)],s[i(631)]=n[i(631)],n[i(475)]&&(s[i(450)]=[n[i(475)][i(600)],n[i(475)].vSpacing]),n[i(604)])s[i(446)]=BT[i(525)],s[i(570)]=n[i(604)][i(570)],s[i(484)]=n.hvcC.vps,s[i(497)]=n[i(604)].sps,s[i(578)]=n[i(604)][i(578)],s.hvcC=n[i(604)][i(594)];else{if(!n.avcC)throw new Error(i(479));s[i(446)]=BT[i(579)],s[i(570)]=n[i(518)][i(570)],s[i(497)]=n[i(518)][i(497)],s[i(578)]=n[i(518)].pps}var g,A,y,b,v,S,w,E;if(s[i(543)]=!0,s.ext={},s[i(462)][i(575)]=null===(l=a[i(601)])||void 0===l||null===(d=l[i(633)])||void 0===d||null===(u=d[i(629)])||void 0===u?void 0:u.stss,s.ext[i(469)]=null===(p=a.mdia)||void 0===p||null===(f=p[i(633)])||void 0===f||null===(m=f[i(629)])||void 0===m?void 0:m[i(469)],n&&n[i(607)]===i(560))s[i(625)]=!0,n.default_KID=null===(g=n[i(506)])||void 0===g||null===(A=g[i(636)])||void 0===A?void 0:A.tenc.default_KID,n[i(573)]=null===(y=n[i(506)])||void 0===y||null===(b=y[i(636)])||void 0===b?void 0:b[i(562)].default_IsEncrypted,n[i(492)]=null===(v=n[i(506)])||void 0===v||null===(S=v.schi)||void 0===S?void 0:S.tenc[i(492)],s.videoSenc=a[i(601)].minf[i(629)][i(581)]&&a[i(601)][i(633)][i(629)].senc[i(461)],n[i(564)]=null===(w=n[i(506)])||void 0===w||null===(E=w[i(501)])||void 0===E?void 0:E[i(564)],s.useEME=t[i(463)],s[i(541)]=t.kidValue,s[i(580)]=t[i(580)],s.encv=n}if(h&&s){var I,T,k,_,C,R,D,L,x;const e=s,o=null===(I=h[i(561)])||void 0===I?void 0:I[i(532)];null!=o&&(e.id=h[i(561)][i(532)]),e[i(449)]=h[i(561)].duration,e[i(485)]=t[i(549)][i(632)],e[i(558)]=t.mvhd[i(535)],e.timescale=e.formatTimescale=h.mdia[i(567)].timescale,e[i(632)]=h[i(601)][i(567)][i(632)]||e[i(485)]/e[i(558)]*e[i(535)];const a=h[i(601)][i(633)][i(629)][i(622)].entries[0];switch(e.sampleSize=a[i(630)],e.sampleRate=a.sampleRate,e.channelCount=a[i(538)],e[i(543)]=!0,a[i(607)]){case i(556):e[i(446)]=e[i(570)]=PT[i(447)],e.sampleRate=8e3;break;case"ulaw":e[i(446)]=e[i(570)]=PT.G711PCMU,e.sampleRate=8e3;break;default:e.codecType=PT.AAC,e[i(602)]=MT.getFrameDuration(e[i(460)],e.timescale),e[i(474)]=MT.getRateIndexByRate(e[i(460)]),e[i(540)]=(null===(r=a[i(628)])||void 0===r?void 0:r[i(540)])||2,a[i(628)]&&(e[i(500)]=Array[i(494)](a.esds[i(500)])),e[i(570)]=(null===(n=a[i(628)])||void 0===n?void 0:n.codec)||i(495)}var P,B,M,F,O,U,N,j;if(e[i(602)]=MT[i(589)](e[i(460)],e[i(535)]),e[i(540)]=(null===(T=a.esds)||void 0===T?void 0:T[i(540)])||2,a[i(628)]&&(a[i(628)][i(500)]?e[i(500)]=Array[i(494)](a[i(628)][i(500)]):console.warn(i(618))),e[i(570)]=(null===(k=a[i(628)])||void 0===k?void 0:k.codec)||i(495),e[i(474)]=MT[i(610)](e[i(460)]),e[i(462)]={},e[i(462)][i(575)]=null===(_=h[i(601)])||void 0===_||null===(C=_[i(633)])||void 0===C||null===(R=C[i(629)])||void 0===R?void 0:R[i(575)],e[i(462)][i(469)]=null===(D=h[i(601)])||void 0===D||null===(L=D[i(633)])||void 0===L||null===(x=L[i(629)])||void 0===x?void 0:x[i(469)],e[i(543)]=!0,a&&a[i(607)]===i(609))e[i(577)]=!0,a[i(564)]=null===(P=a[i(506)])||void 0===P||null===(B=P.frma)||void 0===B?void 0:B[i(564)],a[i(523)]=null===(M=a[i(506)])||void 0===M||null===(F=M.schi)||void 0===F?void 0:F[i(562)][i(523)],a[i(573)]=null===(O=a.sinf)||void 0===O||null===(U=O[i(636)])||void 0===U?void 0:U[i(562)][i(573)],a.default_IV_size=null===(N=a[i(506)])||void 0===N||null===(j=N[i(636)])||void 0===j?void 0:j[i(562)][i(492)],e.audioSenc=h[i(601)].minf[i(629)].senc&&h[i(601)][i(633)][i(629)].senc[i(461)],e.useEME=t[i(463)],e[i(541)]=t[i(541)],e[i(609)]=a}if(s&&(s[i(625)]=!!e&&e[i(625)]),e&&(e[i(577)]=!!s&&s[i(577)]),null!=e&&e[i(560)]||null!=s&&s[i(609)]){var V,z;const t=null==e||null===(V=e.encv)||void 0===V?void 0:V.default_KID,r=null==s||null===(z=s[i(609)])||void 0===z?void 0:z.default_KID,n=t||r?(t||r)[i(566)](""):null;e&&(e[i(608)]=n),s&&(s[i(608)]=n)}return e&&(e[i(552)]=3841),s&&(s[i(552)]=1793),{videoTrack:e,audioTrack:s}}static[CT(612)](t,e,s){const i=CT;var r;const n=null==e||null===(r=e[i(461)])||void 0===r?void 0:r[i(490)];if(!n)return 1024;return 1024*n/e[i(535)]*t.timescale/s}static[CT(530)](t,e,s){const i=CT,r={};return t[i(634)]&&(e&&(e[i(453)]=t[i(634)].sequenceNumber),s&&(s[i(453)]=t[i(634)][i(453)])),t.traf.forEach((t=>{const n=i;let{tfhd:o,tfdt:a,trun:h}=t;if(!o||!h)return;a&&(e&&e.id===o[n(532)]&&(e.baseMediaDecodeTime=a[n(534)]),s&&s.id===o[n(532)]&&(s[n(534)]=a[n(534)]));const c=o[n(555)]||0,l=o[n(476)]||GT[n(612)](e,s,h.samples[n(490)]||h[n(557)]);let d=h[n(499)]||0,u=0,p=-1;if(!h[n(461)][n(490)]&&h[n(557)]){r[o[n(532)]]=[];for(let t=0;t{const s=n;return(t={offset:d,dts:u,pts:u+(t[s(468)]||0),duration:t[s(632)]||l,size:t.size||c,gopId:p,keyframe:0===e||null!==t.flags&&void 0!==t[s(552)]&&(65536&t[s(552)])>>>0!=65536})[s(512)]&&(p++,t[s(519)]=p),u+=t[s(632)],d+=t.size,t}))})),r}static[CT(537)](t){const e=CT,s=t[e(626)];if(!s||!s[e(490)])return;const i=s.find((t=>{const s=e;var i,r;return"vide"===(null===(i=t.mdia)||void 0===i||null===(r=i[s(458)])||void 0===r?void 0:r[s(513)])})),r=s[e(542)]((t=>{const s=e;var i,r;return(null===(i=t.mdia)||void 0===i||null===(r=i[s(458)])||void 0===r?void 0:r[s(513)])===s(457)}));if(!i&&!r)return;let n,o;if(i){var a,h;const t=null===(a=i.mdia)||void 0===a||null===(h=a.minf)||void 0===h?void 0:h.stbl;if(!t)return;const{stts:e,stsc:s,stsz:r,stco:o,stss:c,ctts:l}=t;if(!(e&&s&&r&&o&&c))return;n=FT(e,s,r,o,l,c)}if(r){var c,l,d;const t=null===(c=r.mdia)||void 0===c||null===(l=c[e(633)])||void 0===l?void 0:l[e(629)];if(!t)return;const s=null===(d=r.mdia.mdhd)||void 0===d?void 0:d.timescale,{stts:i,stsc:n,stsz:a,stco:h}=t;if(!(s&&i&&n&&a&&h))return;o=FT(i,n,a,h)}return{videoSamples:n,audioSamples:o}}}function WT(t,e){const s=HT();return(WT=function(t,e){return s[t-=159]})(t,e)}function HT(){const t=["10UGVGwC","3006078XxDsYz","26139RdAvpC","604876XuJUzR","132wejVQB","3283596vMzOcJ","24UVvgTd","min","42945144RuKJva","1564843uLktlx","2076690yKhjnU","length","18NLAAtH","max"];return(HT=function(){return t})()}!function(t,e){const s=WT,i=t();for(;;)try{if(880138===parseInt(s(166))/1*(-parseInt(s(168))/2)+-parseInt(s(162))/3*(parseInt(s(167))/4)+parseInt(s(160))/5+-parseInt(s(165))/6+-parseInt(s(159))/7*(parseInt(s(170))/8)+parseInt(s(169))/9+-parseInt(s(164))/10*(-parseInt(s(172))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(HT);const KT=QT;function QT(t,e){const s=YT();return(QT=function(t,e){return s[t-=176]})(t,e)}function YT(){const t=["moof","loopWorker","8314288hBSkem","audioListLength","push","size","updatePlayRate","setSeekingTime","_isUseWorker","length","pps","allListLength","_initLoopWorker","isIFrame","map","cryptoPayload","end","samples","sampleRate","debugWarn","offset","isInitVideo","videoListLength","player","moofToSamples","isAudioG711a","AAC","workerClearTimeout","188YUYqvb","data","getSampleRange","isPlayVodNotUseMSE","2290262ELvBfx","cleanSampleListAndSetSeekTime","_postMessageToLoopWorker","playVodRateChange","_doDecodeAudio","postMessage","moovToTrack","buffer","loop worker is not init, can not post message","isAudioAac","8330413ggYtgQ","playVodTimeCache","gopId","forEach","decodeVideo","debugError","checkInitAudio","_opt","codec","cannot found moov box","codecType","isHevc","seekSampleRange","getPlayVodDuration","cmd","_sendAccADTSHeader","subarray","audio","audioData audio init success and type is","byteLength","sampleListInfo","_calcDecodeFps","correctSamplePts","_doDecodeVideo","video init success","checkInitVideo","workerUrl","isInitAudio","demux","duration","geVodLoadedTime","8423856UokMww","buferredDuration","_doDecodeByHls","type","objectType","1570824JiiGoR","revokeObjectURL","listen playVodRateChange","sampleRateIndex","tempSampleListInfo","dts","cryptoPayloadAudio","baseMediaDecodeTime","URL","updateStats","init","debug","payload","audioTrack","moov","G711PCMA","channelCount","start","getSampleListLength","concat","_prevPlayVodTimeCache","set","isAudioG711u","_hasCalcFps","5XvlLux","findBox","1060627CESeEW","sps","60981cnxGWC","video","hlsFmp4","_basefps","debugLog","terminate","pts","videoTrack","addAudioTagHeader","destroy","resume","TAG_NAME"];return(YT=function(){return t})()}!function(t,e){const s=QT,i=t();for(;;)try{if(684300===-parseInt(s(287))/1+parseInt(s(215))/2+parseInt(s(289))/3*(-parseInt(s(211))/4)+parseInt(s(285))/5*(parseInt(s(261))/6)+parseInt(s(225))/7+parseInt(s(185))/8+-parseInt(s(256))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(YT);class qT extends Dp{constructor(t){const e=QT;super(t),this[e(206)]=t,this[e(182)]="HlsFmp4Demux",this[e(265)]={},this[e(204)]=!1,this[e(252)]=!1,this.videoTrack={id:1,samples:[],sps:[],pps:[],vps:[],codec:""},this.audioTrack={id:2,samples:[],sampleRate:0,channelCount:0,codec:"",codecType:""},this[e(210)]=null,this.workerUrl=null,this[e(184)]=null,this[e(284)]=!1,this[e(292)]=25,this._prevPlayVodTimeCache=0,this[e(191)]()&&this[e(195)](),this[e(206)].isPlayVod()&&this[e(191)]()&&this[e(206)].on(M[e(218)],(t=>{const s=e;this[s(206)][s(293)](this.TAG_NAME,s(263),t),this[s(217)](s(189),{rate:t})})),t[e(293)](this[e(182)],e(271))}[KT(180)](){const t=KT;super[t(180)](),this.workerUrl&&(URL[t(262)](this[t(251)]),this[t(251)]=null),this[t(210)]&&(clearTimeout(this[t(210)]),this[t(210)]=null),this[t(184)]&&(this[t(184)][t(220)]({cmd:t(180)}),this[t(184)][t(176)](),this[t(184)]=null),this._hasCalcFps=!1,this[t(178)]=null,this.audioTrack=null,this.isInitVideo=!1,this[t(252)]=!1,this[t(292)]=25,this[t(281)]=0,this[t(206)][t(293)](this[t(182)],"destroy")}[KT(253)](t,e){const s=KT;let i=this.audioTrack,r=this[s(178)];if(this[s(231)](),this[s(250)](),i[s(200)]=[],r.samples=[],e){if(this.player.updateStats({abps:e[s(244)]}),ci(this[s(252)])){const t=GT.findBox(e,[s(275)])[0];if(!t)return void this[s(206)][s(230)](this.TAG_NAME,s(234));GT[s(221)](GT.moov(t),null,i),this.checkInitAudio()&&(this[s(206)][s(293)](this[s(182)],s(243),i[s(235)]),this[s(224)]()&&this[s(240)](i))}const t=GT[s(286)](e,[s(183)])[0];if(t){const r=GT[s(207)](GT[s(183)](t),null,i)[i.id],n=i[s(268)];if(r){const o=t[s(278)];r[s(197)]((t=>{const r=s;t[r(203)]+=o;const a=e[r(241)](t[r(203)],t[r(203)]+t[r(188)]),h=t.dts+n,c=this.addAudioTagHeader(a);i[r(200)].push({type:D[r(242)],pts:h,dts:h,payload:c,duration:t[r(254)],size:c[r(244)]})}))}}}if(t){if(this.player[s(270)]({vbps:t[s(244)]}),ci(this.isInitVideo)&&ci(this[s(252)])){const e=GT[s(286)](t,[s(275)])[0];if(!e)throw new Error(s(234));if(GT[s(221)](GT[s(275)](e),r,i),this[s(231)]()&&(this[s(206)][s(293)](this[s(182)],"videoData audio init success and type is",i[s(235)]),this[s(224)]()&&this._sendAccADTSHeader(i)),this[s(250)]()){this[s(206)][s(293)](this.TAG_NAME,s(249));let t=null;r.codecType===lt.h265?r[s(288)][s(192)]&&r.vps.length&&r[s(193)][s(192)]&&(t=Ph({sps:r[s(288)][0],pps:r[s(193)][0],vps:r.vps[0]})):r.sps[s(192)]&&r[s(193)][s(192)]&&(t=nh({sps:r[s(288)][0],pps:r[s(193)][0]})),t&&(this.player[s(293)](this[s(182)],"seqHeader"),this[s(258)](t,D[s(290)],0,!0,0))}}const e=GT[s(286)](t,[s(183)])[0];if(e){const n=GT.moofToSamples(GT[s(183)](e),r,i),o=r[s(268)],a=i[s(268)],h=e[s(278)];Object.keys(n).forEach((e=>{const c=s;r.id==e?n[e][c(197)]((e=>{const s=c;e[s(203)]+=h;const i={type:D[s(290)],pts:(e.pts||e[s(266)])+o,dts:e.dts+o,units:[],payload:null,isIFrame:!1};i[s(254)]=e.duration,i[s(227)]=e[s(227)],e.keyframe&&(i.isIFrame=!0);const n=t[s(241)](e[s(203)],e[s(203)]+e.size);i.payload=n,r.samples[s(187)](i)})):i.id==e&&n[e][c(197)]((e=>{const s=c;e.offset+=h;const r=t[s(241)](e[s(203)],e.offset+e[s(188)]),n=e[s(266)]+a,o=this[s(179)](r);i[s(200)].push({type:D[s(242)],pts:n,dts:n,payload:o,duration:e.duration,size:o[s(244)]})}))}))}}this.correctSamplePts(r),this[s(247)](i);const n=r[s(200)][s(280)](i[s(200)]);n.sort(((t,e)=>{const i=s;return t[i(266)]-e[i(266)]})),n[s(228)]((t=>{const e=s,i=new Uint8Array(t[e(273)]);delete t.payload,this[e(191)]()?this.loopWorker[e(220)]({...t,payload:i,cmd:"sample"},[i[e(222)]]):t.type===D.video?this[e(248)]({...t,payload:i}):t[e(259)]===D[e(242)]&&this[e(219)]({...t,payload:i})})),ci(this[s(284)])&&this[s(191)]()&&(this._hasCalcFps=this[s(246)](n))}[KT(231)](){const t=KT;return this[t(252)]=!!(this[t(274)][t(201)]&&this[t(274)][t(277)]&&this.audioTrack.codec),this[t(252)]}[KT(224)](){const t=KT;return this.audioTrack.codecType===PT[t(209)]}isAudioG711a(){const t=KT;return this.audioTrack.codecType===PT[t(276)]}[KT(283)](){const t=KT;return this[t(274)][t(235)]===PT.G711PCMU}[KT(250)](){const t=KT;return this.isInitVideo=!!(this[t(178)][t(193)][t(192)]&&this[t(178)].sps[t(192)]&&this[t(178)][t(233)]),this[t(204)]}_sendAccADTSHeader(t){const e=KT,s=ue({profile:t[e(260)],sampleRate:t[e(264)],channel:t[e(277)]});this[e(258)](s,D[e(242)],0,!0,0)}_initLoopWorker(){const t=KT;this.player[t(293)](this[t(182)],"_initLoopWorker()");const e=Ys(mT);let s=new Worker(e);this[t(251)]=e,this[t(210)]=setTimeout((()=>{const e=t;window[e(269)][e(262)](this.workerUrl),this[e(251)]=null,this[e(210)]=null}),T),s[t(220)]({cmd:"init",options:{type:t(291),seekingMaxDiff:1e4,debug:this[t(206)][t(232)][t(272)],debugUuid:this.player[t(232)].debugUuid,debugLevel:this[t(206)][t(232)].debugLevel}}),s.onmessage=e=>{const s=t,i=e[s(212)];switch(i[s(239)]){case s(229):this._doDecodeVideo(i);break;case"decodeAudio":this[s(219)](i);break;case s(245):if(this[s(265)]=i,this[s(206)][s(214)]()){const t=this[s(255)](),e=this.player[s(238)]();if(t&&e){let i=t/(1e3*e);i!==this[s(281)]&&this[s(206)].emit(M[s(226)],i),this[s(281)]=i}}}},this[t(184)]=s}_postMessageToLoopWorker(t,e){const s=KT;this[s(191)]()&&(this[s(184)]?this[s(184)].postMessage({cmd:t,...e}):this[s(206)][s(202)](this.TAG_NAME,s(223)))}_doDecodeAudio(t){const e=KT,s=new Uint8Array(t[e(273)]);this[e(206)][e(270)]({abps:s[e(244)]});let i=this[e(267)](s);this[e(258)](i,D[e(242)],t[e(266)],!1,0)}[KT(248)](t){const e=KT,s=new Uint8Array(t.payload);let i=null;i=t[e(236)]?Bh(s,t[e(196)]):oh(s,t[e(196)]),this.player.updateStats({dts:t[e(266)],vbps:i[e(244)]});const r=t[e(177)]-t[e(266)];let n=this[e(198)](i,t[e(196)]);this[e(258)](n,D[e(290)],t[e(266)],t[e(196)],r)}getBuferredDuration(){const t=KT;return this[t(265)][t(257)]||0}[KT(279)](){const t=KT;return this[t(265)][t(194)]||0}getSampleAudioListLength(){const t=KT;return this[t(265)][t(186)]||0}getSampleVideoListLength(){const t=KT;return this[t(265)][t(205)]||0}[KT(213)](){const t=KT;return{start:this[t(265)][t(278)]||0,end:this.tempSampleListInfo[t(199)]||0}}[KT(237)](t){const e=KT;this[e(217)](e(237),{time:t})}[KT(216)](t){const e=KT;ci(this.player.isUseMSE())&&(this.clearBuffer(!0),this[e(217)]("cleanSampleList"),this[e(217)](e(190),{time:t}))}pause(){this[KT(217)]("pause")}[KT(181)](){const t=KT;this[t(217)](t(181))}[KT(255)](){const t=KT;let e=0;return e=this[t(213)]()[t(199)],e}addAudioTagHeader(t){const e=KT;let s=[];this.isAudioAac()?s=[175,1]:this[e(208)]()?s=[114]:this[e(283)]()&&(s=[130]);const i=new Uint8Array(t.length+s[e(192)]);return i.set(s,0),i[e(282)](t,s[e(192)]),i}}const JT=XT;function XT(t,e){const s=$T();return(XT=function(t,e){return s[t-=408]})(t,e)}!function(t,e){const s=XT,i=t();for(;;)try{if(177690===-parseInt(s(436))/1+parseInt(s(423))/2*(-parseInt(s(414))/3)+parseInt(s(408))/4+-parseInt(s(413))/5*(parseInt(s(432))/6)+-parseInt(s(427))/7*(-parseInt(s(433))/8)+-parseInt(s(425))/9+parseInt(s(410))/10*(parseInt(s(409))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}($T);class ZT{constructor(t,e){const s=XT;this[s(431)]=t,this[s(418)]=this[s(431)][s(418)],this.isMP4=e,this[s(426)]="",this.TAG_NAME=s(416),e?this[s(421)]=new qT(this.hls.player):this._demuxer=new _T(this[s(431)][s(418)]),this[s(418)][s(415)](this.TAG_NAME,s(419)+(e?s(417):"ts")+" demuxer")}[JT(411)](){const t=JT;this[t(421)]&&(this[t(421)][t(411)](),this[t(421)]=null)}[JT(430)](t,e,s,i,r,n){const o=JT;this[o(418)][o(415)](this[o(429)],"transmux videoChunk:"+(t&&t[o(422)])+o(428)+(e&&e[o(422)])+", discontinuity:"+s+", contiguous:"+i+o(435)+r+o(420)+n);const a=this._demuxer;try{this[o(424)]?a[o(437)](t,e):a[o(434)](Df(t,e),s,i,r)}catch(t){throw new cI(oI[o(412)],oI.HLS,t)}}}function $T(){const t=["42jEdqJX","517904hTYMTc","demuxAndFix",", startTime:","298041gxaaWX","demux","176408mwzMDi","8019363NoAlhE","10GhncTt","destroy","DEMUX","92980LUKMxw","44070ICiwic","debugLog","HlsTransmuxer","mp4","player","init and is ",", needInit:","_demuxer","byteLength","16LRqXDt","isMP4","2195334GqbJiv","_initSegmentId","21xGiYtA",", audioChunk:","TAG_NAME","transmux","hls"];return($T=function(){return t})()}function tk(t){const e=sk;return t&&t.length?1===t[e(470)]&&t[e(462)](0)-t[e(471)](0)<1e-6||1===t.length&&t[e(471)](0)<0?0:t[e(471)](0):0}function ek(t){const e=sk;if(t)try{return t[e(460)]}catch(t){}}function sk(t,e){const s=nk();return(sk=function(t,e){return s[t-=460]})(t,e)}function ik(t,e){const s=sk;if(!t||!t[s(470)])return[];const i=[];for(let r=0,n=t[s(470)];rt+(e[1]-e[0])),0):0}function nk(){const t=["80016aWdLFe","19PVfxbt","push","360oGwgHV","length","start","12OSMYQI","18462VGRQYQ","629691pnGcyn","14usRVsQ","15834559SsyOud","7194xaaiUE","122770NdGFoR","96560YGPjYh","buffered","215JRdVsm","end","5532AfVbVj","875LkaIUy","reduce"];return(nk=function(){return t})()}!function(t,e){const s=sk,i=t();for(;;)try{if(669463===-parseInt(s(467))/1*(parseInt(s(479))/2)+-parseInt(s(474))/3*(-parseInt(s(472))/4)+-parseInt(s(461))/5*(-parseInt(s(473))/6)+parseInt(s(464))/7*(parseInt(s(466))/8)+parseInt(s(469))/9*(parseInt(s(478))/10)+parseInt(s(477))/11*(parseInt(s(463))/12)+-parseInt(s(476))/13*(parseInt(s(475))/14))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(nk);var ok=hk;function ak(){var t=["getSampleRange","2027670oMIZpN","isPlayVodUseMSE","isStateOpen","currentTime","15529320GHwJvS","seekSampleRange","_demuxer","getTsSampleRange","msStreaming","decrypt","_decryptor","debugLog","createSource","duration","isFull","playVod","nbSb","msHasOpTasks","createSource error: chunk is not ts","_mse","detachMedia","getBufferedAudioSegments","cleanSampleListAndSetSeekTime","9oUvyif","endOfStream","81572amjwMg","TAG_NAME","_baseDts","isPlayVod","getSampleVideoListLength","getBufferedSegments","14YjLkrd","220592FSSoTw","_needInitSegment","updateMediaSourceDuration","clearAllBuffer","hls","clearSourceBuffer","pause","getSampleAudioListLength","destroy","media","7055334uLsSyM","setLiveSeekableRange","demuxerPause","_transmuxer","696521jwGxeu","_sourceCreated","4555336khsOCm","msIsOpened","mseDecoder","updateMSE","updateDuration()","length","evictBuffer","seamlessSwitch","player","decryptBuffer","getSampleListLength","removeBuffer","baseDts","getBuferredDuration"];return(ak=function(){return t})()}function hk(t,e){var s=ak();return(hk=function(t,e){return s[t-=458]})(t,e)}!function(t,e){for(var s=hk,i=t();;)try{if(757845===-parseInt(s(469))/1+parseInt(s(518))/2+parseInt(s(509))/3*(parseInt(s(511))/4)+-parseInt(s(486))/5+-parseInt(s(465))/6+-parseInt(s(517))/7*(-parseInt(s(471))/8)+parseInt(s(490))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(ak);class ck{constructor(t){var e=hk;this[e(459)]=t,this.player=t.player,this[e(496)]=new fT(this[e(459)],this[e(479)]),this._transmuxer=null,this[e(505)]=null,this[e(470)]=!1,this._needInitSegment=!0,this._directAppend=!1,this[e(479)][e(487)]()&&(this[e(505)]=this[e(479)].mseDecoder),this[e(512)]="HlsBufferService"}async destroy(){var t=hk;await this[t(506)](),this._transmuxer&&(this[t(468)].destroy(),this[t(468)]=null),this._decryptor&&(this[t(496)][t(463)](),this[t(496)]=null)}[ok(474)](){var t=ok;this[t(479)][t(487)]()&&!this._mse&&(this[t(505)]=this[t(479)][t(473)])}get[ok(483)](){var t,e,s=ok;return null===(t=this[s(468)])||void 0===t||null===(e=t[s(492)])||void 0===e?void 0:e[s(513)]}get[ok(502)](){return 0}get[ok(472)](){return!0}get[ok(503)](){return!1}get[ok(494)](){return!0}async updateDuration(t){var e=ok;this[e(479)][e(514)]()&&(this.player.debugLog(this[e(512)],e(475),t),this.player[e(501)].updateDuration(t),this[e(479)][e(487)]()&&this[e(479)].mseDecoder&&this.player[e(473)][e(488)]&&this.player[e(473)][e(520)](t))}[ok(498)](t,e,s,i){var r=ok;if(this[r(470)])return;const n=t||e;n&&(_T.probe(n)?!this[r(468)]&&(this[r(468)]=new ZT(this.hls,!1)):GT.probe(n)?!this[r(468)]&&(this._transmuxer=new ZT(this[r(459)],!0)):this[r(479)].debugError(this[r(512)],r(504)))}async appendBuffer(t,e,s,i,r,n,o){var a=ok;if(!(null!=s&&s[a(476)]||null!=i&&i.length))return;const h=this._needInitSegment||r;return this._transmuxer.transmux(s,i,h,n,o,h),this[a(519)]=!1,!0}async[ok(482)](){var t=ok;let e=arguments[t(476)]>0&&void 0!==arguments[0]?arguments[0]:0,s=arguments[t(476)]>1&&void 0!==arguments[1]?arguments[1]:1/0;const i=this[t(459)][t(464)];!this[t(505)]||!i||e<0||s=this[t(505)][t(499)]||this[t(505)][t(460)](e,s)}async[ok(477)](t){var e=ok;const s=this[e(459)][e(464)];if(!this[e(505)]||!s||!t||t<0)return;const i=s[e(489)]-t;if(i<=0)return;return tk(ek(s))+1>=i?void 0:this[e(482)](0,i)}async[ok(458)](){var t=ok;this.player[t(497)](this[t(512)],t(458)),this[t(505)]&&this._mse.clearUpAllSourceBuffer()}[ok(480)](t,e){var s=ok;return this[s(496)][s(495)](t,e)}async reset(){var t=ok;t(476),this[t(468)]=null,this[t(519)]=!0,this._directAppend=!1}async endOfStream(){var t=ok;this[t(505)]&&this._sourceCreated&&await this[t(505)][t(510)]()}async[ok(466)](t,e){var s=ok;this[s(505)]&&this[s(505)][s(466)](t,e)}async[ok(506)](){}[ok(478)](){this._needInitSegment=!0}[ok(493)](){var t,e,s=ok;return null===(t=this._transmuxer)||void 0===t||null===(e=t._demuxer)||void 0===e?void 0:e[s(485)]()}seekSampleRange(t){var e,s,i=ok;return null===(e=this[i(468)])||void 0===e||null===(s=e[i(492)])||void 0===s?void 0:s[i(491)](t)}[ok(508)](t){var e,s,i=ok;null===(e=this._transmuxer)||void 0===e||null===(s=e[i(492)])||void 0===s||s[i(508)](t)}[ok(467)](){var t,e,s=ok;null===(t=this[s(468)])||void 0===t||null===(e=t[s(492)])||void 0===e||e[s(461)]()}demuxerResume(){var t,e,s=ok;null===(t=this[s(468)])||void 0===t||null===(e=t[s(492)])||void 0===e||e.resume()}[ok(500)](){return!1}[ok(484)](){var t,e,s=ok;return null===(t=this._transmuxer)||void 0===t||null===(e=t[s(492)])||void 0===e?void 0:e[s(484)]()}[ok(516)](){var t,e,s=ok;return null===(t=this[s(468)])||void 0===t||null===(e=t[s(492)])||void 0===e?void 0:e[s(481)]()}[ok(507)](){var t,e,s=ok;return null===(t=this[s(468)])||void 0===t||null===(e=t._demuxer)||void 0===e?void 0:e[s(462)]()}getBufferedVideoSegments(){var t,e,s=ok;return null===(t=this[s(468)])||void 0===t||null===(e=t[s(492)])||void 0===e?void 0:e[s(515)]()}}const lk=uk;function dk(){const t=["reset","6SDTpbL","delete","3539763cEiOKX","time","emit","SEI_IN_TIME","3yctBAY","14100440vYfDir","3568579pKLwFJ","529948aTKTsU","8XpXxEJ","SEI","push","_seiSet","1830612TMbqMA","1269260ESpxVt","288975WSmZlV"];return(dk=function(){return t})()}function uk(t,e){const s=dk();return(uk=function(t,e){return s[t-=177]})(t,e)}!function(t,e){const s=uk,i=t();for(;;)try{if(327140===parseInt(s(183))/1+-parseInt(s(194))/2*(parseInt(s(191))/3)+-parseInt(s(181))/4+parseInt(s(182))/5*(parseInt(s(185))/6)+-parseInt(s(193))/7*(parseInt(s(177))/8)+-parseInt(s(187))/9+parseInt(s(192))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(dk);class pk{constructor(t){const e=uk;this.emitter=t,this._seiSet=new Set,t.on(vt[e(178)],(t=>{t&&this[e(180)].add(t)}))}throw(t){const e=uk;if(null==t||!this[e(180)].size)return;const s=t-.2,i=t+.2,r=[];this[e(180)].forEach((t=>{const n=e;t[n(188)]>=s&&t[n(188)]<=i&&r[n(179)](t)})),r.forEach((t=>{const s=e;this[s(180)][s(186)](t),this.emitter[s(189)](vt[s(190)],t)}))}[lk(184)](){this[lk(180)].clear()}}const fk=mk;function mk(t,e){const s=gk();return(mk=function(t,e){return s[t-=330]})(t,e)}function gk(){const t=["_samples","_timescale","gopId","encodeType","media","responseUrl","_bindEvents","onMetaData","setDomain","DEMUXED_TRACK","sampleRate","speedInfo","1182664JqQKLe","call","reduce","framerate","setAudioMeta","audioCodec","units","reset","_core","gop","fpsDen","207dlyHBE","_bitsAccumulateSize","height","14yPrgFH","113178UtshDQ","forEach","fps","1390010muWrcI","setVideoMeta","setEncodeType","563751OakwBD","updateBitrate","split","duration","_bitsAccumulateDuration","length","totalSize","speed","3298dHhvFE","videoCodec","fpsNum","channelCount","TTFB","bufferInfo","video","slice","domain","round","bitrate","_stats","codec","305484sRbcrD","width","avgSpeed","getStats","samplerate","track","2093576GiYbam","140SvLTAq","METADATA_PARSED"];return(gk=function(){return t})()}!function(t,e){const s=mk,i=t();for(;;)try{if(325814===-parseInt(s(344))/1+-parseInt(s(358))/2*(-parseInt(s(340))/3)+-parseInt(s(377))/4+-parseInt(s(347))/5+parseInt(s(371))/6*(parseInt(s(343))/7)+parseInt(s(392))/8+-parseInt(s(350))/9*(-parseInt(s(378))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(gk);class Ak{constructor(t){const e=mk;this[e(381)]=t,this.encodeType="",this[e(334)]="",this[e(359)]="",this[e(366)]="",this[e(346)]=0,this[e(368)]=0,this[e(372)]=0,this.height=0,this[e(375)]=0,this.channelCount=0,this.gop=0,this[e(341)]=0,this[e(354)]=0}[fk(374)](){const t=fk;return{encodeType:this[t(383)],audioCodec:this[t(334)],videoCodec:this[t(359)],domain:this[t(366)],fps:this[t(346)],bitrate:this[t(368)],width:this[t(372)],height:this[t(342)],samplerate:this[t(375)],channelCount:this[t(361)],gop:this[t(338)]}}[fk(349)](t){this.encodeType=t}setFpsFromScriptData(t){const e=fk;var s;let{data:i}=t;const r=null==i||null===(s=i[e(387)])||void 0===s?void 0:s[e(332)];r&&r>0&&r<100&&(this[e(346)]=r)}setVideoMeta(t){const e=fk;if(this[e(372)]=t[e(372)],this[e(342)]=t.height,this.videoCodec=t[e(370)],this[e(383)]=t.codecType,t[e(360)]&&t[e(339)]){const s=t[e(360)]/t[e(339)];s>0&&s<100&&(this.fps=s)}}[fk(333)](t){const e=fk;this[e(334)]=t[e(370)],this.samplerate=t[e(390)],this.channelCount=t[e(361)]}[fk(388)](t){const e=fk;this[e(366)]=t[e(352)]("/")[e(365)](2,3)[0]}updateBitrate(t){const e=fk;if((!this[e(346)]||this[e(346)]>=100)&&t[e(355)]){const s=t[e(331)](((t,s)=>t+s[e(353)]),0)/t[e(355)];this[e(346)]=Math[e(367)](this[e(381)]/s)}t[e(345)]((t=>{const s=e;1===t[s(382)]&&this[s(338)]++,this[s(354)]+=t[s(353)]/(this[s(381)]/1e3),this[s(341)]+=t[s(335)].reduce(((t,e)=>t+e[s(355)]),0),this._bitsAccumulateDuration>=1e3&&(this.bitrate=8*this[s(341)],this[s(354)]=0,this._bitsAccumulateSize=0)}))}}class yk{constructor(t){const e=fk;let s=arguments[e(355)]>1&&void 0!==arguments[1]?arguments[1]:1e3;$f(this,e(337),null),$f(this,e(380),[]),this[e(337)]=t,this[e(381)]=s,this._stats=new Ak(s),this[e(386)]()}[fk(374)](){const t=fk;var e,s,i,r,n,o,a,h,c,l,d;const{currentTime:u=0,decodeFps:p=0}=(null===(e=this[t(337)])||void 0===e?void 0:e[t(384)])||{};return{...this[t(369)].getStats(),downloadSpeed:(null===(s=this[t(337)])||void 0===s||null===(i=s[t(391)])||void 0===i?void 0:i.call(s)[t(357)])||0,avgSpeed:(null===(r=this[t(337)])||void 0===r||null===(n=r[t(391)])||void 0===n?void 0:n.call(r)[t(373)])||0,totalReceivedByte:(null===(o=this[t(337)])||void 0===o||null===(a=o.speedInfo)||void 0===a?void 0:a[t(330)](o)[t(356)])||0,totalReceivedCost:(null===(h=this[t(337)])||void 0===h||null===(c=h.speedInfo)||void 0===c?void 0:c.call(h).totalCost)||0,currentTime:u,bufferEnd:(null===(l=this[t(337)])||void 0===l||null===(d=l[t(363)]())||void 0===d?void 0:d.remaining)||0,decodeFps:p}}[fk(386)](){const t=fk;this[t(337)].on(vt[t(389)],(e=>this._stats[t(351)](e.samples))),this[t(337)].on(vt.FLV_SCRIPT_DATA,(e=>{this[t(369)].setFpsFromScriptData(e)})),this[t(337)].on(vt[t(379)],(e=>{const s=t;e.type===s(364)?this[s(369)][s(348)](e.track):this[s(369)][s(333)](e[s(376)])})),this[t(337)].on(vt[t(362)],(e=>{const s=t;this[s(369)][s(388)](e[s(385)])}))}[fk(336)](){const t=fk;this._samples=[],this[t(369)]=new Ak(this[t(381)])}}function bk(t,e){const s=vk();return(bk=function(t,e){return s[t-=285]})(t,e)}function vk(){const t=["totalLength","740796WeKdRf","11128640rlOuKb","isBuffered","650274FZBqew","buffered","35KOUdgf","1352622NccsyI","buffers","2673990xecnXf","450565OegGYs","reduce","info","push","start","36823374aUBvqS","length","end","28kIZHav"];return(vk=function(){return t})()}const Sk=bk;!function(t,e){const s=bk,i=t();for(;;)try{if(737956===-parseInt(s(293))/1+parseInt(s(287))/2+-parseInt(s(295))/3+-parseInt(s(285))/4*(parseInt(s(296))/5)+-parseInt(s(290))/6*(-parseInt(s(292))/7)+-parseInt(s(288))/8+parseInt(s(301))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(vk);class wk{static start(t){const e=bk;return t&&t.length?1===t.length&&t.end(0)-t[e(300)](0)<1e-6||1===t[e(302)]&&t[e(300)](0)<0?0:t[e(300)](0):0}static end(t){const e=bk;return t&&t[e(302)]?1===t[e(302)]&&t.end(0)-t[e(300)](0)<1e-6?0:t[e(303)](t[e(302)]-1):0}static get(t){const e=bk;if(t)try{return t[e(291)]}catch(t){}}static[Sk(294)](t,e){const s=Sk;if(!t||!t[s(302)])return[];const i=[];for(let r=0,n=t[s(302)];ra&&(o[1]=e)}else i[s(299)]([t[s(300)](r),t[s(303)](r)])}else i.push([t.start(r),t.end(r)])}return i}static totalLength(t){const e=Sk;return t&&t[e(302)]?t[e(297)](((t,e)=>t+(e[1]-e[0])),0):0}static[Sk(298)](t){const e=Sk;let s=arguments[e(302)]>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments[e(302)]>2&&void 0!==arguments[2]?arguments[2]:0;if(!t||!t.length)return{start:0,end:0,buffers:[]};let r=0,n=0,o=0,a=0,h=0,c=0,l=0;const d=wk[e(294)](t,i);for(let t=0,u=d[e(302)];t=e[0]&&se[1]&&(c=e[0],l=e[1])}}return{start:r,end:n,index:o,buffers:d,nextStart:a,nextEnd:h,prevStart:c,prevEnd:l,currentTime:s,behind:s-r,remaining:n?n-s:0,length:wk[e(286)]&&wk[e(286)](d)}}static[Sk(289)](t,e){const s=Sk;if(t){const i=wk.get(t);if(null!=i&&i[s(302)])for(let t=0;t=i[s(300)](t)&&e<=i.end(t))return!0}return!1}}function Ek(t,e){const s=Tk();return(Ek=function(t,e){return s[t-=445]})(t,e)}!function(t,e){const s=Ek,i=t();for(;;)try{if(628676===parseInt(s(457))/1*(-parseInt(s(452))/2)+-parseInt(s(462))/3*(parseInt(s(465))/4)+parseInt(s(466))/5*(parseInt(s(446))/6)+-parseInt(s(464))/7*(parseInt(s(463))/8)+-parseInt(s(461))/9+parseInt(s(458))/10*(-parseInt(s(451))/11)+-parseInt(s(460))/12*(-parseInt(s(448))/13))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Tk);class Ik{constructor(t){const e=Ek;this.hls=t,this[e(449)]=0}do(t){const e=Ek;let s=arguments[e(445)]>1&&void 0!==arguments[1]?arguments[1]:3,i=arguments.length>2?arguments[2]:void 0,r=arguments[e(445)]>3&&void 0!==arguments[3]?arguments[3]:1;if(!t)return;const n=t.currentTime;let o=0;if(this[e(449)]===n){const a=wk[e(454)](wk[e(455)](t),n);if(!a[e(456)][e(445)])return;i&&a.nextStart||a[e(453)]&&a[e(453)]-nr&&!t[e(447)]&&(o=n+.1)}this[e(449)]=n,o&&n!==o&&(t[e(450)]=o)}}function Tk(){const t=["seeking","52pLKEKj","_prevCurrentTime","currentTime","1293424EkTDuF","2jZzgXt","nextStart","info","get","buffers","974233QFmCXQ","10QIXDfQ","end","10950252TRaiGc","6262722elLooV","2059269tiDpdN","32fHxiRW","1395233xsLwOK","4WBWuub","10qlfGbR","length","749898rbfmQf"];return(Tk=function(){return t})()}function kk(){const t=["1506AqarEp","log","hadSegmentLoaded","_stopTick","lowLatency","SUBTITLE_PLAYLIST","286gfkoRA","manifest","setLiveSeekableRange"," or bufferThroughout is ","_segmentProcessing","findSegmentIndexByTime","createSource","media","currentSegment","network","streams","destroy()","_loadM3U8() playlist is empty","_loadData","STREAM_PARSED","load","nextSeg is null and return","number","length","getBuferredDuration","debugWarn"," index of ","_disconnectTimer","isPlayVod","_loadSegment","_emitError","onPlay","onSeeking","playVodVideoSeekingByMse","seekRange","catch","readyState","_prevSegCc","get","checkSegmentTrackChange","audio seg","getStats","lastSegment","isBuffered","targetLatency","currentStream","_loadSegmentDirect","player","_tick() player is destroyed","manifestList","startTime","_tryEos","m3u8 url is not defined","speedInfo","playVod","_loadSegmentDirect() !seg","filter","removeBuffer","decryptBuffer return null","getSegmentByIndex","nextSegment","reset","_clear","maxLatency","segment nb=","emit","unsupported switchURL args: ","then","_loadSegment() and _prevSegmentEndTime is ","getAudioSegment","_urlSwitching","lastSeg","Hls256","is live and totalDuration first time got: ","poll","buffer remaining ","end","_loadSegment()_segmentProcessing is ture and return","getBufferedAudioSegments","bufferInfo","upsertPlaylist","switchURL","parseText","onSeeking() seek to tsSampleRange"," more than ","TAG_NAME","_reloadOnPlay","currentAudioStream","767046hpiNEP","trim","_pollM3U8","updateDuration","_prevSegSn","isLast","and next _loadSegment()","object","_stats","msHasOpTasks","bitrate","partTargetDuration","debugLog","_tick","parentUrl","isMaster","eventListenList"," and seg is","minSegmentsStartPlay","isEmpty","_gapService","seg.isLast","9AhKpPL","abs","setNextSegmentBySN","nbSb","cleanSampleListAndSetSeekTime","video seg","playVodPause","maxJumpDistance","_refreshM3U8","343884bNzmDb","_manifestLoader","subtitleStreams","appendBuffer","_tickInterval","_end","_getSeamlessSwitchPoint","endOfStream","duration","_seiService","onSeeking() seek to ","_reset","getDemuxVideoBufferedListLength","191004cNAagw","clearOldSegment","video","videoCodec","debug","_onVideoTimeUpdate","isSeeking","isPlayer","_end()","seekSampleRange","all","getTsSampleRange","boolean","error","now"," in the new playlist","OTHER","in range","onVideoSeeking() update current time","remaining","909167NFWAzx","isLive","resetBandwidth","play","_prevSegmentEndTime","config","cancel","url","_checkStreamTrackChange","preloadTime","max","_segmentLoader","getBufferedVideoSegments","_bufferService","info","239FoHghw","nextSeg","bufferBehind","4098830syTrFr","decryptBuffer","destroy end","demuxerPause","nextStart","nbSegments","byteRange","getBufferedSegments","onPause()","paused","start","baseDts","_tickTimer","SWITCH_URL_SUCCESS","evictBuffer","demuxerResume","bind","onVideoSeeking() and seekRange is"," and return","onPlay()","msIsOpened","audioCodec","buffered","listen playVodVideoSeekingByMse","hasSubtitle"," and segIndex is ","create","_loadSegmentDirect()","seeking"," and current time is ","destroy","_clear()","getRenderCurrentPts","_loadSegment()","table","m3u8 url is missing",", nb segments got:","min","clear buffer from ","_startTick","_switchUrlOpts","_loadM3U8","SWITCH_URL_FAILED","_isProcessQuotaExceeded","canVideoPlay",", real end=","isFull","onVideoSeeking","ERROR","rate"," expected end=","6523080bAyCnY","fatal","_refreshM3U8() mediaPlaylist is empty","totalDuration"," > ","curSeg","msStreaming","setNextSegmentByIndex","_reset()","_loadSegment() this._playlist is null and return","_onCheckQuotaExceeded","$videoElement","_playlist","_reqAndBufferSegment","currentTime","25uKGIPP","and seekTime is","moveSegmentPointer","12xiVYXo","onPause","seamlessSwitch"];return(kk=function(){return t})()}const _k=Ck;function Ck(t,e){const s=kk();return(Ck=function(t,e){return s[t-=125]})(t,e)}!function(t,e){const s=Ck,i=t();for(;;)try{if(436302===-parseInt(s(181))/1*(parseInt(s(256))/2)+parseInt(s(345))/3+parseInt(s(146))/4*(-parseInt(s(250))/5)+-parseInt(s(253))/6*(-parseInt(s(166))/7)+parseInt(s(235))/8*(-parseInt(s(367))/9)+parseInt(s(184))/10+-parseInt(s(262))/11*(-parseInt(s(133))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(kk);class Rk extends Bi{constructor(t){const e=Ck;let s=arguments[e(280)]>1&&void 0!==arguments[1]?arguments[1]:{};var i;super(),$f(this,e(286),(async()=>{const t=e;if(this[t(266)])return void this[t(304)].debugLog(this[t(342)],t(334));if(!this[t(247)])return void this.player.debugLog(this[t(342)],t(244));const s=this[t(247)][t(270)],i=this[t(247)][t(317)],r=this[t(247)][t(299)];this[t(304)][t(357)](this[t(342)],t(217),t(240),s&&s[t(173)],t(182),i&&i[t(173)],t(328),r&&r[t(173)]);const n=Math[t(221)](Math[t(176)]((null==r?void 0:r[t(141)])-.008||0,.016),.1);if(i){if(!this.isLive){const e=this[t(171)];if(this.media){let s=this.bufferInfo();this[t(269)][t(193)]&&!this[t(269)][t(249)]&&(s=this[t(336)](s[t(188)]||.5));const r=Math.abs(s[t(333)]-this[t(269)][t(141)])=o||r)return this.player[t(357)](this[t(342)],t(332)+s[t(165)]+t(239)+o+t(265)+r+t(202)),void this[t(308)]();if(e.preferMMSStreaming&&!this[t(179)][t(241)])return;!this[t(327)]&&this[t(349)]!==i.sn-1&&s[t(333)]&&Math[t(125)](i[t(194)]-s[t(333)])>1&&this[t(247)][t(242)](this[t(247)][t(267)](s[t(333)]+.1))}else if(this[t(304)][t(285)]()){let s=this[t(304)][t(216)]();s/=1e3;let r=this[t(304)][t(311)][t(152)]();if(this[t(170)]&&ci(r)&&this[t(170)]>e.preloadTime*this[t(304)][t(311)][t(233)]+s)return void this[t(304)].debug[t(257)](this[t(342)],t(325)+this[t(170)]+t(213)+s+t(341)+(e[t(175)]*this.player.playVod[t(233)]+s)+t(202));this[t(170)]=i[t(333)]}}return this._loadSegmentDirect()}this[t(304)].debugLog(this[t(342)],t(278))})),this[e(304)]=t,this[e(171)]=null,this[e(134)]=null,this[e(177)]=null,this[e(247)]=null,this[e(179)]=null,this[e(142)]=null,this[e(353)]=null,this._prevSegSn=null,this._prevSegCc=null,this[e(196)]=null,this[e(137)]=500,this._segmentProcessing=!1,this._reloadOnPlay=!1,this[e(224)]=null,this._isProcessQuotaExceeded=!1,this._disconnectTimer=null,this[e(170)]=0,this[e(361)]=[],this[e(342)]=e(329),this[e(228)]=!1,this.$videoElement=null,this[e(171)]=(i=s,s={isLive:!1,maxPlaylistSize:50,retryCount:3,retryDelay:1e3,pollRetryCount:2,loadTimeout:1e4,manifestLoadTimeout:1e4,preloadTime:30,softDecode:!1,bufferBehind:10,maxJumpDistance:3,startTime:0,useLowLatency:!0,targetLatency:10,maxLatency:20,allowedStreamTrackChange:!0,seiInTime:!1,manifestList:[],minSegmentsStartPlay:3,preferMMS:!1,preferMMSStreaming:!1,mseLowLatency:!0,fixerConfig:{forceFixLargeGap:!1,largeGapThreshold:5},...i}),this[e(269)]=null,this[e(134)]=new QI(this),this[e(177)]=new eT(this),this[e(247)]=new lT(this),this[e(179)]=new ck(this),this[e(142)]=new pk(this),this._gapService=new Ik(this),this[e(353)]=new yk(this,9e4),this[e(304)],this[e(304)][e(153)]()&&(this[e(171)][e(167)]=!0),this[e(304)][e(285)]()&&(this[e(304)].on(M[e(130)],this.handlePlayVodPause[e(200)](this)),this[e(304)].isPlayVodUseMSE()?(this[e(269)]=this[e(304)][e(148)][e(246)],this.player.on(M[e(290)],this[e(231)][e(200)](this))):this[e(304)].on(M.playVodSeek,this[e(289)][e(200)](this))),this.player[e(150)][e(257)](this[e(342)],"init")}async[_k(214)](){const t=_k;this.player.debugLog(this[t(342)],t(273)),this[t(247)][t(318)](),this[t(177)][t(318)](),this._seiService[t(318)](),this.eventListenList.length&&(this[t(361)].forEach((t=>t())),this.eventListenList=[]),await Promise[t(156)]([this._clear(),this[t(179)][t(214)]()]),this._manifestLoader&&(await this[t(134)][t(214)](),this._manifestLoader=null),this[t(177)]&&(this._segmentLoader[t(214)](),this._segmentLoader=null),this[t(247)]&&(this[t(247)][t(214)](),this._playlist=null),this[t(269)]=null,this[t(304)][t(357)](this[t(342)],t(186))}get[_k(167)](){const t=_k;return this[t(247)][t(167)]}get[_k(272)](){const t=_k;return this[t(247)][t(272)]}get currentStream(){const t=_k;return this[t(247)][t(302)]}get[_k(208)](){const t=_k;return this._playlist[t(208)]}get totalDuration(){const t=_k;return this[t(247)][t(238)]}get[_k(195)](){const t=_k;var e;return null===(e=this._bufferService)||void 0===e?void 0:e[t(195)]}[_k(223)](){const t=_k;this[t(259)](),this._tickTimer=setTimeout((()=>{this[t(358)]()}),this[t(137)])}[_k(259)](){const t=_k;this[t(196)]&&clearTimeout(this[t(196)]),this[t(196)]=null}[_k(358)](){const t=_k;if(this[t(304)].isDestroyedOrClosed())this.player[t(357)](this[t(342)],t(305));else if(!this[t(304)][t(130)]){if(this[t(223)](),this[t(269)]){const e=this.media,s=this._segmentLoader[t(159)];if(this[t(245)](),this[t(227)]&&!this[t(179)][t(230)]()&&(this[t(227)]=!1,this[t(266)]=!1),s){const i=.5;return void((!e.readyState||this.bufferInfo(i).remaining<1)&&(s[t(236)]=!0,this[t(287)](cI[t(271)](s))))}e.readyState&&(bi(e)?(this[t(286)](),this[t(365)]&&this._gapService.do(e,this[t(171)][t(131)],this.isLive)):e[t(293)]<2&&this._gapService&&this[t(365)].do(e,this[t(171)].maxJumpDistance,!e[t(249)]||this.isLive))}else this[t(286)]();!this[t(167)]&&this[t(308)]()}}[_k(310)](){return this[_k(177)].speedInfo()}[_k(336)](){const t=_k;var e;let s=arguments[t(280)]>0&&void 0!==arguments[0]?arguments[0]:.1;return this[t(269)]?wk[t(180)](wk[t(295)](this[t(269)]),null===(e=this[t(269)])||void 0===e?void 0:e[t(249)],s):{}}[_k(298)](){const t=_k;return this[t(353)][t(298)]()}[_k(168)](){const t=_k;this[t(177)][t(168)]()}async loadSource(t){const e=_k;return t&&(this.config[e(173)]=t),t=this[e(171)][e(173)],this._bufferService.updateMSE(),await this[e(144)](),await this[e(275)](t),this[e(223)](),!0}async[_k(275)](t){const e=_k;try{t&&(t=t[e(346)]())}catch(t){}if(!t)throw this[e(287)](new cI(oI.OTHER,oI[e(162)],null,null,e(219)));const s=await this[e(225)](t),{currentStream:i}=this._playlist;if(this[e(327)])if(this[e(167)]){const t=this[e(247)][e(126)](this._prevSegSn);this[e(304)].debugLog(this[e(342)],e(321)+this[e(349)]+e(283)+t+e(161)),-1===t&&(this[e(294)]=null,this[e(349)]=null)}else{var r,n,o,a;if(0===i[e(355)]&&null!==(r=this._switchUrlOpts)&&void 0!==r&&r[e(355)])i[e(355)]=null===(a=this[e(224)])||void 0===a?void 0:a[e(355)];const t=typeof(null===(n=this[e(224)])||void 0===n?void 0:n[e(307)])===e(279)?null===(o=this[e(224)])||void 0===o?void 0:o[e(307)]:this[e(139)]();this[e(171)][e(307)]=t;const s=this[e(247)].findSegmentIndexByTime(t),h=this[e(247)][e(316)](s+1);if(h){const t=h.start;this[e(304)][e(282)](this[e(342)],e(222)+t),await this[e(179)][e(314)](t)}}if(s)if(this[e(167)]){if(this[e(179)][e(264)](0,4294967295),this[e(304)][e(357)](this[e(342)],e(330),this._playlist[e(238)],e(220),this[e(247)][e(189)]),this.config.targetLatency1&&void 0!==arguments[1]?arguments[1]:{};switch(typeof s){case e(279):s={startTime:s};break;case e(158):s={seamless:s};break;case e(352):for(const t in s)(void 0===s[t]||null===s[t])&&delete s[t];break;default:throw e(323)+s}s=Object.assign({},{seamless:!1,startTime:0,bitrate:0},s);const{seamless:i,startTime:r}=s;if(this[e(171)][e(173)]=t,this[e(171)].startTime=r,this[e(224)]=s,!i){let s;try{s=this[e(171)].softDecode?this.loadSource(t):await this.loadSource(t)}catch(t){throw this[e(322)](vt.SWITCH_URL_FAILED,t),t}return this[e(343)]=!1,s&&this[e(322)](vt[e(197)],{url:t}),this.media[e(169)](!0)}this[e(327)]=!0,!this[e(167)]&&(this[e(349)]=null,this[e(294)]=null),this[e(247)][e(318)](),this._bufferService[e(255)](),await this[e(319)](),await this[e(275)](t),this[e(223)](),this[e(224)]=null}async[_k(225)](t){const e=_k;let s;try{var i,r;const n=null===(i=this.config[e(306)])||void 0===i||null===(r=i[e(313)]((e=>e.url===t))[0])||void 0===r?void 0:r[e(263)];[s]=n?this[e(134)][e(339)](n,t):await this._manifestLoader[e(277)](t)}catch(t){throw this[e(287)](cI[e(210)](t))}if(s){var n;if(this[e(247)][e(337)](s),s[e(360)])null!==(n=this[e(247)].currentStream[e(135)])&&void 0!==n&&n.length&&this[e(322)](vt[e(261)],{list:this[e(247)].currentStream[e(135)]}),await this._refreshM3U8();else this[e(304)][e(282)](this.TAG_NAME,"_loadM3U8() is not master playlist");return this.emit(vt[e(276)]),s}this[e(304)][e(282)](this[e(342)],e(274))}[_k(132)](){const t=_k;var e,s;this[t(304)].debugLog(this[t(342)],"_refreshM3U8()");const i=this[t(247)][t(302)];if(!i||!i.url)throw this[t(287)](cI[t(210)](null,null,new Error(t(309))));const r=i.url,n=null===(e=i[t(344)])||void 0===e?void 0:e[t(173)],o=null===(s=i.currentSubtitleStream)||void 0===s?void 0:s[t(173)];return this[t(134)][t(277)](r,n,o)[t(324)]((e=>{const s=t;let[i,a,h]=e;i?(this[s(247)][s(337)](i,a,h),this.isLive&&this[s(347)](r,n,o)):this[s(304)][s(282)](this.TAG_NAME,s(237))}))[t(292)]((e=>{const s=t;throw this[s(287)](cI[s(210)](e))}))}[_k(347)](t,e,s){const i=_k;let r,n=this[i(247)][i(364)];var o;this[i(247)][i(260)]?r=1e3*(this[i(247)][i(302)][i(356)]||0):r=1e3*((null===(o=this[i(247)][i(299)])||void 0===o?void 0:o[i(141)])||0);this[i(134)][i(331)](t,e,s,((t,e,s)=>{const r=i;this._playlist[r(337)](t,e,s),this._playlist[r(147)]();(t&&n&&!this[r(247)].isEmpty||!this[r(247)][r(258)]&&this[r(247)][r(189)]>=this[r(171)][r(363)])&&this[r(286)](),n&&(n=this[r(247)][r(364)])}),(t=>{const e=i;this[e(287)](cI[e(210)](t))}),r)}async[_k(303)](t){const e=_k,s=this[e(247)][e(317)];if(!s)return void this.player[e(357)](this[e(342)],e(312));let i=!1,r=null;try{this[e(266)]=!0,i=await this[e(248)](s,this[e(247)][e(326)](s))}catch(t){r=t}finally{this._segmentProcessing=!1}if(r)return this[e(179)][e(230)]()?(this[e(266)]=!0,this._isProcessQuotaExceeded=!0,!1):this[e(287)](cI[e(210)](r));if(i){var n;const i=this.bufferInfo()[e(333)];this[e(167)]&&this[e(269)]&&!this[e(269)][e(212)]&&i&&Math[e(125)](s.end-i)>1&&(this[e(304)][e(282)](this[e(342)],"segment: "+s.sn+e(234)+s[e(333)]+e(229)+i),this[e(247)].feedbackLiveEdge(s,i));const r=(null===(n=this[e(247)].currentStream)||void 0===n?void 0:n[e(173)])===s[e(359)];this[e(327)]&&!r&&this._bufferService.seamlessSwitch(),this.isLive&&this[e(327)]&&r&&(this[e(327)]=!1,this[e(322)](vt[e(197)],{url:this.config[e(173)]})),this[e(247)][e(252)](),this.player[e(357)](this[e(342)],e(211),e(366),s[e(350)]),s[e(350)]?(this[e(304)][e(357)](this[e(342)],"_loadSegmentDirect()",e(366)),this[e(138)]()):!t&&(this[e(304)][e(357)](this[e(342)],e(211),e(351)),this[e(286)]())}else this[e(304)][e(357)](this.TAG_NAME,"_loadSegmentDirect() not appended");return i}async[_k(248)](t,e){const s=_k;this.player[s(357)](this[s(342)],s(129),t&&t[s(173)],t&&t[s(190)],s(297),e&&e[s(173)],e&&e[s(190)]);const i=t?t.cc:e.cc,r=this[s(294)]!==i;let n=[];try{n=await this[s(177)][s(277)](t,e,r)}catch(t){throw t[s(236)]=!1,this[s(177)][s(159)]=t,t}if(!n[0])return;const o=await this[s(179)][s(185)](...n);if(!o)return void this[s(304)][s(357)](this[s(342)],s(315));const a=t?t.sn:e.sn;let h=t?t[s(194)]:e[s(194)];const c=this._playlist[s(302)];this[s(179)][s(268)](o[0],o[1],null==c?void 0:c[s(149)],null==c?void 0:c[s(205)]),Date[s(160)]();const l=this[s(349)]===a-1;if(this[s(167)]&&this[s(327)]){const t=this[s(336)]().end;this._playlist.updateSegmentsRanges(a,t),h=t}return await this._bufferService[s(136)](t,e,o[0],o[1],r,l,h),await this._bufferService[s(198)](this.config[s(183)]),this[s(294)]=i,this[s(349)]=a,!0}async _clear(){const t=_k;this[t(304)][t(357)](this.TAG_NAME,t(215)),clearTimeout(this[t(284)]),this._stopTick(),await Promise[t(156)]([this[t(177)][t(172)](),this[t(134)].stopPoll()]),this[t(266)]=!1}async[_k(144)](){const t=_k;let e=arguments[t(280)]>0&&void 0!==arguments[0]&&arguments[0];return this[t(304)][t(357)](this[t(342)],t(243)),this[t(343)]=!1,this[t(349)]=null,this[t(294)]=null,this._switchUrlOpts=null,this[t(170)]=0,this._playlist[t(318)](),this[t(177)][t(318)](),this[t(142)].reset(),this._stats.reset(),await this[t(319)](),this[t(179)][t(318)](e)}[_k(138)](){const t=_k;this.player[t(357)](this[t(342)],t(154)),this[t(319)](),this[t(179)][t(140)](),this[t(269)]&&(this.media.readyState<=2||this[t(269)][t(206)][t(280)]>1)&&this[t(223)]()}[_k(287)](t){const e=_k;var s;let i=arguments[e(280)]>1&&void 0!==arguments[1]&&arguments[1];var r;!1===(null===(s=t.originError)||void 0===s?void 0:s[e(236)])?console.warn(t):(console[e(218)](t),console.error(t),console.error(null===(r=this[e(269)])||void 0===r?void 0:r[e(159)]),this[e(259)](),this._urlSwitching&&(this[e(327)]=!1,this.emit(vt[e(226)],t)),i&&this[e(138)](),this._seiService[e(318)](),this[e(322)](vt[e(232)],t));return t}_getSeamlessSwitchPoint(){const t=_k,{media:e}=this;let s=e[t(249)];if(!e[t(193)]){var i;const r=this[t(247)][t(267)](e[t(249)]),n=this[t(247)][t(316)](r),o=null===(i=this[t(353)])||void 0===i?void 0:i[t(298)]().downloadSpeed;if(o&&n){s+=n[t(141)]*this[t(247)].currentStream[t(355)]/o+1}else s+=5}return s}_tryEos(){const t=_k;var e,s;const{media:i}=this;if(!i)return;const{nextSegment:r,lastSegment:n}=this[t(247)];if(!((!r||n&&wk[t(300)](i,n[t(194)]+n[t(141)]/2))&&i[t(293)]&&i.duration>0&&(null===(e=this._bufferService)||void 0===e?void 0:e[t(204)])&&!(null!==(s=this._bufferService)&&void 0!==s&&s[t(354)])))return;let o=this[t(336)]();i[t(193)]&&!i[t(249)]&&(o=this[t(336)](o[t(188)]||.5));(Math[t(125)](o.end-i.duration)<.1||!this[t(167)]&&n&&o[t(333)]>=n[t(194)]+n[t(141)])&&this[t(179)].endOfStream()}async[_k(245)](){const t=_k;if(!this.media)return;const e=this[t(269)][t(249)],s=this[t(269)][t(206)];let i=!1;for(let r=0;r=e&&e0&&await this[t(179)][t(314)](0,s-e)}}async[_k(288)](){const t=_k;this[t(304)][t(150)].log(this[t(342)],t(203)),this[t(179)][t(199)](),await this[t(286)](),this[t(223)]()}[_k(254)](){const t=_k;this[t(304)].debug.log(this[t(342)],t(192)),this[t(179)][t(187)](),this._stopTick(),this[t(177)][t(318)]()}async handlePlayVodPause(t){const e=_k;t?this[e(254)]():await this[e(288)]()}async[_k(289)](t){const e=_k;let s=arguments[e(280)]>1&&void 0!==arguments[1]&&arguments[1];this[e(304)].debug[e(257)](this[e(342)],"listen playVodSeek",t);const i=this[e(179)][e(157)]();if(this[e(304)][e(150)][e(257)](this[e(342)],e(340),i),i&&i[e(194)]<=t&&t<=i.end)return this[e(304)][e(150)][e(257)](this[e(342)],e(340),i,e(163)),void this._bufferService[e(155)](t);const r=this[e(247)].findSegmentIndexByTime(t),n=this[e(247)][e(316)](r);null==r||!n||this[e(266)]&&n===this[e(247)][e(317)]||(this[e(304)][e(150)].log(this[e(342)],e(143)+t+e(209)+r+e(362),n),this[e(179)][e(128)](t),this[e(247)][e(242)](r),this[e(259)](),this[e(170)]=0,await this[e(177)].cancel(),this._segmentProcessing=!1,(!s||this.isLive)&&await this[e(303)](!0),this[e(223)]())}async[_k(231)](t){const e=_k;this[e(304)][e(150)][e(257)](this.TAG_NAME,e(207),t),this._onCheckQuotaExceeded();const s=this[e(247)][e(291)];if(this[e(304)][e(357)](this[e(342)],e(201),s,e(251),t),s){const i=Ve(t,s[0]+.1,s[1]-.1);if(i>=0&&Math.abs(t-i)>=.1)return this[e(304)][e(357)](this[e(342)],e(164),i),void(this.media[e(249)]=i)}const i=this[e(247)].currentSegment,r=wk.info(wk[e(295)](this[e(269)]),t,.1);if(i){if(r[e(333)]&&Math[e(125)](r.end-i.end)<.2)return;if(this[e(167)]&&r[e(333)])return}await this.onSeeking(t,r.end)}[_k(151)](){this[_k(171)]}[_k(174)](t){const e=_k,s=this._playlist[e(296)](t,this[e(179)][e(127)]);s&&this[e(338)](this[e(171)][e(173)],s[e(194)]+.2)}getDemuxBuferredDuration(){const t=_k;return this._bufferService[t(281)]()||0}getDemuxBufferedListLength(){const t=_k;return this[t(179)][t(191)]()||0}getDemuxAudioBufferedListLength(){const t=_k;return this[t(179)][t(335)]()||0}[_k(145)](){const t=_k;return this._bufferService[t(178)]()||0}}const Dk=Lk;function Lk(t,e){const s=xk();return(Lk=function(t,e){return s[t-=266]})(t,e)}function xk(){const t=["1928QfJDzT","22667733IzQWdv","8ReRPqa","video","eventsDestroy","1233036xlAacO","Hls256Decoder","emit","1786405zuDxxZ","getDemuxBufferedListLength","171mmWNZv","length","destroy","speedInfo","TAG_NAME","kBps","7UiBmDP","bandwidthEstimateInterval","emitError","hls","63830etARpy","getDemuxBuferredDuration","_startBandwidthEstimateInterval","getDemuxAudioBufferedListLength","ERROR","727ynhikT","avgSpeed","toFixed","_stopBandwidthEstimateInterval","debugLog","resetBandwidth","5598216uKLxZD","player","$videoElement","470544aFUMWQ","_bindEvents","loadSource","url"];return(xk=function(){return t})()}!function(t,e){const s=Lk,i=t();for(;;)try{if(399401===-parseInt(s(295))/1*(parseInt(s(270))/2)+parseInt(s(275))/3+parseInt(s(272))/4*(-parseInt(s(278))/5)+-parseInt(s(266))/6*(parseInt(s(286))/7)+-parseInt(s(301))/8+-parseInt(s(280))/9*(-parseInt(s(290))/10)+parseInt(s(271))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(xk);class Pk extends Bi{constructor(t){const e=Lk;super(),$f(this,e(284),e(276)),this.player=t,this[e(303)]=this.player[e(273)][e(303)],this.hls=null,this[e(274)]=[],this[e(287)]=null,this.hls=new Rk(t),this[e(267)]()}async[Dk(282)](){const t=Dk;return this[t(298)](),this.hls&&(await this[t(289)][t(282)](),this[t(289)]=null),this[t(274)][t(281)]&&(this[t(274)].forEach((t=>t())),this.eventsDestroy=[]),this[t(303)]=null,this.player.debugLog(this[t(284)],"destroy"),!0}[Dk(267)](){const t=Dk;this[t(289)].on(vt[t(294)],(e=>{const s=t;this[s(302)][s(288)](U.hlsError,e)}))}[Dk(292)](){const t=Dk;this._stopBandwidthEstimateInterval(),this[t(287)]=setInterval((()=>{const e=t;if(!this[e(289)])return;const s=this.hls[e(283)]();this[e(302)][e(277)](M[e(285)],(s[e(296)]/1024/8)[e(297)](2)),this.hls[e(300)]()}),1e3)}[Dk(298)](){const t=Dk;this[t(302)][t(299)](this[t(284)],t(298)),this[t(287)]&&(clearInterval(this[t(287)]),this[t(287)]=null)}async loadSource(t){const e=Dk;return this[e(269)]=t,await this[e(289)][e(268)](t),this[e(292)](),!0}checkHlsBufferedDelay(){const t=Dk;let e=0;return this[t(289)]&&(e=this.hls[t(291)]()),e}[Dk(279)](){const t=Dk;let e=0;return this[t(289)]&&(e=this[t(289)][t(279)]()),e}[Dk(293)](){const t=Dk;let e=0;return this[t(289)]&&(e=this[t(289)].getDemuxAudioBufferedListLength()),e}getDemuxVideoBufferedListLength(){const t=Dk;let e=0;return this[t(289)]&&(e=this[t(289)].getDemuxVideoBufferedListLength()),e}}function Bk(){const t=["av1C","channelCount","baseMediaDecodeTime","vide","defaultSampleDuration","width","2CZKFQn","2467302TkCcpo","keyframe","20lKxKcb","IS_NON_SYNC","stsd","subsegment_duration","mdhd","samplesPerChunk","FLAG","set","index","SAMPLE_DUR","handlerType","entrySizes","sampleSize","byteLength","dts","minf","codec","timescale","avcC","gopId","14dNPjTa","flags","mdia","defaultSampleFlags","pts","hdlr","default_KID","referenced_size","CTS_OFFSET","reduce","forEach","trak","firstChunk","type","SIZE","sinf","size","start","1033641cismhD","baseDataOffset","DEPENDS_YES","5165385VzvDDm","soun","esds","concat","startTime","SAMPLE_FLAG","push","hvcC","mvhd","DEFAULT_BASE_IS_MOOF","endTime","entries","isNaN","defaultSampleSize","cts","9023888yHrrRm","DURATION","sampleRate","6700095mjFkGl","offset","SAMPLE_SIZE","tenc","find","329636ateyTU","length","stbl","duration","FIRST_FLAG","569004zOotXT"];return(Bk=function(){return t})()}function Mk(t,e){const s=Bk();return(Mk=function(t,e){return s[t-=294]})(t,e)}function Fk(t,e){const s=Mk,i=t[s(313)];if(!i||!i[s(347)])return;const r=i[s(345)]((t=>{const e=s;var i,r;return(null===(i=t[e(304)])||void 0===i||null===(r=i[e(307)])||void 0===r?void 0:r[e(371)])===e(355)})),n=i[s(345)]((t=>{const e=s;var i,r;return(null===(i=t[e(304)])||void 0===i||null===(r=i[e(307)])||void 0===r?void 0:r[e(371)])===e(324)}));if(!r&&!n)return;let o=[],a=[];if(e){const t=[];let i=0,r=e[s(319)]+e[s(318)];e.references[s(312)](((n,o)=>{const a=s;t[a(329)]({index:o,startTime:i,endTime:i+n[a(364)]/e[a(299)],duration:n[a(364)]/e[a(299)],range:[r,r+n[a(309)]],frames:[]}),i+=n[a(364)]/e[a(299)],r+=n.referenced_size})),o=t,a=t}else{var h,c;const e=e=>{const i=s;return e?[{index:0,startTime:0,endTime:e[i(349)]/e[i(299)],duration:e.duration/e[i(299)],range:[t[i(319)]+t[i(318)],""],frames:[]}]:[]};a=e(t.mvhd[s(349)]?t.mvhd:null===(h=r[s(304)])||void 0===h?void 0:h[s(365)]),o=e(t.mvhd[s(349)]?t[s(331)]:null===(c=n[s(304)])||void 0===c?void 0:c[s(365)])}return{videoSegments:a,audioSegments:o}}function Ok(t,e){const s=Mk,i=t[s(313)];if(!i||!i[s(347)])return;const r=i[s(345)]((t=>{const e=s;var i,r;return(null===(i=t[e(304)])||void 0===i||null===(r=i[e(307)])||void 0===r?void 0:r.handlerType)===e(355)})),n=i[s(345)]((t=>{const e=s;var i,r;return(null===(i=t[e(304)])||void 0===i||null===(r=i.hdlr)||void 0===r?void 0:r[e(371)])===e(324)}));if(!r&&!n)return;let o,a=[],h=[];if(r){var c,l,d;const t=null===(c=r[s(304)])||void 0===c||null===(l=c[s(297)])||void 0===l?void 0:l[s(348)];if(!t)return;const i=null===(d=r[s(304)][s(365)])||void 0===d?void 0:d[s(299)],{stts:n,stsc:h,stsz:u,stco:p,stss:f,ctts:m}=t;if(!(i&&n&&h&&u&&p&&f))return;a=Uk(e,i,n,h,u,p,f,m),o=a.map((t=>t.duration))}if(n){var u,p,f;const t=null===(u=n[s(304)])||void 0===u||null===(p=u[s(297)])||void 0===p?void 0:p.stbl;if(!t)return;const i=null===(f=n[s(304)][s(365)])||void 0===f?void 0:f[s(299)],{stts:r,stsc:a,stsz:c,stco:l}=t;if(!(i&&r&&a&&c&&l))return;h=Uk(e,i,r,a,c,l,null,null,o)}return{videoSegments:a,audioSegments:h}}function Uk(t,e,s,i,r,n,o,a,h){const c=Mk;var l;const d=[],u=[],p=[],f=i[c(334)],m=n[c(334)],g=r[c(372)],A=null==o?void 0:o[c(334)],y=null==a?void 0:a.entries;let b,v;y&&(b=[],y[c(312)]((t=>{const e=c;let{count:s,offset:i}=t;for(let t=0;t{v[t-1]=!0})));let S,w,E=0,I=0,T=0,k=0,_=0,C=null===(l=f[0])||void 0===l?void 0:l.samplesPerChunk,R=f[1]?f[1][c(314)]-1:1/0,D=0,L=-1;s.entries[c(312)]((t=>{const e=c;let{count:s,delta:i}=t;w=i;for(let t=0;t=R&&(k++,R=f[k+1]?f[k+1].firstChunk-1:1/0),C+=f[k][e(366)])}));const x=d[c(347)];if(!x||o&&!d[0][c(360)])return[];const P=[];let B,M=[],F=0,O=0;const U=t=>{const s=c;var i;B=M[M[s(347)]-1],P[s(329)]({index:P.length,startTime:(null===(i=P[P[s(347)]-1])||void 0===i?void 0:i[s(333)])||M[0][s(327)]/e,endTime:(B[s(327)]+B[s(349)])/e,duration:t,range:[M[0].offset,B[s(342)]+B.size],frames:M}),F=0,M=[]};if(o){const s=t*e;for(let t=0,i=u[c(347)];ts)&&U(F/e):U(F/e)}else{let s=(h=h||[])[0]||t;for(let i=0;i=x||r+O>=s)&&(O+=r-s,U(r),s=h[P[c(347)]]||t)}}return P}function Nk(t,e){const s=Mk;let i="",r="",n=0,o=0,a=0,h=0,c=0,l=0,d=0;t[s(331)]&&(c=t[s(331)].duration/t[s(331)][s(299)]);const u=t[s(313)];if(u){const R=u[s(345)]((t=>{const e=s;var i,r;return(null===(i=t[e(304)])||void 0===i||null===(r=i[e(307)])||void 0===r?void 0:r.handlerType)===e(355)})),D=u[s(345)]((t=>{const e=s;var i,r;return(null===(i=t[e(304)])||void 0===i||null===(r=i[e(307)])||void 0===r?void 0:r.handlerType)===e(324)}));let L,x=null;var p,f,m,g,A,y,b,v,S,w,E,I,T,k,_,C;if(R)if(x=null===(p=R[s(304)])||void 0===p||null===(f=p[s(297)])||void 0===f||null===(m=f.stbl)||void 0===m?void 0:m[s(363)][s(334)][0],x)if(n=x[s(357)],o=x.height,l=null===(g=R[s(304)])||void 0===g||null===(A=g[s(365)])||void 0===A?void 0:A[s(299)],i=null===(y=x[s(300)]||x[s(330)]||x[s(352)])||void 0===y?void 0:y[s(298)],"encv"===x.type)L=null===(b=x[s(317)])||void 0===b||null===(v=b.schi)||void 0===v?void 0:v[s(344)][s(308)];if(D)if(x=null===(S=D[s(304)])||void 0===S||null===(w=S[s(297)])||void 0===w||null===(E=w.stbl)||void 0===E?void 0:E[s(363)][s(334)][0],x)if(a=x[s(353)],h=x[s(340)],r=null===(I=x[s(325)])||void 0===I?void 0:I[s(298)],d=null===(T=D.mdia)||void 0===T||null===(k=T[s(365)])||void 0===k?void 0:k.timescale,"enca"===x[s(315)])L=L||(null===(_=x.sinf)||void 0===_||null===(C=_.schi)||void 0===C?void 0:C.tenc[s(308)]);return{kid:L?L.join(""):null,videoCodec:i,audioCodec:r,width:n,height:o,videoTimescale:l,audioChannelCount:a,audioSampleRate:h,duration:c,audioTimescale:d,moov:t,isFragmentMP4:e}}}function jk(t){return"number"==typeof t&&!Number[Mk(335)](t)}function Vk(){const t=Mk;for(var e=arguments[t(347)],s=new Array(e),i=0;ie+s[t(295)]),0));let n=0;return s[t(312)]((e=>{const s=t;r[s(368)](e,n),n+=e[s(295)]})),r}!function(t,e){const s=Mk,i=t();for(;;)try{if(634045===parseInt(s(346))/1*(-parseInt(s(358))/2)+parseInt(s(320))/3+-parseInt(s(351))/4+-parseInt(s(323))/5+-parseInt(s(359))/6*(parseInt(s(302))/7)+parseInt(s(338))/8+-parseInt(s(341))/9*(-parseInt(s(361))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Bk);var zk=Wk;function Gk(){var t=["_data","5sOdfGP","548340RUKhhf","30knUFQy","63266BLSngm","set","create","1431WRKPOL","100738oeoaJp","824098wNJyPN","741360ULFFbm","775132lyAiJH","10iipSAO","752kEflGu"];return(Gk=function(){return t})()}function Wk(t,e){var s=Gk();return(Wk=function(t,e){return s[t-=184]})(t,e)}!function(t,e){for(var s=Wk,i=t();;)try{if(240188===parseInt(s(195))/1*(parseInt(s(188))/2)+parseInt(s(190))/3+-parseInt(s(191))/4+-parseInt(s(196))/5+-parseInt(s(197))/6*(parseInt(s(184))/7)+parseInt(s(193))/8*(parseInt(s(187))/9)+parseInt(s(192))/10*(parseInt(s(189))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Gk);class Hk{constructor(){$f(this,Wk(194),Object.create(null))}[zk(185)](t,e){this[zk(194)][t]=e}get(t){return this[zk(194)][t]}clear(){var t=zk;this._data=Object[t(186)](null)}}const Kk=Yk;function Qk(){const t=["updateDuration","min","loadMetaProcess","_currentLoadingSegmentIndex","transformError","cannot find moov or mdat box","isSegmentLoading","destroy","changeUrl","size","type","_transformError","MP4Loader","range","3133476Muspol","loadMeta","_config",",dataLen,","cannot parse segments","player","message","endTime","moov",", state,","slice","meta","539058oxgmel","video","_bufferService","real_time_speed","_error","moovEnd","arraybuffer","3870pmbzUX","mp4","781404EbFMql","[loadMetaProcess start], range,","24pEeCAm","reset","sidx","_loadSegment","debugLog","_getCacheKey","_loader","find","7kgdnCE","loadNextSegment","findBox","moof","mdat","init","preload","getSegmentByTime","1978458dDwqnQ","length",",err,","vid","start","url","_currentSegmentIndex","byteLength","loadData","data","[MP4loader reset func call loader.cancel]","push","cancel","[loadMetaProcess] moov ok","file","16SfgIBJ","42715uabqGL","69773ffuamu","cannot parse moov box","index","isMetaLoaded","buffer","loadCacheMeta","audio","videoSegments","TAG_NAME","isLastSegment","clear","audioSegments","startTime","maxDownloadInfoSize","cache","loadSegmentByTime","max","1784136IxGxJs","downloadInfo"];return(Qk=function(){return t})()}function Yk(t,e){const s=Qk();return(Yk=function(t,e){return s[t-=374]})(t,e)}!function(t,e){const s=Yk,i=t();for(;;)try{if(552041===parseInt(s(460))/1+-parseInt(s(389))/2+-parseInt(s(423))/3+-parseInt(s(404))/4*(-parseInt(s(405))/5)+-parseInt(s(451))/6*(parseInt(s(381))/7)+parseInt(s(462))/8*(-parseInt(s(439))/9)+parseInt(s(458))/10*(parseInt(s(406))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Qk);class qk{constructor(t,e){const s=Yk;this[s(435)]=s(403),this[s(445)]=t,this.data=e}}class Jk extends Bi{constructor(t,e){const s=Yk;let i=arguments[s(390)]>2&&void 0!==arguments[2]?arguments[2]:{};var r;super(),$f(this,"_transformError",(t=>t)),this[s(414)]=s(437),this[s(441)]=(r=i,{vid:"",moovEnd:8e4,segmentDuration:2,maxDownloadInfoSize:30,responseType:Yk(457),cache:null,...r});const{vid:n,cache:o,...a}=this[s(441)];this.mp4=t,this[s(444)]=e,this[s(392)]=n||a.url,this[s(394)]=a[s(394)],a[s(429)]=this[s(436)],this[s(450)]={},this[s(424)]=[],this[s(413)]=[],this[s(417)]=[],this[s(420)]=new Hk,this._currentSegmentIndex=-1,this[s(428)]=-1,this[s(410)]=null,this._error=null,this._loader=new rI(a,e),this[s(379)].on(s(454),(t=>{})),this[s(444)][s(377)](this[s(414)],s(386))}async destroy(){const t=Yk;await this[t(374)](),this[t(420)][t(416)](),this[t(444)][t(377)](this[t(414)],t(432))}get[Kk(409)](){const t=Kk;return this.videoSegments[t(390)]||this.audioSegments.length}setCurrentSegment(t){const e=Kk;jk(t)&&(this[e(395)]=t)}[Kk(415)](t){const e=Kk;if(jk(t)){var s,i;return t>=((null===(s=this[e(413)][this[e(413)][e(390)]-1])||void 0===s?void 0:s[e(408)])||(null===(i=this[e(417)][this.audioSegments[e(390)]-1])||void 0===i?void 0:i[e(408)])||0)}return!1}[Kk(431)](t){return t===this._currentLoadingSegmentIndex}async[Kk(433)](t){const e=Kk;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=arguments[e(390)]>2?arguments[2]:void 0,r=arguments[e(390)]>3?arguments[3]:void 0;await this[e(374)](r),t&&(this[e(394)]=t),s&&(this[e(392)]=s),i&&(this[e(441)][e(456)]=i)}async getOrLoadMeta(t){const e=Kk;return!this[e(409)]&&await this[e(440)](t),this.meta}async loadMetaProcess(t,e,s,i){const r=Kk;let[n,o]=e;this[r(455)]=!1,this[r(444)].debugLog(this[r(414)],r(461),[n,o]);await this[r(397)]([n,o||this._config.moovEnd],t,{onProgress:async(e,a,h)=>{const c=r;if(this[c(450)]&&null!=h&&h.range&&h[c(438)][c(390)]>0&&h.range[1]>=o&&(a=!0,this[c(444)][c(377)](this.TAG_NAME,"[loadMetaProcess],data done,setstate true,[",n,o,"]")),a&&null!=h&&h.range&&h[c(438)][c(390)]>0&&h[c(438)][1]0&&s(e,a,h),!this[c(450)].moov&&!this[c(455)]&&e&&e[c(396)]>0){this[c(410)]=Vk(this[c(410)],e);let r=GT[c(383)](this[c(410)],[c(447)])[0];if(!r){const e=GT[c(383)](this[c(410)],[c(385)])[0];if(a){if(!e)return this[c(455)]=!0,void s(null,a,h,{err:c(430)});{const s=e[c(393)]+e[c(434)],n=await this[c(397)]([s,""],t,i);n&&(r=GT[c(383)](n[c(398)],[c(447)])[0])}}}if(r&&a&&r[c(434)]>r[c(398)][c(390)]&&(this.player[c(377)](this.TAG_NAME,"[loadMetaProcess],moov not all, range,",h.range[1],c(442),this[c(410)][c(396)],c(448),a),await this[c(427)](t,[h[c(438)][1],r[c(393)]+r[c(434)]-1],s)),r&&r.size<=r[c(398)][c(390)]&&!this[c(450)][c(447)]){const e=GT[c(447)](r);if(!e)return this[c(455)]=!0,void s(null,a,h,{err:c(407)});let n=Ok(e,this[c(441)].segmentDuration);const o=async e=>{const s=c,r=GT[s(383)](this[s(410)],[e])[0];if(r){if(!(r[s(434)]>r.data.length))return r;{const n=await this[s(397)]([r.start,r[s(393)]+r[s(434)]-1],t,i);if(n)return GT[s(383)](n.data,[e])[0]}}};let l=!1;if(!(n&&n[c(413)][c(390)]&&n.audioSegments.length)){const t=await o("sidx");if(t){const s=GT[c(375)](t);s&&(n=Fk(e,s),l=!0)}}if(!n)return this[c(455)]=!0,void s(null,a,h,{err:c(443)});this[c(450)]=Nk(e,l);const{videoSegments:d,audioSegments:u}=n;this[c(413)]=d,this.audioSegments=u,this[c(444)].debugLog(this[c(414)],c(402)),s(void 0,a,{meta:{meta:this.meta,videoSegments:d,audioSegments:u}})}}},...i})}async[Kk(440)](t,e,s){const i=Kk,r=[];this.player[i(377)](this[i(414)],"[loadMeta start]");let n=await this[i(397)]([0,e||this._config[i(456)]],t,s);if(!n)return;r[i(400)](n);let o=GT[i(383)](n.data,[i(447)])[0];if(!o){const e=GT.findBox(n[i(398)],[i(385)])[0];if(!e)throw new qk(i(430),n[i(398)]);const a=e.start+e[i(434)];if(n=await this[i(397)]([a],t,s),!n)return;if(r[i(400)](n),o=GT[i(383)](n[i(398)],[i(447)],a)[0],!o)throw new qk("cannot find moov box",n[i(398)])}if(o[i(434)]>o[i(398)][i(390)]){if(n=await this.loadData([n[i(398)][i(390)],o[i(393)]+o[i(434)]-1],t,s),!n)return;r[i(400)](n),o[i(398)]=Vk(o[i(398)],n[i(398)])}const a=GT[i(447)](o);if(!a)throw new qk(i(407),o[i(398)]);let h,c=Ok(a,this._config.segmentDuration);if(!c)throw new qk(i(443),o.data);if(!c[i(413)].length||!c[i(417)].length){const t=GT[i(383)](this[i(410)],[i(384)])[0],e=GT.findBox(this[i(410)],[i(375)])[0];if(t&&t[i(434)]<=t[i(398)][i(390)]&&e){const s=GT.moof(t);h=GT[i(375)](e),s&&h&&(c=Fk(a,h))}}this[i(450)]=Nk(a,h);const{videoSegments:l,audioSegments:d}=c;return this[i(413)]=l,this[i(417)]=d,this[i(444)][i(377)](this[i(414)],"[load moov end!!!!!]",this[i(450)],l,d),this[i(450)]&&this[i(459)][i(453)][i(425)](this[i(450)].duration),{meta:this.meta,videoSegments:l,audioSegments:d,responses:r}}[Kk(411)](t,e){const s=Kk,{moov:i}=t,r=Ok(i,this[s(441)].segmentDuration),{videoSegments:n,audioSegments:o}=r;this[s(413)]=n,this[s(417)]=o,this[s(395)]=e,this[s(450)]=t}[Kk(388)](t){const e=Kk;let s,i;return this[e(413)][e(390)]?(s=this.videoSegments[e(380)]((s=>s[e(418)]<=t&&s[e(446)]>t)),s&&(i=this[e(417)][s[e(408)]])):i=this.audioSegments[e(380)]((s=>s.startTime<=t&&s[e(446)]>t)),{video:s,audio:i}}async[Kk(421)](t,e){const s=Kk;let i=!(arguments[s(390)]>2&&void 0!==arguments[2])||arguments[2],r=arguments[s(390)]>3&&void 0!==arguments[3]?arguments[3]:{};!this.isMetaLoaded&&await this[s(440)](e);const{video:n,audio:o}=this.getSegmentByTime(t);return this[s(376)](n,o,e,i,r)}async[Kk(382)](t){const e=Kk;let s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments[e(390)]>2&&void 0!==arguments[2]?arguments[2]:{};!this[e(409)]&&await this[e(440)]();const r=this[e(413)][this[e(395)]+1],n=this[e(417)][this[e(395)]+1];return this[e(376)](r,n,t,s,i)}async[Kk(387)](t){const e=Kk;if(!this[e(409)]&&await this[e(440)](!0),!t||t<0)return;const{video:s,audio:i}=this[e(388)](t),r=Math.max((null==s?void 0:s[e(408)])||0,(null==i?void 0:i.index)||0);if(!r)return;const n=this[e(413)][e(449)](0,r),o=this[e(417)].slice(0,r),a=async t=>{const s=e;t>r||(await this[s(376)](n[t],o[t],!0,!1),await a(t+1))};await a(0)}[Kk(401)](){const t=Kk;return this[t(379)][t(401)]()}async[Kk(374)](){const t=Kk;!(arguments[t(390)]>0&&void 0!==arguments[0]&&arguments[0])&&(this[t(444)].debugLog(this[t(414)],t(399)),await this[t(379)][t(401)]()),this[t(392)]=this[t(394)]="",this[t(450)]={},this.downloadInfo=[],this[t(413)]=[],this.audioSegments=[],this._currentSegmentIndex=-1,this[t(428)]=-1}async destroy(){const t=Kk;await this[t(374)](),this[t(420)][t(416)]()}async[Kk(376)](t,e,s,i,r){const n=Kk;if(!t&&!e)return;const o=(null==t?void 0:t.index)||(null==e?void 0:e.index)||0;let a;this[n(428)]=o;try{a=await this[n(397)]([Math[n(426)]((null==t?void 0:t[n(438)][0])||1/0,(null==e?void 0:e[n(438)][0])||1/0),Math[n(422)]((null==t?void 0:t[n(438)][1])||0,(null==e?void 0:e[n(438)][1])||0)],s,r)}finally{this[n(428)]=-1}return a?(i&&(this[n(395)]=o),a[n(452)]=t,a[n(412)]=e,a):void 0}async[Kk(397)](t,e,s){const i=Kk,r=this[i(378)](t),n=await this[i(420)].get(r);let o;if(n)o={data:n,state:!0,options:{fromCache:!0,range:t,vid:this.vid}};else{const e=s&&s[i(394)]?s[i(394)]:this[i(394)];o=await this[i(379)].load(e,{range:t,vid:this.vid,...s})}if(o)return!n&&(o[i(398)]&&this[i(424)][i(400)]({startTime:o.startTime,endTime:o[i(446)],size:o[i(398)][i(396)],range:t}),this[i(424)]&&this[i(424)][i(390)]>this._config.maxDownloadInfoSize&&(this.downloadInfo=this[i(424)][i(449)](-this[i(441)][i(419)]))),o}[Kk(378)](t){return(this[Kk(392)]||this.url)+":"+t}}const Xk=Zk;function Zk(t,e){const s=$k();return(Zk=function(t,e){return s[t-=373]})(t,e)}function $k(){const t=["initAudioTrack","setSeekingTime","demux","isIFrame","size","addAudioTagHeader","audio","1203087giyQGd","endPts","geVodLoadedTime","postMessage","sps","_prevPlayVodTimeCache","9220976tQhGMR","workerClearTimeout","decodeAudio","data","isInitVideo","getBuferredDuration","buffer","sampleOffset","cleanSampleList","end","concat","isAudioAac","debugUuid","updateStats","1989594AwAbeJ","vps","forEach","byteLength","getSampleAudioListLength","buferredDuration","codecType","initVideoTrack","useEME","decoderData","samples","_basefps","977095ZRAXby","AAC","TAG_NAME","8387QAtULb","metadataTrack","URL","cannot parse samples from moov box","loopWorker","audioSenc","emit","_lastRemainBufferStartPos","new Uint8Array error:,","set","errorMessage","videoListLength","G711PCMU","getSampleRange","moovToSamples","MP4VodDemux","isUseMSE","cmd","_postMessageToLoopWorker","clearBuffer","audioTrack","channelCount","pps","2408300NmclEF","_videoSamples","videoSenc","videoTrack","mp4","isHevc","loop worker is not init, can not post message","isAudioG711a","_calcDecodeFps","cryptoPayload","_initLoopWorker","slice","_sendAccADTSHeader","startPts","getSampleVideoListLength","10699213BzqGSN","player","isAudioG711u","audioSamples","decodeVideo","_doDecodeByMp4","checkInitAudio","gopId","length","isPlayVodNotUseMSE","isPlayVod","max","init","G711PCMA","cleanSampleListAndSetSeekTime","tempSampleListInfo","_audioSamples","resume","listen playVodRateChange","kidValue","parseSamples","isInitAudio","onmessage","subarray","pause","revokeObjectURL","codec","playVodTimeCache","timescale","duration","videoSamples","warn","reset","objectType","getSampleListLength","baseMediaDecodeTime","keyframe","_hasCalcFps","payload","_lastRemainBuffer","destroy","_isUseWorker","_doDecodeAudio","audioListLength","correctSamplePts","push","video","cryptoPayloadAudio","206DBEWsh","getPlayVodDuration","debugLog","_opt","seekSampleRange","initMetadataTrack","workerUrl","pts","checkInitVideo","dts","debug","_doDecodeVideo","type","offset","cannot found video frame #","sampleListInfo"];return($k=function(){return t})()}!function(t,e){const s=Zk,i=t();for(;;)try{if(902472===parseInt(s(387))/1*(parseInt(s(473))/2)+parseInt(s(496))/3+-parseInt(s(410))/4+parseInt(s(384))/5+-parseInt(s(516))/6+parseInt(s(425))/7+-parseInt(s(502))/8)break;i.push(i.shift())}catch(t){i.push(i.shift())}}($k);class t_ extends Dp{constructor(t){const e=Zk;super(t),this[e(426)]=t,this[e(386)]=e(402),this[e(411)]=[],this[e(441)]=[],this[e(464)]=[],this[e(394)]=0,this[e(413)]=t_.initVideoTrack(),this[e(407)]=t_[e(489)](),this[e(388)]=t_[e(478)](),this[e(506)]=!1,this[e(446)]=!1,this[e(415)]=!1,this[e(440)]={},this[e(462)]=!1,this[e(383)]=25,this._prevPlayVodTimeCache=0,this[e(466)]()&&this._initLoopWorker(),this[e(426)][e(435)]()&&this._isUseWorker()&&this[e(426)].on(M.playVodRateChange,(t=>{const s=e;this[s(426)][s(475)](this.TAG_NAME,s(443),t),this[s(405)]("updatePlayRate",{rate:t})}))}destroy(){const t=Zk;super[t(465)](),this[t(479)]&&(URL.revokeObjectURL(this[t(479)]),this[t(479)]=null),this[t(503)]&&(clearTimeout(this[t(503)]),this[t(503)]=null),this[t(391)]&&(this.loopWorker[t(499)]({cmd:"destroy"}),this[t(391)].terminate(),this[t(391)]=null),this._videoSamples=[],this[t(441)]=[],this[t(464)]=[],this[t(394)]=0,this[t(501)]=0,this[t(413)]=null,this.audioTrack=null,this[t(388)]=null,this[t(440)]={},this[t(383)]=25}static[Xk(379)](){return{id:1,samples:[],sps:[],pps:[],vps:[],codec:""}}static initAudioTrack(){return{id:2,samples:[],sampleRate:0,channelCount:0,codec:"",codecType:""}}static[Xk(478)](){return{flvScriptSamples:[],seiSamples:[]}}[Xk(445)](t){const e=Xk;if(!t)throw new Error("moov is required");if(!this[e(413)][e(451)]&&!this[e(407)][e(451)]&&(GT.moovToTrack(t,this[e(413)],this[e(407)]),this.videoSenc=this.videoTrack.videoSenc,this.audioSenc=this[e(407)][e(392)],this[e(431)]()&&this[e(513)]()&&this[e(422)](this.audioTrack),this[e(481)]())){let t=null;this[e(413)].codecType===lt.h265?this[e(413)][e(500)].length&&this[e(413)][e(373)][e(433)]&&this[e(413)][e(409)][e(433)]&&(t=Ph({sps:this[e(413)][e(500)][0],pps:this.videoTrack.pps[0],vps:this[e(413)][e(373)][0]})):this[e(413)][e(500)][e(433)]&&this[e(413)].pps[e(433)]&&(t=nh({sps:this[e(413)][e(500)][0],pps:this.videoTrack[e(409)][0]})),t&&this[e(430)](t,D.video,0,!0,0)}if(!this._audioSamples[e(433)]&&!this[e(411)][e(433)]){const s=GT[e(401)](t);if(!s)throw new Error(e(390));this._videoSamples=s[e(455)]||[],this[e(441)]=s[e(428)]||[]}}[Xk(491)](t,e,s,i,r){const n=Xk;this[n(431)](),this[n(481)](),this[n(445)](r);const o=this[n(413)],a=this[n(407)];let h,c,l;if(o[n(382)]=[],a.samples=[],s){let i;for(let r=s[0],a=s[1];r<=a;r++){if(h=this[n(411)][r],!h)throw new Error(n(487)+r);l=h.offset-e,c=t[n(448)](l,l+h.size),i={type:D[n(471)],dts:1e3*h[n(482)]/o[n(453)],pts:1e3*(h.pts||h[n(482)])/o[n(453)],units:[],payload:null,isIFrame:!1},i[n(454)]=h[n(454)],i[n(432)]=h[n(432)],h.keyframe&&(i[n(492)]=!0),i.payload=c,o[n(382)].push(i)}o[n(460)]=o.samples[0][n(482)]}if(i){for(let s=i[0],r=i[1];s<=r;s++){if(h=this[n(441)][s],!h)throw new Error(n(487)+s);l=h[n(486)]-e,c=t[n(448)](l,l+h[n(493)]);const i=1e3*h[n(482)]/a[n(453)],r=this.addAudioTagHeader(c);a.samples[n(470)]({type:D[n(495)],dts:i,pts:i,payload:r,duration:h[n(454)],size:r[n(375)]})}a[n(460)]=a[n(382)][0][n(482)]}this[n(469)](o),this.correctSamplePts(a);const d=o[n(382)][n(512)](a.samples);d.sort(((t,e)=>{const s=n;return t[s(482)]-e[s(482)]})),d[n(374)]((t=>{const e=n,s=new Uint8Array(t[e(463)]);delete t[e(463)],this._isUseWorker()?this.loopWorker[e(499)]({...t,payload:s,cmd:"sample"},[s[e(508)]]):t[e(485)]===D[e(471)]?this[e(484)]({...t,payload:s}):t[e(485)]===D[e(495)]&&this._doDecodeAudio({...t,payload:s})})),ci(this[n(462)])&&this[n(466)]()&&(this[n(462)]=this[n(418)](d))}demuxPart(t,e,s,i,r,n,o,a){const h=Xk;if(this[h(431)](),this.checkInitVideo(),this[h(445)](r),this[h(413)][h(380)]=n,this.audioTrack[h(380)]=n,this[h(464)]&&this._lastRemainBuffer[h(375)]>0&&e>this[h(394)]&&e<=this._lastRemainBufferStartPos+this[h(464)][h(375)]){let s=0;for(;s<20;)try{const s=this._lastRemainBuffer[h(448)](0,e-this._lastRemainBufferStartPos),i=new Uint8Array(t[h(375)]+s[h(375)]);i[h(396)](s,0),i[h(396)](new Uint8Array(t),s[h(375)]),t=i,e-=s.byteLength,this._lastRemainBuffer=null,this[h(394)]=0;break}catch(t){if(!(s<20))throw new Error(h(395)+t[h(397)]);s++}}const c=this[h(413)],l=this[h(407)];c[h(382)]=[],l[h(382)]=[],c[h(412)]=null,l[h(392)]=null;let d,u,p,f=0,m=0;if(this[h(411)][h(433)]>0&&s.length>0){let i;const r=t[h(375)]+e;for(let n=s[0];n<=s[1];n++){if(d=this._videoSamples[n],!d)throw new Error(h(487)+n);d.offset>=e&&d[h(486)]+d[h(493)]<=r&&(p=d[h(486)]-e,f=p+d[h(493)],u=t[h(448)](p,f),i={type:D.video,dts:d[h(482)],pts:d[h(480)]||d.dts,units:[],payload:null,isIFrame:!1},i[h(454)]=d[h(454)],i[h(432)]=d[h(432)],i[h(509)]=d.index,d[h(461)]&&(i[h(492)]=!0),i[h(463)]=u,i.size=d.size,c[h(382)][h(470)](i))}c.samples[h(433)]>0&&(c[h(432)]=c[h(382)][0][h(432)],c[h(460)]=c[h(382)][0].dts,c[h(423)]=c[h(382)][0][h(480)]/c[h(453)],c.endPts=c[h(382)][c[h(382)][h(433)]-1].pts/c[h(453)],this.videoSenc&&(c[h(412)]=this[h(412)][h(421)](c[h(382)][0][h(509)],c[h(382)][0][h(509)]+c[h(382)].length),c[h(444)]=o))}if(this[h(441)][h(433)]>0&&i[h(433)]>0){for(let s=i[0];s<=i[1];s++){if(d=this[h(441)][s],!d)throw new Error("cannot found video frame #"+s);if(d[h(486)]>=e&&d[h(486)]+d[h(493)]<=t.byteLength+e){p=d[h(486)]-e,m=p+d[h(493)],u=t[h(448)](p,m);const s=this[h(494)](u);l[h(382)][h(470)]({type:D[h(495)],dts:d[h(482)],pts:d[h(482)],payload:s,duration:d[h(454)],sampleOffset:d.index,size:s[h(375)]})}}l.samples[h(433)]>0&&(l[h(432)]=l[h(382)][0][h(432)]||c[h(432)],l[h(460)]=l[h(382)][0].dts,l[h(423)]=l[h(382)][0][h(480)]/l[h(453)],l[h(497)]=l[h(382)][l[h(382)][h(433)]-1][h(480)]/l[h(453)],this[h(392)]&&(l.audioSenc=this[h(392)].slice(l[h(382)][0][h(509)],l[h(382)][0].sampleOffset+l[h(382)][h(433)]),l[h(444)]=o))}this[h(381)](c,l,a),this[h(464)]=t.subarray(Math[h(436)](f,m)),this[h(464)][h(375)]>0?this[h(394)]=e+t[h(375)]-this[h(464)].byteLength:this._lastRemainBufferStartPos=0}[Xk(457)](){const t=Xk;this[t(411)]=[],this[t(441)]=[],this._lastRemainBuffer=null,this._lastRemainBufferStartPos=0,this.videoTrack=t_.initVideoTrack(),this[t(407)]=t_.initAudioTrack(),this.metadataTrack=t_[t(478)]()}[Xk(381)](t,e,s){}checkInitAudio(){const t=Xk;return this[t(446)]=!!(this[t(407)].sampleRate&&this[t(407)].channelCount&&this[t(407)].codec),this[t(446)]}[Xk(513)](){const t=Xk;return this[t(407)].codecType===PT[t(385)]}isAudioG711a(){const t=Xk;return this[t(407)][t(378)]===PT[t(438)]}isAudioG711u(){const t=Xk;return this[t(407)][t(378)]===PT[t(399)]}[Xk(481)](){const t=Xk;return this[t(506)]=!!(this[t(413)][t(409)][t(433)]&&this[t(413)][t(500)][t(433)]&&this[t(413)][t(451)]),this[t(506)]}[Xk(422)](t){const e=Xk,s=ue({profile:t[e(458)],sampleRate:t.sampleRateIndex,channel:t[e(408)]});this[e(430)](s,D[e(495)],0,!0,0)}[Xk(420)](){const t=Xk,e=Ys(mT);let s=new Worker(e);this[t(479)]=e,this[t(503)]=setTimeout((()=>{const e=t;window[e(389)][e(450)](this[e(479)]),this.workerUrl=null,this[e(503)]=null}),T),s[t(499)]({cmd:t(437),options:{type:t(414),seekingMaxDiff:1e4,debug:this[t(426)][t(476)][t(483)],debugUuid:this[t(426)]._opt[t(514)],debugLevel:this[t(426)]._opt.debugLevel}}),s[t(447)]=e=>{const s=t,i=e[s(505)];switch(i[s(404)]){case s(429):this[s(484)](i);break;case s(504):this[s(467)](i);break;case s(488):if(this[s(440)]=i,this.player[s(434)]()){const t=this[s(498)](),e=this.player[s(474)]();if(t&&e){let i=t/(1e3*e);i!==this._prevPlayVodTimeCache&&this.player[s(393)](M[s(452)],i),this[s(501)]=i}}}},this[t(391)]=s}[Xk(405)](t,e){const s=Xk;this[s(426)][s(403)]()||(this[s(391)]?this[s(391)].postMessage({cmd:t,...e}):this.player[s(483)][s(456)](this.TAG_NAME,s(416)))}[Xk(467)](t){const e=Xk,s=new Uint8Array(t[e(463)]),i=this[e(472)](s);this._doDecodeByMp4(i,D.audio,t[e(482)],!1,0)}[Xk(484)](t){const e=Xk,s=new Uint8Array(t[e(463)]);let i=null;i=t[e(415)]?Bh(s,t[e(492)]):oh(s,t[e(492)]),this[e(426)][e(515)]({dts:t.dts});const r=t[e(480)]-t[e(482)];i=this[e(419)](i,t.isIFrame),this[e(430)](i,D[e(471)],t.dts,t[e(492)],r)}[Xk(507)](){const t=Xk;return this[t(440)][t(377)]||0}[Xk(459)](){return this[Xk(440)].allListLength||0}[Xk(376)](){const t=Xk;return this.tempSampleListInfo[t(468)]||0}[Xk(424)](){const t=Xk;return this.tempSampleListInfo[t(398)]||0}[Xk(400)](){const t=Xk;return{start:this.tempSampleListInfo.start||0,end:this[t(440)].end||0}}seekSampleRange(t){const e=Xk;this._postMessageToLoopWorker(e(477),{time:t})}[Xk(439)](t){const e=Xk;ci(this[e(426)].isUseMSE())&&(this[e(406)](!0),this._postMessageToLoopWorker(e(510)),this[e(405)](e(490),{time:t}))}[Xk(449)](){const t=Xk;this[t(405)](t(449))}[Xk(442)](){const t=Xk;this[t(405)](t(442))}[Xk(498)](){const t=Xk;let e=0;return e=this.getSampleRange()[t(511)],e}[Xk(494)](t){const e=Xk;let s=[];this[e(513)]()?s=[175,1]:this[e(417)]()?s=[114]:this[e(427)]()&&(s=[130]);const i=new Uint8Array(t[e(433)]+s.length);return i.set(s,0),i.set(t,s.length),i}}function e_(){const t=["player","index","media","demuxerPause","_mseOpened","evictBuffer() clearBuffer(","updateMediaSourceDuration","isStateOpen","updateDuration","2GGxgUY","3128536RMkMjQ","evictBuffer() start ","9751KeDgIs","72155MrzTFt","mseDecoder","debugLog","_sourceCreated","seekSampleRange","isInitAudio","1028EkGuss","cleanSampleListAndSetSeekTime","isPlayVod","playVod","updateDuration()","TAG_NAME","demuxerResume","currentTime","_needInitSegment","10963390VBFliY","429520NgOlga","clearSourceBuffer","509958hnjusB","evictBuffer","appendBuffer","mp4","length","pause","isInitVideo","246uHZesU","1782QeLvel","_mse","isPlayVodUseMSE"," + 1 >= removeEnd ","reset","evictBuffer() removeEnd ","destroy","endOfStream","_demuxer"];return(e_=function(){return t})()}function s_(t,e){const s=e_();return(s_=function(t,e){return s[t-=102]})(t,e)}const i_=s_;!function(t,e){const s=s_,i=t();for(;;)try{if(242214===parseInt(s(123))/1*(parseInt(s(119))/2)+parseInt(s(148))/3*(parseInt(s(129))/4)+-parseInt(s(139))/5+parseInt(s(149))/6*(-parseInt(s(122))/7)+-parseInt(s(120))/8+-parseInt(s(141))/9+parseInt(s(138))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(e_);class r_{constructor(t,e){const s=s_;this.TAG_NAME="MP4BufferService",this[s(144)]=t,this[s(110)]=e,this[s(109)]=new t_(e),this[s(102)]=null,this.player[s(103)]()&&(this[s(102)]=this.player[s(124)]),this[s(137)]=!0,this[s(126)]=!1}async[i_(107)](){const t=i_;this._mse=null,this[t(109)]&&(this[t(109)][t(107)](),this[t(109)]=null)}updateMSE(){const t=i_;this[t(110)].isPlayVodUseMSE()&&!this[t(102)]&&(this._mse=this[t(110)][t(124)])}async[i_(143)](t,e,s,i,r){const n=i_;if(!t||!t.length)return;if(!this[n(109)])return;let o,a;s&&(o=[s[0][n(111)],s[s[n(145)]-1][n(111)]]),i&&(a=[i[0].index,i[i[n(145)]-1][n(111)]]),(o||a)&&this[n(109)].demux(t,e,o,a,r)}async[i_(142)](t){const e=i_,s=this.mp4[e(112)];if(!this._mse||!this[e(109)]||!s||!t||t<0)return;const i=s[e(136)]-t;if(i<=0)return void this[e(110)][e(125)](this[e(134)],e(106)+i+" <= 0 return");const r=tk(ek(s));if(r+1>=i)return void this[e(110)].debugLog(this[e(134)],e(121)+r+e(104)+i+" return");const n=this[e(109)];return(n[e(128)]||n[e(147)])&&(this[e(110)][e(125)](this[e(134)],e(115)+r+", "+i+")"),this[e(102)][e(140)](0,i)),!0}async[i_(105)](){const t=i_;this[t(102)]&&(this[t(114)]=!1),this[t(126)]=!1,this[t(137)]=!0}async[i_(108)](){this[i_(102)]}async updateDuration(t){const e=i_;this[e(110)][e(125)](this[e(134)],e(133),t),this[e(110)][e(131)]()&&(this[e(110)][e(132)][e(118)](t),this.player[e(103)]()&&this[e(110)][e(124)]&&this[e(110)][e(124)][e(117)]&&this[e(110)][e(124)][e(116)](t))}[i_(127)](t){const e=i_;this[e(109)][e(127)](t)}[i_(130)](t){this._demuxer.cleanSampleListAndSetSeekTime(t)}[i_(113)](){const t=i_;var e;null===(e=this[t(109)])||void 0===e||e[t(146)]()}[i_(135)](){var t;null===(t=this[i_(109)])||void 0===t||t.resume()}getSampleRange(){return this[i_(109)].getSampleRange()}}const n_=o_;function o_(t,e){const s=a_();return(o_=function(t,e){return s[t-=303]})(t,e)}function a_(){const t=["isLastSegment","isPlayVod","getAvgSpeed","changeUrl","_reset","log","_loadSegment() and _prevSegmentEndTime is ","end","_bandwidthService","6581323aTQzla","audio","_loader","getRenderCurrentPts","video","_stopTick","playVodPause","5273380zopSQy","43826838WrmabV","isPlayVodUseMSE","destroy"," is loading so return","getLatestSpeed","isSegmentLoading","playVodVideoSeekingByMse","_loadSegment"," more than ","debug","duration","112Suwagw","error","endTime","457AZUrOl","meta","_tick","onPlay","assign","demuxerResume","onPause","loadSource() ","_tickTimer","_bufferService"," and segment ","_end","685ehQtNv","speedInfo","init","appendBuffer","$videoElement","1986kJyGLw","retryDelay","preloadTime","loadNextSegment","tickInterval","onSeeking","_config","773316NSCmDD","Mp4","TAG_NAME","playVodSeek","moov","length"," and segment is null so return","playVod","_setPrevSegmentEndTime","options","reset","_emitOnLoaded","resetBandwidth","loadSegmentByTime","listen playVodSeek onSeeking() ","bufferBehind","cleanSampleListAndSetSeekTime","index","bind","onVideoSeeking","player","data","readyState","min","15FMMTWE","frames","1094124MXDVsN","onSeeking() ","media","_startTick","endOfStream","_loading","_prevSegmentEndTime","2794DOVLpw","retry","getSegmentByTime","onPause()","updateMSE","addRecord","demuxerPause"];return(a_=function(){return t})()}!function(t,e){const s=o_,i=t();for(;;)try{if(737636===-parseInt(s(321))/1*(-parseInt(s(378))/2)+parseInt(s(369))/3*(parseInt(s(371))/4)+-parseInt(s(333))/5*(-parseInt(s(338))/6)+parseInt(s(394))/7+parseInt(s(318))/8*(parseInt(s(345))/9)+parseInt(s(306))/10+-parseInt(s(307))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(a_);class h_ extends Bi{constructor(t){const e=o_;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var i;super(),$f(this,"onVideoSeeking",(async t=>{const e=o_;this[e(365)][e(316)][e(390)](this[e(347)],"listen playVodVideoSeekingByMse",t),await this[e(343)](t)})),$f(this,e(343),(async t=>{const s=e;this[s(365)][s(316)][s(390)](this[s(347)],s(359)+t);const i=this[s(396)],{video:r,audio:n}=i[s(380)](t),o=r||n;if(o)if(i[s(312)](o[s(362)]))this[s(365)][s(316)].log(this[s(347)],s(372)+t+s(331)+o[s(362)]+s(310));else{if(this[s(373)]){const e=this[s(373)],i=function(t){const e=sk;let s=arguments[e(470)]>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments[e(470)]>2&&void 0!==arguments[2]?arguments[2]:0;if(!t||!t[e(470)])return{start:0,end:0,buffers:[]};let r=0,n=0,o=0,a=0,h=0,c=0,l=0;const d=ik(t,i);for(let t=0,u=d[e(470)];t=e[0]&&se[1]&&(c=e[0],l=e[1])}}return{start:r,end:n,index:o,buffers:d,nextStart:a,nextEnd:h,prevStart:c,prevEnd:l,currentTime:s,behind:s-r,remaining:n?n-s:0,length:rk(d)}}(ek(e),t,.1);if(i[s(392)]&&(i[s(392)]>=o[s(320)]||i[s(392)]>=e[s(317)]))return void this[s(365)][s(316)][s(390)](this[s(347)],s(372)+t+" and end is "+i[s(392)]+s(331)+o.index+" is loading so return")}this._bufferService[s(361)](t),await i.cancel(),this[s(376)]=!1,this[s(353)](0),await this._loadSegment(t),this[s(374)]()}else this[s(365)].debug.log(this.TAG_NAME,s(372)+t+s(351))})),$f(this,e(323),(async()=>{const t=e;if(this[t(304)](),this[t(374)](this[t(344)][t(342)]),this.media){const e=this[t(373)];if(function(t){const e=sk;return t&&t[e(470)]?1===t[e(470)]&&t[e(462)](0)-t[e(471)](0)<1e-6?0:t[e(462)](t.length-1):0}(ek(e))<.1||!e[t(367)])return;bi(e)&&this[t(314)]()}else this[t(314)]()})),this[e(347)]=e(346),this.player=t,this[e(377)]=0,this[e(329)]=null,this[e(376)]=!1,this[e(344)]=(i=s,Object[o_(325)]({tickInterval:500,preloadTime:10,bufferBehind:10,segmentDuration:void 0,url:"",retry:3,retryDelay:100},i)),this[e(330)]=new r_(this,t),this[e(393)]=new XI,this[e(396)]=new Jk(this,this.player,{url:s.url,retry:s[e(379)],retryDelay:s[e(339)]}),this[e(373)]=null,this[e(365)][e(386)]()&&(this[e(365)].on(M[e(305)],(t=>{const s=e;t?this[s(327)]():this[s(324)]()})),this.player[e(308)]()?(this.media=this.player[e(303)][e(337)],this[e(365)].on(M[e(313)],this[e(364)][e(363)](this))):this.player.on(M[e(348)],this[e(343)].bind(this))),this[e(365)].debug[e(390)](this[e(347)],e(335))}async[n_(309)](){const t=n_;await this[t(389)](),await this[t(330)].destroy()}async[n_(389)](){const t=n_;this[t(304)](),await this[t(396)][t(355)](),await this._bufferService[t(355)](),this[t(377)]=0,this[t(376)]=!1,this[t(393)].reset()}async loadSource(t){const e=n_;this[e(365)][e(316)][e(390)](this.TAG_NAME,e(328)+t),this._bufferService[e(382)](),t&&await this[e(396)][e(388)](t),this[e(374)](this[e(344)].tickInterval),await this[e(314)](0)}async[n_(314)](t){const e=n_;var s,i,r,n;if(this[e(376)])return;let o=this[e(365)][e(397)]();o/=1e3,this[e(365)][e(308)]()&&(o=this[e(365)].getVideoCurrentTime());const a=this._config[e(340)]*this.player[e(352)].rate+o;if(this[e(377)]&&this[e(377)]>a)return void this[e(365)].debug[e(390)](this[e(347)],e(391)+this._prevSegmentEndTime+" and current time is "+o+e(315)+a+" and return");let h;this[e(376)]=!0;try{h=null!=t?await this._loader[e(358)](t):await this[e(396)][e(341)]()}catch(t){console[e(319)](t)}if(!h)return void(this[e(376)]=!1);this._emitOnLoaded(h);const c=Math[e(368)]((null===(s=h[e(303)])||void 0===s?void 0:s[e(320)])||1/0,(null===(i=h.audio)||void 0===i?void 0:i.endTime)||1/0);this._setPrevSegmentEndTime(c);try{var l,d;await this[e(330)][e(336)](h[e(366)],h[e(354)].range[0],null===(l=h[e(303)])||void 0===l?void 0:l.frames,null===(d=h[e(395)])||void 0===d?void 0:d[e(370)],this[e(396)][e(322)][e(349)]),await this[e(330)].evictBuffer(this._config[e(360)])}catch(t){console[e(319)](t)}finally{this._loading=!1}this[e(396)][e(385)]((null===(r=h[e(303)])||void 0===r?void 0:r[e(362)])||(null===(n=h.audio)||void 0===n?void 0:n[e(362)])||0)?this[e(332)]():this[e(314)]()}[n_(332)](){const t=n_;this[t(330)][t(375)](),this[t(304)]()}[n_(356)](t){const e=n_,{data:s,response:i,options:r}=t,{firstByteTime:n,startTime:o,endTime:a,contentLength:h}=r||{},c=a-o;this._bandwidthService[e(383)](h||s.byteLength,c)}[n_(357)](){const t=n_;this[t(393)][t(355)]()}[n_(353)](t){this[n_(377)]=t}[n_(374)](){const t=n_;let e=arguments[t(350)]>0&&void 0!==arguments[0]?arguments[0]:0;this[t(304)](),this._tickTimer=setTimeout(this[t(323)],e)}_stopTick(){clearTimeout(this[n_(329)])}[n_(327)](){const t=n_;this[t(365)].debug.log(this[t(347)],t(381)),this[t(330)][t(384)](),this[t(304)]()}async[n_(324)](){const t=n_;this.player[t(316)][t(390)](this.TAG_NAME,"onPlay()"),this[t(330)][t(326)](),await this[t(314)](),this[t(374)]()}[n_(334)](){const t=n_;return{speed:this[t(393)][t(311)](),avgSpeed:this[t(393)][t(387)]()}}}const c_=d_;function l_(){const t=["emit","speedInfo","Mp4Decoder","avgSpeed","canVideoPlay","debugLog","9hhOSrm","2oBgkyi","eventsDestroy","destroy","_startBandwidthEstimateInterval","video","_stopBandwidthEstimateInterval","forEach","4vsFYce","$videoElement","3947340LkAvIT","_bindEvents","3046296XrFJwp","loadSource() ","1124740XpxFun","2362662veSjkt","length","147791hyxxMu","939183LgqWLw","TAG_NAME","loadSource","bandwidthEstimateInterval","player","95137OEdGYQ","56isEDKe","mp4","emitError","url"];return(l_=function(){return t})()}function d_(t,e){const s=l_();return(d_=function(t,e){return s[t-=389]})(t,e)}!function(t,e){const s=d_,i=t();for(;;)try{if(242434===parseInt(s(399))/1+parseInt(s(417))/2*(-parseInt(s(400))/3)+-parseInt(s(390))/4*(-parseInt(s(396))/5)+-parseInt(s(397))/6+parseInt(s(405))/7*(-parseInt(s(406))/8)+-parseInt(s(416))/9*(-parseInt(s(392))/10)+parseInt(s(394))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(l_);class u_ extends Bi{constructor(t){const e=d_;super(),this[e(404)]=t,this[e(401)]=e(412),this[e(414)]=!1,this[e(391)]=this[e(404)][e(421)][e(391)],this[e(407)]=null,this.eventsDestroy=[],this[e(403)]=null,this[e(407)]=new h_(t),this[e(393)](),this[e(404)][e(415)](this.TAG_NAME,"init")}async destroy(){const t=d_;return this[t(422)](),this[t(407)]&&(await this.mp4[t(419)](),this[t(407)]=null),this[t(418)][t(398)]&&(this[t(418)][t(389)]((t=>t())),this[t(418)]=[]),this[t(391)]=null,this[t(404)][t(415)](this[t(401)],t(419)),!0}_bindEvents(){const t=d_;this[t(407)].on(Vt.error,(e=>{const s=t;this[s(404)][s(408)](U.mp4Error,e)}))}[c_(420)](){const t=c_;this[t(422)](),this[t(403)]=setInterval((()=>{const e=t;if(!this[e(407)])return;const s=this.mp4[e(411)]();this[e(404)][e(410)](M.kBps,(s[e(413)]/1024/8).toFixed(2)),this[e(407)].resetBandwidth()}),1e3)}_stopBandwidthEstimateInterval(){const t=c_;this[t(403)]&&(clearInterval(this[t(403)]),this.bandwidthEstimateInterval=null)}async[c_(402)](t){const e=c_;return this.player[e(415)](this.TAG_NAME,e(395)+t),this[e(409)]=t,await this[e(407)][e(402)](t),this[e(420)](),!0}}function p_(t,e){const s=m_();return(p_=function(t,e){return s[t-=127]})(t,e)}const f_=p_;function m_(){const t=["setPlayingTimestamp","playbackPrecision","hasRecord","audio","mseDecoder","_currentLocalTimestamp","$container","isUseFpsRender","halfHour","isUseLocalCalculateTime","totalDuration","normal","_prevPlayingTimestamp","_totalDuration","is60Min","_playbackTs","_isUseFpsRender","_checkStatsInterval","true","remove","videoCurrentTime","_opt","videoCurrentTimeDiff","playingTimestamp","_listen","updateVideoCurrentTimeByBufferStart","fiveMin","_videoTimestamp","isControlTypeSimple","stats","98sRFLxL","setHours","startTimestamp","check stats and is playback use mse and check is ended","video","updateStats","693894teQdYe","narrowPrecision","end","_playbackListStartTimestamp","constructor()","clearStatsInterval","start","isPlaybackStreamEnd","controlType","playbackTime","playbackEndInner","showPrecision","seek","duration","_localOneFrameTimestamp","includes","second","tenMin","endTimestamp","setStartTime","playbackStats","playbackSeek","pause"," > this.totalDuration ","round","debugWarn","_startTime","jb-pro-container-playback","startTime","isCurrentTimeInBufferEnd","playList","_isUseLocalCalculateTime","35htmtIi","Playback","playbackFps","playbackTimestamp","fps","7697354Elaxkf","289140iWKfiH","emit","30165HdMMhk","_showPrecision","forEach","is1Min","isCacheBeforeDecodeForFpsRender","initPlaybackList","_renderFps","_isCacheBeforeDecodeForFpsRender","uiUsePlaybackPause","_audioTimestamp","init","TAG_NAME","player","setPlayingTimestamp()","time","controlType is not in [normal,simple]","_playStartTime","seek()","classList","playbackTimeScroll","indexOf","978651xgZRAe","length","playbackList","isPlaybackH24","emitPlaybackPrecisionForNormal","add","debugLog","localOneFrameTimestamp","playbackRateChange","resume","setShowPrecision","type","type is not in PLAYBACK_CONTROL_TIME_PRECISION_ARRAY","7845168jraeGh","increaseLocalTimestamp","isControlTypeNormal","_isPlaybackPauseClearCache","oneHour","timestamp ","updateLocalOneFrameTimestamp","bufferSize","isPlaybackPauseNotClearCacheAndCacheBeforeDecodeAndUseFpsRender","min","destroy","_playingTimestamp","more","\n and next update video currentTime","showControl","_localCalculateTimeInterval","isPlaybackPauseClearCache","_startLocalCalculateTime","simple","setShowPrecision()","1879155IEENls","_stopLocalCalculateTime","_fps","setRate","_rate","hour","getControlType","endTime","updateStats and videoCurrentTimeDiff is 0 and\n videoCurrentTime is ","isPlaybackUseMSE","_startfpsTime","_startFpsTimestamp","isPlaying"];return(m_=function(){return t})()}!function(t,e){const s=p_,i=t();for(;;)try{if(917289===parseInt(s(234))/1+parseInt(s(167))/2*(parseInt(s(213))/3)+-parseInt(s(211))/4+parseInt(s(205))/5*(-parseInt(s(173))/6)+parseInt(s(210))/7+-parseInt(s(247))/8+parseInt(s(267))/9)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(m_);class g_ extends Bi{constructor(t,e){const s=p_;if(super(),this.player=t,this[s(225)][s(143)][s(231)][s(239)](s(200)),this[s(214)]=null,this[s(199)]=null,this[s(229)]=null,this[s(258)]=null,this[s(149)]=null,this[s(269)]=parseInt(e[s(209)],10)||t[s(158)][s(207)],this[s(153)]=!!hi(e.isUseFpsRender),this[s(128)]=1,this._audioTimestamp=0,this[s(164)]=0,this[s(181)]=e[s(181)]||A[s(148)],e.controlType&&-1===[A[s(148)],A[s(265)]].indexOf(e[s(181)])&&(this[s(225)][s(198)](s(206),s(177),s(228),e[s(181)]),this[s(181)]=A[s(148)]),this[s(142)]=0,this[s(187)]=e[s(241)]||40,this._localCalculateTimeInterval=null,this._isUseLocalCalculateTime=!!hi(e[s(146)]),this[s(250)]=!ci(e[s(263)]),this[s(220)]=!!hi(e[s(217)]),this[s(134)]=null,this[s(135)]=null,this[s(154)]=null,this[s(152)]=0,this[s(219)]=0,this._isUseLocalCalculateTime?this[s(264)]():this[s(161)](),this[s(236)]=[],this[s(176)]=null,this[s(150)]=0,this.controlType===A[s(148)])this[s(218)](e[s(203)],e[s(184)],e[s(201)]);else if(this[s(181)]===A[s(265)]){e[s(186)]&&(this._totalDuration=1e3*e.duration);let t=e[s(201)]||0;t>this.totalDuration&&(t=this[s(147)]),this[s(192)](t)}this.player.on(M.playbackPause,(t=>{const e=s;t?this[e(195)]():this[e(243)]()}));const i={fps:this._fps,isUseFpsRender:this[s(153)],localOneFrameTimestamp:this._localOneFrameTimestamp,isUseLocalCalculateTime:this._isUseLocalCalculateTime,uiUsePlaybackPause:e[s(221)],showControl:e[s(261)]};try{t.debugLog(s(206),s(223),JSON.stringify(i))}catch(e){t[s(240)](s(206),s(223),i)}}destroy(){const t=p_;this[t(199)]=null,this[t(214)]=null,this[t(229)]=null,this[t(258)]=null,this._prevPlayingTimestamp=null,this[t(150)]=0,this[t(222)]=0,this[t(164)]=0,this._fps=null,this[t(153)]=!1,this[t(128)]=1,this[t(236)]=[],this[t(176)]=null,this[t(262)]=null,this[t(142)]=0,this[t(134)]=null,this[t(135)]=null,this[t(219)]=0,this[t(152)]=0,this[t(268)](),this[t(178)](),this[t(225)][t(143)]&&this.player.$container[t(231)][t(156)](t(200)),this.off(),this.player[t(240)]("Playback",t(257))}_listen(){const t=p_;this[t(225)].on(M[t(166)],(e=>{const s=t,i=e.ts;!this[s(229)]&&(this[s(229)]=i-1e3);let r=i-this[s(229)];if(this[s(137)](r),this[s(225)].isPlaybackUseMSE()&&this[s(225)].isPlaying()&&0===e[s(159)]&&(this[s(225)].debugWarn(this[s(224)],s(132)+e[s(157)]+s(260)),this.player[s(141)][s(162)]()),this.player[s(180)]()&&this.player[s(136)]())if(this[s(225)][s(133)]()&&0===e[s(159)]){this[s(225)].mseDecoder[s(202)]()&&(this[s(225)][s(240)](this[s(224)],s(170)),this[s(225)][s(212)](M[s(183)]))}else{0===e.playbackCacheDataDuration&&(this[s(225)][s(240)](this.TAG_NAME,"check stats and is playback use (wasm or wcs) and check is ended"),this[s(225)].emit(M[s(183)]))}}))}[f_(195)](){this[f_(178)]()}[f_(243)](){this.startCheckStatsInterval()}[f_(172)](){const t=f_;let e=arguments[t(235)]>0&&void 0!==arguments[0]?arguments[0]:{};!this[t(135)]&&(this[t(135)]=je()),vs(e.ts)&&(this[t(225)][t(172)]({fps:!0,ts:e.ts}),this[t(152)]=e.ts,!this[t(134)]&&(this._startfpsTime=e.ts),this[t(219)]+=1);const s=je(),i=s-this._startFpsTimestamp;if(i<1e3)return;let r=null;this[t(134)]&&(r=this._playbackTs-this._startfpsTime),this.player[t(212)](M[t(193)],{fps:this[t(219)],rate:this.rate,start:this[t(134)],end:this._playbackTs,timestamp:i,dataTimestamp:r,audioBufferSize:this[t(225)][t(140)]?this[t(225)][t(140)][t(254)]:0,videoBufferSize:this[t(225)][t(171)]?this.player[t(171)][t(254)]:0,ts:this[t(152)]}),this[t(219)]=0,this[t(134)]=this[t(152)],this[t(135)]=s}[f_(253)](t){this[f_(187)]=t}[f_(264)](){const t=f_;this._stopLocalCalculateTime(),this[t(262)]=setInterval((()=>{const e=t,s=this._currentLocalTimestamp;!this[e(229)]&&(this[e(229)]=s-1e3);let i=s-this._playStartTime;this.setPlayingTimestamp(i)}),1e3)}startCheckStatsInterval(){this[f_(178)](),this._checkStatsInterval=setInterval((()=>{this.updateStats()}),1e3)}[f_(268)](){const t=f_;this[t(262)]&&(clearInterval(this[t(262)]),this[t(262)]=null)}[f_(178)](){const t=f_;this._checkStatsInterval&&(clearInterval(this[t(154)]),this._checkStatsInterval=null)}[f_(248)](){const t=f_;this[t(204)]&&(this[t(142)]+=this[t(187)])}initPlaybackList(t,e,s){const i=f_;this[i(236)]=t||[];let r=0;if(this[i(236)].forEach(((t,e)=>{const s=i;10===xs(t.start)?(t[s(169)]=1e3*t[s(179)],t[s(201)]=is(t[s(169)])):(t[s(169)]=t.start,t.startTime=is(t[s(169)])),10===xs(t[s(175)])?(t[s(191)]=1e3*t.end,t.endTime=is(t[s(191)])):(t[s(191)]=t[s(175)],t[s(131)]=is(t[s(191)])),t[s(186)]=t[s(175)]-t[s(179)],r+=t[s(186)]})),this[i(150)]=r,this[i(225)].debugLog("Playback",this.playbackList),this[i(236)].length>0){const t=this.playbackList[0].startTimestamp;this[i(176)]=t;let e=t;s&&(10===xs(s)&&(s*=1e3),this._isTimeInPlaybackList(s)&&(e=s)),this[i(192)](e)}const n=e||st.oneHour;this.setShowPrecision(n)}get[f_(147)](){return(this[f_(150)]||0)/1e3}get[f_(201)](){return this[f_(199)]||0}[f_(192)](t){const e=f_;this[e(199)]=t,this._playingTimestamp=t,this[e(149)]=t,this[e(229)]=null}[f_(127)](t){const e=f_;this._rate=t,this[e(225)][e(212)](M[e(242)],t)}get[f_(209)](){return this[f_(269)]}get rate(){return this[f_(128)]}get[f_(144)](){return this[f_(153)]}get[f_(146)](){return this[f_(204)]}get[f_(184)](){return this[f_(214)]}get[f_(151)](){const t=f_;return this[t(184)]===st[t(251)]}get is30Min(){const t=f_;return this[t(184)]===st[t(145)]}get is10Min(){const t=f_;return this[t(184)]===st[t(190)]}get is5Min(){const t=f_;return this.showPrecision===st[t(163)]}get[f_(216)](){return this[f_(184)]===st.fiveMin}get isPlaybackPauseClearCache(){return this[f_(250)]}get isCacheBeforeDecodeForFpsRender(){return this[f_(220)]}[f_(244)](t){const e=f_;!rt[e(188)](t)&&(this[e(225)][e(198)]("Playback",e(266),e(246),t),t=st[e(251)]),this[e(214)]&&this[e(214)]===t||(this[e(214)]=t,this[e(238)]())}[f_(238)](){const t=f_;this[t(237)]()&&(this.player[t(212)](M[t(138)],this[t(214)],this[t(236)]),this[t(225)].emit(M.playbackShowPrecisionChange,this[t(214)]))}setPlayingTimestamp(t){const e=f_;let s;if(this.controlType===A[e(148)]){if(s=this.startTime+t,this[e(258)]=s,this[e(258)]!==this[e(149)]){this[e(225)][e(212)](M.playbackTime,s);const t=function(t){const e=Me;let s={hour:0,min:0,second:0};return t>-1&&(s[e(617)]=Math.floor(t/60/60)%60,s[e(589)]=Math[e(384)](t/60)%60,s[e(544)]=t%60),s}(s);this[e(225)][e(212)](M[e(208)],{ts:s,hour:t[e(129)],min:t[e(256)],second:t[e(189)]})}this._prevPlayingTimestamp=this._playingTimestamp}else this[e(181)]===A[e(265)]&&(s=this[e(201)]+Math[e(197)](t/1e3),s>this[e(147)]&&(this[e(225)][e(240)](e(206),e(226),e(252)+s+e(196)+this[e(147)]),s=this[e(147)]),this[e(258)]=s,this[e(258)]!==this._prevPlayingTimestamp&&(this.player[e(212)](M[e(182)],s),this[e(225)][e(212)](M[e(208)],{ts:s})),this[e(149)]=this[e(258)])}get[f_(160)](){return this[f_(258)]}[f_(174)](){const t=f_,e=rt[t(233)](this[t(184)])-1;if(e>=0){const s=rt[e];this[t(244)](s)}}expandPrecision(){const t=f_,e=rt[t(233)](this[t(184)])+1;if(e<=rt[t(235)]-1){const s=rt[e];this[t(244)](s)}}[f_(185)](t){const e=f_;if(this.player[e(240)]("Playback",e(230),t),this[e(181)]===A[e(148)]){if(t[e(139)]===e(155)){let s=t[e(227)];t[e(245)]===e(256)&&(s=60*t[e(227)]);let i=function(t){let e={};t>-1&&(e={hour:Math[Me(384)](t/60/60)%60,min:Math.floor(t/60)%60,second:t%60});return e}(s);if(this[e(176)]){const t=new Date(this[e(176)])[e(168)](i[e(129)],i[e(256)],i[e(189)],0);i.timestamp=t;const s=this._findMoreInfoByTimestamp(t);i&&s.more&&(i.more=s[e(259)])}this[e(225)][e(212)](M[e(194)],i)}}else if(this[e(181)]===A[e(265)]){let s=t[e(227)];this.player[e(212)](M[e(194)],{ts:s})}}currentTimeScroll(){const t=f_;this[t(225)][t(212)](M[t(232)])}_findMoreInfoByTimestamp(t){const e=f_;let s=null;return this[e(236)][e(215)](((i,r)=>{const n=e;i[n(169)]<=t&&i[n(191)]>=t&&(s=i)})),s}_isTimeInPlaybackList(t){const e=f_;let s=!1;return this.playbackList[e(215)](((i,r)=>{i[e(169)]<=t&&i.endTimestamp>=t&&(s=!0)})),s}[f_(130)](){return this[f_(181)]}[f_(249)](){const t=f_;return this[t(181)]===A[t(148)]}[f_(165)](){return this[f_(181)]===A.simple}isPlaybackPauseNotClearCacheAndCacheBeforeDecode(){const t=f_;return ci(this.isPlaybackPauseClearCache)&&this[t(217)]}[f_(255)](){const t=f_;return this.isPlaybackPauseNotClearCacheAndCacheBeforeDecode()&&this[t(144)]}[f_(237)](){const t=f_;return this[t(181)]===A[t(148)]}isPlaybackSimple(){const t=f_;return this.controlType===A[t(265)]}}const A_=y_;function y_(t,e){const s=b_();return(y_=function(t,e){return s[t-=129]})(t,e)}function b_(){const t=["init","handleGestureChangeThrottle","updateVideoElementScale","6282eKULQl","726176eZNhdC","91MmOyaj","useWebFullScreen","34991ChuBIc","touchstart","bindEvents","classList","offsetLeft","pageY","destroy","handleGestureChange","isGesturing","video","zoomSupportGestureInMobile","remove","canvas","_handleZooming","left","handleGestureStart","touchend"," style is ","handleGestureChangeForAndroid","grabbing","$videoElement","videoPosition","scale","offsetTop","updatePrevVideoElementStyleScale","prevGestureScale","split","preventDefault","top","zooming","style","4380OVJuGx","touchmove","34dfNIfs","atan2","zoom","_bindEvents","stopPropagation","player","10gOzmTr","64887DWmCAY","expandPrecision","add","indexOf","$container","_unbindEvents","2746791pCtCoG","bind","handleMouseDown is dragging true","updateVideoPosition","jb-pro-zoom-control","zoomMaxScale","handleGestureStartForAndroid","grab","updateCurrentZoom","down","handleMouseUp is dragging false","handleGestureEndForAndroid","transform","172yOJYBh","move","cursor","pageX","narrowPrecision","_resetVideoPosition","auto","handleMouseUp","currentZoom","prevVideoElementStyleScale","prevGestureTouches","scale(","_isZooming","gesturechange","handleGestureEnd","1698IhFAfZ","match","zoomSupportGestureInMobileSpeed","replace","2100siPmzR","isZooming","tempPosition","push","length"," -> ","sqrt","resize","touches","prevVideoElementStyleTransform","handleMouseDown","_opt","debugLog","off","14226082npNOAV","isDragging"];return(b_=function(){return t})()}!function(t,e){const s=y_,i=t();for(;;)try{if(623543===parseInt(s(171))/1*(-parseInt(s(208))/2)+-parseInt(s(215))/3*(parseInt(s(133))/4)+parseInt(s(206))/5*(parseInt(s(148))/6)+parseInt(s(173))/7*(parseInt(s(172))/8)+-parseInt(s(221))/9*(parseInt(s(214))/10)+-parseInt(s(175))/11*(parseInt(s(152))/12)+parseInt(s(166))/13)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(b_);class v_ extends Bi{constructor(t){const e=y_;super(),this[e(213)]=t,this.TAG_NAME=e(210),this[e(177)]=[],this.isDragging=!1,this[e(183)]=!1,this.currentZoom=1,this[e(161)]=null,this[e(142)]=null,this[e(200)]=null,this[e(143)]=[],this[e(145)]=!1,this[e(154)]={x:0,y:0},this.videoPosition={left:0,top:0},this[e(213)],this[e(213)].on(M.zooming,this[e(188)].bind(this)),t[e(164)](e(210),e(168))}[A_(181)](){const t=A_;this[t(220)](),this.bindEvents=[],this[t(167)]=!1,this[t(141)]=1,this[t(161)]=null,this[t(142)]=null,this[t(154)]={x:0,y:0},this[t(196)]={left:0,top:0},this[t(165)](),this[t(213)][t(164)]("zoom","destroy")}[A_(188)](t){const e=A_;if(t){this.player[e(219)].classList[e(217)](e(225)),this[e(211)]();const t=this[e(213)][e(184)][e(195)][e(205)][e(132)];let s=this[e(213)][e(184)][e(195)][e(179)],i=this[e(213)][e(184)][e(195)][e(198)];s=parseFloat(s),i=parseFloat(i),s&&(this[e(196)][e(189)]=s),i&&(this[e(196)].top=i),this[e(161)]=t;let r=t[e(149)](/scale\([0-9., ]*\)/g);if(r&&r[0]){let t=r[0][e(151)](e(144),"")[e(151)](")","");this[e(142)]=t[e(201)](",")}this[e(145)]=!0}else{this[e(213)][e(219)][e(178)][e(186)](e(225)),this[e(220)](),this[e(138)](),this[e(213)][e(219)][e(205)].cursor=e(139);let t=this[e(161)];this[e(213)][e(184)].$videoElement[e(205)][e(132)]=t,this[e(161)]=null,this[e(142)]=null,Je()&&this[e(213)]._opt[e(174)]&&this[e(213)][e(159)](),this._isZooming=!1}}[A_(211)](){const t=A_,{events:{proxy:e}}=this.player,s=Ai(),i=e(this[t(213)][t(219)],s[t(134)],this.handleMouseMove[t(222)](this)),r=e(this[t(213)][t(219)],s[t(129)],this.handleMouseDown[t(222)](this)),n=e(window,s.up,this.handleMouseUp[t(222)](this));if(this[t(177)][t(155)](i,r,n),Je()&&this[t(213)][t(163)][t(185)])if(Ze()){this[t(169)]=hs(this[t(193)].bind(this),100);const s=e(this[t(213)][t(219)],t(176),this[t(227)][t(222)](this)),i=e(this[t(213)][t(219)],t(207),this[t(169)][t(222)](this)),r=e(this[t(213)][t(219)],t(191),this[t(131)][t(222)](this));this.bindEvents[t(155)](s,i,r)}else{this[t(169)]=hs(this[t(182)][t(222)](this),100);const s=e(this[t(213)][t(219)],"gesturestart",this[t(190)].bind(this)),i=e(this[t(213)][t(219)],t(146),this[t(169)].bind(this)),r=e(this[t(213)][t(219)],"gestureend",this[t(147)][t(222)](this));this[t(177)][t(155)](s,i,r)}}[A_(220)](){this[A_(177)].forEach((t=>{t&&t()}))}handleMouseMove(t){const e=A_;if(t[e(212)](),this[e(167)]&&this[e(213)][e(204)]){t[e(202)]();const{posX:s,posY:i}=Gs(t),r=this[e(154)].x-s,n=this.tempPosition.y-i;this[e(196)].left=this.videoPosition[e(189)]-r,this[e(196)].top=this[e(196)].top-n,this[e(154)].x=s,this[e(154)].y=i,this.updateVideoPosition()}}[A_(162)](t){const e=A_;t[e(212)]();const s=Ns(t);if(this[e(213)][e(204)]&&(s.matches(e(184))||s.matches(e(187)))){t[e(202)]();const{posX:s,posY:i}=Gs(t);this.player[e(219)][e(205)][e(135)]=e(194),this.tempPosition.x=s,this.tempPosition.y=i,this[e(167)]=!0,this[e(213)][e(164)](e(210),e(223))}}[A_(140)](t){const e=A_;t[e(212)](),this[e(167)]&&this[e(213)][e(204)]&&(t[e(202)](),this[e(154)]={x:0,y:0},this[e(167)]=!1,this[e(213)].$container[e(205)].cursor=e(228),this[e(213)][e(164)](e(210),e(130)))}[A_(190)](t){const e=A_;t[e(212)](),this[e(213)][e(204)]&&(null===this.prevGestureScale&&(this.prevGestureScale=t[e(197)]),this[e(183)]=!0)}handleGestureStartForAndroid(t){const e=A_;t[e(212)](),this[e(213)][e(204)]&&t[e(160)][e(156)]>=2&&(this.isGesturing=!0,this[e(143)]=t[e(160)])}[A_(193)](t){const e=A_;if(t[e(212)](),t.preventDefault(),this[e(213)][e(204)]&&this[e(183)]&&t[e(160)][e(156)]>=2){const r=t.touches,n=s(r[0],r[1])/s(this[e(143)][0],this[e(143)][1]);i(r[0],r[1]),i(this[e(143)][0],this[e(143)][1]),null===this.prevGestureScale&&(this[e(200)]=n);const o=n-this[e(200)],a=this[e(213)][e(163)][e(150)];o>0?this.expandPrecision(a):o<0&&this[e(137)](a)}function s(t,s){const i=e;var r=s[i(136)]-t[i(136)],n=s[i(180)]-t[i(180)];return Math[i(158)](r*r+n*n)}function i(t,s){const i=e;var r=t[i(136)]-s[i(136)],n=t[i(180)]-s[i(180)];return 180*Math[i(209)](n,r)/Math.PI}}handleGestureEndForAndroid(t){const e=A_;t[e(212)](),this.player.zooming&&(this[e(200)]=null,this[e(183)]=!1,this[e(143)]=[])}[A_(182)](t){const e=A_;if(t.stopPropagation(),this[e(213)][e(204)]&&this.isGesturing&&null!==this[e(200)]){const s=t[e(197)],i=s-this[e(200)],r=this.player[e(163)].zoomSupportGestureInMobileSpeed;i>0?this[e(216)](r):i<0&&this.narrowPrecision(r),this.prevGestureScale=s}}handleGestureEnd(t){const e=A_;t.stopPropagation(),this[e(213)].zooming&&(this[e(200)]=null,this[e(183)]=!1)}[A_(224)](){const t=A_,e=this[t(213)][t(184)][t(195)];e.style.left=this[t(196)][t(189)]+"px",e[t(205)][t(203)]=this[t(196)][t(203)]+"px"}[A_(138)](){const t=A_;this[t(213)].resize(),this.tempPosition={x:0,y:0},this[t(196)]={left:0,top:0},this[t(141)]=1,this[t(167)]=!1}narrowPrecision(t){const e=A_;this[e(141)]<=1||(this[e(141)]-=1,this[e(170)](t))}expandPrecision(t){const e=A_;this[e(141)]>=this[e(213)][e(163)].zoomMaxScale||(this[e(141)]+=1,this.updateVideoElementScale(t))}[A_(229)](t,e){const s=A_;t<1||t>this.player[s(163)][s(226)]||(this[s(141)]=t,this[s(170)](e))}[A_(199)](t){this[A_(142)]=t}[A_(170)](){const t=A_;let e=arguments[t(156)]>0&&void 0!==arguments[0]?arguments[0]:.5;const s=this[t(213)][t(184)][t(195)];let i=s.style[t(132)],r=1,n=1;if(this[t(142)]){const e=this[t(142)][0];void 0!==e&&(r=e,n=e);const s=this[t(142)][1];void 0!==s&&(n=s)}n=os(n),r=os(r);const o=e*r*(this[t(141)]-1)+r,a=e*n*(this[t(141)]-1)+n;let h;h=-1===i[t(218)](t(144))?i+" scale("+o+","+a+")":i[t(151)](/scale\([0-9., ]*\)/,"scale("+o+","+a+")"),this[t(213)][t(164)](t(210),"updateVideoElementScale end is X: "+r+t(157)+o+", Y: "+n+t(157)+a+t(192)+h),s[t(205)][t(132)]=h}[A_(153)](){return this[A_(145)]}}function S_(t,e){const s=E_();return(S_=function(t,e){return s[t-=192]})(t,e)}const w_=S_;function E_(){const t=["debugLevel","debugLog","type","color","borderWidth","useImageDetector","height","load","list","11517165IILZvV","#0000FF","map","emit"," and use faceDetector","destroy","screenshotByRect","borderColor","useObjectDetector","initOcclusionDetector","initImageDetector","updateImageDetectorConfig","objectDetector","_opt","forEach","143102VNKpqZ","aiFaceDetectRectConfig","jessibuca-pro-face-detector-info","JessibucaProOcclusionDetector","rect","width","aiObjectDetectorInfo","filter","isArray","init occlusion detector success","initFaceDetector","14CdEaHU","lineWidth","imageDetector","faceDetector"," and use objectDetector","aiObjectDetectTarget","length","push","fontSize","video","addAiContentToCanvas","aiObjectDetectShowRect","27093TFAimx","updateConfig","32155kSHOKe","init object detector success","aiFaceDetectWidth","2241872AuuYIe","AiLoader","aiFaceDetectEmitBase64","then","initObjectDetector","occlusionDetector","debugUuid","useOcclusionDetector","136kbOZkc","aiFaceDetectShowRect","player","updateOcclusionDetectorConfig","init","1218CYMnQA","off","init face detector success","1730mfXCTo","24498kAcGfd","14SLaJBj","debug","53125440vhUxYS"];return(E_=function(){return t})()}!function(t,e){const s=S_,i=t();for(;;)try{if(855406===-parseInt(s(232))/1*(parseInt(s(259))/2)+parseInt(s(209))/3*(-parseInt(s(222))/4)+-parseInt(s(211))/5*(parseInt(s(227))/6)+-parseInt(s(197))/7*(-parseInt(s(214))/8)+-parseInt(s(231))/9*(parseInt(s(230))/10)+-parseInt(s(244))/11+parseInt(s(234))/12)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(E_);class I_ extends Bi{constructor(t){const e=S_;super(),this[e(224)]=t,this[e(200)]=null,this.objectDetector=null,this.imageDetector=null,this[e(219)]=null,this[e(196)](),this[e(218)](),this[e(254)](),this[e(253)]();let s=e(226);this[e(200)]&&(s+=e(248)),this[e(256)]&&(s+=e(201)),this[e(199)]&&(s+=" and use imageDetector"),this[e(219)]&&(s+=" and use occlusionDetector"),this[e(224)].debugLog("AiLoader",s)}[w_(249)](){const t=w_;this[t(228)](),this.faceDetector&&(this.faceDetector[t(249)](),this[t(200)]=null),this[t(256)]&&(this[t(256)].destroy(),this[t(256)]=null),this[t(199)]&&(this[t(199)][t(249)](),this[t(199)]=null),this[t(219)]&&(this.occlusionDetector[t(249)](),this[t(219)]=null),this.player[t(236)](t(215),"destroy")}[w_(196)](){const t=w_;if(this[t(224)]._opt.useFaceDetector&&window.JessibucaProFaceDetector){const e=new JessibucaProFaceDetector({detectWidth:this[t(224)][t(257)][t(213)],showRect:!1,debug:this[t(224)][t(257)][t(233)],debugLevel:this[t(224)]._opt[t(235)],debugUuid:this[t(224)][t(257)][t(220)],name:b,buildTime:v});e[t(242)]()[t(217)]((()=>{const s=t;this[s(224)][s(236)]("AiLoader",s(229)),this[s(200)]=e,this[s(200)].on(s(261),(t=>{const e=s;if(this.player[e(257)][e(216)]&&(t.list=t[e(243)][e(246)]((t=>{const s=e;return this[s(224)].video&&(t.base64=this[s(224)][s(206)][s(250)](t)),t}))),this[e(224)][e(247)](M.aiFaceDetectorInfo,t),this[e(224)][e(257)][e(223)]){const s=this.player._opt[e(260)]||{},i=(t.list||[])[e(246)]((t=>{const i=e;return t[i(237)]=i(263),t[i(238)]=s[i(251)]||i(245),t[i(198)]=s[i(239)]||2,t}));this.player[e(206)]&&this[e(224)][e(206)][e(207)](i)}}))}))}}[w_(218)](){const t=w_;if(this[t(224)]._opt[t(252)]&&window.JessibucaProObjectDetector){const e=new JessibucaProObjectDetector({detectWidth:this[t(224)][t(257)].aiObjectDetectWidth,showRect:!1,debug:this.player[t(257)][t(233)],debugLevel:this[t(224)][t(257)][t(235)],debugUuid:this.player[t(257)][t(220)],name:b,buildTime:v});e[t(242)]()[t(217)]((()=>{const s=t;this.player[s(236)](s(215),s(212)),this[s(256)]=e,this.objectDetector.on("jessibuca-pro-object-detector-info",(t=>{const e=s,i=t.ts;let r=t.list||[];if(this.player[e(257)][e(202)]){let t=[];t=Array[e(194)](this[e(224)]._opt[e(202)])?this[e(224)]._opt[e(202)]:[this[e(224)][e(257)].aiObjectDetectTarget],r=r[e(193)]((e=>t.includes(e.en)))}if(this[e(224)].emit(M[e(192)],{ts:i,list:r}),this.player[e(257)][e(208)]){const t=[],s=this[e(224)][e(257)].aiObjectDetectRectConfig||{};r[e(258)]((i=>{const r=e,n={type:"rect",color:s[r(251)]||r(245),lineWidth:s.borderWidth||2,x:i[r(263)].x,y:i[r(263)].y,width:i.rect[r(264)],height:i.rect[r(241)]},o={type:"text",color:s[r(238)]||"#000",fontSize:s[r(205)]||14,text:i.zh,x:i[r(263)].x,y:i.rect.y-25};t[r(204)](n,o)})),this[e(224)][e(206)]&&this[e(224)][e(206)][e(207)](t)}}))}))}}[w_(254)](){const t=w_;if(this[t(224)][t(257)][t(240)]&&window.JessibucaProImageDetector){const e=new JessibucaProImageDetector({debug:this[t(224)][t(257)][t(233)],debugLevel:this[t(224)]._opt[t(235)],debugUuid:this.player[t(257)][t(220)],name:b,buildTime:v});e[t(242)]()[t(217)]((()=>{const s=t;this[s(224)][s(236)]("AiLoader","init image detector success"),this[s(199)]=e}))}}[w_(253)](){const t=w_;if(this[t(224)][t(257)][t(221)]&&window[t(262)]){const e=new JessibucaProOcclusionDetector({debug:this[t(224)][t(257)][t(233)],debugLevel:this[t(224)][t(257)][t(235)],debugUuid:this[t(224)][t(257)][t(220)],name:b,buildTime:v});e.load()[t(217)]((()=>{const s=t;this[s(224)][s(236)](s(215),s(195)),this.occlusionDetector=e}))}}updateFaceDetectorConfig(){const t=w_;let e=arguments[t(203)]>0&&void 0!==arguments[0]?arguments[0]:{};this.faceDetector&&this[t(200)][t(210)](e)}updateObjectDetectorConfig(){const t=w_;let e=arguments[t(203)]>0&&void 0!==arguments[0]?arguments[0]:{};this.objectDetector&&this[t(256)][t(210)](e)}[w_(255)](){const t=w_;let e=arguments[t(203)]>0&&void 0!==arguments[0]?arguments[0]:{};this[t(199)]&&this[t(199)][t(210)](e)}[w_(225)](){const t=w_;let e=arguments[t(203)]>0&&void 0!==arguments[0]?arguments[0]:{};this[t(219)]&&this[t(219)][t(210)](e)}}const T_=k_;function k_(t,e){const s=C_();return(k_=function(t,e){return s[t-=141]})(t,e)}!function(t,e){const s=k_,i=t();for(;;)try{if(103588===parseInt(s(190))/1+-parseInt(s(158))/2+-parseInt(s(169))/3*(-parseInt(s(165))/4)+-parseInt(s(156))/5*(-parseInt(s(176))/6)+-parseInt(s(142))/7*(parseInt(s(149))/8)+-parseInt(s(144))/9*(-parseInt(s(152))/10)+-parseInt(s(145))/11*(parseInt(s(143))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(C_);class __ extends Bi{constructor(t){const e=k_;super(),this[e(180)]=t,this[e(186)]="Contextmenu",this.menuList=[],this[e(141)]=t[e(160)].$contextmenus,Je()?this[e(180)].debugWarn(this[e(186)],e(168)):this[e(188)](),t[e(171)](this[e(186)],"init")}[T_(150)](){const t=T_;this[t(161)]=[],this.player[t(171)](this[t(186)],t(150))}get[T_(153)](){const t=T_;return kn(this.player[t(155)],t(182))}show(){const t=T_;In(this.player.$container,t(182))}[T_(148)](){const t=T_;Tn(this[t(180)][t(155)],"jb-pro-contextmenus-show")}init(){const t=T_,{events:{proxy:e},debug:s}=this[t(180)];this[t(180)][t(146)][t(151)][t(184)]>0&&this.player[t(146)][t(151)][t(159)]((t=>{this.addMenuItem(t)})),e(this[t(180)][t(155)],t(185),(e=>{const s=t;e[s(167)](),this[s(175)]();const i=e[s(187)],r=e[s(189)],{height:n,width:o,left:a,top:h}=this.player.$container.getBoundingClientRect(),{height:c,width:l}=this[s(141)].getBoundingClientRect();let d=i-a,u=r-h;i+l>a+o&&(d=o-l),r+c>h+n&&(u=n-c),ze(this[s(141)],{left:d+"px",top:u+"px"})})),e(this.player[t(155)],"click",(e=>{!Dn(e,this[t(141)])&&this.hide()})),this[t(180)].on(M[t(164)],(()=>{this.hide()}))}[T_(174)](t){const e=T_;let s=!0;return!t[e(173)]&&(this[e(180)][e(166)](this[e(186)],"content is required"),s=!1),s}[T_(163)](){const t=T_;let e=arguments[t(184)]>0&&void 0!==arguments[0]?arguments[0]:{};const s=ii(yt);if(e=Object.assign({},s,e),!this[t(174)](e))return;const{events:{proxy:i},debug:r}=this[t(180)],n=as(),o='\n
{const i=t;s[i(167)](),e.click[i(170)](this.player,this,s),this[i(148)]()})),this[t(161)][t(154)]({uuid:n,$menuItem:h})}}function C_(){const t=["call","debugLog","insertAdjacentHTML","content","_validateMenuItem","show","6JPoMSZ",'">\n ',"querySelector","from","player","beforebegin","jb-pro-contextmenus-show","\n
\n ","length","contextmenu","LOG_NAME","clientX","init","clientY","139752VAFLgw","$contextmenus","220598WKYaaD","12gaAqzF","225cqcWiP","2187229kSDQWO","_opt",".jb-pro-contextmenu-","hide","8sPVrTp","destroy","contextmenuBtns","18510Shqpmi","isShow","push","$container","909420pwoIHt","children","85676UUffeB","forEach","control","menuList","index","addMenuItem","blur","17736wkBqJn","debugWarn","preventDefault","not support mobile","6sCOkeY"];return(C_=function(){return t})()}const R_=L_;function D_(){const t=["end","timestamp","addTransceiver","prevWebrtcAudioStats","createElement","video play","isDisconnected","canvasRenderInterval","new","max","TransformStream","ratechange","video loadedmetadata","onicecandidateerror[candidate错误]","type","Track","onicecandidateerror","kBps","delta","video canplay","streams","$videoElement","debugWarn","ended","connected","5132015DsUxHZ","start","abps","timeStamp","video is paused and replay success","webrtcDisconnect","ondatachannel","player","supportVideoFrameCallbackHandle","isH264","currentTime","track","events","loadedmetadata","src","prevWebrtcVideoStats","srcObject","bytesReceived","localCandidate","readyState","createEncodedStreams","bandwidthEstimateInterval","video is paused and replay error ","rtcPeerTrackVideoReceiver","Remote ICE candidate: ","audio","videoStream","disconnected","1573386XYRyWG","CommonWebrtc","_startBandwidthEstimateInterval","onicecandidate","handleRender","destroy","floor","frameWidth","completed","InboundRtp","enqueue","currentWebrtcStats","getVideoBufferRangeList","getVideoCurrentTime","video","130wWPiiT","connectionState","oniceconnectionstatechange","autoplay","webrtcOnConnectionStateChange","getVideoBufferTimeRange","webrtcIceCandidateError","isEmitSEI","onnegotiationneeded","_startCanvasRender","pipeTo","payload","videoFrameCallback","isVideoPlaying","webrtcFailed","initCanvasViewSize","bind","stop","mediaTime","_initRenderSize","iceConnectionState","_opt","rtcPeerConnection","writable","onnegotiationneeded[通信环境发生变化]","pipeThrough","RemoteCandidate","frameHeight","canplay","7147611hwbbAu","9219546aefJck","10bZyiwc","closed","TAG_NAME","updateVideoInfo","absolute","getStats","_stopBandwidthEstimateInterval","cancelVideoFrameCallback","data","toFixed","CandidatePair","play","muted","video play error ","waiting","debugLog","emit","_initRtcPeerConnection","pause","9537872bhEYdM","iceGatheringState","updateStats","find","render","isInitInfo","196804VuVlgm","_initVideoEvents","push","1481nJolPO","rtcPeerTrackAudioReceiver","catch","video playback Rate change","close","eventsDestroy","checking","paused","1404uwCpeV","requestVideoFrameCallback","length","videoWidth","then","timeUpdate","position","ontrack","lastTimeStamp","getReceivers","removeAttribute","createEncodedStreams is not supported","buffered","LocalCandidate","bytesSent","_stopCanvasRender","videoFrameCallback() player is destroyed","playbackRate","getTracks","currentRoundTripTime","emitVideoSei","failed","webrtcOnIceConnectionStateChange","succeeded","onicegatheringstatechange","recvonly","_createEncodedStreams","webrtcUseCanvasRender","forEach","load","webrtcClosed","videoHeight","onconnectionstatechange"];return(D_=function(){return t})()}function L_(t,e){const s=D_();return(L_=function(t,e){return s[t-=119]})(t,e)}!function(t,e){const s=L_,i=t();for(;;)try{if(873365===parseInt(s(128))/1*(-parseInt(s(136))/2)+parseInt(s(222))/3+parseInt(s(125))/4*(-parseInt(s(237))/5)+parseInt(s(267))/6+parseInt(s(194))/7+parseInt(s(119))/8+parseInt(s(266))/9*(-parseInt(s(268))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(D_);class x_ extends Bi{constructor(t){const e=L_;super(),this[e(201)]=t,this[e(270)]=e(223),this[e(259)]=null,this[e(220)]=null,this[e(175)]=!1,this[e(203)]=this[e(201)].isWebrtcH264(),this[e(133)]=[],this[e(202)]=null,this[e(124)]=!1,this.$videoElement=this[e(201)][e(236)].$videoElement,this[e(215)]=null,this[e(217)]=null,this[e(129)]=null,this[e(209)]={},this[e(172)]={},this[e(233)]={},this[e(201)][e(258)][e(163)]&&this[e(203)]&&(this.$videoElement=document[e(173)](e(236)),ss()&&(this.$videoElement.style[e(142)]=e(272)),this[e(126)]()),this[e(190)][e(280)]=!0,this[e(285)]()}[R_(227)](){const t=R_;if(this[t(175)]=!1,this[t(124)]=!1,this[t(209)]={},this[t(233)]={},this[t(217)]=null,this[t(129)]=null,this[t(274)](),this[t(202)]&&this[t(190)]&&(this[t(190)][t(275)](this[t(202)]),this[t(202)]=null),this.eventsDestroy[t(138)]&&(this.eventsDestroy.forEach((t=>t())),this[t(133)]=[]),this[t(203)]&&(this[t(220)]&&(this[t(220)][t(154)]()[t(164)]((e=>e[t(254)]())),this.videoStream=null),this[t(190)]))if(this[t(201)][t(258)][t(163)]){this.$videoElement[t(286)]&&(this[t(190)][t(286)](),this[t(190)][t(280)]=!0),this[t(190)].currentTime=0,this[t(190)][t(208)]&&(this[t(190)][t(208)]="",this.$videoElement[t(146)]("src"));try{this[t(190)][t(165)]()}catch(t){}}else this[t(190)][t(210)]&&(this[t(190)][t(210)]=null,this[t(190)][t(146)](t(210)));this[t(190)]=null,this[t(259)]&&(this.rtcPeerConnection[t(225)]=Fe,this[t(259)][t(143)]=Fe,this.rtcPeerConnection[t(168)]=Fe,this.rtcPeerConnection[t(200)]=Fe,this[t(259)][t(132)](),this[t(259)]=null)}[R_(126)](){const t=R_;this.player[t(283)](this.TAG_NAME,"_initVideoEvents()");const{proxy:e}=this[t(201)][t(206)],s=e(this.$videoElement,ct[t(265)],(()=>{const e=t;this[e(201)][e(283)](this.TAG_NAME,e(188)),this.$videoElement[e(279)]()[e(140)]((()=>{const t=e;this[t(201)].debugLog(this[t(270)],t(174)),this[t(246)](),this._initRenderSize()}))[e(130)]((t=>{const s=e;this[s(201)].debugWarn(this[s(270)],s(281),t)}))})),i=e(this.$videoElement,ct[t(282)],(()=>{const e=t;this[e(201)].debugLog(this[e(270)],"video waiting")})),r=e(this[t(190)],ct[t(207)],(()=>{const e=t;this.player.debugLog(this[e(270)],e(181))})),n=e(this[t(190)],ct[t(141)],(e=>{const s=t;parseInt(e[s(197)],10),this[s(190)][s(135)]&&(this[s(201)][s(191)](this.TAG_NAME,"video is paused and next try to replay"),this[s(190)][s(279)]()[s(140)]((()=>{const t=s;this[t(201)][t(283)](this[t(270)],t(198))}))[s(130)]((t=>{const e=s;this[e(201)][e(191)](this.TAG_NAME,e(216),t)})))})),o=e(this[t(190)],ct[t(180)],(()=>{const e=t;this[e(201)][e(283)](this[e(270)],e(131),this[e(190)]&&this.$videoElement[e(153)])}));this[t(133)][t(127)](s,i,n,o,r)}[R_(285)](){const t=R_,e=new RTCPeerConnection,s=this[t(201)],i=e[t(171)](t(236),{direction:t(161)});e[t(171)](t(219),{direction:t(161)}),this.player[t(258)][t(244)]&&this[t(162)](i.receiver),e.onsignalingstatechange=t=>{this.player.debugLog(this.TAG_NAME,"onsignalingstatechange[本地端的信号状态]",t)},e[t(160)]=s=>{const i=t;this[i(201)].debugLog(this[i(270)],"onicegatheringstatechange[ICE收集状态]",s,e[i(120)])},e[t(245)]=e=>{const s=t;this[s(201)][s(283)](this[s(270)],s(261),e)},e[t(239)]=i=>{const r=t;this[r(201)][r(283)](this[r(270)],r(239),e[r(257)]);const n=e[r(257)];switch(this[r(201)][r(284)](M[r(158)],n),this[r(175)]=n===r(221),e[r(257)]){case r(177):case r(134):case r(269):break;case r(157):s.emit(M[r(251)]);break;case r(221):s.emit(M[r(199)]);break;case r(193):case r(230):break;case r(269):s[r(284)](M[r(166)])}},e[t(225)]=e=>{const s=t;this.player[s(283)](this.TAG_NAME,"onicecandidate",e),e.candidate&&this[s(201)][s(283)](this[s(270)],s(218),e.candidate.candidate)},e[t(143)]=s=>{const i=t;if(this.player[i(283)](this[i(270)],"ontrack",s),s[i(205)].kind===i(236)){this[i(201)][i(283)](this[i(270)],"ontrack video"),this[i(217)]=e[i(145)]()[i(122)]((function(t){const e=i;return t[e(205)]===s[e(205)]})),this.rtcPeerTrackVideoReceiver&&this[i(224)]();let t=s[i(189)][0];this.$videoElement[i(240)]=!0,this.$videoElement[i(210)]=t,this[i(220)]=t}else s[i(205)].kind===i(219)&&(this[i(201)][i(283)](this[i(270)],"ontrack audio"),this[i(129)]=e[i(145)]()[i(122)]((function(t){const e=i;return t[e(205)]===s[e(205)]})),this.rtcPeerTrackAudioReceiver&&this._startBandwidthEstimateInterval())},e[t(185)]=e=>{const s=t;this[s(201)].debugLog(this[s(270)],s(182),e),this.player.emitError(U[s(243)],e)},e.onconnectionstatechange=i=>{const r=t;switch(this[r(201)][r(283)](this[r(270)],"onconnectionstatechange[所有ICE 状态总览]",i),this[r(201)][r(284)](M[r(241)],e[r(238)]),e[r(238)]){case"new":case"connecting":case"connected":case r(221):break;case r(157):this[r(175)]&&s[r(284)](M[r(251)])}},this[t(259)]=e}[R_(224)](){const t=R_;this[t(201)][t(283)](this.TAG_NAME,t(224)),this[t(274)](),this[t(215)]=setInterval((()=>{const e=t;this[e(217)]&&this.rtcPeerTrackVideoReceiver[e(273)]()[e(140)]((t=>{const s=e;let i={},r=0;t[s(164)]((t=>{const e=s;if(t)switch(t[e(183)]){case Lt[e(278)]:(t.state===e(159)||t[e(211)])&&(this[e(233)][e(170)]=t[e(170)],this.currentWebrtcStats.rtt=t[e(155)]||-1,this[e(233)][e(211)]=t[e(211)]||0,this[e(233)][e(150)]=t[e(150)]||0);break;case Lt[e(263)]:this[e(233)].remoteCandidate=t||{};break;case Lt[e(149)]:this[e(233)][e(212)]=t||{};break;case Lt[e(231)]:this[e(233)][e(144)]=t[e(170)];const s=((t[e(170)]||0)-(this[e(209)][e(170)]||0))/1e3,n=Number(t[e(211)]||0)-Number(this[e(209)][e(211)]||0),o=Math[e(228)](n/s);r+=o,i.vbps=o,this[e(209)]=t;break;case Lt[e(184)]:t.frameWidth&&t[e(264)]&&(this[e(233)][e(229)]=t.frameWidth||0,this[e(233)].frameHeight=t[e(264)]||0)}})),this[s(129)]?this[s(129)][s(273)]()[s(140)]((t=>{const e=s;t[e(164)]((t=>{const s=e;if(t&&t[s(183)]===Lt.InboundRtp){this[s(233)].lastTimeStamp=t[s(170)];const e=((t.timestamp||0)-(this[s(172)][s(170)]||0))/1e3,n=Number(t[s(211)]||0)-Number(this[s(172)][s(211)]||0),o=Math[s(228)](n/e);r+=o,i[s(196)]=o,this.prevWebrtcAudioStats=t}})),this[e(201)][e(121)](i),this.player[e(284)](M[e(186)],(r/1024)[e(277)](2))})):(this[s(201)][s(121)](i),this[s(201)].emit(M[s(186)],(r/1024)[s(277)](2)))}))}),1e3)}_stopBandwidthEstimateInterval(){const t=R_;this.player.debugLog(this[t(270)],t(274)),this[t(215)]&&(clearInterval(this.bandwidthEstimateInterval),this[t(215)]=null)}[R_(162)](t){const e=R_;if(this.player[e(283)](this[e(270)],e(162)),!t[e(214)])return void this.player[e(191)](this[e(270)],e(147));const s=t[e(214)](),i=new(window[e(179)])({transform:(t,s)=>{const i=e;if("key"===t.type||t[i(183)]===i(187)){De(new Uint8Array(t[i(276)])).forEach((t=>{const e=i;if((31&t[0])===Y.kSliceSEI){const s=xe(t,!1),i=parseInt(1e3*this[e(235)](),10);this[e(201)][e(156)]({ts:i,data:s[e(248)]})}}))}s[i(232)](t)}});s.readable[e(262)](i)[e(247)](s[e(260)])}[R_(246)](){const t=R_;fi()?this[t(202)]=this[t(190)].requestVideoFrameCallback(this[t(249)].bind(this)):(this[t(151)](),this[t(176)]=setInterval((()=>{const e=t;this[e(201)][e(236)].render({$video:this.$videoElement,ts:0})}),40))}_stopCanvasRender(){const t=R_;this.canvasRenderInterval&&(clearInterval(this[t(176)]),this[t(176)]=null)}videoFrameCallback(t){const e=R_;let s=arguments[e(138)]>1&&void 0!==arguments[1]?arguments[1]:{};if(this[e(201)].isDestroyedOrClosed())return void this.player[e(283)](this[e(270)],e(152));const i=parseInt(1e3*Math[e(178)](s[e(255)],this[e(190)].currentTime),10)||0;this.player[e(226)](),this[e(201)][e(236)][e(123)]({$video:this.$videoElement,ts:i}),this.player[e(121)]({dts:i}),this.supportVideoFrameCallbackHandle=this[e(190)][e(137)](this[e(249)][e(253)](this))}[R_(256)](){const t=R_;!this[t(124)]&&(this[t(201)].video[t(271)]({width:this[t(190)][t(139)],height:this[t(190)][t(167)]}),this[t(201)][t(236)][t(252)](),this[t(124)]=!0)}[R_(235)](){const t=R_;let e=0;return this[t(190)]&&(e=this.$videoElement[t(204)]),e}[R_(250)](){const t=R_;return this[t(190)]&&ci(this[t(190)].paused)&&ci(this[t(190)][t(192)])&&0!==this[t(190)][t(153)]&&0!==this[t(190)][t(213)]}[R_(242)](){const t=R_,e=this[t(190)];let s=null;if(e){const i=e[t(148)],r=i[t(138)]?i[t(195)](0):0,n=i[t(138)]?i[t(169)](i[t(138)]-1):0;s={start:r,end:n,diff:n-r}}return s}[R_(234)](){const t=R_,e=this[t(190)];let s=[];if(e){const i=e[t(148)];for(let e=0;e=0){var o=r[e(364)](r[e(366)]("?"));r=r[e(364)](0,r[e(366)]("?")),o[e(366)](e(405))>0&&((i=o.slice(o[e(366)](e(405))+e(405)[e(383)]))[e(366)]("&")>0&&(i=i.slice(0,i[e(366)]("&"))))}if(s[e(400)]===i){/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/[e(365)](s[e(400)])&&(i=e(394))}var a=e(363);t[e(366)](e(381))>0&&(a=t[e(364)](0,t[e(366)](e(381))));var h=s[e(362)];h||(a===e(382)&&0===t[e(366)](e(387)+s[e(390)]+":")&&(h=0===t[e(366)]("webrtc://"+s[e(390)]+e(373))?80:443),a===e(379)?h=80:a===e(375)?h=443:a===e(363)&&(h=1935));var c={url:t,schema:a,server:s[e(400)],port:h,vhost:i,app:r,stream:n};return M_.fill_query(s.search,c),c.port||a!==e(382)&&"rtc"!==a||("https"===c[e(393)].schema?c.port=443:0===window.location[e(385)][e(366)](e(356))?c[e(362)]=443:c[e(362)]=1985),c},fill_query:function(t,e){var s=P_;if(e.user_query={},0!==t[s(383)]){t[s(366)]("?")>=0&&(t=t[s(404)]("?")[1]);for(var i=t[s(404)]("&"),r=0;r{const r=O_,n=M_[r(293)](t);var o={api:n.apiUrl,tid:n[r(282)],streamurl:n.streamUrl,clientip:null,sdp:e};const a=new XMLHttpRequest;a.onload=function(){const t=r;if(a.readyState===a[t(295)]){if(200!==a[t(291)]&&201!==a[t(291)])return i(new Error(t(271)+n.apiUrl+" and http status is "+a[t(291)]));try{const e=JSON.parse(a[t(278)]);return e[t(280)]?i(new Error(t(271)+n[t(306)]+" and response code is "+e.code)):s(e)}catch(e){i(e[t(281)]())}}},a[r(286)]=function(t){const e=r;i(new Error(e(271)+n.apiUrl+e(299)+t))},a[r(273)](r(307),n.apiUrl,!0),a[r(292)](r(275),r(300)),a[r(269)](JSON[r(274)](o))}))}function j_(){const t=["username","no-referrer","9LKLrEe","onerror","18aXZgCO","4961060uDEgsp","cors","1383774OjLxUJ","status","setRequestHeader","prepareUrl","24FYrNLi","DONE","json","password","application/sdp"," and error is ","application/json","570280RLsCrO","80332tKaMTg","5488087lSIgLY","include","70QCqbUM","apiUrl","POST","send","no-cache","Failed to get sdp from ","text/plain;charset=utf-8","open","stringify","Content-type","follow","47070PYHCef","responseText","6048860ZmsLeq","code","toString","tid"];return(j_=function(){return t})()}!function(t,e){const s=O_,i=t();for(;;)try{if(763274===-parseInt(s(287))/1*(parseInt(s(302))/2)+parseInt(s(277))/3*(-parseInt(s(294))/4)+parseInt(s(288))/5+-parseInt(s(290))/6+parseInt(s(305))/7*(parseInt(s(301))/8)+-parseInt(s(285))/9*(-parseInt(s(279))/10)+-parseInt(s(303))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(j_);const V_=z_;function z_(t,e){const s=W_();return(z_=function(t,e){return s[t-=392]})(t,e)}!function(t,e){const s=z_,i=t();for(;;)try{if(421296===-parseInt(s(413))/1*(-parseInt(s(416))/2)+-parseInt(s(412))/3+-parseInt(s(395))/4*(parseInt(s(420))/5)+parseInt(s(394))/6+parseInt(s(423))/7*(parseInt(s(398))/8)+-parseInt(s(404))/9*(-parseInt(s(426))/10)+-parseInt(s(393))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(W_);class G_ extends x_{constructor(t){const e=z_;super(t),this.TAG_NAME=e(397),this.player[e(428)](this[e(424)],e(402))}[V_(409)](){const t=V_;super[t(409)](),this.player.debugLog(this[t(424)],t(409))}[V_(399)](t){return new Promise(((e,s)=>{const i=z_,r=this[i(401)];r[i(417)]()[i(407)]((n=>{const o=i;r[o(431)](n),this[o(422)][o(428)](this[o(424)],o(406),t);(this[o(422)][o(415)][o(403)]?N_:U_)(this[o(422)][o(415)][o(403)]?t[o(392)](window.location[o(405)],o(427)):t,n[o(408)])[o(407)]((t=>{const i=o;this[i(422)][i(428)](this[i(424)],i(396)+t[i(429)]);const n=t;if(n&&0!==n[i(429)])return this[i(422)][i(400)](this[i(424)],i(421)+n[i(429)]),s(n.msg);n?r[i(425)](new RTCSessionDescription({type:i(418),sdp:n.sdp||n}))[i(407)]((()=>{e()})).catch((t=>{const e=i;this[e(422)]&&this.player[e(400)](this[e(424)],"loadSource setRemoteDescription error",t[e(411)](),t),s(t)})):(this[i(422)][i(400)](this[i(424)],i(410)),s(i(410)))}))[o(419)]((t=>{const e=o;this[e(422)][e(400)](this[e(424)],e(414),t[e(411)](),t),s(t)}))}))[i(419)]((t=>{const e=i;this[e(422)][e(400)](this[e(424)],e(430),t[e(411)](),t),s(t)}))}))}}function W_(){const t=["answer","catch","538420tMFyMh","response json code ","player","119MkYWCE","TAG_NAME","setRemoteDescription","14590nJKTgs","webrtc:","debugLog","code","loadSource rtcPeerConnection.createOffer() error","setLocalDescription","replace","1582768GTmUcT","4622610EQYFOp","20BZJlbB","getWebRtcRemoteSdp response and code is ","WebrtcForSRSDecoder","171816QxvTiq","loadSource","debugError","rtcPeerConnection","init","webrtcForSRSBySDK","1998zhzGrw","protocol","getWebRtcRemoteSdp loadSource","then","sdp","destroy","response sdp is null","toString","1114665UGazzU","1209QGyWRV","loadSource getWebRtcRemoteSdp response error","_opt","26ZqGANn","createOffer"];return(W_=function(){return t})()}function H_(t,e){const s=Q_();return(H_=function(t,e){return s[t-=229]})(t,e)}const K_=H_;function Q_(){const t=["27eeigwn","27bZHimy","init","WebrtcForOthersDecoder","this is json sdp response","loadSource response.text() error","response sdp json code: ","debugLog","debugError","269530EkdpZd","then","539520VeujZV","188603cGMHHs","TAG_NAME","text","player","code","answer","1304022NoGKhp","setRemoteDescription","loadSource","this is raw sdp response","544408CivWYv","335725RjVoXn","sdp","setLocalDescription","createOffer","loadSource setRemoteDescription error","toString","catch","rtcPeerConnection","loadSource rtcPeerConnection.createOffer() error","getWebRtcRemoteSdp response and code is ","getWebRtcRemoteSdp loadSource","sdp is null","7UbDMjj","33092QPpdCh","parse","destroy"];return(Q_=function(){return t})()}!function(t,e){const s=H_,i=t();for(;;)try{if(173287===parseInt(s(249))/1+parseInt(s(234))/2*(-parseInt(s(238))/3)+parseInt(s(248))/4+parseInt(s(260))/5+-parseInt(s(255))/6+parseInt(s(233))/7*(parseInt(s(259))/8)+-parseInt(s(237))/9*(-parseInt(s(246))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(Q_);class Y_ extends x_{constructor(t){const e=H_;super(t),this[e(250)]=e(240),this[e(252)].debugLog(this[e(250)],e(239))}[K_(236)](){const t=K_;super[t(236)](),this.player[t(244)](this[t(250)],"destroy")}[K_(257)](t){return new Promise(((e,s)=>{const i=H_,r=this[i(267)];r[i(263)]()[i(247)]((n=>{const o=i;r[o(262)](n),this[o(252)].debugLog(this[o(250)],o(231),t),function(t,e){const s=O_;return fetch(t,{method:s(307),mode:"cors",cache:s(270),credentials:s(304),redirect:s(276),referrerPolicy:"no-referrer",headers:{"Content-Type":"application/sdp"},body:e})}(t,n[o(261)]).then((t=>{const i=o;this[i(252)][i(244)](this[i(250)],i(230)+t[i(253)]),t[i(251)]()[i(247)]((t=>{const n=i;this.player[n(244)](this[n(250)],"getWebRtcRemoteSdp response");try{let e=JSON[n(235)](t);this[n(252)][n(244)](this[n(250)],n(241)),0!=e[n(253)]&&(this[n(252)][n(245)](this[n(250)],"response json code "+e.code),s(new Error(n(243)+e[n(253)]))),t=e[n(261)]}catch(t){this[n(252)][n(244)](this[n(250)],n(258))}t?r[n(256)](new RTCSessionDescription({type:n(254),sdp:t}))[n(247)]((()=>{e()}))[n(266)]((t=>{const e=n;this[e(252)][e(245)](this[e(250)],e(264),t[e(265)](),t),s(t)})):(this[n(252)][n(245)](this[n(250)],"loadSource sdp is null"),s(n(232)))}))[i(266)]((t=>{const e=i;this[e(252)][e(245)](this.TAG_NAME,e(242),t[e(265)](),t),s(t)}))}))[o(266)]((t=>{const e=o;this.player[e(245)](this.TAG_NAME,"loadSource getWebRtcRemoteSdp response error",t[e(265)](),t),s(t)}))}))[i(266)]((t=>{const e=i;this.player[e(245)](this[e(250)],e(229),t[e(265)](),t),s(t)}))}))}}function q_(){const t=["recvonly","ontrack video","find","sdp","loadSource rtcPeerConnection.createOffer() error","webrtcClosed","answer","onsignalingstatechange[本地端的信号状态]","getWebrtcVideo","getWebRtcRemoteSdp response","track","audio","6syAWCG","onmessage","new","offer","TAG_NAME","then","close","autoplay","webrtcIceCandidateError","debugWarn","getReceivers","iceGatheringState","createOffer","webrtcDisconnect","iceConnectionState","ontrack","WebrtcForM7SDecoder","onicecandidateerror[candidate错误]","onnegotiationneeded[通信环境发生变化]","data","startStreamRateInterval","connectionState","3377040uCmVDy","webrtcOnConnectionStateChange","emitError","toFixed","video","getWebRtcRemoteSdp loadSource","onclose","onnegotiationneeded","receiver","38325550hljfzP","isDisconnected","1198145dFvExV","loadSource sdp is null","byteLength","completed","text","rtcPeerTrackAudioReceiver","streamRate","connected","streamRateInterval","toString","onopen","4QVGarm","length","kind","type","setLocalDescription","demux","onconnectionstatechange[所有ICE 状态总览]","emit","isWebrtcH264","8705007FsyJZi","908736lhhMNB","327sXATDy","214TFAIXD","webrtcStreamH265","remove","disconnected","_createEncodedStreams","kBps","rtcPeerConnection","debugLog","srcObject","ondatachannel and player is destroyed","checking","_startBandwidthEstimateInterval","channel","_initRtcPeerConnection","onicecandidateerror","destroy","closed","ontrack audio","debugError","player","ondatachannel and onclose","webrtcFailed","init","8760794zCARPx","catch","signalChannel,onmessage","rtcPeerConnectionDataChannel","connecting","isWebrtcH265","onicecandidate","candidate","ondatachannel is H265 but decode is h264 so emit webrtcStreamH265 ","webrtcOnIceConnectionStateChange","stopStreamRateInterval","ondatachannel","oniceconnectionstatechange","onicegatheringstatechange"];return(q_=function(){return t})()}const J_=X_;function X_(t,e){const s=q_();return(X_=function(t,e){return s[t-=183]})(t,e)}!function(t,e){const s=X_,i=t();for(;;)try{if(649136===-parseInt(s(215))/1*(-parseInt(s(216))/2)+-parseInt(s(287))/3+parseInt(s(204))/4*(parseInt(s(193))/5)+parseInt(s(265))/6*(-parseInt(s(239))/7)+-parseInt(s(214))/8+-parseInt(s(213))/9+parseInt(s(191))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(q_);class Z_ extends x_{constructor(t){const e=X_;super(t),this[e(242)]=null,this.player.isWebrtcH265()&&(this[e(199)]=He((s=>{const i=e;t[i(211)](M[i(221)],(s/1024)[i(185)](2))}))),this[e(269)]=e(281),this[e(235)][e(223)](this[e(269)],e(238))}[J_(231)](){const t=J_;super[t(231)](),this.stopStreamRateInterval(),this[t(242)]&&(this[t(242)][t(203)]=Fe,this[t(242)][t(188)]=Fe,this[t(242)][t(266)]=Fe,this[t(242)][t(271)](),this[t(242)]=null),this[t(235)][t(223)](this[t(269)],"destroy")}[J_(229)](){const t=J_,e=new RTCPeerConnection,s=this[t(235)],i=e.addTransceiver(t(186),{direction:t(253)});e.addTransceiver("audio",{direction:t(253)}),s[t(212)]()&&this[t(235)]._opt.isEmitSEI&&this[t(220)](i[t(190)]),e.onsignalingstatechange=e=>{const s=t;this[s(235)][s(223)](this[s(269)],s(260),e)},e[t(252)]=s=>{const i=t;this.player[i(223)](this[i(269)],"onicegatheringstatechange[ICE收集状态]",s,e[i(276)])},e[t(189)]=e=>{const s=t;this[s(235)][s(223)](this[s(269)],s(283),e)},e.oniceconnectionstatechange=i=>{const r=t;this.player[r(223)](this[r(269)],r(251),e.iceConnectionState);const n=e[r(279)];switch(this[r(235)][r(211)](M[r(248)],n),this[r(192)]=n===r(219),e[r(279)]){case r(267):case r(226):case r(232):break;case"failed":s[r(211)](M[r(237)]);break;case"disconnected":s[r(211)](M[r(278)]);break;case r(200):case r(196):break;case r(232):s.emit(M[r(258)])}},e[t(245)]=e=>{const s=t;this[s(235)][s(223)](this[s(269)],s(245),e),e[s(246)]&&this[s(235)][s(223)](this[s(269)],"Remote ICE candidate: ",e[s(246)].candidate)},e[t(280)]=i=>{const r=t;this[r(235)].debugLog(this[r(269)],r(280),i);const n=s[r(261)]();if(s[r(212)]())if(i.track[r(206)]===r(186)){this[r(235)].debugLog(this[r(269)],r(254)),this.rtcPeerTrackVideoReceiver=e.getReceivers()[r(255)]((function(t){const e=r;return t[e(263)]===i[e(263)]})),this.rtcPeerTrackVideoReceiver&&this[r(227)]();let t=i.streams[0];n[r(272)]=!0,n[r(224)]=t,this.videoStream=t}else i[r(263)][r(206)]===r(264)&&(this[r(235)][r(223)](this[r(269)],r(233)),this[r(198)]=e[r(275)]()[r(255)]((function(t){const e=r;return t[e(263)]===i[e(263)]})),this.rtcPeerTrackAudioReceiver&&this[r(227)]())},e[t(230)]=e=>{const s=t;this[s(235)][s(223)](this[s(269)],s(282),e),this[s(235)][s(184)](U[s(273)],e)},e.onconnectionstatechange=i=>{const r=t;switch(this[r(235)][r(223)](this.TAG_NAME,r(210),i),this[r(235)][r(211)](M[r(183)],e[r(286)]),e[r(286)]){case r(267):case r(243):case r(200):case r(219):break;case"failed":this[r(192)]&&s[r(211)](M[r(237)])}},e[t(250)]=e=>{const s=t,i=e[s(228)];this[s(235)][s(223)](this[s(269)],s(250)),i[s(203)]=()=>{const t=s;this[t(235)][t(223)](this[t(269)],"ondatachannel and onopen")},i[s(266)]=t=>{const e=s,i=t[e(284)];if(this[e(235)][e(212)]())return this[e(235)].debugWarn(this[e(269)],e(247)),void this[e(235)].emit(M[e(217)]);this.player.isDestroyedOrClosed()?this[e(235)][e(274)](this[e(269)],e(225)):(this[e(199)]&&this[e(199)](i[e(195)]),this.player.demux&&this.player[e(209)].dispatch(i))},i[s(188)]=()=>{const t=s;this[t(235)][t(274)](this[t(269)],t(236))},this[s(242)]=i};e.createDataChannel("signal")[t(266)]=e=>{const s=t;this[s(235)][s(223)](this[s(269)],s(241),e);switch(JSON.parse(e[s(284)])[s(207)]){case s(268):case s(259):case s(246):case s(218):}},this[t(222)]=e}startStreamRateInterval(){const t=J_;this[t(249)](),this[t(201)]=setInterval((()=>{const e=t;this.streamRate&&this[e(199)](0)}),1e3)}stopStreamRateInterval(){const t=J_;this[t(201)]&&(clearInterval(this[t(201)]),this[t(201)]=null)}loadSource(t){const e=J_;let s=arguments[e(205)]>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,r)=>{const n=e,o=this[n(222)];o[n(277)]()[n(270)]((e=>{const a=n;o[a(208)](e),this[a(235)][a(223)](this[a(269)],a(187),t),function(t,e,s){const i=O_;let r={"Content-Type":i(298)};return s[i(283)]&&s[i(297)]&&(r.Authorization="Basic "+btoa(s.username+":"+s[i(297)])),fetch(t,{method:i(307),mode:i(289),cache:"no-cache",credentials:i(304),redirect:i(276),referrerPolicy:i(284),headers:r,body:e})}(t,e[a(256)],s)[a(270)]((t=>{const e=a;t[e(197)]()[e(270)]((t=>{const s=e;this[s(235)].debugLog(this.TAG_NAME,s(262)),t?o.setRemoteDescription(new RTCSessionDescription({type:s(259),sdp:t}))[s(270)]((()=>{const t=s;this.player[t(244)]()&&this[t(285)](),i()})).catch((t=>{const e=s;this[e(235)].debugError(this[e(269)],"loadSource setRemoteDescription error",t[e(202)](),t),r(t)})):(this.player[s(234)](this[s(269)],s(194)),r("sdp is null"))})).catch((t=>{const s=e;this.player.debugError(this[s(269)],"loadSource response.text() error",t.toString(),t),r(t)}))}))[a(240)]((t=>{const e=a;this.player[e(234)](this[e(269)],"loadSource getWebRtcRemoteSdp response error",t[e(202)](),t),r(t)}))}))[n(240)]((t=>{const e=n;this[e(235)][e(234)](this[e(269)],e(257),t[e(202)](),t),r(t)}))}))}}const $_=tC;function tC(t,e){const s=eC();return(tC=function(t,e){return s[t-=257]})(t,e)}function eC(){const t=["createOffer","setLocalDescription","loadSource","878592tfhcus","loadSource getWebRtcRemoteSdp response error","1780ieHwqu","17901qWIuQz","getWebRtcRemoteSdp response and code is ","54QQGqsG","debugLog","108235QFjBMP","then","sdp","code","destroy","TAG_NAME","getWebRtcRemoteSdp loadSource","4wPRCrb","player","sdp is null","init","catch","8ZhGSoH","5034hkYVqF","response json code ","toString","275948sSOWlS","msg","answer","2019199ZHnBwY","WebrtcForZLMDecoder","debugError","489444UfmrnE"];return(eC=function(){return t})()}!function(t,e){const s=tC,i=t();for(;;)try{if(200676===-parseInt(s(285))/1+-parseInt(s(288))/2+-parseInt(s(261))/3*(-parseInt(s(279))/4)+-parseInt(s(272))/5*(-parseInt(s(270))/6)+-parseInt(s(258))/7*(parseInt(s(284))/8)+-parseInt(s(268))/9*(-parseInt(s(267))/10)+-parseInt(s(265))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(eC);class sC extends x_{constructor(t){const e=tC;super(t),this[e(277)]=e(259),this[e(280)][e(271)](this[e(277)],e(282))}[$_(276)](){const t=$_;super[t(276)](),this[t(280)].debugLog(this[t(277)],t(276))}[$_(264)](t){return new Promise(((e,s)=>{const i=tC,r=this.rtcPeerConnection;r[i(262)]().then((n=>{const o=i;r[o(263)](n),this[o(280)][o(271)](this.TAG_NAME,o(278),t),function(t,e){const s=O_;return il({url:t,type:"POST",data:e,contentType:s(272),processData:!1,dataType:s(296)})}(t,n[o(274)])[o(273)]((t=>{const i=o;this[i(280)].debugLog(this.TAG_NAME,i(269)+t[i(275)]);const n=t;if(n&&0!==n.code)return this[i(280)][i(260)](this[i(277)],i(286)+n[i(275)]),s(n[i(289)]);n&&n[i(274)]?r.setRemoteDescription(new RTCSessionDescription({type:i(257),sdp:n[i(274)]}))[i(273)]((()=>{e()})).catch((t=>{const e=i;this[e(280)][e(260)](this[e(277)],"loadSource setRemoteDescription error",t[e(287)](),t),s(t)})):(this[i(280)][i(260)](this[i(277)],"response sdp is null"),s(i(281)))}))[o(283)]((t=>{const e=o;this[e(280)].debugError(this[e(277)],e(266),t[e(287)](),t),s(t)}))})).catch((t=>{const e=i;this[e(280)].debugError(this[e(277)],"loadSource rtcPeerConnection.createOffer() error",t[e(287)](),t),s(t)}))}))}}const iC=nC;function rC(){const t=["readyState","20pZkkiT","data","start","audio","$videoElement","TAG_NAME","774ZrWXRY","219NPdFEV","onPlayEvent and playing - > waiting","playing","canplay","video","isSupport","emitError","errorCode"," and message: ","event","AliyunRtc is not defined","8138550ufTbbI","getVideoBufferRangeList","isVideoPlaying","bytesReceivedPerSecond","push","onPlayEvent and waiting -> playing","emit","aliyunRtcRemoteStream","end","subscribe","aliyunRtcError","25DOHdEO","loadSource","debugError","off","3479847bAWcIz","listenEvents","then","floor","destroy","WAITING","unsubscribe","kBps","catch","1108916EYzqjH","1170630aBRlhu","init","updateStats","message","aliyunRtc","PLAYING","AliRTS","debugLog","media","onError and code is ","paused","createClient","256aQPoGb","playbackRate","getVideoCurrentTime","vbps","MEDIA","AliyunRtc","24325774SQsKeo","getVideoBufferTimeRange","toFixed","203598XIccrb","player","play","onPlayEvent and canplay","length"];return(rC=function(){return t})()}function nC(t,e){const s=rC();return(nC=function(t,e){return s[t-=143]})(t,e)}!function(t,e){const s=nC,i=t();for(;;)try{if(739608===parseInt(s(164))/1+parseInt(s(197))/2*(parseInt(s(198))/3)+-parseInt(s(163))/4*(-parseInt(s(150))/5)+parseInt(s(209))/6+parseInt(s(154))/7+parseInt(s(176))/8*(parseInt(s(185))/9)+-parseInt(s(191))/10*(parseInt(s(182))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(rC);class oC extends Bi{constructor(t){const e=nC;if(super(),this.TAG_NAME=e(181),this[e(186)]=t,!window[e(170)])throw new Error(e(208));this.aliyunRtc=window[e(170)][e(175)](),this.aliyunRtcRemoteStream=null,this[e(195)]=this.player[e(202)][e(195)],this.listenEvents(),this[e(186)][e(171)](this[e(196)],e(165))}[iC(158)](){const t=iC;this[t(168)]&&(this[t(146)]&&(this[t(146)]=null),this[t(168)][t(160)](),this[t(168)]=null),this.$videoElement=null,this[t(153)](),this[t(186)].debugLog(this[t(196)],t(158))}[iC(155)](){const t=iC;this[t(168)].on("onError",(e=>{const s=t;this[s(186)][s(171)](this[s(196)],"onError and code is "+e.errorCode+" and message: "+e[s(167)]),10400!==e[s(205)]&&(this[s(186)][s(152)](this.TAG_NAME,s(173)+e.errorCode+s(206)+e[s(167)]),this[s(186)][s(204)](U[s(149)],e))})),this[t(168)].on("reconnect",(e=>{const s=t;this.player[s(171)](this[s(196)],"reconnect",e)}));const e={CANPLAY:t(201),WAITING:"waiting",PLAYING:t(200),MEDIA:t(172)};this[t(168)].on("onPlayEvent",(s=>{const i=t;if(s[i(207)]===e.CANPLAY)this[i(186)][i(171)](this[i(196)],i(188));else if(s[i(207)]===e[i(159)])this.player[i(171)](this[i(196)],i(199));else if(s[i(207)]===e[i(169)])this[i(186)][i(171)](this[i(196)],i(144));else if(s[i(207)]===e[i(180)]){const t=s[i(192)];let e={},r=0;if(t[i(194)]){const s=Math[i(157)](t[i(194)][i(212)]);r+=s,e.abps=s}if(t.video){const s=Math[i(157)](t[i(202)].bytesReceivedPerSecond);r+=s,e[i(179)]=s}this.player[i(166)](e),this[i(186)][i(145)](M[i(161)],(r/1024)[i(184)](2))}}))}[iC(151)](t){return new Promise(((e,s)=>{const i=nC;this[i(168)][i(203)]({isReceiveVideo:!0})[i(156)]((()=>{const r=i;this[r(168)][r(148)](t,{})[r(156)]((t=>{const s=r;this[s(146)]=t,t[s(187)](this.$videoElement),e()})).catch((t=>{const e=r;this.player.debugError(this[e(196)],"loadSource and subscribe is not success: ",t[e(167)]),s(t[e(167)])}))}))[i(162)]((t=>{const e=i;this[e(186)][e(152)](this[e(196)],"loadSource and is not support: ",t[e(167)]),s(t.message)}))}))}[iC(178)](){let t=0;return this[iC(195)]&&(t=this.$videoElement.currentTime),t}[iC(211)](){const t=iC;return this[t(195)]&&ci(this.$videoElement[t(174)])&&ci(this.$videoElement.ended)&&0!==this[t(195)][t(177)]&&0!==this[t(195)][t(190)]}[iC(183)](){const t=iC,e=this.$videoElement;let s=null;if(e){const i=e.buffered,r=i[t(189)]?i[t(193)](0):0,n=i[t(189)]?i.end(i.length-1):0;s={start:r,end:n,diff:n-r}}return s}[iC(210)](){const t=iC,e=this[t(195)];let s=[];if(e){const i=e.buffered;for(let e=0;e{const s=t,i=(e||[])[s(239)]((t=>{const e=s;return t[e(231)]===e(247)}));if(i){switch(this[s(259)]=i,i[s(257)]){case s(244):this[s(252)]=0;break;case s(264):this[s(252)]=1;break;case s(253):this[s(252)]=2;break;case"critical":this[s(252)]=3;break;default:this[s(252)]=-1}this[s(233)][s(256)](M.pressureObserverCpu,this[s(252)])}})),this.observer&&this.observer.observe(t(247),{sampleInterval:1e3})[t(265)]((()=>{const e=t;this.observeCpuSuccess=!0,this[e(233)][e(249)](this.TAG_NAME,e(246))}))[t(260)]((()=>{const e=t;this[e(243)]=!1,this[e(233)][e(249)](this[e(262)],e(232))})))}}function dC(t,e){const s=pC();return(dC=function(t,e){return s[t-=377]})(t,e)}const uC=dC;function pC(){const t=["resumeAnimation","4xQhkEk","DynamicWatermark","208974Oebbqa","shadowRootDynamicDom","ghostConfig","isGhost","destroy","isStopAnimation","66710wyPYOR","12049362vYutgE","player","%20%E4%BD%93%E9%AA%8C","content","pauseAnimation","waterMarkWillRemove","rafID","startAnimation","width","stopAnimation","min","7keGGxs","isDynamic","fontSize","isPauseAnimation","12EpHNCb","opacity","126mjiUrz","1317590CYLuyd","1458633pKuocA","height","_addDom","update","9oCiIMU","shadowRootInnerDom","10108NZdTdG","GhostWatermark","TAG_NAME","random","speed","appendChild","startAndResize","187rilgaq","color","waterMarkWillAdd","black","contains","int","length","off","style","top","start","left","4035728CoDwzw","options"];return(pC=function(){return t})()}!function(t,e){const s=dC,i=t();for(;;)try{if(387097===parseInt(s(426))/1*(-parseInt(s(378))/2)+parseInt(s(428))/3*(parseInt(s(400))/4)+parseInt(s(427))/5+parseInt(s(402))/6*(-parseInt(s(420))/7)+parseInt(s(397))/8*(-parseInt(s(432))/9)+parseInt(s(408))/10*(-parseInt(s(385))/11)+-parseInt(s(424))/12*(-parseInt(s(409))/13))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(pC);class fC extends Wr{constructor(t){const e=dC;let s=arguments[e(391)]>1&&void 0!==arguments[1]?arguments[1]:{};super(t),this[e(380)]=e(401),this[e(423)]=!1,this[e(407)]=!1,this.rafID=null,this[e(398)]=s,this[e(382)]=s[e(382)]||.2,this[e(421)]=!0,this.shadowRootDynamicDom=null,this[e(405)]=!0===s[e(405)],this[e(405)]&&(this[e(380)]=e(379)),this[e(404)]={on:s.on||5,off:s.off||5},this[e(414)]=!1,this[e(387)]=!1,this.player.once(M[e(395)],this.start.bind(this)),this[e(410)].debugLog(this.TAG_NAME,e(390))}[uC(406)](){const t=uC;super[t(406)](),this.shadowRootDynamicDom=null,this.stopAnimation(),this[t(415)]&&(cancelAnimationFrame(this[t(415)]),this.rafID=null)}[uC(395)](){const t=uC;let e;Si()?e=decodeURIComponent(b+t(411)):vi()&&(e=this[t(398)][t(412)]);let s=this[t(410)].getVideoInfo();!s&&(s={width:200,height:200}),e&&(this[t(431)]({text:{content:e,fontSize:this[t(398)][t(422)]||18,color:this[t(398)][t(386)]||t(388)},left:s.width*Math[t(381)](),top:s[t(429)]*Math[t(381)](),opacity:this.options[t(425)]||.15}),this[t(416)]())}[uC(384)](){this[uC(395)](),this.resize()}[uC(416)](){const t=uC;if(!this.rafID){let e=1,s=1,i=Math[t(381)](),r={width:0,height:0};const n=()=>{const o=t;try{if(ci(this.isPauseAnimation)&&this[o(403)]&&this[o(377)]){const t=this[o(377)],a=this[o(403)],h=t.getBoundingClientRect(),c=a.getBoundingClientRect();if(c[o(417)]&&c[o(429)]&&(r[o(417)]=c[o(417)],r[o(429)]=c[o(429)]),!this[o(377)][o(389)](this[o(403)]))return this[o(405)]?ci(this[o(387)])&&(this[o(387)]=!0,setTimeout((()=>{this[o(430)](h,r),this.waterMarkWillAdd=!1}),1e3*this[o(404)][o(392)])):this[o(430)](h,r),void(0!==this.speed&&requestAnimationFrame(n));const l=Math.min(1,0===this.speed?0:this[o(382)]?this[o(382)]:.2);let d=c[o(396)]-h.left,u=c[o(394)]-h[o(394)];d+=l*s*i,u+=l*e*(1-i),d+r[o(417)]>h.width?(s=-1,i=Math[o(381)]()):d<0&&(s=1,i=Math[o(381)]()),u+r[o(429)]>h[o(429)]?(e=-1,i=Math[o(381)]()):u<0&&(e=1,i=Math[o(381)]()),d=Math[o(419)](h.width-r[o(417)],d),u=Math[o(419)](h[o(429)]-r[o(429)],u);const p=d/h[o(417)]*100,f=u/h[o(429)]*100;this[o(403)][o(393)].left=p+"%",this[o(403)][o(393)][o(394)]=f+"%",ci(this[o(414)])&&this[o(405)]&&(this[o(414)]=!0,setTimeout((()=>{const t=o;this._removeDom(),this[t(414)]=!1}),1e3*this[o(404)].on))}}catch(t){}if(this.isStopAnimation)return this.isStopAnimation=!1,cancelAnimationFrame(this.rafID),void(this[o(415)]=null);0!==this[o(382)]&&requestAnimationFrame(n)};this[t(415)]=requestAnimationFrame(n)}}[uC(430)](t,e){const s=uC;if(this[s(377)]&&this[s(403)]){this[s(377)][s(383)](this.shadowRootDynamicDom);let i=t[s(417)]*Math.random(),r=t[s(429)]*Math[s(381)]();i=Math[s(419)](t.width-2*e[s(417)],i),r=Math[s(419)](t[s(429)]-2*e[s(429)],r),this[s(403)][s(393)][s(396)]=i+"px",this[s(403)][s(393)][s(394)]=r+"px"}}[uC(399)](){this[uC(423)]=!1}[uC(413)](){this[uC(423)]=!0}[uC(418)](){this[uC(407)]=!0}}const mC=AC;function gC(){const t=["style","$element","classList","mousedown","drawingRectLineWidth","jb-pro-drawing-rect-box-canvas-container","497GuGEDr","getControlHeight","height","offsetLeft","_resetPoint","_removeRectCanvasContainer","getRenderType","appendChild","split","drawingRect","37180QkAGQX","drawingRectEndRemoveDom","destroy","getShowVideoRect","373248HkBGko","offsetY","debugLog","default","getVideoInfo","$container","handleMouseDown","createElement","_opt","maxY","emit","1570VxVtSL","maxX","px solid ","pageX","floor","5185251htAaja","minX","endPoint","forEach","getDrawingMinLeftTop",".jb-pro-drawing-rect-box","_addRectCanvasContainer","isFullResize","abs","bindEvents","24GAlrSv","preventDefault","minY","2124844zFPgPR","startPoint","pageY","$rectBox","startPagePoint","64155shSjqp","add","jb-pro-drawing-rect-box","offsetX","drawingRectangle","min","_removeRectBox","querySelector","stopPropagation","12114vYSfhc","push","max","100%","removeChild","isDragging","1114xuaXES","player","mousemove","absolute","TAG_NAME","isResize","bind","aspectRatio","position","handleMouseUp","2530VmZXFw","offsetTop","top","_unbindEvents","handleMouseMove","zIndex","_handleDrawingRect","width","_bindEvents","map"];return(gC=function(){return t})()}function AC(t,e){const s=gC();return(AC=function(t,e){return s[t-=106]})(t,e)}!function(t,e){const s=AC,i=t();for(;;)try{if(561664===-parseInt(s(116))/1*(-parseInt(s(179))/2)+-parseInt(s(130))/3+-parseInt(s(159))/4+-parseInt(s(141))/5*(-parseInt(s(173))/6)+parseInt(s(164))/7*(parseInt(s(156))/8)+-parseInt(s(146))/9+parseInt(s(189))/10*(parseInt(s(126))/11))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(gC);class yC extends Bi{constructor(t){const e=AC;super(),this[e(180)]=t,this[e(183)]="DrawRectangle",this.drawingRectangle=!1,this[e(178)]=!1,this.bindEvents=[],this[e(162)]=null,this[e(120)](),this[e(111)]=null,this[e(180)].on(M[e(125)],this[e(106)][e(185)](this)),this.player[e(132)](this[e(183)],"init")}[mC(128)](){const t=mC;this[t(192)](),this.drawingRectangle=!1,this[t(178)]=!1,this[t(170)](),this.off(),this[t(180)][t(132)](this[t(183)],"destroy")}[mC(120)](){const t=mC;this[t(163)]={x:0,y:0},this[t(160)]={x:0,y:0},this[t(148)]={x:0,y:0}}_handleDrawingRect(t){const e=mC;this[e(168)]=t,t?this[e(108)]():(this[e(192)](),this[e(170)]())}[mC(108)](){const t=mC,{events:{proxy:e}}=this.player,s=e(this.player.$container,t(181),this[t(193)][t(185)](this)),i=e(this[t(180)][t(135)],t(113),this[t(136)][t(185)](this)),r=e(window,"mouseup",this[t(188)].bind(this));this._addRectCanvasContainer(),this[t(155)][t(174)](s,i,r)}_unbindEvents(){const t=mC;this[t(121)](),this[t(155)][t(149)]((t=>{t&&t()})),this[t(155)]=[]}[mC(152)](){const t=mC;this.player[t(122)]()===f.canvas&&(this[t(111)]=document[t(137)]("div"),this[t(111)][t(110)][t(187)]=t(182),this[t(111)][t(112)][t(165)](t(115)),this.$element[t(110)].width="100%",this[t(111)][t(110)][t(118)]=t(176),this.$element.style[t(194)]=1,this[t(180)][t(135)][t(123)](this[t(111)]))}[mC(121)](){const t=mC;if(this.$element){if(!Ln(this[t(111)])){const e=this[t(180)][t(135)][t(171)](".jb-pro-drawing-rect-box-canvas-container");e&&this.player[t(135)]&&this[t(180)][t(135)][t(177)](e)}this[t(111)]=null}}_removeRectBox(){const t=mC;if(this[t(162)]){if(!Ln(this[t(162)])){const e=this[t(180)][t(135)].querySelector(t(151));e&&this[t(180)][t(135)]&&this[t(180)][t(135)][t(177)](e)}this[t(162)]=null}}[mC(136)](t){const e=mC;if(t[e(172)](),!this[e(168)])return;this._removeRectBox();const s=t[e(167)],i=t[e(131)];this[e(160)].x=s,this[e(160)].y=i,this[e(163)].x=t[e(144)]-this[e(180)][e(135)][e(119)],this[e(163)].y=t[e(161)]-this[e(180)][e(135)][e(190)],this.$rectBox=document[e(137)]("div"),this.$rectBox[e(112)][e(165)](e(166)),this[e(162)][e(110)].border=this[e(180)][e(138)].drawingRectLineWidth+e(143)+this[e(180)][e(138)].drawingRectColor,this[e(162)][e(110)].position="absolute",this[e(162)][e(110)].left=this[e(160)].x+"px",this[e(162)][e(110)][e(191)]=this[e(160)].y+"px",this[e(180)][e(135)][e(123)](this[e(162)]),this.isDragging=!0}[mC(193)](t){const e=mC;if(t[e(172)](),!this[e(178)])return;if(!this[e(168)])return;if(!this[e(162)])return;const s=this[e(180)][e(135)],i=this[e(180)][e(117)](),r=t[e(144)]-s.offsetLeft,n=t[e(161)]-s[e(190)];if(rh&&(o=h,this[e(148)].x=this[e(160)].x+o),a>c&&(a=c,this[e(148)].y=this.startPoint.y+a),this.$rectBox[e(110)][e(107)]=o+"px",this[e(162)][e(110)].height=a+"px"}[mC(188)](t){const e=mC;if(t[e(172)](),this[e(168)]&&this[e(178)]){t[e(157)](),this[e(178)]=!1;const s=this.endPoint.x-this[e(160)].x>0,i=this[e(148)].y-this[e(160)].y>0,r=!s||!i;if((this[e(180)][e(138)][e(127)]||r)&&this[e(170)](),r)return;const n={startPoint:this[e(160)],endPoint:this.endPoint,width:Math.abs(this[e(148)].x-this[e(160)].x),height:Math[e(154)](this[e(148)].y-this[e(160)].y)},o={},a=this[e(180)].getVideoInfo();if(a[e(107)]&&a[e(118)])if(this[e(180)][e(138)][e(186)]===e(133)){const t=this[e(180)].getShowVideoRect();let s=t[e(107)],i=t.height,r=a[e(107)],h=a[e(118)],c=s/r,l=i/h;const d=this.player[e(138)][e(184)],u=this.player[e(138)][e(153)];let p=0,f=0;if(d&&(c>l?(c=l,p=Math[e(145)]((s-r*c)/2)):(l=c,f=Math[e(145)]((i-h*l)/2))),u){let t=c>l?c:l;c=t,l=t}const m=h,g=r;o[e(160)]={x:Math[e(175)](0,Math.min(Math.floor((n[e(160)].x-p)/c),g)),y:Math[e(175)](0,Math[e(169)](Math[e(145)]((n.startPoint.y-f)/l),m))},o[e(148)]={x:Math[e(175)](0,Math[e(169)](Math.floor((n[e(148)].x-p)/c),g)),y:Math[e(175)](0,Math[e(169)](Math.floor((n[e(148)].y-f)/l),m))},o.width=o[e(148)].x-o[e(160)].x,o[e(118)]=o[e(148)].y-o[e(160)].y}else{const t=this[e(180)][e(138)].aspectRatio[e(124)](":")[e(109)](Number),s=this[e(180)][e(129)]();let i=s[e(107)],r=s[e(118)];const h=a[e(107)]/a[e(118)],c=t[0]/t[1];let l=0,d=0,u=0,p=0,f=a[e(107)],m=a[e(118)];if(h>c){l=i*(c*a[e(118)]/a[e(107)]),d=r,u=(i-l)/2}else{const t=a[e(107)]/c/a[e(118)];l=i,d=r*t,p=(r-d)/2}o[e(160)]={x:Math.max(0,Math[e(169)](Math[e(145)]((n.startPoint.x-u)/(l/a[e(107)])),f)),y:Math[e(175)](0,Math[e(169)](Math[e(145)]((n[e(160)].y-p)/(d/a[e(118)])),m))},o[e(148)]={x:Math.max(0,Math[e(169)](Math.floor((n[e(148)].x-u)/(l/a[e(107)])),f)),y:Math[e(175)](0,Math[e(169)](Math[e(145)]((n[e(148)].y-p)/(d/a.height)),m))},o[e(107)]=o.endPoint.x-o.startPoint.x,o.height=o[e(148)].y-o[e(160)].y}this[e(180)][e(140)](M.drawingRectInfo,{container:n,video:o}),this[e(120)]()}}[mC(150)](){const t=mC,e=this.player.getShowVideoRect(),s=this[t(180)][t(134)]();let i=e[t(107)],r=e[t(118)],n={minX:0,minY:0,maxX:i,maxY:r};if(this[t(180)]._opt[t(186)]===t(133)){const e=this[t(180)][t(138)].isResize;let o=s[t(107)],a=s[t(118)],h=i/o,c=r/a;e&&(h>c?(n[t(147)]=Math[t(145)]((i-o*h)/2),n[t(142)]=Math.floor(n[t(147)]+o*h)):(n[t(158)]=Math[t(145)]((r-a*c)/2),n[t(139)]=Math[t(145)](n[t(158)]+a*c)))}else{const e=this[t(180)]._opt[t(186)][t(124)](":")[t(109)](Number),o=s[t(107)]/s[t(118)],a=e[0]/e[1];let h=0,c=0;if(o>a){h=i*(a*s.height/s.width),n.minX=Math[t(145)]((i-h)/2),n.maxX=Math[t(145)](n.minX+h)}else{c=r*(s[t(107)]/a/s[t(118)]),n[t(158)]=(r-c)/2,n.minY=Math[t(145)](n.minX+c)}}return n}}const bC=vC;function vC(t,e){const s=SC();return(vC=function(t,e){return s[t-=277]})(t,e)}function SC(){const t=["setPlayingTimestamp","_seekingTimestamp","log","classList","setStartTime","resume","pause","setRate","setPlayingTimestamp()","checkIsEnded","jessibuca-container-play-vod","rate","isEnded()","playVodFps","start","30gbEiwo","_fps","audio","clearUpAllSourceBuffer","length","isPlaying","_renderFps","269478zfDXEB","_totalDuration","off","updateStats and videoCurrentTimeDiff is 0 and\n videoCurrentTime is ","712cNhLVM","_startTime"," > this.totalDuration ","timestamp ","_playingTimestamp","updateDuration() success and startTime is ","playVodStats","totalDuration","8MZEQIa","isEnded","videoCurrentTimeDiff","_opt","debugWarn","_rate","player","_playbackTs","482784AOAJAE","isPlayVodUseMSE","updateStats","playVodPause","videoCurrentTime","video","TAG_NAME","remove","\n and next update video currentTime","jb-pro-container-play-vod","removeSeekingTimestamp","$container","isRateMoreThanMaxRate","playingTimestamp","_startfpsTime","add","setCurrentTime","time","PlayVod","lessThanCurrentTimeTimeout","_isEndedOnce","seek()","stringify","destroy","init","emit","482QhsFWI","playVodForwardMaxRateDecodeIFrame","_isEnded","playVodSeek","seek","isSeekingLessThanCurrentTime","startCheckStatsInterval","uiUsePlaybackPause","round","debug","abs","_prevTs","playVodEndedAndReplay","_isLessThanCurrentTime","isSeeking","mseDecoder","_removeSeekingTimestamp","clearStatsInterval","_listen","451713xiSzFd","stats","startTime","1695474wKPkWw","_startFpsTimestamp","seekingTimestamp","fps","10eWPaWI","getCurrentTime","6209731yaqEdi","_checkStatsInterval","1846411wFDaiU"];return(SC=function(){return t})()}!function(t,e){const s=vC,i=t();for(;;)try{if(180532===parseInt(s(373))/1*(parseInt(s(316))/2)+parseInt(s(335))/3*(-parseInt(s(282))/4)+parseInt(s(362))/5*(-parseInt(s(369))/6)+parseInt(s(346))/7+-parseInt(s(290))/8+-parseInt(s(338))/9*(parseInt(s(342))/10)+parseInt(s(344))/11)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(SC);class wC extends Bi{constructor(t,e){const s=vC;super(),this[s(288)]=t,this.TAG_NAME=s(308),this[s(288)][s(301)][s(350)][s(305)](s(299)),this[s(374)]=null,this._playingTimestamp=null,this[s(363)]=parseInt(e[s(341)],10)||t[s(285)][s(360)],this[s(287)]=1,this._startfpsTime=null,this[s(339)]=null,this[s(345)]=null,this[s(289)]=0,this[s(368)]=0,this[s(348)]=null,this[s(329)]=!1,this[s(318)]=!1,this._isEndedOnce=!1,this[s(309)]=null,this[s(334)](),this._totalDuration=0;let i=e[s(337)]||0;this[s(351)](i),this.player.on(M[s(293)],(t=>{const e=s;t?this.pause():this[e(352)]()}));const r={fps:this[s(363)],uiUsePlaybackPause:e[s(323)],showControl:e.showControl};t.debug[s(349)](this[s(296)],s(314),JSON[s(312)](r))}[bC(313)](){const t=bC;this.clearLessThanCurrentTimeTimeout(),this._startTime=null,this[t(278)]=null,this[t(370)]=0,this[t(363)]=null,this[t(287)]=1,this._startfpsTime=null,this[t(339)]=null,this._renderFps=0,this[t(289)]=0,this[t(327)]=0,this[t(310)]=!1,this[t(318)]=!1,this.clearStatsInterval(),this[t(288)][t(301)]&&this[t(288)][t(301)].classList[t(297)](t(357)),this[t(371)](),this.player[t(325)].log(this[t(296)],t(313))}[bC(334)](){const t=bC;this.player.on(M[t(336)],(e=>{const s=t;if(this.player[s(293)])return;let i=e.ts;this[s(288)][s(291)]()&&(this[s(288)][s(367)]()&&0===e[s(284)]&&this.player[s(286)](this.TAG_NAME,s(372)+e[s(294)]+s(298)),i=1e3*e[s(294)]),this[s(347)](i);const r=this._prevTs;this[s(327)]=i,this[s(356)](r)}))}[bC(356)](t){const e=bC;let s=this[e(283)]();ci(s)&&this[e(327)],s&&(this._isEnded=!0,this._removeSeekingTimestamp(),this.player[e(315)](M.playVodEnded))}[bC(283)](){const t=bC;let e=!1;if(this[t(318)])return!0;this.player[t(291)]()&&this.player.video&&this[t(288)][t(295)][t(283)]()&&(e=!0);const s=Math[t(326)](this.playingTimestamp-this[t(370)]);return s<700&&(this[t(310)]&&(this[t(288)][t(325)][t(349)](this.TAG_NAME,t(359),"diff playingTimestamp is "+this[t(303)]+" and totalDuration is "+this[t(370)]+" "+s+" < 700"),e=!0),!this[t(310)]&&(this[t(310)]=!0)),e}updateDuration(t){const e=bC;this[e(370)]=1e3*t,this[e(337)]&&(this[e(288)].debugLog(this[e(296)],e(279)+this[e(337)]+" and listen start event to seek"),this[e(288)].once(M[e(361)],(()=>{const t=e;this.seek({time:this[t(337)]})})))}[bC(353)](){this[bC(333)]()}[bC(352)](){this[bC(322)]()}[bC(292)](){const t=bC;let e=arguments[t(366)]>0&&void 0!==arguments[0]?arguments[0]:{};!this._startFpsTimestamp&&(this[t(339)]=je()),vs(e.ts)&&(this[t(288)][t(292)]({fps:!0,ts:e.ts}),this[t(289)]=e.ts,!this[t(304)]&&(this[t(304)]=e.ts),this._renderFps+=1);const s=je(),i=s-this[t(339)];if(i<1e3)return;let r=null;this[t(304)]&&(r=this[t(289)]-this[t(304)]),this[t(288)][t(315)](M[t(280)],{fps:this[t(368)],rate:this.rate,start:this[t(304)],end:this._playbackTs,timestamp:i,dataTimestamp:r,audioBufferSize:this[t(288)][t(364)]?this[t(288)][t(364)].bufferSize:0,videoBufferSize:this[t(288)][t(295)]?this.player[t(295)].bufferSize:0,ts:this[t(289)]}),this[t(368)]=0,this[t(304)]=this[t(289)],this._startFpsTimestamp=s}startCheckStatsInterval(){const t=bC;this[t(333)](),this[t(345)]=setInterval((()=>{this[t(292)]()}),1e3)}[bC(333)](){const t=bC;this[t(345)]&&(clearInterval(this[t(345)]),this._checkStatsInterval=null)}get[bC(281)](){const t=bC;return Math[t(324)](this[t(370)]/1e3)}get[bC(337)](){return this[bC(374)]||0}setStartTime(t){this._startTime=t,this._playingTimestamp=t}[bC(354)](t){const e=bC;this._rate=t,this[e(288)][e(315)](M.playVodRateChange,t)}get[bC(341)](){return this[bC(363)]}get rate(){return this[bC(287)]}[bC(347)](t){const e=bC;let s;s=Math.round(t/1e3),s>this[e(281)]&&(this[e(288)][e(325)].log(this[e(296)],e(355),e(277)+s+e(375)+this.totalDuration),s=this[e(281)]),this[e(278)]=s,this[e(288)][e(315)](M.playVodTime,s),this[e(327)]&&this[e(327)]}get playingTimestamp(){return 1e3*this._playingTimestamp}[bC(343)](){return this.playingTimestamp/1e3}get[bC(340)](){const t=bC;return null===this[t(348)]?null:1e3*this[t(348)]}isSeeking(){return null!==this[bC(348)]}[bC(321)](){const t=bC;return this[t(330)]()&&this[t(329)]}[bC(332)](){const t=bC;this[t(348)]=null,this[t(329)]=!1}[bC(300)](){const t=bC,e=this[t(348)];this[t(332)](),this[t(288)][t(315)](M.playVodSeekEnd,e)}[bC(320)](t){const e=bC;let s=t[e(307)];if(s>this[e(281)]&&(s=parseInt(this.totalDuration,10)),s<0&&(s=0),this[e(288)][e(325)][e(349)](this.TAG_NAME,e(311),t[e(307)],s),this.isEnded())this[e(288)].emit(M[e(328)],s);else if(this[e(348)]=s,this.player[e(315)](M[e(319)],s),this[e(288)].isPlayVodUseMSE()){const t=this[e(288)][e(295)][e(343)]();this[e(329)]=s{const t=e;this.player.video[t(306)](s)}),100)):this[e(288)].video[e(306)](s)}}[bC(302)](){const t=bC;return this[t(358)]>=this[t(288)][t(285)][t(317)]}clearLessThanCurrentTimeTimeout(){const t=bC;this.lessThanCurrentTimeTimeout&&(clearTimeout(this[t(309)]),this[t(309)]=null)}}var EC=IC;function IC(t,e){var s=TC();return(IC=function(t,e){return s[t-=263]})(t,e)}function TC(){var t=["1783386nnDTJr","光圈-","2359htgtKV","聚焦-","透雾开","雨刷开","1824BhHoCP","巡航关","电子放大","30898BAgCcQ","缩放+","314PLjgEK","2468795BwDmYz","透雾关","2120517TNoNqj","缩放-","1380120vdNoDi","雨刷关","90dJDXCW","光圈+","1075599MlfjrN","聚焦+","巡航开"];return(TC=function(){return t})()}!function(t,e){for(var s=IC,i=t();;)try{if(750791===parseInt(s(280))/1*(parseInt(s(266))/2)+parseInt(s(275))/3+parseInt(s(271))/4+parseInt(s(267))/5+parseInt(s(278))/6+-parseInt(s(264))/7*(-parseInt(s(284))/8)+parseInt(s(269))/9*(-parseInt(s(273))/10))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(TC);var kC={expandPlus:EC(265),expandMinus:EC(270),apertureFar:EC(274),apertureNear:EC(279),focusFar:EC(276),focusNear:EC(281),cruisePlay:EC(277),cruisePause:EC(285),fogOpen:EC(282),fogClose:EC(268),wiperOpen:EC(283),wiperClose:EC(272),zoomTips:EC(263),...zt};const _C=RC;function CC(){const t=["hasInit","resetStartBpsTime","isPlayVodNotUseMSE","webTransport","checkHeartTimeout$2","getPlayingTimestamp","flvDemuxBufferSizeTooLargeReplay","getCpuLevel","showMessageConfig","_pauseInner()","useWebGPU","toggleBar","drawRectangle","isHls","isMSEPlaybackRateChangePause","hasVideo","getRecordingType","videoCurrentTimeDiffIsNotNormal","_tempTsList","isPlayFailedAndPaused","getControlExtendBtnActive","isPlayVod","checkVideoSmooth","mediaSourceAudioNoDataTimeoutReplay","canvas","delayTimeout","max","isUseHls265","toggleControlHtml","doDestroy","wcsDecodeAudio is true, but not support so set wcsDecodeAudio false","useMSE is true and forceNoOffscreen is false then forceNoOffscreen set false->true","isNakedFlow","1932JsDTrP","recordType","full","_tempStreamList","default","streamStart","websocket","_allStatsData","wcs","isMpeg4 is true, so set _opt.useWasm true and others params false","use WCS","isAudioPlaybackRateSpeed","getWebrtcVideo","dynamicWatermark","contextmenuBtns","setExtendHtml","_i18n","startCheckStatsInterval","handlePlayToRenderTimes","_checkVisibleHiddenTimeout","i18n","multiIndex","autoUseSystemFullScreen","wcsDecodeAudio","_historyFpsList","pauseAndNextPlayUseLastFrameShow","getDecodeDiffTimes","getPlaybackRate","_playVodPause","ptz","playback","fullscreen","mp4","207jFqbbD","loaded","fullScreenByStart","downloadNakedFlowFile","recorder is null","and update _opt.hasVideo","pauseForControl() and loadingBackground width is ","init","decodeStart","isDestroyed","addContentToCanvas","pageVisibilityHiddenTimeout","_occlusionDetectActive","getStreamType","use simd wasm","clearVisibilityHiddenTimeout","url","getShowVideoRect","getVideoPlaybackQuality","getRecordingByteLength","streamQualityChange","length","isUseFileProtocol","useMSE is true and useWCS is true then useWCS set true->false","getControlHtml","url is empty","isPlaybackCacheBeforeDecodeForFpsRender","recorder is not recording","_playing","click","getDemuxAudioBufferedListLength","hlsDecoder","useObjectDetector","scaleType","debugLog","useWasmDecode","_flvMetaData","audio","useSIMD","JessibucaProOcclusionDetector","addAiContentToCanvas","setRotate","result","_destroy","_isInZoom","mseDecoderUseWorker","getAudioSyncVideoDiff","emitPlaybackPrecisionForNormal","releaseWakeLock","startRecord","57893YJQnPj","sendMessage","$controlHtml","resize","useVideoRender","getRenderCurrentPts","faceDetectActive","quality","ghostWatermarkConfig","streamResponseTimestamp","downloadFmp4File","getFps","useImageDetector","supportHls265","isCacheBeforeDecodeForFpsRender","isUseFpsRender","beforeDestroy","decoderHard","isPlayVodMp4","getRenderElement","isEmitSEI","websocket1006ErrorReplay","isInWebFullscreen","isMpeg4","isPlayer","getHistoryVideoDiffList","checkHlsBufferedDelay","decoder-pro-simd.js","wasmDecodeDelay","checkIsInRender","checkVideoSmooth false because videoCurrentTimeDiff is ","androidMobileFullscreenRotate","_videoTimestamp","pTs","is wcsDecodeAudio true and demuxUseWorker is true then demuxUseWorker set true->false","checkStatsInterval","sendWebsocketMessage","jb-pro-fullscreen-web","isDemuxSetCodecInit","toggleExtendDom","join","showTipsMessage","occlusionDetect","Player options","_destroyed","_checkLoadingTimeout","clearBuffer","togglePerformancePanel","isUseHls265UseMse","_startBpsTime","videoBufferDelay","getExtendDomIsShow","controlSize","reload","424905kRdtGI","autoWasm","checkLoadingTimeout","getPlayVodCurrentTime","isPlaybackUseWASM","mediaSourceAudioInitTimeoutReplay","streamTimestamp","isPlaybackPauseNotClearCacheAndCacheBeforeDecodeAndUseFpsRender","hls","forceNoOffscreen","cancelRecord","video","_startTimestamp","setControlHtml","clearView","useCanvasRender"," and\n current visibility is ","heartTimeout","mseDecodeAudio","setScaleMode","streamQuality","isPlaybackStreamEnd","screen","aiImageDetectActive","updateOption","createElement","webglContextLostErrorReplay","isWebrtcForZLM","toggleControlBar","updateStats","zooming"," , _opt.isH265 is ","set volume error, audio is null","then","_faceDetectActive","once","resetStats","use webrtc for SRS","getBarIsShow","pressureObserverCpu",", supportHevcWCS is ","updateMetaData","keepScreenOn",".mpeg4","\n useWCS is true,\n and supportWCS is ","getVideoBufferTimeRangeList","demuxBufferDelay","remove","emitVideoSei","_playbackPause","getDemuxBufferLength","isWebrtc is true and demuxUseWorker is true then demuxUseWorker set true->false","getStreamFps","_opt","getDemuxVideoBufferedListLength","_audioTimestamp","showControl","debug","isPlayStream","checkLoadingTimeout but player is destroyed","\n and current ts list is ","hasCacheOnGopBuffer","isH265","updateWorkConfig","aiObject","getTotalDuration","getPendingSegmentsLength","resetInit","push","indexOf","decoderHardNotWasm","use wcs video render, but not support so set wcsUseVideoRender false","wcsUseVideoRender","stopRecordAndSave","dfps","use hls","playVod is null","play() this.stream is null and is isDestroyedOrClosed is ","toggleExtendHtml","downloadFlvFile","drawingRect","playForControl() and pauseAndNextPlayUseLastFrameShow is ","_closed","netBuf","streamResponse","playbackConfig","isDemuxDecodeFirstIIframeInit","_canPlayAppleMpegurl","pause","isUseWorkerDemuxAndDecode","mpeg4","7ghrgjx","isSeeking","simdH264DecodeVideoWidthIsTooLargeReplay","useWebFullScreen","isUseMSE","mseTs","use MSE","playVodSeek","events","getControlHeight","play is destroying","use wasm video render play audio, but not support so set wasmPlayAudioUseVideoRender false","isWebrtc","widthOrHeightChangeReplay"," and webFullscreen is ","workerStats","streamBufferByteLength","_lastVolume","getExtendDom","decoderWorkerInit","videoCurrentTimeDiff","decoder-pro-simd-mt.js","getVideoCurrentTime"," and\n history FpsList is ","aliyunRtcDecoder","streamSuccess","decoder-pro-audio.js","isWeChatInAndroid and androidMobileFullscreenRotate is true and set androidMobileFullscreenRotate false","webcodecsDecoder","stats","_isMute","fps","_flvMetaDataFps","container width is 0, please check the container width","decoder-pro-mt.js","useSIMD is true, but not support(isSupportSimd is ","checkSourceBufferDelay","isAudioMute","getType","warn","checkIsFullscreenByInit","player","ghostWatermark","contextmenu","checkLoadingTimeout but loading is ","showBandwidth","webrtc","isMute","demuxUseWorker","wcsUseVideoRender is true, but not support so set wcsUseVideoRender false","getInputByteLength","setVolume","getPlayVodRate"," and window.JessibucaProImageDetector is null","updateDynamicWatermark","playVodRate","$videoElement","playVod","use webrtc for Others","useMSE","isWebrtcNotH265","JessibucaProImageDetector","Player","\n bufferRangeList is ","_stats","use webrtc for ZLM","isAliyunRtc","getCanvasType","isFlvDemux","worker","loadingBackgroundHeight","decoder-pro-hard-not-wasm.js","enableWakeLock","_tempWorkerStats","useFaceDetector","lastVolume","latestAudioTimestamp","zoom","clearStatsInterval","aiOcclusion","isClosed","volume","isWebrtcH265","isStreamTypeNotWorker","isRecordTypeMp4","innerHTML","webm","getExtendHtmlIsShow","playType","currentPts","disable","videoSEI","small","isWCSPlayAudioUseVideoRender","loadingTimeout","isMseVideoStateInited","clearCheckLoadingTimeout","play","streamBuffer","hideTipsMessage",") so set useSIMD false","playInitStart","decoder-pro-f-simd.js","useOffscreen","download","isFmp4","extendOperateBtns","faceDetect","videoTimestamp","clearBufferDelay","mseDecoderUseWorker is true but not support so set _opt.mseDecoderUseWorker = false","videoStart","$container","isOldHls or isWebrtcH264 or isAliyunRtc is true, so set some params false and set _opt.recordType = webm","getCurrentVideoAndAudio","isFirefox is true, so set _opt.mseDecodeAudio false","mseVideoBufferDelayTime","isPlaybackH24","isPlayback and wcsDecodeAudio is true, so set wcsDecodeAudio false","demuxStart","checkHeartTimeout$2 and\n pause and emit delayTimeout event and\n current vbps is ","maxFps","isFullResize","mp4Decoder","showPlayBtn","JessibucaProFaceDetector","getVideoBufferTimeRange","removeExtendDom","reduce","updateStats but player is closed or destroyed","webcodecsAudioInitTimeoutReplay","_zooming","visibilityChange","checkVideoSmooth false because ","decoderAudio","checkVideoSmooth false\n because fps is ","offscreen","_tempInnerPlayBgobj","playVodPause set true and is recording, so stop recording","getCanvasRenderType","MetaDataCreator","decodeTimestamp","decoder-pro-hard.js"," < min fix is ","mainThreadFetchUseWorker","isHistoryFpsListAllZero","isEnabled","-simd",", so set mseWaitVideoCanplayTimeout = loadingTimeout -1","use wasm","isCheckStreamEnd","getPlayToRenderTimes","createObjectURL","isMpeg4Demux","decoderCheckFirstIFrame","mseWaitVideoCanplayAutoWasm","checkFirstIFrame","isPlaying","TAG_NAME","useWebCanvas is true, but not support so set useWebCanvas false"," and","recorder","pauseForControl","hasControl","videoRenderType is ","getPlayType","audioTimestamp","use offscreen","$extendDom","error","URL","_visibility","setRate"," and window.JbProObjectDetector is null","_hasLoaded"," and avgFps is ","6860694zXOiux","_imageDetectActive","showTipsMessageByCode","isWebrtcForSRS","decoderOld","m7s","hasAudio","removeDynamicWatermark","imageDetectActive","startVisibilityHiddenTimeout","performance","videoBuffer","isWasmUseMThreading","use face detector, useWasm is ","close","isWebrtcForOthers","isPlayback","checkSourceBufferStore","sendWebsocketMessage: stream type is not websocket, current stream type is ","isPlaybackUseMSE","nakedFlow","href","getExtendHtml","demuxType","isResize","_objectDetectActive","record","_lastestVisibilityChangeTimestamp","addMemoryLog","getIsStreamTsMoreThanLocal","resumeAudioAfterPause","mseWaitVideoCanplayTimeout ","demuxTimestamp","getMetaData","useWasm","_loading","JessibucaProObjectDetector","isMSECurrentMoreThanBufferedPause","_opt.qualityConfig is empty, so set operateBtns.quality false","isDestroyedOrClosed","disableContextmenu","floor","isDestroying","replace","playbackPause set true and is recording, so stop recording","init() failed and player is destroyed","getPushLatestDelay","stream","playVodForwardJumping","log","isDemuxInWorker","useMThreading","decoderWorker","fpsIsLow","isLastVideoDiffIsZero","screenfull.isEnabled is true and _opt.useWebFullScreen is true , set _opt.useWebFullScreen false","isPlayVodUseMSE","playbackCheckStreamEnd","contains","getExtendBtnList","fetchStream","checkLoadingTimeout and pause and emit loadingTimeout event","68770ToocaJ","addContentToContainer","isWebrtcH264","useOcclusionDetector","getDecodePlaybackRate","simdDecodeErrorReplay","use playback","mseWaitVideoCanplayTimeout","emitVideSeiSyncPts","getVideoInfo","webrtcError","screenshot","wasm","isNotMute","handlePlayToRenderTimes but player is closed or destroyed","loadingTimeoutReplay","loading","operateBtns","hlsError","getOption","isPlaybackRateSpeed","pauseForControl() and videoInfo is null","visibilityHiddenTimeout","isRecordTypeFlv","isWebrtcForM7S","fullAuto","checkIsFullscreenByInit and isFullScreen is ","timeout","videoSEISyncPtsDiff","use fmp4","isControlBarShow","showTipsMessageByContent","_checkStatsInterval","playVodSeek and is recording, stop recording","decoder-pro.js","width","shift","mseDecoder","objectDetectActive","controlHtml"," and playing is ","isMSENotSupportAudioFormat","singleWatermark","catch","isHlsCanVideoPlay","isMSEAudioDecoderError","base64","latestDelay","_historyVideoDiffList","auto","videoCurrentTime","play() init and next fetch stream","recording","dts","isWasmPlayAudioUseVideoRender","getMseMineType","pts","未知异常","rate","setFileName","isDropping","handleRender but player is destroyed or closed","checkHeartTimeout$2 but player is destroyed","destroy","getRenderType","_videoIframeIntervalTs","oneBufferDuration","_isPlayingBeforePageHidden","9977824qSGyzt","volumechange","updateHistoryFpsList","setPtzPosition","getDemuxType","playbackPause","height",", playing is ","24AarRBo","bufferList","qualityConfig","_times","mseUseCanvasRender","use webrtc h265","_serverInfo","isRecording","clearControlHtml","isPlayVod and wcsDecodeAudio is true, so set wcsDecodeAudio false","reason","getVideoBufferRangeList","isFFmpegSIMD","$iconContainer","getMimeType","useWCS","hiddenControl","playVodPause","getMaxDelayTs","webrtcUseCanvasRender","mute","screenfull.isEnabled is false and _opt.useWebFullScreen is false , set _opt.useWebFullScreen true","demuxBuffer","pushLatestDelay","videoElementPlayingFailedReplay","getReadyStateInited","preferredHardDecode","debugWarn","isMSEDecodeAudio","webFullscreen","use play vod","decoder-pro-f-simd-mt.js","checkHeartTimeout$2 but fps is ","getExtendBtnActive","occlusionDetectActive","isPlaybackPauseClearCache","start","emit","control","isStreamWebTransport","use image detector, useWasm is ","visibility","stringify","isNakedFlow is true, so set _opt.mseDecodeAudio false","getAudioEngineType","use hls 265","getAudioInfo","isDecodeFirstIIframe","isHls is true and demuxUseWorker is true then demuxUseWorker set true->false","networkDelayTimeoutReplay","playing","updateExtendDom","getVideoBufferDelayTime","getCanvasVideoBufferLength","isRecordTypeWebm","_seiList","fetchError","playbackForwardMaxRateDecodeIFrame","loadingBackground","wasmUseVideoRender","emitError",", supportHevcMSE is ","toFixed","\n so set useMSE false","checkHeartTimeout$2 playbackPause is ","77289SqvhFp","_mseWorkerData","1018076WFZXdA","png","isPlayVod is true and demuxUseWorker is true then demuxUseWorker set true->false","isMSEVideoDecoderInitializationFailedNotSupportHevc","assign","seek","use wasm video render, but not support so set wasmUseVideoRender false","isMseDecoderUseWorker","flv","useMThreading is true, but not support so set useMThreading false","isScreenNowRow","isPlayVodSeeking","vbps","isStreamTsMoreThanLocal","isPlayback and mseDecoderUseWorker is true, so set mseDecoderUseWorker false","_streamQuality","addExtendDom","_isStreamEnd","flvDemuxBufferSizeMaxLarge","startAndResize","isDroppingIsTrue","wcsDecodeErrorReplay","decoder"," ,isIphone is ","use mpeg4","getWindowScreenInfo","framerate","abps","isPlayVodEnded","updateLoadingText","playStart","clearExtendHtml","removeGhostWatermark"," and height is ","background","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAS4AAABgCAYAAACjZZ/rAAAK4mlDQ1BJQ0MgUHJvZmlsZQAASImVlwdUU1kagO976SEhkIQISAm9SW8BpIQeivQqKiEJJJQQE4KCDZXBERwVRESwDOCoiIKjIyBjQSxYUWzYB2RQUNbBgg2VfcASZmbP7p7937nvfufPf/9yz705/wOAHMKVSDJhFQCyxDnSyABvZnxCIhP3DOAAA9CBA7Dm8mQSdnh4CEBkev6rvL8LoIn5luWEr3///b8KlS+Q8QCAkhBO4ct4WQi3I2OEJ5HmAIA6jOgNluRIJvg2wnQpkiDCgxOcNsVfJjhlktEqkzbRkT4IGwKAJ3G50jQASDaInpnLS0P8kMIRthHzRWKECxD24Am5fISRuGBOVlb2BA8jbIrYSwAg0xFmpfzJZ9pf/Kco/HO5aQqeqmtS8L4imSSTm/d/bs3/lqxM+XQMY2SQhNLASGRWR/bvXkZ2sILFKfPCplnEn7SfZKE8MGaaeTKfxGnmc32DFWsz54VMc6rIn6Pwk8OJnmaBzC9qmqXZkYpYqVIf9jRzpTNx5RkxCr1QwFH4zxdGx01zrih23jTLMqKCZ2x8FHqpPFKRv0Ac4D0T119Re5bsT/WKOIq1OcLoQEXt3Jn8BWL2jE9ZvCI3vsDXb8YmRmEvyfFWxJJkhivsBZkBCr0sN0qxNgc5nDNrwxV7mM4NCp9m4Av8QAjyMEEMsAPOwBawQAQIzREszZkoxidbkicVpQlzmGzkxgmYHDHPag7TzsbODoCJ+zt1JN5GTt5LiHFqRpe9BznK75E7UzqjSykHoKUICf1gRme4CwBKIQDNHTy5NHdKh554YQARUJB/Bg2gAwyAKbBE8nMCbsALyTgIhIFokAAWAh4QgiwgBUvAcrAaFIESsBlsBVVgN6gD+8EhcAS0gBPgDLgAroAb4A54CHrBAHgJRsB7MAZBEA4iQzRIA9KFjCALyA5iQR6QHxQCRUIJUDKUBokhObQcWguVQGVQFVQD1UM/Q8ehM9AlqBu6D/VBQ9Ab6DOMgkkwHdaGjWFrmAWz4WA4Gl4Ap8GL4Xy4EN4IV8K18EG4GT4DX4HvwL3wS3gUBVBKKAZKD2WJYqF8UGGoRFQqSopaiSpGVaBqUY2oNlQn6haqFzWM+oTGomloJtoS7YYORMegeejF6JXoDegq9H50M/oc+ha6Dz2C/oYhY7QwFhhXDAcTj0nDLMEUYSowezHHMOcxdzADmPdYLJaBNcE6YwOxCdh07DLsBuxObBO2HduN7ceO4nA4DZwFzh0XhuPicnBFuO24g7jTuJu4AdxHvBJeF2+H98cn4sX4NfgK/AH8KfxN/HP8GEGFYERwJYQR+IQ8wibCHkIb4TphgDBGVCWaEN2J0cR04mpiJbGReJ74iPhWSUlJX8lFKUJJpFSgVKl0WOmiUp/SJxKVZE7yISWR5KSNpH2kdtJ90lsymWxM9iInknPIG8n15LPkJ+SPyjRlK2WOMl95lXK1crPyTeVXFALFiMKmLKTkUyooRynXKcMqBBVjFR8VrspKlWqV4yo9KqOqNFVb1TDVLNUNqgdUL6kOUnFUY6oflU8tpNZRz1L7aSiaAc2HxqOtpe2hnacN0LF0EzqHnk4voR+id9FH1KhqDmqxakvVqtVOqvUyUAxjBoeRydjEOMK4y/g8S3sWe5Zg1vpZjbNuzvqgPlvdS12gXqzepH5H/bMGU8NPI0OjVKNF47EmWtNcM0JzieYuzfOaw7Pps91m82YXzz4y+4EWrGWuFam1TKtO66rWqLaOdoC2RHu79lntYR2GjpdOuk65zimdIV2aroeuSLdc97TuC6Yak83MZFYyzzFH9LT0AvXkejV6XXpj+ib6Mfpr9Jv0HxsQDVgGqQblBh0GI4a6hqGGyw0bDB8YEYxYRkKjbUadRh+MTYzjjNcZtxgPmqibcEzyTRpMHpmSTT1NF5vWmt42w5qxzDLMdprdMIfNHc2F5tXm1y1gCycLkcVOi+45mDkuc8Rzauf0WJIs2Za5lg2WfVYMqxCrNVYtVq+sDa0TrUutO62/2TjaZNrssXloS7UNsl1j22b7xs7cjmdXbXfbnmzvb7/KvtX+tYOFg8Bhl8M9R5pjqOM6xw7Hr07OTlKnRqchZ0PnZOcdzj0sOiuctYF10QXj4u2yyuWEyydXJ9cc1yOuf7hZumW4HXAbnGsyVzB3z9x+d313rnuNe68H0yPZ40ePXk89T65nredTLwMvvtder+dsM3Y6+yD7lbeNt9T7mPcHH1efFT7tvijfAN9i3y4/ql+MX5XfE399/zT/Bv+RAMeAZQHtgZjA4MDSwB6ONofHqeeMBDkHrQg6F0wKjgquCn4aYh4iDWkLhUODQreEPppnNE88ryUMhHHCtoQ9DjcJXxz+awQ2IjyiOuJZpG3k8sjOKFrUoqgDUe+jvaM3RT+MMY2Rx3TEUmKTYutjP8T5xpXF9cZbx6+Iv5KgmSBKaE3EJcYm7k0cne83f+v8gSTHpKKkuwtMFixdcGmh5sLMhScXURZxFx1NxiTHJR9I/sIN49ZyR1M4KTtSRng+vG28l3wvfjl/SOAuKBM8T3VPLUsdTHNP25I2JPQUVgiHRT6iKtHr9MD03ekfMsIy9mWMZ8ZlNmXhs5Kzjoup4gzxuWyd7KXZ3RILSZGkd7Hr4q2LR6TB0r0ySLZA1ppDRxqlq3JT+XfyvlyP3Orcj0tilxxdqrpUvPRqnnne+rzn+f75Py1DL+Mt61iut3z18r4V7BU1K6GVKSs7VhmsKlw1UBBQsH81cXXG6mtrbNaUrXm3Nm5tW6F2YUFh/3cB3zUUKRdJi3rWua3b/T36e9H3Xevt129f/62YX3y5xKakouTLBt6Gyz/Y/lD5w/jG1I1dm5w27dqM3SzefLfUs3R/mWpZfln/ltAtzeXM8uLyd1sXbb1U4VCxextxm3xbb2VIZet2w+2bt3+pElbdqfaubtqhtWP9jg87+Ttv7vLa1bhbe3fJ7s8/in68VxNQ01xrXFtRh63LrXu2J3ZP50+sn+r3au4t2ft1n3hf7/7I/efqnevrD2gd2NQAN8gbhg4mHbxxyPdQa6NlY00To6nkMDgsP/zi5+Sf7x4JPtJxlHW08RejX3Ycox0rboaa85pHWoQtva0Jrd3Hg453tLm1HfvV6td9J/ROVJ9UO7npFPFU4anx0/mnR9sl7cNn0s70dyzqeHg2/uztcxHnus4Hn794wf/C2U525+mL7hdPXHK9dPwy63LLFacrzVcdrx675njtWJdTV/N15+utN1xutHXP7T510/PmmVu+ty7c5ty+cmfene67MXfv9ST19N7j3xu8n3n/9YPcB2MPCx5hHhU/Vnlc8UTrSe1vZr819Tr1nuzz7bv6NOrpw35e/8vfZb9/GSh8Rn5W8Vz3ef2g3eCJIf+hGy/mvxh4KXk5Nlz0D9V/7Hhl+uqXP7z+uDoSPzLwWvp6/M2Gtxpv971zeNcxGj765H3W+7EPxR81Pu7/xPrU+Tnu8/OxJV9wXyq/mn1t+xb87dF41vi4hCvlTrYCKGTAqakAvNmH9McJANBuAECcP9VfTwo09U0wSeA/8VQPPilOANT1ABC9DICQawBsr0JaWsQ/BfkuCKcgejcA29srxr9ElmpvN+WL5Im0Jo/Hx9+aAoArBeBr6fj4WN34+Nc6JNmHALTnTfX1E6JyEIAacxtH+5D7VPMC8DeZ6vn/VOPfZzCRgQP4+/xPeFgcU9phDh8AAABsZVhJZk1NACoAAAAIAAQBGgAFAAAAAQAAAD4BGwAFAAAAAQAAAEYBKAADAAAAAQACAACHaQAEAAAAAQAAAE4AAAAAAAAAkAAAAAEAAACQAAAAAQACoAIABAAAAAEAAAEuoAMABAAAAAEAAABgAAAAADApncsAAAAJcEhZcwAAFiUAABYlAUlSJPAAAB1BSURBVHgB7V0HeBTVFj6b3fRCAgSQ3qSKIuoDRESx8OzloaIIiqhYUIEHiIJIU6QpVkRRwMaTp4INBBsoRZQiIFhACL1DQtpusuWdf8IsM7Ozu0nYDQzvnO/bzMyd2+a/N/+ce+65d2w+FhIRBAQBQcBCCMRYqK5SVUFAEBAEFASEuKQjCAKCgOUQEOKyXJNJhQUBQUCIS/qAICAIWA4BIS7LNZlUWBAQBIS4pA8IAoKA5RAQ4rJck0mFBQFBQIhL+oAgIAhYDgEhLss1mVRYEBAEhLikDwgCgoDlEBDislyTSYUFAUFAiEv6gCAgCFgOASEuyzWZVFgQEASEuKQPCAKCgOUQEOKyXJNJhQUBQUCIS/qAICAIWA4BIS7LNZlUWBAQBIS4pA8IAoKA5RAQ4rJck0mFBQFBQIhL+oAgIAhYDgEhLss1mVRYEBAEhLikDwgCgoDlEBDislyTSYUFAUFAiEv6gCAgCFgOASEuyzWZVFgQEASEuKQPCAKCgOUQEOKyXJNJhQUBQcBxqkDgK8gmT+5+Ik8RuTYvJtefC6l430YiO9fQxj+mWHvluhTX4GJKaNKFYhLSKSaRf8nV+L7w76nSjlIPQaAiELD5WCqioGBlFGetJOfGb8nNJFW07RciX3EJUamEpR7BTfgdIzGcO6o1pbja7Siu1gUU37BLsCIkXBAQBE4zBE4qcR2adDV5cnYxVxWUkJKWnFTCUo/ae+r5saMtLoHsabUordMzFFvjvNOsieRxBAFBwIhAhROXz5VPBd+/SfmLppHP42LC8lGMzcOjPS/5mIhsdi+H8bmdL2LwYyUsxkY+W2yJtqXRuBQNjO9rNbHElt0piX+O9DONzyrX/0cIbNuxm5yuImrcoA7Z7Xj7iZxOCFQocRVvX0f5C14h18bvFdtVrLeQSctNNlsx2RwgK4bWwSNXPvrY+uaz8zkfvUxiIC6fL5a8nqQSolIJSz1qCM2eXo/SLhxJcTU7nE5tJc9SCgQKCp3Ub9hztHzlWiV2g7q16OWxQ6le7TN0qQ8dyaZNW7bpwtIrpVGzxg10YXJxaiJQYcTlWruQjr4/mLxF+WRnO1a8O5e1K59CVipBBSMukBgnUjQyctjI40xnEovTE5iGuFRNLLXdcEpqdicnxk1ryr4Dh2jjn3/rKp+YGE/tzjtHFyYXJQhMmjKTZvxnrg6O885pSTNeGqMLm//tEho8apIu7KK2bWjK+Kd0YXJxaiIASoi6OFfNY9J6nMhdSHFuF8V62KYFzapc4iN78mHyulOYBJM5h+CklLvqObaf5VByy/uZ5JjoLCi/rPmNnnhmsq7mdWrWoHmzpujC5KIEgdXreCbaIGs3/MEvOh9r9sH7iiGJXJ7iCGCgFVVxrf2ajr43hMhVQPGF+RTHx0iILSGPbMk5nFUIAmTXivyNb5Nrz5JIFCl5WACB2mdUD6hlzerVhLQCULF2QFSJy5t7iPK/eZt8RYUU73KSw10UHi28FRPSKCa1JtmrNKH4s3tRUscxFN+sO9krNWK/rZqsrSUq+djinGRLyg2Zp68ol7IX9yFPwb6Q8eTm6YHAQ/fcThlsq1IlNtZBg/r2Ui/leJogENWhYt6ciVS8eSVrWYUUW+xSDO6hcLMlVaa49veQo3FnctRtx1FNVHufh1xbPqaiXQvIuX022RLz2XDP1nwnho3B5ch3d1LGJdPInlIveCS5Y3kEYISfM/NFgg3LxbOKl3S4gBrVr2P555IH0CMQNeJy78uiwmUfM2k5FW1L8YDXl627sjfqRAk3jCM7O5WGFCap+Ea3Uly9aym+8W2Us+QORevyFUELC65AevK2k2vvckpqLMQVEt/T4GaVjHS6s+u1p8GTyCMEQyD4f3qwFKUI97F2dWRsV7J5veQoYk/4MGKvfS4l3zc3PGlp8rE5ktjd4UpKa/8G2eIqkS0t21RB8yfxeSl39Qj2HSv0B8mJICAIWBOBqGhczhWfk4+N8Ha3mxzF7pBDxNhzb6aEnm+WG734OjdTWoydcpb3YNsX29A8IWYPeZiZt34SpbYeVu7yrJgwNy+fdu7ZR3v2HqD8wkKqnlmFzqieSbVqVGMf3/K/u5xOF/35dxYdPpJD2UdzKSU5iapkVKKGPDRLT0stF1TRyLNcFTmWyOv10a69+2jrtl38fIlUu2Z1yqxS+ZQ29hcVF9PuPftp74GDtO/AYUpMiKeqVTKobq0zqGrl9HLDgZnZv7N2cL6H6Eh2DhtybFSZ27ta1crKcLwiZ20jTlw+1mzcO34nn7uY7EXukCDFZDaiuC7sJmFmywqZUn8zvtYNlNZ2KuUsGsTEpb9nvCrY9M7/BXGhky395Vea9cmXtGTFasI/oFHQ4bped6Xyy+SOXVpZ+vMaev/jL+nn1evIZaJRx/BKh3NaNqV/XXMFXdflUiZHE1ulobBI5Tn70wU04bXputxv/GdnGtqfXWLKIAcPZ9Pz7BO2cPEyxVamTVqtahXqeet1Cm7JSSUTRdr76vnAERNp8fKV6qVyHDnoIbr68ot1YcaLT7/6nsa8MFUXfPnF7Wjs0H66MOPF739toY++WEhffv0D5RcEjixALGiXa6/sRF2vvaLUKwqwCmHa+5/QDz+tVF5SxnJxDUK8pMM/6L4eXakmvxSjLREnLu/BXeRa841S74RCNsiHWG1hb345xVSPzNIcR/q55Khcm9x7DoXBzEcuNuzH1zp9F2VDw8I/zTImrlCy/+Bhem36f2j6rLk0dthjdFlHTIgEF/wzPDFmMn2/9OfgkfgOSHLN+j+U3wdz5tGLY4ZQjWpVTdNEOk+3x03Q2rQCDaQsMu+bH2j081MpL9/cdWf/wUM08bUZCnm/OWkE1avDM90mgnKNdXF7wrxZOR83j1SM6YpMXhBqkR7OE/V576Mv1CDTI15mv/72h/L7+POv6ZknH6UzGwa3+SL+5Knv0szZnxHKCCUg+o8+X0hffL2YBjxwF91+01Whop/wvfKPE4IU7XPmk+fwbnavCnzDG5PEXTvUGFTua0dqM3LUaFmq9M6d80oVz4qRdu87QN0ffDwsaWmfrdDppP5PjVcITBuuPcc/0oODR4UlLW0anMPrv9djwwgd2yjRyNNYRlmvUd+nnnslKGlp89vDWPfo+wRt3rpdG1yh52i7ewc8HZa0jJX6fdMWuvvRYbRl207jLf/10GdfordnzQlLWv4EfII2fXbyGzRn3rfa4IifR5y4irPWK5W0u0MztK1SDbIlpET0gRJq3liq/HxerhsPaU83gaYzZPTztHX7roBHgy0Lw4TrrrzEVJVX3q5vvENmnufIDENDaFFGObdVM+rT8xYa9XhfuvWGLooNyBhn5+59/OZ+xxgclTwDCilDAJZXDXh6Amk1NIfDTkmJCUFzOZJ9lIaPe0XxzA8aKYo3oGmt/HWDaQkYsrVt04qan9nQ9BmO5ubRg4NGBWh3yOyr75bQ5wsXmeabkZ5Gl/KwsGO786iWicMvEo1hjRW2z2hJxIeKzqVzlLrGeEITQ8Jdr0f8meKqdipVnl7nAfK6DvFmhNEfi5eqQhGK9P7HX5iSC1T3rtddQakpx33dtu3cw8O+F2j975v8pYP4ho19mT6ZPpkS2KCrlZkffqq9VM773d+Dene/2R9+09WXKeewVz02dKzO/oV/gn59euqMw9HI01+ZcpxoF11f0am9Yq9p2qi+MoFx4NAR+viLr9nW83GAzQsYQsO4+ZrLy1Fq+ZMAZ9j0jAIj/MjBD9P5rY+PQGCLfO+/n9Or02dRMU+YqQINfdac+dTrdv1Lf8qMD9Uo/iPyGzHwId3QGC+8+Uxyw8a+pMsX5D/7swX0wF23+tNH8iTiGlfR5jVK/Xj1dsh62ng300iLLfa4x3SovD1528hbwMPZ00jcrOFOfWd2wBPdc/tNSqfUkhYiwVHzpWefVGYXtYl27N5L3/64QhtEsIUdyTmqC8Nb9+5uN+jC1IsO/ziXut10tXqpHEGK6zb86Q+LRp7+zE/wpHPHtvT8qMGKpqLOumLyAv+ETw14wDR3aKQVLW+xwdwo8XGxSt21pIU4CMdL5ul/P2hMEjDMhA3POITETPSkEYN0pIWMYPC/+rKOdH+PWwLyXbP+94CwSAVEXOMiNo7C2dQTbg8kdmE4WQJty+M6gh1zThv5iWf4co7m6Z4HuyL069NDF6a9wEzQ+OEDqMfDT2iDlWHCNVccn/mCsd8oCfHxIWelHul9R4ATaFrqcdNANPI01rE81yD0Z554NGjSG/55KWu1vyvalzbSX+wWsnf/waCTENq4kTiHzXDVug0BWQ3u25uaNq4fEK4G3HBVZ8KEiXbHERDVLnaXUYd9aSkpitatpsERbg/4BRO8rF59e5bu9q69+3XXkbyI2v+u1xFGmeMF0CKRQ2DBd0sDMmt//jlh/Y3ObsHrQfltrHVrWPrLGmU4FB9f4hPXoG5tZZipJRsYpqfOnE19ggwFkDbYTCIqGo08AwAoR0D/B3oq/mihkg55pDfNnf9dgNH6x59W0S3XV8xs9XesFUOL1QrWaMLOGE7688sMu45oRTt8hJkg1GyjNp16Dtcao+Tlmc/KGuOV5zpqxOUL49joO/A3UbVG5amzpDFBQGufUW9XYY0KQ7JwUomdRbXx0In38VsYthII/LBghP9h+SpdVq/wG/YLdh3AUAFvXBiBsai5NBKNPEtTbrg4zZuE75P4x67PLhBwxtQK7IYVJVk7Aidg4PhbGsFebpHaz83Lq2NymaCgsVWklK6XlaFGtvgEdj51Kim8TF687Z9p6sKZD1PK+OOGYdNIUQq0J9XkLwRVj1LuJydbGI+NMnLCa8agUl8f5PxU4kKi3nfczG/pDYTpd61k8QwmfMHwi4uNpeZNGlLrs5oRtL3zW5+laHPa+NrzaOSpzb+s5/D8L63zZOMGdQOICzOMFSUHDwe2d+NSEldZ64jZ1kXLfqE/N2cpBIVrkFVePm/DzjvOngyJOHHFt76MnCtLDJXO5ARKLAi0jygPmn+IvHk8s5dSpcKf255Sl0Bep4tgyICtiCMpRr+rNme3oNcnPMW+XKODdlbMJK1lAzx+mDGEVzlm2u7t/i9T+0g08jwRDJqEcMY05ouh1ILv9cPzwxFuA2OZ2muzF1Wkd8GAFj/+len006q12qJPifMwhqiy1zGxY1d/IuwVD60rmLhm3hfsVlTDbXEZvCFqcENjVAuPSua8rXWE/dLMPLxBNLOmTqDu/7pGt+dVsEeCV/y7PAUP4z+m3c0kGnmalVOaMFuIvmpMb7YuT29xMqaI7HWMybdEuRdErBD4cXXtPeCUJC08ZMQ1rpi0qn7wPA4HudlIG1tsrk569/5F3m0rKabe+f40FXFi1ukqotxolYEp+8rplQK808fxjKF2U72ylB/MONuwXm0a8ui9NPChXgRjNNbiQcPasm1HgLFYLW/7rj10V98n6d1Xx5oa7KORp1p2WY5mdsJg6Tdv3RZwC21QUWK2WNpocytvXTb8uVnZLhz2K63AGfcCHv5Ds8N6zdTUZEpj30C42hTw4v1+w8Zpo0f1POLEZUvJ4E0AW/BC641KxV1syAxGXL4c/oTU7AGUNHARO4QE18zCIVC46UNKPPO2cNFO+n34WsFhTyvhjNlGmxLSqrN92nyqVs4IIC6QFmxN0RB04ksv+ofyQ/5Y17du419swF9J8775McDvC64CXy9eTj1uuS5odaKRZ9DCTG7AkxyuAfinDCebtmwPiBLKXUCNXGhYR6mGa4+wL4YT7PZglL+zdhqDynX9xrsf8XpJvW0as88TRwwM8PtTC4DdqyKl/GwRpJb2jOq8zXJ7/13MLuamp8NTzR+mPfHs/o2ODqrC2zuXferUx9vU5K8ZzYurW2mzLMW5eV1KkfCEolx9x4PU5vJbdD/1M1rBMsZyGaOY7eRQnz/DZRSsR6sogWH7wgtaK9rYlx+8xt8zDHQwXrW25GVW2jpFI89wZf+xKStcFMV1xGxWTzuZgUxiecRhFLiRhJOsneGdo/HZNaNsMcxyGu+r1/DhwioA7U9br+W/BNq04O+HrZCCSUWv14w4ceHB4pq3I1usZn0Xk1ZBcjJvsRy8uIIpXaj41w+D4RIQ7snfRQVrx1LeL7wdcxmX7sSwjetkSKvmZwYUiy1nQskqk6/WmPnMYImKUcw6oDEOrjGVjc6MIcJvf2xWlgFp/XqghYBAtT/tej5jnhg6GJeQIM4fm7f6o0YjT3/mJ3DyAq+pNNNytVlOfHV6gEaC+x3btdFGU/Ym0wXwBfANJfCVW/JT6D6B9J0vaqssRdLmhdUNHzEhhRI822P83ckRPOOs/akjAcyMGp8fLxDVOTVY3kZXmWDxIhUe+EqIQM5xZ3WimPRM8hw67uficcRSoT2VkgpzTEvw7PmNCub2I8eqt3nf+YcotsX1HC9QM/J53VS4bhK5smZT0W72UcL3Fcso3uLcMqaITHQscl64aJkus8947yWs8TPTUDC0gv3IKDBoG+ViXvCamJCg63SYDXp52vv0yL3djdH91/A9uvXeAbqZQnTSeR9M8ceZ8OoMxZveH8AnqDMWVgcTh4m2gWUjqkQjTzXvEzlCcxgx/jWCfdBM5n37I/1n7vyAW/BWN2okZkPOFavWKS8Gs5cYMkV7YVPGcIJh6QW8dnDF6vW6qM+9NI1acz8z60+I+PqM2YqHvzYRXEBq8qaSELMF5TADYCiobT9tetgG5zMuFSnBVaATqQVrWFXGLOQPWRxf4oHsvLwMKD8lnWca7ea5sxHfvX0FFXx0F2U/m0HZL9Sm/C96UQFvEJg793o6PK0m/ypTwc/jqWgH2wE85eRd/iDtyZDzeQmOUdBJ7+3/NH224HtF84FrA4zZr7NXuvGDpUgLL/crL7nQmI2yKNpsn3XYK/CBVLO9pRYvW0n38ZYoRl+cbjf+U3E6VQvBDgNGwaJi7FtlJujkM3iPL6PATqJKNPJU8z7RI8gJ37KEsVvVRNBO2OIFpGYmd9x8TUBw+wvM7YsPsUsJXmCq1oo2x44ejzzxrLLgOSCjIAH3sG+dUfCBkP7Dx+sWzyMO9tPC0PCd/35mTEK333x8XSnsp2YE9eQzL5rODGPPt5488WJcyxpQSIQDovol6/yveDO2TyeWfMMCFIkflCibj2J9Lr4sIrutmDcbZIM1c1C4L1l7KY47Ujx/DDaR8+KMjuWZefcy/mxZyfh73zQejqllqeWBJ1HusfCEuldTpbYvckDFC9RzdKBgYmdyD7VpG1wRMKtnJhjedesziLBuziiYeWzBzqFnt2hKBw4dpr/4LYmdLY2CGb73p4zTLXvBP8P1PfqadlzEx0zTua2a01Ee5sDOgs3kjEQJb/P5s1737w4RjTzxLB/wjq9jX5ymeyz4kmG3BK2YfckadsI8fgatDxv+kRP4Z1wHqs0L2hMwM5utvur2B5Qhtja+eo42qVkjkw4dztFpylgvafTCx8tq0shBalL/ceTEKcoGfv4AzQnapk6tGtwWhUyMO023mYGW+Pl7r+ochaH14YVnJphRbNvmbEUDw6aEqv8gNDXjCxAfLVk0d7pZNiccVk6VpXTlJl12FxX9vZKKNi7SJ2CNrNjONjBbPE8m8pepyUUOG4zz+hk3JPL52Pe+OJGN9/yDjQxGfhCQRpxbF1DSWXcqITZHPG+15dLcPbVOBz3ci31j1gVdIhGKtJo0qk/9eYuaYIIZShhR+wwcqXQsbTxMbcO+EsrGgjft1IlP60gLeeCfd9SQR+jhIWMCtnTBLgL4ffjpV9ridOf4B8WWxdop/GjkqSu0HBf4mOw9d9ykaMCqKwAIFr9ggplbDJnNSAtphva7X3HaNUuPMoyTLxfx0qnL2F5Z2lUP6E94Waw22YlBbRuzshEGW+Rr44bpSAvhPW69XlnepbVJIhwCLdTodoF8Xhj9OOM2vCRSBfw1UEBkS4SBPr33CxRbu3mQjG1MVTHkjkkkZ0wV/lUlJ2WS05tJLk8mq9LVeI+fTNawUpjAVLUpMKvcJaPBcMqNytfPCYxgCPHk7yRvYeBsnSFaVC7hTY6tjEOt4DcrGPaxV58bGtDJjHHxRvzwzYnUhjWgsgjWrr31wihTPyvkg6Hd1AnDlQ8jlCVf2GKeHzXIdJ/1aORZlrqZxYX2CI02nJsK0oLoZ77ybFB7EuJc1LYN9eWdMoIRG+KoglnJ0bwzBQYHpRVoOm9NHl2qxdXaPNFP0N5mtjB86GTGy89Q2/PO1iYxPUf5aF+s3axIsY9giWaBNkccxbfqTO79W8hzMKtkyIaWCfcDpSKOegwZn7W2lBoUm9mS1yBWJnf2ZvLk8OyNmsaQh6/oIMVV73DSPg4LzQMfqUjntzXUbdXWwU8bIDCcwpaBoY52W5iAiJoAdKbru1xC0NDgm7SLv/hiJvCbAiGOYW3qwV63cX1SzaL5w2DA7XbjVcpSHgynDmebT7QgAYYp3XjfcWiAzRo38OdhPIl0ntjUzzhTi/WT2LFTKzDCY/JDK3V5iHbtFZ0IQ7+reOH4Tt6bDPuTGVzveLYwnfef6kpjmGTM7EHaPHEO22bLpo2V/Mz8nbDGEx+ZGDf834pDJz56gbWBWgHRdLm0gzbIfw6NtlP78xV3FGhxWWwCCKa544V592030Ghu8+rVjk+W+DM7doI6XdW5IzlZ29zOEzhOl34Ug76DPjyZX8JNGtZXPs7xDu9NrxX0w7u73agNith5VG1c2lrCT+vIy3dS8Q6eBQGRqGSinmuPIBxVwVKP6n3cU881x7ha7Sjj2rf5XizPNi6hnMX9yFvM/1javNT4HJbSaiAlN+2jreJJOcce3TDMlqj1O9gB8oiyrg++Wi2aNqJzecFyad7WoSoPOwSGJHACzWYjM8gQH3jA58lgUyuvYEcJzChl5+QqBJnMn++C9zhIS52lKmve0cizrHXQxsd2P7APwR4It4DaNWsouOEftzyCfLbyzg77+bNhldJSFKzQFiCKSAlsTdvYFwztDTwT4uKUz5PVq13TdGvtcOWCBGETRZ29vLSsfp1aVIdxKC8G4corzf0KIy61MtnT+1LRX0vJV5x3XKNSCUU9asmmlMQFgko6525KbT9UKSp/w9uU9+vzPJXJb4ogeWRes5xi4o8vUVLrKEdBQBA4tRGocOLyuYuoOGsN5cz6N3mPsp1JJSvtsZzEFZOUQZk9f/Yj7tr5PeWtnUzunI16kkT+XF5c9Qspo8NMf3w5EQQEAWsgUOHEpYXFufozyp03lrzObDauu4+TWFmIi4c6MUmVKK5+Z6rUaTQTVOBEac6ygeTau5iLYMc+G6/BOkZccKlIOrMXpbYYzGHlU/21zyPngoAgUDEInFTiUh6RPxVWsGIWf4sxi4p3r6finatLiEUd3qlHVSM7Rjr2Kg0pvkEnsqeeQYln3c58pVliZIKdj73lC7d+wiS5l5z8QVhP4Q6FKG3xaZTS7BFKanC3SSoJEgQEgVMRgZNPXCoqbPTz5rPxL++gEuIpOMhLhrbwcHKXsqNqTEZtcmQ24ZnAkp1LbfGpZE/DFCyYrGwCdwifO4/c/LWfgi1v8Ycz9lHm5YvLlonEFgQEgZOGwKlDXCcNAilYEBAErIYABmAigoAgIAhYCgEhLks1l1RWEBAEgIAQl/QDQUAQsBwCQlyWazKpsCAgCAhxSR8QBAQByyEgxGW5JpMKCwKCgBCX9AFBQBCwHAJCXJZrMqmwICAICHFJHxAEBAHLISDEZbkmkwoLAoKAEJf0AUFAELAcAkJclmsyqbAgIAgIcUkfEAQEAcshIMRluSaTCgsCgoAQl/QBQUAQsBwCQlyWazKpsCAgCAhxSR8QBAQByyEgxGW5JpMKCwKCgBCX9AFBQBCwHAJCXJZrMqmwICAICHFJHxAEBAHLISDEZbkmkwoLAoKAEJf0AUFAELAcAkJclmsyqbAgIAgIcUkfEAQEAcshIMRluSaTCgsCgsD/AFt/MVAlcetCAAAAAElFTkSuQmCC","_close","updateCurrentPts","getBufferListLength","buf","videoRenderType","aiFace","viewResizeChange","getAllStatsData","poster","dynamicWatermarkConfig","downloadMemoryLog","use object detector, useWasm is ","checkVideoSmooth and videoCurrentTimeDiff is 0 so check\n videoCurrentTime is "," is greater than loadingTimeout ","decoder-pro-old.js","82xFWmmF","wasmPlayAudioUseVideoRender","_drawingRect","isOldHls","classList","_latestAudioTimestamp","playbackPauseOrResume","disableContextmenu is true, but contextmenuBtns is not empty, so Contextmenu can not be created,please check","isUseWCS","watermarkConfig","debugError","isAudioNotMute","\n so set useWCS false","_playingStartTimestamp","demux","_destroyLock","keys","videoIframeIntervalTs","decoderErrorAutoWasm","updatePtzPosition","isUseWASM"," and isPlaying is ","isVideoPlaying","openSyncAudioAndVideo","isWCSDecodeAudio","isIphone and set _opt.videoRenderSupportScale false","forEach","getMseVideoBufferDelayTime","useWebCanvas","controlAutoHide","playVodBackwordJumping","isIphone and is in wechat and is hls so set supportHls265 true","update","player is closed, so can not play"];return(CC=function(){return t})()}function RC(t,e){const s=CC();return(RC=function(t,e){return s[t-=184]})(t,e)}!function(t,e){const s=RC,i=t();for(;;)try{if(637614===-parseInt(s(463))/1+-parseInt(s(514))/2*(-parseInt(s(461))/3)+-parseInt(s(396))/4*(parseInt(s(718))/5)+parseInt(s(258))/6*(-parseInt(s(809))/7)+parseInt(s(388))/8+-parseInt(s(614))/9*(-parseInt(s(320))/10)+parseInt(s(664))/11*(parseInt(s(581))/12))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(CC);class DC extends Bi{constructor(t){const e=RC;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),this[e(771)]={},this[e(240)]=e(871),this.$container=t;const i=ni();if(this._opt=Object[e(467)]({},i,s),this[e(775)]=new Qt(this),this[e(648)](this[e(240)],"init and version is",Qe+":"+Ke),this._opt[e(727)]=!0,this._canPlayAppleMpegurl=!1,this._opt[e(636)]&&(this[e(771)][e(857)]=!1,this[e(771)][e(226)]=!1,this[e(771)][e(868)]=!0,this[e(771)][e(411)]=!1,this._opt.useSIMD=!1,this[e(771)].useWASM=!1,this._opt[e(532)]=!1),(ss()||es())&&(this[e(805)]=Ws(),this.debugLog(this[e(240)],"isIOS or isSafari and canPlayAppleMpegurl",this[e(805)])),Us()&&this._opt[e(695)]&&(this[e(648)](this[e(240)],e(836)),this[e(771)][e(695)]=!1),this[e(771)][e(603)]&&(hi(ee[e(228)])&&hi(this._opt[e(812)])&&(this[e(648)](this[e(240)],e(313)),this._opt[e(812)]=!1),ci(ee[e(228)])&&ci(this._opt[e(812)])&&(this.debugLog(this[e(240)],e(417)),this[e(771)].useWebFullScreen=!0)),di()&&(this.debugLog(this[e(240)],e(539)),this._opt.videoRenderSupportScale=!1,Fs()&&hi(this[e(771)][e(561)])&&ci(this[e(771)][e(677)])&&(this[e(648)](this[e(240)],e(545)),this[e(771)][e(677)]=!0)),ci(this[e(771)].playFailedAndReplay)&&(this[e(648)](this[e(240)],"_opt.playFailedAndReplay is false and set others replay params false"),this[e(771)].webglAlignmentErrorReplay=!1,this[e(771)][e(744)]=!1,this[e(771)][e(719)]=!1,this[e(771)].mseDecodeErrorReplay=!1,this[e(771)].mediaSourceTsIsMaxDiffReplay=!1,this[e(771)][e(484)]=!1,this[e(771)].wasmDecodeErrorReplay=!1,this._opt[e(325)]=!1,this[e(771)][e(420)]=!1,this[e(771)][e(445)]=!1,this[e(771)][e(822)]=!1,this[e(771)][e(811)]=!1,this[e(771)].mediaSourceUseCanvasRenderPlayFailedReplay=!1,this._opt.heartTimeoutReplay=!1,this._opt[e(335)]=!1,this[e(771)][e(685)]=!1,this[e(771)].streamErrorReplay=!1,this[e(771)].streamEndReplay=!1,this._opt[e(237)]=!1,this[e(771)].mediaSourceAudioG711NotSupportReplay=!1,this._opt.hardDecodingNotSupportAutoWasm=!1,this[e(771)][e(723)]=!1,this._opt[e(571)]=!1,this[e(771)].webcodecsAudioNoDataTimeoutReplay=!1,this[e(771)][e(212)]=!1,this[e(771)][e(554)]=!1,this[e(771)].networkDisconnectReplay=!1),this._opt[e(412)]&&(this[e(648)](this[e(240)],"_opt.hiddenControl is true and set others show btn to false"),Object[e(530)](this._opt[e(337)])[e(540)]((t=>{const s=e;this._opt[s(337)][t]&&-1===(""+t).indexOf("Fn")&&(this[s(771)][s(337)][t]=!1)})),this[e(771)][e(854)]=!1,this[e(771)][e(188)]=[],this[e(771)].controlHtml="",this.isPlayback()&&(this._opt.playbackConfig.showControl=!1)),this[e(771)][e(422)]&&(this[e(771)].useMSE=!0,this._opt.useWCS=!0,this._opt[e(532)]=!1,this[e(771)][e(736)]=!0,this[e(771)][e(604)]=!0,this._opt[e(659)]=!0),Si()&&(this[e(771)].watermarkConfig={image:{src:e(498),width:75,height:24},opacity:.5,right:10,top:10}),!this[e(771)][e(727)]&&("undefined"==typeof OffscreenCanvas?(this[e(771)][e(727)]=!0,this[e(771)][e(185)]=!1):this[e(771)][e(185)]=!0),this[e(771)].isMpeg4&&(this.debugLog(this.TAG_NAME,e(590)),this[e(771)][e(411)]=!1,this[e(771)][e(868)]=!1,this[e(771)][e(580)]=!1,this[e(771)][e(652)]=!1,this[e(771)].isFmp4=!1,this[e(771)][e(292)]=!0),this[e(274)]()&&(hi(this[e(771)].useMSE)&&hi(this[e(771)][e(659)])&&this.debugLog(this[e(240)],e(477)),this[e(771)].mseDecoderUseWorker=!1,hi(this[e(771)][e(411)])&&hi(this._opt[e(604)])&&this[e(648)](this[e(240)],e(200)),this[e(771)][e(604)]=!1),this[e(569)]()&&(this._opt[e(659)]=!1,hi(this._opt[e(411)])&&hi(this[e(771)][e(604)])&&this[e(648)](this[e(240)],e(405)),this[e(771)][e(604)]=!1,this._opt[e(677)]=!0),this[e(771)][e(507)]&&(this[e(771)][e(497)]=this[e(771)][e(507)]),ci(this[e(771)].muted)&&(this[e(771)].isNotMute=!0),this[e(771)][e(659)]&&(this._opt[e(659)]=function(){const t=Me;return!!(Nt[t(485)]&&Nt[t(379)]&&t(337)in Nt.MediaSource&&!0===Nt[t(379)][t(337)])}(),ci(this._opt.mseDecoderUseWorker)&&this.debugLog(this[e(240)],e(192))),(this.isOldHls()||this[e(322)]()||this[e(875)]())&&(this[e(648)](this[e(240)],e(195)),this[e(771)][e(411)]=!1,this[e(771)][e(868)]=!1,this[e(771)].isNakedFlow=!1,this[e(771)].useSIMD=!1,this._opt[e(187)]=!1,this._opt[e(292)]=!1,this[e(771)][e(582)]=l[e(895)]),this[e(771)][e(580)]&&(this[e(648)](this[e(240)],e(439)),this[e(771)][e(736)]=!1),$e()&&(this[e(648)](this[e(240)],e(197)),this[e(771)].mseDecodeAudio=!1),!this[e(517)]()&&!this[e(322)]()){if(this[e(771)][e(411)]){const t=function(){const t=Me;let e=!1;return"VideoDecoder"in Nt&&typeof Nt[t(619)]===t(579)&&(e=!0),e}(),s=fs();this[e(771)][e(411)]=t,this[e(771)][e(411)]&&this[e(771)][e(780)]&&(this[e(771)].useWCS=s),!this[e(771)][e(411)]&&this[e(423)](this[e(240)],e(762)+t+e(758)+s+" , _opt.isH265 is "+this[e(771)].isH265+e(526)),this._opt[e(411)]&&(this[e(771)][e(604)]&&(this[e(771)][e(604)]=function(){const t=Me;let e=!1;return t(350)in Nt&&typeof Nt[t(350)]===t(579)&&(e=!0),e}(),!this[e(771)].wcsDecodeAudio&&this[e(423)](this[e(240)],e(578))),this[e(771)][e(185)]?this._opt.wcsUseVideoRender=!1:this[e(771)][e(790)]&&(this[e(771)][e(790)]=ms()&&gs(),!this[e(771)][e(790)]&&this[e(423)](this[e(240)],e(858))))}if(this[e(771)][e(868)]){const t=function(){const t=Me;let e=!1;return t(379)in Nt&&typeof Nt[t(379)]===t(579)&&"function"==typeof Nt.MediaSource[t(609)]&&(e=!0),e}()||function(){const t=Me;let e=!1;return!(t(379)in Nt)&&"ManagedMediaSource"in Nt&&typeof Nt.ManagedMediaSource===t(579)&&typeof Nt[t(532)][t(609)]===t(579)&&(e=!0),e}(),s=ps()||function(){const t=Me;let e=!1;return!(t(379)in Nt)&&t(532)in Nt&&Nt[t(532)]&&(Nt.ManagedMediaSource.isTypeSupported($.hev)||Nt[t(532)][t(609)]($[t(612)])||Nt[t(532)][t(609)]($[t(353)])||Nt[t(532)].isTypeSupported($[t(464)])||Nt[t(532)][t(609)]($.hev5))&&(e=!0),e}();this[e(771)].useMSE=t,this[e(771)][e(868)]&&this[e(771)].isH265&&(this[e(771)][e(868)]=s),!this[e(771)][e(868)]&&this[e(423)](this[e(240)],"\n useMSE is true,\n and supportMSE is "+t+e(457)+s+e(749)+this[e(771)][e(780)]+e(459))}}if(ci(this[e(771)].useMSE)&&(this[e(771)][e(736)]=!1),ci(this[e(771)][e(411)])&&(this._opt.wcsDecodeAudio=!1),this._opt.useMSE?(this[e(771)].useWCS&&this[e(423)](this[e(240)],e(637)),!this[e(771)][e(727)]&&this[e(423)](this[e(240)],e(579)),this[e(771)][e(411)]=!1,this[e(771)][e(727)]=!0):this[e(771)][e(411)],this[e(771)][e(821)]&&this[e(771)].demuxUseWorker&&(this.debugWarn(this[e(240)],e(769)),this[e(771)][e(857)]=!1),this[e(771)][e(561)]&&this._opt[e(857)]&&(this[e(423)](this[e(240)],e(444)),this._opt.demuxUseWorker=!1),this.isPlayVod()&&this[e(771)][e(857)]&&(this.debugWarn(this[e(240)],e(465)),this[e(771)][e(857)]=!1),this[e(771)][e(875)]&&this._opt[e(857)]&&(this[e(423)](this.TAG_NAME,"isAliyunRtc is true and demuxUseWorker is true then demuxUseWorker set true->false"),this[e(771)][e(857)]=!1),this[e(435)]()&&this[e(771)][e(857)]&&(this.debugWarn(this[e(240)],"is stream use webTransport is true and demuxUseWorker is true then demuxUseWorker set true->false"),this._opt[e(857)]=!1),this[e(771)][e(604)]&&this[e(771)][e(857)]&&(this[e(423)](this[e(240)],e(698)),this._opt[e(857)]=!1),ci(this[e(771)][e(857)])&&(this[e(771)][e(659)]=!1),(this.isPlayback()||this.isPlayVod())&&(this[e(771)].mseDecoderUseWorker=!1),this[e(771)][e(309)]&&(this[e(771)].useMThreading=typeof SharedArrayBuffer!==Me(491),!this[e(771)].useMThreading&&this[e(423)](this[e(240)],e(472))),this._opt.useSIMD||-1!==this[e(771)][e(485)][e(787)](e(229))){const t=WebAssembly[Me(338)](new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])),s=di();this[e(771)][e(652)]=t&&ci(s),!this[e(771)][e(652)]&&this[e(423)](this.TAG_NAME,e(844)+t+e(486)+s+e(909))}if(this[e(771)][e(652)]?-1===this[e(771)][e(485)][e(787)](e(229))?this[e(771)][e(309)]?this[e(771)].isFFmpegSIMD?this[e(771)].decoder=this._opt[e(485)].replace("decoder-pro.js",e(427)):this[e(771)][e(485)]=this[e(771)][e(485)][e(301)](e(354),e(830)):this[e(771)].isFFmpegSIMD?this[e(771)][e(485)]=this[e(771)][e(485)][e(301)](e(354),e(184)):this[e(771)][e(485)]=this[e(771)][e(485)][e(301)]("decoder-pro.js",e(691)):this[e(771)][e(309)]&&(this[e(771)][e(408)]?this[e(771)][e(485)]=this._opt[e(485)][e(301)]("decoder-pro-simd.js","decoder-pro-f-simd-mt.js"):this[e(771)][e(485)]=this[e(771)].decoder[e(301)](e(691),e(830))):-1!==this[e(771)][e(485)].indexOf(e(229))?this[e(771)][e(309)]?this[e(771)].decoder=this[e(771)][e(485)][e(301)]("decoder-pro-simd.js","decoder-pro-mt.js"):this[e(771)][e(485)]=this[e(771)][e(485)][e(301)](e(691),e(354)):this[e(771)][e(309)]&&(this[e(771)][e(485)]=this[e(771)][e(485)][e(301)](e(354),e(843))),-1!==this[e(771)][e(485)].indexOf(e(229))?this[e(771)].useMThreading?(this[e(771)].decoderAudio=this[e(771)][e(485)][e(301)](e(830),"decoder-pro-audio.js"),this[e(771)][e(681)]=this[e(771)][e(485)][e(301)]("decoder-pro-simd-mt.js",e(224)),this[e(771)][e(788)]=this[e(771)][e(485)][e(301)](e(830),e(880)),this[e(771)][e(262)]=this[e(771)][e(485)].replace(e(830),e(513))):(this[e(771)][e(216)]=this[e(771)][e(485)][e(301)](e(691),e(835)),this._opt.decoderHard=this._opt.decoder.replace(e(691),e(224)),this[e(771)][e(788)]=this[e(771)].decoder[e(301)](e(691),e(880)),this[e(771)][e(262)]=this[e(771)][e(485)][e(301)](e(691),e(513))):this[e(771)][e(309)]?(this._opt[e(216)]=this._opt[e(485)].replace(e(843),e(835)),this[e(771)].decoderHard=this._opt.decoder.replace(e(843),e(224)),this[e(771)].decoderHardNotWasm=this._opt[e(485)].replace(e(843),"decoder-pro-hard-not-wasm.js"),this[e(771)].decoderOld=this[e(771)][e(485)][e(301)](e(843),"decoder-pro-old.js")):(this[e(771)][e(216)]=this[e(771)].decoder.replace(e(354),e(835)),this[e(771)][e(681)]=this[e(771)][e(485)][e(301)]("decoder-pro.js",e(224)),this[e(771)].decoderHardNotWasm=this[e(771)][e(485)][e(301)](e(354),e(880)),this[e(771)].decoderOld=this[e(771)][e(485)][e(301)](e(354),"decoder-pro-old.js")),ci(this._opt[e(264)])&&(this[e(771)][e(337)][e(651)]=!1),ci(this[e(771)][e(563)])&&(this[e(771)].operateBtns[e(612)]=!1,this._opt[e(337)].screenshot=!1,this[e(771)][e(337)][e(284)]=!1,this[e(771)][e(337)][e(610)]=!1,this._opt.operateBtns[e(671)]=!1,this[e(771)][e(337)][e(886)]=!1),this[e(771)][e(398)]&&0===this._opt.qualityConfig[e(635)]&&this[e(771)].operateBtns[e(671)]&&(this[e(771)][e(337)][e(671)]=!1,this[e(423)](this[e(240)],e(296))),hi(this[e(771)].useWebGPU)&&(this[e(771)].useWebGPU=function(){let t=!1;return Me(479)in navigator&&(t=!0),t}(),ci(this[e(771)][e(558)])&&this[e(423)](this.TAG_NAME,"useWebGPU is true, but not support so set useWebGPU false")),hi(this[e(771)][e(542)])&&(this[e(771)][e(542)]=ns(),ci(this[e(771)][e(542)])&&this.debugWarn(this[e(240)],e(241))),this[e(771)][e(868)]&&this._opt[e(327)]>this[e(771)][e(903)]&&(this[e(423)](this[e(240)],e(289)+this[e(771)].mseWaitVideoCanplayTimeout+e(512)+this[e(771)][e(903)]+e(230)),this._opt[e(327)]=Math[e(574)](this._opt.loadingTimeout-1,1)),this[e(771)][e(245)]=this._hasControl(),this[e(293)]=!1,this[e(642)]=!1,this._playbackPause=!1,this[e(609)]=!1,this[e(256)]=!1,this[e(213)]=!1,this[e(516)]=!1,this[e(708)]=!1,this._destroyLock=!1,this._closed=!1,this._checkHeartTimeout=null,this._checkLoadingTimeout=null,this[e(352)]=null,this._checkVisibleHiddenTimeout=null,this[e(713)]=null,this[e(387)]=!1,this[e(873)]={buf:0,netBuf:0,fps:0,maxFps:0,dfps:0,abps:0,vbps:0,ts:0,mseTs:0,currentPts:0,pTs:0,dts:0,mseVideoBufferDelayTime:0,isDropping:!1},this[e(566)]=[],this[e(588)]={},this[e(752)]=!1,this[e(283)]=!1,this[e(626)]=!1,this[e(259)]=!1,this[e(399)]={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this[e(696)]=0,this._audioTimestamp=0,this._latestAudioTimestamp=0,this[e(385)]=0,this[e(478)]=this[e(771)].defaultStreamQuality||"",!this[e(478)]&&this[e(771)][e(398)][e(635)]>0&&(this[e(478)]=this[e(771)].qualityConfig[0]||""),this[e(253)]=!0,this[e(285)]=null,this[e(882)]=null,this[e(605)]=[],this[e(368)]=[],this[e(584)]=[],this[e(219)]=null,this[e(650)]=null,this[e(841)]=null,this[e(402)]=null,this[e(462)]={},this._isStreamEnd=!1,this._startTimestamp=null,ci(this[e(771)][e(868)])&&ci(this[e(771)][e(411)])&&!this[e(322)]()&&!this[e(517)]()&&(this[e(771)][e(292)]=!0),(this[e(517)]()||this[e(322)]())&&(this[e(771)][e(563)]=!0,this._opt.hasAudio=!0),!this[e(771)][e(563)]&&(this[e(771)].useMSE=!1,this[e(771)][e(411)]=!1),this[e(771)][e(292)]&&(this[e(771)][e(185)]?this._opt.wasmUseVideoRender=!1:this._opt[e(455)]&&(this[e(771)][e(455)]=rs()&&ms()&&gs(),!this[e(771)][e(455)]&&this.debugWarn(this.TAG_NAME,e(469)),this[e(771)][e(455)]&&this[e(771)].wasmPlayAudioUseVideoRender&&(this[e(771)][e(515)]=function(){const t=Me;let e=!1;return t(569)in Nt&&"function"==typeof Nt[t(569)]&&(e=!0),e}(),!this[e(771)].wasmPlayAudioUseVideoRender&&this[e(423)](this[e(240)],e(820)))),this[e(771)][e(652)]?this.debugLog(this[e(240)],e(628)):this[e(648)](this.TAG_NAME,e(231))),this[e(771)].useWasm&&(this[e(771)][e(883)]&&window[e(207)]||this[e(771)].useObjectDetector&&window[e(294)]||this[e(771)][e(323)]&&window[e(653)]||this._opt[e(676)]&&window[e(870)])?(this.ai=new I_(this),!(this[e(771)][e(883)]&&window.JessibucaProFaceDetector)&&(this[e(771)][e(337)].aiFace=!1),!(this[e(771)].useObjectDetector&&window[e(294)])&&(this._opt[e(337)][e(782)]=!1),!(this._opt[e(323)]&&window[e(653)])&&(this[e(771)][e(337)][e(888)]=!1),this[e(771)][e(676)]&&this[e(771)][e(741)]&&window[e(870)]&&(this[e(266)]=!0)):(this[e(771)][e(337)][e(782)]=!1,this._opt[e(337)][e(504)]=!1,this[e(771)][e(337)].aiOcclusion=!1),this[e(771)][e(883)]&&(!this._opt[e(292)]||!window[e(207)])&&this[e(423)](this[e(240)],e(271)+this[e(771)][e(292)]+" and window.JbProFaceDetector is null"),this[e(771)][e(646)]&&(!this[e(771)][e(292)]||!window[e(294)])&&this.debugWarn(this[e(240)],e(510)+this._opt[e(292)]+e(255)),this[e(771)].useOcclusionDetector&&(!this._opt[e(292)]||!window.JessibucaProOcclusionDetector)&&this[e(423)](this[e(240)],"use occlusion detector, useWasm is "+this[e(771)][e(292)]+" and window.JessibucaProOcclusionDetector is null"),this[e(771)][e(676)]&&(!this[e(771)].useWasm||!window[e(870)])&&this[e(423)](this[e(240)],e(436)+this[e(771)][e(292)]+e(862)),this._opt[e(503)]&&(this[e(648)](this[e(240)],e(246)+this[e(771)][e(503)]),this._opt[e(503)]===f[e(729)]?(this[e(771)][e(668)]=!0,this._opt[e(733)]=!1):this[e(771)][e(503)]===f[e(572)]&&(this[e(771)][e(668)]=!1,this[e(771)][e(733)]=!0)),this._opt[e(668)]&&(this[e(771)][e(292)]&&!this[e(771)][e(185)]?(this[e(771)][e(455)]=rs()&&ms()&&gs(),!this[e(771)][e(455)]&&this[e(423)](this.TAG_NAME,e(469))):this[e(771)][e(411)]&&!this[e(771)][e(185)]&&(this[e(771)].wcsUseVideoRender=ms()&&gs(),!this[e(771)].wcsUseVideoRender&&this.debugWarn(this[e(240)],e(789)))),this._opt[e(733)]&&(this._opt[e(868)]&&ci(this[e(771)][e(659)])&&(this[e(771)][e(400)]=!0),this[e(771)].useWasm&&(this[e(771)][e(455)]=!1),this[e(771)][e(411)]&&(this[e(771)][e(790)]=!1),this[e(517)]()&&!ss()&&(this._opt.hlsUseCanvasRender=!0),this[e(322)]()&&(this[e(771)][e(415)]=!0)),this[e(771)].useVideoRender=!1,this[e(771)][e(733)]=!1,this[e(771)][e(292)]?this[e(771)][e(455)]?this[e(771)][e(668)]=!0:this[e(771)].useCanvasRender=!0:this[e(771)][e(411)]?this[e(771)][e(790)]?this[e(771)][e(668)]=!0:this[e(771)][e(733)]=!0:this[e(771)][e(868)]?this[e(771)].mseUseCanvasRender?this[e(771)][e(733)]=!0:this[e(771)][e(668)]=!0:this[e(517)]()?this._opt.hlsUseCanvasRender?this[e(771)][e(733)]=!0:this[e(771)][e(668)]=!0:this.isWebrtcH264()&&(this[e(771)][e(415)]?this[e(771)][e(733)]=!0:this[e(771)].useVideoRender=!0),this[e(771)][e(733)]&&this.useVideoPlayAudio()&&(this.debugLog(this[e(240)],"useCanvasRender is true and useVideoPlayAudio() return true, so set wcsDecodeAudio false"),this._opt[e(604)]=!1,this[e(771)][e(515)]=!1),(t=>{const e=_i;Object[e(212)](t,e(211),{get:()=>{const s=e;let i={width:0,height:0};return t[s(205)]&&(i=t.$container[s(201)](),i[s(214)]=Math[s(210)](i[s(214)],t[s(205)][s(213)]),i[s(209)]=Math[s(210)](i[s(209)],t[s(205)].clientHeight)),i}}),[e(207),e(209),e(203),e(204),e(197),e(214)][e(198)]((e=>{Object.defineProperty(t,e,{get:()=>t.rect[e]||0})}))})(this),this[e(817)]=new ki(this),this[e(274)]()&&(this[e(611)]=new g_(this,this[e(771)].playbackConfig)),this[e(569)]()&&(this[e(866)]=new wC(this,this[e(771)].playVodConfig)),this[e(771)][e(563)]&&(this[e(729)]=new Qn(this),this[e(243)]=new Ec(this)),this.isOldHls()?(this[e(645)]=new OE(this),this.loaded=!0):this[e(322)]()?(this[e(771)][e(745)]?this.webrtc=new sC(this):this._opt.isWebrtcForSRS?this[e(855)]=new G_(this):this._opt.isWebrtcForOthers?this[e(855)]=new Y_(this):this.webrtc=new Z_(this),this[e(615)]=!0):this[e(875)]()?(this[e(833)]=new oC(this),this[e(615)]=!0):(this.isUseHls265()&&(this[e(645)]=new Pk(this)),this[e(891)]()&&(this[e(855)]=new Z_(this)),this[e(682)]()&&(this.mp4Decoder=new u_(this)),ci(Hs(this[e(771)]))?this[e(270)]()?this[e(310)]=new Gc(this):this[e(310)]=new Uc(this):this.loaded=!0),this[e(305)]=null,this[e(528)]=null,this[e(826)]=null,this[e(839)]=null,this[e(658)]=!1,this[e(527)]=null,this[e(466)]=!1,this[e(365)]=!1,this[e(361)]=!1,this[e(562)]=!1,this[e(295)]=!1,this.isPlayFailedAndPaused=!1,this._seiList=[],this[e(597)]=null,this[e(771)][e(411)]&&!this._opt[e(264)]&&ci(this[e(771)][e(857)])&&(this[e(615)]=!0),this[e(771)][e(868)]&&ci(this[e(771)][e(659)])&&!this._opt[e(264)]&&ci(this._opt[e(857)])&&(this[e(615)]=!0),this[e(434)]=new Ym(this),this[e(771)][e(595)].length>0&&ci(this[e(771)][e(298)])&&Xe()?this[e(852)]=new __(this):hi(this[e(771)][e(298)])&&this._opt[e(595)][e(635)]>0&&Xe()&&this[e(423)](this[e(240)],e(521)),this._opt[e(337)][e(886)]&&(this[e(886)]=new v_(this)),function(){const t=Me;return/(iphone|ipad|ipod|ios|android)/i[t(396)](window[t(436)].userAgent.toLowerCase())}()&&ci(this[e(771)].supportLockScreenPlayAudio&&es())&&(this[e(760)]=new dg(this)),(t=>{const e=Di;try{const s=e=>{const s=Di;Ns(e)===t[s(207)]&&(t[s(214)](F.fullscreen,t[s(203)]),t.fullscreen?t._opt[s(221)]&&t.resize():t[s(216)]())};ee.on("change",s),t[e(246)][e(228)].push((()=>{const t=e;ee[t(192)](t(229),s)}))}catch(t){}if(t.on(M[e(237)],(()=>{const s=e;t.debugLog(s(249),"listen decoderWorkerInit and set loaded true"),t.loaded=!0})),t.on(M[e(201)],(()=>{t[e(202)]=!1})),t.on(M[e(203)],(s=>{const i=e;if(s)try{ee[i(220)](t.$container)[i(211)]((()=>{const e=i;t[e(243)](e(249),e(223))}))[i(239)]((e=>{const s=i;t.debugError(s(249),s(224),e,e[s(248)]()),t[s(219)](U[s(212)],e[s(248)]()),Je()&&t[s(226)][s(200)]&&(t[s(193)]=!0)}))}catch(e){Je()&&t._opt.useWebFullScreen&&(t[i(193)]=!0)}else try{ee.exit()[i(211)]((()=>{const e=i;t[e(243)](e(249),e(231)),t[e(193)]&&(t[e(193)]=!1)}))[i(239)]((e=>{const s=i;t[s(240)](s(249),s(205),e,e.toString()),t.emitError(U[s(212)],e[s(248)]()),t[s(193)]&&(t[s(193)]=!1)}))}catch(e){t[i(193)]&&(t[i(193)]=!1)}})),Je()&&t.on(M[e(193)],(s=>{const i=e;s?t[i(207)][i(241)][i(197)]("jb-pro-fullscreen-web"):t[i(207)][i(241)][i(199)](i(210)),t.emit(F[i(203)],t.fullscreen)})),t.on(M[e(216)],(()=>{t[e(216)]()})),t[e(226)][e(242)]){const s=[M[e(251)],M[e(222)],M.videoSEI,M[e(236)],M[e(198)],M.videoSmooth],i=[M[e(206)],M[e(247)],M.playbackTimestamp,M[e(245)],M[e(209)],M[e(233)],M[e(217)]];Object[e(213)](M).forEach((e=>{t.on(M[e],(function(r){const n=Di;if(!s[n(194)](e)){i.includes(e)&&(r=JSON[n(191)](r));for(var o=arguments[n(244)],a=new Array(o>1?o-1:0),h=1;h{t.on(U[e],(function(){const s=Di;for(var i=arguments[s(244)],r=new Array(i),n=0;n{const s=e;this[s(742)]({rotate:t?270:0}),this[s(667)]()}),10)}get[_C(425)](){const t=_C;return this[t(194)][t(518)][t(316)](t(701))}set[_C(615)](t){this[_C(256)]=t}get loaded(){const t=_C;return this._hasLoaded||this[t(517)]()||this[t(322)]()||this._opt[t(868)]&&ci(this[t(771)][t(264)])&&ci(this._opt.demuxUseWorker)||this[t(771)].useWCS&&!this[t(771)][t(264)]&&ci(this[t(771)].demuxUseWorker)}set[_C(446)](t){const e=_C;this[e(889)]()&&t?this[e(648)](this[e(240)],e(547)):(t&&hi(this[e(336)])&&(this[e(336)]=!1),this[e(446)]!==t&&(this._playing=t,this[e(433)](M[e(446)],t),t?(this[e(433)](M[e(389)],this.volume),this.emit(M[e(906)])):this.emit(M.pause)))}get[_C(446)](){return this._playing}get volume(){const t=_C;return this[t(651)]&&this.audio[t(890)]||0}set[_C(890)](t){const e=_C;t!==this[e(890)]&&(this[e(651)]?(this[e(651)][e(860)](t),this[e(826)]=this.volume,this[e(839)]=0===this.volume):this[e(423)](this.TAG_NAME,e(750)))}get lastVolume(){return this[_C(826)]}set loading(t){const e=_C;this[e(336)]!==t&&(this._loading=t,this[e(433)](M[e(336)],this._loading))}get loading(){return this[_C(293)]}set[_C(748)](t){const e=_C;this[e(297)]()||this.zooming!==t&&(!this[e(886)]&&(this[e(886)]=new v_(this)),this[e(213)]=t,this[e(433)](M[e(748)],this[e(748)]))}get[_C(748)](){return this[_C(213)]}set[_C(798)](t){const e=_C;this[e(297)]()||this.drawingRect!==t&&(!this.drawRectangle&&(this[e(560)]=new yC(this)),this[e(516)]=t,this.emit(M.drawingRect,this[e(798)]))}get[_C(798)](){return this._drawingRect}set recording(t){const e=_C;t?this.playing&&!this[e(372)]&&(this.recorder&&this[e(243)][e(663)](),this.isDemuxInWorker()&&this[e(310)]&&this.decoderWorker[e(781)]({key:e(403),value:!0})):this[e(372)]&&(this[e(308)]()&&this[e(310)]&&this[e(310)][e(781)]({key:e(403),value:!1}),this[e(243)]&&this[e(243)][e(791)]()[e(751)]((()=>{}))[e(363)]((t=>{})))}get[_C(372)](){return!!this[_C(243)]&&this.recorder.isRecording}set[_C(248)](t){null!==t&&(this[_C(773)]=t)}get[_C(248)](){return this[_C(773)]}set[_C(885)](t){null!==t&&(this._latestAudioTimestamp=t)}get latestAudioTimestamp(){return this[_C(519)]}get videoTimestamp(){const t=_C;return this[t(873)][t(898)]||this[t(873)].ts}set streamQuality(t){const e=_C;this[e(738)]!==t&&(this._streamQuality=t,this.emit(M[e(634)],t))}get[_C(738)](){return this[_C(478)]}get isDebug(){const t=_C;return hi(this[t(771)][t(775)])}get[_C(647)](){const t=_C,e=this[t(771)],s=e.isResize,i=e[t(204)];let r=J[t(583)];return ci(i)&&ci(s)?r=J.full:ci(i)&&hi(s)?r=J.auto:hi(i)&&hi(s)&&(r=J[t(345)]),r}set[_C(437)](t){const e=_C;this[e(253)]!==t&&(this._visibility=t,this[e(433)](M[e(214)],t),this[e(285)]=je(),t?this[e(629)]():this[e(267)]())}get[_C(437)](){return this[_C(253)]}set[_C(393)](t){const e=_C;this[e(767)]!==t&&(this._playbackPause=t,this[e(433)](M.playbackPause,t),this[e(433)](M[e(520)],t),hi(t)&&this[e(372)]&&(this.debugLog(this[e(240)],e(302)),this[e(372)]=!1))}get playbackPause(){return this[_C(274)]()&&this._playbackPause}set playVodPause(t){const e=_C;this[e(866)]&&(this[e(866)].isEnded()&&ci(t)?this[e(433)](M.playVodEndedAndReplay):this[e(609)]!==t&&(this._playVodPause=t,this[e(433)](M.playVodPause,t),this[e(433)](M.playVodPauseOrResume,t),hi(t)&&this.recording&&(this[e(648)](this[e(240)],e(220)),this.recording=!1)))}get[_C(413)](){const t=_C;return this[t(569)]()&&this[t(609)]}set videoIframeIntervalTs(t){this[_C(385)]=t}get[_C(531)](){return this[_C(385)]}set faceDetectActive(t){const e=_C;this[e(752)]!==t&&(this[e(752)]=t,this[e(433)](M[e(670)],t))}get faceDetectActive(){return this[_C(752)]}set[_C(358)](t){const e=_C;this[e(283)]!==t&&(this[e(283)]=t,this[e(433)](M[e(358)],t))}get[_C(358)](){return this[_C(283)]}set[_C(430)](t){const e=_C;this[e(626)]!==t&&(this[e(626)]=t,this[e(433)](M[e(430)],t))}get[_C(430)](){return this[_C(626)]}set[_C(266)](t){const e=_C;this[e(259)]!==t&&(this[e(259)]=t)}get imageDetectActive(){return this[_C(259)]}get[_C(807)](){const t=_C;return this.stream&&this[t(305)][t(627)]()===h.worker}[_C(623)](){return this[_C(708)]}[_C(300)](){const t=_C;return this[t(708)]&&this[t(529)]}[_C(889)](){return this[_C(800)]}[_C(297)](){const t=_C;return this[t(623)]()||this[t(889)]()}isLoading(){return this.loading}[_C(239)](){const t=_C;let e=!1;return this[t(688)]()?e=this[t(446)]:this[t(274)]()?e=ci(this[t(393)])&&this[t(446)]:this[t(569)]()&&(e=ci(this.playVodPause)&&this[t(446)]),e}[_C(742)](t){const e=_C;let s=arguments[e(635)]>1&&void 0!==arguments[1]&&arguments[1];this._opt=Object[e(467)]({},this[e(771)],t),hi(s)&&this[e(310)]&&Object[e(530)](t)[e(540)]((s=>{const i=e;this.decoderWorker[i(781)]({key:s,value:t[s]})}))}[_C(621)](){return new Promise(((t,e)=>{const s=RC;mi()&&(this[s(757)]=new lC(this)),!this.video&&this[s(771)][s(563)]&&(this[s(729)]=new Qn(this)),!this[s(651)]&&this._opt[s(264)]&&(this[s(651)]=new Ko(this)),!this[s(305)]&&(this[s(305)]=new ja(this)),this.isOldHls()?(!this[s(645)]&&(this[s(645)]=new OE(this),this.loaded=!0),t()):this.isWebrtcH264()?(this.webrtc||(this[s(771)][s(745)]?this.webrtc=new sC(this):this[s(771)][s(261)]?this[s(855)]=new G_(this):this[s(771)][s(273)]?this[s(855)]=new Y_(this):this[s(855)]=new Z_(this),this[s(615)]=!0),t()):this[s(875)]()?(!this.aliyunRtcDecoder&&(this[s(833)]=new oC(this),this[s(615)]=!0),t()):(!this[s(528)]&&this[s(771)][s(563)]&&!this[s(807)]&&(this.demux=new Yf(this)),this._opt[s(411)]&&!this[s(837)]&&(this[s(837)]=new pm(this),!this[s(771)][s(264)]&&ci(this[s(771)].demuxUseWorker)&&(this[s(615)]=!0)),this._opt.useMSE&&ci(this[s(771)][s(659)])&&!this[s(357)]&&(this[s(357)]=new ng(this),!this[s(771)][s(264)]&&ci(this[s(771)][s(857)])&&(this[s(615)]=!0)),this.isUseHls265()&&!this.hlsDecoder&&(this[s(645)]=new Pk(this)),this[s(891)]()&&!this[s(855)]&&(this[s(855)]=new Z_(this)),this[s(682)]()&&!this[s(205)]&&(this[s(205)]=new u_(this)),this[s(310)]?this[s(615)]?t():this.once(M[s(828)],(()=>{const i=s;this.isDestroyedOrClosed()?(this.debugError(this[i(240)],"init() failed and player is destroyed"),e("init() failed and player is destroyed")):(this[i(615)]=!0,t())})):ci(Hs(this._opt))?(this[s(270)]()?this[s(310)]=new Gc(this):this[s(310)]=new Uc(this),this[s(753)](M[s(828)],(()=>{const i=s;this[i(297)]()?(this[i(524)](this[i(240)],i(303)),e(i(303))):(this[i(615)]=!0,t())}))):t())}))}[_C(906)](t){const e=_C;let s=arguments[e(635)]>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,r)=>{const n=e;if(!t&&!this[n(771)].url)return r(n(639));this[n(800)]=!1,this[n(336)]=!0,this[n(446)]=!1,this[n(399)][n(910)]=je(),!t&&(t=this[n(771)][n(630)]),this[n(771)].url=t,this[n(434)]&&this[n(771)][n(454)]&&this[n(434)].initLoadingBackground(),this.init()[n(751)]((()=>{const e=n;if(this[e(648)](this.TAG_NAME,e(371)),this[e(399)].playStart=je(),this[e(771)][e(333)]&&this[e(416)](!1),this[e(881)](),this[e(720)](),this[e(305)]){if(this[e(305)][e(753)](U[e(452)],(t=>{const s=e;this.emitError(U[s(452)],t),r(t)})),this[e(305)][e(753)](U.hlsError,(t=>{const s=e;this[s(456)](U[s(338)],t),r(t)})),this[e(305)][e(753)](U[e(330)],(t=>{const s=e;this[s(456)](U[s(330)],t),r(t)})),this[e(305)][e(753)](M[e(834)],(()=>{const t=e;if(i(),this[t(399)][t(802)]=je(),this[t(729)]&&this.video[t(906)](),this[t(699)](),this[t(274)]()&&this[t(611)]?(this[t(611)][t(598)](),this[t(611)][t(661)]()):this[t(569)]()&&this[t(866)]&&this[t(866)][t(598)](),Si()){const e=Number("1")||1;setTimeout((()=>{const e=t;this[e(383)](),console[e(251)](decodeURIComponent(Kt)),alert(decodeURIComponent(Ht)),window.location[e(717)]()}),60*e*60*1e3)}})),wi())return r(decodeURIComponent(Ht));this[e(305)][e(318)](t,s)}else this[e(423)](this[e(240)],e(795)+this[e(297)]()),r("this.stream is null")})).catch((t=>{r(t)}))}))}playForControl(){return new Promise(((t,e)=>{const s=RC;this[s(648)](this.TAG_NAME,s(799)+this[s(771)][s(606)]),this[s(771)][s(606)]&&this[s(219)]&&this[s(219)][s(454)]&&this[s(742)]({loadingBackground:this._tempInnerPlayBgobj[s(454)],loadingBackgroundWidth:this._tempInnerPlayBgobj.loadingBackgroundWidth,loadingBackgroundHeight:this[s(219)][s(879)]}),this[s(906)]()[s(751)]((e=>{t(e)}))[s(363)]((t=>{e(t)}))}))}close(){return new Promise(((t,e)=>{const s=RC;this[s(499)]()[s(751)]((()=>{const e=s;this[e(729)]&&this[e(729)][e(732)](),t()}))[s(363)]((t=>{e(t)}))}))}[_C(288)](){const t=_C;this[t(884)]&&ci(this._isMute)&&(this[t(890)]=this[t(884)])}async _close(){const t=_C;this[t(800)]=!0,this[t(729)]&&(this.video[t(785)](),this.video[t(806)](!0)),this[t(336)]=!1,this[t(372)]=!1,this[t(748)]=!1,this.clearCheckLoadingTimeout(),this.clearStatsInterval(),this[t(274)]()&&this.playback&&this[t(611)][t(887)](),this[t(569)]()&&this[t(866)]&&this[t(866)][t(887)](),this[t(662)](),this[t(754)](),this[t(773)]=0,this[t(696)]=0,this[t(399)]={playInitStart:"",playStart:"",streamStart:"",streamResponse:"",demuxStart:"",decodeStart:"",videoStart:"",playTimestamp:"",streamTimestamp:"",streamResponseTimestamp:"",demuxTimestamp:"",decodeTimestamp:"",videoTimestamp:"",allTimestamp:""},this[t(310)]&&(await this[t(310)][t(383)](),this.decoderWorker=null),this[t(305)]&&(await this[t(305)][t(383)](),this[t(305)]=null),this[t(528)]&&(this.demux.destroy(),this[t(528)]=null),this[t(837)]&&(await this.webcodecsDecoder[t(383)](),this[t(837)]=null),this[t(357)]&&(this[t(357)].destroy(),this[t(357)]=null),this[t(645)]&&(await this[t(645)].destroy(),this[t(645)]=null),this[t(855)]&&(this.webrtc[t(383)](),this.webrtc=null),this.aliyunRtcDecoder&&(this.aliyunRtcDecoder[t(383)](),this[t(833)]=null),this[t(651)]&&(await this[t(651)].destroy(),this.audio=null),this[t(205)]&&(await this[t(205)][t(383)](),this[t(205)]=null),this.playing=!1}pause(){const t=_C;let e=arguments[t(635)]>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((s,i)=>{const r=t;e?this[r(272)]()[r(751)]((()=>{s()})).catch((t=>{i(t)})):this[r(499)]()[r(751)]((()=>{s()}))[r(363)]((t=>{i(t)}))}))}[_C(244)](){return new Promise(((t,e)=>{const s=RC;if(this[s(648)](this.TAG_NAME,s(557)),this[s(771)][s(606)]&&this[s(729)]){const t=this[s(729)][s(331)]("",s(464),.92,s(366));if(t){const e=this[s(329)]();e?(this.debugLog(this[s(240)],s(620)+e[s(355)]+s(496)+e[s(394)]),this[s(219)]={loadingBackground:t,loadingBackgroundWidth:e[s(355)],loadingBackgroundHeight:e.height}):this[s(423)](this[s(240)],s(341))}else this[s(423)](this.TAG_NAME,"pauseForControl() and loadingBackground is null")}this[s(806)]()[s(751)]((e=>{t(e)}))[s(363)]((t=>{e(t)}))}))}[_C(846)](){const t=_C;let e=!0;return this.audio&&(e=this[t(651)][t(856)]),e}[_C(525)](){return!this[_C(846)]()}[_C(416)](t){const e=_C;this.audio&&this[e(651)].mute(t)}resize(){const t=_C;this.video&&this[t(729)].resize()}[_C(663)](t,e){const s=_C;this[s(372)]||(this[s(243)][s(379)](t,e),this[s(372)]=!0)}[_C(728)](){return new Promise(((t,e)=>{const s=RC;!this.recorder&&e(s(618)),this.recording&&(this[s(771)][s(292)]&&this[s(310)]&&this[s(310)][s(781)]({key:s(403),value:!1}),this[s(243)][s(728)]()[s(751)]((()=>{t()}))[s(363)]((t=>{e(t)})))}))}[_C(791)](t,e){return new Promise(((s,i)=>{const r=RC;!this[r(243)]&&i("recorder is null"),this.recording?(this[r(771)][r(292)]&&this[r(310)]&&this[r(310)][r(781)]({key:r(403),value:!1}),this.recorder.stopRecordAndSave(t,e)[r(751)]((t=>{s(t)}))[r(363)]((t=>{i(t)}))):i(r(641))}))}_hasControl(){const t=_C;let e=!1,s=!1;return Object[t(530)](this[t(771)].operateBtns)[t(540)]((e=>{const i=t;this[i(771)][i(337)][e]&&-1===(""+e)[i(787)]("Fn")&&(s=!0)})),(this._opt[t(854)]||s)&&(e=!0),this[t(771)][t(188)]&&this[t(771)].extendOperateBtns[t(635)]>0&&(e=!0),this[t(274)]()&&this._opt[t(803)][t(774)]&&(e=!0),this[t(569)]()&&(e=!0),this[t(771)][t(359)]&&(e=!0),e}[_C(649)](){const t=_C;return ci(this[t(771)][t(868)])&&ci(this._opt[t(411)])}canVideoTrackWritter(){const t=_C,e=this[t(771)];return!this[t(517)]()&&!this[t(322)]()&&ci(e[t(868)])&&!this[t(875)]()&&(e[t(411)]&&ci(e[t(185)])&&e[t(790)]||this.useWasmDecode())}[_C(552)](){const t=_C;if(ci(this[t(393)])&&ci(this[t(413)])&&this[t(446)]){if(this[t(297)]())return void this[t(423)](this[t(240)],t(382));if(ci(this[t(227)]()))return void this[t(423)](this.TAG_NAME,"checkHeartTimeout$2 but fps is not all zero");if(0!==this._stats[t(840)])return void this[t(423)](this.TAG_NAME,t(428)+this[t(873)][t(840)]);const e=this._historyFpsList[t(704)](",");this.debugWarn(this[t(240)],t(202)+this[t(873)].vbps+" and\n current fps is "+this._stats[t(840)]+t(832)+e+t(734)+this[t(437)]+t(242)),this[t(433)](M[t(347)],M[t(573)]),this[t(433)](M[t(573)])}else this[t(648)](this[t(240)],t(460)+this[t(393)]+t(395)+this[t(446)])}[_C(699)](){const t=_C;this[t(352)]=setInterval((()=>{this[t(747)]()}),1e3)}[_C(720)](){const t=_C;this.isPlayVod()?this[t(648)](this[t(240)],"checkLoadingTimeout and is playVod so return"):this[t(709)]=setTimeout((()=>{const e=t;this.playing?this.debugWarn(this[e(240)],e(853)+this[e(336)]+e(360)+this.playing):this.isDestroyedOrClosed()?this[e(423)](this[e(240)],e(777)):(this.debugWarn(this[e(240)],e(319)),this[e(433)](M[e(347)],M[e(903)]),this[e(433)](M[e(903)]))}),1e3*this._opt[t(903)])}[_C(905)](){const t=_C;this[t(709)]&&(this[t(648)](this.TAG_NAME,t(905)),clearTimeout(this[t(709)]),this[t(709)]=null)}[_C(887)](){const t=_C;this[t(352)]&&(clearInterval(this[t(352)]),this[t(352)]=null)}handleRender(){const t=_C;this.isDestroyedOrClosed()?this.debugLog(this[t(240)],t(381)):(this[t(336)]&&(this[t(905)](),this.loading=!1,this[t(433)](M[t(432)]),this[t(849)]()),!this[t(446)]&&(this[t(446)]=!0))}[_C(849)](){const t=_C,e=ls(this.$container);(e||this[t(425)])&&(this[t(648)](this[t(240)],t(346)+e+t(823)+this[t(425)]),this[t(612)]=!0,this[t(433)](M[t(616)]))}[_C(747)](){const t=_C;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this[t(297)]())return void this[t(648)](this[t(240)],t(211));if(!this[t(713)]&&(this[t(713)]=je(),this[t(730)]=this[t(713)]),vs(e.ts)){const s=parseInt(e.ts,10);this[t(873)].ts=s,this[t(566)][t(786)](s),null===this[t(527)]&&s>0&&(this[t(527)]=s)}vs(e[t(373)])&&(this[t(873)][t(373)]=parseInt(e[t(373)],10)),vs(e[t(814)])&&(this[t(873)][t(814)]=e[t(814)]),vs(e[t(502)])&&(this[t(873)][t(502)]=e[t(502)]),vs(e[t(801)])&&(this._stats[t(801)]=e[t(801)]),vs(e[t(898)])&&(this[t(873)].currentPts=e[t(898)]),e[t(840)]&&(this._stats[t(840)]+=1),e[t(792)]&&(this[t(873)][t(792)]+=1),e.abps&&(this._stats.abps+=e[t(490)]),e.vbps&&(this[t(873)].vbps+=e[t(475)]),e[t(824)]&&(this[t(882)]=e.workerStats),e[t(380)]&&(this._stats[t(380)]=e.isDropping),e[t(198)]&&(this[t(873)][t(198)]=parseInt(1e3*e[t(198)],10));const s=je();if(s-this[t(713)]<1e3)return;null!==this[t(527)]&&this[t(873)].fps>0&&(this[t(873)][t(697)]+=1);let i=0,r=0,n=0,o=0,a=0;this[t(776)]()&&this[t(771)][t(868)]&&(this[t(357)]?(i=this[t(357)][t(845)](),i=parseInt(1e3*i,10),r=this.mseDecoder[t(275)](),r=r[t(458)](2),o=this[t(357)][t(324)](),a=this[t(357)][t(784)]()):this[t(470)]()&&(i=this.video[t(845)](),i=parseInt(1e3*i,10),r=this[t(729)][t(275)](),r=r[t(458)](2),o=this[t(729)][t(324)]())),this[t(771)][t(411)]&&this[t(837)]&&(n=this.webcodecsDecoder[t(607)]()),this[t(517)]()&&this.hlsDecoder&&(i=this.hlsDecoder[t(690)](),i=parseInt(1e3*i,10));let h=0,c=0,l=0;this[t(575)]()&&this[t(645)]&&(i=this.hlsDecoder.checkHlsBufferedDelay(),i=i[t(458)](2),h=this[t(645)].getDemuxBufferedListLength(),l=this[t(645)][t(772)](),c=this[t(645)][t(644)]());let u=0,p=0,f=0,m=!1,g=0,A=0;this[t(308)]()?this[t(882)]&&(p=this._tempWorkerStats[t(764)],f=this[t(882)].audioDemuxBufferDelay,u=this[t(882)][t(825)],this._stats.netBuf=this[t(882)].netBuf,g=this[t(882)][t(419)],m=this[t(882)][t(476)],this[t(873)].buf=this[t(882)][t(367)],A=this[t(882)][t(692)]):this[t(528)]&&(u=this[t(528)][t(859)](),g=this[t(528)][t(304)](),m=this.demux[t(287)](),this[t(528)][t(397)]&&(p=this.demux[t(397)].length));let y=0,b=0;this.audio&&this[t(651)][t(397)]&&(y=this[t(651)][t(397)][t(635)],b=parseInt(y*this.audio[t(386)],10));let v=0,S=0;if(this[t(274)]()){if(this.video){this[t(771)][t(803)][t(679)]&&(v=this[t(729)][t(397)]&&this.video[t(397)][t(635)]||0);let e=this.video[t(770)]();const s=e>0?1e3/e:0;S=parseInt(s*v+s*p,10)}}else this[t(569)]()&&this[t(729)]&&(v=this[t(729)][t(397)]&&this[t(729)][t(397)][t(635)]||0);let w=0;this[t(190)]>0&&(w=this[t(873)][t(373)]-this[t(190)]);const E=w+this[t(873)][t(801)];this[t(517)]()&&(this[t(873)][t(840)]=this[t(645)][t(675)]()),this[t(873)][t(840)]>this[t(873)].maxFps&&(this[t(873)][t(203)]=this._stats[t(840)]);let I=this[t(831)]();const T=this._stats[t(370)];let k=-1;T&&I&&(k=os((I-T)[t(458)](2)),I=I[t(458)](2));let _=0;this.audioTimestamp>0&&(_=this[t(248)]-this.getRenderCurrentPts()),this[t(588)]=Object[t(467)](this[t(873)],{audioBuffer:y,audioBufferDelayTs:b,audioTs:this.audioTimestamp,latestAudioTs:this[t(885)],playbackVideoBuffer:v,playbackVideoWaitingBuffer:0,playbackAudioWaitingBuffer:0,playbackCacheDataDuration:S,demuxBuffer:p,pushLatestDelay:g,audioDemuxBuffer:f,streamBuffer:u,mseDelay:i,mseStore:r,mseDecodePlaybackRate:o,msePendingBuffer:a,wcsDecodeDiffTimes:n,wasmDecodeDelay:A,hlsDelay:i,hlsDemuxLength:h,hlsDemuxAudioLength:c,hlsDemuxVideoLength:l,delayTs:w,totalDelayTs:E,isStreamTsMoreThanLocal:m,videoCurrentTime:I,videoCurrentTimeDiff:k,audioSyncVideo:_});let C=null,R=null,D="";if(this[t(688)]()&&this[t(771)][t(563)]&&this[t(446)]){C=function(t,e){let s=3;const i=e||25;return t<=i*(1/4)?s=0:t<=.5*i?s=1:t<=i*(3/4)&&(s=2),s}(this[t(873)][t(840)],this[t(841)]),this[t(588)][t(268)]=C;const e=this[t(570)](this[t(588)]);D=e[t(406)],R=e[t(656)],this[t(588)].videoSmooth=R}if(this[t(433)](M[t(838)],this._allStatsData),this[t(588)][t(907)]>this[t(771)][t(481)]&&this[t(392)]()===d.flv&&this[t(433)](U.flvDemuxBufferSizeTooLarge,this[t(588)][t(907)]),this[t(771)].hasVideo?(this[t(390)](this[t(873)][t(840)],this[t(588)][t(829)]),vs(C)&&this[t(433)](M[t(268)],C),vs(R)&&this.emit(M.videoSmooth,R,D)):this[t(771)].hasAudio&&this.updateHistoryFpsList(this._stats[t(490)],0),this[t(873)][t(840)]=0,this._stats[t(792)]=0,this._stats[t(490)]=0,this[t(873)][t(475)]=0,this._tempTsList=[],this._stats[t(380)]=!1,this[t(713)]=s,Si()){const e=s-this[t(730)];e>60*(Number("1")||1)*60*1e3&&Si()&&this[t(383)]()}}[_C(549)](){this._startBpsTime=null}[_C(754)](){const t=_C;this[t(713)]=null,this[t(527)]=null,this[t(605)]=[],this[t(368)]=[],this[t(873)]={buf:0,netBuf:0,fps:0,maxFps:0,dfps:0,abps:0,vbps:0,ts:0,mseTs:0,currentPts:0,pTs:0,dts:0,mseVideoBufferDelayTime:0,isDropping:!1},this[t(588)]={},this[t(566)]=[]}[_C(570)](t){const e=_C;let s=!0,i="";if(this._opt[e(269)],this[e(771)][e(714)],this[e(322)]()||this[e(517)]())return{result:s,reason:i};if(0===t[e(475)]&&ci(this[e(771)][e(561)])&&(i="vbpsIsZero",this[e(648)](this[e(240)],"checkVideoSmooth false because "+i),s=!1),s&&t[e(380)]&&(i=e(483),this[e(648)](this[e(240)],e(215)+i),s=!1),s&&this[e(437)]&&this[e(605)][e(635)]>=this._opt[e(735)]){const r=function(t){const e=Math.max(...t),s=Math.min(...t);return t.filter((t=>t!==e&&t!==s))}(this[e(605)]),n=r[e(210)](((t,e)=>t+e),0)/r[e(635)],o=.83*n;t[e(840)]=1.5||t[e(829)]<=.5)&&-1!==t[e(829)]){if(i=e(565),this[e(648)](this[e(240)],e(694)+t[e(829)]),0===Number(t.videoCurrentTimeDiff)){const t=this[e(536)](),s=this[e(831)](),i=this[e(763)](),r=JSON[e(438)](i);this[e(648)](this.TAG_NAME,e(511)+s+e(535)+t+e(872)+r)}s=!1}return{result:s,reason:i}}enableWakeLock(){const t=_C;this[t(771)][t(760)]&&this[t(760)]&&this[t(760)].enable()}[_C(662)](){const t=_C;this[t(771)][t(760)]&&this[t(760)]&&this.keepScreenOn[t(899)]()}[_C(191)](){const t=_C;this[t(771)][t(292)]?this[t(310)]&&this.decoderWorker.clearWorkBuffer(!0):this[t(528)]&&this.demux[t(710)](!0)}[_C(577)](){const t=_C;this[t(433)](M[t(680)])}[_C(599)](){const t=_C;if(this[t(297)]())return void this[t(648)](this[t(240)],t(334));const e=this[t(233)]();this[t(433)](M.playToRenderTimes,e)}getPlayToRenderTimes(){const t=_C,e=this[t(399)];return e.playTimestamp=e[t(493)]-e[t(910)],e[t(724)]=e[t(586)]-e[t(493)],e[t(673)]=e[t(802)]-e[t(586)]>0?e[t(802)]-e[t(586)]:0,e[t(290)]=e.demuxStart-e[t(802)]>0?e.demuxStart-e[t(802)]:0,e[t(223)]=e[t(622)]-e[t(201)]>0?e[t(622)]-e[t(201)]:0,e[t(190)]=e[t(193)]-e[t(622)],e.allTimestamp=e[t(193)]-e[t(910)],e}[_C(339)](){return this._opt}[_C(247)](){const t=_C;return this[t(771)][t(897)]}isPlayer(){const t=_C;return this[t(771)][t(897)]===c[t(850)]}[_C(274)](){const t=_C;return this._opt[t(897)]===c.playbackTF}[_C(569)](){const t=_C;return this._opt.playType===c[t(866)]}[_C(474)](){const t=_C;let e=!1;return this[t(569)]()&&this[t(866)]&&(e=this[t(866)][t(810)]()),e}[_C(491)](){const t=_C;let e=!1;return this[t(569)]()&&this[t(866)]&&(e=this[t(866)].isEnded()),e}[_C(270)](){const t=_C;return this[t(771)][t(292)]&&this[t(771)][t(309)]}[_C(776)](){const t=_C;return this[t(688)]()||this[t(274)]()}[_C(702)](){const t=_C;let e=!0,s=this._opt;return s[t(411)]&&!s[t(185)]?e=!!this[t(837)]&&this[t(837)].hasInit:s[t(868)]&&(e=!!this.mseDecoder&&this[t(357)][t(548)]),e}[_C(804)](){const t=_C;let e=!0,s=this[t(771)];return s[t(411)]&&!s.useOffscreen?e=!!this[t(837)]&&this[t(837)].isDecodeFirstIIframe:s[t(868)]&&(e=!!this[t(357)]&&this[t(357)][t(443)]),e}[_C(592)](){const t=_C;let e=!1;return this[t(651)]&&(e=this[t(651)][t(340)]()),e}[_C(553)](){const t=_C;return this[t(873)][t(697)]}[_C(564)](){const t=_C;let e=null;return this[t(243)]&&(e=this.recorder[t(847)]()),e}[_C(633)](){const t=_C;let e=0;return this[t(372)]&&(e=this[t(243)].getToTalByteLength()),e}getRecordingDuration(){const t=_C;let e=0;return this[t(372)]&&(e=this[t(243)][t(783)]()),e}getDecodeType(){const t=_C;let e="";const s=this.getOption();return this[t(322)]()?p[t(855)]:this[t(875)]()?p.aliyunRtc:this[t(517)]()?p[t(726)]:(s.useMSE&&(e+=p.mse+" ",s[t(659)]&&(e+=t(878))),s[t(411)]&&(e+=p[t(589)]+" "),s[t(292)]&&(e+=p[t(332)]+" ",s[t(652)]&&(e+=p.simd+" ",s.isFFmpegSIMD&&(e+="v2 ")),s.useMThreading&&(e+=p.mt+" ")),s[t(185)]&&(e+=p[t(218)]+" "),e)}getDemuxType(){const t=_C;return this[t(771)][t(281)]}[_C(384)](){const t=_C;let e="";return this[t(729)]&&(e=this[t(729)].getType()),e}[_C(221)](){const t=_C;let e="";return this.video&&(e=this[t(729)][t(876)]()),e}[_C(440)](){const t=_C;let e="";return this[t(651)]&&(e=this[t(651)].getEngineType()),e}getStreamType(){let t="";return this[_C(305)]&&(t=this.stream.getStreamType()),t}[_C(892)](){const t=_C;return-1===this.getStreamType()[t(787)](h[t(878)])}[_C(506)](){return this._allStatsData}[_C(877)](){const t=_C;return this[t(771)][t(281)]===d[t(471)]}isM7SDemux(){const t=_C;return this[t(771)][t(281)]===d[t(263)]}isNakedFlowDemux(){const t=_C;return this._opt[t(281)]===d[t(278)]}[_C(235)](){const t=_C;return this._opt[t(281)]===d[t(808)]}isTsDemux(){const t=_C;return this._opt[t(281)]===d.ts}isFmp4Demux(){const t=_C;return this[t(771)][t(281)]===d.fmp4}[_C(711)](t){const e=_C;this[e(742)]({showPerformance:t}),this[e(433)](M[e(711)],t)}[_C(737)](t){const e=_C;t=Number(t);let s={isFullResize:!1,isResize:!1,aspectRatio:e(585)};switch(t){case J.full:s.isFullResize=!1,s[e(282)]=!1;break;case J[e(369)]:s.isFullResize=!1,s.isResize=!0;break;case J[e(345)]:s[e(204)]=!0,s[e(282)]=!0}this[e(742)](s),this[e(667)](),this[e(433)](M[e(505)],t)}[_C(267)](){const t=_C;this[t(629)](),this[t(771)][t(625)]>0&&(this.visibilityHiddenTimeout=setTimeout((()=>{const e=t;this[e(433)](M[e(342)])}),1e3*this[t(771)][t(625)]))}[_C(629)](){const t=_C;this[t(600)]&&(clearTimeout(this[t(600)]),this[t(600)]=null)}[_C(189)](t){const e=_C;this[e(670)]=t,ci(t)&&this.video&&this[e(729)][e(654)]([])}objectDetect(t){const e=_C;this[e(358)]=t,ci(t)&&this[e(729)]&&this.video[e(654)]([])}[_C(706)](t){this[_C(430)]=t}[_C(617)](){const t=_C;this[t(528)]&&this.demux[t(617)]&&this[t(528)][t(617)]()}[_C(674)](){const t=_C;this[t(528)]&&this[t(528)].downloadFmp4File&&this[t(528)].downloadFmp4File()}downloadMpeg4File(){const t=_C,e=new Blob([this[t(584)]]);try{const s=document[t(743)]("a");s[t(279)]=window[t(252)][t(234)](e),s[t(186)]=Date.now()+t(761),s[t(643)](),window[t(252)].revokeObjectURL(s[t(279)])}catch(e){console[t(251)]("downloadMpeg4File",e)}}[_C(797)](){const t=_C;this.demux&&this[t(528)][t(797)]&&this[t(528)][t(797)]()}[_C(779)](){const t=_C,e=this.videoIframeIntervalTs,s=this[t(588)][t(418)],i=this._allStatsData[t(203)];let r=!1;if(e&&s&&i){r=1e3/i*s>e}return r}[_C(624)](){const t=_C;let e=arguments[t(635)]>0&&void 0!==arguments[0]?arguments[0]:[];this[t(729)]&&this[t(729)][t(624)](e)}[_C(321)](){_C(635)}[_C(700)](t){const e=_C,s=this[e(627)]();s===h[e(587)]||s===h[e(878)]+" "+h.websocket?this[e(305)][e(665)](t):this.debugWarn(this[e(240)],e(276)+this[e(627)]())}[_C(693)](){const t=_C,e=this[t(873)];return e[t(475)]>0&&e[t(840)]>0}[_C(731)](t){const e=_C;this.control&&this.control[e(666)]&&(this.control[e(666)][e(894)]=t)}[_C(404)](){const t=_C;this[t(434)]&&this.control[t(666)]&&(this.control[t(666)][t(894)]="")}[_C(576)](t){const e=_C;this[e(434)]&&this.control[e(576)](t)}getControlHtmlIsShow(){const t=_C;return!!this.control&&this[t(434)].getControlHtmlIsShow()}getControlHtml(){const t=_C;return this[t(434)]?this[t(434)][t(638)]():null}[_C(596)](t){const e=_C;this[e(434)]&&(this.control[e(250)]?this.control[e(447)](t):this.control[e(479)]({html:t,showBeforePlay:!0}))}[_C(494)](){const t=_C;this[t(434)]&&this.control[t(209)]()}[_C(796)](t){const e=_C;this.control&&this[e(434)][e(703)](t)}[_C(896)](){const t=_C;return!!this.control&&this.control[t(715)]()}[_C(280)](){const t=_C;return this[t(434)]?this.control[t(827)]():null}updateWatermark(t){const e=_C;!this[e(362)]&&(this[e(362)]=new Wr(this)),this.singleWatermark&&this[e(362)][e(546)](t)}removeWatermark(){const t=_C;this[t(362)]&&this[t(362)][t(765)]()}[_C(329)](){const t=_C;let e=null;return this[t(729)]&&(e=this[t(729)][t(329)]()),e}getAudioInfo(){const t=_C;let e=null;return this.audio&&(e=this[t(651)][t(442)]()),e}[_C(632)](){let t=null;return this[_C(729)]&&(t=this.video.getPlaybackQuality()),t}emitError(t){const e=_C;let s=arguments[e(635)]>1&&void 0!==arguments[1]?arguments[1]:"";this[e(433)](M.error,t,s),this[e(433)](t,s)}updateHistoryFpsList(t,e){const s=_C;this[s(393)]||this[s(569)]()||ci(this[s(437)])||(this[s(605)][s(635)]>this[s(771)][s(735)]&&(this[s(605)][s(356)](),this._historyVideoDiffList[s(356)]()),this._historyFpsList.push(t),this._historyVideoDiffList[s(786)](e),this[s(227)]()&&this[s(552)]())}isHistoryFpsListAllZero(){const t=_C;let e=!0;if(this[t(605)].length0){e=!1;break}if(e)for(let s=0;s0){e=!1;break}return e}isUseHls265(){const t=_C;return hi(this[t(771)][t(561)])&&hi(this[t(771)][t(677)])}[_C(561)](){const t=_C;return hi(this[t(771)][t(561)])}[_C(517)](){const t=_C;return hi(this[t(771)][t(561)])&&ci(this._opt[t(677)])}[_C(869)](){const t=_C;return hi(this[t(771)][t(821)])&&ci(this._opt[t(891)])}[_C(322)](){const t=_C;return hi(this[t(771)][t(821)])&&ci(this[t(771)][t(891)])}[_C(891)](){const t=_C;return hi(this[t(771)][t(821)])&&hi(this[t(771)][t(891)])}isAliyunRtc(){const t=_C;return hi(this[t(771)][t(875)])}[_C(712)](){return this.isUseHls265()&&this.isUseMSE()}[_C(435)](){const t=_C;return this[t(627)]()===h[t(551)]}[_C(640)](){const t=_C;return this[t(274)]()&&hi(this[t(771)][t(803)][t(678)])&&hi(this[t(771)][t(411)])}[_C(725)](){const t=_C;return this[t(274)]()&&ci(this[t(771)][t(803)][t(431)])&&hi(this[t(771)][t(803)][t(678)])}isPlaybackUseWCS(){const t=_C;return this.isPlayback()&&hi(this[t(771)][t(411)])}[_C(277)](){const t=_C;return this[t(274)]()&&hi(this._opt[t(868)])}[_C(722)](){return this[_C(274)]()&&hi(this._opt.useWasm)}isPlayUseMSE(){const t=_C;return this[t(688)]()&&hi(this[t(771)].useMSE)}[_C(424)](){const t=_C;return this._opt[t(868)]&&this[t(771)][t(736)]}[_C(538)](){const t=_C;this._opt[t(411)]&&this[t(771)][t(604)]}[_C(314)](){const t=_C;return this[t(569)]()&&hi(this[t(771)][t(868)])}[_C(550)](){const t=_C;return this[t(569)]()&&ci(this[t(771)][t(868)])}[_C(682)](){const t=_C;return this[t(569)]()&&hi(this[t(771)][t(187)])}[_C(686)](){const t=_C;return this._opt[t(812)]&&Je()&&this[t(612)]}[_C(608)](){const t=_C;let e=1;return hi(this.isPlayback())&&this.playback&&(e=this.playback[t(378)]),e}[_C(861)](){const t=_C;let e=1;return this.isPlayVod()&&this[t(866)]&&(e=this.playVod[t(378)]),e}isPlaybackOnlyDecodeIFrame(){const t=_C;return hi(this[t(274)]())&&this[t(608)]()>=this._opt[t(453)]&&!this.isMSEDecodeAudio()}pushTempStream(t){const e=_C,s=new Uint8Array(t);this[e(584)][e(786)](s)}[_C(492)](t){const e=_C;this[e(336)]&&this[e(434)]&&this[e(434)][e(492)](t)}[_C(831)](){const t=_C;let e=0;return this.video&&(this[t(771)][t(868)]?this.mseDecoder?e=this[t(357)].getVideoCurrentTime():this[t(470)]()&&(e=this[t(729)][t(831)]()):this[t(322)]()&&this[t(855)]?e=this.webrtc[t(831)]():this[t(875)]()&&this.aliyunRtcDecoder&&(e=this[t(833)][t(831)]())),e}[_C(208)](){const t=_C;let e=null;return this[t(729)]&&(this[t(771)][t(868)]?this[t(357)]?e=this[t(357)].getVideoBufferTimeRange():this[t(470)]()&&(e=this[t(729)][t(208)]()):this[t(322)]()&&this[t(855)]?e=this[t(855)].getVideoBufferTimeRange():this[t(875)]()&&this[t(833)]&&(e=this[t(833)][t(208)]())),e}[_C(763)](){const t=_C;let e=[];return this.video&&(this._opt[t(868)]?this.mseDecoder?e=this[t(357)][t(407)]():this[t(470)]()&&(e=this[t(729)][t(407)]()):this[t(322)]()&&this[t(855)]?e=this[t(855)][t(407)]():this[t(875)]()&&this[t(833)]&&(e=this[t(833)][t(407)]())),e}[_C(536)](){const t=_C;let e=!0;return this[t(729)]&&(this[t(771)][t(868)]?this[t(357)]?e=this[t(357)].isVideoPlaying():this[t(470)]()&&(e=this[t(729)][t(536)]()):this[t(322)]()&&this[t(855)]?e=this[t(855)][t(536)]():this[t(875)]()&&this.aliyunRtcDecoder&&(e=this.aliyunRtcDecoder.isVideoPlaying())),e}[_C(286)](t){const e=_C;for(var s=arguments.length,i=new Array(s>1?s-1:0),r=1;r0){const t=s/1e3;this[e(841)]=t}}bs(t[e(264)])&&ci(t[e(264)])&&(this[e(648)]("updateMetaData",e(264),t[e(264)],"and update _opt.hasAudio"),this._opt.hasAudio=t[e(264)]),bs(t[e(563)])&&ci(t[e(563)])&&(this[e(648)]("updateMetaData","hasVideo",t[e(563)],e(619)),this._opt.hasVideo=t.hasVideo),t.server&&(this[e(402)]=(t.server+"").substring(0,13)),t[e(222)]&&(this[e(402)]=t[e(222)])}this[e(433)](M.flvMetaData,t)}[_C(291)](){return this[_C(650)]}[_C(317)](){const t=_C;return this[t(434)][t(317)]().map((e=>{const s=t;return{name:e.name,$container:e[s(409)],$btn:e.$iconWrap,$activeBtn:e.$activeIconWrap}}))}[_C(555)](){let t=null;return this.pressureObserverCpu&&(t=this.pressureObserverCpu.getCurrentCpuState()),t}[_C(343)](){const t=_C;return this.recorder&&this[t(771)].recordType===l.flv}[_C(893)](){const t=_C;return this[t(243)]&&this[t(771)].recordType===l[t(613)]}[_C(450)](){const t=_C;return this[t(243)]&&this[t(771)].recordType===l[t(895)]}[_C(308)](){const t=_C;return this[t(771)][t(292)]||this[t(771)][t(857)]}[_C(813)](){return hi(this[_C(771)].useMSE)}[_C(522)](){const t=_C;return hi(this._opt[t(411)])}[_C(534)](){const t=_C;return hi(this[t(771)][t(292)])}[_C(470)](){const t=_C;return this[t(813)]()&&hi(this[t(771)][t(659)])}[_C(660)](){return this[_C(248)]-this.getRenderCurrentPts()}[_C(196)](){const t=_C;return{video:this[t(669)](),audio:this[t(248)]}}[_C(541)](){const t=_C;let e=0;return this[t(771)][t(868)]&&this[t(357)]&&(this[t(357)]?e=this.mseDecoder[t(448)]():this.isMseDecoderUseWorker()&&(e=this[t(729)][t(448)]()),e=parseInt(1e3*e,10)),e}[_C(500)](t){const e=_C;this[e(747)]({currentPts:t}),this[e(433)](M[e(898)],t),this[e(328)](t)}[_C(766)](t){const e=_C;this[e(433)](M[e(900)],t),this[e(451)][e(786)](t)}emitVideSeiSyncPts(t){const e=_C;if(0===this._seiList[e(635)]||ci(this._opt[e(684)]))return;const s=1e3*this[e(771)][e(348)],i=t-s,r=t+s,n=[];this[e(451)][e(540)]((s=>{const o=e;s.ts>=i&&s.ts<=r&&(s[o(376)]=t,n[o(786)](s))})),n[e(540)]((t=>{this[e(433)](M.videoSEISyncPts,t)})),this._seiList=this._seiList.filter((t=>t.ts>r))}[_C(669)](){const t=_C;let e=0;return e=this[t(873)].currentPts?this._stats[t(898)]:this[t(190)]-this[t(541)](),e}[_C(537)](){const t=_C;return this[t(771)].syncAudioAndVideo&&this._opt[t(563)]}[_C(260)](t){const e=_C;if(this[e(434)]){const s=this[e(771)][e(556)][t]||e(377);this.control.showTipsMessage(s,t)}}[_C(351)](t){const e=_C;this[e(434)]&&t&&this[e(434)][e(705)](t)}showTipsMessage(){const t=_C;let e=arguments[t(635)]>0&&void 0!==arguments[0]?arguments[0]:"",s=arguments[t(635)]>1?arguments[1]:void 0;this[t(434)]&&this[t(434)].showTipsMessage(e,s)}[_C(908)](){const t=_C;this[t(434)]&&this[t(434)][t(908)]()}[_C(236)](){const t=_C;hi(this[t(771)][t(238)])&&(this[t(357)]?this[t(357)][t(443)]=!1:this[t(837)]&&(this[t(837)][t(443)]=!1))}[_C(364)](){const t=_C;return this._canPlayAppleMpegurl&&this[t(517)]()}[_C(391)](t){const e=_C;this[e(434)]&&this[e(434)][e(533)](t)}[_C(655)](t){const e=_C;this[e(742)]({rotate:t}),this[e(667)]()}setPlayFailedAndPaused(){this[_C(567)]=!0}[_C(375)](){const t=_C;let e={};return this[t(357)]&&(e=this[t(357)][t(410)]()),e}[_C(414)](){const t=_C;return this[t(771)][t(269)]+this[t(771)][t(714)]}[_C(904)](){const t=_C;return!this[t(729)]||this.video[t(421)]()}[_C(206)](){const t=_C;this.control&&this[t(434)][t(206)]()}toggleControlExtendBtn(t,e){this[_C(434)]&&this.control.toggleExtendBtn(t,e)}[_C(568)](t){const e=_C;let s=!1;return this[e(434)]&&(s=this.control[e(429)](t)),s}useVideoPlayAudio(){const t=_C;return this[t(771)][t(264)]&&(this.isWCSPlayAudioUseVideoRender()||this.isWasmPlayAudioUseVideoRender())}[_C(902)](){const t=_C;return this[t(771)][t(411)]&&this[t(771)][t(604)]}[_C(374)](){const t=_C;return this[t(771)][t(292)]&&this._opt[t(515)]}[_C(350)](){const t=_C,e=this[t(771)][t(245)],s=this[t(771)][t(543)];let i=e&&!s;return i&&this.control&&(i=this[t(434)][t(756)]()),i}getControlBarShow(){const t=_C;let e=!1;return this[t(434)]&&(e=this[t(434)][t(756)]()),e}[_C(746)](t){const e=_C;this[e(434)]&&(this[e(434)][e(559)](t),this[e(667)]())}[_C(648)](t){const e=_C;if(this[e(771)][e(775)]&&this[e(775)]){for(var s=arguments.length,i=new Array(s>1?s-1:0),r=1;r1?s-1:0),r=1;r1?s-1:0),r=1;r0&&void 0!==arguments[0])||arguments[0],s=0;return(this[t(350)]()||ci(e))&&(this[t(688)]()?s=this[t(771)][t(716)]===y[t(901)]?30:38:this[t(274)]()?this.playback[t(199)]()?s=48:this[t(611)].isPlaybackSimple()&&(s=38):this.isPlayVod()&&(s=38)),s}[_C(689)](){return this[_C(368)]}[_C(312)](){const t=_C,e=this.getHistoryVideoDiffList();return e[t(635)]>1&&0===e[e[t(635)]-1]&&0===e[e[t(635)]-2]}[_C(631)](){const t=_C;let e=this[t(355)],s=this[t(394)];const i=this[t(818)]();return Je()&&this[t(612)]&&(this[t(771)].useWebFullScreen||this[t(771)][t(695)])?e-=i:s-=i,{width:e,height:s}}updateControlSize(t){const e=_C;this[e(742)]({controlSize:t}),this.control&&this[e(434)].updateControlSize(),this[e(667)]()}[_C(739)](){let t=!1;return this[_C(274)]()&&(t=this._isStreamEnd),t}[_C(232)](){const t=_C;let e=!0;return this[t(274)]()&&ci(this[t(771)][t(315)])&&(e=!1),e}[_C(768)](){const t=_C;let e=0;return this[t(308)]()?this[t(882)]&&(e=this[t(882)][t(764)]):this[t(528)]&&(e=this[t(528)][t(501)]()),e}[_C(449)](){const t=_C;let e=0;return this[t(729)]&&(e=this[t(729)][t(501)]()),e}updateStreamEndInner(){const t=_C;this[t(648)](this.TAG_NAME,"updateStreamEndInner"),this[t(480)]=!0}[_C(593)](){const t=_C;let e=null;return this[t(855)]&&(e=this[t(855)].$videoElement),e}[_C(863)](t){const e=_C;this[e(594)]&&this[e(265)](),this[e(594)]=new fC(this,t),this[e(594)].startAndResize()}updateGhostWatermark(t){const e=_C;this.ghostWatermark&&this[e(495)]();const s=Object[e(467)]({},t,{isGhost:!0});this[e(851)]=new fC(this,s),this[e(851)][e(482)]()}[_C(265)](){const t=_C;this[t(594)]&&(this[t(594)].destroy(),this[t(594)]=null)}[_C(495)](){const t=_C;this[t(851)]&&(this[t(851)][t(383)](),this[t(851)]=null)}playVodForward(t){return new Promise(((e,s)=>{const i=RC;t=Ve(Number(t),.1,32),this[i(310)]&&this[i(310)][i(781)]({key:i(864),value:t}),this[i(866)][i(254)](t),this[i(729)]&&this[i(729)][i(254)](t),this[i(651)]&&this[i(651)][i(254)](t),e()}))}[_C(816)](t){return new Promise(((e,s)=>{const i=RC;this[i(866)]?(this[i(413)]=!1,this[i(866)][i(468)]({time:t}),this[i(372)]&&(this[i(648)](this[i(240)],i(353)),this[i(372)]=!1),e()):s(i(794))}))}[_C(306)](t){return new Promise(((e,s)=>{const i=RC;let r=this[i(669)]()/1e3;this[i(314)]()&&(r=this[i(831)]()),this.playVodSeek(r+t)[i(751)]((()=>{e()}))[i(363)]((t=>{s(t)}))}))}[_C(544)](t){return new Promise(((e,s)=>{const i=RC;let r=this[i(669)]()/1e3;this[i(314)]()&&(r=this[i(831)]()),this[i(816)](r-t)[i(751)]((()=>{e()})).catch((t=>{s(t)}))}))}getPlayVodDuration(){return this[_C(866)].totalDuration}[_C(721)](){return this.playVod.currentTime}getI18n(){const t=_C;return!this._i18n&&(this[t(597)]=Object[t(467)]({},kC,this[t(771)][t(601)]||{})),this[t(597)]}[_C(488)](){const t=_C;let e={width:0,height:0};return window[t(740)]?(e[t(355)]=window[t(740)][t(355)],e[t(394)]=window[t(740)][t(394)],e):e}isScreenNowColumn(){const t=_C,e=this[t(488)]();return e[t(355)]>e.height}[_C(473)](){const t=_C,e=this[t(488)]();return e.width\n \n \n \n \n \n \n \n ',"watermark_fontsize","watermark_id","font-family: ","createElement","_loadMark","player","load","watermark_alpha","function","attachShadow","JbPro_","65cTlBRE","top",'" patternUnits="userSpaceOnUse" patternTransform="rotate(',"open"];return(OC=function(){return t})()}!function(t,e){for(var s=FC,i=t();;)try{if(137449===parseInt(s(210))/1*(parseInt(s(238))/2)+-parseInt(s(247))/3*(-parseInt(s(243))/4)+parseInt(s(289))/5*(parseInt(s(291))/6)+-parseInt(s(229))/7*(-parseInt(s(287))/8)+parseInt(s(209))/9*(parseInt(s(295))/10)+parseInt(s(255))/11*(parseInt(s(221))/12)+parseInt(s(274))/13*(-parseInt(s(208))/14))break;i.push(i.shift())}catch(t){i.push(i.shift())}}(OC);class UC{constructor(t){var e=FC;this[e(268)]=t,this[e(283)]=null;const s=as();this[e(294)]={watermark_id:e(273)+s,watermark_prefix:e(211)+s,watermark_txt:e(253),watermark_x:0,watermark_y:0,watermark_rows:0,watermark_cols:0,watermark_x_space:100,watermark_y_space:100,watermark_font:e(248),watermark_color:e(251),watermark_fontsize:18,watermark_alpha:.15,watermark_width:150,watermark_height:100,watermark_angle:-15,watermark_parent_width:0,watermark_parent_height:0,watermark_parent_node:null},Si()&&this[e(269)]({text:decodeURIComponent(b+"%20%E4%BD%93%E9%AA%8C"),color:"white"}),this[e(268)].debugLog("Watermark",e(281))}[MC(237)](){var t=MC;this[t(244)](),this[t(283)]=null,this[t(294)]=null,this.player[t(213)]("Watermark",t(237))}[MC(250)](){var t=MC;vi()&&(this[t(283)]=null,this._removeMark())}load(t){var e=MC;this[e(283)]=t,this[e(267)](t)}[MC(293)](){var t=MC;this[t(268)][t(213)](t(288),t(203)),this[t(283)]&&this[t(267)](this.globalSetting)}[MC(267)](){var t=MC;let e=this[t(294)];if(1===arguments[t(252)]&&"object"==typeof arguments[0]){var s=arguments[0]||{};for(let t in s)s[t]&&e[t]&&s[t]===e[t]||(s[t]||0===s[t])&&(e[t]=s[t])}var i=document[t(240)](e[t(264)]);i&&i[t(205)]&&i[t(205)][t(215)](i);var r=typeof e[t(249)]===t(256)?document[t(240)](e.watermark_parent_node):e[t(249)],n=r||document[t(216)];const o=n.getBoundingClientRect();var a=Math[t(222)](n.scrollWidth,n[t(286)],o.width),h=Math[t(222)](n.scrollHeight,n.clientHeight,o.height),c=arguments[0]||{},l=n;(c[t(242)]||c[t(230)])&&l&&(e.watermark_x=e.watermark_x+0,e[t(233)]=e[t(233)]+0);var d=document[t(240)](e.watermark_id),u=null;if(d)d[t(280)]&&(u=d[t(280)]);else{(d=document[t(266)](t(258))).id=e[t(264)],d[t(234)](t(290),"pointer-events: none !important; display: block !important"),u=typeof d[t(272)]===t(271)?d[t(272)]({mode:t(277)}):d;var p=n[t(214)],f=Math.floor(Math[t(257)]()*(p[t(252)]-1))+1;p[f]?n[t(279)](d,p[f]):n[t(204)](d)}const m=this[t(223)](),g=this[t(294)],A=g[t(220)]+m[t(284)],y=g[t(219)]+m.height,b=2*y,v=A/2,S=t(246)+A+t(282)+b+t(276)+g[t(225)]+')">\n '+g[t(226)]+'\n \n '+g[t(226)]+t(262),w=window.btoa(unescape(encodeURIComponent(S)));var E=document[t(266)](t(258));E[t(290)][t(285)]=t(217),E[t(290)][t(224)]=t(259),E[t(290)][t(275)]=t(259),E.style[t(261)]=t(228),E[t(290)][t(245)]="9999999",E[t(290)][t(284)]=a+"px",E[t(290)][t(292)]=h+"px",E.style[t(278)]=t(260),E[t(290)][t(254)]="none",E.style[t(202)]=t(235)+w+")",u.appendChild(E)}[MC(244)](){var t=MC;const e=this.defaultSettings;var s=document.getElementById(e[t(264)]);if(s){var i=s.parentNode;i&&i[t(215)](s)}}_calcTextSize(){var t=MC;const{watermark_txt:e,watermark_font:s,watermark_fontsize:i}=this[t(283)],r=document.createElement("span");r[t(232)]=e,r[t(234)](t(290),t(265)+s+t(236)+i+"px; visibility: hidden; display: inline-block"),document.querySelector("body")[t(204)](r);const n={width:r.offsetWidth,height:r.offsetHeight};return r[t(250)](),n}}const NC=KC;!function(t,e){const s=KC,i=t();for(;;)try{if(417029===parseInt(s(140))/1+-parseInt(s(133))/2+parseInt(s(146))/3*(parseInt(s(151))/4)+-parseInt(s(142))/5*(parseInt(s(131))/6)+-parseInt(s(126))/7*(-parseInt(s(143))/8)+-parseInt(s(144))/9+parseInt(s(150))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(YC);const jC={stop:NC(123),fiStop:"fiStop",right:"right",left:NC(145),up:"up",down:NC(136),leftUp:"leftUp",leftDown:NC(122),rightUp:NC(125),rightDown:NC(134),zoomExpand:"zoomExpand",zoomNarrow:NC(141),apertureFar:NC(124),apertureNear:NC(129),focusFar:NC(152),focusNear:"focusNear",setPos:NC(127),calPos:NC(137),delPos:NC(149),wiperOpen:"wiperOpen",wiperClose:NC(135),cruiseStart:NC(121),cruiseStop:NC(130)},VC={stop:0,fiStop:0,right:1,left:2,up:8,down:4,leftUp:10,leftDown:6,rightUp:9,rightDown:5,zoomExpand:16,zoomNarrow:32,apertureFar:72,apertureNear:68,focusFar:66,focusNear:65,setPos:129,calPos:130,delPos:131,wiperOpen:140,wiperClose:141,setCruise:132,decCruise:133,cruiseStart:136,cruiseStop:0},zC=[25,50,75,100,125,150,175,200,225,250],GC=[1,2,3,4,5,6,7,8,9,16],WC=[16,48,80,112,144,160,176,192,208,224];function HC(t){const e=NC,{type:s,speed:i=5,index:r=0}=t,n=zC[(i||5)-1]||zC[4];let o,a,h,c;if(o=VC[s],!o)return"";switch(s){case jC.up:case jC[e(136)]:case jC[e(124)]:case jC[e(129)]:h=n;break;case jC[e(138)]:case jC.left:case jC[e(152)]:case jC[e(147)]:a=n;break;case jC.leftUp:case jC[e(122)]:case jC[e(125)]:case jC.rightDown:a=n,h=n;break;case jC[e(128)]:case jC.zoomNarrow:c=WC[(i||5)-1]||WC[4];break;case jC[e(137)]:case jC[e(149)]:case jC[e(127)]:h=QC(r);break;case jC[e(135)]:case jC.wiperOpen:a=1;break;case jC.cruiseStart:a=QC(r)}return function(t,e,s,i){let r=[];return r[0]=165,r[1]=15,r[2]=1,r[3]=0,r[4]=0,r[5]=0,r[6]=0,t&&(r[3]=t),e&&(r[4]=e),s&&(r[5]=s),i&&(r[6]=i),r[7]=(r[0]+r[1]+r[2]+r[3]+r[4]+r[5]+r[6])%256,function(t){const e=NC;let s="";for(let i=0;ie)){for(const n in t)Object[i(158)][i(160)][i(161)](t,n)&&(s===e?r[n]=XC(t[n]):typeof t[n]===i(148)?r[n]=ZC(t[n],e,s+1):r[n]=t[n]);return r}}function $C(){const t=qC;return(new Date)[t(170)]()}function tR(t,e){const s=eR();return(tR=function(t,e){return s[t-=127]})(t,e)}function eR(){const t=["logSize","getLogBlob","slice","15RbLSrT","506PFeeMA","shift","98928DMSGqw","toString","prototype","654DEHkch","hasOwnProperty","call","553644YuQRYx","Boolean","destroy","getLog","logMaxSize","[JbPro] ","2407560tvKmqp","join","toLocaleString","8559DInees","Number","Array","TAG_NAME","clear","stringify","String","length","includes","Object","debugLog","4619390QeQXTo","594348RMSeRD","text/plain","download","Uint8Array","logTextArray","4384czdteA","push","926VKBTYl","Undefined","518GeHRkg","object","player"];return(eR=function(){return t})()}class sR{constructor(t){const e=qC;let s=arguments[e(133)]>1&&void 0!==arguments[1]?arguments[1]:{};this.player=t,this.TAG_NAME="MemoryLogger",this[e(166)]=(null==s?void 0:s[e(166)])||204800,this[e(150)]=0,this[e(142)]=[],this[e(149)][e(136)](this[e(129)],"init")}destroy(){const t=qC;this.clear(),this[t(149)][t(136)](this[t(129)],t(164))}clear(){const t=qC;this[t(150)]=0,this[t(142)]=[]}logCache(){const t=qC;let e="";try{for(var s=arguments.length,i=new Array(s),r=0;rZC(t)));e=t(167)+$C()+JSON[t(131)](n)}catch(t){return}if(this[t(150)]+=e[t(133)],this[t(142)][t(144)](e),this[t(150)]>this[t(166)]){const e=this.logTextArray[t(155)]();this[t(150)]-=e[t(133)]}}getLog(){const t=qC;return this[t(142)][t(169)]("\n")}[qC(151)](){const t=this[qC(165)]();return new Blob([t],{type:"text/plain"})}[qC(140)](){const t=qC,e=this[t(165)]();this[t(130)]();const s=new Blob([e],{type:t(139)});rn(s,"JbPro-"+$C()+".log")}}const iR=rR;function rR(t,e){const s=nR();return(rR=function(t,e){return s[t-=129]})(t,e)}function nR(){const t=["interval","3684830lAqzgK","45GTMZBg","onLine","player","addEventListener","isOffline","isOnline","378670FDxRxR","_initListener","7pcBzDf","9124SWOeEb",", status: ","_startCheck","3869091PflrBw",", online: ","offline","_stopCheck","2JRuyOK","debugLog","init","Network","off","logStatus","2369048BOnTzW","_updateOnlineStatus","2993334QrLmcp","emit","1225323PzbnFN"," -> ","prevOnline","_updateOfflineStatus","TAG_NAME","destroy","prevOnline: ","removeEventListener","bind","online"];return(nR=function(){return t})()}!function(t,e){const s=rR,i=t();for(;;)try{if(314474===-parseInt(s(141))/1+-parseInt(s(151))/2*(-parseInt(s(161))/3)+parseInt(s(144))/4*(parseInt(s(135))/5)+-parseInt(s(159))/6*(-parseInt(s(143))/7)+-parseInt(s(157))/8+parseInt(s(147))/9+-parseInt(s(134))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(nR);class oR extends Bi{constructor(t){const e=rR;super(),this[e(137)]=t,this[e(165)]=e(154),this.online=this[e(140)](),this.prevOnline=this[e(132)],this.interval=null,this[e(142)](),this[e(137)][e(152)](this[e(165)],e(153))}[iR(166)](){const t=iR;this[t(155)](),this[t(150)](),window[t(130)](t(132),this[t(158)]),window[t(130)]("offline",this[t(164)]),this[t(137)][t(152)](this[t(165)],t(166))}[iR(142)](){const t=iR;window.addEventListener(t(132),this[t(158)][t(131)](this)),window[t(138)]("offline",this[t(164)][t(131)](this))}_stopCheck(){const t=iR;this[t(133)]&&(clearInterval(this[t(133)]),this[t(133)]=null)}[iR(146)](){this.interval=setInterval((()=>{const t=rR;this[t(140)]()!==this.prevOnline&&(this[t(140)]()?this._updateOnlineStatus():this._updateOfflineStatus())}),1e3)}[iR(158)](){const t=iR;this.prevOnline=this.online,this[t(132)]=!0,this[t(156)](),this[t(160)](t(132))}[iR(164)](){const t=iR;this[t(163)]=this.online,this.online=!1,this[t(156)](),this[t(160)](t(149))}[iR(156)](){const t=iR,e=this.prevOnline?t(132):t(149),s=this[t(132)]?t(132):t(149);this[t(137)][t(152)](this.TAG_NAME,t(129)+this[t(163)]+t(148)+this[t(132)]+t(145)+e+t(162)+s)}isOnline(){return void 0===navigator[iR(136)]||navigator.onLine}[iR(139)](){return!this[iR(140)]()}}function aR(t,e){const s=hR();return(aR=function(t,e){return s[t-=417]})(t,e)}function hR(){const t=["2300625BRcsnK","match","451756XipPFi","1271454yxxAGW","substr","hash","host","pathname","4WnkcNq","fromCharCode","1484415BXNMcE","port","search","location","href","hostname","apply","origin","63pYCwEf","protocol","7NkakpP","test","The URL did not match the expected pattern, url=","924830lRnXzP","358004SLBJZA","52408MdryIx","length"];return(hR=function(){return t})()}!function(t,e){const s=aR,i=t();for(;;)try{if(250603===-parseInt(s(440))/1+-parseInt(s(435))/2+-parseInt(s(421))/3*(-parseInt(s(419))/4)+parseInt(s(438))/5+parseInt(s(441))/6*(-parseInt(s(431))/7)+-parseInt(s(436))/8*(-parseInt(s(429))/9)+parseInt(s(434))/10)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(hR);const cR=lR;function lR(t,e){const s=dR();return(lR=function(t,e){return s[t-=278]})(t,e)}function dR(){const t=["playbackCurrentTimeScroll()","webglAlignmentError and play error","decoderWorkerInitErrorOnLock",'JbPro option "',"getPlayingTimestamp","4:3",", and retry length is ","webglContextLostError and webglContextLostErrorReplay is false, pause success","scale(","setScaleMode","loadingTimeoutRetryEndShowPlayBtn","getPTZCmd()"," and\n needResetPlayer(url change) is ","_cryptoPlay() cryptoKeyUrl: ","playError","mseSourceBufferError but player is destroyed","InitDecoderWorkerTimeout but player is destroyed","failedToAsynchronouslyPrepareWasm and _pause error","mseSourceBufferErrorOnLock is true","fullscreenWatermarkConfig text is empty","mediaSourceAudioInitTimeout and mediaSourceAudioInitTimeoutReplay is false,pause success","streamEnd pause player success","audioResume() and call cancelMute()","faceDetectClose() player is not init","isXorCrypto","setControlHtml() player is not init","wcsDecodeError","webcodecs decode error _resetPlayer error","setBufferDelayTime() ","isM7sCrypto","bind","_cryptoPlay","setBufferDelayTime() player is null","setXorCryptoKey","isFullResize","querySelector","setAspectRatio","1mzLaKm","setXorCryptoKey() player is null","s must be less than heartTimeout ","cancelMute() and is mute is ","getAudioInfo","fetch error and pause player","objectDetectOpen","removeDynamicWatermark() player is not init","init success and version is ","playType is not playback","decoder-pro-simd.js","mediaSourceAppendBufferError but player is destroyed","webcodecsH265NotSupport and autoWasm is false , pause success","screenshotByRect","hlsError and pause","setDebug() ","mediaSourceAudioG711NotSupportOnLock","webglAlignmentError and play success","$container","forward() ","decoderWorkerInit but player is destroyed","setStreamQuality() ","deg)","useSIMD","decoderWorkerInitError and pause","flvDemuxBufferSizeTooLarge but player is destroyed","mseDecodeAudio","mediaSourceAudioNoDataTimeoutReplay","videoInfoError and pause player success","unknown","position","CANVAS","failedToAsynchronouslyPrepareWasm is true","videoInfoError but player is destroyed","streamEndReplay","streamEnd and 1006 error and reset player and play error","isControlTypeNormal","playVodPause","error","_handleWebglContextLostError","currentZoom","websocketError error and network is disconnect and reset player and play","updateFaceDetectorConfig"," and\n loadingTimeoutReplayTimes is ","simdH264DecodeVideoWidthIsTooLarge and pause error"," and network online and _streamErrorReplayTimes is ","_handleHlsError","_handleLoadingTimeout"," and\n isHlsButDemuxUseWorker is "," and network online and play success"," and network online and play error","updateDrawRectangleConfig","addContentToContainer() player is not init","removeWatermark()","updateDebugLevel() level is same, level: ","audioResume","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play error","fetch error and reset player and play success","100%","webglContextLostError","downloadNakedFlowFile","isMute","decoderWorkerWasmError and pause player success","JbPro need container option","jb-pro-loading-bg-for-ios","%20%E4%BD%93%E9%AA%8C","mediaSourceAppendBufferError and isMSEAudioDecoderError is ","clearContentToContainer","30XiRvIu","timeout","isPlaybackCacheBeforeDecodeForFpsRender","destroy()","toggleZoom","resize()","updateControlSize","webglContextLostError but player is destroyed","toggleDrawRectangle() ","aiFaceDetectWidth","JbPro is destroying","_playNext and waiting decoderWorkerInit callback",'" can not be undefined',"forward() method only just for play vod type"," and isOldWebrtc is ","downloadTempFmp4File","string","offline","\n and destroy and play new url","mseWaitVideoCanplayTimeout and autoWasm is false ,pause success","wcsWidthOrHeightChangeOnLock is true","mseSourceBufferError reset player and play success","proxy","removeGhostWatermark","fps","render type is video, not support clearView, please use canvas render type","fullscreenWatermarkConfig","networkDelayTimeout","screenshot() ","getFlvMetaData() player is null","map","mediaSourceBufferedIsZeroErrorOnLock is true","startTime","setAspectRatio() ","nakedFlowFps"," and\n opt.loadingTimeoutReplay is ","cryptoKey","mse","getAudioEngineType","websocketError and pause","simdH264DecodeVideoWidthIsTooLargeOnLock is true","decoderErrorAutoWasm","mseWidthOrHeightChangeOnLock","_loadingTimeoutReplayTimes","webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play","webglAlignmentErrorOnLock","_playNext and decoderWorkerInit callback and next play","px 0","WebPlayerPro","network online and JbPro is destroyed","playbackEnd and pause","getVolume","stopRecordAndSave","clearView()","1006","playFailedUseLastFrameShow","memoryLog","playbackNormal","mediaSourceAudioG711NotSupportReplay"," is invalid'","updateAiFaceDetectInterval() player is null","webcodecsDecodeConfigureError and pause error","delay timeout replay but player is destroyed","_removeLoadingBackgroundForIOS()","disablePictureInPicture","_handleStreamEnd","fetch","height","mediaSourceTsIsMaxDiff replay success","setSm4CryptoKey() player is null","playVodEndedAndReplay and reset player and play success","playbackPauseTimeout","webrtcStreamH265OnLock","mediaSourceAudioInitTimeout error and pause error","mediaSourceBufferedIsZeroError","togglePerformancePanel() failed, showPerformance is prev: ","mediaSourceBufferedIsZeroError _resetPlayer and play error","togglePerformancePanel() ","notSupportNewWasm","mseAddSourceBufferErrorOnLock","network online","getPlaybackCurrentRate","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play","webrtcErrorOnLock is true","webrtcError and pause player success","closeDrawRectangle","mseWorkerAddSourceBufferError","liveStream","updateDynamicWatermark()","demux","_resetPlayer error","videoInfoErrorOnLock is true","playVodNormal","container","wasmUseVideoRenderError and reset player and play success","updateDynamicWatermark","network","updateAiObjectDetectInterval() player is null","networkDelayTimeoutReplay","decoderWorkerWasmErrorOnLock is true",", demuxType is ","objectDetectOpen()","setScaleMode() player is null"," rotateX(180deg)","playbackConfig.rateConfig.length is 0, showRateBtn can not be ture, showRateBtn is set to false","setStreamQuality","setPlaybackStartTime() ","mseWidthOrHeightChange","play vod ended and pause player","InitDecoderWorkerTimeout and pause player"," and diff is ","mseWidthOrHeightChange and reset player and play error","isWebrtcH265","objectDetectClose()","JbPro Version is ","playVodForwardJumping() method only just for play vod type","artc://","decoder-pro.js","wasmWidthOrHeightChange","playVodBackwordJumping() ","isLoading",", options: ","mseWorkerAddSourceBufferErrorOnLock is true","wasmUseVideoRenderError and _resetPlayer error","hasLoaded","setRate","complete","mediaSourceFull but player is destroyed","includes","closeZoom() failed, this.player is not init","setNetworkDelayTime() network delay is ","mediaSourceAudioG711NotSupportOnLock is true","notSupportNewWasmOnLock","closeDrawRectangle() failed, this.player is not init","clear","clearBufferDelay() player is not init","clearExtendHtml() player is not init","webrtcStreamH265 and _resetPlayer error","flvDemuxBufferSizeTooLargeOnLock","delay timeout replay error","clearExtendHtml"," [到期会暂停解码]","_handleMediaSourceDecoderConfigurationError","mseWaitVideoCanplayTimeout auto wasm [mse-> wasm] reset player and play","decoder"," and\n isMpeg4 is ","mseWorkerAddSourceBufferError and hardDecodingNotSupportAutoWasm is false, pause success","aiFaceDetectLevel","_resetPlayer","mediaSourceBufferedIsZeroError but player is destroyed","ws:"," and is Trial Version[试用版本]","this.player.play 2","playbackEndInner","mediaSourceTsIsMaxDiffReplay","mseSourceBufferError auto wasm ",", next replay","controls","setExtendHtml() player is not init","mediaSourceH265NotSupport but player is destroyed","mseWaitVideoCanplayTimeoutOnLock","watermark_txt"," and\n opt.heartTimeoutReplay is ","playbackPause() isPause:","play() ","playVodForward","wcs","removeChild","playbackPause","aliyunRtcError but player is destroyed","multiIndex","pause","mediaSourceH265NotSupportOnLock","webTransport","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play success","playbackConfig.isUseFpsRender is false, isCacheBeforeDecodeForFpsRender can not be ture, isCacheBeforeDecodeForFpsRender is set to false","getPlayVodCurrentRate","simdDecodeErrorReplay","_handleMediaSourceH265NotSupport","img","networkDelay","faceDetectOpen()","loadingTimeoutRetryEnd","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play error","isTs","isSm4Crypto","quality: ","autoCalcFps","screenshot","downloadMemoryLog","getControlExtendBtnActive","this._opt.url === url and "," is not in qualityList","updateIsEmitSEI()","webglContextLostError and play error","closeZoom","_clearInitDecoderWorkerTimeout","loading timeout and reset player and play success","_handlePlayVodEndedAndReplay","wt://","wt:","loadingTimeoutReplayTimes","setWebFullscreen","videoElementPlayingFailed and _pause error","_handleDecoderWorkerWasmError","decoderWorkerInitError and pause player success","setFullscreen() player is not ready","getMetaData","playbackResumeTimeout","fetch error and reset player and play error","16:9","playbackConfig","mediaSourceUseCanvasRenderPlayFailed auto and _resetPlayer and play error","isWebrtcForZLM","setPlaybackShowPrecision","updateAiObjectDetectInterval","download","addContentToContainer","webcodecsAudioInitTimeout and reset player and play error","mediaSourceH265NotSupport","playVodForwardJumping","left","hlsError","4565rcuoyS","heartTimeout","wasmUseVideoRenderErrorOnLock"," must be number type","isResize","updateAiFaceDetectLevel() player is null","1770522nOcptm","\n and new url is ","wasmWidthOrHeightChange and reset player and play","hls","play","decoderWorkerWasmError but player is destroyed","origin","_resetReplayTimes","getIsDebug","_handleMediaSourceUseCanvasRenderPlayFailed","streamEnd pause","simdDecodeError and reset player and play error","flvDemuxBufferSizeTooLargeEmitFailed","networkDelayTimeoutOnLock","downloadTempNakedFlowFile","_handleVideoElementPlayingFailed","fill","_resetPlayer() player has loaded","getExtendHtmlIsShow","_bindEvents","not recording","downloadTempMpeg4File","flv Demux Buffer Size Too Large and _resetPlayer error","playbackForwardMaxRateDecodeIFrame","_handleDecoderWorkerInitError","mediaSourceAudioNoDataTimeout but player is destroyed","wasmUseVideoRenderError but player is destroyed","this._opt.isLive is false, can not playback","isCrypto","mseWidthOrHeightChange and widthOrHeightChangeReplayDelayTime but player is destroyed","webcodecsDecodeError but player is destroyed","setPtzPosition()","mseSourceBufferErrorOnLock","updateGhostWatermark","simdH264DecodeVideoWidthIsTooLarge and reset player and play","websocketError error and _resetPlayer() but player is destroyed and return","websocket1006ErrorReplay","isDestroyed","mediaSourceDecoderConfigurationErrorOnLock",".m3u8","playbackEnd","absolute","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play","loadingBackground","_resetPlayerBeforeUpdateOptions","openZoom() failed, this.player is destroyed or paused","setSm4CryptoKey() key is invalid and key length is ","normal","http:","isOffline"," type","fullscreen","playVodEndedAndReplay and reset player and play error","_handleWebsocketError","_initPlayer","setPtzPosition() player is null","hlsError but player is destroyed","reject","playbackClearCacheBuffer","_wcsDecodeErrorRetryLog","warn","setExtendHtml","defaultStreamQuality","push","faceDetectClose()","_initOnLock","mseAddSourceBufferError and autoWasm is false ,pause success","sampleRate"," , delay ","streamEnd and network is disconnect and reset player and play","getExtendBtnList() player is null","loaded","m7sCryptoKey","s reset player and play","aliyunRtcErrorOnLock","simdDecodeError and simdDecodeErrorReplay is false , pause success","setWebFullscreen() player is not ready","startRecord() player is not ready","expandPrecision","removeFullscreenWatermark()","webrtcErrorOnLock","videoInfo","getCrashLog","wasmWidthOrHeightChangeOnLock is true"," is not a number","mseSourceBufferError and pause error:","artc:","playing","wcsWidthOrHeightChange and reset player and play error","endsWith","JbPro need container option and now container is","fetch error and streamErrorReplay is true and _streamErrorReplayTimes is ","_initLoadingBackgroundForIOS","fetchErrorOnLock is true"," and old is ","_updateMultiIndex","then"," and delay time is ","isPlaying","setM7sCryptoKey","updatePlaybackForwardMaxRateDecodeIFrame","narrowPrecision","watermarkConfig","sm4CryptoKey","playFailedAndPausedShowMessage","notSupportNewWasm but player is destroyed","playbackRate","playOptions","flvDemuxBufferSizeTooLargeOnLock is true","clearControlHtml()","loadingTimeout","videoBuffer ","updateLoadingText()","play vod ended and replay player","videoElementPlayingFailedForWebrtc","mediaSourceUseCanvasRenderPlayFailed and reset player and play success","useMSE","playback","playVodPause()","playVodForward() ","setMirrorRotate() player is null","this.player.play 4","closeDrawRectangle()","setScaleMode() ","mediaSourceAudioNoDataTimeoutOnLock is true","showRateBtn","webrtcStreamH265 and reset player and play","simdDecodeError and reset player and play success","_handleAliyunRtcError","playFailedAndPaused","updateAiObjectDetectLevel() player is null","classList","updateControlSize() failed, this.player is not init","objectDetect","delayTimeout","decoderWorkerWasmError and pause player","toggleControlHtml() ","_handleFetchError","hlsErrorOnLock","assign"," so set mseDecodeAudio = false","mediaSourceAudioG711NotSupport but player is destroyed","_resetPlayer()","network delay time out and reset player and play","_handleFlvDemuxBufferSizeTooLarge","webglAlignmentError","forEach","aliyunRtcError","mediaSourceUseCanvasRenderPlayFailedOnLock is true","removeWatermark() player is not init"," [mse-> ","videoElementPlayingFailedForWebrtc and pause","load","addContentToCanvas() player is not init","none","setM7sCryptoKey() player is null","webcodecsH265NotSupport","setKeepScreenOn() player is not ready","webFullscreen","fetchError","mseWorkerAddSourceBufferError and _resetPlayer error","setCryptoKeyUrl()","mediaSourceAudioInitTimeoutOnLock","mediaSourceDecoderConfigurationError and pause error","base64","openDrawRectangle()","setAttribute","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play","decoderWorkerInitError but player is destroyed","mseSourceBufferError reset player and play error","narrowZoom failed, zoom is not open or not init","toggleControlExtendBtn","initDecoderWorkerTimeout","_destroy","aspectRatio","webglContextLostError and _resetPlayer error","mediaSourceDecoderConfigurationErrorOnLock is true","_playBefore","websocketErrorOnLock is true","updateDynamicWatermark() player is not init"," is more than ","expandZoom","videoRenderSupportScale","_getOriginalOpt","mediaSourceBufferedIsZeroError and pause error:","isPlaybackPause"," rotateY(180deg)","mediaSourceAppendBufferError and pause error","mute","hlsError and pause player",", and retryLog is "," !== 32 or iv length ","channels","toString","_doInitLoadingBackgroundForVideo","fetch error and pause player success","loading timeout _resetPlayer error","getControlBarShow","$videoElement","mediaSourceAudioInitTimeout but player is destroyed","JbPro","_tempVideoLastIframeInfo","isAudioMute","toggleControlBar() "," === now: ","memoryLogger","s is too long, will black screen for ","streamEnd and network is offline and wait network online to play , so return","streamEndOnLock","hlsError error and network is offline and wait network online to play , so _resetPlayer and wait play","_removeLoadingBackgroundForIOS","_handleFailedToAsynchronouslyPrepareWasm","playVodResume()","_mseDecodeErrorRetryLog","level","webcodecsAudioNoDataTimeout","showErrorMessageTips()","isMSEVideoDecoderInitializationFailedNotSupportHevc","updatePlaybackLocalOneFrameTimestamp() ","default","updateAiFaceDetectInterval()","flvDemuxBufferSizeTooLarge","webglAlignmentErrorOnLock is true","getPlayVodCurrentTime","faceDetectOpen() player is not init","heartTimeoutReplayTimes","aliyunRtc","clearBufferDelay()","simdH264DecodeVideoWidthIsTooLarge and reset player and play success","getCurrentZoomIndex","updateAiFaceDetectLevel()","videoInfoError and pause","webglAlignmentError and pause error","wcsWidthOrHeightChange and widthOrHeightChangeReplayDelayTime but player is destroyed","setAspectRatio() aspectRatio is ","playbackStream","playbackConfig.fps is null and playbackConfig.autoCalcFps is false, set playbackConfig.autoCalcFps is true","isControlTypeSimple","encType","videoElementPlayingFailedForWebrtc and pause player success","operateBtns","setPlaybackStartTime() player is null","m7s","mseSourceBufferError and autoWasm is false ,pause success","_getVideoLastIframeInfo","http://","wasmWidthOrHeightChange and reset player and play success","setDebug","controlSize","_handleInitDecoderWorkerTimeout","isPause","mediaSourceTsIsMaxDiffOnLock is true","webrtcStreamH265","wasmUseVideoRenderError and reset player and play error","togglePerformancePanel","destroy() player has not loaded and waiting load","getBoundingClientRect","destroy end","_tempContentToCanvasData","_checkInitDecoderWorkerTimeout","webcodecsDecodeError","webrtc://","setVolume() ","webglContextLostErrorOnLock","mediaSourceBufferedIsZeroError reset player and play error","webcodecsAudioNoDataTimeoutOnLock is true","webrtcError and _resetPlayer error","mediaSourceTsIsMaxDiff and replay is false ,pause success","setPlaybackShowPrecision() ","websocketError error and _resetPlayer error","mediaSourceFull and auto wasm ",'playVodBackwordJumping() params "time": ',".mpeg4","pause() ","mseWaitVideoCanplayTimeout but player is destroyed","show","mseSourceBufferError","_handleWebcodecsAudioNoDataTimeout","_updateMultiIndex ","cryptoIV","toggleExtendHtml","updateControlSize() ","mediaSourceAudioG711NotSupport and reset player and play error","setKeepScreenOn()","resetPlayer() error","aliyunRtcErrorOnLock is true","px)","watermark","delay timeout and\n replay time is ","webcodecsH265NotSupportOnLock","JbPro is destroyed","setBufferTime","_handleMseSourceBufferError","mediaSourceAudioNoDataTimeout","isFFmpegSIMD","remove","webglContextLostError and play success","isCryptoAudio","startRecord() ","cancelRecord() player is not ready"," [会在一个小时后暂停解码,刷新页面可继续测试]","delay timeout _resetPlayer error","expandZoom() failed, zoom is not open or not init","widthOrHeightChangeReplay","setRotate","websocketErrorOnLock","VIDEO","setPlaybackStartTime() control type is normal and timestamp: ","audio","webcodecsAudioInitTimeout error and pause error","need reset player and\n isOldHls is ","widthOrHeightChangeReplayDelayTimeout","_handleMseWaitVideoCanplayTimeout","trim","wcsWidthOrHeightChange",' must be "http:" or "https:" or "webrtc:" or "ws:" or "wss:" or "wt:" or "artc:" protocol'," and reset player and play","mseWorkerAddSourceBufferError and reset player and play success","_handleWasmUseVideoRenderError","nodeName","mediaSourceAudioNoDataTimeout and reset player and play success"," and\n isHlsCanVideoPlay is ","aiObjectDetectWidth","mediaSourceAudioNoDataTimeout and reset player and play error","getPlaybackRate","_websocket1006ErrorRetryLog","clearContentToCanvas() player is not init","mediaSourceAppendBufferError","playVodSeek() method only just for play vod type","isRecording","cancelMute","webcodecsAudioNoDataTimeout and _resetPlayer error","mseAddSourceBufferError auto wasm [mse-> wasm] _resetPlayer and play error","removeDynamicWatermark","setRotate() ","websocketError","webcodecsAudioNoDataTimeout and reset player and play error","_handleWebrtcStreamH265",".fmp4"," and this.player.fullscreen is ","_resetPlayer() error","playbackResume()","mediaSourceAudioInitTimeoutReplay","decoderWorkerInit and play error","setPlaybackStartTime() control type is simple and timestamp: ","webglAlignmentError but player is destroyed","/index/api/webrtc","updateAiFaceDetectInterval","2333790tSRTrd","setBufferDelayTime","_handleMseAddSourceBufferError","playVodBackwordJumping() method only just for play vod type","playVod","setPlaybackStartTime() playType is not playback","split","mediaSourceH265NotSupportOnLock is true","playType","simdH264DecodeVideoWidthIsTooLarge and _resetPlayer error","get cryptoIV or cryptoKey error","videoInfoError","getExtendHtml","keys","webcodecsUnsupportedConfigurationError and autoWasm is false , pause success","contain","setTimeout() ","clearExtendHtml()","ws1006","cryptoKeyUrl","webcodecsUnsupportedConfigurationErrorOnLock","videoInfoErrorOnLock","narrowZoom","resetPlayer() success","mseSourceBufferError auto wasm [mse worker -> mse] reset player and play","resize","mediaSourceAppendBufferErrorOnLock","destroy","currentTimeScroll","once","decoderWorkerInitError","delayTimeoutRetryEnd"," must be decoder-pro.js or decoder-pro-simd.js","removeDynamicWatermark()","isPlayback","videoElementPlayingFailedForWebrtc but player is destroyed","setNetworkDelayTime() ","cancelRecord()","style","toggleControlBar() player is null","zoom","setPlaybackStartTime() player is not playing","objectDetectOpen() player is not init","webcodecs decode error reset player and play error","webcodecsH265NotSupportOnLock is true"," and\n local._loadingTimeoutReplayTimes time is ","mediaSourceTsIsMaxDiff reset player and play","padding","updateLocalOneFrameTimestamp","JbPro videoBuffer ","network offline","_pause() player has not loaded and waiting load","websocketError and pause player","playbackEndOnLock","mediaSourceUseCanvasRenderPlayFailed relayType is ","showErrorMessageTips() player is null","webcodecsAudioInitTimeoutOnLock","decoderWorkerWasmError and pause","loadingBackgroundHeight","getControlExtendBtnActive() player is null","mediaSourceUseCanvasRenderPlayFailedReplayType","isWebFullscreen","showTipsMessageByContent","removeFullscreenWatermark() watermark is not init","rotate","mediaSourceUseCanvasRenderPlayFailed","mseWidthOrHeightChange and reset player and play success","forward","isDrawRectangleOpen","player is null","decoderWorkerInit and play error and next pause error","mediaSourceDecoderConfigurationError","setCryptoKeyUrl","_handlePlayVodEnded","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play error","updateWatermark","webcodecsAudioInitTimeout and reset player and play","_handleMediaSourceTsIsMaxDiff","text","mseWaitVideoCanplayTimeout","webcodecsAudioInitTimeoutOnLock is true","hideTipsMessage","_handleMseWorkerAddSourceBufferError","addContentToCanvas","simdH264DecodeVideoWidthIsTooLarge and reset player and play error","log","mediaSourceAudioNoDataTimeout error and pause error","webrtcError error and network is offline and wait network online to play , so _resetPlayer and wait play","/isMSENotSupportAudioFormat is ","indexOf","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play success","mediaSourceH265NotSupport and pause error","removeFullscreenWatermark","_isNetworkOfflinePaused","transform","networkDisconnectReplay","webcodecsH265NotSupport auto wasm [wcs-> wasm] reset player and play"," and this._opt.playType is "," res is null","isPlayVodPaused","muted","mediaSourceAudioG711NotSupport and reset player and play success","mediaSourceTsIsMaxDiff","websocketError and pause player success","hlsErrorOnLock is true","setNetworkDelayTime","playbackClearCacheBuffer()","webcodecsAudioInitTimeoutReplay","webcodecsDecodeErrorOnLock","mediaSourceTsIsMaxDiff replay error","webcodecsAudioInitTimeout","_hasLoaded","isLive","setMirrorRotate","toggleControlHtml","playbackCurrentTimeScroll","wasm decode error and reset player and play success","_handleNetworkDelayTimeout","catch","mediaSourceAudioG711NotSupport and mediaSourceAudioG711NotSupportReplay is false,pause success","togglePerformancePanel() failed, this.player is not init","debugLevel","_hasLoaded() and play error","url is not support","isMpeg4","mediaSourceAudioG711NotSupport","webcodecsAudioNoDataTimeout and webcodecsAudioNoDataTimeoutReplay is false, pause success","_tempPlayerIsMute","aiFaceDetectInterval","TAG_NAME","vertical","_streamErrorReplayTimes","openZoom()","setTimeout error: ","_handleWebcodecsDecodeError","mseAddSourceBufferError and pause error","screenshot() player is not ready","mediaSourceUseCanvasRenderPlayFailed and pause","url is null and this._opt.url is null","top","this.player.play 1","setAspectRatio() player is null",", and start is ","volume","_opt","setRotate() rotate is ","wasmWidthOrHeightChange and reset player and play error","isFmp4","getOption","div","updateDebugLevel()","clearBufferDelay","wasm","mediaSourceAudioNoDataTimeout and _resetPlayer error","getRenderElement","downloadFlvFile","setNakedFlowFps() player is null","setExtendHtml()"," and end is ","_handleNotSupportNewWasm","_handleVideoInfoError","pTs","hardDecodingNotSupportAutoWasm","showTipsMessage","setNakedFlowFps()","mediaSourceAudioInitTimeout and reset player and play error","_handleWebcodecsAudioInitTimeout","paused","close","updateObjectDetectorConfig","mseWidthOrHeightChangeOnLock is true","fetch error and _resetPlayer but player is destroyed and return","_doInitLoadingBackgroundForRatio","$loadingBgImage","websocket1006ErrorReplayDelayTime","updateDebugLevel","isMulti","$loadingBg","wasm decode error and _resetPlayer error","startsWith","webcodecsDecodeConfigureError and autoWasm is false , pause success","notSupportNewWasmOnLock is true","mseWorkerAddSourceBufferError error and pause error","updateWatermark() player is not init","showErrorMessageTips","toggleExtendHtml() player is not init","pauseAndNextPlayUseLastFrameShow"," and streamErrorReplayDelayTime is ","notSupportNewWasm auto wasm [wasm-> old wasm] reset player and play success","streamEnd and 1006 error network is offline and wait network online to play , so return","player is destroyed","control type is not normal , not support!","_playBefore _play error","getCopyrightWatermarkHash"," is invalid, play vod must be hls or mp4","jb-pro-container","_resetPlayerBeforeUpdateOptions() and is playback playingTimestamp is ","_pause() ","_isNeedNetworkDisconnectReplay","mseAddSourceBufferErrorOnLock is true","closeZoom()","aiObjectDetectInterval","webcodecsDecodeConfigureError auto wasm [wcs-> wasm] reset player and play success","_handleWebcodecsH265NotSupport","drawingRect","decoderWorkerWasmErrorOnLock","_websocket1006ErrorReplayTimes","% - ","_handleSimdDecodeError"," is invalid, protocol is ","sendWebsocketMessage","toggleControlExtendBtn() ","webrtc","_handleMediaSourceAppendBufferError","streamEnd and reset player and play error","'updateAiFaceDetectLevel() level ","videoBufferDelay","flv","_getContainerRect","_handlePlayVodEnded but player is destroyed","isPlayVod","ws://","isCacheBeforeDecodeForFpsRender","setStartTime","2883507ypirsB","zooming","nakedFlow","getPTZCmd","heartTimeoutReplay","player","isHls","aliyunRtcError and pause","failedToAsynchronouslyPrepareWasm","_handleMseWidthOrHeightChange","_resetDemuxType","getUrl","simdDecodeError","fmp4","getControlBarShow()","width","playback() ","fetch error and network is disconnect and reset player and play","mediaSourceAppendBufferErrorOnLock is true","playType is player, can not call playbackPause method","getControlHtmlIsShow","wcsWidthOrHeightChange and reset player and play success","recording","qualityConfig","webrtcError","finally","logCache","join"," second, is too small","flv Demux Buffer Size Too Large and flvDemuxBufferSizeTooLargeReplay = true and reset player and play","mediaSourceAppendBufferError and _resetPlayer error","cryptoKeyUrl: getM7SCryptoStreamKey ","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play error","xorCryptoKey","_destroyed","isPlayFailedAndPausedSaveLastIframeInfo","isWebrtcForOthers","playVodForwardJumping() ","screenshotByRect() player is not ready","calc(","videoElementPlayingFailedForWebrtcOnLock is true","mseAddSourceBufferError","_handleDelayTimeout","webrtcStreamH265 but player is destroyed","delayTimeout and reset player and play success","mseDecodeError","stringify","_handleWebglAlignmentError","removeAttribute","currentTime","webcodecsUnsupportedConfigurationError","canvas","videoElementPlayingFailedForWebrtcOnLock","mediaSourceAudioNoDataTimeout and reset player and play","_handleVideoElementPlayingFailedForWebrtc","_hasLoaded() and play error and next pause error","mediaSourceUseCanvasRenderPlayFailed but player is destroyed","pause -> play and destroy play","extractScreenshotCopyrightWatermark",".mp4","webcodecsUnsupportedConfigurationError and pause error","playbackForward","getDemuxType","websocketError error and reset player and play success","_heartTimeoutReplayTimes","updateAiFaceDetectLevel","_initNetwork","playing and resolve()","mediaSourceFullOnLock is true","clientHeight"," and this._opt.mirrorRotate is ","mediaSourceFull","playVodEndedAndReplay","streamEndReplayDelayTime","isPlaybackPaused","openZoom","streamEnd and 1006 error and reset player and play success","14lGEsAU","wasmWidthOrHeightChange error and pause error","simdH264DecodeVideoWidthIsTooLargeReplay","createElement","mediaSourceDecoderConfigurationError but player is destroyed","webcodecsAudioNoDataTimeoutOnLock","getCurrentTime","mediaSourceBufferedIsZeroError auto wasm ","decoderWorker","flv Demux Buffer Size Too Large and flvDemuxBufferSizeTooLargeEmitFailed = true and pause player","setBufferTime() buffer time is ","mediaSourceDecoderConfigurationError and autoWasm is false ,pause success",".jb-pro-loading-bg-for-ios","url ","hideErrorMessageTips() player is null","_destroyLock","JbPro decoder ","streamErrorReplayDelayTimeout","setTimeout","isUseFpsRender","wasmWidthOrHeightChangeOnLock","videoElementPlayingFailed and videoElementPlayingFailedReplay is false,pause success","mediaSourceAppendBufferError and reset player and play success","_resetPlayer() end","downloadMpeg4File","screenshotWatermark","_handleMediaSourceAudioInitTimeout","_doInitLoadingBackgroundForCanvas","_playBefore this.player.play error","supportHls265","webcodecsH265NotSupport but player is destroyed","updateFullscreenWatermark","getAllStatsData"," and\n opt.loadingTimeoutReplayTimes is ","streamErrorReplay","JbPro container has been created and can not be created again","cancelRecord","mseAddSourceBufferError but player is destroyed","onload","setM7sCryptoKey()","setMirrorRotate() ","getExtendBtnList","isZoomOpen","flv Demux Buffer Size Too Large","playVodResume","replayUseLastFrameShow","webcodecsAudioInitTimeout but player is destroyed","webcodecsDecodeConfigureErrorOnLock","updateAiObjectDetectLevel()","videoInfoError and pause player","mediaSourceFull and _resetPlayer error","loadingTimeoutRetryEnd and\n opt.loadingTimeout is "," and is not meaningful Retry","updateLoadingText() player is null","setSm4CryptoKey","mseWidthOrHeightChange and widthOrHeightChangeReplay is false,pause success","getPlayVodDuration","isAliyunRtc",".ts","url","mseWorkerAddSourceBufferError and reset player and play error","4376MskNys","updateCurrentZoom","streamEndReplayDelayTimeout","mirrorRotate","mseWaitVideoCanplayTimeoutOnLock is true","_isNetworkOfflinePausedAndNextPlayConfig","isEmitSEI","updateOption","failedToAsynchronouslyPrepareWasmLock","fetchErrorOnLock","player is not playing","wss://","downloadTempFlvFile","mseDecodeErrorReplay","screenshotCopyrightWatermark","closeDrawRectangle() failed, this.player is destroyed or paused","player is not init","mseWorkerAddSourceBufferError but player is destroyed","autoWasm","hideErrorMessageTips()","networkDelayTimeoutOnLock is true","_handlePlaybackEnd","'updateAiObjectDetectLevel() level ","loading","] reset player and play","mediaSourceAudioNoDataTimeoutOnLock",'playVodForward() params "rate": '," is not valid","toggleControlBar","?stream=","getPlayType","webcodecs decode error autoWasm ","objectDetectClose() player is not init","srcObject","clearContentToCanvas","failedToAsynchronouslyPrepareWasm,pause success","mseDecodeErrorReplayDelayTimeout","getFlvMetaData","streamEnd pause player","delayTimeout and network is offline and wait network online to play , so return","playVodSeek","webcodecsAudioNoDataTimeout error and pause error","debugWarn","getVideoInfo","InitDecoderWorkerTimeout and pause player success","and is not meaningful retry","isNakedFlow","totalDuration","updateWatermark()","clearView","setKeepScreenOn","failedToAsynchronouslyPrepareWasm but player is destroyed","faceDetectOpen","webcodecsDecodeConfigureError but player is destroyed","init start","fetch error and network is offline and wait network online to play , so return","_handleSimdH264DecodeVideoWidthIsTooLarge","openDrawRectangle() failed, this.player is destroyed or paused","streamEnd","mseSourceBufferError and isMSEVideoDecoderInitializationFailedNotSupportHevc is true so auto wasm","_replaySuccessAndNext","aiObjectDetectLevel"," rotate(","beforeDestroy","setBufferTime() ","startRecord","/rtc/v1/play/","getFlvMetaData()","addContentToContainer()","hlsError and pause player success","toggleControlExtendBtn() player is null","webrtc:","controlsList","webrtcError and pause player","wasmWidthOrHeightChange and widthOrHeightChangeReplay is false, pause success","src","wcsWidthOrHeightChange error and pause error","_tempPlayBgObj","this.player.play 3","setPtzPosition","isMSEAudioDecoderError","mseWaitVideoCanplayAutoWasm","videoElementPlayingFailed and reset player and play success","playbackTF","wcsDecodeAudio","mseWidthOrHeightChange and reset player and play","mediaSourceBufferedIsZeroError and autoWasm is false ,pause success","getRenderType","simdDecodeError and _resetPlayer error","streamEnd and _resetPlayer() but player is destroyed and return","EVENTS","simdDecodeError but player is destroyed","videoBuffer","video","_playerOnLock","mediaSourceTsIsMaxDiffOnLock","debug","events","mseWidthOrHeightChange error and pause error","loadingTimeout and network is offline and wait network online to play , so return","flv Demux Buffer Size Too Large and reset player and play error","mute()","not playing","decoderWorkerWasmError","mediaSourceAudioInitTimeout and reset player and play success","\n this._url.url is ","toggleDrawRectangle","updateFullscreenWatermark()","_initLoadingBg","appendChild","debugError","_removeTimeout","crashLog","networkState","playVodBackwordJumping","isFlv","_handleWebcodecsUnsupportedConfigurationError","getI18n","color","downloadFmp4File","videoElementPlayingFailedOnLock is true","45EjlGwm","setPlayFailedAndPaused","setWebFullscreen() ","simdDecodeErrorOnLock","_handleMediaSourceBufferedIsZeroError","player is not ready","setRotate() player is null","loadingBackgroundWidth","wasmWidthOrHeightChange and widthOrHeightChangeReplayDelayTime but player is destroyed","player._opt.operateBtns.quality is false","playbackResume","JessibucaPro","videoElementPlayingFailedOnLock","simdDecodeErrorReplayType","play vod ended and pause success","playVodConfig","fetch error and _resetPlayer error","getPTZCmd() player is null","_handleMediaSourceFull","mediaSourceUseCanvasRenderPlayFailedOnLock","_handleWebcodecsDecodeConfigureError","https:","simdDecodeError error and pause error","keepScreenOn","5214060TKqxdK","toFixed","_play","videoElementPlayingFailed but player is destroyed","loading timeout and pause error","notSupportNewWasm auto wasm [wasm-> old wasm] reset player and play","mseWorkerAddSourceBufferErrorOnLock","getControlHeight","screenshotCopyrightWatermark() player is not ready","videoElementPlayingFailed","updateAiObjectDetectInterval()","setControlHtml()","streamEnd and isStreamEndReplay is true and and _streamEndReplayTimes is "," and\n heartTimeoutReplayTimes is ","quality","toggleZoom() ","webcodecsDecodeConfigureError","loadingTimeoutReplay","wasmUseVideoRenderError and reset player and play",".h265","sendWebsocketMessage()","webcodecsAudioNoDataTimeout and reset player and play","updatePlaybackForwardMaxRateDecodeIFrame() player is null","mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] reset player and play success","mediaSourceFullOnLock","getStatus","widthOrHeightChangeReplayDelayTime","faceDetectClose","playVodEndedAndAutoReplay","close() and inner destroy()","videoElementPlayingFailedForWebrtc and pause player","webglAlignmentError and _resetPlayer error","useWCS","_streamEndReplayTimes","_checkIsMeaningfulRetry",'playVodForwardJumping() params "time": ',"mpeg4","mediaSourceH265NotSupport and autoWasm is false ,pause success","305464kAhWrq","loading timeout and\n replay time is ","mediaSourceAudioInitTimeout","_handleWebrtcError","ghostWatermarkConfig","play url ","webcodecs decode error reset player and play success","mediaSourceBufferedIsZeroErrorOnLock","removeWatermark","mseWidthOrHeightChange but player is destroyed","wasm decode error and reset player and play error","length","setControlHtml","wcsWidthOrHeightChangeOnLock","delay timeout and pause error","initPlaybackCacheLoop","simdH264DecodeVideoWidthIsTooLargeOnLock","_pause","debugLog","simdDecodeError error simdDecodeErrorReplayType is ","png","isPlayer","fetchError but player is destroyed","mseSourceBufferError _resetPlayer and play error","openDrawRectangle","forward() method only just for playback type","emit","clearControlHtml","this.player.play 5","setPlaybackStartTime"," !== 32","simple","jb-pro-fullscreen-web",", streamErrorReplayDelayTime is ","isNotMute","startRecord() player is not playing","dynamicWatermarkConfig","wasmUseVideoRenderErrorOnLock is true","wasmUseVideoRenderError","_handlePlayVodEndedAndReplay but player is destroyed","streamEnd but player is destroyed and return","_handleWasmWidthOrHeightChange","_checkHasCreated","webcodecsDecodeErrorOnLock is true","webglAlignmentError and webglAlignmentErrorReplay is false, so pause","playVodEnded","simdH264DecodeVideoWidthIsTooLarge","updateCurrentZoom()"," and\n isAliyunRtc is ","simdDecodeErrorOnLock is true","websocketError error and reset player and play error","mseWaitVideoCanplayTimeout auto wasm [mse-> wasm] _resetPlayer error","simdH264DecodeVideoWidthIsTooLarge and simdDecodeErrorReplay is false, pause success","checkIsMeaningfulRetryTimes","getDecodeType","isDestroyedOrClosed","fetch error and pause","2952682Zpnxzt","webcodecs decode error and pause error","forward() and this._opt.isLive is ","streamErrorReplayDelayTime"];return(dR=function(){return t})()}!function(t,e){const s=lR,i=t();for(;;)try{if(815622===-parseInt(s(1503))/1*(-parseInt(s(1462))/2)+parseInt(s(860))/3+parseInt(s(1222))/4*(-parseInt(s(506))/5)+parseInt(s(512))/6*(parseInt(s(1161))/7)+-parseInt(s(1405))/8*(-parseInt(s(1343))/9)+parseInt(s(283))/10*(-parseInt(s(1084))/11)+-parseInt(s(1367))/12)break;i.push(i.shift())}catch(t){i.push(i.shift())}}(dR);class uR extends Bi{constructor(){const t=lR;let e=arguments[t(1416)]>0&&void 0!==arguments[0]?arguments[0]:{};super(),this._opt={},this[t(989)]=t(712),this[t(1521)]=null,Object[t(873)](e)[t(658)]((s=>{const i=t;if(void 0===e[s])throw new Error(i(1469)+s+i(295))})),this.originalOptions=e;const s=ri();let i=Object[t(651)]({},s,e);i[t(1220)]="",i[t(1036)]&&(i.debugUuid=si()),this[t(1318)]=new Qt(this);let r=e.container;if(typeof e.container===t(299)&&(r=document[t(1501)](e[t(376)])),!r)throw this.debugError(t(712),t(602),e[t(376)]),new Error(t(278));if(ci(i[t(972)])){const e=document.createElement(t(1315));return e[t(960)]=!0,e[t(678)](t(1294),"nodownload"),e[t(347)]=t(347),e.style[t(1533)]=t(553),e[t(898)].top=0,e[t(898)].left=0,e[t(898)][t(350)]=t(1561),e[t(898)][t(1099)]=t(1561),r.appendChild(e),this[t(710)]=e,this[t(1521)]=r,void(this[t(1004)]=i)}if(i[t(427)]&&ci(-1!==i[t(427)][t(949)](t(400))||-1!==i[t(427)][t(949)](t(1513))))throw this[t(1332)]("JbPro","JbPro decoder "+i[t(427)]+t(892)),new Error(t(1177)+i[t(427)]+" must be decoder-pro.js or decoder-pro-simd.js");if(r[t(831)]===t(1534)||r[t(831)]===t(818))throw this[t(1332)](t(712),"JbPro container type can not be "+r[t(831)]+t(562)),new Error("JbPro container type can not be "+r[t(831)]+t(562));if(i[t(1314)]>=i[t(507)])throw this.debugError("JbPro",t(909)+i[t(1314)]+t(1505)+i[t(507)]+"s"),new Error("JbPro videoBuffer "+i[t(1314)]+t(1505)+i[t(507)]+"s");if(!r[t(643)])throw this[t(1332)](this[t(989)],"JbPro container is invalid, must be a DOM Element",r),new Error("JbPro container is invalid, must be a DOM Element",r);if(this._checkHasCreated(r))throw this[t(1332)](t(712),t(1196),r),new Error("JbPro container has been created and can not be created again",r);if(r.classList.add(t(1055)),function(t,e,s){const i=Me;t&&(t[i(521)]?t[i(521)][e]=s:t.setAttribute(i(347)+e,s))}(r,I,as()),delete i[t(376)],vs(i[t(1314)])&&(i[t(1314)]=1e3*Number(i.videoBuffer)),vs(i[t(1076)])&&(i[t(1076)]=1e3*Number(i[t(1076)])),vs(i.networkDelay)&&(i.networkDelay=1e3*Number(i[t(463)])),vs(i[t(988)])&&(i[t(988)]=1e3*Number(i[t(988)])),vs(i[t(1061)])&&(i.aiObjectDetectInterval=1e3*Number(i[t(1061)])),vs(i[t(284)])&&(ys(i[t(622)])&&(i[t(622)]=i[t(284)]),ys(i[t(507)])&&(i[t(507)]=i[t(284)])),vs(i[t(1240)])&&(ys(i.decoderErrorAutoWasm)&&(i[t(324)]=i[t(1240)]),ys(i[t(1022)])&&(i[t(1022)]=i[t(1240)]),ys(i[t(1303)])&&(i[t(1303)]=i[t(1240)])),vs(i[t(430)])&&ys(i[t(292)])){const e=St[i[t(430)]];e&&(i.aiFaceDetectWidth=e)}if(vs(i.aiObjectDetectLevel)&&ys(i[t(834)])){const e=wt[i[t(1283)]];e&&(i[t(834)]=e)}hi(i[t(540)])&&(i[t(1495)]=!0),hi(i.m7sCryptoAudio)&&(i[t(809)]=!0),this._opt=i,this.debugLog(t(712),t(1276)),i[t(1314)]>1e4&&this[t(1264)](this[t(989)],t(623)+i[t(1314)]/1e3+t(718)+i[t(1314)]/1e3+"s , it is recommended to set it to less than 10s"),this[t(1118)]=!1,this[t(1176)]=!1,this[t(1521)]=r,this[t(1299)]={},this[t(713)]={},this[t(987)]=!0,this._loadingTimeoutReplayTimes=0,this._heartTimeoutReplayTimes=0,this[t(991)]=0,this[t(1400)]=0,this._websocket1006ErrorReplayTimes=0,this[t(1319)]=new ki(this),this._opt.isUseNewFullscreenWatermark?this[t(799)]=new UC(this):this[t(799)]=new PC(this),this.memoryLogger=new sR(this),this[t(379)]=new oR(this),this[t(837)]=[],this._mseDecodeErrorRetryLog=[],this._wcsDecodeErrorRetryLog=[],this[t(770)]=[],this[t(953)]=!1,this[t(1227)]={},this[t(823)]=null,this.streamErrorReplayDelayTimeout=null,this.streamEndReplayDelayTimeout=null,this[t(1258)]=null,this[t(354)]=null,this.playbackResumeTimeout=null,this[t(684)]=null,this.$loadingBgImage=null,this.$loadingBg=null,this[t(577)](),this[t(566)](r,i),this._initWatermark(),this[t(1150)](),this[t(1423)](t(712),t(1511)+Qe+":"+Ke);let n=t(397)+Qe+":"+Ke+t(434);vi()?n+=t(609)+Ye+t(424):n+=t(812),console[t(945)](n)}[cR(887)](){return new Promise(((t,e)=>{const s=lR;if(this[s(1423)](s(712),s(286)),this[s(1176)])return e(s(293));this[s(1176)]=!0,this[s(1118)]=!0,this.off(),this[s(1333)](),this[s(479)](),this[s(577)](),this[s(710)]&&(this[s(710)].pause(),this[s(710)][s(1133)]=0,this.$videoElement.srcObject&&(this[s(710)][s(1255)]=null,this[s(710)][s(1132)](s(1255))),this[s(710)][s(1297)]&&(this[s(710)][s(1297)]="",this[s(710)][s(1132)]("src")),this[s(1521)]&&this[s(1521)][s(450)](this[s(710)]),this.$videoElement=null),this[s(722)]();const i=()=>{const i=s;this.player[i(887)]()[i(608)]((()=>{const e=i;this.player=null,this._destroy(),this[e(1176)]=!1,t()}))[i(978)]((t=>{this[i(1176)]=!1,e(t)}))};this[s(1089)]?this._hasLoaded()?(this[s(1423)](this.TAG_NAME,"destroy() player has loaded and next destroy"),i()):(this[s(1423)](this[s(989)],s(767)),this[s(1089)].on(M[s(664)],(()=>{const t=s;this[t(1423)](this[t(989)],"destroy() player has not loaded and load success and next destroy"),i()}))):(this[s(685)](),this[s(1176)]=!1,t())}))}[cR(1333)](){const t=cR;this[t(823)]&&(clearTimeout(this[t(823)]),this[t(823)]=null),this[t(1178)]&&(clearTimeout(this[t(1178)]),this.streamErrorReplayDelayTimeout=null),this[t(1224)]&&(clearTimeout(this[t(1224)]),this.streamEndReplayDelayTimeout=null),this.playbackPauseTimeout&&(clearTimeout(this[t(354)]),this[t(354)]=null),this[t(491)]&&(clearTimeout(this[t(491)]),this[t(491)]=null)}[cR(685)](){const t=cR;this[t(1319)]&&(this[t(1319)][t(887)](),this.events=null),this[t(799)]&&(this[t(799)][t(887)](),this[t(799)]=null),this[t(379)]&&(this[t(379)].destroy(),this.network=null),this[t(717)]&&(this[t(717)][t(887)](),this[t(717)]=null),this[t(1521)]&&(this[t(1521)].classList[t(807)](t(1055)),this.$container.classList[t(807)](t(1437)),function(t,e){const s=Me;t&&(t[s(521)]?delete t[s(521)][e]:t[s(405)]("data-"+e))}(this[t(1521)],I),this[t(1521)]=null),this[t(1299)]=null,this[t(713)]=null,this[t(953)]=!1,this._tempContentToCanvasData=[],this[t(1316)]=!1,this[t(1227)]={},this[t(987)]=!0,this._resetReplayTimes(),this[t(1423)](t(712),t(769)),this[t(1004)]={},this[t(1318)]=null}[cR(519)](){const t=cR;this._loadingTimeoutReplayTimes=0,this[t(1148)]=0,this[t(991)]=0,this._streamEndReplayTimes=0,this._websocket1006ErrorReplayTimes=0,this[t(837)]=[],this[t(725)]=[],this[t(571)]=[]}_getOriginalOpt(){const t=cR,e=ri();return Object[t(651)]({},e,this.originalOptions)}_initPlayer(t,e){const s=cR;this[s(1089)]=new DC(t,e),this[s(531)]()}[cR(431)](){const t=cR;let e=arguments[t(1416)]>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(((s,i)=>{const r=t;try{this[r(1423)](this.TAG_NAME,r(654),JSON.stringify(e))}catch(t){this[r(1423)](this[r(989)],r(654),e)}const n=()=>{const t=r;this[t(1004)].url="",this[t(1004)][t(619)]={},this[t(1004)]=Object[t(651)](this._opt,e),this[t(566)](this[t(1521)],this._opt)},o=()=>{const t=r;this[t(1089)].destroy().then((()=>{const e=t;this[e(1089)]=null,n(),this[e(1423)](this[e(989)],e(1184)),s()}))[t(978)]((e=>{const s=t;this[s(1332)](this[s(989)],s(852),e),i(e)}))};this.player?this[r(971)]()?(this.debugLog(this[r(989)],r(529)),o()):(this[r(1423)](this.TAG_NAME,"_resetPlayer() player has not loaded and waiting load"),this.player.on(M[r(664)],(()=>{const t=r;this[t(1423)](this[t(989)],"_resetPlayer() player has not loaded and load success,next destroy and init player"),o()}))):(n(),this.debugLog(this[r(989)],r(1184)),s())}))}[cR(531)](){const t=cR;var e=this;Object.keys(F).forEach((t=>{this[lR(1089)].on(F[t],(function(){for(var s=arguments.length,i=new Array(s),r=0;r{const r=t;this.player&&this[r(1089)][r(1023)](i,e)})),this[t(1089)].once(M[t(1285)],(()=>{const e=t;this.emit(M[e(1028)]),this[e(887)]()[e(608)]((()=>{}))[e(978)]((t=>{}))})),this.player.on(M[t(885)],(()=>{const e=t;this[e(799)]&&this[e(799)][e(885)]()})),this.player.on(M[t(563)],(()=>{const e=t;this[e(799)]&&this[e(799)][e(885)]()})),this[t(1089)].on(M[t(339)],(function(){const s=t;e[s(717)][s(1110)](...arguments)})),this[t(1089)].on(M[t(472)],(()=>{this.downloadMemoryLog()}))}_initWatermark(){const t=cR;if(Si()&&(this._opt.fullscreenWatermarkConfig[t(938)]=decodeURIComponent(b+t(280)),this[t(1004)][t(309)][t(1340)]="white"),Bs(this[t(1004)][t(309)])){const e=ws(this[t(1521)],this[t(1004)].fullscreenWatermarkConfig);if(!e[t(444)])return void this[t(1264)](t(712),t(1485));this[t(799)].load(e)}}[cR(1150)](){const t=cR;this.network.on(M.online,(()=>{const t=lR;if(this[t(1431)](M[t(1335)],M.online),this[t(549)]())this[t(1423)](this.TAG_NAME,t(332));else if(this[t(1423)](this[t(989)],t(363)),this[t(953)]&&this[t(1227)]&&this[t(1227)][t(1220)]){const e=this[t(1227)][t(1220)],s=this[t(1227)][t(619)];this[t(991)]++;const i=this._isNetworkOfflinePausedAndNextPlayConfig.type||t(1532);this[t(953)]=!1,this[t(1227)]={},this[t(1423)](this[t(989)],i+t(1548)+this[t(991)]+t(828)),this.play(e,s).then((()=>{const e=t;this.debugLog(this[e(989)],i+e(1552))}))[t(978)]((e=>{const s=t;this.emit(M[s(641)],U[s(671)],{},e.toString()),this[s(1332)](this[s(989)],i+s(1553),e.toString(),e)}))}})),this[t(379)].on(M[t(300)],(()=>{const e=t;this[e(1431)](M.networkState,M[e(300)]),this[e(1423)](this[e(989)],e(910))}))}[cR(1447)](t){if(!t)return!1;return!!function(t,e){const s=Me;return t?t[s(521)]?t[s(521)][e]:t[s(626)]("data-"+e):""}(t,I)}_initOnLock(){const t=cR;this.webglAlignmentErrorOnLock=!1,this[t(775)]=!1,this[t(455)]=!1,this[t(1391)]=!1,this.mediaSourceAppendBufferErrorOnLock=!1,this[t(544)]=!1,this[t(1412)]=!1,this[t(362)]=!1,this[t(550)]=!1,this.mediaSourceTsIsMaxDiffOnLock=!1,this.mseWidthOrHeightChangeOnLock=!1,this[t(1519)]=!1,this.mediaSourceAudioInitTimeoutOnLock=!1,this.mediaSourceAudioNoDataTimeoutOnLock=!1,this[t(1373)]=!1,this.mediaSourceUseCanvasRenderPlayFailedOnLock=!1,this.webcodecsH265NotSupportOnLock=!1,this[t(880)]=!1,this[t(1208)]=!1,this[t(968)]=!1,this[t(1418)]=!1,this[t(1166)]=!1,this[t(916)]=!1,this[t(1346)]=!1,this.wasmWidthOrHeightChangeOnLock=!1,this[t(508)]=!1,this.notSupportNewWasmOnLock=!1,this[t(1230)]=!1,this[t(1355)]=!1,this[t(1421)]=!1,this[t(525)]=!1,this[t(421)]=!1,this[t(1231)]=!1,this[t(720)]=!1,this[t(817)]=!1,this.webrtcErrorOnLock=!1,this[t(650)]=!1,this[t(586)]=!1,this[t(1468)]=!1,this[t(1065)]=!1,this[t(1136)]=!1,this[t(881)]=!1,this[t(913)]=!1,this.webrtcStreamH265OnLock=!1,this[t(443)]=!1}isDestroyed(){return this[cR(1118)]}[cR(1008)](){const t=cR;return this.player?this[t(1089)][t(1008)]():{}}[cR(759)](t){const e=cR;this.debugLog(e(712),e(1518)+t),this._opt.debug=!!t,this[e(1089)]?this[e(1089)][e(1229)]({debug:!!t},!0):this[e(1264)]("JbPro",e(1238))}[cR(520)](){const t=cR;let e=!1;return this[t(1089)]&&(e=this.player[t(1004)][t(1318)]),e}mute(){const t=cR;this[t(1423)](t(712),t(1323)),this[t(1089)]&&this[t(1089)].mute(!0)}cancelMute(){const t=cR;this[t(1423)](t(712),t(1506),this.isMute()),this.player&&this.player[t(714)]()&&this[t(1089)][t(700)](!1)}setVolume(t){const e=cR;this[e(1423)](e(712),e(774)+t),this.player&&(this[e(1089)][e(1003)]=t)}[cR(334)](){const t=cR;let e=null;return this[t(1089)]&&(e=this[t(1089)][t(1003)],e=parseFloat(e)[t(1368)](2)),e}[cR(1558)](){const t=cR;this[t(1423)](t(712),t(1488)),this[t(842)]()}[cR(1179)](t){const e=cR;this[e(1423)](e(712),e(876)+t),t=Number(t),isNaN(t)?this.debugWarn(e(712),e(993)+t+e(596)):(this[e(1004)].timeout=t,this[e(1004)][e(622)]=t,this[e(1004)].heartTimeout=t,this.player&&this.player[e(1229)]({timeout:t,loadingTimeout:t,heartTimeout:t}))}[cR(1475)](t){const e=cR;this.debugLog("JbPro",e(635)+t),this.player?this.player.setScaleMode(t):this.debugWarn(e(712),e(385))}[cR(454)](){const t=cR;let e=arguments[t(1416)]>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((s,i)=>{const r=t;this.debugLog(r(712),r(785)+e),this[r(549)]()&&i(r(802)),(this[r(1004)][r(1046)]||this[r(1004)].replayUseLastFrameShow)&&(this[r(1299)]=this[r(756)]()),this[r(987)]=this[r(1564)](),this[r(1422)](e)[r(608)]((t=>{s(t)})).catch((t=>{i(t)}))}))}_pause(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(((e,s)=>{const i=lR;if(this[i(1423)](i(712),i(1057)+t),this[i(549)]())return s(i(802));this[i(519)](),this[i(1089)]?this[i(971)]()?(this[i(1423)](this.TAG_NAME,"_pause() player has loaded"),this[i(1089)].pause(t)[i(608)]((t=>{e(t)})).catch((t=>{s(t)}))):(this[i(1423)](this[i(989)],i(911)),this[i(1089)].on(M[i(664)],(()=>{const r=i;this[r(1423)](this[r(989)],"_pause() player has not loaded and load success,next pause"),this[r(1089)][r(454)](t)[r(608)]((t=>{const s=r;this.debugLog(this[s(989)],"_pause() end"),e(t)})).catch((t=>{const e=r;this[e(1332)](this[e(989)],"_pause() error",t),s(t)}))}))):s("player is null")}))}[cR(1028)](){return new Promise(((t,e)=>{const s=lR;if(this[s(549)]())return e("JbPro is destroyed");this.debugLog("JbPro",s(1396)),this[s(887)]().then((()=>{t()}))[s(978)]((t=>{e(t)}))}))}[cR(1271)](){const t=cR;this[t(1423)](t(712),t(336)),this[t(1089)]&&this.player[t(1315)]?this[t(1309)]()===f[t(1135)]?this[t(1089)][t(1315)][t(1271)]():this[t(1264)](t(712),"clearView",t(308)):this[t(1264)]("JbPro",t(1271),t(929))}play(){const t=cR;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",s=arguments[t(1416)]>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,r)=>{const n=t;if(this[n(549)]())return r(n(802));if(wi()){const t=decodeURIComponent(Ht);return this.debugError(this[n(989)],t),void r(t)}try{this[n(1423)](n(712),n(447)+e,JSON[n(1130)](s))}catch(t){this[n(1423)](n(712),n(447)+e,s)}if(!e&&!this[n(1004)][n(1220)])return this[n(1431)](M[n(1541)],U[n(1480)]),void r(n(998));if(e&&(e=(""+e)[n(825)](),-1===e[n(949)](n(560))&&-1===e[n(949)](n(1364))&&-1===e[n(949)](n(1293))&&-1===e.indexOf(n(433))&&-1===e[n(949)]("wss:")&&-1===e[n(949)](n(483))&&-1===e.indexOf(n(598))))return r(n(1174)+e+n(827));if(ci(this[n(1004)][n(972)]))return this[n(710)][n(440)]=n(440),this[n(710)].muted=!1,this[n(710)][n(1297)]=e,this[n(710)].play(),void i(this.$videoElement);if(this._opt[n(1495)]){let t=s[n(319)]||this._opt[n(619)][n(319)],o=s[n(791)]||this._opt[n(619)][n(791)];if(this[n(1004)][n(584)]&&(!t||!o)){const e=this[n(1004)][n(584)][n(866)](".");t=ti(e[0]),o=ti(e[1])}if(!t||!o){const t=e||this[n(1004)].url;return void this[n(1497)](t)[n(608)]((t=>{const o=n;let{cryptoIV:a,cryptoKey:h}=t;this[o(1004)][o(619)].cryptoKey=h,this[o(1004)][o(619)].cryptoIV=a,s[o(791)]=a,s[o(319)]=h,this[o(689)](e,s).then((()=>{i()})).catch((t=>{r(t)}))}))[n(978)]((t=>{r(t)}))}this[n(1004)][n(619)][n(319)]=t,this[n(1004)].playOptions[n(791)]=o,s[n(791)]=o,s[n(319)]=t}else if(this[n(1004)][n(1490)]){let t=s[n(319)]||this[n(1004)][n(619)].cryptoKey,e=s[n(791)]||this._opt[n(619)].cryptoIV;if(this[n(1004)][n(1117)]&&(!t||!e)){const s=this._opt[n(1117)][n(866)](".");t=ti(s[0]),e=ti(s[1])}t&&e&&(this._opt[n(619)][n(319)]=t,this[n(1004)][n(619)][n(791)]=e,s[n(791)]=e,s[n(319)]=t)}else if(this._opt[n(468)]){let t=s.cryptoKey||this[n(1004)].playOptions.cryptoKey,e=s.cryptoIV||this[n(1004)][n(619)][n(791)];if(this._opt[n(615)]&&(!t||!e)){const s=this[n(1004)][n(615)][n(866)](".");2===s.length&&(t=ac(s[0]),e=ac(s[1]))}t&&e&&(this[n(1004)][n(619)].cryptoKey=t,this[n(1004)][n(619)][n(791)]=e,s[n(791)]=e,s.cryptoKey=t)}this[n(689)](e,s)[n(608)]((()=>{i()}))[n(978)]((t=>{r(t)}))}))}[cR(689)](t){const e=cR;let s=arguments[e(1416)]>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,r)=>{const n=e;if(this[n(1089)])if(t)if(this[n(1004)][n(1220)])if(t===this._opt[n(1220)])if(this[n(1089)].playing)this.debugLog(n(712),"_playBefore",n(1151)),i();else{this[n(1423)](n(712),n(689),n(474)+n(1141));let t=this[n(695)]();(this[n(1004)][n(1046)]||this[n(1004)][n(1206)])&&this[n(1299)]&&this[n(1299)][n(555)]&&(t=Object[n(651)](t,this[n(1299)])),ci(this[n(987)])&&(t.isNotMute=!0,this[n(987)]=!0);const e=this[n(1004)].url,o=Object[n(651)]({},this[n(1004)][n(619)],s);this[n(431)](t)[n(608)]((()=>{const t=n;this[t(1369)](e,o).then((()=>{i()}))[t(978)]((e=>{const s=t;this.debugError("JbPro",s(1189),e),this[s(1431)](M.crashLog,this[s(594)](s(1e3),e)),r(e)}))}))[n(978)]((t=>{const e=n;this[e(1332)](e(712),e(373),t),r(t)}))}else{this[n(1423)]("JbPro",n(689),n(1327)+this[n(1004)][n(1220)]+n(513)+t+n(301));const e=this[n(695)]();this[n(431)](e)[n(608)]((()=>{const e=n;this[e(1369)](t,s)[e(608)]((()=>{i()}))[e(978)]((t=>{const s=e;this[s(1332)](s(712),"_playBefore _play error",t),this[s(1431)](M[s(1334)],this[s(594)](s(435),t)),r(t)}))}))[n(978)]((t=>{const e=n;this[e(1332)](e(712),e(373),t)}))}else this[n(1369)](t,s).then((()=>{i()}))[n(978)]((t=>{const e=n;this[e(1332)]("JbPro",e(1052),t),this[e(1431)](M[e(1334)],this[e(594)](e(1300),t)),r(t)}));else{let t=this[n(695)]();(this[n(1004)].pauseAndNextPlayUseLastFrameShow||this[n(1004)].replayUseLastFrameShow)&&this[n(1299)]&&this._tempPlayBgObj.loadingBackground&&(t=Object.assign(t,this[n(1299)])),ci(this[n(987)])&&(t[n(1439)]=!0,this[n(987)]=!0),this[n(431)](t)[n(608)]((()=>{const t=n;this[t(1369)](this[t(1004)][t(1220)],this._opt[t(619)])[t(608)]((()=>{i()}))[t(978)]((e=>{const s=t;this[s(1332)]("JbPro","_playBefore _play error",e),this[s(1431)](M[s(1334)],this[s(594)](s(633),e)),r(e)}))}))[n(978)]((t=>{const e=n;this.debugError(e(712),e(373),t)}))}else t?this[n(1369)](t,s)[n(608)]((()=>{i()}))[n(978)]((t=>{const e=n;this[e(1332)](e(712),e(1052),t),this.emit(M[e(1334)],this[e(594)](e(1433),t)),r(t)})):this[n(1369)](this[n(1004)][n(1220)],this[n(1004)][n(619)])[n(608)]((()=>{i()}))[n(978)]((t=>{const e=n;this[e(1332)](e(712),e(1052),t),this[e(1431)](M.crashLog,this[e(594)]("this.player.play 6",t)),r(t)}))}))}[cR(1497)](t){return new Promise(((e,s)=>{const i=lR,r=function(t){const e=Me,s=(t||document[e(496)][e(323)]())[e(400)]("//"),i=s[1][e(419)]("/");let r=s[1].substring(i);return-1!=r[e(419)]("?")&&(r=r.split("?")[0]),r}(t);let n=this._opt[i(879)],o="";const a=ei(t);if(n){if(o=n,this[i(1004)].isM7sCrypto&&-1===o.indexOf(E+i(1251))){const t=ei(n);o=t[i(518)]+E+(i(1251)+r)}}else n=a[i(518)]+E,o=n+(i(1251)+r);var h;this.player.debugLog("JbPro",i(1479)+o+" and opt.cryptoKeyUrl: "+this[i(1004)][i(879)]),(h=o,new Promise(((t,e)=>{const s=Gu;il[s(501)](h)[s(497)]((e=>{t(e)}))[s(495)]((t=>{e(t)}))})))[i(608)]((t=>{const r=i;if(t){const i=t[r(866)]("."),n=ti(i[0]),o=ti(i[1]);o&&n?e({cryptoIV:o,cryptoKey:n}):s(r(870))}else s(r(1115)+o+r(958))}))[i(978)]((t=>{s(t)}))}))}[cR(629)](t){const e=cR;let s=arguments[e(1416)]>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,r)=>{const n=e;if(this.isDestroyed())return r(n(802));try{this[n(1423)](n(712),n(1100)+t+n(404),JSON[n(1130)](s))}catch(e){this[n(1423)](n(712),n(1100)+t+n(404),s)}if(ci(this[n(1004)][n(972)]))return r(n(539));const o=ni(),a=Object.assign({},o.playbackConfig,this[n(1004)].playbackConfig,s);ci(a[n(1180)])&&a[n(1082)]&&(a.isCacheBeforeDecodeForFpsRender=!1,this[n(1264)]("JbPro",n(458))),0===a.rateConfig[n(1416)]&&a[n(637)]&&(a[n(637)]=!1,this[n(1264)](n(712),n(387))),hi(a[n(1180)])&&!a[n(307)]&&ci(a[n(470)])&&(a[n(470)]=!0,this[n(1264)](this.TAG_NAME,n(748))),a.controlType,A[n(1436)];let h=a[n(535)]||this[n(1004)][n(535)];const l={videoBuffer:0,playbackConfig:a,playType:c[n(1305)],openWebglAlignment:!0,useMSE:a[n(628)],useWCS:a[n(1399)],useSIMD:a[n(1526)],playbackForwardMaxRateDecodeIFrame:h};bs(a[n(806)])&&(l[n(806)]=a[n(806)]),this[n(431)](l)[n(608)]((()=>{const e=n;this[e(516)](t,s)[e(608)]((()=>{i()}))[e(978)]((t=>{r(t)}))}))[n(978)]((t=>{r(t)}))}))}[cR(451)](){const t=cR;let e=arguments[t(1416)]>0&&void 0!==arguments[0]&&arguments[0];return this[t(549)]()?Promise[t(569)](t(802)):(this[t(1423)](t(712),t(446)+e),this._opt[t(868)]===c.player?Promise[t(569)](t(1103)):new Promise(((s,i)=>{const r=t;if(!this[r(1089)])return i("player is null");hi(e)?this[r(1422)]()[r(608)]((()=>{s()})).catch((t=>{i(t)})):(this[r(1089)][r(451)]=!0,this[r(1089)].recording=!1,this[r(1089)][r(1085)]=!1,this[r(354)]=setTimeout((()=>{this[r(354)]=null,s()}),100))})))}[cR(1353)](){const t=cR;return this[t(549)]()?Promise[t(569)](t(802)):(this[t(1423)](t(712),t(853)),this[t(1004)][t(868)]===c[t(1089)]?Promise[t(569)]("playType is player, can not call playbackResume method"):new Promise(((e,s)=>{const i=t;if(!this.player)return s(i(929));this[i(1089)][i(451)]=!1,this[i(491)]=setTimeout((()=>{this[i(491)]=null,e()}),100)})))}[cR(927)](t){const e=cR;return this[e(549)]()?Promise.reject(e(802)):(this[e(1423)](e(712),e(1522)+t),ci(this[e(1004)][e(972)])||this[e(1004)][e(868)]===c.player?(this[e(1423)](e(712),e(1464)+this[e(1004)].isLive+e(957)+this[e(1004)][e(868)]),Promise[e(569)](e(1430))):us(Number(t))?new Promise(((s,i)=>{const r=e;this[r(1089)]?(t=Ve(Number(t),.1,32),this[r(1089)][r(1169)]&&this[r(1089)][r(1169)].updateWorkConfig({key:r(618),value:t}),this[r(1089)][r(629)][r(408)](t),this[r(1089)].video&&this.player[r(1315)].setRate(t),this[r(1089)][r(820)]&&this[r(1089)][r(820)].setRate(t),(this[r(1089)].isPlaybackUseWCS()||this[r(1089)].isPlaybackUseMSE())&&this.player[r(285)]()&&this.player[r(610)]()&&this.player[r(372)][r(1420)](),s()):i("player is not playing")})):Promise.reject('forward() params "rate": '+t+" must be number type"))}[cR(1145)](t){const e=cR;return this[e(549)]()?Promise[e(569)](e(802)):new Promise(((s,i)=>{const r=e;this[r(927)](t)[r(608)]((()=>{s()})).catch((t=>{i(t)}))}))}normal(){const t=cR;return this[t(549)]()?Promise[t(569)](t(802)):new Promise(((e,s)=>{const i=t;this.forward(1)[i(608)]((()=>{e()}))[i(978)]((t=>{s(t)}))}))}[cR(340)](){const t=cR;return this[t(549)]()?Promise[t(569)](t(802)):new Promise(((e,s)=>{const i=t;this[i(559)]()[i(608)]((()=>{e()}))[i(978)]((t=>{s(t)}))}))}[cR(612)](t){const e=cR;this.isDestroyed()||(this.debugLog(e(712),"updatePlaybackForwardMaxRateDecodeIFrame() "+t),t=Number(t),t=Ve(t=parseInt(t,10),1,8),this[e(1004)][e(535)]=t,this.player?this.player[e(1229)]({playbackForwardMaxRateDecodeIFrame:t},!0):this[e(1264)]("JbPro",e(1389)))}[cR(1434)](t){const e=cR;if(this[e(549)]())return;this.debugLog("JbPro",e(389)+t);const s=xs(t);this[e(1089)]?this[e(1089)][e(894)]()?s<10&&0!==t&&this[e(1089)][e(629)][e(1539)]()?this[e(1264)]("JbPro",e(819)+t+e(1249)):this[e(1089)][e(629)][e(749)]()&&t>this.player[e(629)][e(1269)]?this[e(1264)]("JbPro",e(856)+t+e(692)+this[e(1089)][e(629)][e(1269)]):(this[e(1089)][e(629)][e(1539)]()&&10===s&&(t*=1e3),this.player.playback[e(1083)](t),this.player.playing?this[e(570)]():this[e(1264)](this[e(989)],e(901))):this[e(1264)]("JbPro",e(865)):this.debugWarn("JbPro",e(753))}[cR(497)](t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),e(780)+t),this[e(1089)]?this.player[e(894)]()?this[e(1089)].playback[e(1539)]()?this[e(1089)].playback.setShowPrecision(t):this.debugWarn("JbPro",e(1051)):this[e(1264)](e(712),e(1512)):this.debugWarn(e(712),"player is null"))}[cR(975)](){const t=cR;this.isDestroyed()||(this.debugLog(t(712),t(1466)),this[t(1089)]?this[t(1089)][t(894)]()?this[t(1089)][t(629)][t(1539)]()?this.player.playback[t(888)]():this[t(1264)](t(712),t(1051)):this[t(1264)](t(712),t(1512)):this[t(1264)]("JbPro",t(929)))}playbackClearCacheBuffer(){const t=cR;this[t(549)]()||(this[t(1423)](t(712),t(966)),this[t(1089)]?this[t(1089)][t(894)]()?(this[t(1011)](),this[t(1089)].video&&this[t(1089)][t(1315)][t(417)](),this.player[t(820)]&&this[t(1089)][t(820)][t(417)](),this.player.resetStartBpsTime()):this[t(1264)](t(712),t(1512)):this[t(1264)](t(712),"player is null"))}[cR(364)](){const t=cR;return this[t(1089)]?this[t(1089)][t(894)]()?this[t(1089)][t(836)]():(this.debugWarn(t(712),"playType is not playback"),1):(this[t(1264)]("JbPro",t(929)),1)}updatePlaybackLocalOneFrameTimestamp(t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),e(730)+t),this.player?this[e(1089)][e(894)]()?this[e(1089)][e(629)][e(908)](t):this[e(1264)](e(712),"playType is not playback"):this[e(1264)](e(712),e(929)))}[cR(388)](t){const e=cR;if(this.isDestroyed())return;if(this[e(1423)](e(712),e(1524)+t),!this[e(1089)])return void this[e(1264)](e(712),e(929));if(!this.player[e(1004)][e(752)][e(1381)])return void this.debugWarn(e(712),e(1352));(this[e(1089)][e(1004)][e(1107)]||[])[e(411)](t)?(this[e(1004)][e(574)]=t,this.player.streamQuality=t):this.debugWarn(e(712),e(469)+t+e(475))}[cR(1369)](){const t=cR;let e=arguments[t(1416)]>0&&void 0!==arguments[0]?arguments[0]:"",s=arguments[t(1416)]>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,r)=>{const n=t;if(!this[n(1089)])return r("player is null");let h=!1;this[n(1004)][n(1220)]&&this._opt[n(1220)]!==e&&(h=!0),this[n(1004)][n(1220)]=e,this[n(1004)][n(619)]=s;const c=e[n(866)]("?")[0],l=c.startsWith(n(757))||c[n(1039)]("https://"),u=c.startsWith(n(773)),p=c[n(1039)](n(399)),f=c[n(1039)](n(482)),m=c.startsWith(n(1081))||c[n(1039)](n(1233)),g=l||m,A=l&&c[n(601)](n(551)),y=g&&c[n(601)](".flv"),b=g&&(c[n(601)](n(850))||c[n(601)](n(1143))),v=g&&c[n(601)](n(784)),S=g&&(c.endsWith(".h264")||c[n(601)](n(1386))),w=g&&c[n(601)](n(1219));let E=this[n(1004)][n(496)]||!1,I=this[n(1004)].isWebrtcForSRS||!1,T=this[n(1004)][n(1120)]||!1;u&&(-1!==e[n(949)](n(858))?(E=!0,I=!1,T=!1):-1!==e[n(949)](n(1288))&&(I=!0,E=!1,T=!1));let k=null,_=null;if(y&&ci(this[n(1004)][n(1337)])&&this[n(1094)]("isFlv"),b&&ci(this._opt[n(1007)])&&this[n(1094)](n(1007)),v&&ci(this[n(1004)].isMpeg4)&&this[n(1094)]("isMpeg4"),S&&ci(this[n(1004)][n(1268)])&&this[n(1094)](n(1268)),w&&ci(this[n(1004)][n(467)])&&this[n(1094)](n(467)),A&&ci(this._opt[n(1090)])&&this._resetDemuxType(n(1090)),this[n(1089)].isPlayVod()&&ci(this[n(1004)][n(1090)]||this[n(1004)][n(1007)]))return this[n(1004)][n(616)]&&this.showErrorMessageTips("url is not support"),void r("play url "+e+n(1054));if(l?k=this._opt[n(1090)]?o[n(515)]:o[n(349)]:f?k=o[n(456)]:u?k=o[n(1072)]:p?k=o[n(738)]:m&&(k=o.websocket),this[n(1004)][n(1268)]?_=d[n(1086)]:this[n(1004)][n(1007)]?_=d[n(1097)]:this[n(1004)][n(984)]?_=d[n(1403)]:this[n(1004)][n(1337)]?_=d[n(1077)]:this._opt.isTs?_=d.ts:this[n(1004)][n(1090)]?_=d[n(515)]:u?_=d[n(1072)]:p?_=d[n(738)]:f?_=d[n(456)]:m&&(_=d[n(754)]),!k||!_)return this[n(1004)][n(616)]&&this.showErrorMessageTips(n(983)),r(n(1410)+e+n(1069)+a[k]+n(383)+_);this[n(1423)](n(712),n(1410)+e+" protocol is "+a[k]+n(383)+_);const C=()=>{const t=n;this.player.on(U[t(657)],this._handleWebglAlignmentError[t(1496)](this)),this[t(1089)].on(U.webglContextLostError,this[t(1542)].bind(this)),this[t(1089)].on(U.mediaSourceH265NotSupport,this._handleMediaSourceH265NotSupport[t(1496)](this)),this[t(1089)].on(U.mseWaitVideoCanplayTimeout,this[t(824)][t(1496)](this)),this[t(1089)].on(U[t(1155)],this[t(1361)].bind(this)),this[t(1089)].on(U[t(839)],this._handleMediaSourceAppendBufferError[t(1496)](this)),this.player.on(U[t(788)],this._handleMseSourceBufferError[t(1496)](this)),this[t(1089)].on(U[t(357)],this[t(1347)][t(1496)](this)),this.player.on(U[t(1125)],this[t(862)][t(1496)](this)),this[t(1089)].on(U[t(931)],this[t(425)][t(1496)](this)),this[t(1089)].on(U[t(962)],this[t(937)].bind(this)),this[t(1089)].on(U[t(390)],this[t(1093)][t(1496)](this)),this.player.on(U.mediaSourceAudioG711NotSupport,this._handleMediaSourceAudioG711NotSupport[t(1496)](this)),this[t(1089)].on(U.mediaSourceAudioInitTimeout,this[t(1187)].bind(this)),this.player[t(889)](U.mediaSourceAudioNoDataTimeout,this._handleMediaSourceAudioNoDataTimeout[t(1496)](this)),this[t(1089)].on(U[t(369)],this[t(942)][t(1496)](this)),this.player.on(U[t(925)],this[t(521)][t(1496)](this)),this[t(1089)].on(U[t(668)],this[t(1063)][t(1496)](this)),this[t(1089)].on(U[t(1134)],this[t(1338)][t(1496)](this)),this[t(1089)].on(U[t(1383)],this[t(1363)][t(1496)](this)),this[t(1089)].on(U[t(772)],this[t(994)].bind(this)),this[t(1089)].on(U[t(826)],this._handleWcsWidthOrHeightChange[t(1496)](this)),this[t(1089)].on(U[t(727)],this[t(789)][t(1496)](this)),this[t(1089)].on(U[t(970)],this[t(1026)][t(1496)](this)),this.player.on(U[t(1096)],this[t(1068)][t(1496)](this)),this[t(1089)].on(U[t(401)],this._handleWasmWidthOrHeightChange[t(1496)](this)),this[t(1089)].on(U.wasmUseVideoRenderError,this[t(830)][t(1496)](this)),this[t(1089)].on(U[t(361)],this._handleNotSupportNewWasm[t(1496)](this)),this[t(1089)].on(U[t(1092)],this[t(723)].bind(this)),this[t(1089)].on(U[t(1376)],this[t(527)][t(1496)](this)),this.player.on(U[t(1451)],this[t(1278)][t(1496)](this)),this.player.on(M.networkDelayTimeout,this[t(977)][t(1496)](this)),this[t(1089)].on(M[t(733)],this[t(656)][t(1496)](this)),this.player.on(U[t(671)],this[t(649)][t(1496)](this)),this.player.on(M[t(1280)],this._handleStreamEnd.bind(this)),this[t(1089)].on(U[t(847)],this[t(565)][t(1496)](this)),this[t(1089)].on(U[t(1108)],this[t(1408)][t(1496)](this)),this[t(1089)].on(U[t(505)],this[t(1549)][t(1496)](this)),this.player.on(U[t(659)],this[t(640)][t(1496)](this)),this[t(1089)].on(U[t(890)],this[t(536)].bind(this)),this.player.on(U[t(1325)],this[t(487)].bind(this)),this.player.on(U.videoElementPlayingFailedForWebrtc,this[t(1138)].bind(this)),this[t(1089)].on(U[t(871)],this[t(1020)][t(1496)](this)),this[t(1089)].on(M[t(764)],this[t(849)][t(1496)](this)),this[t(1089)].on(M[t(436)],this[t(1243)][t(1496)](this)),this[t(1089)].on(M[t(646)],this[t(1126)].bind(this)),this.player.on(M[t(622)],this[t(1550)].bind(this)),this[t(1089)][t(1080)]()&&(this[t(1089)].on(M[t(1450)],this[t(933)][t(1496)](this)),this[t(1089)].on(M[t(1156)],this._handlePlayVodEndedAndReplay[t(1496)](this))),this._hasLoaded()?(this.debugLog(this.TAG_NAME,"_playNext and _hasLoaded() is true"),this.player.play(e,s).then((()=>{i()}))[t(978)]((e=>{const s=t;this[s(1332)]("JbPro","_hasLoaded() and play error",e),this[s(1431)](M.crashLog,this[s(594)](s(982),e)),this[s(1089)]&&this[s(1089)][s(454)]().then((()=>{r(e)})).catch((t=>{const e=s;r(t),this[e(1332)](e(712),e(1139),t)}))}))):(this[t(1423)](this[t(989)],t(294)),this[t(771)](),this[t(1089)][t(889)](M.decoderWorkerInit,(()=>{const n=t;this._clearInitDecoderWorkerTimeout(),this[n(549)]()?this[n(1423)](n(712),n(1523)):(this.debugLog(this[n(989)],n(329)),this[n(1089)][n(516)](e,s)[n(608)]((()=>{i()}))[n(978)]((t=>{const e=n;this[e(1332)](e(712),e(855),t),this[e(1431)](M[e(1334)],this[e(594)](e(855),t)),this.player&&this[e(1089)][e(454)]()[e(608)]((()=>{r(t)}))[e(978)]((t=>{const s=e;r(t),this.debugError(s(712),s(930),t)}))})))})))},R=this.player[n(1008)](),D=this[n(1004)][n(1090)]&&ci(this._opt[n(1190)]),L=u&&ci(this[n(1004)][n(395)]),x=this[n(1004)][n(1090)]&&!!Ws(),P=this[n(1004)][n(1090)]&&R.demuxUseWorker;if(D||L||p||h||v||x||P)this[n(1423)](n(712),n(822)+D+n(297)+L+n(1453)+p+n(1478)+h+n(428)+v+n(833)+x+n(1551)+P),this[n(431)]({protocol:k,demuxType:_,isHls:this._opt[n(1090)],isFmp4:this[n(1004)][n(1007)],isWebrtc:u,isWebrtcForZLM:E,isWebrtcForSRS:I,isWebrtcForOthers:T,isAliyunRtc:p,cryptoKey:s[n(319)]||"",cryptoIV:s[n(791)]||"",url:e,playOptions:s})[n(608)]((()=>{C()}))[n(978)]((t=>{r("reset player error")}));else{const t={protocol:k,demuxType:_,isHls:this[n(1004)][n(1090)],isWebrtc:u,isAliyunRtc:p,isFlv:this[n(1004)][n(1337)],isFmp4:this[n(1004)][n(1007)],isMpeg4:this[n(1004)].isMpeg4,isNakedFlow:this[n(1004)].isNakedFlow,isTs:this[n(1004)].isTs,cryptoKey:s[n(319)]||"",cryptoIV:s[n(791)]||""};this[n(1004)].isNakedFlow&&(t[n(1529)]=!1,t[n(1306)]=!1),this[n(1089)][n(1229)](t),C()}}))}[cR(1094)](t){const e=cR;this._opt[e(1337)]=!1,this[e(1004)][e(1007)]=!1,this._opt[e(984)]=!1,this[e(1004)].isNakedFlow=!1,this._opt.isHls=!1,this[e(1004)].isWebrtc=!1,this[e(1004)][e(496)]=!1,this._opt.isWebrtcForSRS=!1,this[e(1004)][e(1120)]=!1,this._opt[e(1218)]=!1,this[e(1004)][e(467)]=!1,t&&(this._opt[t]=!0)}resize(){const t=cR;this[t(549)]()||(this[t(1423)](t(712),t(288)),this.player&&this.player[t(885)]())}[cR(803)](t){const e=cR;if(this[e(549)]())return;this[e(1423)](e(712),e(1286)+t),(t=Number(t))>10&&this[e(1264)](e(712),e(1171)+t+" second, is too large, video will show blank screen until cache "+t+" second buffer data");const s=1e3*t;this._opt[e(1314)]=s,this[e(1089)]?this[e(1089)][e(1229)]({videoBuffer:s},!0):this[e(1264)](e(712),"setBufferTime() player is null")}[cR(861)](t){const e=cR;if(this.isDestroyed())return;this[e(1423)](e(712),e(1494)+t),(t=Number(t))<.2&&this[e(1264)](e(712),"setBufferDelayTime() buffer time delay is "+t+e(1112));const s=1e3*(t=Ve(t,.2,100));this._opt[e(1076)]=s,this.player?this[e(1089)].updateOption({videoBufferDelay:s},!0):this[e(1264)](e(712),e(1498))}setRotate(t){const e=cR;if(this[e(549)]())return;this[e(1423)](e(712),e(846)+t),t=parseInt(t,10);this[e(1004)][e(924)]!==t&&-1!==[0,90,180,270][e(949)](t)?(this[e(1004)][e(924)]=t,this[e(1089)]?this[e(1089)][e(816)](t):this[e(1264)]("JbPro",e(1349))):this.debugWarn(e(712),e(1005)+t+" and this._opt.rotate is "+this._opt[e(924)])}[cR(973)](t){const e=cR;if(this.isDestroyed())return;this[e(1423)](e(712),e(1201)+t);const s=[e(666),e(726),"vertical"];!t&&(t=e(666)),this._opt[e(1225)]!==t&&-1!==s[e(949)](t)?(this[e(1004)][e(1225)]=t,this.player?(this[e(1089)].updateOption({mirrorRotate:t}),this.resize()):this[e(1264)](e(712),e(632))):this.debugWarn(e(712),"setMirrorRotate() mirrorRotate is "+t+e(1154)+this[e(1004)][e(1225)])}[cR(1502)](t){const e=cR;if(this[e(549)]())return;this[e(1423)](e(712),e(316)+t);const s=[e(731),e(1471),e(493)];!t&&(t=e(731)),this[e(1004)].aspectRatio!==t&&-1!==s[e(949)](t)?(this._opt[e(686)]=t,this[e(1089)]?(this[e(1089)][e(1229)]({aspectRatio:t}),this[e(885)]()):this[e(1264)](e(712),e(1001))):this.debugWarn("JbPro",e(746)+t+" and this._opt.aspectRatio is "+this._opt[e(1225)])}[cR(407)](){return!0}[cR(971)](){const t=cR;return this.player&&this.player[t(583)]||!1}[cR(1272)](){const t=cR;this[t(549)]()||(this.debugLog(t(712),t(795)),this._opt[t(1366)]=!0,this[t(1089)]?this.player[t(1229)]({keepScreenOn:!0}):this.debugWarn(t(712),t(669)))}setFullscreen(t){const e=cR;if(this[e(549)]())return;this.debugLog("JbPro","setFullscreen() "+t);const s=!!t;this[e(1089)]?this[e(1089)][e(563)]!==s?this[e(1089)][e(563)]=s:this[e(1264)](e(712),"setFullscreen() fullscreen is "+s+e(851)+this[e(1089)][e(563)]):this[e(1264)](e(712),e(489))}[cR(485)](t){const e=cR;if(this[e(549)]())return;this[e(1423)](e(712),e(1345)+t);const s=!!t;this[e(1089)]?this[e(1089)].webFullscreen=s:this.debugWarn("JbPro",e(588))}screenshot(t,e,s,i){const r=cR;if(!this.isDestroyed())return this[r(1423)](r(712),r(311)+t+" "+e+" "+s+" "+i),this[r(1089)]&&this.player[r(1315)]?this[r(1089)].video.screenshot(t,e,s,i):(this.debugWarn("JbPro",r(996)),null)}[cR(1186)](t){return new Promise(((e,s)=>{const i=lR;if(this[i(549)]())return s(i(1050));this[i(1423)]("JbPro","screenshotWatermark()",t),this[i(1089)]&&this[i(1089)][i(1315)]?this[i(1089)][i(1315)][i(1186)](t)[i(608)]((t=>{e(t)}))[i(978)]((t=>{s(t)})):(this[i(1264)](i(712),"screenshotWatermark() player is not ready"),s("player is not ready"))}))}[cR(1236)](t){return new Promise(((e,s)=>{const i=lR;if(this.isDestroyed())return s(i(1050));this[i(1423)](i(712),"screenshotCopyrightWatermark()",t),this[i(1089)]&&this[i(1089)][i(1315)]?this[i(1089)][i(1315)].screenshotCopyrightWatermark(t)[i(608)]((t=>{e(t)})).catch((t=>{s(t)})):(this[i(1264)](i(712),i(1375)),s("player is not ready"))}))}[cR(1516)](t){return new Promise(((e,s)=>{const i=lR;if(this[i(549)]())return s(i(1050));if(this[i(1423)](i(712),"screenshotByRect()",t),this[i(1089)]&&this[i(1089)][i(1315)]){e(this.player[i(1315)][i(1516)](t))}else this[i(1264)]("JbPro",i(1122)),s("player is not ready")}))}[cR(1287)](t,e){return new Promise(((s,i)=>{const r=lR;return this[r(549)]()?i("player is destroyed"):(this[r(1423)](r(712),r(810)+t+" "+e),this[r(1089)]?void(this.player[r(599)]?(this[r(1089)][r(1287)](t,e),s()):(this[r(1264)]("JbPro",r(1440)),i(r(1324)))):(this.debugWarn(r(712),r(589)),i(r(1348))))}))}[cR(335)](t,e){return new Promise(((s,i)=>{const r=lR;if(this.isDestroyed())return i(r(1050));this[r(1423)](r(712),"stopRecordAndSave() "+t+" "+e),this[r(1089)]&&this[r(1089)][r(1106)]?this[r(1089)].stopRecordAndSave(t,e)[r(608)]((t=>{s(t)}))[r(978)]((t=>{i(t)})):i(r(532))}))}cancelRecord(){return new Promise(((t,e)=>{const s=lR;return this[s(549)]()?e("player is destroyed"):(this[s(1423)]("JbPro",s(897)),this.player?void this.player[s(1197)]()[s(608)]((()=>{t()}))[s(978)]((t=>{e(t)})):(this.debugWarn("JbPro",s(811)),e(s(1348))))}))}isPlaying(){const t=cR;let e=!1;return this[t(1089)]&&(e=this[t(1089)][t(610)]()),e}[cR(403)](){const t=cR;return!!this[t(1089)]&&this[t(1089)][t(1245)]}[cR(762)](){const t=cR;let e=!1;return this[t(1004)].playType===c.player?e=!this[t(610)]()&&!this[t(403)]():this[t(1004)][t(868)]===c.playbackTF&&this.player?e=this[t(1089)][t(451)]:this._opt[t(868)]===c[t(864)]&&this[t(1089)]&&(e=this.player[t(1540)]),e}isPaused(){return this.isPause()}[cR(697)](){const t=cR;let e=!1;return this._opt[t(868)]===c[t(1305)]&&this[t(1089)]&&(e=this[t(1089)][t(451)]),e}[cR(1158)](){return this[cR(697)]()}[cR(959)](){const t=cR;let e=!1;return this[t(1004)][t(868)]===c.playVod&&this[t(1089)]&&(e=this[t(1089)][t(1540)]),e}[cR(1564)](){const t=cR;let e=!0;return this[t(1089)]&&(e=this[t(1089)][t(714)]()),e}[cR(841)](){const t=cR;let e=!1;return this[t(1089)]&&(e=this[t(1089)][t(1106)]),e}isFullscreen(){const t=cR;let e=!1;return this.player&&(e=this[t(1089)][t(563)]),e}[cR(921)](){const t=cR;let e=!1;return this[t(1089)]&&(e=this[t(1089)][t(670)]),e}[cR(1011)](){const t=cR;this[t(549)]()||(this[t(1423)](t(712),t(739)),this[t(1089)]?this[t(1089)][t(1011)]():this.debugWarn(t(712),t(418)))}[cR(965)](t){const e=cR;if(this[e(549)]())return;this[e(1423)](e(712),e(896)+t),(t=Number(t))<1&&this[e(1264)](e(712),e(413)+t+" second, is too small");const s=1e3*(t=Ve(t,1,100));this[e(1004)][e(463)]=s,this[e(1089)]?this.player.updateOption({networkDelay:s},!0):this[e(1264)](e(712),"setNetworkDelayTime() player is null")}[cR(1459)](){const t=cR;let e="";return this[t(1089)]&&(e=this.player[t(1459)]()),e}[cR(1309)](){const t=cR;let e="";return this.player&&(e=this[t(1089)][t(1309)]()),e}[cR(321)](){const t=cR;let e="";return this.player&&(e=this[t(1089)][t(321)]()),e}[cR(1470)](){const t=cR;let e=0;return this[t(1089)]&&(e=this[t(1089)][t(1470)]()),e}[cR(1392)](){const t=cR;let e=pt[t(887)];return this[t(1089)]&&(e=this[t(1089)][t(1245)]?pt[t(1245)]:this.player[t(599)]?pt.playing:pt[t(1027)]),e}[cR(1252)](){const t=cR;return this[t(1089)]?this[t(1089)][t(1004)][t(868)]:c[t(1089)]}[cR(766)](t){const e=cR;if(this[e(549)]())return;this[e(1423)](e(712),e(360)+t);const s=this[e(1089)]._opt.showPerformance;let i=!s;bs(t)&&(i=t),i!==s?this.player?this[e(1089)][e(766)](i):this[e(1264)](e(712),e(980)):this[e(1264)](e(712),e(358)+s+e(716)+i)}openZoom(){const t=cR;if(!this[t(549)]())if(this[t(1423)](t(712),t(992)),this[t(1089)]){if(this[t(1089)].isDestroyedOrClosed())return void this[t(1264)](t(712),t(557));this[t(1089)][t(1085)]=!0}else this.debugWarn("JbPro","openZoom() failed, this.player is not init")}[cR(478)](){const t=cR;if(!this[t(549)]())if(this[t(1423)](t(712),t(1060)),this[t(1089)]){if(this[t(1089)][t(1460)]())return void this[t(1264)](t(712),"openZoom() failed, this.player is destroyed or paused");this[t(1089)][t(1085)]=!1}else this[t(1264)](t(712),t(412))}[cR(1203)](){const t=cR;let e=!1;return this[t(1089)]&&(e=this[t(1089)][t(1085)]),e}[cR(287)](t){const e=cR;this.isDestroyed()||(this[e(1423)]("JbPro",e(1382)+t),!bs(t)&&(t=!this[e(1203)]()),hi(t)?this[e(1159)]():ci(!1)&&this[e(478)]())}[cR(693)](){const t=cR;this.isDestroyed()||(this[t(1423)](t(712),"expandZoom()"),this.player&&this[t(1089)].zoom&&this[t(1089)][t(1085)]?this.player[t(900)][t(590)]():this[t(1264)]("JbPro",t(814)))}[cR(882)](){const t=cR;this[t(549)]()||(this.debugLog(t(712),"narrowZoom()"),this[t(1089)]&&this[t(1089)][t(900)]&&this[t(1089)][t(1085)]?this[t(1089)][t(900)][t(613)]():this.debugWarn("JbPro",t(682)))}[cR(1223)](t){const e=cR;this[e(549)]()||(this.debugLog(e(712),e(1452),t),this.player&&this[e(1089)][e(900)]&&this[e(1089)].zooming?this.player.zoom[e(1223)](t):this[e(1264)](e(712),e(682)))}[cR(741)](){const t=cR;if(this[t(549)]())return;let e=1;return this[t(1089)]&&this.player[t(900)]&&(e=this[t(1089)][t(900)][t(1543)]),e}setNakedFlowFps(t){return new Promise(((e,s)=>{const i=lR;if(this[i(549)]())return s(i(1050));if(this[i(1423)](i(712),i(1024),t),ys(t))return s("setNakedFlowFps() fps is empty");let r=Number(t);r=Ve(r,1,100),this[i(1004)][i(317)]=r,this[i(1089)]?this.player[i(1229)]({nakedFlowFps:r}):this[i(1264)]("JbPro",i(1016)),e()}))}[cR(594)](t){const e=cR;let s=arguments[e(1416)]>1&&void 0!==arguments[1]?arguments[1]:"";if(!this.player)return;const i=this[e(1089)][e(1193)](),r=this[e(1089)];let n=r[e(1426)]()?e(370):r[e(894)]()?e(747):"playVod",o={url:this[e(1004)][e(1220)],playType:n,demuxType:r[e(1146)](),decoderType:r.getDecodeType(),renderType:r[e(1309)](),videoInfo:{encType:"",width:"",height:""},audioInfo:{encType:"",sampleRate:"",channels:""},audioEngine:r.getAudioEngineType(),allTimes:i[e(1021)],timestamp:je(),type:t,error:Zs(s)||t};if(r[e(1315)]){const t=r[e(1315)][e(593)]||{};o[e(593)]={encType:t[e(750)]||"",width:t[e(1099)]||"",height:t[e(350)]||""}}if(r[e(820)]){const t=r[e(820)].audioInfo||{};o.audioInfo={encType:t.encType||"",sampleRate:t[e(579)]||"",channels:t[e(704)]||""}}return o}[cR(1035)](t){const e=cR;this.isDestroyed()||(this.debugLog(e(712),e(1010),t),t===m[e(1318)]||t===m[e(572)]?t!==this[e(1089)][e(1004)][e(981)]?(this[e(1004)].debugLevel=t,this.player?this[e(1089)][e(1229)]({debugLevel:t},!0):this.debugWarn(e(712),"updateDebugLevel() player is null")):this[e(1264)](e(712),e(1557)+t):this.debugWarn(e(712),"updateDebugLevel() level is not valid, level: "+t))}updateWatermark(t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),e(1270),t),this[e(1089)]?(this[e(1089)][e(935)](t),this[e(1004)][e(614)]=t):this[e(1264)](e(712),e(1043)))}[cR(1413)](){const t=cR;this[t(549)]()||(this.debugLog(t(712),t(1556)),this[t(1089)]?(this.player[t(1413)](),this[t(1004)][t(614)]={}):this[t(1264)](t(712),t(661)))}[cR(1192)](t){const e=cR;if(!this.isDestroyed())if(this.debugLog(e(712),e(1329),t),Bs(t)){this[e(1004)][e(309)]=t;const s=ws(this[e(1521)],t);if(!s[e(444)])return void this[e(1264)](e(712),e(1485));this[e(799)].load(s)}else this[e(1264)](e(712),"updateFullscreenWatermark() config is not valid, config: "+t)}[cR(952)](){const t=cR;this[t(549)]()||(this.debugLog(t(712),t(591)),this[t(799)]?this.watermark[t(807)]():this[t(1264)]("JbPro",t(923)))}[cR(1274)](){const t=cR;this[t(549)]()||(this[t(1423)](t(712),t(464)),this[t(1089)]?this[t(1089)].faceDetect(!0):this[t(1264)](t(712),t(736)))}[cR(1394)](){const t=cR;this.isDestroyed()||(this[t(1423)]("JbPro",t(576)),this.player?this.player.faceDetect(!1):this[t(1264)](t(712),t(1489)))}[cR(1509)](){const t=cR;this.isDestroyed()||(this[t(1423)]("JbPro",t(384)),this[t(1089)]?this.player[t(645)](!0):this[t(1264)]("JbPro",t(902)))}objectDetectClose(){const t=cR;this[t(549)]()||(this[t(1423)](t(712),t(396)),this.player?this.player[t(645)](!1):this[t(1264)](t(712),t(1254)))}[cR(1070)](t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),e(1387),t),this[e(1089)]?this.player[e(1070)](t):this.debugWarn(e(712),"sendWebsocketMessage() player is not init"))}[cR(943)](t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),"addContentToCanvas()"),this[e(1089)]?(this.player.addContentToCanvas(t),this[e(770)]=t):this[e(1264)]("JbPro",e(665)))}[cR(1256)](){const t=cR;this[t(549)]()||(this[t(1423)](t(712),"clearContentToCanvas()"),this.player?(this[t(1089)][t(943)]([]),this[t(770)]=[]):this[t(1264)](t(712),t(838)))}addContentToContainer(t){const e=cR;this[e(549)]()||(this[e(1423)]("JbPro",e(1290)),this[e(1089)]?this[e(1089)][e(500)](t):this[e(1264)]("JbPro",e(1555)))}[cR(282)](){const t=cR;this[t(549)]()||(this[t(1423)](t(712),"clearContentToContainer()"),this.player?this.player[t(500)]([]):this[t(1264)](t(712),"clearContentToContainer() player is not init"))}[cR(1417)](t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),e(1378),t),this[e(1089)]?this.player[e(1417)](t):this.debugWarn(e(712),e(1491)))}[cR(1432)](){const t=cR;this[t(549)]()||(this[t(1423)]("JbPro",t(621)),this[t(1089)]?this.player[t(1432)]():this.debugWarn(t(712),"clearControlHtml() player is not init"))}[cR(974)](t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),e(648)+t),this[e(1089)]?this.player[e(974)](t):this[e(1264)]("JbPro","toggleControlHtml() player is not init"))}[cR(1104)](){return!!this.player&&this.player.getControlHtmlIsShow()}getControlHtml(){const t=cR;return this[t(1089)]?this[t(1089)].getControlHtml():null}[cR(573)](t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),e(1017),t),this[e(1089)]?this[e(1089)][e(573)](t):this[e(1264)](e(712),e(441)))}[cR(423)](){const t=cR;this.isDestroyed()||(this[t(1423)](t(712),t(877)),this[t(1089)]?this[t(1089)][t(423)]():this[t(1264)](t(712),t(419)))}toggleExtendHtml(t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),"toggleExtendHtml() "+t),this[e(1089)]?this[e(1089)][e(792)](t):this[e(1264)](e(712),e(1045)))}[cR(530)](){return!!this[cR(1089)]&&this.player.getExtendHtmlIsShow()}[cR(872)](){const t=cR;return this[t(1089)]?this[t(1089)][t(872)]():null}[cR(1265)](){const t=cR;let e=null;return this[t(1089)]&&(e=this[t(1089)][t(1265)]()),e}[cR(1507)](){const t=cR;let e=null;return this[t(1089)]&&(e=this[t(1089)][t(1507)]()),e}[cR(1215)](t){const e=cR;if(this.isDestroyed())return;this[e(1423)]("JbPro","setSm4CryptoKey()",t);const s=(t=""+t)[e(866)](".");if(32!==t.length&&2!==s[e(1416)])return void this[e(1264)](e(712),"setSm4CryptoKey() key is invalid and length is "+t[e(1416)]+" !== 32");if(2===s[e(1416)]&&(32!==s[0][e(1416)]||32!==s[1][e(1416)]))return void this.debugWarn("JbPro",e(558)+s[0].length+e(703)+s[1].length+e(1435));this._opt[e(615)]=t;let i=2===s[e(1416)];if(i&&(this[e(1004)][e(619)][e(319)]=ac(s[0]),this._opt[e(619)][e(791)]=ac(s[1])),this[e(1089)]){const s={sm4CryptoKey:t};i&&(s.cryptoKey=this._opt[e(619)][e(319)],s[e(791)]=this[e(1004)][e(619)][e(791)]),this.player[e(1229)](s,!0)}else this[e(1264)]("JbPro",e(352))}[cR(611)](t){const e=cR;this[e(549)]()||(this[e(1423)]("JbPro",e(1200),t),t=""+t,this[e(1004)][e(584)]=t,this[e(1089)]?this[e(1089)].updateOption({m7sCryptoKey:t},!0):this[e(1264)](e(712),e(667)))}[cR(1499)](t){const e=cR;this[e(549)]()||(this[e(1423)]("JbPro","setXorCryptoKey()",t),t=""+t,this[e(1004)][e(1117)]=t,this[e(1089)]?this.player[e(1229)]({xorCryptoKey:t},!0):this[e(1264)](e(712),e(1504)))}updateLoadingText(t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),e(624),t),this[e(1089)]?this[e(1089)].updateLoadingText(t):this.debugWarn("JbPro",e(1214)))}updateIsEmitSEI(t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),e(476),t),this[e(1004)][e(1228)]=t,this.player?this[e(1089)][e(1229)]({isEmitSEI:t},!0):this[e(1264)]("JbPro","updateIsEmitSEI() player is null"))}[cR(1087)](t,e){const s=cR;return this[s(1423)](s(712),s(1477),t),t?this[s(1089)]?HC({type:t,index:0,speed:e}):(this[s(1264)](s(712),s(1360)),null):(this[s(1264)](s(712),"getPTZCmd() ptz is null"),null)}[cR(526)](){return new Promise(((t,e)=>{const s=lR;this[s(1089)]?(this[s(1089)][s(1563)](),t()):e(s(1238))}))}[cR(298)](){return new Promise(((t,e)=>{const s=lR;if(this[s(549)]())return e(s(1050));this[s(1089)]?(this[s(1089)][s(1341)](),t()):e(s(1238))}))}[cR(533)](){return new Promise(((t,e)=>{const s=lR;if(this[s(549)]())return e("player is destroyed");this[s(1089)]?(this.player[s(1185)](),t()):e(s(1238))}))}[cR(1234)](){return new Promise(((t,e)=>{const s=lR;if(this.isDestroyed())return e("player is destroyed");this[s(1089)]?(this[s(1089)][s(1015)](),t()):e(s(1238))}))}[cR(472)](){const t=cR;this[t(549)]()||this.memoryLogger&&this[t(717)][t(499)]()}[cR(756)](){const t=cR;if(ci(this[t(1004)][t(1119)]))return{};const e=this[t(1265)]()||{},s={loadingBackground:this[t(471)]("",t(1425),.5,t(676)),loadingBackgroundWidth:e[t(1099)]||0,loadingBackgroundHeight:e[t(350)]||0};return s.loadingBackground&&s.loadingBackgroundWidth&&s.loadingBackgroundHeight&&(this._tempVideoLastIframeInfo=s),this[t(713)]||{}}[cR(1202)](){const t=cR;this[t(1423)](t(712),"getExtendBtnList()");let e=[];return this.player?e=this.player[t(1202)]():this[t(1264)](t(712),t(582)),e}[cR(1259)](){const t=cR;this[t(1423)](t(712),t(1289));let e=null;return this[t(1089)]?e=this.player[t(490)]():this[t(1264)](t(712),t(312)),e}[cR(859)](t){const e=cR;if(this[e(549)]())return;this.debugLog(e(712),e(732),t);const s=1e3*(t=Number(t));this[e(1004)][e(988)]=s,this[e(1089)]?this[e(1089)].updateOption({aiFaceDetectInterval:s}):this[e(1264)](e(712),e(343))}[cR(1149)](t){const e=cR;if(this[e(549)]())return;if(this[e(1423)]("JbPro",e(742),t),!St[t])return void this[e(1264)]("JbPro",e(1075)+t+e(342));const s=St[t];this[e(1004)][e(292)]=s,this.player?(this[e(1089)][e(1229)]({aiFaceDetectWidth:s}),this.player.ai&&this[e(1089)].ai[e(1545)]({detectWidth:s})):this[e(1264)](e(712),e(511))}[cR(498)](t){const e=cR;if(this[e(549)]())return;this[e(1423)]("JbPro",e(1377),t);const s=1e3*(t=Number(t));this[e(1004)][e(1061)]=s,this[e(1089)]?this[e(1089)][e(1229)]({aiObjectDetectInterval:s}):this[e(1264)](e(712),e(380))}updateAiObjectDetectLevel(t){const e=cR;if(this[e(549)]())return;if(this[e(1423)](e(712),e(1209),t),!wt[t])return void this[e(1264)](e(712),e(1244)+t+e(342));const s=wt[t];this[e(1004)][e(834)]=s,this[e(1089)]?(this[e(1089)][e(1229)]({aiObjectDetectWidth:s}),this[e(1089)].ai&&this.player.ai[e(1029)]({detectWidth:s})):this[e(1264)](e(712),e(642))}[cR(932)](t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),e(673),t),t&&(this._opt[e(879)]=t))}[cR(1044)](t){const e=cR;this[e(549)]()||(this[e(1423)]("JbPro",e(728),t),t&&(this.player?this.player[e(922)](t):this[e(1264)](e(712),e(915))))}setPtzPosition(t){const e=cR;this[e(1423)](e(712),e(543),t),t&&!Ps(t)&&(this.player?this[e(1089)][e(1301)](t):this[e(1264)](e(712),e(567)))}hideErrorMessageTips(){const t=cR;this[t(549)]()||(this[t(1423)](t(712),t(1241)),this[t(1089)]?this[t(1089)][t(941)]():this[t(1264)](t(712),t(1175)))}getContainerRect(){return this._getContainerRect()}[cR(305)](t,e,s,i){const r=cR;return this[r(1319)][r(305)](t,e,s,i)}[cR(1095)](){return this._opt.url}[cR(683)](t,e){const s=cR;this.isDestroyed()||(this[s(1423)](this.TAG_NAME,s(1071)+t+" "+e),this[s(1089)]?this[s(1089)][s(683)](t,e):this.debugWarn(this[s(989)],s(1292)))}[cR(473)](t){const e=cR;if(this[e(549)]())return;this[e(1423)](this[e(989)],"getControlExtendBtnActive() "+t);let s=!1;return this[e(1089)]?s=this.player.getControlExtendBtnActive(t):this[e(1264)](this[e(989)],e(919)),s}toggleControlBar(t){const e=cR;this[e(549)]()||(this[e(1423)](this[e(989)],e(715)+t),this[e(1089)]?this[e(1089)][e(1250)](t):this.debugWarn(this[e(989)],e(899)))}[cR(709)](){const t=cR;if(this[t(549)]())return!1;this[t(1423)](this[t(989)],t(1098));let e=!1;return this[t(1089)]?e=this[t(1089)][t(709)]():this[t(1264)](this.TAG_NAME,"getControlBarShow() player is null"),e}static[cR(1053)](t){return Is(t)}static[cR(1142)](t){return function(t){for(var e=t,s=0,i=0,r=0;r<32;r++)i|=(1&e[s])<=this[e(1004)][e(1458)]){const r=i[0],n=i[i[e(1416)]-1],o=n-r;o<=1e4&&(this[e(1264)](this[e(989)],"retry type is "+t+e(1472)+i[e(1416)]+e(1002)+r+e(1018)+n+e(393)+o),s=!1)}return s}[cR(604)](t){const e=cR;(es()||ss())&&t[e(555)]&&t.loadingBackgroundWidth&&t.loadingBackgroundHeight&&(this[e(1330)](),this[e(1089)][e(1004)][e(686)]===e(731)||Je()?this[e(1089)][e(1309)]()===f[e(1135)]?this[e(1188)](t):this[e(1089)][e(1309)]()===f[e(1315)]&&this[e(706)](t):this[e(1032)](t))}[cR(706)](t){const e=cR;this[e(1423)](this[e(989)],"_doInitLoadingBackgroundForVideo");const s=this._getContainerRect();let i=s[e(1099)],r=s.height;const n=this[e(1089)]._opt;r-=this[e(1089)][e(1374)]();let o=i,a=r;const h=n[e(924)];(270===h||90===h)&&(o=r,a=i),this[e(1033)][e(1099)]=o,this[e(1033)].height=a,this[e(1033)][e(1297)]=t.loadingBackground;let c=(i-o)/2,l=(r-a)/2,d=e(875);!n[e(510)]&&(d=e(528)),n[e(1500)]&&(d="none");let u="";n.mirrorRotate===e(666)&&h&&(u+=e(1284)+h+"deg)"),n[e(1225)]===e(726)?u+=e(698):n.mirrorRotate===e(990)&&(u+=e(386)),this[e(1004)][e(694)]&&(this[e(1033)][e(898)].objectFit=d),this[e(1033)].style[e(954)]=u,this.$loadingBgImage[e(898)].padding="0",this[e(1033)].style.left=c+"px",this[e(1033)][e(898)][e(999)]=l+"px",this[e(1033)][e(409)]?In(this.$loadingBg,e(787)):this.$loadingBgImage[e(1199)]=()=>{const t=e;In(this.$loadingBg,"show"),this.$loadingBgImage[t(1199)]=null}}[cR(1188)](t){const e=cR;this[e(1423)](this.TAG_NAME,"_doInitLoadingBackgroundForCanvas");const s=this[e(1078)]();let i=s.width,r=s[e(350)];const n=this.player[e(1004)];r-=this[e(1089)].getControlHeight();let o=i,a=r;const h=n[e(924)];let c=(i-o)/2,l=(r-a)/2;(270===h||90===h)&&(o=r,a=i),this[e(1033)][e(1099)]=o,this[e(1033)][e(350)]=a,this[e(1033)][e(1297)]=t[e(555)];const d=i/o,u=r/a;let p=d>u?u:d;ci(n[e(510)])&&d!==u&&(p=d+","+u),n[e(1500)]&&(p=d>u?d:u);let f=e(1474)+p+")";n.mirrorRotate===e(666)&&h&&(f+=e(1284)+h+e(1525)),n.mirrorRotate===e(726)?f+=e(698):"vertical"===n[e(1225)]&&(f+=e(386)),this[e(1033)][e(898)][e(907)]="0",this[e(1033)].style.transform=f,this[e(1033)][e(898)][e(504)]=c+"px",this[e(1033)][e(898)][e(999)]=l+"px",this[e(1033)][e(409)]?In(this[e(1037)],"show"):this[e(1033)][e(1199)]=()=>{const t=e;In(this[t(1037)],"show"),this.$loadingBgImage[t(1199)]=null}}[cR(1032)](t){const e=cR;this[e(1423)](this[e(989)],"_doInitLoadingBackgroundForRatio");const s=this[e(1089)][e(1004)][e(686)][e(866)](":")[e(313)](Number),i=this[e(1078)]();let r=i[e(1099)],n=i[e(350)],o=this.player[e(1374)]();n-=o;const a={width:t[e(1350)],height:t[e(918)]},h=a[e(1099)]/a[e(350)],c=s[0]/s[1];if(this.$loadingBgImage[e(1297)]=t[e(555)],h>c){const t=c*a[e(350)]/a[e(1099)];this[e(1033)].style[e(1099)]=100*t+"%",this[e(1033)].style.height="calc(100% - "+o+e(798),this[e(1033)].style[e(907)]="0 "+(r-r*t)/2+"px"}else{const t=a.width/c/a[e(350)];this[e(1033)][e(898)][e(1099)]=e(1561),this[e(1033)][e(898)][e(350)]=e(1123)+100*t+e(1067)+o+e(798),this.$loadingBgImage.style[e(907)]=(n-n*t)/2+e(330)}this[e(1033)][e(409)]?In(this.$loadingBg,e(787)):this[e(1033)][e(1199)]=()=>{const t=e;In(this[t(1037)],"show"),this[t(1033)][t(1199)]=null}}[cR(1330)](){const t=cR;if(!this[t(1037)]){const e=document[t(1164)](t(1009)),s=document[t(1164)](t(462));e.className=t(279),this[t(1037)]=e,this.$loadingBgImage=s,e[t(1331)](s),this[t(1521)][t(1331)](e)}}[cR(722)](){const t=cR;if(this.$loadingBg){this[t(1423)](this.TAG_NAME,t(346));if(!Ln(this[t(1037)])){const e=this[t(1521)][t(1501)](t(1173));e&&this[t(1521)]&&this[t(1521)][t(450)](e)}this[t(1037)]=null,this[t(1033)]=null}}[cR(1078)](){const t=cR;let e={};return this[t(1521)]&&(e=this[t(1521)][t(768)](),e[t(1099)]=Math.max(e[t(1099)],this[t(1521)].clientWidth),e[t(350)]=Math.max(e[t(350)],this[t(1521)][t(1153)])),e}[cR(1058)](){const t=cR;return this[t(1004)][t(955)]&&this[t(379)][t(561)]()}[cR(1131)](t){const e=cR;if(this[e(549)]())this[e(1423)](e(712),e(857));else if(this[e(328)])this.debugLog(e(712),e(734));else if(this[e(1431)](M[e(1334)],this[e(594)](U[e(657)],t)),this[e(328)]=!0,this.player&&this[e(1089)][e(1004)].webglAlignmentErrorReplay){this.debugLog(e(712),e(657));const s=this[e(1004)][e(1220)],i=this[e(1004)][e(619)];this[e(431)]({openWebglAlignment:!0})[e(608)]((()=>{const r=e;this[r(516)](s,i).then((()=>{const t=r;this[t(1423)](t(712),t(1520)),this[t(1282)]()}))[r(978)]((e=>{const s=r;this[s(1431)](M.playFailedAndPaused,U[s(657)],{},t),this[s(1332)](s(712),s(1467),e)}))[r(1109)]((()=>{this[r(328)]=!1}))})).catch((t=>{const s=e;this[s(328)]=!1,this[s(1332)]("JbPro",s(1398),t)}))}else{const s=!1===this[e(1004)].playFailedUseLastFrameShow;this[e(1089)][e(1344)](),this[e(1422)](s)[e(608)]((()=>{const s=e;this[s(1431)](M[s(641)],U[s(657)],{},t),this[s(1423)](s(712),s(1449))})).catch((s=>{const i=e;this[i(1431)](M[i(641)],U[i(657)],{},t),this[i(1332)]("JbPro","webglAlignmentError and pause error",s)}))[e(1109)]((()=>{this[e(328)]=!1}))}}[cR(1542)](t){const e=cR;if(this[e(549)]())return void this[e(1423)](e(712),e(290));if(this[e(775)])return void this[e(1423)]("JbPro","webglContextLostErrorOnLock is true");this[e(1431)](M[e(1334)],this[e(594)](U[e(1562)],t));const s=this[e(756)]();if(this[e(775)]=!0,this[e(1089)]&&this.player._opt.webglContextLostErrorReplay){this[e(1423)](e(712),e(1562));const i=this._opt[e(1220)],r=this._opt.playOptions;let n=this[e(556)](s);this[e(431)](n)[e(608)]((()=>{const n=e;this[n(516)](i,r).then((()=>{const t=n;this[t(1423)](t(712),t(808)),this[t(1282)]()}))[n(978)]((e=>{const i=n;this.emit(M[i(641)],U[i(1562)],s,t),this[i(1332)](i(712),i(477),e[i(705)]())}))[n(1109)]((()=>{this.webglContextLostErrorOnLock=!1}))}))[e(978)]((i=>{const r=e;this[r(775)]=!1,this[r(1431)](M[r(641)],U[r(1562)],s,t),this[r(1332)]("JbPro",r(687),i)}))}else{const i=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this[e(1422)](i)[e(608)]((()=>{const i=e;this.emit(M[i(641)],U[i(1562)],s,t),this[i(1423)](i(712),i(1473))}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],U[r(1562)],s,t),this.debugError("JbPro",r(744),i)}))[e(1109)]((()=>{this[e(775)]=!1}))}}[cR(461)](t){const e=cR;if(this[e(549)]())this[e(1423)](e(712),e(442));else if(this[e(455)])this[e(1423)]("JbPro",e(867));else if(this.emit(M[e(1334)],this[e(594)](U.mediaSourceH265NotSupport,t)),this[e(455)]=!0,this.player&&this[e(1089)][e(1004)][e(1022)]){this[e(1423)](e(712),"mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play");const s=this._opt.url,i=this[e(1004)].playOptions;this[e(431)]({useMSE:!1,useWCS:!1})[e(608)]((()=>{const r=e;this.play(s,i)[r(608)]((()=>{const t=r;this[t(1423)](t(712),t(457)),this[t(1282)]()}))[r(978)]((e=>{this[r(1431)](M.playFailedAndPaused,U.mediaSourceH265NotSupport,{},t),this.debugError("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] reset player and play error",e)}))[r(1109)]((()=>{this.mediaSourceH265NotSupportOnLock=!1}))}))[e(978)]((s=>{const i=e;this[i(455)]=!1,this[i(1431)](M[i(641)],U[i(502)],{},t),this[i(1332)]("JbPro","mediaSourceH265NotSupport auto wasm [mse-> wasm] _resetPlayer error",s)}))}else{const s=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this._pause(s)[e(608)]((()=>{const s=e;this[s(1431)](M.playFailedAndPaused,U.mediaSourceH265NotSupport,{},t),this[s(1423)]("JbPro",s(1404))}))[e(978)]((s=>{const i=e;this[i(1431)](M.playFailedAndPaused,U[i(502)],{},t),this[i(1332)](i(712),"mediaSourceH265NotSupport and pause error",s)}))[e(1109)]((()=>{this.mediaSourceH265NotSupportOnLock=!1}))}}[cR(824)](t){const e=cR;if(this[e(549)]())this[e(1318)]&&this[e(1423)]("JbPro",e(786));else if(this.mseWaitVideoCanplayTimeoutOnLock)this.debugLog("JbPro",e(1226));else if(this[e(1431)](M[e(1334)],this[e(594)](U[e(939)],t)),this[e(443)]=!0,this[e(1089)]&&this[e(1089)][e(1004)][e(1303)]){this[e(1423)](e(712),e(426));const s=this[e(1004)].url,i=this[e(1004)].playOptions;this[e(431)]({useMSE:!1,useWCS:!1})[e(608)]((()=>{const r=e;this[r(516)](s,i)[r(608)]((()=>{const t=r;this.debugLog(t(712),"mseWaitVideoCanplayTimeout auto wasm [mse-> wasm] reset player and play success"),this[t(1282)]()}))[r(978)]((e=>{const s=r;this[s(1431)](M[s(641)],U.mseWaitVideoCanplayTimeout,t),this[s(1332)](s(712),"mseWaitVideoCanplayTimeout auto wasm [mse-> wasm] reset player and play error",e)}))[r(1109)]((()=>{this[r(443)]=!1}))}))[e(978)]((s=>{const i=e;this[i(443)]=!1,this[i(1431)](M[i(641)],U[i(939)],{},t),this.debugError(i(712),i(1456),s)}))}else{const s=!1===this[e(1004)].playFailedUseLastFrameShow;this[e(1089)][e(1344)](),this[e(1422)](s)[e(608)]((()=>{const s=e;this.emit(M[s(641)],U.mseWaitVideoCanplayTimeout,{},t),this[s(1423)]("JbPro",s(302))})).catch((s=>{const i=e;this[i(1431)](M.playFailedAndPaused,U[i(502)],{},t),this.debugError(i(712),i(951),s)}))[e(1109)]((()=>{this[e(443)]=!1}))}}_handleMediaSourceFull(t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this[e(1423)]("JbPro",e(410)));if(this[e(1391)])return void this[e(1423)](e(712),e(1152));this[e(1431)](M[e(1334)],this[e(594)](U[e(1155)],t));const s=this._getVideoLastIframeInfo();if(this[e(1391)]=!0,this[e(1089)]&&this.player[e(1004)][e(1235)]){const i=this[e(1004)][e(1220)],r=this[e(1004)][e(619)];let n={},o=this[e(1089)]._opt[e(324)],a=!0;o?n={useMSE:!1,useWCS:!1}:this[e(1401)](Mt[e(1129)])?this[e(725)][e(575)](je()):(o=!0,a=!1,n={useMSE:!1,useWCS:!1}),this[e(1423)](e(712),e(782)+(ci(a)?e(1213):"")+e(662)+(o?e(1012):"mse")+"] reset player and play"),n=this[e(556)](s,n),this[e(431)](n)[e(608)]((()=>{const n=e;this[n(516)](i,r).then((()=>{const t=n;this[t(1423)]("JbPro","mediaSourceFull and reset player and play success"),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M.playFailedAndPaused,U[i(1155)],s,t),this[i(1332)](i(712),"mediaSourceFull and reset player and play error",e)}))[n(1109)]((()=>{this[n(1391)]=!1}))}))[e(978)]((i=>{const r=e;this[r(1391)]=!1,this[r(1431)](M.playFailedAndPaused,U[r(1155)],s,t),this[r(1332)](r(712),r(1211),i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this[e(1089)][e(1344)](),this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M.playFailedAndPaused,U[i(1155)],s,t),this[i(1423)]("JbPro","mediaSourceFull and autoWasm is false ,pause success")}))[e(978)]((i=>{const r=e;this.emit(M[r(641)],U.mediaSourceFull,s,t),this[r(1332)]("JbPro","mediaSourceFull and pause error",i)}))[e(1109)]((()=>{this[e(1391)]=!1}))}}[cR(1073)](t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this[e(1423)](e(712),e(1514)));if(this[e(886)])return void this[e(1423)](e(712),e(1102));this[e(1431)](M[e(1334)],this[e(594)](U[e(839)],t));const s=this[e(756)]();if(this[e(886)]=!0,this[e(1089)]&&this[e(1089)][e(1004)][e(1235)]){const i=this[e(1004)][e(1220)],r=this[e(1004)][e(619)];let n={},o=this.player._opt[e(324)],a=!0;o?n={useMSE:!1,useWCS:!1}:this[e(1401)](Mt[e(1129)])?this[e(725)][e(575)](je()):(o=!0,a=!1,n={useMSE:!1,useWCS:!1}),(this[e(1089)][e(1302)]||this[e(1089)].isMSENotSupportAudioFormat)&&(this[e(1089)][e(1423)](e(712),e(281)+this[e(1089)][e(1302)]+e(948)+this.player.isMSENotSupportAudioFormat+e(652)),n[e(1529)]=!1),this[e(1423)](e(712),"mediaSourceAppendBufferError and "+(ci(a)?e(1213):"")+e(662)+(o?"wasm":e(320))+e(1246)),n=this[e(556)](s,n),this[e(431)](n)[e(608)]((()=>{const n=e;this.play(i,r)[n(608)]((()=>{const t=n;this.debugLog(t(712),t(1183)),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M[i(641)],U[i(839)],s,t),this[i(1332)](i(712),"mediaSourceAppendBufferError and reset player and play error",e)}))[n(1109)]((()=>{this[n(886)]=!1}))})).catch((i=>{const r=e;this[r(886)]=!1,this[r(1431)](M.playFailedAndPaused,U.mediaSourceAppendBufferError,s,t),this[r(1332)](r(712),r(1114),i)}))}else{const i=!1===this._opt[e(338)];this.player.setPlayFailedAndPaused(),this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M[i(641)],U[i(839)],s,t),this[i(1423)]("JbPro","mediaSourceAppendBufferError and autoWasm is false ,pause success")}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],U[r(839)],s,t),this[r(1332)]("JbPro",r(699),i)}))[e(1109)]((()=>{this[e(886)]=!1}))}}[cR(804)](t){const e=cR;if(this[e(549)]())return void(this.debug&&this[e(1423)]("JbPro",e(1481)));if(this.mseSourceBufferErrorOnLock)return void this[e(1423)](e(712),e(1484));this[e(1431)](M[e(1334)],this[e(594)](U[e(788)],t));const s=this[e(756)]();if(this[e(544)]=!0,this[e(1089)]&&this[e(1089)]._opt[e(1235)]){const i=this._opt.url,r=this[e(1004)][e(619)];let n={};if(this[e(1089)][e(1004)].mseDecoderUseWorker)n={mseDecoderUseWorker:!1},this[e(1423)](e(712),e(884));else{let t=this[e(1089)]._opt[e(324)],s=!0;t?n={useMSE:!1,useWCS:!1}:this[e(1401)](Mt[e(1129)])?this[e(725)].push(je()):(t=!0,s=!1,n={useMSE:!1,useWCS:!1}),this[e(1089)][e(729)]&&(this.debugLog("JbPro",e(1281)),n={useMSE:!1,useWCS:!1}),this[e(1423)](e(712),e(438)+(ci(s)?e(1213):"")+e(662)+e(t?1012:320)+e(1246))}n=this[e(556)](s,n),this[e(431)](n)[e(608)]((()=>{const n=e;this.play(i,r)[n(608)]((()=>{const t=n;this[t(1423)](t(712),t(304)),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M[i(641)],U.mseSourceBufferError,s,t),this.debugError(i(712),i(681),e)}))[n(1109)]((()=>{this[n(544)]=!1}))}))[e(978)]((i=>{const r=e;this[r(544)]=!1,this.emit(M[r(641)],U.mseSourceBufferError,s,t),this.debugError(r(712),r(1428),i)}))}else{const i=!1===this[e(1004)].playFailedUseLastFrameShow;this[e(1089)][e(1344)](),this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M[i(641)],U[i(788)],s,t),this[i(1423)](i(712),i(755))}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],U[r(788)],s,t),this.debugError(r(712),r(597),i)})).finally((()=>{this.mseSourceBufferErrorOnLock=!1}))}}[cR(1347)](t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this[e(1423)](e(712),e(432)));if(this.mediaSourceBufferedIsZeroErrorOnLock)return void this[e(1423)]("JbPro",e(314));this[e(1431)](M[e(1334)],this[e(594)](U.mediaSourceBufferedIsZeroError,t));const s=this._getVideoLastIframeInfo();if(this.mediaSourceBufferedIsZeroErrorOnLock=!0,this.player&&this[e(1089)][e(1004)][e(1235)]){const i=this[e(1004)][e(1220)],r=this[e(1004)][e(619)];let n={},o=this[e(1089)][e(1004)][e(324)],a=!0;o?n={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Mt[e(1129)])?this[e(725)][e(575)](je()):(o=!0,a=!1,n={useMSE:!1,useWCS:!1}),this[e(1423)](e(712),e(1168)+(ci(a)?e(1213):"")+" [mse-> "+e(o?1012:320)+e(1246)),n=this._resetPlayerBeforeUpdateOptions(s,n),this._resetPlayer(n)[e(608)]((()=>{const n=e;this[n(516)](i,r)[n(608)]((()=>{const t=n;this[t(1423)](t(712),"mediaSourceBufferedIsZeroError reset player and play success"),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M[i(641)],U[i(357)],s,t),this[i(1332)](i(712),i(776),e)}))[n(1109)]((()=>{this[n(1412)]=!1}))}))[e(978)]((i=>{const r=e;this[r(1412)]=!1,this.emit(M[r(641)],U[r(357)],s,t),this.debugError(r(712),r(359),i)}))}else{const i=!1===this[e(1004)][e(338)];this.player[e(1344)](),this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M[i(641)],U[i(357)],s,t),this[i(1423)](i(712),i(1308))}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],U[r(357)],s,t),this[r(1332)]("JbPro",r(696),i)}))[e(1109)]((()=>{this[e(1412)]=!1}))}}[cR(862)](t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this[e(1423)]("JbPro",e(1198)));if(this[e(362)])return void this[e(1423)]("JbPro",e(1059));this.emit(M[e(1334)],this[e(594)](U[e(1125)],t));const s=this[e(756)]();if(this[e(362)]=!0,this[e(1089)]&&this[e(1089)][e(1004)].hardDecodingNotSupportAutoWasm){this[e(1423)]("JbPro",e(365));const i=this[e(1004)].url,r=this[e(1004)][e(619)];let n={useMSE:!1,useWCS:!1};n=this[e(556)](s,n),this._resetPlayer(n).then((()=>{const n=e;this[n(516)](i,r)[n(608)]((()=>{const t=n;this[t(1423)]("JbPro","mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play success"),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M[i(641)],U[i(1125)],s,t),this.debugError(i(712),"mseAddSourceBufferError auto wasm [mse-> wasm] reset player and play error",e)}))[n(1109)]((()=>{this.mseAddSourceBufferErrorOnLock=!1}))}))[e(978)]((i=>{const r=e;this.mseAddSourceBufferErrorOnLock=!1,this[r(1431)](M[r(641)],U.mseAddSourceBufferError,s,t),this[r(1332)](r(712),r(844),i)}))}else{const i=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this._pause(i).then((()=>{const i=e;this[i(1431)](M[i(641)],U[i(1125)],s,t),this.debugLog("JbPro",i(578))})).catch((i=>{const r=e;this.emit(M[r(641)],U[r(1125)],s,t),this[r(1332)](r(712),r(995),i)}))[e(1109)]((()=>{this.mseAddSourceBufferErrorOnLock=!1}))}}_handleMediaSourceDecoderConfigurationError(t){const e=cR;if(this.isDestroyed())this[e(1318)]&&this[e(1423)](e(712),e(1165));else if(this[e(550)])this[e(1423)](e(712),e(688));else if(this[e(1431)](M[e(1334)],this[e(594)](U.mediaSourceDecoderConfigurationError,t)),this[e(550)]=!0,this[e(1089)]&&this[e(1089)][e(1004)][e(1022)]){this[e(1423)](e(712),e(679));const s=this._opt[e(1220)],i=this._opt.playOptions;let r={useMSE:!1,useWCS:!1};this[e(431)](r)[e(608)]((()=>{const r=e;this[r(516)](s,i)[r(608)]((()=>{const t=r;this[t(1423)](t(712),t(1390)),this[t(1282)]()}))[r(978)]((e=>{const s=r;this[s(1431)](M[s(641)],U.mediaSourceDecoderConfigurationError,{},t),this[s(1332)](s(712),s(1116),e)}))[r(1109)]((()=>{this[r(550)]=!1}))})).catch((s=>{const i=e;this[i(550)]=!1,this.emit(M[i(641)],U.mediaSourceDecoderConfigurationError,{},t),this[i(1332)](i(712),"mediaSourceDecoderConfigurationError auto wasm [mse-> wasm] _resetPlayer and play error",s)}))}else{const s=!1===this[e(1004)][e(338)];this[e(1089)].setPlayFailedAndPaused(),this[e(1422)](s)[e(608)]((()=>{const s=e;this[s(1431)](M[s(641)],U.mediaSourceDecoderConfigurationError,{},t),this[s(1423)](s(712),s(1172))}))[e(978)]((s=>{const i=e;this[i(1431)](M[i(641)],U[i(931)],{},t),this[i(1332)]("JbPro",i(675),s)}))[e(1109)]((()=>{this[e(550)]=!1}))}}[cR(937)](t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this[e(1423)](e(712),"mediaSourceTsIsMaxDiff but player is destroyed"));if(this[e(1317)])return void this.debugLog(e(712),e(763));this[e(1431)](M[e(1334)],this[e(594)](U[e(962)],t));const s=this[e(756)]();if(this.mediaSourceTsIsMaxDiffOnLock=!0,this[e(1089)]&&this[e(1089)][e(1004)][e(437)]){this[e(1423)](e(712),e(906));const i=this[e(1004)][e(1220)],r=this[e(1004)][e(619)];let n=this[e(556)](s);this[e(431)](n).then((()=>{const n=e;this.play(i,r).then((()=>{const t=lR;this[t(1423)]("JbPro",t(351)),this[t(1282)]()})).catch((e=>{const i=lR;this[i(1431)](M[i(641)],U[i(962)],s,t),this.debugError(i(712),i(969),e)}))[n(1109)]((()=>{this[n(1317)]=!1}))}))[e(978)]((i=>{const r=e;this[r(1317)]=!1,this[r(1431)](M[r(641)],U[r(962)],s,t),this.debugError(r(712),"mediaSourceTsIsMaxDiff _resetPlayer error",i)}))}else{const i=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M[i(641)],U[i(962)],s,t),this.debugLog(i(712),i(779))}))[e(978)]((i=>{const r=e;this[r(1431)](M.playFailedAndPaused,U[r(962)],s,t),this[r(1332)](r(712),"mediaSourceTsIsMaxDiff and pause error",i)}))[e(1109)]((()=>{this[e(1317)]=!1}))}}[cR(1093)](t){const e=cR;if(this.isDestroyed())return void(this.debug&&this[e(1423)](e(712),e(1414)));if(this[e(325)])return void this.debugLog(e(712),e(1030));this[e(1431)](M[e(1334)],this[e(594)](U.mseWidthOrHeightChange,t));const s=this[e(756)]();if(this[e(325)]=!0,this[e(1089)]&&this[e(1089)][e(1004)][e(815)]){this.debugLog(e(712),e(1307));const i=this[e(1004)][e(1220)],r=this[e(1004)][e(619)];let n=this[e(556)](s);this._resetPlayer(n)[e(608)]((()=>{const n=e;this[n(1089)]._opt[n(1393)]>0?this[n(823)]=setTimeout((()=>{const e=n;this.widthOrHeightChangeReplayDelayTimeout=null,this[e(549)]()?this[e(1318)]&&this[e(1423)](e(712),e(541)):this.play(i,r)[e(608)]((()=>{this[e(1423)]("JbPro","mseWidthOrHeightChange and reset player and play success"),this._replaySuccessAndNext()})).catch((i=>{const r=e;this[r(1431)](M[r(641)],U[r(390)],s,t),this[r(1332)](r(712),r(394),i)})).finally((()=>{this[e(325)]=!1}))}),1e3*this[n(1089)]._opt[n(1393)]):this[n(516)](i,r)[n(608)]((()=>{const t=n;this[t(1423)](t(712),t(926))}))[n(978)]((e=>{const i=n;this[i(1431)](M[i(641)],U[i(390)],s,t),this.debugError(i(712),i(394),e)}))[n(1109)]((()=>{this[n(325)]=!1}))}))[e(978)]((i=>{const r=e;this[r(325)]=!1,this[r(1431)](M[r(641)],U[r(390)],s,t),this[r(1332)](r(712),"mseWidthOrHeightChange and _resetPlayer error",i)}))}else{const i=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this._pause(i)[e(608)]((()=>{const i=e;this[i(1431)](M.playFailedAndPaused,U[i(390)],s,t),this.debugError(i(712),i(1216))}))[e(978)]((i=>{const r=e;this[r(1431)](M.playFailedAndPaused,U[r(390)],s,t),this[r(1332)](r(712),r(1320),i)}))[e(1109)]((()=>{this.mseWidthOrHeightChangeOnLock=!1}))}}_handleMediaSourceAudioG711NotSupport(t){const e=cR;if(this.isDestroyed())return void(this.debug&&this[e(1423)](e(712),e(653)));if(this.mediaSourceAudioG711NotSupportOnLock)return void this.debugLog(e(712),e(414));const s=this[e(756)]();if(this.mediaSourceAudioG711NotSupportOnLock=!0,this[e(1089)]&&this[e(1089)][e(1004)][e(341)]){this.debugLog(e(712),"mediaSourceAudioG711NotSupport and reset player and play");const i=this[e(1004)][e(1220)],r=this[e(1004)][e(619)];let n={mseDecodeAudio:!1};n=this[e(556)](s,n),this[e(431)](n)[e(608)]((()=>{const n=e;this.play(i,r)[n(608)]((()=>{const t=n;this[t(1423)]("JbPro",t(961)),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M.playFailedAndPaused,U.mediaSourceAudioG711NotSupport,s,t),this.debugError("JbPro",i(794),e)}))[n(1109)]((()=>{this.mediaSourceAudioG711NotSupportOnLock=!1}))}))[e(978)]((i=>{const r=e;this.mediaSourceAudioG711NotSupportOnLock=!1,this[r(1431)](M[r(641)],U.mediaSourceAudioG711NotSupport,s,t),this[r(1332)]("JbPro","mediaSourceAudioG711NotSupport and _resetPlayer error",i)}))}else{const i=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M.playFailedAndPaused,U[i(985)],s,t),this.debugError(i(712),i(979))}))[e(978)]((i=>{const r=e;this[r(1431)](M.playFailedAndPaused,U[r(985)],s,t),this[r(1332)](r(712),"mediaSourceAudioG711NotSupport error and pause error",i)}))[e(1109)]((()=>{this[e(1519)]=!1}))}}[cR(1187)](t){const e=cR;if(this.isDestroyed())return void(this[e(1318)]&&this.debugLog(e(712),e(711)));if(this.mediaSourceAudioInitTimeoutOnLock)return void this[e(1423)](e(712),"mediaSourceAudioInitTimeoutOnLock is true");const s=this[e(756)]();if(this[e(674)]=!0,this.player&&this[e(1089)][e(1004)][e(854)]){this.debugLog(e(712),"mediaSourceAudioInitTimeout and reset player and play");const i=this[e(1004)][e(1220)],r=this[e(1004)][e(619)];let n={mseDecodeAudio:!1};n=this[e(556)](s,n),this[e(431)](n)[e(608)]((()=>{const n=e;this[n(516)](i,r)[n(608)]((()=>{const t=n;this.debugLog("JbPro",t(1326)),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M[i(641)],U[i(1407)],s,t),this[i(1332)](i(712),i(1025),e)}))[n(1109)]((()=>{this[n(674)]=!1}))}))[e(978)]((i=>{const r=e;this.mediaSourceAudioInitTimeoutOnLock=!1,this.emit(M[r(641)],U[r(1407)],s,t),this[r(1332)](r(712),"mediaSourceAudioInitTimeout and _resetPlayer error",i)}))}else{const i=!1===this[e(1004)].playFailedUseLastFrameShow;this[e(1089)][e(1344)](),this[e(1422)](i)[e(608)]((()=>{const i=e;this.emit(M[i(641)],U[i(1407)],s,t),this[i(1332)](i(712),i(1486))}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],U[r(1407)],s,t),this[r(1332)](r(712),r(356),i)})).finally((()=>{this[e(674)]=!1}))}}_handleMediaSourceAudioNoDataTimeout(t){const e=cR;if(this[e(549)]())return void(this.debug&&this[e(1423)]("JbPro",e(537)));if(this.mediaSourceAudioNoDataTimeoutOnLock)return void this.debugLog(e(712),e(636));const s=this[e(756)]();if(this[e(1247)]=!0,this.player&&this[e(1089)][e(1004)][e(1530)]){this[e(1423)](e(712),e(1137));const i=this[e(1004)].url,r=this[e(1004)][e(619)];let n={mseDecodeAudio:!1};n=this[e(556)](s,n),this[e(431)](n)[e(608)]((()=>{const n=e;this.play(i,r).then((()=>{const t=lR;this[t(1423)](t(712),t(832)),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M.playFailedAndPaused,U[i(805)],s,t),this.debugError(i(712),i(835),e)})).finally((()=>{this.mediaSourceAudioNoDataTimeoutOnLock=!1}))}))[e(978)]((i=>{const r=e;this[r(1247)]=!1,this[r(1431)](M[r(641)],U[r(805)],s,t),this[r(1332)](r(712),r(1013),i)}))}else{const i=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this._pause(i)[e(608)]((()=>{const i=e;this.emit(M[i(641)],U[i(805)],s,t),this[i(1332)](i(712),"mediaSourceAudioNoDataTimeout and mediaSourceAudioNoDataTimeoutReplay isfalse pause success")}))[e(978)]((i=>{const r=e;this.emit(M.playFailedAndPaused,U[r(805)],s,t),this[r(1332)]("JbPro",r(946),i)})).finally((()=>{this[e(1247)]=!1}))}}_handleMseWorkerAddSourceBufferError(t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this[e(1423)](e(712),e(1239)));if(this[e(1373)])return void this[e(1423)](e(712),e(405));const s=this[e(756)]();if(this.mseWorkerAddSourceBufferErrorOnLock=!0,this.player&&this[e(1089)][e(1004)][e(1022)]){this.debugLog(e(712),"mseWorkerAddSourceBufferError and reset player and play");const i=this[e(1004)][e(1220)],r=this[e(1004)][e(619)];let n={mseDecoderUseWorker:!1};n=this[e(556)](s,n),this[e(431)](n)[e(608)]((()=>{const n=e;this[n(516)](i,r)[n(608)]((()=>{const t=n;this[t(1423)]("JbPro",t(829)),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M.playFailedAndPaused,U[i(369)],s,t),this[i(1332)](i(712),i(1221),e)})).finally((()=>{this[n(1373)]=!1}))}))[e(978)]((i=>{const r=e;this[r(1373)]=!1,this.emit(M.playFailedAndPaused,U[r(369)],s,t),this[r(1332)]("JbPro",r(672),i)}))}else{const i=!1===this._opt[e(338)];this[e(1089)].setPlayFailedAndPaused(),this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M[i(641)],U.mseWorkerAddSourceBufferError,s,t),this.debugError(i(712),i(429))})).catch((i=>{const r=e;this[r(1431)](M[r(641)],U[r(369)],s,t),this[r(1332)]("JbPro",r(1042),i)}))[e(1109)]((()=>{this[e(1373)]=!1}))}}[cR(521)](t){const e=cR;if(this[e(549)]())this[e(1318)]&&this[e(1423)](e(712),e(1140));else if(this[e(1362)])this[e(1423)](e(712),e(660));else if(this[e(1431)](M[e(1334)],this[e(594)](U[e(925)],t)),this.mediaSourceUseCanvasRenderPlayFailedOnLock=!0,this[e(1089)]&&this.player[e(1004)].mediaSourceUseCanvasRenderPlayFailedReplay&&this[e(1089)][e(1004)][e(920)]){this[e(1423)](e(712),e(914)+this[e(1089)][e(1004)].mediaSourceUseCanvasRenderPlayFailedReplayType+e(828));const s=this[e(1004)].url,i=this[e(1004)][e(619)];let r={};const n=this[e(1089)]._opt[e(920)];n===f.canvas?r={useMSE:!1,useWCS:!1}:n===f[e(1315)]&&(r={useVideoRender:!0,useCanvasRender:!1}),this._resetPlayer(r)[e(608)]((()=>{const r=e;this.play(s,i)[r(608)]((()=>{const t=r;this.debugLog(t(712),t(627)),this[t(1282)]()})).catch((e=>{const s=r;this.emit(M[s(641)],U[s(925)],{},t),this[s(1332)](s(712),"mediaSourceUseCanvasRenderPlayFailed and reset player and play error",e)})).finally((()=>{this[r(1362)]=!1}))})).catch((s=>{const i=e;this[i(1362)]=!1,this[i(1431)](M[i(641)],U[i(925)],{},t),this[i(1332)]("JbPro",i(495),s)}))}else{const s=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this[e(1422)](s)[e(608)]((()=>{const t=e;this.debugLog(t(712),"mediaSourceUseCanvasRenderPlayFailed and mediaSourceUseCanvasRenderPlayFailedReplay is false, pause success")}))[e(978)]((s=>{const i=e;this[i(1431)](M[i(641)],U.mediaSourceUseCanvasRenderPlayFailed,{},t),this[i(1332)](i(712),i(997),s)}))[e(1109)]((()=>{this.mediaSourceUseCanvasRenderPlayFailedOnLock=!1}))}}_handleWebcodecsH265NotSupport(t){const e=cR;if(this.isDestroyed())this[e(1318)]&&this[e(1423)]("JbPro",e(1191));else if(this[e(801)])this[e(1423)](e(712),e(904));else if(this.emit(M[e(1334)],this[e(594)](U[e(668)],t)),this[e(801)]=!0,this[e(1089)]&&this[e(1089)]._opt.hardDecodingNotSupportAutoWasm){this[e(1423)](e(712),e(956));const s=this[e(1004)][e(1220)],i=this[e(1004)][e(619)];this[e(431)]({useMSE:!1,useWCS:!1})[e(608)]((()=>{const r=e;this[r(516)](s,i).then((()=>{const t=r;this[t(1423)](t(712),t(950)),this[t(1282)]()})).catch((e=>{const s=r;this[s(1431)](M[s(641)],U[s(668)],{},t),this[s(1332)]("JbPro",s(934),e)}))[r(1109)]((()=>{this[r(801)]=!1}))}))[e(978)]((t=>{const s=e;this[s(801)]=!1,this[s(1332)]("JbPro","webcodecsH265NotSupport auto wasm [wcs-> wasm] _resetPlayer and play error",t)}))}else{const s=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this._pause(s)[e(608)]((()=>{const s=e;this[s(1431)](M[s(641)],U[s(668)],{},t),this.debugLog(s(712),s(1515))}))[e(978)]((s=>{const i=e;this[i(1431)](M[i(641)],U.webcodecsH265NotSupport,{},t),this[i(1332)](i(712),"webcodecsH265NotSupport and pause error",s)}))[e(1109)]((()=>{this.webcodecsH265NotSupportOnLock=!1}))}}_handleWebcodecsUnsupportedConfigurationError(t){const e=cR;if(this[e(549)]())this[e(1318)]&&this[e(1423)](e(712),"webcodecsUnsupportedConfigurationError but player is destroyed");else if(this[e(880)])this[e(1423)](e(712),"webcodecsUnsupportedConfigurationErrorOnLock is true");else if(this[e(1431)](M[e(1334)],this.getCrashLog(U[e(1134)],t)),this[e(880)]=!0,this[e(1089)]&&this[e(1089)][e(1004)][e(1022)]){this.debugLog("JbPro",e(327));const s=this[e(1004)][e(1220)],i=this[e(1004)][e(619)];this._resetPlayer({useMSE:!1,useWCS:!1})[e(608)]((()=>{const r=e;this[r(516)](s,i).then((()=>{const t=r;this[t(1423)](t(712),"webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] reset player and play success"),this[t(1282)]()}))[r(978)]((e=>{const s=r;this[s(1431)](M[s(641)],U[s(1134)],{},t),this.debugError("JbPro",s(1559),e)})).finally((()=>{this[r(880)]=!1}))}))[e(978)]((s=>{const i=e;this[i(880)]=!1,this[i(1431)](M.playFailedAndPaused,U[i(1134)],{},t),this[i(1332)](i(712),"webcodecsUnsupportedConfigurationError auto wasm [wcs-> wasm] _resetPlayer and play error",s)}))}else{const s=!1===this[e(1004)][e(338)];this[e(1089)].setPlayFailedAndPaused(),this[e(1422)](s)[e(608)]((()=>{const s=e;this[s(1431)](M[s(641)],U[s(1134)],{},t),this[s(1423)](s(712),s(874))}))[e(978)]((s=>{const i=e;this.emit(M[i(641)],U.webcodecsUnsupportedConfigurationError,{},t),this[i(1332)](i(712),i(1144),s)})).finally((()=>{this[e(880)]=!1}))}}[cR(1363)](t){const e=cR;if(this[e(549)]())this[e(1318)]&&this[e(1423)](e(712),e(1275));else if(this.webcodecsDecodeConfigureErrorOnLock)this[e(1423)](e(712),"webcodecsDecodeConfigureErrorOnLock is true");else if(this[e(1431)](M[e(1334)],this[e(594)](U[e(1383)],t)),this[e(1089)]&&this.player[e(1004)].hardDecodingNotSupportAutoWasm){this[e(1423)](e(712),e(554));const s=this[e(1004)][e(1220)],i=this[e(1004)][e(619)];this[e(431)]({useMSE:!1,useWCS:!1})[e(608)]((()=>{const r=e;this[r(516)](s,i)[r(608)]((()=>{const t=r;this[t(1423)]("JbPro",t(1062)),this[t(1282)]()}))[r(978)]((e=>{const s=r;this[s(1431)](M[s(641)],U.webcodecsDecodeConfigureError,{},t),this[s(1332)](s(712),s(466),e)})).finally((()=>{this[r(1208)]=!1}))}))[e(978)]((s=>{const i=e;this[i(1208)]=!1,this[i(1431)](M.playFailedAndPaused,U[i(1383)],{},t),this[i(1332)](i(712),"webcodecsDecodeConfigureError auto wasm [wcs-> wasm] _resetPlayer and play error",s)}))}else{const s=!1===this[e(1004)].playFailedUseLastFrameShow;this.player.setPlayFailedAndPaused(),this[e(1422)](s)[e(608)]((()=>{const s=e;this[s(1431)](M[s(641)],U[s(1383)],{},t),this[s(1423)](s(712),s(1040))})).catch((s=>{const i=e;this[i(1431)](M[i(641)],U[i(1383)],{},t),this[i(1332)]("JbPro",i(344),s)}))[e(1109)]((()=>{this[e(1208)]=!1}))}}_handleWebcodecsDecodeError(t){const e=cR;if(this.isDestroyed())return void(this.debug&&this[e(1423)](e(712),e(542)));if(this[e(968)])return void this[e(1423)]("JbPro",e(1448));this[e(1431)](M[e(1334)],this[e(594)](U[e(772)],t));const s=this[e(756)]();if(this[e(968)]=!0,this[e(1089)]&&this[e(1089)][e(1004)].wcsDecodeErrorReplay){const i=this._opt[e(1220)],r=this._opt[e(619)];let n={},o=this[e(1089)][e(1004)][e(324)],a=!0;o?n={useMSE:!1,useWCS:!1}:this._checkIsMeaningfulRetry(Mt[e(1492)])?this[e(571)][e(575)](je()):(o=!0,a=!1,n={useMSE:!1,useWCS:!1}),this[e(1423)](e(712),e(1253)+(ci(a)?e(1213):"")+" [wcs-> "+(o?"wasm":e(449))+e(1246)),n=this._resetPlayerBeforeUpdateOptions(s,n),this[e(431)](n)[e(608)]((()=>{const n=e;this[n(516)](i,r).then((()=>{const t=n;this.debugLog("JbPro",t(1411)),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M[i(641)],U[i(772)],s,{},t),this[i(1332)]("JbPro",i(903),e)}))[n(1109)]((()=>{this[n(968)]=!1}))}))[e(978)]((()=>{const i=e;this[i(968)]=!1,this[i(1431)](M[i(641)],U[i(772)],s,{},t),this[i(1332)]("JbPro",i(1493))}))}else{const i=!1===this[e(1004)][e(338)];this.player[e(1344)](),this[e(1422)](i).then((()=>{const i=e;this.emit(M[i(641)],U[i(772)],s,{},t),this[i(1423)](i(712),"webcodecs decode error and autoWasm is false , pause success")})).catch((i=>{const r=e;this[r(1431)](M[r(641)],U.webcodecsDecodeError,s,{},t),this[r(1332)]("JbPro",r(1463),i)}))[e(1109)]((()=>{this[e(968)]=!1}))}}_handleWcsWidthOrHeightChange(t){const e=cR;if(this[e(549)]())return void(this.debug&&this.debugLog(e(712),"wcsWidthOrHeightChange but player is destroyed"));if(this[e(1418)])return void this[e(1423)]("JbPro",e(303));this[e(1431)](M[e(1334)],this[e(594)](U[e(826)],t));const s=this._getVideoLastIframeInfo();if(this[e(1418)]=!0,this.player&&this.player[e(1004)][e(815)]){this.debugLog("JbPro","wcsWidthOrHeightChange and reset player and play");const i=this[e(1004)][e(1220)],r=this._opt[e(619)];let n=this[e(556)](s);this._resetPlayer(n)[e(608)]((()=>{const n=e;this._opt.widthOrHeightChangeReplayDelayTime>0?this[n(823)]=setTimeout((()=>{const e=n;this[e(823)]=null,this[e(549)]()?this[e(1318)]&&this[e(1423)](e(712),e(745)):this[e(516)](i,r)[e(608)]((()=>{const t=e;this[t(1423)](t(712),t(1105)),this[t(1282)]()})).catch((i=>{const r=e;this[r(1431)](M[r(641)],U.wcsWidthOrHeightChange,s,t),this.debugError(r(712),r(600),i)})).finally((()=>{this[e(1418)]=!1}))}),1e3*this[n(1004)].widthOrHeightChangeReplayDelayTime):this[n(516)](i,r).then((()=>{const t=n;this[t(1423)]("JbPro",t(1105))}))[n(978)]((e=>{const i=n;this[i(1431)](M[i(641)],U[i(826)],s,t),this[i(1332)](i(712),"wcsWidthOrHeightChange and reset player and play error",e)}))[n(1109)]((()=>{this[n(1418)]=!1}))}))[e(978)]((i=>{const r=e;this.wcsWidthOrHeightChangeOnLock=!1,this[r(1431)](M[r(641)],U[r(826)],s,t),this[r(1332)](r(712),"wcsWidthOrHeightChange and _resetPlayer error",i)}))}else{const i=!1===this._opt.playFailedUseLastFrameShow;this[e(1089)].setPlayFailedAndPaused(),this._pause(i)[e(608)]((()=>{const i=e;this[i(1431)](M.playFailedAndPaused,U[i(826)],s,t),this[i(1332)](i(712),"wcsWidthOrHeightChange and widthOrHeightChangeReplay is false , pause success")}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],U[r(826)],s,t),this[r(1332)](r(712),r(1298),i)}))[e(1109)]((()=>{this[e(1418)]=!1}))}}_handleWebcodecsAudioNoDataTimeout(t){const e=cR;if(this[e(549)]())return void(this.debug&&this.debugLog(e(712),"webcodecsAudioNoDataTimeout but player is destroyed"));if(this[e(1166)])return void this[e(1423)](e(712),e(777));const s=this[e(756)]();if(this.webcodecsAudioNoDataTimeoutOnLock=!0,this[e(1089)]&&this[e(1089)][e(1004)].webcodecsAudioNoDataTimeoutReplay){this.debugLog(e(712),e(1388));const i=this[e(1004)][e(1220)],r=this._opt[e(619)];let n={wcsDecodeAudio:!1};n=this._resetPlayerBeforeUpdateOptions(s,n),this[e(431)](n)[e(608)]((()=>{const n=e;this.play(i,r)[n(608)]((()=>{this[n(1423)]("JbPro","webcodecsAudioNoDataTimeout and reset player and play success"),this._replaySuccessAndNext()}))[n(978)]((e=>{const i=n;this[i(1431)](M.playFailedAndPaused,U[i(727)],s,t),this[i(1332)](i(712),i(848),e)}))[n(1109)]((()=>{this[n(1166)]=!1}))}))[e(978)]((i=>{const r=e;this.webcodecsAudioNoDataTimeoutOnLock=!1,this[r(1431)](M[r(641)],U.webcodecsAudioNoDataTimeout,s,t),this[r(1332)](r(712),r(843),i)}))}else{const i=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this[e(1422)](i).then((()=>{const i=e;this[i(1431)](M[i(641)],U[i(727)],s,t),this[i(1332)](i(712),i(986))}))[e(978)]((i=>{const r=e;this[r(1431)](M.playFailedAndPaused,U[r(727)],s,t),this[r(1332)](r(712),r(1263),i)}))[e(1109)]((()=>{this[e(1166)]=!1}))}}[cR(1026)](t){const e=cR;if(this.isDestroyed())return void(this.debug&&this[e(1423)](e(712),e(1207)));if(this[e(916)])return void this[e(1423)](e(712),e(940));const s=this[e(756)]();if(this[e(916)]=!0,this[e(1089)]&&this[e(1089)]._opt[e(967)]){this[e(1423)](e(712),e(936));const i=this[e(1004)].url,r=this[e(1004)].playOptions;let n={wcsDecodeAudio:!1};n=this[e(556)](s,n),this._resetPlayer(n)[e(608)]((()=>{const n=e;this[n(516)](i,r)[n(608)]((()=>{const t=n;this[t(1423)](t(712),"webcodecsAudioInitTimeout and reset player and play success"),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M.playFailedAndPaused,U[i(970)],s,t),this.debugError(i(712),i(501),e)}))[n(1109)]((()=>{this[n(916)]=!1}))}))[e(978)]((i=>{const r=e;this[r(916)]=!1,this[r(1431)](M.playFailedAndPaused,U[r(970)],s,t),this.debugError(r(712),"webcodecsAudioInitTimeout and _resetPlayer error",i)}))}else{const i=!1===this._opt[e(338)];this[e(1089)][e(1344)](),this[e(1422)](i).then((()=>{const i=e;this.emit(M[i(641)],U.webcodecsAudioInitTimeout,s,t),this[i(1332)](i(712),"webcodecsAudioInitTimeout and webcodecsAudioInitTimeoutReplay is false , pause success")}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],U[r(970)],s,t),this[r(1332)](r(712),r(821),i)}))[e(1109)]((()=>{this[e(916)]=!1}))}}[cR(1068)](t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this[e(1423)](e(712),e(1313)));if(this[e(1346)])return void this[e(1423)](e(712),e(1454));this[e(1431)](M[e(1334)],this[e(594)](U[e(1096)],t));const s=this[e(756)]();if(this[e(1346)]=!0,this[e(1089)]&&this.player._opt[e(460)]){this[e(1423)](e(712),e(1424)+this[e(1089)]._opt[e(1356)]+e(828));const i=this[e(1004)][e(1220)],r=this._opt[e(619)];let n={};this[e(1089)][e(1004)][e(1356)]===p[e(1012)]&&(n={useSIMD:!1}),n=this[e(556)](s,n),this[e(431)](n).then((()=>{const n=e;this[n(516)](i,r)[n(608)]((()=>{const t=n;this[t(1423)](t(712),t(639)),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M[i(641)],U[i(1096)],s,t),this[i(1332)](i(712),i(523),e)}))[n(1109)]((()=>{this[n(1346)]=!1}))}))[e(978)]((i=>{const r=e;this[r(1346)]=!1,this[r(1431)](M[r(641)],U[r(1096)],s,t),this[r(1332)](r(712),r(1310),i)}))}else{const i=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this[e(1422)](i)[e(608)]((()=>{const i=e;this.emit(M[i(641)],U.simdDecodeError,s,t),this[i(1332)](i(712),i(587))})).catch((i=>{const r=e;this.emit(M.playFailedAndPaused,U[r(1096)],s,t),this.debugError(r(712),r(1365),i)}))[e(1109)]((()=>{this.simdDecodeErrorOnLock=!1}))}}[cR(1446)](t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this[e(1423)]("JbPro","wasmWidthOrHeightChange but player is destroyed"));if(this[e(1181)])return void this.debugLog(e(712),e(595));this.emit(M[e(1334)],this[e(594)](U.wasmWidthOrHeightChange,t));const s=this[e(756)]();if(this.wasmWidthOrHeightChangeOnLock=!0,this[e(1089)]&&this[e(1089)][e(1004)][e(815)]){this[e(1423)](e(712),e(514));const i=this._opt.url,r=this[e(1004)][e(619)];let n=this._resetPlayerBeforeUpdateOptions(s);this[e(431)](n)[e(608)]((()=>{const n=e;this[n(1004)].widthOrHeightChangeReplayDelayTime>0?this[n(823)]=setTimeout((()=>{const e=n;this[e(823)]=null,this[e(549)]()?this.debug&&this[e(1423)](e(712),e(1351)):this[e(516)](i,r)[e(608)]((()=>{const t=e;this[t(1423)](t(712),t(758)),this[t(1282)]()}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],U[r(401)],s,t),this[r(1332)]("JbPro",r(1006),i)}))[e(1109)]((()=>{this[e(1181)]=!1}))}),1e3*this[n(1004)][n(1393)]):this[n(516)](i,r)[n(608)]((()=>{const t=n;this.debugLog(t(712),t(758))})).catch((e=>{const i=n;this.emit(M[i(641)],U.wasmWidthOrHeightChange,s,t),this.debugError(i(712),i(1006),e)}))[n(1109)]((()=>{this[n(1181)]=!1}))})).catch((i=>{const r=e;this[r(1181)]=!1,this.emit(M[r(641)],U[r(401)],s,t),this.debugError(r(712),"wasmWidthOrHeightChange and _resetPlayer error",i)}))}else{const i=!1===this[e(1004)][e(338)];this[e(1089)].setPlayFailedAndPaused(),this[e(1422)](i)[e(608)]((()=>{const i=e;this.emit(M[i(641)],U.wasmWidthOrHeightChange,s,t),this.debugError(i(712),i(1296))})).catch((i=>{const r=e;this.emit(M[r(641)],U[r(401)],s,t),this.debugError("JbPro",r(1162),i)}))[e(1109)]((()=>{this[e(1181)]=!1}))}}[cR(830)](t){const e=cR;if(this[e(549)]())return void(this.debug&&this.debugLog(e(712),e(538)));if(this[e(508)])return void this[e(1423)](e(712),e(1442));this.emit(M[e(1334)],this[e(594)](U.wasmUseVideoRenderError,t)),this[e(1423)](e(712),e(1385));const s=this[e(1004)][e(1220)],i=this._opt.playOptions;this[e(508)]=!0,this._resetPlayer({useVideoRender:!1,useCanvasRender:!0})[e(608)]((()=>{const r=e;this[r(516)](s,i)[r(608)]((()=>{const t=r;this[t(1423)](t(712),t(377)),this[t(1282)]()})).catch((e=>{const s=r;this.emit(M[s(641)],U[s(1443)],{},t),this.debugError(s(712),s(765),e)}))[r(1109)]((()=>{this[r(508)]=!1}))}))[e(978)]((s=>{const i=e;this[i(508)]=!1,this[i(1431)](M[i(641)],U[i(1443)],{},t),this.debugError(i(712),i(406),s)}))}[cR(1019)](t){const e=cR;if(this.isDestroyed())return void(this[e(1318)]&&this.debugLog(e(712),e(617)));if(this[e(415)])return void this[e(1423)](e(712),e(1041));this[e(1431)](M[e(1334)],this[e(594)](U[e(361)],t)),this[e(415)]=!0,this[e(1423)](e(712),e(1372));const s=this[e(1004)][e(1220)],i=this[e(1004)][e(619)];this[e(431)]({useOldWasm:!0})[e(608)]((()=>{const r=e;this[r(516)](s,i)[r(608)]((()=>{const t=r;this.debugLog(t(712),t(1048)),this[t(1282)]()}))[r(978)]((e=>{const s=r;this[s(1431)](M[s(641)],U.webcodecsH265NotSupport,{},t),this[s(1332)](s(712),"notSupportNewWasm auto wasm [wasm-> old wasm] reset player and play error",e)})).finally((()=>{this[r(415)]=!1}))}))[e(978)]((t=>{const s=e;this[s(415)]=!1,this[s(1332)]("JbPro","notSupportNewWasm auto wasm [wasm-> old wasm] _resetPlayer and play error",t)}))}[cR(723)](t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this[e(1423)](e(712),e(1273)));if(this[e(1230)])return void this[e(1423)](e(712),e(1535));this[e(1431)](M.crashLog,this[e(594)](U[e(1092)],t)),this.failedToAsynchronouslyPrepareWasmLock=!0;const s=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this[e(1422)](s)[e(608)]((()=>{const s=e;this[s(1431)](M[s(641)],U[s(1092)],{},t),this[s(1332)](s(712),s(1257))}))[e(978)]((s=>{const i=e;this.emit(M[i(641)],U.failedToAsynchronouslyPrepareWasm,{},t),this.debugError(i(712),i(1483),s)}))[e(1109)]((()=>{this[e(1230)]=!1}))}[cR(527)](t){const e=cR;if(this.isDestroyed())return void(this[e(1318)]&&this.debugLog(e(712),e(1370)));if(this[e(1355)])return void this.debugLog("JbPro",e(1342));this.emit(M.crashLog,this[e(594)](U[e(1376)],t));const s=this[e(756)]();if(this[e(1355)]=!0,this[e(1089)]&&this[e(1089)][e(1004)].videoElementPlayingFailedReplay){this[e(1423)](e(712),"videoElementPlayingFailed and useMSE is "+this[e(1004)][e(628)]+" and reset player and play");const i=this[e(1004)][e(1220)],r=this[e(1004)][e(619)];let n={useMSE:!1,useVideoRender:!1,useCanvasRender:!0};n=this[e(556)](s,n),this[e(431)](n)[e(608)]((()=>{const s=e;this[s(516)](i,r).then((()=>{const t=s;this.debugLog(t(712),t(1304)),this[t(1282)]()}))[s(978)]((e=>{const i=s;this[i(1431)](M[i(641)],U[i(1376)],{},t),this[i(1332)](i(712),"videoElementPlayingFailed and reset player and play error",e)})).finally((()=>{this[s(1355)]=!1}))}))[e(978)]((s=>{const i=e;this[i(1355)]=!1,this[i(1431)](M.playFailedAndPaused,U[i(1376)],{},t),this[i(1332)](i(712),"videoElementPlayingFailed and _resetPlayer error",s)}))}else{const s=!1===this[e(1004)].playFailedUseLastFrameShow;this[e(1089)][e(1344)](),this[e(1422)](s)[e(608)]((()=>{const s=e;this[s(1431)](M[s(641)],U.videoElementPlayingFailed,{},t),this[s(1332)](s(712),s(1182))}))[e(978)]((s=>{const i=e;this[i(1431)](M[i(641)],U[i(1376)],{},t),this[i(1332)](i(712),i(486),s)}))[e(1109)]((()=>{this.videoElementPlayingFailedOnLock=!1}))}}[cR(1278)](t){const e=cR;if(this[e(549)]())this[e(1318)]&&this[e(1423)](e(712),"simdH264DecodeVideoWidthIsTooLarge but player is destroyed");else if(this[e(1421)])this[e(1423)](e(712),e(323));else if(this[e(1431)](M[e(1334)],this[e(594)](U[e(1451)],t)),this.simdH264DecodeVideoWidthIsTooLargeOnLock=!0,this[e(1089)]&&this[e(1089)][e(1004)][e(1163)]){this[e(1423)](e(712),e(546));const s=this[e(1004)].url,i=this[e(1004)].playOptions;this[e(431)]({useSIMD:!1})[e(608)]((()=>{const r=e;this.play(s,i)[r(608)]((()=>{const t=r;this[t(1423)](t(712),t(740)),this[t(1282)]()}))[r(978)]((e=>{const s=r;this[s(1431)](M[s(641)],U.simdH264DecodeVideoWidthIsTooLarge,{},t),this[s(1332)]("JbPro",s(944),e)}))[r(1109)]((()=>{this[r(1421)]=!1}))}))[e(978)]((s=>{const i=e;this[i(1421)]=!1,this[i(1431)](M.playFailedAndPaused,U[i(1451)],{},t),this.debugError(i(712),i(869),s)}))}else{const s=!1===this[e(1004)][e(338)];this[e(1089)].setPlayFailedAndPaused(),this[e(1422)](s)[e(608)]((()=>{const s=e;this[s(1431)](M[s(641)],U[s(1451)],{},t),this[s(1332)](s(712),s(1457))}))[e(978)]((s=>{const i=e;this.emit(M[i(641)],U[i(1451)],{},t),this[i(1332)](i(712),i(1547),s)})).finally((()=>{this[e(1421)]=!1}))}}[cR(977)](t){const e=cR;if(this[e(1089)]._opt[e(381)]){if(this[e(549)]())return void(this[e(1318)]&&this.debugLog(e(712),"networkDelayTimeout but player is destroyed"));if(this[e(525)])return void this[e(1423)]("JbPro",e(1242));this[e(1431)](M.crashLog,this[e(594)](M[e(310)],t));const s=this._getVideoLastIframeInfo();this[e(1423)]("JbPro",e(655));const i=this[e(1004)][e(1220)],r=this[e(1004)][e(619)];let n=this[e(556)](s);this.networkDelayTimeoutOnLock=!0,this[e(431)](n)[e(608)]((()=>{const n=e;this[n(516)](i,r)[n(608)]((()=>{const t=n;this[t(1423)](t(712),t(976)),this[t(1282)]()})).catch((e=>{const i=n;this[i(1431)](M[i(641)],M[i(310)],s,t),this[i(1332)](i(712),i(1415),e)}))[n(1109)]((()=>{this[n(525)]=!1}))}))[e(978)]((()=>{const i=e;this[i(525)]=!1,this.emit(M.playFailedAndPaused,M.networkDelayTimeout,s,t),this[i(1332)](i(712),i(1038))}))}}[cR(656)](t){const e=cR;if(this[e(549)]())return void(this.debug&&this[e(1423)](e(712),e(1528)));if(this.flvDemuxBufferSizeTooLargeOnLock)return void this[e(1423)](e(712),e(620));const s=this[e(756)]();if(this.flvDemuxBufferSizeTooLargeOnLock=!0,this[e(1431)](M[e(1334)],this[e(594)](M[e(733)],t)),this.player[e(1004)].flvDemuxBufferSizeTooLargeReplay){this.debugLog(e(712),e(1113));const i=this[e(1004)].url,r=this[e(1004)].playOptions;let n=this[e(556)](s);this._resetPlayer(n)[e(608)]((()=>{const n=e;this[n(516)](i,r).then((()=>{this[n(1423)](this.TAG_NAME,"flv Demux Buffer Size Too Large and reset player and play success"),this._replaySuccessAndNext()}))[n(978)]((e=>{const i=n;this[i(1431)](M[i(641)],M.flvDemuxBufferSizeTooLarge,s,t),this[i(1332)](this.TAG_NAME,i(1322),e)}))[n(1109)]((()=>{this[n(421)]=!1}))}))[e(978)]((()=>{const i=e;this.flvDemuxBufferSizeTooLargeOnLock=!1,this[i(1431)](M[i(641)],M[i(733)],s,t),this.debugError(this.TAG_NAME,i(534))}))}else if(this[e(1004)][e(524)]){this[e(1423)](this.TAG_NAME,e(1170));const i=!1===this._opt[e(338)];this[e(1089)][e(1344)](),this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M[i(641)],U.flvDemuxBufferSizeTooLarge,s,t),this[i(1423)](this[i(989)],"flv Demux Buffer Size Too Large and flvDemuxBufferSizeTooLargeEmitFailed = true and pause player success")}))[e(978)]((i=>{const r=e;this[r(1431)](M.playFailedAndPaused,U[r(733)],s,t),this[r(1332)](this[r(989)],r(1204),i)}))[e(1109)]((()=>{this[e(421)]=!1}))}}[cR(649)](t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this[e(1423)]("JbPro",e(1427)));if(this[e(1231)])return void this[e(1423)](e(712),e(605));this[e(1431)](M.crashLog,this[e(594)](U[e(671)],t));const s=this[e(756)](),i=this[e(1058)]();if(this[e(1231)]=!0,this[e(1089)][e(1004)][e(1195)]||i){i?this[e(1423)]("JbPro",e(1101)):this[e(1423)](e(712),e(603)+this[e(991)]+e(1438)+this[e(1004)][e(1465)]+e(439));let r=this[e(556)](s);const n=this._opt.playOptions,o=this[e(1004)][e(1220)],a=i?1:this._opt[e(1465)];this._resetPlayer(r)[e(608)]((()=>{this.streamErrorReplayDelayTimeout=setTimeout((()=>{const e=lR;if(this.streamErrorReplayDelayTimeout=null,!this[e(549)]())return this[e(1058)]()?(this[e(1423)]("JbPro",e(1277)),this[e(953)]=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:o,options:n,type:U[e(671)]})):(this[e(991)]++,void this[e(516)](o,n)[e(608)]((()=>{const t=e;this[t(1423)](t(712),t(1560)),this[t(1282)]()})).catch((s=>{const i=e;this[i(1431)](M.playFailedAndPaused,U.fetchError,{},t),this[i(1332)](i(712),i(492),s)}))[e(1109)]((()=>{this[e(1231)]=!1})));this[e(1318)]&&this[e(1423)]("JbPro",e(1031))}),1e3*a)}))[e(978)]((s=>{const i=e;this[i(1231)]=!1,this[i(1431)](M.playFailedAndPaused,U[i(671)],{},t),this[i(1332)](i(712),i(1359),s)}))}else{this[e(1423)]("JbPro",e(1508));const i=!1===this._opt.playFailedUseLastFrameShow;this[e(1089)].setPlayFailedAndPaused(),this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M[i(641)],U.fetchError,s,t),this[i(1423)]("JbPro",i(707))}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],U[r(671)],s,t),this[r(1332)](r(712),r(1461),i)}))[e(1109)]((()=>{this[e(1231)]=!1}))}}[cR(348)](t){const e=cR;if(this.isDestroyed())return void(this[e(1318)]&&this[e(1423)]("JbPro",e(1445)));if(this.streamEndOnLock)return void this[e(1423)]("JbPro","streamEndOnLock is true");this[e(1431)](M[e(1334)],this[e(594)](M[e(1280)],t));const s=this[e(756)](),i=""+t===e(337)&&this.player[e(1004)][e(548)],r=!!i&&this[e(1401)](Mt[e(878)]),n=i&&r,o=this[e(1089)][e(1004)][e(1537)],a=this[e(1058)]();if(this[e(720)]=!0,n||o||a){a?this[e(1423)]("JbPro",e(581)):n?this[e(1423)](e(712),"streamEnd and websocket1006ErrorReplay is true and error is 1006 and _websocket1006ErrorReplayTimes is "+this[e(1066)]+" , delay "+this[e(1004)][e(1034)]+e(585)):this.debugLog(e(712),e(1379)+this[e(1400)]+e(580)+this[e(1004)][e(1157)]+e(585));const r=this[e(1004)][e(619)],o=this[e(1004)][e(1220)];i&&this[e(837)][e(575)](je());let h=this._resetPlayerBeforeUpdateOptions(s),c=n?this[e(1004)][e(1034)]:this._opt[e(1157)];a&&(c=1),this[e(431)](h)[e(608)]((()=>{const s=e;this[s(1224)]=setTimeout((()=>{const e=s;if(this[e(1224)]=null,this._removeLoadingBackgroundForIOS(),!this[e(549)]())return this[e(1058)]()?(n?this[e(1423)](e(712),e(1049)):this[e(1423)](e(712),e(719)),this[e(953)]=!0,void(this[e(1227)]={url:o,options:r,type:n?U.websocket1006Error:U[e(1280)]})):(n?this[e(1066)]++:this[e(1400)]++,void this[e(516)](o,r)[e(608)]((()=>{const t=e;n?this.debugLog("JbPro",t(1160)):this[t(1423)]("JbPro","streamEnd and reset player and play success"),this[t(1282)]()}))[e(978)]((s=>{const i=e;this.emit(M[i(641)],U[i(1280)],{},t),n?this[i(1332)](i(712),i(1538),s):this[i(1332)](i(712),i(1074),s)})).finally((()=>{this[e(720)]=!1})));a?this[e(1318)]&&this[e(1423)]("JbPro","streamEnd and network is disconnect and _resetPlayer() but player is destroyed and return"):n?this[e(1318)]&&this.debugLog(e(712),"streamEnd and 1006 error and _resetPlayer() but player is destroyed and return"):this.debug&&this[e(1423)]("JbPro",e(1311))}),1e3*c)})).catch((s=>{const i=e;this[i(720)]=!1,this[i(1431)](M[i(641)],U[i(1280)],{},t),n?this[i(1332)](i(712),"streamEnd and 1006 and _resetPlayer error",s):this[i(1332)](i(712),"streamEnd and _resetPlayer error",s)}))}else{i?this[e(1423)](e(712),"streamEnd pause player "+(ci(r)?e(1267):"")):this.debugLog("JbPro",e(1260));const n=!1===this[e(1004)].playFailedUseLastFrameShow;this.player[e(1344)](),this[e(1422)](n)[e(608)]((()=>{const i=e;this[i(1431)](M[i(641)],M[i(1280)],s,t),this[i(1423)](i(712),i(1487))})).catch((i=>{const r=e;this[r(1431)](M[r(641)],M[r(1280)],s,t),this.debugError(r(712),r(522),i)}))[e(1109)]((()=>{this[e(720)]=!1}))}}[cR(565)](t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this.debugLog(e(712),"websocketError but player is destroyed"));if(this[e(817)])return void this[e(1423)]("JbPro",e(690));this.emit(M.crashLog,this.getCrashLog(U[e(847)],t));const s=this[e(756)](),i=this[e(1058)]();if(this[e(817)]=!0,this[e(1089)]._opt.streamErrorReplay||i){i?this[e(1423)]("JbPro",e(1544)):this[e(1423)](e(712),"websocketError error and streamErrorReplay is true and _streamErrorReplayTimes is "+this._streamErrorReplayTimes+e(1047)+this[e(1004)][e(1465)]+", next replay");let r=this[e(556)](s);const n=this[e(1004)].playOptions,o=this[e(1004)][e(1220)],a=i?1:this._opt.streamErrorReplayDelayTime;this[e(431)](r)[e(608)]((()=>{this.streamErrorReplayDelayTimeout=setTimeout((()=>{const e=lR;if(this[e(1178)]=null,!this[e(549)]())return this[e(1058)]()?(this.debugLog(e(712),"websocketError error and network is offline and wait network online to play , so return"),this[e(953)]=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:o,options:n,type:U[e(847)]})):(this[e(991)]++,void this[e(516)](o,n)[e(608)]((()=>{const t=e;this[t(1423)](t(712),t(1147)),this._replaySuccessAndNext()}))[e(978)]((s=>{const i=e;this[i(1431)](M.playFailedAndPaused,U.fetchError,{},t),this.debugError(i(712),i(1455),s)}))[e(1109)]((()=>{this[e(817)]=!1})));i?this[e(1318)]&&this.debugLog(e(712),"websocketError error and network is disconnect and _resetPlayer() but player is destroyed and return"):this.debug&&this[e(1423)]("JbPro",e(547))}),1e3*a)}))[e(978)]((s=>{const i=e;this[i(817)]=!1,this.emit(M.playFailedAndPaused,U.fetchError,{},t),this[i(1332)](i(712),i(781),s)}))}else{this[e(1423)]("JbPro",e(912));const i=!1===this[e(1004)][e(338)];this.player[e(1344)](),this[e(1422)](i)[e(608)]((()=>{const i=e;this.emit(M[i(641)],U[i(847)],s,t),this[i(1423)](i(712),i(963))}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],U.websocketError,s,t),this[r(1332)]("JbPro",r(322),i)}))[e(1109)]((()=>{this.websocketErrorOnLock=!1}))}}_handleWebrtcError(t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this[e(1423)](e(712),"webrtcError but player is destroyed"));if(this.webrtcErrorOnLock)return void this[e(1423)]("JbPro",e(366));this.emit(M[e(1334)],this[e(594)](U[e(1108)],t));const s=this._getVideoLastIframeInfo();if(this[e(1058)]()){this[e(1423)](e(712),e(947));const i=this[e(1004)][e(619)],r=this[e(1004)][e(1220)];let n=this._resetPlayerBeforeUpdateOptions(s);this._resetPlayer(n)[e(608)]((()=>{const t=e;this[t(953)]=!0,this[t(1227)]={url:r,options:i,type:U[t(1108)]}}))[e(978)]((()=>{const i=e;this[i(1431)](M.playFailedAndPaused,U[i(1108)],s,t),this[i(1332)](i(712),i(778))}))[e(1109)]((()=>{this[e(592)]=!1}))}else{this.debugLog(e(712),e(1295));const i=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this[e(592)]=!0,this[e(1422)](i)[e(608)]((()=>{const i=e;this.emit(M[i(641)],U[i(1108)],s,t),this.debugLog(i(712),i(367))})).catch((i=>{const r=e;this[r(1431)](M.playFailedAndPaused,U.webrtcError,s,t),this[r(1332)](r(712),"webrtcError and pause",i)}))[e(1109)]((()=>{this[e(592)]=!1}))}}[cR(1549)](t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this.debugLog("JbPro",e(568)));if(this[e(650)])return void this[e(1423)](e(712),e(964));this[e(1431)](M[e(1334)],this.getCrashLog(U.hlsError,t));const s=this[e(756)]();if(this._isNeedNetworkDisconnectReplay()){this[e(1423)](e(712),e(721));const i=this[e(1004)].playOptions,r=this._opt.url;let n=this[e(556)](s);this[e(431)](n)[e(608)]((()=>{this._isNetworkOfflinePaused=!0,this._isNetworkOfflinePausedAndNextPlayConfig={url:r,options:i,type:U.hlsError}})).catch((()=>{const i=e;this[i(1431)](M[i(641)],U.hlsError,s,t),this[i(1332)]("JbPro","hlsError and _resetPlayer error")}))[e(1109)]((()=>{this.hlsErrorOnLock=!1}))}else{this[e(1423)](e(712),e(701));const i=!1===this._opt[e(338)];this[e(1089)][e(1344)](),this[e(650)]=!0,this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M[i(641)],U[i(505)],s,t),this[i(1423)](i(712),i(1291))})).catch((i=>{const r=e;this[r(1431)](M.playFailedAndPaused,U.hlsError,s,t),this[r(1332)](r(712),r(1517),i)}))[e(1109)]((()=>{this[e(650)]=!1}))}}_handleAliyunRtcError(t){const e=cR;if(this.isDestroyed())return void(this.debug&&this[e(1423)](e(712),e(452)));if(this[e(586)])return void this.debugLog("JbPro",e(797));this[e(1431)](M[e(1334)],this[e(594)](U.aliyunRtcError,t));const s=this._getVideoLastIframeInfo();this[e(1423)](e(712),"aliyunRtcError and pause player");const i=!1===this[e(1004)].playFailedUseLastFrameShow;this.player[e(1344)](),this.aliyunRtcErrorOnLock=!0,this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M[i(641)],U[i(659)],s,t),this.debugLog(i(712),"aliyunRtcError and pause player success")}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],U.aliyunRtcError,s,t),this[r(1332)]("JbPro",r(1091),i)}))[e(1109)]((()=>{this[e(586)]=!1}))}_handleDecoderWorkerInitError(t){const e=cR;if(this[e(549)]())return void(this.debug&&this[e(1423)]("JbPro",e(680)));if(this[e(1468)])return void this.debugLog(e(712),"decoderWorkerInitErrorOnLock is true");this[e(1431)](M[e(1334)],this[e(594)](U[e(890)],t));const s=this[e(756)]();this[e(1423)](e(712),"decoderWorkerInitError and pause player");const i=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this[e(1468)]=!0,this[e(1422)](i)[e(608)]((()=>{const i=e;this.emit(M[i(641)],U[i(890)],s,t),this[i(1423)]("JbPro",i(488))})).catch((i=>{const r=e;this[r(1431)](M.playFailedAndPaused,U[r(890)],s,t),this[r(1332)](r(712),r(1527),i)})).finally((()=>{this[e(1468)]=!1}))}[cR(487)](t){const e=cR;if(this[e(549)]())return void(this[e(1318)]&&this[e(1423)](e(712),e(517)));if(this[e(1065)])return void this[e(1423)]("JbPro",e(382));this[e(1431)](M[e(1334)],this[e(594)](U[e(1325)],t)),this.debugLog(e(712),e(647));const s=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this[e(1065)]=!0,this[e(1422)](s).then((()=>{const s=e;this[s(1431)](M.playFailedAndPaused,U[s(1325)],{},t),this[s(1423)]("JbPro",s(1565))})).catch((s=>{const i=e;this[i(1431)](M.playFailedAndPaused,U[i(1325)],{},t),this.debugError(i(712),i(917),s)}))[e(1109)]((()=>{this[e(1065)]=!1}))}_handleVideoElementPlayingFailedForWebrtc(t){const e=cR;if(this.isDestroyed())return void(this.debug&&this[e(1423)]("JbPro",e(895)));if(this[e(1136)])return void this.debugLog(e(712),e(1124));this[e(1431)](M[e(1334)],this[e(594)](U[e(626)],t)),this[e(1423)](e(712),e(1397));const s=!1===this[e(1004)][e(338)];this.player.setPlayFailedAndPaused(),this.videoElementPlayingFailedForWebrtcOnLock=!0,this[e(1422)](s).then((()=>{const s=e;this[s(1431)](M[s(641)],U[s(626)],{},t),this[s(1423)](s(712),s(751))}))[e(978)]((s=>{const i=e;this[i(1431)](M[i(641)],U[i(626)],{},t),this.debugError("JbPro",i(663),s)})).finally((()=>{this[e(1136)]=!1}))}_handleVideoInfoError(t){const e=cR;if(this.isDestroyed())return void(this[e(1318)]&&this[e(1423)](e(712),e(1536)));if(this[e(881)])return void this[e(1423)](e(712),e(374));this[e(1431)](M[e(1334)],this[e(594)](U[e(871)],t)),this[e(1423)](e(712),e(1210));const s=!1===this[e(1004)].playFailedUseLastFrameShow;this[e(1089)][e(1344)](),this[e(881)]=!0,this[e(1422)](s)[e(608)]((()=>{const s=e;this.emit(M[s(641)],U[s(871)],{},t),this[s(1423)](s(712),s(1531))}))[e(978)]((s=>{const i=e;this[i(1431)](M[i(641)],U[i(871)],{},t),this.debugError("JbPro",i(743),s)}))[e(1109)]((()=>{this[e(881)]=!1}))}[cR(849)](t){const e=cR;if(this.isDestroyed())return void(this[e(1318)]&&this.debugLog("JbPro",e(1127)));if(this[e(355)])return void this[e(1423)](e(712),"webrtcStreamH265OnLock is true");this[e(1423)](e(712),e(638));const s=this[e(1004)][e(1220)],i=this._opt[e(619)];this[e(355)]=!0,this[e(431)]({isWebrtcH265:!0}).then((()=>{const r=e;this.play(s,i)[r(608)]((()=>{const t=r;this[t(1423)](t(712),"webrtcStreamH265 and reset player and play success"),this._replaySuccessAndNext()})).catch((e=>{const s=r;this[s(1431)](M[s(641)],M[s(764)],{},t),this[s(1332)](s(712),"webrtcStreamH265 and reset player and play error",e)}))[r(1109)]((()=>{this[r(355)]=!1}))})).catch((()=>{const s=e;this[s(355)]=!1,this[s(1431)](M[s(641)],M[s(764)],{},t),this[s(1332)]("JbPro",s(420))}))}[cR(1243)](){const t=cR;this.isDestroyed()?this[t(1318)]&&this.debugLog(t(712),"playbackEnd but player is destroyed"):this[t(913)]?this.debugLog(t(712),"playbackEndOnLock is true"):(this[t(913)]=!0,this[t(1422)]()[t(608)]((()=>{const e=t;this[e(1431)](M[e(552)]),this[e(1423)](e(712),"playbackEnd and pause success")}))[t(978)]((e=>{const s=t;this.emit(M[s(552)]),this[s(1332)](s(712),s(333),e)}))[t(1109)]((()=>{this[t(913)]=!1})))}[cR(1126)](t){const e=cR;if(this.isDestroyed())return void(this.debug&&this[e(1264)](e(712),e(345)));this[e(1431)](M[e(1334)],this[e(594)](M[e(646)],t));const s=this._getVideoLastIframeInfo();if(this[e(1089)]&&this[e(1089)][e(1004)].heartTimeoutReplay&&(this[e(1148)]{const n=e;if(this[n(1058)]())return this[n(1423)]("JbPro",n(1261)),this[n(953)]=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:i,options:r,type:M.delayTimeout});this[n(516)](i,r).then((()=>{const t=n;this[t(1423)](this.TAG_NAME,t(1128)),this[t(1282)]()}))[n(978)]((e=>{const i=n;this[i(1431)](M[i(641)],M[i(646)],s,t),this[i(1332)](i(712),i(422),e)}))}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],M[r(646)],s,t),this[r(1332)](r(712),r(813),i)}))}else{const i=!1===this[e(1004)][e(338)];this[e(1089)].setPlayFailedAndPaused(),this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M[i(641)],M.delayTimeout,s,t),this[i(1089)]&&(this.emit(M[i(891)]),this[i(1431)](M[i(641)],M[i(891)],s,t)),this[i(1264)]("JbPro","delayTimeoutRetryEnd and\n opt.heartTimeout is "+(this[i(1089)]&&this[i(1089)][i(1004)].heartTimeout)+i(445)+(this[i(1089)]&&this[i(1089)][i(1004)][i(1088)])+" and\n opt.heartTimeoutReplayTimes is "+(this[i(1089)]&&this[i(1089)]._opt.heartTimeoutReplayTimes)+",and\n local._heartTimeoutReplayTimes is "+this._heartTimeoutReplayTimes)}))[e(978)]((i=>{const r=e;this.emit(M[r(641)],M[r(646)],s,t),this[r(1332)](r(712),r(1419),i)}))}}[cR(1550)](t){const e=cR;if(this.isDestroyed())return void(this[e(1318)]&&this[e(1423)](e(712),"loading timeout but player is destroyed"));this[e(1431)](M[e(1334)],this.getCrashLog(M.loadingTimeout,t));const s=this._getVideoLastIframeInfo();if(this.player&&this[e(1089)][e(1004)][e(1384)]&&(this[e(326)]{const n=e;if(this[n(1058)]())return this[n(1423)](n(712),n(1321)),this[n(953)]=!0,void(this._isNetworkOfflinePausedAndNextPlayConfig={url:i,options:r,type:M.loadingTimeout});this[n(516)](i,r)[n(608)]((()=>{const t=n;this[t(1423)](this[t(989)],t(480)),this._replaySuccessAndNext()}))[n(978)]((e=>{const i=n;this[i(1431)](M.playFailedAndPaused,M.loadingTimeout,s,t),this[i(1332)]("JbPro","loading timeout replay error",e)}))})).catch((i=>{const r=e;this[r(1431)](M[r(641)],M[r(622)],s,t),this.debugError(r(712),r(708),i)}))}else{const i=!1===this[e(1004)][e(338)];this[e(1089)][e(1344)](),this[e(1422)](i).then((()=>{const i=e;this[i(1431)](M[i(641)],M[i(622)],s,t),this[i(1089)]&&(this[i(1431)](M[i(465)]),this[i(1431)](M[i(641)],M[i(465)],s,t),this._opt[i(1476)]&&this[i(1089)].showPlayBtn()),this[i(1423)](i(712),i(1212)+(this.player&&this[i(1089)][i(1004)].loadingTimeout)+i(318)+(this.player&&this[i(1089)][i(1004)][i(1384)])+i(905)+this[i(326)]+i(1194)+(this[i(1089)]&&this[i(1089)][i(1004)][i(484)]))}))[e(978)]((i=>{const r=e;this[r(1431)](M[r(641)],M.loadingTimeout,s,t),this.debugError(r(712),r(1371),i)}))}}[cR(761)](t){const e=cR;if(this[e(549)]())return void this.debugLog(e(712),e(1482));this.emit(M[e(1334)],this[e(594)](U[e(684)],t)),this[e(1423)](e(712),e(392));const s=this[e(756)](),i=!1===this._opt[e(338)];this[e(1089)][e(1344)](),this[e(1422)](i)[e(608)]((()=>{const i=e;this[i(1431)](M[i(641)],U[i(684)],s,t),this.debugLog("JbPro",i(1266))})).catch((i=>{const r=e;this[r(1431)](M[r(641)],U[r(684)],s,t),this[r(1332)](r(712),r(743),i)}))}_checkInitDecoderWorkerTimeout(){const t=cR;this[t(479)](),this[t(684)]=setTimeout((()=>{const e=t;this[e(761)](U[e(684)])}),1e3*this[t(1004)].initDecoderWorkerTimeout)}_clearInitDecoderWorkerTimeout(){const t=cR;this[t(684)]&&(clearTimeout(this[t(684)]),this.initDecoderWorkerTimeout=null)}[cR(1423)](t){const e=cR;if(this[e(1004)].debug&&this.debug){for(var s=arguments[e(1416)],i=new Array(s>1?s-1:0),r=1;r1?s-1:0),r=1;r1?s-1:0),r=1;r{const s=lR;if(this[s(549)]())return e("player is destroyed");this.debugLog(s(712),"resetPlayer()");const i=this[s(695)]();this[s(431)](i)[s(608)]((()=>{const e=s;this[e(1423)](e(712),e(883)),t()}))[s(978)]((t=>{const i=s;this[i(1264)](i(712),i(796),t.toString(),t),e(t)}))}))}[cR(378)](t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),e(371),t),this[e(1089)]?(this.player[e(378)](t),this._opt.dynamicWatermarkConfig=t):this.debugWarn(e(712),e(691)))}[cR(845)](){const t=cR;this[t(549)]()||(this[t(1423)]("JbPro",t(893)),this[t(1089)]?(this[t(1089)][t(845)](),this[t(1004)][t(1441)]={}):this[t(1264)]("JbPro",t(1510)))}[cR(545)](t){const e=cR;this[e(549)]()||(this[e(1423)](e(712),"updateGhostWatermark()",t),this[e(1089)]?(this.player[e(545)](t),this[e(1004)][e(1409)]=t):this[e(1264)](e(712),"updateGhostWatermark() player is not init"))}[cR(306)](){const t=cR;this[t(549)]()||(this.debugLog(t(712),"removeGhostWatermark()"),this[t(1089)]?(this[t(1089)][t(306)](),this[t(1004)][t(1409)]={}):this[t(1264)](t(712),"removeGhostWatermark() player is not init"))}_resetPlayerBeforeUpdateOptions(t){const e=cR;let s=arguments[e(1416)]>1&&void 0!==arguments[1]?arguments[1]:{};if(this[e(1089)][e(1004)][e(1206)]&&(s=Object[e(651)]({},s,t,{loadingIcon:this[e(1089)][e(1004)].replayShowLoadingIcon})),ci(this[e(1564)]())&&(s[e(1439)]=!0),this[e(1089)].isPlayback()){const t=this.player[e(629)].playingTimestamp;if(t){this[e(1423)](this.TAG_NAME,e(1056)+t);const i=this[e(1089)][e(1004)][e(494)];i[e(315)]=t,s[e(494)]=i}}else if(this[e(1089)][e(1080)]()){const t=this[e(1089)][e(864)][e(1167)]();if(t){this[e(1423)](this[e(989)],"_resetPlayerBeforeUpdateOptions() and is playVod playingTimestamp is "+t);const i=this[e(1089)][e(1004)][e(1358)];i[e(315)]=t,s[e(1358)]=i}}return s}[cR(1282)](){const t=cR;this[t(770)]&&this[t(770)][t(1416)]&&this[t(1089)][t(943)](this._tempContentToCanvasData)}getI18nConfig(){const t=cR;let e={};return this.player&&(e=this[t(1089)][t(1339)](),delete e[t(820)],delete e[t(1245)],delete e[t(700)]),e}playVod(t){const e=cR;let s=arguments[e(1416)]>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(((i,r)=>{const n=e,o=ni(),a=Object[n(651)]({},o[n(1358)],this[n(1004)][n(1358)],s),h={videoBuffer:0,playType:c.playVod,playVodConfig:a,cryptoKey:s[n(319)]||"",cryptoIV:s[n(791)]||"",openWebglAlignment:!0,useMSE:a[n(628)],useWCS:a.useWCS,useSIMD:a.useSIMD,supportHls265:!0};bs(s[n(806)])&&(h.isFFmpegSIMD=s[n(806)]),this._resetPlayer(h)[n(608)]((()=>{const e=n;this.play(t,s)[e(608)]((()=>{i()})).catch((t=>{r(t)}))}))[n(978)]((t=>{r(t)}))}))}playVodPause(){const t=cR;return this[t(1318)].log("JbPro",t(630)),new Promise(((e,s)=>{this[t(1089)].playVodPause=!0,e()}))}[cR(1205)](){const t=cR;return this.debug[t(945)](t(712),t(724)),new Promise(((e,s)=>{const i=t;this[i(1089)][i(1540)]=!1,e()}))}[cR(448)](t){const e=cR;return this[e(1423)](e(712),e(631)+t),ci(this[e(1004)].isLive)||this._opt[e(868)]!==c.playVod?Promise[e(569)](e(296)):us(Number(t))?new Promise(((s,i)=>{const r=e;this.player?this[r(1089)].playVodForward(t)[r(608)]((()=>{s()}))[r(978)]((t=>{i(t)})):i("player is not playing")})):Promise[e(569)](e(1248)+t+e(509))}[cR(375)](){return this[cR(448)](1)}[cR(1262)](t){const e=cR;return this[e(1423)](e(712),"playVodSeek() "+t),ci(this._opt[e(972)])||this[e(1004)][e(868)]!==c.playVod?Promise[e(569)](e(840)):us(Number(t))?new Promise(((s,i)=>{const r=e;this[r(1089)]?this[r(1089)][r(1262)](t)[r(608)]((()=>{s()}))[r(978)]((t=>{i(t)})):i(r(1232))})):Promise.reject('playVodSeek() params "time": '+t+e(509))}[cR(503)](t){const e=cR;return this.debugLog(e(712),e(1121)+t),ci(this[e(1004)].isLive)||this[e(1004)][e(868)]!==c[e(864)]?Promise[e(569)](e(398)):us(Number(t))?new Promise(((s,i)=>{const r=e;this[r(1089)]?this[r(1089)][r(503)](t).then((()=>{s()})).catch((t=>{i(t)})):i(r(1232))})):Promise[e(569)](e(1402)+t+e(509))}[cR(1336)](t){const e=cR;return this[e(1423)]("JbPro",e(402)+t),ci(this[e(1004)].isLive)||this[e(1004)][e(868)]!==c[e(864)]?Promise[e(569)](e(863)):us(Number(t))?new Promise(((s,i)=>{const r=e;this[r(1089)]?this[r(1089)].playVodBackwordJumping(t)[r(608)]((()=>{s()}))[r(978)]((t=>{i(t)})):i("player is not playing")})):Promise.reject(e(783)+t+e(509))}[cR(1217)](){const t=cR;let e=0;return this.player&&(e=this.player[t(1217)]()),e}[cR(735)](){const t=cR;let e=0;return this[t(1089)]&&(e=this.player[t(735)]()),e}[cR(459)](){const t=cR;let e=1;return this[t(1089)]&&(e=this[t(1089)][t(459)]()),e}[cR(933)](){const t=cR;if(this[t(549)]())return void this[t(1423)](t(712),t(1079));if(this[t(1089)][t(1004)][t(1395)])return this.debugLog(this.TAG_NAME,t(625)),void this[t(481)]();this[t(1423)](this[t(989)],t(391));const e=!1===this[t(1004)][t(338)];this[t(1422)](e)[t(608)]((()=>{const e=t;this[e(1423)](e(712),e(1357))}))[t(978)]((e=>{const s=t;this[s(1332)](s(712),"play vod ended and pause error",e)}))}_handlePlayVodEndedAndReplay(t){const e=cR;if(this[e(549)]())return void this[e(1423)]("JbPro",e(1444));const s=this[e(1004)][e(1220)],i=this._opt[e(619)];t&&(this[e(1004)].playVodConfig[e(315)]=t),this[e(1423)](e(712),"_handlePlayVodEndedAndReplay and reset player and start time is",t),this[e(431)]()[e(608)]((()=>{const t=e;this[t(516)](s,i)[t(608)]((()=>{const e=t;this[e(1004)][e(1358)][e(315)]=null,this[e(1318)][e(945)](this[e(989)],e(353)),this._replaySuccessAndNext()})).catch((e=>{const s=t;this.emit(M[s(641)],M[s(1156)],{},""),this[s(1318)][s(1541)](this[s(989)],s(564),e)}))}))[e(978)]((()=>{const t=e;this[t(1431)](M[t(641)],M.playVodEndedAndReplay,{},""),this.debugError(this[t(989)],"playVodEndedAndReplay and _resetPlayer error")}))}}return uR.ERROR=U,uR[cR(1312)]=F,window[cR(1354)]=uR,window[cR(712)]=uR,window[cR(331)]=uR,uR}));